@blocknote/xl-pdf-exporter 0.26.0 → 0.27.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.
@@ -1,529 +1,8 @@
1
- /// <reference types="react" />
1
+ import { pdfBlockMappingForDefaultSchema } from "./blocks.js";
2
+ import { pdfInlineContentMappingForDefaultSchema } from "./inlinecontent.js";
3
+ import { pdfStyleMappingForDefaultSchema } from "./styles.js";
2
4
  export declare const pdfDefaultSchemaMappings: {
3
- blockMapping: import("@blocknote/core").BlockMapping<import("@blocknote/core").BlockSchemaFromSpecs<{
4
- paragraph: {
5
- config: {
6
- type: "paragraph";
7
- content: "inline";
8
- propSchema: {
9
- backgroundColor: {
10
- default: "default";
11
- };
12
- textColor: {
13
- default: "default";
14
- };
15
- textAlignment: {
16
- default: "left";
17
- values: readonly ["left", "center", "right", "justify"];
18
- };
19
- };
20
- };
21
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
22
- type: "paragraph";
23
- content: "inline";
24
- propSchema: {
25
- backgroundColor: {
26
- default: "default";
27
- };
28
- textColor: {
29
- default: "default";
30
- };
31
- textAlignment: {
32
- default: "left";
33
- values: readonly ["left", "center", "right", "justify"];
34
- };
35
- };
36
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
37
- };
38
- heading: {
39
- config: {
40
- type: "heading";
41
- content: "inline";
42
- propSchema: {
43
- level: {
44
- default: number;
45
- values: readonly [1, 2, 3];
46
- };
47
- backgroundColor: {
48
- default: "default";
49
- };
50
- textColor: {
51
- default: "default";
52
- };
53
- textAlignment: {
54
- default: "left";
55
- values: readonly ["left", "center", "right", "justify"];
56
- };
57
- };
58
- };
59
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
60
- type: "heading";
61
- content: "inline";
62
- propSchema: {
63
- level: {
64
- default: number;
65
- values: readonly [1, 2, 3];
66
- };
67
- backgroundColor: {
68
- default: "default";
69
- };
70
- textColor: {
71
- default: "default";
72
- };
73
- textAlignment: {
74
- default: "left";
75
- values: readonly ["left", "center", "right", "justify"];
76
- };
77
- };
78
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
79
- };
80
- codeBlock: {
81
- config: {
82
- type: "codeBlock";
83
- content: "inline";
84
- propSchema: {
85
- language: {
86
- default: string;
87
- values: string[];
88
- };
89
- };
90
- };
91
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
92
- type: "codeBlock";
93
- content: "inline";
94
- propSchema: {
95
- language: {
96
- default: string;
97
- values: string[];
98
- };
99
- };
100
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
101
- };
102
- bulletListItem: {
103
- config: {
104
- type: "bulletListItem";
105
- content: "inline";
106
- propSchema: {
107
- backgroundColor: {
108
- default: "default";
109
- };
110
- textColor: {
111
- default: "default";
112
- };
113
- textAlignment: {
114
- default: "left";
115
- values: readonly ["left", "center", "right", "justify"];
116
- };
117
- };
118
- };
119
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
120
- type: "bulletListItem";
121
- content: "inline";
122
- propSchema: {
123
- backgroundColor: {
124
- default: "default";
125
- };
126
- textColor: {
127
- default: "default";
128
- };
129
- textAlignment: {
130
- default: "left";
131
- values: readonly ["left", "center", "right", "justify"];
132
- };
133
- };
134
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
135
- };
136
- numberedListItem: {
137
- config: {
138
- type: "numberedListItem";
139
- content: "inline";
140
- propSchema: {
141
- start: {
142
- default: undefined;
143
- type: "number";
144
- };
145
- backgroundColor: {
146
- default: "default";
147
- };
148
- textColor: {
149
- default: "default";
150
- };
151
- textAlignment: {
152
- default: "left";
153
- values: readonly ["left", "center", "right", "justify"];
154
- };
155
- };
156
- };
157
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
158
- type: "numberedListItem";
159
- content: "inline";
160
- propSchema: {
161
- start: {
162
- default: undefined;
163
- type: "number";
164
- };
165
- backgroundColor: {
166
- default: "default";
167
- };
168
- textColor: {
169
- default: "default";
170
- };
171
- textAlignment: {
172
- default: "left";
173
- values: readonly ["left", "center", "right", "justify"];
174
- };
175
- };
176
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
177
- };
178
- checkListItem: {
179
- config: {
180
- type: "checkListItem";
181
- content: "inline";
182
- propSchema: {
183
- checked: {
184
- default: false;
185
- };
186
- backgroundColor: {
187
- default: "default";
188
- };
189
- textColor: {
190
- default: "default";
191
- };
192
- textAlignment: {
193
- default: "left";
194
- values: readonly ["left", "center", "right", "justify"];
195
- };
196
- };
197
- };
198
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
199
- type: "checkListItem";
200
- content: "inline";
201
- propSchema: {
202
- checked: {
203
- default: false;
204
- };
205
- backgroundColor: {
206
- default: "default";
207
- };
208
- textColor: {
209
- default: "default";
210
- };
211
- textAlignment: {
212
- default: "left";
213
- values: readonly ["left", "center", "right", "justify"];
214
- };
215
- };
216
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
217
- };
218
- table: {
219
- config: {
220
- type: "table";
221
- content: "table";
222
- propSchema: {
223
- textColor: {
224
- default: "default";
225
- };
226
- };
227
- };
228
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
229
- type: "table";
230
- content: "table";
231
- propSchema: {
232
- textColor: {
233
- default: "default";
234
- };
235
- };
236
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
237
- };
238
- file: {
239
- config: {
240
- type: "file";
241
- propSchema: {
242
- backgroundColor: {
243
- default: "default";
244
- };
245
- name: {
246
- default: "";
247
- };
248
- url: {
249
- default: "";
250
- };
251
- caption: {
252
- default: "";
253
- };
254
- };
255
- content: "none";
256
- isFileBlock: true;
257
- };
258
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
259
- type: "file";
260
- propSchema: {
261
- backgroundColor: {
262
- default: "default";
263
- };
264
- name: {
265
- default: "";
266
- };
267
- url: {
268
- default: "";
269
- };
270
- caption: {
271
- default: "";
272
- };
273
- };
274
- content: "none";
275
- isFileBlock: true;
276
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
277
- };
278
- image: {
279
- config: {
280
- type: "image";
281
- propSchema: {
282
- textAlignment: {
283
- default: "left";
284
- values: readonly ["left", "center", "right", "justify"];
285
- };
286
- backgroundColor: {
287
- default: "default";
288
- };
289
- name: {
290
- default: "";
291
- };
292
- url: {
293
- default: "";
294
- };
295
- caption: {
296
- default: "";
297
- };
298
- showPreview: {
299
- default: true;
300
- };
301
- previewWidth: {
302
- default: number;
303
- };
304
- };
305
- content: "none";
306
- isFileBlock: true;
307
- fileBlockAccept: string[];
308
- };
309
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
310
- type: "image";
311
- propSchema: {
312
- textAlignment: {
313
- default: "left";
314
- values: readonly ["left", "center", "right", "justify"];
315
- };
316
- backgroundColor: {
317
- default: "default";
318
- };
319
- name: {
320
- default: "";
321
- };
322
- url: {
323
- default: "";
324
- };
325
- caption: {
326
- default: "";
327
- };
328
- showPreview: {
329
- default: true;
330
- };
331
- previewWidth: {
332
- default: number;
333
- };
334
- };
335
- content: "none";
336
- isFileBlock: true;
337
- fileBlockAccept: string[];
338
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
339
- };
340
- video: {
341
- config: {
342
- type: "video";
343
- propSchema: {
344
- textAlignment: {
345
- default: "left";
346
- values: readonly ["left", "center", "right", "justify"];
347
- };
348
- backgroundColor: {
349
- default: "default";
350
- };
351
- name: {
352
- default: "";
353
- };
354
- url: {
355
- default: "";
356
- };
357
- caption: {
358
- default: "";
359
- };
360
- showPreview: {
361
- default: true;
362
- };
363
- previewWidth: {
364
- default: number;
365
- };
366
- };
367
- content: "none";
368
- isFileBlock: true;
369
- fileBlockAccept: string[];
370
- };
371
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
372
- type: "video";
373
- propSchema: {
374
- textAlignment: {
375
- default: "left";
376
- values: readonly ["left", "center", "right", "justify"];
377
- };
378
- backgroundColor: {
379
- default: "default";
380
- };
381
- name: {
382
- default: "";
383
- };
384
- url: {
385
- default: "";
386
- };
387
- caption: {
388
- default: "";
389
- };
390
- showPreview: {
391
- default: true;
392
- };
393
- previewWidth: {
394
- default: number;
395
- };
396
- };
397
- content: "none";
398
- isFileBlock: true;
399
- fileBlockAccept: string[];
400
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
401
- };
402
- audio: {
403
- config: {
404
- type: "audio";
405
- propSchema: {
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
- };
422
- content: "none";
423
- isFileBlock: true;
424
- fileBlockAccept: string[];
425
- };
426
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
427
- type: "audio";
428
- propSchema: {
429
- backgroundColor: {
430
- default: "default";
431
- };
432
- name: {
433
- default: "";
434
- };
435
- url: {
436
- default: "";
437
- };
438
- caption: {
439
- default: "";
440
- };
441
- showPreview: {
442
- default: true;
443
- };
444
- };
445
- content: "none";
446
- isFileBlock: true;
447
- fileBlockAccept: string[];
448
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
449
- };
450
- }> & import("@blocknote/core").BlockSchemaFromSpecs<{
451
- pageBreak: {
452
- config: {
453
- type: "pageBreak";
454
- propSchema: {};
455
- content: "none";
456
- isFileBlock: false;
457
- isSelectable: false;
458
- };
459
- implementation: import("@blocknote/core").TiptapBlockImplementation<{
460
- type: "pageBreak";
461
- propSchema: {};
462
- content: "none";
463
- isFileBlock: false;
464
- isSelectable: false;
465
- }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
466
- };
467
- }>, any, any, import("react").ReactElement<import("@react-pdf/renderer").Text, string | import("react").JSXElementConstructor<any>>, import("react").ReactElement<import("@react-pdf/renderer").Text, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("@react-pdf/renderer").Link, string | import("react").JSXElementConstructor<any>>>;
468
- inlineContentMapping: import("@blocknote/core").InlineContentMapping<import("@blocknote/core").InlineContentSchemaFromSpecs<{
469
- text: {
470
- config: "text";
471
- implementation: any;
472
- };
473
- link: {
474
- config: "link";
475
- implementation: any;
476
- };
477
- }>, any, import("react").ReactElement<import("@react-pdf/renderer").Text, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("@react-pdf/renderer").Link, string | import("react").JSXElementConstructor<any>>, import("react").ReactElement<import("@react-pdf/renderer").Text, string | import("react").JSXElementConstructor<any>>>;
478
- styleMapping: import("@blocknote/core").StyleMapping<import("@blocknote/core").StyleSchemaFromSpecs<{
479
- bold: {
480
- config: {
481
- type: string;
482
- propSchema: "boolean";
483
- };
484
- implementation: import("@blocknote/core").StyleImplementation;
485
- };
486
- italic: {
487
- config: {
488
- type: string;
489
- propSchema: "boolean";
490
- };
491
- implementation: import("@blocknote/core").StyleImplementation;
492
- };
493
- underline: {
494
- config: {
495
- type: string;
496
- propSchema: "boolean";
497
- };
498
- implementation: import("@blocknote/core").StyleImplementation;
499
- };
500
- strike: {
501
- config: {
502
- type: string;
503
- propSchema: "boolean";
504
- };
505
- implementation: import("@blocknote/core").StyleImplementation;
506
- };
507
- code: {
508
- config: {
509
- type: string;
510
- propSchema: "boolean";
511
- };
512
- implementation: import("@blocknote/core").StyleImplementation;
513
- };
514
- textColor: {
515
- config: {
516
- type: string;
517
- propSchema: "string";
518
- };
519
- implementation: import("@blocknote/core").StyleImplementation;
520
- };
521
- backgroundColor: {
522
- config: {
523
- type: string;
524
- propSchema: "string";
525
- };
526
- implementation: import("@blocknote/core").StyleImplementation;
527
- };
528
- }>, import("@react-pdf/stylesheet").Style | import("@react-pdf/stylesheet").Style[] | undefined>;
5
+ blockMapping: typeof pdfBlockMappingForDefaultSchema;
6
+ inlineContentMapping: typeof pdfInlineContentMappingForDefaultSchema;
7
+ styleMapping: typeof pdfStyleMappingForDefaultSchema;
529
8
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultInlineContentSchema, InlineContentMapping } from "@blocknote/core";
3
2
  import { Link, Text } from "@react-pdf/renderer";
4
3
  export declare const pdfInlineContentMappingForDefaultSchema: InlineContentMapping<DefaultInlineContentSchema, any, React.ReactElement<Link> | React.ReactElement<Text>, React.ReactElement<Text>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Block, BlockNoteSchema, BlockSchema, DefaultProps, Exporter, ExporterOptions, InlineContentSchema, StyleSchema, StyledText } from "@blocknote/core";
3
2
  import { Font, Link, Text, TextProps } from "@react-pdf/renderer";
4
3
  import { Style } from "./types.js";
@@ -53,7 +52,7 @@ export declare class PDFExporter<B extends BlockSchema, S extends StyleSchema, I
53
52
  /**
54
53
  * Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
55
54
  */
56
- transformStyledText(styledText: StyledText<S>): import("react/jsx-runtime").JSX.Element;
55
+ transformStyledText(styledText: StyledText<S>): import("react/jsx-runtime.js").JSX.Element;
57
56
  /**
58
57
  * Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
59
58
  */
@@ -74,7 +73,7 @@ export declare class PDFExporter<B extends BlockSchema, S extends StyleSchema, I
74
73
  * The React component passed must be a React-PDF component
75
74
  */
76
75
  footer?: React.ReactElement;
77
- }): Promise<import("react/jsx-runtime").JSX.Element>;
76
+ }): Promise<import("react/jsx-runtime.js").JSX.Element>;
78
77
  protected blocknoteDefaultPropsToReactPDFStyle(props: Partial<DefaultProps>): Style;
79
78
  }
80
79
  export {};
@@ -1,9 +1,9 @@
1
1
  import { Style } from "../types.js";
2
2
  export declare const BULLET_MARKER = "\u2022";
3
- export declare const CHECK_MARKER_UNCHECKED: import("react/jsx-runtime").JSX.Element;
4
- export declare const CHECK_MARKER_CHECKED: import("react/jsx-runtime").JSX.Element;
3
+ export declare const CHECK_MARKER_UNCHECKED: import("react/jsx-runtime.js").JSX.Element;
4
+ export declare const CHECK_MARKER_CHECKED: import("react/jsx-runtime.js").JSX.Element;
5
5
  export declare const ListItem: ({ listMarker, children, style, }: {
6
6
  listMarker: string | React.ReactNode;
7
7
  children: React.ReactNode;
8
8
  style?: Style;
9
- }) => import("react/jsx-runtime").JSX.Element;
9
+ }) => import("react/jsx-runtime.js").JSX.Element;