@blocknote/xl-pdf-exporter 0.19.0 → 0.19.1

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 (41) hide show
  1. package/dist/webpack-stats.json +1 -1
  2. package/package.json +4 -4
  3. package/types/src/pdf/defaultSchema/index.d.ts +0 -6
  4. package/types/src/Exporter.d.ts +0 -26
  5. package/types/src/context/BlockNoteContext.d.ts +0 -59
  6. package/types/src/context/BlockNoteContext.test.d.ts +0 -1
  7. package/types/src/context/ServerBlockNoteEditor.d.ts +0 -137
  8. package/types/src/context/ServerBlockNoteEditor.test.d.ts +0 -1
  9. package/types/src/context/react/ReactServer.test.d.ts +0 -2
  10. package/types/src/docx/blocks.d.ts +0 -433
  11. package/types/src/docx/defaultSchema/blocks.d.ts +0 -4
  12. package/types/src/docx/defaultSchema/index.d.ts +0 -559
  13. package/types/src/docx/defaultSchema/inlinecontent.d.ts +0 -4
  14. package/types/src/docx/defaultSchema/styles.d.ts +0 -4
  15. package/types/src/docx/docxExporter.d.ts +0 -14
  16. package/types/src/docx/docxExporter.test.d.ts +0 -1
  17. package/types/src/docx/imageUtil.d.ts +0 -4
  18. package/types/src/docx/index.d.ts +0 -2
  19. package/types/src/docx/inlinecontent.d.ts +0 -12
  20. package/types/src/docx/styles.d.ts +0 -55
  21. package/types/src/docx/util/Table.d.ts +0 -4
  22. package/types/src/docxExporter.d.ts +0 -255
  23. package/types/src/docxExporter.test.d.ts +0 -1
  24. package/types/src/mapping.d.ts +0 -29
  25. package/types/src/pdf/blocks.d.ts +0 -434
  26. package/types/src/pdf/inlinecontent.d.ts +0 -13
  27. package/types/src/pdf/styles.d.ts +0 -55
  28. package/types/src/pdf/util/loadFontDataUrl.d.ts +0 -3
  29. package/types/src/pdfExporter.d.ts +0 -256
  30. package/types/src/pdfExporter.test.d.ts +0 -1
  31. package/types/src/react-email/defaultSchema/blocks.d.ts +0 -5
  32. package/types/src/react-email/defaultSchema/index.d.ts +0 -560
  33. package/types/src/react-email/defaultSchema/inlinecontent.d.ts +0 -5
  34. package/types/src/react-email/defaultSchema/styles.d.ts +0 -4
  35. package/types/src/react-email/reactEmailExporter.d.ts +0 -13
  36. package/types/src/react-email/reactEmailExporter.test.d.ts +0 -8
  37. package/types/src/testDocument.d.ts +0 -505
  38. package/types/src/transformer.d.ts +0 -20
  39. package/types/src/util/fileUtil.d.ts +0 -22
  40. package/types/src/util/imageUtil.d.ts +0 -4
  41. package/types/src/yjs/index.d.ts +0 -2
@@ -1,559 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
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>;
@@ -1,4 +0,0 @@
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>;
@@ -1,14 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export declare function getImageDimensions(blob: Blob): Promise<{
2
- width: number;
3
- height: number;
4
- }>;
@@ -1,2 +0,0 @@
1
- export * from "./defaultSchema/index.js";
2
- export * from "./docxExporter.js";
@@ -1,12 +0,0 @@
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>;
@@ -1,55 +0,0 @@
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;
@@ -1,4 +0,0 @@
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;