kritzel-stencil 0.4.7 → 0.4.9

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 (113) hide show
  1. package/dist/cjs/index.cjs.js +9 -1
  2. package/dist/cjs/kritzel-active-users_47.cjs.entry.js +1396 -1243
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{schema.constants-C8hqt--r.js → schema.constants-ByNZ_qAj.js} +136 -7
  5. package/dist/cjs/stencil.cjs.js +1 -1
  6. package/dist/collection/classes/handlers/line-handle.handler.js +1 -1
  7. package/dist/collection/classes/managers/license.manager.js +56 -0
  8. package/dist/collection/classes/objects/image.class.js +9 -0
  9. package/dist/collection/classes/objects/line.class.js +1 -1
  10. package/dist/collection/classes/objects/path.class.js +9 -0
  11. package/dist/collection/classes/objects/shape.class.js +12 -3
  12. package/dist/collection/classes/objects/text.class.js +1 -1
  13. package/dist/collection/classes/providers/sync/broadcast-sync-provider.class.js +1 -0
  14. package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +2 -0
  15. package/dist/collection/classes/providers/sync/in-memory-sync-provider.class.js +1 -0
  16. package/dist/collection/classes/providers/sync/indexeddb-sync-provider.class.js +1 -0
  17. package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +2 -0
  18. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +197 -67
  19. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +146 -172
  20. package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
  21. package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
  22. package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
  23. package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +90 -4
  24. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
  25. package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
  26. package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
  27. package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
  28. package/dist/collection/constants/license.constants.js +1 -1
  29. package/dist/collection/constants/version.js +1 -1
  30. package/dist/collection/helpers/object.helper.js +11 -0
  31. package/dist/collection/helpers/svg-export.helper.js +19 -9
  32. package/dist/collection/helpers/theme.helper.js +8 -0
  33. package/dist/collection/index.js +1 -0
  34. package/dist/collection/interfaces/object-export.interface.js +1 -0
  35. package/dist/collection/interfaces/sync-config.interface.js +21 -1
  36. package/dist/collection/themes/dark-theme.js +2 -0
  37. package/dist/collection/themes/light-theme.js +2 -0
  38. package/dist/components/index.js +11 -4
  39. package/dist/components/kritzel-awareness-cursors.js +1 -1
  40. package/dist/components/kritzel-color-palette.js +1 -1
  41. package/dist/components/kritzel-color.js +1 -1
  42. package/dist/components/kritzel-controls.js +1 -1
  43. package/dist/components/kritzel-editor.js +180 -83
  44. package/dist/components/kritzel-engine.js +1 -1
  45. package/dist/components/kritzel-export.js +1 -1
  46. package/dist/components/kritzel-loading-overlay.js +1 -1
  47. package/dist/components/kritzel-login-dialog.js +1 -1
  48. package/dist/components/kritzel-menu-item.js +1 -1
  49. package/dist/components/kritzel-menu.js +1 -1
  50. package/dist/components/kritzel-more-menu.js +1 -1
  51. package/dist/components/kritzel-portal.js +1 -1
  52. package/dist/components/kritzel-settings.js +1 -1
  53. package/dist/components/kritzel-share-dialog.js +1 -1
  54. package/dist/components/kritzel-split-button.js +1 -1
  55. package/dist/components/kritzel-stroke-size.js +1 -1
  56. package/dist/components/kritzel-tool-config.js +1 -1
  57. package/dist/components/kritzel-utility-panel.js +1 -1
  58. package/dist/components/kritzel-workspace-manager.js +1 -1
  59. package/dist/components/kritzel-zoom-panel.js +1 -1
  60. package/dist/components/{p-DwY5pghH.js → p-6rQICkGr.js} +1 -1
  61. package/dist/components/{p-DkH3hoLz.js → p-8ScektIm.js} +6 -6
  62. package/dist/components/{p-1nG2hxfJ.js → p-9m1cAVwG.js} +2 -2
  63. package/dist/components/{p-DkY7pIg5.js → p-BRGufCki.js} +95 -6
  64. package/dist/components/{p-BKOsmXB5.js → p-BqWiEmYI.js} +1 -1
  65. package/dist/components/{p-BLOPBDUF.js → p-C2CeSrTm.js} +1 -1
  66. package/dist/components/{p-zd7zXld8.js → p-CMZ09rB1.js} +1 -1
  67. package/dist/components/{p-BmyTdQGy.js → p-CURiiQfq.js} +12 -0
  68. package/dist/components/{p-DDbO5q-e.js → p-CXJZxJvp.js} +4 -4
  69. package/dist/components/{p-7Rt7ml3v.js → p-Cj0NElII.js} +1 -1
  70. package/dist/components/{p-Bm_BWQa4.js → p-Ckm1Aq0V.js} +1 -1
  71. package/dist/components/{p-BVEGQLBD.js → p-CoY7emAj.js} +1 -1
  72. package/dist/components/{p-BZxOukfY.js → p-Cr2z2UBL.js} +4 -4
  73. package/dist/components/{p-D0oplzU-.js → p-D7H8oxZb.js} +2 -2
  74. package/dist/components/{p-Dd-pMvlr.js → p-DPONTran.js} +11 -0
  75. package/dist/components/{p-BMRln59F.js → p-DW7WW4EN.js} +2 -2
  76. package/dist/components/{p-D8TOEhPY.js → p-DuVkk58V.js} +2 -2
  77. package/dist/components/{p-OLfoATNk.js → p-U9FjWrp-.js} +1 -1
  78. package/dist/components/{p-C2yi85nc.js → p-ZPPtEla5.js} +1213 -1131
  79. package/dist/components/{p-COjsYPir.js → p-dVfh-Sy9.js} +1 -1
  80. package/dist/components/{p-Ka7OWbnk.js → p-lQ7nfhOy.js} +12 -3
  81. package/dist/esm/index.js +9 -2
  82. package/dist/esm/kritzel-active-users_47.entry.js +1396 -1243
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/{schema.constants-uC7_X6yr.js → schema.constants-1t45c2_U.js} +136 -8
  85. package/dist/esm/stencil.js +1 -1
  86. package/dist/stencil/index.esm.js +9 -2
  87. package/dist/stencil/{p-uC7_X6yr.js → p-1t45c2_U.js} +136 -8
  88. package/dist/stencil/{p-472f2e90.entry.js → p-f5f088ea.entry.js} +1396 -1243
  89. package/dist/stencil/stencil.esm.js +1 -1
  90. package/dist/types/classes/managers/license.manager.d.ts +6 -0
  91. package/dist/types/classes/objects/image.class.d.ts +3 -0
  92. package/dist/types/classes/objects/path.class.d.ts +3 -0
  93. package/dist/types/classes/objects/shape.class.d.ts +3 -0
  94. package/dist/types/classes/providers/sync/broadcast-sync-provider.class.d.ts +1 -0
  95. package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +1 -0
  96. package/dist/types/classes/providers/sync/in-memory-sync-provider.class.d.ts +1 -0
  97. package/dist/types/classes/providers/sync/indexeddb-sync-provider.class.d.ts +1 -0
  98. package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +1 -0
  99. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +15 -3
  100. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +16 -34
  101. package/dist/types/components/ui/kritzel-more-menu/kritzel-more-menu.d.ts +10 -1
  102. package/dist/types/components.d.ts +27 -26
  103. package/dist/types/constants/license.constants.d.ts +1 -1
  104. package/dist/types/constants/version.d.ts +1 -1
  105. package/dist/types/helpers/object.helper.d.ts +4 -0
  106. package/dist/types/helpers/theme.helper.d.ts +1 -0
  107. package/dist/types/index.d.ts +1 -0
  108. package/dist/types/interfaces/menu-item.interface.d.ts +1 -1
  109. package/dist/types/interfaces/object-export.interface.d.ts +20 -0
  110. package/dist/types/interfaces/sync-config.interface.d.ts +5 -0
  111. package/dist/types/interfaces/sync-provider.interface.d.ts +5 -0
  112. package/dist/types/interfaces/theme.interface.d.ts +2 -0
  113. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
2
2
  import { K as KritzelIconRegistry, d as defineCustomElement$s } from './p-CdR76C4L.js';
3
- import { v as DEFAULT_STROKE_SIZES, w as DEFAULT_FONT_SIZES, S as ShapeType, m as KritzelSelectionTool, f as KritzelBrushTool, h as KritzelEraserTool, g as KritzelLineTool, k as KritzelShapeTool, j as KritzelTextTool, i as KritzelImageTool, s as KritzelAlignment, x as DEFAULT_SYNC_CONFIG, y as KritzelSelectionGroup, z as KritzelSelectionBox, B as KritzelKeyboardHelper, C as defineCustomElement$x } from './p-C2yi85nc.js';
4
- import { D as DEFAULT_COLOR_PALETTE, T as ThemeHelper, d as darkTheme, l as lightTheme } from './p-BmyTdQGy.js';
3
+ import { v as DEFAULT_STROKE_SIZES, w as DEFAULT_FONT_SIZES, S as ShapeType, m as KritzelSelectionTool, f as KritzelBrushTool, h as KritzelEraserTool, g as KritzelLineTool, k as KritzelShapeTool, j as KritzelTextTool, i as KritzelImageTool, s as KritzelAlignment, x as DEFAULT_SYNC_CONFIG, y as KritzelSelectionGroup, z as KritzelSelectionBox, B as KritzelKeyboardHelper, C as defineCustomElement$x } from './p-ZPPtEla5.js';
4
+ import { D as DEFAULT_COLOR_PALETTE, T as ThemeHelper, d as darkTheme, l as lightTheme } from './p-CURiiQfq.js';
5
5
  import { D as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, r as resolveTextToolAvailableFonts, K as KritzelFontRegistry } from './p-DJkKlUyZ.js';
6
6
  import { A as ABSOLUTE_SCALE_MAX, a as ABSOLUTE_SCALE_MIN, d as defineCustomElement$4 } from './p-CwuGA058.js';
7
7
  import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
8
- import { O as ObjectHelper } from './p-Dd-pMvlr.js';
9
- import { d as defineCustomElement$J } from './p-Ka7OWbnk.js';
8
+ import { O as ObjectHelper } from './p-DPONTran.js';
9
+ import { d as defineCustomElement$J } from './p-lQ7nfhOy.js';
10
10
  import * as Y from 'yjs';
11
11
  import 'y-indexeddb';
12
12
  import 'y-websocket';
@@ -14,43 +14,43 @@ import { d as defineCustomElement$L } from './p-yD_3Z3K1.js';
14
14
  import { d as defineCustomElement$K } from './p-DXcjIb_a.js';
15
15
  import { d as defineCustomElement$I } from './p-BYO6pz8T.js';
16
16
  import { d as defineCustomElement$H } from './p-oGAPPwAL.js';
17
- import { d as defineCustomElement$G } from './p-zd7zXld8.js';
18
- import { d as defineCustomElement$F } from './p-1nG2hxfJ.js';
17
+ import { d as defineCustomElement$G } from './p-CMZ09rB1.js';
18
+ import { d as defineCustomElement$F } from './p-9m1cAVwG.js';
19
19
  import { d as defineCustomElement$E } from './p-BxpKq94F.js';
20
- import { d as defineCustomElement$D } from './p-DkH3hoLz.js';
20
+ import { d as defineCustomElement$D } from './p-8ScektIm.js';
21
21
  import { d as defineCustomElement$C } from './p-BO9BvTtK.js';
22
22
  import { d as defineCustomElement$B } from './p-BU-FZuj0.js';
23
23
  import { d as defineCustomElement$A } from './p-Cm33td2O.js';
24
24
  import { d as defineCustomElement$z } from './p-DX2nriaq.js';
25
25
  import { d as defineCustomElement$y } from './p-Df3BwVGy.js';
26
- import { d as defineCustomElement$w } from './p-COjsYPir.js';
26
+ import { d as defineCustomElement$w } from './p-dVfh-Sy9.js';
27
27
  import { d as defineCustomElement$v } from './p-DgnK50xO.js';
28
28
  import { d as defineCustomElement$u } from './p-djJSnjAX.js';
29
29
  import { d as defineCustomElement$t } from './p-8xkoVMfO.js';
30
30
  import { d as defineCustomElement$r } from './p-DSOc0eIT.js';
31
31
  import { d as defineCustomElement$q } from './p-CXpv9Rxe.js';
32
- import { d as defineCustomElement$p } from './p-BVEGQLBD.js';
33
- import { d as defineCustomElement$o } from './p-7Rt7ml3v.js';
32
+ import { d as defineCustomElement$p } from './p-CoY7emAj.js';
33
+ import { d as defineCustomElement$o } from './p-Cj0NElII.js';
34
34
  import { d as defineCustomElement$n } from './p-CVhcOiEA.js';
35
- import { d as defineCustomElement$l, a as defineCustomElement$m } from './p-BKOsmXB5.js';
36
- import { d as defineCustomElement$k } from './p-DkY7pIg5.js';
35
+ import { d as defineCustomElement$l, a as defineCustomElement$m } from './p-BqWiEmYI.js';
36
+ import { d as defineCustomElement$k } from './p-BRGufCki.js';
37
37
  import { d as defineCustomElement$j } from './p-pagW8YF7.js';
38
38
  import { d as defineCustomElement$i } from './p-DIMNEOTW.js';
39
39
  import { d as defineCustomElement$h } from './p-BzrxIesp.js';
40
40
  import { d as defineCustomElement$g } from './p-D09kgc5Q.js';
41
- import { d as defineCustomElement$f } from './p-BLOPBDUF.js';
42
- import { d as defineCustomElement$e } from './p-D0oplzU-.js';
41
+ import { d as defineCustomElement$f } from './p-C2CeSrTm.js';
42
+ import { d as defineCustomElement$e } from './p-D7H8oxZb.js';
43
43
  import { d as defineCustomElement$d } from './p-BFYtCsZu.js';
44
- import { d as defineCustomElement$c } from './p-BMRln59F.js';
44
+ import { d as defineCustomElement$c } from './p-DW7WW4EN.js';
45
45
  import { d as defineCustomElement$b } from './p-BzJEwFtn.js';
46
- import { d as defineCustomElement$a } from './p-D8TOEhPY.js';
47
- import { d as defineCustomElement$9 } from './p-Bm_BWQa4.js';
46
+ import { d as defineCustomElement$a } from './p-DuVkk58V.js';
47
+ import { d as defineCustomElement$9 } from './p-Ckm1Aq0V.js';
48
48
  import { d as defineCustomElement$8 } from './p-CM1duewg.js';
49
- import { d as defineCustomElement$7 } from './p-BZxOukfY.js';
49
+ import { d as defineCustomElement$7 } from './p-Cr2z2UBL.js';
50
50
  import { d as defineCustomElement$6 } from './p-DrQRChp3.js';
51
- import { d as defineCustomElement$5 } from './p-DwY5pghH.js';
52
- import { d as defineCustomElement$3 } from './p-DDbO5q-e.js';
53
- import { d as defineCustomElement$2 } from './p-OLfoATNk.js';
51
+ import { d as defineCustomElement$5 } from './p-6rQICkGr.js';
52
+ import { d as defineCustomElement$3 } from './p-CXJZxJvp.js';
53
+ import { d as defineCustomElement$2 } from './p-U9FjWrp-.js';
54
54
 
55
55
  /**
56
56
  * Common Math expressions.
@@ -2856,6 +2856,28 @@ class HocuspocusProvider extends EventEmitter {
2856
2856
  }
2857
2857
  }
2858
2858
 
2859
+ /**
2860
+ * Returns the provider type (`'local'` or `'network'`) for a given provider config entry.
2861
+ * Works for both class constructors (via a static `type` property) and
2862
+ * factory objects (via an optional `type` property on the factory).
2863
+ */
2864
+ function getProviderConfigType(config) {
2865
+ if (typeof config === 'function') {
2866
+ return config.type;
2867
+ }
2868
+ return config.type;
2869
+ }
2870
+ /**
2871
+ * Returns `true` when the given sync configuration contains at least one remote
2872
+ * (network) provider, meaning the share option should be available in the UI.
2873
+ */
2874
+ function hasRemoteSyncProvider(syncConfig) {
2875
+ if (!syncConfig?.providers?.length) {
2876
+ return false;
2877
+ }
2878
+ return syncConfig.providers.some(p => getProviderConfigType(p) === 'network');
2879
+ }
2880
+
2859
2881
  const DEFAULT_BRUSH_CONFIG = {
2860
2882
  type: 'pen',
2861
2883
  color: DEFAULT_COLOR_PALETTE[0],
@@ -3032,6 +3054,19 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3032
3054
  group: 'clipboard',
3033
3055
  action: (menu, _) => this.engineRef.paste(menu.x, menu.y),
3034
3056
  },
3057
+ {
3058
+ label: 'menu.export',
3059
+ icon: 'upload',
3060
+ group: 'clipboard',
3061
+ visible: (_, objects) => this.canExportObjects(objects),
3062
+ action: (_, objects) => {
3063
+ const format = this.getPreferredExportFormat(objects);
3064
+ if (!format) {
3065
+ return;
3066
+ }
3067
+ void this.engineRef.exportSelectedObject(format);
3068
+ },
3069
+ },
3035
3070
  {
3036
3071
  label: 'menu.order',
3037
3072
  icon: 'ordering',
@@ -3073,16 +3108,43 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3073
3108
  },
3074
3109
  ],
3075
3110
  },
3111
+ { label: 'menu.delete', icon: 'delete', group: 'edit', action: () => this.engineRef.delete() },
3112
+ ];
3113
+ moreMenuItems = [
3114
+ {
3115
+ id: 'share',
3116
+ label: 'menu.share',
3117
+ icon: 'share',
3118
+ isVisible: async () => hasRemoteSyncProvider(this.syncConfig),
3119
+ action: () => {
3120
+ if (!this.isLoggedIn && this.loginConfig) {
3121
+ this.openLoginDialog();
3122
+ return;
3123
+ }
3124
+ this.shareDialogRef.open();
3125
+ },
3126
+ },
3076
3127
  {
3128
+ id: 'export',
3077
3129
  label: 'menu.export',
3130
+ icon: 'upload',
3131
+ action: async () => {
3132
+ const preview = await this.engineRef.getScreenshot('png');
3133
+ this.exportRef.open(preview ?? undefined);
3134
+ },
3135
+ },
3136
+ {
3137
+ id: 'import',
3138
+ label: 'menu.import',
3078
3139
  icon: 'download',
3079
- group: 'export',
3080
- children: [
3081
- { label: 'menu.exportAsSvg', icon: 'download', action: () => this.engineRef.exportSelectedObjectsAsSvg() },
3082
- { label: 'menu.exportAsPng', icon: 'download', action: () => this.engineRef.exportSelectedObjectsAsPng() },
3083
- ],
3140
+ action: () => this.engineRef.importFromFile(),
3141
+ },
3142
+ {
3143
+ id: 'settings',
3144
+ label: 'menu.settings',
3145
+ icon: 'settings',
3146
+ action: () => this.settingsRef.open(),
3084
3147
  },
3085
- { label: 'menu.delete', icon: 'delete', group: 'edit', action: () => this.engineRef.delete() },
3086
3148
  ];
3087
3149
  themes;
3088
3150
  theme = 'light';
@@ -3154,6 +3216,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3154
3216
  isNotificationDismissing = false;
3155
3217
  contextMenuState;
3156
3218
  normalizedControls = [];
3219
+ resolvedMoreMenuItems = [];
3157
3220
  notificationDismissTimeout;
3158
3221
  notificationDismissAnimationTimeout;
3159
3222
  notificationDisplayDurationMs = 5000;
@@ -3196,6 +3259,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3196
3259
  onControlsChange(newValue) {
3197
3260
  this.normalizedControls = this.normalizeControls(newValue);
3198
3261
  }
3262
+ onMoreMenuItemsChange() {
3263
+ this.recomputeMoreMenuItems();
3264
+ }
3265
+ onSyncConfigChange() {
3266
+ this.recomputeMoreMenuItems();
3267
+ }
3268
+ onLoginConfigChange() {
3269
+ this.recomputeMoreMenuItems();
3270
+ }
3271
+ onUserChange() {
3272
+ this.recomputeMoreMenuItems();
3273
+ }
3199
3274
  onActiveWorkspaceIdChange(newId) {
3200
3275
  // If no ID is provided, do nothing (allows other logic to control activeWorkspace)
3201
3276
  if (!newId) {
@@ -3245,6 +3320,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3245
3320
  }
3246
3321
  this.resolvedTerms = await this.engineRef.getResolvedTerms();
3247
3322
  this.availableLocaleOptions = await this.engineRef.getAvailableLocaleOptions();
3323
+ this.recomputeMoreMenuItems();
3248
3324
  }
3249
3325
  onTouchStart(event) {
3250
3326
  if (event.cancelable) {
@@ -3405,11 +3481,14 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3405
3481
  async exportViewportAsSvg(options) {
3406
3482
  return this.engineRef.exportViewportAsSvg(options);
3407
3483
  }
3408
- async exportSelectedObjectsAsPng() {
3409
- return this.engineRef.exportSelectedObjectsAsPng();
3484
+ async getSelectedObjectSupportedExportFormats() {
3485
+ return this.engineRef.getSelectedObjectSupportedExportFormats();
3410
3486
  }
3411
- async exportSelectedObjectsAsSvg() {
3412
- return this.engineRef.exportSelectedObjectsAsSvg();
3487
+ async canExportSelectedObjectAs(format) {
3488
+ return this.engineRef.canExportSelectedObjectAs(format);
3489
+ }
3490
+ async exportSelectedObject(format) {
3491
+ return this.engineRef.exportSelectedObject(format);
3413
3492
  }
3414
3493
  async downloadAsJson(filename) {
3415
3494
  return this.engineRef.downloadAsJson(filename);
@@ -3476,6 +3555,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3476
3555
  currentUserDialogRef;
3477
3556
  componentWillLoad() {
3478
3557
  this.normalizedControls = this.normalizeControls(this.controls);
3558
+ this.recomputeMoreMenuItems();
3479
3559
  this.loadSettingsFromStorage();
3480
3560
  this.applyTheme();
3481
3561
  }
@@ -3496,13 +3576,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3496
3576
  };
3497
3577
  });
3498
3578
  }
3579
+ recomputeMoreMenuItems() {
3580
+ if (this.moreMenuItems) {
3581
+ this.resolvedMoreMenuItems = this.moreMenuItems;
3582
+ return;
3583
+ }
3584
+ }
3499
3585
  applyTheme() {
3500
3586
  const themeObj = this.resolveThemeObject();
3501
3587
  ThemeHelper.applyThemeToElement(this.host, themeObj);
3502
3588
  }
3503
3589
  resolveThemeObject() {
3504
- return this.themes?.find(t => t.name === this.theme)
3505
- ?? (this.theme === 'dark' ? darkTheme : lightTheme);
3590
+ return this.themes?.find(t => t.name === this.theme) ?? (this.theme === 'dark' ? darkTheme : lightTheme);
3506
3591
  }
3507
3592
  componentDidLoad() {
3508
3593
  this.registerCustomSvgIcons();
@@ -3537,7 +3622,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3537
3622
  syncConfig: this.syncConfig,
3538
3623
  assetStorageConfig: this.assetStorageConfig,
3539
3624
  loginConfig: this.loginConfig,
3540
- theme: this.theme
3625
+ theme: this.theme,
3541
3626
  });
3542
3627
  }
3543
3628
  async onEngineReady(event) {
@@ -3700,43 +3785,6 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3700
3785
  }
3701
3786
  this.themeChange.emit(event.detail.theme);
3702
3787
  }
3703
- get moreMenuItems() {
3704
- return [
3705
- {
3706
- id: 'share',
3707
- label: this.resolvedTerms['menu.share'] ?? 'Share',
3708
- icon: 'share',
3709
- action: () => {
3710
- if (!this.isLoggedIn && this.loginConfig) {
3711
- this.openLoginDialog();
3712
- return;
3713
- }
3714
- this.shareDialogRef.open();
3715
- },
3716
- },
3717
- {
3718
- id: 'export',
3719
- label: this.resolvedTerms['menu.export'] ?? 'Export',
3720
- icon: 'upload',
3721
- action: async () => {
3722
- const preview = await this.engineRef.getScreenshot('png');
3723
- this.exportRef.open(preview ?? undefined);
3724
- },
3725
- },
3726
- {
3727
- id: 'import',
3728
- label: this.resolvedTerms['menu.import'] ?? 'Import',
3729
- icon: 'download',
3730
- action: () => this.engineRef.importFromFile(),
3731
- },
3732
- {
3733
- id: 'settings',
3734
- label: this.resolvedTerms['menu.settings'] ?? 'Settings',
3735
- icon: 'settings',
3736
- action: () => this.settingsRef.open(),
3737
- }
3738
- ];
3739
- }
3740
3788
  handleToggleIsPublic = async (event) => {
3741
3789
  const isPublic = event.detail;
3742
3790
  const activeWorkspace = await this.engineRef.getActiveWorkspace();
@@ -3766,6 +3814,28 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3766
3814
  get isLoggedIn() {
3767
3815
  return !!this.user && !this.user.isGuest;
3768
3816
  }
3817
+ canExportObjectsAs(objects, format) {
3818
+ if (!objects || objects.length !== 1) {
3819
+ return false;
3820
+ }
3821
+ const [selected] = objects;
3822
+ if (!ObjectHelper.isKritzelExportable(selected)) {
3823
+ return false;
3824
+ }
3825
+ return selected.getSupportedExportFormats().includes(format);
3826
+ }
3827
+ canExportObjects(objects) {
3828
+ return this.canExportObjectsAs(objects, 'png') || this.canExportObjectsAs(objects, 'svg');
3829
+ }
3830
+ getPreferredExportFormat(objects) {
3831
+ if (this.canExportObjectsAs(objects, 'png')) {
3832
+ return 'png';
3833
+ }
3834
+ if (this.canExportObjectsAs(objects, 'svg')) {
3835
+ return 'svg';
3836
+ }
3837
+ return null;
3838
+ }
3769
3839
  async openLoginDialog() {
3770
3840
  this.loginDialogRef?.open();
3771
3841
  }
@@ -3942,41 +4012,41 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
3942
4012
  const isLoggedIn = this.isLoggedIn;
3943
4013
  const shouldShowCurrentUser = isLoggedIn;
3944
4014
  const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
3945
- return (h(Host, { key: 'ab06876e3a07e97c3788113ffd0483bbb2819d5b' }, h("div", { key: 'e393eacfad2b224a720e5a97b047af8dd3ce97a5', class: "editor-content", style: {
4015
+ return (h(Host, { key: '3119d6909544f0d15bd805f65ccf3f18469dc11d' }, h("div", { key: '7528eec8df968cd7814a2343fa3aa792802b9856', class: "editor-content", style: {
3946
4016
  opacity: this.isEditorVisible ? '1' : '0',
3947
4017
  visibility: this.isEditorVisible ? 'visible' : 'hidden',
3948
4018
  transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
3949
- } }, h("div", { key: 'd9dcbd6859bea28d75c7f8b0cc26ea3ba58b2433', class: "top-left-buttons" }, 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) }), h("kritzel-back-to-content", { key: '8b345bf6ce0ec33ca35f1f630af2050b95bc6b74', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: '1b965de38a7f1f40d5d91431801e873289416924', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: 'f165dc7acc5e1bc7923fec217ebc16fe4a3f2ece', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, 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 && (h("kritzel-context-menu", { key: 'fc3417276f0034e7fc7e8360d3f3ce57106146b2', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
4019
+ } }, h("div", { key: '71f0dba52cddc6e28ea7f7b3b6ff78c32aa19acf', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: '579826701b13fb4b12dbdbf0b31b05031f01c3d1', 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: '84fb52fba5f898cf1034780f87f7ce49d370cdfe', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: 'ecca20769db06f56bd52199b04f9e44c74bf525d', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: 'aa2232646d7d77d70af04c8b413e2eb8033a00eb', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: 'fa111382e6fdebf8e5944c6148cad9583bc8b68d', 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: '420caf2b6bfb79f3ebda3537cc379f8735eb8c09', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
3950
4020
  position: 'absolute',
3951
4021
  left: `${this.contextMenuState.position.x}px`,
3952
4022
  top: `${this.contextMenuState.position.y}px`,
3953
4023
  zIndex: '10002',
3954
- }, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-engine", { key: '0c9df0386d38a87f50d324cfc51307a1cb947a58', ref: el => {
4024
+ }, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-engine", { key: 'd10589d02c626712e10f55b07f716907d83b28c1', ref: el => {
3955
4025
  if (el) {
3956
4026
  this.engineRef = el;
3957
4027
  }
3958
- }, 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) }), h("kritzel-controls", { key: '46d8e9c45c7bed24fc02d17c8fef836d596088d7', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
4028
+ }, 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) }), h("kritzel-controls", { key: '121480e948808fe6a44a94511becb834f9249897', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
3959
4029
  if (el) {
3960
4030
  this.controlsRef = el;
3961
4031
  }
3962
- }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'e3ef94509a82fe435f827b66cf1813969b7dec66', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: '4e6cbdf85f550e6e3037dce3b910c0582ea0320b', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: 'a62df7f8a68cbed728b701894a5284c2bff39e1e', class: "top-right-buttons" }, h("kritzel-settings", { key: '0b6daf9ff43551df9f86431d398a32913a845925', ref: el => {
4032
+ }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'e84f31858a6a45fb9f7bcc3686122b349551618b', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: 'a25d93767a124e1a2fdcdd4b77706ec7d032234c', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: '49810743d464d4e019670859f6ed31d9c12cd560', class: "top-right-buttons" }, h("kritzel-settings", { key: '57daff63b4ec1de36f94be99948d0d0aa091c522', ref: el => {
3963
4033
  if (el) {
3964
4034
  this.settingsRef = el;
3965
4035
  }
3966
- }, 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: '29d02ffd3358fe91d27435cc3fdd5f8ac2ad7cf5', ref: el => {
4036
+ }, 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: 'cad9614f0e439713e96108476ed3c400c14546cc', ref: el => {
3967
4037
  if (el) {
3968
4038
  this.exportRef = el;
3969
4039
  }
3970
- }, 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: '729ca599e46654bc1429b5d91ff73f26d9b6e7bb', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '84c07268072418a82cf504f16803c59a1e37c0ae', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '55189e3da7899628b252e7995b20bc422fce2d5c', ref: el => {
4040
+ }, 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: '191775e6c3f62391e4c62cb8039ace51b4853555', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '385264c0ebb74eb1c3e3793ad889b8bd84ec1920', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '065b583dd31019fe88739171089414123af7d640', ref: el => {
3971
4041
  if (el) {
3972
4042
  this.currentUserDialogRef = el;
3973
4043
  this.currentUserDialogRef.addEventListener('logoutRequest', this.handleCurrentUserLogout);
3974
4044
  }
3975
- }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && (h("kritzel-button", { key: 'a55d85769bad635fcc7934f584bf1bf74c1e7ea6', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in')), h("kritzel-more-menu", { key: '67dd879ec3c55c98e32f6112ca53d925f47b56b4', items: this.moreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '5f13130099110eb472022099219e15877ceceb57', ref: el => {
4045
+ }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && h("kritzel-button", { key: 'b655001273147d58f299983c9512d10ee16847a1', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), h("kritzel-more-menu", { key: '265cd05a2e62fb3a16beae85a82a81e69410f284', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '0c441b88aab039e4f9eb86d226670732f0635446', ref: el => {
3976
4046
  if (el) {
3977
4047
  this.shareDialogRef = el;
3978
4048
  }
3979
- }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: 'cda0fcdcad75de8730ce10bda425cc0fbe01429a', ref: el => {
4049
+ }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '3e06e1b33c3dc98cfa8f76641acdb5a3ea51c1d5', ref: el => {
3980
4050
  if (el) {
3981
4051
  this.loginDialogRef = el;
3982
4052
  }
@@ -4001,6 +4071,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
4001
4071
  "controls": [{
4002
4072
  "onControlsChange": 0
4003
4073
  }],
4074
+ "moreMenuItems": [{
4075
+ "onMoreMenuItemsChange": 0
4076
+ }],
4077
+ "syncConfig": [{
4078
+ "onSyncConfigChange": 0
4079
+ }],
4080
+ "loginConfig": [{
4081
+ "onLoginConfigChange": 0
4082
+ }],
4083
+ "user": [{
4084
+ "onUserChange": 0
4085
+ }],
4004
4086
  "activeWorkspaceId": [{
4005
4087
  "onActiveWorkspaceIdChange": 0
4006
4088
  }],
@@ -4029,6 +4111,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
4029
4111
  "controls": [16],
4030
4112
  "globalContextMenuItems": [16],
4031
4113
  "objectContextMenuItems": [16],
4114
+ "moreMenuItems": [16],
4032
4115
  "themes": [16],
4033
4116
  "theme": [1025],
4034
4117
  "licenseKey": [1, "license-key"],
@@ -4070,6 +4153,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
4070
4153
  "isNotificationDismissing": [32],
4071
4154
  "contextMenuState": [32],
4072
4155
  "normalizedControls": [32],
4156
+ "resolvedMoreMenuItems": [32],
4073
4157
  "getObjectById": [64],
4074
4158
  "addObject": [64],
4075
4159
  "addObjects": [64],
@@ -4121,8 +4205,9 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
4121
4205
  "getScreenshot": [64],
4122
4206
  "exportViewportAsPng": [64],
4123
4207
  "exportViewportAsSvg": [64],
4124
- "exportSelectedObjectsAsPng": [64],
4125
- "exportSelectedObjectsAsSvg": [64],
4208
+ "getSelectedObjectSupportedExportFormats": [64],
4209
+ "canExportSelectedObjectAs": [64],
4210
+ "exportSelectedObject": [64],
4126
4211
  "downloadAsJson": [64],
4127
4212
  "importFromFile": [64],
4128
4213
  "loadObjectsFromJson": [64],
@@ -4164,6 +4249,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
4164
4249
  "controls": [{
4165
4250
  "onControlsChange": 0
4166
4251
  }],
4252
+ "moreMenuItems": [{
4253
+ "onMoreMenuItemsChange": 0
4254
+ }],
4255
+ "syncConfig": [{
4256
+ "onSyncConfigChange": 0
4257
+ }],
4258
+ "loginConfig": [{
4259
+ "onLoginConfigChange": 0
4260
+ }],
4261
+ "user": [{
4262
+ "onUserChange": 0
4263
+ }],
4167
4264
  "activeWorkspaceId": [{
4168
4265
  "onActiveWorkspaceIdChange": 0
4169
4266
  }],
@@ -4424,4 +4521,4 @@ function defineCustomElement$1() {
4424
4521
  const KritzelEditor = KritzelEditor$1;
4425
4522
  const defineCustomElement = defineCustomElement$1;
4426
4523
 
4427
- export { DEFAULT_BRUSH_CONFIG as D, HocuspocusProvider as H, KritzelEditor, HocuspocusProviderWebsocket as a, DEFAULT_TEXT_CONFIG as b, DEFAULT_LINE_TOOL_CONFIG as c, DEFAULT_ASSET_STORAGE_CONFIG as d, defineCustomElement };
4524
+ export { DEFAULT_BRUSH_CONFIG as D, HocuspocusProvider as H, KritzelEditor, HocuspocusProviderWebsocket as a, DEFAULT_TEXT_CONFIG as b, DEFAULT_LINE_TOOL_CONFIG as c, DEFAULT_ASSET_STORAGE_CONFIG as d, defineCustomElement, hasRemoteSyncProvider as h };
@@ -1,4 +1,4 @@
1
- import { G as KritzelEngine$1, C as defineCustomElement$1 } from './p-C2yi85nc.js';
1
+ import { G as KritzelEngine$1, C as defineCustomElement$1 } from './p-ZPPtEla5.js';
2
2
 
3
3
  const KritzelEngine = KritzelEngine$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelExport$1, d as defineCustomElement$1 } from './p-COjsYPir.js';
1
+ import { K as KritzelExport$1, d as defineCustomElement$1 } from './p-dVfh-Sy9.js';
2
2
 
3
3
  const KritzelExport = KritzelExport$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelLoadingOverlay$1, d as defineCustomElement$1 } from './p-BVEGQLBD.js';
1
+ import { K as KritzelLoadingOverlay$1, d as defineCustomElement$1 } from './p-CoY7emAj.js';
2
2
 
3
3
  const KritzelLoadingOverlay = KritzelLoadingOverlay$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelLoginDialog$1, d as defineCustomElement$1 } from './p-7Rt7ml3v.js';
1
+ import { K as KritzelLoginDialog$1, d as defineCustomElement$1 } from './p-Cj0NElII.js';
2
2
 
3
3
  const KritzelLoginDialog = KritzelLoginDialog$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { b as KritzelMenuItem$1, d as defineCustomElement$1 } from './p-BKOsmXB5.js';
1
+ import { b as KritzelMenuItem$1, d as defineCustomElement$1 } from './p-BqWiEmYI.js';
2
2
 
3
3
  const KritzelMenuItem = KritzelMenuItem$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelMenu$1, a as defineCustomElement$1 } from './p-BKOsmXB5.js';
1
+ import { K as KritzelMenu$1, a as defineCustomElement$1 } from './p-BqWiEmYI.js';
2
2
 
3
3
  const KritzelMenu = KritzelMenu$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelMoreMenu$1, d as defineCustomElement$1 } from './p-DkY7pIg5.js';
1
+ import { K as KritzelMoreMenu$1, d as defineCustomElement$1 } from './p-BRGufCki.js';
2
2
 
3
3
  const KritzelMoreMenu = KritzelMoreMenu$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelPortal$1, d as defineCustomElement$1 } from './p-BLOPBDUF.js';
1
+ import { K as KritzelPortal$1, d as defineCustomElement$1 } from './p-C2CeSrTm.js';
2
2
 
3
3
  const KritzelPortal = KritzelPortal$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelSettings$1, d as defineCustomElement$1 } from './p-D0oplzU-.js';
1
+ import { K as KritzelSettings$1, d as defineCustomElement$1 } from './p-D7H8oxZb.js';
2
2
 
3
3
  const KritzelSettings = KritzelSettings$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelShareDialog$1, d as defineCustomElement$1 } from './p-BMRln59F.js';
1
+ import { K as KritzelShareDialog$1, d as defineCustomElement$1 } from './p-DW7WW4EN.js';
2
2
 
3
3
  const KritzelShareDialog = KritzelShareDialog$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelSplitButton$1, d as defineCustomElement$1 } from './p-D8TOEhPY.js';
1
+ import { K as KritzelSplitButton$1, d as defineCustomElement$1 } from './p-DuVkk58V.js';
2
2
 
3
3
  const KritzelSplitButton = KritzelSplitButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelStrokeSize$1, d as defineCustomElement$1 } from './p-Bm_BWQa4.js';
1
+ import { K as KritzelStrokeSize$1, d as defineCustomElement$1 } from './p-Ckm1Aq0V.js';
2
2
 
3
3
  const KritzelStrokeSize = KritzelStrokeSize$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { a as KritzelToolConfig$1, d as defineCustomElement$1 } from './p-BZxOukfY.js';
1
+ import { a as KritzelToolConfig$1, d as defineCustomElement$1 } from './p-Cr2z2UBL.js';
2
2
 
3
3
  const KritzelToolConfig = KritzelToolConfig$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelUtilityPanel$1, d as defineCustomElement$1 } from './p-DwY5pghH.js';
1
+ import { K as KritzelUtilityPanel$1, d as defineCustomElement$1 } from './p-6rQICkGr.js';
2
2
 
3
3
  const KritzelUtilityPanel = KritzelUtilityPanel$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelWorkspaceManager$1, d as defineCustomElement$1 } from './p-DDbO5q-e.js';
1
+ import { K as KritzelWorkspaceManager$1, d as defineCustomElement$1 } from './p-CXJZxJvp.js';
2
2
 
3
3
  const KritzelWorkspaceManager = KritzelWorkspaceManager$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { K as KritzelZoomPanel$1, d as defineCustomElement$1 } from './p-OLfoATNk.js';
1
+ import { K as KritzelZoomPanel$1, d as defineCustomElement$1 } from './p-U9FjWrp-.js';
2
2
 
3
3
  const KritzelZoomPanel = KritzelZoomPanel$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -33,7 +33,7 @@ const KritzelUtilityPanel = /*@__PURE__*/ proxyCustomElement(class KritzelUtilit
33
33
  this.redo.emit();
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: '3e86e2c4c480ab56f4646a4f288ad37a63e29642' }, 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' }, h("kritzel-icon", { key: '5a2b903cc3e5f9c554928f11a1c3098d569cbc4d', name: "undo" })), 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' }, h("kritzel-icon", { key: '19209a95787f4475eda9dc0712c2bf36a573c953', name: "redo" })), h("div", { key: '7a463d5ac1f78017fb728abcd2c33061d8545978', class: "utility-separator" }), h("button", { key: '155c2bb50d70223e4f4d5377bacced56ffda68ad', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: '47bd8469b9efe395e9185b3e7375c7375811c0aa', name: "delete" }))));
36
+ return (h(Host, { key: '001ee010d714513a4b5027f84cac4586c64e2260' }, h("button", { key: '6ba6cbf100e2ad9f81de6416b85f981cd1467f1c', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event), "aria-label": this.terms['utility.undo'] ?? 'Undo' }, h("kritzel-icon", { key: 'b246d3964623e57e9458e5f0266a2f9e0565c646', name: "undo" })), h("button", { key: '1f5015fbd2fd84508bc8b8f295d35960bf31af5b', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event), "aria-label": this.terms['utility.redo'] ?? 'Redo' }, h("kritzel-icon", { key: 'b3694d884707c6844a0036610990cdcfa74c6931', name: "redo" })), h("div", { key: '4f8f4725213d1453af11dc3b4c9ff271f1933df5', class: "utility-separator" }), h("button", { key: '5eba2c56dd96698538a48a8ea9f32fcf8b4d8402', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: '268a186e4e7eaa1ea874ef23e72df511f86b0343', name: "delete" }))));
37
37
  }
38
38
  static get style() { return kritzelUtilityPanelCss(); }
39
39
  }, [513, "kritzel-utility-panel", {