kritzel-stencil 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/kritzel-active-users_42.cjs.entry.js +108 -62
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/stencil.cjs.js +1 -1
  5. package/dist/cjs/{workspace.migrations-TAWnOE7r.js → workspace.migrations-CYeB_XRB.js} +167 -22
  6. package/dist/collection/classes/core/core.class.js +27 -19
  7. package/dist/collection/classes/handlers/selection.handler.js +36 -2
  8. package/dist/collection/classes/objects/group.class.js +69 -12
  9. package/dist/collection/classes/tools/text-tool.class.js +44 -8
  10. package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +5 -5
  11. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +41 -17
  12. package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.css +3 -2
  13. package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.js +3 -2
  14. package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +23 -1
  15. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +7 -10
  16. package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
  17. package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
  18. package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
  19. package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
  20. package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
  21. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
  22. package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
  23. package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
  24. package/dist/collection/constants/version.js +1 -1
  25. package/dist/collection/themes/dark-theme.js +9 -0
  26. package/dist/collection/themes/light-theme.js +9 -0
  27. package/dist/components/index.js +1 -1
  28. package/dist/components/kritzel-awareness-cursors.js +1 -1
  29. package/dist/components/kritzel-color-palette.js +1 -1
  30. package/dist/components/kritzel-color.js +1 -1
  31. package/dist/components/kritzel-controls.js +1 -1
  32. package/dist/components/kritzel-current-user-dialog.js +1 -1
  33. package/dist/components/kritzel-current-user.js +1 -1
  34. package/dist/components/kritzel-dialog.js +1 -1
  35. package/dist/components/kritzel-editor.js +1 -1
  36. package/dist/components/kritzel-engine.js +1 -1
  37. package/dist/components/kritzel-export.js +1 -1
  38. package/dist/components/kritzel-login-dialog.js +1 -1
  39. package/dist/components/kritzel-menu-item.js +1 -1
  40. package/dist/components/kritzel-menu.js +1 -1
  41. package/dist/components/kritzel-more-menu.js +1 -1
  42. package/dist/components/kritzel-portal.js +1 -1
  43. package/dist/components/kritzel-settings.js +1 -1
  44. package/dist/components/kritzel-share-dialog.js +1 -1
  45. package/dist/components/kritzel-split-button.js +1 -1
  46. package/dist/components/kritzel-stroke-size.js +1 -1
  47. package/dist/components/kritzel-tool-config.js +1 -1
  48. package/dist/components/kritzel-utility-panel.js +1 -1
  49. package/dist/components/kritzel-workspace-manager.js +1 -1
  50. package/dist/components/p-0F9_lw6l.js +1 -0
  51. package/dist/components/{p-CFzvz-B2.js → p-0YBCp8Wh.js} +1 -1
  52. package/dist/components/{p-mYhFNPgz.js → p-BAjrJjMX.js} +1 -1
  53. package/dist/components/{p-R9M5PnAz.js → p-BDOSy6zd.js} +1 -1
  54. package/dist/components/p-BLjdzUzs.js +1 -0
  55. package/dist/components/{p-BFQVg_eQ.js → p-BSEdLfq2.js} +1 -1
  56. package/dist/components/{p-DkT0CXfN.js → p-Be6E_RMf.js} +1 -1
  57. package/dist/components/p-BeeKeeeo.js +1 -0
  58. package/dist/components/{p-CoyqJSjT.js → p-BmYsz1bP.js} +1 -1
  59. package/dist/components/{p-B4wyWc66.js → p-Bs7lEBy5.js} +2 -2
  60. package/dist/components/p-C-qyWv4d.js +1 -0
  61. package/dist/components/{p-ChqeIKg_.js → p-C1Fv9rVN.js} +1 -1
  62. package/dist/components/{p-CVQBfO3r.js → p-C1UNiqO2.js} +1 -1
  63. package/dist/components/{p-CekG3_ce.js → p-C2MdRsg6.js} +1 -1
  64. package/dist/components/{p-DoIOS3fS.js → p-CdaOQi45.js} +1 -1
  65. package/dist/components/{p-B2kHVHa_.js → p-CsMMZSAP.js} +1 -1
  66. package/dist/components/{p-ChQNi67Z.js → p-D9ifYAtg.js} +1 -1
  67. package/dist/components/{p-Dxb22STM.js → p-DYHF_MSN.js} +1 -1
  68. package/dist/components/{p-C3Dwuqka.js → p-Dg_nGsFe.js} +1 -1
  69. package/dist/components/{p-CzIuqMQA.js → p-DoDI-v-H.js} +1 -1
  70. package/dist/components/p-R60vdaIY.js +1 -0
  71. package/dist/components/{p-CU6kJPth.js → p-ZpItdhxS.js} +1 -1
  72. package/dist/components/{p--T9W9erA.js → p-yX5Zk5pS.js} +1 -1
  73. package/dist/esm/index.js +2 -2
  74. package/dist/esm/kritzel-active-users_42.entry.js +108 -62
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/stencil.js +1 -1
  77. package/dist/esm/{workspace.migrations-Dta1Yewh.js → workspace.migrations-BrA5xRPn.js} +167 -22
  78. package/dist/stencil/index.esm.js +1 -1
  79. package/dist/stencil/p-56b81681.entry.js +9 -0
  80. package/dist/stencil/p-BrA5xRPn.js +1 -0
  81. package/dist/stencil/stencil.esm.js +1 -1
  82. package/dist/types/classes/handlers/selection.handler.d.ts +15 -0
  83. package/dist/types/classes/objects/group.class.d.ts +15 -0
  84. package/dist/types/classes/tools/text-tool.class.d.ts +26 -8
  85. package/dist/types/components/shared/kritzel-portal/kritzel-portal.d.ts +1 -0
  86. package/dist/types/constants/version.d.ts +1 -1
  87. package/dist/types/interfaces/theme.interface.d.ts +12 -4
  88. package/package.json +1 -1
  89. package/dist/components/p-BYX50YSd.js +0 -1
  90. package/dist/components/p-BfJav4Zz.js +0 -1
  91. package/dist/components/p-CjazGGq3.js +0 -1
  92. package/dist/components/p-CqYIRmoh.js +0 -1
  93. package/dist/components/p-mDz63oKF.js +0 -1
  94. package/dist/stencil/p-22753671.entry.js +0 -9
  95. package/dist/stencil/p-Dta1Yewh.js +0 -1
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy(JSON.parse("[[\"kritzel-active-users_42.cjs\",[[512,\"kritzel-editor\",{\"scaleMax\":[1026,\"scale-max\"],\"scaleMin\":[1026,\"scale-min\"],\"lockDrawingScale\":[1028,\"lock-drawing-scale\"],\"viewportBoundaryLeft\":[1026,\"viewport-boundary-left\"],\"viewportBoundaryRight\":[1026,\"viewport-boundary-right\"],\"viewportBoundaryTop\":[1026,\"viewport-boundary-top\"],\"viewportBoundaryBottom\":[1026,\"viewport-boundary-bottom\"],\"wheelEnabled\":[1028,\"wheel-enabled\"],\"debugInfo\":[1040],\"user\":[16],\"activeUsers\":[16],\"controls\":[16],\"globalContextMenuItems\":[16],\"objectContextMenuItems\":[16],\"customSvgIcons\":[16],\"isControlsVisible\":[4,\"is-controls-visible\"],\"isUtilityPanelVisible\":[4,\"is-utility-panel-visible\"],\"isWorkspaceManagerVisible\":[4,\"is-workspace-manager-visible\"],\"isMoreMenuVisible\":[4,\"is-more-menu-visible\"],\"syncConfig\":[16],\"assetStorageConfig\":[16],\"cursorTarget\":[16],\"loginConfig\":[16],\"isLoading\":[4,\"is-loading\"],\"editorId\":[1,\"editor-id\"],\"activeWorkspaceId\":[1,\"active-workspace-id\"],\"isEngineReady\":[32],\"isControlsReady\":[32],\"isWorkspaceManagerReady\":[32],\"workspaces\":[32],\"activeWorkspace\":[32],\"isVirtualKeyboardOpen\":[32],\"undoState\":[32],\"isBackToContentButtonVisible\":[32],\"currentTheme\":[32],\"shortcuts\":[32],\"currentIsPublic\":[32],\"getObjectById\":[64],\"addObject\":[64],\"updateObject\":[64],\"removeObject\":[64],\"getSelectedObjects\":[64],\"selectObjects\":[64],\"selectAllObjectsInViewport\":[64],\"clearSelection\":[64],\"centerObjectInViewport\":[64],\"backToContent\":[64],\"centerAllObjects\":[64],\"setViewport\":[64],\"panTo\":[64],\"zoomTo\":[64],\"getViewport\":[64],\"screenToWorld\":[64],\"worldToScreen\":[64],\"createWorkspace\":[64],\"updateWorkspace\":[64],\"deleteWorkspace\":[64],\"getWorkspaces\":[64],\"getActiveWorkspace\":[64],\"loadSharedWorkspace\":[64],\"reinitSync\":[64],\"registerTool\":[64],\"changeActiveTool\":[64],\"disable\":[64],\"enable\":[64],\"copy\":[64],\"cut\":[64],\"paste\":[64],\"delete\":[64],\"bringForward\":[64],\"sendBackward\":[64],\"bringToFront\":[64],\"sendToBack\":[64],\"alignObjects\":[64],\"group\":[64],\"ungroup\":[64],\"undo\":[64],\"redo\":[64],\"getScreenshot\":[64],\"exportViewportAsPng\":[64],\"exportViewportAsSvg\":[64],\"downloadAsJson\":[64],\"importFromFile\":[64],\"loadObjectsFromJson\":[64],\"getObjectsTotalCount\":[64],\"getAllObjects\":[64],\"findObjects\":[64],\"getCopiedObjects\":[64],\"getObjectsInViewport\":[64],\"hideContextMenu\":[64],\"triggerSelectionChange\":[64],\"getDisplayableShortcuts\":[64],\"openLoginDialog\":[64],\"setLoginLoading\":[64]},[[0,\"dblclick\",\"onTouchStart\"]],{\"isEngineReady\":[{\"onIsEngineReady\":0}],\"isControlsReady\":[{\"onIsControlsReady\":0}],\"workspaces\":[{\"onWorkspacesChange\":0}],\"activeWorkspace\":[{\"onActiveWorkspaceChange\":0}],\"activeWorkspaceId\":[{\"onActiveWorkspaceIdChange\":0}],\"currentTheme\":[{\"onCurrentThemeChange\":0}]}],[513,\"kritzel-controls\",{\"controls\":[16],\"activeControl\":[1040],\"isUtilityPanelVisible\":[4,\"is-utility-panel-visible\"],\"undoState\":[16],\"theme\":[1],\"firstConfig\":[32],\"isTouchDevice\":[32],\"selectedSubOptions\":[32],\"canScrollLeft\":[32],\"canScrollRight\":[32],\"needsScrolling\":[32],\"displayValues\":[32],\"closeTooltip\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[4,\"activeToolChange\",\"handleActiveToolChange\"],[4,\"objectsSelectionChange\",\"handleSelectionChange\"]],{\"theme\":[{\"onThemeChange\":0}]}],[513,\"kritzel-export\",{\"workspaceName\":[1,\"workspace-name\"],\"isDialogOpen\":[32],\"previewUrl\":[32],\"isLoading\":[32],\"activeTab\":[32],\"exportFilename\":[32],\"viewportExportFormat\":[32],\"open\":[64]}],[513,\"kritzel-settings\",{\"shortcuts\":[16],\"editorId\":[1,\"editor-id\"],\"isDialogOpen\":[32],\"selectedCategoryId\":[32],\"scaleMin\":[32],\"scaleMax\":[32],\"lockDrawingScale\":[32],\"currentTheme\":[32],\"viewportBoundaryLeft\":[32],\"viewportBoundaryRight\":[32],\"viewportBoundaryTop\":[32],\"viewportBoundaryBottom\":[32],\"debugInfo\":[32],\"open\":[64]}],[513,\"kritzel-workspace-manager\",{\"visible\":[4],\"activeWorkspace\":[1040],\"workspaces\":[16],\"childMenuAnchor\":[32],\"openChildMenuItem\":[32],\"newWorkspace\":[32],\"editingItemId\":[32]},[[8,\"wheel\",\"handleWheel\"]]],[513,\"kritzel-engine\",{\"workspace\":[16],\"editorId\":[1,\"editor-id\"],\"activeWorkspaceId\":[1,\"active-workspace-id\"],\"syncConfig\":[16],\"assetStorageConfig\":[16],\"user\":[16],\"globalContextMenuItems\":[16],\"objectContextMenuItems\":[16],\"scaleMax\":[1026,\"scale-max\"],\"scaleMin\":[1026,\"scale-min\"],\"cursorTarget\":[16],\"lockDrawingScale\":[4,\"lock-drawing-scale\"],\"theme\":[1],\"viewportBoundaryLeft\":[2,\"viewport-boundary-left\"],\"viewportBoundaryRight\":[2,\"viewport-boundary-right\"],\"viewportBoundaryTop\":[2,\"viewport-boundary-top\"],\"viewportBoundaryBottom\":[2,\"viewport-boundary-bottom\"],\"debugInfo\":[16],\"wheelEnabled\":[4,\"wheel-enabled\"],\"isLoading\":[4,\"is-loading\"],\"forceUpdate\":[32],\"triggerSelectionChange\":[64],\"registerTool\":[64],\"changeActiveTool\":[64],\"disable\":[64],\"enable\":[64],\"delete\":[64],\"copy\":[64],\"cut\":[64],\"paste\":[64],\"bringForward\":[64],\"sendBackward\":[64],\"bringToFront\":[64],\"sendToBack\":[64],\"alignObjects\":[64],\"group\":[64],\"ungroup\":[64],\"undo\":[64],\"redo\":[64],\"hideContextMenu\":[64],\"getObjectById\":[64],\"getAllObjects\":[64],\"findObjects\":[64],\"getObjectsTotalCount\":[64],\"addObject\":[64],\"updateObject\":[64],\"removeObject\":[64],\"getSelectedObjects\":[64],\"getDisplayableShortcuts\":[64],\"selectObjects\":[64],\"selectAllObjectsInViewport\":[64],\"clearSelection\":[64],\"centerObjectInViewport\":[64],\"backToContent\":[64],\"centerAllObjects\":[64],\"setViewport\":[64],\"panTo\":[64],\"zoomTo\":[64],\"getViewport\":[64],\"screenToWorld\":[64],\"worldToScreen\":[64],\"getCopiedObjects\":[64],\"getObjectsInViewport\":[64],\"getScreenshot\":[64],\"exportViewportAsPng\":[64],\"exportViewportAsSvg\":[64],\"getSelectedObjectsAsSvgString\":[64],\"exportSelectedObjectsAsSvg\":[64],\"getSelectedObjectsAsPngDataUrl\":[64],\"exportSelectedObjectsAsPng\":[64],\"exportAsJson\":[64],\"importFromJson\":[64],\"loadObjectsFromJson\":[64],\"downloadAsJson\":[64],\"importFromFile\":[64],\"createWorkspace\":[64],\"updateWorkspace\":[64],\"deleteWorkspace\":[64],\"getWorkspaces\":[64],\"getActiveWorkspace\":[64],\"getIsPublic\":[64],\"loadSharedWorkspace\":[64],\"reinitSync\":[64]},[[1,\"wheel\",\"handleWheel\"],[0,\"pointerdown\",\"handlePointerDown\"],[0,\"pointermove\",\"handlePointerMove\"],[0,\"pointerup\",\"handlePointerUp\"],[0,\"pointercancel\",\"handlePointerCancel\"],[1,\"pointerleave\",\"handlePointerLeave\"],[1,\"longpress\",\"handleLongPress\"],[0,\"contextmenu\",\"handleContextMenu\"],[9,\"resize\",\"handleResize\"],[8,\"keydown\",\"handleKeyDown\"],[8,\"keyup\",\"handleKeyUp\"],[4,\"dblclick\",\"preventDoubleTapZoomOnTouchDevices\"]],{\"workspace\":[{\"onWorkspaceChange\":0}],\"activeWorkspaceId\":[{\"onActiveWorkspaceIdChange\":0}],\"syncConfig\":[{\"onSyncConfigChange\":0}],\"assetStorageConfig\":[{\"onAssetStorageConfigChange\":0}],\"user\":[{\"onUserChange\":0}],\"scaleMax\":[{\"validateScaleMax\":0}],\"scaleMin\":[{\"validateScaleMin\":0}],\"cursorTarget\":[{\"onCursorTargetChange\":0}],\"lockDrawingScale\":[{\"onLockDrawingScaleChange\":0}],\"theme\":[{\"onThemeChange\":0}],\"viewportBoundaryLeft\":[{\"onViewportBoundaryLeftChange\":0}],\"viewportBoundaryRight\":[{\"onViewportBoundaryRightChange\":0}],\"viewportBoundaryTop\":[{\"onViewportBoundaryTopChange\":0}],\"viewportBoundaryBottom\":[{\"onViewportBoundaryBottomChange\":0}],\"debugInfo\":[{\"onDebugInfoChange\":0}],\"isLoading\":[{\"onIsLoadingChange\":0}]}],[513,\"kritzel-more-menu\",{\"visible\":[4],\"items\":[16],\"icon\":[1],\"iconSize\":[2,\"icon-size\"],\"offsetY\":[2,\"offset-y\"],\"menuAnchor\":[32],\"isTouchDevice\":[32]}],[513,\"kritzel-current-user\",{\"user\":[16],\"avatarSize\":[2,\"avatar-size\"]}],[513,\"kritzel-share-dialog\",{\"isPublic\":[4,\"is-public\"],\"workspaceId\":[1,\"workspace-id\"],\"isDialogOpen\":[32],\"internalIsPublic\":[32],\"copySuccess\":[32],\"open\":[64],\"close\":[64]},null,{\"isPublic\":[{\"onIsPublicChange\":0}]}],[513,\"kritzel-login-dialog\",{\"providers\":[16],\"dialogTitle\":[1,\"dialog-title\"],\"subtitle\":[1],\"isDialogOpen\":[32],\"loadingProvider\":[32],\"open\":[64],\"close\":[64],\"setLoading\":[64]}],[513,\"kritzel-active-users\",{\"users\":[16],\"avatarSize\":[2,\"avatar-size\"],\"maxVisible\":[2,\"max-visible\"],\"overlap\":[2]}],[513,\"kritzel-back-to-content\",{\"visible\":[4],\"text\":[1]}],[769,\"kritzel-button\",{\"variant\":[1],\"disabled\":[4],\"type\":[1]}],[513,\"kritzel-tool-config\",{\"tool\":[1040],\"isExpanded\":[1028,\"is-expanded\"],\"theme\":[1],\"config\":[32],\"palette\":[32],\"currentOpacity\":[32],\"updateTrigger\":[32]},[[4,\"objectsSelectionChange\",\"handleSelectionChange\"]],{\"tool\":[{\"handleToolChange\":0}],\"theme\":[{\"onThemeChange\":0}]}],[513,\"kritzel-split-button\",{\"buttonIcon\":[1,\"button-icon\"],\"dropdownIcon\":[1,\"dropdown-icon\"],\"items\":[16],\"mainButtonDisabled\":[4,\"main-button-disabled\"],\"menuButtonDisabled\":[4,\"menu-button-disabled\"],\"isMenuOpen\":[32],\"isTouchDevice\":[32],\"anchorElement\":[32],\"menuScrollTop\":[32],\"open\":[64],\"focusMenu\":[64]}],[513,\"kritzel-current-user-dialog\",{\"user\":[16],\"isDialogOpen\":[32],\"open\":[64],\"close\":[64]}],[513,\"kritzel-context-menu\",{\"items\":[16],\"objects\":[16],\"processedItems\":[32],\"openSubmenuIndex\":[32],\"submenuPosition\":[32]},[[9,\"pointerdown\",\"handleOutsideClick\"]],{\"items\":[{\"onItemsChanged\":0}]}],[769,\"kritzel-master-detail\",{\"items\":[16],\"selectedItemId\":[1,\"selected-item-id\"],\"focusedIndex\":[32],\"showMobileDetail\":[32]},null,{\"selectedItemId\":[{\"watchSelectedItemId\":0}]}],[513,\"kritzel-pill-tabs\",{\"tabs\":[16],\"value\":[1025]}],[513,\"kritzel-utility-panel\",{\"undoState\":[16]}],[513,\"kritzel-awareness-cursors\",{\"core\":[16],\"showEdgeIndicators\":[4,\"show-edge-indicators\"],\"edgeIndicatorPadding\":[2,\"edge-indicator-padding\"],\"remoteCursors\":[32],\"objectVersion\":[32]}],[513,\"kritzel-cursor-trail\",{\"core\":[16],\"cursorTrailPoints\":[32],\"isLeftButtonDown\":[32]},[[9,\"pointerdown\",\"handleMouseDown\"],[9,\"pointermove\",\"handlePointerMove\"],[9,\"pointerup\",\"handlePointerUp\"]]],[513,\"kritzel-input\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"suffix\":[1],\"type\":[1],\"disabled\":[4],\"inputValue\":[32]},null,{\"value\":[{\"onValueChange\":0}]}],[513,\"kritzel-numeric-input\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"label\":[1],\"placeholder\":[1],\"inputValue\":[32]},null,{\"value\":[{\"onValueChange\":0}]}],[769,\"kritzel-tooltip\",{\"isVisible\":[1028,\"is-visible\"],\"anchorElement\":[16],\"triggerElement\":[16],\"offsetY\":[2,\"offset-y\"],\"positionX\":[32],\"positionY\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"focusContent\":[64]},[[4,\"click\",\"handleOutsideClick\"],[6,\"pointerdown\",\"handleOutsidePointerDown\"],[4,\"kritzelTooltipCloseAll\",\"handleCloseAll\"],[9,\"resize\",\"handleWindowResize\"]],{\"triggerElement\":[{\"handleTriggerElementChange\":0}],\"isVisible\":[{\"handleVisibilityChange\":0}]}],[513,\"kritzel-color-palette\",{\"colors\":[16],\"selectedColor\":[1040],\"isExpanded\":[4,\"is-expanded\"],\"isOpaque\":[4,\"is-opaque\"],\"opacity\":[2],\"theme\":[1]}],[513,\"kritzel-font-family\",{\"fontOptions\":[16],\"selectedFontFamily\":[1025,\"selected-font-family\"]}],[513,\"kritzel-font-size\",{\"sizes\":[16],\"selectedSize\":[1026,\"selected-size\"],\"fontFamily\":[1,\"font-family\"]}],[513,\"kritzel-stroke-size\",{\"sizes\":[16],\"selectedSize\":[1026,\"selected-size\"]}],[513,\"kritzel-line-endings\",{\"styles\":[16],\"value\":[1040]}],[513,\"kritzel-opacity-slider\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"previewColor\":[1,\"preview-color\"]}],[513,\"kritzel-shape-fill\",{\"value\":[1025]}],[513,\"kritzel-slide-toggle\",{\"checked\":[1028],\"disabled\":[4],\"label\":[1]}],[513,\"kritzel-avatar\",{\"user\":[16],\"name\":[1],\"size\":[2],\"color\":[1],\"imageError\":[32]},null,{\"user\":[{\"userChanged\":0}],\"profileImageUrl\":[{\"profileImageUrlChanged\":0}]}],[513,\"kritzel-font\",{\"fontFamily\":[1,\"font-family\"],\"size\":[2],\"color\":[1]}],[513,\"kritzel-color\",{\"value\":[1],\"theme\":[1],\"size\":[2]}],[513,\"kritzel-menu\",{\"items\":[16],\"parent\":[16],\"selectedIndex\":[32],\"setScrollTop\":[64],\"setFocus\":[64]}],[513,\"kritzel-menu-item\",{\"item\":[16],\"parent\":[16],\"isDirty\":[32]},null,{\"item\":[{\"onItemChange\":0}]}],[769,\"kritzel-dropdown\",{\"options\":[16],\"value\":[1],\"width\":[1],\"selectStyles\":[16],\"forceOpenDirection\":[1,\"force-open-direction\"],\"internalValue\":[32],\"hasSuffixContent\":[32],\"hasPrefixContent\":[32],\"isOpen\":[32],\"focusedIndex\":[32],\"openDirection\":[32]},[[4,\"click\",\"handleDocumentClick\"],[4,\"keydown\",\"handleDocumentKeydown\"]],{\"options\":[{\"optionsChanged\":0}],\"value\":[{\"externalValueChanged\":0}]}],[769,\"kritzel-portal\",{\"anchor\":[16],\"offsetX\":[2,\"offset-x\"],\"offsetY\":[2,\"offset-y\"],\"autoFocus\":[4,\"auto-focus\"]},[[8,\"kritzel-dismiss-menus\",\"handleDismissMenus\"],[8,\"click\",\"handleOutsideClick\"],[8,\"keydown\",\"handleKeyDown\"],[11,\"resize\",\"handleResize\"],[11,\"scroll\",\"handleWindowScroll\"]],{\"anchor\":[{\"anchorChanged\":0}]}],[769,\"kritzel-dialog\",{\"isOpen\":[516,\"is-open\"],\"dialogTitle\":[1,\"dialog-title\"],\"closable\":[4],\"closeOnBackdrop\":[4,\"close-on-backdrop\"],\"closeOnEscape\":[4,\"close-on-escape\"],\"autoFocus\":[4,\"auto-focus\"],\"trapFocus\":[4,\"trap-focus\"],\"size\":[1],\"fullscreenOnMobile\":[4,\"fullscreen-on-mobile\"],\"isAnimating\":[32],\"mobileLockedHeight\":[32],\"open\":[64],\"close\":[64],\"focusFirstElement\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"isOpen\":[{\"handleIsOpenChange\":0}]}],[513,\"kritzel-icon\",{\"name\":[1],\"label\":[1],\"size\":[2]}]]],[\"kritzel-brush-style.cjs\",[[513,\"kritzel-brush-style\",{\"type\":[1],\"brushOptions\":[16]}]]]]"), options);
22
+ return index.bootstrapLazy(JSON.parse("[[\"kritzel-active-users_42.cjs\",[[512,\"kritzel-editor\",{\"scaleMax\":[1026,\"scale-max\"],\"scaleMin\":[1026,\"scale-min\"],\"lockDrawingScale\":[1028,\"lock-drawing-scale\"],\"viewportBoundaryLeft\":[1026,\"viewport-boundary-left\"],\"viewportBoundaryRight\":[1026,\"viewport-boundary-right\"],\"viewportBoundaryTop\":[1026,\"viewport-boundary-top\"],\"viewportBoundaryBottom\":[1026,\"viewport-boundary-bottom\"],\"wheelEnabled\":[1028,\"wheel-enabled\"],\"debugInfo\":[1040],\"user\":[16],\"activeUsers\":[16],\"controls\":[16],\"globalContextMenuItems\":[16],\"objectContextMenuItems\":[16],\"customSvgIcons\":[16],\"isControlsVisible\":[4,\"is-controls-visible\"],\"isUtilityPanelVisible\":[4,\"is-utility-panel-visible\"],\"isWorkspaceManagerVisible\":[4,\"is-workspace-manager-visible\"],\"isMoreMenuVisible\":[4,\"is-more-menu-visible\"],\"syncConfig\":[16],\"assetStorageConfig\":[16],\"cursorTarget\":[16],\"loginConfig\":[16],\"isLoading\":[4,\"is-loading\"],\"editorId\":[1,\"editor-id\"],\"activeWorkspaceId\":[1,\"active-workspace-id\"],\"isEngineReady\":[32],\"isControlsReady\":[32],\"isWorkspaceManagerReady\":[32],\"workspaces\":[32],\"activeWorkspace\":[32],\"isVirtualKeyboardOpen\":[32],\"undoState\":[32],\"isBackToContentButtonVisible\":[32],\"currentTheme\":[32],\"shortcuts\":[32],\"currentIsPublic\":[32],\"getObjectById\":[64],\"addObject\":[64],\"updateObject\":[64],\"removeObject\":[64],\"getSelectedObjects\":[64],\"selectObjects\":[64],\"selectAllObjectsInViewport\":[64],\"clearSelection\":[64],\"centerObjectInViewport\":[64],\"backToContent\":[64],\"centerAllObjects\":[64],\"setViewport\":[64],\"panTo\":[64],\"zoomTo\":[64],\"getViewport\":[64],\"screenToWorld\":[64],\"worldToScreen\":[64],\"createWorkspace\":[64],\"updateWorkspace\":[64],\"deleteWorkspace\":[64],\"getWorkspaces\":[64],\"getActiveWorkspace\":[64],\"loadSharedWorkspace\":[64],\"reinitSync\":[64],\"registerTool\":[64],\"changeActiveTool\":[64],\"disable\":[64],\"enable\":[64],\"copy\":[64],\"cut\":[64],\"paste\":[64],\"delete\":[64],\"bringForward\":[64],\"sendBackward\":[64],\"bringToFront\":[64],\"sendToBack\":[64],\"alignObjects\":[64],\"group\":[64],\"ungroup\":[64],\"undo\":[64],\"redo\":[64],\"getScreenshot\":[64],\"exportViewportAsPng\":[64],\"exportViewportAsSvg\":[64],\"downloadAsJson\":[64],\"importFromFile\":[64],\"loadObjectsFromJson\":[64],\"getObjectsTotalCount\":[64],\"getAllObjects\":[64],\"findObjects\":[64],\"getCopiedObjects\":[64],\"getObjectsInViewport\":[64],\"hideContextMenu\":[64],\"triggerSelectionChange\":[64],\"getDisplayableShortcuts\":[64],\"openLoginDialog\":[64],\"setLoginLoading\":[64]},[[0,\"dblclick\",\"onTouchStart\"]],{\"isEngineReady\":[{\"onIsEngineReady\":0}],\"isControlsReady\":[{\"onIsControlsReady\":0}],\"workspaces\":[{\"onWorkspacesChange\":0}],\"activeWorkspace\":[{\"onActiveWorkspaceChange\":0}],\"activeWorkspaceId\":[{\"onActiveWorkspaceIdChange\":0}],\"currentTheme\":[{\"onCurrentThemeChange\":0}]}],[513,\"kritzel-controls\",{\"controls\":[16],\"activeControl\":[1040],\"isUtilityPanelVisible\":[4,\"is-utility-panel-visible\"],\"undoState\":[16],\"theme\":[1],\"firstConfig\":[32],\"isTouchDevice\":[32],\"selectedSubOptions\":[32],\"canScrollLeft\":[32],\"canScrollRight\":[32],\"needsScrolling\":[32],\"displayValues\":[32],\"closeTooltip\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[4,\"activeToolChange\",\"handleActiveToolChange\"],[4,\"objectsSelectionChange\",\"handleSelectionChange\"]],{\"theme\":[{\"onThemeChange\":0}]}],[513,\"kritzel-export\",{\"workspaceName\":[1,\"workspace-name\"],\"isDialogOpen\":[32],\"previewUrl\":[32],\"isLoading\":[32],\"activeTab\":[32],\"exportFilename\":[32],\"viewportExportFormat\":[32],\"open\":[64]}],[513,\"kritzel-settings\",{\"shortcuts\":[16],\"editorId\":[1,\"editor-id\"],\"isDialogOpen\":[32],\"selectedCategoryId\":[32],\"scaleMin\":[32],\"scaleMax\":[32],\"lockDrawingScale\":[32],\"currentTheme\":[32],\"viewportBoundaryLeft\":[32],\"viewportBoundaryRight\":[32],\"viewportBoundaryTop\":[32],\"viewportBoundaryBottom\":[32],\"debugInfo\":[32],\"open\":[64]}],[513,\"kritzel-workspace-manager\",{\"visible\":[4],\"activeWorkspace\":[1040],\"workspaces\":[16],\"childMenuAnchor\":[32],\"openChildMenuItem\":[32],\"newWorkspace\":[32],\"editingItemId\":[32]},[[8,\"wheel\",\"handleWheel\"]]],[513,\"kritzel-engine\",{\"workspace\":[16],\"editorId\":[1,\"editor-id\"],\"activeWorkspaceId\":[1,\"active-workspace-id\"],\"syncConfig\":[16],\"assetStorageConfig\":[16],\"user\":[16],\"globalContextMenuItems\":[16],\"objectContextMenuItems\":[16],\"scaleMax\":[1026,\"scale-max\"],\"scaleMin\":[1026,\"scale-min\"],\"cursorTarget\":[16],\"lockDrawingScale\":[4,\"lock-drawing-scale\"],\"theme\":[1],\"viewportBoundaryLeft\":[2,\"viewport-boundary-left\"],\"viewportBoundaryRight\":[2,\"viewport-boundary-right\"],\"viewportBoundaryTop\":[2,\"viewport-boundary-top\"],\"viewportBoundaryBottom\":[2,\"viewport-boundary-bottom\"],\"debugInfo\":[16],\"wheelEnabled\":[4,\"wheel-enabled\"],\"isLoading\":[4,\"is-loading\"],\"forceUpdate\":[32],\"triggerSelectionChange\":[64],\"registerTool\":[64],\"changeActiveTool\":[64],\"disable\":[64],\"enable\":[64],\"delete\":[64],\"copy\":[64],\"cut\":[64],\"paste\":[64],\"bringForward\":[64],\"sendBackward\":[64],\"bringToFront\":[64],\"sendToBack\":[64],\"alignObjects\":[64],\"group\":[64],\"ungroup\":[64],\"undo\":[64],\"redo\":[64],\"hideContextMenu\":[64],\"getObjectById\":[64],\"getAllObjects\":[64],\"findObjects\":[64],\"getObjectsTotalCount\":[64],\"addObject\":[64],\"updateObject\":[64],\"removeObject\":[64],\"getSelectedObjects\":[64],\"getDisplayableShortcuts\":[64],\"selectObjects\":[64],\"selectAllObjectsInViewport\":[64],\"clearSelection\":[64],\"centerObjectInViewport\":[64],\"backToContent\":[64],\"centerAllObjects\":[64],\"setViewport\":[64],\"panTo\":[64],\"zoomTo\":[64],\"getViewport\":[64],\"screenToWorld\":[64],\"worldToScreen\":[64],\"getCopiedObjects\":[64],\"getObjectsInViewport\":[64],\"getScreenshot\":[64],\"exportViewportAsPng\":[64],\"exportViewportAsSvg\":[64],\"getSelectedObjectsAsSvgString\":[64],\"exportSelectedObjectsAsSvg\":[64],\"getSelectedObjectsAsPngDataUrl\":[64],\"exportSelectedObjectsAsPng\":[64],\"exportAsJson\":[64],\"importFromJson\":[64],\"loadObjectsFromJson\":[64],\"downloadAsJson\":[64],\"importFromFile\":[64],\"createWorkspace\":[64],\"updateWorkspace\":[64],\"deleteWorkspace\":[64],\"getWorkspaces\":[64],\"getActiveWorkspace\":[64],\"getIsPublic\":[64],\"loadSharedWorkspace\":[64],\"reinitSync\":[64]},[[1,\"wheel\",\"handleWheel\"],[0,\"pointerdown\",\"handlePointerDown\"],[0,\"pointermove\",\"handlePointerMove\"],[0,\"pointerup\",\"handlePointerUp\"],[0,\"pointercancel\",\"handlePointerCancel\"],[1,\"pointerleave\",\"handlePointerLeave\"],[1,\"longpress\",\"handleLongPress\"],[0,\"contextmenu\",\"handleContextMenu\"],[9,\"resize\",\"handleResize\"],[8,\"keydown\",\"handleKeyDown\"],[8,\"keyup\",\"handleKeyUp\"],[4,\"dblclick\",\"preventDoubleTapZoomOnTouchDevices\"]],{\"workspace\":[{\"onWorkspaceChange\":0}],\"activeWorkspaceId\":[{\"onActiveWorkspaceIdChange\":0}],\"syncConfig\":[{\"onSyncConfigChange\":0}],\"assetStorageConfig\":[{\"onAssetStorageConfigChange\":0}],\"user\":[{\"onUserChange\":0}],\"scaleMax\":[{\"validateScaleMax\":0}],\"scaleMin\":[{\"validateScaleMin\":0}],\"cursorTarget\":[{\"onCursorTargetChange\":0}],\"lockDrawingScale\":[{\"onLockDrawingScaleChange\":0}],\"theme\":[{\"onThemeChange\":0}],\"viewportBoundaryLeft\":[{\"onViewportBoundaryLeftChange\":0}],\"viewportBoundaryRight\":[{\"onViewportBoundaryRightChange\":0}],\"viewportBoundaryTop\":[{\"onViewportBoundaryTopChange\":0}],\"viewportBoundaryBottom\":[{\"onViewportBoundaryBottomChange\":0}],\"debugInfo\":[{\"onDebugInfoChange\":0}],\"isLoading\":[{\"onIsLoadingChange\":0}]}],[513,\"kritzel-more-menu\",{\"visible\":[4],\"items\":[16],\"icon\":[1],\"iconSize\":[2,\"icon-size\"],\"offsetY\":[2,\"offset-y\"],\"menuAnchor\":[32],\"isTouchDevice\":[32]}],[513,\"kritzel-current-user\",{\"user\":[16],\"avatarSize\":[2,\"avatar-size\"]}],[513,\"kritzel-share-dialog\",{\"isPublic\":[4,\"is-public\"],\"workspaceId\":[1,\"workspace-id\"],\"isDialogOpen\":[32],\"internalIsPublic\":[32],\"copySuccess\":[32],\"open\":[64],\"close\":[64]},null,{\"isPublic\":[{\"onIsPublicChange\":0}]}],[513,\"kritzel-login-dialog\",{\"providers\":[16],\"dialogTitle\":[1,\"dialog-title\"],\"subtitle\":[1],\"isDialogOpen\":[32],\"loadingProvider\":[32],\"open\":[64],\"close\":[64],\"setLoading\":[64]}],[513,\"kritzel-active-users\",{\"users\":[16],\"avatarSize\":[2,\"avatar-size\"],\"maxVisible\":[2,\"max-visible\"],\"overlap\":[2]}],[513,\"kritzel-back-to-content\",{\"visible\":[4],\"text\":[1]}],[769,\"kritzel-button\",{\"variant\":[1],\"disabled\":[4],\"type\":[1]}],[513,\"kritzel-tool-config\",{\"tool\":[1040],\"isExpanded\":[1028,\"is-expanded\"],\"theme\":[1],\"config\":[32],\"palette\":[32],\"currentOpacity\":[32],\"updateTrigger\":[32]},[[4,\"objectsSelectionChange\",\"handleSelectionChange\"]],{\"tool\":[{\"handleToolChange\":0}],\"theme\":[{\"onThemeChange\":0}]}],[513,\"kritzel-split-button\",{\"buttonIcon\":[1,\"button-icon\"],\"dropdownIcon\":[1,\"dropdown-icon\"],\"items\":[16],\"mainButtonDisabled\":[4,\"main-button-disabled\"],\"menuButtonDisabled\":[4,\"menu-button-disabled\"],\"isMenuOpen\":[32],\"isTouchDevice\":[32],\"anchorElement\":[32],\"menuScrollTop\":[32],\"open\":[64],\"focusMenu\":[64]}],[513,\"kritzel-current-user-dialog\",{\"user\":[16],\"isDialogOpen\":[32],\"open\":[64],\"close\":[64]}],[513,\"kritzel-context-menu\",{\"items\":[16],\"objects\":[16],\"processedItems\":[32],\"openSubmenuIndex\":[32],\"submenuPosition\":[32]},[[9,\"pointerdown\",\"handleOutsideClick\"]],{\"items\":[{\"onItemsChanged\":0}]}],[769,\"kritzel-master-detail\",{\"items\":[16],\"selectedItemId\":[1,\"selected-item-id\"],\"focusedIndex\":[32],\"showMobileDetail\":[32]},null,{\"selectedItemId\":[{\"watchSelectedItemId\":0}]}],[513,\"kritzel-pill-tabs\",{\"tabs\":[16],\"value\":[1025]}],[513,\"kritzel-utility-panel\",{\"undoState\":[16]}],[513,\"kritzel-awareness-cursors\",{\"core\":[16],\"showEdgeIndicators\":[4,\"show-edge-indicators\"],\"edgeIndicatorPadding\":[2,\"edge-indicator-padding\"],\"remoteCursors\":[32],\"objectVersion\":[32]}],[513,\"kritzel-cursor-trail\",{\"core\":[16],\"cursorTrailPoints\":[32],\"isLeftButtonDown\":[32]},[[9,\"pointerdown\",\"handleMouseDown\"],[9,\"pointermove\",\"handlePointerMove\"],[9,\"pointerup\",\"handlePointerUp\"]]],[513,\"kritzel-input\",{\"value\":[1025],\"label\":[1],\"placeholder\":[1],\"suffix\":[1],\"type\":[1],\"disabled\":[4],\"inputValue\":[32]},null,{\"value\":[{\"onValueChange\":0}]}],[513,\"kritzel-numeric-input\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"label\":[1],\"placeholder\":[1],\"inputValue\":[32]},null,{\"value\":[{\"onValueChange\":0}]}],[769,\"kritzel-tooltip\",{\"isVisible\":[1028,\"is-visible\"],\"anchorElement\":[16],\"triggerElement\":[16],\"offsetY\":[2,\"offset-y\"],\"positionX\":[32],\"positionY\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"focusContent\":[64]},[[4,\"click\",\"handleOutsideClick\"],[6,\"pointerdown\",\"handleOutsidePointerDown\"],[4,\"kritzelTooltipCloseAll\",\"handleCloseAll\"],[9,\"resize\",\"handleWindowResize\"]],{\"triggerElement\":[{\"handleTriggerElementChange\":0}],\"isVisible\":[{\"handleVisibilityChange\":0}]}],[513,\"kritzel-color-palette\",{\"colors\":[16],\"selectedColor\":[1040],\"isExpanded\":[4,\"is-expanded\"],\"isOpaque\":[4,\"is-opaque\"],\"opacity\":[2],\"theme\":[1]}],[513,\"kritzel-font-family\",{\"fontOptions\":[16],\"selectedFontFamily\":[1025,\"selected-font-family\"]}],[513,\"kritzel-font-size\",{\"sizes\":[16],\"selectedSize\":[1026,\"selected-size\"],\"fontFamily\":[1,\"font-family\"]}],[513,\"kritzel-stroke-size\",{\"sizes\":[16],\"selectedSize\":[1026,\"selected-size\"]}],[513,\"kritzel-line-endings\",{\"styles\":[16],\"value\":[1040]}],[513,\"kritzel-opacity-slider\",{\"value\":[1026],\"min\":[2],\"max\":[2],\"step\":[2],\"previewColor\":[1,\"preview-color\"]}],[513,\"kritzel-shape-fill\",{\"value\":[1025]}],[513,\"kritzel-slide-toggle\",{\"checked\":[1028],\"disabled\":[4],\"label\":[1]}],[513,\"kritzel-avatar\",{\"user\":[16],\"name\":[1],\"size\":[2],\"color\":[1],\"imageError\":[32]},null,{\"user\":[{\"userChanged\":0}],\"profileImageUrl\":[{\"profileImageUrlChanged\":0}]}],[513,\"kritzel-font\",{\"fontFamily\":[1,\"font-family\"],\"size\":[2],\"color\":[1]}],[513,\"kritzel-color\",{\"value\":[1],\"theme\":[1],\"size\":[2]}],[513,\"kritzel-menu\",{\"items\":[16],\"parent\":[16],\"selectedIndex\":[32],\"setScrollTop\":[64],\"setFocus\":[64]}],[513,\"kritzel-menu-item\",{\"item\":[16],\"parent\":[16],\"isDirty\":[32]},null,{\"item\":[{\"onItemChange\":0}]}],[769,\"kritzel-dropdown\",{\"options\":[16],\"value\":[1],\"width\":[1],\"selectStyles\":[16],\"forceOpenDirection\":[1,\"force-open-direction\"],\"internalValue\":[32],\"hasSuffixContent\":[32],\"hasPrefixContent\":[32],\"isOpen\":[32],\"focusedIndex\":[32],\"openDirection\":[32]},[[4,\"click\",\"handleDocumentClick\"],[4,\"keydown\",\"handleDocumentKeydown\"]],{\"options\":[{\"optionsChanged\":0}],\"value\":[{\"externalValueChanged\":0}]}],[769,\"kritzel-portal\",{\"anchor\":[16],\"offsetX\":[2,\"offset-x\"],\"offsetY\":[2,\"offset-y\"],\"autoFocus\":[4,\"auto-focus\"]},[[8,\"kritzel-dismiss-menus\",\"handleDismissMenus\"],[8,\"click\",\"handleOutsideClick\"],[6,\"pointerdown\",\"handleOutsidePointerDown\"],[8,\"keydown\",\"handleKeyDown\"],[11,\"resize\",\"handleResize\"],[11,\"scroll\",\"handleWindowScroll\"]],{\"anchor\":[{\"anchorChanged\":0}]}],[769,\"kritzel-dialog\",{\"isOpen\":[516,\"is-open\"],\"dialogTitle\":[1,\"dialog-title\"],\"closable\":[4],\"closeOnBackdrop\":[4,\"close-on-backdrop\"],\"closeOnEscape\":[4,\"close-on-escape\"],\"autoFocus\":[4,\"auto-focus\"],\"trapFocus\":[4,\"trap-focus\"],\"size\":[1],\"fullscreenOnMobile\":[4,\"fullscreen-on-mobile\"],\"isAnimating\":[32],\"mobileLockedHeight\":[32],\"open\":[64],\"close\":[64],\"focusFirstElement\":[64]},[[8,\"keydown\",\"handleKeyDown\"]],{\"isOpen\":[{\"handleIsOpenChange\":0}]}],[513,\"kritzel-icon\",{\"name\":[1],\"label\":[1],\"size\":[2]}]]],[\"kritzel-brush-style.cjs\",[[513,\"kritzel-brush-style\",{\"type\":[1],\"brushOptions\":[16]}]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -14511,6 +14511,15 @@ const lightTheme = {
14511
14511
  },
14512
14512
  engine: {
14513
14513
  backgroundColor: '#ffffff',
14514
+ loadingOverlayBackground: 'rgba(255, 255, 255, 0.85)',
14515
+ loadingOverlayColor: '#333333',
14516
+ loadingOverlaySpinnerActiveColor: '#333333',
14517
+ loadingOverlaySpinnerColor: '#cccccc',
14518
+ },
14519
+ snap: {
14520
+ indicatorFill: 'rgba(59, 130, 246, 0.3)',
14521
+ indicatorStroke: '#007bff',
14522
+ lineStroke: 'rgba(0, 0, 0, 0.2)',
14514
14523
  },
14515
14524
  fontSize: {
14516
14525
  hoverBackgroundColor: '#ebebeb',
@@ -14775,6 +14784,15 @@ const darkTheme = {
14775
14784
  },
14776
14785
  engine: {
14777
14786
  backgroundColor: '#1a1a1a',
14787
+ loadingOverlayBackground: 'rgba(26, 26, 26, 0.85)',
14788
+ loadingOverlayColor: '#e0e0e0',
14789
+ loadingOverlaySpinnerActiveColor: '#e0e0e0',
14790
+ loadingOverlaySpinnerColor: '#555555',
14791
+ },
14792
+ snap: {
14793
+ indicatorFill: 'rgba(10, 132, 255, 0.35)',
14794
+ indicatorStroke: '#0A84FF',
14795
+ lineStroke: 'rgba(255, 255, 255, 0.35)',
14778
14796
  },
14779
14797
  fontSize: {
14780
14798
  hoverBackgroundColor: '#3a3a3a',
@@ -18268,6 +18286,23 @@ class KritzelGroup extends KritzelBaseObject {
18268
18286
  }
18269
18287
  return null;
18270
18288
  }
18289
+ /**
18290
+ * Recursively collects the IDs of all descendants of the given group (children,
18291
+ * grandchildren, etc.). Useful for detecting when a selection contains both an
18292
+ * ancestor group and one of its descendants — a configuration that would otherwise
18293
+ * cause the descendant to be transformed twice (once via the ancestor, once directly).
18294
+ * @param group - The group whose descendants should be collected.
18295
+ * @param out - A set that will be populated with all descendant object IDs.
18296
+ */
18297
+ static collectDescendantIds(group, out = new Set()) {
18298
+ for (const child of group.children) {
18299
+ out.add(child.id);
18300
+ if (child instanceof KritzelGroup) {
18301
+ KritzelGroup.collectDescendantIds(child, out);
18302
+ }
18303
+ }
18304
+ return out;
18305
+ }
18271
18306
  /**
18272
18307
  * Adds a child object to this group.
18273
18308
  * If the object is already a child, no action is taken.
@@ -18311,8 +18346,19 @@ class KritzelGroup extends KritzelBaseObject {
18311
18346
  * Finalizes the group after children have been positioned (e.g., after paste).
18312
18347
  * Refreshes the bounding box to encompass all children and captures
18313
18348
  * child snapshots for subsequent transformation operations.
18349
+ *
18350
+ * Recursively finalizes nested child groups first, so that when a transform
18351
+ * (rotate/resize) cascades through nested groups, every group's snapshots are
18352
+ * aligned with the current visual state. Without this, a nested group's
18353
+ * `snapshotRotation` could be stale, causing the inner group to be offset
18354
+ * relative to its parent during rotation.
18314
18355
  */
18315
18356
  finalize() {
18357
+ for (const child of this.children) {
18358
+ if (child instanceof KritzelGroup) {
18359
+ child.finalize();
18360
+ }
18361
+ }
18316
18362
  this.refreshBoundingBox();
18317
18363
  this.captureChildSnapshots();
18318
18364
  }
@@ -18469,11 +18515,23 @@ class KritzelGroup extends KritzelBaseObject {
18469
18515
  * @param height - The new height of the group's content area.
18470
18516
  */
18471
18517
  resize(x, y, width, height) {
18472
- const widthScaleFactor = width / this.width;
18473
- const heightScaleFactor = height / this.height;
18474
- // Calculate old center
18475
- const oldCenterX = this.translateX + this.totalWidth / 2 / this.scale;
18476
- const oldCenterY = this.translateY + this.totalHeight / 2 / this.scale;
18518
+ // Use snapshot dimensions (stable across the gesture) instead of `this.*`,
18519
+ // which mutates each frame and gets distorted by descendants like KritzelText
18520
+ // that clamp to a uniform scale, causing the cascade factor to drift.
18521
+ const baseWidth = this.snapshotTotalWidth > 0
18522
+ ? this.snapshotTotalWidth - this.padding * 2
18523
+ : this.width;
18524
+ const baseHeight = this.snapshotTotalHeight > 0
18525
+ ? this.snapshotTotalHeight - this.padding * 2
18526
+ : this.height;
18527
+ const baseScale = this.snapshotScale || this.scale || 1;
18528
+ const widthScaleFactor = baseWidth !== 0 ? width / baseWidth : 1;
18529
+ const heightScaleFactor = baseHeight !== 0 ? height / baseHeight : 1;
18530
+ // Calculate old center from snapshot (stable across the gesture)
18531
+ const snapshotTotalWidth = this.snapshotTotalWidth || (this.width + this.padding * 2);
18532
+ const snapshotTotalHeight = this.snapshotTotalHeight || (this.height + this.padding * 2);
18533
+ const oldCenterX = this.snapshotTranslateX + snapshotTotalWidth / 2 / baseScale;
18534
+ const oldCenterY = this.snapshotTranslateY + snapshotTotalHeight / 2 / baseScale;
18477
18535
  // Calculate new center
18478
18536
  const newTotalWidth = width + this.padding * 2;
18479
18537
  const newTotalHeight = height + this.padding * 2;
@@ -18486,9 +18544,20 @@ class KritzelGroup extends KritzelBaseObject {
18486
18544
  const sinR = Math.sin(rotation);
18487
18545
  this._core.store.objects.transaction(() => {
18488
18546
  this.children.forEach(child => {
18489
- // Calculate child center
18490
- const childCenterX = child.translateX + child.totalWidth / 2 / child.scale;
18491
- const childCenterY = child.translateY + child.totalHeight / 2 / child.scale;
18547
+ // Use snapshot values for the child to avoid compounding distortions caused
18548
+ // by descendants like text that cannot honour requested aspect ratios.
18549
+ const snapshot = this.unchangedChildSnapshots.get(child.id);
18550
+ const childTranslateX = snapshot ? snapshot.translateX : child.translateX;
18551
+ const childTranslateY = snapshot ? snapshot.translateY : child.translateY;
18552
+ const childTotalWidth = snapshot ? snapshot.totalWidth : child.totalWidth;
18553
+ const childTotalHeight = snapshot ? snapshot.totalHeight : child.totalHeight;
18554
+ const childWidth = snapshot ? snapshot.width : child.width;
18555
+ const childHeight = snapshot ? snapshot.height : child.height;
18556
+ const childRotation = snapshot ? snapshot.rotation : child.rotation;
18557
+ const childScale = (snapshot ? snapshot.scale : child.scale) || 1;
18558
+ // Calculate child center from snapshot
18559
+ const childCenterX = childTranslateX + childTotalWidth / 2 / childScale;
18560
+ const childCenterY = childTranslateY + childTotalHeight / 2 / childScale;
18492
18561
  // Vector from old group center to child center
18493
18562
  const dx = childCenterX - oldCenterX;
18494
18563
  const dy = childCenterY - oldCenterY;
@@ -18505,13 +18574,13 @@ class KritzelGroup extends KritzelBaseObject {
18505
18574
  const newChildCenterX = newCenterX + rotatedX;
18506
18575
  const newChildCenterY = newCenterY + rotatedY;
18507
18576
  // Calculate relative rotation for scaling
18508
- const relativeRotation = child.rotation - rotation;
18577
+ const relativeRotation = childRotation - rotation;
18509
18578
  const cosRel = Math.cos(relativeRotation);
18510
18579
  const sinRel = Math.sin(relativeRotation);
18511
18580
  const newChildWidthScale = Math.sqrt(Math.pow(widthScaleFactor * cosRel, 2) + Math.pow(heightScaleFactor * sinRel, 2));
18512
18581
  const newChildHeightScale = Math.sqrt(Math.pow(widthScaleFactor * sinRel, 2) + Math.pow(heightScaleFactor * cosRel, 2));
18513
- const updatedWidth = child.width * newChildWidthScale;
18514
- const updatedHeight = child.height * newChildHeightScale;
18582
+ const updatedWidth = childWidth * newChildWidthScale;
18583
+ const updatedHeight = childHeight * newChildHeightScale;
18515
18584
  const updatedTotalWidth = updatedWidth + child.padding * 2;
18516
18585
  const updatedTotalHeight = updatedHeight + child.padding * 2;
18517
18586
  const updatedX = newChildCenterX - updatedTotalWidth / 2 / child.scale;
@@ -18521,7 +18590,13 @@ class KritzelGroup extends KritzelBaseObject {
18521
18590
  this._core.anchorManager.updateAnchorsForObject(child.id);
18522
18591
  });
18523
18592
  this.refreshBoundingBox();
18524
- this.captureChildSnapshots();
18593
+ // Don't recapture snapshots while an interactive resize is in progress —
18594
+ // recapturing each frame would defeat the purpose of using stable snapshots
18595
+ // and re-introduce the compounding distortion described above. Snapshots are
18596
+ // refreshed at the start of the next gesture via beginTransform/finalize.
18597
+ if (!this._core.store.state.isResizing) {
18598
+ this.captureChildSnapshots();
18599
+ }
18525
18600
  this._core.store.objects.update(this);
18526
18601
  });
18527
18602
  }
@@ -20817,14 +20892,38 @@ class KritzelImageTool extends KritzelBaseTool {
20817
20892
  * Supports configurable font family, size, color, and opacity.
20818
20893
  */
20819
20894
  class KritzelTextTool extends KritzelBaseTool {
20820
- /** The font family for new text objects */
20821
- fontFamily = 'Arial';
20822
- /** The font size for new text objects in pixels */
20823
- fontSize = 16;
20824
- /** The font color for new text objects (supports theme-aware light/dark colors) */
20825
- fontColor = DEFAULT_COLOR_PALETTE[0];
20826
- /** The opacity of new text objects (0-1) */
20827
- opacity = 1;
20895
+ /** Backing field for {@link fontFamily}. */
20896
+ _fontFamily = 'Arial';
20897
+ /** Backing field for {@link fontSize}. */
20898
+ _fontSize = 16;
20899
+ /** Backing field for {@link fontColor}. */
20900
+ _fontColor = DEFAULT_COLOR_PALETTE[0];
20901
+ /** Backing field for {@link opacity}. */
20902
+ _opacity = 1;
20903
+ /** The font family for new text objects. */
20904
+ get fontFamily() { return this._fontFamily; }
20905
+ set fontFamily(value) {
20906
+ this._fontFamily = value;
20907
+ this.applyToActiveText({ fontFamily: value });
20908
+ }
20909
+ /** The font size for new text objects in pixels. */
20910
+ get fontSize() { return this._fontSize; }
20911
+ set fontSize(value) {
20912
+ this._fontSize = value;
20913
+ this.applyToActiveText({ fontSize: value });
20914
+ }
20915
+ /** The font color for new text objects (supports theme-aware light/dark colors). */
20916
+ get fontColor() { return this._fontColor; }
20917
+ set fontColor(value) {
20918
+ this._fontColor = value;
20919
+ this.applyToActiveText({ fontColor: value });
20920
+ }
20921
+ /** The opacity of new text objects (0-1). */
20922
+ get opacity() { return this._opacity; }
20923
+ set opacity(value) {
20924
+ this._opacity = value;
20925
+ this.applyToActiveText({ opacity: value });
20926
+ }
20828
20927
  /** Available color palette for the text tool */
20829
20928
  palette = [...DEFAULT_COLOR_PALETTE];
20830
20929
  /**
@@ -20834,6 +20933,18 @@ class KritzelTextTool extends KritzelBaseTool {
20834
20933
  constructor(core) {
20835
20934
  super(core);
20836
20935
  }
20936
+ /**
20937
+ * Propagates a property change to the text object that is currently being edited, if any.
20938
+ * Mirrors the selection tool pattern of pushing tool-config changes down to live objects,
20939
+ * but scoped to the single text in edit mode rather than the current selection.
20940
+ */
20941
+ applyToActiveText(updatedProperties) {
20942
+ const activeText = this._core?.store?.activeText;
20943
+ if (!activeText)
20944
+ return;
20945
+ this._core.updateObject(activeText, updatedProperties);
20946
+ this._core.rerender();
20947
+ }
20837
20948
  /**
20838
20949
  * Handles pointer down events for text creation and editing.
20839
20950
  * If clicking on an existing text object, enters edit mode for that object.
@@ -22561,6 +22672,7 @@ class KritzelSelectionHandler extends KritzelBaseHandler {
22561
22672
  const existingGroup = this._core.store.selectionGroup;
22562
22673
  if (shiftKey && existingGroup) {
22563
22674
  existingGroup.addOrRemove(objectToSelect);
22675
+ this.removeDescendantsOfSelectedGroups(existingGroup);
22564
22676
  if (existingGroup.objects.length === 0) {
22565
22677
  this._core.removeSelectionGroup();
22566
22678
  }
@@ -22606,15 +22718,17 @@ class KritzelSelectionHandler extends KritzelBaseHandler {
22606
22718
  obj.isSelected = false;
22607
22719
  }
22608
22720
  const unrolledObjects = Array.from(resolvedObjects.values());
22721
+ const filteredObjects = this.filterDescendantsOfSelectedGroups(unrolledObjects);
22609
22722
  const existingGroup = this._core.store.selectionGroup;
22610
22723
  if (shiftKey && existingGroup) {
22611
- existingGroup.addObjects(unrolledObjects);
22724
+ existingGroup.addObjects(filteredObjects);
22725
+ this.removeDescendantsOfSelectedGroups(existingGroup);
22612
22726
  this._core.rerender();
22613
22727
  }
22614
22728
  else {
22615
22729
  // Create selection group and set all IDs at once (no per-item refresh)
22616
22730
  const selectionGroup = KritzelSelectionGroup.create(this._core);
22617
- selectionGroup.objectIds = Array.from(resolvedObjects.keys());
22731
+ selectionGroup.objectIds = filteredObjects.map(o => o.id);
22618
22732
  // Only refresh dimensions and capture snapshots ONCE at the end - O(n) instead of O(n²)
22619
22733
  if (selectionGroup.length === 1) {
22620
22734
  selectionGroup.rotation = selectionGroup.objects[0].rotation;
@@ -22626,6 +22740,37 @@ class KritzelSelectionHandler extends KritzelBaseHandler {
22626
22740
  this._core.rerender();
22627
22741
  }
22628
22742
  }
22743
+ /**
22744
+ * Removes objects that are descendants of any KritzelGroup also present in the list.
22745
+ * Prevents an ancestor group and one of its descendants from coexisting in a selection,
22746
+ * which would otherwise cause the descendant to be transformed twice (once via the
22747
+ * ancestor group, and once directly).
22748
+ * @param objects - The candidate objects for the selection.
22749
+ * @returns A new array with descendants of selected groups removed.
22750
+ */
22751
+ filterDescendantsOfSelectedGroups(objects) {
22752
+ const descendantIds = new Set();
22753
+ for (const obj of objects) {
22754
+ if (obj instanceof KritzelGroup) {
22755
+ KritzelGroup.collectDescendantIds(obj, descendantIds);
22756
+ }
22757
+ }
22758
+ if (descendantIds.size === 0) {
22759
+ return objects;
22760
+ }
22761
+ return objects.filter(o => !descendantIds.has(o.id));
22762
+ }
22763
+ /**
22764
+ * Mutates an existing selection group to remove any descendants of groups
22765
+ * already present in it. See {@link filterDescendantsOfSelectedGroups}.
22766
+ * @param selectionGroup - The selection group to clean up in place.
22767
+ */
22768
+ removeDescendantsOfSelectedGroups(selectionGroup) {
22769
+ const filtered = this.filterDescendantsOfSelectedGroups(selectionGroup.objects);
22770
+ if (filtered.length !== selectionGroup.objects.length) {
22771
+ selectionGroup.objectIds = filtered.map(o => o.id);
22772
+ }
22773
+ }
22629
22774
  }
22630
22775
 
22631
22776
  /**
@@ -710,6 +710,31 @@ export class KritzelCore {
710
710
  // Batch all inserts and updates in a single Y.js transaction to avoid
711
711
  // N separate observer callbacks and N rerenders (fires only once at commit)
712
712
  this._store.objects.transaction(() => {
713
+ // Recursively flush a group's pending children (and any nested groups'
714
+ // pending children) into the store. Without recursion, nested groups
715
+ // would have their grandchildren stranded in `_pendingChildren` and they
716
+ // would never appear on the canvas, even though the parent group's
717
+ // bounding box looks correct.
718
+ const flushPendingChildren = (group, parentZIndex) => {
719
+ if (group._pendingChildren.length === 0) {
720
+ return;
721
+ }
722
+ const pendingChildren = group._pendingChildren;
723
+ group._pendingChildren = [];
724
+ pendingChildren.forEach((child, childIndex) => {
725
+ if (child.workspaceId !== activeWorkspace.id) {
726
+ child.workspaceId = activeWorkspace.id;
727
+ }
728
+ child.updatePosition(child.translateX + offsetX, child.translateY + offsetY);
729
+ child.zIndex = parentZIndex + childIndex + 1;
730
+ // Recurse before adding so grandchildren are inserted as well
731
+ if (KritzelClassHelper.isInstanceOf(child, 'KritzelGroup')) {
732
+ flushPendingChildren(child, child.zIndex);
733
+ }
734
+ this.addObject(child);
735
+ });
736
+ group.finalize();
737
+ };
713
738
  // First add all copied objects to the objectsMap with updated positions
714
739
  copiedObjects.forEach((obj, i) => {
715
740
  // Update workspace if pasting to a different workspace
@@ -720,26 +745,9 @@ export class KritzelCore {
720
745
  obj.updatePosition(obj.translateX + offsetX, obj.translateY + offsetY);
721
746
  // Update z-index
722
747
  obj.zIndex = baseZIndex + i;
723
- // Handle KritzelGroup: also add pending children with offset
748
+ // Handle KritzelGroup: also add pending children (and grandchildren) with offset
724
749
  if (KritzelClassHelper.isInstanceOf(obj, 'KritzelGroup')) {
725
- if (obj._pendingChildren.length > 0) {
726
- obj._pendingChildren.forEach((child, childIndex) => {
727
- // Update workspace
728
- if (child.workspaceId !== activeWorkspace.id) {
729
- child.workspaceId = activeWorkspace.id;
730
- }
731
- // Update position with offset
732
- child.updatePosition(child.translateX + offsetX, child.translateY + offsetY);
733
- // Update z-index
734
- child.zIndex = baseZIndex + i + childIndex;
735
- // Add child to store
736
- this.addObject(child);
737
- });
738
- // Clear pending children
739
- obj._pendingChildren = [];
740
- // Finalize the group's bounding box and snapshots
741
- obj.finalize();
742
- }
750
+ flushPendingChildren(obj, obj.zIndex);
743
751
  }
744
752
  // Add to objectsMap
745
753
  this.addObject(obj);
@@ -407,6 +407,7 @@ export class KritzelSelectionHandler extends KritzelBaseHandler {
407
407
  const existingGroup = this._core.store.selectionGroup;
408
408
  if (shiftKey && existingGroup) {
409
409
  existingGroup.addOrRemove(objectToSelect);
410
+ this.removeDescendantsOfSelectedGroups(existingGroup);
410
411
  if (existingGroup.objects.length === 0) {
411
412
  this._core.removeSelectionGroup();
412
413
  }
@@ -452,15 +453,17 @@ export class KritzelSelectionHandler extends KritzelBaseHandler {
452
453
  obj.isSelected = false;
453
454
  }
454
455
  const unrolledObjects = Array.from(resolvedObjects.values());
456
+ const filteredObjects = this.filterDescendantsOfSelectedGroups(unrolledObjects);
455
457
  const existingGroup = this._core.store.selectionGroup;
456
458
  if (shiftKey && existingGroup) {
457
- existingGroup.addObjects(unrolledObjects);
459
+ existingGroup.addObjects(filteredObjects);
460
+ this.removeDescendantsOfSelectedGroups(existingGroup);
458
461
  this._core.rerender();
459
462
  }
460
463
  else {
461
464
  // Create selection group and set all IDs at once (no per-item refresh)
462
465
  const selectionGroup = KritzelSelectionGroup.create(this._core);
463
- selectionGroup.objectIds = Array.from(resolvedObjects.keys());
466
+ selectionGroup.objectIds = filteredObjects.map(o => o.id);
464
467
  // Only refresh dimensions and capture snapshots ONCE at the end - O(n) instead of O(n²)
465
468
  if (selectionGroup.length === 1) {
466
469
  selectionGroup.rotation = selectionGroup.objects[0].rotation;
@@ -472,4 +475,35 @@ export class KritzelSelectionHandler extends KritzelBaseHandler {
472
475
  this._core.rerender();
473
476
  }
474
477
  }
478
+ /**
479
+ * Removes objects that are descendants of any KritzelGroup also present in the list.
480
+ * Prevents an ancestor group and one of its descendants from coexisting in a selection,
481
+ * which would otherwise cause the descendant to be transformed twice (once via the
482
+ * ancestor group, and once directly).
483
+ * @param objects - The candidate objects for the selection.
484
+ * @returns A new array with descendants of selected groups removed.
485
+ */
486
+ filterDescendantsOfSelectedGroups(objects) {
487
+ const descendantIds = new Set();
488
+ for (const obj of objects) {
489
+ if (obj instanceof KritzelGroup) {
490
+ KritzelGroup.collectDescendantIds(obj, descendantIds);
491
+ }
492
+ }
493
+ if (descendantIds.size === 0) {
494
+ return objects;
495
+ }
496
+ return objects.filter(o => !descendantIds.has(o.id));
497
+ }
498
+ /**
499
+ * Mutates an existing selection group to remove any descendants of groups
500
+ * already present in it. See {@link filterDescendantsOfSelectedGroups}.
501
+ * @param selectionGroup - The selection group to clean up in place.
502
+ */
503
+ removeDescendantsOfSelectedGroups(selectionGroup) {
504
+ const filtered = this.filterDescendantsOfSelectedGroups(selectionGroup.objects);
505
+ if (filtered.length !== selectionGroup.objects.length) {
506
+ selectionGroup.objectIds = filtered.map(o => o.id);
507
+ }
508
+ }
475
509
  }
@@ -111,6 +111,23 @@ export class KritzelGroup extends KritzelBaseObject {
111
111
  }
112
112
  return null;
113
113
  }
114
+ /**
115
+ * Recursively collects the IDs of all descendants of the given group (children,
116
+ * grandchildren, etc.). Useful for detecting when a selection contains both an
117
+ * ancestor group and one of its descendants — a configuration that would otherwise
118
+ * cause the descendant to be transformed twice (once via the ancestor, once directly).
119
+ * @param group - The group whose descendants should be collected.
120
+ * @param out - A set that will be populated with all descendant object IDs.
121
+ */
122
+ static collectDescendantIds(group, out = new Set()) {
123
+ for (const child of group.children) {
124
+ out.add(child.id);
125
+ if (child instanceof KritzelGroup) {
126
+ KritzelGroup.collectDescendantIds(child, out);
127
+ }
128
+ }
129
+ return out;
130
+ }
114
131
  /**
115
132
  * Adds a child object to this group.
116
133
  * If the object is already a child, no action is taken.
@@ -154,8 +171,19 @@ export class KritzelGroup extends KritzelBaseObject {
154
171
  * Finalizes the group after children have been positioned (e.g., after paste).
155
172
  * Refreshes the bounding box to encompass all children and captures
156
173
  * child snapshots for subsequent transformation operations.
174
+ *
175
+ * Recursively finalizes nested child groups first, so that when a transform
176
+ * (rotate/resize) cascades through nested groups, every group's snapshots are
177
+ * aligned with the current visual state. Without this, a nested group's
178
+ * `snapshotRotation` could be stale, causing the inner group to be offset
179
+ * relative to its parent during rotation.
157
180
  */
158
181
  finalize() {
182
+ for (const child of this.children) {
183
+ if (child instanceof KritzelGroup) {
184
+ child.finalize();
185
+ }
186
+ }
159
187
  this.refreshBoundingBox();
160
188
  this.captureChildSnapshots();
161
189
  }
@@ -312,11 +340,23 @@ export class KritzelGroup extends KritzelBaseObject {
312
340
  * @param height - The new height of the group's content area.
313
341
  */
314
342
  resize(x, y, width, height) {
315
- const widthScaleFactor = width / this.width;
316
- const heightScaleFactor = height / this.height;
317
- // Calculate old center
318
- const oldCenterX = this.translateX + this.totalWidth / 2 / this.scale;
319
- const oldCenterY = this.translateY + this.totalHeight / 2 / this.scale;
343
+ // Use snapshot dimensions (stable across the gesture) instead of `this.*`,
344
+ // which mutates each frame and gets distorted by descendants like KritzelText
345
+ // that clamp to a uniform scale, causing the cascade factor to drift.
346
+ const baseWidth = this.snapshotTotalWidth > 0
347
+ ? this.snapshotTotalWidth - this.padding * 2
348
+ : this.width;
349
+ const baseHeight = this.snapshotTotalHeight > 0
350
+ ? this.snapshotTotalHeight - this.padding * 2
351
+ : this.height;
352
+ const baseScale = this.snapshotScale || this.scale || 1;
353
+ const widthScaleFactor = baseWidth !== 0 ? width / baseWidth : 1;
354
+ const heightScaleFactor = baseHeight !== 0 ? height / baseHeight : 1;
355
+ // Calculate old center from snapshot (stable across the gesture)
356
+ const snapshotTotalWidth = this.snapshotTotalWidth || (this.width + this.padding * 2);
357
+ const snapshotTotalHeight = this.snapshotTotalHeight || (this.height + this.padding * 2);
358
+ const oldCenterX = this.snapshotTranslateX + snapshotTotalWidth / 2 / baseScale;
359
+ const oldCenterY = this.snapshotTranslateY + snapshotTotalHeight / 2 / baseScale;
320
360
  // Calculate new center
321
361
  const newTotalWidth = width + this.padding * 2;
322
362
  const newTotalHeight = height + this.padding * 2;
@@ -329,9 +369,20 @@ export class KritzelGroup extends KritzelBaseObject {
329
369
  const sinR = Math.sin(rotation);
330
370
  this._core.store.objects.transaction(() => {
331
371
  this.children.forEach(child => {
332
- // Calculate child center
333
- const childCenterX = child.translateX + child.totalWidth / 2 / child.scale;
334
- const childCenterY = child.translateY + child.totalHeight / 2 / child.scale;
372
+ // Use snapshot values for the child to avoid compounding distortions caused
373
+ // by descendants like text that cannot honour requested aspect ratios.
374
+ const snapshot = this.unchangedChildSnapshots.get(child.id);
375
+ const childTranslateX = snapshot ? snapshot.translateX : child.translateX;
376
+ const childTranslateY = snapshot ? snapshot.translateY : child.translateY;
377
+ const childTotalWidth = snapshot ? snapshot.totalWidth : child.totalWidth;
378
+ const childTotalHeight = snapshot ? snapshot.totalHeight : child.totalHeight;
379
+ const childWidth = snapshot ? snapshot.width : child.width;
380
+ const childHeight = snapshot ? snapshot.height : child.height;
381
+ const childRotation = snapshot ? snapshot.rotation : child.rotation;
382
+ const childScale = (snapshot ? snapshot.scale : child.scale) || 1;
383
+ // Calculate child center from snapshot
384
+ const childCenterX = childTranslateX + childTotalWidth / 2 / childScale;
385
+ const childCenterY = childTranslateY + childTotalHeight / 2 / childScale;
335
386
  // Vector from old group center to child center
336
387
  const dx = childCenterX - oldCenterX;
337
388
  const dy = childCenterY - oldCenterY;
@@ -348,13 +399,13 @@ export class KritzelGroup extends KritzelBaseObject {
348
399
  const newChildCenterX = newCenterX + rotatedX;
349
400
  const newChildCenterY = newCenterY + rotatedY;
350
401
  // Calculate relative rotation for scaling
351
- const relativeRotation = child.rotation - rotation;
402
+ const relativeRotation = childRotation - rotation;
352
403
  const cosRel = Math.cos(relativeRotation);
353
404
  const sinRel = Math.sin(relativeRotation);
354
405
  const newChildWidthScale = Math.sqrt(Math.pow(widthScaleFactor * cosRel, 2) + Math.pow(heightScaleFactor * sinRel, 2));
355
406
  const newChildHeightScale = Math.sqrt(Math.pow(widthScaleFactor * sinRel, 2) + Math.pow(heightScaleFactor * cosRel, 2));
356
- const updatedWidth = child.width * newChildWidthScale;
357
- const updatedHeight = child.height * newChildHeightScale;
407
+ const updatedWidth = childWidth * newChildWidthScale;
408
+ const updatedHeight = childHeight * newChildHeightScale;
358
409
  const updatedTotalWidth = updatedWidth + child.padding * 2;
359
410
  const updatedTotalHeight = updatedHeight + child.padding * 2;
360
411
  const updatedX = newChildCenterX - updatedTotalWidth / 2 / child.scale;
@@ -364,7 +415,13 @@ export class KritzelGroup extends KritzelBaseObject {
364
415
  this._core.anchorManager.updateAnchorsForObject(child.id);
365
416
  });
366
417
  this.refreshBoundingBox();
367
- this.captureChildSnapshots();
418
+ // Don't recapture snapshots while an interactive resize is in progress —
419
+ // recapturing each frame would defeat the purpose of using stable snapshots
420
+ // and re-introduce the compounding distortion described above. Snapshots are
421
+ // refreshed at the start of the next gesture via beginTransform/finalize.
422
+ if (!this._core.store.state.isResizing) {
423
+ this.captureChildSnapshots();
424
+ }
368
425
  this._core.store.objects.update(this);
369
426
  });
370
427
  }