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
|
@@ -254,6 +254,8 @@ export class KritzelEngine {
|
|
|
254
254
|
awarenessChange;
|
|
255
255
|
/** Emitted when notifications change. */
|
|
256
256
|
notificationsChange;
|
|
257
|
+
/** Emitted when context-menu visibility, items, or position changes. */
|
|
258
|
+
contextMenuStateChange;
|
|
257
259
|
/** Emitted when the combined loading state (external `isLoading` prop or internal workspace loading) changes. */
|
|
258
260
|
loadingChange;
|
|
259
261
|
/** Emitted when remote workspace synchronization is in progress. */
|
|
@@ -264,6 +266,31 @@ export class KritzelEngine {
|
|
|
264
266
|
async triggerSelectionChange() {
|
|
265
267
|
this.objectsSelectionChange.emit();
|
|
266
268
|
}
|
|
269
|
+
/** Starts a scene bootstrap phase by hiding the scene immediately. */
|
|
270
|
+
async beginSceneBootstrap() {
|
|
271
|
+
if (this._sceneBootstrapTransitionTimer !== null) {
|
|
272
|
+
clearTimeout(this._sceneBootstrapTransitionTimer);
|
|
273
|
+
this._sceneBootstrapTransitionTimer = null;
|
|
274
|
+
}
|
|
275
|
+
this._sceneBootstrapTransitionEnabled = false;
|
|
276
|
+
this._sceneBootstrapOpacity = 0;
|
|
277
|
+
this.core.rerender();
|
|
278
|
+
}
|
|
279
|
+
/** Ends a scene bootstrap phase by fading the scene back in. */
|
|
280
|
+
async endSceneBootstrap() {
|
|
281
|
+
if (this._sceneBootstrapTransitionTimer !== null) {
|
|
282
|
+
clearTimeout(this._sceneBootstrapTransitionTimer);
|
|
283
|
+
this._sceneBootstrapTransitionTimer = null;
|
|
284
|
+
}
|
|
285
|
+
this._sceneBootstrapTransitionEnabled = true;
|
|
286
|
+
this._sceneBootstrapOpacity = 1;
|
|
287
|
+
this.core.rerender();
|
|
288
|
+
this._sceneBootstrapTransitionTimer = setTimeout(() => {
|
|
289
|
+
this._sceneBootstrapTransitionEnabled = false;
|
|
290
|
+
this._sceneBootstrapTransitionTimer = null;
|
|
291
|
+
this.core.rerender();
|
|
292
|
+
}, 220);
|
|
293
|
+
}
|
|
267
294
|
handleWheel(ev) {
|
|
268
295
|
if (this.core.store.isDisabled) {
|
|
269
296
|
return;
|
|
@@ -421,6 +448,7 @@ export class KritzelEngine {
|
|
|
421
448
|
}
|
|
422
449
|
handleLongPress(ev) {
|
|
423
450
|
this.contextMenuHandler.handleContextMenu(ev.detail);
|
|
451
|
+
this.emitContextMenuStateChange();
|
|
424
452
|
}
|
|
425
453
|
handleContextMenu(ev) {
|
|
426
454
|
if (ev.cancelable) {
|
|
@@ -433,6 +461,7 @@ export class KritzelEngine {
|
|
|
433
461
|
return;
|
|
434
462
|
}
|
|
435
463
|
this.contextMenuHandler.handleContextMenu(ev);
|
|
464
|
+
this.emitContextMenuStateChange();
|
|
436
465
|
}
|
|
437
466
|
handleResize() {
|
|
438
467
|
this.viewport.handleResize();
|
|
@@ -674,6 +703,7 @@ export class KritzelEngine {
|
|
|
674
703
|
this.core.store.objects?.clearLocalSelectionBox();
|
|
675
704
|
this.core.store.state.isSelecting = false;
|
|
676
705
|
this.core.store.state.isEnabled = true;
|
|
706
|
+
this.emitContextMenuStateChange();
|
|
677
707
|
this.core.rerender();
|
|
678
708
|
}
|
|
679
709
|
/**
|
|
@@ -687,6 +717,7 @@ export class KritzelEngine {
|
|
|
687
717
|
*/
|
|
688
718
|
async openContextMenu(options) {
|
|
689
719
|
this.contextMenuHandler.open(options);
|
|
720
|
+
this.emitContextMenuStateChange();
|
|
690
721
|
}
|
|
691
722
|
/**
|
|
692
723
|
* Retrieves a canvas object by its unique ID.
|
|
@@ -1439,14 +1470,26 @@ export class KritzelEngine {
|
|
|
1439
1470
|
// Revive and add objects to the current workspace
|
|
1440
1471
|
if (data.objects && Array.isArray(data.objects)) {
|
|
1441
1472
|
const reviver = new KritzelReviver(this.core);
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1473
|
+
const objectsMap = this.core.store.objects;
|
|
1474
|
+
const insertRevivedObjects = () => {
|
|
1475
|
+
for (const objData of data.objects) {
|
|
1476
|
+
const revivedObj = reviver.revive(objData);
|
|
1477
|
+
if (!revivedObj) {
|
|
1478
|
+
continue;
|
|
1479
|
+
}
|
|
1445
1480
|
// Update workspaceId to the current workspace's ID
|
|
1446
1481
|
revivedObj.workspaceId = currentWorkspaceId;
|
|
1447
1482
|
this.core.addObject(revivedObj);
|
|
1448
1483
|
loadedCount++;
|
|
1449
1484
|
}
|
|
1485
|
+
};
|
|
1486
|
+
if (objectsMap) {
|
|
1487
|
+
objectsMap.transaction(() => {
|
|
1488
|
+
insertRevivedObjects();
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
else {
|
|
1492
|
+
insertRevivedObjects();
|
|
1450
1493
|
}
|
|
1451
1494
|
}
|
|
1452
1495
|
// Rerender to apply changes
|
|
@@ -1792,7 +1835,6 @@ export class KritzelEngine {
|
|
|
1792
1835
|
viewport;
|
|
1793
1836
|
contextMenuHandler;
|
|
1794
1837
|
keyHandler;
|
|
1795
|
-
contextMenuElement = null;
|
|
1796
1838
|
_lastHadSelectionGroup = false;
|
|
1797
1839
|
_isViewportReady = false;
|
|
1798
1840
|
_isYjsInitialized = false;
|
|
@@ -1808,6 +1850,9 @@ export class KritzelEngine {
|
|
|
1808
1850
|
_hasLoggedUnlicensedWelcomeBanner = false;
|
|
1809
1851
|
_previousVisibleCustomElements = new Set();
|
|
1810
1852
|
_revealedImageKeys = new Set();
|
|
1853
|
+
_sceneBootstrapOpacity = 1;
|
|
1854
|
+
_sceneBootstrapTransitionEnabled = false;
|
|
1855
|
+
_sceneBootstrapTransitionTimer = null;
|
|
1811
1856
|
_defaultUndoState = {
|
|
1812
1857
|
canUndo: false,
|
|
1813
1858
|
canRedo: false,
|
|
@@ -1828,6 +1873,22 @@ export class KritzelEngine {
|
|
|
1828
1873
|
this.isSyncing = isSyncing;
|
|
1829
1874
|
this.syncingChange.emit(isSyncing);
|
|
1830
1875
|
}
|
|
1876
|
+
emitContextMenuStateChange() {
|
|
1877
|
+
this.contextMenuStateChange.emit({
|
|
1878
|
+
isVisible: this.core.store.state.isContextMenuVisible,
|
|
1879
|
+
isObjectMenu: !!this.core.store.selectionGroup,
|
|
1880
|
+
items: this.core.store.state.contextMenuItems,
|
|
1881
|
+
objects: this.core.store.selectionGroup?.objects || [],
|
|
1882
|
+
position: {
|
|
1883
|
+
x: this.core.store.state.contextMenuX,
|
|
1884
|
+
y: this.core.store.state.contextMenuY,
|
|
1885
|
+
},
|
|
1886
|
+
worldPosition: {
|
|
1887
|
+
x: this.core.store.state.contextMenuWorldX,
|
|
1888
|
+
y: this.core.store.state.contextMenuWorldY,
|
|
1889
|
+
},
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1831
1892
|
applyToolConfig(tool, toolConfig) {
|
|
1832
1893
|
const normalizedToolConfig = this.normalizeToolConfig(toolConfig);
|
|
1833
1894
|
Object.entries(normalizedToolConfig).forEach(([key, value]) => {
|
|
@@ -1901,6 +1962,10 @@ export class KritzelEngine {
|
|
|
1901
1962
|
disconnectedCallback() {
|
|
1902
1963
|
this.throttledPointerMoveMulti.cancel();
|
|
1903
1964
|
this._revealedImageKeys.clear();
|
|
1965
|
+
if (this._sceneBootstrapTransitionTimer !== null) {
|
|
1966
|
+
clearTimeout(this._sceneBootstrapTransitionTimer);
|
|
1967
|
+
this._sceneBootstrapTransitionTimer = null;
|
|
1968
|
+
}
|
|
1904
1969
|
// Unmount all remaining custom elements
|
|
1905
1970
|
if (this.core.store.allObjects) {
|
|
1906
1971
|
this.core.store.allObjects.forEach(object => {
|
|
@@ -1944,6 +2009,10 @@ export class KritzelEngine {
|
|
|
1944
2009
|
this.core.store.state.viewportBoundaryRight = this.viewportBoundaryRight;
|
|
1945
2010
|
this.core.store.state.viewportBoundaryTop = this.viewportBoundaryTop;
|
|
1946
2011
|
this.core.store.state.viewportBoundaryBottom = this.viewportBoundaryBottom;
|
|
2012
|
+
if (this.debugInfo) {
|
|
2013
|
+
this.core.store.state.debugInfo = this.debugInfo;
|
|
2014
|
+
this.core.assetResolver.setShowInfo(this.debugInfo.showAssetResolverInfo);
|
|
2015
|
+
}
|
|
1947
2016
|
this._isWorkspaceLoading = true;
|
|
1948
2017
|
this.syncLoadingState();
|
|
1949
2018
|
}
|
|
@@ -2349,6 +2418,9 @@ export class KritzelEngine {
|
|
|
2349
2418
|
}
|
|
2350
2419
|
return (h(Host, null, h("kritzel-loading-overlay", { visible: this.core.store.state.isLoading, text: this.core.localizationManager.translate('engine.loading') }), h("kritzel-sync-indicator", { visible: this.isSyncing, text: "Syncing..." }), this.core.store.state.debugInfo.showViewportInfo && (h("div", { class: "debug-panel" }, h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), h("div", null, "TranslateX: ", this.core.store.state?.translateX), h("div", null, "TranslateY: ", this.core.store.state?.translateY), h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), h("div", null, "PointerCount: ", this.core.store.state.pointers.size), h("div", null, "Scale: ", this.core.store.state?.scale), h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), h("div", null, "PointerX: ", this.core.store.state?.pointerX), h("div", null, "PointerY: ", this.core.store.state?.pointerY), h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), h("div", { id: "origin", class: "origin", style: {
|
|
2351
2420
|
transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
|
|
2421
|
+
opacity: this._sceneBootstrapOpacity.toString(),
|
|
2422
|
+
transition: this._sceneBootstrapTransitionEnabled ? 'opacity 220ms ease-out' : 'none',
|
|
2423
|
+
willChange: this._sceneBootstrapTransitionEnabled ? 'opacity' : undefined,
|
|
2352
2424
|
} }, visibleObjects?.map(object => {
|
|
2353
2425
|
const { multiplied: effectiveOpacity, overridden: effectiveOpacityString } = this.getObjectEffectiveOpacity(object, viewportScale);
|
|
2354
2426
|
return (h("div", { key: object.id, id: object.id, class: "object", style: {
|
|
@@ -2775,20 +2847,7 @@ export class KritzelEngine {
|
|
|
2775
2847
|
stroke: 'var(--kritzel-snap-indicator-stroke, #007bff)',
|
|
2776
2848
|
strokeWidth: data.indicatorStrokeWidth,
|
|
2777
2849
|
} })))));
|
|
2778
|
-
})()), this.core.store.
|
|
2779
|
-
position: 'absolute',
|
|
2780
|
-
left: `${this.core.store.state.contextMenuX}px`,
|
|
2781
|
-
top: `${this.core.store.state.contextMenuY}px`,
|
|
2782
|
-
zIndex: '10002',
|
|
2783
|
-
}, onActionSelected: event => {
|
|
2784
|
-
if (event.detail.action) {
|
|
2785
|
-
event.detail.action({
|
|
2786
|
-
x: this.core.store.state.contextMenuWorldX,
|
|
2787
|
-
y: this.core.store.state.contextMenuWorldY,
|
|
2788
|
-
}, this.core.store.selectionGroup?.objects || []);
|
|
2789
|
-
}
|
|
2790
|
-
this.hideContextMenu();
|
|
2791
|
-
}, onClose: () => this.hideContextMenu() })), this.core.store.objects?.hasAwareness && h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
|
|
2850
|
+
})()), this.core.store.objects?.hasAwareness && h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool?.toolType === 'eraser' && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core }), !this.core.licenseManager.isLicensed && h("kritzel-watermark", { core: this.core, label: this.core.localizationManager.translate('watermark.poweredBy') })));
|
|
2792
2851
|
}
|
|
2793
2852
|
static get is() { return "kritzel-engine"; }
|
|
2794
2853
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3732,6 +3791,28 @@ export class KritzelEngine {
|
|
|
3732
3791
|
}
|
|
3733
3792
|
}
|
|
3734
3793
|
}
|
|
3794
|
+
}, {
|
|
3795
|
+
"method": "contextMenuStateChange",
|
|
3796
|
+
"name": "contextMenuStateChange",
|
|
3797
|
+
"bubbles": true,
|
|
3798
|
+
"cancelable": true,
|
|
3799
|
+
"composed": true,
|
|
3800
|
+
"docs": {
|
|
3801
|
+
"tags": [],
|
|
3802
|
+
"text": "Emitted when context-menu visibility, items, or position changes."
|
|
3803
|
+
},
|
|
3804
|
+
"complexType": {
|
|
3805
|
+
"original": "KritzelContextMenuState",
|
|
3806
|
+
"resolved": "KritzelContextMenuState",
|
|
3807
|
+
"references": {
|
|
3808
|
+
"KritzelContextMenuState": {
|
|
3809
|
+
"location": "import",
|
|
3810
|
+
"path": "../../../interfaces/context-menu-state.interface",
|
|
3811
|
+
"id": "src/interfaces/context-menu-state.interface.ts::KritzelContextMenuState",
|
|
3812
|
+
"referenceLocation": "KritzelContextMenuState"
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3735
3816
|
}, {
|
|
3736
3817
|
"method": "loadingChange",
|
|
3737
3818
|
"name": "loadingChange",
|
|
@@ -3783,6 +3864,40 @@ export class KritzelEngine {
|
|
|
3783
3864
|
"tags": []
|
|
3784
3865
|
}
|
|
3785
3866
|
},
|
|
3867
|
+
"beginSceneBootstrap": {
|
|
3868
|
+
"complexType": {
|
|
3869
|
+
"signature": "() => Promise<void>",
|
|
3870
|
+
"parameters": [],
|
|
3871
|
+
"references": {
|
|
3872
|
+
"Promise": {
|
|
3873
|
+
"location": "global",
|
|
3874
|
+
"id": "global::Promise"
|
|
3875
|
+
}
|
|
3876
|
+
},
|
|
3877
|
+
"return": "Promise<void>"
|
|
3878
|
+
},
|
|
3879
|
+
"docs": {
|
|
3880
|
+
"text": "Starts a scene bootstrap phase by hiding the scene immediately.",
|
|
3881
|
+
"tags": []
|
|
3882
|
+
}
|
|
3883
|
+
},
|
|
3884
|
+
"endSceneBootstrap": {
|
|
3885
|
+
"complexType": {
|
|
3886
|
+
"signature": "() => Promise<void>",
|
|
3887
|
+
"parameters": [],
|
|
3888
|
+
"references": {
|
|
3889
|
+
"Promise": {
|
|
3890
|
+
"location": "global",
|
|
3891
|
+
"id": "global::Promise"
|
|
3892
|
+
}
|
|
3893
|
+
},
|
|
3894
|
+
"return": "Promise<void>"
|
|
3895
|
+
},
|
|
3896
|
+
"docs": {
|
|
3897
|
+
"text": "Ends a scene bootstrap phase by fading the scene back in.",
|
|
3898
|
+
"tags": []
|
|
3899
|
+
}
|
|
3900
|
+
},
|
|
3786
3901
|
"registerTool": {
|
|
3787
3902
|
"complexType": {
|
|
3788
3903
|
"signature": "(toolName: string, toolClass: any, toolConfig?: KritzelTextToolConfig | KritzelBrushToolConfig | KritzelLineToolConfig | KritzelShapeToolConfig) => Promise<KritzelBaseTool | null>",
|
|
@@ -19,7 +19,7 @@ export class KritzelWatermark {
|
|
|
19
19
|
label;
|
|
20
20
|
render() {
|
|
21
21
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '0eccc75e51c7ac199e23d8f3a871593f1fb65a17' }, h("a", { key: '2029f8b56ba8609ca621447eac0df9d30ebfbbbe', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-watermark"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,16 +81,16 @@ export class KritzelAvatar {
|
|
|
81
81
|
height: `${this.size}px`,
|
|
82
82
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
83
83
|
};
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '116725d55e4443e80216b3b3251e957d2009b43e', style: containerStyles, class: {
|
|
85
85
|
'has-image': !!showImage,
|
|
86
86
|
'has-initials': !!showInitials,
|
|
87
87
|
'has-default': !!showDefaultIcon,
|
|
88
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '
|
|
88
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'd70ad4eb484404b18c13e066e8c10b3c86918ee5', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
89
89
|
if (el) {
|
|
90
90
|
el.referrerPolicy = 'no-referrer';
|
|
91
91
|
el.crossOrigin = 'anonymous';
|
|
92
92
|
}
|
|
93
|
-
}, onError: this.handleImageError })), showInitials && (h("span", { key: '
|
|
93
|
+
}, onError: this.handleImageError })), showInitials && (h("span", { key: '21a9022cffdb69e0c3626e513cb3c036a9d3a16d', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '43e676af007bf254b1921f3efcbc7fff4e204359', class: "avatar-default" }, h("svg", { key: 'a7378795539a902e28ca644a80f1ca00cc9f818a', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '31548a495a86f033325c98cfcc0ae398b6bb8281', 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" }))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "kritzel-avatar"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -15,11 +15,11 @@ export class KritzelButton {
|
|
|
15
15
|
this.buttonClick.emit();
|
|
16
16
|
};
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'b9de2a1261ca0cb491f6980db6a596c48fa45b3a' }, h("button", { key: 'a9507ea0f6a1d9fcb19a7df16bea54cc0ead24f9', type: this.type, class: {
|
|
19
19
|
'kritzel-button': true,
|
|
20
20
|
[this.variant]: true,
|
|
21
21
|
'disabled': this.disabled,
|
|
22
|
-
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '
|
|
22
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '8449a26d4f9fe0226c6150a6639c522486b59780' }))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-button"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,13 +38,13 @@ export class KritzelColorComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
const resolvedColor = this.resolveColor();
|
|
40
40
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'e39c77c55942b9c615e404efabf4939b2cf05a34' }, h("div", { key: 'ac343295592ea80ca7d3da61ca1244dd1aaa50db', class: "checkerboard-bg", style: {
|
|
42
42
|
width: `${this.size}px`,
|
|
43
43
|
height: `${this.size}px`,
|
|
44
44
|
borderRadius: '50%',
|
|
45
45
|
display: 'inline-block',
|
|
46
46
|
position: 'relative',
|
|
47
|
-
} }, h("div", { key: '
|
|
47
|
+
} }, h("div", { key: '4c87934b3febd4c41874cd290d86a9a9a557e3e5', class: {
|
|
48
48
|
'color-circle': true,
|
|
49
49
|
'white': isColorVeryLight,
|
|
50
50
|
}, style: {
|
|
@@ -33,7 +33,7 @@ export class KritzelColorPalette {
|
|
|
33
33
|
render() {
|
|
34
34
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
35
35
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '16aa405a43b3943473e577c5a6ab86adf4ae1ba9' }, h("div", { key: 'f65bb286889700dc1f0e8d84ff59721071b7b73a', class: {
|
|
37
37
|
'color-grid': true,
|
|
38
38
|
'expanded': this.isExpanded,
|
|
39
39
|
}, style: {
|
|
@@ -4,7 +4,7 @@ export class KritzelFont {
|
|
|
4
4
|
size = 24;
|
|
5
5
|
color = '#000000';
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '054371cac30a2433611139a670406b0a1e3b99ff' }, h("div", { key: 'b4f2142b3cb31d067f39952a38b6f665f28f63bf', class: "font-preview", style: {
|
|
8
8
|
fontFamily: this.fontFamily,
|
|
9
9
|
fontSize: `${this.size}px`,
|
|
10
10
|
color: this.color
|
|
@@ -17,7 +17,7 @@ export class KritzelFontSize {
|
|
|
17
17
|
render() {
|
|
18
18
|
const color = 'var(--kritzel-global-text-primary)';
|
|
19
19
|
const sizes = this.sizes ?? [];
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '56eb19367abe312bac3b626cfcae3b1ff6e90d21' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
21
21
|
'size-container': true,
|
|
22
22
|
'selected': this.selectedSize === size,
|
|
23
23
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -28,7 +28,7 @@ export class KritzelInput {
|
|
|
28
28
|
this.valueChange.emit(input.value);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '46a0a48902a06ad85edcbaad3679ce3fe9ba850c' }, h("div", { key: 'a6beaf920614aa959d2fbd68b7268afba8637358', class: "input-container" }, this.label && h("label", { key: 'ca6d3fb3c22f1540795dbb0695ddd9b87cc05eee', class: "input-label" }, this.label), h("div", { key: '78d116e82531a9cca996d594792245449bcaf9c8', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '0d10d6356dea3a11338172bbe8c3c878eefcc708', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '0e6166ba8728efc1035302d7fb048306efbe5a68', class: "input-suffix" }, this.suffix)))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "kritzel-input"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,15 +90,15 @@ export class KritzelMasterDetail {
|
|
|
90
90
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
91
91
|
const panelId = 'master-detail-panel';
|
|
92
92
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '0edf50b0b853633b88bf481f97f22aceba9e163e' }, h("div", { key: '21a0a3f81e5a60889ccd152c905cb41f52c3e037', class: {
|
|
94
94
|
'master-detail-container': true,
|
|
95
95
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
96
|
-
} }, h("nav", { key: '
|
|
96
|
+
} }, h("nav", { key: '41f88248cc372c8cae4cb50a19edf462a01e43f2', 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: {
|
|
97
97
|
'menu-item': true,
|
|
98
98
|
'is-selected': item.id === this.selectedItemId,
|
|
99
99
|
'is-disabled': !!item.disabled,
|
|
100
100
|
'is-focused': index === this.focusedIndex,
|
|
101
|
-
}, 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: '
|
|
101
|
+
}, 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: 'f8447facf3dfdbd7772823654847e1b90b03f73e', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '3edc9784267613e6b3a706739bbb537161e4c747', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'ec0b4691735578525e5863842271366e04b13fb7', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: 'c21fbaff78f98859b9756427125b60504d4bb630' })))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "kritzel-master-detail"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class KritzelMenu {
|
|
|
51
51
|
this.itemCloseChildMenu.emit(event.detail);
|
|
52
52
|
};
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '27a90a3a8549517a2d6e341a5da13496bf714970', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'c0c2351fac389f6676b38481eaacee553ca6867a', 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 })))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "kritzel-menu"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,12 +90,12 @@ export class KritzelMenuItem {
|
|
|
90
90
|
];
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '9d6653a630da5a3da38291d89d6d7d59d6994e02', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
94
94
|
'selected': this.item.isSelected,
|
|
95
95
|
'editing': this.item.isEditing,
|
|
96
96
|
'disabled': this.item.isDisabled,
|
|
97
97
|
'child-open': this.item.isChildMenuOpen,
|
|
98
|
-
}, onClick: this.handleItemSelect }, h("div", { key: '
|
|
98
|
+
}, onClick: this.handleItemSelect }, h("div", { key: '48a1678296e672c6c03fb3e1473c42d3a246d481', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "kritzel-menu-item"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,7 +86,7 @@ export class KritzelNumericInput {
|
|
|
86
86
|
this.valueChange.emit(newValue);
|
|
87
87
|
};
|
|
88
88
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: '8901e0b56ccbc344420483a4a56663f7cd74d9e8' }, h("div", { key: '5f3d6b5c56007e11383aa69f60f22031b0e8f332', class: "input-container" }, this.label && h("label", { key: '2cb102a5b6c16d068f4f304fbcc6241f79fc0ce8', class: "input-label" }, this.label), h("div", { key: '96441095acc3d9a8e77b6d2bac2ceda683c9c976', class: "input-wrapper" }, h("input", { key: '523a5485111077e20faded235df6362e5ea9cfd4', 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: '2071e98125a8d014513e93052bd8c1fee17932a5', class: "spinner-buttons" }, h("button", { key: '12422e5285dfb532dbbb6eb1a36dbcb3de50f2bc', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '49ad5625c80fae6706ba4ab91f47bd550481ef74', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ff7d19b61baeb5ba58bb60f2cc629bcec6eb4411', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'e4fec28e4fc997e007127f2b30b00cc752433221', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '27bf06cde8de11f4a97090911afd6b8993463112', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ed7071dd79bfe509ebb319ce43ecb3e982dd4157', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "kritzel-numeric-input"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class KritzelOpacitySlider {
|
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
24
|
const percentage = this.getPercentage();
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '2dadd8a7c4d1af748e91a6005433288ab231f2e8' }, h("div", { key: '65ae90d95bffff244d97329754cf0cb8f73331fa', class: "opacity-container" }, h("div", { key: '90e95347f7015882112f0653a25347e715233227', class: "slider-wrapper" }, h("input", { key: '15836bc089c1725062016677d3b95384d1958431', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
26
26
|
'--slider-progress': `${percentage}%`,
|
|
27
27
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
28
28
|
} })))));
|
|
@@ -277,7 +277,7 @@ export class KritzelPortal {
|
|
|
277
277
|
this.portal.style.visibility = 'visible';
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return (h(Host, { key: '
|
|
280
|
+
return (h(Host, { key: '72273b4c7811473072ee27668836a5ddddcfd618', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: 'b4f37ca27c47ab950a4639162fa31a3c2362d6f7' })));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "kritzel-portal"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class KritzelSlideToggle {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '00160c9cfdafa0d53f3acfb1fb235b29abf2622a', 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: '385008948ffbdc0f26249d2d833aae8f04eeb6a0', class: "toggle-track" }, h("div", { key: '43929e94335589feb24ee45f1c34a270653dd412', class: "toggle-thumb" }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "kritzel-slide-toggle"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,7 +82,7 @@ export class KritzelSplitButton {
|
|
|
82
82
|
this.menuScrollTop = event.target.scrollTop;
|
|
83
83
|
};
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: 'fa22dc1185ef07d8127d9ee9f6dbe482d126f934', class: { mobile: this.isTouchDevice } }, h("button", { key: 'a48aba702b70e9b24ad5486dde61fa9f9c8f7cdc', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '0d1c9a3e9f744541dd6ebe491105f6ee65233543', name: this.buttonIcon })), h("div", { key: 'c9db29f0b9c9cf1974d78f4f60be9e1b0e26c5d2', class: "split-divider" }), h("button", { key: '57addfd5228b7c7668be902c53683d12c976b89b', 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: 'd860cc503043425860b1234b5d34693bfdd1d5ab', name: this.dropdownIcon })), h("kritzel-portal", { key: 'cd6dda8869aea4205d922fc639073019bbd2b102', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: '1ef1c2b319662e7a2af15b46362addcc75bceb68', 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 }))));
|
|
86
86
|
}
|
|
87
87
|
static get is() { return "kritzel-split-button"; }
|
|
88
88
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,7 +9,7 @@ export class KritzelStrokeSize {
|
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
11
|
const sizes = this.sizes ?? [];
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'ba181d798d2bf7b60308746635d2077ce1353b83' }, h("div", { key: '048fc8934190359b9337747567844ca88925a6ce', class: "size-grid" }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
13
13
|
'size-container': true,
|
|
14
14
|
'selected': this.selectedSize === size,
|
|
15
15
|
}, onClick: () => this.handleSizeClick(size) }, h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -5,7 +5,7 @@ export class KritzelSyncIndicator {
|
|
|
5
5
|
/** The text displayed next to the spinner. */
|
|
6
6
|
text = 'Syncing...';
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '585d5fd13116c093e5221164e36e6e986a63da58' }, h("div", { key: 'd4e0d9e51db002b8ea201a0564c22916809c346d', class: { indicator: true, visible: this.visible }, role: "status", "aria-live": "polite", "aria-label": "Synchronizing workspace" }, h("span", { key: 'b82f4c363ee31ae697e435fc8eb6ce0e2f3df1ab', class: "spinner", "aria-hidden": "true" }), h("span", { key: 'f39e04332aaf622dad69d0e5d6b6e90ee5df3ed1' }, this.text))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "kritzel-sync-indicator"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -128,14 +128,14 @@ export class KritzelTooltip {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
render() {
|
|
131
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: '227146703158aa65ecffcce348e568d559cee829', style: {
|
|
132
132
|
position: 'fixed',
|
|
133
133
|
zIndex: '9999',
|
|
134
134
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
135
135
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
136
136
|
left: `${this.positionX}px`,
|
|
137
137
|
bottom: `${this.positionY}px`,
|
|
138
|
-
} }, h("div", { key: '
|
|
138
|
+
} }, h("div", { key: '573e97ed81920066e8fbf50f790224c23b37ec21', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: 'c489b45928cf6720c6827df73b9eedf08bc9d5e2' }))));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "kritzel-tooltip"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,7 +16,7 @@ export class KritzelBackToContent {
|
|
|
16
16
|
this.backToContent.emit();
|
|
17
17
|
};
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '86a94bdc5bb02977214f999b7b880ce3193b6d8f' }, h("button", { key: '6a07c13c9986ebef6100140f7e702a1dfb5c2033', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, h("kritzel-icon", { key: 'ebadc99b15f2f015ada8795fa05a3a64ccac9cb5', name: "chevrons-left" }))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "kritzel-back-to-content"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -232,13 +232,13 @@ export class KritzelControls {
|
|
|
232
232
|
// Separate tool controls from config control
|
|
233
233
|
const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
234
234
|
const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
235
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: 'a72f9b1befd185b67d24f6d7a4987ebeb4d6742d', style: { display: this.visible ? '' : 'none' }, class: {
|
|
236
236
|
mobile: this.isTouchDevice,
|
|
237
|
-
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '
|
|
237
|
+
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '4e69324b23542878919119d10db98fc44b0dc536', style: {
|
|
238
238
|
position: 'absolute',
|
|
239
239
|
bottom: '56px',
|
|
240
240
|
left: '12px',
|
|
241
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '
|
|
241
|
+
}, 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 => {
|
|
242
242
|
// Check if this control has sub-options (split-button)
|
|
243
243
|
if (control.subOptions?.length) {
|
|
244
244
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -268,10 +268,10 @@ export class KritzelControls {
|
|
|
268
268
|
'kritzel-control': true,
|
|
269
269
|
'selected': this.activeControl?.name === control?.name,
|
|
270
270
|
}, 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 })));
|
|
271
|
-
})), h("div", { key: '
|
|
271
|
+
})), h("div", { key: '9a8bd38a8266f1bb5feddcb4e396bb20c25512fa', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
|
|
272
272
|
'kritzel-config-container': true,
|
|
273
273
|
'visible': hasConfigUI,
|
|
274
|
-
}, key: configControl.name }, h("div", { key: '
|
|
274
|
+
}, 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 => {
|
|
275
275
|
if (el)
|
|
276
276
|
this.configTriggerRef = el;
|
|
277
277
|
}, onKeyDown: event => {
|
|
@@ -280,7 +280,7 @@ export class KritzelControls {
|
|
|
280
280
|
}
|
|
281
281
|
}, style: {
|
|
282
282
|
cursor: 'pointer',
|
|
283
|
-
} }, this.displayValues && (h("div", { key: '
|
|
283
|
+
} }, this.displayValues && (h("div", { key: '07a7fb2e0dc5c53a389da7f742322fdf489e0bd7', class: "color-container" }, h("kritzel-color", { key: '2987b76ca66d58a12ee71dd4c7d82a9c42480690', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
284
284
|
borderRadius: '50%',
|
|
285
285
|
border: 'none',
|
|
286
286
|
} })))))))));
|