@edifice.io/react 2.0.0-develop-rc.4 → 2.0.0-develop-rc.10

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 (621) hide show
  1. package/README.md +17 -88
  2. package/dist/audience.js +15 -14
  3. package/dist/audience.js.map +1 -0
  4. package/dist/components/ActionBar/ActionBar.js +8 -7
  5. package/dist/components/ActionBar/ActionBar.js.map +1 -0
  6. package/dist/components/Alert/Alert.js +62 -61
  7. package/dist/components/Alert/Alert.js.map +1 -0
  8. package/dist/components/AppHeader/AppHeader.js +19 -18
  9. package/dist/components/AppHeader/AppHeader.js.map +1 -0
  10. package/dist/components/AppIcon/AppIcon.d.ts +1 -1
  11. package/dist/components/AppIcon/AppIcon.js +45 -44
  12. package/dist/components/AppIcon/AppIcon.js.map +1 -0
  13. package/dist/components/Attachment/Attachment.js +14 -13
  14. package/dist/components/Attachment/Attachment.js.map +1 -0
  15. package/dist/components/Avatar/Avatar.js +28 -27
  16. package/dist/components/Avatar/Avatar.js.map +1 -0
  17. package/dist/components/Badge/Badge.js +21 -20
  18. package/dist/components/Badge/Badge.js.map +1 -0
  19. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  20. package/dist/components/Breadcrumb/Breadcrumb.js +24 -23
  21. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  22. package/dist/components/Breadcrumb/BreadcrumbItem.js +12 -11
  23. package/dist/components/Breadcrumb/BreadcrumbItem.js.map +1 -0
  24. package/dist/components/Breadcrumb/BreadcrumbList.js +11 -10
  25. package/dist/components/Breadcrumb/BreadcrumbList.js.map +1 -0
  26. package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
  27. package/dist/components/Breadcrumb/BreadcrumbNav.js +16 -15
  28. package/dist/components/Breadcrumb/BreadcrumbNav.js.map +1 -0
  29. package/dist/components/Button/Button.js +33 -32
  30. package/dist/components/Button/Button.js.map +1 -0
  31. package/dist/components/Button/IconButton.js +16 -15
  32. package/dist/components/Button/IconButton.js.map +1 -0
  33. package/dist/components/Button/SearchButton.js +16 -15
  34. package/dist/components/Button/SearchButton.js.map +1 -0
  35. package/dist/components/Card/Card.d.ts +1 -1
  36. package/dist/components/Card/Card.js +48 -47
  37. package/dist/components/Card/Card.js.map +1 -0
  38. package/dist/components/Card/CardBody.js +14 -13
  39. package/dist/components/Card/CardBody.js.map +1 -0
  40. package/dist/components/Card/CardContext.d.ts +1 -1
  41. package/dist/components/Card/CardContext.js +8 -7
  42. package/dist/components/Card/CardContext.js.map +1 -0
  43. package/dist/components/Card/CardFooter.js +6 -5
  44. package/dist/components/Card/CardFooter.js.map +1 -0
  45. package/dist/components/Card/CardHeader.js +15 -14
  46. package/dist/components/Card/CardHeader.js.map +1 -0
  47. package/dist/components/Card/CardImage.js +14 -13
  48. package/dist/components/Card/CardImage.js.map +1 -0
  49. package/dist/components/Card/CardText.js +9 -8
  50. package/dist/components/Card/CardText.js.map +1 -0
  51. package/dist/components/Card/CardTitle.js +9 -8
  52. package/dist/components/Card/CardTitle.js.map +1 -0
  53. package/dist/components/Card/CardUser.js +9 -8
  54. package/dist/components/Card/CardUser.js.map +1 -0
  55. package/dist/components/Checkbox/Checkbox.js +31 -30
  56. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  57. package/dist/components/ColorPicker/ColorPalette.js +5 -4
  58. package/dist/components/ColorPicker/ColorPalette.js.map +1 -0
  59. package/dist/components/ColorPicker/ColorPicker.js +29 -28
  60. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  61. package/dist/components/ColorPicker/ColorPickerItem.js +12 -11
  62. package/dist/components/ColorPicker/ColorPickerItem.js.map +1 -0
  63. package/dist/components/Combobox/Combobox.js +36 -35
  64. package/dist/components/Combobox/Combobox.js.map +1 -0
  65. package/dist/components/Combobox/ComboboxTrigger.js +22 -21
  66. package/dist/components/Combobox/ComboboxTrigger.js.map +1 -0
  67. package/dist/components/Dropdown/Dropdown.js +56 -55
  68. package/dist/components/Dropdown/Dropdown.js.map +1 -0
  69. package/dist/components/Dropdown/DropdownCheckboxItem.js +27 -26
  70. package/dist/components/Dropdown/DropdownCheckboxItem.js.map +1 -0
  71. package/dist/components/Dropdown/DropdownContext.js +8 -7
  72. package/dist/components/Dropdown/DropdownContext.js.map +1 -0
  73. package/dist/components/Dropdown/DropdownItem.js +28 -27
  74. package/dist/components/Dropdown/DropdownItem.js.map +1 -0
  75. package/dist/components/Dropdown/DropdownMenu.js +22 -21
  76. package/dist/components/Dropdown/DropdownMenu.js.map +1 -0
  77. package/dist/components/Dropdown/DropdownMenuGroup.js +10 -9
  78. package/dist/components/Dropdown/DropdownMenuGroup.js.map +1 -0
  79. package/dist/components/Dropdown/DropdownRadioItem.js +27 -26
  80. package/dist/components/Dropdown/DropdownRadioItem.js.map +1 -0
  81. package/dist/components/Dropdown/DropdownSeparator.js +4 -3
  82. package/dist/components/Dropdown/DropdownSeparator.js.map +1 -0
  83. package/dist/components/Dropdown/DropdownTrigger.js +29 -28
  84. package/dist/components/Dropdown/DropdownTrigger.js.map +1 -0
  85. package/dist/components/Dropzone/Dropzone.js +48 -47
  86. package/dist/components/Dropzone/Dropzone.js.map +1 -0
  87. package/dist/components/Dropzone/DropzoneContext.js +9 -8
  88. package/dist/components/Dropzone/DropzoneContext.js.map +1 -0
  89. package/dist/components/Dropzone/DropzoneDrag.js +8 -7
  90. package/dist/components/Dropzone/DropzoneDrag.js.map +1 -0
  91. package/dist/components/Dropzone/DropzoneFile.js +26 -25
  92. package/dist/components/Dropzone/DropzoneFile.js.map +1 -0
  93. package/dist/components/Dropzone/DropzoneImport.js +21 -20
  94. package/dist/components/Dropzone/DropzoneImport.js.map +1 -0
  95. package/dist/components/EmptyScreen/EmptyScreen.js +17 -16
  96. package/dist/components/EmptyScreen/EmptyScreen.js.map +1 -0
  97. package/dist/components/FileCard/FileCard.d.ts +1 -1
  98. package/dist/components/FileCard/FileCard.js +38 -37
  99. package/dist/components/FileCard/FileCard.js.map +1 -0
  100. package/dist/components/FileCard/FileIcon.d.ts +1 -1
  101. package/dist/components/FileCard/FileIcon.js +12 -11
  102. package/dist/components/FileCard/FileIcon.js.map +1 -0
  103. package/dist/components/Form/FormContext.js +8 -7
  104. package/dist/components/Form/FormContext.js.map +1 -0
  105. package/dist/components/Form/FormControl.js +31 -30
  106. package/dist/components/Form/FormControl.js.map +1 -0
  107. package/dist/components/Form/FormText.js +13 -12
  108. package/dist/components/Form/FormText.js.map +1 -0
  109. package/dist/components/Grid/Grid.js +28 -27
  110. package/dist/components/Grid/Grid.js.map +1 -0
  111. package/dist/components/Heading/Heading.js +15 -14
  112. package/dist/components/Heading/Heading.js.map +1 -0
  113. package/dist/components/Icon/Icon.js +9 -8
  114. package/dist/components/Icon/Icon.js.map +1 -0
  115. package/dist/components/Image/Image.js +40 -39
  116. package/dist/components/Image/Image.js.map +1 -0
  117. package/dist/components/ImagePicker/ImagePicker.d.ts +1 -1
  118. package/dist/components/ImagePicker/ImagePicker.js +52 -51
  119. package/dist/components/ImagePicker/ImagePicker.js.map +1 -0
  120. package/dist/components/Input/Input.js +29 -28
  121. package/dist/components/Input/Input.js.map +1 -0
  122. package/dist/components/Label/Label.js +31 -30
  123. package/dist/components/Label/Label.js.map +1 -0
  124. package/dist/components/Loading/Loading.js +24 -23
  125. package/dist/components/Loading/Loading.js.map +1 -0
  126. package/dist/components/LoadingScreen/LoadingScreen.js +21 -20
  127. package/dist/components/LoadingScreen/LoadingScreen.js.map +1 -0
  128. package/dist/components/Logo/Logo.js +13 -12
  129. package/dist/components/Logo/Logo.js.map +1 -0
  130. package/dist/components/Menu/Menu.js +40 -39
  131. package/dist/components/Menu/Menu.js.map +1 -0
  132. package/dist/components/Menu/MenuButton.js +18 -17
  133. package/dist/components/Menu/MenuButton.js.map +1 -0
  134. package/dist/components/Menu/MenuContext.js +9 -8
  135. package/dist/components/Menu/MenuContext.js.map +1 -0
  136. package/dist/components/Menu/MenuItem.js +15 -14
  137. package/dist/components/Menu/MenuItem.js.map +1 -0
  138. package/dist/components/Modal/Modal.js +50 -49
  139. package/dist/components/Modal/Modal.js.map +1 -0
  140. package/dist/components/Modal/ModalBody.js +12 -11
  141. package/dist/components/Modal/ModalBody.js.map +1 -0
  142. package/dist/components/Modal/ModalContext.js +9 -8
  143. package/dist/components/Modal/ModalContext.js.map +1 -0
  144. package/dist/components/Modal/ModalFooter.js +4 -3
  145. package/dist/components/Modal/ModalFooter.js.map +1 -0
  146. package/dist/components/Modal/ModalHeader.js +23 -22
  147. package/dist/components/Modal/ModalHeader.js.map +1 -0
  148. package/dist/components/Modal/ModalSubtitle.js +4 -3
  149. package/dist/components/Modal/ModalSubtitle.js.map +1 -0
  150. package/dist/components/Popover/Popover.js +34 -33
  151. package/dist/components/Popover/Popover.js.map +1 -0
  152. package/dist/components/Radio/Radio.js +27 -26
  153. package/dist/components/Radio/Radio.js.map +1 -0
  154. package/dist/components/SearchBar/SearchBar.js +30 -29
  155. package/dist/components/SearchBar/SearchBar.js.map +1 -0
  156. package/dist/components/Select/Select.js +32 -31
  157. package/dist/components/Select/Select.js.map +1 -0
  158. package/dist/components/Select/SelectTrigger.js +5 -4
  159. package/dist/components/Select/SelectTrigger.js.map +1 -0
  160. package/dist/components/Table/TableExplorer.js +8 -7
  161. package/dist/components/Table/TableExplorer.js.map +1 -0
  162. package/dist/components/Tabs/Tabs.js +59 -58
  163. package/dist/components/Tabs/Tabs.js.map +1 -0
  164. package/dist/components/Tabs/TabsContext.js +9 -8
  165. package/dist/components/Tabs/TabsContext.js.map +1 -0
  166. package/dist/components/Tabs/TabsItem.js +21 -20
  167. package/dist/components/Tabs/TabsItem.js.map +1 -0
  168. package/dist/components/Tabs/TabsList.js +19 -18
  169. package/dist/components/Tabs/TabsList.js.map +1 -0
  170. package/dist/components/Tabs/TabsPanel.js +10 -9
  171. package/dist/components/Tabs/TabsPanel.js.map +1 -0
  172. package/dist/components/TextArea/TextArea.js +32 -31
  173. package/dist/components/TextArea/TextArea.js.map +1 -0
  174. package/dist/components/TextArea/TextareaCounter.js +7 -6
  175. package/dist/components/TextArea/TextareaCounter.js.map +1 -0
  176. package/dist/components/Toolbar/Toolbar.js +61 -60
  177. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  178. package/dist/components/Tooltip/Tooltip.js +29 -28
  179. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  180. package/dist/components/TreeView/TreeItem.js +47 -46
  181. package/dist/components/TreeView/TreeItem.js.map +1 -0
  182. package/dist/components/TreeView/TreeView.js +34 -33
  183. package/dist/components/TreeView/TreeView.js.map +1 -0
  184. package/dist/components/TreeView/hooks/useTreeItemEvents.js +19 -18
  185. package/dist/components/TreeView/hooks/useTreeItemEvents.js.map +1 -0
  186. package/dist/components/UploadCard/UploadCard.js +53 -52
  187. package/dist/components/UploadCard/UploadCard.js.map +1 -0
  188. package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -7
  189. package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
  190. package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +1 -1
  191. package/dist/core/OdeClientProvider/OdeClientProvider.js +45 -44
  192. package/dist/core/OdeClientProvider/OdeClientProvider.js.map +1 -0
  193. package/dist/core/ThemeProvider/ThemeProvider.d.ts +1 -1
  194. package/dist/core/ThemeProvider/ThemeProvider.js +36 -35
  195. package/dist/core/ThemeProvider/ThemeProvider.js.map +1 -0
  196. package/dist/core/useAvatar/useAvatar.d.ts +1 -1
  197. package/dist/core/useAvatar/useAvatar.js +22 -21
  198. package/dist/core/useAvatar/useAvatar.js.map +1 -0
  199. package/dist/core/useBookmark/useBookmark.d.ts +1 -1
  200. package/dist/core/useBookmark/useBookmark.js +10 -9
  201. package/dist/core/useBookmark/useBookmark.js.map +1 -0
  202. package/dist/core/useConf/useConf.d.ts +1 -1
  203. package/dist/core/useConf/useConf.js +8 -7
  204. package/dist/core/useConf/useConf.js.map +1 -0
  205. package/dist/core/useConversation/useConversation.js +30 -29
  206. package/dist/core/useConversation/useConversation.js.map +1 -0
  207. package/dist/core/useCookiesConsent/useCookiesConsent.js +17 -16
  208. package/dist/core/useCookiesConsent/useCookiesConsent.js.map +1 -0
  209. package/dist/core/useDate/useDate.js +36 -35
  210. package/dist/core/useDate/useDate.js.map +1 -0
  211. package/dist/core/useHasWorkflow/useHasWorkflow.js +16 -15
  212. package/dist/core/useHasWorkflow/useHasWorkflow.js.map +1 -0
  213. package/dist/core/useHeader/useHeader.d.ts +1 -1
  214. package/dist/core/useHeader/useHeader.js +42 -41
  215. package/dist/core/useHeader/useHeader.js.map +1 -0
  216. package/dist/core/useHttpErrorToast/useHttpErrorToast.js +18 -17
  217. package/dist/core/useHttpErrorToast/useHttpErrorToast.js.map +1 -0
  218. package/dist/core/useIsAdml/useIsAdml.js +12 -11
  219. package/dist/core/useIsAdml/useIsAdml.js.map +1 -0
  220. package/dist/core/useLibraryUrl/useLibraryUrl.js +17 -16
  221. package/dist/core/useLibraryUrl/useLibraryUrl.js.map +1 -0
  222. package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +1 -1
  223. package/dist/core/useMediaLibrary/useMediaLibrary.js +33 -32
  224. package/dist/core/useMediaLibrary/useMediaLibrary.js.map +1 -0
  225. package/dist/core/useOdeIcons/useOdeIcons.d.ts +1 -1
  226. package/dist/core/useOdeIcons/useOdeIcons.js +38 -37
  227. package/dist/core/useOdeIcons/useOdeIcons.js.map +1 -0
  228. package/dist/core/usePaths/usePaths.js +3 -2
  229. package/dist/core/usePaths/usePaths.js.map +1 -0
  230. package/dist/core/usePreferences/usePreferences.js +6 -5
  231. package/dist/core/usePreferences/usePreferences.js.map +1 -0
  232. package/dist/core/useResource/useResource.d.ts +1 -1
  233. package/dist/core/useResource/useResource.js +15 -14
  234. package/dist/core/useResource/useResource.js.map +1 -0
  235. package/dist/core/useResourceSearch/useResourceSearch.d.ts +1 -1
  236. package/dist/core/useResourceSearch/useResourceSearch.js +23 -22
  237. package/dist/core/useResourceSearch/useResourceSearch.js.map +1 -0
  238. package/dist/core/useSession/useSession.js +7 -6
  239. package/dist/core/useSession/useSession.js.map +1 -0
  240. package/dist/core/useTrashedResource/useTrashedResource.js +19 -18
  241. package/dist/core/useTrashedResource/useTrashedResource.js.map +1 -0
  242. package/dist/core/useUpload/useUpload.d.ts +1 -1
  243. package/dist/core/useUpload/useUpload.js +69 -68
  244. package/dist/core/useUpload/useUpload.js.map +1 -0
  245. package/dist/core/useUploadFiles/useUploadFiles.d.ts +1 -1
  246. package/dist/core/useUploadFiles/useUploadFiles.js +83 -82
  247. package/dist/core/useUploadFiles/useUploadFiles.js.map +1 -0
  248. package/dist/core/useUser/useUser.d.ts +1 -1
  249. package/dist/core/useUser/useUser.js +16 -15
  250. package/dist/core/useUser/useUser.js.map +1 -0
  251. package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +1 -1
  252. package/dist/core/useWorkspaceFile/useWorkspaceFile.js +32 -31
  253. package/dist/core/useWorkspaceFile/useWorkspaceFile.js.map +1 -0
  254. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +1 -1
  255. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +42 -41
  256. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js.map +1 -0
  257. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +18 -17
  258. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js.map +1 -0
  259. package/dist/core/useZendeskGuide/useZendeskGuide.js +47 -46
  260. package/dist/core/useZendeskGuide/useZendeskGuide.js.map +1 -0
  261. package/dist/editor.js +57 -56
  262. package/dist/editor.js.map +1 -0
  263. package/dist/hooks/useBrowserInfo/useBrowserInfo.js +12 -11
  264. package/dist/hooks/useBrowserInfo/useBrowserInfo.js.map +1 -0
  265. package/dist/hooks/useClickOutside/useClickOutside.js +19 -18
  266. package/dist/hooks/useClickOutside/useClickOutside.js.map +1 -0
  267. package/dist/hooks/useDebounce/useDebounce.js +11 -10
  268. package/dist/hooks/useDebounce/useDebounce.js.map +1 -0
  269. package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
  270. package/dist/hooks/useDropdown/useDropdown.js +97 -96
  271. package/dist/hooks/useDropdown/useDropdown.js.map +1 -0
  272. package/dist/hooks/useDropzone/useDropzone.js +54 -53
  273. package/dist/hooks/useDropzone/useDropzone.js.map +1 -0
  274. package/dist/hooks/useHover/useHover.js +15 -14
  275. package/dist/hooks/useHover/useHover.js.map +1 -0
  276. package/dist/hooks/useImage/useImage.js +14 -13
  277. package/dist/hooks/useImage/useImage.js.map +1 -0
  278. package/dist/hooks/useImageResizer/useImageResizer.js +32 -31
  279. package/dist/hooks/useImageResizer/useImageResizer.js.map +1 -0
  280. package/dist/hooks/useKeyPress/useKeyPress.js +11 -10
  281. package/dist/hooks/useKeyPress/useKeyPress.js.map +1 -0
  282. package/dist/hooks/useScrollToTop/useScrollToTop.js +5 -4
  283. package/dist/hooks/useScrollToTop/useScrollToTop.js.map +1 -0
  284. package/dist/hooks/useThumbnail/useThumbnail.js +22 -21
  285. package/dist/hooks/useThumbnail/useThumbnail.js.map +1 -0
  286. package/dist/hooks/useTitle/useTitle.js +8 -7
  287. package/dist/hooks/useTitle/useTitle.js.map +1 -0
  288. package/dist/hooks/useToast/useToast.js +26 -25
  289. package/dist/hooks/useToast/useToast.js.map +1 -0
  290. package/dist/hooks/useToggle/useToggle.js +7 -6
  291. package/dist/hooks/useToggle/useToggle.js.map +1 -0
  292. package/dist/hooks/useTrapFocus/useTrapFocus.js +12 -11
  293. package/dist/hooks/useTrapFocus/useTrapFocus.js.map +1 -0
  294. package/dist/index.js +226 -225
  295. package/dist/index.js.map +1 -0
  296. package/dist/modals.js +15 -14
  297. package/dist/modals.js.map +1 -0
  298. package/dist/modules/audience/ReactionChoice.d.ts +1 -1
  299. package/dist/modules/audience/ReactionChoice.js +25 -24
  300. package/dist/modules/audience/ReactionChoice.js.map +1 -0
  301. package/dist/modules/audience/ReactionModal.Card.d.ts +1 -1
  302. package/dist/modules/audience/ReactionModal.Card.js +26 -25
  303. package/dist/modules/audience/ReactionModal.Card.js.map +1 -0
  304. package/dist/modules/audience/ReactionModal.d.ts +1 -1
  305. package/dist/modules/audience/ReactionModal.js +59 -59
  306. package/dist/modules/audience/ReactionModal.js.map +1 -0
  307. package/dist/modules/audience/ReactionSummary.d.ts +1 -1
  308. package/dist/modules/audience/ReactionSummary.js +20 -19
  309. package/dist/modules/audience/ReactionSummary.js.map +1 -0
  310. package/dist/modules/audience/ViewsByProfileCard.d.ts +1 -1
  311. package/dist/modules/audience/ViewsByProfileCard.js +23 -22
  312. package/dist/modules/audience/ViewsByProfileCard.js.map +1 -0
  313. package/dist/modules/audience/ViewsCounter.js +15 -14
  314. package/dist/modules/audience/ViewsCounter.js.map +1 -0
  315. package/dist/modules/audience/ViewsModal.d.ts +1 -1
  316. package/dist/modules/audience/ViewsModal.js +33 -32
  317. package/dist/modules/audience/ViewsModal.js.map +1 -0
  318. package/dist/modules/audience/hooks/useReactionIcons.d.ts +1 -1
  319. package/dist/modules/audience/hooks/useReactionIcons.js +14 -13
  320. package/dist/modules/audience/hooks/useReactionIcons.js.map +1 -0
  321. package/dist/modules/audience/hooks/useReactions.d.ts +3 -3
  322. package/dist/modules/audience/hooks/useReactions.js +25 -24
  323. package/dist/modules/audience/hooks/useReactions.js.map +1 -0
  324. package/dist/modules/audience/hooks/useViews.d.ts +2 -2
  325. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +60 -59
  326. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js.map +1 -0
  327. package/dist/modules/editor/components/Editor/Editor.d.ts +1 -1
  328. package/dist/modules/editor/components/Editor/Editor.js +71 -70
  329. package/dist/modules/editor/components/Editor/Editor.js.map +1 -0
  330. package/dist/modules/editor/components/Editor/MathsModal.d.ts +0 -1
  331. package/dist/modules/editor/components/Editor/MathsModal.js +38 -37
  332. package/dist/modules/editor/components/Editor/MathsModal.js.map +1 -0
  333. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +15 -14
  334. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js.map +1 -0
  335. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +38 -37
  336. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js.map +1 -0
  337. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +34 -33
  338. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js.map +1 -0
  339. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +13 -12
  340. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js.map +1 -0
  341. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +37 -36
  342. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js.map +1 -0
  343. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +36 -35
  344. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js.map +1 -0
  345. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +31 -30
  346. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js.map +1 -0
  347. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +96 -95
  348. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js.map +1 -0
  349. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +7 -6
  350. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js.map +1 -0
  351. package/dist/modules/editor/components/NodeView/AudioNodeView.js +7 -6
  352. package/dist/modules/editor/components/NodeView/AudioNodeView.js.map +1 -0
  353. package/dist/modules/editor/components/NodeView/ImageNodeView.js +7 -6
  354. package/dist/modules/editor/components/NodeView/ImageNodeView.js.map +1 -0
  355. package/dist/modules/editor/components/NodeView/LinkerNodeView.js +7 -6
  356. package/dist/modules/editor/components/NodeView/LinkerNodeView.js.map +1 -0
  357. package/dist/modules/editor/components/NodeView/VideoNodeView.js +7 -6
  358. package/dist/modules/editor/components/NodeView/VideoNodeView.js.map +1 -0
  359. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +25 -24
  360. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js.map +1 -0
  361. package/dist/modules/editor/components/Renderer/AudioRenderer.js +8 -7
  362. package/dist/modules/editor/components/Renderer/AudioRenderer.js.map +1 -0
  363. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +27 -26
  364. package/dist/modules/editor/components/Renderer/LinkerRenderer.js.map +1 -0
  365. package/dist/modules/editor/components/Renderer/MediaRenderer.js +38 -37
  366. package/dist/modules/editor/components/Renderer/MediaRenderer.js.map +1 -0
  367. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +3 -2
  368. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js.map +1 -0
  369. package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +1 -1
  370. package/dist/modules/editor/components/Toolbar/LinkToolbar.js +33 -32
  371. package/dist/modules/editor/components/Toolbar/LinkToolbar.js.map +1 -0
  372. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +22 -21
  373. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js.map +1 -0
  374. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +31 -30
  375. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js.map +1 -0
  376. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +21 -20
  377. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js.map +1 -0
  378. package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +1 -1
  379. package/dist/modules/editor/components/Toolbar/TableToolbar.js +42 -41
  380. package/dist/modules/editor/components/Toolbar/TableToolbar.js.map +1 -0
  381. package/dist/modules/editor/hooks/useActionOptions.js +48 -47
  382. package/dist/modules/editor/hooks/useActionOptions.js.map +1 -0
  383. package/dist/modules/editor/hooks/useCommentEditor.js +28 -27
  384. package/dist/modules/editor/hooks/useCommentEditor.js.map +1 -0
  385. package/dist/modules/editor/hooks/useEditorContext.js +9 -8
  386. package/dist/modules/editor/hooks/useEditorContext.js.map +1 -0
  387. package/dist/modules/editor/hooks/useImageModal.d.ts +1 -1
  388. package/dist/modules/editor/hooks/useImageModal.js +33 -32
  389. package/dist/modules/editor/hooks/useImageModal.js.map +1 -0
  390. package/dist/modules/editor/hooks/useImageSelection.js +32 -31
  391. package/dist/modules/editor/hooks/useImageSelection.js.map +1 -0
  392. package/dist/modules/editor/hooks/useLinkToolbar.js +25 -24
  393. package/dist/modules/editor/hooks/useLinkToolbar.js.map +1 -0
  394. package/dist/modules/editor/hooks/useMathsModal.js +10 -9
  395. package/dist/modules/editor/hooks/useMathsModal.js.map +1 -0
  396. package/dist/modules/editor/hooks/useMathsStyles.js +14 -13
  397. package/dist/modules/editor/hooks/useMathsStyles.js.map +1 -0
  398. package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +1 -1
  399. package/dist/modules/editor/hooks/useMediaLibraryEditor.js +97 -96
  400. package/dist/modules/editor/hooks/useMediaLibraryEditor.js.map +1 -0
  401. package/dist/modules/editor/hooks/useResizeMedia.js +32 -31
  402. package/dist/modules/editor/hooks/useResizeMedia.js.map +1 -0
  403. package/dist/modules/editor/hooks/useSpeechRecognition.js +13 -12
  404. package/dist/modules/editor/hooks/useSpeechRecognition.js.map +1 -0
  405. package/dist/modules/editor/hooks/useSpeechSynthetisis.js +14 -13
  406. package/dist/modules/editor/hooks/useSpeechSynthetisis.js.map +1 -0
  407. package/dist/modules/editor/hooks/useTipTapEditor.js +58 -57
  408. package/dist/modules/editor/hooks/useTipTapEditor.js.map +1 -0
  409. package/dist/modules/editor/utils/has-extension.js +3 -2
  410. package/dist/modules/editor/utils/has-extension.js.map +1 -0
  411. package/dist/modules/editor/utils/has-mark.js +3 -2
  412. package/dist/modules/editor/utils/has-mark.js.map +1 -0
  413. package/dist/modules/editor/utils/has-text-style.js +4 -3
  414. package/dist/modules/editor/utils/has-text-style.js.map +1 -0
  415. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +0 -1
  416. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +50 -49
  417. package/dist/modules/modals/OnboardingModal/OnboardingModal.js.map +1 -0
  418. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +19 -18
  419. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js.map +1 -0
  420. package/dist/modules/modals/PublishModal/PublishModal.d.ts +1 -1
  421. package/dist/modules/modals/PublishModal/PublishModal.js +98 -97
  422. package/dist/modules/modals/PublishModal/PublishModal.js.map +1 -0
  423. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +20 -19
  424. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js.map +1 -0
  425. package/dist/modules/modals/PublishModal/components/AgeSelect.js +15 -14
  426. package/dist/modules/modals/PublishModal/components/AgeSelect.js.map +1 -0
  427. package/dist/modules/modals/PublishModal/components/LangSelect.js +12 -11
  428. package/dist/modules/modals/PublishModal/components/LangSelect.js.map +1 -0
  429. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +17 -16
  430. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js.map +1 -0
  431. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +20 -19
  432. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js.map +1 -0
  433. package/dist/modules/modals/PublishModal/components/ToastError.js +18 -17
  434. package/dist/modules/modals/PublishModal/components/ToastError.js.map +1 -0
  435. package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +1 -1
  436. package/dist/modules/modals/PublishModal/components/ToastSuccess.js +13 -12
  437. package/dist/modules/modals/PublishModal/components/ToastSuccess.js.map +1 -0
  438. package/dist/modules/modals/PublishModal/constants/ageOptions.js +3 -2
  439. package/dist/modules/modals/PublishModal/constants/ageOptions.js.map +1 -0
  440. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +5 -4
  441. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js.map +1 -0
  442. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +17 -16
  443. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js.map +1 -0
  444. package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +1 -1
  445. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +80 -79
  446. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js.map +1 -0
  447. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +42 -41
  448. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js.map +1 -0
  449. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  450. package/dist/modules/modals/ResourceModal/ResourceModal.js +116 -115
  451. package/dist/modules/modals/ResourceModal/ResourceModal.js.map +1 -0
  452. package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +1 -1
  453. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +48 -47
  454. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js.map +1 -0
  455. package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +1 -1
  456. package/dist/modules/modals/ResourceModal/hooks/useSlug.js +33 -32
  457. package/dist/modules/modals/ResourceModal/hooks/useSlug.js.map +1 -0
  458. package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +1 -1
  459. package/dist/modules/modals/ResourceModal/hooks/useThumb.js +13 -12
  460. package/dist/modules/modals/ResourceModal/hooks/useThumb.js.map +1 -0
  461. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  462. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +11 -10
  463. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js.map +1 -0
  464. package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +1 -1
  465. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
  466. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  467. package/dist/modules/modals/ShareModal/apps/ShareBlog.js +34 -33
  468. package/dist/modules/modals/ShareModal/apps/ShareBlog.js.map +1 -0
  469. package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +1 -1
  470. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +1 -1
  471. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
  472. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  473. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +13 -12
  474. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js.map +1 -0
  475. package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +1 -1
  476. package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +1 -1
  477. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +1 -1
  478. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +44 -43
  479. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js.map +1 -0
  480. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +19 -18
  481. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js.map +1 -0
  482. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +1 -1
  483. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +158 -157
  484. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js.map +1 -0
  485. package/dist/modules/multimedia/Embed/Embed.js +23 -22
  486. package/dist/modules/multimedia/Embed/Embed.js.map +1 -0
  487. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +80 -79
  488. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js.map +1 -0
  489. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +38 -37
  490. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js.map +1 -0
  491. package/dist/modules/multimedia/ImageEditor/effects/blur.js +50 -49
  492. package/dist/modules/multimedia/ImageEditor/effects/blur.js.map +1 -0
  493. package/dist/modules/multimedia/ImageEditor/effects/crop.js +100 -99
  494. package/dist/modules/multimedia/ImageEditor/effects/crop.js.map +1 -0
  495. package/dist/modules/multimedia/ImageEditor/effects/misc.js +108 -107
  496. package/dist/modules/multimedia/ImageEditor/effects/misc.js.map +1 -0
  497. package/dist/modules/multimedia/ImageEditor/effects/resize.js +97 -96
  498. package/dist/modules/multimedia/ImageEditor/effects/resize.js.map +1 -0
  499. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +26 -25
  500. package/dist/modules/multimedia/ImageEditor/effects/rotate.js.map +1 -0
  501. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +56 -57
  502. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js.map +1 -0
  503. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +57 -56
  504. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js.map +1 -0
  505. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +29 -28
  506. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js.map +1 -0
  507. package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +10 -9
  508. package/dist/modules/multimedia/ImageEditor/utils/aggregate.js.map +1 -0
  509. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +1 -1
  510. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +34 -33
  511. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js.map +1 -0
  512. package/dist/modules/multimedia/Linker/ExternalLinker.js +37 -36
  513. package/dist/modules/multimedia/Linker/ExternalLinker.js.map +1 -0
  514. package/dist/modules/multimedia/Linker/InternalLinker.d.ts +1 -1
  515. package/dist/modules/multimedia/Linker/InternalLinker.js +89 -88
  516. package/dist/modules/multimedia/Linker/InternalLinker.js.map +1 -0
  517. package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +1 -1
  518. package/dist/modules/multimedia/LinkerCard/LinkerCard.js +32 -31
  519. package/dist/modules/multimedia/LinkerCard/LinkerCard.js.map +1 -0
  520. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +1 -1
  521. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +119 -118
  522. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js.map +1 -0
  523. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +2 -2
  524. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +9 -8
  525. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js.map +1 -0
  526. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +16 -15
  527. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js.map +1 -0
  528. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +13 -12
  529. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js.map +1 -0
  530. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +10 -9
  531. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js.map +1 -0
  532. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +1 -1
  533. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +29 -28
  534. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js.map +1 -0
  535. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +23 -22
  536. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js.map +1 -0
  537. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +18 -17
  538. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js.map +1 -0
  539. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +10 -9
  540. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js.map +1 -0
  541. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +17 -16
  542. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js.map +1 -0
  543. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +19 -18
  544. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js.map +1 -0
  545. package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +1 -1
  546. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +42 -41
  547. package/dist/modules/multimedia/UploadFiles/UploadFiles.js.map +1 -0
  548. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +60 -59
  549. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js.map +1 -0
  550. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +1 -1
  551. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +154 -153
  552. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js.map +1 -0
  553. package/dist/modules/multimedia/Workspace/Workspace.d.ts +1 -1
  554. package/dist/modules/multimedia/Workspace/Workspace.js +113 -112
  555. package/dist/modules/multimedia/Workspace/Workspace.js.map +1 -0
  556. package/dist/multimedia.js +19 -18
  557. package/dist/multimedia.js.map +1 -0
  558. package/dist/portal/Header/Badge.js +6 -5
  559. package/dist/portal/Header/Badge.js.map +1 -0
  560. package/dist/portal/Header/Header.js +138 -137
  561. package/dist/portal/Header/Header.js.map +1 -0
  562. package/dist/portal/Header/NavItem.js +12 -11
  563. package/dist/portal/Header/NavItem.js.map +1 -0
  564. package/dist/portal/Header/NavLink.js +15 -14
  565. package/dist/portal/Header/NavLink.js.map +1 -0
  566. package/dist/portal/Header/Navbar.js +10 -9
  567. package/dist/portal/Header/Navbar.js.map +1 -0
  568. package/dist/portal/Header/NavbarNav.js +10 -9
  569. package/dist/portal/Header/NavbarNav.js.map +1 -0
  570. package/dist/portal/Header/WidgetApps.d.ts +1 -1
  571. package/dist/portal/Header/WidgetApps.js +17 -16
  572. package/dist/portal/Header/WidgetApps.js.map +1 -0
  573. package/dist/portal/Help/Help.d.ts +0 -1
  574. package/dist/portal/Help/Help.js +19 -18
  575. package/dist/portal/Help/Help.js.map +1 -0
  576. package/dist/portal/Help/hooks/useHelp.js +64 -63
  577. package/dist/portal/Help/hooks/useHelp.js.map +1 -0
  578. package/dist/portal/Layout/Layout.js +36 -35
  579. package/dist/portal/Layout/Layout.js.map +1 -0
  580. package/dist/portal/SearchEngine/SearchEngine.js +26 -25
  581. package/dist/portal/SearchEngine/SearchEngine.js.map +1 -0
  582. package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +1 -1
  583. package/dist/utils/MockedDataProvider/MockedDataProvider.js +22 -21
  584. package/dist/utils/MockedDataProvider/MockedDataProvider.js.map +1 -0
  585. package/dist/utils/StringUtils.js +9 -8
  586. package/dist/utils/StringUtils.js.map +1 -0
  587. package/dist/utils/addTimestampToUrl.js +5 -4
  588. package/dist/utils/addTimestampToUrl.js.map +1 -0
  589. package/dist/utils/blob.js +10 -9
  590. package/dist/utils/blob.js.map +1 -0
  591. package/dist/utils/checkUserRight.d.ts +1 -1
  592. package/dist/utils/checkUserRight.js +28 -27
  593. package/dist/utils/checkUserRight.js.map +1 -0
  594. package/dist/utils/fileSize.js +6 -5
  595. package/dist/utils/fileSize.js.map +1 -0
  596. package/dist/utils/findTreeNode.js +8 -7
  597. package/dist/utils/findTreeNode.js.map +1 -0
  598. package/dist/utils/isActionAvailable.d.ts +1 -1
  599. package/dist/utils/isActionAvailable.js +5 -4
  600. package/dist/utils/isActionAvailable.js.map +1 -0
  601. package/dist/utils/libraryMaps.js +3 -2
  602. package/dist/utils/libraryMaps.js.map +1 -0
  603. package/dist/utils/noop.js +3 -2
  604. package/dist/utils/noop.js.map +1 -0
  605. package/dist/utils/ref.js +9 -8
  606. package/dist/utils/ref.js.map +1 -0
  607. package/dist/utils/thumbnail.js +4 -3
  608. package/dist/utils/thumbnail.js.map +1 -0
  609. package/dist/utils/time.js +8 -7
  610. package/dist/utils/time.js.map +1 -0
  611. package/dist/utils/treeview.d.ts +1 -1
  612. package/dist/utils/treeview.js +97 -96
  613. package/dist/utils/treeview.js.map +1 -0
  614. package/dist/utils/video.js +3 -2
  615. package/dist/utils/video.js.map +1 -0
  616. package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +1 -1
  617. package/dist/widgets/BookmarkedApps/BookmarkedApps.js +7 -6
  618. package/dist/widgets/BookmarkedApps/BookmarkedApps.js.map +1 -0
  619. package/dist/widgets/Widget/Widget.js +19 -18
  620. package/dist/widgets/Widget/Widget.js.map +1 -0
  621. package/package.json +19 -28
@@ -1,155 +1,156 @@
1
- import * as PIXI from "pixi.js";
2
- import { getApplicationScale } from "./misc.js";
3
- const CORNERS = ["TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT"], PADDING = 0, POINT_RADIUS = 20, CROP_BACKGROUND_NAME = "CROP_BACKGROUND_NAME", CROP_MASK_NAME = "CROP_MASK_NAME";
4
- function getCornerName(corner) {
5
- return "CROP_CORNER_" + corner;
1
+ import * as d from "pixi.js";
2
+ import { getApplicationScale as _ } from "./misc.js";
3
+ const B = ["TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT"], u = 0, R = 20, y = "CROP_BACKGROUND_NAME", a = "CROP_MASK_NAME";
4
+ function x(e) {
5
+ return "CROP_CORNER_" + e;
6
6
  }
7
- function drawBackground(application, {
8
- spriteName
7
+ function v(e, {
8
+ spriteName: t
9
9
  }) {
10
- removeBackground(application);
11
- const sprite = application.stage.getChildByName(spriteName);
12
- if (sprite == null) return;
13
- const spriteBounds = sprite.getBounds(), stageTexture = application.renderer.generateTexture(application.stage).clone(), clonedStage = new PIXI.Sprite(stageTexture);
14
- clonedStage.height = spriteBounds.height, clonedStage.width = spriteBounds.width, clonedStage.position = new PIXI.Point(0, 0);
15
- const background = new PIXI.Graphics();
16
- background.beginFill(16777215, 0.5), background.drawRect(0, 0, spriteBounds.width, spriteBounds.height), background.endFill(), background.name = CROP_BACKGROUND_NAME, background.position = new PIXI.Point(spriteBounds.x, spriteBounds.y);
17
- const rectMask = new PIXI.Graphics();
18
- rectMask.beginFill(0, 1), rectMask.drawRect(0, 0, spriteBounds.width - 2 * PADDING, spriteBounds.height - 2 * PADDING), rectMask.endFill(), rectMask.position = new PIXI.Point(PADDING, PADDING), rectMask.name = CROP_MASK_NAME, clonedStage.mask = rectMask, application.stage.addChild(background), background.addChild(rectMask), background.addChild(clonedStage);
10
+ P(e);
11
+ const r = e.stage.getChildByName(t);
12
+ if (r == null) return;
13
+ const n = r.getBounds(), i = e.renderer.generateTexture(e.stage).clone(), s = new d.Sprite(i);
14
+ s.height = n.height, s.width = n.width, s.position = new d.Point(0, 0);
15
+ const o = new d.Graphics();
16
+ o.beginFill(16777215, 0.5), o.drawRect(0, 0, n.width, n.height), o.endFill(), o.name = y, o.position = new d.Point(n.x, n.y);
17
+ const g = new d.Graphics();
18
+ g.beginFill(0, 1), g.drawRect(0, 0, n.width - 2 * u, n.height - 2 * u), g.endFill(), g.position = new d.Point(u, u), g.name = a, s.mask = g, e.stage.addChild(o), o.addChild(g), o.addChild(s);
19
19
  }
20
- function removeBackground(application) {
21
- const child = application.stage.getChildByName(CROP_BACKGROUND_NAME, !0);
22
- child == null || child.removeFromParent();
20
+ function P(e) {
21
+ const t = e.stage.getChildByName(y, !0);
22
+ t == null || t.removeFromParent();
23
23
  }
24
- function computeCornerPosition(cornerType, bounds) {
25
- switch (cornerType) {
24
+ function f(e, t) {
25
+ switch (e) {
26
26
  case "TOP_LEFT":
27
27
  return {
28
- x: bounds.x,
29
- y: bounds.y,
28
+ x: t.x,
29
+ y: t.y,
30
30
  start: 0,
31
31
  end: Math.PI / 2
32
32
  };
33
33
  case "TOP_RIGHT":
34
34
  return {
35
- x: bounds.x + bounds.width,
36
- y: bounds.y,
35
+ x: t.x + t.width,
36
+ y: t.y,
37
37
  start: Math.PI / 2,
38
38
  end: Math.PI
39
39
  };
40
40
  case "BOTTOM_LEFT":
41
41
  return {
42
- x: bounds.x,
43
- y: bounds.y + bounds.height,
42
+ x: t.x,
43
+ y: t.y + t.height,
44
44
  start: 3 * Math.PI / 2,
45
45
  end: 2 * Math.PI
46
46
  };
47
47
  case "BOTTOM_RIGHT":
48
48
  return {
49
- x: bounds.x + bounds.width,
50
- y: bounds.y + bounds.height,
49
+ x: t.x + t.width,
50
+ y: t.y + t.height,
51
51
  start: Math.PI,
52
52
  end: 3 * Math.PI / 2
53
53
  };
54
54
  }
55
55
  }
56
- function refreshCorners(application) {
57
- const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
58
- mask != null && CORNERS.forEach((cornerType) => {
59
- const corner = application.stage.getChildByName(getCornerName(cornerType), !0);
60
- if (corner == null) return;
61
- const position = computeCornerPosition(cornerType, {
62
- height: mask.height,
63
- width: mask.width,
64
- x: mask.x,
65
- y: mask.y
56
+ function I(e) {
57
+ const t = e.stage.getChildByName(a, !0);
58
+ t != null && B.forEach((r) => {
59
+ const n = e.stage.getChildByName(x(r), !0);
60
+ if (n == null) return;
61
+ const i = f(r, {
62
+ height: t.height,
63
+ width: t.width,
64
+ x: t.x,
65
+ y: t.y
66
66
  });
67
- corner.position = new PIXI.Point(position.x, position.y);
67
+ n.position = new d.Point(i.x, i.y);
68
68
  });
69
69
  }
70
- function drawCorner(application, cornerType, {
71
- spriteName
70
+ function l(e, t, {
71
+ spriteName: r
72
72
  }) {
73
- const previous = application.stage.getChildByName(getCornerName(cornerType), !0), scale = getApplicationScale(application);
74
- previous == null || previous.removeFromParent();
75
- const background = application.stage.getChildByName(CROP_BACKGROUND_NAME, !0), mask = application.stage.getChildByName(CROP_MASK_NAME, !0), sprite = application.stage.getChildByName(spriteName);
76
- if (sprite == null || background === null || background === void 0 || mask === void 0 || mask === null)
73
+ const n = e.stage.getChildByName(x(t), !0), i = _(e);
74
+ n == null || n.removeFromParent();
75
+ const s = e.stage.getChildByName(y, !0), o = e.stage.getChildByName(a, !0), g = e.stage.getChildByName(r);
76
+ if (g == null || s === null || s === void 0 || o === void 0 || o === null)
77
77
  return;
78
- const position = computeCornerPosition(cornerType, {
79
- height: mask.height,
80
- width: mask.width,
81
- x: mask.x,
82
- y: mask.y
83
- }), corner = new PIXI.Graphics();
84
- corner.beginFill(4960213, 1), corner.arc(0, 0, POINT_RADIUS / scale, position.start, position.end), corner.lineTo(0, 0), corner.endFill(), corner.position = new PIXI.Point(position.x, position.y), corner.name = getCornerName(cornerType), corner.interactive = !0;
85
- let enable = !1;
86
- application.stage.on("pointermove", (event) => {
87
- if (enable === !1) return;
88
- const localPosition = background.toLocal(event.global);
89
- corner.position.x = localPosition.x, corner.position.y = localPosition.y, moveMask(application, cornerType, localPosition);
78
+ const c = f(t, {
79
+ height: o.height,
80
+ width: o.width,
81
+ x: o.x,
82
+ y: o.y
83
+ }), h = new d.Graphics();
84
+ h.beginFill(4960213, 1), h.arc(0, 0, R / i, c.start, c.end), h.lineTo(0, 0), h.endFill(), h.position = new d.Point(c.x, c.y), h.name = x(t), h.interactive = !0;
85
+ let T = !1;
86
+ e.stage.on("pointermove", (M) => {
87
+ if (T === !1) return;
88
+ const w = s.toLocal(M.global);
89
+ h.position.x = w.x, h.position.y = w.y, E(e, t, w);
90
90
  });
91
- const handlePointerDown = () => {
92
- enable = !0;
91
+ const C = () => {
92
+ T = !0;
93
93
  };
94
- corner.on("pointerdown", handlePointerDown);
95
- const handlePointerUp = () => {
96
- enable = !1;
94
+ h.on("pointerdown", C);
95
+ const O = () => {
96
+ T = !1;
97
97
  };
98
- globalThis.addEventListener("pointerup", handlePointerUp), corner.once("destroyed", () => {
99
- corner.off("pointerdown"), globalThis.removeEventListener("pointerup", handlePointerUp);
100
- }), background.addChild(corner);
98
+ globalThis.addEventListener("pointerup", O), h.once("destroyed", () => {
99
+ h.off("pointerdown"), globalThis.removeEventListener("pointerup", O);
100
+ }), s.addChild(h);
101
101
  }
102
- function moveMask(application, cornerType, position) {
103
- const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
104
- if (mask == null) return;
105
- const right = mask.position.x + mask.width, bottom = mask.position.y + mask.height;
106
- switch (cornerType) {
102
+ function E(e, t, r) {
103
+ const n = e.stage.getChildByName(a, !0);
104
+ if (n == null) return;
105
+ const i = n.position.x + n.width, s = n.position.y + n.height;
106
+ switch (t) {
107
107
  case "TOP_LEFT": {
108
- mask.position.x = position.x, mask.position.y = position.y, mask.width = right - position.x, mask.height = bottom - position.y;
108
+ n.position.x = r.x, n.position.y = r.y, n.width = i - r.x, n.height = s - r.y;
109
109
  break;
110
110
  }
111
111
  case "TOP_RIGHT": {
112
- mask.position.y = position.y, mask.width = position.x - mask.position.x, mask.height = bottom - position.y;
112
+ n.position.y = r.y, n.width = r.x - n.position.x, n.height = s - r.y;
113
113
  break;
114
114
  }
115
115
  case "BOTTOM_LEFT": {
116
- mask.position.x = position.x, mask.width = right - position.x, mask.height = position.y - mask.position.y;
116
+ n.position.x = r.x, n.width = i - r.x, n.height = r.y - n.position.y;
117
117
  break;
118
118
  }
119
119
  case "BOTTOM_RIGHT": {
120
- mask.width = position.x - mask.position.x, mask.height = position.y - mask.position.y;
120
+ n.width = r.x - n.position.x, n.height = r.y - n.position.y;
121
121
  break;
122
122
  }
123
123
  }
124
- refreshCorners(application);
124
+ I(e);
125
125
  }
126
- function start(application, {
127
- spriteName
126
+ function k(e, {
127
+ spriteName: t
128
128
  }) {
129
- stop(application), application.stage.interactive = !0, application.stage.interactiveChildren = !0, drawBackground(application, {
130
- spriteName
131
- }), drawCorner(application, "BOTTOM_LEFT", {
132
- spriteName
133
- }), drawCorner(application, "BOTTOM_RIGHT", {
134
- spriteName
135
- }), drawCorner(application, "TOP_LEFT", {
136
- spriteName
137
- }), drawCorner(application, "TOP_RIGHT", {
138
- spriteName
129
+ m(e), e.stage.interactive = !0, e.stage.interactiveChildren = !0, v(e, {
130
+ spriteName: t
131
+ }), l(e, "BOTTOM_LEFT", {
132
+ spriteName: t
133
+ }), l(e, "BOTTOM_RIGHT", {
134
+ spriteName: t
135
+ }), l(e, "TOP_LEFT", {
136
+ spriteName: t
137
+ }), l(e, "TOP_RIGHT", {
138
+ spriteName: t
139
139
  });
140
140
  }
141
- function stop(application) {
142
- removeBackground(application), application.stage.off("pointermove"), application.render();
141
+ function m(e) {
142
+ P(e), e.stage.off("pointermove"), e.render();
143
143
  }
144
- function save(application) {
145
- const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
146
- if (mask == null) return;
147
- stop(application);
148
- const stageTexture = application.renderer.generateTexture(application.stage).clone(), clonedStage = new PIXI.Sprite(stageTexture), maskBounds = mask.getBounds(), bounds = new PIXI.Rectangle(Math.floor(maskBounds.x), Math.floor(maskBounds.y), Math.floor(maskBounds.width), Math.floor(maskBounds.height)), cropped = new PIXI.Texture(clonedStage.texture.baseTexture, bounds);
149
- return new PIXI.Sprite(cropped);
144
+ function F(e) {
145
+ const t = e.stage.getChildByName(a, !0);
146
+ if (t == null) return;
147
+ m(e);
148
+ const r = e.renderer.generateTexture(e.stage).clone(), n = new d.Sprite(r), i = t.getBounds(), s = new d.Rectangle(Math.floor(i.x), Math.floor(i.y), Math.floor(i.width), Math.floor(i.height)), o = new d.Texture(n.texture.baseTexture, s);
149
+ return new d.Sprite(o);
150
150
  }
151
151
  export {
152
- save,
153
- start,
154
- stop
152
+ F as save,
153
+ k as start,
154
+ m as stop
155
155
  };
156
+ //# sourceMappingURL=crop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crop.js","sources":["../../../../../src/modules/multimedia/ImageEditor/effects/crop.ts"],"sourcesContent":["import * as PIXI from 'pixi.js';\n\nimport { getApplicationScale } from './misc';\n\n//\n// Global constants used for crop effects\n//\n\n// Union type to identify corners\nexport type CornerType =\n | 'TOP_LEFT'\n | 'TOP_RIGHT'\n | 'BOTTOM_LEFT'\n | 'BOTTOM_RIGHT';\n// List of available corners\nconst CORNERS: Array<CornerType> = [\n 'TOP_LEFT',\n 'TOP_RIGHT',\n 'BOTTOM_LEFT',\n 'BOTTOM_RIGHT',\n];\n// Define initial padding (pixel) between anchors and image corners\nconst PADDING = 0;\n// Define the radius (pixel) of the corner control\nconst POINT_RADIUS = 20;\n// Define the name of the background backdrop applied while we are cropping\nconst CROP_BACKGROUND_NAME = 'CROP_BACKGROUND_NAME';\n// Define the name of the mask (crop) applied to the final image\nconst CROP_MASK_NAME = 'CROP_MASK_NAME';\n\n//\n// Implementation\n//\n\n/**\n * This function generate names for corner objects\n * @param corner COrnerType identifying one corner\n * @returns A name identifying the corner object\n */\nfunction getCornerName(corner: CornerType) {\n return 'CROP_CORNER_' + corner;\n}\n/**\n * This function draw background having:\n * - a backdrop with 0.5 opacity over the initial image\n * - a duplicate texture of the initial stage\n * - a rectangle/mask applied to the cloned texture\n *\n * If the sprite does not exists in this context this function do nothing\n *\n * @param application The PIXI.Application context\n * @param {spriteName:string} {spriteName} The name of the sprite in the context\n */\nfunction drawBackground(\n application: PIXI.Application,\n { spriteName }: { spriteName: string },\n): void {\n removeBackground(application);\n const sprite = application.stage.getChildByName(\n spriteName,\n ) as PIXI.Sprite | null;\n if (sprite === null || sprite === undefined) return;\n const spriteBounds = sprite.getBounds();\n // Clone the stage\n const stageTexture = application.renderer\n .generateTexture(application.stage)\n .clone();\n const clonedStage = new PIXI.Sprite(stageTexture);\n clonedStage.height = spriteBounds.height;\n clonedStage.width = spriteBounds.width;\n clonedStage.position = new PIXI.Point(0, 0);\n // Draw the background\n const background = new PIXI.Graphics();\n background.beginFill(0xffffff, 0.5);\n background.drawRect(0, 0, spriteBounds.width, spriteBounds.height);\n background.endFill();\n background.name = CROP_BACKGROUND_NAME;\n background.position = new PIXI.Point(spriteBounds.x, spriteBounds.y);\n // Draw the mask to apply to the cloned stage\n const rectMask = new PIXI.Graphics();\n rectMask.beginFill(0x000000, 1);\n rectMask.drawRect(\n 0,\n 0,\n spriteBounds.width - 2 * PADDING,\n spriteBounds.height - 2 * PADDING,\n );\n rectMask.endFill();\n rectMask.position = new PIXI.Point(PADDING, PADDING);\n rectMask.name = CROP_MASK_NAME;\n // Apply the mask to the cloned stage and add children\n clonedStage.mask = rectMask;\n application.stage.addChild(background);\n background.addChild(rectMask);\n background.addChild(clonedStage);\n}\n/**\n * This function remove the background with all his children (corners, backdrop and cloned stage)\n * If the background does not exists this function do nothing\n *\n * @param application The PIXI.Application context\n */\nfunction removeBackground(application: PIXI.Application): void {\n const child = application.stage.getChildByName(CROP_BACKGROUND_NAME, true);\n child?.removeFromParent();\n}\n/**\n * This function compute coordinate (x,y) and angles (start,end) of a corner according to the CornerType\n * - (x,y) are coordinate of the corner in pixel relative to the parent\n * - (start, end) are angles between 0 and 2PI used to draw the corner relative using the Arc tool\n *\n * @param cornerType a CornerType for which we want to compute angles and coordinates\n * @param bounds bounds of the Cropped Texture (which is also the parent of the corner)\n * @returns the coordinates and the angles\n */\nfunction computeCornerPosition(\n cornerType: CornerType,\n bounds: { x: number; y: number; width: number; height: number },\n): { x: number; y: number; start: number; end: number } {\n switch (cornerType) {\n case 'TOP_LEFT': {\n return { x: bounds.x, y: bounds.y, start: 0, end: Math.PI / 2 };\n }\n case 'TOP_RIGHT': {\n return {\n x: bounds.x + bounds.width,\n y: bounds.y,\n start: Math.PI / 2,\n end: Math.PI,\n };\n }\n case 'BOTTOM_LEFT': {\n return {\n x: bounds.x,\n y: bounds.y + bounds.height,\n start: (3 * Math.PI) / 2,\n end: 2 * Math.PI,\n };\n }\n case 'BOTTOM_RIGHT': {\n return {\n x: bounds.x + bounds.width,\n y: bounds.y + bounds.height,\n start: Math.PI,\n end: (3 * Math.PI) / 2,\n };\n }\n }\n}\n/**\n * This function reposition all corners according the bounds of the mask\n * If the mask has not been found in this context this function do nothing\n *\n * @param application The PIXI.Application context\n */\nfunction refreshCorners(application: PIXI.Application): void {\n const mask = application.stage.getChildByName(\n CROP_MASK_NAME,\n true,\n ) as PIXI.Graphics | null;\n if (mask === undefined || mask === null) return;\n CORNERS.forEach((cornerType) => {\n const corner = application.stage.getChildByName(\n getCornerName(cornerType),\n true,\n );\n if (corner === undefined || corner === null) return;\n const position = computeCornerPosition(cornerType, {\n height: mask.height,\n width: mask.width,\n x: mask.x,\n y: mask.y,\n });\n corner.position = new PIXI.Point(position.x, position.y);\n });\n}\n/**\n * This function draw one corner according to his type.\n * It also binds mouse events to move mask according when the corner move\n *\n * @param application The PIXI.Application context\n * @param cornerType The cornerType identifying the corner we are drawing\n * @param { spriteName:string } {spriteName} The sprite name identifying the original image\n */\nfunction drawCorner(\n application: PIXI.Application,\n cornerType: CornerType,\n { spriteName }: { spriteName: string },\n): void {\n // Delete corner if exists before redrawing\n const previous = application.stage.getChildByName(\n getCornerName(cornerType),\n true,\n );\n const scale = getApplicationScale(application);\n previous?.removeFromParent();\n // Search for background\n const background = application.stage.getChildByName(\n CROP_BACKGROUND_NAME,\n true,\n ) as PIXI.Graphics | null;\n // Search for mask\n const mask = application.stage.getChildByName(\n CROP_MASK_NAME,\n true,\n ) as PIXI.Graphics | null;\n // Search for sprite\n const sprite = application.stage.getChildByName(\n spriteName,\n ) as PIXI.Sprite | null;\n if (\n sprite === null ||\n sprite === undefined ||\n background === null ||\n background === undefined ||\n mask === undefined ||\n mask === null\n ) {\n return;\n }\n // Compute corner position\n const position = computeCornerPosition(cornerType, {\n height: mask.height,\n width: mask.width,\n x: mask.x,\n y: mask.y,\n });\n //Draw corner\n const corner = new PIXI.Graphics();\n corner.beginFill(0x4bafd5, 1);\n corner.arc(0, 0, POINT_RADIUS / scale, position.start, position.end);\n corner.lineTo(0, 0);\n corner.endFill();\n corner.position = new PIXI.Point(position.x, position.y);\n corner.name = getCornerName(cornerType);\n corner.interactive = true;\n // Add mouse event move => on corner move redraw mask\n let enable = false;\n application.stage.on('pointermove', (event: PIXI.FederatedMouseEvent) => {\n if (enable === false) return;\n const localPosition = background.toLocal(event.global);\n corner.position.x = localPosition.x;\n corner.position.y = localPosition.y;\n moveMask(application, cornerType, localPosition);\n });\n // Add mouse down event => on pointer down start moving mask\n const handlePointerDown = () => {\n enable = true;\n };\n corner.on('pointerdown', handlePointerDown);\n // Add mouse up event => on pointer down stop moving mask\n const handlePointerUp = () => {\n enable = false;\n };\n globalThis.addEventListener('pointerup', handlePointerUp);\n // Remove listeners when corner destroyed\n corner.once('destroyed', () => {\n // cancel listener\n corner.off('pointerdown');\n globalThis.removeEventListener('pointerup', handlePointerUp);\n });\n // Add corner\n background.addChild(corner);\n}\n/**\n * This function move the rectangle mask used to crop the image\n * If the mask does not exists in this context the function do nothing\n *\n * @param application the PIXI.Application context\n * @param cornerType The cornerType identifying the corner that changed position\n * @param position The coordinate (x,y) of the corner that moved\n */\nfunction moveMask(\n application: PIXI.Application,\n cornerType: CornerType,\n position: { x: number; y: number },\n): void {\n const mask = application.stage.getChildByName(\n CROP_MASK_NAME,\n true,\n ) as PIXI.Graphics | null;\n if (mask === undefined || mask === null) return;\n const right = mask.position.x + mask.width;\n const bottom = mask.position.y + mask.height;\n switch (cornerType) {\n case 'TOP_LEFT': {\n mask.position.x = position.x;\n mask.position.y = position.y;\n mask.width = right - position.x;\n mask.height = bottom - position.y;\n break;\n }\n case 'TOP_RIGHT': {\n mask.position.y = position.y;\n mask.width = position.x - mask.position.x;\n mask.height = bottom - position.y;\n break;\n }\n case 'BOTTOM_LEFT': {\n mask.position.x = position.x;\n mask.width = right - position.x;\n mask.height = position.y - mask.position.y;\n break;\n }\n case 'BOTTOM_RIGHT': {\n mask.width = position.x - mask.position.x;\n mask.height = position.y - mask.position.y;\n break;\n }\n }\n refreshCorners(application);\n}\n/**\n * This function draw all graphics controls used to crop an image:\n * - 4 corners to select the cropped area\n * - A background with an transparent backdrop effect\n * - A mask applied to the original image\n *\n * @param application The PIXI.Application context\n * @param {spriteName:string} {spriteName} The sprite name identifying the original image\n */\nexport function start(\n application: PIXI.Application,\n { spriteName }: { spriteName: string },\n): void {\n // Remove controls before redrawing if exists\n stop(application);\n application.stage.interactive = true;\n application.stage.interactiveChildren = true;\n drawBackground(application, { spriteName });\n drawCorner(application, 'BOTTOM_LEFT', { spriteName });\n drawCorner(application, 'BOTTOM_RIGHT', { spriteName });\n drawCorner(application, 'TOP_LEFT', { spriteName });\n drawCorner(application, 'TOP_RIGHT', { spriteName });\n}\n/**\n * This function remove all graphics controls if exists. And it also remove any mouse event on this stage\n *\n * @param application The PIXI.Application context\n */\nexport function stop(application: PIXI.Application) {\n removeBackground(application);\n application.stage.off('pointermove');\n application.render();\n}\n/**\n * This function apply a crop to the imageSrc and return the result as a PIXI.Sprite object\n *\n * @param application\n * @param imageSrc a string URI of the image to crop\n * @returns a PIXI.Sprite with a imageSrc cropped or undefined if the image has not been cropped\n */\nexport function save(application: PIXI.Application): PIXI.Sprite | undefined {\n // Search for mask in this context\n const mask = application.stage.getChildByName(\n CROP_MASK_NAME,\n true,\n ) as PIXI.Graphics | null;\n // Stop if mask does not exists\n if (mask === undefined || mask === null) return;\n // Remove controls before cloning stage\n stop(application);\n // Clone stage\n const stageTexture = application.renderer\n .generateTexture(application.stage)\n .clone();\n const clonedStage = new PIXI.Sprite(stageTexture);\n // Compute bounds and round lower to avoid overflow\n const maskBounds = mask.getBounds();\n const bounds = new PIXI.Rectangle(\n Math.floor(maskBounds.x),\n Math.floor(maskBounds.y),\n Math.floor(maskBounds.width),\n Math.floor(maskBounds.height),\n );\n // Apply crop to the cloned stage\n const cropped = new PIXI.Texture(clonedStage.texture.baseTexture, bounds);\n const sprite = new PIXI.Sprite(cropped);\n return sprite;\n}\n"],"names":["CORNERS","PADDING","POINT_RADIUS","CROP_BACKGROUND_NAME","CROP_MASK_NAME","getCornerName","corner","drawBackground","application","spriteName","removeBackground","sprite","stage","getChildByName","spriteBounds","getBounds","stageTexture","renderer","generateTexture","clone","clonedStage","PIXI","Sprite","height","width","position","Point","background","Graphics","beginFill","drawRect","endFill","name","x","y","rectMask","mask","addChild","child","removeFromParent","computeCornerPosition","cornerType","bounds","start","end","Math","PI","refreshCorners","forEach","drawCorner","previous","scale","getApplicationScale","undefined","arc","lineTo","interactive","enable","on","event","localPosition","toLocal","global","handlePointerDown","handlePointerUp","addEventListener","once","off","removeEventListener","moveMask","right","bottom","stop","interactiveChildren","render","save","maskBounds","Rectang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rB,EAAKwD,UACtBhC,KAAKiC,MAAMF,EAAW3C,CAAC,GACvBY,KAAKiC,MAAMF,EAAW1C,CAAC,GACvBW,KAAKiC,MAAMF,EAAWpD,KAAK,GAC3BqB,KAAKiC,MAAMF,EAAWrD,MAAM,CAC9B,GAEMwD,IAAU,IAAI1D,EAAK2D,QAAQ5D,EAAY6D,QAAQC,aAAaxC,CAAM;AAEjE/B,SADQ,IAAIU,EAAKC,OAAOyD,CAAO;AAExC;"}
@@ -1,162 +1,163 @@
1
- import * as PIXI from "pixi.js";
2
- const MIN_HEIGHT = 100, MIN_WIDTH = 100, MODAL_VERTICAL_PADDING = 450, MODAL_HORIZONTAL_PADDING = 64, DEFAULT_QUALITY = 0.5, DEFAULT_SPRITE_NAME = "image";
3
- function updateImageFromBlob(application, {
4
- spriteName,
5
- imgDatasource,
6
- settings
1
+ import * as d from "pixi.js";
2
+ const u = 100, x = 100, y = 450, I = 64, A = 0.5, R = "image";
3
+ function z(e, {
4
+ spriteName: t,
5
+ imgDatasource: i,
6
+ settings: h
7
7
  }) {
8
- const imageUrl = URL.createObjectURL(imgDatasource), image = new Image();
9
- return image.src = imageUrl, new Promise((resolve) => {
10
- image.onload = async () => {
11
- await updateImage(application, {
12
- spriteName,
13
- imgDatasource: image,
14
- settings
8
+ const s = URL.createObjectURL(i), o = new Image();
9
+ return o.src = s, new Promise((n) => {
10
+ o.onload = async () => {
11
+ await T(e, {
12
+ spriteName: t,
13
+ imgDatasource: o,
14
+ settings: h
15
15
  });
16
- const newSprite = application == null ? void 0 : application.stage.getChildByName(spriteName, !0);
17
- resolve(newSprite);
16
+ const r = e == null ? void 0 : e.stage.getChildByName(t, !0);
17
+ n(r);
18
18
  };
19
19
  });
20
20
  }
21
- async function updateImage(application, {
22
- spriteName,
23
- imgDatasource,
24
- settings
21
+ async function T(e, {
22
+ spriteName: t,
23
+ imgDatasource: i,
24
+ settings: h
25
25
  }) {
26
- if (application === void 0 || application.stage === null)
26
+ if (e === void 0 || e.stage === null)
27
27
  return;
28
- const previous = application.stage.getChildByName(spriteName, !0);
29
- previous == null || previous.removeFromParent();
30
- const texture = imgDatasource instanceof HTMLImageElement ? PIXI.Texture.from(imgDatasource) : imgDatasource instanceof PIXI.Sprite ? imgDatasource : await PIXI.Texture.fromURL(imgDatasource), sprite = texture instanceof PIXI.Sprite ? texture : PIXI.Sprite.from(texture, {});
31
- if (sprite.interactive = !0, sprite.name = spriteName, settings) {
28
+ const s = e.stage.getChildByName(t, !0);
29
+ s == null || s.removeFromParent();
30
+ const o = i instanceof HTMLImageElement ? d.Texture.from(i) : i instanceof d.Sprite ? i : await d.Texture.fromURL(i), n = o instanceof d.Sprite ? o : d.Sprite.from(o, {});
31
+ if (n.interactive = !0, n.name = t, h) {
32
32
  const {
33
33
  sprite: {
34
- anchor,
35
- position,
36
- scale,
37
- size: spriteSize,
38
- rotation
34
+ anchor: r,
35
+ position: g,
36
+ scale: c,
37
+ size: w,
38
+ rotation: f
39
39
  },
40
40
  stage: {
41
- size: stageSize
41
+ size: m
42
42
  }
43
- } = settings, isRotated = rotation % Math.PI !== 0;
44
- sprite.anchor.x = anchor.x, sprite.anchor.y = anchor.y, sprite.position.x = position.x, sprite.position.y = position.y, sprite.scale.x = scale.x, sprite.scale.y = scale.y, sprite.width = isRotated ? spriteSize.height : spriteSize.width, sprite.height = isRotated ? spriteSize.width : spriteSize.height, application.stage.height = stageSize.height, application.stage.width = stageSize.width, application.renderer.resize(stageSize.width, stageSize.height), application.stage.addChild(sprite);
43
+ } = h, a = f % Math.PI !== 0;
44
+ n.anchor.x = r.x, n.anchor.y = r.y, n.position.x = g.x, n.position.y = g.y, n.scale.x = c.x, n.scale.y = c.y, n.width = a ? w.height : w.width, n.height = a ? w.width : w.height, e.stage.height = m.height, e.stage.width = m.width, e.renderer.resize(m.width, m.height), e.stage.addChild(n);
45
45
  } else
46
- application.stage.addChild(sprite), application.renderer.resize(sprite.width, sprite.height);
47
- autoResize(application, sprite);
46
+ e.stage.addChild(n), e.renderer.resize(n.width, n.height);
47
+ L(e, n);
48
48
  }
49
- function autoResize(application, sprite) {
50
- var _a;
51
- const parent = application.view.parentNode, maxMobileWidth = window.innerWidth - MODAL_HORIZONTAL_PADDING, parentWidth = Math.max((parent == null ? void 0 : parent.offsetWidth) ?? 0, MIN_WIDTH), newSize = constraintSize({
52
- width: sprite.width,
53
- height: sprite.height
49
+ function L(e, t) {
50
+ var g;
51
+ const i = e.view.parentNode, h = window.innerWidth - I, s = Math.max((i == null ? void 0 : i.offsetWidth) ?? 0, x), o = v({
52
+ width: t.width,
53
+ height: t.height
54
54
  }, {
55
55
  width: {
56
- max: Math.min(parentWidth, maxMobileWidth),
57
- min: MIN_WIDTH
56
+ max: Math.min(s, h),
57
+ min: x
58
58
  },
59
59
  height: {
60
- min: MIN_HEIGHT,
61
- max: window.innerHeight - MODAL_VERTICAL_PADDING
60
+ min: u,
61
+ max: window.innerHeight - y
62
62
  }
63
63
  }), {
64
- height: newHeight,
65
- width: newWidth
66
- } = newSize;
67
- (_a = application.view) != null && _a.style && (application.view.style.width = `${newWidth}px`, application.view.style.height = `${newHeight}px`);
64
+ height: n,
65
+ width: r
66
+ } = o;
67
+ (g = e.view) != null && g.style && (e.view.style.width = `${r}px`, e.view.style.height = `${n}px`);
68
68
  }
69
- function constraintSize(size, constraints) {
69
+ function v(e, t) {
70
70
  const {
71
- height,
72
- width
73
- } = size, ratio = width / height, {
74
- height: constraintHeight,
75
- width: constraintWidth
76
- } = constraints;
77
- let newWidth = constraintWidth.max, newHeight = constraintWidth.max / ratio;
78
- return width > constraintWidth.max && (newWidth = constraintWidth.max, newHeight = newWidth / ratio), newHeight > constraintHeight.max && (newHeight = constraintHeight.max, newWidth = newHeight * ratio), newWidth < constraintWidth.min && (newWidth = constraintWidth.min, newHeight = newWidth / ratio), newHeight < constraintHeight.min && (newHeight = constraintHeight.min, newWidth = newHeight * ratio), {
79
- width: newWidth,
80
- height: newHeight
71
+ height: i,
72
+ width: h
73
+ } = e, s = h / i, {
74
+ height: o,
75
+ width: n
76
+ } = t;
77
+ let r = n.max, g = n.max / s;
78
+ return h > n.max && (r = n.max, g = r / s), g > o.max && (g = o.max, r = g * s), r < n.min && (r = n.min, g = r / s), g < o.min && (g = o.min, r = g * s), {
79
+ width: r,
80
+ height: g
81
81
  };
82
82
  }
83
- function saveAsBlob(application) {
84
- return new Promise((resolve, reject) => {
85
- var _a;
86
- (_a = application == null ? void 0 : application.view) != null && _a.toBlob ? application.view.toBlob((blob) => {
87
- blob ? resolve(blob) : reject("EXTRACT_FAILED");
88
- }, "image/jpeg", DEFAULT_QUALITY) : reject("EXTRACT_FAILED");
83
+ function E(e) {
84
+ return new Promise((t, i) => {
85
+ var h;
86
+ (h = e == null ? void 0 : e.view) != null && h.toBlob ? e.view.toBlob((s) => {
87
+ s ? t(s) : i("EXTRACT_FAILED");
88
+ }, "image/jpeg", A) : i("EXTRACT_FAILED");
89
89
  });
90
90
  }
91
- function saveAsDataURL(application) {
92
- var _a, _b;
93
- return (_b = (_a = application.view).toDataURL) == null ? void 0 : _b.call(_a);
91
+ function S(e) {
92
+ var t, i;
93
+ return (i = (t = e.view).toDataURL) == null ? void 0 : i.call(t);
94
94
  }
95
- function getApplicationScale(application) {
96
- return application.view.getBoundingClientRect ? application.view.getBoundingClientRect().width / application.view.width : 1;
95
+ function _(e) {
96
+ return e.view.getBoundingClientRect ? e.view.getBoundingClientRect().width / e.view.width : 1;
97
97
  }
98
- function toBlob(application) {
99
- return new Promise((resolve, reject) => {
100
- var _a, _b;
101
- (_b = (_a = application.view).toBlob) == null || _b.call(_a, (blob) => {
102
- blob ? resolve(blob) : reject("EXTRACT_FAIL");
98
+ function B(e) {
99
+ return new Promise((t, i) => {
100
+ var h, s;
101
+ (s = (h = e.view).toBlob) == null || s.call(h, (o) => {
102
+ o ? t(o) : i("EXTRACT_FAIL");
103
103
  }, "image/png", 1);
104
104
  });
105
105
  }
106
- function createImageSettings({
107
- application,
108
- sprite
106
+ function C({
107
+ application: e,
108
+ sprite: t
109
109
  }) {
110
110
  return {
111
111
  sprite: {
112
- rotation: sprite.rotation,
112
+ rotation: t.rotation,
113
113
  size: {
114
- width: sprite.width,
115
- height: sprite.height
114
+ width: t.width,
115
+ height: t.height
116
116
  },
117
117
  position: {
118
- x: sprite.position.x,
119
- y: sprite.position.y
118
+ x: t.position.x,
119
+ y: t.position.y
120
120
  },
121
121
  scale: {
122
- x: sprite.scale.x,
123
- y: sprite.scale.y
122
+ x: t.scale.x,
123
+ y: t.scale.y
124
124
  },
125
125
  anchor: {
126
- x: sprite.anchor.x,
127
- y: sprite.anchor.y
126
+ x: t.anchor.x,
127
+ y: t.anchor.y
128
128
  }
129
129
  },
130
130
  stage: {
131
131
  size: {
132
- width: application.stage.width,
133
- height: application.stage.height
132
+ width: e.stage.width,
133
+ height: e.stage.height
134
134
  },
135
135
  scale: {
136
- x: application.stage.scale.x,
137
- y: application.stage.scale.y
136
+ x: e.stage.scale.x,
137
+ y: e.stage.scale.y
138
138
  }
139
139
  }
140
140
  };
141
141
  }
142
- function resizeStage({
143
- application,
144
- sprite,
145
- newHeight,
146
- newWidth
142
+ function D({
143
+ application: e,
144
+ sprite: t,
145
+ newHeight: i,
146
+ newWidth: h
147
147
  }) {
148
- sprite.anchor.x = 0.5, sprite.anchor.y = 0.5, sprite.position = new PIXI.Point(newWidth / 2, newHeight / 2), application.stage.height = newHeight, application.stage.width = newWidth, application.renderer.resize(newWidth, newHeight);
148
+ t.anchor.x = 0.5, t.anchor.y = 0.5, t.position = new d.Point(h / 2, i / 2), e.stage.height = i, e.stage.width = h, e.renderer.resize(h, i);
149
149
  }
150
150
  export {
151
- DEFAULT_SPRITE_NAME,
152
- autoResize,
153
- constraintSize,
154
- createImageSettings,
155
- getApplicationScale,
156
- resizeStage,
157
- saveAsBlob,
158
- saveAsDataURL,
159
- toBlob,
160
- updateImage,
161
- updateImageFromBlob
151
+ R as DEFAULT_SPRITE_NAME,
152
+ L as autoResize,
153
+ v as constraintSize,
154
+ C as createImageSettings,
155
+ _ as getApplicationScale,
156
+ D as resizeStage,
157
+ E as saveAsBlob,
158
+ S as saveAsDataURL,
159
+ B as toBlob,
160
+ T as updateImage,
161
+ z as updateImageFromBlob
162
162
  };
163
+ //# sourceMappingURL=misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.js","sources":["../../../../../src/modules/multimedia/ImageEditor/effects/misc.ts"],"sourcesContent":["import * as PIXI from 'pixi.js';\n\n// Define (in pixel) the minimal height the sprite should have\nconst MIN_HEIGHT = 100;\n// Define (in pixel) the minimal width the sprite should have\nconst MIN_WIDTH = 100;\n// Modal padding\nconst MODAL_VERTICAL_PADDING = 450;\nconst MODAL_HORIZONTAL_PADDING = 64;\n\n// Using canvas to download the image increase the file size so to keep the same we need to apply a quality\nconst DEFAULT_QUALITY = 0.5;\n\n// Define the default name of the sprite in the PIXI.Application context\nexport const DEFAULT_SPRITE_NAME = 'image';\n\n/**\n * A structure that define all setting of an image\n * - positon\n * - scale\n * - size\n * - size of the stage\n */\nexport interface ImageSettings {\n stage: {\n size: { width: number; height: number };\n scale: { x: number; y: number };\n };\n sprite: {\n rotation: number;\n size: { width: number; height: number };\n scale: { x: number; y: number };\n position: { x: number; y: number };\n anchor: { x: number; y: number };\n };\n}\n/**\n * This function update the image content using Blob datasource\n *\n * @param application the PIXI.Application context\n * @param param.spriteName the name of the sprite in the context\n * @param param.imgDatasource the img data could be one of: string url, HTMLImageElement, PIXI.Sprite\n * @param param.stageSize?: { width: number; height: number };\n * @param param.spriteSize?: { width: number; height: number };\n */\nexport function updateImageFromBlob(\n application: PIXI.Application,\n {\n spriteName,\n imgDatasource,\n settings,\n }: {\n spriteName: string;\n imgDatasource: Blob;\n settings?: ImageSettings;\n },\n): Promise<PIXI.Sprite | null> {\n const imageUrl = URL.createObjectURL(imgDatasource);\n const image = new Image();\n image.src = imageUrl;\n return new Promise<PIXI.Sprite | null>((resolve) => {\n image.onload = async () => {\n await updateImage(application, {\n spriteName,\n imgDatasource: image,\n settings,\n });\n\n // get new sprite\n const newSprite = application?.stage.getChildByName(\n spriteName,\n true,\n ) as PIXI.Sprite | null;\n resolve(newSprite);\n };\n });\n}\n/**\n * This function update the image content for the sprite in the PIXI.Application context\n *\n * @param application the PIXI.Application context\n * @param param.spriteName the name of the sprite in the context\n * @param param.imgDatasource the img data could be one of: string url, HTMLImageElement, PIXI.Sprite\n * @param param.spriteSize\n * @param param.stageSize\n */\nexport async function updateImage(\n application: PIXI.Application,\n {\n spriteName,\n imgDatasource,\n settings,\n }: {\n spriteName: string;\n imgDatasource: string | HTMLImageElement | PIXI.Sprite;\n settings?: ImageSettings;\n },\n): Promise<void> {\n if (application === undefined || application.stage === null) {\n return;\n }\n // Remove previous sprite if exists\n const previous = application.stage.getChildByName(spriteName, true);\n previous?.removeFromParent();\n // Create texture from datasource\n const texture =\n imgDatasource instanceof HTMLImageElement\n ? PIXI.Texture.from(imgDatasource)\n : imgDatasource instanceof PIXI.Sprite\n ? imgDatasource\n : await PIXI.Texture.fromURL(imgDatasource);\n // Create sprite from texture and set name\n const sprite =\n texture instanceof PIXI.Sprite ? texture : PIXI.Sprite.from(texture, {});\n sprite.interactive = true;\n sprite.name = spriteName;\n // If settings are defined => resize accordingly\n if (settings) {\n const {\n sprite: { anchor, position, scale, size: spriteSize, rotation },\n stage: { size: stageSize },\n } = settings;\n // Check whether sprite has been rotated\n const isRotated = rotation % Math.PI !== 0;\n //Config sprite\n sprite.anchor.x = anchor.x;\n sprite.anchor.y = anchor.y;\n sprite.position.x = position.x;\n sprite.position.y = position.y;\n sprite.scale.x = scale.x;\n sprite.scale.y = scale.y;\n // If sprite is rotated a multiple of 90°=>width and height are swapped\n sprite.width = isRotated ? spriteSize.height : spriteSize.width;\n sprite.height = isRotated ? spriteSize.width : spriteSize.height;\n // Resize stage\n application.stage.height = stageSize.height;\n application.stage.width = stageSize.width;\n application.renderer.resize(stageSize.width, stageSize.height);\n // Add sprite to context\n application.stage.addChild(sprite);\n } else {\n // Add sprite to context\n application.stage.addChild(sprite);\n // Resize the sprite\n application.renderer.resize(sprite.width, sprite.height);\n }\n // Resize the view in css to keep img quality\n autoResize(application, sprite);\n}\n\n/**\n * This function resize the sprite according to the container width\n *\n * @param application The PIXI.Application context\n * @param sprite The sprite object representing the image to resize\n */\nexport function autoResize(\n application: PIXI.Application,\n sprite: PIXI.Sprite,\n): void {\n // Get parent html object\n const parent = application.view.parentNode as HTMLElement | undefined;\n const maxMobileWidth = window.innerWidth - MODAL_HORIZONTAL_PADDING;\n const parentWidth = Math.max(parent?.offsetWidth ?? 0, MIN_WIDTH);\n const newSize = constraintSize(\n {\n width: sprite.width,\n height: sprite.height,\n },\n {\n width: {\n max: Math.min(parentWidth, maxMobileWidth),\n min: MIN_WIDTH,\n },\n height: {\n min: MIN_HEIGHT,\n max: window.innerHeight - MODAL_VERTICAL_PADDING,\n },\n },\n );\n // Define the new width to the parentWidth\n const { height: newHeight, width: newWidth } = newSize;\n\n // Anchor the sprite to the middle (for rotation)\n if (application.view?.style) {\n application.view.style.width = `${newWidth}px`;\n application.view.style.height = `${newHeight}px`;\n }\n}\n\nexport function constraintSize(\n size: { width: number; height: number },\n constraints: {\n width: { max: number; min: number };\n height: { max: number; min: number };\n },\n) {\n const { height, width } = size;\n const ratio = width / height;\n const { height: constraintHeight, width: constraintWidth } = constraints;\n // set max size\n let newWidth = constraintWidth.max;\n let newHeight = constraintWidth.max / ratio;\n // constraint width max\n if (width > constraintWidth.max) {\n newWidth = constraintWidth.max;\n newHeight = newWidth / ratio;\n }\n // constraint height max\n if (newHeight > constraintHeight.max) {\n newHeight = constraintHeight.max;\n newWidth = newHeight * ratio;\n }\n // constraint width min\n if (newWidth < constraintWidth.min) {\n newWidth = constraintWidth.min;\n newHeight = newWidth / ratio;\n }\n // constraint height max\n if (newHeight < constraintHeight.min) {\n newHeight = constraintHeight.min;\n newWidth = newHeight * ratio;\n }\n return { width: newWidth, height: newHeight };\n}\n\n/**\n * This function transform the stage into a blob\n *\n * @param application the PIXI.Application context\n * @returns A promise of the generated blob\n */\nexport function saveAsBlob(application: PIXI.Application): Promise<Blob> {\n return new Promise<Blob>((resolve, reject) => {\n if (application?.view?.toBlob) {\n application.view.toBlob(\n (blob) => {\n blob ? resolve(blob) : reject('EXTRACT_FAILED');\n },\n 'image/jpeg',\n DEFAULT_QUALITY,\n );\n } else {\n reject('EXTRACT_FAILED');\n }\n });\n}\n/**\n * This function transform the stage into a data URL encoded image\n *\n * @param application the PIXI.Application context\n * @returns the generated image as Data URL or undefined if failed\n */\nexport function saveAsDataURL(\n application: PIXI.Application,\n): string | undefined {\n return application.view.toDataURL?.();\n}\n\n/**\n * Calculates the scale percentage for a PIXI.Sprite or the application view based on the parent container's dimensions.\n * @param application - The PIXI.Application instance.\n * @param sprite - The PIXI.Sprite instance (optional).\n * @returns The scale percentage.\n */\nexport function getApplicationScale(application: PIXI.Application) {\n if (application.view.getBoundingClientRect) {\n return (\n application.view.getBoundingClientRect()!.width / application.view.width\n );\n }\n return 1;\n}\n\nexport function toBlob(application: PIXI.Application) {\n return new Promise<Blob>((resolve, reject) => {\n application.view.toBlob?.(\n (blob) => {\n if (blob) {\n resolve(blob);\n } else {\n reject('EXTRACT_FAIL');\n }\n },\n 'image/png',\n 1,\n );\n });\n}\n\nexport function createImageSettings({\n application,\n sprite,\n}: {\n sprite: PIXI.Sprite;\n application: PIXI.Application;\n}) {\n return {\n sprite: {\n rotation: sprite.rotation,\n size: { width: sprite.width, height: sprite.height },\n position: { x: sprite.position.x, y: sprite.position.y },\n scale: { x: sprite.scale.x, y: sprite.scale.y },\n anchor: { x: sprite.anchor.x, y: sprite.anchor.y },\n },\n stage: {\n size: {\n width: application.stage.width,\n height: application.stage.height,\n },\n scale: { x: application.stage.scale.x, y: application.stage.scale.y },\n },\n };\n}\n\nexport function trimStage(application: PIXI.Application, sprite: PIXI.Sprite) {\n application.renderer.resize(sprite.width, sprite.height);\n}\nexport function resizeStage({\n application,\n sprite,\n newHeight,\n newWidth,\n}: {\n newHeight: number;\n newWidth: number;\n application: PIXI.Application;\n sprite: PIXI.Sprite;\n}) {\n // Anchor the sprite to the middle (for rotation)\n sprite.anchor.x = 0.5;\n sprite.anchor.y = 0.5;\n // Position the sprite to the middle\n sprite.position = new PIXI.Point(newWidth / 2, newHeight / 2);\n // Resize the stage\n application.stage.height = newHeight;\n application.stage.width = newWidth;\n application.renderer.resize(newWidth, newHeight);\n}\n"],"names":["MIN_HEIGHT","MIN_WIDTH","MODAL_VERTICAL_PADDING","MODAL_HORIZONTAL_PADDING","DEFAULT_QUALITY","DEFAULT_SPRITE_NAME","updateImageFromBlob","application","spriteName","imgDatasource","settings","imageUrl","URL","createObjectURL","image","Image","src","Promise","resolve","onload","updateImage","newSprite","stage","getChildByName","undefined","previous","removeFromParent","texture","HTMLImageElement","PIXI","Texture","from","Sprite","fromURL","sprite","interactive","name","anchor","position","scale","size","spriteSize","rotation","stageSize","isRotated","Math","PI","x","y","width","height","renderer","resize","addChild","autoResize","parent","view","parentNode","maxMobileWidth","window","innerWidth","parentWidth","max","offsetWidth","newSize","constraintSize","min","innerHeight","newHeight","newWidth","style","constraints","ratio","constraintHeight","constraintWidth","saveAsBlob","reject","toBlob","blob","saveAsDataURL","toDataURL","getApplicationScale","getBoundingClientRect","createImageSettings","resizeStage","Point"],"mappings":";AAGA,MAAMA,IAAa,KAEbC,IAAY,KAEZC,IAAyB,KACzBC,IAA2B,IAG3BC,IAAkB,KAGXC,IAAsB;AA+B5B,SAASC,EACdC,GACA;AAAA,EACEC,YAAAA;AAAAA,EACAC,eAAAA;AAAAA,EACAC,UAAAA;AAKF,GAC6B;AACvBC,QAAAA,IAAWC,IAAIC,gBAAgBJ,CAAa,GAC5CK,IAAQ,IAAIC;AAClBD,SAAAA,EAAME,MAAML,GACL,IAAIM,QAA6BC,CAAYA,MAAA;AAClDJ,IAAAA,EAAMK,SAAS,YAAY;AACzB,YAAMC,EAAYb,GAAa;AAAA,QAC7BC,YAAAA;AAAAA,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