@vizejs/fresco 0.716.0 → 0.718.0

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.
Files changed (50) hide show
  1. package/dist/{accessibility-OEhyYUxd.d.mts → accessibility-DwzT925M.d.mts} +46 -5
  2. package/dist/accessibility-DwzT925M.d.mts.map +1 -0
  3. package/dist/{app-CIX6NAW-.mjs → app-C_wFlWSV.mjs} +443 -123
  4. package/dist/app-C_wFlWSV.mjs.map +1 -0
  5. package/dist/app-_QmZ-PoH.d.mts +270 -0
  6. package/dist/app-_QmZ-PoH.d.mts.map +1 -0
  7. package/dist/ascii-font/index.d.mts +60 -0
  8. package/dist/ascii-font/index.d.mts.map +1 -0
  9. package/dist/ascii-font/index.mjs +68 -0
  10. package/dist/ascii-font/index.mjs.map +1 -0
  11. package/dist/components/index.d.mts +2 -2
  12. package/dist/components/index.mjs +2 -2
  13. package/dist/components-DzkL-yHj.mjs +6165 -0
  14. package/dist/components-DzkL-yHj.mjs.map +1 -0
  15. package/dist/composables/index.d.mts +3 -3
  16. package/dist/composables/index.mjs +4 -4
  17. package/dist/{composables-DbJGVNSG.mjs → composables-BJeirPSH.mjs} +116 -55
  18. package/dist/composables-BJeirPSH.mjs.map +1 -0
  19. package/dist/{index-CWRginDz.d.mts → index-B3zQ6E-5.d.mts} +1099 -337
  20. package/dist/index-B3zQ6E-5.d.mts.map +1 -0
  21. package/dist/{index-Dikou9bu.d.mts → index-Ddp2Txtm.d.mts} +52 -4
  22. package/dist/index-Ddp2Txtm.d.mts.map +1 -0
  23. package/dist/index.d.mts +98 -7
  24. package/dist/index.d.mts.map +1 -0
  25. package/dist/index.mjs +262 -5
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{protocol-D8xt3DG7.d.mts → protocol-DavoeNLn.d.mts} +14 -4
  28. package/dist/{protocol-D8xt3DG7.d.mts.map → protocol-DavoeNLn.d.mts.map} +1 -1
  29. package/dist/qr-code/index.d.mts +101 -0
  30. package/dist/qr-code/index.d.mts.map +1 -0
  31. package/dist/qr-code/index.mjs +88 -0
  32. package/dist/qr-code/index.mjs.map +1 -0
  33. package/dist/testing/index.d.mts +3 -3
  34. package/dist/testing/index.mjs +1 -1
  35. package/dist/{useApp-CVB2jNCO.d.mts → useApp-vIRJ5Th3.d.mts} +34 -8
  36. package/dist/useApp-vIRJ5Th3.d.mts.map +1 -0
  37. package/dist/{useVirtualViewport-pPZWmwUC.mjs → useBoxMetrics-lF5Myjc7.mjs} +66 -6
  38. package/dist/useBoxMetrics-lF5Myjc7.mjs.map +1 -0
  39. package/package.json +14 -6
  40. package/dist/accessibility-OEhyYUxd.d.mts.map +0 -1
  41. package/dist/app-CIX6NAW-.mjs.map +0 -1
  42. package/dist/app-CKsTWQuP.d.mts +0 -154
  43. package/dist/app-CKsTWQuP.d.mts.map +0 -1
  44. package/dist/components-D9SeB0Be.mjs +0 -3331
  45. package/dist/components-D9SeB0Be.mjs.map +0 -1
  46. package/dist/composables-DbJGVNSG.mjs.map +0 -1
  47. package/dist/index-CWRginDz.d.mts.map +0 -1
  48. package/dist/index-Dikou9bu.d.mts.map +0 -1
  49. package/dist/useApp-CVB2jNCO.d.mts.map +0 -1
  50. package/dist/useVirtualViewport-pPZWmwUC.mjs.map +0 -1
@@ -1,5 +1,6 @@
1
- import { S as FrescoRenderNodeKind } from "./protocol-D8xt3DG7.mjs";
2
- import { Ref, RendererElement, RendererNode } from "vue";
1
+ import { C as FrescoRenderNodeKind, m as FrescoInputEvent } from "./protocol-DavoeNLn.mjs";
2
+ import { InjectionKey, Ref, RendererElement, RendererNode } from "vue";
3
+ import { LayoutResultNapi } from "@vizejs/fresco-native";
3
4
 
4
5
  //#region src/renderer.d.ts
5
6
  /** Read-only view of a node owned by one Fresco renderer instance. */
@@ -26,6 +27,40 @@ interface FrescoDeclaredSize {
26
27
  }
27
28
  /** Host-tree update category passed to lifecycle observers. */
28
29
  type FrescoNodeUpdateKind = "children" | "props" | "text";
30
+ /** Position of a routed input event within its stable host-node path. */
31
+ type FrescoInputEventPhase = "capture" | "target" | "bubble";
32
+ /** Input event plus the stable host-node routing context. */
33
+ interface FrescoRoutedInputEvent<Event extends FrescoInputEvent = FrescoInputEvent> {
34
+ /** Normalized terminal input supplied by the caller. */
35
+ readonly input: Event;
36
+ /** Original live host node selected for this dispatch. */
37
+ readonly target: FrescoHostNode;
38
+ /** Node whose handlers are currently running. */
39
+ readonly currentTarget: FrescoHostNode;
40
+ /** Capture, target, or bubble portion of the route. */
41
+ readonly phase: FrescoInputEventPhase;
42
+ /** Whether a handler has prevented the associated default action. */
43
+ readonly defaultPrevented: boolean;
44
+ /** Whether traversal beyond the current node has been stopped. */
45
+ readonly propagationStopped: boolean;
46
+ /** Prevent the caller from performing the input event default action. */
47
+ preventDefault(): void;
48
+ /** Stop traversal after every handler on the current node has run. */
49
+ stopPropagation(): void;
50
+ }
51
+ /** Public host prop callback accepted by routed input dispatch. */
52
+ type FrescoInputEventHandler<Event extends FrescoInputEvent = FrescoInputEvent> = (event: FrescoRoutedInputEvent<Event>) => void;
53
+ /** Immutable receipt returned after one routed input dispatch. */
54
+ interface FrescoInputDispatchResult {
55
+ /** Stable target that owned the dispatch route. */
56
+ readonly target: FrescoHostNode;
57
+ /** Number of generic and event-specific callbacks invoked. */
58
+ readonly handled: number;
59
+ /** Whether any callback prevented the default action. */
60
+ readonly defaultPrevented: boolean;
61
+ /** Whether any callback stopped route traversal. */
62
+ readonly propagationStopped: boolean;
63
+ }
29
64
  /** Optional lifecycle observers for nodes owned by a Fresco renderer. */
30
65
  interface FrescoNodeLifecycleHooks {
31
66
  /** Observe allocation of a stable host node. @default No-op. */
@@ -62,11 +97,17 @@ declare function createRenderer$1(options?: FrescoRendererOptions | (() => void)
62
97
  /** Return one live host node by its stable identifier. */getNode(id: number): FrescoHostNode | undefined; /** Find one node under the supplied subtree without crossing its boundary. */
63
98
  findDescendantById(root: FrescoHostNode, id: number): FrescoHostNode | undefined; /** Detach and dispose a registered node and every descendant exactly once. */
64
99
  destroyRecursively(id: number): boolean;
100
+ /**
101
+ * Return the deepest topmost node under one native-layout coordinate.
102
+ * Hidden and scroll overflow constrain descendant targeting on each axis.
103
+ */
104
+ hitTest(root: FrescoHostNode, x: number, y: number, layouts: readonly LayoutResultNapi[]): FrescoHostNode | undefined; /** Route normalized input through capture, target, and bubble handlers. */
105
+ dispatchInput<Event extends FrescoInputEvent>(targetId: number, input: Event): FrescoInputDispatchResult | undefined;
65
106
  };
66
107
  //#endregion
67
108
  //#region src/accessibility.d.ts
68
109
  /** Semantic roles supported by Fresco screen-reader serialization. */
69
- type AriaRole = "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "scrollbar" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
110
+ type AriaRole = "button" | "checkbox" | "combobox" | "dialog" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "scrollbar" | "slider" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
70
111
  /** Accessible state rendered alongside the semantic node description. */
71
112
  interface AriaState {
72
113
  busy?: boolean;
@@ -84,5 +125,5 @@ interface AriaState {
84
125
  valueNow?: number;
85
126
  }
86
127
  //#endregion
87
- export { FrescoHostNode as a, FrescoNodeUpdateKind as c, FrescoElement as i, FrescoRendererOptions as l, AriaState as n, FrescoNode as o, FrescoDeclaredSize as r, FrescoNodeLifecycleHooks as s, AriaRole as t, createRenderer$1 as u };
88
- //# sourceMappingURL=accessibility-OEhyYUxd.d.mts.map
128
+ export { FrescoHostNode as a, FrescoInputEventPhase as c, FrescoNodeUpdateKind as d, FrescoRendererOptions as f, FrescoElement as i, FrescoNode as l, createRenderer$1 as m, AriaState as n, FrescoInputDispatchResult as o, FrescoRoutedInputEvent as p, FrescoDeclaredSize as r, FrescoInputEventHandler as s, AriaRole as t, FrescoNodeLifecycleHooks as u };
129
+ //# sourceMapping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