graph, search, api_catalog pages: back/forward history stack (PanelNav/dpNav). File artifact paths open in external tabs via card.repo (Gitea source URL) or card.docs (cargo docs for .rs) — openFile/openFileInPanel removed from all pages. Tera | safe required for URL values inside <script> blocks (auto-escape of slashes). card.ncl: repo field added. insert_brand_ctx: injects card_repo/card_docs into Tera context. #[onto_api] proc-macro: source_file = file!() emitted; ApiRouteEntry.source_file populated in primary catalog handler. migration 0007-card-repo-field: check card.ncl for repo field; skip if absent.
43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
# Frontend asset management
|
|
#
|
|
# Vendored JS libs live in assets/vendor/ and are served by the daemon
|
|
# at /assets/vendor/<file>. Pin versions explicitly; bump manually.
|
|
#
|
|
# Pattern guide: reflection/templates/vendor-frontend-assets-prompt.md
|
|
|
|
CYTOSCAPE_NAVIGATOR_VERSION := "2.0.1"
|
|
HTMX_VERSION := "2.0.7"
|
|
|
|
# Export this daemon's API catalog to api-catalog.json.
|
|
# Run after any #[onto_api] annotation is added or changed.
|
|
# The file is read by the ontoref UI when this project is registered as a
|
|
# non-primary slug — consumer projects that run as separate binaries use this
|
|
# to expose their API surface in the ontoref UI.
|
|
[doc("Export #[onto_api] routes to artifacts/api-catalog-ontoref-daemon.ncl")]
|
|
export-api-catalog:
|
|
mkdir -p artifacts
|
|
cargo run -p ontoref-daemon --no-default-features -- --dump-api-catalog > artifacts/api-catalog-ontoref-daemon.ncl
|
|
@echo "exported routes to artifacts/api-catalog-ontoref-daemon.ncl"
|
|
|
|
# Download/update all vendored frontend JS dependencies
|
|
[doc("Vendor all frontend JS dependencies")]
|
|
vendor-js: vendor-cytoscape-navigator vendor-htmx
|
|
|
|
# cytoscape-navigator — minimap extension for Cytoscape.js
|
|
[doc("Vendor cytoscape-navigator (minimap)")]
|
|
vendor-cytoscape-navigator:
|
|
mkdir -p assets/vendor
|
|
curl -fsSL \
|
|
"https://cdn.jsdelivr.net/npm/cytoscape-navigator@{{CYTOSCAPE_NAVIGATOR_VERSION}}/cytoscape-navigator.js" \
|
|
-o assets/vendor/cytoscape-navigator.js
|
|
@echo "vendored cytoscape-navigator@{{CYTOSCAPE_NAVIGATOR_VERSION}}"
|
|
|
|
# htmx — HTML-first hypermedia library (goes to public/vendor — served via /public/)
|
|
[doc("Vendor htmx")]
|
|
vendor-htmx:
|
|
mkdir -p crates/ontoref-daemon/public/vendor
|
|
curl -fsSL \
|
|
"https://cdn.jsdelivr.net/npm/htmx.org@{{HTMX_VERSION}}/dist/htmx.min.js" \
|
|
-o crates/ontoref-daemon/public/vendor/htmx.min.js
|
|
@echo "vendored htmx@{{HTMX_VERSION}}"
|