@ixo/editor 1.0.0 → 1.1.0

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 (224) hide show
  1. package/README.md +160 -136
  2. package/dist/chunk-57TP5N42.mjs +1784 -0
  3. package/dist/chunk-57TP5N42.mjs.map +1 -0
  4. package/dist/chunk-MXVDN3FO.mjs +169 -0
  5. package/dist/chunk-MXVDN3FO.mjs.map +1 -0
  6. package/dist/graphql-client-BmODcqPE.d.mts +135 -0
  7. package/dist/index.d.mts +1328 -0
  8. package/dist/index.mjs +27 -0
  9. package/dist/index.mjs.map +1 -0
  10. package/dist/mantine/index.d.mts +1253 -0
  11. package/dist/mantine/index.mjs +413 -0
  12. package/dist/mantine/index.mjs.map +1 -0
  13. package/dist/shadcn/index.d.mts +6 -0
  14. package/dist/shadcn/index.mjs +27 -0
  15. package/dist/shadcn/index.mjs.map +1 -0
  16. package/fonts/inter-v12-latin/inter-v12-latin-100.woff +0 -0
  17. package/fonts/inter-v12-latin/inter-v12-latin-100.woff2 +0 -0
  18. package/fonts/inter-v12-latin/inter-v12-latin-200.woff +0 -0
  19. package/fonts/inter-v12-latin/inter-v12-latin-200.woff2 +0 -0
  20. package/fonts/inter-v12-latin/inter-v12-latin-300.woff +0 -0
  21. package/fonts/inter-v12-latin/inter-v12-latin-300.woff2 +0 -0
  22. package/fonts/inter-v12-latin/inter-v12-latin-500.woff +0 -0
  23. package/fonts/inter-v12-latin/inter-v12-latin-500.woff2 +0 -0
  24. package/fonts/inter-v12-latin/inter-v12-latin-600.woff +0 -0
  25. package/fonts/inter-v12-latin/inter-v12-latin-600.woff2 +0 -0
  26. package/fonts/inter-v12-latin/inter-v12-latin-700.woff +0 -0
  27. package/fonts/inter-v12-latin/inter-v12-latin-700.woff2 +0 -0
  28. package/fonts/inter-v12-latin/inter-v12-latin-800.woff +0 -0
  29. package/fonts/inter-v12-latin/inter-v12-latin-800.woff2 +0 -0
  30. package/fonts/inter-v12-latin/inter-v12-latin-900.woff +0 -0
  31. package/fonts/inter-v12-latin/inter-v12-latin-900.woff2 +0 -0
  32. package/fonts/inter-v12-latin/inter-v12-latin-regular.woff +0 -0
  33. package/fonts/inter-v12-latin/inter-v12-latin-regular.woff2 +0 -0
  34. package/package.json +32 -9
  35. package/style-core.css +243 -0
  36. package/style-mantine.css +340 -0
  37. package/style-shadcn.css +340 -0
  38. package/style.css +94 -0
  39. package/dist/blocks/index.d.ts +0 -85
  40. package/dist/blocks/index.d.ts.map +0 -1
  41. package/dist/blocks/index.js +0 -50
  42. package/dist/blocks/list/ListBlock.d.ts +0 -59
  43. package/dist/blocks/list/ListBlock.d.ts.map +0 -1
  44. package/dist/blocks/list/ListBlock.js +0 -51
  45. package/dist/blocks/list/ListBlockToolbar.d.ts +0 -9
  46. package/dist/blocks/list/ListBlockToolbar.d.ts.map +0 -1
  47. package/dist/blocks/list/ListBlockToolbar.js +0 -26
  48. package/dist/blocks/list/ListContainer.d.ts +0 -5
  49. package/dist/blocks/list/ListContainer.d.ts.map +0 -1
  50. package/dist/blocks/list/ListContainer.js +0 -10
  51. package/dist/blocks/list/ListGeneralTab.d.ts +0 -11
  52. package/dist/blocks/list/ListGeneralTab.d.ts.map +0 -1
  53. package/dist/blocks/list/ListGeneralTab.js +0 -134
  54. package/dist/blocks/list/ListItem.d.ts +0 -8
  55. package/dist/blocks/list/ListItem.d.ts.map +0 -1
  56. package/dist/blocks/list/ListItem.js +0 -24
  57. package/dist/blocks/list/ListPreviewTab.d.ts +0 -9
  58. package/dist/blocks/list/ListPreviewTab.d.ts.map +0 -1
  59. package/dist/blocks/list/ListPreviewTab.js +0 -51
  60. package/dist/blocks/list/ListSettings.d.ts +0 -3
  61. package/dist/blocks/list/ListSettings.d.ts.map +0 -1
  62. package/dist/blocks/list/ListSettings.js +0 -115
  63. package/dist/blocks/list/ListSettingsTab.d.ts +0 -10
  64. package/dist/blocks/list/ListSettingsTab.d.ts.map +0 -1
  65. package/dist/blocks/list/ListSettingsTab.js +0 -64
  66. package/dist/blocks/list/index.d.ts +0 -3
  67. package/dist/blocks/list/index.d.ts.map +0 -1
  68. package/dist/blocks/list/index.js +0 -5
  69. package/dist/blocks/list/useList.d.ts +0 -5
  70. package/dist/blocks/list/useList.d.ts.map +0 -1
  71. package/dist/blocks/list/useList.js +0 -11
  72. package/dist/blocks/overview/OverviewBlock.d.ts +0 -33
  73. package/dist/blocks/overview/OverviewBlock.d.ts.map +0 -1
  74. package/dist/blocks/overview/OverviewBlock.js +0 -34
  75. package/dist/blocks/overview/OverviewBlockToolbar.d.ts +0 -8
  76. package/dist/blocks/overview/OverviewBlockToolbar.d.ts.map +0 -1
  77. package/dist/blocks/overview/OverviewBlockToolbar.js +0 -16
  78. package/dist/blocks/overview/OverviewGeneralTab.d.ts +0 -11
  79. package/dist/blocks/overview/OverviewGeneralTab.d.ts.map +0 -1
  80. package/dist/blocks/overview/OverviewGeneralTab.js +0 -134
  81. package/dist/blocks/overview/OverviewPreviewTab.d.ts +0 -10
  82. package/dist/blocks/overview/OverviewPreviewTab.d.ts.map +0 -1
  83. package/dist/blocks/overview/OverviewPreviewTab.js +0 -30
  84. package/dist/blocks/overview/OverviewSettings.d.ts +0 -3
  85. package/dist/blocks/overview/OverviewSettings.d.ts.map +0 -1
  86. package/dist/blocks/overview/OverviewSettings.js +0 -114
  87. package/dist/blocks/overview/index.d.ts +0 -3
  88. package/dist/blocks/overview/index.d.ts.map +0 -1
  89. package/dist/blocks/overview/index.js +0 -5
  90. package/dist/blocks/overview/useOverview.d.ts +0 -11
  91. package/dist/blocks/overview/useOverview.d.ts.map +0 -1
  92. package/dist/blocks/overview/useOverview.js +0 -61
  93. package/dist/components/GlobeIcon.d.ts +0 -9
  94. package/dist/components/GlobeIcon.d.ts.map +0 -1
  95. package/dist/components/GlobeIcon.js +0 -20
  96. package/dist/components/IxoEditor.d.ts +0 -14
  97. package/dist/components/IxoEditor.d.ts.map +0 -1
  98. package/dist/components/IxoEditor.js +0 -41
  99. package/dist/components/PenIcon.d.ts +0 -9
  100. package/dist/components/PenIcon.d.ts.map +0 -1
  101. package/dist/components/PenIcon.js +0 -20
  102. package/dist/components/SettingsIcon.d.ts +0 -9
  103. package/dist/components/SettingsIcon.d.ts.map +0 -1
  104. package/dist/components/SettingsIcon.js +0 -21
  105. package/dist/components/SettingsModal/AdvancedTab.d.ts +0 -8
  106. package/dist/components/SettingsModal/AdvancedTab.d.ts.map +0 -1
  107. package/dist/components/SettingsModal/AdvancedTab.js +0 -14
  108. package/dist/components/SettingsModal/DomainPreview.d.ts +0 -7
  109. package/dist/components/SettingsModal/DomainPreview.d.ts.map +0 -1
  110. package/dist/components/SettingsModal/DomainPreview.js +0 -22
  111. package/dist/components/SettingsModal/FeatureASettings.d.ts +0 -3
  112. package/dist/components/SettingsModal/FeatureASettings.d.ts.map +0 -1
  113. package/dist/components/SettingsModal/FeatureASettings.js +0 -74
  114. package/dist/components/SettingsModal/GeneralTab.d.ts +0 -10
  115. package/dist/components/SettingsModal/GeneralTab.d.ts.map +0 -1
  116. package/dist/components/SettingsModal/GeneralTab.js +0 -111
  117. package/dist/components/SettingsModal/PreviewTab.d.ts +0 -8
  118. package/dist/components/SettingsModal/PreviewTab.d.ts.map +0 -1
  119. package/dist/components/SettingsModal/PreviewTab.js +0 -14
  120. package/dist/components/SettingsModal/SettingsModal.d.ts +0 -16
  121. package/dist/components/SettingsModal/SettingsModal.d.ts.map +0 -1
  122. package/dist/components/SettingsModal/SettingsModal.js +0 -61
  123. package/dist/components/SettingsModal/SettingsNavigation.d.ts +0 -15
  124. package/dist/components/SettingsModal/SettingsNavigation.d.ts.map +0 -1
  125. package/dist/components/SettingsModal/SettingsNavigation.js +0 -21
  126. package/dist/components/SettingsModal/index.d.ts +0 -8
  127. package/dist/components/SettingsModal/index.d.ts.map +0 -1
  128. package/dist/components/SettingsModal/index.js +0 -17
  129. package/dist/components/SwitchOption.d.ts +0 -9
  130. package/dist/components/SwitchOption.d.ts.map +0 -1
  131. package/dist/components/SwitchOption.js +0 -45
  132. package/dist/components/icons/ArchiveIcon.d.ts +0 -9
  133. package/dist/components/icons/ArchiveIcon.d.ts.map +0 -1
  134. package/dist/components/icons/ArchiveIcon.js +0 -18
  135. package/dist/components/icons/AudioIcon.d.ts +0 -9
  136. package/dist/components/icons/AudioIcon.d.ts.map +0 -1
  137. package/dist/components/icons/AudioIcon.js +0 -17
  138. package/dist/components/icons/DefaultIcon.d.ts +0 -9
  139. package/dist/components/icons/DefaultIcon.d.ts.map +0 -1
  140. package/dist/components/icons/DefaultIcon.js +0 -17
  141. package/dist/components/icons/DocumentIcon.d.ts +0 -9
  142. package/dist/components/icons/DocumentIcon.d.ts.map +0 -1
  143. package/dist/components/icons/DocumentIcon.js +0 -20
  144. package/dist/components/icons/ImageIcon.d.ts +0 -9
  145. package/dist/components/icons/ImageIcon.d.ts.map +0 -1
  146. package/dist/components/icons/ImageIcon.js +0 -18
  147. package/dist/components/icons/JsonIcon.d.ts +0 -9
  148. package/dist/components/icons/JsonIcon.d.ts.map +0 -1
  149. package/dist/components/icons/JsonIcon.js +0 -19
  150. package/dist/components/icons/PdfIcon.d.ts +0 -9
  151. package/dist/components/icons/PdfIcon.d.ts.map +0 -1
  152. package/dist/components/icons/PdfIcon.js +0 -20
  153. package/dist/components/icons/VideoIcon.d.ts +0 -9
  154. package/dist/components/icons/VideoIcon.d.ts.map +0 -1
  155. package/dist/components/icons/VideoIcon.js +0 -17
  156. package/dist/components/icons/XmlIcon.d.ts +0 -9
  157. package/dist/components/icons/XmlIcon.d.ts.map +0 -1
  158. package/dist/components/icons/XmlIcon.js +0 -19
  159. package/dist/components/icons/index.d.ts +0 -10
  160. package/dist/components/icons/index.d.ts.map +0 -1
  161. package/dist/components/icons/index.js +0 -24
  162. package/dist/components/ui/button.d.ts +0 -11
  163. package/dist/components/ui/button.d.ts.map +0 -1
  164. package/dist/components/ui/button.js +0 -68
  165. package/dist/components/ui/card.d.ts +0 -9
  166. package/dist/components/ui/card.d.ts.map +0 -1
  167. package/dist/components/ui/card.js +0 -56
  168. package/dist/components/ui/dialog.d.ts +0 -16
  169. package/dist/components/ui/dialog.d.ts.map +0 -1
  170. package/dist/components/ui/dialog.js +0 -85
  171. package/dist/components/ui/dropdown-menu.d.ts +0 -26
  172. package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
  173. package/dist/components/ui/dropdown-menu.js +0 -110
  174. package/dist/components/ui/input.d.ts +0 -4
  175. package/dist/components/ui/input.d.ts.map +0 -1
  176. package/dist/components/ui/input.js +0 -41
  177. package/dist/components/ui/label.d.ts +0 -5
  178. package/dist/components/ui/label.d.ts.map +0 -1
  179. package/dist/components/ui/label.js +0 -42
  180. package/dist/components/ui/switch.d.ts +0 -5
  181. package/dist/components/ui/switch.d.ts.map +0 -1
  182. package/dist/components/ui/switch.js +0 -44
  183. package/dist/components/ui/tabs.d.ts +0 -8
  184. package/dist/components/ui/tabs.d.ts.map +0 -1
  185. package/dist/components/ui/tabs.js +0 -54
  186. package/dist/components/ui/toggle-group.d.ts +0 -8
  187. package/dist/components/ui/toggle-group.d.ts.map +0 -1
  188. package/dist/components/ui/toggle-group.js +0 -57
  189. package/dist/components/ui/toggle.d.ts +0 -10
  190. package/dist/components/ui/toggle.d.ts.map +0 -1
  191. package/dist/components/ui/toggle.js +0 -62
  192. package/dist/hooks/useCollaborativeIxoEditor.d.ts +0 -571
  193. package/dist/hooks/useCollaborativeIxoEditor.d.ts.map +0 -1
  194. package/dist/hooks/useCollaborativeIxoEditor.js +0 -127
  195. package/dist/hooks/useCreateIxoEditor.d.ts +0 -568
  196. package/dist/hooks/useCreateIxoEditor.d.ts.map +0 -1
  197. package/dist/hooks/useCreateIxoEditor.js +0 -62
  198. package/dist/hooks/useMatrixProvider.d.ts +0 -13
  199. package/dist/hooks/useMatrixProvider.d.ts.map +0 -1
  200. package/dist/hooks/useMatrixProvider.js +0 -147
  201. package/dist/index.d.ts +0 -12
  202. package/dist/index.d.ts.map +0 -1
  203. package/dist/index.js +0 -24
  204. package/dist/lib/graphql-client.d.ts +0 -27
  205. package/dist/lib/graphql-client.d.ts.map +0 -1
  206. package/dist/lib/graphql-client.js +0 -36
  207. package/dist/lib/graphql-queries.d.ts +0 -31
  208. package/dist/lib/graphql-queries.d.ts.map +0 -1
  209. package/dist/lib/graphql-queries.js +0 -40
  210. package/dist/lib/utils/getMediaTypeIcon.d.ts +0 -20
  211. package/dist/lib/utils/getMediaTypeIcon.d.ts.map +0 -1
  212. package/dist/lib/utils/getMediaTypeIcon.js +0 -96
  213. package/dist/lib/utils/index.d.ts +0 -4
  214. package/dist/lib/utils/index.d.ts.map +0 -1
  215. package/dist/lib/utils/index.js +0 -12
  216. package/dist/lib/utils.d.ts +0 -3
  217. package/dist/lib/utils.d.ts.map +0 -1
  218. package/dist/lib/utils.js +0 -8
  219. package/dist/types/Domain.d.ts +0 -18
  220. package/dist/types/Domain.d.ts.map +0 -1
  221. package/dist/types/Domain.js +0 -2
  222. package/dist/types/index.d.ts +0 -77
  223. package/dist/types/index.d.ts.map +0 -1
  224. package/dist/types/index.js +0 -2
@@ -1,571 +0,0 @@
1
- import { IxoCollaborativeEditorOptions } from "../types";
2
- /**
3
- * Custom hook that wraps useCreateBlockNote with IXO-specific configurations
4
- * @param options - Configuration options for the IxoEditor
5
- * @returns A configured BlockNote editor instance
6
- */
7
- export declare function useCreateCollaborativeIxoEditor(options: IxoCollaborativeEditorOptions): {
8
- editor: import("@blocknote/core").BlockNoteEditor<import("@blocknote/core").BlockSchemaFromSpecs<{
9
- list: {
10
- config: {
11
- readonly type: "list";
12
- readonly propSchema: {
13
- readonly title: {
14
- readonly default: "";
15
- };
16
- readonly did: {
17
- readonly default: "";
18
- };
19
- readonly fragmentIdentifier: {
20
- readonly default: "";
21
- };
22
- readonly listItemType: {
23
- readonly default: "keyvalue";
24
- };
25
- readonly showLinkedResources: {
26
- readonly default: false;
27
- };
28
- readonly showAssetsInCollection: {
29
- readonly default: false;
30
- };
31
- };
32
- readonly content: "none";
33
- };
34
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
35
- readonly type: "list";
36
- readonly propSchema: {
37
- readonly title: {
38
- readonly default: "";
39
- };
40
- readonly did: {
41
- readonly default: "";
42
- };
43
- readonly fragmentIdentifier: {
44
- readonly default: "";
45
- };
46
- readonly listItemType: {
47
- readonly default: "keyvalue";
48
- };
49
- readonly showLinkedResources: {
50
- readonly default: false;
51
- };
52
- readonly showAssetsInCollection: {
53
- readonly default: false;
54
- };
55
- };
56
- readonly content: "none";
57
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
58
- };
59
- overview: {
60
- config: {
61
- type: "overview";
62
- propSchema: {
63
- did: {
64
- default: string;
65
- };
66
- };
67
- content: "inline";
68
- };
69
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
70
- type: "overview";
71
- propSchema: {
72
- did: {
73
- default: string;
74
- };
75
- };
76
- content: "inline";
77
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
78
- };
79
- paragraph: {
80
- config: {
81
- type: "paragraph";
82
- content: "inline";
83
- propSchema: {
84
- backgroundColor: {
85
- default: "default";
86
- };
87
- textColor: {
88
- default: "default";
89
- };
90
- textAlignment: {
91
- default: "left";
92
- values: readonly ["left", "center", "right", "justify"];
93
- };
94
- };
95
- };
96
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
97
- type: "paragraph";
98
- content: "inline";
99
- propSchema: {
100
- backgroundColor: {
101
- default: "default";
102
- };
103
- textColor: {
104
- default: "default";
105
- };
106
- textAlignment: {
107
- default: "left";
108
- values: readonly ["left", "center", "right", "justify"];
109
- };
110
- };
111
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
112
- };
113
- heading: {
114
- config: {
115
- type: "heading";
116
- content: "inline";
117
- propSchema: {
118
- level: {
119
- default: number;
120
- values: readonly [1, 2, 3];
121
- };
122
- backgroundColor: {
123
- default: "default";
124
- };
125
- textColor: {
126
- default: "default";
127
- };
128
- textAlignment: {
129
- default: "left";
130
- values: readonly ["left", "center", "right", "justify"];
131
- };
132
- };
133
- };
134
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
135
- type: "heading";
136
- content: "inline";
137
- propSchema: {
138
- level: {
139
- default: number;
140
- values: readonly [1, 2, 3];
141
- };
142
- backgroundColor: {
143
- default: "default";
144
- };
145
- textColor: {
146
- default: "default";
147
- };
148
- textAlignment: {
149
- default: "left";
150
- values: readonly ["left", "center", "right", "justify"];
151
- };
152
- };
153
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
154
- };
155
- bulletListItem: {
156
- config: {
157
- type: "bulletListItem";
158
- content: "inline";
159
- propSchema: {
160
- backgroundColor: {
161
- default: "default";
162
- };
163
- textColor: {
164
- default: "default";
165
- };
166
- textAlignment: {
167
- default: "left";
168
- values: readonly ["left", "center", "right", "justify"];
169
- };
170
- };
171
- };
172
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
173
- type: "bulletListItem";
174
- content: "inline";
175
- propSchema: {
176
- backgroundColor: {
177
- default: "default";
178
- };
179
- textColor: {
180
- default: "default";
181
- };
182
- textAlignment: {
183
- default: "left";
184
- values: readonly ["left", "center", "right", "justify"];
185
- };
186
- };
187
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
188
- };
189
- numberedListItem: {
190
- config: {
191
- type: "numberedListItem";
192
- content: "inline";
193
- propSchema: {
194
- backgroundColor: {
195
- default: "default";
196
- };
197
- textColor: {
198
- default: "default";
199
- };
200
- textAlignment: {
201
- default: "left";
202
- values: readonly ["left", "center", "right", "justify"];
203
- };
204
- };
205
- };
206
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
207
- type: "numberedListItem";
208
- content: "inline";
209
- propSchema: {
210
- backgroundColor: {
211
- default: "default";
212
- };
213
- textColor: {
214
- default: "default";
215
- };
216
- textAlignment: {
217
- default: "left";
218
- values: readonly ["left", "center", "right", "justify"];
219
- };
220
- };
221
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
222
- };
223
- checkListItem: {
224
- config: {
225
- type: "checkListItem";
226
- content: "inline";
227
- propSchema: {
228
- checked: {
229
- default: false;
230
- };
231
- backgroundColor: {
232
- default: "default";
233
- };
234
- textColor: {
235
- default: "default";
236
- };
237
- textAlignment: {
238
- default: "left";
239
- values: readonly ["left", "center", "right", "justify"];
240
- };
241
- };
242
- };
243
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
244
- type: "checkListItem";
245
- content: "inline";
246
- propSchema: {
247
- checked: {
248
- default: false;
249
- };
250
- backgroundColor: {
251
- default: "default";
252
- };
253
- textColor: {
254
- default: "default";
255
- };
256
- textAlignment: {
257
- default: "left";
258
- values: readonly ["left", "center", "right", "justify"];
259
- };
260
- };
261
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
262
- };
263
- table: {
264
- config: {
265
- type: "table";
266
- content: "table";
267
- propSchema: {
268
- backgroundColor: {
269
- default: "default";
270
- };
271
- textColor: {
272
- default: "default";
273
- };
274
- textAlignment: {
275
- default: "left";
276
- values: readonly ["left", "center", "right", "justify"];
277
- };
278
- };
279
- };
280
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
281
- type: "table";
282
- content: "table";
283
- propSchema: {
284
- backgroundColor: {
285
- default: "default";
286
- };
287
- textColor: {
288
- default: "default";
289
- };
290
- textAlignment: {
291
- default: "left";
292
- values: readonly ["left", "center", "right", "justify"];
293
- };
294
- };
295
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
296
- };
297
- file: {
298
- config: {
299
- type: "file";
300
- propSchema: {
301
- backgroundColor: {
302
- default: "default";
303
- };
304
- name: {
305
- default: "";
306
- };
307
- url: {
308
- default: "";
309
- };
310
- caption: {
311
- default: "";
312
- };
313
- };
314
- content: "none";
315
- isFileBlock: true;
316
- };
317
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
318
- type: "file";
319
- propSchema: {
320
- backgroundColor: {
321
- default: "default";
322
- };
323
- name: {
324
- default: "";
325
- };
326
- url: {
327
- default: "";
328
- };
329
- caption: {
330
- default: "";
331
- };
332
- };
333
- content: "none";
334
- isFileBlock: true;
335
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
336
- };
337
- image: {
338
- config: {
339
- type: "image";
340
- propSchema: {
341
- textAlignment: {
342
- default: "left";
343
- values: readonly ["left", "center", "right", "justify"];
344
- };
345
- backgroundColor: {
346
- default: "default";
347
- };
348
- name: {
349
- default: "";
350
- };
351
- url: {
352
- default: "";
353
- };
354
- caption: {
355
- default: "";
356
- };
357
- showPreview: {
358
- default: true;
359
- };
360
- previewWidth: {
361
- default: number;
362
- };
363
- };
364
- content: "none";
365
- isFileBlock: true;
366
- fileBlockAccept: string[];
367
- };
368
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
369
- type: "image";
370
- propSchema: {
371
- textAlignment: {
372
- default: "left";
373
- values: readonly ["left", "center", "right", "justify"];
374
- };
375
- backgroundColor: {
376
- default: "default";
377
- };
378
- name: {
379
- default: "";
380
- };
381
- url: {
382
- default: "";
383
- };
384
- caption: {
385
- default: "";
386
- };
387
- showPreview: {
388
- default: true;
389
- };
390
- previewWidth: {
391
- default: number;
392
- };
393
- };
394
- content: "none";
395
- isFileBlock: true;
396
- fileBlockAccept: string[];
397
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
398
- };
399
- video: {
400
- config: {
401
- type: "video";
402
- propSchema: {
403
- textAlignment: {
404
- default: "left";
405
- values: readonly ["left", "center", "right", "justify"];
406
- };
407
- backgroundColor: {
408
- default: "default";
409
- };
410
- name: {
411
- default: "";
412
- };
413
- url: {
414
- default: "";
415
- };
416
- caption: {
417
- default: "";
418
- };
419
- showPreview: {
420
- default: true;
421
- };
422
- previewWidth: {
423
- default: number;
424
- };
425
- };
426
- content: "none";
427
- isFileBlock: true;
428
- fileBlockAccept: string[];
429
- };
430
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
431
- type: "video";
432
- propSchema: {
433
- textAlignment: {
434
- default: "left";
435
- values: readonly ["left", "center", "right", "justify"];
436
- };
437
- backgroundColor: {
438
- default: "default";
439
- };
440
- name: {
441
- default: "";
442
- };
443
- url: {
444
- default: "";
445
- };
446
- caption: {
447
- default: "";
448
- };
449
- showPreview: {
450
- default: true;
451
- };
452
- previewWidth: {
453
- default: number;
454
- };
455
- };
456
- content: "none";
457
- isFileBlock: true;
458
- fileBlockAccept: string[];
459
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
460
- };
461
- audio: {
462
- config: {
463
- type: "audio";
464
- propSchema: {
465
- backgroundColor: {
466
- default: "default";
467
- };
468
- name: {
469
- default: "";
470
- };
471
- url: {
472
- default: "";
473
- };
474
- caption: {
475
- default: "";
476
- };
477
- showPreview: {
478
- default: true;
479
- };
480
- };
481
- content: "none";
482
- isFileBlock: true;
483
- fileBlockAccept: string[];
484
- };
485
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
486
- type: "audio";
487
- propSchema: {
488
- backgroundColor: {
489
- default: "default";
490
- };
491
- name: {
492
- default: "";
493
- };
494
- url: {
495
- default: "";
496
- };
497
- caption: {
498
- default: "";
499
- };
500
- showPreview: {
501
- default: true;
502
- };
503
- };
504
- content: "none";
505
- isFileBlock: true;
506
- fileBlockAccept: string[];
507
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
508
- };
509
- }>, import("@blocknote/core").InlineContentSchemaFromSpecs<{
510
- text: {
511
- config: "text";
512
- implementation: any;
513
- };
514
- link: {
515
- config: "link";
516
- implementation: any;
517
- };
518
- }>, import("@blocknote/core").StyleSchemaFromSpecs<{
519
- bold: {
520
- config: {
521
- type: string;
522
- propSchema: "boolean";
523
- };
524
- implementation: import("@blocknote/core").StyleImplementation;
525
- };
526
- italic: {
527
- config: {
528
- type: string;
529
- propSchema: "boolean";
530
- };
531
- implementation: import("@blocknote/core").StyleImplementation;
532
- };
533
- underline: {
534
- config: {
535
- type: string;
536
- propSchema: "boolean";
537
- };
538
- implementation: import("@blocknote/core").StyleImplementation;
539
- };
540
- strike: {
541
- config: {
542
- type: string;
543
- propSchema: "boolean";
544
- };
545
- implementation: import("@blocknote/core").StyleImplementation;
546
- };
547
- code: {
548
- config: {
549
- type: string;
550
- propSchema: "boolean";
551
- };
552
- implementation: import("@blocknote/core").StyleImplementation;
553
- };
554
- textColor: {
555
- config: {
556
- type: string;
557
- propSchema: "string";
558
- };
559
- implementation: import("@blocknote/core").StyleImplementation;
560
- };
561
- backgroundColor: {
562
- config: {
563
- type: string;
564
- propSchema: "string";
565
- };
566
- implementation: import("@blocknote/core").StyleImplementation;
567
- };
568
- }>>;
569
- connectionStatus: "connecting" | "connected" | "failed" | "disconnected";
570
- };
571
- //# sourceMappingURL=useCollaborativeIxoEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCollaborativeIxoEditor.d.ts","sourceRoot":"","sources":["../../src/hooks/useCollaborativeIxoEditor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAMzD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0GvC"}
@@ -1,127 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.useCreateCollaborativeIxoEditor = useCreateCollaborativeIxoEditor;
37
- const react_1 = require("@blocknote/react");
38
- const core_1 = require("@blocknote/core");
39
- const blocks_1 = require("../blocks");
40
- const useMatrixProvider_1 = require("./useMatrixProvider");
41
- const Y = __importStar(require("yjs"));
42
- const react_2 = require("react");
43
- /**
44
- * Custom hook that wraps useCreateBlockNote with IXO-specific configurations
45
- * @param options - Configuration options for the IxoEditor
46
- * @returns A configured BlockNote editor instance
47
- */
48
- function useCreateCollaborativeIxoEditor(options) {
49
- // Extract IXO-specific options and BlockNote options
50
- // Memoize Y.Doc to prevent recreation on every render
51
- const yDoc = (0, react_2.useMemo)(() => new Y.Doc(), []);
52
- const { theme = "light", uploadFile, initialContent, editable = true, sideMenu = true, slashMenu = true, formattingToolbar = true, linkToolbar = true, filePanel = true, tableHandles = true, user, matrix: { roomId, baseUrl, } } = options || {};
53
- // Memoize user data to prevent recreation
54
- const memoizedUser = (0, react_2.useMemo)(() => ({
55
- id: user?.id || "",
56
- name: user?.name || "",
57
- color: user?.color || "",
58
- accessToken: user?.accessToken || "",
59
- }), [user?.id, user?.name, user?.color, user?.accessToken]);
60
- const { matrixProvider, connectionStatus } = (0, useMatrixProvider_1.useMatrixProvider)({
61
- userId: memoizedUser.id,
62
- accessToken: memoizedUser.accessToken,
63
- baseUrl: baseUrl,
64
- roomId: roomId,
65
- yDoc,
66
- });
67
- // Memoize default upload handler to prevent recreation
68
- const defaultUploadFile = (0, react_2.useMemo)(() => uploadFile ||
69
- (async (file) => {
70
- // Default implementation - convert to data URL
71
- // In production, you'd want to upload to a server
72
- return new Promise((resolve, reject) => {
73
- const reader = new FileReader();
74
- reader.onloadend = () => {
75
- const dataUrl = reader.result;
76
- resolve(dataUrl);
77
- };
78
- reader.onerror = reject;
79
- reader.readAsDataURL(file);
80
- });
81
- }), [uploadFile]);
82
- // Memoize schema to prevent recreation
83
- const schema = (0, react_2.useMemo)(() => core_1.BlockNoteSchema.create({
84
- blockSpecs: {
85
- ...core_1.defaultBlockSpecs,
86
- ...blocks_1.blockSpecs,
87
- },
88
- inlineContentSpecs: {
89
- ...core_1.defaultInlineContentSpecs,
90
- },
91
- styleSpecs: {
92
- ...core_1.defaultStyleSpecs,
93
- },
94
- }), []);
95
- // Memoize collaboration config to prevent recreation
96
- const collaborationConfig = (0, react_2.useMemo)(() => ({
97
- provider: matrixProvider,
98
- fragment: yDoc.getXmlFragment("document"),
99
- user: {
100
- name: memoizedUser.name,
101
- color: memoizedUser.color,
102
- },
103
- }), [matrixProvider, yDoc, memoizedUser.name, memoizedUser.color]);
104
- // Memoize IXO config to prevent recreation
105
- const ixoConfig = (0, react_2.useMemo)(() => ({
106
- theme,
107
- editable,
108
- sideMenu,
109
- slashMenu,
110
- formattingToolbar,
111
- linkToolbar,
112
- filePanel,
113
- tableHandles,
114
- }), [theme, editable, sideMenu, slashMenu, formattingToolbar, linkToolbar, filePanel, tableHandles]);
115
- // Create the BlockNote editor with basic configurations
116
- const editor = (0, react_1.useCreateBlockNote)({
117
- schema,
118
- initialContent,
119
- uploadFile: defaultUploadFile,
120
- collaboration: collaborationConfig,
121
- });
122
- // Store configuration in editor for components to access
123
- if (editor) {
124
- editor._ixoConfig = ixoConfig;
125
- }
126
- return { editor, connectionStatus: connectionStatus };
127
- }