kritzel-stencil 0.0.112 → 0.0.113

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.
Files changed (25) hide show
  1. package/dist/cjs/kritzel-brush-style_18.cjs.entry.js +12 -10
  2. package/dist/cjs/kritzel-brush-style_18.cjs.entry.js.map +1 -1
  3. package/dist/collection/classes/handlers/key.handler.js +4 -1
  4. package/dist/collection/classes/handlers/key.handler.js.map +1 -1
  5. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +4 -4
  6. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js.map +1 -1
  7. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +4 -5
  8. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js.map +1 -1
  9. package/dist/components/kritzel-controls.js +1 -1
  10. package/dist/components/kritzel-editor.js +6 -6
  11. package/dist/components/kritzel-editor.js.map +1 -1
  12. package/dist/components/kritzel-engine.js +1 -1
  13. package/dist/components/{p-BnsTGnvc.js → p-CFwf2KYj.js} +6 -7
  14. package/dist/components/p-CFwf2KYj.js.map +1 -0
  15. package/dist/components/{p--2WHhuBI.js → p-DieKGjdj.js} +6 -3
  16. package/dist/components/{p--2WHhuBI.js.map → p-DieKGjdj.js.map} +1 -1
  17. package/dist/esm/kritzel-brush-style_18.entry.js +12 -10
  18. package/dist/esm/kritzel-brush-style_18.entry.js.map +1 -1
  19. package/dist/stencil/{p-65e86254.entry.js → p-dc26eb80.entry.js} +2 -2
  20. package/dist/stencil/p-dc26eb80.entry.js.map +1 -0
  21. package/dist/stencil/stencil.esm.js +1 -1
  22. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +1 -1
  23. package/package.json +1 -1
  24. package/dist/components/p-BnsTGnvc.js.map +0 -1
  25. package/dist/stencil/p-65e86254.entry.js.map +0 -1
@@ -1144,10 +1144,9 @@ const KritzelControls = class {
1144
1144
  this.kritzelEngine.enable();
1145
1145
  }
1146
1146
  async closeTooltip() {
1147
- var _a, _b;
1147
+ var _a;
1148
1148
  this.tooltipVisible = false;
1149
1149
  (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.enable();
1150
- (_b = this.kritzelEngine) === null || _b === void 0 ? void 0 : _b.setFocus();
1151
1150
  }
1152
1151
  get activeToolAsTextTool() {
1153
1152
  var _a;
@@ -1208,13 +1207,13 @@ const KritzelControls = class {
1208
1207
  render() {
1209
1208
  var _a, _b;
1210
1209
  const hasNoConfig = ((_a = this.activeControl) === null || _a === void 0 ? void 0 : _a.config) === undefined || ((_b = this.activeControl) === null || _b === void 0 ? void 0 : _b.config) === null;
1211
- return (h(Host, { key: 'b0ed601253a0f6187e601afd2fb56bdbc7d5a9cd', class: {
1210
+ return (h(Host, { key: 'c20b7cbc7228f1b13a7e17f7ea94c96151e11608', class: {
1212
1211
  mobile: this.isTouchDevice,
1213
- } }, h("kritzel-utility-panel", { key: 'a8621ccdc3186a3f6ac6d9b5aa9ee6d92401e5d9', style: {
1212
+ } }, h("kritzel-utility-panel", { key: '0e56c27c57d5cd7302ec80f6809fe4673afddae5', style: {
1214
1213
  position: 'absolute',
1215
1214
  bottom: '56px',
1216
1215
  left: '12px',
1217
- }, onUndo: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.undo(); }, onRedo: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.redo(); }, onDelete: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.delete(); } }), h("div", { key: 'ade9f5ee7b854eac1d4497c4f3e5e3cd6a2f1f7f', class: "kritzel-controls" }, this.controls.map(control => {
1216
+ }, onUndo: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.undo(); }, onRedo: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.redo(); }, onDelete: () => { var _a; return (_a = this.kritzelEngine) === null || _a === void 0 ? void 0 : _a.delete(); } }), h("div", { key: '6454509e3c524a42345e383270e3c1220f87dab6', class: "kritzel-controls" }, this.controls.map(control => {
1218
1217
  var _a, _b, _c, _d, _e, _f, _g, _h;
1219
1218
  if (control.type === 'tool') {
1220
1219
  return (h("button", { class: {
@@ -2930,10 +2929,10 @@ const KritzelEditor = class {
2930
2929
  event.preventDefault();
2931
2930
  }
2932
2931
  }
2933
- handleKeyDown(ev) {
2932
+ handleKeyDown(event) {
2934
2933
  var _a;
2935
- ev.preventDefault();
2936
- if (ev.key === 'Escape') {
2934
+ if (event.key === 'Escape') {
2935
+ event.preventDefault();
2937
2936
  (_a = this.controlsRef) === null || _a === void 0 ? void 0 : _a.closeTooltip();
2938
2937
  }
2939
2938
  }
@@ -2946,7 +2945,7 @@ const KritzelEditor = class {
2946
2945
  }
2947
2946
  }
2948
2947
  render() {
2949
- return (h(Host, { key: 'b861ac259f78cf3a4a7070ce2e54a731414a8c08' }, h("kritzel-engine", { key: '026f2caba18bce0b0453b904616d9baa455592d9', ref: el => (this.engineRef = el) }), h("kritzel-controls", { key: 'afc78be61bfddeafd3650f7a383ad4a1847fa3b5', ref: el => (this.controlsRef = el), controls: this.controls, style: this.hideControls ? { display: 'none' } : { display: 'flex' } })));
2948
+ return (h(Host, { key: '009fe43f85f368b2f60b31947596e1423f60e28d' }, h("kritzel-engine", { key: '76fa90e8c283723d546d02ab4eacc111047d6b9d', ref: el => (this.engineRef = el) }), h("kritzel-controls", { key: 'a7381534ab01236d12135f7a9f1a486c9b4be05a', ref: el => (this.controlsRef = el), controls: this.controls, style: this.hideControls ? { display: 'none' } : { display: 'flex' } })));
2950
2949
  }
2951
2950
  get host() { return getElement(this); }
2952
2951
  };
@@ -3664,10 +3663,13 @@ class KritzelKeyHandler extends KritzelBaseHandler {
3664
3663
  }
3665
3664
  handleKeyDown(event) {
3666
3665
  if (this._store.state.isFocused === false) {
3666
+ event.preventDefault();
3667
3667
  return;
3668
3668
  }
3669
- event.preventDefault();
3670
3669
  this._store.state.isCtrlKeyPressed = event.ctrlKey;
3670
+ if (this._store.state.isCtrlKeyPressed) {
3671
+ event.preventDefault();
3672
+ }
3671
3673
  if (event.key === 'Escape' && this._store.state.selectionGroup) {
3672
3674
  this._store.clearSelection();
3673
3675
  }