kritzel-stencil 0.4.22 → 0.4.24
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 +21 -21
- package/LICENSE.md +49 -49
- package/dist/cjs/{index-Xav9JFHg.js → index-Dn19mGl-.js} +47 -11
- package/dist/cjs/index.cjs.js +2 -51
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +198 -231
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-CjN-B633.js → schema.constants-CY0WWJYd.js} +44 -20
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +0 -21
- package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +1 -29
- package/dist/collection/classes/structures/app-state-map.structure.js +1 -4
- package/dist/collection/classes/structures/object-map.structure.js +4 -66
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css +115 -115
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js +1 -1
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.css +10 -10
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +160 -160
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +18 -51
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +80 -80
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +102 -65
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.css +29 -29
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +2 -2
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.css +58 -58
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.css +42 -42
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.css +73 -73
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.css +24 -24
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.css +46 -46
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.css +209 -209
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.css +190 -190
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js +2 -2
- package/dist/collection/components/shared/kritzel-font/kritzel-font.css +10 -10
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.css +48 -48
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.js +2 -2
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.css +30 -30
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.css +18 -18
- package/dist/collection/components/shared/kritzel-input/kritzel-input.css +69 -69
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.css +60 -60
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.js +3 -3
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.css +190 -190
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.css +34 -34
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.css +166 -166
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.css +102 -102
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.css +85 -85
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.css +68 -68
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.js +2 -2
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.css +47 -47
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.js +4 -4
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.css +48 -48
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.css +78 -78
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.css +37 -37
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.css +50 -50
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.css +18 -18
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-active-users/kritzel-active-users.css +65 -65
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.css +42 -42
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.css +112 -112
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +331 -331
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.css +11 -11
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.css +39 -39
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.css +89 -89
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.css +50 -50
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.css +98 -98
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.css +58 -58
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +2 -2
- package/dist/collection/components/ui/kritzel-notification-card/kritzel-notification-card.css +101 -101
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +137 -137
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.css +150 -150
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-tool-config/kritzel-tool-config.css +38 -38
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.css +45 -45
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.css +16 -16
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.css +72 -72
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/helpers/cursor.helper.js +6 -6
- package/dist/collection/helpers/svg-export.helper.js +41 -41
- package/dist/components/index.js +4 -53
- 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-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-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 +56 -61
- 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-sync-indicator.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-watermark.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/kritzel-zoom-panel.js +1 -1
- package/dist/components/{p-jIKskj3S.js → p-1Q4VnThv.js} +3 -3
- package/dist/components/{p-Cm33td2O.js → p-3tBE7SyG.js} +2 -2
- package/dist/components/{p-fL9rl200.js → p-BFYT03fw.js} +3 -3
- package/dist/components/{p-DtnMdWWB.js → p-BShrnlam.js} +2 -2
- package/dist/components/{p-BsLI_BWq.js → p-BXUx_C0N.js} +2 -2
- package/dist/components/{p-CzW58DHM.js → p-BZZ3KRPk.js} +3 -3
- package/dist/components/{p-D1rjfWgJ.js → p-BkXQL5Dl.js} +5 -5
- package/dist/components/{p-eZXIu4yK.js → p-BppcoKoo.js} +5 -5
- package/dist/components/{p-DDTMGbtA.js → p-BrA9NBEE.js} +21 -21
- package/dist/components/{p-Czhdc844.js → p-BrqSjRJN.js} +3 -3
- package/dist/components/{p-CAoN_STZ.js → p-Bxi-Bm49.js} +2 -2
- package/dist/components/{p-B43upypT.js → p-C9_yBEoX.js} +30 -10
- package/dist/components/{p-Df3BwVGy.js → p-CHoOe3FD.js} +3 -3
- package/dist/components/{p-2WiGyky4.js → p-CLAz6RJc.js} +3 -3
- package/dist/components/{p-B5SWPDuq.js → p-CSKToqUl.js} +4 -4
- package/dist/components/{p-CF8pLc07.js → p-CSWCmyzb.js} +5 -5
- package/dist/components/{p-HoO86l1o.js → p-CWAChRD5.js} +12 -12
- package/dist/components/{p-DwMqCX2P.js → p-Ch-KG9To.js} +3 -3
- package/dist/components/{p-CSuU8frA.js → p-Ck-87E2G.js} +1 -1
- package/dist/components/{p-BFYtCsZu.js → p-Covorf4C.js} +3 -3
- package/dist/components/{p-BoN700-O.js → p-Cx-L_28S.js} +3 -3
- package/dist/components/{p-vqEUQ-4Q.js → p-D0Trc3IQ.js} +5 -5
- package/dist/components/{p-BrNsOp2v.js → p-D2VcPEtL.js} +6 -6
- package/dist/components/{p-CSPYkLLH.js → p-D3BzgkIE.js} +2 -2
- package/dist/components/{p-bAacqNHq.js → p-D6JycG-I.js} +3 -3
- package/dist/components/{p-DB58Oa5V.js → p-DPsbNStn.js} +2 -2
- package/dist/components/{p-CwZ3KKFq.js → p-DT_WBwsw.js} +6 -6
- package/dist/components/{p-Dx5NfJ0U.js → p-DW1B118Q.js} +9 -9
- package/dist/components/{p-BPsKYMH6.js → p-DYPA7jpg.js} +2 -2
- package/dist/components/{p-DBqoPgev.js → p-DafP9PAA.js} +2 -2
- package/dist/components/{p-Dt7-I2Xz.js → p-DcUIO14-.js} +4 -4
- package/dist/components/{p-CXpv9Rxe.js → p-Di--2boB.js} +3 -3
- package/dist/components/{p-djJSnjAX.js → p-DjXQxw9R.js} +3 -3
- package/dist/components/{p-DVXTPI71.js → p-Dp1CD4gK.js} +2 -2
- package/dist/components/{p-BNeE3SiZ.js → p-DwEYMvIn.js} +175 -179
- package/dist/components/{p-DKGg-76-.js → p-Dznwo6oc.js} +2 -2
- package/dist/components/{p-BozrueXV.js → p-ME1sDz3f.js} +2 -2
- package/dist/components/{p-B-585egz.js → p-MhQxGUvY.js} +3 -3
- package/dist/components/{p-DX2nriaq.js → p-QSyeAy8R.js} +2 -2
- package/dist/components/{p-PjPPCHVL.js → p-Qdo3E8dr.js} +2 -2
- package/dist/components/{p-dsxHDlQ3.js → p-b0J2ktAm.js} +7 -7
- package/dist/components/{p-C98Eb3_R.js → p-dAXnRkjA.js} +5 -5
- package/dist/components/{p-GKmqCI8r.js → p-fSV6KVTC.js} +3 -3
- package/dist/components/{p-CaBbajU2.js → p-o3NYKrVL.js} +3 -3
- package/dist/components/{p-CrHvaLRV.js → p-vDCa_ZDm.js} +3 -3
- package/dist/components/{p-4SPnZZkH.js → p-zG-WUBGF.js} +4 -4
- package/dist/esm/{index-Dhio9uis.js → index-2va1Pk9z.js} +47 -11
- package/dist/esm/index.js +3 -52
- package/dist/esm/kritzel-active-users_47.entry.js +198 -231
- package/dist/esm/kritzel-brush-style.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{schema.constants-DfvqHmxc.js → schema.constants-DBvUmuDH.js} +44 -20
- package/dist/esm/stencil.js +3 -3
- package/dist/stencil/index.esm.js +3 -52
- package/dist/stencil/{p-Dhio9uis.js → p-2va1Pk9z.js} +47 -11
- package/dist/stencil/{p-DfvqHmxc.js → p-DBvUmuDH.js} +44 -20
- package/dist/stencil/{p-ab5c4292.entry.js → p-ce6d432e.entry.js} +198 -231
- package/dist/stencil/{p-fb32cd8f.entry.js → p-df06ca3a.entry.js} +2 -2
- package/dist/stencil/stencil.esm.js +4 -4
- package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +0 -5
- package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +0 -6
- package/dist/types/classes/structures/object-map.structure.d.ts +2 -26
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +0 -3
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +11 -9
- package/dist/types/components.d.ts +1 -8
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/sync-provider.interface.d.ts +0 -13
- package/dist/types/stencil-public-runtime.d.ts +12 -0
- package/loader/index.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var schema_constants = require('./schema.constants-
|
|
3
|
+
var index = require('./index-Dn19mGl-.js');
|
|
4
|
+
var schema_constants = require('./schema.constants-CY0WWJYd.js');
|
|
5
5
|
var Y = require('yjs');
|
|
6
6
|
require('y-indexeddb');
|
|
7
7
|
require('y-websocket');
|
|
@@ -158,16 +158,16 @@ const KritzelAvatar = class {
|
|
|
158
158
|
height: `${this.size}px`,
|
|
159
159
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
160
160
|
};
|
|
161
|
-
return (index.h(index.Host, { key: '
|
|
161
|
+
return (index.h(index.Host, { key: '020217baf0aa2736af33c5a003e89406322e5fdc', style: containerStyles, class: {
|
|
162
162
|
'has-image': !!showImage,
|
|
163
163
|
'has-initials': !!showInitials,
|
|
164
164
|
'has-default': !!showDefaultIcon,
|
|
165
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: '
|
|
165
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (index.h("img", { key: '2f54dad2260ebf38cfe8c57e28899c98729e7e38', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
166
166
|
if (el) {
|
|
167
167
|
el.referrerPolicy = 'no-referrer';
|
|
168
168
|
el.crossOrigin = 'anonymous';
|
|
169
169
|
}
|
|
170
|
-
}, onError: this.handleImageError })), showInitials && (index.h("span", { key: '
|
|
170
|
+
}, onError: this.handleImageError })), showInitials && (index.h("span", { key: 'a97435d30044a37f15ce72ed51439e9c682c0aa3', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (index.h("span", { key: '6d0893d3f15a2d68a93f3fcf1b0fbd36786be0eb', class: "avatar-default" }, index.h("svg", { key: '688a9a1f88e22f4f3c3085675618b5f5f460d8f7', viewBox: "0 0 24 24", fill: "currentColor" }, index.h("path", { key: 'd12c67677e162534b2ad92535acc6a836df179c7', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
171
171
|
}
|
|
172
172
|
static get watchers() { return {
|
|
173
173
|
"user": [{
|
|
@@ -180,7 +180,7 @@ const KritzelAvatar = class {
|
|
|
180
180
|
};
|
|
181
181
|
KritzelAvatar.style = kritzelAvatarCss();
|
|
182
182
|
|
|
183
|
-
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,
|
|
183
|
+
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:-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:-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}`;
|
|
184
184
|
|
|
185
185
|
const STALE_THRESHOLD_MS = 10_000;
|
|
186
186
|
const REMOVE_THRESHOLD_MS = 30_000;
|
|
@@ -385,7 +385,7 @@ const KritzelAwarenessCursors = class {
|
|
|
385
385
|
}
|
|
386
386
|
render() {
|
|
387
387
|
const cursors = Array.from(this.remoteCursors.values());
|
|
388
|
-
return (index.h(index.Host, { key: '
|
|
388
|
+
return (index.h(index.Host, { key: 'b157f337127f7e5852acc0d6a246fa42e944a501' }, cursors.map(remoteCursor => {
|
|
389
389
|
if (!remoteCursor.cursor)
|
|
390
390
|
return null;
|
|
391
391
|
// When a remote user is actively drawing, derive cursor position from
|
|
@@ -492,7 +492,7 @@ const KritzelBackToContent = class {
|
|
|
492
492
|
this.backToContent.emit();
|
|
493
493
|
};
|
|
494
494
|
render() {
|
|
495
|
-
return (index.h(index.Host, { key: '
|
|
495
|
+
return (index.h(index.Host, { key: '612164b48226601d863cb2acdab1d567e9652188' }, index.h("button", { key: '159a4f4f01934c03c7898f2803bf87d5f0d95aba', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, index.h("kritzel-icon", { key: 'e7ec1308ab12ca233509a00fc76df17fce1f5700', name: "chevrons-left" }))));
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
KritzelBackToContent.style = kritzelBackToContentCss();
|
|
@@ -519,16 +519,16 @@ const KritzelButton = class {
|
|
|
519
519
|
this.buttonClick.emit();
|
|
520
520
|
};
|
|
521
521
|
render() {
|
|
522
|
-
return (index.h(index.Host, { key: '
|
|
522
|
+
return (index.h(index.Host, { key: 'ef407708a606dab1ac691b6c6f1c319ba5529e3b' }, index.h("button", { key: '5b26e220334c3ee20e0af433792496568067ca8c', type: this.type, class: {
|
|
523
523
|
'kritzel-button': true,
|
|
524
524
|
[this.variant]: true,
|
|
525
525
|
'disabled': this.disabled,
|
|
526
|
-
}, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: '
|
|
526
|
+
}, disabled: this.disabled, onClick: this.handleClick }, index.h("slot", { key: '5272679ba3b67e3d7c0ec1b2ef0b3829ef4204ba' }))));
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
KritzelButton.style = kritzelButtonCss();
|
|
530
530
|
|
|
531
|
-
const kritzelColorCss = () => `:host{display:flex}.checkerboard-bg{background:repeating-conic-gradient(
|
|
531
|
+
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)}`;
|
|
532
532
|
|
|
533
533
|
const KritzelColorComponent = class {
|
|
534
534
|
constructor(hostRef) {
|
|
@@ -571,13 +571,13 @@ const KritzelColorComponent = class {
|
|
|
571
571
|
render() {
|
|
572
572
|
const resolvedColor = this.resolveColor();
|
|
573
573
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
574
|
-
return (index.h(index.Host, { key: '
|
|
574
|
+
return (index.h(index.Host, { key: '30141c62ff9860237c22044f2c5101ed6516ff82' }, index.h("div", { key: '61818f71999a782871d4ec9ba00ef0c77e3c8b54', class: "checkerboard-bg", style: {
|
|
575
575
|
width: `${this.size}px`,
|
|
576
576
|
height: `${this.size}px`,
|
|
577
577
|
borderRadius: '50%',
|
|
578
578
|
display: 'inline-block',
|
|
579
579
|
position: 'relative',
|
|
580
|
-
} }, index.h("div", { key: '
|
|
580
|
+
} }, index.h("div", { key: 'a064cc28a354db78f6637c92f38e59ac4ebf1f95', class: {
|
|
581
581
|
'color-circle': true,
|
|
582
582
|
'white': isColorVeryLight,
|
|
583
583
|
}, style: {
|
|
@@ -633,7 +633,7 @@ const KritzelColorPalette = class {
|
|
|
633
633
|
render() {
|
|
634
634
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
635
635
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
636
|
-
return (index.h(index.Host, { key: '
|
|
636
|
+
return (index.h(index.Host, { key: '0fd02d97504f68ffbbac2fb2b6af702f0de71038' }, index.h("div", { key: '5f546350d0c2d528165987a177b8bd9d0015ccba', class: {
|
|
637
637
|
'color-grid': true,
|
|
638
638
|
'expanded': this.isExpanded,
|
|
639
639
|
}, style: {
|
|
@@ -1202,13 +1202,13 @@ const KritzelControls = class {
|
|
|
1202
1202
|
// Separate tool controls from config control
|
|
1203
1203
|
const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
1204
1204
|
const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
1205
|
-
return (index.h(index.Host, { key: '
|
|
1205
|
+
return (index.h(index.Host, { key: '0c61b173d0a92351de148c9c98b25031f231e1ab', style: { display: this.visible ? '' : 'none' }, class: {
|
|
1206
1206
|
mobile: this.isTouchDevice,
|
|
1207
|
-
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '
|
|
1207
|
+
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: 'a696e0af5f126456e610a6353377cb5a68b4fcb4', style: {
|
|
1208
1208
|
position: 'absolute',
|
|
1209
1209
|
bottom: '56px',
|
|
1210
1210
|
left: '12px',
|
|
1211
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '
|
|
1211
|
+
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: 'ffe96a9b2b73d3e08c7d149fd64b9b209eaf47d3', class: "kritzel-controls" }, index.h("div", { key: 'a351b3a4a801a4480d2476a6ca34bbbd628525ac', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: '9447a0d4728d4d476113a2bcb94f53a5652f7dd1', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
1212
1212
|
// Check if this control has sub-options (split-button)
|
|
1213
1213
|
if (control.subOptions?.length) {
|
|
1214
1214
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -1238,10 +1238,10 @@ const KritzelControls = class {
|
|
|
1238
1238
|
'kritzel-control': true,
|
|
1239
1239
|
'selected': this.activeControl?.name === control?.name,
|
|
1240
1240
|
}, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1) }, index.h("kritzel-icon", { name: control.icon })));
|
|
1241
|
-
})), index.h("div", { key: '
|
|
1241
|
+
})), index.h("div", { key: '31a1d141b1381c9aa0b7f07c1ae7d1606d1a8fc6', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (index.h("div", { class: {
|
|
1242
1242
|
'kritzel-config-container': true,
|
|
1243
1243
|
'visible': hasConfigUI,
|
|
1244
|
-
}, key: configControl.name }, index.h("div", { key: '
|
|
1244
|
+
}, key: configControl.name }, index.h("div", { key: 'ed4b6440e5b99b68a29269476de7efa15ecec38f', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: 'cac5417d5e1a8c4ec19fbcf38affb30ac67b521e', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: 'ffba221a22ab50b4c44c0247ef9e86e4b67e5bde', 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: '1f5b90e286d5aa8fcf10aa3987c6c6cd75360d49', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
1245
1245
|
if (el)
|
|
1246
1246
|
this.configTriggerRef = el;
|
|
1247
1247
|
}, onKeyDown: event => {
|
|
@@ -1250,7 +1250,7 @@ const KritzelControls = class {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
}, style: {
|
|
1252
1252
|
cursor: 'pointer',
|
|
1253
|
-
} }, this.displayValues && (index.h("div", { key: '
|
|
1253
|
+
} }, this.displayValues && (index.h("div", { key: '3857f9f2bc30ddac57d108a8021061edc5decb07', class: "color-container" }, index.h("kritzel-color", { key: '304eda20d9036bf567db7a4f146f1b07a8ca4c34', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
1254
1254
|
borderRadius: '50%',
|
|
1255
1255
|
border: 'none',
|
|
1256
1256
|
} })))))))));
|
|
@@ -1284,7 +1284,7 @@ const KritzelCurrentUser = class {
|
|
|
1284
1284
|
/** Resolved localized strings keyed by term key, supplied by the editor. */
|
|
1285
1285
|
terms = {};
|
|
1286
1286
|
render() {
|
|
1287
|
-
return (index.h(index.Host, { key: '
|
|
1287
|
+
return (index.h(index.Host, { key: '05ff7ea13b5a4850ae49672dfab15280b97e50a1' }, index.h("kritzel-avatar", { key: '4c33f853508509337033afd7015d7367c5c81d49', user: this.user, size: this.avatarSize })));
|
|
1288
1288
|
}
|
|
1289
1289
|
};
|
|
1290
1290
|
KritzelCurrentUser.style = kritzelCurrentUserCss();
|
|
@@ -1325,7 +1325,7 @@ const KritzelCurrentUserDialog = class {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
render() {
|
|
1327
1327
|
const displayName = this.getDisplayName();
|
|
1328
|
-
return (index.h(index.Host, { key: '
|
|
1328
|
+
return (index.h(index.Host, { key: 'bb0e0c4181b562bcf6f930508d0799dd24dceb70' }, index.h("kritzel-dialog", { key: '94b668b6d4c773b30bae2dfad437a0043048dbf3', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '7023664c08e42668e44d5e1f57fa0d020b65d452', class: "user-info" }, index.h("kritzel-avatar", { key: '461af0f69cb606ad37f779fc5971296f82e2ff34', user: this.user, size: 80 }), displayName && index.h("div", { key: '60c6e416942465a9afb872ed12cfec4788c580c9', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: '74a78e08f1aae64ee7e6ba84ca0eeb2efa1650bc', class: "user-email" }, this.user.email), index.h("kritzel-button", { key: '2b0bc8ded74baeee7a59b958e1529cd1b8862cd1', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
1331
|
KritzelCurrentUserDialog.style = kritzelCurrentUserDialogCss();
|
|
@@ -1398,7 +1398,7 @@ const KritzelCursorTrail = class {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
render() {
|
|
1401
|
-
return (index.h(index.Host, { key: '
|
|
1401
|
+
return (index.h(index.Host, { key: 'cf2cf1c689bdc8ea393a7ea8f32698cfcdb0e375' }, this.cursorTrailPoints.length > 1 && (index.h("svg", { key: 'df38c45537217982f7fb9513b954f3b0fa27acea', class: "cursor-trail-svg", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
1402
1402
|
position: 'absolute',
|
|
1403
1403
|
left: '0',
|
|
1404
1404
|
top: '0',
|
|
@@ -1421,7 +1421,7 @@ const KritzelCursorTrail = class {
|
|
|
1421
1421
|
};
|
|
1422
1422
|
KritzelCursorTrail.style = kritzelCursorTrailCss();
|
|
1423
1423
|
|
|
1424
|
-
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,
|
|
1424
|
+
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, 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}`;
|
|
1425
1425
|
|
|
1426
1426
|
const KritzelDialog = class {
|
|
1427
1427
|
constructor(hostRef) {
|
|
@@ -1864,7 +1864,7 @@ const KritzelDialog = class {
|
|
|
1864
1864
|
};
|
|
1865
1865
|
KritzelDialog.style = kritzelDialogCss();
|
|
1866
1866
|
|
|
1867
|
-
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-controls-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,
|
|
1867
|
+
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-controls-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-controls-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}`;
|
|
1868
1868
|
|
|
1869
1869
|
const KritzelDropdown = class {
|
|
1870
1870
|
constructor(hostRef) {
|
|
@@ -2102,7 +2102,7 @@ const KritzelDropdown = class {
|
|
|
2102
2102
|
'open-up': this.openDirection === 'up',
|
|
2103
2103
|
'open-down': this.openDirection === 'down',
|
|
2104
2104
|
};
|
|
2105
|
-
return (index.h(index.Host, { key: '
|
|
2105
|
+
return (index.h(index.Host, { key: '66ec6cbffa9fd25a7bad62d6e3477c0fe7726861' }, index.h("div", { key: '6dc1f20070dde95ab54f44d158659e99bd81b834', class: "dropdown-wrapper", ref: el => (this.wrapperElement = el) }, index.h("slot", { key: 'd9655fc7f5e6a0d74b4a1904a12cc0bf478ccf4e', name: "prefix", ref: el => (this.prefixSlotElement = el), onSlotchange: this.evaluatePrefixContent }), index.h("div", { key: '325af053df9588e99b493c422a1f369f0af2243a', class: "dropdown-container", style: { width: this.width } }, index.h("button", { key: '626d54cd8e01221b1cd61e61b9d53b534e7603db', 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: 'bbc3ec7297ee98c1903cfd547ca20daf3a5f1311', class: "dropdown-trigger-label" }, this.getSelectedLabel()), index.h("span", { key: '591b71aec72d2e6eaa96e8eb4c91b1f34eb2177a', class: "dropdown-trigger-arrow", "aria-hidden": "true" }, index.h("svg", { key: '317034d40ceab9ca72090f6a58fc0fa5b92f2db0', 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: '98867959ff1d7fd5515a3fe400bdc2378013dcb9', points: "6 9 12 15 18 9" }))))), index.h("slot", { key: 'f9d2f73f7b233a30f57ba4a9209e1a32a8ee5e70', name: "suffix", ref: el => (this.suffixSlotElement = el), onSlotchange: this.evaluateSuffixContent }), index.h("ul", { key: 'f15048910c0d24855fb1e940d2adc994dee83d06', class: menuClasses, role: "listbox", tabindex: "-1", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElement = el) }, this.options.map((option, index$1) => {
|
|
2106
2106
|
const isSelected = option.value === this.internalValue;
|
|
2107
2107
|
const isFocused = index$1 === this.focusedIndex;
|
|
2108
2108
|
const optionClasses = {
|
|
@@ -2149,7 +2149,7 @@ const DEFAULT_SYNC_CONFIG = {
|
|
|
2149
2149
|
providers: [],
|
|
2150
2150
|
};
|
|
2151
2151
|
|
|
2152
|
-
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-controls{position:absolute;z-index:1;left:0;right:0;margin-inline:auto;width:max-content;max-width:calc(100% - 16px);bottom:var(--kritzel-editor-controls-bottom, 14px);transition:transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out)}kritzel-controls.keyboard-open{transform:var(--kritzel-editor-controls-transform, translateY(300%))}.top-left-buttons{position:absolute;z-index:1;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)
|
|
2152
|
+
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-controls{position:absolute;z-index:1;left:0;right:0;margin-inline:auto;width:max-content;max-width:calc(100% - 16px);bottom:var(--kritzel-editor-controls-bottom, 14px);transition:transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out)}kritzel-controls.keyboard-open{transform:var(--kritzel-editor-controls-transform, translateY(300%))}.top-left-buttons{position:absolute;z-index:1;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:1;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:1;left:var(--kritzel-editor-top-left-buttons-left, 14px);bottom:var(--kritzel-editor-controls-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}`;
|
|
2153
2153
|
|
|
2154
2154
|
const KritzelEditor = class {
|
|
2155
2155
|
constructor(hostRef) {
|
|
@@ -2168,8 +2168,6 @@ const KritzelEditor = class {
|
|
|
2168
2168
|
this.login = index.createEvent(this, "login");
|
|
2169
2169
|
this.isPublicChange = index.createEvent(this, "isPublicChange");
|
|
2170
2170
|
this.awarenessChange = index.createEvent(this, "awarenessChange");
|
|
2171
|
-
this.syncingChange = index.createEvent(this, "syncingChange");
|
|
2172
|
-
this.loadingChange = index.createEvent(this, "loadingChange");
|
|
2173
2171
|
}
|
|
2174
2172
|
get host() { return index.getElement(this); }
|
|
2175
2173
|
scaleMax = ABSOLUTE_SCALE_MAX;
|
|
@@ -2409,9 +2407,6 @@ const KritzelEditor = class {
|
|
|
2409
2407
|
login;
|
|
2410
2408
|
isPublicChange;
|
|
2411
2409
|
awarenessChange;
|
|
2412
|
-
/** Emitted while remote changes are being applied to the active workspace. Stays silent when the remote holds nothing new. */
|
|
2413
|
-
syncingChange;
|
|
2414
|
-
loadingChange;
|
|
2415
2410
|
isEngineReady = false;
|
|
2416
2411
|
isControlsReady = false;
|
|
2417
2412
|
isWorkspaceManagerReady = false;
|
|
@@ -3230,40 +3225,40 @@ const KritzelEditor = class {
|
|
|
3230
3225
|
const isLoggedIn = this.isLoggedIn;
|
|
3231
3226
|
const shouldShowCurrentUser = isLoggedIn;
|
|
3232
3227
|
const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
|
|
3233
|
-
return (index.h(index.Host, { key: '
|
|
3228
|
+
return (index.h(index.Host, { key: 'b7b9b3cd6a81c4a7b8aa9730259377c8448336ba' }, index.h("div", { key: '7714490de58839fffb5a20d355a942dbb4d62409', class: "editor-content", style: {
|
|
3234
3229
|
opacity: this.isEditorVisible ? '1' : '0',
|
|
3235
3230
|
visibility: this.isEditorVisible ? 'visible' : 'hidden',
|
|
3236
3231
|
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
3237
|
-
} }, index.h("div", { key: '
|
|
3232
|
+
} }, index.h("div", { key: '0e9c1c786beacd19e8ef5a6e519e47efe7bf35f6', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'cd85c3bf1f6b281057d7538cb5d192b8826bc9ee', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: 'ea0065152125ca3318da9e6fc4c372ae4b71e053', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (index.h("div", { key: 'efde12cf6ed5fe19b651862ef7a123edacfc1e30', class: "top-center-notification-layer", role: "presentation" }, index.h("div", { key: '3bffe023e9119868ad18a52690272adb073ee3b0', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, index.h("kritzel-notification-card", { key: 'fcf62343eb401093ae6bfa1298f76d25d48eb0e4', 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: '9de9892adaaf4c123d4636393ccfa13a48730b17', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
|
|
3238
3233
|
position: 'absolute',
|
|
3239
3234
|
left: `${this.contextMenuState.position.x}px`,
|
|
3240
3235
|
top: `${this.contextMenuState.position.y}px`,
|
|
3241
3236
|
zIndex: '10002',
|
|
3242
|
-
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-sync-indicator", { key: '
|
|
3237
|
+
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-sync-indicator", { key: 'b0369b8006e4df5b7b395487de085faf11a59ed7', visible: this.isSyncing, text: "Syncing..." }), index.h("kritzel-loading-overlay", { key: '4509e6fca3da8a8b1a5ac1e82581cfa136ab9913', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), index.h("kritzel-engine", { key: 'ec14d7f4f12dcf08c036a60b3ccc15a9fc558bd7', ref: el => {
|
|
3243
3238
|
if (el) {
|
|
3244
3239
|
this.engineRef = el;
|
|
3245
3240
|
}
|
|
3246
|
-
}, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event), onSyncingChange: event => (this.isSyncing = event.detail), onLoadingChange: event => (this.isLoadingOverlayVisible = event.detail) }), index.h("kritzel-controls", { key: '
|
|
3241
|
+
}, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event), onContextMenuStateChange: event => this.handleContextMenuStateChange(event), onSyncingChange: event => (this.isSyncing = event.detail), onLoadingChange: event => (this.isLoadingOverlayVisible = event.detail) }), index.h("kritzel-controls", { key: '59413042ba6aff8e972d51e4a04a44893b3a4b97', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
|
|
3247
3242
|
if (el) {
|
|
3248
3243
|
this.controlsRef = el;
|
|
3249
3244
|
}
|
|
3250
|
-
}, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: '
|
|
3245
|
+
}, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: '4cde7726bc85e97c20687f43673689c6e1825dbd', class: "bottom-left-buttons" }, index.h("kritzel-zoom-panel", { key: '8b7bd923d0086548325f8c38d0a1c16bb0335ed0', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), index.h("div", { key: 'c445b1efd03ed38e1b75361cd95cdef90f789825', class: "top-right-buttons" }, index.h("kritzel-settings", { key: 'c7b555a2a35833c362271006089a2632bd5db4f8', ref: el => {
|
|
3251
3246
|
if (el) {
|
|
3252
3247
|
this.settingsRef = el;
|
|
3253
3248
|
}
|
|
3254
|
-
}, 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: '
|
|
3249
|
+
}, 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: '9789c32789c70d817ca894fceee74610c494eede', ref: el => {
|
|
3255
3250
|
if (el) {
|
|
3256
3251
|
this.exportRef = el;
|
|
3257
3252
|
}
|
|
3258
|
-
}, 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: '
|
|
3253
|
+
}, 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: '010d5137a3204b5f90ecbfb10c06e4823c0acec3', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: '65b04f1d7912cf03baabe5bed8e37db8aaf4fe17', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (index.h("kritzel-current-user-dialog", { key: 'ffceb4a511e1f51a193d8a3ee9c331d4aa5c270b', ref: el => {
|
|
3259
3254
|
if (el) {
|
|
3260
3255
|
this.currentUserDialogRef = el;
|
|
3261
3256
|
}
|
|
3262
|
-
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: '
|
|
3257
|
+
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: '789427d5e7af880420830f69ec292d5a78831fde', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), index.h("kritzel-more-menu", { key: '053f004ac79f7fa7413238dcd4276f75cb47ce74', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: '60f608263145323645f3b292243b63243676680b', ref: el => {
|
|
3263
3258
|
if (el) {
|
|
3264
3259
|
this.shareDialogRef = el;
|
|
3265
3260
|
}
|
|
3266
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '
|
|
3261
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '94e8ccb8da10cc8bfe6bb3debe21af40a47aeea7', ref: el => {
|
|
3267
3262
|
if (el) {
|
|
3268
3263
|
this.loginDialogRef = el;
|
|
3269
3264
|
}
|
|
@@ -22306,10 +22301,6 @@ class KritzelObjectMap {
|
|
|
22306
22301
|
_awarenessChangeHandler = null;
|
|
22307
22302
|
_awarenessChangeCallbacks = [];
|
|
22308
22303
|
_objectsChangeCallbacks = [];
|
|
22309
|
-
_remoteChangesCallbacks = [];
|
|
22310
|
-
_docUpdateHandler = null;
|
|
22311
|
-
_remoteOrigins = new Set();
|
|
22312
|
-
_appliedRemoteChanges = false;
|
|
22313
22304
|
_lastAwarenessEmitTime = 0;
|
|
22314
22305
|
_awarenessEmitTimeout = null;
|
|
22315
22306
|
AWARENESS_THROTTLE_INTERVAL = 100; // milliseconds
|
|
@@ -22333,44 +22324,12 @@ class KritzelObjectMap {
|
|
|
22333
22324
|
return this._isReady;
|
|
22334
22325
|
}
|
|
22335
22326
|
/**
|
|
22336
|
-
* Promise that settles when network providers finish connecting
|
|
22337
|
-
*
|
|
22327
|
+
* Promise that settles when network providers finish connecting.
|
|
22328
|
+
* Resolves immediately if no network providers. Awaited by the loading overlay.
|
|
22338
22329
|
*/
|
|
22339
22330
|
whenNetworkSynced() {
|
|
22340
22331
|
return this._networkSyncPromise ?? Promise.resolve();
|
|
22341
22332
|
}
|
|
22342
|
-
/**
|
|
22343
|
-
* Whether any configured provider synchronizes over the network.
|
|
22344
|
-
*/
|
|
22345
|
-
get hasNetworkSyncProvider() {
|
|
22346
|
-
return this._providers.some(provider => provider.type === 'network');
|
|
22347
|
-
}
|
|
22348
|
-
/**
|
|
22349
|
-
* Whether remote-originated changes can be told apart from local writes.
|
|
22350
|
-
* Requires every network provider to expose its Yjs update origin.
|
|
22351
|
-
*/
|
|
22352
|
-
get supportsRemoteChangeDetection() {
|
|
22353
|
-
const networkProviders = this._providers.filter(provider => provider.type === 'network');
|
|
22354
|
-
return networkProviders.length > 0 && networkProviders.every(provider => provider.updateOrigin !== undefined);
|
|
22355
|
-
}
|
|
22356
|
-
/**
|
|
22357
|
-
* Whether at least one update originating from a network provider has been
|
|
22358
|
-
* applied to this document. Stays `false` when the remote held no data the
|
|
22359
|
-
* local document was missing, because Yjs suppresses empty updates.
|
|
22360
|
-
*/
|
|
22361
|
-
get hasAppliedRemoteChanges() {
|
|
22362
|
-
return this._appliedRemoteChanges;
|
|
22363
|
-
}
|
|
22364
|
-
/**
|
|
22365
|
-
* Registers a callback invoked whenever a network provider applies changes to this document.
|
|
22366
|
-
* @returns A function that unregisters the callback.
|
|
22367
|
-
*/
|
|
22368
|
-
onRemoteChangesApplied(callback) {
|
|
22369
|
-
this._remoteChangesCallbacks.push(callback);
|
|
22370
|
-
return () => {
|
|
22371
|
-
this._remoteChangesCallbacks = this._remoteChangesCallbacks.filter(registered => registered !== callback);
|
|
22372
|
-
};
|
|
22373
|
-
}
|
|
22374
22333
|
/**
|
|
22375
22334
|
* Returns the Yjs Awareness instance, if a network provider is available.
|
|
22376
22335
|
*/
|
|
@@ -22613,22 +22572,6 @@ class KritzelObjectMap {
|
|
|
22613
22572
|
const providerList = this._providers.map(p => `${p.constructor.name} (${p.type})`).join(', ');
|
|
22614
22573
|
console.info(`[Kritzel] Workspace sync providers initialized for ${docName}: ${providerList || 'none'}`);
|
|
22615
22574
|
}
|
|
22616
|
-
// Registered before any provider connects so no remote update can be missed.
|
|
22617
|
-
for (const provider of this._providers) {
|
|
22618
|
-
if (provider.type === 'network' && provider.updateOrigin !== undefined) {
|
|
22619
|
-
this._remoteOrigins.add(provider.updateOrigin);
|
|
22620
|
-
}
|
|
22621
|
-
}
|
|
22622
|
-
this._docUpdateHandler = (_update, origin) => {
|
|
22623
|
-
if (!this._remoteOrigins.has(origin)) {
|
|
22624
|
-
return;
|
|
22625
|
-
}
|
|
22626
|
-
this._appliedRemoteChanges = true;
|
|
22627
|
-
for (const callback of [...this._remoteChangesCallbacks]) {
|
|
22628
|
-
callback();
|
|
22629
|
-
}
|
|
22630
|
-
};
|
|
22631
|
-
this._ydoc.on('update', this._docUpdateHandler);
|
|
22632
22575
|
// captureTimeout is effectively infinite — undo-step boundaries are
|
|
22633
22576
|
// marked explicitly via markUndoBoundary() in insert/remove/reset and
|
|
22634
22577
|
// at stroke/gesture boundaries in the tools. This prevents a single
|
|
@@ -22682,15 +22625,12 @@ class KritzelObjectMap {
|
|
|
22682
22625
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
22683
22626
|
console.info(`[Kritzel] Workspace network providers connecting in background: ${networkProviders.length}`);
|
|
22684
22627
|
}
|
|
22685
|
-
const networkConnectPromises = networkProviders.map(provider => provider
|
|
22686
|
-
.connect()
|
|
22687
|
-
.then(() => provider.whenSynced?.())
|
|
22688
|
-
.catch(err => {
|
|
22628
|
+
const networkConnectPromises = networkProviders.map(provider => provider.connect().catch(err => {
|
|
22689
22629
|
if (showSyncProviderInfo) {
|
|
22690
22630
|
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
22691
22631
|
}
|
|
22692
22632
|
}));
|
|
22693
|
-
//
|
|
22633
|
+
// Network sync awaited by loading overlay to show remote workspace hydration
|
|
22694
22634
|
this._networkSyncPromise = networkConnectPromises.length > 0 ? Promise.allSettled(networkConnectPromises).then(() => undefined) : null;
|
|
22695
22635
|
this._isReady = true;
|
|
22696
22636
|
// Find the first provider that exposes awareness (network providers)
|
|
@@ -23348,13 +23288,6 @@ class KritzelObjectMap {
|
|
|
23348
23288
|
this._objectsMap.unobserve(this._objectsObserver);
|
|
23349
23289
|
this._objectsObserver = null;
|
|
23350
23290
|
}
|
|
23351
|
-
if (this._ydoc && this._docUpdateHandler) {
|
|
23352
|
-
this._ydoc.off('update', this._docUpdateHandler);
|
|
23353
|
-
}
|
|
23354
|
-
this._docUpdateHandler = null;
|
|
23355
|
-
this._remoteOrigins.clear();
|
|
23356
|
-
this._remoteChangesCallbacks = [];
|
|
23357
|
-
this._appliedRemoteChanges = false;
|
|
23358
23291
|
// Remove undo manager event listeners
|
|
23359
23292
|
if (this._undoManager) {
|
|
23360
23293
|
if (this._stackItemAddedHandler) {
|
|
@@ -23850,10 +23783,7 @@ class KritzelAppStateMap {
|
|
|
23850
23783
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
23851
23784
|
console.info(`[Kritzel] App-state network providers connecting in background: ${networkProviders.length}`);
|
|
23852
23785
|
}
|
|
23853
|
-
const networkConnectPromises = networkProviders.map(provider => provider
|
|
23854
|
-
.connect()
|
|
23855
|
-
.then(() => provider.whenSynced?.())
|
|
23856
|
-
.catch(err => {
|
|
23786
|
+
const networkConnectPromises = networkProviders.map(provider => provider.connect().catch(err => {
|
|
23857
23787
|
if (showSyncProviderInfo) {
|
|
23858
23788
|
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
23859
23789
|
}
|
|
@@ -27137,8 +27067,8 @@ class KritzelSvgExportHelper {
|
|
|
27137
27067
|
.join('\n ');
|
|
27138
27068
|
const xmlDecl = includeXmlDeclaration ? '<?xml version="1.0" encoding="UTF-8"?>\n' : '';
|
|
27139
27069
|
const defsContent = defs.length > 0 ? `\n <defs>\n ${defs.join('\n ')}\n </defs>` : '';
|
|
27140
|
-
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
27141
|
-
${elements}
|
|
27070
|
+
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
27071
|
+
${elements}
|
|
27142
27072
|
</svg>`;
|
|
27143
27073
|
}
|
|
27144
27074
|
/**
|
|
@@ -27290,8 +27220,8 @@ class KritzelSvgExportHelper {
|
|
|
27290
27220
|
const orient = end === 'start' ? 'auto-start-reverse' : 'auto';
|
|
27291
27221
|
const refX = 0;
|
|
27292
27222
|
const refY = size / 2;
|
|
27293
|
-
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
27294
|
-
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
27223
|
+
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
27224
|
+
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
27295
27225
|
</marker>`;
|
|
27296
27226
|
}
|
|
27297
27227
|
/**
|
|
@@ -27338,10 +27268,10 @@ class KritzelSvgExportHelper {
|
|
|
27338
27268
|
const opacity = path.opacity !== 1 ? ` opacity="${path.opacity}"` : '';
|
|
27339
27269
|
const scale = this.getObjectScale(path);
|
|
27340
27270
|
// Path needs to be wrapped in a g with translation since path.d uses local coordinates
|
|
27341
|
-
return `<g transform="${transform}"${opacity}>
|
|
27342
|
-
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
27343
|
-
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
27344
|
-
</svg>
|
|
27271
|
+
return `<g transform="${transform}"${opacity}>
|
|
27272
|
+
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
27273
|
+
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
27274
|
+
</svg>
|
|
27345
27275
|
</g>`;
|
|
27346
27276
|
}
|
|
27347
27277
|
/**
|
|
@@ -27357,10 +27287,10 @@ class KritzelSvgExportHelper {
|
|
|
27357
27287
|
const scale = this.getObjectScale(line);
|
|
27358
27288
|
const markerStart = line.hasStartArrow ? ` marker-start="url(#${line.startMarkerId})"` : '';
|
|
27359
27289
|
const markerEnd = line.hasEndArrow ? ` marker-end="url(#${line.endMarkerId})"` : '';
|
|
27360
|
-
return `<g transform="${transform}"${opacity}>
|
|
27361
|
-
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
27362
|
-
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
27363
|
-
</svg>
|
|
27290
|
+
return `<g transform="${transform}"${opacity}>
|
|
27291
|
+
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
27292
|
+
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
27293
|
+
</svg>
|
|
27364
27294
|
</g>`;
|
|
27365
27295
|
}
|
|
27366
27296
|
/**
|
|
@@ -27384,18 +27314,18 @@ class KritzelSvgExportHelper {
|
|
|
27384
27314
|
const textHtml = this.prosemirrorToHtml(shape.content, shape, theme);
|
|
27385
27315
|
if (textHtml) {
|
|
27386
27316
|
const fontColor = schema_constants.KritzelColorHelper.resolveThemeColor(shape.fontColor, theme);
|
|
27387
|
-
textContent = `
|
|
27388
|
-
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
27389
|
-
<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;">
|
|
27390
|
-
${textHtml}
|
|
27391
|
-
</div>
|
|
27317
|
+
textContent = `
|
|
27318
|
+
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
27319
|
+
<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;">
|
|
27320
|
+
${textHtml}
|
|
27321
|
+
</div>
|
|
27392
27322
|
</foreignObject>`;
|
|
27393
27323
|
}
|
|
27394
27324
|
}
|
|
27395
|
-
return `<g transform="${transform}"${opacity}>
|
|
27396
|
-
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
27397
|
-
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
27398
|
-
</svg>
|
|
27325
|
+
return `<g transform="${transform}"${opacity}>
|
|
27326
|
+
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
27327
|
+
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
27328
|
+
</svg>
|
|
27399
27329
|
</g>`;
|
|
27400
27330
|
}
|
|
27401
27331
|
/**
|
|
@@ -27426,10 +27356,10 @@ class KritzelSvgExportHelper {
|
|
|
27426
27356
|
// adjusted font-size already accounts for it – keeping both would double-scale
|
|
27427
27357
|
// the content and overflow the foreignObject.
|
|
27428
27358
|
const svgFontSizePx = (text.fontSize * (4 / 3) * (text.scaleFactor || 1) / scale).toFixed(4);
|
|
27429
|
-
return `<g transform="${transform}"${opacity}>
|
|
27430
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
27431
|
-
<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>
|
|
27432
|
-
</foreignObject>
|
|
27359
|
+
return `<g transform="${transform}"${opacity}>
|
|
27360
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
27361
|
+
<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>
|
|
27362
|
+
</foreignObject>
|
|
27433
27363
|
</g>`;
|
|
27434
27364
|
}
|
|
27435
27365
|
/**
|
|
@@ -27463,9 +27393,9 @@ class KritzelSvgExportHelper {
|
|
|
27463
27393
|
return `<tspan x="0" y="${y}" xml:space="preserve">${this.escapeHtml(line)}</tspan>`;
|
|
27464
27394
|
})
|
|
27465
27395
|
.join('');
|
|
27466
|
-
return `<g transform="${transform}"${opacity}>
|
|
27467
|
-
${bgRect}
|
|
27468
|
-
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
27396
|
+
return `<g transform="${transform}"${opacity}>
|
|
27397
|
+
${bgRect}
|
|
27398
|
+
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
27469
27399
|
</g>`;
|
|
27470
27400
|
}
|
|
27471
27401
|
/**
|
|
@@ -27493,8 +27423,8 @@ class KritzelSvgExportHelper {
|
|
|
27493
27423
|
const width = image.totalWidth / scale;
|
|
27494
27424
|
const height = image.totalHeight / scale;
|
|
27495
27425
|
const href = imageDataUrls?.get(image.id) || image.resolvedSrc || image.src || '';
|
|
27496
|
-
return `<g transform="${transform}"${opacity}>
|
|
27497
|
-
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
27426
|
+
return `<g transform="${transform}"${opacity}>
|
|
27427
|
+
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
27498
27428
|
</g>`;
|
|
27499
27429
|
}
|
|
27500
27430
|
/**
|
|
@@ -27514,19 +27444,19 @@ class KritzelSvgExportHelper {
|
|
|
27514
27444
|
if (rasterSafeForCanvas) {
|
|
27515
27445
|
// PNG export: render placeholder rect (foreignObject doesn't rasterize to PNG well)
|
|
27516
27446
|
console.warn('[KritzelCustomElement SVG Export] Custom elements do not serialize well to PNG. Use SVG export or screenshot instead.');
|
|
27517
|
-
return `<g transform="${transform}"${opacity}>
|
|
27518
|
-
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
27519
|
-
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Custom Element]</text>
|
|
27447
|
+
return `<g transform="${transform}"${opacity}>
|
|
27448
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
27449
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Custom Element]</text>
|
|
27520
27450
|
</g>`;
|
|
27521
27451
|
}
|
|
27522
27452
|
// SVG export: use foreignObject to embed HTML
|
|
27523
27453
|
const html = obj.element?.outerHTML || '<div style="border:1px dashed #ccc">Empty</div>';
|
|
27524
|
-
return `<g transform="${transform}"${opacity}>
|
|
27525
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
27526
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
27527
|
-
${html}
|
|
27528
|
-
</div>
|
|
27529
|
-
</foreignObject>
|
|
27454
|
+
return `<g transform="${transform}"${opacity}>
|
|
27455
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
27456
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
27457
|
+
${html}
|
|
27458
|
+
</div>
|
|
27459
|
+
</foreignObject>
|
|
27530
27460
|
</g>`;
|
|
27531
27461
|
}
|
|
27532
27462
|
/**
|
|
@@ -27546,8 +27476,8 @@ class KritzelSvgExportHelper {
|
|
|
27546
27476
|
return '';
|
|
27547
27477
|
}
|
|
27548
27478
|
const opacity = group.opacity !== 1 ? ` opacity="${group.opacity}"` : '';
|
|
27549
|
-
return `<g${opacity}>
|
|
27550
|
-
${children}
|
|
27479
|
+
return `<g${opacity}>
|
|
27480
|
+
${children}
|
|
27551
27481
|
</g>`;
|
|
27552
27482
|
}
|
|
27553
27483
|
/**
|
|
@@ -27957,7 +27887,7 @@ const KritzelEngine = class {
|
|
|
27957
27887
|
contextMenuStateChange;
|
|
27958
27888
|
/** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
|
|
27959
27889
|
loadingChange;
|
|
27960
|
-
/** Emitted
|
|
27890
|
+
/** Emitted when remote workspace synchronization is in progress. */
|
|
27961
27891
|
syncingChange;
|
|
27962
27892
|
forceUpdate = 0;
|
|
27963
27893
|
isSyncing = false;
|
|
@@ -29538,13 +29468,18 @@ const KritzelEngine = class {
|
|
|
29538
29468
|
_syncConfigRevision = 0;
|
|
29539
29469
|
_assetStorageConfigRevision = 0;
|
|
29540
29470
|
_isWorkspaceLoading = false;
|
|
29471
|
+
_syncingRequestId = 0;
|
|
29472
|
+
_syncingShowTimeout = null;
|
|
29473
|
+
_syncingHideTimeout = null;
|
|
29474
|
+
_syncingVisibleSince = null;
|
|
29475
|
+
_syncingShowDelayMs = 300;
|
|
29476
|
+
_syncingMinimumVisibleMs = 500;
|
|
29541
29477
|
_hasLoggedUnlicensedWelcomeBanner = false;
|
|
29542
29478
|
_previousVisibleCustomElements = new Set();
|
|
29543
29479
|
_revealedImageKeys = new Set();
|
|
29544
29480
|
_sceneBootstrapOpacity = 1;
|
|
29545
29481
|
_sceneBootstrapTransitionEnabled = false;
|
|
29546
29482
|
_sceneBootstrapTransitionTimer = null;
|
|
29547
|
-
_remoteChangesUnsubscribe = null;
|
|
29548
29483
|
_defaultUndoState = {
|
|
29549
29484
|
canUndo: false,
|
|
29550
29485
|
canRedo: false,
|
|
@@ -29561,16 +29496,65 @@ const KritzelEngine = class {
|
|
|
29561
29496
|
this.core.store.state.isLoading = this._isWorkspaceLoading || this.isLoading;
|
|
29562
29497
|
this.loadingChange.emit(this.core.store.state.isLoading);
|
|
29563
29498
|
}
|
|
29564
|
-
|
|
29565
|
-
|
|
29499
|
+
beginSyncingRequest() {
|
|
29500
|
+
this._syncingRequestId++;
|
|
29501
|
+
this.clearSyncingShowTimeout();
|
|
29502
|
+
this.clearSyncingHideTimeout();
|
|
29503
|
+
return this._syncingRequestId;
|
|
29504
|
+
}
|
|
29505
|
+
syncSyncingState(isSyncing, requestId) {
|
|
29506
|
+
if (requestId !== this._syncingRequestId) {
|
|
29566
29507
|
return;
|
|
29567
29508
|
}
|
|
29568
|
-
|
|
29569
|
-
|
|
29509
|
+
if (isSyncing) {
|
|
29510
|
+
this.clearSyncingHideTimeout();
|
|
29511
|
+
if (this.isSyncing || this._syncingShowTimeout !== null) {
|
|
29512
|
+
return;
|
|
29513
|
+
}
|
|
29514
|
+
this._syncingShowTimeout = setTimeout(() => {
|
|
29515
|
+
this._syncingShowTimeout = null;
|
|
29516
|
+
if (requestId !== this._syncingRequestId || this.isSyncing) {
|
|
29517
|
+
return;
|
|
29518
|
+
}
|
|
29519
|
+
this.isSyncing = true;
|
|
29520
|
+
this._syncingVisibleSince = Date.now();
|
|
29521
|
+
this.syncingChange.emit(true);
|
|
29522
|
+
}, this._syncingShowDelayMs);
|
|
29523
|
+
return;
|
|
29524
|
+
}
|
|
29525
|
+
this.clearSyncingShowTimeout();
|
|
29526
|
+
if (!this.isSyncing) {
|
|
29527
|
+
return;
|
|
29528
|
+
}
|
|
29529
|
+
this.clearSyncingHideTimeout();
|
|
29530
|
+
const elapsedMs = Date.now() - (this._syncingVisibleSince ?? Date.now());
|
|
29531
|
+
const remainingVisibleMs = Math.max(0, this._syncingMinimumVisibleMs - elapsedMs);
|
|
29532
|
+
if (remainingVisibleMs === 0) {
|
|
29533
|
+
this.finishSyncingState(requestId);
|
|
29534
|
+
return;
|
|
29535
|
+
}
|
|
29536
|
+
this._syncingHideTimeout = setTimeout(() => this.finishSyncingState(requestId), remainingVisibleMs);
|
|
29537
|
+
}
|
|
29538
|
+
finishSyncingState(requestId) {
|
|
29539
|
+
this._syncingHideTimeout = null;
|
|
29540
|
+
if (requestId !== this._syncingRequestId || !this.isSyncing) {
|
|
29541
|
+
return;
|
|
29542
|
+
}
|
|
29543
|
+
this.isSyncing = false;
|
|
29544
|
+
this._syncingVisibleSince = null;
|
|
29545
|
+
this.syncingChange.emit(false);
|
|
29546
|
+
}
|
|
29547
|
+
clearSyncingShowTimeout() {
|
|
29548
|
+
if (this._syncingShowTimeout !== null) {
|
|
29549
|
+
clearTimeout(this._syncingShowTimeout);
|
|
29550
|
+
this._syncingShowTimeout = null;
|
|
29551
|
+
}
|
|
29570
29552
|
}
|
|
29571
|
-
|
|
29572
|
-
this.
|
|
29573
|
-
|
|
29553
|
+
clearSyncingHideTimeout() {
|
|
29554
|
+
if (this._syncingHideTimeout !== null) {
|
|
29555
|
+
clearTimeout(this._syncingHideTimeout);
|
|
29556
|
+
this._syncingHideTimeout = null;
|
|
29557
|
+
}
|
|
29574
29558
|
}
|
|
29575
29559
|
isNetworkAvailable() {
|
|
29576
29560
|
return typeof navigator !== 'undefined' && navigator.onLine;
|
|
@@ -29683,7 +29667,7 @@ const KritzelEngine = class {
|
|
|
29683
29667
|
disconnectedCallback() {
|
|
29684
29668
|
this.throttledPointerMoveMulti.cancel();
|
|
29685
29669
|
this._revealedImageKeys.clear();
|
|
29686
|
-
this.
|
|
29670
|
+
this.beginSyncingRequest();
|
|
29687
29671
|
if (this._sceneBootstrapTransitionTimer !== null) {
|
|
29688
29672
|
clearTimeout(this._sceneBootstrapTransitionTimer);
|
|
29689
29673
|
this._sceneBootstrapTransitionTimer = null;
|
|
@@ -29933,12 +29917,27 @@ const KritzelEngine = class {
|
|
|
29933
29917
|
}
|
|
29934
29918
|
this._isWorkspaceLoading = true;
|
|
29935
29919
|
this.syncLoadingState();
|
|
29920
|
+
const syncingRequestId = this.beginSyncingRequest();
|
|
29936
29921
|
const initializationPromise = this.core.initializeWorkspace(workspace, options);
|
|
29937
29922
|
this._workspaceInitializationPromise = initializationPromise;
|
|
29938
29923
|
this._workspaceInitializationTargetKey = targetKey;
|
|
29939
29924
|
try {
|
|
29940
29925
|
await initializationPromise;
|
|
29941
|
-
|
|
29926
|
+
// Track remote sync in the background without blocking the loading overlay.
|
|
29927
|
+
const initializedObjects = this.core.store.objects;
|
|
29928
|
+
const networkSyncPromise = initializedObjects?.whenNetworkSynced();
|
|
29929
|
+
if (networkSyncPromise && this.isNetworkAvailable()) {
|
|
29930
|
+
this.syncSyncingState(true, syncingRequestId);
|
|
29931
|
+
void networkSyncPromise.finally(() => {
|
|
29932
|
+
// Only clear syncing for the currently active object map.
|
|
29933
|
+
if (this.core.store.objects === initializedObjects) {
|
|
29934
|
+
this.syncSyncingState(false, syncingRequestId);
|
|
29935
|
+
}
|
|
29936
|
+
});
|
|
29937
|
+
}
|
|
29938
|
+
else {
|
|
29939
|
+
this.syncSyncingState(false, syncingRequestId);
|
|
29940
|
+
}
|
|
29942
29941
|
}
|
|
29943
29942
|
finally {
|
|
29944
29943
|
// Only the most recent init clears loading state to prevent race conditions
|
|
@@ -29950,38 +29949,6 @@ const KritzelEngine = class {
|
|
|
29950
29949
|
}
|
|
29951
29950
|
}
|
|
29952
29951
|
}
|
|
29953
|
-
/**
|
|
29954
|
-
* Reports syncing only while remote data is actually being reconciled into the
|
|
29955
|
-
* active workspace. Yjs suppresses updates that carry nothing new, so a workspace
|
|
29956
|
-
* that already matches the remote never reports syncing at all.
|
|
29957
|
-
*/
|
|
29958
|
-
trackRemoteSynchronization() {
|
|
29959
|
-
this.clearRemoteChangesSubscription();
|
|
29960
|
-
this.syncSyncingState(false);
|
|
29961
|
-
const initializedObjects = this.core.store.objects;
|
|
29962
|
-
if (!initializedObjects?.hasNetworkSyncProvider || !this.isNetworkAvailable()) {
|
|
29963
|
-
return;
|
|
29964
|
-
}
|
|
29965
|
-
if (initializedObjects.supportsRemoteChangeDetection) {
|
|
29966
|
-
this._remoteChangesUnsubscribe = initializedObjects.onRemoteChangesApplied(() => {
|
|
29967
|
-
if (this.core.store.objects !== initializedObjects) {
|
|
29968
|
-
return;
|
|
29969
|
-
}
|
|
29970
|
-
this.syncSyncingState(true);
|
|
29971
|
-
});
|
|
29972
|
-
}
|
|
29973
|
-
else {
|
|
29974
|
-
// Custom providers without an update origin cannot be diffed, so fall back to reporting the whole handshake.
|
|
29975
|
-
this.syncSyncingState(true);
|
|
29976
|
-
}
|
|
29977
|
-
void initializedObjects.whenNetworkSynced().finally(() => {
|
|
29978
|
-
if (this.core.store.objects !== initializedObjects) {
|
|
29979
|
-
return;
|
|
29980
|
-
}
|
|
29981
|
-
this.clearRemoteChangesSubscription();
|
|
29982
|
-
this.syncSyncingState(false);
|
|
29983
|
-
});
|
|
29984
|
-
}
|
|
29985
29952
|
emitObjectsChange() {
|
|
29986
29953
|
const objectsMap = this.core.store.objects;
|
|
29987
29954
|
if (!objectsMap) {
|
|
@@ -30773,7 +30740,7 @@ const KritzelExport = class {
|
|
|
30773
30740
|
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 })));
|
|
30774
30741
|
}
|
|
30775
30742
|
render() {
|
|
30776
|
-
return (index.h(index.Host, { key: '
|
|
30743
|
+
return (index.h(index.Host, { key: '68aef5d406aa819577ca773ea3616b93b9dfc9e7' }, index.h("kritzel-dialog", { key: '5072ac78ce417ed4d057d44f5532c7ac5c0f5dd6', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, index.h("div", { key: '8642b3f39b20a5434a8eb5346fb4a71b9aca39da', class: "export-content" }, index.h("kritzel-pill-tabs", { key: 'b45da668b2f777a826de32ff2fde51e72f6f3deb', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport()), index.h("div", { key: '594a6ade24ecd869e23e57228ad2f5eff9ee90a8', slot: "footer" }, index.h("button", { key: '187c56cfd5f00acedb1dfd337a192495a19b5362', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
|
|
30777
30744
|
}
|
|
30778
30745
|
};
|
|
30779
30746
|
KritzelExport.style = kritzelExportCss();
|
|
@@ -30788,7 +30755,7 @@ const KritzelFont = class {
|
|
|
30788
30755
|
size = 24;
|
|
30789
30756
|
color = '#000000';
|
|
30790
30757
|
render() {
|
|
30791
|
-
return (index.h(index.Host, { key: '
|
|
30758
|
+
return (index.h(index.Host, { key: '8e4cf962a3456fb293faa678725e0c86af08bf49' }, index.h("div", { key: 'acf6986196dffd5c00b7edefa9453259149bf3cf', class: "font-preview", style: {
|
|
30792
30759
|
fontFamily: this.fontFamily,
|
|
30793
30760
|
fontSize: `${this.size}px`,
|
|
30794
30761
|
color: this.color
|
|
@@ -30838,7 +30805,7 @@ const KritzelFontFamily = class {
|
|
|
30838
30805
|
label: option.label,
|
|
30839
30806
|
style: { fontFamily: option.cssFontFamily ?? option.value },
|
|
30840
30807
|
}));
|
|
30841
|
-
return (index.h(index.Host, { key: '
|
|
30808
|
+
return (index.h(index.Host, { key: '42b2805b1d2df47a1b2336dffac32ee50740809e' }, index.h("kritzel-dropdown", { key: '3e1f019b2ecacea061f687c93f4fdd6a384b93b7', options: dropdownOptions, value: this.selectedFontFamily, onValueChanged: this.handleDropdownValueChange, selectStyles: { fontFamily: selectedFontFamily } })));
|
|
30842
30809
|
}
|
|
30843
30810
|
static get watchers() { return {
|
|
30844
30811
|
"fontOptions": [{
|
|
@@ -30872,7 +30839,7 @@ const KritzelFontSize = class {
|
|
|
30872
30839
|
render() {
|
|
30873
30840
|
const color = 'var(--kritzel-global-text-primary)';
|
|
30874
30841
|
const sizes = this.sizes ?? [];
|
|
30875
|
-
return (index.h(index.Host, { key: '
|
|
30842
|
+
return (index.h(index.Host, { key: '18f23b3d58c708a2f385ec539b6a2f02fc33c12a' }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
30876
30843
|
'size-container': true,
|
|
30877
30844
|
'selected': this.selectedSize === size,
|
|
30878
30845
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, index.h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -30939,7 +30906,7 @@ const KritzelInput = class {
|
|
|
30939
30906
|
this.valueChange.emit(input.value);
|
|
30940
30907
|
};
|
|
30941
30908
|
render() {
|
|
30942
|
-
return (index.h(index.Host, { key: '
|
|
30909
|
+
return (index.h(index.Host, { key: 'b79679b0c9af30caa31423bdadb99819713c567e' }, index.h("div", { key: '7e54ab560bf19c41cc581e90777f3196931b727a', class: "input-container" }, this.label && index.h("label", { key: '9d4698d1c145a6aa481b4723d278ceb6e4909344', class: "input-label" }, this.label), index.h("div", { key: 'b4346d79a9b04ca3e663b490b837af3e8a838075', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, index.h("input", { key: '686abee5f9444b5227c634bab9743f32d964d74d', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && index.h("span", { key: 'd0daea49eb781f6c0e6ca310b5f0493e96be5de6', class: "input-suffix" }, this.suffix)))));
|
|
30943
30910
|
}
|
|
30944
30911
|
static get watchers() { return {
|
|
30945
30912
|
"value": [{
|
|
@@ -31021,10 +30988,10 @@ const KritzelLineEndings = class {
|
|
|
31021
30988
|
render() {
|
|
31022
30989
|
const startEnding = this.getStartEnding();
|
|
31023
30990
|
const endEnding = this.getEndEnding();
|
|
31024
|
-
return (index.h(index.Host, { key: '
|
|
30991
|
+
return (index.h(index.Host, { key: '81e3262408d26a06acb2677698832b89651292a1' }, index.h("div", { key: '85c67f948075b2d58abfbd9d168a84c89554e81f', class: "endings-section" }, index.h("div", { key: 'd10a0b1c58fd06926a83cd78e213417aca28d01c', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
31025
30992
|
'ending-option': true,
|
|
31026
30993
|
'selected': startEnding === type,
|
|
31027
|
-
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: '
|
|
30994
|
+
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: 'fd99875f3cefa8c4e36e106e836088fa61c75432', class: "endings-section" }, index.h("div", { key: 'dbcd0a32f278cc0d0317913827034f912a14d2b4', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
31028
30995
|
'ending-option': true,
|
|
31029
30996
|
'selected': endEnding === type,
|
|
31030
30997
|
}, onClick: () => this.handleEndChange(type), title: type === 'none' ? 'No end arrow' : `${type} end arrow` }, this.renderEndingIcon(type, false))))))));
|
|
@@ -31047,7 +31014,7 @@ const KritzelLoadingOverlay = class {
|
|
|
31047
31014
|
*/
|
|
31048
31015
|
text = 'Loading...';
|
|
31049
31016
|
render() {
|
|
31050
|
-
return (index.h(index.Host, { key: '
|
|
31017
|
+
return (index.h(index.Host, { key: 'bba8ce825e41dff170d9552c28ac996249639ff3' }, index.h("div", { key: 'af98ab01de836fb6c718f5ceda4a490d91231e66', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("span", { key: '7c04c6abcb445c34f9a036e1797605ef7d575031', class: "loading-spinner" }), this.text)));
|
|
31051
31018
|
}
|
|
31052
31019
|
};
|
|
31053
31020
|
KritzelLoadingOverlay.style = kritzelLoadingOverlayCss();
|
|
@@ -31099,7 +31066,7 @@ const KritzelLoginDialog = class {
|
|
|
31099
31066
|
this.dialogClosed.emit();
|
|
31100
31067
|
};
|
|
31101
31068
|
render() {
|
|
31102
|
-
return (index.h(index.Host, { key: '
|
|
31069
|
+
return (index.h(index.Host, { key: 'd805664c63cf0d21c827cd8c4f4e52aeeab55773' }, index.h("kritzel-dialog", { key: '00be052688de8289cc7940fad83200c4d961d765', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '0dcc0c3e8ae4c058ee76e06d988bd120759f52e1', class: "login-content" }, this.subtitle && (index.h("p", { key: 'e9a53ce3a50c01426b834cce85438ac676f26ca2', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: 'dead2054cf268e00e5c4be29a0a953d4dd28db71', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
|
|
31103
31070
|
'provider-button': true,
|
|
31104
31071
|
'is-loading': this.loadingProvider === provider.name,
|
|
31105
31072
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -31205,15 +31172,15 @@ const KritzelMasterDetail = class {
|
|
|
31205
31172
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
31206
31173
|
const panelId = 'master-detail-panel';
|
|
31207
31174
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
31208
|
-
return (index.h(index.Host, { key: '
|
|
31175
|
+
return (index.h(index.Host, { key: 'f54d66ffc0330fa9dc4294f6a21810e3dd5db495' }, index.h("div", { key: '8f786b099dd5d4b0efcc45cbfb38f37916f60126', class: {
|
|
31209
31176
|
'master-detail-container': true,
|
|
31210
31177
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
31211
|
-
} }, index.h("nav", { key: '
|
|
31178
|
+
} }, index.h("nav", { key: '1a5db5ba8ba393ff7f29b9d438c59acbb6fbd849', 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: {
|
|
31212
31179
|
'menu-item': true,
|
|
31213
31180
|
'is-selected': item.id === this.selectedItemId,
|
|
31214
31181
|
'is-disabled': !!item.disabled,
|
|
31215
31182
|
'is-focused': index$1 === this.focusedIndex,
|
|
31216
|
-
}, 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: '
|
|
31183
|
+
}, 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: '22943ef64af7b63780fc4a25d0009443b5e1b0ba', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, index.h("button", { key: '777b26506f739290be2d2267c1bc1381d59475fa', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, index.h("kritzel-icon", { key: '96fe6b08965d7c5c41673bae0a5c5cc12f575a8f', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), index.h("slot", { key: '985869d89bb10860e4a4bf221523376b7111ec1d' })))));
|
|
31217
31184
|
}
|
|
31218
31185
|
static get watchers() { return {
|
|
31219
31186
|
"selectedItemId": [{
|
|
@@ -31286,7 +31253,7 @@ const KritzelMenu = class {
|
|
|
31286
31253
|
this.itemCloseChildMenu.emit(event.detail);
|
|
31287
31254
|
};
|
|
31288
31255
|
render() {
|
|
31289
|
-
return (index.h(index.Host, { key: '
|
|
31256
|
+
return (index.h(index.Host, { key: '9ab5256e8888aa48ab6018ffc1109f9614075772', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && index.h("div", { key: '05415b8e7559af7bee51a2dcc62e8ed016fbfc42', 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 })))));
|
|
31290
31257
|
}
|
|
31291
31258
|
};
|
|
31292
31259
|
KritzelMenu.style = kritzelMenuCss();
|
|
@@ -31391,12 +31358,12 @@ const KritzelMenuItem = class {
|
|
|
31391
31358
|
];
|
|
31392
31359
|
}
|
|
31393
31360
|
render() {
|
|
31394
|
-
return (index.h(index.Host, { key: '
|
|
31361
|
+
return (index.h(index.Host, { key: '9fd327cadf3c28f51a28d174a1c888c3891cbcbd', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
31395
31362
|
'selected': this.item.isSelected,
|
|
31396
31363
|
'editing': this.item.isEditing,
|
|
31397
31364
|
'disabled': this.item.isDisabled,
|
|
31398
31365
|
'child-open': this.item.isChildMenuOpen,
|
|
31399
|
-
}, onClick: this.handleItemSelect }, index.h("div", { key: '
|
|
31366
|
+
}, onClick: this.handleItemSelect }, index.h("div", { key: '080c4fb6e04d6c88d7fa1410a5b86caa4952ed07', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
31400
31367
|
}
|
|
31401
31368
|
static get watchers() { return {
|
|
31402
31369
|
"item": [{
|
|
@@ -31548,7 +31515,7 @@ const KritzelMoreMenu = class {
|
|
|
31548
31515
|
this.closeMenu();
|
|
31549
31516
|
};
|
|
31550
31517
|
render() {
|
|
31551
|
-
return (index.h(index.Host, { key: '
|
|
31518
|
+
return (index.h(index.Host, { key: '1c7299e83343fee3daedb5abceb3a341071237db', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, index.h("div", { key: '1b7f12ee8679d03ef3648cbda4bda16e692a322f', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: '71a6270b3b114f1fb030df57075f4adf215914a4', 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: 'c5ef80ec7d512a24cd45762397ca5c6727d260b3', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: '9e467825c1c8e81a35403e1d24be0badf1892548', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '6e629208a46247d0f5190c376b3feb5dbc54209a', items: this.resolveMenuLabels(this.visibleItems), onItemSelect: this.handleMenuItemSelect })))));
|
|
31552
31519
|
}
|
|
31553
31520
|
static get watchers() { return {
|
|
31554
31521
|
"items": [{
|
|
@@ -31720,7 +31687,7 @@ const KritzelNumericInput = class {
|
|
|
31720
31687
|
this.valueChange.emit(newValue);
|
|
31721
31688
|
};
|
|
31722
31689
|
render() {
|
|
31723
|
-
return (index.h(index.Host, { key: '
|
|
31690
|
+
return (index.h(index.Host, { key: '7af3efe94c98934dcfe701c516ffc7cea2b4fde9' }, index.h("div", { key: '81347ea86a62f72b5b7662d90670e2ace98b16e7', class: "input-container" }, this.label && index.h("label", { key: '35b7650a3c4d1b93dbcb763b0c8f3767e3b519ac', class: "input-label" }, this.label), index.h("div", { key: '691ade138e5ba2ef51a76b1fc54da51fb7dd7389', class: "input-wrapper" }, index.h("input", { key: '58445c41cc8be438d1065787d375fb9d271f3873', 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: 'c669fc612696c555b96f046a8c70e75e9650af23', class: "spinner-buttons" }, index.h("button", { key: 'ae904cc60925d48120405f74d656ee9cbf312d70', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, index.h("svg", { key: '4a4964336820cfc2128b98bf245556425919dfb6', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'f305136d337690b0eaa39983d26a67454e4862da', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("button", { key: 'c90f2d9a3deac66dc577142f87f73aef491e5f25', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, index.h("svg", { key: '2a3e33c55b6ace48f15ec56d78c6aab782c64520', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: 'f327413078824800ad061126417a8f25578ba2de', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
31724
31691
|
}
|
|
31725
31692
|
static get watchers() { return {
|
|
31726
31693
|
"value": [{
|
|
@@ -31730,7 +31697,7 @@ const KritzelNumericInput = class {
|
|
|
31730
31697
|
};
|
|
31731
31698
|
KritzelNumericInput.style = kritzelNumericInputCss();
|
|
31732
31699
|
|
|
31733
|
-
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(
|
|
31700
|
+
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))}`;
|
|
31734
31701
|
|
|
31735
31702
|
const KritzelOpacitySlider = class {
|
|
31736
31703
|
constructor(hostRef) {
|
|
@@ -31759,7 +31726,7 @@ const KritzelOpacitySlider = class {
|
|
|
31759
31726
|
}
|
|
31760
31727
|
render() {
|
|
31761
31728
|
const percentage = this.getPercentage();
|
|
31762
|
-
return (index.h(index.Host, { key: '
|
|
31729
|
+
return (index.h(index.Host, { key: 'f1f0dad662e93506ddfc99e648a3cedc841de730' }, index.h("div", { key: '7b495a97a92f8fa8b28c33323d60b790781c7271', class: "opacity-container" }, index.h("div", { key: 'c41d3b0543a3bf78dc15602e0439f56aef21ddbe', class: "slider-wrapper" }, index.h("input", { key: 'd9ba313d84b91a0f9312ef1ad9fe67cc231073c9', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
31763
31730
|
'--slider-progress': `${percentage}%`,
|
|
31764
31731
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
31765
31732
|
} })))));
|
|
@@ -31824,7 +31791,7 @@ const KritzelPillTabs = class {
|
|
|
31824
31791
|
buttons?.[newIndex]?.focus();
|
|
31825
31792
|
}
|
|
31826
31793
|
render() {
|
|
31827
|
-
return (index.h(index.Host, { key: '
|
|
31794
|
+
return (index.h(index.Host, { key: '16fce447fb7db0539ba115ef19771ac78f30a302' }, index.h("div", { key: '95487da922621b18c1ec422eb0d464131dbc28d3', class: "pill-tabs-container", role: "tablist" }, this.tabs.map((tab, index$1) => (index.h("button", { key: tab.id, class: {
|
|
31828
31795
|
'pill-tab': true,
|
|
31829
31796
|
'selected': this.value === tab.id,
|
|
31830
31797
|
}, 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)))))));
|
|
@@ -32112,7 +32079,7 @@ const KritzelPortal = class {
|
|
|
32112
32079
|
this.portal.style.visibility = 'visible';
|
|
32113
32080
|
}
|
|
32114
32081
|
render() {
|
|
32115
|
-
return (index.h(index.Host, { key: '
|
|
32082
|
+
return (index.h(index.Host, { key: '3cdb321c2292fc7927a89efef4f3e4e37d68ac8f', style: { display: this.anchor ? 'block' : 'none' } }, index.h("slot", { key: '54a41f7983405f23e305791bc42513f59c027733' })));
|
|
32116
32083
|
}
|
|
32117
32084
|
static get watchers() { return {
|
|
32118
32085
|
"anchor": [{
|
|
@@ -32126,7 +32093,7 @@ const KritzelPortal = class {
|
|
|
32126
32093
|
* This file is auto-generated by the version bump scripts.
|
|
32127
32094
|
* Do not modify manually.
|
|
32128
32095
|
*/
|
|
32129
|
-
const KRITZEL_VERSION = '0.4.
|
|
32096
|
+
const KRITZEL_VERSION = '0.4.24';
|
|
32130
32097
|
|
|
32131
32098
|
const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-tab-panel{display:none}.settings-tab-panel.is-active{display:block}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}.shortcuts-list{display:flex;flex-direction:column;gap:24px}.shortcuts-category{display:flex;flex-direction:column;gap:8px}.shortcuts-category-title{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.shortcuts-group{display:flex;flex-direction:column;gap:4px}.shortcut-item{display:flex;justify-content:space-between;align-items:center;padding:6px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-item-bg, rgba(0, 0, 0, 0.02))}.shortcut-label{font-size:14px;color:var(--kritzel-settings-content-text-color, #666666)}.shortcut-key{font-family:monospace;font-size:12px;padding:2px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-key-bg, #f0f0f0);color:var(--kritzel-settings-shortcut-key-color, #333333);border:1px solid var(--kritzel-settings-shortcut-key-border, #ddd)}`;
|
|
32132
32099
|
|
|
@@ -32338,7 +32305,7 @@ const KritzelSettings = class {
|
|
|
32338
32305
|
return (index.h("div", { class: "settings-categories-wrapper" }, index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'general' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.general.title', 'General Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), index.h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), index.h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), index.h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), index.h("p", { class: "settings-description" }, this.t('settings.general.lockDrawingScale.description', 'When enabled, drawn objects maintain a fixed visual size regardless of the current zoom level.')), index.h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'viewport' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.minZoom.description', 'Sets the minimum zoom level. Lower values allow zooming out further to see more of the canvas.')), index.h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.maxZoom.description', 'Sets the maximum zoom level. Higher values allow zooming in closer for detailed work.')), index.h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryLeft.description', 'Left boundary in world coordinates. Set to limit how far left the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryRight.description', 'Right boundary in world coordinates. Set to limit how far right the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryTop.description', 'Top boundary in world coordinates. Set to limit how far up the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), index.h("p", { class: "settings-description" }, this.t('settings.viewport.boundaryBottom.description', 'Bottom boundary in world coordinates. Set to limit how far down the viewport can pan.')), index.h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'shortcuts' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), index.h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category", key: category }, index.h("h4", { class: "shortcuts-category-title" }, category), index.h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (index.h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, index.h("span", { class: "shortcut-label" }, shortcut.label), index.h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut)))))))))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'developer' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.developer.title', 'Developer Options')), index.h("div", { class: "settings-group" }, index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), index.h("div", { class: "settings-item" }, index.h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), index.h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), index.h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') }))))), index.h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'about' } }, index.h("div", { class: "settings-content" }, index.h("h3", null, this.t('settings.about.title', 'About')), index.h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), index.h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), index.h("p", { class: "version-info" }, "App-State Schema v", schema_constants.CURRENT_APP_STATE_SCHEMA_VERSION), index.h("p", { class: "version-info" }, "Workspace Schema v", schema_constants.CURRENT_WORKSPACE_SCHEMA_VERSION)))));
|
|
32339
32306
|
}
|
|
32340
32307
|
render() {
|
|
32341
|
-
return (index.h(index.Host, { key: '
|
|
32308
|
+
return (index.h(index.Host, { key: '830e1761493f6a45dfc8d7a63e260de00418c219' }, index.h("kritzel-dialog", { key: '35bebb215d583ee21b658c5a926335c6c4ffbbeb', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: '0bfbe1a9de453b9282a4a787aaa243f50c2af620', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
32342
32309
|
}
|
|
32343
32310
|
static get watchers() { return {
|
|
32344
32311
|
"settings": [{
|
|
@@ -32371,10 +32338,10 @@ const KritzelShapeFill = class {
|
|
|
32371
32338
|
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" })));
|
|
32372
32339
|
}
|
|
32373
32340
|
render() {
|
|
32374
|
-
return (index.h(index.Host, { key: '
|
|
32341
|
+
return (index.h(index.Host, { key: 'ec214708dd4210e0c36734cb81fba76849114f9b' }, index.h("div", { key: 'd64bacdb7c50b31f3c460bdf2e939b4159d4d000', class: "fill-row" }, index.h("button", { key: '812735be08265145a13ab116e7153fd684f8b77f', class: {
|
|
32375
32342
|
'fill-option': true,
|
|
32376
32343
|
'selected': this.value === 'transparent',
|
|
32377
|
-
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: '
|
|
32344
|
+
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: 'cb5caf2db8aece4bef2eebca37e7ac36383bb450', class: {
|
|
32378
32345
|
'fill-option': true,
|
|
32379
32346
|
'selected': this.value === 'filled',
|
|
32380
32347
|
}, onClick: () => this.handleFillChange('filled'), title: "Filled background" }, this.renderFillIcon('filled')))));
|
|
@@ -35578,9 +35545,9 @@ const KritzelShareDialog = class {
|
|
|
35578
35545
|
this.dialogClosed.emit();
|
|
35579
35546
|
};
|
|
35580
35547
|
render() {
|
|
35581
|
-
return (index.h(index.Host, { key: '
|
|
35548
|
+
return (index.h(index.Host, { key: '0e6a5c0b25595499bc676008b22a6b27752666f3' }, index.h("kritzel-dialog", { key: '1770c3cf05e2ff488872da0db990d119f6903f26', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, index.h("div", { key: 'ac629b3c4078c121009d64d7ba29ca8cc0fd7d64', class: "share-content" }, index.h("div", { key: 'c31fd9bcec831b9105a9784c0764b7d4773fc571', class: "share-section" }, index.h("div", { key: '1e1177dc959ca3e8e4447e6eda4ed4bf7f2faaff', class: "share-row" }, index.h("div", { key: 'b82c3a22f22291f2a79b0ebc98825fbc35e849fe', class: "share-label-group" }, index.h("label", { key: 'f4551050cb0434896f29524b540a7222f48085f2', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), index.h("p", { key: '13ae0f33238041ea949bdd55ac5ba271c58fbdc5', class: "share-description" }, this.internalIsPublic
|
|
35582
35549
|
? (this.terms['share.linkSharing.enabledDescription'] ?? 'Anyone with the link can access this workspace.')
|
|
35583
|
-
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '
|
|
35550
|
+
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '9e7b75fe3ae7994fae8a498f1654636481365768', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (index.h("div", { key: '1fb6f344bc897284c7d942aeddc77968f7af0509', class: "share-section" }, index.h("div", { key: '23b4889472eeb7c36c5ebf3655883346cb32bf6c', class: "share-url-container" }, index.h("input", { key: 'ed5b25430b5013c453ea829ce328a5b4adafd2d9', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: 'ba5b067993e0fab26b149057a4e70f394525cc90', 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: '3f684e493506b62d5c5b32f991c2855f64302e29', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (index.h("div", { key: 'a6314296e3301a1d487d34573fcf581a307cebf4', class: "share-qr-container" }, index.h("img", { key: '7521ce575728d0418564dc2c407381a536053394', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
|
|
35584
35551
|
}
|
|
35585
35552
|
static get watchers() { return {
|
|
35586
35553
|
"isPublic": [{
|
|
@@ -35621,7 +35588,7 @@ const KritzelSlideToggle = class {
|
|
|
35621
35588
|
}
|
|
35622
35589
|
};
|
|
35623
35590
|
render() {
|
|
35624
|
-
return (index.h(index.Host, { key: '
|
|
35591
|
+
return (index.h(index.Host, { key: 'd92f521cf1c7c16db079416dd0943c7bc4f721e9', 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: 'e6086cf26ff3065d1215c548f30318414f710798', class: "toggle-track" }, index.h("div", { key: '38e6c2edef2fde42ac75063858ad44b83e3f8f7b', class: "toggle-thumb" }))));
|
|
35625
35592
|
}
|
|
35626
35593
|
};
|
|
35627
35594
|
KritzelSlideToggle.style = kritzelSlideToggleCss();
|
|
@@ -35721,7 +35688,7 @@ const KritzelSplitButton = class {
|
|
|
35721
35688
|
this.menuScrollTop = event.target.scrollTop;
|
|
35722
35689
|
};
|
|
35723
35690
|
render() {
|
|
35724
|
-
return (index.h(index.Host, { key: '
|
|
35691
|
+
return (index.h(index.Host, { key: 'd8dac18091d84994607f96dea4cb09f5823b8477', class: { mobile: this.isTouchDevice } }, index.h("button", { key: '7601c722ba60bf73e8009c32b40ff88e51680011', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && index.h("kritzel-icon", { key: '567ea117b77ee0e8a4e023bc80d5cbafd44e7e05', name: this.buttonIcon })), index.h("div", { key: '53ae4da47818cb474fe659700d59171a9fe1b150', class: "split-divider" }), index.h("button", { key: '3893a36b2e33c86aa013e4a28a4428ba6ad4bb55', 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: '2dd391e711b37b41ccfe310fc705842fbde80110', name: this.dropdownIcon })), index.h("kritzel-portal", { key: '5e5d03337b0fd3e11547bb1678595dd1559e0b88', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, index.h("kritzel-menu", { key: 'c50fe3d6591024513e0cb2ecce97f23a34499fe5', 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 }))));
|
|
35725
35692
|
}
|
|
35726
35693
|
};
|
|
35727
35694
|
KritzelSplitButton.style = kritzelSplitButtonCss();
|
|
@@ -35742,7 +35709,7 @@ const KritzelStrokeSize = class {
|
|
|
35742
35709
|
}
|
|
35743
35710
|
render() {
|
|
35744
35711
|
const sizes = this.sizes ?? [];
|
|
35745
|
-
return (index.h(index.Host, { key: '
|
|
35712
|
+
return (index.h(index.Host, { key: 'c0920f9f5c038774e8515134e5d5a89dc71b11ab' }, index.h("div", { key: '05dc9a4b9e91114562bdbaede31c37576a9bd6e9', class: "size-grid" }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
35746
35713
|
'size-container': true,
|
|
35747
35714
|
'selected': this.selectedSize === size,
|
|
35748
35715
|
}, onClick: () => this.handleSizeClick(size) }, index.h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -35761,7 +35728,7 @@ const KritzelSyncIndicator = class {
|
|
|
35761
35728
|
/** The text displayed next to the spinner. */
|
|
35762
35729
|
text = 'Syncing...';
|
|
35763
35730
|
render() {
|
|
35764
|
-
return (index.h(index.Host, { key: '
|
|
35731
|
+
return (index.h(index.Host, { key: '2622544751cd377f172115f5f73e21e0f0995185' }, index.h("div", { key: '0cf49cbfbfa4ed0625eeff443ba1e2996a26562e', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, index.h("span", { key: '053ddc85e9ad2210822d3100ecf5d54d7170d470', class: "spinner", "aria-hidden": "true" }), index.h("span", { key: '94ea7f6be206688e9065d02b1d5c753e3598e9df' }, this.text))));
|
|
35765
35732
|
}
|
|
35766
35733
|
};
|
|
35767
35734
|
KritzelSyncIndicator.style = kritzelSyncIndicatorCss();
|
|
@@ -36174,14 +36141,14 @@ const KritzelTooltip = class {
|
|
|
36174
36141
|
}
|
|
36175
36142
|
}
|
|
36176
36143
|
render() {
|
|
36177
|
-
return (index.h(index.Host, { key: '
|
|
36144
|
+
return (index.h(index.Host, { key: '2fee8c1343888c34bbed7dd172b946ff732f6fc1', style: {
|
|
36178
36145
|
position: 'fixed',
|
|
36179
36146
|
zIndex: '9999',
|
|
36180
36147
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
36181
36148
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
36182
36149
|
left: `${this.positionX}px`,
|
|
36183
36150
|
bottom: `${this.positionY}px`,
|
|
36184
|
-
} }, index.h("div", { key: '
|
|
36151
|
+
} }, index.h("div", { key: 'fe72d28fb81f24309077f30193c84064afcd6ebe', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, index.h("slot", { key: 'ee95da259971a58b048780b21a0018fd6731bb03' }))));
|
|
36185
36152
|
}
|
|
36186
36153
|
static get watchers() { return {
|
|
36187
36154
|
"triggerElement": [{
|
|
@@ -36222,7 +36189,7 @@ const KritzelUtilityPanel = class {
|
|
|
36222
36189
|
this.redo.emit();
|
|
36223
36190
|
}
|
|
36224
36191
|
render() {
|
|
36225
|
-
return (index.h(index.Host, { key: '
|
|
36192
|
+
return (index.h(index.Host, { key: 'bc0322b40c4ff4fba997f1dc1901edbb934e4a0a' }, index.h("button", { key: 'ff48698d2757b0d99cacfd4fbaa5a7b0ae8f1604', 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: 'bc6756df10c7979e06cd9ebdb172b5ef54c7bb67', name: "undo" })), index.h("button", { key: '07afd176ae1b5cb5a65cd097ce4a99a131aee7aa', 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: '4573d7ab91f0cbfa0aafb607050f0b09048d60e1', name: "redo" })), index.h("div", { key: 'b663c43ef9181f61b12614245a65d063f6d94eaf', class: "utility-separator" }), index.h("button", { key: '248f7ae7cabbd83585674dcb16124a3f9fa2449b', 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: '6cbc48e118c96770333ed3e5947e54e497e93716', name: "delete" }))));
|
|
36226
36193
|
}
|
|
36227
36194
|
};
|
|
36228
36195
|
KritzelUtilityPanel.style = kritzelUtilityPanelCss();
|
|
@@ -36243,7 +36210,7 @@ const KritzelWatermark = class {
|
|
|
36243
36210
|
label;
|
|
36244
36211
|
render() {
|
|
36245
36212
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
36246
|
-
return (index.h(index.Host, { key: '
|
|
36213
|
+
return (index.h(index.Host, { key: 'de81b568421f5517fe19897bd4a4a5d58d1f622d' }, index.h("a", { key: '6278f78180869650afc181aac5c37aa401c09040', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
|
|
36247
36214
|
}
|
|
36248
36215
|
};
|
|
36249
36216
|
KritzelWatermark.style = kritzelWatermarkCss();
|
|
@@ -36431,7 +36398,7 @@ const KritzelZoomPanel = class {
|
|
|
36431
36398
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
36432
36399
|
}
|
|
36433
36400
|
render() {
|
|
36434
|
-
return (index.h(index.Host, { key: '
|
|
36401
|
+
return (index.h(index.Host, { key: '02de6ea9f2f7b6e057555e3b7e1ee3340cab5fa1' }, index.h("div", { key: '7531e03a4cfa05165057410e4dde3b4cc695f4de', class: { panel: true, visible: this.visible } }, index.h("button", { key: '57d324c7ad1c21ee8e107ad41cf1a4b708b0fccc', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, index.h("kritzel-icon", { key: '656128018addf58a59f223fab400605aeef4f5a8', name: "minus" })), index.h("span", { key: '32562a4709f8dea98fe3a80bf8a63722b176a3f4', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), index.h("button", { key: '4c0c5141597f0265ff4bf9d7bd1105666b6b7a76', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, index.h("kritzel-icon", { key: 'f85f69f5b0e214a557dfecb6164f5577af66ca7f', name: "plus" })))));
|
|
36435
36402
|
}
|
|
36436
36403
|
};
|
|
36437
36404
|
KritzelZoomPanel.style = kritzelZoomPanelCss();
|