@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
@@ -1 +1 @@
1
- import{FlipOutlined}from"@mui/icons-material";import{useCallback,useMemo}from"react";import{TOGGLE_FLIP}from"actions";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{useStore}from"hooks";import{FLIP_DIRECTIONS,TOOLS_IDS}from"utils/constants";var FlipY=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedY,h=useCallback(function(){return React.createElement(FlipOutlined,{sx:g?{transform:"rotate(90deg)"}:{transform:"rotate(270deg)"}})},[g]),i=useMemo(function(){return{reverseLabelOfCurrYFlipDir:g?d("unFlipY"):d("flipY"),reverseIconOfCurrYFlipDir:h}},[g]),j=i.reverseLabelOfCurrYFlipDir,k=i.reverseIconOfCurrYFlipDir,l=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.Y}})},[]),m=useCallback(function(a){b(a),l()},[]);return React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.FLIP_Y,label:j,Icon:k,onClick:m,isSelected:void 0!==c&&c})};export default FlipY;
1
+ import{FlipOutlined}from"@mui/icons-material";import{useCallback,useMemo}from"react";import{TOGGLE_FLIP}from"actions";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{useStore}from"hooks";import{FLIP_DIRECTIONS,TOOLS_IDS}from"utils/constants";var FlipY=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedY,h=useMemo(function(){return g?d("unFlipY"):d("flipY")},[g,d]),i=useMemo(function(){return{sx:g?{transform:"rotate(90deg)"}:{transform:"rotate(270deg)"}}},[g]),j=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.Y}})},[]),k=useCallback(function(a){a&&b(a),j()},[]);return React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.FLIP_Y,label:h,Icon:FlipOutlined,onClick:k,isSelected:void 0!==c&&c,slotProps:{icon:i}})};export default FlipY;
@@ -0,0 +1,3 @@
1
+ export { default as FlipX } from './flip-x';
2
+ export { default as FlipY } from './flip-y';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/flip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface HSVProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const HSV: ({ selectTool, isSelected, t }: HSVProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default HSV;
8
+ //# sourceMappingURL=hsv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hsv.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/hsv/hsv.tsx"],"names":[],"mappings":"AAOA,UAAU,QAAQ;IAChB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,GAAG,GAAI,+BAAuC,QAAQ,4CAU3D,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface HSVOptionsProps {
2
+ t: (key: string) => string;
3
+ }
4
+ declare const HSVOptions: ({ t }: HSVOptionsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default HSVOptions;
6
+ //# sourceMappingURL=hsvoptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hsvoptions.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/hsv/hsvoptions.tsx"],"names":[],"mappings":"AAoBA,UAAU,eAAe;IACvB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CA0CzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as HSV } from './hsv';
2
+ export { default as HSVOptions } from './hsvoptions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/hsv/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface ImageButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const ImageButton: ({ selectTool, isSelected, t, }: ImageButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ImageButton;
8
+ //# sourceMappingURL=image-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/image/image-button.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,WAAW,GAAI,gCAIlB,gBAAgB,4CAUlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** External Dependencies */
2
+ import { Annotation, ImageAnnotation } from 'types/annotations';
3
+ interface ImageControlsProps {
4
+ image: ImageAnnotation | Partial<ImageAnnotation> | (ImageAnnotation & {
5
+ shouldSave?: boolean;
6
+ neverSave?: boolean;
7
+ });
8
+ saveImage: (updates: Partial<Annotation>) => void;
9
+ children?: React.ReactNode;
10
+ }
11
+ declare const ImageControls: ({ image, saveImage, children }: ImageControlsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default ImageControls;
13
+ //# sourceMappingURL=image-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-controls.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/image/image-controls.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAI5B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEhE,UAAU,kBAAkB;IAE1B,KAAK,EACD,eAAe,GACf,OAAO,CAAC,eAAe,CAAC,GACxB,CAAC,eAAe,GAAG;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa,GAAI,gCAAgC,kBAAkB,4CAUxE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- import AnnotationOptions from"components/common/annotation-options";var ImageControls=function(a){var b=a.image,c=a.saveImage,d=a.children,e=a.t;return React.createElement(AnnotationOptions,{className:"FIE_image-tool-options",annotation:b,updateAnnotation:c,t:e,hideFillOption:!0},d)};export default ImageControls;
1
+ import AnnotationOptions from"components/common/annotation-options";var ImageControls=function(a){var b=a.image,c=a.saveImage,d=a.children;return React.createElement(AnnotationOptions,{annotation:b,updateAnnotation:c,hideFillOption:!0},d)};export default ImageControls;
@@ -0,0 +1,3 @@
1
+ declare const ImageOptions: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ImageOptions;
3
+ //# sourceMappingURL=image-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/image/image-options.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,YAAY,+CAuLjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useMemo,useRef,useState}from"react";import{CollectionsOutlined,FileUploadOutlined}from"@mui/icons-material";import{useAnnotation,usePopover,useStore}from"hooks";import{FEEDBACK_STATUSES,TOOLS_IDS}from"utils/constants";import{SET_FEEDBACK}from"actions";import HiddenUploadInput from"components/common/hidden-upload-input";import ButtonWithMenu from"components/common/button-with-menu";import ImageControls from"./image-controls";import ImagesGallery from"./images-gallery";var ADDED_IMG_SPACING_PERCENT=.15,ImageOptions=function(){var a=useState(),b=_slicedToArray(a,2),c=b[0],d=b[1],e=usePopover(),f=useRef(null),g=useRef(null),h=useStore(),i=h.shownImageDimensions,j=h.dispatch,k=h.adjustments.crop,l=void 0===k?{}:k,m=h.t,n=h.config,o=void 0===n?{}:n,p=o[TOOLS_IDS.IMAGE],q=!p.disableUpload,r=Array.isArray(p.gallery)&&0<p.gallery.length,s=useAnnotation({name:TOOLS_IDS.IMAGE,opacity:1},!1),t=_slicedToArray(s,3),u=t[0],v=t[1],w=t[2],x=useRef(0),y=function(a){var b=l.width||i.width,c=l.height||i.height,d=l.x||0,e=l.y||0,f=Math.min(1,b/(a.width+a.width*ADDED_IMG_SPACING_PERCENT),c/(a.height+a.height*ADDED_IMG_SPACING_PERCENT));w({image:a,x:d+b/2-a.width*f/2,y:e+c/2-a.height*f/2,width:a.width*f,height:a.height*f})},z=function(a){x.current+=1,x.current===a&&(x.current=0,d(!1))},A=function(a){j({type:SET_FEEDBACK,payload:{feedback:{message:a,status:FEEDBACK_STATUSES.WARNING}}})},B=function(){f.current&&f.current.click()},C=function(){e.handleOpen({currentTarget:g.current})},D=useMemo(function(){return[q&&{key:"add-by-upload-image",label:c?m("importing"):m("uploadImage"),icon:FileUploadOutlined,onClick:c?void 0:B},r&&{key:"add-from-gallery",label:m("fromGallery"),icon:CollectionsOutlined,onClick:C}]},[p,c,m]);return React.createElement(ImageControls,{image:u,saveImage:v,t:m},React.createElement(ButtonWithMenu,{label:m("addImage"),menuItems:D,buttonRef:g}),q&&React.createElement(HiddenUploadInput,{ref:f,onChange:c?void 0:function(a){if(a.target.files){d(!0);var b=[],c=Array.from(a.target.files),e=c.length;if(c.forEach(function(a){if(a.type.startsWith("image/")){var c=new Image;c.onload=function(){y(c),URL.revokeObjectURL(a),z(e)},c.onerror=function(){A(m("uploadImageError")),z(e)},c.src=URL.createObjectURL(a)}else b.push(a.name),z(e)}),0<b.length){var f=1<b.length?m("areNotImages"):m("isNotImage");A("".concat(b.join(", ")," ").concat(f," ").concat(m("toBeUploaded"),"."))}}a.target.value=""},disabled:c,multiple:!0}),r&&React.createElement(ImagesGallery,{gallery:p.gallery,onSelect:function(a){d(!0);var b=new Image;b.onload=function(){y(b),z(1)},b.onerror=function(){A(m("uploadImageError")),z(1)},b.crossOrigin="Anonymous",b.src=a},onClose:function(){e.handleClose()},anchorEl:e.anchorEl}))};export default ImageOptions;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useMemo,useRef,useState}from"react";import{CollectionsOutlined,FileUploadOutlined}from"@mui/icons-material";import{useAnnotation,usePopover,useStore}from"hooks";import{FEEDBACK_STATUSES,TOOLS_IDS}from"utils/constants";import{SET_FEEDBACK}from"actions";import HiddenUploadInput from"components/common/hidden-upload-input";import ButtonWithMenu from"components/common/button-with-menu";import ImageControls from"./image-controls";import ImagesGallery from"./images-gallery";var ADDED_IMG_SPACING_PERCENT=.15,ImageOptions=function(){var a=useState(),b=_slicedToArray(a,2),c=b[0],d=b[1],e=usePopover(),f=useRef(null),g=useRef(null),h=useStore(),i=h.shownImageDimensions,j=h.dispatch,k=h.adjustments.crop,l=void 0===k?{}:k,m=h.t,n=h.config,o=void 0===n?{}:n,p=o[TOOLS_IDS.IMAGE],q=!p.disableUpload,r=Array.isArray(p.gallery)&&0<p.gallery.length,s=useAnnotation({name:TOOLS_IDS.IMAGE,opacity:1},!1),t=_slicedToArray(s,3),u=t[0],v=t[1],w=t[2],x=useRef(0),y=function(a){var b=l.width||i.width,c=l.height||i.height,d=l.x||0,e=l.y||0,f=Math.min(1,b/(a.width+a.width*ADDED_IMG_SPACING_PERCENT),c/(a.height+a.height*ADDED_IMG_SPACING_PERCENT));w({image:a,x:d+b/2-a.width*f/2,y:e+c/2-a.height*f/2,width:a.width*f,height:a.height*f})},z=function(a){x.current+=1,x.current===a&&(x.current=0,d(!1))},A=function(a){j({type:SET_FEEDBACK,payload:{feedback:{message:a,status:FEEDBACK_STATUSES.WARNING}}})},B=function(){f.current&&f.current.click()},C=function(){e.handleOpen({currentTarget:g.current})},D=useMemo(function(){return[q&&{key:"add-by-upload-image",label:c?m("importing"):m("uploadImage"),icon:FileUploadOutlined,onClick:c?void 0:B},r&&{key:"add-from-gallery",label:m("fromGallery"),icon:CollectionsOutlined,onClick:C}]},[p,c,m]);return React.createElement(ImageControls,{image:u,saveImage:v},React.createElement(ButtonWithMenu,{label:m("addImage"),menuItems:D,buttonRef:g}),q&&React.createElement(HiddenUploadInput,{ref:f,onChange:c?void 0:function(a){if(a.target.files){d(!0);var b=[],c=Array.from(a.target.files),e=c.length;if(c.forEach(function(a){if(a.type.startsWith("image/")){var c=new Image;c.onload=function(){y(c),URL.revokeObjectURL(a),z(e)},c.onerror=function(){A(m("uploadImageError")),z(e)},c.src=URL.createObjectURL(a)}else b.push(a.name),z(e)}),0<b.length){var f=1<b.length?m("areNotImages"):m("isNotImage");A("".concat(b.join(", ")," ").concat(f," ").concat(m("toBeUploaded"),"."))}}a.target.value=""},disabled:c,multiple:!0}),r&&React.createElement(ImagesGallery,{gallery:p.gallery,onSelect:function(a){d(!0);var b=new Image;b.onload=function(){y(b),z(1)},b.onerror=function(){A(m("uploadImageError")),z(1)},b.crossOrigin="Anonymous",b.src=a},onClose:function(){e.handleClose()},anchorEl:e.anchorEl}))};export default ImageOptions;
@@ -0,0 +1,14 @@
1
+ /** External Dependencies */
2
+ interface GalleryItem {
3
+ originalUrl: string;
4
+ previewUrl: string;
5
+ }
6
+ interface ImagesGalleryProps {
7
+ gallery?: GalleryItem[];
8
+ anchorEl?: HTMLElement | null;
9
+ onClose: () => void;
10
+ onSelect: (originalUrl: string) => void;
11
+ }
12
+ declare const ImagesGallery: ({ gallery, anchorEl, onClose, onSelect, }: ImagesGalleryProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default ImagesGallery;
14
+ //# sourceMappingURL=images-gallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"images-gallery.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/image/images-gallery.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAO5B,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,aAAa,GAAI,2CAKpB,kBAAkB,4CAwCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as ImageButton } from './image-button';
2
+ export { default as ImageOptions } from './image-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as LineButton } from './line-button';
2
+ export { default as LineOptions } from './line-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/line/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface LineButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const LineButton: ({ selectTool, isSelected, t }: LineButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default LineButton;
8
+ //# sourceMappingURL=line-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/line/line-button.tsx"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,GAAI,+BAAuC,eAAe,4CAUzE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** External Dependencies */
2
+ declare const LineOptions: () => import("react/jsx-runtime").JSX.Element;
3
+ export default LineOptions;
4
+ //# sourceMappingURL=line-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/line/line-options.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAQ5B,QAAA,MAAM,WAAW,+CAahB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";var LineOptions=function(a){var b=a.t,c=useAnnotation({name:TOOLS_IDS.LINE}),d=_slicedToArray(c,2),e=d[0],f=d[1];return React.createElement(AnnotationOptions,{className:"FIE_line-tool-options",annotation:e,updateAnnotation:f,t:b,hidePositionField:!0,hideFillOption:!0})};export default LineOptions;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";var LineOptions=function(){var a=useAnnotation({name:TOOLS_IDS.LINE}),b=_slicedToArray(a,2),c=b[0],d=b[1];return React.createElement(AnnotationOptions,{annotation:c,updateAnnotation:d,hidePositionField:!0,hideFillOption:!0})};export default LineOptions;
@@ -0,0 +1,3 @@
1
+ export { default as PenButton } from './pen-button';
2
+ export { default as PenOptions } from './pen-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/pen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface PenButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const PenButton: ({ selectTool, isSelected, t }: PenButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default PenButton;
8
+ //# sourceMappingURL=pen-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pen-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/pen/pen-button.tsx"],"names":[],"mappings":"AAOA,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,GAAI,+BAAuC,cAAc,4CAUvE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const PenOptions: () => import("react/jsx-runtime").JSX.Element;
2
+ export default PenOptions;
3
+ //# sourceMappingURL=pen-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pen-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/pen/pen-options.tsx"],"names":[],"mappings":"AAuBA,QAAA,MAAM,UAAU,+CA6Hf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";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{useCallback,useEffect,useRef}from"react";import{useAnnotation,useStore}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import getPointerOffsetPositionBoundedToObject from"utils/get-pointer-offset-position-bounded-to-object";import randomId from"utils/random-id";import{SELECT_ANNOTATION,SET_ANNOTATION}from"actions";import getElemDocumentCoords from"utils/get-elem-document-coords";var eventsOptions={passive:!0},PenOptions=function(a){var b=a.t,c=useStore(),d=c.dispatch,e=c.designLayer,f=c.previewGroup,g=c.config,h=useAnnotation(_objectSpread(_objectSpread(_objectSpread({},g.annotationsCommon),g[TOOLS_IDS.PEN]),{},{name:TOOLS_IDS.PEN}),!1),i=_slicedToArray(h,3),j=i[0],k=i[1],l=i[2],m=useRef(null),n=useRef({points:[],moved:!1,id:""}),o=useCallback(function(){var a=getElemDocumentCoords(m.current.content),b=getPointerOffsetPositionBoundedToObject(f,a);return[b.offsetX-(e.attrs.xPadding||0),b.offsetY-(e.attrs.yPadding||0)]},[e]),p=useCallback(function(){var a;if(!(null!==(a=n.current)&&void 0!==a&&a.moved)){var b;n.current={moved:!0,id:randomId(TOOLS_IDS.PEN),points:[].concat(_toConsumableArray((null===(b=n.current)||void 0===b?void 0:b.points)||[]),_toConsumableArray(o()))},l({id:n.current.id,name:TOOLS_IDS.PEN,points:n.current.points})}else n.current&&(n.current.points=n.current.points.concat(o()),d({type:SET_ANNOTATION,payload:{id:n.current.id,points:n.current.points,dismissHistory:!0}}))},[o]),q=useCallback(function(){var a,b;null!==(a=n.current)&&void 0!==a&&a.id&&null!==(b=g[TOOLS_IDS.PEN])&&void 0!==b&&b.selectAnnotationAfterDrawing&&d({type:SELECT_ANNOTATION,payload:{annotationId:n.current.id}}),n.current=null,m.current.off("mousemove touchmove",p),m.current.off("mouseleave touchcancel",q),document.removeEventListener("mouseup",q,eventsOptions),document.removeEventListener("touchend",q,eventsOptions),document.removeEventListener("mouseleave",q,eventsOptions),document.removeEventListener("touchcancel",q,eventsOptions)},[p]),r=useCallback(function(a){a.target.attrs.draggable||(a.evt.preventDefault(),n.current={points:o()},m.current.on("mousemove touchmove",p),m.current.on("mouseleave touchcancel",q),document.addEventListener("mouseup",q,eventsOptions),document.addEventListener("touchend",q,eventsOptions),document.addEventListener("mouseleave",q,eventsOptions),document.addEventListener("touchcancel",q,eventsOptions))},[o,p,q]);return useEffect(function(){return m.current=null===e||void 0===e?void 0:e.getStage(),m.current&&m.current.on("mousedown touchstart",r),function(){m.current&&m.current.off("mousedown touchstart",r)}},[e]),React.createElement(AnnotationOptions,{className:"FIE_pen-tool-options",annotation:j,updateAnnotation:k,t:b,hidePositionField:!0,hideFillOption:!0})};export default PenOptions;
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";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{useCallback,useEffect,useRef}from"react";import{useAnnotation,useStore}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import getPointerOffsetPositionBoundedToObject from"utils/get-pointer-offset-position-bounded-to-object";import randomId from"utils/random-id";import{SELECT_ANNOTATION,SET_ANNOTATION}from"actions";import getElemDocumentCoords from"utils/get-elem-document-coords";var eventsOptions={passive:!0},PenOptions=function(){var a=useStore(),b=a.dispatch,c=a.designLayer,d=a.previewGroup,e=a.config,f=a.t,g=useAnnotation(_objectSpread(_objectSpread(_objectSpread({},e.annotationsCommon),e[TOOLS_IDS.PEN]),{},{name:TOOLS_IDS.PEN}),!1),h=_slicedToArray(g,3),i=h[0],j=h[1],k=h[2],l=useRef(null),m=useRef({points:[],moved:!1,id:""}),n=useCallback(function(){var a=getElemDocumentCoords(l.current.content),b=getPointerOffsetPositionBoundedToObject(d,a);return[b.offsetX-(c.attrs.xPadding||0),b.offsetY-(c.attrs.yPadding||0)]},[c]),o=useCallback(function(){var a;if(!(null!==(a=m.current)&&void 0!==a&&a.moved)){var c;m.current={moved:!0,id:randomId(TOOLS_IDS.PEN),points:[].concat(_toConsumableArray((null===(c=m.current)||void 0===c?void 0:c.points)||[]),_toConsumableArray(n()))},k({id:m.current.id,name:TOOLS_IDS.PEN,points:m.current.points})}else m.current&&(m.current.points=m.current.points.concat(n()),b({type:SET_ANNOTATION,payload:{id:m.current.id,points:m.current.points,dismissHistory:!0}}))},[n]),p=useCallback(function(){var a,c;null!==(a=m.current)&&void 0!==a&&a.id&&null!==(c=e[TOOLS_IDS.PEN])&&void 0!==c&&c.selectAnnotationAfterDrawing&&b({type:SELECT_ANNOTATION,payload:{annotationId:m.current.id}}),m.current=null,l.current.off("mousemove touchmove",o),l.current.off("mouseleave touchcancel",p),document.removeEventListener("mouseup",p,eventsOptions),document.removeEventListener("touchend",p,eventsOptions),document.removeEventListener("mouseleave",p,eventsOptions),document.removeEventListener("touchcancel",p,eventsOptions)},[o]),q=useCallback(function(a){a.target.attrs.draggable||(a.evt.preventDefault(),m.current={points:n()},l.current.on("mousemove touchmove",o),l.current.on("mouseleave touchcancel",p),document.addEventListener("mouseup",p,eventsOptions),document.addEventListener("touchend",p,eventsOptions),document.addEventListener("mouseleave",p,eventsOptions),document.addEventListener("touchcancel",p,eventsOptions))},[n,o,p]);return useEffect(function(){return l.current=null===c||void 0===c?void 0:c.getStage(),l.current&&l.current.on("mousedown touchstart",q),function(){l.current&&l.current.off("mousedown touchstart",q)}},[c]),React.createElement(AnnotationOptions,{annotation:i,updateAnnotation:j,t:f,hidePositionField:!0,hideFillOption:!0})};export default PenOptions;
@@ -0,0 +1,3 @@
1
+ export { default as PolygonButton } from './polygon-button';
2
+ export { default as PolygonOptions } from './polygon-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/polygon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface PolygonButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const PolygonButton: ({ selectTool, isSelected, t, }: PolygonButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default PolygonButton;
8
+ //# sourceMappingURL=polygon-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/polygon/polygon-button.tsx"],"names":[],"mappings":"AAOA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa,GAAI,gCAIpB,kBAAkB,4CAUpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** External Dependencies */
2
+ declare const PolygonOptions: () => import("react/jsx-runtime").JSX.Element;
3
+ export default PolygonOptions;
4
+ //# sourceMappingURL=polygon-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/polygon/polygon-options.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAY5B,QAAA,MAAM,cAAc,+CAcnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import{polygonOptionsPopupComponents,POLYGON_POPPABLE_OPTIONS}from"./polygon.constants";var PolygonOptions=function(a){var b=a.t,c=useAnnotation({name:TOOLS_IDS.POLYGON}),d=_slicedToArray(c,2),e=d[0],f=d[1];return React.createElement(AnnotationOptions,{className:"FIE_polygon-tool-options",morePoppableOptionsPrepended:_toConsumableArray(POLYGON_POPPABLE_OPTIONS),moreOptionsPopupComponentsObj:polygonOptionsPopupComponents,annotation:e,updateAnnotation:f,t:b,hidePositionField:!0})};export default PolygonOptions;
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import{polygonOptionsPopupComponents,POLYGON_POPPABLE_OPTIONS}from"./polygon.constants";var PolygonOptions=function(){var a=useAnnotation({name:TOOLS_IDS.POLYGON}),b=_slicedToArray(a,2),c=b[0],d=b[1];return React.createElement(AnnotationOptions,{morePoppableOptionsPrepended:_toConsumableArray(POLYGON_POPPABLE_OPTIONS),moreOptionsPopupComponentsObj:polygonOptionsPopupComponents,annotation:c,updateAnnotation:d,hidePositionField:!0})};export default PolygonOptions;
@@ -0,0 +1,9 @@
1
+ import { PolygonAnnotation } from 'types/annotations';
2
+ export interface PolygonSidesFieldProps {
3
+ annotation: PolygonAnnotation;
4
+ updateAnnotation: (updates: Partial<PolygonAnnotation>) => void;
5
+ t: (key: string) => string;
6
+ }
7
+ declare const PolygonSidesField: ({ annotation: polygon, updateAnnotation: updatePolygon, t, }: PolygonSidesFieldProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default PolygonSidesField;
9
+ //# sourceMappingURL=polygon-sides-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon-sides-field.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/polygon/polygon-sides-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAMtD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAChE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,iBAAiB,GAAI,8DAIxB,sBAAsB,4CAkBxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const SIDES_NUMBER: "sides-number";
2
+ export declare const POLYGON_POPPABLE_OPTIONS: readonly [{
3
+ readonly titleKey: "sides";
4
+ readonly name: "sides-number";
5
+ readonly Icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
6
+ muiName: string;
7
+ };
8
+ }];
9
+ export declare const polygonOptionsPopupComponents: {
10
+ readonly "sides-number": ({ annotation: polygon, updateAnnotation: updatePolygon, t, }: import("./polygon-sides-field").PolygonSidesFieldProps) => import("react/jsx-runtime").JSX.Element;
11
+ };
12
+ //# sourceMappingURL=polygon.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/polygon/polygon.constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,EAAG,cAAuB,CAAC;AAEpD,eAAO,MAAM,wBAAwB;;;;;;EAM3B,CAAC;AAEX,eAAO,MAAM,6BAA6B;;CAEhC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as RectButton } from './rect-button';
2
+ export { default as RectOptions } from './rect-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface RectButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const RectButton: ({ selectTool, isSelected, t }: RectButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default RectButton;
8
+ //# sourceMappingURL=rect-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rect/rect-button.tsx"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,GAAI,+BAAuC,eAAe,4CAUzE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import{CropLandscapeOutlined as RectIcon}from"@mui/icons-material";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{TOOLS_IDS}from"utils/constants";var RectButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:"FIE_rect-tool-button",id:TOOLS_IDS.RECT,label:d("rectangleTool"),Icon:RectIcon,onClick:b,isSelected:void 0!==c&&c})};export default RectButton;
1
+ import{CropLandscapeOutlined as RectIcon}from"@mui/icons-material";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{TOOLS_IDS}from"utils/constants";var RectButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.RECT,label:d("rectangleTool"),Icon:RectIcon,onClick:b,isSelected:void 0!==c&&c})};export default RectButton;
@@ -0,0 +1,9 @@
1
+ import { RectAnnotation } from 'types/annotations';
2
+ export interface RectCornerFieldProps {
3
+ annotation: RectAnnotation;
4
+ updateAnnotation: (updates: Partial<RectAnnotation>) => void;
5
+ t: (key: string) => string;
6
+ }
7
+ declare const RectCornerField: ({ annotation: rect, updateAnnotation: updateRect, t, }: RectCornerFieldProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default RectCornerField;
9
+ //# sourceMappingURL=rect-corner-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect-corner-field.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rect/rect-corner-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC7D,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,eAAe,GAAI,wDAItB,oBAAoB,4CAmBtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** External Dependencies */
2
+ declare const RectOptions: () => import("react/jsx-runtime").JSX.Element;
3
+ export default RectOptions;
4
+ //# sourceMappingURL=rect-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rect/rect-options.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAY5B,QAAA,MAAM,WAAW,+CAahB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import{rectOptionsPopupComponents,RECT_POPPABLE_OPTIONS}from"./rect.constants";var RectOptions=function(a){var b=a.t,c=useAnnotation({name:TOOLS_IDS.RECT}),d=_slicedToArray(c,2),e=d[0],f=d[1];return React.createElement(AnnotationOptions,{className:"FIE_rect-tool-options",moreOptionsPopupComponentsObj:rectOptionsPopupComponents,morePoppableOptionsPrepended:_toConsumableArray(RECT_POPPABLE_OPTIONS),annotation:e,updateAnnotation:f,t:b})};export default RectOptions;
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useAnnotation}from"hooks";import{TOOLS_IDS}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import{rectOptionsPopupComponents,RECT_POPPABLE_OPTIONS}from"./rect.constants";var RectOptions=function(){var a=useAnnotation({name:TOOLS_IDS.RECT}),b=_slicedToArray(a,2),c=b[0],d=b[1];return React.createElement(AnnotationOptions,{moreOptionsPopupComponentsObj:rectOptionsPopupComponents,morePoppableOptionsPrepended:_toConsumableArray(RECT_POPPABLE_OPTIONS),annotation:c,updateAnnotation:d})};export default RectOptions;
@@ -0,0 +1,12 @@
1
+ export declare const CORNER_RADIUS: "corner-radius";
2
+ export declare const RECT_POPPABLE_OPTIONS: readonly [{
3
+ readonly titleKey: "cornerRadius";
4
+ readonly name: "corner-radius";
5
+ readonly Icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
6
+ muiName: string;
7
+ };
8
+ }];
9
+ export declare const rectOptionsPopupComponents: {
10
+ readonly "corner-radius": ({ annotation: rect, updateAnnotation: updateRect, t, }: import("./rect-corner-field").RectCornerFieldProps) => import("react/jsx-runtime").JSX.Element;
11
+ };
12
+ //# sourceMappingURL=rect.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rect.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rect/rect.constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,EAAG,eAAwB,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;;;;EAMxB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;CAE7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as Resize } from './resize';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/resize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ interface CurrentSize {
2
+ width?: number;
3
+ height?: number;
4
+ ratioUnlocked?: boolean;
5
+ }
6
+ interface ResizeProps {
7
+ onChange?: (newResize: Record<string, any>) => void;
8
+ currentSize?: CurrentSize;
9
+ hideResetButton?: boolean;
10
+ }
11
+ declare const Resize: ({ onChange, currentSize, hideResetButton, }: ResizeProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default Resize;
13
+ //# sourceMappingURL=resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/resize/resize.tsx"],"names":[],"mappings":"AAaA,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,MAAM,GAAI,6CAIb,WAAW,4CAqLb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as RotateButton } from './rotate-button';
2
+ export { default as RotateOptions } from './rotate-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rotate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface RotateButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const RotateButton: ({ selectTool, isSelected, t, }: RotateButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default RotateButton;
8
+ //# sourceMappingURL=rotate-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotate-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rotate/rotate-button.tsx"],"names":[],"mappings":"AAOA,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,GAAI,gCAInB,iBAAiB,4CAUnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const RotateOptions: () => import("react/jsx-runtime").JSX.Element;
2
+ export default RotateOptions;
3
+ //# sourceMappingURL=rotate-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotate-options.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/rotate/rotate-options.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,aAAa,+CAsGlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- import{RotateLeftOutlined,RotateRightOutlined,Rotate90DegreesCwOutlined}from"@mui/icons-material";import Slider from"@mui/material/Slider";import{useDebouncedCallback,usePhoneScreen,useStore}from"hooks";import{CHANGE_ROTATION,SET_RESIZE}from"actions";import restrictNumber from"utils/restrict-number";import getSizeAfterRotation from"utils/get-size-after-rotation";import{TOOLS_IDS}from"utils/constants";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{SFlexBox,SIconButton}from"@solostylist/ui-kit/core";var RotateOptions=function(){var a=useStore(),b=a.dispatch,c=a.adjustments.rotation,d=void 0===c?0:c,e=a.resize,f=void 0===e?{}:e,g=a.config,h=g[TOOLS_IDS.ROTATE],i=usePhoneScreen(),j=useDebouncedCallback(function(a,c){var d=restrictNumber(c,-180,180);if(b({type:CHANGE_ROTATION,payload:{rotation:d}}),f.width&&f.height){var e=getSizeAfterRotation(f.width,f.height,d);b({type:SET_RESIZE,payload:{width:e.width,height:e.height}})}},20);return"buttons"===h.componentType?React.createElement(React.Fragment,null,React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.IMAGE,label:"-".concat(h.angle,"\xB0"),Icon:RotateLeftOutlined,onClick:function(a){var b=d-h.angle;j(a,b)}}),React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.IMAGE,label:"+".concat(null===h||void 0===h?void 0:h.angle,"\xB0"),Icon:RotateRightOutlined,onClick:function(a){var b=d+h.angle;j(a,b)}})):React.createElement(SFlexBox,{alignItems:"center",gap:2},React.createElement(SIconButton,{onClick:function(a){return j(a,d-90)}},React.createElement(Rotate90DegreesCwOutlined,null)),React.createElement(Slider,{className:"FIE_rotate-slider",valueLabelDisplay:"auto",marks:!0,min:-180,max:180,step:i?h.angle/3:1,value:d,onChange:j,sx:{width:200,"& .MuiSlider-thumb":{width:12,height:12},"& .MuiSlider-mark":{width:4,height:4,borderRadius:"50%"}}}),React.createElement(SIconButton,{onClick:function(a){return j(a,d+90)}},React.createElement(Rotate90DegreesCwOutlined,{sx:{transform:"scaleX(-1)"}})))};export default RotateOptions;
1
+ import{RotateLeftOutlined,RotateRightOutlined,Rotate90DegreesCwOutlined}from"@mui/icons-material";import Slider from"@mui/material/Slider";import{useDebouncedCallback,usePhoneScreen,useStore}from"hooks";import{CHANGE_ROTATION,SET_RESIZE}from"actions";import restrictNumber from"utils/restrict-number";import getSizeAfterRotation from"utils/get-size-after-rotation";import{TOOLS_IDS}from"utils/constants";import ToolsBarItemButton from"components/tools-bar/tools-bar-item-button";import{SFlexBox,SIconButton}from"@solostylist/ui-kit/core";var RotateOptions=function(){var a=useStore(),b=a.dispatch,c=a.adjustments.rotation,d=void 0===c?0:c,e=a.resize,f=void 0===e?{}:e,g=a.config,h=g[TOOLS_IDS.ROTATE],i=usePhoneScreen(),j=useDebouncedCallback(function(a,c){var d=restrictNumber(c,-180,180);if(b({type:CHANGE_ROTATION,payload:{rotation:d}}),f.width&&f.height){var e=getSizeAfterRotation(f.width,f.height,d);b({type:SET_RESIZE,payload:{width:e.width,height:e.height}})}},20);return"buttons"===h.componentType?React.createElement(React.Fragment,null,React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.IMAGE,label:"-".concat(h.angle,"\xB0"),Icon:RotateLeftOutlined,onClick:function(a){var b=d-h.angle;j(a,b)}}),React.createElement(ToolsBarItemButton,{id:TOOLS_IDS.IMAGE,label:"+".concat(null===h||void 0===h?void 0:h.angle,"\xB0"),Icon:RotateRightOutlined,onClick:function(a){var b=d+h.angle;j(a,b)}})):React.createElement(SFlexBox,{alignItems:"center",gap:2},React.createElement(SIconButton,{onClick:function(a){return j(a,d-90)}},React.createElement(Rotate90DegreesCwOutlined,null)),React.createElement(Slider,{valueLabelDisplay:"auto",marks:!0,min:-180,max:180,step:i?h.angle/3:1,value:d,onChange:j,sx:{width:200,"& .MuiSlider-thumb":{width:12,height:12},"& .MuiSlider-mark":{width:4,height:4,borderRadius:"50%"}}}),React.createElement(SIconButton,{onClick:function(a){return j(a,d+90)}},React.createElement(Rotate90DegreesCwOutlined,{sx:{transform:"scaleX(-1)"}})))};export default RotateOptions;
@@ -0,0 +1,3 @@
1
+ export { default as TextButton } from './text-button';
2
+ export { default as TextOptions } from './text-options';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface TextButtonProps {
2
+ selectTool: () => void;
3
+ isSelected?: boolean;
4
+ t: (key: string) => string;
5
+ }
6
+ declare const TextButton: ({ selectTool, isSelected, t }: TextButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default TextButton;
8
+ //# sourceMappingURL=text-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tools/text/text-button.tsx"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,GAAI,+BAAuC,eAAe,4CAUzE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare function deactivateTextChange(): void;
2
+ declare const activateTextChange: (textNodeId: string, canvasStage: any, currentTransformer: any, finishingCallback: (textValue: string) => void, dismissingTextEditing: () => void) => void;
3
+ export { activateTextChange, deactivateTextChange };
4
+ //# sourceMappingURL=handle-text-change-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-text-change-area.d.ts","sourceRoot":"","sources":["../../../../../src/components/tools/text/text-options/handle-text-change-area.ts"],"names":[],"mappings":"AAMA,iBAAS,oBAAoB,IAAI,IAAI,CAwBpC;AAWD,QAAA,MAAM,kBAAkB,GACtB,YAAY,MAAM,EAClB,aAAa,GAAG,EAChB,oBAAoB,GAAG,EACvB,mBAAmB,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,EAC9C,uBAAuB,MAAM,IAAI,KAChC,IAyHF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** External Dependencies */
2
+ declare const TextOptions: () => import("react/jsx-runtime").JSX.Element;
3
+ export default TextOptions;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tools/text/text-options/index.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAQ5B,QAAA,MAAM,WAAW,+CAMhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** External Dependencies */
2
+ import { TextAnnotation } from 'types/annotations';
3
+ interface TextAlignmentFieldsProps {
4
+ annotation: TextAnnotation;
5
+ updateAnnotation: (updates: Partial<TextAnnotation>) => void;
6
+ }
7
+ declare const TextAlignmentFields: ({ annotation: text, updateAnnotation: updateText, }: TextAlignmentFieldsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default TextAlignmentFields;
9
+ //# sourceMappingURL=text-alignment-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-alignment-fields.d.ts","sourceRoot":"","sources":["../../../../../src/components/tools/text/text-options/text-alignment-fields.tsx"],"names":[],"mappings":"AAAA,4BAA4B;AAS5B,OAAO,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIlE,UAAU,wBAAwB;IAChC,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC9D;AAED,QAAA,MAAM,mBAAmB,GAAI,qDAG1B,wBAAwB,4CA6B1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- import{FormatAlignCenterOutlined,FormatAlignLeftOutlined}from"@mui/icons-material";import{SFlexBox}from"@solostylist/ui-kit/core";import SIconButtonWrapper from"components/common/icon-wrapper";var rightAlignmentCssTransform={transform:"scaleX(-1)"},TextAlignmentFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=b.align,e=function(a){c({align:a})};return React.createElement(SFlexBox,{gap:1},React.createElement(SIconButtonWrapper,{onClick:function(){return e("left")},active:"left"===d},React.createElement(FormatAlignLeftOutlined,null)),React.createElement(SIconButtonWrapper,{onClick:function(){return e("center")},active:"center"===d},React.createElement(FormatAlignCenterOutlined,null)),React.createElement(SIconButtonWrapper,{onClick:function(){return e("right")},active:"right"===d},React.createElement(FormatAlignLeftOutlined,{style:rightAlignmentCssTransform})))};export default TextAlignmentFields;
1
+ import{FormatAlignCenterOutlined,FormatAlignLeftOutlined}from"@mui/icons-material";import{SFlexBox}from"@solostylist/ui-kit/core";import SIconButtonWrapper from"components/common/icon-wrapper";import{TextAlignment}from"types/annotations";var rightAlignmentCssTransform={transform:"scaleX(-1)"},TextAlignmentFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=b.align,e=function(a){c({align:a})};return React.createElement(SFlexBox,{gap:1},React.createElement(SIconButtonWrapper,{onClick:function(){return e(TextAlignment.LEFT)},active:d===TextAlignment.LEFT},React.createElement(FormatAlignLeftOutlined,null)),React.createElement(SIconButtonWrapper,{onClick:function(){return e(TextAlignment.CENTER)},active:d===TextAlignment.CENTER},React.createElement(FormatAlignCenterOutlined,null)),React.createElement(SIconButtonWrapper,{onClick:function(){return e(TextAlignment.RIGHT)},active:d===TextAlignment.RIGHT},React.createElement(FormatAlignLeftOutlined,{style:rightAlignmentCssTransform})))};export default TextAlignmentFields;
@@ -0,0 +1,12 @@
1
+ import { TextAnnotation } from 'types/annotations';
2
+ interface TextControlsProps {
3
+ text: TextAnnotation & {
4
+ shouldSave?: boolean;
5
+ neverSave?: boolean;
6
+ };
7
+ saveText: (updater: Partial<TextAnnotation> | ((latest: any) => any)) => void;
8
+ children?: React.ReactNode;
9
+ }
10
+ declare const TextControls: ({ text, saveText, children }: TextControlsProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default TextControls;
12
+ //# sourceMappingURL=text-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-controls.d.ts","sourceRoot":"","sources":["../../../../../src/components/tools/text/text-options/text-controls.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAc,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAe/D,UAAU,iBAAiB;IAGzB,IAAI,EAAE,cAAc,GAAG;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACrE,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,GAAI,8BAA8B,iBAAiB,4CA8IpE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- import _typeof from"@babel/runtime/helpers/typeof";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import{useCallback,useEffect}from"react";import{FormatBoldOutlined,FormatItalicOutlined}from"@mui/icons-material";import{TOOLS_IDS,TRANSFORMERS_LAYER_ID}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import SIconButtonWrapper from"components/common/icon-wrapper";import{ENABLE_TEXT_CONTENT_EDIT}from"actions";import restrictNumber from"utils/restrict-number";import{useStore}from"hooks";import{SFlexBox,SSelect,STextField}from"@solostylist/ui-kit/core";import{textOptionsPopupComponents,TEXT_POPPABLE_OPTIONS}from"./text-options.constants";import{activateTextChange,deactivateTextChange}from"./handle-text-change-area";var TextControls=function(a){var b=a.text,c=a.saveText,d=a.children,e=useStore(),f=e.dispatch,g=e.textIdOfEditableContent,h=e.designLayer,i=e.t,j=e.config,k=j.useCloudimage,l=j[TOOLS_IDS.TEXT]||{},m=l.fonts,n=void 0===m?[]:m,o=l.onFontChange,p=useCallback(function(a){var b=a.target,d=b.name,e=b.value,f=b.type;c(function(a){return _defineProperty({id:a.id},d,"number"===f?restrictNumber(e,1,500):e)})},[c]),q=useCallback(function(a){if(p({target:{name:"fontFamily",value:a}}),b.fontFamily!==a&&"function"==typeof o){var c=h.draw.bind(h);o(a,c)}},[p,b,h]),r=useCallback(function(a){var c,d=(null===(c=b.fontStyle)||void 0===c?void 0:c.replace("normal","").split(" "))||[];0<Object.keys(d).length&&d.includes(a)?d=d.filter(function(b){return b!==a}):d.push(a),p({target:{name:"fontStyle",value:d.join(" ").trim()||"normal"}})},[b]),s=useCallback(function(){f({type:ENABLE_TEXT_CONTENT_EDIT,payload:{textIdOfEditableContent:null}})},[]),t=useCallback(function(a){p({target:{name:"text",value:a}}),s()},[]);return useEffect(function(){var a;if(g&&b.id===g){var c=h.getStage(),d=_slicedToArray(c.findOne("#".concat(TRANSFORMERS_LAYER_ID)).children,1);a=d[0],activateTextChange(g,c,a,t,s)}return function(){a&&g&&deactivateTextChange()}},[g]),React.createElement(AnnotationOptions,{annotation:b,updateAnnotation:c,morePoppableOptionsPrepended:k?[]:TEXT_POPPABLE_OPTIONS,moreOptionsPopupComponentsObj:k?{}:textOptionsPopupComponents,t:i},React.createElement(SFlexBox,{sx:{gap:1,alignItems:"center"}},Array.isArray(n)&&1<n.length&&React.createElement(SSelect,{onChange:function(a){return q(a.target.value)},value:b.fontFamily,placeholder:i("fontFamily"),options:n,optionLabel:"object"===_typeof(n[0])?"label":void 0,optionValue:"object"===_typeof(n[0])?"value":void 0,sx:{width:150,textAlign:"left"}}),React.createElement(STextField,{value:b.fontSize||"",name:"fontSize",onChange:p,inputMode:"numeric",type:"number",sx:{width:150},placeholder:i("size")}),!k&&React.createElement(React.Fragment,null,React.createElement(SIconButtonWrapper,{active:(b.fontStyle||"").includes("bold"),onClick:function(){return r("bold")},watermarkTool:!0},React.createElement(FormatBoldOutlined,null)),React.createElement(SIconButtonWrapper,{active:(b.fontStyle||"").includes("italic"),onClick:function(){return r("italic")},watermarkTool:!0},React.createElement(FormatItalicOutlined,null))),d))};export default TextControls;
1
+ import _typeof from"@babel/runtime/helpers/typeof";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _defineProperty from"@babel/runtime/helpers/defineProperty";import{useCallback,useEffect}from"react";import{FormatBoldOutlined,FormatItalicOutlined}from"@mui/icons-material";import{TOOLS_IDS,TRANSFORMERS_LAYER_ID}from"utils/constants";import AnnotationOptions from"components/common/annotation-options";import SIconButtonWrapper from"components/common/icon-wrapper";import{ENABLE_TEXT_CONTENT_EDIT}from"actions";import restrictNumber from"utils/restrict-number";import{useStore}from"hooks";import{SFlexBox,SSelect,STextField}from"@solostylist/ui-kit/core";import{textOptionsPopupComponents,TEXT_POPPABLE_OPTIONS}from"./text-options.constants";import{activateTextChange,deactivateTextChange}from"./handle-text-change-area";var TextControls=function(a){var b=a.text,c=a.saveText,d=a.children,e=useStore(),f=e.dispatch,g=e.textIdOfEditableContent,h=e.designLayer,i=e.t,j=e.config,k=j[TOOLS_IDS.TEXT]||{},l=k.fonts,m=void 0===l?[]:l,n=k.onFontChange,o=useCallback(function(a){var b=a.target,d=b.name,e=b.value,f=b.type;c(function(a){return _defineProperty({id:a.id},d,"number"===f?restrictNumber(+e,1,500):e)})},[c]),p=useCallback(function(a){if(o({target:{name:"fontFamily",value:a}}),b.fontFamily!==a&&"function"==typeof n){var c=h.draw.bind(h);n(a,c)}},[o,b.fontFamily,n,h]),q=useCallback(function(a){var c,d=(null===(c=b.fontStyle)||void 0===c?void 0:c.replace("normal","").split(" "))||[];0<Object.keys(d).length&&d.includes(a)?d=d.filter(function(b){return b!==a}):d.push(a),o({target:{name:"fontStyle",value:d.join(" ").trim()||"normal"}})},[b.fontStyle,o]),r=useCallback(function(){f({type:ENABLE_TEXT_CONTENT_EDIT,payload:{textIdOfEditableContent:null}})},[]),s=useCallback(function(a){o({target:{name:"text",value:a}}),r()},[]);return useEffect(function(){var a;if(g&&b.id===g){var c=h.getStage(),d=c.findOne("#".concat(TRANSFORMERS_LAYER_ID));if(d){var e=d.children||[],f=_slicedToArray(e,1);a=f[0],activateTextChange(g,c,a,s,r)}}return function(){a&&g&&deactivateTextChange()}},[g]),React.createElement(AnnotationOptions,{annotation:b,updateAnnotation:c,morePoppableOptionsPrepended:TEXT_POPPABLE_OPTIONS,moreOptionsPopupComponentsObj:textOptionsPopupComponents},React.createElement(SFlexBox,{sx:{gap:1,alignItems:"center"}},Array.isArray(m)&&1<m.length&&React.createElement(SSelect,{onChange:function(a){return p(a.target.value)},value:b.fontFamily,placeholder:i("fontFamily"),options:m,optionLabel:"object"===_typeof(m[0])?"label":void 0,optionValue:"object"===_typeof(m[0])?"value":void 0,sx:{width:150,textAlign:"left"}}),React.createElement(STextField,{value:b.fontSize||"",name:"fontSize",onChange:o,inputMode:"numeric",type:"number",sx:{width:150},placeholder:i("size")}),React.createElement(SIconButtonWrapper,{active:(b.fontStyle||"").includes("bold"),onClick:function(){return q("bold")}},React.createElement(FormatBoldOutlined,null)),React.createElement(SIconButtonWrapper,{active:(b.fontStyle||"").includes("italic"),onClick:function(){return q("italic")}},React.createElement(FormatItalicOutlined,null)),d))};export default TextControls;