@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.
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/types/src/pdf/defaultSchema/index.d.ts +0 -6
- package/types/src/Exporter.d.ts +0 -26
- package/types/src/context/BlockNoteContext.d.ts +0 -59
- package/types/src/context/BlockNoteContext.test.d.ts +0 -1
- package/types/src/context/ServerBlockNoteEditor.d.ts +0 -137
- package/types/src/context/ServerBlockNoteEditor.test.d.ts +0 -1
- package/types/src/context/react/ReactServer.test.d.ts +0 -2
- package/types/src/docx/blocks.d.ts +0 -433
- package/types/src/docx/defaultSchema/blocks.d.ts +0 -4
- package/types/src/docx/defaultSchema/index.d.ts +0 -559
- package/types/src/docx/defaultSchema/inlinecontent.d.ts +0 -4
- package/types/src/docx/defaultSchema/styles.d.ts +0 -4
- package/types/src/docx/docxExporter.d.ts +0 -14
- package/types/src/docx/docxExporter.test.d.ts +0 -1
- package/types/src/docx/imageUtil.d.ts +0 -4
- package/types/src/docx/index.d.ts +0 -2
- package/types/src/docx/inlinecontent.d.ts +0 -12
- package/types/src/docx/styles.d.ts +0 -55
- package/types/src/docx/util/Table.d.ts +0 -4
- package/types/src/docxExporter.d.ts +0 -255
- package/types/src/docxExporter.test.d.ts +0 -1
- package/types/src/mapping.d.ts +0 -29
- package/types/src/pdf/blocks.d.ts +0 -434
- package/types/src/pdf/inlinecontent.d.ts +0 -13
- package/types/src/pdf/styles.d.ts +0 -55
- package/types/src/pdf/util/loadFontDataUrl.d.ts +0 -3
- package/types/src/pdfExporter.d.ts +0 -256
- package/types/src/pdfExporter.test.d.ts +0 -1
- package/types/src/react-email/defaultSchema/blocks.d.ts +0 -5
- package/types/src/react-email/defaultSchema/index.d.ts +0 -560
- package/types/src/react-email/defaultSchema/inlinecontent.d.ts +0 -5
- package/types/src/react-email/defaultSchema/styles.d.ts +0 -4
- package/types/src/react-email/reactEmailExporter.d.ts +0 -13
- package/types/src/react-email/reactEmailExporter.test.d.ts +0 -8
- package/types/src/testDocument.d.ts +0 -505
- package/types/src/transformer.d.ts +0 -20
- package/types/src/util/fileUtil.d.ts +0 -22
- package/types/src/util/imageUtil.d.ts +0 -4
- package/types/src/yjs/index.d.ts +0 -2
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { Block } from "@blocknote/core";
|
|
2
|
-
import { Paragraph, TextRun } from "docx";
|
|
3
|
-
export declare function createDocxExporterForDefaultSchema(): {
|
|
4
|
-
util: {
|
|
5
|
-
blockTransformer: (block: import("@blocknote/core").BlockFromConfig<{
|
|
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
|
-
type: "heading";
|
|
22
|
-
content: "inline";
|
|
23
|
-
propSchema: {
|
|
24
|
-
level: {
|
|
25
|
-
default: number;
|
|
26
|
-
values: readonly [1, 2, 3];
|
|
27
|
-
};
|
|
28
|
-
backgroundColor: {
|
|
29
|
-
default: "default";
|
|
30
|
-
};
|
|
31
|
-
textColor: {
|
|
32
|
-
default: "default";
|
|
33
|
-
};
|
|
34
|
-
textAlignment: {
|
|
35
|
-
default: "left";
|
|
36
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
} | {
|
|
40
|
-
type: "bulletListItem";
|
|
41
|
-
content: "inline";
|
|
42
|
-
propSchema: {
|
|
43
|
-
backgroundColor: {
|
|
44
|
-
default: "default";
|
|
45
|
-
};
|
|
46
|
-
textColor: {
|
|
47
|
-
default: "default";
|
|
48
|
-
};
|
|
49
|
-
textAlignment: {
|
|
50
|
-
default: "left";
|
|
51
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
} | {
|
|
55
|
-
type: "numberedListItem";
|
|
56
|
-
content: "inline";
|
|
57
|
-
propSchema: {
|
|
58
|
-
backgroundColor: {
|
|
59
|
-
default: "default";
|
|
60
|
-
};
|
|
61
|
-
textColor: {
|
|
62
|
-
default: "default";
|
|
63
|
-
};
|
|
64
|
-
textAlignment: {
|
|
65
|
-
default: "left";
|
|
66
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
} | {
|
|
70
|
-
type: "checkListItem";
|
|
71
|
-
content: "inline";
|
|
72
|
-
propSchema: {
|
|
73
|
-
checked: {
|
|
74
|
-
default: false;
|
|
75
|
-
};
|
|
76
|
-
backgroundColor: {
|
|
77
|
-
default: "default";
|
|
78
|
-
};
|
|
79
|
-
textColor: {
|
|
80
|
-
default: "default";
|
|
81
|
-
};
|
|
82
|
-
textAlignment: {
|
|
83
|
-
default: "left";
|
|
84
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
} | {
|
|
88
|
-
type: "table";
|
|
89
|
-
content: "table";
|
|
90
|
-
propSchema: {
|
|
91
|
-
backgroundColor: {
|
|
92
|
-
default: "default";
|
|
93
|
-
};
|
|
94
|
-
textColor: {
|
|
95
|
-
default: "default";
|
|
96
|
-
};
|
|
97
|
-
textAlignment: {
|
|
98
|
-
default: "left";
|
|
99
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
} | {
|
|
103
|
-
type: "file";
|
|
104
|
-
propSchema: {
|
|
105
|
-
backgroundColor: {
|
|
106
|
-
default: "default";
|
|
107
|
-
};
|
|
108
|
-
name: {
|
|
109
|
-
default: "";
|
|
110
|
-
};
|
|
111
|
-
url: {
|
|
112
|
-
default: "";
|
|
113
|
-
};
|
|
114
|
-
caption: {
|
|
115
|
-
default: "";
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
content: "none";
|
|
119
|
-
isFileBlock: true;
|
|
120
|
-
} | {
|
|
121
|
-
type: "image";
|
|
122
|
-
propSchema: {
|
|
123
|
-
textAlignment: {
|
|
124
|
-
default: "left";
|
|
125
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
126
|
-
};
|
|
127
|
-
backgroundColor: {
|
|
128
|
-
default: "default";
|
|
129
|
-
};
|
|
130
|
-
name: {
|
|
131
|
-
default: "";
|
|
132
|
-
};
|
|
133
|
-
url: {
|
|
134
|
-
default: "";
|
|
135
|
-
};
|
|
136
|
-
caption: {
|
|
137
|
-
default: "";
|
|
138
|
-
};
|
|
139
|
-
showPreview: {
|
|
140
|
-
default: true;
|
|
141
|
-
};
|
|
142
|
-
previewWidth: {
|
|
143
|
-
default: number;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
content: "none";
|
|
147
|
-
isFileBlock: true;
|
|
148
|
-
fileBlockAccept: string[];
|
|
149
|
-
} | {
|
|
150
|
-
type: "video";
|
|
151
|
-
propSchema: {
|
|
152
|
-
textAlignment: {
|
|
153
|
-
default: "left";
|
|
154
|
-
values: readonly ["left", "center", "right", "justify"];
|
|
155
|
-
};
|
|
156
|
-
backgroundColor: {
|
|
157
|
-
default: "default";
|
|
158
|
-
};
|
|
159
|
-
name: {
|
|
160
|
-
default: "";
|
|
161
|
-
};
|
|
162
|
-
url: {
|
|
163
|
-
default: "";
|
|
164
|
-
};
|
|
165
|
-
caption: {
|
|
166
|
-
default: "";
|
|
167
|
-
};
|
|
168
|
-
showPreview: {
|
|
169
|
-
default: true;
|
|
170
|
-
};
|
|
171
|
-
previewWidth: {
|
|
172
|
-
default: number;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
content: "none";
|
|
176
|
-
isFileBlock: true;
|
|
177
|
-
fileBlockAccept: string[];
|
|
178
|
-
} | {
|
|
179
|
-
type: "audio";
|
|
180
|
-
propSchema: {
|
|
181
|
-
backgroundColor: {
|
|
182
|
-
default: "default";
|
|
183
|
-
};
|
|
184
|
-
name: {
|
|
185
|
-
default: "";
|
|
186
|
-
};
|
|
187
|
-
url: {
|
|
188
|
-
default: "";
|
|
189
|
-
};
|
|
190
|
-
caption: {
|
|
191
|
-
default: "";
|
|
192
|
-
};
|
|
193
|
-
showPreview: {
|
|
194
|
-
default: true;
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
content: "none";
|
|
198
|
-
isFileBlock: true;
|
|
199
|
-
fileBlockAccept: string[];
|
|
200
|
-
}, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>) => Paragraph;
|
|
201
|
-
styledTextTransformer: (styledText: import("@blocknote/core").StyledText<import("@blocknote/core").StyleSchemaFromSpecs<{
|
|
202
|
-
bold: {
|
|
203
|
-
config: {
|
|
204
|
-
type: string;
|
|
205
|
-
propSchema: "boolean";
|
|
206
|
-
};
|
|
207
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
208
|
-
};
|
|
209
|
-
italic: {
|
|
210
|
-
config: {
|
|
211
|
-
type: string;
|
|
212
|
-
propSchema: "boolean";
|
|
213
|
-
};
|
|
214
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
215
|
-
};
|
|
216
|
-
underline: {
|
|
217
|
-
config: {
|
|
218
|
-
type: string;
|
|
219
|
-
propSchema: "boolean";
|
|
220
|
-
};
|
|
221
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
222
|
-
};
|
|
223
|
-
strike: {
|
|
224
|
-
config: {
|
|
225
|
-
type: string;
|
|
226
|
-
propSchema: "boolean";
|
|
227
|
-
};
|
|
228
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
229
|
-
};
|
|
230
|
-
code: {
|
|
231
|
-
config: {
|
|
232
|
-
type: string;
|
|
233
|
-
propSchema: "boolean";
|
|
234
|
-
};
|
|
235
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
236
|
-
};
|
|
237
|
-
textColor: {
|
|
238
|
-
config: {
|
|
239
|
-
type: string;
|
|
240
|
-
propSchema: "string";
|
|
241
|
-
};
|
|
242
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
243
|
-
};
|
|
244
|
-
backgroundColor: {
|
|
245
|
-
config: {
|
|
246
|
-
type: string;
|
|
247
|
-
propSchema: "string";
|
|
248
|
-
};
|
|
249
|
-
implementation: import("@blocknote/core").StyleImplementation;
|
|
250
|
-
};
|
|
251
|
-
}>>) => TextRun;
|
|
252
|
-
inlineContentTransformer: (inlineContent: import("@blocknote/core").StyledText<import("@blocknote/core").StyleSchema> | import("@blocknote/core").Link<import("@blocknote/core").StyleSchema>) => import("docx").ParagraphChild;
|
|
253
|
-
};
|
|
254
|
-
transform: (blocks: Block[]) => Paragraph[];
|
|
255
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/src/mapping.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BlockFromConfigNoChildren, BlockNoteSchema, BlockSchema, InlineContentFromConfig, InlineContentSchema, StyleSchema, Styles } from "@blocknote/core";
|
|
2
|
-
import { Exporter } from "./Exporter.js";
|
|
3
|
-
/**
|
|
4
|
-
* Defines a mapping from all block types with a schema to a result type `R`.
|
|
5
|
-
*/
|
|
6
|
-
export type BlockMapping<B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, RB, RI> = {
|
|
7
|
-
[K in keyof B]: (block: BlockFromConfigNoChildren<B[K], I, S>, exporter: Exporter<any, any, any, RB, RI, any, any>, nestingLevel: number, numberedListIndex?: number) => RB | Promise<RB>;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Defines a mapping from all inline content types with a schema to a result type R.
|
|
11
|
-
*/
|
|
12
|
-
export type InlineContentMapping<I extends InlineContentSchema, S extends StyleSchema, RI, TS> = {
|
|
13
|
-
[K in keyof I]: (inlineContent: InlineContentFromConfig<I[K], S>, exporter: Exporter<any, I, S, any, RI, any, TS>) => RI;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Defines a mapping from all style types with a schema to a result type R.
|
|
17
|
-
*/
|
|
18
|
-
export type StyleMapping<S extends StyleSchema, RS> = {
|
|
19
|
-
[K in keyof S]: (style: Styles<S>[K], exporter: Exporter<any, any, any, any, any, RS, any>) => RS;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* The mapping factory is a utility function to easily create mappings for
|
|
23
|
-
* a BlockNoteSchema. Using the factory makes it easier to get typescript code completion etc.
|
|
24
|
-
*/
|
|
25
|
-
export declare function mappingFactory<B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(_schema: BlockNoteSchema<B, I, S>): {
|
|
26
|
-
createBlockMapping: <R, RI>(mapping: BlockMapping<B, I, S, R, RI>) => BlockMapping<B, I, S, R, RI>;
|
|
27
|
-
createInlineContentMapping: <R_1, RS>(mapping: InlineContentMapping<I, S, R_1, RS>) => InlineContentMapping<I, S, R_1, RS>;
|
|
28
|
-
createStyleMapping: <R_2>(mapping: StyleMapping<S, R_2>) => StyleMapping<S, R_2>;
|
|
29
|
-
};
|