@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,3 @@
1
+ declare const debounce: <T extends (...args: any[]) => any>(func: T, timeout?: number) => ((...args: any[]) => void);
2
+ export default debounce;
3
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACjD,MAAM,CAAC,EACP,UAAS,MAAY,KACpB,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAa3B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const deepMerge: <T extends object>(source: T, object?: any, considerArray?: boolean) => T;
2
+ export default deepMerge;
3
+ //# sourceMappingURL=deep-merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep-merge.d.ts","sourceRoot":"","sources":["../../src/utils/deep-merge.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,EACjC,QAAQ,CAAC,EACT,SAAQ,GAAQ,EAChB,gBAAe,OAAe,KAC7B,CA+BF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _typeof from"@babel/runtime/helpers/typeof";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}var _deepMerge=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],d=_objectSpread({},a),e=Object.keys(b);return e.forEach(function(e){var f=b[e];if(void 0!==f){var g=_typeof(f);if("object"!==g||f instanceof HTMLElement||null===f||Array.isArray(f)||!a[e]||"object"!==_typeof(a[e]))return void(d[e]=c&&Array.isArray(d[e])&&Array.isArray(f)?[].concat(_toConsumableArray(d[e]),_toConsumableArray(f)):f);d[e]=_deepMerge(a[e],f)}}),d};export default _deepMerge;
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _typeof from"@babel/runtime/helpers/typeof";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}var _deepMerge=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],d=_objectSpread({},a),e=Object.keys(b);return e.forEach(function(e){var f=b[e];if(void 0!==f){var g=_typeof(f),h=a[e];if("object"!==g||f instanceof HTMLElement||null===f||Array.isArray(f)||!h||"object"!==_typeof(h)){var i=d[e];return void(d[e]=c&&Array.isArray(i)&&Array.isArray(f)?[].concat(_toConsumableArray(i),_toConsumableArray(f)):f)}d[e]=_deepMerge(h,f)}}),d};export default _deepMerge;
@@ -0,0 +1,11 @@
1
+ import type { AppState, ImageDesignState } from 'types/state';
2
+ /**
3
+ * Extracts the needed properties/state that are used in canvas's design from the global state.
4
+ *
5
+ * @param state The global state.
6
+ * @param useStateAsConfig Value assigned to any undefined/null property in returned object.
7
+ * @returns The extracted design state.
8
+ */
9
+ declare const extractCurrentDesignState: (state: AppState, useStateAsConfig?: boolean) => ImageDesignState;
10
+ export default extractCurrentDesignState;
11
+ //# sourceMappingURL=extract-current-design-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-current-design-state.d.ts","sourceRoot":"","sources":["../../src/utils/extract-current-design-state.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9D;;;;;;GAMG;AACH,QAAA,MAAM,yBAAyB,GAC7B,OAAO,QAAQ,EACf,mBAAmB,OAAO,KACzB,gBAgBF,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const extractNameFromUrl: (url: string) => string;
2
+ export default extractNameFromUrl;
3
+ //# sourceMappingURL=extract-name-from-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-name-from-url.d.ts","sourceRoot":"","sources":["../../src/utils/extract-name-from-url.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAGzC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Filter } from 'konva/lib/Node';
2
+ declare const filterStrToClass: (filterString: string | null | undefined) => Filter | null;
3
+ export default filterStrToClass;
4
+ //# sourceMappingURL=filter-str-to-class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-str-to-class.d.ts","sourceRoot":"","sources":["../../src/utils/filter-str-to-class.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAKxC,QAAA,MAAM,gBAAgB,GACpB,cAAc,MAAM,GAAG,IAAI,GAAG,SAAS,KACtC,MAAM,GAAG,IASX,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Filter } from 'konva/lib/Node';
2
+ declare const finetunesStrsToClasses: (finetunesStrings: string[] | undefined) => Filter[];
3
+ export default finetunesStrsToClasses;
4
+ //# sourceMappingURL=finetunes-strs-to-classes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finetunes-strs-to-classes.d.ts","sourceRoot":"","sources":["../../src/utils/finetunes-strs-to-classes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC,QAAA,MAAM,sBAAsB,GAC1B,kBAAkB,MAAM,EAAE,GAAG,SAAS,KACrC,MAAM,EAYR,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- import Konva from"konva";import*as CustomFinetunes from"custom/finetunes";var finetunesStrsToClasses=function(a){return Array.isArray(a)&&0<a.length?a.map(function(a){return Konva.Filters[a]||CustomFinetunes[a]}):[]};export default finetunesStrsToClasses;
1
+ import Konva from"konva";import*as CustomFinetunes from"custom/finetunes";var finetunesStrsToClasses=function(a){return Array.isArray(a)&&0<a.length?a.map(function(a){return Konva.Filters[a]||CustomFinetunes[a]}).filter(function(a){return void 0!==a}):[]};export default finetunesStrsToClasses;
@@ -0,0 +1,8 @@
1
+ /** External Dependencies */
2
+ import type { Vector2d } from 'konva/lib/types';
3
+ interface RotatedPoint extends Vector2d {
4
+ rotation: number;
5
+ }
6
+ declare const getCenterRotatedPoint: (width: number, height: number, newRotationAngleDegree: number) => RotatedPoint;
7
+ export default getCenterRotatedPoint;
8
+ //# sourceMappingURL=get-center-rotated-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-center-rotated-point.d.ts","sourceRoot":"","sources":["../../src/utils/get-center-rotated-point.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,YAAa,SAAQ,QAAQ;IACrC,QAAQ,EAAE,MAAM,CAAC;CAClB;AASD,QAAA,MAAM,qBAAqB,GACzB,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,wBAAwB,MAAM,KAC7B,YAmBF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const getDefaultSaveQuality: (providedDefaultQuality: number) => number;
2
+ export default getDefaultSaveQuality;
3
+ //# sourceMappingURL=get-default-save-quality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-default-save-quality.d.ts","sourceRoot":"","sources":["../../src/utils/get-default-save-quality.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,qBAAqB,GAAI,wBAAwB,MAAM,KAAG,MAGpC,CAAC;AAE7B,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const getDimensionsMinimalRatio: (firstWidth: number, firstHeight: number, secondWidth: number, secondHeight: number) => number;
2
+ export default getDimensionsMinimalRatio;
3
+ //# sourceMappingURL=get-dimensions-minimal-ratio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-dimensions-minimal-ratio.d.ts","sourceRoot":"","sources":["../../src/utils/get-dimensions-minimal-ratio.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,yBAAyB,GAC7B,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,aAAa,MAAM,EACnB,cAAc,MAAM,KACnB,MAKF,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface ElementCoords {
2
+ top: number;
3
+ left: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ declare const getElemDocumentCoords: (elem: Element | null | undefined) => ElementCoords | null;
8
+ export default getElemDocumentCoords;
9
+ //# sourceMappingURL=get-elem-document-coords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-elem-document-coords.d.ts","sourceRoot":"","sources":["../../src/utils/get-elem-document-coords.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,qBAAqB,GACzB,MAAM,OAAO,GAAG,IAAI,GAAG,SAAS,KAC/B,aAAa,GAAG,IAsBlB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface FileFullName {
2
+ fullName: string;
3
+ name: string;
4
+ extension: string;
5
+ }
6
+ declare const getFileFullName: (fileNameProp?: string, appendedExtension?: string) => FileFullName;
7
+ export default getFileFullName;
8
+ //# sourceMappingURL=get-file-full-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-file-full-name.d.ts","sourceRoot":"","sources":["../../src/utils/get-file-full-name.ts"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,eAAe,GACnB,eAAe,MAAM,EACrB,oBAAoB,MAAM,KACzB,YA6BF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,21 @@
1
+ /** Internal Dependencies */
2
+ import type Konva from 'konva';
3
+ interface RelativeToObject {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ interface PointerOffset {
8
+ offsetX: number;
9
+ offsetY: number;
10
+ }
11
+ /**
12
+ * Gets the touch/mouse position relative to the passed object to be considered as offset X/Y.
13
+ *
14
+ * @param previewGroup - The preview group that is a direct child of the design layer
15
+ * @param relativeToObject - The object to be considered as parent element
16
+ * contains left, top, width & height relative to the document.
17
+ * @returns both X & Y offset values.
18
+ */
19
+ declare const getPointerOffsetPositionBoundedToObject: (previewGroup?: Konva.Group | null, relativeToObject?: RelativeToObject) => PointerOffset;
20
+ export default getPointerOffsetPositionBoundedToObject;
21
+ //# sourceMappingURL=get-pointer-offset-position-bounded-to-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pointer-offset-position-bounded-to-object.d.ts","sourceRoot":"","sources":["../../src/utils/get-pointer-offset-position-bounded-to-object.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,uCAAuC,GAC3C,eAAc,KAAK,CAAC,KAAK,GAAG,IAAW,EACvC,mBAAkB,gBAA0C,KAC3D,aAwBF,CAAC;AAEF,eAAe,uCAAuC,CAAC"}
@@ -1 +1 @@
1
- import restrictNumber from"./restrict-number";var getPointerOffsetPositionBoundedToObject=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},c=a.parent,d=c.getStage(),e=d.attrs.zoomFactor,f=c.getRelativePointerPosition();return{offsetX:restrictNumber(f.x,0,b.width/(d.scaleX()/e))+c.attrs.xPadding,offsetY:restrictNumber(f.y,0,b.height/(d.scaleY()/e))+c.attrs.yPadding}};export default getPointerOffsetPositionBoundedToObject;
1
+ import restrictNumber from"./restrict-number";var getPointerOffsetPositionBoundedToObject=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{width:0,height:0};if(!a)return{offsetX:0,offsetY:0};var c=a.parent,d=c.getStage(),e=d.attrs.zoomFactor,f=c.getRelativePointerPosition()||{x:0,y:0};return{offsetX:restrictNumber(f.x,0,b.width/(d.scaleX()/e))+c.attrs.xPadding,offsetY:restrictNumber(f.y,0,b.height/(d.scaleY()/e))+c.attrs.yPadding}};export default getPointerOffsetPositionBoundedToObject;
@@ -0,0 +1,11 @@
1
+ /** Internal Dependencies */
2
+ import type { Dimensions } from 'types/common';
3
+ interface CropDimensions {
4
+ x?: number;
5
+ y?: number;
6
+ width?: number;
7
+ height?: number;
8
+ }
9
+ declare const getProperDimensions: (resizeDimensions: Partial<Dimensions>, cropDimensions: CropDimensions, shownImageDimensions: Dimensions, originalDimensions: Dimensions, rotationAngle?: number) => Dimensions;
10
+ export default getProperDimensions;
11
+ //# sourceMappingURL=get-proper-dimensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-proper-dimensions.d.ts","sourceRoot":"","sources":["../../src/utils/get-proper-dimensions.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,UAAU,cAAc;IACtB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,mBAAmB,GACvB,kBAAkB,OAAO,CAAC,UAAU,CAAC,EACrC,gBAAgB,cAAc,EAC9B,sBAAsB,UAAU,EAChC,oBAAoB,UAAU,EAC9B,gBAAe,MAAU,KACxB,UAkCF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const getProperImageToCanvasSpacing: () => number;
2
+ export default getProperImageToCanvasSpacing;
3
+ //# sourceMappingURL=get-proper-image-to-canvas-spacing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-proper-image-to-canvas-spacing.d.ts","sourceRoot":"","sources":["../../src/utils/get-proper-image-to-canvas-spacing.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,6BAA6B,QAAO,MAGhB,CAAC;AAE3B,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface ScrollOffset {
2
+ topOffset: number;
3
+ leftOffset: number;
4
+ }
5
+ declare const getScrollOffset: () => ScrollOffset;
6
+ export default getScrollOffset;
7
+ //# sourceMappingURL=get-scroll-offset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-scroll-offset.d.ts","sourceRoot":"","sources":["../../src/utils/get-scroll-offset.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,QAAO,YAa3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface SizeAfterRotation {
2
+ width: number;
3
+ height: number;
4
+ offsetTop: number;
5
+ offsetLeft: number;
6
+ }
7
+ declare const getSizeAfterRotation: (width: number, height: number, rotationAngleInDegree?: number) => SizeAfterRotation;
8
+ export default getSizeAfterRotation;
9
+ //# sourceMappingURL=get-size-after-rotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-size-after-rotation.d.ts","sourceRoot":"","sources":["../../src/utils/get-size-after-rotation.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,GACxB,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,wBAAuB,MAAU,KAChC,iBAiCF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Dimensions } from 'types/common';
2
+ declare const getZoomFitFactor: (previewDimens: Dimensions, originalDimens: Dimensions) => number;
3
+ export default getZoomFitFactor;
4
+ //# sourceMappingURL=get-zoom-fit-factor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-zoom-fit-factor.d.ts","sourceRoot":"","sources":["../../src/utils/get-zoom-fit-factor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,QAAA,MAAM,gBAAgB,GACpB,eAAe,UAAU,EACzB,gBAAgB,UAAU,KACzB,MAIuB,CAAC;AAE3B,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const imageToBase64: (image: HTMLImageElement) => string;
2
+ export default imageToBase64;
3
+ //# sourceMappingURL=image-to-base64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-to-base64.d.ts","sourceRoot":"","sources":["../../src/utils/image-to-base64.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,GAAI,OAAO,gBAAgB,KAAG,MAWhD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const isDefaultZeroValuesOnly: (initialProps: Record<string, any> | undefined | null, newProps: Record<string, any> | undefined | null) => boolean;
2
+ export default isDefaultZeroValuesOnly;
3
+ //# sourceMappingURL=is-default-zero-values-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-default-zero-values-only.d.ts","sourceRoot":"","sources":["../../src/utils/is-default-zero-values-only.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,uBAAuB,GAC3B,cAAc,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,EACpD,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,KAC/C,OAQA,CAAC;AAEJ,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const isSameImage: (img1?: string | HTMLImageElement, img2HtmlElement?: HTMLImageElement) => boolean;
2
+ export default isSameImage;
3
+ //# sourceMappingURL=is-same-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-same-image.d.ts","sourceRoot":"","sources":["../../src/utils/is-same-image.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,GACf,OAAO,MAAM,GAAG,gBAAgB,EAChC,kBAAkB,gBAAgB,KACjC,OAUA,CAAC;AAEJ,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- var isSameImage=function(a,b){return!!(a&&b&&(a instanceof HTMLImageElement&&a.src===b.src&&a.width===b.width&&a.height===b.height||((null===a||void 0===a?void 0:a.src)||a)===b.src))};export default isSameImage;
1
+ var isSameImage=function(a,b){return!!(a&&b&&(a instanceof HTMLImageElement&&a.src===b.src&&a.width===b.width&&a.height===b.height||(a instanceof HTMLImageElement&&a.src||a)===b.src))};export default isSameImage;
@@ -0,0 +1,3 @@
1
+ declare const loadImage: (imageSrc: string, imageFileName?: string, noCrossOrigin?: boolean) => Promise<HTMLImageElement>;
2
+ export default loadImage;
3
+ //# sourceMappingURL=load-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-image.d.ts","sourceRoot":"","sources":["../../src/utils/load-image.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,GACb,UAAU,MAAM,EAChB,gBAAgB,MAAM,EACtB,gBAAe,OAAe,KAC7B,OAAO,CAAC,gBAAgB,CAkBvB,CAAC;AAEL,eAAe,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Dimensions } from 'types/common';
2
+ interface CropInput {
3
+ x?: number;
4
+ y?: number;
5
+ width?: number;
6
+ height?: number;
7
+ }
8
+ interface MappedCropBox {
9
+ x?: number;
10
+ y?: number;
11
+ width: number;
12
+ height: number;
13
+ }
14
+ declare const mapCropBox: (crop: CropInput, shownImageDimensions: Dimensions, toDimensions: Dimensions) => MappedCropBox;
15
+ export default mapCropBox;
16
+ //# sourceMappingURL=map-crop-box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-crop-box.d.ts","sourceRoot":"","sources":["../../src/utils/map-crop-box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,UAAU,SAAS;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,aAAa;IACrB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,UAAU,GACd,MAAM,SAAS,EACf,sBAAsB,UAAU,EAChC,cAAc,UAAU,KACvB,aA6CD,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const mapNumber: (number: number, oldMin: number, oldMax: number, newMin: number, newMax: number) => number;
2
+ export default mapNumber;
3
+ //# sourceMappingURL=map-number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-number.d.ts","sourceRoot":"","sources":["../../src/utils/map-number.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,GACb,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,QAAQ,MAAM,KACb,MACmE,CAAC;AAEvE,eAAe,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** External Dependencies */
2
+ import type { Vector2d } from 'konva/lib/types';
3
+ import { Layer } from 'konva/lib/Layer';
4
+ /** Internal Dependencies */
5
+ import type { Annotation } from 'types/annotations';
6
+ declare const mapPositionStringToPoint: (annotation: Annotation, designLayer: Layer, position: string) => Vector2d;
7
+ export default mapPositionStringToPoint;
8
+ //# sourceMappingURL=map-position-string-to-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-position-string-to-point.d.ts","sourceRoot":"","sources":["../../src/utils/map-position-string-to-point.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,4BAA4B;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,QAAA,MAAM,wBAAwB,GAC5B,YAAY,UAAU,EACtB,aAAa,KAAK,EAClB,UAAU,MAAM,KACf,QAqGF,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import{POSITIONS}from"./constants";import getSizeAfterRotation from"./get-size-after-rotation";var mapPositionStringToPoint=function(a,b,c){var d=a.width,e=a.height,f=a.scaleX,g=void 0===f?1:f,h=a.scaleY,i=void 0===h?1:h,j=a.rotation,k=void 0===j?0:j,l=a.padding,m=void 0===l?0:l,n=a.radius,o=a.radiusX,p=a.radiusY,q=getSizeAfterRotation((d||2*(n||o||0))*g,(e||2*(n||p||0))*i,k),r=b.attrs,s=r.clipWidth,t=r.clipHeight,u=r.clipX,v=void 0===u?0:u,w=r.clipY,x=void 0===w?0:w,y={left:v+q.offsetLeft+m,center:v+s/2-(q.width/2-q.offsetLeft)+m,right:v+s-q.width-m+q.offsetLeft},z={top:x+q.offsetTop+m,middle:x+t/2-(q.height/2-q.offsetTop)+m,bottom:x+t-q.height-m+q.offsetTop},A=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},POSITIONS.TOP_LEFT,function(){return{x:y.left,y:z.top}}),POSITIONS.TOP_CENTER,function(){return{x:y.center,y:z.top}}),POSITIONS.TOP_RIGHT,function(){return{x:y.right,y:z.top}}),POSITIONS.MIDDLE_LEFT,function(){return{x:y.left,y:z.middle}}),POSITIONS.MIDDLE_CENTER,function(){return{x:y.center,y:z.middle}}),POSITIONS.MIDDLE_RIGHT,function(){return{x:y.right,y:z.middle}}),POSITIONS.BOTTOM_LEFT,function(){return{x:y.left,y:z.bottom}}),POSITIONS.BOTTOM_CENTER,function(){return{x:y.center,y:z.bottom}}),POSITIONS.BOTTOM_RIGHT,function(){return{x:y.right,y:z.bottom}});return A[c]()};export default mapPositionStringToPoint;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import{hasDimensions,hasRadius,hasRadii}from"types/annotations";import{POSITIONS}from"./constants";import getSizeAfterRotation from"./get-size-after-rotation";var mapPositionStringToPoint=function(a,b,c){var d=a.scaleX,e=void 0===d?1:d,f=a.scaleY,g=void 0===f?1:f,h=a.rotation,i=void 0===h?0:h,j=a.padding,k=void 0===j?0:j,l=0,m=0;hasDimensions(a)?(l=a.width,m=a.height):hasRadius(a)?(l=2*a.radius,m=2*a.radius):hasRadii(a)&&(l=2*a.radiusX,m=2*a.radiusY);var n=getSizeAfterRotation(l*e,m*g,i),o=b.attrs,p=o.clipWidth,q=o.clipHeight,r=o.clipX,s=void 0===r?0:r,t=o.clipY,u=void 0===t?0:t,v={left:s+n.offsetLeft+k,center:s+p/2-(n.width/2-n.offsetLeft)+k,right:s+p-n.width-k+n.offsetLeft},w={top:u+n.offsetTop+k,middle:u+q/2-(n.height/2-n.offsetTop)+k,bottom:u+q-n.height-k+n.offsetTop},x=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},POSITIONS.TOP_LEFT,function(){return{x:v.left,y:w.top}}),POSITIONS.TOP_CENTER,function(){return{x:v.center,y:w.top}}),POSITIONS.TOP_RIGHT,function(){return{x:v.right,y:w.top}}),POSITIONS.MIDDLE_LEFT,function(){return{x:v.left,y:w.middle}}),POSITIONS.MIDDLE_CENTER,function(){return{x:v.center,y:w.middle}}),POSITIONS.MIDDLE_RIGHT,function(){return{x:v.right,y:w.middle}}),POSITIONS.BOTTOM_LEFT,function(){return{x:v.left,y:w.bottom}}),POSITIONS.BOTTOM_CENTER,function(){return{x:v.center,y:w.bottom}}),POSITIONS.BOTTOM_RIGHT,function(){return{x:v.right,y:w.bottom}});return x[c]()};export default mapPositionStringToPoint;
@@ -0,0 +1,3 @@
1
+ declare const randomId: (prefixString?: string) => string;
2
+ export default randomId;
3
+ //# sourceMappingURL=random-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-id.d.ts","sourceRoot":"","sources":["../../src/utils/random-id.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,GAAI,eAAc,MAAW,KAAG,MAIzC,CAAC;AAEN,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const restrictNumber: (number: number, minProp?: number, max?: number) => number;
2
+ export default restrictNumber;
3
+ //# sourceMappingURL=restrict-number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restrict-number.d.ts","sourceRoot":"","sources":["../../src/utils/restrict-number.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,GAClB,QAAQ,MAAM,EACd,UAAU,MAAM,EAChB,MAAM,MAAM,KACX,MAOF,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ /** External Dependencies */
2
+ import { Filter } from 'konva/lib/Node';
3
+ /** Internal Dependencies */
4
+ import { AnnotationsMap } from 'types/annotations';
5
+ import { AppState, ImageDesignState } from 'types/state';
6
+ /**
7
+ * Extracts the filter name from a Konva Filter instance.
8
+ */
9
+ export declare const filterToString: (filter: Filter | null | undefined) => string | undefined;
10
+ /**
11
+ * Extracts the finetune name from a Konva Filter instance.
12
+ */
13
+ export declare const finetuneToString: (finetune: Filter) => string;
14
+ /**
15
+ * Converts an array of Filter instances to an array of filter name strings.
16
+ */
17
+ export declare const finetunesToStrings: (finetunes: Filter[]) => string[];
18
+ /**
19
+ * Serializes annotations by converting HTMLImageElement to base64 strings.
20
+ */
21
+ export declare const serializeAnnotations: (annotations: AnnotationsMap) => AnnotationsMap;
22
+ /**
23
+ * Main serialization function: converts runtime AppState to serializable ImageDesignState.
24
+ * Replaces manual mutation in use-transformed-img-data.ts.
25
+ */
26
+ export declare const serializeDesignState: (state: AppState, includeShownImageDimensions?: boolean) => ImageDesignState;
27
+ //# sourceMappingURL=serialize-design-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialize-design-state.d.ts","sourceRoot":"","sources":["../../src/utils/serialize-design-state.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,4BAA4B;AAC5B,OAAO,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAGtE;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,KAChC,MAAM,GAAG,SAKX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAGnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,EAAE,KAAG,MAAM,EAE9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,cAAc,KAC1B,cAsCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,QAAQ,EACf,8BAA6B,OAAe,KAC3C,gBA+BF,CAAC"}
@@ -0,0 +1 @@
1
+ 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{isImageAnnotation}from"types/annotations";import imageToBase64 from"./image-to-base64";export var filterToString=function(a){if(a){var b=a;return b.filterName||b.name}};export var finetuneToString=function(a){var b=a;return b.finetuneName||b.name||""};export var finetunesToStrings=function(a){return a.map(finetuneToString).filter(Boolean)};export var serializeAnnotations=function(a){var b={};return Object.keys(a).forEach(function(c){var d=a[c];if(isImageAnnotation(d)&&d.image){var e="string"==typeof d.image?d.image:d.image.src;b[c]=d.image instanceof HTMLImageElement?e&&e.startsWith("blob:")?_objectSpread(_objectSpread({},d),{},{image:imageToBase64(d.image)}):_objectSpread(_objectSpread({},d),{},{image:e}):d}else b[c]=d}),b};export var serializeDesignState=function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],c={imgSrc:a.imgSrc,finetunes:finetunesToStrings(a.finetunes),finetunesProps:a.finetunesProps,filter:filterToString(a.filter),adjustments:a.adjustments,annotations:serializeAnnotations(a.annotations),resize:a.resize};return b&&(c.shownImageDimensions={width:a.shownImageDimensions.width,height:a.shownImageDimensions.height,scaledBy:a.shownImageDimensions.scaledBy}),c};
@@ -0,0 +1,3 @@
1
+ declare const toPrecisedFloat: (number: number, precision?: number) => number;
2
+ export default toPrecisedFloat;
3
+ //# sourceMappingURL=to-precised-float.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-precised-float.d.ts","sourceRoot":"","sources":["../../src/utils/to-precised-float.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe,GAAI,QAAQ,MAAM,EAAE,YAAW,MAAU,KAAG,MACJ,CAAC;AAE9D,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const updateTranslations: (newTranslations?: Record<string, string>, language?: string) => Record<string, string>;
2
+ export declare const translate: (key: string) => string;
3
+ //# sourceMappingURL=translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../src/utils/translator.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,kBAAkB,GAC7B,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAC5C,WAAU,MAAa,KACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAKrB,CAAC;AAEJ,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,MACC,CAAC"}
@@ -1 +1 @@
1
- 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 defaultTranslations from"context/default-translations";import{TRANSLATIONS_GRID_UUID}from"./constants";var backendTranslations={},activatedTranslations=_objectSpread({},defaultTranslations),hardcodedErrorMsg="Error while loading translations from backend.";export var updateTranslations=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"en";return Object.assign(activatedTranslations,(null===backendTranslations||void 0===backendTranslations?void 0:backendTranslations[null===b||void 0===b?void 0:b.toLowerCase()])||{},a)};var sendMissingTranslationsToBackend=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return new Promise(function(b,c){var d=new XMLHttpRequest;d.responseType="json",d.onload=function(){if(200<=d.status&&300>d.status)b(d.response);else{var a;console.warn("Error in sending translation key to backend ".concat(null===(a=d.response)||void 0===a?void 0:a.hint,", ").concat(d.status)),c(new Error("Error in sending translation key to backend"))}},d.onerror=function(){var a;console.warn("Error in sending translation key to backend ".concat(null===(a=d.response)||void 0===a?void 0:a.hint,", ").concat(d.status)),c(new Error("Error in sending translation key to backend"))};d.open("POST","https://neo.wordplex.io/api/import/request-translations?grid_uuid=".concat(TRANSLATIONS_GRID_UUID)),d.send(JSON.stringify({grid_uuid:TRANSLATIONS_GRID_UUID,translations_requests:a}))})};export var getBackendTranslations=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"en",b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(c,d){var e=a.toLowerCase(),f=new XMLHttpRequest;f.responseType="json",f.onload=function(){if(200<=f.status&&300>f.status){(f.response||[]).forEach(function(a){backendTranslations[e]=_objectSpread(_objectSpread({},backendTranslations[e]),{},_defineProperty({},a.translation_key,a.translations[e]))});var a=[];Object.keys(defaultTranslations).forEach(function(b){var c;b&&!(null!==(c=backendTranslations[e])&&void 0!==c&&c[b])&&a.push({key:b,lang:e,default:defaultTranslations[b]})}),0<a.length&&void sendMissingTranslationsToBackend(a),updateTranslations(b,e),c(activatedTranslations)}else{var g,h,i;console.error("Status code: ".concat(f.status)),console.error((null===(g=f.response)||void 0===g?void 0:g.msg)||(null===(h=f.response)||void 0===h?void 0:h.msg)||(null===(i=f.response)||void 0===i?void 0:i.details)||hardcodedErrorMsg),d(new Error("Error in sending translation key to backend"))}},f.onerror=function(){console.error("Status code ".concat(f.status,", error: ").concat(hardcodedErrorMsg)),d(new Error("Error in sending translation key to backend"))},f.open("GET","https://i18n-fastly.ultrafast.io/api/export?grid=".concat(TRANSLATIONS_GRID_UUID)),f.send()})};export var translate=function(a){return activatedTranslations[a]||a||""};
1
+ 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 defaultTranslations from"context/default-translations";var customTranslations={},activatedTranslations=_objectSpread({},defaultTranslations);export var updateTranslations=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"en";return Object.assign(activatedTranslations,customTranslations[null===b||void 0===b?void 0:b.toLowerCase()]||{},a)};export var translate=function(a){return activatedTranslations[a]||a||""};
package/package.json CHANGED
@@ -1,61 +1,63 @@
1
- {
2
- "name": "@solostylist/image-editor",
3
- "publishConfig": {
4
- "access": "public"
5
- },
6
- "version": "1.0.0",
7
- "license": "MIT",
8
- "author": "Lê Đặng Trường Đạt",
9
- "main": "./lib/index.js",
10
- "types": "./lib/index.d.ts",
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/ledangtruongdatdnvn/solostylist-image-editor"
14
- },
15
- "keywords": [
16
- "Image editing react component",
17
- "React Image Editor",
18
- "image editor",
19
- "solostylist image editor",
20
- "edit image",
21
- "modify image",
22
- "update image",
23
- "finetune",
24
- "filters",
25
- "weatermark",
26
- "resize",
27
- "annotate"
28
- ],
29
- "files": [
30
- "lib"
31
- ],
32
- "dependencies": {
33
- "@babel/runtime": "^7.28.6",
34
- "@emotion/cache": "^11.14.0",
35
- "@emotion/react": "^11.14.0",
36
- "@emotion/styled": "^11.14.1",
37
- "@fontsource/outfit": "^5.2.8",
38
- "@mui/icons-material": "^7.3.7",
39
- "@mui/lab": "^7.0.1-beta.21",
40
- "@mui/material": "^7.3.7",
41
- "@mui/system": "^7.3.7",
42
- "@mui/utils": "^7.3.7",
43
- "@solostylist/ui-kit": "^1.0.195",
44
- "dayjs": "^1.11.19",
45
- "framer-motion": "^12.34.0",
46
- "konva": "10.2.0",
47
- "overlayscrollbars": "^2.14.0",
48
- "overlayscrollbars-react": "^0.5.6",
49
- "react-colorful": "^5.6.1",
50
- "uuid": "^13.0.0"
51
- },
52
- "peerDependencies": {
53
- "react": ">=17.0.0",
54
- "react-dom": ">=17.0.0",
55
- "react-konva": ">=17.0.0"
56
- },
57
- "scripts": {
58
- "build:lib": "rimraf lib && cross-env BABEL_ENV=production NODE_ENV=production babel src -d lib --config-file ../../babel.config.json --extensions '.ts,.tsx' --ignore '**/*.d.ts' --copy-files -D"
59
- },
60
- "gitHead": "eb3c52c580ba7169cbfe3a226748fa9b4ddd0d30"
61
- }
1
+ {
2
+ "name": "@solostylist/image-editor",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "1.0.2",
7
+ "license": "MIT",
8
+ "author": "Lê Đặng Trường Đạt",
9
+ "main": "./lib/index.js",
10
+ "types": "./lib/index.d.ts",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/ledangtruongdatdnvn/solostylist-image-editor"
14
+ },
15
+ "keywords": [
16
+ "Image editing react component",
17
+ "React Image Editor",
18
+ "image editor",
19
+ "solostylist image editor",
20
+ "edit image",
21
+ "modify image",
22
+ "update image",
23
+ "finetune",
24
+ "filters",
25
+ "weatermark",
26
+ "resize",
27
+ "annotate"
28
+ ],
29
+ "files": [
30
+ "lib"
31
+ ],
32
+ "dependencies": {
33
+ "@babel/runtime": "^7.28.6",
34
+ "@emotion/cache": "^11.14.0",
35
+ "@emotion/react": "^11.14.0",
36
+ "@emotion/styled": "^11.14.1",
37
+ "@fontsource/outfit": "^5.2.8",
38
+ "@mui/icons-material": "^7.3.7",
39
+ "@mui/lab": "^7.0.1-beta.21",
40
+ "@mui/material": "^7.3.7",
41
+ "@mui/system": "^7.3.7",
42
+ "@mui/utils": "^7.3.7",
43
+ "@solostylist/ui-kit": "^1.0.195",
44
+ "dayjs": "^1.11.19",
45
+ "framer-motion": "^12.34.0",
46
+ "konva": "10.2.0",
47
+ "overlayscrollbars": "^2.14.0",
48
+ "overlayscrollbars-react": "^0.5.6",
49
+ "react-colorful": "^5.6.1",
50
+ "uuid": "^13.0.0"
51
+ },
52
+ "peerDependencies": {
53
+ "react": ">=17.0.0",
54
+ "react-dom": ">=17.0.0",
55
+ "react-konva": ">=17.0.0"
56
+ },
57
+ "scripts": {
58
+ "build:babel": "cross-env BABEL_ENV=production NODE_ENV=production babel src -d lib --config-file ../../babel.config.json --extensions '.ts,.tsx' --ignore '**/*.d.ts' --copy-files -D",
59
+ "build:types": "tsc --project tsconfig.build.json",
60
+ "build:lib": "rimraf lib && npm run build:babel && npm run build:types"
61
+ },
62
+ "gitHead": "eb3c52c580ba7169cbfe3a226748fa9b4ddd0d30"
63
+ }
@@ -1 +0,0 @@
1
- import{SFlexBox}from"@solostylist/ui-kit/core";var CropPresetItem=function(a){var b=a.titleKey,c=a.description,d=a.ratio,f=a.onClick,g=a.Icon,h=a.isActive,i=a.isAccordion,j=a.width,k=a.height,l=a.t,m=a.disableManualResize,n=a.noEffect;return React.createElement(SFlexBox,{active:h,onClick:function(a){return f(a,d,{ratioTitleKey:b,width:j,height:k,disableManualResize:void 0!==m&&m,noEffect:void 0!==n&&n})},isAccordion:void 0!==i&&i,sx:{display:"flex",gap:2,justifyContent:"flex-start",alignItems:"center",paddingX:2,paddingY:1,"&:hover":{cursor:"pointer",backgroundColor:"action.hover"}}},g&&("string"==typeof g?React.createElement("span",{dangerouslySetInnerHTML:{__html:g}}):React.createElement(g,null)),l(b)," ",c&&"(".concat(c,")"))};export default CropPresetItem;
@@ -1 +0,0 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import{useMemo}from"react";import{Typography}from"@mui/material";import Menu from"@mui/material/Menu";import{SET_CROP,SET_RESIZE,ZOOM_CANVAS}from"actions";import{useStore}from"hooks";import{DEFAULT_ZOOM_FACTOR,ORIGINAL_CROP,TOOLS_IDS}from"utils/constants";import getZoomFitFactor from"utils/get-zoom-fit-factor";import toPrecisedFloat from"utils/to-precised-float";import CropPresetItem from"./crop-preset-item";import{DEFAULT_CROP_PRESETS}from"./crop.constants";var CropPresetsOption=function(a){var b=a.anchorEl,c=void 0===b?null:b,d=a.onClose,e=useStore(),f=e.dispatch,g=e.t,h=e.adjustments,i=void 0===h?{}:h,j=i.crop,k=void 0===j?{}:j,l=k.ratio,m=k.ratioTitleKey,n=e.shownImageDimensions,o=e.config,p=o[TOOLS_IDS.CROP],q=useMemo(function(){var a=p||{},b=a.presetsItems,c=void 0===b?[]:b,d=a.lockCropAreaAt,e=d?DEFAULT_CROP_PRESETS.filter(function(a){var b;return!(null!==(b=a.hide)&&void 0!==b&&b.call(a,{lockCropAreaAt:d}))}):DEFAULT_CROP_PRESETS;return[].concat(_toConsumableArray(e),_toConsumableArray(c))},[p]),r=function(a,b,c){a.stopPropagation();var e={ratio:b,ratioTitleKey:c.ratioTitleKey,noEffect:c.noEffect};if(f({type:SET_CROP,payload:e}),null!==p&&void 0!==p&&p.autoResize){var g,h;f({type:SET_RESIZE,payload:{width:c.width,height:c.height,manualChangeDisabled:c.disableManualResize}}),f({type:ZOOM_CANVAS,payload:{factor:(null!==(g=c.width)&&void 0!==g?g:0)>n.width||(null!==(h=c.height)&&void 0!==h?h:0)>n.height?getZoomFitFactor(n,c):DEFAULT_ZOOM_FACTOR}})}d()};return React.createElement(React.Fragment,null,React.createElement(Typography,null,g(m||"cropTool")),React.createElement(Menu,{anchorEl:c,onClose:d,open:!!c,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},q.map(function(a){var b=a.titleKey,c=a.descriptionKey,d=a.ratio,e=a.width,f=a.height,h=a.icon,i=a.disableManualResize,j=a.noEffect;return React.createElement(CropPresetItem,{key:d,ratio:null!==d&&void 0!==d?d:toPrecisedFloat((null!==e&&void 0!==e?e:0)/(null!==f&&void 0!==f?f:1)),titleKey:b,t:g,description:g(null!==c&&void 0!==c?c:""),Icon:h,isActive:(l||ORIGINAL_CROP)===(null!==d&&void 0!==d?d:toPrecisedFloat((null!==e&&void 0!==e?e:0)/(null!==f&&void 0!==f?f:1))),width:e,height:f,onClick:r,disableManualResize:i,noEffect:j})})))};export default CropPresetsOption;
@@ -1 +0,0 @@
1
- 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{SFlexBox}from"@solostylist/ui-kit/core";var ToolsBarItemOptionsWrapper=function(a){var b=a.children,c=a.isPhoneScreen;return React.createElement(SFlexBox,{sx:_objectSpread({position:"relative",width:"100%",transition:"max-height 100ms ease-in-out",justifyContent:"center",alignItems:"center",gap:3,maxHeight:b?"56px":0,mb:b?1:0,mx:"auto"},void 0!==c&&c&&{maxHeight:"unset",flexDirection:"column",px:1.5,pb:1,gap:1,m:0})},b)};export default ToolsBarItemOptionsWrapper;
@@ -1 +0,0 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _excluded=["cropX2","cropY2","crop","watermark"];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{CLOUDIMG_TO_EDITOR_POSITIONS,ELLIPSE_CROP,TOOLS_IDS,WATERMARK_ANNOTATION_ID}from"./constants";import deepMerge from"./deep-merge";import mapNumber from"./map-number";import{finetuneNameToParamInfo}from"./operations-to-cloudimage-url";var propertyToOperation=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{},e=CLOUDIMG_TO_EDITOR_POSITIONS[b];switch(a){case"wat_text":return{watermark:{text:b.replaceAll("+"," ")}};case"wat_font":return{watermark:{fontFamily:b}};case"wat_color":return{watermark:{fill:"#".concat(b)}};case"wat_fontsize":return{watermark:{fontSize:parseFloat(b)}};case"wat_opacity":return{watermark:{opacity:parseFloat(b)}};case"wat_pos":{var f=b.split(","),g=_slicedToArray(f,2),h=g[0],i=g[1];return{watermark:{x:parseFloat(h)/100*(c.width||0),y:parseFloat(i)/100*(c.height||0)}}}case"wat_url":return{watermark:{image:decodeURIComponent(b)}};case"wat_scale":{var j=b.split(","),k=_slicedToArray(j,2),l=k[0],m=k[1];return{watermark:{width:parseFloat(l)/100*(c.width||0),height:parseFloat(m)/100*(c.height||0)}}}case"tl_px":{var n=b.split(","),o=_slicedToArray(n,2),p=o[0],q=o[1];return{crop:{x:mapNumber(parseFloat(p),0,d.width||0,0,c.width||0),y:mapNumber(parseFloat(q),0,d.height||0,0,c.height||0)}}}case"br_px":{var r=b.split(","),s=_slicedToArray(r,2),t=s[0],u=s[1];return{cropX2:mapNumber(parseFloat(t),0,d.width||0,0,c.width||0),cropY2:mapNumber(parseFloat(u),0,d.height||0,0,c.height||0)}}case"round":return{crop:{ratio:ELLIPSE_CROP}};case"gravity":return{crop:e?{lockCropAreaAt:e,width:null,height:null}:{noEffect:!0,ratio:b,ratioTitleKey:b,width:null,height:null}};case"aspect_ratio":return{crop:{ratio:+b}};case"w":return{resize:{width:parseFloat(b)}};case"h":return{resize:{height:parseFloat(b)}};case"r":return{adjustments:{rotation:-parseInt(b,10)}};case"flip":case"mirror":return{adjustments:{isFlippedX:b.includes("x")||b.includes("h"),isFlippedY:b.includes("y")||b.includes("v")}};default:{var v;if(Object.keys(finetuneNameToParamInfo).forEach(function(b){finetuneNameToParamInfo[b].cloudimage.name===a.toLowerCase()&&(v=b)}),!v)return null;var w=finetuneNameToParamInfo[v],x=w.cloudimage,y=w.internal;return{finetunes:[Konva.Filters[v]],finetunesProps:_defineProperty({},y.propName,mapNumber(parseFloat(b),x.min,x.max,y.min,y.max))}}}},cloudimageQueryToDesignState=function(a,b,c){if(!a)return null;var d=a.split("&"),e={};d.forEach(function(a){var d=a.split("="),f=_slicedToArray(d,2),g=f[0],h=f[1],i=propertyToOperation(g,h,b,c);i&&(e=deepMerge(e,i,!0))});var f=e,g=f.cropX2,h=f.cropY2,i=f.crop,j=f.watermark,k=_objectWithoutProperties(f,_excluded),l=_objectSpread(_objectSpread(_objectSpread({},k),g&&h&&i||null!==i&&void 0!==i&&i.noEffect||null!==i&&void 0!==i&&i.lockCropAreaAt?{adjustments:_objectSpread(_objectSpread({},k.adjustments),{},{crop:_objectSpread({width:(g||0)-i.x,height:(h||0)-i.y},i)})}:{}),{},{annotations:_objectSpread({},j?_defineProperty({},WATERMARK_ANNOTATION_ID,_objectSpread(_objectSpread({},j),{},{x:((null===i||void 0===i?void 0:i.x)||0)+(j.x||0),y:((null===i||void 0===i?void 0:i.y)||0)+(j.y||0),id:WATERMARK_ANNOTATION_ID,name:j.text?TOOLS_IDS.TEXT:TOOLS_IDS.IMAGE},j.text?{width:j.text.length*j.fontSize,height:j.fontSize}:{})):{})});return l};export default cloudimageQueryToDesignState;
@@ -1 +0,0 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import sha1 from"./sha1";var encodeBase64=function(a){return btoa(a).replace(/=*$/g,"")},getSha1=function(a,b){return sha1(a).slice(0,b)},getSealingParams=function(a,b,c,d){var e=encodeBase64(a),f=getSha1(b+e+(c||""),d);return[f?"ci_seal=".concat(f):"",e?"ci_eqs=".concat(e):""].filter(function(a){return a}).join("&")},getImageSealingParams=function(a,b,c){var d=b||{},e=d.salt,f=d.charCount,g=d.includeParams,h=void 0===g?[]:g,i=!h||0===(null===h||void 0===h?void 0:h.length),j="",k=[],l=[];a.split("&").forEach(function(a){var b=a.split("="),c=_slicedToArray(b,1),d=c[0];-1<(null===h||void 0===h?void 0:h.indexOf(d))||i?k.push(a):l.push(a)}),0<l.length&&(j=l.join("&"));var m=getSealingParams(k.join("&"),c,e,f);return[m,j].filter(function(a){return a}).join("&")};export default getImageSealingParams;