kritzel-stencil 0.0.119 → 0.0.120

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 (167) hide show
  1. package/dist/cjs/{index-CXT94beA.js → index-BcrLbdO1.js} +50 -10
  2. package/dist/cjs/index-BcrLbdO1.js.map +1 -0
  3. package/dist/cjs/index-BjLSiQIM.js +2342 -0
  4. package/dist/cjs/index-BjLSiQIM.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +8 -1
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/kritzel-brush-style_18.cjs.entry.js +362 -1743
  8. package/dist/cjs/kritzel-brush-style_18.cjs.entry.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/stencil.cjs.js +3 -3
  11. package/dist/cjs/stencil.cjs.js.map +1 -1
  12. package/dist/collection/classes/commands/add-selection-group.command.js +2 -0
  13. package/dist/collection/classes/commands/add-selection-group.command.js.map +1 -1
  14. package/dist/collection/classes/objects/base-object.class.js +4 -0
  15. package/dist/collection/classes/objects/base-object.class.js.map +1 -1
  16. package/dist/collection/classes/objects/image.class.js +23 -2
  17. package/dist/collection/classes/objects/image.class.js.map +1 -1
  18. package/dist/collection/classes/objects/path.class.js +15 -5
  19. package/dist/collection/classes/objects/path.class.js.map +1 -1
  20. package/dist/collection/classes/objects/text.class.js +2 -1
  21. package/dist/collection/classes/objects/text.class.js.map +1 -1
  22. package/dist/collection/classes/store.class.js +2 -13
  23. package/dist/collection/classes/store.class.js.map +1 -1
  24. package/dist/collection/classes/tools/image-tool.class.js +6 -23
  25. package/dist/collection/classes/tools/image-tool.class.js.map +1 -1
  26. package/dist/collection/classes/tools/selection-tool.class.js +4 -13
  27. package/dist/collection/classes/tools/selection-tool.class.js.map +1 -1
  28. package/dist/collection/classes/viewport.class.js.map +1 -1
  29. package/dist/collection/collection-manifest.json +1 -1
  30. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +217 -13
  31. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js.map +1 -1
  32. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +158 -68
  33. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js.map +1 -1
  34. package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js +104 -4
  35. package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js.map +1 -1
  36. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +30 -9
  37. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js.map +1 -1
  38. package/dist/collection/configs/default-brush-tool.config.js +60 -0
  39. package/dist/collection/configs/default-brush-tool.config.js.map +1 -0
  40. package/dist/collection/configs/default-engine-state.js +6 -2
  41. package/dist/collection/configs/default-engine-state.js.map +1 -1
  42. package/dist/collection/configs/default-text-tool.config.js +32 -0
  43. package/dist/collection/configs/default-text-tool.config.js.map +1 -0
  44. package/dist/collection/constants/engine.constants.js +3 -0
  45. package/dist/collection/constants/engine.constants.js.map +1 -0
  46. package/dist/collection/index.js +8 -0
  47. package/dist/collection/index.js.map +1 -1
  48. package/dist/collection/interfaces/context-menu-item.interface.js.map +1 -1
  49. package/dist/collection/interfaces/engine-state.interface.js.map +1 -1
  50. package/dist/collection/interfaces/object.interface.js.map +1 -1
  51. package/dist/components/index.js +4 -4
  52. package/dist/components/kritzel-brush-style.js +1 -1
  53. package/dist/components/kritzel-color-palette.js +1 -1
  54. package/dist/components/kritzel-color.js +1 -1
  55. package/dist/components/kritzel-context-menu.js +1 -1
  56. package/dist/components/kritzel-control-brush-config.js +1 -1
  57. package/dist/components/kritzel-control-text-config.js +1 -1
  58. package/dist/components/kritzel-controls.js +1 -1
  59. package/dist/components/kritzel-cursor-trail.js +1 -1
  60. package/dist/components/kritzel-dropdown.js +1 -1
  61. package/dist/components/kritzel-editor.js +110 -68
  62. package/dist/components/kritzel-editor.js.map +1 -1
  63. package/dist/components/kritzel-engine.js +1 -1
  64. package/dist/components/kritzel-font-family.js +1 -1
  65. package/dist/components/kritzel-font-size.js +1 -1
  66. package/dist/components/kritzel-font.js +1 -1
  67. package/dist/components/kritzel-icon.js +1 -1
  68. package/dist/components/kritzel-stroke-size.js +1 -1
  69. package/dist/components/kritzel-tooltip.js +1 -1
  70. package/dist/components/kritzel-utility-panel.js +1 -1
  71. package/dist/components/{p-CtNzxQ7T.js → p--2FkikYE.js} +4 -4
  72. package/dist/components/{p-CtNzxQ7T.js.map → p--2FkikYE.js.map} +1 -1
  73. package/dist/components/{p-LIijWPsT.js → p--tElassI.js} +4 -4
  74. package/dist/components/{p-LIijWPsT.js.map → p--tElassI.js.map} +1 -1
  75. package/dist/components/{p-C6kzcN4b.js → p-B2wWYPH8.js} +4 -4
  76. package/dist/components/{p-C6kzcN4b.js.map → p-B2wWYPH8.js.map} +1 -1
  77. package/dist/components/{p-93b-eQ0s.js → p-BAMl2Ww6.js} +29 -27
  78. package/dist/components/p-BAMl2Ww6.js.map +1 -0
  79. package/dist/components/{p-B8nuvSxt.js → p-BSS4UREq.js} +10 -10
  80. package/dist/components/{p-B8nuvSxt.js.map → p-BSS4UREq.js.map} +1 -1
  81. package/dist/components/{p-JQA2FRVr.js → p-C3E9PtD3.js} +11 -11
  82. package/dist/components/{p-JQA2FRVr.js.map → p-C3E9PtD3.js.map} +1 -1
  83. package/dist/components/{p-B57pFHwJ.js → p-CDpq9L_H.js} +4 -4
  84. package/dist/components/{p-B57pFHwJ.js.map → p-CDpq9L_H.js.map} +1 -1
  85. package/dist/components/p-CEYRFk55.js +119 -0
  86. package/dist/components/p-CEYRFk55.js.map +1 -0
  87. package/dist/components/{p-BV9-NuyD.js → p-CIb4IA9u.js} +6 -6
  88. package/dist/components/{p-BV9-NuyD.js.map → p-CIb4IA9u.js.map} +1 -1
  89. package/dist/components/{p-eBBOf568.js → p-CqPrOhzi.js} +5 -5
  90. package/dist/components/{p-eBBOf568.js.map → p-CqPrOhzi.js.map} +1 -1
  91. package/dist/components/{p-CaQ7Iei7.js → p-CxmkJbeV.js} +4 -4
  92. package/dist/components/{p-CaQ7Iei7.js.map → p-CxmkJbeV.js.map} +1 -1
  93. package/dist/components/{p-yBnfPxIa.js → p-D-Rf05Ov.js} +5 -5
  94. package/dist/components/{p-yBnfPxIa.js.map → p-D-Rf05Ov.js.map} +1 -1
  95. package/dist/components/{p-CSSrNLad.js → p-D0L3GqSK.js} +4 -4
  96. package/dist/components/{p-CSSrNLad.js.map → p-D0L3GqSK.js.map} +1 -1
  97. package/dist/components/{p-fmNiA3Yr.js → p-D1oFXBAp.js} +5 -5
  98. package/dist/components/{p-fmNiA3Yr.js.map → p-D1oFXBAp.js.map} +1 -1
  99. package/dist/components/{p-DRuQsvUx.js → p-DC3j4P1n.js} +23 -8
  100. package/dist/components/p-DC3j4P1n.js.map +1 -0
  101. package/dist/components/{p-D04aTZsR.js → p-DbPbyRLO.js} +5 -5
  102. package/dist/components/{p-D04aTZsR.js.map → p-DbPbyRLO.js.map} +1 -1
  103. package/dist/components/{p-DoQOtXjT.js → p-dCaxwGmu.js} +44 -9
  104. package/dist/components/p-dCaxwGmu.js.map +1 -0
  105. package/dist/components/{p-DuWb7MaD.js → p-eS30Bqrc.js} +136 -125
  106. package/dist/components/p-eS30Bqrc.js.map +1 -0
  107. package/dist/components/{p-BBIuV3j1.js → p-gDLg_PJJ.js} +5 -5
  108. package/dist/components/{p-BBIuV3j1.js.map → p-gDLg_PJJ.js.map} +1 -1
  109. package/dist/esm/{index-CGHvfMWF.js → index-BPFXWTBp.js} +50 -10
  110. package/dist/esm/index-BPFXWTBp.js.map +1 -0
  111. package/dist/esm/index-DsUDklEm.js +2318 -0
  112. package/dist/esm/index-DsUDklEm.js.map +1 -0
  113. package/dist/esm/index.js +1 -1
  114. package/dist/esm/kritzel-brush-style_18.entry.js +332 -1713
  115. package/dist/esm/kritzel-brush-style_18.entry.js.map +1 -1
  116. package/dist/esm/loader.js +3 -3
  117. package/dist/esm/stencil.js +4 -4
  118. package/dist/esm/stencil.js.map +1 -1
  119. package/dist/stencil/index.esm.js +1 -1
  120. package/dist/stencil/p-0ae72b0d.entry.js +2 -0
  121. package/dist/stencil/p-0ae72b0d.entry.js.map +1 -0
  122. package/dist/stencil/p-BPFXWTBp.js +3 -0
  123. package/dist/stencil/p-BPFXWTBp.js.map +1 -0
  124. package/dist/stencil/p-DsUDklEm.js +2 -0
  125. package/dist/stencil/p-DsUDklEm.js.map +1 -0
  126. package/dist/stencil/stencil.esm.js +1 -1
  127. package/dist/stencil/stencil.esm.js.map +1 -1
  128. package/dist/types/classes/objects/base-object.class.d.ts +3 -1
  129. package/dist/types/classes/objects/image.class.d.ts +8 -0
  130. package/dist/types/classes/objects/path.class.d.ts +9 -0
  131. package/dist/types/classes/objects/text.class.d.ts +2 -1
  132. package/dist/types/classes/store.class.d.ts +1 -1
  133. package/dist/types/classes/tools/image-tool.class.d.ts +0 -4
  134. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +9 -3
  135. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +12 -4
  136. package/dist/types/components/ui/kritzel-context-menu/kritzel-context-menu.d.ts +8 -0
  137. package/dist/types/components/ui/kritzel-controls/kritzel-controls.d.ts +2 -1
  138. package/dist/types/components.d.ts +77 -22
  139. package/dist/types/configs/default-brush-tool.config.d.ts +2 -0
  140. package/dist/types/configs/default-text-tool.config.d.ts +2 -0
  141. package/dist/types/constants/engine.constants.d.ts +2 -0
  142. package/dist/types/index.d.ts +8 -0
  143. package/dist/types/interfaces/context-menu-item.interface.d.ts +13 -2
  144. package/dist/types/interfaces/engine-state.interface.d.ts +4 -0
  145. package/dist/types/interfaces/object.interface.d.ts +2 -0
  146. package/package.json +1 -1
  147. package/dist/cjs/index-CXT94beA.js.map +0 -1
  148. package/dist/cjs/index-aaWestcD.js +0 -827
  149. package/dist/cjs/index-aaWestcD.js.map +0 -1
  150. package/dist/collection/configs/default-toolbar-controls.js +0 -139
  151. package/dist/collection/configs/default-toolbar-controls.js.map +0 -1
  152. package/dist/components/p-93b-eQ0s.js.map +0 -1
  153. package/dist/components/p-CYnE3twZ.js +0 -49
  154. package/dist/components/p-CYnE3twZ.js.map +0 -1
  155. package/dist/components/p-DRuQsvUx.js.map +0 -1
  156. package/dist/components/p-DoQOtXjT.js.map +0 -1
  157. package/dist/components/p-DuWb7MaD.js.map +0 -1
  158. package/dist/esm/index-CGHvfMWF.js.map +0 -1
  159. package/dist/esm/index-Dn7aP72S.js +0 -814
  160. package/dist/esm/index-Dn7aP72S.js.map +0 -1
  161. package/dist/stencil/p-6c35ba88.entry.js +0 -2
  162. package/dist/stencil/p-6c35ba88.entry.js.map +0 -1
  163. package/dist/stencil/p-CGHvfMWF.js +0 -3
  164. package/dist/stencil/p-CGHvfMWF.js.map +0 -1
  165. package/dist/stencil/p-Dn7aP72S.js +0 -2
  166. package/dist/stencil/p-Dn7aP72S.js.map +0 -1
  167. package/dist/types/configs/default-toolbar-controls.d.ts +0 -4
@@ -1,16 +1,25 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DoQOtXjT.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-dCaxwGmu.js';
2
2
  import { K as KritzelMouseButton } from './p-D8W6LE-c.js';
3
- import { d as KritzelBaseObject, e as KritzelBaseCommand, f as KritzelBaseTool, g as KritzelEventHelper, c as KritzelTextTool, b as KritzelBrushTool, K as KritzelText, a as KritzelPath, O as ObjectHelper, A as AddObjectCommand, h as KritzelToolRegistry, i as KritzelKeyboardHelper } from './p-DRuQsvUx.js';
4
- import { K as KritzelContextMenu, d as defineCustomElement$3 } from './p-CYnE3twZ.js';
5
- import { d as defineCustomElement$2 } from './p-CSSrNLad.js';
6
- import { d as defineCustomElement$1 } from './p-C6kzcN4b.js';
3
+ import { d as KritzelBaseObject, e as KritzelBaseCommand, f as KritzelBaseTool, g as KritzelEventHelper, c as KritzelTextTool, b as KritzelBrushTool, K as KritzelText, a as KritzelPath, O as ObjectHelper, A as AddObjectCommand, h as KritzelToolRegistry, i as KritzelKeyboardHelper } from './p-DC3j4P1n.js';
4
+ import { K as KritzelContextMenu, d as defineCustomElement$3 } from './p-CEYRFk55.js';
5
+ import { d as defineCustomElement$2 } from './p-D0L3GqSK.js';
6
+ import { d as defineCustomElement$1 } from './p-B2wWYPH8.js';
7
7
 
8
8
  class KritzelImage extends KritzelBaseObject {
9
- constructor() {
10
- super(...arguments);
9
+ constructor(config) {
10
+ super();
11
11
  this.__class__ = 'KritzelImage';
12
12
  this.src = '';
13
+ this.maxWidth = 300;
14
+ this.maxHeight = 300;
15
+ this.maxCompressionSize = 300;
13
16
  this.debugInfoVisible = true;
17
+ this.src = (config === null || config === void 0 ? void 0 : config.src) || '';
18
+ this.x = (config === null || config === void 0 ? void 0 : config.x) || 0;
19
+ this.y = (config === null || config === void 0 ? void 0 : config.y) || 0;
20
+ this.translateX = (config === null || config === void 0 ? void 0 : config.translateX) || 0;
21
+ this.translateY = (config === null || config === void 0 ? void 0 : config.translateY) || 0;
22
+ this.scale = (config === null || config === void 0 ? void 0 : config.scale) || 1;
14
23
  }
15
24
  static create(store) {
16
25
  const object = new KritzelImage();
@@ -34,6 +43,18 @@ class KritzelImage extends KritzelBaseObject {
34
43
  this.translateX = x;
35
44
  this.translateY = y;
36
45
  }
46
+ calculateScaledDimensions(img) {
47
+ let scaledWidth = img.width;
48
+ let scaledHeight = img.height;
49
+ if (img.width > this.maxWidth || img.height > this.maxHeight) {
50
+ const widthRatio = this.maxWidth / img.width;
51
+ const heightRatio = this.maxHeight / img.height;
52
+ const scaleRatio = Math.min(widthRatio, heightRatio);
53
+ scaledWidth = img.width * scaleRatio;
54
+ scaledHeight = img.height * scaleRatio;
55
+ }
56
+ return { scaledWidth, scaledHeight };
57
+ }
37
58
  }
38
59
 
39
60
  class BatchCommand extends KritzelBaseCommand {
@@ -645,10 +666,12 @@ class AddSelectionGroupCommand extends KritzelBaseCommand {
645
666
  this._store.state.objectsOctree.remove(object => object instanceof KrtizelSelectionBox);
646
667
  this._store.state.objectsOctree.insert(this.selectionGroup);
647
668
  this._store.state.selectionGroup = this.selectionGroup;
669
+ this._store.state.selectionBox = null;
648
670
  }
649
671
  undo() {
650
672
  this._store.state.objectsOctree.remove(object => object.id === this.selectionGroup.id);
651
673
  this._store.state.selectionGroup = null;
674
+ this._store.state.selectionBox = null;
652
675
  }
653
676
  }
654
677
 
@@ -908,13 +931,6 @@ class KritzelSelectionTool extends KritzelBaseTool {
908
931
  !this._store.state.isRotationHandleSelected) {
909
932
  this._store.history.executeCommand(new RemoveSelectionGroupCommand(this._store, this._store.state.selectionGroup));
910
933
  }
911
- if (selectedObject && selectedObject.selected && selectedObject.objects.length === 1) {
912
- setTimeout(() => {
913
- if (this._store.state.isDragging === false && this._store.state.isResizing === false && this._store.state.isRotating === false) {
914
- selectedObject.objects[0].onSelectedClick();
915
- }
916
- }, 100);
917
- }
918
934
  }
919
935
  this.rotationHandler.handlePointerDown(event);
920
936
  this.resizeHandler.handlePointerDown(event);
@@ -988,9 +1004,8 @@ class KritzelSelectionTool extends KritzelBaseTool {
988
1004
  const shadowRoot = (_a = this._store.state.host) === null || _a === void 0 ? void 0 : _a.shadowRoot;
989
1005
  if (!shadowRoot)
990
1006
  return;
991
- const point = event instanceof TouchEvent ? event.touches[0] : event;
992
- const elementAtPoint = shadowRoot.elementFromPoint(point.clientX, point.clientY);
993
- const handle = elementAtPoint.closest('.resize-handle-overlay');
1007
+ const elementAtPoint = shadowRoot.elementFromPoint(event.clientX, event.clientY);
1008
+ const handle = elementAtPoint === null || elementAtPoint === void 0 ? void 0 : elementAtPoint.closest('.resize-handle-overlay');
994
1009
  return handle === null || handle === void 0 ? void 0 : handle.classList[1];
995
1010
  }
996
1011
  isHandleSelected(event) {
@@ -998,9 +1013,8 @@ class KritzelSelectionTool extends KritzelBaseTool {
998
1013
  const shadowRoot = (_a = this._store.state.host) === null || _a === void 0 ? void 0 : _a.shadowRoot;
999
1014
  if (!shadowRoot)
1000
1015
  return false;
1001
- const point = event instanceof TouchEvent ? event.touches[0] : event;
1002
- const elementAtPoint = shadowRoot.elementFromPoint(point.clientX, point.clientY);
1003
- return elementAtPoint === null || elementAtPoint === void 0 ? void 0 : elementAtPoint.classList.contains('resize-handle-overlay');
1016
+ const elementAtPoint = shadowRoot.elementFromPoint(event.clientX, event.clientY);
1017
+ return !!(elementAtPoint === null || elementAtPoint === void 0 ? void 0 : elementAtPoint.classList.contains('resize-handle-overlay'));
1004
1018
  }
1005
1019
  isRotationHandleSelected(event) {
1006
1020
  const path = event.composedPath();
@@ -1231,8 +1245,6 @@ class KritzelImageTool extends KritzelBaseTool {
1231
1245
  constructor(store) {
1232
1246
  super(store);
1233
1247
  this.fileInput = null;
1234
- this.maxWidth = 300;
1235
- this.maxHeight = 300;
1236
1248
  this.maxCompressionSize = 300;
1237
1249
  this.setupFileInput();
1238
1250
  }
@@ -1280,34 +1292,19 @@ class KritzelImageTool extends KritzelBaseTool {
1280
1292
  var _a;
1281
1293
  const img = new Image();
1282
1294
  img.src = (_a = e.target) === null || _a === void 0 ? void 0 : _a.result;
1283
- img.onload = () => this.processImage(img);
1295
+ img.onload = () => this.createKritzelImage(img);
1284
1296
  };
1285
1297
  reader.readAsDataURL(file);
1286
1298
  }
1287
- processImage(img) {
1288
- const { scaledWidth, scaledHeight } = this.calculateScaledDimensions(img);
1289
- const image = this.createKritzelImage(img, scaledWidth, scaledHeight);
1290
- this.addImageToStore(image);
1291
- }
1292
- calculateScaledDimensions(img) {
1293
- let scaledWidth = img.width;
1294
- let scaledHeight = img.height;
1295
- if (img.width > this.maxWidth || img.height > this.maxHeight) {
1296
- const widthRatio = this.maxWidth / img.width;
1297
- const heightRatio = this.maxHeight / img.height;
1298
- const scaleRatio = Math.min(widthRatio, heightRatio);
1299
- scaledWidth = img.width * scaleRatio;
1300
- scaledHeight = img.height * scaleRatio;
1301
- }
1302
- return { scaledWidth, scaledHeight };
1303
- }
1304
- createKritzelImage(img, width, height) {
1299
+ createKritzelImage(img) {
1305
1300
  const image = KritzelImage.create(this._store);
1301
+ const { scaledWidth, scaledHeight } = image.calculateScaledDimensions(img);
1306
1302
  image.src = img.src;
1307
- image.width = width;
1308
- image.height = height;
1303
+ image.width = scaledWidth;
1304
+ image.height = scaledHeight;
1309
1305
  image.zIndex = this._store.currentZIndex;
1310
1306
  image.centerInViewport();
1307
+ this.addImageToStore(image);
1311
1308
  return image;
1312
1309
  }
1313
1310
  addImageToStore(image) {
@@ -1324,6 +1321,9 @@ class KritzelImageTool extends KritzelBaseTool {
1324
1321
  }
1325
1322
  }
1326
1323
 
1324
+ const ABSOLUTE_SCALE_MAX = 1000;
1325
+ const ABSOLUTE_SCALE_MIN = 0.0001;
1326
+
1327
1327
  class KritzelViewport {
1328
1328
  constructor(store, host) {
1329
1329
  this.initialTouchDistance = 0;
@@ -1774,13 +1774,17 @@ const DEFAULT_ENGINE_STATE = {
1774
1774
  cursorX: 0,
1775
1775
  cursorY: 0,
1776
1776
  scale: 1,
1777
- scaleMax: 1000,
1778
- scaleMin: 0.0001,
1777
+ scaleMax: 1,
1778
+ scaleMin: 1,
1779
1779
  scaleStep: 0.05,
1780
1780
  startX: 0,
1781
1781
  startY: 0,
1782
1782
  translateX: 0,
1783
+ translateXMax: 400,
1784
+ translateXMin: 0,
1783
1785
  translateY: 0,
1786
+ translateYMax: 400,
1787
+ translateYMin: 0,
1784
1788
  viewportWidth: 0,
1785
1789
  viewportHeight: 0,
1786
1790
  historyBufferSize: 1000,
@@ -2011,19 +2015,8 @@ class KritzelStore {
2011
2015
  const shadowRoot = (_a = this.state.host) === null || _a === void 0 ? void 0 : _a.shadowRoot;
2012
2016
  if (!shadowRoot)
2013
2017
  return null;
2014
- let clientX;
2015
- let clientY;
2016
- if ('touches' in event) {
2017
- const touch = event.touches[0];
2018
- if (!touch)
2019
- return null;
2020
- clientX = touch.clientX;
2021
- clientY = touch.clientY;
2022
- }
2023
- else {
2024
- clientX = event.clientX;
2025
- clientY = event.clientY;
2026
- }
2018
+ const clientX = event.clientX;
2019
+ const clientY = event.clientY;
2027
2020
  const elementAtPoint = shadowRoot.elementFromPoint(clientX, clientY);
2028
2021
  if (!elementAtPoint)
2029
2022
  return null;
@@ -2167,6 +2160,26 @@ class KritzelClassHelper {
2167
2160
  const kritzelEngineCss = ":host{display:block;position:relative;height:100%;width:100%;overflow:hidden;background-color:var(--kritzel-engine-background-color, #ffffff)}:host,:host *{touch-action:none;user-select:none}.debug-panel{position:absolute;pointer-events:none;top:0;right:0}.origin{position:relative;top:0;left:0;height:0;width:0;pointer-events:none;-webkit-transform-origin:top left;-moz-transform-origin:top left;transform-origin:top left;overflow:visible}.object{overflow:visible}textarea{all:unset;box-sizing:border-box;outline:none !important;border:none !important;overflow:visible}.resize-handle-overlay.top-left,.resize-handle-overlay.bottom-right{cursor:nwse-resize}.resize-handle-overlay.top-right,.resize-handle-overlay.bottom-left{cursor:nesw-resize}.rotation-handle-overlay{cursor:grab}";
2168
2161
 
2169
2162
  const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine extends H {
2163
+ validateScaleMax(newValue) {
2164
+ if (newValue > ABSOLUTE_SCALE_MAX) {
2165
+ console.warn(`scaleMax cannot be greater than ${ABSOLUTE_SCALE_MAX}.`);
2166
+ this.scaleMax = ABSOLUTE_SCALE_MAX;
2167
+ this.store.state.scaleMax = this.scaleMax;
2168
+ }
2169
+ else {
2170
+ this.store.state.scaleMax = newValue;
2171
+ }
2172
+ }
2173
+ validateScaleMin(newValue) {
2174
+ if (newValue < ABSOLUTE_SCALE_MIN) {
2175
+ console.warn(`scaleMin cannot be less than ${ABSOLUTE_SCALE_MIN}.`);
2176
+ this.scaleMin = ABSOLUTE_SCALE_MIN;
2177
+ this.store.state.scaleMin = this.scaleMin;
2178
+ }
2179
+ else {
2180
+ this.store.state.scaleMin = newValue;
2181
+ }
2182
+ }
2170
2183
  get isSelecting() {
2171
2184
  return this.store.state.activeTool instanceof KritzelSelectionTool && this.store.state.isSelecting;
2172
2185
  }
@@ -2179,56 +2192,21 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2179
2192
  this.__attachShadow();
2180
2193
  this.isEngineReady = createEvent(this, "isEngineReady");
2181
2194
  this.activeToolChange = createEvent(this, "activeToolChange");
2182
- this.globalContextMenuItems = [
2183
- {
2184
- label: 'Paste',
2185
- icon: 'paste',
2186
- disabled: () => this.store.state.copiedObjects === null,
2187
- action: () => {
2188
- const x = (-this.store.state.translateX + this.store.state.contextMenuX) / this.store.state.scale;
2189
- const y = (-this.store.state.translateY + this.store.state.contextMenuY) / this.store.state.scale;
2190
- this.paste(x, y);
2191
- },
2192
- },
2193
- { label: 'Select All', icon: 'select-all', action: () => this.selectAllObjectsInViewport() },
2194
- ];
2195
- this.objectContextMenuItems = [
2196
- { label: 'Copy', icon: 'copy', action: () => this.copy() },
2197
- {
2198
- label: 'Paste',
2199
- icon: 'paste',
2200
- disabled: () => this.store.state.copiedObjects === null,
2201
- action: () => {
2202
- const x = (-this.store.state.translateX + this.store.state.contextMenuX) / this.store.state.scale;
2203
- const y = (-this.store.state.translateY + this.store.state.contextMenuY) / this.store.state.scale;
2204
- this.paste(x, y);
2205
- },
2206
- },
2207
- { label: 'Delete', icon: 'delete', action: () => this.delete() },
2208
- { label: 'Bring to Front', icon: 'bring-to-front', action: () => this.moveToTop() },
2209
- { label: 'Send to Back', icon: 'send-to-back', action: () => this.moveToBottom() },
2210
- ];
2195
+ this.scaleMax = ABSOLUTE_SCALE_MAX;
2196
+ this.scaleMin = ABSOLUTE_SCALE_MIN;
2211
2197
  this.forceUpdate = 0;
2212
2198
  this.contextMenuElement = null;
2213
2199
  this.store = new KritzelStore(this);
2214
- this.contextMenuHandler = new KritzelContextMenuHandler(this.store, this.globalContextMenuItems, this.objectContextMenuItems);
2215
- this.keyHandler = new KritzelKeyHandler(this.store);
2216
- this.store.onStateChange('activeTool', (activeTool) => {
2217
- if (!(activeTool instanceof KritzelSelectionTool)) {
2218
- this.store.clearSelection();
2219
- }
2220
- this.store.state.skipContextMenu = false;
2221
- this.activeToolChange.emit(activeTool);
2222
- KritzelKeyboardHelper.forceHideKeyboard();
2223
- });
2224
- this.store.onStateChange('isFocused', (isFocused) => {
2225
- if (!isFocused) {
2226
- this.store.resetActiveText();
2227
- }
2228
- });
2200
+ }
2201
+ componentWillLoad() {
2202
+ this.validateScaleMax(this.scaleMax);
2203
+ this.validateScaleMin(this.scaleMin);
2229
2204
  }
2230
2205
  componentDidLoad() {
2206
+ this.contextMenuHandler = new KritzelContextMenuHandler(this.store, this.globalContextMenuItems, this.objectContextMenuItems);
2207
+ this.keyHandler = new KritzelKeyHandler(this.store);
2231
2208
  this.viewport = new KritzelViewport(this.store, this.host);
2209
+ this._registerStateChangeListeners();
2232
2210
  if (this.store.state.isReady === false) {
2233
2211
  this.store.state.isReady = true;
2234
2212
  this.isEngineReady.emit();
@@ -2318,10 +2296,6 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2318
2296
  const isInKritzelEngine = path.includes(kritzelEngineElement || this.host);
2319
2297
  this.store.setState('isFocused', isInside && isInKritzelEngine);
2320
2298
  }
2321
- handleContextMenuAction(event) {
2322
- event.detail.action();
2323
- this.hideContextMenu();
2324
- }
2325
2299
  async registerTool(toolName, toolClass, toolConfig) {
2326
2300
  if (typeof toolClass !== 'function' || !(toolClass.prototype instanceof KritzelBaseTool)) {
2327
2301
  console.error(`Failed to register tool "${toolName}": Tool class must be a constructor function`);
@@ -2440,21 +2414,42 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2440
2414
  this.store.history.executeCommand(command);
2441
2415
  return object;
2442
2416
  }
2417
+ async getCopiedObjects() {
2418
+ var _a;
2419
+ return ((_a = this.store.state.copiedObjects) === null || _a === void 0 ? void 0 : _a.objects) || [];
2420
+ }
2421
+ _registerStateChangeListeners() {
2422
+ this.store.onStateChange('activeTool', this._handleActiveToolChange.bind(this));
2423
+ this.store.onStateChange('isFocused', this._handleIsFocusedChange.bind(this));
2424
+ }
2425
+ _handleActiveToolChange(activeTool) {
2426
+ if (!(activeTool instanceof KritzelSelectionTool)) {
2427
+ this.store.clearSelection();
2428
+ }
2429
+ this.store.state.skipContextMenu = false;
2430
+ this.activeToolChange.emit(activeTool);
2431
+ KritzelKeyboardHelper.forceHideKeyboard();
2432
+ }
2433
+ _handleIsFocusedChange(isFocused) {
2434
+ if (!isFocused) {
2435
+ this.store.resetActiveText();
2436
+ }
2437
+ }
2443
2438
  render() {
2444
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
2439
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
2445
2440
  const computedStyle = window.getComputedStyle(this.host);
2446
2441
  const baseHandleSizePx = computedStyle.getPropertyValue('--kritzel-selection-handle-size').trim() || '6px';
2447
2442
  const baseHandleSize = parseFloat(baseHandleSizePx);
2448
2443
  const baseHandleTouchSize = baseHandleSize * 2 < 14 ? 14 : baseHandleSize;
2449
- return (h(Host, { key: '1a8a4ac086fd25b356d25f1c4f094005771a3d57' }, h("div", { key: '5edf7faeb5d63e8341fa81b48287eaee001ed163', class: "debug-panel", style: { display: this.store.state.debugInfo.showViewportInfo ? 'block' : 'none' } }, h("div", { key: '356a8bb56abb4a9c98ab79f1d224a64e6c202a34' }, "TranslateX: ", (_a = this.store.state) === null || _a === void 0 ? void 0 :
2450
- _a.translateX), h("div", { key: 'e3d853e7e11c32bf5f801c29a0ed9add91ce24c3' }, "TranslateY: ", (_b = this.store.state) === null || _b === void 0 ? void 0 :
2451
- _b.translateY), h("div", { key: '7ada7c0c256bbdc79b2b74b391c87a319c9aaf05' }, "ViewportWidth: ", (_c = this.store.state) === null || _c === void 0 ? void 0 :
2452
- _c.viewportWidth), h("div", { key: '156ed10ab63bbacf30d549f115d82beeb6e714d5' }, "ViewportHeight: ", (_d = this.store.state) === null || _d === void 0 ? void 0 :
2453
- _d.viewportHeight), h("div", { key: '1cf8c42989b1c4117a4895f05686313e169b808e' }, "ObjectsInViewport. ", this.store.objects.length), h("div", { key: '1e558a335a31c050c80cda3cd763267fe95335d2' }, "Scale: ", (_e = this.store.state) === null || _e === void 0 ? void 0 :
2454
- _e.scale), h("div", { key: 'ff43094ed2f27d2157946329cc4473d92c2d3e30' }, "ActiveTool: ", (_g = (_f = this.store.state) === null || _f === void 0 ? void 0 : _f.activeTool) === null || _g === void 0 ? void 0 :
2455
- _g.name), h("div", { key: '844c0e1dd8d77270419e3c0a0362536e6027f4cb' }, "HasViewportChanged: ", ((_h = this.store.state) === null || _h === void 0 ? void 0 : _h.hasViewportChanged) ? 'true' : 'false'), h("div", { key: '64a782868924f27f9ef4d426694ddac338293bc5' }, "IsEnabled: ", ((_j = this.store.state) === null || _j === void 0 ? void 0 : _j.isEnabled) ? 'true' : 'false'), h("div", { key: '4fc48b5006641e0ecb9af0d8cc5b4fe2868faa3d' }, "IsScaling: ", ((_k = this.store.state) === null || _k === void 0 ? void 0 : _k.isScaling) ? 'true' : 'false'), h("div", { key: '1407e97aba7434599060b33ead00da898482cc6a' }, "IsPanning: ", ((_l = this.store.state) === null || _l === void 0 ? void 0 : _l.isPanning) ? 'true' : 'false'), h("div", { key: 'f99a32e77014bf5548a5ae50a99ee4e6f6ae4801' }, "IsFocused: ", this.store.state.isFocused ? 'true' : 'false'), h("div", { key: '0c7708d4a8dc78e171b9493b8b5ab2cfe2984ad6' }, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", { key: '5bca3b678ee83f2faba320dfbeb63af8d41b2908' }, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", { key: '2cecae3e2108ca108220ca7bb67777829cd223ef' }, "IsResizeHandleSelected: ", this.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", { key: 'd0cf8270f99ae6e8ce915a856e54ed7b38cd40aa' }, "IsRotationHandleSelected: ", this.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", { key: '4f1a0bad54e9a4ad46fec56d7c692a48e02cb7a2' }, "IsDrawing: ", this.store.state.isDrawing ? 'true' : 'false'), h("div", { key: '9a4b3fdc05e103a2c73a7940bd9a84a68f912b14' }, "IsWriting: ", this.store.state.isWriting ? 'true' : 'false'), h("div", { key: '5a480fdbe4a3fa435697bb94701971dda75f41d3' }, "CursorX: ", (_m = this.store.state) === null || _m === void 0 ? void 0 :
2456
- _m.cursorX), h("div", { key: 'f549e8faa3ddad5b3294bb72f24ad3735539e84b' }, "CursorY: ", (_o = this.store.state) === null || _o === void 0 ? void 0 :
2457
- _o.cursorY)), h("div", { key: 'e81679812ed19a50a09357549df00e590ae613b6', class: "origin", style: {
2444
+ return (h(Host, { key: 'd484b59ebdea9e7b9e8e086c39e7b3a339fb034d' }, h("div", { key: 'ea68c0a3c0020110b5aca6f3a7bdfab223b64744', class: "debug-panel", style: { display: this.store.state.debugInfo.showViewportInfo ? 'block' : 'none' } }, h("div", { key: '4a7c60073190f2123dbb6bda4e206a1b488db7ac' }, "TranslateX: ", (_a = this.store.state) === null || _a === void 0 ? void 0 :
2445
+ _a.translateX), h("div", { key: 'c4fe558accb441fb06ff048f41b07b520ffde505' }, "TranslateY: ", (_b = this.store.state) === null || _b === void 0 ? void 0 :
2446
+ _b.translateY), h("div", { key: '00d5fd0b0ec3c79f9ab1dc9a1032fa2f70c7c246' }, "ViewportWidth: ", (_c = this.store.state) === null || _c === void 0 ? void 0 :
2447
+ _c.viewportWidth), h("div", { key: '87c8f03bfcc6de031e3d9d74576a6028bfc155bc' }, "ViewportHeight: ", (_d = this.store.state) === null || _d === void 0 ? void 0 :
2448
+ _d.viewportHeight), h("div", { key: 'f4e82ddee133818b6ad60b5b6c5e9e721fce4968' }, "ObjectsInViewport. ", this.store.objects.length), h("div", { key: '4f9018ce1184b676248614d4edfdeffd49ac7ce2' }, "Scale: ", (_e = this.store.state) === null || _e === void 0 ? void 0 :
2449
+ _e.scale), h("div", { key: 'cc5d72952bc4b80a42d26ca1b1e56bcab96ab76c' }, "ActiveTool: ", (_g = (_f = this.store.state) === null || _f === void 0 ? void 0 : _f.activeTool) === null || _g === void 0 ? void 0 :
2450
+ _g.name), h("div", { key: '387071b0ea3f2064d1ea0e0495aa92de8072a900' }, "HasViewportChanged: ", ((_h = this.store.state) === null || _h === void 0 ? void 0 : _h.hasViewportChanged) ? 'true' : 'false'), h("div", { key: 'a386b4fb631860b94f710cb601b1809283ab9664' }, "IsEnabled: ", ((_j = this.store.state) === null || _j === void 0 ? void 0 : _j.isEnabled) ? 'true' : 'false'), h("div", { key: 'a67ad19caa6a6cafa8b19dace26c25d60347090a' }, "IsScaling: ", ((_k = this.store.state) === null || _k === void 0 ? void 0 : _k.isScaling) ? 'true' : 'false'), h("div", { key: '9fe3152ba0a3e936b6c6551673de3a67bd5de0d1' }, "IsPanning: ", ((_l = this.store.state) === null || _l === void 0 ? void 0 : _l.isPanning) ? 'true' : 'false'), h("div", { key: '8103da258c7bdede340c6c64188a2f9657af16c3' }, "IsFocused: ", this.store.state.isFocused ? 'true' : 'false'), h("div", { key: '10b315366f6cf8eb2f27a20083094c9e483c2fe3' }, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", { key: 'b65926aca01fe6b41f70e8d7484674f568e9945a' }, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", { key: '5e95a4268ab30bf06918e83aa5f7e96b5ee1dbe2' }, "IsResizeHandleSelected: ", this.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", { key: '3922b7fcb2b74ec28f515db8254f05b454ef6b12' }, "IsRotationHandleSelected: ", this.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", { key: '13c162ec56f0990948bac4569c28a6076582c7ea' }, "IsDrawing: ", this.store.state.isDrawing ? 'true' : 'false'), h("div", { key: 'f909cbc959961e47dbff28e5c620175dc04f6873' }, "IsWriting: ", this.store.state.isWriting ? 'true' : 'false'), h("div", { key: '505122e286976b8fa9e9fac5b131bcecb359eaae' }, "CursorX: ", (_m = this.store.state) === null || _m === void 0 ? void 0 :
2451
+ _m.cursorX), h("div", { key: '116217379cf67a0a268e97912ec44d52a98c434b' }, "CursorY: ", (_o = this.store.state) === null || _o === void 0 ? void 0 :
2452
+ _o.cursorY)), h("div", { key: 'b0bcbb90404d0cbc1281b932bd13e67df612d58d', class: "origin", style: {
2458
2453
  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})`,
2459
2454
  } }, (_t = this.store.objects) === null || _t === void 0 ? void 0 :
2460
2455
  _t.map(object => {
@@ -2551,7 +2546,7 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2551
2546
  fill: 'transparent',
2552
2547
  cursor: 'grab',
2553
2548
  }, visibility: object.selected && !this.isSelecting ? 'visible' : 'hidden' }), h("g", { style: { display: this.store.state.debugInfo.showObjectInfo ? 'block' : 'none', pointerEvents: 'none' } }, h("foreignObject", { x: object.totalWidth.toString(), y: "0", width: "400px", height: "160px", style: { minHeight: '0', minWidth: '0', display: object.debugInfoVisible ? 'block' : 'none' } }, h("div", { style: { width: '100%', height: '100%' } }, h("div", { style: { whiteSpace: 'nowrap' } }, "zIndex: ", object.zIndex), h("div", { style: { whiteSpace: 'nowrap' } }, "translateX: ", object.translateX), h("div", { style: { whiteSpace: 'nowrap' } }, "translateY: ", object.translateY), h("div", { style: { whiteSpace: 'nowrap' } }, "width: ", object.width), h("div", { style: { whiteSpace: 'nowrap' } }, "height: ", object.height), h("div", { style: { whiteSpace: 'nowrap' } }, "scale: ", object.scale), h("div", { style: { whiteSpace: 'nowrap' } }, "rotation: ", object.rotation)))))));
2554
- }), h("svg", { key: 'bf2c561803773e19aed36d418e96b9f797c305be', class: "object", xmlns: "http://www.w3.org/2000/svg", style: {
2549
+ }), h("svg", { key: '4fd9e58c617eaf428edbdc3491d3f4fabe3ce564', class: "object", xmlns: "http://www.w3.org/2000/svg", style: {
2555
2550
  height: (_u = this.store.state.currentPath) === null || _u === void 0 ? void 0 : _u.height.toString(),
2556
2551
  width: (_v = this.store.state.currentPath) === null || _v === void 0 ? void 0 : _v.width.toString(),
2557
2552
  left: '0',
@@ -2561,19 +2556,31 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2561
2556
  transform: (_x = this.store.state.currentPath) === null || _x === void 0 ? void 0 : _x.transformationMatrix,
2562
2557
  transformOrigin: 'top left',
2563
2558
  overflow: 'visible',
2564
- }, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, h("path", { key: '5177dab02b9a5563129d00b80b99a1a198eb8ff5', 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 && (h("kritzel-context-menu", { key: 'ea3ae0531d9b2109e547baca7159ea29ebd34827', class: "context-menu", ref: el => (this.contextMenuElement = el), items: this.store.state.contextMenuItems, style: {
2559
+ }, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, h("path", { key: 'ac88c3b66d642bbe42a0ac5345b4f4d6cddef5a3', 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 && (h("kritzel-context-menu", { key: '75d7dfe1ef3ab64ae960c69a471224095a812cb8', 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: {
2565
2560
  position: 'fixed',
2566
2561
  left: `${this.store.state.contextMenuX}px`,
2567
2562
  top: `${this.store.state.contextMenuY}px`,
2568
2563
  zIndex: '10000',
2569
- }, onActionSelected: event => this.handleContextMenuAction(event) })), ((_2 = this.store.state) === null || _2 === void 0 ? void 0 : _2.activeTool) instanceof KritzelEraserTool && !this.store.state.isScaling && h("kritzel-cursor-trail", { key: 'c785558a0f922d7caeacaeeb44a9492ebcc0be7d', store: this.store })));
2564
+ }, onActionSelected: event => {
2565
+ event.detail.action({
2566
+ x: (-this.store.state.translateX + this.store.state.contextMenuX) / this.store.state.scale,
2567
+ y: (-this.store.state.translateY + this.store.state.contextMenuY) / this.store.state.scale,
2568
+ }, this.store.state.selectionGroup.objects);
2569
+ this.hideContextMenu();
2570
+ } })), ((_3 = this.store.state) === null || _3 === void 0 ? void 0 : _3.activeTool) instanceof KritzelEraserTool && !this.store.state.isScaling && h("kritzel-cursor-trail", { key: 'a056ea6d5c4271f6af82d259d6d8126fef07c7bd', store: this.store })));
2570
2571
  }
2571
2572
  get host() { return this; }
2573
+ static get watchers() { return {
2574
+ "scaleMax": ["validateScaleMax"],
2575
+ "scaleMin": ["validateScaleMin"]
2576
+ }; }
2572
2577
  static get style() { return kritzelEngineCss; }
2573
- }, [1, "kritzel-engine", {
2578
+ }, [257, "kritzel-engine", {
2574
2579
  "activeTool": [16, "active-tool"],
2575
2580
  "globalContextMenuItems": [16, "global-context-menu-items"],
2576
2581
  "objectContextMenuItems": [16, "object-context-menu-items"],
2582
+ "scaleMax": [1026, "scale-max"],
2583
+ "scaleMin": [1026, "scale-min"],
2577
2584
  "forceUpdate": [32],
2578
2585
  "registerTool": [64],
2579
2586
  "changeActiveTool": [64],
@@ -2598,8 +2605,12 @@ const KritzelEngine = /*@__PURE__*/ proxyCustomElement(class KritzelEngine exten
2598
2605
  "selectObjects": [64],
2599
2606
  "selectAllObjectsInViewport": [64],
2600
2607
  "clearSelection": [64],
2601
- "centerObjectInViewport": [64]
2602
- }, [[0, "wheel", "handleWheel"], [0, "pointerdown", "handlePointerDown"], [0, "pointermove", "handlePointerMove"], [0, "pointerup", "handlePointerUp"], [0, "pointercancel", "handlePointerCancel"], [0, "contextmenu", "handleContextMenu"], [9, "resize", "handleResize"], [8, "keydown", "handleKeyDown"], [8, "keyup", "handleKeyUp"], [9, "mousedown", "updateFocus"]]]);
2608
+ "centerObjectInViewport": [64],
2609
+ "getCopiedObjects": [64]
2610
+ }, [[0, "wheel", "handleWheel"], [0, "pointerdown", "handlePointerDown"], [0, "pointermove", "handlePointerMove"], [0, "pointerup", "handlePointerUp"], [0, "pointercancel", "handlePointerCancel"], [0, "contextmenu", "handleContextMenu"], [9, "resize", "handleResize"], [8, "keydown", "handleKeyDown"], [8, "keyup", "handleKeyUp"], [9, "mousedown", "updateFocus"]], {
2611
+ "scaleMax": ["validateScaleMax"],
2612
+ "scaleMin": ["validateScaleMin"]
2613
+ }]);
2603
2614
  function defineCustomElement() {
2604
2615
  if (typeof customElements === "undefined") {
2605
2616
  return;
@@ -2629,7 +2640,7 @@ function defineCustomElement() {
2629
2640
  } });
2630
2641
  }
2631
2642
 
2632
- export { KritzelImage as K, KritzelEngine as a, KritzelSelectionTool as b, KritzelEraserTool as c, defineCustomElement as d, KritzelImageTool as e };
2633
- //# sourceMappingURL=p-DuWb7MaD.js.map
2643
+ export { ABSOLUTE_SCALE_MAX as A, KritzelImage as K, KritzelEraserTool as a, KritzelImageTool as b, KritzelSelectionTool as c, KritzelEngine as d, defineCustomElement as e, ABSOLUTE_SCALE_MIN as f };
2644
+ //# sourceMappingURL=p-eS30Bqrc.js.map
2634
2645
 
2635
- //# sourceMappingURL=p-DuWb7MaD.js.map
2646
+ //# sourceMappingURL=p-eS30Bqrc.js.map