kritzel-stencil 0.4.8 → 0.4.10
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.
- package/dist/cjs/index.cjs.js +9 -1
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +1427 -1289
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-gDeS7USU.js → schema.constants-C6PknABJ.js} +81 -6
- package/dist/cjs/stencil.cjs.js +1 -1
- package/dist/collection/classes/objects/image.class.js +9 -0
- package/dist/collection/classes/objects/path.class.js +9 -0
- package/dist/collection/classes/objects/shape.class.js +9 -0
- package/dist/collection/classes/providers/sync/broadcast-sync-provider.class.js +1 -0
- package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +2 -0
- package/dist/collection/classes/providers/sync/in-memory-sync-provider.class.js +1 -0
- package/dist/collection/classes/providers/sync/indexeddb-sync-provider.class.js +1 -0
- package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +2 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +201 -67
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +137 -170
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.css +5 -5
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +7 -7
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +2 -2
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +2 -2
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.css +6 -6
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +91 -5
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +2 -2
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +3 -3
- package/dist/collection/components/ui/kritzel-tool-config/kritzel-tool-config.js +1 -1
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +2 -2
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.js +1 -1
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +2 -2
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/helpers/object.helper.js +11 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/object-export.interface.js +1 -0
- package/dist/collection/interfaces/sync-config.interface.js +21 -1
- package/dist/collection/locales/de-locale.js +2 -2
- package/dist/collection/locales/en-locale.js +2 -2
- package/dist/collection/locales/fr-locale.js +2 -2
- package/dist/collection/themes/dark-theme.js +7 -0
- package/dist/collection/themes/light-theme.js +7 -0
- package/dist/components/index.js +11 -4
- package/dist/components/kritzel-active-users.js +1 -1
- package/dist/components/kritzel-avatar.js +1 -1
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-button.js +1 -1
- package/dist/components/kritzel-color-palette.js +1 -1
- package/dist/components/kritzel-color.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-editor.js +200 -99
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-input.js +1 -1
- package/dist/components/kritzel-loading-overlay.js +1 -1
- package/dist/components/kritzel-login-dialog.js +1 -1
- package/dist/components/kritzel-master-detail.js +1 -1
- package/dist/components/kritzel-menu-item.js +1 -1
- package/dist/components/kritzel-menu.js +1 -1
- package/dist/components/kritzel-more-menu.js +1 -1
- package/dist/components/kritzel-numeric-input.js +1 -1
- package/dist/components/kritzel-opacity-slider.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-share-dialog.js +1 -1
- package/dist/components/kritzel-slide-toggle.js +1 -1
- package/dist/components/kritzel-split-button.js +1 -1
- package/dist/components/kritzel-stroke-size.js +1 -1
- package/dist/components/kritzel-sync-indicator.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-watermark.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/kritzel-zoom-panel.js +1 -1
- package/dist/components/{p-8xkoVMfO.js → p-2WiGyky4.js} +2 -2
- package/dist/components/{p-D8TOEhPY.js → p-30g2W_Gx.js} +3 -3
- package/dist/components/{p-DXcjIb_a.js → p-4SPnZZkH.js} +3 -3
- package/dist/components/{p-CURiiQfq.js → p-7I4Uzjrw.js} +14 -0
- package/dist/components/{p-9m1cAVwG.js → p-B-585egz.js} +3 -3
- package/dist/components/{p-COjsYPir.js → p-BP6Fo3rt.js} +2 -2
- package/dist/components/{p-BLOPBDUF.js → p-BPsKYMH6.js} +2 -2
- package/dist/components/{p-DkY7pIg5.js → p-BX1aRLEi.js} +95 -6
- package/dist/components/{p-BMRln59F.js → p-B_lZQo3s.js} +3 -3
- package/dist/components/{p-oGAPPwAL.js → p-BoN700-O.js} +2 -2
- package/dist/components/{p-BzJEwFtn.js → p-BozrueXV.js} +1 -1
- package/dist/components/{p-DwY5pghH.js → p-Bvv1pGFD.js} +1 -1
- package/dist/components/{p-D8bHNNEm.js → p-C6e7eOEb.js} +1238 -1241
- package/dist/components/{p-CM1duewg.js → p-CAoN_STZ.js} +2 -2
- package/dist/components/{p-CVhcOiEA.js → p-CM65T33m.js} +3 -3
- package/dist/components/{p-BknTMcbz.js → p-COylwYw1.js} +16 -16
- package/dist/components/{p-BYO6pz8T.js → p-CZ99VWQc.js} +1 -1
- package/dist/components/{p-DrQRChp3.js → p-CaBbajU2.js} +2 -2
- package/dist/components/{p-BzrxIesp.js → p-CrHvaLRV.js} +1 -1
- package/dist/components/{p-BKOsmXB5.js → p-D-UkGru5.js} +4 -4
- package/dist/components/{p-BVEGQLBD.js → p-DB58Oa5V.js} +2 -2
- package/dist/components/{p-yD_3Z3K1.js → p-DBqoPgev.js} +1 -1
- package/dist/components/{p-DIMNEOTW.js → p-DKGg-76-.js} +1 -1
- package/dist/components/{p-Dd-pMvlr.js → p-DPONTran.js} +11 -0
- package/dist/components/{p-DgnK50xO.js → p-DVXTPI71.js} +1 -1
- package/dist/components/{p-DgA865Tp.js → p-DdabFzSa.js} +5 -5
- package/dist/components/{p-CMZ09rB1.js → p-Dt7-I2Xz.js} +3 -3
- package/dist/components/{p-CwuGA058.js → p-DtnMdWWB.js} +1 -1
- package/dist/components/{p-7Rt7ml3v.js → p-Dv4pZx8G.js} +1 -1
- package/dist/components/{p-BO9BvTtK.js → p-DwMqCX2P.js} +2 -2
- package/dist/components/{p-Cr2z2UBL.js → p-Dy3uucl_.js} +7 -7
- package/dist/components/{p-Ckm1Aq0V.js → p-GKmqCI8r.js} +2 -2
- package/dist/components/{p-DSOc0eIT.js → p-PjPPCHVL.js} +1 -1
- package/dist/components/{p-OLfoATNk.js → p-ShJrZeyt.js} +1 -1
- package/dist/components/{p-0H4HOJjy.js → p-bAacqNHq.js} +11 -2
- package/dist/components/{p-BU-FZuj0.js → p-vqEUQ-4Q.js} +3 -3
- package/dist/components/{p-DDbO5q-e.js → p-x3z0Cz1B.js} +4 -4
- package/dist/esm/index.js +9 -2
- package/dist/esm/kritzel-active-users_47.entry.js +1427 -1289
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{schema.constants-Rpm1NA9u.js → schema.constants-C-oQbvCY.js} +81 -7
- package/dist/esm/stencil.js +1 -1
- package/dist/stencil/index.esm.js +9 -2
- package/dist/stencil/{p-Rpm1NA9u.js → p-C-oQbvCY.js} +81 -7
- package/dist/stencil/{p-8c1b7b08.entry.js → p-be87f9d3.entry.js} +1427 -1289
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/objects/image.class.d.ts +3 -0
- package/dist/types/classes/objects/path.class.d.ts +3 -0
- package/dist/types/classes/objects/shape.class.d.ts +3 -0
- package/dist/types/classes/providers/sync/broadcast-sync-provider.class.d.ts +1 -0
- package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +1 -0
- package/dist/types/classes/providers/sync/in-memory-sync-provider.class.d.ts +1 -0
- package/dist/types/classes/providers/sync/indexeddb-sync-provider.class.d.ts +1 -0
- package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +1 -0
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +17 -3
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +16 -34
- package/dist/types/components/ui/kritzel-more-menu/kritzel-more-menu.d.ts +10 -1
- package/dist/types/components.d.ts +27 -26
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/helpers/object.helper.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/localization.interface.d.ts +1 -1
- package/dist/types/interfaces/menu-item.interface.d.ts +1 -1
- package/dist/types/interfaces/object-export.interface.d.ts +20 -0
- package/dist/types/interfaces/sync-config.interface.d.ts +5 -0
- package/dist/types/interfaces/sync-provider.interface.d.ts +5 -0
- package/dist/types/interfaces/theme.interface.d.ts +11 -5
- package/package.json +1 -1
|
@@ -1,56 +1,56 @@
|
|
|
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-
|
|
4
|
-
import { D as DEFAULT_COLOR_PALETTE, T as ThemeHelper, d as darkTheme, l as lightTheme } from './p-
|
|
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-C6e7eOEb.js';
|
|
4
|
+
import { D as DEFAULT_COLOR_PALETTE, T as ThemeHelper, d as darkTheme, l as lightTheme } from './p-7I4Uzjrw.js';
|
|
5
5
|
import { D as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, r as resolveTextToolAvailableFonts, K as KritzelFontRegistry } from './p-DJkKlUyZ.js';
|
|
6
|
-
import { A as ABSOLUTE_SCALE_MAX, a as ABSOLUTE_SCALE_MIN, d as defineCustomElement$4 } from './p-
|
|
6
|
+
import { A as ABSOLUTE_SCALE_MAX, a as ABSOLUTE_SCALE_MIN, d as defineCustomElement$4 } from './p-DtnMdWWB.js';
|
|
7
7
|
import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
|
|
8
|
-
import { O as ObjectHelper } from './p-
|
|
9
|
-
import { d as defineCustomElement$J } from './p-
|
|
8
|
+
import { O as ObjectHelper } from './p-DPONTran.js';
|
|
9
|
+
import { d as defineCustomElement$J } from './p-bAacqNHq.js';
|
|
10
10
|
import * as Y from 'yjs';
|
|
11
11
|
import 'y-indexeddb';
|
|
12
12
|
import 'y-websocket';
|
|
13
|
-
import { d as defineCustomElement$L } from './p-
|
|
14
|
-
import { d as defineCustomElement$K } from './p-
|
|
15
|
-
import { d as defineCustomElement$I } from './p-
|
|
16
|
-
import { d as defineCustomElement$H } from './p-
|
|
17
|
-
import { d as defineCustomElement$G } from './p-
|
|
18
|
-
import { d as defineCustomElement$F } from './p-
|
|
13
|
+
import { d as defineCustomElement$L } from './p-DBqoPgev.js';
|
|
14
|
+
import { d as defineCustomElement$K } from './p-4SPnZZkH.js';
|
|
15
|
+
import { d as defineCustomElement$I } from './p-CZ99VWQc.js';
|
|
16
|
+
import { d as defineCustomElement$H } from './p-BoN700-O.js';
|
|
17
|
+
import { d as defineCustomElement$G } from './p-Dt7-I2Xz.js';
|
|
18
|
+
import { d as defineCustomElement$F } from './p-B-585egz.js';
|
|
19
19
|
import { d as defineCustomElement$E } from './p-BxpKq94F.js';
|
|
20
|
-
import { d as defineCustomElement$D } from './p-
|
|
21
|
-
import { d as defineCustomElement$C } from './p-
|
|
22
|
-
import { d as defineCustomElement$B } from './p-
|
|
20
|
+
import { d as defineCustomElement$D } from './p-COylwYw1.js';
|
|
21
|
+
import { d as defineCustomElement$C } from './p-DwMqCX2P.js';
|
|
22
|
+
import { d as defineCustomElement$B } from './p-vqEUQ-4Q.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-
|
|
27
|
-
import { d as defineCustomElement$v } from './p-
|
|
26
|
+
import { d as defineCustomElement$w } from './p-BP6Fo3rt.js';
|
|
27
|
+
import { d as defineCustomElement$v } from './p-DVXTPI71.js';
|
|
28
28
|
import { d as defineCustomElement$u } from './p-djJSnjAX.js';
|
|
29
|
-
import { d as defineCustomElement$t } from './p-
|
|
30
|
-
import { d as defineCustomElement$r } from './p-
|
|
29
|
+
import { d as defineCustomElement$t } from './p-2WiGyky4.js';
|
|
30
|
+
import { d as defineCustomElement$r } from './p-PjPPCHVL.js';
|
|
31
31
|
import { d as defineCustomElement$q } from './p-CXpv9Rxe.js';
|
|
32
|
-
import { d as defineCustomElement$p } from './p-
|
|
33
|
-
import { d as defineCustomElement$o } from './p-
|
|
34
|
-
import { d as defineCustomElement$n } from './p-
|
|
35
|
-
import { d as defineCustomElement$l, a as defineCustomElement$m } from './p-
|
|
36
|
-
import { d as defineCustomElement$k } from './p-
|
|
32
|
+
import { d as defineCustomElement$p } from './p-DB58Oa5V.js';
|
|
33
|
+
import { d as defineCustomElement$o } from './p-Dv4pZx8G.js';
|
|
34
|
+
import { d as defineCustomElement$n } from './p-CM65T33m.js';
|
|
35
|
+
import { d as defineCustomElement$l, a as defineCustomElement$m } from './p-D-UkGru5.js';
|
|
36
|
+
import { d as defineCustomElement$k } from './p-BX1aRLEi.js';
|
|
37
37
|
import { d as defineCustomElement$j } from './p-pagW8YF7.js';
|
|
38
|
-
import { d as defineCustomElement$i } from './p-
|
|
39
|
-
import { d as defineCustomElement$h } from './p-
|
|
38
|
+
import { d as defineCustomElement$i } from './p-DKGg-76-.js';
|
|
39
|
+
import { d as defineCustomElement$h } from './p-CrHvaLRV.js';
|
|
40
40
|
import { d as defineCustomElement$g } from './p-D09kgc5Q.js';
|
|
41
|
-
import { d as defineCustomElement$f } from './p-
|
|
42
|
-
import { d as defineCustomElement$e } from './p-
|
|
41
|
+
import { d as defineCustomElement$f } from './p-BPsKYMH6.js';
|
|
42
|
+
import { d as defineCustomElement$e } from './p-DdabFzSa.js';
|
|
43
43
|
import { d as defineCustomElement$d } from './p-BFYtCsZu.js';
|
|
44
|
-
import { d as defineCustomElement$c } from './p-
|
|
45
|
-
import { d as defineCustomElement$b } from './p-
|
|
46
|
-
import { d as defineCustomElement$a } from './p-
|
|
47
|
-
import { d as defineCustomElement$9 } from './p-
|
|
48
|
-
import { d as defineCustomElement$8 } from './p-
|
|
49
|
-
import { d as defineCustomElement$7 } from './p-
|
|
50
|
-
import { d as defineCustomElement$6 } from './p-
|
|
51
|
-
import { d as defineCustomElement$5 } from './p-
|
|
52
|
-
import { d as defineCustomElement$3 } from './p-
|
|
53
|
-
import { d as defineCustomElement$2 } from './p-
|
|
44
|
+
import { d as defineCustomElement$c } from './p-B_lZQo3s.js';
|
|
45
|
+
import { d as defineCustomElement$b } from './p-BozrueXV.js';
|
|
46
|
+
import { d as defineCustomElement$a } from './p-30g2W_Gx.js';
|
|
47
|
+
import { d as defineCustomElement$9 } from './p-GKmqCI8r.js';
|
|
48
|
+
import { d as defineCustomElement$8 } from './p-CAoN_STZ.js';
|
|
49
|
+
import { d as defineCustomElement$7 } from './p-Dy3uucl_.js';
|
|
50
|
+
import { d as defineCustomElement$6 } from './p-CaBbajU2.js';
|
|
51
|
+
import { d as defineCustomElement$5 } from './p-Bvv1pGFD.js';
|
|
52
|
+
import { d as defineCustomElement$3 } from './p-x3z0Cz1B.js';
|
|
53
|
+
import { d as defineCustomElement$2 } from './p-ShJrZeyt.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
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
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,9 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3154
3216
|
isNotificationDismissing = false;
|
|
3155
3217
|
contextMenuState;
|
|
3156
3218
|
normalizedControls = [];
|
|
3219
|
+
resolvedMoreMenuItems = [];
|
|
3220
|
+
isSyncing = false;
|
|
3221
|
+
isLoadingOverlayVisible = false;
|
|
3157
3222
|
notificationDismissTimeout;
|
|
3158
3223
|
notificationDismissAnimationTimeout;
|
|
3159
3224
|
notificationDisplayDurationMs = 5000;
|
|
@@ -3196,6 +3261,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3196
3261
|
onControlsChange(newValue) {
|
|
3197
3262
|
this.normalizedControls = this.normalizeControls(newValue);
|
|
3198
3263
|
}
|
|
3264
|
+
onMoreMenuItemsChange() {
|
|
3265
|
+
this.recomputeMoreMenuItems();
|
|
3266
|
+
}
|
|
3267
|
+
onSyncConfigChange() {
|
|
3268
|
+
this.recomputeMoreMenuItems();
|
|
3269
|
+
}
|
|
3270
|
+
onLoginConfigChange() {
|
|
3271
|
+
this.recomputeMoreMenuItems();
|
|
3272
|
+
}
|
|
3273
|
+
onUserChange() {
|
|
3274
|
+
this.recomputeMoreMenuItems();
|
|
3275
|
+
}
|
|
3199
3276
|
onActiveWorkspaceIdChange(newId) {
|
|
3200
3277
|
// If no ID is provided, do nothing (allows other logic to control activeWorkspace)
|
|
3201
3278
|
if (!newId) {
|
|
@@ -3245,6 +3322,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3245
3322
|
}
|
|
3246
3323
|
this.resolvedTerms = await this.engineRef.getResolvedTerms();
|
|
3247
3324
|
this.availableLocaleOptions = await this.engineRef.getAvailableLocaleOptions();
|
|
3325
|
+
this.recomputeMoreMenuItems();
|
|
3248
3326
|
}
|
|
3249
3327
|
onTouchStart(event) {
|
|
3250
3328
|
if (event.cancelable) {
|
|
@@ -3405,11 +3483,14 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3405
3483
|
async exportViewportAsSvg(options) {
|
|
3406
3484
|
return this.engineRef.exportViewportAsSvg(options);
|
|
3407
3485
|
}
|
|
3408
|
-
async
|
|
3409
|
-
return this.engineRef.
|
|
3486
|
+
async getSelectedObjectSupportedExportFormats() {
|
|
3487
|
+
return this.engineRef.getSelectedObjectSupportedExportFormats();
|
|
3410
3488
|
}
|
|
3411
|
-
async
|
|
3412
|
-
return this.engineRef.
|
|
3489
|
+
async canExportSelectedObjectAs(format) {
|
|
3490
|
+
return this.engineRef.canExportSelectedObjectAs(format);
|
|
3491
|
+
}
|
|
3492
|
+
async exportSelectedObject(format) {
|
|
3493
|
+
return this.engineRef.exportSelectedObject(format);
|
|
3413
3494
|
}
|
|
3414
3495
|
async downloadAsJson(filename) {
|
|
3415
3496
|
return this.engineRef.downloadAsJson(filename);
|
|
@@ -3476,6 +3557,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3476
3557
|
currentUserDialogRef;
|
|
3477
3558
|
componentWillLoad() {
|
|
3478
3559
|
this.normalizedControls = this.normalizeControls(this.controls);
|
|
3560
|
+
this.recomputeMoreMenuItems();
|
|
3479
3561
|
this.loadSettingsFromStorage();
|
|
3480
3562
|
this.applyTheme();
|
|
3481
3563
|
}
|
|
@@ -3496,13 +3578,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3496
3578
|
};
|
|
3497
3579
|
});
|
|
3498
3580
|
}
|
|
3581
|
+
recomputeMoreMenuItems() {
|
|
3582
|
+
if (this.moreMenuItems) {
|
|
3583
|
+
this.resolvedMoreMenuItems = this.moreMenuItems;
|
|
3584
|
+
return;
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3499
3587
|
applyTheme() {
|
|
3500
3588
|
const themeObj = this.resolveThemeObject();
|
|
3501
3589
|
ThemeHelper.applyThemeToElement(this.host, themeObj);
|
|
3502
3590
|
}
|
|
3503
3591
|
resolveThemeObject() {
|
|
3504
|
-
return this.themes?.find(t => t.name === this.theme)
|
|
3505
|
-
?? (this.theme === 'dark' ? darkTheme : lightTheme);
|
|
3592
|
+
return this.themes?.find(t => t.name === this.theme) ?? (this.theme === 'dark' ? darkTheme : lightTheme);
|
|
3506
3593
|
}
|
|
3507
3594
|
componentDidLoad() {
|
|
3508
3595
|
this.registerCustomSvgIcons();
|
|
@@ -3537,7 +3624,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3537
3624
|
syncConfig: this.syncConfig,
|
|
3538
3625
|
assetStorageConfig: this.assetStorageConfig,
|
|
3539
3626
|
loginConfig: this.loginConfig,
|
|
3540
|
-
theme: this.theme
|
|
3627
|
+
theme: this.theme,
|
|
3541
3628
|
});
|
|
3542
3629
|
}
|
|
3543
3630
|
async onEngineReady(event) {
|
|
@@ -3700,43 +3787,6 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3700
3787
|
}
|
|
3701
3788
|
this.themeChange.emit(event.detail.theme);
|
|
3702
3789
|
}
|
|
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
3790
|
handleToggleIsPublic = async (event) => {
|
|
3741
3791
|
const isPublic = event.detail;
|
|
3742
3792
|
const activeWorkspace = await this.engineRef.getActiveWorkspace();
|
|
@@ -3766,6 +3816,28 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3766
3816
|
get isLoggedIn() {
|
|
3767
3817
|
return !!this.user && !this.user.isGuest;
|
|
3768
3818
|
}
|
|
3819
|
+
canExportObjectsAs(objects, format) {
|
|
3820
|
+
if (!objects || objects.length !== 1) {
|
|
3821
|
+
return false;
|
|
3822
|
+
}
|
|
3823
|
+
const [selected] = objects;
|
|
3824
|
+
if (!ObjectHelper.isKritzelExportable(selected)) {
|
|
3825
|
+
return false;
|
|
3826
|
+
}
|
|
3827
|
+
return selected.getSupportedExportFormats().includes(format);
|
|
3828
|
+
}
|
|
3829
|
+
canExportObjects(objects) {
|
|
3830
|
+
return this.canExportObjectsAs(objects, 'png') || this.canExportObjectsAs(objects, 'svg');
|
|
3831
|
+
}
|
|
3832
|
+
getPreferredExportFormat(objects) {
|
|
3833
|
+
if (this.canExportObjectsAs(objects, 'png')) {
|
|
3834
|
+
return 'png';
|
|
3835
|
+
}
|
|
3836
|
+
if (this.canExportObjectsAs(objects, 'svg')) {
|
|
3837
|
+
return 'svg';
|
|
3838
|
+
}
|
|
3839
|
+
return null;
|
|
3840
|
+
}
|
|
3769
3841
|
async openLoginDialog() {
|
|
3770
3842
|
this.loginDialogRef?.open();
|
|
3771
3843
|
}
|
|
@@ -3942,41 +4014,41 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
3942
4014
|
const isLoggedIn = this.isLoggedIn;
|
|
3943
4015
|
const shouldShowCurrentUser = isLoggedIn;
|
|
3944
4016
|
const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
|
|
3945
|
-
return (h(Host, { key: '
|
|
4017
|
+
return (h(Host, { key: 'd9d87b5ca40972d7ab2c5986f340278347f78c6e' }, h("div", { key: 'd8da2ed24d19c550420689c6720dc491fe0d3a22', class: "editor-content", style: {
|
|
3946
4018
|
opacity: this.isEditorVisible ? '1' : '0',
|
|
3947
4019
|
visibility: this.isEditorVisible ? 'visible' : 'hidden',
|
|
3948
4020
|
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
3949
|
-
} }, h("div", { key: '
|
|
4021
|
+
} }, h("div", { key: '82a5d216e7c95307b1bdbd1f06fdfe881c1c50d4', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'de13673384b44bb6bd309a927a2866a9b78b519e', 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: 'f68610d7d91713f7a0ec5f0135d208769f7fab9c', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: '9d1f972fb67050b1f996e3088710713fa1219b9a', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: '295eff0a02f7cc79ad8e80cda23baa3c576ce156', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: '1d1bf140ddfb7b927d30fb1d77e7b887240d7deb', 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: '1062bc9554e5834ef2002fbfe953f7938866fb84', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
|
|
3950
4022
|
position: 'absolute',
|
|
3951
4023
|
left: `${this.contextMenuState.position.x}px`,
|
|
3952
4024
|
top: `${this.contextMenuState.position.y}px`,
|
|
3953
4025
|
zIndex: '10002',
|
|
3954
|
-
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-engine", { key: '
|
|
4026
|
+
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-sync-indicator", { key: '0094a026828473988f857d82cfccb811f36f049c', visible: this.isSyncing, text: "Syncing..." }), h("kritzel-loading-overlay", { key: '680096e20b6175104a866b9a92ca4c1d0087c93a', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), h("kritzel-engine", { key: '0698a44fcbf2d6ea786d53502350ac0c9ffb9d66', ref: el => {
|
|
3955
4027
|
if (el) {
|
|
3956
4028
|
this.engineRef = el;
|
|
3957
4029
|
}
|
|
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: '
|
|
4030
|
+
}, 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), onSyncingChange: event => (this.isSyncing = event.detail), onLoadingChange: event => (this.isLoadingOverlayVisible = event.detail) }), h("kritzel-controls", { key: '765a670807111ad68e9f8d14bdca2651a33704d4', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
|
|
3959
4031
|
if (el) {
|
|
3960
4032
|
this.controlsRef = el;
|
|
3961
4033
|
}
|
|
3962
|
-
}, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '
|
|
4034
|
+
}, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'e7c5ebab4a40b7ab4fa5d19d203129326c0009ed', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: '0aa3891b553d2abcd06e635227fd6bb6656ed739', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: '824244bbd78784c1d78ab89cc12e206ca61d84cc', class: "top-right-buttons" }, h("kritzel-settings", { key: 'baf4830b6b9ccb6241b1a1baa5cc6ff9d0295fb9', ref: el => {
|
|
3963
4035
|
if (el) {
|
|
3964
4036
|
this.settingsRef = el;
|
|
3965
4037
|
}
|
|
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: '
|
|
4038
|
+
}, 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: '57e2682450c71803cd49bfe65f16e02d9d3358bc', ref: el => {
|
|
3967
4039
|
if (el) {
|
|
3968
4040
|
this.exportRef = el;
|
|
3969
4041
|
}
|
|
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: '
|
|
4042
|
+
}, 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: '955d2a61b98d937f8eec39ab19f1b73e702c9fd7', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: 'c0885e0c8cab1a4cb50c8f6d4b17e03f32cc2b87', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '8209b2562ffb821036bb8e4dacf052cacbe99bee', ref: el => {
|
|
3971
4043
|
if (el) {
|
|
3972
4044
|
this.currentUserDialogRef = el;
|
|
3973
4045
|
this.currentUserDialogRef.addEventListener('logoutRequest', this.handleCurrentUserLogout);
|
|
3974
4046
|
}
|
|
3975
|
-
}, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton &&
|
|
4047
|
+
}, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && h("kritzel-button", { key: '9cec12de2207e8931a08c0a4f6bda39d039dfd1f', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), h("kritzel-more-menu", { key: 'fe0e1413148b9ac64e5f058790ba96b856faef9e', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: 'ea06c88b0cba0464144bea1e2247b37cc5c44646', ref: el => {
|
|
3976
4048
|
if (el) {
|
|
3977
4049
|
this.shareDialogRef = el;
|
|
3978
4050
|
}
|
|
3979
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '
|
|
4051
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: 'e9a523d5989284b7e30ac44f55882a17c82c643b', ref: el => {
|
|
3980
4052
|
if (el) {
|
|
3981
4053
|
this.loginDialogRef = el;
|
|
3982
4054
|
}
|
|
@@ -4001,6 +4073,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
4001
4073
|
"controls": [{
|
|
4002
4074
|
"onControlsChange": 0
|
|
4003
4075
|
}],
|
|
4076
|
+
"moreMenuItems": [{
|
|
4077
|
+
"onMoreMenuItemsChange": 0
|
|
4078
|
+
}],
|
|
4079
|
+
"syncConfig": [{
|
|
4080
|
+
"onSyncConfigChange": 0
|
|
4081
|
+
}],
|
|
4082
|
+
"loginConfig": [{
|
|
4083
|
+
"onLoginConfigChange": 0
|
|
4084
|
+
}],
|
|
4085
|
+
"user": [{
|
|
4086
|
+
"onUserChange": 0
|
|
4087
|
+
}],
|
|
4004
4088
|
"activeWorkspaceId": [{
|
|
4005
4089
|
"onActiveWorkspaceIdChange": 0
|
|
4006
4090
|
}],
|
|
@@ -4029,6 +4113,7 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
4029
4113
|
"controls": [16],
|
|
4030
4114
|
"globalContextMenuItems": [16],
|
|
4031
4115
|
"objectContextMenuItems": [16],
|
|
4116
|
+
"moreMenuItems": [16],
|
|
4032
4117
|
"themes": [16],
|
|
4033
4118
|
"theme": [1025],
|
|
4034
4119
|
"licenseKey": [1, "license-key"],
|
|
@@ -4070,6 +4155,9 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
4070
4155
|
"isNotificationDismissing": [32],
|
|
4071
4156
|
"contextMenuState": [32],
|
|
4072
4157
|
"normalizedControls": [32],
|
|
4158
|
+
"resolvedMoreMenuItems": [32],
|
|
4159
|
+
"isSyncing": [32],
|
|
4160
|
+
"isLoadingOverlayVisible": [32],
|
|
4073
4161
|
"getObjectById": [64],
|
|
4074
4162
|
"addObject": [64],
|
|
4075
4163
|
"addObjects": [64],
|
|
@@ -4121,8 +4209,9 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
4121
4209
|
"getScreenshot": [64],
|
|
4122
4210
|
"exportViewportAsPng": [64],
|
|
4123
4211
|
"exportViewportAsSvg": [64],
|
|
4124
|
-
"
|
|
4125
|
-
"
|
|
4212
|
+
"getSelectedObjectSupportedExportFormats": [64],
|
|
4213
|
+
"canExportSelectedObjectAs": [64],
|
|
4214
|
+
"exportSelectedObject": [64],
|
|
4126
4215
|
"downloadAsJson": [64],
|
|
4127
4216
|
"importFromFile": [64],
|
|
4128
4217
|
"loadObjectsFromJson": [64],
|
|
@@ -4164,6 +4253,18 @@ const KritzelEditor$1 = /*@__PURE__*/ proxyCustomElement(class KritzelEditor ext
|
|
|
4164
4253
|
"controls": [{
|
|
4165
4254
|
"onControlsChange": 0
|
|
4166
4255
|
}],
|
|
4256
|
+
"moreMenuItems": [{
|
|
4257
|
+
"onMoreMenuItemsChange": 0
|
|
4258
|
+
}],
|
|
4259
|
+
"syncConfig": [{
|
|
4260
|
+
"onSyncConfigChange": 0
|
|
4261
|
+
}],
|
|
4262
|
+
"loginConfig": [{
|
|
4263
|
+
"onLoginConfigChange": 0
|
|
4264
|
+
}],
|
|
4265
|
+
"user": [{
|
|
4266
|
+
"onUserChange": 0
|
|
4267
|
+
}],
|
|
4167
4268
|
"activeWorkspaceId": [{
|
|
4168
4269
|
"onActiveWorkspaceIdChange": 0
|
|
4169
4270
|
}],
|
|
@@ -4424,4 +4525,4 @@ function defineCustomElement$1() {
|
|
|
4424
4525
|
const KritzelEditor = KritzelEditor$1;
|
|
4425
4526
|
const defineCustomElement = defineCustomElement$1;
|
|
4426
4527
|
|
|
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 };
|
|
4528
|
+
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 { K as KritzelFontSize$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelFontSize$1, d as defineCustomElement$1 } from './p-2WiGyky4.js';
|
|
2
2
|
|
|
3
3
|
const KritzelFontSize = KritzelFontSize$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelLoadingOverlay$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelLoadingOverlay$1, d as defineCustomElement$1 } from './p-DB58Oa5V.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-
|
|
1
|
+
import { K as KritzelLoginDialog$1, d as defineCustomElement$1 } from './p-Dv4pZx8G.js';
|
|
2
2
|
|
|
3
3
|
const KritzelLoginDialog = KritzelLoginDialog$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelMasterDetail$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelMasterDetail$1, d as defineCustomElement$1 } from './p-CM65T33m.js';
|
|
2
2
|
|
|
3
3
|
const KritzelMasterDetail = KritzelMasterDetail$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as KritzelMenuItem$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { b as KritzelMenuItem$1, d as defineCustomElement$1 } from './p-D-UkGru5.js';
|
|
2
2
|
|
|
3
3
|
const KritzelMenuItem = KritzelMenuItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelMoreMenu$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelMoreMenu$1, d as defineCustomElement$1 } from './p-BX1aRLEi.js';
|
|
2
2
|
|
|
3
3
|
const KritzelMoreMenu = KritzelMoreMenu$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelNumericInput$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelNumericInput$1, d as defineCustomElement$1 } from './p-DKGg-76-.js';
|
|
2
2
|
|
|
3
3
|
const KritzelNumericInput = KritzelNumericInput$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelOpacitySlider$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelOpacitySlider$1, d as defineCustomElement$1 } from './p-CrHvaLRV.js';
|
|
2
2
|
|
|
3
3
|
const KritzelOpacitySlider = KritzelOpacitySlider$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelSettings$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelSettings$1, d as defineCustomElement$1 } from './p-DdabFzSa.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-
|
|
1
|
+
import { K as KritzelShareDialog$1, d as defineCustomElement$1 } from './p-B_lZQo3s.js';
|
|
2
2
|
|
|
3
3
|
const KritzelShareDialog = KritzelShareDialog$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelSlideToggle$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelSlideToggle$1, d as defineCustomElement$1 } from './p-BozrueXV.js';
|
|
2
2
|
|
|
3
3
|
const KritzelSlideToggle = KritzelSlideToggle$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelSplitButton$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelSplitButton$1, d as defineCustomElement$1 } from './p-30g2W_Gx.js';
|
|
2
2
|
|
|
3
3
|
const KritzelSplitButton = KritzelSplitButton$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|