@edifice.io/react 2.1.0 → 2.1.1-develop-integration.20250213121025

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 (37) hide show
  1. package/dist/components/AppIcon/AppIcon.js +1 -1
  2. package/dist/components/Form/FormContext.js +1 -1
  3. package/dist/components/Form/FormControl.js +1 -1
  4. package/dist/components/Layout/components/WidgetApps.js +1 -1
  5. package/dist/editor.js +2 -0
  6. package/dist/hooks/useDropdown/useDropdown.js +1 -1
  7. package/dist/hooks/useUploadFiles/useUploadFiles.js +1 -1
  8. package/dist/icons.js +260 -254
  9. package/dist/index.js +149 -149
  10. package/dist/modules/audience/ReactionModal.Card.js +1 -1
  11. package/dist/modules/comments/components/CommentAvatar.js +1 -1
  12. package/dist/modules/comments/provider/CommentProvider.js +1 -1
  13. package/dist/modules/editor/components/Editor/CantooModal.d.ts +2 -0
  14. package/dist/modules/editor/components/Editor/CantooModal.js +13 -0
  15. package/dist/modules/editor/components/Editor/Editor.js +10 -5
  16. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Cantoo.d.ts +8 -0
  17. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Cantoo.js +54 -0
  18. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +3 -1
  19. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +18 -3
  20. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +1 -1
  21. package/dist/modules/editor/hooks/index.d.ts +1 -0
  22. package/dist/modules/editor/hooks/useCantooEditor.d.ts +9 -0
  23. package/dist/modules/editor/hooks/useCantooEditor.js +51 -0
  24. package/dist/modules/editor/hooks/useCantooModal.d.ts +15 -0
  25. package/dist/modules/editor/hooks/useCantooModal.js +17 -0
  26. package/dist/modules/editor/hooks/useTipTapEditor.js +3 -3
  27. package/dist/modules/icons/components/IconCantoo.d.ts +7 -0
  28. package/dist/modules/icons/components/IconCantoo.js +23 -0
  29. package/dist/modules/icons/components/IconMicOff.d.ts +7 -0
  30. package/dist/modules/icons/components/IconMicOff.js +12 -0
  31. package/dist/modules/icons/components/IconTextToSpeechOff.d.ts +7 -0
  32. package/dist/modules/icons/components/IconTextToSpeechOff.js +12 -0
  33. package/dist/modules/icons/components/index.d.ts +3 -0
  34. package/dist/modules/multimedia/UploadCard/UploadCard.js +2 -2
  35. package/dist/multimedia.js +10 -10
  36. package/dist/providers/MockedProvider/MockedProvider.js +1 -1
  37. package/package.json +9 -6
package/dist/index.js CHANGED
@@ -1,99 +1,99 @@
1
1
  import { default as default2 } from "./components/ActionBar/ActionBar.js";
2
- import { default as default3 } from "./components/AppHeader/AppHeader.js";
3
- import { default as default4 } from "./components/AppIcon/AppIcon.js";
4
- import { default as default5 } from "./components/Attachment/Attachment.js";
5
- import { default as default6 } from "./components/Badge/Badge.js";
6
- import { default as default7 } from "./components/Breadcrumb/Breadcrumb.js";
7
- import { default as default8 } from "./components/Button/IconButton.js";
8
- import { default as default9 } from "./components/Button/SearchButton.js";
9
- import { default as default10 } from "./components/Card/Card.js";
10
- import { default as default11 } from "./components/ColorPicker/ColorPicker.js";
11
- import { default as default12 } from "./components/ColorPicker/ColorPickerItem.js";
12
- import { default as default13 } from "./components/Dropdown/Dropdown.js";
13
- import { default as default14 } from "./components/Dropzone/Dropzone.js";
14
- import { default as default15 } from "./components/EmptyScreen/EmptyScreen.js";
15
- import { default as default16 } from "./components/Form/FormText.js";
16
- import { default as default17 } from "./components/Image/Image.js";
17
- import { default as default18 } from "./components/Loading/Loading.js";
18
- import { default as default19 } from "./components/Logo/Logo.js";
19
- import { default as default20 } from "./components/SearchBar/SearchBar.js";
20
- import { default as default21 } from "./components/Select/Select.js";
21
- import { default as default22 } from "./components/Table/components/Table.js";
2
+ import { default as default3 } from "./components/Alert/Alert.js";
3
+ import { default as default4 } from "./components/AppHeader/AppHeader.js";
4
+ import { default as default5 } from "./components/AppIcon/AppIcon.js";
5
+ import { default as default6 } from "./components/Attachment/Attachment.js";
6
+ import { default as default7 } from "./components/Avatar/Avatar.js";
7
+ import { default as default8 } from "./components/Badge/Badge.js";
8
+ import { default as default9 } from "./components/Breadcrumb/Breadcrumb.js";
9
+ import { default as default10 } from "./components/Button/Button.js";
10
+ import { default as default11 } from "./components/Button/IconButton.js";
11
+ import { default as default12 } from "./components/Button/SearchButton.js";
12
+ import { default as default13 } from "./components/Card/Card.js";
13
+ import { default as default14 } from "./components/Checkbox/Checkbox.js";
14
+ import { default as default15 } from "./components/ColorPicker/ColorPicker.js";
15
+ import { default as default16 } from "./components/ColorPicker/ColorPickerItem.js";
16
+ import { default as default17 } from "./components/Combobox/Combobox.js";
17
+ import { default as default18 } from "./components/Dropdown/Dropdown.js";
18
+ import { default as default19 } from "./components/Dropzone/Dropzone.js";
19
+ import { default as default20 } from "./components/EmptyScreen/EmptyScreen.js";
20
+ import { default as default21 } from "./components/Form/FormText.js";
21
+ import { default as default22 } from "./components/Form/FormControl.js";
22
+ import { default as default23 } from "./components/Heading/Heading.js";
23
+ import { default as default24 } from "./components/Image/Image.js";
24
+ import { default as default25 } from "./components/Input/Input.js";
25
+ import { default as default26 } from "./components/Label/Label.js";
26
+ import { default as default27 } from "./components/Loading/Loading.js";
27
+ import { default as default28 } from "./components/LoadingScreen/LoadingScreen.js";
28
+ import { default as default29 } from "./components/Logo/Logo.js";
29
+ import { default as default30 } from "./components/Modal/Modal.js";
30
+ import { default as default31 } from "./components/Radio/Radio.js";
31
+ import { default as default32 } from "./components/SearchBar/SearchBar.js";
32
+ import { default as default33 } from "./components/Select/Select.js";
33
+ import { default as default34 } from "./components/Table/components/Table.js";
34
+ import { default as default35 } from "./components/TextArea/TextArea.js";
35
+ import { default as default36 } from "./components/Tooltip/Tooltip.js";
22
36
  import { DndTree } from "./components/Tree/components/DndTree.js";
23
- import { default as default23 } from "./components/Tree/components/SortableTree.js";
24
- import { default as default24 } from "./components/Tree/components/Tree.js";
25
- import { default as default25 } from "./components/TreeView/TreeView.js";
26
- import { default as default26 } from "./hooks/useBookmark/useBookmark.js";
27
- import { default as default27 } from "./hooks/useBreakpoint/useBreakpoint.js";
28
- import { default as default28 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
29
- import { default as default29 } from "./hooks/useCantoo/useCantoo.js";
30
- import { default as default30 } from "./hooks/useClickOutside/useClickOutside.js";
31
- import { default as default31 } from "./hooks/useConversation/useConversation.js";
32
- import { default as default32 } from "./hooks/useDate/useDate.js";
33
- import { default as default33 } from "./hooks/useDebounce/useDebounce.js";
34
- import { default as default34 } from "./hooks/useDirectory/useDirectory.js";
35
- import { default as default35 } from "./hooks/useDropdown/useDropdown.js";
36
- import { default as default36 } from "./hooks/useDropzone/useDropzone.js";
37
- import { default as default37 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
38
- import { default as default38 } from "./hooks/useHover/useHover.js";
39
- import { default as default39 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
40
- import { default as default40 } from "./hooks/useImage/useImage.js";
41
- import { default as default41 } from "./hooks/useIsAdml/useIsAdml.js";
42
- import { default as default42 } from "./hooks/useKeyPress/useKeyPress.js";
43
- import { default as default43 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
44
- import { default as default44 } from "./hooks/useScrollToTop/useScrollToTop.js";
45
- import { default as default45 } from "./hooks/useTitle/useTitle.js";
46
- import { default as default46 } from "./hooks/useToggle/useToggle.js";
47
- import { default as default47 } from "./hooks/useTrapFocus/useTrapFocus.js";
48
- import { default as default48 } from "./hooks/useTrashedResource/useTrashedResource.js";
49
- import { default as default49 } from "./hooks/useUpload/useUpload.js";
50
- import { default as default50 } from "./hooks/useUploadFiles/useUploadFiles.js";
51
- import { default as default51 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
52
- import { default as default52 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
53
- import { default as default53 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
54
- import { default as default54 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
55
- import { default as default55 } from "./components/Alert/Alert.js";
56
- import { default as default56 } from "./components/Avatar/Avatar.js";
57
- import { default as default57 } from "./components/Button/Button.js";
58
- import { default as default58 } from "./components/Checkbox/Checkbox.js";
37
+ import { default as default37 } from "./components/Tree/components/SortableTree.js";
38
+ import { default as default38 } from "./components/Tree/components/Tree.js";
39
+ import { default as default39 } from "./components/TreeView/TreeView.js";
40
+ import { default as default40 } from "./components/VisuallyHidden/VisuallyHidden.js";
41
+ import { default as default41 } from "./hooks/useBookmark/useBookmark.js";
42
+ import { default as default42 } from "./hooks/useBreakpoint/useBreakpoint.js";
43
+ import { default as default43 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
44
+ import { default as default44 } from "./hooks/useCantoo/useCantoo.js";
45
+ import { default as default45 } from "./hooks/useClickOutside/useClickOutside.js";
46
+ import { default as default46 } from "./hooks/useConversation/useConversation.js";
47
+ import { default as default47 } from "./hooks/useDate/useDate.js";
48
+ import { default as default48 } from "./hooks/useDebounce/useDebounce.js";
49
+ import { default as default49 } from "./hooks/useDirectory/useDirectory.js";
50
+ import { default as default50 } from "./hooks/useDropdown/useDropdown.js";
51
+ import { default as default51 } from "./hooks/useDropzone/useDropzone.js";
52
+ import { default as default52 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
53
+ import { default as default53 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
54
+ import { default as default54 } from "./hooks/useHover/useHover.js";
55
+ import { default as default55 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
56
+ import { default as default56 } from "./hooks/useImage/useImage.js";
57
+ import { default as default57 } from "./hooks/useIsAdml/useIsAdml.js";
58
+ import { default as default58 } from "./hooks/useKeyPress/useKeyPress.js";
59
+ import { default as default59 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
60
+ import { default as default60 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
61
+ import { default as default61 } from "./hooks/useScrollToTop/useScrollToTop.js";
62
+ import { default as default62 } from "./hooks/useTitle/useTitle.js";
63
+ import { default as default63 } from "./hooks/useToast/useToast.js";
64
+ import { default as default64 } from "./hooks/useToggle/useToggle.js";
65
+ import { default as default65 } from "./hooks/useTrapFocus/useTrapFocus.js";
66
+ import { default as default66 } from "./hooks/useTrashedResource/useTrashedResource.js";
67
+ import { default as default67 } from "./hooks/useUpload/useUpload.js";
68
+ import { default as default68 } from "./hooks/useUploadFiles/useUploadFiles.js";
69
+ import { default as default69 } from "./hooks/useUser/useUser.js";
70
+ import { default as default70 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
71
+ import { default as default71 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
72
+ import { default as default72 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
73
+ import { default as default73 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
74
+ import { default as default74 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
75
+ import { default as default75 } from "./modules/modals/PublishModal/PublishModal.js";
76
+ import { default as default76 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
77
+ import { default as default77 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
78
+ import { default as default78 } from "./modules/modals/ShareModal/ShareModal.js";
79
+ import { default as default79 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
80
+ import { default as default80 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
59
81
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
60
- import { default as default59 } from "./components/Combobox/Combobox.js";
61
82
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
62
- import { default as default60 } from "./components/Form/FormControl.js";
63
83
  import { Column, Grid } from "./components/Grid/Grid.js";
64
- import { default as default61 } from "./components/Heading/Heading.js";
65
- import { default as default62 } from "./components/Input/Input.js";
66
- import { default as default63 } from "./components/Label/Label.js";
67
84
  import { Layout } from "./components/Layout/Layout.js";
68
85
  import { List } from "./components/List/List.js";
69
- import { default as default64 } from "./components/LoadingScreen/LoadingScreen.js";
70
86
  import { Menu } from "./components/Menu/components/Menu.js";
71
- import { default as default65 } from "./components/Modal/Modal.js";
72
87
  import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
73
- import { default as default66 } from "./components/Radio/Radio.js";
74
88
  import { Tabs } from "./components/Tabs/components/Tabs.js";
75
- import { default as default67 } from "./components/TextArea/TextArea.js";
76
89
  import { Toolbar } from "./components/Toolbar/Toolbar.js";
77
- import { default as default68 } from "./components/Tooltip/Tooltip.js";
78
90
  import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
79
91
  import { buildTree, determineNewParentId, findItemIndexInTree, flattenNodes, flattenTree, generateUpdateData, getActiveAndOverNodes, getDragDepth, getIndicesToUpdate, getProjection, updateParentIds } from "./components/Tree/utilities/tree-sortable.js";
80
92
  import { useTreeView } from "./components/TreeView/hooks/useTreeView.js";
81
93
  import { TreeNode } from "./components/TreeView/TreeNode.js";
82
94
  import { TreeNodeFolderWrapper, addNode, arrayUnique, deleteNode, findNodeById, findParentNode, findPathById, findTreeNode, getAncestors, hasChildren, modifyNode, moveNode, updateNode, wrapTreeNode } from "./components/TreeView/utilities/treeview.js";
83
- import { default as default69 } from "./components/VisuallyHidden/VisuallyHidden.js";
84
95
  import { useCheckable } from "./hooks/useCheckable/useCheckable.js";
85
- import { default as default70 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
86
- import { default as default71 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
87
- import { default as default72 } from "./hooks/useToast/useToast.js";
88
- import { default as default73 } from "./hooks/useUser/useUser.js";
89
- import { default as default74 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
90
- import { default as default75 } from "./modules/modals/PublishModal/PublishModal.js";
91
- import { default as default76 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
92
- import { default as default77 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
93
96
  import { ResourceModal } from "./modules/modals/ResourceModal/ResourceModal.js";
94
- import { default as default78 } from "./modules/modals/ShareModal/ShareModal.js";
95
- import { default as default79 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
96
- import { default as default80 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
97
97
  import { EdificeClientProvider } from "./providers/EdificeClientProvider/EdificeClientProvider.js";
98
98
  import { EdificeClientContext } from "./providers/EdificeClientProvider/EdificeClientProvider.context.js";
99
99
  import { useEdificeClient } from "./providers/EdificeClientProvider/EdificeClientProvider.hook.js";
@@ -107,71 +107,71 @@ import { mergeRefs, setRef } from "./utilities/refs/ref.js";
107
107
  export {
108
108
  AccessiblePalette,
109
109
  default2 as ActionBar,
110
- default55 as Alert,
111
- default3 as AppHeader,
112
- default4 as AppIcon,
113
- default5 as Attachment,
114
- default56 as Avatar,
115
- default6 as Badge,
110
+ default3 as Alert,
111
+ default4 as AppHeader,
112
+ default5 as AppIcon,
113
+ default6 as Attachment,
114
+ default7 as Avatar,
115
+ default8 as Badge,
116
116
  default76 as BlogPublic,
117
- default7 as Breadcrumb,
118
- default57 as Button,
119
- default10 as Card,
120
- default58 as Checkbox,
121
- default11 as ColorPicker,
122
- default12 as ColorPickerItem,
117
+ default9 as Breadcrumb,
118
+ default10 as Button,
119
+ default13 as Card,
120
+ default14 as Checkbox,
121
+ default15 as ColorPicker,
122
+ default16 as ColorPickerItem,
123
123
  Column,
124
- default59 as Combobox,
124
+ default17 as Combobox,
125
125
  DefaultPalette,
126
126
  DndTree,
127
- default13 as Dropdown,
128
- default14 as Dropzone,
127
+ default18 as Dropdown,
128
+ default19 as Dropzone,
129
129
  DropzoneContext,
130
130
  EdificeClientContext,
131
131
  EdificeClientProvider,
132
132
  EdificeThemeContext,
133
133
  EdificeThemeProvider,
134
- default15 as EmptyScreen,
135
- default60 as FormControl,
136
- default16 as FormText,
134
+ default20 as EmptyScreen,
135
+ default22 as FormControl,
136
+ default21 as FormText,
137
137
  Grid,
138
- default61 as Heading,
139
- default8 as IconButton,
140
- default17 as Image,
141
- default62 as Input,
142
- default63 as Label,
138
+ default23 as Heading,
139
+ default11 as IconButton,
140
+ default24 as Image,
141
+ default25 as Input,
142
+ default26 as Label,
143
143
  Layout,
144
144
  List,
145
- default18 as Loading,
146
- default64 as LoadingScreen,
147
- default19 as Logo,
145
+ default27 as Loading,
146
+ default28 as LoadingScreen,
147
+ default29 as Logo,
148
148
  Menu,
149
149
  MockedProvider,
150
- default65 as Modal,
150
+ default30 as Modal,
151
151
  default74 as OnboardingModal,
152
152
  Popover,
153
153
  PopoverBody,
154
154
  PopoverFooter,
155
155
  PopoverHeader,
156
156
  default75 as PublishModal,
157
- default66 as Radio,
157
+ default31 as Radio,
158
158
  ResourceModal,
159
- default20 as SearchBar,
160
- default9 as SearchButton,
161
- default21 as Select,
159
+ default32 as SearchBar,
160
+ default12 as SearchButton,
161
+ default33 as Select,
162
162
  default79 as ShareBlog,
163
163
  default78 as ShareModal,
164
- default23 as SortableTree,
165
- default22 as Table,
164
+ default37 as SortableTree,
165
+ default34 as Table,
166
166
  Tabs,
167
- default67 as TextArea,
167
+ default35 as TextArea,
168
168
  Toolbar,
169
- default68 as Tooltip,
170
- default24 as Tree,
169
+ default36 as Tooltip,
170
+ default38 as Tree,
171
171
  TreeNode,
172
172
  TreeNodeFolderWrapper,
173
- default25 as TreeView,
174
- default69 as VisuallyHidden,
173
+ default39 as TreeView,
174
+ default40 as VisuallyHidden,
175
175
  addNode,
176
176
  arrayUnique,
177
177
  buildTree,
@@ -199,46 +199,46 @@ export {
199
199
  setRef,
200
200
  updateNode,
201
201
  updateParentIds,
202
- default26 as useBookmark,
203
- default27 as useBreakpoint,
204
- default28 as useBrowserInfo,
205
- default29 as useCantoo,
202
+ default41 as useBookmark,
203
+ default42 as useBreakpoint,
204
+ default43 as useBrowserInfo,
205
+ default44 as useCantoo,
206
206
  useCheckable,
207
- default30 as useClickOutside,
208
- default31 as useConversation,
209
- default32 as useDate,
210
- default33 as useDebounce,
211
- default34 as useDirectory,
212
- default35 as useDropdown,
213
- default36 as useDropzone,
207
+ default45 as useClickOutside,
208
+ default46 as useConversation,
209
+ default47 as useDate,
210
+ default48 as useDebounce,
211
+ default49 as useDirectory,
212
+ default50 as useDropdown,
213
+ default51 as useDropzone,
214
214
  useDropzoneContext,
215
215
  useEdificeClient,
216
- default37 as useEdificeIcons,
216
+ default52 as useEdificeIcons,
217
217
  useEdificeTheme,
218
- default70 as useHasWorkflow,
219
- default38 as useHover,
220
- default39 as useHttpErrorToast,
221
- default40 as useImage,
222
- default41 as useIsAdml,
223
- default42 as useKeyPress,
224
- default43 as useLibraryUrl,
225
- default71 as useMediaLibrary,
226
- default44 as useScrollToTop,
218
+ default53 as useHasWorkflow,
219
+ default54 as useHover,
220
+ default55 as useHttpErrorToast,
221
+ default56 as useImage,
222
+ default57 as useIsAdml,
223
+ default58 as useKeyPress,
224
+ default59 as useLibraryUrl,
225
+ default60 as useMediaLibrary,
226
+ default61 as useScrollToTop,
227
227
  default80 as useShareMutation,
228
- default45 as useTitle,
229
- default72 as useToast,
230
- default46 as useToggle,
231
- default47 as useTrapFocus,
232
- default48 as useTrashedResource,
228
+ default62 as useTitle,
229
+ default63 as useToast,
230
+ default64 as useToggle,
231
+ default65 as useTrapFocus,
232
+ default66 as useTrashedResource,
233
233
  useTreeSortable,
234
234
  useTreeView,
235
235
  default77 as useUpdateMutation,
236
- default49 as useUpload,
237
- default50 as useUploadFiles,
238
- default73 as useUser,
239
- default51 as useWorkspaceFile,
240
- default52 as useWorkspaceSearch,
241
- default53 as useXitiTrackPageLoad,
242
- default54 as useZendeskGuide,
236
+ default67 as useUpload,
237
+ default68 as useUploadFiles,
238
+ default69 as useUser,
239
+ default70 as useWorkspaceFile,
240
+ default71 as useWorkspaceSearch,
241
+ default72 as useXitiTrackPageLoad,
242
+ default73 as useZendeskGuide,
243
243
  wrapTreeNode
244
244
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useTranslation } from "react-i18next";
3
3
  import useReactionIcons from "./hooks/useReactionIcons.js";
4
- import Avatar from "../../components/Avatar/Avatar.js";
5
4
  import useDirectory from "../../hooks/useDirectory/useDirectory.js";
5
+ import Avatar from "../../components/Avatar/Avatar.js";
6
6
  function ReactionModalCard({
7
7
  reaction
8
8
  }) {
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useTranslation } from "react-i18next";
3
- import Avatar from "../../../components/Avatar/Avatar.js";
4
3
  import useDirectory from "../../../hooks/useDirectory/useDirectory.js";
4
+ import Avatar from "../../../components/Avatar/Avatar.js";
5
5
  const CommentAvatar = ({
6
6
  id
7
7
  }) => {
@@ -3,7 +3,7 @@ import { useMemo } from "react";
3
3
  import { CommentForm } from "../components/CommentForm.js";
4
4
  import { CommentHeader } from "../components/CommentHeader.js";
5
5
  import { CommentList } from "../components/CommentList.js";
6
- import { DEFAULT_MAX_COMMENT_LENGTH, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENTS, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_REPLIES } from "../constants.js";
6
+ import { DEFAULT_MAX_REPLIES, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_COMMENTS, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENT_LENGTH } from "../constants.js";
7
7
  import { CommentContext } from "../context/Context.js";
8
8
  import { useComments } from "../hooks/useComments.js";
9
9
  import Button from "../../../components/Button/Button.js";
@@ -0,0 +1,2 @@
1
+ declare const CantooModal: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CantooModal;
@@ -0,0 +1,13 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useEditorContext } from "../../hooks/useEditorContext.js";
3
+ const CantooModal = () => {
4
+ const {
5
+ editor
6
+ } = useEditorContext(), Cantoo = window.Cantoo, editorHTML = editor == null ? void 0 : editor.getHTML(), cantooHTML = Cantoo == null ? void 0 : Cantoo.formatText(editorHTML);
7
+ return /* @__PURE__ */ jsx("div", { className: "card p-24 mt-8", children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: {
8
+ __html: cantooHTML
9
+ } }) });
10
+ };
11
+ export {
12
+ CantooModal as default
13
+ };
@@ -3,6 +3,7 @@ import { forwardRef, useId, useImperativeHandle, Suspense, lazy } from "react";
3
3
  import { EditorContent } from "@tiptap/react";
4
4
  import clsx from "clsx";
5
5
  import { useEdificeClient } from "../../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
+ import { useCantooModal } from "../../hooks/useCantooModal.js";
6
7
  import { useMathsStyles } from "../../hooks/useMathsStyles.js";
7
8
  import { useTipTapEditor } from "../../hooks/useTipTapEditor.js";
8
9
  import { useMediaLibraryEditor } from "../../hooks/useMediaLibraryEditor.js";
@@ -15,9 +16,9 @@ import { EditorToolbar } from "../EditorToolbar/EditorToolbar.js";
15
16
  import LinkToolbar from "../Toolbar/LinkToolbar.js";
16
17
  import TableToolbar from "../Toolbar/TableToolbar.js";
17
18
  import BubbleMenuEditImage from "../BubbleMenuEditImage/BubbleMenuEditImage.js";
18
- import LoadingScreen from "../../../../components/LoadingScreen/LoadingScreen.js";
19
19
  import MediaLibrary from "../../../multimedia/MediaLibrary/MediaLibrary.js";
20
- const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/MathsModal.js")), ImageEditor = /* @__PURE__ */ lazy(async () => await import("../../../multimedia/ImageEditor/components/ImageEditor.js")), Editor = /* @__PURE__ */ forwardRef(({
20
+ import LoadingScreen from "../../../../components/LoadingScreen/LoadingScreen.js";
21
+ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/MathsModal.js")), ImageEditor = /* @__PURE__ */ lazy(async () => await import("../../../multimedia/ImageEditor/components/ImageEditor.js")), CantooModal = /* @__PURE__ */ lazy(async () => await import("./CantooModal.js")), Editor = /* @__PURE__ */ forwardRef(({
21
22
  id,
22
23
  content,
23
24
  mode = "read",
@@ -39,7 +40,10 @@ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/
39
40
  } = useMediaLibraryEditor(editor), {
40
41
  toggle: toggleMathsModal,
41
42
  ...mathsModalHandlers
42
- } = useMathsModal(editor), imageModal = useImageModal(editor, "media-library", visibility), linkToolbarHandlers = useLinkToolbar(editor, mediaLibraryModalRef), speechSynthetisis = useSpeechSynthetisis(editor);
43
+ } = useMathsModal(editor), {
44
+ toggle: toggleCantooModal,
45
+ ...cantooModalHandlers
46
+ } = useCantooModal(), imageModal = useImageModal(editor, "media-library", visibility), linkToolbarHandlers = useLinkToolbar(editor, mediaLibraryModalRef), speechSynthetisis = useSpeechSynthetisis(editor);
43
47
  if (useMathsStyles(), useImperativeHandle(ref, () => ({
44
48
  getContent: (as) => {
45
49
  switch (as) {
@@ -64,7 +68,7 @@ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/
64
68
  editable
65
69
  }, children: [
66
70
  /* @__PURE__ */ jsxs("div", { className: borderClass, children: [
67
- toolbar !== "none" && editable && /* @__PURE__ */ jsx(EditorToolbar, { mediaLibraryRef: mediaLibraryModalRef, toggleMathsModal }),
71
+ toolbar !== "none" && editable && /* @__PURE__ */ jsx(EditorToolbar, { mediaLibraryRef: mediaLibraryModalRef, toggleMathsModal, toggleCantooModal }),
68
72
  /* @__PURE__ */ jsx(EditorContent, { id: id ?? editorId, editor, className: contentClass })
69
73
  ] }),
70
74
  /* @__PURE__ */ jsx(LinkToolbar, { editor, ...linkToolbarHandlers }),
@@ -73,7 +77,8 @@ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/
73
77
  /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, {}), children: [
74
78
  editable && /* @__PURE__ */ jsx(MediaLibrary, { appCode, visibility, multiple: !0, ref: mediaLibraryModalRef, ...mediaLibraryModalHandlers }),
75
79
  editable && mathsModalHandlers.isOpen && /* @__PURE__ */ jsx(MathsModal, { ...mathsModalHandlers }),
76
- editable && (imageModal == null ? void 0 : imageModal.isOpen) && (imageModal == null ? void 0 : imageModal.currentImage) && /* @__PURE__ */ jsx(ImageEditor, { altText: imageModal == null ? void 0 : imageModal.currentImage.alt, legend: imageModal == null ? void 0 : imageModal.currentImage.title, image: imageModal == null ? void 0 : imageModal.currentImage.src, isOpen: imageModal.isOpen, onCancel: imageModal.handleCancel, onSave: imageModal.handleSave, onError: console.error })
80
+ editable && (imageModal == null ? void 0 : imageModal.isOpen) && (imageModal == null ? void 0 : imageModal.currentImage) && /* @__PURE__ */ jsx(ImageEditor, { altText: imageModal == null ? void 0 : imageModal.currentImage.alt, legend: imageModal == null ? void 0 : imageModal.currentImage.title, image: imageModal == null ? void 0 : imageModal.currentImage.src, isOpen: imageModal.isOpen, onCancel: imageModal.handleCancel, onSave: imageModal.handleSave, onError: console.error }),
81
+ editable && cantooModalHandlers.isOpen && /* @__PURE__ */ jsx(CantooModal, {})
77
82
  ] })
78
83
  ] });
79
84
  });
@@ -0,0 +1,8 @@
1
+ import { RefAttributes } from 'react';
2
+ import { IconButtonProps } from '../../../../components';
3
+ interface Props {
4
+ triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
5
+ openModal: () => void;
6
+ }
7
+ export declare const EditorToolbarCantoo: ({ triggerProps, openModal }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,54 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { Fragment as Fragment$1 } from "react";
3
+ import { useTranslation } from "react-i18next";
4
+ import SvgIconCantoo from "../../../icons/components/IconCantoo.js";
5
+ import SvgIconMicOff from "../../../icons/components/IconMicOff.js";
6
+ import SvgIconMic from "../../../icons/components/IconMic.js";
7
+ import SvgIconTextToSpeechOff from "../../../icons/components/IconTextToSpeechOff.js";
8
+ import SvgIconTextToSpeech from "../../../icons/components/IconTextToSpeech.js";
9
+ import SvgIconWand from "../../../icons/components/IconWand.js";
10
+ import { useCantooEditor } from "../../hooks/useCantooEditor.js";
11
+ import { useEditorContext } from "../../hooks/useEditorContext.js";
12
+ import Tooltip from "../../../../components/Tooltip/Tooltip.js";
13
+ import IconButton from "../../../../components/Button/IconButton.js";
14
+ import Dropdown from "../../../../components/Dropdown/Dropdown.js";
15
+ const EditorToolbarCantoo = ({
16
+ triggerProps,
17
+ openModal
18
+ }) => {
19
+ const {
20
+ t
21
+ } = useTranslation(), {
22
+ editor
23
+ } = useEditorContext(), {
24
+ speech2textIsActive,
25
+ text2speechIsActive,
26
+ toggleSpeech2Text,
27
+ toggleText2Speech,
28
+ formatText
29
+ } = useCantooEditor(editor), cantooOptions = [{
30
+ id: "speech2text",
31
+ label: t("tiptap.toolbar.cantoo.speech2text"),
32
+ className: speech2textIsActive ? "fw-bold" : "",
33
+ icon: speech2textIsActive ? /* @__PURE__ */ jsx(SvgIconMicOff, {}) : /* @__PURE__ */ jsx(SvgIconMic, {}),
34
+ action: () => toggleSpeech2Text()
35
+ }, {
36
+ id: "text2speech",
37
+ label: t("tiptap.toolbar.cantoo.text2speech"),
38
+ className: text2speechIsActive ? "fw-bold" : "",
39
+ icon: text2speechIsActive ? /* @__PURE__ */ jsx(SvgIconTextToSpeechOff, {}) : /* @__PURE__ */ jsx(SvgIconTextToSpeech, {}),
40
+ action: () => toggleText2Speech()
41
+ }, {
42
+ id: "formatText",
43
+ label: t("tiptap.toolbar.cantoo.formatText"),
44
+ icon: /* @__PURE__ */ jsx(SvgIconWand, {}),
45
+ action: () => formatText(openModal)
46
+ }];
47
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
48
+ /* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.cantoo.choice"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconCantoo, {}), className: speech2textIsActive || text2speechIsActive ? "is-selected" : "", "aria-label": t("tiptap.toolbar.cantoo.choice") }) }),
49
+ /* @__PURE__ */ jsx(Dropdown.Menu, { children: cantooOptions.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown.Item, { onClick: option.action, icon: option.icon, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) }, option.id)) })
50
+ ] });
51
+ };
52
+ export {
53
+ EditorToolbarCantoo
54
+ };
@@ -5,6 +5,8 @@ interface Props {
5
5
  mediaLibraryRef: RefObject<MediaLibraryRef>;
6
6
  /** API to open/close a Math modal. */
7
7
  toggleMathsModal: () => void;
8
+ /** API to open/close a Cantoo modal. */
9
+ toggleCantooModal: () => void;
8
10
  }
9
- export declare const EditorToolbar: ({ mediaLibraryRef, toggleMathsModal }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const EditorToolbar: ({ mediaLibraryRef, toggleMathsModal, toggleCantooModal, }: Props) => import("react/jsx-runtime").JSX.Element;
10
12
  export {};
@@ -25,20 +25,25 @@ import { EditorToolbarPlusMenu } from "./EditorToolbar.PlusMenu.js";
25
25
  import { EditorToolbarTextColor } from "./EditorToolbar.TextColor.js";
26
26
  import { EditorToolbarTextSize } from "./EditorToolbar.TextSize.js";
27
27
  import { EditorToolbarTypography } from "./EditorToolbar.Typography.js";
28
- import { useEditorContext } from "../../hooks/useEditorContext.js";
28
+ import { EditorToolbarCantoo } from "./EditorToolbar.Cantoo.js";
29
+ import { useCantooEditor } from "../../hooks/useCantooEditor.js";
29
30
  import { useActionOptions } from "../../hooks/useActionOptions.js";
30
31
  import { useSpeechRecognition } from "../../hooks/useSpeechRecognition.js";
32
+ import { useEditorContext } from "../../hooks/useEditorContext.js";
31
33
  import { Toolbar } from "../../../../components/Toolbar/Toolbar.js";
32
34
  const EditorToolbar = ({
33
35
  mediaLibraryRef,
34
- toggleMathsModal
36
+ toggleMathsModal,
37
+ toggleCantooModal
35
38
  }) => {
36
39
  const {
37
40
  t
38
41
  } = useTranslation(), {
39
42
  id,
40
43
  editor
41
- } = useEditorContext(), [plusOptions, listOptions, alignmentOptions] = useActionOptions(editor, toggleMathsModal, mediaLibraryRef), {
44
+ } = useEditorContext(), {
45
+ isAvailable: canUseCantoo
46
+ } = useCantooEditor(editor), [plusOptions, listOptions, alignmentOptions] = useActionOptions(editor, toggleMathsModal, mediaLibraryRef), {
42
47
  isAvailable: canRecognizeSpeech,
43
48
  isActive: speechRecognition,
44
49
  toggle: toggleSpeechRecognition
@@ -165,6 +170,16 @@ const EditorToolbar = ({
165
170
  name: "speechtotext",
166
171
  tooltip: t("tiptap.toolbar.stt")
167
172
  },
173
+ //------------- CANTOO ---------------//
174
+ {
175
+ type: "dropdown",
176
+ props: {
177
+ children: (triggerProps) => /* @__PURE__ */ jsx(EditorToolbarCantoo, { triggerProps, openModal: toggleCantooModal })
178
+ },
179
+ name: "cantoo",
180
+ visibility: canUseCantoo ? "show" : "hide",
181
+ tooltip: t("tiptap.toolbar.cantoo.choice")
182
+ },
168
183
  //------------------------------------//
169
184
  {
170
185
  type: "divider",
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { NodeViewWrapper } from "@tiptap/react";
3
3
  import clsx from "clsx";
4
+ import useEdificeIcons from "../../../../hooks/useEdificeIcons/useEdificeIcons.js";
4
5
  import Badge from "../../../../components/Badge/Badge.js";
5
6
  import AppIcon from "../../../../components/AppIcon/AppIcon.js";
6
- import useEdificeIcons from "../../../../hooks/useEdificeIcons/useEdificeIcons.js";
7
7
  const LinkerRenderer = ({
8
8
  selected,
9
9
  ...props
@@ -10,3 +10,4 @@ export * from './useResizeMedia';
10
10
  export * from './useSpeechRecognition';
11
11
  export * from './useSpeechSynthetisis';
12
12
  export * from './useTipTapEditor';
13
+ export * from './useCantooEditor';
@@ -0,0 +1,9 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare const useCantooEditor: (editor: Editor | null) => {
3
+ isAvailable: boolean | Record<string, boolean> | undefined;
4
+ speech2textIsActive: boolean;
5
+ text2speechIsActive: boolean;
6
+ toggleSpeech2Text: () => Promise<void>;
7
+ toggleText2Speech: () => void;
8
+ formatText: (openModal: () => void) => void;
9
+ };