@elixpo/lixsketch 5.4.7 → 5.5.1
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 +5349 -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 +482 -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,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/Selection.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable */\n// Multi-selection system - copied from selection.js\n\nimport { cleanupAttachments } from '../tools/arrowTool.js';\nimport { pushTransformAction, pushFrameAttachmentAction, pushDeleteAction } from './UndoRedo.js';\nimport { calculateSnap, clearSnapGuides } from './SnapGuides.js';\n\nlet isMultiSelecting = false;\nlet multiSelectionStart = { x: 0, y: 0 };\nlet multiSelectionRect = null;\nlet isDraggingMultiSelection = false;\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\nfunction createMultiSelectionRect(startX, startY) {\n multiSelectionRect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n multiSelectionRect.setAttribute('x', startX);\n multiSelectionRect.setAttribute('y', startY);\n multiSelectionRect.setAttribute('width', 0);\n multiSelectionRect.setAttribute('height', 0);\n multiSelectionRect.setAttribute('fill', 'rgba(91, 87, 209, 0.1)');\n multiSelectionRect.setAttribute('stroke', '#5B57D1');\n multiSelectionRect.setAttribute('stroke-width', 1);\n multiSelectionRect.setAttribute('stroke-dasharray', '4 2');\n multiSelectionRect.setAttribute('style', 'pointer-events: none;');\n svg.appendChild(multiSelectionRect);\n}\n\nfunction updateMultiSelectionRect(currentX, currentY) {\n if (!multiSelectionRect) return;\n\n const x = Math.min(multiSelectionStart.x, currentX);\n const y = Math.min(multiSelectionStart.y, currentY);\n const width = Math.abs(currentX - multiSelectionStart.x);\n const height = Math.abs(currentY - multiSelectionStart.y);\n\n multiSelectionRect.setAttribute('x', x);\n multiSelectionRect.setAttribute('y', y);\n multiSelectionRect.setAttribute('width', width);\n multiSelectionRect.setAttribute('height', height);\n}\n\nfunction removeMultiSelectionRect() {\n if (multiSelectionRect && multiSelectionRect.parentNode) {\n multiSelectionRect.parentNode.removeChild(multiSelectionRect);\n }\n multiSelectionRect = null;\n // Clean up any drag-select highlights\n clearDragSelectHighlights();\n}\n\n// Track elements highlighted during drag-select\nlet dragSelectHighlights = [];\n\nfunction highlightShapesInSelectionRect(currentX, currentY) {\n // Clear previous highlights\n clearDragSelectHighlights();\n\n if (!multiSelectionStart) return;\n\n const selBounds = {\n x: Math.min(multiSelectionStart.x, currentX),\n y: Math.min(multiSelectionStart.y, currentY),\n width: Math.abs(currentX - multiSelectionStart.x),\n height: Math.abs(currentY - multiSelectionStart.y)\n };\n\n // Minimum size check to avoid highlighting on click\n if (selBounds.width < 5 && selBounds.height < 5) return;\n\n if (typeof shapes !== 'undefined') {\n shapes.forEach(shape => {\n if (isShapeInSelectionRect(shape, selBounds)) {\n // Add a semi-transparent overlay to the shape's group\n if (shape.group && typeof shape.group.getBBox === 'function') {\n let bbox;\n try { bbox = shape.group.getBBox(); } catch { return; }\n const overlay = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n overlay.setAttribute('x', bbox.x - 2);\n overlay.setAttribute('y', bbox.y - 2);\n overlay.setAttribute('width', bbox.width + 4);\n overlay.setAttribute('height', bbox.height + 4);\n overlay.setAttribute('fill', 'rgba(91, 87, 209, 0.12)');\n overlay.setAttribute('stroke', '#5B57D1');\n overlay.setAttribute('stroke-width', '1');\n overlay.setAttribute('stroke-opacity', '0.4');\n overlay.setAttribute('rx', '3');\n overlay.setAttribute('style', 'pointer-events: none;');\n overlay.setAttribute('class', 'drag-select-highlight');\n shape.group.appendChild(overlay);\n dragSelectHighlights.push(overlay);\n }\n }\n });\n }\n}\n\nfunction clearDragSelectHighlights() {\n dragSelectHighlights.forEach(el => {\n if (el.parentNode) el.parentNode.removeChild(el);\n });\n dragSelectHighlights = [];\n}\n\nfunction isShapeInSelectionRect(shape, selectionBounds) {\n let shapeBounds;\n\n switch (shape.shapeName) {\n case 'rectangle':\n shapeBounds = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n break;\n case 'circle':\n shapeBounds = {\n x: shape.x - shape.rx,\n y: shape.y - shape.ry,\n width: shape.rx * 2,\n height: shape.ry * 2\n };\n break;\n case 'line':\n shapeBounds = {\n x: Math.min(shape.startPoint.x, shape.endPoint.x),\n y: Math.min(shape.startPoint.y, shape.endPoint.y),\n width: Math.abs(shape.endPoint.x - shape.startPoint.x),\n height: Math.abs(shape.endPoint.y - shape.startPoint.y)\n };\n break;\n case 'arrow':\n const minX = Math.min(shape.startPoint.x, shape.endPoint.x);\n const minY = Math.min(shape.startPoint.y, shape.endPoint.y);\n const maxX = Math.max(shape.startPoint.x, shape.endPoint.x);\n const maxY = Math.max(shape.startPoint.y, shape.endPoint.y);\n shapeBounds = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n break;\n case 'freehandStroke':\n shapeBounds = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n break;\n case 'text':\n case 'code':\n const textOrCodeEl = shape.group ? shape.group.querySelector('text') : null;\n if (textOrCodeEl && shape.group.style.display !== 'none') {\n try {\n const bbox = textOrCodeEl.getBBox();\n const transform = shape.group.transform.baseVal.consolidate();\n const matrix = transform ? transform.matrix : { e: 0, f: 0 };\n shapeBounds = {\n x: bbox.x + matrix.e,\n y: bbox.y + matrix.f,\n width: bbox.width,\n height: bbox.height\n };\n } catch {\n shapeBounds = { x: 0, y: 0, width: 0, height: 0 };\n }\n } else {\n shapeBounds = { x: 0, y: 0, width: 0, height: 0 };\n }\n break;\n case 'image':\n if (shape.element) {\n shapeBounds = {\n x: parseFloat(shape.element.getAttribute('x')),\n y: parseFloat(shape.element.getAttribute('y')),\n width: parseFloat(shape.element.getAttribute('width')),\n height: parseFloat(shape.element.getAttribute('height'))\n };\n } else {\n shapeBounds = { x: shape.x, y: shape.y, width: shape.width, height: shape.height };\n }\n break;\n case 'frame':\n shapeBounds = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n break;\n case 'icon':\n shapeBounds = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n break;\n default:\n shapeBounds = {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0\n };\n }\n\n return !(selectionBounds.x > shapeBounds.x + shapeBounds.width ||\n selectionBounds.x + selectionBounds.width < shapeBounds.x ||\n selectionBounds.y > shapeBounds.y + shapeBounds.height ||\n selectionBounds.y + selectionBounds.height < shapeBounds.y);\n}\n\nclass MultiSelection {\n constructor() {\n this.selectedShapes = new Set();\n this.group = null;\n this.anchors = [];\n this.outline = null;\n this.rotationAnchor = null;\n this.rotationLine = null;\n this.selectionPadding = 12;\n this.bounds = null;\n this.initialPositions = new Map();\n\n this.isDragging = false;\n this.isResizing = false;\n this.isRotating = false;\n this.resizingAnchorIndex = null;\n this.dragStart = { x: 0, y: 0 };\n this.rotationCenter = { x: 0, y: 0 };\n this.startRotationMouseAngle = 0;\n this._undoSnapshots = new Map(); // Stores initial state for undo tracking\n this.initialRotation = 0;\n }\n\n // Capture current state of all selected shapes for undo\n _snapshotForUndo() {\n this._undoSnapshots.clear();\n this.selectedShapes.forEach(shape => {\n this._undoSnapshots.set(shape, this._captureShapeState(shape));\n });\n }\n\n _captureShapeState(shape) {\n switch (shape.shapeName) {\n case 'line':\n case 'arrow':\n return {\n startPoint: { ...shape.startPoint },\n endPoint: { ...shape.endPoint },\n x: shape.x, y: shape.y,\n width: shape.width || 0, height: shape.height || 0,\n rotation: shape.rotation || 0\n };\n case 'circle':\n return { x: shape.x, y: shape.y, rx: shape.rx, ry: shape.ry, rotation: shape.rotation || 0, width: shape.width, height: shape.height };\n case 'freehandStroke':\n return { x: shape.x, y: shape.y, width: shape.width, height: shape.height, rotation: shape.rotation || 0, points: JSON.parse(JSON.stringify(shape.points)) };\n default:\n return { x: shape.x || 0, y: shape.y || 0, width: shape.width || 0, height: shape.height || 0, rotation: shape.rotation || 0 };\n }\n }\n\n // Push undo actions for all shapes that changed\n _pushUndoForAll() {\n this.selectedShapes.forEach(shape => {\n const oldState = this._undoSnapshots.get(shape);\n if (!oldState) return;\n const newState = this._captureShapeState(shape);\n // Check if anything actually changed\n const changed = Object.keys(oldState).some(key => {\n if (key === 'points' || key === 'startPoint' || key === 'endPoint') return JSON.stringify(oldState[key]) !== JSON.stringify(newState[key]);\n return oldState[key] !== newState[key];\n });\n if (changed) {\n pushTransformAction(shape, oldState, newState);\n }\n });\n this._undoSnapshots.clear();\n }\n\n addShape(shape) {\n this.selectedShapes.add(shape);\n shape.isSelected = true;\n this.updateControls();\n }\n\n removeShape(shape) {\n this.selectedShapes.delete(shape);\n shape.isSelected = false;\n if (this.selectedShapes.size === 0) {\n this.clearSelection();\n } else {\n this.updateControls();\n }\n }\n\n clearSelection() {\n this.selectedShapes.forEach(shape => {\n shape.isSelected = false;\n if (typeof shape.removeSelection === 'function') {\n shape.removeSelection();\n }\n });\n this.selectedShapes.clear();\n this.removeControls();\n if (typeof currentShape !== 'undefined') {\n currentShape = null;\n }\n if (typeof disableAllSideBars === 'function') {\n disableAllSideBars();\n }\n }\n\n selectShapesInRect(selectionBounds) {\n this.clearSelection();\n\n if (typeof shapes !== 'undefined') {\n shapes.forEach(shape => {\n if (isShapeInSelectionRect(shape, selectionBounds)) {\n this.addShape(shape);\n }\n });\n }\n\n if (this.selectedShapes.size === 1) {\n if (typeof currentShape !== 'undefined') {\n currentShape = Array.from(this.selectedShapes)[0];\n }\n } else {\n if (typeof currentShape !== 'undefined') {\n currentShape = null;\n }\n }\n }\n\n getBounds() {\n if (this.selectedShapes.size === 0) return null;\n\n let minX = Infinity, minY = Infinity;\n let maxX = -Infinity, maxY = -Infinity;\n\n this.selectedShapes.forEach(shape => {\n const shapeBounds = this.getShapeBounds(shape);\n minX = Math.min(minX, shapeBounds.x);\n minY = Math.min(minY, shapeBounds.y);\n maxX = Math.max(maxX, shapeBounds.x + shapeBounds.width);\n maxY = Math.max(maxY, shapeBounds.y + shapeBounds.height);\n });\n\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n }\n\n getShapeBounds(shape) {\n switch (shape.shapeName) {\n case 'rectangle':\n case 'frame':\n return {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n case 'circle':\n return {\n x: shape.x - shape.rx,\n y: shape.y - shape.ry,\n width: shape.rx * 2,\n height: shape.ry * 2\n };\n case 'line':\n case 'arrow':\n return {\n x: Math.min(shape.startPoint.x, shape.endPoint.x),\n y: Math.min(shape.startPoint.y, shape.endPoint.y),\n width: Math.abs(shape.endPoint.x - shape.startPoint.x),\n height: Math.abs(shape.endPoint.y - shape.startPoint.y)\n };\n case 'freehandStroke':\n return {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n case 'text':\n const textElement = shape.group ? shape.group.querySelector('text') : null;\n if (textElement) {\n const bbox = textElement.getBBox();\n const transform = shape.group.transform.baseVal.consolidate();\n const matrix = transform ? transform.matrix : { e: 0, f: 0 };\n return {\n x: bbox.x + matrix.e,\n y: bbox.y + matrix.f,\n width: bbox.width,\n height: bbox.height\n };\n }\n return { x: 0, y: 0, width: 0, height: 0 };\n case 'image':\n if (shape.element) {\n return {\n x: parseFloat(shape.element.getAttribute('x')),\n y: parseFloat(shape.element.getAttribute('y')),\n width: parseFloat(shape.element.getAttribute('width')),\n height: parseFloat(shape.element.getAttribute('height'))\n };\n }\n return { x: shape.x, y: shape.y, width: shape.width, height: shape.height };\n case 'icon':\n return {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height\n };\n default:\n return {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0\n };\n }\n }\n\n updateControls() {\n this.removeControls();\n if (this.selectedShapes.size === 0) return;\n\n this.bounds = this.getBounds();\n if (!this.bounds) return;\n\n this.createControls();\n }\n\n createControls() {\n this.createRotatedControls(0);\n }\n\n createOutline(x, y, width, height) {\n const zoom = window.currentZoom || 1;\n const outlinePoints = [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y]\n ];\n\n this.outline = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');\n this.outline.setAttribute('points', outlinePoints.map(p => p.join(',')).join(' '));\n this.outline.setAttribute('fill', 'none');\n this.outline.setAttribute('stroke', '#5B57D1');\n this.outline.setAttribute('stroke-width', 2);\n this.outline.setAttribute('stroke-dasharray', `${8 / zoom} ${4 / zoom}`);\n this.outline.setAttribute('vector-effect', 'non-scaling-stroke');\n this.outline.setAttribute('style', 'pointer-events: none;');\n this.group.appendChild(this.outline);\n }\n\n createResizeAnchors(x, y, width, height) {\n const zoom = window.currentZoom || 1;\n const anchorSize = 12 / zoom;\n const anchorPositions = [\n { x: x, y: y, index: 0 },\n { x: x + width, y: y, index: 1 },\n { x: x, y: y + height, index: 2 },\n { x: x + width, y: y + height, index: 3 },\n { x: x + width / 2, y: y, index: 4 },\n { x: x + width / 2, y: y + height, index: 5 },\n { x: x, y: y + height / 2, index: 6 },\n { x: x + width, y: y + height / 2, index: 7 }\n ];\n\n this.anchors = [];\n anchorPositions.forEach((pos) => {\n const anchor = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n anchor.setAttribute('x', pos.x - anchorSize / 2);\n anchor.setAttribute('y', pos.y - anchorSize / 2);\n anchor.setAttribute('width', anchorSize);\n anchor.setAttribute('height', anchorSize);\n anchor.setAttribute('class', 'multi-selection-anchor');\n anchor.setAttribute('data-index', pos.index);\n anchor.setAttribute('fill', '#121212');\n anchor.setAttribute('stroke', '#5B57D1');\n anchor.setAttribute('stroke-width', 2);\n anchor.setAttribute('vector-effect', 'non-scaling-stroke');\n anchor.setAttribute('style', 'pointer-events: all; cursor: pointer;');\n\n const cursors = ['nw-resize', 'ne-resize', 'sw-resize', 'se-resize', 'n-resize', 's-resize', 'w-resize', 'e-resize'];\n anchor.style.cursor = cursors[pos.index];\n\n anchor.addEventListener('pointerdown', (e) => this.startResize(e, pos.index));\n\n this.group.appendChild(anchor);\n this.anchors.push(anchor);\n });\n }\n\n createRotationAnchor(x, y, width, height) {\n const zoom = window.currentZoom || 1;\n const rotationAnchorPos = { x: x + width / 2, y: y - 30 / zoom };\n\n this.rotationAnchor = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n this.rotationAnchor.setAttribute('cx', rotationAnchorPos.x);\n this.rotationAnchor.setAttribute('cy', rotationAnchorPos.y);\n this.rotationAnchor.setAttribute('r', 8 / zoom);\n this.rotationAnchor.setAttribute('class', 'multi-selection-rotation-anchor');\n this.rotationAnchor.setAttribute('fill', '#121212');\n this.rotationAnchor.setAttribute('stroke', '#5B57D1');\n this.rotationAnchor.setAttribute('stroke-width', 2);\n this.rotationAnchor.setAttribute('vector-effect', 'non-scaling-stroke');\n this.rotationAnchor.setAttribute('style', 'pointer-events: all; cursor: grab;');\n\n this.rotationAnchor.addEventListener('pointerdown', (e) => this.startRotation(e));\n\n this.rotationLine = document.createElementNS('http://www.w3.org/2000/svg', 'line');\n this.rotationLine.setAttribute('x1', rotationAnchorPos.x);\n this.rotationLine.setAttribute('y1', rotationAnchorPos.y);\n this.rotationLine.setAttribute('x2', x + width / 2);\n this.rotationLine.setAttribute('y2', y);\n this.rotationLine.setAttribute('stroke', '#5B57D1');\n this.rotationLine.setAttribute('stroke-width', 1);\n this.rotationLine.setAttribute('stroke-dasharray', `${3 / zoom} ${3 / zoom}`);\n this.rotationLine.setAttribute('vector-effect', 'non-scaling-stroke');\n this.rotationLine.setAttribute('style', 'pointer-events: none;');\n\n this.group.appendChild(this.rotationLine);\n this.group.appendChild(this.rotationAnchor);\n }\n\n removeControls() {\n if (this.group && this.group.parentNode) {\n this.group.parentNode.removeChild(this.group);\n }\n this.group = null;\n this.anchors = [];\n this.outline = null;\n this.rotationAnchor = null;\n this.rotationLine = null;\n }\n\n isPointInBounds(x, y) {\n if (!this.bounds) return false;\n\n const padding = this.selectionPadding;\n return x >= this.bounds.x - padding && x <= this.bounds.x + this.bounds.width + padding &&\n y >= this.bounds.y - padding && y <= this.bounds.y + this.bounds.height + padding;\n }\n\n move(dx, dy) {\n this.selectedShapes.forEach(shape => {\n // Skip shapes whose parent frame is also selected \u2014 the frame's move()\n // will already move them, so moving them independently causes double-move offset\n if (shape.parentFrame && this.selectedShapes.has(shape.parentFrame)) {\n return;\n }\n\n if (typeof shape.move === 'function') {\n shape.move(dx, dy);\n }\n\n if (typeof shape.updateAttachedArrows === 'function') {\n shape.updateAttachedArrows();\n }\n });\n\n this.updateControls();\n}\n\n startRotation(e) {\n e.stopPropagation();\n e.preventDefault();\n\n this.isRotating = true;\n\n const currentBounds = this.getBounds();\n this.rotationCenter = {\n x: currentBounds.x + currentBounds.width / 2,\n y: currentBounds.y + currentBounds.height / 2\n };\n\n const { x: mouseX, y: mouseY } = getSVGCoordsFromMouse(e);\n this.startRotationMouseAngle = Math.atan2(mouseY - this.rotationCenter.y, mouseX - this.rotationCenter.x) * 180 / Math.PI;\n\n this.storeInitialPositions();\n\n // Snapshot for undo tracking\n this._snapshotForUndo();\n\n const onMouseMove = (event) => {\n if (this.isRotating) {\n this.handleRotation(event);\n }\n };\n\n const onMouseUp = () => {\n this.isRotating = false;\n this.initialPositions.clear();\n\n // Push undo for all rotated shapes\n this._pushUndoForAll();\n\n if (typeof svg !== 'undefined') {\n svg.removeEventListener('pointermove', onMouseMove);\n svg.removeEventListener('pointerup', onMouseUp);\n svg.style.cursor = 'default';\n }\n };\n\n if (typeof svg !== 'undefined') {\n svg.addEventListener('pointermove', onMouseMove);\n svg.addEventListener('pointerup', onMouseUp);\n svg.style.cursor = 'grabbing';\n }\n }\n\n storeInitialPositions() {\n this.initialPositions.clear();\n\n const initialBounds = this.getBounds();\n this.initialPositions.set('initialBounds', {\n x: initialBounds.x,\n y: initialBounds.y,\n width: initialBounds.width,\n height: initialBounds.height\n });\n\n this.selectedShapes.forEach(shape => {\n let shapeData;\n\n let shapeCenterX, shapeCenterY;\n\n switch (shape.shapeName) {\n case 'rectangle':\n case 'frame':\n shapeCenterX = shape.x + shape.width / 2;\n shapeCenterY = shape.y + shape.height / 2;\n shapeData = {\n x: shape.x,\n y: shape.y,\n width: shape.width || 0,\n height: shape.height || 0,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y\n };\n break;\n case 'icon':\n shapeCenterX = shape.x + shape.width / 2;\n shapeCenterY = shape.y + shape.height / 2;\n shapeData = {\n x: shape.x,\n y: shape.y,\n width: shape.width || 0,\n height: shape.height || 0,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y\n };\n break;\n\n case 'circle':\n shapeCenterX = shape.x;\n shapeCenterY = shape.y;\n shapeData = {\n x: shape.x,\n y: shape.y,\n rx: shape.rx || 0,\n ry: shape.ry || 0,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y\n };\n break;\n\n case 'line':\n case 'arrow':\n shapeData = {\n startPoint: { ...shape.startPoint },\n endPoint: { ...shape.endPoint },\n relativeStartX: shape.startPoint.x - this.rotationCenter.x,\n relativeStartY: shape.startPoint.y - this.rotationCenter.y,\n relativeEndX: shape.endPoint.x - this.rotationCenter.x,\n relativeEndY: shape.endPoint.y - this.rotationCenter.y\n };\n break;\n\n case 'freehandStroke':\n if (!shape.points || !Array.isArray(shape.points) || shape.points.length === 0) {\n console.warn('FreehandStroke has invalid points array');\n return;\n }\n\n const validPoints = shape.points.filter(point =>\n Array.isArray(point) &&\n point.length >= 2 &&\n typeof point[0] === 'number' &&\n typeof point[1] === 'number' &&\n !isNaN(point[0]) &&\n !isNaN(point[1])\n );\n\n if (validPoints.length === 0) {\n console.warn('FreehandStroke has no valid points');\n return;\n }\n\n if (typeof shape.updateBoundingBox === 'function') {\n shape.updateBoundingBox();\n }\n\n const boundingBox = this.getShapeBounds(shape);\n\n shapeData = {\n x: boundingBox.x || 0,\n y: boundingBox.y || 0,\n width: boundingBox.width || 0,\n height: boundingBox.height || 0,\n points: validPoints.map(point => [point[0], point[1], point[2] || 0.5]),\n relativePoints: validPoints.map(point => [\n point[0] - this.rotationCenter.x,\n point[1] - this.rotationCenter.y,\n point[2] || 0.5\n ]),\n boundingBox: { ...boundingBox }\n };\n break;\n\n case 'text':\n const textBounds = this.getShapeBounds(shape);\n shapeCenterX = textBounds.x + textBounds.width / 2;\n shapeCenterY = textBounds.y + textBounds.height / 2;\n\n const currentTransform = shape.group.transform.baseVal.consolidate();\n const currentX = currentTransform ? currentTransform.matrix.e : 0;\n const currentY = currentTransform ? currentTransform.matrix.f : 0;\n\n shapeData = {\n x: currentX,\n y: currentY,\n width: shape.width || textBounds.width,\n height: shape.height || textBounds.height,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y,\n visualBounds: textBounds,\n transformX: currentX,\n transformY: currentY\n };\n break;\n\n case 'image':\n shapeCenterX = shape.x + (shape.width || 0) / 2;\n shapeCenterY = shape.y + (shape.height || 0) / 2;\n shapeData = {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y\n };\n break;\n\n default:\n shapeCenterX = (shape.x || 0) + (shape.width || 0) / 2;\n shapeCenterY = (shape.y || 0) + (shape.height || 0) / 2;\n shapeData = {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0,\n rotation: shape.rotation || 0,\n centerX: shapeCenterX,\n centerY: shapeCenterY,\n relativeX: shapeCenterX - this.rotationCenter.x,\n relativeY: shapeCenterY - this.rotationCenter.y\n };\n }\n\n if (shapeData) {\n this.initialPositions.set(shape, shapeData);\n }\n });\n }\n\n handleRotation(e) {\n const { x: mouseX, y: mouseY } = getSVGCoordsFromMouse(e);\n const currentMouseAngle = Math.atan2(mouseY - this.rotationCenter.y, mouseX - this.rotationCenter.x) * 180 / Math.PI;\n const angleDiff = currentMouseAngle - this.startRotationMouseAngle;\n const angleRad = angleDiff * Math.PI / 180;\n const cosAngle = Math.cos(angleRad);\n const sinAngle = Math.sin(angleRad);\n\n this.selectedShapes.forEach(shape => {\n const initialData = this.initialPositions.get(shape);\n if (!initialData) return;\n\n if (typeof shape.removeSelection === 'function') {\n shape.removeSelection();\n }\n\n switch (shape.shapeName) {\n case 'rectangle':\n case 'frame':\n case 'image':\n case 'icon':\n const newCenterX = this.rotationCenter.x + (initialData.relativeX * cosAngle - initialData.relativeY * sinAngle);\n const newCenterY = this.rotationCenter.y + (initialData.relativeX * sinAngle + initialData.relativeY * cosAngle);\n\n shape.x = newCenterX - initialData.width / 2;\n shape.y = newCenterY - initialData.height / 2;\n shape.rotation = (initialData.rotation || 0) + angleDiff;\n\n if (typeof shape.rotate === 'function') {\n shape.rotate(shape.rotation);\n }\n if (typeof shape.draw === 'function') {\n shape.draw();\n }\n break;\n\n case 'text':\n const newTextCenterX = this.rotationCenter.x + (initialData.relativeX * cosAngle - initialData.relativeY * sinAngle);\n const newTextCenterY = this.rotationCenter.y + (initialData.relativeX * sinAngle + initialData.relativeY * cosAngle);\n\n const textElement = shape.group.querySelector('text');\n if (textElement) {\n const initialBbox = initialData.visualBounds;\n\n const newTransformX = newTextCenterX - initialBbox.width / 2;\n const newTransformY = newTextCenterY - initialBbox.height / 2;\n\n const newRotation = (initialData.rotation || 0) + angleDiff;\n\n const textCenterX = initialBbox.width / 2;\n const textCenterY = initialBbox.height / 2;\n\n shape.group.setAttribute('transform',\n `translate(${newTransformX}, ${newTransformY}) rotate(${newRotation}, ${textCenterX}, ${textCenterY})`\n );\n\n shape.x = newTransformX;\n shape.y = newTransformY;\n shape.rotation = newRotation;\n }\n\n if (typeof shape.draw === 'function') {\n shape.draw();\n }\n break;\n\n case 'circle':\n const newCircleCenterX = this.rotationCenter.x + (initialData.relativeX * cosAngle - initialData.relativeY * sinAngle);\n const newCircleCenterY = this.rotationCenter.y + (initialData.relativeX * sinAngle + initialData.relativeY * cosAngle);\n\n shape.x = newCircleCenterX;\n shape.y = newCircleCenterY;\n shape.rotation = (initialData.rotation || 0) + angleDiff;\n\n if (typeof shape.rotate === 'function') {\n shape.rotate(shape.rotation);\n }\n if (typeof shape.draw === 'function') {\n shape.draw();\n }\n break;\n\n case 'line':\n case 'arrow':\n const newStartX = this.rotationCenter.x + (initialData.relativeStartX * cosAngle - initialData.relativeStartY * sinAngle);\n const newStartY = this.rotationCenter.y + (initialData.relativeStartX * sinAngle + initialData.relativeStartY * cosAngle);\n const newEndX = this.rotationCenter.x + (initialData.relativeEndX * cosAngle - initialData.relativeEndY * sinAngle);\n const newEndY = this.rotationCenter.y + (initialData.relativeEndX * sinAngle + initialData.relativeEndY * cosAngle);\n\n shape.startPoint.x = newStartX;\n shape.startPoint.y = newStartY;\n shape.endPoint.x = newEndX;\n shape.endPoint.y = newEndY;\n\n if (shape.shapeName === 'arrow' && shape.arrowCurved && typeof shape.initializeCurveControlPoints === 'function') {\n shape.initializeCurveControlPoints();\n }\n if (typeof shape.draw === 'function') {\n shape.draw();\n }\n break;\n\n case 'freehandStroke':\n if (!initialData.relativePoints || !Array.isArray(initialData.relativePoints)) {\n console.warn('FreehandStroke missing valid relativePoints');\n break;\n }\n\n const rotatedPoints = initialData.relativePoints.map(relPoint => {\n if (!Array.isArray(relPoint) || relPoint.length < 2 ||\n typeof relPoint[0] !== 'number' || typeof relPoint[1] !== 'number' ||\n isNaN(relPoint[0]) || isNaN(relPoint[1])) {\n console.warn('Invalid relative point:', relPoint);\n return [0, 0, 0.5];\n }\n\n const newX = this.rotationCenter.x + (relPoint[0] * cosAngle - relPoint[1] * sinAngle);\n const newY = this.rotationCenter.y + (relPoint[0] * sinAngle + relPoint[1] * cosAngle);\n\n if (isNaN(newX) || isNaN(newY)) {\n console.warn('Generated NaN coordinates:', { newX, newY, relPoint, rotationCenter: this.rotationCenter });\n return [0, 0, 0.5];\n }\n\n return [newX, newY, relPoint[2] || 0.5];\n });\n\n shape.points = rotatedPoints.filter(point =>\n Array.isArray(point) &&\n point.length >= 2 &&\n typeof point[0] === 'number' &&\n typeof point[1] === 'number' &&\n !isNaN(point[0]) &&\n !isNaN(point[1])\n );\n\n if (shape.points.length === 0) {\n console.warn('No valid points after rotation');\n shape.points = [[0, 0, 0.5]];\n }\n\n if (typeof shape.updateBoundingBox === 'function') {\n shape.updateBoundingBox();\n }\n if (typeof shape.draw === 'function') {\n shape.draw();\n }\n break;\n }\n\n if (typeof shape.updateAttachedArrows === 'function') {\n shape.updateAttachedArrows();\n }\n });\n\n this.updateControlsAfterRotation();\n }\n\n updateControlsAfterRotation() {\n this.removeControls();\n if (this.selectedShapes.size === 0) return;\n\n this.bounds = this.getBounds();\n\n if (!this.bounds) {\n return;\n }\n\n this.createControls();\n }\n\n\ncreateRotatedControls(angleDiff = 0) {\n this.group = document.createElementNS('http://www.w3.org/2000/svg', 'g');\n this.group.setAttribute('id', 'multi-selection-controls');\n\n if (angleDiff !== 0) {\n const centerX = this.bounds.x + this.bounds.width / 2;\n const centerY = this.bounds.y + this.bounds.height / 2;\n this.group.setAttribute('transform', `rotate(${angleDiff} ${centerX} ${centerY})`);\n }\n\n if (typeof svg !== 'undefined') {\n svg.appendChild(this.group);\n }\n\n // Draw faint individual outlines for each selected shape\n if (this.selectedShapes.size > 1) {\n this.selectedShapes.forEach(shape => {\n const b = this.getShapeBounds(shape);\n if (!b || b.width === 0 && b.height === 0) return;\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('x', b.x - 3);\n rect.setAttribute('y', b.y - 3);\n rect.setAttribute('width', b.width + 6);\n rect.setAttribute('height', b.height + 6);\n rect.setAttribute('fill', 'none');\n rect.setAttribute('stroke', '#5B57D1');\n rect.setAttribute('stroke-width', 1);\n rect.setAttribute('stroke-opacity', 0.35);\n rect.setAttribute('stroke-dasharray', '4 3');\n rect.setAttribute('rx', 3);\n rect.setAttribute('style', 'pointer-events: none;');\n this.group.appendChild(rect);\n });\n }\n\n const expandedX = this.bounds.x - this.selectionPadding;\n const expandedY = this.bounds.y - this.selectionPadding;\n const expandedWidth = this.bounds.width + 2 * this.selectionPadding;\n const expandedHeight = this.bounds.height + 2 * this.selectionPadding;\n\n this.createOutline(expandedX, expandedY, expandedWidth, expandedHeight);\n this.createResizeAnchors(expandedX, expandedY, expandedWidth, expandedHeight);\n this.createRotationAnchor(expandedX, expandedY, expandedWidth, expandedHeight);\n}\n\n startResize(e, anchorIndex) {\n e.stopPropagation();\n e.preventDefault();\n\n this.isResizing = true;\n this.resizingAnchorIndex = anchorIndex;\n\n // Snapshot for undo tracking\n this._snapshotForUndo();\n\n this.initialPositions.clear();\n const initialBounds = this.getBounds();\n\n this.selectedShapes.forEach(shape => {\n let shapeData;\n shape.removeSelection();\n switch (shape.shapeName) {\n case 'rectangle':\n case 'icon': \n shapeData = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height,\n rotation: shape.rotation\n };\n break;\n case 'circle':\n shapeData = {\n x: shape.x,\n y: shape.y,\n rx: shape.rx,\n ry: shape.ry,\n rotation: shape.rotation\n };\n break;\n case 'line':\n case 'arrow':\n shapeData = {\n startPoint: { ...shape.startPoint },\n endPoint: { ...shape.endPoint }\n };\n break;\n default:\n shapeData = {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0\n };\n }\n this.initialPositions.set(shape, shapeData);\n });\n\n this.initialPositions.set('bounds', initialBounds);\n\n const onMouseMove = (event) => {\n if (this.isResizing) {\n this.handleResize(event);\n }\n };\n\n const onMouseUp = () => {\n this.isResizing = false;\n this.resizingAnchorIndex = null;\n this.initialPositions.clear();\n\n // Push undo for all resized shapes\n this._pushUndoForAll();\n\n if (typeof svg !== 'undefined') {\n svg.removeEventListener('pointermove', onMouseMove);\n svg.removeEventListener('pointerup', onMouseUp);\n svg.style.cursor = 'default';\n }\n };\n\n if (typeof svg !== 'undefined') {\n svg.addEventListener('pointermove', onMouseMove);\n svg.addEventListener('pointerup', onMouseUp);\n }\n }\n\n handleResize(e) {\n const { x: mouseX, y: mouseY } = getSVGCoordsFromMouse(e);\n const initialBounds = this.initialPositions.get('bounds');\n if (!initialBounds) return;\n\n let scaleX = 1, scaleY = 1;\n let newBounds = { ...initialBounds };\n\n switch (this.resizingAnchorIndex) {\n case 0:\n scaleX = (initialBounds.x + initialBounds.width - mouseX) / initialBounds.width;\n scaleY = (initialBounds.y + initialBounds.height - mouseY) / initialBounds.height;\n newBounds.x = mouseX;\n newBounds.y = mouseY;\n newBounds.width = initialBounds.x + initialBounds.width - mouseX;\n newBounds.height = initialBounds.y + initialBounds.height - mouseY;\n break;\n case 1:\n scaleX = (mouseX - initialBounds.x) / initialBounds.width;\n scaleY = (initialBounds.y + initialBounds.height - mouseY) / initialBounds.height;\n newBounds.y = mouseY;\n newBounds.width = mouseX - initialBounds.x;\n newBounds.height = initialBounds.y + initialBounds.height - mouseY;\n break;\n case 2:\n scaleX = (initialBounds.x + initialBounds.width - mouseX) / initialBounds.width;\n scaleY = (mouseY - initialBounds.y) / initialBounds.height;\n newBounds.x = mouseX;\n newBounds.width = initialBounds.x + initialBounds.width - mouseX;\n newBounds.height = mouseY - initialBounds.y;\n break;\n case 3:\n scaleX = (mouseX - initialBounds.x) / initialBounds.width;\n scaleY = (mouseY - initialBounds.y) / initialBounds.height;\n newBounds.width = mouseX - initialBounds.x;\n newBounds.height = mouseY - initialBounds.y;\n break;\n case 4:\n scaleY = (initialBounds.y + initialBounds.height - mouseY) / initialBounds.height;\n newBounds.y = mouseY;\n newBounds.height = initialBounds.y + initialBounds.height - mouseY;\n break;\n case 5:\n scaleY = (mouseY - initialBounds.y) / initialBounds.height;\n newBounds.height = mouseY - initialBounds.y;\n break;\n case 6:\n scaleX = (initialBounds.x + initialBounds.width - mouseX) / initialBounds.width;\n newBounds.x = mouseX;\n newBounds.width = initialBounds.x + initialBounds.width - mouseX;\n break;\n case 7:\n scaleX = (mouseX - initialBounds.x) / initialBounds.width;\n newBounds.width = mouseX - initialBounds.x;\n break;\n }\n\n scaleX = Math.max(0.1, Math.abs(scaleX));\n scaleY = Math.max(0.1, Math.abs(scaleY));\n\n this.selectedShapes.forEach(shape => {\n const initialData = this.initialPositions.get(shape);\n if (!initialData) return;\n\n switch (shape.shapeName) {\n case 'rectangle':\n case 'icon':\n const relX = (initialData.x - initialBounds.x) / initialBounds.width;\n const relY = (initialData.y - initialBounds.y) / initialBounds.height;\n const relW = initialData.width / initialBounds.width;\n const relH = initialData.height / initialBounds.height;\n\n shape.x = newBounds.x + relX * newBounds.width;\n shape.y = newBounds.y + relY * newBounds.height;\n shape.width = relW * newBounds.width;\n shape.height = relH * newBounds.height;\n shape._skipAnchors = true;\n shape.draw();\n shape._skipAnchors = false;\n break;\n\n case 'circle':\n const relXCircle = (initialData.x - initialBounds.x) / initialBounds.width;\n const relYCircle = (initialData.y - initialBounds.y) / initialBounds.height;\n\n shape.x = newBounds.x + relXCircle * newBounds.width;\n shape.y = newBounds.y + relYCircle * newBounds.height;\n shape.rx = initialData.rx * scaleX;\n shape.ry = initialData.ry * scaleY;\n shape._skipAnchors = true;\n shape.draw();\n shape._skipAnchors = false;\n break;\n\n case 'line':\n case 'arrow':\n const relStartX = (initialData.startPoint.x - initialBounds.x) / initialBounds.width;\n const relStartY = (initialData.startPoint.y - initialBounds.y) / initialBounds.height;\n const relEndX = (initialData.endPoint.x - initialBounds.x) / initialBounds.width;\n const relEndY = (initialData.endPoint.y - initialBounds.y) / initialBounds.height;\n\n shape.startPoint.x = newBounds.x + relStartX * newBounds.width;\n shape.startPoint.y = newBounds.y + relStartY * newBounds.height;\n shape.endPoint.x = newBounds.x + relEndX * newBounds.width;\n shape.endPoint.y = newBounds.y + relEndY * newBounds.height;\n\n if (shape.shapeName === 'arrow' && shape.arrowCurved) {\n if (typeof shape.initializeCurveControlPoints === 'function') {\n shape.initializeCurveControlPoints();\n }\n }\n shape.draw();\n break;\n\n default:\n const relXDefault = (initialData.x - initialBounds.x) / initialBounds.width;\n const relYDefault = (initialData.y - initialBounds.y) / initialBounds.height;\n const relWDefault = initialData.width / initialBounds.width;\n const relHDefault = initialData.height / initialBounds.height;\n\n shape.x = newBounds.x + relXDefault * newBounds.width;\n shape.y = newBounds.y + relYDefault * newBounds.height;\n if (shape.width !== undefined) shape.width = relWDefault * newBounds.width;\n if (shape.height !== undefined) shape.height = relHDefault * newBounds.height;\n\n if (typeof shape.draw === 'function') {\n shape._skipAnchors = true;\n shape.draw();\n shape._skipAnchors = false;\n }\n }\n\n if (typeof shape.updateAttachedArrows === 'function') {\n shape.updateAttachedArrows();\n }\n });\n\n this.updateControls();\n }\n\n startDrag(e) {\n this.isDragging = true;\n isDraggingMultiSelection = true;\n const { x, y } = getSVGCoordsFromMouse(e);\n this.dragStart = { x, y };\n\n // Snapshot for undo tracking\n this._snapshotForUndo();\n\n this.initialPositions.clear();\n this.selectedShapes.forEach(shape => {\n let shapeData;\n shape.removeSelection();\n switch (shape.shapeName) {\n case 'rectangle':\n case 'icon':\n shapeData = {\n x: shape.x,\n y: shape.y,\n width: shape.width,\n height: shape.height,\n rotation: shape.rotation\n };\n break;\n case 'circle':\n shapeData = {\n x: shape.x,\n y: shape.y,\n rx: shape.rx,\n ry: shape.ry,\n rotation: shape.rotation\n };\n break;\n case 'line':\n case 'arrow':\n shapeData = {\n startPoint: { ...shape.startPoint },\n endPoint: { ...shape.endPoint }\n };\n break;\n default:\n shapeData = {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width || 0,\n height: shape.height || 0,\n rotation: shape.rotation || 0\n };\n }\n this.initialPositions.set(shape, shapeData);\n });\n\n if (typeof svg !== 'undefined') {\n svg.style.cursor = 'move';\n }\n }\n\n handleDrag(e) {\n if (!this.isDragging) return;\n isDraggingMultiSelection = true;\n const { x, y } = getSVGCoordsFromMouse(e);\n let dx = x - this.dragStart.x;\n let dy = y - this.dragStart.y;\n\n // Shift-constrain: lock to horizontal or vertical axis\n if (e.shiftKey) {\n if (Math.abs(dx) > Math.abs(dy)) {\n dy = 0;\n } else {\n dx = 0;\n }\n }\n\n this.move(dx, dy);\n\n // Snap guides for multi-selection\n if (window.__sketchStoreApi && window.__sketchStoreApi.getState().snapToObjects) {\n const bounds = this.getBounds();\n if (bounds) {\n // Create a virtual shape representing the multi-selection bounding box\n const virtualShape = {\n shapeName: 'rectangle',\n x: bounds.x,\n y: bounds.y,\n width: bounds.width,\n height: bounds.height,\n };\n const snap = calculateSnap(virtualShape, e.shiftKey, e.clientX, e.clientY);\n if (snap.dx || snap.dy) {\n this.move(snap.dx, snap.dy);\n }\n }\n } else {\n clearSnapGuides();\n }\n\n this.dragStart = { x: x, y: y };\n }\n\n endDrag() {\n if (!this.isDragging) return;\n isDraggingMultiSelection = false;\n this.isDragging = false;\n\n // Clear snap guides on drag end\n clearSnapGuides();\n\n // Finalize freehand stroke moves (bake transform offset into points)\n this.selectedShapes.forEach(shape => {\n if (typeof shape.finalizeMove === 'function') {\n shape.finalizeMove();\n }\n // Restore isSelected flag (startDrag's removeSelection clears it)\n shape.isSelected = true;\n });\n\n // Re-parent any selected shape that now sits inside a different frame\n // (Issue #22, bug #9). The per-tool drag handlers (rectangleTool, etc.)\n // do this for single-shape drags, but a multi-selection drag bypassed\n // them and left the shape geometrically inside the frame yet logically\n // outside its child list.\n if (typeof shapes !== 'undefined' && Array.isArray(shapes)) {\n this.selectedShapes.forEach(shape => {\n if (!shape || shape.shapeName === 'frame') return;\n // Find the deepest frame whose bounds contain the shape after the drag.\n let target = null;\n for (let i = shapes.length - 1; i >= 0; i--) {\n const f = shapes[i];\n if (f.shapeName !== 'frame') continue;\n if (this.selectedShapes.has(f)) continue; // moving with us \u2014 skip\n if (typeof f.isShapeInFrame === 'function' && f.isShapeInFrame(shape)) {\n target = f;\n break;\n }\n }\n const current = shape.parentFrame || null;\n if (target === current) return;\n if (current && typeof current.removeShapeFromFrame === 'function') {\n current.removeShapeFromFrame(shape);\n }\n if (target && typeof target.addShapeToFrame === 'function') {\n target.addShapeToFrame(shape);\n if (typeof pushFrameAttachmentAction === 'function') {\n pushFrameAttachmentAction(target, shape, 'attach', current);\n }\n } else if (current && typeof pushFrameAttachmentAction === 'function') {\n pushFrameAttachmentAction(current, shape, 'detach', current);\n }\n });\n }\n\n this.initialPositions.clear();\n\n // Push undo for all moved shapes\n this._pushUndoForAll();\n\n // Refresh bounds and controls after finalizeMove may have changed positions\n this.updateControls();\n\n if (typeof svg !== 'undefined') {\n svg.style.cursor = 'default';\n }\n }\n}\n\nconst multiSelection = new MultiSelection();\n\nfunction selectShapesInRect(selectionBounds) {\n multiSelection.selectShapesInRect(selectionBounds);\n}\n\nfunction clearAllSelections() {\n multiSelection.clearSelection();\n}\n\nfunction getMultiSelectionBounds() {\n return multiSelection.getBounds();\n}\n\nfunction createMultiSelectionControls() {\n multiSelection.updateControls();\n}\n\nfunction removeMultiSelectionControls() {\n multiSelection.removeControls();\n}\n\nfunction isPointInMultiSelection(x, y) {\n return multiSelection.isPointInBounds(x, y);\n}\n\nfunction moveSelectedShapes(dx, dy) {\n multiSelection.move(dx, dy);\n}\n\nfunction handleMultiSelectionMouseDown(e) {\n if (!e.target) return false;\n const { x, y } = getSVGCoordsFromMouse(e);\n\n // Only handle multi-selection operations if we have multiple shapes selected\n if (multiSelection.selectedShapes.size > 1) {\n const anchor = e.target.closest('.multi-selection-anchor');\n if (anchor) {\n const anchorIndex = parseInt(anchor.getAttribute('data-index'));\n multiSelection.startResize(e, anchorIndex);\n return true;\n }\n\n if (e.target.closest('.multi-selection-rotation-anchor')) {\n multiSelection.startRotation(e);\n return true;\n }\n\n // Check if clicking on any shape that's part of the selection\n let clickedOnSelectedShape = null;\n for (const shape of multiSelection.selectedShapes) {\n if (shape.contains && shape.contains(x, y)) {\n clickedOnSelectedShape = shape;\n break;\n }\n }\n if (clickedOnSelectedShape) {\n // Ctrl+Click: toggle shape out of multi-selection\n if (e.ctrlKey || e.metaKey) {\n multiSelection.removeShape(clickedOnSelectedShape);\n return true;\n }\n multiSelection.startDrag(e);\n return true;\n }\n\n // Click is within the multi-selection bounding box but not directly on a shape \u2014\n // still start dragging the group (prevents accidental deselection)\n if (multiSelection.isPointInBounds(x, y)) {\n multiSelection.startDrag(e);\n return true;\n }\n\n // Click is outside the selection bounds \u2014 fall through to deselect / start new selection\n }\n\n // Check if clicking on individual shape anchors - let them handle it\n if (e.target.closest('.anchor') || e.target.closest('.rotate-anchor') || e.target.closest('.rotation-anchor')) {\n return false; // Let individual shape handlers manage their own anchors\n }\n\n // Check if clicking on any shape \u2014 prioritise non-frame shapes so that\n // shapes inside frames (text, icons, etc.) can still be selected/interacted with.\n let clickedOnShape = false;\n let clickedShape = null;\n if (typeof shapes !== 'undefined') {\n let fallbackFrame = null;\n for (let i = shapes.length - 1; i >= 0; i--) {\n const shape = shapes[i];\n if (shape.contains && shape.contains(x, y)) {\n if (shape.shapeName === 'frame') {\n // Pick the smallest (most specific/innermost) frame\n if (!fallbackFrame) {\n fallbackFrame = shape;\n } else {\n const area = (shape.width || 0) * (shape.height || 0);\n const existingArea = (fallbackFrame.width || 0) * (fallbackFrame.height || 0);\n if (area < existingArea) {\n fallbackFrame = shape;\n }\n }\n } else {\n clickedOnShape = true;\n clickedShape = shape;\n break;\n }\n }\n }\n // If no non-frame shape was found, use the smallest frame\n if (!clickedOnShape && fallbackFrame) {\n clickedOnShape = true;\n clickedShape = fallbackFrame;\n }\n }\n\n // If clicking on a shape\n if (clickedOnShape && clickedShape) {\n // Ctrl+click: toggle shape in/out of multi-selection\n if (e.ctrlKey || e.metaKey) {\n if (multiSelection.selectedShapes.has(clickedShape)) {\n multiSelection.removeShape(clickedShape);\n } else {\n // If there's a current individually-selected shape, add it to multi-selection first\n if (currentShape && currentShape !== clickedShape && !multiSelection.selectedShapes.has(currentShape)) {\n multiSelection.addShape(currentShape);\n if (typeof currentShape.removeSelection === 'function') currentShape.removeSelection();\n }\n multiSelection.addShape(clickedShape);\n }\n currentShape = null;\n return true;\n }\n\n // If the clicked shape is part of the multi-selection, start dragging instead of clearing\n if (multiSelection.selectedShapes.size > 1 && multiSelection.selectedShapes.has(clickedShape)) {\n multiSelection.startDrag(e);\n return true;\n }\n\n // If it's the same shape that's already selected, let individual handlers manage it\n if (currentShape === clickedShape) {\n // Clear any other multi-selected shapes so only this one remains selected\n if (multiSelection.selectedShapes.size > 0) {\n multiSelection.clearSelection();\n }\n return false; // Let individual shape handlers manage their own interactions\n }\n\n // Normal click (no Ctrl): deselect everything and select only the clicked shape\n if (currentShape && typeof currentShape.removeSelection === 'function') {\n currentShape.removeSelection();\n }\n\n // Clear multi-selection\n multiSelection.clearSelection();\n\n // \u2500\u2500 Group expansion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // If the clicked shape is part of a group, select ALL of its\n // group-mates as a multi-selection instead of single-selecting.\n // Subsequent drag/resize/rotate then operates on the whole group\n // via the existing multi-selection plumbing.\n if (clickedShape.groupId && typeof shapes !== 'undefined') {\n const mates = shapes.filter(s => s.groupId === clickedShape.groupId);\n if (mates.length > 1) {\n for (const m of mates) multiSelection.addShape(m);\n currentShape = null;\n multiSelection.startDrag(e);\n return true;\n }\n }\n\n // Set new current shape\n currentShape = clickedShape;\n\n // Trigger the shape's own selection handling\n if (typeof clickedShape.addAnchors === 'function') {\n clickedShape.addAnchors();\n clickedShape.isSelected = true;\n } else if (typeof clickedShape.createSelection === 'function') {\n clickedShape.createSelection();\n clickedShape.isSelected = true;\n } else if (typeof clickedShape.selectShape === 'function') {\n clickedShape.selectShape();\n clickedShape.isSelected = true;\n } else if (typeof clickedShape.selectFrame === 'function') {\n clickedShape.selectFrame();\n }\n\n // Update sidebar if function exists\n if (typeof clickedShape.updateSidebar === 'function') {\n clickedShape.updateSidebar();\n }\n\n return false; // Let individual handlers also process for drag setup\n }\n\n // If not clicking on a shape, deselect everything and start multi-selection\n if (!clickedOnShape) {\n // Deselect current individual shape\n if (typeof currentShape !== 'undefined' && currentShape && typeof currentShape.removeSelection === 'function') {\n currentShape.removeSelection();\n currentShape = null;\n }\n // Also deselect any active text editor (textTool's selectedElement)\n if (window.__deselectTextElement) {\n window.__deselectTextElement();\n }\n if (typeof disableAllSideBars === 'function') {\n disableAllSideBars();\n }\n \n multiSelectionStart = { x, y };\n isMultiSelecting = true;\n // Prevent native text selection during drag-select\n if (typeof svg !== 'undefined') {\n svg.style.userSelect = 'none';\n svg.style.webkitUserSelect = 'none';\n }\n document.body.style.userSelect = 'none';\n document.body.style.webkitUserSelect = 'none';\n createMultiSelectionRect(x, y);\n clearAllSelections();\n return true;\n }\n\n return false;\n}\n\nfunction handleMultiSelectionMouseMove(e) {\n const { x, y } = getSVGCoordsFromMouse(e);\n\n if (multiSelection.isDragging) {\n multiSelection.handleDrag(e);\n return true;\n }\n\n if (multiSelection.isResizing) {\n multiSelection.handleResize(e);\n return true;\n }\n\n if (multiSelection.isRotating) {\n multiSelection.handleRotation(e);\n return true;\n }\n\n if (isMultiSelecting) {\n updateMultiSelectionRect(x, y);\n // Live highlight shapes that fall within the selection rectangle\n highlightShapesInSelectionRect(x, y);\n return true;\n }\n\n if (multiSelection.selectedShapes.size > 1 && multiSelection.isPointInBounds(x, y)) {\n if (typeof svg !== 'undefined') {\n svg.style.cursor = 'move';\n }\n return true;\n }\n\n // Show move cursor when hovering over any shape in selection mode\n if (typeof shapes !== 'undefined' && Array.isArray(shapes)) {\n const overShape = shapes.some(shape => {\n if (typeof shape.contains === 'function') {\n return shape.contains(x, y);\n }\n return false;\n });\n if (overShape && typeof svg !== 'undefined') {\n svg.style.cursor = 'move';\n return false;\n }\n }\n\n if (typeof svg !== 'undefined' && svg.style.cursor === 'move') {\n svg.style.cursor = 'default';\n }\n\n return false;\n}\n\nfunction handleMultiSelectionMouseUp(e) {\n if (multiSelection.isDragging) {\n multiSelection.endDrag();\n return true;\n }\n\n if (multiSelection.isResizing) {\n multiSelection.isResizing = false;\n multiSelection.resizingAnchorIndex = null;\n multiSelection.initialPositions.clear();\n multiSelection._pushUndoForAll();\n multiSelection.updateControls();\n return true;\n }\n\n if (multiSelection.isRotating) {\n multiSelection.isRotating = false;\n multiSelection.initialPositions.clear();\n multiSelection._pushUndoForAll();\n return true;\n }\n\n if (isMultiSelecting) {\n const { x, y } = getSVGCoordsFromMouse(e);\n\n const selectionBounds = {\n x: Math.min(multiSelectionStart.x, x),\n y: Math.min(multiSelectionStart.y, y),\n width: Math.abs(x - multiSelectionStart.x),\n height: Math.abs(y - multiSelectionStart.y)\n };\n\n if (selectionBounds.width > 5 && selectionBounds.height > 5) {\n let shapesInBounds = [];\n if (typeof shapes !== 'undefined') {\n shapes.forEach(shape => {\n if (isShapeInSelectionRect(shape, selectionBounds)) {\n shapesInBounds.push(shape);\n }\n });\n }\n\n if (shapesInBounds.length === 1) {\n const selectedShape = shapesInBounds[0];\n multiSelection.clearSelection();\n\n if (typeof currentShape !== 'undefined') {\n currentShape = selectedShape;\n }\n\n if (typeof selectedShape.addAnchors === 'function') {\n selectedShape.addAnchors();\n selectedShape.isSelected = true;\n } else if (typeof selectedShape.createSelection === 'function') {\n selectedShape.createSelection();\n selectedShape.isSelected = true;\n } else if (typeof selectedShape.selectShape === 'function') {\n selectedShape.selectShape();\n selectedShape.isSelected = true;\n }\n\n if (typeof selectedShape.updateSidebar === 'function') {\n selectedShape.updateSidebar();\n }\n } else if (shapesInBounds.length > 1) {\n multiSelection.selectShapesInRect(selectionBounds);\n }\n }\n\n removeMultiSelectionRect();\n isMultiSelecting = false;\n isDraggingMultiSelection = false;\n // Restore text selection after drag-select\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n if (typeof svg !== 'undefined') {\n svg.style.userSelect = '';\n svg.style.webkitUserSelect = '';\n }\n return true;\n }\n\n // Safety cleanup - always reset flags on mouse up\n isMultiSelecting = false;\n isDraggingMultiSelection = false;\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n if (typeof svg !== 'undefined') {\n svg.style.userSelect = '';\n svg.style.webkitUserSelect = '';\n }\n return false;\n}\n\n\n// Safety net: clean up selection rect if mouse is released outside the SVG\nwindow.addEventListener('pointerup', () => {\n if (isMultiSelecting) {\n removeMultiSelectionRect();\n isMultiSelecting = false;\n isDraggingMultiSelection = false;\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n }\n});\n\n// Delete key support for multi-selection\ndocument.addEventListener('keydown', (e) => {\n if ((e.key === 'Delete' || e.key === 'Backspace') && multiSelection.selectedShapes.size > 0) {\n // Don't delete if user is typing in an input\n const tag = e.target.tagName.toLowerCase();\n if (tag === 'input' || tag === 'textarea' || e.target.isContentEditable) return;\n e.preventDefault();\n deleteSelectedShapes();\n }\n});\n\nfunction deleteSelectedShapes() {\n if (multiSelection.selectedShapes.size === 0) return;\n\n const shapesToDelete = Array.from(multiSelection.selectedShapes);\n multiSelection.clearSelection();\n\n // Issue #24 bug #3: when deleting a (regular, non-diagram) frame, its\n // children are released back to the canvas \u2014 capture them here so we\n // can re-select them and drop the user into the pointer tool. Diagram\n // frames destroy their children together, so we skip those.\n const releasedChildren = [];\n\n shapesToDelete.forEach(shape => {\n const isFrame = shape.shapeName === 'frame';\n const isDiagramFrame = isFrame && !!shape._diagramType;\n\n // Issue #24 bug #7: for a regular (non-diagram) frame, we don't\n // want destroy() \u2014 it empties containedShapes and tears down the\n // clipGroup, leaving nothing for undo to rehydrate. Instead:\n // 1. snapshot the children references (for the undo action),\n // 2. release each child visually back to the svg root,\n // 3. detach the frame's <g>, clipGroup, clipPath from DOM.\n // The frame JS object stays alive in the undo action's `shape`\n // reference; on undo, the UndoRedo branch re-appends clipGroup +\n // clipPath and re-attaches each child via addShapeToFrame.\n let childSnapshot = null;\n if (isFrame && !isDiagramFrame) {\n childSnapshot = [...(shape.containedShapes || [])];\n for (const child of childSnapshot) {\n if (!child || child === shape) continue;\n const el = child.group || child.element;\n if (el) {\n if (shape.clipGroup && el.parentNode === shape.clipGroup) {\n shape.clipGroup.removeChild(el);\n }\n if (window.svg && el.parentNode !== window.svg) window.svg.appendChild(el);\n }\n child.parentFrame = null;\n delete child.isBeingMovedByFrame;\n releasedChildren.push(child);\n }\n\n // Clear containedShapes \u2014 undo will repopulate via\n // addShapeToFrame, which short-circuits on an existing entry.\n shape.containedShapes = [];\n\n // Detach the frame's own DOM bits \u2014 but keep the JS object\n // and its clipGroup/clipPath references intact for undo.\n if (shape.group && shape.group.parentNode) shape.group.parentNode.removeChild(shape.group);\n if (shape.clipGroup && shape.clipGroup.parentNode) shape.clipGroup.parentNode.removeChild(shape.clipGroup);\n if (shape.clipPath && shape.clipPath.parentNode) shape.clipPath.parentNode.removeChild(shape.clipPath);\n } else {\n // Non-frame OR diagram frame: standard delete path.\n if (shape.group && shape.group.parentNode) {\n shape.group.parentNode.removeChild(shape.group);\n } else if (shape.element && shape.element.parentNode) {\n shape.element.parentNode.removeChild(shape.element);\n }\n if (shape.parentFrame && typeof shape.parentFrame.removeShapeFromFrame === 'function') {\n shape.parentFrame.removeShapeFromFrame(shape);\n }\n cleanupAttachments(shape);\n if (isDiagramFrame && typeof shape.destroy === 'function') {\n shape.destroy();\n }\n }\n\n // Remove from shapes array\n const idx = shapes.indexOf(shape);\n if (idx !== -1) shapes.splice(idx, 1);\n\n // Issue #24 bug #7: record the delete on the undo stack. Without\n // this the user can't undo a multi-selection delete at all \u2014\n // the action just disappears. For frames we attach the child\n // snapshot so undo can re-attach them.\n try {\n if (childSnapshot) {\n pushDeleteAction(shape, { childSnapshot });\n } else {\n pushDeleteAction(shape);\n }\n } catch (err) {\n console.warn('[deleteSelectedShapes] pushDeleteAction failed:', err);\n }\n });\n\n // Bug #3 follow-through: auto-select the released children and switch\n // to the pointer tool so the user can immediately keep manipulating\n // them. Skip if nothing was released (no frames deleted).\n if (releasedChildren.length > 0) {\n for (const child of releasedChildren) {\n if (shapes.indexOf(child) === -1) continue;\n multiSelection.addShape(child);\n }\n if (window.__sketchStoreApi && typeof window.__sketchStoreApi.setActiveTool === 'function') {\n window.__sketchStoreApi.setActiveTool('select');\n }\n }\n}\n\n/**\n * Create a frame around all currently multi-selected shapes.\n */\nfunction frameSelectedShapes() {\n if (multiSelection.selectedShapes.size < 2) return;\n\n const bounds = multiSelection.getBounds();\n if (!bounds) return;\n\n const padding = 20;\n const fx = bounds.x - padding;\n const fy = bounds.y - padding;\n const fw = bounds.width + padding * 2;\n const fh = bounds.height + padding * 2;\n\n // Import Frame class dynamically (it's on window from SketchEngine init)\n const FrameClass = window.Frame;\n if (!FrameClass) {\n console.warn('[Selection] Frame class not available');\n return;\n }\n\n const frame = new FrameClass(fx, fy, fw, fh);\n shapes.push(frame);\n\n // Push undo action for frame creation\n if (window.historyStack) {\n window.historyStack.push({\n type: window.ACTION_CREATE || 'create',\n shape: frame,\n shapeName: 'frame'\n });\n }\n\n // Add each selected shape into the frame\n const shapesToFrame = Array.from(multiSelection.selectedShapes);\n multiSelection.clearSelection();\n\n for (const shape of shapesToFrame) {\n frame.addShapeToFrame(shape);\n }\n\n // Reorder DOM: frame group should be behind the contained shapes\n const frameEl = frame.group;\n if (frameEl && frameEl.parentNode) {\n // Move frame before its first contained shape in the shapes array\n const frameIdx = shapes.indexOf(frame);\n if (frameIdx > 0) {\n shapes.splice(frameIdx, 1);\n // Find earliest contained shape index\n let earliest = shapes.length;\n for (const s of shapesToFrame) {\n const idx = shapes.indexOf(s);\n if (idx >= 0 && idx < earliest) earliest = idx;\n }\n shapes.splice(earliest, 0, frame);\n }\n }\n\n // Select the new frame\n if (typeof frame.selectFrame === 'function') {\n frame.selectFrame();\n }\n currentShape = frame;\n}\n\n// Expose for plain scripts (sketchGeneric.js is not a module)\nwindow.clearAllSelections = clearAllSelections;\nwindow.multiSelection = multiSelection;\nwindow.deleteSelectedShapes = deleteSelectedShapes;\nwindow.frameSelectedShapes = frameSelectedShapes;\n\nexport {\n handleMultiSelectionMouseDown,\n handleMultiSelectionMouseMove,\n handleMultiSelectionMouseUp,\n clearAllSelections,\n selectShapesInRect,\n createMultiSelectionControls,\n removeMultiSelectionControls,\n removeMultiSelectionRect,\n isPointInMultiSelection,\n moveSelectedShapes,\n multiSelection,\n isDraggingMultiSelection,\n isMultiSelecting\n};"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAOA,IAAI,mBAAmB;AACvB,IAAI,sBAAsB,EAAE,GAAG,GAAG,GAAG,EAAE;AACvC,IAAI,qBAAqB;AACzB,IAAI,2BAA2B;AAE/B,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,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