@thehammer/template-verification 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/hostBridge.d.ts +25 -0
- package/dist/style.css +1 -1
- package/dist/template-verification.js +562 -519
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outbound signal to the embedding consumer (gpt-manager's `TemplatePreview.vue`)
|
|
3
|
+
* telling it a nested pan/zoom surface — the Evidence tab's `DanxFileViewer` — is
|
|
4
|
+
* currently visible and wants exclusive ownership of Ctrl/Cmd+drag.
|
|
5
|
+
*
|
|
6
|
+
* Why this exists: the consumer's own preview canvas ALSO binds Ctrl/Cmd+drag to
|
|
7
|
+
* pan the whole rendered document, and it activates that gesture the instant it
|
|
8
|
+
* sees a relayed Ctrl/Cmd keydown from anywhere inside this iframe (the danxbot
|
|
9
|
+
* host-bridge relays raw keyboard events regardless of what's focused inside).
|
|
10
|
+
* Its pan overlay is a transparent `position: absolute; inset: 0` div stacked
|
|
11
|
+
* ABOVE the iframe in the PARENT's own DOM — once it renders, every subsequent
|
|
12
|
+
* mouse event over the iframe's whole bounding box (including this dialog's
|
|
13
|
+
* nested file viewer) is captured by that parent-level div instead of reaching
|
|
14
|
+
* anything inside the iframe. The nested viewer's own Ctrl+drag-to-pan-the-image
|
|
15
|
+
* gesture then never receives its mousedown at all. Posting this message lets
|
|
16
|
+
* the consumer gate its overlay off while a nested viewer wants the gesture,
|
|
17
|
+
* without either side needing to know the other's internal DOM structure.
|
|
18
|
+
*
|
|
19
|
+
* Message type is namespaced under the same `source: "danxbot-template"`
|
|
20
|
+
* envelope the danxbot host-bridge already uses for keyboard/wheel relays (see
|
|
21
|
+
* danxbot's `scaffold.ts` → `buildHostBridgeScript`), sent directly via
|
|
22
|
+
* `window.top.postMessage` — this call runs as ordinary Vue code already
|
|
23
|
+
* executing inside the iframe, so it needs no relay of its own.
|
|
24
|
+
*/
|
|
25
|
+
export declare function notifyNestedViewerActive(active: boolean): void;
|