@blocknote/xl-pdf-exporter 0.23.2 → 0.23.3
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,14 +1,639 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { StyleSheet as
|
|
6
|
-
import { Exporter as
|
|
7
|
-
|
|
1
|
+
var Cr = Object.defineProperty;
|
|
2
|
+
var _r = (t, i, o) => i in t ? Cr(t, i, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[i] = o;
|
|
3
|
+
var z = (t, i, o) => _r(t, typeof i != "symbol" ? i + "" : i, o);
|
|
4
|
+
import wr from "react";
|
|
5
|
+
import { StyleSheet as pe, Svg as A, Path as H, View as x, Text as y, Image as jr, Link as We, Font as P, Document as Tr, Page as Vr } from "@react-pdf/renderer";
|
|
6
|
+
import { Exporter as Pr, COLORS_DEFAULT as Br } from "@blocknote/core";
|
|
7
|
+
var ue = { exports: {} }, K = {};
|
|
8
|
+
/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-jsx-dev-runtime.production.min.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/
|
|
17
|
+
var Fe;
|
|
18
|
+
function Or() {
|
|
19
|
+
if (Fe) return K;
|
|
20
|
+
Fe = 1;
|
|
21
|
+
var t = Symbol.for("react.fragment");
|
|
22
|
+
return K.Fragment = t, K.jsxDEV = void 0, K;
|
|
23
|
+
}
|
|
24
|
+
var q = {};
|
|
25
|
+
/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-jsx-dev-runtime.development.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
var Me;
|
|
35
|
+
function Ur() {
|
|
36
|
+
return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
|
|
37
|
+
var t = wr, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), S = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), Ze = Symbol.for("react.offscreen"), me = Symbol.iterator, Ye = "@@iterator";
|
|
38
|
+
function ze(e) {
|
|
39
|
+
if (e === null || typeof e != "object")
|
|
40
|
+
return null;
|
|
41
|
+
var r = me && e[me] || e[Ye];
|
|
42
|
+
return typeof r == "function" ? r : null;
|
|
43
|
+
}
|
|
44
|
+
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
45
|
+
function h(e) {
|
|
46
|
+
{
|
|
47
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
48
|
+
n[s - 1] = arguments[s];
|
|
49
|
+
Ke("error", e, n);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function Ke(e, r, n) {
|
|
53
|
+
{
|
|
54
|
+
var s = j.ReactDebugCurrentFrame, f = s.getStackAddendum();
|
|
55
|
+
f !== "" && (r += "%s", n = n.concat([f]));
|
|
56
|
+
var d = n.map(function(c) {
|
|
57
|
+
return String(c);
|
|
58
|
+
});
|
|
59
|
+
d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
var qe = !1, Xe = !1, Ge = !1, Je = !1, Qe = !1, ve;
|
|
63
|
+
ve = Symbol.for("react.module.reference");
|
|
64
|
+
function er(e) {
|
|
65
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === D || Qe || e === m || e === B || e === G || Je || e === Ze || qe || Xe || Ge || typeof e == "object" && e !== null && (e.$$typeof === J || e.$$typeof === L || e.$$typeof === g || e.$$typeof === S || e.$$typeof === R || // This needs to include all possible module reference object
|
|
66
|
+
// types supported by any Flight configuration anywhere since
|
|
67
|
+
// we don't know which Flight build this will end up being used
|
|
68
|
+
// with.
|
|
69
|
+
e.$$typeof === ve || e.getModuleId !== void 0));
|
|
70
|
+
}
|
|
71
|
+
function rr(e, r, n) {
|
|
72
|
+
var s = e.displayName;
|
|
73
|
+
if (s)
|
|
74
|
+
return s;
|
|
75
|
+
var f = r.displayName || r.name || "";
|
|
76
|
+
return f !== "" ? n + "(" + f + ")" : n;
|
|
77
|
+
}
|
|
78
|
+
function he(e) {
|
|
79
|
+
return e.displayName || "Context";
|
|
80
|
+
}
|
|
81
|
+
function E(e) {
|
|
82
|
+
if (e == null)
|
|
83
|
+
return null;
|
|
84
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
85
|
+
return e.displayName || e.name || null;
|
|
86
|
+
if (typeof e == "string")
|
|
87
|
+
return e;
|
|
88
|
+
switch (e) {
|
|
89
|
+
case u:
|
|
90
|
+
return "Fragment";
|
|
91
|
+
case o:
|
|
92
|
+
return "Portal";
|
|
93
|
+
case D:
|
|
94
|
+
return "Profiler";
|
|
95
|
+
case m:
|
|
96
|
+
return "StrictMode";
|
|
97
|
+
case B:
|
|
98
|
+
return "Suspense";
|
|
99
|
+
case G:
|
|
100
|
+
return "SuspenseList";
|
|
101
|
+
}
|
|
102
|
+
if (typeof e == "object")
|
|
103
|
+
switch (e.$$typeof) {
|
|
104
|
+
case S:
|
|
105
|
+
var r = e;
|
|
106
|
+
return he(r) + ".Consumer";
|
|
107
|
+
case g:
|
|
108
|
+
var n = e;
|
|
109
|
+
return he(n._context) + ".Provider";
|
|
110
|
+
case R:
|
|
111
|
+
return rr(e, e.render, "ForwardRef");
|
|
112
|
+
case L:
|
|
113
|
+
var s = e.displayName || null;
|
|
114
|
+
return s !== null ? s : E(e.type) || "Memo";
|
|
115
|
+
case J: {
|
|
116
|
+
var f = e, d = f._payload, c = f._init;
|
|
117
|
+
try {
|
|
118
|
+
return E(c(d));
|
|
119
|
+
} catch {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
var C = Object.assign, O = 0, xe, ke, be, ge, Ne, Ee, ye;
|
|
127
|
+
function De() {
|
|
128
|
+
}
|
|
129
|
+
De.__reactDisabledLog = !0;
|
|
130
|
+
function tr() {
|
|
131
|
+
{
|
|
132
|
+
if (O === 0) {
|
|
133
|
+
xe = console.log, ke = console.info, be = console.warn, ge = console.error, Ne = console.group, Ee = console.groupCollapsed, ye = console.groupEnd;
|
|
134
|
+
var e = {
|
|
135
|
+
configurable: !0,
|
|
136
|
+
enumerable: !0,
|
|
137
|
+
value: De,
|
|
138
|
+
writable: !0
|
|
139
|
+
};
|
|
140
|
+
Object.defineProperties(console, {
|
|
141
|
+
info: e,
|
|
142
|
+
log: e,
|
|
143
|
+
warn: e,
|
|
144
|
+
error: e,
|
|
145
|
+
group: e,
|
|
146
|
+
groupCollapsed: e,
|
|
147
|
+
groupEnd: e
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
O++;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function nr() {
|
|
154
|
+
{
|
|
155
|
+
if (O--, O === 0) {
|
|
156
|
+
var e = {
|
|
157
|
+
configurable: !0,
|
|
158
|
+
enumerable: !0,
|
|
159
|
+
writable: !0
|
|
160
|
+
};
|
|
161
|
+
Object.defineProperties(console, {
|
|
162
|
+
log: C({}, e, {
|
|
163
|
+
value: xe
|
|
164
|
+
}),
|
|
165
|
+
info: C({}, e, {
|
|
166
|
+
value: ke
|
|
167
|
+
}),
|
|
168
|
+
warn: C({}, e, {
|
|
169
|
+
value: be
|
|
170
|
+
}),
|
|
171
|
+
error: C({}, e, {
|
|
172
|
+
value: ge
|
|
173
|
+
}),
|
|
174
|
+
group: C({}, e, {
|
|
175
|
+
value: Ne
|
|
176
|
+
}),
|
|
177
|
+
groupCollapsed: C({}, e, {
|
|
178
|
+
value: Ee
|
|
179
|
+
}),
|
|
180
|
+
groupEnd: C({}, e, {
|
|
181
|
+
value: ye
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
O < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
var Q = j.ReactCurrentDispatcher, ee;
|
|
189
|
+
function W(e, r, n) {
|
|
190
|
+
{
|
|
191
|
+
if (ee === void 0)
|
|
192
|
+
try {
|
|
193
|
+
throw Error();
|
|
194
|
+
} catch (f) {
|
|
195
|
+
var s = f.stack.trim().match(/\n( *(at )?)/);
|
|
196
|
+
ee = s && s[1] || "";
|
|
197
|
+
}
|
|
198
|
+
return `
|
|
199
|
+
` + ee + e;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
var re = !1, $;
|
|
203
|
+
{
|
|
204
|
+
var or = typeof WeakMap == "function" ? WeakMap : Map;
|
|
205
|
+
$ = new or();
|
|
206
|
+
}
|
|
207
|
+
function Se(e, r) {
|
|
208
|
+
if (!e || re)
|
|
209
|
+
return "";
|
|
210
|
+
{
|
|
211
|
+
var n = $.get(e);
|
|
212
|
+
if (n !== void 0)
|
|
213
|
+
return n;
|
|
214
|
+
}
|
|
215
|
+
var s;
|
|
216
|
+
re = !0;
|
|
217
|
+
var f = Error.prepareStackTrace;
|
|
218
|
+
Error.prepareStackTrace = void 0;
|
|
219
|
+
var d;
|
|
220
|
+
d = Q.current, Q.current = null, tr();
|
|
221
|
+
try {
|
|
222
|
+
if (r) {
|
|
223
|
+
var c = function() {
|
|
224
|
+
throw Error();
|
|
225
|
+
};
|
|
226
|
+
if (Object.defineProperty(c.prototype, "props", {
|
|
227
|
+
set: function() {
|
|
228
|
+
throw Error();
|
|
229
|
+
}
|
|
230
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
231
|
+
try {
|
|
232
|
+
Reflect.construct(c, []);
|
|
233
|
+
} catch (b) {
|
|
234
|
+
s = b;
|
|
235
|
+
}
|
|
236
|
+
Reflect.construct(e, [], c);
|
|
237
|
+
} else {
|
|
238
|
+
try {
|
|
239
|
+
c.call();
|
|
240
|
+
} catch (b) {
|
|
241
|
+
s = b;
|
|
242
|
+
}
|
|
243
|
+
e.call(c.prototype);
|
|
244
|
+
}
|
|
245
|
+
} else {
|
|
246
|
+
try {
|
|
247
|
+
throw Error();
|
|
248
|
+
} catch (b) {
|
|
249
|
+
s = b;
|
|
250
|
+
}
|
|
251
|
+
e();
|
|
252
|
+
}
|
|
253
|
+
} catch (b) {
|
|
254
|
+
if (b && s && typeof b.stack == "string") {
|
|
255
|
+
for (var l = b.stack.split(`
|
|
256
|
+
`), k = s.stack.split(`
|
|
257
|
+
`), p = l.length - 1, v = k.length - 1; p >= 1 && v >= 0 && l[p] !== k[v]; )
|
|
258
|
+
v--;
|
|
259
|
+
for (; p >= 1 && v >= 0; p--, v--)
|
|
260
|
+
if (l[p] !== k[v]) {
|
|
261
|
+
if (p !== 1 || v !== 1)
|
|
262
|
+
do
|
|
263
|
+
if (p--, v--, v < 0 || l[p] !== k[v]) {
|
|
264
|
+
var N = `
|
|
265
|
+
` + l[p].replace(" at new ", " at ");
|
|
266
|
+
return e.displayName && N.includes("<anonymous>") && (N = N.replace("<anonymous>", e.displayName)), typeof e == "function" && $.set(e, N), N;
|
|
267
|
+
}
|
|
268
|
+
while (p >= 1 && v >= 0);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
} finally {
|
|
273
|
+
re = !1, Q.current = d, nr(), Error.prepareStackTrace = f;
|
|
274
|
+
}
|
|
275
|
+
var V = e ? e.displayName || e.name : "", _ = V ? W(V) : "";
|
|
276
|
+
return typeof e == "function" && $.set(e, _), _;
|
|
277
|
+
}
|
|
278
|
+
function ir(e, r, n) {
|
|
279
|
+
return Se(e, !1);
|
|
280
|
+
}
|
|
281
|
+
function ar(e) {
|
|
282
|
+
var r = e.prototype;
|
|
283
|
+
return !!(r && r.isReactComponent);
|
|
284
|
+
}
|
|
285
|
+
function Z(e, r, n) {
|
|
286
|
+
if (e == null)
|
|
287
|
+
return "";
|
|
288
|
+
if (typeof e == "function")
|
|
289
|
+
return Se(e, ar(e));
|
|
290
|
+
if (typeof e == "string")
|
|
291
|
+
return W(e);
|
|
292
|
+
switch (e) {
|
|
293
|
+
case B:
|
|
294
|
+
return W("Suspense");
|
|
295
|
+
case G:
|
|
296
|
+
return W("SuspenseList");
|
|
297
|
+
}
|
|
298
|
+
if (typeof e == "object")
|
|
299
|
+
switch (e.$$typeof) {
|
|
300
|
+
case R:
|
|
301
|
+
return ir(e.render);
|
|
302
|
+
case L:
|
|
303
|
+
return Z(e.type, r, n);
|
|
304
|
+
case J: {
|
|
305
|
+
var s = e, f = s._payload, d = s._init;
|
|
306
|
+
try {
|
|
307
|
+
return Z(d(f), r, n);
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return "";
|
|
313
|
+
}
|
|
314
|
+
var U = Object.prototype.hasOwnProperty, Re = {}, Ce = j.ReactDebugCurrentFrame;
|
|
315
|
+
function Y(e) {
|
|
316
|
+
if (e) {
|
|
317
|
+
var r = e._owner, n = Z(e.type, e._source, r ? r.type : null);
|
|
318
|
+
Ce.setExtraStackFrame(n);
|
|
319
|
+
} else
|
|
320
|
+
Ce.setExtraStackFrame(null);
|
|
321
|
+
}
|
|
322
|
+
function sr(e, r, n, s, f) {
|
|
323
|
+
{
|
|
324
|
+
var d = Function.call.bind(U);
|
|
325
|
+
for (var c in e)
|
|
326
|
+
if (d(e, c)) {
|
|
327
|
+
var l = void 0;
|
|
328
|
+
try {
|
|
329
|
+
if (typeof e[c] != "function") {
|
|
330
|
+
var k = Error((s || "React class") + ": " + n + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
331
|
+
throw k.name = "Invariant Violation", k;
|
|
332
|
+
}
|
|
333
|
+
l = e[c](r, c, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
334
|
+
} catch (p) {
|
|
335
|
+
l = p;
|
|
336
|
+
}
|
|
337
|
+
l && !(l instanceof Error) && (Y(f), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, c, typeof l), Y(null)), l instanceof Error && !(l.message in Re) && (Re[l.message] = !0, Y(f), h("Failed %s type: %s", n, l.message), Y(null));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
var lr = Array.isArray;
|
|
342
|
+
function te(e) {
|
|
343
|
+
return lr(e);
|
|
344
|
+
}
|
|
345
|
+
function cr(e) {
|
|
346
|
+
{
|
|
347
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
348
|
+
return n;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function fr(e) {
|
|
352
|
+
try {
|
|
353
|
+
return _e(e), !1;
|
|
354
|
+
} catch {
|
|
355
|
+
return !0;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function _e(e) {
|
|
359
|
+
return "" + e;
|
|
360
|
+
}
|
|
361
|
+
function we(e) {
|
|
362
|
+
if (fr(e))
|
|
363
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", cr(e)), _e(e);
|
|
364
|
+
}
|
|
365
|
+
var I = j.ReactCurrentOwner, ur = {
|
|
366
|
+
key: !0,
|
|
367
|
+
ref: !0,
|
|
368
|
+
__self: !0,
|
|
369
|
+
__source: !0
|
|
370
|
+
}, je, Te, ne;
|
|
371
|
+
ne = {};
|
|
372
|
+
function dr(e) {
|
|
373
|
+
if (U.call(e, "ref")) {
|
|
374
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
375
|
+
if (r && r.isReactWarning)
|
|
376
|
+
return !1;
|
|
377
|
+
}
|
|
378
|
+
return e.ref !== void 0;
|
|
379
|
+
}
|
|
380
|
+
function pr(e) {
|
|
381
|
+
if (U.call(e, "key")) {
|
|
382
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
383
|
+
if (r && r.isReactWarning)
|
|
384
|
+
return !1;
|
|
385
|
+
}
|
|
386
|
+
return e.key !== void 0;
|
|
387
|
+
}
|
|
388
|
+
function mr(e, r) {
|
|
389
|
+
if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) {
|
|
390
|
+
var n = E(I.current.type);
|
|
391
|
+
ne[n] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', E(I.current.type), e.ref), ne[n] = !0);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
function vr(e, r) {
|
|
395
|
+
{
|
|
396
|
+
var n = function() {
|
|
397
|
+
je || (je = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
398
|
+
};
|
|
399
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
400
|
+
get: n,
|
|
401
|
+
configurable: !0
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function hr(e, r) {
|
|
406
|
+
{
|
|
407
|
+
var n = function() {
|
|
408
|
+
Te || (Te = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
409
|
+
};
|
|
410
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
411
|
+
get: n,
|
|
412
|
+
configurable: !0
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
var xr = function(e, r, n, s, f, d, c) {
|
|
417
|
+
var l = {
|
|
418
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
419
|
+
$$typeof: i,
|
|
420
|
+
// Built-in properties that belong on the element
|
|
421
|
+
type: e,
|
|
422
|
+
key: r,
|
|
423
|
+
ref: n,
|
|
424
|
+
props: c,
|
|
425
|
+
// Record the component responsible for creating this element.
|
|
426
|
+
_owner: d
|
|
427
|
+
};
|
|
428
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
429
|
+
configurable: !1,
|
|
430
|
+
enumerable: !1,
|
|
431
|
+
writable: !0,
|
|
432
|
+
value: !1
|
|
433
|
+
}), Object.defineProperty(l, "_self", {
|
|
434
|
+
configurable: !1,
|
|
435
|
+
enumerable: !1,
|
|
436
|
+
writable: !1,
|
|
437
|
+
value: s
|
|
438
|
+
}), Object.defineProperty(l, "_source", {
|
|
439
|
+
configurable: !1,
|
|
440
|
+
enumerable: !1,
|
|
441
|
+
writable: !1,
|
|
442
|
+
value: f
|
|
443
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
444
|
+
};
|
|
445
|
+
function kr(e, r, n, s, f) {
|
|
446
|
+
{
|
|
447
|
+
var d, c = {}, l = null, k = null;
|
|
448
|
+
n !== void 0 && (we(n), l = "" + n), pr(r) && (we(r.key), l = "" + r.key), dr(r) && (k = r.ref, mr(r, f));
|
|
449
|
+
for (d in r)
|
|
450
|
+
U.call(r, d) && !ur.hasOwnProperty(d) && (c[d] = r[d]);
|
|
451
|
+
if (e && e.defaultProps) {
|
|
452
|
+
var p = e.defaultProps;
|
|
453
|
+
for (d in p)
|
|
454
|
+
c[d] === void 0 && (c[d] = p[d]);
|
|
455
|
+
}
|
|
456
|
+
if (l || k) {
|
|
457
|
+
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
458
|
+
l && vr(c, v), k && hr(c, v);
|
|
459
|
+
}
|
|
460
|
+
return xr(e, l, k, f, s, I.current, c);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
var oe = j.ReactCurrentOwner, Ve = j.ReactDebugCurrentFrame;
|
|
464
|
+
function T(e) {
|
|
465
|
+
if (e) {
|
|
466
|
+
var r = e._owner, n = Z(e.type, e._source, r ? r.type : null);
|
|
467
|
+
Ve.setExtraStackFrame(n);
|
|
468
|
+
} else
|
|
469
|
+
Ve.setExtraStackFrame(null);
|
|
470
|
+
}
|
|
471
|
+
var ie;
|
|
472
|
+
ie = !1;
|
|
473
|
+
function ae(e) {
|
|
474
|
+
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
475
|
+
}
|
|
476
|
+
function Pe() {
|
|
477
|
+
{
|
|
478
|
+
if (oe.current) {
|
|
479
|
+
var e = E(oe.current.type);
|
|
480
|
+
if (e)
|
|
481
|
+
return `
|
|
482
|
+
|
|
483
|
+
Check the render method of \`` + e + "`.";
|
|
484
|
+
}
|
|
485
|
+
return "";
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function br(e) {
|
|
489
|
+
{
|
|
490
|
+
if (e !== void 0) {
|
|
491
|
+
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
492
|
+
return `
|
|
493
|
+
|
|
494
|
+
Check your code at ` + r + ":" + n + ".";
|
|
495
|
+
}
|
|
496
|
+
return "";
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
var Be = {};
|
|
500
|
+
function gr(e) {
|
|
501
|
+
{
|
|
502
|
+
var r = Pe();
|
|
503
|
+
if (!r) {
|
|
504
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
505
|
+
n && (r = `
|
|
506
|
+
|
|
507
|
+
Check the top-level render call using <` + n + ">.");
|
|
508
|
+
}
|
|
509
|
+
return r;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function Oe(e, r) {
|
|
513
|
+
{
|
|
514
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
515
|
+
return;
|
|
516
|
+
e._store.validated = !0;
|
|
517
|
+
var n = gr(r);
|
|
518
|
+
if (Be[n])
|
|
519
|
+
return;
|
|
520
|
+
Be[n] = !0;
|
|
521
|
+
var s = "";
|
|
522
|
+
e && e._owner && e._owner !== oe.current && (s = " It was passed a child from " + E(e._owner.type) + "."), T(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), T(null);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
function Ue(e, r) {
|
|
526
|
+
{
|
|
527
|
+
if (typeof e != "object")
|
|
528
|
+
return;
|
|
529
|
+
if (te(e))
|
|
530
|
+
for (var n = 0; n < e.length; n++) {
|
|
531
|
+
var s = e[n];
|
|
532
|
+
ae(s) && Oe(s, r);
|
|
533
|
+
}
|
|
534
|
+
else if (ae(e))
|
|
535
|
+
e._store && (e._store.validated = !0);
|
|
536
|
+
else if (e) {
|
|
537
|
+
var f = ze(e);
|
|
538
|
+
if (typeof f == "function" && f !== e.entries)
|
|
539
|
+
for (var d = f.call(e), c; !(c = d.next()).done; )
|
|
540
|
+
ae(c.value) && Oe(c.value, r);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function Nr(e) {
|
|
545
|
+
{
|
|
546
|
+
var r = e.type;
|
|
547
|
+
if (r == null || typeof r == "string")
|
|
548
|
+
return;
|
|
549
|
+
var n;
|
|
550
|
+
if (typeof r == "function")
|
|
551
|
+
n = r.propTypes;
|
|
552
|
+
else if (typeof r == "object" && (r.$$typeof === R || // Note: Memo only checks outer props here.
|
|
553
|
+
// Inner props are checked in the reconciler.
|
|
554
|
+
r.$$typeof === L))
|
|
555
|
+
n = r.propTypes;
|
|
556
|
+
else
|
|
557
|
+
return;
|
|
558
|
+
if (n) {
|
|
559
|
+
var s = E(r);
|
|
560
|
+
sr(n, e.props, "prop", s, e);
|
|
561
|
+
} else if (r.PropTypes !== void 0 && !ie) {
|
|
562
|
+
ie = !0;
|
|
563
|
+
var f = E(r);
|
|
564
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
565
|
+
}
|
|
566
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function Er(e) {
|
|
570
|
+
{
|
|
571
|
+
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
572
|
+
var s = r[n];
|
|
573
|
+
if (s !== "children" && s !== "key") {
|
|
574
|
+
T(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), T(null);
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
e.ref !== null && (T(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), T(null));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
var Ie = {};
|
|
582
|
+
function yr(e, r, n, s, f, d) {
|
|
583
|
+
{
|
|
584
|
+
var c = er(e);
|
|
585
|
+
if (!c) {
|
|
586
|
+
var l = "";
|
|
587
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
588
|
+
var k = br(f);
|
|
589
|
+
k ? l += k : l += Pe();
|
|
590
|
+
var p;
|
|
591
|
+
e === null ? p = "null" : te(e) ? p = "array" : e !== void 0 && e.$$typeof === i ? (p = "<" + (E(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, l);
|
|
592
|
+
}
|
|
593
|
+
var v = kr(e, r, n, f, d);
|
|
594
|
+
if (v == null)
|
|
595
|
+
return v;
|
|
596
|
+
if (c) {
|
|
597
|
+
var N = r.children;
|
|
598
|
+
if (N !== void 0)
|
|
599
|
+
if (s)
|
|
600
|
+
if (te(N)) {
|
|
601
|
+
for (var V = 0; V < N.length; V++)
|
|
602
|
+
Ue(N[V], e);
|
|
603
|
+
Object.freeze && Object.freeze(N);
|
|
604
|
+
} else
|
|
605
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
606
|
+
else
|
|
607
|
+
Ue(N, e);
|
|
608
|
+
}
|
|
609
|
+
if (U.call(r, "key")) {
|
|
610
|
+
var _ = E(e), b = Object.keys(r).filter(function(Rr) {
|
|
611
|
+
return Rr !== "key";
|
|
612
|
+
}), se = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
613
|
+
if (!Ie[_ + se]) {
|
|
614
|
+
var Sr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
|
|
615
|
+
h(`A props object containing a "key" prop is being spread into JSX:
|
|
616
|
+
let props = %s;
|
|
617
|
+
<%s {...props} />
|
|
618
|
+
React keys must be passed directly to JSX without using spread:
|
|
619
|
+
let props = %s;
|
|
620
|
+
<%s key={someKey} {...props} />`, se, _, Sr, _), Ie[_ + se] = !0;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return e === u ? Er(v) : Nr(v), v;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
var Dr = yr;
|
|
627
|
+
q.Fragment = u, q.jsxDEV = Dr;
|
|
628
|
+
}()), q;
|
|
629
|
+
}
|
|
630
|
+
process.env.NODE_ENV === "production" ? ue.exports = Or() : ue.exports = Ur();
|
|
631
|
+
var a = ue.exports;
|
|
632
|
+
const Ir = 0.75, Ae = pe.create({
|
|
8
633
|
listItem: {
|
|
9
634
|
display: "flex",
|
|
10
635
|
flexDirection: "row",
|
|
11
|
-
gap: 8 *
|
|
636
|
+
gap: 8 * Ir,
|
|
12
637
|
paddingRight: 10
|
|
13
638
|
// otherwise text overflows, seems like a react-pdf / yoga bug
|
|
14
639
|
},
|
|
@@ -16,34 +641,70 @@ const N = 0.75, M = I.create({
|
|
|
16
641
|
fontFamily: ""
|
|
17
642
|
// TODO: add symbol font
|
|
18
643
|
}
|
|
19
|
-
}),
|
|
20
|
-
|
|
644
|
+
}), Fr = "•", Mr = /* @__PURE__ */ a.jsxDEV(
|
|
645
|
+
A,
|
|
21
646
|
{
|
|
22
647
|
style: { marginTop: 2 },
|
|
23
648
|
height: "12",
|
|
24
649
|
viewBox: "0 -960 960 960",
|
|
25
650
|
width: "12",
|
|
26
651
|
fill: "undefined",
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
652
|
+
children: /* @__PURE__ */ a.jsxDEV(H, { 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" }, void 0, !1, {
|
|
653
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
654
|
+
lineNumber: 30,
|
|
655
|
+
columnNumber: 5
|
|
656
|
+
}, void 0)
|
|
657
|
+
},
|
|
658
|
+
void 0,
|
|
659
|
+
!1,
|
|
660
|
+
{
|
|
661
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
662
|
+
lineNumber: 24,
|
|
663
|
+
columnNumber: 3
|
|
664
|
+
},
|
|
665
|
+
void 0
|
|
666
|
+
), Ar = /* @__PURE__ */ a.jsxDEV(
|
|
667
|
+
A,
|
|
31
668
|
{
|
|
32
669
|
style: { marginTop: 2 },
|
|
33
670
|
height: "12",
|
|
34
671
|
viewBox: "0 -960 960 960",
|
|
35
672
|
width: "12",
|
|
36
673
|
fill: "undefined",
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
674
|
+
children: /* @__PURE__ */ a.jsxDEV(H, { 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" }, void 0, !1, {
|
|
675
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
676
|
+
lineNumber: 42,
|
|
677
|
+
columnNumber: 5
|
|
678
|
+
}, void 0)
|
|
679
|
+
},
|
|
680
|
+
void 0,
|
|
681
|
+
!1,
|
|
682
|
+
{
|
|
683
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
684
|
+
lineNumber: 36,
|
|
685
|
+
columnNumber: 3
|
|
686
|
+
},
|
|
687
|
+
void 0
|
|
688
|
+
), le = ({
|
|
40
689
|
listMarker: t,
|
|
41
|
-
children:
|
|
42
|
-
style:
|
|
43
|
-
}) => /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
690
|
+
children: i,
|
|
691
|
+
style: o
|
|
692
|
+
}) => /* @__PURE__ */ a.jsxDEV(x, { style: [Ae.listItem, o || {}], children: [
|
|
693
|
+
/* @__PURE__ */ a.jsxDEV(x, { style: Ae.bullet, children: typeof t == "string" ? /* @__PURE__ */ a.jsxDEV(y, { children: t }, void 0, !1, {
|
|
694
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
695
|
+
lineNumber: 62,
|
|
696
|
+
columnNumber: 11
|
|
697
|
+
}, void 0) : t }, void 0, !1, {
|
|
698
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
699
|
+
lineNumber: 57,
|
|
700
|
+
columnNumber: 7
|
|
701
|
+
}, void 0),
|
|
702
|
+
i
|
|
703
|
+
] }, void 0, !0, {
|
|
704
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/listItem.tsx",
|
|
705
|
+
lineNumber: 56,
|
|
706
|
+
columnNumber: 5
|
|
707
|
+
}, void 0), He = 0.75, F = pe.create({
|
|
47
708
|
tableContainer: {
|
|
48
709
|
// width: "100%",
|
|
49
710
|
},
|
|
@@ -55,8 +716,8 @@ const N = 0.75, M = I.create({
|
|
|
55
716
|
display: "flex"
|
|
56
717
|
},
|
|
57
718
|
cell: {
|
|
58
|
-
paddingHorizontal: 5 *
|
|
59
|
-
paddingTop: 3 *
|
|
719
|
+
paddingHorizontal: 5 * He,
|
|
720
|
+
paddingTop: 3 * He,
|
|
60
721
|
// paddingBottom: 1 * PIXELS_PER_POINT, should be 3px but looks odd, better with no padding Bottom
|
|
61
722
|
borderLeft: "1px solid #ddd",
|
|
62
723
|
borderTop: "1px solid #ddd",
|
|
@@ -69,128 +730,261 @@ const N = 0.75, M = I.create({
|
|
|
69
730
|
rightCell: {
|
|
70
731
|
borderRight: "1px solid #ddd"
|
|
71
732
|
}
|
|
72
|
-
}),
|
|
73
|
-
|
|
733
|
+
}), Hr = (t) => /* @__PURE__ */ a.jsxDEV(x, { style: F.tableContainer, wrap: !1, children: t.data.rows.map((i, o) => /* @__PURE__ */ a.jsxDEV(
|
|
734
|
+
x,
|
|
74
735
|
{
|
|
75
736
|
style: [
|
|
76
|
-
|
|
77
|
-
|
|
737
|
+
F.row,
|
|
738
|
+
o === t.data.rows.length - 1 ? F.bottomCell : {}
|
|
78
739
|
],
|
|
79
|
-
children:
|
|
80
|
-
|
|
740
|
+
children: i.cells.map((u, m) => /* @__PURE__ */ a.jsxDEV(
|
|
741
|
+
x,
|
|
81
742
|
{
|
|
82
743
|
style: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
t.data.columnWidths[
|
|
744
|
+
F.cell,
|
|
745
|
+
m === i.cells.length - 1 ? F.rightCell : {},
|
|
746
|
+
t.data.columnWidths[m] ? { width: t.data.columnWidths[m] } : { flex: 1 }
|
|
86
747
|
],
|
|
87
|
-
children: t.transformer.transformInlineContent(
|
|
748
|
+
children: t.transformer.transformInlineContent(u)
|
|
749
|
+
},
|
|
750
|
+
m,
|
|
751
|
+
!1,
|
|
752
|
+
{
|
|
753
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/table/Table.tsx",
|
|
754
|
+
lineNumber: 61,
|
|
755
|
+
columnNumber: 11
|
|
88
756
|
},
|
|
89
|
-
|
|
757
|
+
void 0
|
|
90
758
|
))
|
|
91
759
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
760
|
+
o,
|
|
761
|
+
!1,
|
|
762
|
+
{
|
|
763
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/table/Table.tsx",
|
|
764
|
+
lineNumber: 54,
|
|
765
|
+
columnNumber: 7
|
|
766
|
+
},
|
|
767
|
+
void 0
|
|
768
|
+
)) }, void 0, !1, {
|
|
769
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/util/table/Table.tsx",
|
|
770
|
+
lineNumber: 52,
|
|
771
|
+
columnNumber: 3
|
|
772
|
+
}, void 0), w = 0.75, de = 16, Lr = {
|
|
773
|
+
paragraph: (t, i) => /* @__PURE__ */ a.jsxDEV(y, { children: i.transformInlineContent(t.content) }, void 0, !1, {
|
|
774
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
775
|
+
lineNumber: 29,
|
|
776
|
+
columnNumber: 12
|
|
777
|
+
}, void 0),
|
|
778
|
+
bulletListItem: (t, i) => /* @__PURE__ */ a.jsxDEV(le, { listMarker: Fr, children: /* @__PURE__ */ a.jsxDEV(y, { children: i.transformInlineContent(t.content) }, void 0, !1, {
|
|
779
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
780
|
+
lineNumber: 35,
|
|
781
|
+
columnNumber: 9
|
|
782
|
+
}, void 0) }, void 0, !1, {
|
|
783
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
784
|
+
lineNumber: 34,
|
|
785
|
+
columnNumber: 7
|
|
786
|
+
}, void 0),
|
|
787
|
+
numberedListItem: (t, i, o, u) => /* @__PURE__ */ a.jsxDEV(le, { listMarker: `${u}.`, children: /* @__PURE__ */ a.jsxDEV(y, { children: i.transformInlineContent(t.content) }, void 0, !1, {
|
|
788
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
789
|
+
lineNumber: 44,
|
|
790
|
+
columnNumber: 9
|
|
791
|
+
}, void 0) }, void 0, !1, {
|
|
792
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
793
|
+
lineNumber: 43,
|
|
794
|
+
columnNumber: 7
|
|
795
|
+
}, void 0),
|
|
97
796
|
// would be nice to have pdf checkboxes:
|
|
98
797
|
// https://github.com/diegomura/react-pdf/issues/2103
|
|
99
|
-
checkListItem: (t,
|
|
100
|
-
|
|
798
|
+
checkListItem: (t, i) => /* @__PURE__ */ a.jsxDEV(
|
|
799
|
+
le,
|
|
101
800
|
{
|
|
102
|
-
listMarker: t.props.checked ?
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
-
|
|
801
|
+
listMarker: t.props.checked ? Ar : Mr,
|
|
802
|
+
children: /* @__PURE__ */ a.jsxDEV(y, { children: i.transformInlineContent(t.content) }, void 0, !1, {
|
|
803
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
804
|
+
lineNumber: 56,
|
|
805
|
+
columnNumber: 9
|
|
806
|
+
}, void 0)
|
|
807
|
+
},
|
|
808
|
+
void 0,
|
|
809
|
+
!1,
|
|
810
|
+
{
|
|
811
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
812
|
+
lineNumber: 52,
|
|
813
|
+
columnNumber: 7
|
|
814
|
+
},
|
|
815
|
+
void 0
|
|
105
816
|
),
|
|
106
|
-
heading: (t,
|
|
107
|
-
const
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
-
|
|
817
|
+
heading: (t, i) => {
|
|
818
|
+
const o = t.props.level === 1 ? 2 : t.props.level === 2 ? 1.5 : 1.17;
|
|
819
|
+
return /* @__PURE__ */ a.jsxDEV(
|
|
820
|
+
y,
|
|
110
821
|
{
|
|
111
822
|
style: {
|
|
112
|
-
fontSize:
|
|
823
|
+
fontSize: o * de * w,
|
|
113
824
|
fontWeight: 700
|
|
114
825
|
},
|
|
115
|
-
children:
|
|
116
|
-
}
|
|
826
|
+
children: i.transformInlineContent(t.content)
|
|
827
|
+
},
|
|
828
|
+
void 0,
|
|
829
|
+
!1,
|
|
830
|
+
{
|
|
831
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
832
|
+
lineNumber: 64,
|
|
833
|
+
columnNumber: 7
|
|
834
|
+
},
|
|
835
|
+
void 0
|
|
117
836
|
);
|
|
118
837
|
},
|
|
119
838
|
codeBlock: (t) => {
|
|
120
|
-
var
|
|
121
|
-
const
|
|
122
|
-
`).map((
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
|
|
839
|
+
var u;
|
|
840
|
+
const o = (((u = t.content[0]) == null ? void 0 : u.text) || "").split(`
|
|
841
|
+
`).map((m, D) => {
|
|
842
|
+
var S;
|
|
843
|
+
const g = ((S = m.match(/^\s*/)) == null ? void 0 : S[0].length) || 0;
|
|
844
|
+
return /* @__PURE__ */ a.jsxDEV(
|
|
845
|
+
y,
|
|
127
846
|
{
|
|
128
847
|
style: {
|
|
129
|
-
marginLeft:
|
|
848
|
+
marginLeft: g * 9.5 * w
|
|
130
849
|
},
|
|
131
|
-
children:
|
|
850
|
+
children: m.trimStart() || /* @__PURE__ */ a.jsxDEV(a.Fragment, { children: " " }, void 0, !1, {
|
|
851
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
852
|
+
lineNumber: 84,
|
|
853
|
+
columnNumber: 32
|
|
854
|
+
}, void 0)
|
|
855
|
+
},
|
|
856
|
+
`line_${D}`,
|
|
857
|
+
!1,
|
|
858
|
+
{
|
|
859
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
860
|
+
lineNumber: 79,
|
|
861
|
+
columnNumber: 9
|
|
132
862
|
},
|
|
133
|
-
|
|
863
|
+
void 0
|
|
134
864
|
);
|
|
135
865
|
});
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
|
|
866
|
+
return /* @__PURE__ */ a.jsxDEV(
|
|
867
|
+
x,
|
|
138
868
|
{
|
|
139
869
|
wrap: !1,
|
|
140
870
|
style: {
|
|
141
|
-
padding: 24 *
|
|
871
|
+
padding: 24 * w,
|
|
142
872
|
backgroundColor: "#161616",
|
|
143
873
|
color: "#ffffff",
|
|
144
874
|
lineHeight: 1.25,
|
|
145
|
-
fontSize:
|
|
875
|
+
fontSize: de * w,
|
|
146
876
|
fontFamily: "GeistMono"
|
|
147
877
|
},
|
|
148
|
-
children:
|
|
149
|
-
}
|
|
878
|
+
children: o
|
|
879
|
+
},
|
|
880
|
+
void 0,
|
|
881
|
+
!1,
|
|
882
|
+
{
|
|
883
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
884
|
+
lineNumber: 90,
|
|
885
|
+
columnNumber: 7
|
|
886
|
+
},
|
|
887
|
+
void 0
|
|
150
888
|
);
|
|
151
889
|
},
|
|
152
|
-
pageBreak: () => /* @__PURE__ */
|
|
153
|
-
|
|
154
|
-
|
|
890
|
+
pageBreak: () => /* @__PURE__ */ a.jsxDEV(x, { break: !0 }, void 0, !1, {
|
|
891
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
892
|
+
lineNumber: 105,
|
|
893
|
+
columnNumber: 12
|
|
894
|
+
}, void 0),
|
|
895
|
+
audio: (t, i) => /* @__PURE__ */ a.jsxDEV(x, { wrap: !1, children: [
|
|
896
|
+
ce(
|
|
155
897
|
t.props,
|
|
156
898
|
"Open audio file",
|
|
157
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ a.jsxDEV(A, { height: 14, width: 14, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsxDEV(H, { 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" }, void 0, !1, {
|
|
900
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
901
|
+
lineNumber: 114,
|
|
902
|
+
columnNumber: 13
|
|
903
|
+
}, void 0) }, void 0, !1, {
|
|
904
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
905
|
+
lineNumber: 113,
|
|
906
|
+
columnNumber: 11
|
|
907
|
+
}, void 0)
|
|
158
908
|
),
|
|
159
|
-
|
|
160
|
-
] }
|
|
161
|
-
|
|
162
|
-
|
|
909
|
+
X(t.props)
|
|
910
|
+
] }, void 0, !0, {
|
|
911
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
912
|
+
lineNumber: 109,
|
|
913
|
+
columnNumber: 7
|
|
914
|
+
}, void 0),
|
|
915
|
+
video: (t, i) => /* @__PURE__ */ a.jsxDEV(x, { wrap: !1, children: [
|
|
916
|
+
ce(
|
|
163
917
|
t.props,
|
|
164
918
|
"Open video file",
|
|
165
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ a.jsxDEV(A, { height: 14, width: 14, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsxDEV(H, { 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" }, void 0, !1, {
|
|
920
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
921
|
+
lineNumber: 129,
|
|
922
|
+
columnNumber: 13
|
|
923
|
+
}, void 0) }, void 0, !1, {
|
|
924
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
925
|
+
lineNumber: 128,
|
|
926
|
+
columnNumber: 11
|
|
927
|
+
}, void 0)
|
|
166
928
|
),
|
|
167
|
-
|
|
168
|
-
] }
|
|
169
|
-
|
|
170
|
-
|
|
929
|
+
X(t.props)
|
|
930
|
+
] }, void 0, !0, {
|
|
931
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
932
|
+
lineNumber: 124,
|
|
933
|
+
columnNumber: 7
|
|
934
|
+
}, void 0),
|
|
935
|
+
file: (t, i) => /* @__PURE__ */ a.jsxDEV(x, { wrap: !1, children: [
|
|
936
|
+
ce(
|
|
171
937
|
t.props,
|
|
172
938
|
"Open file",
|
|
173
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ a.jsxDEV(A, { height: 16, width: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsxDEV(H, { 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" }, void 0, !1, {
|
|
940
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
941
|
+
lineNumber: 144,
|
|
942
|
+
columnNumber: 13
|
|
943
|
+
}, void 0) }, void 0, !1, {
|
|
944
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
945
|
+
lineNumber: 143,
|
|
946
|
+
columnNumber: 11
|
|
947
|
+
}, void 0)
|
|
174
948
|
),
|
|
175
|
-
|
|
176
|
-
] }
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
949
|
+
X(t.props)
|
|
950
|
+
] }, void 0, !0, {
|
|
951
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
952
|
+
lineNumber: 139,
|
|
953
|
+
columnNumber: 7
|
|
954
|
+
}, void 0),
|
|
955
|
+
image: async (t, i) => /* @__PURE__ */ a.jsxDEV(x, { wrap: !1, children: [
|
|
956
|
+
/* @__PURE__ */ a.jsxDEV(
|
|
957
|
+
jr,
|
|
180
958
|
{
|
|
181
|
-
src: await
|
|
959
|
+
src: await i.resolveFile(t.props.url),
|
|
182
960
|
style: {
|
|
183
|
-
width: t.props.previewWidth *
|
|
961
|
+
width: t.props.previewWidth * w
|
|
184
962
|
}
|
|
185
|
-
}
|
|
963
|
+
},
|
|
964
|
+
void 0,
|
|
965
|
+
!1,
|
|
966
|
+
{
|
|
967
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
968
|
+
lineNumber: 155,
|
|
969
|
+
columnNumber: 9
|
|
970
|
+
},
|
|
971
|
+
void 0
|
|
186
972
|
),
|
|
187
|
-
|
|
188
|
-
] }
|
|
189
|
-
|
|
973
|
+
X(t.props)
|
|
974
|
+
] }, void 0, !0, {
|
|
975
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
976
|
+
lineNumber: 154,
|
|
977
|
+
columnNumber: 7
|
|
978
|
+
}, void 0),
|
|
979
|
+
table: (t, i) => /* @__PURE__ */ a.jsxDEV(Hr, { data: t.content, transformer: i }, void 0, !1, {
|
|
980
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
981
|
+
lineNumber: 166,
|
|
982
|
+
columnNumber: 12
|
|
983
|
+
}, void 0)
|
|
190
984
|
};
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
|
|
985
|
+
function ce(t, i, o, u) {
|
|
986
|
+
return /* @__PURE__ */ a.jsxDEV(We, { src: t.url, children: /* @__PURE__ */ a.jsxDEV(
|
|
987
|
+
x,
|
|
194
988
|
{
|
|
195
989
|
style: {
|
|
196
990
|
display: "flex",
|
|
@@ -198,29 +992,57 @@ function b(t, r, e, o) {
|
|
|
198
992
|
flexDirection: "row"
|
|
199
993
|
},
|
|
200
994
|
children: [
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
995
|
+
o,
|
|
996
|
+
/* @__PURE__ */ a.jsxDEV(y, { children: t.name || i }, void 0, !1, {
|
|
997
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
998
|
+
lineNumber: 186,
|
|
999
|
+
columnNumber: 9
|
|
1000
|
+
}, this)
|
|
203
1001
|
]
|
|
204
|
-
}
|
|
205
|
-
|
|
1002
|
+
},
|
|
1003
|
+
void 0,
|
|
1004
|
+
!0,
|
|
1005
|
+
{
|
|
1006
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
1007
|
+
lineNumber: 179,
|
|
1008
|
+
columnNumber: 7
|
|
1009
|
+
},
|
|
1010
|
+
this
|
|
1011
|
+
) }, void 0, !1, {
|
|
1012
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
1013
|
+
lineNumber: 178,
|
|
1014
|
+
columnNumber: 5
|
|
1015
|
+
}, this);
|
|
206
1016
|
}
|
|
207
|
-
function
|
|
1017
|
+
function X(t, i) {
|
|
208
1018
|
if (t.caption)
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
|
|
1019
|
+
return /* @__PURE__ */ a.jsxDEV(
|
|
1020
|
+
y,
|
|
211
1021
|
{
|
|
212
1022
|
style: {
|
|
213
|
-
width: t.previewWidth ? t.previewWidth *
|
|
214
|
-
fontSize:
|
|
1023
|
+
width: t.previewWidth ? t.previewWidth * w : void 0,
|
|
1024
|
+
fontSize: de * 0.8 * w
|
|
215
1025
|
},
|
|
216
1026
|
children: t.caption
|
|
217
|
-
}
|
|
1027
|
+
},
|
|
1028
|
+
void 0,
|
|
1029
|
+
!1,
|
|
1030
|
+
{
|
|
1031
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx",
|
|
1032
|
+
lineNumber: 200,
|
|
1033
|
+
columnNumber: 5
|
|
1034
|
+
},
|
|
1035
|
+
this
|
|
218
1036
|
);
|
|
219
1037
|
}
|
|
220
|
-
const
|
|
221
|
-
link: (t,
|
|
222
|
-
|
|
223
|
-
|
|
1038
|
+
const Wr = {
|
|
1039
|
+
link: (t, i) => /* @__PURE__ */ a.jsxDEV(We, { href: t.href, children: t.content.map((o) => i.transformStyledText(o)) }, void 0, !1, {
|
|
1040
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/defaultSchema/inlinecontent.tsx",
|
|
1041
|
+
lineNumber: 15,
|
|
1042
|
+
columnNumber: 7
|
|
1043
|
+
}, void 0),
|
|
1044
|
+
text: (t, i) => i.transformStyledText(t)
|
|
1045
|
+
}, $r = {
|
|
224
1046
|
bold: (t) => t ? {
|
|
225
1047
|
fontWeight: "bold"
|
|
226
1048
|
} : {},
|
|
@@ -234,67 +1056,67 @@ const $ = {
|
|
|
234
1056
|
strike: (t) => t ? {
|
|
235
1057
|
textDecoration: "line-through"
|
|
236
1058
|
} : {},
|
|
237
|
-
backgroundColor: (t,
|
|
238
|
-
backgroundColor:
|
|
1059
|
+
backgroundColor: (t, i) => t ? {
|
|
1060
|
+
backgroundColor: i.options.colors[t].background
|
|
239
1061
|
} : {},
|
|
240
|
-
textColor: (t,
|
|
241
|
-
color:
|
|
1062
|
+
textColor: (t, i) => t ? {
|
|
1063
|
+
color: i.options.colors[t].text
|
|
242
1064
|
} : {},
|
|
243
1065
|
code: (t) => t ? {
|
|
244
1066
|
fontFamily: "GeistMono"
|
|
245
1067
|
} : {}
|
|
246
|
-
},
|
|
247
|
-
blockMapping:
|
|
248
|
-
inlineContentMapping:
|
|
249
|
-
styleMapping:
|
|
1068
|
+
}, Jr = {
|
|
1069
|
+
blockMapping: Lr,
|
|
1070
|
+
inlineContentMapping: Wr,
|
|
1071
|
+
styleMapping: $r
|
|
250
1072
|
};
|
|
251
|
-
async function
|
|
1073
|
+
async function Zr(t) {
|
|
252
1074
|
return "https://corsproxy.api.blocknotejs.org/corsproxy/?url=" + encodeURIComponent(t);
|
|
253
1075
|
}
|
|
254
|
-
var
|
|
255
|
-
async function
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
return `data:${
|
|
1076
|
+
var $e = { BASE_URL: "/", MODE: "production", DEV: !0, PROD: !1, SSR: !1 };
|
|
1077
|
+
async function Yr(t, i) {
|
|
1078
|
+
if ($e.NODE_ENV === "test") {
|
|
1079
|
+
const u = (await zr(t)).toString("base64");
|
|
1080
|
+
return `data:${i};base64,${u}`;
|
|
259
1081
|
} else
|
|
260
1082
|
return t.default;
|
|
261
1083
|
}
|
|
262
|
-
async function
|
|
263
|
-
return
|
|
1084
|
+
async function M(t) {
|
|
1085
|
+
return Yr(t, "font/ttf");
|
|
264
1086
|
}
|
|
265
|
-
async function
|
|
266
|
-
if (
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
return
|
|
1087
|
+
async function zr(t) {
|
|
1088
|
+
if ($e.NODE_ENV === "test") {
|
|
1089
|
+
const i = require("fs");
|
|
1090
|
+
let o = t.default;
|
|
1091
|
+
return o.startsWith("/@fs/") && (o = o.substring(4)), i.readFileSync(o);
|
|
270
1092
|
} else {
|
|
271
|
-
const
|
|
272
|
-
return await (await fetch(
|
|
1093
|
+
const i = t.default;
|
|
1094
|
+
return await (await fetch(i)).arrayBuffer();
|
|
273
1095
|
}
|
|
274
1096
|
}
|
|
275
|
-
const
|
|
276
|
-
class
|
|
277
|
-
constructor(
|
|
278
|
-
const
|
|
1097
|
+
const Le = 16, fe = 0.75;
|
|
1098
|
+
class Qr extends Pr {
|
|
1099
|
+
constructor(o, u, m) {
|
|
1100
|
+
const g = {
|
|
279
1101
|
...{
|
|
280
1102
|
emojiSource: {
|
|
281
1103
|
format: "png",
|
|
282
1104
|
url: "https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/"
|
|
283
1105
|
},
|
|
284
|
-
resolveFileUrl:
|
|
285
|
-
colors:
|
|
1106
|
+
resolveFileUrl: Zr,
|
|
1107
|
+
colors: Br
|
|
286
1108
|
},
|
|
287
|
-
...
|
|
1109
|
+
...m
|
|
288
1110
|
};
|
|
289
|
-
super(
|
|
290
|
-
|
|
291
|
-
|
|
1111
|
+
super(o, u, g);
|
|
1112
|
+
z(this, "fontsRegistered", !1);
|
|
1113
|
+
z(this, "styles", pe.create({
|
|
292
1114
|
page: {
|
|
293
1115
|
paddingTop: 35,
|
|
294
1116
|
paddingBottom: 65,
|
|
295
1117
|
paddingHorizontal: 35,
|
|
296
1118
|
fontFamily: "Inter",
|
|
297
|
-
fontSize:
|
|
1119
|
+
fontSize: Le * fe,
|
|
298
1120
|
// pixels
|
|
299
1121
|
lineHeight: 1.5
|
|
300
1122
|
},
|
|
@@ -306,107 +1128,135 @@ class rt extends Z {
|
|
|
306
1128
|
position: "absolute"
|
|
307
1129
|
}
|
|
308
1130
|
}));
|
|
309
|
-
|
|
310
|
-
this.schema =
|
|
1131
|
+
z(this, "options");
|
|
1132
|
+
this.schema = o, this.options = g;
|
|
311
1133
|
}
|
|
312
1134
|
/**
|
|
313
1135
|
* Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
|
|
314
1136
|
*/
|
|
315
|
-
transformStyledText(
|
|
316
|
-
const
|
|
317
|
-
return /* @__PURE__ */
|
|
1137
|
+
transformStyledText(o) {
|
|
1138
|
+
const u = this.mapStyles(o.styles), m = Object.assign({}, ...u);
|
|
1139
|
+
return /* @__PURE__ */ a.jsxDEV(y, { style: m, children: o.text }, void 0, !1, {
|
|
1140
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1141
|
+
lineNumber: 121,
|
|
1142
|
+
columnNumber: 12
|
|
1143
|
+
}, this);
|
|
318
1144
|
}
|
|
319
1145
|
/**
|
|
320
1146
|
* Mostly for internal use, you probably want to use `toBlob` or `toReactPDFDocument` instead.
|
|
321
1147
|
*/
|
|
322
|
-
async transformBlocks(
|
|
323
|
-
const
|
|
324
|
-
let
|
|
325
|
-
for (const
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
1148
|
+
async transformBlocks(o, u = 0) {
|
|
1149
|
+
const m = [];
|
|
1150
|
+
let D = 0;
|
|
1151
|
+
for (const g of o) {
|
|
1152
|
+
g.type === "numberedListItem" ? D++ : D = 0;
|
|
1153
|
+
const S = await this.transformBlocks(g.children, u + 1), R = await this.mapBlock(
|
|
1154
|
+
g,
|
|
1155
|
+
u,
|
|
1156
|
+
D
|
|
331
1157
|
);
|
|
332
|
-
if (
|
|
333
|
-
|
|
1158
|
+
if (g.type === "pageBreak") {
|
|
1159
|
+
m.push(R);
|
|
334
1160
|
continue;
|
|
335
1161
|
}
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
|
|
1162
|
+
const B = this.blocknoteDefaultPropsToReactPDFStyle(g.props);
|
|
1163
|
+
m.push(
|
|
1164
|
+
/* @__PURE__ */ a.jsxDEV(a.Fragment, { children: [
|
|
1165
|
+
/* @__PURE__ */ a.jsxDEV(
|
|
1166
|
+
x,
|
|
341
1167
|
{
|
|
342
1168
|
style: {
|
|
343
|
-
paddingVertical: 3 *
|
|
1169
|
+
paddingVertical: 3 * fe,
|
|
344
1170
|
...this.styles.block,
|
|
345
|
-
...
|
|
1171
|
+
...B
|
|
346
1172
|
},
|
|
347
|
-
children:
|
|
348
|
-
}
|
|
1173
|
+
children: R
|
|
1174
|
+
},
|
|
1175
|
+
void 0,
|
|
1176
|
+
!1,
|
|
1177
|
+
{
|
|
1178
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1179
|
+
lineNumber: 155,
|
|
1180
|
+
columnNumber: 11
|
|
1181
|
+
},
|
|
1182
|
+
this
|
|
349
1183
|
),
|
|
350
|
-
|
|
351
|
-
|
|
1184
|
+
S.length > 0 && /* @__PURE__ */ a.jsxDEV(
|
|
1185
|
+
x,
|
|
352
1186
|
{
|
|
353
1187
|
style: {
|
|
354
|
-
marginLeft:
|
|
1188
|
+
marginLeft: Le * 1.5 * fe,
|
|
355
1189
|
...this.styles.blockChildren
|
|
356
1190
|
},
|
|
357
|
-
children:
|
|
358
|
-
}
|
|
1191
|
+
children: S
|
|
1192
|
+
},
|
|
1193
|
+
void 0,
|
|
1194
|
+
!1,
|
|
1195
|
+
{
|
|
1196
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1197
|
+
lineNumber: 164,
|
|
1198
|
+
columnNumber: 13
|
|
1199
|
+
},
|
|
1200
|
+
this
|
|
359
1201
|
)
|
|
360
|
-
] }
|
|
1202
|
+
] }, void 0, !0, {
|
|
1203
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1204
|
+
lineNumber: 154,
|
|
1205
|
+
columnNumber: 9
|
|
1206
|
+
}, this)
|
|
361
1207
|
);
|
|
362
1208
|
}
|
|
363
|
-
return
|
|
1209
|
+
return m;
|
|
364
1210
|
}
|
|
365
1211
|
async registerFonts() {
|
|
366
1212
|
if (this.fontsRegistered)
|
|
367
1213
|
return;
|
|
368
|
-
this.options.emojiSource &&
|
|
369
|
-
let
|
|
1214
|
+
this.options.emojiSource && P.registerEmojiSource(this.options.emojiSource);
|
|
1215
|
+
let o = await M(
|
|
370
1216
|
await import("./Inter_18pt-Regular-byxnNS-8.js")
|
|
371
1217
|
);
|
|
372
|
-
|
|
1218
|
+
P.register({
|
|
373
1219
|
family: "Inter",
|
|
374
|
-
src:
|
|
375
|
-
}),
|
|
1220
|
+
src: o
|
|
1221
|
+
}), o = await M(
|
|
376
1222
|
await import("./Inter_18pt-Italic-BVnfHlUD.js")
|
|
377
|
-
),
|
|
1223
|
+
), P.register({
|
|
378
1224
|
family: "Inter",
|
|
379
1225
|
fontStyle: "italic",
|
|
380
|
-
src:
|
|
381
|
-
}),
|
|
1226
|
+
src: o
|
|
1227
|
+
}), o = await M(
|
|
382
1228
|
await import("./Inter_18pt-Bold-BOnnSImi.js")
|
|
383
|
-
),
|
|
1229
|
+
), P.register({
|
|
384
1230
|
family: "Inter",
|
|
385
|
-
src:
|
|
1231
|
+
src: o,
|
|
386
1232
|
fontWeight: "bold"
|
|
387
|
-
}),
|
|
1233
|
+
}), o = await M(
|
|
388
1234
|
await import("./Inter_18pt-BoldItalic-DPKIpVzB.js")
|
|
389
|
-
),
|
|
1235
|
+
), P.register({
|
|
390
1236
|
family: "Inter",
|
|
391
1237
|
fontStyle: "italic",
|
|
392
|
-
src:
|
|
1238
|
+
src: o,
|
|
393
1239
|
fontWeight: "bold"
|
|
394
|
-
}),
|
|
1240
|
+
}), o = await M(
|
|
395
1241
|
await import("./GeistMono-Regular-D4rKXxwr.js")
|
|
396
|
-
),
|
|
1242
|
+
), P.register({
|
|
397
1243
|
family: "GeistMono",
|
|
398
|
-
src:
|
|
1244
|
+
src: o
|
|
399
1245
|
}), this.fontsRegistered = !0;
|
|
400
1246
|
}
|
|
401
1247
|
/**
|
|
402
1248
|
* Convert a document (array of Blocks) to a react-pdf Document.
|
|
403
1249
|
*/
|
|
404
|
-
async toReactPDFDocument(
|
|
405
|
-
return await this.registerFonts(), /* @__PURE__ */
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
1250
|
+
async toReactPDFDocument(o, u = {}) {
|
|
1251
|
+
return await this.registerFonts(), /* @__PURE__ */ a.jsxDEV(Tr, { children: /* @__PURE__ */ a.jsxDEV(Vr, { dpi: 100, size: "A4", style: this.styles.page, children: [
|
|
1252
|
+
u.header && /* @__PURE__ */ a.jsxDEV(x, { fixed: !0, style: this.styles.header, children: u.header }, void 0, !1, {
|
|
1253
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1254
|
+
lineNumber: 258,
|
|
1255
|
+
columnNumber: 13
|
|
1256
|
+
}, this),
|
|
1257
|
+
await this.transformBlocks(o),
|
|
1258
|
+
u.footer && /* @__PURE__ */ a.jsxDEV(
|
|
1259
|
+
x,
|
|
410
1260
|
{
|
|
411
1261
|
fixed: !0,
|
|
412
1262
|
style: [
|
|
@@ -417,22 +1267,38 @@ class rt extends Z {
|
|
|
417
1267
|
},
|
|
418
1268
|
this.styles.footer
|
|
419
1269
|
],
|
|
420
|
-
children:
|
|
421
|
-
}
|
|
1270
|
+
children: u.footer
|
|
1271
|
+
},
|
|
1272
|
+
void 0,
|
|
1273
|
+
!1,
|
|
1274
|
+
{
|
|
1275
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1276
|
+
lineNumber: 264,
|
|
1277
|
+
columnNumber: 13
|
|
1278
|
+
},
|
|
1279
|
+
this
|
|
422
1280
|
)
|
|
423
|
-
] }
|
|
1281
|
+
] }, void 0, !0, {
|
|
1282
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1283
|
+
lineNumber: 256,
|
|
1284
|
+
columnNumber: 9
|
|
1285
|
+
}, this) }, void 0, !1, {
|
|
1286
|
+
fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-pdf-exporter/src/pdf/pdfExporter.tsx",
|
|
1287
|
+
lineNumber: 255,
|
|
1288
|
+
columnNumber: 7
|
|
1289
|
+
}, this);
|
|
424
1290
|
}
|
|
425
|
-
blocknoteDefaultPropsToReactPDFStyle(
|
|
1291
|
+
blocknoteDefaultPropsToReactPDFStyle(o) {
|
|
426
1292
|
return {
|
|
427
|
-
textAlign:
|
|
428
|
-
backgroundColor:
|
|
429
|
-
color:
|
|
430
|
-
alignItems:
|
|
1293
|
+
textAlign: o.textAlignment,
|
|
1294
|
+
backgroundColor: o.backgroundColor === "default" || !o.backgroundColor ? void 0 : this.options.colors[o.backgroundColor].background,
|
|
1295
|
+
color: o.textColor === "default" || !o.textColor ? void 0 : this.options.colors[o.textColor].text,
|
|
1296
|
+
alignItems: o.textAlignment === "right" ? "flex-end" : o.textAlignment === "center" ? "center" : void 0
|
|
431
1297
|
};
|
|
432
1298
|
}
|
|
433
1299
|
}
|
|
434
1300
|
export {
|
|
435
|
-
|
|
436
|
-
|
|
1301
|
+
Qr as PDFExporter,
|
|
1302
|
+
Jr as pdfDefaultSchemaMappings
|
|
437
1303
|
};
|
|
438
1304
|
//# sourceMappingURL=blocknote-xl-pdf-exporter.js.map
|