@weasel-js/core 1.15.1 → 1.15.2

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 (91) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/dist/animation/poseTarget.js +3 -3
  3. package/dist/animation/poseTarget.js.map +1 -1
  4. package/dist/animation/reflow.js +7 -7
  5. package/dist/animation/reflow.js.map +1 -1
  6. package/dist/animation/rig/rigNode.js +2 -2
  7. package/dist/animation/rig/rigNode.js.map +1 -1
  8. package/dist/barrel/input.js +2 -1
  9. package/dist/barrel/paint.js +2 -2
  10. package/dist/barrel/viewport.js +3 -3
  11. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +17 -64
  12. package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
  13. package/dist/canvas/accentColor.js +3 -3
  14. package/dist/canvas/accentColor.js.map +1 -1
  15. package/dist/canvas/deps/enteredGroup.js +5 -4
  16. package/dist/canvas/deps/enteredGroup.js.map +1 -1
  17. package/dist/canvas/deps/selectionSnapshot.js +7 -2
  18. package/dist/canvas/deps/selectionSnapshot.js.map +1 -1
  19. package/dist/canvas/slopsDebugLayer.js +8 -2
  20. package/dist/canvas/slopsDebugLayer.js.map +1 -1
  21. package/dist/canvas/useViewRegistrySurface.js +6 -3
  22. package/dist/canvas/useViewRegistrySurface.js.map +1 -1
  23. package/dist/canvas/viewRegistry.js +5 -5
  24. package/dist/canvas/viewRegistry.js.map +1 -1
  25. package/dist/core/ops/reorder/index.js +2 -6
  26. package/dist/core/ops/reorder/index.js.map +1 -1
  27. package/dist/core/pages/fitViewToPage.js +2 -7
  28. package/dist/core/pages/fitViewToPage.js.map +1 -1
  29. package/dist/core/pages/pages.js +3 -9
  30. package/dist/core/pages/pages.js.map +1 -1
  31. package/dist/core/paint/meshKindLazy.js +9 -5
  32. package/dist/core/paint/meshKindLazy.js.map +1 -1
  33. package/dist/core/scene/pathEffects/blend.js +2 -2
  34. package/dist/core/scene/pathEffects/blend.js.map +1 -1
  35. package/dist/core/scene/pathEffects/textAlong.js +5 -4
  36. package/dist/core/scene/pathEffects/textAlong.js.map +1 -1
  37. package/dist/core/scene/scene.js +12 -1
  38. package/dist/core/scene/scene.js.map +1 -1
  39. package/dist/core/viewport/clientToWorld.js +7 -1
  40. package/dist/core/viewport/clientToWorld.js.map +1 -1
  41. package/dist/core/viewport/zoomAt.js +6 -6
  42. package/dist/core/viewport/zoomAt.js.map +1 -1
  43. package/dist/devtools/root.js +11 -4
  44. package/dist/devtools/root.js.map +1 -1
  45. package/dist/devtools/transport.js +12 -16
  46. package/dist/devtools/transport.js.map +1 -1
  47. package/dist/devtools-protocol.d.ts +0 -11
  48. package/dist/domains/measure/measureHit.js +2 -8
  49. package/dist/domains/measure/measureHit.js.map +1 -1
  50. package/dist/domains/paths/anchorMarkers.js +5 -11
  51. package/dist/domains/paths/anchorMarkers.js.map +1 -1
  52. package/dist/domains/paths/pathEditingOverlayLayer.js +5 -9
  53. package/dist/domains/paths/pathEditingOverlayLayer.js.map +1 -1
  54. package/dist/domains/paths/penPreviewLayer.js +9 -12
  55. package/dist/domains/paths/penPreviewLayer.js.map +1 -1
  56. package/dist/domains/paths/shapeGenerator.js +1 -2
  57. package/dist/domains/paths/shapeGenerator.js.map +1 -1
  58. package/dist/domains/snap/angle2d.js +2 -1
  59. package/dist/domains/snap/angle2d.js.map +1 -1
  60. package/dist/domains/snap/outcomeStore.js +5 -8
  61. package/dist/domains/snap/outcomeStore.js.map +1 -1
  62. package/dist/domains/text/useSceneTextEdit.js +9 -4
  63. package/dist/domains/text/useSceneTextEdit.js.map +1 -1
  64. package/dist/domains/viewports/aim.js +3 -8
  65. package/dist/domains/viewports/aim.js.map +1 -1
  66. package/dist/domains/viewports/viewResolver.js +5 -3
  67. package/dist/domains/viewports/viewResolver.js.map +1 -1
  68. package/dist/index.d.ts +20 -21
  69. package/dist/index.js +5 -4
  70. package/dist/input/usePublishPointer.js +59 -0
  71. package/dist/input/usePublishPointer.js.map +1 -0
  72. package/dist/interactions/actions/defaults/containerScroll.js +9 -3
  73. package/dist/interactions/actions/defaults/containerScroll.js.map +1 -1
  74. package/dist/interactions/actions/defaults/enterGroup.js +3 -3
  75. package/dist/interactions/actions/defaults/enterGroup.js.map +1 -1
  76. package/dist/interactions/actions/defaults/pathEditMarks.js +2 -5
  77. package/dist/interactions/actions/defaults/pathEditMarks.js.map +1 -1
  78. package/dist/interactions/actions/edit-anchors/handleDrag.js +4 -7
  79. package/dist/interactions/actions/edit-anchors/handleDrag.js.map +1 -1
  80. package/dist/interactions/actions/move/behaviors/clampMove.js +42 -0
  81. package/dist/interactions/actions/move/behaviors/clampMove.js.map +1 -0
  82. package/dist/interactions/actions/move/layout/container.js +3 -6
  83. package/dist/interactions/actions/move/layout/container.js.map +1 -1
  84. package/dist/interactions/actions/move/layout/exits.js +2 -2
  85. package/dist/interactions/actions/move/layout/exits.js.map +1 -1
  86. package/dist/interactions/actions/transform-again/memory.js +2 -2
  87. package/dist/interactions/actions/transform-again/memory.js.map +1 -1
  88. package/dist/move.d.ts +18 -3
  89. package/dist/move.js +2 -1
  90. package/dist/version.js +1 -1
  91. package/package.json +25 -25
@@ -1 +1 @@
1
- {"version":3,"file":"viewResolver.js","names":[],"sources":["../../../src/domains/viewports/viewResolver.ts"],"sourcesContent":["import type { View } from 'core/viewport/view';\n\n/**\n * A view the resolver can route input to: a camera and the rect it paints\n * into, in canvas CSS-pixel space. A viewport node supplies one of these per\n * frame; so could any other per-view surface.\n */\nexport interface ResolvableView {\n id: string;\n view: View;\n rect: { x: number; y: number; w: number; h: number };\n /** The part of `rect` the view is seen through, in the same space — a view\n * nested in another is cut to it. Omitted, the whole rect. */\n clip?: { x: number; y: number; w: number; h: number };\n}\n\ntype Rect = { x: number; y: number; w: number; h: number };\n\n/** Right and bottom edges are exclusive, so neighbouring views never both\n * claim a pixel. */\nconst inside = (r: Rect, x: number, y: number): boolean =>\n x >= r.x && x < r.x + r.w && y >= r.y && y < r.y + r.h;\n\n/** Whether `v` takes a canvas-local point: inside its rect and its clip. */\nexport function viewContains(v: ResolvableView, x: number, y: number): boolean {\n return inside(v.rect, x, y) && (v.clip === undefined || inside(v.clip, x, y));\n}\n\n/**\n * The view an input event belongs to. `id` is `null` for the root view —\n * the whole canvas, when no viewport contains the point.\n */\nexport interface ViewTarget {\n id: string | null;\n view: View;\n /** The point asked about, in that view's world. */\n world: { x: number; y: number };\n}\n\n/**\n * Routes client points to views, and holds a captured pointer on the view its\n * gesture started in.\n *\n * Stickiness is the point. A drag that leaves its view's rect — over a\n * neighbouring view, or off the canvas — must keep reporting coordinates in\n * the space it began in, or a marquee crossing a panel edge silently starts\n * measuring against the wrong camera.\n */\nexport interface ViewResolver {\n /** Resolve and pin `pointerId`. Call on pointerdown. */\n begin(pointerId: number, clientX: number, clientY: number): ViewTarget;\n /**\n * The view for a point. A pinned `pointerId` gets its pinned view, looked\n * up fresh so a rect that moved mid-gesture is honored. Pass `null` for\n * input with no pointer to capture — wheel, hover, keys.\n */\n at(pointerId: number | null, clientX: number, clientY: number): ViewTarget;\n /** Release `pointerId`. Call on pointerup and pointercancel. */\n end(pointerId: number): void;\n /** Release every pin. */\n clear(): void;\n}\n\n/**\n * Options for `createViewResolver`. Each field is a function called afresh on\n * every query, so views and the canvas may move between events.\n */\nexport interface CreateViewResolverOpts {\n /** Candidate views in paint order — the last one containing a point wins,\n * so a nested view listed after the one around it is the one a point\n * inside both reaches. */\n views: () => readonly ResolvableView[];\n /** The camera for points no view claims. */\n root: () => View;\n /** A client point in the canvas's own CSS pixels, from its top-left. */\n toLocal: (clientX: number, clientY: number) => { x: number; y: number };\n /**\n * Whether something painted over every view claims a canvas-local point —\n * chrome on the surface's own frame. Such a point resolves to the root even\n * inside a view's rect. Asked only where a view would otherwise win.\n */\n occluded?: (x: number, y: number) => boolean;\n}\n\n/** Build a `ViewResolver` over `opts.views`, falling back to `opts.root`. */\nexport function createViewResolver(opts: CreateViewResolverOpts): ViewResolver {\n const { views, root, toLocal, occluded } = opts;\n const pinned = new Map<number, string | null>();\n\n type Local = { x: number; y: number };\n /** `at`, a canvas point `from` its surface's top-left, through `view`. */\n const worldOf = (at: Local, from: Local, view: View): Local => ({\n x: (at.x - from.x) / view.scale.x + view.x,\n y: (at.y - from.y) / view.scale.y + view.y,\n });\n\n function rootTarget(at: Local): ViewTarget {\n const view = root();\n return { id: null, view, world: worldOf(at, { x: 0, y: 0 }, view) };\n }\n\n function target(v: ResolvableView, at: Local): ViewTarget {\n return { id: v.id, view: v.view, world: worldOf(at, v.rect, v.view) };\n }\n\n function hit({ x, y }: Local): ResolvableView | undefined {\n const list = views();\n for (let i = list.length - 1; i >= 0; i--) {\n if (viewContains(list[i]!, x, y)) {\n return occluded?.(x, y) ? undefined : list[i];\n }\n }\n return undefined;\n }\n\n function fresh(at: Local): ViewTarget {\n const v = hit(at);\n return v ? target(v, at) : rootTarget(at);\n }\n\n return {\n begin(pointerId, clientX, clientY) {\n const t = fresh(toLocal(clientX, clientY));\n pinned.set(pointerId, t.id);\n return t;\n },\n at(pointerId, clientX, clientY) {\n const at = toLocal(clientX, clientY);\n if (pointerId !== null && pinned.has(pointerId)) {\n const id = pinned.get(pointerId)!;\n if (id === null) return rootTarget(at);\n const v = views().find((c) => c.id === id);\n if (v) return target(v, at);\n pinned.delete(pointerId);\n }\n return fresh(at);\n },\n end(pointerId) {\n pinned.delete(pointerId);\n },\n clear() {\n pinned.clear();\n },\n };\n}\n"],"mappings":";;;AAoBA,IAAM,UAAU,GAAS,GAAW,MAClC,KAAK,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE;;AAGvD,SAAgB,aAAa,GAAmB,GAAW,GAAoB;CAC7E,OAAO,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,SAAS,UAAa,OAAO,EAAE,MAAM,GAAG,CAAC;AAC7E;;AA2DA,SAAgB,mBAAmB,MAA4C;CAC7E,MAAM,EAAE,OAAO,MAAM,SAAS,aAAa;CAC3C,MAAM,yBAAS,IAAI,IAA2B;;CAI9C,MAAM,WAAW,IAAW,MAAa,UAAuB;EAC9D,IAAI,GAAG,IAAI,KAAK,KAAK,KAAK,MAAM,IAAI,KAAK;EACzC,IAAI,GAAG,IAAI,KAAK,KAAK,KAAK,MAAM,IAAI,KAAK;CAC3C;CAEA,SAAS,WAAW,IAAuB;EACzC,MAAM,OAAO,KAAK;EAClB,OAAO;GAAE,IAAI;GAAM;GAAM,OAAO,QAAQ,IAAI;IAAE,GAAG;IAAG,GAAG;GAAE,GAAG,IAAI;EAAE;CACpE;CAEA,SAAS,OAAO,GAAmB,IAAuB;EACxD,OAAO;GAAE,IAAI,EAAE;GAAI,MAAM,EAAE;GAAM,OAAO,QAAQ,IAAI,EAAE,MAAM,EAAE,IAAI;EAAE;CACtE;CAEA,SAAS,IAAI,EAAE,GAAG,KAAwC;EACxD,MAAM,OAAO,MAAM;EACnB,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KACpC,IAAI,aAAa,KAAK,IAAK,GAAG,CAAC,GAC7B,OAAO,WAAW,GAAG,CAAC,IAAI,SAAY,KAAK;CAIjD;CAEA,SAAS,MAAM,IAAuB;EACpC,MAAM,IAAI,IAAI,EAAE;EAChB,OAAO,IAAI,OAAO,GAAG,EAAE,IAAI,WAAW,EAAE;CAC1C;CAEA,OAAO;EACL,MAAM,WAAW,SAAS,SAAS;GACjC,MAAM,IAAI,MAAM,QAAQ,SAAS,OAAO,CAAC;GACzC,OAAO,IAAI,WAAW,EAAE,EAAE;GAC1B,OAAO;EACT;EACA,GAAG,WAAW,SAAS,SAAS;GAC9B,MAAM,KAAK,QAAQ,SAAS,OAAO;GACnC,IAAI,cAAc,QAAQ,OAAO,IAAI,SAAS,GAAG;IAC/C,MAAM,KAAK,OAAO,IAAI,SAAS;IAC/B,IAAI,OAAO,MAAM,OAAO,WAAW,EAAE;IACrC,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,MAAM,EAAE,OAAO,EAAE;IACzC,IAAI,GAAG,OAAO,OAAO,GAAG,EAAE;IAC1B,OAAO,OAAO,SAAS;GACzB;GACA,OAAO,MAAM,EAAE;EACjB;EACA,IAAI,WAAW;GACb,OAAO,OAAO,SAAS;EACzB;EACA,QAAQ;GACN,OAAO,MAAM;EACf;CACF;AACF"}
1
+ {"version":3,"file":"viewResolver.js","names":[],"sources":["../../../src/domains/viewports/viewResolver.ts"],"sourcesContent":["import type { View } from 'core/viewport/view';\nimport { viewScreenToWorld } from '@weasel-js/geom';\n\n/**\n * A view the resolver can route input to: a camera and the rect it paints\n * into, in canvas CSS-pixel space. A viewport node supplies one of these per\n * frame; so could any other per-view surface.\n */\nexport interface ResolvableView {\n id: string;\n view: View;\n rect: { x: number; y: number; w: number; h: number };\n /** The part of `rect` the view is seen through, in the same space — a view\n * nested in another is cut to it. Omitted, the whole rect. */\n clip?: { x: number; y: number; w: number; h: number };\n}\n\ntype Rect = { x: number; y: number; w: number; h: number };\n\n/** Right and bottom edges are exclusive, so neighbouring views never both\n * claim a pixel. */\nconst inside = (r: Rect, x: number, y: number): boolean =>\n x >= r.x && x < r.x + r.w && y >= r.y && y < r.y + r.h;\n\n/** Whether `v` takes a canvas-local point: inside its rect and its clip. */\nexport function viewContains(v: ResolvableView, x: number, y: number): boolean {\n return inside(v.rect, x, y) && (v.clip === undefined || inside(v.clip, x, y));\n}\n\n/**\n * The view an input event belongs to. `id` is `null` for the root view —\n * the whole canvas, when no viewport contains the point.\n */\nexport interface ViewTarget {\n id: string | null;\n view: View;\n /** The point asked about, in that view's world. */\n world: { x: number; y: number };\n}\n\n/**\n * Routes client points to views, and holds a captured pointer on the view its\n * gesture started in.\n *\n * Stickiness is the point. A drag that leaves its view's rect — over a\n * neighbouring view, or off the canvas — must keep reporting coordinates in\n * the space it began in, or a marquee crossing a panel edge silently starts\n * measuring against the wrong camera.\n */\nexport interface ViewResolver {\n /** Resolve and pin `pointerId`. Call on pointerdown. */\n begin(pointerId: number, clientX: number, clientY: number): ViewTarget;\n /**\n * The view for a point. A pinned `pointerId` gets its pinned view, looked\n * up fresh so a rect that moved mid-gesture is honored. Pass `null` for\n * input with no pointer to capture — wheel, hover, keys.\n */\n at(pointerId: number | null, clientX: number, clientY: number): ViewTarget;\n /** Release `pointerId`. Call on pointerup and pointercancel. */\n end(pointerId: number): void;\n /** Release every pin. */\n clear(): void;\n}\n\n/**\n * Options for `createViewResolver`. Each field is a function called afresh on\n * every query, so views and the canvas may move between events.\n */\nexport interface CreateViewResolverOpts {\n /** Candidate views in paint order — the last one containing a point wins,\n * so a nested view listed after the one around it is the one a point\n * inside both reaches. */\n views: () => readonly ResolvableView[];\n /** The camera for points no view claims. */\n root: () => View;\n /** A client point in the canvas's own CSS pixels, from its top-left. */\n toLocal: (clientX: number, clientY: number) => { x: number; y: number };\n /**\n * Whether something painted over every view claims a canvas-local point —\n * chrome on the surface's own frame. Such a point resolves to the root even\n * inside a view's rect. Asked only where a view would otherwise win.\n */\n occluded?: (x: number, y: number) => boolean;\n}\n\n/** Build a `ViewResolver` over `opts.views`, falling back to `opts.root`. */\nexport function createViewResolver(opts: CreateViewResolverOpts): ViewResolver {\n const { views, root, toLocal, occluded } = opts;\n const pinned = new Map<number, string | null>();\n\n type Local = { x: number; y: number };\n /** `at`, a canvas point `from` its surface's top-left, through `view`. */\n const worldOf = (at: Local, from: Local, view: View): Local =>\n viewScreenToWorld(view, { x: at.x - from.x, y: at.y - from.y });\n\n function rootTarget(at: Local): ViewTarget {\n const view = root();\n return { id: null, view, world: worldOf(at, { x: 0, y: 0 }, view) };\n }\n\n function target(v: ResolvableView, at: Local): ViewTarget {\n return { id: v.id, view: v.view, world: worldOf(at, v.rect, v.view) };\n }\n\n function hit({ x, y }: Local): ResolvableView | undefined {\n const list = views();\n for (let i = list.length - 1; i >= 0; i--) {\n if (viewContains(list[i]!, x, y)) {\n return occluded?.(x, y) ? undefined : list[i];\n }\n }\n return undefined;\n }\n\n function fresh(at: Local): ViewTarget {\n const v = hit(at);\n return v ? target(v, at) : rootTarget(at);\n }\n\n return {\n begin(pointerId, clientX, clientY) {\n const t = fresh(toLocal(clientX, clientY));\n pinned.set(pointerId, t.id);\n return t;\n },\n at(pointerId, clientX, clientY) {\n const at = toLocal(clientX, clientY);\n if (pointerId !== null && pinned.has(pointerId)) {\n const id = pinned.get(pointerId)!;\n if (id === null) return rootTarget(at);\n const v = views().find((c) => c.id === id);\n if (v) return target(v, at);\n pinned.delete(pointerId);\n }\n return fresh(at);\n },\n end(pointerId) {\n pinned.delete(pointerId);\n },\n clear() {\n pinned.clear();\n },\n };\n}\n"],"mappings":";;;;;AAqBA,IAAM,UAAU,GAAS,GAAW,MAClC,KAAK,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE;;AAGvD,SAAgB,aAAa,GAAmB,GAAW,GAAoB;CAC7E,OAAO,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,SAAS,UAAa,OAAO,EAAE,MAAM,GAAG,CAAC;AAC7E;;AA2DA,SAAgB,mBAAmB,MAA4C;CAC7E,MAAM,EAAE,OAAO,MAAM,SAAS,aAAa;CAC3C,MAAM,yBAAS,IAAI,IAA2B;;CAI9C,MAAM,WAAW,IAAW,MAAa,SACvC,kBAAkB,MAAM;EAAE,GAAG,GAAG,IAAI,KAAK;EAAG,GAAG,GAAG,IAAI,KAAK;CAAE,CAAC;CAEhE,SAAS,WAAW,IAAuB;EACzC,MAAM,OAAO,KAAK;EAClB,OAAO;GAAE,IAAI;GAAM;GAAM,OAAO,QAAQ,IAAI;IAAE,GAAG;IAAG,GAAG;GAAE,GAAG,IAAI;EAAE;CACpE;CAEA,SAAS,OAAO,GAAmB,IAAuB;EACxD,OAAO;GAAE,IAAI,EAAE;GAAI,MAAM,EAAE;GAAM,OAAO,QAAQ,IAAI,EAAE,MAAM,EAAE,IAAI;EAAE;CACtE;CAEA,SAAS,IAAI,EAAE,GAAG,KAAwC;EACxD,MAAM,OAAO,MAAM;EACnB,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KACpC,IAAI,aAAa,KAAK,IAAK,GAAG,CAAC,GAC7B,OAAO,WAAW,GAAG,CAAC,IAAI,SAAY,KAAK;CAIjD;CAEA,SAAS,MAAM,IAAuB;EACpC,MAAM,IAAI,IAAI,EAAE;EAChB,OAAO,IAAI,OAAO,GAAG,EAAE,IAAI,WAAW,EAAE;CAC1C;CAEA,OAAO;EACL,MAAM,WAAW,SAAS,SAAS;GACjC,MAAM,IAAI,MAAM,QAAQ,SAAS,OAAO,CAAC;GACzC,OAAO,IAAI,WAAW,EAAE,EAAE;GAC1B,OAAO;EACT;EACA,GAAG,WAAW,SAAS,SAAS;GAC9B,MAAM,KAAK,QAAQ,SAAS,OAAO;GACnC,IAAI,cAAc,QAAQ,OAAO,IAAI,SAAS,GAAG;IAC/C,MAAM,KAAK,OAAO,IAAI,SAAS;IAC/B,IAAI,OAAO,MAAM,OAAO,WAAW,EAAE;IACrC,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,MAAM,EAAE,OAAO,EAAE;IACzC,IAAI,GAAG,OAAO,OAAO,GAAG,EAAE;IAC1B,OAAO,OAAO,SAAS;GACzB;GACA,OAAO,MAAM,EAAE;EACjB;EACA,IAAI,WAAW;GACb,OAAO,OAAO,SAAS;EACzB;EACA,QAAQ;GACN,OAAO,MAAM;EACf;CACF;AACF"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { D as Dims, R as RenderLayer, L as LayerHit, i as LayerDims, V as ViewAnimationOptions, a as PathEditExtension, j as ViewportDims, F as FitViewToBoundsOptions, k as RedrawSource, l as EditAnchorsParams, I as InertiaConfig, E as EditAnchorsDep, G as GestureLifecycleOptions, m as SliceDep, n as StickyStyle, A as AnchorMarkerShape, P as PathEditMark, T as TextOverflow, o as EnteredGroupApi, C as ContentHandlerEntry, p as ChromeState, q as LayerGroup, S as SnapSource, r as TransformFollower, s as GeometryProjection, t as InsertNodeFactory, u as InsertPaint, v as SvgIngestOptions, w as SceneCanvasSnap, x as Affordance, y as AffordanceRegion, z as AffordanceBinding, B as CommonAffordanceScratch, J as CreateOutlinesAdapter, N as NoticesDep, K as PaintKindEntry, M as PathEditTarget, O as FinishedEditFrame, Q as PathSymmetryDep, H as HandleLocks, U as BooleanOpOptions, W as BooleansAdapter, X as BooleanOp, Y as PathPaint, Z as BooleanOpResult, $ as BooleanStrokes, a0 as SnapMods, a1 as SourceCandidate, a2 as SnapProbeAt, a3 as SnapCollect, a4 as SnapMark, b as SnapGesture, a5 as SnapDep, a6 as SnapOutcome, f as SnapOutcomeStore, a7 as SnapReadoutStyle } from './depSchema-C7a_OMt-.js';
2
2
  export { a8 as AngleCandidate, a9 as AngleCollect, aa as AnimateToBoundsOptions, ab as AreaSelectDep, ac as BooleanOpPreview, ad as BooleanPreviewPiece, ae as CanDropIntoDep, af as ClipboardDep, ag as ClipboardIngestCtx, ah as CreateOutlinesResult, ai as CustomPaintContext, aj as DEFAULT_LAYER_RETAIN, ak as DecayLoopConfig, al as DropRefusal, am as DropVerdict, an as FinishedPathEdit, ao as GEOMETRY_BOUND_DATA, ap as HandleLock, aq as HitTestView, ar as IngestCtx, as as IngestionDep, at as InsertDep, au as InsertEnds, av as InsertExtras, aw as InsertIntoDep, ax as InsertLive, ay as LassoSelectDep, az as LayerCommandCache, aA as LayerDrawFailure, aB as LayerDrawSpan, aC as LayerRetainPolicy, aD as LayoutDep, aE as Locus, aF as MinSize, aG as NodeAtPointDep, aH as NoticeOptions, aI as OutlinePathSpec, aJ as PATH_OVERLAY_ROLES, aK as PaintKind, aL as PaintKindEditorProps, aM as PaintKindFamily, aN as PaintKindLoader, aO as PanBounds, aP as PathEditDrag, aQ as PathEditDragStart, aR as PathEditFinishCtx, aS as PathEditHandleMove, aT as PathEditMarksCtx, aU as PathEditOther, aV as PathEditPart, aW as PathEditStore, aX as PathForm, aY as PathOverlay, aZ as PathOverlayOptions, a_ as PathOverlayStyle, a$ as PathRepresentation, b0 as PathTransformFinishCtx, b1 as PoseChange, b2 as PreviewPathsDep, b3 as ResizePolicy, b4 as STICKY_DEFAULTS, g as SnapAnchors, b5 as SnapBegin, c as SnapConstrain, b6 as SnapFrame, e as SnapGeometry, b7 as SnapMarks, b8 as SnapReadoutDep, d as SnapResizeBox, h as SnapSession, b9 as SnapSide, ba as SvgUnpacker, bb as TextEditDep, bc as TextNodeData, bd as TransformPreviewNode, be as TransientPath, bf as VIEW_ANIMATION_KEY, bg as ViewAnimationApi, bh as ViewApi, bi as ViewChannel, bj as applyBooleanOp, bk as applyCreateOutlines, bl as asPaint, bm as createEnteredGroup, bn as createPathOverlay, bo as createSnapOutcomeStore, bp as depsUnchanged, bq as drawLayers, br as drawOneLayer, bs as fitViewToBounds, bt as getPaintKind, bu as isLayerPainted, bv as isLayerVisible, bw as listGradientKinds, bx as listPaintKinds, by as minSizeOf, bz as paintKindOf, bA as paintKindRegistry, bB as paintedLayers, bC as paintsLayer, bD as paletteInsertPaint, bE as pathPaintOf, bF as patternFamily, bG as previewBooleanOp, bH as refusalOf, bI as registerContentHandler, bJ as registerPaintKind, bK as registerPaintKindLoader, bL as seedTile, bM as stickyData, bN as stickyNodeFactory, bO as subscribeToSources, bP as switchGradientKind, bQ as textBoxOf, bR as useDecayLoop, bS as useEnteredGroup, bT as useViewAnimation, bU as useViewAnimationOn, bV as viewAxes, bW as warnTextOutlines, bX as warnUser, bY as withoutGeometryBoundData } from './depSchema-C7a_OMt-.js';
3
3
  import { View, Scale2, Path, FramedBox, PolygonPath, Affine, GlMat3, Point, AnchorField, AnchorSet, PlacementAlign, Rect, PathSnapKind, PathInWorldPose, AnchorFieldValues, NumberEntry, JoinOptions, SegmentHit, PointOrigin, AnchorSymmetry, BlendPathsOptions, RunAlign, TrackSide, BendAlongPathOptions, RepeatAlongPathOptions, RoughenPathOptions, ZigzagPathOptions, PuckerBloatPathOptions, PoseLinear } from '@weasel-js/geom';
4
- export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, PuckerBloatPathOptions, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, RoughenPathOptions, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, ZigzagPathOptions, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pathToD, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, puckerBloatPath, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roughenPath, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage, zigzagPath } from '@weasel-js/geom';
4
+ export { AnchorField, AnchorFieldValues, AnchorPair, AverageAxis, BendAlongPathOptions, BezierEasing, BlendPathsOptions, FramedBox as Bounds, CONSTRAINT_TOLERANCE, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, ConstrainedPathEdit, ConstraintPoint, CornerFrame, CornerKeyword, CornerPiece, CornerShape, CornerShapeFrame, CornerSpec, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, ExtendToMeetOptions, JoinOptions, MeasurePathOptions, NumberEntry, OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, PathBlend, PathBuilder, PathConstraint, PathConstraintKind, PathCrossing, PathFillRule, PathInWorldPose, PathMeasure, PathSegment, PathSnapHit, PathSnapIndex, PathSnapKind, PathSnapQuery, PathStation, PathStop, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, PuckerBloatPathOptions, Rect, RectPath, RepeatAlongPathOptions, RepeatStation, ResolvedCorners, RoughenPathOptions, SPRING_PRESETS, Scale2, SegmentCrossing, SimplifyPathOptions, SmudgePathOptions, SolveConstraintsOptions, SolveConstraintsResult, SpringPreset, SpringPresetName, TrimPathOptions, TrimResult, Point as Vec2, View, ZOOM_FLOOR, ZigzagPathOptions, asPolygonPath, averageAnchorsAt, bendAlongPath, blendPaths, boundsOfPath, circlePath, composePath, constrainPathEdit, constraintAnchors, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createPathSnapIndex, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, extendToMeet, findPathSnap, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasCorners, hasOpenSubpath, intersectSegments, isCornerShape, joinAnchorsAt, lengthenOpenEnd, linePath, linear, meanScale, measurePath, nextCornerShape, openEndRay, openPathEnds, pathAnchorPoints, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSegments, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pathToD, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, puckerBloatPath, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, remapPerAnchor, repeatAlongPath, resolveCorners, resolveCornersWithSources, resolveEasing, reversePath, rotatePathAround, roughenPath, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyAnchorsAt, simplifyPath, smudgePath, solveConstraints, solvePathConstraints, splitByClosure, splitSubpaths, squarePath, standoff, starPath, stationsAlongPath, transformPath, translatePath, trimPathAt, unionBoundsPath, unsatisfiedConstraints, viewRectToScreen, viewScreenToWorld, viewWorldToScreen, withCorner, withinPxBox, withinPxRadius, withoutCorners, worldEditToStorage, zigzagPath } from '@weasel-js/geom';
5
5
  import { a as PlaneMap, L as LayoutStrategy, R as ReflowTransition, b as LayoutDropTargetMode } from './types-A_sNJYRd.js';
6
6
  export { C as ContainerBounds, D as DropRegion, c as DropTarget, d as LayoutArrival, e as LayoutChild, f as LayoutContainer, g as LayoutDragged, h as LayoutSnap, P as ParallaxOpts, i as ReflowGlideOptions, S as ScalarOrXY, j as deriveParallaxView, k as fromPlane, p as planeMap, l as planeMatrix, m as planeToPlane, r as rectFromPlane, n as rectToPlane, t as toPlane } from './types-A_sNJYRd.js';
7
7
  export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, Simulation, SimulationCore, SimulationForce, SimulationNode, SimulationOptions, UseSimulationOptions, createSimulation } from '@weasel-js/simulation';
@@ -28,10 +28,10 @@ import { C as CanvasDebugSink, D as DebugSnapshot, a as DebugConfig, b as DebugS
28
28
  export { d as DEBUG_FEATURES, e as DebugFeature, f as DebugStroke, F as FrameStats, L as LayerFrameStats, R as RecordedBounds, g as RecordedHandle, h as RecordedHitbox, i as RecordedLayer, j as RecordedOrigin, k as RecordedSnap, l as RecordedViewport } from './types-BN9hbdMI.js';
29
29
  import { VertexColorChannel, Target, Animator, ColorOverrideRegistry, TargetAxes, Pose, ClipBinder, SpringPresetName, StaggerOptions, StaggerDelay, EasingSpec, AnimationHandle, Skeleton, Skin } from '@weasel-js/animator';
30
30
  import { SelectionStore as SelectionStore$1 } from '@weasel-js/select';
31
- import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerContextValue, Yoke } from '@weasel-js/routing/react';
31
+ import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, PointerWorldPos, PointerContextValue, Yoke } from '@weasel-js/routing/react';
32
32
  export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, CommandOptions, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, lastOperationOf, useAction, useActionsRegistry, useActiveToolContext, useCommand, useDepRegistry, useDepSource, useGestureDispatcher, useLastOperation, useLastOperationStore, useMenuHost, useMenus, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
33
33
  import { Paint, CommandFill, CommandStroke, Fill, Inherit, Stroke, CommandPaint, Palette, SolidPaint, VertexWidth, PaintedFill, PaintedStroke } from '@weasel-js/paint';
34
- export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileExtent, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
34
+ export { ColorInterpolationSpace, ColorSpace, CommandFill, CommandPaint, CommandPaintUnits, CommandStroke, Fill, GradStop, GradientKind, GradientPaint, HalfWidths, HueInterpolation, INHERIT, ImagePatternPaint, Inherit, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Paint, PaintUnits, PaintedFill, PaintedStroke, PatternPaint, PatternPlacement, PatternTransform, PatternTransformParts, PosedPaint, Region, STROKE_DASH_RATIOS, ScreenLength, SolidPaint, Stroke, StrokeAlign, StrokeDashStyle, StrokeNib, TILE_KINDS, TextureHandle, TexturePaint, TileExtent, TileKind, TilePaint, TilePatternSpec, VertexWidth, VertexWidthSides, alignedStrokeRect, composePatternTransform, contrastLineColor, contrastRatio, dashForStrokeStyle, decomposePatternTransform, gradientForBounds, gradientGeometry, hexToOklchDeg, hexToRgbBytes, hexToRgba, hslToSrgb, interpolateSrgb, isGradientPaint, isImagePatternPaint, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linearSrgbToOklab, linearToSrgb, luminanceContrast, normalizeHex, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, relativeLuminance, resolveColor, resolveFill, resolveScreenLength, resolveStroke, rgbaToHex, sampleGradientStops, scaleVertexWidth, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf, tileSpecOf, vertexHalfWidths, vertexWidthFromSides, wcagLevels, widestHalfWidth, withGradientKind } from '@weasel-js/paint';
35
35
  import { FontRequest } from '@weasel-js/font';
36
36
  export { FaceMetrics, FaceRuleMetrics, FaceScriptMetrics, FontFamilyFaces, FontRequest, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, RegisterFontOptions, canQueryLocalFonts, cssFamilyName, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, refreshCanvasFont, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines, warmFonts } from '@weasel-js/font';
37
37
  import * as _weasel_js_history from '@weasel-js/history';
@@ -2023,15 +2023,7 @@ declare function wheelPan(view: View, delta: {
2023
2023
  /** Pure reducer: the whole wheel convention in one call. */
2024
2024
  declare function computeWheelAction(view: View, input: WheelInput, clamp?: ZoomClampOpts, opts?: Pick<WheelPanOpts, 'axis'>): View;
2025
2025
 
2026
- /**
2027
- * Convert client coords directly to world coords by subtracting the canvas
2028
- * rect origin and then applying the inverse view transform.
2029
- *
2030
- * This is the composition of `clientToCanvas` + the view-inverse half of
2031
- * `screenToWorld`, but expressed against the `ViewLike` shape used by
2032
- * `SceneCanvas` (`{ scale: { x, y }, x, y }`) rather than the
2033
- * `ViewTransform` shape used by `screenToWorld` (`{ panX, panY, zoom }`).
2034
- */
2026
+ /** The `View` shape: `clientToWorld` is `clientToCanvas` then `viewScreenToWorld`. */
2035
2027
  interface ViewLike {
2036
2028
  scale: {
2037
2029
  x: number;
@@ -2990,6 +2982,20 @@ declare function PointerProviderIfRoot({ children }: {
2990
2982
  children: ReactNode;
2991
2983
  }): react.JSX.Element;
2992
2984
 
2985
+ /** Where a client point is in the world and which view it is over, or `null`
2986
+ * when there is no answer yet (the surface has not mounted its camera). */
2987
+ type LocatePointer = (pointerId: number, clientX: number, clientY: number) => NonNullable<PointerWorldPos> | null;
2988
+ /**
2989
+ * Publishes the pointer over `elementRef` into the pointer store in scope, as
2990
+ * `locate` places it. A pointer pressed on the element keeps publishing once
2991
+ * it leaves, so a drag that runs off the edge still reports where it is; a
2992
+ * pointer that leaves with nothing held clears the store, unless another view
2993
+ * has published since. No-op with no provider in scope.
2994
+ *
2995
+ * `locate` is read on each event, so it need not be stable.
2996
+ */
2997
+ declare function usePublishPointer(elementRef: RefObject<HTMLElement | null>, locate: LocatePointer): void;
2998
+
2993
2999
  /** Mount an `<ActionsProvider>` only when none is already in scope. */
2994
3000
  declare function ActionsProviderIfRoot({ children }: {
2995
3001
  children: ReactNode;
@@ -3667,13 +3673,6 @@ declare function makeViewportWheelPanAction(opts?: WheelPanOptions): Action & {
3667
3673
  requires: string[];
3668
3674
  };
3669
3675
 
3670
- /**
3671
- * Wheel scrolling of a layout container whose content runs past its bounds,
3672
- * such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`
3673
- * says how far; the offset goes to `scene.scroll`, which moves what the view
3674
- * shows and leaves the document where it is.
3675
- */
3676
-
3677
3676
  type AnyScene$2 = Scene<unknown, string, unknown>;
3678
3677
  /** How far a container's content can scroll on each axis, in its own units:
3679
3678
  * `[min, max]`, zero included, so an unscrolled container is in range. */
@@ -9756,7 +9755,7 @@ declare const pathOriginProjection: OriginProjection<Path>;
9756
9755
  * close-hint ring on the first anchor when the tool flags it as hot.
9757
9756
  *
9758
9757
  * Runs in screen space so anchor/handle sizes stay constant under zoom.
9759
- * All world-space coords go through `worldToScreen` via the layer's `view`
9758
+ * All world-space coords go through `viewWorldToScreen` with the layer's `view`
9760
9759
  * argument.
9761
9760
  */
9762
9761
 
@@ -12007,4 +12006,4 @@ declare const coreKitSettingsSchema: Omit<_weasel_js_prefs.PrefGroup, "children"
12007
12006
  };
12008
12007
  };
12009
12008
 
12010
- export { ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeRulesDep, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type ElementSizeOptions, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, NoticesDep, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, POLYGON_INSERT_PARAMS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoughenEffect, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UndeclaredMagnification, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRule, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, undeclaredMagnifications, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, useNotices, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
12009
+ export { ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, AREA_SELECT_ID, ActionsProviderIfRoot, AddNodeSpec, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AimHeldViewProps, type AimOutline, type AimPoint, type AimSource, type AimSpace, type AlignAdapter, type AlignEdge, type AlignReference, type AnchorEdit, type AnchorFieldsApi, type AnchorHit, AnchorMarkerShape, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimatedReflow, type AnnotationFlag, type AnyTool, AreaSelectAdapter, type ArrangeArgs, type ArrangedPose, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, type BendAlongEffect, type BindRigOptions, type BlendEffect, type BooleanCommitPiece, BooleanOp, BooleanOpOptions, BooleanOpResult, type BooleanOperands, type BooleanShapeOp, type BooleanSource, BooleanStrokes, BooleansAdapter, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CANVAS_CONTEXT_ATTRIBUTES, type CameraHeldViewProps, type CameraProps, CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasRetainOptions, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewCommonProps, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type CarrySource, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeRulesDep, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CoreIconName, type CoreKitTargetSettings, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, CreateOutlinesAdapter, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, DRAW_TOOLS, DebugConfig, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, type DeleteActionOptions, type DeleteArgs, DepRegistryProviderIfRoot, type Departures, DerivePathFn, DerivePoseFn, DerivedDep, type DerivedPart, DeviceProfileProvider, type DeviceProfileProviderProps, DevtoolsLabel, type DevtoolsLabelProps, Dims, type DistributeAdapter, type DistributeAxis, type DistributeMode, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DrawnBoundsOptions, type DrawnBoundsScene, type DropZoneOptions, EditAnchorsDep, EditAnchorsParams, type EditableShape, type EditedLayerOf, type EditingDrawOne, type EffectBand, type EffectItem, type EffectSource, type EffectSourceReader, type ElementSizeOptions, type EnterGroupOptions, EnteredGroupApi, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, type Feature, type FeatureBindingOptions, type FeatureEntry, type FeaturePreset, type FeedDelta, type FeedNode, FinishedEditFrame, FitViewToBoundsOptions, type FlipAxis, type FlipPivot, GHOST_STROKE, GROUP_ENTRY_ID, type GateLayerOptions, type GateSource, type GatedLayer, type GatedNode, type GatherSnapOptions, type GeneratedShape, GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HandleEdit, HandleLocks, type HandleScope, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, type IconRegistryProviderProps, InertiaConfig, InheritedPaint, type InkExtents, InsertAdapter, type InsertArgs, InsertBehavior, InsertNodeFactory, type InsertOp, type InsertOverlayStyle, InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, type JoinPlan, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitHandlersOption, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoSelectAdapter, LassoSelectBehavior, LayerDims, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutFrame, type LayoutRef, LayoutStrategy, LeanSceneCanvas, type LeanSceneCanvasProps, type LeaveGroupOptions, type LifecycleAdapter, type LifecycleAnimation, type LinePoint, type LivePathEditSpec, type LocatePointer, type LongPressFeedbackOptions, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, MOVE_NODES_REQUIRES, type MeasureCell, type MeasureData, type MeasureEnd, type MeasureEndSourceOptions, type MeasureHit, type MeasurePoint, type Measurement, type Measurements, type ModeTriggerHandlers, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NamedPresets, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeClip, type NodeFlagArgs, type NodeGates, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, NoticesDep, OVERLAY_ROLE_STROKES, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_SNAP_LABELS, POLYGON_INSERT_PARAMS, type Page, type PageEditOptions, type PageLayoutOptions, type PagesDoc, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, PasteCtx, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, PathEditExtension, type PathEditFrame, type PathEditHost, PathEditMark, type PathEditOpening, type PathEditPreview, PathEditTarget, type PathEditingOverlaySlotConfig, type PathEditingOverlayStyle, type PathEffect, type PathEffectDerivations, type PathEffectOptions, type PathGestureFamily, type PathNode, PathPaint, type PathSnapSourceOptions, type PathStorageKind, PathSymmetryDep, type PenContinuation, type PenPreviewStyle, type PenScratch, type PenSubpath, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedSpec, PlaneMap, type PointSnap, type PointerFollower, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, type PolygonPoint, PoseAdapter, type PoseAnimationAdapter, PoseComposition, PoseDescriptor, type PoseFeed, type PoseFrame, PoseOverrides, PoseRemoval, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PoseTransitionScene, type PoseTransitionSeat, PoseWrite, type PosedNode, type PresetDescription, type PressTargetTree, type PressureToWidthOptions, type PreviewNode, type PuckerBloatEffect, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RectAim, RectPose, RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, type RegisterNodeShapeOptions, RegisteredOp, type RenderDebugSnapshotArgs, RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatAlongEffect, type RepeatableTransform, type RequirementMismatch, type ResizeActionOptions, ResizeAdapter, ResizeHandleLayout, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RoughenEffect, type RoutedNode, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, SavedScene, Scene, type SceneAdapterSelection, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasGeometry, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, SceneCanvasSnap, type SceneCanvasTextEditor, type SceneCanvasViewport, type SceneClipTargetsOptions, Node as SceneNode, type SceneNodeClientRectOpts, type SceneOptions, ScenePoseReports, SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, ScrollOffset, type ScrollRange, type SelectAdapter, type SelectFromLassoOptions, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SerializedScene, type SetAnchorFieldParams, type SetChildOrderArgs, type SetDataArgs, type SetDependsOnArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type ShownDataSource, type ShownDeparture, type SiblingSlot, SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapCandidateMark, SnapCollect, SnapDep, SnapGesture, SnapMark, SnapMods, SnapOutcome, SnapOutcomeStore, SnapProbeAt, SnapReadoutStyle, SnapSource, SourceCandidate, type SpatialReference, type SpatialReferenceSources, SpecsFromSerializedOptions, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, type StarPoint, type StatedNodeFields, StickyStyle, type StrokeRegionOptions, type StylusData, type SurfaceContribution, type SurfaceSizeProps, SvgIngestOptions, SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TargetTransform, type TextAlongEffect, type TextEditDoubleClick, TextOverflow, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TransformFollower, type TweenPoseOptions, UNION_OF_CHILDREN, type UndeclaredMagnification, type UseAlignOptions, type UseAlignReturn, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, type UseMeasureToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseStickyToolOptions, type UseToolsOptions, VERSION, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, type VelocityTracker, type VersionCheck, type ViewAim, ViewAnimationOptions, type ViewAt, type ViewKitSettings, type ViewLike, ViewMarker, type ViewMarkerGrab, type ViewMarkerHost, type ViewMarkerProps, type ViewMarkerStyle, type ViewPoseAdapter, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRule, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenNode, type WrittenPoseTargetOptions, type ZigzagEffect, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, arrangePreset, assertSnapSourceIds, axisAlignedBounds, axisZoomFactor, bindPoseTransition, bindRig, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, carriedDescendants, checkRequirements, clampShapeGenerator, clampView, classifyPathStorage, clearSelectionAction, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, computeFitViewport, computeSliceOps, computeWheelAction, cond, containerScrollAction, contextMenuAction, contextMenuPreset, coreKitSettingsSchema, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepartures, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPenPreviewLayer, createPointerFollower, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSnapReadoutLayer, createTextLayer, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, currentMeasureId, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteSelectedMark, depOf, derivedDepOf, derivedPartsOf, derivedPose, describePresets, dispatchApplyBatch, distributePreset, documentDepOf, documentOf, documentPose, dragPanContribution, dragPointOf, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, duplicatePreset, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, enterTextEditAction, enumerateAnchors, escapePreset, findNodeShape, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitToBounds, fitViewToPage, fitZoom, flattenPreviews, flipAction, flipPreset, focused, forEachCoalesced, forgetTransform, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, glidesByDefault, grabViewMarker, groupNodeRouting, groupPreset, hasChildren, hasEditablePath, heldInFrame, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateView, isAnnotationLayer, isAnnotationNode, isAtom, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isRectAim, isShapeGenerator, joinPathsCommand, joinSelectedAnchors, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, livePathEdit, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePose, measuredSegmentCommands, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modeTriggers, modifierHeld, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextPageId, nodeAsShown, nodeGates, nodeOutline, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, onEmptyCanvas, opFactoryRegistry, openContextMenu, openFilePicker, or, outlinePreset, outlinesPreset, overChildren, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintWithAlpha, paintWithColor, parseDebugFlags, pathCommandsPreset, pathCopy, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathFromParts, pathNodesOf, pathOperationTags, pathOriginProjection, pathPoseDescriptor, pathSnapGlyph, pathSnapSource, pathfinderPreset, pathsPreset, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, pointRegionFrame, pointSnap, poseAxes, pressureToWidth, publishPreviews, rasterToPng, readEffectSource, rebuildOp, reconcileSpecs, recordTransform, rectAim, regenerateShape, registerNodeShape, registerOpFactory, registeredOpNames, registeredPathEffects, releaseCanvasRenderer, removePage, renamePage, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizePage, resizePreset, resolveBooleanOperands, resolveEditablePathOf, resolveOverlays, resolvePartPaint, resolvePreviews, resolveSpatialReference, resolveVisibility, resolvedSnapMarks, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePreset, rotationDegreesUnit, rotationHandle, rotationSnapSource, routeKind, satisfiesRange, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, screenToWorld, screenTolerance, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setPages, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, sliceAction, slotOf, snapMods, snapSourcesFor, solid, sourcesHiddenBy, sourcesOf, splitOverChildren, springPose, staggerSpringPose, startThresholdDrag, statedFields, stepAngles, storeEditablePath, strokeOf, strokeRegion, strokeWith, stylePreset, textAlongParts, tickedSegment, toHex8, transformPreset, translateRectPose, tweenPose, typeToolsPreset, undeclaredMagnifications, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasSize, useCreateOutlinesAdapter, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEyedropperTool, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useMeasureTool, useNodeOverlayFrame, useNotices, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, usePublishPointer, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, viewForAim, viewMarkerDragAction, viewPreset, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, warmRender, watchDevicePixelRatio, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zoomAt, zoomAtLeast };
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ import { COARSE_TARGET_SCALE, DEFAULT_DEVICE_PROFILE, resolveDeviceProfile } fro
34
34
  import { fitToBounds, fitZoom } from "./core/viewport/fitToBounds.js";
35
35
  import { adjacentPage, layoutPages, pageAt, pageHolding, pageName, pageOfBounds, pagesBounds } from "./core/pages/pages.js";
36
36
  import { pagesLayer } from "./core/pages/pagesLayer.js";
37
+ import { viewportWorldRect } from "./core/viewport/viewportWorldRect.js";
37
38
  import { fitViewToPage, pageInView } from "./core/pages/fitViewToPage.js";
38
39
  import { axisAlignedBounds, unionAABB, unionBounds } from "./core/geometry/unionBounds.js";
39
40
  import { RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, poseDescriptorForNode, translatePoseViaDescriptor, visualBoundsViaDescriptor } from "./core/geometry/poseDescriptor.js";
@@ -43,7 +44,6 @@ import { carriedDescendants, heldInFrame, sceneCarrySource } from "./core/scene/
43
44
  import { PAGES_DOC_KEY, addPage, movePage, nextPageId, pageMembers, pagesOf, placedPagesOf, removePage, renamePage, resizePage, setPages } from "./core/pages/pageEdits.js";
44
45
  import { axisZoomFactor, zoomAt } from "./core/viewport/zoomAt.js";
45
46
  import { clampView } from "./core/viewport/clampView.js";
46
- import { viewportWorldRect } from "./core/viewport/viewportWorldRect.js";
47
47
  import { sceneNodeClientRect } from "./core/viewport/sceneNodeClientRect.js";
48
48
  import { computeFitViewport, useAutoCenter } from "./core/viewport/useAutoCenter.js";
49
49
  import { WHEEL_ZOOM_STEP, computeWheelAction, wheelPan, wheelZoom, wheelZoomFactor } from "./core/viewport/wheelHandler.js";
@@ -97,7 +97,7 @@ import { SceneViewCanvas } from "./canvas/SceneViewCanvas.js";
97
97
  import { DrawCanvas } from "./canvas/DrawCanvas.js";
98
98
  import { FALLBACK_ACCENT, accentColorOf } from "./canvas/accentColor.js";
99
99
  import { gateLayer } from "./core/layers/gateLayer.js";
100
- import { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, clientToCanvas, createSimulation, meanScale, pxExtent, scaleDelta, screenAngleOf, standoff, useCanvasFocus, useSimulation, useVisibleRaf, withinPxBox, withinPxRadius } from "./barrel/viewport.js";
100
+ import { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, clientToCanvas, createSimulation, meanScale, pxExtent, scaleDelta, screenAngleOf, standoff, useCanvasFocus, useSimulation, useVisibleRaf, viewRectToScreen, viewScreenToWorld, viewWorldToScreen, withinPxBox, withinPxRadius } from "./barrel/viewport.js";
101
101
  import { forEachCoalesced, getStylusData, pressureToWidth } from "./core/stylus/stylus.js";
102
102
  import { usePointerStylus } from "./core/stylus/usePointerStylus.js";
103
103
  import { createKeyState } from "./input/keyState.js";
@@ -111,6 +111,7 @@ import { DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME } from "./debug/defaultTheme
111
111
  import { buildDebugOverlayCommands, createDebugOverlayLayer } from "./debug/createDebugOverlayLayer.js";
112
112
  import { debugSnapshotArgs, renderDebugSnapshot } from "./canvas/renderDebugSnapshot.js";
113
113
  import { rasterToPng } from "./canvas/rasterToPng.js";
114
+ import { usePublishPointer } from "./input/usePublishPointer.js";
114
115
  import { PointerProviderIfRoot } from "./canvas/SceneCanvas/PointerProviderIfRoot.js";
115
116
  import { ActionsProviderIfRoot } from "./canvas/SceneCanvas/ActionsProviderIfRoot.js";
116
117
  import { DepRegistryProviderIfRoot } from "./canvas/SceneCanvas/DepRegistryProviderIfRoot.js";
@@ -333,7 +334,7 @@ import { useNotices } from "./interactions/actions/useNotices.js";
333
334
  import { DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, MARKDOWN_RUN_GRAMMAR, QUAD_STRIDE, SCRIPT_METRICS, SMALL_CAPS_SCALE, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, clearRuns, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, dropRuns, effectiveRangeStyle, fitTextPose, fontString, halfLeadingFor, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, registerShaper, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveRunsInto, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from "./barrel/text.js";
334
335
  import { asPaint } from "./core/paint/paintKindEntry.js";
335
336
  import { useGradientKinds, usePaintKind, usePaintKinds } from "./core/usePaintKinds.js";
336
- import { BUILTIN_MARKERS, INHERIT, STROKE_DASH_RATIOS, TILE_KINDS, alignedStrokeRect, commandFill, commandPaint, commandStroke, composePatternTransform, contrastLineColor, contrastRatio, createTilePattern, dashForStrokeStyle, decomposePatternTransform, fillInPoseFrame, fillToBoundsFrame, getMarker, gradientForBounds, gradientGeometry, hexToRgbBytes, hexToRgba, isGradientPaint, isImagePatternPaint, isPaintKindKnown, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpFill, lerpPaint, lerpStroke, listMarkers, markerInset, markerKeyOf, markerRegistry, markerSites, normalizeHex, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, registerMarker, resolveColor, resolveFill, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveScreenLength, resolveStroke, resolveStrokeWidth, rgbaToHex, sampleGradientStops, scaleVertexWidth, strokeDashStyleOf, strokeInsets, tileSpecOf, trimPolyline, vertexHalfWidths, vertexWidthFromSides, warmPaintKinds, wcagLevels, widestHalfWidth, withGradientKind } from "./barrel/paint.js";
337
+ import { BUILTIN_MARKERS, INHERIT, STROKE_DASH_RATIOS, TILE_KINDS, alignedStrokeRect, commandFill, commandPaint, commandStroke, composePatternTransform, contrastLineColor, contrastRatio, createTilePattern, dashForStrokeStyle, decomposePatternTransform, fillInPoseFrame, fillToBoundsFrame, getMarker, gradientForBounds, gradientGeometry, hexToRgbBytes, hexToRgba, isGradientPaint, isImagePatternPaint, isPaintKindKnown, isPatternPaint, isSolidPaint, isTileKind, isTilePaint, lerpFill, lerpPaint, lerpStroke, listMarkers, luminanceContrast, markerInset, markerKeyOf, markerRegistry, markerSites, normalizeHex, parseColor, parseColorToRgba255, parseHexBytes, patternPlacementOf, registerMarker, relativeLuminance, resolveColor, resolveFill, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveScreenLength, resolveStroke, resolveStrokeWidth, rgbaToHex, sampleGradientStops, scaleVertexWidth, strokeDashStyleOf, strokeInsets, tileSpecOf, trimPolyline, vertexHalfWidths, vertexWidthFromSides, warmPaintKinds, wcagLevels, widestHalfWidth, withGradientKind } from "./barrel/paint.js";
337
338
  import { createSetTextOp } from "./core/ops/setText.js";
338
339
  import { createSetDependsOnOp } from "./core/ops/setDependsOn.js";
339
340
  import { createSetHiddenOp, createSetLockedOp } from "./core/ops/nodeFlags.js";
@@ -382,4 +383,4 @@ import { mergeContributions } from "./canvas/surfaceContribution.js";
382
383
  import { CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, KEYMAP_HOLD, SPRITE_STRIDE, assembleEntries, bakeCursor, bindingSpec, blur, canQueryLocalFonts, captureGesture, captureKey, createCursorSink, createKeymapStack, createPaintedCursorState, createReflectable, cssFamilyName, cssFontFamily, cssFontFamilyLoading, cullDrawCommands, cursorFor, describeKeymap, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, frameRect, hasFontOutlines, held, holdPreview, holdPreviewId, isCanvasFont, key, keySpecRoute, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, listFontOutlines, liveScope, loadFontOutlines, mat3, modeShortcutSpec, modeShortcuts, outlineStatus, refreshCanvasFont, registerCanvasFont, registerEffect, registerFont, registerFontOutlines, resolveCursor, resolveCursorTier, scopeBindings, subscribeGlyphReady, unbound, unregisterCanvasFont, unregisterFontOutlines, viewToMat3, vignette, warmFonts } from "./barrel/renderer.js";
383
384
  import { coreKitSettingsSchema } from "./kitSettingsSchema.js";
384
385
 
385
- export { ALWAYS, ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, ANGLE_RADIANS, AREA_SELECT_ID, AUTO_ORIGIN_PROJECTION, AUTO_POSE_DESCRIPTOR, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_MARKERS, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, CANVAS_CONTEXT_ATTRIBUTES, CLIP_NOTHING, COARSE_TARGET_SCALE, CONSTRAINT_TOLERANCE, CONTROL_SELECTOR, CORNER_ANCHORS, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, CURVE_REPS, CanvasView, CursorCoordsHud, DEBUG_FEATURES, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DECORATION_METRICS, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_LAYER_RETAIN, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DRAG_PAN_ID, DRAG_THRESHOLD_PX, DRAW_TOOLS, DepRegistryProvider, DepRegistryProviderIfRoot, DeviceProfileProvider, DevtoolsLabel, DrawCanvas, EASINGS, EDGE_HANDLE_MIN_RADII, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, GEOMETRY_BOUND_DATA, GHOST_STROKE, GROUP_ENTRY_ID, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, IDENTITY_POSE_COMPOSITION, IMPERIAL_INCHES, INHERIT, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, InputScope, KEYMAP_HOLD, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, LONG_PRESS_FEEDBACK_ID, LONG_PRESS_MS, LeanSceneCanvas, MARKDOWN_RUN_GRAMMAR, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, METRIC_MM, MIXED, MOVE_NODES_REQUIRES, NEVER, OVERLAY_ROLE_STROKES, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_C, PATH_CMD_LENGTHS, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_L, PATH_M, PATH_OVERLAY_ROLES, PATH_Q, PATH_SNAP_KINDS, PATH_SNAP_LABELS, PATH_Z, PIXELS, POLYGON_INSERT_PARAMS, PathBuilder, PickHud, PointerContextProvider, PointerProviderIfRoot, QUAD_STRIDE, RECT_ORIGIN_PROJECTION, RECT_POSE_COMPOSITION, RECT_POSE_DESCRIPTOR, RESIZE_HANDLE_ANCHORS, RIGID_POSE_COMPOSITION, ROTATED_POSE_DESCRIPTOR, ROTATION_HANDLE_BASE_PX, SCENE_CANVAS_FEATURES, SCENE_HISTORY_FORM, SCRIPT_METRICS, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SMALL_CAPS_SCALE, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, SPRING_PRESETS, SPRITE_STRIDE, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, STICKY_DEFAULTS, STROKE_DASH_RATIOS, SceneArrivalRefused, SceneCanvas, SceneViewCanvas, SelectionContextProvider, SelectionContextProviderIfRoot, TEXT_EDIT_FONT_HOLD, TILE_KINDS, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TextOutlinesError, UNION_OF_CHILDREN, VERSION, VIEW_ANIMATION_KEY, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, ViewMarker, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, WHEEL_ZOOM_STEP, WeaselProvider, Yoke, ZOOM_FLOOR, aabbCenter, accentColorOf, actionBindings, actionCursor, actionIs, actionItemTitle, actionItems, actionSettingsParams, actionShortcuts, actionsTagged, activatesFocusedControl, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, alignedStrokeRect, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyBooleanOp, applyCreateOutlines, applyOpsTo, applyOutlineStroke, applyStyleToRange, areaSelectAction, areaSelectContribution, arrangePreset, asNodeId, asPaint, asPolygonPath, assembleEntries, assertSnapSourceIds, averageAnchorsAt, axisAlignedBounds, axisUnits, axisZoomFactor, bakeCursor, bendAlongPath, bezierCubic, bezierQuadratic, bindPoseTransition, bindRig, bindingId, bindingSpec, bitmapSrc, blendPaths, blur, bodyPredicate, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, boundsOfPath, buildChromeCtx, buildDebugOverlayCommands, buildDepsFromRequires, buildRuleCtx, buildSceneViewCommands, buildWeaselClipboardText, cachedLayoutRuns, cachedPaintRuns, canBringForward, canHover, canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, captureGesture, captureKey, caretIndexAt, carriedDescendants, charOffsetToDomPosition, checkRequirements, childFrameAt, circlePath, clampShapeGenerator, clampView, classifyPathStorage, clearRuns, clearSelectionAction, clientToCanvas, clipNothing, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commandFill, commandPaint, commandStroke, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeChildFrame, composePath, composePatternTransform, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, composesFrames, computeFitViewport, computeSliceOps, computeWheelAction, cond, constrainPathEdit, constraintAnchors, containerScrollAction, contextMenuAction, contextMenuPreset, contrastLineColor, contrastRatio, coreKitSettingsSchema, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerPoint, cornerResizeHandles, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createCursorSink, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepRegistry, createDepartures, createDispatcher, createEnteredGroup, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createKeymapStack, createLongPressFeedbackContribution, createLongPressStore, createMarkdownRenderer, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPathOverlay, createPathSnapIndex, createPenPreviewLayer, createPointerFollower, createPointerStore, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflectable, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createScrollOffsets, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSimulation, createSnapOutcomeStore, createSnapReadoutLayer, createTextLayer, createTilePattern, createToolOptionValues, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, cssFamilyName, cssFontFamily, cssFontFamilyLoading, cubicBezierEasing, cullDrawCommands, currentMeasureId, cursorFor, cycleFill, dashForStrokeStyle, dataRestPath, debugSnapshotArgs, decomposePath, decomposePatternTransform, decomposeRectPose, decomposeRigidPose, decorationMetrics, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, defineTool, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteScratch, deleteSelectedMark, depOf, depsUnchanged, deriveParallaxView, derivedDepOf, derivedPartsOf, derivedPose, describeKeymap, describePresets, describeRule, dispatchApplyBatch, distributePreset, dlog, documentDepOf, documentOf, documentPose, domPositionToCharOffset, domToRuns, dragPanContribution, dragPointOf, drawLayers, drawOneLayer, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, dropRuns, duplicatePreset, dwarn, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, effectiveRangeStyle, ellipsePath, embedWeaselMetadataInSvg, enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, escapePreset, evaluate, evaluateActive, evaluateEnabled, extendToMeet, extractWeaselClipboardFromSvg, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findPathSnap, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitTextPose, fitToBounds, fitViewToBounds, fitViewToPage, fitZoom, fixedCornerOf, flattenCubic, flattenCubicWithArcLen, flattenPreviews, flattenQuadratic, flattenQuadraticWithArcLen, flipAction, flipPreset, focused, focusedControlOwnsKey, fontOutlineRegistry, fontRegistry, fontString, forEachCoalesced, forgetTransform, formatAxes, formatScoped, formatUnit, frameRect, fromPlane, fromRoot, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, glidesByDefault, grabViewMarker, gradientForBounds, gradientGeometry, groupNodeRouting, groupPreset, halfLeadingFor, handlePoint, hasChildren, hasCorners, hasEditablePath, hasFontOutlines, hasOpenSubpath, held, heldInFrame, heldKeySpec, hexToOklchDeg, hexToRgbBytes, hexToRgba, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, historyKey, hitAffordanceRegions, hitAnchor, hitCornerHandle, hitPredicate, hitRotationHandle, holdPreview, holdPreviewId, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, hslToSrgb, imageStatus, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inheritedPaintIn, inheritedPaintOf, inheritsPaint, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateSrgb, interpolateView, intersectSegments, isAnnotationLayer, isAnnotationNode, isAtom, isBoldWeight, isCanvasFont, isCornerHandle, isCornerShape, isDebugEnabled, isEditableTarget, isGradientPaint, isImagePatternPaint, isInControlWithin, isLayerPainted, isLayerVisible, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isPaintKindKnown, isPathLike, isPatternPaint, isPlainObject, isRectAim, isRectPose, isSerializedScene, isShapeGenerator, isSmallCapsLetter, isSolidPaint, isTextData, isTileKind, isTilePaint, isToolSet, isVectorImageSrc, joinAnchorsAt, joinPathsCommand, joinSelectedAnchors, key, keySpecRoute, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, kitTextHandler, lassoSelectAction, lastOperationOf, lastTransform, layoutMarkdown, layoutPages, layoutRuns, layoutTextPose, lengthenOpenEnd, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linePath, linear, linearSrgbToOklab, linearToSrgb, listFontOutlines, listGradientKinds, listMarkers, listPaintKinds, livePathEdit, liveScope, loadFontOutlines, loadTextOutlines, localizeInScene, localizeWorldPoses, locksInForce, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, markdownToRuns, markerInset, markerKeyOf, markerRegistry, markerSites, mat3, matchActionItem, matchesKeyBinding, meanScale, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePath, measurePose, measureText, measureTextBounds, measuredSegmentCommands, measuredWidth, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, minSizeOf, modeDecorationLayer, modeIn, modeIs, modeNot, modeShortcutSpec, modeShortcuts, modeTriggers, modifierHeld, modifierStateOf, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextCornerShape, nextPageId, nodeAsShown, nodeGates, nodeHasFlag, nodeKindOf, nodeOutline, normalizeHex, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, numericWeight, nurbs, offsetPath, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, onEmptyCanvas, opFactoryRegistry, openContextMenu, openEndRay, openFilePicker, openPathEnds, openPointerSession, or, outlinePreset, outlineStatus, outlinesPreset, overChildren, overlaysOf, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintKindOf, paintKindRegistry, paintRuns, paintWithAlpha, paintWithColor, paintedLayers, paintsLayer, paletteInsertPaint, paragraphDirection, parseColor, parseColorToRgba255, parseDebugFlags, parseHexBytes, parseUnitExpr, parseWeaselClipboardText, pastDragThreshold, patchRangeStyle, pathAnchorPoints, pathCommandCoordCount, pathCommandsPreset, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCopy, pathCrossings, pathDistanceToPoint, pathDivide, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathExclude, pathFromD, pathFromParts, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathNodesOf, pathOperationTags, pathOriginProjection, pathPaintOf, pathPoseDescriptor, pathSegments, pathSignedArea, pathSnapGlyph, pathSnapSource, pathSubtract, pathThroughPoseFrame, pathToAnchors, pathToD, pathUnion, pathfinderPreset, pathsPreset, patternFamily, patternPlacementOf, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, planeMap, planeMatrix, planeToPlane, pointAlongPath, pointInPath, pointInRotatedRect, pointInTextPose, pointRegionFrame, pointSnap, polygonFromPoints, polylineFromPoints, poseAxes, poseDescriptorForNode, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pressureToWidth, previewBooleanOp, publishPreviews, puckerBloatPath, pxExtent, rangeWeight, rasterToPng, readActionSettings, readEffectSource, rebaseLocalPose, rebuildOp, reconcileSpecs, recordTransform, rectAim, rectCorners, rectFromPlane, rectMarkerPath, rectPath, rectToPlane, refreshCanvasFont, refusalOf, regenerateShape, registerBidi, registerCanvasFont, registerContentHandler, registerEffect, registerFont, registerFontOutlines, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registerPaintKindLoader, registerShaper, registeredOpNames, registeredPathEffects, regularPolygonPath, releaseCanvasRenderer, releaseImage, remapPerAnchor, removePage, renamePage, renderDebugSnapshot, renderLabel, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, repeatAlongPath, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizeHandlesFor, resizePage, resizePreset, resolveAlign, resolveAxes, resolveBindingOverrides, resolveBooleanOperands, resolveColor, resolveCorners, resolveCornersWithSources, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveEditablePathOf, resolveFill, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolveParams, resolvePartPaint, resolvePatternSpec, resolvePreviews, resolveRunFace, resolveRuns, resolveRunsInto, resolveSchemaMenu, resolveScoped, resolveScreenLength, resolveSpatialReference, resolveStroke, resolveStrokeWidth, resolveTextStyle, resolveUnit, resolveUnitExpr, resolveVisibility, resolvedSnapMarks, retryImage, reversePath, rgbaToHex, rigFromNode, rigidRigApply, roleReader, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatePreset, rotatedRectCorners, rotationDegreesUnit, rotationHandle, rotationSnapSource, roughenPath, roundRectPath, routeKind, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, satisfiesRange, scaleDelta, scalePathToBounds, scaleVertexWidth, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, scopeBindings, scopesOf, scratchKey, screenAngleOf, screenToWorld, screenTolerance, scriptMetrics, scriptMetricsFor, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, scrolledFrames, seedTile, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setFlagOverRange, setImageCacheBudget, setPages, setScratch, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, simplifyAnchorsAt, simplifyPath, sliceAction, slotOf, smallCapsScale, smallCapsScaleFor, smallCapsText, smudgePath, snapMods, snapSourcesFor, sniffWeaselClipboardText, snipPathByPolyline, snipPathsAtCrossings, solid, solveConstraints, solvePathConstraints, sourcesHiddenBy, sourcesOf, specificity, specsFromSerialized, spiro, splitByClosure, splitOverChildren, splitPathByPolyline, splitPathBySegment, splitSubpaths, springPose, squarePath, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, stableStringify, staggerSpringPose, standoff, starPath, startCarry, startThresholdDrag, statedFields, stationsAlongPath, stepAngles, steppedOption, stickyData, stickyNodeFactory, storeEditablePath, strokeDashStyleOf, strokeInsets, strokeOf, strokeRegion, strokeToPath, strokeWith, styleAtRange, stylePreset, subscribeGlyphReady, subscribeImageReady, subscribeToSources, swapOp, switchGradientKind, taggedActionItems, textAlongParts, textBoxOf, textCommand, textCommandFromPose, textCommandFromRuns, textCommandFromRunsInto, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, tickedSegment, tileSpecOf, toHex8, toIconRef, toPlane, toRoot, toRuns, toolIdsOf, toolOptionParams, toolOptionSteps, toolSet, toolSetHas, transformPath, transformPreset, transformRunTexts, translatePath, translatePoseViaDescriptor, translateRectPose, trianglesToPath, trimPathAt, trimPolyline, tuneAction, tweenPose, typeToolsPreset, unboldPatch, unbound, undeclaredMagnifications, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, unionOfChildrenVia, unitScale, unplaceSkeleton, unregisterCanvasFont, unregisterFontOutlines, unsatisfiedConstraints, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasFocus, useCanvasSize, useClipboardOps, useCommand, useCreateOutlinesAdapter, useDecayLoop, useDepRegistry, useDepSource, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEnteredGroup, useEyedropperTool, useGestureDispatcher, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLastOperation, useLastOperationStore, useLatest, useLineTool, useMeasureTool, useMenuHost, useMenus, useNodeOverlayFrame, useNotices, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerContext, usePointerPosition, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, usePublishSelection, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextEdit, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, useYoke, vertexHalfWidths, vertexWidthFromSides, verticalAlignOffset, viewAxes, viewForAim, viewMarkerDragAction, viewPoseAdapter, viewPreset, viewToMat3, viewToTransform, viewToolsPreset, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, vignette, visualBoundsViaDescriptor, warmFonts, warmPaintKinds, warmRender, warnTextOutlines, warnUser, watchDevicePixelRatio, wcagLevels, wheelPan, wheelZoom, wheelZoomFactor, when, widestHalfWidth, withAlpha01, withCoord, withCorner, withGradientKind, withInheritedPaint, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withinPxBox, withinPxRadius, withoutCorners, withoutGeometryBoundData, withoutShapeGenerator, withoutTools, workspaceTintLayer, worldEditToStorage, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zigzagPath, zoomAt, zoomAtLeast };
386
+ export { ALWAYS, ANCHORS_TOOL_ID, ANCHOR_HIT_BASE_PX, ANCHOR_TOOLS, ANGLE_RADIANS, AREA_SELECT_ID, AUTO_ORIGIN_PROJECTION, AUTO_POSE_DESCRIPTOR, ActionDisabledReason, ActionsProvider, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, BASELINE_ACTIONS, BASELINE_ACTION_IDS, BOOLEAN_OF_CHILDREN, BUILTIN_MARKERS, BUILTIN_TOOLS, BUILTIN_TOOL_GROUPS, BUILTIN_TOOL_IDS, CANVAS_CONTEXT_ATTRIBUTES, CLIP_NOTHING, COARSE_TARGET_SCALE, CONSTRAINT_TOLERANCE, CONTROL_SELECTOR, CORNER_ANCHORS, CORNER_FIT_TOLERANCE, CORNER_KEYWORDS, CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, CURVE_REPS, CanvasView, CursorCoordsHud, DEBUG_FEATURES, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DECORATION_METRICS, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_LAYER_RETAIN, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_OVERLAY_STYLE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SIMPLIFY_TOLERANCE, DEFAULT_SNAP_PX, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DRAG_PAN_ID, DRAG_THRESHOLD_PX, DRAW_TOOLS, DepRegistryProvider, DepRegistryProviderIfRoot, DeviceProfileProvider, DevtoolsLabel, DrawCanvas, EASINGS, EDGE_HANDLE_MIN_RADII, FALLBACK_ACCENT, FEATURE_ACTION_IDS, FEATURE_PRESETS, GEOMETRY_BOUND_DATA, GHOST_STROKE, GROUP_ENTRY_ID, HANDLE_BASE_PX, HANDLE_LOCK_ROLES, IDENTITY_POSE_COMPOSITION, IMPERIAL_INCHES, INHERIT, INSERT_REPOSITION_BINDING, IconRegistryProvider, IconRegistryProviderIfRoot, InputScope, KEYMAP_HOLD, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, LONG_PRESS_FEEDBACK_ID, LONG_PRESS_MS, LeanSceneCanvas, MARKDOWN_RUN_GRAMMAR, MEASURE_ACTION_IDS, MEASURE_AFFORDANCE_KIND, MEASURE_LAYER_ID, METRIC_MM, MIXED, MOVE_NODES_REQUIRES, NEVER, OVERLAY_ROLE_STROKES, PAGES_DOC_KEY, PAGE_TOOLS, PAINTED_CURSOR_LAYER_ID, PATHFINDER_KEYMAP, PATHFINDER_KEYMAP_ID, PATHFINDER_LEADER, PATHFINDER_STROKES, PATH_ANCHOR_CHROME_ID, PATH_C, PATH_CMD_LENGTHS, PATH_EFFECT, PATH_EFFECT_DERIVATIONS, PATH_GESTURE_TAGS, PATH_L, PATH_M, PATH_OVERLAY_ROLES, PATH_Q, PATH_SNAP_KINDS, PATH_SNAP_LABELS, PATH_Z, PIXELS, POLYGON_INSERT_PARAMS, PathBuilder, PickHud, PointerContextProvider, PointerProviderIfRoot, QUAD_STRIDE, RECT_ORIGIN_PROJECTION, RECT_POSE_COMPOSITION, RECT_POSE_DESCRIPTOR, RESIZE_HANDLE_ANCHORS, RIGID_POSE_COMPOSITION, ROTATED_POSE_DESCRIPTOR, ROTATION_HANDLE_BASE_PX, SCENE_CANVAS_FEATURES, SCENE_HISTORY_FORM, SCRIPT_METRICS, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SELECT_TOOLS, SHAPE_COUNT_RANGE, SHAPE_KINDS, SHAPE_TOOLS, SMALL_CAPS_SCALE, SNAP_ANGLE_STEP, SNAP_AXIS_STEP, SNAP_ROLES, SPRING_PRESETS, SPRITE_STRIDE, STAR_INSERT_PARAMS, STAR_RATIO_RANGE, STICKY_DEFAULTS, STROKE_DASH_RATIOS, SceneArrivalRefused, SceneCanvas, SceneViewCanvas, SelectionContextProvider, SelectionContextProviderIfRoot, TEXT_EDIT_FONT_HOLD, TILE_KINDS, TOOL_DRIVEN_ACTION_IDS, TOOL_GROUP_ORDER, TYPE_TOOLS, TextOutlinesError, UNION_OF_CHILDREN, VERSION, VIEW_ANIMATION_KEY, VIEW_MARKER_DEFAULT_STYLE, VIEW_MARKER_DRAG, VIEW_MARKER_HIT_SLOP_PX, VIEW_TOOLS, ViewMarker, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, WHEEL_ZOOM_STEP, WeaselProvider, Yoke, ZOOM_FLOOR, aabbCenter, accentColorOf, actionBindings, actionCursor, actionIs, actionItemTitle, actionItems, actionSettingsParams, actionShortcuts, actionsTagged, activatesFocusedControl, addPage, adjacentPage, aimSpace2d, alignDeltaFor, alignPreset, alignTargetBounds, alignedStrokeRect, always, anchorEditWouldChange, anchorKeysPreset, anchorsTool, and, animateLifecycle, animateOnSetPose, annotationLayerIds, annulusSemiAxes, applyBooleanOp, applyCreateOutlines, applyOpsTo, applyOutlineStroke, applyStyleToRange, areaSelectAction, areaSelectContribution, arrangePreset, asNodeId, asPaint, asPolygonPath, assembleEntries, assertSnapSourceIds, averageAnchorsAt, axisAlignedBounds, axisUnits, axisZoomFactor, bakeCursor, bendAlongPath, bezierCubic, bezierQuadratic, bindPoseTransition, bindRig, bindingId, bindingSpec, bitmapSrc, blendPaths, blur, bodyPredicate, booleanGroupFields, booleanGroupRouting, booleanOfChildren, booleanOpOf, boundsOfPath, buildChromeCtx, buildDebugOverlayCommands, buildDepsFromRequires, buildRuleCtx, buildSceneViewCommands, buildWeaselClipboardText, cachedLayoutRuns, cachedPaintRuns, canBringForward, canHover, canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, captureGesture, captureKey, caretIndexAt, carriedDescendants, charOffsetToDomPosition, checkRequirements, childFrameAt, circlePath, clampShapeGenerator, clampView, classifyPathStorage, clearRuns, clearSelectionAction, clientToCanvas, clipNothing, clipOutline, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, clipboardPreset, cloneAction, coarsePointer, commandFill, commandPaint, commandStroke, commitAnchorEdit, commitBooleanPieces, commitDeleteToScene, commitOps, composeAffordanceLayer, composeChildFrame, composePath, composePatternTransform, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, composesFrames, computeFitViewport, computeSliceOps, computeWheelAction, cond, constrainPathEdit, constraintAnchors, containerScrollAction, contextMenuAction, contextMenuPreset, contrastLineColor, contrastRatio, coreKitSettingsSchema, cornerAt, cornerFrameAt, cornerFrames, cornerKeywordOf, cornerPoint, cornerResizeHandles, cornerShapeK, cornerShapePieces, cornerSpecAt, countPathAnchors, createArrangeOp, createChildrenLayer, createCornerResizeAffordance, createCursorSink, createDebugOverlayLayer, createDebugSink, createDeleteAction, createDeleteOp, createDepRegistry, createDepartures, createDispatcher, createEnteredGroup, createEnteredGroupScope, createGroupEntryContribution, createHistory, createInsertOp, createKeyState, createKeymapStack, createLongPressFeedbackContribution, createLongPressStore, createMarkdownRenderer, createMeasurements, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathEffectDerivations, createPathLayer, createPathOverlay, createPathSnapIndex, createPenPreviewLayer, createPointerFollower, createPointerStore, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflectable, createReflowTransition, createReorderOp, createReparentOp, createResizeAction, createRotationAffordance, createScene, createScrollOffsets, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetDependsOnOp, createSetHiddenOp, createSetLayerOp, createSetLayoutOp, createSetLockedOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSimulation, createSnapOutcomeStore, createSnapReadoutLayer, createTextLayer, createTilePattern, createToolOptionValues, createTransformOp, createVelocityTracker, createViewMarkerContribution, createViewMarkerLayer, createViewResolver, createViewportLayer, createWrittenPoseTarget, cssFamilyName, cssFontFamily, cssFontFamilyLoading, cubicBezierEasing, cullDrawCommands, currentMeasureId, cursorFor, cycleFill, dashForStrokeStyle, dataRestPath, debugSnapshotArgs, decomposePath, decomposePatternTransform, decomposeRectPose, decomposeRigidPose, decorationMetrics, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, defineTool, definesFrame, deleteAction, deleteAnchorsAction, deleteNode, deletePreset, deleteScratch, deleteSelectedMark, depOf, depsUnchanged, deriveParallaxView, derivedDepOf, derivedPartsOf, derivedPose, describeKeymap, describePresets, describeRule, dispatchApplyBatch, distributePreset, dlog, documentDepOf, documentOf, documentPose, domPositionToCharOffset, domToRuns, dragPanContribution, dragPointOf, drawLayers, drawOneLayer, drawPreset, drawToolsPreset, drawnAABBOf, drawnBoundsOf, drawnBoundsScene, dropRuns, duplicatePreset, dwarn, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, editPreset, editTargetOf, editedPathSymmetries, editingAnchors, editingLayer, effectSourceFor, effectivePose, effectiveRangeStyle, ellipsePath, embedWeaselMetadataInSvg, enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, escapePreset, evaluate, evaluateActive, evaluateEnabled, extendToMeet, extractWeaselClipboardFromSvg, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findPathSnap, findShapeBounds, findShapeDrawnBounds, findShapeInk, findShapeSilhouette, finishPathEditFrame, fitTextPose, fitToBounds, fitViewToBounds, fitViewToPage, fitZoom, fixedCornerOf, flattenCubic, flattenCubicWithArcLen, flattenPreviews, flattenQuadratic, flattenQuadraticWithArcLen, flipAction, flipPreset, focused, focusedControlOwnsKey, fontOutlineRegistry, fontRegistry, fontString, forEachCoalesced, forgetTransform, formatAxes, formatScoped, formatUnit, frameRect, fromPlane, fromRoot, gateLayer, gatherSnapCandidates, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, glidesByDefault, grabViewMarker, gradientForBounds, gradientGeometry, groupNodeRouting, groupPreset, halfLeadingFor, handlePoint, hasChildren, hasCorners, hasEditablePath, hasFontOutlines, hasOpenSubpath, held, heldInFrame, heldKeySpec, hexToOklchDeg, hexToRgbBytes, hexToRgba, hiddenSourceDeleteOps, hiddenSourcesTakenWith, hidesSubtree, historyKey, hitAffordanceRegions, hitAnchor, hitCornerHandle, hitPredicate, hitRotationHandle, holdPreview, holdPreviewId, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, hslToSrgb, imageStatus, inPlane, inferredNodeProperties, inferredNodeRouting, ingestPreset, inheritedPaintIn, inheritedPaintOf, inheritsPaint, inkExtentsOf, insertAction, insertAt, insertLayer, insertParams, insertPreviewExtent, insertRepositionAction, interpolateSrgb, interpolateView, intersectSegments, isAnnotationLayer, isAnnotationNode, isAtom, isBoldWeight, isCanvasFont, isCornerHandle, isCornerShape, isDebugEnabled, isEditableTarget, isGradientPaint, isImagePatternPaint, isInControlWithin, isLayerPainted, isLayerVisible, isLeaf, isNodeHidden, isNodeLocked, isOverChildren, isPaintKindKnown, isPathLike, isPatternPaint, isPlainObject, isRectAim, isRectPose, isSerializedScene, isShapeGenerator, isSmallCapsLetter, isSolidPaint, isTextData, isTileKind, isTilePaint, isToolSet, isVectorImageSrc, joinAnchorsAt, joinPathsCommand, joinSelectedAnchors, key, keySpecRoute, keySpecShortcut, keymapContribution, keymapLeaderBindingId, keymapLeaderId, keymapShortcuts, keysHeld, kitTextHandler, lassoSelectAction, lastOperationOf, lastTransform, layoutMarkdown, layoutPages, layoutRuns, layoutTextPose, lengthenOpenEnd, lerpColorArray, lerpFill, lerpOklab, lerpOklch, lerpPaint, lerpStroke, linePath, linear, linearSrgbToOklab, linearToSrgb, listFontOutlines, listGradientKinds, listMarkers, listPaintKinds, livePathEdit, liveScope, loadFontOutlines, loadTextOutlines, localizeInScene, localizeWorldPoses, locksInForce, luminanceContrast, makeBooleanGroup, makeHandleCommand, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markUnder, markdownToRuns, markerInset, markerKeyOf, markerRegistry, markerSites, mat3, matchActionItem, matchesKeyBinding, meanScale, measureAt, measureBetween, measureEndSource, measureEndsOf, measureIds, measureNode, measurePath, measurePose, measureText, measureTextBounds, measuredSegmentCommands, measuredWidth, measurementOf, measurementsContribution, mergeAlphaFromPrev, mergeContributions, minSizeOf, modeDecorationLayer, modeIn, modeIs, modeNot, modeShortcutSpec, modeShortcuts, modeTriggers, modifierHeld, modifierStateOf, momentum, moveAction, moveNodes, moveNodesOps, movePage, movePreset, multiActive, nestedHitTester, never, nextCornerShape, nextPageId, nodeAsShown, nodeGates, nodeHasFlag, nodeKindOf, nodeOutline, normalizeHex, normalizeView, normalizeZoom, not, noteFontRead, nudgeAnchorsDownAction, nudgeAnchorsLeftAction, nudgeAnchorsRightAction, nudgeAnchorsUpAction, nudgePreset, numericWeight, nurbs, offsetPath, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, onEmptyCanvas, opFactoryRegistry, openContextMenu, openEndRay, openFilePicker, openPathEnds, openPointerSession, or, outlinePreset, outlineStatus, outlinesPreset, overChildren, overlaysOf, pageAt, pageHolding, pageInView, pageMembers, pageName, pageOfBounds, pageToolsPreset, pagesBounds, pagesLayer, pagesOf, paintAbove, paintAlpha, paintKindOf, paintKindRegistry, paintRuns, paintWithAlpha, paintWithColor, paintedLayers, paintsLayer, paletteInsertPaint, paragraphDirection, parseColor, parseColorToRgba255, parseDebugFlags, parseHexBytes, parseUnitExpr, parseWeaselClipboardText, pastDragThreshold, patchRangeStyle, pathAnchorPoints, pathCommandCoordCount, pathCommandsPreset, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCopy, pathCrossings, pathDistanceToPoint, pathDivide, pathEditPathOf, pathEditPreset, pathEditPreview, pathEffectNode, pathEffectOf, pathEffectParts, pathExclude, pathFromD, pathFromParts, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathNodesOf, pathOperationTags, pathOriginProjection, pathPaintOf, pathPoseDescriptor, pathSegments, pathSignedArea, pathSnapGlyph, pathSnapSource, pathSubtract, pathThroughPoseFrame, pathToAnchors, pathToD, pathUnion, pathfinderPreset, pathsPreset, patternFamily, patternPlacementOf, pickPreset, pickTopMostHit, pillCommands, pinchZoomAction, placeAction, placeSkeleton, placedPagesOf, planJoin, planPixelRender, planeMap, planeMatrix, planeToPlane, pointAlongPath, pointInPath, pointInRotatedRect, pointInTextPose, pointRegionFrame, pointSnap, polygonFromPoints, polylineFromPoints, poseAxes, poseDescriptorForNode, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, pressureToWidth, previewBooleanOp, publishPreviews, puckerBloatPath, pxExtent, rangeWeight, rasterToPng, readActionSettings, readEffectSource, rebaseLocalPose, rebuildOp, reconcileSpecs, recordTransform, rectAim, rectCorners, rectFromPlane, rectMarkerPath, rectPath, rectToPlane, refreshCanvasFont, refusalOf, regenerateShape, registerBidi, registerCanvasFont, registerContentHandler, registerEffect, registerFont, registerFontOutlines, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registerPaintKindLoader, registerShaper, registeredOpNames, registeredPathEffects, regularPolygonPath, relativeLuminance, releaseCanvasRenderer, releaseImage, remapPerAnchor, removePage, renamePage, renderDebugSnapshot, renderLabel, renderNeeds, renderSceneToCanvas, renderSceneToPixels, reorderPreset, repeatAlongPath, requiresAnchorSelection, reshapeOps, reshapeTo, resizeAction, resizeHandlesFor, resizePage, resizePreset, resolveAlign, resolveAxes, resolveBindingOverrides, resolveBooleanOperands, resolveColor, resolveCorners, resolveCornersWithSources, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveEditablePathOf, resolveFill, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolveParams, resolvePartPaint, resolvePatternSpec, resolvePreviews, resolveRunFace, resolveRuns, resolveRunsInto, resolveSchemaMenu, resolveScoped, resolveScreenLength, resolveSpatialReference, resolveStroke, resolveStrokeWidth, resolveTextStyle, resolveUnit, resolveUnitExpr, resolveVisibility, resolvedSnapMarks, retryImage, reversePath, rgbaToHex, rigFromNode, rigidRigApply, roleReader, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatePreset, rotatedRectCorners, rotationDegreesUnit, rotationHandle, rotationSnapSource, roughenPath, roundRectPath, routeKind, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, satisfiesRange, scaleDelta, scalePathToBounds, scaleVertexWidth, sceneBoxFrames, sceneCarrySource, sceneClipTargets, sceneDeclaredScopes, sceneFromJSON, sceneMagnification, sceneNodeClientRect, scenePoseAdapter, scenePoseFrame, scenePoseTarget, sceneSelectionStore, sceneSharedUnitScopes, sceneToAdapter, sceneUnitScopes, sceneViewPoseAdapter, scopeBindings, scopesOf, scratchKey, screenAngleOf, screenToWorld, screenTolerance, scriptMetrics, scriptMetricsFor, scrollRange, scrollRectPose, scrollRigidPose, scrollableAt, scrolledFrames, seedTile, segmentUnder, selectAllPreset, selectAnchorAction, selectFromLasso, selectPreset, selectToolsPreset, selectedPathNodes, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, setFlagOverRange, setImageCacheBudget, setPages, setScratch, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, shapeToolsPreset, simplifyAnchorsAt, simplifyPath, sliceAction, slotOf, smallCapsScale, smallCapsScaleFor, smallCapsText, smudgePath, snapMods, snapSourcesFor, sniffWeaselClipboardText, snipPathByPolyline, snipPathsAtCrossings, solid, solveConstraints, solvePathConstraints, sourcesHiddenBy, sourcesOf, specificity, specsFromSerialized, spiro, splitByClosure, splitOverChildren, splitPathByPolyline, splitPathBySegment, splitSubpaths, springPose, squarePath, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, stableStringify, staggerSpringPose, standoff, starPath, startCarry, startThresholdDrag, statedFields, stationsAlongPath, stepAngles, steppedOption, stickyData, stickyNodeFactory, storeEditablePath, strokeDashStyleOf, strokeInsets, strokeOf, strokeRegion, strokeToPath, strokeWith, styleAtRange, stylePreset, subscribeGlyphReady, subscribeImageReady, subscribeToSources, swapOp, switchGradientKind, taggedActionItems, textAlongParts, textBoxOf, textCommand, textCommandFromPose, textCommandFromRuns, textCommandFromRunsInto, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, tickedSegment, tileSpecOf, toHex8, toIconRef, toPlane, toRoot, toRuns, toolIdsOf, toolOptionParams, toolOptionSteps, toolSet, toolSetHas, transformPath, transformPreset, transformRunTexts, translatePath, translatePoseViaDescriptor, translateRectPose, trianglesToPath, trimPathAt, trimPolyline, tuneAction, tweenPose, typeToolsPreset, unboldPatch, unbound, undeclaredMagnifications, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, unionOfChildrenVia, unitScale, unplaceSkeleton, unregisterCanvasFont, unregisterFontOutlines, unsatisfiedConstraints, useAction, useActionsRegistry, useActiveToolContext, useAlign, useAnchorFields, useAnimatedReflow, useAutoCenter, useBooleans, useBooleansAdapter, useBooleansAdapterSource, useCanvasFocus, useCanvasSize, useClipboardOps, useCommand, useCreateOutlinesAdapter, useDecayLoop, useDepRegistry, useDepSource, useDeviceProfile, useDevtoolsLabel, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEffectSourcesLayer, useElementSize, useEllipseTool, useEnteredGroup, useEyedropperTool, useGestureDispatcher, useGradientKinds, useGroupEntryContribution, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useIconGlyph, useIconRegistry, useIconVariant, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLastOperation, useLastOperationStore, useLatest, useLineTool, useMeasureTool, useMenuHost, useMenus, useNodeOverlayFrame, useNotices, useOngoingAction, useOpenKeymap, useOptionalActiveToolContext, useOptionalDepRegistry, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerContext, usePointerPosition, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, usePoseTransition, usePublishPointer, usePublishSelection, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useSliceDepSource, useSliceTool, useSnapSource, useStandardActions, useStarTool, useStickyTool, useTextEdit, useTextTool, useToolOptionTunings, useToolOptionValues, useTools, useTransformFollower, useVelocityTracker, useViewAnimation, useViewAnimationOn, useVisibleRaf, useYoke, vertexHalfWidths, vertexWidthFromSides, verticalAlignOffset, viewAxes, viewForAim, viewMarkerDragAction, viewPoseAdapter, viewPreset, viewRectToScreen, viewScreenToWorld, viewToMat3, viewToTransform, viewToolsPreset, viewWorldToScreen, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportWorldRect, viewportZoomAction, vignette, visualBoundsViaDescriptor, warmFonts, warmPaintKinds, warmRender, warnTextOutlines, warnUser, watchDevicePixelRatio, wcagLevels, wheelPan, wheelZoom, wheelZoomFactor, when, widestHalfWidth, withAlpha01, withCoord, withCorner, withGradientKind, withInheritedPaint, withInheritedPaintBounds, withInheritedPaints, withPath, withPathEffectsRegistry, withinPxBox, withinPxRadius, withoutCorners, withoutGeometryBoundData, withoutShapeGenerator, withoutTools, workspaceTintLayer, worldEditToStorage, worldPoseLookup, worldPosesOf, worldToScreen, writtenBy, zigzagPath, zoomAt, zoomAtLeast };
@@ -0,0 +1,59 @@
1
+ import { useEffect } from "react";
2
+ import { useLatest } from "@weasel-js/react";
3
+ import { heldPointers } from "@weasel-js/gestures";
4
+ import { usePointerContext } from "@weasel-js/routing/react";
5
+
6
+ // src/input/usePublishPointer.ts
7
+ /**
8
+ * Publishes the pointer over `elementRef` into the pointer store in scope, as
9
+ * `locate` places it. A pointer pressed on the element keeps publishing once
10
+ * it leaves, so a drag that runs off the edge still reports where it is; a
11
+ * pointer that leaves with nothing held clears the store, unless another view
12
+ * has published since. No-op with no provider in scope.
13
+ *
14
+ * `locate` is read on each event, so it need not be stable.
15
+ */
16
+ function usePublishPointer(elementRef, locate) {
17
+ const store = usePointerContext();
18
+ const locateRef = useLatest(locate);
19
+ useEffect(() => {
20
+ const el = elementRef.current;
21
+ if (!el || !store) return;
22
+ let viewId = null;
23
+ const publish = (e) => {
24
+ const at = locateRef.current(e.pointerId, e.clientX, e.clientY);
25
+ if (!at) return;
26
+ viewId = at.viewId;
27
+ store.set(at);
28
+ };
29
+ const held = heldPointers(el);
30
+ const onLeave = (e) => {
31
+ if (held.count() > 0) {
32
+ publish(e);
33
+ return;
34
+ }
35
+ const now = store.get();
36
+ if (now && now.viewId === viewId) store.set(null);
37
+ };
38
+ const onDocMove = (e) => {
39
+ if (held.count() === 0 || el.contains(e.target)) return;
40
+ publish(e);
41
+ };
42
+ el.addEventListener("pointermove", publish);
43
+ el.addEventListener("pointerleave", onLeave);
44
+ document.addEventListener("pointermove", onDocMove);
45
+ return () => {
46
+ el.removeEventListener("pointermove", publish);
47
+ el.removeEventListener("pointerleave", onLeave);
48
+ document.removeEventListener("pointermove", onDocMove);
49
+ held.release();
50
+ };
51
+ }, [
52
+ elementRef,
53
+ store,
54
+ locateRef
55
+ ]);
56
+ }
57
+
58
+ export { usePublishPointer };
59
+ //# sourceMappingURL=usePublishPointer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePublishPointer.js","names":[],"sources":["../../src/input/usePublishPointer.ts"],"sourcesContent":["import { useEffect, type RefObject } from 'react';\nimport { heldPointers } from '@weasel-js/gestures';\nimport { useLatest } from '@weasel-js/react';\nimport { usePointerContext, type PointerWorldPos } from '@weasel-js/routing/react';\n\n/** Where a client point is in the world and which view it is over, or `null`\n * when there is no answer yet (the surface has not mounted its camera). */\nexport type LocatePointer = (\n pointerId: number,\n clientX: number,\n clientY: number,\n) => NonNullable<PointerWorldPos> | null;\n\n/**\n * Publishes the pointer over `elementRef` into the pointer store in scope, as\n * `locate` places it. A pointer pressed on the element keeps publishing once\n * it leaves, so a drag that runs off the edge still reports where it is; a\n * pointer that leaves with nothing held clears the store, unless another view\n * has published since. No-op with no provider in scope.\n *\n * `locate` is read on each event, so it need not be stable.\n */\nexport function usePublishPointer(\n elementRef: RefObject<HTMLElement | null>,\n locate: LocatePointer,\n): void {\n const store = usePointerContext();\n const locateRef = useLatest(locate);\n useEffect(() => {\n const el = elementRef.current;\n if (!el || !store) return;\n let viewId: string | null = null;\n const publish = (e: PointerEvent): void => {\n const at = locateRef.current(e.pointerId, e.clientX, e.clientY);\n if (!at) return;\n viewId = at.viewId;\n store.set(at);\n };\n const held = heldPointers(el);\n const onLeave = (e: PointerEvent): void => {\n if (held.count() > 0) {\n publish(e);\n return;\n }\n const now = store.get();\n if (now && now.viewId === viewId) store.set(null);\n };\n // The element's own listener has the moves that still target it.\n const onDocMove = (e: PointerEvent): void => {\n if (held.count() === 0 || el.contains(e.target as Node | null)) return;\n publish(e);\n };\n el.addEventListener('pointermove', publish);\n el.addEventListener('pointerleave', onLeave);\n document.addEventListener('pointermove', onDocMove);\n return () => {\n el.removeEventListener('pointermove', publish);\n el.removeEventListener('pointerleave', onLeave);\n document.removeEventListener('pointermove', onDocMove);\n held.release();\n };\n }, [elementRef, store, locateRef]);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgB,kBACd,YACA,QACM;CACN,MAAM,QAAQ,kBAAkB;CAChC,MAAM,YAAY,UAAU,MAAM;CAClC,gBAAgB;EACd,MAAM,KAAK,WAAW;EACtB,IAAI,CAAC,MAAM,CAAC,OAAO;EACnB,IAAI,SAAwB;EAC5B,MAAM,WAAW,MAA0B;GACzC,MAAM,KAAK,UAAU,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO;GAC9D,IAAI,CAAC,IAAI;GACT,SAAS,GAAG;GACZ,MAAM,IAAI,EAAE;EACd;EACA,MAAM,OAAO,aAAa,EAAE;EAC5B,MAAM,WAAW,MAA0B;GACzC,IAAI,KAAK,MAAM,IAAI,GAAG;IACpB,QAAQ,CAAC;IACT;GACF;GACA,MAAM,MAAM,MAAM,IAAI;GACtB,IAAI,OAAO,IAAI,WAAW,QAAQ,MAAM,IAAI,IAAI;EAClD;EAEA,MAAM,aAAa,MAA0B;GAC3C,IAAI,KAAK,MAAM,MAAM,KAAK,GAAG,SAAS,EAAE,MAAqB,GAAG;GAChE,QAAQ,CAAC;EACX;EACA,GAAG,iBAAiB,eAAe,OAAO;EAC1C,GAAG,iBAAiB,gBAAgB,OAAO;EAC3C,SAAS,iBAAiB,eAAe,SAAS;EAClD,aAAa;GACX,GAAG,oBAAoB,eAAe,OAAO;GAC7C,GAAG,oBAAoB,gBAAgB,OAAO;GAC9C,SAAS,oBAAoB,eAAe,SAAS;GACrD,KAAK,QAAQ;EACf;CACF,GAAG;EAAC;EAAY;EAAO;CAAS,CAAC;AACnC"}
@@ -5,9 +5,16 @@ import { nodeGates } from "../../../core/scene/nodeGates.js";
5
5
  import { scenePoseAdapter, sceneViewPoseAdapter } from "../../../core/scene/scenePoseAdapter.js";
6
6
  import { wheelPan } from "../../../core/viewport/wheelHandler.js";
7
7
  import { poseDescriptorOf } from "../poseDescriptorDep.js";
8
+ import { clamp } from "@weasel-js/geom";
8
9
 
9
10
  // src/interactions/actions/defaults/containerScroll.ts
10
11
  /**
12
+ * Wheel scrolling of a layout container whose content runs past its bounds,
13
+ * such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`
14
+ * says how far; the offset goes to `scene.scroll`, which moves what the view
15
+ * shows and leaves the document where it is.
16
+ */
17
+ /**
11
18
  * How far `id`'s content can scroll: the span its layout's `contentExtent`
12
19
  * reaches past its bounds, read through the document fold the layout pass
13
20
  * arranges it in. Measured in the container's own frame, the axes a scroll
@@ -88,7 +95,6 @@ function scrollablesAt(scene, at, descriptor) {
88
95
  function scrollableAt(scene, at, descriptor) {
89
96
  return scrollablesAt(scene, at, descriptor)[0] ?? null;
90
97
  }
91
- var clamp = (v, [lo, hi]) => Math.min(hi, Math.max(lo, v));
92
98
  function sceneOf(deps) {
93
99
  return deps?.scene;
94
100
  }
@@ -153,8 +159,8 @@ var containerScrollAction = {
153
159
  y: 0
154
160
  };
155
161
  const to = {
156
- x: clamp(from.x + by.x, hit.range.x),
157
- y: clamp(from.y + by.y, hit.range.y)
162
+ x: clamp(from.x + by.x, ...hit.range.x),
163
+ y: clamp(from.y + by.y, ...hit.range.y)
158
164
  };
159
165
  if (to.x === from.x && to.y === from.y) continue;
160
166
  scene.scroll.set(hit.id, to);
@@ -1 +1 @@
1
- {"version":3,"file":"containerScroll.js","names":[],"sources":["../../../../src/interactions/actions/defaults/containerScroll.ts"],"sourcesContent":["/**\n * Wheel scrolling of a layout container whose content runs past its bounds,\n * such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`\n * says how far; the offset goes to `scene.scroll`, which moves what the view\n * shows and leaves the document where it is.\n */\nimport type { Action, ActionDeps } from '@weasel-js/routing';\nimport { poseDescriptorForNode, type PoseDescriptor } from 'core/geometry/poseDescriptor';\nimport { targetTransformOf, worldToLocal } from 'core/geometry/targetFrame';\nimport { composeWorldPose } from 'core/scene/composePose';\nimport { nodeGates } from 'core/scene/nodeGates';\nimport { scenePoseAdapter, sceneViewPoseAdapter } from 'core/scene/scenePoseAdapter';\nimport type { NodeId, Scene } from 'core/scene/types';\nimport { wheelPan } from 'core/viewport/wheelHandler';\nimport { poseDescriptorOf } from '../poseDescriptorDep';\nimport type { ImmediateParams } from '@weasel-js/routing';\n\ntype AnyScene = Scene<unknown, string, unknown>;\n\n/** How far a container's content can scroll on each axis, in its own units:\n * `[min, max]`, zero included, so an unscrolled container is in range. */\nexport interface ScrollRange {\n x: readonly [number, number];\n y: readonly [number, number];\n}\n\n/**\n * How far `id`'s content can scroll: the span its layout's `contentExtent`\n * reaches past its bounds, read through the document fold the layout pass\n * arranges it in. Measured in the container's own frame, the axes a scroll\n * offset runs along, so a turned container scrolls by its own length rather\n * than its box's. `null` for a node whose layout reports no extent, one whose\n * pose is not a frame, and under a composition that cannot scroll.\n */\nexport function scrollRange(scene: AnyScene, id: NodeId, descriptor: PoseDescriptor<unknown>): ScrollRange | null {\n const layout = scene.layoutOf(id);\n const node = scene.get(id);\n const { compose, decompose, scroll } = scene.composition;\n if (!layout?.contentExtent || !node || !scroll) return null;\n const doc = scenePoseAdapter(scene);\n if (doc.definesFrame?.(id) === false) return null;\n const world = composeWorldPose(doc, id, compose);\n const b = poseDescriptorForNode(descriptor, node).getBounds(decompose(world, world));\n const children = scene.childrenOf(id).map((cid) => ({\n id: cid as string,\n pose: decompose(world, composeWorldPose(doc, cid, compose)),\n }));\n const e = layout.contentExtent({ id: id as string, bounds: b }, children);\n return {\n x: [Math.min(0, e.x - b.x), Math.max(0, e.x + e.width - (b.x + b.width))],\n y: [Math.min(0, e.y - b.y), Math.max(0, e.y + e.height - (b.y + b.height))],\n };\n}\n\nconst canScroll = (r: ScrollRange): boolean => r.x[0] < r.x[1] || r.y[0] < r.y[1];\n\ninterface BoxLike { x: number; y: number; width: number; height: number }\nconst isBox = (p: unknown): p is BoxLike => {\n const b = p as Partial<BoxLike> | null;\n return typeof b?.x === 'number' && typeof b.y === 'number' && typeof b.width === 'number' && typeof b.height === 'number';\n};\n\n/** Whether the world point `at` falls on a container shown at `pose`, tested\n * in its own unturned box, so a turned container takes only its own area. */\nfunction shownAt(pose: unknown, at: { x: number; y: number }, bounds: () => BoxLike): boolean {\n const b = isBox(pose) ? pose : bounds();\n const p = isBox(pose) ? worldToLocal(targetTransformOf(pose), at.x, at.y) : at;\n return p !== null && p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height;\n}\n\ninterface Scrollable { id: NodeId; range: ScrollRange }\n\n/** The shown containers under the world point `at` whose content can scroll,\n * innermost first: the innermost one and each that holds it. */\nfunction scrollablesAt(scene: AnyScene, at: { x: number; y: number }, descriptor: PoseDescriptor<unknown>): Scrollable[] {\n const gates = nodeGates(scene);\n const view = sceneViewPoseAdapter(scene);\n const { compose } = scene.composition;\n const hits = new Map<NodeId, ScrollRange>();\n let innermost: NodeId | null = null;\n const visit = (ids: readonly NodeId[]): void => {\n for (const id of ids) {\n const node = scene.get(id);\n if (!node || gates.hidden(id)) continue;\n const range = scrollRange(scene, id, descriptor);\n if (range && canScroll(range)) {\n const pose = composeWorldPose(view, id, compose);\n if (shownAt(pose, at, () => poseDescriptorForNode(descriptor, node).getBounds(pose))) {\n hits.set(id, range);\n innermost = id;\n }\n }\n visit(scene.childrenOf(id));\n }\n };\n visit(scene.roots);\n const out: Scrollable[] = [];\n for (let id: NodeId | null = innermost; id !== null; id = scene.get(id)?.parent ?? null) {\n const range = hits.get(id);\n if (range) out.push({ id, range });\n }\n return out;\n}\n\n/** The innermost shown container under the world point `at` whose content\n * can scroll, with its range. */\nexport function scrollableAt(\n scene: AnyScene,\n at: { x: number; y: number },\n descriptor: PoseDescriptor<unknown>,\n): Scrollable | null {\n return scrollablesAt(scene, at, descriptor)[0] ?? null;\n}\n\nconst clamp = (v: number, [lo, hi]: readonly [number, number]): number => Math.min(hi, Math.max(lo, v));\n\nfunction sceneOf(deps: ActionDeps | undefined): AnyScene | undefined {\n return (deps as { scene?: AnyScene } | undefined)?.scene;\n}\n\n/**\n * Wheel over a container whose content runs past its bounds scrolls that\n * content along the container's own axes, clamped to the strategy's\n * `contentExtent`; Shift+wheel scrolls it across. A container already at the\n * end of its range in the wheel's direction hands the wheel to the scrollable\n * container holding it, and past the outermost one the action passes, so the\n * wheel pans the viewport. Anywhere else it declines.\n */\nexport const containerScrollAction: Action & { requires: string[] } = {\n id: 'container.scroll',\n label: 'Scroll container (wheel)',\n group: 'viewport',\n defaultBinding: [\n { spec: { kind: 'wheel' }, opts: { id: 'container.scroll.wheel', yields: true } },\n {\n spec: { kind: 'wheel', mods: { shift: true } },\n opts: { id: 'container.scroll.swapAxis', yields: true, params: { swapAxis: true } },\n },\n ],\n requires: ['scene', 'view', 'poseDescriptor'],\n enabled: (deps, at) => {\n const scene = sceneOf(deps);\n if (!scene || !at) return 'not-applicable';\n return scrollableAt(scene, at, poseDescriptorOf(deps?.poseDescriptor)) ? true : 'not-applicable';\n },\n invoker: {\n timing: 'immediate',\n run(deps, params) {\n const scene = sceneOf(deps);\n const view = deps.view?.get();\n const world = (params as ImmediateParams | undefined)?.world;\n if (!scene || !view || !world) return 'pass';\n const delta = { deltaX: (params?.deltaX as number | undefined) ?? 0, deltaY: (params?.deltaY as number | undefined) ?? 0 };\n // The pan's own conversion, from a view at the origin: how far the wheel moves in world units.\n const by = wheelPan({ x: 0, y: 0, scale: view.scale }, delta, { swapAxis: params?.swapAxis === true });\n for (const hit of scrollablesAt(scene, world, poseDescriptorOf(deps.poseDescriptor))) {\n const from = scene.scroll.get(hit.id) ?? { x: 0, y: 0 };\n const to = { x: clamp(from.x + by.x, hit.range.x), y: clamp(from.y + by.y, hit.range.y) };\n if (to.x === from.x && to.y === from.y) continue;\n scene.scroll.set(hit.id, to);\n return undefined;\n }\n return 'pass';\n },\n },\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"containerScroll.js","names":[],"sources":["../../../../src/interactions/actions/defaults/containerScroll.ts"],"sourcesContent":["/**\n * Wheel scrolling of a layout container whose content runs past its bounds,\n * such as `tileGrid({ overflow: 'scroll' })`. The strategy's `contentExtent`\n * says how far; the offset goes to `scene.scroll`, which moves what the view\n * shows and leaves the document where it is.\n */\nimport { clamp } from '@weasel-js/geom';\nimport type { Action, ActionDeps } from '@weasel-js/routing';\nimport { poseDescriptorForNode, type PoseDescriptor } from 'core/geometry/poseDescriptor';\nimport { targetTransformOf, worldToLocal } from 'core/geometry/targetFrame';\nimport { composeWorldPose } from 'core/scene/composePose';\nimport { nodeGates } from 'core/scene/nodeGates';\nimport { scenePoseAdapter, sceneViewPoseAdapter } from 'core/scene/scenePoseAdapter';\nimport type { NodeId, Scene } from 'core/scene/types';\nimport { wheelPan } from 'core/viewport/wheelHandler';\nimport { poseDescriptorOf } from '../poseDescriptorDep';\nimport type { ImmediateParams } from '@weasel-js/routing';\n\ntype AnyScene = Scene<unknown, string, unknown>;\n\n/** How far a container's content can scroll on each axis, in its own units:\n * `[min, max]`, zero included, so an unscrolled container is in range. */\nexport interface ScrollRange {\n x: readonly [number, number];\n y: readonly [number, number];\n}\n\n/**\n * How far `id`'s content can scroll: the span its layout's `contentExtent`\n * reaches past its bounds, read through the document fold the layout pass\n * arranges it in. Measured in the container's own frame, the axes a scroll\n * offset runs along, so a turned container scrolls by its own length rather\n * than its box's. `null` for a node whose layout reports no extent, one whose\n * pose is not a frame, and under a composition that cannot scroll.\n */\nexport function scrollRange(scene: AnyScene, id: NodeId, descriptor: PoseDescriptor<unknown>): ScrollRange | null {\n const layout = scene.layoutOf(id);\n const node = scene.get(id);\n const { compose, decompose, scroll } = scene.composition;\n if (!layout?.contentExtent || !node || !scroll) return null;\n const doc = scenePoseAdapter(scene);\n if (doc.definesFrame?.(id) === false) return null;\n const world = composeWorldPose(doc, id, compose);\n const b = poseDescriptorForNode(descriptor, node).getBounds(decompose(world, world));\n const children = scene.childrenOf(id).map((cid) => ({\n id: cid as string,\n pose: decompose(world, composeWorldPose(doc, cid, compose)),\n }));\n const e = layout.contentExtent({ id: id as string, bounds: b }, children);\n return {\n x: [Math.min(0, e.x - b.x), Math.max(0, e.x + e.width - (b.x + b.width))],\n y: [Math.min(0, e.y - b.y), Math.max(0, e.y + e.height - (b.y + b.height))],\n };\n}\n\nconst canScroll = (r: ScrollRange): boolean => r.x[0] < r.x[1] || r.y[0] < r.y[1];\n\ninterface BoxLike { x: number; y: number; width: number; height: number }\nconst isBox = (p: unknown): p is BoxLike => {\n const b = p as Partial<BoxLike> | null;\n return typeof b?.x === 'number' && typeof b.y === 'number' && typeof b.width === 'number' && typeof b.height === 'number';\n};\n\n/** Whether the world point `at` falls on a container shown at `pose`, tested\n * in its own unturned box, so a turned container takes only its own area. */\nfunction shownAt(pose: unknown, at: { x: number; y: number }, bounds: () => BoxLike): boolean {\n const b = isBox(pose) ? pose : bounds();\n const p = isBox(pose) ? worldToLocal(targetTransformOf(pose), at.x, at.y) : at;\n return p !== null && p.x >= b.x && p.x <= b.x + b.width && p.y >= b.y && p.y <= b.y + b.height;\n}\n\ninterface Scrollable { id: NodeId; range: ScrollRange }\n\n/** The shown containers under the world point `at` whose content can scroll,\n * innermost first: the innermost one and each that holds it. */\nfunction scrollablesAt(scene: AnyScene, at: { x: number; y: number }, descriptor: PoseDescriptor<unknown>): Scrollable[] {\n const gates = nodeGates(scene);\n const view = sceneViewPoseAdapter(scene);\n const { compose } = scene.composition;\n const hits = new Map<NodeId, ScrollRange>();\n let innermost: NodeId | null = null;\n const visit = (ids: readonly NodeId[]): void => {\n for (const id of ids) {\n const node = scene.get(id);\n if (!node || gates.hidden(id)) continue;\n const range = scrollRange(scene, id, descriptor);\n if (range && canScroll(range)) {\n const pose = composeWorldPose(view, id, compose);\n if (shownAt(pose, at, () => poseDescriptorForNode(descriptor, node).getBounds(pose))) {\n hits.set(id, range);\n innermost = id;\n }\n }\n visit(scene.childrenOf(id));\n }\n };\n visit(scene.roots);\n const out: Scrollable[] = [];\n for (let id: NodeId | null = innermost; id !== null; id = scene.get(id)?.parent ?? null) {\n const range = hits.get(id);\n if (range) out.push({ id, range });\n }\n return out;\n}\n\n/** The innermost shown container under the world point `at` whose content\n * can scroll, with its range. */\nexport function scrollableAt(\n scene: AnyScene,\n at: { x: number; y: number },\n descriptor: PoseDescriptor<unknown>,\n): Scrollable | null {\n return scrollablesAt(scene, at, descriptor)[0] ?? null;\n}\n\nfunction sceneOf(deps: ActionDeps | undefined): AnyScene | undefined {\n return (deps as { scene?: AnyScene } | undefined)?.scene;\n}\n\n/**\n * Wheel over a container whose content runs past its bounds scrolls that\n * content along the container's own axes, clamped to the strategy's\n * `contentExtent`; Shift+wheel scrolls it across. A container already at the\n * end of its range in the wheel's direction hands the wheel to the scrollable\n * container holding it, and past the outermost one the action passes, so the\n * wheel pans the viewport. Anywhere else it declines.\n */\nexport const containerScrollAction: Action & { requires: string[] } = {\n id: 'container.scroll',\n label: 'Scroll container (wheel)',\n group: 'viewport',\n defaultBinding: [\n { spec: { kind: 'wheel' }, opts: { id: 'container.scroll.wheel', yields: true } },\n {\n spec: { kind: 'wheel', mods: { shift: true } },\n opts: { id: 'container.scroll.swapAxis', yields: true, params: { swapAxis: true } },\n },\n ],\n requires: ['scene', 'view', 'poseDescriptor'],\n enabled: (deps, at) => {\n const scene = sceneOf(deps);\n if (!scene || !at) return 'not-applicable';\n return scrollableAt(scene, at, poseDescriptorOf(deps?.poseDescriptor)) ? true : 'not-applicable';\n },\n invoker: {\n timing: 'immediate',\n run(deps, params) {\n const scene = sceneOf(deps);\n const view = deps.view?.get();\n const world = (params as ImmediateParams | undefined)?.world;\n if (!scene || !view || !world) return 'pass';\n const delta = { deltaX: (params?.deltaX as number | undefined) ?? 0, deltaY: (params?.deltaY as number | undefined) ?? 0 };\n // The pan's own conversion, from a view at the origin: how far the wheel moves in world units.\n const by = wheelPan({ x: 0, y: 0, scale: view.scale }, delta, { swapAxis: params?.swapAxis === true });\n for (const hit of scrollablesAt(scene, world, poseDescriptorOf(deps.poseDescriptor))) {\n const from = scene.scroll.get(hit.id) ?? { x: 0, y: 0 };\n const to = { x: clamp(from.x + by.x, ...hit.range.x), y: clamp(from.y + by.y, ...hit.range.y) };\n if (to.x === from.x && to.y === from.y) continue;\n scene.scroll.set(hit.id, to);\n return undefined;\n }\n return 'pass';\n },\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,YAAY,OAAiB,IAAY,YAAyD;CAChH,MAAM,SAAS,MAAM,SAAS,EAAE;CAChC,MAAM,OAAO,MAAM,IAAI,EAAE;CACzB,MAAM,EAAE,SAAS,WAAW,WAAW,MAAM;CAC7C,IAAI,CAAC,QAAQ,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,OAAO;CACvD,MAAM,MAAM,iBAAiB,KAAK;CAClC,IAAI,IAAI,eAAe,EAAE,MAAM,OAAO,OAAO;CAC7C,MAAM,QAAQ,iBAAiB,KAAK,IAAI,OAAO;CAC/C,MAAM,IAAI,sBAAsB,YAAY,IAAI,CAAC,CAAC,UAAU,UAAU,OAAO,KAAK,CAAC;CACnF,MAAM,WAAW,MAAM,WAAW,EAAE,CAAC,CAAC,KAAK,SAAS;EAClD,IAAI;EACJ,MAAM,UAAU,OAAO,iBAAiB,KAAK,KAAK,OAAO,CAAC;CAC5D,EAAE;CACF,MAAM,IAAI,OAAO,cAAc;EAAM;EAAc,QAAQ;CAAE,GAAG,QAAQ;CACxE,OAAO;EACL,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC;EACxE,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC;CAC5E;AACF;AAEA,IAAM,aAAa,MAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE;AAG/E,IAAM,SAAS,MAA6B;CAC1C,MAAM,IAAI;CACV,OAAO,OAAO,GAAG,MAAM,YAAY,OAAO,EAAE,MAAM,YAAY,OAAO,EAAE,UAAU,YAAY,OAAO,EAAE,WAAW;AACnH;;;AAIA,SAAS,QAAQ,MAAe,IAA8B,QAAgC;CAC5F,MAAM,IAAI,MAAM,IAAI,IAAI,OAAO,OAAO;CACtC,MAAM,IAAI,MAAM,IAAI,IAAI,aAAa,kBAAkB,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI;CAC5E,OAAO,MAAM,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;AAC1F;;;AAMA,SAAS,cAAc,OAAiB,IAA8B,YAAmD;CACvH,MAAM,QAAQ,UAAU,KAAK;CAC7B,MAAM,OAAO,qBAAqB,KAAK;CACvC,MAAM,EAAE,YAAY,MAAM;CAC1B,MAAM,uBAAO,IAAI,IAAyB;CAC1C,IAAI,YAA2B;CAC/B,MAAM,SAAS,QAAiC;EAC9C,KAAK,MAAM,MAAM,KAAK;GACpB,MAAM,OAAO,MAAM,IAAI,EAAE;GACzB,IAAI,CAAC,QAAQ,MAAM,OAAO,EAAE,GAAG;GAC/B,MAAM,QAAQ,YAAY,OAAO,IAAI,UAAU;GAC/C,IAAI,SAAS,UAAU,KAAK,GAAG;IAC7B,MAAM,OAAO,iBAAiB,MAAM,IAAI,OAAO;IAC/C,IAAI,QAAQ,MAAM,UAAU,sBAAsB,YAAY,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,GAAG;KACpF,KAAK,IAAI,IAAI,KAAK;KAClB,YAAY;IACd;GACF;GACA,MAAM,MAAM,WAAW,EAAE,CAAC;EAC5B;CACF;CACA,MAAM,MAAM,KAAK;CACjB,MAAM,MAAoB,CAAC;CAC3B,KAAK,IAAI,KAAoB,WAAW,OAAO,MAAM,KAAK,MAAM,IAAI,EAAE,CAAC,EAAE,UAAU,MAAM;EACvF,MAAM,QAAQ,KAAK,IAAI,EAAE;EACzB,IAAI,OAAO,IAAI,KAAK;GAAE;GAAI;EAAM,CAAC;CACnC;CACA,OAAO;AACT;;;AAIA,SAAgB,aACd,OACA,IACA,YACmB;CACnB,OAAO,cAAc,OAAO,IAAI,UAAU,CAAC,CAAC,MAAM;AACpD;AAEA,SAAS,QAAQ,MAAoD;CACnE,OAAQ,MAA2C;AACrD;;;;;;;;;AAUA,IAAa,wBAAyD;CACpE,IAAI;CACJ,OAAO;CACP,OAAO;CACP,gBAAgB,CACd;EAAE,MAAM,EAAE,MAAM,QAAQ;EAAG,MAAM;GAAE,IAAI;GAA0B,QAAQ;EAAK;CAAE,GAChF;EACE,MAAM;GAAE,MAAM;GAAS,MAAM,EAAE,OAAO,KAAK;EAAE;EAC7C,MAAM;GAAE,IAAI;GAA6B,QAAQ;GAAM,QAAQ,EAAE,UAAU,KAAK;EAAE;CACpF,CACF;CACA,UAAU;EAAC;EAAS;EAAQ;CAAgB;CAC5C,UAAU,MAAM,OAAO;EACrB,MAAM,QAAQ,QAAQ,IAAI;EAC1B,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO;EAC1B,OAAO,aAAa,OAAO,IAAI,iBAAiB,MAAM,cAAc,CAAC,IAAI,OAAO;CAClF;CACA,SAAS;EACP,QAAQ;EACR,IAAI,MAAM,QAAQ;GAChB,MAAM,QAAQ,QAAQ,IAAI;GAC1B,MAAM,OAAO,KAAK,MAAM,IAAI;GAC5B,MAAM,QAAS,QAAwC;GACvD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,OAAO;GACtC,MAAM,QAAQ;IAAE,QAAS,QAAQ,UAAiC;IAAG,QAAS,QAAQ,UAAiC;GAAE;GAEzH,MAAM,KAAK,SAAS;IAAE,GAAG;IAAG,GAAG;IAAG,OAAO,KAAK;GAAM,GAAG,OAAO,EAAE,UAAU,QAAQ,aAAa,KAAK,CAAC;GACrG,KAAK,MAAM,OAAO,cAAc,OAAO,OAAO,iBAAiB,KAAK,cAAc,CAAC,GAAG;IACpF,MAAM,OAAO,MAAM,OAAO,IAAI,IAAI,EAAE,KAAK;KAAE,GAAG;KAAG,GAAG;IAAE;IACtD,MAAM,KAAK;KAAE,GAAG,MAAM,KAAK,IAAI,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC;KAAG,GAAG,MAAM,KAAK,IAAI,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC;IAAE;IAC9F,IAAI,GAAG,MAAM,KAAK,KAAK,GAAG,MAAM,KAAK,GAAG;IACxC,MAAM,OAAO,IAAI,IAAI,IAAI,EAAE;IAC3B;GACF;GACA,OAAO;EACT;CACF;AACF"}