@blocknote/xl-pdf-exporter 0.24.2 → 0.25.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.
@@ -1,10 +1,10 @@
1
- var D = Object.defineProperty;
2
- var R = (t, r, e) => r in t ? D(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var C = (t, r, e) => R(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { jsx as n, jsxs as c, Fragment as v } from "react/jsx-runtime";
5
- import { StyleSheet as I, Svg as m, Path as y, View as l, Text as a, Image as k, Link as T, Font as h, Document as F, Page as B } from "@react-pdf/renderer";
6
- import { Exporter as Z, COLORS_DEFAULT as O } from "@blocknote/core";
7
- const N = 0.75, M = I.create({
1
+ var L = Object.defineProperty;
2
+ var P = (t, r, e) => r in t ? L(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
+ var w = (t, r, e) => P(t, typeof r != "symbol" ? r + "" : r, e);
4
+ import { jsx as n, jsxs as f, Fragment as T } from "react/jsx-runtime";
5
+ import { StyleSheet as v, Svg as m, Path as y, View as s, Text as c, Image as D, Link as k, Font as u, Document as F, Page as B } from "@react-pdf/renderer";
6
+ import { mapTableCell as Z, Exporter as O, COLORS_DEFAULT as A } from "@blocknote/core";
7
+ const N = 0.75, V = v.create({
8
8
  listItem: {
9
9
  display: "flex",
10
10
  flexDirection: "row",
@@ -13,8 +13,7 @@ const N = 0.75, M = I.create({
13
13
  // otherwise text overflows, seems like a react-pdf / yoga bug
14
14
  },
15
15
  bullet: {
16
- fontFamily: ""
17
- // TODO: add symbol font
16
+ // fontFamily: "", // we could add symbol font if we don't want to use inter (default font) here
18
17
  }
19
18
  }), W = "•", j = /* @__PURE__ */ n(
20
19
  m,
@@ -26,7 +25,7 @@ const N = 0.75, M = I.create({
26
25
  fill: "undefined",
27
26
  children: /* @__PURE__ */ n(y, { d: "M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Z" })
28
27
  }
29
- ), A = /* @__PURE__ */ n(
28
+ ), z = /* @__PURE__ */ n(
30
29
  m,
31
30
  {
32
31
  style: { marginTop: 2 },
@@ -36,14 +35,14 @@ const N = 0.75, M = I.create({
36
35
  fill: "undefined",
37
36
  children: /* @__PURE__ */ n(y, { d: "m424-312 282-282-56-56-226 226-114-114-56 56 170 170ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z" })
38
37
  }
39
- ), x = ({
38
+ ), H = ({
40
39
  listMarker: t,
41
40
  children: r,
42
41
  style: e
43
- }) => /* @__PURE__ */ c(l, { style: [M.listItem, e || {}], children: [
44
- /* @__PURE__ */ n(l, { style: M.bullet, children: typeof t == "string" ? /* @__PURE__ */ n(a, { children: t }) : t }),
42
+ }) => /* @__PURE__ */ f(s, { style: [V.listItem, e || {}], children: [
43
+ /* @__PURE__ */ n(s, { style: V.bullet, children: typeof t == "string" ? /* @__PURE__ */ n(c, { children: t }) : t }),
45
44
  r
46
- ] }), V = 0.75, p = I.create({
45
+ ] }), I = 0.75, p = v.create({
47
46
  tableContainer: {
48
47
  // width: "100%",
49
48
  },
@@ -55,61 +54,76 @@ const N = 0.75, M = I.create({
55
54
  display: "flex"
56
55
  },
57
56
  cell: {
58
- paddingHorizontal: 5 * V,
59
- paddingTop: 3 * V,
57
+ paddingHorizontal: 5 * I,
58
+ paddingTop: 3 * I,
60
59
  // paddingBottom: 1 * PIXELS_PER_POINT, should be 3px but looks odd, better with no padding Bottom
61
60
  borderLeft: "1px solid #ddd",
62
61
  borderTop: "1px solid #ddd",
63
62
  wordWrap: "break-word",
64
63
  whiteSpace: "pre-wrap"
65
64
  },
65
+ headerCell: {
66
+ fontWeight: "bold"
67
+ },
66
68
  bottomCell: {
67
69
  borderBottom: "1px solid #ddd"
68
70
  },
69
71
  rightCell: {
70
72
  borderRight: "1px solid #ddd"
71
73
  }
72
- }), z = (t) => /* @__PURE__ */ n(l, { style: p.tableContainer, wrap: !1, children: t.data.rows.map((r, e) => /* @__PURE__ */ n(
73
- l,
74
- {
75
- style: [
76
- p.row,
77
- e === t.data.rows.length - 1 ? p.bottomCell : {}
78
- ],
79
- children: r.cells.map((o, i) => /* @__PURE__ */ n(
80
- l,
81
- {
82
- style: [
83
- p.cell,
84
- i === r.cells.length - 1 ? p.rightCell : {},
85
- t.data.columnWidths[i] ? { width: t.data.columnWidths[i] } : { flex: 1 }
86
- ],
87
- children: t.transformer.transformInlineContent(o)
88
- },
89
- i
90
- ))
91
- },
92
- e
93
- )) }), d = 0.75, H = 16, U = {
94
- paragraph: (t, r) => /* @__PURE__ */ n(a, { children: r.transformInlineContent(t.content) }),
95
- bulletListItem: (t, r) => /* @__PURE__ */ n(x, { listMarker: W, children: /* @__PURE__ */ n(a, { children: r.transformInlineContent(t.content) }) }),
96
- numberedListItem: (t, r, e, o) => /* @__PURE__ */ n(x, { listMarker: `${o}.`, children: /* @__PURE__ */ n(a, { children: r.transformInlineContent(t.content) }) }),
74
+ }), U = (t) => {
75
+ const r = new Array(t.data.headerRows ?? 0).fill(!0), e = new Array(t.data.headerCols ?? 0).fill(!0);
76
+ return /* @__PURE__ */ n(s, { style: p.tableContainer, wrap: !1, children: t.data.rows.map((o, i) => /* @__PURE__ */ n(
77
+ s,
78
+ {
79
+ style: [
80
+ p.row,
81
+ i === t.data.rows.length - 1 ? p.bottomCell : {}
82
+ ],
83
+ children: o.cells.map((d, l) => {
84
+ const a = Z(d), C = r[i], b = e[l];
85
+ return /* @__PURE__ */ n(
86
+ s,
87
+ {
88
+ style: [
89
+ p.cell,
90
+ C || b ? p.headerCell : {},
91
+ l === o.cells.length - 1 ? p.rightCell : {},
92
+ t.data.columnWidths[l] ? { width: t.data.columnWidths[l] } : { flex: 1 },
93
+ {
94
+ color: a.props.textColor === "default" ? void 0 : t.transformer.options.colors[a.props.textColor].text,
95
+ backgroundColor: a.props.backgroundColor === "default" ? void 0 : t.transformer.options.colors[a.props.backgroundColor].background,
96
+ textAlign: a.props.textAlignment
97
+ }
98
+ ],
99
+ children: t.transformer.transformInlineContent(a.content)
100
+ },
101
+ l
102
+ );
103
+ })
104
+ },
105
+ i
106
+ )) });
107
+ }, h = 0.75, M = 16, $ = {
108
+ paragraph: (t, r) => /* @__PURE__ */ n(c, { children: r.transformInlineContent(t.content) }),
109
+ bulletListItem: (t, r) => /* @__PURE__ */ n(H, { listMarker: W, children: /* @__PURE__ */ n(c, { children: r.transformInlineContent(t.content) }) }),
110
+ numberedListItem: (t, r, e, o) => /* @__PURE__ */ n(H, { listMarker: `${o}.`, children: /* @__PURE__ */ n(c, { children: r.transformInlineContent(t.content) }) }),
97
111
  // would be nice to have pdf checkboxes:
98
112
  // https://github.com/diegomura/react-pdf/issues/2103
99
113
  checkListItem: (t, r) => /* @__PURE__ */ n(
100
- x,
114
+ H,
101
115
  {
102
- listMarker: t.props.checked ? A : j,
103
- children: /* @__PURE__ */ n(a, { children: r.transformInlineContent(t.content) })
116
+ listMarker: t.props.checked ? z : j,
117
+ children: /* @__PURE__ */ n(c, { children: r.transformInlineContent(t.content) })
104
118
  }
105
119
  ),
106
120
  heading: (t, r) => {
107
121
  const e = t.props.level === 1 ? 2 : t.props.level === 2 ? 1.5 : 1.17;
108
122
  return /* @__PURE__ */ n(
109
- a,
123
+ c,
110
124
  {
111
125
  style: {
112
- fontSize: e * H * d,
126
+ fontSize: e * M * h,
113
127
  fontWeight: 700
114
128
  },
115
129
  children: r.transformInlineContent(t.content)
@@ -119,78 +133,78 @@ const N = 0.75, M = I.create({
119
133
  codeBlock: (t) => {
120
134
  var o;
121
135
  const e = (((o = t.content[0]) == null ? void 0 : o.text) || "").split(`
122
- `).map((i, f) => {
123
- var u;
124
- const s = ((u = i.match(/^\s*/)) == null ? void 0 : u[0].length) || 0;
136
+ `).map((i, d) => {
137
+ var a;
138
+ const l = ((a = i.match(/^\s*/)) == null ? void 0 : a[0].length) || 0;
125
139
  return /* @__PURE__ */ n(
126
- a,
140
+ c,
127
141
  {
128
142
  style: {
129
- marginLeft: s * 9.5 * d
143
+ marginLeft: l * 9.5 * h
130
144
  },
131
- children: i.trimStart() || /* @__PURE__ */ n(v, { children: " " })
145
+ children: i.trimStart() || /* @__PURE__ */ n(T, { children: " " })
132
146
  },
133
- `line_${f}`
147
+ `line_${d}`
134
148
  );
135
149
  });
136
150
  return /* @__PURE__ */ n(
137
- l,
151
+ s,
138
152
  {
139
153
  wrap: !1,
140
154
  style: {
141
- padding: 24 * d,
155
+ padding: 24 * h,
142
156
  backgroundColor: "#161616",
143
157
  color: "#ffffff",
144
158
  lineHeight: 1.25,
145
- fontSize: H * d,
159
+ fontSize: M * h,
146
160
  fontFamily: "GeistMono"
147
161
  },
148
162
  children: e
149
163
  }
150
164
  );
151
165
  },
152
- pageBreak: () => /* @__PURE__ */ n(l, { break: !0 }),
153
- audio: (t, r) => /* @__PURE__ */ c(l, { wrap: !1, children: [
154
- b(
166
+ pageBreak: () => /* @__PURE__ */ n(s, { break: !0 }),
167
+ audio: (t, r) => /* @__PURE__ */ f(s, { wrap: !1, children: [
168
+ S(
155
169
  t.props,
156
170
  "Open audio file",
157
171
  /* @__PURE__ */ n(m, { height: 14, width: 14, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ n(y, { d: "M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" }) })
158
172
  ),
159
- w(t.props)
173
+ x(t.props)
160
174
  ] }),
161
- video: (t, r) => /* @__PURE__ */ c(l, { wrap: !1, children: [
162
- b(
175
+ video: (t, r) => /* @__PURE__ */ f(s, { wrap: !1, children: [
176
+ S(
163
177
  t.props,
164
178
  "Open video file",
165
179
  /* @__PURE__ */ n(m, { height: 14, width: 14, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ n(y, { d: "M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z" }) })
166
180
  ),
167
- w(t.props)
181
+ x(t.props)
168
182
  ] }),
169
- file: (t, r) => /* @__PURE__ */ c(l, { wrap: !1, children: [
170
- b(
183
+ file: (t, r) => /* @__PURE__ */ f(s, { wrap: !1, children: [
184
+ S(
171
185
  t.props,
172
186
  "Open file",
173
187
  /* @__PURE__ */ n(m, { height: 16, width: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ n(y, { d: "M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z" }) })
174
188
  ),
175
- w(t.props)
189
+ x(t.props)
176
190
  ] }),
177
- image: async (t, r) => /* @__PURE__ */ c(l, { wrap: !1, children: [
191
+ image: async (t, r) => /* @__PURE__ */ f(s, { wrap: !1, children: [
178
192
  /* @__PURE__ */ n(
179
- k,
193
+ D,
180
194
  {
181
195
  src: await r.resolveFile(t.props.url),
182
196
  style: {
183
- width: t.props.previewWidth * d
197
+ width: t.props.previewWidth * h
184
198
  }
185
199
  }
186
200
  ),
187
- w(t.props)
201
+ x(t.props)
188
202
  ] }),
189
- table: (t, r) => /* @__PURE__ */ n(z, { data: t.content, transformer: r })
203
+ table: (t, r) => /* @__PURE__ */ n(U, { data: t.content, transformer: r })
190
204
  };
191
- function b(t, r, e, o) {
192
- return /* @__PURE__ */ n(T, { src: t.url, children: /* @__PURE__ */ c(
193
- l,
205
+ function S(t, r, e, o) {
206
+ return /* @__PURE__ */ n(k, { src: t.url, children: /* @__PURE__ */ f(
207
+ s,
194
208
  {
195
209
  style: {
196
210
  display: "flex",
@@ -199,28 +213,28 @@ function b(t, r, e, o) {
199
213
  },
200
214
  children: [
201
215
  e,
202
- /* @__PURE__ */ n(a, { children: t.name || r })
216
+ /* @__PURE__ */ n(c, { children: t.name || r })
203
217
  ]
204
218
  }
205
219
  ) });
206
220
  }
207
- function w(t, r) {
221
+ function x(t, r) {
208
222
  if (t.caption)
209
223
  return /* @__PURE__ */ n(
210
- a,
224
+ c,
211
225
  {
212
226
  style: {
213
- width: t.previewWidth ? t.previewWidth * d : void 0,
214
- fontSize: H * 0.8 * d
227
+ width: t.previewWidth ? t.previewWidth * h : void 0,
228
+ fontSize: M * 0.8 * h
215
229
  },
216
230
  children: t.caption
217
231
  }
218
232
  );
219
233
  }
220
- const $ = {
221
- link: (t, r) => /* @__PURE__ */ n(T, { href: t.href, children: t.content.map((e) => r.transformStyledText(e)) }),
234
+ const q = {
235
+ link: (t, r) => /* @__PURE__ */ n(k, { href: t.href, children: t.content.map((e) => r.transformStyledText(e)) }),
222
236
  text: (t, r) => r.transformStyledText(t)
223
- }, q = {
237
+ }, K = {
224
238
  bold: (t) => t ? {
225
239
  fontWeight: "bold"
226
240
  } : {},
@@ -243,27 +257,27 @@ const $ = {
243
257
  code: (t) => t ? {
244
258
  fontFamily: "GeistMono"
245
259
  } : {}
246
- }, et = {
247
- blockMapping: U,
248
- inlineContentMapping: $,
249
- styleMapping: q
260
+ }, rt = {
261
+ blockMapping: $,
262
+ inlineContentMapping: q,
263
+ styleMapping: K
250
264
  };
251
- async function K(t) {
265
+ async function X(t) {
252
266
  return "https://corsproxy.api.blocknotejs.org/corsproxy/?url=" + encodeURIComponent(t);
253
267
  }
254
- var L = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
255
- async function X(t, r) {
256
- if (L.NODE_ENV === "test") {
257
- const o = (await G(t)).toString("base64");
268
+ var R = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
269
+ async function G(t, r) {
270
+ if (R.NODE_ENV === "test") {
271
+ const o = (await J(t)).toString("base64");
258
272
  return `data:${r};base64,${o}`;
259
273
  } else
260
274
  return t.default;
261
275
  }
262
276
  async function g(t) {
263
- return X(t, "font/ttf");
277
+ return G(t, "font/ttf");
264
278
  }
265
- async function G(t) {
266
- if (L.NODE_ENV === "test") {
279
+ async function J(t) {
280
+ if (R.NODE_ENV === "test") {
267
281
  const r = require("fs");
268
282
  let e = t.default;
269
283
  return e.startsWith("/@fs/") && (e = e.substring(4)), r.readFileSync(e);
@@ -272,29 +286,29 @@ async function G(t) {
272
286
  return await (await fetch(r)).arrayBuffer();
273
287
  }
274
288
  }
275
- const _ = 16, S = 0.75;
276
- class rt extends Z {
289
+ const _ = 16, E = 0.75;
290
+ class nt extends O {
277
291
  constructor(e, o, i) {
278
- const s = {
292
+ const l = {
279
293
  ...{
280
294
  emojiSource: {
281
295
  format: "png",
282
296
  url: "https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/"
283
297
  },
284
- resolveFileUrl: K,
285
- colors: O
298
+ resolveFileUrl: X,
299
+ colors: A
286
300
  },
287
301
  ...i
288
302
  };
289
- super(e, o, s);
290
- C(this, "fontsRegistered", !1);
291
- C(this, "styles", I.create({
303
+ super(e, o, l);
304
+ w(this, "fontsRegistered", !1);
305
+ w(this, "styles", v.create({
292
306
  page: {
293
307
  paddingTop: 35,
294
308
  paddingBottom: 65,
295
309
  paddingHorizontal: 35,
296
310
  fontFamily: "Inter",
297
- fontSize: _ * S,
311
+ fontSize: _ * E,
298
312
  // pixels
299
313
  lineHeight: 1.5
300
314
  },
@@ -302,59 +316,58 @@ class rt extends Z {
302
316
  blockChildren: {},
303
317
  header: {},
304
318
  footer: {
305
- // @ts-ignore
306
319
  position: "absolute"
307
320
  }
308
321
  }));
309
- C(this, "options");
310
- this.schema = e, this.options = s;
322
+ w(this, "options");
323
+ this.schema = e, this.options = l;
311
324
  }
312
325
  /**
313
326
  * Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
314
327
  */
315
328
  transformStyledText(e) {
316
329
  const o = this.mapStyles(e.styles), i = Object.assign({}, ...o);
317
- return /* @__PURE__ */ n(a, { style: i, children: e.text });
330
+ return /* @__PURE__ */ n(c, { style: i, children: e.text });
318
331
  }
319
332
  /**
320
333
  * Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
321
334
  */
322
335
  async transformBlocks(e, o = 0) {
323
336
  const i = [];
324
- let f = 0;
325
- for (const s of e) {
326
- s.type === "numberedListItem" ? f++ : f = 0;
327
- const u = await this.transformBlocks(s.children, o + 1), E = await this.mapBlock(
328
- s,
337
+ let d = 0;
338
+ for (const l of e) {
339
+ l.type === "numberedListItem" ? d++ : d = 0;
340
+ const a = await this.transformBlocks(l.children, o + 1), C = await this.mapBlock(
341
+ l,
329
342
  o,
330
- f
343
+ d
331
344
  );
332
- if (s.type === "pageBreak") {
333
- i.push(E);
345
+ if (l.type === "pageBreak") {
346
+ i.push(C);
334
347
  continue;
335
348
  }
336
- const P = this.blocknoteDefaultPropsToReactPDFStyle(s.props);
349
+ const b = this.blocknoteDefaultPropsToReactPDFStyle(l.props);
337
350
  i.push(
338
- /* @__PURE__ */ c(v, { children: [
351
+ /* @__PURE__ */ f(T, { children: [
339
352
  /* @__PURE__ */ n(
340
- l,
353
+ s,
341
354
  {
342
355
  style: {
343
- paddingVertical: 3 * S,
356
+ paddingVertical: 3 * E,
344
357
  ...this.styles.block,
345
- ...P
358
+ ...b
346
359
  },
347
- children: E
360
+ children: C
348
361
  }
349
362
  ),
350
- u.length > 0 && /* @__PURE__ */ n(
351
- l,
363
+ a.length > 0 && /* @__PURE__ */ n(
364
+ s,
352
365
  {
353
366
  style: {
354
- marginLeft: _ * 1.5 * S,
367
+ marginLeft: _ * 1.5 * E,
355
368
  ...this.styles.blockChildren
356
369
  },
357
- children: u
370
+ children: a
358
371
  }
359
372
  )
360
373
  ] })
@@ -365,35 +378,35 @@ class rt extends Z {
365
378
  async registerFonts() {
366
379
  if (this.fontsRegistered)
367
380
  return;
368
- this.options.emojiSource && h.registerEmojiSource(this.options.emojiSource);
381
+ this.options.emojiSource && u.registerEmojiSource(this.options.emojiSource);
369
382
  let e = await g(
370
383
  await import("./Inter_18pt-Regular-byxnNS-8.js")
371
384
  );
372
- h.register({
385
+ u.register({
373
386
  family: "Inter",
374
387
  src: e
375
388
  }), e = await g(
376
389
  await import("./Inter_18pt-Italic-BVnfHlUD.js")
377
- ), h.register({
390
+ ), u.register({
378
391
  family: "Inter",
379
392
  fontStyle: "italic",
380
393
  src: e
381
394
  }), e = await g(
382
395
  await import("./Inter_18pt-Bold-BOnnSImi.js")
383
- ), h.register({
396
+ ), u.register({
384
397
  family: "Inter",
385
398
  src: e,
386
399
  fontWeight: "bold"
387
400
  }), e = await g(
388
401
  await import("./Inter_18pt-BoldItalic-DPKIpVzB.js")
389
- ), h.register({
402
+ ), u.register({
390
403
  family: "Inter",
391
404
  fontStyle: "italic",
392
405
  src: e,
393
406
  fontWeight: "bold"
394
407
  }), e = await g(
395
408
  await import("./GeistMono-Regular-D4rKXxwr.js")
396
- ), h.register({
409
+ ), u.register({
397
410
  family: "GeistMono",
398
411
  src: e
399
412
  }), this.fontsRegistered = !0;
@@ -402,11 +415,11 @@ class rt extends Z {
402
415
  * Convert a document (array of Blocks) to a react-pdf Document.
403
416
  */
404
417
  async toReactPDFDocument(e, o = {}) {
405
- return await this.registerFonts(), /* @__PURE__ */ n(F, { children: /* @__PURE__ */ c(B, { dpi: 100, size: "A4", style: this.styles.page, children: [
406
- o.header && /* @__PURE__ */ n(l, { fixed: !0, style: this.styles.header, children: o.header }),
418
+ return await this.registerFonts(), /* @__PURE__ */ n(F, { children: /* @__PURE__ */ f(B, { dpi: 100, size: "A4", style: this.styles.page, children: [
419
+ o.header && /* @__PURE__ */ n(s, { fixed: !0, style: this.styles.header, children: o.header }),
407
420
  await this.transformBlocks(e),
408
421
  o.footer && /* @__PURE__ */ n(
409
- l,
422
+ s,
410
423
  {
411
424
  fixed: !0,
412
425
  style: [
@@ -432,7 +445,7 @@ class rt extends Z {
432
445
  }
433
446
  }
434
447
  export {
435
- rt as PDFExporter,
436
- et as pdfDefaultSchemaMappings
448
+ nt as PDFExporter,
449
+ rt as pdfDefaultSchemaMappings
437
450
  };
438
451
  //# sourceMappingURL=blocknote-xl-pdf-exporter.js.map