gioser-web: replace Rust SVG graph with Cytoscape.js
- Add cytoscape-graph.js: fetches /graph, renders with Cytoscape.js - Style: round-rect nodes, cose layout, edge width proportional to weight - Click: center node + fade rest (wineandcheesemap effect) - Double-click: trigger navigation callback - Hover: tooltip with preview text - Click background: restore all - Remove gioser-graph-web crate dependency (no longer needed) - Add CDN cytoscape@3.30.4 + defer script to index.html - gioser-graph custom element auto-initialized on mount
This commit is contained in:
Generated
+12
-405
@@ -1347,61 +1347,6 @@ dependencies = [
|
||||
"fs_extra",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.7.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"hyper",
|
||||
"hyper-util",
|
||||
"itoa",
|
||||
"matchit",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_path_to_error",
|
||||
"serde_urlencoded",
|
||||
"sync_wrapper",
|
||||
"tokio",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"mime",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"sync_wrapper",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.76"
|
||||
@@ -2251,15 +2196,6 @@ dependencies = [
|
||||
"unicode-security",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "celestial-eop-data"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0db7627f7cbdcaed155e66503e07025e10701a3566bc211a85e35b918bc40812"
|
||||
dependencies = [
|
||||
"zstd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.6.0"
|
||||
@@ -2989,196 +2925,6 @@ dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"brahman-sidecar",
|
||||
"cosmobiologia-canvas",
|
||||
"cosmobiologia-card",
|
||||
"cosmobiologia-engine",
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-modules",
|
||||
"cosmobiologia-panel",
|
||||
"cosmobiologia-store",
|
||||
"cosmobiologia-theme",
|
||||
"cosmobiologia-tree",
|
||||
"directories",
|
||||
"gpui",
|
||||
"nahual-core",
|
||||
"nahual-theme",
|
||||
"nahual-widget-container-core",
|
||||
"nahual-widget-splitter",
|
||||
"nahual-widget-theme-switcher",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-canvas"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-engine",
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-modules",
|
||||
"cosmobiologia-render",
|
||||
"cosmobiologia-theme",
|
||||
"gpui",
|
||||
"nahual-theme",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-card"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"brahman-card",
|
||||
"brahman-sidecar",
|
||||
"cosmobiologia-engine",
|
||||
"cosmobiologia-model",
|
||||
"directories",
|
||||
"postcard",
|
||||
"serde",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"ulid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-cli"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"cosmobiologia-card",
|
||||
"cosmobiologia-model",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-corpus"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ron",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-engine"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-corpus",
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-render",
|
||||
"eternal-astrology",
|
||||
"eternal-sky",
|
||||
"serde",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-model"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.18",
|
||||
"ulid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-modules"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-engine",
|
||||
"cosmobiologia-model",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-panel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-modules",
|
||||
"cosmobiologia-theme",
|
||||
"gpui",
|
||||
"nahual-theme",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-render"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-model",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-server"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"clap",
|
||||
"cosmobiologia-engine",
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-render",
|
||||
"cosmobiologia-store",
|
||||
"directories",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"tower-http",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-store"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-model",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.18",
|
||||
"ulid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-theme"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"gpui",
|
||||
"nahual-theme",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-tree"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-model",
|
||||
"cosmobiologia-store",
|
||||
"gpui",
|
||||
"nahual-theme",
|
||||
"nahual-widget-text-input",
|
||||
"nahual-widget-tree",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmobiologia-web"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmobiologia-render",
|
||||
"getrandom 0.3.4",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.2.17"
|
||||
@@ -4152,88 +3898,6 @@ dependencies = [
|
||||
"svg_fmt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-astrology"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"eternal-core",
|
||||
"eternal-ephemeris",
|
||||
"eternal-sky",
|
||||
"eternal-time",
|
||||
"eternal-validation",
|
||||
"libm",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-coords"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"celestial-eop-data",
|
||||
"eternal-core",
|
||||
"eternal-time",
|
||||
"libm",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-core"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"libm",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-ephemeris"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"eternal-coords",
|
||||
"eternal-core",
|
||||
"eternal-time",
|
||||
"libm",
|
||||
"memmap2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-sky"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"eternal-coords",
|
||||
"eternal-core",
|
||||
"eternal-ephemeris",
|
||||
"eternal-time",
|
||||
"eternal-validation",
|
||||
"libm",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-time"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"eternal-core",
|
||||
"libm",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eternal-validation"
|
||||
version = "0.1.1-alpha.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"eternal-coords",
|
||||
"eternal-core",
|
||||
"eternal-ephemeris",
|
||||
"eternal-time",
|
||||
"libm",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "euclid"
|
||||
version = "0.22.14"
|
||||
@@ -5081,6 +4745,18 @@ dependencies = [
|
||||
name = "gioser-geom"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "gioser-graph-web"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gioser-palette"
|
||||
version = "0.1.0"
|
||||
@@ -5841,24 +5517,12 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http-range-header"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
||||
|
||||
[[package]]
|
||||
name = "httpdate"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "2.3.0"
|
||||
@@ -5879,7 +5543,6 @@ dependencies = [
|
||||
"http",
|
||||
"http-body",
|
||||
"httparse",
|
||||
"httpdate",
|
||||
"itoa",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
@@ -7503,12 +7166,6 @@ dependencies = [
|
||||
"regex-automata",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
||||
|
||||
[[package]]
|
||||
name = "matilda"
|
||||
version = "0.1.0"
|
||||
@@ -12066,17 +11723,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_path_to_error"
|
||||
version = "0.1.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"serde",
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_repr"
|
||||
version = "0.1.20"
|
||||
@@ -13851,7 +13497,6 @@ dependencies = [
|
||||
"tokio",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -13862,23 +13507,13 @@ checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51"
|
||||
dependencies = [
|
||||
"bitflags 2.11.1",
|
||||
"bytes",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"http-range-header",
|
||||
"httpdate",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
"url",
|
||||
]
|
||||
|
||||
@@ -16564,34 +16199,6 @@ version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
||||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
|
||||
dependencies = [
|
||||
"zstd-safe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-safe"
|
||||
version = "7.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
|
||||
dependencies = [
|
||||
"zstd-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-sys"
|
||||
version = "2.0.16+zstd.1.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zune-core"
|
||||
version = "0.5.1"
|
||||
|
||||
+509
@@ -0,0 +1,509 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
# ============================================================
|
||||
# protocol/ — Contratos canónicos + routing entre módulos
|
||||
# ============================================================
|
||||
"crates/protocol/brahman-card",
|
||||
"crates/protocol/brahman-card-wit",
|
||||
"crates/protocol/brahman-cards",
|
||||
"crates/protocol/brahman-handshake",
|
||||
"crates/protocol/brahman-broker",
|
||||
"crates/protocol/brahman-admin",
|
||||
"crates/protocol/brahman-sidecar",
|
||||
"crates/protocol/brahman-net",
|
||||
"crates/protocol/brahman-dht",
|
||||
"crates/protocol/brahman-card-discovery",
|
||||
"crates/protocol/brahman-ssh-multiplex",
|
||||
"crates/protocol/brahman-auth",
|
||||
"crates/protocol/arje-card",
|
||||
|
||||
# ============================================================
|
||||
# init/ — PID 1 + encarnación Linux (arje)
|
||||
# ============================================================
|
||||
"crates/init/arje-zero",
|
||||
"crates/init/arje-kernel",
|
||||
"crates/init/arje-soma",
|
||||
"crates/init/arje-snapshot",
|
||||
"crates/init/arje-incarnate",
|
||||
"crates/init/arje-absorb",
|
||||
|
||||
# ============================================================
|
||||
# runtime/ — Infraestructura de ejecución (bus + cas + wasm + brain)
|
||||
# ============================================================
|
||||
"crates/runtime/arje-bus",
|
||||
"crates/runtime/arje-cas",
|
||||
"crates/runtime/arje-wasm",
|
||||
"crates/runtime/arje-brain-rules",
|
||||
"crates/runtime/arje-brain-cognitive",
|
||||
"crates/runtime/arje-brain-audit",
|
||||
"crates/runtime/arje-brain",
|
||||
"crates/runtime/arje-echo",
|
||||
"crates/runtime/sandokan-lifecycle",
|
||||
"crates/runtime/sandokan-core",
|
||||
"crates/runtime/sandokan-local",
|
||||
"crates/runtime/sandokan-daemon",
|
||||
"crates/runtime/sandokan-remote",
|
||||
"crates/runtime/sandokan",
|
||||
|
||||
# ============================================================
|
||||
# compat/ — Shims D-Bus para correr software systemd-aware
|
||||
# ============================================================
|
||||
"crates/compat/arje-compat-common",
|
||||
"crates/compat/arje-policy-provider",
|
||||
"crates/compat/arje-logind-compat",
|
||||
"crates/compat/arje-hostnamed-compat",
|
||||
"crates/compat/arje-timedated-compat",
|
||||
"crates/compat/arje-localed-compat",
|
||||
"crates/compat/arje-journald-compat",
|
||||
"crates/compat/arje-resolved-compat",
|
||||
"crates/compat/arje-polkit-compat",
|
||||
"crates/compat/arje-machined-compat",
|
||||
"crates/compat/arje-tmpfiles-compat",
|
||||
"crates/compat/arje-systemd1-compat",
|
||||
"crates/compat/arje-notify-compat",
|
||||
"crates/compat/arje-binfmt-compat",
|
||||
"crates/compat/arje-timer-compat",
|
||||
|
||||
# ============================================================
|
||||
# modules/semantic_dht/ (minga) — DHT semántico de código
|
||||
# ============================================================
|
||||
"crates/modules/semantic_dht/minga-core",
|
||||
"crates/modules/semantic_dht/minga-store",
|
||||
"crates/modules/semantic_dht/minga-p2p",
|
||||
"crates/modules/semantic_dht/minga-vfs",
|
||||
"crates/modules/semantic_dht/minga-cli",
|
||||
|
||||
# ============================================================
|
||||
# modules/nahual/ — Motor GPUI: libs + widgets (era yahweh)
|
||||
# ============================================================
|
||||
"crates/modules/nahual/libs/core",
|
||||
"crates/modules/nahual/libs/theme",
|
||||
"crates/modules/nahual/libs/launcher",
|
||||
"crates/modules/nahual/libs/bus",
|
||||
"crates/modules/nahual/libs/meta-schema",
|
||||
"crates/modules/nahual/libs/meta-runtime",
|
||||
"crates/modules/nahual/libs/providers/fs",
|
||||
"crates/modules/nahual/libs/providers/sqlite",
|
||||
"crates/modules/nahual/widgets/tree",
|
||||
"crates/modules/nahual/widgets/container_core",
|
||||
"crates/modules/nahual/widgets/splitter",
|
||||
"crates/modules/nahual/widgets/tabs",
|
||||
"crates/modules/nahual/widgets/tiled",
|
||||
"crates/modules/nahual/widgets/text_input",
|
||||
"crates/modules/nahual/widgets/meta-form",
|
||||
"crates/modules/nahual/widgets/banner",
|
||||
"crates/modules/nahual/widgets/card",
|
||||
"crates/modules/nahual/widgets/stat-card",
|
||||
"crates/modules/nahual/widgets/app-header",
|
||||
"crates/modules/nahual/widgets/theme-switcher",
|
||||
|
||||
# ============================================================
|
||||
# modules/pineal/ — Data-viz agnóstica con backends (era lapaloma)
|
||||
# ============================================================
|
||||
"crates/modules/pineal/core",
|
||||
"crates/modules/pineal/render",
|
||||
"crates/modules/pineal/cartesian",
|
||||
"crates/modules/pineal/stream",
|
||||
"crates/modules/pineal/mesh",
|
||||
"crates/modules/pineal/financial",
|
||||
"crates/modules/pineal/polar",
|
||||
"crates/modules/pineal/heatmap",
|
||||
"crates/modules/pineal/treemap",
|
||||
"crates/modules/pineal/flow",
|
||||
"crates/modules/pineal/phosphor",
|
||||
"crates/modules/pineal/export",
|
||||
"crates/modules/pineal/umbrella",
|
||||
|
||||
# ============================================================
|
||||
# modules/verbo/ — Provider de embeddings model-agnostic
|
||||
# ============================================================
|
||||
"crates/modules/verbo/verbo-core",
|
||||
"crates/modules/verbo/verbo-mock",
|
||||
"crates/modules/verbo/verbo-daemon",
|
||||
|
||||
# ============================================================
|
||||
# modules/agorapura/ — Identidad humana federada
|
||||
# ============================================================
|
||||
"crates/modules/agorapura/agorapura-core",
|
||||
"crates/modules/agorapura/agorapura-graph",
|
||||
|
||||
# ============================================================
|
||||
# modules/badu/ — Toma de notas con gravedad semántica
|
||||
# ============================================================
|
||||
"crates/modules/badu/badu-core",
|
||||
"crates/modules/badu/badu-gravity",
|
||||
|
||||
# ============================================================
|
||||
# modules/takiy/ — Composición musical asistida
|
||||
# ============================================================
|
||||
"crates/modules/takiy/takiy-core",
|
||||
|
||||
# ============================================================
|
||||
# modules/matilda/ — Administración de servidores
|
||||
# ============================================================
|
||||
"crates/modules/matilda/matilda-core",
|
||||
"crates/modules/matilda/matilda-config",
|
||||
"crates/modules/matilda/matilda-plan",
|
||||
"crates/modules/matilda/matilda-apply",
|
||||
"crates/modules/matilda/matilda-ghost",
|
||||
"crates/modules/matilda/matilda-linker",
|
||||
"crates/modules/matilda/matilda-discover",
|
||||
|
||||
# ============================================================
|
||||
# modules/yachay/ — Notebooks computacionales reproducibles
|
||||
# ============================================================
|
||||
"crates/modules/yachay/yachay-core",
|
||||
|
||||
# ============================================================
|
||||
# modules/charka/ — Transpilador COBOL → Rust
|
||||
# ============================================================
|
||||
"crates/modules/charka/charka-bcd",
|
||||
"crates/modules/charka/charka-lexer",
|
||||
"crates/modules/charka/charka-parser",
|
||||
"crates/modules/charka/charka-ir",
|
||||
"crates/modules/charka/charka-runtime",
|
||||
"crates/modules/charka/charka-codegen",
|
||||
"crates/modules/charka/charka-shadow",
|
||||
|
||||
# ============================================================
|
||||
# modules/mirada/ — Compositor Wayland
|
||||
# ============================================================
|
||||
"crates/modules/mirada/mirada-layout",
|
||||
"crates/modules/mirada/mirada-protocol",
|
||||
"crates/modules/mirada/mirada-brain",
|
||||
"crates/modules/mirada/mirada-link",
|
||||
"crates/modules/mirada/mirada-body",
|
||||
|
||||
# ============================================================
|
||||
# modules/nakui/ — ERP matemático (categórico)
|
||||
# ============================================================
|
||||
"crates/modules/nakui/core",
|
||||
|
||||
# ============================================================
|
||||
# modules/chasqui/ — Explorador semántico de nómadas (ex-nouser, ex-akasha)
|
||||
# ============================================================
|
||||
"crates/modules/chasqui/card",
|
||||
"crates/modules/chasqui/core",
|
||||
"crates/modules/chasqui/nous",
|
||||
"crates/modules/chasqui/nous-mock",
|
||||
"crates/modules/chasqui/nous-real",
|
||||
|
||||
# ============================================================
|
||||
# modules/shuma/ — Runtime de espacios aislados (era shipote)
|
||||
# ============================================================
|
||||
"crates/modules/shuma/shuma-card",
|
||||
"crates/modules/shuma/shuma-protocol",
|
||||
"crates/modules/shuma/shuma-discern",
|
||||
"crates/modules/shuma/shuma-core",
|
||||
"crates/modules/shuma/shuma-intent",
|
||||
"crates/modules/shuma/shuma-line",
|
||||
"crates/modules/shuma/shuma-sysmon",
|
||||
"crates/modules/shuma/shuma-session",
|
||||
"crates/modules/shuma/shuma-exec",
|
||||
"crates/modules/shuma/shuma-infer",
|
||||
"crates/modules/shuma/shuma-shell-render",
|
||||
|
||||
# ============================================================
|
||||
# modules/dominium/ — Simulador psicológico de campo medio
|
||||
# ============================================================
|
||||
"crates/modules/dominium/dominium-core",
|
||||
"crates/modules/dominium/dominium-physics",
|
||||
"crates/modules/dominium/dominium-iso",
|
||||
"crates/modules/dominium/dominium-render-plan",
|
||||
"crates/modules/dominium/dominium-canvas-gpui",
|
||||
|
||||
# ============================================================
|
||||
# modules/gioser/ — Landing WASM (chacana + 4 elementos)
|
||||
# ============================================================
|
||||
"crates/modules/gioser/gioser-geom",
|
||||
"crates/modules/gioser/gioser-physics",
|
||||
"crates/modules/gioser/gioser-palette",
|
||||
"crates/modules/gioser/gioser-shaders",
|
||||
"crates/modules/gioser/gioser-canvas-web",
|
||||
"crates/modules/gioser/gioser-graph-web",
|
||||
|
||||
# ==========================================================
|
||||
# modules/fana/ — Writer DAG editor (absorbe pluma)
|
||||
# ============================================================
|
||||
"crates/modules/fana/fana-core",
|
||||
"crates/modules/fana/fana-graph",
|
||||
"crates/modules/fana/fana-render-plan",
|
||||
"crates/modules/fana/fana-editor-gpui",
|
||||
"crates/modules/fana/fana-store",
|
||||
"crates/modules/fana/fana-semantic",
|
||||
"crates/modules/fana/fana-md",
|
||||
"crates/modules/fana/fana-md-reader-web",
|
||||
|
||||
# ============================================================
|
||||
# modules/revista/ — Deck horizontal swipe (Flutter PageView)
|
||||
# ============================================================
|
||||
"crates/modules/revista/revista-core",
|
||||
"crates/modules/revista/revista-web",
|
||||
|
||||
# ============================================================
|
||||
# modules/barra/ — Taskbar agnóstica estilo Windows
|
||||
# ============================================================
|
||||
"crates/modules/barra/barra-core",
|
||||
"crates/modules/barra/barra-web",
|
||||
|
||||
# ============================================================
|
||||
# modules/cosmobiologia/ — Estudio de astrología profesional
|
||||
# ============================================================
|
||||
"crates/modules/cosmobiologia/cosmobiologia-card",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-model",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-store",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-render",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-corpus",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-engine",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-modules",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-theme",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-canvas",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-tree",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-panel",
|
||||
"crates/modules/cosmobiologia/cosmobiologia-web",
|
||||
|
||||
# ============================================================
|
||||
# apps/ — Binarios finales que consumen el protocolo
|
||||
# ============================================================
|
||||
"crates/apps/brahman-broker-explorer",
|
||||
"crates/apps/brahman-demo",
|
||||
"crates/apps/sandokan",
|
||||
"crates/apps/nahual-shell",
|
||||
"crates/apps/nahual-file-explorer",
|
||||
"crates/apps/nahual-database-explorer",
|
||||
"crates/apps/nahual-text-viewer",
|
||||
"crates/apps/nahual-image-viewer",
|
||||
"crates/apps/chasqui-explorer",
|
||||
"crates/apps/nakui-explorer",
|
||||
"crates/apps/nakui-ui",
|
||||
"crates/apps/minga-explorer",
|
||||
"crates/apps/shuma-daemon",
|
||||
"crates/apps/shuma-cli",
|
||||
"crates/apps/shuma-gateway",
|
||||
"crates/apps/shuma-shell",
|
||||
"crates/apps/gioser-web",
|
||||
"crates/apps/pineal-demo",
|
||||
"crates/apps/pineal-stream-demo",
|
||||
"crates/apps/pineal-phosphor-demo",
|
||||
"crates/apps/pineal-financial-demo",
|
||||
"crates/apps/cosmobiologia",
|
||||
"crates/apps/cosmobiologia-cli",
|
||||
"crates/apps/cosmobiologia-server",
|
||||
"crates/apps/dominium",
|
||||
"crates/apps/fana",
|
||||
"crates/apps/agorapura",
|
||||
"crates/apps/badu",
|
||||
"crates/apps/matilda",
|
||||
"crates/apps/yachay",
|
||||
"crates/apps/mirada",
|
||||
"crates/apps/mirada-compositor",
|
||||
"crates/apps/mirada-ctl",
|
||||
"crates/apps/mirada-launcher",
|
||||
"crates/apps/mirada-portal",
|
||||
"crates/apps/mirada-greeter",
|
||||
"crates/apps/charka",
|
||||
]
|
||||
|
||||
# renaser — el SO bare-metal SASOS. Vive en el mismo repo pero es su
|
||||
# PROPIO workspace de Cargo: usa toolchain nightly, target
|
||||
# `x86_64-unknown-none` y `panic = "abort"`, incompatibles con los
|
||||
# perfiles globales de este workspace. Cargo lo trata como ajeno; los
|
||||
# crates compartidos se referencian por `path` cruzando la frontera.
|
||||
exclude = ["renaser"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.80"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["Brahman Contributors"]
|
||||
publish = false
|
||||
repository = "https://example.invalid/brahman"
|
||||
|
||||
[workspace.dependencies]
|
||||
# === Serialización ===
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde-big-array = "0.5"
|
||||
postcard = { version = "1", features = ["use-std"] }
|
||||
toml = "0.8"
|
||||
ron = "0.8"
|
||||
bincode = "1"
|
||||
base64 = "0.22"
|
||||
|
||||
# === Errores ===
|
||||
thiserror = "2" # bump uniforme; arje (era 1) puede requerir ajustes menores
|
||||
anyhow = "1"
|
||||
|
||||
# === Async ===
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-util = { version = "0.7", features = ["compat"] }
|
||||
async-trait = "0.1"
|
||||
futures = "0.3"
|
||||
|
||||
# === Observabilidad ===
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
|
||||
|
||||
# === Linux primitives (arje) ===
|
||||
nix = { version = "0.29", features = ["signal", "process", "sched", "mount", "fs", "socket", "net", "user"] }
|
||||
libc = "0.2"
|
||||
|
||||
# === IDs / Hash / Crypto ===
|
||||
ulid = { version = "1", features = ["serde"] }
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
sha2 = "0.10"
|
||||
blake3 = "1.5"
|
||||
ed25519-dalek = "2"
|
||||
aes-gcm = "0.10"
|
||||
argon2 = "0.5"
|
||||
rand = "0.8"
|
||||
|
||||
# === WASM (arje) ===
|
||||
# wasmi 1.0: unifica la versión con renaser (su kernel ya corre 1.0), para
|
||||
# que el ABI WASM del host sea idéntico en Linux y en bare-metal.
|
||||
wasmi = "1.0"
|
||||
wat = "1"
|
||||
|
||||
# === Storage / DB ===
|
||||
sled = "0.34"
|
||||
rusqlite = { version = "0.31", features = ["bundled", "blob"] }
|
||||
|
||||
# === P2P (minga) ===
|
||||
libp2p = { version = "0.56", features = ["tokio", "tcp", "noise", "yamux", "macros", "kad", "identify"] }
|
||||
libp2p-stream = "=0.4.0-alpha"
|
||||
libp2p-allow-block-list = "0.6"
|
||||
|
||||
# === SSH (brahman-ssh-multiplex, sandokan RemoteEngine, matilda) ===
|
||||
russh = "0.54"
|
||||
|
||||
# === Math determinista cross-platform (dominium) ===
|
||||
libm = "0.2"
|
||||
|
||||
# === Code parsing (minga) ===
|
||||
tree-sitter = "0.24"
|
||||
tree-sitter-rust = "0.23"
|
||||
tree-sitter-python = "0.23"
|
||||
tree-sitter-typescript = "0.23"
|
||||
tree-sitter-javascript = "0.23"
|
||||
tree-sitter-go = "0.23"
|
||||
|
||||
# === FS notify ===
|
||||
notify = "6.1"
|
||||
|
||||
# === FUSE (minga-vfs) ===
|
||||
# default-features = false: prescinde de pkg-config/libfuse-dev en build.
|
||||
# El montaje pasa a ser Rust puro (vía el helper `fusermount3` en runtime).
|
||||
fuser = { version = "0.15", default-features = false }
|
||||
|
||||
# === CLI / auth (minga) ===
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
rpassword = "7"
|
||||
|
||||
# === PAM (brahman-auth) ===
|
||||
pam = "0.8"
|
||||
|
||||
# === D-Bus (arje compat) ===
|
||||
zbus = { version = "4", default-features = false, features = ["tokio"] }
|
||||
|
||||
# === Tests ===
|
||||
tempfile = "3"
|
||||
|
||||
# === GPUI (nahual) ===
|
||||
gpui = "0.2"
|
||||
|
||||
# === Filesystem helpers ===
|
||||
directories = "5"
|
||||
|
||||
# === WASM web (gioser) ===
|
||||
wasm-bindgen = "0.2"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
js-sys = "0.3"
|
||||
web-sys = "0.3"
|
||||
glam = "0.30"
|
||||
|
||||
# === Markdown (pluma) ===
|
||||
pulldown-cmark = { version = "0.12", default-features = false, features = ["html"] }
|
||||
|
||||
# ============================================================
|
||||
# Intra-workspace deps de nahual (referenciadas por workspace = true)
|
||||
# ============================================================
|
||||
nahual-core = { path = "crates/modules/nahual/libs/core" }
|
||||
nahual-theme = { path = "crates/modules/nahual/libs/theme" }
|
||||
nahual-bus = { path = "crates/modules/nahual/libs/bus" }
|
||||
nahual-provider-fs = { path = "crates/modules/nahual/libs/providers/fs" }
|
||||
nahual-provider-sqlite = { path = "crates/modules/nahual/libs/providers/sqlite" }
|
||||
nahual-widget-tree = { path = "crates/modules/nahual/widgets/tree" }
|
||||
nahual-widget-container-core = { path = "crates/modules/nahual/widgets/container_core" }
|
||||
nahual-widget-splitter = { path = "crates/modules/nahual/widgets/splitter" }
|
||||
nahual-widget-tabs = { path = "crates/modules/nahual/widgets/tabs" }
|
||||
nahual-widget-tiled = { path = "crates/modules/nahual/widgets/tiled" }
|
||||
nahual-widget-text-input = { path = "crates/modules/nahual/widgets/text_input" }
|
||||
nahual-file-explorer = { path = "crates/apps/nahual-file-explorer" }
|
||||
nahual-database-explorer = { path = "crates/apps/nahual-database-explorer" }
|
||||
nahual-text-viewer = { path = "crates/apps/nahual-text-viewer" }
|
||||
nahual-image-viewer = { path = "crates/apps/nahual-image-viewer" }
|
||||
|
||||
# ============================================================
|
||||
# Intra-workspace deps de pineal (módulo de gráficos)
|
||||
# ============================================================
|
||||
pineal-core = { path = "crates/modules/pineal/core" }
|
||||
pineal-render = { path = "crates/modules/pineal/render" }
|
||||
pineal-cartesian = { path = "crates/modules/pineal/cartesian" }
|
||||
pineal-stream = { path = "crates/modules/pineal/stream" }
|
||||
pineal-mesh = { path = "crates/modules/pineal/mesh" }
|
||||
pineal-financial = { path = "crates/modules/pineal/financial" }
|
||||
pineal-polar = { path = "crates/modules/pineal/polar" }
|
||||
pineal-heatmap = { path = "crates/modules/pineal/heatmap" }
|
||||
pineal-treemap = { path = "crates/modules/pineal/treemap" }
|
||||
pineal-flow = { path = "crates/modules/pineal/flow" }
|
||||
pineal-phosphor = { path = "crates/modules/pineal/phosphor" }
|
||||
pineal-export = { path = "crates/modules/pineal/export" }
|
||||
pineal = { path = "crates/modules/pineal/umbrella" }
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
strip = "symbols"
|
||||
panic = "abort"
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 0
|
||||
# `line-tables-only` mantiene stack traces con archivo:línea correctos
|
||||
# pero descarta el resto de symbols. Reduce target/ ~40% sin sacrificar
|
||||
# debugging real para nuestro flujo (no usamos gdb sobre estos crates).
|
||||
debug = "line-tables-only"
|
||||
split-debuginfo = "unpacked"
|
||||
incremental = true
|
||||
# Más codegen-units = más paralelismo + builds incrementales más chicas
|
||||
# (cada cambio re-compila menos). Default es 256 en dev pero lo
|
||||
# anclamos para evitar regresiones.
|
||||
codegen-units = 256
|
||||
|
||||
# Override puntual para deps grandes que NO debuggeamos: gpui, ort,
|
||||
# fastembed, tokenizers, image. Subir opt-level acá hace que sus libs
|
||||
# pesen menos en target/ (símbolos descartados durante la build).
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 0
|
||||
debug = "line-tables-only"
|
||||
|
||||
[profile.dev.package.gpui]
|
||||
opt-level = 1
|
||||
debug = false
|
||||
|
||||
[profile.dev.package.ort]
|
||||
opt-level = 1
|
||||
debug = false
|
||||
|
||||
[profile.dev.package.fastembed]
|
||||
opt-level = 1
|
||||
debug = false
|
||||
|
||||
[profile.dev.package.tokenizers]
|
||||
opt-level = 1
|
||||
debug = false
|
||||
|
||||
[profile.dev.package.image]
|
||||
opt-level = 1
|
||||
debug = false
|
||||
@@ -14,7 +14,6 @@ gioser-canvas-web = { path = "../../modules/gioser/gioser-canvas-web" }
|
||||
fana-md-reader-web = { path = "../../modules/fana/fana-md-reader-web" }
|
||||
revista-web = { path = "../../modules/revista/revista-web" }
|
||||
barra-web = { path = "../../modules/barra/barra-web" }
|
||||
gioser-graph-web = { path = "../../modules/gioser/gioser-graph-web" }
|
||||
wasm-bindgen.workspace = true
|
||||
wasm-bindgen-futures.workspace = true
|
||||
js-sys.workspace = true
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
/**
|
||||
* gioser-graph.js — Grafo semántico con Cytoscape.js
|
||||
*
|
||||
* Se monta automáticamente cuando hay un contenedor <gioser-graph>
|
||||
* en el DOM con atributo data-api-url.
|
||||
*
|
||||
* Efecto "wineandcheesemap": clic en nodo → centra + desvanece resto.
|
||||
* Doble clic → callback de navegación.
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
const COLORS = {
|
||||
logos: '#d0dbff',
|
||||
aire: '#d0dbff',
|
||||
nomos: '#f59056',
|
||||
fuego: '#f59056',
|
||||
kay: '#d49873',
|
||||
tierra: '#d49873',
|
||||
uku: '#6cd0f3',
|
||||
agua: '#6cd0f3',
|
||||
};
|
||||
|
||||
function caminoColor(c) { return COLORS[c] || '#888'; }
|
||||
|
||||
function initGraph(container) {
|
||||
const apiUrl = container.getAttribute('data-api-url') || 'https://api.gioser.net';
|
||||
const onNavigate = window.__gioserGraphNavigate || null;
|
||||
|
||||
fetch(`${apiUrl}/graph?limit=500`)
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (!data.nodes || data.nodes.length === 0) return;
|
||||
|
||||
// Construir elementos Cytoscape
|
||||
const elements = [];
|
||||
|
||||
for (const n of data.nodes) {
|
||||
const d = n.data;
|
||||
if (!d.doc_id) continue;
|
||||
const color = caminoColor(d.camino);
|
||||
elements.push({
|
||||
data: {
|
||||
id: d.id,
|
||||
doc_id: d.doc_id,
|
||||
label: d.name.length > 22 ? d.name.slice(0, 20) + '…' : d.name,
|
||||
camino: d.camino.toUpperCase(),
|
||||
color,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const nodeIds = new Set(elements.map(e => e.data.id));
|
||||
|
||||
for (const e of data.edges) {
|
||||
const ed = e.data;
|
||||
if (!nodeIds.has(ed.source) || !nodeIds.has(ed.target)) continue;
|
||||
const weight = ed.weight || 0.7;
|
||||
elements.push({
|
||||
data: {
|
||||
id: ed.id,
|
||||
source: ed.source,
|
||||
target: ed.target,
|
||||
weight,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const cy = cytoscape({
|
||||
container,
|
||||
elements,
|
||||
style: [
|
||||
// Aristas: grosor según peso
|
||||
{
|
||||
selector: 'edge',
|
||||
style: {
|
||||
'width': 'mapData(weight, 0.5, 1.0, 0.5, 4)',
|
||||
'line-color': 'rgba(255,255,255,0.18)',
|
||||
'target-arrow-color': 'rgba(255,255,255,0.12)',
|
||||
'curve-style': 'haystack',
|
||||
'haystack-radius': 0,
|
||||
'opacity': 0.6,
|
||||
},
|
||||
},
|
||||
// Nodo: rectángulo redondeado
|
||||
{
|
||||
selector: 'node',
|
||||
style: {
|
||||
'shape': 'round-rectangle',
|
||||
'width': 130,
|
||||
'height': 32,
|
||||
'background-color': 'data(color)',
|
||||
'background-opacity': 0.20,
|
||||
'border-color': 'data(color)',
|
||||
'border-width': 1.5,
|
||||
'border-opacity': 0.7,
|
||||
'color': 'rgba(232,234,245,0.90)',
|
||||
'font-size': 11,
|
||||
'font-family': 'Inter, system-ui, sans-serif',
|
||||
'font-weight': 500,
|
||||
'text-valign': 'center',
|
||||
'text-halign': 'center',
|
||||
'label': 'data(label)',
|
||||
'min-zoomed-font-size': 8,
|
||||
'shadow-blur': 6,
|
||||
'shadow-color': 'rgba(0,0,0,0.4)',
|
||||
'shadow-offset-x': 0,
|
||||
'shadow-offset-y': 2,
|
||||
'shadow-opacity': 0.5,
|
||||
'transition-property': 'background-opacity, border-opacity, shadow-blur',
|
||||
'transition-duration': 200,
|
||||
},
|
||||
},
|
||||
// Sublabel del camino — lo ponemos como label secundario
|
||||
// Cytoscape no soporta dos labels nativamente; usamos un
|
||||
// badge de esquina con la data (camino) en el tooltip.
|
||||
],
|
||||
layout: {
|
||||
name: 'cose',
|
||||
animate: false,
|
||||
idealEdgeLength: 160,
|
||||
nodeRepulsion: 8000,
|
||||
gravity: 0.25,
|
||||
numIter: 1000,
|
||||
fit: true,
|
||||
padding: 30,
|
||||
},
|
||||
});
|
||||
|
||||
// Tooltip con preview al hover
|
||||
const tips = {};
|
||||
for (const n of data.nodes) {
|
||||
const d = n.data;
|
||||
if (d.doc_id) tips[d.id] = d;
|
||||
}
|
||||
|
||||
let tooltipEl = container.querySelector('.cy-tooltip');
|
||||
if (!tooltipEl) {
|
||||
tooltipEl = document.createElement('div');
|
||||
tooltipEl.className = 'cy-tooltip';
|
||||
tooltipEl.style.cssText =
|
||||
'position:absolute;z-index:10;pointer-events:none;' +
|
||||
'background:rgba(6,5,13,0.88);color:#e8eaf5;' +
|
||||
'padding:6px 10px;border-radius:8px;font-size:11px;' +
|
||||
'font-family:Inter,sans-serif;line-height:1.4;' +
|
||||
'border:1px solid rgba(255,255,255,0.10);' +
|
||||
'backdrop-filter:blur(8px);max-width:240px;' +
|
||||
'opacity:0;transition:opacity 180ms ease;';
|
||||
container.style.position = 'relative';
|
||||
container.appendChild(tooltipEl);
|
||||
}
|
||||
|
||||
cy.on('mouseover', 'node', (ev) => {
|
||||
const node = ev.target;
|
||||
node.style({ 'background-opacity': 0.45, 'border-opacity': 1, 'shadow-blur': 12 });
|
||||
const tipData = tips[node.id()];
|
||||
if (tipData && tipData.preview) {
|
||||
tooltipEl.textContent = tipData.preview.slice(0, 120);
|
||||
tooltipEl.style.opacity = '1';
|
||||
}
|
||||
});
|
||||
|
||||
cy.on('mouseout', 'node', (ev) => {
|
||||
const node = ev.target;
|
||||
node.style({ 'background-opacity': 0.20, 'border-opacity': 0.7, 'shadow-blur': 6 });
|
||||
tooltipEl.style.opacity = '0';
|
||||
});
|
||||
|
||||
cy.on('mousemove', 'node', (ev) => {
|
||||
const pos = ev.renderedPosition || { x: 0, y: 0 };
|
||||
tooltipEl.style.left = (pos.x + 14) + 'px';
|
||||
tooltipEl.style.top = (pos.y - 10) + 'px';
|
||||
});
|
||||
|
||||
// Click: centrar nodo + desvanecer resto (wineandcheesemap effect)
|
||||
cy.on('click', 'node', (ev) => {
|
||||
const node = ev.target;
|
||||
// Animar vecindario: opacidad plena en nodo + vecinos
|
||||
cy.nodes().not(node).not(node.neighborhood()).forEach(n => {
|
||||
n.style({ 'opacity': 0.15 });
|
||||
});
|
||||
cy.edges().forEach(e => {
|
||||
e.style({ 'opacity': 0.08 });
|
||||
});
|
||||
// Vecinos directos opacidad normal
|
||||
node.neighborhood().nodes().forEach(n => {
|
||||
n.style({ 'opacity': 1 });
|
||||
});
|
||||
node.style({ 'opacity': 1 });
|
||||
// Aristas del vecindario visibles
|
||||
node.connectedEdges().forEach(e => {
|
||||
e.style({ 'opacity': 0.7 });
|
||||
});
|
||||
// Centrar
|
||||
cy.animate({
|
||||
center: { eles: node },
|
||||
zoom: 2.2,
|
||||
duration: 400,
|
||||
});
|
||||
});
|
||||
|
||||
// Doble clic: navegar a la página
|
||||
cy.on('dblclick', 'node', (ev) => {
|
||||
const docId = ev.target.data('doc_id');
|
||||
if (onNavigate && docId) onNavigate(docId);
|
||||
});
|
||||
|
||||
// Clic en fondo: restaurar todo
|
||||
cy.on('click', (ev) => {
|
||||
if (ev.target === cy) {
|
||||
cy.nodes().forEach(n => n.style({ 'opacity': 1 }));
|
||||
cy.edges().forEach(e => e.style({ 'opacity': 0.6 }));
|
||||
cy.animate({ zoom: 1, pan: { x: 0, y: 0 }, duration: 300 });
|
||||
}
|
||||
});
|
||||
|
||||
// Resize al cambiar tamaño del contenedor
|
||||
const ro = new ResizeObserver(() => cy.resize().fit(30));
|
||||
ro.observe(container);
|
||||
|
||||
// Scroll del contenedor padre: pausar interacción si no visible
|
||||
container.__cy = cy;
|
||||
})
|
||||
.catch(err => {
|
||||
console.warn('gioser-graph: error fetching graph:', err);
|
||||
container.innerHTML =
|
||||
'<div style="padding:1rem;text-align:center;color:rgba(232,234,245,0.35);' +
|
||||
'font-size:0.8rem;font-family:Inter,sans-serif;">' +
|
||||
'· grafo no disponible ·</div>';
|
||||
});
|
||||
}
|
||||
|
||||
// Auto-inicializar todos los <gioser-graph> en la página
|
||||
function boot() {
|
||||
const els = document.querySelectorAll('gioser-graph');
|
||||
for (const el of els) {
|
||||
// Esperar a que Cytoscape esté cargado
|
||||
if (typeof cytoscape !== 'undefined') {
|
||||
initGraph(el);
|
||||
} else {
|
||||
// Si el CDN no ha cargado, esperar
|
||||
const check = setInterval(() => {
|
||||
if (typeof cytoscape !== 'undefined') {
|
||||
clearInterval(check);
|
||||
initGraph(el);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', boot);
|
||||
} else {
|
||||
boot();
|
||||
}
|
||||
})();
|
||||
@@ -99,6 +99,9 @@
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- Cytoscape.js para el grafo semántico -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/cytoscape@3.30.4/dist/cytoscape.min.js"></script>
|
||||
|
||||
<script type="module">
|
||||
import init from "./pkg/gioser_web.js";
|
||||
init().catch(err => {
|
||||
@@ -108,5 +111,8 @@
|
||||
String(err) + '</pre>');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Grafo semántico (Cytoscape) — se auto-inicializa en <gioser-graph> -->
|
||||
<script src="./cytoscape-graph.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+7
-8
@@ -8,14 +8,13 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
||||
export interface InitOutput {
|
||||
readonly memory: WebAssembly.Memory;
|
||||
readonly boot: () => void;
|
||||
readonly __wasm_bindgen_func_elem_218: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_1398: (a: number, b: number, c: number, d: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_217: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_217_3: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_494: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_593: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_289: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_288: (a: number, b: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_178: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_1209: (a: number, b: number, c: number, d: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_177: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_177_3: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_446: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_223: (a: number, b: number, c: number) => void;
|
||||
readonly __wasm_bindgen_func_elem_224: (a: number, b: number) => void;
|
||||
readonly __wbindgen_export: (a: number, b: number) => number;
|
||||
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
||||
readonly __wbindgen_export3: (a: number) => void;
|
||||
|
||||
@@ -125,10 +125,6 @@ function __wbg_get_imports() {
|
||||
const ret = getObject(arg0).createBuffer();
|
||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||
},
|
||||
__wbg_createElementNS_10d5e4db26ea11c7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
||||
const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
||||
return addHeapObject(ret);
|
||||
}, arguments); },
|
||||
__wbg_createElement_d10771800cfb6e7e: function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
|
||||
return addHeapObject(ret);
|
||||
@@ -152,6 +148,10 @@ function __wbg_get_imports() {
|
||||
__wbg_disable_df908054ffee7971: function(arg0, arg1) {
|
||||
getObject(arg0).disable(arg1 >>> 0);
|
||||
},
|
||||
__wbg_dispatchEvent_29c919cea8d37995: function() { return handleError(function (arg0, arg1) {
|
||||
const ret = getObject(arg0).dispatchEvent(getObject(arg1));
|
||||
return ret;
|
||||
}, arguments); },
|
||||
__wbg_document_3540635616a18455: function(arg0) {
|
||||
const ret = getObject(arg0).document;
|
||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||
@@ -297,56 +297,6 @@ function __wbg_get_imports() {
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_SvgElement_46537942d3e1376d: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = getObject(arg0) instanceof SVGElement;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_SvgLineElement_d8200164030c234d: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = getObject(arg0) instanceof SVGLineElement;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_SvgRectElement_f5a06e74af743100: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = getObject(arg0) instanceof SVGRectElement;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_SvgTextElement_06345cd3cc71c951: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = getObject(arg0) instanceof SVGTextElement;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_SvgsvgElement_767ee4029321b850: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
result = getObject(arg0) instanceof SVGSVGElement;
|
||||
} catch (_) {
|
||||
result = false;
|
||||
}
|
||||
const ret = result;
|
||||
return ret;
|
||||
},
|
||||
__wbg_instanceof_WebGl2RenderingContext_419098f7bf88e87e: function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
@@ -393,6 +343,10 @@ function __wbg_get_imports() {
|
||||
const ret = new Object();
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbg_new_de9891da0bd35168: function() { return handleError(function (arg0, arg1) {
|
||||
const ret = new Event(getStringFromWasm0(arg0, arg1));
|
||||
return addHeapObject(ret);
|
||||
}, arguments); },
|
||||
__wbg_ok_556a55299dd238ba: function(arg0) {
|
||||
const ret = getObject(arg0).ok;
|
||||
return ret;
|
||||
@@ -461,9 +415,6 @@ function __wbg_get_imports() {
|
||||
__wbg_set_passive_2233318ae781e44d: function(arg0, arg1) {
|
||||
getObject(arg0).passive = arg1 !== 0;
|
||||
},
|
||||
__wbg_set_textContent_9c5d65d703443b6d: function(arg0, arg1, arg2) {
|
||||
getObject(arg0).textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
|
||||
},
|
||||
__wbg_set_width_25112eb6bf1148df: function(arg0, arg1) {
|
||||
getObject(arg0).width = arg1 >>> 0;
|
||||
},
|
||||
@@ -497,10 +448,6 @@ function __wbg_get_imports() {
|
||||
const ret = getObject(arg0).style;
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbg_style_e34c1197b6088769: function(arg0) {
|
||||
const ret = getObject(arg0).style;
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbg_target_84e05e84ffc12989: function(arg0) {
|
||||
const ret = getObject(arg0).target;
|
||||
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
||||
@@ -560,51 +507,46 @@ function __wbg_get_imports() {
|
||||
return ret;
|
||||
},
|
||||
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 176, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1398);
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 130, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1209);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [F64], shim_idx: 2, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_218);
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_178);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_217);
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_177);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_217_3);
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_177_3);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 137, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_494);
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 124, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_446);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 170, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_593);
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 53, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_223);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 67, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_289);
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 55, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_224);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 69, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_288);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
|
||||
const ret = getArrayF32FromWasm0(arg0, arg1);
|
||||
return addHeapObject(ret);
|
||||
},
|
||||
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
||||
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
||||
// Cast intrinsic for `Ref(String) -> Externref`.
|
||||
const ret = getStringFromWasm0(arg0, arg1);
|
||||
return addHeapObject(ret);
|
||||
@@ -623,34 +565,30 @@ function __wbg_get_imports() {
|
||||
};
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_288(arg0, arg1) {
|
||||
wasm.__wasm_bindgen_func_elem_288(arg0, arg1);
|
||||
function __wasm_bindgen_func_elem_224(arg0, arg1) {
|
||||
wasm.__wasm_bindgen_func_elem_224(arg0, arg1);
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_217(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_217(arg0, arg1, addHeapObject(arg2));
|
||||
function __wasm_bindgen_func_elem_177(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_177(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_217_3(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_217_3(arg0, arg1, addHeapObject(arg2));
|
||||
function __wasm_bindgen_func_elem_177_3(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_177_3(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_494(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_494(arg0, arg1, addHeapObject(arg2));
|
||||
function __wasm_bindgen_func_elem_446(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_446(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_593(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_593(arg0, arg1, addHeapObject(arg2));
|
||||
function __wasm_bindgen_func_elem_223(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_223(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_289(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_289(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_1398(arg0, arg1, arg2) {
|
||||
function __wasm_bindgen_func_elem_1209(arg0, arg1, arg2) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
wasm.__wasm_bindgen_func_elem_1398(retptr, arg0, arg1, addHeapObject(arg2));
|
||||
wasm.__wasm_bindgen_func_elem_1209(retptr, arg0, arg1, addHeapObject(arg2));
|
||||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
||||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
||||
if (r1) {
|
||||
@@ -661,8 +599,8 @@ function __wasm_bindgen_func_elem_1398(arg0, arg1, arg2) {
|
||||
}
|
||||
}
|
||||
|
||||
function __wasm_bindgen_func_elem_218(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_218(arg0, arg1, arg2);
|
||||
function __wasm_bindgen_func_elem_178(arg0, arg1, arg2) {
|
||||
wasm.__wasm_bindgen_func_elem_178(arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
function addHeapObject(obj) {
|
||||
|
||||
Binary file not shown.
+7
-8
@@ -2,14 +2,13 @@
|
||||
/* eslint-disable */
|
||||
export const memory: WebAssembly.Memory;
|
||||
export const boot: () => void;
|
||||
export const __wasm_bindgen_func_elem_218: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_1398: (a: number, b: number, c: number, d: number) => void;
|
||||
export const __wasm_bindgen_func_elem_217: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_217_3: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_494: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_593: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_289: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_288: (a: number, b: number) => void;
|
||||
export const __wasm_bindgen_func_elem_178: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_1209: (a: number, b: number, c: number, d: number) => void;
|
||||
export const __wasm_bindgen_func_elem_177: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_177_3: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_446: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_223: (a: number, b: number, c: number) => void;
|
||||
export const __wasm_bindgen_func_elem_224: (a: number, b: number) => void;
|
||||
export const __wbindgen_export: (a: number, b: number) => number;
|
||||
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
||||
export const __wbindgen_export3: (a: number) => void;
|
||||
|
||||
@@ -21,7 +21,6 @@ use std::rc::Rc;
|
||||
|
||||
use barra_web::{Task, TaskList};
|
||||
use gioser_canvas_web::{tips, Renderer};
|
||||
use gioser_graph_web::GraphWidget;
|
||||
use fana_md_reader_web::Reader;
|
||||
use revista_web::Deck;
|
||||
use wasm_bindgen::prelude::*;
|
||||
@@ -282,45 +281,36 @@ impl AppState {
|
||||
if let Err(e) = reader.open_url(&url_owned, &element_owned).await {
|
||||
web_sys::console::warn_1(&e);
|
||||
}
|
||||
// Después de cargar el md, montar el grafo debajo
|
||||
// Montar contenedor del grafo (Cytoscape.js) debajo del md
|
||||
let graph_container_id = format!("graph-{}-container", element_owned);
|
||||
// Si ya existe, no lo duplicamos
|
||||
if document_clone.get_element_by_id(&graph_container_id).is_some() {
|
||||
return;
|
||||
}
|
||||
// Crear contenedor debajo del content
|
||||
let wrapper: HtmlElement = document_clone
|
||||
.create_element("div")
|
||||
.create_element("gioser-graph")
|
||||
.ok()
|
||||
.and_then(|e| e.dyn_into::<HtmlElement>().ok())
|
||||
.unwrap();
|
||||
.unwrap_or_else(|| {
|
||||
// fallback: div normal
|
||||
let d: HtmlElement = document_clone
|
||||
.create_element("div")
|
||||
.ok()
|
||||
.and_then(|e| e.dyn_into().ok())
|
||||
.unwrap();
|
||||
d
|
||||
});
|
||||
wrapper.set_id(&graph_container_id);
|
||||
wrapper.style().set_property("margin-top", "1rem").ok();
|
||||
wrapper.set_attribute("data-api-url", "https://api.gioser.net").ok();
|
||||
wrapper.style().set_property("margin-top", "1.5rem").ok();
|
||||
wrapper.style().set_property("padding-top", "1rem").ok();
|
||||
wrapper.style().set_property("border-top", "1px solid rgba(255,255,255,0.08)").ok();
|
||||
// Label
|
||||
let label: HtmlElement = document_clone
|
||||
.create_element("div")
|
||||
.ok()
|
||||
.and_then(|e| e.dyn_into::<HtmlElement>().ok())
|
||||
.unwrap();
|
||||
label.set_inner_html(
|
||||
"<span style=\"font-family: Inter, sans-serif; font-size: 0.75rem; \
|
||||
letter-spacing: 0.3em; text-transform: uppercase; color: rgba(232,234,245,0.45);\">
|
||||
· grafo semántico ·
|
||||
</span>"
|
||||
);
|
||||
wrapper.append_child(&label).ok();
|
||||
wrapper.style().set_property("border-top", "1px solid rgba(255,255,255,0.06)").ok();
|
||||
wrapper.style().set_property("min-height", "220px").ok();
|
||||
content_clone.append_child(&wrapper).ok();
|
||||
// Cargar el grafo
|
||||
let mut graph = GraphWidget::new(
|
||||
wrapper,
|
||||
"https://api.gioser.net",
|
||||
None, // callback simplificado por ahora
|
||||
);
|
||||
if let Err(e) = graph.load().await {
|
||||
web_sys::console::warn_1(&format!("grafo: error al cargar: {:?}", e).into());
|
||||
return;
|
||||
// Disparar el script de Cytoscape si ya está en la página
|
||||
if let Some(win) = web_sys::window() {
|
||||
let _ = win.dispatch_event(
|
||||
&web_sys::Event::new("gioser-graph-ready").unwrap()
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user