@solostylist/image-editor 1.0.11 → 1.0.13

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 (626) hide show
  1. package/lib/actions/add-filter.d.ts +10 -0
  2. package/lib/actions/add-filter.d.ts.map +1 -0
  3. package/lib/actions/change-pointer-icon.d.ts +6 -0
  4. package/lib/actions/change-pointer-icon.d.ts.map +1 -0
  5. package/lib/actions/change-rotation.d.ts +6 -0
  6. package/lib/actions/change-rotation.d.ts.map +1 -0
  7. package/lib/actions/clear-annotations-selections.d.ts +5 -0
  8. package/lib/actions/clear-annotations-selections.d.ts.map +1 -0
  9. package/lib/actions/duplicate-annotations.d.ts +9 -0
  10. package/lib/actions/duplicate-annotations.d.ts.map +1 -0
  11. package/lib/actions/enable-text-content-edit.d.ts +8 -0
  12. package/lib/actions/enable-text-content-edit.d.ts.map +1 -0
  13. package/lib/actions/hide-loader.d.ts +5 -0
  14. package/lib/actions/hide-loader.d.ts.map +1 -0
  15. package/lib/actions/index.d.ts +40 -0
  16. package/lib/actions/index.d.ts.map +1 -0
  17. package/lib/actions/redo.d.ts +5 -0
  18. package/lib/actions/redo.d.ts.map +1 -0
  19. package/lib/actions/remove-annotations.d.ts +9 -0
  20. package/lib/actions/remove-annotations.d.ts.map +1 -0
  21. package/lib/actions/reset.d.ts +8 -0
  22. package/lib/actions/reset.d.ts.map +1 -0
  23. package/lib/actions/select-annotation.d.ts +6 -0
  24. package/lib/actions/select-annotation.d.ts.map +1 -0
  25. package/lib/actions/select-tab.d.ts +6 -0
  26. package/lib/actions/select-tab.d.ts.map +1 -0
  27. package/lib/actions/select-tool.d.ts +9 -0
  28. package/lib/actions/select-tool.d.ts.map +1 -0
  29. package/lib/actions/set-annotation.d.ts +10 -0
  30. package/lib/actions/set-annotation.d.ts.map +1 -0
  31. package/lib/actions/set-canvas-size.d.ts +6 -0
  32. package/lib/actions/set-canvas-size.d.ts.map +1 -0
  33. package/lib/actions/set-crop.d.ts +9 -0
  34. package/lib/actions/set-crop.d.ts.map +1 -0
  35. package/lib/actions/set-feedback.d.ts +6 -0
  36. package/lib/actions/set-feedback.d.ts.map +1 -0
  37. package/lib/actions/set-finetune.d.ts +11 -0
  38. package/lib/actions/set-finetune.d.ts.map +1 -0
  39. package/lib/actions/set-latest-color.d.ts +6 -0
  40. package/lib/actions/set-latest-color.d.ts.map +1 -0
  41. package/lib/actions/set-original-image.d.ts +6 -0
  42. package/lib/actions/set-original-image.d.ts.map +1 -0
  43. package/lib/actions/set-resize.d.ts +9 -0
  44. package/lib/actions/set-resize.d.ts.map +1 -0
  45. package/lib/actions/set-saved.d.ts +5 -0
  46. package/lib/actions/set-saved.d.ts.map +1 -0
  47. package/lib/actions/set-saving.d.ts +6 -0
  48. package/lib/actions/set-saving.d.ts.map +1 -0
  49. package/lib/actions/set-show-tabs-menu.d.ts +8 -0
  50. package/lib/actions/set-show-tabs-menu.d.ts.map +1 -0
  51. package/lib/actions/set-shown-image-dimensions.d.ts +13 -0
  52. package/lib/actions/set-shown-image-dimensions.d.ts.map +1 -0
  53. package/lib/actions/show-loader.d.ts +5 -0
  54. package/lib/actions/show-loader.d.ts.map +1 -0
  55. package/lib/actions/toggle-flip.d.ts +9 -0
  56. package/lib/actions/toggle-flip.d.ts.map +1 -0
  57. package/lib/actions/toggle-original-image-display.d.ts +8 -0
  58. package/lib/actions/toggle-original-image-display.d.ts.map +1 -0
  59. package/lib/actions/undo.d.ts +5 -0
  60. package/lib/actions/undo.d.ts.map +1 -0
  61. package/lib/actions/update-state.d.ts +7 -0
  62. package/lib/actions/update-state.d.ts.map +1 -0
  63. package/lib/actions/zoom-canvas.d.ts +10 -0
  64. package/lib/actions/zoom-canvas.d.ts.map +1 -0
  65. package/lib/components/app/index.d.ts +3 -0
  66. package/lib/components/app/index.d.ts.map +1 -0
  67. package/lib/components/app/index.js +45 -37
  68. package/lib/components/assembly-point/index.d.ts +9 -0
  69. package/lib/components/assembly-point/index.d.ts.map +1 -0
  70. package/lib/components/assembly-point/index.js +10 -5
  71. package/lib/components/common/annotation-options/annotation-options.constants.d.ts +9 -0
  72. package/lib/components/common/annotation-options/annotation-options.constants.d.ts.map +1 -0
  73. package/lib/components/common/annotation-options/index.d.ts +21 -0
  74. package/lib/components/common/annotation-options/index.d.ts.map +1 -0
  75. package/lib/components/common/annotation-options/index.js +58 -52
  76. package/lib/components/common/annotation-options/opacity-field.d.ts +10 -0
  77. package/lib/components/common/annotation-options/opacity-field.d.ts.map +1 -0
  78. package/lib/components/common/annotation-options/opacity-field.js +2 -1
  79. package/lib/components/common/annotation-options/position-fields.d.ts +8 -0
  80. package/lib/components/common/annotation-options/position-fields.d.ts.map +1 -0
  81. package/lib/components/common/annotation-options/position-fields.js +15 -13
  82. package/lib/components/common/annotation-options/shadow-fields.d.ts +9 -0
  83. package/lib/components/common/annotation-options/shadow-fields.d.ts.map +1 -0
  84. package/lib/components/common/annotation-options/shadow-fields.js +40 -37
  85. package/lib/components/common/annotation-options/stroke-fields.d.ts +9 -0
  86. package/lib/components/common/annotation-options/stroke-fields.d.ts.map +1 -0
  87. package/lib/components/common/annotation-options/stroke-fields.js +13 -10
  88. package/lib/components/common/button-with-menu/index.d.ts +16 -0
  89. package/lib/components/common/button-with-menu/index.d.ts.map +1 -0
  90. package/lib/components/common/button-with-menu/index.js +37 -27
  91. package/lib/components/common/color-input/index.d.ts +8 -0
  92. package/lib/components/common/color-input/index.d.ts.map +1 -0
  93. package/lib/components/common/color-input/index.js +21 -18
  94. package/lib/components/common/color-picker-modal/index.d.ts +10 -0
  95. package/lib/components/common/color-picker-modal/index.d.ts.map +1 -0
  96. package/lib/components/common/color-picker-modal/index.js +28 -21
  97. package/lib/components/common/hidden-upload-input/index.d.ts +3 -0
  98. package/lib/components/common/hidden-upload-input/index.d.ts.map +1 -0
  99. package/lib/components/common/hidden-upload-input/index.js +5 -2
  100. package/lib/components/common/icon-wrapper/index.d.ts +16 -0
  101. package/lib/components/common/icon-wrapper/index.d.ts.map +1 -0
  102. package/lib/components/common/icon-wrapper/index.js +8 -3
  103. package/lib/components/common/image-preview-tile/index.d.ts +14 -0
  104. package/lib/components/common/image-preview-tile/index.d.ts.map +1 -0
  105. package/lib/components/common/image-preview-tile/index.js +14 -12
  106. package/lib/components/common/slider/index.d.ts +12 -0
  107. package/lib/components/common/slider/index.d.ts.map +1 -0
  108. package/lib/components/common/slider/index.js +29 -22
  109. package/lib/components/feedback-popup/index.d.ts +8 -0
  110. package/lib/components/feedback-popup/index.d.ts.map +1 -0
  111. package/lib/components/feedback-popup/index.js +8 -5
  112. package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts +11 -0
  113. package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts.map +1 -0
  114. package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts +15 -0
  115. package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts.map +1 -0
  116. package/lib/components/layers/design-layer/annotation-nodes/arrow-node.js +6 -3
  117. package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts +14 -0
  118. package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts.map +1 -0
  119. package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.js +6 -3
  120. package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts +14 -0
  121. package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts.map +1 -0
  122. package/lib/components/layers/design-layer/annotation-nodes/image-node.js +6 -3
  123. package/lib/components/layers/design-layer/annotation-nodes/index.d.ts +3 -0
  124. package/lib/components/layers/design-layer/annotation-nodes/index.d.ts.map +1 -0
  125. package/lib/components/layers/design-layer/annotation-nodes/index.js +3 -3
  126. package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts +12 -0
  127. package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts.map +1 -0
  128. package/lib/components/layers/design-layer/annotation-nodes/line-node.js +6 -3
  129. package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts +11 -0
  130. package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts.map +1 -0
  131. package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.js +6 -4
  132. package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts +15 -0
  133. package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts.map +1 -0
  134. package/lib/components/layers/design-layer/annotation-nodes/polygon-node.js +6 -3
  135. package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts +16 -0
  136. package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts.map +1 -0
  137. package/lib/components/layers/design-layer/annotation-nodes/rect-node.js +6 -3
  138. package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts +21 -0
  139. package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts.map +1 -0
  140. package/lib/components/layers/design-layer/annotation-nodes/text-node.js +6 -3
  141. package/lib/components/layers/design-layer/index.d.ts +3 -0
  142. package/lib/components/layers/design-layer/index.d.ts.map +1 -0
  143. package/lib/components/layers/design-layer/index.js +32 -31
  144. package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts +45 -0
  145. package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts.map +1 -0
  146. package/lib/components/layers/design-layer/preview-group.d.ts +3 -0
  147. package/lib/components/layers/design-layer/preview-group.d.ts.map +1 -0
  148. package/lib/components/layers/design-layer/preview-group.js +5 -2
  149. package/lib/components/layers/index.d.ts +3 -0
  150. package/lib/components/layers/index.d.ts.map +1 -0
  151. package/lib/components/layers/transformers-layer/crop-transformer.d.ts +3 -0
  152. package/lib/components/layers/transformers-layer/crop-transformer.d.ts.map +1 -0
  153. package/lib/components/layers/transformers-layer/crop-transformer.js +63 -61
  154. package/lib/components/layers/transformers-layer/index.d.ts +3 -0
  155. package/lib/components/layers/transformers-layer/index.d.ts.map +1 -0
  156. package/lib/components/layers/transformers-layer/index.js +5 -3
  157. package/lib/components/layers/transformers-layer/nodes-transformer.d.ts +3 -0
  158. package/lib/components/layers/transformers-layer/nodes-transformer.d.ts.map +1 -0
  159. package/lib/components/layers/transformers-layer/nodes-transformer.js +2 -1
  160. package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts +42 -0
  161. package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts.map +1 -0
  162. package/lib/components/main-canvas/canvas-node.d.ts +6 -0
  163. package/lib/components/main-canvas/canvas-node.d.ts.map +1 -0
  164. package/lib/components/main-canvas/canvas-node.js +5 -3
  165. package/lib/components/main-canvas/index.d.ts +3 -0
  166. package/lib/components/main-canvas/index.d.ts.map +1 -0
  167. package/lib/components/main-canvas/index.js +21 -16
  168. package/lib/components/main-canvas/touch-zooming-events.d.ts +11 -0
  169. package/lib/components/main-canvas/touch-zooming-events.d.ts.map +1 -0
  170. package/lib/components/node-controls/index.d.ts +3 -0
  171. package/lib/components/node-controls/index.d.ts.map +1 -0
  172. package/lib/components/node-controls/index.js +12 -8
  173. package/lib/components/tabs/index.d.ts +6 -0
  174. package/lib/components/tabs/index.d.ts.map +1 -0
  175. package/lib/components/tabs/index.js +3 -2
  176. package/lib/components/tabs/tabs.constants.d.ts +9 -0
  177. package/lib/components/tabs/tabs.constants.d.ts.map +1 -0
  178. package/lib/components/tabs-drawer/index.d.ts +6 -0
  179. package/lib/components/tabs-drawer/index.d.ts.map +1 -0
  180. package/lib/components/tabs-drawer/index.js +48 -42
  181. package/lib/components/tools/arrow/arrow-button.d.ts +8 -0
  182. package/lib/components/tools/arrow/arrow-button.d.ts.map +1 -0
  183. package/lib/components/tools/arrow/arrow-button.js +2 -1
  184. package/lib/components/tools/arrow/arrow-options.d.ts +4 -0
  185. package/lib/components/tools/arrow/arrow-options.d.ts.map +1 -0
  186. package/lib/components/tools/arrow/arrow-options.js +2 -1
  187. package/lib/components/tools/arrow/index.d.ts +3 -0
  188. package/lib/components/tools/arrow/index.d.ts.map +1 -0
  189. package/lib/components/tools/blur/blur-options.d.ts +6 -0
  190. package/lib/components/tools/blur/blur-options.d.ts.map +1 -0
  191. package/lib/components/tools/blur/blur-options.js +11 -9
  192. package/lib/components/tools/blur/blur.d.ts +8 -0
  193. package/lib/components/tools/blur/blur.d.ts.map +1 -0
  194. package/lib/components/tools/blur/blur.js +2 -1
  195. package/lib/components/tools/blur/index.d.ts +3 -0
  196. package/lib/components/tools/blur/index.d.ts.map +1 -0
  197. package/lib/components/tools/brightness/brightness-options.d.ts +6 -0
  198. package/lib/components/tools/brightness/brightness-options.d.ts.map +1 -0
  199. package/lib/components/tools/brightness/brightness-options.js +12 -10
  200. package/lib/components/tools/brightness/brightness.d.ts +8 -0
  201. package/lib/components/tools/brightness/brightness.d.ts.map +1 -0
  202. package/lib/components/tools/brightness/brightness.js +2 -1
  203. package/lib/components/tools/brightness/index.d.ts +3 -0
  204. package/lib/components/tools/brightness/index.d.ts.map +1 -0
  205. package/lib/components/tools/contrast/contrast-options.d.ts +6 -0
  206. package/lib/components/tools/contrast/contrast-options.d.ts.map +1 -0
  207. package/lib/components/tools/contrast/contrast-options.js +11 -9
  208. package/lib/components/tools/contrast/contrast.d.ts +8 -0
  209. package/lib/components/tools/contrast/contrast.d.ts.map +1 -0
  210. package/lib/components/tools/contrast/contrast.js +2 -1
  211. package/lib/components/tools/contrast/index.d.ts +3 -0
  212. package/lib/components/tools/contrast/index.d.ts.map +1 -0
  213. package/lib/components/tools/crop/crop.constants.d.ts +15 -0
  214. package/lib/components/tools/crop/crop.constants.d.ts.map +1 -0
  215. package/lib/components/tools/crop/crop.d.ts +7 -0
  216. package/lib/components/tools/crop/crop.d.ts.map +1 -0
  217. package/lib/components/tools/crop/crop.js +22 -19
  218. package/lib/components/tools/crop/index.d.ts +2 -0
  219. package/lib/components/tools/crop/index.d.ts.map +1 -0
  220. package/lib/components/tools/ellipse/ellipse-button.d.ts +8 -0
  221. package/lib/components/tools/ellipse/ellipse-button.d.ts.map +1 -0
  222. package/lib/components/tools/ellipse/ellipse-button.js +2 -1
  223. package/lib/components/tools/ellipse/ellipse-options.d.ts +4 -0
  224. package/lib/components/tools/ellipse/ellipse-options.d.ts.map +1 -0
  225. package/lib/components/tools/ellipse/ellipse-options.js +2 -1
  226. package/lib/components/tools/ellipse/index.d.ts +3 -0
  227. package/lib/components/tools/ellipse/index.d.ts.map +1 -0
  228. package/lib/components/tools/filters/filter-item.d.ts +10 -0
  229. package/lib/components/tools/filters/filter-item.d.ts.map +1 -0
  230. package/lib/components/tools/filters/filter-item.js +32 -27
  231. package/lib/components/tools/filters/filters.constants.d.ts +8 -0
  232. package/lib/components/tools/filters/filters.constants.d.ts.map +1 -0
  233. package/lib/components/tools/filters/filters.d.ts +3 -0
  234. package/lib/components/tools/filters/filters.d.ts.map +1 -0
  235. package/lib/components/tools/filters/filters.js +18 -16
  236. package/lib/components/tools/filters/index.d.ts +2 -0
  237. package/lib/components/tools/filters/index.d.ts.map +1 -0
  238. package/lib/components/tools/flip/flip-x.d.ts +8 -0
  239. package/lib/components/tools/flip/flip-x.d.ts.map +1 -0
  240. package/lib/components/tools/flip/flip-x.js +2 -1
  241. package/lib/components/tools/flip/flip-y.d.ts +8 -0
  242. package/lib/components/tools/flip/flip-y.d.ts.map +1 -0
  243. package/lib/components/tools/flip/flip-y.js +2 -1
  244. package/lib/components/tools/flip/index.d.ts +3 -0
  245. package/lib/components/tools/flip/index.d.ts.map +1 -0
  246. package/lib/components/tools/hsv/hsv.d.ts +8 -0
  247. package/lib/components/tools/hsv/hsv.d.ts.map +1 -0
  248. package/lib/components/tools/hsv/hsv.js +2 -1
  249. package/lib/components/tools/hsv/hsvoptions.d.ts +6 -0
  250. package/lib/components/tools/hsv/hsvoptions.d.ts.map +1 -0
  251. package/lib/components/tools/hsv/hsvoptions.js +32 -30
  252. package/lib/components/tools/hsv/index.d.ts +3 -0
  253. package/lib/components/tools/hsv/index.d.ts.map +1 -0
  254. package/lib/components/tools/image/image-button.d.ts +8 -0
  255. package/lib/components/tools/image/image-button.d.ts.map +1 -0
  256. package/lib/components/tools/image/image-button.js +2 -1
  257. package/lib/components/tools/image/image-controls.d.ts +13 -0
  258. package/lib/components/tools/image/image-controls.d.ts.map +1 -0
  259. package/lib/components/tools/image/image-controls.js +5 -3
  260. package/lib/components/tools/image/image-options.d.ts +3 -0
  261. package/lib/components/tools/image/image-options.d.ts.map +1 -0
  262. package/lib/components/tools/image/image-options.js +19 -17
  263. package/lib/components/tools/image/images-gallery.d.ts +14 -0
  264. package/lib/components/tools/image/images-gallery.d.ts.map +1 -0
  265. package/lib/components/tools/image/images-gallery.js +27 -25
  266. package/lib/components/tools/image/index.d.ts +3 -0
  267. package/lib/components/tools/image/index.d.ts.map +1 -0
  268. package/lib/components/tools/line/index.d.ts +3 -0
  269. package/lib/components/tools/line/index.d.ts.map +1 -0
  270. package/lib/components/tools/line/line-button.d.ts +8 -0
  271. package/lib/components/tools/line/line-button.d.ts.map +1 -0
  272. package/lib/components/tools/line/line-button.js +2 -1
  273. package/lib/components/tools/line/line-options.d.ts +4 -0
  274. package/lib/components/tools/line/line-options.d.ts.map +1 -0
  275. package/lib/components/tools/line/line-options.js +2 -1
  276. package/lib/components/tools/pen/index.d.ts +3 -0
  277. package/lib/components/tools/pen/index.d.ts.map +1 -0
  278. package/lib/components/tools/pen/pen-button.d.ts +8 -0
  279. package/lib/components/tools/pen/pen-button.d.ts.map +1 -0
  280. package/lib/components/tools/pen/pen-button.js +2 -1
  281. package/lib/components/tools/pen/pen-options.d.ts +3 -0
  282. package/lib/components/tools/pen/pen-options.d.ts.map +1 -0
  283. package/lib/components/tools/pen/pen-options.js +2 -1
  284. package/lib/components/tools/polygon/index.d.ts +3 -0
  285. package/lib/components/tools/polygon/index.d.ts.map +1 -0
  286. package/lib/components/tools/polygon/polygon-button.d.ts +8 -0
  287. package/lib/components/tools/polygon/polygon-button.d.ts.map +1 -0
  288. package/lib/components/tools/polygon/polygon-button.js +2 -1
  289. package/lib/components/tools/polygon/polygon-options.d.ts +4 -0
  290. package/lib/components/tools/polygon/polygon-options.d.ts.map +1 -0
  291. package/lib/components/tools/polygon/polygon-options.js +2 -1
  292. package/lib/components/tools/polygon/polygon-sides-field.d.ts +9 -0
  293. package/lib/components/tools/polygon/polygon-sides-field.d.ts.map +1 -0
  294. package/lib/components/tools/polygon/polygon-sides-field.js +2 -1
  295. package/lib/components/tools/polygon/polygon.constants.d.ts +12 -0
  296. package/lib/components/tools/polygon/polygon.constants.d.ts.map +1 -0
  297. package/lib/components/tools/rect/index.d.ts +3 -0
  298. package/lib/components/tools/rect/index.d.ts.map +1 -0
  299. package/lib/components/tools/rect/rect-button.d.ts +8 -0
  300. package/lib/components/tools/rect/rect-button.d.ts.map +1 -0
  301. package/lib/components/tools/rect/rect-button.js +2 -1
  302. package/lib/components/tools/rect/rect-corner-field.d.ts +9 -0
  303. package/lib/components/tools/rect/rect-corner-field.d.ts.map +1 -0
  304. package/lib/components/tools/rect/rect-corner-field.js +2 -1
  305. package/lib/components/tools/rect/rect-options.d.ts +4 -0
  306. package/lib/components/tools/rect/rect-options.d.ts.map +1 -0
  307. package/lib/components/tools/rect/rect-options.js +2 -1
  308. package/lib/components/tools/rect/rect.constants.d.ts +12 -0
  309. package/lib/components/tools/rect/rect.constants.d.ts.map +1 -0
  310. package/lib/components/tools/resize/index.d.ts +2 -0
  311. package/lib/components/tools/resize/index.d.ts.map +1 -0
  312. package/lib/components/tools/resize/resize.d.ts +13 -0
  313. package/lib/components/tools/resize/resize.d.ts.map +1 -0
  314. package/lib/components/tools/resize/resize.js +36 -32
  315. package/lib/components/tools/rotate/index.d.ts +3 -0
  316. package/lib/components/tools/rotate/index.d.ts.map +1 -0
  317. package/lib/components/tools/rotate/rotate-button.d.ts +8 -0
  318. package/lib/components/tools/rotate/rotate-button.d.ts.map +1 -0
  319. package/lib/components/tools/rotate/rotate-button.js +2 -1
  320. package/lib/components/tools/rotate/rotate-options.d.ts +3 -0
  321. package/lib/components/tools/rotate/rotate-options.d.ts.map +1 -0
  322. package/lib/components/tools/rotate/rotate-options.js +50 -44
  323. package/lib/components/tools/text/index.d.ts +3 -0
  324. package/lib/components/tools/text/index.d.ts.map +1 -0
  325. package/lib/components/tools/text/text-button.d.ts +8 -0
  326. package/lib/components/tools/text/text-button.d.ts.map +1 -0
  327. package/lib/components/tools/text/text-button.js +2 -1
  328. package/lib/components/tools/text/text-options/handle-text-change-area.d.ts +4 -0
  329. package/lib/components/tools/text/text-options/handle-text-change-area.d.ts.map +1 -0
  330. package/lib/components/tools/text/text-options/index.d.ts +4 -0
  331. package/lib/components/tools/text/text-options/index.d.ts.map +1 -0
  332. package/lib/components/tools/text/text-options/index.js +2 -1
  333. package/lib/components/tools/text/text-options/text-alignment-fields.d.ts +9 -0
  334. package/lib/components/tools/text/text-options/text-alignment-fields.d.ts.map +1 -0
  335. package/lib/components/tools/text/text-options/text-alignment-fields.js +25 -20
  336. package/lib/components/tools/text/text-options/text-controls.d.ts +12 -0
  337. package/lib/components/tools/text/text-options/text-controls.d.ts.map +1 -0
  338. package/lib/components/tools/text/text-options/text-controls.js +46 -41
  339. package/lib/components/tools/text/text-options/text-options.constants.d.ts +14 -0
  340. package/lib/components/tools/text/text-options/text-options.constants.d.ts.map +1 -0
  341. package/lib/components/tools/text/text-options/text-spacings-fields.d.ts +10 -0
  342. package/lib/components/tools/text/text-options/text-spacings-fields.d.ts.map +1 -0
  343. package/lib/components/tools/text/text-options/text-spacings-fields.js +20 -17
  344. package/lib/components/tools/tools.constants.d.ts +9 -0
  345. package/lib/components/tools/tools.constants.d.ts.map +1 -0
  346. package/lib/components/tools/warmth/index.d.ts +3 -0
  347. package/lib/components/tools/warmth/index.d.ts.map +1 -0
  348. package/lib/components/tools/warmth/warmth-options.d.ts +7 -0
  349. package/lib/components/tools/warmth/warmth-options.d.ts.map +1 -0
  350. package/lib/components/tools/warmth/warmth-options.js +11 -9
  351. package/lib/components/tools/warmth/warmth.d.ts +8 -0
  352. package/lib/components/tools/warmth/warmth.d.ts.map +1 -0
  353. package/lib/components/tools/warmth/warmth.js +2 -1
  354. package/lib/components/tools/watermark/index.d.ts +2 -0
  355. package/lib/components/tools/watermark/index.d.ts.map +1 -0
  356. package/lib/components/tools/watermark/watermark-padding.d.ts +8 -0
  357. package/lib/components/tools/watermark/watermark-padding.d.ts.map +1 -0
  358. package/lib/components/tools/watermark/watermark-padding.js +34 -29
  359. package/lib/components/tools/watermark/watermark.d.ts +3 -0
  360. package/lib/components/tools/watermark/watermark.d.ts.map +1 -0
  361. package/lib/components/tools/watermark/watermark.js +27 -21
  362. package/lib/components/tools/watermark/watermarks-gallery.d.ts +7 -0
  363. package/lib/components/tools/watermark/watermarks-gallery.d.ts.map +1 -0
  364. package/lib/components/tools/watermark/watermarks-gallery.js +22 -18
  365. package/lib/components/tools-bar/index.d.ts +3 -0
  366. package/lib/components/tools-bar/index.d.ts.map +1 -0
  367. package/lib/components/tools-bar/index.js +21 -18
  368. package/lib/components/tools-bar/tools-bar-item-button.d.ts +23 -0
  369. package/lib/components/tools-bar/tools-bar-item-button.d.ts.map +1 -0
  370. package/lib/components/tools-bar/tools-bar-item-button.js +9 -6
  371. package/lib/components/topbar/canvas-zooming.d.ts +3 -0
  372. package/lib/components/topbar/canvas-zooming.d.ts.map +1 -0
  373. package/lib/components/topbar/canvas-zooming.js +50 -42
  374. package/lib/components/topbar/confirmation-modal.d.ts +8 -0
  375. package/lib/components/topbar/confirmation-modal.d.ts.map +1 -0
  376. package/lib/components/topbar/confirmation-modal.js +24 -17
  377. package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts +3 -0
  378. package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts.map +1 -0
  379. package/lib/components/topbar/image-dimensions-and-display-toggle.js +16 -12
  380. package/lib/components/topbar/index.d.ts +7 -0
  381. package/lib/components/topbar/index.d.ts.map +1 -0
  382. package/lib/components/topbar/index.js +29 -24
  383. package/lib/components/topbar/redo-button.d.ts +3 -0
  384. package/lib/components/topbar/redo-button.d.ts.map +1 -0
  385. package/lib/components/topbar/redo-button.js +5 -3
  386. package/lib/components/topbar/reset-button.d.ts +3 -0
  387. package/lib/components/topbar/reset-button.d.ts.map +1 -0
  388. package/lib/components/topbar/reset-button.js +11 -8
  389. package/lib/components/topbar/save-button.d.ts +3 -0
  390. package/lib/components/topbar/save-button.d.ts.map +1 -0
  391. package/lib/components/topbar/save-button.js +61 -52
  392. package/lib/components/topbar/topbar.constants.d.ts +8 -0
  393. package/lib/components/topbar/topbar.constants.d.ts.map +1 -0
  394. package/lib/components/topbar/undo-button.d.ts +3 -0
  395. package/lib/components/topbar/undo-button.d.ts.map +1 -0
  396. package/lib/components/topbar/undo-button.js +5 -3
  397. package/lib/context/app-context.d.ts +14 -0
  398. package/lib/context/app-context.d.ts.map +1 -0
  399. package/lib/context/app-provider-overriden-value.d.ts +11 -0
  400. package/lib/context/app-provider-overriden-value.d.ts.map +1 -0
  401. package/lib/context/app-provider-overriden-value.js +5 -3
  402. package/lib/context/app-provider.d.ts +10 -0
  403. package/lib/context/app-provider.d.ts.map +1 -0
  404. package/lib/context/app-provider.js +5 -3
  405. package/lib/context/app-reducer.d.ts +5 -0
  406. package/lib/context/app-reducer.d.ts.map +1 -0
  407. package/lib/context/default-config.d.ts +4 -0
  408. package/lib/context/default-config.d.ts.map +1 -0
  409. package/lib/context/default-translations.d.ts +3 -0
  410. package/lib/context/default-translations.d.ts.map +1 -0
  411. package/lib/context/get-initial-app-state.d.ts +5 -0
  412. package/lib/context/get-initial-app-state.d.ts.map +1 -0
  413. package/lib/context/index.d.ts +5 -0
  414. package/lib/context/index.d.ts.map +1 -0
  415. package/lib/custom/filters/aden.d.ts +14 -0
  416. package/lib/custom/filters/aden.d.ts.map +1 -0
  417. package/lib/custom/filters/amaro.d.ts +14 -0
  418. package/lib/custom/filters/amaro.d.ts.map +1 -0
  419. package/lib/custom/filters/ashby.d.ts +14 -0
  420. package/lib/custom/filters/ashby.d.ts.map +1 -0
  421. package/lib/custom/filters/base-filters.d.ts +14 -0
  422. package/lib/custom/filters/base-filters.d.ts.map +1 -0
  423. package/lib/custom/filters/black-and-white.d.ts +14 -0
  424. package/lib/custom/filters/black-and-white.d.ts.map +1 -0
  425. package/lib/custom/filters/brannan.d.ts +14 -0
  426. package/lib/custom/filters/brannan.d.ts.map +1 -0
  427. package/lib/custom/filters/brooklyn.d.ts +14 -0
  428. package/lib/custom/filters/brooklyn.d.ts.map +1 -0
  429. package/lib/custom/filters/charmes.d.ts +14 -0
  430. package/lib/custom/filters/charmes.d.ts.map +1 -0
  431. package/lib/custom/filters/clarendon.d.ts +14 -0
  432. package/lib/custom/filters/clarendon.d.ts.map +1 -0
  433. package/lib/custom/filters/crema.d.ts +14 -0
  434. package/lib/custom/filters/crema.d.ts.map +1 -0
  435. package/lib/custom/filters/dogpatch.d.ts +14 -0
  436. package/lib/custom/filters/dogpatch.d.ts.map +1 -0
  437. package/lib/custom/filters/earlybird.d.ts +14 -0
  438. package/lib/custom/filters/earlybird.d.ts.map +1 -0
  439. package/lib/custom/filters/gingham.d.ts +14 -0
  440. package/lib/custom/filters/gingham.d.ts.map +1 -0
  441. package/lib/custom/filters/ginza.d.ts +14 -0
  442. package/lib/custom/filters/ginza.d.ts.map +1 -0
  443. package/lib/custom/filters/hefe.d.ts +14 -0
  444. package/lib/custom/filters/hefe.d.ts.map +1 -0
  445. package/lib/custom/filters/helena.d.ts +14 -0
  446. package/lib/custom/filters/helena.d.ts.map +1 -0
  447. package/lib/custom/filters/hudson.d.ts +14 -0
  448. package/lib/custom/filters/hudson.d.ts.map +1 -0
  449. package/lib/custom/filters/index.d.ts +41 -0
  450. package/lib/custom/filters/index.d.ts.map +1 -0
  451. package/lib/custom/filters/juno.d.ts +14 -0
  452. package/lib/custom/filters/juno.d.ts.map +1 -0
  453. package/lib/custom/filters/kelvin.d.ts +14 -0
  454. package/lib/custom/filters/kelvin.d.ts.map +1 -0
  455. package/lib/custom/filters/lark.d.ts +14 -0
  456. package/lib/custom/filters/lark.d.ts.map +1 -0
  457. package/lib/custom/filters/lo-fi.d.ts +14 -0
  458. package/lib/custom/filters/lo-fi.d.ts.map +1 -0
  459. package/lib/custom/filters/ludwig.d.ts +14 -0
  460. package/lib/custom/filters/ludwig.d.ts.map +1 -0
  461. package/lib/custom/filters/maven.d.ts +14 -0
  462. package/lib/custom/filters/maven.d.ts.map +1 -0
  463. package/lib/custom/filters/mayfair.d.ts +14 -0
  464. package/lib/custom/filters/mayfair.d.ts.map +1 -0
  465. package/lib/custom/filters/moon.d.ts +14 -0
  466. package/lib/custom/filters/moon.d.ts.map +1 -0
  467. package/lib/custom/filters/nashville.d.ts +14 -0
  468. package/lib/custom/filters/nashville.d.ts.map +1 -0
  469. package/lib/custom/filters/ninteen-seventy-seven.d.ts +14 -0
  470. package/lib/custom/filters/ninteen-seventy-seven.d.ts.map +1 -0
  471. package/lib/custom/filters/perpetua.d.ts +14 -0
  472. package/lib/custom/filters/perpetua.d.ts.map +1 -0
  473. package/lib/custom/filters/reyes.d.ts +14 -0
  474. package/lib/custom/filters/reyes.d.ts.map +1 -0
  475. package/lib/custom/filters/rise.d.ts +14 -0
  476. package/lib/custom/filters/rise.d.ts.map +1 -0
  477. package/lib/custom/filters/sierra.d.ts +14 -0
  478. package/lib/custom/filters/sierra.d.ts.map +1 -0
  479. package/lib/custom/filters/skyline.d.ts +14 -0
  480. package/lib/custom/filters/skyline.d.ts.map +1 -0
  481. package/lib/custom/filters/slumber.d.ts +14 -0
  482. package/lib/custom/filters/slumber.d.ts.map +1 -0
  483. package/lib/custom/filters/stinson.d.ts +14 -0
  484. package/lib/custom/filters/stinson.d.ts.map +1 -0
  485. package/lib/custom/filters/sutro.d.ts +14 -0
  486. package/lib/custom/filters/sutro.d.ts.map +1 -0
  487. package/lib/custom/filters/toaster.d.ts +14 -0
  488. package/lib/custom/filters/toaster.d.ts.map +1 -0
  489. package/lib/custom/filters/valencia.d.ts +14 -0
  490. package/lib/custom/filters/valencia.d.ts.map +1 -0
  491. package/lib/custom/filters/vesper.d.ts +14 -0
  492. package/lib/custom/filters/vesper.d.ts.map +1 -0
  493. package/lib/custom/filters/walden.d.ts +14 -0
  494. package/lib/custom/filters/walden.d.ts.map +1 -0
  495. package/lib/custom/filters/willow.d.ts +14 -0
  496. package/lib/custom/filters/willow.d.ts.map +1 -0
  497. package/lib/custom/filters/xpro2.d.ts +14 -0
  498. package/lib/custom/filters/xpro2.d.ts.map +1 -0
  499. package/lib/custom/finetunes/custom-threshold.d.ts +15 -0
  500. package/lib/custom/finetunes/custom-threshold.d.ts.map +1 -0
  501. package/lib/custom/finetunes/index.d.ts +3 -0
  502. package/lib/custom/finetunes/index.d.ts.map +1 -0
  503. package/lib/custom/finetunes/warmth.d.ts +17 -0
  504. package/lib/custom/finetunes/warmth.d.ts.map +1 -0
  505. package/lib/demo/app.d.ts +6 -0
  506. package/lib/demo/app.d.ts.map +1 -0
  507. package/lib/demo/app.js +89 -77
  508. package/lib/demo/index.d.ts +2 -0
  509. package/lib/demo/index.d.ts.map +1 -0
  510. package/lib/hooks/index.d.ts +13 -0
  511. package/lib/hooks/index.d.ts.map +1 -0
  512. package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts +19 -0
  513. package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts.map +1 -0
  514. package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts +25 -0
  515. package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts.map +1 -0
  516. package/lib/hooks/use-annotation/index.d.ts +74 -0
  517. package/lib/hooks/use-annotation/index.d.ts.map +1 -0
  518. package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts +3 -0
  519. package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts.map +1 -0
  520. package/lib/hooks/use-annotation-events.d.ts +11 -0
  521. package/lib/hooks/use-annotation-events.d.ts.map +1 -0
  522. package/lib/hooks/use-app-reducer.d.ts +13 -0
  523. package/lib/hooks/use-app-reducer.d.ts.map +1 -0
  524. package/lib/hooks/use-debounced-callback.d.ts +5 -0
  525. package/lib/hooks/use-debounced-callback.d.ts.map +1 -0
  526. package/lib/hooks/use-drag.d.ts +8 -0
  527. package/lib/hooks/use-drag.d.ts.map +1 -0
  528. package/lib/hooks/use-filter.d.ts +4 -0
  529. package/lib/hooks/use-filter.d.ts.map +1 -0
  530. package/lib/hooks/use-finetune.d.ts +5 -0
  531. package/lib/hooks/use-finetune.d.ts.map +1 -0
  532. package/lib/hooks/use-phone-screen.d.ts +3 -0
  533. package/lib/hooks/use-phone-screen.d.ts.map +1 -0
  534. package/lib/hooks/use-popover.d.ts +11 -0
  535. package/lib/hooks/use-popover.d.ts.map +1 -0
  536. package/lib/hooks/use-resize-observer.d.ts +12 -0
  537. package/lib/hooks/use-resize-observer.d.ts.map +1 -0
  538. package/lib/hooks/use-store.d.ts +5 -0
  539. package/lib/hooks/use-store.d.ts.map +1 -0
  540. package/lib/hooks/use-transformed-img-data.d.ts +20 -0
  541. package/lib/hooks/use-transformed-img-data.d.ts.map +1 -0
  542. package/lib/hooks/use-update-effect.d.ts +5 -0
  543. package/lib/hooks/use-update-effect.d.ts.map +1 -0
  544. package/lib/index.d.ts +6 -0
  545. package/lib/index.d.ts.map +1 -0
  546. package/lib/types/actions.d.ts +204 -0
  547. package/lib/types/actions.d.ts.map +1 -0
  548. package/lib/types/annotations.d.ts +181 -0
  549. package/lib/types/annotations.d.ts.map +1 -0
  550. package/lib/types/common.d.ts +31 -0
  551. package/lib/types/common.d.ts.map +1 -0
  552. package/lib/types/config.d.ts +144 -0
  553. package/lib/types/config.d.ts.map +1 -0
  554. package/lib/types/index.d.ts +6 -0
  555. package/lib/types/index.d.ts.map +1 -0
  556. package/lib/types/state.d.ts +105 -0
  557. package/lib/types/state.d.ts.map +1 -0
  558. package/lib/utils/assign-finetune-names-to-konva.d.ts +3 -0
  559. package/lib/utils/assign-finetune-names-to-konva.d.ts.map +1 -0
  560. package/lib/utils/calculate-zoom-data.d.ts +9 -0
  561. package/lib/utils/calculate-zoom-data.d.ts.map +1 -0
  562. package/lib/utils/compare-ratios.d.ts +3 -0
  563. package/lib/utils/compare-ratios.d.ts.map +1 -0
  564. package/lib/utils/constants.d.ts +85 -0
  565. package/lib/utils/constants.d.ts.map +1 -0
  566. package/lib/utils/crop-image.d.ts +10 -0
  567. package/lib/utils/crop-image.d.ts.map +1 -0
  568. package/lib/utils/debounce.d.ts +3 -0
  569. package/lib/utils/debounce.d.ts.map +1 -0
  570. package/lib/utils/deep-merge.d.ts +3 -0
  571. package/lib/utils/deep-merge.d.ts.map +1 -0
  572. package/lib/utils/extract-current-design-state.d.ts +11 -0
  573. package/lib/utils/extract-current-design-state.d.ts.map +1 -0
  574. package/lib/utils/extract-name-from-url.d.ts +3 -0
  575. package/lib/utils/extract-name-from-url.d.ts.map +1 -0
  576. package/lib/utils/filter-str-to-class.d.ts +4 -0
  577. package/lib/utils/filter-str-to-class.d.ts.map +1 -0
  578. package/lib/utils/finetunes-strs-to-classes.d.ts +4 -0
  579. package/lib/utils/finetunes-strs-to-classes.d.ts.map +1 -0
  580. package/lib/utils/get-center-rotated-point.d.ts +8 -0
  581. package/lib/utils/get-center-rotated-point.d.ts.map +1 -0
  582. package/lib/utils/get-default-save-quality.d.ts +3 -0
  583. package/lib/utils/get-default-save-quality.d.ts.map +1 -0
  584. package/lib/utils/get-dimensions-minimal-ratio.d.ts +3 -0
  585. package/lib/utils/get-dimensions-minimal-ratio.d.ts.map +1 -0
  586. package/lib/utils/get-elem-document-coords.d.ts +9 -0
  587. package/lib/utils/get-elem-document-coords.d.ts.map +1 -0
  588. package/lib/utils/get-file-full-name.d.ts +8 -0
  589. package/lib/utils/get-file-full-name.d.ts.map +1 -0
  590. package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts +21 -0
  591. package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts.map +1 -0
  592. package/lib/utils/get-proper-dimensions.d.ts +11 -0
  593. package/lib/utils/get-proper-dimensions.d.ts.map +1 -0
  594. package/lib/utils/get-proper-image-to-canvas-spacing.d.ts +3 -0
  595. package/lib/utils/get-proper-image-to-canvas-spacing.d.ts.map +1 -0
  596. package/lib/utils/get-scroll-offset.d.ts +7 -0
  597. package/lib/utils/get-scroll-offset.d.ts.map +1 -0
  598. package/lib/utils/get-size-after-rotation.d.ts +9 -0
  599. package/lib/utils/get-size-after-rotation.d.ts.map +1 -0
  600. package/lib/utils/get-zoom-fit-factor.d.ts +4 -0
  601. package/lib/utils/get-zoom-fit-factor.d.ts.map +1 -0
  602. package/lib/utils/image-to-base64.d.ts +3 -0
  603. package/lib/utils/image-to-base64.d.ts.map +1 -0
  604. package/lib/utils/is-default-zero-values-only.d.ts +3 -0
  605. package/lib/utils/is-default-zero-values-only.d.ts.map +1 -0
  606. package/lib/utils/is-same-image.d.ts +3 -0
  607. package/lib/utils/is-same-image.d.ts.map +1 -0
  608. package/lib/utils/load-image.d.ts +3 -0
  609. package/lib/utils/load-image.d.ts.map +1 -0
  610. package/lib/utils/map-crop-box.d.ts +16 -0
  611. package/lib/utils/map-crop-box.d.ts.map +1 -0
  612. package/lib/utils/map-number.d.ts +3 -0
  613. package/lib/utils/map-number.d.ts.map +1 -0
  614. package/lib/utils/map-position-string-to-point.d.ts +8 -0
  615. package/lib/utils/map-position-string-to-point.d.ts.map +1 -0
  616. package/lib/utils/random-id.d.ts +3 -0
  617. package/lib/utils/random-id.d.ts.map +1 -0
  618. package/lib/utils/restrict-number.d.ts +3 -0
  619. package/lib/utils/restrict-number.d.ts.map +1 -0
  620. package/lib/utils/serialize-design-state.d.ts +27 -0
  621. package/lib/utils/serialize-design-state.d.ts.map +1 -0
  622. package/lib/utils/to-precised-float.d.ts +3 -0
  623. package/lib/utils/to-precised-float.d.ts.map +1 -0
  624. package/lib/utils/translator.d.ts +3 -0
  625. package/lib/utils/translator.d.ts.map +1 -0
  626. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ /** External Dependencies */
2
+ import { Reducer } from 'react';
3
+ import { AppState } from 'types/state';
4
+ import { Action, Dispatch } from 'types/actions';
5
+ import { ImageEditorConfig } from 'types/config';
6
+ /**
7
+ * A normal react useReducer wrapped inside our own UNDO/REDO Reducer as middleware
8
+ * for updating the UNDO/REDO states automatically
9
+ *
10
+ */
11
+ declare const useAppReducer: (reducer: Reducer<AppState, Action>, initialState: AppState, passedConfig?: Partial<ImageEditorConfig>) => [AppState, Dispatch];
12
+ export default useAppReducer;
13
+ //# sourceMappingURL=use-app-reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-app-reducer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-app-reducer.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAc,OAAO,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAgBjD;;;;GAIG;AAEH,QAAA,MAAM,aAAa,GACjB,SAAS,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,EAClC,cAAc,QAAQ,EACtB,eAAc,OAAO,CAAC,iBAAiB,CAAM,KAC5C,CAAC,QAAQ,EAAE,QAAQ,CAmDrB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** External Dependencies */
2
+ import { DependencyList } from 'react';
3
+ declare const useDebouncedCallback: <T extends (...args: any[]) => any>(func: T, timeout: number, dependencies?: DependencyList) => ((...args: Parameters<T>) => void);
4
+ export default useDebouncedCallback;
5
+ //# sourceMappingURL=use-debounced-callback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debounced-callback.d.ts","sourceRoot":"","sources":["../../src/hooks/use-debounced-callback.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAKpD,QAAA,MAAM,oBAAoB,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC7D,MAAM,CAAC,EACP,SAAS,MAAM,EACf,eAAc,cAAmB,KAChC,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAEnC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ type DragEventHandler = (e: MouseEvent | Touch) => void;
2
+ interface DragHandlers {
3
+ onMouseDown: (e: MouseEvent | TouchEvent) => void;
4
+ onTouchStart: (e: MouseEvent | TouchEvent) => void;
5
+ }
6
+ declare const useDrag: (onMove?: DragEventHandler, onStart?: DragEventHandler, onEnd?: DragEventHandler) => DragHandlers;
7
+ export default useDrag;
8
+ //# sourceMappingURL=use-drag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag.d.ts","sourceRoot":"","sources":["../../src/hooks/use-drag.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,KAAK,IAAI,CAAC;AAExD,UAAU,YAAY;IACpB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,CAAC;IAClD,YAAY,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,OAAO,GACX,SAAS,gBAAgB,EACzB,UAAU,gBAAgB,EAC1B,QAAQ,gBAAgB,KACvB,YAwCF,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Filter } from 'konva/lib/Node';
2
+ declare const useFilter: () => [Filter | null, (filterToApply: Filter | null) => void];
3
+ export default useFilter;
4
+ //# sourceMappingURL=use-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-filter.d.ts","sourceRoot":"","sources":["../../src/hooks/use-filter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAMxC,QAAA,MAAM,SAAS,QAAO,CACpB,MAAM,GAAG,IAAI,EACb,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAcvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Filter } from 'konva/lib/Node';
2
+ import { FinetunesProps } from 'types/state';
3
+ declare const useFinetune: (finetune: Filter, initialProps: FinetunesProps) => [FinetunesProps, (newFinetuneProps: FinetunesProps) => void];
4
+ export default useFinetune;
5
+ //# sourceMappingURL=use-finetune.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-finetune.d.ts","sourceRoot":"","sources":["../../src/hooks/use-finetune.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAKxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,QAAA,MAAM,WAAW,GACf,UAAU,MAAM,EAChB,cAAc,cAAc,KAC3B,CAAC,cAAc,EAAE,CAAC,gBAAgB,EAAE,cAAc,KAAK,IAAI,CAiC7D,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const usePhoneScreen: (screenWidth?: number) => boolean;
2
+ export default usePhoneScreen;
3
+ //# sourceMappingURL=use-phone-screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-phone-screen.d.ts","sourceRoot":"","sources":["../../src/hooks/use-phone-screen.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,GAAI,cAAa,MAAY,KAAG,OACQ,CAAC;AAE7D,eAAe,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { MouseEvent } from 'react';
2
+ interface PopoverState {
3
+ anchorEl: HTMLElement | null;
4
+ open: boolean;
5
+ handleOpen: (event: MouseEvent<HTMLElement>) => void;
6
+ handleClose: () => void;
7
+ handleToggle: (event: MouseEvent<HTMLElement>) => void;
8
+ }
9
+ declare const usePopover: () => PopoverState;
10
+ export default usePopover;
11
+ //# sourceMappingURL=use-popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-popover.d.ts","sourceRoot":"","sources":["../../src/hooks/use-popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1D,UAAU,YAAY;IACpB,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACxD;AAED,QAAA,MAAM,UAAU,QAAO,YAsBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,12 @@
1
+ interface ResizeCallbackData {
2
+ entry: ResizeObserverEntry;
3
+ width: number;
4
+ height: number;
5
+ }
6
+ type OnResizeCallback = (data: ResizeCallbackData) => void;
7
+ type ObserveElementFn = (element: Element, newOnResizeCallback?: OnResizeCallback) => void;
8
+ type UnobserveElementFn = (element: Element, newOnResizeCallback?: OnResizeCallback) => void;
9
+ type UpdateOnResizeCallbackFn = (newOnResizeCallback: OnResizeCallback) => void;
10
+ declare const useResizeObserver: (onResize?: OnResizeCallback) => [ObserveElementFn, UnobserveElementFn, UpdateOnResizeCallbackFn];
11
+ export default useResizeObserver;
12
+ //# sourceMappingURL=use-resize-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resize-observer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-resize-observer.ts"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAE3D,KAAK,gBAAgB,GAAG,CACtB,OAAO,EAAE,OAAO,EAChB,mBAAmB,CAAC,EAAE,gBAAgB,KACnC,IAAI,CAAC;AACV,KAAK,kBAAkB,GAAG,CACxB,OAAO,EAAE,OAAO,EAChB,mBAAmB,CAAC,EAAE,gBAAgB,KACnC,IAAI,CAAC;AACV,KAAK,wBAAwB,GAAG,CAAC,mBAAmB,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEhF,QAAA,MAAM,iBAAiB,GACrB,WAAU,gBAA2B,KACpC,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,wBAAwB,CA8EjE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Internal Dependencies */
2
+ import { AppContextValue } from 'context/app-context';
3
+ declare const useStore: () => AppContextValue;
4
+ export default useStore;
5
+ //# sourceMappingURL=use-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-store.d.ts","sourceRoot":"","sources":["../../src/hooks/use-store.ts"],"names":[],"mappings":"AAGA,4BAA4B;AAC5B,OAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElE,QAAA,MAAM,QAAQ,QAAO,eAAyC,CAAC;AAC/D,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { SavedImageData } from 'types/common';
2
+ import { ImageDesignState } from 'types/state';
3
+ interface ImageFileInfo {
4
+ name?: string;
5
+ extension?: string;
6
+ quality?: number;
7
+ size?: {
8
+ width?: number;
9
+ height?: number;
10
+ };
11
+ }
12
+ interface TransformedImgResult {
13
+ imageData: SavedImageData | Record<string, any>;
14
+ designState: ImageDesignState;
15
+ hideLoadingSpinner?: () => void;
16
+ }
17
+ type GetTransformedDataFn = (imageFileInfo?: ImageFileInfo, pixelRatio?: boolean | number, keepLoadingSpinnerShown?: boolean) => TransformedImgResult;
18
+ declare const useTransformedImgData: () => GetTransformedDataFn;
19
+ export default useTransformedImgData;
20
+ //# sourceMappingURL=use-transformed-img-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transformed-img-data.d.ts","sourceRoot":"","sources":["../../src/hooks/use-transformed-img-data.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAY/C,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChD,WAAW,EAAE,gBAAgB,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,KAAK,oBAAoB,GAAG,CAC1B,aAAa,CAAC,EAAE,aAAa,EAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,EAC7B,uBAAuB,CAAC,EAAE,OAAO,KAC9B,oBAAoB,CAAC;AAE1B,QAAA,MAAM,qBAAqB,QAAO,oBAkLjC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** External Dependencies */
2
+ import { DependencyList, EffectCallback } from 'react';
3
+ declare const useUpdateEffect: (effectCallback: EffectCallback, dependencies: DependencyList) => void;
4
+ export default useUpdateEffect;
5
+ //# sourceMappingURL=use-update-effect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-update-effect.d.ts","sourceRoot":"","sources":["../../src/hooks/use-update-effect.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE1E,QAAA,MAAM,eAAe,GACnB,gBAAgB,cAAc,EAC9B,cAAc,cAAc,KAC3B,IAmBF,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /** Internal Dependencies */
2
+ import ImageEditor from 'components/assembly-point';
3
+ import { TABS_IDS, TOOLS_IDS } from 'utils/constants';
4
+ export { TABS_IDS as TABS, TOOLS_IDS as TOOLS };
5
+ export default ImageEditor;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,QAAQ,IAAI,IAAI,EAAE,SAAS,IAAI,KAAK,EAAE,CAAC;AAChD,eAAe,WAAW,CAAC"}
@@ -0,0 +1,204 @@
1
+ import { Annotation } from './annotations';
2
+ import { AppState, CropConfig, FinetunesProps, ResizeConfig, ZoomConfig } from './state';
3
+ import { Dimensions, ScaledDimensions } from './common';
4
+ export declare const SET_ORIGINAL_IMAGE = "SET_ORIGINAL_IMAGE";
5
+ export declare const SET_FEEDBACK = "SET_FEEDBACK";
6
+ export declare const SHOW_LOADER = "SHOW_LOADER";
7
+ export declare const HIDE_LOADER = "HIDE_LOADER";
8
+ export declare const CHANGE_POINTER_ICON = "CHANGE_POINTER_ICON";
9
+ export declare const SELECT_ANNOTATION = "SELECT_ANNOTATION";
10
+ export declare const CLEAR_ANNOTATIONS_SELECTIONS = "CLEAR_ANNOTATIONS_SELECTIONS";
11
+ export declare const TOGGLE_ORIGINAL_IMAGE_DISPLAY = "TOGGLE_ORIGINAL_IMAGE_DISPLAY";
12
+ export declare const SELECT_TAB = "SELECT_TAB";
13
+ export declare const SELECT_TOOL = "SELECT_TOOL";
14
+ export declare const ZOOM_CANVAS = "ZOOM_CANVAS";
15
+ export declare const SET_CANVAS_SIZE = "SET_CANVAS_SIZE";
16
+ export declare const SET_SHOWN_IMAGE_DIMENSIONS = "SET_SHOWN_IMAGE_DIMENSIONS";
17
+ export declare const ENABLE_TEXT_CONTENT_EDIT = "ENABLE_TEXT_CONTENT_EDIT";
18
+ export declare const SET_LATEST_COLOR = "SET_LATEST_COLOR";
19
+ export declare const SET_SHOWN_TABS_MENU = "SET_SHOWN_TABS_MENU";
20
+ export declare const SET_SAVING = "SET_SAVING";
21
+ export declare const ADD_FILTER = "ADD_FILTER";
22
+ export declare const SET_FINETUNE = "SET_FINETUNE";
23
+ export declare const SET_ANNOTATION = "SET_ANNOTATION";
24
+ export declare const SET_CROP = "SET_CROP";
25
+ export declare const CHANGE_ROTATION = "CHANGE_ROTATION";
26
+ export declare const TOGGLE_FLIP = "TOGGLE_FLIP";
27
+ export declare const SET_RESIZE = "SET_RESIZE";
28
+ export declare const REMOVE_ANNOTATIONS = "REMOVE_ANNOTATIONS";
29
+ export declare const DUPLICATE_ANNOTATIONS = "DUPLICATE_ANNOTATIONS";
30
+ export declare const UNDO = "UNDO";
31
+ export declare const REDO = "REDO";
32
+ export declare const RESET = "RESET";
33
+ export declare const SET_SAVED = "SET_SAVED";
34
+ export declare const UPDATE_STATE = "UPDATE_STATE";
35
+ export interface SetOriginalImagePayload {
36
+ originalImage: HTMLImageElement;
37
+ originalImageDimensions?: Dimensions;
38
+ }
39
+ export interface SetFeedbackPayload {
40
+ feedback: {
41
+ message: string;
42
+ duration?: number;
43
+ };
44
+ }
45
+ export interface ChangePointerIconPayload {
46
+ pointerCssIcon: string;
47
+ }
48
+ export interface SelectAnnotationPayload {
49
+ annotationId: string | string[];
50
+ multiple?: boolean;
51
+ }
52
+ export interface SelectTabPayload {
53
+ tabId: string;
54
+ }
55
+ export interface SelectToolPayload {
56
+ toolId: string | null;
57
+ }
58
+ export type ZoomCanvasPayload = Partial<ZoomConfig>;
59
+ export interface SetCanvasSizePayload {
60
+ canvasWidth: number;
61
+ canvasHeight: number;
62
+ }
63
+ export type SetShownImageDimensionsPayload = ScaledDimensions;
64
+ export interface EnableTextContentEditPayload {
65
+ annotationId: string;
66
+ }
67
+ export interface SetLatestColorPayload {
68
+ latestColors: Record<string, string>;
69
+ }
70
+ export interface SetShowTabsMenuPayload {
71
+ showTabsMenu: boolean;
72
+ }
73
+ export interface SetSavingPayload {
74
+ isSaving: boolean;
75
+ }
76
+ export interface AddFilterPayload {
77
+ filterName: string;
78
+ }
79
+ export interface SetFinetunePayload {
80
+ finetuneName: string;
81
+ finetuneValue: number | FinetunesProps;
82
+ }
83
+ export interface SetAnnotationPayload {
84
+ annotation: Annotation;
85
+ dismissHistory?: boolean;
86
+ }
87
+ export interface ChangeRotationPayload {
88
+ rotation: number;
89
+ dismissHistory?: boolean;
90
+ }
91
+ export interface ToggleFlipPayload {
92
+ direction: 'X' | 'Y';
93
+ }
94
+ export type SetResizePayload = Partial<ResizeConfig>;
95
+ export interface RemoveAnnotationsPayload {
96
+ annotationsIds?: string[];
97
+ }
98
+ export interface DuplicateAnnotationsPayload {
99
+ annotationsIds?: string[];
100
+ }
101
+ export interface SetSavedPayload {
102
+ isSaved: boolean;
103
+ haveNotSavedChanges?: boolean;
104
+ }
105
+ export type UpdateStatePayload = Partial<AppState>;
106
+ export type Action = {
107
+ type: typeof SET_ORIGINAL_IMAGE;
108
+ payload: SetOriginalImagePayload;
109
+ } | {
110
+ type: typeof SET_FEEDBACK;
111
+ payload: SetFeedbackPayload;
112
+ } | {
113
+ type: typeof SHOW_LOADER;
114
+ payload?: undefined;
115
+ } | {
116
+ type: typeof HIDE_LOADER;
117
+ payload?: undefined;
118
+ } | {
119
+ type: typeof CHANGE_POINTER_ICON;
120
+ payload: ChangePointerIconPayload;
121
+ } | {
122
+ type: typeof SELECT_ANNOTATION;
123
+ payload: SelectAnnotationPayload;
124
+ } | {
125
+ type: typeof CLEAR_ANNOTATIONS_SELECTIONS;
126
+ payload?: undefined;
127
+ } | {
128
+ type: typeof TOGGLE_ORIGINAL_IMAGE_DISPLAY;
129
+ payload?: undefined;
130
+ } | {
131
+ type: typeof SELECT_TAB;
132
+ payload: SelectTabPayload;
133
+ } | {
134
+ type: typeof SELECT_TOOL;
135
+ payload: SelectToolPayload;
136
+ } | {
137
+ type: typeof ZOOM_CANVAS;
138
+ payload: ZoomCanvasPayload;
139
+ } | {
140
+ type: typeof SET_CANVAS_SIZE;
141
+ payload: SetCanvasSizePayload;
142
+ } | {
143
+ type: typeof SET_SHOWN_IMAGE_DIMENSIONS;
144
+ payload: SetShownImageDimensionsPayload;
145
+ } | {
146
+ type: typeof ENABLE_TEXT_CONTENT_EDIT;
147
+ payload: EnableTextContentEditPayload;
148
+ } | {
149
+ type: typeof SET_LATEST_COLOR;
150
+ payload: SetLatestColorPayload;
151
+ } | {
152
+ type: typeof SET_SHOWN_TABS_MENU;
153
+ payload: SetShowTabsMenuPayload;
154
+ } | {
155
+ type: typeof SET_SAVING;
156
+ payload: SetSavingPayload;
157
+ } | {
158
+ type: typeof ADD_FILTER;
159
+ payload: AddFilterPayload;
160
+ } | {
161
+ type: typeof SET_FINETUNE;
162
+ payload: SetFinetunePayload;
163
+ } | {
164
+ type: typeof SET_ANNOTATION;
165
+ payload: SetAnnotationPayload;
166
+ } | {
167
+ type: typeof SET_CROP;
168
+ payload: CropConfig;
169
+ } | {
170
+ type: typeof CHANGE_ROTATION;
171
+ payload: ChangeRotationPayload;
172
+ } | {
173
+ type: typeof TOGGLE_FLIP;
174
+ payload: ToggleFlipPayload;
175
+ } | {
176
+ type: typeof SET_RESIZE;
177
+ payload: SetResizePayload;
178
+ } | {
179
+ type: typeof REMOVE_ANNOTATIONS;
180
+ payload: RemoveAnnotationsPayload;
181
+ } | {
182
+ type: typeof DUPLICATE_ANNOTATIONS;
183
+ payload: DuplicateAnnotationsPayload;
184
+ } | {
185
+ type: typeof UNDO;
186
+ payload?: undefined;
187
+ } | {
188
+ type: typeof REDO;
189
+ payload?: undefined;
190
+ } | {
191
+ type: typeof RESET;
192
+ payload?: undefined;
193
+ } | {
194
+ type: typeof SET_SAVED;
195
+ payload: SetSavedPayload;
196
+ } | {
197
+ type: typeof UPDATE_STATE;
198
+ payload: UpdateStatePayload;
199
+ };
200
+ export type Dispatch = (action: {
201
+ type: string;
202
+ payload?: any;
203
+ }) => void;
204
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGxD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAC3E,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM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AAE,GACpD;IAAE,IAAI,EAAE,OAAO,YAAY,CAAC;IAAC,OAAO,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAG/D,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,KAAK,IAAI,CAAC"}
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Base properties shared by all annotations in the canvas
3
+ * Note: Using built-in CanvasLineCap type from TypeScript DOM library
4
+ */
5
+ export interface BaseAnnotation {
6
+ id: string;
7
+ x: number;
8
+ y: number;
9
+ scaleX?: number;
10
+ scaleY?: number;
11
+ rotation?: number;
12
+ opacity?: number;
13
+ fill?: string;
14
+ stroke?: string;
15
+ strokeWidth?: number;
16
+ shadowOffsetX?: number;
17
+ shadowOffsetY?: number;
18
+ shadowBlur?: number;
19
+ shadowColor?: string;
20
+ shadowOpacity?: number;
21
+ padding?: number;
22
+ }
23
+ /**
24
+ * Text alignment options
25
+ */
26
+ export declare enum TextAlignment {
27
+ LEFT = "left",
28
+ CENTER = "center",
29
+ RIGHT = "right"
30
+ }
31
+ /**
32
+ * Text annotation with typography properties
33
+ */
34
+ export interface TextAnnotation extends BaseAnnotation {
35
+ name: 'Text';
36
+ width: number;
37
+ height: number;
38
+ text?: string;
39
+ fontFamily?: string;
40
+ fontSize?: number;
41
+ letterSpacing?: number;
42
+ lineHeight?: number;
43
+ align?: TextAlignment;
44
+ fontStyle?: 'normal' | 'bold' | 'italic' | 'bold italic';
45
+ }
46
+ /**
47
+ * Image annotation with upload/gallery support
48
+ */
49
+ export interface ImageAnnotation extends BaseAnnotation {
50
+ name: 'Image';
51
+ width: number;
52
+ height: number;
53
+ image?: string | HTMLImageElement;
54
+ disableUpload?: boolean;
55
+ gallery?: {
56
+ originalUrl: string;
57
+ previewUrl: string;
58
+ }[];
59
+ }
60
+ /**
61
+ * Rectangle annotation with optional rounded corners
62
+ */
63
+ export interface RectAnnotation extends BaseAnnotation {
64
+ name: 'Rect';
65
+ width: number;
66
+ height: number;
67
+ cornerRadius?: number;
68
+ }
69
+ /**
70
+ * Polygon annotation (triangle, pentagon, hexagon, etc.)
71
+ */
72
+ export interface PolygonAnnotation extends BaseAnnotation {
73
+ name: 'Polygon';
74
+ radius: number;
75
+ sides?: number;
76
+ }
77
+ /**
78
+ * Ellipse/Circle annotation
79
+ */
80
+ export interface EllipseAnnotation extends BaseAnnotation {
81
+ name: 'Ellipse';
82
+ radiusX: number;
83
+ radiusY: number;
84
+ }
85
+ /**
86
+ * Free-hand pen/drawing annotation
87
+ */
88
+ export interface PenAnnotation extends BaseAnnotation {
89
+ name: 'Pen';
90
+ points: number[];
91
+ tension?: number;
92
+ lineCap?: CanvasLineCap;
93
+ selectAnnotationAfterDrawing?: boolean;
94
+ }
95
+ /**
96
+ * Straight line annotation
97
+ */
98
+ export interface LineAnnotation extends BaseAnnotation {
99
+ name: 'Line';
100
+ points: number[];
101
+ lineCap?: CanvasLineCap;
102
+ }
103
+ /**
104
+ * Arrow annotation with configurable pointer
105
+ */
106
+ export interface ArrowAnnotation extends BaseAnnotation {
107
+ name: 'Arrow';
108
+ points: number[];
109
+ lineCap?: CanvasLineCap;
110
+ pointerLength?: number;
111
+ pointerWidth?: number;
112
+ }
113
+ /**
114
+ * Discriminated union of all annotation types
115
+ * Use the `name` property for type narrowing:
116
+ *
117
+ * @example
118
+ * if (annotation.name === 'Text') {
119
+ * // TypeScript knows annotation is TextAnnotation
120
+ * console.log(annotation.text, annotation.fontSize);
121
+ * }
122
+ *
123
+ * @example
124
+ * switch (annotation.name) {
125
+ * case 'Image':
126
+ * return <ImageNode {...annotation} />;
127
+ * case 'Text':
128
+ * return <TextNode {...annotation} />;
129
+ * // ... etc
130
+ * }
131
+ */
132
+ export type Annotation = TextAnnotation | ImageAnnotation | RectAnnotation | PolygonAnnotation | EllipseAnnotation | PenAnnotation | LineAnnotation | ArrowAnnotation;
133
+ /**
134
+ * Map of annotation IDs to annotation objects
135
+ */
136
+ export interface AnnotationsMap {
137
+ [annotationId: string]: Annotation;
138
+ }
139
+ /**
140
+ * Common annotation properties that can be shared across types
141
+ * Useful for default configs and partial updates
142
+ */
143
+ export interface AnnotationsCommon {
144
+ fill?: string;
145
+ stroke?: string;
146
+ strokeWidth?: number;
147
+ shadowOffsetX?: number;
148
+ shadowOffsetY?: number;
149
+ shadowBlur?: number;
150
+ shadowColor?: string;
151
+ shadowOpacity?: number;
152
+ opacity?: number;
153
+ }
154
+ /**
155
+ * Type guard to check if an annotation has specific properties
156
+ */
157
+ export declare function isTextAnnotation(annotation: Annotation): annotation is TextAnnotation;
158
+ export declare function isImageAnnotation(annotation: Annotation): annotation is ImageAnnotation;
159
+ export declare function isRectAnnotation(annotation: Annotation): annotation is RectAnnotation;
160
+ export declare function isPolygonAnnotation(annotation: Annotation): annotation is PolygonAnnotation;
161
+ export declare function isEllipseAnnotation(annotation: Annotation): annotation is EllipseAnnotation;
162
+ export declare function isPenAnnotation(annotation: Annotation): annotation is PenAnnotation;
163
+ export declare function isLineAnnotation(annotation: Annotation): annotation is LineAnnotation;
164
+ export declare function isArrowAnnotation(annotation: Annotation): annotation is ArrowAnnotation;
165
+ /**
166
+ * Check if annotation has dimensional properties (width/height)
167
+ */
168
+ export declare function hasDimensions(annotation: Annotation): annotation is TextAnnotation | ImageAnnotation | RectAnnotation;
169
+ /**
170
+ * Check if annotation has points (Line-based shapes)
171
+ */
172
+ export declare function hasPoints(annotation: Annotation): annotation is PenAnnotation | LineAnnotation | ArrowAnnotation;
173
+ /**
174
+ * Check if annotation has radius (circular shapes)
175
+ */
176
+ export declare function hasRadius(annotation: Annotation): annotation is PolygonAnnotation;
177
+ /**
178
+ * Check if annotation has radii (elliptical shapes)
179
+ */
180
+ export declare function hasRadii(annotation: Annotation): annotation is EllipseAnnotation;
181
+ //# sourceMappingURL=annotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.d.ts","sourceRoot":"","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CAC9B,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,cAAc,CAE9B;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,eAAe,CAE/B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,cAAc,GAAG,eAAe,GAAG,cAAc,CAMjE;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,aAAa,GAAG,cAAc,GAAG,eAAe,CAMhE;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,iBAAiB,CAEjC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,iBAAiB,CAEjC"}
@@ -0,0 +1,31 @@
1
+ export interface Dimensions {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export interface ScaledDimensions extends Dimensions {
6
+ scaledBy: number;
7
+ abstractX?: number;
8
+ abstractY?: number;
9
+ }
10
+ export interface SavedImageData {
11
+ name: string;
12
+ extension: string;
13
+ mimeType: string;
14
+ fullName?: string;
15
+ height?: number;
16
+ width?: number;
17
+ imageBase64?: string;
18
+ imageCanvas?: HTMLCanvasElement;
19
+ quality?: number;
20
+ }
21
+ export interface CropPresetItem {
22
+ titleKey: string;
23
+ width?: number;
24
+ height?: number;
25
+ ratio?: string | number;
26
+ descriptionKey?: string;
27
+ icon?: React.ElementType;
28
+ disableManualResize?: boolean;
29
+ noEffect?: boolean;
30
+ }
31
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}