kritzel-stencil 0.0.123 → 0.0.125
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/{index-UcX3pzju.js → index-CgSgPOBv.js} +8 -11
- package/dist/cjs/index-CgSgPOBv.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-brush-style_18.cjs.entry.js +13 -14
- package/dist/cjs/kritzel-brush-style_18.cjs.entry.js.map +1 -1
- package/dist/collection/classes/handlers/hover.handler.js +0 -3
- package/dist/collection/classes/handlers/hover.handler.js.map +1 -1
- package/dist/collection/classes/objects/base-object.class.js.map +1 -1
- package/dist/collection/classes/objects/path.class.js +6 -4
- package/dist/collection/classes/objects/path.class.js.map +1 -1
- package/dist/collection/classes/objects/selection-group.class.js +0 -2
- package/dist/collection/classes/objects/selection-group.class.js.map +1 -1
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +12 -13
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-editor.js +3 -3
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/{p-Cnc43o9b.js → p-BJOf0PsO.js} +8 -6
- package/dist/components/p-BJOf0PsO.js.map +1 -0
- package/dist/components/{p-DJaVT2yR.js → p-BjG1zRRI.js} +15 -21
- package/dist/components/p-BjG1zRRI.js.map +1 -0
- package/dist/components/{p-CneTqrgt.js → p-CBCFr_x3.js} +3 -3
- package/dist/components/{p-CneTqrgt.js.map → p-CBCFr_x3.js.map} +1 -1
- package/dist/esm/{index-DO2IiM_o.js → index-B_0CRlFw.js} +8 -11
- package/dist/esm/index-B_0CRlFw.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-brush-style_18.entry.js +13 -14
- package/dist/esm/kritzel-brush-style_18.entry.js.map +1 -1
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-c64f6589.entry.js → p-3a2f1d19.entry.js} +2 -2
- package/dist/stencil/p-3a2f1d19.entry.js.map +1 -0
- package/dist/stencil/p-B_0CRlFw.js +2 -0
- package/dist/stencil/p-B_0CRlFw.js.map +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/objects/path.class.d.ts +1 -1
- package/package.json +62 -57
- package/dist/cjs/index-UcX3pzju.js.map +0 -1
- package/dist/components/p-Cnc43o9b.js.map +0 -1
- package/dist/components/p-DJaVT2yR.js.map +0 -1
- package/dist/esm/index-DO2IiM_o.js.map +0 -1
- package/dist/stencil/p-DO2IiM_o.js +0 -2
- package/dist/stencil/p-DO2IiM_o.js.map +0 -1
- package/dist/stencil/p-c64f6589.entry.js.map +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C05uAr89.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-CgSgPOBv.js');
|
|
5
5
|
|
|
6
6
|
const kritzelBrushStyleCss = ":host{display:flex;align-items:flex-start;gap:8px;padding:8px;box-sizing:border-box;width:100%}.brush-style-button{display:flex;justify-content:center;align-items:center;width:42px;height:32px;padding:0;border:none;outline:none;background:none;cursor:default;border-radius:0;color:var(--control-text-color);font-weight:bold;-webkit-tap-highlight-color:transparent}.font-style-button:not(:last-child){border-right:1px solid #333333}.font-style-button:hover{background-color:var(--control-hover-bg)}.font-style-button:active{background-color:var(--control-active-bg)}.font-style-button.selected,.font-style-button.selected:hover,.font-style-button.selected:active{background-color:var(--control-selected-bg);color:var(--control-selected-color)}";
|
|
7
7
|
|
|
@@ -1932,7 +1932,6 @@ const KritzelEngine = class {
|
|
|
1932
1932
|
this.store.setState('activeTool', index$1.KritzelToolRegistry.getTool('selection'));
|
|
1933
1933
|
this.store.deselectAllObjects();
|
|
1934
1934
|
this.store.selectObjects(objects);
|
|
1935
|
-
console.log('Selected objects:', objects);
|
|
1936
1935
|
}
|
|
1937
1936
|
async selectAllObjectsInViewport() {
|
|
1938
1937
|
var _a;
|
|
@@ -1977,15 +1976,15 @@ const KritzelEngine = class {
|
|
|
1977
1976
|
const baseHandleSizePx = computedStyle.getPropertyValue('--kritzel-selection-handle-size').trim() || '6px';
|
|
1978
1977
|
const baseHandleSize = parseFloat(baseHandleSizePx);
|
|
1979
1978
|
const baseHandleTouchSize = baseHandleSize * 2 < 14 ? 14 : baseHandleSize;
|
|
1980
|
-
return (index.h(index.Host, { key: '
|
|
1981
|
-
_a.translateX), index.h("div", { key: '
|
|
1982
|
-
_b.translateY), index.h("div", { key: '
|
|
1983
|
-
_c.viewportWidth), index.h("div", { key: '
|
|
1984
|
-
_d.viewportHeight), index.h("div", { key: '
|
|
1985
|
-
_e.scale), index.h("div", { key: '
|
|
1986
|
-
_g.name), index.h("div", { key: '
|
|
1987
|
-
_m.pointerX), index.h("div", { key: '
|
|
1988
|
-
_o.pointerY)), index.h("div", { key: '
|
|
1979
|
+
return (index.h(index.Host, { key: '61bfbd2fbd2a0fa54671b55372c0c78479bcbd42' }, index.h("div", { key: '51741a7ffe2143fd78ef0d47961c98007c9cb996', class: "debug-panel", style: { display: this.store.state.debugInfo.showViewportInfo ? 'block' : 'none' } }, index.h("div", { key: 'aa580caa079e7ccb619369136a05860d21e7cc53' }, "TranslateX: ", (_a = this.store.state) === null || _a === void 0 ? void 0 :
|
|
1980
|
+
_a.translateX), index.h("div", { key: '0a3ff31676954408050097cc1bbb34e71c10e157' }, "TranslateY: ", (_b = this.store.state) === null || _b === void 0 ? void 0 :
|
|
1981
|
+
_b.translateY), index.h("div", { key: '86a4db3532f05ea238b4fa8f84e0cf1d1cfce05e' }, "ViewportWidth: ", (_c = this.store.state) === null || _c === void 0 ? void 0 :
|
|
1982
|
+
_c.viewportWidth), index.h("div", { key: '775ef8217d65947e86e19b4b0d3f14b6ca0c0cc4' }, "ViewportHeight: ", (_d = this.store.state) === null || _d === void 0 ? void 0 :
|
|
1983
|
+
_d.viewportHeight), index.h("div", { key: '47bb465ff9bf4179dd0d0d3973af534663f72a79' }, "ObjectsInViewport. ", this.store.objects.length), index.h("div", { key: '4bc3129aa10b9d63ff5ff2eebafb5b98bc4349a5' }, "Scale: ", (_e = this.store.state) === null || _e === void 0 ? void 0 :
|
|
1984
|
+
_e.scale), index.h("div", { key: '2bda37d1f92525c73230cc5247b4ce8d4918b341' }, "ActiveTool: ", (_g = (_f = this.store.state) === null || _f === void 0 ? void 0 : _f.activeTool) === null || _g === void 0 ? void 0 :
|
|
1985
|
+
_g.name), index.h("div", { key: 'b94f3078b060223150dd26b2194ab0debd2b531b' }, "HasViewportChanged: ", ((_h = this.store.state) === null || _h === void 0 ? void 0 : _h.hasViewportChanged) ? 'true' : 'false'), index.h("div", { key: '2d17379ea2ab8c8494d5c51b51a5f1a5f253e5c3' }, "IsEnabled: ", ((_j = this.store.state) === null || _j === void 0 ? void 0 : _j.isEnabled) ? 'true' : 'false'), index.h("div", { key: '2dc852b4a8935da997c0ff46d34bebf0bddc33d8' }, "IsScaling: ", ((_k = this.store.state) === null || _k === void 0 ? void 0 : _k.isScaling) ? 'true' : 'false'), index.h("div", { key: '2af7e9330c379c9a9d962d91b07749e2442df0cf' }, "IsPanning: ", ((_l = this.store.state) === null || _l === void 0 ? void 0 : _l.isPanning) ? 'true' : 'false'), index.h("div", { key: '99466f5d289fdc00b9c0b8c21f0a74a491495c96' }, "IsFocused: ", this.store.state.isFocused ? 'true' : 'false'), index.h("div", { key: '98d95674cdc72f5b375b50d4ee8ac458d4af052d' }, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), index.h("div", { key: '9aa3cea7f3abd42fb627191678f733f7ae3be52d' }, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), index.h("div", { key: 'ce0f5842e763e68cb9a7912622dedef14c403867' }, "IsResizeHandleSelected: ", this.store.state.isResizeHandleSelected ? 'true' : 'false'), index.h("div", { key: '459ec8743e55a68dd933d1e005c742fb108b6c94' }, "IsRotationHandleSelected: ", this.store.state.isRotationHandleSelected ? 'true' : 'false'), index.h("div", { key: 'd12267e3924fbd066fa3ea851c3a88317bd5e78e' }, "IsDrawing: ", this.store.state.isDrawing ? 'true' : 'false'), index.h("div", { key: '9f6a79f1c5feb36fe636ea5db8f76405efcff620' }, "IsWriting: ", this.store.state.isWriting ? 'true' : 'false'), index.h("div", { key: '95a2c0ca71db420aedc87914dd1407a7d51e4ad9' }, "PointerX: ", (_m = this.store.state) === null || _m === void 0 ? void 0 :
|
|
1986
|
+
_m.pointerX), index.h("div", { key: '97eeaaa4152979c94086ccb4819622f08c126ba3' }, "PointerY: ", (_o = this.store.state) === null || _o === void 0 ? void 0 :
|
|
1987
|
+
_o.pointerY)), index.h("div", { key: '9c5ac0629d021a44a66fc6d42dec39ea0b8814a8', id: "origin", class: "origin", style: {
|
|
1989
1988
|
transform: `matrix(${(_p = this.store.state) === null || _p === void 0 ? void 0 : _p.scale}, 0, 0, ${(_q = this.store.state) === null || _q === void 0 ? void 0 : _q.scale}, ${(_r = this.store.state) === null || _r === void 0 ? void 0 : _r.translateX}, ${(_s = this.store.state) === null || _s === void 0 ? void 0 : _s.translateY})`,
|
|
1990
1989
|
} }, (_t = this.store.objects) === null || _t === void 0 ? void 0 :
|
|
1991
1990
|
_t.map(object => {
|
|
@@ -2088,7 +2087,7 @@ const KritzelEngine = class {
|
|
|
2088
2087
|
fill: 'transparent',
|
|
2089
2088
|
cursor: 'grab',
|
|
2090
2089
|
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), index.h("g", { style: { display: this.store.state.debugInfo.showObjectInfo ? 'block' : 'none', pointerEvents: 'none' } }, index.h("foreignObject", { x: object.totalWidth.toString(), y: "0", width: "400px", height: "160px", style: { minHeight: '0', minWidth: '0', display: object.isDebugInfoVisible ? 'block' : 'none' } }, index.h("div", { style: { width: '100%', height: '100%' } }, index.h("div", { style: { whiteSpace: 'nowrap' } }, "zIndex: ", object.zIndex), index.h("div", { style: { whiteSpace: 'nowrap' } }, "translateX: ", object.translateX), index.h("div", { style: { whiteSpace: 'nowrap' } }, "translateY: ", object.translateY), index.h("div", { style: { whiteSpace: 'nowrap' } }, "width: ", object.width), index.h("div", { style: { whiteSpace: 'nowrap' } }, "height: ", object.height), index.h("div", { style: { whiteSpace: 'nowrap' } }, "scale: ", object.scale), index.h("div", { style: { whiteSpace: 'nowrap' } }, "rotation: ", object.rotation), index.h("div", { style: { whiteSpace: 'nowrap' } }, "x: ", object.x), index.h("div", { style: { whiteSpace: 'nowrap' } }, "y: ", object.y)))))));
|
|
2091
|
-
}), index.h("svg", { key: '
|
|
2090
|
+
}), index.h("svg", { key: '95ad9e12faccc0fbb3af7871b2a4acb383ff8d1c', class: "object", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
2092
2091
|
height: (_u = this.store.state.currentPath) === null || _u === void 0 ? void 0 : _u.height.toString(),
|
|
2093
2092
|
width: (_v = this.store.state.currentPath) === null || _v === void 0 ? void 0 : _v.width.toString(),
|
|
2094
2093
|
left: '0',
|
|
@@ -2098,7 +2097,7 @@ const KritzelEngine = class {
|
|
|
2098
2097
|
transform: (_x = this.store.state.currentPath) === null || _x === void 0 ? void 0 : _x.transformationMatrix,
|
|
2099
2098
|
transformOrigin: 'top left',
|
|
2100
2099
|
overflow: 'visible',
|
|
2101
|
-
}, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, index.h("path", { key: '
|
|
2100
|
+
}, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, index.h("path", { key: '94a8e02708fdb85a298d96dbce880dcd2f933c0c', d: (_z = this.store.state.currentPath) === null || _z === void 0 ? void 0 : _z.d, fill: (_0 = this.store.state.currentPath) === null || _0 === void 0 ? void 0 : _0.fill, stroke: (_1 = this.store.state.currentPath) === null || _1 === void 0 ? void 0 : _1.stroke }))), this.store.state.isContextMenuVisible && (index.h("kritzel-context-menu", { key: '127e0f7b1d69243cdb5f41473755e16e3d93a2f3', class: "context-menu", ref: el => (this.contextMenuElement = el), items: this.store.state.contextMenuItems, objects: ((_2 = this.store.state.selectionGroup) === null || _2 === void 0 ? void 0 : _2.objects) || [], style: {
|
|
2102
2101
|
position: 'fixed',
|
|
2103
2102
|
left: `${this.store.state.contextMenuX}px`,
|
|
2104
2103
|
top: `${this.store.state.contextMenuY}px`,
|
|
@@ -2110,7 +2109,7 @@ const KritzelEngine = class {
|
|
|
2110
2109
|
y: (-this.store.state.translateY + this.store.state.contextMenuY) / this.store.state.scale,
|
|
2111
2110
|
}, (_a = this.store.state.selectionGroup) === null || _a === void 0 ? void 0 : _a.objects);
|
|
2112
2111
|
this.hideContextMenu();
|
|
2113
|
-
} })), ((_3 = this.store.state) === null || _3 === void 0 ? void 0 : _3.activeTool) instanceof index$1.KritzelEraserTool && !this.store.state.isScaling && index.h("kritzel-cursor-trail", { key: '
|
|
2112
|
+
} })), ((_3 = this.store.state) === null || _3 === void 0 ? void 0 : _3.activeTool) instanceof index$1.KritzelEraserTool && !this.store.state.isScaling && index.h("kritzel-cursor-trail", { key: 'c999cf8982b522f0a00b853141171c6726666390', store: this.store })));
|
|
2114
2113
|
}
|
|
2115
2114
|
get host() { return index.getElement(this); }
|
|
2116
2115
|
static get watchers() { return {
|