@oh-just-another/state 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +60 -0
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/actions/actionClipboard.d.ts +6 -0
  6. package/dist/actions/actionClipboard.d.ts.map +1 -0
  7. package/dist/actions/actionClipboard.js +26 -0
  8. package/dist/actions/actionClipboard.js.map +1 -0
  9. package/dist/actions/actionGrouping.d.ts +5 -0
  10. package/dist/actions/actionGrouping.d.ts.map +1 -0
  11. package/dist/actions/actionGrouping.js +26 -0
  12. package/dist/actions/actionGrouping.js.map +1 -0
  13. package/dist/actions/actionHistory.d.ts +5 -0
  14. package/dist/actions/actionHistory.d.ts.map +1 -0
  15. package/dist/actions/actionHistory.js +25 -0
  16. package/dist/actions/actionHistory.js.map +1 -0
  17. package/dist/actions/actionKeyboard.d.ts +3 -0
  18. package/dist/actions/actionKeyboard.d.ts.map +1 -0
  19. package/dist/actions/actionKeyboard.js +130 -0
  20. package/dist/actions/actionKeyboard.js.map +1 -0
  21. package/dist/actions/actionLayout.d.ts +3 -0
  22. package/dist/actions/actionLayout.d.ts.map +1 -0
  23. package/dist/actions/actionLayout.js +65 -0
  24. package/dist/actions/actionLayout.js.map +1 -0
  25. package/dist/actions/actionMode.d.ts +13 -0
  26. package/dist/actions/actionMode.d.ts.map +1 -0
  27. package/dist/actions/actionMode.js +116 -0
  28. package/dist/actions/actionMode.js.map +1 -0
  29. package/dist/actions/actionSelection.d.ts +9 -0
  30. package/dist/actions/actionSelection.d.ts.map +1 -0
  31. package/dist/actions/actionSelection.js +57 -0
  32. package/dist/actions/actionSelection.js.map +1 -0
  33. package/dist/actions/actionView.d.ts +7 -0
  34. package/dist/actions/actionView.d.ts.map +1 -0
  35. package/dist/actions/actionView.js +14 -0
  36. package/dist/actions/actionView.js.map +1 -0
  37. package/dist/actions/actionZOrder.d.ts +7 -0
  38. package/dist/actions/actionZOrder.d.ts.map +1 -0
  39. package/dist/actions/actionZOrder.js +42 -0
  40. package/dist/actions/actionZOrder.js.map +1 -0
  41. package/dist/actions/actionZoom.d.ts +8 -0
  42. package/dist/actions/actionZoom.d.ts.map +1 -0
  43. package/dist/actions/actionZoom.js +61 -0
  44. package/dist/actions/actionZoom.js.map +1 -0
  45. package/dist/actions/index.d.ts +12 -0
  46. package/dist/actions/index.d.ts.map +1 -0
  47. package/dist/actions/index.js +11 -0
  48. package/dist/actions/index.js.map +1 -0
  49. package/dist/actions/registry.d.ts +68 -0
  50. package/dist/actions/registry.d.ts.map +1 -0
  51. package/dist/actions/registry.js +300 -0
  52. package/dist/actions/registry.js.map +1 -0
  53. package/dist/actions/types.d.ts +103 -0
  54. package/dist/actions/types.d.ts.map +1 -0
  55. package/dist/actions/types.js +10 -0
  56. package/dist/actions/types.js.map +1 -0
  57. package/dist/animation-tick.d.ts +28 -0
  58. package/dist/animation-tick.d.ts.map +1 -0
  59. package/dist/animation-tick.js +50 -0
  60. package/dist/animation-tick.js.map +1 -0
  61. package/dist/auto-compact.d.ts +27 -0
  62. package/dist/auto-compact.d.ts.map +1 -0
  63. package/dist/auto-compact.js +46 -0
  64. package/dist/auto-compact.js.map +1 -0
  65. package/dist/auto-layout-scheduler.d.ts +50 -0
  66. package/dist/auto-layout-scheduler.d.ts.map +1 -0
  67. package/dist/auto-layout-scheduler.js +94 -0
  68. package/dist/auto-layout-scheduler.js.map +1 -0
  69. package/dist/built-in-handlers.d.ts +24 -0
  70. package/dist/built-in-handlers.d.ts.map +1 -0
  71. package/dist/built-in-handlers.js +210 -0
  72. package/dist/built-in-handlers.js.map +1 -0
  73. package/dist/clipboard.d.ts +51 -0
  74. package/dist/clipboard.d.ts.map +1 -0
  75. package/dist/clipboard.js +105 -0
  76. package/dist/clipboard.js.map +1 -0
  77. package/dist/constants.d.ts +544 -0
  78. package/dist/constants.d.ts.map +1 -0
  79. package/dist/constants.js +537 -0
  80. package/dist/constants.js.map +1 -0
  81. package/dist/dom-events.d.ts +13 -0
  82. package/dist/dom-events.d.ts.map +1 -0
  83. package/dist/dom-events.js +70 -0
  84. package/dist/dom-events.js.map +1 -0
  85. package/dist/editor/anchor-points.d.ts +22 -0
  86. package/dist/editor/anchor-points.d.ts.map +1 -0
  87. package/dist/editor/anchor-points.js +28 -0
  88. package/dist/editor/anchor-points.js.map +1 -0
  89. package/dist/editor/applies/create.d.ts +60 -0
  90. package/dist/editor/applies/create.d.ts.map +1 -0
  91. package/dist/editor/applies/create.js +107 -0
  92. package/dist/editor/applies/create.js.map +1 -0
  93. package/dist/editor/applies/edge.d.ts +32 -0
  94. package/dist/editor/applies/edge.d.ts.map +1 -0
  95. package/dist/editor/applies/edge.js +44 -0
  96. package/dist/editor/applies/edge.js.map +1 -0
  97. package/dist/editor/applies/link-move.d.ts +53 -0
  98. package/dist/editor/applies/link-move.d.ts.map +1 -0
  99. package/dist/editor/applies/link-move.js +160 -0
  100. package/dist/editor/applies/link-move.js.map +1 -0
  101. package/dist/editor/applies/move.d.ts +38 -0
  102. package/dist/editor/applies/move.d.ts.map +1 -0
  103. package/dist/editor/applies/move.js +83 -0
  104. package/dist/editor/applies/move.js.map +1 -0
  105. package/dist/editor/applies/resize.d.ts +68 -0
  106. package/dist/editor/applies/resize.d.ts.map +1 -0
  107. package/dist/editor/applies/resize.js +199 -0
  108. package/dist/editor/applies/resize.js.map +1 -0
  109. package/dist/editor/applies/selection.d.ts +34 -0
  110. package/dist/editor/applies/selection.d.ts.map +1 -0
  111. package/dist/editor/applies/selection.js +65 -0
  112. package/dist/editor/applies/selection.js.map +1 -0
  113. package/dist/editor/applies/snap-grid.d.ts +45 -0
  114. package/dist/editor/applies/snap-grid.d.ts.map +1 -0
  115. package/dist/editor/applies/snap-grid.js +90 -0
  116. package/dist/editor/applies/snap-grid.js.map +1 -0
  117. package/dist/editor/container-ops.d.ts +74 -0
  118. package/dist/editor/container-ops.d.ts.map +1 -0
  119. package/dist/editor/container-ops.js +262 -0
  120. package/dist/editor/container-ops.js.map +1 -0
  121. package/dist/editor/event-fanout.d.ts +48 -0
  122. package/dist/editor/event-fanout.d.ts.map +1 -0
  123. package/dist/editor/event-fanout.js +53 -0
  124. package/dist/editor/event-fanout.js.map +1 -0
  125. package/dist/editor/gesture-tx.d.ts +77 -0
  126. package/dist/editor/gesture-tx.d.ts.map +1 -0
  127. package/dist/editor/gesture-tx.js +93 -0
  128. package/dist/editor/gesture-tx.js.map +1 -0
  129. package/dist/editor/hit-test.d.ts +178 -0
  130. package/dist/editor/hit-test.d.ts.map +1 -0
  131. package/dist/editor/hit-test.js +460 -0
  132. package/dist/editor/hit-test.js.map +1 -0
  133. package/dist/editor/long-press.d.ts +34 -0
  134. package/dist/editor/long-press.d.ts.map +1 -0
  135. package/dist/editor/long-press.js +58 -0
  136. package/dist/editor/long-press.js.map +1 -0
  137. package/dist/editor/pinch.d.ts +37 -0
  138. package/dist/editor/pinch.d.ts.map +1 -0
  139. package/dist/editor/pinch.js +90 -0
  140. package/dist/editor/pinch.js.map +1 -0
  141. package/dist/editor/pointer-binding.d.ts +18 -0
  142. package/dist/editor/pointer-binding.d.ts.map +1 -0
  143. package/dist/editor/pointer-binding.js +1087 -0
  144. package/dist/editor/pointer-binding.js.map +1 -0
  145. package/dist/editor/public/annotations.d.ts +54 -0
  146. package/dist/editor/public/annotations.d.ts.map +1 -0
  147. package/dist/editor/public/annotations.js +106 -0
  148. package/dist/editor/public/annotations.js.map +1 -0
  149. package/dist/editor/public/arrange-group.d.ts +81 -0
  150. package/dist/editor/public/arrange-group.d.ts.map +1 -0
  151. package/dist/editor/public/arrange-group.js +193 -0
  152. package/dist/editor/public/arrange-group.js.map +1 -0
  153. package/dist/editor/public/brush.d.ts +33 -0
  154. package/dist/editor/public/brush.d.ts.map +1 -0
  155. package/dist/editor/public/brush.js +54 -0
  156. package/dist/editor/public/brush.js.map +1 -0
  157. package/dist/editor/public/clipboard.d.ts +31 -0
  158. package/dist/editor/public/clipboard.d.ts.map +1 -0
  159. package/dist/editor/public/clipboard.js +35 -0
  160. package/dist/editor/public/clipboard.js.map +1 -0
  161. package/dist/editor/public/image-insert.d.ts +30 -0
  162. package/dist/editor/public/image-insert.d.ts.map +1 -0
  163. package/dist/editor/public/image-insert.js +57 -0
  164. package/dist/editor/public/image-insert.js.map +1 -0
  165. package/dist/editor/public/layers.d.ts +56 -0
  166. package/dist/editor/public/layers.d.ts.map +1 -0
  167. package/dist/editor/public/layers.js +104 -0
  168. package/dist/editor/public/layers.js.map +1 -0
  169. package/dist/editor/public/link.d.ts +25 -0
  170. package/dist/editor/public/link.d.ts.map +1 -0
  171. package/dist/editor/public/link.js +74 -0
  172. package/dist/editor/public/link.js.map +1 -0
  173. package/dist/editor/public/placement.d.ts +60 -0
  174. package/dist/editor/public/placement.d.ts.map +1 -0
  175. package/dist/editor/public/placement.js +111 -0
  176. package/dist/editor/public/placement.js.map +1 -0
  177. package/dist/editor/public/selection-ops.d.ts +78 -0
  178. package/dist/editor/public/selection-ops.d.ts.map +1 -0
  179. package/dist/editor/public/selection-ops.js +226 -0
  180. package/dist/editor/public/selection-ops.js.map +1 -0
  181. package/dist/editor/public/text-edit.d.ts +17 -0
  182. package/dist/editor/public/text-edit.d.ts.map +1 -0
  183. package/dist/editor/public/text-edit.js +28 -0
  184. package/dist/editor/public/text-edit.js.map +1 -0
  185. package/dist/editor/public/z-order.d.ts +47 -0
  186. package/dist/editor/public/z-order.d.ts.map +1 -0
  187. package/dist/editor/public/z-order.js +151 -0
  188. package/dist/editor/public/z-order.js.map +1 -0
  189. package/dist/editor/public/zoom-pan.d.ts +44 -0
  190. package/dist/editor/public/zoom-pan.d.ts.map +1 -0
  191. package/dist/editor/public/zoom-pan.js +116 -0
  192. package/dist/editor/public/zoom-pan.js.map +1 -0
  193. package/dist/editor/render-orchestrator.d.ts +11 -0
  194. package/dist/editor/render-orchestrator.d.ts.map +1 -0
  195. package/dist/editor/render-orchestrator.js +473 -0
  196. package/dist/editor/render-orchestrator.js.map +1 -0
  197. package/dist/editor/resize-helpers.d.ts +30 -0
  198. package/dist/editor/resize-helpers.d.ts.map +1 -0
  199. package/dist/editor/resize-helpers.js +121 -0
  200. package/dist/editor/resize-helpers.js.map +1 -0
  201. package/dist/editor/shape-filters.d.ts +11 -0
  202. package/dist/editor/shape-filters.d.ts.map +1 -0
  203. package/dist/editor/shape-filters.js +19 -0
  204. package/dist/editor/shape-filters.js.map +1 -0
  205. package/dist/editor/shape-traits.d.ts +16 -0
  206. package/dist/editor/shape-traits.d.ts.map +1 -0
  207. package/dist/editor/shape-traits.js +29 -0
  208. package/dist/editor/shape-traits.js.map +1 -0
  209. package/dist/editor/viewport-helpers.d.ts +24 -0
  210. package/dist/editor/viewport-helpers.d.ts.map +1 -0
  211. package/dist/editor/viewport-helpers.js +63 -0
  212. package/dist/editor/viewport-helpers.js.map +1 -0
  213. package/dist/editor-events.d.ts +33 -0
  214. package/dist/editor-events.d.ts.map +1 -0
  215. package/dist/editor-events.js +2 -0
  216. package/dist/editor-events.js.map +1 -0
  217. package/dist/editor.d.ts +1841 -0
  218. package/dist/editor.d.ts.map +1 -0
  219. package/dist/editor.js +4803 -0
  220. package/dist/editor.js.map +1 -0
  221. package/dist/file-drop.d.ts +99 -0
  222. package/dist/file-drop.d.ts.map +1 -0
  223. package/dist/file-drop.js +198 -0
  224. package/dist/file-drop.js.map +1 -0
  225. package/dist/frame-helpers.d.ts +30 -0
  226. package/dist/frame-helpers.d.ts.map +1 -0
  227. package/dist/frame-helpers.js +105 -0
  228. package/dist/frame-helpers.js.map +1 -0
  229. package/dist/group-helpers.d.ts +39 -0
  230. package/dist/group-helpers.d.ts.map +1 -0
  231. package/dist/group-helpers.js +116 -0
  232. package/dist/group-helpers.js.map +1 -0
  233. package/dist/handle.d.ts +73 -0
  234. package/dist/handle.d.ts.map +1 -0
  235. package/dist/handle.js +184 -0
  236. package/dist/handle.js.map +1 -0
  237. package/dist/index.d.ts +26 -0
  238. package/dist/index.d.ts.map +1 -0
  239. package/dist/index.js +16 -0
  240. package/dist/index.js.map +1 -0
  241. package/dist/interactive.d.ts +21 -0
  242. package/dist/interactive.d.ts.map +1 -0
  243. package/dist/interactive.js +11 -0
  244. package/dist/interactive.js.map +1 -0
  245. package/dist/link-selection.d.ts +21 -0
  246. package/dist/link-selection.d.ts.map +1 -0
  247. package/dist/link-selection.js +37 -0
  248. package/dist/link-selection.js.map +1 -0
  249. package/dist/machine.d.ts +322 -0
  250. package/dist/machine.d.ts.map +1 -0
  251. package/dist/machine.js +568 -0
  252. package/dist/machine.js.map +1 -0
  253. package/dist/modes.d.ts +24 -0
  254. package/dist/modes.d.ts.map +1 -0
  255. package/dist/modes.js +2 -0
  256. package/dist/modes.js.map +1 -0
  257. package/dist/overlay.d.ts +262 -0
  258. package/dist/overlay.d.ts.map +1 -0
  259. package/dist/overlay.js +673 -0
  260. package/dist/overlay.js.map +1 -0
  261. package/dist/platform.d.ts +70 -0
  262. package/dist/platform.d.ts.map +1 -0
  263. package/dist/platform.js +115 -0
  264. package/dist/platform.js.map +1 -0
  265. package/dist/selection.d.ts +18 -0
  266. package/dist/selection.d.ts.map +1 -0
  267. package/dist/selection.js +31 -0
  268. package/dist/selection.js.map +1 -0
  269. package/package.json +59 -0
@@ -0,0 +1,537 @@
1
+ /**
2
+ * World-unit distance below which a snap candidate is preferred over
3
+ * the raw cursor position. Smaller → snap feels less "grabby", larger
4
+ * → easier to land on a target but more disruptive drag micro-jumps.
5
+ * 12 px is the default for a 1:1 zoom; the engine internally scales
6
+ * by zoom so the effective screen distance stays roughly constant.
7
+ */
8
+ export const DEFAULT_SNAP_THRESHOLD = 12;
9
+ /**
10
+ * Routing of a newly created link. `"orthogonal"` (elbow) is the default —
11
+ * matches the flowchart-style connectors users expect. Set to `"straight"` or
12
+ * `"bezier"` to change the default for new links; the per-link toolbar can
13
+ * still switch any individual link afterwards.
14
+ */
15
+ export const DEFAULT_LINK_ROUTING = "orthogonal";
16
+ /** Arrowhead on the `to` end of a newly created link. */
17
+ export const DEFAULT_LINK_ARROWHEAD = "triangle";
18
+ /**
19
+ * Padding ratio added to the world-space viewport rect before passing
20
+ * it to `renderScene` for culling. 0.05 = 5% padding on each side —
21
+ * masks a one-frame pan so shapes near the edge do not flicker.
22
+ * Increase if hosts observe pop-in on fast pans; decrease to keep
23
+ * fewer off-screen shapes alive in the renderer pipeline.
24
+ */
25
+ export const VIEWPORT_CULL_PADDING_RATIO = 0.05;
26
+ /**
27
+ * Screen-pixel half-size of the visible resize-handle square. Handles
28
+ * are drawn `HANDLE_SIZE * 2` wide (5 → 10×10 px). Purely visual — the
29
+ * grab area is `HANDLE_HIT_SLOP`, decoupled from this. Reasonable
30
+ * range: 4–6 (smaller looks lighter; larger reads heavy).
31
+ */
32
+ export const HANDLE_SIZE = 5;
33
+ /**
34
+ * Screen-pixel offset between the handle's centre and the shape's bbox
35
+ * edge — pushes the handle just outside the body so its hit area never
36
+ * overlaps the shape interior, making corners grabbable without
37
+ * precision-pointing. Range: 2–4.
38
+ */
39
+ export const HANDLE_OUTSET = 3;
40
+ /**
41
+ * Screen-pixel hit-test half-size (mouse) for a resize handle —
42
+ * decoupled from the visual `HANDLE_SIZE`/`HANDLE_OUTSET` so the
43
+ * grab target can grow without enlarging the drawn square. 11 → a
44
+ * ~22 px clickable target around each handle centre. Touch hosts use
45
+ * the larger `TOUCH_HANDLE_HIT_SLOP`. Range: 8–14 (too large starts
46
+ * eating the body-move target on small shapes).
47
+ */
48
+ export const HANDLE_HIT_SLOP = 11;
49
+ /**
50
+ * Screen-pixel hit-test slop for grabbing an edge endpoint handle.
51
+ * Larger than `LINK_ENDPOINT_HANDLE_DRAW_RADIUS` so the handle is
52
+ * easier to grab on touch without enlarging the visual. Mouse default
53
+ * (touch uses `TOUCH_LINK_HANDLE_HIT_SLOP`). Range: 9–13.
54
+ */
55
+ export const LINK_ENDPOINT_HANDLE_RADIUS = 11;
56
+ /**
57
+ * Screen-pixel visual radius of the edge endpoint handle. Kept
58
+ * smaller than the hit radius so the dot does not obscure the path
59
+ * tangent it sits on.
60
+ */
61
+ export const LINK_ENDPOINT_HANDLE_DRAW_RADIUS = 6;
62
+ /**
63
+ * Screen-pixel visual radius of a segment-midpoint "add waypoint" handle
64
+ * on the selected link. Smaller than an endpoint/waypoint handle so the
65
+ * insert affordance reads as secondary. Range: 3–5.
66
+ */
67
+ export const LINK_MIDPOINT_HANDLE_DRAW_RADIUS = 4;
68
+ /**
69
+ * Screen-pixel radius within which releasing a dragged waypoint next to an
70
+ * adjacent path point collapses (removes) it — "drag onto the line to
71
+ * delete". Kept near the handle hit radius. Range: 8–16.
72
+ */
73
+ export const WAYPOINT_COLLAPSE_RADIUS = 12;
74
+ /**
75
+ * Upper bound on how many candidate obstacles the A*-based "route around
76
+ * shapes" command will consider. Above this the command bails (returns the
77
+ * link unchanged) rather than spending the A* cost. Range: 100–1000.
78
+ */
79
+ export const AUTO_ROUTE_MAX_OBSTACLES = 400;
80
+ /**
81
+ * Screen-pixel tolerance for edge hit-testing. Cursors within this
82
+ * distance of an edge polyline segment register a hit. Should stay
83
+ * larger than the typical stroke width but small enough that two
84
+ * close edges don't both register the same click. Mouse default
85
+ * (touch uses `TOUCH_LINK_HIT_THRESHOLD`). Range: 7–11.
86
+ */
87
+ export const LINK_HIT_THRESHOLD = 9;
88
+ /**
89
+ * How far (screen px) the selection halo peeks out beyond an object's
90
+ * VISIBLE outer edge — shared by elements and links. The halo is sized so
91
+ * it always shows exactly this much past the shape's contour + its border
92
+ * extent (which depends on stroke width and inside/center/outside
93
+ * alignment), at every zoom. Constant on screen regardless of border
94
+ * thickness. Range: 3–8.
95
+ */
96
+ export const SELECTION_HALO_PEEK_PX = 4;
97
+ /**
98
+ * Screen-pixel radius of the inactive port dot rendered on a hovered
99
+ * shape in draw-edge mode. `PORT_DOT_ACTIVE_RADIUS` is used for the
100
+ * snap target so the user sees which one will catch.
101
+ */
102
+ export const PORT_DOT_RADIUS = 3.5;
103
+ export const PORT_DOT_ACTIVE_RADIUS = 5;
104
+ /**
105
+ * Connection anchors.
106
+ *
107
+ * Two visual roles, shown at different times:
108
+ *
109
+ * - **link-start** anchors — shown when an element is SELECTED. The user
110
+ * drags from one to begin a link. Filled brand centre + neutral ring.
111
+ * - **link-attach** anchors — shown when the cursor HOVERS / nears an
112
+ * element (including while dragging a link). Where a link can land.
113
+ * The inverse fill/ring of link-start, so the two roles read
114
+ * differently at a glance.
115
+ *
116
+ * Radii are screen px (zoom-independent). Colours reuse the selection
117
+ * brand blue / handle white so anchors share the resize-handle visual
118
+ * language (they equal `DEFAULT_OVERLAY_STYLE.selectionStroke` / `.handleFill`).
119
+ */
120
+ export const ANCHOR_BRAND_COLOR = "#1a73e8";
121
+ export const ANCHOR_NEUTRAL_COLOR = "#fff";
122
+ /** Resting anchor-dot radius (screen px). */
123
+ export const ANCHOR_DOT_RADIUS = 3.5;
124
+ /** Highlighted radius for the hovered / snap-target anchor (screen px). */
125
+ export const ANCHOR_DOT_ACTIVE_RADIUS = 5;
126
+ /**
127
+ * Max radius (screen px) of the nearest link-start dot at closest cursor
128
+ * approach. The dot scales smoothly from {@link ANCHOR_DOT_RADIUS} up to this
129
+ * as the cursor enters {@link ANCHOR_DOT_HOVER_GROW_RADIUS} ("grows as you
130
+ * approach"), instead of a binary jump to the active radius.
131
+ */
132
+ export const ANCHOR_DOT_HOVER_MAX_RADIUS = 8;
133
+ /** Ring stroke width for anchor dots (screen px). Range: 1–2.5. */
134
+ export const ANCHOR_DOT_STROKE_WIDTH = 1.5;
135
+ /** link-start dot: filled brand centre, neutral (white) ring. */
136
+ export const LINK_START_ANCHOR_FILL = ANCHOR_BRAND_COLOR;
137
+ export const LINK_START_ANCHOR_STROKE = ANCHOR_NEUTRAL_COLOR;
138
+ /** link-attach dot: neutral (white) centre, brand ring — inverse of start. */
139
+ export const LINK_ATTACH_ANCHOR_FILL = ANCHOR_NEUTRAL_COLOR;
140
+ export const LINK_ATTACH_ANCHOR_STROKE = ANCHOR_BRAND_COLOR;
141
+ /**
142
+ * Screen-px distance each anchor dot is pushed OUTWARD from the element
143
+ * edge along its outward normal ("floating" ports). Two independent knobs
144
+ * because the roles want different offsets:
145
+ *
146
+ * - **link-start** sits off the edge so it reads as a separate grab
147
+ * affordance ("drag from here"), clear of the element's own border and
148
+ * resize handles. Range: 0–28.
149
+ * - **link-attach** stays ON (or barely off) the edge because it marks
150
+ * where the link will actually land — a large offset re-introduces the
151
+ * dot-vs-landing-point mismatch. Default 0 (exactly on the edge); bump
152
+ * only if dots are hard to see. Range: 0–8.
153
+ *
154
+ * Applied only to the discrete named / edge anchor dots; the free
155
+ * outline-attach point is never offset (it is the real landing point).
156
+ */
157
+ export const LINK_START_ANCHOR_OUTSET = 20;
158
+ export const LINK_ATTACH_ANCHOR_OUTSET = 0;
159
+ /**
160
+ * Default body fill for a freshly-created frame. Frames must have a
161
+ * background (no element is background-less); white reads on most canvases.
162
+ * Carried in `style.fill` at creation so the property panel shows it and it
163
+ * serialises; the renderer falls back to the same white if ever unset.
164
+ */
165
+ export const FRAME_DEFAULT_FILL = "#ffffff";
166
+ /**
167
+ * Screen-px slop ADDED to `ANCHOR_DOT_ACTIVE_RADIUS` when hit-testing a
168
+ * press against a link-start anchor dot — the "drag a link straight from
169
+ * the dot" gesture (no draw-edge tool needed). Mirrors `HANDLE_HIT_SLOP`
170
+ * for resize handles: lets the user grab the small dot without pixel-
171
+ * precision pointing. Grab radius = `ANCHOR_DOT_ACTIVE_RADIUS + this`,
172
+ * divided by zoom. Range: 3–10 (too large starts stealing the body-drag
173
+ * target near the element edge).
174
+ */
175
+ export const ANCHOR_START_HIT_SLOP = 6;
176
+ /**
177
+ * Narrow hit radius (screen px) for "clicked exactly ON a link-start dot"
178
+ * — distinct from the wider grab halo (`ANCHOR_DOT_ACTIVE_RADIUS +
179
+ * ANCHOR_START_HIT_SLOP`) that begins a drag/deselect. A non-dragging
180
+ * release within this radius of a dot means "create a new element + link";
181
+ * a release in the surrounding halo but outside this radius deselects. Kept
182
+ * ≤ the grab radius so the create zone sits inside it.
183
+ */
184
+ export const ANCHOR_DOT_CLICK_RADIUS = 7;
185
+ /**
186
+ * Screen-px proximity at which the nearest link-start dot is "grown"
187
+ * (rendered at `ANCHOR_DOT_ACTIVE_RADIUS` instead of the resting radius)
188
+ * as the cursor approaches it — the dot's affordance hint. Kept ≥
189
+ * the grab radius so the dot visibly grows slightly before it becomes
190
+ * grabbable. Range: 12–28.
191
+ */
192
+ export const ANCHOR_DOT_HOVER_GROW_RADIUS = 18;
193
+ /**
194
+ * World-px gap between a selected element and the new element created by
195
+ * clicking one of its link-start dots (click a dot → spawn a copy in that
196
+ * dot's direction, linked). Fixed, independent of element size.
197
+ */
198
+ export const ANCHOR_CLICK_NEW_ELEMENT_GAP = 40;
199
+ /**
200
+ * Debug hit-zone overlay (debug panel → Display → "Show hit-zones" /
201
+ * `?hitzones=1`). Visualises the mouse hit-targets so the values tuned in
202
+ * this layer can be eyeballed in the browser. `_FILL_OPACITY` keeps the
203
+ * translucent fill from hiding the geometry underneath; `_STROKE_OPACITY`
204
+ * outlines each zone. Pure debug — never drawn unless the flag is on.
205
+ *
206
+ * Shared opacities; per-category colours below so different hit-target kinds
207
+ * are visually distinguishable (point vs edge vs body vs container vs frame).
208
+ * Kept generic (`DEBUG_HIT_ZONE_FILL`/`STROKE`) as the alias for the
209
+ * resize-handle category and any uncoloured fallback.
210
+ */
211
+ export const DEBUG_HIT_ZONE_FILL = "#e8118c";
212
+ export const DEBUG_HIT_ZONE_STROKE = "#e8118c";
213
+ export const DEBUG_HIT_ZONE_FILL_OPACITY = 0.16;
214
+ export const DEBUG_HIT_ZONE_STROKE_OPACITY = 0.7;
215
+ /**
216
+ * Per-category debug hit-zone colours. One hue per hit-target kind so the
217
+ * overlay reads as a legend. Each colour is used for
218
+ * BOTH the translucent fill and the outline of its zones.
219
+ *
220
+ * - `_RESIZE` — resize-handle slop squares (magenta).
221
+ * - `_LINK_BODY` — link body select band (amber).
222
+ * - `_LINK_HANDLE` — selected link's endpoint / waypoint / segment handles (blue).
223
+ * - `_ANCHOR_START` — selected element's link-start dots (green).
224
+ * - `_ATTACH_POINT` — link-attach named/edge anchor catchments, L1/L2 (cyan).
225
+ * - `_ATTACH_EDGE` — link-attach outline band, L3 (purple).
226
+ * - `_ATTACH_BODY` — link-attach floating-on-body region, L4 (yellow).
227
+ * - `_FRAME` — frame membership zone, E1 (red).
228
+ * - `_CONTAINER` — container drop-zone, E2–E4 (teal).
229
+ */
230
+ export const DEBUG_ZONE_RESIZE = "#e8118c";
231
+ export const DEBUG_ZONE_LINK_BODY = "#f59e0b";
232
+ export const DEBUG_ZONE_LINK_HANDLE = "#2563eb";
233
+ export const DEBUG_ZONE_ANCHOR_START = "#16a34a";
234
+ export const DEBUG_ZONE_ATTACH_POINT = "#06b6d4";
235
+ export const DEBUG_ZONE_ATTACH_EDGE = "#a855f7";
236
+ export const DEBUG_ZONE_ATTACH_BODY = "#eab308";
237
+ export const DEBUG_ZONE_FRAME = "#dc2626";
238
+ export const DEBUG_ZONE_CONTAINER = "#14b8a6";
239
+ /** Annotation-pin grab radius (rose). Group-handle slop reuses `_RESIZE`. */
240
+ export const DEBUG_ZONE_ANNOTATION = "#f43f5e";
241
+ /**
242
+ * Visual sizes for the remote-peer cursor overlay.
243
+ *
244
+ * - `CURSOR_ARROW_SIZE` — pixel side length of the arrow glyph.
245
+ * - `CURSOR_NAME_CHIP_OFFSET` — pixel offset of the name chip from
246
+ * the arrow tip, both axes.
247
+ * - `CURSOR_NAME_CHIP_PADDING_X / Y` — inner padding of the chip.
248
+ * - `CURSOR_NAME_FONT_SIZE` — chip text font size.
249
+ */
250
+ export const CURSOR_ARROW_SIZE = 16;
251
+ export const CURSOR_NAME_CHIP_OFFSET = 14;
252
+ export const CURSOR_NAME_CHIP_PADDING_X = 6;
253
+ export const CURSOR_NAME_CHIP_PADDING_Y = 3;
254
+ export const CURSOR_NAME_FONT_SIZE = 11;
255
+ /**
256
+ * Peer selection halo — dashed outline drawn around each shape a peer
257
+ * has selected, in the peer's colour. `PEER_SELECTION_PADDING` insets
258
+ * the outline outward so it does not overlap own selection.
259
+ */
260
+ export const PEER_SELECTION_STROKE_WIDTH = 1.5;
261
+ export const PEER_SELECTION_DASH = [4, 3];
262
+ export const PEER_SELECTION_PADDING = 3;
263
+ /**
264
+ * Throttle for broadcasting local pointer position to peers. 30 fps
265
+ * matches the perceptual cap for cursor motion; lower values create
266
+ * more network chatter without UX benefit.
267
+ */
268
+ export const PEER_CURSOR_BROADCAST_INTERVAL_MS = 33;
269
+ /**
270
+ * Mouse-wheel handling.
271
+ *
272
+ * - `WHEEL_PAN_FACTOR` — how many world units (at zoom 1) to pan per
273
+ * wheel notch when the handler routes the wheel event to pan
274
+ * (trackpad two-finger swipe). 1 = native pixel; lower than 1
275
+ * makes the wheel feel sluggish on high-DPI mice.
276
+ * - `WHEEL_ZOOM_STEP` — multiplicative zoom factor used by the
277
+ * programmatic button-style zoom (`Editor.zoomIn` / `zoomOut`).
278
+ * `1.6 = +60% per call` — punchy single-step zoom.
279
+ * - `WHEEL_ZOOM_MAX_STEP` / `WHEEL_ZOOM_SPEED` — wheel-zoom
280
+ * normalisation (`packages/editor/.../normalizeWheel.ts`).
281
+ * Per event:
282
+ *
283
+ * delta = clamp(|deltaY|, WHEEL_ZOOM_MAX_STEP) * sign(deltaY)
284
+ * factor = 1 − (delta * WHEEL_ZOOM_SPEED) / 100
285
+ *
286
+ * The clamp tames mouse-wheel ratchets (Firefox / Chrome emit
287
+ * `|deltaY|` 53 / 100 per notch — uncapped that yields a near-10×
288
+ * jump). Trackpad pinches come through with small `|deltaY|`
289
+ * (2–5) and bypass the clamp, so they stay smooth and granular.
290
+ * Defaults: clamp at 10, speed 1 → ~10 % per mouse notch,
291
+ * ~2 % per pinch frame.
292
+ * - `MIN_ZOOM` / `MAX_ZOOM` — hard caps. Below MIN_ZOOM (very far
293
+ * out) culling/LOD save the frame; above MAX_ZOOM pixel-snapping
294
+ * artefacts appear.
295
+ *
296
+ * Device classification in the wheel handler is `deltaX`-based —
297
+ * mouse wheels never set deltaX, so any horizontal component routes
298
+ * to pan and pure-vertical routes to zoom. Pure-vertical trackpad
299
+ * swipes (rare) fall into zoom; users can pan via Space+drag or
300
+ * right-click drag if needed.
301
+ */
302
+ export const WHEEL_PAN_FACTOR = 1;
303
+ export const WHEEL_ZOOM_STEP = 1.6;
304
+ export const WHEEL_ZOOM_MAX_STEP = 10;
305
+ export const WHEEL_ZOOM_SPEED = 1;
306
+ export const MIN_ZOOM = 0.05;
307
+ export const MAX_ZOOM = 32;
308
+ /**
309
+ * Two-finger pinch / pan gesture.
310
+ *
311
+ * - `PINCH_MIN_MOVEMENT_PX` — ignore minor jitter while two fingers
312
+ * stay roughly still (e.g. user resting both fingers on screen).
313
+ * Below this displacement the gesture frame is a no-op.
314
+ */
315
+ export const PINCH_MIN_MOVEMENT_PX = 0.5;
316
+ /**
317
+ * Long-press → context menu. `LONG_PRESS_DELAY_MS` is the dwell time
318
+ * before a stationary press fires a `LONG_PRESS` emit; movement
319
+ * beyond `LONG_PRESS_MAX_MOVEMENT_PX` cancels it.
320
+ */
321
+ export const LONG_PRESS_DELAY_MS = 500;
322
+ export const LONG_PRESS_MAX_MOVEMENT_PX = 8;
323
+ /**
324
+ * Double-click recognition for group drill-down. A second pointer-up
325
+ * within `DOUBLE_CLICK_MS` of the previous AND landing within
326
+ * `DOUBLE_CLICK_TOLERANCE_PX` of the first point counts as a double-
327
+ * click. Matches OS-level double-click windows (Windows default
328
+ * 500 ms is too lenient for canvas; 300 ms feels snappier).
329
+ */
330
+ export const DOUBLE_CLICK_MS = 300;
331
+ export const DOUBLE_CLICK_TOLERANCE_PX = 8;
332
+ /**
333
+ * Multiplier applied to non-isolated shapes' globalAlpha when the
334
+ * editor is in "entered group" mode (isolation). Shapes inside the
335
+ * entered group stay at full alpha; everything outside fades to this
336
+ * value so the active group reads as the focal area without losing
337
+ * context. 0.6 keeps outsiders visible enough to be referenced; lower
338
+ * (~0.3) makes isolation visually louder but at the cost of obscuring
339
+ * context.
340
+ */
341
+ export const ISOLATION_DIM_OPACITY = 0.6;
342
+ /**
343
+ * Opacity of the WYSIWYG shape-draw preview (the live rect / ellipse drawn
344
+ * through its real renderer while dragging out a new shape). Slightly below
345
+ * 1 so the in-progress shape reads as "not committed yet" while still
346
+ * showing its true fill / stroke. Range: 0.7 (clearly tentative) – 1.0
347
+ * (indistinguishable from a committed shape).
348
+ */
349
+ export const DRAW_PREVIEW_OPACITY = 0.85;
350
+ /**
351
+ * Opacity of the click-create ghost preview (hovering a start dot): the
352
+ * faded would-be element + its connector, rendered through their real
353
+ * renderers. Lower than DRAW_PREVIEW_OPACITY because the ghost is purely
354
+ * speculative (a click away), not an in-progress gesture. Range: 0.3–0.5.
355
+ */
356
+ export const GHOST_PREVIEW_OPACITY = 0.4;
357
+ /**
358
+ * Touch hit-test slop. WCAG and Apple HIG ask for ≥ 44 pt touch
359
+ * targets; with `HANDLE_SIZE = 4` (8 px visual square) the visual
360
+ * stays small but the *hit area* enlarges so a finger can grab it.
361
+ *
362
+ * - `TOUCH_HANDLE_HIT_SLOP` — half-size of the resize-handle hit
363
+ * rectangle in screen pixels (44 pt ≈ 22 px half = 44 px target).
364
+ * - `TOUCH_LINK_HANDLE_HIT_SLOP` — same for edge-endpoint dots.
365
+ * - `TOUCH_LINK_HIT_THRESHOLD` — line-tolerance for tapping on an
366
+ * edge body.
367
+ */
368
+ export const TOUCH_HANDLE_HIT_SLOP = 22;
369
+ export const TOUCH_LINK_HANDLE_HIT_SLOP = 22;
370
+ export const TOUCH_LINK_HIT_THRESHOLD = 18;
371
+ /**
372
+ * Touch variants of the link-start anchor-dot hit zones (the dots that sit
373
+ * just outside a selected element's edges). Mouse uses the small
374
+ * {@link ANCHOR_START_HIT_SLOP} / {@link ANCHOR_DOT_CLICK_RADIUS}; on a
375
+ * coarse pointer these grow to a finger-friendly ~16 px so the grab (start a
376
+ * link drag) and click (create a linked element) zones are tappable. The
377
+ * drawn dot stays the same size — only the hit area enlarges.
378
+ */
379
+ export const TOUCH_ANCHOR_START_HIT_SLOP = 16;
380
+ export const TOUCH_ANCHOR_DOT_CLICK_RADIUS = 16;
381
+ /**
382
+ * Annotation pin visuals on the overlay.
383
+ *
384
+ * - `ANNOTATION_PIN_RADIUS` — screen-pixel radius of the circular pin
385
+ * marker. Same size regardless of zoom so the marker stays grabable
386
+ * at any scale.
387
+ * - `ANNOTATION_PIN_HIT_SLOP` — half-size of the hit rect used by
388
+ * `hitAnnotation`. Should be ≥ touch target (44 px) when running in
389
+ * touch mode; defaults give a comfortable mouse grab zone.
390
+ * - `ANNOTATION_PIN_FILL` / `STROKE` — colours when unselected.
391
+ * - `ANNOTATION_PIN_RESOLVED_FILL` — muted colour for resolved threads
392
+ * (host can still cycle through them but they read as "settled").
393
+ */
394
+ export const ANNOTATION_PIN_RADIUS = 9;
395
+ export const ANNOTATION_PIN_HIT_SLOP = 12;
396
+ export const ANNOTATION_PIN_FILL = "#f9a825";
397
+ export const ANNOTATION_PIN_STROKE = "#fff";
398
+ export const ANNOTATION_PIN_RESOLVED_FILL = "#888";
399
+ export const ANNOTATION_PIN_BADGE_FONT_SIZE = 10;
400
+ /**
401
+ * Hit-test acceleration threshold. When `scene.elements.size` reaches
402
+ * this value, `Editor.hitTest` switches from the linear `getElementAt`
403
+ * scan to a lazy SpatialGrid keyed by scene-identity. The grid pays
404
+ * for itself only on large scenes; below the threshold the rebuild
405
+ * cost outweighs the per-click savings. Tune down if hosts profile
406
+ * regression on medium scenes (~3k–8k shapes).
407
+ */
408
+ export const LARGE_SCENE_HIT_THRESHOLD = 2_000;
409
+ /**
410
+ * Minimum AABB coverage ratio required for a shape to fall into the
411
+ * rubber-band lasso. `0` would behave like pure intersection (any
412
+ * touch grabs the shape — feels too eager); `1` requires full
413
+ * containment (needs precise lasso). `0.5` is the default — brushing
414
+ * past an edge does not grab the shape, but covering most of it does.
415
+ * Bidirectional rule: a tiny lasso entirely inside a big shape also
416
+ * picks it up.
417
+ */
418
+ export const LASSO_COVERAGE_THRESHOLD = 0.5;
419
+ /**
420
+ * Minimum coverage ratio for keeping a child inside its parent
421
+ * container after a drag. If `intersection.area / childBounds.area`
422
+ * stays above this threshold, the editor extends the container's
423
+ * drop-zone (+ outer size) instead of dropping the parent link.
424
+ * Below it — the user clearly dragged the child out, so `parentId`
425
+ * is cleared. 0.5 = "if more than half of the element is still in
426
+ * the lane, grow the lane to keep it".
427
+ */
428
+ export const CONTAINER_KEEP_THRESHOLD = 0.5;
429
+ /**
430
+ * Max `order` string length (chars) before the editor schedules an
431
+ * automatic layer-wide compaction. Fractional keys lengthen the key by
432
+ * 1–2 chars per insert-in-the-middle; > 12 means inserts have been
433
+ * bursting at the same spot and it is time to rebalance back to short
434
+ * keys. Compaction runs transparently in a microtask after the mutating
435
+ * notify, so the user never sees the long-key state.
436
+ */
437
+ export const AUTO_COMPACT_THRESHOLD = 12;
438
+ /**
439
+ * Maximum local-pixel half-width of a brush vertex. Hosts compute the
440
+ * actual width as `pressure × MAX_BRUSH_WIDTH`; `pressure` is the
441
+ * `PointerEvent.pressure` field, which is normalised to [0, 1] on
442
+ * pointer devices that report it (Apple Pencil, Wacom). Devices
443
+ * without pressure get `0.5` from the browser, yielding mid-range
444
+ * width.
445
+ */
446
+ export const MAX_BRUSH_WIDTH = 6;
447
+ /**
448
+ * Half-width used when `PointerEvent.pressure` is 0 (most mice in
449
+ * Chromium) so a click-drag still produces a visible stroke.
450
+ */
451
+ export const DEFAULT_BRUSH_WIDTH = 2;
452
+ /**
453
+ * Default upper bound on the longer edge of a freshly-inserted
454
+ * image (CSS pixels). Larger images get downscaled proportionally
455
+ * by the built-in image file-drop handler so a 4000×3000 phone
456
+ * snapshot doesn't blanket the viewport. Hosts that want a
457
+ * different cap can `unregisterFileDropHandler("image")` and
458
+ * register their own.
459
+ */
460
+ export const DEFAULT_IMAGE_MAX_EDGE_PX = 480;
461
+ /**
462
+ * Adaptive animation-tick throttling (GIF / video playback). The tick
463
+ * drives a full re-render every frame while an animated shape is
464
+ * visible; under load it is throttled so playback doesn't starve the
465
+ * interaction frame budget.
466
+ *
467
+ * - `ANIMATION_MIN_INTERVAL_MS` — fastest tick (≈60fps). Healthy
468
+ * scenes hit this.
469
+ * - `ANIMATION_MAX_INTERVAL_MS` — slowest tick under heavy load
470
+ * (≈12fps). GIFs still read as animated; frames are dropped.
471
+ * - `ANIMATION_COST_FACTOR` — target interval = clamp(emaRenderCost ×
472
+ * factor, min, max). Factor > 1 leaves headroom for the rest of the
473
+ * frame (input, layout) so the render cost doesn't fill the budget.
474
+ */
475
+ export const ANIMATION_MIN_INTERVAL_MS = 1000 / 60;
476
+ export const ANIMATION_MAX_INTERVAL_MS = 1000 / 12;
477
+ export const ANIMATION_COST_FACTOR = 2;
478
+ /**
479
+ * Per-shape GIF playback policy.
480
+ *
481
+ * - `HEAVY_GIF_BYTES` — animationData (raw GIF bytes) above this counts
482
+ * as "heavy". Light GIFs loop forever; heavy ones auto-stop to save
483
+ * CPU/GPU. 2 MB ≈ a large multi-frame GIF.
484
+ * - `GIF_AUTOSTOP_MS` — a heavy GIF freezes after this much continuous
485
+ * playback. A click resumes it (and restarts the timer).
486
+ */
487
+ export const HEAVY_GIF_BYTES = 2 * 1024 * 1024;
488
+ export const GIF_AUTOSTOP_MS = 30_000;
489
+ /**
490
+ * Defaults for a text shape created via the `draw-text` tool (click on
491
+ * the canvas). Tweak to change the look of freshly-placed text before
492
+ * the user has touched the contextual panel.
493
+ *
494
+ * - `TEXT_DEFAULT_FONT_SIZE` — initial font size in world units.
495
+ * - `TEXT_DEFAULT_FONT_FAMILY` — initial font stack.
496
+ * - `TEXT_DEFAULT_FILL` — initial text colour (near-black).
497
+ * - `TEXT_FONT_SIZE_MIN` / `TEXT_FONT_SIZE_MAX` — clamp range for the
498
+ * font-size control in the contextual panel.
499
+ */
500
+ export const TEXT_DEFAULT_FONT_SIZE = 24;
501
+ export const TEXT_DEFAULT_FONT_FAMILY = "system-ui, sans-serif";
502
+ export const TEXT_DEFAULT_FILL = "#1a1a1a";
503
+ export const TEXT_FONT_SIZE_MIN = 8;
504
+ export const TEXT_FONT_SIZE_MAX = 256;
505
+ /**
506
+ * In-canvas text editing.
507
+ *
508
+ * - `CARET_BLINK_INTERVAL_MS` — half-period of the caret blink (the
509
+ * caret toggles visible/hidden every interval). 530 ms matches the
510
+ * platform default most editors use. Typing/moving resets it to
511
+ * visible so the caret never blinks off mid-interaction.
512
+ * - `TEXT_SELECTION_FILL` / `TEXT_SELECTION_OPACITY` — selection
513
+ * highlight colour + alpha (~0.17 over the text).
514
+ * - `TEXT_CARET_WIDTH_PX` — caret bar width in screen px.
515
+ * - `TEXT_RESIZE_MIN_FONT_SIZE` — clamp so corner-resize can't shrink
516
+ * text below a usable size.
517
+ */
518
+ /**
519
+ * Time window (ms) within which a multi-key action sequence (e.g. `g`
520
+ * then `d` to toggle the debug panel) must complete. Keys further apart
521
+ * than this don't chain — the buffer prunes stale presses. 1 s matches
522
+ * the "press g, then d" feel of vim-/Gmail-style sequence shortcuts.
523
+ * Range: 500–2000.
524
+ */
525
+ export const SEQUENCE_HOTKEY_WINDOW_MS = 1000;
526
+ /**
527
+ * Arrow-key nudge step (world px) for the selection. Plain arrow moves by
528
+ * `NUDGE_STEP_PX`; holding Shift moves by `NUDGE_STEP_SHIFT_PX` (coarse).
529
+ */
530
+ export const NUDGE_STEP_PX = 1;
531
+ export const NUDGE_STEP_SHIFT_PX = 10;
532
+ export const CARET_BLINK_INTERVAL_MS = 530;
533
+ export const TEXT_SELECTION_FILL = "#1a73e8";
534
+ export const TEXT_SELECTION_OPACITY = 0.25;
535
+ export const TEXT_CARET_WIDTH_PX = 1.5;
536
+ export const TEXT_RESIZE_MIN_FONT_SIZE = 4;
537
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],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G,IAAI,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { KeyboardEventData, KeyPhase, PointerEventData, WheelEventData } from "@oh-just-another/types";
2
+ /**
3
+ * Translate a browser `PointerEvent` into a domain `PointerEventData`. The
4
+ * point is expressed in the host element's local CSS-pixel coordinate space
5
+ * (top-left of `host` = (0, 0)).
6
+ *
7
+ * `phase` is mapped from the event type: `pointerdown` → "down" etc.
8
+ */
9
+ export declare const fromPointerEvent: (ev: PointerEvent, host: HTMLElement) => PointerEventData;
10
+ export declare const fromKeyboardEvent: (ev: KeyboardEvent) => KeyboardEventData;
11
+ export declare const fromWheelEvent: (ev: WheelEvent, host: HTMLElement) => WheelEventData;
12
+ export type { KeyPhase };
13
+ //# sourceMappingURL=dom-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-events.d.ts","sourceRoot":"","sources":["../src/dom-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EAER,gBAAgB,EAGhB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,YAAY,EAAE,MAAM,WAAW,KAAG,gBAWtE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,IAAI,aAAa,KAAG,iBAOpD,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,IAAI,UAAU,EAAE,MAAM,WAAW,KAAG,cAUlE,CAAC;AAuCF,YAAY,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Translate a browser `PointerEvent` into a domain `PointerEventData`. The
3
+ * point is expressed in the host element's local CSS-pixel coordinate space
4
+ * (top-left of `host` = (0, 0)).
5
+ *
6
+ * `phase` is mapped from the event type: `pointerdown` → "down" etc.
7
+ */
8
+ export const fromPointerEvent = (ev, host) => {
9
+ const rect = host.getBoundingClientRect();
10
+ return {
11
+ kind: toPointerKind(ev.pointerType),
12
+ phase: toPointerPhase(ev.type),
13
+ point: { x: ev.clientX - rect.left, y: ev.clientY - rect.top },
14
+ buttons: ev.buttons,
15
+ modifiers: toModifiers(ev),
16
+ pointerId: ev.pointerId,
17
+ timestamp: ev.timeStamp,
18
+ };
19
+ };
20
+ export const fromKeyboardEvent = (ev) => ({
21
+ phase: ev.type === "keydown" ? "down" : "up",
22
+ key: ev.key,
23
+ code: ev.code,
24
+ modifiers: toModifiers(ev),
25
+ repeat: ev.repeat,
26
+ timestamp: ev.timeStamp,
27
+ });
28
+ export const fromWheelEvent = (ev, host) => {
29
+ const rect = host.getBoundingClientRect();
30
+ return {
31
+ point: { x: ev.clientX - rect.left, y: ev.clientY - rect.top },
32
+ deltaX: ev.deltaX,
33
+ deltaY: ev.deltaY,
34
+ deltaZ: ev.deltaZ,
35
+ modifiers: toModifiers(ev),
36
+ timestamp: ev.timeStamp,
37
+ };
38
+ };
39
+ const toModifiers = (ev) => ({
40
+ shift: ev.shiftKey,
41
+ ctrl: ev.ctrlKey,
42
+ alt: ev.altKey,
43
+ meta: ev.metaKey,
44
+ });
45
+ const toPointerKind = (raw) => {
46
+ if (raw === "pen")
47
+ return "pen";
48
+ if (raw === "touch")
49
+ return "touch";
50
+ return "mouse";
51
+ };
52
+ const toPointerPhase = (raw) => {
53
+ switch (raw) {
54
+ case "pointerdown":
55
+ return "down";
56
+ case "pointermove":
57
+ return "move";
58
+ case "pointerup":
59
+ return "up";
60
+ case "pointercancel":
61
+ return "cancel";
62
+ case "pointerenter":
63
+ return "enter";
64
+ case "pointerleave":
65
+ return "leave";
66
+ default:
67
+ return "move";
68
+ }
69
+ };
70
+ //# sourceMappingURL=dom-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-events.js","sourceRoot":"","sources":["../src/dom-events.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAgB,EAAE,IAAiB,EAAoB,EAAE;IACxF,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC1C,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,EAAE,CAAC,WAAW,CAAC;QACnC,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9B,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE;QAC9D,OAAO,EAAE,EAAE,CAAC,OAAO;QACnB,SAAS,EAAE,WAAW,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,EAAE,CAAC,SAAS;QACvB,SAAS,EAAE,EAAE,CAAC,SAAS;KACxB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAiB,EAAqB,EAAE,CAAC,CAAC;IAC1E,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;IAC5C,GAAG,EAAE,EAAE,CAAC,GAAG;IACX,IAAI,EAAE,EAAE,CAAC,IAAI;IACb,SAAS,EAAE,WAAW,CAAC,EAAE,CAAC;IAC1B,MAAM,EAAE,EAAE,CAAC,MAAM;IACjB,SAAS,EAAE,EAAE,CAAC,SAAS;CACxB,CAAC,CAA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,cAAc;YACjB,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { geometryDefaultAnchorsLocal } from "@oh-just-another/scene";
2
+ import type { Vec2 } from "@oh-just-another/types";
3
+ export interface AnchorOverlayPoints {
4
+ /** Anchor names, in the same order as `worldPoints`. */
5
+ readonly names: readonly string[];
6
+ /** World-space dot positions, each offset outward by `outsetWorld`. */
7
+ readonly worldPoints: readonly Vec2[];
8
+ }
9
+ /**
10
+ * World-space positions of an element's default connection-anchor dots,
11
+ * each pushed `outsetWorld` units out along its outward normal (floating
12
+ * ports). Excluded anchors (per `snapExcludedAnchors`) are dropped.
13
+ *
14
+ * Shared by the render overlay (which draws the dots) and the pointer
15
+ * hit-test (which detects a press on a link-start dot to begin a link
16
+ * drag) so the two stay 1:1 — a drawn dot is always grabbable at exactly
17
+ * the pixel it appears. The free outline-attach point is NOT produced
18
+ * here; callers append it separately because it is the real landing
19
+ * point and is never offset.
20
+ */
21
+ export declare const anchorOverlayPoints: (shape: Parameters<typeof geometryDefaultAnchorsLocal>[0], outsetWorld: number) => AnchorOverlayPoints;
22
+ //# sourceMappingURL=anchor-points.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor-points.d.ts","sourceRoot":"","sources":["../../src/editor/anchor-points.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAG5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EACxD,aAAa,MAAM,KAClB,mBAYF,CAAC"}