kritzel-stencil 0.4.25 → 0.4.27

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 (138) hide show
  1. package/dist/cjs/index-Xav9JFHg.js +2 -2
  2. package/dist/cjs/index.cjs.js +3 -42
  3. package/dist/cjs/{kritzel-active-users_47.cjs.entry.js → kritzel-active-users_46.cjs.entry.js} +119 -191
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{schema.constants-CjN-B633.js → schema.constants-CcvqL5nJ.js} +41 -0
  6. package/dist/cjs/stencil.cjs.js +1 -1
  7. package/dist/collection/classes/core/core.class.js +0 -4
  8. package/dist/collection/classes/structures/object-map.structure.js +0 -65
  9. package/dist/collection/collection-manifest.json +0 -1
  10. package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +4 -4
  11. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +58 -77
  12. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +16 -72
  13. package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
  14. package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
  15. package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
  16. package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
  17. package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
  18. package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
  19. package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
  20. package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
  21. package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
  22. package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
  23. package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
  24. package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
  25. package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
  26. package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
  27. package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
  28. package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
  29. package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
  30. package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
  31. package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
  32. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
  33. package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
  34. package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
  35. package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
  36. package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.css +13 -9
  37. package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
  38. package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
  39. package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
  40. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
  41. package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
  42. package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
  43. package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
  44. package/dist/collection/configs/default-sync.config.js +2 -1
  45. package/dist/collection/constants/version.js +1 -1
  46. package/dist/components/index.d.ts +0 -2
  47. package/dist/components/index.js +2 -43
  48. package/dist/components/kritzel-active-users.js +1 -1
  49. package/dist/components/kritzel-avatar.js +1 -1
  50. package/dist/components/kritzel-back-to-content.js +1 -1
  51. package/dist/components/kritzel-button.js +1 -1
  52. package/dist/components/kritzel-color-palette.js +1 -1
  53. package/dist/components/kritzel-color.js +1 -1
  54. package/dist/components/kritzel-controls.js +1 -1
  55. package/dist/components/kritzel-current-user-dialog.js +1 -1
  56. package/dist/components/kritzel-current-user.js +1 -1
  57. package/dist/components/kritzel-editor.js +140 -113
  58. package/dist/components/kritzel-engine.js +1 -1
  59. package/dist/components/kritzel-export.js +1 -1
  60. package/dist/components/kritzel-font-size.js +1 -1
  61. package/dist/components/kritzel-font.js +1 -1
  62. package/dist/components/kritzel-input.js +1 -1
  63. package/dist/components/kritzel-loading-overlay.js +1 -1
  64. package/dist/components/kritzel-login-dialog.js +1 -1
  65. package/dist/components/kritzel-master-detail.js +1 -1
  66. package/dist/components/kritzel-menu-item.js +1 -1
  67. package/dist/components/kritzel-menu.js +1 -1
  68. package/dist/components/kritzel-more-menu.js +1 -1
  69. package/dist/components/kritzel-numeric-input.js +1 -1
  70. package/dist/components/kritzel-opacity-slider.js +1 -1
  71. package/dist/components/kritzel-portal.js +1 -1
  72. package/dist/components/kritzel-settings.js +1 -1
  73. package/dist/components/kritzel-share-dialog.js +1 -1
  74. package/dist/components/kritzel-slide-toggle.js +1 -1
  75. package/dist/components/kritzel-split-button.js +1 -1
  76. package/dist/components/kritzel-stroke-size.js +1 -1
  77. package/dist/components/kritzel-tool-config.js +1 -1
  78. package/dist/components/kritzel-tooltip.js +1 -1
  79. package/dist/components/kritzel-utility-panel.js +1 -1
  80. package/dist/components/kritzel-watermark.js +1 -1
  81. package/dist/components/kritzel-workspace-manager.js +1 -1
  82. package/dist/components/kritzel-zoom-panel.js +1 -1
  83. package/dist/components/p-4uoSa0Xl.js +43 -0
  84. package/dist/components/{p-fL9rl200.js → p-B38_9BJg.js} +1 -1
  85. package/dist/components/{p-eZXIu4yK.js → p-BPzdPKWE.js} +3 -3
  86. package/dist/components/{p-0fhjWRmT.js → p-BTo2cQZ9.js} +5 -5
  87. package/dist/components/{p-BoN700-O.js → p-Ba0c-tu2.js} +2 -2
  88. package/dist/components/{p-B-585egz.js → p-BeSKOETx.js} +2 -2
  89. package/dist/components/{p-2WiGyky4.js → p-BprEDRpA.js} +2 -2
  90. package/dist/components/{p-B5SWPDuq.js → p-C0FEC_gS.js} +1 -1
  91. package/dist/components/{p-BrNsOp2v.js → p-CAXR5-S9.js} +4 -4
  92. package/dist/components/{p-BPsKYMH6.js → p-CBrn5AIB.js} +1 -1
  93. package/dist/components/{p-gJcH-huF.js → p-CYwoBiqy.js} +57 -112
  94. package/dist/components/{p-C98Eb3_R.js → p-Ce1j1-Hg.js} +3 -3
  95. package/dist/components/{p-DDTMGbtA.js → p-CeffYwAK.js} +15 -15
  96. package/dist/components/{p-CwZ3KKFq.js → p-ChPs27Fd.js} +3 -3
  97. package/dist/components/{p-D1rjfWgJ.js → p-CoXN583u.js} +3 -3
  98. package/dist/components/{p-DwMqCX2P.js → p-CucCT7Qn.js} +2 -2
  99. package/dist/components/{p-vqEUQ-4Q.js → p-D0Ed8epW.js} +3 -3
  100. package/dist/components/{p-DBqoPgev.js → p-DFMZEarE.js} +1 -1
  101. package/dist/components/{p-DtnMdWWB.js → p-DK0anxtL.js} +1 -1
  102. package/dist/components/{p-4SPnZZkH.js → p-DN9p3G9K.js} +3 -3
  103. package/dist/components/{p-Dt7-I2Xz.js → p-DOTdJ3JQ.js} +2 -2
  104. package/dist/components/{p-HoO86l1o.js → p-DOl-95VY.js} +6 -6
  105. package/dist/components/{p-DKGg-76-.js → p-DTB3ykgO.js} +1 -1
  106. package/dist/components/{p-CzW58DHM.js → p-DUmLsjKb.js} +1 -1
  107. package/dist/components/{p-Czhdc844.js → p-D_cyY7Nd.js} +1 -1
  108. package/dist/components/{p-CF8pLc07.js → p-DhabvHJM.js} +3 -3
  109. package/dist/components/{p-CaBbajU2.js → p-DkHYY72B.js} +2 -2
  110. package/dist/components/{p-CrHvaLRV.js → p-DnmVD1Mz.js} +1 -1
  111. package/dist/components/{p-GKmqCI8r.js → p-DoxFuOy1.js} +2 -2
  112. package/dist/components/{p-dsxHDlQ3.js → p-Dpm75DfV.js} +2 -2
  113. package/dist/components/{p-BozrueXV.js → p-Dvn6ad4a.js} +1 -1
  114. package/dist/components/{p-PjPPCHVL.js → p-NOWtUeeQ.js} +1 -1
  115. package/dist/components/{p-DVXTPI71.js → p-OUl5CA4Y.js} +1 -1
  116. package/dist/esm/index-Dhio9uis.js +2 -2
  117. package/dist/esm/index.js +4 -43
  118. package/dist/esm/{kritzel-active-users_47.entry.js → kritzel-active-users_46.entry.js} +120 -191
  119. package/dist/esm/loader.js +1 -1
  120. package/dist/esm/{schema.constants-DfvqHmxc.js → schema.constants-De_S50eB.js} +41 -1
  121. package/dist/esm/stencil.js +1 -1
  122. package/dist/stencil/index.esm.js +4 -43
  123. package/dist/stencil/{p-DfvqHmxc.js → p-De_S50eB.js} +41 -1
  124. package/dist/stencil/{p-dc5783ee.entry.js → p-f91efb01.entry.js} +120 -191
  125. package/dist/stencil/stencil.esm.js +1 -1
  126. package/dist/types/classes/structures/object-map.structure.d.ts +0 -14
  127. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +8 -6
  128. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +3 -10
  129. package/dist/types/components.d.ts +5 -80
  130. package/dist/types/constants/version.d.ts +1 -1
  131. package/package.json +1 -1
  132. package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.css +0 -50
  133. package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.js +0 -66
  134. package/dist/components/kritzel-sync-indicator.d.ts +0 -11
  135. package/dist/components/kritzel-sync-indicator.js +0 -6
  136. package/dist/components/p-CAoN_STZ.js +0 -39
  137. package/dist/components/p-DB58Oa5V.js +0 -43
  138. package/dist/types/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.d.ts +0 -7
@@ -239,15 +239,12 @@ export class KritzelEditor {
239
239
  isWorkspaceManagerVisible = true;
240
240
  isMoreMenuVisible = true;
241
241
  isZoomPanelVisible = true;
242
- isObjectDistanceFadingActive = false;
243
242
  syncConfig = DEFAULT_SYNC_CONFIG;
244
243
  assetStorageConfig = DEFAULT_ASSET_STORAGE_CONFIG;
245
244
  /** The element to use as the target for the cursor. Defaults to the editor container if not set. */
246
245
  cursorTarget;
247
246
  /** Optional login configuration. When provided, a "Sign in" button is shown that opens a login dialog with the configured providers. */
248
247
  loginConfig;
249
- /** Whether the editor is in a loading state. When true, a loading overlay is displayed. */
250
- isLoading = false;
251
248
  /** Optional unique identifier for namespacing storage keys across multiple editor instances. */
252
249
  editorId;
253
250
  /** Optional workspace ID to set as active. If provided, the editor will automatically activate the workspace with this ID. */
@@ -266,7 +263,6 @@ export class KritzelEditor {
266
263
  login;
267
264
  isPublicChange;
268
265
  awarenessChange;
269
- isSyncing;
270
266
  isEngineReady = false;
271
267
  isControlsReady = false;
272
268
  isWorkspaceManagerReady = false;
@@ -289,7 +285,11 @@ export class KritzelEditor {
289
285
  normalizedControls = [];
290
286
  resolvedMoreMenuItems = [];
291
287
  isLoadingOverlayVisible = false;
292
- isSyncingIndicatorVisible = false;
288
+ loadingOverlayShowTimeout;
289
+ loadingOverlayHideTimeout;
290
+ loadingOverlayShownTimestamp;
291
+ loadingOverlayDelayMs = 300;
292
+ loadingOverlayMinDisplayDurationMs = 400;
293
293
  notificationDismissTimeout;
294
294
  notificationDismissAnimationTimeout;
295
295
  notificationDisplayDurationMs = 5000;
@@ -669,6 +669,8 @@ export class KritzelEditor {
669
669
  this.setOsSpecificCssVariables();
670
670
  }
671
671
  disconnectedCallback() {
672
+ this.clearLoadingOverlayShowTimer();
673
+ this.clearLoadingOverlayHideTimer();
672
674
  this.clearNotificationDismissTimer();
673
675
  this.clearNotificationDismissAnimationTimer();
674
676
  }
@@ -772,11 +774,6 @@ export class KritzelEditor {
772
774
  event.stopPropagation();
773
775
  this.awarenessChange.emit(event.detail);
774
776
  }
775
- handleIsSyncingChange(event) {
776
- event.stopPropagation();
777
- this.isSyncingIndicatorVisible = event.detail;
778
- this.isSyncing.emit(event.detail);
779
- }
780
777
  handleNotificationsChange(event) {
781
778
  event.stopPropagation();
782
779
  this.clearNotificationDismissAnimationTimer();
@@ -789,6 +786,46 @@ export class KritzelEditor {
789
786
  event.stopPropagation();
790
787
  this.contextMenuState = event.detail.isVisible ? event.detail : undefined;
791
788
  }
789
+ handleIsLoadingChange(event) {
790
+ console.log('isLoadingChange event:', event.detail);
791
+ event.stopPropagation();
792
+ this.clearLoadingOverlayShowTimer();
793
+ this.clearLoadingOverlayHideTimer();
794
+ if (event.detail) {
795
+ this.loadingOverlayShowTimeout = setTimeout(() => {
796
+ this.isLoadingOverlayVisible = true;
797
+ this.loadingOverlayShownTimestamp = Date.now();
798
+ this.loadingOverlayShowTimeout = undefined;
799
+ }, this.loadingOverlayDelayMs);
800
+ return;
801
+ }
802
+ if (this.isLoadingOverlayVisible && this.loadingOverlayShownTimestamp !== undefined) {
803
+ const elapsed = Date.now() - this.loadingOverlayShownTimestamp;
804
+ const remaining = this.loadingOverlayMinDisplayDurationMs - elapsed;
805
+ if (remaining > 0) {
806
+ this.loadingOverlayHideTimeout = setTimeout(() => {
807
+ this.isLoadingOverlayVisible = false;
808
+ this.loadingOverlayShownTimestamp = undefined;
809
+ this.loadingOverlayHideTimeout = undefined;
810
+ }, remaining);
811
+ return;
812
+ }
813
+ }
814
+ this.isLoadingOverlayVisible = false;
815
+ this.loadingOverlayShownTimestamp = undefined;
816
+ }
817
+ clearLoadingOverlayShowTimer() {
818
+ if (this.loadingOverlayShowTimeout) {
819
+ clearTimeout(this.loadingOverlayShowTimeout);
820
+ this.loadingOverlayShowTimeout = undefined;
821
+ }
822
+ }
823
+ clearLoadingOverlayHideTimer() {
824
+ if (this.loadingOverlayHideTimeout) {
825
+ clearTimeout(this.loadingOverlayHideTimeout);
826
+ this.loadingOverlayHideTimeout = undefined;
827
+ }
828
+ }
792
829
  handleContextMenuActionSelected(event) {
793
830
  const contextMenuState = this.contextMenuState;
794
831
  if (!contextMenuState || !event.detail.action) {
@@ -1090,40 +1127,40 @@ export class KritzelEditor {
1090
1127
  const isLoggedIn = this.isLoggedIn;
1091
1128
  const shouldShowCurrentUser = isLoggedIn;
1092
1129
  const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
1093
- return (h(Host, { key: 'a24350a0c12d99ccb0d0ec3ab5975d0f1bf7f861' }, h("div", { key: 'bd7029567aeef8cba5290c2bf9937db1af113475', class: "editor-content", style: {
1130
+ return (h(Host, { key: '247f9ad977943d29333094737c8904253ccab5c7' }, h("div", { key: 'e14e57a04ca7138690a4893f2ac14140e0532fd2', class: "editor-content", style: {
1094
1131
  opacity: this.isEditorVisible ? '1' : '0',
1095
1132
  visibility: this.isEditorVisible ? 'visible' : 'hidden',
1096
1133
  transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
1097
- } }, h("div", { key: 'f628dbd94d88c9bdb313a59d73ce86302c90e375', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: '5a82d054da31e47d3f8b5c6c403949a5fb97b9dd', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: 'a5bccef36c8a49ef2cb7ec029def1c7ba71d1c31', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: 'c5c359b199528dd7b1b64a6a32ef349037357c5a', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: 'a41cd6c67c56626c2b6f0eb12193af1f80d6a254', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: 'fb49769368ddf0fc74998a96dd26dc446ff2b386', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), this.contextMenuState && this.contextMenuState.items.length > 0 && (h("kritzel-context-menu", { key: '56f38790f477d08761d7542ed3794c52f1f73815', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
1134
+ } }, h("div", { key: 'd9304408c6336c4b742b0e44d4a6d4dda5b2fad6', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'f44ca859cd70828c77a92607cbe5b9c26fd4a203', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: '1c65e5fbcc34dd43b7986f6177b8eab2bd709ad8', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: '2f7715f5c7c128ec63f2fe60c508543db7dd571c', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: '357014e172134af3a3d35af9978d14d23fadf7e3', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: '3962a562a8fc10b2bbdc1c8dd741a057e9e6df29', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), this.contextMenuState && this.contextMenuState.items.length > 0 && (h("kritzel-context-menu", { key: '669e6dae09d52e87dc22aa536f6f564f725f6c34', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
1098
1135
  position: 'absolute',
1099
1136
  left: `${this.contextMenuState.position.x}px`,
1100
1137
  top: `${this.contextMenuState.position.y}px`,
1101
1138
  zIndex: '10002',
1102
- }, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-sync-indicator", { key: '4957b8bae0d7087d586c9d0c6da82cae905d7d08', visible: this.isSyncingIndicatorVisible, text: "Syncing..." }), h("kritzel-loading-overlay", { key: 'e2e99dc452245a2edf7a575ea5fb60aa91be20df', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), h("kritzel-engine", { key: 'fcebe1cc1237c8649461f03679f9c76c05dde9c4', ref: el => {
1139
+ }, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-loading-overlay", { key: '40a32849c45b9b8240b3be427579cb6a6c63fa97', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), h("kritzel-engine", { key: '424ec83a0e8e9c8174cd12439fff2b49898b8016', ref: el => {
1103
1140
  if (el) {
1104
1141
  this.engineRef = el;
1105
1142
  }
1106
- }, 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), onIsSyncing: event => this.handleIsSyncingChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event), onLoadingChange: event => (this.isLoadingOverlayVisible = event.detail) }), h("kritzel-controls", { key: '72b1a3f80bfedb3843d0d54159ad47793db69977', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
1143
+ }, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, 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), onIsLoadingChange: event => this.handleIsLoadingChange(event) }), h("kritzel-controls", { key: 'e224d9cde14effc67b07f1f18597f45e3dc6d808', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
1107
1144
  if (el) {
1108
1145
  this.controlsRef = el;
1109
1146
  }
1110
- }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '1684a320f1806ae9fdfcfcff115d01f5788737e7', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: '8e85652ded70df043d79c9cd73b226aaefa5d6d4', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: 'a836056bdae11324f4ce79da4b991281c1985358', class: "top-right-buttons" }, h("kritzel-settings", { key: 'e68f4e79bc053e03dc37c18ee153758d284b0d34', ref: el => {
1147
+ }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '767b369fd2b55329d953d8c55ea897c35b921584', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: 'abaa0a55d433fa1740071f32f8dfc1854c6ed157', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: 'eb9e71d97b2b4663f02a17022494d353fa4f877e', class: "top-right-buttons" }, h("kritzel-settings", { key: '10ef2f68f90a6ceb3ce0a3110245c58da7ee2492', ref: el => {
1111
1148
  if (el) {
1112
1149
  this.settingsRef = el;
1113
1150
  }
1114
- }, 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) }), h("kritzel-export", { key: 'f1e9ea467d11b55dbe75d8b0252fd7f5ed37a1a2', ref: el => {
1151
+ }, 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) }), h("kritzel-export", { key: 'd72b5006a608570c26a2981d03f4d15e9b0c8b30', ref: el => {
1115
1152
  if (el) {
1116
1153
  this.exportRef = el;
1117
1154
  }
1118
- }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '01bb56bd37bc22e82be5a1175f597cdf724c4834', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '5470ef356a4d6332b380e8c75f02f0fccbe861cc', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '229551b18f0443944a96f7b8e833ff1aefb001f4', ref: el => {
1155
+ }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: 'cceafd7ae3f289edb351af4e614afca2385e196a', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '042fc9ce8487ea463f0ee77a5749786ed2931f07', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '7cce7677fbae0a1b897b2135f50e017df5409d32', ref: el => {
1119
1156
  if (el) {
1120
1157
  this.currentUserDialogRef = el;
1121
1158
  }
1122
- }, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && h("kritzel-button", { key: '3d9a8ebbe62084e94348265f1f883bc80e625d9c', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), h("kritzel-more-menu", { key: '9f7f763c330b27068bc371d98eb22a80adbf359e', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: 'c60b860e22394a44270285dea45f02305a05c545', ref: el => {
1159
+ }, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && h("kritzel-button", { key: '97cf48d83804dfa5220ce38500af3f96687354d2', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), h("kritzel-more-menu", { key: '40a757fe355666e9306f2224d9ed9bf2c9b58f7a', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: 'abb85b65a9d6196be701d35cbdf8bc3003d36bfe', ref: el => {
1123
1160
  if (el) {
1124
1161
  this.shareDialogRef = el;
1125
1162
  }
1126
- }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '84d0fab11722a7be1d5824b3284f000502277dfc', ref: el => {
1163
+ }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '6e8c86420a447b182bcbc23415d64a7fcb32a4a8', ref: el => {
1127
1164
  if (el) {
1128
1165
  this.loginDialogRef = el;
1129
1166
  }
@@ -1791,26 +1828,6 @@ export class KritzelEditor {
1791
1828
  "attribute": "is-zoom-panel-visible",
1792
1829
  "defaultValue": "true"
1793
1830
  },
1794
- "isObjectDistanceFadingActive": {
1795
- "type": "boolean",
1796
- "mutable": false,
1797
- "complexType": {
1798
- "original": "boolean",
1799
- "resolved": "boolean",
1800
- "references": {}
1801
- },
1802
- "required": false,
1803
- "optional": false,
1804
- "docs": {
1805
- "tags": [],
1806
- "text": ""
1807
- },
1808
- "getter": false,
1809
- "setter": false,
1810
- "reflect": false,
1811
- "attribute": "is-object-distance-fading-active",
1812
- "defaultValue": "false"
1813
- },
1814
1831
  "syncConfig": {
1815
1832
  "type": "unknown",
1816
1833
  "mutable": false,
@@ -1834,7 +1851,7 @@ export class KritzelEditor {
1834
1851
  },
1835
1852
  "getter": false,
1836
1853
  "setter": false,
1837
- "defaultValue": "{\n providers: [],\n}"
1854
+ "defaultValue": "{\n providers: [IndexedDBSyncProvider],\n}"
1838
1855
  },
1839
1856
  "assetStorageConfig": {
1840
1857
  "type": "unknown",
@@ -1907,26 +1924,6 @@ export class KritzelEditor {
1907
1924
  "getter": false,
1908
1925
  "setter": false
1909
1926
  },
1910
- "isLoading": {
1911
- "type": "boolean",
1912
- "mutable": false,
1913
- "complexType": {
1914
- "original": "boolean",
1915
- "resolved": "boolean",
1916
- "references": {}
1917
- },
1918
- "required": false,
1919
- "optional": false,
1920
- "docs": {
1921
- "tags": [],
1922
- "text": "Whether the editor is in a loading state. When true, a loading overlay is displayed."
1923
- },
1924
- "getter": false,
1925
- "setter": false,
1926
- "reflect": false,
1927
- "attribute": "is-loading",
1928
- "defaultValue": "false"
1929
- },
1930
1927
  "editorId": {
1931
1928
  "type": "string",
1932
1929
  "mutable": false,
@@ -1988,8 +1985,7 @@ export class KritzelEditor {
1988
1985
  "contextMenuState": {},
1989
1986
  "normalizedControls": {},
1990
1987
  "resolvedMoreMenuItems": {},
1991
- "isLoadingOverlayVisible": {},
1992
- "isSyncingIndicatorVisible": {}
1988
+ "isLoadingOverlayVisible": {}
1993
1989
  };
1994
1990
  }
1995
1991
  static get events() {
@@ -2296,21 +2292,6 @@ export class KritzelEditor {
2296
2292
  }
2297
2293
  }
2298
2294
  }
2299
- }, {
2300
- "method": "isSyncing",
2301
- "name": "isSyncing",
2302
- "bubbles": true,
2303
- "cancelable": true,
2304
- "composed": true,
2305
- "docs": {
2306
- "tags": [],
2307
- "text": ""
2308
- },
2309
- "complexType": {
2310
- "original": "boolean",
2311
- "resolved": "boolean",
2312
- "references": {}
2313
- }
2314
2295
  }];
2315
2296
  }
2316
2297
  static get methods() {
@@ -219,11 +219,6 @@ export class KritzelEngine {
219
219
  isPanningEnabled = true;
220
220
  /** When false, Ctrl+wheel events do not zoom the viewport. */
221
221
  isZoomingEnabled = true;
222
- /** External loading state. Combined with internal workspace-loading state to drive the overlay. */
223
- isLoading = false;
224
- onIsLoadingChange() {
225
- this.syncLoadingState();
226
- }
227
222
  /** Emitted when the engine has fully initialized and is ready for interaction. */
228
223
  isEngineReady;
229
224
  /** Emitted when the active drawing tool changes. */
@@ -252,14 +247,12 @@ export class KritzelEngine {
252
247
  viewportChange;
253
248
  /** Emitted when the awareness state changes (remote user cursors, presence). */
254
249
  awarenessChange;
255
- /** Emitted when a remote sync starts (`true`, data differs from the local copy) or finishes (`false`). */
256
- isSyncing;
257
250
  /** Emitted when notifications change. */
258
251
  notificationsChange;
259
252
  /** Emitted when context-menu visibility, items, or position changes. */
260
253
  contextMenuStateChange;
261
- /** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
262
- loadingChange;
254
+ /** Emitted while the selected workspace's objects are being initialized and synchronized. */
255
+ isLoadingChange;
263
256
  forceUpdate = 0;
264
257
  /** Manually triggers the `objectsSelectionChange` event. */
265
258
  async triggerSelectionChange() {
@@ -1837,7 +1830,6 @@ export class KritzelEngine {
1837
1830
  _syncInitPromise = null;
1838
1831
  _syncConfigRevision = 0;
1839
1832
  _assetStorageConfigRevision = 0;
1840
- _isWorkspaceLoading = false;
1841
1833
  _hasLoggedUnlicensedWelcomeBanner = false;
1842
1834
  _previousVisibleCustomElements = new Set();
1843
1835
  _revealedImageKeys = new Set();
@@ -1856,9 +1848,12 @@ export class KritzelEngine {
1856
1848
  _objectDistanceFadeCloseStartScale = 2;
1857
1849
  _objectDistanceFadeCloseMaxScale = 4;
1858
1850
  _objectDistanceFadeCloseMinOpacity = 0;
1859
- syncLoadingState() {
1860
- this.core.store.state.isLoading = this._isWorkspaceLoading || this.isLoading;
1861
- this.loadingChange.emit(this.core.store.state.isLoading);
1851
+ setLoadingState(isLoading) {
1852
+ if (this.core.store.state.isLoading === isLoading) {
1853
+ return;
1854
+ }
1855
+ this.core.store.state.isLoading = isLoading;
1856
+ this.isLoadingChange.emit(isLoading);
1862
1857
  }
1863
1858
  isNetworkAvailable() {
1864
1859
  return typeof navigator !== 'undefined' && navigator.onLine;
@@ -2003,8 +1998,6 @@ export class KritzelEngine {
2003
1998
  this.core.store.state.debugInfo = this.debugInfo;
2004
1999
  this.core.assetResolver.setShowInfo(this.debugInfo.showAssetResolverInfo);
2005
2000
  }
2006
- this._isWorkspaceLoading = true;
2007
- this.syncLoadingState();
2008
2001
  }
2009
2002
  async componentDidLoad() {
2010
2003
  setTimeout(async () => {
@@ -2142,15 +2135,7 @@ export class KritzelEngine {
2142
2135
  if (!this.core.appStateMap.hasNetworkSyncProvider || !this.isNetworkAvailable()) {
2143
2136
  return;
2144
2137
  }
2145
- this._isWorkspaceLoading = true;
2146
- this.syncLoadingState();
2147
- try {
2148
- await this.core.appStateMap.whenNetworkSynced();
2149
- }
2150
- finally {
2151
- this._isWorkspaceLoading = false;
2152
- this.syncLoadingState();
2153
- }
2138
+ await this.core.appStateMap.whenNetworkSynced();
2154
2139
  }
2155
2140
  resolveStartupWorkspace() {
2156
2141
  if (this.activeWorkspaceId) {
@@ -2199,21 +2184,21 @@ export class KritzelEngine {
2199
2184
  await this._workspaceInitializationPromise;
2200
2185
  return;
2201
2186
  }
2202
- this._isWorkspaceLoading = true;
2203
- this.syncLoadingState();
2187
+ this.setLoadingState(true);
2204
2188
  const initializationPromise = this.core.initializeWorkspace(workspace, options);
2189
+ const objectsMap = this.core.store.objects;
2205
2190
  this._workspaceInitializationPromise = initializationPromise;
2206
2191
  this._workspaceInitializationTargetKey = targetKey;
2207
2192
  try {
2208
2193
  await initializationPromise;
2194
+ await objectsMap?.whenNetworkSynced();
2209
2195
  }
2210
2196
  finally {
2211
2197
  // Only the most recent init clears loading state to prevent race conditions
2212
2198
  if (this._workspaceInitializationPromise === initializationPromise) {
2213
2199
  this._workspaceInitializationPromise = null;
2214
2200
  this._workspaceInitializationTargetKey = null;
2215
- this._isWorkspaceLoading = false;
2216
- this.syncLoadingState();
2201
+ this.setLoadingState(false);
2217
2202
  }
2218
2203
  }
2219
2204
  }
@@ -2250,9 +2235,6 @@ export class KritzelEngine {
2250
2235
  emitAwarenessChange(states) {
2251
2236
  this.awarenessChange.emit(states);
2252
2237
  }
2253
- emitIsSyncing(isSyncing) {
2254
- this.isSyncing.emit(isSyncing);
2255
- }
2256
2238
  emitObjectsInViewportChange() {
2257
2239
  const visibleObjects = this.core.store.objectsInViewport;
2258
2240
  this.objectsInViewportChange.emit(visibleObjects);
@@ -3445,26 +3427,6 @@ export class KritzelEngine {
3445
3427
  "reflect": false,
3446
3428
  "attribute": "is-zooming-enabled",
3447
3429
  "defaultValue": "true"
3448
- },
3449
- "isLoading": {
3450
- "type": "boolean",
3451
- "mutable": false,
3452
- "complexType": {
3453
- "original": "boolean",
3454
- "resolved": "boolean",
3455
- "references": {}
3456
- },
3457
- "required": false,
3458
- "optional": false,
3459
- "docs": {
3460
- "tags": [],
3461
- "text": "External loading state. Combined with internal workspace-loading state to drive the overlay."
3462
- },
3463
- "getter": false,
3464
- "setter": false,
3465
- "reflect": false,
3466
- "attribute": "is-loading",
3467
- "defaultValue": "false"
3468
3430
  }
3469
3431
  };
3470
3432
  }
@@ -3775,21 +3737,6 @@ export class KritzelEngine {
3775
3737
  }
3776
3738
  }
3777
3739
  }
3778
- }, {
3779
- "method": "isSyncing",
3780
- "name": "isSyncing",
3781
- "bubbles": true,
3782
- "cancelable": true,
3783
- "composed": true,
3784
- "docs": {
3785
- "tags": [],
3786
- "text": "Emitted when a remote sync starts (`true`, data differs from the local copy) or finishes (`false`)."
3787
- },
3788
- "complexType": {
3789
- "original": "boolean",
3790
- "resolved": "boolean",
3791
- "references": {}
3792
- }
3793
3740
  }, {
3794
3741
  "method": "notificationsChange",
3795
3742
  "name": "notificationsChange",
@@ -3835,14 +3782,14 @@ export class KritzelEngine {
3835
3782
  }
3836
3783
  }
3837
3784
  }, {
3838
- "method": "loadingChange",
3839
- "name": "loadingChange",
3785
+ "method": "isLoadingChange",
3786
+ "name": "isLoadingChange",
3840
3787
  "bubbles": true,
3841
3788
  "cancelable": true,
3842
3789
  "composed": true,
3843
3790
  "docs": {
3844
3791
  "tags": [],
3845
- "text": "Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes."
3792
+ "text": "Emitted while the selected workspace's objects are being initialized and synchronized."
3846
3793
  },
3847
3794
  "complexType": {
3848
3795
  "original": "boolean",
@@ -6220,9 +6167,6 @@ export class KritzelEngine {
6220
6167
  }, {
6221
6168
  "propName": "debugInfo",
6222
6169
  "methodName": "onDebugInfoChange"
6223
- }, {
6224
- "propName": "isLoading",
6225
- "methodName": "onIsLoadingChange"
6226
6170
  }];
6227
6171
  }
6228
6172
  static get listeners() {
@@ -19,7 +19,7 @@ export class KritzelWatermark {
19
19
  label;
20
20
  render() {
21
21
  const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
22
- return (h(Host, { key: 'ae00d98f16912afcb7a90d47a9fc4d55fc7468f0' }, h("a", { key: '8781f94c9efe44b0e7a7a8c20a119160cb9feb8e', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
22
+ return (h(Host, { key: '297a488f26fd8637da8d00b98af85cfeda5b0992' }, h("a", { key: '6e3be65773dfda06e9b7ae611cfbb5ff09ba1f91', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
23
23
  }
24
24
  static get is() { return "kritzel-watermark"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -81,16 +81,16 @@ export class KritzelAvatar {
81
81
  height: `${this.size}px`,
82
82
  fontSize: `${Math.round(this.size * 0.4)}px`,
83
83
  };
84
- return (h(Host, { key: '90ce966bb2a374e68c544906c8c746df6cc01038', style: containerStyles, class: {
84
+ return (h(Host, { key: 'f199b56955b749b868ad8e7940ef3114f1109c37', style: containerStyles, class: {
85
85
  'has-image': !!showImage,
86
86
  'has-initials': !!showInitials,
87
87
  'has-default': !!showDefaultIcon,
88
- }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '6799f4ad45c7d40ebaf640f191171ed6a5f14ae9', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
88
+ }, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '621a58cc965cf6d037f8515e1263bd5bf4098ab0', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
89
89
  if (el) {
90
90
  el.referrerPolicy = 'no-referrer';
91
91
  el.crossOrigin = 'anonymous';
92
92
  }
93
- }, onError: this.handleImageError })), showInitials && (h("span", { key: '98cdcda64b900994b61a03179be9f2af17c489e8', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '64e6a6ee67017c927dce0b51810a5bb02fc0d6d1', class: "avatar-default" }, h("svg", { key: '42f99637a3c23aaf10fa7c99753347ede1d518c0', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '28b52a68b36e98b0e14891fd225457be65f1bb46', 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" }))))));
93
+ }, onError: this.handleImageError })), showInitials && (h("span", { key: '28ff2e8b191c2d476c0f40dd57a2c8ec330ba104', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: 'd2ef56b2fca2a609b5b99bb8d7e8747308ab9699', class: "avatar-default" }, h("svg", { key: '1c1d6e6e306a9938f559016eeb77a67aae42f536', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '2c6af53101c20e137756d1194a3bac04c931066d', 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" }))))));
94
94
  }
95
95
  static get is() { return "kritzel-avatar"; }
96
96
  static get encapsulation() { return "shadow"; }
@@ -15,11 +15,11 @@ export class KritzelButton {
15
15
  this.buttonClick.emit();
16
16
  };
17
17
  render() {
18
- return (h(Host, { key: '51621006f6b085db2b43accf52192f0674d2c50c' }, h("button", { key: '01ab2d96abe5ad34285e59f6fec66f6b21e91849', type: this.type, class: {
18
+ return (h(Host, { key: 'b7d78dad25d41116ac6368c1ff2cd41ee28d9cdc' }, h("button", { key: '88cfd3674e63cd82ea5874205237415a540307b6', type: this.type, class: {
19
19
  'kritzel-button': true,
20
20
  [this.variant]: true,
21
21
  'disabled': this.disabled,
22
- }, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '4b085139ea85ad9f836059f4cf2dde15b948e0e2' }))));
22
+ }, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: 'a7f4fd923800f66bc7ea438f2cbcdfde81b11ae1' }))));
23
23
  }
24
24
  static get is() { return "kritzel-button"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -38,13 +38,13 @@ export class KritzelColorComponent {
38
38
  render() {
39
39
  const resolvedColor = this.resolveColor();
40
40
  const isColorVeryLight = this.isLightColor(resolvedColor);
41
- return (h(Host, { key: 'e797bfa6a2aed82d1913ec2f02f8b25a063564e5' }, h("div", { key: '5b62fcdbb2985b90fe0d7c7b65b507ec1c55e240', class: "checkerboard-bg", style: {
41
+ return (h(Host, { key: '17b5c44e1defe8f3fb41632391be093a12bb899b' }, h("div", { key: '545f4c4fd62dea22a4a5f36108a51d30c57f2652', class: "checkerboard-bg", style: {
42
42
  width: `${this.size}px`,
43
43
  height: `${this.size}px`,
44
44
  borderRadius: '50%',
45
45
  display: 'inline-block',
46
46
  position: 'relative',
47
- } }, h("div", { key: '2d62717ebf81be93219ebda7071c0ba992d7441a', class: {
47
+ } }, h("div", { key: 'bbcb68f6e5f00d9a33b316d52ac86e49911e463c', class: {
48
48
  'color-circle': true,
49
49
  'white': isColorVeryLight,
50
50
  }, style: {
@@ -33,7 +33,7 @@ export class KritzelColorPalette {
33
33
  render() {
34
34
  const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
35
35
  const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
36
- return (h(Host, { key: '9a637b3a6946384a889f54dc3a635da7ff014439' }, h("div", { key: '4db8bbc7a234bfed26b60ed306a5f999875e2195', class: {
36
+ return (h(Host, { key: '5f25a2ead76106ba2ef9762b4d212d5a9d7ac2a8' }, h("div", { key: '764cc6a55cc1865aaf1c501ee89a161f74fefa1c', class: {
37
37
  'color-grid': true,
38
38
  'expanded': this.isExpanded,
39
39
  }, style: {
@@ -4,7 +4,7 @@ export class KritzelFont {
4
4
  size = 24;
5
5
  color = '#000000';
6
6
  render() {
7
- return (h(Host, { key: '42f058426e2afcc49c788f2385e23a5ff153e77c' }, h("div", { key: '962dfc48ba84c5f5d2b98eb2464c69c04764ab0f', class: "font-preview", style: {
7
+ return (h(Host, { key: '08ef3f41967f34f17cbbc42982b0edbb59edb2e2' }, h("div", { key: 'dc7b64d53dbee634a2da068c618a352e6b43bea7', class: "font-preview", style: {
8
8
  fontFamily: this.fontFamily,
9
9
  fontSize: `${this.size}px`,
10
10
  color: this.color
@@ -17,7 +17,7 @@ export class KritzelFontSize {
17
17
  render() {
18
18
  const color = 'var(--kritzel-global-text-primary)';
19
19
  const sizes = this.sizes ?? [];
20
- return (h(Host, { key: '9d6592f049c25e9dfa2f6f3a270feb2440aa7f35' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
20
+ return (h(Host, { key: 'c49be084faa8b5eb380ba9bc3382ba8404853e20' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
21
21
  'size-container': true,
22
22
  'selected': this.selectedSize === size,
23
23
  }, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
@@ -28,7 +28,7 @@ export class KritzelInput {
28
28
  this.valueChange.emit(input.value);
29
29
  };
30
30
  render() {
31
- return (h(Host, { key: 'a4d86101322da32c87a62ac8bb05edb7015ede2a' }, h("div", { key: 'abc5b007af0f6f9353e0b680636c92813ee1ef49', class: "input-container" }, this.label && h("label", { key: 'f79e02a925aa6bd1b6cd48fc4225e441695ff893', class: "input-label" }, this.label), h("div", { key: 'e2937d2ad1def996e1937a9dd711578a3f9b6494', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '8bc45cc6f2603bec30f2299286d03beacd8c07fb', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '917fb6fa6c5fe62ab0f1e5c83f09aedd22623353', class: "input-suffix" }, this.suffix)))));
31
+ return (h(Host, { key: '92393344834011156bda2f682e559e7806864d19' }, h("div", { key: '5d569b8746d9285701259979ec554dbb41df4490', class: "input-container" }, this.label && h("label", { key: 'a27844d3da23d353b0ea2dede3c664fdbcbb6aab', class: "input-label" }, this.label), h("div", { key: 'fab4f3f1bda07c78f39ea96ba87c42be5de08286', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '4294687bc9f6006b0b64427c111af08d82ad5ffd', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '83adbd2978c92e969fedd9ad75f2c89b017b31a5', class: "input-suffix" }, this.suffix)))));
32
32
  }
33
33
  static get is() { return "kritzel-input"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -90,15 +90,15 @@ export class KritzelMasterDetail {
90
90
  const selectedItem = this.items.find(item => item.id === this.selectedItemId);
91
91
  const panelId = 'master-detail-panel';
92
92
  const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
93
- return (h(Host, { key: '0166376f16ebb098049cd2ef5539a86086a5570e' }, h("div", { key: 'f5091fe672bc4751c8f66d43baa5c1fc86fca034', class: {
93
+ return (h(Host, { key: 'fc187266604f9d48210096a1574bf86482498a40' }, h("div", { key: '2886b386c6e96df671ff4902b2c9f7084f0c3191', class: {
94
94
  'master-detail-container': true,
95
95
  'is-mobile-detail-visible': this.showMobileDetail,
96
- } }, h("nav", { key: '66f5c61ea0308ea9ae1339526e86dcf1ee51fc0a', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
96
+ } }, h("nav", { key: '94a35861b7c97d7f5f1505e4c25bc7f584c6351f', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
97
97
  'menu-item': true,
98
98
  'is-selected': item.id === this.selectedItemId,
99
99
  'is-disabled': !!item.disabled,
100
100
  'is-focused': index === this.focusedIndex,
101
- }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'e8f762ad87fdcf401ec717538bf1e979b22a9f15', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '958360d57a1fad0953bc3865503e86c1d8aa24e3', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'c65eb947f80aafec99b367dae7ea72b1a77acdac', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '44557fddf513fffd86c7a1b28b71a41fef7701f1' })))));
101
+ }, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'd55507c8e818314bd548506d1b568357062378db', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: 'f7bf50b2ecd7093110ee0fc91d49caf468ee9116', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'c809cea0d279439ced7a580ea2a4f44d5ec2b8b6', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '78babf63e193db45e26ea6602ab09dde045bf06e' })))));
102
102
  }
103
103
  static get is() { return "kritzel-master-detail"; }
104
104
  static get encapsulation() { return "shadow"; }
@@ -51,7 +51,7 @@ export class KritzelMenu {
51
51
  this.itemCloseChildMenu.emit(event.detail);
52
52
  };
53
53
  render() {
54
- return (h(Host, { key: '804ed34eb5340ecc1611ada01f608f7a0cf2f619', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: '6de5954a05b7f28961fa33cf8d34df3a81aae5f8', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (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 })))));
54
+ return (h(Host, { key: '0876a6a7e6dbb0daa984d228bac4c8b5d5790580', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: '499dde6694d7b98eb85d9bac314ab7ba2dcf1e71', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (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 })))));
55
55
  }
56
56
  static get is() { return "kritzel-menu"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -90,12 +90,12 @@ export class KritzelMenuItem {
90
90
  ];
91
91
  }
92
92
  render() {
93
- return (h(Host, { key: '9b35e5631cfa14aca391636f06598ef6f2f26550', tabIndex: this.item.isDisabled ? -1 : 0, class: {
93
+ return (h(Host, { key: '40bfb2f086d24080276f27d879216958dff0388a', tabIndex: this.item.isDisabled ? -1 : 0, class: {
94
94
  'selected': this.item.isSelected,
95
95
  'editing': this.item.isEditing,
96
96
  'disabled': this.item.isDisabled,
97
97
  'child-open': this.item.isChildMenuOpen,
98
- }, onClick: this.handleItemSelect }, h("div", { key: '175258699f76fdad5dcf3c7481e7882c6765bf33', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
98
+ }, onClick: this.handleItemSelect }, h("div", { key: '0aa55293dfc2cf1010c020f3f35ee3a3bd662c8a', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
99
99
  }
100
100
  static get is() { return "kritzel-menu-item"; }
101
101
  static get encapsulation() { return "shadow"; }