kritzel-stencil 0.1.29 → 0.1.31
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/{default-line-tool.config-B2cKxcY4.js → default-line-tool.config-qD8Chdg7.js} +30 -17
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-back-to-content_32.cjs.entry.js +34 -22
- package/dist/collection/classes/objects/selection-group.class.js +5 -2
- package/dist/collection/classes/structures/object-map.structure.js +7 -2
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +4 -1
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.css +1 -1
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.css +1 -0
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.css +8 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +15 -11
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.css +2 -2
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.css +1 -1
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.css +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/e2e/pages/editor.page.js +794 -0
- package/dist/collection/themes/dark-theme.js +12 -7
- package/dist/collection/themes/light-theme.js +13 -8
- package/dist/components/index.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-editor.js +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-line-endings.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-opacity-slider.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-shape-fill.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-workspace-manager.js +1 -1
- package/dist/components/{p-OPLSOwSk.js → p-B-tzBj-f.js} +1 -1
- package/dist/components/p-B22gBahO.js +1 -0
- package/dist/components/{p-Cg1R-Lj1.js → p-BiibSoAl.js} +1 -1
- package/dist/components/{p-BcCjGflI.js → p-BwZ_0A7g.js} +1 -1
- package/dist/components/{p-BIBPGrdd.js → p-C5-i16ck.js} +1 -1
- package/dist/components/{p-BjpOwF3v.js → p-CIslK7aK.js} +1 -1
- package/dist/components/{p-X69mguNG.js → p-Cg6bE3bx.js} +1 -1
- package/dist/components/{p-ByrUIpf4.js → p-CihUAfk9.js} +2 -2
- package/dist/components/p-CnoVf56N.js +1 -0
- package/dist/components/{p-D89vzg8F.js → p-Cu2JOs99.js} +1 -1
- package/dist/components/{p-6B0LH1RP.js → p-CuWxY3KC.js} +1 -1
- package/dist/components/{p-CKCulHas.js → p-D3ynGLzV.js} +1 -1
- package/dist/components/{p-BWaNKYjM.js → p-D6cey6Hr.js} +1 -1
- package/dist/components/{p-BaLEWzaG.js → p-D84uGsE3.js} +1 -1
- package/dist/components/{p-C30XjZtX.js → p-DB2KHpaa.js} +1 -1
- package/dist/components/p-TQCB-ocH.js +1 -0
- package/dist/components/{p-Bi-kaLjA.js → p-opmUuRlE.js} +1 -1
- package/dist/esm/{default-line-tool.config-C__0Hp7X.js → default-line-tool.config-CjlaN1S5.js} +30 -17
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-back-to-content_32.entry.js +34 -22
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-9bce6f4f.entry.js +9 -0
- package/dist/stencil/p-CjlaN1S5.js +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/objects/selection-group.class.d.ts +2 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/e2e/pages/editor.page.d.ts +373 -0
- package/dist/types/interfaces/theme.interface.d.ts +7 -2
- package/package.json +1 -1
- package/dist/components/p-BX4JyoOd.js +0 -1
- package/dist/components/p-BqjUcirx.js +0 -1
- package/dist/components/p-Cg7hVn-a.js +0 -1
- package/dist/stencil/p-74ef051a.entry.js +0 -9
- package/dist/stencil/p-C__0Hp7X.js +0 -1
package/dist/cjs/{default-line-tool.config-B2cKxcY4.js → default-line-tool.config-qD8Chdg7.js}
RENAMED
|
@@ -14164,8 +14164,8 @@ const lightTheme = {
|
|
|
14164
14164
|
global: {
|
|
14165
14165
|
borderColor: '#ebebeb',
|
|
14166
14166
|
dividerColor: '#e0e0e0',
|
|
14167
|
-
focusColor: '#
|
|
14168
|
-
focusRingColor: '
|
|
14167
|
+
focusColor: '#333333',
|
|
14168
|
+
focusRingColor: '#333333',
|
|
14169
14169
|
hoverBackground: 'hsl(0, 0%, 0%, 4.3%)',
|
|
14170
14170
|
iconColor: 'currentColor',
|
|
14171
14171
|
scrollbarThumbColor: '#ebebeb',
|
|
@@ -14251,7 +14251,7 @@ const lightTheme = {
|
|
|
14251
14251
|
backButtonColor: '#333333',
|
|
14252
14252
|
backgroundColor: '#ffffff',
|
|
14253
14253
|
detailBackgroundColor: '#ffffff',
|
|
14254
|
-
detailFocusOutline: '2px solid #
|
|
14254
|
+
detailFocusOutline: '2px solid #333333',
|
|
14255
14255
|
menuBackgroundColor: '#ffffff',
|
|
14256
14256
|
menuBorderRight: '1px solid #ebebeb',
|
|
14257
14257
|
menuItemActiveBackgroundColor: 'hsl(0, 0%, 0%, 8.6%)',
|
|
@@ -14259,7 +14259,7 @@ const lightTheme = {
|
|
|
14259
14259
|
menuItemChevronColor: '#aaaaaa',
|
|
14260
14260
|
menuItemColor: '#333333',
|
|
14261
14261
|
menuItemDisabledColor: '#aaaaaa',
|
|
14262
|
-
menuItemFocusOutline: '2px solid #
|
|
14262
|
+
menuItemFocusOutline: '2px solid #333333',
|
|
14263
14263
|
menuItemHoverBackgroundColor: 'hsl(0, 0%, 0%, 4.3%)',
|
|
14264
14264
|
menuItemSelectedBackgroundColor: '#007AFF',
|
|
14265
14265
|
menuItemSelectedColor: '#ffffff',
|
|
@@ -14273,9 +14273,14 @@ const lightTheme = {
|
|
|
14273
14273
|
itemChildOpenBackgroundColor: 'hsl(0, 0%, 0%, 3%)',
|
|
14274
14274
|
itemColor: '#333333',
|
|
14275
14275
|
itemEditingBackgroundColor: '#f0f0f0',
|
|
14276
|
-
itemInputBorder: '1px solid #
|
|
14277
|
-
|
|
14278
|
-
|
|
14276
|
+
itemInputBorder: '1px solid #333333',
|
|
14277
|
+
itemInputBorderColorOnSelected: '#ffffff',
|
|
14278
|
+
itemInputCaretColor: '#333333',
|
|
14279
|
+
itemInputCaretColorOnSelected: '#ffffff',
|
|
14280
|
+
itemInputSelectionColor: '#007aff',
|
|
14281
|
+
itemInputSelectionColorOnSelected: 'rgba(255, 255, 255, 0.55)',
|
|
14282
|
+
itemInputSelectionTextColor: '#ffffff',
|
|
14283
|
+
itemInputSelectionTextColorOnSelected: '#ffffff',
|
|
14279
14284
|
itemOverlayBackgroundColor: 'hsl(0, 0%, 0%, 4.3%)',
|
|
14280
14285
|
itemSelectedBackgroundColor: '#007aff',
|
|
14281
14286
|
itemSelectedColor: '#ffffff',
|
|
@@ -14292,7 +14297,7 @@ const lightTheme = {
|
|
|
14292
14297
|
},
|
|
14293
14298
|
numericInput: {
|
|
14294
14299
|
borderColor: '#ebebeb',
|
|
14295
|
-
focusBorderColor: '#
|
|
14300
|
+
focusBorderColor: '#333333',
|
|
14296
14301
|
hoverBorderColor: '#ccc',
|
|
14297
14302
|
inputBackground: '#ffffff',
|
|
14298
14303
|
labelColor: '#666666',
|
|
@@ -14359,8 +14364,8 @@ const darkTheme = {
|
|
|
14359
14364
|
global: {
|
|
14360
14365
|
borderColor: '#3a3a3a',
|
|
14361
14366
|
dividerColor: '#3a3a3a',
|
|
14362
|
-
focusColor: '#
|
|
14363
|
-
focusRingColor: '
|
|
14367
|
+
focusColor: '#ffffff',
|
|
14368
|
+
focusRingColor: '#ffffff',
|
|
14364
14369
|
hoverBackground: 'hsl(0, 0%, 100%, 8%)',
|
|
14365
14370
|
iconColor: 'currentColor',
|
|
14366
14371
|
scrollbarThumbColor: '#555555',
|
|
@@ -14445,7 +14450,7 @@ const darkTheme = {
|
|
|
14445
14450
|
backButtonColor: '#e0e0e0',
|
|
14446
14451
|
backgroundColor: '#2a2a2a',
|
|
14447
14452
|
detailBackgroundColor: '#2a2a2a',
|
|
14448
|
-
detailFocusOutline: '2px solid #
|
|
14453
|
+
detailFocusOutline: '2px solid #ffffff',
|
|
14449
14454
|
menuBackgroundColor: '#2a2a2a',
|
|
14450
14455
|
menuBorderRight: '1px solid #3a3a3a',
|
|
14451
14456
|
menuItemActiveBackgroundColor: 'hsl(0, 0%, 100%, 12%)',
|
|
@@ -14453,7 +14458,7 @@ const darkTheme = {
|
|
|
14453
14458
|
menuItemChevronColor: '#666666',
|
|
14454
14459
|
menuItemColor: '#e0e0e0',
|
|
14455
14460
|
menuItemDisabledColor: '#666666',
|
|
14456
|
-
menuItemFocusOutline: '2px solid #
|
|
14461
|
+
menuItemFocusOutline: '2px solid #ffffff',
|
|
14457
14462
|
menuItemHoverBackgroundColor: 'hsl(0, 0%, 100%, 8%)',
|
|
14458
14463
|
menuItemSelectedBackgroundColor: '#0A84FF',
|
|
14459
14464
|
menuItemSelectedColor: '#ffffff',
|
|
@@ -14467,9 +14472,14 @@ const darkTheme = {
|
|
|
14467
14472
|
itemChildOpenBackgroundColor: 'hsl(0, 0%, 100%, 6%)',
|
|
14468
14473
|
itemColor: '#e0e0e0',
|
|
14469
14474
|
itemEditingBackgroundColor: '#3a3a3a',
|
|
14470
|
-
itemInputBorder: '1px solid #
|
|
14471
|
-
|
|
14475
|
+
itemInputBorder: '1px solid #ffffff',
|
|
14476
|
+
itemInputBorderColorOnSelected: '#ffffff',
|
|
14477
|
+
itemInputCaretColor: '#e0e0e0',
|
|
14478
|
+
itemInputCaretColorOnSelected: '#ffffff',
|
|
14479
|
+
itemInputSelectionColor: '#b0b0b0',
|
|
14480
|
+
itemInputSelectionColorOnSelected: 'rgba(255, 255, 255, 0.35)',
|
|
14472
14481
|
itemInputSelectionTextColor: '#ffffff',
|
|
14482
|
+
itemInputSelectionTextColorOnSelected: '#ffffff',
|
|
14473
14483
|
itemOverlayBackgroundColor: 'hsl(0, 0%, 100%, 8%)',
|
|
14474
14484
|
itemSelectedBackgroundColor: '#0A84FF',
|
|
14475
14485
|
itemSelectedColor: '#ffffff',
|
|
@@ -14486,7 +14496,7 @@ const darkTheme = {
|
|
|
14486
14496
|
},
|
|
14487
14497
|
numericInput: {
|
|
14488
14498
|
borderColor: '#3a3a3a',
|
|
14489
|
-
focusBorderColor: '#
|
|
14499
|
+
focusBorderColor: '#ffffff',
|
|
14490
14500
|
hoverBorderColor: '#4a4a4a',
|
|
14491
14501
|
inputBackground: '#1a1a1a',
|
|
14492
14502
|
labelColor: '#999999',
|
|
@@ -17139,8 +17149,9 @@ class KritzelSelectionGroup extends KritzelBaseObject {
|
|
|
17139
17149
|
/**
|
|
17140
17150
|
* Refreshes the selection group's bounding box dimensions based on contained objects.
|
|
17141
17151
|
* @param cachedObjects Optional pre-fetched objects array to avoid redundant getter calls
|
|
17152
|
+
* @param skipPersist If true, only updates local state without persisting to Yjs (used during undo/redo)
|
|
17142
17153
|
*/
|
|
17143
|
-
refreshObjectDimensions(cachedObjects) {
|
|
17154
|
+
refreshObjectDimensions(cachedObjects, skipPersist = false) {
|
|
17144
17155
|
const children = cachedObjects ?? this.objects;
|
|
17145
17156
|
if (children.length === 1) {
|
|
17146
17157
|
const obj = children[0];
|
|
@@ -17194,7 +17205,9 @@ class KritzelSelectionGroup extends KritzelBaseObject {
|
|
|
17194
17205
|
this.translateX = cx - (this.width / this.scale + 2 * this.padding) / 2;
|
|
17195
17206
|
this.translateY = cy - (this.height / this.scale + 2 * this.padding) / 2;
|
|
17196
17207
|
}
|
|
17197
|
-
|
|
17208
|
+
if (!skipPersist) {
|
|
17209
|
+
this._core.store.state.objects.update(this);
|
|
17210
|
+
}
|
|
17198
17211
|
}
|
|
17199
17212
|
getOffsetXToCenterFromSnapshot(snapshot) {
|
|
17200
17213
|
const objCenterX = snapshot.translateX + snapshot.totalWidth / snapshot.scale / 2;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-NMqsANCI.js');
|
|
4
|
-
var defaultLineTool_config = require('./default-line-tool.config-
|
|
4
|
+
var defaultLineTool_config = require('./default-line-tool.config-qD8Chdg7.js');
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
@@ -1707,6 +1707,9 @@ const KritzelEditor = class {
|
|
|
1707
1707
|
this.host.style.setProperty('--kritzel-editor-top-left-buttons-top', '14px');
|
|
1708
1708
|
this.host.style.setProperty('--kritzel-editor-top-left-buttons-left', '14px');
|
|
1709
1709
|
this.host.style.setProperty('--kritzel-editor-controls-bottom', '24px');
|
|
1710
|
+
this.host.style.setProperty('--kritzel-editor-controls-transition', 'cubic-bezier(0.25, 0.1, 0.25, 1.0)');
|
|
1711
|
+
this.host.style.setProperty('--kritzel-editor-controls-transform', 'translateY(200%)');
|
|
1712
|
+
this.host.style.setProperty('--kritzel-editor-controls-transition-duration', '0.25s');
|
|
1710
1713
|
break;
|
|
1711
1714
|
default:
|
|
1712
1715
|
// Default for Windows/Linux
|
|
@@ -1717,7 +1720,7 @@ const KritzelEditor = class {
|
|
|
1717
1720
|
}
|
|
1718
1721
|
}
|
|
1719
1722
|
render() {
|
|
1720
|
-
return (index.h(index.Host, { key: '
|
|
1723
|
+
return (index.h(index.Host, { key: '504b454589f58230a4b600c92c1b3d25dbf60d03' }, index.h("div", { key: '3aa0402736696e08a98cf2d432fb8c8a3c7e1733', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'de39b646dad1038691b915d7e108366f30402d32', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: '0481fc6b9da1b1b99f8f743cbe297cbc9a466fcb', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), index.h("kritzel-engine", { key: '32479175979f27df2bea0869f72c31e51a6a4ace', ref: el => (this.engineRef = el), workspace: this.activeWorkspace, syncConfig: this.syncConfig, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, theme: this.currentTheme, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onObjectsChange: event => this.handleObjectsChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event) }), index.h("kritzel-controls", { key: 'b385ec06dc2fc8a7322c2a2dcdbfeb1d6b55ba3f', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState, theme: this.currentTheme, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: 'd946d1a4bbec0ee40ca06d3ebde286b0ee6aedd8', class: "top-right-buttons" }, index.h("kritzel-settings", { key: '8dd98b1d9e69a94c2a6fd3d3aa44e37ff14ac195', ref: el => (this.settingsRef = el), onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '6e9bac15a07625fc4222aebe8f46ea06e92fd444', ref: el => (this.exportRef = el), onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg() }), index.h("kritzel-more-menu", { key: '3daeece622c5c6a65790159c438ed11649442666', onItemSelect: event => this.handleMoreMenuItemSelect(event) }))));
|
|
1721
1724
|
}
|
|
1722
1725
|
static get watchers() { return {
|
|
1723
1726
|
"isEngineReady": [{
|
|
@@ -19940,9 +19943,12 @@ class KritzelObjectMap {
|
|
|
19940
19943
|
// 1. The serialized state contains the old bounding box
|
|
19941
19944
|
// 2. The child objects have been reverted to their previous positions
|
|
19942
19945
|
// We need to invalidate the cache and recalculate dimensions
|
|
19946
|
+
// skipPersist=true prevents creating new undo entries
|
|
19943
19947
|
object.invalidateObjectsCache();
|
|
19944
|
-
object.refreshObjectDimensions();
|
|
19948
|
+
object.refreshObjectDimensions(undefined, true);
|
|
19945
19949
|
object.captureUnchangedSnapshots();
|
|
19950
|
+
// Update quadtree again with corrected dimensions
|
|
19951
|
+
this.quadtree.update(object);
|
|
19946
19952
|
});
|
|
19947
19953
|
// If regular objects were changed but their SelectionGroup wasn't explicitly updated,
|
|
19948
19954
|
// we still need to refresh that SelectionGroup's dimensions
|
|
@@ -19957,8 +19963,10 @@ class KritzelObjectMap {
|
|
|
19957
19963
|
const hasChangedChildren = selectionGroup.objectIds.some(id => changedObjectIds.has(id));
|
|
19958
19964
|
if (hasChangedChildren) {
|
|
19959
19965
|
selectionGroup.invalidateObjectsCache();
|
|
19960
|
-
selectionGroup.refreshObjectDimensions();
|
|
19966
|
+
selectionGroup.refreshObjectDimensions(undefined, true);
|
|
19961
19967
|
selectionGroup.captureUnchangedSnapshots();
|
|
19968
|
+
// Update quadtree with corrected dimensions
|
|
19969
|
+
this.quadtree.update(selectionGroup);
|
|
19962
19970
|
}
|
|
19963
19971
|
}
|
|
19964
19972
|
}
|
|
@@ -23076,7 +23084,7 @@ const KritzelIcon = class {
|
|
|
23076
23084
|
};
|
|
23077
23085
|
KritzelIcon.style = kritzelIconCss();
|
|
23078
23086
|
|
|
23079
|
-
const kritzelLineEndingsCss = () => `:host{display:flex;flex-direction:column;gap:12px;padding:0;box-sizing:border-box}.endings-section{display:flex;flex-direction:column;gap:6px}.section-label{font-size:12px;font-weight:500;color:var(--kritzel-line-endings-label-color, #666666);padding-left:4px}.endings-row{display:flex;align-items:center;gap:4px}.ending-option{display:flex;justify-content:center;align-items:center;width:48px;height:32px;border-radius:6px;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background:var(--kritzel-line-endings-option-background, #ffffff);padding:4px;transition:background-color 0.15s ease, border-color 0.15s ease}.ending-option:hover{background-color:var(--kritzel-line-endings-hover-background-color, #ebebeb)}.ending-option.selected{border-color:var(--kritzel-selection-border-color, #007AFF);background-color:var(--kritzel-line-endings-selected-background-color, #ebebeb)}.ending-option:focus{outline:none;box-shadow:0 0 0 2px var(--kritzel-focus-ring-color, rgba(0, 122, 255, 0.3))}.ending-icon{width:100%;height:100%}`;
|
|
23087
|
+
const kritzelLineEndingsCss = () => `:host{display:flex;flex-direction:column;gap:12px;padding:0;box-sizing:border-box}.endings-section{display:flex;flex-direction:column;gap:6px}.section-label{font-size:12px;font-weight:500;color:var(--kritzel-line-endings-label-color, #666666);padding-left:4px}.endings-row{display:flex;align-items:center;gap:4px}.ending-option{display:flex;justify-content:center;align-items:center;width:48px;height:32px;border-radius:6px;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background:var(--kritzel-line-endings-option-background, #ffffff);padding:4px;transition:background-color 0.15s ease, border-color 0.15s ease}.ending-option:hover{background-color:var(--kritzel-line-endings-hover-background-color, #ebebeb)}.ending-option.selected{border-color:var(--kritzel-selection-border-color, #007AFF);background-color:var(--kritzel-line-endings-selected-background-color, #ebebeb)}.ending-option:focus{outline:none;box-shadow:0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3))}.ending-icon{width:100%;height:100%}`;
|
|
23080
23088
|
|
|
23081
23089
|
const KritzelLineEndings = class {
|
|
23082
23090
|
constructor(hostRef) {
|
|
@@ -23274,7 +23282,7 @@ const KritzelMasterDetail = class {
|
|
|
23274
23282
|
};
|
|
23275
23283
|
KritzelMasterDetail.style = kritzelMasterDetailCss();
|
|
23276
23284
|
|
|
23277
|
-
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}:host:focus-visible{outline:auto}.has-open-child-overlay{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3}`;
|
|
23285
|
+
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}`;
|
|
23278
23286
|
|
|
23279
23287
|
const KritzelMenu = class {
|
|
23280
23288
|
constructor(hostRef) {
|
|
@@ -23342,7 +23350,7 @@ const KritzelMenu = class {
|
|
|
23342
23350
|
};
|
|
23343
23351
|
KritzelMenu.style = kritzelMenuCss();
|
|
23344
23352
|
|
|
23345
|
-
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)}: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) .edit-input::selection{background-color:var(--kritzel-menu-item-input-selection-color, rgba(255, 255, 255, 0.
|
|
23353
|
+
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) .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%}.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}`;
|
|
23346
23354
|
|
|
23347
23355
|
const KritzelMenuItem = class {
|
|
23348
23356
|
constructor(hostRef) {
|
|
@@ -23369,15 +23377,19 @@ const KritzelMenuItem = class {
|
|
|
23369
23377
|
isDirty = false;
|
|
23370
23378
|
inputRef;
|
|
23371
23379
|
focusInput() {
|
|
23372
|
-
if (this.item.isEditing &&
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23380
|
+
if (this.item.isEditing && !this.isDirty) {
|
|
23381
|
+
requestAnimationFrame(() => {
|
|
23382
|
+
if (this.inputRef) {
|
|
23383
|
+
this.inputRef.focus();
|
|
23384
|
+
if (defaultLineTool_config.KritzelDevicesHelper.isIOS()) {
|
|
23385
|
+
const length = this.inputRef.value.length;
|
|
23386
|
+
this.inputRef.setSelectionRange(length, length);
|
|
23387
|
+
}
|
|
23388
|
+
else {
|
|
23389
|
+
this.inputRef.select();
|
|
23390
|
+
}
|
|
23391
|
+
}
|
|
23392
|
+
});
|
|
23381
23393
|
}
|
|
23382
23394
|
}
|
|
23383
23395
|
componentDidLoad() {
|
|
@@ -23438,12 +23450,12 @@ const KritzelMenuItem = class {
|
|
|
23438
23450
|
];
|
|
23439
23451
|
}
|
|
23440
23452
|
render() {
|
|
23441
|
-
return (index.h(index.Host, { key: '
|
|
23453
|
+
return (index.h(index.Host, { key: '5b28ce1fb159d55269af71327bf6b6dfa9110359', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
23442
23454
|
'selected': this.item.isSelected,
|
|
23443
23455
|
'editing': this.item.isEditing,
|
|
23444
23456
|
'disabled': this.item.isDisabled,
|
|
23445
23457
|
'child-open': this.item.isChildMenuOpen,
|
|
23446
|
-
}, onClick: this.handleItemSelect }, index.h("div", { key: '
|
|
23458
|
+
}, onClick: this.handleItemSelect }, index.h("div", { key: 'd8f46ef40ec54898b3f611eac1af94cbc6015e98', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
23447
23459
|
}
|
|
23448
23460
|
static get watchers() { return {
|
|
23449
23461
|
"item": [{
|
|
@@ -23603,7 +23615,7 @@ const KritzelNumericInput = class {
|
|
|
23603
23615
|
};
|
|
23604
23616
|
KritzelNumericInput.style = kritzelNumericInputCss();
|
|
23605
23617
|
|
|
23606
|
-
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
|
|
23618
|
+
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))}`;
|
|
23607
23619
|
|
|
23608
23620
|
const KritzelOpacitySlider = class {
|
|
23609
23621
|
constructor(hostRef) {
|
|
@@ -23911,7 +23923,7 @@ const KritzelPortal = class {
|
|
|
23911
23923
|
* This file is auto-generated by the version bump scripts.
|
|
23912
23924
|
* Do not modify manually.
|
|
23913
23925
|
*/
|
|
23914
|
-
const KRITZEL_VERSION = '0.1.
|
|
23926
|
+
const KRITZEL_VERSION = '0.1.31';
|
|
23915
23927
|
|
|
23916
23928
|
const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:500;color:var(--kritzel-settings-label-color, #333333);margin:0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}`;
|
|
23917
23929
|
|
|
@@ -24014,7 +24026,7 @@ const KritzelSettings = class {
|
|
|
24014
24026
|
};
|
|
24015
24027
|
KritzelSettings.style = kritzelSettingsCss();
|
|
24016
24028
|
|
|
24017
|
-
const kritzelShapeFillCss = () => `:host{display:flex;flex-direction:column;gap:12px;padding:0;box-sizing:border-box}.fill-row{display:flex;align-items:center;gap:4px}.fill-option{display:flex;justify-content:center;align-items:center;width:48px;height:32px;border-radius:6px;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background:var(--kritzel-shape-fill-option-background, #ffffff);padding:4px;transition:background-color 0.15s ease, border-color 0.15s ease}.fill-option:hover{background-color:var(--kritzel-shape-fill-hover-background-color, #ebebeb)}.fill-option.selected{border-color:var(--kritzel-selection-border-color, #007AFF);background-color:var(--kritzel-shape-fill-selected-background-color, #ebebeb)}.fill-option:focus{outline:none;box-shadow:0 0 0 2px var(--kritzel-focus-ring-color, rgba(0, 122, 255, 0.3))}.fill-icon{width:100%;height:100%}`;
|
|
24029
|
+
const kritzelShapeFillCss = () => `:host{display:flex;flex-direction:column;gap:12px;padding:0;box-sizing:border-box}.fill-row{display:flex;align-items:center;gap:4px}.fill-option{display:flex;justify-content:center;align-items:center;width:48px;height:32px;border-radius:6px;cursor:var(--kritzel-global-pointer-cursor, pointer);border:2px solid transparent;box-sizing:border-box;background:var(--kritzel-shape-fill-option-background, #ffffff);padding:4px;transition:background-color 0.15s ease, border-color 0.15s ease}.fill-option:hover{background-color:var(--kritzel-shape-fill-hover-background-color, #ebebeb)}.fill-option.selected{border-color:var(--kritzel-selection-border-color, #007AFF);background-color:var(--kritzel-shape-fill-selected-background-color, #ebebeb)}.fill-option:focus{outline:none;box-shadow:0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3))}.fill-icon{width:100%;height:100%}`;
|
|
24018
24030
|
|
|
24019
24031
|
const KritzelShapeFill = class {
|
|
24020
24032
|
constructor(hostRef) {
|
|
@@ -24048,7 +24060,7 @@ const KritzelShapeFill = class {
|
|
|
24048
24060
|
};
|
|
24049
24061
|
KritzelShapeFill.style = kritzelShapeFillCss();
|
|
24050
24062
|
|
|
24051
|
-
const kritzelSlideToggleCss = () => `:host{display:inline-flex;align-items:center;cursor:var(--kritzel-global-pointer-cursor, pointer);outline:none;z-index:1;-webkit-tap-highlight-color:transparent}:host(:focus-visible) .toggle-track{box-shadow:0 0 0
|
|
24063
|
+
const kritzelSlideToggleCss = () => `:host{display:inline-flex;align-items:center;cursor:var(--kritzel-global-pointer-cursor, pointer);outline:none;z-index:1;-webkit-tap-highlight-color:transparent}:host(:focus-visible) .toggle-track{box-shadow:0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3))}:host(.disabled){opacity:0.5;pointer-events:none;cursor:default}.toggle-track{position:relative;width:var(--kritzel-slide-toggle-width, 40px);height:var(--kritzel-slide-toggle-height, 22px);background-color:var(--kritzel-slide-toggle-track-color, #ccc);border-radius:var(--kritzel-slide-toggle-border-radius, 11px);transition:background-color var(--kritzel-slide-toggle-transition-duration, 0.2s) ease}:host(.checked) .toggle-track{background-color:var(--kritzel-slide-toggle-track-checked-color, #007AFF)}.toggle-thumb{position:absolute;top:50%;left:2px;transform:translateY(-50%);width:var(--kritzel-slide-toggle-thumb-size, 18px);height:var(--kritzel-slide-toggle-thumb-size, 18px);background-color:var(--kritzel-slide-toggle-thumb-color, #fff);border-radius:50%;box-shadow:0 1px 3px rgba(0, 0, 0, 0.2);transition:left var(--kritzel-slide-toggle-transition-duration, 0.2s) ease}:host(.checked) .toggle-thumb{left:calc(var(--kritzel-slide-toggle-width, 40px) - var(--kritzel-slide-toggle-thumb-size, 18px) - 2px)}`;
|
|
24052
24064
|
|
|
24053
24065
|
const KritzelSlideToggle = class {
|
|
24054
24066
|
constructor(hostRef) {
|
|
@@ -308,8 +308,9 @@ export class KritzelSelectionGroup extends KritzelBaseObject {
|
|
|
308
308
|
/**
|
|
309
309
|
* Refreshes the selection group's bounding box dimensions based on contained objects.
|
|
310
310
|
* @param cachedObjects Optional pre-fetched objects array to avoid redundant getter calls
|
|
311
|
+
* @param skipPersist If true, only updates local state without persisting to Yjs (used during undo/redo)
|
|
311
312
|
*/
|
|
312
|
-
refreshObjectDimensions(cachedObjects) {
|
|
313
|
+
refreshObjectDimensions(cachedObjects, skipPersist = false) {
|
|
313
314
|
const children = cachedObjects ?? this.objects;
|
|
314
315
|
if (children.length === 1) {
|
|
315
316
|
const obj = children[0];
|
|
@@ -363,7 +364,9 @@ export class KritzelSelectionGroup extends KritzelBaseObject {
|
|
|
363
364
|
this.translateX = cx - (this.width / this.scale + 2 * this.padding) / 2;
|
|
364
365
|
this.translateY = cy - (this.height / this.scale + 2 * this.padding) / 2;
|
|
365
366
|
}
|
|
366
|
-
|
|
367
|
+
if (!skipPersist) {
|
|
368
|
+
this._core.store.state.objects.update(this);
|
|
369
|
+
}
|
|
367
370
|
}
|
|
368
371
|
getOffsetXToCenterFromSnapshot(snapshot) {
|
|
369
372
|
const objCenterX = snapshot.translateX + snapshot.totalWidth / snapshot.scale / 2;
|
|
@@ -166,9 +166,12 @@ export class KritzelObjectMap {
|
|
|
166
166
|
// 1. The serialized state contains the old bounding box
|
|
167
167
|
// 2. The child objects have been reverted to their previous positions
|
|
168
168
|
// We need to invalidate the cache and recalculate dimensions
|
|
169
|
+
// skipPersist=true prevents creating new undo entries
|
|
169
170
|
object.invalidateObjectsCache();
|
|
170
|
-
object.refreshObjectDimensions();
|
|
171
|
+
object.refreshObjectDimensions(undefined, true);
|
|
171
172
|
object.captureUnchangedSnapshots();
|
|
173
|
+
// Update quadtree again with corrected dimensions
|
|
174
|
+
this.quadtree.update(object);
|
|
172
175
|
});
|
|
173
176
|
// If regular objects were changed but their SelectionGroup wasn't explicitly updated,
|
|
174
177
|
// we still need to refresh that SelectionGroup's dimensions
|
|
@@ -183,8 +186,10 @@ export class KritzelObjectMap {
|
|
|
183
186
|
const hasChangedChildren = selectionGroup.objectIds.some(id => changedObjectIds.has(id));
|
|
184
187
|
if (hasChangedChildren) {
|
|
185
188
|
selectionGroup.invalidateObjectsCache();
|
|
186
|
-
selectionGroup.refreshObjectDimensions();
|
|
189
|
+
selectionGroup.refreshObjectDimensions(undefined, true);
|
|
187
190
|
selectionGroup.captureUnchangedSnapshots();
|
|
191
|
+
// Update quadtree with corrected dimensions
|
|
192
|
+
this.quadtree.update(selectionGroup);
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
195
|
}
|
|
@@ -316,6 +316,9 @@ export class KritzelEditor {
|
|
|
316
316
|
this.host.style.setProperty('--kritzel-editor-top-left-buttons-top', '14px');
|
|
317
317
|
this.host.style.setProperty('--kritzel-editor-top-left-buttons-left', '14px');
|
|
318
318
|
this.host.style.setProperty('--kritzel-editor-controls-bottom', '24px');
|
|
319
|
+
this.host.style.setProperty('--kritzel-editor-controls-transition', 'cubic-bezier(0.25, 0.1, 0.25, 1.0)');
|
|
320
|
+
this.host.style.setProperty('--kritzel-editor-controls-transform', 'translateY(200%)');
|
|
321
|
+
this.host.style.setProperty('--kritzel-editor-controls-transition-duration', '0.25s');
|
|
319
322
|
break;
|
|
320
323
|
default:
|
|
321
324
|
// Default for Windows/Linux
|
|
@@ -326,7 +329,7 @@ export class KritzelEditor {
|
|
|
326
329
|
}
|
|
327
330
|
}
|
|
328
331
|
render() {
|
|
329
|
-
return (h(Host, { key: '
|
|
332
|
+
return (h(Host, { key: '504b454589f58230a4b600c92c1b3d25dbf60d03' }, h("div", { key: '3aa0402736696e08a98cf2d432fb8c8a3c7e1733', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'de39b646dad1038691b915d7e108366f30402d32', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: '0481fc6b9da1b1b99f8f743cbe297cbc9a466fcb', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), h("kritzel-engine", { key: '32479175979f27df2bea0869f72c31e51a6a4ace', ref: el => (this.engineRef = el), workspace: this.activeWorkspace, syncConfig: this.syncConfig, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, theme: this.currentTheme, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onObjectsChange: event => this.handleObjectsChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event) }), h("kritzel-controls", { key: 'b385ec06dc2fc8a7322c2a2dcdbfeb1d6b55ba3f', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState, theme: this.currentTheme, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'd946d1a4bbec0ee40ca06d3ebde286b0ee6aedd8', class: "top-right-buttons" }, h("kritzel-settings", { key: '8dd98b1d9e69a94c2a6fd3d3aa44e37ff14ac195', ref: el => (this.settingsRef = el), onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '6e9bac15a07625fc4222aebe8f46ea06e92fd444', ref: el => (this.exportRef = el), onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg() }), h("kritzel-more-menu", { key: '3daeece622c5c6a65790159c438ed11649442666', onItemSelect: event => this.handleMoreMenuItemSelect(event) }))));
|
|
330
333
|
}
|
|
331
334
|
static get is() { return "kritzel-editor"; }
|
|
332
335
|
static get originalStyleUrls() {
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
|
|
41
41
|
:host(.selected) .edit-input {
|
|
42
42
|
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
43
|
+
caret-color: var(--kritzel-menu-item-input-caret-color-on-selected, #ffffff);
|
|
44
|
+
border-color: var(--kritzel-menu-item-input-border-color-on-selected, #ffffff);
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
:host(.selected) .action-button kritzel-icon {
|
|
@@ -51,7 +53,8 @@ kritzel-icon {
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
:host(.selected) .edit-input::selection {
|
|
54
|
-
background-color: var(--kritzel-menu-item-input-selection-color, rgba(255, 255, 255, 0.
|
|
56
|
+
background-color: var(--kritzel-menu-item-input-selection-color-on-selected, rgba(255, 255, 255, 0.3));
|
|
57
|
+
color: var(--kritzel-menu-item-input-selection-text-color-on-selected, #ffffff);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
:host(.editing) {
|
|
@@ -121,6 +124,10 @@ kritzel-icon {
|
|
|
121
124
|
color: inherit;
|
|
122
125
|
}
|
|
123
126
|
|
|
127
|
+
.edit-input {
|
|
128
|
+
caret-color: var(--kritzel-menu-item-input-caret-color, currentColor);
|
|
129
|
+
}
|
|
130
|
+
|
|
124
131
|
.edit-input::selection {
|
|
125
132
|
background-color: var(--kritzel-menu-item-input-selection-color, #007bff);
|
|
126
133
|
color: var(--kritzel-menu-item-input-selection-text-color, #ffffff);
|
|
@@ -17,15 +17,19 @@ export class KritzelMenuItem {
|
|
|
17
17
|
isDirty = false;
|
|
18
18
|
inputRef;
|
|
19
19
|
focusInput() {
|
|
20
|
-
if (this.item.isEditing &&
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
if (this.item.isEditing && !this.isDirty) {
|
|
21
|
+
requestAnimationFrame(() => {
|
|
22
|
+
if (this.inputRef) {
|
|
23
|
+
this.inputRef.focus();
|
|
24
|
+
if (KritzelDevicesHelper.isIOS()) {
|
|
25
|
+
const length = this.inputRef.value.length;
|
|
26
|
+
this.inputRef.setSelectionRange(length, length);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.inputRef.select();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
componentDidLoad() {
|
|
@@ -86,12 +90,12 @@ export class KritzelMenuItem {
|
|
|
86
90
|
];
|
|
87
91
|
}
|
|
88
92
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '5b28ce1fb159d55269af71327bf6b6dfa9110359', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
90
94
|
'selected': this.item.isSelected,
|
|
91
95
|
'editing': this.item.isEditing,
|
|
92
96
|
'disabled': this.item.isDisabled,
|
|
93
97
|
'child-open': this.item.isChildMenuOpen,
|
|
94
|
-
}, onClick: this.handleItemSelect }, h("div", { key: '
|
|
98
|
+
}, onClick: this.handleItemSelect }, h("div", { key: 'd8f46ef40ec54898b3f611eac1af94cbc6015e98', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
95
99
|
}
|
|
96
100
|
static get is() { return "kritzel-menu-item"; }
|
|
97
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.opacity-slider:focus::-webkit-slider-thumb {
|
|
80
|
-
box-shadow: 0 0 0
|
|
80
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.opacity-slider:focus::-moz-range-thumb {
|
|
84
|
-
box-shadow: 0 0 0
|
|
84
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
85
85
|
}
|