@elixpo/lixsketch 5.4.7 → 5.5.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 (218) hide show
  1. package/dist/react/AIRenderer-M4LMJ66J.js +1105 -0
  2. package/dist/react/AIRenderer-M4LMJ66J.js.map +7 -0
  3. package/dist/react/Arrow-BJDAXPMH.js +8 -0
  4. package/dist/react/Arrow-BJDAXPMH.js.map +7 -0
  5. package/dist/react/Circle-KPG7TKIX.js +8 -0
  6. package/dist/react/Circle-KPG7TKIX.js.map +7 -0
  7. package/dist/react/CodeShape-K4DIZAIV.js +8 -0
  8. package/dist/react/CodeShape-K4DIZAIV.js.map +7 -0
  9. package/dist/react/CopyPaste-4CKJRHJ3.js +569 -0
  10. package/dist/react/CopyPaste-4CKJRHJ3.js.map +7 -0
  11. package/dist/react/EraserTrail-PA6IQLQN.js +20 -0
  12. package/dist/react/EraserTrail-PA6IQLQN.js.map +7 -0
  13. package/dist/react/EventDispatcher-SRFH6LQZ.js +463 -0
  14. package/dist/react/EventDispatcher-SRFH6LQZ.js.map +7 -0
  15. package/dist/react/Frame-6UR5XPAX.js +10 -0
  16. package/dist/react/Frame-6UR5XPAX.js.map +7 -0
  17. package/dist/react/FreehandStroke-CK24NUT3.js +8 -0
  18. package/dist/react/FreehandStroke-CK24NUT3.js.map +7 -0
  19. package/dist/react/GraphEngine-QE5B2PMR.js +340 -0
  20. package/dist/react/GraphEngine-QE5B2PMR.js.map +7 -0
  21. package/dist/react/GraphMathParser-2WMTY4IE.js +10 -0
  22. package/dist/react/GraphMathParser-2WMTY4IE.js.map +7 -0
  23. package/dist/react/IconShape-KMIA6T2H.js +10 -0
  24. package/dist/react/IconShape-KMIA6T2H.js.map +7 -0
  25. package/dist/react/ImageShape-CHHGBXUQ.js +10 -0
  26. package/dist/react/ImageShape-CHHGBXUQ.js.map +7 -0
  27. package/dist/react/LayerOrder-XCHF4MSS.js +66 -0
  28. package/dist/react/LayerOrder-XCHF4MSS.js.map +7 -0
  29. package/dist/react/Line-2KOQEEGA.js +10 -0
  30. package/dist/react/Line-2KOQEEGA.js.map +7 -0
  31. package/dist/react/LixScriptParser-JYWJX375.js +1033 -0
  32. package/dist/react/LixScriptParser-JYWJX375.js.map +7 -0
  33. package/dist/react/MermaidFlowchartRenderer-4QBAZ5MB.js +412 -0
  34. package/dist/react/MermaidFlowchartRenderer-4QBAZ5MB.js.map +7 -0
  35. package/dist/react/MermaidSequenceParser-UKG2NSZY.js +8 -0
  36. package/dist/react/MermaidSequenceParser-UKG2NSZY.js.map +7 -0
  37. package/dist/react/MermaidSequenceRenderer-HPLHY5II.js +387 -0
  38. package/dist/react/MermaidSequenceRenderer-HPLHY5II.js.map +7 -0
  39. package/dist/react/Rectangle-6FE7RN6W.js +8 -0
  40. package/dist/react/Rectangle-6FE7RN6W.js.map +7 -0
  41. package/dist/react/ResizeCode-WAMDTKSW.js +2 -0
  42. package/dist/react/ResizeCode-WAMDTKSW.js.map +7 -0
  43. package/dist/react/ResizeShapes-LKEQTITP.js +250 -0
  44. package/dist/react/ResizeShapes-LKEQTITP.js.map +7 -0
  45. package/dist/react/SceneSerializer-4U4B24JM.js +739 -0
  46. package/dist/react/SceneSerializer-4U4B24JM.js.map +7 -0
  47. package/dist/react/Selection-VVUHY5YJ.js +34 -0
  48. package/dist/react/Selection-VVUHY5YJ.js.map +7 -0
  49. package/dist/react/SketchEngine-YA4RG3KX.js +413 -0
  50. package/dist/react/SketchEngine-YA4RG3KX.js.map +7 -0
  51. package/dist/react/TextShape-54ZJ66E3.js +8 -0
  52. package/dist/react/TextShape-54ZJ66E3.js.map +7 -0
  53. package/dist/react/UndoRedo-M2JZUBKN.js +30 -0
  54. package/dist/react/UndoRedo-M2JZUBKN.js.map +7 -0
  55. package/dist/react/ZoomPan-U3TXC5AJ.js +186 -0
  56. package/dist/react/ZoomPan-U3TXC5AJ.js.map +7 -0
  57. package/dist/react/arrowTool-CWEMIRXK.js +17 -0
  58. package/dist/react/arrowTool-CWEMIRXK.js.map +7 -0
  59. package/dist/react/boxicons-5JNJQPUP.woff +0 -0
  60. package/dist/react/boxicons-6NVWQSCQ.eot +0 -0
  61. package/dist/react/boxicons-AQ5N6WP7.woff2 +0 -0
  62. package/dist/react/boxicons-GDR4JU3X.ttf +0 -0
  63. package/dist/react/boxicons-NNFHLMOR.svg +1660 -0
  64. package/dist/react/chunk-2OQXI7QB.js +564 -0
  65. package/dist/react/chunk-2OQXI7QB.js.map +7 -0
  66. package/dist/react/chunk-5OUBTHHO.js +187 -0
  67. package/dist/react/chunk-5OUBTHHO.js.map +7 -0
  68. package/dist/react/chunk-6PFXZKL2.js +628 -0
  69. package/dist/react/chunk-6PFXZKL2.js.map +7 -0
  70. package/dist/react/chunk-6SFNWGGZ.js +453 -0
  71. package/dist/react/chunk-6SFNWGGZ.js.map +7 -0
  72. package/dist/react/chunk-7TZSIR6V.js +210 -0
  73. package/dist/react/chunk-7TZSIR6V.js.map +7 -0
  74. package/dist/react/chunk-AJAZC37E.js +662 -0
  75. package/dist/react/chunk-AJAZC37E.js.map +7 -0
  76. package/dist/react/chunk-BU4D2WYQ.js +1213 -0
  77. package/dist/react/chunk-BU4D2WYQ.js.map +7 -0
  78. package/dist/react/chunk-BZE4CEBG.js +747 -0
  79. package/dist/react/chunk-BZE4CEBG.js.map +7 -0
  80. package/dist/react/chunk-CB2RANCB.js +212 -0
  81. package/dist/react/chunk-CB2RANCB.js.map +7 -0
  82. package/dist/react/chunk-DNAG7ML6.js +128 -0
  83. package/dist/react/chunk-DNAG7ML6.js.map +7 -0
  84. package/dist/react/chunk-HZWLPXFN.js +198 -0
  85. package/dist/react/chunk-HZWLPXFN.js.map +7 -0
  86. package/dist/react/chunk-I6HCCIXB.js +572 -0
  87. package/dist/react/chunk-I6HCCIXB.js.map +7 -0
  88. package/dist/react/chunk-IZ5OGWGW.js +235 -0
  89. package/dist/react/chunk-IZ5OGWGW.js.map +7 -0
  90. package/dist/react/chunk-JJCJNLNN.js +1490 -0
  91. package/dist/react/chunk-JJCJNLNN.js.map +7 -0
  92. package/dist/react/chunk-JQ3IRFDP.js +222 -0
  93. package/dist/react/chunk-JQ3IRFDP.js.map +7 -0
  94. package/dist/react/chunk-L5OARZJ7.js +1134 -0
  95. package/dist/react/chunk-L5OARZJ7.js.map +7 -0
  96. package/dist/react/chunk-LHRTXNVE.js +1600 -0
  97. package/dist/react/chunk-LHRTXNVE.js.map +7 -0
  98. package/dist/react/chunk-Q2GA4MBZ.js +1653 -0
  99. package/dist/react/chunk-Q2GA4MBZ.js.map +7 -0
  100. package/dist/react/chunk-QNSE5BAY.js +519 -0
  101. package/dist/react/chunk-QNSE5BAY.js.map +7 -0
  102. package/dist/react/chunk-QXFBG7OM.js +191 -0
  103. package/dist/react/chunk-QXFBG7OM.js.map +7 -0
  104. package/dist/react/chunk-T6ZVV5ZO.js +714 -0
  105. package/dist/react/chunk-T6ZVV5ZO.js.map +7 -0
  106. package/dist/react/chunk-URB6MY46.js +974 -0
  107. package/dist/react/chunk-URB6MY46.js.map +7 -0
  108. package/dist/react/chunk-VN62KLOC.js +931 -0
  109. package/dist/react/chunk-VN62KLOC.js.map +7 -0
  110. package/dist/react/chunk-VQVEPJSA.js +158 -0
  111. package/dist/react/chunk-VQVEPJSA.js.map +7 -0
  112. package/dist/react/chunk-XISEAGBV.js +1632 -0
  113. package/dist/react/chunk-XISEAGBV.js.map +7 -0
  114. package/dist/react/chunk-YKJUBFHE.js +575 -0
  115. package/dist/react/chunk-YKJUBFHE.js.map +7 -0
  116. package/dist/react/circleTool-NUATSEI2.js +14 -0
  117. package/dist/react/circleTool-NUATSEI2.js.map +7 -0
  118. package/dist/react/codeTool-MHCB2FNB.js +38 -0
  119. package/dist/react/codeTool-MHCB2FNB.js.map +7 -0
  120. package/dist/react/eraserTool-2GS2LQCS.js +103 -0
  121. package/dist/react/eraserTool-2GS2LQCS.js.map +7 -0
  122. package/dist/react/frameTool-PWVKKXSP.js +14 -0
  123. package/dist/react/frameTool-PWVKKXSP.js.map +7 -0
  124. package/dist/react/freehandTool-SLYGASVP.js +14 -0
  125. package/dist/react/freehandTool-SLYGASVP.js.map +7 -0
  126. package/dist/react/iconTool-GPZ7O7NH.js +18 -0
  127. package/dist/react/iconTool-GPZ7O7NH.js.map +7 -0
  128. package/dist/react/imageTool-D5R4XGEU.js +15 -0
  129. package/dist/react/imageTool-D5R4XGEU.js.map +7 -0
  130. package/dist/react/index.js +5342 -0
  131. package/dist/react/index.js.map +7 -0
  132. package/dist/react/laserTool-XVMV63AV.js +239 -0
  133. package/dist/react/laserTool-XVMV63AV.js.map +7 -0
  134. package/dist/react/lineTool-WNI5EMZ5.js +14 -0
  135. package/dist/react/lineTool-WNI5EMZ5.js.map +7 -0
  136. package/dist/react/lixCode-OJMVUXXI.ttf +0 -0
  137. package/dist/react/lixDefault-JEAPAUJL.ttf +0 -0
  138. package/dist/react/lixFancy-BPXYM5CQ.ttf +0 -0
  139. package/dist/react/lixFont-CPKEUDVM.woff2 +0 -0
  140. package/dist/react/rectangleTool-U7DZ6ZTA.js +14 -0
  141. package/dist/react/rectangleTool-U7DZ6ZTA.js.map +7 -0
  142. package/dist/react/styles.css +6627 -0
  143. package/dist/react/textTool-M7S6F3VC.js +21 -0
  144. package/dist/react/textTool-M7S6F3VC.js.map +7 -0
  145. package/package.json +39 -5
  146. package/src/EngineShortcuts.js +83 -27
  147. package/src/core/AIRenderer.js +30 -18
  148. package/src/core/GraphEngine.js +64 -41
  149. package/src/core/MermaidFlowchartRenderer.js +153 -88
  150. package/src/core/MermaidSequenceRenderer.js +168 -93
  151. package/src/core/SceneSerializer.js +86 -2
  152. package/src/core/Selection.js +119 -19
  153. package/src/core/UndoRedo.js +82 -15
  154. package/src/core/ZoomPan.js +15 -5
  155. package/src/index.js +14 -1
  156. package/src/react/LixSketchCanvas.jsx +347 -0
  157. package/src/react/components/AppMenu.jsx +475 -0
  158. package/src/react/components/Footer.jsx +85 -0
  159. package/src/react/components/Toolbar.jsx +140 -0
  160. package/src/react/components/canvas/CanvasLoadingOverlay.jsx +76 -0
  161. package/src/react/components/canvas/ContextMenu.jsx +466 -0
  162. package/src/react/components/canvas/FindBar.jsx +177 -0
  163. package/src/react/components/canvas/ImageSourcePicker.jsx +133 -0
  164. package/src/react/components/canvas/MultiSelectActions.jsx +120 -0
  165. package/src/react/components/canvas/SVGCanvas.jsx +145 -0
  166. package/src/react/components/canvas/SaveStatusIndicator.jsx +29 -0
  167. package/src/react/components/modals/CanvasPropertiesModal.jsx +358 -0
  168. package/src/react/components/modals/CommandPalette.jsx +307 -0
  169. package/src/react/components/modals/ExportImageModal.jsx +287 -0
  170. package/src/react/components/modals/GraphModal.jsx +174 -0
  171. package/src/react/components/modals/HelpModal.jsx +208 -0
  172. package/src/react/components/modals/LixScriptModal.jsx +130 -0
  173. package/src/react/components/modals/ShortcutsModal.jsx +125 -0
  174. package/src/react/components/sidebars/ArrowSidebar.jsx +173 -0
  175. package/src/react/components/sidebars/CircleSidebar.jsx +134 -0
  176. package/src/react/components/sidebars/FrameSidebar.jsx +263 -0
  177. package/src/react/components/sidebars/IconSidebar.jsx +279 -0
  178. package/src/react/components/sidebars/ImageSidebar.jsx +69 -0
  179. package/src/react/components/sidebars/LineSidebar.jsx +109 -0
  180. package/src/react/components/sidebars/PaintbrushSidebar.jsx +119 -0
  181. package/src/react/components/sidebars/RectangleSidebar.jsx +165 -0
  182. package/src/react/components/sidebars/ShapeSidebar.jsx +130 -0
  183. package/src/react/components/sidebars/TextSidebar.jsx +174 -0
  184. package/src/react/hooks/inertStores.js +58 -0
  185. package/src/react/hooks/useSketchEngine.js +76 -0
  186. package/src/react/hooks/useTranslation.js +92 -0
  187. package/src/react/index.js +41 -0
  188. package/src/react/store/useSketchStore.js +234 -0
  189. package/src/react/store/useUIStore.js +196 -0
  190. package/src/react/styles/arrowSidebar.css +263 -0
  191. package/src/react/styles/canvasStroke.css +47 -0
  192. package/src/react/styles/canvasTools.css +769 -0
  193. package/src/react/styles/circleSidebar.css +206 -0
  194. package/src/react/styles/fonts/fonts.css +29 -0
  195. package/src/react/styles/fonts/lixCode.ttf +0 -0
  196. package/src/react/styles/fonts/lixDefault.ttf +0 -0
  197. package/src/react/styles/fonts/lixDocs.ttf +0 -0
  198. package/src/react/styles/fonts/lixFancy.ttf +0 -0
  199. package/src/react/styles/fonts/lixFont.woff2 +0 -0
  200. package/src/react/styles/lineSidebar.css +207 -0
  201. package/src/react/styles/paintbrushSidebar.css +247 -0
  202. package/src/react/styles/squareSidebar.css +206 -0
  203. package/src/react/styles/writeText.css +149 -0
  204. package/src/react/styles.css +175 -0
  205. package/src/react/toolsEnum.js +20 -0
  206. package/src/react/utils/toast.js +18 -0
  207. package/src/shapes/Frame.js +7 -1
  208. package/src/shapes/Line.js +11 -5
  209. package/src/tools/arrowTool.js +30 -4
  210. package/src/tools/circleTool.js +33 -9
  211. package/src/tools/codeTool.js +5 -3
  212. package/src/tools/frameTool.js +47 -7
  213. package/src/tools/freehandTool.js +12 -4
  214. package/src/tools/iconTool.js +7 -1
  215. package/src/tools/imageTool.js +7 -1
  216. package/src/tools/lineTool.js +27 -3
  217. package/src/tools/rectangleTool.js +45 -8
  218. package/src/tools/textTool.js +23 -6
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,463 @@
1
+ "use client";
2
+ import {
3
+ enterEditMode,
4
+ handleTextMouseDown,
5
+ handleTextMouseMove,
6
+ handleTextMouseUp
7
+ } from "./chunk-JJCJNLNN.js";
8
+ import {
9
+ handleCodeMouseDown,
10
+ handleCodeMouseMove,
11
+ handleCodeMouseUp
12
+ } from "./chunk-LHRTXNVE.js";
13
+ import {
14
+ handleMouseDownImage,
15
+ handleMouseMoveImage,
16
+ handleMouseUpImage
17
+ } from "./chunk-URB6MY46.js";
18
+ import {
19
+ handleMouseDownIcon,
20
+ handleMouseMoveIcon,
21
+ handleMouseUpIcon
22
+ } from "./chunk-VN62KLOC.js";
23
+ import {
24
+ handleMouseDown as handleMouseDown4,
25
+ handleMouseMove as handleMouseMove4,
26
+ handleMouseUp as handleMouseUp4
27
+ } from "./chunk-IZ5OGWGW.js";
28
+ import {
29
+ handleMouseDown as handleMouseDown5,
30
+ handleMouseMove as handleMouseMove5,
31
+ handleMouseUp as handleMouseUp5
32
+ } from "./chunk-2OQXI7QB.js";
33
+ import {
34
+ handleMultiSelectionMouseDown,
35
+ handleMultiSelectionMouseMove,
36
+ handleMultiSelectionMouseUp,
37
+ isMultiSelecting,
38
+ multiSelection,
39
+ removeMultiSelectionRect
40
+ } from "./chunk-Q2GA4MBZ.js";
41
+ import {
42
+ handleMouseDownRect,
43
+ handleMouseMoveRect,
44
+ handleMouseUpRect
45
+ } from "./chunk-QNSE5BAY.js";
46
+ import {
47
+ handleMouseDown as handleMouseDown2,
48
+ handleMouseMove as handleMouseMove2,
49
+ handleMouseUp as handleMouseUp2
50
+ } from "./chunk-I6HCCIXB.js";
51
+ import {
52
+ handleMouseDown as handleMouseDown3,
53
+ handleMouseMove as handleMouseMove3,
54
+ handleMouseUp as handleMouseUp3
55
+ } from "./chunk-6SFNWGGZ.js";
56
+ import "./chunk-DNAG7ML6.js";
57
+ import {
58
+ handleMouseDown,
59
+ handleMouseMove,
60
+ handleMouseUp
61
+ } from "./chunk-BZE4CEBG.js";
62
+ import "./chunk-L5OARZJ7.js";
63
+
64
+ // src/core/EventDispatcher.js
65
+ var EDGE_THRESHOLD = 40;
66
+ var SCROLL_SPEED = 8;
67
+ var _autoScrollRAF = null;
68
+ function _autoScroll(e) {
69
+ if (!(e.buttons & 1)) {
70
+ _stopAutoScroll();
71
+ return;
72
+ }
73
+ if (typeof currentViewBox === "undefined" || typeof currentZoom === "undefined") return;
74
+ if (typeof isPanning !== "undefined" && isPanning) return;
75
+ if (typeof isPanningToolActive !== "undefined" && isPanningToolActive) return;
76
+ const rect = svg.getBoundingClientRect();
77
+ const mx = e.clientX - rect.left;
78
+ const my = e.clientY - rect.top;
79
+ let dx = 0, dy = 0;
80
+ if (mx < EDGE_THRESHOLD) dx = -SCROLL_SPEED * (1 - mx / EDGE_THRESHOLD);
81
+ else if (mx > rect.width - EDGE_THRESHOLD) dx = SCROLL_SPEED * (1 - (rect.width - mx) / EDGE_THRESHOLD);
82
+ if (my < EDGE_THRESHOLD) dy = -SCROLL_SPEED * (1 - my / EDGE_THRESHOLD);
83
+ else if (my > rect.height - EDGE_THRESHOLD) dy = SCROLL_SPEED * (1 - (rect.height - my) / EDGE_THRESHOLD);
84
+ if (e.clientX < rect.left) dx = -SCROLL_SPEED;
85
+ else if (e.clientX > rect.right) dx = SCROLL_SPEED;
86
+ if (e.clientY < rect.top) dy = -SCROLL_SPEED;
87
+ else if (e.clientY > rect.bottom) dy = SCROLL_SPEED;
88
+ if (dx === 0 && dy === 0) {
89
+ _stopAutoScroll();
90
+ return;
91
+ }
92
+ const scale = 1 / currentZoom;
93
+ currentViewBox.x += dx * scale;
94
+ currentViewBox.y += dy * scale;
95
+ svg.setAttribute("viewBox", `${currentViewBox.x} ${currentViewBox.y} ${currentViewBox.width} ${currentViewBox.height}`);
96
+ if (typeof freehandCanvas !== "undefined" && freehandCanvas !== svg) {
97
+ freehandCanvas.setAttribute("viewBox", `${currentViewBox.x} ${currentViewBox.y} ${currentViewBox.width} ${currentViewBox.height}`);
98
+ }
99
+ }
100
+ function _startAutoScroll() {
101
+ if (_autoScrollRAF) return;
102
+ const tick = () => {
103
+ if (_lastDragEvent) _autoScroll(_lastDragEvent);
104
+ _autoScrollRAF = requestAnimationFrame(tick);
105
+ };
106
+ _autoScrollRAF = requestAnimationFrame(tick);
107
+ }
108
+ function _stopAutoScroll() {
109
+ if (_autoScrollRAF) {
110
+ cancelAnimationFrame(_autoScrollRAF);
111
+ _autoScrollRAF = null;
112
+ }
113
+ _lastDragEvent = null;
114
+ }
115
+ var _lastDragEvent = null;
116
+ var _documentDragActive = false;
117
+ function _onDocumentDragMove(e) {
118
+ _lastDragEvent = e;
119
+ const rect = svg.getBoundingClientRect();
120
+ const clampedX = Math.max(rect.left, Math.min(rect.right, e.clientX));
121
+ const clampedY = Math.max(rect.top, Math.min(rect.bottom, e.clientY));
122
+ const clampedEvent = new PointerEvent(e.type, {
123
+ clientX: clampedX,
124
+ clientY: clampedY,
125
+ buttons: e.buttons,
126
+ button: e.button,
127
+ ctrlKey: e.ctrlKey,
128
+ shiftKey: e.shiftKey,
129
+ altKey: e.altKey,
130
+ metaKey: e.metaKey
131
+ });
132
+ handleMainMouseMove(clampedEvent);
133
+ }
134
+ function _onDocumentDragUp(e) {
135
+ _stopAutoScroll();
136
+ document.removeEventListener("pointermove", _onDocumentDragMove);
137
+ document.removeEventListener("pointerup", _onDocumentDragUp);
138
+ _documentDragActive = false;
139
+ handleMainMouseUp(e);
140
+ }
141
+ var handleMainMouseDown = (e) => {
142
+ if (!e.target) return;
143
+ if (e.button === 1 || e.button === 2) return;
144
+ removeMultiSelectionRect();
145
+ if (!isSelectionToolActive) {
146
+ if (multiSelection.selectedShapes.size > 0) {
147
+ multiSelection.clearSelection();
148
+ }
149
+ if (currentShape && typeof currentShape.removeSelection === "function") {
150
+ currentShape.removeSelection();
151
+ currentShape = null;
152
+ }
153
+ if (typeof disableAllSideBars === "function") {
154
+ disableAllSideBars();
155
+ }
156
+ }
157
+ if (isSquareToolActive) {
158
+ handleMouseDownRect(e);
159
+ } else if (isArrowToolActive) {
160
+ handleMouseDown(e);
161
+ } else if (isCircleToolActive) {
162
+ handleMouseDown2(e);
163
+ } else if (isImageToolActive) {
164
+ handleMouseDownImage(e);
165
+ } else if (isLineToolActive) {
166
+ handleMouseDown3(e);
167
+ } else if (isPaintToolActive) {
168
+ handleMouseDown5(e);
169
+ } else if (isTextToolActive) {
170
+ const targetCodeGroup = e.target.closest('g[data-type="code-group"]');
171
+ const targetTextGroup = e.target.closest('g[data-type="text-group"]');
172
+ if (targetCodeGroup && !targetTextGroup) {
173
+ handleCodeMouseDown(e);
174
+ } else if (isTextInCodeMode && !targetTextGroup && !targetCodeGroup) {
175
+ handleCodeMouseDown(e);
176
+ } else {
177
+ handleTextMouseDown(e);
178
+ }
179
+ } else if (isFrameToolActive) {
180
+ handleMouseDown4(e);
181
+ } else if (isIconToolActive) {
182
+ handleMouseDownIcon(e);
183
+ } else if (isSelectionToolActive) {
184
+ if (handleMultiSelectionMouseDown(e)) {
185
+ return;
186
+ }
187
+ const prevShape = currentShape;
188
+ let handled = false;
189
+ if (currentShape?.shapeName === "rectangle") {
190
+ handleMouseDownRect(e);
191
+ handled = true;
192
+ } else if (currentShape?.shapeName === "arrow") {
193
+ handleMouseDown(e);
194
+ handled = true;
195
+ } else if (currentShape?.shapeName === "circle") {
196
+ handleMouseDown2(e);
197
+ handled = true;
198
+ } else if (currentShape?.shapeName === "image") {
199
+ handleMouseDownImage(e);
200
+ handled = true;
201
+ } else if (currentShape?.shapeName === "line") {
202
+ handleMouseDown3(e);
203
+ handled = true;
204
+ } else if (currentShape?.shapeName === "freehandStroke") {
205
+ handleMouseDown5(e);
206
+ handled = true;
207
+ } else if (currentShape?.shapeName === "text") {
208
+ handleTextMouseDown(e);
209
+ handled = true;
210
+ } else if (currentShape?.shapeName === "frame") {
211
+ handleMouseDown4(e);
212
+ handled = true;
213
+ } else if (currentShape?.shapeName === "icon") {
214
+ handleMouseDownIcon(e);
215
+ handled = true;
216
+ } else if (currentShape?.shapeName === "code") {
217
+ handleCodeMouseDown(e);
218
+ handled = true;
219
+ }
220
+ if (handled && prevShape && !currentShape) {
221
+ handled = false;
222
+ }
223
+ if (!handled) {
224
+ const originalCurrentShape = currentShape;
225
+ handleMouseDownRect(e);
226
+ if (currentShape && currentShape !== originalCurrentShape) return;
227
+ handleMouseDown2(e);
228
+ if (currentShape && currentShape !== originalCurrentShape) return;
229
+ handleMouseDown(e);
230
+ if (currentShape && currentShape !== originalCurrentShape) return;
231
+ handleMouseDownImage(e);
232
+ if (currentShape && currentShape !== originalCurrentShape) return;
233
+ handleMouseDown3(e);
234
+ if (currentShape && currentShape !== originalCurrentShape) return;
235
+ handleMouseDown5(e);
236
+ if (currentShape && currentShape !== originalCurrentShape) return;
237
+ handleTextMouseDown(e);
238
+ if (currentShape && currentShape !== originalCurrentShape) return;
239
+ handleMouseDown4(e);
240
+ if (currentShape && currentShape !== originalCurrentShape) return;
241
+ handleMouseDownIcon(e);
242
+ if (currentShape && currentShape !== originalCurrentShape) return;
243
+ handleCodeMouseDown(e);
244
+ if (currentShape && currentShape !== originalCurrentShape) return;
245
+ if (currentShape === originalCurrentShape) {
246
+ if (currentShape) {
247
+ currentShape.removeSelection();
248
+ currentShape = null;
249
+ }
250
+ }
251
+ }
252
+ }
253
+ };
254
+ var handleMainMouseMove = (e) => {
255
+ if (e.buttons & 1) {
256
+ _lastDragEvent = e;
257
+ _startAutoScroll();
258
+ } else {
259
+ _stopAutoScroll();
260
+ }
261
+ if (isSquareToolActive) {
262
+ handleMouseMoveRect(e);
263
+ } else if (isArrowToolActive) {
264
+ handleMouseMove(e);
265
+ } else if (isCircleToolActive) {
266
+ handleMouseMove2(e);
267
+ } else if (isImageToolActive) {
268
+ handleMouseMoveImage(e);
269
+ } else if (isLineToolActive) {
270
+ handleMouseMove3(e);
271
+ } else if (isPaintToolActive) {
272
+ handleMouseMove5(e);
273
+ } else if (isTextToolActive) {
274
+ handleTextMouseMove(e);
275
+ handleCodeMouseMove(e);
276
+ } else if (isFrameToolActive) {
277
+ handleMouseMove4(e);
278
+ } else if (isIconToolActive) {
279
+ handleMouseMoveIcon(e);
280
+ } else if (isSelectionToolActive) {
281
+ if (isMultiSelecting || multiSelection.isDragging || multiSelection.isResizing || multiSelection.isRotating) {
282
+ if (handleMultiSelectionMouseMove(e)) {
283
+ return;
284
+ }
285
+ }
286
+ if (currentShape?.shapeName === "rectangle") {
287
+ handleMouseMoveRect(e);
288
+ } else if (currentShape?.shapeName === "arrow") {
289
+ handleMouseMove(e);
290
+ } else if (currentShape?.shapeName === "circle") {
291
+ handleMouseMove2(e);
292
+ } else if (currentShape?.shapeName === "image") {
293
+ handleMouseMoveImage(e);
294
+ } else if (currentShape?.shapeName === "line") {
295
+ handleMouseMove3(e);
296
+ } else if (currentShape?.shapeName === "freehandStroke") {
297
+ handleMouseMove5(e);
298
+ } else if (currentShape?.shapeName === "text") {
299
+ handleTextMouseMove(e);
300
+ } else if (currentShape?.shapeName === "frame") {
301
+ handleMouseMove4(e);
302
+ } else if (currentShape?.shapeName === "icon") {
303
+ handleMouseMoveIcon(e);
304
+ } else if (currentShape?.shapeName === "code") {
305
+ handleCodeMouseMove(e);
306
+ } else {
307
+ if (handleMultiSelectionMouseMove(e)) {
308
+ return;
309
+ }
310
+ handleMouseMoveRect(e);
311
+ handleMouseMove(e);
312
+ handleMouseMove2(e);
313
+ handleMouseMoveImage(e);
314
+ handleMouseMove3(e);
315
+ handleMouseMove5(e);
316
+ handleTextMouseMove(e);
317
+ handleMouseMove4(e);
318
+ handleMouseMoveIcon(e);
319
+ handleCodeMouseMove(e);
320
+ }
321
+ }
322
+ };
323
+ var handleMainMouseUp = (e) => {
324
+ _stopAutoScroll();
325
+ if (isSquareToolActive) {
326
+ handleMouseUpRect(e);
327
+ } else if (isArrowToolActive) {
328
+ handleMouseUp(e);
329
+ } else if (isCircleToolActive) {
330
+ handleMouseUp2(e);
331
+ } else if (isImageToolActive) {
332
+ handleMouseUpImage(e);
333
+ } else if (isLineToolActive) {
334
+ handleMouseUp3(e);
335
+ } else if (isPaintToolActive) {
336
+ handleMouseUp5(e);
337
+ } else if (isTextToolActive) {
338
+ handleTextMouseUp(e);
339
+ handleCodeMouseUp(e);
340
+ } else if (isFrameToolActive) {
341
+ handleMouseUp4(e);
342
+ } else if (isIconToolActive) {
343
+ handleMouseUpIcon(e);
344
+ } else if (isSelectionToolActive) {
345
+ if (isMultiSelecting || multiSelection.isDragging || multiSelection.isResizing || multiSelection.isRotating) {
346
+ handleMultiSelectionMouseUp(e);
347
+ return;
348
+ }
349
+ if (currentShape?.shapeName === "rectangle") {
350
+ handleMouseUpRect(e);
351
+ } else if (currentShape?.shapeName === "arrow") {
352
+ handleMouseUp(e);
353
+ } else if (currentShape?.shapeName === "circle") {
354
+ handleMouseUp2(e);
355
+ } else if (currentShape?.shapeName === "image") {
356
+ handleMouseUpImage(e);
357
+ } else if (currentShape?.shapeName === "line") {
358
+ handleMouseUp3(e);
359
+ } else if (currentShape?.shapeName === "freehandStroke") {
360
+ handleMouseUp5(e);
361
+ } else if (currentShape?.shapeName === "text") {
362
+ handleTextMouseUp(e);
363
+ } else if (currentShape?.shapeName === "frame") {
364
+ handleMouseUp4(e);
365
+ } else if (currentShape?.shapeName === "icon") {
366
+ handleMouseUpIcon(e);
367
+ } else if (currentShape?.shapeName === "code") {
368
+ handleCodeMouseUp(e);
369
+ } else {
370
+ handleMultiSelectionMouseUp(e);
371
+ handleMouseUpRect(e);
372
+ handleMouseUp(e);
373
+ handleMouseUp2(e);
374
+ handleMouseUpImage(e);
375
+ handleMouseUp3(e);
376
+ handleMouseUp5(e);
377
+ handleTextMouseUp(e);
378
+ handleMouseUp4(e);
379
+ handleMouseUpIcon(e);
380
+ handleCodeMouseUp(e);
381
+ }
382
+ }
383
+ };
384
+ var handleMainMouseLeave = (e) => {
385
+ if (e.buttons & 1) {
386
+ _lastDragEvent = e;
387
+ _startAutoScroll();
388
+ if (!_documentDragActive) {
389
+ _documentDragActive = true;
390
+ document.addEventListener("pointermove", _onDocumentDragMove);
391
+ document.addEventListener("pointerup", _onDocumentDragUp);
392
+ }
393
+ return;
394
+ }
395
+ handleMainMouseUp(e);
396
+ removeMultiSelectionRect();
397
+ if (typeof window.forceCleanupEraserTrail === "function") {
398
+ window.forceCleanupEraserTrail();
399
+ }
400
+ if (typeof isDrawing !== "undefined" && isDrawing) {
401
+ isDrawing = false;
402
+ if (typeof lasers !== "undefined" && lasers.length > 0 && typeof fadeLaserTrail === "function") {
403
+ const lastLaser = lasers[lasers.length - 1];
404
+ fadeLaserTrail(lastLaser);
405
+ }
406
+ }
407
+ };
408
+ var _boundSvg = null;
409
+ function _onMouseEnter(e) {
410
+ if (_documentDragActive) {
411
+ document.removeEventListener("pointermove", _onDocumentDragMove);
412
+ document.removeEventListener("pointerup", _onDocumentDragUp);
413
+ _documentDragActive = false;
414
+ }
415
+ }
416
+ var handleMainDblClick = (e) => {
417
+ if (!e.target) return;
418
+ const targetTextGroup = e.target.closest('g[data-type="text-group"]');
419
+ if (targetTextGroup) {
420
+ e.stopPropagation();
421
+ enterEditMode(targetTextGroup);
422
+ }
423
+ };
424
+ function initEventDispatcher(svgEl) {
425
+ if (_boundSvg) cleanupEventDispatcher();
426
+ const target = svgEl || svg;
427
+ target.addEventListener("pointerdown", handleMainMouseDown);
428
+ target.addEventListener("pointermove", handleMainMouseMove);
429
+ target.addEventListener("pointerup", handleMainMouseUp);
430
+ target.addEventListener("pointerleave", handleMainMouseLeave);
431
+ target.addEventListener("pointerenter", _onMouseEnter);
432
+ target.addEventListener("dblclick", handleMainDblClick);
433
+ _boundSvg = target;
434
+ }
435
+ function cleanupEventDispatcher() {
436
+ _stopAutoScroll();
437
+ if (_documentDragActive) {
438
+ document.removeEventListener("pointermove", _onDocumentDragMove);
439
+ document.removeEventListener("pointerup", _onDocumentDragUp);
440
+ _documentDragActive = false;
441
+ }
442
+ if (_boundSvg) {
443
+ _boundSvg.removeEventListener("pointerdown", handleMainMouseDown);
444
+ _boundSvg.removeEventListener("pointermove", handleMainMouseMove);
445
+ _boundSvg.removeEventListener("pointerup", handleMainMouseUp);
446
+ _boundSvg.removeEventListener("pointerleave", handleMainMouseLeave);
447
+ _boundSvg.removeEventListener("pointerenter", _onMouseEnter);
448
+ _boundSvg.removeEventListener("dblclick", handleMainDblClick);
449
+ _boundSvg = null;
450
+ }
451
+ }
452
+ if (typeof svg !== "undefined" && svg) {
453
+ initEventDispatcher(svg);
454
+ }
455
+ export {
456
+ cleanupEventDispatcher,
457
+ handleMainMouseDown,
458
+ handleMainMouseLeave,
459
+ handleMainMouseMove,
460
+ handleMainMouseUp,
461
+ initEventDispatcher
462
+ };
463
+ //# sourceMappingURL=EventDispatcher-SRFH6LQZ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/EventDispatcher.js"],
4
+ "sourcesContent": ["/* eslint-disable */\n// Event dispatcher - extracted from eventListeners.js\n// Central event routing for all tools\n\nimport { handleMouseDownRect, handleMouseMoveRect, handleMouseUpRect } from '../tools/rectangleTool.js';\nimport { handleMouseDownArrow, handleMouseMoveArrow, handleMouseUpArrow } from '../tools/arrowTool.js';\nimport { handleMouseDownCircle, handleMouseMoveCircle, handleMouseUpCircle } from '../tools/circleTool.js';\nimport { handleMouseUpImage, handleMouseDownImage, handleMouseMoveImage } from '../tools/imageTool.js';\nimport { handleMouseDownLine, handleMouseMoveLine, handleMouseUpLine } from '../tools/lineTool.js';\nimport { handleFreehandMouseDown, handleFreehandMouseMove, handleFreehandMouseUp } from '../tools/freehandTool.js';\nimport { handleTextMouseDown, handleTextMouseMove, handleTextMouseUp, enterEditMode } from '../tools/textTool.js';\nimport { handleMouseDownFrame, handleMouseMoveFrame, handleMouseUpFrame } from '../tools/frameTool.js';\nimport { handleMultiSelectionMouseDown, handleMultiSelectionMouseMove, handleMultiSelectionMouseUp, removeMultiSelectionRect, multiSelection, isMultiSelecting} from './Selection.js';\nimport { handleMouseDownIcon, handleMouseMoveIcon, handleMouseUpIcon } from '../tools/iconTool.js';\nimport { handleCodeMouseDown, handleCodeMouseMove, handleCodeMouseUp } from '../tools/codeTool.js';\n\n// === Auto-scroll when dragging near viewport edges ===\nconst EDGE_THRESHOLD = 40; // px from edge to start scrolling\nconst SCROLL_SPEED = 8; // base px per frame (scaled by zoom)\nlet _autoScrollRAF = null;\n\nfunction _autoScroll(e) {\n if (!(e.buttons & 1)) { _stopAutoScroll(); return; } // no primary button\n if (typeof currentViewBox === 'undefined' || typeof currentZoom === 'undefined') return;\n if (typeof isPanning !== 'undefined' && isPanning) return; // don't fight pan tool\n if (typeof isPanningToolActive !== 'undefined' && isPanningToolActive) return;\n\n const rect = svg.getBoundingClientRect();\n const mx = e.clientX - rect.left;\n const my = e.clientY - rect.top;\n\n let dx = 0, dy = 0;\n if (mx < EDGE_THRESHOLD) dx = -SCROLL_SPEED * (1 - mx / EDGE_THRESHOLD);\n else if (mx > rect.width - EDGE_THRESHOLD) dx = SCROLL_SPEED * (1 - (rect.width - mx) / EDGE_THRESHOLD);\n if (my < EDGE_THRESHOLD) dy = -SCROLL_SPEED * (1 - my / EDGE_THRESHOLD);\n else if (my > rect.height - EDGE_THRESHOLD) dy = SCROLL_SPEED * (1 - (rect.height - my) / EDGE_THRESHOLD);\n\n // Also scroll when cursor is outside the canvas entirely\n if (e.clientX < rect.left) dx = -SCROLL_SPEED;\n else if (e.clientX > rect.right) dx = SCROLL_SPEED;\n if (e.clientY < rect.top) dy = -SCROLL_SPEED;\n else if (e.clientY > rect.bottom) dy = SCROLL_SPEED;\n\n if (dx === 0 && dy === 0) { _stopAutoScroll(); return; }\n\n // Scale speed inversely with zoom so scrolling feels consistent\n const scale = 1 / currentZoom;\n currentViewBox.x += dx * scale;\n currentViewBox.y += dy * scale;\n svg.setAttribute('viewBox', `${currentViewBox.x} ${currentViewBox.y} ${currentViewBox.width} ${currentViewBox.height}`);\n if (typeof freehandCanvas !== 'undefined' && freehandCanvas !== svg) {\n freehandCanvas.setAttribute('viewBox', `${currentViewBox.x} ${currentViewBox.y} ${currentViewBox.width} ${currentViewBox.height}`);\n }\n}\n\nfunction _startAutoScroll() {\n if (_autoScrollRAF) return;\n const tick = () => {\n if (_lastDragEvent) _autoScroll(_lastDragEvent);\n _autoScrollRAF = requestAnimationFrame(tick);\n };\n _autoScrollRAF = requestAnimationFrame(tick);\n}\n\nfunction _stopAutoScroll() {\n if (_autoScrollRAF) {\n cancelAnimationFrame(_autoScrollRAF);\n _autoScrollRAF = null;\n }\n _lastDragEvent = null;\n}\n\nlet _lastDragEvent = null;\nlet _documentDragActive = false;\n\nfunction _onDocumentDragMove(e) {\n _lastDragEvent = e;\n // Clamp mouse coordinates to SVG bounds before forwarding to tool handlers,\n // so getSVGCoordsFromMouse doesn't produce extreme values when cursor is outside.\n const rect = svg.getBoundingClientRect();\n const clampedX = Math.max(rect.left, Math.min(rect.right, e.clientX));\n const clampedY = Math.max(rect.top, Math.min(rect.bottom, e.clientY));\n const clampedEvent = new PointerEvent(e.type, {\n clientX: clampedX,\n clientY: clampedY,\n buttons: e.buttons,\n button: e.button,\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n metaKey: e.metaKey,\n });\n handleMainMouseMove(clampedEvent);\n}\n\nfunction _onDocumentDragUp(e) {\n _stopAutoScroll();\n document.removeEventListener('pointermove', _onDocumentDragMove);\n document.removeEventListener('pointerup', _onDocumentDragUp);\n _documentDragActive = false;\n // Finalize the operation\n handleMainMouseUp(e);\n}\n\nconst handleMainMouseDown = (e) => {\n if (!e.target) return;\n // Middle / right mouse buttons are reserved for panning and the\n // browser context menu; they should NOT trigger tool actions or the\n // multi-selection rectangle. Without this guard, middle-click-drag\n // simultaneously pans (handled in ZoomPan) and starts a selection\n // marquee.\n if (e.button === 1 || e.button === 2) return;\n // Safety: remove any stray selection rectangle from a previous interrupted drag\n removeMultiSelectionRect();\n\n // For non-selection tools: deselect everything when clicking on empty canvas\n // (Selection tool handles its own deselection in handleMultiSelectionMouseDown)\n if (!isSelectionToolActive) {\n // Clear multi-selection for any tool switch\n if (multiSelection.selectedShapes.size > 0) {\n multiSelection.clearSelection();\n }\n // Deselect current individual shape when starting a new tool action\n if (currentShape && typeof currentShape.removeSelection === 'function') {\n currentShape.removeSelection();\n currentShape = null;\n }\n if (typeof disableAllSideBars === 'function') {\n disableAllSideBars();\n }\n }\n\n if (isSquareToolActive) {\n handleMouseDownRect(e);\n } else if (isArrowToolActive) {\n handleMouseDownArrow(e);\n } else if (isCircleToolActive) {\n handleMouseDownCircle(e);\n } else if (isImageToolActive) {\n handleMouseDownImage(e);\n } \n else if (isLineToolActive) {\n handleMouseDownLine(e);\n }\n else if (isPaintToolActive) {\n handleFreehandMouseDown(e);\n }\n else if (isTextToolActive) {\n // Text tool handles both text and code shapes based on target and mode\n const targetCodeGroup = e.target.closest('g[data-type=\"code-group\"]');\n const targetTextGroup = e.target.closest('g[data-type=\"text-group\"]');\n if (targetCodeGroup && !targetTextGroup) {\n handleCodeMouseDown(e);\n } else if (isTextInCodeMode && !targetTextGroup && !targetCodeGroup) {\n handleCodeMouseDown(e);\n } else {\n handleTextMouseDown(e);\n }\n }\n else if (isFrameToolActive) {\n handleMouseDownFrame(e);\n }\n else if (isIconToolActive) {\n handleMouseDownIcon(e);\n }\n else if (isSelectionToolActive) {\n // Try multi-selection first when selection tool is active\n if (handleMultiSelectionMouseDown(e)) {\n return; // Multi-selection handled the event\n }\n\n // Remember previous shape to detect deselection\n const prevShape = currentShape;\n let handled = false;\n\n // If multi-selection didn't handle it, proceed with shape-specific selection\n if (currentShape?.shapeName === 'rectangle') {\n handleMouseDownRect(e);\n handled = true;\n } else if (currentShape?.shapeName === 'arrow') {\n handleMouseDownArrow(e);\n handled = true;\n } else if (currentShape?.shapeName === 'circle') {\n handleMouseDownCircle(e);\n handled = true;\n } else if (currentShape?.shapeName === 'image') {\n handleMouseDownImage(e);\n handled = true;\n }\n else if (currentShape?.shapeName === 'line') {\n handleMouseDownLine(e);\n handled = true;\n }\n else if (currentShape?.shapeName === 'freehandStroke') {\n handleFreehandMouseDown(e);\n handled = true;\n }\n else if (currentShape?.shapeName === 'text') {\n handleTextMouseDown(e);\n handled = true;\n }\n else if (currentShape?.shapeName === 'frame') {\n handleMouseDownFrame(e);\n handled = true;\n }\n else if (currentShape?.shapeName === 'icon') {\n handleMouseDownIcon(e);\n handled = true;\n }\n else if( currentShape?.shapeName === 'code') {\n handleCodeMouseDown(e);\n handled = true;\n }\n\n // If the handler deselected (currentShape cleared) but didn't select something new,\n // fall through to try all handlers so clicking another shape type works\n if (handled && prevShape && !currentShape) {\n handled = false;\n }\n\n if (!handled) {\n const originalCurrentShape = currentShape;\n handleMouseDownRect(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownCircle(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownArrow(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownImage(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownLine(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleFreehandMouseDown(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleTextMouseDown(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownFrame(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleMouseDownIcon(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n handleCodeMouseDown(e);\n if (currentShape && currentShape !== originalCurrentShape) return;\n if (currentShape === originalCurrentShape) {\n if (currentShape) {\n currentShape.removeSelection();\n currentShape = null;\n }\n }\n }\n }\n};\n\nconst handleMainMouseMove = (e) => {\n // Auto-scroll when dragging near/past viewport edges (checked first so early returns don't skip it)\n if (e.buttons & 1) {\n _lastDragEvent = e;\n _startAutoScroll();\n } else {\n _stopAutoScroll();\n }\n\n if (isSquareToolActive) {\n handleMouseMoveRect(e);\n } else if (isArrowToolActive) {\n handleMouseMoveArrow(e);\n } else if (isCircleToolActive) {\n handleMouseMoveCircle(e);\n } else if (isImageToolActive) {\n handleMouseMoveImage(e);\n } \n else if (isLineToolActive) {\n handleMouseMoveLine(e);\n }\n else if (isPaintToolActive) {\n handleFreehandMouseMove(e);\n }\n else if (isTextToolActive) {\n handleTextMouseMove(e);\n handleCodeMouseMove(e);\n }\n else if (isFrameToolActive) {\n handleMouseMoveFrame(e);\n }\n else if (isIconToolActive) {\n handleMouseMoveIcon(e);\n }\n else if (isSelectionToolActive) {\n // Handle multi-selection operations first - these take priority\n if (isMultiSelecting || multiSelection.isDragging || multiSelection.isResizing || multiSelection.isRotating) {\n if (handleMultiSelectionMouseMove(e)) {\n return; // Multi-selection handled the event\n }\n }\n \n // Shape-specific mouse move handling\n if (currentShape?.shapeName === 'rectangle') {\n handleMouseMoveRect(e);\n } else if (currentShape?.shapeName === 'arrow') {\n handleMouseMoveArrow(e);\n } else if (currentShape?.shapeName === 'circle') {\n handleMouseMoveCircle(e);\n } else if (currentShape?.shapeName === 'image') {\n handleMouseMoveImage(e);\n } \n else if (currentShape?.shapeName === 'line') {\n handleMouseMoveLine(e);\n }\n else if (currentShape?.shapeName === 'freehandStroke') {\n handleFreehandMouseMove(e);\n }\n else if (currentShape?.shapeName === 'text') {\n handleTextMouseMove(e);\n }\n else if (currentShape?.shapeName === 'frame') {\n handleMouseMoveFrame(e);\n }\n else if (currentShape?.shapeName === 'icon') {\n handleMouseMoveIcon(e);\n }\n else if (currentShape?.shapeName === 'code') {\n handleCodeMouseMove(e);\n }\n\n else {\n // Try multi-selection mouse move for cursor updates\n if (handleMultiSelectionMouseMove(e)) {\n return;\n }\n \n handleMouseMoveRect(e);\n handleMouseMoveArrow(e);\n handleMouseMoveCircle(e);\n handleMouseMoveImage(e);\n handleMouseMoveLine(e);\n handleFreehandMouseMove(e);\n handleTextMouseMove(e);\n handleMouseMoveFrame(e);\n handleMouseMoveIcon(e);\n handleCodeMouseMove(e);\n }\n }\n};\n\nconst handleMainMouseUp = (e) => {\n _stopAutoScroll();\n if (isSquareToolActive) {\n handleMouseUpRect(e);\n } else if (isArrowToolActive) {\n handleMouseUpArrow(e);\n } else if (isCircleToolActive) {\n handleMouseUpCircle(e);\n } else if (isImageToolActive) {\n handleMouseUpImage(e);\n } \n else if (isLineToolActive) { \n handleMouseUpLine(e);\n }\n else if (isPaintToolActive) {\n handleFreehandMouseUp(e);\n }\n else if (isTextToolActive) {\n handleTextMouseUp(e);\n handleCodeMouseUp(e);\n }\n else if (isFrameToolActive) {\n handleMouseUpFrame(e);\n }\n else if (isIconToolActive) {\n handleMouseUpIcon(e);\n }\n\n else if (isSelectionToolActive) {\n // Always try multi-selection cleanup first\n if (isMultiSelecting || multiSelection.isDragging || multiSelection.isResizing || multiSelection.isRotating) {\n handleMultiSelectionMouseUp(e);\n return;\n }\n\n // Shape-specific mouse up handling\n if (currentShape?.shapeName === 'rectangle') {\n handleMouseUpRect(e);\n } else if (currentShape?.shapeName === 'arrow') {\n handleMouseUpArrow(e);\n } else if (currentShape?.shapeName === 'circle') {\n handleMouseUpCircle(e);\n } else if (currentShape?.shapeName === 'image') {\n handleMouseUpImage(e);\n }\n else if (currentShape?.shapeName === 'line') {\n handleMouseUpLine(e);\n }\n else if (currentShape?.shapeName === 'freehandStroke') {\n handleFreehandMouseUp(e);\n }\n else if (currentShape?.shapeName === 'text') {\n handleTextMouseUp(e);\n }\n else if (currentShape?.shapeName === 'frame') {\n handleMouseUpFrame(e);\n }\n else if (currentShape?.shapeName === 'icon') {\n handleMouseUpIcon(e);\n }\n else if (currentShape?.shapeName === 'code') {\n handleCodeMouseUp(e);\n }\n\n else {\n handleMultiSelectionMouseUp(e);\n handleMouseUpRect(e);\n handleMouseUpArrow(e);\n handleMouseUpCircle(e);\n handleMouseUpImage(e);\n handleMouseUpLine(e);\n handleFreehandMouseUp(e);\n handleTextMouseUp(e);\n handleMouseUpFrame(e);\n handleMouseUpIcon(e);\n handleCodeMouseUp(e);\n }\n }\n};\n\nconst handleMainMouseLeave = (e) => {\n // If the user is still holding the primary button (dragging outside the canvas),\n // keep auto-scrolling and don't finalize the operation yet.\n if (e.buttons & 1) {\n _lastDragEvent = e;\n _startAutoScroll();\n\n // Listen on document to continue receiving move events outside the SVG\n if (!_documentDragActive) {\n _documentDragActive = true;\n document.addEventListener('pointermove', _onDocumentDragMove);\n document.addEventListener('pointerup', _onDocumentDragUp);\n }\n return;\n }\n\n // Stop all active drawing tools when pointer leaves the canvas\n\n // Fire mouseUp for whichever tool is active to finalize/cancel the operation\n handleMainMouseUp(e);\n\n // Always clean up any stray selection rectangle when pointer leaves canvas\n removeMultiSelectionRect();\n\n // Eraser: force cleanup any lingering trail\n if (typeof window.forceCleanupEraserTrail === 'function') {\n window.forceCleanupEraserTrail();\n }\n\n // Laser: stop drawing and fade out active laser (globals from laserTool.js)\n if (typeof isDrawing !== 'undefined' && isDrawing) {\n isDrawing = false;\n if (typeof lasers !== 'undefined' && lasers.length > 0 && typeof fadeLaserTrail === 'function') {\n const lastLaser = lasers[lasers.length - 1];\n fadeLaserTrail(lastLaser);\n }\n }\n};\n\nlet _boundSvg = null;\n\nfunction _onMouseEnter(e) {\n // Cursor re-entered the SVG \u2014 stop document-level tracking, SVG handles events again\n if (_documentDragActive) {\n document.removeEventListener('pointermove', _onDocumentDragMove);\n document.removeEventListener('pointerup', _onDocumentDragUp);\n _documentDragActive = false;\n }\n}\n\nconst handleMainDblClick = (e) => {\n if (!e.target) return;\n // Double-click on a text group from any tool: enter text edit mode\n const targetTextGroup = e.target.closest('g[data-type=\"text-group\"]');\n if (targetTextGroup) {\n e.stopPropagation();\n enterEditMode(targetTextGroup);\n }\n};\n\nfunction initEventDispatcher(svgEl) {\n if (_boundSvg) cleanupEventDispatcher();\n const target = svgEl || svg;\n target.addEventListener('pointerdown', handleMainMouseDown);\n target.addEventListener('pointermove', handleMainMouseMove);\n target.addEventListener('pointerup', handleMainMouseUp);\n target.addEventListener('pointerleave', handleMainMouseLeave);\n target.addEventListener('pointerenter', _onMouseEnter);\n target.addEventListener('dblclick', handleMainDblClick);\n _boundSvg = target;\n}\n\nfunction cleanupEventDispatcher() {\n _stopAutoScroll();\n if (_documentDragActive) {\n document.removeEventListener('pointermove', _onDocumentDragMove);\n document.removeEventListener('pointerup', _onDocumentDragUp);\n _documentDragActive = false;\n }\n if (_boundSvg) {\n _boundSvg.removeEventListener('pointerdown', handleMainMouseDown);\n _boundSvg.removeEventListener('pointermove', handleMainMouseMove);\n _boundSvg.removeEventListener('pointerup', handleMainMouseUp);\n _boundSvg.removeEventListener('pointerleave', handleMainMouseLeave);\n _boundSvg.removeEventListener('pointerenter', _onMouseEnter);\n _boundSvg.removeEventListener('dblclick', handleMainDblClick);\n _boundSvg = null;\n }\n}\n\n// Auto-init if svg is already available (first load)\nif (typeof svg !== 'undefined' && svg) {\n initEventDispatcher(svg);\n}\n\nexport { handleMainMouseDown, handleMainMouseMove, handleMainMouseUp, handleMainMouseLeave, initEventDispatcher, cleanupEventDispatcher };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAM,iBAAiB;AACvB,IAAM,eAAe;AACrB,IAAI,iBAAiB;AAErB,SAAS,YAAY,GAAG;AACpB,MAAI,EAAE,EAAE,UAAU,IAAI;AAAE,oBAAgB;AAAG;AAAA,EAAQ;AACnD,MAAI,OAAO,mBAAmB,eAAe,OAAO,gBAAgB,YAAa;AACjF,MAAI,OAAO,cAAc,eAAe,UAAW;AACnD,MAAI,OAAO,wBAAwB,eAAe,oBAAqB;AAEvE,QAAM,OAAO,IAAI,sBAAsB;AACvC,QAAM,KAAK,EAAE,UAAU,KAAK;AAC5B,QAAM,KAAK,EAAE,UAAU,KAAK;AAE5B,MAAI,KAAK,GAAG,KAAK;AACjB,MAAI,KAAK,eAAgB,MAAK,CAAC,gBAAgB,IAAI,KAAK;AAAA,WAC/C,KAAK,KAAK,QAAQ,eAAgB,MAAK,gBAAgB,KAAK,KAAK,QAAQ,MAAM;AACxF,MAAI,KAAK,eAAgB,MAAK,CAAC,gBAAgB,IAAI,KAAK;AAAA,WAC/C,KAAK,KAAK,SAAS,eAAgB,MAAK,gBAAgB,KAAK,KAAK,SAAS,MAAM;AAG1F,MAAI,EAAE,UAAU,KAAK,KAAM,MAAK,CAAC;AAAA,WACxB,EAAE,UAAU,KAAK,MAAO,MAAK;AACtC,MAAI,EAAE,UAAU,KAAK,IAAK,MAAK,CAAC;AAAA,WACvB,EAAE,UAAU,KAAK,OAAQ,MAAK;AAEvC,MAAI,OAA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B;AAC9B,kBAAgB;AAChB,MAAI,qBAAqB;AACrB,aAAS,oBAAoB,eAAe,mBAAmB;AAC/D,aAAS,oBAAoB,aAAa,iBAAiB;AAC3D,0BAAsB;AAAA,EAC1B;AACA,MAAI,WAAW;AACX,cAAU,oBAAoB,eAAe,mBAAmB;AAChE,cAAU,oBAAoB,eAAe,mBAAmB;AAChE,cAAU,oBAAoB,aAAa,iBAAiB;AAC5D,cAAU,oBAAoB,gBAAgB,oBAAoB;AAClE,cAAU,oBAAoB,gBAAgB,aAAa;AAC3D,cAAU,oBAAoB,YAAY,kBAAkB;AAC5D,gBAAY;AAAA,EAChB;AACJ;AAGA,IAAI,OAAO,QAAQ,eAAe,KAAK;AACnC,sBAAoB,GAAG;AAC3B;",
6
+ "names": ["handleMouseDown", "handleMouseMove", "handleMouseUp"]
7
+ }
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import {
3
+ Frame
4
+ } from "./chunk-BU4D2WYQ.js";
5
+ import "./chunk-BZE4CEBG.js";
6
+ import "./chunk-L5OARZJ7.js";
7
+ export {
8
+ Frame
9
+ };
10
+ //# sourceMappingURL=Frame-6UR5XPAX.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import {
3
+ FreehandStroke
4
+ } from "./chunk-YKJUBFHE.js";
5
+ export {
6
+ FreehandStroke
7
+ };
8
+ //# sourceMappingURL=FreehandStroke-CK24NUT3.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }