@layers-app/shared 0.2.4 → 0.2.6

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 (341) hide show
  1. package/dist/assets/jsons/emoji-categorized-windows.json.js +4 -0
  2. package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
  3. package/dist/assets/svg/flags/es.svg.js +4 -0
  4. package/dist/assets/svg/flags/ru.svg.js +4 -0
  5. package/dist/assets/svg/flags/us.svg.js +4 -0
  6. package/dist/assets/svg/globeIcon.svg.js +5 -0
  7. package/dist/assets/svg/socials/github.svg.js +5 -0
  8. package/dist/assets/svg/socials/instagram.svg.js +5 -0
  9. package/dist/assets/svg/socials/x.svg.js +5 -0
  10. package/dist/assets/svg/socials/youtube.svg.js +5 -0
  11. package/dist/assets/svg/users.svg.js +5 -0
  12. package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
  13. package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
  14. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  15. package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
  16. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  17. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  18. package/dist/components/AppContainer/AppContainer.js +48 -45
  19. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  20. package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
  21. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
  22. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  23. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +57 -44
  24. package/dist/components/AppContainer/components/Main.d.ts +5 -1
  25. package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
  26. package/dist/components/AppContainer/components/Main.js +11 -8
  27. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  28. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
  29. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  30. package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
  31. package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
  32. package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
  33. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  34. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  35. package/dist/components/AppContainer/hooks/useAppContainer.js +45 -42
  36. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  37. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +1 -0
  38. package/dist/components/AppContainer/types.d.ts +2 -0
  39. package/dist/components/AppContainer/types.d.ts.map +1 -1
  40. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
  41. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
  42. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
  43. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  44. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
  45. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
  46. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
  47. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
  48. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
  49. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  50. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  51. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
  52. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  53. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
  54. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  55. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
  56. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  57. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
  58. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
  59. package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
  60. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  61. package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
  62. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
  63. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
  64. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  65. package/dist/components/ColorPicker/ColorPicker.js +66 -59
  66. package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
  67. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  68. package/dist/components/Copyright/index.d.ts.map +1 -1
  69. package/dist/components/Copyright/index.js +6 -6
  70. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/EmojiPanel.js +14 -14
  72. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  73. package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
  74. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  75. package/dist/components/EmojiPicker/IconsPanel.js +37 -38
  76. package/dist/components/EmojiPicker/utils.d.ts +11 -0
  77. package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
  78. package/dist/components/EmojiPicker/utils.js +46 -0
  79. package/dist/components/EntityIcon.d.ts +5 -2
  80. package/dist/components/EntityIcon.d.ts.map +1 -1
  81. package/dist/components/EntityIcon.js +44 -46
  82. package/dist/components/FilePicker/FilePicker.d.ts +33 -2
  83. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  84. package/dist/components/FilePicker/FilePicker.js +155 -105
  85. package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
  86. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
  87. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
  88. package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
  89. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  90. package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
  91. package/dist/components/FilePicker/types.d.ts +1 -1
  92. package/dist/components/FilePicker/types.d.ts.map +1 -1
  93. package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
  94. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
  95. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
  96. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
  97. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
  98. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
  99. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  100. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
  101. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
  102. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
  103. package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
  104. package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
  105. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  106. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
  107. package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
  108. package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
  109. package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
  110. package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
  111. package/dist/components/FormViewer/store/formStore.d.ts +10 -3
  112. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  113. package/dist/components/FormViewer/store/formStore.js +3 -3
  114. package/dist/components/FormViewer/store/selectors.js +1 -1
  115. package/dist/components/GroupAvatar/index.d.ts +1 -0
  116. package/dist/components/GroupAvatar/index.d.ts.map +1 -1
  117. package/dist/components/GroupAvatar/index.js +9 -8
  118. package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
  119. package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
  120. package/dist/components/ImageCropper/ImageCropper.js +356 -0
  121. package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
  122. package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
  123. package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
  124. package/dist/components/ImageCropper/cropUtils.js +42 -0
  125. package/dist/components/ImageCropper/index.d.ts +4 -0
  126. package/dist/components/ImageCropper/index.d.ts.map +1 -0
  127. package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
  128. package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
  129. package/dist/components/ImageCropper/useCropInteraction.js +76 -0
  130. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
  131. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
  132. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
  133. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
  134. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
  135. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
  136. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
  137. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
  138. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
  139. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
  140. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
  141. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
  142. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
  143. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
  144. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
  145. package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
  146. package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
  147. package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
  148. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  149. package/dist/components/LanguagePicker/LanguagePicker.js +26 -22
  150. package/dist/components/Loaders/styles.module.css.js +1 -1
  151. package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
  152. package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
  153. package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
  154. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
  155. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
  156. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
  157. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
  158. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
  159. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
  160. package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
  161. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
  162. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
  163. package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
  164. package/dist/components/MediaLibrary/index.d.ts +4 -0
  165. package/dist/components/MediaLibrary/index.d.ts.map +1 -0
  166. package/dist/components/MediaLibrary/types.d.ts +31 -0
  167. package/dist/components/MediaLibrary/types.d.ts.map +1 -0
  168. package/dist/components/NavMenu/NavMenu.d.ts +4 -1
  169. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  170. package/dist/components/NavMenu/NavMenu.js +96 -77
  171. package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
  172. package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
  173. package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
  174. package/dist/components/NavMenu/components/DnDItem.js +32 -30
  175. package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
  176. package/dist/components/NavMenu/components/DnDProvider.js +28 -26
  177. package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
  178. package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
  179. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  180. package/dist/components/NavMenu/components/NavMenuItem.js +108 -94
  181. package/dist/components/NavMenu/store.d.ts +1 -0
  182. package/dist/components/NavMenu/store.d.ts.map +1 -1
  183. package/dist/components/NavMenu/types.d.ts +1 -0
  184. package/dist/components/NavMenu/types.d.ts.map +1 -1
  185. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  186. package/dist/components/NoData/NoData.d.ts +38 -27
  187. package/dist/components/NoData/NoData.d.ts.map +1 -1
  188. package/dist/components/NoData/NoData.js +82 -79
  189. package/dist/components/OnBoarding/ProjectBoard.js +17 -17
  190. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
  191. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
  192. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
  193. package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
  194. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
  195. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
  196. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
  197. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
  198. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
  199. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
  200. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
  201. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
  202. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
  203. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
  204. package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
  205. package/dist/components/SearchFilters/components/DateFilter.js +19 -19
  206. package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
  207. package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
  208. package/dist/components/SettingsSection/index.d.ts +12 -0
  209. package/dist/components/SettingsSection/index.d.ts.map +1 -0
  210. package/dist/components/SettingsSection/index.js +36 -0
  211. package/dist/components/SettingsSection/styles.module.css.js +7 -0
  212. package/dist/components/SocialLinkRow/index.d.ts +11 -0
  213. package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
  214. package/dist/components/SocialLinkRow/index.js +109 -0
  215. package/dist/components/SortableList/SortableList.d.ts.map +1 -1
  216. package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
  217. package/dist/components/SortableList/components/SortableItem/SortableItem.js +4 -12
  218. package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
  219. package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
  220. package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
  221. package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
  222. package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
  223. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
  224. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
  225. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
  226. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
  227. package/dist/components/StorageUsageProgress/index.d.ts +2 -2
  228. package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
  229. package/dist/components/StorageUsageProgress/index.js +76 -41
  230. package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
  231. package/dist/components/ThemeIndicator/index.js +4 -4
  232. package/dist/components/TimezonePicker/index.d.ts +9 -0
  233. package/dist/components/TimezonePicker/index.d.ts.map +1 -0
  234. package/dist/components/TimezonePicker/index.js +90 -0
  235. package/dist/components/UserAvatar/index.js +14 -14
  236. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  237. package/dist/components/WorkspaceMenu/WorkspaceItem.js +18 -17
  238. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  239. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +78 -74
  240. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  241. package/dist/components/modals/RemoveConfirmModal.js +31 -24
  242. package/dist/components/table/components/TableHeaders.js +3 -3
  243. package/dist/components/table/components/TablePanel.js +1 -1
  244. package/dist/components/table/export.d.ts.map +1 -1
  245. package/dist/components/table/helpers/columns.js +3 -3
  246. package/dist/components/table/hooks/TableProvider.js +3 -3
  247. package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
  248. package/dist/components/table/hooks/useSaveRowCount.js +4 -4
  249. package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
  250. package/dist/components/table/hooks/useSorting.js +3 -1
  251. package/dist/components/table/selectors.js +6 -6
  252. package/dist/constants.d.ts.map +1 -1
  253. package/dist/constants.js +8 -1
  254. package/dist/helpers/getFileIcons.js +12 -12
  255. package/dist/helpers/getFileType.d.ts +1 -2
  256. package/dist/helpers/getFileType.d.ts.map +1 -1
  257. package/dist/helpers/getFileType.js +5 -6
  258. package/dist/helpers/isAppMode.d.ts +1 -1
  259. package/dist/helpers/isAppMode.d.ts.map +1 -1
  260. package/dist/helpers/showNotifications.d.ts +14 -3
  261. package/dist/helpers/showNotifications.d.ts.map +1 -1
  262. package/dist/helpers/showNotifications.js +152 -61
  263. package/dist/helpers/showNotifications.module.css.js +29 -0
  264. package/dist/helpers/timezones.d.ts +12 -0
  265. package/dist/helpers/timezones.d.ts.map +1 -0
  266. package/dist/helpers/timezones.js +59 -0
  267. package/dist/helpers/validateAliasFormat.d.ts +2 -0
  268. package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
  269. package/dist/helpers/validateAliasFormat.js +4 -0
  270. package/dist/hooks/useNumberQueryParam.js +3 -3
  271. package/dist/hooks/useOutsideClick.d.ts.map +1 -1
  272. package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
  273. package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
  274. package/dist/hooks/useVideoUploadGuard.js +24 -0
  275. package/dist/index.css +1 -1
  276. package/dist/index.d.ts +13 -5
  277. package/dist/index.d.ts.map +1 -1
  278. package/dist/index.js +388 -346
  279. package/dist/lang/locales/ui_en.json.js +24 -22
  280. package/dist/lang/locales/ui_es.json.js +22 -20
  281. package/dist/lang/locales/ui_ru.json.js +18 -16
  282. package/dist/lib/contentImport/index.d.ts +4 -0
  283. package/dist/lib/contentImport/index.d.ts.map +1 -0
  284. package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
  285. package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
  286. package/dist/lib/contentImport/lexicalSerializer.js +215 -0
  287. package/dist/lib/contentImport/types.d.ts +161 -0
  288. package/dist/lib/contentImport/types.d.ts.map +1 -0
  289. package/dist/lib/contentImport/utils.d.ts +35 -0
  290. package/dist/lib/contentImport/utils.d.ts.map +1 -0
  291. package/dist/lib/contentImport/utils.js +145 -0
  292. package/dist/node_modules/countries-and-timezones/esm/index.js +4031 -0
  293. package/dist/store/plansModal.d.ts.map +1 -1
  294. package/dist/store/plansModal.js +8 -7
  295. package/dist/store/trashModal.d.ts +8 -0
  296. package/dist/store/trashModal.d.ts.map +1 -0
  297. package/dist/store/trashModal.js +13 -0
  298. package/dist/types/storageCategories.d.ts +4 -0
  299. package/dist/types/storageCategories.d.ts.map +1 -0
  300. package/dist/types/storageCategories.js +21 -0
  301. package/dist/utils/formatStorage.d.ts +8 -2
  302. package/dist/utils/formatStorage.d.ts.map +1 -1
  303. package/dist/utils/formatStorage.js +10 -5
  304. package/dist/utils/getCroppedBlob.d.ts +3 -0
  305. package/dist/utils/getCroppedBlob.d.ts.map +1 -0
  306. package/dist/utils/getCroppedBlob.js +21 -0
  307. package/docs/README.md +17 -4
  308. package/package.json +1 -1
  309. package/dist/assets/fileTypes/archives.svg.js +0 -5
  310. package/dist/assets/fileTypes/audio.svg.js +0 -5
  311. package/dist/assets/fileTypes/code.svg.js +0 -5
  312. package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
  313. package/dist/assets/fileTypes/images.svg.js +0 -5
  314. package/dist/assets/fileTypes/other.svg.js +0 -5
  315. package/dist/assets/fileTypes/videos.svg.js +0 -5
  316. package/dist/assets/images/flags/es.svg.js +0 -4
  317. package/dist/assets/images/flags/ru.svg.js +0 -4
  318. package/dist/assets/images/flags/us.svg.js +0 -4
  319. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
  320. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
  321. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
  322. package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
  323. package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
  324. package/dist/components/EmojiPicker/getIconsList.js +0 -32
  325. package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
  326. package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
  327. package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
  328. package/dist/components/NoData/NoData.module.css.js +0 -7
  329. package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
  330. package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
  331. package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
  332. package/dist/components/PaymentError/PaymentError.d.ts +0 -2
  333. package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
  334. package/dist/components/PaymentError/PaymentError.js +0 -41
  335. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
  336. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
  337. package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
  338. package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
  339. package/dist/store/accessOptionsControl.d.ts +0 -17
  340. package/dist/store/accessOptionsControl.d.ts.map +0 -1
  341. package/dist/store/accessOptionsControl.js +0 -18
@@ -0,0 +1,356 @@
1
+ import { jsxs as X, jsx as g, Fragment as T } from "react/jsx-runtime";
2
+ import { useRef as R, useState as E, useMemo as he, useEffect as q, useCallback as C } from "react";
3
+ import { Box as se } from "@mantine/core";
4
+ import { useElementSize as re } from "@mantine/hooks";
5
+ import r from "./ImageCropper.module.css.js";
6
+ const ge = ({
7
+ src: z,
8
+ variant: Y = "square",
9
+ aspectRatio: c = 1,
10
+ minSize: f = 50,
11
+ maxSize: v,
12
+ onCropComplete: F,
13
+ onCropDataChange: O
14
+ }) => {
15
+ const {
16
+ ref: ee,
17
+ width: M,
18
+ height: L
19
+ } = re(), $ = R(null), j = R(null), [H, te] = E(!1), [m, ne] = E({ width: 0, height: 0 }), o = he(() => {
20
+ if (!H || M === 0 || L === 0 || m.width === 0)
21
+ return { x: 0, y: 0, width: M, height: L };
22
+ const i = M / L, h = m.width / m.height;
23
+ if (h > i) {
24
+ const d = M / h;
25
+ return {
26
+ x: 0,
27
+ y: (L - d) / 2,
28
+ width: M,
29
+ height: d
30
+ };
31
+ } else {
32
+ const d = L * h;
33
+ return {
34
+ x: (M - d) / 2,
35
+ y: 0,
36
+ width: d,
37
+ height: L
38
+ };
39
+ }
40
+ }, [H, M, L, m]), [t, G] = E({
41
+ x: 0,
42
+ y: 0,
43
+ width: 200,
44
+ height: 200
45
+ }), [W, K] = E(!1), [D, Q] = E(!1), [w, U] = E(null), [J, V] = E({ x: 0, y: 0 }), [e, Z] = E({
46
+ x: 0,
47
+ y: 0,
48
+ width: 0,
49
+ height: 0
50
+ });
51
+ q(() => {
52
+ if (!H || M === 0 || L === 0 || o.width === 0)
53
+ return;
54
+ let i, h, d = Math.min(o.width, o.height) * 0.8;
55
+ v && (d = Math.min(d, v)), c >= 1 ? (i = d, h = d / c) : (h = d, i = d * c);
56
+ const u = o.x + (o.width - i) / 2, b = o.y + (o.height - h) / 2;
57
+ G({ x: u, y: b, width: i, height: h });
58
+ }, [
59
+ H,
60
+ c,
61
+ M,
62
+ L,
63
+ o,
64
+ v
65
+ ]);
66
+ const ie = C(() => {
67
+ $.current && (ne({
68
+ width: $.current.naturalWidth,
69
+ height: $.current.naturalHeight
70
+ }), te(!0));
71
+ }, []), _ = C(
72
+ (i) => {
73
+ i.preventDefault(), i.stopPropagation();
74
+ const h = "touches" in i ? i.touches[0].clientX : i.clientX, d = "touches" in i ? i.touches[0].clientY : i.clientY;
75
+ K(!0), V({ x: h, y: d }), Z({ ...t });
76
+ },
77
+ [t]
78
+ ), A = C(
79
+ (i) => (h) => {
80
+ h.preventDefault(), h.stopPropagation();
81
+ const d = "touches" in h ? h.touches[0].clientX : h.clientX, u = "touches" in h ? h.touches[0].clientY : h.clientY;
82
+ Q(!0), U(i), V({ x: d, y: u }), Z({ ...t });
83
+ },
84
+ [t]
85
+ );
86
+ q(() => {
87
+ const i = (d) => {
88
+ if (!W && !D) return;
89
+ const u = "touches" in d ? d.touches[0].clientX : d.clientX, b = "touches" in d ? d.touches[0].clientY : d.clientY, y = u - J.x, k = b - J.y, p = o.x, x = o.y, N = o.x + o.width, I = o.y + o.height;
90
+ if (W) {
91
+ let a = e.x + y, l = e.y + k;
92
+ a = Math.max(p, Math.min(a, N - t.width)), l = Math.max(x, Math.min(l, I - t.height)), G((n) => ({ ...n, x: a, y: l }));
93
+ }
94
+ if (D && w) {
95
+ let a = e.x, l = e.y, n = e.width, s = e.height;
96
+ switch (w) {
97
+ case "se":
98
+ n = Math.max(f, e.width + y), s = n / c;
99
+ break;
100
+ case "sw":
101
+ n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n;
102
+ break;
103
+ case "ne":
104
+ n = Math.max(f, e.width + y), s = n / c, l = e.y + e.height - s;
105
+ break;
106
+ case "nw":
107
+ n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n, l = e.y + e.height - s;
108
+ break;
109
+ case "e":
110
+ n = Math.max(f, e.width + y), s = n / c, l = e.y + (e.height - s) / 2;
111
+ break;
112
+ case "w":
113
+ n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n, l = e.y + (e.height - s) / 2;
114
+ break;
115
+ case "s":
116
+ s = Math.max(f, e.height + k), n = s * c, a = e.x + (e.width - n) / 2;
117
+ break;
118
+ case "n":
119
+ s = Math.max(f, e.height - k), n = s * c, a = e.x + (e.width - n) / 2, l = e.y + e.height - s;
120
+ break;
121
+ }
122
+ v && (c >= 1 ? n > v && (n = v, s = n / c, w.includes("w") && (a = e.x + e.width - n), w.includes("n") && (l = e.y + e.height - s), (w === "e" || w === "w") && (l = e.y + (e.height - s) / 2), (w === "n" || w === "s") && (a = e.x + (e.width - n) / 2)) : s > v && (s = v, n = s * c, w.includes("w") && (a = e.x + e.width - n), w.includes("n") && (l = e.y + e.height - s), (w === "e" || w === "w") && (l = e.y + (e.height - s) / 2), (w === "n" || w === "s") && (a = e.x + (e.width - n) / 2))), a < p && (n += a - p, s = n / c, a = p), l < x && (s += l - x, n = s * c, l = x), a + n > N && (n = N - a, s = n / c), l + s > I && (s = I - l, n = s * c), n >= f && s >= f && G({ x: a, y: l, width: n, height: s });
123
+ }
124
+ }, h = () => {
125
+ K(!1), Q(!1), U(null);
126
+ };
127
+ return (W || D) && (window.addEventListener("mousemove", i), window.addEventListener("mouseup", h), window.addEventListener("touchmove", i), window.addEventListener("touchend", h)), () => {
128
+ window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", h), window.removeEventListener("touchmove", i), window.removeEventListener("touchend", h);
129
+ };
130
+ }, [
131
+ W,
132
+ D,
133
+ w,
134
+ J,
135
+ e,
136
+ o,
137
+ t.width,
138
+ t.height,
139
+ c,
140
+ f,
141
+ v
142
+ ]), q(() => {
143
+ if (O && H && o.width > 0) {
144
+ const i = m.width / o.width, h = m.height / o.height;
145
+ O({
146
+ x: (t.x - o.x) * i,
147
+ y: (t.y - o.y) * h,
148
+ width: t.width * i,
149
+ height: t.height * h,
150
+ scale: i
151
+ });
152
+ }
153
+ }, [t, m, o, H, O]);
154
+ const S = C(() => new Promise((i, h) => {
155
+ if (!$.current || !j.current) {
156
+ h(new Error("Image or canvas not ready"));
157
+ return;
158
+ }
159
+ const d = j.current, u = d.getContext("2d");
160
+ if (!u) {
161
+ h(new Error("Could not get canvas context"));
162
+ return;
163
+ }
164
+ const b = m.width / o.width, y = m.height / o.height, k = (t.x - o.x) * b, p = (t.y - o.y) * y, x = t.width * b, N = t.height * y;
165
+ d.width = x, d.height = N, Y === "rounded" && (u.beginPath(), u.arc(
166
+ x / 2,
167
+ N / 2,
168
+ Math.min(x, N) / 2,
169
+ 0,
170
+ Math.PI * 2
171
+ ), u.closePath(), u.clip()), u.drawImage(
172
+ $.current,
173
+ k,
174
+ p,
175
+ x,
176
+ N,
177
+ 0,
178
+ 0,
179
+ x,
180
+ N
181
+ ), d.toBlob(
182
+ (I) => {
183
+ I ? i(I) : h(new Error("Failed to create blob"));
184
+ },
185
+ "image/png",
186
+ 1
187
+ );
188
+ }), [t, m, o, Y]);
189
+ q(() => {
190
+ F && S().then(F).catch(() => {
191
+ });
192
+ }, [S, F]);
193
+ const B = (i) => {
194
+ const h = {
195
+ nw: r.handleNW,
196
+ ne: r.handleNE,
197
+ sw: r.handleSW,
198
+ se: r.handleSE
199
+ };
200
+ return /* @__PURE__ */ X(
201
+ "div",
202
+ {
203
+ className: `${r.cornerHandle} ${h[i]}`,
204
+ onMouseDown: A(i),
205
+ onTouchStart: A(i),
206
+ children: [
207
+ /* @__PURE__ */ g("div", { className: r.cornerHandleArm, "data-direction": "horizontal" }),
208
+ /* @__PURE__ */ g("div", { className: r.cornerHandleArm, "data-direction": "vertical" })
209
+ ]
210
+ }
211
+ );
212
+ }, P = (i) => {
213
+ const h = {
214
+ n: r.handleN,
215
+ s: r.handleS,
216
+ e: r.handleE,
217
+ w: r.handleW
218
+ };
219
+ return /* @__PURE__ */ g(
220
+ "div",
221
+ {
222
+ className: `${r.edgeHandle} ${h[i]}`,
223
+ onMouseDown: A(i),
224
+ onTouchStart: A(i),
225
+ children: /* @__PURE__ */ g("div", { className: r.edgeHandleBar })
226
+ }
227
+ );
228
+ };
229
+ return /* @__PURE__ */ X(se, { className: r.container, ref: ee, children: [
230
+ /* @__PURE__ */ g("canvas", { ref: j, style: { display: "none" } }),
231
+ /* @__PURE__ */ g(
232
+ "img",
233
+ {
234
+ ref: $,
235
+ src: z,
236
+ alt: "Crop preview",
237
+ className: r.image,
238
+ onLoad: ie,
239
+ draggable: !1
240
+ }
241
+ ),
242
+ H && /* @__PURE__ */ X(T, { children: [
243
+ Y === "square" ? /* @__PURE__ */ X(T, { children: [
244
+ /* @__PURE__ */ g(
245
+ "div",
246
+ {
247
+ className: r.overlay,
248
+ style: {
249
+ top: 0,
250
+ left: 0,
251
+ right: 0,
252
+ height: t.y
253
+ }
254
+ }
255
+ ),
256
+ /* @__PURE__ */ g(
257
+ "div",
258
+ {
259
+ className: r.overlay,
260
+ style: {
261
+ top: t.y + t.height,
262
+ left: 0,
263
+ right: 0,
264
+ bottom: 0
265
+ }
266
+ }
267
+ ),
268
+ /* @__PURE__ */ g(
269
+ "div",
270
+ {
271
+ className: r.overlay,
272
+ style: {
273
+ top: t.y,
274
+ left: 0,
275
+ width: t.x,
276
+ height: t.height
277
+ }
278
+ }
279
+ ),
280
+ /* @__PURE__ */ g(
281
+ "div",
282
+ {
283
+ className: r.overlay,
284
+ style: {
285
+ top: t.y,
286
+ left: t.x + t.width,
287
+ right: 0,
288
+ height: t.height
289
+ }
290
+ }
291
+ )
292
+ ] }) : /* @__PURE__ */ g(
293
+ "div",
294
+ {
295
+ className: r.circularOverlay,
296
+ style: {
297
+ left: t.x + t.width / 2,
298
+ top: t.y + t.height / 2,
299
+ width: t.width - 4,
300
+ height: t.height - 4
301
+ }
302
+ }
303
+ ),
304
+ /* @__PURE__ */ X(
305
+ "div",
306
+ {
307
+ className: `${r.cropArea} ${Y === "rounded" ? r.cropAreaRounded : ""}`,
308
+ style: {
309
+ left: t.x,
310
+ top: t.y,
311
+ width: t.width,
312
+ height: t.height
313
+ },
314
+ onMouseDown: _,
315
+ onTouchStart: _,
316
+ children: [
317
+ Y === "square" ? /* @__PURE__ */ g("div", { className: r.dashedBorder }) : /* @__PURE__ */ X(T, { children: [
318
+ /* @__PURE__ */ g("div", { className: `${r.edgeLine} ${r.edgeLineTop}` }),
319
+ /* @__PURE__ */ g(
320
+ "div",
321
+ {
322
+ className: `${r.edgeLine} ${r.edgeLineBottom}`
323
+ }
324
+ ),
325
+ /* @__PURE__ */ g(
326
+ "div",
327
+ {
328
+ className: `${r.edgeLine} ${r.edgeLineLeft}`
329
+ }
330
+ ),
331
+ /* @__PURE__ */ g(
332
+ "div",
333
+ {
334
+ className: `${r.edgeLine} ${r.edgeLineRight}`
335
+ }
336
+ )
337
+ ] }),
338
+ B("nw"),
339
+ B("ne"),
340
+ B("sw"),
341
+ B("se"),
342
+ Y === "square" && /* @__PURE__ */ X(T, { children: [
343
+ P("n"),
344
+ P("s"),
345
+ P("e"),
346
+ P("w")
347
+ ] })
348
+ ]
349
+ }
350
+ )
351
+ ] })
352
+ ] });
353
+ };
354
+ export {
355
+ ge as ImageCropper
356
+ };
@@ -0,0 +1,51 @@
1
+ const e = "_container_z996o_1", n = "_image_z996o_12", o = "_overlay_z996o_19", _ = "_circularOverlay_z996o_25", d = "_cropArea_z996o_33", a = "_dashedBorder_z996o_39", l = "_edgeLine_z996o_46", r = "_edgeLineTop_z996o_52", c = "_edgeLineBottom_z996o_60", t = "_edgeLineLeft_z996o_68", s = "_edgeLineRight_z996o_76", h = "_cornerHandle_z996o_84", g = "_cornerHandleArm_z996o_92", i = "_handleNW_z996o_107", z = "_handleNE_z996o_123", L = "_handleSW_z996o_139", H = "_handleSE_z996o_156", m = "_edgeHandle_z996o_172", B = "_edgeHandleBar_z996o_181", E = "_handleN_z996o_107", N = "_handleS_z996o_139", S = "_handleE_z996o_213", W = "_handleW_z996o_227", p = {
2
+ container: e,
3
+ image: n,
4
+ overlay: o,
5
+ circularOverlay: _,
6
+ cropArea: d,
7
+ dashedBorder: a,
8
+ edgeLine: l,
9
+ edgeLineTop: r,
10
+ edgeLineBottom: c,
11
+ edgeLineLeft: t,
12
+ edgeLineRight: s,
13
+ cornerHandle: h,
14
+ cornerHandleArm: g,
15
+ handleNW: i,
16
+ handleNE: z,
17
+ handleSW: L,
18
+ handleSE: H,
19
+ edgeHandle: m,
20
+ edgeHandleBar: B,
21
+ handleN: E,
22
+ handleS: N,
23
+ handleE: S,
24
+ handleW: W
25
+ };
26
+ export {
27
+ _ as circularOverlay,
28
+ e as container,
29
+ h as cornerHandle,
30
+ g as cornerHandleArm,
31
+ d as cropArea,
32
+ a as dashedBorder,
33
+ p as default,
34
+ m as edgeHandle,
35
+ B as edgeHandleBar,
36
+ l as edgeLine,
37
+ c as edgeLineBottom,
38
+ t as edgeLineLeft,
39
+ s as edgeLineRight,
40
+ r as edgeLineTop,
41
+ S as handleE,
42
+ E as handleN,
43
+ z as handleNE,
44
+ i as handleNW,
45
+ N as handleS,
46
+ H as handleSE,
47
+ L as handleSW,
48
+ W as handleW,
49
+ n as image,
50
+ o as overlay
51
+ };
@@ -0,0 +1,22 @@
1
+ export interface CropBounds {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export type CropShape = 'square' | 'rounded';
8
+ export interface CropImageOptions {
9
+ image: HTMLImageElement;
10
+ bounds: CropBounds;
11
+ shape: CropShape;
12
+ outputWidth?: number;
13
+ outputHeight?: number;
14
+ quality?: number;
15
+ mimeType?: 'image/png' | 'image/jpeg' | 'image/webp';
16
+ }
17
+ export declare const cropImage: ({ image, bounds, shape, outputWidth, outputHeight, quality, mimeType, }: CropImageOptions) => Promise<Blob>;
18
+ export declare const blobToBase64: (blob: Blob) => Promise<string>;
19
+ export declare const scaleCropBounds: (cropBounds: CropBounds, containerWidth: number, containerHeight: number, imageWidth: number, imageHeight: number) => CropBounds;
20
+ export declare const getInitialCropBounds: (containerWidth: number, containerHeight: number, aspectRatio: number, sizePercent?: number) => CropBounds;
21
+ export declare const constrainCropBounds: (bounds: CropBounds, containerWidth: number, containerHeight: number, minSize: number) => CropBounds;
22
+ //# sourceMappingURL=cropUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cropUtils.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/cropUtils.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC;CACtD;AAED,eAAO,MAAM,SAAS,GAAU,yEAQ7B,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAuDjC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,OAAO,CAAC,MAAM,CAavD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,YAAY,UAAU,EACtB,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,EACvB,YAAY,MAAM,EAClB,aAAa,MAAM,KAClB,UAUF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,EACvB,aAAa,MAAM,EACnB,oBAAiB,KAChB,UAkBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,UAAU,EAClB,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,EACvB,SAAS,MAAM,KACd,UAiBF,CAAC"}
@@ -0,0 +1,42 @@
1
+ const d = async ({
2
+ image: h,
3
+ bounds: t,
4
+ shape: o,
5
+ outputWidth: g,
6
+ outputHeight: l,
7
+ quality: m = 1,
8
+ mimeType: s = "image/png"
9
+ }) => new Promise((w, c) => {
10
+ const a = document.createElement("canvas"), e = a.getContext("2d");
11
+ if (!e) {
12
+ c(new Error("Could not get canvas context"));
13
+ return;
14
+ }
15
+ const n = g ?? t.width, i = l ?? t.height;
16
+ a.width = n, a.height = i, o === "rounded" && (e.beginPath(), e.arc(
17
+ n / 2,
18
+ i / 2,
19
+ Math.min(n, i) / 2,
20
+ 0,
21
+ Math.PI * 2
22
+ ), e.closePath(), e.clip()), e.drawImage(
23
+ h,
24
+ t.x,
25
+ t.y,
26
+ t.width,
27
+ t.height,
28
+ 0,
29
+ 0,
30
+ n,
31
+ i
32
+ ), a.toBlob(
33
+ (r) => {
34
+ r ? w(r) : c(new Error("Failed to create blob"));
35
+ },
36
+ s,
37
+ m
38
+ );
39
+ });
40
+ export {
41
+ d as cropImage
42
+ };
@@ -0,0 +1,4 @@
1
+ export { ImageCropper, type ImageCropperProps, type CropData } from './ImageCropper';
2
+ export { useCropInteraction } from './useCropInteraction';
3
+ export { cropImage } from './cropUtils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,28 @@
1
+ interface CropBounds {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ interface ContainerSize {
8
+ width: number;
9
+ height: number;
10
+ }
11
+ type ResizeHandle = 'nw' | 'ne' | 'sw' | 'se' | null;
12
+ interface UseCropInteractionOptions {
13
+ initialCrop: CropBounds;
14
+ containerSize: ContainerSize;
15
+ aspectRatio: number;
16
+ minSize: number;
17
+ onCropChange: (crop: CropBounds) => void;
18
+ }
19
+ interface UseCropInteractionReturn {
20
+ isDragging: boolean;
21
+ isResizing: boolean;
22
+ activeHandle: ResizeHandle;
23
+ handleCropMouseDown: (e: React.MouseEvent | React.TouchEvent) => void;
24
+ handleResizeMouseDown: (handle: Exclude<ResizeHandle, null>) => (e: React.MouseEvent | React.TouchEvent) => void;
25
+ }
26
+ export declare const useCropInteraction: ({ initialCrop, containerSize, aspectRatio, minSize, onCropChange, }: UseCropInteractionOptions) => UseCropInteractionReturn;
27
+ export {};
28
+ //# sourceMappingURL=useCropInteraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCropInteraction.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/useCropInteraction.ts"],"names":[],"mappings":"AAOA,UAAU,UAAU;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD,UAAU,yBAAyB;IACjC,WAAW,EAAE,UAAU,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1C;AAED,UAAU,wBAAwB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACtE,qBAAqB,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAClH;AAED,eAAO,MAAM,kBAAkB,GAAI,qEAMhC,yBAAyB,KAAG,wBAwJ9B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { useState as g, useCallback as D, useEffect as P } from "react";
2
+ const W = ({
3
+ initialCrop: u,
4
+ containerSize: l,
5
+ aspectRatio: d,
6
+ minSize: w,
7
+ onCropChange: x
8
+ }) => {
9
+ const [r, Y] = g(!1), [a, M] = g(!1), [f, y] = g(null), [m, E] = g({ x: 0, y: 0 }), [t, L] = g(u), b = D(
10
+ (n) => {
11
+ n.preventDefault(), n.stopPropagation();
12
+ const s = "touches" in n ? n.touches[0].clientX : n.clientX, i = "touches" in n ? n.touches[0].clientY : n.clientY;
13
+ Y(!0), E({ x: s, y: i }), L(u);
14
+ },
15
+ [u]
16
+ ), k = D(
17
+ (n) => (s) => {
18
+ s.preventDefault(), s.stopPropagation();
19
+ const i = "touches" in s ? s.touches[0].clientX : s.clientX, X = "touches" in s ? s.touches[0].clientY : s.clientY;
20
+ M(!0), y(n), E({ x: i, y: X }), L(u);
21
+ },
22
+ [u]
23
+ );
24
+ return P(() => {
25
+ const n = (i) => {
26
+ if (!r && !a) return;
27
+ const X = "touches" in i ? i.touches[0].clientX : i.clientX, H = "touches" in i ? i.touches[0].clientY : i.clientY, v = X - m.x, I = H - m.y;
28
+ if (r) {
29
+ let o = t.x + v, c = t.y + I;
30
+ o = Math.max(0, Math.min(o, l.width - t.width)), c = Math.max(0, Math.min(c, l.height - t.height)), x({ ...t, x: o, y: c });
31
+ }
32
+ if (a && f) {
33
+ let o = t.x, c = t.y, e = t.width, h = t.height;
34
+ switch (f) {
35
+ case "se":
36
+ e = Math.max(w, t.width + v), h = e / d;
37
+ break;
38
+ case "sw":
39
+ e = Math.max(w, t.width - v), h = e / d, o = t.x + t.width - e;
40
+ break;
41
+ case "ne":
42
+ e = Math.max(w, t.width + v), h = e / d, c = t.y + t.height - h;
43
+ break;
44
+ case "nw":
45
+ e = Math.max(w, t.width - v), h = e / d, o = t.x + t.width - e, c = t.y + t.height - h;
46
+ break;
47
+ }
48
+ o < 0 && (e += o, h = e / d, o = 0), c < 0 && (h += c, e = h * d, c = 0), o + e > l.width && (e = l.width - o, h = e / d), c + h > l.height && (h = l.height - c, e = h * d), e >= w && h >= w && x({ x: o, y: c, width: e, height: h });
49
+ }
50
+ }, s = () => {
51
+ Y(!1), M(!1), y(null);
52
+ };
53
+ return (r || a) && (window.addEventListener("mousemove", n), window.addEventListener("mouseup", s), window.addEventListener("touchmove", n), window.addEventListener("touchend", s)), () => {
54
+ window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", s), window.removeEventListener("touchmove", n), window.removeEventListener("touchend", s);
55
+ };
56
+ }, [
57
+ r,
58
+ a,
59
+ f,
60
+ m,
61
+ t,
62
+ l,
63
+ d,
64
+ w,
65
+ x
66
+ ]), {
67
+ isDragging: r,
68
+ isResizing: a,
69
+ activeHandle: f,
70
+ handleCropMouseDown: b,
71
+ handleResizeMouseDown: k
72
+ };
73
+ };
74
+ export {
75
+ W as useCropInteraction
76
+ };
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface IntegrationFlowAnimationProps {
3
+ /** Icon component to display on the left (source) */
4
+ leftIcon: ReactNode;
5
+ /** Icon component to display on the right (destination) */
6
+ rightIcon: ReactNode;
7
+ /** Height of the component */
8
+ height?: number | string;
9
+ /** Number of particles to animate */
10
+ particleCount?: number;
11
+ /** Custom colors for particles (defaults to blue, green, yellow-orange distribution) */
12
+ colors?: string[];
13
+ /** Background image URL */
14
+ backgroundImage?: string;
15
+ }
16
+ /**
17
+ * A reusable animation component showing data flow between two integration icons.
18
+ * Displays animated particles flowing from left icon to right icon.
19
+ */
20
+ export declare const IntegrationFlowAnimation: ({ leftIcon, rightIcon, height, particleCount, colors, backgroundImage, }: IntegrationFlowAnimationProps) => ReactNode;
21
+ //# sourceMappingURL=IntegrationFlowAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationFlowAnimation.d.ts","sourceRoot":"","sources":["../../../src/components/IntegrationFlowAnimation/IntegrationFlowAnimation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAiD1D,MAAM,WAAW,6BAA6B;IAC5C,qDAAqD;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,2BAA2B;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,0EAOtC,6BAA6B,KAAG,SAqElC,CAAC"}