kritzel-stencil 0.4.20 → 0.4.22
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-Dn19mGl-.js → index-Xav9JFHg.js} +11 -47
- package/dist/cjs/index.cjs.js +51 -2
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +268 -139
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-CY0WWJYd.js → schema.constants-CjN-B633.js} +20 -44
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +21 -0
- package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +29 -1
- package/dist/collection/classes/structures/app-state-map.structure.js +19 -6
- package/dist/collection/classes/structures/object-map.structure.js +66 -4
- 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 +51 -18
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +80 -80
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +87 -38
- 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 +53 -4
- package/dist/components/kritzel-active-users.js +1 -1
- package/dist/components/kritzel-avatar.js +1 -1
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-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 +61 -56
- 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-CLAz6RJc.js → p-2WiGyky4.js} +3 -3
- package/dist/components/{p-zG-WUBGF.js → p-4SPnZZkH.js} +4 -4
- package/dist/components/{p-MhQxGUvY.js → p-B-585egz.js} +3 -3
- package/dist/components/{p-C9_yBEoX.js → p-B43upypT.js} +10 -30
- package/dist/components/{p-CSKToqUl.js → p-B5SWPDuq.js} +4 -4
- package/dist/components/{p-Covorf4C.js → p-BFYtCsZu.js} +3 -3
- package/dist/components/{p-Csxx9TbU.js → p-BNeE3SiZ.js} +216 -116
- package/dist/components/{p-DYPA7jpg.js → p-BPsKYMH6.js} +2 -2
- package/dist/components/{p-Cx-L_28S.js → p-BoN700-O.js} +3 -3
- package/dist/components/{p-ME1sDz3f.js → p-BozrueXV.js} +2 -2
- package/dist/components/{p-D2VcPEtL.js → p-BrNsOp2v.js} +6 -6
- package/dist/components/{p-BXUx_C0N.js → p-BsLI_BWq.js} +2 -2
- package/dist/components/{p-dAXnRkjA.js → p-C98Eb3_R.js} +5 -5
- package/dist/components/{p-Bxi-Bm49.js → p-CAoN_STZ.js} +2 -2
- package/dist/components/{p-CSWCmyzb.js → p-CF8pLc07.js} +5 -5
- package/dist/components/{p-D3BzgkIE.js → p-CSPYkLLH.js} +2 -2
- package/dist/components/{p-Ck-87E2G.js → p-CSuU8frA.js} +1 -1
- package/dist/components/{p-Di--2boB.js → p-CXpv9Rxe.js} +3 -3
- package/dist/components/{p-o3NYKrVL.js → p-CaBbajU2.js} +3 -3
- package/dist/components/{p-3tBE7SyG.js → p-Cm33td2O.js} +2 -2
- package/dist/components/{p-vDCa_ZDm.js → p-CrHvaLRV.js} +3 -3
- package/dist/components/{p-DT_WBwsw.js → p-CwZ3KKFq.js} +6 -6
- package/dist/components/{p-BZZ3KRPk.js → p-CzW58DHM.js} +3 -3
- package/dist/components/{p-BrqSjRJN.js → p-Czhdc844.js} +3 -3
- package/dist/components/{p-BkXQL5Dl.js → p-D1rjfWgJ.js} +5 -5
- package/dist/components/{p-DPsbNStn.js → p-DB58Oa5V.js} +2 -2
- package/dist/components/{p-DafP9PAA.js → p-DBqoPgev.js} +2 -2
- package/dist/components/{p-BrA9NBEE.js → p-DDTMGbtA.js} +21 -21
- package/dist/components/{p-Dznwo6oc.js → p-DKGg-76-.js} +2 -2
- package/dist/components/{p-Dp1CD4gK.js → p-DVXTPI71.js} +2 -2
- package/dist/components/{p-QSyeAy8R.js → p-DX2nriaq.js} +2 -2
- package/dist/components/{p-CHoOe3FD.js → p-Df3BwVGy.js} +3 -3
- package/dist/components/{p-DcUIO14-.js → p-Dt7-I2Xz.js} +4 -4
- package/dist/components/{p-BShrnlam.js → p-DtnMdWWB.js} +2 -2
- package/dist/components/{p-Ch-KG9To.js → p-DwMqCX2P.js} +3 -3
- package/dist/components/{p-25ExYYPf.js → p-Dx5NfJ0U.js} +9 -9
- package/dist/components/{p-fSV6KVTC.js → p-GKmqCI8r.js} +3 -3
- package/dist/components/{p-CWAChRD5.js → p-HoO86l1o.js} +12 -12
- package/dist/components/{p-Qdo3E8dr.js → p-PjPPCHVL.js} +2 -2
- package/dist/components/{p-D6JycG-I.js → p-bAacqNHq.js} +3 -3
- package/dist/components/{p-DjXQxw9R.js → p-djJSnjAX.js} +3 -3
- package/dist/components/{p-b0J2ktAm.js → p-dsxHDlQ3.js} +7 -7
- package/dist/components/{p-BppcoKoo.js → p-eZXIu4yK.js} +5 -5
- package/dist/components/{p-BFYT03fw.js → p-fL9rl200.js} +3 -3
- package/dist/components/{p-1Q4VnThv.js → p-jIKskj3S.js} +3 -3
- package/dist/components/{p-D0Trc3IQ.js → p-vqEUQ-4Q.js} +5 -5
- package/dist/esm/{index-2va1Pk9z.js → index-Dhio9uis.js} +11 -47
- package/dist/esm/index.js +52 -3
- package/dist/esm/kritzel-active-users_47.entry.js +268 -139
- package/dist/esm/kritzel-brush-style.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{schema.constants-DBvUmuDH.js → schema.constants-DfvqHmxc.js} +20 -44
- package/dist/esm/stencil.js +3 -3
- package/dist/stencil/index.esm.js +52 -3
- package/dist/stencil/{p-DBvUmuDH.js → p-DfvqHmxc.js} +20 -44
- package/dist/stencil/{p-2va1Pk9z.js → p-Dhio9uis.js} +11 -47
- package/dist/stencil/{p-d19d1b82.entry.js → p-ab5c4292.entry.js} +268 -139
- package/dist/stencil/{p-df06ca3a.entry.js → p-fb32cd8f.entry.js} +2 -2
- package/dist/stencil/stencil.esm.js +4 -4
- package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +5 -0
- package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +6 -0
- package/dist/types/classes/structures/app-state-map.structure.d.ts +6 -0
- package/dist/types/classes/structures/object-map.structure.d.ts +26 -2
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +3 -0
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +14 -1
- package/dist/types/components.d.ts +8 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/sync-provider.interface.d.ts +13 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -12
- 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-Xav9JFHg.js');
|
|
4
|
+
var schema_constants = require('./schema.constants-CjN-B633.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: '90ce966bb2a374e68c544906c8c746df6cc01038', 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: '6799f4ad45c7d40ebaf640f191171ed6a5f14ae9', 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: '98cdcda64b900994b61a03179be9f2af17c489e8', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (index.h("span", { key: '64e6a6ee67017c927dce0b51810a5bb02fc0d6d1', class: "avatar-default" }, index.h("svg", { key: '42f99637a3c23aaf10fa7c99753347ede1d518c0', viewBox: "0 0 24 24", fill: "currentColor" }, index.h("path", { key: '28b52a68b36e98b0e14891fd225457be65f1bb46', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
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: '9be6694250bafe011be27301d1c7a53fc7957657' }, 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: '2576489b9f97c77d1931e7c8496bae968d998f9d' }, index.h("button", { key: 'da891543ce8a9b5ccd2f4a461bdcdc7f3f9ad266', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, index.h("kritzel-icon", { key: '4559cc932918707d5961c6237f3c5e23c9e4cc9d', 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: '51621006f6b085db2b43accf52192f0674d2c50c' }, index.h("button", { key: '01ab2d96abe5ad34285e59f6fec66f6b21e91849', 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: '4b085139ea85ad9f836059f4cf2dde15b948e0e2' }))));
|
|
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: 'e797bfa6a2aed82d1913ec2f02f8b25a063564e5' }, index.h("div", { key: '5b62fcdbb2985b90fe0d7c7b65b507ec1c55e240', 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: '2d62717ebf81be93219ebda7071c0ba992d7441a', 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: '9a637b3a6946384a889f54dc3a635da7ff014439' }, index.h("div", { key: '4db8bbc7a234bfed26b60ed306a5f999875e2195', 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: '2a7595b72594df3e8ff9a103c3ff7dd70f0a8045', 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: '1c2d9f14c53944f291cf49cbcd1bf282ad8a8683', 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: '8ac30e183885bc106033ca163aa7e5927802e67c', class: "kritzel-controls" }, index.h("div", { key: '74b2808a506e671682aed91107c7c9e27aa4b2c7', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: '3fd693c993d5b11eadd2eec7481214fbc1550301', 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: '6f16a8332dc6a082f2e6aedbec3e31398f2a8b66', 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: '554d743fccfb62d8c368f2a5cdca232ae9842b7f', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: 'af97d986d82c961d66c910f7edabd6e597ec59ab', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: '3721e5463a85881c7e806d69c0a9524f44732978', 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: 'c6e3fe4a4a9b781db394073c8f929533487be760', 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: '9eeb3a9fc29f4848ee9f325d50b4cbfc5bfe5f1c', class: "color-container" }, index.h("kritzel-color", { key: '1d45edb7ed07a8d12ab55e374ea456b8e95c8d41', 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: '19551eb12507f1384aedf3ca4ce5212eca509c24' }, index.h("kritzel-avatar", { key: 'e39405e8e6c2e77a8acf5f286fa3890e28e8ab17', 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: '8f8e63ac6f789f2d0ee43b8b7439634411a91ac9' }, index.h("kritzel-dialog", { key: '4022a7251881f669f290e0a8beb9a39ef6242b19', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: '4671f884c121cfaefdd8a47bd52b30acc2d7b345', class: "user-info" }, index.h("kritzel-avatar", { key: 'a1847b4b67302f3b7179e4e2b751f7f2106b76d4', user: this.user, size: 80 }), displayName && index.h("div", { key: 'b3d09b4c99d76014a2e36260edce52c39f1081e1', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: 'a76ce19cbd24ad536b022264dab6a83f4d1b36c2', class: "user-email" }, this.user.email), index.h("kritzel-button", { key: 'f125164a9d9362eedfbfff4fc2629f7ec055fc14', 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: 'b427550b19a3e172cb25d05e34635121b82a61c5' }, this.cursorTrailPoints.length > 1 && (index.h("svg", { key: '9685b563497e110f36c0feffbfde04ebeb38024b', 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: 'c606b338e55dc66396105fa7b4fbdf372f3866e6' }, index.h("div", { key: 'aa32b73cac337fa4142ecc124cf039a59e3b3118', class: "dropdown-wrapper", ref: el => (this.wrapperElement = el) }, index.h("slot", { key: '2cd8e9ef246a24c49d58f76f227f36aed4786178', name: "prefix", ref: el => (this.prefixSlotElement = el), onSlotchange: this.evaluatePrefixContent }), index.h("div", { key: '80df8155e1907017d508e92f155bab5ae12dffab', class: "dropdown-container", style: { width: this.width } }, index.h("button", { key: 'd86463de7ec58248f1611d6b5d46f0eafc117f36', type: "button", class: triggerClasses, style: { ...this.selectStyles, ...this.getSelectedStyle() }, onClick: this.toggleMenu, onKeyDown: this.handleTriggerKeyDown, "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', ref: el => (this.triggerElement = el) }, index.h("span", { key: '4ef6a997f7a781fb409e97ed5bd6843d0eaff0bb', class: "dropdown-trigger-label" }, this.getSelectedLabel()), index.h("span", { key: '6601efcd69d84af1f022d14ede628bac743cc1f1', class: "dropdown-trigger-arrow", "aria-hidden": "true" }, index.h("svg", { key: '6cb2efe7b4ca890562c10b0e24eb1dfdad90ec24', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { key: 'a340af5a61dccf5bc29c8a473726b58055c2e9db', points: "6 9 12 15 18 9" }))))), index.h("slot", { key: '5bd4e5ad4cc4642c7769ecac2106ba82bae626f2', name: "suffix", ref: el => (this.suffixSlotElement = el), onSlotchange: this.evaluateSuffixContent }), index.h("ul", { key: 'e7a2be8ac261bc5fa1450940e2a57090d6be3315', class: menuClasses, role: "listbox", tabindex: "-1", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElement = el) }, this.options.map((option, index$1) => {
|
|
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,6 +2168,8 @@ 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");
|
|
2171
2173
|
}
|
|
2172
2174
|
get host() { return index.getElement(this); }
|
|
2173
2175
|
scaleMax = ABSOLUTE_SCALE_MAX;
|
|
@@ -2407,6 +2409,9 @@ const KritzelEditor = class {
|
|
|
2407
2409
|
login;
|
|
2408
2410
|
isPublicChange;
|
|
2409
2411
|
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;
|
|
2410
2415
|
isEngineReady = false;
|
|
2411
2416
|
isControlsReady = false;
|
|
2412
2417
|
isWorkspaceManagerReady = false;
|
|
@@ -3225,40 +3230,40 @@ const KritzelEditor = class {
|
|
|
3225
3230
|
const isLoggedIn = this.isLoggedIn;
|
|
3226
3231
|
const shouldShowCurrentUser = isLoggedIn;
|
|
3227
3232
|
const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
|
|
3228
|
-
return (index.h(index.Host, { key: '
|
|
3233
|
+
return (index.h(index.Host, { key: 'ff7d505697bd4c4bd840dadcb04a934b7e243a01' }, index.h("div", { key: 'b40076c3c79ad3f879e80c58b412b79266de2ea8', class: "editor-content", style: {
|
|
3229
3234
|
opacity: this.isEditorVisible ? '1' : '0',
|
|
3230
3235
|
visibility: this.isEditorVisible ? 'visible' : 'hidden',
|
|
3231
3236
|
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
3232
|
-
} }, index.h("div", { key: '
|
|
3237
|
+
} }, index.h("div", { key: '1b1171eea60a36ad06da55a3da564bc356526266', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: '48b59f3f57ace57debc19a295d4fb642e8c3b23d', 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: 'c66a6faae8bf7115dcce47630ad820af9ba76eb0', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (index.h("div", { key: '834baedc5f20328deb4ee586f693313306895a71', class: "top-center-notification-layer", role: "presentation" }, index.h("div", { key: 'f800508a2e076ee3e89820ffff4df81842b175b3', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, index.h("kritzel-notification-card", { key: '2835ea84e8fa92c41637adaa29d9005f209b2da9', 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: '6c49e899b7f933d3f06cd1f8696a590d542214a7', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
|
|
3233
3238
|
position: 'absolute',
|
|
3234
3239
|
left: `${this.contextMenuState.position.x}px`,
|
|
3235
3240
|
top: `${this.contextMenuState.position.y}px`,
|
|
3236
3241
|
zIndex: '10002',
|
|
3237
|
-
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-sync-indicator", { key: '
|
|
3242
|
+
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), index.h("kritzel-sync-indicator", { key: '9622af1634a939d6689d5a133496d536f5d7865f', visible: this.isSyncing, text: "Syncing..." }), index.h("kritzel-loading-overlay", { key: '00f142a3eb8b23fbd0bdb6ec53ae95855434516c', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), index.h("kritzel-engine", { key: '39b1d7bfce0a5347fec60cd135d6db8fb4250bfa', ref: el => {
|
|
3238
3243
|
if (el) {
|
|
3239
3244
|
this.engineRef = el;
|
|
3240
3245
|
}
|
|
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: '
|
|
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: '9a708f21ab92ecc6953a35f5db8001b2403f330e', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
|
|
3242
3247
|
if (el) {
|
|
3243
3248
|
this.controlsRef = el;
|
|
3244
3249
|
}
|
|
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: '
|
|
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: '6a2b1cd72099db86952ac31aad9655693d0a6a0d', class: "bottom-left-buttons" }, index.h("kritzel-zoom-panel", { key: 'b3756514bf8de6de8ac7586c626f9759da7f231d', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), index.h("div", { key: 'd5e118bc4d60b867006bac287c5516baf3aa890e', class: "top-right-buttons" }, index.h("kritzel-settings", { key: 'e4065d36beb9283cdbbf3ae9800f4f8011c0b4f0', ref: el => {
|
|
3246
3251
|
if (el) {
|
|
3247
3252
|
this.settingsRef = el;
|
|
3248
3253
|
}
|
|
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: '
|
|
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: '4e18d9b42c9e7fef9433577b983c508559461da2', ref: el => {
|
|
3250
3255
|
if (el) {
|
|
3251
3256
|
this.exportRef = el;
|
|
3252
3257
|
}
|
|
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: '
|
|
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: '56e6b29c9c3dcd7b68af4a1ef7d34224d592ce34', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: '3b90bcc7e583fcf3c6845d222ad181ccf234a423', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (index.h("kritzel-current-user-dialog", { key: 'f87702c5a708b6afdb2bc3760895e3e3650a4cb5', ref: el => {
|
|
3254
3259
|
if (el) {
|
|
3255
3260
|
this.currentUserDialogRef = el;
|
|
3256
3261
|
}
|
|
3257
|
-
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: '
|
|
3262
|
+
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && index.h("kritzel-button", { key: '015bc0f4c66352136de66d35d28c20070366933f', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), index.h("kritzel-more-menu", { key: 'b3fdf9fdb2a34508002e82dfdef9e9bdbbe57ecc', items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), index.h("kritzel-share-dialog", { key: 'bac4fbbfa04c261e2b128e766cc43c1062aec2ff', ref: el => {
|
|
3258
3263
|
if (el) {
|
|
3259
3264
|
this.shareDialogRef = el;
|
|
3260
3265
|
}
|
|
3261
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: '
|
|
3266
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: 'a7d52bad9e752ad546adf80d257c6a46de031e76', ref: el => {
|
|
3262
3267
|
if (el) {
|
|
3263
3268
|
this.loginDialogRef = el;
|
|
3264
3269
|
}
|
|
@@ -22301,6 +22306,10 @@ class KritzelObjectMap {
|
|
|
22301
22306
|
_awarenessChangeHandler = null;
|
|
22302
22307
|
_awarenessChangeCallbacks = [];
|
|
22303
22308
|
_objectsChangeCallbacks = [];
|
|
22309
|
+
_remoteChangesCallbacks = [];
|
|
22310
|
+
_docUpdateHandler = null;
|
|
22311
|
+
_remoteOrigins = new Set();
|
|
22312
|
+
_appliedRemoteChanges = false;
|
|
22304
22313
|
_lastAwarenessEmitTime = 0;
|
|
22305
22314
|
_awarenessEmitTimeout = null;
|
|
22306
22315
|
AWARENESS_THROTTLE_INTERVAL = 100; // milliseconds
|
|
@@ -22324,12 +22333,44 @@ class KritzelObjectMap {
|
|
|
22324
22333
|
return this._isReady;
|
|
22325
22334
|
}
|
|
22326
22335
|
/**
|
|
22327
|
-
* Promise that settles when network providers finish connecting
|
|
22328
|
-
* Resolves immediately if no network providers.
|
|
22336
|
+
* Promise that settles when network providers finish connecting and complete
|
|
22337
|
+
* their Yjs sync handshake. Resolves immediately if no network providers.
|
|
22329
22338
|
*/
|
|
22330
22339
|
whenNetworkSynced() {
|
|
22331
22340
|
return this._networkSyncPromise ?? Promise.resolve();
|
|
22332
22341
|
}
|
|
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
|
+
}
|
|
22333
22374
|
/**
|
|
22334
22375
|
* Returns the Yjs Awareness instance, if a network provider is available.
|
|
22335
22376
|
*/
|
|
@@ -22572,6 +22613,22 @@ class KritzelObjectMap {
|
|
|
22572
22613
|
const providerList = this._providers.map(p => `${p.constructor.name} (${p.type})`).join(', ');
|
|
22573
22614
|
console.info(`[Kritzel] Workspace sync providers initialized for ${docName}: ${providerList || 'none'}`);
|
|
22574
22615
|
}
|
|
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);
|
|
22575
22632
|
// captureTimeout is effectively infinite — undo-step boundaries are
|
|
22576
22633
|
// marked explicitly via markUndoBoundary() in insert/remove/reset and
|
|
22577
22634
|
// at stroke/gesture boundaries in the tools. This prevents a single
|
|
@@ -22625,12 +22682,15 @@ class KritzelObjectMap {
|
|
|
22625
22682
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
22626
22683
|
console.info(`[Kritzel] Workspace network providers connecting in background: ${networkProviders.length}`);
|
|
22627
22684
|
}
|
|
22628
|
-
const networkConnectPromises = networkProviders.map(provider => provider
|
|
22685
|
+
const networkConnectPromises = networkProviders.map(provider => provider
|
|
22686
|
+
.connect()
|
|
22687
|
+
.then(() => provider.whenSynced?.())
|
|
22688
|
+
.catch(err => {
|
|
22629
22689
|
if (showSyncProviderInfo) {
|
|
22630
22690
|
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
22631
22691
|
}
|
|
22632
22692
|
}));
|
|
22633
|
-
//
|
|
22693
|
+
// Settles once remote data has been reconciled, not merely once the transport connected
|
|
22634
22694
|
this._networkSyncPromise = networkConnectPromises.length > 0 ? Promise.allSettled(networkConnectPromises).then(() => undefined) : null;
|
|
22635
22695
|
this._isReady = true;
|
|
22636
22696
|
// Find the first provider that exposes awareness (network providers)
|
|
@@ -23288,6 +23348,13 @@ class KritzelObjectMap {
|
|
|
23288
23348
|
this._objectsMap.unobserve(this._objectsObserver);
|
|
23289
23349
|
this._objectsObserver = null;
|
|
23290
23350
|
}
|
|
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;
|
|
23291
23358
|
// Remove undo manager event listeners
|
|
23292
23359
|
if (this._undoManager) {
|
|
23293
23360
|
if (this._stackItemAddedHandler) {
|
|
@@ -23684,6 +23751,7 @@ class KritzelAppStateMap {
|
|
|
23684
23751
|
_isReady = false;
|
|
23685
23752
|
_onRemoteChangeCallback = null;
|
|
23686
23753
|
_workspacesObserver = null;
|
|
23754
|
+
_networkSyncPromise = null;
|
|
23687
23755
|
/**
|
|
23688
23756
|
* Indicates whether the app state map has been initialized and is ready for use.
|
|
23689
23757
|
* @returns True if initialized and all providers are connected, false otherwise.
|
|
@@ -23691,6 +23759,13 @@ class KritzelAppStateMap {
|
|
|
23691
23759
|
get isReady() {
|
|
23692
23760
|
return this._isReady;
|
|
23693
23761
|
}
|
|
23762
|
+
/**
|
|
23763
|
+
* Settles when network providers finish their initial sync (or fail/time out).
|
|
23764
|
+
* Resolves immediately when no network providers are configured.
|
|
23765
|
+
*/
|
|
23766
|
+
whenNetworkSynced() {
|
|
23767
|
+
return this._networkSyncPromise ?? Promise.resolve();
|
|
23768
|
+
}
|
|
23694
23769
|
/**
|
|
23695
23770
|
* Indicates whether any configured sync provider replicates over the network.
|
|
23696
23771
|
* Used by the engine to warn when a matching remote asset storage
|
|
@@ -23775,12 +23850,16 @@ class KritzelAppStateMap {
|
|
|
23775
23850
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
23776
23851
|
console.info(`[Kritzel] App-state network providers connecting in background: ${networkProviders.length}`);
|
|
23777
23852
|
}
|
|
23778
|
-
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
23783
|
-
|
|
23853
|
+
const networkConnectPromises = networkProviders.map(provider => provider
|
|
23854
|
+
.connect()
|
|
23855
|
+
.then(() => provider.whenSynced?.())
|
|
23856
|
+
.catch(err => {
|
|
23857
|
+
if (showSyncProviderInfo) {
|
|
23858
|
+
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
23859
|
+
}
|
|
23860
|
+
}));
|
|
23861
|
+
if (networkConnectPromises.length > 0) {
|
|
23862
|
+
this._networkSyncPromise = Promise.allSettled(networkConnectPromises).then(() => undefined);
|
|
23784
23863
|
}
|
|
23785
23864
|
this._isReady = true;
|
|
23786
23865
|
// Run any pending schema migrations before loading data
|
|
@@ -24105,6 +24184,7 @@ class KritzelAppStateMap {
|
|
|
24105
24184
|
// Clear remaining references
|
|
24106
24185
|
this._core = null;
|
|
24107
24186
|
this._onRemoteChangeCallback = null;
|
|
24187
|
+
this._networkSyncPromise = null;
|
|
24108
24188
|
this._isReady = false;
|
|
24109
24189
|
}
|
|
24110
24190
|
}
|
|
@@ -27057,8 +27137,8 @@ class KritzelSvgExportHelper {
|
|
|
27057
27137
|
.join('\n ');
|
|
27058
27138
|
const xmlDecl = includeXmlDeclaration ? '<?xml version="1.0" encoding="UTF-8"?>\n' : '';
|
|
27059
27139
|
const defsContent = defs.length > 0 ? `\n <defs>\n ${defs.join('\n ')}\n </defs>` : '';
|
|
27060
|
-
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
27061
|
-
${elements}
|
|
27140
|
+
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
27141
|
+
${elements}
|
|
27062
27142
|
</svg>`;
|
|
27063
27143
|
}
|
|
27064
27144
|
/**
|
|
@@ -27210,8 +27290,8 @@ class KritzelSvgExportHelper {
|
|
|
27210
27290
|
const orient = end === 'start' ? 'auto-start-reverse' : 'auto';
|
|
27211
27291
|
const refX = 0;
|
|
27212
27292
|
const refY = size / 2;
|
|
27213
|
-
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
27214
|
-
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
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})"/>
|
|
27215
27295
|
</marker>`;
|
|
27216
27296
|
}
|
|
27217
27297
|
/**
|
|
@@ -27258,10 +27338,10 @@ class KritzelSvgExportHelper {
|
|
|
27258
27338
|
const opacity = path.opacity !== 1 ? ` opacity="${path.opacity}"` : '';
|
|
27259
27339
|
const scale = this.getObjectScale(path);
|
|
27260
27340
|
// Path needs to be wrapped in a g with translation since path.d uses local coordinates
|
|
27261
|
-
return `<g transform="${transform}"${opacity}>
|
|
27262
|
-
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
27263
|
-
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
27264
|
-
</svg>
|
|
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>
|
|
27265
27345
|
</g>`;
|
|
27266
27346
|
}
|
|
27267
27347
|
/**
|
|
@@ -27277,10 +27357,10 @@ class KritzelSvgExportHelper {
|
|
|
27277
27357
|
const scale = this.getObjectScale(line);
|
|
27278
27358
|
const markerStart = line.hasStartArrow ? ` marker-start="url(#${line.startMarkerId})"` : '';
|
|
27279
27359
|
const markerEnd = line.hasEndArrow ? ` marker-end="url(#${line.endMarkerId})"` : '';
|
|
27280
|
-
return `<g transform="${transform}"${opacity}>
|
|
27281
|
-
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
27282
|
-
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
27283
|
-
</svg>
|
|
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>
|
|
27284
27364
|
</g>`;
|
|
27285
27365
|
}
|
|
27286
27366
|
/**
|
|
@@ -27304,18 +27384,18 @@ class KritzelSvgExportHelper {
|
|
|
27304
27384
|
const textHtml = this.prosemirrorToHtml(shape.content, shape, theme);
|
|
27305
27385
|
if (textHtml) {
|
|
27306
27386
|
const fontColor = schema_constants.KritzelColorHelper.resolveThemeColor(shape.fontColor, theme);
|
|
27307
|
-
textContent = `
|
|
27308
|
-
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
27309
|
-
<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;">
|
|
27310
|
-
${textHtml}
|
|
27311
|
-
</div>
|
|
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>
|
|
27312
27392
|
</foreignObject>`;
|
|
27313
27393
|
}
|
|
27314
27394
|
}
|
|
27315
|
-
return `<g transform="${transform}"${opacity}>
|
|
27316
|
-
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
27317
|
-
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
27318
|
-
</svg>
|
|
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>
|
|
27319
27399
|
</g>`;
|
|
27320
27400
|
}
|
|
27321
27401
|
/**
|
|
@@ -27346,10 +27426,10 @@ class KritzelSvgExportHelper {
|
|
|
27346
27426
|
// adjusted font-size already accounts for it – keeping both would double-scale
|
|
27347
27427
|
// the content and overflow the foreignObject.
|
|
27348
27428
|
const svgFontSizePx = (text.fontSize * (4 / 3) * (text.scaleFactor || 1) / scale).toFixed(4);
|
|
27349
|
-
return `<g transform="${transform}"${opacity}>
|
|
27350
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
27351
|
-
<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>
|
|
27352
|
-
</foreignObject>
|
|
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>
|
|
27353
27433
|
</g>`;
|
|
27354
27434
|
}
|
|
27355
27435
|
/**
|
|
@@ -27383,9 +27463,9 @@ class KritzelSvgExportHelper {
|
|
|
27383
27463
|
return `<tspan x="0" y="${y}" xml:space="preserve">${this.escapeHtml(line)}</tspan>`;
|
|
27384
27464
|
})
|
|
27385
27465
|
.join('');
|
|
27386
|
-
return `<g transform="${transform}"${opacity}>
|
|
27387
|
-
${bgRect}
|
|
27388
|
-
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
27466
|
+
return `<g transform="${transform}"${opacity}>
|
|
27467
|
+
${bgRect}
|
|
27468
|
+
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
27389
27469
|
</g>`;
|
|
27390
27470
|
}
|
|
27391
27471
|
/**
|
|
@@ -27413,8 +27493,8 @@ class KritzelSvgExportHelper {
|
|
|
27413
27493
|
const width = image.totalWidth / scale;
|
|
27414
27494
|
const height = image.totalHeight / scale;
|
|
27415
27495
|
const href = imageDataUrls?.get(image.id) || image.resolvedSrc || image.src || '';
|
|
27416
|
-
return `<g transform="${transform}"${opacity}>
|
|
27417
|
-
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
27496
|
+
return `<g transform="${transform}"${opacity}>
|
|
27497
|
+
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
27418
27498
|
</g>`;
|
|
27419
27499
|
}
|
|
27420
27500
|
/**
|
|
@@ -27434,19 +27514,19 @@ class KritzelSvgExportHelper {
|
|
|
27434
27514
|
if (rasterSafeForCanvas) {
|
|
27435
27515
|
// PNG export: render placeholder rect (foreignObject doesn't rasterize to PNG well)
|
|
27436
27516
|
console.warn('[KritzelCustomElement SVG Export] Custom elements do not serialize well to PNG. Use SVG export or screenshot instead.');
|
|
27437
|
-
return `<g transform="${transform}"${opacity}>
|
|
27438
|
-
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
27439
|
-
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Custom Element]</text>
|
|
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>
|
|
27440
27520
|
</g>`;
|
|
27441
27521
|
}
|
|
27442
27522
|
// SVG export: use foreignObject to embed HTML
|
|
27443
27523
|
const html = obj.element?.outerHTML || '<div style="border:1px dashed #ccc">Empty</div>';
|
|
27444
|
-
return `<g transform="${transform}"${opacity}>
|
|
27445
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
27446
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
27447
|
-
${html}
|
|
27448
|
-
</div>
|
|
27449
|
-
</foreignObject>
|
|
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>
|
|
27450
27530
|
</g>`;
|
|
27451
27531
|
}
|
|
27452
27532
|
/**
|
|
@@ -27466,8 +27546,8 @@ class KritzelSvgExportHelper {
|
|
|
27466
27546
|
return '';
|
|
27467
27547
|
}
|
|
27468
27548
|
const opacity = group.opacity !== 1 ? ` opacity="${group.opacity}"` : '';
|
|
27469
|
-
return `<g${opacity}>
|
|
27470
|
-
${children}
|
|
27549
|
+
return `<g${opacity}>
|
|
27550
|
+
${children}
|
|
27471
27551
|
</g>`;
|
|
27472
27552
|
}
|
|
27473
27553
|
/**
|
|
@@ -27877,7 +27957,7 @@ const KritzelEngine = class {
|
|
|
27877
27957
|
contextMenuStateChange;
|
|
27878
27958
|
/** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
|
|
27879
27959
|
loadingChange;
|
|
27880
|
-
/** Emitted
|
|
27960
|
+
/** Emitted while remote changes are being applied to the active workspace. Stays silent when the remote holds nothing new. */
|
|
27881
27961
|
syncingChange;
|
|
27882
27962
|
forceUpdate = 0;
|
|
27883
27963
|
isSyncing = false;
|
|
@@ -29464,6 +29544,7 @@ const KritzelEngine = class {
|
|
|
29464
29544
|
_sceneBootstrapOpacity = 1;
|
|
29465
29545
|
_sceneBootstrapTransitionEnabled = false;
|
|
29466
29546
|
_sceneBootstrapTransitionTimer = null;
|
|
29547
|
+
_remoteChangesUnsubscribe = null;
|
|
29467
29548
|
_defaultUndoState = {
|
|
29468
29549
|
canUndo: false,
|
|
29469
29550
|
canRedo: false,
|
|
@@ -29481,9 +29562,16 @@ const KritzelEngine = class {
|
|
|
29481
29562
|
this.loadingChange.emit(this.core.store.state.isLoading);
|
|
29482
29563
|
}
|
|
29483
29564
|
syncSyncingState(isSyncing) {
|
|
29565
|
+
if (this.isSyncing === isSyncing) {
|
|
29566
|
+
return;
|
|
29567
|
+
}
|
|
29484
29568
|
this.isSyncing = isSyncing;
|
|
29485
29569
|
this.syncingChange.emit(isSyncing);
|
|
29486
29570
|
}
|
|
29571
|
+
clearRemoteChangesSubscription() {
|
|
29572
|
+
this._remoteChangesUnsubscribe?.();
|
|
29573
|
+
this._remoteChangesUnsubscribe = null;
|
|
29574
|
+
}
|
|
29487
29575
|
isNetworkAvailable() {
|
|
29488
29576
|
return typeof navigator !== 'undefined' && navigator.onLine;
|
|
29489
29577
|
}
|
|
@@ -29595,6 +29683,7 @@ const KritzelEngine = class {
|
|
|
29595
29683
|
disconnectedCallback() {
|
|
29596
29684
|
this.throttledPointerMoveMulti.cancel();
|
|
29597
29685
|
this._revealedImageKeys.clear();
|
|
29686
|
+
this.clearRemoteChangesSubscription();
|
|
29598
29687
|
if (this._sceneBootstrapTransitionTimer !== null) {
|
|
29599
29688
|
clearTimeout(this._sceneBootstrapTransitionTimer);
|
|
29600
29689
|
this._sceneBootstrapTransitionTimer = null;
|
|
@@ -29741,6 +29830,7 @@ const KritzelEngine = class {
|
|
|
29741
29830
|
if (!this._isAssetStorageInitialized && this.assetStorageConfig) {
|
|
29742
29831
|
await this.initializeAssetStorage();
|
|
29743
29832
|
}
|
|
29833
|
+
await this.waitForRemoteAppStateIfEmpty();
|
|
29744
29834
|
if (this.activeWorkspaceId) {
|
|
29745
29835
|
const startupWorkspace = this.core.getWorkspaces().find(ws => ws.id === this.activeWorkspaceId);
|
|
29746
29836
|
if (startupWorkspace) {
|
|
@@ -29773,6 +29863,27 @@ const KritzelEngine = class {
|
|
|
29773
29863
|
}
|
|
29774
29864
|
this.tryResolveActiveWorkspaceFromId();
|
|
29775
29865
|
}
|
|
29866
|
+
/**
|
|
29867
|
+
* On a cold start the remote workspace list may still be in flight; creating a
|
|
29868
|
+
* fallback workspace before it arrives would pollute the synced app state.
|
|
29869
|
+
*/
|
|
29870
|
+
async waitForRemoteAppStateIfEmpty() {
|
|
29871
|
+
if (this.core.getWorkspaces().length > 0) {
|
|
29872
|
+
return;
|
|
29873
|
+
}
|
|
29874
|
+
if (!this.core.appStateMap.hasNetworkSyncProvider || !this.isNetworkAvailable()) {
|
|
29875
|
+
return;
|
|
29876
|
+
}
|
|
29877
|
+
this._isWorkspaceLoading = true;
|
|
29878
|
+
this.syncLoadingState();
|
|
29879
|
+
try {
|
|
29880
|
+
await this.core.appStateMap.whenNetworkSynced();
|
|
29881
|
+
}
|
|
29882
|
+
finally {
|
|
29883
|
+
this._isWorkspaceLoading = false;
|
|
29884
|
+
this.syncLoadingState();
|
|
29885
|
+
}
|
|
29886
|
+
}
|
|
29776
29887
|
resolveStartupWorkspace() {
|
|
29777
29888
|
if (this.activeWorkspaceId) {
|
|
29778
29889
|
const workspaceById = this.core.getWorkspaces().find(ws => ws.id === this.activeWorkspaceId);
|
|
@@ -29827,21 +29938,7 @@ const KritzelEngine = class {
|
|
|
29827
29938
|
this._workspaceInitializationTargetKey = targetKey;
|
|
29828
29939
|
try {
|
|
29829
29940
|
await initializationPromise;
|
|
29830
|
-
|
|
29831
|
-
const initializedObjects = this.core.store.objects;
|
|
29832
|
-
const networkSyncPromise = initializedObjects?.whenNetworkSynced();
|
|
29833
|
-
if (networkSyncPromise && this.isNetworkAvailable()) {
|
|
29834
|
-
this.syncSyncingState(true);
|
|
29835
|
-
void networkSyncPromise.finally(() => {
|
|
29836
|
-
// Only clear syncing for the currently active object map.
|
|
29837
|
-
if (this.core.store.objects === initializedObjects) {
|
|
29838
|
-
this.syncSyncingState(false);
|
|
29839
|
-
}
|
|
29840
|
-
});
|
|
29841
|
-
}
|
|
29842
|
-
else {
|
|
29843
|
-
this.syncSyncingState(false);
|
|
29844
|
-
}
|
|
29941
|
+
this.trackRemoteSynchronization();
|
|
29845
29942
|
}
|
|
29846
29943
|
finally {
|
|
29847
29944
|
// Only the most recent init clears loading state to prevent race conditions
|
|
@@ -29853,6 +29950,38 @@ const KritzelEngine = class {
|
|
|
29853
29950
|
}
|
|
29854
29951
|
}
|
|
29855
29952
|
}
|
|
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
|
+
}
|
|
29856
29985
|
emitObjectsChange() {
|
|
29857
29986
|
const objectsMap = this.core.store.objects;
|
|
29858
29987
|
if (!objectsMap) {
|
|
@@ -30644,7 +30773,7 @@ const KritzelExport = class {
|
|
|
30644
30773
|
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 })));
|
|
30645
30774
|
}
|
|
30646
30775
|
render() {
|
|
30647
|
-
return (index.h(index.Host, { key: '
|
|
30776
|
+
return (index.h(index.Host, { key: '64a9957ef87799215f9274213ead958a895dd8ef' }, index.h("kritzel-dialog", { key: '59ad70cc7d2834f5ecac3a659189390015cd26cb', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, index.h("div", { key: 'fc9247f5b3848def87e6f6a6044d3fb1e63594ac', class: "export-content" }, index.h("kritzel-pill-tabs", { key: '54da74bbbd206b5e596865081cc5fe65bf8a776f', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport()), index.h("div", { key: 'b8e748034496936bf000a8eb111f52d58bf28d20', slot: "footer" }, index.h("button", { key: 'b7a59f3882146b45a0eb8395ea1c45cb41af0f34', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
|
|
30648
30777
|
}
|
|
30649
30778
|
};
|
|
30650
30779
|
KritzelExport.style = kritzelExportCss();
|
|
@@ -30659,7 +30788,7 @@ const KritzelFont = class {
|
|
|
30659
30788
|
size = 24;
|
|
30660
30789
|
color = '#000000';
|
|
30661
30790
|
render() {
|
|
30662
|
-
return (index.h(index.Host, { key: '
|
|
30791
|
+
return (index.h(index.Host, { key: '42f058426e2afcc49c788f2385e23a5ff153e77c' }, index.h("div", { key: '962dfc48ba84c5f5d2b98eb2464c69c04764ab0f', class: "font-preview", style: {
|
|
30663
30792
|
fontFamily: this.fontFamily,
|
|
30664
30793
|
fontSize: `${this.size}px`,
|
|
30665
30794
|
color: this.color
|
|
@@ -30709,7 +30838,7 @@ const KritzelFontFamily = class {
|
|
|
30709
30838
|
label: option.label,
|
|
30710
30839
|
style: { fontFamily: option.cssFontFamily ?? option.value },
|
|
30711
30840
|
}));
|
|
30712
|
-
return (index.h(index.Host, { key: '
|
|
30841
|
+
return (index.h(index.Host, { key: '059350f34370f7a291f47a42721ca5d9bb82df49' }, index.h("kritzel-dropdown", { key: 'fbd8cf1ae463c7e9b76d0ac754a41de54397058e', options: dropdownOptions, value: this.selectedFontFamily, onValueChanged: this.handleDropdownValueChange, selectStyles: { fontFamily: selectedFontFamily } })));
|
|
30713
30842
|
}
|
|
30714
30843
|
static get watchers() { return {
|
|
30715
30844
|
"fontOptions": [{
|
|
@@ -30743,7 +30872,7 @@ const KritzelFontSize = class {
|
|
|
30743
30872
|
render() {
|
|
30744
30873
|
const color = 'var(--kritzel-global-text-primary)';
|
|
30745
30874
|
const sizes = this.sizes ?? [];
|
|
30746
|
-
return (index.h(index.Host, { key: '
|
|
30875
|
+
return (index.h(index.Host, { key: '9d6592f049c25e9dfa2f6f3a270feb2440aa7f35' }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
30747
30876
|
'size-container': true,
|
|
30748
30877
|
'selected': this.selectedSize === size,
|
|
30749
30878
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, index.h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -30810,7 +30939,7 @@ const KritzelInput = class {
|
|
|
30810
30939
|
this.valueChange.emit(input.value);
|
|
30811
30940
|
};
|
|
30812
30941
|
render() {
|
|
30813
|
-
return (index.h(index.Host, { key: '
|
|
30942
|
+
return (index.h(index.Host, { key: 'a4d86101322da32c87a62ac8bb05edb7015ede2a' }, index.h("div", { key: 'abc5b007af0f6f9353e0b680636c92813ee1ef49', class: "input-container" }, this.label && index.h("label", { key: 'f79e02a925aa6bd1b6cd48fc4225e441695ff893', class: "input-label" }, this.label), index.h("div", { key: 'e2937d2ad1def996e1937a9dd711578a3f9b6494', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, index.h("input", { key: '8bc45cc6f2603bec30f2299286d03beacd8c07fb', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && index.h("span", { key: '917fb6fa6c5fe62ab0f1e5c83f09aedd22623353', class: "input-suffix" }, this.suffix)))));
|
|
30814
30943
|
}
|
|
30815
30944
|
static get watchers() { return {
|
|
30816
30945
|
"value": [{
|
|
@@ -30892,10 +31021,10 @@ const KritzelLineEndings = class {
|
|
|
30892
31021
|
render() {
|
|
30893
31022
|
const startEnding = this.getStartEnding();
|
|
30894
31023
|
const endEnding = this.getEndEnding();
|
|
30895
|
-
return (index.h(index.Host, { key: '
|
|
31024
|
+
return (index.h(index.Host, { key: '60115b8a2840ffe21e0846fdc2678c6ba24b22c0' }, index.h("div", { key: '3b63aa05ca78699172c645fdd404efdc55bc4536', class: "endings-section" }, index.h("div", { key: '9538369e8d2bb26600d6054ddbbc13d6c960bd56', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
30896
31025
|
'ending-option': true,
|
|
30897
31026
|
'selected': startEnding === type,
|
|
30898
|
-
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: '
|
|
31027
|
+
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), index.h("div", { key: 'ecec29740c09a61190938bab4955ccde6b84cfa2', class: "endings-section" }, index.h("div", { key: 'ea054597c3e3566e7921f2c04c07d74e4f4331a1', class: "endings-row" }, this.styles.map(type => (index.h("button", { class: {
|
|
30899
31028
|
'ending-option': true,
|
|
30900
31029
|
'selected': endEnding === type,
|
|
30901
31030
|
}, onClick: () => this.handleEndChange(type), title: type === 'none' ? 'No end arrow' : `${type} end arrow` }, this.renderEndingIcon(type, false))))))));
|
|
@@ -30918,7 +31047,7 @@ const KritzelLoadingOverlay = class {
|
|
|
30918
31047
|
*/
|
|
30919
31048
|
text = 'Loading...';
|
|
30920
31049
|
render() {
|
|
30921
|
-
return (index.h(index.Host, { key: '
|
|
31050
|
+
return (index.h(index.Host, { key: '6fc1886217516966fa3599473989748151d93efd' }, index.h("div", { key: 'c6f2aa1c7f81bbab65411292934d185b4bf69e5a', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("span", { key: '21bae0b6f9b9a08f814aec7e6635a904018ab839', class: "loading-spinner" }), this.text)));
|
|
30922
31051
|
}
|
|
30923
31052
|
};
|
|
30924
31053
|
KritzelLoadingOverlay.style = kritzelLoadingOverlayCss();
|
|
@@ -30970,7 +31099,7 @@ const KritzelLoginDialog = class {
|
|
|
30970
31099
|
this.dialogClosed.emit();
|
|
30971
31100
|
};
|
|
30972
31101
|
render() {
|
|
30973
|
-
return (index.h(index.Host, { key: '
|
|
31102
|
+
return (index.h(index.Host, { key: '97532a2eeb125a2692117228ec3c77907c90d021' }, index.h("kritzel-dialog", { key: '60597c3d75f532a3c73aab983bed683bea243eac', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, index.h("div", { key: 'cb086e90c5981f8c3d5fc65e7b94675884a255dc', class: "login-content" }, this.subtitle && (index.h("p", { key: '0ac0e31a5bf8d8a3e24b7df1d388f1cdc6951bd7', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: '6057615670a1758581d0c518bb2809b88af0672e', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
|
|
30974
31103
|
'provider-button': true,
|
|
30975
31104
|
'is-loading': this.loadingProvider === provider.name,
|
|
30976
31105
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -31076,15 +31205,15 @@ const KritzelMasterDetail = class {
|
|
|
31076
31205
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
31077
31206
|
const panelId = 'master-detail-panel';
|
|
31078
31207
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
31079
|
-
return (index.h(index.Host, { key: '
|
|
31208
|
+
return (index.h(index.Host, { key: '0166376f16ebb098049cd2ef5539a86086a5570e' }, index.h("div", { key: 'f5091fe672bc4751c8f66d43baa5c1fc86fca034', class: {
|
|
31080
31209
|
'master-detail-container': true,
|
|
31081
31210
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
31082
|
-
} }, index.h("nav", { key: '
|
|
31211
|
+
} }, index.h("nav", { key: '66f5c61ea0308ea9ae1339526e86dcf1ee51fc0a', 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: {
|
|
31083
31212
|
'menu-item': true,
|
|
31084
31213
|
'is-selected': item.id === this.selectedItemId,
|
|
31085
31214
|
'is-disabled': !!item.disabled,
|
|
31086
31215
|
'is-focused': index$1 === this.focusedIndex,
|
|
31087
|
-
}, 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: '
|
|
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: 'e8f762ad87fdcf401ec717538bf1e979b22a9f15', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, index.h("button", { key: '958360d57a1fad0953bc3865503e86c1d8aa24e3', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, index.h("kritzel-icon", { key: 'c65eb947f80aafec99b367dae7ea72b1a77acdac', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), index.h("slot", { key: '44557fddf513fffd86c7a1b28b71a41fef7701f1' })))));
|
|
31088
31217
|
}
|
|
31089
31218
|
static get watchers() { return {
|
|
31090
31219
|
"selectedItemId": [{
|
|
@@ -31157,7 +31286,7 @@ const KritzelMenu = class {
|
|
|
31157
31286
|
this.itemCloseChildMenu.emit(event.detail);
|
|
31158
31287
|
};
|
|
31159
31288
|
render() {
|
|
31160
|
-
return (index.h(index.Host, { key: '
|
|
31289
|
+
return (index.h(index.Host, { key: '804ed34eb5340ecc1611ada01f608f7a0cf2f619', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && index.h("div", { key: '6de5954a05b7f28961fa33cf8d34df3a81aae5f8', 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 })))));
|
|
31161
31290
|
}
|
|
31162
31291
|
};
|
|
31163
31292
|
KritzelMenu.style = kritzelMenuCss();
|
|
@@ -31262,12 +31391,12 @@ const KritzelMenuItem = class {
|
|
|
31262
31391
|
];
|
|
31263
31392
|
}
|
|
31264
31393
|
render() {
|
|
31265
|
-
return (index.h(index.Host, { key: '
|
|
31394
|
+
return (index.h(index.Host, { key: '9b35e5631cfa14aca391636f06598ef6f2f26550', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
31266
31395
|
'selected': this.item.isSelected,
|
|
31267
31396
|
'editing': this.item.isEditing,
|
|
31268
31397
|
'disabled': this.item.isDisabled,
|
|
31269
31398
|
'child-open': this.item.isChildMenuOpen,
|
|
31270
|
-
}, onClick: this.handleItemSelect }, index.h("div", { key: '
|
|
31399
|
+
}, onClick: this.handleItemSelect }, index.h("div", { key: '175258699f76fdad5dcf3c7481e7882c6765bf33', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
31271
31400
|
}
|
|
31272
31401
|
static get watchers() { return {
|
|
31273
31402
|
"item": [{
|
|
@@ -31419,7 +31548,7 @@ const KritzelMoreMenu = class {
|
|
|
31419
31548
|
this.closeMenu();
|
|
31420
31549
|
};
|
|
31421
31550
|
render() {
|
|
31422
|
-
return (index.h(index.Host, { key: '
|
|
31551
|
+
return (index.h(index.Host, { key: '3eaf5dac0beb1f08100c9f57f63a2bdbef6e592d', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, index.h("div", { key: '30e4426b7d3a06ec45f0159f6403862bf4106723', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: '037b715fadad3b674f07bd9225acc4075b2d41b3', 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: 'b68b306b5b913ff36d220604a70626aa8468215c', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: 'dc86c2679956f2dfc66d000b183d99865291b6d3', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '9bd661fceea95df4d307e497d64365fcb854e8ce', items: this.resolveMenuLabels(this.visibleItems), onItemSelect: this.handleMenuItemSelect })))));
|
|
31423
31552
|
}
|
|
31424
31553
|
static get watchers() { return {
|
|
31425
31554
|
"items": [{
|
|
@@ -31591,7 +31720,7 @@ const KritzelNumericInput = class {
|
|
|
31591
31720
|
this.valueChange.emit(newValue);
|
|
31592
31721
|
};
|
|
31593
31722
|
render() {
|
|
31594
|
-
return (index.h(index.Host, { key: '
|
|
31723
|
+
return (index.h(index.Host, { key: '68e6fecd79c3c970d1742b1a0bb8667ca2d31729' }, index.h("div", { key: 'efcf623186d221690bbb956088ec51343de07f3a', class: "input-container" }, this.label && index.h("label", { key: '300de793f02008ad037da021003b46fc34fc5239', class: "input-label" }, this.label), index.h("div", { key: '9ff424901fddfcbdac4835e2b2089df2e0966d0f', class: "input-wrapper" }, index.h("input", { key: 'fc77e6ad1c0b15e3dd3f960b6448ddab1a9beeb1', 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: 'c286606fa0617cc3acbbe40a27e40b154002e01d', class: "spinner-buttons" }, index.h("button", { key: 'e3a65a327975918fe604cd196ffb087fc4d3ca47', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, index.h("svg", { key: '62b2ff4ed67ca8b6fc220ff9c63ceca90f75baea', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: '803d5c30826d40d95f282071f3f88356366a9faf', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("button", { key: '3c54a48e7082f5aaa9ed923357d0cc4a722018b5', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, index.h("svg", { key: '9f6cb5f34bbb0e70b5773aecec519b7d8b742712', viewBox: "0 0 10 6", class: "spinner-icon" }, index.h("path", { key: '6539b0d4f4bd26e463fa9152cf58757497355cf6', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
31595
31724
|
}
|
|
31596
31725
|
static get watchers() { return {
|
|
31597
31726
|
"value": [{
|
|
@@ -31601,7 +31730,7 @@ const KritzelNumericInput = class {
|
|
|
31601
31730
|
};
|
|
31602
31731
|
KritzelNumericInput.style = kritzelNumericInputCss();
|
|
31603
31732
|
|
|
31604
|
-
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(
|
|
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( 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))}`;
|
|
31605
31734
|
|
|
31606
31735
|
const KritzelOpacitySlider = class {
|
|
31607
31736
|
constructor(hostRef) {
|
|
@@ -31630,7 +31759,7 @@ const KritzelOpacitySlider = class {
|
|
|
31630
31759
|
}
|
|
31631
31760
|
render() {
|
|
31632
31761
|
const percentage = this.getPercentage();
|
|
31633
|
-
return (index.h(index.Host, { key: '
|
|
31762
|
+
return (index.h(index.Host, { key: '895ae10ad71e846a1bc62b794751332816650727' }, index.h("div", { key: '22ea167ce0d6eb17c733d789cde10477c48a2a0e', class: "opacity-container" }, index.h("div", { key: '2be4fbf8c1f8ddb1fde8f9da727ed0947d21646c', class: "slider-wrapper" }, index.h("input", { key: 'ed3621baf0adc54aa513a0296ede2f413378a06f', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
31634
31763
|
'--slider-progress': `${percentage}%`,
|
|
31635
31764
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
31636
31765
|
} })))));
|
|
@@ -31695,7 +31824,7 @@ const KritzelPillTabs = class {
|
|
|
31695
31824
|
buttons?.[newIndex]?.focus();
|
|
31696
31825
|
}
|
|
31697
31826
|
render() {
|
|
31698
|
-
return (index.h(index.Host, { key: '
|
|
31827
|
+
return (index.h(index.Host, { key: 'f02f93ada5ec002695b62f511c847de201a8cbe4' }, index.h("div", { key: 'bb08ae773f1b993cb330556a5778d71fc5e91ce1', class: "pill-tabs-container", role: "tablist" }, this.tabs.map((tab, index$1) => (index.h("button", { key: tab.id, class: {
|
|
31699
31828
|
'pill-tab': true,
|
|
31700
31829
|
'selected': this.value === tab.id,
|
|
31701
31830
|
}, 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)))))));
|
|
@@ -31983,7 +32112,7 @@ const KritzelPortal = class {
|
|
|
31983
32112
|
this.portal.style.visibility = 'visible';
|
|
31984
32113
|
}
|
|
31985
32114
|
render() {
|
|
31986
|
-
return (index.h(index.Host, { key: '
|
|
32115
|
+
return (index.h(index.Host, { key: '489a752e48d96c2607defa40a39477675685b60a', style: { display: this.anchor ? 'block' : 'none' } }, index.h("slot", { key: '13c6b7567039b8c8c78de27e3d9aeda30a798de1' })));
|
|
31987
32116
|
}
|
|
31988
32117
|
static get watchers() { return {
|
|
31989
32118
|
"anchor": [{
|
|
@@ -31997,7 +32126,7 @@ const KritzelPortal = class {
|
|
|
31997
32126
|
* This file is auto-generated by the version bump scripts.
|
|
31998
32127
|
* Do not modify manually.
|
|
31999
32128
|
*/
|
|
32000
|
-
const KRITZEL_VERSION = '0.4.
|
|
32129
|
+
const KRITZEL_VERSION = '0.4.22';
|
|
32001
32130
|
|
|
32002
32131
|
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)}`;
|
|
32003
32132
|
|
|
@@ -32209,7 +32338,7 @@ const KritzelSettings = class {
|
|
|
32209
32338
|
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)))));
|
|
32210
32339
|
}
|
|
32211
32340
|
render() {
|
|
32212
|
-
return (index.h(index.Host, { key: '
|
|
32341
|
+
return (index.h(index.Host, { key: '71f8a12325a781212dd6f2c8b794563fcb4eee64' }, index.h("kritzel-dialog", { key: '1abe7c1dedcf79433a95d60dadce342f46e62c3a', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: '9e8b3a11d97c1a10c6693434eb2e8bfc1d3fda7d', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
32213
32342
|
}
|
|
32214
32343
|
static get watchers() { return {
|
|
32215
32344
|
"settings": [{
|
|
@@ -32242,10 +32371,10 @@ const KritzelShapeFill = class {
|
|
|
32242
32371
|
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" })));
|
|
32243
32372
|
}
|
|
32244
32373
|
render() {
|
|
32245
|
-
return (index.h(index.Host, { key: '
|
|
32374
|
+
return (index.h(index.Host, { key: '6d38a9af2e4c4c7f86ab994c63fc074007c86b48' }, index.h("div", { key: 'cf58f26cb0e56e274873d11024209c6908d317bb', class: "fill-row" }, index.h("button", { key: 'c75eed70fe0c2fcbf0fd136bb6fce75b2dbfb45d', class: {
|
|
32246
32375
|
'fill-option': true,
|
|
32247
32376
|
'selected': this.value === 'transparent',
|
|
32248
|
-
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: '
|
|
32377
|
+
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), index.h("button", { key: '5d6ede439b5d5e55598cd8c20b5851fb9f210463', class: {
|
|
32249
32378
|
'fill-option': true,
|
|
32250
32379
|
'selected': this.value === 'filled',
|
|
32251
32380
|
}, onClick: () => this.handleFillChange('filled'), title: "Filled background" }, this.renderFillIcon('filled')))));
|
|
@@ -35449,9 +35578,9 @@ const KritzelShareDialog = class {
|
|
|
35449
35578
|
this.dialogClosed.emit();
|
|
35450
35579
|
};
|
|
35451
35580
|
render() {
|
|
35452
|
-
return (index.h(index.Host, { key: '
|
|
35581
|
+
return (index.h(index.Host, { key: 'f6028ad618f04e3be65c816f4b53c4ccaa93fc71' }, index.h("kritzel-dialog", { key: '7dabab65955f287650de4ba484e37f4ccdd7c57e', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, index.h("div", { key: '321e2b17048dea20528c0f34f39a462548c64689', class: "share-content" }, index.h("div", { key: 'b31bbe2f686f5fe2fdc03189ffb98082683fff63', class: "share-section" }, index.h("div", { key: '2c864e00aa4c2da0a7f8ee6c83f149e6e93610a5', class: "share-row" }, index.h("div", { key: 'cbee03ac7ec9ee82f22c77d3681d4a540a0780a3', class: "share-label-group" }, index.h("label", { key: '3be7c8dc2ac2f7dbfe6458a902b14a887895fdc3', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), index.h("p", { key: 'c7401bc76fdccbafc6c7c4e37380fc75f35b3a99', class: "share-description" }, this.internalIsPublic
|
|
35453
35582
|
? (this.terms['share.linkSharing.enabledDescription'] ?? 'Anyone with the link can access this workspace.')
|
|
35454
|
-
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '
|
|
35583
|
+
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), index.h("kritzel-slide-toggle", { key: '52ae14da0d79797e9ad73f1ffbac003fd1395f47', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (index.h("div", { key: 'bd44618680db14d7d95f0c1bbc4441a103e9f15a', class: "share-section" }, index.h("div", { key: '659cd6b2e2e719d76f692a8dc5a8c0855e5d246d', class: "share-url-container" }, index.h("input", { key: '76be432ecaad753cb7043aad912d8aa1770afb61', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: 'ef75a04964fb481fae2f6e924497eb2adedc100d', 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: '06bbdc32d4348ca6d75dbbe11ba74d94e1c86882', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (index.h("div", { key: '9246e86b26a9794738a29e6a6bfe6c4812339449', class: "share-qr-container" }, index.h("img", { key: '90e18eee230c23e0bfd773c9b8a6967803ae10dc', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
|
|
35455
35584
|
}
|
|
35456
35585
|
static get watchers() { return {
|
|
35457
35586
|
"isPublic": [{
|
|
@@ -35492,7 +35621,7 @@ const KritzelSlideToggle = class {
|
|
|
35492
35621
|
}
|
|
35493
35622
|
};
|
|
35494
35623
|
render() {
|
|
35495
|
-
return (index.h(index.Host, { key: '
|
|
35624
|
+
return (index.h(index.Host, { key: 'e310e7bc8c115feadaa2494a6a543719f1b25245', 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: 'fef37a1b373bf438cbacbf6537640269c2ab6b59', class: "toggle-track" }, index.h("div", { key: '4e140f83a8802e04c0b42e76f5e5719efd5a1cbc', class: "toggle-thumb" }))));
|
|
35496
35625
|
}
|
|
35497
35626
|
};
|
|
35498
35627
|
KritzelSlideToggle.style = kritzelSlideToggleCss();
|
|
@@ -35592,7 +35721,7 @@ const KritzelSplitButton = class {
|
|
|
35592
35721
|
this.menuScrollTop = event.target.scrollTop;
|
|
35593
35722
|
};
|
|
35594
35723
|
render() {
|
|
35595
|
-
return (index.h(index.Host, { key: '
|
|
35724
|
+
return (index.h(index.Host, { key: 'f7f5019b32f4514a4ccf5bd07742658e3d05020a', class: { mobile: this.isTouchDevice } }, index.h("button", { key: '361007b4281edfe2bf18f28f7c4f19ba1f251b49', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && index.h("kritzel-icon", { key: '17d4fad6cfa070225daa67dfc648d4ac64091e90', name: this.buttonIcon })), index.h("div", { key: 'c18107b7d557525092c28ff5d7336ebb3648b672', class: "split-divider" }), index.h("button", { key: 'c7a9a67d832f026fa8e21eff7ea5935cd72862ed', 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: '5b40284c8f04fba80ca606b0af201040efe53880', name: this.dropdownIcon })), index.h("kritzel-portal", { key: '62bd7f26c020497f2131759d0d1ef9d18e817b37', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, index.h("kritzel-menu", { key: 'a1a11a0ae33f9626db3cd56fbb881c613f1ab78c', 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 }))));
|
|
35596
35725
|
}
|
|
35597
35726
|
};
|
|
35598
35727
|
KritzelSplitButton.style = kritzelSplitButtonCss();
|
|
@@ -35613,7 +35742,7 @@ const KritzelStrokeSize = class {
|
|
|
35613
35742
|
}
|
|
35614
35743
|
render() {
|
|
35615
35744
|
const sizes = this.sizes ?? [];
|
|
35616
|
-
return (index.h(index.Host, { key: '
|
|
35745
|
+
return (index.h(index.Host, { key: 'c0307e527e6f9d5d663ae3f8f605162cdde2a339' }, index.h("div", { key: '9533e0486f8078d25b7e8fc3323126d77700ac72', class: "size-grid" }, sizes.map(size => (index.h("div", { tabIndex: 0, class: {
|
|
35617
35746
|
'size-container': true,
|
|
35618
35747
|
'selected': this.selectedSize === size,
|
|
35619
35748
|
}, onClick: () => this.handleSizeClick(size) }, index.h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -35632,7 +35761,7 @@ const KritzelSyncIndicator = class {
|
|
|
35632
35761
|
/** The text displayed next to the spinner. */
|
|
35633
35762
|
text = 'Syncing...';
|
|
35634
35763
|
render() {
|
|
35635
|
-
return (index.h(index.Host, { key: '
|
|
35764
|
+
return (index.h(index.Host, { key: '05e825ee1c08fe02008b8e1adfe9e09a7996f221' }, index.h("div", { key: 'ea1635896f643c16713d35d6efd3abf486b1fbe2', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, index.h("span", { key: '7b57ea67d6f2c40dc74e966c16ebe9d95c75394a', class: "spinner", "aria-hidden": "true" }), index.h("span", { key: 'fc16405b02d96213d0025239b6e863883192ada5' }, this.text))));
|
|
35636
35765
|
}
|
|
35637
35766
|
};
|
|
35638
35767
|
KritzelSyncIndicator.style = kritzelSyncIndicatorCss();
|
|
@@ -36045,14 +36174,14 @@ const KritzelTooltip = class {
|
|
|
36045
36174
|
}
|
|
36046
36175
|
}
|
|
36047
36176
|
render() {
|
|
36048
|
-
return (index.h(index.Host, { key: '
|
|
36177
|
+
return (index.h(index.Host, { key: '93486d37c5dcaaf9a3d0d1c53d6308ddd5712560', style: {
|
|
36049
36178
|
position: 'fixed',
|
|
36050
36179
|
zIndex: '9999',
|
|
36051
36180
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
36052
36181
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
36053
36182
|
left: `${this.positionX}px`,
|
|
36054
36183
|
bottom: `${this.positionY}px`,
|
|
36055
|
-
} }, index.h("div", { key: '
|
|
36184
|
+
} }, index.h("div", { key: '4b5cf451f75d09459145b874eb3c7faffafa87e0', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, index.h("slot", { key: '6c7fda100473a7d4fc533edc52d67bf6909bdc0e' }))));
|
|
36056
36185
|
}
|
|
36057
36186
|
static get watchers() { return {
|
|
36058
36187
|
"triggerElement": [{
|
|
@@ -36093,7 +36222,7 @@ const KritzelUtilityPanel = class {
|
|
|
36093
36222
|
this.redo.emit();
|
|
36094
36223
|
}
|
|
36095
36224
|
render() {
|
|
36096
|
-
return (index.h(index.Host, { key: '
|
|
36225
|
+
return (index.h(index.Host, { key: '57c1a6746e4d5b319bb368c9d0bfc52a31d8c8de' }, index.h("button", { key: '5fb00d62b68de41feda9fafb3eec46cc0b85ba0e', 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: '5ed2c36405ac7113ac697de9102aaf7067127e2a', name: "undo" })), index.h("button", { key: '0d58c8cbbb8e9547b9416dbf81a2c8011208dc6c', 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: '70264118cbe0f54335a02941fdc868f63476cd1c', name: "redo" })), index.h("div", { key: '6eed6a603b8bc62e55b1f6fe82e7d035d1f5833c', class: "utility-separator" }), index.h("button", { key: 'd11195da7a86496afcca26105a6a0f066b1b2340', 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: '5e4c731f90863b4db917c67ac7e87c2945c7bcaa', name: "delete" }))));
|
|
36097
36226
|
}
|
|
36098
36227
|
};
|
|
36099
36228
|
KritzelUtilityPanel.style = kritzelUtilityPanelCss();
|
|
@@ -36114,7 +36243,7 @@ const KritzelWatermark = class {
|
|
|
36114
36243
|
label;
|
|
36115
36244
|
render() {
|
|
36116
36245
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
36117
|
-
return (index.h(index.Host, { key: '
|
|
36246
|
+
return (index.h(index.Host, { key: 'ae00d98f16912afcb7a90d47a9fc4d55fc7468f0' }, index.h("a", { key: '8781f94c9efe44b0e7a7a8c20a119160cb9feb8e', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
|
|
36118
36247
|
}
|
|
36119
36248
|
};
|
|
36120
36249
|
KritzelWatermark.style = kritzelWatermarkCss();
|
|
@@ -36302,7 +36431,7 @@ const KritzelZoomPanel = class {
|
|
|
36302
36431
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
36303
36432
|
}
|
|
36304
36433
|
render() {
|
|
36305
|
-
return (index.h(index.Host, { key: '
|
|
36434
|
+
return (index.h(index.Host, { key: 'ac5b3f37fbc298b1522f0ff80c26734164b5358a' }, index.h("div", { key: '8ac3f3600c45c064d9c4c4c9efa78397790edf4b', class: { panel: true, visible: this.visible } }, index.h("button", { key: '63b2a3fce804a310146d95cc9c2a874707f9e265', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, index.h("kritzel-icon", { key: '86ebb85dfc2b746cedd0ed63cd2ae90378f6bbb8', name: "minus" })), index.h("span", { key: '5191cc1aa9966234c1634882af145403acd32211', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), index.h("button", { key: '47a7ee5b6c1cf1c99cd1826877e0a1c4ce224442', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, index.h("kritzel-icon", { key: '09782e094534fbc5bbcc612f24eea359568d6132', name: "plus" })))));
|
|
36306
36435
|
}
|
|
36307
36436
|
};
|
|
36308
36437
|
KritzelZoomPanel.style = kritzelZoomPanelCss();
|