@quickbuilder.io/rich-text 0.0.0-stage → 1.0.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 (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -2
  3. package/adapters.d.ts +1 -0
  4. package/adapters.js +1 -0
  5. package/collaboration.d.ts +1 -0
  6. package/collaboration.js +1 -0
  7. package/commands.d.ts +1 -0
  8. package/commands.js +1 -0
  9. package/content.d.ts +1 -0
  10. package/content.js +1 -0
  11. package/contracts.d.ts +1 -0
  12. package/contracts.js +1 -0
  13. package/dist/adapters.d.mts +11 -0
  14. package/dist/adapters.d.ts +11 -0
  15. package/dist/adapters.js +564 -0
  16. package/dist/adapters.js.map +1 -0
  17. package/dist/adapters.mjs +557 -0
  18. package/dist/adapters.mjs.map +1 -0
  19. package/dist/collaboration.d.mts +29 -0
  20. package/dist/collaboration.d.ts +29 -0
  21. package/dist/collaboration.js +758 -0
  22. package/dist/collaboration.js.map +1 -0
  23. package/dist/collaboration.mjs +733 -0
  24. package/dist/collaboration.mjs.map +1 -0
  25. package/dist/commands.d.mts +8 -0
  26. package/dist/commands.d.ts +8 -0
  27. package/dist/commands.js +42 -0
  28. package/dist/commands.js.map +1 -0
  29. package/dist/commands.mjs +38 -0
  30. package/dist/commands.mjs.map +1 -0
  31. package/dist/content-types-CYHsrMrs.d.mts +27 -0
  32. package/dist/content-types-CYHsrMrs.d.ts +27 -0
  33. package/dist/content.d.mts +19 -0
  34. package/dist/content.d.ts +19 -0
  35. package/dist/content.js +785 -0
  36. package/dist/content.js.map +1 -0
  37. package/dist/content.mjs +775 -0
  38. package/dist/content.mjs.map +1 -0
  39. package/dist/contracts.d.mts +199 -0
  40. package/dist/contracts.d.ts +199 -0
  41. package/dist/contracts.js +4 -0
  42. package/dist/contracts.js.map +1 -0
  43. package/dist/contracts.mjs +3 -0
  44. package/dist/contracts.mjs.map +1 -0
  45. package/dist/extensions.d.mts +363 -0
  46. package/dist/extensions.d.ts +363 -0
  47. package/dist/extensions.js +153 -0
  48. package/dist/extensions.js.map +1 -0
  49. package/dist/extensions.mjs +142 -0
  50. package/dist/extensions.mjs.map +1 -0
  51. package/dist/history.d.mts +12 -0
  52. package/dist/history.d.ts +12 -0
  53. package/dist/history.js +464 -0
  54. package/dist/history.js.map +1 -0
  55. package/dist/history.mjs +459 -0
  56. package/dist/history.mjs.map +1 -0
  57. package/dist/index.d.mts +12 -0
  58. package/dist/index.d.ts +12 -0
  59. package/dist/index.js +1438 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/index.mjs +1372 -0
  62. package/dist/index.mjs.map +1 -0
  63. package/dist/markdown.d.mts +32 -0
  64. package/dist/markdown.d.ts +32 -0
  65. package/dist/markdown.js +739 -0
  66. package/dist/markdown.js.map +1 -0
  67. package/dist/markdown.mjs +735 -0
  68. package/dist/markdown.mjs.map +1 -0
  69. package/dist/runtime/dom.d.mts +148 -0
  70. package/dist/runtime/dom.d.ts +148 -0
  71. package/dist/runtime/dom.js +2145 -0
  72. package/dist/runtime/dom.js.map +1 -0
  73. package/dist/runtime/dom.mjs +2084 -0
  74. package/dist/runtime/dom.mjs.map +1 -0
  75. package/dist/schema.d.mts +23 -0
  76. package/dist/schema.d.ts +23 -0
  77. package/dist/schema.js +157 -0
  78. package/dist/schema.js.map +1 -0
  79. package/dist/schema.mjs +137 -0
  80. package/dist/schema.mjs.map +1 -0
  81. package/dist/serializer.d.mts +38 -0
  82. package/dist/serializer.d.ts +38 -0
  83. package/dist/serializer.js +504 -0
  84. package/dist/serializer.js.map +1 -0
  85. package/dist/serializer.mjs +491 -0
  86. package/dist/serializer.mjs.map +1 -0
  87. package/dist/svg-export-BtI8x_mG.d.mts +15 -0
  88. package/dist/svg-export-BtI8x_mG.d.ts +15 -0
  89. package/dist/transactions.d.mts +16 -0
  90. package/dist/transactions.d.ts +16 -0
  91. package/dist/transactions.js +637 -0
  92. package/dist/transactions.js.map +1 -0
  93. package/dist/transactions.mjs +631 -0
  94. package/dist/transactions.mjs.map +1 -0
  95. package/extensions.d.ts +1 -0
  96. package/extensions.js +1 -0
  97. package/history.d.ts +1 -0
  98. package/history.js +1 -0
  99. package/package.json +352 -4
  100. package/schema.d.ts +1 -0
  101. package/schema.js +1 -0
  102. package/serializer.d.ts +1 -0
  103. package/serializer.js +1 -0
  104. package/transactions.d.ts +1 -0
  105. package/transactions.js +1 -0
@@ -0,0 +1,363 @@
1
+ import { RichTextExtensionDefinition, RichTextExtensionRegistry, RichTextExtensionId } from './contracts.mjs';
2
+ import './content-types-CYHsrMrs.mjs';
3
+
4
+ declare const richTextTableExtension: {
5
+ readonly id: "tables";
6
+ readonly label: "Tables";
7
+ readonly tier: "pro";
8
+ readonly availability: "registered";
9
+ readonly schema: {
10
+ readonly nodes: readonly ["table", "tableRow", "tableHeaderCell", "tableCell"];
11
+ };
12
+ readonly commands: readonly [{
13
+ readonly command: "insertTable";
14
+ readonly label: "Insert table";
15
+ readonly group: "insert";
16
+ }, {
17
+ readonly command: "deleteTable";
18
+ readonly label: "Delete table";
19
+ readonly group: "structure";
20
+ }, {
21
+ readonly command: "addTableRow";
22
+ readonly label: "Add table row";
23
+ readonly group: "structure";
24
+ }, {
25
+ readonly command: "deleteTableRow";
26
+ readonly label: "Delete table row";
27
+ readonly group: "structure";
28
+ }, {
29
+ readonly command: "addTableColumn";
30
+ readonly label: "Add table column";
31
+ readonly group: "structure";
32
+ }, {
33
+ readonly command: "deleteTableColumn";
34
+ readonly label: "Delete table column";
35
+ readonly group: "structure";
36
+ }];
37
+ };
38
+ declare const richTextMentionExtension: {
39
+ readonly id: "mentions";
40
+ readonly label: "Mentions";
41
+ readonly tier: "pro";
42
+ readonly availability: "registered";
43
+ readonly schema: {
44
+ readonly nodes: readonly ["mention", "mentionQuery", "mentionMenu"];
45
+ };
46
+ readonly commands: readonly [{
47
+ readonly command: "insertMention";
48
+ readonly label: "Insert mention";
49
+ readonly group: "insert";
50
+ }];
51
+ };
52
+ declare const richTextSlashCommandExtension: {
53
+ readonly id: "slash-commands";
54
+ readonly label: "Slash commands";
55
+ readonly tier: "pro";
56
+ readonly availability: "registered";
57
+ readonly schema: {
58
+ readonly nodes: readonly ["slashCommandQuery", "slashCommandMenu"];
59
+ };
60
+ readonly commands: readonly [{
61
+ readonly command: "heading1";
62
+ readonly label: "Heading 1";
63
+ readonly group: "structure";
64
+ }, {
65
+ readonly command: "heading2";
66
+ readonly label: "Heading 2";
67
+ readonly group: "structure";
68
+ }, {
69
+ readonly command: "heading3";
70
+ readonly label: "Heading 3";
71
+ readonly group: "structure";
72
+ }, {
73
+ readonly command: "paragraph";
74
+ readonly label: "Paragraph";
75
+ readonly group: "structure";
76
+ }, {
77
+ readonly command: "blockquote";
78
+ readonly label: "Quote";
79
+ readonly group: "structure";
80
+ }, {
81
+ readonly command: "bulletedList";
82
+ readonly label: "Bulleted list";
83
+ readonly group: "structure";
84
+ }, {
85
+ readonly command: "numberedList";
86
+ readonly label: "Numbered list";
87
+ readonly group: "structure";
88
+ }, {
89
+ readonly command: "taskList";
90
+ readonly label: "Task list";
91
+ readonly group: "structure";
92
+ }, {
93
+ readonly command: "codeBlock";
94
+ readonly label: "Code block";
95
+ readonly group: "structure";
96
+ }, {
97
+ readonly command: "horizontalRule";
98
+ readonly label: "Separator";
99
+ readonly group: "insert";
100
+ }, {
101
+ readonly command: "table";
102
+ readonly label: "Table";
103
+ readonly group: "insert";
104
+ }];
105
+ };
106
+ declare const richTextCollaborationExtension: {
107
+ readonly id: "collaboration";
108
+ readonly label: "Collaboration";
109
+ readonly tier: "pro";
110
+ readonly availability: "registered";
111
+ readonly schema: {
112
+ readonly nodes: readonly ["collaborationPresence", "collaborationCursor"];
113
+ };
114
+ readonly commands: readonly [{
115
+ readonly command: "syncPresence";
116
+ readonly label: "Sync presence";
117
+ readonly group: "collaboration";
118
+ }];
119
+ };
120
+ declare const richTextPagesExtension: {
121
+ readonly id: "pages";
122
+ readonly label: "Paginated documents";
123
+ readonly tier: "pro";
124
+ readonly availability: "registered";
125
+ readonly schema: {
126
+ readonly nodes: readonly ["documentPage", "pageHeader", "pageFooter", "pageNumberField", "manualPageBreak"];
127
+ };
128
+ readonly commands: readonly [{
129
+ readonly command: "insertPage";
130
+ readonly label: "Insert page break";
131
+ readonly group: "insert";
132
+ }, {
133
+ readonly command: "removePage";
134
+ readonly label: "Remove page";
135
+ readonly group: "structure";
136
+ }, {
137
+ readonly command: "previousPage";
138
+ readonly label: "Previous page";
139
+ readonly group: "navigation";
140
+ }, {
141
+ readonly command: "nextPage";
142
+ readonly label: "Next page";
143
+ readonly group: "navigation";
144
+ }, {
145
+ readonly command: "editHeader";
146
+ readonly label: "Edit page header";
147
+ readonly group: "navigation";
148
+ }, {
149
+ readonly command: "editFooter";
150
+ readonly label: "Edit page footer";
151
+ readonly group: "navigation";
152
+ }];
153
+ };
154
+ declare const richTextAiAssistantExtension: {
155
+ readonly id: "ai-assistant";
156
+ readonly label: "AI assistant";
157
+ readonly tier: "pro";
158
+ readonly availability: "registered";
159
+ readonly schema: {
160
+ readonly nodes: readonly ["aiAssistantRequest", "aiSuggestion"];
161
+ };
162
+ readonly commands: readonly [{
163
+ readonly command: "improveWriting";
164
+ readonly label: "Improve writing";
165
+ readonly group: "assistant";
166
+ }, {
167
+ readonly command: "fixSpelling";
168
+ readonly label: "Fix spelling";
169
+ readonly group: "assistant";
170
+ }, {
171
+ readonly command: "shorten";
172
+ readonly label: "Shorten";
173
+ readonly group: "assistant";
174
+ }, {
175
+ readonly command: "expand";
176
+ readonly label: "Expand";
177
+ readonly group: "assistant";
178
+ }, {
179
+ readonly command: "summarize";
180
+ readonly label: "Summarize";
181
+ readonly group: "assistant";
182
+ }];
183
+ };
184
+ declare const richTextExtensionDefinitions: readonly [{
185
+ readonly id: "tables";
186
+ readonly label: "Tables";
187
+ readonly tier: "pro";
188
+ readonly availability: "registered";
189
+ readonly schema: {
190
+ readonly nodes: readonly ["table", "tableRow", "tableHeaderCell", "tableCell"];
191
+ };
192
+ readonly commands: readonly [{
193
+ readonly command: "insertTable";
194
+ readonly label: "Insert table";
195
+ readonly group: "insert";
196
+ }, {
197
+ readonly command: "deleteTable";
198
+ readonly label: "Delete table";
199
+ readonly group: "structure";
200
+ }, {
201
+ readonly command: "addTableRow";
202
+ readonly label: "Add table row";
203
+ readonly group: "structure";
204
+ }, {
205
+ readonly command: "deleteTableRow";
206
+ readonly label: "Delete table row";
207
+ readonly group: "structure";
208
+ }, {
209
+ readonly command: "addTableColumn";
210
+ readonly label: "Add table column";
211
+ readonly group: "structure";
212
+ }, {
213
+ readonly command: "deleteTableColumn";
214
+ readonly label: "Delete table column";
215
+ readonly group: "structure";
216
+ }];
217
+ }, {
218
+ readonly id: "mentions";
219
+ readonly label: "Mentions";
220
+ readonly tier: "pro";
221
+ readonly availability: "registered";
222
+ readonly schema: {
223
+ readonly nodes: readonly ["mention", "mentionQuery", "mentionMenu"];
224
+ };
225
+ readonly commands: readonly [{
226
+ readonly command: "insertMention";
227
+ readonly label: "Insert mention";
228
+ readonly group: "insert";
229
+ }];
230
+ }, {
231
+ readonly id: "slash-commands";
232
+ readonly label: "Slash commands";
233
+ readonly tier: "pro";
234
+ readonly availability: "registered";
235
+ readonly schema: {
236
+ readonly nodes: readonly ["slashCommandQuery", "slashCommandMenu"];
237
+ };
238
+ readonly commands: readonly [{
239
+ readonly command: "heading1";
240
+ readonly label: "Heading 1";
241
+ readonly group: "structure";
242
+ }, {
243
+ readonly command: "heading2";
244
+ readonly label: "Heading 2";
245
+ readonly group: "structure";
246
+ }, {
247
+ readonly command: "heading3";
248
+ readonly label: "Heading 3";
249
+ readonly group: "structure";
250
+ }, {
251
+ readonly command: "paragraph";
252
+ readonly label: "Paragraph";
253
+ readonly group: "structure";
254
+ }, {
255
+ readonly command: "blockquote";
256
+ readonly label: "Quote";
257
+ readonly group: "structure";
258
+ }, {
259
+ readonly command: "bulletedList";
260
+ readonly label: "Bulleted list";
261
+ readonly group: "structure";
262
+ }, {
263
+ readonly command: "numberedList";
264
+ readonly label: "Numbered list";
265
+ readonly group: "structure";
266
+ }, {
267
+ readonly command: "taskList";
268
+ readonly label: "Task list";
269
+ readonly group: "structure";
270
+ }, {
271
+ readonly command: "codeBlock";
272
+ readonly label: "Code block";
273
+ readonly group: "structure";
274
+ }, {
275
+ readonly command: "horizontalRule";
276
+ readonly label: "Separator";
277
+ readonly group: "insert";
278
+ }, {
279
+ readonly command: "table";
280
+ readonly label: "Table";
281
+ readonly group: "insert";
282
+ }];
283
+ }, {
284
+ readonly id: "pages";
285
+ readonly label: "Paginated documents";
286
+ readonly tier: "pro";
287
+ readonly availability: "registered";
288
+ readonly schema: {
289
+ readonly nodes: readonly ["documentPage", "pageHeader", "pageFooter", "pageNumberField", "manualPageBreak"];
290
+ };
291
+ readonly commands: readonly [{
292
+ readonly command: "insertPage";
293
+ readonly label: "Insert page break";
294
+ readonly group: "insert";
295
+ }, {
296
+ readonly command: "removePage";
297
+ readonly label: "Remove page";
298
+ readonly group: "structure";
299
+ }, {
300
+ readonly command: "previousPage";
301
+ readonly label: "Previous page";
302
+ readonly group: "navigation";
303
+ }, {
304
+ readonly command: "nextPage";
305
+ readonly label: "Next page";
306
+ readonly group: "navigation";
307
+ }, {
308
+ readonly command: "editHeader";
309
+ readonly label: "Edit page header";
310
+ readonly group: "navigation";
311
+ }, {
312
+ readonly command: "editFooter";
313
+ readonly label: "Edit page footer";
314
+ readonly group: "navigation";
315
+ }];
316
+ }, {
317
+ readonly id: "collaboration";
318
+ readonly label: "Collaboration";
319
+ readonly tier: "pro";
320
+ readonly availability: "registered";
321
+ readonly schema: {
322
+ readonly nodes: readonly ["collaborationPresence", "collaborationCursor"];
323
+ };
324
+ readonly commands: readonly [{
325
+ readonly command: "syncPresence";
326
+ readonly label: "Sync presence";
327
+ readonly group: "collaboration";
328
+ }];
329
+ }, {
330
+ readonly id: "ai-assistant";
331
+ readonly label: "AI assistant";
332
+ readonly tier: "pro";
333
+ readonly availability: "registered";
334
+ readonly schema: {
335
+ readonly nodes: readonly ["aiAssistantRequest", "aiSuggestion"];
336
+ };
337
+ readonly commands: readonly [{
338
+ readonly command: "improveWriting";
339
+ readonly label: "Improve writing";
340
+ readonly group: "assistant";
341
+ }, {
342
+ readonly command: "fixSpelling";
343
+ readonly label: "Fix spelling";
344
+ readonly group: "assistant";
345
+ }, {
346
+ readonly command: "shorten";
347
+ readonly label: "Shorten";
348
+ readonly group: "assistant";
349
+ }, {
350
+ readonly command: "expand";
351
+ readonly label: "Expand";
352
+ readonly group: "assistant";
353
+ }, {
354
+ readonly command: "summarize";
355
+ readonly label: "Summarize";
356
+ readonly group: "assistant";
357
+ }];
358
+ }];
359
+ declare function createRichTextExtensionRegistry(extensions?: readonly RichTextExtensionDefinition[]): RichTextExtensionRegistry;
360
+ declare const richTextExtensionRegistry: RichTextExtensionRegistry;
361
+ declare function resolveRichTextExtensions(extensionIds: readonly RichTextExtensionId[], registry?: RichTextExtensionRegistry): RichTextExtensionDefinition[];
362
+
363
+ export { createRichTextExtensionRegistry, resolveRichTextExtensions, richTextAiAssistantExtension, richTextCollaborationExtension, richTextExtensionDefinitions, richTextExtensionRegistry, richTextMentionExtension, richTextPagesExtension, richTextSlashCommandExtension, richTextTableExtension };