kritzel-stencil 0.4.5 → 0.4.7

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 (128) hide show
  1. package/dist/cjs/kritzel-active-users_47.cjs.entry.js +180 -92
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/stencil.cjs.js +1 -1
  4. package/dist/collection/classes/core/core.class.js +4 -5
  5. package/dist/collection/classes/core/viewport.class.js +14 -1
  6. package/dist/collection/collection-manifest.json +1 -1
  7. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +71 -8
  8. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +133 -18
  9. package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
  10. package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
  11. package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
  12. package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
  13. package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
  14. package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
  15. package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
  16. package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
  17. package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
  18. package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
  19. package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
  20. package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
  21. package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
  22. package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
  23. package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
  24. package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
  25. package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
  26. package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.js +1 -1
  27. package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
  28. package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
  29. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
  30. package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
  31. package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
  32. package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
  33. package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
  34. package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
  35. package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
  36. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +8 -0
  37. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +2 -15
  38. package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
  39. package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
  40. package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
  41. package/dist/collection/constants/version.js +1 -1
  42. package/dist/collection/index.js +1 -0
  43. package/dist/collection/interfaces/context-menu-state.interface.js +1 -0
  44. package/dist/components/index.js +1 -1
  45. package/dist/components/kritzel-active-users.js +1 -1
  46. package/dist/components/kritzel-avatar.js +1 -1
  47. package/dist/components/kritzel-back-to-content.js +1 -1
  48. package/dist/components/kritzel-button.js +1 -1
  49. package/dist/components/kritzel-color-palette.js +1 -1
  50. package/dist/components/kritzel-color.js +1 -1
  51. package/dist/components/kritzel-controls.js +1 -1
  52. package/dist/components/kritzel-current-user-dialog.js +1 -1
  53. package/dist/components/kritzel-current-user.js +1 -1
  54. package/dist/components/kritzel-editor.js +73 -42
  55. package/dist/components/kritzel-engine.js +1 -1
  56. package/dist/components/kritzel-export.js +1 -1
  57. package/dist/components/kritzel-font-size.js +1 -1
  58. package/dist/components/kritzel-font.js +1 -1
  59. package/dist/components/kritzel-input.js +1 -1
  60. package/dist/components/kritzel-loading-overlay.js +1 -1
  61. package/dist/components/kritzel-login-dialog.js +1 -1
  62. package/dist/components/kritzel-master-detail.js +1 -1
  63. package/dist/components/kritzel-menu-item.js +1 -1
  64. package/dist/components/kritzel-menu.js +1 -1
  65. package/dist/components/kritzel-more-menu.js +1 -1
  66. package/dist/components/kritzel-numeric-input.js +1 -1
  67. package/dist/components/kritzel-opacity-slider.js +1 -1
  68. package/dist/components/kritzel-portal.js +1 -1
  69. package/dist/components/kritzel-settings.js +1 -1
  70. package/dist/components/kritzel-share-dialog.js +1 -1
  71. package/dist/components/kritzel-slide-toggle.js +1 -1
  72. package/dist/components/kritzel-split-button.js +1 -1
  73. package/dist/components/kritzel-stroke-size.js +1 -1
  74. package/dist/components/kritzel-sync-indicator.js +1 -1
  75. package/dist/components/kritzel-tool-config.js +1 -1
  76. package/dist/components/kritzel-tooltip.js +1 -1
  77. package/dist/components/kritzel-utility-panel.js +1 -1
  78. package/dist/components/kritzel-watermark.js +1 -1
  79. package/dist/components/kritzel-workspace-manager.js +1 -1
  80. package/dist/components/kritzel-zoom-panel.js +1 -1
  81. package/dist/components/{p-Cymum41a.js → p-1nG2hxfJ.js} +2 -2
  82. package/dist/components/{p-B5oHmPJb.js → p-7Rt7ml3v.js} +1 -1
  83. package/dist/components/{p-BI2ng9I_.js → p-8xkoVMfO.js} +2 -2
  84. package/dist/components/{p-CwJwsRR3.js → p-BKOsmXB5.js} +4 -4
  85. package/dist/components/{p-Ca-igU1f.js → p-BLOPBDUF.js} +1 -1
  86. package/dist/components/{p-DUYmwrWV.js → p-BMRln59F.js} +3 -3
  87. package/dist/components/{p-DIazmg6w.js → p-BO9BvTtK.js} +2 -2
  88. package/dist/components/{p-D3y_Hauo.js → p-BU-FZuj0.js} +3 -3
  89. package/dist/components/{p-DgJ0ufzr.js → p-BVEGQLBD.js} +1 -1
  90. package/dist/components/{p-Dlp84thc.js → p-BYO6pz8T.js} +1 -1
  91. package/dist/components/{p-C38P-Vd0.js → p-BZxOukfY.js} +6 -6
  92. package/dist/components/{p-D82VaHce.js → p-Bm_BWQa4.js} +2 -2
  93. package/dist/components/{p-CWRSGYOE.js → p-BzJEwFtn.js} +1 -1
  94. package/dist/components/{p-B6t5q-V4.js → p-BzrxIesp.js} +1 -1
  95. package/dist/components/{p--Oazz-BP.js → p-C2yi85nc.js} +103 -34
  96. package/dist/components/{p-894OnDQV.js → p-CM1duewg.js} +1 -1
  97. package/dist/components/{p-e6Zpc9Vp.js → p-COjsYPir.js} +2 -2
  98. package/dist/components/{p-BsANVili.js → p-CVhcOiEA.js} +3 -3
  99. package/dist/components/{p-PSFAfAyd.js → p-CwuGA058.js} +1 -1
  100. package/dist/components/{p-U6uE85Qx.js → p-D0oplzU-.js} +8 -21
  101. package/dist/components/{p-Cr682JI_.js → p-D8TOEhPY.js} +3 -3
  102. package/dist/components/{p-ClFprFvz.js → p-DDbO5q-e.js} +3 -3
  103. package/dist/components/{p-BDzlx2hB.js → p-DIMNEOTW.js} +1 -1
  104. package/dist/components/{p-C4NrrUfN.js → p-DSOc0eIT.js} +1 -1
  105. package/dist/components/{p-D5jf8wAu.js → p-DXcjIb_a.js} +3 -3
  106. package/dist/components/{p-B8Xi4Clg.js → p-DgnK50xO.js} +1 -1
  107. package/dist/components/{p-JYj3Facr.js → p-DkH3hoLz.js} +15 -15
  108. package/dist/components/{p-D30zs0kA.js → p-DkY7pIg5.js} +3 -3
  109. package/dist/components/{p-BTzlrIxe.js → p-DrQRChp3.js} +2 -2
  110. package/dist/components/{p-CsvMgk_f.js → p-DwY5pghH.js} +1 -1
  111. package/dist/components/{p-DkUb2czk.js → p-OLfoATNk.js} +1 -1
  112. package/dist/components/{p-DEBwmRTC.js → p-oGAPPwAL.js} +2 -2
  113. package/dist/components/{p-DJ88BrIW.js → p-yD_3Z3K1.js} +1 -1
  114. package/dist/components/{p-CqLgB8JK.js → p-zd7zXld8.js} +2 -2
  115. package/dist/esm/kritzel-active-users_47.entry.js +180 -92
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/esm/stencil.js +1 -1
  118. package/dist/stencil/{p-4463dade.entry.js → p-472f2e90.entry.js} +180 -92
  119. package/dist/stencil/stencil.esm.js +1 -1
  120. package/dist/types/classes/core/core.class.d.ts +2 -2
  121. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +6 -0
  122. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +11 -1
  123. package/dist/types/components.d.ts +17 -0
  124. package/dist/types/constants/version.d.ts +1 -1
  125. package/dist/types/index.d.ts +1 -0
  126. package/dist/types/interfaces/context-menu-state.interface.d.ts +16 -0
  127. package/package.json +1 -1
  128. package/readme.md +3 -3
@@ -1,20 +1,19 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
2
2
  import { a as KritzelMouseButton, d as defineCustomElement$5 } from './p-Cm33td2O.js';
3
- import { K as KritzelBaseObject, e as KritzelMathHelper, f as KritzelGeometryHelper, a as KritzelPath, b as KritzelLine, d as defineCustomElement$7 } from './p-Ka7OWbnk.js';
3
+ import { K as KritzelBaseObject, e as KritzelMathHelper, f as KritzelGeometryHelper, a as KritzelPath, b as KritzelLine, d as defineCustomElement$6 } from './p-Ka7OWbnk.js';
4
4
  import { c as commonjsGlobal } from './p-BFTU3MAI.js';
5
5
  import { a as KritzelColorHelper, D as DEFAULT_COLOR_PALETTE, K as KritzelThemeManager } from './p-BmyTdQGy.js';
6
6
  import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
7
7
  import { K as KritzelFontRegistry, r as resolveTextToolAvailableFonts } from './p-DJkKlUyZ.js';
8
- import { A as ABSOLUTE_SCALE_MAX, a as ABSOLUTE_SCALE_MIN, d as defineCustomElement$1 } from './p-PSFAfAyd.js';
8
+ import { A as ABSOLUTE_SCALE_MAX, a as ABSOLUTE_SCALE_MIN, d as defineCustomElement$1 } from './p-CwuGA058.js';
9
9
  import { K as KritzelWorkspace, W as WORKSPACE_EXPORT_VERSION } from './p-DAwPPDMS.js';
10
10
  import { K as KritzelHTMLHelper } from './p-WUdQqYnu.js';
11
- import { K as KritzelContextMenu, d as defineCustomElement$6 } from './p-BxpKq94F.js';
12
11
  import { O as ObjectHelper } from './p-Dd-pMvlr.js';
13
12
  import * as Y from 'yjs';
14
13
  import { a as CURRENT_WORKSPACE_SCHEMA_VERSION, C as CURRENT_APP_STATE_SCHEMA_VERSION } from './p-CW-VyJgK.js';
15
14
  import { K as KritzelIconRegistry, d as defineCustomElement$4 } from './p-CdR76C4L.js';
16
- import { d as defineCustomElement$3 } from './p-DgJ0ufzr.js';
17
- import { d as defineCustomElement$2 } from './p-894OnDQV.js';
15
+ import { d as defineCustomElement$3 } from './p-BVEGQLBD.js';
16
+ import { d as defineCustomElement$2 } from './p-CM1duewg.js';
18
17
 
19
18
  class KritzelKeyboardHelper {
20
19
  static forceHideKeyboard() {
@@ -42165,6 +42164,18 @@ class KritzelViewport {
42165
42164
  animateViewportTo(targetTranslateX, targetTranslateY, targetScale, duration = 150) {
42166
42165
  // Cancel any existing animation
42167
42166
  this.cancelViewportAnimation();
42167
+ if (duration <= 0) {
42168
+ // Apply immediately; interpolating with duration 0 divides by zero
42169
+ // (rAF timestamps can precede performance.now()), producing NaN state.
42170
+ this._core.store.state.scale = targetScale;
42171
+ const clamped = this.clampTranslate(targetTranslateX, targetTranslateY);
42172
+ this._core.store.state.translateX = clamped.translateX;
42173
+ this._core.store.state.translateY = clamped.translateY;
42174
+ this._core.store.state.hasViewportChanged = true;
42175
+ this._core.rerender();
42176
+ this._debounceUpdate();
42177
+ return;
42178
+ }
42168
42179
  const startTranslateX = this._core.store.state.translateX;
42169
42180
  const startTranslateY = this._core.store.state.translateY;
42170
42181
  const startScale = this._core.store.state.scale;
@@ -42172,7 +42183,8 @@ class KritzelViewport {
42172
42183
  this._core.store.state.isScaling = true;
42173
42184
  const animate = (currentTime) => {
42174
42185
  const elapsed = currentTime - startTime;
42175
- const progress = Math.min(elapsed / duration, 1);
42186
+ // Clamp to [0, 1]; rAF timestamps can precede startTime, yielding negative progress
42187
+ const progress = Math.min(Math.max(elapsed, 0) / duration, 1);
42176
42188
  // easeOutCubic easing function
42177
42189
  const eased = 1 - Math.pow(1 - progress, 3);
42178
42190
  this._core.store.state.scale = startScale + (targetScale - startScale) * eased;
@@ -46656,13 +46668,13 @@ class KritzelCore {
46656
46668
  }
46657
46669
  /**
46658
46670
  * Selects all objects in the workspace.
46659
- * Excludes selection-related and context menu objects.
46671
+ * Excludes selection-related objects.
46660
46672
  * Switches to selection tool.
46661
46673
  */
46662
46674
  selectAllObjects() {
46663
46675
  const allObjects = this._store.objects
46664
46676
  .allObjects()
46665
- .filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox) && !(o instanceof KritzelContextMenu));
46677
+ .filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox));
46666
46678
  if (allObjects.length > 0) {
46667
46679
  const selectionGroup = KritzelSelectionGroup.create(this);
46668
46680
  allObjects.forEach(obj => {
@@ -46681,7 +46693,7 @@ class KritzelCore {
46681
46693
  }
46682
46694
  /**
46683
46695
  * Selects all objects currently visible in the viewport.
46684
- * Excludes selection-related and context menu objects.
46696
+ * Excludes selection-related objects.
46685
46697
  * Switches to selection tool.
46686
46698
  */
46687
46699
  selectAllObjectsInViewport() {
@@ -46696,7 +46708,7 @@ class KritzelCore {
46696
46708
  const objectsInViewport = this._store.objects
46697
46709
  .query(viewportBounds)
46698
46710
  .filter(o => o.isInViewport())
46699
- .filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox) && !(o instanceof KritzelContextMenu));
46711
+ .filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox));
46700
46712
  if (objectsInViewport.length > 0) {
46701
46713
  const selectionGroup = KritzelSelectionGroup.create(this);
46702
46714
  objectsInViewport.forEach(obj => {
@@ -48797,6 +48809,8 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
48797
48809
  awarenessChange;
48798
48810
  /** Emitted when notifications change. */
48799
48811
  notificationsChange;
48812
+ /** Emitted when context-menu visibility, items, or position changes. */
48813
+ contextMenuStateChange;
48800
48814
  /** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
48801
48815
  loadingChange;
48802
48816
  /** Emitted when remote workspace synchronization is in progress. */
@@ -48807,6 +48821,31 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
48807
48821
  async triggerSelectionChange() {
48808
48822
  this.objectsSelectionChange.emit();
48809
48823
  }
48824
+ /** Starts a scene bootstrap phase by hiding the scene immediately. */
48825
+ async beginSceneBootstrap() {
48826
+ if (this._sceneBootstrapTransitionTimer !== null) {
48827
+ clearTimeout(this._sceneBootstrapTransitionTimer);
48828
+ this._sceneBootstrapTransitionTimer = null;
48829
+ }
48830
+ this._sceneBootstrapTransitionEnabled = false;
48831
+ this._sceneBootstrapOpacity = 0;
48832
+ this.core.rerender();
48833
+ }
48834
+ /** Ends a scene bootstrap phase by fading the scene back in. */
48835
+ async endSceneBootstrap() {
48836
+ if (this._sceneBootstrapTransitionTimer !== null) {
48837
+ clearTimeout(this._sceneBootstrapTransitionTimer);
48838
+ this._sceneBootstrapTransitionTimer = null;
48839
+ }
48840
+ this._sceneBootstrapTransitionEnabled = true;
48841
+ this._sceneBootstrapOpacity = 1;
48842
+ this.core.rerender();
48843
+ this._sceneBootstrapTransitionTimer = setTimeout(() => {
48844
+ this._sceneBootstrapTransitionEnabled = false;
48845
+ this._sceneBootstrapTransitionTimer = null;
48846
+ this.core.rerender();
48847
+ }, 220);
48848
+ }
48810
48849
  handleWheel(ev) {
48811
48850
  if (this.core.store.isDisabled) {
48812
48851
  return;
@@ -48964,6 +49003,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
48964
49003
  }
48965
49004
  handleLongPress(ev) {
48966
49005
  this.contextMenuHandler.handleContextMenu(ev.detail);
49006
+ this.emitContextMenuStateChange();
48967
49007
  }
48968
49008
  handleContextMenu(ev) {
48969
49009
  if (ev.cancelable) {
@@ -48976,6 +49016,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
48976
49016
  return;
48977
49017
  }
48978
49018
  this.contextMenuHandler.handleContextMenu(ev);
49019
+ this.emitContextMenuStateChange();
48979
49020
  }
48980
49021
  handleResize() {
48981
49022
  this.viewport.handleResize();
@@ -49217,6 +49258,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
49217
49258
  this.core.store.objects?.clearLocalSelectionBox();
49218
49259
  this.core.store.state.isSelecting = false;
49219
49260
  this.core.store.state.isEnabled = true;
49261
+ this.emitContextMenuStateChange();
49220
49262
  this.core.rerender();
49221
49263
  }
49222
49264
  /**
@@ -49230,6 +49272,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
49230
49272
  */
49231
49273
  async openContextMenu(options) {
49232
49274
  this.contextMenuHandler.open(options);
49275
+ this.emitContextMenuStateChange();
49233
49276
  }
49234
49277
  /**
49235
49278
  * Retrieves a canvas object by its unique ID.
@@ -49982,14 +50025,26 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
49982
50025
  // Revive and add objects to the current workspace
49983
50026
  if (data.objects && Array.isArray(data.objects)) {
49984
50027
  const reviver = new KritzelReviver(this.core);
49985
- for (const objData of data.objects) {
49986
- const revivedObj = reviver.revive(objData);
49987
- if (revivedObj) {
50028
+ const objectsMap = this.core.store.objects;
50029
+ const insertRevivedObjects = () => {
50030
+ for (const objData of data.objects) {
50031
+ const revivedObj = reviver.revive(objData);
50032
+ if (!revivedObj) {
50033
+ continue;
50034
+ }
49988
50035
  // Update workspaceId to the current workspace's ID
49989
50036
  revivedObj.workspaceId = currentWorkspaceId;
49990
50037
  this.core.addObject(revivedObj);
49991
50038
  loadedCount++;
49992
50039
  }
50040
+ };
50041
+ if (objectsMap) {
50042
+ objectsMap.transaction(() => {
50043
+ insertRevivedObjects();
50044
+ });
50045
+ }
50046
+ else {
50047
+ insertRevivedObjects();
49993
50048
  }
49994
50049
  }
49995
50050
  // Rerender to apply changes
@@ -50335,7 +50390,6 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50335
50390
  viewport;
50336
50391
  contextMenuHandler;
50337
50392
  keyHandler;
50338
- contextMenuElement = null;
50339
50393
  _lastHadSelectionGroup = false;
50340
50394
  _isViewportReady = false;
50341
50395
  _isYjsInitialized = false;
@@ -50351,6 +50405,9 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50351
50405
  _hasLoggedUnlicensedWelcomeBanner = false;
50352
50406
  _previousVisibleCustomElements = new Set();
50353
50407
  _revealedImageKeys = new Set();
50408
+ _sceneBootstrapOpacity = 1;
50409
+ _sceneBootstrapTransitionEnabled = false;
50410
+ _sceneBootstrapTransitionTimer = null;
50354
50411
  _defaultUndoState = {
50355
50412
  canUndo: false,
50356
50413
  canRedo: false,
@@ -50371,6 +50428,22 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50371
50428
  this.isSyncing = isSyncing;
50372
50429
  this.syncingChange.emit(isSyncing);
50373
50430
  }
50431
+ emitContextMenuStateChange() {
50432
+ this.contextMenuStateChange.emit({
50433
+ isVisible: this.core.store.state.isContextMenuVisible,
50434
+ isObjectMenu: !!this.core.store.selectionGroup,
50435
+ items: this.core.store.state.contextMenuItems,
50436
+ objects: this.core.store.selectionGroup?.objects || [],
50437
+ position: {
50438
+ x: this.core.store.state.contextMenuX,
50439
+ y: this.core.store.state.contextMenuY,
50440
+ },
50441
+ worldPosition: {
50442
+ x: this.core.store.state.contextMenuWorldX,
50443
+ y: this.core.store.state.contextMenuWorldY,
50444
+ },
50445
+ });
50446
+ }
50374
50447
  applyToolConfig(tool, toolConfig) {
50375
50448
  const normalizedToolConfig = this.normalizeToolConfig(toolConfig);
50376
50449
  Object.entries(normalizedToolConfig).forEach(([key, value]) => {
@@ -50459,6 +50532,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50459
50532
  this.viewportChange = createEvent(this, "viewportChange");
50460
50533
  this.awarenessChange = createEvent(this, "awarenessChange");
50461
50534
  this.notificationsChange = createEvent(this, "notificationsChange");
50535
+ this.contextMenuStateChange = createEvent(this, "contextMenuStateChange");
50462
50536
  this.loadingChange = createEvent(this, "loadingChange");
50463
50537
  this.syncingChange = createEvent(this, "syncingChange");
50464
50538
  this.core = new KritzelCore(this);
@@ -50466,6 +50540,10 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50466
50540
  disconnectedCallback() {
50467
50541
  this.throttledPointerMoveMulti.cancel();
50468
50542
  this._revealedImageKeys.clear();
50543
+ if (this._sceneBootstrapTransitionTimer !== null) {
50544
+ clearTimeout(this._sceneBootstrapTransitionTimer);
50545
+ this._sceneBootstrapTransitionTimer = null;
50546
+ }
50469
50547
  // Unmount all remaining custom elements
50470
50548
  if (this.core.store.allObjects) {
50471
50549
  this.core.store.allObjects.forEach(object => {
@@ -50509,6 +50587,10 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50509
50587
  this.core.store.state.viewportBoundaryRight = this.viewportBoundaryRight;
50510
50588
  this.core.store.state.viewportBoundaryTop = this.viewportBoundaryTop;
50511
50589
  this.core.store.state.viewportBoundaryBottom = this.viewportBoundaryBottom;
50590
+ if (this.debugInfo) {
50591
+ this.core.store.state.debugInfo = this.debugInfo;
50592
+ this.core.assetResolver.setShowInfo(this.debugInfo.showAssetResolverInfo);
50593
+ }
50512
50594
  this._isWorkspaceLoading = true;
50513
50595
  this.syncLoadingState();
50514
50596
  }
@@ -50914,6 +50996,9 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
50914
50996
  }
50915
50997
  return (h(Host, null, h("kritzel-loading-overlay", { visible: this.core.store.state.isLoading, text: this.core.localizationManager.translate('engine.loading') }), h("kritzel-sync-indicator", { visible: this.isSyncing, text: "Syncing..." }), this.core.store.state.debugInfo.showViewportInfo && (h("div", { class: "debug-panel" }, h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), h("div", null, "TranslateX: ", this.core.store.state?.translateX), h("div", null, "TranslateY: ", this.core.store.state?.translateY), h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), h("div", null, "PointerCount: ", this.core.store.state.pointers.size), h("div", null, "Scale: ", this.core.store.state?.scale), h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), h("div", null, "PointerX: ", this.core.store.state?.pointerX), h("div", null, "PointerY: ", this.core.store.state?.pointerY), h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), h("div", { id: "origin", class: "origin", style: {
50916
50998
  transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
50999
+ opacity: this._sceneBootstrapOpacity.toString(),
51000
+ transition: this._sceneBootstrapTransitionEnabled ? 'opacity 220ms ease-out' : 'none',
51001
+ willChange: this._sceneBootstrapTransitionEnabled ? 'opacity' : undefined,
50917
51002
  } }, visibleObjects?.map(object => {
50918
51003
  const { multiplied: effectiveOpacity, overridden: effectiveOpacityString } = this.getObjectEffectiveOpacity(object, viewportScale);
50919
51004
  return (h("div", { key: object.id, id: object.id, class: "object", style: {
@@ -51340,20 +51425,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
51340
51425
  stroke: 'var(--kritzel-snap-indicator-stroke, #007bff)',
51341
51426
  strokeWidth: data.indicatorStrokeWidth,
51342
51427
  } })))));
51343
- })()), this.core.store.state.isContextMenuVisible && (h("kritzel-context-menu", { class: "context-menu", ref: el => (this.contextMenuElement = el ?? null), items: this.core.store.state.contextMenuItems, objects: this.core.store.selectionGroup?.objects || [], style: {
51344
- position: 'absolute',
51345
- left: `${this.core.store.state.contextMenuX}px`,
51346
- top: `${this.core.store.state.contextMenuY}px`,
51347
- zIndex: '10002',
51348
- }, onActionSelected: event => {
51349
- if (event.detail.action) {
51350
- event.detail.action({
51351
- x: this.core.store.state.contextMenuWorldX,
51352
- y: this.core.store.state.contextMenuWorldY,
51353
- }, this.core.store.selectionGroup?.objects || []);
51354
- }
51355
- this.hideContextMenu();
51356
- }, onClose: () => this.hideContextMenu() })), this.core.store.objects?.hasAwareness && h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
51428
+ })()), this.core.store.objects?.hasAwareness && h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
51357
51429
  }
51358
51430
  static get watchers() { return {
51359
51431
  "workspace": [{
@@ -51461,6 +51533,8 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
51461
51533
  "forceUpdate": [32],
51462
51534
  "isSyncing": [32],
51463
51535
  "triggerSelectionChange": [64],
51536
+ "beginSceneBootstrap": [64],
51537
+ "endSceneBootstrap": [64],
51464
51538
  "registerTool": [64],
51465
51539
  "changeActiveTool": [64],
51466
51540
  "changeActiveToolByName": [64],
@@ -51616,7 +51690,7 @@ function defineCustomElement() {
51616
51690
  if (typeof customElements === "undefined") {
51617
51691
  return;
51618
51692
  }
51619
- const components = ["kritzel-engine", "kritzel-awareness-cursors", "kritzel-context-menu", "kritzel-cursor-trail", "kritzel-icon", "kritzel-loading-overlay", "kritzel-sync-indicator", "kritzel-watermark"];
51693
+ const components = ["kritzel-engine", "kritzel-awareness-cursors", "kritzel-cursor-trail", "kritzel-icon", "kritzel-loading-overlay", "kritzel-sync-indicator", "kritzel-watermark"];
51620
51694
  components.forEach(tagName => { switch (tagName) {
51621
51695
  case "kritzel-engine":
51622
51696
  if (!customElements.get(transformTag(tagName))) {
@@ -51624,11 +51698,6 @@ function defineCustomElement() {
51624
51698
  }
51625
51699
  break;
51626
51700
  case "kritzel-awareness-cursors":
51627
- if (!customElements.get(transformTag(tagName))) {
51628
- defineCustomElement$7();
51629
- }
51630
- break;
51631
- case "kritzel-context-menu":
51632
51701
  if (!customElements.get(transformTag(tagName))) {
51633
51702
  defineCustomElement$6();
51634
51703
  }
@@ -15,7 +15,7 @@ const KritzelSyncIndicator = /*@__PURE__*/ proxyCustomElement(class KritzelSyncI
15
15
  /** The text displayed next to the spinner. */
16
16
  text = 'Syncing...';
17
17
  render() {
18
- return (h(Host, { key: '833aa19a39357398a9fc2d97246398b77f1b990f' }, h("div", { key: 'cabb31890ea7c6afdafa6427306caa19a2d8f818', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, h("span", { key: '086105d00156d8556d8a78cfb0cec47d65b40a1f', class: "spinner", "aria-hidden": "true" }), h("span", { key: '9934152bb9f55399a20112f4230c4efc1518a2e1' }, this.text))));
18
+ return (h(Host, { key: '585d5fd13116c093e5221164e36e6e986a63da58' }, h("div", { key: 'd4e0d9e51db002b8ea201a0564c22916809c346d', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, h("span", { key: 'b82f4c363ee31ae697e435fc8eb6ce0e2f3df1ab', class: "spinner", "aria-hidden": "true" }), h("span", { key: 'f39e04332aaf622dad69d0e5d6b6e90ee5df3ed1' }, this.text))));
19
19
  }
20
20
  static get style() { return kritzelSyncIndicatorCss(); }
21
21
  }, [513, "kritzel-sync-indicator", {
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transf
2
2
  import { d as defineCustomElement$5 } from './p-DX2nriaq.js';
3
3
  import { d as defineCustomElement$4 } from './p-Df3BwVGy.js';
4
4
  import { d as defineCustomElement$3 } from './p-CdR76C4L.js';
5
- import { d as defineCustomElement$2 } from './p-C4NrrUfN.js';
5
+ import { d as defineCustomElement$2 } from './p-DSOc0eIT.js';
6
6
  import { d as defineCustomElement$1 } from './p-D09kgc5Q.js';
7
7
 
8
8
  const kritzelExportCss = () => `:host{display:flex;flex-direction:column;min-height:0}.export-content{display:flex;flex-direction:column;gap:16px;padding:0;flex:1}.export-content kritzel-pill-tabs{align-self:center}.export-tab-content{display:flex;flex-direction:column;gap:16px;min-height:330px}.format-selection{display:flex;flex-direction:column;gap:6px}.format-selection label{font-size:14px;font-weight:500;color:var(--kritzel-global-text-primary, #333)}.export-primary-button{width:100%;padding:12px 24px;background-color:var(--kritzel-global-primary-color, #007AFF);color:var(--kritzel-global-primary-text-color, #fff);border:none;border-radius:var(--kritzel-button-border-radius, 8px);font-size:14px;font-weight:600;cursor:pointer;transition:background-color 0.2s ease;-webkit-tap-highlight-color:transparent}.export-primary-button:hover{background-color:var(--kritzel-global-primary-hover-color, #0066d6)}.export-primary-button:focus-visible{outline:revert;outline-offset:revert}.preview-container{width:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;margin-bottom:8px}.preview-container img{max-width:100%;max-height:250px;object-fit:contain;box-shadow:0 4px 8px rgba(0, 0, 0, 0.15);border-radius:4px;border:1px solid var(--kritzel-global-border-color, #dbdbdb)}.export-content p{margin:0;color:var(--kritzel-global-text-secondary, #666)}@media (max-width: 576px){.export-tab-content{flex:1;min-height:0}}`;
@@ -87,7 +87,7 @@ const KritzelExport = /*@__PURE__*/ proxyCustomElement(class KritzelExport exten
87
87
  return (h("div", { class: "export-tab-content" }, h("kritzel-input", { label: this.terms['export.filename.label'] ?? 'Filename', value: this.exportFilename, placeholder: this.terms['export.filename.placeholder'] ?? 'Enter filename', suffix: ".json", onValueChange: this.handleFilenameChange })));
88
88
  }
89
89
  render() {
90
- return (h(Host, { key: '2f12ec7f4754e3f2aa0364809bdbde60102d76e4' }, h("kritzel-dialog", { key: '0e5929e175ac41dd7f480aabaef2aa109a15f679', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: '6afffd8098e414c117582f3485dbaa348747eb4c', class: "export-content" }, h("kritzel-pill-tabs", { key: 'dd901f356e80fb71033311825e4d83af36b9c561', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: '9fab5c1037cc9187c4f14c9534c8f395fde0d7cf', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
90
+ return (h(Host, { key: '0bc45e80716be4a7b19ae12a6464a641b5bd4550' }, h("kritzel-dialog", { key: 'f336f8b1e4ae10954d48ca67da88504faf06b295', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: 'e2d1209652bb54fb7f623e50bc4bbbb703083b76', class: "export-content" }, h("kritzel-pill-tabs", { key: 'dd78430b78d1e8c4ac0a76e8a6a5d48bebf5e889', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: 'e06564889d991afc7a4ac43bb1e5504e98c94c52', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
91
91
  }
92
92
  static get style() { return kritzelExportCss(); }
93
93
  }, [513, "kritzel-export", {
@@ -102,15 +102,15 @@ const KritzelMasterDetail = /*@__PURE__*/ proxyCustomElement(class KritzelMaster
102
102
  const selectedItem = this.items.find(item => item.id === this.selectedItemId);
103
103
  const panelId = 'master-detail-panel';
104
104
  const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
105
- return (h(Host, { key: 'e363142a5175b1f711cebfc98cfeedf07cd2c6c3' }, h("div", { key: 'eebf863ecdb4a53289cb56e14c02977375781167', class: {
105
+ return (h(Host, { key: '0edf50b0b853633b88bf481f97f22aceba9e163e' }, h("div", { key: '21a0a3f81e5a60889ccd152c905cb41f52c3e037', class: {
106
106
  'master-detail-container': true,
107
107
  'is-mobile-detail-visible': this.showMobileDetail,
108
- } }, h("nav", { key: '06660d3cd7de29ba46e3437169f99cb00eef1cc6', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
108
+ } }, h("nav", { key: '41f88248cc372c8cae4cb50a19edf462a01e43f2', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
109
109
  'menu-item': true,
110
110
  'is-selected': item.id === this.selectedItemId,
111
111
  'is-disabled': !!item.disabled,
112
112
  'is-focused': index === this.focusedIndex,
113
- }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: '0d6b6722ecbf64b28d27754161f861edafa3882c', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '3d8ac88c0f8a7a840b5560c4917d74ff910a99c8', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: '03cf6ca5ea2b9d16ff21b1b38fd0b6148d35ff1f', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '3323357889024c0d2126c30d976c3ece7ddd706a' })))));
113
+ }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'f8447facf3dfdbd7772823654847e1b90b03f73e', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '3edc9784267613e6b3a706739bbb537161e4c747', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'ec0b4691735578525e5863842271366e04b13fb7', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: 'c21fbaff78f98859b9756427125b60504d4bb630' })))));
114
114
  }
115
115
  static get watchers() { return {
116
116
  "selectedItemId": [{
@@ -25,7 +25,7 @@ const KritzelWatermark = /*@__PURE__*/ proxyCustomElement(class KritzelWatermark
25
25
  label;
26
26
  render() {
27
27
  const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
28
- return (h(Host, { key: '143ea32342e30351c93751714dfd12b725ddca24' }, h("a", { key: '95fb2dfa0d806367e6a71dad3932b321d7ae5a76', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
28
+ return (h(Host, { key: '0eccc75e51c7ac199e23d8f3a871593f1fb65a17' }, h("a", { key: '2029f8b56ba8609ca621447eac0df9d30ebfbbbe', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
29
29
  }
30
30
  static get style() { return kritzelWatermarkCss(); }
31
31
  }, [513, "kritzel-watermark", {
@@ -1,20 +1,20 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
2
- import { a as CURRENT_WORKSPACE_SCHEMA_VERSION, C as CURRENT_APP_STATE_SCHEMA_VERSION } from './p-CW-VyJgK.js';
2
+ import { C as CURRENT_APP_STATE_SCHEMA_VERSION, a as CURRENT_WORKSPACE_SCHEMA_VERSION } from './p-CW-VyJgK.js';
3
3
  import { d as defineCustomElement$6 } from './p-DX2nriaq.js';
4
4
  import { d as defineCustomElement$5 } from './p-Df3BwVGy.js';
5
5
  import { d as defineCustomElement$4 } from './p-CdR76C4L.js';
6
- import { d as defineCustomElement$3 } from './p-BsANVili.js';
7
- import { d as defineCustomElement$2 } from './p-BDzlx2hB.js';
8
- import { d as defineCustomElement$1 } from './p-CWRSGYOE.js';
6
+ import { d as defineCustomElement$3 } from './p-CVhcOiEA.js';
7
+ import { d as defineCustomElement$2 } from './p-DIMNEOTW.js';
8
+ import { d as defineCustomElement$1 } from './p-BzJEwFtn.js';
9
9
 
10
10
  /**
11
11
  * The current version of the Kritzel library.
12
12
  * This file is auto-generated by the version bump scripts.
13
13
  * Do not modify manually.
14
14
  */
15
- const KRITZEL_VERSION = '0.4.5';
15
+ const KRITZEL_VERSION = '0.4.7';
16
16
 
17
- const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}.shortcuts-list{display:flex;flex-direction:column;gap:24px}.shortcuts-category{display:flex;flex-direction:column;gap:8px}.shortcuts-category-title{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.shortcuts-group{display:flex;flex-direction:column;gap:4px}.shortcut-item{display:flex;justify-content:space-between;align-items:center;padding:6px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-item-bg, rgba(0, 0, 0, 0.02))}.shortcut-label{font-size:14px;color:var(--kritzel-settings-content-text-color, #666666)}.shortcut-key{font-family:monospace;font-size:12px;padding:2px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-key-bg, #f0f0f0);color:var(--kritzel-settings-shortcut-key-color, #333333);border:1px solid var(--kritzel-settings-shortcut-key-border, #ddd)}`;
17
+ const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-tab-panel{display:none}.settings-tab-panel.is-active{display:block}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}.shortcuts-list{display:flex;flex-direction:column;gap:24px}.shortcuts-category{display:flex;flex-direction:column;gap:8px}.shortcuts-category-title{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.shortcuts-group{display:flex;flex-direction:column;gap:4px}.shortcut-item{display:flex;justify-content:space-between;align-items:center;padding:6px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-item-bg, rgba(0, 0, 0, 0.02))}.shortcut-label{font-size:14px;color:var(--kritzel-settings-content-text-color, #666666)}.shortcut-key{font-family:monospace;font-size:12px;padding:2px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-key-bg, #f0f0f0);color:var(--kritzel-settings-shortcut-key-color, #333333);border:1px solid var(--kritzel-settings-shortcut-key-border, #ddd)}`;
18
18
 
19
19
  const DEFAULT_SCALE_MIN = 0.0001;
20
20
  const DEFAULT_SCALE_MAX = 1000;
@@ -225,23 +225,10 @@ const KritzelSettings = /*@__PURE__*/ proxyCustomElement(class KritzelSettings e
225
225
  }));
226
226
  }
227
227
  renderCategoryContent() {
228
- switch (this.selectedCategoryId) {
229
- case 'general':
230
- return (h("div", { class: "settings-content" }, h("h3", null, this.t('settings.general.title', 'General Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), h("p", { class: "settings-description" }, this.t('settings.general.lockDrawingScale.description', 'When enabled, drawn objects maintain a fixed visual size regardless of the current zoom level.')), h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange })))));
231
- case 'viewport':
232
- return (h("div", { class: "settings-content" }, h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), h("p", { class: "settings-description" }, this.t('settings.viewport.minZoom.description', 'Sets the minimum zoom level. Lower values allow zooming out further to see more of the canvas.')), h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), h("p", { class: "settings-description" }, this.t('settings.viewport.maxZoom.description', 'Sets the maximum zoom level. Higher values allow zooming in closer for detailed work.')), h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryLeft.description', 'Left boundary in world coordinates. Set to limit how far left the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryRight.description', 'Right boundary in world coordinates. Set to limit how far right the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryTop.description', 'Top boundary in world coordinates. Set to limit how far up the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryBottom.description', 'Bottom boundary in world coordinates. Set to limit how far down the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange })))));
233
- case 'shortcuts':
234
- return (h("div", { class: "settings-content" }, h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (h("div", { class: "shortcuts-category", key: category }, h("h4", { class: "shortcuts-category-title" }, category), h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, h("span", { class: "shortcut-label" }, shortcut.label), h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut))))))))))));
235
- case 'developer':
236
- return (h("div", { class: "settings-content" }, h("h3", null, this.t('settings.developer.title', 'Developer Options')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') })))));
237
- case 'about':
238
- return (h("div", { class: "settings-content" }, h("h3", null, this.t('settings.about.title', 'About')), h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), h("p", { class: "version-info" }, "App-State Schema v", CURRENT_APP_STATE_SCHEMA_VERSION), h("p", { class: "version-info" }, "Workspace Schema v", CURRENT_WORKSPACE_SCHEMA_VERSION)));
239
- default:
240
- return null;
241
- }
228
+ return (h("div", { class: "settings-categories-wrapper" }, h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'general' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.general.title', 'General Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), h("p", { class: "settings-description" }, this.t('settings.general.lockDrawingScale.description', 'When enabled, drawn objects maintain a fixed visual size regardless of the current zoom level.')), h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'viewport' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), h("p", { class: "settings-description" }, this.t('settings.viewport.minZoom.description', 'Sets the minimum zoom level. Lower values allow zooming out further to see more of the canvas.')), h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), h("p", { class: "settings-description" }, this.t('settings.viewport.maxZoom.description', 'Sets the maximum zoom level. Higher values allow zooming in closer for detailed work.')), h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryLeft.description', 'Left boundary in world coordinates. Set to limit how far left the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryRight.description', 'Right boundary in world coordinates. Set to limit how far right the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryTop.description', 'Top boundary in world coordinates. Set to limit how far up the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryBottom.description', 'Bottom boundary in world coordinates. Set to limit how far down the viewport can pan.')), h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'shortcuts' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (h("div", { class: "shortcuts-category", key: category }, h("h4", { class: "shortcuts-category-title" }, category), h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, h("span", { class: "shortcut-label" }, shortcut.label), h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut)))))))))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'developer' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.developer.title', 'Developer Options')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'about' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.about.title', 'About')), h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), h("p", { class: "version-info" }, "App-State Schema v", CURRENT_APP_STATE_SCHEMA_VERSION), h("p", { class: "version-info" }, "Workspace Schema v", CURRENT_WORKSPACE_SCHEMA_VERSION)))));
242
229
  }
243
230
  render() {
244
- return (h(Host, { key: '1fb0bca35cb20633f017a927d39e2a66ebfb403b' }, h("kritzel-dialog", { key: '6366a8d8e7f65ef3f715248db3dc7c7e36dd3f4a', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: '2f4891d1ef0b3f130c591790b2e53e7264a61145', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
231
+ return (h(Host, { key: '36bca8be04b34a37630d6aa5394595a8b394d180' }, h("kritzel-dialog", { key: '1e257904178fd9afa2bfbe4a758663fb366c8847', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: 'b7d9ad97d9b126ccf6e800e6c9032749635eb988', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
245
232
  }
246
233
  static get watchers() { return {
247
234
  "settings": [{
@@ -1,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
2
2
  import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
3
3
  import { d as defineCustomElement$4 } from './p-CdR76C4L.js';
4
- import { d as defineCustomElement$2, a as defineCustomElement$3 } from './p-CwJwsRR3.js';
5
- import { d as defineCustomElement$1 } from './p-Ca-igU1f.js';
4
+ import { d as defineCustomElement$2, a as defineCustomElement$3 } from './p-BKOsmXB5.js';
5
+ import { d as defineCustomElement$1 } from './p-BLOPBDUF.js';
6
6
 
7
7
  const kritzelSplitButtonCss = () => `:host{position:relative;display:flex;align-items:center;font-family:sans-serif;z-index:1;padding:var(--kritzel-split-button-padding, 4px);background-color:var(--kritzel-split-button-background-color, #ffffff);border-radius:var(--kritzel-split-button-border-radius, 12px);box-shadow:var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));border:var(--kritzel-split-button-border, 1px solid #ebebeb);gap:var(--kritzel-split-button-gap, 4px)}:host(.mobile){--kritzel-split-button-hover-background-color:transparent}button{border:none;background-color:transparent;padding:0;margin:0;font-family:inherit;font-size:inherit;color:var(--kritzel-split-button-color, #000000);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:var(--kritzel-global-pointer-cursor, pointer);text-align:center;display:flex;align-items:center;justify-content:center;pointer-events:all;-webkit-tap-highlight-color:transparent}.split-main-button,.split-menu-button{height:auto;display:flex;align-items:center;padding:var(--kritzel-split-button-padding, 8px);background-color:var(--kritzel-split-button-background-color, #ffffff);border-radius:var(--kritzel-split-button-border-radius, 12px);font-size:var(--kritzel-split-button-font-size, 14px)}.split-main-button:hover,.split-menu-button:hover{background-color:var(--kritzel-split-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.split-main-button:focus,.split-menu-button:focus{background-color:var(--kritzel-split-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.split-main-button{gap:var(--kritzel-split-button-gap, 4px)}.split-menu-button{border-left:none;justify-content:center}.split-divider{width:var(--kritzel-split-button-divider-width, 1px);height:24px;background-color:var(--kritzel-split-button-divider-background-color, hsl(0, 0%, 0%, 4.3%))}:disabled{pointer-events:none;opacity:0.5}`;
8
8
 
@@ -103,7 +103,7 @@ const KritzelSplitButton = /*@__PURE__*/ proxyCustomElement(class KritzelSplitBu
103
103
  this.menuScrollTop = event.target.scrollTop;
104
104
  };
105
105
  render() {
106
- return (h(Host, { key: 'b3b5b4a63df6e6a4bd2902716a8c26830e31127d', class: { mobile: this.isTouchDevice } }, h("button", { key: 'a25f723f41c1604172fa96d036eab6b80a22add5', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '6999b1baefa3c940c2a25772b0c03ab0c809cd79', name: this.buttonIcon })), h("div", { key: 'dcbff30cae4a73b5c214c0ae98b16c8d681b8eed', class: "split-divider" }), h("button", { key: 'bdbe0b300b3c5df31df58574ee055f05787acceb', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, h("kritzel-icon", { key: '66969517639c73140a745bc189730dfa09eafa08', name: this.dropdownIcon })), h("kritzel-portal", { key: '197d002ea78ddb535743d6d2f872b9779dfc462b', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: '15f1d42042e2368ff04e54f7872480f9f8841900', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
106
+ return (h(Host, { key: 'fa22dc1185ef07d8127d9ee9f6dbe482d126f934', class: { mobile: this.isTouchDevice } }, h("button", { key: 'a48aba702b70e9b24ad5486dde61fa9f9c8f7cdc', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '0d1c9a3e9f744541dd6ebe491105f6ee65233543', name: this.buttonIcon })), h("div", { key: 'c9db29f0b9c9cf1974d78f4f60be9e1b0e26c5d2', class: "split-divider" }), h("button", { key: '57addfd5228b7c7668be902c53683d12c976b89b', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, h("kritzel-icon", { key: 'd860cc503043425860b1234b5d34693bfdd1d5ab', name: this.dropdownIcon })), h("kritzel-portal", { key: 'cd6dda8869aea4205d922fc639073019bbd2b102', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: '1ef1c2b319662e7a2af15b46362addcc75bceb68', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
107
107
  }
108
108
  static get style() { return kritzelSplitButtonCss(); }
109
109
  }, [513, "kritzel-split-button", {
@@ -2,9 +2,9 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transf
2
2
  import { K as KritzelWorkspace } from './p-DAwPPDMS.js';
3
3
  import { O as ObjectHelper } from './p-Dd-pMvlr.js';
4
4
  import { d as defineCustomElement$5 } from './p-CdR76C4L.js';
5
- import { d as defineCustomElement$3, a as defineCustomElement$4 } from './p-CwJwsRR3.js';
6
- import { d as defineCustomElement$2 } from './p-Ca-igU1f.js';
7
- import { d as defineCustomElement$1 } from './p-Cr682JI_.js';
5
+ import { d as defineCustomElement$3, a as defineCustomElement$4 } from './p-BKOsmXB5.js';
6
+ import { d as defineCustomElement$2 } from './p-BLOPBDUF.js';
7
+ import { d as defineCustomElement$1 } from './p-D8TOEhPY.js';
8
8
 
9
9
  const kritzelWorkspaceManagerCss = () => `:host{display:flex;flex-direction:column;z-index:1}.manager{opacity:0;pointer-events:none;transition:opacity 0.2s ease-out}.manager.visible{opacity:1;pointer-events:auto}`;
10
10
 
@@ -97,7 +97,7 @@ const KritzelNumericInput = /*@__PURE__*/ proxyCustomElement(class KritzelNumeri
97
97
  this.valueChange.emit(newValue);
98
98
  };
99
99
  render() {
100
- return (h(Host, { key: 'eb766b22717d856d096bd1a4a44279f6ac994892' }, h("div", { key: '2394e2b2af48f560e77e7a37b34d00656b0dd344', class: "input-container" }, this.label && h("label", { key: 'd8889aa93d4a86fa841f4da1f0b97411ab039cb1', class: "input-label" }, this.label), h("div", { key: 'b55ae2edf164cdfcdda356119b148c8bfb8fbd24', class: "input-wrapper" }, h("input", { key: 'ee1f1663f19c5ca66d64b6c5142005da318e03e4', type: "number", class: "numeric-input", title: "", min: this.min === Number.MIN_SAFE_INTEGER ? undefined : this.min, max: this.max === Number.MAX_SAFE_INTEGER ? undefined : this.max, step: this.step, value: this.inputValue, placeholder: this.placeholder, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onInvalid: this.handleInvalid }), h("div", { key: '82e127b045e631616e6368c437473bbf9732445d', class: "spinner-buttons" }, h("button", { key: 'e7412dffccbdacbb5743ae2e2e7bd33c68e6fceb', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '7e471bf2bee5d4d161fea2e838b26e2f28bb84d9', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '69e4c80eed03b2ee2a044d07f35420b7618f4e75', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'a0c2350d48c398f7396cebd973438c0e390d0aff', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: 'c1f6264d187936d5eb0cc43c0275dc2e2c93b854', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'facbdd171b43868ec41b469b0d11d6c9bfcec3aa', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
100
+ return (h(Host, { key: '8901e0b56ccbc344420483a4a56663f7cd74d9e8' }, h("div", { key: '5f3d6b5c56007e11383aa69f60f22031b0e8f332', class: "input-container" }, this.label && h("label", { key: '2cb102a5b6c16d068f4f304fbcc6241f79fc0ce8', class: "input-label" }, this.label), h("div", { key: '96441095acc3d9a8e77b6d2bac2ceda683c9c976', class: "input-wrapper" }, h("input", { key: '523a5485111077e20faded235df6362e5ea9cfd4', type: "number", class: "numeric-input", title: "", min: this.min === Number.MIN_SAFE_INTEGER ? undefined : this.min, max: this.max === Number.MAX_SAFE_INTEGER ? undefined : this.max, step: this.step, value: this.inputValue, placeholder: this.placeholder, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onInvalid: this.handleInvalid }), h("div", { key: '2071e98125a8d014513e93052bd8c1fee17932a5', class: "spinner-buttons" }, h("button", { key: '12422e5285dfb532dbbb6eb1a36dbcb3de50f2bc', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '49ad5625c80fae6706ba4ab91f47bd550481ef74', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ff7d19b61baeb5ba58bb60f2cc629bcec6eb4411', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'e4fec28e4fc997e007127f2b30b00cc752433221', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '27bf06cde8de11f4a97090911afd6b8993463112', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ed7071dd79bfe509ebb319ce43ecb3e982dd4157', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
101
101
  }
102
102
  static get watchers() { return {
103
103
  "value": [{
@@ -39,7 +39,7 @@ const KritzelInput = /*@__PURE__*/ proxyCustomElement(class KritzelInput extends
39
39
  this.valueChange.emit(input.value);
40
40
  };
41
41
  render() {
42
- return (h(Host, { key: 'a59aa026922a3267ec7e6177973e80edfa97202c' }, h("div", { key: '46b1f191072bfb2a26579a329f8fd6ec86ca3ef9', class: "input-container" }, this.label && h("label", { key: '5409f811792034be56c3269b31ff374d8ed33de2', class: "input-label" }, this.label), h("div", { key: 'f51219b2a6384aeee63a7c8214821abd853a0ea5', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '05c93a526aa2f2d757a7c139fa3a47d84a4e2d95', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '91b60b25a7ff750720ff1961e224a035a2d86096', class: "input-suffix" }, this.suffix)))));
42
+ return (h(Host, { key: '46a0a48902a06ad85edcbaad3679ce3fe9ba850c' }, h("div", { key: 'a6beaf920614aa959d2fbd68b7268afba8637358', class: "input-container" }, this.label && h("label", { key: 'ca6d3fb3c22f1540795dbb0695ddd9b87cc05eee', class: "input-label" }, this.label), h("div", { key: '78d116e82531a9cca996d594792245449bcaf9c8', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '0d10d6356dea3a11338172bbe8c3c878eefcc708', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '0e6166ba8728efc1035302d7fb048306efbe5a68', class: "input-suffix" }, this.suffix)))));
43
43
  }
44
44
  static get watchers() { return {
45
45
  "value": [{
@@ -91,16 +91,16 @@ const KritzelAvatar = /*@__PURE__*/ proxyCustomElement(class KritzelAvatar exten
91
91
  height: `${this.size}px`,
92
92
  fontSize: `${Math.round(this.size * 0.4)}px`,
93
93
  };
94
- return (h(Host, { key: 'a25cae3d0597e53606a00855e3175c89ff90d58e', style: containerStyles, class: {
94
+ return (h(Host, { key: '116725d55e4443e80216b3b3251e957d2009b43e', style: containerStyles, class: {
95
95
  'has-image': !!showImage,
96
96
  'has-initials': !!showInitials,
97
97
  'has-default': !!showDefaultIcon,
98
- }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'c3288f0ba9e0d8876403244fe3942dd91e685a79', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
98
+ }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'd70ad4eb484404b18c13e066e8c10b3c86918ee5', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
99
99
  if (el) {
100
100
  el.referrerPolicy = 'no-referrer';
101
101
  el.crossOrigin = 'anonymous';
102
102
  }
103
- }, onError: this.handleImageError })), showInitials && (h("span", { key: 'ae0ca459b87e90a1f67abe747b75d8dd61247ead', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '2a60a0347ae21732828920339f53803330c9c6c6', class: "avatar-default" }, h("svg", { key: 'ee057dc02ae61206164775b35ad1408fe04dfed9', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '2190046ba2e2c659d47f8a7f4a12bb10ae626f07', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
103
+ }, onError: this.handleImageError })), showInitials && (h("span", { key: '21a9022cffdb69e0c3626e513cb3c036a9d3a16d', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '43e676af007bf254b1921f3efcbc7fff4e204359', class: "avatar-default" }, h("svg", { key: 'a7378795539a902e28ca644a80f1ca00cc9f818a', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '31548a495a86f033325c98cfcc0ae398b6bb8281', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
104
104
  }
105
105
  static get watchers() { return {
106
106
  "user": [{