@blocknote/xl-pdf-exporter 0.19.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 (78) hide show
  1. package/LICENSE +661 -0
  2. package/dist/Inter_18pt-Bold-BOnnSImi.js +5 -0
  3. package/dist/Inter_18pt-Bold-BOnnSImi.js.map +1 -0
  4. package/dist/Inter_18pt-BoldItalic-DPKIpVzB.js +5 -0
  5. package/dist/Inter_18pt-BoldItalic-DPKIpVzB.js.map +1 -0
  6. package/dist/Inter_18pt-Italic-BVnfHlUD.js +5 -0
  7. package/dist/Inter_18pt-Italic-BVnfHlUD.js.map +1 -0
  8. package/dist/Inter_18pt-Regular-byxnNS-8.js +5 -0
  9. package/dist/Inter_18pt-Regular-byxnNS-8.js.map +1 -0
  10. package/dist/blocknote-xl-pdf-exporter.js +2503 -0
  11. package/dist/blocknote-xl-pdf-exporter.js.map +1 -0
  12. package/dist/blocknote-xl-pdf-exporter.umd.cjs +69 -0
  13. package/dist/blocknote-xl-pdf-exporter.umd.cjs.map +1 -0
  14. package/dist/webpack-stats.json +1 -0
  15. package/package.json +88 -0
  16. package/src/index.ts +1 -0
  17. package/src/pdf/__snapshots__/example.jsx +592 -0
  18. package/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx +602 -0
  19. package/src/pdf/defaultSchema/blocks.tsx +177 -0
  20. package/src/pdf/defaultSchema/index.ts +9 -0
  21. package/src/pdf/defaultSchema/inlinecontent.tsx +23 -0
  22. package/src/pdf/defaultSchema/styles.tsx +68 -0
  23. package/src/pdf/index.ts +2 -0
  24. package/src/pdf/pdfExporter.test.tsx +208 -0
  25. package/src/pdf/pdfExporter.tsx +297 -0
  26. package/src/pdf/types.ts +3 -0
  27. package/src/pdf/util/listItem.tsx +70 -0
  28. package/src/pdf/util/table/Table.tsx +76 -0
  29. package/src/vite-env.d.ts +11 -0
  30. package/types/src/Exporter.d.ts +26 -0
  31. package/types/src/context/BlockNoteContext.d.ts +59 -0
  32. package/types/src/context/BlockNoteContext.test.d.ts +1 -0
  33. package/types/src/context/ServerBlockNoteEditor.d.ts +137 -0
  34. package/types/src/context/ServerBlockNoteEditor.test.d.ts +1 -0
  35. package/types/src/context/react/ReactServer.test.d.ts +2 -0
  36. package/types/src/docx/blocks.d.ts +433 -0
  37. package/types/src/docx/defaultSchema/blocks.d.ts +4 -0
  38. package/types/src/docx/defaultSchema/index.d.ts +559 -0
  39. package/types/src/docx/defaultSchema/inlinecontent.d.ts +4 -0
  40. package/types/src/docx/defaultSchema/styles.d.ts +4 -0
  41. package/types/src/docx/docxExporter.d.ts +14 -0
  42. package/types/src/docx/docxExporter.test.d.ts +1 -0
  43. package/types/src/docx/imageUtil.d.ts +4 -0
  44. package/types/src/docx/index.d.ts +2 -0
  45. package/types/src/docx/inlinecontent.d.ts +12 -0
  46. package/types/src/docx/styles.d.ts +55 -0
  47. package/types/src/docx/util/Table.d.ts +4 -0
  48. package/types/src/docxExporter.d.ts +255 -0
  49. package/types/src/docxExporter.test.d.ts +1 -0
  50. package/types/src/index.d.ts +1 -0
  51. package/types/src/mapping.d.ts +29 -0
  52. package/types/src/pdf/blocks.d.ts +434 -0
  53. package/types/src/pdf/defaultSchema/blocks.d.ts +4 -0
  54. package/types/src/pdf/defaultSchema/index.d.ts +510 -0
  55. package/types/src/pdf/defaultSchema/inlinecontent.d.ts +4 -0
  56. package/types/src/pdf/defaultSchema/styles.d.ts +3 -0
  57. package/types/src/pdf/index.d.ts +2 -0
  58. package/types/src/pdf/inlinecontent.d.ts +13 -0
  59. package/types/src/pdf/pdfExporter.d.ts +81 -0
  60. package/types/src/pdf/pdfExporter.test.d.ts +1 -0
  61. package/types/src/pdf/styles.d.ts +55 -0
  62. package/types/src/pdf/types.d.ts +2 -0
  63. package/types/src/pdf/util/listItem.d.ts +9 -0
  64. package/types/src/pdf/util/loadFontDataUrl.d.ts +3 -0
  65. package/types/src/pdf/util/table/Table.d.ts +5 -0
  66. package/types/src/pdfExporter.d.ts +256 -0
  67. package/types/src/pdfExporter.test.d.ts +1 -0
  68. package/types/src/react-email/defaultSchema/blocks.d.ts +5 -0
  69. package/types/src/react-email/defaultSchema/index.d.ts +560 -0
  70. package/types/src/react-email/defaultSchema/inlinecontent.d.ts +5 -0
  71. package/types/src/react-email/defaultSchema/styles.d.ts +4 -0
  72. package/types/src/react-email/reactEmailExporter.d.ts +13 -0
  73. package/types/src/react-email/reactEmailExporter.test.d.ts +8 -0
  74. package/types/src/testDocument.d.ts +505 -0
  75. package/types/src/transformer.d.ts +20 -0
  76. package/types/src/util/fileUtil.d.ts +22 -0
  77. package/types/src/util/imageUtil.d.ts +4 -0
  78. package/types/src/yjs/index.d.ts +2 -0
@@ -0,0 +1,559 @@
1
+ export declare const docxDefaultSchemaMappings: {
2
+ blockMapping: import("@blocknote/core").BlockMapping<import("@blocknote/core").BlockSchemaFromSpecs<{
3
+ paragraph: {
4
+ config: {
5
+ type: "paragraph";
6
+ content: "inline";
7
+ propSchema: {
8
+ backgroundColor: {
9
+ default: "default";
10
+ };
11
+ textColor: {
12
+ default: "default";
13
+ };
14
+ textAlignment: {
15
+ default: "left";
16
+ values: readonly ["left", "center", "right", "justify"];
17
+ };
18
+ };
19
+ };
20
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
21
+ type: "paragraph";
22
+ content: "inline";
23
+ propSchema: {
24
+ backgroundColor: {
25
+ default: "default";
26
+ };
27
+ textColor: {
28
+ default: "default";
29
+ };
30
+ textAlignment: {
31
+ default: "left";
32
+ values: readonly ["left", "center", "right", "justify"];
33
+ };
34
+ };
35
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
36
+ };
37
+ heading: {
38
+ config: {
39
+ type: "heading";
40
+ content: "inline";
41
+ propSchema: {
42
+ level: {
43
+ default: number;
44
+ values: readonly [1, 2, 3];
45
+ };
46
+ backgroundColor: {
47
+ default: "default";
48
+ };
49
+ textColor: {
50
+ default: "default";
51
+ };
52
+ textAlignment: {
53
+ default: "left";
54
+ values: readonly ["left", "center", "right", "justify"];
55
+ };
56
+ };
57
+ };
58
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
59
+ type: "heading";
60
+ content: "inline";
61
+ propSchema: {
62
+ level: {
63
+ default: number;
64
+ values: readonly [1, 2, 3];
65
+ };
66
+ backgroundColor: {
67
+ default: "default";
68
+ };
69
+ textColor: {
70
+ default: "default";
71
+ };
72
+ textAlignment: {
73
+ default: "left";
74
+ values: readonly ["left", "center", "right", "justify"];
75
+ };
76
+ };
77
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
78
+ };
79
+ codeBlock: {
80
+ config: {
81
+ type: "codeBlock";
82
+ content: "inline";
83
+ propSchema: {
84
+ language: {
85
+ default: string;
86
+ values: string[];
87
+ };
88
+ };
89
+ };
90
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
91
+ type: "codeBlock";
92
+ content: "inline";
93
+ propSchema: {
94
+ language: {
95
+ default: string;
96
+ values: string[];
97
+ };
98
+ };
99
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
100
+ };
101
+ bulletListItem: {
102
+ config: {
103
+ type: "bulletListItem";
104
+ content: "inline";
105
+ propSchema: {
106
+ backgroundColor: {
107
+ default: "default";
108
+ };
109
+ textColor: {
110
+ default: "default";
111
+ };
112
+ textAlignment: {
113
+ default: "left";
114
+ values: readonly ["left", "center", "right", "justify"];
115
+ };
116
+ };
117
+ };
118
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
119
+ type: "bulletListItem";
120
+ content: "inline";
121
+ propSchema: {
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
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
134
+ };
135
+ numberedListItem: {
136
+ config: {
137
+ type: "numberedListItem";
138
+ content: "inline";
139
+ propSchema: {
140
+ backgroundColor: {
141
+ default: "default";
142
+ };
143
+ textColor: {
144
+ default: "default";
145
+ };
146
+ textAlignment: {
147
+ default: "left";
148
+ values: readonly ["left", "center", "right", "justify"];
149
+ };
150
+ };
151
+ };
152
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
153
+ type: "numberedListItem";
154
+ content: "inline";
155
+ propSchema: {
156
+ backgroundColor: {
157
+ default: "default";
158
+ };
159
+ textColor: {
160
+ default: "default";
161
+ };
162
+ textAlignment: {
163
+ default: "left";
164
+ values: readonly ["left", "center", "right", "justify"];
165
+ };
166
+ };
167
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
168
+ };
169
+ checkListItem: {
170
+ config: {
171
+ type: "checkListItem";
172
+ content: "inline";
173
+ propSchema: {
174
+ checked: {
175
+ default: false;
176
+ };
177
+ backgroundColor: {
178
+ default: "default";
179
+ };
180
+ textColor: {
181
+ default: "default";
182
+ };
183
+ textAlignment: {
184
+ default: "left";
185
+ values: readonly ["left", "center", "right", "justify"];
186
+ };
187
+ };
188
+ };
189
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
190
+ type: "checkListItem";
191
+ content: "inline";
192
+ propSchema: {
193
+ checked: {
194
+ default: false;
195
+ };
196
+ backgroundColor: {
197
+ default: "default";
198
+ };
199
+ textColor: {
200
+ default: "default";
201
+ };
202
+ textAlignment: {
203
+ default: "left";
204
+ values: readonly ["left", "center", "right", "justify"];
205
+ };
206
+ };
207
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
208
+ };
209
+ table: {
210
+ config: {
211
+ type: "table";
212
+ content: "table";
213
+ propSchema: {
214
+ backgroundColor: {
215
+ default: "default";
216
+ };
217
+ textColor: {
218
+ default: "default";
219
+ };
220
+ };
221
+ };
222
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
223
+ type: "table";
224
+ content: "table";
225
+ propSchema: {
226
+ backgroundColor: {
227
+ default: "default";
228
+ };
229
+ textColor: {
230
+ default: "default";
231
+ };
232
+ };
233
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
234
+ };
235
+ file: {
236
+ config: {
237
+ type: "file";
238
+ propSchema: {
239
+ backgroundColor: {
240
+ default: "default";
241
+ };
242
+ name: {
243
+ default: "";
244
+ };
245
+ url: {
246
+ default: "";
247
+ };
248
+ caption: {
249
+ default: "";
250
+ };
251
+ };
252
+ content: "none";
253
+ isFileBlock: true;
254
+ };
255
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
256
+ type: "file";
257
+ propSchema: {
258
+ backgroundColor: {
259
+ default: "default";
260
+ };
261
+ name: {
262
+ default: "";
263
+ };
264
+ url: {
265
+ default: "";
266
+ };
267
+ caption: {
268
+ default: "";
269
+ };
270
+ };
271
+ content: "none";
272
+ isFileBlock: true;
273
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
274
+ };
275
+ image: {
276
+ config: {
277
+ type: "image";
278
+ propSchema: {
279
+ textAlignment: {
280
+ default: "left";
281
+ values: readonly ["left", "center", "right", "justify"];
282
+ };
283
+ backgroundColor: {
284
+ default: "default";
285
+ };
286
+ name: {
287
+ default: "";
288
+ };
289
+ url: {
290
+ default: "";
291
+ };
292
+ caption: {
293
+ default: "";
294
+ };
295
+ showPreview: {
296
+ default: true;
297
+ };
298
+ previewWidth: {
299
+ default: number;
300
+ };
301
+ };
302
+ content: "none";
303
+ isFileBlock: true;
304
+ fileBlockAccept: string[];
305
+ };
306
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
307
+ type: "image";
308
+ propSchema: {
309
+ textAlignment: {
310
+ default: "left";
311
+ values: readonly ["left", "center", "right", "justify"];
312
+ };
313
+ backgroundColor: {
314
+ default: "default";
315
+ };
316
+ name: {
317
+ default: "";
318
+ };
319
+ url: {
320
+ default: "";
321
+ };
322
+ caption: {
323
+ default: "";
324
+ };
325
+ showPreview: {
326
+ default: true;
327
+ };
328
+ previewWidth: {
329
+ default: number;
330
+ };
331
+ };
332
+ content: "none";
333
+ isFileBlock: true;
334
+ fileBlockAccept: string[];
335
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
336
+ };
337
+ video: {
338
+ config: {
339
+ type: "video";
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: "video";
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
+ audio: {
400
+ config: {
401
+ type: "audio";
402
+ propSchema: {
403
+ backgroundColor: {
404
+ default: "default";
405
+ };
406
+ name: {
407
+ default: "";
408
+ };
409
+ url: {
410
+ default: "";
411
+ };
412
+ caption: {
413
+ default: "";
414
+ };
415
+ showPreview: {
416
+ default: true;
417
+ };
418
+ };
419
+ content: "none";
420
+ isFileBlock: true;
421
+ fileBlockAccept: string[];
422
+ };
423
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
424
+ type: "audio";
425
+ propSchema: {
426
+ backgroundColor: {
427
+ default: "default";
428
+ };
429
+ name: {
430
+ default: "";
431
+ };
432
+ url: {
433
+ default: "";
434
+ };
435
+ caption: {
436
+ default: "";
437
+ };
438
+ showPreview: {
439
+ default: true;
440
+ };
441
+ };
442
+ content: "none";
443
+ isFileBlock: true;
444
+ fileBlockAccept: string[];
445
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
446
+ };
447
+ }>, any, any, import("docx").Table | import("docx").Paragraph | import("docx").Paragraph[] | Promise<import("docx").Table | import("docx").Paragraph | import("docx").Paragraph[]>, import("docx").ParagraphChild>;
448
+ inlineContentMapping: import("@blocknote/core").InlineContentMapping<import("@blocknote/core").InlineContentSchemaFromSpecs<{
449
+ text: {
450
+ config: "text";
451
+ implementation: any;
452
+ };
453
+ link: {
454
+ config: "link";
455
+ implementation: any;
456
+ };
457
+ }>, import("@blocknote/core").StyleSchemaFromSpecs<{
458
+ bold: {
459
+ config: {
460
+ type: string;
461
+ propSchema: "boolean";
462
+ };
463
+ implementation: import("@blocknote/core").StyleImplementation;
464
+ };
465
+ italic: {
466
+ config: {
467
+ type: string;
468
+ propSchema: "boolean";
469
+ };
470
+ implementation: import("@blocknote/core").StyleImplementation;
471
+ };
472
+ underline: {
473
+ config: {
474
+ type: string;
475
+ propSchema: "boolean";
476
+ };
477
+ implementation: import("@blocknote/core").StyleImplementation;
478
+ };
479
+ strike: {
480
+ config: {
481
+ type: string;
482
+ propSchema: "boolean";
483
+ };
484
+ implementation: import("@blocknote/core").StyleImplementation;
485
+ };
486
+ code: {
487
+ config: {
488
+ type: string;
489
+ propSchema: "boolean";
490
+ };
491
+ implementation: import("@blocknote/core").StyleImplementation;
492
+ };
493
+ textColor: {
494
+ config: {
495
+ type: string;
496
+ propSchema: "string";
497
+ };
498
+ implementation: import("@blocknote/core").StyleImplementation;
499
+ };
500
+ backgroundColor: {
501
+ config: {
502
+ type: string;
503
+ propSchema: "string";
504
+ };
505
+ implementation: import("@blocknote/core").StyleImplementation;
506
+ };
507
+ }>, import("docx").ParagraphChild, import("docx").TextRun>;
508
+ styleMapping: import("@blocknote/core").StyleMapping<import("@blocknote/core").StyleSchemaFromSpecs<{
509
+ bold: {
510
+ config: {
511
+ type: string;
512
+ propSchema: "boolean";
513
+ };
514
+ implementation: import("@blocknote/core").StyleImplementation;
515
+ };
516
+ italic: {
517
+ config: {
518
+ type: string;
519
+ propSchema: "boolean";
520
+ };
521
+ implementation: import("@blocknote/core").StyleImplementation;
522
+ };
523
+ underline: {
524
+ config: {
525
+ type: string;
526
+ propSchema: "boolean";
527
+ };
528
+ implementation: import("@blocknote/core").StyleImplementation;
529
+ };
530
+ strike: {
531
+ config: {
532
+ type: string;
533
+ propSchema: "boolean";
534
+ };
535
+ implementation: import("@blocknote/core").StyleImplementation;
536
+ };
537
+ code: {
538
+ config: {
539
+ type: string;
540
+ propSchema: "boolean";
541
+ };
542
+ implementation: import("@blocknote/core").StyleImplementation;
543
+ };
544
+ textColor: {
545
+ config: {
546
+ type: string;
547
+ propSchema: "string";
548
+ };
549
+ implementation: import("@blocknote/core").StyleImplementation;
550
+ };
551
+ backgroundColor: {
552
+ config: {
553
+ type: string;
554
+ propSchema: "string";
555
+ };
556
+ implementation: import("@blocknote/core").StyleImplementation;
557
+ };
558
+ }>, import("docx").IRunPropertiesOptions>;
559
+ };
@@ -0,0 +1,4 @@
1
+ import { DefaultInlineContentSchema, DefaultStyleSchema } from "@blocknote/core";
2
+ import { InlineContentMapping } from "@blocknote/core/src/exporter/mapping.js";
3
+ import { ParagraphChild, TextRun } from "docx";
4
+ export declare const docxInlineContentMappingForDefaultSchema: InlineContentMapping<DefaultInlineContentSchema, DefaultStyleSchema, ParagraphChild, TextRun>;
@@ -0,0 +1,4 @@
1
+ import { DefaultStyleSchema } from "@blocknote/core";
2
+ import { StyleMapping } from "@blocknote/core/src/exporter/mapping.js";
3
+ import { IRunPropertiesOptions } from "docx";
4
+ export declare const docxStyleMappingForDefaultSchema: StyleMapping<DefaultStyleSchema, IRunPropertiesOptions>;
@@ -0,0 +1,14 @@
1
+ import { Block, BlockNoteSchema, BlockSchema, InlineContentSchema, StyleSchema, StyledText } from "@blocknote/core";
2
+ import { Document, IRunPropertiesOptions, Paragraph, ParagraphChild, Table, TextRun } from "docx";
3
+ import { Exporter, ExporterOptions } from "@blocknote/core";
4
+ export declare class DOCXExporter<B extends BlockSchema, S extends StyleSchema, I extends InlineContentSchema> extends Exporter<B, I, S, Promise<Paragraph[] | Paragraph | Table> | Paragraph[] | Paragraph | Table, ParagraphChild, IRunPropertiesOptions, TextRun> {
5
+ readonly schema: BlockNoteSchema<B, I, S>;
6
+ readonly mappings: Exporter<NoInfer<B>, NoInfer<I>, NoInfer<S>, Promise<Paragraph[] | Paragraph | Table> | Paragraph[] | Paragraph | Table, ParagraphChild, IRunPropertiesOptions, TextRun>["mappings"];
7
+ constructor(schema: BlockNoteSchema<B, I, S>, mappings: Exporter<NoInfer<B>, NoInfer<I>, NoInfer<S>, Promise<Paragraph[] | Paragraph | Table> | Paragraph[] | Paragraph | Table, ParagraphChild, IRunPropertiesOptions, TextRun>["mappings"], options?: Partial<ExporterOptions>);
8
+ transformStyledText(styledText: StyledText<S>, hyperlink?: boolean): TextRun;
9
+ transformBlocks(blocks: Block<B, I, S>[], nestingLevel?: number): Promise<Array<Paragraph | Table>>;
10
+ getFonts(): Promise<ConstructorParameters<typeof Document>[0]["fonts"]>;
11
+ createDocumentProperties(): Promise<Partial<ConstructorParameters<typeof Document>[0]>>;
12
+ toBlob(blocks: Block<B, I, S>[]): Promise<Blob>;
13
+ toDocxJsDocument(blocks: Block<B, I, S>[]): Promise<Document>;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function getImageDimensions(blob: Blob): Promise<{
2
+ width: number;
3
+ height: number;
4
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from "./defaultSchema/index.js";
2
+ export * from "./docxExporter.js";
@@ -0,0 +1,12 @@
1
+ import { StyleSchema, StyledText } from "@blocknote/core";
2
+ import { ParagraphChild } from "docx";
3
+ export declare function docxInlineContentMappingForDefaultSchema(styledTextTransformer: (styledText: StyledText<StyleSchema>) => ParagraphChild): import("../mapping").InlineContentMapping<import("@blocknote/core").InlineContentSchemaFromSpecs<{
4
+ text: {
5
+ config: "text";
6
+ implementation: any;
7
+ };
8
+ link: {
9
+ config: "link";
10
+ implementation: any;
11
+ };
12
+ }>, StyleSchema, ParagraphChild>;
@@ -0,0 +1,55 @@
1
+ import { StyleSchema, StyledText } from "@blocknote/core";
2
+ import { IRunPropertiesOptions, TextRun } from "docx";
3
+ import { StyleMapping } from "../mapping";
4
+ export declare const docxStyleMappingForDefaultSchema: StyleMapping<import("@blocknote/core").StyleSchemaFromSpecs<{
5
+ bold: {
6
+ config: {
7
+ type: string;
8
+ propSchema: "boolean";
9
+ };
10
+ implementation: import("@blocknote/core").StyleImplementation;
11
+ };
12
+ italic: {
13
+ config: {
14
+ type: string;
15
+ propSchema: "boolean";
16
+ };
17
+ implementation: import("@blocknote/core").StyleImplementation;
18
+ };
19
+ underline: {
20
+ config: {
21
+ type: string;
22
+ propSchema: "boolean";
23
+ };
24
+ implementation: import("@blocknote/core").StyleImplementation;
25
+ };
26
+ strike: {
27
+ config: {
28
+ type: string;
29
+ propSchema: "boolean";
30
+ };
31
+ implementation: import("@blocknote/core").StyleImplementation;
32
+ };
33
+ code: {
34
+ config: {
35
+ type: string;
36
+ propSchema: "boolean";
37
+ };
38
+ implementation: import("@blocknote/core").StyleImplementation;
39
+ };
40
+ textColor: {
41
+ config: {
42
+ type: string;
43
+ propSchema: "string";
44
+ };
45
+ implementation: import("@blocknote/core").StyleImplementation;
46
+ };
47
+ backgroundColor: {
48
+ config: {
49
+ type: string;
50
+ propSchema: "string";
51
+ };
52
+ implementation: import("@blocknote/core").StyleImplementation;
53
+ };
54
+ }>, IRunPropertiesOptions>;
55
+ export declare function createDocxStyledTextTransformer<S extends StyleSchema>(mapping: StyleMapping<S, IRunPropertiesOptions>): (styledText: StyledText<S>) => TextRun;
@@ -0,0 +1,4 @@
1
+ import { InlineContentSchema, TableContent } from "@blocknote/core";
2
+ import { Exporter } from "@blocknote/core/src/exporter/Exporter.js";
3
+ import { Table as DocxTable, ParagraphChild } from "docx";
4
+ export declare const Table: (data: TableContent<InlineContentSchema>, t: Exporter<any, any, any, any, ParagraphChild, any, any>) => DocxTable;