@edifice.io/react 2.6.13-develop-b2school.20261109110305 → 2.6.13-develop-pedago.20261109143551

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 (1086) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +1 -0
  2. package/dist/audience.js +1 -16
  3. package/dist/comments.js +1 -4
  4. package/dist/components/ActionBar/ActionBar.js +1 -8
  5. package/dist/components/AddAttachments/AddAttachments.js +1 -75
  6. package/dist/components/AddAttachments/components/AddAttachmentToWorkspaceModal.js +1 -41
  7. package/dist/components/AddAttachments/components/SingleAttachment.js +1 -27
  8. package/dist/components/AddAttachments/hooks/useFileToAttachment.js +1 -16
  9. package/dist/components/Alert/Alert.js +1 -105
  10. package/dist/components/AppHeader/AppHeader.js +1 -22
  11. package/dist/components/AppIcon/AppIcon.d.ts +15 -1
  12. package/dist/components/AppIcon/AppIcon.js +1 -60
  13. package/dist/components/Attachment/Attachment.js +1 -18
  14. package/dist/components/Avatar/Avatar.js +1 -53
  15. package/dist/components/AvatarGroup/AvatarGroup.js +1 -24
  16. package/dist/components/Badge/Badge.js +1 -33
  17. package/dist/components/BetaSwitch/BetaSwitch.js +1 -27
  18. package/dist/components/Breadcrumb/Breadcrumb.js +1 -28
  19. package/dist/components/Breadcrumb/BreadcrumbItem.js +1 -14
  20. package/dist/components/Breadcrumb/BreadcrumbList.js +1 -13
  21. package/dist/components/Breadcrumb/BreadcrumbNav.js +1 -22
  22. package/dist/components/Button/Button.js +1 -36
  23. package/dist/components/Button/IconButton.js +1 -19
  24. package/dist/components/Button/SearchButton.js +1 -17
  25. package/dist/components/ButtonBeta/ButtonBeta.js +1 -37
  26. package/dist/components/Card/Card.js +1 -53
  27. package/dist/components/Card/CardBody.js +1 -20
  28. package/dist/components/Card/CardContext.js +1 -11
  29. package/dist/components/Card/CardFooter.js +1 -7
  30. package/dist/components/Card/CardHeader.js +1 -22
  31. package/dist/components/Card/CardImage.js +1 -21
  32. package/dist/components/Card/CardText.js +1 -12
  33. package/dist/components/Card/CardTitle.js +1 -12
  34. package/dist/components/Card/CardUser.js +1 -10
  35. package/dist/components/Checkbox/Checkbox.js +1 -35
  36. package/dist/components/ColorPicker/ColorPalette.js +1 -171
  37. package/dist/components/ColorPicker/ColorPicker.js +1 -38
  38. package/dist/components/ColorPicker/ColorPickerItem.js +1 -13
  39. package/dist/components/Combobox/Combobox.js +1 -61
  40. package/dist/components/Combobox/ComboboxTrigger.js +1 -57
  41. package/dist/components/DatePicker/DatePicker.js +1 -40
  42. package/dist/components/Divider/Divider.js +1 -11
  43. package/dist/components/Dropdown/Dropdown.d.ts +1 -0
  44. package/dist/components/Dropdown/Dropdown.js +1 -101
  45. package/dist/components/Dropdown/DropdownCheckboxItem.js +1 -39
  46. package/dist/components/Dropdown/DropdownContext.js +1 -11
  47. package/dist/components/Dropdown/DropdownItem.js +1 -62
  48. package/dist/components/Dropdown/DropdownItemHidden.js +1 -19
  49. package/dist/components/Dropdown/DropdownMenu.js +1 -26
  50. package/dist/components/Dropdown/DropdownMenuGroup.js +1 -30
  51. package/dist/components/Dropdown/DropdownRadioItem.js +1 -39
  52. package/dist/components/Dropdown/DropdownSearchInput.js +1 -33
  53. package/dist/components/Dropdown/DropdownSeparator.js +1 -5
  54. package/dist/components/Dropdown/DropdownTrigger.js +1 -74
  55. package/dist/components/Dropdown/DropdownVirtualizedMenu.d.ts +80 -0
  56. package/dist/components/Dropdown/DropdownVirtualizedMenu.js +1 -0
  57. package/dist/components/Dropdown/index.d.ts +1 -0
  58. package/dist/components/Dropdown/useDropdownItemFilter.js +1 -17
  59. package/dist/components/Dropdown/useMatchRegistry.js +1 -20
  60. package/dist/components/Dropzone/Dropzone.js +1 -55
  61. package/dist/components/Dropzone/DropzoneContext.js +1 -12
  62. package/dist/components/Dropzone/DropzoneDrag.js +1 -11
  63. package/dist/components/Dropzone/DropzoneFile.js +1 -30
  64. package/dist/components/Dropzone/DropzoneImport.js +1 -28
  65. package/dist/components/EmptyScreen/EmptyScreen.js +1 -21
  66. package/dist/components/Flex/Flex.js +1 -25
  67. package/dist/components/Form/FormContext.js +1 -11
  68. package/dist/components/Form/FormControl.js +1 -32
  69. package/dist/components/Form/FormText.js +1 -22
  70. package/dist/components/Grid/Grid.d.ts +1 -1
  71. package/dist/components/Grid/Grid.js +1 -32
  72. package/dist/components/Heading/Heading.js +1 -16
  73. package/dist/components/Image/Image.js +1 -44
  74. package/dist/components/Input/Input.js +1 -64
  75. package/dist/components/Label/Label.js +1 -37
  76. package/dist/components/Layout/Layout.js +1 -67
  77. package/dist/components/Layout/components/Header.js +1 -198
  78. package/dist/components/Layout/components/HeaderNotificationsOverlay.js +1 -18
  79. package/dist/components/Layout/components/Help.js +1 -25
  80. package/dist/components/Layout/components/NavItem.js +1 -14
  81. package/dist/components/Layout/components/NavLink.js +1 -23
  82. package/dist/components/Layout/components/Navbar.js +1 -13
  83. package/dist/components/Layout/components/NavbarNav.js +1 -13
  84. package/dist/components/Layout/components/SearchEngine.js +1 -33
  85. package/dist/components/Layout/components/WidgetApps.js +1 -23
  86. package/dist/components/Layout/hooks/useHeader.js +1 -39
  87. package/dist/components/Layout/hooks/useHelp.js +1 -86
  88. package/dist/components/LinkPill/LinkPill.js +1 -28
  89. package/dist/components/List/List.js +1 -54
  90. package/dist/components/Loading/Loading.js +1 -27
  91. package/dist/components/LoadingScreen/LoadingScreen.js +1 -25
  92. package/dist/components/Logo/Logo.js +1 -14
  93. package/dist/components/LogoBeta/LogoBeta.js +1 -14
  94. package/dist/components/MediaViewer/MediaViewer.js +1 -36
  95. package/dist/components/MediaViewer/MediaWrapper.js +1 -72
  96. package/dist/components/MediaViewer/PdfViewer.js +1 -36
  97. package/dist/components/MediaViewer/ToolbarViewer.js +1 -41
  98. package/dist/components/MediaViewer/ToolbarZoom.js +1 -19
  99. package/dist/components/Menu/components/Menu.js +1 -27
  100. package/dist/components/Menu/components/MenuButton.js +1 -30
  101. package/dist/components/Menu/components/MenuContext.js +1 -12
  102. package/dist/components/Menu/components/MenuItem.js +1 -19
  103. package/dist/components/Menu/hooks/useMenu.js +1 -50
  104. package/dist/components/Modal/Modal.js +1 -73
  105. package/dist/components/Modal/ModalBody.js +1 -15
  106. package/dist/components/Modal/ModalContext.js +1 -15
  107. package/dist/components/Modal/ModalFooter.js +1 -5
  108. package/dist/components/Modal/ModalHeader.js +1 -32
  109. package/dist/components/Modal/ModalSubtitle.js +1 -5
  110. package/dist/components/ModalBeta/ModalBeta.js +1 -62
  111. package/dist/components/ModalBeta/ModalBetaBody.js +1 -15
  112. package/dist/components/ModalBeta/ModalBetaContext.js +1 -15
  113. package/dist/components/ModalBeta/ModalBetaFooter.js +1 -7
  114. package/dist/components/ModalBeta/ModalBetaHeader.js +1 -31
  115. package/dist/components/PageLayout/PageLayout.js +1 -117
  116. package/dist/components/PageLayout/PageLayoutContext.js +1 -8
  117. package/dist/components/PageLayout/components/PageLayoutBreadcrumb.js +1 -10
  118. package/dist/components/PageLayout/components/PageLayoutContent.js +1 -22
  119. package/dist/components/PageLayout/components/PageLayoutHeader.js +1 -18
  120. package/dist/components/PageLayout/components/PageLayoutHelpZone.js +1 -6
  121. package/dist/components/PageLayout/components/PageLayoutOverlay.js +1 -51
  122. package/dist/components/PageLayout/components/PageLayoutSidebarLeft.js +1 -18
  123. package/dist/components/PageLayout/components/PageLayoutSidebarRight.js +1 -18
  124. package/dist/components/PageLayout/hook/useOverlay.js +1 -15
  125. package/dist/components/PageLayout/store/overlayStore.js +1 -12
  126. package/dist/components/Pagination/Pagination.js +1 -14
  127. package/dist/components/Popover/Popover.js +1 -52
  128. package/dist/components/PreventPropagation/PreventPropagation.js +1 -9
  129. package/dist/components/PromotionCard/PromotionCard.js +1 -31
  130. package/dist/components/PromotionCard/PromotionCardBody.js +1 -15
  131. package/dist/components/PromotionCard/PromotionCardDescription.js +1 -12
  132. package/dist/components/PromotionCard/PromotionCardFooter.js +1 -12
  133. package/dist/components/PromotionCard/PromotionCardHeader.js +1 -17
  134. package/dist/components/PromotionCard/PromotionCardIcon.js +1 -15
  135. package/dist/components/PromotionCard/PromotionCardTitle.js +1 -12
  136. package/dist/components/Radio/Radio.js +1 -31
  137. package/dist/components/RadioCard/RadioCard.js +1 -32
  138. package/dist/components/RadioTile/RadioTile.js +1 -22
  139. package/dist/components/SearchBar/SearchBar.js +1 -45
  140. package/dist/components/SegmentedControl/SegmentedControl.js +1 -33
  141. package/dist/components/Select/Select.js +1 -52
  142. package/dist/components/Select/SelectTrigger.js +1 -6
  143. package/dist/components/Skeleton/ButtonSkeleton.d.ts +9 -0
  144. package/dist/components/Skeleton/ButtonSkeleton.js +1 -16
  145. package/dist/components/Skeleton/Skeleton.d.ts +57 -0
  146. package/dist/components/Skeleton/Skeleton.js +1 -0
  147. package/dist/components/Skeleton/TextSkeleton.d.ts +8 -0
  148. package/dist/components/Skeleton/TextSkeleton.js +1 -16
  149. package/dist/components/Skeleton/index.d.ts +2 -0
  150. package/dist/components/SmartEllipsis/SmartEllipsis.js +1 -21
  151. package/dist/components/StackedGroup/StackedGroup.js +1 -23
  152. package/dist/components/Stepper/Stepper.js +1 -15
  153. package/dist/components/Switch/Switch.js +1 -27
  154. package/dist/components/Table/components/Table.d.ts +34 -7
  155. package/dist/components/Table/components/Table.js +1 -25
  156. package/dist/components/Table/components/TableTbody.js +1 -11
  157. package/dist/components/Table/components/TableTd.js +1 -11
  158. package/dist/components/Table/components/TableTh.js +1 -11
  159. package/dist/components/Table/components/TableThead.js +1 -11
  160. package/dist/components/Table/components/TableTr.js +1 -11
  161. package/dist/components/Table/components/TableVirtualizedBody.d.ts +29 -0
  162. package/dist/components/Table/components/TableVirtualizedBody.js +1 -0
  163. package/dist/components/Tabs/components/Tabs.js +1 -51
  164. package/dist/components/Tabs/components/TabsItem.js +1 -31
  165. package/dist/components/Tabs/components/TabsList.js +1 -34
  166. package/dist/components/Tabs/components/TabsPanel.js +1 -19
  167. package/dist/components/Tabs/context/TabsContext.js +1 -12
  168. package/dist/components/Tabs/hooks/useTabs.js +1 -61
  169. package/dist/components/TextArea/TextArea.js +1 -43
  170. package/dist/components/TextCounter/TextCounter.js +1 -16
  171. package/dist/components/Toolbar/Toolbar.js +1 -83
  172. package/dist/components/Tooltip/Tooltip.js +1 -41
  173. package/dist/components/Tree/components/DndTree.js +1 -61
  174. package/dist/components/Tree/components/SortableTree.js +1 -140
  175. package/dist/components/Tree/components/Tree.js +1 -89
  176. package/dist/components/Tree/hooks/useTree.js +1 -66
  177. package/dist/components/Tree/hooks/useTreeSortable.js +1 -198
  178. package/dist/components/Tree/utilities/tree-sortable.js +1 -161
  179. package/dist/components/Tree/utilities/tree.js +1 -64
  180. package/dist/components/TreeView/TreeNode.js +1 -69
  181. package/dist/components/TreeView/TreeView.js +1 -37
  182. package/dist/components/TreeView/hooks/useTreeView.js +1 -105
  183. package/dist/components/TreeView/utilities/treeview.js +1 -177
  184. package/dist/components/UserRightsList/SaveBookmark.js +1 -29
  185. package/dist/components/UserRightsList/UserRightsBookmarkRow.js +1 -30
  186. package/dist/components/UserRightsList/UserRightsItem.js +1 -36
  187. package/dist/components/UserRightsList/UserRightsList.js +1 -94
  188. package/dist/components/UserRightsList/helpers/rightsHelpers.js +1 -53
  189. package/dist/components/UserRightsList/hooks/useBookmarkEntries.js +1 -58
  190. package/dist/components/UserRightsList/hooks/useSharingItems.js +1 -57
  191. package/dist/components/UserRightsList/types/types.js +1 -6
  192. package/dist/components/UserSearch/UserSearch.js +1 -82
  193. package/dist/components/UserSearch/types/visible.js +1 -4
  194. package/dist/components/VisuallyHidden/VisuallyHidden.js +1 -8
  195. package/dist/components/index.d.ts +0 -1
  196. package/dist/editor.js +1 -79
  197. package/dist/homepage.js +1 -144
  198. package/dist/hooks/useBackground/useBackground.js +1 -18
  199. package/dist/hooks/useBookmark/useBookmark.js +1 -14
  200. package/dist/hooks/useBreakpoint/useBreakpoint.js +1 -14
  201. package/dist/hooks/useBrowserInfo/useBrowserInfo.js +1 -15
  202. package/dist/hooks/useCantoo/useCantoo.js +1 -18
  203. package/dist/hooks/useCarbonioUnread/useCarbonioUnread.js +1 -24
  204. package/dist/hooks/useCheckable/useCheckable.js +1 -28
  205. package/dist/hooks/useClickOutside/useClickOutside.js +1 -27
  206. package/dist/hooks/useConf/useConf.js +1 -13
  207. package/dist/hooks/useConversation/useConversation.js +1 -39
  208. package/dist/hooks/useCookiesConsent/useCookiesConsent.js +1 -29
  209. package/dist/hooks/useDate/useDate.d.ts +32 -14
  210. package/dist/hooks/useDate/useDate.js +1 -87
  211. package/dist/hooks/useDebounce/useDebounce.js +1 -15
  212. package/dist/hooks/useDirectory/useDirectory.js +1 -17
  213. package/dist/hooks/useDropdown/useDropdown.js +1 -188
  214. package/dist/hooks/useDropzone/useDropzone.js +1 -98
  215. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +1 -101
  216. package/dist/hooks/useHasWorkflow/useHasWorkflow.js +1 -14
  217. package/dist/hooks/useHover/useHover.js +1 -22
  218. package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +1 -36
  219. package/dist/hooks/useImage/useImage.js +1 -18
  220. package/dist/hooks/useInfiniteScroll/useInfiniteScroll.js +1 -20
  221. package/dist/hooks/useIsAdmc/useIsAdmc.js +1 -22
  222. package/dist/hooks/useIsAdml/useIsAdml.js +1 -18
  223. package/dist/hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js +1 -16
  224. package/dist/hooks/useKeyPress/useKeyPress.js +1 -14
  225. package/dist/hooks/useLibraryUrl/useLibraryUrl.js +1 -21
  226. package/dist/hooks/useMediaLibrary/useMediaLibrary.js +1 -58
  227. package/dist/hooks/useNextcloudSearch/useNextcloudSearch.js +1 -64
  228. package/dist/hooks/usePreferences/usePreferences.js +1 -10
  229. package/dist/hooks/usePublicConf/usePublicConf.js +1 -12
  230. package/dist/hooks/useResource/useResource.js +1 -25
  231. package/dist/hooks/useResourceSearch/useResourceSearch.js +1 -19
  232. package/dist/hooks/useScreeb/useScreeb.js +1 -22
  233. package/dist/hooks/useScrollToTop/useScrollToTop.js +1 -9
  234. package/dist/hooks/useSession/useSession.js +1 -11
  235. package/dist/hooks/useThumbnail/useThumbnail.js +1 -33
  236. package/dist/hooks/useTitle/useTitle.js +1 -10
  237. package/dist/hooks/useToast/useToast.js +1 -37
  238. package/dist/hooks/useToggle/useToggle.js +1 -10
  239. package/dist/hooks/useTrapFocus/useTrapFocus.js +1 -17
  240. package/dist/hooks/useTrashedResource/useTrashedResource.js +1 -27
  241. package/dist/hooks/useUiOverride/useUiOverride.js +1 -13
  242. package/dist/hooks/useUpload/useUpload.js +1 -109
  243. package/dist/hooks/useUploadFiles/useUploadFiles.js +1 -107
  244. package/dist/hooks/useUser/useUser.js +1 -22
  245. package/dist/hooks/useUserPreferences/useUserPreferences.js +1 -40
  246. package/dist/hooks/useWorkspaceFile/useWorkspaceFile.js +1 -49
  247. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -54
  248. package/dist/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js +1 -51
  249. package/dist/hooks/useWorkspaceSearch/useWorkspaceSearch.js +1 -50
  250. package/dist/hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js +1 -28
  251. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
  252. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +1 -132
  253. package/dist/hooks/useZoom/useZoom.js +1 -14
  254. package/dist/icons-apps.js +1 -270
  255. package/dist/icons-audience.js +1 -28
  256. package/dist/icons-nav.js +1 -40
  257. package/dist/icons.js +1 -410
  258. package/dist/index.js +1 -382
  259. package/dist/modals.js +1 -22
  260. package/dist/modules/HelpZone/HelpZone.js +1 -50
  261. package/dist/modules/HelpZone/HelpZoneContainer.js +1 -15
  262. package/dist/modules/audience/ReactionChoice.js +1 -33
  263. package/dist/modules/audience/ReactionModal.Card.js +1 -33
  264. package/dist/modules/audience/ReactionModal.js +1 -75
  265. package/dist/modules/audience/ReactionSummary.js +1 -27
  266. package/dist/modules/audience/ViewsByProfileCard.js +1 -40
  267. package/dist/modules/audience/ViewsCounter.js +1 -20
  268. package/dist/modules/audience/ViewsModal.js +1 -44
  269. package/dist/modules/audience/hooks/useReactionIcons.js +1 -45
  270. package/dist/modules/audience/hooks/useReactions.js +1 -35
  271. package/dist/modules/comments/components/BadgeProfile.js +1 -18
  272. package/dist/modules/comments/components/Comment.js +1 -94
  273. package/dist/modules/comments/components/CommentAvatar.js +1 -17
  274. package/dist/modules/comments/components/CommentDate.js +1 -24
  275. package/dist/modules/comments/components/CommentDeleted.js +1 -11
  276. package/dist/modules/comments/components/CommentForm.js +1 -41
  277. package/dist/modules/comments/components/CommentList.js +1 -22
  278. package/dist/modules/comments/components/CommentReplies.js +1 -33
  279. package/dist/modules/comments/components/CommentTitle.js +1 -7
  280. package/dist/modules/comments/components/DeleteModal.js +1 -25
  281. package/dist/modules/comments/components/TextCounter.js +1 -8
  282. package/dist/modules/comments/context/Context.js +1 -5
  283. package/dist/modules/comments/hooks/useAutosizeTextarea.js +1 -19
  284. package/dist/modules/comments/hooks/useCommentReplies.js +1 -36
  285. package/dist/modules/comments/hooks/useComments.js +1 -71
  286. package/dist/modules/comments/hooks/useCommentsContext.js +1 -11
  287. package/dist/modules/comments/hooks/useProfileQueries.js +1 -27
  288. package/dist/modules/comments/provider/CommentProvider.js +1 -90
  289. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +1 -135
  290. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +1 -136
  291. package/dist/modules/editor/components/Editor/CantooAdaptTextBoxView.js +1 -33
  292. package/dist/modules/editor/components/Editor/Editor.js +1 -106
  293. package/dist/modules/editor/components/Editor/EditorPreview.js +1 -56
  294. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +1 -24
  295. package/dist/modules/editor/components/Editor/EditorSkeleton.js +1 -31
  296. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Cantoo.js +1 -79
  297. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +1 -17
  298. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +1 -54
  299. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +1 -47
  300. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +1 -18
  301. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +1 -50
  302. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +1 -62
  303. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +1 -52
  304. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +1 -356
  305. package/dist/modules/editor/components/MathsModal/MathsModal.d.ts +1 -1
  306. package/dist/modules/editor/components/MathsModal/MathsModal.js +1 -49
  307. package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +1 -10
  308. package/dist/modules/editor/components/NodeView/AudioNodeView.js +1 -10
  309. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +1 -10
  310. package/dist/modules/editor/components/NodeView/IframeNodeView.js +1 -10
  311. package/dist/modules/editor/components/NodeView/ImageNodeView.js +1 -12
  312. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.js +1 -10
  313. package/dist/modules/editor/components/NodeView/LinkerNodeView.js +1 -10
  314. package/dist/modules/editor/components/NodeView/VideoNodeView.js +1 -10
  315. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +1 -50
  316. package/dist/modules/editor/components/Renderer/AudioRenderer.js +1 -35
  317. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +1 -28
  318. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.js +1 -33
  319. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +1 -34
  320. package/dist/modules/editor/components/Renderer/MediaRenderer.js +1 -84
  321. package/dist/modules/editor/components/Toolbar/FloatingMenuOptions.d.ts +29 -0
  322. package/dist/modules/editor/components/Toolbar/FloatingMenuOptions.js +1 -0
  323. package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +6 -3
  324. package/dist/modules/editor/components/Toolbar/LinkToolbar.js +1 -61
  325. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +1 -54
  326. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +1 -45
  327. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +1 -48
  328. package/dist/modules/editor/components/Toolbar/TableToolbar.js +1 -89
  329. package/dist/modules/editor/hooks/index.d.ts +1 -0
  330. package/dist/modules/editor/hooks/useActionOptions.js +1 -86
  331. package/dist/modules/editor/hooks/useCantooEditor.js +1 -89
  332. package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
  333. package/dist/modules/editor/hooks/useCommentEditor.js +1 -37
  334. package/dist/modules/editor/hooks/useEditorContext.js +1 -12
  335. package/dist/modules/editor/hooks/useEditorState.d.ts +20 -0
  336. package/dist/modules/editor/hooks/useEditorState.js +1 -0
  337. package/dist/modules/editor/hooks/useImageModal.js +1 -46
  338. package/dist/modules/editor/hooks/useImageSelection.js +1 -46
  339. package/dist/modules/editor/hooks/useLinkToolbar.d.ts +2 -2
  340. package/dist/modules/editor/hooks/useLinkToolbar.js +1 -37
  341. package/dist/modules/editor/hooks/useMathsModal.d.ts +1 -1
  342. package/dist/modules/editor/hooks/useMathsModal.js +1 -17
  343. package/dist/modules/editor/hooks/useMathsStyles.js +1 -20
  344. package/dist/modules/editor/hooks/useMediaLibraryEditor.js +3 -152
  345. package/dist/modules/editor/hooks/useResizeMedia.js +1 -59
  346. package/dist/modules/editor/hooks/useSpeechRecognition.js +1 -21
  347. package/dist/modules/editor/hooks/useSpeechSynthetisis.js +1 -20
  348. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +3 -3
  349. package/dist/modules/editor/hooks/useTipTapEditor.js +1 -88
  350. package/dist/modules/editor/utilities/has-extension.js +1 -4
  351. package/dist/modules/editor/utilities/has-mark.js +1 -4
  352. package/dist/modules/editor/utilities/has-text-style.js +1 -5
  353. package/dist/modules/homepage/components/AlloRegion/AlloRegion.js +1 -32
  354. package/dist/modules/homepage/components/AlloRegion/AlloRegionContainer.js +1 -10
  355. package/dist/modules/homepage/components/Communities/Communities.js +1 -36
  356. package/dist/modules/homepage/components/Communities/CommunitiesContainer.js +1 -35
  357. package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.js +1 -29
  358. package/dist/modules/homepage/components/Communities/CommunityItem.js +1 -28
  359. package/dist/modules/homepage/components/Communities/useCommunities.js +1 -30
  360. package/dist/modules/homepage/components/Favorites/Favorites.js +1 -28
  361. package/dist/modules/homepage/components/Favorites/FavoritesContainer.js +1 -10
  362. package/dist/modules/homepage/components/Header/AccountActionListPopover.js +1 -26
  363. package/dist/modules/homepage/components/Header/ActionItem.js +1 -34
  364. package/dist/modules/homepage/components/Header/Header.js +1 -107
  365. package/dist/modules/homepage/components/Header/MyAppsPopover.js +1 -28
  366. package/dist/modules/homepage/components/Header/useSafeHoverPopover.js +1 -32
  367. package/dist/modules/homepage/components/HomeCard/HomeCard.js +1 -25
  368. package/dist/modules/homepage/components/HomeCard/HomeCardContent.js +1 -10
  369. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
  370. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -23
  371. package/dist/modules/homepage/components/LastInfos/LastInfos.js +1 -58
  372. package/dist/modules/homepage/components/LastInfos/LastInfosContainer.js +1 -37
  373. package/dist/modules/homepage/components/LastInfos/LastInfosList.js +1 -31
  374. package/dist/modules/homepage/components/LastInfos/useLastInfos.js +1 -25
  375. package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +1 -63
  376. package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.js +1 -10
  377. package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.js +1 -14
  378. package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.js +1 -19
  379. package/dist/modules/homepage/components/MessageFlashList/services/api/index.js +1 -5
  380. package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.js +1 -21
  381. package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.js +1 -31
  382. package/dist/modules/homepage/components/Notifications/NotificationItem.js +1 -17
  383. package/dist/modules/homepage/components/Notifications/NotificationList.js +1 -50
  384. package/dist/modules/homepage/components/Notifications/NotificationListContainer.js +1 -23
  385. package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +1 -12
  386. package/dist/modules/homepage/components/Notifications/NotificationSkeleton.d.ts +23 -1
  387. package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +1 -22
  388. package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +1 -32
  389. package/dist/modules/homepage/components/Notifications/components/NotificationFilterMenu.js +1 -25
  390. package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +1 -75
  391. package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.js +1 -20
  392. package/dist/modules/homepage/components/Notifications/components/NotificationOptionsMenu.js +1 -36
  393. package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +1 -25
  394. package/dist/modules/homepage/components/Notifications/components/SystemNotificationItem.js +1 -21
  395. package/dist/modules/homepage/components/Notifications/components/UserNotificationItem.js +1 -26
  396. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +1 -73
  397. package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +1 -57
  398. package/dist/modules/homepage/components/Notifications/services/api/index.js +1 -5
  399. package/dist/modules/homepage/components/Notifications/services/api/notificationService.js +1 -33
  400. package/dist/modules/homepage/components/Notifications/services/queries/notification.js +1 -84
  401. package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +1 -38
  402. package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -13
  403. package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.d.ts +2 -2
  404. package/dist/modules/homepage/components/SchoolSpace/useUserSchools.js +1 -0
  405. package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +1 -67
  406. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +1 -31
  407. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.js +1 -40
  408. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +1 -65
  409. package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js +1 -26
  410. package/dist/modules/homepage/components/UsefulLinks/services/api/index.js +1 -5
  411. package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.js +1 -50
  412. package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.js +1 -65
  413. package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
  414. package/dist/modules/homepage/components/UserSpace/UserSpace.js +1 -37
  415. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
  416. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +1 -20
  417. package/dist/modules/homepage/components/UserSpace/hooks/useChildren.js +1 -23
  418. package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +1 -75
  419. package/dist/modules/homepage/components/index.d.ts +2 -14
  420. package/dist/modules/homepage/hooks/useWidget.js +1 -83
  421. package/dist/modules/homepage/hooks/useWidgetPreferences.js +1 -34
  422. package/dist/modules/icons/components/IconAdd.js +1 -12
  423. package/dist/modules/icons/components/IconAddUser.js +1 -12
  424. package/dist/modules/icons/components/IconAdjustSettings.js +1 -12
  425. package/dist/modules/icons/components/IconAiFill.js +1 -12
  426. package/dist/modules/icons/components/IconAlertCircle.js +1 -13
  427. package/dist/modules/icons/components/IconAlertTriangle.js +1 -13
  428. package/dist/modules/icons/components/IconAlignCenter.js +1 -12
  429. package/dist/modules/icons/components/IconAlignJustify.js +1 -12
  430. package/dist/modules/icons/components/IconAlignLeft.js +1 -12
  431. package/dist/modules/icons/components/IconAlignRight.js +1 -12
  432. package/dist/modules/icons/components/IconAnswer.js +1 -13
  433. package/dist/modules/icons/components/IconApplications.js +1 -12
  434. package/dist/modules/icons/components/IconArrowDown.js +1 -13
  435. package/dist/modules/icons/components/IconArrowLeft.js +1 -13
  436. package/dist/modules/icons/components/IconArrowRight.js +1 -13
  437. package/dist/modules/icons/components/IconArrowUp.js +1 -13
  438. package/dist/modules/icons/components/IconBlock.js +1 -12
  439. package/dist/modules/icons/components/IconBlur.js +1 -13
  440. package/dist/modules/icons/components/IconBookmark.js +1 -12
  441. package/dist/modules/icons/components/IconBulle.js +1 -16
  442. package/dist/modules/icons/components/IconBulleError.js +1 -13
  443. package/dist/modules/icons/components/IconBulleSuccess.js +1 -13
  444. package/dist/modules/icons/components/IconBulletList.js +1 -16
  445. package/dist/modules/icons/components/IconBurgerMenu.js +1 -12
  446. package/dist/modules/icons/components/IconCalendar.js +1 -12
  447. package/dist/modules/icons/components/IconCalendarEdit.js +1 -12
  448. package/dist/modules/icons/components/IconCalendarLight.js +1 -12
  449. package/dist/modules/icons/components/IconCamera.js +1 -13
  450. package/dist/modules/icons/components/IconCantoo.js +1 -23
  451. package/dist/modules/icons/components/IconCenter.js +1 -12
  452. package/dist/modules/icons/components/IconCheck.js +1 -12
  453. package/dist/modules/icons/components/IconChecklist.js +1 -13
  454. package/dist/modules/icons/components/IconClass.js +1 -13
  455. package/dist/modules/icons/components/IconClock.js +1 -12
  456. package/dist/modules/icons/components/IconClockAlert.js +1 -17
  457. package/dist/modules/icons/components/IconClose.js +1 -13
  458. package/dist/modules/icons/components/IconCloseFullScreen.js +1 -12
  459. package/dist/modules/icons/components/IconCode.js +1 -12
  460. package/dist/modules/icons/components/IconCollect.js +1 -12
  461. package/dist/modules/icons/components/IconCopy.js +1 -12
  462. package/dist/modules/icons/components/IconCrop.js +1 -13
  463. package/dist/modules/icons/components/IconCut.js +1 -13
  464. package/dist/modules/icons/components/IconDelete.js +1 -12
  465. package/dist/modules/icons/components/IconDeleteColor.js +1 -13
  466. package/dist/modules/icons/components/IconDeleteColumn.js +1 -12
  467. package/dist/modules/icons/components/IconDeleteColumnHighlight.js +1 -12
  468. package/dist/modules/icons/components/IconDeleteRow.js +1 -12
  469. package/dist/modules/icons/components/IconDeleteRowHighlight.js +1 -12
  470. package/dist/modules/icons/components/IconDepositeInbox.js +1 -13
  471. package/dist/modules/icons/components/IconDownload.js +1 -17
  472. package/dist/modules/icons/components/IconEdit.js +1 -13
  473. package/dist/modules/icons/components/IconError.js +1 -12
  474. package/dist/modules/icons/components/IconExercizerAi.js +1 -14
  475. package/dist/modules/icons/components/IconExternalLink.js +1 -13
  476. package/dist/modules/icons/components/IconFiles.js +1 -12
  477. package/dist/modules/icons/components/IconFilter.js +1 -12
  478. package/dist/modules/icons/components/IconFlag.js +1 -12
  479. package/dist/modules/icons/components/IconFolder.js +1 -12
  480. package/dist/modules/icons/components/IconFolderAdd.js +1 -13
  481. package/dist/modules/icons/components/IconFolderDelete.js +1 -12
  482. package/dist/modules/icons/components/IconFolderMove.js +1 -17
  483. package/dist/modules/icons/components/IconForgoing.js +1 -12
  484. package/dist/modules/icons/components/IconFullScreen.js +1 -12
  485. package/dist/modules/icons/components/IconGlobe.js +1 -12
  486. package/dist/modules/icons/components/IconGlobe2.js +1 -16
  487. package/dist/modules/icons/components/IconGroupAvatar.js +1 -12
  488. package/dist/modules/icons/components/IconHandMove.js +1 -12
  489. package/dist/modules/icons/components/IconHeadphone.js +1 -12
  490. package/dist/modules/icons/components/IconHide.js +1 -13
  491. package/dist/modules/icons/components/IconHighlightColumn.js +1 -12
  492. package/dist/modules/icons/components/IconHighlightRow.js +1 -12
  493. package/dist/modules/icons/components/IconHome.js +1 -12
  494. package/dist/modules/icons/components/IconHourglass.js +1 -12
  495. package/dist/modules/icons/components/IconImageSizeLarge.js +1 -12
  496. package/dist/modules/icons/components/IconImageSizeMedium.js +1 -12
  497. package/dist/modules/icons/components/IconImageSizeSmall.js +1 -12
  498. package/dist/modules/icons/components/IconInbox.js +1 -12
  499. package/dist/modules/icons/components/IconInfoCircle.js +1 -13
  500. package/dist/modules/icons/components/IconInfoRectangle.js +1 -13
  501. package/dist/modules/icons/components/IconLabel.js +1 -12
  502. package/dist/modules/icons/components/IconLandscape.js +1 -12
  503. package/dist/modules/icons/components/IconLibrary.js +1 -12
  504. package/dist/modules/icons/components/IconLink.js +1 -16
  505. package/dist/modules/icons/components/IconListOrder.js +1 -12
  506. package/dist/modules/icons/components/IconLoader.js +1 -12
  507. package/dist/modules/icons/components/IconLock.js +1 -12
  508. package/dist/modules/icons/components/IconLogout.js +1 -13
  509. package/dist/modules/icons/components/IconLsuArt.js +1 -13
  510. package/dist/modules/icons/components/IconLsuCompetenceNumerique.js +1 -12
  511. package/dist/modules/icons/components/IconLsuEmc.js +1 -13
  512. package/dist/modules/icons/components/IconLsuFrancais.js +1 -13
  513. package/dist/modules/icons/components/IconLsuHistoireGeo.js +1 -12
  514. package/dist/modules/icons/components/IconLsuLangue.js +1 -16
  515. package/dist/modules/icons/components/IconLsuLangue2.js +1 -13
  516. package/dist/modules/icons/components/IconLsuMath.js +1 -16
  517. package/dist/modules/icons/components/IconLsuParcoursEducatif.js +1 -12
  518. package/dist/modules/icons/components/IconLsuSport.js +1 -12
  519. package/dist/modules/icons/components/IconLsuSvt.js +1 -12
  520. package/dist/modules/icons/components/IconMail.js +1 -13
  521. package/dist/modules/icons/components/IconMailRecall.js +1 -13
  522. package/dist/modules/icons/components/IconMegaphone.js +1 -12
  523. package/dist/modules/icons/components/IconMergeCells.js +1 -13
  524. package/dist/modules/icons/components/IconMessageInfo.js +1 -13
  525. package/dist/modules/icons/components/IconMic.js +1 -12
  526. package/dist/modules/icons/components/IconMicOff.js +1 -12
  527. package/dist/modules/icons/components/IconMinus.js +1 -12
  528. package/dist/modules/icons/components/IconMove.js +1 -14
  529. package/dist/modules/icons/components/IconNoColors.js +1 -12
  530. package/dist/modules/icons/components/IconNotes.js +1 -13
  531. package/dist/modules/icons/components/IconNotification.js +1 -12
  532. package/dist/modules/icons/components/IconOptions.js +1 -14
  533. package/dist/modules/icons/components/IconOrderedList.js +1 -16
  534. package/dist/modules/icons/components/IconPaperclip.js +1 -12
  535. package/dist/modules/icons/components/IconParcoursCitoyen.js +1 -14
  536. package/dist/modules/icons/components/IconParcoursSecours.js +1 -14
  537. package/dist/modules/icons/components/IconPause.js +1 -12
  538. package/dist/modules/icons/components/IconPinOff.js +1 -12
  539. package/dist/modules/icons/components/IconPinOn.js +1 -12
  540. package/dist/modules/icons/components/IconPlaceholder.js +1 -16
  541. package/dist/modules/icons/components/IconPlay.js +1 -12
  542. package/dist/modules/icons/components/IconPlayFilled.js +1 -12
  543. package/dist/modules/icons/components/IconPlus.js +1 -12
  544. package/dist/modules/icons/components/IconPointerDefault.js +1 -12
  545. package/dist/modules/icons/components/IconPointerHand.js +1 -12
  546. package/dist/modules/icons/components/IconPrint.js +1 -12
  547. package/dist/modules/icons/components/IconQuestion.js +1 -14
  548. package/dist/modules/icons/components/IconQuestionMark.js +1 -13
  549. package/dist/modules/icons/components/IconRafterDown.js +1 -12
  550. package/dist/modules/icons/components/IconRafterLeft.js +1 -12
  551. package/dist/modules/icons/components/IconRafterRight.js +1 -12
  552. package/dist/modules/icons/components/IconRafterUp.js +1 -12
  553. package/dist/modules/icons/components/IconReaction.js +1 -12
  554. package/dist/modules/icons/components/IconReadMail.js +1 -16
  555. package/dist/modules/icons/components/IconRecord.js +1 -12
  556. package/dist/modules/icons/components/IconRecordPause.js +1 -12
  557. package/dist/modules/icons/components/IconRecordStop.js +1 -12
  558. package/dist/modules/icons/components/IconRecordVideo.js +1 -12
  559. package/dist/modules/icons/components/IconRedo.js +1 -13
  560. package/dist/modules/icons/components/IconRefresh.js +1 -13
  561. package/dist/modules/icons/components/IconReset.js +1 -12
  562. package/dist/modules/icons/components/IconRestart.js +1 -12
  563. package/dist/modules/icons/components/IconRestore.js +1 -12
  564. package/dist/modules/icons/components/IconSave.js +1 -12
  565. package/dist/modules/icons/components/IconSearch.js +1 -12
  566. package/dist/modules/icons/components/IconSee.js +1 -13
  567. package/dist/modules/icons/components/IconSend.js +1 -12
  568. package/dist/modules/icons/components/IconSetBackground.js +1 -17
  569. package/dist/modules/icons/components/IconSettings.js +1 -16
  570. package/dist/modules/icons/components/IconShare.js +1 -12
  571. package/dist/modules/icons/components/IconSignature.js +1 -13
  572. package/dist/modules/icons/components/IconSmartphone.js +1 -13
  573. package/dist/modules/icons/components/IconSmiley.js +1 -13
  574. package/dist/modules/icons/components/IconSortAscendingLetters.js +1 -13
  575. package/dist/modules/icons/components/IconSortDescending.js +1 -13
  576. package/dist/modules/icons/components/IconSortDescendingLetters.js +1 -13
  577. package/dist/modules/icons/components/IconSortTime.js +1 -14
  578. package/dist/modules/icons/components/IconSpeechToText.js +1 -12
  579. package/dist/modules/icons/components/IconSplitCells.js +1 -13
  580. package/dist/modules/icons/components/IconSquareRoot.js +1 -12
  581. package/dist/modules/icons/components/IconStar.js +1 -13
  582. package/dist/modules/icons/components/IconStarFull.js +1 -13
  583. package/dist/modules/icons/components/IconSubmission.js +1 -12
  584. package/dist/modules/icons/components/IconSubmitToValidate.js +1 -12
  585. package/dist/modules/icons/components/IconSubscript.js +1 -12
  586. package/dist/modules/icons/components/IconSuccessFill.js +1 -12
  587. package/dist/modules/icons/components/IconSuccessOutline.js +1 -13
  588. package/dist/modules/icons/components/IconSuperscript.js +1 -12
  589. package/dist/modules/icons/components/IconTable.js +1 -12
  590. package/dist/modules/icons/components/IconTeacher.js +1 -12
  591. package/dist/modules/icons/components/IconTextBold.js +1 -12
  592. package/dist/modules/icons/components/IconTextColor.js +1 -16
  593. package/dist/modules/icons/components/IconTextHighlight.js +1 -16
  594. package/dist/modules/icons/components/IconTextItalic.js +1 -12
  595. package/dist/modules/icons/components/IconTextPage.js +1 -12
  596. package/dist/modules/icons/components/IconTextSize.js +1 -12
  597. package/dist/modules/icons/components/IconTextToSpeech.js +1 -12
  598. package/dist/modules/icons/components/IconTextToSpeechOff.js +1 -12
  599. package/dist/modules/icons/components/IconTextTypo.js +1 -12
  600. package/dist/modules/icons/components/IconTextUnderline.js +1 -13
  601. package/dist/modules/icons/components/IconTextVanilla.js +1 -13
  602. package/dist/modules/icons/components/IconThumbDown.js +1 -12
  603. package/dist/modules/icons/components/IconThumbUp.js +1 -12
  604. package/dist/modules/icons/components/IconTool.js +1 -12
  605. package/dist/modules/icons/components/IconToolCenter.js +1 -12
  606. package/dist/modules/icons/components/IconTrendingUp.js +1 -16
  607. package/dist/modules/icons/components/IconUndo.js +1 -13
  608. package/dist/modules/icons/components/IconUndoAll.js +1 -14
  609. package/dist/modules/icons/components/IconUndoSlashed.js +1 -12
  610. package/dist/modules/icons/components/IconUnion.js +1 -15
  611. package/dist/modules/icons/components/IconUnlink.js +1 -13
  612. package/dist/modules/icons/components/IconUnlock.js +1 -13
  613. package/dist/modules/icons/components/IconUnreadMail.js +1 -16
  614. package/dist/modules/icons/components/IconUpload.js +1 -18
  615. package/dist/modules/icons/components/IconUser.js +1 -12
  616. package/dist/modules/icons/components/IconUserSearch.js +1 -13
  617. package/dist/modules/icons/components/IconUsers.js +1 -13
  618. package/dist/modules/icons/components/IconVideo.js +1 -12
  619. package/dist/modules/icons/components/IconViewCalendar.js +1 -12
  620. package/dist/modules/icons/components/IconViewList.js +1 -15
  621. package/dist/modules/icons/components/IconWand.js +1 -12
  622. package/dist/modules/icons/components/IconWrite.js +1 -12
  623. package/dist/modules/icons/components/IconZoomIn.js +1 -12
  624. package/dist/modules/icons/components/IconZoomOut.js +1 -12
  625. package/dist/modules/icons/components/apps/IconAccount.js +1 -12
  626. package/dist/modules/icons/components/apps/IconActualites.js +1 -12
  627. package/dist/modules/icons/components/apps/IconAdmin.js +1 -12
  628. package/dist/modules/icons/components/apps/IconAdminPortal.js +1 -12
  629. package/dist/modules/icons/components/apps/IconAdmissionPostBac.js +1 -12
  630. package/dist/modules/icons/components/apps/IconAgenda.js +1 -13
  631. package/dist/modules/icons/components/apps/IconAlloregion.js +1 -17
  632. package/dist/modules/icons/components/apps/IconAppointments.js +1 -12
  633. package/dist/modules/icons/components/apps/IconArchive.js +1 -12
  634. package/dist/modules/icons/components/apps/IconAssistance.js +1 -12
  635. package/dist/modules/icons/components/apps/IconAssistancetic.js +1 -14
  636. package/dist/modules/icons/components/apps/IconAssr.js +1 -12
  637. package/dist/modules/icons/components/apps/IconAward.js +1 -12
  638. package/dist/modules/icons/components/apps/IconBanquesavoir.js +1 -12
  639. package/dist/modules/icons/components/apps/IconBcdi.js +1 -12
  640. package/dist/modules/icons/components/apps/IconBiblionisep.js +1 -12
  641. package/dist/modules/icons/components/apps/IconBlog.js +1 -12
  642. package/dist/modules/icons/components/apps/IconBookmarkEmpty.js +1 -12
  643. package/dist/modules/icons/components/apps/IconCahierDeTexte.js +1 -12
  644. package/dist/modules/icons/components/apps/IconCahierTextes.js +1 -12
  645. package/dist/modules/icons/components/apps/IconCalendar.js +1 -13
  646. package/dist/modules/icons/components/apps/IconCanalNumerique.js +1 -12
  647. package/dist/modules/icons/components/apps/IconCcn.js +1 -12
  648. package/dist/modules/icons/components/apps/IconCerise.js +1 -12
  649. package/dist/modules/icons/components/apps/IconCervoprint.js +1 -12
  650. package/dist/modules/icons/components/apps/IconCharlemagne.js +1 -12
  651. package/dist/modules/icons/components/apps/IconCharte.js +1 -12
  652. package/dist/modules/icons/components/apps/IconChat.js +1 -12
  653. package/dist/modules/icons/components/apps/IconCidj.js +1 -12
  654. package/dist/modules/icons/components/apps/IconCns.js +1 -12
  655. package/dist/modules/icons/components/apps/IconCollaborativeWall.js +1 -12
  656. package/dist/modules/icons/components/apps/IconCommunities.js +1 -12
  657. package/dist/modules/icons/components/apps/IconCommunity.js +1 -12
  658. package/dist/modules/icons/components/apps/IconCompetences.js +1 -12
  659. package/dist/modules/icons/components/apps/IconConnecteurGenerique1.js +1 -12
  660. package/dist/modules/icons/components/apps/IconConnecteurGenerique2.js +1 -12
  661. package/dist/modules/icons/components/apps/IconConversation.js +1 -12
  662. package/dist/modules/icons/components/apps/IconDirectory.js +1 -12
  663. package/dist/modules/icons/components/apps/IconEdt.js +1 -12
  664. package/dist/modules/icons/components/apps/IconEducagri.js +1 -12
  665. package/dist/modules/icons/components/apps/IconEdumedia.js +1 -12
  666. package/dist/modules/icons/components/apps/IconEdumoov.js +1 -12
  667. package/dist/modules/icons/components/apps/IconEdutheque.js +1 -12
  668. package/dist/modules/icons/components/apps/IconElectron.js +1 -12
  669. package/dist/modules/icons/components/apps/IconElyceepicardie.js +1 -12
  670. package/dist/modules/icons/components/apps/IconEsidoc.js +1 -12
  671. package/dist/modules/icons/components/apps/IconEuropress.js +1 -12
  672. package/dist/modules/icons/components/apps/IconExercizer.js +1 -12
  673. package/dist/modules/icons/components/apps/IconForms.js +1 -12
  674. package/dist/modules/icons/components/apps/IconForum.js +1 -12
  675. package/dist/modules/icons/components/apps/IconGeogebra.js +1 -12
  676. package/dist/modules/icons/components/apps/IconGepi.js +1 -12
  677. package/dist/modules/icons/components/apps/IconGlpi.js +1 -12
  678. package/dist/modules/icons/components/apps/IconHiboutheque.js +1 -12
  679. package/dist/modules/icons/components/apps/IconItopstore.js +1 -12
  680. package/dist/modules/icons/components/apps/IconKne.js +1 -12
  681. package/dist/modules/icons/components/apps/IconLeSiteTv.js +1 -12
  682. package/dist/modules/icons/components/apps/IconLemonde.js +1 -12
  683. package/dist/modules/icons/components/apps/IconLesechos.js +1 -12
  684. package/dist/modules/icons/components/apps/IconLibrary.js +1 -12
  685. package/dist/modules/icons/components/apps/IconLivretScolaire.js +1 -13
  686. package/dist/modules/icons/components/apps/IconLool.js +1 -15
  687. package/dist/modules/icons/components/apps/IconLsu.js +1 -12
  688. package/dist/modules/icons/components/apps/IconMadmagz.js +1 -12
  689. package/dist/modules/icons/components/apps/IconMagneto.js +1 -13
  690. package/dist/modules/icons/components/apps/IconMatholycee.js +1 -12
  691. package/dist/modules/icons/components/apps/IconMaxicours.js +1 -12
  692. package/dist/modules/icons/components/apps/IconMediacentre.js +1 -12
  693. package/dist/modules/icons/components/apps/IconMindmap.js +1 -12
  694. package/dist/modules/icons/components/apps/IconMinetest.js +1 -12
  695. package/dist/modules/icons/components/apps/IconMinibadge.js +1 -12
  696. package/dist/modules/icons/components/apps/IconMonorientationenligne.js +1 -12
  697. package/dist/modules/icons/components/apps/IconMonstageenligne.js +1 -12
  698. package/dist/modules/icons/components/apps/IconMoodle.js +1 -12
  699. package/dist/modules/icons/components/apps/IconMuseefrancaisphoto.js +1 -12
  700. package/dist/modules/icons/components/apps/IconMyNetwork.js +1 -12
  701. package/dist/modules/icons/components/apps/IconNabook.js +1 -16
  702. package/dist/modules/icons/components/apps/IconNetvibes.js +1 -12
  703. package/dist/modules/icons/components/apps/IconNextcloudDeck.js +1 -12
  704. package/dist/modules/icons/components/apps/IconNextcloudFiles.js +1 -12
  705. package/dist/modules/icons/components/apps/IconNextcloudForms.js +1 -12
  706. package/dist/modules/icons/components/apps/IconNextcloudNotes.js +1 -12
  707. package/dist/modules/icons/components/apps/IconNextcloudTalk.js +1 -12
  708. package/dist/modules/icons/components/apps/IconNote.js +1 -12
  709. package/dist/modules/icons/components/apps/IconNotebook.js +1 -12
  710. package/dist/modules/icons/components/apps/IconNotes.js +1 -12
  711. package/dist/modules/icons/components/apps/IconOnisep.js +1 -12
  712. package/dist/modules/icons/components/apps/IconOnisep2.js +1 -12
  713. package/dist/modules/icons/components/apps/IconPad.js +1 -12
  714. package/dist/modules/icons/components/apps/IconPages.js +1 -12
  715. package/dist/modules/icons/components/apps/IconParametrage.js +1 -12
  716. package/dist/modules/icons/components/apps/IconParametrages.js +1 -12
  717. package/dist/modules/icons/components/apps/IconParaschool.js +1 -12
  718. package/dist/modules/icons/components/apps/IconParcours.js +1 -12
  719. package/dist/modules/icons/components/apps/IconPearltrees.js +1 -12
  720. package/dist/modules/icons/components/apps/IconPeertube.js +1 -21
  721. package/dist/modules/icons/components/apps/IconPicardieCursus.js +1 -12
  722. package/dist/modules/icons/components/apps/IconPlaceholder.js +1 -16
  723. package/dist/modules/icons/components/apps/IconPoll.js +1 -12
  724. package/dist/modules/icons/components/apps/IconPresences.js +1 -12
  725. package/dist/modules/icons/components/apps/IconProeps.js +1 -12
  726. package/dist/modules/icons/components/apps/IconPronote.js +1 -12
  727. package/dist/modules/icons/components/apps/IconPublic.js +1 -12
  728. package/dist/modules/icons/components/apps/IconQwant.js +1 -12
  729. package/dist/modules/icons/components/apps/IconQwantJunior.js +1 -12
  730. package/dist/modules/icons/components/apps/IconRack.js +1 -12
  731. package/dist/modules/icons/components/apps/IconRbs.js +1 -12
  732. package/dist/modules/icons/components/apps/IconResidenceArtiste.js +1 -12
  733. package/dist/modules/icons/components/apps/IconRessourcesdepartementale91.js +1 -12
  734. package/dist/modules/icons/components/apps/IconSacoche.js +1 -12
  735. package/dist/modules/icons/components/apps/IconSchoolbook.js +1 -12
  736. package/dist/modules/icons/components/apps/IconScolinfo.js +1 -12
  737. package/dist/modules/icons/components/apps/IconScrapbook.js +1 -12
  738. package/dist/modules/icons/components/apps/IconSearchengine.js +1 -12
  739. package/dist/modules/icons/components/apps/IconSettingsClass.js +1 -12
  740. package/dist/modules/icons/components/apps/IconSharebigfiles.js +1 -12
  741. package/dist/modules/icons/components/apps/IconStatistics.js +1 -12
  742. package/dist/modules/icons/components/apps/IconStats.js +1 -12
  743. package/dist/modules/icons/components/apps/IconSuitcase.js +1 -12
  744. package/dist/modules/icons/components/apps/IconSupport.js +1 -12
  745. package/dist/modules/icons/components/apps/IconTimeline.js +1 -12
  746. package/dist/modules/icons/components/apps/IconTimelinegenerator.js +1 -12
  747. package/dist/modules/icons/components/apps/IconTurboself.js +1 -12
  748. package/dist/modules/icons/components/apps/IconUniversalis.js +1 -12
  749. package/dist/modules/icons/components/apps/IconUnstagepourtous.js +1 -12
  750. package/dist/modules/icons/components/apps/IconUserbook.js +1 -12
  751. package/dist/modules/icons/components/apps/IconVideo.js +1 -12
  752. package/dist/modules/icons/components/apps/IconVieScolaire.js +1 -12
  753. package/dist/modules/icons/components/apps/IconVisioconf.js +1 -12
  754. package/dist/modules/icons/components/apps/IconVotil.js +1 -14
  755. package/dist/modules/icons/components/apps/IconWebclasseur.js +1 -12
  756. package/dist/modules/icons/components/apps/IconWebsite.js +1 -12
  757. package/dist/modules/icons/components/apps/IconWiki.js +1 -13
  758. package/dist/modules/icons/components/apps/IconWorkspace.js +1 -12
  759. package/dist/modules/icons/components/audience/IconCongrats.js +1 -22
  760. package/dist/modules/icons/components/audience/IconCongratsCounter.js +1 -21
  761. package/dist/modules/icons/components/audience/IconGreat.js +1 -16
  762. package/dist/modules/icons/components/audience/IconGreatCounter.js +1 -14
  763. package/dist/modules/icons/components/audience/IconGuest.js +1 -12
  764. package/dist/modules/icons/components/audience/IconInteresting.js +1 -15
  765. package/dist/modules/icons/components/audience/IconInterestingCounter.js +1 -17
  766. package/dist/modules/icons/components/audience/IconParent.js +1 -12
  767. package/dist/modules/icons/components/audience/IconPersonnel.js +1 -12
  768. package/dist/modules/icons/components/audience/IconStudent.js +1 -20
  769. package/dist/modules/icons/components/audience/IconTeacher.js +1 -12
  770. package/dist/modules/icons/components/audience/IconThanks.js +1 -18
  771. package/dist/modules/icons/components/audience/IconThanksCounter.js +1 -16
  772. package/dist/modules/icons/components/index.d.ts +0 -1
  773. package/dist/modules/icons/components/logo/IconLogoEdificeFull.js +1 -26
  774. package/dist/modules/icons/components/logo/IconLogoEdificeSmall.js +1 -17
  775. package/dist/modules/icons/components/nav/IconCommunities.js +1 -12
  776. package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +1 -16
  777. package/dist/modules/icons/components/nav/IconCommunity.js +1 -12
  778. package/dist/modules/icons/components/nav/IconDisconnect.js +1 -12
  779. package/dist/modules/icons/components/nav/IconHome.js +1 -12
  780. package/dist/modules/icons/components/nav/IconHomeBeta.js +1 -16
  781. package/dist/modules/icons/components/nav/IconMessagesBeta.js +1 -18
  782. package/dist/modules/icons/components/nav/IconMyApps.js +1 -12
  783. package/dist/modules/icons/components/nav/IconMyAppsBeta.js +1 -12
  784. package/dist/modules/icons/components/nav/IconNeoAssistance.js +1 -12
  785. package/dist/modules/icons/components/nav/IconNeoMessaging.js +1 -12
  786. package/dist/modules/icons/components/nav/IconNewRelease.js +1 -12
  787. package/dist/modules/icons/components/nav/IconNotificationBeta.js +1 -12
  788. package/dist/modules/icons/components/nav/IconOneAssistance.js +1 -12
  789. package/dist/modules/icons/components/nav/IconOneMessaging.js +1 -12
  790. package/dist/modules/icons/components/nav/IconOneProfile.js +1 -13
  791. package/dist/modules/icons/components/nav/IconProfile.js +1 -12
  792. package/dist/modules/icons/components/nav/IconSearch.js +1 -12
  793. package/dist/modules/icons/components/nav/IconUserbook.js +1 -12
  794. package/dist/modules/modals/ConfirmModal/ConfirmModal.js +1 -37
  795. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +1 -77
  796. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +1 -38
  797. package/dist/modules/modals/PublishModal/PublishModal.js +1 -120
  798. package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +1 -29
  799. package/dist/modules/modals/PublishModal/components/AgeSelect.js +1 -20
  800. package/dist/modules/modals/PublishModal/components/LangSelect.js +1 -19
  801. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +1 -23
  802. package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +1 -29
  803. package/dist/modules/modals/PublishModal/components/ToastError.js +1 -24
  804. package/dist/modules/modals/PublishModal/components/ToastSuccess.js +1 -18
  805. package/dist/modules/modals/PublishModal/constants/ageOptions.js +1 -4
  806. package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +1 -34
  807. package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +1 -43
  808. package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +1 -106
  809. package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +1 -118
  810. package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -164
  811. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +1 -58
  812. package/dist/modules/modals/ResourceModal/hooks/useSlug.js +1 -41
  813. package/dist/modules/modals/ResourceModal/hooks/useThumb.js +1 -17
  814. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +1 -12
  815. package/dist/modules/modals/ShareModal/ShareBookmark.js +1 -25
  816. package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +1 -55
  817. package/dist/modules/modals/ShareModal/ShareModal.js +1 -40
  818. package/dist/modules/modals/ShareModal/ShareResources.js +1 -149
  819. package/dist/modules/modals/ShareModal/apps/ShareBlog.js +1 -43
  820. package/dist/modules/modals/ShareModal/hooks/useSearch.js +1 -174
  821. package/dist/modules/modals/ShareModal/hooks/useShare.js +1 -199
  822. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -68
  823. package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +1 -15
  824. package/dist/modules/modals/ShareModal/hooks/useShareRightDisabled.js +1 -11
  825. package/dist/modules/modals/ShareModal/hooks/useShareRightVisible.js +1 -11
  826. package/dist/modules/modals/ShareModal/utils/hasRight.js +1 -4
  827. package/dist/modules/modals/ShareModal/utils/showShareRightLine.js +1 -4
  828. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +0 -2
  829. package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +1 -67
  830. package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +1 -26
  831. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +0 -1
  832. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +1 -353
  833. package/dist/modules/multimedia/Embed/Embed.js +1 -32
  834. package/dist/modules/multimedia/FileCard/FileCard.js +1 -104
  835. package/dist/modules/multimedia/FileCard/FileIcon.js +1 -15
  836. package/dist/modules/multimedia/FileCard/NextcloudFileCard.js +1 -102
  837. package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +1 -130
  838. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +1 -72
  839. package/dist/modules/multimedia/ImageEditor/effects/blur.js +1 -80
  840. package/dist/modules/multimedia/ImageEditor/effects/constants.js +1 -4
  841. package/dist/modules/multimedia/ImageEditor/effects/crop.js +1 -171
  842. package/dist/modules/multimedia/ImageEditor/effects/misc.js +1 -177
  843. package/dist/modules/multimedia/ImageEditor/effects/resize.js +1 -166
  844. package/dist/modules/multimedia/ImageEditor/effects/rotate.js +1 -32
  845. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +1 -65
  846. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +1 -82
  847. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +1 -55
  848. package/dist/modules/multimedia/ImageEditor/utilities/aggregate.js +1 -13
  849. package/dist/modules/multimedia/ImagePicker/ImagePicker.js +1 -40
  850. package/dist/modules/multimedia/Linker/ExternalLinker/ExternalLinker.js +1 -45
  851. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
  852. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -151
  853. package/dist/modules/multimedia/LinkerCard/LinkerCard.js +1 -34
  854. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +3 -1
  855. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -251
  856. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +4 -0
  857. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +1 -12
  858. package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +1 -19
  859. package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +1 -17
  860. package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +1 -14
  861. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +1 -35
  862. package/dist/modules/multimedia/MediaLibrary/innertabs/Nextcloud.js +1 -48
  863. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +1 -68
  864. package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +1 -22
  865. package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +1 -15
  866. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +1 -31
  867. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +1 -23
  868. package/dist/modules/multimedia/Nextcloud/Nextcloud.js +1 -108
  869. package/dist/modules/multimedia/Nextcloud/NextcloudLogin.js +1 -33
  870. package/dist/modules/multimedia/NextcloudFolders/NextcloudFolders.js +1 -51
  871. package/dist/modules/multimedia/NextcloudFolders/components/NewFolderForm.js +1 -52
  872. package/dist/modules/multimedia/UploadCard/UploadCard.js +1 -75
  873. package/dist/modules/multimedia/UploadFiles/UploadFiles.js +1 -56
  874. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +1 -76
  875. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +0 -6
  876. package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +1 -190
  877. package/dist/modules/multimedia/VideoRecorder/VideoRecorderToolbar.js +1 -96
  878. package/dist/modules/multimedia/VideoRecorder/useCameras.d.ts +0 -2
  879. package/dist/modules/multimedia/VideoRecorder/useCameras.js +1 -92
  880. package/dist/modules/multimedia/Workspace/Workspace.js +1 -175
  881. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +1 -55
  882. package/dist/modules/multimedia/WorkspaceFolders/components/NewFolderForm.js +1 -39
  883. package/dist/multimedia.js +1 -38
  884. package/dist/node_modules/.pnpm/@tiptap_extension-floating-menu@3.32.0_@floating-ui_dom@1.6.0_@tiptap_core@3.32.0_@tiptap_pm@3.32.0__@tiptap_pm@3.32.0/node_modules/@tiptap/extension-floating-menu/dist/index.js +1 -0
  885. package/dist/node_modules/.pnpm/@tiptap_react@3.32.0_@floating-ui_dom@1.6.0_@tiptap_core@3.32.0_@tiptap_pm@3.32.0__@tiptap_pm_6inmb43gajy4fnlwtngbwkv7um/node_modules/@tiptap/react/dist/menus/index.js +1 -0
  886. package/dist/node_modules/.pnpm/prosemirror-model@1.25.13/node_modules/prosemirror-model/dist/index.js +2 -0
  887. package/dist/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js +1 -0
  888. package/dist/node_modules/.pnpm/prosemirror-transform@1.12.5/node_modules/prosemirror-transform/dist/index.js +1 -0
  889. package/dist/providers/AntThemeProvider/AntProvider.js +1 -28
  890. package/dist/providers/AntThemeProvider/antThemeConfig.js +1 -9
  891. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.js +1 -5
  892. package/dist/providers/EdificeClientProvider/EdificeClientProvider.hook.js +1 -11
  893. package/dist/providers/EdificeClientProvider/EdificeClientProvider.js +1 -54
  894. package/dist/providers/EdificeScreebProvider/EdificeScreebProvider.js +1 -52
  895. package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.context.js +1 -5
  896. package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.hook.js +1 -11
  897. package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.js +1 -47
  898. package/dist/providers/MockedProvider/MockedProvider.js +1 -29
  899. package/dist/providers/MockedProvider/MockedProvider.mocks.js +1 -119
  900. package/dist/react.css +2 -0
  901. package/dist/utilities/check-user-rights/check-user-rights.js +1 -46
  902. package/dist/utilities/create-selectors/create-selectors.js +1 -11
  903. package/dist/utilities/emptyscreen-mapping/emptyscreen-mapping.js +1 -49
  904. package/dist/utilities/mime-types/mime-types-utils.js +1 -4
  905. package/dist/utilities/react-query/react-query-utils.js +1 -13
  906. package/dist/utilities/refs/ref.js +1 -14
  907. package/dist/utilities/rotate-transition-style/get-rotate-transition-style.js +1 -12
  908. package/package.json +40 -50
  909. package/dist/_virtual/_commonjsHelpers.js +0 -8
  910. package/dist/_virtual/isSameOrAfter.js +0 -4
  911. package/dist/_virtual/isToday.js +0 -4
  912. package/dist/_virtual/localeData.js +0 -4
  913. package/dist/_virtual/weekday.js +0 -4
  914. package/dist/components/Masonry/Masonry.d.ts +0 -40
  915. package/dist/components/Masonry/Masonry.js +0 -50
  916. package/dist/components/Masonry/index.d.ts +0 -2
  917. package/dist/modules/comments/constants.js +0 -10
  918. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +0 -2
  919. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +0 -8
  920. package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
  921. package/dist/modules/homepage/components/Agenda/Agenda.js +0 -54
  922. package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
  923. package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -14
  924. package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
  925. package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -30
  926. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
  927. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -27
  928. package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
  929. package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
  930. package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -45
  931. package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
  932. package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -5
  933. package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
  934. package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -26
  935. package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
  936. package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -59
  937. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
  938. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -17
  939. package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
  940. package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
  941. package/dist/modules/homepage/components/BriefMe/types.js +0 -8
  942. package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
  943. package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -51
  944. package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
  945. package/dist/modules/homepage/components/Cantine/Cantine.js +0 -44
  946. package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
  947. package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -18
  948. package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
  949. package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -88
  950. package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -7
  951. package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -12
  952. package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
  953. package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -22
  954. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
  955. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -28
  956. package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
  957. package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -60
  958. package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
  959. package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -20
  960. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
  961. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -65
  962. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -23
  963. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -43
  964. package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
  965. package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
  966. package/dist/modules/homepage/components/Captation/CaptationAudio/CaptationAudio.d.ts +0 -7
  967. package/dist/modules/homepage/components/Captation/CaptationVideo/CaptationVideo.d.ts +0 -9
  968. package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +0 -9
  969. package/dist/modules/homepage/components/Edumalin/Edumalin.js +0 -65
  970. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +0 -4
  971. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +0 -21
  972. package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +0 -8
  973. package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +0 -62
  974. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +0 -5
  975. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +0 -38
  976. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +0 -5
  977. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +0 -12
  978. package/dist/modules/homepage/components/Edumalin/index.d.ts +0 -7
  979. package/dist/modules/homepage/components/Edumalin/types.d.ts +0 -24
  980. package/dist/modules/homepage/components/Edumalin/types.js +0 -4
  981. package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +0 -16
  982. package/dist/modules/homepage/components/Edumalin/useEdumalin.js +0 -35
  983. package/dist/modules/homepage/components/Edumalin/utils.d.ts +0 -28
  984. package/dist/modules/homepage/components/Edumalin/utils.js +0 -56
  985. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
  986. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -65
  987. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
  988. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -12
  989. package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
  990. package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -6
  991. package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
  992. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
  993. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -69
  994. package/dist/modules/homepage/components/Mediacentre/Mediacentre.d.ts +0 -13
  995. package/dist/modules/homepage/components/Mediacentre/Mediacentre.js +0 -57
  996. package/dist/modules/homepage/components/Mediacentre/MediacentreContainer.d.ts +0 -4
  997. package/dist/modules/homepage/components/Mediacentre/MediacentreContainer.js +0 -12
  998. package/dist/modules/homepage/components/Mediacentre/components/MediacentreUniversalisSearch.d.ts +0 -6
  999. package/dist/modules/homepage/components/Mediacentre/components/MediacentreUniversalisSearch.js +0 -30
  1000. package/dist/modules/homepage/components/Mediacentre/hooks/useMediacentre.d.ts +0 -17
  1001. package/dist/modules/homepage/components/Mediacentre/hooks/useMediacentre.js +0 -32
  1002. package/dist/modules/homepage/components/Mediacentre/index.d.ts +0 -5
  1003. package/dist/modules/homepage/components/Mediacentre/services/mediacentreService.d.ts +0 -24
  1004. package/dist/modules/homepage/components/Mediacentre/services/mediacentreService.js +0 -25
  1005. package/dist/modules/homepage/components/Mediacentre/types.d.ts +0 -8
  1006. package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -4
  1007. package/dist/modules/homepage/components/Qwant/Qwant.js +0 -41
  1008. package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -1
  1009. package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -10
  1010. package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
  1011. package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
  1012. package/dist/modules/homepage/components/Rss/Rss.js +0 -64
  1013. package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
  1014. package/dist/modules/homepage/components/Rss/RssContainer.js +0 -45
  1015. package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
  1016. package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -69
  1017. package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
  1018. package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -58
  1019. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
  1020. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -43
  1021. package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
  1022. package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
  1023. package/dist/modules/homepage/components/Rss/services/api/index.js +0 -5
  1024. package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
  1025. package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -51
  1026. package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -28
  1027. package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -71
  1028. package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
  1029. package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
  1030. package/dist/modules/homepage/components/Rss/utils.js +0 -19
  1031. package/dist/modules/homepage/components/ScreenTime/ScreenTime.d.ts +0 -11
  1032. package/dist/modules/homepage/components/ScreenTime/ScreenTime.js +0 -49
  1033. package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.d.ts +0 -10
  1034. package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.js +0 -115
  1035. package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.d.ts +0 -1
  1036. package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.js +0 -25
  1037. package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.d.ts +0 -5
  1038. package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.js +0 -22
  1039. package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.d.ts +0 -22
  1040. package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.js +0 -81
  1041. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.d.ts +0 -14
  1042. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.js +0 -22
  1043. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.d.ts +0 -6
  1044. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.js +0 -25
  1045. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.d.ts +0 -31
  1046. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.js +0 -34
  1047. package/dist/modules/homepage/components/ScreenTime/index.d.ts +0 -6
  1048. package/dist/modules/homepage/components/ScreenTime/services/api/index.d.ts +0 -4
  1049. package/dist/modules/homepage/components/ScreenTime/services/api/index.js +0 -5
  1050. package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.d.ts +0 -28
  1051. package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.js +0 -39
  1052. package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.d.ts +0 -23
  1053. package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.js +0 -41
  1054. package/dist/modules/homepage/components/ScreenTime/types.d.ts +0 -30
  1055. package/dist/modules/homepage/components/ScreenTime/utils.d.ts +0 -50
  1056. package/dist/modules/homepage/components/ScreenTime/utils.js +0 -115
  1057. package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +0 -43
  1058. package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +0 -23
  1059. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +0 -34
  1060. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +0 -26
  1061. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +0 -14
  1062. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +0 -64
  1063. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +0 -20
  1064. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +0 -43
  1065. package/dist/modules/homepage/components/TabsKids/index.d.ts +0 -3
  1066. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +0 -15
  1067. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +0 -21
  1068. package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -8
  1069. package/dist/modules/homepage/components/Universalis/Universalis.js +0 -62
  1070. package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
  1071. package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -16
  1072. package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
  1073. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
  1074. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
  1075. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
  1076. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
  1077. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
  1078. package/dist/modules/homepage/hooks/useUserSchools.js +0 -39
  1079. package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
  1080. package/dist/modules/icons/components/IconAddWidget.js +0 -12
  1081. package/dist/modules/multimedia/testing/mediaHarness.d.ts +0 -154
  1082. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +0 -18
  1083. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +0 -19
  1084. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/localeData.js +0 -82
  1085. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekday.js +0 -19
  1086. package/dist/style.css +0 -1
@@ -1,92 +1 @@
1
- import { useState, useEffect } from "react";
2
- import { useTranslation } from "react-i18next";
3
- import useBrowserInfo from "../../../hooks/useBrowserInfo/useBrowserInfo.js";
4
- const VIDEO_HEIGHT = 9, VIDEO_WIDTH = 16;
5
- function useCameras() {
6
- const {
7
- device
8
- } = useBrowserInfo(navigator.userAgent), {
9
- t
10
- } = useTranslation(), [inputDevices, setInputDevices] = useState([]), [mediaStreamConstraints, setMediaStreamConstraints] = useState({
11
- audio: !0,
12
- video: !0
13
- }), [stream, setStream] = useState(), [streamError, setStreamError] = useState();
14
- async function getVideoInputDevices() {
15
- return (await navigator.mediaDevices.enumerateDevices()).filter((device2) => device2.kind === "videoinput");
16
- }
17
- const enableStream = async (constraints) => {
18
- try {
19
- const mediaStream = await navigator.mediaDevices.getUserMedia(constraints), kinds = mediaStream.getTracks().map((track) => track.kind);
20
- if (!kinds.includes("video") || !kinds.includes("audio"))
21
- throw new Error("Missing camera or microphone track");
22
- mediaStream.getTracks().forEach((track) => {
23
- track.onended = () => setStreamError(new Error("Track ended"));
24
- }), setStream(mediaStream), setStreamError(void 0);
25
- } catch (err) {
26
- console.error(err), setStreamError(err);
27
- }
28
- }, restartStream = () => {
29
- stream == null || stream.getTracks().forEach((track) => track.stop()), enableStream(mediaStreamConstraints);
30
- }, setPreferedDevice = (device2) => {
31
- let constraints = {};
32
- device2 != null && device2.deviceId ? (device2.deviceId === "environment" || device2.deviceId === "user" ? constraints = {
33
- audio: !0,
34
- video: {
35
- aspectRatio: VIDEO_WIDTH / VIDEO_HEIGHT,
36
- facingMode: device2 == null ? void 0 : device2.deviceId
37
- }
38
- } : constraints = {
39
- audio: !0,
40
- video: {
41
- aspectRatio: VIDEO_WIDTH / VIDEO_HEIGHT,
42
- deviceId: {
43
- exact: device2.deviceId
44
- }
45
- }
46
- }, setMediaStreamConstraints(constraints)) : console.error("Selected input device id is null");
47
- };
48
- return useEffect(() => {
49
- restartStream();
50
- }, [mediaStreamConstraints]), useEffect(() => {
51
- async function initInputDevices() {
52
- await enableStream(mediaStreamConstraints);
53
- const videoDevices = await getVideoInputDevices();
54
- switch (device.type) {
55
- case "mobile":
56
- case "tablet": {
57
- const backCamera = {
58
- deviceId: "environment",
59
- label: t("video.back.camera"),
60
- groupId: "",
61
- kind: "videoinput"
62
- }, frontCamera = {
63
- deviceId: "user",
64
- label: t("video.front.camera"),
65
- groupId: "",
66
- kind: "videoinput"
67
- };
68
- (videoDevices == null ? void 0 : videoDevices.length) > 1 ? setInputDevices([backCamera, frontCamera]) : setInputDevices([backCamera]);
69
- break;
70
- }
71
- default:
72
- setInputDevices(videoDevices);
73
- break;
74
- }
75
- }
76
- initInputDevices();
77
- }, []), {
78
- /** Readonly list (array) of available video input devices. */
79
- inputDevices,
80
- /** Select which input video device to use. */
81
- setPreferedDevice,
82
- /** The current video stream. */
83
- stream,
84
- /** Why no usable stream could be acquired, if so. */
85
- streamError,
86
- /** Start a video stream from the default or prefered device. */
87
- restartStream
88
- };
89
- }
90
- export {
91
- useCameras
92
- };
1
+ import useBrowserInfo from"../../../hooks/useBrowserInfo/useBrowserInfo.js";import{useEffect,useState}from"react";import{useTranslation}from"react-i18next";var VIDEO_HEIGHT=9,VIDEO_WIDTH=16;function useCameras(){let{device}=useBrowserInfo(navigator.userAgent),{t}=useTranslation(),[inputDevices,setInputDevices]=useState([]),[mediaStreamConstraints,setMediaStreamConstraints]=useState({audio:!0,video:!0}),[stream,setStream]=useState();async function getVideoInputDevices(){return(await navigator.mediaDevices.enumerateDevices()).filter(device=>device.kind===`videoinput`)}let enableStream=async constraints=>{try{setStream(await navigator.mediaDevices.getUserMedia(constraints))}catch(err){console.error(err)}},restartStream=()=>{stream?.getTracks().forEach(track=>track.stop()),enableStream(mediaStreamConstraints)};return useEffect(()=>{restartStream()},[mediaStreamConstraints]),useEffect(()=>{async function initInputDevices(){await enableStream(mediaStreamConstraints);let videoDevices=await getVideoInputDevices();switch(device.type){case`mobile`:case`tablet`:{let backCamera={deviceId:`environment`,label:t(`video.back.camera`),groupId:``,kind:`videoinput`},frontCamera={deviceId:`user`,label:t(`video.front.camera`),groupId:``,kind:`videoinput`};videoDevices?.length>1?setInputDevices([backCamera,frontCamera]):setInputDevices([backCamera]);break}default:setInputDevices(videoDevices);break}}initInputDevices()},[]),{inputDevices,setPreferedDevice:device=>{let constraints={};device?.deviceId?(constraints=device.deviceId===`environment`||device.deviceId===`user`?{audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,facingMode:device?.deviceId}}:{audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,deviceId:{exact:device.deviceId}}},setMediaStreamConstraints(constraints)):console.error(`Selected input device id is null`)},stream,restartStream}}export{useCameras};
@@ -1,175 +1 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useRef, useState, useCallback, useEffect } from "react";
3
- import clsx from "clsx";
4
- import { useTranslation } from "react-i18next";
5
- import SvgIconSortAscendingLetters from "../../icons/components/IconSortAscendingLetters.js";
6
- import SvgIconSortDescendingLetters from "../../icons/components/IconSortDescendingLetters.js";
7
- import SvgIconSortTime from "../../icons/components/IconSortTime.js";
8
- import illuTrash from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-trash.svg";
9
- import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
10
- import useWorkspaceSearch from "../../../hooks/useWorkspaceSearch/useWorkspaceSearch.js";
11
- import { Grid } from "../../../components/Grid/Grid.js";
12
- import TreeView from "../../../components/TreeView/TreeView.js";
13
- import SearchBar from "../../../components/SearchBar/SearchBar.js";
14
- import Dropdown from "../../../components/Dropdown/Dropdown.js";
15
- import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
16
- import FileCard from "../FileCard/FileCard.js";
17
- import EmptyScreen from "../../../components/EmptyScreen/EmptyScreen.js";
18
- import { findTreeNode } from "../../../components/TreeView/utilities/treeview.js";
19
- const WORKSPACE_VIEW_WORKFLOW = "org.entcore.workspace.controllers.WorkspaceController|view", Workspace = ({
20
- roles,
21
- onSelect,
22
- multiple = !0,
23
- className,
24
- defaultFolder,
25
- showPublicFolder
26
- }) => {
27
- const {
28
- t
29
- } = useTranslation(), hasWorkspaceViewRight = useHasWorkflow(WORKSPACE_VIEW_WORKFLOW), canViewPersonalFolders = !!hasWorkspaceViewRight, {
30
- root: ownerRoot,
31
- loadContent: loadOwnerDocs
32
- } = useWorkspaceSearch("root", t("workspace.tree.owner"), "owner", roles), {
33
- root: sharedRoot,
34
- loadContent: loadSharedDocs
35
- } = useWorkspaceSearch("root", t("workspace.tree.shared"), "shared", roles), {
36
- root: protectRoot,
37
- loadContent: loadProtectedDocs
38
- } = useWorkspaceSearch("root", t("workspace.tree.protected"), "protected", roles), {
39
- root: publicRoot,
40
- loadContent: loadPublicDocs
41
- } = useWorkspaceSearch("root", t("workspace.tree.public"), "public", roles), ownerRef = useRef(null), sharedRef = useRef(null), protectRef = useRef(null), publicRef = useRef(null), [currentFilter, setCurrentFilter] = useState(() => defaultFolder === "public" ? showPublicFolder ? defaultFolder : "protected" : defaultFolder === "protected" || defaultFolder === "shared" ? defaultFolder : "owner"), [currentNode, setCurrentNode] = useState(() => defaultFolder === "public" ? showPublicFolder ? publicRoot : protectRoot : defaultFolder === "protected" ? protectRoot : defaultFolder === "shared" ? sharedRoot : ownerRoot), [documents, setDocuments] = useState(), [searchTerm, setSearchTerm] = useState(null), [sortOrder, setSortOrder] = useState(["modified", "desc"]), [selectedDocuments, setSelectedDocuments] = useState([]), rootNodeFor = useCallback((filter) => {
42
- switch (filter) {
43
- case "owner":
44
- return {
45
- root: ownerRoot,
46
- othersRef: [sharedRef, protectRef, publicRef]
47
- };
48
- case "shared":
49
- return {
50
- root: sharedRoot,
51
- othersRef: [ownerRef, protectRef, publicRef]
52
- };
53
- case "protected":
54
- return {
55
- root: protectRoot,
56
- othersRef: [ownerRef, sharedRef, publicRef]
57
- };
58
- case "public":
59
- return {
60
- root: publicRoot,
61
- othersRef: [ownerRef, sharedRef, protectRef]
62
- };
63
- default:
64
- throw "no.root.node";
65
- }
66
- }, [ownerRoot, sharedRoot, protectRoot, publicRoot]), loadContent = useCallback(() => {
67
- switch (currentFilter) {
68
- case "owner":
69
- loadOwnerDocs(currentNode.id);
70
- break;
71
- case "shared":
72
- loadSharedDocs(currentNode.id);
73
- break;
74
- case "protected":
75
- loadProtectedDocs(currentNode.id);
76
- break;
77
- case "public":
78
- loadPublicDocs(currentNode.id);
79
- break;
80
- default:
81
- throw "no.way";
82
- }
83
- }, [currentFilter, currentNode.id, loadOwnerDocs, loadProtectedDocs, loadPublicDocs, loadSharedDocs]);
84
- function selectAndLoadContent(filter, nodeId) {
85
- setCurrentFilter(filter);
86
- const {
87
- root,
88
- othersRef
89
- } = rootNodeFor(filter), targetNode = findTreeNode(root, (node) => node.id === nodeId);
90
- targetNode && (setCurrentNode(targetNode), othersRef.forEach((otherRef) => {
91
- var _a;
92
- return (_a = otherRef.current) == null ? void 0 : _a.unselectAll();
93
- }));
94
- }
95
- useEffect(() => {
96
- var _a;
97
- let ref;
98
- switch (currentFilter) {
99
- case "owner":
100
- ref = ownerRef;
101
- break;
102
- case "shared":
103
- ref = sharedRef;
104
- break;
105
- case "protected":
106
- ref = protectRef;
107
- break;
108
- case "public":
109
- ref = publicRef;
110
- break;
111
- default:
112
- return;
113
- }
114
- (_a = ref == null ? void 0 : ref.current) == null || _a.select("root");
115
- }, [currentFilter]), useEffect(() => {
116
- hasWorkspaceViewRight === !1 && (currentFilter === "owner" || currentFilter === "shared") && selectAndLoadContent("protected", "root");
117
- }, [hasWorkspaceViewRight]), useEffect(loadContent, [loadContent]), useEffect(() => {
118
- if (currentNode.files) {
119
- let list = [].concat(currentNode.files);
120
- searchTerm && (list = list.filter((f) => f.name.indexOf(searchTerm) >= 0));
121
- const sortFunction = sortOrder[0] === "name" ? sortOrder[1] === "asc" ? (a, b) => compare(a.name, b.name) : (a, b) => compare(b.name, a.name) : (a, b) => compare(b.modified, a.modified);
122
- setDocuments(() => list.sort(sortFunction));
123
- } else
124
- setDocuments(void 0);
125
- }, [currentNode, ownerRoot, protectRoot, sharedRoot, publicRoot, searchTerm, sortOrder]);
126
- const handleSearchChange = useCallback((e) => {
127
- setSearchTerm(e.target.value);
128
- }, [setSearchTerm]);
129
- function compare(a, b) {
130
- return a ? b ? a.localeCompare(b) : 1 : -1;
131
- }
132
- function getSortOrderLabel() {
133
- return sortOrder[0] === "name" ? sortOrder[1] === "asc" ? t("sort.order.alpha.asc") : t("sort.order.alpha.desc") : t("sort.order.modify.desc");
134
- }
135
- function handleSelectDoc(doc) {
136
- let currentDocuments = [...selectedDocuments];
137
- multiple ? currentDocuments.includes(doc) ? currentDocuments = currentDocuments.filter((selectedDocument) => selectedDocument._id !== doc._id) : currentDocuments = [...currentDocuments, doc] : currentDocuments = [doc], setSelectedDocuments(currentDocuments), onSelect(currentDocuments);
138
- }
139
- const workspace = clsx("workspace flex-grow-1 gap-0", className);
140
- return /* @__PURE__ */ jsxs(Grid, { className: workspace, children: [
141
- /* @__PURE__ */ jsx(Grid.Col, { sm: "12", md: "3", xl: "4", className: "workspace-folders p-12 pt-0 gap-12", children: /* @__PURE__ */ jsxs("div", { style: {
142
- position: "sticky",
143
- top: 0,
144
- paddingTop: "1.2rem"
145
- }, children: [
146
- canViewPersonalFolders && /* @__PURE__ */ jsx(TreeView, { ref: ownerRef, data: ownerRoot, onTreeItemClick: (nodeId) => selectAndLoadContent("owner", nodeId), onTreeItemUnfold: (nodeId) => selectAndLoadContent("owner", nodeId) }),
147
- canViewPersonalFolders && /* @__PURE__ */ jsx(TreeView, { ref: sharedRef, data: sharedRoot, onTreeItemClick: (nodeId) => selectAndLoadContent("shared", nodeId), onTreeItemUnfold: (nodeId) => selectAndLoadContent("shared", nodeId) }),
148
- /* @__PURE__ */ jsx(TreeView, { ref: protectRef, data: protectRoot, onTreeItemClick: (nodeId) => selectAndLoadContent("protected", nodeId), onTreeItemUnfold: (nodeId) => selectAndLoadContent("protected", nodeId) }),
149
- showPublicFolder && /* @__PURE__ */ jsx(TreeView, { ref: publicRef, data: publicRoot, onTreeItemClick: (nodeId) => selectAndLoadContent("public", nodeId), onTreeItemUnfold: (nodeId) => selectAndLoadContent("public", nodeId) })
150
- ] }) }),
151
- /* @__PURE__ */ jsx(Grid.Col, { sm: "12", md: "5", xl: "8", children: /* @__PURE__ */ jsxs(Grid, { className: "flex-grow-1 gap-0", children: [
152
- /* @__PURE__ */ jsxs(Grid.Col, { sm: "4", md: "8", xl: "12", children: [
153
- /* @__PURE__ */ jsx("div", { className: "workspace-search px-16 py-8 ", children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, onChange: handleSearchChange }) }),
154
- /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center justify-content-end px-8 py-4", children: [
155
- /* @__PURE__ */ jsx("small", { className: "text-muted", children: t("workspace.search.order") }),
156
- /* @__PURE__ */ jsxs(Dropdown, { children: [
157
- /* @__PURE__ */ jsx(Dropdown.Trigger, { size: "sm", label: getSortOrderLabel(), variant: "ghost" }),
158
- /* @__PURE__ */ jsxs(Dropdown.Menu, { children: [
159
- /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconSortTime, {}), onClick: () => setSortOrder(["modified", "desc"]), children: t("sort.order.modify.desc") }),
160
- /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconSortAscendingLetters, {}), onClick: () => setSortOrder(["name", "asc"]), children: t("sort.order.alpha.asc") }),
161
- /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconSortDescendingLetters, {}), onClick: () => setSortOrder(["name", "desc"]), children: t("sort.order.alpha.desc") })
162
- ] })
163
- ] })
164
- ] })
165
- ] }),
166
- /* @__PURE__ */ jsx(Grid.Col, { sm: "4", md: "8", xl: "12", className: "p-8 gap-8", children: documents ? documents.length !== 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-workspace", children: documents.map((doc) => {
167
- const isSelected = selectedDocuments.includes(doc);
168
- return /* @__PURE__ */ jsx(FileCard, { doc, isSelected, onClick: () => handleSelectDoc(doc) }, doc._id);
169
- }) }) : /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: illuTrash, text: t("workspace.empty.docSpace"), title: t("explorer.emptyScreen.trash.title") }) : /* @__PURE__ */ jsx(LoadingScreen, {}) })
170
- ] }) })
171
- ] });
172
- };
173
- export {
174
- Workspace as default
175
- };
1
+ import SvgIconSortAscendingLetters from"../../icons/components/IconSortAscendingLetters.js";import SvgIconSortDescendingLetters from"../../icons/components/IconSortDescendingLetters.js";import SvgIconSortTime from"../../icons/components/IconSortTime.js";import useHasWorkflow from"../../../hooks/useHasWorkflow/useHasWorkflow.js";import FileCard from"../FileCard/FileCard.js";import SearchBar from"../../../components/SearchBar/SearchBar.js";import Dropdown from"../../../components/Dropdown/Dropdown.js";import EmptyScreen from"../../../components/EmptyScreen/EmptyScreen.js";import{Grid}from"../../../components/Grid/Grid.js";import LoadingScreen from"../../../components/LoadingScreen/LoadingScreen.js";import{findTreeNode}from"../../../components/TreeView/utilities/treeview.js";import useWorkspaceSearch from"../../../hooks/useWorkspaceSearch/useWorkspaceSearch.js";import TreeView from"../../../components/TreeView/TreeView.js";import clsx$1 from"clsx";import{useCallback,useEffect,useRef,useState}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{useTranslation}from"react-i18next";import illuTrash from"@edifice.io/bootstrap/dist/images/emptyscreen/illu-trash.svg";var WORKSPACE_VIEW_WORKFLOW=`org.entcore.workspace.controllers.WorkspaceController|view`,Workspace=({roles,onSelect,multiple=!0,className,defaultFolder,showPublicFolder})=>{let{t}=useTranslation(),hasWorkspaceViewRight=useHasWorkflow(WORKSPACE_VIEW_WORKFLOW),canViewPersonalFolders=!!hasWorkspaceViewRight,{root:ownerRoot,loadContent:loadOwnerDocs}=useWorkspaceSearch(`root`,t(`workspace.tree.owner`),`owner`,roles),{root:sharedRoot,loadContent:loadSharedDocs}=useWorkspaceSearch(`root`,t(`workspace.tree.shared`),`shared`,roles),{root:protectRoot,loadContent:loadProtectedDocs}=useWorkspaceSearch(`root`,t(`workspace.tree.protected`),`protected`,roles),{root:publicRoot,loadContent:loadPublicDocs}=useWorkspaceSearch(`root`,t(`workspace.tree.public`),`public`,roles),ownerRef=useRef(null),sharedRef=useRef(null),protectRef=useRef(null),publicRef=useRef(null),[currentFilter,setCurrentFilter]=useState(()=>defaultFolder===`public`?showPublicFolder?defaultFolder:`protected`:defaultFolder===`protected`||defaultFolder===`shared`?defaultFolder:`owner`),[currentNode,setCurrentNode]=useState(()=>defaultFolder===`public`?showPublicFolder?publicRoot:protectRoot:defaultFolder===`protected`?protectRoot:defaultFolder===`shared`?sharedRoot:ownerRoot),[documents,setDocuments]=useState(),[searchTerm,setSearchTerm]=useState(null),[sortOrder,setSortOrder]=useState([`modified`,`desc`]),[selectedDocuments,setSelectedDocuments]=useState([]),rootNodeFor=useCallback(filter=>{switch(filter){case`owner`:return{root:ownerRoot,othersRef:[sharedRef,protectRef,publicRef]};case`shared`:return{root:sharedRoot,othersRef:[ownerRef,protectRef,publicRef]};case`protected`:return{root:protectRoot,othersRef:[ownerRef,sharedRef,publicRef]};case`public`:return{root:publicRoot,othersRef:[ownerRef,sharedRef,protectRef]};default:throw`no.root.node`}},[ownerRoot,sharedRoot,protectRoot,publicRoot]),loadContent=useCallback(()=>{switch(currentFilter){case`owner`:loadOwnerDocs(currentNode.id);break;case`shared`:loadSharedDocs(currentNode.id);break;case`protected`:loadProtectedDocs(currentNode.id);break;case`public`:loadPublicDocs(currentNode.id);break;default:throw`no.way`}},[currentFilter,currentNode.id,loadOwnerDocs,loadProtectedDocs,loadPublicDocs,loadSharedDocs]);function selectAndLoadContent(filter,nodeId){setCurrentFilter(filter);let{root,othersRef}=rootNodeFor(filter),targetNode=findTreeNode(root,node=>node.id===nodeId);targetNode&&(setCurrentNode(targetNode),othersRef.forEach(otherRef=>otherRef.current?.unselectAll()))}useEffect(()=>{let ref;switch(currentFilter){case`owner`:ref=ownerRef;break;case`shared`:ref=sharedRef;break;case`protected`:ref=protectRef;break;case`public`:ref=publicRef;break;default:return}ref?.current?.select(`root`)},[currentFilter]),useEffect(()=>{hasWorkspaceViewRight===!1&&(currentFilter===`owner`||currentFilter===`shared`)&&selectAndLoadContent(`protected`,`root`)},[hasWorkspaceViewRight]),useEffect(loadContent,[loadContent]),useEffect(()=>{if(currentNode.files){let list=[].concat(currentNode.files);searchTerm&&(list=list.filter(f=>f.name.indexOf(searchTerm)>=0));let sortFunction=sortOrder[0]===`name`?sortOrder[1]===`asc`?(a,b)=>compare(a.name,b.name):(a,b)=>compare(b.name,a.name):(a,b)=>compare(b.modified,a.modified);setDocuments(()=>list.sort(sortFunction))}else setDocuments(void 0)},[currentNode,ownerRoot,protectRoot,sharedRoot,publicRoot,searchTerm,sortOrder]);let handleSearchChange=useCallback(e=>{setSearchTerm(e.target.value)},[setSearchTerm]);function compare(a,b){return a?b?a.localeCompare(b):1:-1}function getSortOrderLabel(){return sortOrder[0]===`name`?sortOrder[1]===`asc`?t(`sort.order.alpha.asc`):t(`sort.order.alpha.desc`):t(`sort.order.modify.desc`)}function handleSelectDoc(doc){let currentDocuments=[...selectedDocuments];currentDocuments=multiple?currentDocuments.includes(doc)?currentDocuments.filter(selectedDocument=>selectedDocument._id!==doc._id):[...currentDocuments,doc]:[doc],setSelectedDocuments(currentDocuments),onSelect(currentDocuments)}return jsxs(Grid,{className:clsx$1(`workspace flex-grow-1 gap-0`,className),children:[jsx(Grid.Col,{sm:`12`,md:`3`,xl:`4`,className:`workspace-folders p-12 pt-0 gap-12`,children:jsxs(`div`,{style:{position:`sticky`,top:0,paddingTop:`1.2rem`},children:[canViewPersonalFolders&&jsx(TreeView,{ref:ownerRef,data:ownerRoot,onTreeItemClick:nodeId=>selectAndLoadContent(`owner`,nodeId),onTreeItemUnfold:nodeId=>selectAndLoadContent(`owner`,nodeId)}),canViewPersonalFolders&&jsx(TreeView,{ref:sharedRef,data:sharedRoot,onTreeItemClick:nodeId=>selectAndLoadContent(`shared`,nodeId),onTreeItemUnfold:nodeId=>selectAndLoadContent(`shared`,nodeId)}),jsx(TreeView,{ref:protectRef,data:protectRoot,onTreeItemClick:nodeId=>selectAndLoadContent(`protected`,nodeId),onTreeItemUnfold:nodeId=>selectAndLoadContent(`protected`,nodeId)}),showPublicFolder&&jsx(TreeView,{ref:publicRef,data:publicRoot,onTreeItemClick:nodeId=>selectAndLoadContent(`public`,nodeId),onTreeItemUnfold:nodeId=>selectAndLoadContent(`public`,nodeId)})]})}),jsx(Grid.Col,{sm:`12`,md:`5`,xl:`8`,children:jsxs(Grid,{className:`flex-grow-1 gap-0`,children:[jsxs(Grid.Col,{sm:`4`,md:`8`,xl:`12`,children:[jsx(`div`,{className:`workspace-search px-16 py-8 `,children:jsx(SearchBar,{isVariant:!0,className:`gap-16`,onChange:handleSearchChange})}),jsxs(`div`,{className:`d-flex align-items-center justify-content-end px-8 py-4`,children:[jsx(`small`,{className:`text-muted`,children:t(`workspace.search.order`)}),jsxs(Dropdown,{children:[jsx(Dropdown.Trigger,{size:`sm`,label:getSortOrderLabel(),variant:`ghost`}),jsxs(Dropdown.Menu,{children:[jsx(Dropdown.Item,{icon:jsx(SvgIconSortTime,{}),onClick:()=>setSortOrder([`modified`,`desc`]),children:t(`sort.order.modify.desc`)}),jsx(Dropdown.Item,{icon:jsx(SvgIconSortAscendingLetters,{}),onClick:()=>setSortOrder([`name`,`asc`]),children:t(`sort.order.alpha.asc`)}),jsx(Dropdown.Item,{icon:jsx(SvgIconSortDescendingLetters,{}),onClick:()=>setSortOrder([`name`,`desc`]),children:t(`sort.order.alpha.desc`)})]})]})]})]}),jsx(Grid.Col,{sm:`4`,md:`8`,xl:`12`,className:`p-8 gap-8`,children:documents?documents.length===0?jsx(EmptyScreen,{imageSrc:illuTrash,text:t(`workspace.empty.docSpace`),title:t(`explorer.emptyScreen.trash.title`)}):jsx(`div`,{className:`grid grid-workspace`,children:documents.map(doc=>jsx(FileCard,{doc,isSelected:selectedDocuments.includes(doc),onClick:()=>handleSelectDoc(doc)},doc._id))}):jsx(LoadingScreen,{})})]})})]})};export{Workspace as default};
@@ -1,55 +1 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import SvgIconFolderAdd from "../../icons/components/IconFolderAdd.js";
5
- import NewFolderForm from "./components/NewFolderForm.js";
6
- import useWorkspaceFolders from "../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
7
- import useWorkspaceFoldersTree, { WORKSPACE_USER_FOLDER_ID, WORKSPACE_SHARED_FOLDER_ID } from "../../../hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
8
- import SearchBar from "../../../components/SearchBar/SearchBar.js";
9
- import Loading from "../../../components/Loading/Loading.js";
10
- import Tree from "../../../components/Tree/components/Tree.js";
11
- import Button from "../../../components/Button/Button.js";
12
- function WorkspaceFolders({
13
- onFolderSelected
14
- }) {
15
- const {
16
- t
17
- } = useTranslation(), {
18
- folders,
19
- isLoading,
20
- canCopyFileIntoFolder
21
- } = useWorkspaceFolders(), {
22
- foldersTree,
23
- filterTree
24
- } = useWorkspaceFoldersTree(folders), [searchValue, setSearchValue] = useState(""), [selectedFolderId, setSelectedFolderId] = useState(void 0), [showNewFolderForm, setShowNewFolderForm] = useState(!1), [canCreateFolderIntoSelectedFolder, setCanCreateFolderIntoSelectedFolder] = useState(!1), selectedFolderIdForAPI = selectedFolderId === WORKSPACE_USER_FOLDER_ID || !selectedFolderId ? "" : selectedFolderId;
25
- useEffect(() => {
26
- if (selectedFolderId) {
27
- const canCopyFileInto = selectedFolderId === WORKSPACE_USER_FOLDER_ID || canCopyFileIntoFolder(selectedFolderId) && selectedFolderId !== WORKSPACE_SHARED_FOLDER_ID;
28
- setCanCreateFolderIntoSelectedFolder(canCopyFileInto), onFolderSelected(selectedFolderIdForAPI, canCopyFileInto);
29
- }
30
- }, [selectedFolderId]);
31
- const handleSearchChange = (e) => {
32
- setSearchValue(e.target.value);
33
- }, handleSearchSubmit = () => {
34
- filterTree(searchValue);
35
- }, handleFolderSelected = (folderId) => {
36
- setShowNewFolderForm(!1), setSelectedFolderId(folderId);
37
- }, handleNewFolderClick = () => {
38
- setShowNewFolderForm(!0);
39
- }, handleNewFolderCreated = (folderId) => {
40
- handleFolderSelected(folderId);
41
- };
42
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
43
- /* @__PURE__ */ jsx(SearchBar, { onChange: handleSearchChange, isVariant: !1, placeholder: t("search"), onClick: handleSearchSubmit }),
44
- /* @__PURE__ */ jsxs("div", { className: "border border-gray-400 rounded", children: [
45
- /* @__PURE__ */ jsx("div", { className: "p-12", children: isLoading ? /* @__PURE__ */ jsx(Loading, { isLoading: !0, className: "justify-content-center" }) : /* @__PURE__ */ jsx(Tree, { nodes: foldersTree, onTreeItemClick: handleFolderSelected, selectedNodeId: selectedFolderId }) }),
46
- /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end border-top border-gray-400 px-8 py-4 ", children: [
47
- !showNewFolderForm && /* @__PURE__ */ jsx(Button, { color: "primary", variant: "ghost", leftIcon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: handleNewFolderClick, disabled: !canCreateFolderIntoSelectedFolder, children: t("workspace.folder.create") }),
48
- showNewFolderForm && selectedFolderId !== void 0 && /* @__PURE__ */ jsx(NewFolderForm, { onClose: () => setShowNewFolderForm(!1), folderParentId: selectedFolderIdForAPI, onFolderCreated: handleNewFolderCreated })
49
- ] })
50
- ] })
51
- ] }) });
52
- }
53
- export {
54
- WorkspaceFolders as default
55
- };
1
+ import SvgIconFolderAdd from"../../icons/components/IconFolderAdd.js";import Loading from"../../../components/Loading/Loading.js";import Button from"../../../components/Button/Button.js";import SearchBar from"../../../components/SearchBar/SearchBar.js";import Tree from"../../../components/Tree/components/Tree.js";import useWorkspaceFolders from"../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";import useWorkspaceFoldersTree from"../../../hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";import NewFolderForm from"./components/NewFolderForm.js";import{useEffect,useState}from"react";import{Fragment as Fragment$1,jsx,jsxs}from"react/jsx-runtime";import{useTranslation}from"react-i18next";function WorkspaceFolders({onFolderSelected}){let{t}=useTranslation(),{folders,isLoading,canCopyFileIntoFolder}=useWorkspaceFolders(),{foldersTree,filterTree}=useWorkspaceFoldersTree(folders),[searchValue,setSearchValue]=useState(``),[selectedFolderId,setSelectedFolderId]=useState(void 0),[showNewFolderForm,setShowNewFolderForm]=useState(!1),[canCreateFolderIntoSelectedFolder,setCanCreateFolderIntoSelectedFolder]=useState(!1),selectedFolderIdForAPI=selectedFolderId===`workspace-user-folder-id`||!selectedFolderId?``:selectedFolderId;useEffect(()=>{if(selectedFolderId){let canCopyFileInto=selectedFolderId===`workspace-user-folder-id`||canCopyFileIntoFolder(selectedFolderId)&&selectedFolderId!==`workspace-shared-folder-id`;setCanCreateFolderIntoSelectedFolder(canCopyFileInto),onFolderSelected(selectedFolderIdForAPI,canCopyFileInto)}},[selectedFolderId]);let handleSearchChange=e=>{setSearchValue(e.target.value)},handleSearchSubmit=()=>{filterTree(searchValue)},handleFolderSelected=folderId=>{setShowNewFolderForm(!1),setSelectedFolderId(folderId)};return jsx(Fragment$1,{children:jsxs(`div`,{className:`d-flex flex-column gap-12`,children:[jsx(SearchBar,{onChange:handleSearchChange,isVariant:!1,placeholder:t(`search`),onClick:handleSearchSubmit}),jsxs(`div`,{className:`border border-gray-400 rounded`,children:[jsx(`div`,{className:`p-12`,children:isLoading?jsx(Loading,{isLoading:!0,className:`justify-content-center`}):jsx(Tree,{nodes:foldersTree,onTreeItemClick:handleFolderSelected,selectedNodeId:selectedFolderId})}),jsxs(`div`,{className:`d-flex justify-content-end border-top border-gray-400 px-8 py-4 `,children:[!showNewFolderForm&&jsx(Button,{color:`primary`,variant:`ghost`,leftIcon:jsx(SvgIconFolderAdd,{}),onClick:()=>{setShowNewFolderForm(!0)},disabled:!canCreateFolderIntoSelectedFolder,children:t(`workspace.folder.create`)}),showNewFolderForm&&selectedFolderId!==void 0&&jsx(NewFolderForm,{onClose:()=>setShowNewFolderForm(!1),folderParentId:selectedFolderIdForAPI,onFolderCreated:folderId=>{handleFolderSelected(folderId)}})]})]})]})})}export{WorkspaceFolders as default};
@@ -1,39 +1 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useRef, useEffect } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import SvgIconSave from "../../../icons/components/IconSave.js";
5
- import useWorkspaceFolders from "../../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
6
- import FormControl from "../../../../components/Form/FormControl.js";
7
- import IconButton from "../../../../components/Button/IconButton.js";
8
- function NewFolderForm({
9
- onClose,
10
- folderParentId,
11
- onFolderCreated
12
- }) {
13
- const {
14
- t
15
- } = useTranslation(), refInputName = useRef(null), {
16
- createFolderMutation
17
- } = useWorkspaceFolders();
18
- return useEffect(() => {
19
- refInputName.current && refInputName.current.focus();
20
- }, []), /* @__PURE__ */ jsx("form", { id: "modalWorkspaceNewFolderForm", onSubmit: async (event) => {
21
- var _a;
22
- event.preventDefault();
23
- const folderName = (_a = refInputName.current) == null ? void 0 : _a.value;
24
- folderName && createFolderMutation.mutate({
25
- folderName,
26
- folderParentId
27
- }, {
28
- onSuccess: (newFolder) => {
29
- newFolder._id && onFolderCreated(newFolder._id), onClose();
30
- }
31
- });
32
- }, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-4 flex-row", children: [
33
- /* @__PURE__ */ jsx(FormControl, { id: "modalWorkspaceNewFolderForm", isRequired: !0, children: /* @__PURE__ */ jsx(FormControl.Input, { ref: refInputName, size: "md", type: "text", placeholder: t("workspace.folder.new.placeholder") }) }),
34
- /* @__PURE__ */ jsx(IconButton, { type: "submit", color: "primary", variant: "ghost", title: t("workspace.folder.new.create"), disabled: createFolderMutation.isPending, isLoading: createFolderMutation.isPending, icon: /* @__PURE__ */ jsx(SvgIconSave, {}) })
35
- ] }) });
36
- }
37
- export {
38
- NewFolderForm as default
39
- };
1
+ import SvgIconSave from"../../../icons/components/IconSave.js";import IconButton from"../../../../components/Button/IconButton.js";import FormControl from"../../../../components/Form/FormControl.js";import useWorkspaceFolders from"../../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";import{useEffect,useRef}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{useTranslation}from"react-i18next";function NewFolderForm({onClose,folderParentId,onFolderCreated}){let{t}=useTranslation(),refInputName=useRef(null),{createFolderMutation}=useWorkspaceFolders();return useEffect(()=>{refInputName.current&&refInputName.current.focus()},[]),jsx(`form`,{id:`modalWorkspaceNewFolderForm`,onSubmit:async event=>{event.preventDefault();let folderName=refInputName.current?.value;folderName&&createFolderMutation.mutate({folderName,folderParentId},{onSuccess:newFolder=>{newFolder._id&&onFolderCreated(newFolder._id),onClose()}})},children:jsxs(`div`,{className:`d-flex gap-4 flex-row`,children:[jsx(FormControl,{id:`modalWorkspaceNewFolderForm`,isRequired:!0,children:jsx(FormControl.Input,{ref:refInputName,size:`md`,type:`text`,placeholder:t(`workspace.folder.new.placeholder`)})}),jsx(IconButton,{type:`submit`,color:`primary`,variant:`ghost`,title:t(`workspace.folder.new.create`),disabled:createFolderMutation.isPending,isLoading:createFolderMutation.isPending,icon:jsx(SvgIconSave,{})})]})})}export{NewFolderForm as default};
@@ -1,38 +1 @@
1
- import { default as default2 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
2
- import { default as default3 } from "./modules/multimedia/Embed/Embed.js";
3
- import { default as default4 } from "./modules/multimedia/FileCard/FileCard.js";
4
- import { default as default5 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
5
- import { default as default6 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
6
- import { default as default7 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
7
- import { default as default8 } from "./modules/multimedia/Nextcloud/Nextcloud.js";
8
- import { default as default9 } from "./modules/multimedia/FileCard/NextcloudFileCard.js";
9
- import { default as default10 } from "./modules/multimedia/NextcloudFolders/NextcloudFolders.js";
10
- import { default as default11 } from "./modules/multimedia/UploadCard/UploadCard.js";
11
- import { default as default12 } from "./modules/multimedia/UploadFiles/UploadFiles.js";
12
- import { default as default13 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
13
- import { default as default14 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
14
- import { default as default15 } from "./modules/multimedia/Workspace/Workspace.js";
15
- import { default as default16 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
16
- import { ExternalLinker } from "./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";
17
- import { InternalLinker } from "./modules/multimedia/Linker/InternalLinker/InternalLinker.js";
18
- import { Upload } from "./modules/multimedia/MediaLibrary/innertabs/Upload.js";
19
- export {
20
- default2 as AudioRecorder,
21
- default3 as Embed,
22
- ExternalLinker,
23
- default4 as FileCard,
24
- default5 as ImageEditor,
25
- default6 as ImagePicker,
26
- InternalLinker,
27
- default7 as MediaLibrary,
28
- default8 as Nextcloud,
29
- default9 as NextcloudFileCard,
30
- default10 as NextcloudFolders,
31
- Upload,
32
- default11 as UploadCard,
33
- default12 as UploadFiles,
34
- default13 as VideoEmbed,
35
- default14 as VideoRecorder,
36
- default15 as Workspace,
37
- default16 as WorkspaceFolders
38
- };
1
+ import AudioRecorder from"./modules/multimedia/AudioRecorder/AudioRecorder.js";import Embed from"./modules/multimedia/Embed/Embed.js";import ImageEditor from"./modules/multimedia/ImageEditor/components/ImageEditor.js";import ImagePicker from"./modules/multimedia/ImagePicker/ImagePicker.js";import FileCard from"./modules/multimedia/FileCard/FileCard.js";import NextcloudFileCard from"./modules/multimedia/FileCard/NextcloudFileCard.js";import ExternalLinker from"./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";import InternalLinker from"./modules/multimedia/Linker/InternalLinker/InternalLinker.js";import Nextcloud from"./modules/multimedia/Nextcloud/Nextcloud.js";import UploadCard from"./modules/multimedia/UploadCard/UploadCard.js";import UploadFiles from"./modules/multimedia/UploadFiles/UploadFiles.js";import{Upload}from"./modules/multimedia/MediaLibrary/innertabs/Upload.js";import VideoRecorder from"./modules/multimedia/VideoRecorder/VideoRecorder.js";import VideoEmbed from"./modules/multimedia/VideoEmbed/VideoEmbed.js";import Workspace from"./modules/multimedia/Workspace/Workspace.js";import MediaLibrary from"./modules/multimedia/MediaLibrary/MediaLibrary.js";import NextcloudFolders from"./modules/multimedia/NextcloudFolders/NextcloudFolders.js";import WorkspaceFolders from"./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";export{AudioRecorder,Embed,ExternalLinker,FileCard,ImageEditor,ImagePicker,InternalLinker,MediaLibrary,Nextcloud,NextcloudFileCard,NextcloudFolders,Upload,UploadCard,UploadFiles,VideoEmbed,VideoRecorder,Workspace,WorkspaceFolders};
@@ -0,0 +1 @@
1
+ import{Plugin,PluginKey}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";import{Extension,getText,getTextSerializersFromSchema,posToDOMRect}from"@tiptap/core";import{arrow,autoPlacement,computePosition,flip,hide,inline,offset,shift,size}from"@floating-ui/dom";var FloatingMenuView=class{getTextContent(node){return getText(node,{textSerializers:getTextSerializersFromSchema(this.editor.schema)})}get middlewares(){let middlewares=[];return this.floatingUIOptions.flip&&middlewares.push(flip(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&middlewares.push(shift(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&middlewares.push(offset(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&middlewares.push(arrow(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&middlewares.push(size(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&middlewares.push(autoPlacement(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&middlewares.push(hide(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&middlewares.push(inline(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),middlewares}constructor({editor,element,view,pluginKey=`floatingMenu`,updateDelay=250,resizeDelay=60,options,appendTo,shouldShow}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view,state})=>{let{selection}=state,{$anchor,empty}=selection,isRootDepth=$anchor.depth===1,isEmptyTextBlock=$anchor.parent.isTextblock&&!$anchor.parent.type.spec.code&&!$anchor.parent.textContent&&$anchor.parent.childCount===0&&!this.getTextContent($anchor.parent);return!(!view.hasFocus()||!empty||!isRootDepth||!isEmptyTextBlock||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(view,selectionChanged,docChanged,oldState)=>{let{composing}=view;if(!(composing||!selectionChanged&&!docChanged)){if(!this.getShouldShow(oldState)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event})=>{if(this.preventHide){this.preventHide=!1;return}event?.relatedTarget&&this.element.parentNode?.contains(event.relatedTarget)||event?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:tr})=>{let meta=tr.getMeta(this.pluginKey);meta===`updatePosition`?this.updatePosition():meta&&typeof meta==`object`&&meta.type===`updateOptions`?this.updateOptions(meta.options):meta===`hide`?this.hide():meta===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=editor,this.element=element,this.view=view,this.pluginKey=pluginKey,this.updateDelay=updateDelay,this.resizeDelay=resizeDelay,this.appendTo=appendTo,this.scrollTarget=options?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...options},this.element.tabIndex=0,shouldShow&&(this.shouldShow=shouldShow),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(view,view.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(oldState){let{state}=this.view,{selection}=state,{ranges}=selection,from=Math.min(...ranges.map(range=>range.$from.pos)),to=Math.max(...ranges.map(range=>range.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state,oldState,from,to})}updateOptions(newProps){if(newProps.updateDelay!==void 0&&(this.updateDelay=newProps.updateDelay),newProps.resizeDelay!==void 0&&(this.resizeDelay=newProps.resizeDelay),newProps.appendTo!==void 0&&(this.appendTo=newProps.appendTo),newProps.shouldShow!==void 0&&newProps.shouldShow&&(this.shouldShow=newProps.shouldShow),newProps.options!==void 0){let newScrollTarget=newProps.options.scrollTarget??window;newScrollTarget!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=newScrollTarget,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...newProps.options}}}updatePosition(){var _this$view;if(!(!((_this$view=this.view)==null||(_this$view=_this$view.dom)==null)&&_this$view.parentNode))return;let{selection}=this.editor.state,domRect=posToDOMRect(this.view,selection.from,selection.to);computePosition({getBoundingClientRect:()=>domRect,getClientRects:()=>[domRect]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x,y,strategy,middlewareData})=>{if(middlewareData.hide?.referenceHidden||middlewareData.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=strategy,this.element.style.left=`${x}px`,this.element.style.top=`${y}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(view,oldState){let selectionChanged=!oldState?.selection.eq(view.state.selection),docChanged=!oldState?.doc.eq(view.state.doc);this.updateHandler(view,selectionChanged,docChanged,oldState)}show(){var _ref;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(_ref=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||_ref.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},FloatingMenuPlugin=options=>new Plugin({key:typeof options.pluginKey==`string`?new PluginKey(options.pluginKey):options.pluginKey,view:view=>new FloatingMenuView({view,...options})});Extension.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr,dispatch})=>(dispatch&&tr.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[FloatingMenuPlugin({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});export{FloatingMenuPlugin};
@@ -0,0 +1 @@
1
+ "use client";import{PluginKey}from"../../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";import{FloatingMenuPlugin}from"../../../../../../@tiptap_extension-floating-menu@3.32.0_@floating-ui_dom@1.6.0_@tiptap_core@3.32.0_@tiptap_pm@3.32.0__@tiptap_pm@3.32.0/node_modules/@tiptap/extension-floating-menu/dist/index.js";import React,{useEffect,useLayoutEffect,useRef,useState}from"react";import{createPortal}from"react-dom";import{useCurrentEditor}from"@tiptap/react";import{BubbleMenuPlugin}from"@tiptap/extension-bubble-menu";function getAutoPluginKey(pluginKey,defaultName){return pluginKey??new PluginKey(defaultName)}var useIsomorphicLayoutEffect=typeof window<`u`?useLayoutEffect:useEffect,PLUGIN_MANAGED_STYLE_PROPERTIES=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),UNITLESS_STYLE_PROPERTIES=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),ATTRIBUTE_EXCLUSIONS=new Set([`children`,`className`,`style`]),DIRECT_PROPERTY_KEYS=new Set([`tabIndex`]),FORWARDED_ATTRIBUTE_KEYS=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),SPECIAL_EVENT_NAMES={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function isEventProp(key,value){return/^on[A-Z]/.test(key)&&typeof value==`function`}function toAttributeName(key){return key.startsWith(`aria-`)||key.startsWith(`data-`),key}function isForwardedAttributeKey(key){return key.startsWith(`aria-`)||key.startsWith(`data-`)||FORWARDED_ATTRIBUTE_KEYS.has(key)}function toStylePropertyName(key){return key.startsWith(`--`)?key:key.replace(/[A-Z]/g,match=>`-${match.toLowerCase()}`)}function toEventConfig(key){let useCapture=key.endsWith(`Capture`),reactEventName=(useCapture?key.slice(0,-7):key).slice(2);return{eventName:SPECIAL_EVENT_NAMES[reactEventName]??reactEventName.toLowerCase(),options:useCapture?{capture:!0}:void 0}}function createSyntheticEvent(element,nativeEvent){let defaultPrevented=nativeEvent.defaultPrevented,propagationStopped=!1,syntheticEvent=Object.create(nativeEvent);return Object.defineProperties(syntheticEvent,{nativeEvent:{value:nativeEvent},currentTarget:{value:element},target:{value:nativeEvent.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>defaultPrevented},isPropagationStopped:{value:()=>propagationStopped},preventDefault:{value:()=>{defaultPrevented=!0,nativeEvent.preventDefault()}},stopPropagation:{value:()=>{propagationStopped=!0,nativeEvent.stopPropagation()}}}),syntheticEvent}function isDirectPropertyKey(key){return DIRECT_PROPERTY_KEYS.has(key)}function setDirectProperty(element,key,value){if(key===`tabIndex`){element.tabIndex=Number(value);return}element[key]=value}function clearDirectProperty(element,key){if(key===`tabIndex`){element.removeAttribute(`tabindex`);return}let propertyValue=element[key];if(typeof propertyValue==`boolean`){element[key]=!1;return}if(typeof propertyValue==`number`){element[key]=0;return}element[key]=``}function toStyleValue(styleName,value){return typeof value!=`number`||value===0||styleName.startsWith(`--`)||UNITLESS_STYLE_PROPERTIES.has(styleName)?String(value):`${value}px`}function removeStyleProperty(element,styleName){PLUGIN_MANAGED_STYLE_PROPERTIES.has(styleName)||element.style.removeProperty(toStylePropertyName(styleName))}function applyStyleProperty(element,styleName,value){PLUGIN_MANAGED_STYLE_PROPERTIES.has(styleName)||element.style.setProperty(toStylePropertyName(styleName),toStyleValue(styleName,value))}function syncAttributes(element,prevProps,nextProps){new Set([...Object.keys(prevProps),...Object.keys(nextProps)]).forEach(key=>{if(ATTRIBUTE_EXCLUSIONS.has(key)||!isForwardedAttributeKey(key)||isEventProp(key,prevProps[key])||isEventProp(key,nextProps[key]))return;let prevValue=prevProps[key],nextValue=nextProps[key];if(prevValue===nextValue)return;let attributeName=toAttributeName(key);if(nextValue==null||nextValue===!1){isDirectPropertyKey(key)&&clearDirectProperty(element,key),element.removeAttribute(attributeName);return}if(nextValue===!0){isDirectPropertyKey(key)&&setDirectProperty(element,key,!0),element.setAttribute(attributeName,``);return}if(isDirectPropertyKey(key)){setDirectProperty(element,key,nextValue);return}element.setAttribute(attributeName,String(nextValue))})}function syncClassName(element,prevClassName,nextClassName){if(prevClassName!==nextClassName){if(nextClassName){element.className=nextClassName;return}element.removeAttribute(`class`)}}function syncStyles(element,prevStyle,nextStyle){let previousStyle=prevStyle??{},currentStyle=nextStyle??{};new Set([...Object.keys(previousStyle),...Object.keys(currentStyle)]).forEach(styleName=>{let prevValue=previousStyle[styleName],nextValue=currentStyle[styleName];if(prevValue!==nextValue){if(nextValue==null){removeStyleProperty(element,styleName);return}applyStyleProperty(element,styleName,nextValue)}})}function syncEventListeners(element,prevListeners,nextProps){prevListeners.forEach(({eventName,listener,options})=>{element.removeEventListener(eventName,listener,options)});let nextListeners=[];return Object.entries(nextProps).forEach(([key,value])=>{if(!isEventProp(key,value))return;let{eventName,options}=toEventConfig(key),listener=event=>{value(createSyntheticEvent(element,event))};element.addEventListener(eventName,listener,options),nextListeners.push({eventName,listener,options})}),nextListeners}function useMenuElementProps(element,props){let previousPropsRef=useRef({}),listenersRef=useRef([]);useIsomorphicLayoutEffect(()=>{let previousProps=previousPropsRef.current;return syncClassName(element,previousProps.className,props.className),syncStyles(element,previousProps.style,props.style),syncAttributes(element,previousProps,props),listenersRef.current=syncEventListeners(element,listenersRef.current,props),previousPropsRef.current=props,()=>{listenersRef.current.forEach(({eventName,listener,options})=>{element.removeEventListener(eventName,listener,options)}),listenersRef.current=[]}},[element,props])}var BubbleMenu=React.forwardRef(({pluginKey,editor,updateDelay,resizeDelay,appendTo,shouldShow=null,getReferencedVirtualElement,options,children,...restProps},ref)=>{let menuEl=useRef(document.createElement(`div`)),resolvedPluginKey=useRef(getAutoPluginKey(pluginKey,`bubbleMenu`)).current;useMenuElementProps(menuEl.current,restProps),typeof ref==`function`?ref(menuEl.current):ref&&(ref.current=menuEl.current);let{editor:currentEditor}=useCurrentEditor(),pluginEditor=editor||currentEditor,bubbleMenuPluginProps={updateDelay,resizeDelay,appendTo,pluginKey:resolvedPluginKey,shouldShow,getReferencedVirtualElement,options},bubbleMenuPluginPropsRef=useRef(bubbleMenuPluginProps);bubbleMenuPluginPropsRef.current=bubbleMenuPluginProps;let[pluginInitialized,setPluginInitialized]=useState(!1),skipFirstUpdateRef=useRef(!0);return useEffect(()=>{if(pluginEditor?.isDestroyed)return;if(!pluginEditor){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let bubbleMenuElement=menuEl.current;bubbleMenuElement.style.visibility=`hidden`,bubbleMenuElement.style.position=`absolute`;let plugin=BubbleMenuPlugin({...bubbleMenuPluginPropsRef.current,editor:pluginEditor,element:bubbleMenuElement});pluginEditor.registerPlugin(plugin);let createdPluginKey=bubbleMenuPluginPropsRef.current.pluginKey;return skipFirstUpdateRef.current=!0,setPluginInitialized(!0),()=>{setPluginInitialized(!1),pluginEditor.unregisterPlugin(createdPluginKey),window.requestAnimationFrame(()=>{bubbleMenuElement.parentNode&&bubbleMenuElement.parentNode.removeChild(bubbleMenuElement)})}},[pluginEditor]),useEffect(()=>{if(!(!pluginInitialized||!pluginEditor||pluginEditor.isDestroyed)){if(skipFirstUpdateRef.current){skipFirstUpdateRef.current=!1;return}pluginEditor.view.dispatch(pluginEditor.state.tr.setMeta(resolvedPluginKey,{type:`updateOptions`,options:bubbleMenuPluginPropsRef.current}))}},[pluginInitialized,pluginEditor,updateDelay,resizeDelay,shouldShow,options,appendTo,getReferencedVirtualElement,resolvedPluginKey]),createPortal(children,menuEl.current)}),FloatingMenu=React.forwardRef(({pluginKey,editor,updateDelay,resizeDelay,appendTo,shouldShow=null,options,children,...restProps},ref)=>{let menuEl=useRef(document.createElement(`div`)),resolvedPluginKey=useRef(getAutoPluginKey(pluginKey,`floatingMenu`)).current;useMenuElementProps(menuEl.current,restProps),typeof ref==`function`?ref(menuEl.current):ref&&(ref.current=menuEl.current);let{editor:currentEditor}=useCurrentEditor(),pluginEditor=editor||currentEditor,floatingMenuPluginProps={updateDelay,resizeDelay,appendTo,pluginKey:resolvedPluginKey,shouldShow,options},floatingMenuPluginPropsRef=useRef(floatingMenuPluginProps);floatingMenuPluginPropsRef.current=floatingMenuPluginProps;let[pluginInitialized,setPluginInitialized]=useState(!1),skipFirstUpdateRef=useRef(!0);return useEffect(()=>{if(pluginEditor?.isDestroyed)return;if(!pluginEditor){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let floatingMenuElement=menuEl.current;floatingMenuElement.style.visibility=`hidden`,floatingMenuElement.style.position=`absolute`;let plugin=FloatingMenuPlugin({...floatingMenuPluginPropsRef.current,editor:pluginEditor,element:floatingMenuElement});pluginEditor.registerPlugin(plugin);let createdPluginKey=floatingMenuPluginPropsRef.current.pluginKey;return skipFirstUpdateRef.current=!0,setPluginInitialized(!0),()=>{setPluginInitialized(!1),pluginEditor.unregisterPlugin(createdPluginKey),window.requestAnimationFrame(()=>{floatingMenuElement.parentNode&&floatingMenuElement.parentNode.removeChild(floatingMenuElement)})}},[pluginEditor]),useEffect(()=>{if(!(!pluginInitialized||!pluginEditor||pluginEditor.isDestroyed)){if(skipFirstUpdateRef.current){skipFirstUpdateRef.current=!1;return}pluginEditor.view.dispatch(pluginEditor.state.tr.setMeta(resolvedPluginKey,{type:`updateOptions`,options:floatingMenuPluginPropsRef.current}))}},[pluginInitialized,pluginEditor,updateDelay,resizeDelay,shouldShow,options,appendTo,resolvedPluginKey]),createPortal(children,menuEl.current)});export{BubbleMenu,FloatingMenu};
@@ -0,0 +1,2 @@
1
+ function findDiffStart(a,b,pos){for(let i=0;;i++){if(i==a.childCount||i==b.childCount)return a.childCount==b.childCount?null:pos;let childA=a.child(i),childB=b.child(i);if(childA==childB){pos+=childA.nodeSize;continue}if(!childA.sameMarkup(childB))return pos;if(childA.isText&&childA.text!=childB.text){let tA=childA.text,tB=childB.text,j=0;for(;tA[j]==tB[j];j++)pos++;return j&&j<tA.length&&j<tB.length&&surrogateHigh(tA.charCodeAt(j-1))&&surrogateLow(tA.charCodeAt(j))&&pos--,pos}if(childA.content.size||childB.content.size){let inner=findDiffStart(childA.content,childB.content,pos+1);if(inner!=null)return inner}pos+=childA.nodeSize}}function findDiffEnd(a,b,posA,posB){for(let iA=a.childCount,iB=b.childCount;;){if(iA==0||iB==0)return iA==iB?null:{a:posA,b:posB};let childA=a.child(--iA),childB=b.child(--iB),size=childA.nodeSize;if(childA==childB){posA-=size,posB-=size;continue}if(!childA.sameMarkup(childB))return{a:posA,b:posB};if(childA.isText&&childA.text!=childB.text){let tA=childA.text,tB=childB.text,iA=tA.length,iB=tB.length;for(;iA>0&&iB>0&&tA[iA-1]==tB[iB-1];)iA--,iB--,posA--,posB--;return iA&&iB&&iA<tA.length&&surrogateHigh(tA.charCodeAt(iA-1))&&surrogateLow(tA.charCodeAt(iA))&&(posA++,posB++),{a:posA,b:posB}}if(childA.content.size||childB.content.size){let inner=findDiffEnd(childA.content,childB.content,posA-1,posB-1);if(inner)return inner}posA-=size,posB-=size}}function surrogateLow(ch){return ch>=56320&&ch<57344}function surrogateHigh(ch){return ch>=55296&&ch<56320}var Fragment=class Fragment{constructor(content,size){if(this.content=content,this.size=size||0,size==null)for(let i=0;i<content.length;i++)this.size+=content[i].nodeSize}nodesBetween(from,to,f,nodeStart=0,parent){for(let i=0,pos=0;pos<to;i++){let child=this.content[i],end=pos+child.nodeSize;if(end>from&&f(child,nodeStart+pos,parent||null,i)!==!1&&child.content.size){let start=pos+1;child.nodesBetween(Math.max(0,from-start),Math.min(child.content.size,to-start),f,nodeStart+start)}pos=end}}descendants(f){this.nodesBetween(0,this.size,f)}textBetween(from,to,blockSeparator,leafText){let text=``,first=!0;return this.nodesBetween(from,to,(node,pos)=>{let nodeText=node.isText?node.text.slice(Math.max(from,pos)-pos,to-pos):node.isLeaf?leafText?typeof leafText==`function`?leafText(node):leafText:node.type.spec.leafText?node.type.spec.leafText(node):``:``;node.isBlock&&(node.isLeaf&&nodeText||node.isTextblock)&&blockSeparator&&(first?first=!1:text+=blockSeparator),text+=nodeText},0),text}append(other){if(!other.size)return this;if(!this.size)return other;let last=this.lastChild,first=other.firstChild,content=this.content.slice(),i=0;for(last.isText&&last.sameMarkup(first)&&(content[content.length-1]=last.withText(last.text+first.text),i=1);i<other.content.length;i++)content.push(other.content[i]);return new Fragment(content,this.size+other.size)}cut(from,to=this.size){if(from==0&&to==this.size)return this;let result=[],size=0;if(to>from)for(let i=0,pos=0;pos<to;i++){let child=this.content[i],end=pos+child.nodeSize;end>from&&((pos<from||end>to)&&(child=child.isText?child.cut(Math.max(0,from-pos),Math.min(child.text.length,to-pos)):child.cut(Math.max(0,from-pos-1),Math.min(child.content.size,to-pos-1))),result.push(child),size+=child.nodeSize),pos=end}return new Fragment(result,size)}cutByIndex(from,to){return from==to?Fragment.empty:from==0&&to==this.content.length?this:new Fragment(this.content.slice(from,to))}replaceChild(index,node){let current=this.content[index];if(current==node)return this;let copy=this.content.slice(),size=this.size+node.nodeSize-current.nodeSize;return copy[index]=node,new Fragment(copy,size)}addToStart(node){return new Fragment([node].concat(this.content),this.size+node.nodeSize)}addToEnd(node){return new Fragment(this.content.concat(node),this.size+node.nodeSize)}eq(other){if(this.content.length!=other.content.length)return!1;for(let i=0;i<this.content.length;i++)if(!this.content[i].eq(other.content[i]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(index){let found=this.content[index];if(!found)throw RangeError(`Index `+index+` out of range for `+this);return found}maybeChild(index){return this.content[index]||null}forEach(f){for(let i=0,p=0;i<this.content.length;i++){let child=this.content[i];f(child,p,i),p+=child.nodeSize}}findDiffStart(other,pos=0){return findDiffStart(this,other,pos)}findDiffEnd(other,pos=this.size,otherPos=other.size){return findDiffEnd(this,other,pos,otherPos)}findIndex(pos){if(pos==0)return retIndex(0,pos);if(pos==this.size)return retIndex(this.content.length,pos);if(pos>this.size||pos<0)throw RangeError(`Position ${pos} outside of fragment (${this})`);for(let i=0,curPos=0;;i++){let cur=this.child(i),end=curPos+cur.nodeSize;if(end>=pos)return end==pos?retIndex(i+1,end):retIndex(i,curPos);curPos=end}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(schema,value){if(!value)return Fragment.empty;if(!Array.isArray(value))throw RangeError(`Invalid input for Fragment.fromJSON`);return Fragment.fromArray(value.map(schema.nodeFromJSON))}static fromArray(array){if(!array.length)return Fragment.empty;let joined,size=0;for(let i=0;i<array.length;i++){let node=array[i];size+=node.nodeSize,i&&node.isText&&array[i-1].sameMarkup(node)?(joined||=array.slice(0,i),joined[joined.length-1]=node.withText(joined[joined.length-1].text+node.text)):joined&&joined.push(node)}return new Fragment(joined||array,size)}static from(nodes){if(!nodes)return Fragment.empty;if(nodes instanceof Fragment)return nodes;if(Array.isArray(nodes))return this.fromArray(nodes);if(nodes.attrs)return new Fragment([nodes],nodes.nodeSize);throw RangeError(`Can not convert `+nodes+` to a Fragment`+(nodes.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};Fragment.empty=new Fragment([],0);var found={index:0,offset:0};function retIndex(index,offset){return found.index=index,found.offset=offset,found}function compareDeep(a,b){if(a===b)return!0;if(!(a&&typeof a==`object`)||!(b&&typeof b==`object`))return!1;let array=Array.isArray(a);if(Array.isArray(b)!=array)return!1;if(array){if(a.length!=b.length)return!1;for(let i=0;i<a.length;i++)if(!compareDeep(a[i],b[i]))return!1}else{for(let p in a)if(!(p in b)||!compareDeep(a[p],b[p]))return!1;for(let p in b)if(!(p in a))return!1}return!0}var Mark=class Mark{constructor(type,attrs){this.type=type,this.attrs=attrs}addToSet(set){let copy,placed=!1;for(let i=0;i<set.length;i++){let other=set[i];if(this.eq(other))return set;if(this.type.excludes(other.type))copy||=set.slice(0,i);else if(other.type.excludes(this.type))return set;else !placed&&other.type.rank>this.type.rank&&(copy||=set.slice(0,i),copy.push(this),placed=!0),copy&&copy.push(other)}return copy||=set.slice(),placed||copy.push(this),copy}removeFromSet(set){for(let i=0;i<set.length;i++)if(this.eq(set[i]))return set.slice(0,i).concat(set.slice(i+1));return set}isInSet(set){for(let i=0;i<set.length;i++)if(this.eq(set[i]))return!0;return!1}eq(other){return this==other||this.type==other.type&&compareDeep(this.attrs,other.attrs)}toJSON(){let obj={type:this.type.name};for(let _ in this.attrs){obj.attrs=this.attrs;break}return obj}static fromJSON(schema,json){if(!json)throw RangeError(`Invalid input for Mark.fromJSON`);let type=schema.marks[json.type];if(!type)throw RangeError(`There is no mark type ${json.type} in this schema`);return type.create(json.attrs)}static sameSet(a,b){if(a==b)return!0;if(a.length!=b.length)return!1;for(let i=0;i<a.length;i++)if(!a[i].eq(b[i]))return!1;return!0}static setFrom(marks){if(!marks||Array.isArray(marks)&&marks.length==0)return Mark.none;if(marks instanceof Mark)return[marks];let copy=marks.slice();return copy.sort((a,b)=>a.type.rank-b.type.rank),copy}};Mark.none=[];var ReplaceError=class extends Error{},Slice=class Slice{constructor(content,openStart,openEnd){this.content=content,this.openStart=openStart,this.openEnd=openEnd}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(pos,fragment){let content=insertInto(this.content,pos+this.openStart,fragment,this.openStart+1,this.openEnd+1);return content&&new Slice(content,this.openStart,this.openEnd)}removeBetween(from,to){return new Slice(removeRange(this.content,from+this.openStart,to+this.openStart),this.openStart,this.openEnd)}eq(other){return this.content.eq(other.content)&&this.openStart==other.openStart&&this.openEnd==other.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let json={content:this.content.toJSON()};return this.openStart>0&&(json.openStart=this.openStart),this.openEnd>0&&(json.openEnd=this.openEnd),json}static fromJSON(schema,json){if(!json)return Slice.empty;let openStart=json.openStart||0,openEnd=json.openEnd||0;if(typeof openStart!=`number`||typeof openEnd!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new Slice(Fragment.fromJSON(schema,json.content),openStart,openEnd)}static maxOpen(fragment,openIsolating=!0){let openStart=0,openEnd=0;for(let n=fragment.firstChild;n&&!n.isLeaf&&(openIsolating||!n.type.spec.isolating);n=n.firstChild)openStart++;for(let n=fragment.lastChild;n&&!n.isLeaf&&(openIsolating||!n.type.spec.isolating);n=n.lastChild)openEnd++;return new Slice(fragment,openStart,openEnd)}};Slice.empty=new Slice(Fragment.empty,0,0);function removeRange(content,from,to){let{index,offset}=content.findIndex(from),child=content.maybeChild(index),{index:indexTo,offset:offsetTo}=content.findIndex(to);if(offset==from||child.isText){if(offsetTo!=to&&!content.child(indexTo).isText)throw RangeError(`Removing non-flat range`);return content.cut(0,from).append(content.cut(to))}if(index!=indexTo)throw RangeError(`Removing non-flat range`);return content.replaceChild(index,child.copy(removeRange(child.content,from-offset-1,to-offset-1)))}function insertInto(content,dist,insert,openStart,openEnd,parent){let{index,offset}=content.findIndex(dist),child=content.maybeChild(index);if(offset==dist||child.isText)return parent&&openStart<=0&&openEnd<=0&&!parent.canReplace(index,index,insert)?null:content.cut(0,dist).append(insert).append(content.cut(dist));let inner=insertInto(child.content,dist-offset-1,insert,index==0?openStart-1:0,index==content.childCount-1?openEnd-1:0,child);return inner&&content.replaceChild(index,child.copy(inner))}function replace($from,$to,slice){if(slice.openStart>$from.depth)throw new ReplaceError(`Inserted content deeper than insertion position`);if($from.depth-slice.openStart!=$to.depth-slice.openEnd)throw new ReplaceError(`Inconsistent open depths`);return replaceOuter($from,$to,slice,0)}function replaceOuter($from,$to,slice,depth){let index=$from.index(depth),node=$from.node(depth);if(index==$to.index(depth)&&depth<$from.depth-slice.openStart){let inner=replaceOuter($from,$to,slice,depth+1);return node.copy(node.content.replaceChild(index,inner))}else if(!slice.content.size)return close(node,replaceTwoWay($from,$to,depth));else if(!slice.openStart&&!slice.openEnd&&$from.depth==depth&&$to.depth==depth){let parent=$from.parent,content=parent.content;return close(parent,content.cut(0,$from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)))}else{let{start,end}=prepareSliceForReplace(slice,$from);return close(node,replaceThreeWay($from,start,end,$to,depth))}}function checkJoin(main,sub){if(!sub.type.compatibleContent(main.type))throw new ReplaceError(`Cannot join `+sub.type.name+` onto `+main.type.name)}function joinable($before,$after,depth){let node=$before.node(depth);return checkJoin(node,$after.node(depth)),node}function addNode(child,target){let last=target.length-1;last>=0&&child.isText&&child.sameMarkup(target[last])?target[last]=child.withText(target[last].text+child.text):target.push(child)}function addRange($start,$end,depth,target){let node=($end||$start).node(depth),startIndex=0,endIndex=$end?$end.index(depth):node.childCount;$start&&(startIndex=$start.index(depth),$start.depth>depth?startIndex++:$start.textOffset&&(addNode($start.nodeAfter,target),startIndex++));for(let i=startIndex;i<endIndex;i++)addNode(node.child(i),target);$end&&$end.depth==depth&&$end.textOffset&&addNode($end.nodeBefore,target)}function close(node,content){if(!node.type.validContent(content))throw new ReplaceError(`Invalid content for node `+node.type.name);return node.copy(content)}function replaceThreeWay($from,$start,$end,$to,depth){let openStart=$from.depth>depth&&joinable($from,$start,depth+1),openEnd=$to.depth>depth&&joinable($end,$to,depth+1),content=[];return addRange(null,$from,depth,content),openStart&&openEnd&&$start.index(depth)==$end.index(depth)?(checkJoin(openStart,openEnd),addNode(close(openStart,replaceThreeWay($from,$start,$end,$to,depth+1)),content)):(openStart&&addNode(close(openStart,replaceTwoWay($from,$start,depth+1)),content),addRange($start,$end,depth,content),openEnd&&addNode(close(openEnd,replaceTwoWay($end,$to,depth+1)),content)),addRange($to,null,depth,content),new Fragment(content)}function replaceTwoWay($from,$to,depth){let content=[];return addRange(null,$from,depth,content),$from.depth>depth&&addNode(close(joinable($from,$to,depth+1),replaceTwoWay($from,$to,depth+1)),content),addRange($to,null,depth,content),new Fragment(content)}function prepareSliceForReplace(slice,$along){let extra=$along.depth-slice.openStart,node=$along.node(extra).copy(slice.content);for(let i=extra-1;i>=0;i--)node=$along.node(i).copy(Fragment.from(node));return{start:node.resolveNoCache(slice.openStart+extra),end:node.resolveNoCache(node.content.size-slice.openEnd-extra)}}var ResolvedPos=class ResolvedPos{constructor(pos,path,parentOffset){this.pos=pos,this.path=path,this.parentOffset=parentOffset,this.depth=path.length/3-1}resolveDepth(val){return val==null?this.depth:val<0?this.depth+val:val}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(depth){return this.path[this.resolveDepth(depth)*3]}index(depth){return this.path[this.resolveDepth(depth)*3+1]}indexAfter(depth){return depth=this.resolveDepth(depth),this.index(depth)+(depth==this.depth&&!this.textOffset?0:1)}start(depth){return depth=this.resolveDepth(depth),depth==0?0:this.path[depth*3-1]+1}end(depth){return depth=this.resolveDepth(depth),this.start(depth)+this.node(depth).content.size}before(depth){if(depth=this.resolveDepth(depth),!depth)throw RangeError(`There is no position before the top-level node`);return depth==this.depth+1?this.pos:this.path[depth*3-1]}after(depth){if(depth=this.resolveDepth(depth),!depth)throw RangeError(`There is no position after the top-level node`);return depth==this.depth+1?this.pos:this.path[depth*3-1]+this.path[depth*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let parent=this.parent,index=this.index(this.depth);if(index==parent.childCount)return null;let dOff=this.pos-this.path[this.path.length-1],child=parent.child(index);return dOff?parent.child(index).cut(dOff):child}get nodeBefore(){let index=this.index(this.depth),dOff=this.pos-this.path[this.path.length-1];return dOff?this.parent.child(index).cut(0,dOff):index==0?null:this.parent.child(index-1)}posAtIndex(index,depth){depth=this.resolveDepth(depth);let node=this.path[depth*3],pos=depth==0?0:this.path[depth*3-1]+1;for(let i=0;i<index;i++)pos+=node.child(i).nodeSize;return pos}marks(){let parent=this.parent,index=this.index();if(parent.content.size==0)return Mark.none;if(this.textOffset)return parent.child(index).marks;let main=parent.maybeChild(index-1),other=parent.maybeChild(index);if(!main){let tmp=main;main=other,other=tmp}let marks=main.marks;for(var i=0;i<marks.length;i++)marks[i].type.spec.inclusive===!1&&(!other||!marks[i].isInSet(other.marks))&&(marks=marks[i--].removeFromSet(marks));return marks}marksAcross($end){let after=this.parent.maybeChild(this.index());if(!after||!after.isInline)return null;let marks=after.marks,next=$end.parent.maybeChild($end.index());for(var i=0;i<marks.length;i++)marks[i].type.spec.inclusive===!1&&(!next||!marks[i].isInSet(next.marks))&&(marks=marks[i--].removeFromSet(marks));return marks}sharedDepth(pos){for(let depth=this.depth;depth>0;depth--)if(this.start(depth)<=pos&&this.end(depth)>=pos)return depth;return 0}blockRange(other=this,pred){if(other.pos<this.pos)return other.blockRange(this);for(let d=this.depth-(this.parent.inlineContent||this.pos==other.pos?1:0);d>=0;d--)if(other.pos<=this.end(d)&&(!pred||pred(this.node(d))))return new NodeRange(this,other,d);return null}sameParent(other){return this.pos-this.parentOffset==other.pos-other.parentOffset}max(other){return other.pos>this.pos?other:this}min(other){return other.pos<this.pos?other:this}toString(){let str=``;for(let i=1;i<=this.depth;i++)str+=(str?`/`:``)+this.node(i).type.name+`_`+this.index(i-1);return str+`:`+this.parentOffset}static resolve(doc,pos){if(!(pos>=0&&pos<=doc.content.size))throw RangeError(`Position `+pos+` out of range`);let path=[],start=0,parentOffset=pos;for(let node=doc;;){let{index,offset}=node.content.findIndex(parentOffset),rem=parentOffset-offset;if(path.push(node,index,start+offset),!rem||(node=node.child(index),node.isText))break;parentOffset=rem-1,start+=offset+1}return new ResolvedPos(pos,path,parentOffset)}static resolveCached(doc,pos){let cache=resolveCache.get(doc);if(cache)for(let i=0;i<cache.elts.length;i++){let elt=cache.elts[i];if(elt.pos==pos)return elt}else resolveCache.set(doc,cache=new ResolveCache);let result=cache.elts[cache.i]=ResolvedPos.resolve(doc,pos);return cache.i=(cache.i+1)%resolveCacheSize,result}},ResolveCache=class{constructor(){this.elts=[],this.i=0}},resolveCacheSize=12,resolveCache=new WeakMap,NodeRange=class{constructor($from,$to,depth){this.$from=$from,this.$to=$to,this.depth=depth}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},emptyAttrs=Object.create(null),Node=class Node{constructor(type,attrs,content,marks=Mark.none){this.type=type,this.attrs=attrs,this.marks=marks,this.content=content||Fragment.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(index){return this.content.child(index)}maybeChild(index){return this.content.maybeChild(index)}forEach(f){this.content.forEach(f)}nodesBetween(from,to,f,startPos=0){this.content.nodesBetween(from,to,f,startPos,this)}descendants(f){this.nodesBetween(0,this.content.size,f)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(from,to,blockSeparator,leafText){return this.content.textBetween(from,to,blockSeparator,leafText)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(other){return this==other||this.sameMarkup(other)&&this.content.eq(other.content)}sameMarkup(other){return this.hasMarkup(other.type,other.attrs,other.marks)}hasMarkup(type,attrs,marks){return this.type==type&&compareDeep(this.attrs,attrs||type.defaultAttrs||emptyAttrs)&&Mark.sameSet(this.marks,marks||Mark.none)}copy(content=null){return content==this.content?this:new Node(this.type,this.attrs,content,this.marks)}mark(marks){return marks==this.marks?this:new Node(this.type,this.attrs,this.content,marks)}cut(from,to=this.content.size){return from==0&&to==this.content.size?this:this.copy(this.content.cut(from,to))}slice(from,to=this.content.size,includeParents=!1){if(from==to)return Slice.empty;let $from=this.resolve(from),$to=this.resolve(to),depth=includeParents?0:$from.sharedDepth(to),start=$from.start(depth);return new Slice($from.node(depth).content.cut($from.pos-start,$to.pos-start),$from.depth-depth,$to.depth-depth)}replace(from,to,slice){return replace(this.resolve(from),this.resolve(to),slice)}nodeAt(pos){for(let node=this;;){let{index,offset}=node.content.findIndex(pos);if(node=node.maybeChild(index),!node)return null;if(offset==pos||node.isText)return node;pos-=offset+1}}childAfter(pos){let{index,offset}=this.content.findIndex(pos);return{node:this.content.maybeChild(index),index,offset}}childBefore(pos){if(pos==0)return{node:null,index:0,offset:0};let{index,offset}=this.content.findIndex(pos);if(offset<pos)return{node:this.content.child(index),index,offset};let node=this.content.child(index-1);return{node,index:index-1,offset:offset-node.nodeSize}}resolve(pos){return ResolvedPos.resolveCached(this,pos)}resolveNoCache(pos){return ResolvedPos.resolve(this,pos)}rangeHasMark(from,to,type){let found=!1;return to>from&&this.nodesBetween(from,to,node=>(type.isInSet(node.marks)&&(found=!0),!found)),found}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let name=this.type.name;return this.content.size&&(name+=`(`+this.content.toStringInner()+`)`),wrapMarks(this.marks,name)}contentMatchAt(index){let match=this.type.contentMatch.matchFragment(this.content,0,index);if(!match)throw Error(`Called contentMatchAt on a node with invalid content`);return match}canReplace(from,to,replacement=Fragment.empty,start=0,end=replacement.childCount){let one=this.contentMatchAt(from).matchFragment(replacement,start,end),two=one&&one.matchFragment(this.content,to);if(!two||!two.validEnd)return!1;for(let i=start;i<end;i++)if(!this.type.allowsMarks(replacement.child(i).marks))return!1;return!0}canReplaceWith(from,to,type,marks){if(marks&&!this.type.allowsMarks(marks))return!1;let start=this.contentMatchAt(from).matchType(type),end=start&&start.matchFragment(this.content,to);return end?end.validEnd:!1}canAppend(other){return other.content.size?this.canReplace(this.childCount,this.childCount,other.content):this.type.compatibleContent(other.type)}check(){this.type.checkContent(this.content),checkAttrs(this.type.attrs,this.attrs,`node`,this.type.name);let copy=Mark.none;for(let i=0;i<this.marks.length;i++){let mark=this.marks[i];checkAttrs(mark.type.attrs,mark.attrs,`mark`,mark.type.name),copy=mark.addToSet(copy)}if(!Mark.sameSet(copy,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(m=>m.type.name)}`);this.content.forEach(node=>node.check())}toJSON(){let obj={type:this.type.name};for(let _ in this.attrs){obj.attrs=this.attrs;break}return this.content.size&&(obj.content=this.content.toJSON()),this.marks.length&&(obj.marks=this.marks.map(n=>n.toJSON())),obj}static fromJSON(schema,json){if(!json)throw RangeError(`Invalid input for Node.fromJSON`);let marks;if(json.marks){if(!Array.isArray(json.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);marks=json.marks.map(schema.markFromJSON)}if(json.type==`text`){if(typeof json.text!=`string`)throw RangeError(`Invalid text node in JSON`);return schema.text(json.text,marks)}let content=Fragment.fromJSON(schema,json.content);return schema.nodeType(json.type).create(json.attrs,content,marks)}};Node.prototype.text=void 0,(()=>{let{stack}=Error(`/`);if(!stack||!/\n\s*at\s/.test(stack))return s=>s;let obj=Object.create(null);return s=>(obj[s],s)})();function wrapMarks(marks,str){for(let i=marks.length-1;i>=0;i--)str=marks[i].type.name+`(`+str+`)`;return str}function checkAttrs(attrs,values,type,name){for(let attr in values)if(!(attr in attrs))throw RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);for(let attr in attrs)attrs[attr].validate&&attrs[attr].validate(values[attr])}var ContentMatch=class ContentMatch{constructor(validEnd){this.validEnd=validEnd,this.next=[],this.wrapCache=[]}static parse(string,nodeTypes){let stream=new TokenStream(string,nodeTypes);if(stream.next==null)return ContentMatch.empty;let expr=parseExpr(stream);stream.next&&stream.err(`Unexpected trailing text`);let match=dfa(nfa(expr));return checkForDeadEnds(match,stream),match}matchType(type){for(let i=0;i<this.next.length;i++)if(this.next[i].type==type)return this.next[i].next;return null}matchFragment(frag,start=0,end=frag.childCount){let cur=this;for(let i=start;cur&&i<end;i++)cur=cur.matchType(frag.child(i).type);return cur}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let i=0;i<this.next.length;i++){let{type}=this.next[i];if(!(type.isText||type.hasRequiredAttrs()))return type}return null}compatible(other){for(let i=0;i<this.next.length;i++)for(let j=0;j<other.next.length;j++)if(this.next[i].type==other.next[j].type)return!0;return!1}fillBefore(after,toEnd=!1,startIndex=0){let seen=[this];function search(match,types){let finished=match.matchFragment(after,startIndex);if(finished&&(!toEnd||finished.validEnd))return Fragment.from(types.map(tp=>tp.createAndFill()));for(let i=0;i<match.next.length;i++){let{type,next}=match.next[i];if(!(type.isText||type.hasRequiredAttrs())&&seen.indexOf(next)==-1){seen.push(next);let found=search(next,types.concat(type));if(found)return found}}return null}return search(this,[])}findWrapping(target){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==target)return this.wrapCache[i+1];let computed=this.computeWrapping(target);return this.wrapCache.push(target,computed),computed}computeWrapping(target){let seen=Object.create(null),active=[{match:this,type:null,via:null}];for(;active.length;){let current=active.shift(),match=current.match;if(match.matchType(target)){let result=[];for(let obj=current;obj.type;obj=obj.via)result.push(obj.type);return result.reverse()}for(let i=0;i<match.next.length;i++){let{type,next}=match.next[i];!type.isLeaf&&!type.hasRequiredAttrs()&&!(type.name in seen)&&(!current.type||next.validEnd)&&(active.push({match:type.contentMatch,type,via:current}),seen[type.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let seen=[];function scan(m){seen.push(m);for(let i=0;i<m.next.length;i++)seen.indexOf(m.next[i].next)==-1&&scan(m.next[i].next)}return scan(this),seen.map((m,i)=>{let out=i+(m.validEnd?`*`:` `)+` `;for(let i=0;i<m.next.length;i++)out+=(i?`, `:``)+m.next[i].type.name+`->`+seen.indexOf(m.next[i].next);return out}).join(`
2
+ `)}};ContentMatch.empty=new ContentMatch(!0);var TokenStream=class{constructor(string,nodeTypes){this.string=string,this.nodeTypes=nodeTypes,this.inline=null,this.pos=0,this.tokens=string.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(tok){return this.next==tok&&(this.pos++||!0)}err(str){throw SyntaxError(str+` (in content expression '`+this.string+`')`)}};function parseExpr(stream){let exprs=[];do exprs.push(parseExprSeq(stream));while(stream.eat(`|`));return exprs.length==1?exprs[0]:{type:`choice`,exprs}}function parseExprSeq(stream){let exprs=[];do exprs.push(parseExprSubscript(stream));while(stream.next&&stream.next!=`)`&&stream.next!=`|`);return exprs.length==1?exprs[0]:{type:`seq`,exprs}}function parseExprSubscript(stream){let expr=parseExprAtom(stream);for(;;)if(stream.eat(`+`))expr={type:`plus`,expr};else if(stream.eat(`*`))expr={type:`star`,expr};else if(stream.eat(`?`))expr={type:`opt`,expr};else if(stream.eat(`{`))expr=parseExprRange(stream,expr);else break;return expr}function parseNum(stream){/\D/.test(stream.next)&&stream.err(`Expected number, got '`+stream.next+`'`);let result=Number(stream.next);return stream.pos++,result}function parseExprRange(stream,expr){let min=parseNum(stream),max=min;return stream.eat(`,`)&&(max=stream.next==`}`?-1:parseNum(stream)),stream.eat(`}`)||stream.err(`Unclosed braced range`),{type:`range`,min,max,expr}}function resolveName(stream,name){let types=stream.nodeTypes,type=types[name];if(type)return[type];let result=[];for(let typeName in types){let type=types[typeName];type.isInGroup(name)&&result.push(type)}return result.length==0&&stream.err(`No node type or group '`+name+`' found`),result}function parseExprAtom(stream){if(stream.eat(`(`)){let expr=parseExpr(stream);return stream.eat(`)`)||stream.err(`Missing closing paren`),expr}else if(/\W/.test(stream.next))stream.err(`Unexpected token '`+stream.next+`'`);else{let exprs=resolveName(stream,stream.next).map(type=>(stream.inline==null?stream.inline=type.isInline:stream.inline!=type.isInline&&stream.err(`Mixing inline and block content`),{type:`name`,value:type}));return stream.pos++,exprs.length==1?exprs[0]:{type:`choice`,exprs}}}function nfa(expr){let nfa=[[]];return connect(compile(expr,0),node()),nfa;function node(){return nfa.push([])-1}function edge(from,to,term){let edge={term,to};return nfa[from].push(edge),edge}function connect(edges,to){edges.forEach(edge=>edge.to=to)}function compile(expr,from){if(expr.type==`choice`)return expr.exprs.reduce((out,expr)=>out.concat(compile(expr,from)),[]);if(expr.type==`seq`)for(let i=0;;i++){let next=compile(expr.exprs[i],from);if(i==expr.exprs.length-1)return next;connect(next,from=node())}else if(expr.type==`star`){let loop=node();return edge(from,loop),connect(compile(expr.expr,loop),loop),[edge(loop)]}else if(expr.type==`plus`){let loop=node();return connect(compile(expr.expr,from),loop),connect(compile(expr.expr,loop),loop),[edge(loop)]}else if(expr.type==`opt`)return[edge(from)].concat(compile(expr.expr,from));else if(expr.type==`range`){let cur=from;for(let i=0;i<expr.min;i++){let next=node();connect(compile(expr.expr,cur),next),cur=next}if(expr.max==-1)connect(compile(expr.expr,cur),cur);else for(let i=expr.min;i<expr.max;i++){let next=node();edge(cur,next),connect(compile(expr.expr,cur),next),cur=next}return[edge(cur)]}else if(expr.type==`name`)return[edge(from,void 0,expr.value)];else throw Error(`Unknown expr type`)}}function cmp(a,b){return b-a}function nullFrom(nfa,node){let result=[];return scan(node),result.sort(cmp);function scan(node){let edges=nfa[node];if(edges.length==1&&!edges[0].term)return scan(edges[0].to);result.push(node);for(let i=0;i<edges.length;i++){let{term,to}=edges[i];!term&&result.indexOf(to)==-1&&scan(to)}}}function dfa(nfa){let labeled=Object.create(null);return explore(nullFrom(nfa,0));function explore(states){let out=[];states.forEach(node=>{nfa[node].forEach(({term,to})=>{if(!term)return;let set;for(let i=0;i<out.length;i++)out[i][0]==term&&(set=out[i][1]);nullFrom(nfa,to).forEach(node=>{set||out.push([term,set=[]]),set.indexOf(node)==-1&&set.push(node)})})});let state=labeled[states.join(`,`)]=new ContentMatch(states.indexOf(nfa.length-1)>-1);for(let i=0;i<out.length;i++){let states=out[i][1].sort(cmp);state.next.push({type:out[i][0],next:labeled[states.join(`,`)]||explore(states)})}return state}}function checkForDeadEnds(match,stream){for(let i=0,work=[match];i<work.length;i++){let state=work[i],dead=!state.validEnd,nodes=[];for(let j=0;j<state.next.length;j++){let{type,next}=state.next[j];nodes.push(type.name),dead&&!(type.isText||type.hasRequiredAttrs())&&(dead=!1),work.indexOf(next)==-1&&work.push(next)}dead&&stream.err(`Only non-generatable nodes (`+nodes.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}export{Fragment,Mark,ReplaceError,Slice};
@@ -0,0 +1 @@
1
+ import{Fragment,Slice}from"../../../../prosemirror-model@1.25.13/node_modules/prosemirror-model/dist/index.js";import{ReplaceAroundStep,ReplaceStep}from"../../../../prosemirror-transform@1.12.5/node_modules/prosemirror-transform/dist/index.js";var classesById=Object.create(null),Selection=class{constructor($anchor,$head,ranges){this.$anchor=$anchor,this.$head=$head,this.ranges=ranges||[new SelectionRange($anchor.min($head),$anchor.max($head))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let ranges=this.ranges;for(let i=0;i<ranges.length;i++)if(ranges[i].$from.pos!=ranges[i].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(tr,content=Slice.empty){let lastNode=content.content.lastChild,lastParent=null;for(let i=0;i<content.openEnd;i++)lastParent=lastNode,lastNode=lastNode.lastChild;let mapFrom=tr.steps.length,ranges=this.ranges;for(let i=0;i<ranges.length;i++){let{$from,$to}=ranges[i],mapping=tr.mapping.slice(mapFrom);tr.replaceRange(mapping.map($from.pos),mapping.map($to.pos),i?Slice.empty:content),i==0&&selectionToInsertionEnd(tr,mapFrom,(lastNode?lastNode.isInline:lastParent&&lastParent.isTextblock)?-1:1)}}replaceWith(tr,node){let mapFrom=tr.steps.length,ranges=this.ranges;for(let i=0;i<ranges.length;i++){let{$from,$to}=ranges[i],mapping=tr.mapping.slice(mapFrom),from=mapping.map($from.pos),to=mapping.map($to.pos);i?tr.deleteRange(from,to):(tr.replaceRangeWith(from,to,node),selectionToInsertionEnd(tr,mapFrom,node.isInline?-1:1))}}static findFrom($pos,dir,textOnly=!1){let inner=$pos.parent.inlineContent?new TextSelection($pos):findSelectionIn($pos.node(0),$pos.parent,$pos.pos,$pos.index(),dir,textOnly);if(inner)return inner;for(let depth=$pos.depth-1;depth>=0;depth--){let found=dir<0?findSelectionIn($pos.node(0),$pos.node(depth),$pos.before(depth+1),$pos.index(depth),dir,textOnly):findSelectionIn($pos.node(0),$pos.node(depth),$pos.after(depth+1),$pos.index(depth)+1,dir,textOnly);if(found)return found}return null}static near($pos,bias=1){return this.findFrom($pos,bias)||this.findFrom($pos,-bias)||new AllSelection($pos.node(0))}static atStart(doc){return findSelectionIn(doc,doc,0,0,1)||new AllSelection(doc)}static atEnd(doc){return findSelectionIn(doc,doc,doc.content.size,doc.childCount,-1)||new AllSelection(doc)}static fromJSON(doc,json){if(!json||!json.type)throw RangeError(`Invalid input for Selection.fromJSON`);let cls=classesById[json.type];if(!cls)throw RangeError(`No selection type ${json.type} defined`);return cls.fromJSON(doc,json)}static jsonID(id,selectionClass){if(id in classesById)throw RangeError(`Duplicate use of selection JSON ID `+id);return classesById[id]=selectionClass,selectionClass.prototype.jsonID=id,selectionClass}getBookmark(){return TextSelection.between(this.$anchor,this.$head).getBookmark()}};Selection.prototype.visible=!0;var SelectionRange=class{constructor($from,$to){this.$from=$from,this.$to=$to}},warnedAboutTextSelection=!1;function checkTextSelection($pos){!warnedAboutTextSelection&&!$pos.parent.inlineContent&&(warnedAboutTextSelection=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+$pos.parent.type.name+`)`))}var TextSelection=class TextSelection extends Selection{constructor($anchor,$head=$anchor){checkTextSelection($anchor),checkTextSelection($head),super($anchor,$head)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(doc,mapping){let $head=doc.resolve(mapping.map(this.head));if(!$head.parent.inlineContent)return Selection.near($head);let $anchor=doc.resolve(mapping.map(this.anchor));return new TextSelection($anchor.parent.inlineContent?$anchor:$head,$head)}replace(tr,content=Slice.empty){if(super.replace(tr,content),content==Slice.empty){let marks=this.$from.marksAcross(this.$to);marks&&tr.ensureMarks(marks)}}eq(other){return other instanceof TextSelection&&other.anchor==this.anchor&&other.head==this.head}getBookmark(){return new TextBookmark(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(doc,json){if(typeof json.anchor!=`number`||typeof json.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new TextSelection(doc.resolve(json.anchor),doc.resolve(json.head))}static create(doc,anchor,head=anchor){let $anchor=doc.resolve(anchor);return new this($anchor,head==anchor?$anchor:doc.resolve(head))}static between($anchor,$head,bias){let dPos=$anchor.pos-$head.pos;if((!bias||dPos)&&(bias=dPos>=0?1:-1),!$head.parent.inlineContent){let found=Selection.findFrom($head,bias,!0)||Selection.findFrom($head,-bias,!0);if(found)$head=found.$head;else return Selection.near($head,bias)}return $anchor.parent.inlineContent||(dPos==0?$anchor=$head:($anchor=(Selection.findFrom($anchor,-bias,!0)||Selection.findFrom($anchor,bias,!0)).$anchor,$anchor.pos<$head.pos!=dPos<0&&($anchor=$head))),new TextSelection($anchor,$head)}};Selection.jsonID(`text`,TextSelection);var TextBookmark=class TextBookmark{constructor(anchor,head){this.anchor=anchor,this.head=head}map(mapping){return new TextBookmark(mapping.map(this.anchor),mapping.map(this.head))}resolve(doc){return TextSelection.between(doc.resolve(this.anchor),doc.resolve(this.head))}},NodeSelection=class NodeSelection extends Selection{constructor($pos){let node=$pos.nodeAfter,$end=$pos.node(0).resolve($pos.pos+node.nodeSize);super($pos,$end),this.node=node}map(doc,mapping){let{deleted,pos}=mapping.mapResult(this.anchor),$pos=doc.resolve(pos);return deleted?Selection.near($pos):new NodeSelection($pos)}content(){return new Slice(Fragment.from(this.node),0,0)}eq(other){return other instanceof NodeSelection&&other.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new NodeBookmark(this.anchor)}static fromJSON(doc,json){if(typeof json.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new NodeSelection(doc.resolve(json.anchor))}static create(doc,from){return new NodeSelection(doc.resolve(from))}static isSelectable(node){return!node.isText&&node.type.spec.selectable!==!1}};NodeSelection.prototype.visible=!1,Selection.jsonID(`node`,NodeSelection);var NodeBookmark=class NodeBookmark{constructor(anchor){this.anchor=anchor}map(mapping){let{deleted,pos}=mapping.mapResult(this.anchor);return deleted?new TextBookmark(pos,pos):new NodeBookmark(pos)}resolve(doc){let $pos=doc.resolve(this.anchor),node=$pos.nodeAfter;return node&&NodeSelection.isSelectable(node)?new NodeSelection($pos):Selection.near($pos)}},AllSelection=class AllSelection extends Selection{constructor(doc){super(doc.resolve(0),doc.resolve(doc.content.size))}replace(tr,content=Slice.empty){if(content==Slice.empty){tr.delete(0,tr.doc.content.size);let sel=Selection.atStart(tr.doc);sel.eq(tr.selection)||tr.setSelection(sel)}else super.replace(tr,content)}toJSON(){return{type:`all`}}static fromJSON(doc){return new AllSelection(doc)}map(doc){return new AllSelection(doc)}eq(other){return other instanceof AllSelection}getBookmark(){return AllBookmark}};Selection.jsonID(`all`,AllSelection);var AllBookmark={map(){return this},resolve(doc){return new AllSelection(doc)}};function findSelectionIn(doc,node,pos,index,dir,text=!1){if(node.inlineContent)return TextSelection.create(doc,pos);for(let i=index-(dir>0?0:1);dir>0?i<node.childCount:i>=0;i+=dir){let child=node.child(i);if(!child.isAtom){let inner=findSelectionIn(doc,child,pos+dir,dir<0?child.childCount:0,dir,text);if(inner)return inner}else if(!text&&NodeSelection.isSelectable(child))return NodeSelection.create(doc,pos-(dir<0?child.nodeSize:0));pos+=child.nodeSize*dir}return null}function selectionToInsertionEnd(tr,startLen,bias){let last=tr.steps.length-1;if(last<startLen)return;let step=tr.steps[last];if(!(step instanceof ReplaceStep||step instanceof ReplaceAroundStep))return;let map=tr.mapping.maps[last],end;map.forEach((_from,_to,_newFrom,newTo)=>{end??=newTo}),tr.setSelection(Selection.near(tr.doc.resolve(end),bias))}function bind(f,self){return!self||!f?f:f.bind(self)}var FieldDesc=class{constructor(name,desc,self){this.name=name,this.init=bind(desc.init,self),this.apply=bind(desc.apply,self)}};new FieldDesc(`doc`,{init(config){return config.doc||config.schema.topNodeType.createAndFill()},apply(tr){return tr.doc}}),new FieldDesc(`selection`,{init(config,instance){return config.selection||Selection.atStart(instance.doc)},apply(tr){return tr.selection}}),new FieldDesc(`storedMarks`,{init(config){return config.storedMarks||null},apply(tr,_marks,_old,state){return state.selection.$cursor?tr.storedMarks:null}}),new FieldDesc(`scrollToSelection`,{init(){return 0},apply(tr,prev){return tr.scrolledIntoView?prev+1:prev}});function bindProps(obj,self,target){for(let prop in obj){let val=obj[prop];val instanceof Function?val=val.bind(self):prop==`handleDOMEvents`&&(val=bindProps(val,self,{})),target[prop]=val}return target}var Plugin=class{constructor(spec){this.spec=spec,this.props={},spec.props&&bindProps(spec.props,this,this.props),this.key=spec.key?spec.key.key:createKey(`plugin`)}getState(state){return state[this.key]}},keys=Object.create(null);function createKey(name){return name in keys?name+`$`+ ++keys[name]:(keys[name]=0,name+`$`)}var PluginKey=class{constructor(name=`key`){this.key=createKey(name)}get(state){return state.config.pluginsByKey[this.key]}getState(state){return state[this.key]}};export{Plugin,PluginKey};