@edifice.io/react 2.0.0-develop-rc.12 → 2.0.0-develop-rc.13

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 (879) hide show
  1. package/README.md +88 -17
  2. package/dist/common/OnboardingModal/OnboardingModal.js +59 -0
  3. package/dist/common/OnboardingModal/useOnboardingModal.js +30 -0
  4. package/dist/{modules/modals → common}/PublishModal/PublishModal.d.ts +1 -1
  5. package/dist/common/PublishModal/PublishModal.js +120 -0
  6. package/dist/common/PublishModal/components/ActivitiesDropdown.js +29 -0
  7. package/dist/common/PublishModal/components/AgeSelect.js +20 -0
  8. package/dist/common/PublishModal/components/LangSelect.js +19 -0
  9. package/dist/common/PublishModal/components/PublishModalFooter.js +23 -0
  10. package/dist/common/PublishModal/components/SubjectsDropdown.js +29 -0
  11. package/dist/common/PublishModal/components/ToastError.js +24 -0
  12. package/dist/{modules/modals → common}/PublishModal/components/ToastSuccess.d.ts +1 -1
  13. package/dist/common/PublishModal/components/ToastSuccess.js +18 -0
  14. package/dist/common/PublishModal/constants/ageOptions.js +4 -0
  15. package/dist/{modules/modals → common}/PublishModal/hooks/useActivitiesOptions.js +4 -5
  16. package/dist/common/PublishModal/hooks/useLanguageOptions.js +43 -0
  17. package/dist/{modules/modals → common}/PublishModal/hooks/usePublishModal.d.ts +1 -1
  18. package/dist/common/PublishModal/hooks/usePublishModal.js +106 -0
  19. package/dist/{modules/modals → common}/PublishModal/hooks/useSubjectsOptions.js +41 -42
  20. package/dist/{modules/modals → common}/ResourceModal/ResourceModal.d.ts +3 -3
  21. package/dist/common/ResourceModal/ResourceModal.js +156 -0
  22. package/dist/{modules/modals → common}/ResourceModal/apps/BlogPublic.d.ts +2 -2
  23. package/dist/common/ResourceModal/apps/BlogPublic.js +62 -0
  24. package/dist/{modules/modals → common}/ResourceModal/hooks/useSlug.d.ts +1 -1
  25. package/dist/common/ResourceModal/hooks/useSlug.js +41 -0
  26. package/dist/{modules/modals → common}/ResourceModal/hooks/useThumb.d.ts +1 -1
  27. package/dist/common/ResourceModal/hooks/useThumb.js +17 -0
  28. package/dist/{modules/modals → common}/ResourceModal/hooks/useUpdateMutation.d.ts +3 -3
  29. package/dist/common/ResourceModal/hooks/useUpdateMutation.js +12 -0
  30. package/dist/common/ResourceModal/index.d.ts +3 -0
  31. package/dist/common/ShareModal/ShareBookmark.js +22 -0
  32. package/dist/{modules/modals → common}/ShareModal/ShareBookmarkLine.d.ts +1 -1
  33. package/dist/common/ShareModal/ShareBookmarkLine.js +42 -0
  34. package/dist/{modules/modals → common}/ShareModal/ShareModal.d.ts +2 -2
  35. package/dist/common/ShareModal/ShareModal.js +128 -0
  36. package/dist/common/ShareModal/apps/ShareBlog.d.ts +8 -0
  37. package/dist/common/ShareModal/apps/ShareBlog.js +43 -0
  38. package/dist/{modules/modals → common}/ShareModal/hooks/useSearch.d.ts +2 -2
  39. package/dist/common/ShareModal/hooks/useSearch.js +178 -0
  40. package/dist/{modules/modals → common}/ShareModal/hooks/useShare.d.ts +1 -1
  41. package/dist/common/ShareModal/hooks/useShare.js +192 -0
  42. package/dist/{modules/modals → common}/ShareModal/hooks/useShareBookmark.d.ts +1 -1
  43. package/dist/common/ShareModal/hooks/useShareBookmark.js +67 -0
  44. package/dist/{modules/modals → common}/ShareModal/hooks/useShareMutation.d.ts +3 -3
  45. package/dist/common/ShareModal/hooks/useShareMutation.js +15 -0
  46. package/dist/common/ShareModal/index.d.ts +3 -0
  47. package/dist/{modules/modals → common}/ShareModal/utils/hasRight.d.ts +1 -1
  48. package/dist/common/ShareModal/utils/hasRight.js +4 -0
  49. package/dist/{modules/modals → common}/ShareModal/utils/showShareRightLine.d.ts +1 -1
  50. package/dist/common/ShareModal/utils/showShareRightLine.js +4 -0
  51. package/dist/components/ActionBar/ActionBar.d.ts +1 -1
  52. package/dist/components/ActionBar/ActionBar.js +6 -8
  53. package/dist/components/ActionBar/index.d.ts +1 -0
  54. package/dist/components/Alert/Alert.d.ts +1 -1
  55. package/dist/components/Alert/Alert.js +60 -62
  56. package/dist/components/Alert/index.d.ts +1 -0
  57. package/dist/components/AppHeader/AppHeader.d.ts +1 -1
  58. package/dist/components/AppHeader/AppHeader.js +18 -20
  59. package/dist/components/AppHeader/index.d.ts +1 -0
  60. package/dist/components/AppIcon/AppIcon.d.ts +1 -1
  61. package/dist/components/AppIcon/AppIcon.js +44 -45
  62. package/dist/components/Attachment/Attachment.d.ts +1 -1
  63. package/dist/components/Attachment/Attachment.js +13 -15
  64. package/dist/components/Attachment/index.d.ts +1 -0
  65. package/dist/{modules/audience → components/Audience}/ReactionChoice.d.ts +1 -1
  66. package/dist/components/Audience/ReactionChoice.js +33 -0
  67. package/dist/{modules/audience → components/Audience}/ReactionModal.Card.d.ts +1 -1
  68. package/dist/components/Audience/ReactionModal.Card.js +33 -0
  69. package/dist/{modules/audience → components/Audience}/ReactionModal.d.ts +1 -1
  70. package/dist/components/Audience/ReactionModal.js +73 -0
  71. package/dist/{modules/audience → components/Audience}/ReactionSummary.d.ts +1 -1
  72. package/dist/components/Audience/ReactionSummary.js +27 -0
  73. package/dist/{modules/audience → components/Audience}/ViewsByProfileCard.d.ts +1 -1
  74. package/dist/components/Audience/ViewsByProfileCard.js +36 -0
  75. package/dist/components/Audience/ViewsCounter.js +18 -0
  76. package/dist/{modules/audience → components/Audience}/ViewsModal.d.ts +1 -1
  77. package/dist/components/Audience/ViewsModal.js +40 -0
  78. package/dist/{modules/audience → components/Audience}/hooks/useReactionIcons.d.ts +1 -1
  79. package/dist/components/Audience/hooks/useReactionIcons.js +38 -0
  80. package/dist/{modules/audience → components/Audience}/hooks/useReactions.d.ts +3 -3
  81. package/dist/components/Audience/hooks/useReactions.js +35 -0
  82. package/dist/{modules/audience → components/Audience}/hooks/useViews.d.ts +2 -2
  83. package/dist/components/Avatar/Avatar.d.ts +1 -1
  84. package/dist/components/Avatar/Avatar.js +27 -29
  85. package/dist/components/Avatar/index.d.ts +1 -0
  86. package/dist/components/Badge/Badge.d.ts +1 -1
  87. package/dist/components/Badge/Badge.js +20 -22
  88. package/dist/components/Badge/index.d.ts +1 -0
  89. package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  90. package/dist/components/Breadcrumb/Breadcrumb.js +23 -24
  91. package/dist/components/Breadcrumb/BreadcrumbItem.js +11 -12
  92. package/dist/components/Breadcrumb/BreadcrumbList.js +10 -11
  93. package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
  94. package/dist/components/Breadcrumb/BreadcrumbNav.js +15 -16
  95. package/dist/components/Button/Button.d.ts +1 -1
  96. package/dist/components/Button/Button.js +32 -34
  97. package/dist/components/Button/IconButton.d.ts +1 -1
  98. package/dist/components/Button/IconButton.js +15 -17
  99. package/dist/components/Button/SearchButton.d.ts +1 -1
  100. package/dist/components/Button/SearchButton.js +15 -17
  101. package/dist/components/Button/index.d.ts +3 -0
  102. package/dist/components/Card/Card.d.ts +4 -4
  103. package/dist/components/Card/Card.js +47 -49
  104. package/dist/components/Card/CardBody.d.ts +1 -1
  105. package/dist/components/Card/CardBody.js +13 -14
  106. package/dist/components/Card/CardContext.d.ts +1 -1
  107. package/dist/components/Card/CardContext.js +7 -8
  108. package/dist/components/Card/CardFooter.js +5 -6
  109. package/dist/components/Card/CardHeader.js +14 -15
  110. package/dist/components/Card/CardImage.d.ts +1 -1
  111. package/dist/components/Card/CardImage.js +13 -14
  112. package/dist/components/Card/CardText.js +8 -9
  113. package/dist/components/Card/CardTitle.js +8 -9
  114. package/dist/components/Card/CardUser.js +8 -9
  115. package/dist/components/Card/index.d.ts +1 -0
  116. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  117. package/dist/components/Checkbox/Checkbox.js +30 -32
  118. package/dist/components/Checkbox/index.d.ts +1 -0
  119. package/dist/components/ColorPicker/ColorPalette.js +4 -5
  120. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  121. package/dist/components/ColorPicker/ColorPicker.js +28 -30
  122. package/dist/components/ColorPicker/ColorPickerItem.d.ts +1 -1
  123. package/dist/components/ColorPicker/ColorPickerItem.js +11 -13
  124. package/dist/components/ColorPicker/index.d.ts +3 -1
  125. package/dist/components/Combobox/Combobox.d.ts +1 -1
  126. package/dist/components/Combobox/Combobox.js +35 -36
  127. package/dist/components/Combobox/ComboboxTrigger.js +21 -22
  128. package/dist/components/Combobox/index.d.ts +1 -0
  129. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  130. package/dist/components/Dropdown/Dropdown.js +55 -57
  131. package/dist/components/Dropdown/DropdownCheckboxItem.js +26 -27
  132. package/dist/components/Dropdown/DropdownContext.js +7 -8
  133. package/dist/components/Dropdown/DropdownItem.js +27 -28
  134. package/dist/components/Dropdown/DropdownMenu.js +21 -22
  135. package/dist/components/Dropdown/DropdownMenuGroup.js +9 -10
  136. package/dist/components/Dropdown/DropdownRadioItem.js +26 -27
  137. package/dist/components/Dropdown/DropdownSeparator.js +3 -4
  138. package/dist/components/Dropdown/DropdownTrigger.js +28 -29
  139. package/dist/components/Dropdown/index.d.ts +1 -0
  140. package/dist/components/Dropzone/Dropzone.d.ts +1 -1
  141. package/dist/components/Dropzone/Dropzone.js +47 -48
  142. package/dist/components/Dropzone/DropzoneContext.js +8 -9
  143. package/dist/components/Dropzone/DropzoneDrag.js +7 -8
  144. package/dist/components/Dropzone/DropzoneFile.js +25 -26
  145. package/dist/components/Dropzone/DropzoneImport.js +20 -21
  146. package/dist/components/Dropzone/index.d.ts +1 -0
  147. package/dist/components/EmptyScreen/EmptyScreen.d.ts +1 -1
  148. package/dist/components/EmptyScreen/EmptyScreen.js +16 -18
  149. package/dist/components/EmptyScreen/index.d.ts +1 -0
  150. package/dist/components/FileCard/FileCard.d.ts +2 -2
  151. package/dist/components/FileCard/FileCard.js +37 -39
  152. package/dist/components/FileCard/FileIcon.d.ts +1 -1
  153. package/dist/components/FileCard/FileIcon.js +11 -12
  154. package/dist/components/FileCard/index.d.ts +1 -0
  155. package/dist/components/Form/FormContext.js +7 -8
  156. package/dist/components/Form/FormControl.d.ts +1 -1
  157. package/dist/components/Form/FormControl.js +30 -32
  158. package/dist/components/Form/FormText.d.ts +1 -1
  159. package/dist/components/Form/FormText.js +12 -14
  160. package/dist/components/Form/index.d.ts +2 -1
  161. package/dist/components/Grid/Grid.js +27 -28
  162. package/dist/components/Heading/Heading.d.ts +1 -1
  163. package/dist/components/Heading/Heading.js +14 -16
  164. package/dist/components/Heading/index.d.ts +1 -0
  165. package/dist/components/Image/Image.d.ts +1 -1
  166. package/dist/components/Image/Image.js +39 -41
  167. package/dist/components/Image/index.d.ts +1 -0
  168. package/dist/components/ImagePicker/ImagePicker.d.ts +1 -1
  169. package/dist/components/ImagePicker/ImagePicker.js +51 -52
  170. package/dist/components/Input/Input.d.ts +1 -1
  171. package/dist/components/Input/Input.js +28 -30
  172. package/dist/components/Input/index.d.ts +1 -0
  173. package/dist/components/Label/Label.d.ts +1 -1
  174. package/dist/components/Label/Label.js +30 -32
  175. package/dist/components/Label/index.d.ts +1 -0
  176. package/dist/components/Loading/Loading.d.ts +1 -1
  177. package/dist/components/Loading/Loading.js +23 -25
  178. package/dist/components/Loading/index.d.ts +1 -0
  179. package/dist/components/LoadingScreen/LoadingScreen.d.ts +1 -1
  180. package/dist/components/LoadingScreen/LoadingScreen.js +20 -22
  181. package/dist/components/LoadingScreen/index.d.ts +1 -1
  182. package/dist/components/Logo/Logo.d.ts +1 -1
  183. package/dist/components/Logo/Logo.js +12 -14
  184. package/dist/components/Logo/index.d.ts +1 -0
  185. package/dist/components/Menu/Menu.js +39 -40
  186. package/dist/components/Menu/MenuButton.js +17 -18
  187. package/dist/components/Menu/MenuContext.js +8 -9
  188. package/dist/components/Menu/MenuItem.js +14 -15
  189. package/dist/components/Modal/Modal.d.ts +4 -1
  190. package/dist/components/Modal/Modal.js +49 -51
  191. package/dist/components/Modal/ModalBody.js +11 -12
  192. package/dist/components/Modal/ModalContext.js +8 -9
  193. package/dist/components/Modal/ModalFooter.js +3 -4
  194. package/dist/components/Modal/ModalHeader.js +22 -23
  195. package/dist/components/Modal/ModalSubtitle.js +3 -4
  196. package/dist/components/Modal/index.d.ts +1 -0
  197. package/dist/components/Popover/Popover.js +33 -34
  198. package/dist/components/Radio/Radio.d.ts +1 -1
  199. package/dist/components/Radio/Radio.js +26 -28
  200. package/dist/components/Radio/index.d.ts +1 -0
  201. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  202. package/dist/components/SearchBar/SearchBar.js +29 -31
  203. package/dist/components/SearchBar/index.d.ts +1 -0
  204. package/dist/components/Select/Select.d.ts +1 -1
  205. package/dist/components/Select/Select.js +31 -33
  206. package/dist/components/Select/SelectTrigger.js +4 -5
  207. package/dist/components/Select/index.d.ts +1 -0
  208. package/dist/components/Table/Table.components.d.ts +20 -0
  209. package/dist/components/Table/Table.components.js +39 -0
  210. package/dist/components/Table/Table.d.ts +33 -0
  211. package/dist/components/Table/Table.js +16 -0
  212. package/dist/components/Table/TableExplorer.d.ts +1 -1
  213. package/dist/components/Table/index.d.ts +2 -1
  214. package/dist/components/Tabs/Tabs.d.ts +1 -1
  215. package/dist/components/Tabs/Tabs.js +58 -59
  216. package/dist/components/Tabs/TabsContext.js +8 -9
  217. package/dist/components/Tabs/TabsItem.js +20 -21
  218. package/dist/components/Tabs/TabsList.js +18 -19
  219. package/dist/components/Tabs/TabsPanel.js +9 -10
  220. package/dist/components/Tabs/index.d.ts +1 -0
  221. package/dist/components/TextArea/TextArea.d.ts +1 -1
  222. package/dist/components/TextArea/TextArea.js +31 -33
  223. package/dist/components/TextArea/TextareaCounter.js +6 -7
  224. package/dist/components/TextArea/index.d.ts +1 -0
  225. package/dist/components/Toolbar/Toolbar.d.ts +1 -1
  226. package/dist/components/Toolbar/Toolbar.js +60 -62
  227. package/dist/components/Toolbar/index.d.ts +1 -0
  228. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  229. package/dist/components/Tooltip/Tooltip.js +28 -30
  230. package/dist/components/Tooltip/index.d.ts +1 -0
  231. package/dist/components/TreeView/TreeItem.js +46 -47
  232. package/dist/components/TreeView/TreeView.d.ts +1 -1
  233. package/dist/components/TreeView/TreeView.js +33 -35
  234. package/dist/components/TreeView/hooks/useTreeItemEvents.js +18 -19
  235. package/dist/components/TreeView/index.d.ts +1 -0
  236. package/dist/components/UploadCard/UploadCard.js +52 -53
  237. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  238. package/dist/components/VisuallyHidden/VisuallyHidden.js +6 -8
  239. package/dist/components/VisuallyHidden/index.d.ts +1 -1
  240. package/dist/components/index.d.ts +1 -1
  241. package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +1 -1
  242. package/dist/core/OdeClientProvider/OdeClientProvider.js +44 -45
  243. package/dist/core/ThemeProvider/ThemeProvider.d.ts +1 -1
  244. package/dist/core/ThemeProvider/ThemeProvider.js +36 -36
  245. package/dist/core/index.d.ts +1 -0
  246. package/dist/core/useAvatar/useAvatar.d.ts +1 -1
  247. package/dist/core/useAvatar/useAvatar.js +21 -22
  248. package/dist/core/useBookmark/useBookmark.d.ts +1 -1
  249. package/dist/core/useBookmark/useBookmark.js +9 -10
  250. package/dist/core/useCantoo/index.d.ts +1 -0
  251. package/dist/core/useCantoo/useCantoo.d.ts +1 -0
  252. package/dist/core/useCantoo/useCantoo.js +18 -0
  253. package/dist/core/useConf/useConf.d.ts +1 -1
  254. package/dist/core/useConf/useConf.js +7 -8
  255. package/dist/core/useConversation/useConversation.js +29 -30
  256. package/dist/core/useCookiesConsent/useCookiesConsent.js +16 -17
  257. package/dist/core/useDate/useDate.js +35 -36
  258. package/dist/core/useHasWorkflow/useHasWorkflow.js +15 -16
  259. package/dist/core/useHeader/useHeader.d.ts +1 -1
  260. package/dist/core/useHeader/useHeader.js +45 -42
  261. package/dist/core/useHttpErrorToast/useHttpErrorToast.js +17 -18
  262. package/dist/core/useIsAdml/useIsAdml.js +11 -12
  263. package/dist/core/useLibraryUrl/useLibraryUrl.js +16 -17
  264. package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +2 -2
  265. package/dist/core/useMediaLibrary/useMediaLibrary.js +32 -33
  266. package/dist/core/useOdeIcons/useOdeIcons.d.ts +1 -1
  267. package/dist/core/useOdeIcons/useOdeIcons.js +37 -38
  268. package/dist/core/usePaths/usePaths.js +2 -3
  269. package/dist/core/usePreferences/usePreferences.js +5 -6
  270. package/dist/core/useResource/useResource.d.ts +1 -1
  271. package/dist/core/useResource/useResource.js +14 -15
  272. package/dist/core/useResourceSearch/useResourceSearch.d.ts +1 -1
  273. package/dist/core/useResourceSearch/useResourceSearch.js +22 -23
  274. package/dist/core/useSession/useSession.js +6 -7
  275. package/dist/core/useTrashedResource/useTrashedResource.js +18 -19
  276. package/dist/core/useUpload/useUpload.d.ts +1 -1
  277. package/dist/core/useUpload/useUpload.js +68 -69
  278. package/dist/core/useUploadFiles/useUploadFiles.d.ts +1 -1
  279. package/dist/core/useUploadFiles/useUploadFiles.js +82 -83
  280. package/dist/core/useUser/useUser.d.ts +1 -1
  281. package/dist/core/useUser/useUser.js +15 -16
  282. package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +1 -1
  283. package/dist/core/useWorkspaceFile/useWorkspaceFile.js +31 -32
  284. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +1 -1
  285. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +41 -42
  286. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +17 -18
  287. package/dist/core/useZendeskGuide/useZendeskGuide.js +46 -47
  288. package/dist/hooks/useBrowserInfo/useBrowserInfo.js +11 -12
  289. package/dist/hooks/useClickOutside/useClickOutside.js +18 -19
  290. package/dist/hooks/useDebounce/useDebounce.js +10 -11
  291. package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
  292. package/dist/hooks/useDropdown/useDropdown.js +96 -97
  293. package/dist/hooks/useDropzone/useDropzone.js +53 -54
  294. package/dist/hooks/useHover/useHover.js +14 -15
  295. package/dist/hooks/useImage/useImage.js +13 -14
  296. package/dist/hooks/useImageResizer/useImageResizer.js +31 -32
  297. package/dist/hooks/useKeyPress/useKeyPress.js +10 -11
  298. package/dist/hooks/useScrollToTop/useScrollToTop.js +4 -5
  299. package/dist/hooks/useThumbnail/useThumbnail.js +21 -22
  300. package/dist/hooks/useTitle/useTitle.js +7 -8
  301. package/dist/hooks/useToast/useToast.js +25 -26
  302. package/dist/hooks/useToggle/useToggle.js +6 -7
  303. package/dist/hooks/useTrapFocus/useTrapFocus.js +11 -12
  304. package/dist/index.d.ts +3 -1
  305. package/dist/index.js +274 -226
  306. package/dist/{modules/multimedia → multimedia}/AudioRecorder/AudioRecorder.d.ts +1 -1
  307. package/dist/multimedia/AudioRecorder/AudioRecorder.js +49 -0
  308. package/dist/multimedia/AudioRecorder/AudioRecorderTimer.js +24 -0
  309. package/dist/{modules/multimedia → multimedia}/AudioRecorder/useAudioRecorder.d.ts +2 -2
  310. package/dist/multimedia/AudioRecorder/useAudioRecorder.js +307 -0
  311. package/dist/multimedia/Embed/Embed.js +32 -0
  312. package/dist/multimedia/ImageEditor/components/ImageEditor.js +116 -0
  313. package/dist/multimedia/ImageEditor/components/ImageEditorToolbar.js +69 -0
  314. package/dist/multimedia/ImageEditor/effects/blur.js +72 -0
  315. package/dist/multimedia/ImageEditor/effects/crop.js +155 -0
  316. package/dist/multimedia/ImageEditor/effects/misc.js +162 -0
  317. package/dist/multimedia/ImageEditor/effects/resize.js +157 -0
  318. package/dist/multimedia/ImageEditor/effects/rotate.js +33 -0
  319. package/dist/multimedia/ImageEditor/hooks/useHistoryTool.js +66 -0
  320. package/dist/multimedia/ImageEditor/hooks/useImageEditor.js +76 -0
  321. package/dist/multimedia/ImageEditor/hooks/useImageEffects.js +52 -0
  322. package/dist/multimedia/ImageEditor/utils/aggregate.js +13 -0
  323. package/dist/{modules/multimedia → multimedia}/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +1 -1
  324. package/dist/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +39 -0
  325. package/dist/multimedia/Linker/ExternalLinker.js +45 -0
  326. package/dist/{modules/multimedia → multimedia}/Linker/InternalLinker.d.ts +1 -1
  327. package/dist/multimedia/Linker/InternalLinker.js +114 -0
  328. package/dist/{modules/multimedia → multimedia}/LinkerCard/LinkerCard.d.ts +3 -3
  329. package/dist/multimedia/LinkerCard/LinkerCard.js +38 -0
  330. package/dist/multimedia/LinkerCard/index.d.ts +2 -0
  331. package/dist/{modules/multimedia → multimedia}/MediaLibrary/MediaLibrary.d.ts +2 -2
  332. package/dist/multimedia/MediaLibrary/MediaLibrary.js +211 -0
  333. package/dist/{modules/multimedia → multimedia}/MediaLibrary/MediaLibraryContext.d.ts +2 -2
  334. package/dist/multimedia/MediaLibrary/MediaLibraryContext.js +12 -0
  335. package/dist/multimedia/MediaLibrary/innertabs/Audio.js +19 -0
  336. package/dist/multimedia/MediaLibrary/innertabs/ExternalLink.js +17 -0
  337. package/dist/multimedia/MediaLibrary/innertabs/Iframe.js +14 -0
  338. package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/InternalLink.d.ts +1 -1
  339. package/dist/multimedia/MediaLibrary/innertabs/InternalLink.js +35 -0
  340. package/dist/multimedia/MediaLibrary/innertabs/Upload.js +34 -0
  341. package/dist/multimedia/MediaLibrary/innertabs/Video.js +22 -0
  342. package/dist/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +14 -0
  343. package/dist/multimedia/MediaLibrary/innertabs/Workspace.js +31 -0
  344. package/dist/multimedia/MediaLibrary/innertabs/index.js +21 -0
  345. package/dist/{modules/multimedia → multimedia}/UploadFiles/UploadFiles.d.ts +1 -1
  346. package/dist/multimedia/UploadFiles/UploadFiles.js +56 -0
  347. package/dist/multimedia/VideoEmbed/VideoEmbed.js +77 -0
  348. package/dist/{modules/multimedia → multimedia}/VideoRecorder/VideoRecorder.d.ts +1 -1
  349. package/dist/multimedia/VideoRecorder/VideoRecorder.js +259 -0
  350. package/dist/{modules/multimedia → multimedia}/Workspace/Workspace.d.ts +1 -1
  351. package/dist/multimedia/Workspace/Workspace.js +169 -0
  352. package/dist/portal/Header/Badge.js +5 -6
  353. package/dist/portal/Header/Header.js +138 -138
  354. package/dist/portal/Header/NavItem.js +11 -12
  355. package/dist/portal/Header/NavLink.js +14 -15
  356. package/dist/portal/Header/Navbar.js +9 -10
  357. package/dist/portal/Header/NavbarNav.js +9 -10
  358. package/dist/portal/Header/WidgetApps.d.ts +1 -1
  359. package/dist/portal/Header/WidgetApps.js +16 -17
  360. package/dist/portal/Help/Help.js +18 -19
  361. package/dist/portal/Help/hooks/useHelp.js +63 -64
  362. package/dist/portal/Layout/Layout.js +36 -36
  363. package/dist/portal/SearchEngine/SearchEngine.js +25 -26
  364. package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +1 -1
  365. package/dist/utils/MockedDataProvider/MockedDataProvider.js +21 -22
  366. package/dist/utils/StringUtils.js +8 -9
  367. package/dist/utils/addTimestampToUrl.js +4 -5
  368. package/dist/utils/blob.js +9 -10
  369. package/dist/utils/checkUserRight.d.ts +1 -1
  370. package/dist/utils/checkUserRight.js +27 -28
  371. package/dist/utils/fileSize.js +5 -6
  372. package/dist/utils/findTreeNode.js +7 -8
  373. package/dist/utils/isActionAvailable.d.ts +1 -1
  374. package/dist/utils/isActionAvailable.js +4 -5
  375. package/dist/utils/libraryMaps.js +2 -3
  376. package/dist/utils/noop.js +2 -3
  377. package/dist/utils/ref.js +8 -9
  378. package/dist/utils/thumbnail.js +3 -4
  379. package/dist/utils/time.js +7 -8
  380. package/dist/utils/treeview.d.ts +1 -1
  381. package/dist/utils/treeview.js +96 -97
  382. package/dist/utils/video.js +2 -3
  383. package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +1 -1
  384. package/dist/widgets/BookmarkedApps/BookmarkedApps.js +6 -7
  385. package/dist/widgets/Widget/Widget.js +18 -19
  386. package/package.json +27 -58
  387. package/dist/audience.js +0 -17
  388. package/dist/audience.js.map +0 -1
  389. package/dist/components/ActionBar/ActionBar.js.map +0 -1
  390. package/dist/components/Alert/Alert.js.map +0 -1
  391. package/dist/components/AppHeader/AppHeader.js.map +0 -1
  392. package/dist/components/AppIcon/AppIcon.js.map +0 -1
  393. package/dist/components/Attachment/Attachment.js.map +0 -1
  394. package/dist/components/Avatar/Avatar.js.map +0 -1
  395. package/dist/components/Badge/Badge.js.map +0 -1
  396. package/dist/components/Breadcrumb/Breadcrumb.js.map +0 -1
  397. package/dist/components/Breadcrumb/BreadcrumbItem.js.map +0 -1
  398. package/dist/components/Breadcrumb/BreadcrumbList.js.map +0 -1
  399. package/dist/components/Breadcrumb/BreadcrumbNav.js.map +0 -1
  400. package/dist/components/Button/Button.js.map +0 -1
  401. package/dist/components/Button/IconButton.js.map +0 -1
  402. package/dist/components/Button/SearchButton.js.map +0 -1
  403. package/dist/components/Card/Card.js.map +0 -1
  404. package/dist/components/Card/CardBody.js.map +0 -1
  405. package/dist/components/Card/CardContext.js.map +0 -1
  406. package/dist/components/Card/CardFooter.js.map +0 -1
  407. package/dist/components/Card/CardHeader.js.map +0 -1
  408. package/dist/components/Card/CardImage.js.map +0 -1
  409. package/dist/components/Card/CardText.js.map +0 -1
  410. package/dist/components/Card/CardTitle.js.map +0 -1
  411. package/dist/components/Card/CardUser.js.map +0 -1
  412. package/dist/components/Checkbox/Checkbox.js.map +0 -1
  413. package/dist/components/ColorPicker/ColorPalette.js.map +0 -1
  414. package/dist/components/ColorPicker/ColorPicker.js.map +0 -1
  415. package/dist/components/ColorPicker/ColorPickerItem.js.map +0 -1
  416. package/dist/components/Combobox/Combobox.js.map +0 -1
  417. package/dist/components/Combobox/ComboboxTrigger.js.map +0 -1
  418. package/dist/components/Dropdown/Dropdown.js.map +0 -1
  419. package/dist/components/Dropdown/DropdownCheckboxItem.js.map +0 -1
  420. package/dist/components/Dropdown/DropdownContext.js.map +0 -1
  421. package/dist/components/Dropdown/DropdownItem.js.map +0 -1
  422. package/dist/components/Dropdown/DropdownMenu.js.map +0 -1
  423. package/dist/components/Dropdown/DropdownMenuGroup.js.map +0 -1
  424. package/dist/components/Dropdown/DropdownRadioItem.js.map +0 -1
  425. package/dist/components/Dropdown/DropdownSeparator.js.map +0 -1
  426. package/dist/components/Dropdown/DropdownTrigger.js.map +0 -1
  427. package/dist/components/Dropzone/Dropzone.js.map +0 -1
  428. package/dist/components/Dropzone/DropzoneContext.js.map +0 -1
  429. package/dist/components/Dropzone/DropzoneDrag.js.map +0 -1
  430. package/dist/components/Dropzone/DropzoneFile.js.map +0 -1
  431. package/dist/components/Dropzone/DropzoneImport.js.map +0 -1
  432. package/dist/components/EmptyScreen/EmptyScreen.js.map +0 -1
  433. package/dist/components/FileCard/FileCard.js.map +0 -1
  434. package/dist/components/FileCard/FileIcon.js.map +0 -1
  435. package/dist/components/Form/FormContext.js.map +0 -1
  436. package/dist/components/Form/FormControl.js.map +0 -1
  437. package/dist/components/Form/FormText.js.map +0 -1
  438. package/dist/components/Grid/Grid.js.map +0 -1
  439. package/dist/components/Heading/Heading.js.map +0 -1
  440. package/dist/components/Icon/Icon.d.ts +0 -17
  441. package/dist/components/Icon/Icon.js +0 -11
  442. package/dist/components/Icon/Icon.js.map +0 -1
  443. package/dist/components/Icon/index.d.ts +0 -1
  444. package/dist/components/Image/Image.js.map +0 -1
  445. package/dist/components/ImagePicker/ImagePicker.js.map +0 -1
  446. package/dist/components/Input/Input.js.map +0 -1
  447. package/dist/components/Label/Label.js.map +0 -1
  448. package/dist/components/Loading/Loading.js.map +0 -1
  449. package/dist/components/LoadingScreen/LoadingScreen.js.map +0 -1
  450. package/dist/components/Logo/Logo.js.map +0 -1
  451. package/dist/components/Menu/Menu.js.map +0 -1
  452. package/dist/components/Menu/MenuButton.js.map +0 -1
  453. package/dist/components/Menu/MenuContext.js.map +0 -1
  454. package/dist/components/Menu/MenuItem.js.map +0 -1
  455. package/dist/components/Modal/Modal.js.map +0 -1
  456. package/dist/components/Modal/ModalBody.js.map +0 -1
  457. package/dist/components/Modal/ModalContext.js.map +0 -1
  458. package/dist/components/Modal/ModalFooter.js.map +0 -1
  459. package/dist/components/Modal/ModalHeader.js.map +0 -1
  460. package/dist/components/Modal/ModalSubtitle.js.map +0 -1
  461. package/dist/components/Popover/Popover.js.map +0 -1
  462. package/dist/components/Radio/Radio.js.map +0 -1
  463. package/dist/components/SearchBar/SearchBar.js.map +0 -1
  464. package/dist/components/Select/Select.js.map +0 -1
  465. package/dist/components/Select/SelectTrigger.js.map +0 -1
  466. package/dist/components/Table/TableExplorer.js +0 -10
  467. package/dist/components/Table/TableExplorer.js.map +0 -1
  468. package/dist/components/Tabs/Tabs.js.map +0 -1
  469. package/dist/components/Tabs/TabsContext.js.map +0 -1
  470. package/dist/components/Tabs/TabsItem.js.map +0 -1
  471. package/dist/components/Tabs/TabsList.js.map +0 -1
  472. package/dist/components/Tabs/TabsPanel.js.map +0 -1
  473. package/dist/components/TextArea/TextArea.js.map +0 -1
  474. package/dist/components/TextArea/TextareaCounter.js.map +0 -1
  475. package/dist/components/Toolbar/Toolbar.js.map +0 -1
  476. package/dist/components/Tooltip/Tooltip.js.map +0 -1
  477. package/dist/components/TreeView/TreeItem.js.map +0 -1
  478. package/dist/components/TreeView/TreeView.js.map +0 -1
  479. package/dist/components/TreeView/hooks/useTreeItemEvents.js.map +0 -1
  480. package/dist/components/UploadCard/UploadCard.js.map +0 -1
  481. package/dist/components/VisuallyHidden/VisuallyHidden.js.map +0 -1
  482. package/dist/core/OdeClientProvider/OdeClientProvider.js.map +0 -1
  483. package/dist/core/ThemeProvider/ThemeProvider.js.map +0 -1
  484. package/dist/core/useAvatar/useAvatar.js.map +0 -1
  485. package/dist/core/useBookmark/useBookmark.js.map +0 -1
  486. package/dist/core/useConf/useConf.js.map +0 -1
  487. package/dist/core/useConversation/useConversation.js.map +0 -1
  488. package/dist/core/useCookiesConsent/useCookiesConsent.js.map +0 -1
  489. package/dist/core/useDate/useDate.js.map +0 -1
  490. package/dist/core/useHasWorkflow/useHasWorkflow.js.map +0 -1
  491. package/dist/core/useHeader/useHeader.js.map +0 -1
  492. package/dist/core/useHttpErrorToast/useHttpErrorToast.js.map +0 -1
  493. package/dist/core/useIsAdml/useIsAdml.js.map +0 -1
  494. package/dist/core/useLibraryUrl/useLibraryUrl.js.map +0 -1
  495. package/dist/core/useMediaLibrary/useMediaLibrary.js.map +0 -1
  496. package/dist/core/useOdeIcons/useOdeIcons.js.map +0 -1
  497. package/dist/core/usePaths/usePaths.js.map +0 -1
  498. package/dist/core/usePreferences/usePreferences.js.map +0 -1
  499. package/dist/core/useResource/useResource.js.map +0 -1
  500. package/dist/core/useResourceSearch/useResourceSearch.js.map +0 -1
  501. package/dist/core/useSession/useSession.js.map +0 -1
  502. package/dist/core/useTrashedResource/useTrashedResource.js.map +0 -1
  503. package/dist/core/useUpload/useUpload.js.map +0 -1
  504. package/dist/core/useUploadFiles/useUploadFiles.js.map +0 -1
  505. package/dist/core/useUser/useUser.js.map +0 -1
  506. package/dist/core/useWorkspaceFile/useWorkspaceFile.js.map +0 -1
  507. package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js.map +0 -1
  508. package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js.map +0 -1
  509. package/dist/core/useZendeskGuide/useZendeskGuide.js.map +0 -1
  510. package/dist/editor.js +0 -59
  511. package/dist/editor.js.map +0 -1
  512. package/dist/hooks/useBrowserInfo/useBrowserInfo.js.map +0 -1
  513. package/dist/hooks/useClickOutside/useClickOutside.js.map +0 -1
  514. package/dist/hooks/useDebounce/useDebounce.js.map +0 -1
  515. package/dist/hooks/useDropdown/useDropdown.js.map +0 -1
  516. package/dist/hooks/useDropzone/useDropzone.js.map +0 -1
  517. package/dist/hooks/useHover/useHover.js.map +0 -1
  518. package/dist/hooks/useImage/useImage.js.map +0 -1
  519. package/dist/hooks/useImageResizer/useImageResizer.js.map +0 -1
  520. package/dist/hooks/useKeyPress/useKeyPress.js.map +0 -1
  521. package/dist/hooks/useScrollToTop/useScrollToTop.js.map +0 -1
  522. package/dist/hooks/useThumbnail/useThumbnail.js.map +0 -1
  523. package/dist/hooks/useTitle/useTitle.js.map +0 -1
  524. package/dist/hooks/useToast/useToast.js.map +0 -1
  525. package/dist/hooks/useToggle/useToggle.js.map +0 -1
  526. package/dist/hooks/useTrapFocus/useTrapFocus.js.map +0 -1
  527. package/dist/index.js.map +0 -1
  528. package/dist/modals.js +0 -17
  529. package/dist/modals.js.map +0 -1
  530. package/dist/modules/audience/ReactionChoice.js +0 -34
  531. package/dist/modules/audience/ReactionChoice.js.map +0 -1
  532. package/dist/modules/audience/ReactionModal.Card.js +0 -35
  533. package/dist/modules/audience/ReactionModal.Card.js.map +0 -1
  534. package/dist/modules/audience/ReactionModal.js +0 -73
  535. package/dist/modules/audience/ReactionModal.js.map +0 -1
  536. package/dist/modules/audience/ReactionSummary.js +0 -28
  537. package/dist/modules/audience/ReactionSummary.js.map +0 -1
  538. package/dist/modules/audience/ViewsByProfileCard.js +0 -36
  539. package/dist/modules/audience/ViewsByProfileCard.js.map +0 -1
  540. package/dist/modules/audience/ViewsCounter.js +0 -19
  541. package/dist/modules/audience/ViewsCounter.js.map +0 -1
  542. package/dist/modules/audience/ViewsModal.js +0 -41
  543. package/dist/modules/audience/ViewsModal.js.map +0 -1
  544. package/dist/modules/audience/hooks/useReactionIcons.js +0 -38
  545. package/dist/modules/audience/hooks/useReactionIcons.js.map +0 -1
  546. package/dist/modules/audience/hooks/useReactions.js +0 -36
  547. package/dist/modules/audience/hooks/useReactions.js.map +0 -1
  548. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.d.ts +0 -8
  549. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +0 -133
  550. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js.map +0 -1
  551. package/dist/modules/editor/components/BubbleMenuEditImage/index.d.ts +0 -1
  552. package/dist/modules/editor/components/Editor/Editor.d.ts +0 -45
  553. package/dist/modules/editor/components/Editor/Editor.js +0 -84
  554. package/dist/modules/editor/components/Editor/Editor.js.map +0 -1
  555. package/dist/modules/editor/components/Editor/MathsModal.d.ts +0 -7
  556. package/dist/modules/editor/components/Editor/MathsModal.js +0 -51
  557. package/dist/modules/editor/components/Editor/MathsModal.js.map +0 -1
  558. package/dist/modules/editor/components/Editor/index.d.ts +0 -2
  559. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +0 -22
  560. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +0 -18
  561. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js.map +0 -1
  562. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +0 -14
  563. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +0 -55
  564. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js.map +0 -1
  565. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +0 -14
  566. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +0 -48
  567. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js.map +0 -1
  568. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.d.ts +0 -9
  569. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +0 -19
  570. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js.map +0 -1
  571. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +0 -14
  572. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +0 -51
  573. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js.map +0 -1
  574. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +0 -10
  575. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +0 -63
  576. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js.map +0 -1
  577. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +0 -10
  578. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +0 -53
  579. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js.map +0 -1
  580. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +0 -10
  581. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +0 -320
  582. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js.map +0 -1
  583. package/dist/modules/editor/components/EditorToolbar/index.d.ts +0 -1
  584. package/dist/modules/editor/components/NodeView/AttachmentNodeView.d.ts +0 -2
  585. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +0 -11
  586. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js.map +0 -1
  587. package/dist/modules/editor/components/NodeView/AudioNodeView.d.ts +0 -2
  588. package/dist/modules/editor/components/NodeView/AudioNodeView.js +0 -11
  589. package/dist/modules/editor/components/NodeView/AudioNodeView.js.map +0 -1
  590. package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +0 -2
  591. package/dist/modules/editor/components/NodeView/ImageNodeView.js +0 -11
  592. package/dist/modules/editor/components/NodeView/ImageNodeView.js.map +0 -1
  593. package/dist/modules/editor/components/NodeView/LinkerNodeView.d.ts +0 -2
  594. package/dist/modules/editor/components/NodeView/LinkerNodeView.js +0 -11
  595. package/dist/modules/editor/components/NodeView/LinkerNodeView.js.map +0 -1
  596. package/dist/modules/editor/components/NodeView/VideoNodeView.d.ts +0 -2
  597. package/dist/modules/editor/components/NodeView/VideoNodeView.js +0 -11
  598. package/dist/modules/editor/components/NodeView/VideoNodeView.js.map +0 -1
  599. package/dist/modules/editor/components/NodeView/index.d.ts +0 -5
  600. package/dist/modules/editor/components/Renderer/AttachmentRenderer.d.ts +0 -7
  601. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +0 -35
  602. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js.map +0 -1
  603. package/dist/modules/editor/components/Renderer/AudioRenderer.d.ts +0 -7
  604. package/dist/modules/editor/components/Renderer/AudioRenderer.js +0 -12
  605. package/dist/modules/editor/components/Renderer/AudioRenderer.js.map +0 -1
  606. package/dist/modules/editor/components/Renderer/LinkerRenderer.d.ts +0 -9
  607. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +0 -35
  608. package/dist/modules/editor/components/Renderer/LinkerRenderer.js.map +0 -1
  609. package/dist/modules/editor/components/Renderer/MediaRenderer.d.ts +0 -2
  610. package/dist/modules/editor/components/Renderer/MediaRenderer.js +0 -70
  611. package/dist/modules/editor/components/Renderer/MediaRenderer.js.map +0 -1
  612. package/dist/modules/editor/components/Renderer/index.d.ts +0 -4
  613. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +0 -2
  614. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +0 -9
  615. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js.map +0 -1
  616. package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +0 -15
  617. package/dist/modules/editor/components/Toolbar/LinkToolbar.js +0 -60
  618. package/dist/modules/editor/components/Toolbar/LinkToolbar.js.map +0 -1
  619. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.d.ts +0 -9
  620. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +0 -29
  621. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js.map +0 -1
  622. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.d.ts +0 -13
  623. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +0 -46
  624. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js.map +0 -1
  625. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.d.ts +0 -9
  626. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +0 -28
  627. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js.map +0 -1
  628. package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +0 -9
  629. package/dist/modules/editor/components/Toolbar/TableToolbar.js +0 -89
  630. package/dist/modules/editor/components/Toolbar/TableToolbar.js.map +0 -1
  631. package/dist/modules/editor/components/Toolbar/index.d.ts +0 -2
  632. package/dist/modules/editor/components/index.d.ts +0 -6
  633. package/dist/modules/editor/hooks/index.d.ts +0 -12
  634. package/dist/modules/editor/hooks/useActionOptions.d.ts +0 -5
  635. package/dist/modules/editor/hooks/useActionOptions.js +0 -76
  636. package/dist/modules/editor/hooks/useActionOptions.js.map +0 -1
  637. package/dist/modules/editor/hooks/useCommentEditor.d.ts +0 -13
  638. package/dist/modules/editor/hooks/useCommentEditor.js +0 -38
  639. package/dist/modules/editor/hooks/useCommentEditor.js.map +0 -1
  640. package/dist/modules/editor/hooks/useEditorContext.d.ts +0 -37
  641. package/dist/modules/editor/hooks/useEditorContext.js +0 -13
  642. package/dist/modules/editor/hooks/useEditorContext.js.map +0 -1
  643. package/dist/modules/editor/hooks/useImageModal.d.ts +0 -31
  644. package/dist/modules/editor/hooks/useImageModal.js +0 -47
  645. package/dist/modules/editor/hooks/useImageModal.js.map +0 -1
  646. package/dist/modules/editor/hooks/useImageSelection.d.ts +0 -21
  647. package/dist/modules/editor/hooks/useImageSelection.js +0 -47
  648. package/dist/modules/editor/hooks/useImageSelection.js.map +0 -1
  649. package/dist/modules/editor/hooks/useLinkToolbar.d.ts +0 -17
  650. package/dist/modules/editor/hooks/useLinkToolbar.js +0 -38
  651. package/dist/modules/editor/hooks/useLinkToolbar.js.map +0 -1
  652. package/dist/modules/editor/hooks/useMathsModal.d.ts +0 -17
  653. package/dist/modules/editor/hooks/useMathsModal.js +0 -18
  654. package/dist/modules/editor/hooks/useMathsModal.js.map +0 -1
  655. package/dist/modules/editor/hooks/useMathsStyles.d.ts +0 -1
  656. package/dist/modules/editor/hooks/useMathsStyles.js +0 -21
  657. package/dist/modules/editor/hooks/useMathsStyles.js.map +0 -1
  658. package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +0 -19
  659. package/dist/modules/editor/hooks/useMediaLibraryEditor.js +0 -153
  660. package/dist/modules/editor/hooks/useMediaLibraryEditor.js.map +0 -1
  661. package/dist/modules/editor/hooks/useResizeMedia.d.ts +0 -10
  662. package/dist/modules/editor/hooks/useResizeMedia.js +0 -48
  663. package/dist/modules/editor/hooks/useResizeMedia.js.map +0 -1
  664. package/dist/modules/editor/hooks/useSpeechRecognition.d.ts +0 -6
  665. package/dist/modules/editor/hooks/useSpeechRecognition.js +0 -22
  666. package/dist/modules/editor/hooks/useSpeechRecognition.js.map +0 -1
  667. package/dist/modules/editor/hooks/useSpeechSynthetisis.d.ts +0 -12
  668. package/dist/modules/editor/hooks/useSpeechSynthetisis.js +0 -21
  669. package/dist/modules/editor/hooks/useSpeechSynthetisis.js.map +0 -1
  670. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +0 -15
  671. package/dist/modules/editor/hooks/useTipTapEditor.js +0 -76
  672. package/dist/modules/editor/hooks/useTipTapEditor.js.map +0 -1
  673. package/dist/modules/editor/index.d.ts +0 -3
  674. package/dist/modules/editor/utils/has-extension.d.ts +0 -2
  675. package/dist/modules/editor/utils/has-extension.js +0 -5
  676. package/dist/modules/editor/utils/has-extension.js.map +0 -1
  677. package/dist/modules/editor/utils/has-mark.d.ts +0 -2
  678. package/dist/modules/editor/utils/has-mark.js +0 -5
  679. package/dist/modules/editor/utils/has-mark.js.map +0 -1
  680. package/dist/modules/editor/utils/has-text-style.d.ts +0 -2
  681. package/dist/modules/editor/utils/has-text-style.js +0 -6
  682. package/dist/modules/editor/utils/has-text-style.js.map +0 -1
  683. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +0 -60
  684. package/dist/modules/modals/OnboardingModal/OnboardingModal.js.map +0 -1
  685. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +0 -31
  686. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js.map +0 -1
  687. package/dist/modules/modals/PublishModal/PublishModal.js +0 -121
  688. package/dist/modules/modals/PublishModal/PublishModal.js.map +0 -1
  689. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +0 -30
  690. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js.map +0 -1
  691. package/dist/modules/modals/PublishModal/components/AgeSelect.js +0 -21
  692. package/dist/modules/modals/PublishModal/components/AgeSelect.js.map +0 -1
  693. package/dist/modules/modals/PublishModal/components/LangSelect.js +0 -20
  694. package/dist/modules/modals/PublishModal/components/LangSelect.js.map +0 -1
  695. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +0 -24
  696. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js.map +0 -1
  697. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +0 -30
  698. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js.map +0 -1
  699. package/dist/modules/modals/PublishModal/components/ToastError.js +0 -25
  700. package/dist/modules/modals/PublishModal/components/ToastError.js.map +0 -1
  701. package/dist/modules/modals/PublishModal/components/ToastSuccess.js +0 -19
  702. package/dist/modules/modals/PublishModal/components/ToastSuccess.js.map +0 -1
  703. package/dist/modules/modals/PublishModal/constants/ageOptions.js +0 -5
  704. package/dist/modules/modals/PublishModal/constants/ageOptions.js.map +0 -1
  705. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js.map +0 -1
  706. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +0 -44
  707. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js.map +0 -1
  708. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +0 -107
  709. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js.map +0 -1
  710. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js.map +0 -1
  711. package/dist/modules/modals/ResourceModal/ResourceModal.js +0 -158
  712. package/dist/modules/modals/ResourceModal/ResourceModal.js.map +0 -1
  713. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +0 -64
  714. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js.map +0 -1
  715. package/dist/modules/modals/ResourceModal/hooks/useSlug.js +0 -42
  716. package/dist/modules/modals/ResourceModal/hooks/useSlug.js.map +0 -1
  717. package/dist/modules/modals/ResourceModal/hooks/useThumb.js +0 -18
  718. package/dist/modules/modals/ResourceModal/hooks/useThumb.js.map +0 -1
  719. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +0 -14
  720. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js.map +0 -1
  721. package/dist/modules/modals/ResourceModal/index.d.ts +0 -3
  722. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +0 -9
  723. package/dist/modules/modals/ShareModal/apps/ShareBlog.js +0 -44
  724. package/dist/modules/modals/ShareModal/apps/ShareBlog.js.map +0 -1
  725. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +0 -17
  726. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js.map +0 -1
  727. package/dist/modules/modals/ShareModal/index.d.ts +0 -3
  728. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +0 -50
  729. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js.map +0 -1
  730. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +0 -25
  731. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js.map +0 -1
  732. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +0 -308
  733. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js.map +0 -1
  734. package/dist/modules/multimedia/Embed/Embed.js +0 -33
  735. package/dist/modules/multimedia/Embed/Embed.js.map +0 -1
  736. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +0 -117
  737. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js.map +0 -1
  738. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +0 -70
  739. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js.map +0 -1
  740. package/dist/modules/multimedia/ImageEditor/effects/blur.js +0 -73
  741. package/dist/modules/multimedia/ImageEditor/effects/blur.js.map +0 -1
  742. package/dist/modules/multimedia/ImageEditor/effects/crop.js +0 -156
  743. package/dist/modules/multimedia/ImageEditor/effects/crop.js.map +0 -1
  744. package/dist/modules/multimedia/ImageEditor/effects/misc.js +0 -163
  745. package/dist/modules/multimedia/ImageEditor/effects/misc.js.map +0 -1
  746. package/dist/modules/multimedia/ImageEditor/effects/resize.js +0 -158
  747. package/dist/modules/multimedia/ImageEditor/effects/resize.js.map +0 -1
  748. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +0 -34
  749. package/dist/modules/multimedia/ImageEditor/effects/rotate.js.map +0 -1
  750. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +0 -65
  751. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js.map +0 -1
  752. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +0 -77
  753. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js.map +0 -1
  754. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +0 -53
  755. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js.map +0 -1
  756. package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +0 -14
  757. package/dist/modules/multimedia/ImageEditor/utils/aggregate.js.map +0 -1
  758. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +0 -40
  759. package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js.map +0 -1
  760. package/dist/modules/multimedia/Linker/ExternalLinker.js +0 -46
  761. package/dist/modules/multimedia/Linker/ExternalLinker.js.map +0 -1
  762. package/dist/modules/multimedia/Linker/InternalLinker.js +0 -115
  763. package/dist/modules/multimedia/Linker/InternalLinker.js.map +0 -1
  764. package/dist/modules/multimedia/LinkerCard/LinkerCard.js +0 -40
  765. package/dist/modules/multimedia/LinkerCard/LinkerCard.js.map +0 -1
  766. package/dist/modules/multimedia/LinkerCard/index.d.ts +0 -1
  767. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +0 -212
  768. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js.map +0 -1
  769. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +0 -13
  770. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js.map +0 -1
  771. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +0 -20
  772. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js.map +0 -1
  773. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +0 -18
  774. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js.map +0 -1
  775. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +0 -15
  776. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js.map +0 -1
  777. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +0 -36
  778. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js.map +0 -1
  779. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +0 -35
  780. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js.map +0 -1
  781. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +0 -23
  782. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js.map +0 -1
  783. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +0 -15
  784. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js.map +0 -1
  785. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +0 -32
  786. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js.map +0 -1
  787. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +0 -22
  788. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js.map +0 -1
  789. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +0 -57
  790. package/dist/modules/multimedia/UploadFiles/UploadFiles.js.map +0 -1
  791. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +0 -78
  792. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js.map +0 -1
  793. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +0 -260
  794. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js.map +0 -1
  795. package/dist/modules/multimedia/Workspace/Workspace.js +0 -170
  796. package/dist/modules/multimedia/Workspace/Workspace.js.map +0 -1
  797. package/dist/multimedia.js +0 -21
  798. package/dist/multimedia.js.map +0 -1
  799. package/dist/portal/Header/Badge.js.map +0 -1
  800. package/dist/portal/Header/Header.js.map +0 -1
  801. package/dist/portal/Header/NavItem.js.map +0 -1
  802. package/dist/portal/Header/NavLink.js.map +0 -1
  803. package/dist/portal/Header/Navbar.js.map +0 -1
  804. package/dist/portal/Header/NavbarNav.js.map +0 -1
  805. package/dist/portal/Header/WidgetApps.js.map +0 -1
  806. package/dist/portal/Help/Help.js.map +0 -1
  807. package/dist/portal/Help/hooks/useHelp.js.map +0 -1
  808. package/dist/portal/Layout/Layout.js.map +0 -1
  809. package/dist/portal/SearchEngine/SearchEngine.js.map +0 -1
  810. package/dist/utils/MockedDataProvider/MockedDataProvider.js.map +0 -1
  811. package/dist/utils/StringUtils.js.map +0 -1
  812. package/dist/utils/addTimestampToUrl.js.map +0 -1
  813. package/dist/utils/blob.js.map +0 -1
  814. package/dist/utils/checkUserRight.js.map +0 -1
  815. package/dist/utils/fileSize.js.map +0 -1
  816. package/dist/utils/findTreeNode.js.map +0 -1
  817. package/dist/utils/isActionAvailable.js.map +0 -1
  818. package/dist/utils/libraryMaps.js.map +0 -1
  819. package/dist/utils/noop.js.map +0 -1
  820. package/dist/utils/ref.js.map +0 -1
  821. package/dist/utils/thumbnail.js.map +0 -1
  822. package/dist/utils/time.js.map +0 -1
  823. package/dist/utils/treeview.js.map +0 -1
  824. package/dist/utils/video.js.map +0 -1
  825. package/dist/widgets/BookmarkedApps/BookmarkedApps.js.map +0 -1
  826. package/dist/widgets/Widget/Widget.js.map +0 -1
  827. /package/dist/{modules/modals → common}/OnboardingModal/OnboardingModal.d.ts +0 -0
  828. /package/dist/{modules/modals → common}/OnboardingModal/index.d.ts +0 -0
  829. /package/dist/{modules/modals → common}/OnboardingModal/useOnboardingModal.d.ts +0 -0
  830. /package/dist/{modules/modals → common}/PublishModal/components/ActivitiesDropdown.d.ts +0 -0
  831. /package/dist/{modules/modals → common}/PublishModal/components/AgeSelect.d.ts +0 -0
  832. /package/dist/{modules/modals → common}/PublishModal/components/LangSelect.d.ts +0 -0
  833. /package/dist/{modules/modals → common}/PublishModal/components/PublishModalFooter.d.ts +0 -0
  834. /package/dist/{modules/modals → common}/PublishModal/components/SubjectsDropdown.d.ts +0 -0
  835. /package/dist/{modules/modals → common}/PublishModal/components/ToastError.d.ts +0 -0
  836. /package/dist/{modules/modals → common}/PublishModal/constants/ageOptions.d.ts +0 -0
  837. /package/dist/{modules/modals → common}/PublishModal/hooks/useActivitiesOptions.d.ts +0 -0
  838. /package/dist/{modules/modals → common}/PublishModal/hooks/useLanguageOptions.d.ts +0 -0
  839. /package/dist/{modules/modals → common}/PublishModal/hooks/useSubjectsOptions.d.ts +0 -0
  840. /package/dist/{modules/modals → common}/PublishModal/index.d.ts +0 -0
  841. /package/dist/{modules/modals → common}/ShareModal/ShareBookmark.d.ts +0 -0
  842. /package/dist/{modules/modals → common}/index.d.ts +0 -0
  843. /package/dist/{modules/audience → components/Audience}/ViewsCounter.d.ts +0 -0
  844. /package/dist/{modules/audience → components/Audience}/index.d.ts +0 -0
  845. /package/dist/{modules/multimedia → multimedia}/AudioRecorder/AudioRecorderTimer.d.ts +0 -0
  846. /package/dist/{modules/multimedia → multimedia}/AudioRecorder/index.d.ts +0 -0
  847. /package/dist/{modules/multimedia → multimedia}/Embed/Embed.d.ts +0 -0
  848. /package/dist/{modules/multimedia → multimedia}/Embed/index.d.ts +0 -0
  849. /package/dist/{modules/multimedia → multimedia}/ImageEditor/components/ImageEditor.d.ts +0 -0
  850. /package/dist/{modules/multimedia → multimedia}/ImageEditor/components/ImageEditorToolbar.d.ts +0 -0
  851. /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/blur.d.ts +0 -0
  852. /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/crop.d.ts +0 -0
  853. /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/misc.d.ts +0 -0
  854. /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/resize.d.ts +0 -0
  855. /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/rotate.d.ts +0 -0
  856. /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useHistoryTool.d.ts +0 -0
  857. /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useImageEditor.d.ts +0 -0
  858. /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useImageEffects.d.ts +0 -0
  859. /package/dist/{modules/multimedia → multimedia}/ImageEditor/index.d.ts +0 -0
  860. /package/dist/{modules/multimedia → multimedia}/ImageEditor/utils/aggregate.d.ts +0 -0
  861. /package/dist/{modules/multimedia → multimedia}/ImageEditor/utils/debounceAggregate.d.ts +0 -0
  862. /package/dist/{modules/multimedia → multimedia}/ImagePickerWorkspace/index.d.ts +0 -0
  863. /package/dist/{modules/multimedia → multimedia}/Linker/ExternalLinker.d.ts +0 -0
  864. /package/dist/{modules/multimedia → multimedia}/Linker/index.d.ts +0 -0
  865. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/index.d.ts +0 -0
  866. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Audio.d.ts +0 -0
  867. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/ExternalLink.d.ts +0 -0
  868. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Iframe.d.ts +0 -0
  869. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Upload.d.ts +0 -0
  870. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Video.d.ts +0 -0
  871. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/VideoEmbedder.d.ts +0 -0
  872. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Workspace.d.ts +0 -0
  873. /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/index.d.ts +0 -0
  874. /package/dist/{modules/multimedia → multimedia}/UploadFiles/index.d.ts +0 -0
  875. /package/dist/{modules/multimedia → multimedia}/VideoEmbed/VideoEmbed.d.ts +0 -0
  876. /package/dist/{modules/multimedia → multimedia}/VideoEmbed/index.d.ts +0 -0
  877. /package/dist/{modules/multimedia → multimedia}/VideoRecorder/index.d.ts +0 -0
  878. /package/dist/{modules/multimedia → multimedia}/Workspace/index.d.ts +0 -0
  879. /package/dist/{modules/multimedia → multimedia}/index.d.ts +0 -0
@@ -1 +0,0 @@
1
- export { default as BubbleMenuEditImage } from './BubbleMenuEditImage';
@@ -1,45 +0,0 @@
1
- import { WorkspaceVisibility } from '@edifice.io/ts-client';
2
- import { Content, FocusPosition, JSONContent } from '@tiptap/react';
3
- export interface EditorRef {
4
- /** Get the current content. */
5
- getContent: (as: 'html' | 'json' | 'plain') => undefined | string | JSONContent;
6
- /** Get speech synthetisis current state */
7
- isSpeeching: () => boolean;
8
- /** [De]activate speech synthetisis */
9
- toogleSpeechSynthetisis: () => boolean;
10
- }
11
- /**
12
- * Editor component properties
13
- */
14
- export interface EditorProps {
15
- /**
16
- * (Optional) id of the HTML element.
17
- * Useful with an external `<FormControl id=...><Label/>`.
18
- */
19
- id?: string;
20
- /** Rich content to render. */
21
- content: Content;
22
- /**
23
- * Rendering mode : `edit` to allow content modifications, or `read` (default)
24
- * Switching to `edit` mode will also render the toolbar
25
- * (unless `toolbar` property is `none`).
26
- */
27
- mode?: 'edit' | 'read';
28
- /** Toolbar to display in `edit` mode. */
29
- toolbar?: 'full' | 'none';
30
- /** Display with or without a border */
31
- variant?: 'outline' | 'ghost';
32
- /** Set focus position to the editor */
33
- focus?: FocusPosition;
34
- /** Editor placeholder content */
35
- placeholder?: string;
36
- /** Visibility of the content created
37
- * this will impact where the uploaded files will be upload and the availability of the public media files */
38
- visibility?: WorkspaceVisibility;
39
- /** Function to listen if content change */
40
- onContentChange?: ({ editor }: {
41
- editor: any;
42
- }) => void;
43
- }
44
- declare const Editor: import('react').ForwardRefExoticComponent<EditorProps & import('react').RefAttributes<EditorRef>>;
45
- export default Editor;
@@ -1,84 +0,0 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as M, useId as k, useImperativeHandle as v, Suspense as H, lazy as h } from "react";
3
- import "@edifice.io/tiptap-extensions";
4
- import { EditorContent as j } from "@tiptap/react";
5
- import f from "clsx";
6
- import { useMathsStyles as N } from "../../hooks/useMathsStyles.js";
7
- import { useTipTapEditor as R } from "../../hooks/useTipTapEditor.js";
8
- import { useMediaLibraryEditor as z } from "../../hooks/useMediaLibraryEditor.js";
9
- import { useMathsModal as A } from "../../hooks/useMathsModal.js";
10
- import { useImageModal as B } from "../../hooks/useImageModal.js";
11
- import { useLinkToolbar as J } from "../../hooks/useLinkToolbar.js";
12
- import { useSpeechSynthetisis as P } from "../../hooks/useSpeechSynthetisis.js";
13
- import { EditorContext as U } from "../../hooks/useEditorContext.js";
14
- import { EditorToolbar as $ } from "../EditorToolbar/EditorToolbar.js";
15
- import q from "../Toolbar/LinkToolbar.js";
16
- import D from "../Toolbar/TableToolbar.js";
17
- import F from "../BubbleMenuEditImage/BubbleMenuEditImage.js";
18
- import G from "../../../multimedia/MediaLibrary/MediaLibrary.js";
19
- import { useOdeClient as K } from "../../../../core/OdeClientProvider/OdeClientProvider.js";
20
- import { LoadingScreen as Q } from "../../../../components/LoadingScreen/LoadingScreen.js";
21
- const V = /* @__PURE__ */ h(async () => await import("./MathsModal.js")), W = /* @__PURE__ */ h(async () => await import("../../../multimedia/ImageEditor/components/ImageEditor.js")), be = /* @__PURE__ */ M(({
22
- id: s,
23
- content: b,
24
- mode: g = "read",
25
- toolbar: E = "full",
26
- variant: a = "outline",
27
- focus: y = "start",
28
- placeholder: I = "",
29
- visibility: m = "protected",
30
- onContentChange: S
31
- }, T) => {
32
- const l = k(), {
33
- appCode: p
34
- } = K(), {
35
- editor: e,
36
- editable: o
37
- } = R(g === "edit", b, y, I, S), {
38
- ref: n,
39
- ...C
40
- } = z(e), {
41
- toggle: L,
42
- ...c
43
- } = A(e), r = B(e, "media-library", m), x = J(e, n), d = P(e);
44
- if (N(), v(T, () => ({
45
- getContent: (u) => {
46
- switch (u) {
47
- case "html":
48
- return e == null ? void 0 : e.getHTML();
49
- case "json":
50
- return e == null ? void 0 : e.getJSON();
51
- case "plain":
52
- return e == null ? void 0 : e.getText();
53
- default:
54
- throw new Error(`[Editor] Unknown content format ${u}`);
55
- }
56
- },
57
- toogleSpeechSynthetisis: d.toggle,
58
- isSpeeching: () => d.isActivated
59
- })), !e) return null;
60
- const w = f(a === "outline" && "border rounded-3"), O = f(a === "outline" && "py-12 px-16");
61
- return /* @__PURE__ */ i(U.Provider, { value: {
62
- id: s ?? l,
63
- appCode: p,
64
- editor: e,
65
- editable: o
66
- }, children: [
67
- /* @__PURE__ */ i("div", { className: w, children: [
68
- E !== "none" && o && /* @__PURE__ */ t($, { mediaLibraryRef: n, toggleMathsModal: L }),
69
- /* @__PURE__ */ t(j, { id: s ?? l, editor: e, className: O })
70
- ] }),
71
- /* @__PURE__ */ t(q, { editor: e, ...x }),
72
- /* @__PURE__ */ t(D, { editor: e }),
73
- e && /* @__PURE__ */ t(F, { editor: e, onEditImage: r.handleEdit, openEditImage: r.isOpen, editable: o }),
74
- /* @__PURE__ */ i(H, { fallback: /* @__PURE__ */ t(Q, {}), children: [
75
- o && /* @__PURE__ */ t(G, { appCode: p, visibility: m, multiple: !0, ref: n, ...C }),
76
- o && c.isOpen && /* @__PURE__ */ t(V, { ...c }),
77
- o && (r == null ? void 0 : r.isOpen) && (r == null ? void 0 : r.currentImage) && /* @__PURE__ */ t(W, { altText: r == null ? void 0 : r.currentImage.alt, legend: r == null ? void 0 : r.currentImage.title, image: r == null ? void 0 : r.currentImage.src, isOpen: r.isOpen, onCancel: r.handleCancel, onSave: r.handleSave, onError: console.error })
78
- ] })
79
- ] });
80
- });
81
- export {
82
- be as default
83
- };
84
- //# sourceMappingURL=Editor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Editor.js","sources":["../../../../../src/modules/editor/components/Editor/Editor.tsx"],"sourcesContent":["import {\n Ref,\n Suspense,\n forwardRef,\n lazy,\n useId,\n useImperativeHandle,\n} from 'react';\n\nimport '@edifice.io/tiptap-extensions';\nimport { WorkspaceVisibility } from '@edifice.io/ts-client';\nimport {\n Content,\n EditorContent,\n FocusPosition,\n JSONContent,\n} from '@tiptap/react';\nimport clsx from 'clsx';\n\nimport {\n BubbleMenuEditImage,\n EditorContext,\n EditorToolbar,\n LinkToolbar,\n TableToolbar,\n useImageModal,\n useLinkToolbar,\n useMathsModal,\n useMediaLibraryEditor,\n useSpeechSynthetisis,\n useTipTapEditor,\n} from '../..';\nimport { LoadingScreen, useOdeClient } from '../../../..';\nimport { MediaLibrary } from '../../../multimedia';\nimport { useMathsStyles } from '../../hooks/useMathsStyles';\n\nconst MathsModal = lazy(async () => await import('./MathsModal'));\nconst ImageEditor = lazy(\n async () =>\n await import('../../../multimedia/ImageEditor/components/ImageEditor'),\n);\n\nexport interface EditorRef {\n /** Get the current content. */\n getContent: (\n as: 'html' | 'json' | 'plain',\n ) => undefined | string | JSONContent;\n\n /** Get speech synthetisis current state */\n isSpeeching: () => boolean;\n /** [De]activate speech synthetisis */\n toogleSpeechSynthetisis: () => boolean;\n}\n\n/**\n * Editor component properties\n */\nexport interface EditorProps {\n /**\n * (Optional) id of the HTML element.\n * Useful with an external `<FormControl id=...><Label/>`.\n */\n id?: string;\n /** Rich content to render. */\n content: Content;\n /**\n * Rendering mode : `edit` to allow content modifications, or `read` (default)\n * Switching to `edit` mode will also render the toolbar\n * (unless `toolbar` property is `none`).\n */\n mode?: 'edit' | 'read' /* | \"preview\" */;\n /** Toolbar to display in `edit` mode. */\n toolbar?: 'full' | 'none';\n /** Display with or without a border */\n variant?: 'outline' | 'ghost';\n /** Set focus position to the editor */\n focus?: FocusPosition;\n /** Editor placeholder content */\n placeholder?: string;\n /** Visibility of the content created\n * this will impact where the uploaded files will be upload and the availability of the public media files */\n visibility?: WorkspaceVisibility;\n /** Function to listen if content change */\n onContentChange?: ({ editor }: { editor: any }) => void;\n}\n\nconst Editor = forwardRef(\n (\n {\n id,\n content,\n mode = 'read',\n toolbar = 'full',\n variant = 'outline',\n focus = 'start',\n placeholder = '',\n visibility = 'protected',\n onContentChange,\n }: EditorProps,\n ref: Ref<EditorRef>,\n ) => {\n const editorId = useId();\n const { appCode } = useOdeClient();\n const { editor, editable } = useTipTapEditor(\n mode === 'edit',\n content,\n focus,\n placeholder,\n onContentChange,\n );\n const { ref: mediaLibraryModalRef, ...mediaLibraryModalHandlers } =\n useMediaLibraryEditor(editor);\n const { toggle: toggleMathsModal, ...mathsModalHandlers } =\n useMathsModal(editor);\n const imageModal = useImageModal(editor, 'media-library', visibility);\n const linkToolbarHandlers = useLinkToolbar(editor, mediaLibraryModalRef);\n const speechSynthetisis = useSpeechSynthetisis(editor);\n\n useMathsStyles();\n\n //----- Editor API\n useImperativeHandle(ref, () => ({\n getContent: (as: 'html' | 'json' | 'plain') => {\n switch (as) {\n case 'html':\n return editor?.getHTML();\n case 'json':\n return editor?.getJSON();\n case 'plain':\n return editor?.getText();\n default:\n throw new Error(`[Editor] Unknown content format ${as}`);\n }\n },\n toogleSpeechSynthetisis: speechSynthetisis.toggle,\n isSpeeching: () => speechSynthetisis.isActivated,\n }));\n\n if (!editor) return null;\n\n const borderClass = clsx(variant === 'outline' && 'border rounded-3');\n const contentClass = clsx(variant === 'outline' && 'py-12 px-16');\n\n return (\n <EditorContext.Provider\n value={{\n id: id ?? editorId,\n appCode,\n editor,\n editable,\n }}\n >\n <div className={borderClass}>\n {toolbar !== 'none' && editable && (\n <EditorToolbar\n {...{\n mediaLibraryRef: mediaLibraryModalRef,\n toggleMathsModal: toggleMathsModal,\n }}\n />\n )}\n <EditorContent\n id={id ?? editorId}\n editor={editor}\n className={contentClass}\n />\n </div>\n\n <LinkToolbar editor={editor} {...linkToolbarHandlers} />\n\n <TableToolbar editor={editor} />\n\n {editor && (\n <BubbleMenuEditImage\n editor={editor}\n onEditImage={imageModal.handleEdit}\n openEditImage={imageModal.isOpen}\n editable={editable}\n />\n )}\n\n <Suspense fallback={<LoadingScreen />}>\n {editable && (\n <MediaLibrary\n appCode={appCode}\n visibility={visibility}\n multiple={true}\n ref={mediaLibraryModalRef}\n {...mediaLibraryModalHandlers}\n />\n )}\n\n {editable && mathsModalHandlers.isOpen && (\n <MathsModal {...mathsModalHandlers} />\n )}\n\n {editable && imageModal?.isOpen && imageModal?.currentImage && (\n <ImageEditor\n altText={imageModal?.currentImage.alt}\n legend={imageModal?.currentImage.title}\n image={imageModal?.currentImage.src}\n isOpen={imageModal.isOpen}\n onCancel={imageModal.handleCancel}\n onSave={imageModal.handleSave}\n onError={console.error}\n />\n )}\n </Suspense>\n </EditorContext.Provider>\n );\n },\n);\n\nexport default Editor;\n"],"names":["MathsModal","lazy","ImageEditor","Editor","id","content","mode","toolbar","variant","focus","placeholder","visibility","onContentChange","ref","editorId","useId","appCode","useOdeClient","editor","editable","useTipTapEditor","mediaLibraryModalRef","mediaLibraryModalHandlers","useMediaLibraryEditor","toggle","toggleMathsModal","mathsModalHandlers","useMathsModal","imageModal","useImageModal","linkToolbarHandlers","useLinkToolbar","speechSynthetisis","useSpeechSynthetisis","useMathsStyles","useImperativeHandle","getContent","as","getHTML","getJSON","getText","Error","toogleSpeechSynthetisis","isSpeeching","isActivated","borderClass","clsx","contentClass","jsxs","EditorContext","jsx","EditorToolbar","mediaLibraryRef","EditorContent","LinkToolbar","TableToolbar","BubbleMenuEditImage","handleEdit","isOpen","Suspense","LoadingScreen","MediaLibrary","currentImage","alt","title","src","handleCancel","handleSave","console","error"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAMA,IAAkB,gBAAAC,EAAA,YAAY,MAAM,OAAO,iBAAc,CAAC,GAC1DC,IACJ,gBAAAD,EAAA,YACE,MAAM,OAAO,2DAAwD,CACzE,GA8CME,uBACJ,CACE;AAAA,EACEC,IAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,SAAAA,IAAU;AAAA,EACVC,SAAAA,IAAU;AAAA,EACVC,OAAAA,IAAQ;AAAA,EACRC,aAAAA,IAAc;AAAA,EACdC,YAAAA,IAAa;AAAA,EACbC,iBAAAA;AACW,GACbC,MACG;AACH,QAAMC,IAAWC,KACX;AAAA,IAAEC,SAAAA;AAAAA,MAAYC,EAAa,GAC3B;AAAA,IAAEC,QAAAA;AAAAA,IAAQC,UAAAA;AAAAA,EAAAA,IAAaC,EAC3Bd,MAAS,QACTD,GACAI,GACAC,GACAE,CACF,GACM;AAAA,IAAEC,KAAKQ;AAAAA,IAAsB,GAAGC;AAAAA,EAAAA,IACpCC,EAAsBL,CAAM,GACxB;AAAA,IAAEM,QAAQC;AAAAA,IAAkB,GAAGC;AAAAA,EAAAA,IACnCC,EAAcT,CAAM,GAChBU,IAAaC,EAAcX,GAAQ,iBAAiBP,CAAU,GAC9DmB,IAAsBC,EAAeb,GAAQG,CAAoB,GACjEW,IAAoBC,EAAqBf,CAAM;AAsBjD,MApBWgB,KAGfC,EAAoBtB,GAAK,OAAO;AAAA,IAC9BuB,YAAYA,CAACC,MAAkC;AAC7C,cAAQA,GAAE;AAAA,QACR,KAAK;AACH,iBAAOnB,KAAAA,gBAAAA,EAAQoB;AAAAA,QACjB,KAAK;AACH,iBAAOpB,KAAAA,gBAAAA,EAAQqB;AAAAA,QACjB,KAAK;AACH,iBAAOrB,KAAAA,gBAAAA,EAAQsB;AAAAA,QACjB;AACE,gBAAM,IAAIC,MAAM,mCAAmCJ,CAAE,EAAE;AAAA,MAC3D;AAAA,IACF;AAAA,IACAK,yBAAyBV,EAAkBR;AAAAA,IAC3CmB,aAAaA,MAAMX,EAAkBY;AAAAA,EACrC,EAAA,GAEE,CAAC1B,EAAe,QAAA;AAEpB,QAAM2B,IAAcC,EAAKtC,MAAY,aAAa,kBAAkB,GAC9DuC,IAAeD,EAAKtC,MAAY,aAAa,aAAa;AAEhE,SACG,gBAAAwC,EAAAC,EAAc,UAAd,EACC,OAAO;AAAA,IACL7C,IAAIA,KAAMU;AAAAA,IACVE,SAAAA;AAAAA,IACAE,QAAAA;AAAAA,IACAC,UAAAA;AAAAA,EAGF,GAAA,UAAA;AAAA,IAAC,gBAAA6B,EAAA,OAAA,EAAI,WAAWH,GACbtC,UAAAA;AAAAA,MAAAA,MAAY,UAAUY,KACpB,gBAAA+B,EAAAC,GAAA,EAEGC,iBAAiB/B,GACjBI,kBAAAA,GAGL;AAAA,wBACA4B,GACC,EAAA,IAAIjD,KAAMU,GACV,QAAAI,GACA,WAAW6B,GAAa;AAAA,IAAA,GAE5B;AAAA,IAEC,gBAAAG,EAAAI,GAAA,EAAY,QAAApC,GAAoBY,GAAAA,EAAoB,CAAA;AAAA,IAErD,gBAAAoB,EAACK,KAAa,QAAArC,GAAe;AAAA,IAE5BA,KACE,gBAAAgC,EAAAM,GAAA,EACC,QAAAtC,GACA,aAAaU,EAAW6B,YACxB,eAAe7B,EAAW8B,QAC1B,UAAAvC,EAEH,CAAA;AAAA,IAEA,gBAAA6B,EAAAW,GAAA,EAAS,UAAU,gBAAAT,EAACU,KAAa,GAC/BzC,UAAAA;AAAAA,MACCA,KAAA,gBAAA+B,EAACW,KACC,SAAA7C,GACA,YAAAL,GACA,UAAU,IACV,KAAKU,GACDC,GAAAA,EAEP,CAAA;AAAA,MAEAH,KAAYO,EAAmBgC,UAC7B,gBAAAR,EAAAlD,GAAA,EAAe0B,GAAAA,GACjB;AAAA,MAEAP,MAAYS,KAAAA,gBAAAA,EAAY8B,YAAU9B,KAAAA,gBAAAA,EAAYkC,iBAC7C,gBAAAZ,EAAChD,GACC,EAAA,SAAS0B,KAAAA,gBAAAA,EAAYkC,aAAaC,KAClC,QAAQnC,KAAAA,gBAAAA,EAAYkC,aAAaE,OACjC,OAAOpC,KAAAA,gBAAAA,EAAYkC,aAAaG,KAChC,QAAQrC,EAAW8B,QACnB,UAAU9B,EAAWsC,cACrB,QAAQtC,EAAWuC,YACnB,SAASC,QAAQC,OAEpB;AAAA,IAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ,CACF;"}
@@ -1,7 +0,0 @@
1
- interface ModalProps {
2
- isOpen: boolean;
3
- onSuccess?: (formulaEditor: string) => void;
4
- onCancel?: () => void;
5
- }
6
- declare const MathsModal: ({ isOpen, onSuccess, onCancel }: ModalProps) => import('react').ReactPortal;
7
- export default MathsModal;
@@ -1,51 +0,0 @@
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
- }) => {
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
- content: "",
20
- editable: !1
21
- });
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
- `, "$<br/>$");
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
- };
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
- ] }),
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
- ] }),
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
- ] })
46
- ] }), document.getElementById("portal"));
47
- };
48
- export {
49
- j as default
50
- };
51
- //# sourceMappingURL=MathsModal.js.map
@@ -1 +0,0 @@
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,2 +0,0 @@
1
- export { default as Editor } from './Editor';
2
- export * from './Editor';
@@ -1,22 +0,0 @@
1
- import { ReactNode, RefAttributes } from 'react';
2
- import { DropdownMenuOptions, IconButtonProps } from '../../../..';
3
- interface Props {
4
- /**
5
- * Props for the trigger
6
- */
7
- triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
8
- /**
9
- * Menu icon
10
- */
11
- icon: ReactNode;
12
- /**
13
- * Menu label (for accessibility)
14
- */
15
- ariaLabel: string;
16
- /**
17
- * Options to display
18
- */
19
- options: DropdownMenuOptions[];
20
- }
21
- export declare const EditorToolbarDropdownMenu: ({ triggerProps, icon, ariaLabel, options, }: Props) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,18 +0,0 @@
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
- ] });
15
- export {
16
- x as EditorToolbarDropdownMenu
17
- };
18
- //# sourceMappingURL=EditorToolbar.DropdownMenu.js.map
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { RefAttributes } from 'react';
2
- import { IconButtonProps } from '../../../..';
3
- interface Props {
4
- /**
5
- * Props for the trigger
6
- */
7
- triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
8
- /**
9
- * Tracks refs on ColorPickers.
10
- */
11
- itemRefs: any;
12
- }
13
- export declare const EditorToolbarEmoji: ({ triggerProps, itemRefs }: Props) => import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,55 +0,0 @@
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
- }) => {
13
- const {
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
- showPreview: !1
22
- }, searchDisabled: !0, categories: [{
23
- category: t.SUGGESTED,
24
- name: `${o("tiptap.toolbar.emojis.recentlyUsed")}`
25
- }, {
26
- category: t.SMILEYS_PEOPLE,
27
- name: `${o("tiptap.toolbar.emojis.people")}`
28
- }, {
29
- category: t.ANIMALS_NATURE,
30
- name: `${o("tiptap.toolbar.emojis.animalsNature")}`
31
- }, {
32
- category: t.FOOD_DRINK,
33
- name: `${o("tiptap.toolbar.emojis.foodDrink")}`
34
- }, {
35
- category: t.TRAVEL_PLACES,
36
- name: `${o("tiptap.toolbar.emojis.travelPlaces")}`
37
- }, {
38
- category: t.ACTIVITIES,
39
- name: `${o("tiptap.toolbar.emojis.activities")}`
40
- }, {
41
- category: t.OBJECTS,
42
- name: `${o("tiptap.toolbar.emojis.objects")}`
43
- }, {
44
- category: t.SYMBOLS,
45
- name: `${o("tiptap.toolbar.emojis.symbols")}`
46
- }, {
47
- category: t.FLAGS,
48
- name: `${o("tiptap.toolbar.emojis.flags")}`
49
- }] }) }) })
50
- ] });
51
- };
52
- export {
53
- A as EditorToolbarEmoji
54
- };
55
- //# sourceMappingURL=EditorToolbar.Emoji.js.map
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { RefAttributes } from 'react';
2
- import { IconButtonProps } from '../../../..';
3
- interface Props {
4
- /**
5
- * Props for the trigger
6
- */
7
- triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
8
- /**
9
- * Tracks refs on ColorPickers.
10
- */
11
- itemRefs: any;
12
- }
13
- export declare const EditorToolbarHighlightColor: ({ triggerProps, itemRefs, }: Props) => import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,48 +0,0 @@
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
- }) => {
15
- const {
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
- color: /^#([0-9a-f]{3}){1,2}$/i
22
- }),
23
- // eslint-disable-next-line react-hooks/exhaustive-deps
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
- }).run());
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
- reset: {
36
- value: "transparent",
37
- description: e("tiptap.toolbar.highlight.none")
38
- }
39
- }];
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
- ] });
44
- };
45
- export {
46
- N as EditorToolbarHighlightColor
47
- };
48
- //# sourceMappingURL=EditorToolbar.HighlightColor.js.map
@@ -1 +0,0 @@
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,9 +0,0 @@
1
- import { DropdownMenuOptions } from '../../../..';
2
- interface Props {
3
- /**
4
- * Options to display
5
- */
6
- options: DropdownMenuOptions[];
7
- }
8
- export declare const EditorToolbarPlusMenu: ({ options }: Props) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,19 +0,0 @@
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
- }) => {
8
- const {
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
- ] });
15
- };
16
- export {
17
- g as EditorToolbarPlusMenu
18
- };
19
- //# sourceMappingURL=EditorToolbar.PlusMenu.js.map
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { RefAttributes } from 'react';
2
- import { IconButtonProps } from '../../../..';
3
- interface Props {
4
- /**
5
- * Props for the trigger
6
- */
7
- triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
8
- /**
9
- * Tracks refs on ColorPickers.
10
- */
11
- itemRefs: any;
12
- }
13
- export declare const EditorToolbarTextColor: ({ triggerProps, itemRefs }: Props) => import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,51 +0,0 @@
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
- }) => {
15
- const {
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
- color: /^#([0-9a-f]{3}){1,2}$/i
22
- }),
23
- // eslint-disable-next-line react-hooks/exhaustive-deps
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
- }, {
36
- ...y,
37
- label: e("tiptap.toolbar.color.a13y"),
38
- tooltip: {
39
- message: e("tiptap.toolbar.color.a13y.hint"),
40
- placement: "right"
41
- }
42
- }];
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
- ] });
47
- };
48
- export {
49
- q as EditorToolbarTextColor
50
- };
51
- //# sourceMappingURL=EditorToolbar.TextColor.js.map
@@ -1 +0,0 @@
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;"}
@@ -1,10 +0,0 @@
1
- import { RefAttributes } from 'react';
2
- import { IconButtonProps } from '../../../..';
3
- interface Props {
4
- /**
5
- * Props for the trigger
6
- */
7
- triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
8
- }
9
- export declare const EditorToolbarTextSize: ({ triggerProps }: Props) => import("react/jsx-runtime").JSX.Element;
10
- export {};