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
@@ -158,16 +158,16 @@ const KritzelAvatar = class {
158
158
  height: `${this.size}px`,
159
159
  fontSize: `${Math.round(this.size * 0.4)}px`,
160
160
  };
161
- return (index.h(index.Host, { key: 'a25cae3d0597e53606a00855e3175c89ff90d58e', style: containerStyles, class: {
161
+ return (index.h(index.Host, { key: '116725d55e4443e80216b3b3251e957d2009b43e', style: containerStyles, class: {
162
162
  'has-image': !!showImage,
163
163
  'has-initials': !!showInitials,
164
164
  'has-default': !!showDefaultIcon,
165
- }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: 'c3288f0ba9e0d8876403244fe3942dd91e685a79', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
165
+ }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: 'd70ad4eb484404b18c13e066e8c10b3c86918ee5', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
166
166
  if (el) {
167
167
  el.referrerPolicy = 'no-referrer';
168
168
  el.crossOrigin = 'anonymous';
169
169
  }
170
- }, onError: this.handleImageError })), showInitials && (index.h("span", { key: 'ae0ca459b87e90a1f67abe747b75d8dd61247ead', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (index.h("span", { key: '2a60a0347ae21732828920339f53803330c9c6c6', class: "avatar-default" }, index.h("svg", { key: 'ee057dc02ae61206164775b35ad1408fe04dfed9', viewBox: "0 0 24 24", fill: "currentColor" }, index.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" }))))));
170
+ }, onError: this.handleImageError })), showInitials && (index.h("span", { key: '21a9022cffdb69e0c3626e513cb3c036a9d3a16d', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (index.h("span", { key: '43e676af007bf254b1921f3efcbc7fff4e204359', class: "avatar-default" }, index.h("svg", { key: 'a7378795539a902e28ca644a80f1ca00cc9f818a', viewBox: "0 0 24 24", fill: "currentColor" }, index.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" }))))));
171
171
  }
172
172
  static get watchers() { return {
173
173
  "user": [{
@@ -492,7 +492,7 @@ const KritzelBackToContent = class {
492
492
  this.backToContent.emit();
493
493
  };
494
494
  render() {
495
- return (index.h(index.Host, { key: '9a087efd5b544a5633b89fcdfa9609a207eb70fc' }, index.h("button", { key: 'd02c237dd9fe08a5e65b2c72cc47f4444b47338c', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, index.h("kritzel-icon", { key: '3345e1bd20a1a4e2f6e46b1a365e3405a8304f4e', name: "chevrons-left" }))));
495
+ return (index.h(index.Host, { key: '86a94bdc5bb02977214f999b7b880ce3193b6d8f' }, index.h("button", { key: '6a07c13c9986ebef6100140f7e702a1dfb5c2033', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, index.h("kritzel-icon", { key: 'ebadc99b15f2f015ada8795fa05a3a64ccac9cb5', name: "chevrons-left" }))));
496
496
  }
497
497
  };
498
498
  KritzelBackToContent.style = kritzelBackToContentCss();
@@ -519,11 +519,11 @@ const KritzelButton = class {
519
519
  this.buttonClick.emit();
520
520
  };
521
521
  render() {
522
- return (index.h(index.Host, { key: 'ee7da1d8d86cdd6f920d15642203265cc93cda4e' }, index.h("button", { key: '15b1f11be5157c70ef5a4b3cd917bacb8f90ee4a', type: this.type, class: {
522
+ return (index.h(index.Host, { key: 'b9de2a1261ca0cb491f6980db6a596c48fa45b3a' }, index.h("button", { key: 'a9507ea0f6a1d9fcb19a7df16bea54cc0ead24f9', type: this.type, class: {
523
523
  'kritzel-button': true,
524
524
  [this.variant]: true,
525
525
  'disabled': this.disabled,
526
- }, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: '8500172bd4540f4fa9c5e629d1ceb1816dcf556a' }))));
526
+ }, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: '8449a26d4f9fe0226c6150a6639c522486b59780' }))));
527
527
  }
528
528
  };
529
529
  KritzelButton.style = kritzelButtonCss();
@@ -571,13 +571,13 @@ const KritzelColorComponent = class {
571
571
  render() {
572
572
  const resolvedColor = this.resolveColor();
573
573
  const isColorVeryLight = this.isLightColor(resolvedColor);
574
- return (index.h(index.Host, { key: 'a898705a76a25b051b046cb3d5274c1701482a4c' }, index.h("div", { key: '7d5ce83a17f710a1d808ff7d572b75585caada72', class: "checkerboard-bg", style: {
574
+ return (index.h(index.Host, { key: 'e39c77c55942b9c615e404efabf4939b2cf05a34' }, index.h("div", { key: 'ac343295592ea80ca7d3da61ca1244dd1aaa50db', class: "checkerboard-bg", style: {
575
575
  width: `${this.size}px`,
576
576
  height: `${this.size}px`,
577
577
  borderRadius: '50%',
578
578
  display: 'inline-block',
579
579
  position: 'relative',
580
- } }, index.h("div", { key: '8d318c989b7e69bc61dd653688a9e7480c4ee34d', class: {
580
+ } }, index.h("div", { key: '4c87934b3febd4c41874cd290d86a9a9a557e3e5', class: {
581
581
  'color-circle': true,
582
582
  'white': isColorVeryLight,
583
583
  }, style: {
@@ -633,7 +633,7 @@ const KritzelColorPalette = class {
633
633
  render() {
634
634
  const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
635
635
  const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
636
- return (index.h(index.Host, { key: '6e16fdd13c09ab2bcffb83df7ed861560f486518' }, index.h("div", { key: '48cc257315e13822dcc8bea314d26f1137d9b3cc', class: {
636
+ return (index.h(index.Host, { key: '16aa405a43b3943473e577c5a6ab86adf4ae1ba9' }, index.h("div", { key: 'f65bb286889700dc1f0e8d84ff59721071b7b73a', class: {
637
637
  'color-grid': true,
638
638
  'expanded': this.isExpanded,
639
639
  }, style: {
@@ -1202,13 +1202,13 @@ const KritzelControls = class {
1202
1202
  // Separate tool controls from config control
1203
1203
  const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
1204
1204
  const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
1205
- return (index.h(index.Host, { key: 'a526bd337a6b75933ec4be89c3edded0a9c39e7c', style: { display: this.visible ? '' : 'none' }, class: {
1205
+ return (index.h(index.Host, { key: 'a72f9b1befd185b67d24f6d7a4987ebeb4d6742d', style: { display: this.visible ? '' : 'none' }, class: {
1206
1206
  mobile: this.isTouchDevice,
1207
- } }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '5314f067c5a22425690e3b6f26c836962ac528a2', style: {
1207
+ } }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '4e69324b23542878919119d10db98fc44b0dc536', style: {
1208
1208
  position: 'absolute',
1209
1209
  bottom: '56px',
1210
1210
  left: '12px',
1211
- }, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '7cf0cd164d723b5901f54a6671395f63dd8bad29', class: "kritzel-controls" }, index.h("div", { key: 'b7169122686a0a67c37d96751291fc43f4c45e4a', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: '6e3c4f30900e4722abdfaf3cfdc68cf1a07b9292', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
1211
+ }, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: 'f4c7b461a433055512f5b6d397ab69d470531285', class: "kritzel-controls" }, index.h("div", { key: '53c27ef4ac2a9121f07ce91c82e63de5d7029de6', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: '43d90c6031e164843dd43563d4fe75410b990278', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
1212
1212
  // Check if this control has sub-options (split-button)
1213
1213
  if (control.subOptions?.length) {
1214
1214
  const selectedSubOption = this.getSelectedSubOption(control);
@@ -1238,10 +1238,10 @@ const KritzelControls = class {
1238
1238
  'kritzel-control': true,
1239
1239
  'selected': this.activeControl?.name === control?.name,
1240
1240
  }, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1) }, index.h("kritzel-icon", { name: control.icon })));
1241
- })), index.h("div", { key: 'bc8d79e0512f30fe150c6d2ac7f81206fc47c1a5', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (index.h("div", { class: {
1241
+ })), index.h("div", { key: '9a8bd38a8266f1bb5feddcb4e396bb20c25512fa', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (index.h("div", { class: {
1242
1242
  'kritzel-config-container': true,
1243
1243
  'visible': hasConfigUI,
1244
- }, key: configControl.name }, index.h("div", { key: '671431a9c388080fb917d4e8c596d17e92eaba08', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: '394e8e2c07b191b3fb93645d68d7eae67761167a', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: 'b8479fba2afdb51fe0ef965e18b1ae45ba8a7da6', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), index.h("div", { key: '8fac81d682dbdec6b5247154fd20d553dfe6f1a7', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
1244
+ }, key: configControl.name }, index.h("div", { key: 'c889744c924d29f1e65cf67263be9ff708916610', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: '9df35a6967a9738e24d328865b07b50328cef811', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: '6f0079c879dc2ca5910193a02d19f246068d09e6', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), index.h("div", { key: 'a6af0ad5cc2fd0bbef0ade522f82ead53b30f92b', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
1245
1245
  if (el)
1246
1246
  this.configTriggerRef = el;
1247
1247
  }, onKeyDown: event => {
@@ -1250,7 +1250,7 @@ const KritzelControls = class {
1250
1250
  }
1251
1251
  }, style: {
1252
1252
  cursor: 'pointer',
1253
- } }, this.displayValues && (index.h("div", { key: '6aa1daed9425d069c7d0405a04e65b4c4e88291f', class: "color-container" }, index.h("kritzel-color", { key: '7b54461769bf4aec3e39d1fbe21c015b7d7a85bb', value: this.displayValues.color, theme: this.theme, size: 18, style: {
1253
+ } }, this.displayValues && (index.h("div", { key: '07a7fb2e0dc5c53a389da7f742322fdf489e0bd7', class: "color-container" }, index.h("kritzel-color", { key: '2987b76ca66d58a12ee71dd4c7d82a9c42480690', value: this.displayValues.color, theme: this.theme, size: 18, style: {
1254
1254
  borderRadius: '50%',
1255
1255
  border: 'none',
1256
1256
  } })))))))));
@@ -1284,7 +1284,7 @@ const KritzelCurrentUser = class {
1284
1284
  /** Resolved localized strings keyed by term key, supplied by the editor. */
1285
1285
  terms = {};
1286
1286
  render() {
1287
- return (index.h(index.Host, { key: '606ff4d621467d24c30d06a2cf9191a883497f1b' }, index.h("kritzel-avatar", { key: 'a215f36bcfa55e2d649e79ef2e4ae4503ebb325d', user: this.user, size: this.avatarSize })));
1287
+ return (index.h(index.Host, { key: '3c23677e98ba459144fafde994dc66a14068c5b1' }, index.h("kritzel-avatar", { key: 'e5c04bf871f7808ab0e380770a2a94ddab8eac83', user: this.user, size: this.avatarSize })));
1288
1288
  }
1289
1289
  };
1290
1290
  KritzelCurrentUser.style = kritzelCurrentUserCss();
@@ -1325,7 +1325,7 @@ const KritzelCurrentUserDialog = class {
1325
1325
  }
1326
1326
  render() {
1327
1327
  const displayName = this.getDisplayName();
1328
- return (index.h(index.Host, { key: '46fa9107dd133e2896a80bf337874b69943156c6' }, index.h("kritzel-dialog", { key: '9270ec727f41b73fb37eaec2ee601689d3c26292', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '3c877db40a63bef3624f252ab39842cbc0b9bdc8', class: "user-info" }, index.h("kritzel-avatar", { key: '821130a92f385de1fa4e796b99830c4c3b317c15', user: this.user, size: 80 }), displayName && index.h("div", { key: 'e9c44284d50c97aed00523541360dbbaf6e37566', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: '46f24e37629e6bd1c1dd5c52cfd7281c1d2e2308', class: "user-email" }, this.user.email), index.h("kritzel-button", { key: '929483c1bb270eb8dcf8e9d9e0d087b8476cd23f', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
1328
+ return (index.h(index.Host, { key: 'd5be0723f615c45bac897d4f2a2ebe5c67b4769c' }, index.h("kritzel-dialog", { key: '4de42a3df3d18f96ddfbc362c05e98ade4aeaaf8', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '7908d833617b67a6663e41fd91599356ab66619b', class: "user-info" }, index.h("kritzel-avatar", { key: '93fd9ddb633ad9ad7e17a7c4292861b86ef132f1', user: this.user, size: 80 }), displayName && index.h("div", { key: 'dff873e3c8b643e7a52f212a3e00167adc301cf7', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: '7b30a9930cd454ca040181cb11c1d000e408bfc8', class: "user-email" }, this.user.email), index.h("kritzel-button", { key: '04ea8cbadd90b149ee8f5bbac071040b74eb12b3', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
1329
1329
  }
1330
1330
  };
1331
1331
  KritzelCurrentUserDialog.style = kritzelCurrentUserDialogCss();
@@ -2385,6 +2385,7 @@ const KritzelEditor = class {
2385
2385
  isEditorVisible = false;
2386
2386
  activeNotification;
2387
2387
  isNotificationDismissing = false;
2388
+ contextMenuState;
2388
2389
  normalizedControls = [];
2389
2390
  notificationDismissTimeout;
2390
2391
  notificationDismissAnimationTimeout;
@@ -2673,6 +2674,12 @@ const KritzelEditor = class {
2673
2674
  async triggerSelectionChange() {
2674
2675
  return this.engineRef.triggerSelectionChange();
2675
2676
  }
2677
+ async beginSceneBootstrap() {
2678
+ return this.engineRef.beginSceneBootstrap();
2679
+ }
2680
+ async endSceneBootstrap() {
2681
+ return this.engineRef.endSceneBootstrap();
2682
+ }
2676
2683
  async getDisplayableShortcuts() {
2677
2684
  return this.engineRef.getDisplayableShortcuts();
2678
2685
  }
@@ -2848,6 +2855,22 @@ const KritzelEditor = class {
2848
2855
  this.activeNotification = event.detail;
2849
2856
  this.scheduleNotificationDismiss();
2850
2857
  }
2858
+ handleContextMenuStateChange(event) {
2859
+ event.stopPropagation();
2860
+ this.contextMenuState = event.detail.isVisible ? event.detail : undefined;
2861
+ }
2862
+ handleContextMenuActionSelected(event) {
2863
+ const contextMenuState = this.contextMenuState;
2864
+ if (!contextMenuState || !event.detail.action) {
2865
+ void this.hideContextMenu();
2866
+ return;
2867
+ }
2868
+ event.detail.action({
2869
+ x: contextMenuState.worldPosition.x,
2870
+ y: contextMenuState.worldPosition.y,
2871
+ }, contextMenuState.objects);
2872
+ void this.hideContextMenu();
2873
+ }
2851
2874
  handleNotificationHoverChange(event) {
2852
2875
  event.stopPropagation();
2853
2876
  this.isNotificationHovered = event.detail;
@@ -3152,36 +3175,41 @@ const KritzelEditor = class {
3152
3175
  const isLoggedIn = this.isLoggedIn;
3153
3176
  const shouldShowCurrentUser = isLoggedIn;
3154
3177
  const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
3155
- return (index.h(index.Host, { key: '00d652c74feac7b4917772146368125da6deeb1c' }, index.h("div", { key: 'f8fb86b45b0cdabb5e3ad52de6d6ef31a71a09e4', class: "editor-content", style: {
3178
+ return (index.h(index.Host, { key: 'ab06876e3a07e97c3788113ffd0483bbb2819d5b' }, index.h("div", { key: 'e393eacfad2b224a720e5a97b047af8dd3ce97a5', class: "editor-content", style: {
3156
3179
  opacity: this.isEditorVisible ? '1' : '0',
3157
3180
  visibility: this.isEditorVisible ? 'visible' : 'hidden',
3158
3181
  transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
3159
- } }, index.h("div", { key: '2378c776d8eecf2614567bed11c6e93fb338e302', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'ce41192540169694482d6f8cca60701bc4427438', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: 'ec269d3e9f589362d8301370778f0c5e4252eead', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (index.h("div", { key: '847ed8149d556c934090424ff54b17b6721ccc76', class: "top-center-notification-layer", role: "presentation" }, index.h("div", { key: '61d8b8e91cda100ffa6620db26ba6dfb2232946a', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, index.h("kritzel-notification-card", { key: 'b7e132773225ace38e447756110dd39e4661f5fc', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), index.h("kritzel-engine", { key: '3e4a6d0dbc015ec675fb21a59990c87e9eaa805f', ref: el => {
3182
+ } }, index.h("div", { key: 'd9dcbd6859bea28d75c7f8b0cc26ea3ba58b2433', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: '945953a6c95520316c4e0f35503a824414bd3c7a', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: '8b345bf6ce0ec33ca35f1f630af2050b95bc6b74', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (index.h("div", { key: '1b965de38a7f1f40d5d91431801e873289416924', class: "top-center-notification-layer", role: "presentation" }, index.h("div", { key: 'f165dc7acc5e1bc7923fec217ebc16fe4a3f2ece', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, index.h("kritzel-notification-card", { key: 'c5cf7edc1f921e35310c89449f5a043dda171a04', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), this.contextMenuState && this.contextMenuState.items.length > 0 && (index.h("kritzel-context-menu", { key: 'fc3417276f0034e7fc7e8360d3f3ce57106146b2', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
3183
+ position: 'absolute',
3184
+ left: `${this.contextMenuState.position.x}px`,
3185
+ top: `${this.contextMenuState.position.y}px`,
3186
+ zIndex: '10002',
3187
+ }, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-engine", { key: '0c9df0386d38a87f50d324cfc51307a1cb947a58', ref: el => {
3160
3188
  if (el) {
3161
3189
  this.engineRef = el;
3162
3190
  }
3163
- }, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event) }), index.h("kritzel-controls", { key: 'f84607a0a4d0762c1249400f85b7b8454d672c1e', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
3191
+ }, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event) }), index.h("kritzel-controls", { key: '46d8e9c45c7bed24fc02d17c8fef836d596088d7', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
3164
3192
  if (el) {
3165
3193
  this.controlsRef = el;
3166
3194
  }
3167
- }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: 'e2691e7c730195e197511cb1e4d0fe707677b5ff', class: "bottom-left-buttons" }, index.h("kritzel-zoom-panel", { key: 'd0ac6624eab49af78d4761c3ad91842834717aad', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), index.h("div", { key: 'ad3d386ab7e8ad9fdfbb12754db005bc85fa28ce', class: "top-right-buttons" }, index.h("kritzel-settings", { key: '566024ac6f3d8f7f20238cc1f83882b39dbf698e', ref: el => {
3195
+ }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: 'e3ef94509a82fe435f827b66cf1813969b7dec66', class: "bottom-left-buttons" }, index.h("kritzel-zoom-panel", { key: '4e6cbdf85f550e6e3037dce3b910c0582ea0320b', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), index.h("div", { key: 'a62df7f8a68cbed728b701894a5284c2bff39e1e', class: "top-right-buttons" }, index.h("kritzel-settings", { key: '0b6daf9ff43551df9f86431d398a32913a845925', ref: el => {
3168
3196
  if (el) {
3169
3197
  this.settingsRef = el;
3170
3198
  }
3171
- }, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '4a23ea0c6e070d424a90e9fc87de04e11cff7ade', ref: el => {
3199
+ }, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '29d02ffd3358fe91d27435cc3fdd5f8ac2ad7cf5', ref: el => {
3172
3200
  if (el) {
3173
3201
  this.exportRef = el;
3174
3202
  }
3175
- }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), index.h("kritzel-active-users", { key: 'feef074b52e552fa2ef7e8258002571aca4c5abd', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: '844c722545363eaf7eec69037a835eae943afeb9', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (index.h("kritzel-current-user-dialog", { key: '8363c1d3230d111cf1ace0ccf805669e592bb533', ref: el => {
3203
+ }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), index.h("kritzel-active-users", { key: '729ca599e46654bc1429b5d91ff73f26d9b6e7bb', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: '84c07268072418a82cf504f16803c59a1e37c0ae', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (index.h("kritzel-current-user-dialog", { key: '55189e3da7899628b252e7995b20bc422fce2d5c', ref: el => {
3176
3204
  if (el) {
3177
3205
  this.currentUserDialogRef = el;
3178
3206
  this.currentUserDialogRef.addEventListener('logoutRequest', this.handleCurrentUserLogout);
3179
3207
  }
3180
- }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && (index.h("kritzel-button", { key: '68ddf8c3aabc7634b4c1d88f3d2d584fa1f1b150', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in')), index.h("kritzel-more-menu", { key: '39b938f5792f7a36bbf21ed88a1a5c7717a785a6', items: this.moreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: '61ed918499760d874d5d2ec140d3cf59ce94520b', ref: el => {
3208
+ }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && (index.h("kritzel-button", { key: 'a55d85769bad635fcc7934f584bf1bf74c1e7ea6', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in')), index.h("kritzel-more-menu", { key: '67dd879ec3c55c98e32f6112ca53d925f47b56b4', items: this.moreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: '5f13130099110eb472022099219e15877ceceb57', ref: el => {
3181
3209
  if (el) {
3182
3210
  this.shareDialogRef = el;
3183
3211
  }
3184
- }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '5f6528a57884bd1494e45755609e710f69041a4d', ref: el => {
3212
+ }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: 'cda0fcdcad75de8730ce10bda425cc0fbe01429a', ref: el => {
3185
3213
  if (el) {
3186
3214
  this.loginDialogRef = el;
3187
3215
  }
@@ -21129,6 +21157,18 @@ class KritzelViewport {
21129
21157
  animateViewportTo(targetTranslateX, targetTranslateY, targetScale, duration = 150) {
21130
21158
  // Cancel any existing animation
21131
21159
  this.cancelViewportAnimation();
21160
+ if (duration <= 0) {
21161
+ // Apply immediately; interpolating with duration 0 divides by zero
21162
+ // (rAF timestamps can precede performance.now()), producing NaN state.
21163
+ this._core.store.state.scale = targetScale;
21164
+ const clamped = this.clampTranslate(targetTranslateX, targetTranslateY);
21165
+ this._core.store.state.translateX = clamped.translateX;
21166
+ this._core.store.state.translateY = clamped.translateY;
21167
+ this._core.store.state.hasViewportChanged = true;
21168
+ this._core.rerender();
21169
+ this._debounceUpdate();
21170
+ return;
21171
+ }
21132
21172
  const startTranslateX = this._core.store.state.translateX;
21133
21173
  const startTranslateY = this._core.store.state.translateY;
21134
21174
  const startScale = this._core.store.state.scale;
@@ -21136,7 +21176,8 @@ class KritzelViewport {
21136
21176
  this._core.store.state.isScaling = true;
21137
21177
  const animate = (currentTime) => {
21138
21178
  const elapsed = currentTime - startTime;
21139
- const progress = Math.min(elapsed / duration, 1);
21179
+ // Clamp to [0, 1]; rAF timestamps can precede startTime, yielding negative progress
21180
+ const progress = Math.min(Math.max(elapsed, 0) / duration, 1);
21140
21181
  // easeOutCubic easing function
21141
21182
  const eased = 1 - Math.pow(1 - progress, 3);
21142
21183
  this._core.store.state.scale = startScale + (targetScale - startScale) * eased;
@@ -25620,13 +25661,13 @@ class KritzelCore {
25620
25661
  }
25621
25662
  /**
25622
25663
  * Selects all objects in the workspace.
25623
- * Excludes selection-related and context menu objects.
25664
+ * Excludes selection-related objects.
25624
25665
  * Switches to selection tool.
25625
25666
  */
25626
25667
  selectAllObjects() {
25627
25668
  const allObjects = this._store.objects
25628
25669
  .allObjects()
25629
- .filter(o => !(o instanceof schema_constants.KritzelSelectionGroup) && !(o instanceof schema_constants.KritzelSelectionBox) && !(o instanceof KritzelContextMenu));
25670
+ .filter(o => !(o instanceof schema_constants.KritzelSelectionGroup) && !(o instanceof schema_constants.KritzelSelectionBox));
25630
25671
  if (allObjects.length > 0) {
25631
25672
  const selectionGroup = schema_constants.KritzelSelectionGroup.create(this);
25632
25673
  allObjects.forEach(obj => {
@@ -25645,7 +25686,7 @@ class KritzelCore {
25645
25686
  }
25646
25687
  /**
25647
25688
  * Selects all objects currently visible in the viewport.
25648
- * Excludes selection-related and context menu objects.
25689
+ * Excludes selection-related objects.
25649
25690
  * Switches to selection tool.
25650
25691
  */
25651
25692
  selectAllObjectsInViewport() {
@@ -25660,7 +25701,7 @@ class KritzelCore {
25660
25701
  const objectsInViewport = this._store.objects
25661
25702
  .query(viewportBounds)
25662
25703
  .filter(o => o.isInViewport())
25663
- .filter(o => !(o instanceof schema_constants.KritzelSelectionGroup) && !(o instanceof schema_constants.KritzelSelectionBox) && !(o instanceof KritzelContextMenu));
25704
+ .filter(o => !(o instanceof schema_constants.KritzelSelectionGroup) && !(o instanceof schema_constants.KritzelSelectionBox));
25664
25705
  if (objectsInViewport.length > 0) {
25665
25706
  const selectionGroup = schema_constants.KritzelSelectionGroup.create(this);
25666
25707
  objectsInViewport.forEach(obj => {
@@ -27761,6 +27802,8 @@ const KritzelEngine = class {
27761
27802
  awarenessChange;
27762
27803
  /** Emitted when notifications change. */
27763
27804
  notificationsChange;
27805
+ /** Emitted when context-menu visibility, items, or position changes. */
27806
+ contextMenuStateChange;
27764
27807
  /** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
27765
27808
  loadingChange;
27766
27809
  /** Emitted when remote workspace synchronization is in progress. */
@@ -27771,6 +27814,31 @@ const KritzelEngine = class {
27771
27814
  async triggerSelectionChange() {
27772
27815
  this.objectsSelectionChange.emit();
27773
27816
  }
27817
+ /** Starts a scene bootstrap phase by hiding the scene immediately. */
27818
+ async beginSceneBootstrap() {
27819
+ if (this._sceneBootstrapTransitionTimer !== null) {
27820
+ clearTimeout(this._sceneBootstrapTransitionTimer);
27821
+ this._sceneBootstrapTransitionTimer = null;
27822
+ }
27823
+ this._sceneBootstrapTransitionEnabled = false;
27824
+ this._sceneBootstrapOpacity = 0;
27825
+ this.core.rerender();
27826
+ }
27827
+ /** Ends a scene bootstrap phase by fading the scene back in. */
27828
+ async endSceneBootstrap() {
27829
+ if (this._sceneBootstrapTransitionTimer !== null) {
27830
+ clearTimeout(this._sceneBootstrapTransitionTimer);
27831
+ this._sceneBootstrapTransitionTimer = null;
27832
+ }
27833
+ this._sceneBootstrapTransitionEnabled = true;
27834
+ this._sceneBootstrapOpacity = 1;
27835
+ this.core.rerender();
27836
+ this._sceneBootstrapTransitionTimer = setTimeout(() => {
27837
+ this._sceneBootstrapTransitionEnabled = false;
27838
+ this._sceneBootstrapTransitionTimer = null;
27839
+ this.core.rerender();
27840
+ }, 220);
27841
+ }
27774
27842
  handleWheel(ev) {
27775
27843
  if (this.core.store.isDisabled) {
27776
27844
  return;
@@ -27928,6 +27996,7 @@ const KritzelEngine = class {
27928
27996
  }
27929
27997
  handleLongPress(ev) {
27930
27998
  this.contextMenuHandler.handleContextMenu(ev.detail);
27999
+ this.emitContextMenuStateChange();
27931
28000
  }
27932
28001
  handleContextMenu(ev) {
27933
28002
  if (ev.cancelable) {
@@ -27940,6 +28009,7 @@ const KritzelEngine = class {
27940
28009
  return;
27941
28010
  }
27942
28011
  this.contextMenuHandler.handleContextMenu(ev);
28012
+ this.emitContextMenuStateChange();
27943
28013
  }
27944
28014
  handleResize() {
27945
28015
  this.viewport.handleResize();
@@ -28181,6 +28251,7 @@ const KritzelEngine = class {
28181
28251
  this.core.store.objects?.clearLocalSelectionBox();
28182
28252
  this.core.store.state.isSelecting = false;
28183
28253
  this.core.store.state.isEnabled = true;
28254
+ this.emitContextMenuStateChange();
28184
28255
  this.core.rerender();
28185
28256
  }
28186
28257
  /**
@@ -28194,6 +28265,7 @@ const KritzelEngine = class {
28194
28265
  */
28195
28266
  async openContextMenu(options) {
28196
28267
  this.contextMenuHandler.open(options);
28268
+ this.emitContextMenuStateChange();
28197
28269
  }
28198
28270
  /**
28199
28271
  * Retrieves a canvas object by its unique ID.
@@ -28946,14 +29018,26 @@ const KritzelEngine = class {
28946
29018
  // Revive and add objects to the current workspace
28947
29019
  if (data.objects && Array.isArray(data.objects)) {
28948
29020
  const reviver = new KritzelReviver(this.core);
28949
- for (const objData of data.objects) {
28950
- const revivedObj = reviver.revive(objData);
28951
- if (revivedObj) {
29021
+ const objectsMap = this.core.store.objects;
29022
+ const insertRevivedObjects = () => {
29023
+ for (const objData of data.objects) {
29024
+ const revivedObj = reviver.revive(objData);
29025
+ if (!revivedObj) {
29026
+ continue;
29027
+ }
28952
29028
  // Update workspaceId to the current workspace's ID
28953
29029
  revivedObj.workspaceId = currentWorkspaceId;
28954
29030
  this.core.addObject(revivedObj);
28955
29031
  loadedCount++;
28956
29032
  }
29033
+ };
29034
+ if (objectsMap) {
29035
+ objectsMap.transaction(() => {
29036
+ insertRevivedObjects();
29037
+ });
29038
+ }
29039
+ else {
29040
+ insertRevivedObjects();
28957
29041
  }
28958
29042
  }
28959
29043
  // Rerender to apply changes
@@ -29299,7 +29383,6 @@ const KritzelEngine = class {
29299
29383
  viewport;
29300
29384
  contextMenuHandler;
29301
29385
  keyHandler;
29302
- contextMenuElement = null;
29303
29386
  _lastHadSelectionGroup = false;
29304
29387
  _isViewportReady = false;
29305
29388
  _isYjsInitialized = false;
@@ -29315,6 +29398,9 @@ const KritzelEngine = class {
29315
29398
  _hasLoggedUnlicensedWelcomeBanner = false;
29316
29399
  _previousVisibleCustomElements = new Set();
29317
29400
  _revealedImageKeys = new Set();
29401
+ _sceneBootstrapOpacity = 1;
29402
+ _sceneBootstrapTransitionEnabled = false;
29403
+ _sceneBootstrapTransitionTimer = null;
29318
29404
  _defaultUndoState = {
29319
29405
  canUndo: false,
29320
29406
  canRedo: false,
@@ -29335,6 +29421,22 @@ const KritzelEngine = class {
29335
29421
  this.isSyncing = isSyncing;
29336
29422
  this.syncingChange.emit(isSyncing);
29337
29423
  }
29424
+ emitContextMenuStateChange() {
29425
+ this.contextMenuStateChange.emit({
29426
+ isVisible: this.core.store.state.isContextMenuVisible,
29427
+ isObjectMenu: !!this.core.store.selectionGroup,
29428
+ items: this.core.store.state.contextMenuItems,
29429
+ objects: this.core.store.selectionGroup?.objects || [],
29430
+ position: {
29431
+ x: this.core.store.state.contextMenuX,
29432
+ y: this.core.store.state.contextMenuY,
29433
+ },
29434
+ worldPosition: {
29435
+ x: this.core.store.state.contextMenuWorldX,
29436
+ y: this.core.store.state.contextMenuWorldY,
29437
+ },
29438
+ });
29439
+ }
29338
29440
  applyToolConfig(tool, toolConfig) {
29339
29441
  const normalizedToolConfig = this.normalizeToolConfig(toolConfig);
29340
29442
  Object.entries(normalizedToolConfig).forEach(([key, value]) => {
@@ -29419,6 +29521,7 @@ const KritzelEngine = class {
29419
29521
  this.viewportChange = index.createEvent(this, "viewportChange");
29420
29522
  this.awarenessChange = index.createEvent(this, "awarenessChange");
29421
29523
  this.notificationsChange = index.createEvent(this, "notificationsChange");
29524
+ this.contextMenuStateChange = index.createEvent(this, "contextMenuStateChange");
29422
29525
  this.loadingChange = index.createEvent(this, "loadingChange");
29423
29526
  this.syncingChange = index.createEvent(this, "syncingChange");
29424
29527
  this.core = new KritzelCore(this);
@@ -29426,6 +29529,10 @@ const KritzelEngine = class {
29426
29529
  disconnectedCallback() {
29427
29530
  this.throttledPointerMoveMulti.cancel();
29428
29531
  this._revealedImageKeys.clear();
29532
+ if (this._sceneBootstrapTransitionTimer !== null) {
29533
+ clearTimeout(this._sceneBootstrapTransitionTimer);
29534
+ this._sceneBootstrapTransitionTimer = null;
29535
+ }
29429
29536
  // Unmount all remaining custom elements
29430
29537
  if (this.core.store.allObjects) {
29431
29538
  this.core.store.allObjects.forEach(object => {
@@ -29469,6 +29576,10 @@ const KritzelEngine = class {
29469
29576
  this.core.store.state.viewportBoundaryRight = this.viewportBoundaryRight;
29470
29577
  this.core.store.state.viewportBoundaryTop = this.viewportBoundaryTop;
29471
29578
  this.core.store.state.viewportBoundaryBottom = this.viewportBoundaryBottom;
29579
+ if (this.debugInfo) {
29580
+ this.core.store.state.debugInfo = this.debugInfo;
29581
+ this.core.assetResolver.setShowInfo(this.debugInfo.showAssetResolverInfo);
29582
+ }
29472
29583
  this._isWorkspaceLoading = true;
29473
29584
  this.syncLoadingState();
29474
29585
  }
@@ -29874,6 +29985,9 @@ const KritzelEngine = class {
29874
29985
  }
29875
29986
  return (index.h(index.Host, null, index.h("kritzel-loading-overlay", { visible: this.core.store.state.isLoading, text: this.core.localizationManager.translate('engine.loading') }), index.h("kritzel-sync-indicator", { visible: this.isSyncing, text: "Syncing..." }), this.core.store.state.debugInfo.showViewportInfo && (index.h("div", { class: "debug-panel" }, index.h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), index.h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), index.h("div", null, "TranslateX: ", this.core.store.state?.translateX), index.h("div", null, "TranslateY: ", this.core.store.state?.translateY), index.h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), index.h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), index.h("div", null, "PointerCount: ", this.core.store.state.pointers.size), index.h("div", null, "Scale: ", this.core.store.state?.scale), index.h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), index.h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), index.h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), index.h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), index.h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), index.h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), index.h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), index.h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), index.h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), index.h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), index.h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), index.h("div", null, "PointerX: ", this.core.store.state?.pointerX), index.h("div", null, "PointerY: ", this.core.store.state?.pointerY), index.h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), index.h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), index.h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), index.h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), index.h("div", { id: "origin", class: "origin", style: {
29876
29987
  transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
29988
+ opacity: this._sceneBootstrapOpacity.toString(),
29989
+ transition: this._sceneBootstrapTransitionEnabled ? 'opacity 220ms ease-out' : 'none',
29990
+ willChange: this._sceneBootstrapTransitionEnabled ? 'opacity' : undefined,
29877
29991
  } }, visibleObjects?.map(object => {
29878
29992
  const { multiplied: effectiveOpacity, overridden: effectiveOpacityString } = this.getObjectEffectiveOpacity(object, viewportScale);
29879
29993
  return (index.h("div", { key: object.id, id: object.id, class: "object", style: {
@@ -30300,20 +30414,7 @@ const KritzelEngine = class {
30300
30414
  stroke: 'var(--kritzel-snap-indicator-stroke, #007bff)',
30301
30415
  strokeWidth: data.indicatorStrokeWidth,
30302
30416
  } })))));
30303
- })()), this.core.store.state.isContextMenuVisible && (index.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: {
30304
- position: 'absolute',
30305
- left: `${this.core.store.state.contextMenuX}px`,
30306
- top: `${this.core.store.state.contextMenuY}px`,
30307
- zIndex: '10002',
30308
- }, onActionSelected: event => {
30309
- if (event.detail.action) {
30310
- event.detail.action({
30311
- x: this.core.store.state.contextMenuWorldX,
30312
- y: this.core.store.state.contextMenuWorldY,
30313
- }, this.core.store.selectionGroup?.objects || []);
30314
- }
30315
- this.hideContextMenu();
30316
- }, onClose: () => this.hideContextMenu() })), this.core.store.objects?.hasAwareness && index.h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && index.h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && index.h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
30417
+ })()), this.core.store.objects?.hasAwareness && index.h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && index.h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && index.h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
30317
30418
  }
30318
30419
  static get watchers() { return {
30319
30420
  "workspace": [{
@@ -30470,7 +30571,7 @@ const KritzelExport = class {
30470
30571
  return (index.h("div", { class: "export-tab-content" }, index.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 })));
30471
30572
  }
30472
30573
  render() {
30473
- return (index.h(index.Host, { key: '2f12ec7f4754e3f2aa0364809bdbde60102d76e4' }, index.h("kritzel-dialog", { key: '0e5929e175ac41dd7f480aabaef2aa109a15f679', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, index.h("div", { key: '6afffd8098e414c117582f3485dbaa348747eb4c', class: "export-content" }, index.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(), index.h("button", { key: '9fab5c1037cc9187c4f14c9534c8f395fde0d7cf', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
30574
+ return (index.h(index.Host, { key: '0bc45e80716be4a7b19ae12a6464a641b5bd4550' }, index.h("kritzel-dialog", { key: 'f336f8b1e4ae10954d48ca67da88504faf06b295', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, index.h("div", { key: 'e2d1209652bb54fb7f623e50bc4bbbb703083b76', class: "export-content" }, index.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(), index.h("button", { key: 'e06564889d991afc7a4ac43bb1e5504e98c94c52', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
30474
30575
  }
30475
30576
  };
30476
30577
  KritzelExport.style = kritzelExportCss();
@@ -30485,7 +30586,7 @@ const KritzelFont = class {
30485
30586
  size = 24;
30486
30587
  color = '#000000';
30487
30588
  render() {
30488
- return (index.h(index.Host, { key: '57369ac95d0c99a52a8580e7659ec10e0e8ab38e' }, index.h("div", { key: 'e8f128fd7b8d26debb2c4ad2075b27f969d731bd', class: "font-preview", style: {
30589
+ return (index.h(index.Host, { key: '054371cac30a2433611139a670406b0a1e3b99ff' }, index.h("div", { key: 'b4f2142b3cb31d067f39952a38b6f665f28f63bf', class: "font-preview", style: {
30489
30590
  fontFamily: this.fontFamily,
30490
30591
  fontSize: `${this.size}px`,
30491
30592
  color: this.color
@@ -30569,7 +30670,7 @@ const KritzelFontSize = class {
30569
30670
  render() {
30570
30671
  const color = 'var(--kritzel-global-text-primary)';
30571
30672
  const sizes = this.sizes ?? [];
30572
- return (index.h(index.Host, { key: '298b8c232c4d96583f4899efea86482ae8ebd319' }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
30673
+ return (index.h(index.Host, { key: '56eb19367abe312bac3b626cfcae3b1ff6e90d21' }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
30573
30674
  'size-container': true,
30574
30675
  'selected': this.selectedSize === size,
30575
30676
  }, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, index.h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
@@ -30636,7 +30737,7 @@ const KritzelInput = class {
30636
30737
  this.valueChange.emit(input.value);
30637
30738
  };
30638
30739
  render() {
30639
- return (index.h(index.Host, { key: 'a59aa026922a3267ec7e6177973e80edfa97202c' }, index.h("div", { key: '46b1f191072bfb2a26579a329f8fd6ec86ca3ef9', class: "input-container" }, this.label && index.h("label", { key: '5409f811792034be56c3269b31ff374d8ed33de2', class: "input-label" }, this.label), index.h("div", { key: 'f51219b2a6384aeee63a7c8214821abd853a0ea5', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, index.h("input", { key: '05c93a526aa2f2d757a7c139fa3a47d84a4e2d95', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && index.h("span", { key: '91b60b25a7ff750720ff1961e224a035a2d86096', class: "input-suffix" }, this.suffix)))));
30740
+ return (index.h(index.Host, { key: '46a0a48902a06ad85edcbaad3679ce3fe9ba850c' }, index.h("div", { key: 'a6beaf920614aa959d2fbd68b7268afba8637358', class: "input-container" }, this.label && index.h("label", { key: 'ca6d3fb3c22f1540795dbb0695ddd9b87cc05eee', class: "input-label" }, this.label), index.h("div", { key: '78d116e82531a9cca996d594792245449bcaf9c8', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, index.h("input", { key: '0d10d6356dea3a11338172bbe8c3c878eefcc708', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && index.h("span", { key: '0e6166ba8728efc1035302d7fb048306efbe5a68', class: "input-suffix" }, this.suffix)))));
30640
30741
  }
30641
30742
  static get watchers() { return {
30642
30743
  "value": [{
@@ -30744,7 +30845,7 @@ const KritzelLoadingOverlay = class {
30744
30845
  */
30745
30846
  text = 'Loading...';
30746
30847
  render() {
30747
- return (index.h(index.Host, { key: '30e6a9bd7337d74a2d33f27e8b9facfe1e5fdcce' }, index.h("div", { key: '4d0f7561372c2b28f748d5338dc28146fd1f8d31', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("span", { key: '303c5037522c00840089d7200a63525cffa05b82', class: "loading-spinner" }), this.text)));
30848
+ return (index.h(index.Host, { key: '331e4c9eb30e6f7b98023c23218b3caf5093c34b' }, index.h("div", { key: 'f994fec0db325a2bd687e5acc68263752e7a6acd', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("span", { key: 'b6087dc1e59845ab95946e654c7bb8e568b42dda', class: "loading-spinner" }), this.text)));
30748
30849
  }
30749
30850
  };
30750
30851
  KritzelLoadingOverlay.style = kritzelLoadingOverlayCss();
@@ -30796,7 +30897,7 @@ const KritzelLoginDialog = class {
30796
30897
  this.dialogClosed.emit();
30797
30898
  };
30798
30899
  render() {
30799
- return (index.h(index.Host, { key: 'd2b393ac37292a0cf88d0e18e9768ca666b238b2' }, index.h("kritzel-dialog", { key: '6e302e9030b5da0baf307fe261285e484b3c1f08', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: 'f32b073d70acb3874dc3ab4c3905543067a543d8', class: "login-content" }, this.subtitle && (index.h("p", { key: '42a6ec7d6c9ca0a14700bd13cbe8ee9edbbcc18b', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: 'cbb5497abd1c88fc364ac8bb7c3d356df6df0dad', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
30900
+ return (index.h(index.Host, { key: 'bcd7f30bbfeb07bbca732c5f1034bcabbd5e4f80' }, index.h("kritzel-dialog", { key: '61b5c5054d43433894747f37c571e68ecf08fc4c', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '3ddcb858b6148e8be4bd121b2bd8ca38c66e0505', class: "login-content" }, this.subtitle && (index.h("p", { key: '6f10f890af9f6025a3aa2d69f8f4d916821fd653', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: '0d043ac1ac751dc3d0a561bc16e52a2cfaffc578', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
30800
30901
  'provider-button': true,
30801
30902
  'is-loading': this.loadingProvider === provider.name,
30802
30903
  'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
@@ -30902,15 +31003,15 @@ const KritzelMasterDetail = class {
30902
31003
  const selectedItem = this.items.find(item => item.id === this.selectedItemId);
30903
31004
  const panelId = 'master-detail-panel';
30904
31005
  const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
30905
- return (index.h(index.Host, { key: 'e363142a5175b1f711cebfc98cfeedf07cd2c6c3' }, index.h("div", { key: 'eebf863ecdb4a53289cb56e14c02977375781167', class: {
31006
+ return (index.h(index.Host, { key: '0edf50b0b853633b88bf481f97f22aceba9e163e' }, index.h("div", { key: '21a0a3f81e5a60889ccd152c905cb41f52c3e037', class: {
30906
31007
  'master-detail-container': true,
30907
31008
  'is-mobile-detail-visible': this.showMobileDetail,
30908
- } }, index.h("nav", { key: '06660d3cd7de29ba46e3437169f99cb00eef1cc6', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index$1) => (index.h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index$1), class: {
31009
+ } }, index.h("nav", { key: '41f88248cc372c8cae4cb50a19edf462a01e43f2', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index$1) => (index.h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index$1), class: {
30909
31010
  'menu-item': true,
30910
31011
  'is-selected': item.id === this.selectedItemId,
30911
31012
  'is-disabled': !!item.disabled,
30912
31013
  'is-focused': index$1 === this.focusedIndex,
30913
- }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index$1), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index$1), onFocus: () => this.handleFocus(index$1), onBlur: this.handleBlur }, item.icon && (index.h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), index.h("span", { class: "menu-item-label" }, item.label), index.h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "m9 18 6-6-6-6" }))))))), index.h("div", { key: '0d6b6722ecbf64b28d27754161f861edafa3882c', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, index.h("button", { key: '3d8ac88c0f8a7a840b5560c4917d74ff910a99c8', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, index.h("kritzel-icon", { key: '03cf6ca5ea2b9d16ff21b1b38fd0b6148d35ff1f', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), index.h("slot", { key: '3323357889024c0d2126c30d976c3ece7ddd706a' })))));
31014
+ }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index$1), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index$1), onFocus: () => this.handleFocus(index$1), onBlur: this.handleBlur }, item.icon && (index.h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), index.h("span", { class: "menu-item-label" }, item.label), index.h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "m9 18 6-6-6-6" }))))))), index.h("div", { key: 'f8447facf3dfdbd7772823654847e1b90b03f73e', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, index.h("button", { key: '3edc9784267613e6b3a706739bbb537161e4c747', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, index.h("kritzel-icon", { key: 'ec0b4691735578525e5863842271366e04b13fb7', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), index.h("slot", { key: 'c21fbaff78f98859b9756427125b60504d4bb630' })))));
30914
31015
  }
30915
31016
  static get watchers() { return {
30916
31017
  "selectedItemId": [{
@@ -30983,7 +31084,7 @@ const KritzelMenu = class {
30983
31084
  this.itemCloseChildMenu.emit(event.detail);
30984
31085
  };
30985
31086
  render() {
30986
- return (index.h(index.Host, { key: '9edadb795e13a5242a0a086bd78c21f0f420e88c', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && index.h("div", { key: '4925a8698c1ac61787ba8c44beeed46461c62625', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (index.h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${item.id}`, item: item, parent: this.parent, style: { pointerEvents: this.editingMenuItem && !item.isEditing ? 'none' : 'auto' }, onItemSelect: this.handleItemSelect, onItemSave: this.handleSave, onItemCancel: this.handleCancel, onItemToggleChildMenu: this.handleToggleChildMenu, onItemCloseChildMenu: this.handleCloseChildMenu })))));
31087
+ return (index.h(index.Host, { key: '27a90a3a8549517a2d6e341a5da13496bf714970', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && index.h("div", { key: 'c0c2351fac389f6676b38481eaacee553ca6867a', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (index.h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${item.id}`, item: item, parent: this.parent, style: { pointerEvents: this.editingMenuItem && !item.isEditing ? 'none' : 'auto' }, onItemSelect: this.handleItemSelect, onItemSave: this.handleSave, onItemCancel: this.handleCancel, onItemToggleChildMenu: this.handleToggleChildMenu, onItemCloseChildMenu: this.handleCloseChildMenu })))));
30987
31088
  }
30988
31089
  };
30989
31090
  KritzelMenu.style = kritzelMenuCss();
@@ -31088,12 +31189,12 @@ const KritzelMenuItem = class {
31088
31189
  ];
31089
31190
  }
31090
31191
  render() {
31091
- return (index.h(index.Host, { key: '89e05e4ec01b4de48019a2459f625e34669b8429', tabIndex: this.item.isDisabled ? -1 : 0, class: {
31192
+ return (index.h(index.Host, { key: '9d6653a630da5a3da38291d89d6d7d59d6994e02', tabIndex: this.item.isDisabled ? -1 : 0, class: {
31092
31193
  'selected': this.item.isSelected,
31093
31194
  'editing': this.item.isEditing,
31094
31195
  'disabled': this.item.isDisabled,
31095
31196
  'child-open': this.item.isChildMenuOpen,
31096
- }, onClick: this.handleItemSelect }, index.h("div", { key: '5de01524315482194c26e4bd4969f2ead4d852ec', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
31197
+ }, onClick: this.handleItemSelect }, index.h("div", { key: '48a1678296e672c6c03fb3e1473c42d3a246d481', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
31097
31198
  }
31098
31199
  static get watchers() { return {
31099
31200
  "item": [{
@@ -31166,7 +31267,7 @@ const KritzelMoreMenu = class {
31166
31267
  this.closeMenu();
31167
31268
  };
31168
31269
  render() {
31169
- return (index.h(index.Host, { key: '4ebbcbdf3464aeeb0585b571b424375e0493c7e9', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, index.h("div", { key: '080b74a0e4e4d4a2e9dee3d23cce22ea5bed7423', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: 'b8bfb586ca544a1c6711ba76fe55246c844f7425', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, index.h("kritzel-icon", { key: 'c76314d63048ef91d24e09aab646098c15ec7edf', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: '07c10d2bdb2b0ded07206efe82bd5e1edc49d736', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: 'b5a6d63d6f8a0ffb9fae4dcab6bae276b45c46b6', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
31270
+ return (index.h(index.Host, { key: '96451062021ac2ebcb44b65384a7e9be67f1563b', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, index.h("div", { key: 'e776398742284ea6984925d4a5a99e732674d640', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: '4371b2e5cbf7d35fac09a06ee2e54cd49072929b', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, index.h("kritzel-icon", { key: '076513ce393222b6f604036ec646a8309bc3a3ac', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: 'fde8071b3199735cc7827a2d6f2eaf79d0e1b997', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '2d49ad8a228c4b55a34c388b794bfdf500fec3c8', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
31170
31271
  }
31171
31272
  };
31172
31273
  KritzelMoreMenu.style = kritzelMoreMenuCss();
@@ -31333,7 +31434,7 @@ const KritzelNumericInput = class {
31333
31434
  this.valueChange.emit(newValue);
31334
31435
  };
31335
31436
  render() {
31336
- return (index.h(index.Host, { key: 'eb766b22717d856d096bd1a4a44279f6ac994892' }, index.h("div", { key: '2394e2b2af48f560e77e7a37b34d00656b0dd344', class: "input-container" }, this.label && index.h("label", { key: 'd8889aa93d4a86fa841f4da1f0b97411ab039cb1', class: "input-label" }, this.label), index.h("div", { key: 'b55ae2edf164cdfcdda356119b148c8bfb8fbd24', class: "input-wrapper" }, index.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 }), index.h("div", { key: '82e127b045e631616e6368c437473bbf9732445d', class: "spinner-buttons" }, index.h("button", { key: 'e7412dffccbdacbb5743ae2e2e7bd33c68e6fceb', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, index.h("svg", { key: '7e471bf2bee5d4d161fea2e838b26e2f28bb84d9', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: '69e4c80eed03b2ee2a044d07f35420b7618f4e75', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("button", { key: 'a0c2350d48c398f7396cebd973438c0e390d0aff', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, index.h("svg", { key: 'c1f6264d187936d5eb0cc43c0275dc2e2c93b854', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'facbdd171b43868ec41b469b0d11d6c9bfcec3aa', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
31437
+ return (index.h(index.Host, { key: '8901e0b56ccbc344420483a4a56663f7cd74d9e8' }, index.h("div", { key: '5f3d6b5c56007e11383aa69f60f22031b0e8f332', class: "input-container" }, this.label && index.h("label", { key: '2cb102a5b6c16d068f4f304fbcc6241f79fc0ce8', class: "input-label" }, this.label), index.h("div", { key: '96441095acc3d9a8e77b6d2bac2ceda683c9c976', class: "input-wrapper" }, index.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 }), index.h("div", { key: '2071e98125a8d014513e93052bd8c1fee17932a5', class: "spinner-buttons" }, index.h("button", { key: '12422e5285dfb532dbbb6eb1a36dbcb3de50f2bc', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, index.h("svg", { key: '49ad5625c80fae6706ba4ab91f47bd550481ef74', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'ff7d19b61baeb5ba58bb60f2cc629bcec6eb4411', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("button", { key: 'e4fec28e4fc997e007127f2b30b00cc752433221', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, index.h("svg", { key: '27bf06cde8de11f4a97090911afd6b8993463112', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'ed7071dd79bfe509ebb319ce43ecb3e982dd4157', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
31337
31438
  }
31338
31439
  static get watchers() { return {
31339
31440
  "value": [{
@@ -31372,7 +31473,7 @@ const KritzelOpacitySlider = class {
31372
31473
  }
31373
31474
  render() {
31374
31475
  const percentage = this.getPercentage();
31375
- return (index.h(index.Host, { key: 'a175945928dac5ae5b4464c0b11c4d812f8a3ef6' }, index.h("div", { key: 'a045d452d459577f8d657e00dd9189797dd4de66', class: "opacity-container" }, index.h("div", { key: '11a4217a4b6e1f0b1981a8fd8e03f505a9d4a3b5', class: "slider-wrapper" }, index.h("input", { key: '2cbf72a10026c4201727208230b8832ea2309a76', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
31476
+ return (index.h(index.Host, { key: '2dadd8a7c4d1af748e91a6005433288ab231f2e8' }, index.h("div", { key: '65ae90d95bffff244d97329754cf0cb8f73331fa', class: "opacity-container" }, index.h("div", { key: '90e95347f7015882112f0653a25347e715233227', class: "slider-wrapper" }, index.h("input", { key: '15836bc089c1725062016677d3b95384d1958431', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
31376
31477
  '--slider-progress': `${percentage}%`,
31377
31478
  '--kritzel-opacity-slider-thumb-border-color': this.previewColor,
31378
31479
  } })))));
@@ -31725,7 +31826,7 @@ const KritzelPortal = class {
31725
31826
  this.portal.style.visibility = 'visible';
31726
31827
  }
31727
31828
  render() {
31728
- return (index.h(index.Host, { key: 'f919789973cd7828b393028171594d481113fb45', style: { display: this.anchor ? 'block' : 'none' } }, index.h("slot", { key: '21b837fe7162c0a0a8d01bb5c41d3736a265714c' })));
31829
+ return (index.h(index.Host, { key: '72273b4c7811473072ee27668836a5ddddcfd618', style: { display: this.anchor ? 'block' : 'none' } }, index.h("slot", { key: 'b4f37ca27c47ab950a4639162fa31a3c2362d6f7' })));
31729
31830
  }
31730
31831
  static get watchers() { return {
31731
31832
  "anchor": [{
@@ -31739,9 +31840,9 @@ const KritzelPortal = class {
31739
31840
  * This file is auto-generated by the version bump scripts.
31740
31841
  * Do not modify manually.
31741
31842
  */
31742
- const KRITZEL_VERSION = '0.4.5';
31843
+ const KRITZEL_VERSION = '0.4.7';
31743
31844
 
31744
- 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)}`;
31845
+ 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)}`;
31745
31846
 
31746
31847
  const DEFAULT_SCALE_MIN = 0.0001;
31747
31848
  const DEFAULT_SCALE_MAX = 1000;
@@ -31948,23 +32049,10 @@ const KritzelSettings = class {
31948
32049
  }));
31949
32050
  }
31950
32051
  renderCategoryContent() {
31951
- switch (this.selectedCategoryId) {
31952
- case 'general':
31953
- return (index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.general.title', 'General Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), index.h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), index.h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), index.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.')), index.h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange })))));
31954
- case 'viewport':
31955
- return (index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), index.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.')), index.h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), index.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.')), index.h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange })))));
31956
- case 'shortcuts':
31957
- return (index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), index.h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category", key: category }, index.h("h4", { class: "shortcuts-category-title" }, category), index.h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (index.h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, index.h("span", { class: "shortcut-label" }, shortcut.label), index.h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut))))))))))));
31958
- case 'developer':
31959
- return (index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.developer.title', 'Developer Options')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') })))));
31960
- case 'about':
31961
- return (index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.about.title', 'About')), index.h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), index.h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), index.h("p", { class: "version-info" }, "App-State Schema v", schema_constants.CURRENT_APP_STATE_SCHEMA_VERSION), index.h("p", { class: "version-info" }, "Workspace Schema v", schema_constants.CURRENT_WORKSPACE_SCHEMA_VERSION)));
31962
- default:
31963
- return null;
31964
- }
32052
+ return (index.h("div", { class: "settings-categories-wrapper" }, index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'general' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.general.title', 'General Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), index.h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), index.h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), index.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.')), index.h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'viewport' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), index.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.')), index.h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), index.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.')), index.h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), index.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.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'shortcuts' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), index.h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category", key: category }, index.h("h4", { class: "shortcuts-category-title" }, category), index.h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (index.h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, index.h("span", { class: "shortcut-label" }, shortcut.label), index.h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut)))))))))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'developer' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.developer.title', 'Developer Options')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'about' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.about.title', 'About')), index.h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), index.h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), index.h("p", { class: "version-info" }, "App-State Schema v", schema_constants.CURRENT_APP_STATE_SCHEMA_VERSION), index.h("p", { class: "version-info" }, "Workspace Schema v", schema_constants.CURRENT_WORKSPACE_SCHEMA_VERSION)))));
31965
32053
  }
31966
32054
  render() {
31967
- return (index.h(index.Host, { key: '1fb0bca35cb20633f017a927d39e2a66ebfb403b' }, index.h("kritzel-dialog", { key: '6366a8d8e7f65ef3f715248db3dc7c7e36dd3f4a', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: '2f4891d1ef0b3f130c591790b2e53e7264a61145', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
32055
+ return (index.h(index.Host, { key: '36bca8be04b34a37630d6aa5394595a8b394d180' }, index.h("kritzel-dialog", { key: '1e257904178fd9afa2bfbe4a758663fb366c8847', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: 'b7d9ad97d9b126ccf6e800e6c9032749635eb988', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
31968
32056
  }
31969
32057
  static get watchers() { return {
31970
32058
  "settings": [{
@@ -35204,9 +35292,9 @@ const KritzelShareDialog = class {
35204
35292
  this.dialogClosed.emit();
35205
35293
  };
35206
35294
  render() {
35207
- return (index.h(index.Host, { key: '3125a157e71a0f5e5e4762cb4069c457bd7d44f6' }, index.h("kritzel-dialog", { key: '948007c3f631ac8c6d2b163d8c41e5d85d17990e', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, index.h("div", { key: '6eda07bd40162baba728648e266d819705608990', class: "share-content" }, index.h("div", { key: 'f693904e3541b2b248ac9a965c4c65d407c63d42', class: "share-section" }, index.h("div", { key: '5d76c4944fe5e40469de2c92fdbe939936cfede7', class: "share-row" }, index.h("div", { key: '84d4cbeacaa4b83f1570ed36de8311f9c20225ed', class: "share-label-group" }, index.h("label", { key: '0b666d1b26bd7a7ec05705be97c6c01b98f3bcab', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), index.h("p", { key: '41b0df856dd7cf80f40ba8e485816a2ca794c23e', class: "share-description" }, this.internalIsPublic
35295
+ return (index.h(index.Host, { key: 'd30a468b9443f76731b207cb5caec1911f378c15' }, index.h("kritzel-dialog", { key: '4a4ec0a2becba58a49a87fc411a82e26557d8232', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, index.h("div", { key: '0b2fec3db6c039752429768fb4bd6a2150a4345e', class: "share-content" }, index.h("div", { key: 'bd0b85f8418d0c46d14b718024ed62b9f72e4f52', class: "share-section" }, index.h("div", { key: 'bf62503a593454ffacd30d532fcd79dcbf938659', class: "share-row" }, index.h("div", { key: 'dfd9e83166b886d00fb5b097d0ccd77169c011bd', class: "share-label-group" }, index.h("label", { key: '67dba950ded47a08eb006c1628d14038b18171b5', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), index.h("p", { key: '926f8670b35dab1e3e2a6496f44b5d6e0ee46417', class: "share-description" }, this.internalIsPublic
35208
35296
  ? (this.terms['share.linkSharing.enabledDescription'] ?? 'Anyone with the link can access this workspace.')
35209
- : (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '1e2a9437714bcf3d85e40f4f7a69e027f4c05e9c', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (index.h("div", { key: 'b64439cced536c440afb93eb4d674221299101ae', class: "share-section" }, index.h("div", { key: '905ddd55dfef9bb4e2388228237c49d59b633658', class: "share-url-container" }, index.h("input", { key: '62797e8efa4a918302198c8dbd6fb04bbb13d032', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: '7a018f0ec803644fefa16a3678cd32503704a3b8', class: { 'copy-button': true, 'copy-success': this.copySuccess }, onClick: this.handleCopyUrl, title: this.copySuccess ? (this.terms['share.copyLink.copied'] ?? 'Copied!') : (this.terms['share.copyLink.title'] ?? 'Copy link') }, index.h("kritzel-icon", { key: '6321962e43123c7798685821051fd33f702b9156', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (index.h("div", { key: 'db4e5c19d2ece15523a4746a84b62bb3b55177ab', class: "share-qr-container" }, index.h("img", { key: '403477b5cd526beefabc3576050d399a2520d51b', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
35297
+ : (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: 'e42fabecb37fd21cc4907b966e2f50113b945eda', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (index.h("div", { key: '40afacc81e0bbcf4c404ae32491e5142a32bca66', class: "share-section" }, index.h("div", { key: '57b6952670b1cbc789770362b573623035b50cf3', class: "share-url-container" }, index.h("input", { key: '0ee836655ca26c1e073d5d86014322939527c74b', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: '2d4661c1718bd8390dbe1146e8f9afe035934635', class: { 'copy-button': true, 'copy-success': this.copySuccess }, onClick: this.handleCopyUrl, title: this.copySuccess ? (this.terms['share.copyLink.copied'] ?? 'Copied!') : (this.terms['share.copyLink.title'] ?? 'Copy link') }, index.h("kritzel-icon", { key: 'b43bde94601c352b6065c89c026807d7efb3bcc3', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (index.h("div", { key: 'f4d657aa918abbb3cf3ed039332d8c67247b83e8', class: "share-qr-container" }, index.h("img", { key: 'b165a446df3fba87918a19928734d39af1e6bfcf', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
35210
35298
  }
35211
35299
  static get watchers() { return {
35212
35300
  "isPublic": [{
@@ -35247,7 +35335,7 @@ const KritzelSlideToggle = class {
35247
35335
  }
35248
35336
  };
35249
35337
  render() {
35250
- return (index.h(index.Host, { key: 'e132e2614dcf2c7afc51e8aa064de36ea4a84710', class: { checked: this.checked, disabled: this.disabled }, tabIndex: this.disabled ? -1 : 0, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.label, onClick: this.handleToggle, onKeyDown: this.handleKeyDown }, index.h("div", { key: 'c7857aa2b747aba1851f7df1bde3d0469898d32a', class: "toggle-track" }, index.h("div", { key: '6beb1821fdc265b4fb5d0a6813a33fb768366984', class: "toggle-thumb" }))));
35338
+ return (index.h(index.Host, { key: '00160c9cfdafa0d53f3acfb1fb235b29abf2622a', class: { checked: this.checked, disabled: this.disabled }, tabIndex: this.disabled ? -1 : 0, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.label, onClick: this.handleToggle, onKeyDown: this.handleKeyDown }, index.h("div", { key: '385008948ffbdc0f26249d2d833aae8f04eeb6a0', class: "toggle-track" }, index.h("div", { key: '43929e94335589feb24ee45f1c34a270653dd412', class: "toggle-thumb" }))));
35251
35339
  }
35252
35340
  };
35253
35341
  KritzelSlideToggle.style = kritzelSlideToggleCss();
@@ -35347,7 +35435,7 @@ const KritzelSplitButton = class {
35347
35435
  this.menuScrollTop = event.target.scrollTop;
35348
35436
  };
35349
35437
  render() {
35350
- return (index.h(index.Host, { key: 'b3b5b4a63df6e6a4bd2902716a8c26830e31127d', class: { mobile: this.isTouchDevice } }, index.h("button", { key: 'a25f723f41c1604172fa96d036eab6b80a22add5', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && index.h("kritzel-icon", { key: '6999b1baefa3c940c2a25772b0c03ab0c809cd79', name: this.buttonIcon })), index.h("div", { key: 'dcbff30cae4a73b5c214c0ae98b16c8d681b8eed', class: "split-divider" }), index.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" }, index.h("kritzel-icon", { key: '66969517639c73140a745bc189730dfa09eafa08', name: this.dropdownIcon })), index.h("kritzel-portal", { key: '197d002ea78ddb535743d6d2f872b9779dfc462b', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, index.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 }))));
35438
+ return (index.h(index.Host, { key: 'fa22dc1185ef07d8127d9ee9f6dbe482d126f934', class: { mobile: this.isTouchDevice } }, index.h("button", { key: 'a48aba702b70e9b24ad5486dde61fa9f9c8f7cdc', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && index.h("kritzel-icon", { key: '0d1c9a3e9f744541dd6ebe491105f6ee65233543', name: this.buttonIcon })), index.h("div", { key: 'c9db29f0b9c9cf1974d78f4f60be9e1b0e26c5d2', class: "split-divider" }), index.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" }, index.h("kritzel-icon", { key: 'd860cc503043425860b1234b5d34693bfdd1d5ab', name: this.dropdownIcon })), index.h("kritzel-portal", { key: 'cd6dda8869aea4205d922fc639073019bbd2b102', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, index.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 }))));
35351
35439
  }
35352
35440
  };
35353
35441
  KritzelSplitButton.style = kritzelSplitButtonCss();
@@ -35368,7 +35456,7 @@ const KritzelStrokeSize = class {
35368
35456
  }
35369
35457
  render() {
35370
35458
  const sizes = this.sizes ?? [];
35371
- return (index.h(index.Host, { key: 'a097daf527501b07874b449ac75ecb765cdd81b2' }, index.h("div", { key: '0e2b3ade9bae7d4f97d5de8ecd44424fe914f3e7', class: "size-grid" }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
35459
+ return (index.h(index.Host, { key: 'ba181d798d2bf7b60308746635d2077ce1353b83' }, index.h("div", { key: '048fc8934190359b9337747567844ca88925a6ce', class: "size-grid" }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
35372
35460
  'size-container': true,
35373
35461
  'selected': this.selectedSize === size,
35374
35462
  }, onClick: () => this.handleSizeClick(size) }, index.h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
@@ -35387,7 +35475,7 @@ const KritzelSyncIndicator = class {
35387
35475
  /** The text displayed next to the spinner. */
35388
35476
  text = 'Syncing...';
35389
35477
  render() {
35390
- return (index.h(index.Host, { key: '833aa19a39357398a9fc2d97246398b77f1b990f' }, index.h("div", { key: 'cabb31890ea7c6afdafa6427306caa19a2d8f818', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, index.h("span", { key: '086105d00156d8556d8a78cfb0cec47d65b40a1f', class: "spinner", "aria-hidden": "true" }), index.h("span", { key: '9934152bb9f55399a20112f4230c4efc1518a2e1' }, this.text))));
35478
+ return (index.h(index.Host, { key: '585d5fd13116c093e5221164e36e6e986a63da58' }, index.h("div", { key: 'd4e0d9e51db002b8ea201a0564c22916809c346d', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, index.h("span", { key: 'b82f4c363ee31ae697e435fc8eb6ce0e2f3df1ab', class: "spinner", "aria-hidden": "true" }), index.h("span", { key: 'f39e04332aaf622dad69d0e5d6b6e90ee5df3ed1' }, this.text))));
35391
35479
  }
35392
35480
  };
35393
35481
  KritzelSyncIndicator.style = kritzelSyncIndicatorCss();
@@ -35800,14 +35888,14 @@ const KritzelTooltip = class {
35800
35888
  }
35801
35889
  }
35802
35890
  render() {
35803
- return (index.h(index.Host, { key: 'c0a4b682b3279b8c830dfa758284979e91c0ce2a', style: {
35891
+ return (index.h(index.Host, { key: '227146703158aa65ecffcce348e568d559cee829', style: {
35804
35892
  position: 'fixed',
35805
35893
  zIndex: '9999',
35806
35894
  transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
35807
35895
  visibility: this.isVisible ? 'visible' : 'hidden',
35808
35896
  left: `${this.positionX}px`,
35809
35897
  bottom: `${this.positionY}px`,
35810
- } }, index.h("div", { key: '09fd259d19d42db513161b645aa19206ae81c76a', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, index.h("slot", { key: 'f743c0ca8c415d71e0af53cdab8304df60dd9a37' }))));
35898
+ } }, index.h("div", { key: '573e97ed81920066e8fbf50f790224c23b37ec21', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, index.h("slot", { key: 'c489b45928cf6720c6827df73b9eedf08bc9d5e2' }))));
35811
35899
  }
35812
35900
  static get watchers() { return {
35813
35901
  "triggerElement": [{
@@ -35848,7 +35936,7 @@ const KritzelUtilityPanel = class {
35848
35936
  this.redo.emit();
35849
35937
  }
35850
35938
  render() {
35851
- return (index.h(index.Host, { key: '0ea9faf487a37d04097ee64e080f8f9bd8e6c901' }, index.h("button", { key: 'dbd4c0972188904b4c3cbbbf46c272fde462df0d', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event), "aria-label": this.terms['utility.undo'] ?? 'Undo' }, index.h("kritzel-icon", { key: '6d7db899d6dc205d5b8dbf9404d916676e8bb345', name: "undo" })), index.h("button", { key: '290a4d9e67130b24068c0c9a958b5532492b1c03', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event), "aria-label": this.terms['utility.redo'] ?? 'Redo' }, index.h("kritzel-icon", { key: 'c88c575084ffe6df27d58d2f17e4b50253143158', name: "redo" })), index.h("div", { key: '195d4a77c76097c0e5fbe56266a3ad7ce246115f', class: "utility-separator" }), index.h("button", { key: 'c55b7a8f8e355d8ce046784a2e465ab96d5df5b7', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, index.h("kritzel-icon", { key: 'b429e334f6117c6a9c7de642e5290fb848576cd4', name: "delete" }))));
35939
+ return (index.h(index.Host, { key: '3e86e2c4c480ab56f4646a4f288ad37a63e29642' }, index.h("button", { key: 'e5282e42994f2de061ec36bf892f4da3fc01d2e5', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event), "aria-label": this.terms['utility.undo'] ?? 'Undo' }, index.h("kritzel-icon", { key: '5a2b903cc3e5f9c554928f11a1c3098d569cbc4d', name: "undo" })), index.h("button", { key: '466cdff71501f34f0236b4dc60263817966d7b4a', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event), "aria-label": this.terms['utility.redo'] ?? 'Redo' }, index.h("kritzel-icon", { key: '19209a95787f4475eda9dc0712c2bf36a573c953', name: "redo" })), index.h("div", { key: '7a463d5ac1f78017fb728abcd2c33061d8545978', class: "utility-separator" }), index.h("button", { key: '155c2bb50d70223e4f4d5377bacced56ffda68ad', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, index.h("kritzel-icon", { key: '47bd8469b9efe395e9185b3e7375c7375811c0aa', name: "delete" }))));
35852
35940
  }
35853
35941
  };
35854
35942
  KritzelUtilityPanel.style = kritzelUtilityPanelCss();
@@ -35869,7 +35957,7 @@ const KritzelWatermark = class {
35869
35957
  label;
35870
35958
  render() {
35871
35959
  const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
35872
- return (index.h(index.Host, { key: '143ea32342e30351c93751714dfd12b725ddca24' }, index.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)));
35960
+ return (index.h(index.Host, { key: '0eccc75e51c7ac199e23d8f3a871593f1fb65a17' }, index.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)));
35873
35961
  }
35874
35962
  };
35875
35963
  KritzelWatermark.style = kritzelWatermarkCss();
@@ -36057,7 +36145,7 @@ const KritzelZoomPanel = class {
36057
36145
  return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
36058
36146
  }
36059
36147
  render() {
36060
- return (index.h(index.Host, { key: 'e772e5c838c0d0372302f624e5030a7cd04353eb' }, index.h("div", { key: '69795e24e44cabd3c7ebb65f3e1e1d039fef290e', class: { panel: true, visible: this.visible } }, index.h("button", { key: 'ceade9417dc5aadb18c6312d190343a1d0538485', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, index.h("kritzel-icon", { key: 'ae45acfd6b438bc97c2a7e6b15a256d8600cd51d', name: "minus" })), index.h("span", { key: '2017b9c99989a26383123210cd402bf80a8591bd', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), index.h("button", { key: '925420fa6616b5ea1b995e07a989159b28cdbb48', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, index.h("kritzel-icon", { key: '569aec9686e6af6aa41d455d29b3eb6fad672f64', name: "plus" })))));
36148
+ return (index.h(index.Host, { key: '054e24893ed609c29b02cf574a68cf9311a3f025' }, index.h("div", { key: '42ad21dca9486ae350d5814b949e0c577a6ed996', class: { panel: true, visible: this.visible } }, index.h("button", { key: 'e360884e5a2edaada46d232cae8121f2c5f45bb6', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, index.h("kritzel-icon", { key: '8c8bb23c4ec4b78fd04aee5c0edd3371c4d14125', name: "minus" })), index.h("span", { key: '42ab93551c2fbb6d8d4ef076d66405277ba941bf', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), index.h("button", { key: '232f0f74b748999c6892549978bbe085636ca189', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, index.h("kritzel-icon", { key: '6f9b8ddd4c666573d9716d7bc455c2a3b1035ede', name: "plus" })))));
36061
36149
  }
36062
36150
  };
36063
36151
  KritzelZoomPanel.style = kritzelZoomPanelCss();