kritzel-stencil 0.4.5 → 0.4.7
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/dist/cjs/kritzel-active-users_47.cjs.entry.js +180 -92
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.cjs.js +1 -1
- package/dist/collection/classes/core/core.class.js +4 -5
- package/dist/collection/classes/core/viewport.class.js +14 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +71 -8
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +133 -18
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +1 -1
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +8 -0
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +2 -15
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/context-menu-state.interface.js +1 -0
- 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-back-to-content.js +1 -1
- 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-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-editor.js +73 -42
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-input.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-numeric-input.js +1 -1
- package/dist/components/kritzel-opacity-slider.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-share-dialog.js +1 -1
- package/dist/components/kritzel-slide-toggle.js +1 -1
- package/dist/components/kritzel-split-button.js +1 -1
- package/dist/components/kritzel-stroke-size.js +1 -1
- package/dist/components/kritzel-sync-indicator.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-watermark.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/kritzel-zoom-panel.js +1 -1
- package/dist/components/{p-Cymum41a.js → p-1nG2hxfJ.js} +2 -2
- package/dist/components/{p-B5oHmPJb.js → p-7Rt7ml3v.js} +1 -1
- package/dist/components/{p-BI2ng9I_.js → p-8xkoVMfO.js} +2 -2
- package/dist/components/{p-CwJwsRR3.js → p-BKOsmXB5.js} +4 -4
- package/dist/components/{p-Ca-igU1f.js → p-BLOPBDUF.js} +1 -1
- package/dist/components/{p-DUYmwrWV.js → p-BMRln59F.js} +3 -3
- package/dist/components/{p-DIazmg6w.js → p-BO9BvTtK.js} +2 -2
- package/dist/components/{p-D3y_Hauo.js → p-BU-FZuj0.js} +3 -3
- package/dist/components/{p-DgJ0ufzr.js → p-BVEGQLBD.js} +1 -1
- package/dist/components/{p-Dlp84thc.js → p-BYO6pz8T.js} +1 -1
- package/dist/components/{p-C38P-Vd0.js → p-BZxOukfY.js} +6 -6
- package/dist/components/{p-D82VaHce.js → p-Bm_BWQa4.js} +2 -2
- package/dist/components/{p-CWRSGYOE.js → p-BzJEwFtn.js} +1 -1
- package/dist/components/{p-B6t5q-V4.js → p-BzrxIesp.js} +1 -1
- package/dist/components/{p--Oazz-BP.js → p-C2yi85nc.js} +103 -34
- package/dist/components/{p-894OnDQV.js → p-CM1duewg.js} +1 -1
- package/dist/components/{p-e6Zpc9Vp.js → p-COjsYPir.js} +2 -2
- package/dist/components/{p-BsANVili.js → p-CVhcOiEA.js} +3 -3
- package/dist/components/{p-PSFAfAyd.js → p-CwuGA058.js} +1 -1
- package/dist/components/{p-U6uE85Qx.js → p-D0oplzU-.js} +8 -21
- package/dist/components/{p-Cr682JI_.js → p-D8TOEhPY.js} +3 -3
- package/dist/components/{p-ClFprFvz.js → p-DDbO5q-e.js} +3 -3
- package/dist/components/{p-BDzlx2hB.js → p-DIMNEOTW.js} +1 -1
- package/dist/components/{p-C4NrrUfN.js → p-DSOc0eIT.js} +1 -1
- package/dist/components/{p-D5jf8wAu.js → p-DXcjIb_a.js} +3 -3
- package/dist/components/{p-B8Xi4Clg.js → p-DgnK50xO.js} +1 -1
- package/dist/components/{p-JYj3Facr.js → p-DkH3hoLz.js} +15 -15
- package/dist/components/{p-D30zs0kA.js → p-DkY7pIg5.js} +3 -3
- package/dist/components/{p-BTzlrIxe.js → p-DrQRChp3.js} +2 -2
- package/dist/components/{p-CsvMgk_f.js → p-DwY5pghH.js} +1 -1
- package/dist/components/{p-DkUb2czk.js → p-OLfoATNk.js} +1 -1
- package/dist/components/{p-DEBwmRTC.js → p-oGAPPwAL.js} +2 -2
- package/dist/components/{p-DJ88BrIW.js → p-yD_3Z3K1.js} +1 -1
- package/dist/components/{p-CqLgB8JK.js → p-zd7zXld8.js} +2 -2
- package/dist/esm/kritzel-active-users_47.entry.js +180 -92
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil.js +1 -1
- package/dist/stencil/{p-4463dade.entry.js → p-472f2e90.entry.js} +180 -92
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/core/core.class.d.ts +2 -2
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +6 -0
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +11 -1
- package/dist/types/components.d.ts +17 -0
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/context-menu-state.interface.d.ts +16 -0
- package/package.json +1 -1
- package/readme.md +3 -3
|
@@ -14,7 +14,7 @@ const KritzelFont = /*@__PURE__*/ proxyCustomElement(class KritzelFont extends H
|
|
|
14
14
|
size = 24;
|
|
15
15
|
color = '#000000';
|
|
16
16
|
render() {
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '054371cac30a2433611139a670406b0a1e3b99ff' }, h("div", { key: 'b4f2142b3cb31d067f39952a38b6f665f28f63bf', class: "font-preview", style: {
|
|
18
18
|
fontFamily: this.fontFamily,
|
|
19
19
|
fontSize: `${this.size}px`,
|
|
20
20
|
color: this.color
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
|
|
2
2
|
import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
|
|
3
|
-
import { K as KritzelToolConfigHelper, d as defineCustomElement$3 } from './p-
|
|
3
|
+
import { K as KritzelToolConfigHelper, d as defineCustomElement$3 } from './p-BZxOukfY.js';
|
|
4
4
|
import { a as KritzelColorHelper } from './p-BmyTdQGy.js';
|
|
5
|
-
import { d as defineCustomElement$e } from './p-
|
|
6
|
-
import { d as defineCustomElement$d } from './p-
|
|
5
|
+
import { d as defineCustomElement$e } from './p-zd7zXld8.js';
|
|
6
|
+
import { d as defineCustomElement$d } from './p-1nG2hxfJ.js';
|
|
7
7
|
import { d as defineCustomElement$c } from './p-Df3BwVGy.js';
|
|
8
|
-
import { d as defineCustomElement$b } from './p-
|
|
8
|
+
import { d as defineCustomElement$b } from './p-DgnK50xO.js';
|
|
9
9
|
import { d as defineCustomElement$a } from './p-djJSnjAX.js';
|
|
10
|
-
import { d as defineCustomElement$9 } from './p-
|
|
10
|
+
import { d as defineCustomElement$9 } from './p-8xkoVMfO.js';
|
|
11
11
|
import { d as defineCustomElement$8 } from './p-CdR76C4L.js';
|
|
12
12
|
import { d as defineCustomElement$7 } from './p-CXpv9Rxe.js';
|
|
13
|
-
import { d as defineCustomElement$6 } from './p-
|
|
13
|
+
import { d as defineCustomElement$6 } from './p-BzrxIesp.js';
|
|
14
14
|
import { d as defineCustomElement$5 } from './p-BFYtCsZu.js';
|
|
15
|
-
import { d as defineCustomElement$4 } from './p-
|
|
16
|
-
import { d as defineCustomElement$2 } from './p-
|
|
17
|
-
import { d as defineCustomElement$1 } from './p-
|
|
15
|
+
import { d as defineCustomElement$4 } from './p-Bm_BWQa4.js';
|
|
16
|
+
import { d as defineCustomElement$2 } from './p-DrQRChp3.js';
|
|
17
|
+
import { d as defineCustomElement$1 } from './p-DwY5pghH.js';
|
|
18
18
|
|
|
19
19
|
const kritzelControlsCss = () => `:host{display:flex;flex-direction:column;user-select:none;max-width:100%;z-index:1}:host(.mobile){--kritzel-controls-control-hover-background-color:transparent;--kritzel-controls-control-active-background-color:transparent}.kritzel-controls{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--kritzel-controls-gap, 8px);height:100%;padding:var(--kritzel-controls-padding, 8px);background-color:var(--kritzel-controls-background-color, #ffffff);border-radius:var(--kritzel-controls-border-radius, 16px);box-shadow:var(--kritzel-controls-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));border:var(--kritzel-controls-border, 1px solid #ebebeb);z-index:1;position:relative;max-width:100%;overflow:hidden}.kritzel-tools-scroll{display:flex;flex-direction:row;align-items:center;gap:var(--kritzel-controls-gap, 8px);overflow-x:auto;overflow-y:hidden;flex:1 1 auto;min-width:0;padding:4px;margin:-4px;scrollbar-width:none;-ms-overflow-style:none}.kritzel-tools-scroll::-webkit-scrollbar{display:none}.scroll-indicator-left,.scroll-indicator-right{position:absolute;top:0;bottom:0;width:32px;pointer-events:none;opacity:0;transition:opacity 0.2s ease-out;z-index:1}.scroll-indicator-left{left:0;background:linear-gradient(to right, var(--kritzel-controls-background-color, #ffffff), transparent);border-radius:var(--kritzel-controls-border-radius, 16px) 0 0 var(--kritzel-controls-border-radius, 16px)}.scroll-indicator-right{right:0;background:linear-gradient(to left, var(--kritzel-controls-background-color, #ffffff), transparent);border-radius:0 var(--kritzel-controls-border-radius, 16px) var(--kritzel-controls-border-radius, 16px) 0}.scroll-indicator-left.visible,.scroll-indicator-right.visible{opacity:1}.kritzel-control{display:flex;justify-content:center;align-items:center;color:var(--kritzel-controls-control-color, #000000);border-radius:var(--kritzel-controls-control-border-radius, 12px);padding:var(--kritzel-controls-control-padding, 8px);border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent;font-weight:bold}.kritzel-control:focus,.kritzel-control:hover{background-color:var(--kritzel-controls-control-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.kritzel-control:active{background-color:var(--kritzel-controls-control-active-background-color, hsl(0, 0%, 0%, 8.6%))}.kritzel-control.selected,.kritzel-control.selected:hover,.kritzel-control.selected:active{background-color:var(--kritzel-controls-control-selected-background-color, #007AFF) !important;color:var(--kritzel-controls-control-selected-color, #ffffff) !important}.kritzel-control.selected:focus{background-color:var(--kritzel-controls-control-selected-background-color, #007bffe3) !important}.kritzel-control-separator{width:1px;height:24px;background-color:var(--kritzel-controls-separator-color, #ebebeb);margin:0 4px}.kritzel-control-split{position:relative;display:flex;align-items:center;border-radius:var(--kritzel-controls-control-border-radius, 12px);color:var(--kritzel-controls-control-color, #000000)}.kritzel-control-split .kritzel-control-main{display:flex;justify-content:center;align-items:center;padding:var(--kritzel-controls-control-padding, 8px);border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent;border-radius:var(--kritzel-controls-control-border-radius, 12px);color:inherit}.kritzel-control-split.selected .kritzel-control-main{border-radius:var(--kritzel-controls-control-border-radius, 12px) 0 0 var(--kritzel-controls-control-border-radius, 12px)}.kritzel-control-split .kritzel-control-dropdown{display:flex;justify-content:center;align-items:center;align-self:stretch;border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);-webkit-tap-highlight-color:transparent;border-radius:0 var(--kritzel-controls-control-border-radius, 12px) var(--kritzel-controls-control-border-radius, 12px) 0;color:inherit;width:0;padding:0;opacity:0;overflow:hidden;pointer-events:none;transition:width 0.15s ease-out, padding 0.15s ease-out, opacity 0.15s ease-out}.kritzel-control-split .kritzel-control-dropdown.visible{width:auto;padding:0 6px;opacity:1;pointer-events:auto}.kritzel-control-split .kritzel-control-main:focus,.kritzel-control-split .kritzel-control-main:hover,.kritzel-control-split .kritzel-control-dropdown:focus,.kritzel-control-split .kritzel-control-dropdown:hover{background-color:var(--kritzel-controls-control-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.kritzel-control-split .kritzel-control-main:active,.kritzel-control-split .kritzel-control-dropdown:active{background-color:var(--kritzel-controls-control-active-background-color, hsl(0, 0%, 0%, 8.6%))}.kritzel-control-split.selected{background-color:var(--kritzel-controls-control-selected-background-color, #007AFF) !important;color:var(--kritzel-controls-control-selected-color, #ffffff) !important}.kritzel-control-split.selected .kritzel-control-main:hover,.kritzel-control-split.selected .kritzel-control-dropdown:hover{background-color:rgba(255, 255, 255, 0.15)}.kritzel-submenu-content{display:flex;flex-direction:column;gap:var(--kritzel-submenu-gap, 4px);min-width:140px}.kritzel-submenu-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);border-radius:8px;color:var(--kritzel-controls-control-color, #000000);font-size:14px;text-align:left;white-space:nowrap;-webkit-tap-highlight-color:transparent}.kritzel-submenu-item:hover{background-color:var(--kritzel-controls-control-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.kritzel-submenu-item.active{background-color:var(--kritzel-controls-control-selected-background-color, #007AFF);color:var(--kritzel-controls-control-selected-color, #ffffff)}.kritzel-submenu-item.active:hover{background-color:var(--kritzel-controls-control-selected-background-color, #007AFF)}.kritzel-config-container{position:relative;display:flex;justify-content:center;align-items:center;height:40px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;flex-shrink:0;width:0;opacity:0;overflow:hidden;pointer-events:none;margin-left:calc(-1 * var(--kritzel-controls-gap, 8px));transition:width 0.2s ease-out, opacity 0.2s ease-out, margin-left 0.2s ease-out}.kritzel-config-container.visible{width:40px;opacity:1;pointer-events:auto;margin-left:0;overflow:visible}.config-gradient-left{position:absolute;top:0;bottom:0;left:-32px;width:32px;background:linear-gradient(to right, transparent, var(--kritzel-controls-background-color, #ffffff));pointer-events:none;z-index:1;opacity:0;transition:opacity 0.2s ease-out}.config-gradient-left.visible{opacity:1}.kritzel-config{display:flex;justify-content:center;align-items:center;cursor:var(--kritzel-global-pointer-cursor, pointer);border-radius:50%}.color-container{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:50%;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background-color:var(--kritzel-color-palette-hover-background-color, #ebebeb)}.font-container{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:50%;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background-color:var(--kritzel-color-palette-hover-background-color, #ebebeb)}.no-config{height:24px;width:24px;border-radius:50%;border:1px dashed gray}kritzel-tooltip{z-index:10001}`;
|
|
20
20
|
|
|
@@ -256,13 +256,13 @@ const KritzelControls = /*@__PURE__*/ proxyCustomElement(class KritzelControls e
|
|
|
256
256
|
// Separate tool controls from config control
|
|
257
257
|
const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
258
258
|
const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
259
|
-
return (h(Host, { key: '
|
|
259
|
+
return (h(Host, { key: 'a72f9b1befd185b67d24f6d7a4987ebeb4d6742d', style: { display: this.visible ? '' : 'none' }, class: {
|
|
260
260
|
mobile: this.isTouchDevice,
|
|
261
|
-
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '
|
|
261
|
+
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '4e69324b23542878919119d10db98fc44b0dc536', style: {
|
|
262
262
|
position: 'absolute',
|
|
263
263
|
bottom: '56px',
|
|
264
264
|
left: '12px',
|
|
265
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '
|
|
265
|
+
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: 'f4c7b461a433055512f5b6d397ab69d470531285', class: "kritzel-controls" }, h("div", { key: '53c27ef4ac2a9121f07ce91c82e63de5d7029de6', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: '43d90c6031e164843dd43563d4fe75410b990278', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
266
266
|
// Check if this control has sub-options (split-button)
|
|
267
267
|
if (control.subOptions?.length) {
|
|
268
268
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -292,10 +292,10 @@ const KritzelControls = /*@__PURE__*/ proxyCustomElement(class KritzelControls e
|
|
|
292
292
|
'kritzel-control': true,
|
|
293
293
|
'selected': this.activeControl?.name === control?.name,
|
|
294
294
|
}, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1) }, h("kritzel-icon", { name: control.icon })));
|
|
295
|
-
})), h("div", { key: '
|
|
295
|
+
})), h("div", { key: '9a8bd38a8266f1bb5feddcb4e396bb20c25512fa', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
|
|
296
296
|
'kritzel-config-container': true,
|
|
297
297
|
'visible': hasConfigUI,
|
|
298
|
-
}, key: configControl.name }, h("div", { key: '
|
|
298
|
+
}, key: configControl.name }, h("div", { key: 'c889744c924d29f1e65cf67263be9ff708916610', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: '9df35a6967a9738e24d328865b07b50328cef811', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, h("kritzel-tool-config", { key: '6f0079c879dc2ca5910193a02d19f246068d09e6', 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: 'a6af0ad5cc2fd0bbef0ade522f82ead53b30f92b', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
299
299
|
if (el)
|
|
300
300
|
this.configTriggerRef = el;
|
|
301
301
|
}, onKeyDown: event => {
|
|
@@ -304,7 +304,7 @@ const KritzelControls = /*@__PURE__*/ proxyCustomElement(class KritzelControls e
|
|
|
304
304
|
}
|
|
305
305
|
}, style: {
|
|
306
306
|
cursor: 'pointer',
|
|
307
|
-
} }, this.displayValues && (h("div", { key: '
|
|
307
|
+
} }, this.displayValues && (h("div", { key: '07a7fb2e0dc5c53a389da7f742322fdf489e0bd7', class: "color-container" }, h("kritzel-color", { key: '2987b76ca66d58a12ee71dd4c7d82a9c42480690', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
308
308
|
borderRadius: '50%',
|
|
309
309
|
border: 'none',
|
|
310
310
|
} })))))))));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
|
|
2
2
|
import { K as KritzelDevicesHelper } from './p-jGOpkGDl.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './p-CdR76C4L.js';
|
|
4
|
-
import { d as defineCustomElement$2, a as defineCustomElement$3 } from './p-
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$2, a as defineCustomElement$3 } from './p-BKOsmXB5.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-BLOPBDUF.js';
|
|
6
6
|
|
|
7
7
|
const kritzelMoreMenuCss = () => `:host{display:inline-flex;z-index:1}.more-menu-wrapper{display:inline-flex;padding:var(--kritzel-more-menu-padding, 4px);background-color:var(--kritzel-more-menu-background-color, #ffffff);border-radius:var(--kritzel-more-menu-border-radius, 12px);box-shadow:var(--kritzel-more-menu-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));border:var(--kritzel-more-menu-border, 1px solid #ebebeb);opacity:0;pointer-events:none;transition:opacity 0.2s ease-out}.more-menu-wrapper.visible{opacity:1;pointer-events:auto}:host(.mobile){--kritzel-more-menu-button-hover-background-color:transparent;--kritzel-more-menu-button-active-background-color:transparent}.more-menu-button{display:flex;align-items:center;justify-content:center;width:var(--kritzel-more-menu-button-width, 40px);height:var(--kritzel-more-menu-button-height, 40px);padding:0;border:none;border-radius:var(--kritzel-more-menu-inner-border-radius, 12px);background-color:transparent;cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:none;transition:background-color 150ms ease;-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:var(--kritzel-more-menu-button-color, currentColor)}.more-menu-button:hover{background-color:var(--kritzel-more-menu-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.more-menu-button:focus-visible{background-color:var(--kritzel-more-menu-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.more-menu-button:active{background-color:var(--kritzel-more-menu-button-active-background-color, hsl(0, 0%, 0%, 4.3%))}`;
|
|
8
8
|
|
|
@@ -71,7 +71,7 @@ const KritzelMoreMenu = /*@__PURE__*/ proxyCustomElement(class KritzelMoreMenu e
|
|
|
71
71
|
this.closeMenu();
|
|
72
72
|
};
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '96451062021ac2ebcb44b65384a7e9be67f1563b', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, h("div", { key: 'e776398742284ea6984925d4a5a99e732674d640', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: '4371b2e5cbf7d35fac09a06ee2e54cd49072929b', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, h("kritzel-icon", { key: '076513ce393222b6f604036ec646a8309bc3a3ac', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: 'fde8071b3199735cc7827a2d6f2eaf79d0e1b997', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: '2d49ad8a228c4b55a34c388b794bfdf500fec3c8', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
|
|
75
75
|
}
|
|
76
76
|
static get style() { return kritzelMoreMenuCss(); }
|
|
77
77
|
}, [513, "kritzel-more-menu", {
|
|
@@ -140,14 +140,14 @@ const KritzelTooltip = /*@__PURE__*/ proxyCustomElement(class KritzelTooltip ext
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
render() {
|
|
143
|
-
return (h(Host, { key: '
|
|
143
|
+
return (h(Host, { key: '227146703158aa65ecffcce348e568d559cee829', style: {
|
|
144
144
|
position: 'fixed',
|
|
145
145
|
zIndex: '9999',
|
|
146
146
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
147
147
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
148
148
|
left: `${this.positionX}px`,
|
|
149
149
|
bottom: `${this.positionY}px`,
|
|
150
|
-
} }, h("div", { key: '
|
|
150
|
+
} }, h("div", { key: '573e97ed81920066e8fbf50f790224c23b37ec21', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: 'c489b45928cf6720c6827df73b9eedf08bc9d5e2' }))));
|
|
151
151
|
}
|
|
152
152
|
static get watchers() { return {
|
|
153
153
|
"triggerElement": [{
|
|
@@ -33,7 +33,7 @@ const KritzelUtilityPanel = /*@__PURE__*/ proxyCustomElement(class KritzelUtilit
|
|
|
33
33
|
this.redo.emit();
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '3e86e2c4c480ab56f4646a4f288ad37a63e29642' }, h("button", { key: 'e5282e42994f2de061ec36bf892f4da3fc01d2e5', 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: '5a2b903cc3e5f9c554928f11a1c3098d569cbc4d', name: "undo" })), h("button", { key: '466cdff71501f34f0236b4dc60263817966d7b4a', 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: '19209a95787f4475eda9dc0712c2bf36a573c953', name: "redo" })), h("div", { key: '7a463d5ac1f78017fb728abcd2c33061d8545978', class: "utility-separator" }), h("button", { key: '155c2bb50d70223e4f4d5377bacced56ffda68ad', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: '47bd8469b9efe395e9185b3e7375c7375811c0aa', name: "delete" }))));
|
|
37
37
|
}
|
|
38
38
|
static get style() { return kritzelUtilityPanelCss(); }
|
|
39
39
|
}, [513, "kritzel-utility-panel", {
|
|
@@ -39,7 +39,7 @@ const KritzelZoomPanel = /*@__PURE__*/ proxyCustomElement(class KritzelZoomPanel
|
|
|
39
39
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: '054e24893ed609c29b02cf574a68cf9311a3f025' }, h("div", { key: '42ad21dca9486ae350d5814b949e0c577a6ed996', class: { panel: true, visible: this.visible } }, h("button", { key: 'e360884e5a2edaada46d232cae8121f2c5f45bb6', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, h("kritzel-icon", { key: '8c8bb23c4ec4b78fd04aee5c0edd3371c4d14125', name: "minus" })), h("span", { key: '42ab93551c2fbb6d8d4ef076d66405277ba941bf', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), h("button", { key: '232f0f74b748999c6892549978bbe085636ca189', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, h("kritzel-icon", { key: '6f9b8ddd4c666573d9716d7bc455c2a3b1035ede', name: "plus" })))));
|
|
43
43
|
}
|
|
44
44
|
static get style() { return kritzelZoomPanelCss(); }
|
|
45
45
|
}, [513, "kritzel-zoom-panel", {
|
|
@@ -26,11 +26,11 @@ const KritzelButton = /*@__PURE__*/ proxyCustomElement(class KritzelButton exten
|
|
|
26
26
|
this.buttonClick.emit();
|
|
27
27
|
};
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'b9de2a1261ca0cb491f6980db6a596c48fa45b3a' }, h("button", { key: 'a9507ea0f6a1d9fcb19a7df16bea54cc0ead24f9', type: this.type, class: {
|
|
30
30
|
'kritzel-button': true,
|
|
31
31
|
[this.variant]: true,
|
|
32
32
|
'disabled': this.disabled,
|
|
33
|
-
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '
|
|
33
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '8449a26d4f9fe0226c6150a6639c522486b59780' }))));
|
|
34
34
|
}
|
|
35
35
|
static get style() { return kritzelButtonCss(); }
|
|
36
36
|
}, [769, "kritzel-button", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, t as transformTag, H, h, d as Host } from './p-B43upypT.js';
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-DXcjIb_a.js';
|
|
3
3
|
|
|
4
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}`;
|
|
5
5
|
|
|
@@ -48,13 +48,13 @@ const KritzelColorComponent = /*@__PURE__*/ proxyCustomElement(class KritzelColo
|
|
|
48
48
|
render() {
|
|
49
49
|
const resolvedColor = this.resolveColor();
|
|
50
50
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: 'e39c77c55942b9c615e404efabf4939b2cf05a34' }, h("div", { key: 'ac343295592ea80ca7d3da61ca1244dd1aaa50db', class: "checkerboard-bg", style: {
|
|
52
52
|
width: `${this.size}px`,
|
|
53
53
|
height: `${this.size}px`,
|
|
54
54
|
borderRadius: '50%',
|
|
55
55
|
display: 'inline-block',
|
|
56
56
|
position: 'relative',
|
|
57
|
-
} }, h("div", { key: '
|
|
57
|
+
} }, h("div", { key: '4c87934b3febd4c41874cd290d86a9a9a557e3e5', class: {
|
|
58
58
|
'color-circle': true,
|
|
59
59
|
'white': isColorVeryLight,
|
|
60
60
|
}, style: {
|