diff --git a/crates/apps/gioser-web/pkg/gioser_web.d.ts b/crates/apps/gioser-web/pkg/gioser_web.d.ts index 3aa20cf..35606f2 100644 --- a/crates/apps/gioser-web/pkg/gioser_web.d.ts +++ b/crates/apps/gioser-web/pkg/gioser_web.d.ts @@ -8,15 +8,15 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl export interface InitOutput { readonly memory: WebAssembly.Memory; readonly boot: () => void; - readonly __wasm_bindgen_func_elem_233: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_1459: (a: number, b: number, c: number, d: number) => void; readonly __wasm_bindgen_func_elem_232: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_232_3: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_514: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_634: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_514_6: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_306: (a: number, b: number, c: number) => void; - readonly __wasm_bindgen_func_elem_307: (a: number, b: number) => void; + readonly __wasm_bindgen_func_elem_1456: (a: number, b: number, c: number, d: number) => void; + readonly __wasm_bindgen_func_elem_231: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_231_3: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_512: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_632: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_512_6: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_304: (a: number, b: number, c: number) => void; + readonly __wasm_bindgen_func_elem_305: (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; diff --git a/crates/apps/gioser-web/pkg/gioser_web.js b/crates/apps/gioser-web/pkg/gioser_web.js index c18ffa2..ad15d80 100644 --- a/crates/apps/gioser-web/pkg/gioser_web.js +++ b/crates/apps/gioser-web/pkg/gioser_web.js @@ -98,6 +98,9 @@ function __wbg_get_imports() { __wbg_clear_252bb7b11d5bea06: function(arg0, arg1) { getObject(arg0).clear(arg1 >>> 0); }, + __wbg_click_7541991684272efc: function(arg0) { + getObject(arg0).click(); + }, __wbg_clientHeight_02b92bd8f52a1a32: function(arg0) { const ret = getObject(arg0).clientHeight; return ret; @@ -152,10 +155,6 @@ 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); @@ -415,10 +414,6 @@ function __wbg_get_imports() { const ret = new Object(); return addHeapObject(ret); }, - __wbg_new_972d5c0e1de33223: function() { return handleError(function (arg0, arg1) { - const ret = new MouseEvent(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); - }, arguments); }, __wbg_ok_556a55299dd238ba: function(arg0) { const ret = getObject(arg0).ok; return ret; @@ -596,48 +591,48 @@ 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: 196, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1459); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 195, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1456); 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_233); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_232); 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_232); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_231); 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_232_3); + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_231_3); return addHeapObject(ret); }, __wbindgen_cast_0000000000000005: function(arg0, arg1) { - // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 144, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_514); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 143, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_512); return addHeapObject(ret); }, __wbindgen_cast_0000000000000006: function(arg0, arg1) { - // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 190, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_634); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 189, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_632); return addHeapObject(ret); }, __wbindgen_cast_0000000000000007: function(arg0, arg1) { - // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 144, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_514_6); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 143, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_512_6); return addHeapObject(ret); }, __wbindgen_cast_0000000000000008: function(arg0, arg1) { - // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 74, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_306); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 73, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_304); return addHeapObject(ret); }, __wbindgen_cast_0000000000000009: function(arg0, arg1) { - // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 76, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. - const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_307); + // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 75, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. + const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_305); return addHeapObject(ret); }, __wbindgen_cast_000000000000000a: function(arg0, arg1) { @@ -664,38 +659,38 @@ function __wbg_get_imports() { }; } -function __wasm_bindgen_func_elem_307(arg0, arg1) { - wasm.__wasm_bindgen_func_elem_307(arg0, arg1); +function __wasm_bindgen_func_elem_305(arg0, arg1) { + wasm.__wasm_bindgen_func_elem_305(arg0, arg1); } -function __wasm_bindgen_func_elem_232(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_232(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_231(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_231(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_232_3(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_232_3(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_231_3(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_231_3(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_514(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_514(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_512(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_512(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_634(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_634(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_632(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_632(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_514_6(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_514_6(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_512_6(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_512_6(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_306(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_306(arg0, arg1, addHeapObject(arg2)); +function __wasm_bindgen_func_elem_304(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_304(arg0, arg1, addHeapObject(arg2)); } -function __wasm_bindgen_func_elem_1459(arg0, arg1, arg2) { +function __wasm_bindgen_func_elem_1456(arg0, arg1, arg2) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.__wasm_bindgen_func_elem_1459(retptr, arg0, arg1, addHeapObject(arg2)); + wasm.__wasm_bindgen_func_elem_1456(retptr, arg0, arg1, addHeapObject(arg2)); var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); if (r1) { @@ -706,8 +701,8 @@ function __wasm_bindgen_func_elem_1459(arg0, arg1, arg2) { } } -function __wasm_bindgen_func_elem_233(arg0, arg1, arg2) { - wasm.__wasm_bindgen_func_elem_233(arg0, arg1, arg2); +function __wasm_bindgen_func_elem_232(arg0, arg1, arg2) { + wasm.__wasm_bindgen_func_elem_232(arg0, arg1, arg2); } function addHeapObject(obj) { diff --git a/crates/apps/gioser-web/pkg/gioser_web_bg.wasm b/crates/apps/gioser-web/pkg/gioser_web_bg.wasm index 5384615..06d2e0a 100644 Binary files a/crates/apps/gioser-web/pkg/gioser_web_bg.wasm and b/crates/apps/gioser-web/pkg/gioser_web_bg.wasm differ diff --git a/crates/apps/gioser-web/pkg/gioser_web_bg.wasm.d.ts b/crates/apps/gioser-web/pkg/gioser_web_bg.wasm.d.ts index d197d17..08e4821 100644 --- a/crates/apps/gioser-web/pkg/gioser_web_bg.wasm.d.ts +++ b/crates/apps/gioser-web/pkg/gioser_web_bg.wasm.d.ts @@ -2,15 +2,15 @@ /* eslint-disable */ export const memory: WebAssembly.Memory; export const boot: () => void; -export const __wasm_bindgen_func_elem_233: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_1459: (a: number, b: number, c: number, d: number) => void; export const __wasm_bindgen_func_elem_232: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_232_3: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_514: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_634: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_514_6: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_306: (a: number, b: number, c: number) => void; -export const __wasm_bindgen_func_elem_307: (a: number, b: number) => void; +export const __wasm_bindgen_func_elem_1456: (a: number, b: number, c: number, d: number) => void; +export const __wasm_bindgen_func_elem_231: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_231_3: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_512: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_632: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_512_6: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_304: (a: number, b: number, c: number) => void; +export const __wasm_bindgen_func_elem_305: (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; diff --git a/crates/apps/gioser-web/src/lib.rs b/crates/apps/gioser-web/src/lib.rs index 1c6031e..1f36ec4 100644 --- a/crates/apps/gioser-web/src/lib.rs +++ b/crates/apps/gioser-web/src/lib.rs @@ -341,8 +341,8 @@ impl AppState { wrapper.append_child(&label).ok(); content_clone.append_child(&wrapper).ok(); // Callback: recibe 'camino' del nodo clickeado y navega + // usando el método nativo .click() del elemento let cb: Box = Box::new(move |target| { - // Mapa camino → elemento HTML let el = match target.as_str() { "logos" | "aire" => "logos", "nomos" | "fuego" => "nomos", @@ -350,15 +350,16 @@ impl AppState { "uku" | "agua" => "uku", _ => "logos", }; - // Disparar evento click en el tip (el listener de - // install_tip_clicks lo captura y llama open_or_switch) if let Some(tip) = document_clone.query_selector( &format!(".tip[data-md][id='tip-{}']", el) ).ok().flatten() { - // Crear MouseEvent con coordenadas (necesario para - // que prevent_default y open_or_switch tengan contexto) - let ev = web_sys::MouseEvent::new("click").unwrap(); - let _ = tip.dispatch_event(&ev); + // HTMLElement.click() es el método nativo que dispara + // un evento de click real (trusted) con todas las + // coordenadas — el listener en install_tip_clicks lo detecta. + let tip_el: Option<&HtmlElement> = tip.dyn_ref(); + if let Some(html_el) = tip_el { + html_el.click(); + } } }); let mut graph = GraphWidget::new( diff --git a/crates/apps/gioser-web/styles.css b/crates/apps/gioser-web/styles.css index 7914b5b..6166d3a 100644 --- a/crates/apps/gioser-web/styles.css +++ b/crates/apps/gioser-web/styles.css @@ -268,7 +268,7 @@ body.deck-active-tierra .deck { --deck-glow: rgba(212, 152, 115, 0.24); } pointer-events: none; transition: opacity 0.3s ease; } -.deck--visible .page-controls { +body.deck-visible .page-controls { opacity: 1; pointer-events: auto; }