@blocknote/xl-pdf-exporter 0.19.0 → 0.19.2

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,505 +0,0 @@
1
- export declare const testDocument: import("@blocknote/core").Block<import("@blocknote/core").BlockSchemaFromSpecs<{
2
- paragraph: {
3
- config: {
4
- type: "paragraph";
5
- content: "inline";
6
- propSchema: {
7
- backgroundColor: {
8
- default: "default";
9
- };
10
- textColor: {
11
- default: "default";
12
- };
13
- textAlignment: {
14
- default: "left";
15
- values: readonly ["left", "center", "right", "justify"];
16
- };
17
- };
18
- };
19
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
20
- type: "paragraph";
21
- content: "inline";
22
- propSchema: {
23
- backgroundColor: {
24
- default: "default";
25
- };
26
- textColor: {
27
- default: "default";
28
- };
29
- textAlignment: {
30
- default: "left";
31
- values: readonly ["left", "center", "right", "justify"];
32
- };
33
- };
34
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
35
- };
36
- heading: {
37
- config: {
38
- type: "heading";
39
- content: "inline";
40
- propSchema: {
41
- level: {
42
- default: number;
43
- values: readonly [1, 2, 3];
44
- };
45
- backgroundColor: {
46
- default: "default";
47
- };
48
- textColor: {
49
- default: "default";
50
- };
51
- textAlignment: {
52
- default: "left";
53
- values: readonly ["left", "center", "right", "justify"];
54
- };
55
- };
56
- };
57
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
58
- type: "heading";
59
- content: "inline";
60
- propSchema: {
61
- level: {
62
- default: number;
63
- values: readonly [1, 2, 3];
64
- };
65
- backgroundColor: {
66
- default: "default";
67
- };
68
- textColor: {
69
- default: "default";
70
- };
71
- textAlignment: {
72
- default: "left";
73
- values: readonly ["left", "center", "right", "justify"];
74
- };
75
- };
76
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
77
- };
78
- codeBlock: {
79
- config: {
80
- type: "codeBlock";
81
- content: "inline";
82
- propSchema: {
83
- language: {
84
- default: string;
85
- values: string[];
86
- };
87
- };
88
- };
89
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
90
- type: "codeBlock";
91
- content: "inline";
92
- propSchema: {
93
- language: {
94
- default: string;
95
- values: string[];
96
- };
97
- };
98
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
99
- };
100
- bulletListItem: {
101
- config: {
102
- type: "bulletListItem";
103
- content: "inline";
104
- propSchema: {
105
- backgroundColor: {
106
- default: "default";
107
- };
108
- textColor: {
109
- default: "default";
110
- };
111
- textAlignment: {
112
- default: "left";
113
- values: readonly ["left", "center", "right", "justify"];
114
- };
115
- };
116
- };
117
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
118
- type: "bulletListItem";
119
- content: "inline";
120
- propSchema: {
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
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
133
- };
134
- numberedListItem: {
135
- config: {
136
- type: "numberedListItem";
137
- content: "inline";
138
- propSchema: {
139
- backgroundColor: {
140
- default: "default";
141
- };
142
- textColor: {
143
- default: "default";
144
- };
145
- textAlignment: {
146
- default: "left";
147
- values: readonly ["left", "center", "right", "justify"];
148
- };
149
- };
150
- };
151
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
152
- type: "numberedListItem";
153
- content: "inline";
154
- propSchema: {
155
- backgroundColor: {
156
- default: "default";
157
- };
158
- textColor: {
159
- default: "default";
160
- };
161
- textAlignment: {
162
- default: "left";
163
- values: readonly ["left", "center", "right", "justify"];
164
- };
165
- };
166
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
167
- };
168
- checkListItem: {
169
- config: {
170
- type: "checkListItem";
171
- content: "inline";
172
- propSchema: {
173
- checked: {
174
- default: false;
175
- };
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
- };
188
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
189
- type: "checkListItem";
190
- content: "inline";
191
- propSchema: {
192
- checked: {
193
- default: false;
194
- };
195
- backgroundColor: {
196
- default: "default";
197
- };
198
- textColor: {
199
- default: "default";
200
- };
201
- textAlignment: {
202
- default: "left";
203
- values: readonly ["left", "center", "right", "justify"];
204
- };
205
- };
206
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
207
- };
208
- table: {
209
- config: {
210
- type: "table";
211
- content: "table";
212
- propSchema: {
213
- backgroundColor: {
214
- default: "default";
215
- };
216
- textColor: {
217
- default: "default";
218
- };
219
- };
220
- };
221
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
222
- type: "table";
223
- content: "table";
224
- propSchema: {
225
- backgroundColor: {
226
- default: "default";
227
- };
228
- textColor: {
229
- default: "default";
230
- };
231
- };
232
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
233
- };
234
- file: {
235
- config: {
236
- type: "file";
237
- propSchema: {
238
- backgroundColor: {
239
- default: "default";
240
- };
241
- name: {
242
- default: "";
243
- };
244
- url: {
245
- default: "";
246
- };
247
- caption: {
248
- default: "";
249
- };
250
- };
251
- content: "none";
252
- isFileBlock: true;
253
- };
254
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
255
- type: "file";
256
- propSchema: {
257
- backgroundColor: {
258
- default: "default";
259
- };
260
- name: {
261
- default: "";
262
- };
263
- url: {
264
- default: "";
265
- };
266
- caption: {
267
- default: "";
268
- };
269
- };
270
- content: "none";
271
- isFileBlock: true;
272
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
273
- };
274
- image: {
275
- config: {
276
- type: "image";
277
- propSchema: {
278
- textAlignment: {
279
- default: "left";
280
- values: readonly ["left", "center", "right", "justify"];
281
- };
282
- backgroundColor: {
283
- default: "default";
284
- };
285
- name: {
286
- default: "";
287
- };
288
- url: {
289
- default: "";
290
- };
291
- caption: {
292
- default: "";
293
- };
294
- showPreview: {
295
- default: true;
296
- };
297
- previewWidth: {
298
- default: number;
299
- };
300
- };
301
- content: "none";
302
- isFileBlock: true;
303
- fileBlockAccept: string[];
304
- };
305
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
306
- type: "image";
307
- propSchema: {
308
- textAlignment: {
309
- default: "left";
310
- values: readonly ["left", "center", "right", "justify"];
311
- };
312
- backgroundColor: {
313
- default: "default";
314
- };
315
- name: {
316
- default: "";
317
- };
318
- url: {
319
- default: "";
320
- };
321
- caption: {
322
- default: "";
323
- };
324
- showPreview: {
325
- default: true;
326
- };
327
- previewWidth: {
328
- default: number;
329
- };
330
- };
331
- content: "none";
332
- isFileBlock: true;
333
- fileBlockAccept: string[];
334
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
335
- };
336
- video: {
337
- config: {
338
- type: "video";
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: "video";
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
- audio: {
399
- config: {
400
- type: "audio";
401
- propSchema: {
402
- backgroundColor: {
403
- default: "default";
404
- };
405
- name: {
406
- default: "";
407
- };
408
- url: {
409
- default: "";
410
- };
411
- caption: {
412
- default: "";
413
- };
414
- showPreview: {
415
- default: true;
416
- };
417
- };
418
- content: "none";
419
- isFileBlock: true;
420
- fileBlockAccept: string[];
421
- };
422
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
423
- type: "audio";
424
- propSchema: {
425
- backgroundColor: {
426
- default: "default";
427
- };
428
- name: {
429
- default: "";
430
- };
431
- url: {
432
- default: "";
433
- };
434
- caption: {
435
- default: "";
436
- };
437
- showPreview: {
438
- default: true;
439
- };
440
- };
441
- content: "none";
442
- isFileBlock: true;
443
- fileBlockAccept: string[];
444
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
445
- };
446
- }>, import("@blocknote/core").InlineContentSchemaFromSpecs<{
447
- text: {
448
- config: "text";
449
- implementation: any;
450
- };
451
- link: {
452
- config: "link";
453
- implementation: any;
454
- };
455
- }>, import("@blocknote/core").StyleSchemaFromSpecs<{
456
- bold: {
457
- config: {
458
- type: string;
459
- propSchema: "boolean";
460
- };
461
- implementation: import("@blocknote/core").StyleImplementation;
462
- };
463
- italic: {
464
- config: {
465
- type: string;
466
- propSchema: "boolean";
467
- };
468
- implementation: import("@blocknote/core").StyleImplementation;
469
- };
470
- underline: {
471
- config: {
472
- type: string;
473
- propSchema: "boolean";
474
- };
475
- implementation: import("@blocknote/core").StyleImplementation;
476
- };
477
- strike: {
478
- config: {
479
- type: string;
480
- propSchema: "boolean";
481
- };
482
- implementation: import("@blocknote/core").StyleImplementation;
483
- };
484
- code: {
485
- config: {
486
- type: string;
487
- propSchema: "boolean";
488
- };
489
- implementation: import("@blocknote/core").StyleImplementation;
490
- };
491
- textColor: {
492
- config: {
493
- type: string;
494
- propSchema: "string";
495
- };
496
- implementation: import("@blocknote/core").StyleImplementation;
497
- };
498
- backgroundColor: {
499
- config: {
500
- type: string;
501
- propSchema: "string";
502
- };
503
- implementation: import("@blocknote/core").StyleImplementation;
504
- };
505
- }>>[];
@@ -1,20 +0,0 @@
1
- import { BlockFromConfig, BlockNoteSchema, BlockSchema, InlineContent, InlineContentSchema, StyleSchema, StyledText, Styles } from "@blocknote/core";
2
- import { BlockMapping, InlineContentMapping, StyleMapping } from "./mapping.js";
3
- export declare abstract class Transformer<B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, RB, RI, RS, TS> {
4
- readonly mappings: {
5
- blockMapping: BlockMapping<B, I, S, RB, RI>;
6
- inlineContentMapping: InlineContentMapping<I, S, RI, TS>;
7
- styleMapping: StyleMapping<S, RS>;
8
- };
9
- constructor(_schema: BlockNoteSchema<B, I, S>, // only used for type inference
10
- mappings: {
11
- blockMapping: BlockMapping<B, I, S, RB, RI>;
12
- inlineContentMapping: InlineContentMapping<I, S, RI, TS>;
13
- styleMapping: StyleMapping<S, RS>;
14
- });
15
- mapStyles(styles: Styles<S>): RS[];
16
- mapInlineContent(inlineContent: InlineContent<I, S>): RI;
17
- transformInlineContent(inlineContentArray: InlineContent<I, S>[]): RI[];
18
- abstract transformStyledText(styledText: StyledText<S>): TS;
19
- mapBlock(block: BlockFromConfig<B[keyof B], I, S>, nestingLevel: number, numberedListIndex: number): RB;
20
- }
@@ -1,22 +0,0 @@
1
- /**
2
- *
3
- * Helper functions so that we can import files both on vitest, browser and node
4
- * TODO: should find a way to test automatically in all environments
5
- */
6
- /// <reference types="node" />
7
- export declare function loadFileDataUrl(requireUrl: {
8
- default: string;
9
- }, mimeType: string): Promise<string>;
10
- export declare function loadFontDataUrl(requireUrl: {
11
- default: string;
12
- }): Promise<string>;
13
- export declare function loadFileBuffer(requireUrl: {
14
- default: string;
15
- }): Promise<Buffer | ArrayBuffer>;
16
- /**
17
- * usage:
18
- *
19
- * await loadFontDataUrl(
20
- await import("../fonts/inter/Inter_18pt-Italic.ttf")
21
- );
22
- */
@@ -1,4 +0,0 @@
1
- export declare function getImageDimensions(blob: Blob): Promise<{
2
- width: number;
3
- height: number;
4
- }>;
@@ -1,2 +0,0 @@
1
- import { yDocToProsemirrorJSON, yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
2
- export { yDocToProsemirrorJSON, yXmlFragmentToProsemirrorJSON };