@solostylist/image-editor 1.0.0 → 1.0.2

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 (605) 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-flip.js +1 -1
  58. package/lib/actions/toggle-original-image-display.d.ts +8 -0
  59. package/lib/actions/toggle-original-image-display.d.ts.map +1 -0
  60. package/lib/actions/undo.d.ts +5 -0
  61. package/lib/actions/undo.d.ts.map +1 -0
  62. package/lib/actions/update-state.d.ts +7 -0
  63. package/lib/actions/update-state.d.ts.map +1 -0
  64. package/lib/actions/zoom-canvas.d.ts +10 -0
  65. package/lib/actions/zoom-canvas.d.ts.map +1 -0
  66. package/lib/components/app/index.d.ts +3 -0
  67. package/lib/components/app/index.d.ts.map +1 -0
  68. package/lib/components/app/index.js +1 -1
  69. package/lib/components/assembly-point/index.d.ts +9 -0
  70. package/lib/components/assembly-point/index.d.ts.map +1 -0
  71. package/lib/components/assembly-point/index.js +1 -1
  72. package/lib/components/common/annotation-options/annotation-options.constants.d.ts +9 -0
  73. package/lib/components/common/annotation-options/annotation-options.constants.d.ts.map +1 -0
  74. package/lib/components/common/annotation-options/index.d.ts +21 -0
  75. package/lib/components/common/annotation-options/index.d.ts.map +1 -0
  76. package/lib/components/common/annotation-options/index.js +1 -1
  77. package/lib/components/common/annotation-options/opacity-field.d.ts +10 -0
  78. package/lib/components/common/annotation-options/opacity-field.d.ts.map +1 -0
  79. package/lib/components/common/annotation-options/opacity-field.js +1 -1
  80. package/lib/components/common/annotation-options/position-fields.d.ts +8 -0
  81. package/lib/components/common/annotation-options/position-fields.d.ts.map +1 -0
  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 +1 -1
  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/button-with-menu/index.d.ts +16 -0
  88. package/lib/components/common/button-with-menu/index.d.ts.map +1 -0
  89. package/lib/components/common/color-input/index.d.ts +8 -0
  90. package/lib/components/common/color-input/index.d.ts.map +1 -0
  91. package/lib/components/common/color-input/index.js +1 -1
  92. package/lib/components/common/color-picker-modal/index.d.ts +10 -0
  93. package/lib/components/common/color-picker-modal/index.d.ts.map +1 -0
  94. package/lib/components/common/hidden-upload-input/index.d.ts +3 -0
  95. package/lib/components/common/hidden-upload-input/index.d.ts.map +1 -0
  96. package/lib/components/common/icon-wrapper/index.d.ts +16 -0
  97. package/lib/components/common/icon-wrapper/index.d.ts.map +1 -0
  98. package/lib/components/common/image-preview-tile/index.d.ts +14 -0
  99. package/lib/components/common/image-preview-tile/index.d.ts.map +1 -0
  100. package/lib/components/common/slider/index.d.ts +12 -0
  101. package/lib/components/common/slider/index.d.ts.map +1 -0
  102. package/lib/components/feedback-popup/index.d.ts +8 -0
  103. package/lib/components/feedback-popup/index.d.ts.map +1 -0
  104. package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts +11 -0
  105. package/lib/components/layers/design-layer/annotation-nodes/annotation-nodes.constants.d.ts.map +1 -0
  106. package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts +15 -0
  107. package/lib/components/layers/design-layer/annotation-nodes/arrow-node.d.ts.map +1 -0
  108. package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts +14 -0
  109. package/lib/components/layers/design-layer/annotation-nodes/ellipse-node.d.ts.map +1 -0
  110. package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts +14 -0
  111. package/lib/components/layers/design-layer/annotation-nodes/image-node.d.ts.map +1 -0
  112. package/lib/components/layers/design-layer/annotation-nodes/index.d.ts +3 -0
  113. package/lib/components/layers/design-layer/annotation-nodes/index.d.ts.map +1 -0
  114. package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts +12 -0
  115. package/lib/components/layers/design-layer/annotation-nodes/line-node.d.ts.map +1 -0
  116. package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts +11 -0
  117. package/lib/components/layers/design-layer/annotation-nodes/memoized-annotation.d.ts.map +1 -0
  118. package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts +15 -0
  119. package/lib/components/layers/design-layer/annotation-nodes/polygon-node.d.ts.map +1 -0
  120. package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts +16 -0
  121. package/lib/components/layers/design-layer/annotation-nodes/rect-node.d.ts.map +1 -0
  122. package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts +21 -0
  123. package/lib/components/layers/design-layer/annotation-nodes/text-node.d.ts.map +1 -0
  124. package/lib/components/layers/design-layer/index.d.ts +3 -0
  125. package/lib/components/layers/design-layer/index.d.ts.map +1 -0
  126. package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts +45 -0
  127. package/lib/components/layers/design-layer/nodes-common-prop-types.d.ts.map +1 -0
  128. package/lib/components/layers/design-layer/preview-group.d.ts +3 -0
  129. package/lib/components/layers/design-layer/preview-group.d.ts.map +1 -0
  130. package/lib/components/layers/index.d.ts +3 -0
  131. package/lib/components/layers/index.d.ts.map +1 -0
  132. package/lib/components/layers/transformers-layer/crop-transformer.d.ts +3 -0
  133. package/lib/components/layers/transformers-layer/crop-transformer.d.ts.map +1 -0
  134. package/lib/components/layers/transformers-layer/crop-transformer.js +1 -1
  135. package/lib/components/layers/transformers-layer/index.d.ts +3 -0
  136. package/lib/components/layers/transformers-layer/index.d.ts.map +1 -0
  137. package/lib/components/layers/transformers-layer/nodes-transformer.d.ts +3 -0
  138. package/lib/components/layers/transformers-layer/nodes-transformer.d.ts.map +1 -0
  139. package/lib/components/layers/transformers-layer/nodes-transformer.js +1 -1
  140. package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts +42 -0
  141. package/lib/components/layers/transformers-layer/transformers-layer.utils.d.ts.map +1 -0
  142. package/lib/components/main-canvas/canvas-node.d.ts +6 -0
  143. package/lib/components/main-canvas/canvas-node.d.ts.map +1 -0
  144. package/lib/components/main-canvas/canvas-node.js +1 -1
  145. package/lib/components/main-canvas/index.d.ts +3 -0
  146. package/lib/components/main-canvas/index.d.ts.map +1 -0
  147. package/lib/components/main-canvas/index.js +1 -1
  148. package/lib/components/main-canvas/touch-zooming-events.d.ts +11 -0
  149. package/lib/components/main-canvas/touch-zooming-events.d.ts.map +1 -0
  150. package/lib/components/node-controls/index.d.ts +3 -0
  151. package/lib/components/node-controls/index.d.ts.map +1 -0
  152. package/lib/components/node-controls/index.js +1 -1
  153. package/lib/components/tabs/index.d.ts +6 -0
  154. package/lib/components/tabs/index.d.ts.map +1 -0
  155. package/lib/components/tabs/index.js +1 -1
  156. package/lib/components/tabs/tabs.constants.d.ts +9 -0
  157. package/lib/components/tabs/tabs.constants.d.ts.map +1 -0
  158. package/lib/components/tabs/tabs.constants.js +1 -1
  159. package/lib/components/tabs-drawer/index.d.ts +6 -0
  160. package/lib/components/tabs-drawer/index.d.ts.map +1 -0
  161. package/lib/components/tabs-drawer/index.js +1 -1
  162. package/lib/components/tools/arrow/arrow-button.d.ts +8 -0
  163. package/lib/components/tools/arrow/arrow-button.d.ts.map +1 -0
  164. package/lib/components/tools/arrow/arrow-options.d.ts +4 -0
  165. package/lib/components/tools/arrow/arrow-options.d.ts.map +1 -0
  166. package/lib/components/tools/arrow/arrow-options.js +1 -1
  167. package/lib/components/tools/arrow/index.d.ts +3 -0
  168. package/lib/components/tools/arrow/index.d.ts.map +1 -0
  169. package/lib/components/tools/blur/blur-options.d.ts +6 -0
  170. package/lib/components/tools/blur/blur-options.d.ts.map +1 -0
  171. package/lib/components/tools/blur/blur-options.js +1 -1
  172. package/lib/components/tools/blur/blur.d.ts +8 -0
  173. package/lib/components/tools/blur/blur.d.ts.map +1 -0
  174. package/lib/components/tools/blur/blur.js +1 -1
  175. package/lib/components/tools/blur/index.d.ts +3 -0
  176. package/lib/components/tools/blur/index.d.ts.map +1 -0
  177. package/lib/components/tools/brightness/brightness-options.d.ts +6 -0
  178. package/lib/components/tools/brightness/brightness-options.d.ts.map +1 -0
  179. package/lib/components/tools/brightness/brightness.d.ts +8 -0
  180. package/lib/components/tools/brightness/brightness.d.ts.map +1 -0
  181. package/lib/components/tools/brightness/brightness.js +1 -1
  182. package/lib/components/tools/brightness/index.d.ts +3 -0
  183. package/lib/components/tools/brightness/index.d.ts.map +1 -0
  184. package/lib/components/tools/contrast/contrast-options.d.ts +6 -0
  185. package/lib/components/tools/contrast/contrast-options.d.ts.map +1 -0
  186. package/lib/components/tools/contrast/contrast.d.ts +8 -0
  187. package/lib/components/tools/contrast/contrast.d.ts.map +1 -0
  188. package/lib/components/tools/contrast/contrast.js +1 -1
  189. package/lib/components/tools/contrast/index.d.ts +3 -0
  190. package/lib/components/tools/contrast/index.d.ts.map +1 -0
  191. package/lib/components/tools/crop/crop.constants.d.ts +15 -0
  192. package/lib/components/tools/crop/crop.constants.d.ts.map +1 -0
  193. package/lib/components/tools/crop/crop.constants.js +1 -1
  194. package/lib/components/tools/crop/crop.d.ts +7 -0
  195. package/lib/components/tools/crop/crop.d.ts.map +1 -0
  196. package/lib/components/tools/crop/crop.js +1 -1
  197. package/lib/components/tools/crop/index.d.ts +2 -0
  198. package/lib/components/tools/crop/index.d.ts.map +1 -0
  199. package/lib/components/tools/ellipse/ellipse-button.d.ts +8 -0
  200. package/lib/components/tools/ellipse/ellipse-button.d.ts.map +1 -0
  201. package/lib/components/tools/ellipse/ellipse-options.d.ts +4 -0
  202. package/lib/components/tools/ellipse/ellipse-options.d.ts.map +1 -0
  203. package/lib/components/tools/ellipse/ellipse-options.js +1 -1
  204. package/lib/components/tools/ellipse/index.d.ts +3 -0
  205. package/lib/components/tools/ellipse/index.d.ts.map +1 -0
  206. package/lib/components/tools/filters/filter-item.d.ts +10 -0
  207. package/lib/components/tools/filters/filter-item.d.ts.map +1 -0
  208. package/lib/components/tools/filters/filters.constants.d.ts +8 -0
  209. package/lib/components/tools/filters/filters.constants.d.ts.map +1 -0
  210. package/lib/components/tools/filters/filters.d.ts +3 -0
  211. package/lib/components/tools/filters/filters.d.ts.map +1 -0
  212. package/lib/components/tools/filters/index.d.ts +2 -0
  213. package/lib/components/tools/filters/index.d.ts.map +1 -0
  214. package/lib/components/tools/flip/flip-x.d.ts +8 -0
  215. package/lib/components/tools/flip/flip-x.d.ts.map +1 -0
  216. package/lib/components/tools/flip/flip-x.js +1 -1
  217. package/lib/components/tools/flip/flip-y.d.ts +8 -0
  218. package/lib/components/tools/flip/flip-y.d.ts.map +1 -0
  219. package/lib/components/tools/flip/flip-y.js +1 -1
  220. package/lib/components/tools/flip/index.d.ts +3 -0
  221. package/lib/components/tools/flip/index.d.ts.map +1 -0
  222. package/lib/components/tools/hsv/hsv.d.ts +8 -0
  223. package/lib/components/tools/hsv/hsv.d.ts.map +1 -0
  224. package/lib/components/tools/hsv/hsvoptions.d.ts +6 -0
  225. package/lib/components/tools/hsv/hsvoptions.d.ts.map +1 -0
  226. package/lib/components/tools/hsv/index.d.ts +3 -0
  227. package/lib/components/tools/hsv/index.d.ts.map +1 -0
  228. package/lib/components/tools/image/image-button.d.ts +8 -0
  229. package/lib/components/tools/image/image-button.d.ts.map +1 -0
  230. package/lib/components/tools/image/image-controls.d.ts +13 -0
  231. package/lib/components/tools/image/image-controls.d.ts.map +1 -0
  232. package/lib/components/tools/image/image-controls.js +1 -1
  233. package/lib/components/tools/image/image-options.d.ts +3 -0
  234. package/lib/components/tools/image/image-options.d.ts.map +1 -0
  235. package/lib/components/tools/image/image-options.js +1 -1
  236. package/lib/components/tools/image/images-gallery.d.ts +14 -0
  237. package/lib/components/tools/image/images-gallery.d.ts.map +1 -0
  238. package/lib/components/tools/image/index.d.ts +3 -0
  239. package/lib/components/tools/image/index.d.ts.map +1 -0
  240. package/lib/components/tools/line/index.d.ts +3 -0
  241. package/lib/components/tools/line/index.d.ts.map +1 -0
  242. package/lib/components/tools/line/line-button.d.ts +8 -0
  243. package/lib/components/tools/line/line-button.d.ts.map +1 -0
  244. package/lib/components/tools/line/line-options.d.ts +4 -0
  245. package/lib/components/tools/line/line-options.d.ts.map +1 -0
  246. package/lib/components/tools/line/line-options.js +1 -1
  247. package/lib/components/tools/pen/index.d.ts +3 -0
  248. package/lib/components/tools/pen/index.d.ts.map +1 -0
  249. package/lib/components/tools/pen/pen-button.d.ts +8 -0
  250. package/lib/components/tools/pen/pen-button.d.ts.map +1 -0
  251. package/lib/components/tools/pen/pen-options.d.ts +3 -0
  252. package/lib/components/tools/pen/pen-options.d.ts.map +1 -0
  253. package/lib/components/tools/pen/pen-options.js +1 -1
  254. package/lib/components/tools/polygon/index.d.ts +3 -0
  255. package/lib/components/tools/polygon/index.d.ts.map +1 -0
  256. package/lib/components/tools/polygon/polygon-button.d.ts +8 -0
  257. package/lib/components/tools/polygon/polygon-button.d.ts.map +1 -0
  258. package/lib/components/tools/polygon/polygon-options.d.ts +4 -0
  259. package/lib/components/tools/polygon/polygon-options.d.ts.map +1 -0
  260. package/lib/components/tools/polygon/polygon-options.js +1 -1
  261. package/lib/components/tools/polygon/polygon-sides-field.d.ts +9 -0
  262. package/lib/components/tools/polygon/polygon-sides-field.d.ts.map +1 -0
  263. package/lib/components/tools/polygon/polygon.constants.d.ts +12 -0
  264. package/lib/components/tools/polygon/polygon.constants.d.ts.map +1 -0
  265. package/lib/components/tools/rect/index.d.ts +3 -0
  266. package/lib/components/tools/rect/index.d.ts.map +1 -0
  267. package/lib/components/tools/rect/rect-button.d.ts +8 -0
  268. package/lib/components/tools/rect/rect-button.d.ts.map +1 -0
  269. package/lib/components/tools/rect/rect-button.js +1 -1
  270. package/lib/components/tools/rect/rect-corner-field.d.ts +9 -0
  271. package/lib/components/tools/rect/rect-corner-field.d.ts.map +1 -0
  272. package/lib/components/tools/rect/rect-options.d.ts +4 -0
  273. package/lib/components/tools/rect/rect-options.d.ts.map +1 -0
  274. package/lib/components/tools/rect/rect-options.js +1 -1
  275. package/lib/components/tools/rect/rect.constants.d.ts +12 -0
  276. package/lib/components/tools/rect/rect.constants.d.ts.map +1 -0
  277. package/lib/components/tools/resize/index.d.ts +2 -0
  278. package/lib/components/tools/resize/index.d.ts.map +1 -0
  279. package/lib/components/tools/resize/resize.d.ts +13 -0
  280. package/lib/components/tools/resize/resize.d.ts.map +1 -0
  281. package/lib/components/tools/rotate/index.d.ts +3 -0
  282. package/lib/components/tools/rotate/index.d.ts.map +1 -0
  283. package/lib/components/tools/rotate/rotate-button.d.ts +8 -0
  284. package/lib/components/tools/rotate/rotate-button.d.ts.map +1 -0
  285. package/lib/components/tools/rotate/rotate-options.d.ts +3 -0
  286. package/lib/components/tools/rotate/rotate-options.d.ts.map +1 -0
  287. package/lib/components/tools/rotate/rotate-options.js +1 -1
  288. package/lib/components/tools/text/index.d.ts +3 -0
  289. package/lib/components/tools/text/index.d.ts.map +1 -0
  290. package/lib/components/tools/text/text-button.d.ts +8 -0
  291. package/lib/components/tools/text/text-button.d.ts.map +1 -0
  292. package/lib/components/tools/text/text-options/handle-text-change-area.d.ts +4 -0
  293. package/lib/components/tools/text/text-options/handle-text-change-area.d.ts.map +1 -0
  294. package/lib/components/tools/text/text-options/index.d.ts +4 -0
  295. package/lib/components/tools/text/text-options/index.d.ts.map +1 -0
  296. package/lib/components/tools/text/text-options/text-alignment-fields.d.ts +9 -0
  297. package/lib/components/tools/text/text-options/text-alignment-fields.d.ts.map +1 -0
  298. package/lib/components/tools/text/text-options/text-alignment-fields.js +1 -1
  299. package/lib/components/tools/text/text-options/text-controls.d.ts +12 -0
  300. package/lib/components/tools/text/text-options/text-controls.d.ts.map +1 -0
  301. package/lib/components/tools/text/text-options/text-controls.js +1 -1
  302. package/lib/components/tools/text/text-options/text-options.constants.d.ts +14 -0
  303. package/lib/components/tools/text/text-options/text-options.constants.d.ts.map +1 -0
  304. package/lib/components/tools/text/text-options/text-spacings-fields.d.ts +10 -0
  305. package/lib/components/tools/text/text-options/text-spacings-fields.d.ts.map +1 -0
  306. package/lib/components/tools/tools.constants.d.ts +9 -0
  307. package/lib/components/tools/tools.constants.d.ts.map +1 -0
  308. package/lib/components/tools/tools.constants.js +1 -1
  309. package/lib/components/tools/warmth/index.d.ts +3 -0
  310. package/lib/components/tools/warmth/index.d.ts.map +1 -0
  311. package/lib/components/tools/warmth/warmth-options.d.ts +7 -0
  312. package/lib/components/tools/warmth/warmth-options.d.ts.map +1 -0
  313. package/lib/components/tools/warmth/warmth.d.ts +8 -0
  314. package/lib/components/tools/warmth/warmth.d.ts.map +1 -0
  315. package/lib/components/tools/watermark/index.d.ts +2 -0
  316. package/lib/components/tools/watermark/index.d.ts.map +1 -0
  317. package/lib/components/tools/watermark/watermark-padding.d.ts +8 -0
  318. package/lib/components/tools/watermark/watermark-padding.d.ts.map +1 -0
  319. package/lib/components/tools/watermark/watermark.d.ts +3 -0
  320. package/lib/components/tools/watermark/watermark.d.ts.map +1 -0
  321. package/lib/components/tools/watermark/watermark.js +1 -1
  322. package/lib/components/tools/watermark/watermarks-gallery.d.ts +7 -0
  323. package/lib/components/tools/watermark/watermarks-gallery.d.ts.map +1 -0
  324. package/lib/components/tools/watermark/watermarks-gallery.js +1 -1
  325. package/lib/components/tools-bar/index.d.ts +3 -0
  326. package/lib/components/tools-bar/index.d.ts.map +1 -0
  327. package/lib/components/tools-bar/index.js +1 -1
  328. package/lib/components/tools-bar/tools-bar-item-button.d.ts +23 -0
  329. package/lib/components/tools-bar/tools-bar-item-button.d.ts.map +1 -0
  330. package/lib/components/tools-bar/tools-bar-item-button.js +1 -1
  331. package/lib/components/topbar/canvas-zooming.d.ts +3 -0
  332. package/lib/components/topbar/canvas-zooming.d.ts.map +1 -0
  333. package/lib/components/topbar/confirmation-modal.d.ts +8 -0
  334. package/lib/components/topbar/confirmation-modal.d.ts.map +1 -0
  335. package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts +3 -0
  336. package/lib/components/topbar/image-dimensions-and-display-toggle.d.ts.map +1 -0
  337. package/lib/components/topbar/index.d.ts +7 -0
  338. package/lib/components/topbar/index.d.ts.map +1 -0
  339. package/lib/components/topbar/index.js +1 -1
  340. package/lib/components/topbar/redo-button.d.ts +3 -0
  341. package/lib/components/topbar/redo-button.d.ts.map +1 -0
  342. package/lib/components/topbar/reset-button.d.ts +3 -0
  343. package/lib/components/topbar/reset-button.d.ts.map +1 -0
  344. package/lib/components/topbar/save-button.d.ts +3 -0
  345. package/lib/components/topbar/save-button.d.ts.map +1 -0
  346. package/lib/components/topbar/save-button.js +1 -1
  347. package/lib/components/topbar/topbar.constants.d.ts +8 -0
  348. package/lib/components/topbar/topbar.constants.d.ts.map +1 -0
  349. package/lib/components/topbar/undo-button.d.ts +3 -0
  350. package/lib/components/topbar/undo-button.d.ts.map +1 -0
  351. package/lib/context/app-context.d.ts +14 -0
  352. package/lib/context/app-context.d.ts.map +1 -0
  353. package/lib/context/app-provider-overriden-value.d.ts +11 -0
  354. package/lib/context/app-provider-overriden-value.d.ts.map +1 -0
  355. package/lib/context/app-provider.d.ts +10 -0
  356. package/lib/context/app-provider.d.ts.map +1 -0
  357. package/lib/context/app-provider.js +1 -1
  358. package/lib/context/app-reducer.d.ts +5 -0
  359. package/lib/context/app-reducer.d.ts.map +1 -0
  360. package/lib/context/default-config.d.ts +4 -0
  361. package/lib/context/default-config.d.ts.map +1 -0
  362. package/lib/context/default-config.js +1 -1
  363. package/lib/context/default-translations.d.ts +3 -0
  364. package/lib/context/default-translations.d.ts.map +1 -0
  365. package/lib/context/default-translations.js +1 -1
  366. package/lib/context/get-initial-app-state.d.ts +5 -0
  367. package/lib/context/get-initial-app-state.d.ts.map +1 -0
  368. package/lib/context/get-initial-app-state.js +1 -1
  369. package/lib/context/index.d.ts +5 -0
  370. package/lib/context/index.d.ts.map +1 -0
  371. package/lib/custom/filters/aden.d.ts +14 -0
  372. package/lib/custom/filters/aden.d.ts.map +1 -0
  373. package/lib/custom/filters/amaro.d.ts +14 -0
  374. package/lib/custom/filters/amaro.d.ts.map +1 -0
  375. package/lib/custom/filters/ashby.d.ts +14 -0
  376. package/lib/custom/filters/ashby.d.ts.map +1 -0
  377. package/lib/custom/filters/base-filters.d.ts +14 -0
  378. package/lib/custom/filters/base-filters.d.ts.map +1 -0
  379. package/lib/custom/filters/black-and-white.d.ts +14 -0
  380. package/lib/custom/filters/black-and-white.d.ts.map +1 -0
  381. package/lib/custom/filters/brannan.d.ts +14 -0
  382. package/lib/custom/filters/brannan.d.ts.map +1 -0
  383. package/lib/custom/filters/brooklyn.d.ts +14 -0
  384. package/lib/custom/filters/brooklyn.d.ts.map +1 -0
  385. package/lib/custom/filters/charmes.d.ts +14 -0
  386. package/lib/custom/filters/charmes.d.ts.map +1 -0
  387. package/lib/custom/filters/clarendon.d.ts +14 -0
  388. package/lib/custom/filters/clarendon.d.ts.map +1 -0
  389. package/lib/custom/filters/crema.d.ts +14 -0
  390. package/lib/custom/filters/crema.d.ts.map +1 -0
  391. package/lib/custom/filters/dogpatch.d.ts +14 -0
  392. package/lib/custom/filters/dogpatch.d.ts.map +1 -0
  393. package/lib/custom/filters/earlybird.d.ts +14 -0
  394. package/lib/custom/filters/earlybird.d.ts.map +1 -0
  395. package/lib/custom/filters/gingham.d.ts +14 -0
  396. package/lib/custom/filters/gingham.d.ts.map +1 -0
  397. package/lib/custom/filters/ginza.d.ts +14 -0
  398. package/lib/custom/filters/ginza.d.ts.map +1 -0
  399. package/lib/custom/filters/hefe.d.ts +14 -0
  400. package/lib/custom/filters/hefe.d.ts.map +1 -0
  401. package/lib/custom/filters/helena.d.ts +14 -0
  402. package/lib/custom/filters/helena.d.ts.map +1 -0
  403. package/lib/custom/filters/hudson.d.ts +14 -0
  404. package/lib/custom/filters/hudson.d.ts.map +1 -0
  405. package/lib/custom/filters/index.d.ts +41 -0
  406. package/lib/custom/filters/index.d.ts.map +1 -0
  407. package/lib/custom/filters/juno.d.ts +14 -0
  408. package/lib/custom/filters/juno.d.ts.map +1 -0
  409. package/lib/custom/filters/kelvin.d.ts +14 -0
  410. package/lib/custom/filters/kelvin.d.ts.map +1 -0
  411. package/lib/custom/filters/lark.d.ts +14 -0
  412. package/lib/custom/filters/lark.d.ts.map +1 -0
  413. package/lib/custom/filters/lo-fi.d.ts +14 -0
  414. package/lib/custom/filters/lo-fi.d.ts.map +1 -0
  415. package/lib/custom/filters/ludwig.d.ts +14 -0
  416. package/lib/custom/filters/ludwig.d.ts.map +1 -0
  417. package/lib/custom/filters/maven.d.ts +14 -0
  418. package/lib/custom/filters/maven.d.ts.map +1 -0
  419. package/lib/custom/filters/mayfair.d.ts +14 -0
  420. package/lib/custom/filters/mayfair.d.ts.map +1 -0
  421. package/lib/custom/filters/moon.d.ts +14 -0
  422. package/lib/custom/filters/moon.d.ts.map +1 -0
  423. package/lib/custom/filters/nashville.d.ts +14 -0
  424. package/lib/custom/filters/nashville.d.ts.map +1 -0
  425. package/lib/custom/filters/ninteen-seventy-seven.d.ts +14 -0
  426. package/lib/custom/filters/ninteen-seventy-seven.d.ts.map +1 -0
  427. package/lib/custom/filters/perpetua.d.ts +14 -0
  428. package/lib/custom/filters/perpetua.d.ts.map +1 -0
  429. package/lib/custom/filters/reyes.d.ts +14 -0
  430. package/lib/custom/filters/reyes.d.ts.map +1 -0
  431. package/lib/custom/filters/rise.d.ts +14 -0
  432. package/lib/custom/filters/rise.d.ts.map +1 -0
  433. package/lib/custom/filters/sierra.d.ts +14 -0
  434. package/lib/custom/filters/sierra.d.ts.map +1 -0
  435. package/lib/custom/filters/skyline.d.ts +14 -0
  436. package/lib/custom/filters/skyline.d.ts.map +1 -0
  437. package/lib/custom/filters/slumber.d.ts +14 -0
  438. package/lib/custom/filters/slumber.d.ts.map +1 -0
  439. package/lib/custom/filters/stinson.d.ts +14 -0
  440. package/lib/custom/filters/stinson.d.ts.map +1 -0
  441. package/lib/custom/filters/sutro.d.ts +14 -0
  442. package/lib/custom/filters/sutro.d.ts.map +1 -0
  443. package/lib/custom/filters/toaster.d.ts +14 -0
  444. package/lib/custom/filters/toaster.d.ts.map +1 -0
  445. package/lib/custom/filters/valencia.d.ts +14 -0
  446. package/lib/custom/filters/valencia.d.ts.map +1 -0
  447. package/lib/custom/filters/vesper.d.ts +14 -0
  448. package/lib/custom/filters/vesper.d.ts.map +1 -0
  449. package/lib/custom/filters/walden.d.ts +14 -0
  450. package/lib/custom/filters/walden.d.ts.map +1 -0
  451. package/lib/custom/filters/willow.d.ts +14 -0
  452. package/lib/custom/filters/willow.d.ts.map +1 -0
  453. package/lib/custom/filters/xpro2.d.ts +14 -0
  454. package/lib/custom/filters/xpro2.d.ts.map +1 -0
  455. package/lib/custom/finetunes/custom-threshold.d.ts +15 -0
  456. package/lib/custom/finetunes/custom-threshold.d.ts.map +1 -0
  457. package/lib/custom/finetunes/index.d.ts +3 -0
  458. package/lib/custom/finetunes/index.d.ts.map +1 -0
  459. package/lib/custom/finetunes/warmth.d.ts +17 -0
  460. package/lib/custom/finetunes/warmth.d.ts.map +1 -0
  461. package/lib/demo/app.d.ts +6 -0
  462. package/lib/demo/app.d.ts.map +1 -0
  463. package/lib/demo/app.js +1 -0
  464. package/lib/demo/index.d.ts +2 -0
  465. package/lib/demo/index.d.ts.map +1 -0
  466. package/lib/demo/index.js +1 -0
  467. package/lib/hooks/index.d.ts +13 -0
  468. package/lib/hooks/index.d.ts.map +1 -0
  469. package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts +19 -0
  470. package/lib/hooks/use-annotation/get-bounding-rect-un-scaled.d.ts.map +1 -0
  471. package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts +25 -0
  472. package/lib/hooks/use-annotation/get-new-annotation-preview.d.ts.map +1 -0
  473. package/lib/hooks/use-annotation/index.d.ts +74 -0
  474. package/lib/hooks/use-annotation/index.d.ts.map +1 -0
  475. package/lib/hooks/use-annotation/index.js +1 -1
  476. package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts +3 -0
  477. package/lib/hooks/use-annotation/preview-then-call-annotation-adding.d.ts.map +1 -0
  478. package/lib/hooks/use-annotation-events.d.ts +11 -0
  479. package/lib/hooks/use-annotation-events.d.ts.map +1 -0
  480. package/lib/hooks/use-annotation-events.js +1 -1
  481. package/lib/hooks/use-app-reducer.d.ts +13 -0
  482. package/lib/hooks/use-app-reducer.d.ts.map +1 -0
  483. package/lib/hooks/use-debounced-callback.d.ts +5 -0
  484. package/lib/hooks/use-debounced-callback.d.ts.map +1 -0
  485. package/lib/hooks/use-drag.d.ts +8 -0
  486. package/lib/hooks/use-drag.d.ts.map +1 -0
  487. package/lib/hooks/use-filter.d.ts +4 -0
  488. package/lib/hooks/use-filter.d.ts.map +1 -0
  489. package/lib/hooks/use-finetune.d.ts +5 -0
  490. package/lib/hooks/use-finetune.d.ts.map +1 -0
  491. package/lib/hooks/use-phone-screen.d.ts +3 -0
  492. package/lib/hooks/use-phone-screen.d.ts.map +1 -0
  493. package/lib/hooks/use-popover.d.ts +11 -0
  494. package/lib/hooks/use-popover.d.ts.map +1 -0
  495. package/lib/hooks/use-resize-observer.d.ts +12 -0
  496. package/lib/hooks/use-resize-observer.d.ts.map +1 -0
  497. package/lib/hooks/use-store.d.ts +5 -0
  498. package/lib/hooks/use-store.d.ts.map +1 -0
  499. package/lib/hooks/use-store.js +1 -1
  500. package/lib/hooks/use-transformed-img-data.d.ts +20 -0
  501. package/lib/hooks/use-transformed-img-data.d.ts.map +1 -0
  502. package/lib/hooks/use-transformed-img-data.js +1 -1
  503. package/lib/hooks/use-update-effect.d.ts +5 -0
  504. package/lib/hooks/use-update-effect.d.ts.map +1 -0
  505. package/lib/index.d.ts +6 -345
  506. package/lib/index.d.ts.map +1 -0
  507. package/lib/index.js +1 -1
  508. package/lib/types/actions.d.ts +204 -0
  509. package/lib/types/actions.d.ts.map +1 -0
  510. package/lib/types/annotations.d.ts +181 -0
  511. package/lib/types/annotations.d.ts.map +1 -0
  512. package/lib/types/annotations.js +1 -1
  513. package/lib/types/common.d.ts +31 -0
  514. package/lib/types/common.d.ts.map +1 -0
  515. package/lib/types/config.d.ts +144 -0
  516. package/lib/types/config.d.ts.map +1 -0
  517. package/lib/types/index.d.ts +6 -0
  518. package/lib/types/index.d.ts.map +1 -0
  519. package/lib/types/state.d.ts +105 -0
  520. package/lib/types/state.d.ts.map +1 -0
  521. package/lib/utils/assign-finetune-names-to-konva.d.ts +3 -0
  522. package/lib/utils/assign-finetune-names-to-konva.d.ts.map +1 -0
  523. package/lib/utils/calculate-zoom-data.d.ts +9 -0
  524. package/lib/utils/calculate-zoom-data.d.ts.map +1 -0
  525. package/lib/utils/compare-ratios.d.ts +3 -0
  526. package/lib/utils/compare-ratios.d.ts.map +1 -0
  527. package/lib/utils/constants.d.ts +85 -0
  528. package/lib/utils/constants.d.ts.map +1 -0
  529. package/lib/utils/constants.js +1 -1
  530. package/lib/utils/crop-image.d.ts +10 -0
  531. package/lib/utils/crop-image.d.ts.map +1 -0
  532. package/lib/utils/debounce.d.ts +3 -0
  533. package/lib/utils/debounce.d.ts.map +1 -0
  534. package/lib/utils/deep-merge.d.ts +3 -0
  535. package/lib/utils/deep-merge.d.ts.map +1 -0
  536. package/lib/utils/deep-merge.js +1 -1
  537. package/lib/utils/extract-current-design-state.d.ts +11 -0
  538. package/lib/utils/extract-current-design-state.d.ts.map +1 -0
  539. package/lib/utils/extract-name-from-url.d.ts +3 -0
  540. package/lib/utils/extract-name-from-url.d.ts.map +1 -0
  541. package/lib/utils/filter-str-to-class.d.ts +4 -0
  542. package/lib/utils/filter-str-to-class.d.ts.map +1 -0
  543. package/lib/utils/finetunes-strs-to-classes.d.ts +4 -0
  544. package/lib/utils/finetunes-strs-to-classes.d.ts.map +1 -0
  545. package/lib/utils/finetunes-strs-to-classes.js +1 -1
  546. package/lib/utils/get-center-rotated-point.d.ts +8 -0
  547. package/lib/utils/get-center-rotated-point.d.ts.map +1 -0
  548. package/lib/utils/get-default-save-quality.d.ts +3 -0
  549. package/lib/utils/get-default-save-quality.d.ts.map +1 -0
  550. package/lib/utils/get-dimensions-minimal-ratio.d.ts +3 -0
  551. package/lib/utils/get-dimensions-minimal-ratio.d.ts.map +1 -0
  552. package/lib/utils/get-elem-document-coords.d.ts +9 -0
  553. package/lib/utils/get-elem-document-coords.d.ts.map +1 -0
  554. package/lib/utils/get-file-full-name.d.ts +8 -0
  555. package/lib/utils/get-file-full-name.d.ts.map +1 -0
  556. package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts +21 -0
  557. package/lib/utils/get-pointer-offset-position-bounded-to-object.d.ts.map +1 -0
  558. package/lib/utils/get-pointer-offset-position-bounded-to-object.js +1 -1
  559. package/lib/utils/get-proper-dimensions.d.ts +11 -0
  560. package/lib/utils/get-proper-dimensions.d.ts.map +1 -0
  561. package/lib/utils/get-proper-image-to-canvas-spacing.d.ts +3 -0
  562. package/lib/utils/get-proper-image-to-canvas-spacing.d.ts.map +1 -0
  563. package/lib/utils/get-scroll-offset.d.ts +7 -0
  564. package/lib/utils/get-scroll-offset.d.ts.map +1 -0
  565. package/lib/utils/get-size-after-rotation.d.ts +9 -0
  566. package/lib/utils/get-size-after-rotation.d.ts.map +1 -0
  567. package/lib/utils/get-zoom-fit-factor.d.ts +4 -0
  568. package/lib/utils/get-zoom-fit-factor.d.ts.map +1 -0
  569. package/lib/utils/image-to-base64.d.ts +3 -0
  570. package/lib/utils/image-to-base64.d.ts.map +1 -0
  571. package/lib/utils/is-default-zero-values-only.d.ts +3 -0
  572. package/lib/utils/is-default-zero-values-only.d.ts.map +1 -0
  573. package/lib/utils/is-same-image.d.ts +3 -0
  574. package/lib/utils/is-same-image.d.ts.map +1 -0
  575. package/lib/utils/is-same-image.js +1 -1
  576. package/lib/utils/load-image.d.ts +3 -0
  577. package/lib/utils/load-image.d.ts.map +1 -0
  578. package/lib/utils/map-crop-box.d.ts +16 -0
  579. package/lib/utils/map-crop-box.d.ts.map +1 -0
  580. package/lib/utils/map-number.d.ts +3 -0
  581. package/lib/utils/map-number.d.ts.map +1 -0
  582. package/lib/utils/map-position-string-to-point.d.ts +8 -0
  583. package/lib/utils/map-position-string-to-point.d.ts.map +1 -0
  584. package/lib/utils/map-position-string-to-point.js +1 -1
  585. package/lib/utils/random-id.d.ts +3 -0
  586. package/lib/utils/random-id.d.ts.map +1 -0
  587. package/lib/utils/restrict-number.d.ts +3 -0
  588. package/lib/utils/restrict-number.d.ts.map +1 -0
  589. package/lib/utils/serialize-design-state.d.ts +27 -0
  590. package/lib/utils/serialize-design-state.d.ts.map +1 -0
  591. package/lib/utils/serialize-design-state.js +1 -0
  592. package/lib/utils/to-precised-float.d.ts +3 -0
  593. package/lib/utils/to-precised-float.d.ts.map +1 -0
  594. package/lib/utils/translator.d.ts +3 -0
  595. package/lib/utils/translator.d.ts.map +1 -0
  596. package/lib/utils/translator.js +1 -1
  597. package/package.json +63 -61
  598. package/lib/components/tools/crop/crop-preset-item.js +0 -1
  599. package/lib/components/tools/crop/crop-presets-option.js +0 -1
  600. package/lib/components/tools-bar/tools-bar-item-options-wrapper.js +0 -1
  601. package/lib/utils/cloudimage-query-to-design-state.js +0 -1
  602. package/lib/utils/get-image-sealing-params.js +0 -1
  603. package/lib/utils/operations-to-cloudimage-url.js +0 -1
  604. package/lib/utils/rgba-to-hexa.js +0 -1
  605. package/lib/utils/sha1.js +0 -1
@@ -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"}
@@ -1 +1 @@
1
- import{useContext}from"react";import AppContext from"context";var useStore=function(){return useContext(AppContext)};export default useStore;
1
+ import{useContext}from"react";import AppContext from"context/app-context";var useStore=function(){return useContext(AppContext)};export default useStore;
@@ -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"}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["filter"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import Konva from"konva";import{HIDE_LOADER,SET_SAVED}from"actions";import{ELLIPSE_CROP,IMAGE_NODE_ID,SUPPORTED_IMAGE_TYPES,TOOLS_IDS}from"utils/constants";import extractCurrentDesignState from"utils/extract-current-design-state";import mapCropBox from"utils/map-crop-box";import getSizeAfterRotation from"utils/get-size-after-rotation";import imageToBase64 from"utils/image-to-base64";import getFileFullName from"utils/get-file-full-name";import operationsToCloudimageUrl from"utils/operations-to-cloudimage-url";import useStore from"./use-store";var useTransformedImgData=function(){var a=useStore(),b=a.dispatch,c=a.designLayer,d=a.shownImageDimensions,e=a.originalImage,f=a.resize,g=void 0===f?{}:f,h=a.adjustments,i=void 0===h?{}:h,j=i.crop,k=void 0===j?{}:j,l=i.rotation,m=void 0===l?0:l,n=a.config,o=n.savingPixelRatio,p=n.previewPixelRatio,q=n.forceToPngInEllipticalCrop,r=n.defaultSavedImageType,s=n.useCloudimage,t=n.cloudimage,u=n[TOOLS_IDS.CROP];return s?function(){var b,c,f=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},g=extractCurrentDesignState(a,!1),h=g.filter,i=_objectWithoutProperties(g,_excluded),j=operationsToCloudimageUrl(t,i,d,e,u),l=mapCropBox({x:k.x,y:k.y,width:k.width,height:k.height},d,e),m={cloudimageUrl:j,width:(null===f||void 0===f||null===(b=f.size)||void 0===b?void 0:b.width)||l.width,height:(null===f||void 0===f||null===(c=f.size)||void 0===c?void 0:c.height)||l.height};return{imageData:m,designState:i}}:function(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},h=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],j=_objectSpread({size:g},f);Konva.pixelRatio=h||o;var l=c.attrs,n=l.clipWidth,s=l.clipHeight,t=l.clipX,u=l.clipY;c.setAttr("isSaving",!0);var v=c.getStage().clone({width:e.width,height:e.height,scaleX:1,scaleY:1}),w=_slicedToArray(v.children,1),x=w[0];v.children[1].destroy();var y=v.findOne("#".concat(IMAGE_NODE_ID));y.cache();var z={x:v.width()/d.width,y:v.height()/d.height};x.setAttrs({rotation:0,offsetX:0,offsetY:0,x:0,y:0,scaleX:z.x,scaleY:z.y});var A=_objectSpread(_objectSpread({},(!j.name||!j.extension)&&getFileFullName(e.name,q&&k.ratio===ELLIPSE_CROP?"png":SUPPORTED_IMAGE_TYPES.includes(null===r||void 0===r?void 0:r.toLowerCase())&&r||void 0)),j),B=A.name,C=A.extension,D=A.quality,E=void 0===D?92:D,F=A.size,G=void 0===F?{}:F,H=["jpeg","jpg","webp"].includes(C),I=mapCropBox(k.noEffect?{x:0,y:0}:{x:k.x||t,y:k.y||u,width:k.width||n,height:k.height||s},d,v.attrs),J=getSizeAfterRotation(I.width,I.height,m);if(v.setAttrs({offsetX:I.width/2+(I.x||0),offsetY:I.height/2+(I.y||0),width:J.width,height:J.height,x:J.width/2,y:J.height/2,rotation:m}),G.width){var K=G.width/v.width();v.setAttrs({scaleX:K,width:G.width,x:v.x()*Math.abs(K)})}if(G.height){var L=G.height/v.height();v.setAttrs({scaleY:L,height:G.height,y:v.y()*Math.abs(L)})}var M=_objectSpread({mimeType:"image/".concat("jpg"===C?"jpeg":C)},H?{quality:E}:{}),N=v.toCanvas(M),O=v.toDataURL(M),P=_objectSpread(_objectSpread({},extractCurrentDesignState(a,!1)),{},{shownImageDimensions:{width:a.shownImageDimensions.width,height:a.shownImageDimensions.height,scaledBy:a.shownImageDimensions.scaledBy}});P.filter&&(P.filter=P.filter.filterName||P.filter.name),P.finetunes=P.finetunes.map(function(a){return a.finetuneName||a.name}),Object.keys(P.annotations).forEach(function(a){var b,c=P.annotations[a],d=c.name===TOOLS_IDS.IMAGE&&(null===(b=c.image)||void 0===b?void 0:b.src);d&&d.startsWith("blob:")?P.annotations[a].image=imageToBase64(c.image):c.image instanceof HTMLImageElement&&(P.annotations[a].image=d)});var Q=_objectSpread({fullName:"".concat(B,".").concat(C),name:B,extension:C,mimeType:"image/".concat(C),imageCanvas:N,imageBase64:O,width:G.width||I.width,height:G.height||I.height},H?{quality:E}:{});c.setAttr("isSaving",!1),b({type:SET_SAVED}),y.clearCache(),v.destroy(),Konva.pixelRatio=p;var R=function(){b({type:HIDE_LOADER})};return i||R(),{imageData:Q,designState:P,hideLoadingSpinner:R}}};export default useTransformedImgData;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import Konva from"konva";import{HIDE_LOADER,SET_SAVED}from"actions";import{ELLIPSE_CROP,IMAGE_NODE_ID,SUPPORTED_IMAGE_TYPES}from"utils/constants";import getFileFullName from"utils/get-file-full-name";import getSizeAfterRotation from"utils/get-size-after-rotation";import mapCropBox from"utils/map-crop-box";import{serializeDesignState}from"utils/serialize-design-state";import useStore from"./use-store";var useTransformedImgData=function(){var a=useStore(),b=a.dispatch,c=a.designLayer,d=a.shownImageDimensions,e=a.originalImage,f=a.resize,g=void 0===f?{}:f,h=a.adjustments,i=void 0===h?{}:h,j=i.crop,k=void 0===j?{}:j,l=i.rotation,m=void 0===l?0:l,n=a.config,o=n.savingPixelRatio,p=n.previewPixelRatio,q=n.forceToPngInEllipticalCrop,r=n.defaultSavedImageType;return function(){var f=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},h=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],j=_objectSpread({size:g},f);Konva.pixelRatio=h||o;var l=c.attrs,n=l.clipWidth,s=l.clipHeight,t=l.clipX,u=l.clipY;c.setAttr("isSaving",!0);var v=c.getStage().clone({width:e.width,height:e.height,scaleX:1,scaleY:1}),w=_slicedToArray(v.children,1),x=w[0];v.children[1].destroy();var y=v.findOne("#".concat(IMAGE_NODE_ID));null===y||void 0===y||y.cache();var z={x:v.width()/d.width,y:v.height()/d.height};x.setAttrs({rotation:0,offsetX:0,offsetY:0,x:0,y:0,scaleX:z.x,scaleY:z.y});var A=_objectSpread(_objectSpread({},(!j.name||!j.extension)&&getFileFullName(e.name,q&&k.ratio===ELLIPSE_CROP?"png":SUPPORTED_IMAGE_TYPES.includes(null===r||void 0===r?void 0:r.toLowerCase())&&r||void 0)),j),B=A.name,C=A.extension,D=A.quality,E=void 0===D?92:D,F=A.size,G=void 0===F?{}:F,H=["jpeg","jpg","webp"].includes(C),I=mapCropBox(k.noEffect?{x:0,y:0}:{x:k.x||t,y:k.y||u,width:k.width||n,height:k.height||s},d,v.attrs),J=getSizeAfterRotation(I.width,I.height,m);if(v.setAttrs({offsetX:I.width/2+(I.x||0),offsetY:I.height/2+(I.y||0),width:J.width,height:J.height,x:J.width/2,y:J.height/2,rotation:m}),G.width){var K=G.width/v.width();v.setAttrs({scaleX:K,width:G.width,x:v.x()*Math.abs(K)})}if(G.height){var L=G.height/v.height();v.setAttrs({scaleY:L,height:G.height,y:v.y()*Math.abs(L)})}var M=_objectSpread({mimeType:"image/".concat("jpg"===C?"jpeg":C)},H?{quality:E}:{}),N=v.toCanvas(M),O=v.toDataURL(M),P=serializeDesignState(a,!0),Q=_objectSpread({fullName:"".concat(B,".").concat(C),name:B,extension:C,mimeType:"image/".concat(C),imageCanvas:N,imageBase64:O,width:G.width||I.width,height:G.height||I.height},H?{quality:E}:{});c.setAttr("isSaving",!1),b({type:SET_SAVED}),null===y||void 0===y||y.clearCache(),v.destroy(),Konva.pixelRatio=p;var R=function(){b({type:HIDE_LOADER})};return i||R(),{imageData:Q,designState:P,hideLoadingSpinner:R}}};export default useTransformedImgData;
@@ -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 CHANGED
@@ -1,345 +1,6 @@
1
- import { Theme } from '@mui/material/styles';
2
- import { FunctionComponent, RefObject } from 'react';
3
-
4
- type ThemeOverride = Partial<Theme>;
5
-
6
- declare const TABS = {
7
- FINETUNE: 'Finetune',
8
- FILTERS: 'Filters',
9
- ADJUST: 'Adjust',
10
- WATERMARK: 'Watermark',
11
- ANNOTATE: 'Annotate',
12
- RESIZE: 'Resize',
13
- } as const;
14
-
15
- declare const TOOLS = {
16
- CROP: 'Crop',
17
- ROTATE: 'Rotate',
18
- FLIP_X: 'Flip_X',
19
- FLIP_Y: 'Flip_Y',
20
- BRIGHTNESS: 'Brightness',
21
- CONTRAST: 'Contrast',
22
- HSV: 'HueSaturationValue',
23
- WARMTH: 'Warmth',
24
- BLUR: 'Blur',
25
- THRESHOLD: 'Threshold',
26
- POSTERIZE: 'Posterize',
27
- PIXELATE: 'Pixelate',
28
- NOISE: 'Noise',
29
- FILTERS: 'Filters',
30
- RECT: 'Rect',
31
- ELLIPSE: 'Ellipse',
32
- POLYGON: 'Polygon',
33
- TEXT: 'Text',
34
- LINE: 'Line',
35
- IMAGE: 'Image',
36
- ARROW: 'Arrow',
37
- WATERMARK: 'Watermark',
38
- PEN: 'Pen',
39
- RESIZE: 'Resize',
40
- } as const;
41
-
42
- // TABS_IDS
43
- type availableTabs = (typeof TABS)[keyof typeof TABS];
44
-
45
- // TOOLS_IDS
46
- type availableTools = (typeof TOOLS)[keyof typeof TOOLS];
47
-
48
- type lineCap = 'butt' | 'round' | 'square';
49
-
50
- type savedImageData = {
51
- name: string;
52
- extension: string;
53
- mimeType: string;
54
- fullName?: string;
55
- height?: number;
56
- width?: number;
57
- imageBase64?: string;
58
- imageCanvas?: HTMLCanvasElement; // doesn't support quality
59
- quality?: number;
60
- cloudimageUrl?: string;
61
- };
62
-
63
- type annotationsCommon = {
64
- fill?: string;
65
- stroke?: string;
66
- strokeWidth?: number;
67
- shadowOffsetX?: number;
68
- shadowOffsetY?: number;
69
- shadowBlur?: number;
70
- shadowColor?: string;
71
- shadowOpacity?: number;
72
- opacity?: number;
73
- };
74
-
75
- type textAnnotation = annotationsCommon & {
76
- text?: string;
77
- fontFamily?: string;
78
- fontSize?: number;
79
- letterSpacing?: number;
80
- lineHeight?: number;
81
- align?: 'left' | 'center' | 'right';
82
- fontStyle?: 'normal' | 'bold' | 'italic' | 'bold italic';
83
- };
84
-
85
- type imageAnnotation = annotationsCommon & {
86
- disableUpload?: boolean;
87
- gallery?: {
88
- originalUrl: string;
89
- previewUrl: string;
90
- }[];
91
- };
92
-
93
- type rectAnnotation = annotationsCommon & {
94
- cornerRadius?: number;
95
- };
96
-
97
- type polygonAnnotation = annotationsCommon & {
98
- sides?: number;
99
- };
100
-
101
- type penAnnotation = annotationsCommon & {
102
- tension?: number;
103
- lineCap?: lineCap;
104
- selectAnnotationAfterDrawing?: boolean;
105
- };
106
-
107
- type lineAnnotation = annotationsCommon & {
108
- lineCap?: lineCap;
109
- };
110
-
111
- type arrowAnnotation = annotationsCommon & {
112
- lineCap?: lineCap;
113
- pointerLength?: number;
114
- pointerWidth?: number;
115
- };
116
-
117
- type rotateAnnotation = {
118
- angle?: number;
119
- componentType?: 'slider' | 'buttons';
120
- };
121
-
122
- type cropPresetItem = {
123
- titleKey: string;
124
- width?: number;
125
- height?: number;
126
- ratio?: string | number;
127
- descriptionKey?: string;
128
- icon?: string | HTMLElement | FunctionComponent;
129
- disableManualResize?: boolean;
130
- noEffect?: boolean;
131
- };
132
-
133
- type imageDesignState = {
134
- imgSrc?: string;
135
- finetunes?: string[];
136
- finetunesProps?: {
137
- brightness?: number;
138
- contrast?: number;
139
- hue?: number;
140
- saturation?: number;
141
- value?: number;
142
- blurRadius?: number;
143
- warmth?: number;
144
- };
145
- filter?: string;
146
- adjustments?: {
147
- crop: {
148
- ratio: string | number;
149
- width?: number;
150
- height?: number;
151
- x?: number;
152
- y?: number;
153
- ratioTitleKey?: string;
154
- };
155
- isFlippedX?: boolean;
156
- isFlippedY?: boolean;
157
- rotation?: number;
158
- };
159
- annotations?: {
160
- [key?: string]: annotationsCommon &
161
- (
162
- | textAnnotation
163
- | rectAnnotation
164
- | polygonAnnotation
165
- | penAnnotation
166
- | lineAnnotation
167
- | arrowAnnotation
168
- ) & {
169
- id: string;
170
- name: string;
171
- x: number;
172
- y: number;
173
- scaleX?: number;
174
- scaleY?: number;
175
- width?: number; //Text/Image/Rect
176
- height?: number; //Text/Image/Rect
177
- radius?: number; // Polygon
178
- radiusX?: number; // Ellipse
179
- radiusY?: number; // Ellipse
180
- points?: number[]; // Pen/Line/Arrow
181
- image?: string | HTMLElement; // Image
182
- };
183
- };
184
- resize?: {
185
- width?: number;
186
- height?: number;
187
- manualChangeDisabled?: boolean;
188
- };
189
- shownImageDimensions?: {
190
- width: number;
191
- height: number;
192
- scaledBy: number;
193
- };
194
- };
195
-
196
- type onSaveFunction = (
197
- savedImageData: savedImageData,
198
- imageDesignState: imageDesignState,
199
- ) => void | Promise;
200
-
201
- export type getCurrentImgDataFunction = (
202
- imageFileInfo: {
203
- name?: string;
204
- extension?: string;
205
- quality?: number;
206
- size?: { width?: number; height?: number };
207
- },
208
- pixelRatio?: boolean | number,
209
- keepLoadingSpinnerShown?: boolean,
210
- ) => {
211
- imageData: savedImageData;
212
- designState: imageDesignState;
213
- hideLoadingSpinner: () => void;
214
- };
215
-
216
- export interface FilerobotImageEditorConfig {
217
- theme?: ThemeOverride;
218
- source: string | HTMLImageElement;
219
- annotationsCommon?: annotationsCommon;
220
- // [TOOLS_IDS.TEXT]
221
- Text?: textAnnotation & {
222
- fonts?: (string | { label: string; value: string })[];
223
- onFontChange?: (
224
- newFontFamily: string,
225
- reRenderCanvasFn: () => void,
226
- ) => void;
227
- };
228
- // [TOOLS_IDS.IMAGE]
229
- Image?: imageAnnotation;
230
- // [TOOLS_IDS.ELLIPSE]
231
- Ellipse?: annotationsCommon;
232
- // [TOOLS_IDS.RECT]
233
- Rect?: rectAnnotation;
234
- // [TOOLS_IDS.POLYGON]
235
- Polygon?: polygonAnnotation;
236
- // [TOOLS_IDS.PEN]
237
- Pen?: penAnnotation;
238
- // [TOOLS_IDS.LINE]: {
239
- Line?: lineAnnotation;
240
- // [TOOLS_IDS.ARROW]: {
241
- Arrow?: arrowAnnotation;
242
- // [TOOLS_IDS.ROTATE]:
243
- Rotate?: rotateAnnotation;
244
- // [TOOLS_IDS.WATERMARK]
245
- Watermark?: {
246
- gallery?: string[] | { url: string; previewUrl: string }[] | [];
247
- onUploadWatermarkImgClick?: (
248
- loadAndSetWatermarkImg: (imgUrl, revokeObjectUrl) => void,
249
- ) => Promise<{ url: string; revokeObjectUrl?: boolean }> | void;
250
- textScalingRatio?: number;
251
- imageScalingRatio?: number;
252
- hideTextWatermark?: boolean;
253
- };
254
- // [TOOLS_IDS.CROP]
255
- Crop?: {
256
- minWidth?: number;
257
- minHeight?: number;
258
- maxWidth?: null;
259
- maxHeight?: null;
260
- ratio?: 'original' | 'custom' | 'ellipse' | number;
261
- noPresets?: boolean;
262
- ratioTitleKey?: string;
263
- presetsItems?: cropPresetItem[];
264
- autoResize?: boolean;
265
- lockCropAreaAt?:
266
- | 'top-left'
267
- | 'top-center'
268
- | 'top-right'
269
- | 'center-left'
270
- | 'center-center'
271
- | 'center-right'
272
- | 'bottom-left'
273
- | 'bottom-center'
274
- | 'bottom-right';
275
- };
276
- // TABS_IDS
277
- tabsIds?: availableTabs[] | [];
278
- defaultTabId?: availableTabs;
279
- defaultToolId?: availableTools;
280
- onBeforeSave?: (savedImageData: savedImageData) => void | boolean;
281
- onSave?: onSaveFunction;
282
- closeAfterSave?: boolean;
283
- defaultSavedImageName?: string;
284
- defaultSavedImageType?: 'png' | 'jpeg' | 'jpg' | 'webp';
285
- defaultSavedImageQuality?: number;
286
- forceToPngInEllipticalCrop?: boolean;
287
- useBackendTranslations?: boolean;
288
- translations?: object;
289
- language?:
290
- | 'en'
291
- | 'fr'
292
- | 'de'
293
- | 'it'
294
- | 'pt'
295
- | 'es'
296
- | 'nl'
297
- | 'pl'
298
- | 'ro'
299
- | string;
300
- avoidChangesNotSavedAlertOnLeave?: boolean;
301
- loadableDesignState?: imageDesignState;
302
- savingPixelRatio: number;
303
- previewPixelRatio: number;
304
- useCloudimage?: boolean;
305
- cloudimage?: {
306
- token: string;
307
- dontPrefixUrl?: boolean;
308
- domain?: string;
309
- version?: string;
310
- secureProtocol?: boolean;
311
- loadableQuery?: string;
312
- imageSealing?: {
313
- enable?: boolean;
314
- salt?: string;
315
- charCount?: number;
316
- includeParams?: string[];
317
- };
318
- };
319
- observePluginContainerSize?: boolean;
320
- showCanvasOnly?: boolean;
321
- getCurrentImgDataFnRef?:
322
- | RefObject
323
- | {
324
- current?: getCurrentImgDataFunction;
325
- };
326
- updateStateFnRef?:
327
- | RefObject
328
- | {
329
- current?: (newStatePart: {} | ((currentState: {}) => void)) => void;
330
- };
331
- onModify?: (currentImageDesignState: imageDesignState) => void;
332
- useZoomPresetsMenu?: boolean;
333
- disableZooming?: boolean;
334
- noCrossOrigin?: boolean;
335
- disableSaveIfNoChanges?: boolean;
336
- removeSaveButton?: boolean;
337
- resetOnImageSourceChange?: boolean;
338
- backgroundColor?: string;
339
- backgroundImage?: HTMLImageElement;
340
- }
341
-
342
- declare const FilerobotImageEditor: FunctionComponent<FilerobotImageEditorConfig>;
343
-
344
- export default FilerobotImageEditor;
345
- export { TABS, TOOLS };
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"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- import FilerobotImageEditor from"components/assembly-point";import{TABS_IDS,TOOLS_IDS}from"utils/constants";export{TABS_IDS as TABS,TOOLS_IDS as TOOLS};export default FilerobotImageEditor;
1
+ import ImageEditor from"components/assembly-point";import{TABS_IDS,TOOLS_IDS}from"utils/constants";export{TABS_IDS as TABS,TOOLS_IDS as TOOLS};export default ImageEditor;
@@ -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,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,e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