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