@kritzel/editor 0.4.31 → 0.4.33
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/LICENSE.md +50 -50
- package/README.md +5 -5
- package/dist/cjs/{index-B92VHWr4.js → index-BAdxtEc7.js} +27 -9
- package/dist/cjs/kritzel-active-users_46.cjs.entry.js +1029 -366
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +2 -2
- package/dist/cjs/kritzel-editor.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kritzel-active-users/kritzel-active-users.css +65 -65
- package/dist/collection/components/kritzel-avatar/kritzel-avatar.css +58 -58
- package/dist/collection/components/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/kritzel-back-to-content/kritzel-back-to-content.css +42 -42
- package/dist/collection/components/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/kritzel-brush-style/kritzel-brush-style.css +42 -42
- package/dist/collection/components/kritzel-brush-style/kritzel-brush-style.js +3 -3
- package/dist/collection/components/kritzel-button/kritzel-button.css +73 -73
- package/dist/collection/components/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/kritzel-color/kritzel-color.css +24 -24
- package/dist/collection/components/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/kritzel-color-palette/kritzel-color-palette.css +46 -46
- package/dist/collection/components/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/kritzel-context-menu/kritzel-context-menu.css +113 -112
- package/dist/collection/components/kritzel-context-menu/kritzel-context-menu.js +1 -1
- package/dist/collection/components/kritzel-current-user/kritzel-current-user.css +11 -11
- package/dist/collection/components/kritzel-current-user/kritzel-current-user.js +1 -1
- package/dist/collection/components/kritzel-current-user-dialog/kritzel-current-user-dialog.css +39 -39
- package/dist/collection/components/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
- package/dist/collection/components/kritzel-dialog/kritzel-dialog.css +209 -209
- package/dist/collection/components/kritzel-dropdown/kritzel-dropdown.css +190 -190
- package/dist/collection/components/kritzel-dropdown/kritzel-dropdown.js +2 -2
- package/dist/collection/components/kritzel-editor/kritzel-editor.css +160 -160
- package/dist/collection/components/kritzel-editor/kritzel-editor.js +72 -46
- package/dist/collection/components/kritzel-export/kritzel-export.css +89 -89
- package/dist/collection/components/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/kritzel-font/kritzel-font.css +10 -10
- package/dist/collection/components/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/kritzel-font-family/kritzel-font-family.css +48 -48
- package/dist/collection/components/kritzel-font-family/kritzel-font-family.js +2 -2
- package/dist/collection/components/kritzel-font-size/kritzel-font-size.css +30 -30
- package/dist/collection/components/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/kritzel-input/kritzel-input.css +69 -69
- package/dist/collection/components/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/kritzel-line-endings/kritzel-line-endings.css +60 -60
- package/dist/collection/components/kritzel-line-endings/kritzel-line-endings.js +3 -3
- package/dist/collection/components/kritzel-loading-overlay/kritzel-loading-overlay.css +54 -54
- package/dist/collection/components/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
- package/dist/collection/components/kritzel-login-dialog/kritzel-login-dialog.css +98 -98
- package/dist/collection/components/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/kritzel-master-detail/kritzel-master-detail.css +190 -190
- package/dist/collection/components/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/kritzel-menu/kritzel-menu.css +35 -34
- package/dist/collection/components/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/kritzel-menu-item/kritzel-menu-item.css +166 -166
- package/dist/collection/components/kritzel-menu-item/kritzel-menu-item.js +3 -3
- package/dist/collection/components/kritzel-more-menu/kritzel-more-menu.css +58 -58
- package/dist/collection/components/kritzel-more-menu/kritzel-more-menu.js +4 -4
- package/dist/collection/components/kritzel-notification-card/kritzel-notification-card.css +101 -101
- package/dist/collection/components/kritzel-numeric-input/kritzel-numeric-input.css +102 -102
- package/dist/collection/components/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/kritzel-opacity-slider/kritzel-opacity-slider.css +85 -85
- package/dist/collection/components/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/kritzel-pill-tabs/kritzel-pill-tabs.css +68 -68
- package/dist/collection/components/kritzel-pill-tabs/kritzel-pill-tabs.js +2 -2
- package/dist/collection/components/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/kritzel-settings/kritzel-settings.css +137 -137
- package/dist/collection/components/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/kritzel-shape-fill/kritzel-shape-fill.css +47 -47
- package/dist/collection/components/kritzel-shape-fill/kritzel-shape-fill.js +4 -4
- package/dist/collection/components/kritzel-share-dialog/kritzel-share-dialog.css +150 -150
- package/dist/collection/components/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/kritzel-slide-toggle/kritzel-slide-toggle.css +48 -48
- package/dist/collection/components/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/kritzel-split-button/kritzel-split-button.css +78 -78
- package/dist/collection/components/kritzel-split-button/kritzel-split-button.js +3 -3
- package/dist/collection/components/kritzel-stroke-size/kritzel-stroke-size.css +37 -37
- package/dist/collection/components/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/kritzel-tool-config/kritzel-tool-config.css +38 -38
- package/dist/collection/components/kritzel-tool-config/kritzel-tool-config.js +1 -1
- package/dist/collection/components/kritzel-toolbar/kritzel-toolbar.css +347 -347
- package/dist/collection/components/kritzel-toolbar/kritzel-toolbar.js +12 -16
- package/dist/collection/components/kritzel-tooltip/kritzel-tooltip.css +18 -18
- package/dist/collection/components/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/kritzel-utility-panel/kritzel-utility-panel.css +45 -45
- package/dist/collection/components/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/kritzel-workspace-manager/kritzel-workspace-manager.css +16 -16
- package/dist/collection/components/kritzel-workspace-manager/kritzel-workspace-manager.js +1 -1
- package/dist/collection/components/kritzel-zoom-panel/kritzel-zoom-panel.css +72 -72
- package/dist/collection/components/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- package/dist/components/index.js +1 -1
- 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-brush-style.js +4 -4
- 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-context-menu.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-cursor-trail.js +1 -1
- package/dist/components/kritzel-dialog.js +1 -1
- package/dist/components/kritzel-dropdown.js +1 -1
- package/dist/components/kritzel-editor.js +108 -81
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-family.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-icon.js +1 -1
- package/dist/components/kritzel-input.js +1 -1
- package/dist/components/kritzel-line-endings.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-notification-card.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-pill-tabs.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-shape-fill.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-tool-config.js +1 -1
- package/dist/components/kritzel-toolbar.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-CrIEmItB.js → p-2DAZSvN6.js} +5 -5
- package/dist/components/{p-CmjXRLdr.js → p-2gylYpXk.js} +7 -7
- package/dist/components/{p-BN8VWPlq.js → p-B-Divd0Q.js} +7 -7
- package/dist/components/{p-R1D8Sr0l.js → p-B-U13Ew1.js} +3 -3
- package/dist/components/{p-BZ_KnHdR.js → p-B1rmcPZr.js} +7 -7
- package/dist/components/{p-B_gT0lCn.js → p-B2-SxV8E.js} +3 -3
- package/dist/components/p-B6Z_VKKH.js +214 -0
- package/dist/components/{p-CVxGF4bJ.js → p-B8tHdknP.js} +5 -5
- package/dist/components/{p-CoNexfpB.js → p-BDsuJNT_.js} +3 -3
- package/dist/components/{p-BvG3JO85.js → p-BMi-i7sC.js} +3 -3
- package/dist/components/{p-Cy_cLtOP.js → p-BZ0ReYAA.js} +18 -14
- package/dist/components/{p-DZsSiMnA.js → p-BeCy6w6M.js} +770 -173
- package/dist/components/{p-4-qLegHb.js → p-Bipc1XvF.js} +4 -4
- package/dist/components/{p-CS3YZVYE.js → p-BmFJelgk.js} +2 -2
- package/dist/components/{p-DqOC_Yck.js → p-BpvSYxxN.js} +6 -6
- package/dist/components/{p-peZjvnkK.js → p-C0ns8IPO.js} +2 -2
- package/dist/components/{p-ClfOtiNp.js → p-C1_r9nJU.js} +3 -3
- package/dist/components/{p-GbCxpbQ6.js → p-C2ySiAXO.js} +3 -3
- package/dist/components/{p-B3Tqoyl9.js → p-C3KlONnT.js} +3 -3
- package/dist/components/{p-B5xYV1o3.js → p-C68YXjuL.js} +2 -2
- package/dist/components/{p-DJxgPPfs.js → p-CCuNN278.js} +3 -3
- package/dist/components/{p-Ds0uNtwQ.js → p-CNH7N3Aq.js} +4 -4
- package/dist/components/{p-DVv8ChhE.js → p-CO1cJlfg.js} +4 -4
- package/dist/components/{p-Cp4e4oTE.js → p-CqHKGLYE.js} +2 -2
- package/dist/components/{p-Blq9a1ni.js → p-CrEWqua9.js} +6 -6
- package/dist/components/{p-CvaxFYS0.js → p-Cv2nqOL8.js} +8 -8
- package/dist/components/{p-CzUeIini.js → p-D-1ixLxq.js} +13 -13
- package/dist/components/{p-BfMlwIcG.js → p-DF8p-DxR.js} +3 -3
- package/dist/components/{p-QEue33R5.js → p-DQ3VKzAS.js} +3 -3
- package/dist/components/{p-Ckqh1tqY.js → p-DRe-rTlX.js} +27 -31
- package/dist/components/{p-McY5wZ0h.js → p-DSyb29RF.js} +2 -2
- package/dist/components/{p-D0tPTPkR.js → p-DYDruZIw.js} +3 -3
- package/dist/components/{p-kOINnzaR.js → p-D_JxJxQ6.js} +7 -7
- package/dist/components/{p-BDjRSoAc.js → p-Dko_6jIh.js} +2 -2
- package/dist/components/{p-BjFrt1q0.js → p-DnHvqeyr.js} +3 -3
- package/dist/components/{p-BrGJIoGK.js → p-DqMikMrS.js} +3 -3
- package/dist/components/p-DsnHq8en.js +55 -0
- package/dist/components/{p-DXZBWJBt.js → p-DxFNLy9X.js} +4 -4
- package/dist/components/{p-5qkOM1RJ.js → p-Dzr6X2aj.js} +16 -4
- package/dist/components/{p-DXuf225S.js → p-HbHo7awi.js} +3 -3
- package/dist/components/{p-CwBxnzYu.js → p-Qbk7xE91.js} +3 -3
- package/dist/components/{p-h_uh_Njf.js → p-VYGV0cr3.js} +3 -3
- package/dist/components/{p-DyRJFg4w.js → p-YGBl60lb.js} +2 -2
- package/dist/components/{p-hQwVRh0t.js → p-clFfXKKn.js} +7 -7
- package/dist/components/{p-SLnqczCS.js → p-dUcCDLDF.js} +3 -3
- package/dist/components/{p-B6UJztrf.js → p-kXnNX65j.js} +4 -4
- package/dist/esm/{index-OjbYJz-P.js → index-YR-6hzAW.js} +27 -10
- package/dist/esm/kritzel-active-users_46.entry.js +1029 -366
- package/dist/esm/kritzel-brush-style.entry.js +2 -2
- package/dist/esm/kritzel-editor.js +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/kritzel-editor/kritzel-editor.esm.js +4 -4
- package/dist/kritzel-editor/{p-501047d8.entry.js → p-3a0f60b0.entry.js} +2 -2
- package/dist/kritzel-editor/{p-OjbYJz-P.js → p-YR-6hzAW.js} +27 -10
- package/dist/kritzel-editor/{p-60319edb.entry.js → p-adc45d46.entry.js} +1029 -366
- package/dist/types/components/kritzel-editor/kritzel-editor.d.ts +9 -2
- package/dist/types/components.d.ts +15 -15
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/package.json +3 -3
- package/dist/components/p-BGmTmdLe.js +0 -167
- package/dist/components/p-DOJCDPVD.js +0 -55
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BAdxtEc7.js');
|
|
4
4
|
var engine = require('@kritzel/engine');
|
|
5
5
|
|
|
6
|
-
const kritzelActiveUsersCss = () => `:host{display:inline-flex;align-items:center}.avatars{display:flex;align-items:center}.avatar-wrapper{position:relative;transition:margin-left 200ms ease}.avatar-wrapper kritzel-avatar{border-radius:50%;box-shadow:0 0 0 2px var(--kritzel-active-users-avatar-border-color, #ffffff)}.avatars:hover .avatar-wrapper{margin-left:-6px !important}.avatar-tooltip{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:12px;padding:4px 8px;background-color:var(--kritzel-active-users-tooltip-background, #333333);color:var(--kritzel-active-users-tooltip-color, #ffffff);font-family:sans-serif;font-size:12px;font-weight:500;border-radius:4px;white-space:nowrap;width:max-content;pointer-events:none;opacity:0;transition:opacity 150ms ease}.avatar-wrapper:hover .avatar-tooltip,.overflow-count:hover .avatar-tooltip{opacity:1}.overflow-count{position:relative;margin-left:8px;font-family:sans-serif;font-size:var(--kritzel-active-users-overflow-font-size, 14px);font-weight:500;color:var(--kritzel-active-users-overflow-color, #666666);white-space:nowrap;cursor:default}.overflow-count .avatar-tooltip{white-space:nowrap;text-align:left;margin-top:20px}`;
|
|
6
|
+
const kritzelActiveUsersCss = () => `:host{display:inline-flex;align-items:center}.avatars{display:flex;align-items:center}.avatar-wrapper{position:relative;transition:margin-left 200ms ease}.avatar-wrapper kritzel-avatar{border-radius:50%;box-shadow:0 0 0 2px var(--kritzel-active-users-avatar-border-color, #ffffff)}.avatars:hover .avatar-wrapper{margin-left:-6px !important}.avatar-tooltip{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:12px;padding:4px 8px;background-color:var(--kritzel-active-users-tooltip-background, #333333);color:var(--kritzel-active-users-tooltip-color, #ffffff);font-family:var(--kritzel-active-users-font-family, var(--kritzel-global-font-family, sans-serif));font-size:12px;font-weight:500;border-radius:4px;white-space:nowrap;width:max-content;pointer-events:none;opacity:0;transition:opacity 150ms ease}.avatar-wrapper:hover .avatar-tooltip,.overflow-count:hover .avatar-tooltip{opacity:1}.overflow-count{position:relative;margin-left:8px;font-family:var(--kritzel-active-users-font-family, var(--kritzel-global-font-family, sans-serif));font-size:var(--kritzel-active-users-overflow-font-size, 14px);font-weight:500;color:var(--kritzel-active-users-overflow-color, #666666);white-space:nowrap;cursor:default}.overflow-count .avatar-tooltip{white-space:nowrap;text-align:left;margin-top:20px}`;
|
|
7
7
|
|
|
8
8
|
const KritzelActiveUsers = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -129,16 +129,16 @@ const KritzelAvatar = class {
|
|
|
129
129
|
height: `${this.size}px`,
|
|
130
130
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
131
131
|
};
|
|
132
|
-
return (index.h(index.Host, { key: '
|
|
132
|
+
return (index.h(index.Host, { key: 'd66c2ec474fed4b7b07687f1a02d0d97f893b689', style: containerStyles, class: {
|
|
133
133
|
'has-image': !!showImage,
|
|
134
134
|
'has-initials': !!showInitials,
|
|
135
135
|
'has-default': !!showDefaultIcon,
|
|
136
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: '
|
|
136
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: 'd2aefda3897b2278c0d640c75084335f6786bd3b', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
137
137
|
if (el) {
|
|
138
138
|
el.referrerPolicy = 'no-referrer';
|
|
139
139
|
el.crossOrigin = 'anonymous';
|
|
140
140
|
}
|
|
141
|
-
}, onError: this.handleImageError })), showInitials && (index.h("span", { key: '
|
|
141
|
+
}, onError: this.handleImageError })), showInitials && (index.h("span", { key: '1837201e58bcb96877981f0970edcc39ba6058e6', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (index.h("span", { key: '9578696c0b5ca200ccf82586e49e42ab57909aee', class: "avatar-default" }, index.h("svg", { key: 'cf521d25aa25a6f8af921d6179a99077a42752ef', viewBox: "0 0 24 24", fill: "currentColor" }, index.h("path", { key: 'cbf16a181e4ba351c6337355b067ecd1d7787f28', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
142
142
|
}
|
|
143
143
|
static get watchers() { return {
|
|
144
144
|
"user": [{
|
|
@@ -199,6 +199,19 @@ class ObjectHelper {
|
|
|
199
199
|
static isClass(object, className) {
|
|
200
200
|
return !!object && object.__class__ === className;
|
|
201
201
|
}
|
|
202
|
+
static isKritzelEmbeddedObject(object) {
|
|
203
|
+
if (!object || typeof object !== 'object') {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
const candidate = object;
|
|
207
|
+
return (typeof candidate.isInteractive === 'boolean' &&
|
|
208
|
+
typeof candidate.isSelected === 'boolean' &&
|
|
209
|
+
typeof candidate.mount === 'function' &&
|
|
210
|
+
typeof candidate.unmount === 'function' &&
|
|
211
|
+
typeof candidate.setIsInteractive === 'function' &&
|
|
212
|
+
typeof candidate.hasFocusedInputElement === 'function' &&
|
|
213
|
+
typeof candidate.getEmbeddedContentRoots === 'function');
|
|
214
|
+
}
|
|
202
215
|
static isKritzelExportable(object) {
|
|
203
216
|
if (!object || typeof object !== 'object') {
|
|
204
217
|
return false;
|
|
@@ -1448,6 +1461,7 @@ const lightTheme = {
|
|
|
1448
1461
|
dividerColor: '#e0e0e0',
|
|
1449
1462
|
focusColor: '#333333',
|
|
1450
1463
|
focusRingColor: '#333333',
|
|
1464
|
+
fontFamily: 'sans-serif',
|
|
1451
1465
|
iconColor: 'currentColor',
|
|
1452
1466
|
scrollbarThumbColor: '#ebebeb',
|
|
1453
1467
|
textPrimary: '#000000',
|
|
@@ -1536,7 +1550,6 @@ const lightTheme = {
|
|
|
1536
1550
|
closeButtonColor: '#333333',
|
|
1537
1551
|
closeButtonHoverBackground: 'hsl(0, 0%, 0%, 4.3%)',
|
|
1538
1552
|
closeButtonHoverColor: '#000000',
|
|
1539
|
-
fontFamily: 'inherit',
|
|
1540
1553
|
footerBorder: '1px solid #ebebeb',
|
|
1541
1554
|
headerBorder: '1px solid #ebebeb',
|
|
1542
1555
|
titleColor: '#000000',
|
|
@@ -1571,11 +1584,6 @@ const lightTheme = {
|
|
|
1571
1584
|
loadingOverlayColor: '#333333',
|
|
1572
1585
|
loadingOverlaySpinnerActiveColor: '#333333',
|
|
1573
1586
|
loadingOverlaySpinnerColor: '#cccccc',
|
|
1574
|
-
syncIndicatorBackground: 'rgba(255, 255, 255, 0.92)',
|
|
1575
|
-
syncIndicatorColor: '#334155',
|
|
1576
|
-
syncIndicatorSpinnerColor: '#007AFF',
|
|
1577
|
-
syncIndicatorSpinnerTrack: 'rgba(148, 163, 184, 0.35)',
|
|
1578
|
-
syncIndicatorZIndex: '10001',
|
|
1579
1587
|
},
|
|
1580
1588
|
snap: {
|
|
1581
1589
|
indicatorFill: 'rgba(59, 130, 246, 0.3)',
|
|
@@ -1795,6 +1803,7 @@ const darkTheme = {
|
|
|
1795
1803
|
dividerColor: '#3a3a3a',
|
|
1796
1804
|
focusColor: '#ffffff',
|
|
1797
1805
|
focusRingColor: '#ffffff',
|
|
1806
|
+
fontFamily: 'sans-serif',
|
|
1798
1807
|
iconColor: 'currentColor',
|
|
1799
1808
|
scrollbarThumbColor: '#555555',
|
|
1800
1809
|
textPrimary: '#ffffff',
|
|
@@ -1917,11 +1926,6 @@ const darkTheme = {
|
|
|
1917
1926
|
loadingOverlayColor: '#e0e0e0',
|
|
1918
1927
|
loadingOverlaySpinnerActiveColor: '#e0e0e0',
|
|
1919
1928
|
loadingOverlaySpinnerColor: '#555555',
|
|
1920
|
-
syncIndicatorBackground: 'rgba(30, 30, 30, 0.95)',
|
|
1921
|
-
syncIndicatorColor: '#e0e0e0',
|
|
1922
|
-
syncIndicatorSpinnerColor: '#0A84FF',
|
|
1923
|
-
syncIndicatorSpinnerTrack: 'rgba(160, 160, 160, 0.3)',
|
|
1924
|
-
syncIndicatorZIndex: '10001',
|
|
1925
1929
|
},
|
|
1926
1930
|
snap: {
|
|
1927
1931
|
indicatorFill: 'rgba(10, 132, 255, 0.35)',
|
|
@@ -3298,7 +3302,7 @@ class KritzelLine extends KritzelBaseObject {
|
|
|
3298
3302
|
}
|
|
3299
3303
|
}
|
|
3300
3304
|
|
|
3301
|
-
const kritzelAwarenessCursorsCss = () => `:host{display:block;position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1}.awareness-cursor{position:absolute;top:0;left:0;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
3305
|
+
const kritzelAwarenessCursorsCss = () => `:host{display:block;position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1}.awareness-cursor{position:absolute;top:0;left:0;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, opacity 300ms ease;will-change:transform}.awareness-cursor.stale{opacity:0}.awareness-cursor.tracking-object{transition-duration:0ms}.cursor-arrow{filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3))}.cursor-label{position:absolute;left:16px;top:16px;white-space:nowrap;font-family:var(--kritzel-awareness-font-family, var(--kritzel-global-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));font-size:var(--kritzel-awareness-cursor-label-font-size, 12px);color:var(--kritzel-awareness-cursor-label-text-color, #ffffff);padding:2px 8px;border-radius:4px;line-height:1.4;font-weight:500;pointer-events:none;user-select:none}.edge-indicator{position:absolute;top:-12px;left:-12px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, opacity 300ms ease;will-change:transform;pointer-events:auto;user-select:none;cursor:pointer}.edge-indicator.stale{opacity:0}.edge-indicator.tracking-object{transition-duration:0ms}.edge-arrow{position:absolute;filter:drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));transition:opacity 300ms ease}.edge-arrow.stale{opacity:0}.edge-label{position:absolute;white-space:nowrap;font-family:var(--kritzel-awareness-font-family, var(--kritzel-global-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));font-size:var(--kritzel-awareness-cursor-label-font-size, 12px);color:var(--kritzel-awareness-cursor-label-text-color, #ffffff);padding:2px 8px;border-radius:4px;line-height:1.4;font-weight:500;pointer-events:none;opacity:0;transform-origin:center;transition:opacity 150ms ease}.edge-indicator:hover .edge-label{opacity:1}.remote-selection-box{position:absolute;top:0;left:0;border-width:2px;border-style:solid;pointer-events:none;will-change:transform, width, height;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out}`;
|
|
3302
3306
|
|
|
3303
3307
|
const STALE_THRESHOLD_MS = 10_000;
|
|
3304
3308
|
const REMOVE_THRESHOLD_MS = 30_000;
|
|
@@ -3503,7 +3507,7 @@ const KritzelAwarenessCursors = class {
|
|
|
3503
3507
|
}
|
|
3504
3508
|
render() {
|
|
3505
3509
|
const cursors = Array.from(this.remoteCursors.values());
|
|
3506
|
-
return (index.h(index.Host, { key: '
|
|
3510
|
+
return (index.h(index.Host, { key: '2021875ea3e430c04da438dc5b7a2c22f119ea67' }, cursors.map(remoteCursor => {
|
|
3507
3511
|
if (!remoteCursor.cursor)
|
|
3508
3512
|
return null;
|
|
3509
3513
|
// When a remote user is actively drawing, derive cursor position from
|
|
@@ -3610,12 +3614,12 @@ const KritzelBackToContent = class {
|
|
|
3610
3614
|
this.backToContent.emit();
|
|
3611
3615
|
};
|
|
3612
3616
|
render() {
|
|
3613
|
-
return (index.h(index.Host, { key: '
|
|
3617
|
+
return (index.h(index.Host, { key: '335205a7ec6430235c54941828b7491d75472778' }, index.h("button", { key: '176e473183c4d58607a697c924035baec67c138d', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, index.h("kritzel-icon", { key: '44ad49916d1ee99fed8e635de65f7ae337235ecb', name: "chevronsLeft" }))));
|
|
3614
3618
|
}
|
|
3615
3619
|
};
|
|
3616
3620
|
KritzelBackToContent.style = kritzelBackToContentCss();
|
|
3617
3621
|
|
|
3618
|
-
const kritzelButtonCss = () => `:host{display:inline-block;font-family:sans-serif}button{border:none;background-color:transparent;padding:0;margin:0;font-family:inherit;font-size:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:var(--kritzel-global-pointer-cursor, pointer);display:inline-flex;width:var(--kritzel-button-width, auto);align-items:center;justify-content:center;gap:6px;border-radius:var(--kritzel-button-border-radius, 8px);padding:var(--kritzel-button-padding, 12px 20px);font-size:var(--kritzel-button-font-size, 14px);font-weight:var(--kritzel-button-font-weight, 500);transition:background-color 0.15s ease, opacity 0.15s ease;-webkit-tap-highlight-color:transparent}button.primary{background-color:var(--kritzel-button-primary-background-color, #007AFF);color:var(--kritzel-button-primary-color, #ffffff)}button.primary:hover{background-color:var(--kritzel-button-primary-hover-background-color, #006ae6)}button.primary:active{background-color:var(--kritzel-button-primary-active-background-color, #005bbf)}button.secondary{background-color:var(--kritzel-button-secondary-background-color, #f0f0f0);color:var(--kritzel-button-secondary-color, #333333)}button.secondary:hover{background-color:var(--kritzel-button-secondary-hover-background-color, #e0e0e0)}button.secondary:active{background-color:var(--kritzel-button-secondary-active-background-color, #d0d0d0)}button.text{background-color:transparent;color:var(--kritzel-button-text-color, #007AFF)}button.text:hover{background-color:var(--kritzel-button-text-hover-background-color, rgba(0, 122, 255, 0.08))}button.text:active{background-color:var(--kritzel-button-text-active-background-color, rgba(0, 122, 255, 0.15))}button.disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}`;
|
|
3622
|
+
const kritzelButtonCss = () => `:host{display:inline-block;font-family:var(--kritzel-button-font-family, var(--kritzel-global-font-family, sans-serif))}button{border:none;background-color:transparent;padding:0;margin:0;font-family:inherit;font-size:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:var(--kritzel-global-pointer-cursor, pointer);display:inline-flex;width:var(--kritzel-button-width, auto);align-items:center;justify-content:center;gap:6px;border-radius:var(--kritzel-button-border-radius, 8px);padding:var(--kritzel-button-padding, 12px 20px);font-size:var(--kritzel-button-font-size, 14px);font-weight:var(--kritzel-button-font-weight, 500);transition:background-color 0.15s ease, opacity 0.15s ease;-webkit-tap-highlight-color:transparent}button.primary{background-color:var(--kritzel-button-primary-background-color, #007AFF);color:var(--kritzel-button-primary-color, #ffffff)}button.primary:hover{background-color:var(--kritzel-button-primary-hover-background-color, #006ae6)}button.primary:active{background-color:var(--kritzel-button-primary-active-background-color, #005bbf)}button.secondary{background-color:var(--kritzel-button-secondary-background-color, #f0f0f0);color:var(--kritzel-button-secondary-color, #333333)}button.secondary:hover{background-color:var(--kritzel-button-secondary-hover-background-color, #e0e0e0)}button.secondary:active{background-color:var(--kritzel-button-secondary-active-background-color, #d0d0d0)}button.text{background-color:transparent;color:var(--kritzel-button-text-color, #007AFF)}button.text:hover{background-color:var(--kritzel-button-text-hover-background-color, rgba(0, 122, 255, 0.08))}button.text:active{background-color:var(--kritzel-button-text-active-background-color, rgba(0, 122, 255, 0.15))}button.disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}`;
|
|
3619
3623
|
|
|
3620
3624
|
const KritzelButton = class {
|
|
3621
3625
|
constructor(hostRef) {
|
|
@@ -3637,16 +3641,16 @@ const KritzelButton = class {
|
|
|
3637
3641
|
this.buttonClick.emit();
|
|
3638
3642
|
};
|
|
3639
3643
|
render() {
|
|
3640
|
-
return (index.h(index.Host, { key: '
|
|
3644
|
+
return (index.h(index.Host, { key: 'e88abc53a52cd32846b389f9de239d3f98b7230f' }, index.h("button", { key: 'de77c4ac750f35766b9657276addf78068be1575', type: this.type, class: {
|
|
3641
3645
|
'kritzel-button': true,
|
|
3642
3646
|
[this.variant]: true,
|
|
3643
3647
|
'disabled': this.disabled,
|
|
3644
|
-
}, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: '
|
|
3648
|
+
}, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: 'bdd2227879415dccc23676cf219ef17b1dd104fe' }))));
|
|
3645
3649
|
}
|
|
3646
3650
|
};
|
|
3647
3651
|
KritzelButton.style = kritzelButtonCss();
|
|
3648
3652
|
|
|
3649
|
-
const kritzelColorCss = () => `:host{display:flex}.checkerboard-bg{background:repeating-conic-gradient(
|
|
3653
|
+
const kritzelColorCss = () => `:host{display:flex}.checkerboard-bg{background:repeating-conic-gradient( var(--kritzel-checkerboard-color-dark, #ccc) 0% 25%, var(--kritzel-checkerboard-color-light, #fff) 0% 50% ) 50% / 8px 8px;position:relative;overflow:hidden}.color-circle{width:24px;height:24px;border-radius:50%;box-sizing:border-box;display:block}.color-circle.white{border:1px solid var(--kritzel-color-palette-circle-border-color, #dddcdc)}`;
|
|
3650
3654
|
|
|
3651
3655
|
const KritzelColorComponent = class {
|
|
3652
3656
|
constructor(hostRef) {
|
|
@@ -3689,13 +3693,13 @@ const KritzelColorComponent = class {
|
|
|
3689
3693
|
render() {
|
|
3690
3694
|
const resolvedColor = this.resolveColor();
|
|
3691
3695
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
3692
|
-
return (index.h(index.Host, { key: '
|
|
3696
|
+
return (index.h(index.Host, { key: 'b75cfa0ca9d5927fe9cb1331f7e4163abc34c0c1' }, index.h("div", { key: '197ec4d1daaf5804b69907b8de074784686face4', class: "checkerboard-bg", style: {
|
|
3693
3697
|
width: `${this.size}px`,
|
|
3694
3698
|
height: `${this.size}px`,
|
|
3695
3699
|
borderRadius: '50%',
|
|
3696
3700
|
display: 'inline-block',
|
|
3697
3701
|
position: 'relative',
|
|
3698
|
-
} }, index.h("div", { key: '
|
|
3702
|
+
} }, index.h("div", { key: 'ed8b7dc412569d05c747014a32948930c392b980', class: {
|
|
3699
3703
|
'color-circle': true,
|
|
3700
3704
|
'white': isColorVeryLight,
|
|
3701
3705
|
}, style: {
|
|
@@ -3751,7 +3755,7 @@ const KritzelColorPalette = class {
|
|
|
3751
3755
|
render() {
|
|
3752
3756
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
3753
3757
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
3754
|
-
return (index.h(index.Host, { key: '
|
|
3758
|
+
return (index.h(index.Host, { key: 'cfdd5136f512aed23198d4a55c628ccd675f08c9' }, index.h("div", { key: 'bb5445f68b9d17268c6def7cfc4a2dd1fb971c53', class: {
|
|
3755
3759
|
'color-grid': true,
|
|
3756
3760
|
'expanded': this.isExpanded,
|
|
3757
3761
|
}, style: {
|
|
@@ -3766,7 +3770,7 @@ const KritzelColorPalette = class {
|
|
|
3766
3770
|
};
|
|
3767
3771
|
KritzelColorPalette.style = kritzelColorPaletteCss();
|
|
3768
3772
|
|
|
3769
|
-
const kritzelContextMenuCss = () => `:host{display:block}.menu-container{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--kritzel-context-menu-item-spacing, 2px);background-color:var(--kritzel-context-menu-background-color, #ffffff);border-radius:var(--kritzel-context-menu-border-radius, 12px);box-shadow:var(--kritzel-context-menu-box-shadow, 0 1px 6px rgba(0, 0, 0, 0.12));border:var(--kritzel-context-menu-border, 1px solid #ebebeb);padding:var(--kritzel-context-menu-padding, 4px);min-width:var(--kritzel-context-menu-min-width, 140px)}.menu-item-wrapper{position:relative}.menu-item{display:flex;align-items:center;gap:var(--kritzel-context-menu-item-gap, 8px);background:none;border:none;text-align:left;padding:var(--kritzel-context-menu-item-padding, 8px);border-radius:var(--kritzel-context-menu-item-border-radius, 12px);cursor:var(--kritzel-global-pointer-cursor, pointer);font-size:var(--kritzel-context-menu-item-font-size, 14px);color:var(--kritzel-context-menu-item-color, #333333);white-space:nowrap;-webkit-tap-highlight-color:transparent;width:100%;min-width:0}.menu-item:not(.disabled):hover,.menu-item.submenu-open{background-color:var(--kritzel-context-menu-item-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.menu-item:not(.disabled):active{background-color:var(--kritzel-context-menu-item-active-background-color, hsl(0, 0%, 0%, 8.6%))}.menu-item.disabled{color:var(--kritzel-context-menu-item-disabled-color, #aaaaaa)}.menu-item.has-children.disabled{cursor:var(--kritzel-global-pointer-cursor, pointer);color:var(--kritzel-context-menu-item-color, #333333)}.menu-item kritzel-icon{opacity:0.8;flex-shrink:0}.menu-item.disabled kritzel-icon{opacity:0.4}.menu-item.has-children.disabled kritzel-icon{opacity:0.8}.label{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.submenu-arrow{margin-left:auto;opacity:0.5}.menu-divider{height:1px;background-color:var(--kritzel-context-menu-divider-color, rgba(0, 0, 0, 0.1));margin:var(--kritzel-context-menu-divider-margin, 4px 8px)}.submenu-container{position:absolute;top:0;left:100%;z-index:2;margin-left:4px;display:flex;flex-direction:column;gap:var(--kritzel-context-menu-item-spacing, 2px);background-color:var(--kritzel-context-menu-background-color, #ffffff);border-radius:var(--kritzel-context-menu-border-radius, 12px);box-shadow:var(--kritzel-context-menu-box-shadow, 0 1px 6px rgba(0, 0, 0, 0.12));border:var(--kritzel-context-menu-border, 1px solid #ebebeb);padding:var(--kritzel-context-menu-padding, 4px);min-width:120px}.submenu-container.position-left{left:auto;right:100%;margin-left:0;margin-right:4px}`;
|
|
3773
|
+
const kritzelContextMenuCss = () => `:host{display:block}.menu-container{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--kritzel-context-menu-item-spacing, 2px);background-color:var(--kritzel-context-menu-background-color, #ffffff);border-radius:var(--kritzel-context-menu-border-radius, 12px);box-shadow:var(--kritzel-context-menu-box-shadow, 0 1px 6px rgba(0, 0, 0, 0.12));border:var(--kritzel-context-menu-border, 1px solid #ebebeb);padding:var(--kritzel-context-menu-padding, 4px);min-width:var(--kritzel-context-menu-min-width, 140px)}.menu-item-wrapper{position:relative}.menu-item{display:flex;align-items:center;gap:var(--kritzel-context-menu-item-gap, 8px);font-family:var(--kritzel-context-menu-font-family, var(--kritzel-global-font-family, sans-serif));background:none;border:none;text-align:left;padding:var(--kritzel-context-menu-item-padding, 8px);border-radius:var(--kritzel-context-menu-item-border-radius, 12px);cursor:var(--kritzel-global-pointer-cursor, pointer);font-size:var(--kritzel-context-menu-item-font-size, 14px);color:var(--kritzel-context-menu-item-color, #333333);white-space:nowrap;-webkit-tap-highlight-color:transparent;width:100%;min-width:0}.menu-item:not(.disabled):hover,.menu-item.submenu-open{background-color:var(--kritzel-context-menu-item-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.menu-item:not(.disabled):active{background-color:var(--kritzel-context-menu-item-active-background-color, hsl(0, 0%, 0%, 8.6%))}.menu-item.disabled{color:var(--kritzel-context-menu-item-disabled-color, #aaaaaa)}.menu-item.has-children.disabled{cursor:var(--kritzel-global-pointer-cursor, pointer);color:var(--kritzel-context-menu-item-color, #333333)}.menu-item kritzel-icon{opacity:0.8;flex-shrink:0}.menu-item.disabled kritzel-icon{opacity:0.4}.menu-item.has-children.disabled kritzel-icon{opacity:0.8}.label{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.submenu-arrow{margin-left:auto;opacity:0.5}.menu-divider{height:1px;background-color:var(--kritzel-context-menu-divider-color, rgba(0, 0, 0, 0.1));margin:var(--kritzel-context-menu-divider-margin, 4px 8px)}.submenu-container{position:absolute;top:0;left:100%;z-index:2;margin-left:4px;display:flex;flex-direction:column;gap:var(--kritzel-context-menu-item-spacing, 2px);background-color:var(--kritzel-context-menu-background-color, #ffffff);border-radius:var(--kritzel-context-menu-border-radius, 12px);box-shadow:var(--kritzel-context-menu-box-shadow, 0 1px 6px rgba(0, 0, 0, 0.12));border:var(--kritzel-context-menu-border, 1px solid #ebebeb);padding:var(--kritzel-context-menu-padding, 4px);min-width:120px}.submenu-container.position-left{left:auto;right:100%;margin-left:0;margin-right:4px}`;
|
|
3770
3774
|
|
|
3771
3775
|
const VIEWPORT_PADDING = 8;
|
|
3772
3776
|
const SUBMENU_DELAY = 150;
|
|
@@ -3997,7 +4001,7 @@ const KritzelContextMenu = class {
|
|
|
3997
4001
|
const submenuOpen = hasChildren && this.isSubmenuOpen(path);
|
|
3998
4002
|
return [
|
|
3999
4003
|
showDivider && index.h("div", { class: "menu-divider", key: `divider-${path}` }),
|
|
4000
|
-
index.h("div", { class: "menu-item-wrapper", key: `wrapper-${path}`, ref: el => el && this.menuItemWrapperRefs.set(path, el), onMouseEnter: () => this.handleItemMouseEnter(path, hasChildren) }, index.h("button", { key: `${item.label}-${path}`, class: { 'menu-item': true, 'disabled': isDisabled, 'has-children': hasChildren, 'submenu-open': submenuOpen }, onClick: () => this.handleItemClick(item, isDisabled, hasChildren), disabled: isDisabled && !hasChildren }, item.icon && index.h("kritzel-icon", { name: item.icon, size: 16 }), index.h("span", { class: "label" }, item.label), hasChildren && index.h("kritzel-icon", { name: "
|
|
4004
|
+
index.h("div", { class: "menu-item-wrapper", key: `wrapper-${path}`, ref: el => el && this.menuItemWrapperRefs.set(path, el), onMouseEnter: () => this.handleItemMouseEnter(path, hasChildren) }, index.h("button", { key: `${item.label}-${path}`, class: { 'menu-item': true, 'disabled': isDisabled, 'has-children': hasChildren, 'submenu-open': submenuOpen }, onClick: () => this.handleItemClick(item, isDisabled, hasChildren), disabled: isDisabled && !hasChildren }, item.icon && index.h("kritzel-icon", { name: item.icon, size: 16 }), index.h("span", { class: "label" }, item.label), hasChildren && index.h("kritzel-icon", { name: "chevronRight", size: 12, class: "submenu-arrow" })), hasChildren && submenuOpen && this.renderSubmenu(processedChildren, path)),
|
|
4001
4005
|
];
|
|
4002
4006
|
});
|
|
4003
4007
|
}
|
|
@@ -4037,7 +4041,7 @@ const KritzelCurrentUser = class {
|
|
|
4037
4041
|
/** Resolved localized strings keyed by term key, supplied by the editor. */
|
|
4038
4042
|
terms = {};
|
|
4039
4043
|
render() {
|
|
4040
|
-
return (index.h(index.Host, { key: '
|
|
4044
|
+
return (index.h(index.Host, { key: 'e6b56d76dd339fd10216a4d788d56de1fdd20fc6' }, index.h("kritzel-avatar", { key: '03445e8fe4c43aa4015b6ec124ac731baec03a22', user: this.user, size: this.avatarSize })));
|
|
4041
4045
|
}
|
|
4042
4046
|
};
|
|
4043
4047
|
KritzelCurrentUser.style = kritzelCurrentUserCss();
|
|
@@ -4078,7 +4082,7 @@ const KritzelCurrentUserDialog = class {
|
|
|
4078
4082
|
}
|
|
4079
4083
|
render() {
|
|
4080
4084
|
const displayName = this.getDisplayName();
|
|
4081
|
-
return (index.h(index.Host, { key: '
|
|
4085
|
+
return (index.h(index.Host, { key: '267ed65fe03d4de50880b5957c717c47fd2ec0c9' }, index.h("kritzel-dialog", { key: '7c5ef6bb8b29f04cc194cde990658869a0919015', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '734e5f893425d5d89631ad7c3e95697edd751837', class: "user-info" }, index.h("kritzel-avatar", { key: '926a957b6d7f78184a98f4ad96480b29210e6184', user: this.user, size: 80 }), displayName && index.h("div", { key: '054d3a724d0785d2a161fdcba23ca33c07dc18e2', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: 'a401b8f48d9dcd4ec990072f63a27111c476c224', class: "user-email" }, this.user.email), index.h("kritzel-button", { key: 'b1e8757279910a71dbee12be19635b4aa55bd23e', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
|
|
4082
4086
|
}
|
|
4083
4087
|
};
|
|
4084
4088
|
KritzelCurrentUserDialog.style = kritzelCurrentUserDialogCss();
|
|
@@ -4158,7 +4162,7 @@ const KritzelCursorTrail = class {
|
|
|
4158
4162
|
}
|
|
4159
4163
|
}
|
|
4160
4164
|
render() {
|
|
4161
|
-
return (index.h(index.Host, { key: '
|
|
4165
|
+
return (index.h(index.Host, { key: '39d026a0d4c444564f146a90ea1a51181d0652b7' }, this.cursorTrailPoints.length > 1 && (index.h("svg", { key: '927e52cd0828a548ba58e0e783b1d148a40c968c', class: "cursor-trail-svg", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
4162
4166
|
position: 'absolute',
|
|
4163
4167
|
left: '0',
|
|
4164
4168
|
top: '0',
|
|
@@ -4181,7 +4185,7 @@ const KritzelCursorTrail = class {
|
|
|
4181
4185
|
};
|
|
4182
4186
|
KritzelCursorTrail.style = kritzelCursorTrailCss();
|
|
4183
4187
|
|
|
4184
|
-
const kritzelDialogCss = () => `:host{display:contents}.dialog-content{text-align:start;line-height:normal}.backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10002;display:flex;align-items:center;justify-content:center;background-color:var(--kritzel-dialog-backdrop-color, rgba(0, 0, 0, 0.5));opacity:1;transition:opacity 150ms ease-out}.backdrop.is-animating{opacity:0}.dialog-content{position:relative;display:flex;flex-direction:column;background-color:var(--kritzel-dialog-background-color, #ffffff);border-radius:var(--kritzel-dialog-border-radius, 12px);box-shadow:var(--kritzel-dialog-box-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));border:var(--kritzel-dialog-border, 1px solid #ebebeb);max-height:var(--kritzel-dialog-max-height, 90vh);max-width:var(--kritzel-dialog-max-width, 90vw);overflow:hidden;transform:scale(1);opacity:1;transition:transform 200ms ease-out,
|
|
4188
|
+
const kritzelDialogCss = () => `:host{display:contents}.dialog-content{text-align:start;line-height:normal}.backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10002;display:flex;align-items:center;justify-content:center;background-color:var(--kritzel-dialog-backdrop-color, rgba(0, 0, 0, 0.5));opacity:1;transition:opacity 150ms ease-out}.backdrop.is-animating{opacity:0}.dialog-content{position:relative;display:flex;flex-direction:column;background-color:var(--kritzel-dialog-background-color, #ffffff);border-radius:var(--kritzel-dialog-border-radius, 12px);box-shadow:var(--kritzel-dialog-box-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));border:var(--kritzel-dialog-border, 1px solid #ebebeb);max-height:var(--kritzel-dialog-max-height, 90vh);max-width:var(--kritzel-dialog-max-width, 90vw);overflow:hidden;transform:scale(1);opacity:1;transition:transform 200ms ease-out, opacity 200ms ease-out;font-family:var(--kritzel-dialog-font-family, var(--kritzel-global-font-family, sans-serif))}.dialog-content.is-animating{transform:scale(0.95);opacity:0}.dialog-content.size-small{width:var(--kritzel-dialog-width-small, 320px);height:var(--kritzel-dialog-height-small, auto)}.dialog-content.size-medium{width:var(--kritzel-dialog-width-medium, 480px);height:var(--kritzel-dialog-height-medium, auto)}.dialog-content.size-large{width:var(--kritzel-dialog-width-large, 640px);height:var(--kritzel-dialog-height-large, auto)}.dialog-content.size-fullscreen{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}.backdrop.contained-fullscreen{background-color:transparent}.dialog-content.contained-fullscreen{border-radius:0}.dialog-content.contained-fullscreen .dialog-body{display:flex;flex-direction:column}.dialog-content.contained-fullscreen .dialog-body ::slotted(*){flex:1;min-height:0}@media (max-width: 576px), (max-height: 576px) and (orientation: landscape){.backdrop:has(.fullscreen-on-mobile){background-color:transparent}.dialog-content.fullscreen-on-mobile{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}.dialog-content.fullscreen-on-mobile .dialog-body{display:flex;flex-direction:column}.dialog-content.fullscreen-on-mobile .dialog-body ::slotted(*){flex:1;min-height:0}}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kritzel-dialog-header-padding, 16px 20px);border-bottom:var(--kritzel-dialog-header-border, 1px solid #ebebeb);gap:12px}.dialog-title{margin:0;font-size:var(--kritzel-dialog-title-font-size, 18px);font-weight:var(--kritzel-dialog-title-font-weight, 600);color:var(--kritzel-dialog-title-color, #1a1a1a);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.close-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--kritzel-dialog-close-button-border-radius, 6px);background-color:var(--kritzel-dialog-close-button-background, transparent);color:var(--kritzel-dialog-close-button-color, #666666);cursor:var(--kritzel-global-pointer-cursor, pointer);transition:background-color 150ms ease, color 150ms ease;flex-shrink:0;-webkit-tap-highlight-color:transparent}.close-button:hover{background-color:var(--kritzel-dialog-close-button-hover-background, #f5f5f5);color:var(--kritzel-dialog-close-button-hover-color, #1a1a1a)}.close-button:active{background-color:var(--kritzel-dialog-close-button-active-background, #ebebeb)}.close-button:focus-visible{outline:revert;outline-offset:revert}.dialog-body{padding:var(--kritzel-dialog-body-padding, 20px);overflow-y:auto;flex:1;min-height:0;scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--kritzel-dialog-footer-gap, 8px);padding:var(--kritzel-dialog-footer-padding, 16px 20px);border-top:var(--kritzel-dialog-footer-border, 1px solid #ebebeb)}::slotted([slot='header']){flex:1}::slotted([slot='footer']){display:contents}`;
|
|
4185
4189
|
|
|
4186
4190
|
const KritzelDialog = class {
|
|
4187
4191
|
constructor(hostRef) {
|
|
@@ -4624,7 +4628,7 @@ const KritzelDialog = class {
|
|
|
4624
4628
|
};
|
|
4625
4629
|
KritzelDialog.style = kritzelDialogCss();
|
|
4626
4630
|
|
|
4627
|
-
const kritzelDropdownCss = () => `:host{display:inline-flex;vertical-align:middle;width:100%;position:relative}.dropdown-wrapper{display:flex;align-items:center;border:1px solid var(--kritzel-dropdown-border-color, #ebebeb);border-radius:var(--kritzel-dropdown-border-radius, 6px);overflow:visible;height:38px;width:100%;position:relative}.dropdown-wrapper:hover:not(:focus-within){border-color:var(--kritzel-dropdown-hover-border-color, #cccccc)}.dropdown-container{flex:1;height:100%;min-width:0}.dropdown-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px;height:100%;width:100%;box-sizing:border-box;border-radius:var(--kritzel-dropdown-border-radius, 6px);border:none;background-color:var(--kritzel-dropdown-background, #ffffff);cursor:var(--kritzel-global-pointer-cursor, pointer);outline:none;font-size:inherit;font-family:inherit;color:var(--kritzel-dropdown-text-color, #333333);-webkit-tap-highlight-color:transparent;text-align:left}.dropdown-trigger:focus-visible{outline:revert}.dropdown-trigger.has-suffix-border{border-right:1px solid var(--kritzel-global-border-color, #ebebeb);border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-trigger.has-prefix-border{border-left:1px solid var(--kritzel-global-border-color, #ebebeb);border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.dropdown-trigger-arrow{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform 0.2s ease}.dropdown-trigger-arrow svg{width:100%;height:100%}.dropdown-trigger.is-open .dropdown-trigger-arrow{transform:rotate(180deg)}.dropdown-trigger.is-open.open-up .dropdown-trigger-arrow{transform:rotate(0deg)}.dropdown-menu{position:absolute;left:0;right:0;margin:0;padding:4px 0;list-style:none;background-color:var(--kritzel-dropdown-background, #ffffff);border:1px solid var(--kritzel-global-border-color, #ebebeb);border-radius:var(--kritzel-dropdown-menu-border-radius, var(--kritzel-dropdown-border-radius, 6px));box-shadow:var(--kritzel-toolbar-box-shadow, 0 4px 12px rgba(0, 0, 0, 0.15));z-index:1000;max-height:240px;overflow-y:auto;opacity:0;visibility:hidden;transition:opacity 0.15s ease,
|
|
4631
|
+
const kritzelDropdownCss = () => `:host{display:inline-flex;vertical-align:middle;width:100%;position:relative}.dropdown-wrapper{display:flex;align-items:center;border:1px solid var(--kritzel-dropdown-border-color, #ebebeb);border-radius:var(--kritzel-dropdown-border-radius, 6px);overflow:visible;height:38px;width:100%;position:relative}.dropdown-wrapper:hover:not(:focus-within){border-color:var(--kritzel-dropdown-hover-border-color, #cccccc)}.dropdown-container{flex:1;height:100%;min-width:0}.dropdown-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px;height:100%;width:100%;box-sizing:border-box;border-radius:var(--kritzel-dropdown-border-radius, 6px);border:none;background-color:var(--kritzel-dropdown-background, #ffffff);cursor:var(--kritzel-global-pointer-cursor, pointer);outline:none;font-size:inherit;font-family:inherit;color:var(--kritzel-dropdown-text-color, #333333);-webkit-tap-highlight-color:transparent;text-align:left}.dropdown-trigger:focus-visible{outline:revert}.dropdown-trigger.has-suffix-border{border-right:1px solid var(--kritzel-global-border-color, #ebebeb);border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-trigger.has-prefix-border{border-left:1px solid var(--kritzel-global-border-color, #ebebeb);border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.dropdown-trigger-arrow{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform 0.2s ease}.dropdown-trigger-arrow svg{width:100%;height:100%}.dropdown-trigger.is-open .dropdown-trigger-arrow{transform:rotate(180deg)}.dropdown-trigger.is-open.open-up .dropdown-trigger-arrow{transform:rotate(0deg)}.dropdown-menu{position:absolute;left:0;right:0;margin:0;padding:4px 0;list-style:none;background-color:var(--kritzel-dropdown-background, #ffffff);border:1px solid var(--kritzel-global-border-color, #ebebeb);border-radius:var(--kritzel-dropdown-menu-border-radius, var(--kritzel-dropdown-border-radius, 6px));box-shadow:var(--kritzel-toolbar-box-shadow, 0 4px 12px rgba(0, 0, 0, 0.15));z-index:1000;max-height:240px;overflow-y:auto;opacity:0;visibility:hidden;transition:opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;outline:none}.dropdown-menu.open-down{top:calc(100% + 4px);bottom:auto;transform:translateY(-8px)}.dropdown-menu.open-up{bottom:calc(100% + 4px);top:auto;transform:translateY(8px)}.dropdown-menu.is-open{opacity:1;visibility:inherit;transform:translateY(0)}.dropdown-menu.open-up{box-shadow:var(--kritzel-toolbar-box-shadow, 0 -4px 12px rgba(0, 0, 0, 0.15))}.dropdown-option{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;cursor:var(--kritzel-global-pointer-cursor, pointer);color:var(--kritzel-dropdown-text-color, #333333);transition:background-color 0.1s ease;-webkit-tap-highlight-color:transparent}.dropdown-option.is-focused{background-color:var(--kritzel-dropdown-hover-background-color, #f0f0f0)}.dropdown-option.is-selected{font-weight:600;background-color:var(--kritzel-dropdown-selected-background-color, #007bff1a)}.dropdown-option-check{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;color:var(--kritzel-dropdown-accent-color, #007bff)}.dropdown-option-check svg{width:100%;height:100%}.dropdown-menu{scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin}::slotted(*){height:100%;box-sizing:border-box}`;
|
|
4628
4632
|
|
|
4629
4633
|
const KritzelDropdown = class {
|
|
4630
4634
|
constructor(hostRef) {
|
|
@@ -4862,7 +4866,7 @@ const KritzelDropdown = class {
|
|
|
4862
4866
|
'open-up': this.openDirection === 'up',
|
|
4863
4867
|
'open-down': this.openDirection === 'down',
|
|
4864
4868
|
};
|
|
4865
|
-
return (index.h(index.Host, { key: '
|
|
4869
|
+
return (index.h(index.Host, { key: 'c606b338e55dc66396105fa7b4fbdf372f3866e6' }, index.h("div", { key: 'aa32b73cac337fa4142ecc124cf039a59e3b3118', class: "dropdown-wrapper", ref: el => (this.wrapperElement = el) }, index.h("slot", { key: '2cd8e9ef246a24c49d58f76f227f36aed4786178', name: "prefix", ref: el => (this.prefixSlotElement = el), onSlotchange: this.evaluatePrefixContent }), index.h("div", { key: '80df8155e1907017d508e92f155bab5ae12dffab', class: "dropdown-container", style: { width: this.width } }, index.h("button", { key: 'd86463de7ec58248f1611d6b5d46f0eafc117f36', type: "button", class: triggerClasses, style: { ...this.selectStyles, ...this.getSelectedStyle() }, onClick: this.toggleMenu, onKeyDown: this.handleTriggerKeyDown, "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', ref: el => (this.triggerElement = el) }, index.h("span", { key: '4ef6a997f7a781fb409e97ed5bd6843d0eaff0bb', class: "dropdown-trigger-label" }, this.getSelectedLabel()), index.h("span", { key: '6601efcd69d84af1f022d14ede628bac743cc1f1', class: "dropdown-trigger-arrow", "aria-hidden": "true" }, index.h("svg", { key: '6cb2efe7b4ca890562c10b0e24eb1dfdad90ec24', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { key: 'a340af5a61dccf5bc29c8a473726b58055c2e9db', points: "6 9 12 15 18 9" }))))), index.h("slot", { key: '5bd4e5ad4cc4642c7769ecac2106ba82bae626f2', name: "suffix", ref: el => (this.suffixSlotElement = el), onSlotchange: this.evaluateSuffixContent }), index.h("ul", { key: 'e7a2be8ac261bc5fa1450940e2a57090d6be3315', class: menuClasses, role: "listbox", tabindex: "-1", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElement = el) }, this.options.map((option, index$1) => {
|
|
4866
4870
|
const isSelected = option.value === this.internalValue;
|
|
4867
4871
|
const isFocused = index$1 === this.focusedIndex;
|
|
4868
4872
|
const optionClasses = {
|
|
@@ -4884,7 +4888,7 @@ const KritzelDropdown = class {
|
|
|
4884
4888
|
};
|
|
4885
4889
|
KritzelDropdown.style = kritzelDropdownCss();
|
|
4886
4890
|
|
|
4887
|
-
const kritzelEditorCss = () => `kritzel-editor{display:flex;margin:0;position:relative;container-type:inline-size;overflow:hidden;width:100%;height:100%;align-items:center;justify-content:center;touch-action:manipulation;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:start;line-height:normal}.editor-content{position:absolute;inset:0}.editor-content>kritzel-engine{position:absolute;inset:0;z-index:0}kritzel-toolbar{position:absolute;z-index:2;left:0;right:0;margin-inline:auto;width:max-content;max-width:calc(100% - 16px);bottom:var(--kritzel-editor-toolbar-bottom, 14px);transition:transform var(--kritzel-editor-toolbar-transition-duration, 0.1s) var(--kritzel-editor-toolbar-transition, ease-in-out)}kritzel-toolbar.keyboard-open{transform:var(--kritzel-editor-toolbar-transform, translateY(300%))}.top-left-buttons{position:absolute;z-index:2;top:var(--kritzel-editor-top-left-buttons-top, 14px);left:var(--kritzel-editor-top-left-buttons-left, 14px);display:flex;align-items:flex-start;gap:8px}.top-center-notification-layer{position:absolute;top:var(--kritzel-editor-top-center-notification-top, 14px);left:0;right:0;z-index:var(--kritzel-editor-top-center-notification-z-index, 10001);display:flex;justify-content:center;pointer-events:none}.top-center-notification-container{width:min(90vw, 420px);pointer-events:auto;animation:kritzel-notification-slide-in var(--kritzel-editor-notification-animation-duration, 220ms)
|
|
4891
|
+
const kritzelEditorCss = () => `kritzel-editor{display:flex;margin:0;position:relative;container-type:inline-size;overflow:hidden;width:100%;height:100%;align-items:center;justify-content:center;touch-action:manipulation;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:start;line-height:normal}.editor-content{position:absolute;inset:0}.editor-content>kritzel-engine{position:absolute;inset:0;z-index:0}kritzel-toolbar{position:absolute;z-index:2;left:0;right:0;margin-inline:auto;width:max-content;max-width:calc(100% - 16px);bottom:var(--kritzel-editor-toolbar-bottom, 14px);transition:transform var(--kritzel-editor-toolbar-transition-duration, 0.1s) var(--kritzel-editor-toolbar-transition, ease-in-out)}kritzel-toolbar.keyboard-open{transform:var(--kritzel-editor-toolbar-transform, translateY(300%))}.top-left-buttons{position:absolute;z-index:2;top:var(--kritzel-editor-top-left-buttons-top, 14px);left:var(--kritzel-editor-top-left-buttons-left, 14px);display:flex;align-items:flex-start;gap:8px}.top-center-notification-layer{position:absolute;top:var(--kritzel-editor-top-center-notification-top, 14px);left:0;right:0;z-index:var(--kritzel-editor-top-center-notification-z-index, 10001);display:flex;justify-content:center;pointer-events:none}.top-center-notification-container{width:min(90vw, 420px);pointer-events:auto;animation:kritzel-notification-slide-in var(--kritzel-editor-notification-animation-duration, 220ms) var(--kritzel-editor-notification-animation-easing, cubic-bezier(0.22, 1, 0.36, 1))}.top-center-notification-container.is-dismissing{animation:kritzel-notification-fade-out var(--kritzel-editor-notification-dismiss-animation-duration, 180ms) var(--kritzel-editor-notification-dismiss-animation-easing, ease-in) forwards}@keyframes kritzel-notification-slide-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes kritzel-notification-fade-out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-6px)}}@media (prefers-reduced-motion: reduce){.top-center-notification-container{animation:none}}.top-right-buttons{position:absolute;z-index:2;top:var(--kritzel-editor-top-right-buttons-top, 14px);right:var(--kritzel-editor-top-right-buttons-right, 14px);display:flex;align-items:center;gap:8px}.bottom-left-buttons{position:absolute;z-index:2;left:var(--kritzel-editor-top-left-buttons-left, 14px);bottom:var(--kritzel-editor-toolbar-bottom, 14px);display:flex;align-items:flex-end}@container (max-width: 767px){.bottom-left-buttons{display:none}}.top-right-button{display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;border:var(--kritzel-split-button-border, 1px solid #ebebeb);border-radius:var(--kritzel-split-button-border-radius, 12px);background-color:var(--kritzel-split-button-background-color, #ffffff);cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));transition:background-color 150ms ease;-webkit-tap-highlight-color:transparent}.top-right-button:hover{background-color:#f5f5f5}.top-right-button:active{background-color:#ebebeb}`;
|
|
4888
4892
|
|
|
4889
4893
|
const KritzelEditor = class {
|
|
4890
4894
|
constructor(hostRef) {
|
|
@@ -4954,12 +4958,12 @@ const KritzelEditor = class {
|
|
|
4954
4958
|
name: 'shape',
|
|
4955
4959
|
type: 'tool',
|
|
4956
4960
|
tool: engine.KritzelShapeTool,
|
|
4957
|
-
icon: '
|
|
4961
|
+
icon: 'shapeRectangle',
|
|
4958
4962
|
config: engine.DEFAULT_SHAPE_CONFIG,
|
|
4959
4963
|
subOptions: [
|
|
4960
|
-
{ id: 'rectangle', icon: '
|
|
4961
|
-
{ id: 'ellipse', icon: '
|
|
4962
|
-
{ id: 'triangle', icon: '
|
|
4964
|
+
{ id: 'rectangle', icon: 'shapeRectangle', label: 'Rectangle', value: engine.ShapeType.Rectangle, toolProperty: 'shapeType' },
|
|
4965
|
+
{ id: 'ellipse', icon: 'shapeEllipse', label: 'Ellipse', value: engine.ShapeType.Ellipse, toolProperty: 'shapeType' },
|
|
4966
|
+
{ id: 'triangle', icon: 'shapeTriangle', label: 'Triangle', value: engine.ShapeType.Triangle, toolProperty: 'shapeType' },
|
|
4963
4967
|
],
|
|
4964
4968
|
},
|
|
4965
4969
|
{
|
|
@@ -4988,7 +4992,7 @@ const KritzelEditor = class {
|
|
|
4988
4992
|
},
|
|
4989
4993
|
{
|
|
4990
4994
|
label: 'menu.selectAll',
|
|
4991
|
-
icon: '
|
|
4995
|
+
icon: 'selectAll',
|
|
4992
4996
|
action: () => this.selectAllObjectsInViewport(),
|
|
4993
4997
|
},
|
|
4994
4998
|
];
|
|
@@ -5019,10 +5023,10 @@ const KritzelEditor = class {
|
|
|
5019
5023
|
icon: 'ordering',
|
|
5020
5024
|
group: 'other',
|
|
5021
5025
|
children: [
|
|
5022
|
-
{ label: 'menu.bringToFront', icon: '
|
|
5023
|
-
{ label: 'menu.sendToBack', icon: '
|
|
5024
|
-
{ label: 'menu.moveUp', icon: '
|
|
5025
|
-
{ label: 'menu.moveDown', icon: '
|
|
5026
|
+
{ label: 'menu.bringToFront', icon: 'bringToFront', action: () => this.engineRef.bringToFront() },
|
|
5027
|
+
{ label: 'menu.sendToBack', icon: 'sendToBack', action: () => this.engineRef.sendToBack() },
|
|
5028
|
+
{ label: 'menu.moveUp', icon: 'arrowUpFromDot', action: () => this.engineRef.bringForward() },
|
|
5029
|
+
{ label: 'menu.moveDown', icon: 'arrowDownFromDot', action: () => this.engineRef.sendBackward() },
|
|
5026
5030
|
],
|
|
5027
5031
|
},
|
|
5028
5032
|
{
|
|
@@ -5030,12 +5034,12 @@ const KritzelEditor = class {
|
|
|
5030
5034
|
icon: 'align',
|
|
5031
5035
|
group: 'other',
|
|
5032
5036
|
children: [
|
|
5033
|
-
{ label: 'menu.alignLeft', icon: '
|
|
5034
|
-
{ label: 'menu.alignCenterHorizontal', icon: '
|
|
5035
|
-
{ label: 'menu.alignRight', icon: '
|
|
5036
|
-
{ label: 'menu.alignTop', icon: '
|
|
5037
|
-
{ label: 'menu.alignCenterVertical', icon: '
|
|
5038
|
-
{ label: 'menu.alignBottom', icon: '
|
|
5037
|
+
{ label: 'menu.alignLeft', icon: 'alignStartVertical', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.StartHorizontal) },
|
|
5038
|
+
{ label: 'menu.alignCenterHorizontal', icon: 'alignCenterHorizontal', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.CenterHorizontal) },
|
|
5039
|
+
{ label: 'menu.alignRight', icon: 'alignEndVertical', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.EndHorizontal) },
|
|
5040
|
+
{ label: 'menu.alignTop', icon: 'alignStartHorizontal', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.StartVertical) },
|
|
5041
|
+
{ label: 'menu.alignCenterVertical', icon: 'alignCenterVertical', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.CenterVertical) },
|
|
5042
|
+
{ label: 'menu.alignBottom', icon: 'alignEndHorizontal', action: () => this.engineRef.alignObjects(engine.KritzelAlignment.EndVertical) },
|
|
5039
5043
|
],
|
|
5040
5044
|
},
|
|
5041
5045
|
{
|
|
@@ -5208,6 +5212,9 @@ const KritzelEditor = class {
|
|
|
5208
5212
|
onCustomFontsChange(newValue) {
|
|
5209
5213
|
void this.registerCustomFonts(newValue);
|
|
5210
5214
|
}
|
|
5215
|
+
onCustomSvgIconsChange(newValue) {
|
|
5216
|
+
this.registerCustomSvgIcons(newValue);
|
|
5217
|
+
}
|
|
5211
5218
|
onMoreMenuItemsChange() {
|
|
5212
5219
|
this.recomputeMoreMenuItems();
|
|
5213
5220
|
}
|
|
@@ -5380,12 +5387,11 @@ const KritzelEditor = class {
|
|
|
5380
5387
|
async reinitSync() {
|
|
5381
5388
|
return this.engineRef.reinitSync();
|
|
5382
5389
|
}
|
|
5383
|
-
// ── Tool management ─────────────────────────────────────────────────
|
|
5384
5390
|
async registerTool(toolName, toolClass, toolConfig) {
|
|
5385
5391
|
return this.engineRef.registerTool(toolName, toolClass, toolConfig);
|
|
5386
5392
|
}
|
|
5387
|
-
async
|
|
5388
|
-
return this.engineRef.
|
|
5393
|
+
async setActiveTool(toolName) {
|
|
5394
|
+
return this.engineRef.setActiveTool(toolName);
|
|
5389
5395
|
}
|
|
5390
5396
|
async disable() {
|
|
5391
5397
|
return this.engineRef.disable();
|
|
@@ -5624,15 +5630,21 @@ const KritzelEditor = class {
|
|
|
5624
5630
|
loginDialogRef;
|
|
5625
5631
|
currentUserDialogRef;
|
|
5626
5632
|
componentWillLoad() {
|
|
5633
|
+
this.registerCustomSvgIcons(this.customSvgIcons);
|
|
5627
5634
|
this.recomputeMoreMenuItems();
|
|
5628
5635
|
this.loadSettingsFromStorage();
|
|
5629
5636
|
this.applyTheme();
|
|
5630
5637
|
}
|
|
5638
|
+
componentWillRender() {
|
|
5639
|
+
this.registerCustomSvgIcons(this.customSvgIcons);
|
|
5640
|
+
}
|
|
5631
5641
|
isTextToolConfig(config) {
|
|
5632
5642
|
return !!config && 'fontFamily' in config && 'size' in config && 'color' in config;
|
|
5633
5643
|
}
|
|
5634
5644
|
lastToolbarItemsRef = null;
|
|
5635
5645
|
lastNormalizedToolbarItems = [];
|
|
5646
|
+
lastToolsSource = null;
|
|
5647
|
+
lastTools = [];
|
|
5636
5648
|
getNormalizedToolbarItems() {
|
|
5637
5649
|
if (this.toolbarItems !== this.lastToolbarItemsRef) {
|
|
5638
5650
|
this.lastToolbarItemsRef = this.toolbarItems;
|
|
@@ -5640,6 +5652,16 @@ const KritzelEditor = class {
|
|
|
5640
5652
|
}
|
|
5641
5653
|
return this.lastNormalizedToolbarItems;
|
|
5642
5654
|
}
|
|
5655
|
+
getTools() {
|
|
5656
|
+
const normalizedToolbarItems = this.getNormalizedToolbarItems();
|
|
5657
|
+
if (normalizedToolbarItems !== this.lastToolsSource) {
|
|
5658
|
+
this.lastToolsSource = normalizedToolbarItems;
|
|
5659
|
+
this.lastTools = normalizedToolbarItems
|
|
5660
|
+
.filter(item => item.type === 'tool' && !!item.tool)
|
|
5661
|
+
.map(item => ({ name: item.name, tool: item.tool, config: item.config }));
|
|
5662
|
+
}
|
|
5663
|
+
return this.lastTools;
|
|
5664
|
+
}
|
|
5643
5665
|
normalizeToolbar(toolbarItems) {
|
|
5644
5666
|
return toolbarItems.map(control => {
|
|
5645
5667
|
if (!this.isTextToolConfig(control.config)) {
|
|
@@ -5668,7 +5690,6 @@ const KritzelEditor = class {
|
|
|
5668
5690
|
return this.themes?.find(t => t.name === this.theme) ?? (this.theme === 'dark' ? engine.darkTheme : engine.lightTheme);
|
|
5669
5691
|
}
|
|
5670
5692
|
componentDidLoad() {
|
|
5671
|
-
this.registerCustomSvgIcons();
|
|
5672
5693
|
this.registerCustomFonts();
|
|
5673
5694
|
this.listenForMobileKeyboard();
|
|
5674
5695
|
this.setOsSpecificCssVariables();
|
|
@@ -6034,10 +6055,13 @@ const KritzelEditor = class {
|
|
|
6034
6055
|
getContentObjects(objects) {
|
|
6035
6056
|
return objects.filter(obj => !(obj instanceof engine.KritzelSelectionGroup) && !(obj instanceof engine.KritzelSelectionBox));
|
|
6036
6057
|
}
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6058
|
+
lastCustomSvgIcons;
|
|
6059
|
+
registerCustomSvgIcons(icons) {
|
|
6060
|
+
if (icons === this.lastCustomSvgIcons) {
|
|
6061
|
+
return;
|
|
6040
6062
|
}
|
|
6063
|
+
this.lastCustomSvgIcons = icons;
|
|
6064
|
+
engine.KritzelIconRegistry.registerIcons(icons ?? {});
|
|
6041
6065
|
}
|
|
6042
6066
|
async registerCustomFonts(fonts = this.customFonts) {
|
|
6043
6067
|
engine.KritzelFontRegistry.registerFonts(fonts);
|
|
@@ -6097,48 +6121,49 @@ const KritzelEditor = class {
|
|
|
6097
6121
|
const shouldShowCurrentUser = isLoggedIn;
|
|
6098
6122
|
const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
|
|
6099
6123
|
const normalizedToolbarItems = this.getNormalizedToolbarItems();
|
|
6100
|
-
|
|
6124
|
+
const tools = this.getTools();
|
|
6125
|
+
return (index.h(index.Host, { key: '939e4336009f65e1d1a3ec9b756de38a5fa942d6' }, index.h("div", { key: 'c216ac3097a8472ba74532b2c6c300efd90134cf', class: "editor-content", style: {
|
|
6101
6126
|
opacity: this.isEditorVisible ? '1' : '0',
|
|
6102
6127
|
visibility: this.isEditorVisible ? 'visible' : 'hidden',
|
|
6103
6128
|
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
6104
|
-
} }, index.h("div", { key: '
|
|
6129
|
+
} }, index.h("div", { key: '6796a763912435553cde891847302746491f493b', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'e13510ec3f76f8aab2c3b0771c3363d92d93cc6a', ref: el => {
|
|
6105
6130
|
if (el) {
|
|
6106
6131
|
this.workspaceManagerRef = el;
|
|
6107
6132
|
}
|
|
6108
|
-
}, visible: this.isWorkspaceManagerVisible, workspaces: this.availableWorkspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => this.handleWorkspaceManagerChange(event), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: '
|
|
6133
|
+
}, visible: this.isWorkspaceManagerVisible, workspaces: this.availableWorkspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => this.handleWorkspaceManagerChange(event), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: '9115ee23e578a66f46b202623c241277ef092544', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (index.h("div", { key: 'd4379f4d0e4f8b3cf2693f34304b03b1e5a75255', class: "top-center-notification-layer", role: "presentation" }, index.h("div", { key: '01151742b1338423e669d2382ebe9ad55322c43b', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, index.h("kritzel-notification-card", { key: 'e802c494bab6b2eae72d8fd4997d362006e63142', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), this.contextMenuState && this.contextMenuState.items.length > 0 && (index.h("kritzel-context-menu", { key: '8141865c0beb036f28c135bc41054a68a7b05d01', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
|
|
6109
6134
|
position: 'absolute',
|
|
6110
6135
|
left: `${this.contextMenuState.position.x}px`,
|
|
6111
6136
|
top: `${this.contextMenuState.position.y}px`,
|
|
6112
6137
|
zIndex: '10002',
|
|
6113
|
-
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-loading-overlay", { key: '
|
|
6138
|
+
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-loading-overlay", { key: 'a4b6a7389387641c0fe0fe44b7c0948c66d8cdfc', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), index.h("kritzel-engine", { key: '0b3e551a97e2c40548d7dc479fca5f408035a8f4', ref: el => {
|
|
6114
6139
|
if (el) {
|
|
6115
6140
|
this.engineRef = el;
|
|
6116
6141
|
}
|
|
6117
|
-
}, workspaces: this.workspaces, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onObjectsSelectionChange: event => this.handleObjectsSelectionChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event), onIsLoadingChange: event => this.handleIsLoadingChange(event) }), index.h("kritzel-toolbar", { key: '
|
|
6142
|
+
}, workspaces: this.workspaces, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, tools: tools, 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), onObjectsSelectionChange: event => this.handleObjectsSelectionChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event), onIsLoadingChange: event => this.handleIsLoadingChange(event) }), index.h("kritzel-toolbar", { key: '3240c2481021aa017a26e1e3e3618d346a3bf1b9', visible: this.isToolbarVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
|
|
6118
6143
|
if (el) {
|
|
6119
6144
|
this.toolbarRef = el;
|
|
6120
6145
|
}
|
|
6121
|
-
}, toolbarItems: normalizedToolbarItems, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsToolbarReady: () => (this.isToolbarReady = true) }), index.h("div", { key: '
|
|
6146
|
+
}, toolbarItems: normalizedToolbarItems, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsToolbarReady: () => (this.isToolbarReady = true) }), index.h("div", { key: 'ba83e4189b6ee8a6e060f3d26b4863ff1d5768d2', class: "bottom-left-buttons" }, index.h("kritzel-zoom-panel", { key: '7725ee71671d68411c5f6bb5da6e2737338880f0', visible: this.isZoomPanelVisible, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), index.h("div", { key: '1a4f0c9f1c8acf2703e0d101d6e6288f976af7f7', class: "top-right-buttons" }, index.h("kritzel-settings", { key: 'd14c088c5ed85d4e63b7b478a742e4b01921dec9', ref: el => {
|
|
6122
6147
|
if (el) {
|
|
6123
6148
|
this.settingsRef = el;
|
|
6124
6149
|
}
|
|
6125
|
-
}, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '
|
|
6150
|
+
}, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '22b5848fd3c395c9c06f67f13b2de5ebe7f20ffe', ref: el => {
|
|
6126
6151
|
if (el) {
|
|
6127
6152
|
this.exportRef = el;
|
|
6128
6153
|
}
|
|
6129
|
-
}, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), index.h("kritzel-active-users", { key: '
|
|
6154
|
+
}, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), index.h("kritzel-active-users", { key: '7c60a610eb996640663331666691acec691128f0', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: 'aa53b3739c92cb01580a61e355ff22d4777ba11e', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (index.h("kritzel-current-user-dialog", { key: 'c709f948752f62122150ecef70788a527edd610e', ref: el => {
|
|
6130
6155
|
if (el) {
|
|
6131
6156
|
this.currentUserDialogRef = el;
|
|
6132
6157
|
}
|
|
6133
|
-
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: '
|
|
6158
|
+
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: 'ed095c276f2a48e74c7c899d216891d2b1130759', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), index.h("kritzel-more-menu", { key: 'cdd22f54afc7acdfd783afbcfa16813ac39f4352', ref: el => {
|
|
6134
6159
|
if (el) {
|
|
6135
6160
|
this.moreMenuRef = el;
|
|
6136
6161
|
}
|
|
6137
|
-
}, items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: '
|
|
6162
|
+
}, items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: '00d09340a36334aa29dde0e306598bb48b8360fc', ref: el => {
|
|
6138
6163
|
if (el) {
|
|
6139
6164
|
this.shareDialogRef = el;
|
|
6140
6165
|
}
|
|
6141
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '
|
|
6166
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '1e4c79482b155a0da9dc664ae1f421773c6a452c', ref: el => {
|
|
6142
6167
|
if (el) {
|
|
6143
6168
|
this.loginDialogRef = el;
|
|
6144
6169
|
}
|
|
@@ -6160,6 +6185,9 @@ const KritzelEditor = class {
|
|
|
6160
6185
|
"customFonts": [{
|
|
6161
6186
|
"onCustomFontsChange": 0
|
|
6162
6187
|
}],
|
|
6188
|
+
"customSvgIcons": [{
|
|
6189
|
+
"onCustomSvgIconsChange": 0
|
|
6190
|
+
}],
|
|
6163
6191
|
"moreMenuItems": [{
|
|
6164
6192
|
"onMoreMenuItemsChange": 0
|
|
6165
6193
|
}],
|
|
@@ -28351,7 +28379,6 @@ class Mark {
|
|
|
28351
28379
|
if (!type)
|
|
28352
28380
|
throw new RangeError(`There is no mark type ${json.type} in this schema`);
|
|
28353
28381
|
let mark = type.create(json.attrs);
|
|
28354
|
-
type.checkAttrs(mark.attrs);
|
|
28355
28382
|
return mark;
|
|
28356
28383
|
}
|
|
28357
28384
|
/**
|
|
@@ -29331,11 +29358,11 @@ class Node {
|
|
|
29331
29358
|
*/
|
|
29332
29359
|
check() {
|
|
29333
29360
|
this.type.checkContent(this.content);
|
|
29334
|
-
this.type.
|
|
29361
|
+
checkAttrs(this.type.attrs, this.attrs, "node", this.type.name);
|
|
29335
29362
|
let copy = Mark.none;
|
|
29336
29363
|
for (let i = 0; i < this.marks.length; i++) {
|
|
29337
29364
|
let mark = this.marks[i];
|
|
29338
|
-
mark.type.
|
|
29365
|
+
checkAttrs(mark.type.attrs, mark.attrs, "mark", mark.type.name);
|
|
29339
29366
|
copy = mark.addToSet(copy);
|
|
29340
29367
|
}
|
|
29341
29368
|
if (!Mark.sameSet(copy, this.marks))
|
|
@@ -29376,7 +29403,6 @@ class Node {
|
|
|
29376
29403
|
}
|
|
29377
29404
|
let content = Fragment.fromJSON(schema, json.content);
|
|
29378
29405
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
29379
|
-
node.type.checkAttrs(node.attrs);
|
|
29380
29406
|
return node;
|
|
29381
29407
|
}
|
|
29382
29408
|
}
|
|
@@ -29426,6 +29452,15 @@ function wrapMarks(marks, str) {
|
|
|
29426
29452
|
str = marks[i].type.name + "(" + str + ")";
|
|
29427
29453
|
return str;
|
|
29428
29454
|
}
|
|
29455
|
+
function checkAttrs(attrs, values, type, name) {
|
|
29456
|
+
for (let attr in values)
|
|
29457
|
+
if (!(attr in attrs))
|
|
29458
|
+
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
29459
|
+
for (let attr in attrs) {
|
|
29460
|
+
if (attrs[attr].validate)
|
|
29461
|
+
attrs[attr].validate(values[attr]);
|
|
29462
|
+
}
|
|
29463
|
+
}
|
|
29429
29464
|
|
|
29430
29465
|
/**
|
|
29431
29466
|
Instances of this class represent a match state of a node type's
|
|
@@ -29880,27 +29915,21 @@ function defaultAttrs(attrs) {
|
|
|
29880
29915
|
function computeAttrs(attrs, value) {
|
|
29881
29916
|
let built = Object.create(null);
|
|
29882
29917
|
for (let name in attrs) {
|
|
29918
|
+
let attr = attrs[name];
|
|
29883
29919
|
let given = value && value[name];
|
|
29884
29920
|
if (given === undefined) {
|
|
29885
|
-
let attr = attrs[name];
|
|
29886
29921
|
if (attr.hasDefault)
|
|
29887
29922
|
given = attr.default;
|
|
29888
29923
|
else
|
|
29889
29924
|
throw new RangeError("No value supplied for attribute " + name);
|
|
29890
29925
|
}
|
|
29926
|
+
else if (attr.validate) {
|
|
29927
|
+
attr.validate(given);
|
|
29928
|
+
}
|
|
29891
29929
|
built[name] = given;
|
|
29892
29930
|
}
|
|
29893
29931
|
return built;
|
|
29894
29932
|
}
|
|
29895
|
-
function checkAttrs(attrs, values, type, name) {
|
|
29896
|
-
for (let attr in values)
|
|
29897
|
-
if (!(attr in attrs))
|
|
29898
|
-
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
29899
|
-
for (let attr in attrs) {
|
|
29900
|
-
if (attrs[attr].validate)
|
|
29901
|
-
attrs[attr].validate(values[attr]);
|
|
29902
|
-
}
|
|
29903
|
-
}
|
|
29904
29933
|
function initAttrs(typeName, attrs) {
|
|
29905
29934
|
let result = Object.create(null);
|
|
29906
29935
|
if (attrs)
|
|
@@ -30072,11 +30101,9 @@ let NodeType$1 = class NodeType {
|
|
|
30072
30101
|
throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);
|
|
30073
30102
|
}
|
|
30074
30103
|
/**
|
|
30075
|
-
@internal
|
|
30104
|
+
@internal no longer useful, but called by old prosemirror-view versions
|
|
30076
30105
|
*/
|
|
30077
|
-
checkAttrs(attrs) {
|
|
30078
|
-
checkAttrs(this.attrs, attrs, "node", this.name);
|
|
30079
|
-
}
|
|
30106
|
+
checkAttrs(attrs) { }
|
|
30080
30107
|
/**
|
|
30081
30108
|
Check whether the given mark type is allowed in this node.
|
|
30082
30109
|
*/
|
|
@@ -30223,12 +30250,6 @@ class MarkType {
|
|
|
30223
30250
|
return set[i];
|
|
30224
30251
|
}
|
|
30225
30252
|
/**
|
|
30226
|
-
@internal
|
|
30227
|
-
*/
|
|
30228
|
-
checkAttrs(attrs) {
|
|
30229
|
-
checkAttrs(this.attrs, attrs, "mark", this.name);
|
|
30230
|
-
}
|
|
30231
|
-
/**
|
|
30232
30253
|
Queries whether a given mark type is
|
|
30233
30254
|
[excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.
|
|
30234
30255
|
*/
|
|
@@ -36920,7 +36941,8 @@ function nodeLen(node) {
|
|
|
36920
36941
|
}
|
|
36921
36942
|
function isIgnorable(dom, dir) {
|
|
36922
36943
|
let desc = dom.pmViewDesc;
|
|
36923
|
-
return desc
|
|
36944
|
+
return desc ? desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != "BR")
|
|
36945
|
+
: dom.nodeType == 1 && dom.contentEditable == "false";
|
|
36924
36946
|
}
|
|
36925
36947
|
function skipIgnoredNodes(view, dir) {
|
|
36926
36948
|
return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);
|
|
@@ -37509,12 +37531,11 @@ function addContext(slice, context) {
|
|
|
37509
37531
|
if (!type || type.hasRequiredAttrs())
|
|
37510
37532
|
break;
|
|
37511
37533
|
try {
|
|
37512
|
-
type.
|
|
37534
|
+
content = Fragment.from(type.create(array[i + 1], content));
|
|
37513
37535
|
}
|
|
37514
37536
|
catch (e) {
|
|
37515
37537
|
break;
|
|
37516
37538
|
}
|
|
37517
|
-
content = Fragment.from(type.create(array[i + 1], content));
|
|
37518
37539
|
openStart++;
|
|
37519
37540
|
openEnd++;
|
|
37520
37541
|
}
|
|
@@ -37994,7 +38015,7 @@ editHandlers.compositionstart = editHandlers.compositionupdate = view => {
|
|
|
37994
38015
|
if (!view.composing) {
|
|
37995
38016
|
view.domObserver.flush();
|
|
37996
38017
|
let { state } = view, $pos = state.selection.$to;
|
|
37997
|
-
if (state.selection instanceof TextSelection &&
|
|
38018
|
+
if (state.selection instanceof TextSelection && state.selection.empty &&
|
|
37998
38019
|
(state.storedMarks ||
|
|
37999
38020
|
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||
|
|
38000
38021
|
chrome && windows$1 && selectionBeforeUneditable(view))) { // Issue #1500
|
|
@@ -39631,9 +39652,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
|
|
|
39631
39652
|
// as being an iOS enter press), just dispatch an Enter key instead.
|
|
39632
39653
|
if (((ios && view.input.lastIOSEnter > Date.now() - 225 &&
|
|
39633
39654
|
(!inlineChange || addedNodes.some(n => n.nodeName == "DIV" || n.nodeName == "P"))) ||
|
|
39634
|
-
(!inlineChange && $from.pos
|
|
39635
|
-
(!$from.sameParent($to) || !$from.parent.inlineContent) &&
|
|
39636
|
-
$from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")))) &&
|
|
39655
|
+
(!inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos))) &&
|
|
39637
39656
|
view.someProp("handleKeyDown", f => f(view, keyEvent(13, "Enter")))) {
|
|
39638
39657
|
view.input.lastIOSEnter = 0;
|
|
39639
39658
|
return;
|
|
@@ -39784,6 +39803,16 @@ function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
|
39784
39803
|
// The fragments after the join point must match
|
|
39785
39804
|
return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);
|
|
39786
39805
|
}
|
|
39806
|
+
function looksLikeEnter(content, from, to) {
|
|
39807
|
+
let newTextlines = 0, newLeaves = 0;
|
|
39808
|
+
content.nodesBetween(from, to, (node, pos) => {
|
|
39809
|
+
if (node.isTextblock && pos >= from && pos < to)
|
|
39810
|
+
newTextlines++;
|
|
39811
|
+
else if (node.isText ? /\S/.test(node.text.slice(Math.max(0, from - pos), Math.min(node.nodeSize, to - pos))) : node.isLeaf)
|
|
39812
|
+
newLeaves++;
|
|
39813
|
+
});
|
|
39814
|
+
return newLeaves == 0 && newTextlines == 1;
|
|
39815
|
+
}
|
|
39787
39816
|
function skipClosingAndOpening($pos, fromEnd, mayOpen) {
|
|
39788
39817
|
let depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;
|
|
39789
39818
|
while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {
|
|
@@ -42011,7 +42040,7 @@ class KritzelShape extends KritzelBaseObject {
|
|
|
42011
42040
|
|
|
42012
42041
|
const KRITZEL_FONT_REGISTRY_KEY = '__kritzelFontRegistry__';
|
|
42013
42042
|
const KRITZEL_FONT_REGISTRY_EVENT = 'kritzel-font-registry-change';
|
|
42014
|
-
const getGlobalRegistryStore$
|
|
42043
|
+
const getGlobalRegistryStore$2 = () => {
|
|
42015
42044
|
const globalScope = globalThis;
|
|
42016
42045
|
const existing = globalScope[KRITZEL_FONT_REGISTRY_KEY];
|
|
42017
42046
|
if (existing) {
|
|
@@ -42044,7 +42073,7 @@ const normalizeKey = (value) => value.trim().toLocaleLowerCase();
|
|
|
42044
42073
|
const normalizeFamily = (value) => value.trim().toLocaleLowerCase();
|
|
42045
42074
|
class KritzelFontRegistry {
|
|
42046
42075
|
static get _fonts() {
|
|
42047
|
-
return getGlobalRegistryStore$
|
|
42076
|
+
return getGlobalRegistryStore$2().fonts;
|
|
42048
42077
|
}
|
|
42049
42078
|
static getFontFaceSet() {
|
|
42050
42079
|
if (typeof document === 'undefined' || !document.fonts) {
|
|
@@ -44253,9 +44282,8 @@ class KritzelSelectionTool extends KritzelBaseTool {
|
|
|
44253
44282
|
}
|
|
44254
44283
|
if (selectedObject && selectedObject.isSelected === false && selectedObject?.objects.length === 1) {
|
|
44255
44284
|
const firstObj = selectedObject.objects[0];
|
|
44256
|
-
if (
|
|
44257
|
-
// Selected
|
|
44258
|
-
// embedded DOM content. Unselected dynamic objects remain selectable.
|
|
44285
|
+
if (ObjectHelper.isKritzelEmbeddedObject(firstObj)) {
|
|
44286
|
+
// Selected embedded objects hand pointer interaction to their content.
|
|
44259
44287
|
if (firstObj.isSelected && this._core.store.selectionGroup?.objects.length === 1)
|
|
44260
44288
|
return;
|
|
44261
44289
|
}
|
|
@@ -46136,7 +46164,7 @@ class KritzelWorkspace {
|
|
|
46136
46164
|
}
|
|
46137
46165
|
|
|
46138
46166
|
const KRITZEL_RENDERER_REGISTRY_KEY = '__kritzelDynamicObjectRendererRegistry__';
|
|
46139
|
-
const getGlobalRegistryStore = () => {
|
|
46167
|
+
const getGlobalRegistryStore$1 = () => {
|
|
46140
46168
|
const globalScope = globalThis;
|
|
46141
46169
|
const existing = globalScope[KRITZEL_RENDERER_REGISTRY_KEY];
|
|
46142
46170
|
if (existing) {
|
|
@@ -46160,7 +46188,7 @@ const getGlobalRegistryStore = () => {
|
|
|
46160
46188
|
*/
|
|
46161
46189
|
class KritzelDynamicObjectRendererRegistry {
|
|
46162
46190
|
static get _renderers() {
|
|
46163
|
-
return getGlobalRegistryStore().renderers;
|
|
46191
|
+
return getGlobalRegistryStore$1().renderers;
|
|
46164
46192
|
}
|
|
46165
46193
|
/**
|
|
46166
46194
|
* Registers a renderer implementation for a given key.
|
|
@@ -46429,7 +46457,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46429
46457
|
}
|
|
46430
46458
|
applyInteractiveState() {
|
|
46431
46459
|
const pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
46432
|
-
const contentCursor = this.isInteractive ? 'auto' : '';
|
|
46460
|
+
const contentCursor = this.isInteractive ? 'var(--kritzel-global-default-cursor, auto)' : '';
|
|
46433
46461
|
if (this.element) {
|
|
46434
46462
|
this.element.style.pointerEvents = pointerEvents;
|
|
46435
46463
|
this.element.style.cursor = contentCursor;
|
|
@@ -46465,7 +46493,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46465
46493
|
if (!this.isInteractive) {
|
|
46466
46494
|
return false;
|
|
46467
46495
|
}
|
|
46468
|
-
const focusHosts = this.
|
|
46496
|
+
const focusHosts = this.getEmbeddedContentRoots();
|
|
46469
46497
|
// Primary path: locate the focused input-like element by walking from each host through
|
|
46470
46498
|
// `:focus` (piercing open shadow roots). This works in real browsers even when the engine
|
|
46471
46499
|
// and editor are nested web components, because it never relies on the document-level
|
|
@@ -46482,7 +46510,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46482
46510
|
}
|
|
46483
46511
|
return false;
|
|
46484
46512
|
}
|
|
46485
|
-
|
|
46513
|
+
getEmbeddedContentRoots() {
|
|
46486
46514
|
const hosts = [];
|
|
46487
46515
|
if (this.element) {
|
|
46488
46516
|
hosts.push(this.element);
|
|
@@ -46695,11 +46723,11 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46695
46723
|
* @returns A serializable object with htmlString and dimension snapshots
|
|
46696
46724
|
*/
|
|
46697
46725
|
serialize() {
|
|
46698
|
-
const { _core, _elementRef, element, totalWidth, totalHeight, isSelected, isHovered, isMounted, isInteractive, resizing, markedForRemoval, isVisible, ...props } = this;
|
|
46726
|
+
const { _core, _elementRef, element, totalWidth, totalHeight, isSelected, isHovered, isMounted, isInteractive, resizing, markedForRemoval, isVisible, rendererData, ...props } = this;
|
|
46699
46727
|
const cloned = structuredClone(props);
|
|
46700
46728
|
// Include rendererKey and rendererData for lifecycle-driven rendering
|
|
46701
46729
|
cloned.rendererKey = this.rendererKey;
|
|
46702
|
-
cloned.rendererData = this.
|
|
46730
|
+
cloned.rendererData = this.serializeRendererData();
|
|
46703
46731
|
// Store HTML as string for fallback/compatibility when renderer is unavailable
|
|
46704
46732
|
cloned.htmlString = element ? element.outerHTML : '';
|
|
46705
46733
|
// Capture dimension snapshot at serialization time
|
|
@@ -46707,6 +46735,19 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46707
46735
|
cloned.serializedHeight = this.height;
|
|
46708
46736
|
return cloned;
|
|
46709
46737
|
}
|
|
46738
|
+
serializeRendererData() {
|
|
46739
|
+
if (this.rendererKey) {
|
|
46740
|
+
const renderer = KritzelDynamicObjectRendererRegistry.get(this.rendererKey);
|
|
46741
|
+
if (renderer?.onSerialize) {
|
|
46742
|
+
return structuredClone(renderer.onSerialize({
|
|
46743
|
+
object: this,
|
|
46744
|
+
container: this.isMounted && this.elementRef instanceof HTMLElement ? this.elementRef : null,
|
|
46745
|
+
data: this.rendererData,
|
|
46746
|
+
}));
|
|
46747
|
+
}
|
|
46748
|
+
}
|
|
46749
|
+
return structuredClone(this.rendererData);
|
|
46750
|
+
}
|
|
46710
46751
|
/**
|
|
46711
46752
|
* Deserializes the dynamic object from a plain object.
|
|
46712
46753
|
* Reconstructs the element from stored HTML string with fallback to placeholder.
|
|
@@ -46739,6 +46780,452 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46739
46780
|
}
|
|
46740
46781
|
}
|
|
46741
46782
|
|
|
46783
|
+
const IFRAME_STATE_MESSAGE = 'kritzel-iframe-state';
|
|
46784
|
+
const IFRAME_PARENT_STATE_MESSAGE = 'kritzel-iframe-parent-state';
|
|
46785
|
+
const IFRAME_POINTER_MESSAGE = 'kritzel-iframe-pointer';
|
|
46786
|
+
const IFRAME_CONTEXT_MENU_MESSAGE = 'kritzel-iframe-contextmenu';
|
|
46787
|
+
const SUPPORTED_SANDBOX_TOKENS = new Set([
|
|
46788
|
+
'allow-downloads',
|
|
46789
|
+
'allow-forms',
|
|
46790
|
+
'allow-modals',
|
|
46791
|
+
'allow-orientation-lock',
|
|
46792
|
+
'allow-pointer-lock',
|
|
46793
|
+
'allow-popups',
|
|
46794
|
+
'allow-popups-to-escape-sandbox',
|
|
46795
|
+
'allow-presentation',
|
|
46796
|
+
'allow-same-origin',
|
|
46797
|
+
'allow-scripts',
|
|
46798
|
+
'allow-top-navigation-by-user-activation',
|
|
46799
|
+
]);
|
|
46800
|
+
const iframePointerBridgeStarts = new WeakMap();
|
|
46801
|
+
class KritzelIframeObject extends KritzelBaseObject {
|
|
46802
|
+
__class__ = 'KritzelIframeObject';
|
|
46803
|
+
content = { html: '', css: '', script: '' };
|
|
46804
|
+
loadingContent;
|
|
46805
|
+
isLoading = false;
|
|
46806
|
+
state = {};
|
|
46807
|
+
title = 'Embedded content';
|
|
46808
|
+
sandbox = ['allow-scripts'];
|
|
46809
|
+
borderRadius;
|
|
46810
|
+
boxShadow;
|
|
46811
|
+
get html() { return this.content.html; }
|
|
46812
|
+
set html(value) { this.content = { ...this.content, html: value }; }
|
|
46813
|
+
get css() { return this.content.css; }
|
|
46814
|
+
set css(value) { this.content = { ...this.content, css: value }; }
|
|
46815
|
+
get script() { return this.content.script; }
|
|
46816
|
+
set script(value) { this.content = { ...this.content, script: value }; }
|
|
46817
|
+
messageListener = null;
|
|
46818
|
+
constructor(config) {
|
|
46819
|
+
super();
|
|
46820
|
+
this.content = {
|
|
46821
|
+
html: config?.content?.html ?? config?.html ?? '',
|
|
46822
|
+
css: config?.content?.css ?? config?.css ?? '',
|
|
46823
|
+
script: config?.content?.script ?? config?.script ?? '',
|
|
46824
|
+
};
|
|
46825
|
+
this.loadingContent = config?.loadingContent ? {
|
|
46826
|
+
html: config.loadingContent.html ?? '',
|
|
46827
|
+
css: config.loadingContent.css ?? '',
|
|
46828
|
+
script: config.loadingContent.script ?? '',
|
|
46829
|
+
} : undefined;
|
|
46830
|
+
this.isLoading = config?.isLoading ?? false;
|
|
46831
|
+
this.state = structuredClone(config?.state ?? {});
|
|
46832
|
+
this.title = config?.title ?? 'Embedded content';
|
|
46833
|
+
this.sandbox = this.normalizeSandbox(config?.sandbox);
|
|
46834
|
+
this.borderRadius = config?.borderRadius;
|
|
46835
|
+
this.boxShadow = config?.boxShadow;
|
|
46836
|
+
this.translateX = config?.translateX ?? 0;
|
|
46837
|
+
this.translateY = config?.translateY ?? 0;
|
|
46838
|
+
this.rotation = KritzelMathHelper.degreesToRadians(config?.rotation ?? 0);
|
|
46839
|
+
this.scale = config?.scale ?? 1;
|
|
46840
|
+
this.width = config?.width ?? 0;
|
|
46841
|
+
this.height = config?.height ?? 0;
|
|
46842
|
+
}
|
|
46843
|
+
static create(core, config) {
|
|
46844
|
+
const object = new KritzelIframeObject(config);
|
|
46845
|
+
object._core = core;
|
|
46846
|
+
object.id = object.generateId();
|
|
46847
|
+
object.workspaceId = core.store.state.activeWorkspace.id;
|
|
46848
|
+
object.userId = core.user?.id;
|
|
46849
|
+
object.scale = config?.scale ?? core.store.state.scale;
|
|
46850
|
+
object.zIndex = core.store.currentZIndex;
|
|
46851
|
+
return object;
|
|
46852
|
+
}
|
|
46853
|
+
get sandboxAttribute() {
|
|
46854
|
+
return this.sandbox.join(' ');
|
|
46855
|
+
}
|
|
46856
|
+
mount(iframe) {
|
|
46857
|
+
if (this.isMounted && this.elementRef === iframe) {
|
|
46858
|
+
return;
|
|
46859
|
+
}
|
|
46860
|
+
if (this.isMounted) {
|
|
46861
|
+
this.unmount();
|
|
46862
|
+
}
|
|
46863
|
+
this.elementRef = iframe;
|
|
46864
|
+
this.isMounted = true;
|
|
46865
|
+
iframe.title = this.title;
|
|
46866
|
+
iframe.setAttribute('sandbox', this.sandboxAttribute);
|
|
46867
|
+
iframe.style.pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
46868
|
+
this.messageListener = event => this.handleMessage(event);
|
|
46869
|
+
window.addEventListener('message', this.messageListener);
|
|
46870
|
+
iframe.srcdoc = this.createSourceDocument();
|
|
46871
|
+
this.onMount(this.createLifecycleContext());
|
|
46872
|
+
}
|
|
46873
|
+
unmount() {
|
|
46874
|
+
if (!this.isMounted) {
|
|
46875
|
+
return;
|
|
46876
|
+
}
|
|
46877
|
+
const nextState = this.onUnmount(this.createLifecycleContext());
|
|
46878
|
+
if (nextState !== undefined) {
|
|
46879
|
+
this.state = structuredClone(nextState);
|
|
46880
|
+
}
|
|
46881
|
+
if (this.messageListener) {
|
|
46882
|
+
window.removeEventListener('message', this.messageListener);
|
|
46883
|
+
this.messageListener = null;
|
|
46884
|
+
}
|
|
46885
|
+
this.isMounted = false;
|
|
46886
|
+
this._elementRef = null;
|
|
46887
|
+
}
|
|
46888
|
+
setContent(content) {
|
|
46889
|
+
this.content = {
|
|
46890
|
+
html: content.html ?? this.content.html,
|
|
46891
|
+
css: content.css ?? this.content.css,
|
|
46892
|
+
script: content.script ?? this.content.script,
|
|
46893
|
+
};
|
|
46894
|
+
this.refreshDocument();
|
|
46895
|
+
this.persistUpdate();
|
|
46896
|
+
}
|
|
46897
|
+
setLoadingContent(content) {
|
|
46898
|
+
this.loadingContent = {
|
|
46899
|
+
html: content.html ?? this.loadingContent?.html ?? '',
|
|
46900
|
+
css: content.css ?? this.loadingContent?.css ?? '',
|
|
46901
|
+
script: content.script ?? this.loadingContent?.script ?? '',
|
|
46902
|
+
};
|
|
46903
|
+
this.refreshDocument();
|
|
46904
|
+
this.persistUpdate();
|
|
46905
|
+
}
|
|
46906
|
+
setLoading(isLoading) {
|
|
46907
|
+
this.isLoading = isLoading;
|
|
46908
|
+
this.refreshDocument();
|
|
46909
|
+
this.persistUpdate();
|
|
46910
|
+
}
|
|
46911
|
+
getActiveContent() {
|
|
46912
|
+
const activeLoadingContent = this.isLoading ? this.loadingContent : undefined;
|
|
46913
|
+
return {
|
|
46914
|
+
html: activeLoadingContent?.html ?? this.content.html,
|
|
46915
|
+
css: activeLoadingContent?.css ?? this.content.css,
|
|
46916
|
+
script: activeLoadingContent?.script ?? this.content.script,
|
|
46917
|
+
};
|
|
46918
|
+
}
|
|
46919
|
+
setState(state) {
|
|
46920
|
+
this.state = structuredClone(state);
|
|
46921
|
+
this.elementRef?.contentWindow?.postMessage({ type: IFRAME_PARENT_STATE_MESSAGE, state: this.state }, '*');
|
|
46922
|
+
this.persistUpdate();
|
|
46923
|
+
}
|
|
46924
|
+
setIsInteractive(isInteractive) {
|
|
46925
|
+
this.isInteractive = isInteractive;
|
|
46926
|
+
if (this.isMounted && this.elementRef) {
|
|
46927
|
+
this.elementRef.style.pointerEvents = isInteractive ? 'auto' : 'none';
|
|
46928
|
+
if (!isInteractive) {
|
|
46929
|
+
this.elementRef.blur();
|
|
46930
|
+
}
|
|
46931
|
+
}
|
|
46932
|
+
}
|
|
46933
|
+
hasFocusedInputElement() {
|
|
46934
|
+
return this.isInteractive && this.isMounted && document.activeElement === this.elementRef;
|
|
46935
|
+
}
|
|
46936
|
+
getEmbeddedContentRoots() {
|
|
46937
|
+
return this.isMounted && this.elementRef instanceof HTMLElement && this.elementRef.tagName === 'IFRAME' ? [this.elementRef] : [];
|
|
46938
|
+
}
|
|
46939
|
+
onMount(_context) { }
|
|
46940
|
+
onSerialize(context) {
|
|
46941
|
+
return context.state;
|
|
46942
|
+
}
|
|
46943
|
+
onUnmount(context) {
|
|
46944
|
+
return context.state;
|
|
46945
|
+
}
|
|
46946
|
+
serialize() {
|
|
46947
|
+
const nextState = this.onSerialize(this.createLifecycleContext());
|
|
46948
|
+
this.state = structuredClone(nextState);
|
|
46949
|
+
const messageListener = this.messageListener;
|
|
46950
|
+
this.messageListener = null;
|
|
46951
|
+
try {
|
|
46952
|
+
const serialized = super.serialize();
|
|
46953
|
+
delete serialized.messageListener;
|
|
46954
|
+
return serialized;
|
|
46955
|
+
}
|
|
46956
|
+
finally {
|
|
46957
|
+
this.messageListener = messageListener;
|
|
46958
|
+
}
|
|
46959
|
+
}
|
|
46960
|
+
deserialize(object) {
|
|
46961
|
+
super.deserialize(object);
|
|
46962
|
+
const nextContent = object.content && typeof object.content === 'object' ? object.content : {};
|
|
46963
|
+
const nextLoadingContent = object.loadingContent && typeof object.loadingContent === 'object' ? object.loadingContent : undefined;
|
|
46964
|
+
this.content = {
|
|
46965
|
+
html: typeof nextContent.html === 'string' ? nextContent.html : typeof object.html === 'string' ? object.html : '',
|
|
46966
|
+
css: typeof nextContent.css === 'string' ? nextContent.css : typeof object.css === 'string' ? object.css : '',
|
|
46967
|
+
script: typeof nextContent.script === 'string' ? nextContent.script : typeof object.script === 'string' ? object.script : '',
|
|
46968
|
+
};
|
|
46969
|
+
this.loadingContent = nextLoadingContent ? {
|
|
46970
|
+
html: typeof nextLoadingContent.html === 'string' ? nextLoadingContent.html : '',
|
|
46971
|
+
css: typeof nextLoadingContent.css === 'string' ? nextLoadingContent.css : '',
|
|
46972
|
+
script: typeof nextLoadingContent.script === 'string' ? nextLoadingContent.script : '',
|
|
46973
|
+
} : undefined;
|
|
46974
|
+
this.isLoading = typeof object.isLoading === 'boolean' ? object.isLoading : false;
|
|
46975
|
+
this.state = object.state && typeof object.state === 'object' ? structuredClone(object.state) : {};
|
|
46976
|
+
this.title = typeof object.title === 'string' ? object.title : 'Embedded content';
|
|
46977
|
+
this.sandbox = this.normalizeSandbox(Array.isArray(object.sandbox) ? object.sandbox.filter((token) => typeof token === 'string') : undefined);
|
|
46978
|
+
this.borderRadius = (typeof object.borderRadius === 'number' || typeof object.borderRadius === 'string') ? object.borderRadius : undefined;
|
|
46979
|
+
this.boxShadow = typeof object.boxShadow === 'string' ? object.boxShadow : undefined;
|
|
46980
|
+
this.messageListener = null;
|
|
46981
|
+
return this;
|
|
46982
|
+
}
|
|
46983
|
+
copy() {
|
|
46984
|
+
const copiedObject = super.copy();
|
|
46985
|
+
copiedObject.content = { ...this.content };
|
|
46986
|
+
copiedObject.loadingContent = this.loadingContent ? { ...this.loadingContent } : undefined;
|
|
46987
|
+
copiedObject.isLoading = this.isLoading;
|
|
46988
|
+
copiedObject.state = structuredClone(this.state);
|
|
46989
|
+
copiedObject.sandbox = [...this.sandbox];
|
|
46990
|
+
copiedObject.borderRadius = this.borderRadius;
|
|
46991
|
+
copiedObject.boxShadow = this.boxShadow;
|
|
46992
|
+
copiedObject.messageListener = null;
|
|
46993
|
+
copiedObject._elementRef = null;
|
|
46994
|
+
return copiedObject;
|
|
46995
|
+
}
|
|
46996
|
+
clone() {
|
|
46997
|
+
const clonedObject = super.clone();
|
|
46998
|
+
clonedObject.content = { ...this.content };
|
|
46999
|
+
clonedObject.loadingContent = this.loadingContent ? { ...this.loadingContent } : undefined;
|
|
47000
|
+
clonedObject.isLoading = this.isLoading;
|
|
47001
|
+
clonedObject.state = structuredClone(this.state);
|
|
47002
|
+
clonedObject.sandbox = [...this.sandbox];
|
|
47003
|
+
clonedObject.borderRadius = this.borderRadius;
|
|
47004
|
+
clonedObject.boxShadow = this.boxShadow;
|
|
47005
|
+
clonedObject.messageListener = null;
|
|
47006
|
+
clonedObject.isMounted = false;
|
|
47007
|
+
clonedObject._elementRef = null;
|
|
47008
|
+
return clonedObject;
|
|
47009
|
+
}
|
|
47010
|
+
adoptTransientStateFrom(previous) {
|
|
47011
|
+
if (!(previous instanceof KritzelIframeObject)) {
|
|
47012
|
+
return;
|
|
47013
|
+
}
|
|
47014
|
+
this.isInteractive = previous.isInteractive;
|
|
47015
|
+
this.isSelected = previous.isSelected;
|
|
47016
|
+
this.isHovered = previous.isHovered;
|
|
47017
|
+
if (!previous.isMounted || !(previous.elementRef instanceof HTMLElement) || previous.elementRef.tagName !== 'IFRAME') {
|
|
47018
|
+
return;
|
|
47019
|
+
}
|
|
47020
|
+
if (previous.messageListener) {
|
|
47021
|
+
window.removeEventListener('message', previous.messageListener);
|
|
47022
|
+
}
|
|
47023
|
+
this._elementRef = previous.elementRef;
|
|
47024
|
+
this.isMounted = true;
|
|
47025
|
+
this.messageListener = event => this.handleMessage(event);
|
|
47026
|
+
window.addEventListener('message', this.messageListener);
|
|
47027
|
+
this.elementRef.style.pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
47028
|
+
previous.messageListener = null;
|
|
47029
|
+
previous.isMounted = false;
|
|
47030
|
+
previous._elementRef = null;
|
|
47031
|
+
}
|
|
47032
|
+
createLifecycleContext() {
|
|
47033
|
+
return {
|
|
47034
|
+
object: this,
|
|
47035
|
+
iframe: this.isMounted ? this.elementRef : null,
|
|
47036
|
+
state: structuredClone(this.state),
|
|
47037
|
+
};
|
|
47038
|
+
}
|
|
47039
|
+
normalizeSandbox(tokens) {
|
|
47040
|
+
const requestedTokens = tokens ?? ['allow-scripts'];
|
|
47041
|
+
const normalized = requestedTokens.filter(token => SUPPORTED_SANDBOX_TOKENS.has(token));
|
|
47042
|
+
return [...new Set(normalized.length > 0 ? normalized : ['allow-scripts'])];
|
|
47043
|
+
}
|
|
47044
|
+
createSourceDocument() {
|
|
47045
|
+
const activeContent = this.getActiveContent();
|
|
47046
|
+
const state = JSON.stringify(this.state).replace(/</g, '\\u003c');
|
|
47047
|
+
const css = activeContent.css.replace(/<\/style/gi, '<\\/style');
|
|
47048
|
+
const script = activeContent.script.replace(/<\/script/gi, '<\\/script');
|
|
47049
|
+
const computedStyle = this.isMounted ? getComputedStyle(this.elementRef) : null;
|
|
47050
|
+
const defaultCursor = computedStyle?.getPropertyValue('--kritzel-global-default-cursor').trim() || 'auto';
|
|
47051
|
+
const pointerCursor = computedStyle?.getPropertyValue('--kritzel-global-pointer-cursor').trim() || defaultCursor;
|
|
47052
|
+
return `<!doctype html>
|
|
47053
|
+
<html>
|
|
47054
|
+
<head>
|
|
47055
|
+
<meta charset="utf-8">
|
|
47056
|
+
<style>
|
|
47057
|
+
:root {
|
|
47058
|
+
--kritzel-iframe-default-cursor: ${defaultCursor};
|
|
47059
|
+
--kritzel-iframe-pointer-cursor: ${pointerCursor};
|
|
47060
|
+
}
|
|
47061
|
+
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; cursor: var(--kritzel-iframe-default-cursor); }
|
|
47062
|
+
button, button *, a, a *, input, textarea, select { cursor: var(--kritzel-iframe-pointer-cursor) !important; }
|
|
47063
|
+
${css}
|
|
47064
|
+
</style>
|
|
47065
|
+
</head>
|
|
47066
|
+
<body>
|
|
47067
|
+
${activeContent.html}
|
|
47068
|
+
<script>
|
|
47069
|
+
const kritzel = globalThis.kritzel = {
|
|
47070
|
+
state: ${state},
|
|
47071
|
+
setState(nextState) {
|
|
47072
|
+
this.state = nextState;
|
|
47073
|
+
parent.postMessage({ type: '${IFRAME_STATE_MESSAGE}', state: nextState }, '*');
|
|
47074
|
+
},
|
|
47075
|
+
};
|
|
47076
|
+
globalThis.addEventListener('message', event => {
|
|
47077
|
+
if (event.data?.type === '${IFRAME_PARENT_STATE_MESSAGE}' && event.data.state && typeof event.data.state === 'object') {
|
|
47078
|
+
kritzel.state = event.data.state;
|
|
47079
|
+
globalThis.dispatchEvent(new CustomEvent('kritzelstatechange', { detail: kritzel.state }));
|
|
47080
|
+
}
|
|
47081
|
+
});
|
|
47082
|
+
let bridgedPointerId = null;
|
|
47083
|
+
const interactiveSelector = 'button, input, textarea, select, a[href], [contenteditable="true"], [contenteditable=""]';
|
|
47084
|
+
const bridgePointerEvent = event => parent.postMessage({
|
|
47085
|
+
type: '${IFRAME_POINTER_MESSAGE}',
|
|
47086
|
+
eventType: event.type,
|
|
47087
|
+
pointerId: event.pointerId,
|
|
47088
|
+
pointerType: event.pointerType,
|
|
47089
|
+
clientX: event.clientX,
|
|
47090
|
+
clientY: event.clientY,
|
|
47091
|
+
screenX: event.screenX,
|
|
47092
|
+
screenY: event.screenY,
|
|
47093
|
+
button: event.button,
|
|
47094
|
+
buttons: event.buttons,
|
|
47095
|
+
shiftKey: event.shiftKey,
|
|
47096
|
+
ctrlKey: event.ctrlKey,
|
|
47097
|
+
altKey: event.altKey,
|
|
47098
|
+
metaKey: event.metaKey,
|
|
47099
|
+
}, '*');
|
|
47100
|
+
document.addEventListener('pointerdown', event => {
|
|
47101
|
+
if (event.target instanceof Element && event.target.closest(interactiveSelector)) return;
|
|
47102
|
+
bridgedPointerId = event.pointerId;
|
|
47103
|
+
event.preventDefault();
|
|
47104
|
+
bridgePointerEvent(event);
|
|
47105
|
+
});
|
|
47106
|
+
document.addEventListener('pointermove', event => {
|
|
47107
|
+
if (event.pointerId !== bridgedPointerId) return;
|
|
47108
|
+
event.preventDefault();
|
|
47109
|
+
bridgePointerEvent(event);
|
|
47110
|
+
});
|
|
47111
|
+
const finishPointerBridge = event => {
|
|
47112
|
+
if (event.pointerId !== bridgedPointerId) return;
|
|
47113
|
+
event.preventDefault();
|
|
47114
|
+
bridgePointerEvent(event);
|
|
47115
|
+
bridgedPointerId = null;
|
|
47116
|
+
};
|
|
47117
|
+
document.addEventListener('pointerup', finishPointerBridge);
|
|
47118
|
+
document.addEventListener('pointercancel', finishPointerBridge);
|
|
47119
|
+
document.addEventListener('contextmenu', event => {
|
|
47120
|
+
event.preventDefault();
|
|
47121
|
+
parent.postMessage({
|
|
47122
|
+
type: '${IFRAME_CONTEXT_MENU_MESSAGE}',
|
|
47123
|
+
clientX: event.clientX,
|
|
47124
|
+
clientY: event.clientY,
|
|
47125
|
+
button: event.button,
|
|
47126
|
+
shiftKey: event.shiftKey,
|
|
47127
|
+
ctrlKey: event.ctrlKey,
|
|
47128
|
+
altKey: event.altKey,
|
|
47129
|
+
metaKey: event.metaKey,
|
|
47130
|
+
}, '*');
|
|
47131
|
+
});
|
|
47132
|
+
${script}
|
|
47133
|
+
<\/script>
|
|
47134
|
+
</body>
|
|
47135
|
+
</html>`;
|
|
47136
|
+
}
|
|
47137
|
+
handleMessage(event) {
|
|
47138
|
+
if (event.source !== this.elementRef?.contentWindow || !event.data || typeof event.data !== 'object') {
|
|
47139
|
+
return;
|
|
47140
|
+
}
|
|
47141
|
+
const message = event.data;
|
|
47142
|
+
if (message.type === IFRAME_POINTER_MESSAGE) {
|
|
47143
|
+
this.dispatchPointerMessage(event.data);
|
|
47144
|
+
return;
|
|
47145
|
+
}
|
|
47146
|
+
if (message.type === IFRAME_CONTEXT_MENU_MESSAGE) {
|
|
47147
|
+
this.dispatchContextMenuMessage(event.data);
|
|
47148
|
+
return;
|
|
47149
|
+
}
|
|
47150
|
+
if (message.type !== IFRAME_STATE_MESSAGE || !message.state || typeof message.state !== 'object') {
|
|
47151
|
+
return;
|
|
47152
|
+
}
|
|
47153
|
+
this.state = structuredClone(message.state);
|
|
47154
|
+
this.persistUpdate();
|
|
47155
|
+
}
|
|
47156
|
+
dispatchPointerMessage(message) {
|
|
47157
|
+
if (!this.isMounted || !this.elementRef || !['pointerdown', 'pointermove', 'pointerup', 'pointercancel'].includes(message.eventType)) {
|
|
47158
|
+
return;
|
|
47159
|
+
}
|
|
47160
|
+
const iframeRect = this.elementRef.getBoundingClientRect();
|
|
47161
|
+
if (message.eventType === 'pointerdown') {
|
|
47162
|
+
const scaleX = this.elementRef.offsetWidth > 0 ? iframeRect.width / this.elementRef.offsetWidth : 1;
|
|
47163
|
+
const scaleY = this.elementRef.offsetHeight > 0 ? iframeRect.height / this.elementRef.offsetHeight : 1;
|
|
47164
|
+
iframePointerBridgeStarts.set(this.elementRef, {
|
|
47165
|
+
pointerId: message.pointerId,
|
|
47166
|
+
clientX: iframeRect.left + message.clientX * scaleX,
|
|
47167
|
+
clientY: iframeRect.top + message.clientY * scaleY,
|
|
47168
|
+
screenX: message.screenX,
|
|
47169
|
+
screenY: message.screenY,
|
|
47170
|
+
});
|
|
47171
|
+
}
|
|
47172
|
+
const bridgeStart = iframePointerBridgeStarts.get(this.elementRef);
|
|
47173
|
+
const hasBridgeStart = bridgeStart?.pointerId === message.pointerId;
|
|
47174
|
+
const clientX = hasBridgeStart ? bridgeStart.clientX + message.screenX - bridgeStart.screenX : iframeRect.left + message.clientX;
|
|
47175
|
+
const clientY = hasBridgeStart ? bridgeStart.clientY + message.screenY - bridgeStart.screenY : iframeRect.top + message.clientY;
|
|
47176
|
+
this.elementRef.dispatchEvent(new PointerEvent(message.eventType, {
|
|
47177
|
+
bubbles: true,
|
|
47178
|
+
composed: true,
|
|
47179
|
+
cancelable: true,
|
|
47180
|
+
pointerId: message.pointerId,
|
|
47181
|
+
pointerType: message.pointerType,
|
|
47182
|
+
clientX,
|
|
47183
|
+
clientY,
|
|
47184
|
+
screenX: message.screenX,
|
|
47185
|
+
screenY: message.screenY,
|
|
47186
|
+
button: message.button,
|
|
47187
|
+
buttons: message.buttons,
|
|
47188
|
+
shiftKey: message.shiftKey,
|
|
47189
|
+
ctrlKey: message.ctrlKey,
|
|
47190
|
+
altKey: message.altKey,
|
|
47191
|
+
metaKey: message.metaKey,
|
|
47192
|
+
}));
|
|
47193
|
+
if (message.eventType === 'pointerup' || message.eventType === 'pointercancel') {
|
|
47194
|
+
iframePointerBridgeStarts.delete(this.elementRef);
|
|
47195
|
+
}
|
|
47196
|
+
}
|
|
47197
|
+
dispatchContextMenuMessage(message) {
|
|
47198
|
+
if (!this.isMounted || !this.elementRef) {
|
|
47199
|
+
return;
|
|
47200
|
+
}
|
|
47201
|
+
const iframeRect = this.elementRef.getBoundingClientRect();
|
|
47202
|
+
// Dispatched as a MouseEvent (not PointerEvent) to mirror how browsers
|
|
47203
|
+
// natively raise 'contextmenu' for both mouse right-click and touch long-press.
|
|
47204
|
+
this.elementRef.dispatchEvent(new MouseEvent('contextmenu', {
|
|
47205
|
+
bubbles: true,
|
|
47206
|
+
composed: true,
|
|
47207
|
+
cancelable: true,
|
|
47208
|
+
clientX: iframeRect.left + message.clientX,
|
|
47209
|
+
clientY: iframeRect.top + message.clientY,
|
|
47210
|
+
button: message.button,
|
|
47211
|
+
shiftKey: message.shiftKey,
|
|
47212
|
+
ctrlKey: message.ctrlKey,
|
|
47213
|
+
altKey: message.altKey,
|
|
47214
|
+
metaKey: message.metaKey,
|
|
47215
|
+
}));
|
|
47216
|
+
}
|
|
47217
|
+
refreshDocument() {
|
|
47218
|
+
if (this.isMounted && this.elementRef) {
|
|
47219
|
+
this.elementRef.srcdoc = this.createSourceDocument();
|
|
47220
|
+
}
|
|
47221
|
+
}
|
|
47222
|
+
persistUpdate() {
|
|
47223
|
+
if (this._core?.store?.objects) {
|
|
47224
|
+
this.update();
|
|
47225
|
+
}
|
|
47226
|
+
}
|
|
47227
|
+
}
|
|
47228
|
+
|
|
46742
47229
|
/**
|
|
46743
47230
|
* Handles deserialization/revival of Kritzel objects from plain JavaScript objects.
|
|
46744
47231
|
* This class uses a pattern similar to JSON.parse reviver to reconstruct class instances
|
|
@@ -46801,6 +47288,9 @@ class KritzelReviver {
|
|
|
46801
47288
|
case 'KritzelDynamicObject':
|
|
46802
47289
|
revivedObj = KritzelDynamicObject.create(this._core).deserialize(obj);
|
|
46803
47290
|
break;
|
|
47291
|
+
case 'KritzelIframeObject':
|
|
47292
|
+
revivedObj = KritzelIframeObject.create(this._core).deserialize(obj);
|
|
47293
|
+
break;
|
|
46804
47294
|
case 'KritzelSelectionGroup':
|
|
46805
47295
|
revivedObj = KritzelSelectionGroup.create(this._core).deserialize(obj);
|
|
46806
47296
|
break;
|
|
@@ -51725,20 +52215,22 @@ const cleanupTransactions = (transactionCleanups, i) => {
|
|
|
51725
52215
|
// We need to think about the possibility that the user transforms the
|
|
51726
52216
|
// Y.Doc in the event.
|
|
51727
52217
|
if (type._dEH.l.length > 0 && (type._item === null || !type._item.deleted)) {
|
|
51728
|
-
events = events
|
|
51729
|
-
.filter(event =>
|
|
51730
|
-
event.target._item === null || !event.target._item.deleted
|
|
51731
|
-
);
|
|
51732
|
-
events
|
|
51733
|
-
.forEach(event => {
|
|
51734
|
-
event.currentTarget = type;
|
|
51735
|
-
// path is relative to the current target
|
|
51736
|
-
event._path = null;
|
|
51737
|
-
});
|
|
51738
|
-
// sort events by path length so that top-level events are fired first.
|
|
51739
|
-
events
|
|
51740
|
-
.sort((event1, event2) => event1.path.length - event2.path.length);
|
|
51741
52218
|
fs.push(() => {
|
|
52219
|
+
// The same event instance is shared by all parent types. Hence, we must set
|
|
52220
|
+
// currentTarget right before calling the handlers (see #768).
|
|
52221
|
+
events = events
|
|
52222
|
+
.filter(event =>
|
|
52223
|
+
event.target._item === null || !event.target._item.deleted
|
|
52224
|
+
);
|
|
52225
|
+
events
|
|
52226
|
+
.forEach(event => {
|
|
52227
|
+
event.currentTarget = type;
|
|
52228
|
+
// path is relative to the current target
|
|
52229
|
+
event._path = null;
|
|
52230
|
+
});
|
|
52231
|
+
// sort events by path length so that top-level events are fired first.
|
|
52232
|
+
events
|
|
52233
|
+
.sort((event1, event2) => event1.path.length - event2.path.length);
|
|
51742
52234
|
// We don't need to check for events.length
|
|
51743
52235
|
// because we know it has at least one element
|
|
51744
52236
|
callEventHandlerListeners(type._dEH, events, transaction);
|
|
@@ -51752,6 +52244,7 @@ const cleanupTransactions = (transactionCleanups, i) => {
|
|
|
51752
52244
|
}
|
|
51753
52245
|
});
|
|
51754
52246
|
});
|
|
52247
|
+
// note the nested fs calls, must not modify fs at this point
|
|
51755
52248
|
callAll(fs, []);
|
|
51756
52249
|
} finally {
|
|
51757
52250
|
// Replace deleted items with ItemDeleted / GC.
|
|
@@ -59162,9 +59655,16 @@ class KritzelStore {
|
|
|
59162
59655
|
* Gets the currently selected dynamic object whose focused descendant is an input-like element.
|
|
59163
59656
|
* @returns The interactive dynamic object with focused input-like content, or null if none matches
|
|
59164
59657
|
*/
|
|
59658
|
+
get activeInteractiveEmbeddedObject() {
|
|
59659
|
+
for (const object of this.selectedObjects) {
|
|
59660
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object) && object.hasFocusedInputElement()) {
|
|
59661
|
+
return object;
|
|
59662
|
+
}
|
|
59663
|
+
}
|
|
59664
|
+
return null;
|
|
59665
|
+
}
|
|
59165
59666
|
get activeInteractiveDynamicObject() {
|
|
59166
|
-
|
|
59167
|
-
return interactiveDynamicObject ?? null;
|
|
59667
|
+
return this.activeInteractiveEmbeddedObject;
|
|
59168
59668
|
}
|
|
59169
59669
|
/**
|
|
59170
59670
|
* Gets the path currently being drawn (not yet completed).
|
|
@@ -61247,13 +61747,38 @@ class KritzelAnchorManager {
|
|
|
61247
61747
|
}
|
|
61248
61748
|
}
|
|
61249
61749
|
|
|
61750
|
+
const KRITZEL_ICON_REGISTRY_KEY = '__kritzelIconRegistry__';
|
|
61751
|
+
const getGlobalRegistryStore = () => {
|
|
61752
|
+
const globalScope = globalThis;
|
|
61753
|
+
const existing = globalScope[KRITZEL_ICON_REGISTRY_KEY];
|
|
61754
|
+
if (existing) {
|
|
61755
|
+
return existing;
|
|
61756
|
+
}
|
|
61757
|
+
const created = {
|
|
61758
|
+
icons: new Map(),
|
|
61759
|
+
listeners: new Set(),
|
|
61760
|
+
};
|
|
61761
|
+
globalScope[KRITZEL_ICON_REGISTRY_KEY] = created;
|
|
61762
|
+
return created;
|
|
61763
|
+
};
|
|
61250
61764
|
/**
|
|
61251
61765
|
* A static registry for managing SVG icons throughout the Kritzel library.
|
|
61252
61766
|
* Icons are stored as name-to-SVG-content mappings and can be retrieved by name.
|
|
61253
61767
|
*/
|
|
61254
61768
|
class KritzelIconRegistry {
|
|
61255
61769
|
/** Internal storage for registered icons, mapping icon names to their SVG content. */
|
|
61256
|
-
static registry
|
|
61770
|
+
static get registry() {
|
|
61771
|
+
return getGlobalRegistryStore().icons;
|
|
61772
|
+
}
|
|
61773
|
+
static get listeners() {
|
|
61774
|
+
return getGlobalRegistryStore().listeners;
|
|
61775
|
+
}
|
|
61776
|
+
static subscribe(listener) {
|
|
61777
|
+
this.listeners.add(listener);
|
|
61778
|
+
return () => {
|
|
61779
|
+
this.listeners.delete(listener);
|
|
61780
|
+
};
|
|
61781
|
+
}
|
|
61257
61782
|
/**
|
|
61258
61783
|
* Registers a single icon with the given name and SVG content.
|
|
61259
61784
|
* If an icon with the same name already exists, it will be overwritten and a warning will be logged.
|
|
@@ -61266,6 +61791,9 @@ class KritzelIconRegistry {
|
|
|
61266
61791
|
console.warn(`[IconRegistry] Icon "${name}" is already registered. It will be overwritten.`);
|
|
61267
61792
|
}
|
|
61268
61793
|
this.registry.set(name, svgContent);
|
|
61794
|
+
for (const listener of this.listeners) {
|
|
61795
|
+
listener(name);
|
|
61796
|
+
}
|
|
61269
61797
|
}
|
|
61270
61798
|
/**
|
|
61271
61799
|
* Retrieves the SVG content for a registered icon by its name.
|
|
@@ -61299,72 +61827,77 @@ class KritzelIconRegistry {
|
|
|
61299
61827
|
return this.registry.has(name);
|
|
61300
61828
|
}
|
|
61301
61829
|
}
|
|
61302
|
-
|
|
61303
|
-
|
|
61304
|
-
|
|
61305
|
-
|
|
61306
|
-
|
|
61307
|
-
|
|
61308
|
-
|
|
61309
|
-
|
|
61310
|
-
|
|
61311
|
-
|
|
61312
|
-
|
|
61313
|
-
|
|
61314
|
-
|
|
61315
|
-
|
|
61316
|
-
|
|
61317
|
-
|
|
61318
|
-
|
|
61319
|
-
|
|
61320
|
-
|
|
61321
|
-
|
|
61322
|
-
|
|
61323
|
-
|
|
61324
|
-
|
|
61325
|
-
|
|
61326
|
-
|
|
61327
|
-
|
|
61328
|
-
|
|
61329
|
-
|
|
61330
|
-
|
|
61331
|
-
|
|
61332
|
-
|
|
61333
|
-
|
|
61334
|
-
|
|
61335
|
-
|
|
61336
|
-
|
|
61337
|
-
|
|
61338
|
-
|
|
61339
|
-
|
|
61340
|
-
|
|
61341
|
-
|
|
61342
|
-
|
|
61343
|
-
|
|
61344
|
-
|
|
61345
|
-
|
|
61346
|
-
|
|
61347
|
-
|
|
61348
|
-
|
|
61349
|
-
|
|
61350
|
-
|
|
61351
|
-
|
|
61352
|
-
|
|
61353
|
-
|
|
61354
|
-
|
|
61355
|
-
|
|
61356
|
-
|
|
61357
|
-
|
|
61358
|
-
|
|
61359
|
-
|
|
61360
|
-
|
|
61361
|
-
|
|
61362
|
-
|
|
61363
|
-
|
|
61364
|
-
|
|
61365
|
-
|
|
61366
|
-
|
|
61367
|
-
}
|
|
61830
|
+
const defaultIcons = {
|
|
61831
|
+
cursor: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"/></svg>',
|
|
61832
|
+
pen: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/></svg>',
|
|
61833
|
+
arrow: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="19" x2="19" y2="5"/><path d="M15 5h4v4"/></svg>',
|
|
61834
|
+
arrowUpFromDot: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-from-dot-icon lucide-arrow-up-from-dot"><path d="m5 9 7-7 7 7"/><path d="M12 16V2"/><circle cx="12" cy="21" r="1"/></svg>',
|
|
61835
|
+
arrowDownFromDot: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-from-dot-icon lucide-arrow-down-from-dot" transform="rotate(180)"><path d="m5 9 7-7 7 7"/><path d="M12 16V2"/><circle cx="12" cy="21" r="1"/></svg>',
|
|
61836
|
+
highlighter: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-highlighter-icon lucide-highlighter"><path d="m9 11-6 6v3h9l3-3"/><path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"/></svg>',
|
|
61837
|
+
eraser: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"/><path d="M22 21H7"/><path d="m5 11 9 9"/></svg>',
|
|
61838
|
+
type: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
|
61839
|
+
shapes: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z"/><rect x="3" y="14" width="7" height="7" rx="1"/><circle cx="17.5" cy="17.5" r="3.5"/></svg>',
|
|
61840
|
+
shapeRectangle: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/></svg>',
|
|
61841
|
+
shapeEllipse: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="12" rx="10" ry="8"/></svg>',
|
|
61842
|
+
shapeTriangle: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3L22 21H2L12 3Z"/></svg>',
|
|
61843
|
+
image: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',
|
|
61844
|
+
imageOff: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image-off-icon lucide-image-off"><line x1="2" x2="22" y1="2" y2="22"/><path d="M10.41 10.41a2 2 0 1 1-2.83-2.83"/><line x1="13.5" x2="6" y1="13.5" y2="21"/><line x1="18" x2="21" y1="12" y2="15"/><path d="M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59"/><path d="M21 15V5a2 2 0 0 0-2-2H9"/></svg>',
|
|
61845
|
+
chevronDown: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>',
|
|
61846
|
+
chevronUp: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>',
|
|
61847
|
+
chevronLeft: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left-icon lucide-chevron-left"><path d="m15 18-6-6 6-6"/></svg>',
|
|
61848
|
+
chevronRight: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right-icon lucide-chevron-right"><path d="m9 18 6-6-6-6"/></svg>',
|
|
61849
|
+
chevronsLeft: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-left-icon lucide-chevrons-left"><path d="m11 17-5-5 5-5"/><path d="m18 17-5-5 5-5"/></svg>',
|
|
61850
|
+
copy: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>',
|
|
61851
|
+
paste: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clipboard-paste-icon lucide-clipboard-paste"><path d="M11 14h10"/><path d="M16 4h2a2 2 0 0 1 2 2v1.344"/><path d="m17 18 4-4-4-4"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113"/><rect x="8" y="2" width="8" height="4" rx="1"/></svg>',
|
|
61852
|
+
cut: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scissors-icon lucide-scissors"><circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/></svg>',
|
|
61853
|
+
delete: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash2-icon lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>',
|
|
61854
|
+
bringToFront: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-to-line-icon lucide-arrow-up-to-line"><path d="M5 3h14"/><path d="m18 13-6-6-6 6"/><path d="M12 7v14"/></svg>',
|
|
61855
|
+
sendToBack: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-to-line-icon lucide-arrow-down-to-line"><path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/></svg>',
|
|
61856
|
+
selectAll: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-mouse-pointer-icon lucide-square-mouse-pointer"><path d="M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z"/><path d="M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6"/></svg>',
|
|
61857
|
+
download: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download-icon lucide-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>',
|
|
61858
|
+
upload: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-upload-icon lucide-upload"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/></svg>',
|
|
61859
|
+
undo: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-undo-icon lucide-undo"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"/></svg>',
|
|
61860
|
+
redo: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-redo-icon lucide-redo"><path d="M21 7v6h-6"/><path d="M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"/></svg>',
|
|
61861
|
+
plus: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus-icon lucide-plus"><path d="M5 12h14"/><path d="M12 5v14"/></svg>',
|
|
61862
|
+
minus: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus-icon lucide-minus"><path d="M5 12h14"/></svg>',
|
|
61863
|
+
ellipsisVertical: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis-vertical-icon lucide-ellipsis-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',
|
|
61864
|
+
x: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>',
|
|
61865
|
+
check: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>',
|
|
61866
|
+
group: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-group-icon lucide-group"><path d="M3 7V5c0-1.1.9-2 2-2h2"/><path d="M17 3h2c1.1 0 2 .9 2 2v2"/><path d="M21 17v2c0 1.1-.9 2-2 2h-2"/><path d="M7 21H5c-1.1 0-2-.9-2-2v-2"/><rect width="7" height="5" x="7" y="7" rx="1"/><rect width="7" height="5" x="10" y="12" rx="1"/></svg>',
|
|
61867
|
+
ungroup: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ungroup-icon lucide-ungroup"><rect width="8" height="6" x="5" y="4" rx="1"/><rect width="8" height="6" x="11" y="14" rx="1"/></svg>',
|
|
61868
|
+
moveVertical: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-move-vertical-icon lucide-move-vertical" version="1.1" id="svg3"> <defs id="defs3" /> <path d="M12 2v20" id="path1" /> <path style="fill:#ffffff;stroke-width:2.5;stroke-dasharray:none;stroke-linejoin:round;paint-order:stroke fill markers" d="m 11.735575,22.661865 c -0.09259,-0.02798 -0.204674,-0.07661 -0.249076,-0.108068 -0.04441,-0.03147 -1.167275,-0.979853 -2.4952713,-2.10755 -1.8557024,-1.57581 -2.4300904,-2.079639 -2.4817336,-2.17687 -0.086514,-0.162885 -0.089504,-0.422449 -0.00664,-0.576334 0.1483053,-0.275409 0.437667,-0.436207 0.7830634,-0.435147 0.3692925,0.0011 0.3517326,-0.01122 2.168748,1.525599 L 11.12348,20.194964 V 11.999996 3.8050256 L 9.4546663,5.2164943 C 7.6376509,6.7533118 7.6552109,6.7409594 7.2859184,6.7420935 6.6681409,6.7439906 6.253658,6.1955854 6.5159903,5.723396 6.5738626,5.6192278 7.1368766,5.1267427 9.0629381,3.4955044 11.738128,1.2298067 11.640395,1.3026868 12.00355,1.3026868 c 0.363154,0 0.265421,-0.07288 2.940611,2.1928176 1.926062,1.6312383 2.489076,2.1237234 2.546948,2.2278916 0.262332,0.4721894 -0.15215,1.0205946 -0.769928,1.0186975 -0.369293,-0.00114 -0.351733,0.011218 -2.168748,-1.5255992 L 12.88362,3.8050256 v 8.1949704 8.194968 l 1.668813,-1.411469 c 1.817015,-1.536817 1.799455,-1.524464 2.168748,-1.525599 0.617772,-0.0019 1.032269,0.546521 0.769928,1.018687 -0.103474,0.18623 -4.919006,4.273935 -5.130582,4.355136 -0.20796,0.07981 -0.425829,0.09033 -0.624952,0.03014 z" id="path4" /> </svg>',
|
|
61869
|
+
hand: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hand-icon lucide-hand" version="1.1" id="svg4"> <defs id="defs4" /> <path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" id="path1" /> <path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" id="path2" /> <path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" id="path3" /> <path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" id="path4" /> <path style="fill:#ffffff;stroke-width:0.0423032" d="M 11.478261,21.222477 C 9.6854059,21.139331 8.3341788,20.647346 7.1297169,19.639159 6.9698298,19.505327 5.949644,18.508708 4.8626374,17.42445 3.0780314,15.644357 2.8775851,15.435367 2.7968392,15.270602 2.5896561,14.847836 2.616354,14.436649 2.8771894,14.033085 c 0.136522,-0.211226 0.3837159,-0.398688 0.6367632,-0.482897 0.1529977,-0.05091 0.2326803,-0.05992 0.4470908,-0.05054 0.2250407,0.0098 0.2876577,0.02439 0.4554568,0.105827 0.1747854,0.08483 0.2933718,0.192702 1.1675186,1.062064 0.7182021,0.714271 1.0062041,0.982633 1.0998825,1.024878 0.1680197,0.07577 0.4756439,0.07817 0.6368269,0.005 0.1370772,-0.06226 0.2976691,-0.220818 0.3691296,-0.364463 0.072561,-0.145855 0.071573,-0.543545 -0.00169,-0.681911 -0.028747,-0.05429 -0.2476439,-0.296131 -0.4864385,-0.537426 l -0.4341716,-0.438718 0.00753,-3.989014 0.00753,-3.9890137 0.089246,-0.1883791 c 0.244787,-0.516692 0.7711718,-0.809716 1.3059705,-0.7269981 0.3973687,0.061462 0.7569953,0.3284904 0.9363122,0.6952277 l 0.093853,0.1919473 0.014101,2.4958872 0.014101,2.4958877 0.067385,0.149123 c 0.1186861,0.262654 0.4140438,0.457222 0.6940724,0.457222 0.2764172,0 0.5690532,-0.187563 0.6965992,-0.446482 l 0.06486,-0.131661 0.0141,-3.4970626 0.0141,-3.4970623 0.08982,-0.1896121 C 11.096301,3.0422103 11.506844,2.7755634 12,2.7755634 c 0.493156,0 0.903699,0.2666469 1.122868,0.7293016 l 0.08982,0.1896121 0.0141,3.2432432 c 0.01405,3.2315947 0.01432,3.2437077 0.07397,3.3726737 0.124721,0.269649 0.355908,0.424566 0.661411,0.443206 0.237954,0.01452 0.429018,-0.0627 0.591626,-0.239109 0.223655,-0.242637 0.208338,-0.06565 0.224113,-2.5896966 l 0.0141,-2.2561693 0.09385,-0.1919473 c 0.179317,-0.3667373 0.538944,-0.6337662 0.936313,-0.6952277 0.609359,-0.09425 1.208067,0.3054956 1.370981,0.9153772 0.03013,0.1127929 0.03773,0.6662436 0.038,2.7657391 3.74e-4,2.9328416 -0.008,2.8034316 0.197044,3.0364016 0.234927,0.266892 0.603828,0.337117 0.920407,0.175213 0.181933,-0.09304 0.329759,-0.261686 0.376309,-0.4293 0.01848,-0.06654 0.02929,-0.683932 0.0295,-1.684364 1.78e-4,-0.8783075 0.01239,-1.6530128 0.02751,-1.745346 0.08579,-0.5238478 0.505382,-0.9420803 1.039546,-1.0361716 0.607538,-0.1070155 1.25615,0.3485846 1.385876,0.973471 0.02211,0.1064847 0.02843,1.1397236 0.02169,3.5455556 -0.0093,3.324725 -0.01078,3.403075 -0.07062,3.770606 -0.126399,0.776213 -0.328814,1.41352 -0.669031,2.106456 -0.36657,0.746612 -0.72118,1.250303 -1.297841,1.843464 -1.185731,1.21966 -2.604527,1.933174 -4.300822,2.162889 -0.38234,0.05178 -2.604621,0.0785 -3.412456,0.04104 z" id="path16" /> </svg>',
|
|
61870
|
+
handGrab: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hand-grab-icon lucide-hand-grab" version="1.1" id="svg5"> <defs id="defs5" /> <path d="M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" id="path1" /> <path d="M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" id="path2" /> <path d="M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" id="path3" /> <path d="M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" id="path4" /> <path d="M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" id="path5" /> <path style="fill:#ffffff;stroke-width:0.0423032" d="M 9.5887192,21.221364 C 8.0526856,21.128375 6.6533474,20.587008 5.4571093,19.622953 5.3019976,19.497947 5.0101058,19.225967 4.8084606,19.018552 4.2300382,18.423579 3.8474097,17.879011 3.4960953,17.150756 3.1017715,16.333345 2.9014937,15.633198 2.8052391,14.735605 c -0.097577,-0.909922 -0.019834,-1.263323 0.3569794,-1.622742 0.753018,-0.718257 1.9463784,-0.256949 2.0619296,0.797066 0.037839,0.345154 0.089701,0.477674 0.2472582,0.631806 0.2464521,0.241095 0.5958008,0.287445 0.9036474,0.119894 0.1478567,-0.08047 0.2303871,-0.16866 0.3266699,-0.349056 0.050118,-0.0939 0.05337,-0.2326 0.066784,-2.848413 L 6.7826087,8.7144536 6.8458627,8.559342 C 6.9736603,8.2459558 7.2463773,7.9734987 7.5581669,7.8477164 c 0.1253804,-0.050581 0.2118709,-0.062705 0.4512338,-0.063254 0.275392,-6.312e-4 0.3094658,0.00564 0.4867271,0.089609 0.264676,0.1253746 0.4771417,0.334346 0.6070085,0.5970252 l 0.1048543,0.212087 0.017338,0.7488899 c 0.019395,0.8377165 0.026343,0.8713745 0.2242006,1.0860245 0.1591067,0.172611 0.3522021,0.249908 0.5883018,0.235502 0.305503,-0.01864 0.53669,-0.173557 0.661411,-0.443206 0.05734,-0.123963 0.0605,-0.181852 0.07486,-1.3703236 0.01626,-1.3456629 0.0141,-1.3267758 0.182667,-1.5938092 0.257891,-0.4085268 0.77099,-0.6442307 1.228943,-0.5645435 0.471012,0.08196 0.850379,0.4102836 0.989676,0.8565175 0.04663,0.149383 0.0514,0.2860903 0.0514,1.4721724 0,0.8344844 0.01108,1.3591794 0.03064,1.4503554 0.04109,0.191585 0.179844,0.390224 0.342505,0.490321 0.27721,0.170587 0.693425,0.126085 0.92529,-0.09893 0.228986,-0.222224 0.234357,-0.25046 0.251582,-1.3227071 l 0.0152,-0.9463484 0.104855,-0.2120434 c 0.129872,-0.2626357 0.342372,-0.471626 0.607008,-0.5969817 0.177262,-0.083967 0.211335,-0.09024 0.486727,-0.089609 0.239363,5.486e-4 0.325854,0.012673 0.451234,0.063254 0.31179,0.1257823 0.584507,0.3982394 0.712304,0.7116256 0.0621,0.1522783 0.06351,0.1824139 0.07736,1.649824 0.01408,1.492435 0.0142,1.494914 0.07947,1.627432 0.0771,0.156535 0.2216,0.291061 0.395058,0.367789 0.09695,0.04289 0.169789,0.05275 0.325757,0.04411 0.230544,-0.01277 0.363779,-0.06826 0.506411,-0.21089 0.177062,-0.177061 0.198302,-0.25307 0.219359,-0.784959 0.02002,-0.505773 0.05012,-0.6549 0.175297,-0.868492 0.498409,-0.850471 1.728484,-0.8041941 2.173478,0.08177 0.131751,0.262312 0.134447,0.313526 0.122615,2.328965 -0.0104,1.771638 -0.01517,1.923481 -0.0714,2.273746 -0.123689,0.770512 -0.327108,1.411813 -0.668163,2.106456 -0.36657,0.746612 -0.72118,1.250303 -1.297841,1.843464 -1.180268,1.214041 -2.600612,1.930754 -4.287083,2.163284 -0.28697,0.03957 -0.685446,0.04782 -2.636536,0.05459 -1.26416,0.0044 -2.4698005,-0.0024 -2.6792012,-0.01507 z" id="path6" /> </svg>',
|
|
61871
|
+
mousePointer: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mouse-pointer2-icon lucide-mouse-pointer-2" version="1.1" id="svg1"> <defs id="defs1" /> <path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z" id="path1" /> <path style="fill:#ffffff;stroke-width:0.0972651;stroke-linejoin:round;paint-order:stroke fill markers" d="M 7.8509196,12.314844 C 6.127071,8.1920568 4.7235325,4.8125504 4.7319449,4.8048299 c 0.01847,-0.016951 15.4787861,6.0801241 15.4610371,6.0973581 -0.0069,0.0067 -1.32633,0.341226 -2.93219,0.743509 -1.858829,0.465652 -3.011462,0.772855 -3.172161,0.845453 -0.688426,0.310999 -1.245788,0.879167 -1.498145,1.527185 -0.06251,0.160512 -0.440389,1.529576 -0.839733,3.042364 -0.399346,1.512788 -0.734966,2.750433 -0.745822,2.750322 -0.01086,-1.09e-4 -1.430163,-3.373391 -3.1540114,-7.496177 z" id="path2" /> <path style="fill:#ffffff;stroke-width:0.0705053;stroke-linejoin:round;paint-order:stroke fill markers" d="M 10.777831,19.240865 C 9.3899089,15.977493 4.7567738,4.8648478 4.7760705,4.8455511 c 0.013084,-0.013084 4.7618079,1.8507077 10.7773965,4.2299406 4.467495,1.7669453 4.558837,1.8037523 4.533848,1.8269883 -0.01183,0.011 -0.96064,0.257045 -2.108467,0.546768 -3.445281,0.869623 -3.777157,0.960825 -4.075205,1.119907 -0.597122,0.31871 -1.103666,0.864485 -1.309236,1.410635 -0.09642,0.256167 -0.312339,1.032806 -0.943226,3.392713 -0.641066,2.39798 -0.629171,2.354884 -0.649929,2.354849 -0.0091,-1.5e-5 -0.10963,-0.218934 -0.223421,-0.486487 z" id="path6" /> </svg>',
|
|
61872
|
+
pointer: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pointer-icon lucide-pointer" version="1.1" id="svg5"> <defs id="defs5" /> <path d="M22 14a8 8 0 0 1-8 8" id="path1" /> <path d="M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2" id="path2" /> <path d="M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1" id="path3" /> <path d="M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10" id="path4" /> <path d="M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" id="path5" /> <path style="fill:#ffffff;stroke-width:0.0930233;stroke-linejoin:round;paint-order:stroke fill markers" d="M 11.2,21.203517 C 9.5092536,21.041493 8.4838422,20.667261 7.3116279,19.784423 7.1888372,19.691945 6.139155,18.670017 4.9790008,17.513473 2.5649891,15.106974 2.6562686,15.220427 2.6869266,14.664621 c 0.020277,-0.367608 0.1272548,-0.601802 0.3822766,-0.836873 0.2609241,-0.240511 0.4631523,-0.319555 0.8191689,-0.320185 0.509345,-9.02e-4 0.5815472,0.04845 1.7102825,1.168976 0.532833,0.528958 1.0223742,0.98871 1.0878697,1.021671 0.1699959,0.08555 0.4741793,0.07658 0.6733897,-0.01985 0.303161,-0.146758 0.4720469,-0.543298 0.3791811,-0.890307 -0.036373,-0.135913 -0.1250717,-0.246717 -0.506083,-0.632208 l -0.4619807,-0.467411 0.00983,-5.002356 0.00983,-5.0023561 0.080405,-0.1739784 C 6.9849846,3.2633288 7.2288893,3.0140593 7.4738043,2.8937849 7.6531903,2.8056908 7.7297209,2.7906977 8,2.7906977 c 0.2702791,0 0.3468097,0.014993 0.5261957,0.1030872 0.244915,0.1202744 0.4888197,0.3695439 0.6027014,0.6159576 0.079998,0.1730976 0.080499,0.1905559 0.09901,3.448397 0.020472,3.6031325 0.00418,3.3665775 0.2478407,3.5980265 0.2810043,0.266918 0.6822132,0.283308 1.0083162,0.04119 0.232339,-0.172501 0.25913,-0.280173 0.275933,-1.1089849 0.01456,-0.7180841 0.01869,-0.7520168 0.117805,-0.9674419 0.454637,-0.9881395 1.789759,-0.9881395 2.244396,0 0.09912,0.2154251 0.103248,0.2493578 0.117805,0.9674419 0.0168,0.8288119 0.04359,0.9364839 0.275933,1.1089849 0.326103,0.242117 0.727312,0.225727 1.008316,-0.04119 0.160426,-0.152384 0.218977,-0.294978 0.250819,-0.610832 C 14.845142,9.2502593 15.336916,8.7840275 16,8.7840275 c 0.478554,0 0.847992,0.2240614 1.082489,0.6565225 l 0.126813,0.2338686 0.01869,0.7813954 c 0.02069,0.865066 0.03258,0.913549 0.276595,1.127795 0.239244,0.210059 0.56665,0.239738 0.88018,0.07979 0.219744,-0.112104 0.324993,-0.301479 0.383515,-0.690054 0.06437,-0.427406 0.125794,-0.56694 0.357358,-0.811785 C 19.38604,9.8862229 19.614832,9.7882106 20,9.7869898 c 0.380153,-0.0012 0.636641,0.1145641 0.905451,0.4086842 0.318537,0.348531 0.317259,0.340596 0.332734,2.064791 0.02055,2.290001 -0.04576,2.983129 -0.383655,4.009983 -0.878739,2.670467 -3.284504,4.613238 -6.090273,4.918188 -0.322415,0.03504 -3.227312,0.04717 -3.564257,0.01488 z" id="path6" /> <path style="fill:#ffffff;stroke-width:0.0705053;stroke-linejoin:round;paint-order:stroke fill markers" d="m 11.942854,21.190957 c -1.015003,-0.01704 -1.131723,-0.02688 -1.806535,-0.1522 C 9.5352183,20.927122 8.8225664,20.681951 8.319624,20.413766 7.7570149,20.113766 7.3758537,19.827607 6.7836127,19.260598 5.774345,18.294328 3.1746828,15.68636 2.994305,15.459184 2.7288345,15.124838 2.6970674,15.049109 2.7026798,14.763988 c 0.00827,-0.420163 0.1162058,-0.679868 0.3844475,-0.925026 0.2382303,-0.217729 0.416008,-0.293073 0.7303102,-0.309513 0.5101451,-0.02668 0.6329728,0.04799 1.5378542,0.934977 0.8479274,0.831158 1.2429087,1.199656 1.342282,1.252283 0.11819,0.06259 0.4442817,0.06081 0.6122724,-0.0033 0.1482348,-0.05661 0.3410696,-0.248342 0.4107195,-0.408368 0.063024,-0.144802 0.06179,-0.498 -0.00216,-0.618376 C 7.6917315,14.63641 7.4736023,14.388937 7.2336742,14.136678 L 6.797441,13.678026 6.7970753,8.6903755 6.7967098,3.7027253 6.9021002,3.502167 C 7.0320375,3.2548956 7.2343175,3.0487286 7.4743519,2.9189189 c 0.1797064,-0.097185 0.1877434,-0.098707 0.5209477,-0.098707 0.3169743,0 0.349151,0.00524 0.5076381,0.082665 0.2190605,0.1070166 0.4871239,0.3748528 0.5931342,0.592632 l 0.081613,0.1676584 0.019992,1.3834579 c 0.010995,0.7609018 0.021403,2.0560783 0.023128,2.87817 0.00341,1.6233162 0.028863,2.2876938 0.093598,2.4426258 0.089047,0.213119 0.4255042,0.419889 0.683247,0.419889 0.1563141,0 0.3731941,-0.08265 0.5187231,-0.197689 0.205546,-0.162474 0.225694,-0.250142 0.256177,-1.1146856 C 10.79418,8.8613623 10.8052,8.7492253 10.85668,8.6186115 11.053264,8.1198873 11.50183,7.7978848 12,7.7978848 c 0.49817,0 0.946736,0.3220025 1.143315,0.8207259 0.05148,0.1306138 0.0625,0.2427508 0.08413,0.8563239 0.02897,0.8216044 0.05497,0.9507864 0.218548,1.0859664 0.341252,0.282005 0.756809,0.293493 1.057036,0.02922 0.169206,-0.148941 0.234219,-0.2921 0.288276,-0.6347773 0.103115,-0.6536616 0.472737,-1.0621772 1.030077,-1.1384664 0.547738,-0.074975 0.986339,0.1608863 1.276145,0.6862578 l 0.105758,0.1917223 7.68e-4,0.3699606 c 0.0011,0.553623 0.04553,1.179579 0.09141,1.289176 0.04428,0.105777 0.219161,0.276182 0.364423,0.355092 0.06913,0.03755 0.155512,0.05067 0.333059,0.05055 0.204058,-1.3e-4 0.260695,-0.01118 0.380729,-0.07426 0.239564,-0.12591 0.320531,-0.265583 0.407786,-0.703455 0.08382,-0.420648 0.125337,-0.527172 0.279883,-0.718174 0.321102,-0.3968443 0.77117,-0.5469022 1.259123,-0.4198065 0.21344,0.055594 0.39756,0.1739295 0.578279,0.3716645 0.286251,0.313205 0.299377,0.389392 0.324444,1.883099 0.02888,1.721047 -0.03379,2.808669 -0.20314,3.525265 -0.307591,1.301561 -0.970113,2.493177 -1.91312,3.440943 -1.060413,1.065767 -2.34115,1.742909 -3.849589,2.035329 -0.348478,0.06755 -0.462014,0.07524 -1.340342,0.09078 -0.527787,0.0093 -1.416154,0.0093 -1.974148,-6.4e-5 z" id="path7" /> </svg>',
|
|
61873
|
+
settings: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings-icon lucide-settings"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/></svg>',
|
|
61874
|
+
share: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-share2-icon lucide-share-2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"/><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"/></svg>',
|
|
61875
|
+
palette: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-palette-icon lucide-palette"><path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z"/><circle cx="13.5" cy="6.5" r=".5" fill="currentColor"/><circle cx="17.5" cy="10.5" r=".5" fill="currentColor"/><circle cx="6.5" cy="12.5" r=".5" fill="currentColor"/><circle cx="8.5" cy="7.5" r=".5" fill="currentColor"/></svg>',
|
|
61876
|
+
command: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-command-icon lucide-command"><path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"/></svg>',
|
|
61877
|
+
info: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info-icon lucide-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>',
|
|
61878
|
+
ordering: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bring-to-front-icon lucide-bring-to-front"><rect x="8" y="8" width="8" height="8" rx="2"/><path d="M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2"/><path d="M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2"/></svg>',
|
|
61879
|
+
layoutTemplate: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-layout-template-icon lucide-layout-template"><rect width="18" height="7" x="3" y="3" rx="1"/><rect width="9" height="7" x="3" y="14" rx="1"/><rect width="5" height="7" x="16" y="14" rx="1"/></svg>',
|
|
61880
|
+
align: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="21" x2="3" y1="10" y2="10"/><line x1="21" x2="3" y1="6" y2="6"/><line x1="21" x2="3" y1="14" y2="14"/><line x1="21" x2="3" y1="18" y2="18"/></svg>',
|
|
61881
|
+
alignStartHorizontal: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-start-horizontal-icon lucide-align-start-horizontal"><rect width="6" height="16" x="4" y="6" rx="2"/><rect width="6" height="9" x="14" y="6" rx="2"/><path d="M22 2H2"/></svg>',
|
|
61882
|
+
alignCenterHorizontal: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-center-horizontal-icon lucide-align-center-horizontal"><path d="M2 12h20"/><path d="M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4"/><path d="M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4"/><path d="M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1"/><path d="M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1"/></svg>',
|
|
61883
|
+
alignEndHorizontal: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-end-horizontal-icon lucide-align-end-horizontal"><rect width="6" height="16" x="4" y="2" rx="2"/><rect width="6" height="9" x="14" y="9" rx="2"/><path d="M22 22H2"/></svg>',
|
|
61884
|
+
alignStartVertical: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-start-vertical-icon lucide-align-start-vertical"><rect width="9" height="6" x="6" y="14" rx="2"/><rect width="16" height="6" x="6" y="4" rx="2"/><path d="M2 2v20"/></svg>',
|
|
61885
|
+
alignCenterVertical: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-center-vertical-icon lucide-align-center-vertical"><path d="M12 2v20"/><path d="M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4"/><path d="M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4"/><path d="M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1"/><path d="M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1"/></svg>',
|
|
61886
|
+
alignEndVertical: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-align-end-vertical-icon lucide-align-end-vertical"><rect width="16" height="6" x="2" y="4" rx="2"/><rect width="9" height="6" x="9" y="14" rx="2"/><path d="M22 22V2"/></svg>',
|
|
61887
|
+
viewport: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize-icon lucide-maximize"><path d="M8 3H5a2 2 0 0 0-2 2v3"/><path d="M21 8V5a2 2 0 0 0-2-2h-3"/><path d="M3 16v3a2 2 0 0 0 2 2h3"/><path d="M16 21h3a2 2 0 0 0 2-2v-3"/></svg>',
|
|
61888
|
+
logOut: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-log-out-icon lucide-log-out"><path d="m16 17 5-5-5-5"/><path d="M21 12H9"/><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/></svg>',
|
|
61889
|
+
usersRound: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users-round-icon lucide-users-round"><path d="M18 21a8 8 0 0 0-16 0"/><circle cx="10" cy="8" r="5"/><path d="M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3"/></svg>',
|
|
61890
|
+
google: '<svg version="1.1" viewBox="0 0 48 48" style="display: block;"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path><path fill="none" d="M0 0h48v48H0z"></path></svg>',
|
|
61891
|
+
facebook: '<svg version="1.1" id="svg9" width="666.66669" height="666.66718" viewBox="0 0 666.66668 666.66717"> <defs id="defs13"> <clipPath clipPathUnits="userSpaceOnUse" id="clipPath25"> <path d="M 0,700 H 700 V 0 H 0 Z" id="path23" /> </clipPath> </defs> <g id="g17" transform="matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)"> <g id="g19"> <g id="g21" clip-path="url(#clipPath25)"> <g id="g27" transform="translate(600,350)"> <path d="m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0" style="fill:#0866ff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path29" /> </g> <g id="g31" transform="translate(447.9175,273.6036)"> <path d="M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path33" /> </g> </g> </g> </g></svg>',
|
|
61892
|
+
github: '<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" transform="scale(64)" fill="#1B1F23"/></svg>',
|
|
61893
|
+
braces: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-braces-icon lucide-braces"><path d="M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"/><path d="M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"/></svg>',
|
|
61894
|
+
heart: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heart-icon lucide-heart"><path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/></svg>'
|
|
61895
|
+
};
|
|
61896
|
+
for (const [name, svg] of Object.entries(defaultIcons)) {
|
|
61897
|
+
if (!KritzelIconRegistry.has(name)) {
|
|
61898
|
+
KritzelIconRegistry.register(name, svg);
|
|
61899
|
+
}
|
|
61900
|
+
}
|
|
61368
61901
|
|
|
61369
61902
|
class KritzelCursorHelper {
|
|
61370
61903
|
static _pointerCursor = null;
|
|
@@ -61383,7 +61916,7 @@ class KritzelCursorHelper {
|
|
|
61383
61916
|
* The icon is retrieved from the KritzelIconRegistry.
|
|
61384
61917
|
*/
|
|
61385
61918
|
static getCursor(options) {
|
|
61386
|
-
const iconName = options.iconName === 'default' ? '
|
|
61919
|
+
const iconName = options.iconName === 'default' ? 'mousePointer' : options.iconName;
|
|
61387
61920
|
const iconSvg = KritzelIconRegistry.get(iconName);
|
|
61388
61921
|
if (!iconSvg) {
|
|
61389
61922
|
console.warn(`Icon "${iconName}" not found in registry.`);
|
|
@@ -61392,7 +61925,7 @@ class KritzelCursorHelper {
|
|
|
61392
61925
|
const size = options.size || 24;
|
|
61393
61926
|
const rotation = options.rotation || 0;
|
|
61394
61927
|
const color = options.color || 'black';
|
|
61395
|
-
// Default cursor (
|
|
61928
|
+
// Default cursor (mousePointer) has hotspot at (4, 4), others at center
|
|
61396
61929
|
const hotspot = options.hotspot || (options.iconName === 'default' ? { x: 4, y: 4 } : { x: size / 2, y: size / 2 });
|
|
61397
61930
|
// Modify the SVG string to set size and color
|
|
61398
61931
|
// We replace width and height to match the requested size
|
|
@@ -61405,12 +61938,12 @@ class KritzelCursorHelper {
|
|
|
61405
61938
|
// We rotate around the center of the SVG canvas
|
|
61406
61939
|
const center = size / 2;
|
|
61407
61940
|
// We use a group to apply the rotation
|
|
61408
|
-
const svg = `
|
|
61409
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
61410
|
-
<g transform="rotate(${rotation} ${center} ${center})">
|
|
61411
|
-
${content}
|
|
61412
|
-
</g>
|
|
61413
|
-
</svg>
|
|
61941
|
+
const svg = `
|
|
61942
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
61943
|
+
<g transform="rotate(${rotation} ${center} ${center})">
|
|
61944
|
+
${content}
|
|
61945
|
+
</g>
|
|
61946
|
+
</svg>
|
|
61414
61947
|
`;
|
|
61415
61948
|
// Encode the SVG for use in a data URI
|
|
61416
61949
|
// We need to be careful with encoding to ensure it works across browsers
|
|
@@ -61448,11 +61981,13 @@ class KritzelCursorManager {
|
|
|
61448
61981
|
// Reset cursor on old target
|
|
61449
61982
|
if (this._targetElement) {
|
|
61450
61983
|
this._targetElement.style.cursor = '';
|
|
61984
|
+
this._targetElement.style.removeProperty('--kritzel-global-default-cursor');
|
|
61451
61985
|
this._targetElement.style.removeProperty('--kritzel-global-pointer-cursor');
|
|
61452
61986
|
}
|
|
61453
61987
|
this._targetElement = element;
|
|
61454
61988
|
// Set the pointer cursor CSS variable for child components to use
|
|
61455
61989
|
if (this._targetElement) {
|
|
61990
|
+
this._targetElement.style.setProperty('--kritzel-global-default-cursor', KritzelCursorHelper.getCursor({ iconName: 'default' }));
|
|
61456
61991
|
this._targetElement.style.setProperty('--kritzel-global-pointer-cursor', KritzelCursorHelper.getPointerCursor());
|
|
61457
61992
|
}
|
|
61458
61993
|
}
|
|
@@ -61497,8 +62032,10 @@ class KritzelCursorManager {
|
|
|
61497
62032
|
if (!this._shadowRoot)
|
|
61498
62033
|
return;
|
|
61499
62034
|
const elementsAtPoint = this._shadowRoot.elementsFromPoint(ev.clientX, ev.clientY);
|
|
61500
|
-
if (!elementsAtPoint || elementsAtPoint.length === 0)
|
|
62035
|
+
if (!elementsAtPoint || elementsAtPoint.length === 0) {
|
|
62036
|
+
this.resetToDefault();
|
|
61501
62037
|
return;
|
|
62038
|
+
}
|
|
61502
62039
|
// Check for resize handle overlays (selection group)
|
|
61503
62040
|
const resizeHandleOverlay = elementsAtPoint.find(el => el.classList.contains('resize-handle-overlay'));
|
|
61504
62041
|
if (resizeHandleOverlay) {
|
|
@@ -61508,19 +62045,19 @@ class KritzelCursorManager {
|
|
|
61508
62045
|
const isTopLeft = resizeHandleOverlay.classList.contains('top-left');
|
|
61509
62046
|
const isBottomRight = resizeHandleOverlay.classList.contains('bottom-right');
|
|
61510
62047
|
const rotationOffset = (isTopLeft || isBottomRight) ? -45 : 45;
|
|
61511
|
-
this._core.store.state.cursor = { icon: '
|
|
62048
|
+
this._core.store.state.cursor = { icon: 'moveVertical', rotation: rotationDegrees + rotationOffset };
|
|
61512
62049
|
return;
|
|
61513
62050
|
}
|
|
61514
62051
|
// Check for rotation handle overlay
|
|
61515
62052
|
const rotationHandleOverlay = elementsAtPoint.find(el => el.classList.contains('rotation-handle-overlay'));
|
|
61516
62053
|
if (rotationHandleOverlay) {
|
|
61517
|
-
this._core.store.state.cursor = { icon: 'hand', iconActive: '
|
|
62054
|
+
this._core.store.state.cursor = { icon: 'hand', iconActive: 'handGrab' };
|
|
61518
62055
|
return;
|
|
61519
62056
|
}
|
|
61520
62057
|
// Check for line handle overlays (selection line)
|
|
61521
62058
|
const lineHandleOverlay = elementsAtPoint.find(el => el.classList.contains('selection-line-handle-overlay'));
|
|
61522
62059
|
if (lineHandleOverlay) {
|
|
61523
|
-
this._core.store.state.cursor = { icon: 'hand', iconActive: '
|
|
62060
|
+
this._core.store.state.cursor = { icon: 'hand', iconActive: 'handGrab' };
|
|
61524
62061
|
return;
|
|
61525
62062
|
}
|
|
61526
62063
|
// Reset cursor if not hovering any handle
|
|
@@ -61555,7 +62092,8 @@ class KritzelCursorManager {
|
|
|
61555
62092
|
cleanup() {
|
|
61556
62093
|
if (this._targetElement) {
|
|
61557
62094
|
this._targetElement.style.cursor = '';
|
|
61558
|
-
this._targetElement.style.removeProperty('--kritzel-
|
|
62095
|
+
this._targetElement.style.removeProperty('--kritzel-global-default-cursor');
|
|
62096
|
+
this._targetElement.style.removeProperty('--kritzel-global-pointer-cursor');
|
|
61559
62097
|
}
|
|
61560
62098
|
this._targetElement = null;
|
|
61561
62099
|
this._shadowRoot = null;
|
|
@@ -63458,7 +63996,7 @@ class KritzelCore {
|
|
|
63458
63996
|
this._store.state.translateY = viewportHeight / 2 - (viewport.centerWorldY ?? 0) * scale;
|
|
63459
63997
|
this._store.state.scale = scale;
|
|
63460
63998
|
await objectsMap.initialize(this, activeWorkspace.id, this._syncConfig);
|
|
63461
|
-
this.seedWorkspaceObjects(activeWorkspace, objectsMap);
|
|
63999
|
+
await this.seedWorkspaceObjects(activeWorkspace, objectsMap);
|
|
63462
64000
|
// Set local user in awareness after object map is initialized
|
|
63463
64001
|
if (this._user) {
|
|
63464
64002
|
objectsMap.setLocalUser(this._user);
|
|
@@ -63472,15 +64010,21 @@ class KritzelCore {
|
|
|
63472
64010
|
this.engine.emitObjectsChange();
|
|
63473
64011
|
this.rerender();
|
|
63474
64012
|
}
|
|
63475
|
-
seedWorkspaceObjects(workspace, objectsMap) {
|
|
64013
|
+
async seedWorkspaceObjects(workspace, objectsMap) {
|
|
63476
64014
|
if (!workspace.objects?.length) {
|
|
63477
64015
|
return;
|
|
63478
64016
|
}
|
|
64017
|
+
const pendingObjects = workspace.objects.filter(object => !objectsMap.findById(object.id));
|
|
64018
|
+
// Mirrors engine.addObject()/addObjects(): image asset upload is async and must
|
|
64019
|
+
// happen before the (synchronous) Yjs transaction that inserts the objects.
|
|
64020
|
+
for (const object of pendingObjects) {
|
|
64021
|
+
object._core = this;
|
|
64022
|
+
if (KritzelClassHelper.isInstanceOf(object, 'KritzelImage')) {
|
|
64023
|
+
await object.prepareForInsert();
|
|
64024
|
+
}
|
|
64025
|
+
}
|
|
63479
64026
|
objectsMap.transaction(() => {
|
|
63480
|
-
for (const object of
|
|
63481
|
-
if (objectsMap.findById(object.id)) {
|
|
63482
|
-
continue;
|
|
63483
|
-
}
|
|
64027
|
+
for (const object of pendingObjects) {
|
|
63484
64028
|
this.prepareObjectForWorkspace(object, workspace.id, this._store.currentZIndex, this._store.state.scale);
|
|
63485
64029
|
objectsMap.insert(object);
|
|
63486
64030
|
}
|
|
@@ -63519,16 +64063,30 @@ class KritzelCore {
|
|
|
63519
64063
|
* @param scaleFallback - Scale applied to objects that do not define one
|
|
63520
64064
|
* @returns The objects that were added, updated and removed
|
|
63521
64065
|
*/
|
|
63522
|
-
reconcileWorkspaceObjects(objectsMap, workspaceId, desiredObjects, nextZIndex, scaleFallback) {
|
|
64066
|
+
async reconcileWorkspaceObjects(objectsMap, workspaceId, desiredObjects, nextZIndex, scaleFallback) {
|
|
63523
64067
|
const existingObjects = objectsMap.allObjects().filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox));
|
|
63524
64068
|
const existingById = new Map(existingObjects.map(object => [object.id, object]));
|
|
63525
64069
|
const desiredIds = new Set();
|
|
63526
64070
|
const diff = { added: [], updated: [], removed: [] };
|
|
64071
|
+
// Assign IDs up front so the insert-vs-update lookup below is stable, and so the
|
|
64072
|
+
// async image-prepare pass and the (synchronous) transaction agree on identity.
|
|
64073
|
+
for (const object of desiredObjects) {
|
|
64074
|
+
if (!object.id) {
|
|
64075
|
+
object.id = object.generateId();
|
|
64076
|
+
}
|
|
64077
|
+
}
|
|
64078
|
+
// Mirrors engine.addObject()/addObjects(): image asset upload is async and must
|
|
64079
|
+
// happen before the (synchronous) Yjs transaction that inserts the objects.
|
|
64080
|
+
for (const object of desiredObjects) {
|
|
64081
|
+
const existingObject = existingById.get(object.id);
|
|
64082
|
+
const isNewOrReplaced = !existingObject || existingObject !== object;
|
|
64083
|
+
if (isNewOrReplaced && KritzelClassHelper.isInstanceOf(object, 'KritzelImage')) {
|
|
64084
|
+
object._core = this;
|
|
64085
|
+
await object.prepareForInsert();
|
|
64086
|
+
}
|
|
64087
|
+
}
|
|
63527
64088
|
objectsMap.transaction(() => {
|
|
63528
64089
|
for (const object of desiredObjects) {
|
|
63529
|
-
if (!object.id) {
|
|
63530
|
-
object.id = object.generateId();
|
|
63531
|
-
}
|
|
63532
64090
|
desiredIds.add(object.id);
|
|
63533
64091
|
const existingObject = existingById.get(object.id);
|
|
63534
64092
|
if (!existingObject) {
|
|
@@ -63566,7 +64124,7 @@ class KritzelCore {
|
|
|
63566
64124
|
* object set stays exactly what the caller declared.
|
|
63567
64125
|
*/
|
|
63568
64126
|
detachObject(object) {
|
|
63569
|
-
if (
|
|
64127
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
63570
64128
|
object.unmount();
|
|
63571
64129
|
}
|
|
63572
64130
|
object.isMounted = false;
|
|
@@ -63742,13 +64300,13 @@ class KritzelCore {
|
|
|
63742
64300
|
activeWorkspace.viewport = { centerWorldX, centerWorldY, scale };
|
|
63743
64301
|
}
|
|
63744
64302
|
}
|
|
63745
|
-
applyObjectsToActiveWorkspace(workspace, desiredObjects) {
|
|
64303
|
+
async applyObjectsToActiveWorkspace(workspace, desiredObjects) {
|
|
63746
64304
|
const objectsMap = this._store.objects;
|
|
63747
64305
|
if (!objectsMap) {
|
|
63748
64306
|
return null;
|
|
63749
64307
|
}
|
|
63750
64308
|
this.clearSelection();
|
|
63751
|
-
const diff = this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this._store.currentZIndex, this._store.state.scale);
|
|
64309
|
+
const diff = await this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this._store.currentZIndex, this._store.state.scale);
|
|
63752
64310
|
this._anchorManager.rebuildIndex();
|
|
63753
64311
|
this.rerender();
|
|
63754
64312
|
return diff;
|
|
@@ -63767,7 +64325,7 @@ class KritzelCore {
|
|
|
63767
64325
|
try {
|
|
63768
64326
|
await objectsMap.initialize(this, workspace.id, this._syncConfig, { headless: true, workspaceName: workspace.name });
|
|
63769
64327
|
await objectsMap.whenNetworkSynced();
|
|
63770
|
-
return this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this.nextZIndexOf(objectsMap), this._store.state.scale);
|
|
64328
|
+
return await this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this.nextZIndexOf(objectsMap), this._store.state.scale);
|
|
63771
64329
|
}
|
|
63772
64330
|
finally {
|
|
63773
64331
|
objectsMap.destroy();
|
|
@@ -63853,8 +64411,7 @@ class KritzelCore {
|
|
|
63853
64411
|
this.removeObject(child);
|
|
63854
64412
|
});
|
|
63855
64413
|
}
|
|
63856
|
-
|
|
63857
|
-
if (KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject')) {
|
|
64414
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
63858
64415
|
object.unmount();
|
|
63859
64416
|
}
|
|
63860
64417
|
// Handle anchor cleanup
|
|
@@ -63900,14 +64457,8 @@ class KritzelCore {
|
|
|
63900
64457
|
this.removeLocalSelectionGroups();
|
|
63901
64458
|
this.removeSelectionBox();
|
|
63902
64459
|
for (const object of selectionGroup.objects ?? []) {
|
|
63903
|
-
if (
|
|
63904
|
-
|
|
63905
|
-
if (typeof dynamicObject.setIsInteractive === 'function') {
|
|
63906
|
-
dynamicObject.setIsInteractive(true);
|
|
63907
|
-
}
|
|
63908
|
-
else {
|
|
63909
|
-
dynamicObject.isInteractive = true;
|
|
63910
|
-
}
|
|
64460
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
64461
|
+
object.setIsInteractive(true);
|
|
63911
64462
|
}
|
|
63912
64463
|
}
|
|
63913
64464
|
this._store.objects.insert(selectionGroup);
|
|
@@ -63928,14 +64479,8 @@ class KritzelCore {
|
|
|
63928
64479
|
teardownSelectionGroup(selectionGroup) {
|
|
63929
64480
|
selectionGroup.deselectAllChildren?.();
|
|
63930
64481
|
for (const object of selectionGroup.objects ?? []) {
|
|
63931
|
-
if (
|
|
63932
|
-
|
|
63933
|
-
if (typeof dynamicObject.setIsInteractive === 'function') {
|
|
63934
|
-
dynamicObject.setIsInteractive(false);
|
|
63935
|
-
}
|
|
63936
|
-
else {
|
|
63937
|
-
dynamicObject.isInteractive = false;
|
|
63938
|
-
}
|
|
64482
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
64483
|
+
object.setIsInteractive(false);
|
|
63939
64484
|
}
|
|
63940
64485
|
}
|
|
63941
64486
|
}
|
|
@@ -65381,13 +65926,7 @@ class KritzelWheelHelper {
|
|
|
65381
65926
|
return this.canElementConsumeWheel(scrollContainer, ev.deltaX, ev.deltaY);
|
|
65382
65927
|
}
|
|
65383
65928
|
static getScrollableContainerFromEventPath(path, dynamicObject) {
|
|
65384
|
-
const potentialRoots =
|
|
65385
|
-
if (dynamicObject.element instanceof HTMLElement) {
|
|
65386
|
-
potentialRoots.push(dynamicObject.element);
|
|
65387
|
-
}
|
|
65388
|
-
if (dynamicObject.elementRef instanceof HTMLElement) {
|
|
65389
|
-
potentialRoots.push(dynamicObject.elementRef);
|
|
65390
|
-
}
|
|
65929
|
+
const potentialRoots = dynamicObject.getEmbeddedContentRoots();
|
|
65391
65930
|
const legacyElementRef = dynamicObject.elmeentRef;
|
|
65392
65931
|
if (legacyElementRef instanceof HTMLElement) {
|
|
65393
65932
|
potentialRoots.push(legacyElementRef);
|
|
@@ -65564,8 +66103,8 @@ class KritzelSvgExportHelper {
|
|
|
65564
66103
|
.join('\n ');
|
|
65565
66104
|
const xmlDecl = includeXmlDeclaration ? '<?xml version="1.0" encoding="UTF-8"?>\n' : '';
|
|
65566
66105
|
const defsContent = defs.length > 0 ? `\n <defs>\n ${defs.join('\n ')}\n </defs>` : '';
|
|
65567
|
-
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
65568
|
-
${elements}
|
|
66106
|
+
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
66107
|
+
${elements}
|
|
65569
66108
|
</svg>`;
|
|
65570
66109
|
}
|
|
65571
66110
|
/**
|
|
@@ -65717,8 +66256,8 @@ class KritzelSvgExportHelper {
|
|
|
65717
66256
|
const orient = end === 'start' ? 'auto-start-reverse' : 'auto';
|
|
65718
66257
|
const refX = 0;
|
|
65719
66258
|
const refY = size / 2;
|
|
65720
|
-
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
65721
|
-
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
66259
|
+
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
66260
|
+
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
65722
66261
|
</marker>`;
|
|
65723
66262
|
}
|
|
65724
66263
|
/**
|
|
@@ -65747,6 +66286,9 @@ class KritzelSvgExportHelper {
|
|
|
65747
66286
|
if (KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject')) {
|
|
65748
66287
|
return this.dynamicObjectToSvg(object, rasterSafeForCanvas);
|
|
65749
66288
|
}
|
|
66289
|
+
if (KritzelClassHelper.isInstanceOf(object, 'KritzelIframeObject')) {
|
|
66290
|
+
return this.iframeObjectToSvg(object);
|
|
66291
|
+
}
|
|
65750
66292
|
if (KritzelClassHelper.isInstanceOf(object, 'KritzelGroup')) {
|
|
65751
66293
|
return this.groupToSvg(object, theme, imageDataUrls, rasterSafeForCanvas);
|
|
65752
66294
|
}
|
|
@@ -65765,10 +66307,10 @@ class KritzelSvgExportHelper {
|
|
|
65765
66307
|
const opacity = path.opacity !== 1 ? ` opacity="${path.opacity}"` : '';
|
|
65766
66308
|
const scale = this.getObjectScale(path);
|
|
65767
66309
|
// Path needs to be wrapped in a g with translation since path.d uses local coordinates
|
|
65768
|
-
return `<g transform="${transform}"${opacity}>
|
|
65769
|
-
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
65770
|
-
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
65771
|
-
</svg>
|
|
66310
|
+
return `<g transform="${transform}"${opacity}>
|
|
66311
|
+
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
66312
|
+
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
66313
|
+
</svg>
|
|
65772
66314
|
</g>`;
|
|
65773
66315
|
}
|
|
65774
66316
|
/**
|
|
@@ -65784,10 +66326,10 @@ class KritzelSvgExportHelper {
|
|
|
65784
66326
|
const scale = this.getObjectScale(line);
|
|
65785
66327
|
const markerStart = line.hasStartArrow ? ` marker-start="url(#${line.startMarkerId})"` : '';
|
|
65786
66328
|
const markerEnd = line.hasEndArrow ? ` marker-end="url(#${line.endMarkerId})"` : '';
|
|
65787
|
-
return `<g transform="${transform}"${opacity}>
|
|
65788
|
-
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
65789
|
-
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
65790
|
-
</svg>
|
|
66329
|
+
return `<g transform="${transform}"${opacity}>
|
|
66330
|
+
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
66331
|
+
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
66332
|
+
</svg>
|
|
65791
66333
|
</g>`;
|
|
65792
66334
|
}
|
|
65793
66335
|
/**
|
|
@@ -65811,18 +66353,18 @@ class KritzelSvgExportHelper {
|
|
|
65811
66353
|
const textHtml = this.prosemirrorToHtml(shape.content, shape, theme);
|
|
65812
66354
|
if (textHtml) {
|
|
65813
66355
|
const fontColor = KritzelColorHelper.resolveThemeColor(shape.fontColor, theme);
|
|
65814
|
-
textContent = `
|
|
65815
|
-
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
65816
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-family: ${shape.fontFamily}; font-size: ${shape.fontSize}px; color: ${fontColor}; overflow: hidden;">
|
|
65817
|
-
${textHtml}
|
|
65818
|
-
</div>
|
|
66356
|
+
textContent = `
|
|
66357
|
+
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
66358
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-family: ${shape.fontFamily}; font-size: ${shape.fontSize}px; color: ${fontColor}; overflow: hidden;">
|
|
66359
|
+
${textHtml}
|
|
66360
|
+
</div>
|
|
65819
66361
|
</foreignObject>`;
|
|
65820
66362
|
}
|
|
65821
66363
|
}
|
|
65822
|
-
return `<g transform="${transform}"${opacity}>
|
|
65823
|
-
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
65824
|
-
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
65825
|
-
</svg>
|
|
66364
|
+
return `<g transform="${transform}"${opacity}>
|
|
66365
|
+
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
66366
|
+
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
66367
|
+
</svg>
|
|
65826
66368
|
</g>`;
|
|
65827
66369
|
}
|
|
65828
66370
|
/**
|
|
@@ -65853,10 +66395,10 @@ class KritzelSvgExportHelper {
|
|
|
65853
66395
|
// adjusted font-size already accounts for it – keeping both would double-scale
|
|
65854
66396
|
// the content and overflow the foreignObject.
|
|
65855
66397
|
const svgFontSizePx = (text.fontSize * (4 / 3) * (text.scaleFactor || 1) / scale).toFixed(4);
|
|
65856
|
-
return `<g transform="${transform}"${opacity}>
|
|
65857
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
65858
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: ${text.fontFamily}; font-size: ${svgFontSizePx}px; color: ${fontColor}; background-color: ${bgColor || 'transparent'}; white-space: pre-wrap; word-wrap: break-word; width: 100%; margin: 0; padding: 0; box-sizing: border-box;">${htmlContent.trim()}</div>
|
|
65859
|
-
</foreignObject>
|
|
66398
|
+
return `<g transform="${transform}"${opacity}>
|
|
66399
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
66400
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: ${text.fontFamily}; font-size: ${svgFontSizePx}px; color: ${fontColor}; background-color: ${bgColor || 'transparent'}; white-space: pre-wrap; word-wrap: break-word; width: 100%; margin: 0; padding: 0; box-sizing: border-box;">${htmlContent.trim()}</div>
|
|
66401
|
+
</foreignObject>
|
|
65860
66402
|
</g>`;
|
|
65861
66403
|
}
|
|
65862
66404
|
/**
|
|
@@ -65890,9 +66432,9 @@ class KritzelSvgExportHelper {
|
|
|
65890
66432
|
return `<tspan x="0" y="${y}" xml:space="preserve">${this.escapeHtml(line)}</tspan>`;
|
|
65891
66433
|
})
|
|
65892
66434
|
.join('');
|
|
65893
|
-
return `<g transform="${transform}"${opacity}>
|
|
65894
|
-
${bgRect}
|
|
65895
|
-
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
66435
|
+
return `<g transform="${transform}"${opacity}>
|
|
66436
|
+
${bgRect}
|
|
66437
|
+
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
65896
66438
|
</g>`;
|
|
65897
66439
|
}
|
|
65898
66440
|
/**
|
|
@@ -65920,8 +66462,8 @@ class KritzelSvgExportHelper {
|
|
|
65920
66462
|
const width = image.totalWidth / scale;
|
|
65921
66463
|
const height = image.totalHeight / scale;
|
|
65922
66464
|
const href = imageDataUrls?.get(image.id) || image.resolvedSrc || image.src || '';
|
|
65923
|
-
return `<g transform="${transform}"${opacity}>
|
|
65924
|
-
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
66465
|
+
return `<g transform="${transform}"${opacity}>
|
|
66466
|
+
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
65925
66467
|
</g>`;
|
|
65926
66468
|
}
|
|
65927
66469
|
/**
|
|
@@ -65941,19 +66483,30 @@ class KritzelSvgExportHelper {
|
|
|
65941
66483
|
if (rasterSafeForCanvas) {
|
|
65942
66484
|
// PNG export: render placeholder rect (foreignObject doesn't rasterize to PNG well)
|
|
65943
66485
|
console.warn('[KritzelDynamicObject SVG Export] Dynamic objects do not serialize well to PNG. Use SVG export or screenshot instead.');
|
|
65944
|
-
return `<g transform="${transform}"${opacity}>
|
|
65945
|
-
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
65946
|
-
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Dynamic Object]</text>
|
|
66486
|
+
return `<g transform="${transform}"${opacity}>
|
|
66487
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
66488
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Dynamic Object]</text>
|
|
65947
66489
|
</g>`;
|
|
65948
66490
|
}
|
|
65949
66491
|
// SVG export: use foreignObject to embed HTML
|
|
65950
66492
|
const html = obj.element?.outerHTML || '<div style="border:1px dashed #ccc">Empty</div>';
|
|
65951
|
-
return `<g transform="${transform}"${opacity}>
|
|
65952
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
65953
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
65954
|
-
${html}
|
|
65955
|
-
</div>
|
|
65956
|
-
</foreignObject>
|
|
66493
|
+
return `<g transform="${transform}"${opacity}>
|
|
66494
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
66495
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
66496
|
+
${html}
|
|
66497
|
+
</div>
|
|
66498
|
+
</foreignObject>
|
|
66499
|
+
</g>`;
|
|
66500
|
+
}
|
|
66501
|
+
static iframeObjectToSvg(object) {
|
|
66502
|
+
const transform = this.buildTransform(object);
|
|
66503
|
+
const opacity = object.opacity !== 1 ? ` opacity="${object.opacity}"` : '';
|
|
66504
|
+
const scale = this.getObjectScale(object);
|
|
66505
|
+
const width = object.totalWidth / scale;
|
|
66506
|
+
const height = object.totalHeight / scale;
|
|
66507
|
+
return `<g transform="${transform}"${opacity}>
|
|
66508
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
66509
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Iframe]</text>
|
|
65957
66510
|
</g>`;
|
|
65958
66511
|
}
|
|
65959
66512
|
/**
|
|
@@ -65973,8 +66526,8 @@ class KritzelSvgExportHelper {
|
|
|
65973
66526
|
return '';
|
|
65974
66527
|
}
|
|
65975
66528
|
const opacity = group.opacity !== 1 ? ` opacity="${group.opacity}"` : '';
|
|
65976
|
-
return `<g${opacity}>
|
|
65977
|
-
${children}
|
|
66529
|
+
return `<g${opacity}>
|
|
66530
|
+
${children}
|
|
65978
66531
|
</g>`;
|
|
65979
66532
|
}
|
|
65980
66533
|
/**
|
|
@@ -66159,12 +66712,26 @@ const KritzelEngine = class {
|
|
|
66159
66712
|
/** Authoritative workspace catalog for this engine instance. When provided, provider-only workspaces are hidden but not deleted. */
|
|
66160
66713
|
workspaces;
|
|
66161
66714
|
async onWorkspacesPropChange() {
|
|
66162
|
-
|
|
66715
|
+
this._workspacesRevision++;
|
|
66716
|
+
if (!this._isYjsInitialized || this._syncInitPromise) {
|
|
66163
66717
|
return;
|
|
66164
66718
|
}
|
|
66165
|
-
|
|
66166
|
-
|
|
66167
|
-
|
|
66719
|
+
const previousReconciliation = this._workspacePropReconciliationPromise;
|
|
66720
|
+
const reconciliationPromise = (async () => {
|
|
66721
|
+
await previousReconciliation;
|
|
66722
|
+
await this.reconcileProvidedWorkspaces();
|
|
66723
|
+
await this.ensureActiveWorkspaceIsVisible();
|
|
66724
|
+
this.workspacesChange.emit(this.getVisibleWorkspaces());
|
|
66725
|
+
})();
|
|
66726
|
+
this._workspacePropReconciliationPromise = reconciliationPromise;
|
|
66727
|
+
try {
|
|
66728
|
+
await reconciliationPromise;
|
|
66729
|
+
}
|
|
66730
|
+
finally {
|
|
66731
|
+
if (this._workspacePropReconciliationPromise === reconciliationPromise) {
|
|
66732
|
+
this._workspacePropReconciliationPromise = null;
|
|
66733
|
+
}
|
|
66734
|
+
}
|
|
66168
66735
|
}
|
|
66169
66736
|
/** Optional unique identifier for namespacing storage keys across multiple editor instances. */
|
|
66170
66737
|
editorId;
|
|
@@ -66218,6 +66785,12 @@ const KritzelEngine = class {
|
|
|
66218
66785
|
onUserChange(newValue) {
|
|
66219
66786
|
this.core.setUser(newValue);
|
|
66220
66787
|
}
|
|
66788
|
+
/** Tool definitions to register with this engine instance. */
|
|
66789
|
+
tools = [];
|
|
66790
|
+
onToolsChange() {
|
|
66791
|
+
this._toolsRevision++;
|
|
66792
|
+
void this.registerConfiguredTools();
|
|
66793
|
+
}
|
|
66221
66794
|
/** Context menu items shown when right-clicking the canvas background. */
|
|
66222
66795
|
globalContextMenuItems;
|
|
66223
66796
|
onGlobalContextMenuItemsChange(newValue) {
|
|
@@ -66408,7 +66981,7 @@ const KritzelEngine = class {
|
|
|
66408
66981
|
}
|
|
66409
66982
|
const hoveredObject = this.core.getObjectFromPointerEvent(ev);
|
|
66410
66983
|
if (hoveredObject &&
|
|
66411
|
-
ObjectHelper.
|
|
66984
|
+
ObjectHelper.isKritzelEmbeddedObject(hoveredObject) &&
|
|
66412
66985
|
KritzelWheelHelper.shouldKeepWheelInDynamicObject(ev, hoveredObject)) {
|
|
66413
66986
|
return;
|
|
66414
66987
|
}
|
|
@@ -66510,7 +67083,7 @@ const KritzelEngine = class {
|
|
|
66510
67083
|
return false;
|
|
66511
67084
|
}
|
|
66512
67085
|
const object = this.core.store.objects.findById(objectElement.id);
|
|
66513
|
-
if (!object || !
|
|
67086
|
+
if (!object || !ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
66514
67087
|
return false;
|
|
66515
67088
|
}
|
|
66516
67089
|
const isSelected = !!this.core.store.selectionGroup?.objects?.some(selectedObject => selectedObject.id === object.id);
|
|
@@ -66520,13 +67093,7 @@ const KritzelEngine = class {
|
|
|
66520
67093
|
if (object.isInteractive !== true) {
|
|
66521
67094
|
return false;
|
|
66522
67095
|
}
|
|
66523
|
-
const potentialRoots =
|
|
66524
|
-
if (object.element instanceof HTMLElement) {
|
|
66525
|
-
potentialRoots.push(object.element);
|
|
66526
|
-
}
|
|
66527
|
-
if (object.elementRef instanceof HTMLElement) {
|
|
66528
|
-
potentialRoots.push(object.elementRef);
|
|
66529
|
-
}
|
|
67096
|
+
const potentialRoots = object.getEmbeddedContentRoots();
|
|
66530
67097
|
if (potentialRoots.length === 0) {
|
|
66531
67098
|
return false;
|
|
66532
67099
|
}
|
|
@@ -66700,7 +67267,7 @@ const KritzelEngine = class {
|
|
|
66700
67267
|
* Switches the active drawing tool by its registered name.
|
|
66701
67268
|
* @param toolName - The name the tool was registered with (e.g., 'brush', 'eraser').
|
|
66702
67269
|
*/
|
|
66703
|
-
async
|
|
67270
|
+
async setActiveTool(toolName) {
|
|
66704
67271
|
const tool = this.core.toolRegistry.getTool(toolName);
|
|
66705
67272
|
if (!tool) {
|
|
66706
67273
|
console.warn(`[KritzelEngine] No tool registered with name: ${toolName}`);
|
|
@@ -68006,9 +68573,13 @@ const KritzelEngine = class {
|
|
|
68006
68573
|
_stateChangeListenersRegistered = false;
|
|
68007
68574
|
_workspaceInitializationPromise = null;
|
|
68008
68575
|
_workspaceInitializationTargetKey = null;
|
|
68576
|
+
_workspacePropReconciliationPromise = null;
|
|
68009
68577
|
_syncInitPromise = null;
|
|
68578
|
+
_toolsInitPromise = null;
|
|
68579
|
+
_toolsRevision = 0;
|
|
68010
68580
|
_syncConfigRevision = 0;
|
|
68011
68581
|
_assetStorageConfigRevision = 0;
|
|
68582
|
+
_workspacesRevision = 0;
|
|
68012
68583
|
_hasLoggedUnlicensedWelcomeBanner = false;
|
|
68013
68584
|
_previousVisibleDynamicObjects = new Set();
|
|
68014
68585
|
_revealedImageKeys = new Set();
|
|
@@ -68021,6 +68592,37 @@ const KritzelEngine = class {
|
|
|
68021
68592
|
undoStackSize: 0,
|
|
68022
68593
|
redoStackSize: 0,
|
|
68023
68594
|
};
|
|
68595
|
+
/** Returns a tool registered in this engine instance. */
|
|
68596
|
+
async getTool(toolName) {
|
|
68597
|
+
await this.registerConfiguredTools();
|
|
68598
|
+
return this.core.toolRegistry.getTool(toolName);
|
|
68599
|
+
}
|
|
68600
|
+
async registerConfiguredTools() {
|
|
68601
|
+
if (this._toolsInitPromise) {
|
|
68602
|
+
return this._toolsInitPromise;
|
|
68603
|
+
}
|
|
68604
|
+
this._toolsInitPromise = (async () => {
|
|
68605
|
+
do {
|
|
68606
|
+
const revision = this._toolsRevision;
|
|
68607
|
+
for (const definition of this.tools) {
|
|
68608
|
+
let toolClass = definition.tool;
|
|
68609
|
+
if (typeof toolClass !== 'function') {
|
|
68610
|
+
toolClass = toolClass.constructor;
|
|
68611
|
+
}
|
|
68612
|
+
await this.registerTool(definition.name, toolClass, definition.config);
|
|
68613
|
+
}
|
|
68614
|
+
if (revision === this._toolsRevision) {
|
|
68615
|
+
break;
|
|
68616
|
+
}
|
|
68617
|
+
} while (true);
|
|
68618
|
+
})();
|
|
68619
|
+
try {
|
|
68620
|
+
await this._toolsInitPromise;
|
|
68621
|
+
}
|
|
68622
|
+
finally {
|
|
68623
|
+
this._toolsInitPromise = null;
|
|
68624
|
+
}
|
|
68625
|
+
}
|
|
68024
68626
|
setLoadingState(isLoading) {
|
|
68025
68627
|
if (this.core.store.state.isLoading === isLoading) {
|
|
68026
68628
|
return;
|
|
@@ -68148,6 +68750,8 @@ const KritzelEngine = class {
|
|
|
68148
68750
|
this.core.licenseManager.destroy();
|
|
68149
68751
|
}
|
|
68150
68752
|
componentWillLoad() {
|
|
68753
|
+
this._toolsRevision++;
|
|
68754
|
+
void this.registerConfiguredTools();
|
|
68151
68755
|
this.core.setEditorId(this.editorId);
|
|
68152
68756
|
if (this.themes && this.themes.length > 0) {
|
|
68153
68757
|
this.core.themeManager.registerThemes(this.themes);
|
|
@@ -68187,7 +68791,9 @@ const KritzelEngine = class {
|
|
|
68187
68791
|
const editorElement = this.host.closest('kritzel-editor');
|
|
68188
68792
|
this.core.themeManager.setTargetElement(editorElement || this.host);
|
|
68189
68793
|
// Initialize sync config and Yjs
|
|
68794
|
+
await this.registerConfiguredTools();
|
|
68190
68795
|
await this.initializeSyncAndWorkspace();
|
|
68796
|
+
await this.waitForWorkspaceAndSceneReady();
|
|
68191
68797
|
if (this.core.store.state.isReady === false) {
|
|
68192
68798
|
this.core.store.state.isReady = true;
|
|
68193
68799
|
this.logUnlicensedWelcomeBanner();
|
|
@@ -68209,6 +68815,20 @@ const KritzelEngine = class {
|
|
|
68209
68815
|
this._syncInitPromise = null;
|
|
68210
68816
|
}
|
|
68211
68817
|
}
|
|
68818
|
+
async waitForSceneRender() {
|
|
68819
|
+
await new Promise(resolve => {
|
|
68820
|
+
requestAnimationFrame(() => requestAnimationFrame(() => resolve()));
|
|
68821
|
+
});
|
|
68822
|
+
}
|
|
68823
|
+
async waitForWorkspaceAndSceneReady() {
|
|
68824
|
+
let observedRevision;
|
|
68825
|
+
do {
|
|
68826
|
+
observedRevision = this._workspacesRevision;
|
|
68827
|
+
await this._workspacePropReconciliationPromise;
|
|
68828
|
+
await this.waitForSceneRender();
|
|
68829
|
+
} while (observedRevision !== this._workspacesRevision ||
|
|
68830
|
+
this._workspacePropReconciliationPromise);
|
|
68831
|
+
}
|
|
68212
68832
|
/**
|
|
68213
68833
|
* Initializes the asset storage layer with the latest config. Mirrors
|
|
68214
68834
|
* the in-flight replay logic of {@link doInitializeSyncAndWorkspace} for
|
|
@@ -68591,7 +69211,7 @@ const KritzelEngine = class {
|
|
|
68591
69211
|
if (!KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup')) {
|
|
68592
69212
|
return 'auto';
|
|
68593
69213
|
}
|
|
68594
|
-
if (object.objects.length === 1 &&
|
|
69214
|
+
if (object.objects.length === 1 && ObjectHelper.isKritzelEmbeddedObject(object.objects[0])) {
|
|
68595
69215
|
return 'none';
|
|
68596
69216
|
}
|
|
68597
69217
|
return 'auto';
|
|
@@ -68599,7 +69219,7 @@ const KritzelEngine = class {
|
|
|
68599
69219
|
// Track visible dynamic objects and unmount culled ones
|
|
68600
69220
|
const currentVisibleDynamicObjects = new Set();
|
|
68601
69221
|
visibleObjects.forEach(object => {
|
|
68602
|
-
if (
|
|
69222
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
68603
69223
|
currentVisibleDynamicObjects.add(object.id);
|
|
68604
69224
|
}
|
|
68605
69225
|
});
|
|
@@ -68607,7 +69227,7 @@ const KritzelEngine = class {
|
|
|
68607
69227
|
this._previousVisibleDynamicObjects.forEach(id => {
|
|
68608
69228
|
if (!currentVisibleDynamicObjects.has(id)) {
|
|
68609
69229
|
const object = this.core.store.objects.findById(id);
|
|
68610
|
-
if (object &&
|
|
69230
|
+
if (object && ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
68611
69231
|
object.unmount();
|
|
68612
69232
|
}
|
|
68613
69233
|
}
|
|
@@ -68700,7 +69320,7 @@ const KritzelEngine = class {
|
|
|
68700
69320
|
display: 'flex',
|
|
68701
69321
|
alignItems: 'center',
|
|
68702
69322
|
justifyContent: 'center',
|
|
68703
|
-
} }, index.h("kritzel-icon", { name: object.loadState === 'error' ? '
|
|
69323
|
+
} }, index.h("kritzel-icon", { name: object.loadState === 'error' ? 'imageOff' : 'image', size: Math.max(16, Math.min(object.totalWidth, object.totalHeight) * 0.3), style: {
|
|
68704
69324
|
color: KritzelColorHelper.resolveThemeColor({ light: '#9ca3af', dark: '#6b7280' }, currentTheme),
|
|
68705
69325
|
} }))), KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject') && (index.h("div", { ref: el => el && object.mount(el), style: {
|
|
68706
69326
|
position: 'absolute',
|
|
@@ -68719,7 +69339,37 @@ const KritzelEngine = class {
|
|
|
68719
69339
|
padding: object.padding + 'px',
|
|
68720
69340
|
overflow: 'visible',
|
|
68721
69341
|
display: 'block',
|
|
68722
|
-
} })), KritzelClassHelper.isInstanceOf(object, '
|
|
69342
|
+
} })), KritzelClassHelper.isInstanceOf(object, 'KritzelIframeObject') && (index.h("div", { style: {
|
|
69343
|
+
position: 'absolute',
|
|
69344
|
+
left: '0',
|
|
69345
|
+
top: '0',
|
|
69346
|
+
width: object.totalWidth + 'px',
|
|
69347
|
+
height: object.totalHeight + 'px',
|
|
69348
|
+
transform: object.rotationDegrees !== 0 ? `rotate(${object.rotationDegrees}deg)` : undefined,
|
|
69349
|
+
transformOrigin: object.rotationDegrees !== 0 ? `${object.totalWidth / 2}px ${object.totalHeight / 2}px` : undefined,
|
|
69350
|
+
opacity: effectiveOpacityString,
|
|
69351
|
+
backgroundColor: KritzelColorHelper.resolveThemeColor(object.backgroundColor, currentTheme),
|
|
69352
|
+
borderColor: KritzelColorHelper.resolveThemeColor(object.borderColor, currentTheme),
|
|
69353
|
+
borderWidth: object.borderWidth + 'px',
|
|
69354
|
+
borderStyle: 'solid',
|
|
69355
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69356
|
+
boxShadow: object.boxShadow,
|
|
69357
|
+
overflow: 'hidden',
|
|
69358
|
+
display: 'block',
|
|
69359
|
+
pointerEvents: object.markedForRemoval ? 'none' : 'auto',
|
|
69360
|
+
} }, index.h("iframe", { ref: element => element && object.mount(element), title: object.title, sandbox: object.sandboxAttribute, style: {
|
|
69361
|
+
display: 'block',
|
|
69362
|
+
width: '100%',
|
|
69363
|
+
height: '100%',
|
|
69364
|
+
border: '0',
|
|
69365
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69366
|
+
pointerEvents: object.isInteractive ? 'auto' : 'none',
|
|
69367
|
+
} }), index.h("div", { style: {
|
|
69368
|
+
position: 'absolute',
|
|
69369
|
+
inset: '0',
|
|
69370
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69371
|
+
pointerEvents: object.isInteractive ? 'none' : 'auto',
|
|
69372
|
+
} }))), KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup') && !this.core.displaySelectionLineUI(object) && (index.h("div", { ref: el => el && object.mount(el), style: {
|
|
68723
69373
|
position: 'absolute',
|
|
68724
69374
|
left: '0',
|
|
68725
69375
|
top: '0',
|
|
@@ -69077,6 +69727,9 @@ const KritzelEngine = class {
|
|
|
69077
69727
|
"user": [{
|
|
69078
69728
|
"onUserChange": 0
|
|
69079
69729
|
}],
|
|
69730
|
+
"tools": [{
|
|
69731
|
+
"onToolsChange": 0
|
|
69732
|
+
}],
|
|
69080
69733
|
"globalContextMenuItems": [{
|
|
69081
69734
|
"onGlobalContextMenuItemsChange": 0
|
|
69082
69735
|
}],
|
|
@@ -69213,7 +69866,7 @@ const KritzelExport = class {
|
|
|
69213
69866
|
return (index.h("div", { class: "export-tab-content" }, index.h("kritzel-input", { label: this.terms['export.filename.label'] ?? 'Filename', value: this.exportFilename, placeholder: this.terms['export.filename.placeholder'] ?? 'Enter filename', suffix: ".json", onValueChange: this.handleFilenameChange })));
|
|
69214
69867
|
}
|
|
69215
69868
|
render() {
|
|
69216
|
-
return (index.h(index.Host, { key: '
|
|
69869
|
+
return (index.h(index.Host, { key: '94d55a7c75cdad6c8772180656016ef7a84ea937' }, index.h("kritzel-dialog", { key: '7564885a16e21f036e4943f9be923ef3db07ab77', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, index.h("div", { key: '40fceeacffc79d70ecea2c397f19852e85756d50', class: "export-content" }, index.h("kritzel-pill-tabs", { key: 'a2bb5be3df21f940d8e3f7d27fa9fbc956f16a55', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport()), index.h("div", { key: '29a0fcb85755577655401c96643a1956aedfa27d', slot: "footer" }, index.h("button", { key: 'f003963d407005c67740b6620b8983dcf3c8977a', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
|
|
69217
69870
|
}
|
|
69218
69871
|
};
|
|
69219
69872
|
KritzelExport.style = kritzelExportCss();
|
|
@@ -69228,7 +69881,7 @@ const KritzelFont = class {
|
|
|
69228
69881
|
size = 24;
|
|
69229
69882
|
color = '#000000';
|
|
69230
69883
|
render() {
|
|
69231
|
-
return (index.h(index.Host, { key: '
|
|
69884
|
+
return (index.h(index.Host, { key: '7ee5e56528fd93c5b00c930e0404b55aa6ba29f7' }, index.h("div", { key: '54111872192f8f6aa4a523c81fdcbacacde5facf', class: "font-preview", style: {
|
|
69232
69885
|
fontFamily: this.fontFamily,
|
|
69233
69886
|
fontSize: `${this.size}px`,
|
|
69234
69887
|
color: this.color
|
|
@@ -69278,7 +69931,7 @@ const KritzelFontFamily = class {
|
|
|
69278
69931
|
label: option.label,
|
|
69279
69932
|
style: { fontFamily: option.cssFontFamily ?? option.value },
|
|
69280
69933
|
}));
|
|
69281
|
-
return (index.h(index.Host, { key: '
|
|
69934
|
+
return (index.h(index.Host, { key: '059350f34370f7a291f47a42721ca5d9bb82df49' }, index.h("kritzel-dropdown", { key: 'fbd8cf1ae463c7e9b76d0ac754a41de54397058e', options: dropdownOptions, value: this.selectedFontFamily, onValueChanged: this.handleDropdownValueChange, selectStyles: { fontFamily: selectedFontFamily } })));
|
|
69282
69935
|
}
|
|
69283
69936
|
static get watchers() { return {
|
|
69284
69937
|
"fontOptions": [{
|
|
@@ -69312,7 +69965,7 @@ const KritzelFontSize = class {
|
|
|
69312
69965
|
render() {
|
|
69313
69966
|
const color = 'var(--kritzel-global-text-primary)';
|
|
69314
69967
|
const sizes = this.sizes ?? [];
|
|
69315
|
-
return (index.h(index.Host, { key: '
|
|
69968
|
+
return (index.h(index.Host, { key: 'e8309800110db6b59eb1c43ede2e4e94d085f380' }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
69316
69969
|
'size-container': true,
|
|
69317
69970
|
'selected': this.selectedSize === size,
|
|
69318
69971
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, index.h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -69329,6 +69982,20 @@ const KritzelIcon = class {
|
|
|
69329
69982
|
name;
|
|
69330
69983
|
label;
|
|
69331
69984
|
size = 24;
|
|
69985
|
+
unsubscribe;
|
|
69986
|
+
connectedCallback() {
|
|
69987
|
+
this.unsubscribe?.();
|
|
69988
|
+
this.unsubscribe = KritzelIconRegistry.subscribe(name => {
|
|
69989
|
+
if (name === this.name) {
|
|
69990
|
+
index.forceUpdate(this);
|
|
69991
|
+
}
|
|
69992
|
+
});
|
|
69993
|
+
index.forceUpdate(this);
|
|
69994
|
+
}
|
|
69995
|
+
disconnectedCallback() {
|
|
69996
|
+
this.unsubscribe?.();
|
|
69997
|
+
this.unsubscribe = undefined;
|
|
69998
|
+
}
|
|
69332
69999
|
render() {
|
|
69333
70000
|
const svgContent = KritzelIconRegistry.get(this.name);
|
|
69334
70001
|
if (!svgContent) {
|
|
@@ -69379,7 +70046,7 @@ const KritzelInput = class {
|
|
|
69379
70046
|
this.valueChange.emit(input.value);
|
|
69380
70047
|
};
|
|
69381
70048
|
render() {
|
|
69382
|
-
return (index.h(index.Host, { key: '
|
|
70049
|
+
return (index.h(index.Host, { key: '7294192b97df384f321825a8fa30c822f79b6f29' }, index.h("div", { key: 'c355a4ee26adf0ab71d27e1697eddc1f9533d665', class: "input-container" }, this.label && index.h("label", { key: '75ee613cdbd20acc6dbd16642bd4dac9058309aa', class: "input-label" }, this.label), index.h("div", { key: '0395860993deda5cd57d8a185df8b36a52742841', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, index.h("input", { key: 'a12d80b4d51bcd1526b49119fb2b20ad9343d71b', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && index.h("span", { key: 'b682a1764795c2f9039b78e866be09609f7d0d80', class: "input-suffix" }, this.suffix)))));
|
|
69383
70050
|
}
|
|
69384
70051
|
static get watchers() { return {
|
|
69385
70052
|
"value": [{
|
|
@@ -69461,10 +70128,10 @@ const KritzelLineEndings = class {
|
|
|
69461
70128
|
render() {
|
|
69462
70129
|
const startEnding = this.getStartEnding();
|
|
69463
70130
|
const endEnding = this.getEndEnding();
|
|
69464
|
-
return (index.h(index.Host, { key: '
|
|
70131
|
+
return (index.h(index.Host, { key: '257d56ca7c191f2c0a7b4492ed29b029d271304c' }, index.h("div", { key: '294ca5f5006990ffec411eb9a67bf547a92af446', class: "endings-section" }, index.h("div", { key: 'bb3face6f0673d215ad820dfafdb8f5ba61390a9', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
69465
70132
|
'ending-option': true,
|
|
69466
70133
|
'selected': startEnding === type,
|
|
69467
|
-
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: '
|
|
70134
|
+
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: 'dbc47b5b744e5bc3fac0fd099a2afe3a90e4bdc0', class: "endings-section" }, index.h("div", { key: '00a017c7f98a3347ed29b39003ae49b2782bae8f', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
69468
70135
|
'ending-option': true,
|
|
69469
70136
|
'selected': endEnding === type,
|
|
69470
70137
|
}, onClick: () => this.handleEndChange(type), title: type === 'none' ? 'No end arrow' : `${type} end arrow` }, this.renderEndingIcon(type, false))))))));
|
|
@@ -69472,7 +70139,7 @@ const KritzelLineEndings = class {
|
|
|
69472
70139
|
};
|
|
69473
70140
|
KritzelLineEndings.style = kritzelLineEndingsCss();
|
|
69474
70141
|
|
|
69475
|
-
const kritzelLoadingOverlayCss = () => `:host{position:absolute;inset:0;z-index:var(--kritzel-editor-loading-overlay-z-index, 1);display:block;pointer-events:none}.loading-overlay{position:absolute;inset:0;z-index:0;display:flex;align-items:center;justify-content:center;gap:10px;background-color:var(--kritzel-editor-loading-overlay-background, rgba(255, 255, 255, 0.6));color:var(--kritzel-editor-loading-overlay-color, #333);font-family:var(--kritzel-font-family, sans-serif);font-size:1.25rem;opacity:0;pointer-events:none;visibility:hidden;transition:opacity 300ms ease,
|
|
70142
|
+
const kritzelLoadingOverlayCss = () => `:host{position:absolute;inset:0;z-index:var(--kritzel-editor-loading-overlay-z-index, 1);display:block;pointer-events:none}.loading-overlay{position:absolute;inset:0;z-index:0;display:flex;align-items:center;justify-content:center;gap:10px;background-color:var(--kritzel-editor-loading-overlay-background, rgba(255, 255, 255, 0.6));color:var(--kritzel-editor-loading-overlay-color, #333);font-family:var(--kritzel-global-font-family, sans-serif);font-size:1.25rem;opacity:0;pointer-events:none;visibility:hidden;transition:opacity 300ms ease, visibility 0s linear 300ms}.loading-overlay.visible{opacity:1;pointer-events:all;visibility:visible;transition:opacity 300ms ease, visibility 0s linear 0s}.loading-spinner{width:20px;height:20px;box-sizing:border-box;display:block;flex-shrink:0;border:2px solid var(--kritzel-editor-loading-overlay-spinner-color, #cccccc);border-top-color:var(--kritzel-editor-loading-overlay-spinner-active-color, #333333);border-radius:50%;animation:kritzel-loading-spin 0.6s linear infinite}@keyframes kritzel-loading-spin{to{transform:rotate(360deg)}}`;
|
|
69476
70143
|
|
|
69477
70144
|
const KritzelLoadingOverlay = class {
|
|
69478
70145
|
constructor(hostRef) {
|
|
@@ -69487,7 +70154,7 @@ const KritzelLoadingOverlay = class {
|
|
|
69487
70154
|
*/
|
|
69488
70155
|
text = 'Loading...';
|
|
69489
70156
|
render() {
|
|
69490
|
-
return (index.h(index.Host, { key: '
|
|
70157
|
+
return (index.h(index.Host, { key: '1d00fc91ac568b7472121a37abe353dcee3db25c' }, index.h("div", { key: '5a32738aa35b799249694ef3fdd7a59ed7f06fee', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("span", { key: '9cc309802bf617f02d02d7017e8194634393b870', class: "loading-spinner" }), this.text)));
|
|
69491
70158
|
}
|
|
69492
70159
|
};
|
|
69493
70160
|
KritzelLoadingOverlay.style = kritzelLoadingOverlayCss();
|
|
@@ -69539,7 +70206,7 @@ const KritzelLoginDialog = class {
|
|
|
69539
70206
|
this.dialogClosed.emit();
|
|
69540
70207
|
};
|
|
69541
70208
|
render() {
|
|
69542
|
-
return (index.h(index.Host, { key: '
|
|
70209
|
+
return (index.h(index.Host, { key: '68f2b90426d32b12ac1e03dbed2f0c6f5e34eb9e' }, index.h("kritzel-dialog", { key: '2f6b6134ac984237593e587b0480d71fbdc9789e', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: 'd078c5cc1ef8465da47021b6562783a01d50f574', class: "login-content" }, this.subtitle && (index.h("p", { key: 'd42b498c43796703b2f92a5aaae2505113008e0e', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: '1e6484c63e5bf6799ad566d753cc1e2bc4b518ff', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
|
|
69543
70210
|
'provider-button': true,
|
|
69544
70211
|
'is-loading': this.loadingProvider === provider.name,
|
|
69545
70212
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -69645,15 +70312,15 @@ const KritzelMasterDetail = class {
|
|
|
69645
70312
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
69646
70313
|
const panelId = 'master-detail-panel';
|
|
69647
70314
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
69648
|
-
return (index.h(index.Host, { key: '
|
|
70315
|
+
return (index.h(index.Host, { key: 'dfb5a1fcc9e7cdc1dc803a1ebad437fd125f0544' }, index.h("div", { key: '9f7dbadccd893ad5c60f4c51052805729144d09e', class: {
|
|
69649
70316
|
'master-detail-container': true,
|
|
69650
70317
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
69651
|
-
} }, index.h("nav", { key: '
|
|
70318
|
+
} }, index.h("nav", { key: '40e23f5e5c123a80b7bd62fecc0c0121d9f671f2', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index$1) => (index.h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index$1), class: {
|
|
69652
70319
|
'menu-item': true,
|
|
69653
70320
|
'is-selected': item.id === this.selectedItemId,
|
|
69654
70321
|
'is-disabled': !!item.disabled,
|
|
69655
70322
|
'is-focused': index$1 === this.focusedIndex,
|
|
69656
|
-
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index$1), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index$1), onFocus: () => this.handleFocus(index$1), onBlur: this.handleBlur }, item.icon && (index.h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), index.h("span", { class: "menu-item-label" }, item.label), index.h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "m9 18 6-6-6-6" }))))))), index.h("div", { key: '
|
|
70323
|
+
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index$1), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index$1), onFocus: () => this.handleFocus(index$1), onBlur: this.handleBlur }, item.icon && (index.h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), index.h("span", { class: "menu-item-label" }, item.label), index.h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "m9 18 6-6-6-6" }))))))), index.h("div", { key: 'fe85069f67961b6f266fe602f17c130b5e554b1f', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, index.h("button", { key: '33feba674e61adddd31457e4a5c22d7932071c01', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, index.h("kritzel-icon", { key: 'c94f80d668dbf8689bb4f2c8d7c8d1fb7b650715', name: "chevronLeft", size: 20, class: "mobile-back-icon" }), "Back"), index.h("slot", { key: '8938f125f7597b13a64256400733de4cc5e1e7c4' })))));
|
|
69657
70324
|
}
|
|
69658
70325
|
static get watchers() { return {
|
|
69659
70326
|
"selectedItemId": [{
|
|
@@ -69663,7 +70330,7 @@ const KritzelMasterDetail = class {
|
|
|
69663
70330
|
};
|
|
69664
70331
|
KritzelMasterDetail.style = kritzelMasterDetailCss();
|
|
69665
70332
|
|
|
69666
|
-
const kritzelMenuCss = () => `:host{position:relative;display:flex;flex-direction:column;background-color:var(--kritzel-menu-background-color, #ffffff);width:var(--kritzel-menu-width, 200px);padding:var(--kritzel-menu-padding, 8px);border-radius:var(--kritzel-menu-border-radius, 12px);box-shadow:var(--kritzel-menu-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));border:var(--kritzel-menu-border, 1px solid #ebebeb);z-index:2;gap:var(--kritzel-menu-gap, 4px);overflow-y:auto;scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin;max-height:var(--kritzel-portal-max-height, 300px);box-sizing:border-box;-webkit-tap-highlight-color:transparent;outline:none;clip-path:inset(0 round var(--kritzel-menu-border-radius, 12px))}:host:focus-visible{outline:auto}.has-open-child-overlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3}`;
|
|
70333
|
+
const kritzelMenuCss = () => `:host{position:relative;display:flex;flex-direction:column;font-family:var(--kritzel-menu-font-family, var(--kritzel-global-font-family, sans-serif));background-color:var(--kritzel-menu-background-color, #ffffff);width:var(--kritzel-menu-width, 200px);padding:var(--kritzel-menu-padding, 8px);border-radius:var(--kritzel-menu-border-radius, 12px);box-shadow:var(--kritzel-menu-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));border:var(--kritzel-menu-border, 1px solid #ebebeb);z-index:2;gap:var(--kritzel-menu-gap, 4px);overflow-y:auto;scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin;max-height:var(--kritzel-portal-max-height, 300px);box-sizing:border-box;-webkit-tap-highlight-color:transparent;outline:none;clip-path:inset(0 round var(--kritzel-menu-border-radius, 12px))}:host:focus-visible{outline:auto}.has-open-child-overlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3}`;
|
|
69667
70334
|
|
|
69668
70335
|
const KritzelMenu = class {
|
|
69669
70336
|
constructor(hostRef) {
|
|
@@ -69726,12 +70393,12 @@ const KritzelMenu = class {
|
|
|
69726
70393
|
this.itemCloseChildMenu.emit(event.detail);
|
|
69727
70394
|
};
|
|
69728
70395
|
render() {
|
|
69729
|
-
return (index.h(index.Host, { key: '
|
|
70396
|
+
return (index.h(index.Host, { key: 'fc7816cfb7a4f88f95f5abe4c9dcbccd920ad6e7', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && index.h("div", { key: 'fb36bc0122d79b4929356280fe5213dd00535eae', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (index.h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${item.id}`, item: item, parent: this.parent, style: { pointerEvents: this.editingMenuItem && !item.isEditing ? 'none' : 'auto' }, onItemSelect: this.handleItemSelect, onItemSave: this.handleSave, onItemCancel: this.handleCancel, onItemToggleChildMenu: this.handleToggleChildMenu, onItemCloseChildMenu: this.handleCloseChildMenu })))));
|
|
69730
70397
|
}
|
|
69731
70398
|
};
|
|
69732
70399
|
KritzelMenu.style = kritzelMenuCss();
|
|
69733
70400
|
|
|
69734
|
-
const kritzelMenuItemCss = () => `:host{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--kritzel-menu-item-padding, 8px);box-sizing:border-box;gap:16px;height:var(--kritzel-menu-item-height, 40px);min-height:var(--kritzel-menu-item-min-height, 40px);font-family:sans-serif;font-size:var(--kritzel-menu-item-font-size, 14px);color:var(--kritzel-menu-item-color, #333333);border-radius:var(--kritzel-menu-item-border-radius, 12px);-webkit-tap-highlight-color:transparent}:host:focus:not(:focus-visible){outline:none}:host(:hover) .menu-item-overlay,:host(:focus-within) .menu-item-overlay{background-color:var(--kritzel-menu-item-overlay-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.selected){background-color:var(--kritzel-menu-item-selected-background-color, #007aff);color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected) .action-button{color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected.editing){background-color:var(--kritzel-menu-item-selected-background-color, #007aff)}:host(.selected) .edit-input{color:var(--kritzel-menu-item-selected-color, #ffffff);caret-color:var(--kritzel-menu-item-input-caret-color-on-selected, #ffffff);border-color:var(--kritzel-menu-item-input-border-color-on-selected, #ffffff)}:host(.selected) .action-button kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-selected-color, #ffffff)}kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-color, #333333)}:host(.selected) kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected) .edit-input::selection{background-color:var(--kritzel-menu-item-input-selection-color-on-selected, rgba(255, 255, 255, 0.3));color:var(--kritzel-menu-item-input-selection-text-color-on-selected, #ffffff)}:host(.editing){background-color:var(--kritzel-menu-item-editing-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.disabled){opacity:0.5;pointer-events:none !important}:host(.child-open){background-color:var(--kritzel-menu-item-child-open-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.child-open.selected){background-color:var(--kritzel-menu-item-selected-background-color, #007aff)}.menu-item-overlay{position:absolute;inset:0;background-color:transparent;z-index:0;pointer-events:none;border-radius:var(--kritzel-menu-item-border-radius, 12px)}.menu-item-content{display:flex;align-items:center;gap:8px;position:relative;z-index:1;height:100%}.menu-item-content span{display:flex;align-items:center;line-height:0}.left{justify-content:flex-start;flex:1;min-width:0}.left>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.right{justify-content:flex-end}.edit-input{flex:1;height:var(--kritzel-menu-item-input-height, 24px);padding:0;background-color:transparent;border-radius:0;border:none;border-bottom:var(--kritzel-menu-item-input-border, 1px solid #ccc);font-size:var(--kritzel-menu-item-font-size, 14px);width:100%;min-width:0;box-sizing:border-box;outline:none;color:inherit}.edit-input{caret-color:var(--kritzel-menu-item-input-caret-color, currentColor)}.edit-input::selection{background-color:var(--kritzel-menu-item-input-selection-color, #007bff);color:var(--kritzel-menu-item-input-selection-text-color, #ffffff)}.action-button{padding:4px;border-radius:8px;border:none;cursor:var(--kritzel-global-pointer-cursor, pointer);display:flex;align-items:center;justify-content:center;background-color:transparent;background:transparent;-webkit-tap-highlight-color:transparent}.action-button:hover,.action-button:focus{background-color:var(--kritzel-menu-item-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.action-button.disabled{pointer-events:none;opacity:0.5}`;
|
|
70401
|
+
const kritzelMenuItemCss = () => `:host{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--kritzel-menu-item-padding, 8px);box-sizing:border-box;gap:16px;height:var(--kritzel-menu-item-height, 40px);min-height:var(--kritzel-menu-item-min-height, 40px);font-family:var(--kritzel-menu-font-family, var(--kritzel-global-font-family, sans-serif));font-size:var(--kritzel-menu-item-font-size, 14px);color:var(--kritzel-menu-item-color, #333333);border-radius:var(--kritzel-menu-item-border-radius, 12px);-webkit-tap-highlight-color:transparent}:host:focus:not(:focus-visible){outline:none}:host(:hover) .menu-item-overlay,:host(:focus-within) .menu-item-overlay{background-color:var(--kritzel-menu-item-overlay-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.selected){background-color:var(--kritzel-menu-item-selected-background-color, #007aff);color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected) .action-button{color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected.editing){background-color:var(--kritzel-menu-item-selected-background-color, #007aff)}:host(.selected) .edit-input{color:var(--kritzel-menu-item-selected-color, #ffffff);caret-color:var(--kritzel-menu-item-input-caret-color-on-selected, #ffffff);border-color:var(--kritzel-menu-item-input-border-color-on-selected, #ffffff)}:host(.selected) .action-button kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-selected-color, #ffffff)}kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-color, #333333)}:host(.selected) kritzel-icon{--kritzel-icon-color:var(--kritzel-menu-item-selected-color, #ffffff)}:host(.selected) .edit-input::selection{background-color:var(--kritzel-menu-item-input-selection-color-on-selected, rgba(255, 255, 255, 0.3));color:var(--kritzel-menu-item-input-selection-text-color-on-selected, #ffffff)}:host(.editing){background-color:var(--kritzel-menu-item-editing-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.disabled){opacity:0.5;pointer-events:none !important}:host(.child-open){background-color:var(--kritzel-menu-item-child-open-background-color, hsl(0, 0%, 0%, 4.3%))}:host(.child-open.selected){background-color:var(--kritzel-menu-item-selected-background-color, #007aff)}.menu-item-overlay{position:absolute;inset:0;background-color:transparent;z-index:0;pointer-events:none;border-radius:var(--kritzel-menu-item-border-radius, 12px)}.menu-item-content{display:flex;align-items:center;gap:8px;position:relative;z-index:1;height:100%}.menu-item-content span{display:flex;align-items:center;line-height:0}.left{justify-content:flex-start;flex:1;min-width:0}.left>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.right{justify-content:flex-end}.edit-input{flex:1;height:var(--kritzel-menu-item-input-height, 24px);padding:0;background-color:transparent;border-radius:0;border:none;border-bottom:var(--kritzel-menu-item-input-border, 1px solid #ccc);font-size:var(--kritzel-menu-item-font-size, 14px);width:100%;min-width:0;box-sizing:border-box;outline:none;color:inherit}.edit-input{caret-color:var(--kritzel-menu-item-input-caret-color, currentColor)}.edit-input::selection{background-color:var(--kritzel-menu-item-input-selection-color, #007bff);color:var(--kritzel-menu-item-input-selection-text-color, #ffffff)}.action-button{padding:4px;border-radius:8px;border:none;cursor:var(--kritzel-global-pointer-cursor, pointer);display:flex;align-items:center;justify-content:center;background-color:transparent;background:transparent;-webkit-tap-highlight-color:transparent}.action-button:hover,.action-button:focus{background-color:var(--kritzel-menu-item-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.action-button.disabled{pointer-events:none;opacity:0.5}`;
|
|
69735
70402
|
|
|
69736
70403
|
const KritzelMenuItem = class {
|
|
69737
70404
|
constructor(hostRef) {
|
|
@@ -69820,7 +70487,7 @@ const KritzelMenuItem = class {
|
|
|
69820
70487
|
index.h("div", { class: "menu-item-content left" }, this.item.icon && (index.h("span", { title: this.item.iconTooltip }, index.h("kritzel-icon", { name: this.item.icon, size: 16, style: this.item.color ? { '--kritzel-icon-color': this.item.color } : undefined }))), index.h("div", { style: this.item.color ? { color: this.item.color } : undefined }, this.item.label)),
|
|
69821
70488
|
index.h("div", { class: "menu-item-content right" }, this.item.children &&
|
|
69822
70489
|
this.item.children.length > 0 && [
|
|
69823
|
-
index.h("button", { id: "child-menu-toggle", class: "action-button", onClick: this.handleMenuToggle, disabled: this.item.isDisabled }, index.h("kritzel-icon", { name: "
|
|
70490
|
+
index.h("button", { id: "child-menu-toggle", class: "action-button", onClick: this.handleMenuToggle, disabled: this.item.isDisabled }, index.h("kritzel-icon", { name: "ellipsisVertical", size: 16 })),
|
|
69824
70491
|
index.h("kritzel-portal", { anchor: this.item.childMenuAnchor, offsetY: 4, onClose: this.handleMenuClose }, index.h(childMenuTag, {
|
|
69825
70492
|
items: this.item.children,
|
|
69826
70493
|
parent: this.item,
|
|
@@ -69839,12 +70506,12 @@ const KritzelMenuItem = class {
|
|
|
69839
70506
|
];
|
|
69840
70507
|
}
|
|
69841
70508
|
render() {
|
|
69842
|
-
return (index.h(index.Host, { key: '
|
|
70509
|
+
return (index.h(index.Host, { key: '90064541474da10a040c49ba72be132a8317dbba', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
69843
70510
|
'selected': this.item.isSelected,
|
|
69844
70511
|
'editing': this.item.isEditing,
|
|
69845
70512
|
'disabled': this.item.isDisabled,
|
|
69846
70513
|
'child-open': this.item.isChildMenuOpen,
|
|
69847
|
-
}, onClick: this.handleItemSelect }, index.h("div", { key: '
|
|
70514
|
+
}, onClick: this.handleItemSelect }, index.h("div", { key: '73be9249dced01dcc40e06b045329f9f642f0cb9', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
69848
70515
|
}
|
|
69849
70516
|
static get watchers() { return {
|
|
69850
70517
|
"item": [{
|
|
@@ -69875,7 +70542,7 @@ const KritzelMoreMenu = class {
|
|
|
69875
70542
|
/**
|
|
69876
70543
|
* The icon to display on the button
|
|
69877
70544
|
*/
|
|
69878
|
-
icon = '
|
|
70545
|
+
icon = 'ellipsisVertical';
|
|
69879
70546
|
/**
|
|
69880
70547
|
* The size of the icon
|
|
69881
70548
|
*/
|
|
@@ -70005,7 +70672,7 @@ const KritzelMoreMenu = class {
|
|
|
70005
70672
|
this.closeMenu();
|
|
70006
70673
|
};
|
|
70007
70674
|
render() {
|
|
70008
|
-
return (index.h(index.Host, { key: '
|
|
70675
|
+
return (index.h(index.Host, { key: '4474c94b4a72aa5692493de26f4379fa9602c0d4', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, index.h("div", { key: 'd85da74f28b106b0b3634185825ed54ca6083879', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: '3d060d5bf5da7cadb06a0ed35b967147a9bc53ad', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, index.h("kritzel-icon", { key: '85bceb5f0eeacfed5e6b6c0f9043d845fd7ed03b', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: '7b42098250c1a50032a48d17743d32169f8870ca', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '764efaaa19161b8ee4bd3d4b606b6c1029ad7d2e', items: this.resolveMenuLabels(this.visibleItems), onItemSelect: this.handleMenuItemSelect })))));
|
|
70009
70676
|
}
|
|
70010
70677
|
static get watchers() { return {
|
|
70011
70678
|
"items": [{
|
|
@@ -70015,7 +70682,7 @@ const KritzelMoreMenu = class {
|
|
|
70015
70682
|
};
|
|
70016
70683
|
KritzelMoreMenu.style = kritzelMoreMenuCss();
|
|
70017
70684
|
|
|
70018
|
-
const kritzelNotificationCardCss = () => `:host{display:block}.card{box-sizing:border-box;width:100%;max-width:var(--kritzel-notification-card-max-width, 360px);margin-inline:auto;font-family:var(--kritzel-font-family, sans-serif);padding:var(--kritzel-notification-card-padding, 12px 14px);border:var(--kritzel-notification-card-border, 1px solid #e5e7eb);border-radius:var(--kritzel-notification-card-border-radius, 12px);background-color:var(--kritzel-notification-card-background-color, #ffffff);color:var(--kritzel-notification-card-color, #111827);box-shadow:var(--kritzel-notification-card-box-shadow, 0 8px 20px rgba(15, 23, 42, 0.08))}.card-header{display:flex;align-items:center;justify-content:space-between;gap:var(--kritzel-notification-card-header-gap, 8px);margin-bottom:var(--kritzel-notification-card-header-margin-bottom, 8px)}.header-right{display:inline-flex;align-items:center;gap:var(--kritzel-notification-card-header-right-gap, 6px)}.type-pill{display:inline-flex;align-items:center;justify-content:center;min-height:var(--kritzel-notification-card-pill-height, 22px);padding:var(--kritzel-notification-card-pill-padding, 0 8px);border-radius:var(--kritzel-notification-card-pill-border-radius, 999px);background-color:var(--kritzel-notification-card-pill-background-color, #eff6ff);color:var(--kritzel-notification-card-pill-color, #1d4ed8);font-size:var(--kritzel-notification-card-pill-font-size, 12px);font-weight:var(--kritzel-notification-card-pill-font-weight, 600);line-height:1}.card.type-info .type-pill{background-color:var(--kritzel-notification-card-info-pill-background-color, #eff6ff);color:var(--kritzel-notification-card-info-pill-color, #1d4ed8)}.card.type-warning .type-pill{background-color:var(--kritzel-notification-card-warning-pill-background-color, #fff7ed);color:var(--kritzel-notification-card-warning-pill-color, #b45309)}.card.type-error .type-pill{background-color:var(--kritzel-notification-card-error-pill-background-color, #fef2f2);color:var(--kritzel-notification-card-error-pill-color, #b91c1c)}.timestamp{color:var(--kritzel-notification-card-timestamp-color, #6b7280);font-size:var(--kritzel-notification-card-timestamp-font-size, 12px);white-space:nowrap}.dismiss-button{display:inline-flex;align-items:center;justify-content:center;width:var(--kritzel-notification-card-dismiss-button-size, 24px);height:var(--kritzel-notification-card-dismiss-button-size, 24px);padding:0;border:none;border-radius:var(--kritzel-notification-card-dismiss-button-border-radius, 6px);background:var(--kritzel-notification-card-dismiss-button-background-color, transparent);color:var(--kritzel-notification-card-dismiss-button-color, #4b5563);cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent}.dismiss-button:hover{background:var(--kritzel-notification-card-dismiss-button-hover-background-color, #f3f4f6)}.dismiss-button:active{background:var(--kritzel-notification-card-dismiss-button-active-background-color, #e5e7eb)}.dismiss-button:focus-visible{outline:revert}.message{margin:0;color:var(--kritzel-notification-card-message-color, inherit);font-size:var(--kritzel-notification-card-message-font-size, 14px);line-height:var(--kritzel-notification-card-message-line-height, 1.45);word-break:break-word}`;
|
|
70685
|
+
const kritzelNotificationCardCss = () => `:host{display:block}.card{box-sizing:border-box;width:100%;max-width:var(--kritzel-notification-card-max-width, 360px);margin-inline:auto;font-family:var(--kritzel-global-font-family, sans-serif);padding:var(--kritzel-notification-card-padding, 12px 14px);border:var(--kritzel-notification-card-border, 1px solid #e5e7eb);border-radius:var(--kritzel-notification-card-border-radius, 12px);background-color:var(--kritzel-notification-card-background-color, #ffffff);color:var(--kritzel-notification-card-color, #111827);box-shadow:var(--kritzel-notification-card-box-shadow, 0 8px 20px rgba(15, 23, 42, 0.08))}.card-header{display:flex;align-items:center;justify-content:space-between;gap:var(--kritzel-notification-card-header-gap, 8px);margin-bottom:var(--kritzel-notification-card-header-margin-bottom, 8px)}.header-right{display:inline-flex;align-items:center;gap:var(--kritzel-notification-card-header-right-gap, 6px)}.type-pill{display:inline-flex;align-items:center;justify-content:center;min-height:var(--kritzel-notification-card-pill-height, 22px);padding:var(--kritzel-notification-card-pill-padding, 0 8px);border-radius:var(--kritzel-notification-card-pill-border-radius, 999px);background-color:var(--kritzel-notification-card-pill-background-color, #eff6ff);color:var(--kritzel-notification-card-pill-color, #1d4ed8);font-size:var(--kritzel-notification-card-pill-font-size, 12px);font-weight:var(--kritzel-notification-card-pill-font-weight, 600);line-height:1}.card.type-info .type-pill{background-color:var(--kritzel-notification-card-info-pill-background-color, #eff6ff);color:var(--kritzel-notification-card-info-pill-color, #1d4ed8)}.card.type-warning .type-pill{background-color:var(--kritzel-notification-card-warning-pill-background-color, #fff7ed);color:var(--kritzel-notification-card-warning-pill-color, #b45309)}.card.type-error .type-pill{background-color:var(--kritzel-notification-card-error-pill-background-color, #fef2f2);color:var(--kritzel-notification-card-error-pill-color, #b91c1c)}.timestamp{color:var(--kritzel-notification-card-timestamp-color, #6b7280);font-size:var(--kritzel-notification-card-timestamp-font-size, 12px);white-space:nowrap}.dismiss-button{display:inline-flex;align-items:center;justify-content:center;width:var(--kritzel-notification-card-dismiss-button-size, 24px);height:var(--kritzel-notification-card-dismiss-button-size, 24px);padding:0;border:none;border-radius:var(--kritzel-notification-card-dismiss-button-border-radius, 6px);background:var(--kritzel-notification-card-dismiss-button-background-color, transparent);color:var(--kritzel-notification-card-dismiss-button-color, #4b5563);cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent}.dismiss-button:hover{background:var(--kritzel-notification-card-dismiss-button-hover-background-color, #f3f4f6)}.dismiss-button:active{background:var(--kritzel-notification-card-dismiss-button-active-background-color, #e5e7eb)}.dismiss-button:focus-visible{outline:revert}.message{margin:0;color:var(--kritzel-notification-card-message-color, inherit);font-size:var(--kritzel-notification-card-message-font-size, 14px);line-height:var(--kritzel-notification-card-message-line-height, 1.45);word-break:break-word}`;
|
|
70019
70686
|
|
|
70020
70687
|
const KritzelNotificationCard = class {
|
|
70021
70688
|
constructor(hostRef) {
|
|
@@ -70177,7 +70844,7 @@ const KritzelNumericInput = class {
|
|
|
70177
70844
|
this.valueChange.emit(newValue);
|
|
70178
70845
|
};
|
|
70179
70846
|
render() {
|
|
70180
|
-
return (index.h(index.Host, { key: '
|
|
70847
|
+
return (index.h(index.Host, { key: '4492b328055747be0df872965fe8f8a644c1b99f' }, index.h("div", { key: '8e35306939f4da96af77658c02ae3c4f2f9bd9c3', class: "input-container" }, this.label && index.h("label", { key: '00eef99018632f20e98f372b29ee23efd6855196', class: "input-label" }, this.label), index.h("div", { key: '41bed7ac6642a3cd52e5be1d95d1243d48e1249b', class: "input-wrapper" }, index.h("input", { key: 'fcb996947286814e01e15f01df89ff161926c8f3', type: "number", class: "numeric-input", title: "", min: this.min === Number.MIN_SAFE_INTEGER ? undefined : this.min, max: this.max === Number.MAX_SAFE_INTEGER ? undefined : this.max, step: this.step, value: this.inputValue, placeholder: this.placeholder, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onInvalid: this.handleInvalid }), index.h("div", { key: '0ff1a0d8306cf45d594413332c2977202ad402d3', class: "spinner-buttons" }, index.h("button", { key: '1f5b278dff3052fd03e65aa6758c289200574eae', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, index.h("svg", { key: '1722b868967111631dbf2442d33d2c9736b68c0c', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: '75655b2843c384ab448c5447fc3d3546c6f360d9', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("button", { key: 'b81a65fefb49157a76f9dd5dc0ad785e167a61fe', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, index.h("svg", { key: 'dc1cc93cb3bb8593a50682a49018bd4ca27b3a30', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'db9138181002c73da50fb3ab369a36912a7874f5', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
70181
70848
|
}
|
|
70182
70849
|
static get watchers() { return {
|
|
70183
70850
|
"value": [{
|
|
@@ -70187,7 +70854,7 @@ const KritzelNumericInput = class {
|
|
|
70187
70854
|
};
|
|
70188
70855
|
KritzelNumericInput.style = kritzelNumericInputCss();
|
|
70189
70856
|
|
|
70190
|
-
const kritzelOpacitySliderCss = () => `:host{display:flex;flex-direction:column;padding:0;box-sizing:border-box}.opacity-container{display:flex;align-items:center;width:232px}.slider-wrapper{flex:1;display:flex;align-items:center}.opacity-slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:3px;background:linear-gradient(
|
|
70857
|
+
const kritzelOpacitySliderCss = () => `:host{display:flex;flex-direction:column;padding:0;box-sizing:border-box}.opacity-container{display:flex;align-items:center;width:232px}.slider-wrapper{flex:1;display:flex;align-items:center}.opacity-slider{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:3px;background:linear-gradient( to right, var(--kritzel-opacity-slider-active-color, #007AFF) 0%, var(--kritzel-opacity-slider-active-color, #007AFF) var(--slider-progress, 100%), var(--kritzel-opacity-slider-track-color, #e0e0e0) var(--slider-progress, 100%), var(--kritzel-opacity-slider-track-color, #e0e0e0) 100% );outline:none;cursor:var(--kritzel-global-pointer-cursor, pointer)}.opacity-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--kritzel-opacity-slider-thumb-color, #ffffff);border:2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:0 1px 3px rgba(0, 0, 0, 0.2);transition:transform 0.1s ease}.opacity-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.opacity-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--kritzel-opacity-slider-thumb-color, #ffffff);border:2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:0 1px 3px rgba(0, 0, 0, 0.2);transition:transform 0.1s ease}.opacity-slider::-moz-range-thumb:hover{transform:scale(1.1)}.opacity-slider::-moz-range-track{height:6px;border-radius:3px;background:transparent}.opacity-slider:focus{outline:none}.opacity-slider:focus::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3))}.opacity-slider:focus::-moz-range-thumb{box-shadow:0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3))}`;
|
|
70191
70858
|
|
|
70192
70859
|
const KritzelOpacitySlider = class {
|
|
70193
70860
|
constructor(hostRef) {
|
|
@@ -70216,7 +70883,7 @@ const KritzelOpacitySlider = class {
|
|
|
70216
70883
|
}
|
|
70217
70884
|
render() {
|
|
70218
70885
|
const percentage = this.getPercentage();
|
|
70219
|
-
return (index.h(index.Host, { key: '
|
|
70886
|
+
return (index.h(index.Host, { key: 'bb0e9f56f5ede377700710940c29cc05c767549a' }, index.h("div", { key: 'aea9ee85b87ff8a91b4119f5ff008dd6d838c05b', class: "opacity-container" }, index.h("div", { key: '45e6e8b7f6ec871935143ef45996114ead9d9018', class: "slider-wrapper" }, index.h("input", { key: '7e3d4877bf04110784c20d2b4633b7c489d54a82', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
70220
70887
|
'--slider-progress': `${percentage}%`,
|
|
70221
70888
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
70222
70889
|
} })))));
|
|
@@ -70281,7 +70948,7 @@ const KritzelPillTabs = class {
|
|
|
70281
70948
|
buttons?.[newIndex]?.focus();
|
|
70282
70949
|
}
|
|
70283
70950
|
render() {
|
|
70284
|
-
return (index.h(index.Host, { key: '
|
|
70951
|
+
return (index.h(index.Host, { key: 'f02f93ada5ec002695b62f511c847de201a8cbe4' }, index.h("div", { key: 'bb08ae773f1b993cb330556a5778d71fc5e91ce1', class: "pill-tabs-container", role: "tablist" }, this.tabs.map((tab, index$1) => (index.h("button", { key: tab.id, class: {
|
|
70285
70952
|
'pill-tab': true,
|
|
70286
70953
|
'selected': this.value === tab.id,
|
|
70287
70954
|
}, role: "tab", "aria-selected": this.value === tab.id ? 'true' : 'false', tabIndex: this.value === tab.id ? 0 : -1, onClick: () => this.handleTabClick(tab.id), onKeyDown: (e) => this.handleKeyDown(e, index$1) }, tab.icon && index.h("kritzel-icon", { name: tab.icon, size: 16 }), index.h("span", { class: "pill-tab-label" }, tab.label)))))));
|
|
@@ -70569,7 +71236,7 @@ const KritzelPortal = class {
|
|
|
70569
71236
|
this.portal.style.visibility = 'visible';
|
|
70570
71237
|
}
|
|
70571
71238
|
render() {
|
|
70572
|
-
return (index.h(index.Host, { key: '
|
|
71239
|
+
return (index.h(index.Host, { key: 'e37e3fb0de2910fabd9379f372e477ecac929d1d', style: { display: this.anchor ? 'block' : 'none' } }, index.h("slot", { key: '86f8720d298201b66efea2475634ec7506b33d9c' })));
|
|
70573
71240
|
}
|
|
70574
71241
|
static get watchers() { return {
|
|
70575
71242
|
"anchor": [{
|
|
@@ -70791,7 +71458,7 @@ const KritzelSettings = class {
|
|
|
70791
71458
|
return (index.h("div", { class: "settings-categories-wrapper" }, index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'general' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.general.title', 'General Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), index.h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), index.h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), index.h("p", { class: "settings-description" }, this.t('settings.general.lockDrawingScale.description', 'When enabled, drawn objects maintain a fixed visual size regardless of the current zoom level.')), index.h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'viewport' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.minZoom.description', 'Sets the minimum zoom level. Lower values allow zooming out further to see more of the canvas.')), index.h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.maxZoom.description', 'Sets the maximum zoom level. Higher values allow zooming in closer for detailed work.')), index.h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryLeft.description', 'Left boundary in world coordinates. Set to limit how far left the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryRight.description', 'Right boundary in world coordinates. Set to limit how far right the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryTop.description', 'Top boundary in world coordinates. Set to limit how far up the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryBottom.description', 'Bottom boundary in world coordinates. Set to limit how far down the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'shortcuts' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), index.h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category", key: category }, index.h("h4", { class: "shortcuts-category-title" }, category), index.h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (index.h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, index.h("span", { class: "shortcut-label" }, shortcut.label), index.h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut)))))))))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'developer' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.developer.title', 'Developer Options')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'about' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.about.title', 'About')), index.h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), index.h("p", { class: "version-info" }, "Version ", engine.KRITZEL_VERSION), index.h("p", { class: "version-info" }, "App-State Schema v", engine.CURRENT_APP_STATE_SCHEMA_VERSION), index.h("p", { class: "version-info" }, "Workspace Schema v", engine.CURRENT_WORKSPACE_SCHEMA_VERSION)))));
|
|
70792
71459
|
}
|
|
70793
71460
|
render() {
|
|
70794
|
-
return (index.h(index.Host, { key: '
|
|
71461
|
+
return (index.h(index.Host, { key: 'a3b62913565f4823bd379da67d81545c58c49d20' }, index.h("kritzel-dialog", { key: 'e688b2d81f985905f65b756becb336b7d14ca8f5', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: '1f6db30412514bee5b087d8365eca91d76002ef8', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
70795
71462
|
}
|
|
70796
71463
|
static get watchers() { return {
|
|
70797
71464
|
"settings": [{
|
|
@@ -70824,10 +71491,10 @@ const KritzelShapeFill = class {
|
|
|
70824
71491
|
return (index.h("svg", { viewBox: "0 0 24 24", class: "fill-icon" }, index.h("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", fill: strokeColor, stroke: strokeColor, "stroke-width": "2" })));
|
|
70825
71492
|
}
|
|
70826
71493
|
render() {
|
|
70827
|
-
return (index.h(index.Host, { key: '
|
|
71494
|
+
return (index.h(index.Host, { key: '6d38a9af2e4c4c7f86ab994c63fc074007c86b48' }, index.h("div", { key: 'cf58f26cb0e56e274873d11024209c6908d317bb', class: "fill-row" }, index.h("button", { key: 'c75eed70fe0c2fcbf0fd136bb6fce75b2dbfb45d', class: {
|
|
70828
71495
|
'fill-option': true,
|
|
70829
71496
|
'selected': this.value === 'transparent',
|
|
70830
|
-
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: '
|
|
71497
|
+
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: '5d6ede439b5d5e55598cd8c20b5851fb9f210463', class: {
|
|
70831
71498
|
'fill-option': true,
|
|
70832
71499
|
'selected': this.value === 'filled',
|
|
70833
71500
|
}, onClick: () => this.handleFillChange('filled'), title: "Filled background" }, this.renderFillIcon('filled')))));
|
|
@@ -74031,9 +74698,9 @@ const KritzelShareDialog = class {
|
|
|
74031
74698
|
this.dialogClosed.emit();
|
|
74032
74699
|
};
|
|
74033
74700
|
render() {
|
|
74034
|
-
return (index.h(index.Host, { key: '
|
|
74701
|
+
return (index.h(index.Host, { key: 'b7a8be6921198400c95003928dfed03acd3866b6' }, index.h("kritzel-dialog", { key: '742e50d49ee54ba135279d6d34c78fa05645744e', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, index.h("div", { key: 'e16420d7eea180e42c5491f8314ba0106b1b572a', class: "share-content" }, index.h("div", { key: '0cc6522bcb123d722e29420ba8462af21e933fb7', class: "share-section" }, index.h("div", { key: 'da9c8954fca7b9c6a73776a702e917d517229cc8', class: "share-row" }, index.h("div", { key: '40760b33ca59a51d746ed76673219a26126ae60c', class: "share-label-group" }, index.h("label", { key: 'de6b6409a3c487560e3491e1f3c87cb66c34fa61', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), index.h("p", { key: '6c0db50f81c1de442eb87322e5d562868819adac', class: "share-description" }, this.internalIsPublic
|
|
74035
74702
|
? (this.terms['share.linkSharing.enabledDescription'] ?? 'Anyone with the link can access this workspace.')
|
|
74036
|
-
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '
|
|
74703
|
+
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '57492b1e6576c2b842809ac8b29c67ad4bcb66f1', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (index.h("div", { key: '9a6be392c660e13c6add3b671509f169a4ccb52e', class: "share-section" }, index.h("div", { key: '8ff6565cca2cf53ea7568ef4d2a1a0705daa8fa3', class: "share-url-container" }, index.h("input", { key: '3f8dffdf23a5b6f0744b63b5ceb9c488904b6c11', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: 'c6a629ef64ddfe2f7fa15dbbcaf344573e8085b9', class: { 'copy-button': true, 'copy-success': this.copySuccess }, onClick: this.handleCopyUrl, title: this.copySuccess ? (this.terms['share.copyLink.copied'] ?? 'Copied!') : (this.terms['share.copyLink.title'] ?? 'Copy link') }, index.h("kritzel-icon", { key: 'b748074ec82f1d97d0b0ea03366ee0353900512c', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (index.h("div", { key: '444f8d53ea5ba95b35bd0882e0e91dba2edfdbc6', class: "share-qr-container" }, index.h("img", { key: 'a11e1dc20306392266794f765bb709f05f17d4a0', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
|
|
74037
74704
|
}
|
|
74038
74705
|
static get watchers() { return {
|
|
74039
74706
|
"isPublic": [{
|
|
@@ -74074,7 +74741,7 @@ const KritzelSlideToggle = class {
|
|
|
74074
74741
|
}
|
|
74075
74742
|
};
|
|
74076
74743
|
render() {
|
|
74077
|
-
return (index.h(index.Host, { key: '
|
|
74744
|
+
return (index.h(index.Host, { key: '21474507cafab44ac713e7732d2bb3b1323951e1', class: { checked: this.checked, disabled: this.disabled }, tabIndex: this.disabled ? -1 : 0, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.label, onClick: this.handleToggle, onKeyDown: this.handleKeyDown }, index.h("div", { key: '9d973f03b674ae90c0f3dc78680feffb5e74e2f0', class: "toggle-track" }, index.h("div", { key: '3988d20da458ace01a0bb1af196d28c8fd290042', class: "toggle-thumb" }))));
|
|
74078
74745
|
}
|
|
74079
74746
|
};
|
|
74080
74747
|
KritzelSlideToggle.style = kritzelSlideToggleCss();
|
|
@@ -74095,7 +74762,7 @@ const KritzelSplitButton = class {
|
|
|
74095
74762
|
}
|
|
74096
74763
|
get host() { return index.getElement(this); }
|
|
74097
74764
|
buttonIcon = 'plus';
|
|
74098
|
-
dropdownIcon = '
|
|
74765
|
+
dropdownIcon = 'chevronDown';
|
|
74099
74766
|
items = [];
|
|
74100
74767
|
mainButtonDisabled = false;
|
|
74101
74768
|
menuButtonDisabled = false;
|
|
@@ -74177,7 +74844,7 @@ const KritzelSplitButton = class {
|
|
|
74177
74844
|
this.menuScrollTop = event.target.scrollTop;
|
|
74178
74845
|
};
|
|
74179
74846
|
render() {
|
|
74180
|
-
return (index.h(index.Host, { key: '
|
|
74847
|
+
return (index.h(index.Host, { key: 'fd367561351219e18883cf7bf72a1fd488b1d3e9', class: { mobile: this.isTouchDevice } }, index.h("button", { key: 'f9edff7ca0c77f2502947a98ab4bb64ed68d6437', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && index.h("kritzel-icon", { key: '31f8dc17a94d015d5881ca2475b4933a6183cafa', name: this.buttonIcon })), index.h("div", { key: '3620329f4b911cee3f4cbae4498c28c20e19f953', class: "split-divider" }), index.h("button", { key: 'cda9b17a019df40107f01d9bb644e5545218e891', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, index.h("kritzel-icon", { key: '03f04eb20ef66cc6ea8ed4104f26dc062afba680', name: this.dropdownIcon })), index.h("kritzel-portal", { key: 'e02bc799b56ad731db06719ae77b65b872e0a368', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '694b82e1c05411ea119fdb07aec0b747c6e3d6f4', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
|
|
74181
74848
|
}
|
|
74182
74849
|
};
|
|
74183
74850
|
KritzelSplitButton.style = kritzelSplitButtonCss();
|
|
@@ -74198,7 +74865,7 @@ const KritzelStrokeSize = class {
|
|
|
74198
74865
|
}
|
|
74199
74866
|
render() {
|
|
74200
74867
|
const sizes = this.sizes ?? [];
|
|
74201
|
-
return (index.h(index.Host, { key: '
|
|
74868
|
+
return (index.h(index.Host, { key: 'dcb655ac6ec2eea1ee38b9d267dd11c6d1f21f4a' }, index.h("div", { key: '50c3ecaddb26cebb943c24685386401b5fdac54c', class: "size-grid" }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
74202
74869
|
'size-container': true,
|
|
74203
74870
|
'selected': this.selectedSize === size,
|
|
74204
74871
|
}, onClick: () => this.handleSizeClick(size) }, index.h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -74463,7 +75130,7 @@ const KritzelToolConfig = class {
|
|
|
74463
75130
|
])), shouldShowExpandButton && (index.h("div", { style: {
|
|
74464
75131
|
display: 'flex',
|
|
74465
75132
|
alignItems: 'flex-start',
|
|
74466
|
-
} }, index.h("button", { class: "expand-toggle", onClick: this.handleToggleExpand, title: this.isExpanded ? (this.terms['toolConfig.collapse'] ?? 'Collapse') : (this.terms['toolConfig.expand'] ?? 'Expand') }, index.h("kritzel-icon", { name: this.isExpanded ? '
|
|
75133
|
+
} }, index.h("button", { class: "expand-toggle", onClick: this.handleToggleExpand, title: this.isExpanded ? (this.terms['toolConfig.collapse'] ?? 'Collapse') : (this.terms['toolConfig.expand'] ?? 'Expand') }, index.h("kritzel-icon", { name: this.isExpanded ? 'chevronUp' : 'chevronDown' })))))));
|
|
74467
75134
|
}
|
|
74468
75135
|
static get watchers() { return {
|
|
74469
75136
|
"tool": [{
|
|
@@ -74637,17 +75304,13 @@ const KritzelToolbar = class {
|
|
|
74637
75304
|
await this.resolveDisabledStates(newToolbar);
|
|
74638
75305
|
for (const c of newToolbar) {
|
|
74639
75306
|
if (c.type === 'tool' && c.tool) {
|
|
74640
|
-
|
|
74641
|
-
if (typeof toolConstructor !== 'function') {
|
|
74642
|
-
toolConstructor = toolConstructor.constructor;
|
|
74643
|
-
}
|
|
74644
|
-
const registered = await this.kritzelEngine.registerTool(c.name, toolConstructor, c.config);
|
|
75307
|
+
const registered = await this.kritzelEngine.getTool(c.name);
|
|
74645
75308
|
if (registered) {
|
|
74646
75309
|
c.tool = registered;
|
|
74647
75310
|
}
|
|
74648
75311
|
}
|
|
74649
75312
|
if (c.type === 'tool' && c.isDefault && !this.isControlDisabled(c) && c.tool) {
|
|
74650
|
-
await this.kritzelEngine.
|
|
75313
|
+
await this.kritzelEngine.setActiveTool(c.name);
|
|
74651
75314
|
this.activeControl = c;
|
|
74652
75315
|
this.updateDisplayValues(c.tool);
|
|
74653
75316
|
hasDefault = true;
|
|
@@ -74666,7 +75329,7 @@ const KritzelToolbar = class {
|
|
|
74666
75329
|
if (!hasDefault) {
|
|
74667
75330
|
const firstTool = this.internalToolbar.find(c => c.type === 'tool' && c.tool && !this.isControlDisabled(c));
|
|
74668
75331
|
if (firstTool) {
|
|
74669
|
-
await this.kritzelEngine.
|
|
75332
|
+
await this.kritzelEngine.setActiveTool(firstTool.name);
|
|
74670
75333
|
this.activeControl = firstTool;
|
|
74671
75334
|
this.updateDisplayValues(firstTool.tool);
|
|
74672
75335
|
}
|
|
@@ -74702,12 +75365,12 @@ const KritzelToolbar = class {
|
|
|
74702
75365
|
this.activeControl = control;
|
|
74703
75366
|
if (this.activeControl.type === 'tool') {
|
|
74704
75367
|
this.updateDisplayValues(this.activeControl.tool);
|
|
74705
|
-
await this.kritzelEngine.
|
|
75368
|
+
await this.kritzelEngine.setActiveTool(this.activeControl.name);
|
|
74706
75369
|
}
|
|
74707
75370
|
}
|
|
74708
75371
|
async handleToolChange(event) {
|
|
74709
75372
|
this.activeControl = { ...this.activeControl, tool: event.detail };
|
|
74710
|
-
await this.kritzelEngine.
|
|
75373
|
+
await this.kritzelEngine.setActiveTool(this.activeControl.name);
|
|
74711
75374
|
}
|
|
74712
75375
|
/**
|
|
74713
75376
|
* Get the currently selected sub-option for a control.
|
|
@@ -74746,13 +75409,13 @@ const KritzelToolbar = class {
|
|
|
74746
75409
|
// Separate tool controls from config control
|
|
74747
75410
|
const toolControls = this.internalToolbar.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
74748
75411
|
const configControl = this.internalToolbar.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
74749
|
-
return (index.h(index.Host, { key: '
|
|
75412
|
+
return (index.h(index.Host, { key: 'e4f662409cdd76fafa8753a47d4c4670968a9e7a', style: { display: this.visible ? '' : 'none' }, class: {
|
|
74750
75413
|
mobile: this.isTouchDevice,
|
|
74751
|
-
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '
|
|
75414
|
+
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: 'c3c864e0e818ccf92d4c9b43f183775fa919cf4c', style: {
|
|
74752
75415
|
position: 'absolute',
|
|
74753
75416
|
bottom: '56px',
|
|
74754
75417
|
left: '12px',
|
|
74755
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '
|
|
75418
|
+
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '4d59605d66ee7277af8fc56002947f943f8a5b14', class: "kritzel-toolbar" }, index.h("div", { key: '7c36b7ad02470bafc9efcb426f667376e28953e8', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: 'd29be9bca631077fad2fe709219c8897735bc6a6', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
74756
75419
|
// Check if this control has sub-options (split-button)
|
|
74757
75420
|
if (control.subOptions?.length) {
|
|
74758
75421
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -74774,7 +75437,7 @@ const KritzelToolbar = class {
|
|
|
74774
75437
|
}, disabled: isDisabled, ref: el => {
|
|
74775
75438
|
if (el)
|
|
74776
75439
|
control._triggerRef = el;
|
|
74777
|
-
}, "aria-label": `Select ${control.name} options`, "aria-disabled": isDisabled, "data-testid": `tool-${control.name}-dropdown`, tabIndex: isActive ? 0 : -1 }, index.h("kritzel-icon", { name: "
|
|
75440
|
+
}, "aria-label": `Select ${control.name} options`, "aria-disabled": isDisabled, "data-testid": `tool-${control.name}-dropdown`, tabIndex: isActive ? 0 : -1 }, index.h("kritzel-icon", { name: "chevronDown", size: 12 })), index.h("kritzel-tooltip", { anchorElement: control._anchorRef, triggerElement: control._triggerRef }, index.h("div", { class: "kritzel-submenu-content" }, control.subOptions.map(option => (index.h("button", { class: {
|
|
74778
75441
|
'kritzel-submenu-item': true,
|
|
74779
75442
|
'active': option.id === selectedSubOption?.id,
|
|
74780
75443
|
}, key: option.id, "data-testid": `suboption-${option.id}`, onClick: () => this.selectSubOption(control, option) }, index.h("kritzel-icon", { name: option.icon, size: 20 }), index.h("span", null, option.label))))))));
|
|
@@ -74788,10 +75451,10 @@ const KritzelToolbar = class {
|
|
|
74788
75451
|
'selected': this.activeControl?.name === control?.name,
|
|
74789
75452
|
'disabled': this.isControlDisabled(control),
|
|
74790
75453
|
}, disabled: this.isControlDisabled(control), key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1), "aria-disabled": this.isControlDisabled(control) }, index.h("kritzel-icon", { name: control.icon })));
|
|
74791
|
-
})), index.h("div", { key: '
|
|
75454
|
+
})), index.h("div", { key: '8cb7ae1d0b77f6bac9c6ddf34699c2653b1cfa68', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (index.h("div", { class: {
|
|
74792
75455
|
'kritzel-config-container': true,
|
|
74793
75456
|
'visible': hasConfigUI,
|
|
74794
|
-
}, key: configControl.name }, index.h("div", { key: '
|
|
75457
|
+
}, key: configControl.name }, index.h("div", { key: '764230be2ef0ca45f94ca2a7bf6e2b5df7bdf7b2', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: '7b6c2cae55b9ca6f723e2209f98d921b388e8159', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: '222a7eb3c5a0ad3589e62b43618dcf56bce01418', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), index.h("div", { key: '90455ca7c55240645445f3d92ccec54ffc1e3572', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
74795
75458
|
if (el)
|
|
74796
75459
|
this.configTriggerRef = el;
|
|
74797
75460
|
}, onKeyDown: event => {
|
|
@@ -74800,7 +75463,7 @@ const KritzelToolbar = class {
|
|
|
74800
75463
|
}
|
|
74801
75464
|
}, style: {
|
|
74802
75465
|
cursor: 'pointer',
|
|
74803
|
-
} }, this.displayValues && (index.h("div", { key: '
|
|
75466
|
+
} }, this.displayValues && (index.h("div", { key: 'ef0c11f630b70dadf5c9b7688c0f1b93cf9cf030', class: "color-container" }, index.h("kritzel-color", { key: 'd14a7837fef6d3777ee92d219d22915c5f21e541', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
74804
75467
|
borderRadius: '50%',
|
|
74805
75468
|
border: 'none',
|
|
74806
75469
|
} })))))))));
|
|
@@ -74952,14 +75615,14 @@ const KritzelTooltip = class {
|
|
|
74952
75615
|
}
|
|
74953
75616
|
}
|
|
74954
75617
|
render() {
|
|
74955
|
-
return (index.h(index.Host, { key: '
|
|
75618
|
+
return (index.h(index.Host, { key: '9c80a8831cdc03e08b4fe19c8c0aabd036fd5a23', style: {
|
|
74956
75619
|
position: 'fixed',
|
|
74957
75620
|
zIndex: '9999',
|
|
74958
75621
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
74959
75622
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
74960
75623
|
left: `${this.positionX}px`,
|
|
74961
75624
|
bottom: `${this.positionY}px`,
|
|
74962
|
-
} }, index.h("div", { key: '
|
|
75625
|
+
} }, index.h("div", { key: '0f5907b4bf740e6242a07e00790685265ee7767b', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, index.h("slot", { key: 'e1074787847d96b7a725fcb04902ccc7e6827984' }))));
|
|
74963
75626
|
}
|
|
74964
75627
|
static get watchers() { return {
|
|
74965
75628
|
"triggerElement": [{
|
|
@@ -75000,12 +75663,12 @@ const KritzelUtilityPanel = class {
|
|
|
75000
75663
|
this.redo.emit();
|
|
75001
75664
|
}
|
|
75002
75665
|
render() {
|
|
75003
|
-
return (index.h(index.Host, { key: '
|
|
75666
|
+
return (index.h(index.Host, { key: '1ec661383d53b4c34308152d745a8de1cb5809e0' }, index.h("button", { key: '69ff640842779f8b03709040feb3dbfe2f5f0f05', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event), "aria-label": this.terms['utility.undo'] ?? 'Undo' }, index.h("kritzel-icon", { key: '49be69476a559136b1199f7d20144d0dc0aa402b', name: "undo" })), index.h("button", { key: 'f9a14d78e14e66f0ebfb3762a7de748097c297e1', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event), "aria-label": this.terms['utility.redo'] ?? 'Redo' }, index.h("kritzel-icon", { key: 'e559abf9a2a0471d2524f65264adbc28d8fa0449', name: "redo" })), index.h("div", { key: '19fe0895816459d7e9241307c9f0642c055774b6', class: "utility-separator" }), index.h("button", { key: '3672bbcad7e22b023dc203ee098ba1538836b0ee', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, index.h("kritzel-icon", { key: 'aadbff86ca2938e28a74c4ad1c0ac6330d20e529', name: "delete" }))));
|
|
75004
75667
|
}
|
|
75005
75668
|
};
|
|
75006
75669
|
KritzelUtilityPanel.style = kritzelUtilityPanelCss();
|
|
75007
75670
|
|
|
75008
|
-
const kritzelWatermarkCss = () => `:host{position:absolute;bottom:var(--kritzel-watermark-offset-bottom, 12px);right:var(--kritzel-watermark-offset-right, 12px);z-index:10000;pointer-events:none}.watermark-link{pointer-events:auto;display:inline-flex;align-items:center;padding:4px 8px;border-radius:var(--kritzel-watermark-border-radius, 6px);font-family:var(--kritzel-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);font-size:var(--kritzel-watermark-font-size, 11px);line-height:1;text-decoration:none;color:var(--kritzel-watermark-color, rgba(60, 60, 60, 0.75));background-color:var(--kritzel-watermark-background, rgba(255, 255, 255, 0.6));box-shadow:var(--kritzel-watermark-box-shadow, 0 1px 2px rgba(0, 0, 0, 0.12));opacity:var(--kritzel-watermark-opacity, 0.85);transition:opacity 150ms ease;user-select:none}.watermark-link:hover{opacity:1}`;
|
|
75671
|
+
const kritzelWatermarkCss = () => `:host{position:absolute;bottom:var(--kritzel-watermark-offset-bottom, 12px);right:var(--kritzel-watermark-offset-right, 12px);z-index:10000;pointer-events:none}.watermark-link{pointer-events:auto;display:inline-flex;align-items:center;padding:4px 8px;border-radius:var(--kritzel-watermark-border-radius, 6px);font-family:var(--kritzel-global-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);font-size:var(--kritzel-watermark-font-size, 11px);line-height:1;text-decoration:none;color:var(--kritzel-watermark-color, rgba(60, 60, 60, 0.75));background-color:var(--kritzel-watermark-background, rgba(255, 255, 255, 0.6));box-shadow:var(--kritzel-watermark-box-shadow, 0 1px 2px rgba(0, 0, 0, 0.12));opacity:var(--kritzel-watermark-opacity, 0.85);transition:opacity 150ms ease;user-select:none}.watermark-link:hover{opacity:1}`;
|
|
75009
75672
|
|
|
75010
75673
|
const KritzelWatermark = class {
|
|
75011
75674
|
constructor(hostRef) {
|
|
@@ -75021,7 +75684,7 @@ const KritzelWatermark = class {
|
|
|
75021
75684
|
label;
|
|
75022
75685
|
render() {
|
|
75023
75686
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
75024
|
-
return (index.h(index.Host, { key: '
|
|
75687
|
+
return (index.h(index.Host, { key: '5bc76650ecd1f82f5ed283d4433b0e5fc8937cab' }, index.h("a", { key: 'b0828f36df618e461794772d2e8f55c0a8cb357e', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
|
|
75025
75688
|
}
|
|
75026
75689
|
};
|
|
75027
75690
|
KritzelWatermark.style = kritzelWatermarkCss();
|
|
@@ -75154,7 +75817,7 @@ const KritzelWorkspaceManager = class {
|
|
|
75154
75817
|
return {
|
|
75155
75818
|
id: ws.id,
|
|
75156
75819
|
label: ws.name,
|
|
75157
|
-
icon: ws.isPublic ? '
|
|
75820
|
+
icon: ws.isPublic ? 'usersRound' : undefined,
|
|
75158
75821
|
iconTooltip: ws.isPublic ? (this.terms['workspace.sharedTooltip'] ?? 'Shared workspace') : undefined,
|
|
75159
75822
|
value: ws,
|
|
75160
75823
|
isEditing: this.editingItemId === ws.id,
|
|
@@ -75184,7 +75847,7 @@ const KritzelWorkspaceManager = class {
|
|
|
75184
75847
|
};
|
|
75185
75848
|
KritzelWorkspaceManager.style = kritzelWorkspaceManagerCss();
|
|
75186
75849
|
|
|
75187
|
-
const kritzelZoomPanelCss = () => `:host{display:block;z-index:1}.panel{display:flex;flex-direction:row;align-items:center;gap:var(--kritzel-zoom-panel-gap, 4px);padding:var(--kritzel-zoom-panel-padding, 4px);border:var(--kritzel-zoom-panel-border, 1px solid #ebebeb);border-radius:var(--kritzel-zoom-panel-border-radius, 12px);background-color:var(--kritzel-zoom-panel-background-color, #ffffff);box-shadow:var(--kritzel-zoom-panel-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));opacity:0;pointer-events:none;transition:opacity 0.2s ease-out}.panel.visible{opacity:1;pointer-events:auto}.zoom-level{display:inline-flex;align-items:center;justify-content:center;min-width:46px;color:var(--kritzel-zoom-panel-icon-color, #000000);font-family:var(--kritzel-font-family, sans-serif);font-size:12px;font-weight:500;line-height:1;padding:0 4px;user-select:none}.zoom-button{display:flex;align-items:center;justify-content:center;width:var(--kritzel-zoom-panel-button-size, 32px);height:var(--kritzel-zoom-panel-button-size, 32px);padding:0;border:0;border-radius:var(--kritzel-zoom-panel-button-border-radius, 8px);background:transparent;background-color:transparent;color:var(--kritzel-zoom-panel-icon-color, #000000);--kritzel-icon-color:var(--kritzel-zoom-panel-icon-color, #000000);box-shadow:none;appearance:none;cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent}.zoom-button:hover,.zoom-button:focus-visible{background-color:var(--kritzel-zoom-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.zoom-button:active{background-color:var(--kritzel-zoom-panel-button-active-background-color, hsl(0, 0%, 0%, 8.6%))}.zoom-button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}`;
|
|
75850
|
+
const kritzelZoomPanelCss = () => `:host{display:block;z-index:1}.panel{display:flex;flex-direction:row;align-items:center;gap:var(--kritzel-zoom-panel-gap, 4px);padding:var(--kritzel-zoom-panel-padding, 4px);border:var(--kritzel-zoom-panel-border, 1px solid #ebebeb);border-radius:var(--kritzel-zoom-panel-border-radius, 12px);background-color:var(--kritzel-zoom-panel-background-color, #ffffff);box-shadow:var(--kritzel-zoom-panel-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));opacity:0;pointer-events:none;transition:opacity 0.2s ease-out}.panel.visible{opacity:1;pointer-events:auto}.zoom-level{display:inline-flex;align-items:center;justify-content:center;min-width:46px;color:var(--kritzel-zoom-panel-icon-color, #000000);font-family:var(--kritzel-global-font-family, sans-serif);font-size:12px;font-weight:500;line-height:1;padding:0 4px;user-select:none}.zoom-button{display:flex;align-items:center;justify-content:center;width:var(--kritzel-zoom-panel-button-size, 32px);height:var(--kritzel-zoom-panel-button-size, 32px);padding:0;border:0;border-radius:var(--kritzel-zoom-panel-button-border-radius, 8px);background:transparent;background-color:transparent;color:var(--kritzel-zoom-panel-icon-color, #000000);--kritzel-icon-color:var(--kritzel-zoom-panel-icon-color, #000000);box-shadow:none;appearance:none;cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent}.zoom-button:hover,.zoom-button:focus-visible{background-color:var(--kritzel-zoom-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.zoom-button:active{background-color:var(--kritzel-zoom-panel-button-active-background-color, hsl(0, 0%, 0%, 8.6%))}.zoom-button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}`;
|
|
75188
75851
|
|
|
75189
75852
|
const KritzelZoomPanel = class {
|
|
75190
75853
|
constructor(hostRef) {
|
|
@@ -75218,7 +75881,7 @@ const KritzelZoomPanel = class {
|
|
|
75218
75881
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
75219
75882
|
}
|
|
75220
75883
|
render() {
|
|
75221
|
-
return (index.h(index.Host, { key: '
|
|
75884
|
+
return (index.h(index.Host, { key: '37bdf4f4025a64be94a2f743d73d2a83c4f9c478' }, index.h("div", { key: '5c897da0de9a15d91c4d488be923271f82d816c1', class: { panel: true, visible: this.visible } }, index.h("button", { key: '165fedd5f1c87140e1cbfd7c3a99344edea59d3e', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, index.h("kritzel-icon", { key: '4ac3e03e68166c9e9819c5a11ab1d8aac37b6eb1', name: "minus" })), index.h("span", { key: 'd124c60a92cde8afe9fac87c85b3654d18238343', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), index.h("button", { key: 'fe94bf21c0de5fc212524058c6fb5de90a89679e', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, index.h("kritzel-icon", { key: '84c8ebd09772c81946e65a5759376c501f050548', name: "plus" })))));
|
|
75222
75885
|
}
|
|
75223
75886
|
};
|
|
75224
75887
|
KritzelZoomPanel.style = kritzelZoomPanelCss();
|