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