@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,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, c as createEvent, g as getElement, f as forceUpdate } from './index-2x7dfLlM.js';
|
|
2
2
|
import { KritzelColorHelper as KritzelColorHelper$1, KritzelHTMLHelper as KritzelHTMLHelper$1, ABSOLUTE_SCALE_MAX as ABSOLUTE_SCALE_MAX$1, ABSOLUTE_SCALE_MIN as ABSOLUTE_SCALE_MIN$1, KritzelSelectionTool as KritzelSelectionTool$1, DEFAULT_BRUSH_CONFIG, KritzelBrushTool as KritzelBrushTool$1, KritzelEraserTool as KritzelEraserTool$1, DEFAULT_LINE_TOOL_CONFIG, KritzelLineTool as KritzelLineTool$1, ShapeType as ShapeType$1, DEFAULT_SHAPE_CONFIG, KritzelShapeTool as KritzelShapeTool$1, DEFAULT_TEXT_CONFIG, KritzelTextTool as KritzelTextTool$1, KritzelImageTool as KritzelImageTool$1, KritzelAlignment as KritzelAlignment$1, hasRemoteSyncProvider, DEFAULT_SYNC_CONFIG as DEFAULT_SYNC_CONFIG$1, DEFAULT_ASSET_STORAGE_CONFIG, ObjectHelper as ObjectHelper$1, resolveTextToolAvailableFonts as resolveTextToolAvailableFonts$1, ThemeHelper as ThemeHelper$1, darkTheme as darkTheme$1, lightTheme as lightTheme$1, KritzelSelectionGroup as KritzelSelectionGroup$1, KritzelSelectionBox as KritzelSelectionBox$1, KritzelIconRegistry as KritzelIconRegistry$1, KritzelFontRegistry as KritzelFontRegistry$1, KritzelKeyboardHelper as KritzelKeyboardHelper$1, KritzelDevicesHelper as KritzelDevicesHelper$1, KRITZEL_VERSION, CURRENT_APP_STATE_SCHEMA_VERSION as CURRENT_APP_STATE_SCHEMA_VERSION$1, CURRENT_WORKSPACE_SCHEMA_VERSION as CURRENT_WORKSPACE_SCHEMA_VERSION$1, KritzelToolConfigHelper, KritzelWorkspace as KritzelWorkspace$1 } from '@kritzel/engine';
|
|
3
3
|
|
|
4
|
-
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}`;
|
|
4
|
+
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}`;
|
|
5
5
|
|
|
6
6
|
const KritzelActiveUsers = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -127,16 +127,16 @@ const KritzelAvatar = class {
|
|
|
127
127
|
height: `${this.size}px`,
|
|
128
128
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
129
129
|
};
|
|
130
|
-
return (h(Host, { key: '
|
|
130
|
+
return (h(Host, { key: 'd66c2ec474fed4b7b07687f1a02d0d97f893b689', style: containerStyles, class: {
|
|
131
131
|
'has-image': !!showImage,
|
|
132
132
|
'has-initials': !!showInitials,
|
|
133
133
|
'has-default': !!showDefaultIcon,
|
|
134
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '
|
|
134
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'd2aefda3897b2278c0d640c75084335f6786bd3b', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
135
135
|
if (el) {
|
|
136
136
|
el.referrerPolicy = 'no-referrer';
|
|
137
137
|
el.crossOrigin = 'anonymous';
|
|
138
138
|
}
|
|
139
|
-
}, onError: this.handleImageError })), showInitials && (h("span", { key: '
|
|
139
|
+
}, onError: this.handleImageError })), showInitials && (h("span", { key: '1837201e58bcb96877981f0970edcc39ba6058e6', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '9578696c0b5ca200ccf82586e49e42ab57909aee', class: "avatar-default" }, h("svg", { key: 'cf521d25aa25a6f8af921d6179a99077a42752ef', viewBox: "0 0 24 24", fill: "currentColor" }, 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" }))))));
|
|
140
140
|
}
|
|
141
141
|
static get watchers() { return {
|
|
142
142
|
"user": [{
|
|
@@ -197,6 +197,19 @@ class ObjectHelper {
|
|
|
197
197
|
static isClass(object, className) {
|
|
198
198
|
return !!object && object.__class__ === className;
|
|
199
199
|
}
|
|
200
|
+
static isKritzelEmbeddedObject(object) {
|
|
201
|
+
if (!object || typeof object !== 'object') {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
const candidate = object;
|
|
205
|
+
return (typeof candidate.isInteractive === 'boolean' &&
|
|
206
|
+
typeof candidate.isSelected === 'boolean' &&
|
|
207
|
+
typeof candidate.mount === 'function' &&
|
|
208
|
+
typeof candidate.unmount === 'function' &&
|
|
209
|
+
typeof candidate.setIsInteractive === 'function' &&
|
|
210
|
+
typeof candidate.hasFocusedInputElement === 'function' &&
|
|
211
|
+
typeof candidate.getEmbeddedContentRoots === 'function');
|
|
212
|
+
}
|
|
200
213
|
static isKritzelExportable(object) {
|
|
201
214
|
if (!object || typeof object !== 'object') {
|
|
202
215
|
return false;
|
|
@@ -1446,6 +1459,7 @@ const lightTheme = {
|
|
|
1446
1459
|
dividerColor: '#e0e0e0',
|
|
1447
1460
|
focusColor: '#333333',
|
|
1448
1461
|
focusRingColor: '#333333',
|
|
1462
|
+
fontFamily: 'sans-serif',
|
|
1449
1463
|
iconColor: 'currentColor',
|
|
1450
1464
|
scrollbarThumbColor: '#ebebeb',
|
|
1451
1465
|
textPrimary: '#000000',
|
|
@@ -1534,7 +1548,6 @@ const lightTheme = {
|
|
|
1534
1548
|
closeButtonColor: '#333333',
|
|
1535
1549
|
closeButtonHoverBackground: 'hsl(0, 0%, 0%, 4.3%)',
|
|
1536
1550
|
closeButtonHoverColor: '#000000',
|
|
1537
|
-
fontFamily: 'inherit',
|
|
1538
1551
|
footerBorder: '1px solid #ebebeb',
|
|
1539
1552
|
headerBorder: '1px solid #ebebeb',
|
|
1540
1553
|
titleColor: '#000000',
|
|
@@ -1569,11 +1582,6 @@ const lightTheme = {
|
|
|
1569
1582
|
loadingOverlayColor: '#333333',
|
|
1570
1583
|
loadingOverlaySpinnerActiveColor: '#333333',
|
|
1571
1584
|
loadingOverlaySpinnerColor: '#cccccc',
|
|
1572
|
-
syncIndicatorBackground: 'rgba(255, 255, 255, 0.92)',
|
|
1573
|
-
syncIndicatorColor: '#334155',
|
|
1574
|
-
syncIndicatorSpinnerColor: '#007AFF',
|
|
1575
|
-
syncIndicatorSpinnerTrack: 'rgba(148, 163, 184, 0.35)',
|
|
1576
|
-
syncIndicatorZIndex: '10001',
|
|
1577
1585
|
},
|
|
1578
1586
|
snap: {
|
|
1579
1587
|
indicatorFill: 'rgba(59, 130, 246, 0.3)',
|
|
@@ -1793,6 +1801,7 @@ const darkTheme = {
|
|
|
1793
1801
|
dividerColor: '#3a3a3a',
|
|
1794
1802
|
focusColor: '#ffffff',
|
|
1795
1803
|
focusRingColor: '#ffffff',
|
|
1804
|
+
fontFamily: 'sans-serif',
|
|
1796
1805
|
iconColor: 'currentColor',
|
|
1797
1806
|
scrollbarThumbColor: '#555555',
|
|
1798
1807
|
textPrimary: '#ffffff',
|
|
@@ -1915,11 +1924,6 @@ const darkTheme = {
|
|
|
1915
1924
|
loadingOverlayColor: '#e0e0e0',
|
|
1916
1925
|
loadingOverlaySpinnerActiveColor: '#e0e0e0',
|
|
1917
1926
|
loadingOverlaySpinnerColor: '#555555',
|
|
1918
|
-
syncIndicatorBackground: 'rgba(30, 30, 30, 0.95)',
|
|
1919
|
-
syncIndicatorColor: '#e0e0e0',
|
|
1920
|
-
syncIndicatorSpinnerColor: '#0A84FF',
|
|
1921
|
-
syncIndicatorSpinnerTrack: 'rgba(160, 160, 160, 0.3)',
|
|
1922
|
-
syncIndicatorZIndex: '10001',
|
|
1923
1927
|
},
|
|
1924
1928
|
snap: {
|
|
1925
1929
|
indicatorFill: 'rgba(10, 132, 255, 0.35)',
|
|
@@ -3296,7 +3300,7 @@ class KritzelLine extends KritzelBaseObject {
|
|
|
3296
3300
|
}
|
|
3297
3301
|
}
|
|
3298
3302
|
|
|
3299
|
-
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,
|
|
3303
|
+
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}`;
|
|
3300
3304
|
|
|
3301
3305
|
const STALE_THRESHOLD_MS = 10_000;
|
|
3302
3306
|
const REMOVE_THRESHOLD_MS = 30_000;
|
|
@@ -3501,7 +3505,7 @@ const KritzelAwarenessCursors = class {
|
|
|
3501
3505
|
}
|
|
3502
3506
|
render() {
|
|
3503
3507
|
const cursors = Array.from(this.remoteCursors.values());
|
|
3504
|
-
return (h(Host, { key: '
|
|
3508
|
+
return (h(Host, { key: '2021875ea3e430c04da438dc5b7a2c22f119ea67' }, cursors.map(remoteCursor => {
|
|
3505
3509
|
if (!remoteCursor.cursor)
|
|
3506
3510
|
return null;
|
|
3507
3511
|
// When a remote user is actively drawing, derive cursor position from
|
|
@@ -3608,12 +3612,12 @@ const KritzelBackToContent = class {
|
|
|
3608
3612
|
this.backToContent.emit();
|
|
3609
3613
|
};
|
|
3610
3614
|
render() {
|
|
3611
|
-
return (h(Host, { key: '
|
|
3615
|
+
return (h(Host, { key: '335205a7ec6430235c54941828b7491d75472778' }, h("button", { key: '176e473183c4d58607a697c924035baec67c138d', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, h("kritzel-icon", { key: '44ad49916d1ee99fed8e635de65f7ae337235ecb', name: "chevronsLeft" }))));
|
|
3612
3616
|
}
|
|
3613
3617
|
};
|
|
3614
3618
|
KritzelBackToContent.style = kritzelBackToContentCss();
|
|
3615
3619
|
|
|
3616
|
-
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}`;
|
|
3620
|
+
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}`;
|
|
3617
3621
|
|
|
3618
3622
|
const KritzelButton = class {
|
|
3619
3623
|
constructor(hostRef) {
|
|
@@ -3635,16 +3639,16 @@ const KritzelButton = class {
|
|
|
3635
3639
|
this.buttonClick.emit();
|
|
3636
3640
|
};
|
|
3637
3641
|
render() {
|
|
3638
|
-
return (h(Host, { key: '
|
|
3642
|
+
return (h(Host, { key: 'e88abc53a52cd32846b389f9de239d3f98b7230f' }, h("button", { key: 'de77c4ac750f35766b9657276addf78068be1575', type: this.type, class: {
|
|
3639
3643
|
'kritzel-button': true,
|
|
3640
3644
|
[this.variant]: true,
|
|
3641
3645
|
'disabled': this.disabled,
|
|
3642
|
-
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '
|
|
3646
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: 'bdd2227879415dccc23676cf219ef17b1dd104fe' }))));
|
|
3643
3647
|
}
|
|
3644
3648
|
};
|
|
3645
3649
|
KritzelButton.style = kritzelButtonCss();
|
|
3646
3650
|
|
|
3647
|
-
const kritzelColorCss = () => `:host{display:flex}.checkerboard-bg{background:repeating-conic-gradient(
|
|
3651
|
+
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)}`;
|
|
3648
3652
|
|
|
3649
3653
|
const KritzelColorComponent = class {
|
|
3650
3654
|
constructor(hostRef) {
|
|
@@ -3687,13 +3691,13 @@ const KritzelColorComponent = class {
|
|
|
3687
3691
|
render() {
|
|
3688
3692
|
const resolvedColor = this.resolveColor();
|
|
3689
3693
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
3690
|
-
return (h(Host, { key: '
|
|
3694
|
+
return (h(Host, { key: 'b75cfa0ca9d5927fe9cb1331f7e4163abc34c0c1' }, h("div", { key: '197ec4d1daaf5804b69907b8de074784686face4', class: "checkerboard-bg", style: {
|
|
3691
3695
|
width: `${this.size}px`,
|
|
3692
3696
|
height: `${this.size}px`,
|
|
3693
3697
|
borderRadius: '50%',
|
|
3694
3698
|
display: 'inline-block',
|
|
3695
3699
|
position: 'relative',
|
|
3696
|
-
} }, h("div", { key: '
|
|
3700
|
+
} }, h("div", { key: 'ed8b7dc412569d05c747014a32948930c392b980', class: {
|
|
3697
3701
|
'color-circle': true,
|
|
3698
3702
|
'white': isColorVeryLight,
|
|
3699
3703
|
}, style: {
|
|
@@ -3749,7 +3753,7 @@ const KritzelColorPalette = class {
|
|
|
3749
3753
|
render() {
|
|
3750
3754
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
3751
3755
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
3752
|
-
return (h(Host, { key: '
|
|
3756
|
+
return (h(Host, { key: 'cfdd5136f512aed23198d4a55c628ccd675f08c9' }, h("div", { key: 'bb5445f68b9d17268c6def7cfc4a2dd1fb971c53', class: {
|
|
3753
3757
|
'color-grid': true,
|
|
3754
3758
|
'expanded': this.isExpanded,
|
|
3755
3759
|
}, style: {
|
|
@@ -3764,7 +3768,7 @@ const KritzelColorPalette = class {
|
|
|
3764
3768
|
};
|
|
3765
3769
|
KritzelColorPalette.style = kritzelColorPaletteCss();
|
|
3766
3770
|
|
|
3767
|
-
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}`;
|
|
3771
|
+
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}`;
|
|
3768
3772
|
|
|
3769
3773
|
const VIEWPORT_PADDING = 8;
|
|
3770
3774
|
const SUBMENU_DELAY = 150;
|
|
@@ -3995,7 +3999,7 @@ const KritzelContextMenu = class {
|
|
|
3995
3999
|
const submenuOpen = hasChildren && this.isSubmenuOpen(path);
|
|
3996
4000
|
return [
|
|
3997
4001
|
showDivider && h("div", { class: "menu-divider", key: `divider-${path}` }),
|
|
3998
|
-
h("div", { class: "menu-item-wrapper", key: `wrapper-${path}`, ref: el => el && this.menuItemWrapperRefs.set(path, el), onMouseEnter: () => this.handleItemMouseEnter(path, hasChildren) }, 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 && h("kritzel-icon", { name: item.icon, size: 16 }), h("span", { class: "label" }, item.label), hasChildren && h("kritzel-icon", { name: "
|
|
4002
|
+
h("div", { class: "menu-item-wrapper", key: `wrapper-${path}`, ref: el => el && this.menuItemWrapperRefs.set(path, el), onMouseEnter: () => this.handleItemMouseEnter(path, hasChildren) }, 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 && h("kritzel-icon", { name: item.icon, size: 16 }), h("span", { class: "label" }, item.label), hasChildren && h("kritzel-icon", { name: "chevronRight", size: 12, class: "submenu-arrow" })), hasChildren && submenuOpen && this.renderSubmenu(processedChildren, path)),
|
|
3999
4003
|
];
|
|
4000
4004
|
});
|
|
4001
4005
|
}
|
|
@@ -4035,7 +4039,7 @@ const KritzelCurrentUser = class {
|
|
|
4035
4039
|
/** Resolved localized strings keyed by term key, supplied by the editor. */
|
|
4036
4040
|
terms = {};
|
|
4037
4041
|
render() {
|
|
4038
|
-
return (h(Host, { key: '
|
|
4042
|
+
return (h(Host, { key: 'e6b56d76dd339fd10216a4d788d56de1fdd20fc6' }, h("kritzel-avatar", { key: '03445e8fe4c43aa4015b6ec124ac731baec03a22', user: this.user, size: this.avatarSize })));
|
|
4039
4043
|
}
|
|
4040
4044
|
};
|
|
4041
4045
|
KritzelCurrentUser.style = kritzelCurrentUserCss();
|
|
@@ -4076,7 +4080,7 @@ const KritzelCurrentUserDialog = class {
|
|
|
4076
4080
|
}
|
|
4077
4081
|
render() {
|
|
4078
4082
|
const displayName = this.getDisplayName();
|
|
4079
|
-
return (h(Host, { key: '
|
|
4083
|
+
return (h(Host, { key: '267ed65fe03d4de50880b5957c717c47fd2ec0c9' }, h("kritzel-dialog", { key: '7c5ef6bb8b29f04cc194cde990658869a0919015', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: '734e5f893425d5d89631ad7c3e95697edd751837', class: "user-info" }, h("kritzel-avatar", { key: '926a957b6d7f78184a98f4ad96480b29210e6184', user: this.user, size: 80 }), displayName && h("div", { key: '054d3a724d0785d2a161fdcba23ca33c07dc18e2', class: "user-name" }, displayName), this.user?.email && h("div", { key: 'a401b8f48d9dcd4ec990072f63a27111c476c224', class: "user-email" }, this.user.email), h("kritzel-button", { key: 'b1e8757279910a71dbee12be19635b4aa55bd23e', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
|
|
4080
4084
|
}
|
|
4081
4085
|
};
|
|
4082
4086
|
KritzelCurrentUserDialog.style = kritzelCurrentUserDialogCss();
|
|
@@ -4156,7 +4160,7 @@ const KritzelCursorTrail = class {
|
|
|
4156
4160
|
}
|
|
4157
4161
|
}
|
|
4158
4162
|
render() {
|
|
4159
|
-
return (h(Host, { key: '
|
|
4163
|
+
return (h(Host, { key: '39d026a0d4c444564f146a90ea1a51181d0652b7' }, this.cursorTrailPoints.length > 1 && (h("svg", { key: '927e52cd0828a548ba58e0e783b1d148a40c968c', class: "cursor-trail-svg", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
4160
4164
|
position: 'absolute',
|
|
4161
4165
|
left: '0',
|
|
4162
4166
|
top: '0',
|
|
@@ -4179,7 +4183,7 @@ const KritzelCursorTrail = class {
|
|
|
4179
4183
|
};
|
|
4180
4184
|
KritzelCursorTrail.style = kritzelCursorTrailCss();
|
|
4181
4185
|
|
|
4182
|
-
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,
|
|
4186
|
+
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}`;
|
|
4183
4187
|
|
|
4184
4188
|
const KritzelDialog = class {
|
|
4185
4189
|
constructor(hostRef) {
|
|
@@ -4622,7 +4626,7 @@ const KritzelDialog = class {
|
|
|
4622
4626
|
};
|
|
4623
4627
|
KritzelDialog.style = kritzelDialogCss();
|
|
4624
4628
|
|
|
4625
|
-
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,
|
|
4629
|
+
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}`;
|
|
4626
4630
|
|
|
4627
4631
|
const KritzelDropdown = class {
|
|
4628
4632
|
constructor(hostRef) {
|
|
@@ -4860,7 +4864,7 @@ const KritzelDropdown = class {
|
|
|
4860
4864
|
'open-up': this.openDirection === 'up',
|
|
4861
4865
|
'open-down': this.openDirection === 'down',
|
|
4862
4866
|
};
|
|
4863
|
-
return (h(Host, { key: '
|
|
4867
|
+
return (h(Host, { key: 'c606b338e55dc66396105fa7b4fbdf372f3866e6' }, h("div", { key: 'aa32b73cac337fa4142ecc124cf039a59e3b3118', class: "dropdown-wrapper", ref: el => (this.wrapperElement = el) }, h("slot", { key: '2cd8e9ef246a24c49d58f76f227f36aed4786178', name: "prefix", ref: el => (this.prefixSlotElement = el), onSlotchange: this.evaluatePrefixContent }), h("div", { key: '80df8155e1907017d508e92f155bab5ae12dffab', class: "dropdown-container", style: { width: this.width } }, 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) }, h("span", { key: '4ef6a997f7a781fb409e97ed5bd6843d0eaff0bb', class: "dropdown-trigger-label" }, this.getSelectedLabel()), h("span", { key: '6601efcd69d84af1f022d14ede628bac743cc1f1', class: "dropdown-trigger-arrow", "aria-hidden": "true" }, 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" }, h("polyline", { key: 'a340af5a61dccf5bc29c8a473726b58055c2e9db', points: "6 9 12 15 18 9" }))))), h("slot", { key: '5bd4e5ad4cc4642c7769ecac2106ba82bae626f2', name: "suffix", ref: el => (this.suffixSlotElement = el), onSlotchange: this.evaluateSuffixContent }), h("ul", { key: 'e7a2be8ac261bc5fa1450940e2a57090d6be3315', class: menuClasses, role: "listbox", tabindex: "-1", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElement = el) }, this.options.map((option, index) => {
|
|
4864
4868
|
const isSelected = option.value === this.internalValue;
|
|
4865
4869
|
const isFocused = index === this.focusedIndex;
|
|
4866
4870
|
const optionClasses = {
|
|
@@ -4882,7 +4886,7 @@ const KritzelDropdown = class {
|
|
|
4882
4886
|
};
|
|
4883
4887
|
KritzelDropdown.style = kritzelDropdownCss();
|
|
4884
4888
|
|
|
4885
|
-
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)
|
|
4889
|
+
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}`;
|
|
4886
4890
|
|
|
4887
4891
|
const KritzelEditor = class {
|
|
4888
4892
|
constructor(hostRef) {
|
|
@@ -4952,12 +4956,12 @@ const KritzelEditor = class {
|
|
|
4952
4956
|
name: 'shape',
|
|
4953
4957
|
type: 'tool',
|
|
4954
4958
|
tool: KritzelShapeTool$1,
|
|
4955
|
-
icon: '
|
|
4959
|
+
icon: 'shapeRectangle',
|
|
4956
4960
|
config: DEFAULT_SHAPE_CONFIG,
|
|
4957
4961
|
subOptions: [
|
|
4958
|
-
{ id: 'rectangle', icon: '
|
|
4959
|
-
{ id: 'ellipse', icon: '
|
|
4960
|
-
{ id: 'triangle', icon: '
|
|
4962
|
+
{ id: 'rectangle', icon: 'shapeRectangle', label: 'Rectangle', value: ShapeType$1.Rectangle, toolProperty: 'shapeType' },
|
|
4963
|
+
{ id: 'ellipse', icon: 'shapeEllipse', label: 'Ellipse', value: ShapeType$1.Ellipse, toolProperty: 'shapeType' },
|
|
4964
|
+
{ id: 'triangle', icon: 'shapeTriangle', label: 'Triangle', value: ShapeType$1.Triangle, toolProperty: 'shapeType' },
|
|
4961
4965
|
],
|
|
4962
4966
|
},
|
|
4963
4967
|
{
|
|
@@ -4986,7 +4990,7 @@ const KritzelEditor = class {
|
|
|
4986
4990
|
},
|
|
4987
4991
|
{
|
|
4988
4992
|
label: 'menu.selectAll',
|
|
4989
|
-
icon: '
|
|
4993
|
+
icon: 'selectAll',
|
|
4990
4994
|
action: () => this.selectAllObjectsInViewport(),
|
|
4991
4995
|
},
|
|
4992
4996
|
];
|
|
@@ -5017,10 +5021,10 @@ const KritzelEditor = class {
|
|
|
5017
5021
|
icon: 'ordering',
|
|
5018
5022
|
group: 'other',
|
|
5019
5023
|
children: [
|
|
5020
|
-
{ label: 'menu.bringToFront', icon: '
|
|
5021
|
-
{ label: 'menu.sendToBack', icon: '
|
|
5022
|
-
{ label: 'menu.moveUp', icon: '
|
|
5023
|
-
{ label: 'menu.moveDown', icon: '
|
|
5024
|
+
{ label: 'menu.bringToFront', icon: 'bringToFront', action: () => this.engineRef.bringToFront() },
|
|
5025
|
+
{ label: 'menu.sendToBack', icon: 'sendToBack', action: () => this.engineRef.sendToBack() },
|
|
5026
|
+
{ label: 'menu.moveUp', icon: 'arrowUpFromDot', action: () => this.engineRef.bringForward() },
|
|
5027
|
+
{ label: 'menu.moveDown', icon: 'arrowDownFromDot', action: () => this.engineRef.sendBackward() },
|
|
5024
5028
|
],
|
|
5025
5029
|
},
|
|
5026
5030
|
{
|
|
@@ -5028,12 +5032,12 @@ const KritzelEditor = class {
|
|
|
5028
5032
|
icon: 'align',
|
|
5029
5033
|
group: 'other',
|
|
5030
5034
|
children: [
|
|
5031
|
-
{ label: 'menu.alignLeft', icon: '
|
|
5032
|
-
{ label: 'menu.alignCenterHorizontal', icon: '
|
|
5033
|
-
{ label: 'menu.alignRight', icon: '
|
|
5034
|
-
{ label: 'menu.alignTop', icon: '
|
|
5035
|
-
{ label: 'menu.alignCenterVertical', icon: '
|
|
5036
|
-
{ label: 'menu.alignBottom', icon: '
|
|
5035
|
+
{ label: 'menu.alignLeft', icon: 'alignStartVertical', action: () => this.engineRef.alignObjects(KritzelAlignment$1.StartHorizontal) },
|
|
5036
|
+
{ label: 'menu.alignCenterHorizontal', icon: 'alignCenterHorizontal', action: () => this.engineRef.alignObjects(KritzelAlignment$1.CenterHorizontal) },
|
|
5037
|
+
{ label: 'menu.alignRight', icon: 'alignEndVertical', action: () => this.engineRef.alignObjects(KritzelAlignment$1.EndHorizontal) },
|
|
5038
|
+
{ label: 'menu.alignTop', icon: 'alignStartHorizontal', action: () => this.engineRef.alignObjects(KritzelAlignment$1.StartVertical) },
|
|
5039
|
+
{ label: 'menu.alignCenterVertical', icon: 'alignCenterVertical', action: () => this.engineRef.alignObjects(KritzelAlignment$1.CenterVertical) },
|
|
5040
|
+
{ label: 'menu.alignBottom', icon: 'alignEndHorizontal', action: () => this.engineRef.alignObjects(KritzelAlignment$1.EndVertical) },
|
|
5037
5041
|
],
|
|
5038
5042
|
},
|
|
5039
5043
|
{
|
|
@@ -5206,6 +5210,9 @@ const KritzelEditor = class {
|
|
|
5206
5210
|
onCustomFontsChange(newValue) {
|
|
5207
5211
|
void this.registerCustomFonts(newValue);
|
|
5208
5212
|
}
|
|
5213
|
+
onCustomSvgIconsChange(newValue) {
|
|
5214
|
+
this.registerCustomSvgIcons(newValue);
|
|
5215
|
+
}
|
|
5209
5216
|
onMoreMenuItemsChange() {
|
|
5210
5217
|
this.recomputeMoreMenuItems();
|
|
5211
5218
|
}
|
|
@@ -5378,12 +5385,11 @@ const KritzelEditor = class {
|
|
|
5378
5385
|
async reinitSync() {
|
|
5379
5386
|
return this.engineRef.reinitSync();
|
|
5380
5387
|
}
|
|
5381
|
-
// ── Tool management ─────────────────────────────────────────────────
|
|
5382
5388
|
async registerTool(toolName, toolClass, toolConfig) {
|
|
5383
5389
|
return this.engineRef.registerTool(toolName, toolClass, toolConfig);
|
|
5384
5390
|
}
|
|
5385
|
-
async
|
|
5386
|
-
return this.engineRef.
|
|
5391
|
+
async setActiveTool(toolName) {
|
|
5392
|
+
return this.engineRef.setActiveTool(toolName);
|
|
5387
5393
|
}
|
|
5388
5394
|
async disable() {
|
|
5389
5395
|
return this.engineRef.disable();
|
|
@@ -5622,15 +5628,21 @@ const KritzelEditor = class {
|
|
|
5622
5628
|
loginDialogRef;
|
|
5623
5629
|
currentUserDialogRef;
|
|
5624
5630
|
componentWillLoad() {
|
|
5631
|
+
this.registerCustomSvgIcons(this.customSvgIcons);
|
|
5625
5632
|
this.recomputeMoreMenuItems();
|
|
5626
5633
|
this.loadSettingsFromStorage();
|
|
5627
5634
|
this.applyTheme();
|
|
5628
5635
|
}
|
|
5636
|
+
componentWillRender() {
|
|
5637
|
+
this.registerCustomSvgIcons(this.customSvgIcons);
|
|
5638
|
+
}
|
|
5629
5639
|
isTextToolConfig(config) {
|
|
5630
5640
|
return !!config && 'fontFamily' in config && 'size' in config && 'color' in config;
|
|
5631
5641
|
}
|
|
5632
5642
|
lastToolbarItemsRef = null;
|
|
5633
5643
|
lastNormalizedToolbarItems = [];
|
|
5644
|
+
lastToolsSource = null;
|
|
5645
|
+
lastTools = [];
|
|
5634
5646
|
getNormalizedToolbarItems() {
|
|
5635
5647
|
if (this.toolbarItems !== this.lastToolbarItemsRef) {
|
|
5636
5648
|
this.lastToolbarItemsRef = this.toolbarItems;
|
|
@@ -5638,6 +5650,16 @@ const KritzelEditor = class {
|
|
|
5638
5650
|
}
|
|
5639
5651
|
return this.lastNormalizedToolbarItems;
|
|
5640
5652
|
}
|
|
5653
|
+
getTools() {
|
|
5654
|
+
const normalizedToolbarItems = this.getNormalizedToolbarItems();
|
|
5655
|
+
if (normalizedToolbarItems !== this.lastToolsSource) {
|
|
5656
|
+
this.lastToolsSource = normalizedToolbarItems;
|
|
5657
|
+
this.lastTools = normalizedToolbarItems
|
|
5658
|
+
.filter(item => item.type === 'tool' && !!item.tool)
|
|
5659
|
+
.map(item => ({ name: item.name, tool: item.tool, config: item.config }));
|
|
5660
|
+
}
|
|
5661
|
+
return this.lastTools;
|
|
5662
|
+
}
|
|
5641
5663
|
normalizeToolbar(toolbarItems) {
|
|
5642
5664
|
return toolbarItems.map(control => {
|
|
5643
5665
|
if (!this.isTextToolConfig(control.config)) {
|
|
@@ -5666,7 +5688,6 @@ const KritzelEditor = class {
|
|
|
5666
5688
|
return this.themes?.find(t => t.name === this.theme) ?? (this.theme === 'dark' ? darkTheme$1 : lightTheme$1);
|
|
5667
5689
|
}
|
|
5668
5690
|
componentDidLoad() {
|
|
5669
|
-
this.registerCustomSvgIcons();
|
|
5670
5691
|
this.registerCustomFonts();
|
|
5671
5692
|
this.listenForMobileKeyboard();
|
|
5672
5693
|
this.setOsSpecificCssVariables();
|
|
@@ -6032,10 +6053,13 @@ const KritzelEditor = class {
|
|
|
6032
6053
|
getContentObjects(objects) {
|
|
6033
6054
|
return objects.filter(obj => !(obj instanceof KritzelSelectionGroup$1) && !(obj instanceof KritzelSelectionBox$1));
|
|
6034
6055
|
}
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6056
|
+
lastCustomSvgIcons;
|
|
6057
|
+
registerCustomSvgIcons(icons) {
|
|
6058
|
+
if (icons === this.lastCustomSvgIcons) {
|
|
6059
|
+
return;
|
|
6038
6060
|
}
|
|
6061
|
+
this.lastCustomSvgIcons = icons;
|
|
6062
|
+
KritzelIconRegistry$1.registerIcons(icons ?? {});
|
|
6039
6063
|
}
|
|
6040
6064
|
async registerCustomFonts(fonts = this.customFonts) {
|
|
6041
6065
|
KritzelFontRegistry$1.registerFonts(fonts);
|
|
@@ -6095,48 +6119,49 @@ const KritzelEditor = class {
|
|
|
6095
6119
|
const shouldShowCurrentUser = isLoggedIn;
|
|
6096
6120
|
const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
|
|
6097
6121
|
const normalizedToolbarItems = this.getNormalizedToolbarItems();
|
|
6098
|
-
|
|
6122
|
+
const tools = this.getTools();
|
|
6123
|
+
return (h(Host, { key: '939e4336009f65e1d1a3ec9b756de38a5fa942d6' }, h("div", { key: 'c216ac3097a8472ba74532b2c6c300efd90134cf', class: "editor-content", style: {
|
|
6099
6124
|
opacity: this.isEditorVisible ? '1' : '0',
|
|
6100
6125
|
visibility: this.isEditorVisible ? 'visible' : 'hidden',
|
|
6101
6126
|
transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
|
|
6102
|
-
} }, h("div", { key: '
|
|
6127
|
+
} }, h("div", { key: '6796a763912435553cde891847302746491f493b', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'e13510ec3f76f8aab2c3b0771c3363d92d93cc6a', ref: el => {
|
|
6103
6128
|
if (el) {
|
|
6104
6129
|
this.workspaceManagerRef = el;
|
|
6105
6130
|
}
|
|
6106
|
-
}, visible: this.isWorkspaceManagerVisible, workspaces: this.availableWorkspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => this.handleWorkspaceManagerChange(event), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: '
|
|
6131
|
+
}, visible: this.isWorkspaceManagerVisible, workspaces: this.availableWorkspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => this.handleWorkspaceManagerChange(event), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: '9115ee23e578a66f46b202623c241277ef092544', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: 'd4379f4d0e4f8b3cf2693f34304b03b1e5a75255', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: '01151742b1338423e669d2382ebe9ad55322c43b', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, 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 && (h("kritzel-context-menu", { key: '8141865c0beb036f28c135bc41054a68a7b05d01', class: "context-menu", items: this.contextMenuState.items, objects: this.contextMenuState.objects, style: {
|
|
6107
6132
|
position: 'absolute',
|
|
6108
6133
|
left: `${this.contextMenuState.position.x}px`,
|
|
6109
6134
|
top: `${this.contextMenuState.position.y}px`,
|
|
6110
6135
|
zIndex: '10002',
|
|
6111
|
-
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-loading-overlay", { key: '
|
|
6136
|
+
}, onActionSelected: event => this.handleContextMenuActionSelected(event), onClose: () => this.hideContextMenu() })), h("kritzel-loading-overlay", { key: 'a4b6a7389387641c0fe0fe44b7c0948c66d8cdfc', visible: this.isLoadingOverlayVisible, text: this.resolvedTerms['editor.loading'] ?? 'Loading...' }), h("kritzel-engine", { key: '0b3e551a97e2c40548d7dc479fca5f408035a8f4', ref: el => {
|
|
6112
6137
|
if (el) {
|
|
6113
6138
|
this.engineRef = el;
|
|
6114
6139
|
}
|
|
6115
|
-
}, 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) }), h("kritzel-toolbar", { key: '
|
|
6140
|
+
}, 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) }), h("kritzel-toolbar", { key: '3240c2481021aa017a26e1e3e3618d346a3bf1b9', visible: this.isToolbarVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
|
|
6116
6141
|
if (el) {
|
|
6117
6142
|
this.toolbarRef = el;
|
|
6118
6143
|
}
|
|
6119
|
-
}, toolbarItems: normalizedToolbarItems, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsToolbarReady: () => (this.isToolbarReady = true) }), h("div", { key: '
|
|
6144
|
+
}, toolbarItems: normalizedToolbarItems, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsToolbarReady: () => (this.isToolbarReady = true) }), h("div", { key: 'ba83e4189b6ee8a6e060f3d26b4863ff1d5768d2', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: '7725ee71671d68411c5f6bb5da6e2737338880f0', visible: this.isZoomPanelVisible, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: '1a4f0c9f1c8acf2703e0d101d6e6288f976af7f7', class: "top-right-buttons" }, h("kritzel-settings", { key: 'd14c088c5ed85d4e63b7b478a742e4b01921dec9', ref: el => {
|
|
6120
6145
|
if (el) {
|
|
6121
6146
|
this.settingsRef = el;
|
|
6122
6147
|
}
|
|
6123
|
-
}, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '
|
|
6148
|
+
}, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '22b5848fd3c395c9c06f67f13b2de5ebe7f20ffe', ref: el => {
|
|
6124
6149
|
if (el) {
|
|
6125
6150
|
this.exportRef = el;
|
|
6126
6151
|
}
|
|
6127
|
-
}, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '
|
|
6152
|
+
}, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '7c60a610eb996640663331666691acec691128f0', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: 'aa53b3739c92cb01580a61e355ff22d4777ba11e', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: 'c709f948752f62122150ecef70788a527edd610e', ref: el => {
|
|
6128
6153
|
if (el) {
|
|
6129
6154
|
this.currentUserDialogRef = el;
|
|
6130
6155
|
}
|
|
6131
|
-
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && h("kritzel-button", { key: '
|
|
6156
|
+
}, user: this.user, terms: this.resolvedTerms, onLogoutRequest: this.handleCurrentUserLogout })), shouldShowLoginButton && h("kritzel-button", { key: 'ed095c276f2a48e74c7c899d216891d2b1130759', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in'), h("kritzel-more-menu", { key: 'cdd22f54afc7acdfd783afbcfa16813ac39f4352', ref: el => {
|
|
6132
6157
|
if (el) {
|
|
6133
6158
|
this.moreMenuRef = el;
|
|
6134
6159
|
}
|
|
6135
|
-
}, items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '
|
|
6160
|
+
}, items: this.resolvedMoreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '00d09340a36334aa29dde0e306598bb48b8360fc', ref: el => {
|
|
6136
6161
|
if (el) {
|
|
6137
6162
|
this.shareDialogRef = el;
|
|
6138
6163
|
}
|
|
6139
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '
|
|
6164
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '1e4c79482b155a0da9dc664ae1f421773c6a452c', ref: el => {
|
|
6140
6165
|
if (el) {
|
|
6141
6166
|
this.loginDialogRef = el;
|
|
6142
6167
|
}
|
|
@@ -6158,6 +6183,9 @@ const KritzelEditor = class {
|
|
|
6158
6183
|
"customFonts": [{
|
|
6159
6184
|
"onCustomFontsChange": 0
|
|
6160
6185
|
}],
|
|
6186
|
+
"customSvgIcons": [{
|
|
6187
|
+
"onCustomSvgIconsChange": 0
|
|
6188
|
+
}],
|
|
6161
6189
|
"moreMenuItems": [{
|
|
6162
6190
|
"onMoreMenuItemsChange": 0
|
|
6163
6191
|
}],
|
|
@@ -42009,7 +42037,7 @@ class KritzelShape extends KritzelBaseObject {
|
|
|
42009
42037
|
|
|
42010
42038
|
const KRITZEL_FONT_REGISTRY_KEY = '__kritzelFontRegistry__';
|
|
42011
42039
|
const KRITZEL_FONT_REGISTRY_EVENT = 'kritzel-font-registry-change';
|
|
42012
|
-
const getGlobalRegistryStore$
|
|
42040
|
+
const getGlobalRegistryStore$2 = () => {
|
|
42013
42041
|
const globalScope = globalThis;
|
|
42014
42042
|
const existing = globalScope[KRITZEL_FONT_REGISTRY_KEY];
|
|
42015
42043
|
if (existing) {
|
|
@@ -42042,7 +42070,7 @@ const normalizeKey = (value) => value.trim().toLocaleLowerCase();
|
|
|
42042
42070
|
const normalizeFamily = (value) => value.trim().toLocaleLowerCase();
|
|
42043
42071
|
class KritzelFontRegistry {
|
|
42044
42072
|
static get _fonts() {
|
|
42045
|
-
return getGlobalRegistryStore$
|
|
42073
|
+
return getGlobalRegistryStore$2().fonts;
|
|
42046
42074
|
}
|
|
42047
42075
|
static getFontFaceSet() {
|
|
42048
42076
|
if (typeof document === 'undefined' || !document.fonts) {
|
|
@@ -44251,9 +44279,8 @@ class KritzelSelectionTool extends KritzelBaseTool {
|
|
|
44251
44279
|
}
|
|
44252
44280
|
if (selectedObject && selectedObject.isSelected === false && selectedObject?.objects.length === 1) {
|
|
44253
44281
|
const firstObj = selectedObject.objects[0];
|
|
44254
|
-
if (
|
|
44255
|
-
// Selected
|
|
44256
|
-
// embedded DOM content. Unselected dynamic objects remain selectable.
|
|
44282
|
+
if (ObjectHelper.isKritzelEmbeddedObject(firstObj)) {
|
|
44283
|
+
// Selected embedded objects hand pointer interaction to their content.
|
|
44257
44284
|
if (firstObj.isSelected && this._core.store.selectionGroup?.objects.length === 1)
|
|
44258
44285
|
return;
|
|
44259
44286
|
}
|
|
@@ -46134,7 +46161,7 @@ class KritzelWorkspace {
|
|
|
46134
46161
|
}
|
|
46135
46162
|
|
|
46136
46163
|
const KRITZEL_RENDERER_REGISTRY_KEY = '__kritzelDynamicObjectRendererRegistry__';
|
|
46137
|
-
const getGlobalRegistryStore = () => {
|
|
46164
|
+
const getGlobalRegistryStore$1 = () => {
|
|
46138
46165
|
const globalScope = globalThis;
|
|
46139
46166
|
const existing = globalScope[KRITZEL_RENDERER_REGISTRY_KEY];
|
|
46140
46167
|
if (existing) {
|
|
@@ -46158,7 +46185,7 @@ const getGlobalRegistryStore = () => {
|
|
|
46158
46185
|
*/
|
|
46159
46186
|
class KritzelDynamicObjectRendererRegistry {
|
|
46160
46187
|
static get _renderers() {
|
|
46161
|
-
return getGlobalRegistryStore().renderers;
|
|
46188
|
+
return getGlobalRegistryStore$1().renderers;
|
|
46162
46189
|
}
|
|
46163
46190
|
/**
|
|
46164
46191
|
* Registers a renderer implementation for a given key.
|
|
@@ -46427,7 +46454,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46427
46454
|
}
|
|
46428
46455
|
applyInteractiveState() {
|
|
46429
46456
|
const pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
46430
|
-
const contentCursor = this.isInteractive ? 'auto' : '';
|
|
46457
|
+
const contentCursor = this.isInteractive ? 'var(--kritzel-global-default-cursor, auto)' : '';
|
|
46431
46458
|
if (this.element) {
|
|
46432
46459
|
this.element.style.pointerEvents = pointerEvents;
|
|
46433
46460
|
this.element.style.cursor = contentCursor;
|
|
@@ -46463,7 +46490,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46463
46490
|
if (!this.isInteractive) {
|
|
46464
46491
|
return false;
|
|
46465
46492
|
}
|
|
46466
|
-
const focusHosts = this.
|
|
46493
|
+
const focusHosts = this.getEmbeddedContentRoots();
|
|
46467
46494
|
// Primary path: locate the focused input-like element by walking from each host through
|
|
46468
46495
|
// `:focus` (piercing open shadow roots). This works in real browsers even when the engine
|
|
46469
46496
|
// and editor are nested web components, because it never relies on the document-level
|
|
@@ -46480,7 +46507,7 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46480
46507
|
}
|
|
46481
46508
|
return false;
|
|
46482
46509
|
}
|
|
46483
|
-
|
|
46510
|
+
getEmbeddedContentRoots() {
|
|
46484
46511
|
const hosts = [];
|
|
46485
46512
|
if (this.element) {
|
|
46486
46513
|
hosts.push(this.element);
|
|
@@ -46693,11 +46720,11 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46693
46720
|
* @returns A serializable object with htmlString and dimension snapshots
|
|
46694
46721
|
*/
|
|
46695
46722
|
serialize() {
|
|
46696
|
-
const { _core, _elementRef, element, totalWidth, totalHeight, isSelected, isHovered, isMounted, isInteractive, resizing, markedForRemoval, isVisible, ...props } = this;
|
|
46723
|
+
const { _core, _elementRef, element, totalWidth, totalHeight, isSelected, isHovered, isMounted, isInteractive, resizing, markedForRemoval, isVisible, rendererData, ...props } = this;
|
|
46697
46724
|
const cloned = structuredClone(props);
|
|
46698
46725
|
// Include rendererKey and rendererData for lifecycle-driven rendering
|
|
46699
46726
|
cloned.rendererKey = this.rendererKey;
|
|
46700
|
-
cloned.rendererData = this.
|
|
46727
|
+
cloned.rendererData = this.serializeRendererData();
|
|
46701
46728
|
// Store HTML as string for fallback/compatibility when renderer is unavailable
|
|
46702
46729
|
cloned.htmlString = element ? element.outerHTML : '';
|
|
46703
46730
|
// Capture dimension snapshot at serialization time
|
|
@@ -46705,6 +46732,19 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46705
46732
|
cloned.serializedHeight = this.height;
|
|
46706
46733
|
return cloned;
|
|
46707
46734
|
}
|
|
46735
|
+
serializeRendererData() {
|
|
46736
|
+
if (this.rendererKey) {
|
|
46737
|
+
const renderer = KritzelDynamicObjectRendererRegistry.get(this.rendererKey);
|
|
46738
|
+
if (renderer?.onSerialize) {
|
|
46739
|
+
return structuredClone(renderer.onSerialize({
|
|
46740
|
+
object: this,
|
|
46741
|
+
container: this.isMounted && this.elementRef instanceof HTMLElement ? this.elementRef : null,
|
|
46742
|
+
data: this.rendererData,
|
|
46743
|
+
}));
|
|
46744
|
+
}
|
|
46745
|
+
}
|
|
46746
|
+
return structuredClone(this.rendererData);
|
|
46747
|
+
}
|
|
46708
46748
|
/**
|
|
46709
46749
|
* Deserializes the dynamic object from a plain object.
|
|
46710
46750
|
* Reconstructs the element from stored HTML string with fallback to placeholder.
|
|
@@ -46737,6 +46777,452 @@ class KritzelDynamicObject extends KritzelBaseObject {
|
|
|
46737
46777
|
}
|
|
46738
46778
|
}
|
|
46739
46779
|
|
|
46780
|
+
const IFRAME_STATE_MESSAGE = 'kritzel-iframe-state';
|
|
46781
|
+
const IFRAME_PARENT_STATE_MESSAGE = 'kritzel-iframe-parent-state';
|
|
46782
|
+
const IFRAME_POINTER_MESSAGE = 'kritzel-iframe-pointer';
|
|
46783
|
+
const IFRAME_CONTEXT_MENU_MESSAGE = 'kritzel-iframe-contextmenu';
|
|
46784
|
+
const SUPPORTED_SANDBOX_TOKENS = new Set([
|
|
46785
|
+
'allow-downloads',
|
|
46786
|
+
'allow-forms',
|
|
46787
|
+
'allow-modals',
|
|
46788
|
+
'allow-orientation-lock',
|
|
46789
|
+
'allow-pointer-lock',
|
|
46790
|
+
'allow-popups',
|
|
46791
|
+
'allow-popups-to-escape-sandbox',
|
|
46792
|
+
'allow-presentation',
|
|
46793
|
+
'allow-same-origin',
|
|
46794
|
+
'allow-scripts',
|
|
46795
|
+
'allow-top-navigation-by-user-activation',
|
|
46796
|
+
]);
|
|
46797
|
+
const iframePointerBridgeStarts = new WeakMap();
|
|
46798
|
+
class KritzelIframeObject extends KritzelBaseObject {
|
|
46799
|
+
__class__ = 'KritzelIframeObject';
|
|
46800
|
+
content = { html: '', css: '', script: '' };
|
|
46801
|
+
loadingContent;
|
|
46802
|
+
isLoading = false;
|
|
46803
|
+
state = {};
|
|
46804
|
+
title = 'Embedded content';
|
|
46805
|
+
sandbox = ['allow-scripts'];
|
|
46806
|
+
borderRadius;
|
|
46807
|
+
boxShadow;
|
|
46808
|
+
get html() { return this.content.html; }
|
|
46809
|
+
set html(value) { this.content = { ...this.content, html: value }; }
|
|
46810
|
+
get css() { return this.content.css; }
|
|
46811
|
+
set css(value) { this.content = { ...this.content, css: value }; }
|
|
46812
|
+
get script() { return this.content.script; }
|
|
46813
|
+
set script(value) { this.content = { ...this.content, script: value }; }
|
|
46814
|
+
messageListener = null;
|
|
46815
|
+
constructor(config) {
|
|
46816
|
+
super();
|
|
46817
|
+
this.content = {
|
|
46818
|
+
html: config?.content?.html ?? config?.html ?? '',
|
|
46819
|
+
css: config?.content?.css ?? config?.css ?? '',
|
|
46820
|
+
script: config?.content?.script ?? config?.script ?? '',
|
|
46821
|
+
};
|
|
46822
|
+
this.loadingContent = config?.loadingContent ? {
|
|
46823
|
+
html: config.loadingContent.html ?? '',
|
|
46824
|
+
css: config.loadingContent.css ?? '',
|
|
46825
|
+
script: config.loadingContent.script ?? '',
|
|
46826
|
+
} : undefined;
|
|
46827
|
+
this.isLoading = config?.isLoading ?? false;
|
|
46828
|
+
this.state = structuredClone(config?.state ?? {});
|
|
46829
|
+
this.title = config?.title ?? 'Embedded content';
|
|
46830
|
+
this.sandbox = this.normalizeSandbox(config?.sandbox);
|
|
46831
|
+
this.borderRadius = config?.borderRadius;
|
|
46832
|
+
this.boxShadow = config?.boxShadow;
|
|
46833
|
+
this.translateX = config?.translateX ?? 0;
|
|
46834
|
+
this.translateY = config?.translateY ?? 0;
|
|
46835
|
+
this.rotation = KritzelMathHelper.degreesToRadians(config?.rotation ?? 0);
|
|
46836
|
+
this.scale = config?.scale ?? 1;
|
|
46837
|
+
this.width = config?.width ?? 0;
|
|
46838
|
+
this.height = config?.height ?? 0;
|
|
46839
|
+
}
|
|
46840
|
+
static create(core, config) {
|
|
46841
|
+
const object = new KritzelIframeObject(config);
|
|
46842
|
+
object._core = core;
|
|
46843
|
+
object.id = object.generateId();
|
|
46844
|
+
object.workspaceId = core.store.state.activeWorkspace.id;
|
|
46845
|
+
object.userId = core.user?.id;
|
|
46846
|
+
object.scale = config?.scale ?? core.store.state.scale;
|
|
46847
|
+
object.zIndex = core.store.currentZIndex;
|
|
46848
|
+
return object;
|
|
46849
|
+
}
|
|
46850
|
+
get sandboxAttribute() {
|
|
46851
|
+
return this.sandbox.join(' ');
|
|
46852
|
+
}
|
|
46853
|
+
mount(iframe) {
|
|
46854
|
+
if (this.isMounted && this.elementRef === iframe) {
|
|
46855
|
+
return;
|
|
46856
|
+
}
|
|
46857
|
+
if (this.isMounted) {
|
|
46858
|
+
this.unmount();
|
|
46859
|
+
}
|
|
46860
|
+
this.elementRef = iframe;
|
|
46861
|
+
this.isMounted = true;
|
|
46862
|
+
iframe.title = this.title;
|
|
46863
|
+
iframe.setAttribute('sandbox', this.sandboxAttribute);
|
|
46864
|
+
iframe.style.pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
46865
|
+
this.messageListener = event => this.handleMessage(event);
|
|
46866
|
+
window.addEventListener('message', this.messageListener);
|
|
46867
|
+
iframe.srcdoc = this.createSourceDocument();
|
|
46868
|
+
this.onMount(this.createLifecycleContext());
|
|
46869
|
+
}
|
|
46870
|
+
unmount() {
|
|
46871
|
+
if (!this.isMounted) {
|
|
46872
|
+
return;
|
|
46873
|
+
}
|
|
46874
|
+
const nextState = this.onUnmount(this.createLifecycleContext());
|
|
46875
|
+
if (nextState !== undefined) {
|
|
46876
|
+
this.state = structuredClone(nextState);
|
|
46877
|
+
}
|
|
46878
|
+
if (this.messageListener) {
|
|
46879
|
+
window.removeEventListener('message', this.messageListener);
|
|
46880
|
+
this.messageListener = null;
|
|
46881
|
+
}
|
|
46882
|
+
this.isMounted = false;
|
|
46883
|
+
this._elementRef = null;
|
|
46884
|
+
}
|
|
46885
|
+
setContent(content) {
|
|
46886
|
+
this.content = {
|
|
46887
|
+
html: content.html ?? this.content.html,
|
|
46888
|
+
css: content.css ?? this.content.css,
|
|
46889
|
+
script: content.script ?? this.content.script,
|
|
46890
|
+
};
|
|
46891
|
+
this.refreshDocument();
|
|
46892
|
+
this.persistUpdate();
|
|
46893
|
+
}
|
|
46894
|
+
setLoadingContent(content) {
|
|
46895
|
+
this.loadingContent = {
|
|
46896
|
+
html: content.html ?? this.loadingContent?.html ?? '',
|
|
46897
|
+
css: content.css ?? this.loadingContent?.css ?? '',
|
|
46898
|
+
script: content.script ?? this.loadingContent?.script ?? '',
|
|
46899
|
+
};
|
|
46900
|
+
this.refreshDocument();
|
|
46901
|
+
this.persistUpdate();
|
|
46902
|
+
}
|
|
46903
|
+
setLoading(isLoading) {
|
|
46904
|
+
this.isLoading = isLoading;
|
|
46905
|
+
this.refreshDocument();
|
|
46906
|
+
this.persistUpdate();
|
|
46907
|
+
}
|
|
46908
|
+
getActiveContent() {
|
|
46909
|
+
const activeLoadingContent = this.isLoading ? this.loadingContent : undefined;
|
|
46910
|
+
return {
|
|
46911
|
+
html: activeLoadingContent?.html ?? this.content.html,
|
|
46912
|
+
css: activeLoadingContent?.css ?? this.content.css,
|
|
46913
|
+
script: activeLoadingContent?.script ?? this.content.script,
|
|
46914
|
+
};
|
|
46915
|
+
}
|
|
46916
|
+
setState(state) {
|
|
46917
|
+
this.state = structuredClone(state);
|
|
46918
|
+
this.elementRef?.contentWindow?.postMessage({ type: IFRAME_PARENT_STATE_MESSAGE, state: this.state }, '*');
|
|
46919
|
+
this.persistUpdate();
|
|
46920
|
+
}
|
|
46921
|
+
setIsInteractive(isInteractive) {
|
|
46922
|
+
this.isInteractive = isInteractive;
|
|
46923
|
+
if (this.isMounted && this.elementRef) {
|
|
46924
|
+
this.elementRef.style.pointerEvents = isInteractive ? 'auto' : 'none';
|
|
46925
|
+
if (!isInteractive) {
|
|
46926
|
+
this.elementRef.blur();
|
|
46927
|
+
}
|
|
46928
|
+
}
|
|
46929
|
+
}
|
|
46930
|
+
hasFocusedInputElement() {
|
|
46931
|
+
return this.isInteractive && this.isMounted && document.activeElement === this.elementRef;
|
|
46932
|
+
}
|
|
46933
|
+
getEmbeddedContentRoots() {
|
|
46934
|
+
return this.isMounted && this.elementRef instanceof HTMLElement && this.elementRef.tagName === 'IFRAME' ? [this.elementRef] : [];
|
|
46935
|
+
}
|
|
46936
|
+
onMount(_context) { }
|
|
46937
|
+
onSerialize(context) {
|
|
46938
|
+
return context.state;
|
|
46939
|
+
}
|
|
46940
|
+
onUnmount(context) {
|
|
46941
|
+
return context.state;
|
|
46942
|
+
}
|
|
46943
|
+
serialize() {
|
|
46944
|
+
const nextState = this.onSerialize(this.createLifecycleContext());
|
|
46945
|
+
this.state = structuredClone(nextState);
|
|
46946
|
+
const messageListener = this.messageListener;
|
|
46947
|
+
this.messageListener = null;
|
|
46948
|
+
try {
|
|
46949
|
+
const serialized = super.serialize();
|
|
46950
|
+
delete serialized.messageListener;
|
|
46951
|
+
return serialized;
|
|
46952
|
+
}
|
|
46953
|
+
finally {
|
|
46954
|
+
this.messageListener = messageListener;
|
|
46955
|
+
}
|
|
46956
|
+
}
|
|
46957
|
+
deserialize(object) {
|
|
46958
|
+
super.deserialize(object);
|
|
46959
|
+
const nextContent = object.content && typeof object.content === 'object' ? object.content : {};
|
|
46960
|
+
const nextLoadingContent = object.loadingContent && typeof object.loadingContent === 'object' ? object.loadingContent : undefined;
|
|
46961
|
+
this.content = {
|
|
46962
|
+
html: typeof nextContent.html === 'string' ? nextContent.html : typeof object.html === 'string' ? object.html : '',
|
|
46963
|
+
css: typeof nextContent.css === 'string' ? nextContent.css : typeof object.css === 'string' ? object.css : '',
|
|
46964
|
+
script: typeof nextContent.script === 'string' ? nextContent.script : typeof object.script === 'string' ? object.script : '',
|
|
46965
|
+
};
|
|
46966
|
+
this.loadingContent = nextLoadingContent ? {
|
|
46967
|
+
html: typeof nextLoadingContent.html === 'string' ? nextLoadingContent.html : '',
|
|
46968
|
+
css: typeof nextLoadingContent.css === 'string' ? nextLoadingContent.css : '',
|
|
46969
|
+
script: typeof nextLoadingContent.script === 'string' ? nextLoadingContent.script : '',
|
|
46970
|
+
} : undefined;
|
|
46971
|
+
this.isLoading = typeof object.isLoading === 'boolean' ? object.isLoading : false;
|
|
46972
|
+
this.state = object.state && typeof object.state === 'object' ? structuredClone(object.state) : {};
|
|
46973
|
+
this.title = typeof object.title === 'string' ? object.title : 'Embedded content';
|
|
46974
|
+
this.sandbox = this.normalizeSandbox(Array.isArray(object.sandbox) ? object.sandbox.filter((token) => typeof token === 'string') : undefined);
|
|
46975
|
+
this.borderRadius = (typeof object.borderRadius === 'number' || typeof object.borderRadius === 'string') ? object.borderRadius : undefined;
|
|
46976
|
+
this.boxShadow = typeof object.boxShadow === 'string' ? object.boxShadow : undefined;
|
|
46977
|
+
this.messageListener = null;
|
|
46978
|
+
return this;
|
|
46979
|
+
}
|
|
46980
|
+
copy() {
|
|
46981
|
+
const copiedObject = super.copy();
|
|
46982
|
+
copiedObject.content = { ...this.content };
|
|
46983
|
+
copiedObject.loadingContent = this.loadingContent ? { ...this.loadingContent } : undefined;
|
|
46984
|
+
copiedObject.isLoading = this.isLoading;
|
|
46985
|
+
copiedObject.state = structuredClone(this.state);
|
|
46986
|
+
copiedObject.sandbox = [...this.sandbox];
|
|
46987
|
+
copiedObject.borderRadius = this.borderRadius;
|
|
46988
|
+
copiedObject.boxShadow = this.boxShadow;
|
|
46989
|
+
copiedObject.messageListener = null;
|
|
46990
|
+
copiedObject._elementRef = null;
|
|
46991
|
+
return copiedObject;
|
|
46992
|
+
}
|
|
46993
|
+
clone() {
|
|
46994
|
+
const clonedObject = super.clone();
|
|
46995
|
+
clonedObject.content = { ...this.content };
|
|
46996
|
+
clonedObject.loadingContent = this.loadingContent ? { ...this.loadingContent } : undefined;
|
|
46997
|
+
clonedObject.isLoading = this.isLoading;
|
|
46998
|
+
clonedObject.state = structuredClone(this.state);
|
|
46999
|
+
clonedObject.sandbox = [...this.sandbox];
|
|
47000
|
+
clonedObject.borderRadius = this.borderRadius;
|
|
47001
|
+
clonedObject.boxShadow = this.boxShadow;
|
|
47002
|
+
clonedObject.messageListener = null;
|
|
47003
|
+
clonedObject.isMounted = false;
|
|
47004
|
+
clonedObject._elementRef = null;
|
|
47005
|
+
return clonedObject;
|
|
47006
|
+
}
|
|
47007
|
+
adoptTransientStateFrom(previous) {
|
|
47008
|
+
if (!(previous instanceof KritzelIframeObject)) {
|
|
47009
|
+
return;
|
|
47010
|
+
}
|
|
47011
|
+
this.isInteractive = previous.isInteractive;
|
|
47012
|
+
this.isSelected = previous.isSelected;
|
|
47013
|
+
this.isHovered = previous.isHovered;
|
|
47014
|
+
if (!previous.isMounted || !(previous.elementRef instanceof HTMLElement) || previous.elementRef.tagName !== 'IFRAME') {
|
|
47015
|
+
return;
|
|
47016
|
+
}
|
|
47017
|
+
if (previous.messageListener) {
|
|
47018
|
+
window.removeEventListener('message', previous.messageListener);
|
|
47019
|
+
}
|
|
47020
|
+
this._elementRef = previous.elementRef;
|
|
47021
|
+
this.isMounted = true;
|
|
47022
|
+
this.messageListener = event => this.handleMessage(event);
|
|
47023
|
+
window.addEventListener('message', this.messageListener);
|
|
47024
|
+
this.elementRef.style.pointerEvents = this.isInteractive ? 'auto' : 'none';
|
|
47025
|
+
previous.messageListener = null;
|
|
47026
|
+
previous.isMounted = false;
|
|
47027
|
+
previous._elementRef = null;
|
|
47028
|
+
}
|
|
47029
|
+
createLifecycleContext() {
|
|
47030
|
+
return {
|
|
47031
|
+
object: this,
|
|
47032
|
+
iframe: this.isMounted ? this.elementRef : null,
|
|
47033
|
+
state: structuredClone(this.state),
|
|
47034
|
+
};
|
|
47035
|
+
}
|
|
47036
|
+
normalizeSandbox(tokens) {
|
|
47037
|
+
const requestedTokens = tokens ?? ['allow-scripts'];
|
|
47038
|
+
const normalized = requestedTokens.filter(token => SUPPORTED_SANDBOX_TOKENS.has(token));
|
|
47039
|
+
return [...new Set(normalized.length > 0 ? normalized : ['allow-scripts'])];
|
|
47040
|
+
}
|
|
47041
|
+
createSourceDocument() {
|
|
47042
|
+
const activeContent = this.getActiveContent();
|
|
47043
|
+
const state = JSON.stringify(this.state).replace(/</g, '\\u003c');
|
|
47044
|
+
const css = activeContent.css.replace(/<\/style/gi, '<\\/style');
|
|
47045
|
+
const script = activeContent.script.replace(/<\/script/gi, '<\\/script');
|
|
47046
|
+
const computedStyle = this.isMounted ? getComputedStyle(this.elementRef) : null;
|
|
47047
|
+
const defaultCursor = computedStyle?.getPropertyValue('--kritzel-global-default-cursor').trim() || 'auto';
|
|
47048
|
+
const pointerCursor = computedStyle?.getPropertyValue('--kritzel-global-pointer-cursor').trim() || defaultCursor;
|
|
47049
|
+
return `<!doctype html>
|
|
47050
|
+
<html>
|
|
47051
|
+
<head>
|
|
47052
|
+
<meta charset="utf-8">
|
|
47053
|
+
<style>
|
|
47054
|
+
:root {
|
|
47055
|
+
--kritzel-iframe-default-cursor: ${defaultCursor};
|
|
47056
|
+
--kritzel-iframe-pointer-cursor: ${pointerCursor};
|
|
47057
|
+
}
|
|
47058
|
+
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; cursor: var(--kritzel-iframe-default-cursor); }
|
|
47059
|
+
button, button *, a, a *, input, textarea, select { cursor: var(--kritzel-iframe-pointer-cursor) !important; }
|
|
47060
|
+
${css}
|
|
47061
|
+
</style>
|
|
47062
|
+
</head>
|
|
47063
|
+
<body>
|
|
47064
|
+
${activeContent.html}
|
|
47065
|
+
<script>
|
|
47066
|
+
const kritzel = globalThis.kritzel = {
|
|
47067
|
+
state: ${state},
|
|
47068
|
+
setState(nextState) {
|
|
47069
|
+
this.state = nextState;
|
|
47070
|
+
parent.postMessage({ type: '${IFRAME_STATE_MESSAGE}', state: nextState }, '*');
|
|
47071
|
+
},
|
|
47072
|
+
};
|
|
47073
|
+
globalThis.addEventListener('message', event => {
|
|
47074
|
+
if (event.data?.type === '${IFRAME_PARENT_STATE_MESSAGE}' && event.data.state && typeof event.data.state === 'object') {
|
|
47075
|
+
kritzel.state = event.data.state;
|
|
47076
|
+
globalThis.dispatchEvent(new CustomEvent('kritzelstatechange', { detail: kritzel.state }));
|
|
47077
|
+
}
|
|
47078
|
+
});
|
|
47079
|
+
let bridgedPointerId = null;
|
|
47080
|
+
const interactiveSelector = 'button, input, textarea, select, a[href], [contenteditable="true"], [contenteditable=""]';
|
|
47081
|
+
const bridgePointerEvent = event => parent.postMessage({
|
|
47082
|
+
type: '${IFRAME_POINTER_MESSAGE}',
|
|
47083
|
+
eventType: event.type,
|
|
47084
|
+
pointerId: event.pointerId,
|
|
47085
|
+
pointerType: event.pointerType,
|
|
47086
|
+
clientX: event.clientX,
|
|
47087
|
+
clientY: event.clientY,
|
|
47088
|
+
screenX: event.screenX,
|
|
47089
|
+
screenY: event.screenY,
|
|
47090
|
+
button: event.button,
|
|
47091
|
+
buttons: event.buttons,
|
|
47092
|
+
shiftKey: event.shiftKey,
|
|
47093
|
+
ctrlKey: event.ctrlKey,
|
|
47094
|
+
altKey: event.altKey,
|
|
47095
|
+
metaKey: event.metaKey,
|
|
47096
|
+
}, '*');
|
|
47097
|
+
document.addEventListener('pointerdown', event => {
|
|
47098
|
+
if (event.target instanceof Element && event.target.closest(interactiveSelector)) return;
|
|
47099
|
+
bridgedPointerId = event.pointerId;
|
|
47100
|
+
event.preventDefault();
|
|
47101
|
+
bridgePointerEvent(event);
|
|
47102
|
+
});
|
|
47103
|
+
document.addEventListener('pointermove', event => {
|
|
47104
|
+
if (event.pointerId !== bridgedPointerId) return;
|
|
47105
|
+
event.preventDefault();
|
|
47106
|
+
bridgePointerEvent(event);
|
|
47107
|
+
});
|
|
47108
|
+
const finishPointerBridge = event => {
|
|
47109
|
+
if (event.pointerId !== bridgedPointerId) return;
|
|
47110
|
+
event.preventDefault();
|
|
47111
|
+
bridgePointerEvent(event);
|
|
47112
|
+
bridgedPointerId = null;
|
|
47113
|
+
};
|
|
47114
|
+
document.addEventListener('pointerup', finishPointerBridge);
|
|
47115
|
+
document.addEventListener('pointercancel', finishPointerBridge);
|
|
47116
|
+
document.addEventListener('contextmenu', event => {
|
|
47117
|
+
event.preventDefault();
|
|
47118
|
+
parent.postMessage({
|
|
47119
|
+
type: '${IFRAME_CONTEXT_MENU_MESSAGE}',
|
|
47120
|
+
clientX: event.clientX,
|
|
47121
|
+
clientY: event.clientY,
|
|
47122
|
+
button: event.button,
|
|
47123
|
+
shiftKey: event.shiftKey,
|
|
47124
|
+
ctrlKey: event.ctrlKey,
|
|
47125
|
+
altKey: event.altKey,
|
|
47126
|
+
metaKey: event.metaKey,
|
|
47127
|
+
}, '*');
|
|
47128
|
+
});
|
|
47129
|
+
${script}
|
|
47130
|
+
<\/script>
|
|
47131
|
+
</body>
|
|
47132
|
+
</html>`;
|
|
47133
|
+
}
|
|
47134
|
+
handleMessage(event) {
|
|
47135
|
+
if (event.source !== this.elementRef?.contentWindow || !event.data || typeof event.data !== 'object') {
|
|
47136
|
+
return;
|
|
47137
|
+
}
|
|
47138
|
+
const message = event.data;
|
|
47139
|
+
if (message.type === IFRAME_POINTER_MESSAGE) {
|
|
47140
|
+
this.dispatchPointerMessage(event.data);
|
|
47141
|
+
return;
|
|
47142
|
+
}
|
|
47143
|
+
if (message.type === IFRAME_CONTEXT_MENU_MESSAGE) {
|
|
47144
|
+
this.dispatchContextMenuMessage(event.data);
|
|
47145
|
+
return;
|
|
47146
|
+
}
|
|
47147
|
+
if (message.type !== IFRAME_STATE_MESSAGE || !message.state || typeof message.state !== 'object') {
|
|
47148
|
+
return;
|
|
47149
|
+
}
|
|
47150
|
+
this.state = structuredClone(message.state);
|
|
47151
|
+
this.persistUpdate();
|
|
47152
|
+
}
|
|
47153
|
+
dispatchPointerMessage(message) {
|
|
47154
|
+
if (!this.isMounted || !this.elementRef || !['pointerdown', 'pointermove', 'pointerup', 'pointercancel'].includes(message.eventType)) {
|
|
47155
|
+
return;
|
|
47156
|
+
}
|
|
47157
|
+
const iframeRect = this.elementRef.getBoundingClientRect();
|
|
47158
|
+
if (message.eventType === 'pointerdown') {
|
|
47159
|
+
const scaleX = this.elementRef.offsetWidth > 0 ? iframeRect.width / this.elementRef.offsetWidth : 1;
|
|
47160
|
+
const scaleY = this.elementRef.offsetHeight > 0 ? iframeRect.height / this.elementRef.offsetHeight : 1;
|
|
47161
|
+
iframePointerBridgeStarts.set(this.elementRef, {
|
|
47162
|
+
pointerId: message.pointerId,
|
|
47163
|
+
clientX: iframeRect.left + message.clientX * scaleX,
|
|
47164
|
+
clientY: iframeRect.top + message.clientY * scaleY,
|
|
47165
|
+
screenX: message.screenX,
|
|
47166
|
+
screenY: message.screenY,
|
|
47167
|
+
});
|
|
47168
|
+
}
|
|
47169
|
+
const bridgeStart = iframePointerBridgeStarts.get(this.elementRef);
|
|
47170
|
+
const hasBridgeStart = bridgeStart?.pointerId === message.pointerId;
|
|
47171
|
+
const clientX = hasBridgeStart ? bridgeStart.clientX + message.screenX - bridgeStart.screenX : iframeRect.left + message.clientX;
|
|
47172
|
+
const clientY = hasBridgeStart ? bridgeStart.clientY + message.screenY - bridgeStart.screenY : iframeRect.top + message.clientY;
|
|
47173
|
+
this.elementRef.dispatchEvent(new PointerEvent(message.eventType, {
|
|
47174
|
+
bubbles: true,
|
|
47175
|
+
composed: true,
|
|
47176
|
+
cancelable: true,
|
|
47177
|
+
pointerId: message.pointerId,
|
|
47178
|
+
pointerType: message.pointerType,
|
|
47179
|
+
clientX,
|
|
47180
|
+
clientY,
|
|
47181
|
+
screenX: message.screenX,
|
|
47182
|
+
screenY: message.screenY,
|
|
47183
|
+
button: message.button,
|
|
47184
|
+
buttons: message.buttons,
|
|
47185
|
+
shiftKey: message.shiftKey,
|
|
47186
|
+
ctrlKey: message.ctrlKey,
|
|
47187
|
+
altKey: message.altKey,
|
|
47188
|
+
metaKey: message.metaKey,
|
|
47189
|
+
}));
|
|
47190
|
+
if (message.eventType === 'pointerup' || message.eventType === 'pointercancel') {
|
|
47191
|
+
iframePointerBridgeStarts.delete(this.elementRef);
|
|
47192
|
+
}
|
|
47193
|
+
}
|
|
47194
|
+
dispatchContextMenuMessage(message) {
|
|
47195
|
+
if (!this.isMounted || !this.elementRef) {
|
|
47196
|
+
return;
|
|
47197
|
+
}
|
|
47198
|
+
const iframeRect = this.elementRef.getBoundingClientRect();
|
|
47199
|
+
// Dispatched as a MouseEvent (not PointerEvent) to mirror how browsers
|
|
47200
|
+
// natively raise 'contextmenu' for both mouse right-click and touch long-press.
|
|
47201
|
+
this.elementRef.dispatchEvent(new MouseEvent('contextmenu', {
|
|
47202
|
+
bubbles: true,
|
|
47203
|
+
composed: true,
|
|
47204
|
+
cancelable: true,
|
|
47205
|
+
clientX: iframeRect.left + message.clientX,
|
|
47206
|
+
clientY: iframeRect.top + message.clientY,
|
|
47207
|
+
button: message.button,
|
|
47208
|
+
shiftKey: message.shiftKey,
|
|
47209
|
+
ctrlKey: message.ctrlKey,
|
|
47210
|
+
altKey: message.altKey,
|
|
47211
|
+
metaKey: message.metaKey,
|
|
47212
|
+
}));
|
|
47213
|
+
}
|
|
47214
|
+
refreshDocument() {
|
|
47215
|
+
if (this.isMounted && this.elementRef) {
|
|
47216
|
+
this.elementRef.srcdoc = this.createSourceDocument();
|
|
47217
|
+
}
|
|
47218
|
+
}
|
|
47219
|
+
persistUpdate() {
|
|
47220
|
+
if (this._core?.store?.objects) {
|
|
47221
|
+
this.update();
|
|
47222
|
+
}
|
|
47223
|
+
}
|
|
47224
|
+
}
|
|
47225
|
+
|
|
46740
47226
|
/**
|
|
46741
47227
|
* Handles deserialization/revival of Kritzel objects from plain JavaScript objects.
|
|
46742
47228
|
* This class uses a pattern similar to JSON.parse reviver to reconstruct class instances
|
|
@@ -46799,6 +47285,9 @@ class KritzelReviver {
|
|
|
46799
47285
|
case 'KritzelDynamicObject':
|
|
46800
47286
|
revivedObj = KritzelDynamicObject.create(this._core).deserialize(obj);
|
|
46801
47287
|
break;
|
|
47288
|
+
case 'KritzelIframeObject':
|
|
47289
|
+
revivedObj = KritzelIframeObject.create(this._core).deserialize(obj);
|
|
47290
|
+
break;
|
|
46802
47291
|
case 'KritzelSelectionGroup':
|
|
46803
47292
|
revivedObj = KritzelSelectionGroup.create(this._core).deserialize(obj);
|
|
46804
47293
|
break;
|
|
@@ -59160,9 +59649,16 @@ class KritzelStore {
|
|
|
59160
59649
|
* Gets the currently selected dynamic object whose focused descendant is an input-like element.
|
|
59161
59650
|
* @returns The interactive dynamic object with focused input-like content, or null if none matches
|
|
59162
59651
|
*/
|
|
59652
|
+
get activeInteractiveEmbeddedObject() {
|
|
59653
|
+
for (const object of this.selectedObjects) {
|
|
59654
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object) && object.hasFocusedInputElement()) {
|
|
59655
|
+
return object;
|
|
59656
|
+
}
|
|
59657
|
+
}
|
|
59658
|
+
return null;
|
|
59659
|
+
}
|
|
59163
59660
|
get activeInteractiveDynamicObject() {
|
|
59164
|
-
|
|
59165
|
-
return interactiveDynamicObject ?? null;
|
|
59661
|
+
return this.activeInteractiveEmbeddedObject;
|
|
59166
59662
|
}
|
|
59167
59663
|
/**
|
|
59168
59664
|
* Gets the path currently being drawn (not yet completed).
|
|
@@ -61245,13 +61741,38 @@ class KritzelAnchorManager {
|
|
|
61245
61741
|
}
|
|
61246
61742
|
}
|
|
61247
61743
|
|
|
61744
|
+
const KRITZEL_ICON_REGISTRY_KEY = '__kritzelIconRegistry__';
|
|
61745
|
+
const getGlobalRegistryStore = () => {
|
|
61746
|
+
const globalScope = globalThis;
|
|
61747
|
+
const existing = globalScope[KRITZEL_ICON_REGISTRY_KEY];
|
|
61748
|
+
if (existing) {
|
|
61749
|
+
return existing;
|
|
61750
|
+
}
|
|
61751
|
+
const created = {
|
|
61752
|
+
icons: new Map(),
|
|
61753
|
+
listeners: new Set(),
|
|
61754
|
+
};
|
|
61755
|
+
globalScope[KRITZEL_ICON_REGISTRY_KEY] = created;
|
|
61756
|
+
return created;
|
|
61757
|
+
};
|
|
61248
61758
|
/**
|
|
61249
61759
|
* A static registry for managing SVG icons throughout the Kritzel library.
|
|
61250
61760
|
* Icons are stored as name-to-SVG-content mappings and can be retrieved by name.
|
|
61251
61761
|
*/
|
|
61252
61762
|
class KritzelIconRegistry {
|
|
61253
61763
|
/** Internal storage for registered icons, mapping icon names to their SVG content. */
|
|
61254
|
-
static registry
|
|
61764
|
+
static get registry() {
|
|
61765
|
+
return getGlobalRegistryStore().icons;
|
|
61766
|
+
}
|
|
61767
|
+
static get listeners() {
|
|
61768
|
+
return getGlobalRegistryStore().listeners;
|
|
61769
|
+
}
|
|
61770
|
+
static subscribe(listener) {
|
|
61771
|
+
this.listeners.add(listener);
|
|
61772
|
+
return () => {
|
|
61773
|
+
this.listeners.delete(listener);
|
|
61774
|
+
};
|
|
61775
|
+
}
|
|
61255
61776
|
/**
|
|
61256
61777
|
* Registers a single icon with the given name and SVG content.
|
|
61257
61778
|
* If an icon with the same name already exists, it will be overwritten and a warning will be logged.
|
|
@@ -61264,6 +61785,9 @@ class KritzelIconRegistry {
|
|
|
61264
61785
|
console.warn(`[IconRegistry] Icon "${name}" is already registered. It will be overwritten.`);
|
|
61265
61786
|
}
|
|
61266
61787
|
this.registry.set(name, svgContent);
|
|
61788
|
+
for (const listener of this.listeners) {
|
|
61789
|
+
listener(name);
|
|
61790
|
+
}
|
|
61267
61791
|
}
|
|
61268
61792
|
/**
|
|
61269
61793
|
* Retrieves the SVG content for a registered icon by its name.
|
|
@@ -61297,72 +61821,77 @@ class KritzelIconRegistry {
|
|
|
61297
61821
|
return this.registry.has(name);
|
|
61298
61822
|
}
|
|
61299
61823
|
}
|
|
61300
|
-
|
|
61301
|
-
|
|
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
|
-
}
|
|
61824
|
+
const defaultIcons = {
|
|
61825
|
+
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>',
|
|
61826
|
+
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>',
|
|
61827
|
+
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>',
|
|
61828
|
+
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>',
|
|
61829
|
+
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>',
|
|
61830
|
+
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>',
|
|
61831
|
+
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>',
|
|
61832
|
+
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>',
|
|
61833
|
+
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>',
|
|
61834
|
+
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>',
|
|
61835
|
+
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>',
|
|
61836
|
+
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>',
|
|
61837
|
+
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>',
|
|
61838
|
+
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>',
|
|
61839
|
+
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>',
|
|
61840
|
+
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>',
|
|
61841
|
+
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>',
|
|
61842
|
+
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>',
|
|
61843
|
+
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>',
|
|
61844
|
+
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>',
|
|
61845
|
+
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>',
|
|
61846
|
+
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>',
|
|
61847
|
+
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>',
|
|
61848
|
+
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>',
|
|
61849
|
+
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>',
|
|
61850
|
+
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>',
|
|
61851
|
+
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>',
|
|
61852
|
+
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>',
|
|
61853
|
+
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>',
|
|
61854
|
+
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>',
|
|
61855
|
+
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>',
|
|
61856
|
+
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>',
|
|
61857
|
+
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>',
|
|
61858
|
+
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>',
|
|
61859
|
+
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>',
|
|
61860
|
+
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>',
|
|
61861
|
+
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>',
|
|
61862
|
+
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>',
|
|
61863
|
+
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>',
|
|
61864
|
+
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>',
|
|
61865
|
+
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>',
|
|
61866
|
+
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>',
|
|
61867
|
+
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>',
|
|
61868
|
+
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>',
|
|
61869
|
+
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>',
|
|
61870
|
+
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>',
|
|
61871
|
+
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>',
|
|
61872
|
+
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>',
|
|
61873
|
+
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>',
|
|
61874
|
+
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>',
|
|
61875
|
+
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>',
|
|
61876
|
+
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>',
|
|
61877
|
+
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>',
|
|
61878
|
+
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>',
|
|
61879
|
+
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>',
|
|
61880
|
+
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>',
|
|
61881
|
+
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>',
|
|
61882
|
+
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>',
|
|
61883
|
+
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>',
|
|
61884
|
+
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>',
|
|
61885
|
+
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>',
|
|
61886
|
+
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>',
|
|
61887
|
+
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>',
|
|
61888
|
+
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>'
|
|
61889
|
+
};
|
|
61890
|
+
for (const [name, svg] of Object.entries(defaultIcons)) {
|
|
61891
|
+
if (!KritzelIconRegistry.has(name)) {
|
|
61892
|
+
KritzelIconRegistry.register(name, svg);
|
|
61893
|
+
}
|
|
61894
|
+
}
|
|
61366
61895
|
|
|
61367
61896
|
class KritzelCursorHelper {
|
|
61368
61897
|
static _pointerCursor = null;
|
|
@@ -61381,7 +61910,7 @@ class KritzelCursorHelper {
|
|
|
61381
61910
|
* The icon is retrieved from the KritzelIconRegistry.
|
|
61382
61911
|
*/
|
|
61383
61912
|
static getCursor(options) {
|
|
61384
|
-
const iconName = options.iconName === 'default' ? '
|
|
61913
|
+
const iconName = options.iconName === 'default' ? 'mousePointer' : options.iconName;
|
|
61385
61914
|
const iconSvg = KritzelIconRegistry.get(iconName);
|
|
61386
61915
|
if (!iconSvg) {
|
|
61387
61916
|
console.warn(`Icon "${iconName}" not found in registry.`);
|
|
@@ -61390,7 +61919,7 @@ class KritzelCursorHelper {
|
|
|
61390
61919
|
const size = options.size || 24;
|
|
61391
61920
|
const rotation = options.rotation || 0;
|
|
61392
61921
|
const color = options.color || 'black';
|
|
61393
|
-
// Default cursor (
|
|
61922
|
+
// Default cursor (mousePointer) has hotspot at (4, 4), others at center
|
|
61394
61923
|
const hotspot = options.hotspot || (options.iconName === 'default' ? { x: 4, y: 4 } : { x: size / 2, y: size / 2 });
|
|
61395
61924
|
// Modify the SVG string to set size and color
|
|
61396
61925
|
// We replace width and height to match the requested size
|
|
@@ -61403,12 +61932,12 @@ class KritzelCursorHelper {
|
|
|
61403
61932
|
// We rotate around the center of the SVG canvas
|
|
61404
61933
|
const center = size / 2;
|
|
61405
61934
|
// We use a group to apply the rotation
|
|
61406
|
-
const svg = `
|
|
61407
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
61408
|
-
<g transform="rotate(${rotation} ${center} ${center})">
|
|
61409
|
-
${content}
|
|
61410
|
-
</g>
|
|
61411
|
-
</svg>
|
|
61935
|
+
const svg = `
|
|
61936
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
61937
|
+
<g transform="rotate(${rotation} ${center} ${center})">
|
|
61938
|
+
${content}
|
|
61939
|
+
</g>
|
|
61940
|
+
</svg>
|
|
61412
61941
|
`;
|
|
61413
61942
|
// Encode the SVG for use in a data URI
|
|
61414
61943
|
// We need to be careful with encoding to ensure it works across browsers
|
|
@@ -61446,11 +61975,13 @@ class KritzelCursorManager {
|
|
|
61446
61975
|
// Reset cursor on old target
|
|
61447
61976
|
if (this._targetElement) {
|
|
61448
61977
|
this._targetElement.style.cursor = '';
|
|
61978
|
+
this._targetElement.style.removeProperty('--kritzel-global-default-cursor');
|
|
61449
61979
|
this._targetElement.style.removeProperty('--kritzel-global-pointer-cursor');
|
|
61450
61980
|
}
|
|
61451
61981
|
this._targetElement = element;
|
|
61452
61982
|
// Set the pointer cursor CSS variable for child components to use
|
|
61453
61983
|
if (this._targetElement) {
|
|
61984
|
+
this._targetElement.style.setProperty('--kritzel-global-default-cursor', KritzelCursorHelper.getCursor({ iconName: 'default' }));
|
|
61454
61985
|
this._targetElement.style.setProperty('--kritzel-global-pointer-cursor', KritzelCursorHelper.getPointerCursor());
|
|
61455
61986
|
}
|
|
61456
61987
|
}
|
|
@@ -61495,8 +62026,10 @@ class KritzelCursorManager {
|
|
|
61495
62026
|
if (!this._shadowRoot)
|
|
61496
62027
|
return;
|
|
61497
62028
|
const elementsAtPoint = this._shadowRoot.elementsFromPoint(ev.clientX, ev.clientY);
|
|
61498
|
-
if (!elementsAtPoint || elementsAtPoint.length === 0)
|
|
62029
|
+
if (!elementsAtPoint || elementsAtPoint.length === 0) {
|
|
62030
|
+
this.resetToDefault();
|
|
61499
62031
|
return;
|
|
62032
|
+
}
|
|
61500
62033
|
// Check for resize handle overlays (selection group)
|
|
61501
62034
|
const resizeHandleOverlay = elementsAtPoint.find(el => el.classList.contains('resize-handle-overlay'));
|
|
61502
62035
|
if (resizeHandleOverlay) {
|
|
@@ -61506,19 +62039,19 @@ class KritzelCursorManager {
|
|
|
61506
62039
|
const isTopLeft = resizeHandleOverlay.classList.contains('top-left');
|
|
61507
62040
|
const isBottomRight = resizeHandleOverlay.classList.contains('bottom-right');
|
|
61508
62041
|
const rotationOffset = (isTopLeft || isBottomRight) ? -45 : 45;
|
|
61509
|
-
this._core.store.state.cursor = { icon: '
|
|
62042
|
+
this._core.store.state.cursor = { icon: 'moveVertical', rotation: rotationDegrees + rotationOffset };
|
|
61510
62043
|
return;
|
|
61511
62044
|
}
|
|
61512
62045
|
// Check for rotation handle overlay
|
|
61513
62046
|
const rotationHandleOverlay = elementsAtPoint.find(el => el.classList.contains('rotation-handle-overlay'));
|
|
61514
62047
|
if (rotationHandleOverlay) {
|
|
61515
|
-
this._core.store.state.cursor = { icon: 'hand', iconActive: '
|
|
62048
|
+
this._core.store.state.cursor = { icon: 'hand', iconActive: 'handGrab' };
|
|
61516
62049
|
return;
|
|
61517
62050
|
}
|
|
61518
62051
|
// Check for line handle overlays (selection line)
|
|
61519
62052
|
const lineHandleOverlay = elementsAtPoint.find(el => el.classList.contains('selection-line-handle-overlay'));
|
|
61520
62053
|
if (lineHandleOverlay) {
|
|
61521
|
-
this._core.store.state.cursor = { icon: 'hand', iconActive: '
|
|
62054
|
+
this._core.store.state.cursor = { icon: 'hand', iconActive: 'handGrab' };
|
|
61522
62055
|
return;
|
|
61523
62056
|
}
|
|
61524
62057
|
// Reset cursor if not hovering any handle
|
|
@@ -61553,7 +62086,8 @@ class KritzelCursorManager {
|
|
|
61553
62086
|
cleanup() {
|
|
61554
62087
|
if (this._targetElement) {
|
|
61555
62088
|
this._targetElement.style.cursor = '';
|
|
61556
|
-
this._targetElement.style.removeProperty('--kritzel-
|
|
62089
|
+
this._targetElement.style.removeProperty('--kritzel-global-default-cursor');
|
|
62090
|
+
this._targetElement.style.removeProperty('--kritzel-global-pointer-cursor');
|
|
61557
62091
|
}
|
|
61558
62092
|
this._targetElement = null;
|
|
61559
62093
|
this._shadowRoot = null;
|
|
@@ -63456,7 +63990,7 @@ class KritzelCore {
|
|
|
63456
63990
|
this._store.state.translateY = viewportHeight / 2 - (viewport.centerWorldY ?? 0) * scale;
|
|
63457
63991
|
this._store.state.scale = scale;
|
|
63458
63992
|
await objectsMap.initialize(this, activeWorkspace.id, this._syncConfig);
|
|
63459
|
-
this.seedWorkspaceObjects(activeWorkspace, objectsMap);
|
|
63993
|
+
await this.seedWorkspaceObjects(activeWorkspace, objectsMap);
|
|
63460
63994
|
// Set local user in awareness after object map is initialized
|
|
63461
63995
|
if (this._user) {
|
|
63462
63996
|
objectsMap.setLocalUser(this._user);
|
|
@@ -63470,15 +64004,21 @@ class KritzelCore {
|
|
|
63470
64004
|
this.engine.emitObjectsChange();
|
|
63471
64005
|
this.rerender();
|
|
63472
64006
|
}
|
|
63473
|
-
seedWorkspaceObjects(workspace, objectsMap) {
|
|
64007
|
+
async seedWorkspaceObjects(workspace, objectsMap) {
|
|
63474
64008
|
if (!workspace.objects?.length) {
|
|
63475
64009
|
return;
|
|
63476
64010
|
}
|
|
64011
|
+
const pendingObjects = workspace.objects.filter(object => !objectsMap.findById(object.id));
|
|
64012
|
+
// Mirrors engine.addObject()/addObjects(): image asset upload is async and must
|
|
64013
|
+
// happen before the (synchronous) Yjs transaction that inserts the objects.
|
|
64014
|
+
for (const object of pendingObjects) {
|
|
64015
|
+
object._core = this;
|
|
64016
|
+
if (KritzelClassHelper.isInstanceOf(object, 'KritzelImage')) {
|
|
64017
|
+
await object.prepareForInsert();
|
|
64018
|
+
}
|
|
64019
|
+
}
|
|
63477
64020
|
objectsMap.transaction(() => {
|
|
63478
|
-
for (const object of
|
|
63479
|
-
if (objectsMap.findById(object.id)) {
|
|
63480
|
-
continue;
|
|
63481
|
-
}
|
|
64021
|
+
for (const object of pendingObjects) {
|
|
63482
64022
|
this.prepareObjectForWorkspace(object, workspace.id, this._store.currentZIndex, this._store.state.scale);
|
|
63483
64023
|
objectsMap.insert(object);
|
|
63484
64024
|
}
|
|
@@ -63517,16 +64057,30 @@ class KritzelCore {
|
|
|
63517
64057
|
* @param scaleFallback - Scale applied to objects that do not define one
|
|
63518
64058
|
* @returns The objects that were added, updated and removed
|
|
63519
64059
|
*/
|
|
63520
|
-
reconcileWorkspaceObjects(objectsMap, workspaceId, desiredObjects, nextZIndex, scaleFallback) {
|
|
64060
|
+
async reconcileWorkspaceObjects(objectsMap, workspaceId, desiredObjects, nextZIndex, scaleFallback) {
|
|
63521
64061
|
const existingObjects = objectsMap.allObjects().filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox));
|
|
63522
64062
|
const existingById = new Map(existingObjects.map(object => [object.id, object]));
|
|
63523
64063
|
const desiredIds = new Set();
|
|
63524
64064
|
const diff = { added: [], updated: [], removed: [] };
|
|
64065
|
+
// Assign IDs up front so the insert-vs-update lookup below is stable, and so the
|
|
64066
|
+
// async image-prepare pass and the (synchronous) transaction agree on identity.
|
|
64067
|
+
for (const object of desiredObjects) {
|
|
64068
|
+
if (!object.id) {
|
|
64069
|
+
object.id = object.generateId();
|
|
64070
|
+
}
|
|
64071
|
+
}
|
|
64072
|
+
// Mirrors engine.addObject()/addObjects(): image asset upload is async and must
|
|
64073
|
+
// happen before the (synchronous) Yjs transaction that inserts the objects.
|
|
64074
|
+
for (const object of desiredObjects) {
|
|
64075
|
+
const existingObject = existingById.get(object.id);
|
|
64076
|
+
const isNewOrReplaced = !existingObject || existingObject !== object;
|
|
64077
|
+
if (isNewOrReplaced && KritzelClassHelper.isInstanceOf(object, 'KritzelImage')) {
|
|
64078
|
+
object._core = this;
|
|
64079
|
+
await object.prepareForInsert();
|
|
64080
|
+
}
|
|
64081
|
+
}
|
|
63525
64082
|
objectsMap.transaction(() => {
|
|
63526
64083
|
for (const object of desiredObjects) {
|
|
63527
|
-
if (!object.id) {
|
|
63528
|
-
object.id = object.generateId();
|
|
63529
|
-
}
|
|
63530
64084
|
desiredIds.add(object.id);
|
|
63531
64085
|
const existingObject = existingById.get(object.id);
|
|
63532
64086
|
if (!existingObject) {
|
|
@@ -63564,7 +64118,7 @@ class KritzelCore {
|
|
|
63564
64118
|
* object set stays exactly what the caller declared.
|
|
63565
64119
|
*/
|
|
63566
64120
|
detachObject(object) {
|
|
63567
|
-
if (
|
|
64121
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
63568
64122
|
object.unmount();
|
|
63569
64123
|
}
|
|
63570
64124
|
object.isMounted = false;
|
|
@@ -63740,13 +64294,13 @@ class KritzelCore {
|
|
|
63740
64294
|
activeWorkspace.viewport = { centerWorldX, centerWorldY, scale };
|
|
63741
64295
|
}
|
|
63742
64296
|
}
|
|
63743
|
-
applyObjectsToActiveWorkspace(workspace, desiredObjects) {
|
|
64297
|
+
async applyObjectsToActiveWorkspace(workspace, desiredObjects) {
|
|
63744
64298
|
const objectsMap = this._store.objects;
|
|
63745
64299
|
if (!objectsMap) {
|
|
63746
64300
|
return null;
|
|
63747
64301
|
}
|
|
63748
64302
|
this.clearSelection();
|
|
63749
|
-
const diff = this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this._store.currentZIndex, this._store.state.scale);
|
|
64303
|
+
const diff = await this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this._store.currentZIndex, this._store.state.scale);
|
|
63750
64304
|
this._anchorManager.rebuildIndex();
|
|
63751
64305
|
this.rerender();
|
|
63752
64306
|
return diff;
|
|
@@ -63765,7 +64319,7 @@ class KritzelCore {
|
|
|
63765
64319
|
try {
|
|
63766
64320
|
await objectsMap.initialize(this, workspace.id, this._syncConfig, { headless: true, workspaceName: workspace.name });
|
|
63767
64321
|
await objectsMap.whenNetworkSynced();
|
|
63768
|
-
return this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this.nextZIndexOf(objectsMap), this._store.state.scale);
|
|
64322
|
+
return await this.reconcileWorkspaceObjects(objectsMap, workspace.id, desiredObjects, () => this.nextZIndexOf(objectsMap), this._store.state.scale);
|
|
63769
64323
|
}
|
|
63770
64324
|
finally {
|
|
63771
64325
|
objectsMap.destroy();
|
|
@@ -63851,8 +64405,7 @@ class KritzelCore {
|
|
|
63851
64405
|
this.removeObject(child);
|
|
63852
64406
|
});
|
|
63853
64407
|
}
|
|
63854
|
-
|
|
63855
|
-
if (KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject')) {
|
|
64408
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
63856
64409
|
object.unmount();
|
|
63857
64410
|
}
|
|
63858
64411
|
// Handle anchor cleanup
|
|
@@ -63898,14 +64451,8 @@ class KritzelCore {
|
|
|
63898
64451
|
this.removeLocalSelectionGroups();
|
|
63899
64452
|
this.removeSelectionBox();
|
|
63900
64453
|
for (const object of selectionGroup.objects ?? []) {
|
|
63901
|
-
if (
|
|
63902
|
-
|
|
63903
|
-
if (typeof dynamicObject.setIsInteractive === 'function') {
|
|
63904
|
-
dynamicObject.setIsInteractive(true);
|
|
63905
|
-
}
|
|
63906
|
-
else {
|
|
63907
|
-
dynamicObject.isInteractive = true;
|
|
63908
|
-
}
|
|
64454
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
64455
|
+
object.setIsInteractive(true);
|
|
63909
64456
|
}
|
|
63910
64457
|
}
|
|
63911
64458
|
this._store.objects.insert(selectionGroup);
|
|
@@ -63926,14 +64473,8 @@ class KritzelCore {
|
|
|
63926
64473
|
teardownSelectionGroup(selectionGroup) {
|
|
63927
64474
|
selectionGroup.deselectAllChildren?.();
|
|
63928
64475
|
for (const object of selectionGroup.objects ?? []) {
|
|
63929
|
-
if (
|
|
63930
|
-
|
|
63931
|
-
if (typeof dynamicObject.setIsInteractive === 'function') {
|
|
63932
|
-
dynamicObject.setIsInteractive(false);
|
|
63933
|
-
}
|
|
63934
|
-
else {
|
|
63935
|
-
dynamicObject.isInteractive = false;
|
|
63936
|
-
}
|
|
64476
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
64477
|
+
object.setIsInteractive(false);
|
|
63937
64478
|
}
|
|
63938
64479
|
}
|
|
63939
64480
|
}
|
|
@@ -65379,13 +65920,7 @@ class KritzelWheelHelper {
|
|
|
65379
65920
|
return this.canElementConsumeWheel(scrollContainer, ev.deltaX, ev.deltaY);
|
|
65380
65921
|
}
|
|
65381
65922
|
static getScrollableContainerFromEventPath(path, dynamicObject) {
|
|
65382
|
-
const potentialRoots =
|
|
65383
|
-
if (dynamicObject.element instanceof HTMLElement) {
|
|
65384
|
-
potentialRoots.push(dynamicObject.element);
|
|
65385
|
-
}
|
|
65386
|
-
if (dynamicObject.elementRef instanceof HTMLElement) {
|
|
65387
|
-
potentialRoots.push(dynamicObject.elementRef);
|
|
65388
|
-
}
|
|
65923
|
+
const potentialRoots = dynamicObject.getEmbeddedContentRoots();
|
|
65389
65924
|
const legacyElementRef = dynamicObject.elmeentRef;
|
|
65390
65925
|
if (legacyElementRef instanceof HTMLElement) {
|
|
65391
65926
|
potentialRoots.push(legacyElementRef);
|
|
@@ -65562,8 +66097,8 @@ class KritzelSvgExportHelper {
|
|
|
65562
66097
|
.join('\n ');
|
|
65563
66098
|
const xmlDecl = includeXmlDeclaration ? '<?xml version="1.0" encoding="UTF-8"?>\n' : '';
|
|
65564
66099
|
const defsContent = defs.length > 0 ? `\n <defs>\n ${defs.join('\n ')}\n </defs>` : '';
|
|
65565
|
-
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
65566
|
-
${elements}
|
|
66100
|
+
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
66101
|
+
${elements}
|
|
65567
66102
|
</svg>`;
|
|
65568
66103
|
}
|
|
65569
66104
|
/**
|
|
@@ -65715,8 +66250,8 @@ class KritzelSvgExportHelper {
|
|
|
65715
66250
|
const orient = end === 'start' ? 'auto-start-reverse' : 'auto';
|
|
65716
66251
|
const refX = 0;
|
|
65717
66252
|
const refY = size / 2;
|
|
65718
|
-
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
65719
|
-
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
66253
|
+
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
66254
|
+
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
65720
66255
|
</marker>`;
|
|
65721
66256
|
}
|
|
65722
66257
|
/**
|
|
@@ -65745,6 +66280,9 @@ class KritzelSvgExportHelper {
|
|
|
65745
66280
|
if (KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject')) {
|
|
65746
66281
|
return this.dynamicObjectToSvg(object, rasterSafeForCanvas);
|
|
65747
66282
|
}
|
|
66283
|
+
if (KritzelClassHelper.isInstanceOf(object, 'KritzelIframeObject')) {
|
|
66284
|
+
return this.iframeObjectToSvg(object);
|
|
66285
|
+
}
|
|
65748
66286
|
if (KritzelClassHelper.isInstanceOf(object, 'KritzelGroup')) {
|
|
65749
66287
|
return this.groupToSvg(object, theme, imageDataUrls, rasterSafeForCanvas);
|
|
65750
66288
|
}
|
|
@@ -65763,10 +66301,10 @@ class KritzelSvgExportHelper {
|
|
|
65763
66301
|
const opacity = path.opacity !== 1 ? ` opacity="${path.opacity}"` : '';
|
|
65764
66302
|
const scale = this.getObjectScale(path);
|
|
65765
66303
|
// Path needs to be wrapped in a g with translation since path.d uses local coordinates
|
|
65766
|
-
return `<g transform="${transform}"${opacity}>
|
|
65767
|
-
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
65768
|
-
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
65769
|
-
</svg>
|
|
66304
|
+
return `<g transform="${transform}"${opacity}>
|
|
66305
|
+
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
66306
|
+
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
66307
|
+
</svg>
|
|
65770
66308
|
</g>`;
|
|
65771
66309
|
}
|
|
65772
66310
|
/**
|
|
@@ -65782,10 +66320,10 @@ class KritzelSvgExportHelper {
|
|
|
65782
66320
|
const scale = this.getObjectScale(line);
|
|
65783
66321
|
const markerStart = line.hasStartArrow ? ` marker-start="url(#${line.startMarkerId})"` : '';
|
|
65784
66322
|
const markerEnd = line.hasEndArrow ? ` marker-end="url(#${line.endMarkerId})"` : '';
|
|
65785
|
-
return `<g transform="${transform}"${opacity}>
|
|
65786
|
-
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
65787
|
-
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
65788
|
-
</svg>
|
|
66323
|
+
return `<g transform="${transform}"${opacity}>
|
|
66324
|
+
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
66325
|
+
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
66326
|
+
</svg>
|
|
65789
66327
|
</g>`;
|
|
65790
66328
|
}
|
|
65791
66329
|
/**
|
|
@@ -65809,18 +66347,18 @@ class KritzelSvgExportHelper {
|
|
|
65809
66347
|
const textHtml = this.prosemirrorToHtml(shape.content, shape, theme);
|
|
65810
66348
|
if (textHtml) {
|
|
65811
66349
|
const fontColor = KritzelColorHelper.resolveThemeColor(shape.fontColor, theme);
|
|
65812
|
-
textContent = `
|
|
65813
|
-
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
65814
|
-
<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;">
|
|
65815
|
-
${textHtml}
|
|
65816
|
-
</div>
|
|
66350
|
+
textContent = `
|
|
66351
|
+
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
66352
|
+
<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;">
|
|
66353
|
+
${textHtml}
|
|
66354
|
+
</div>
|
|
65817
66355
|
</foreignObject>`;
|
|
65818
66356
|
}
|
|
65819
66357
|
}
|
|
65820
|
-
return `<g transform="${transform}"${opacity}>
|
|
65821
|
-
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
65822
|
-
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
65823
|
-
</svg>
|
|
66358
|
+
return `<g transform="${transform}"${opacity}>
|
|
66359
|
+
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
66360
|
+
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
66361
|
+
</svg>
|
|
65824
66362
|
</g>`;
|
|
65825
66363
|
}
|
|
65826
66364
|
/**
|
|
@@ -65851,10 +66389,10 @@ class KritzelSvgExportHelper {
|
|
|
65851
66389
|
// adjusted font-size already accounts for it – keeping both would double-scale
|
|
65852
66390
|
// the content and overflow the foreignObject.
|
|
65853
66391
|
const svgFontSizePx = (text.fontSize * (4 / 3) * (text.scaleFactor || 1) / scale).toFixed(4);
|
|
65854
|
-
return `<g transform="${transform}"${opacity}>
|
|
65855
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
65856
|
-
<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>
|
|
65857
|
-
</foreignObject>
|
|
66392
|
+
return `<g transform="${transform}"${opacity}>
|
|
66393
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
66394
|
+
<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>
|
|
66395
|
+
</foreignObject>
|
|
65858
66396
|
</g>`;
|
|
65859
66397
|
}
|
|
65860
66398
|
/**
|
|
@@ -65888,9 +66426,9 @@ class KritzelSvgExportHelper {
|
|
|
65888
66426
|
return `<tspan x="0" y="${y}" xml:space="preserve">${this.escapeHtml(line)}</tspan>`;
|
|
65889
66427
|
})
|
|
65890
66428
|
.join('');
|
|
65891
|
-
return `<g transform="${transform}"${opacity}>
|
|
65892
|
-
${bgRect}
|
|
65893
|
-
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
66429
|
+
return `<g transform="${transform}"${opacity}>
|
|
66430
|
+
${bgRect}
|
|
66431
|
+
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
65894
66432
|
</g>`;
|
|
65895
66433
|
}
|
|
65896
66434
|
/**
|
|
@@ -65918,8 +66456,8 @@ class KritzelSvgExportHelper {
|
|
|
65918
66456
|
const width = image.totalWidth / scale;
|
|
65919
66457
|
const height = image.totalHeight / scale;
|
|
65920
66458
|
const href = imageDataUrls?.get(image.id) || image.resolvedSrc || image.src || '';
|
|
65921
|
-
return `<g transform="${transform}"${opacity}>
|
|
65922
|
-
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
66459
|
+
return `<g transform="${transform}"${opacity}>
|
|
66460
|
+
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
65923
66461
|
</g>`;
|
|
65924
66462
|
}
|
|
65925
66463
|
/**
|
|
@@ -65939,19 +66477,30 @@ class KritzelSvgExportHelper {
|
|
|
65939
66477
|
if (rasterSafeForCanvas) {
|
|
65940
66478
|
// PNG export: render placeholder rect (foreignObject doesn't rasterize to PNG well)
|
|
65941
66479
|
console.warn('[KritzelDynamicObject SVG Export] Dynamic objects do not serialize well to PNG. Use SVG export or screenshot instead.');
|
|
65942
|
-
return `<g transform="${transform}"${opacity}>
|
|
65943
|
-
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
65944
|
-
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Dynamic Object]</text>
|
|
66480
|
+
return `<g transform="${transform}"${opacity}>
|
|
66481
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
66482
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Dynamic Object]</text>
|
|
65945
66483
|
</g>`;
|
|
65946
66484
|
}
|
|
65947
66485
|
// SVG export: use foreignObject to embed HTML
|
|
65948
66486
|
const html = obj.element?.outerHTML || '<div style="border:1px dashed #ccc">Empty</div>';
|
|
65949
|
-
return `<g transform="${transform}"${opacity}>
|
|
65950
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
65951
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
65952
|
-
${html}
|
|
65953
|
-
</div>
|
|
65954
|
-
</foreignObject>
|
|
66487
|
+
return `<g transform="${transform}"${opacity}>
|
|
66488
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
66489
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
66490
|
+
${html}
|
|
66491
|
+
</div>
|
|
66492
|
+
</foreignObject>
|
|
66493
|
+
</g>`;
|
|
66494
|
+
}
|
|
66495
|
+
static iframeObjectToSvg(object) {
|
|
66496
|
+
const transform = this.buildTransform(object);
|
|
66497
|
+
const opacity = object.opacity !== 1 ? ` opacity="${object.opacity}"` : '';
|
|
66498
|
+
const scale = this.getObjectScale(object);
|
|
66499
|
+
const width = object.totalWidth / scale;
|
|
66500
|
+
const height = object.totalHeight / scale;
|
|
66501
|
+
return `<g transform="${transform}"${opacity}>
|
|
66502
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
66503
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Iframe]</text>
|
|
65955
66504
|
</g>`;
|
|
65956
66505
|
}
|
|
65957
66506
|
/**
|
|
@@ -65971,8 +66520,8 @@ class KritzelSvgExportHelper {
|
|
|
65971
66520
|
return '';
|
|
65972
66521
|
}
|
|
65973
66522
|
const opacity = group.opacity !== 1 ? ` opacity="${group.opacity}"` : '';
|
|
65974
|
-
return `<g${opacity}>
|
|
65975
|
-
${children}
|
|
66523
|
+
return `<g${opacity}>
|
|
66524
|
+
${children}
|
|
65976
66525
|
</g>`;
|
|
65977
66526
|
}
|
|
65978
66527
|
/**
|
|
@@ -66157,12 +66706,26 @@ const KritzelEngine = class {
|
|
|
66157
66706
|
/** Authoritative workspace catalog for this engine instance. When provided, provider-only workspaces are hidden but not deleted. */
|
|
66158
66707
|
workspaces;
|
|
66159
66708
|
async onWorkspacesPropChange() {
|
|
66160
|
-
|
|
66709
|
+
this._workspacesRevision++;
|
|
66710
|
+
if (!this._isYjsInitialized || this._syncInitPromise) {
|
|
66161
66711
|
return;
|
|
66162
66712
|
}
|
|
66163
|
-
|
|
66164
|
-
|
|
66165
|
-
|
|
66713
|
+
const previousReconciliation = this._workspacePropReconciliationPromise;
|
|
66714
|
+
const reconciliationPromise = (async () => {
|
|
66715
|
+
await previousReconciliation;
|
|
66716
|
+
await this.reconcileProvidedWorkspaces();
|
|
66717
|
+
await this.ensureActiveWorkspaceIsVisible();
|
|
66718
|
+
this.workspacesChange.emit(this.getVisibleWorkspaces());
|
|
66719
|
+
})();
|
|
66720
|
+
this._workspacePropReconciliationPromise = reconciliationPromise;
|
|
66721
|
+
try {
|
|
66722
|
+
await reconciliationPromise;
|
|
66723
|
+
}
|
|
66724
|
+
finally {
|
|
66725
|
+
if (this._workspacePropReconciliationPromise === reconciliationPromise) {
|
|
66726
|
+
this._workspacePropReconciliationPromise = null;
|
|
66727
|
+
}
|
|
66728
|
+
}
|
|
66166
66729
|
}
|
|
66167
66730
|
/** Optional unique identifier for namespacing storage keys across multiple editor instances. */
|
|
66168
66731
|
editorId;
|
|
@@ -66216,6 +66779,12 @@ const KritzelEngine = class {
|
|
|
66216
66779
|
onUserChange(newValue) {
|
|
66217
66780
|
this.core.setUser(newValue);
|
|
66218
66781
|
}
|
|
66782
|
+
/** Tool definitions to register with this engine instance. */
|
|
66783
|
+
tools = [];
|
|
66784
|
+
onToolsChange() {
|
|
66785
|
+
this._toolsRevision++;
|
|
66786
|
+
void this.registerConfiguredTools();
|
|
66787
|
+
}
|
|
66219
66788
|
/** Context menu items shown when right-clicking the canvas background. */
|
|
66220
66789
|
globalContextMenuItems;
|
|
66221
66790
|
onGlobalContextMenuItemsChange(newValue) {
|
|
@@ -66406,7 +66975,7 @@ const KritzelEngine = class {
|
|
|
66406
66975
|
}
|
|
66407
66976
|
const hoveredObject = this.core.getObjectFromPointerEvent(ev);
|
|
66408
66977
|
if (hoveredObject &&
|
|
66409
|
-
ObjectHelper.
|
|
66978
|
+
ObjectHelper.isKritzelEmbeddedObject(hoveredObject) &&
|
|
66410
66979
|
KritzelWheelHelper.shouldKeepWheelInDynamicObject(ev, hoveredObject)) {
|
|
66411
66980
|
return;
|
|
66412
66981
|
}
|
|
@@ -66508,7 +67077,7 @@ const KritzelEngine = class {
|
|
|
66508
67077
|
return false;
|
|
66509
67078
|
}
|
|
66510
67079
|
const object = this.core.store.objects.findById(objectElement.id);
|
|
66511
|
-
if (!object || !
|
|
67080
|
+
if (!object || !ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
66512
67081
|
return false;
|
|
66513
67082
|
}
|
|
66514
67083
|
const isSelected = !!this.core.store.selectionGroup?.objects?.some(selectedObject => selectedObject.id === object.id);
|
|
@@ -66518,13 +67087,7 @@ const KritzelEngine = class {
|
|
|
66518
67087
|
if (object.isInteractive !== true) {
|
|
66519
67088
|
return false;
|
|
66520
67089
|
}
|
|
66521
|
-
const potentialRoots =
|
|
66522
|
-
if (object.element instanceof HTMLElement) {
|
|
66523
|
-
potentialRoots.push(object.element);
|
|
66524
|
-
}
|
|
66525
|
-
if (object.elementRef instanceof HTMLElement) {
|
|
66526
|
-
potentialRoots.push(object.elementRef);
|
|
66527
|
-
}
|
|
67090
|
+
const potentialRoots = object.getEmbeddedContentRoots();
|
|
66528
67091
|
if (potentialRoots.length === 0) {
|
|
66529
67092
|
return false;
|
|
66530
67093
|
}
|
|
@@ -66698,7 +67261,7 @@ const KritzelEngine = class {
|
|
|
66698
67261
|
* Switches the active drawing tool by its registered name.
|
|
66699
67262
|
* @param toolName - The name the tool was registered with (e.g., 'brush', 'eraser').
|
|
66700
67263
|
*/
|
|
66701
|
-
async
|
|
67264
|
+
async setActiveTool(toolName) {
|
|
66702
67265
|
const tool = this.core.toolRegistry.getTool(toolName);
|
|
66703
67266
|
if (!tool) {
|
|
66704
67267
|
console.warn(`[KritzelEngine] No tool registered with name: ${toolName}`);
|
|
@@ -68004,9 +68567,13 @@ const KritzelEngine = class {
|
|
|
68004
68567
|
_stateChangeListenersRegistered = false;
|
|
68005
68568
|
_workspaceInitializationPromise = null;
|
|
68006
68569
|
_workspaceInitializationTargetKey = null;
|
|
68570
|
+
_workspacePropReconciliationPromise = null;
|
|
68007
68571
|
_syncInitPromise = null;
|
|
68572
|
+
_toolsInitPromise = null;
|
|
68573
|
+
_toolsRevision = 0;
|
|
68008
68574
|
_syncConfigRevision = 0;
|
|
68009
68575
|
_assetStorageConfigRevision = 0;
|
|
68576
|
+
_workspacesRevision = 0;
|
|
68010
68577
|
_hasLoggedUnlicensedWelcomeBanner = false;
|
|
68011
68578
|
_previousVisibleDynamicObjects = new Set();
|
|
68012
68579
|
_revealedImageKeys = new Set();
|
|
@@ -68019,6 +68586,37 @@ const KritzelEngine = class {
|
|
|
68019
68586
|
undoStackSize: 0,
|
|
68020
68587
|
redoStackSize: 0,
|
|
68021
68588
|
};
|
|
68589
|
+
/** Returns a tool registered in this engine instance. */
|
|
68590
|
+
async getTool(toolName) {
|
|
68591
|
+
await this.registerConfiguredTools();
|
|
68592
|
+
return this.core.toolRegistry.getTool(toolName);
|
|
68593
|
+
}
|
|
68594
|
+
async registerConfiguredTools() {
|
|
68595
|
+
if (this._toolsInitPromise) {
|
|
68596
|
+
return this._toolsInitPromise;
|
|
68597
|
+
}
|
|
68598
|
+
this._toolsInitPromise = (async () => {
|
|
68599
|
+
do {
|
|
68600
|
+
const revision = this._toolsRevision;
|
|
68601
|
+
for (const definition of this.tools) {
|
|
68602
|
+
let toolClass = definition.tool;
|
|
68603
|
+
if (typeof toolClass !== 'function') {
|
|
68604
|
+
toolClass = toolClass.constructor;
|
|
68605
|
+
}
|
|
68606
|
+
await this.registerTool(definition.name, toolClass, definition.config);
|
|
68607
|
+
}
|
|
68608
|
+
if (revision === this._toolsRevision) {
|
|
68609
|
+
break;
|
|
68610
|
+
}
|
|
68611
|
+
} while (true);
|
|
68612
|
+
})();
|
|
68613
|
+
try {
|
|
68614
|
+
await this._toolsInitPromise;
|
|
68615
|
+
}
|
|
68616
|
+
finally {
|
|
68617
|
+
this._toolsInitPromise = null;
|
|
68618
|
+
}
|
|
68619
|
+
}
|
|
68022
68620
|
setLoadingState(isLoading) {
|
|
68023
68621
|
if (this.core.store.state.isLoading === isLoading) {
|
|
68024
68622
|
return;
|
|
@@ -68146,6 +68744,8 @@ const KritzelEngine = class {
|
|
|
68146
68744
|
this.core.licenseManager.destroy();
|
|
68147
68745
|
}
|
|
68148
68746
|
componentWillLoad() {
|
|
68747
|
+
this._toolsRevision++;
|
|
68748
|
+
void this.registerConfiguredTools();
|
|
68149
68749
|
this.core.setEditorId(this.editorId);
|
|
68150
68750
|
if (this.themes && this.themes.length > 0) {
|
|
68151
68751
|
this.core.themeManager.registerThemes(this.themes);
|
|
@@ -68185,7 +68785,9 @@ const KritzelEngine = class {
|
|
|
68185
68785
|
const editorElement = this.host.closest('kritzel-editor');
|
|
68186
68786
|
this.core.themeManager.setTargetElement(editorElement || this.host);
|
|
68187
68787
|
// Initialize sync config and Yjs
|
|
68788
|
+
await this.registerConfiguredTools();
|
|
68188
68789
|
await this.initializeSyncAndWorkspace();
|
|
68790
|
+
await this.waitForWorkspaceAndSceneReady();
|
|
68189
68791
|
if (this.core.store.state.isReady === false) {
|
|
68190
68792
|
this.core.store.state.isReady = true;
|
|
68191
68793
|
this.logUnlicensedWelcomeBanner();
|
|
@@ -68207,6 +68809,20 @@ const KritzelEngine = class {
|
|
|
68207
68809
|
this._syncInitPromise = null;
|
|
68208
68810
|
}
|
|
68209
68811
|
}
|
|
68812
|
+
async waitForSceneRender() {
|
|
68813
|
+
await new Promise(resolve => {
|
|
68814
|
+
requestAnimationFrame(() => requestAnimationFrame(() => resolve()));
|
|
68815
|
+
});
|
|
68816
|
+
}
|
|
68817
|
+
async waitForWorkspaceAndSceneReady() {
|
|
68818
|
+
let observedRevision;
|
|
68819
|
+
do {
|
|
68820
|
+
observedRevision = this._workspacesRevision;
|
|
68821
|
+
await this._workspacePropReconciliationPromise;
|
|
68822
|
+
await this.waitForSceneRender();
|
|
68823
|
+
} while (observedRevision !== this._workspacesRevision ||
|
|
68824
|
+
this._workspacePropReconciliationPromise);
|
|
68825
|
+
}
|
|
68210
68826
|
/**
|
|
68211
68827
|
* Initializes the asset storage layer with the latest config. Mirrors
|
|
68212
68828
|
* the in-flight replay logic of {@link doInitializeSyncAndWorkspace} for
|
|
@@ -68589,7 +69205,7 @@ const KritzelEngine = class {
|
|
|
68589
69205
|
if (!KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup')) {
|
|
68590
69206
|
return 'auto';
|
|
68591
69207
|
}
|
|
68592
|
-
if (object.objects.length === 1 &&
|
|
69208
|
+
if (object.objects.length === 1 && ObjectHelper.isKritzelEmbeddedObject(object.objects[0])) {
|
|
68593
69209
|
return 'none';
|
|
68594
69210
|
}
|
|
68595
69211
|
return 'auto';
|
|
@@ -68597,7 +69213,7 @@ const KritzelEngine = class {
|
|
|
68597
69213
|
// Track visible dynamic objects and unmount culled ones
|
|
68598
69214
|
const currentVisibleDynamicObjects = new Set();
|
|
68599
69215
|
visibleObjects.forEach(object => {
|
|
68600
|
-
if (
|
|
69216
|
+
if (ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
68601
69217
|
currentVisibleDynamicObjects.add(object.id);
|
|
68602
69218
|
}
|
|
68603
69219
|
});
|
|
@@ -68605,7 +69221,7 @@ const KritzelEngine = class {
|
|
|
68605
69221
|
this._previousVisibleDynamicObjects.forEach(id => {
|
|
68606
69222
|
if (!currentVisibleDynamicObjects.has(id)) {
|
|
68607
69223
|
const object = this.core.store.objects.findById(id);
|
|
68608
|
-
if (object &&
|
|
69224
|
+
if (object && ObjectHelper.isKritzelEmbeddedObject(object)) {
|
|
68609
69225
|
object.unmount();
|
|
68610
69226
|
}
|
|
68611
69227
|
}
|
|
@@ -68698,7 +69314,7 @@ const KritzelEngine = class {
|
|
|
68698
69314
|
display: 'flex',
|
|
68699
69315
|
alignItems: 'center',
|
|
68700
69316
|
justifyContent: 'center',
|
|
68701
|
-
} }, h("kritzel-icon", { name: object.loadState === 'error' ? '
|
|
69317
|
+
} }, h("kritzel-icon", { name: object.loadState === 'error' ? 'imageOff' : 'image', size: Math.max(16, Math.min(object.totalWidth, object.totalHeight) * 0.3), style: {
|
|
68702
69318
|
color: KritzelColorHelper.resolveThemeColor({ light: '#9ca3af', dark: '#6b7280' }, currentTheme),
|
|
68703
69319
|
} }))), KritzelClassHelper.isInstanceOf(object, 'KritzelDynamicObject') && (h("div", { ref: el => el && object.mount(el), style: {
|
|
68704
69320
|
position: 'absolute',
|
|
@@ -68717,7 +69333,37 @@ const KritzelEngine = class {
|
|
|
68717
69333
|
padding: object.padding + 'px',
|
|
68718
69334
|
overflow: 'visible',
|
|
68719
69335
|
display: 'block',
|
|
68720
|
-
} })), KritzelClassHelper.isInstanceOf(object, '
|
|
69336
|
+
} })), KritzelClassHelper.isInstanceOf(object, 'KritzelIframeObject') && (h("div", { style: {
|
|
69337
|
+
position: 'absolute',
|
|
69338
|
+
left: '0',
|
|
69339
|
+
top: '0',
|
|
69340
|
+
width: object.totalWidth + 'px',
|
|
69341
|
+
height: object.totalHeight + 'px',
|
|
69342
|
+
transform: object.rotationDegrees !== 0 ? `rotate(${object.rotationDegrees}deg)` : undefined,
|
|
69343
|
+
transformOrigin: object.rotationDegrees !== 0 ? `${object.totalWidth / 2}px ${object.totalHeight / 2}px` : undefined,
|
|
69344
|
+
opacity: effectiveOpacityString,
|
|
69345
|
+
backgroundColor: KritzelColorHelper.resolveThemeColor(object.backgroundColor, currentTheme),
|
|
69346
|
+
borderColor: KritzelColorHelper.resolveThemeColor(object.borderColor, currentTheme),
|
|
69347
|
+
borderWidth: object.borderWidth + 'px',
|
|
69348
|
+
borderStyle: 'solid',
|
|
69349
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69350
|
+
boxShadow: object.boxShadow,
|
|
69351
|
+
overflow: 'hidden',
|
|
69352
|
+
display: 'block',
|
|
69353
|
+
pointerEvents: object.markedForRemoval ? 'none' : 'auto',
|
|
69354
|
+
} }, h("iframe", { ref: element => element && object.mount(element), title: object.title, sandbox: object.sandboxAttribute, style: {
|
|
69355
|
+
display: 'block',
|
|
69356
|
+
width: '100%',
|
|
69357
|
+
height: '100%',
|
|
69358
|
+
border: '0',
|
|
69359
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69360
|
+
pointerEvents: object.isInteractive ? 'auto' : 'none',
|
|
69361
|
+
} }), h("div", { style: {
|
|
69362
|
+
position: 'absolute',
|
|
69363
|
+
inset: '0',
|
|
69364
|
+
borderRadius: object.borderRadius !== undefined ? (typeof object.borderRadius === 'number' ? `${object.borderRadius}px` : object.borderRadius) : undefined,
|
|
69365
|
+
pointerEvents: object.isInteractive ? 'none' : 'auto',
|
|
69366
|
+
} }))), KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup') && !this.core.displaySelectionLineUI(object) && (h("div", { ref: el => el && object.mount(el), style: {
|
|
68721
69367
|
position: 'absolute',
|
|
68722
69368
|
left: '0',
|
|
68723
69369
|
top: '0',
|
|
@@ -69075,6 +69721,9 @@ const KritzelEngine = class {
|
|
|
69075
69721
|
"user": [{
|
|
69076
69722
|
"onUserChange": 0
|
|
69077
69723
|
}],
|
|
69724
|
+
"tools": [{
|
|
69725
|
+
"onToolsChange": 0
|
|
69726
|
+
}],
|
|
69078
69727
|
"globalContextMenuItems": [{
|
|
69079
69728
|
"onGlobalContextMenuItemsChange": 0
|
|
69080
69729
|
}],
|
|
@@ -69211,7 +69860,7 @@ const KritzelExport = class {
|
|
|
69211
69860
|
return (h("div", { class: "export-tab-content" }, 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 })));
|
|
69212
69861
|
}
|
|
69213
69862
|
render() {
|
|
69214
|
-
return (h(Host, { key: '
|
|
69863
|
+
return (h(Host, { key: '94d55a7c75cdad6c8772180656016ef7a84ea937' }, h("kritzel-dialog", { key: '7564885a16e21f036e4943f9be923ef3db07ab77', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: '40fceeacffc79d70ecea2c397f19852e85756d50', class: "export-content" }, 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()), h("div", { key: '29a0fcb85755577655401c96643a1956aedfa27d', slot: "footer" }, h("button", { key: 'f003963d407005c67740b6620b8983dcf3c8977a', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
|
|
69215
69864
|
}
|
|
69216
69865
|
};
|
|
69217
69866
|
KritzelExport.style = kritzelExportCss();
|
|
@@ -69226,7 +69875,7 @@ const KritzelFont = class {
|
|
|
69226
69875
|
size = 24;
|
|
69227
69876
|
color = '#000000';
|
|
69228
69877
|
render() {
|
|
69229
|
-
return (h(Host, { key: '
|
|
69878
|
+
return (h(Host, { key: '7ee5e56528fd93c5b00c930e0404b55aa6ba29f7' }, h("div", { key: '54111872192f8f6aa4a523c81fdcbacacde5facf', class: "font-preview", style: {
|
|
69230
69879
|
fontFamily: this.fontFamily,
|
|
69231
69880
|
fontSize: `${this.size}px`,
|
|
69232
69881
|
color: this.color
|
|
@@ -69276,7 +69925,7 @@ const KritzelFontFamily = class {
|
|
|
69276
69925
|
label: option.label,
|
|
69277
69926
|
style: { fontFamily: option.cssFontFamily ?? option.value },
|
|
69278
69927
|
}));
|
|
69279
|
-
return (h(Host, { key: '
|
|
69928
|
+
return (h(Host, { key: '059350f34370f7a291f47a42721ca5d9bb82df49' }, h("kritzel-dropdown", { key: 'fbd8cf1ae463c7e9b76d0ac754a41de54397058e', options: dropdownOptions, value: this.selectedFontFamily, onValueChanged: this.handleDropdownValueChange, selectStyles: { fontFamily: selectedFontFamily } })));
|
|
69280
69929
|
}
|
|
69281
69930
|
static get watchers() { return {
|
|
69282
69931
|
"fontOptions": [{
|
|
@@ -69310,7 +69959,7 @@ const KritzelFontSize = class {
|
|
|
69310
69959
|
render() {
|
|
69311
69960
|
const color = 'var(--kritzel-global-text-primary)';
|
|
69312
69961
|
const sizes = this.sizes ?? [];
|
|
69313
|
-
return (h(Host, { key: '
|
|
69962
|
+
return (h(Host, { key: 'e8309800110db6b59eb1c43ede2e4e94d085f380' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
69314
69963
|
'size-container': true,
|
|
69315
69964
|
'selected': this.selectedSize === size,
|
|
69316
69965
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -69327,6 +69976,20 @@ const KritzelIcon = class {
|
|
|
69327
69976
|
name;
|
|
69328
69977
|
label;
|
|
69329
69978
|
size = 24;
|
|
69979
|
+
unsubscribe;
|
|
69980
|
+
connectedCallback() {
|
|
69981
|
+
this.unsubscribe?.();
|
|
69982
|
+
this.unsubscribe = KritzelIconRegistry.subscribe(name => {
|
|
69983
|
+
if (name === this.name) {
|
|
69984
|
+
forceUpdate(this);
|
|
69985
|
+
}
|
|
69986
|
+
});
|
|
69987
|
+
forceUpdate(this);
|
|
69988
|
+
}
|
|
69989
|
+
disconnectedCallback() {
|
|
69990
|
+
this.unsubscribe?.();
|
|
69991
|
+
this.unsubscribe = undefined;
|
|
69992
|
+
}
|
|
69330
69993
|
render() {
|
|
69331
69994
|
const svgContent = KritzelIconRegistry.get(this.name);
|
|
69332
69995
|
if (!svgContent) {
|
|
@@ -69377,7 +70040,7 @@ const KritzelInput = class {
|
|
|
69377
70040
|
this.valueChange.emit(input.value);
|
|
69378
70041
|
};
|
|
69379
70042
|
render() {
|
|
69380
|
-
return (h(Host, { key: '
|
|
70043
|
+
return (h(Host, { key: '7294192b97df384f321825a8fa30c822f79b6f29' }, h("div", { key: 'c355a4ee26adf0ab71d27e1697eddc1f9533d665', class: "input-container" }, this.label && h("label", { key: '75ee613cdbd20acc6dbd16642bd4dac9058309aa', class: "input-label" }, this.label), h("div", { key: '0395860993deda5cd57d8a185df8b36a52742841', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: 'a12d80b4d51bcd1526b49119fb2b20ad9343d71b', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: 'b682a1764795c2f9039b78e866be09609f7d0d80', class: "input-suffix" }, this.suffix)))));
|
|
69381
70044
|
}
|
|
69382
70045
|
static get watchers() { return {
|
|
69383
70046
|
"value": [{
|
|
@@ -69459,10 +70122,10 @@ const KritzelLineEndings = class {
|
|
|
69459
70122
|
render() {
|
|
69460
70123
|
const startEnding = this.getStartEnding();
|
|
69461
70124
|
const endEnding = this.getEndEnding();
|
|
69462
|
-
return (h(Host, { key: '
|
|
70125
|
+
return (h(Host, { key: '257d56ca7c191f2c0a7b4492ed29b029d271304c' }, h("div", { key: '294ca5f5006990ffec411eb9a67bf547a92af446', class: "endings-section" }, h("div", { key: 'bb3face6f0673d215ad820dfafdb8f5ba61390a9', class: "endings-row" }, this.styles.map(type => (h("button", { class: {
|
|
69463
70126
|
'ending-option': true,
|
|
69464
70127
|
'selected': startEnding === type,
|
|
69465
|
-
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), h("div", { key: '
|
|
70128
|
+
}, onClick: () => this.handleStartChange(type), title: type === 'none' ? 'No start arrow' : `${type} start arrow` }, this.renderEndingIcon(type, true)))))), h("div", { key: 'dbc47b5b744e5bc3fac0fd099a2afe3a90e4bdc0', class: "endings-section" }, h("div", { key: '00a017c7f98a3347ed29b39003ae49b2782bae8f', class: "endings-row" }, this.styles.map(type => (h("button", { class: {
|
|
69466
70129
|
'ending-option': true,
|
|
69467
70130
|
'selected': endEnding === type,
|
|
69468
70131
|
}, onClick: () => this.handleEndChange(type), title: type === 'none' ? 'No end arrow' : `${type} end arrow` }, this.renderEndingIcon(type, false))))))));
|
|
@@ -69470,7 +70133,7 @@ const KritzelLineEndings = class {
|
|
|
69470
70133
|
};
|
|
69471
70134
|
KritzelLineEndings.style = kritzelLineEndingsCss();
|
|
69472
70135
|
|
|
69473
|
-
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,
|
|
70136
|
+
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)}}`;
|
|
69474
70137
|
|
|
69475
70138
|
const KritzelLoadingOverlay = class {
|
|
69476
70139
|
constructor(hostRef) {
|
|
@@ -69485,7 +70148,7 @@ const KritzelLoadingOverlay = class {
|
|
|
69485
70148
|
*/
|
|
69486
70149
|
text = 'Loading...';
|
|
69487
70150
|
render() {
|
|
69488
|
-
return (h(Host, { key: '
|
|
70151
|
+
return (h(Host, { key: '1d00fc91ac568b7472121a37abe353dcee3db25c' }, h("div", { key: '5a32738aa35b799249694ef3fdd7a59ed7f06fee', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, h("span", { key: '9cc309802bf617f02d02d7017e8194634393b870', class: "loading-spinner" }), this.text)));
|
|
69489
70152
|
}
|
|
69490
70153
|
};
|
|
69491
70154
|
KritzelLoadingOverlay.style = kritzelLoadingOverlayCss();
|
|
@@ -69537,7 +70200,7 @@ const KritzelLoginDialog = class {
|
|
|
69537
70200
|
this.dialogClosed.emit();
|
|
69538
70201
|
};
|
|
69539
70202
|
render() {
|
|
69540
|
-
return (h(Host, { key: '
|
|
70203
|
+
return (h(Host, { key: '68f2b90426d32b12ac1e03dbed2f0c6f5e34eb9e' }, h("kritzel-dialog", { key: '2f6b6134ac984237593e587b0480d71fbdc9789e', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: 'd078c5cc1ef8465da47021b6562783a01d50f574', class: "login-content" }, this.subtitle && (h("p", { key: 'd42b498c43796703b2f92a5aaae2505113008e0e', class: "login-subtitle" }, this.subtitle)), h("div", { key: '1e6484c63e5bf6799ad566d753cc1e2bc4b518ff', class: "login-providers" }, this.providers.map(provider => (h("button", { key: provider.name, class: {
|
|
69541
70204
|
'provider-button': true,
|
|
69542
70205
|
'is-loading': this.loadingProvider === provider.name,
|
|
69543
70206
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -69643,15 +70306,15 @@ const KritzelMasterDetail = class {
|
|
|
69643
70306
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
69644
70307
|
const panelId = 'master-detail-panel';
|
|
69645
70308
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
69646
|
-
return (h(Host, { key: '
|
|
70309
|
+
return (h(Host, { key: 'dfb5a1fcc9e7cdc1dc803a1ebad437fd125f0544' }, h("div", { key: '9f7dbadccd893ad5c60f4c51052805729144d09e', class: {
|
|
69647
70310
|
'master-detail-container': true,
|
|
69648
70311
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
69649
|
-
} }, h("nav", { key: '
|
|
70312
|
+
} }, h("nav", { key: '40e23f5e5c123a80b7bd62fecc0c0121d9f671f2', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
|
|
69650
70313
|
'menu-item': true,
|
|
69651
70314
|
'is-selected': item.id === this.selectedItemId,
|
|
69652
70315
|
'is-disabled': !!item.disabled,
|
|
69653
70316
|
'is-focused': index === this.focusedIndex,
|
|
69654
|
-
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: '
|
|
70317
|
+
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'fe85069f67961b6f266fe602f17c130b5e554b1f', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '33feba674e61adddd31457e4a5c22d7932071c01', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'c94f80d668dbf8689bb4f2c8d7c8d1fb7b650715', name: "chevronLeft", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '8938f125f7597b13a64256400733de4cc5e1e7c4' })))));
|
|
69655
70318
|
}
|
|
69656
70319
|
static get watchers() { return {
|
|
69657
70320
|
"selectedItemId": [{
|
|
@@ -69661,7 +70324,7 @@ const KritzelMasterDetail = class {
|
|
|
69661
70324
|
};
|
|
69662
70325
|
KritzelMasterDetail.style = kritzelMasterDetailCss();
|
|
69663
70326
|
|
|
69664
|
-
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}`;
|
|
70327
|
+
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}`;
|
|
69665
70328
|
|
|
69666
70329
|
const KritzelMenu = class {
|
|
69667
70330
|
constructor(hostRef) {
|
|
@@ -69724,12 +70387,12 @@ const KritzelMenu = class {
|
|
|
69724
70387
|
this.itemCloseChildMenu.emit(event.detail);
|
|
69725
70388
|
};
|
|
69726
70389
|
render() {
|
|
69727
|
-
return (h(Host, { key: '
|
|
70390
|
+
return (h(Host, { key: 'fc7816cfb7a4f88f95f5abe4c9dcbccd920ad6e7', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'fb36bc0122d79b4929356280fe5213dd00535eae', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (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 })))));
|
|
69728
70391
|
}
|
|
69729
70392
|
};
|
|
69730
70393
|
KritzelMenu.style = kritzelMenuCss();
|
|
69731
70394
|
|
|
69732
|
-
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}`;
|
|
70395
|
+
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}`;
|
|
69733
70396
|
|
|
69734
70397
|
const KritzelMenuItem = class {
|
|
69735
70398
|
constructor(hostRef) {
|
|
@@ -69818,7 +70481,7 @@ const KritzelMenuItem = class {
|
|
|
69818
70481
|
h("div", { class: "menu-item-content left" }, this.item.icon && (h("span", { title: this.item.iconTooltip }, h("kritzel-icon", { name: this.item.icon, size: 16, style: this.item.color ? { '--kritzel-icon-color': this.item.color } : undefined }))), h("div", { style: this.item.color ? { color: this.item.color } : undefined }, this.item.label)),
|
|
69819
70482
|
h("div", { class: "menu-item-content right" }, this.item.children &&
|
|
69820
70483
|
this.item.children.length > 0 && [
|
|
69821
|
-
h("button", { id: "child-menu-toggle", class: "action-button", onClick: this.handleMenuToggle, disabled: this.item.isDisabled }, h("kritzel-icon", { name: "
|
|
70484
|
+
h("button", { id: "child-menu-toggle", class: "action-button", onClick: this.handleMenuToggle, disabled: this.item.isDisabled }, h("kritzel-icon", { name: "ellipsisVertical", size: 16 })),
|
|
69822
70485
|
h("kritzel-portal", { anchor: this.item.childMenuAnchor, offsetY: 4, onClose: this.handleMenuClose }, h(childMenuTag, {
|
|
69823
70486
|
items: this.item.children,
|
|
69824
70487
|
parent: this.item,
|
|
@@ -69837,12 +70500,12 @@ const KritzelMenuItem = class {
|
|
|
69837
70500
|
];
|
|
69838
70501
|
}
|
|
69839
70502
|
render() {
|
|
69840
|
-
return (h(Host, { key: '
|
|
70503
|
+
return (h(Host, { key: '90064541474da10a040c49ba72be132a8317dbba', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
69841
70504
|
'selected': this.item.isSelected,
|
|
69842
70505
|
'editing': this.item.isEditing,
|
|
69843
70506
|
'disabled': this.item.isDisabled,
|
|
69844
70507
|
'child-open': this.item.isChildMenuOpen,
|
|
69845
|
-
}, onClick: this.handleItemSelect }, h("div", { key: '
|
|
70508
|
+
}, onClick: this.handleItemSelect }, h("div", { key: '73be9249dced01dcc40e06b045329f9f642f0cb9', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
69846
70509
|
}
|
|
69847
70510
|
static get watchers() { return {
|
|
69848
70511
|
"item": [{
|
|
@@ -69873,7 +70536,7 @@ const KritzelMoreMenu = class {
|
|
|
69873
70536
|
/**
|
|
69874
70537
|
* The icon to display on the button
|
|
69875
70538
|
*/
|
|
69876
|
-
icon = '
|
|
70539
|
+
icon = 'ellipsisVertical';
|
|
69877
70540
|
/**
|
|
69878
70541
|
* The size of the icon
|
|
69879
70542
|
*/
|
|
@@ -70003,7 +70666,7 @@ const KritzelMoreMenu = class {
|
|
|
70003
70666
|
this.closeMenu();
|
|
70004
70667
|
};
|
|
70005
70668
|
render() {
|
|
70006
|
-
return (h(Host, { key: '
|
|
70669
|
+
return (h(Host, { key: '4474c94b4a72aa5692493de26f4379fa9602c0d4', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, h("div", { key: 'd85da74f28b106b0b3634185825ed54ca6083879', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: '3d060d5bf5da7cadb06a0ed35b967147a9bc53ad', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, h("kritzel-icon", { key: '85bceb5f0eeacfed5e6b6c0f9043d845fd7ed03b', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: '7b42098250c1a50032a48d17743d32169f8870ca', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: '764efaaa19161b8ee4bd3d4b606b6c1029ad7d2e', items: this.resolveMenuLabels(this.visibleItems), onItemSelect: this.handleMenuItemSelect })))));
|
|
70007
70670
|
}
|
|
70008
70671
|
static get watchers() { return {
|
|
70009
70672
|
"items": [{
|
|
@@ -70013,7 +70676,7 @@ const KritzelMoreMenu = class {
|
|
|
70013
70676
|
};
|
|
70014
70677
|
KritzelMoreMenu.style = kritzelMoreMenuCss();
|
|
70015
70678
|
|
|
70016
|
-
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}`;
|
|
70679
|
+
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}`;
|
|
70017
70680
|
|
|
70018
70681
|
const KritzelNotificationCard = class {
|
|
70019
70682
|
constructor(hostRef) {
|
|
@@ -70175,7 +70838,7 @@ const KritzelNumericInput = class {
|
|
|
70175
70838
|
this.valueChange.emit(newValue);
|
|
70176
70839
|
};
|
|
70177
70840
|
render() {
|
|
70178
|
-
return (h(Host, { key: '
|
|
70841
|
+
return (h(Host, { key: '4492b328055747be0df872965fe8f8a644c1b99f' }, h("div", { key: '8e35306939f4da96af77658c02ae3c4f2f9bd9c3', class: "input-container" }, this.label && h("label", { key: '00eef99018632f20e98f372b29ee23efd6855196', class: "input-label" }, this.label), h("div", { key: '41bed7ac6642a3cd52e5be1d95d1243d48e1249b', class: "input-wrapper" }, 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 }), h("div", { key: '0ff1a0d8306cf45d594413332c2977202ad402d3', class: "spinner-buttons" }, h("button", { key: '1f5b278dff3052fd03e65aa6758c289200574eae', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '1722b868967111631dbf2442d33d2c9736b68c0c', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '75655b2843c384ab448c5447fc3d3546c6f360d9', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'b81a65fefb49157a76f9dd5dc0ad785e167a61fe', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: 'dc1cc93cb3bb8593a50682a49018bd4ca27b3a30', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'db9138181002c73da50fb3ab369a36912a7874f5', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
70179
70842
|
}
|
|
70180
70843
|
static get watchers() { return {
|
|
70181
70844
|
"value": [{
|
|
@@ -70185,7 +70848,7 @@ const KritzelNumericInput = class {
|
|
|
70185
70848
|
};
|
|
70186
70849
|
KritzelNumericInput.style = kritzelNumericInputCss();
|
|
70187
70850
|
|
|
70188
|
-
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(
|
|
70851
|
+
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))}`;
|
|
70189
70852
|
|
|
70190
70853
|
const KritzelOpacitySlider = class {
|
|
70191
70854
|
constructor(hostRef) {
|
|
@@ -70214,7 +70877,7 @@ const KritzelOpacitySlider = class {
|
|
|
70214
70877
|
}
|
|
70215
70878
|
render() {
|
|
70216
70879
|
const percentage = this.getPercentage();
|
|
70217
|
-
return (h(Host, { key: '
|
|
70880
|
+
return (h(Host, { key: 'bb0e9f56f5ede377700710940c29cc05c767549a' }, h("div", { key: 'aea9ee85b87ff8a91b4119f5ff008dd6d838c05b', class: "opacity-container" }, h("div", { key: '45e6e8b7f6ec871935143ef45996114ead9d9018', class: "slider-wrapper" }, 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: {
|
|
70218
70881
|
'--slider-progress': `${percentage}%`,
|
|
70219
70882
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
70220
70883
|
} })))));
|
|
@@ -70279,7 +70942,7 @@ const KritzelPillTabs = class {
|
|
|
70279
70942
|
buttons?.[newIndex]?.focus();
|
|
70280
70943
|
}
|
|
70281
70944
|
render() {
|
|
70282
|
-
return (h(Host, { key: '
|
|
70945
|
+
return (h(Host, { key: 'f02f93ada5ec002695b62f511c847de201a8cbe4' }, h("div", { key: 'bb08ae773f1b993cb330556a5778d71fc5e91ce1', class: "pill-tabs-container", role: "tablist" }, this.tabs.map((tab, index) => (h("button", { key: tab.id, class: {
|
|
70283
70946
|
'pill-tab': true,
|
|
70284
70947
|
'selected': this.value === tab.id,
|
|
70285
70948
|
}, 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) }, tab.icon && h("kritzel-icon", { name: tab.icon, size: 16 }), h("span", { class: "pill-tab-label" }, tab.label)))))));
|
|
@@ -70567,7 +71230,7 @@ const KritzelPortal = class {
|
|
|
70567
71230
|
this.portal.style.visibility = 'visible';
|
|
70568
71231
|
}
|
|
70569
71232
|
render() {
|
|
70570
|
-
return (h(Host, { key: '
|
|
71233
|
+
return (h(Host, { key: 'e37e3fb0de2910fabd9379f372e477ecac929d1d', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: '86f8720d298201b66efea2475634ec7506b33d9c' })));
|
|
70571
71234
|
}
|
|
70572
71235
|
static get watchers() { return {
|
|
70573
71236
|
"anchor": [{
|
|
@@ -70789,7 +71452,7 @@ const KritzelSettings = class {
|
|
|
70789
71452
|
return (h("div", { class: "settings-categories-wrapper" }, h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'general' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.general.title', 'General Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.theme.label', 'Theme')), h("p", { class: "settings-description" }, this.t('settings.general.theme.description', 'Select a registered color theme for the editor interface.')), h("kritzel-dropdown", { options: this.availableThemes.map(t => ({ value: t, label: t })), value: this.theme, onValueChanged: this.handleThemeChange })), this.availableLocales.length > 0 && (h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.language.label', 'Language')), h("p", { class: "settings-description" }, this.t('settings.general.language.description', 'Select the display language for the editor interface.')), h("kritzel-dropdown", { options: this.availableLocales.map(l => ({ value: l.code, label: l.label })), value: this.locale, onValueChanged: this.handleLocaleChange }))), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale')), 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.')), h("kritzel-slide-toggle", { checked: this.lockDrawingScale, label: this.t('settings.general.lockDrawingScale.label', 'Lock Drawing Scale'), onCheckedChange: this.handleLockDrawingScaleChange }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'viewport' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.viewport.title', 'Viewport Settings')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.minZoom.label', 'Minimum Zoom Level')), 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.')), h("kritzel-numeric-input", { value: this.scaleMin, min: 0.0001, max: 1, step: 0.0001, onValueChange: this.handleScaleMinChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.maxZoom.label', 'Maximum Zoom Level')), 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.')), h("kritzel-numeric-input", { value: this.scaleMax, min: 1, max: 1000, step: 1, onValueChange: this.handleScaleMaxChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryLeft.label', 'Viewport Boundary Left')), 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.')), h("kritzel-numeric-input", { value: this.viewportBoundaryLeft, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryLeftChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryRight.label', 'Viewport Boundary Right')), 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.')), h("kritzel-numeric-input", { value: this.viewportBoundaryRight, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryRightChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryTop.label', 'Viewport Boundary Top')), 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.')), h("kritzel-numeric-input", { value: this.viewportBoundaryTop, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryTopChange })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.viewport.boundaryBottom.label', 'Viewport Boundary Bottom')), 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.')), h("kritzel-numeric-input", { value: this.viewportBoundaryBottom, step: 100, placeholder: this.t('settings.viewport.boundaryPlaceholder', 'Infinite'), onValueChange: this.handleViewportBoundaryBottomChange }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'shortcuts' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.shortcuts.title', 'Keyboard Shortcuts')), h("div", { class: "shortcuts-list" }, Array.from(this.groupShortcutsByCategory()).map(([category, shortcuts]) => (h("div", { class: "shortcuts-category", key: category }, h("h4", { class: "shortcuts-category-title" }, category), h("div", { class: "shortcuts-group" }, shortcuts.map(shortcut => (h("div", { class: "shortcut-item", key: shortcut.key + shortcut.label }, h("span", { class: "shortcut-label" }, shortcut.label), h("kbd", { class: "shortcut-key" }, this.formatKeyCombo(shortcut)))))))))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'developer' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.developer.title', 'Developer Options')), h("div", { class: "settings-group" }, h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showViewportInfo.description', 'Display viewport debug information such as position, zoom level, and boundaries.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showViewportInfo, label: this.t('settings.developer.showViewportInfo.label', 'Show Viewport Info'), onCheckedChange: this.handleDebugInfoChange('showViewportInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showObjectInfo.label', 'Show Object Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showObjectInfo.description', 'Display debug information about objects on the canvas.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showObjectInfo, label: this.t('settings.developer.showObjectInfo.label', 'Show Object Info'), onCheckedChange: this.handleDebugInfoChange('showObjectInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showSyncProviderInfo.description', 'Display debug information about the sync provider connection status.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showSyncProviderInfo, label: this.t('settings.developer.showSyncProviderInfo.label', 'Show Sync Provider Info'), onCheckedChange: this.handleDebugInfoChange('showSyncProviderInfo') })), h("div", { class: "settings-item" }, h("label", { class: "settings-label" }, this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info')), h("p", { class: "settings-description" }, this.t('settings.developer.showMigrationInfo.description', 'Display debug information about data migrations.')), h("kritzel-slide-toggle", { checked: this.debugInfo.showMigrationInfo, label: this.t('settings.developer.showMigrationInfo.label', 'Show Migration Info'), onCheckedChange: this.handleDebugInfoChange('showMigrationInfo') }))))), h("div", { class: { 'settings-tab-panel': true, 'is-active': this.selectedCategoryId === 'about' } }, h("div", { class: "settings-content" }, h("h3", null, this.t('settings.about.title', 'About')), h("p", null, this.t('settings.about.description', 'Kritzel - A drawing application')), h("p", { class: "version-info" }, "Version ", KRITZEL_VERSION), h("p", { class: "version-info" }, "App-State Schema v", CURRENT_APP_STATE_SCHEMA_VERSION$1), h("p", { class: "version-info" }, "Workspace Schema v", CURRENT_WORKSPACE_SCHEMA_VERSION$1)))));
|
|
70790
71453
|
}
|
|
70791
71454
|
render() {
|
|
70792
|
-
return (h(Host, { key: '
|
|
71455
|
+
return (h(Host, { key: 'a3b62913565f4823bd379da67d81545c58c49d20' }, h("kritzel-dialog", { key: 'e688b2d81f985905f65b756becb336b7d14ca8f5', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: '1f6db30412514bee5b087d8365eca91d76002ef8', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
70793
71456
|
}
|
|
70794
71457
|
static get watchers() { return {
|
|
70795
71458
|
"settings": [{
|
|
@@ -70822,10 +71485,10 @@ const KritzelShapeFill = class {
|
|
|
70822
71485
|
return (h("svg", { viewBox: "0 0 24 24", class: "fill-icon" }, h("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", fill: strokeColor, stroke: strokeColor, "stroke-width": "2" })));
|
|
70823
71486
|
}
|
|
70824
71487
|
render() {
|
|
70825
|
-
return (h(Host, { key: '
|
|
71488
|
+
return (h(Host, { key: '6d38a9af2e4c4c7f86ab994c63fc074007c86b48' }, h("div", { key: 'cf58f26cb0e56e274873d11024209c6908d317bb', class: "fill-row" }, h("button", { key: 'c75eed70fe0c2fcbf0fd136bb6fce75b2dbfb45d', class: {
|
|
70826
71489
|
'fill-option': true,
|
|
70827
71490
|
'selected': this.value === 'transparent',
|
|
70828
|
-
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), h("button", { key: '
|
|
71491
|
+
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), h("button", { key: '5d6ede439b5d5e55598cd8c20b5851fb9f210463', class: {
|
|
70829
71492
|
'fill-option': true,
|
|
70830
71493
|
'selected': this.value === 'filled',
|
|
70831
71494
|
}, onClick: () => this.handleFillChange('filled'), title: "Filled background" }, this.renderFillIcon('filled')))));
|
|
@@ -74029,9 +74692,9 @@ const KritzelShareDialog = class {
|
|
|
74029
74692
|
this.dialogClosed.emit();
|
|
74030
74693
|
};
|
|
74031
74694
|
render() {
|
|
74032
|
-
return (h(Host, { key: '
|
|
74695
|
+
return (h(Host, { key: 'b7a8be6921198400c95003928dfed03acd3866b6' }, h("kritzel-dialog", { key: '742e50d49ee54ba135279d6d34c78fa05645744e', dialogTitle: this.terms['share.dialogTitle'] ?? 'Share Workspace', size: "small", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, contained: true }, h("div", { key: 'e16420d7eea180e42c5491f8314ba0106b1b572a', class: "share-content" }, h("div", { key: '0cc6522bcb123d722e29420ba8462af21e933fb7', class: "share-section" }, h("div", { key: 'da9c8954fca7b9c6a73776a702e917d517229cc8', class: "share-row" }, h("div", { key: '40760b33ca59a51d746ed76673219a26126ae60c', class: "share-label-group" }, h("label", { key: 'de6b6409a3c487560e3491e1f3c87cb66c34fa61', class: "share-label" }, this.terms['share.linkSharing.label'] ?? 'Link sharing'), h("p", { key: '6c0db50f81c1de442eb87322e5d562868819adac', class: "share-description" }, this.internalIsPublic
|
|
74033
74696
|
? (this.terms['share.linkSharing.enabledDescription'] ?? 'Anyone with the link can access this workspace.')
|
|
74034
|
-
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), h("kritzel-slide-toggle", { key: '
|
|
74697
|
+
: (this.terms['share.linkSharing.disabledDescription'] ?? 'Link sharing is disabled. Only you can access this workspace.'))), h("kritzel-slide-toggle", { key: '57492b1e6576c2b842809ac8b29c67ad4bcb66f1', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: this.terms['share.linkSharing.toggleLabel'] ?? 'Enable link sharing' }))), this.internalIsPublic && (h("div", { key: '9a6be392c660e13c6add3b671509f169a4ccb52e', class: "share-section" }, h("div", { key: '8ff6565cca2cf53ea7568ef4d2a1a0705daa8fa3', class: "share-url-container" }, h("input", { key: '3f8dffdf23a5b6f0744b63b5ceb9c488904b6c11', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), 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') }, h("kritzel-icon", { key: 'b748074ec82f1d97d0b0ea03366ee0353900512c', name: this.copySuccess ? 'check' : 'copy', size: 18 }))), this.qrCodeDataUrl && (h("div", { key: '444f8d53ea5ba95b35bd0882e0e91dba2edfdbc6', class: "share-qr-container" }, h("img", { key: 'a11e1dc20306392266794f765bb709f05f17d4a0', class: "share-qr-image", src: this.qrCodeDataUrl, alt: "QR code for share link" })))))))));
|
|
74035
74698
|
}
|
|
74036
74699
|
static get watchers() { return {
|
|
74037
74700
|
"isPublic": [{
|
|
@@ -74072,7 +74735,7 @@ const KritzelSlideToggle = class {
|
|
|
74072
74735
|
}
|
|
74073
74736
|
};
|
|
74074
74737
|
render() {
|
|
74075
|
-
return (h(Host, { key: '
|
|
74738
|
+
return (h(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 }, h("div", { key: '9d973f03b674ae90c0f3dc78680feffb5e74e2f0', class: "toggle-track" }, h("div", { key: '3988d20da458ace01a0bb1af196d28c8fd290042', class: "toggle-thumb" }))));
|
|
74076
74739
|
}
|
|
74077
74740
|
};
|
|
74078
74741
|
KritzelSlideToggle.style = kritzelSlideToggleCss();
|
|
@@ -74093,7 +74756,7 @@ const KritzelSplitButton = class {
|
|
|
74093
74756
|
}
|
|
74094
74757
|
get host() { return getElement(this); }
|
|
74095
74758
|
buttonIcon = 'plus';
|
|
74096
|
-
dropdownIcon = '
|
|
74759
|
+
dropdownIcon = 'chevronDown';
|
|
74097
74760
|
items = [];
|
|
74098
74761
|
mainButtonDisabled = false;
|
|
74099
74762
|
menuButtonDisabled = false;
|
|
@@ -74175,7 +74838,7 @@ const KritzelSplitButton = class {
|
|
|
74175
74838
|
this.menuScrollTop = event.target.scrollTop;
|
|
74176
74839
|
};
|
|
74177
74840
|
render() {
|
|
74178
|
-
return (h(Host, { key: '
|
|
74841
|
+
return (h(Host, { key: 'fd367561351219e18883cf7bf72a1fd488b1d3e9', class: { mobile: this.isTouchDevice } }, h("button", { key: 'f9edff7ca0c77f2502947a98ab4bb64ed68d6437', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '31f8dc17a94d015d5881ca2475b4933a6183cafa', name: this.buttonIcon })), h("div", { key: '3620329f4b911cee3f4cbae4498c28c20e19f953', class: "split-divider" }), 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" }, h("kritzel-icon", { key: '03f04eb20ef66cc6ea8ed4104f26dc062afba680', name: this.dropdownIcon })), h("kritzel-portal", { key: 'e02bc799b56ad731db06719ae77b65b872e0a368', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, 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 }))));
|
|
74179
74842
|
}
|
|
74180
74843
|
};
|
|
74181
74844
|
KritzelSplitButton.style = kritzelSplitButtonCss();
|
|
@@ -74196,7 +74859,7 @@ const KritzelStrokeSize = class {
|
|
|
74196
74859
|
}
|
|
74197
74860
|
render() {
|
|
74198
74861
|
const sizes = this.sizes ?? [];
|
|
74199
|
-
return (h(Host, { key: '
|
|
74862
|
+
return (h(Host, { key: 'dcb655ac6ec2eea1ee38b9d267dd11c6d1f21f4a' }, h("div", { key: '50c3ecaddb26cebb943c24685386401b5fdac54c', class: "size-grid" }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
74200
74863
|
'size-container': true,
|
|
74201
74864
|
'selected': this.selectedSize === size,
|
|
74202
74865
|
}, onClick: () => this.handleSizeClick(size) }, h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -74461,7 +75124,7 @@ const KritzelToolConfig = class {
|
|
|
74461
75124
|
])), shouldShowExpandButton && (h("div", { style: {
|
|
74462
75125
|
display: 'flex',
|
|
74463
75126
|
alignItems: 'flex-start',
|
|
74464
|
-
} }, h("button", { class: "expand-toggle", onClick: this.handleToggleExpand, title: this.isExpanded ? (this.terms['toolConfig.collapse'] ?? 'Collapse') : (this.terms['toolConfig.expand'] ?? 'Expand') }, h("kritzel-icon", { name: this.isExpanded ? '
|
|
75127
|
+
} }, h("button", { class: "expand-toggle", onClick: this.handleToggleExpand, title: this.isExpanded ? (this.terms['toolConfig.collapse'] ?? 'Collapse') : (this.terms['toolConfig.expand'] ?? 'Expand') }, h("kritzel-icon", { name: this.isExpanded ? 'chevronUp' : 'chevronDown' })))))));
|
|
74465
75128
|
}
|
|
74466
75129
|
static get watchers() { return {
|
|
74467
75130
|
"tool": [{
|
|
@@ -74635,17 +75298,13 @@ const KritzelToolbar = class {
|
|
|
74635
75298
|
await this.resolveDisabledStates(newToolbar);
|
|
74636
75299
|
for (const c of newToolbar) {
|
|
74637
75300
|
if (c.type === 'tool' && c.tool) {
|
|
74638
|
-
|
|
74639
|
-
if (typeof toolConstructor !== 'function') {
|
|
74640
|
-
toolConstructor = toolConstructor.constructor;
|
|
74641
|
-
}
|
|
74642
|
-
const registered = await this.kritzelEngine.registerTool(c.name, toolConstructor, c.config);
|
|
75301
|
+
const registered = await this.kritzelEngine.getTool(c.name);
|
|
74643
75302
|
if (registered) {
|
|
74644
75303
|
c.tool = registered;
|
|
74645
75304
|
}
|
|
74646
75305
|
}
|
|
74647
75306
|
if (c.type === 'tool' && c.isDefault && !this.isControlDisabled(c) && c.tool) {
|
|
74648
|
-
await this.kritzelEngine.
|
|
75307
|
+
await this.kritzelEngine.setActiveTool(c.name);
|
|
74649
75308
|
this.activeControl = c;
|
|
74650
75309
|
this.updateDisplayValues(c.tool);
|
|
74651
75310
|
hasDefault = true;
|
|
@@ -74664,7 +75323,7 @@ const KritzelToolbar = class {
|
|
|
74664
75323
|
if (!hasDefault) {
|
|
74665
75324
|
const firstTool = this.internalToolbar.find(c => c.type === 'tool' && c.tool && !this.isControlDisabled(c));
|
|
74666
75325
|
if (firstTool) {
|
|
74667
|
-
await this.kritzelEngine.
|
|
75326
|
+
await this.kritzelEngine.setActiveTool(firstTool.name);
|
|
74668
75327
|
this.activeControl = firstTool;
|
|
74669
75328
|
this.updateDisplayValues(firstTool.tool);
|
|
74670
75329
|
}
|
|
@@ -74700,12 +75359,12 @@ const KritzelToolbar = class {
|
|
|
74700
75359
|
this.activeControl = control;
|
|
74701
75360
|
if (this.activeControl.type === 'tool') {
|
|
74702
75361
|
this.updateDisplayValues(this.activeControl.tool);
|
|
74703
|
-
await this.kritzelEngine.
|
|
75362
|
+
await this.kritzelEngine.setActiveTool(this.activeControl.name);
|
|
74704
75363
|
}
|
|
74705
75364
|
}
|
|
74706
75365
|
async handleToolChange(event) {
|
|
74707
75366
|
this.activeControl = { ...this.activeControl, tool: event.detail };
|
|
74708
|
-
await this.kritzelEngine.
|
|
75367
|
+
await this.kritzelEngine.setActiveTool(this.activeControl.name);
|
|
74709
75368
|
}
|
|
74710
75369
|
/**
|
|
74711
75370
|
* Get the currently selected sub-option for a control.
|
|
@@ -74744,13 +75403,13 @@ const KritzelToolbar = class {
|
|
|
74744
75403
|
// Separate tool controls from config control
|
|
74745
75404
|
const toolControls = this.internalToolbar.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
74746
75405
|
const configControl = this.internalToolbar.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
74747
|
-
return (h(Host, { key: '
|
|
75406
|
+
return (h(Host, { key: 'e4f662409cdd76fafa8753a47d4c4670968a9e7a', style: { display: this.visible ? '' : 'none' }, class: {
|
|
74748
75407
|
mobile: this.isTouchDevice,
|
|
74749
|
-
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '
|
|
75408
|
+
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: 'c3c864e0e818ccf92d4c9b43f183775fa919cf4c', style: {
|
|
74750
75409
|
position: 'absolute',
|
|
74751
75410
|
bottom: '56px',
|
|
74752
75411
|
left: '12px',
|
|
74753
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '
|
|
75412
|
+
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '4d59605d66ee7277af8fc56002947f943f8a5b14', class: "kritzel-toolbar" }, h("div", { key: '7c36b7ad02470bafc9efcb426f667376e28953e8', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: 'd29be9bca631077fad2fe709219c8897735bc6a6', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
74754
75413
|
// Check if this control has sub-options (split-button)
|
|
74755
75414
|
if (control.subOptions?.length) {
|
|
74756
75415
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -74772,7 +75431,7 @@ const KritzelToolbar = class {
|
|
|
74772
75431
|
}, disabled: isDisabled, ref: el => {
|
|
74773
75432
|
if (el)
|
|
74774
75433
|
control._triggerRef = el;
|
|
74775
|
-
}, "aria-label": `Select ${control.name} options`, "aria-disabled": isDisabled, "data-testid": `tool-${control.name}-dropdown`, tabIndex: isActive ? 0 : -1 }, h("kritzel-icon", { name: "
|
|
75434
|
+
}, "aria-label": `Select ${control.name} options`, "aria-disabled": isDisabled, "data-testid": `tool-${control.name}-dropdown`, tabIndex: isActive ? 0 : -1 }, h("kritzel-icon", { name: "chevronDown", size: 12 })), h("kritzel-tooltip", { anchorElement: control._anchorRef, triggerElement: control._triggerRef }, h("div", { class: "kritzel-submenu-content" }, control.subOptions.map(option => (h("button", { class: {
|
|
74776
75435
|
'kritzel-submenu-item': true,
|
|
74777
75436
|
'active': option.id === selectedSubOption?.id,
|
|
74778
75437
|
}, key: option.id, "data-testid": `suboption-${option.id}`, onClick: () => this.selectSubOption(control, option) }, h("kritzel-icon", { name: option.icon, size: 20 }), h("span", null, option.label))))))));
|
|
@@ -74786,10 +75445,10 @@ const KritzelToolbar = class {
|
|
|
74786
75445
|
'selected': this.activeControl?.name === control?.name,
|
|
74787
75446
|
'disabled': this.isControlDisabled(control),
|
|
74788
75447
|
}, 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) }, h("kritzel-icon", { name: control.icon })));
|
|
74789
|
-
})), h("div", { key: '
|
|
75448
|
+
})), h("div", { key: '8cb7ae1d0b77f6bac9c6ddf34699c2653b1cfa68', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
|
|
74790
75449
|
'kritzel-config-container': true,
|
|
74791
75450
|
'visible': hasConfigUI,
|
|
74792
|
-
}, key: configControl.name }, h("div", { key: '
|
|
75451
|
+
}, key: configControl.name }, h("div", { key: '764230be2ef0ca45f94ca2a7bf6e2b5df7bdf7b2', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: '7b6c2cae55b9ca6f723e2209f98d921b388e8159', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, 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%' } })), h("div", { key: '90455ca7c55240645445f3d92ccec54ffc1e3572', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
74793
75452
|
if (el)
|
|
74794
75453
|
this.configTriggerRef = el;
|
|
74795
75454
|
}, onKeyDown: event => {
|
|
@@ -74798,7 +75457,7 @@ const KritzelToolbar = class {
|
|
|
74798
75457
|
}
|
|
74799
75458
|
}, style: {
|
|
74800
75459
|
cursor: 'pointer',
|
|
74801
|
-
} }, this.displayValues && (h("div", { key: '
|
|
75460
|
+
} }, this.displayValues && (h("div", { key: 'ef0c11f630b70dadf5c9b7688c0f1b93cf9cf030', class: "color-container" }, h("kritzel-color", { key: 'd14a7837fef6d3777ee92d219d22915c5f21e541', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
74802
75461
|
borderRadius: '50%',
|
|
74803
75462
|
border: 'none',
|
|
74804
75463
|
} })))))))));
|
|
@@ -74950,14 +75609,14 @@ const KritzelTooltip = class {
|
|
|
74950
75609
|
}
|
|
74951
75610
|
}
|
|
74952
75611
|
render() {
|
|
74953
|
-
return (h(Host, { key: '
|
|
75612
|
+
return (h(Host, { key: '9c80a8831cdc03e08b4fe19c8c0aabd036fd5a23', style: {
|
|
74954
75613
|
position: 'fixed',
|
|
74955
75614
|
zIndex: '9999',
|
|
74956
75615
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
74957
75616
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
74958
75617
|
left: `${this.positionX}px`,
|
|
74959
75618
|
bottom: `${this.positionY}px`,
|
|
74960
|
-
} }, h("div", { key: '
|
|
75619
|
+
} }, h("div", { key: '0f5907b4bf740e6242a07e00790685265ee7767b', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: 'e1074787847d96b7a725fcb04902ccc7e6827984' }))));
|
|
74961
75620
|
}
|
|
74962
75621
|
static get watchers() { return {
|
|
74963
75622
|
"triggerElement": [{
|
|
@@ -74998,12 +75657,12 @@ const KritzelUtilityPanel = class {
|
|
|
74998
75657
|
this.redo.emit();
|
|
74999
75658
|
}
|
|
75000
75659
|
render() {
|
|
75001
|
-
return (h(Host, { key: '
|
|
75660
|
+
return (h(Host, { key: '1ec661383d53b4c34308152d745a8de1cb5809e0' }, 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' }, h("kritzel-icon", { key: '49be69476a559136b1199f7d20144d0dc0aa402b', name: "undo" })), 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' }, h("kritzel-icon", { key: 'e559abf9a2a0471d2524f65264adbc28d8fa0449', name: "redo" })), h("div", { key: '19fe0895816459d7e9241307c9f0642c055774b6', class: "utility-separator" }), h("button", { key: '3672bbcad7e22b023dc203ee098ba1538836b0ee', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: 'aadbff86ca2938e28a74c4ad1c0ac6330d20e529', name: "delete" }))));
|
|
75002
75661
|
}
|
|
75003
75662
|
};
|
|
75004
75663
|
KritzelUtilityPanel.style = kritzelUtilityPanelCss();
|
|
75005
75664
|
|
|
75006
|
-
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}`;
|
|
75665
|
+
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}`;
|
|
75007
75666
|
|
|
75008
75667
|
const KritzelWatermark = class {
|
|
75009
75668
|
constructor(hostRef) {
|
|
@@ -75019,7 +75678,7 @@ const KritzelWatermark = class {
|
|
|
75019
75678
|
label;
|
|
75020
75679
|
render() {
|
|
75021
75680
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
75022
|
-
return (h(Host, { key: '
|
|
75681
|
+
return (h(Host, { key: '5bc76650ecd1f82f5ed283d4433b0e5fc8937cab' }, 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)));
|
|
75023
75682
|
}
|
|
75024
75683
|
};
|
|
75025
75684
|
KritzelWatermark.style = kritzelWatermarkCss();
|
|
@@ -75152,7 +75811,7 @@ const KritzelWorkspaceManager = class {
|
|
|
75152
75811
|
return {
|
|
75153
75812
|
id: ws.id,
|
|
75154
75813
|
label: ws.name,
|
|
75155
|
-
icon: ws.isPublic ? '
|
|
75814
|
+
icon: ws.isPublic ? 'usersRound' : undefined,
|
|
75156
75815
|
iconTooltip: ws.isPublic ? (this.terms['workspace.sharedTooltip'] ?? 'Shared workspace') : undefined,
|
|
75157
75816
|
value: ws,
|
|
75158
75817
|
isEditing: this.editingItemId === ws.id,
|
|
@@ -75182,7 +75841,7 @@ const KritzelWorkspaceManager = class {
|
|
|
75182
75841
|
};
|
|
75183
75842
|
KritzelWorkspaceManager.style = kritzelWorkspaceManagerCss();
|
|
75184
75843
|
|
|
75185
|
-
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}`;
|
|
75844
|
+
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}`;
|
|
75186
75845
|
|
|
75187
75846
|
const KritzelZoomPanel = class {
|
|
75188
75847
|
constructor(hostRef) {
|
|
@@ -75216,7 +75875,7 @@ const KritzelZoomPanel = class {
|
|
|
75216
75875
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
75217
75876
|
}
|
|
75218
75877
|
render() {
|
|
75219
|
-
return (h(Host, { key: '
|
|
75878
|
+
return (h(Host, { key: '37bdf4f4025a64be94a2f743d73d2a83c4f9c478' }, h("div", { key: '5c897da0de9a15d91c4d488be923271f82d816c1', class: { panel: true, visible: this.visible } }, h("button", { key: '165fedd5f1c87140e1cbfd7c3a99344edea59d3e', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, h("kritzel-icon", { key: '4ac3e03e68166c9e9819c5a11ab1d8aac37b6eb1', name: "minus" })), h("span", { key: 'd124c60a92cde8afe9fac87c85b3654d18238343', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), h("button", { key: 'fe94bf21c0de5fc212524058c6fb5de90a89679e', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, h("kritzel-icon", { key: '84c8ebd09772c81946e65a5759376c501f050548', name: "plus" })))));
|
|
75220
75879
|
}
|
|
75221
75880
|
};
|
|
75222
75881
|
KritzelZoomPanel.style = kritzelZoomPanelCss();
|