@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.
- package/dist/react/AIRenderer-M4LMJ66J.js +1105 -0
- package/dist/react/AIRenderer-M4LMJ66J.js.map +7 -0
- package/dist/react/Arrow-BJDAXPMH.js +8 -0
- package/dist/react/Arrow-BJDAXPMH.js.map +7 -0
- package/dist/react/Circle-KPG7TKIX.js +8 -0
- package/dist/react/Circle-KPG7TKIX.js.map +7 -0
- package/dist/react/CodeShape-K4DIZAIV.js +8 -0
- package/dist/react/CodeShape-K4DIZAIV.js.map +7 -0
- package/dist/react/CopyPaste-4CKJRHJ3.js +569 -0
- package/dist/react/CopyPaste-4CKJRHJ3.js.map +7 -0
- package/dist/react/EraserTrail-PA6IQLQN.js +20 -0
- package/dist/react/EraserTrail-PA6IQLQN.js.map +7 -0
- package/dist/react/EventDispatcher-SRFH6LQZ.js +463 -0
- package/dist/react/EventDispatcher-SRFH6LQZ.js.map +7 -0
- package/dist/react/Frame-6UR5XPAX.js +10 -0
- package/dist/react/Frame-6UR5XPAX.js.map +7 -0
- package/dist/react/FreehandStroke-CK24NUT3.js +8 -0
- package/dist/react/FreehandStroke-CK24NUT3.js.map +7 -0
- package/dist/react/GraphEngine-QE5B2PMR.js +340 -0
- package/dist/react/GraphEngine-QE5B2PMR.js.map +7 -0
- package/dist/react/GraphMathParser-2WMTY4IE.js +10 -0
- package/dist/react/GraphMathParser-2WMTY4IE.js.map +7 -0
- package/dist/react/IconShape-KMIA6T2H.js +10 -0
- package/dist/react/IconShape-KMIA6T2H.js.map +7 -0
- package/dist/react/ImageShape-CHHGBXUQ.js +10 -0
- package/dist/react/ImageShape-CHHGBXUQ.js.map +7 -0
- package/dist/react/LayerOrder-XCHF4MSS.js +66 -0
- package/dist/react/LayerOrder-XCHF4MSS.js.map +7 -0
- package/dist/react/Line-2KOQEEGA.js +10 -0
- package/dist/react/Line-2KOQEEGA.js.map +7 -0
- package/dist/react/LixScriptParser-JYWJX375.js +1033 -0
- package/dist/react/LixScriptParser-JYWJX375.js.map +7 -0
- package/dist/react/MermaidFlowchartRenderer-4QBAZ5MB.js +412 -0
- package/dist/react/MermaidFlowchartRenderer-4QBAZ5MB.js.map +7 -0
- package/dist/react/MermaidSequenceParser-UKG2NSZY.js +8 -0
- package/dist/react/MermaidSequenceParser-UKG2NSZY.js.map +7 -0
- package/dist/react/MermaidSequenceRenderer-HPLHY5II.js +387 -0
- package/dist/react/MermaidSequenceRenderer-HPLHY5II.js.map +7 -0
- package/dist/react/Rectangle-6FE7RN6W.js +8 -0
- package/dist/react/Rectangle-6FE7RN6W.js.map +7 -0
- package/dist/react/ResizeCode-WAMDTKSW.js +2 -0
- package/dist/react/ResizeCode-WAMDTKSW.js.map +7 -0
- package/dist/react/ResizeShapes-LKEQTITP.js +250 -0
- package/dist/react/ResizeShapes-LKEQTITP.js.map +7 -0
- package/dist/react/SceneSerializer-4U4B24JM.js +739 -0
- package/dist/react/SceneSerializer-4U4B24JM.js.map +7 -0
- package/dist/react/Selection-VVUHY5YJ.js +34 -0
- package/dist/react/Selection-VVUHY5YJ.js.map +7 -0
- package/dist/react/SketchEngine-YA4RG3KX.js +413 -0
- package/dist/react/SketchEngine-YA4RG3KX.js.map +7 -0
- package/dist/react/TextShape-54ZJ66E3.js +8 -0
- package/dist/react/TextShape-54ZJ66E3.js.map +7 -0
- package/dist/react/UndoRedo-M2JZUBKN.js +30 -0
- package/dist/react/UndoRedo-M2JZUBKN.js.map +7 -0
- package/dist/react/ZoomPan-U3TXC5AJ.js +186 -0
- package/dist/react/ZoomPan-U3TXC5AJ.js.map +7 -0
- package/dist/react/arrowTool-CWEMIRXK.js +17 -0
- package/dist/react/arrowTool-CWEMIRXK.js.map +7 -0
- package/dist/react/boxicons-5JNJQPUP.woff +0 -0
- package/dist/react/boxicons-6NVWQSCQ.eot +0 -0
- package/dist/react/boxicons-AQ5N6WP7.woff2 +0 -0
- package/dist/react/boxicons-GDR4JU3X.ttf +0 -0
- package/dist/react/boxicons-NNFHLMOR.svg +1660 -0
- package/dist/react/chunk-2OQXI7QB.js +564 -0
- package/dist/react/chunk-2OQXI7QB.js.map +7 -0
- package/dist/react/chunk-5OUBTHHO.js +187 -0
- package/dist/react/chunk-5OUBTHHO.js.map +7 -0
- package/dist/react/chunk-6PFXZKL2.js +628 -0
- package/dist/react/chunk-6PFXZKL2.js.map +7 -0
- package/dist/react/chunk-6SFNWGGZ.js +453 -0
- package/dist/react/chunk-6SFNWGGZ.js.map +7 -0
- package/dist/react/chunk-7TZSIR6V.js +210 -0
- package/dist/react/chunk-7TZSIR6V.js.map +7 -0
- package/dist/react/chunk-AJAZC37E.js +662 -0
- package/dist/react/chunk-AJAZC37E.js.map +7 -0
- package/dist/react/chunk-BU4D2WYQ.js +1213 -0
- package/dist/react/chunk-BU4D2WYQ.js.map +7 -0
- package/dist/react/chunk-BZE4CEBG.js +747 -0
- package/dist/react/chunk-BZE4CEBG.js.map +7 -0
- package/dist/react/chunk-CB2RANCB.js +212 -0
- package/dist/react/chunk-CB2RANCB.js.map +7 -0
- package/dist/react/chunk-DNAG7ML6.js +128 -0
- package/dist/react/chunk-DNAG7ML6.js.map +7 -0
- package/dist/react/chunk-HZWLPXFN.js +198 -0
- package/dist/react/chunk-HZWLPXFN.js.map +7 -0
- package/dist/react/chunk-I6HCCIXB.js +572 -0
- package/dist/react/chunk-I6HCCIXB.js.map +7 -0
- package/dist/react/chunk-IZ5OGWGW.js +235 -0
- package/dist/react/chunk-IZ5OGWGW.js.map +7 -0
- package/dist/react/chunk-JJCJNLNN.js +1490 -0
- package/dist/react/chunk-JJCJNLNN.js.map +7 -0
- package/dist/react/chunk-JQ3IRFDP.js +222 -0
- package/dist/react/chunk-JQ3IRFDP.js.map +7 -0
- package/dist/react/chunk-L5OARZJ7.js +1134 -0
- package/dist/react/chunk-L5OARZJ7.js.map +7 -0
- package/dist/react/chunk-LHRTXNVE.js +1600 -0
- package/dist/react/chunk-LHRTXNVE.js.map +7 -0
- package/dist/react/chunk-Q2GA4MBZ.js +1653 -0
- package/dist/react/chunk-Q2GA4MBZ.js.map +7 -0
- package/dist/react/chunk-QNSE5BAY.js +519 -0
- package/dist/react/chunk-QNSE5BAY.js.map +7 -0
- package/dist/react/chunk-QXFBG7OM.js +191 -0
- package/dist/react/chunk-QXFBG7OM.js.map +7 -0
- package/dist/react/chunk-T6ZVV5ZO.js +714 -0
- package/dist/react/chunk-T6ZVV5ZO.js.map +7 -0
- package/dist/react/chunk-URB6MY46.js +974 -0
- package/dist/react/chunk-URB6MY46.js.map +7 -0
- package/dist/react/chunk-VN62KLOC.js +931 -0
- package/dist/react/chunk-VN62KLOC.js.map +7 -0
- package/dist/react/chunk-VQVEPJSA.js +158 -0
- package/dist/react/chunk-VQVEPJSA.js.map +7 -0
- package/dist/react/chunk-XISEAGBV.js +1632 -0
- package/dist/react/chunk-XISEAGBV.js.map +7 -0
- package/dist/react/chunk-YKJUBFHE.js +575 -0
- package/dist/react/chunk-YKJUBFHE.js.map +7 -0
- package/dist/react/circleTool-NUATSEI2.js +14 -0
- package/dist/react/circleTool-NUATSEI2.js.map +7 -0
- package/dist/react/codeTool-MHCB2FNB.js +38 -0
- package/dist/react/codeTool-MHCB2FNB.js.map +7 -0
- package/dist/react/eraserTool-2GS2LQCS.js +103 -0
- package/dist/react/eraserTool-2GS2LQCS.js.map +7 -0
- package/dist/react/frameTool-PWVKKXSP.js +14 -0
- package/dist/react/frameTool-PWVKKXSP.js.map +7 -0
- package/dist/react/freehandTool-SLYGASVP.js +14 -0
- package/dist/react/freehandTool-SLYGASVP.js.map +7 -0
- package/dist/react/iconTool-GPZ7O7NH.js +18 -0
- package/dist/react/iconTool-GPZ7O7NH.js.map +7 -0
- package/dist/react/imageTool-D5R4XGEU.js +15 -0
- package/dist/react/imageTool-D5R4XGEU.js.map +7 -0
- package/dist/react/index.js +5342 -0
- package/dist/react/index.js.map +7 -0
- package/dist/react/laserTool-XVMV63AV.js +239 -0
- package/dist/react/laserTool-XVMV63AV.js.map +7 -0
- package/dist/react/lineTool-WNI5EMZ5.js +14 -0
- package/dist/react/lineTool-WNI5EMZ5.js.map +7 -0
- package/dist/react/lixCode-OJMVUXXI.ttf +0 -0
- package/dist/react/lixDefault-JEAPAUJL.ttf +0 -0
- package/dist/react/lixFancy-BPXYM5CQ.ttf +0 -0
- package/dist/react/lixFont-CPKEUDVM.woff2 +0 -0
- package/dist/react/rectangleTool-U7DZ6ZTA.js +14 -0
- package/dist/react/rectangleTool-U7DZ6ZTA.js.map +7 -0
- package/dist/react/styles.css +6627 -0
- package/dist/react/textTool-M7S6F3VC.js +21 -0
- package/dist/react/textTool-M7S6F3VC.js.map +7 -0
- package/package.json +39 -5
- package/src/EngineShortcuts.js +83 -27
- package/src/core/AIRenderer.js +30 -18
- package/src/core/GraphEngine.js +64 -41
- package/src/core/MermaidFlowchartRenderer.js +153 -88
- package/src/core/MermaidSequenceRenderer.js +168 -93
- package/src/core/SceneSerializer.js +86 -2
- package/src/core/Selection.js +119 -19
- package/src/core/UndoRedo.js +82 -15
- package/src/core/ZoomPan.js +15 -5
- package/src/index.js +14 -1
- package/src/react/LixSketchCanvas.jsx +347 -0
- package/src/react/components/AppMenu.jsx +475 -0
- package/src/react/components/Footer.jsx +85 -0
- package/src/react/components/Toolbar.jsx +140 -0
- package/src/react/components/canvas/CanvasLoadingOverlay.jsx +76 -0
- package/src/react/components/canvas/ContextMenu.jsx +466 -0
- package/src/react/components/canvas/FindBar.jsx +177 -0
- package/src/react/components/canvas/ImageSourcePicker.jsx +133 -0
- package/src/react/components/canvas/MultiSelectActions.jsx +120 -0
- package/src/react/components/canvas/SVGCanvas.jsx +145 -0
- package/src/react/components/canvas/SaveStatusIndicator.jsx +29 -0
- package/src/react/components/modals/CanvasPropertiesModal.jsx +358 -0
- package/src/react/components/modals/CommandPalette.jsx +307 -0
- package/src/react/components/modals/ExportImageModal.jsx +287 -0
- package/src/react/components/modals/GraphModal.jsx +174 -0
- package/src/react/components/modals/HelpModal.jsx +208 -0
- package/src/react/components/modals/LixScriptModal.jsx +130 -0
- package/src/react/components/modals/ShortcutsModal.jsx +125 -0
- package/src/react/components/sidebars/ArrowSidebar.jsx +173 -0
- package/src/react/components/sidebars/CircleSidebar.jsx +134 -0
- package/src/react/components/sidebars/FrameSidebar.jsx +263 -0
- package/src/react/components/sidebars/IconSidebar.jsx +279 -0
- package/src/react/components/sidebars/ImageSidebar.jsx +69 -0
- package/src/react/components/sidebars/LineSidebar.jsx +109 -0
- package/src/react/components/sidebars/PaintbrushSidebar.jsx +119 -0
- package/src/react/components/sidebars/RectangleSidebar.jsx +165 -0
- package/src/react/components/sidebars/ShapeSidebar.jsx +130 -0
- package/src/react/components/sidebars/TextSidebar.jsx +174 -0
- package/src/react/hooks/inertStores.js +58 -0
- package/src/react/hooks/useSketchEngine.js +76 -0
- package/src/react/hooks/useTranslation.js +92 -0
- package/src/react/index.js +41 -0
- package/src/react/store/useSketchStore.js +234 -0
- package/src/react/store/useUIStore.js +196 -0
- package/src/react/styles/arrowSidebar.css +263 -0
- package/src/react/styles/canvasStroke.css +47 -0
- package/src/react/styles/canvasTools.css +769 -0
- package/src/react/styles/circleSidebar.css +206 -0
- package/src/react/styles/fonts/fonts.css +29 -0
- package/src/react/styles/fonts/lixCode.ttf +0 -0
- package/src/react/styles/fonts/lixDefault.ttf +0 -0
- package/src/react/styles/fonts/lixDocs.ttf +0 -0
- package/src/react/styles/fonts/lixFancy.ttf +0 -0
- package/src/react/styles/fonts/lixFont.woff2 +0 -0
- package/src/react/styles/lineSidebar.css +207 -0
- package/src/react/styles/paintbrushSidebar.css +247 -0
- package/src/react/styles/squareSidebar.css +206 -0
- package/src/react/styles/writeText.css +149 -0
- package/src/react/styles.css +175 -0
- package/src/react/toolsEnum.js +20 -0
- package/src/react/utils/toast.js +18 -0
- package/src/shapes/Frame.js +7 -1
- package/src/shapes/Line.js +11 -5
- package/src/tools/arrowTool.js +30 -4
- package/src/tools/circleTool.js +33 -9
- package/src/tools/codeTool.js +5 -3
- package/src/tools/frameTool.js +47 -7
- package/src/tools/freehandTool.js +12 -4
- package/src/tools/iconTool.js +7 -1
- package/src/tools/imageTool.js +7 -1
- package/src/tools/lineTool.js +27 -3
- package/src/tools/rectangleTool.js +45 -8
- package/src/tools/textTool.js +23 -6
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
pushCreateAction,
|
|
4
|
+
pushDeleteAction,
|
|
5
|
+
pushTransformAction
|
|
6
|
+
} from "./chunk-L5OARZJ7.js";
|
|
7
|
+
|
|
8
|
+
// src/tools/frameTool.js
|
|
9
|
+
var currentFrame = null;
|
|
10
|
+
var isResizing = false;
|
|
11
|
+
var isDragging = false;
|
|
12
|
+
var activeAnchor = null;
|
|
13
|
+
var isDrawingFrame = false;
|
|
14
|
+
var frameStrokeColor = "#888";
|
|
15
|
+
var frameStrokeThickness = 2;
|
|
16
|
+
var frameFillColor = "transparent";
|
|
17
|
+
var frameOpacity = 1;
|
|
18
|
+
var startX;
|
|
19
|
+
var startY;
|
|
20
|
+
var dragOldPosFrame = null;
|
|
21
|
+
function getSVGCoordsFromMouse(e) {
|
|
22
|
+
const viewBox = svg.viewBox.baseVal;
|
|
23
|
+
const rect = svg.getBoundingClientRect();
|
|
24
|
+
const mouseX = e.clientX - rect.left;
|
|
25
|
+
const mouseY = e.clientY - rect.top;
|
|
26
|
+
const svgX = viewBox.x + mouseX / rect.width * viewBox.width;
|
|
27
|
+
const svgY = viewBox.y + mouseY / rect.height * viewBox.height;
|
|
28
|
+
return { x: svgX, y: svgY };
|
|
29
|
+
}
|
|
30
|
+
var handleMouseDown = (e) => {
|
|
31
|
+
if (!isFrameToolActive && !isSelectionToolActive) return;
|
|
32
|
+
const { x, y } = getSVGCoordsFromMouse(e);
|
|
33
|
+
if (isFrameToolActive) {
|
|
34
|
+
isDrawingFrame = true;
|
|
35
|
+
startX = x;
|
|
36
|
+
startY = y;
|
|
37
|
+
currentFrame = new Frame(x, y, 0, 0, {
|
|
38
|
+
stroke: frameStrokeColor,
|
|
39
|
+
strokeWidth: frameStrokeThickness,
|
|
40
|
+
fill: frameFillColor,
|
|
41
|
+
opacity: frameOpacity
|
|
42
|
+
});
|
|
43
|
+
shapes.push(currentFrame);
|
|
44
|
+
currentShape = currentFrame;
|
|
45
|
+
} else if (isSelectionToolActive) {
|
|
46
|
+
for (let i = shapes.length - 1; i >= 0; i--) {
|
|
47
|
+
if (shapes[i].shapeName === "frame" && shapes[i].contains(x, y)) {
|
|
48
|
+
const clickedFrame = shapes[i];
|
|
49
|
+
let clickedContainedShape = false;
|
|
50
|
+
if (clickedFrame.containedShapes && clickedFrame.containedShapes.length > 0) {
|
|
51
|
+
for (let j = clickedFrame.containedShapes.length - 1; j >= 0; j--) {
|
|
52
|
+
const inner = clickedFrame.containedShapes[j];
|
|
53
|
+
if (inner.contains && inner.contains(x, y)) {
|
|
54
|
+
clickedContainedShape = true;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (clickedContainedShape) {
|
|
60
|
+
if (currentShape && currentShape.shapeName === "frame" && typeof currentShape.removeSelection === "function") {
|
|
61
|
+
currentShape.removeSelection();
|
|
62
|
+
}
|
|
63
|
+
currentShape = null;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (currentShape && currentShape !== clickedFrame) {
|
|
67
|
+
currentShape.removeSelection();
|
|
68
|
+
}
|
|
69
|
+
currentShape = clickedFrame;
|
|
70
|
+
currentShape.selectFrame();
|
|
71
|
+
const anchorIndex = typeof currentShape.isNearAnchor === "function" ? currentShape.isNearAnchor(x, y) : null;
|
|
72
|
+
if (anchorIndex !== null) {
|
|
73
|
+
activeAnchor = anchorIndex;
|
|
74
|
+
isResizing = true;
|
|
75
|
+
} else {
|
|
76
|
+
isDragging = true;
|
|
77
|
+
startX = x;
|
|
78
|
+
startY = y;
|
|
79
|
+
dragOldPosFrame = {
|
|
80
|
+
x: currentShape.x,
|
|
81
|
+
y: currentShape.y,
|
|
82
|
+
width: currentShape.width,
|
|
83
|
+
height: currentShape.height,
|
|
84
|
+
rotation: currentShape.rotation
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (currentShape && currentShape.shapeName === "frame") {
|
|
91
|
+
currentShape.removeSelection();
|
|
92
|
+
currentShape = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var handleMouseMove = (e) => {
|
|
97
|
+
const { x, y } = getSVGCoordsFromMouse(e);
|
|
98
|
+
if (isDrawingFrame && currentFrame) {
|
|
99
|
+
const width = Math.abs(x - startX);
|
|
100
|
+
const height = Math.abs(y - startY);
|
|
101
|
+
currentFrame.x = Math.min(startX, x);
|
|
102
|
+
currentFrame.y = Math.min(startY, y);
|
|
103
|
+
currentFrame.width = width;
|
|
104
|
+
currentFrame.height = height;
|
|
105
|
+
currentFrame.draw();
|
|
106
|
+
} else if (isDragging && currentShape && currentShape.shapeName === "frame") {
|
|
107
|
+
const dx = x - startX;
|
|
108
|
+
const dy = y - startY;
|
|
109
|
+
currentShape.move(dx, dy);
|
|
110
|
+
startX = x;
|
|
111
|
+
startY = y;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var handleMouseUp = (e) => {
|
|
115
|
+
if (isDrawingFrame && currentFrame) {
|
|
116
|
+
if (currentFrame.width < 10 || currentFrame.height < 10) {
|
|
117
|
+
currentFrame.destroy();
|
|
118
|
+
currentFrame = null;
|
|
119
|
+
currentShape = null;
|
|
120
|
+
} else {
|
|
121
|
+
pushCreateAction(currentFrame);
|
|
122
|
+
currentFrame.updateContainedShapes(true);
|
|
123
|
+
const placedFrame = currentFrame;
|
|
124
|
+
if (window.__sketchStoreApi) {
|
|
125
|
+
window.__sketchStoreApi.setActiveTool("select", { afterDraw: true });
|
|
126
|
+
} else {
|
|
127
|
+
window.isSelectionToolActive = true;
|
|
128
|
+
}
|
|
129
|
+
currentShape = placedFrame;
|
|
130
|
+
placedFrame.selectFrame();
|
|
131
|
+
}
|
|
132
|
+
isDrawingFrame = false;
|
|
133
|
+
}
|
|
134
|
+
if (isDragging && dragOldPosFrame && currentShape) {
|
|
135
|
+
const newPos = {
|
|
136
|
+
x: currentShape.x,
|
|
137
|
+
y: currentShape.y,
|
|
138
|
+
width: currentShape.width,
|
|
139
|
+
height: currentShape.height,
|
|
140
|
+
rotation: currentShape.rotation
|
|
141
|
+
};
|
|
142
|
+
pushTransformAction(currentShape, dragOldPosFrame, newPos);
|
|
143
|
+
dragOldPosFrame = null;
|
|
144
|
+
if (currentShape.shapeName === "frame") {
|
|
145
|
+
currentShape.updateClipPath();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (!isDragging) {
|
|
149
|
+
shapes.forEach((shape) => {
|
|
150
|
+
if (shape.shapeName !== "frame" && !shape.parentFrame) {
|
|
151
|
+
shapes.forEach((frame) => {
|
|
152
|
+
if (frame.shapeName === "frame") {
|
|
153
|
+
if (frame.isShapeInFrame(shape)) {
|
|
154
|
+
frame.addShapeToFrame(shape);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
isDrawingFrame = false;
|
|
162
|
+
isDragging = false;
|
|
163
|
+
isResizing = false;
|
|
164
|
+
activeAnchor = null;
|
|
165
|
+
svg.style.cursor = "default";
|
|
166
|
+
};
|
|
167
|
+
Frame.prototype.isNearAnchor = function(x, y) {
|
|
168
|
+
const anchorSize = 10 / currentZoom;
|
|
169
|
+
const anchorPositions = [
|
|
170
|
+
{ x: this.x, y: this.y },
|
|
171
|
+
{ x: this.x + this.width / 2, y: this.y },
|
|
172
|
+
{ x: this.x + this.width, y: this.y },
|
|
173
|
+
{ x: this.x + this.width, y: this.y + this.height / 2 },
|
|
174
|
+
{ x: this.x + this.width, y: this.y + this.height },
|
|
175
|
+
{ x: this.x + this.width / 2, y: this.y + this.height },
|
|
176
|
+
{ x: this.x, y: this.y + this.height },
|
|
177
|
+
{ x: this.x, y: this.y + this.height / 2 },
|
|
178
|
+
{ x: this.x + this.width / 2, y: this.y - 30 / currentZoom }
|
|
179
|
+
// Rotation handle
|
|
180
|
+
];
|
|
181
|
+
for (let i = 0; i < anchorPositions.length; i++) {
|
|
182
|
+
const pos = anchorPositions[i];
|
|
183
|
+
const distance = Math.sqrt((x - pos.x) ** 2 + (y - pos.y) ** 2);
|
|
184
|
+
if (distance <= anchorSize) {
|
|
185
|
+
return i;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
};
|
|
190
|
+
function deleteCurrentFrame() {
|
|
191
|
+
if (currentShape && currentShape.shapeName === "frame") {
|
|
192
|
+
const frame = currentShape;
|
|
193
|
+
const isDiagramFrame = !!frame._diagramType;
|
|
194
|
+
let childSnapshot = null;
|
|
195
|
+
if (!isDiagramFrame) {
|
|
196
|
+
childSnapshot = [...frame.containedShapes || []];
|
|
197
|
+
for (const child of childSnapshot) {
|
|
198
|
+
if (!child || child === frame) continue;
|
|
199
|
+
const el = child.group || child.element;
|
|
200
|
+
if (el) {
|
|
201
|
+
if (frame.clipGroup && el.parentNode === frame.clipGroup) frame.clipGroup.removeChild(el);
|
|
202
|
+
if (window.svg && el.parentNode !== window.svg) window.svg.appendChild(el);
|
|
203
|
+
}
|
|
204
|
+
child.parentFrame = null;
|
|
205
|
+
delete child.isBeingMovedByFrame;
|
|
206
|
+
}
|
|
207
|
+
frame.containedShapes = [];
|
|
208
|
+
}
|
|
209
|
+
const idx = shapes.indexOf(frame);
|
|
210
|
+
if (idx !== -1) shapes.splice(idx, 1);
|
|
211
|
+
if (!isDiagramFrame) {
|
|
212
|
+
if (frame.group && frame.group.parentNode) frame.group.parentNode.removeChild(frame.group);
|
|
213
|
+
if (frame.clipGroup && frame.clipGroup.parentNode) frame.clipGroup.parentNode.removeChild(frame.clipGroup);
|
|
214
|
+
if (frame.clipPath && frame.clipPath.parentNode) frame.clipPath.parentNode.removeChild(frame.clipPath);
|
|
215
|
+
} else if (frame.group && frame.group.parentNode) {
|
|
216
|
+
frame.group.parentNode.removeChild(frame.group);
|
|
217
|
+
}
|
|
218
|
+
if (childSnapshot) pushDeleteAction(frame, { childSnapshot });
|
|
219
|
+
else pushDeleteAction(frame);
|
|
220
|
+
currentShape = null;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
document.addEventListener("keydown", (e) => {
|
|
224
|
+
if (e.key === "Delete" && currentShape && currentShape.shapeName === "frame") {
|
|
225
|
+
deleteCurrentFrame();
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
window.Frame = Frame;
|
|
229
|
+
|
|
230
|
+
export {
|
|
231
|
+
handleMouseDown,
|
|
232
|
+
handleMouseMove,
|
|
233
|
+
handleMouseUp
|
|
234
|
+
};
|
|
235
|
+
//# sourceMappingURL=chunk-IZ5OGWGW.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/tools/frameTool.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable */\n// Frame tool event handlers - extracted from frameHolder.js\nimport { pushCreateAction, pushDeleteAction, pushTransformAction, pushFrameAttachmentAction } from '../core/UndoRedo.js';\nimport { updateAttachedArrows, cleanupAttachments } from './arrowTool.js';\n\nlet currentFrame = null;\nlet isResizing = false;\nlet isDragging = false;\nlet activeAnchor = null;\nlet isDrawingFrame = false;\nlet frameStrokeColor = \"#888\";\nlet frameStrokeThickness = 2;\nlet frameFillColor = \"transparent\";\nlet frameOpacity = 1;\nlet startX, startY;\nlet dragOldPosFrame = null;\n\nfunction getSVGCoordsFromMouse(e) {\n const viewBox = svg.viewBox.baseVal;\n const rect = svg.getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const mouseY = e.clientY - rect.top;\n const svgX = viewBox.x + (mouseX / rect.width) * viewBox.width;\n const svgY = viewBox.y + (mouseY / rect.height) * viewBox.height;\n return { x: svgX, y: svgY };\n}\n\n\n// Event handlers for frame tool\nconst handleMouseDown = (e) => {\n if (!isFrameToolActive && !isSelectionToolActive) return;\n\n const { x, y } = getSVGCoordsFromMouse(e);\n\n if (isFrameToolActive) {\n isDrawingFrame = true;\n startX = x;\n startY = y;\n currentFrame = new Frame(x, y, 0, 0, {\n stroke: frameStrokeColor,\n strokeWidth: frameStrokeThickness,\n fill: frameFillColor,\n opacity: frameOpacity\n });\n shapes.push(currentFrame);\n currentShape = currentFrame;\n } else if (isSelectionToolActive) {\n // Handle frame selection \u2014 but first check if a contained shape was clicked\n for (let i = shapes.length - 1; i >= 0; i--) {\n if (shapes[i].shapeName === 'frame' && shapes[i].contains(x, y)) {\n const clickedFrame = shapes[i];\n\n // Check if click is on a shape inside this frame \u2014 let shape handlers deal with it\n let clickedContainedShape = false;\n if (clickedFrame.containedShapes && clickedFrame.containedShapes.length > 0) {\n for (let j = clickedFrame.containedShapes.length - 1; j >= 0; j--) {\n const inner = clickedFrame.containedShapes[j];\n if (inner.contains && inner.contains(x, y)) {\n clickedContainedShape = true;\n break;\n }\n }\n }\n // If a contained shape was clicked, don't select the frame \u2014\n // and crucially, clear `currentShape` so the EventDispatcher's\n // `if (handled && prevShape && !currentShape) handled=false` gate\n // triggers and the dispatcher falls through to shape-specific\n // handlers. Without this clear, the dispatcher returns with\n // `handled=true` and the child shape is never selected (Issue\n // #22, bug #2).\n if (clickedContainedShape) {\n if (currentShape && currentShape.shapeName === 'frame'\n && typeof currentShape.removeSelection === 'function') {\n currentShape.removeSelection();\n }\n currentShape = null;\n return;\n }\n\n if (currentShape && currentShape !== clickedFrame) {\n currentShape.removeSelection();\n }\n currentShape = clickedFrame;\n currentShape.selectFrame();\n\n // Check for anchor interaction\n const anchorIndex = typeof currentShape.isNearAnchor === 'function' ? currentShape.isNearAnchor(x, y) : null;\n if (anchorIndex !== null) {\n activeAnchor = anchorIndex;\n isResizing = true;\n } else {\n isDragging = true;\n startX = x;\n startY = y;\n dragOldPosFrame = {\n x: currentShape.x,\n y: currentShape.y,\n width: currentShape.width,\n height: currentShape.height,\n rotation: currentShape.rotation\n };\n }\n return;\n }\n }\n\n // If no frame was clicked, deselect current\n if (currentShape && currentShape.shapeName === 'frame') {\n currentShape.removeSelection();\n currentShape = null;\n }\n }\n};\n\n const handleMouseMove = (e) => {\n const { x, y } = getSVGCoordsFromMouse(e);\n\n if (isDrawingFrame && currentFrame) {\n const width = Math.abs(x - startX);\n const height = Math.abs(y - startY);\n currentFrame.x = Math.min(startX, x);\n currentFrame.y = Math.min(startY, y);\n currentFrame.width = width;\n currentFrame.height = height;\n currentFrame.draw();\n } else if (isDragging && currentShape && currentShape.shapeName === 'frame') {\n const dx = x - startX;\n const dy = y - startY;\n \n // Use the frame's move method which properly handles contained shapes\n currentShape.move(dx, dy);\n \n startX = x;\n startY = y;\n }\n};\n\n const handleMouseUp = (e) => {\n if (isDrawingFrame && currentFrame) {\n // Check if frame is too small\n if (currentFrame.width < 10 || currentFrame.height < 10) {\n currentFrame.destroy();\n currentFrame = null;\n currentShape = null;\n } else {\n pushCreateAction(currentFrame);\n // Check for shapes that should be contained in the new frame\n currentFrame.updateContainedShapes(true); // Apply clipping immediately for new frames\n\n // Auto-select the new frame and switch to selection tool\n const placedFrame = currentFrame;\n if (window.__sketchStoreApi) {\n window.__sketchStoreApi.setActiveTool('select', { afterDraw: true });\n } else {\n window.isSelectionToolActive = true;\n }\n currentShape = placedFrame;\n placedFrame.selectFrame();\n }\n isDrawingFrame = false;\n }\n\n if (isDragging && dragOldPosFrame && currentShape) {\n const newPos = {\n x: currentShape.x,\n y: currentShape.y,\n width: currentShape.width,\n height: currentShape.height,\n rotation: currentShape.rotation\n };\n pushTransformAction(currentShape, dragOldPosFrame, newPos);\n dragOldPosFrame = null;\n \n // Update frame containment after moving frame (but don't re-move contained shapes)\n if (currentShape.shapeName === 'frame') {\n currentShape.updateClipPath();\n }\n }\n\n // Only check frame containment for shapes that aren't already in frames\n if (!isDragging) {\n shapes.forEach(shape => {\n if (shape.shapeName !== 'frame' && !shape.parentFrame) {\n shapes.forEach(frame => {\n if (frame.shapeName === 'frame') {\n if (frame.isShapeInFrame(shape)) {\n frame.addShapeToFrame(shape);\n }\n }\n });\n }\n });\n }\n\n isDrawingFrame = false;\n isDragging = false;\n isResizing = false;\n activeAnchor = null;\n svg.style.cursor = 'default';\n};\n\nFrame.prototype.isNearAnchor = function(x, y) {\n const anchorSize = 10 / currentZoom;\n \n // Define anchor positions\n const anchorPositions = [\n { x: this.x, y: this.y },\n { x: this.x + this.width / 2, y: this.y },\n { x: this.x + this.width, y: this.y },\n { x: this.x + this.width, y: this.y + this.height / 2 },\n { x: this.x + this.width, y: this.y + this.height },\n { x: this.x + this.width / 2, y: this.y + this.height },\n { x: this.x, y: this.y + this.height },\n { x: this.x, y: this.y + this.height / 2 },\n { x: this.x + this.width / 2, y: this.y - 30 / currentZoom } // Rotation handle\n ];\n\n for (let i = 0; i < anchorPositions.length; i++) {\n const pos = anchorPositions[i];\n const distance = Math.sqrt((x - pos.x) ** 2 + (y - pos.y) ** 2);\n if (distance <= anchorSize) {\n return i;\n }\n }\n return null;\n};\n\n// Delete functionality\nfunction deleteCurrentFrame() {\n if (currentShape && currentShape.shapeName === 'frame') {\n const frame = currentShape;\n const isDiagramFrame = !!frame._diagramType;\n\n // Issue #24 bug #7: regular frame \u2192 orphan children + snapshot\n // (mirrors deleteSelectedShapes / EngineShortcuts).\n let childSnapshot = null;\n if (!isDiagramFrame) {\n childSnapshot = [...(frame.containedShapes || [])];\n for (const child of childSnapshot) {\n if (!child || child === frame) continue;\n const el = child.group || child.element;\n if (el) {\n if (frame.clipGroup && el.parentNode === frame.clipGroup) frame.clipGroup.removeChild(el);\n if (window.svg && el.parentNode !== window.svg) window.svg.appendChild(el);\n }\n child.parentFrame = null;\n delete child.isBeingMovedByFrame;\n }\n frame.containedShapes = [];\n }\n\n const idx = shapes.indexOf(frame);\n if (idx !== -1) shapes.splice(idx, 1);\n\n if (!isDiagramFrame) {\n if (frame.group && frame.group.parentNode) frame.group.parentNode.removeChild(frame.group);\n if (frame.clipGroup && frame.clipGroup.parentNode) frame.clipGroup.parentNode.removeChild(frame.clipGroup);\n if (frame.clipPath && frame.clipPath.parentNode) frame.clipPath.parentNode.removeChild(frame.clipPath);\n } else if (frame.group && frame.group.parentNode) {\n frame.group.parentNode.removeChild(frame.group);\n }\n\n if (childSnapshot) pushDeleteAction(frame, { childSnapshot });\n else pushDeleteAction(frame);\n currentShape = null;\n }\n}\n\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Delete' && currentShape && currentShape.shapeName === 'frame') {\n deleteCurrentFrame();\n }\n});\n\nwindow.Frame = Frame;\n\nexport {\n handleMouseDown as handleMouseDownFrame,\n handleMouseMove as handleMouseMoveFrame,\n handleMouseUp as handleMouseUpFrame\n};"],
|
|
5
|
+
"mappings": ";;;;;;;;AAKA,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,mBAAmB;AACvB,IAAI,uBAAuB;AAC3B,IAAI,iBAAiB;AACrB,IAAI,eAAe;AACnB,IAAI;AAAJ,IAAY;AACZ,IAAI,kBAAkB;AAEtB,SAAS,sBAAsB,GAAG;AAC9B,QAAM,UAAU,IAAI,QAAQ;AAC5B,QAAM,OAAO,IAAI,sBAAsB;AACvC,QAAM,SAAS,EAAE,UAAU,KAAK;AAChC,QAAM,SAAS,EAAE,UAAU,KAAK;AAChC,QAAM,OAAO,QAAQ,IAAK,SAAS,KAAK,QAAS,QAAQ;AACzD,QAAM,OAAO,QAAQ,IAAK,SAAS,KAAK,SAAU,QAAQ;AAC1D,SAAO,EAAE,GAAG,MAAM,GAAG,KAAK;AAC9B;AAIA,IAAM,kBAAkB,CAAC,MAAM;AAC3B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