kritzel-stencil 0.1.21 → 0.1.23
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-Bva9deYM.js → default-line-tool.config-Ba74O1gD.js} +31 -9
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-back-to-content_32.cjs.entry.js +127 -114
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.cjs.js +1 -1
- package/dist/collection/classes/objects/shape.class.js +9 -3
- package/dist/collection/classes/objects/text.class.js +19 -3
- package/dist/collection/classes/tools/text-tool.class.js +3 -3
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +20 -34
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +171 -15
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +29 -72
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.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-settings.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/p-0YNMEgri.js +1 -0
- package/dist/components/p-B1qfRBi0.js +1 -0
- package/dist/components/{p-Dmy0R-7y.js → p-DAPeFBqC.js} +1 -1
- package/dist/components/{p-CYX7RMRZ.js → p-DYAnRoi2.js} +1 -1
- package/dist/components/{p-BsvZ2juR.js → p-IGA64WxD.js} +1 -1
- package/dist/components/{p-BbHELXEC.js → p-mPdux0tA.js} +2 -2
- package/dist/esm/{default-line-tool.config-DDIFE6oX.js → default-line-tool.config-BW07ZETV.js} +31 -9
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-back-to-content_32.entry.js +127 -114
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil.js +1 -1
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-55409078.entry.js +9 -0
- package/dist/stencil/p-BW07ZETV.js +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/components/shared/kritzel-tooltip/kritzel-tooltip.d.ts +11 -1
- package/dist/types/components/ui/kritzel-controls/kritzel-controls.d.ts +3 -11
- package/dist/types/components.d.ts +7 -0
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-BNT9uvII.js +0 -1
- package/dist/components/p-DqtvAhfs.js +0 -1
- package/dist/stencil/p-3fc743ee.entry.js +0 -9
- package/dist/stencil/p-DDIFE6oX.js +0 -1
package/dist/cjs/{default-line-tool.config-Bva9deYM.js → default-line-tool.config-Ba74O1gD.js}
RENAMED
|
@@ -14969,7 +14969,7 @@ class KritzelText extends KritzelBaseObject {
|
|
|
14969
14969
|
focus(coords) {
|
|
14970
14970
|
if (this.editor) {
|
|
14971
14971
|
const doc = this.editor.state.doc;
|
|
14972
|
-
if (coords.x && coords.y) {
|
|
14972
|
+
if (coords.x && coords.y && !this.isEmpty) {
|
|
14973
14973
|
const pos = this.editor.posAtCoords({ left: coords.x, top: coords.y });
|
|
14974
14974
|
if (pos) {
|
|
14975
14975
|
this.editor.dispatch(this.editor.state.tr.setSelection(TextSelection.create(doc, pos.pos)));
|
|
@@ -15030,13 +15030,29 @@ class KritzelText extends KritzelBaseObject {
|
|
|
15030
15030
|
if (!this.isEditing) {
|
|
15031
15031
|
return;
|
|
15032
15032
|
}
|
|
15033
|
-
|
|
15033
|
+
// Only stop propagation if the engine is not tracking this pointer.
|
|
15034
|
+
// During text creation, the engine adds the pointer before the text element
|
|
15035
|
+
// is in the DOM. We must let move events propagate so the engine can
|
|
15036
|
+
// update its pointer state.
|
|
15037
|
+
if (!this._core.store.state.pointers.has(event.pointerId)) {
|
|
15038
|
+
event.stopPropagation();
|
|
15039
|
+
}
|
|
15034
15040
|
}
|
|
15035
15041
|
handlePointerUp(event) {
|
|
15036
15042
|
if (!this.isEditing) {
|
|
15037
15043
|
return;
|
|
15038
15044
|
}
|
|
15039
|
-
|
|
15045
|
+
// Only stop propagation if the engine is not tracking this pointer.
|
|
15046
|
+
// When a text is created during pointerdown, the engine adds the pointer
|
|
15047
|
+
// to its map before the text element exists in the DOM. By the time
|
|
15048
|
+
// pointerup fires, the text element may intercept the event (especially
|
|
15049
|
+
// on iOS where pointer capture may not redirect events in shadow DOM).
|
|
15050
|
+
// We must let the event propagate so the engine can clean up the pointer.
|
|
15051
|
+
// Without this, stale pointers accumulate and single-finger touches
|
|
15052
|
+
// get misinterpreted as two-finger zoom gestures.
|
|
15053
|
+
if (!this._core.store.state.pointers.has(event.pointerId)) {
|
|
15054
|
+
event.stopPropagation();
|
|
15055
|
+
}
|
|
15040
15056
|
}
|
|
15041
15057
|
copy() {
|
|
15042
15058
|
const copiedObject = super.copy();
|
|
@@ -17573,10 +17589,10 @@ class KritzelTextTool extends KritzelBaseTool {
|
|
|
17573
17589
|
}
|
|
17574
17590
|
}
|
|
17575
17591
|
handlePointerUp(event) {
|
|
17576
|
-
|
|
17577
|
-
|
|
17592
|
+
const activeText = this._core.store.activeText;
|
|
17593
|
+
if (activeText && activeText.isMounted && !activeText.editor?.hasFocus()) {
|
|
17594
|
+
activeText.focus({ x: event.clientX, y: event.clientY });
|
|
17578
17595
|
}
|
|
17579
|
-
this._core.store.activeText?.edit(event);
|
|
17580
17596
|
}
|
|
17581
17597
|
}
|
|
17582
17598
|
|
|
@@ -19161,19 +19177,25 @@ class KritzelShape extends KritzelBaseObject {
|
|
|
19161
19177
|
if (!this.isEditing) {
|
|
19162
19178
|
return;
|
|
19163
19179
|
}
|
|
19164
|
-
event.
|
|
19180
|
+
if (!this._core.store.state.pointers.has(event.pointerId)) {
|
|
19181
|
+
event.stopPropagation();
|
|
19182
|
+
}
|
|
19165
19183
|
}
|
|
19166
19184
|
handlePointerMove(event) {
|
|
19167
19185
|
if (!this.isEditing) {
|
|
19168
19186
|
return;
|
|
19169
19187
|
}
|
|
19170
|
-
event.
|
|
19188
|
+
if (!this._core.store.state.pointers.has(event.pointerId)) {
|
|
19189
|
+
event.stopPropagation();
|
|
19190
|
+
}
|
|
19171
19191
|
}
|
|
19172
19192
|
handlePointerUp(event) {
|
|
19173
19193
|
if (!this.isEditing) {
|
|
19174
19194
|
return;
|
|
19175
19195
|
}
|
|
19176
|
-
event.
|
|
19196
|
+
if (!this._core.store.state.pointers.has(event.pointerId)) {
|
|
19197
|
+
event.stopPropagation();
|
|
19198
|
+
}
|
|
19177
19199
|
}
|
|
19178
19200
|
copy() {
|
|
19179
19201
|
const copiedObject = super.copy();
|
package/dist/cjs/index.cjs.js
CHANGED