@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,50 +1,51 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import Mathematics from "@tiptap-pro/extension-mathematics";
4
- import { useEditor, EditorContent } from "@tiptap/react";
5
- import StarterKit from "@tiptap/starter-kit";
6
- import { createPortal } from "react-dom";
7
- import { useTranslation } from "react-i18next";
8
- import { Modal } from "../../../../components/Modal/Modal.js";
9
- import { Button } from "../../../../components/Button/Button.js";
10
- const MathsModal = ({
11
- isOpen,
12
- onSuccess,
13
- onCancel
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { useState as b, useEffect as $ } from "react";
3
+ import x from "@tiptap-pro/extension-mathematics";
4
+ import { useEditor as E, EditorContent as C } from "@tiptap/react";
5
+ import M from "@tiptap/starter-kit";
6
+ import { createPortal as g } from "react-dom";
7
+ import { useTranslation as w } from "react-i18next";
8
+ import { Modal as a } from "../../../../components/Modal/Modal.js";
9
+ import { Button as c } from "../../../../components/Button/Button.js";
10
+ const j = ({
11
+ isOpen: h,
12
+ onSuccess: l,
13
+ onCancel: o
14
14
  }) => {
15
- const FORMULA_PLACEHOLDER = "\\frac{-b + \\sqrt{b^2 - 4ac}}{2a}", [formulaEditor, setFormulaEditor] = useState(`$${FORMULA_PLACEHOLDER}$`), {
16
- t
17
- } = useTranslation(), editor = useEditor({
18
- extensions: [StarterKit, Mathematics],
15
+ const i = "\\frac{-b + \\sqrt{b^2 - 4ac}}{2a}", [m, d] = b(`$${i}$`), {
16
+ t: e
17
+ } = w(), t = E({
18
+ extensions: [M, x],
19
19
  content: "",
20
20
  editable: !1
21
21
  });
22
- useEffect(() => {
23
- editor == null || editor.commands.setContent(formulaEditor), editor == null || editor.commands.enter();
24
- }, [editor, formulaEditor]);
25
- const handleChange = (event) => {
26
- const newFormulaEditor = event.target.value.replaceAll(`
22
+ $(() => {
23
+ t == null || t.commands.setContent(m), t == null || t.commands.enter();
24
+ }, [t, m]);
25
+ const f = (u) => {
26
+ const s = u.target.value.replaceAll(`
27
27
  `, "$<br/>$");
28
- newFormulaEditor ? (editor == null || editor.commands.setContent(`$${newFormulaEditor}$`), setFormulaEditor(`$${newFormulaEditor}$`)) : (editor == null || editor.commands.setContent(""), setFormulaEditor("")), editor == null || editor.commands.enter();
29
- }, handleOnCancel = () => {
30
- onCancel == null || onCancel();
28
+ s ? (t == null || t.commands.setContent(`$${s}$`), d(`$${s}$`)) : (t == null || t.commands.setContent(""), d("")), t == null || t.commands.enter();
29
+ }, p = () => {
30
+ o == null || o();
31
31
  };
32
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "MathsModal", isOpen, onModalClose: handleOnCancel, children: [
33
- /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleOnCancel, children: t("tiptap.maths.title") }),
34
- /* @__PURE__ */ jsxs(Modal.Subtitle, { children: [
35
- t("tiptap.maths.subtitle.1"),
36
- /* @__PURE__ */ jsx("a", { href: t("https://fr.wikibooks.org/wiki/LaTeX/%C3%89crire_des_math%C3%A9matiques"), target: "_blank", children: t("tiptap.maths.subtitle.2") })
32
+ return /* @__PURE__ */ g(/* @__PURE__ */ n(a, { id: "MathsModal", isOpen: h, onModalClose: p, children: [
33
+ /* @__PURE__ */ r(a.Header, { onModalClose: p, children: e("tiptap.maths.title") }),
34
+ /* @__PURE__ */ n(a.Subtitle, { children: [
35
+ e("tiptap.maths.subtitle.1"),
36
+ /* @__PURE__ */ r("a", { href: e("https://fr.wikibooks.org/wiki/LaTeX/%C3%89crire_des_math%C3%A9matiques"), target: "_blank", rel: "noreferrer", children: e("tiptap.maths.subtitle.2") })
37
37
  ] }),
38
- /* @__PURE__ */ jsxs(Modal.Body, { children: [
39
- /* @__PURE__ */ jsx("textarea", { id: "formulaTextArea", name: "formula", rows: 4, cols: 50, onChange: handleChange, placeholder: `Exemple : ${FORMULA_PLACEHOLDER}`, className: "border rounded-3 w-100 px-16 py-12" }),
40
- /* @__PURE__ */ jsx(EditorContent, { editor, className: "pt-24 pb-0 text-center fs-1" })
38
+ /* @__PURE__ */ n(a.Body, { children: [
39
+ /* @__PURE__ */ r("textarea", { id: "formulaTextArea", name: "formula", rows: 4, cols: 50, onChange: f, placeholder: `Exemple : ${i}`, className: "border rounded-3 w-100 px-16 py-12" }),
40
+ /* @__PURE__ */ r(C, { editor: t, className: "pt-24 pb-0 text-center fs-1" })
41
41
  ] }),
42
- /* @__PURE__ */ jsxs(Modal.Footer, { children: [
43
- /* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("tiptap.maths.cancel") }),
44
- /* @__PURE__ */ jsx(Button, { color: "primary", onClick: () => onSuccess == null ? void 0 : onSuccess(formulaEditor), type: "button", variant: "filled", children: t("tiptap.maths.add") })
42
+ /* @__PURE__ */ n(a.Footer, { children: [
43
+ /* @__PURE__ */ r(c, { color: "tertiary", onClick: o, type: "button", variant: "ghost", children: e("tiptap.maths.cancel") }),
44
+ /* @__PURE__ */ r(c, { color: "primary", onClick: () => l == null ? void 0 : l(m), type: "button", variant: "filled", children: e("tiptap.maths.add") })
45
45
  ] })
46
46
  ] }), document.getElementById("portal"));
47
47
  };
48
48
  export {
49
- MathsModal as default
49
+ j as default
50
50
  };
51
+ //# sourceMappingURL=MathsModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MathsModal.js","sources":["../../../../../src/modules/editor/components/Editor/MathsModal.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport Mathematics from '@tiptap-pro/extension-mathematics';\nimport { Editor, EditorContent, useEditor } from '@tiptap/react';\nimport StarterKit from '@tiptap/starter-kit';\nimport { createPortal } from 'react-dom';\nimport { useTranslation } from 'react-i18next';\nimport { Button, Modal } from '../../../..';\n\ninterface ModalProps {\n isOpen: boolean;\n onSuccess?: (formulaEditor: string) => void;\n onCancel?: () => void;\n}\n\nconst MathsModal = ({ isOpen, onSuccess, onCancel }: ModalProps) => {\n const FORMULA_PLACEHOLDER = '\\\\frac{-b + \\\\sqrt{b^2 - 4ac}}{2a}';\n const [formulaEditor, setFormulaEditor] = useState<string>(\n `$${FORMULA_PLACEHOLDER}$`,\n );\n\n const { t } = useTranslation();\n\n const editor: Editor | null = useEditor({\n extensions: [StarterKit, Mathematics],\n content: ``,\n editable: false,\n });\n\n useEffect(() => {\n editor?.commands.setContent(formulaEditor);\n editor?.commands.enter();\n return;\n }, [editor, formulaEditor]);\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n const newFormulaTextarea: string = event.target.value;\n const newFormulaEditor = newFormulaTextarea.replaceAll('\\n', '$<br/>$');\n // replace editor content\n if (newFormulaEditor) {\n editor?.commands.setContent(`$${newFormulaEditor}$`);\n setFormulaEditor(`$${newFormulaEditor}$`);\n } else {\n editor?.commands.setContent('');\n setFormulaEditor('');\n }\n editor?.commands.enter();\n };\n\n const handleOnCancel = () => {\n onCancel?.();\n };\n\n return createPortal(\n <Modal id=\"MathsModal\" isOpen={isOpen} onModalClose={handleOnCancel}>\n <Modal.Header onModalClose={handleOnCancel}>\n {t('tiptap.maths.title')}\n </Modal.Header>\n <Modal.Subtitle>\n {t('tiptap.maths.subtitle.1')}\n <a\n href={t(\n 'https://fr.wikibooks.org/wiki/LaTeX/%C3%89crire_des_math%C3%A9matiques',\n )}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {t('tiptap.maths.subtitle.2')}\n </a>\n </Modal.Subtitle>\n <Modal.Body>\n <textarea\n id=\"formulaTextArea\"\n name=\"formula\"\n rows={4}\n cols={50}\n onChange={handleChange}\n placeholder={`Exemple : ${FORMULA_PLACEHOLDER}`}\n className=\"border rounded-3 w-100 px-16 py-12\"\n ></textarea>\n <EditorContent\n editor={editor}\n className=\"pt-24 pb-0 text-center fs-1\"\n />\n </Modal.Body>\n <Modal.Footer>\n <Button\n color=\"tertiary\"\n onClick={onCancel}\n type=\"button\"\n variant=\"ghost\"\n >\n {t('tiptap.maths.cancel')}\n </Button>\n <Button\n color=\"primary\"\n onClick={() => onSuccess?.(formulaEditor)}\n type=\"button\"\n variant=\"filled\"\n >\n {t('tiptap.maths.add')}\n </Button>\n </Modal.Footer>\n </Modal>,\n document.getElementById('portal') as HTMLElement,\n );\n};\n\nexport default MathsModal;\n"],"names":["MathsModal","isOpen","onSuccess","onCancel","FORMULA_PLACEHOLDER","formulaEditor","setFormulaEditor","useState","t","useTranslation","editor","useEditor","extensions","StarterKit","Mathematics","content","editable","useEffect","commands","setContent","enter","handleChange","event","newFormulaEditor","target","value","replaceAll","handleOnCancel","jsxs","Modal","jsx","EditorContent","Button","document","getElementById"],"mappings":";;;;;;;;;AAeA,MAAMA,IAAaA,CAAC;AAAA,EAAEC,QAAAA;AAAAA,EAAQC,WAAAA;AAAAA,EAAWC,UAAAA;AAAqB,MAAM;AAClE,QAAMC,IAAsB,sCACtB,CAACC,GAAeC,CAAgB,IAAIC,EACxC,IAAIH,CAAmB,GACzB,GAEM;AAAA,IAAEI,GAAAA;AAAAA,MAAMC,EAAe,GAEvBC,IAAwBC,EAAU;AAAA,IACtCC,YAAY,CAACC,GAAYC,CAAW;AAAA,IACpCC,SAAS;AAAA,IACTC,UAAU;AAAA,EAAA,CACX;AAEDC,EAAAA,EAAU,MAAM;AACNC,IAAAA,KAAAA,QAAAA,EAAAA,SAASC,WAAWd,IAC5BK,KAAAA,QAAAA,EAAQQ,SAASE;AAAAA,EACjB,GACC,CAACV,GAAQL,CAAa,CAAC;AAEpBgB,QAAAA,IAAeA,CAACC,MAAkD;AAEtE,UAAMC,IAD6BD,EAAME,OAAOC,MACJC,WAAW;AAAA,GAAM,SAAS;AAEtE,IAAIH,KACFb,KAAAA,QAAAA,EAAQQ,SAASC,WAAW,IAAII,CAAgB,MAC/BjB,EAAA,IAAIiB,CAAgB,GAAG,MAEhCL,KAAAA,QAAAA,EAAAA,SAASC,WAAW,KAC5Bb,EAAiB,EAAE,IAErBI,KAAAA,QAAAA,EAAQQ,SAASE;AAAAA,EAAM,GAGnBO,IAAiBA,MAAM;AAChB,IAAAxB,KAAA,QAAAA;AAAA,EAAA;AAGb,2BACG,gBAAAyB,EAAAC,GAAA,EAAM,IAAG,cAAa,QAAA5B,GAAgB,cAAc0B,GACnD,UAAA;AAAA,IAAA,gBAAAG,EAACD,EAAM,QAAN,EAAa,cAAcF,GACzBnB,UAAAA,EAAE,oBAAoB,GACzB;AAAA,IACA,gBAAAoB,EAACC,EAAM,UAAN,EACErB,UAAAA;AAAAA,MAAAA,EAAE,yBAAyB;AAAA,MAC3B,gBAAAsB,EAAA,KAAA,EACC,MAAMtB,EACJ,wEACF,GACA,QAAO,UACP,KAAI,cAEHA,UAAEA,EAAA,yBAAyB,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACA,gBAAAoB,EAACC,EAAM,MAAN,EACC,UAAA;AAAA,MAAA,gBAAAC,EAAC,cACC,IAAG,mBACH,MAAK,WACL,MAAM,GACN,MAAM,IACN,UAAUT,GACV,aAAa,aAAajB,CAAmB,IAC7C,WAAU,sCACX;AAAA,MACA,gBAAA0B,EAAAC,GAAA,EACC,QAAArB,GACA,WAAU,8BAA6B,CAAA;AAAA,IAAA,GAE3C;AAAA,IACA,gBAAAkB,EAACC,EAAM,QAAN,EACC,UAAA;AAAA,MAAC,gBAAAC,EAAAE,GAAA,EACC,OAAM,YACN,SAAS7B,GACT,MAAK,UACL,SAAQ,SAEPK,UAAEA,EAAA,qBAAqB,EAC1B,CAAA;AAAA,MACC,gBAAAsB,EAAAE,GAAA,EACC,OAAM,WACN,SAAS,MAAM9B,KAAAA,gBAAAA,EAAYG,IAC3B,MAAK,UACL,SAAQ,UAEPG,UAAAA,EAAE,kBAAkB,GACvB;AAAA,IAAA,GACF;AAAA,EAAA,EAAA,CACF,GACAyB,SAASC,eAAe,QAAQ,CAClC;AACF;"}
@@ -1,17 +1,18 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { Fragment as Fragment$1 } from "react";
3
- import { Tooltip } from "../../../../components/Tooltip/Tooltip.js";
4
- import { IconButton } from "../../../../components/Button/IconButton.js";
5
- import { Dropdown } from "../../../../components/Dropdown/Dropdown.js";
6
- const EditorToolbarDropdownMenu = ({
7
- triggerProps,
8
- icon,
9
- ariaLabel,
10
- options
11
- }) => /* @__PURE__ */ jsxs(Fragment, { children: [
12
- /* @__PURE__ */ jsx(Tooltip, { message: ariaLabel, placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon, "aria-label": ariaLabel }) }),
13
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }, index)) })
1
+ import { jsxs as l, Fragment as c, jsx as r } from "react/jsx-runtime";
2
+ import { Fragment as p } from "react";
3
+ import { Tooltip as d } from "../../../../components/Tooltip/Tooltip.js";
4
+ import { IconButton as s } from "../../../../components/Button/IconButton.js";
5
+ import { Dropdown as t } from "../../../../components/Dropdown/Dropdown.js";
6
+ const x = ({
7
+ triggerProps: n,
8
+ icon: i,
9
+ ariaLabel: e,
10
+ options: m
11
+ }) => /* @__PURE__ */ l(c, { children: [
12
+ /* @__PURE__ */ r(d, { message: e, placement: "top", children: /* @__PURE__ */ r(s, { ...n, type: "button", variant: "ghost", color: "tertiary", icon: i, "aria-label": e }) }),
13
+ /* @__PURE__ */ r(t.Menu, { children: m.map((o, a) => /* @__PURE__ */ r(p, { children: o.type === "divider" ? /* @__PURE__ */ r(t.Separator, {}) : /* @__PURE__ */ r(t.Item, { icon: o.icon, onClick: () => o.action(null), children: o.label }) }, a)) })
14
14
  ] });
15
15
  export {
16
- EditorToolbarDropdownMenu
16
+ x as EditorToolbarDropdownMenu
17
17
  };
18
+ //# sourceMappingURL=EditorToolbar.DropdownMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.DropdownMenu.js","sources":["../../../../../src/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.tsx"],"sourcesContent":["import { Fragment, ReactNode, RefAttributes } from 'react';\nimport {\n Dropdown,\n DropdownMenuOptions,\n IconButton,\n IconButtonProps,\n Tooltip,\n} from '../../../..';\n\ninterface Props {\n /**\n * Props for the trigger\n */\n triggerProps: JSX.IntrinsicAttributes &\n Omit<IconButtonProps, 'ref'> &\n RefAttributes<HTMLButtonElement>;\n /**\n * Menu icon\n */\n icon: ReactNode;\n /**\n * Menu label (for accessibility)\n */\n ariaLabel: string;\n /**\n * Options to display\n */\n options: DropdownMenuOptions[];\n}\n\nexport const EditorToolbarDropdownMenu = ({\n triggerProps,\n icon,\n ariaLabel,\n options,\n}: Props) => {\n return (\n <>\n <Tooltip message={ariaLabel} placement=\"top\">\n <IconButton\n {...triggerProps}\n type=\"button\"\n variant=\"ghost\"\n color=\"tertiary\"\n icon={icon}\n aria-label={ariaLabel}\n />\n </Tooltip>\n <Dropdown.Menu>\n {options.map((option, index) => {\n return (\n <Fragment key={index}>\n {option.type === 'divider' ? (\n <Dropdown.Separator />\n ) : (\n <Dropdown.Item\n icon={option.icon}\n onClick={() => option.action(null)}\n >\n {option.label}\n </Dropdown.Item>\n )}\n </Fragment>\n );\n })}\n </Dropdown.Menu>\n </>\n );\n};\n"],"names":["EditorToolbarDropdownMenu","triggerProps","icon","ariaLabel","options","jsxs","Fragment","jsx","Tooltip","IconButton","Dropdown","map","option","index","type","action","label"],"mappings":";;;;;AA8BO,MAAMA,IAA4BA,CAAC;AAAA,EACxCC,cAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,SAAAA;AACK,MAGD,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,KAAQ,SAASL,GAAW,WAAU,OACrC,UAAA,gBAAAI,EAACE,KACC,GAAIR,GACJ,MAAK,UACL,SAAQ,SACR,OAAM,YACN,MAAAC,GACA,cAAYC,EAAU,CAAA,GAE1B;AAAA,EACA,gBAAAI,EAACG,EAAS,MAAT,EACEN,YAAQO,IAAI,CAACC,GAAQC,MAElB,gBAAAN,EAACD,GAAA,EACEM,UAAOE,EAAAA,SAAS,YACf,gBAAAP,EAACG,EAAS,WAAT,CAAqB,CAAA,IAErB,gBAAAH,EAAAG,EAAS,MAAT,EACC,MAAME,EAAOV,MACb,SAAS,MAAMU,EAAOG,OAAO,IAAI,GAEhCH,UAAAA,EAAOI,MACV,CAAA,EAAA,GATWH,CAWf,CAEH,GACH;AACF,EAAA,CAAA;"}
@@ -1,54 +1,55 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import EmojiPicker, { Categories } from "emoji-picker-react";
3
- import { useTranslation } from "react-i18next";
4
- import { useEditorContext } from "../../hooks/useEditorContext.js";
5
- import { Tooltip } from "../../../../components/Tooltip/Tooltip.js";
6
- import { IconButton } from "../../../../components/Button/IconButton.js";
7
- import { Icon } from "../../../../components/Icon/Icon.js";
8
- import { Dropdown } from "../../../../components/Dropdown/Dropdown.js";
9
- const EditorToolbarEmoji = ({
10
- triggerProps,
11
- itemRefs
1
+ import { jsxs as n, Fragment as s, jsx as e } from "react/jsx-runtime";
2
+ import p, { Categories as t } from "emoji-picker-react";
3
+ import { useTranslation as c } from "react-i18next";
4
+ import { useEditorContext as l } from "../../hooks/useEditorContext.js";
5
+ import { Tooltip as j } from "../../../../components/Tooltip/Tooltip.js";
6
+ import { IconButton as b } from "../../../../components/Button/IconButton.js";
7
+ import { Icon as g } from "../../../../components/Icon/Icon.js";
8
+ import { Dropdown as E } from "../../../../components/Dropdown/Dropdown.js";
9
+ const A = ({
10
+ triggerProps: a,
11
+ itemRefs: m
12
12
  }) => {
13
13
  const {
14
- t
15
- } = useTranslation(), {
16
- editor
17
- } = useEditorContext();
18
- return /* @__PURE__ */ jsxs(Fragment, { children: [
19
- /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.emojisPicker"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(Icon, { name: "smiley" }), "aria-label": t("tiptap.toolbar.emojisPicker") }) }),
20
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: /* @__PURE__ */ jsx("div", { ref: (el) => itemRefs.current["emoji-picker"] = el, children: /* @__PURE__ */ jsx(EmojiPicker, { height: 400, width: 316, onEmojiClick: (emoji) => editor == null ? void 0 : editor.commands.insertContentAt(editor.view.state.selection, emoji.emoji), previewConfig: {
14
+ t: o
15
+ } = c(), {
16
+ editor: r
17
+ } = l();
18
+ return /* @__PURE__ */ n(s, { children: [
19
+ /* @__PURE__ */ e(j, { message: o("tiptap.toolbar.emojisPicker"), placement: "top", children: /* @__PURE__ */ e(b, { ...a, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ e(g, { name: "smiley" }), "aria-label": o("tiptap.toolbar.emojisPicker") }) }),
20
+ /* @__PURE__ */ e(E.Menu, { children: /* @__PURE__ */ e("div", { ref: (i) => m.current["emoji-picker"] = i, children: /* @__PURE__ */ e(p, { height: 400, width: 316, onEmojiClick: (i) => r == null ? void 0 : r.commands.insertContentAt(r.view.state.selection, i.emoji), previewConfig: {
21
21
  showPreview: !1
22
22
  }, searchDisabled: !0, categories: [{
23
- category: Categories.SUGGESTED,
24
- name: `${t("tiptap.toolbar.emojis.recentlyUsed")}`
23
+ category: t.SUGGESTED,
24
+ name: `${o("tiptap.toolbar.emojis.recentlyUsed")}`
25
25
  }, {
26
- category: Categories.SMILEYS_PEOPLE,
27
- name: `${t("tiptap.toolbar.emojis.people")}`
26
+ category: t.SMILEYS_PEOPLE,
27
+ name: `${o("tiptap.toolbar.emojis.people")}`
28
28
  }, {
29
- category: Categories.ANIMALS_NATURE,
30
- name: `${t("tiptap.toolbar.emojis.animalsNature")}`
29
+ category: t.ANIMALS_NATURE,
30
+ name: `${o("tiptap.toolbar.emojis.animalsNature")}`
31
31
  }, {
32
- category: Categories.FOOD_DRINK,
33
- name: `${t("tiptap.toolbar.emojis.foodDrink")}`
32
+ category: t.FOOD_DRINK,
33
+ name: `${o("tiptap.toolbar.emojis.foodDrink")}`
34
34
  }, {
35
- category: Categories.TRAVEL_PLACES,
36
- name: `${t("tiptap.toolbar.emojis.travelPlaces")}`
35
+ category: t.TRAVEL_PLACES,
36
+ name: `${o("tiptap.toolbar.emojis.travelPlaces")}`
37
37
  }, {
38
- category: Categories.ACTIVITIES,
39
- name: `${t("tiptap.toolbar.emojis.activities")}`
38
+ category: t.ACTIVITIES,
39
+ name: `${o("tiptap.toolbar.emojis.activities")}`
40
40
  }, {
41
- category: Categories.OBJECTS,
42
- name: `${t("tiptap.toolbar.emojis.objects")}`
41
+ category: t.OBJECTS,
42
+ name: `${o("tiptap.toolbar.emojis.objects")}`
43
43
  }, {
44
- category: Categories.SYMBOLS,
45
- name: `${t("tiptap.toolbar.emojis.symbols")}`
44
+ category: t.SYMBOLS,
45
+ name: `${o("tiptap.toolbar.emojis.symbols")}`
46
46
  }, {
47
- category: Categories.FLAGS,
48
- name: `${t("tiptap.toolbar.emojis.flags")}`
47
+ category: t.FLAGS,
48
+ name: `${o("tiptap.toolbar.emojis.flags")}`
49
49
  }] }) }) })
50
50
  ] });
51
51
  };
52
52
  export {
53
- EditorToolbarEmoji
53
+ A as EditorToolbarEmoji
54
54
  };
55
+ //# sourceMappingURL=EditorToolbar.Emoji.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.Emoji.js","sources":["../../../../../src/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.tsx"],"sourcesContent":["import { RefAttributes } from 'react';\n\nimport EmojiPicker, { Categories } from 'emoji-picker-react';\nimport { useTranslation } from 'react-i18next';\n\nimport {\n Dropdown,\n Icon,\n IconButton,\n IconButtonProps,\n Tooltip,\n} from '../../../..';\nimport { useEditorContext } from '../../hooks/useEditorContext';\n\ninterface Props {\n /**\n * Props for the trigger\n */\n triggerProps: JSX.IntrinsicAttributes &\n Omit<IconButtonProps, 'ref'> &\n RefAttributes<HTMLButtonElement>;\n /**\n * Tracks refs on ColorPickers.\n */\n itemRefs: any;\n}\n\nexport const EditorToolbarEmoji = ({ triggerProps, itemRefs }: Props) => {\n const { t } = useTranslation();\n const { editor } = useEditorContext();\n\n return (\n <>\n <Tooltip message={t('tiptap.toolbar.emojisPicker')} placement=\"top\">\n <IconButton\n {...triggerProps}\n type=\"button\"\n variant=\"ghost\"\n color=\"tertiary\"\n icon={<Icon name=\"smiley\" />}\n aria-label={t('tiptap.toolbar.emojisPicker')}\n />\n </Tooltip>\n <Dropdown.Menu>\n <div ref={(el) => (itemRefs.current['emoji-picker'] = el)}>\n <EmojiPicker\n height={400}\n width={316}\n onEmojiClick={(emoji) =>\n editor?.commands.insertContentAt(\n editor.view.state.selection,\n emoji.emoji,\n )\n }\n previewConfig={{ showPreview: false }}\n searchDisabled={true}\n categories={[\n {\n category: Categories.SUGGESTED,\n name: `${t('tiptap.toolbar.emojis.recentlyUsed')}`,\n },\n {\n category: Categories.SMILEYS_PEOPLE,\n name: `${t('tiptap.toolbar.emojis.people')}`,\n },\n {\n category: Categories.ANIMALS_NATURE,\n name: `${t('tiptap.toolbar.emojis.animalsNature')}`,\n },\n {\n category: Categories.FOOD_DRINK,\n name: `${t('tiptap.toolbar.emojis.foodDrink')}`,\n },\n {\n category: Categories.TRAVEL_PLACES,\n name: `${t('tiptap.toolbar.emojis.travelPlaces')}`,\n },\n {\n category: Categories.ACTIVITIES,\n name: `${t('tiptap.toolbar.emojis.activities')}`,\n },\n {\n category: Categories.OBJECTS,\n name: `${t('tiptap.toolbar.emojis.objects')}`,\n },\n {\n category: Categories.SYMBOLS,\n name: `${t('tiptap.toolbar.emojis.symbols')}`,\n },\n {\n category: Categories.FLAGS,\n name: `${t('tiptap.toolbar.emojis.flags')}`,\n },\n ]}\n />\n </div>\n </Dropdown.Menu>\n </>\n );\n};\n"],"names":["EditorToolbarEmoji","triggerProps","itemRefs","t","useTranslation","editor","useEditorContext","jsxs","Fragment","jsx","Tooltip","IconButton","Icon","Dropdown","el","current","EmojiPicker","emoji","commands","insertContentAt","view","state","selection","showPreview","category","Categories","SUGGESTED","name","SMILEYS_PEOPLE","ANIMALS_NATURE","FOOD_DRINK","TRAVEL_PLACES","ACTIVITIES","OBJECTS","SYMBOLS","FLAGS"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAqBA,CAAC;AAAA,EAAEC,cAAAA;AAAAA,EAAcC,UAAAA;AAAgB,MAAM;AACjE,QAAA;AAAA,IAAEC,GAAAA;AAAAA,MAAMC,EAAe,GACvB;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAiB;AAEpC,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAQ,SAASP,EAAE,6BAA6B,GAAG,WAAU,OAC5D,UAAC,gBAAAM,EAAAE,GAAA,EACKV,GAAAA,GACJ,MAAK,UACL,SAAQ,SACR,OAAM,YACN,MAAM,gBAAAQ,EAACG,GAAK,EAAA,MAAK,SAAQ,CAAA,GACzB,cAAYT,EAAE,6BAA6B,EAAA,CAAE,EAEjD,CAAA;AAAA,IACC,gBAAAM,EAAAI,EAAS,MAAT,EACC,UAAC,gBAAAJ,EAAA,OAAA,EAAI,KAAMK,CAAAA,MAAQZ,EAASa,QAAQ,cAAc,IAAID,GACpD,UAAC,gBAAAL,EAAAO,GAAA,EACC,QAAQ,KACR,OAAO,KACP,cAAeC,CAAAA,MACbZ,KAAAA,gBAAAA,EAAQa,SAASC,gBACfd,EAAOe,KAAKC,MAAMC,WAClBL,EAAMA,QAGV,eAAe;AAAA,MAAEM,aAAa;AAAA,IAAA,GAC9B,gBAAgB,IAChB,YAAY,CACV;AAAA,MACEC,UAAUC,EAAWC;AAAAA,MACrBC,MAAM,GAAGxB,EAAE,oCAAoC,CAAC;AAAA,IAAA,GAElD;AAAA,MACEqB,UAAUC,EAAWG;AAAAA,MACrBD,MAAM,GAAGxB,EAAE,8BAA8B,CAAC;AAAA,IAAA,GAE5C;AAAA,MACEqB,UAAUC,EAAWI;AAAAA,MACrBF,MAAM,GAAGxB,EAAE,qCAAqC,CAAC;AAAA,IAAA,GAEnD;AAAA,MACEqB,UAAUC,EAAWK;AAAAA,MACrBH,MAAM,GAAGxB,EAAE,iCAAiC,CAAC;AAAA,IAAA,GAE/C;AAAA,MACEqB,UAAUC,EAAWM;AAAAA,MACrBJ,MAAM,GAAGxB,EAAE,oCAAoC,CAAC;AAAA,IAAA,GAElD;AAAA,MACEqB,UAAUC,EAAWO;AAAAA,MACrBL,MAAM,GAAGxB,EAAE,kCAAkC,CAAC;AAAA,IAAA,GAEhD;AAAA,MACEqB,UAAUC,EAAWQ;AAAAA,MACrBN,MAAM,GAAGxB,EAAE,+BAA+B,CAAC;AAAA,IAAA,GAE7C;AAAA,MACEqB,UAAUC,EAAWS;AAAAA,MACrBP,MAAM,GAAGxB,EAAE,+BAA+B,CAAC;AAAA,IAAA,GAE7C;AAAA,MACEqB,UAAUC,EAAWU;AAAAA,MACrBR,MAAM,GAAGxB,EAAE,6BAA6B,CAAC;AAAA,IAAA,CAC1C,EACD,CAAA,EAEN,CAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1,47 +1,48 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useState, useMemo, useCallback, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import { useEditorContext } from "../../hooks/useEditorContext.js";
5
- import { DefaultPalette } from "../../../../components/ColorPicker/ColorPalette.js";
6
- import { ColorPicker } from "../../../../components/ColorPicker/ColorPicker.js";
7
- import { Tooltip } from "../../../../components/Tooltip/Tooltip.js";
8
- import { IconButton } from "../../../../components/Button/IconButton.js";
9
- import { Icon } from "../../../../components/Icon/Icon.js";
10
- import { Dropdown } from "../../../../components/Dropdown/Dropdown.js";
11
- const EditorToolbarHighlightColor = ({
12
- triggerProps,
13
- itemRefs
1
+ import { jsxs as h, Fragment as p, jsx as r } from "react/jsx-runtime";
2
+ import { useState as g, useMemo as u, useCallback as f, useEffect as b } from "react";
3
+ import { useTranslation as A } from "react-i18next";
4
+ import { useEditorContext as C } from "../../hooks/useEditorContext.js";
5
+ import { DefaultPalette as k } from "../../../../components/ColorPicker/ColorPalette.js";
6
+ import { ColorPicker as x } from "../../../../components/ColorPicker/ColorPicker.js";
7
+ import { Tooltip as H } from "../../../../components/Tooltip/Tooltip.js";
8
+ import { IconButton as y } from "../../../../components/Button/IconButton.js";
9
+ import { Icon as E } from "../../../../components/Icon/Icon.js";
10
+ import { Dropdown as T } from "../../../../components/Dropdown/Dropdown.js";
11
+ const N = ({
12
+ triggerProps: c,
13
+ itemRefs: l
14
14
  }) => {
15
15
  const {
16
- t
17
- } = useTranslation(), {
18
- editor
19
- } = useEditorContext(), [color, setColor] = useState("#4A4A4A"), isActive = useMemo(
20
- () => editor == null ? void 0 : editor.isActive("customHighlight", {
16
+ t: e
17
+ } = A(), {
18
+ editor: t
19
+ } = C(), [i, s] = g("#4A4A4A"), n = u(
20
+ () => t == null ? void 0 : t.isActive("customHighlight", {
21
21
  color: /^#([0-9a-f]{3}){1,2}$/i
22
22
  }),
23
23
  // eslint-disable-next-line react-hooks/exhaustive-deps
24
- [editor, editor == null ? void 0 : editor.state]
25
- ), applyColor = useCallback((value) => {
26
- value === color || value === "" ? (setColor(""), editor == null || editor.chain().focus().unsetHighlight().run()) : (setColor(value), editor == null || editor.chain().focus().setHighlight({
27
- color: value
24
+ [t, t == null ? void 0 : t.state]
25
+ ), a = f((o) => {
26
+ o === i || o === "" ? (s(""), t == null || t.chain().focus().unsetHighlight().run()) : (s(o), t == null || t.chain().focus().setHighlight({
27
+ color: o
28
28
  }).run());
29
- }, [color, editor]);
30
- useEffect(() => {
31
- setColor((editor == null ? void 0 : editor.getAttributes("customHighlight").color) ?? "");
32
- }, [editor, editor == null ? void 0 : editor.state]);
33
- const palettes = [{
34
- ...DefaultPalette,
29
+ }, [i, t]);
30
+ b(() => {
31
+ s((t == null ? void 0 : t.getAttributes("customHighlight").color) ?? "");
32
+ }, [t, t == null ? void 0 : t.state]);
33
+ const m = [{
34
+ ...k,
35
35
  reset: {
36
36
  value: "transparent",
37
- description: t("tiptap.toolbar.highlight.none")
37
+ description: e("tiptap.toolbar.highlight.none")
38
38
  }
39
39
  }];
40
- return /* @__PURE__ */ jsxs(Fragment, { children: [
41
- /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.highlight.back"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(Icon, { name: "text-highlight" }), "aria-label": t("tiptap.toolbar.highlight.back"), className: isActive ? "selected" : "" }) }),
42
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: /* @__PURE__ */ jsx(ColorPicker, { ref: (el) => itemRefs.current["color-picker"] = el, palettes, model: color, onSuccess: (item) => applyColor(item.value) }) })
40
+ return /* @__PURE__ */ h(p, { children: [
41
+ /* @__PURE__ */ r(H, { message: e("tiptap.toolbar.highlight.back"), placement: "top", children: /* @__PURE__ */ r(y, { ...c, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ r(E, { name: "text-highlight" }), "aria-label": e("tiptap.toolbar.highlight.back"), className: n ? "selected" : "" }) }),
42
+ /* @__PURE__ */ r(T.Menu, { children: /* @__PURE__ */ r(x, { ref: (o) => l.current["color-picker"] = o, palettes: m, model: i, onSuccess: (o) => a(o.value) }) })
43
43
  ] });
44
44
  };
45
45
  export {
46
- EditorToolbarHighlightColor
46
+ N as EditorToolbarHighlightColor
47
47
  };
48
+ //# sourceMappingURL=EditorToolbar.HighlightColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.HighlightColor.js","sources":["../../../../../src/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.tsx"],"sourcesContent":["import {\n RefAttributes,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { useTranslation } from 'react-i18next';\n\nimport {\n ColorPalette,\n ColorPicker,\n DefaultPalette,\n Dropdown,\n Icon,\n IconButton,\n IconButtonProps,\n Tooltip,\n} from '../../../..';\nimport { useEditorContext } from '../../hooks/useEditorContext';\n\ninterface Props {\n /**\n * Props for the trigger\n */\n triggerProps: JSX.IntrinsicAttributes &\n Omit<IconButtonProps, 'ref'> &\n RefAttributes<HTMLButtonElement>;\n /**\n * Tracks refs on ColorPickers.\n */\n itemRefs: any;\n}\n\nexport const EditorToolbarHighlightColor = ({\n triggerProps,\n itemRefs,\n}: Props) => {\n const { t } = useTranslation();\n const { editor } = useEditorContext();\n\n // Manage text and background colors.\n const [color, setColor] = useState<string>('#4A4A4A');\n\n const isActive = useMemo(\n () =>\n editor?.isActive('customHighlight', {\n color: /^#([0-9a-f]{3}){1,2}$/i,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, editor?.state],\n );\n\n // Triggered when the user chooses a highlighting color.\n const applyColor = useCallback(\n (value: string) => {\n // If the same color is picked, remove it (=toggle mode).\n if (value === color || value === '') {\n setColor('');\n editor?.chain().focus().unsetHighlight().run();\n } else {\n setColor(value);\n editor?.chain().focus().setHighlight({ color: value }).run();\n }\n },\n [color, editor],\n );\n\n // When cursor moves in table, update the current highlight color.\n useEffect(() => {\n setColor(editor?.getAttributes('customHighlight').color ?? '');\n }, [editor, editor?.state]);\n\n // Palettes of available colors to choose from.\n const palettes: ColorPalette[] = [\n {\n ...DefaultPalette,\n reset: {\n value: 'transparent',\n description: t('tiptap.toolbar.highlight.none'),\n },\n },\n ];\n\n return (\n <>\n <Tooltip message={t('tiptap.toolbar.highlight.back')} placement=\"top\">\n <IconButton\n {...triggerProps}\n type=\"button\"\n variant=\"ghost\"\n color=\"tertiary\"\n icon={<Icon name=\"text-highlight\" />}\n aria-label={t('tiptap.toolbar.highlight.back')}\n className={isActive ? 'selected' : ''}\n />\n </Tooltip>\n <Dropdown.Menu>\n <ColorPicker\n ref={(el: any) => (itemRefs.current['color-picker'] = el)}\n palettes={palettes}\n model={color}\n onSuccess={(item) => applyColor(item.value)}\n />\n </Dropdown.Menu>\n </>\n );\n};\n"],"names":["EditorToolbarHighlightColor","triggerProps","itemRefs","t","useTranslation","editor","useEditorContext","color","setColor","useState","isActive","useMemo","state","applyColor","useCallback","value","chain","focus","unsetHighlight","run","setHighlight","useEffect","getAttributes","palettes","DefaultPalette","reset","description","jsxs","Fragment","jsx","Tooltip","IconButton","Icon","Dropdown","ColorPicker","el","current","item"],"mappings":";;;;;;;;;;AAmCO,MAAMA,IAA8BA,CAAC;AAAA,EAC1CC,cAAAA;AAAAA,EACAC,UAAAA;AACK,MAAM;AACL,QAAA;AAAA,IAAEC,GAAAA;AAAAA,MAAMC,EAAe,GACvB;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAiB,GAG9B,CAACC,GAAOC,CAAQ,IAAIC,EAAiB,SAAS,GAE9CC,IAAWC;AAAAA,IACf,MACEN,KAAAA,gBAAAA,EAAQK,SAAS,mBAAmB;AAAA,MAClCH,OAAO;AAAA,IAAA;AAAA;AAAA,IAGX,CAACF,GAAQA,KAAAA,gBAAAA,EAAQO,KAAK;AAAA,EAAA,GAIlBC,IAAaC,EACjB,CAACC,MAAkB;AAEbA,IAAAA,MAAUR,KAASQ,MAAU,MAC/BP,EAAS,EAAE,GACXH,KAAAA,QAAAA,EAAQW,QAAQC,QAAQC,iBAAiBC,UAEzCX,EAASO,CAAK,GACdV,KAAAA,QAAAA,EAAQW,QAAQC,QAAQG,aAAa;AAAA,MAAEb,OAAOQ;AAAAA,IAAAA,GAASI;AAAAA,EACzD,GAEF,CAACZ,GAAOF,CAAM,CAChB;AAGAgB,EAAAA,EAAU,MAAM;AACdb,IAAAA,GAASH,KAAAA,gBAAAA,EAAQiB,cAAc,mBAAmBf,UAAS,EAAE;AAAA,EAC5D,GAAA,CAACF,GAAQA,KAAAA,gBAAAA,EAAQO,KAAK,CAAC;AAG1B,QAAMW,IAA2B,CAC/B;AAAA,IACE,GAAGC;AAAAA,IACHC,OAAO;AAAA,MACLV,OAAO;AAAA,MACPW,aAAavB,EAAE,+BAA+B;AAAA,IAChD;AAAA,EAAA,CACD;AAGH,SAEI,gBAAAwB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAQ,EAAA,SAAS3B,EAAE,+BAA+B,GAAG,WAAU,OAC9D,UAAA,gBAAA0B,EAACE,GACC,EAAA,GAAI9B,GACJ,MAAK,UACL,SAAQ,SACR,OAAM,YACN,MAAM,gBAAA4B,EAACG,GAAK,EAAA,MAAK,kBAAmB,GACpC,cAAY7B,EAAE,+BAA+B,GAC7C,WAAWO,IAAW,aAAa,GAAG,CAAA,GAE1C;AAAA,IACA,gBAAAmB,EAACI,EAAS,MAAT,EACC,4BAACC,GACC,EAAA,KAAK,CAACC,MAAajC,EAASkC,QAAQ,cAAc,IAAID,GACtD,UAAAZ,GACA,OAAOhB,GACP,WAAY8B,OAASxB,EAAWwB,EAAKtB,KAAK,EAAA,CAAE,EAEhD,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1,18 +1,19 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { Fragment as Fragment$1 } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import { Dropdown } from "../../../../components/Dropdown/Dropdown.js";
5
- const EditorToolbarPlusMenu = ({
6
- options
1
+ import { jsxs as i, Fragment as l, jsx as r } from "react/jsx-runtime";
2
+ import { Fragment as m } from "react";
3
+ import { useTranslation as s } from "react-i18next";
4
+ import { Dropdown as t } from "../../../../components/Dropdown/Dropdown.js";
5
+ const g = ({
6
+ options: n
7
7
  }) => {
8
8
  const {
9
- t
10
- } = useTranslation();
11
- return /* @__PURE__ */ jsxs(Fragment, { children: [
12
- /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.toolbar.plus"), size: "md", tabIndex: -1 }),
13
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: options.map((option, index) => /* @__PURE__ */ jsx(Fragment$1, { children: option.type === "divider" ? /* @__PURE__ */ jsx(Dropdown.Separator, {}) : /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => option.action(null), children: option.label }) }, index)) })
9
+ t: o
10
+ } = s();
11
+ return /* @__PURE__ */ i(l, { children: [
12
+ /* @__PURE__ */ r(t.Trigger, { variant: "ghost", label: o("tiptap.toolbar.plus"), size: "md", tabIndex: -1 }),
13
+ /* @__PURE__ */ r(t.Menu, { children: n.map((e, a) => /* @__PURE__ */ r(m, { children: e.type === "divider" ? /* @__PURE__ */ r(t.Separator, {}) : /* @__PURE__ */ r(t.Item, { icon: e.icon, onClick: () => e.action(null), children: e.label }) }, a)) })
14
14
  ] });
15
15
  };
16
16
  export {
17
- EditorToolbarPlusMenu
17
+ g as EditorToolbarPlusMenu
18
18
  };
19
+ //# sourceMappingURL=EditorToolbar.PlusMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.PlusMenu.js","sources":["../../../../../src/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.tsx"],"sourcesContent":["import { Fragment } from 'react';\n\nimport { useTranslation } from 'react-i18next';\nimport { Dropdown, DropdownMenuOptions } from '../../../..';\n\ninterface Props {\n /**\n * Options to display\n */\n options: DropdownMenuOptions[];\n}\n\nexport const EditorToolbarPlusMenu = ({ options }: Props) => {\n const { t } = useTranslation();\n\n return (\n <>\n <Dropdown.Trigger\n variant=\"ghost\"\n label={t('tiptap.toolbar.plus')}\n size=\"md\"\n tabIndex={-1}\n />\n <Dropdown.Menu>\n {options.map((option, index) => {\n return (\n <Fragment key={index}>\n {option.type === 'divider' ? (\n <Dropdown.Separator />\n ) : (\n <Dropdown.Item\n icon={option.icon}\n onClick={() => option.action(null)}\n >\n {option.label}\n </Dropdown.Item>\n )}\n </Fragment>\n );\n })}\n </Dropdown.Menu>\n </>\n );\n};\n"],"names":["EditorToolbarPlusMenu","options","t","useTranslation","jsxs","Fragment","jsx","Dropdown","map","option","index","type","icon","action","label"],"mappings":";;;;AAYO,MAAMA,IAAwBA,CAAC;AAAA,EAAEC,SAAAA;AAAe,MAAM;AACrD,QAAA;AAAA,IAAEC,GAAAA;AAAAA,MAAMC,EAAe;AAE7B,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,EAAS,SAAT,EACC,SAAQ,SACR,OAAOL,EAAE,qBAAqB,GAC9B,MAAK,MACL,UAAU,GAAG,CAAA;AAAA,IAEf,gBAAAI,EAACC,EAAS,MAAT,EACEN,YAAQO,IAAI,CAACC,GAAQC,MAElB,gBAAAJ,EAACD,GAAA,EACEI,UAAOE,EAAAA,SAAS,YACf,gBAAAL,EAACC,EAAS,WAAT,CAAqB,CAAA,IAErB,gBAAAD,EAAAC,EAAS,MAAT,EACC,MAAME,EAAOG,MACb,SAAS,MAAMH,EAAOI,OAAO,IAAI,GAEhCJ,UAAAA,EAAOK,MACV,CAAA,EAAA,GATWJ,CAWf,CAEH,GACH;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1,50 +1,51 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useState, useMemo, useCallback, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import { useEditorContext } from "../../hooks/useEditorContext.js";
5
- import { DefaultPalette, AccessiblePalette } from "../../../../components/ColorPicker/ColorPalette.js";
6
- import { Tooltip } from "../../../../components/Tooltip/Tooltip.js";
7
- import { IconButton } from "../../../../components/Button/IconButton.js";
8
- import { Icon } from "../../../../components/Icon/Icon.js";
9
- import { Dropdown } from "../../../../components/Dropdown/Dropdown.js";
10
- import { ColorPicker } from "../../../../components/ColorPicker/ColorPicker.js";
11
- const EditorToolbarTextColor = ({
12
- triggerProps,
13
- itemRefs
1
+ import { jsxs as m, Fragment as f, jsx as r } from "react/jsx-runtime";
2
+ import { useState as u, useMemo as b, useCallback as x, useEffect as A } from "react";
3
+ import { useTranslation as h } from "react-i18next";
4
+ import { useEditorContext as C } from "../../hooks/useEditorContext.js";
5
+ import { DefaultPalette as g, AccessiblePalette as y } from "../../../../components/ColorPicker/ColorPalette.js";
6
+ import { Tooltip as T } from "../../../../components/Tooltip/Tooltip.js";
7
+ import { IconButton as k } from "../../../../components/Button/IconButton.js";
8
+ import { Icon as E } from "../../../../components/Icon/Icon.js";
9
+ import { Dropdown as P } from "../../../../components/Dropdown/Dropdown.js";
10
+ import { ColorPicker as S } from "../../../../components/ColorPicker/ColorPicker.js";
11
+ const q = ({
12
+ triggerProps: a,
13
+ itemRefs: s
14
14
  }) => {
15
15
  const {
16
- t
17
- } = useTranslation(), {
18
- editor
19
- } = useEditorContext(), [color, setColor] = useState("#4A4A4A"), isActive = useMemo(
20
- () => editor == null ? void 0 : editor.isActive("textStyle", {
16
+ t: e
17
+ } = h(), {
18
+ editor: o
19
+ } = C(), [l, c] = u("#4A4A4A"), n = b(
20
+ () => o == null ? void 0 : o.isActive("textStyle", {
21
21
  color: /^#([0-9a-f]{3}){1,2}$/i
22
22
  }),
23
23
  // eslint-disable-next-line react-hooks/exhaustive-deps
24
- [editor, editor == null ? void 0 : editor.state]
25
- ), applyColor = useCallback((value) => {
26
- value === color ? (setColor(""), editor == null || editor.chain().focus().unsetColor().run()) : (setColor(value), editor == null || editor.chain().focus().setColor(value).run());
27
- }, [color, editor]);
28
- useEffect(() => {
29
- const textStyle = editor == null ? void 0 : editor.getAttributes("textStyle");
30
- setColor((textStyle == null ? void 0 : textStyle.color) ?? "#4A4A4A");
31
- }, [editor, editor == null ? void 0 : editor.state]);
32
- const palettes = [{
33
- ...DefaultPalette,
34
- label: t("tiptap.toolbar.color.text")
24
+ [o, o == null ? void 0 : o.state]
25
+ ), p = x((t) => {
26
+ t === l ? (c(""), o == null || o.chain().focus().unsetColor().run()) : (c(t), o == null || o.chain().focus().setColor(t).run());
27
+ }, [l, o]);
28
+ A(() => {
29
+ const t = o == null ? void 0 : o.getAttributes("textStyle");
30
+ c((t == null ? void 0 : t.color) ?? "#4A4A4A");
31
+ }, [o, o == null ? void 0 : o.state]);
32
+ const i = [{
33
+ ...g,
34
+ label: e("tiptap.toolbar.color.text")
35
35
  }, {
36
- ...AccessiblePalette,
37
- label: t("tiptap.toolbar.color.a13y"),
36
+ ...y,
37
+ label: e("tiptap.toolbar.color.a13y"),
38
38
  tooltip: {
39
- message: t("tiptap.toolbar.color.a13y.hint"),
39
+ message: e("tiptap.toolbar.color.a13y.hint"),
40
40
  placement: "right"
41
41
  }
42
42
  }];
43
- return /* @__PURE__ */ jsxs(Fragment, { children: [
44
- /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.color.text"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(Icon, { name: "text-color" }), "aria-label": t("tiptap.toolbar.color.text"), className: isActive ? "selected" : "" }) }),
45
- /* @__PURE__ */ jsx(Dropdown.Menu, { children: /* @__PURE__ */ jsx(ColorPicker, { ref: (el) => itemRefs.current["color-picker"] = el, model: color, palettes, onSuccess: (item) => applyColor(item.value) }) })
43
+ return /* @__PURE__ */ m(f, { children: [
44
+ /* @__PURE__ */ r(T, { message: e("tiptap.toolbar.color.text"), placement: "top", children: /* @__PURE__ */ r(k, { ...a, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ r(E, { name: "text-color" }), "aria-label": e("tiptap.toolbar.color.text"), className: n ? "selected" : "" }) }),
45
+ /* @__PURE__ */ r(P.Menu, { children: /* @__PURE__ */ r(S, { ref: (t) => s.current["color-picker"] = t, model: l, palettes: i, onSuccess: (t) => p(t.value) }) })
46
46
  ] });
47
47
  };
48
48
  export {
49
- EditorToolbarTextColor
49
+ q as EditorToolbarTextColor
50
50
  };
51
+ //# sourceMappingURL=EditorToolbar.TextColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.TextColor.js","sources":["../../../../../src/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.tsx"],"sourcesContent":["import {\n RefAttributes,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { useTranslation } from 'react-i18next';\n\nimport {\n AccessiblePalette,\n ColorPalette,\n ColorPicker,\n DefaultPalette,\n Dropdown,\n Icon,\n IconButton,\n IconButtonProps,\n Tooltip,\n} from '../../../..';\nimport { useEditorContext } from '../../hooks/useEditorContext';\n\ninterface Props {\n /**\n * Props for the trigger\n */\n triggerProps: JSX.IntrinsicAttributes &\n Omit<IconButtonProps, 'ref'> &\n RefAttributes<HTMLButtonElement>;\n /**\n * Tracks refs on ColorPickers.\n */\n itemRefs: any;\n}\n\nexport const EditorToolbarTextColor = ({ triggerProps, itemRefs }: Props) => {\n const { t } = useTranslation();\n const { editor } = useEditorContext();\n\n // Manage text and background colors.\n const [color, setColor] = useState<string>('#4A4A4A');\n\n const isActive = useMemo(\n () =>\n editor?.isActive('textStyle', {\n color: /^#([0-9a-f]{3}){1,2}$/i,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, editor?.state],\n );\n\n // Triggered when the user chooses a color for cells background.\n const applyColor = useCallback(\n (value: string) => {\n // If the same color is picked, remove it (=toggle mode).\n if (value === color) {\n setColor('');\n editor?.chain().focus().unsetColor().run();\n } else {\n setColor(value);\n editor?.chain().focus().setColor(value).run();\n }\n },\n [color, editor],\n );\n\n // When cursor moves in table, update the current text color.\n useEffect(() => {\n const textStyle = editor?.getAttributes('textStyle');\n setColor(textStyle?.color ?? '#4A4A4A');\n }, [editor, editor?.state]);\n\n // Palettes of available colors to choose from.\n const palettes: ColorPalette[] = [\n { ...DefaultPalette, label: t('tiptap.toolbar.color.text') },\n {\n ...AccessiblePalette,\n label: t('tiptap.toolbar.color.a13y'),\n tooltip: {\n message: t('tiptap.toolbar.color.a13y.hint'),\n placement: 'right',\n },\n },\n ];\n\n return (\n <>\n <Tooltip message={t('tiptap.toolbar.color.text')} placement=\"top\">\n <IconButton\n {...triggerProps}\n type=\"button\"\n variant=\"ghost\"\n color=\"tertiary\"\n icon={<Icon name=\"text-color\" />}\n aria-label={t('tiptap.toolbar.color.text')}\n className={isActive ? 'selected' : ''}\n />\n </Tooltip>\n <Dropdown.Menu>\n <ColorPicker\n ref={(el: any) => (itemRefs.current['color-picker'] = el)}\n model={color}\n palettes={palettes}\n onSuccess={(item) => applyColor(item.value)}\n />\n </Dropdown.Menu>\n </>\n );\n};\n"],"names":["EditorToolbarTextColor","triggerProps","itemRefs","t","useTranslation","editor","useEditorContext","color","setColor","useState","isActive","useMemo","state","applyColor","useCallback","value","chain","focus","unsetColor","run","useEffect","textStyle","getAttributes","palettes","DefaultPalette","label","AccessiblePalette","tooltip","message","placement","jsxs","Fragment","jsx","Tooltip","IconButton","Icon","Dropdown","ColorPicker","el","current","item"],"mappings":";;;;;;;;;;AAoCO,MAAMA,IAAyBA,CAAC;AAAA,EAAEC,cAAAA;AAAAA,EAAcC,UAAAA;AAAgB,MAAM;AACrE,QAAA;AAAA,IAAEC,GAAAA;AAAAA,MAAMC,EAAe,GACvB;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAiB,GAG9B,CAACC,GAAOC,CAAQ,IAAIC,EAAiB,SAAS,GAE9CC,IAAWC;AAAAA,IACf,MACEN,KAAAA,gBAAAA,EAAQK,SAAS,aAAa;AAAA,MAC5BH,OAAO;AAAA,IAAA;AAAA;AAAA,IAGX,CAACF,GAAQA,KAAAA,gBAAAA,EAAQO,KAAK;AAAA,EAAA,GAIlBC,IAAaC,EACjB,CAACC,MAAkB;AAEjB,IAAIA,MAAUR,KACZC,EAAS,EAAE,GACXH,KAAAA,QAAAA,EAAQW,QAAQC,QAAQC,aAAaC,UAErCX,EAASO,CAAK,GACdV,KAAAA,QAAAA,EAAQW,QAAQC,QAAQT,SAASO,GAAOI;AAAAA,EAC1C,GAEF,CAACZ,GAAOF,CAAM,CAChB;AAGAe,EAAAA,EAAU,MAAM;AACRC,UAAAA,IAAYhB,KAAAA,gBAAAA,EAAQiB,cAAc;AAC/BD,IAAAA,GAAAA,KAAAA,gBAAAA,EAAWd,UAAS,SAAS;AAAA,EACrC,GAAA,CAACF,GAAQA,KAAAA,gBAAAA,EAAQO,KAAK,CAAC;AAG1B,QAAMW,IAA2B,CAC/B;AAAA,IAAE,GAAGC;AAAAA,IAAgBC,OAAOtB,EAAE,2BAA2B;AAAA,EAAA,GACzD;AAAA,IACE,GAAGuB;AAAAA,IACHD,OAAOtB,EAAE,2BAA2B;AAAA,IACpCwB,SAAS;AAAA,MACPC,SAASzB,EAAE,gCAAgC;AAAA,MAC3C0B,WAAW;AAAA,IACb;AAAA,EAAA,CACD;AAGH,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAQ,EAAA,SAAS9B,EAAE,2BAA2B,GAAG,WAAU,OAC1D,UAAA,gBAAA6B,EAACE,GACC,EAAA,GAAIjC,GACJ,MAAK,UACL,SAAQ,SACR,OAAM,YACN,MAAM,gBAAA+B,EAACG,GAAK,EAAA,MAAK,cAAe,GAChC,cAAYhC,EAAE,2BAA2B,GACzC,WAAWO,IAAW,aAAa,GAAG,CAAA,GAE1C;AAAA,IACA,gBAAAsB,EAACI,EAAS,MAAT,EACC,4BAACC,GACC,EAAA,KAAK,CAACC,MAAapC,EAASqC,QAAQ,cAAc,IAAID,GACtD,OAAO/B,GACP,UAAAgB,GACA,WAAYiB,OAAS3B,EAAW2B,EAAKzB,KAAK,EAAA,CAAE,EAEhD,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;"}