brick-pdf 0.3.1 → 0.4.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.
- package/dist/brick-pdf.css +1 -1
- package/dist/brick-pdf.js +503 -484
- package/dist/brick-pdf.umd.cjs +4 -4
- package/dist/composables/useElementActions.d.ts +1 -0
- package/dist/types/element.d.ts +1 -0
- package/package.json +1 -1
package/dist/brick-pdf.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, openBlock as
|
|
1
|
+
import { defineComponent as _, openBlock as a, createElementBlock as c, normalizeStyle as N, toDisplayString as w, renderSlot as Z, normalizeClass as ee, createElementVNode as m, Fragment as C, renderList as P, reactive as ze, provide as D, inject as L, toRaw as J, ref as E, computed as I, createTextVNode as ie, createCommentVNode as $, createBlock as M, resolveDynamicComponent as te, withCtx as Y, onMounted as ye, onBeforeUnmount as me, unref as k, resolveComponent as Te, withDirectives as X, vModelSelect as se, createVNode as B, vModelText as De, watch as Le } from "vue";
|
|
2
2
|
import { useMagicKeys as Me, whenever as ae } from "@vueuse/core";
|
|
3
3
|
import ce from "sortablejs";
|
|
4
4
|
function ne() {
|
|
@@ -14,18 +14,18 @@ function ne() {
|
|
|
14
14
|
content: []
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const q = /* @__PURE__ */ new Map();
|
|
18
18
|
function z(e) {
|
|
19
|
-
|
|
19
|
+
q.set(e.type, e);
|
|
20
20
|
}
|
|
21
21
|
function U(e) {
|
|
22
|
-
return
|
|
22
|
+
return q.get(e);
|
|
23
23
|
}
|
|
24
24
|
function Be() {
|
|
25
|
-
return Array.from(
|
|
25
|
+
return Array.from(q.values());
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function ir(e) {
|
|
28
|
+
return q.delete(e);
|
|
29
29
|
}
|
|
30
30
|
function Oe() {
|
|
31
31
|
return { text: "New Text" };
|
|
@@ -43,7 +43,7 @@ const Fe = /* @__PURE__ */ _({
|
|
|
43
43
|
node: {}
|
|
44
44
|
},
|
|
45
45
|
setup(e) {
|
|
46
|
-
return (t, n) => (
|
|
46
|
+
return (t, n) => (a(), c("div", {
|
|
47
47
|
class: "brick-el-text",
|
|
48
48
|
style: N({
|
|
49
49
|
fontSize: (e.node.style.fontSize ?? 12) + "px",
|
|
@@ -60,8 +60,8 @@ const Fe = /* @__PURE__ */ _({
|
|
|
60
60
|
}
|
|
61
61
|
}), x = (e, t) => {
|
|
62
62
|
const n = e.__vccOpts || e;
|
|
63
|
-
for (const [
|
|
64
|
-
n[
|
|
63
|
+
for (const [i, s] of t)
|
|
64
|
+
n[i] = s;
|
|
65
65
|
return n;
|
|
66
66
|
}, He = /* @__PURE__ */ x(Fe, [["__scopeId", "data-v-a7cd1565"]]), Je = { class: "brick-text-editor" }, Ue = /* @__PURE__ */ _({
|
|
67
67
|
__name: "TextPropertyEditor",
|
|
@@ -69,7 +69,7 @@ const Fe = /* @__PURE__ */ _({
|
|
|
69
69
|
node: {}
|
|
70
70
|
},
|
|
71
71
|
setup(e) {
|
|
72
|
-
return (t, n) => (
|
|
72
|
+
return (t, n) => (a(), c("div", Je));
|
|
73
73
|
}
|
|
74
74
|
}), We = {
|
|
75
75
|
type: "text",
|
|
@@ -118,27 +118,27 @@ function qe(e, t) {
|
|
|
118
118
|
};
|
|
119
119
|
return e.style.margin && (n.margin = e.style.margin), e.style.fillColor && (n.fillColor = e.style.fillColor), n;
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const Ke = /* @__PURE__ */ _({
|
|
122
122
|
__name: "StackRenderer",
|
|
123
123
|
props: {
|
|
124
124
|
node: {},
|
|
125
125
|
path: {}
|
|
126
126
|
},
|
|
127
127
|
setup(e) {
|
|
128
|
-
return (t, n) => (
|
|
128
|
+
return (t, n) => (a(), c("div", {
|
|
129
129
|
class: "brick-el-stack",
|
|
130
130
|
style: N({ backgroundColor: e.node.style.fillColor })
|
|
131
131
|
}, [
|
|
132
132
|
Z(t.$slots, "default", {}, void 0, !0)
|
|
133
133
|
], 4));
|
|
134
134
|
}
|
|
135
|
-
}),
|
|
135
|
+
}), Ge = /* @__PURE__ */ x(Ke, [["__scopeId", "data-v-c59e7405"]]), Xe = { class: "brick-stack-editor" }, Qe = /* @__PURE__ */ _({
|
|
136
136
|
__name: "StackPropertyEditor",
|
|
137
137
|
props: {
|
|
138
138
|
node: {}
|
|
139
139
|
},
|
|
140
140
|
setup(e) {
|
|
141
|
-
return (t, n) => (
|
|
141
|
+
return (t, n) => (a(), c("div", Xe));
|
|
142
142
|
}
|
|
143
143
|
}), Ze = {
|
|
144
144
|
type: "stack",
|
|
@@ -148,7 +148,7 @@ const Ge = /* @__PURE__ */ _({
|
|
|
148
148
|
acceptsChildTypes: null,
|
|
149
149
|
defaultProps: je,
|
|
150
150
|
defaultStyle: Ye,
|
|
151
|
-
rendererComponent:
|
|
151
|
+
rendererComponent: Ge,
|
|
152
152
|
propertyEditorComponent: Qe,
|
|
153
153
|
propertyFields: [
|
|
154
154
|
{ key: "style.fillColor", label: "Fill Color", section: "style", type: "color" },
|
|
@@ -176,7 +176,7 @@ const ot = /* @__PURE__ */ _({
|
|
|
176
176
|
path: {}
|
|
177
177
|
},
|
|
178
178
|
setup(e) {
|
|
179
|
-
return (t, n) => (
|
|
179
|
+
return (t, n) => (a(), c("div", {
|
|
180
180
|
class: "brick-el-columns",
|
|
181
181
|
style: N({ "--column-gap": (e.node.props.columnGap ?? 10) + "px" })
|
|
182
182
|
}, [
|
|
@@ -189,7 +189,7 @@ const ot = /* @__PURE__ */ _({
|
|
|
189
189
|
node: {}
|
|
190
190
|
},
|
|
191
191
|
setup(e) {
|
|
192
|
-
return (t, n) => (
|
|
192
|
+
return (t, n) => (a(), c("div", lt));
|
|
193
193
|
}
|
|
194
194
|
}), st = {
|
|
195
195
|
type: "columns",
|
|
@@ -227,11 +227,11 @@ function dt(e) {
|
|
|
227
227
|
headerRows: e.props.headerRows,
|
|
228
228
|
widths: e.props.widths,
|
|
229
229
|
body: t.map(
|
|
230
|
-
(
|
|
230
|
+
(s) => s.map((o) => ({ text: o }))
|
|
231
231
|
)
|
|
232
232
|
}
|
|
233
|
-
},
|
|
234
|
-
return
|
|
233
|
+
}, i = e.props.layout;
|
|
234
|
+
return i && i !== "none" && (n.layout = i), e.style.fontSize && (n.fontSize = e.style.fontSize), e.style.color && (n.color = e.style.color), e.style.margin && (n.margin = e.style.margin), n;
|
|
235
235
|
}
|
|
236
236
|
const ut = /* @__PURE__ */ _({
|
|
237
237
|
__name: "TableRenderer",
|
|
@@ -239,23 +239,23 @@ const ut = /* @__PURE__ */ _({
|
|
|
239
239
|
node: {}
|
|
240
240
|
},
|
|
241
241
|
setup(e) {
|
|
242
|
-
return (t, n) => (
|
|
242
|
+
return (t, n) => (a(), c("div", {
|
|
243
243
|
class: ee(["brick-el-table", "brick-el-table--" + (e.node.props.layout ?? "lightHorizontalLines")]),
|
|
244
244
|
style: N({ fontSize: (e.node.style.fontSize ?? 12) + "px", color: e.node.style.color })
|
|
245
245
|
}, [
|
|
246
246
|
m("table", null, [
|
|
247
247
|
m("thead", null, [
|
|
248
|
-
(
|
|
249
|
-
key: "h" +
|
|
248
|
+
(a(!0), c(C, null, P(e.node.props.body.slice(0, e.node.props.headerRows), (i, s) => (a(), c("tr", {
|
|
249
|
+
key: "h" + s
|
|
250
250
|
}, [
|
|
251
|
-
(
|
|
251
|
+
(a(!0), c(C, null, P(i, (o, p) => (a(), c("th", { key: p }, w(o), 1))), 128))
|
|
252
252
|
]))), 128))
|
|
253
253
|
]),
|
|
254
254
|
m("tbody", null, [
|
|
255
|
-
(
|
|
256
|
-
key: "b" +
|
|
255
|
+
(a(!0), c(C, null, P(e.node.props.body.slice(e.node.props.headerRows), (i, s) => (a(), c("tr", {
|
|
256
|
+
key: "b" + s
|
|
257
257
|
}, [
|
|
258
|
-
(
|
|
258
|
+
(a(!0), c(C, null, P(i, (o, p) => (a(), c("td", { key: p }, w(o), 1))), 128))
|
|
259
259
|
]))), 128))
|
|
260
260
|
])
|
|
261
261
|
])
|
|
@@ -282,38 +282,38 @@ function ft(e) {
|
|
|
282
282
|
const t = e ? de(e) : ne();
|
|
283
283
|
for (const d of t.content) Q(d);
|
|
284
284
|
const n = ze(t);
|
|
285
|
-
function
|
|
286
|
-
const
|
|
287
|
-
for (let
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
290
|
-
if (
|
|
291
|
-
return { node:
|
|
292
|
-
if (
|
|
293
|
-
const
|
|
294
|
-
if (
|
|
285
|
+
function i(d, r) {
|
|
286
|
+
const l = r ?? n.content;
|
|
287
|
+
for (let u = 0; u < l.length; u++) {
|
|
288
|
+
const b = l[u];
|
|
289
|
+
if (b) {
|
|
290
|
+
if (b.id === d)
|
|
291
|
+
return { node: b, parent: l, index: u };
|
|
292
|
+
if (b.children.length > 0) {
|
|
293
|
+
const y = i(d, b.children);
|
|
294
|
+
if (y) return y;
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
return null;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function s(d) {
|
|
301
301
|
n.content.splice(0, n.content.length, ...d);
|
|
302
302
|
}
|
|
303
303
|
function o() {
|
|
304
304
|
return JSON.parse(JSON.stringify(J(n.content)));
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function p(d) {
|
|
307
307
|
const r = de(d);
|
|
308
|
-
for (const
|
|
308
|
+
for (const l of r.content) Q(l);
|
|
309
309
|
n.pageSize = r.pageSize, n.pageOrientation = r.pageOrientation, n.pageMargins = r.pageMargins, n.defaultStyle = r.defaultStyle, n.styles = r.styles, n.content.splice(0, n.content.length, ...r.content);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function f() {
|
|
312
312
|
return JSON.parse(JSON.stringify(J(n)));
|
|
313
313
|
}
|
|
314
|
-
return { document: n, findNodeById:
|
|
314
|
+
return { document: n, findNodeById: i, replaceContent: s, snapshotContent: o, loadDocument: p, exportDocument: f };
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function yt(e) {
|
|
317
317
|
D(ge, e);
|
|
318
318
|
}
|
|
319
319
|
function oe() {
|
|
@@ -323,15 +323,15 @@ function oe() {
|
|
|
323
323
|
return e;
|
|
324
324
|
}
|
|
325
325
|
const be = /* @__PURE__ */ Symbol("brick-pdf-selection");
|
|
326
|
-
function
|
|
326
|
+
function mt(e) {
|
|
327
327
|
const t = E(null), n = I(() => t.value ? e.findNodeById(t.value)?.node ?? null : null);
|
|
328
|
-
function
|
|
328
|
+
function i(o) {
|
|
329
329
|
t.value = o;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function s() {
|
|
332
332
|
t.value = null;
|
|
333
333
|
}
|
|
334
|
-
return { selectedId: t, selectedNode: n, select:
|
|
334
|
+
return { selectedId: t, selectedNode: n, select: i, deselect: s };
|
|
335
335
|
}
|
|
336
336
|
function gt(e) {
|
|
337
337
|
D(be, e);
|
|
@@ -342,71 +342,75 @@ function W() {
|
|
|
342
342
|
throw new Error("useSelection() requires a BrickPdf ancestor component");
|
|
343
343
|
return e;
|
|
344
344
|
}
|
|
345
|
-
const
|
|
345
|
+
const ve = /* @__PURE__ */ Symbol("brick-pdf-element-actions");
|
|
346
346
|
let bt = 0;
|
|
347
|
-
function
|
|
347
|
+
function he() {
|
|
348
348
|
return `el-${Date.now()}-${++bt}`;
|
|
349
349
|
}
|
|
350
350
|
function _e(e) {
|
|
351
351
|
return {
|
|
352
352
|
...e,
|
|
353
|
-
id:
|
|
353
|
+
id: he(),
|
|
354
354
|
props: structuredClone(e.props),
|
|
355
355
|
style: structuredClone(e.style),
|
|
356
356
|
children: e.children.map(_e)
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
function n(
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
359
|
+
function vt(e, t) {
|
|
360
|
+
function n(r, l, u) {
|
|
361
|
+
const b = U(r);
|
|
362
|
+
if (!b) return null;
|
|
363
363
|
t.record();
|
|
364
|
-
const
|
|
365
|
-
id:
|
|
366
|
-
type:
|
|
367
|
-
props:
|
|
368
|
-
style:
|
|
364
|
+
const y = {
|
|
365
|
+
id: he(),
|
|
366
|
+
type: r,
|
|
367
|
+
props: b.defaultProps(),
|
|
368
|
+
style: b.defaultStyle(),
|
|
369
369
|
children: []
|
|
370
|
-
},
|
|
371
|
-
if (!
|
|
372
|
-
const
|
|
373
|
-
return
|
|
370
|
+
}, g = l ? e.findNodeById(l)?.node.children : e.document.content;
|
|
371
|
+
if (!g) return null;
|
|
372
|
+
const v = u ?? g.length;
|
|
373
|
+
return g.splice(v, 0, y), y;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
const
|
|
377
|
-
|
|
375
|
+
function i(r) {
|
|
376
|
+
const l = e.findNodeById(r);
|
|
377
|
+
l && (t.record(), l.parent.splice(l.index, 1));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const
|
|
381
|
-
if (!
|
|
379
|
+
function s(r, l, u) {
|
|
380
|
+
const b = e.findNodeById(r);
|
|
381
|
+
if (!b) return;
|
|
382
382
|
t.record();
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
385
|
-
const
|
|
386
|
-
|
|
383
|
+
const y = b.parent.splice(b.index, 1)[0];
|
|
384
|
+
if (!y) return;
|
|
385
|
+
const g = l ? e.findNodeById(l)?.node.children : e.document.content;
|
|
386
|
+
g && g.splice(u, 0, y);
|
|
387
387
|
}
|
|
388
|
-
function o(
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
388
|
+
function o(r) {
|
|
389
|
+
const l = e.findNodeById(r);
|
|
390
|
+
if (!l) return null;
|
|
391
391
|
t.record();
|
|
392
|
-
const
|
|
393
|
-
return
|
|
392
|
+
const u = _e(l.node);
|
|
393
|
+
return l.parent.splice(l.index + 1, 0, u), u;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
const
|
|
397
|
-
|
|
395
|
+
function p(r, l) {
|
|
396
|
+
const u = e.findNodeById(r);
|
|
397
|
+
u && (t.record(), Object.assign(u.node.props, l));
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
const
|
|
401
|
-
|
|
399
|
+
function f(r, l) {
|
|
400
|
+
const u = e.findNodeById(r);
|
|
401
|
+
u && (t.record(), Object.assign(u.node.style, l));
|
|
402
402
|
}
|
|
403
|
-
|
|
403
|
+
function d(r, l) {
|
|
404
|
+
const u = e.findNodeById(r);
|
|
405
|
+
u && (t.record(), l ? u.node.key = l : delete u.node.key);
|
|
406
|
+
}
|
|
407
|
+
return { addElement: n, removeElement: i, moveElement: s, duplicateElement: o, updateProps: p, updateStyle: f, updateKey: d };
|
|
404
408
|
}
|
|
405
|
-
function
|
|
406
|
-
D(
|
|
409
|
+
function ht(e) {
|
|
410
|
+
D(ve, e);
|
|
407
411
|
}
|
|
408
|
-
function
|
|
409
|
-
const e = L(
|
|
412
|
+
function j() {
|
|
413
|
+
const e = L(ve);
|
|
410
414
|
if (!e)
|
|
411
415
|
throw new Error("useElementActions() requires a BrickPdf ancestor component");
|
|
412
416
|
return e;
|
|
@@ -414,16 +418,16 @@ function q() {
|
|
|
414
418
|
const ke = /* @__PURE__ */ Symbol("brick-pdf-history"), _t = 50;
|
|
415
419
|
function kt(e) {
|
|
416
420
|
const t = E([]), n = E([]);
|
|
417
|
-
let
|
|
418
|
-
const
|
|
419
|
-
function
|
|
421
|
+
let i = 0;
|
|
422
|
+
const s = I(() => t.value.length > 0), o = I(() => n.value.length > 0);
|
|
423
|
+
function p() {
|
|
420
424
|
const r = Date.now();
|
|
421
|
-
if (r -
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
t.value.push(
|
|
425
|
+
if (r - i < 100) return;
|
|
426
|
+
i = r;
|
|
427
|
+
const l = e.snapshotContent();
|
|
428
|
+
t.value.push(l), t.value.length > _t && t.value.shift(), n.value = [];
|
|
425
429
|
}
|
|
426
|
-
function
|
|
430
|
+
function f() {
|
|
427
431
|
const r = t.value.pop();
|
|
428
432
|
r && (n.value.push(e.snapshotContent()), e.replaceContent(r));
|
|
429
433
|
}
|
|
@@ -431,7 +435,7 @@ function kt(e) {
|
|
|
431
435
|
const r = n.value.pop();
|
|
432
436
|
r && (t.value.push(e.snapshotContent()), e.replaceContent(r));
|
|
433
437
|
}
|
|
434
|
-
return { canUndo:
|
|
438
|
+
return { canUndo: s, canRedo: o, record: p, undo: f, redo: d };
|
|
435
439
|
}
|
|
436
440
|
function St(e) {
|
|
437
441
|
D(ke, e);
|
|
@@ -445,7 +449,7 @@ function xt() {
|
|
|
445
449
|
const Se = /* @__PURE__ */ Symbol("brick-pdf-drag-drop");
|
|
446
450
|
function Ct(e, t) {
|
|
447
451
|
const n = E(!1);
|
|
448
|
-
function
|
|
452
|
+
function i(o) {
|
|
449
453
|
return ce.create(o, {
|
|
450
454
|
group: { name: "brick-elements", pull: "clone", put: !1 },
|
|
451
455
|
sort: !1,
|
|
@@ -458,7 +462,7 @@ function Ct(e, t) {
|
|
|
458
462
|
}
|
|
459
463
|
});
|
|
460
464
|
}
|
|
461
|
-
function
|
|
465
|
+
function s(o, p) {
|
|
462
466
|
return ce.create(o, {
|
|
463
467
|
group: { name: "brick-elements", put: !0 },
|
|
464
468
|
animation: 150,
|
|
@@ -469,32 +473,32 @@ function Ct(e, t) {
|
|
|
469
473
|
onStart() {
|
|
470
474
|
n.value = !0;
|
|
471
475
|
},
|
|
472
|
-
onAdd(
|
|
473
|
-
const d =
|
|
474
|
-
if (!
|
|
475
|
-
const
|
|
476
|
-
if (!
|
|
477
|
-
const
|
|
478
|
-
return !!(
|
|
476
|
+
onAdd(f) {
|
|
477
|
+
const d = f.item, r = d.dataset.elementId, l = d.dataset.elementType, u = (b) => {
|
|
478
|
+
if (!p || !b) return !1;
|
|
479
|
+
const y = e.findNodeById(p);
|
|
480
|
+
if (!y) return !1;
|
|
481
|
+
const g = U(y.node.type);
|
|
482
|
+
return !!(g?.acceptsChildTypes && !g.acceptsChildTypes.includes(b));
|
|
479
483
|
};
|
|
480
484
|
if (r) {
|
|
481
|
-
if (d.parentNode?.removeChild(d),
|
|
482
|
-
t.moveElement(r,
|
|
485
|
+
if (d.parentNode?.removeChild(d), u(l)) return;
|
|
486
|
+
t.moveElement(r, p, f.newIndex ?? 0);
|
|
483
487
|
return;
|
|
484
488
|
}
|
|
485
|
-
|
|
489
|
+
l && (d.parentNode?.removeChild(d), !u(l) && t.addElement(l, p, f.newIndex));
|
|
486
490
|
},
|
|
487
|
-
onEnd(
|
|
488
|
-
if (n.value = !1,
|
|
489
|
-
const d =
|
|
491
|
+
onEnd(f) {
|
|
492
|
+
if (n.value = !1, f.from === f.to && f.oldIndex !== void 0 && f.newIndex !== void 0 && f.oldIndex !== f.newIndex && f.item.dataset.elementId) {
|
|
493
|
+
const d = p ? e.findNodeById(p)?.node.children : e.document.content;
|
|
490
494
|
if (!d) return;
|
|
491
|
-
const r = d.splice(
|
|
492
|
-
r && d.splice(
|
|
495
|
+
const r = d.splice(f.oldIndex, 1)[0];
|
|
496
|
+
r && d.splice(f.newIndex, 0, r);
|
|
493
497
|
}
|
|
494
498
|
}
|
|
495
499
|
});
|
|
496
500
|
}
|
|
497
|
-
return { initToolbar:
|
|
501
|
+
return { initToolbar: i, initContainer: s, isDragging: n };
|
|
498
502
|
}
|
|
499
503
|
function wt(e) {
|
|
500
504
|
D(Se, e);
|
|
@@ -514,12 +518,12 @@ const ue = {
|
|
|
514
518
|
}, Pt = "NotoSansJP";
|
|
515
519
|
function Et(e) {
|
|
516
520
|
const t = new Uint8Array(e), n = 32768;
|
|
517
|
-
let
|
|
518
|
-
for (let
|
|
519
|
-
const o = t.subarray(
|
|
520
|
-
|
|
521
|
+
let i = "";
|
|
522
|
+
for (let s = 0; s < t.length; s += n) {
|
|
523
|
+
const o = t.subarray(s, s + n);
|
|
524
|
+
i += String.fromCharCode.apply(null, Array.from(o));
|
|
521
525
|
}
|
|
522
|
-
return btoa(
|
|
526
|
+
return btoa(i);
|
|
523
527
|
}
|
|
524
528
|
async function pe(e) {
|
|
525
529
|
const t = await fetch(e);
|
|
@@ -574,8 +578,8 @@ function Rt(e) {
|
|
|
574
578
|
};
|
|
575
579
|
}
|
|
576
580
|
async function n() {
|
|
577
|
-
const o = await import("pdfmake/build/pdfmake"),
|
|
578
|
-
return
|
|
581
|
+
const o = await import("pdfmake/build/pdfmake"), p = await import("pdfmake/build/vfs_fonts"), f = o.default || o, d = p.pdfMake?.vfs ?? p.default ?? {}, r = await It();
|
|
582
|
+
return f.addVirtualFileSystem({ ...d, ...r.vfs }), f.setFonts({
|
|
579
583
|
Roboto: {
|
|
580
584
|
normal: "Roboto-Regular.ttf",
|
|
581
585
|
bold: "Roboto-Medium.ttf",
|
|
@@ -583,21 +587,21 @@ function Rt(e) {
|
|
|
583
587
|
bolditalics: "Roboto-MediumItalic.ttf"
|
|
584
588
|
},
|
|
585
589
|
...r.fonts
|
|
586
|
-
}),
|
|
590
|
+
}), f;
|
|
587
591
|
}
|
|
588
|
-
function
|
|
589
|
-
const
|
|
590
|
-
n().then((
|
|
591
|
-
|
|
592
|
+
function i(o) {
|
|
593
|
+
const p = t();
|
|
594
|
+
n().then((f) => {
|
|
595
|
+
f.createPdf(p).download(o ?? "document.pdf");
|
|
592
596
|
});
|
|
593
597
|
}
|
|
594
|
-
function
|
|
598
|
+
function s() {
|
|
595
599
|
const o = t();
|
|
596
|
-
n().then((
|
|
597
|
-
|
|
600
|
+
n().then((p) => {
|
|
601
|
+
p.createPdf(o).open();
|
|
598
602
|
});
|
|
599
603
|
}
|
|
600
|
-
return { toDocumentDefinition: t, exportPdf:
|
|
604
|
+
return { toDocumentDefinition: t, exportPdf: i, openPdf: s };
|
|
601
605
|
}
|
|
602
606
|
function Nt(e) {
|
|
603
607
|
D(Ce, e);
|
|
@@ -623,27 +627,27 @@ function Ee(e) {
|
|
|
623
627
|
};
|
|
624
628
|
}
|
|
625
629
|
function Lt(e, t) {
|
|
626
|
-
const n = E(null),
|
|
627
|
-
function u(r) {
|
|
628
|
-
const i = e.findNodeById(r);
|
|
629
|
-
i && (n.value = structuredClone(i.node), l.value = !1, a.value = null, o.value = !0);
|
|
630
|
-
}
|
|
630
|
+
const n = E(null), i = E(!1), s = E(null), o = E(!1);
|
|
631
631
|
function p(r) {
|
|
632
|
-
const
|
|
633
|
-
|
|
632
|
+
const l = e.findNodeById(r);
|
|
633
|
+
l && (n.value = structuredClone(l.node), i.value = !1, s.value = null, o.value = !0);
|
|
634
|
+
}
|
|
635
|
+
function f(r) {
|
|
636
|
+
const l = e.findNodeById(r);
|
|
637
|
+
l && (n.value = structuredClone(l.node), i.value = !0, s.value = r, o.value = !0);
|
|
634
638
|
}
|
|
635
639
|
function d(r) {
|
|
636
640
|
if (!n.value) return;
|
|
637
|
-
|
|
638
|
-
const
|
|
639
|
-
|
|
641
|
+
i.value && s.value && (t.removeElement(s.value), i.value = !1, s.value = null);
|
|
642
|
+
const l = Ee(n.value), u = r ? e.findNodeById(r)?.node.children : e.document.content;
|
|
643
|
+
u && (u.push(l), i.value && (n.value = null, o.value = !1));
|
|
640
644
|
}
|
|
641
|
-
return { hasClipboard: o, copy:
|
|
645
|
+
return { hasClipboard: o, copy: p, cut: f, paste: d };
|
|
642
646
|
}
|
|
643
647
|
function Mt(e) {
|
|
644
648
|
D(Pe, e);
|
|
645
649
|
}
|
|
646
|
-
function
|
|
650
|
+
function sr() {
|
|
647
651
|
const e = L(Pe);
|
|
648
652
|
if (!e)
|
|
649
653
|
throw new Error("useClipboard() requires a BrickPdf ancestor component");
|
|
@@ -652,28 +656,28 @@ function lr() {
|
|
|
652
656
|
const Ie = /* @__PURE__ */ Symbol("brick-pdf-resize");
|
|
653
657
|
function Bt(e) {
|
|
654
658
|
const t = E(!1);
|
|
655
|
-
function n(
|
|
659
|
+
function n(i, s, o, p) {
|
|
656
660
|
t.value = !0;
|
|
657
|
-
const
|
|
658
|
-
function y
|
|
659
|
-
const
|
|
660
|
-
let
|
|
661
|
-
|
|
662
|
-
width: Math.round(
|
|
661
|
+
const f = p.clientX, d = p.clientY, r = o.width, l = o.height;
|
|
662
|
+
function u(y) {
|
|
663
|
+
const g = y.clientX - f, v = y.clientY - d;
|
|
664
|
+
let h = r, S = l;
|
|
665
|
+
s.includes("e") && (h = r + g), s.includes("w") && (h = r - g), s.includes("s") && (S = l + v), s.includes("n") && (S = l - v), h = Math.max(20, h), S = Math.max(20, S), e.updateStyle(i, {
|
|
666
|
+
width: Math.round(h),
|
|
663
667
|
height: Math.round(S)
|
|
664
668
|
});
|
|
665
669
|
}
|
|
666
|
-
function
|
|
667
|
-
t.value = !1, document.removeEventListener("pointermove",
|
|
670
|
+
function b() {
|
|
671
|
+
t.value = !1, document.removeEventListener("pointermove", u), document.removeEventListener("pointerup", b);
|
|
668
672
|
}
|
|
669
|
-
document.addEventListener("pointermove",
|
|
673
|
+
document.addEventListener("pointermove", u), document.addEventListener("pointerup", b);
|
|
670
674
|
}
|
|
671
675
|
return { isResizing: t, startResize: n };
|
|
672
676
|
}
|
|
673
677
|
function Ot(e) {
|
|
674
678
|
D(Ie, e);
|
|
675
679
|
}
|
|
676
|
-
function
|
|
680
|
+
function ar() {
|
|
677
681
|
const e = L(Ie);
|
|
678
682
|
if (!e)
|
|
679
683
|
throw new Error("useResize() requires a BrickPdf ancestor component");
|
|
@@ -685,44 +689,44 @@ const At = { class: "brick-table-editor" }, Vt = { class: "brick-table-editor__g
|
|
|
685
689
|
node: {}
|
|
686
690
|
},
|
|
687
691
|
setup(e) {
|
|
688
|
-
const t = e, n =
|
|
689
|
-
function
|
|
692
|
+
const t = e, n = j();
|
|
693
|
+
function i() {
|
|
690
694
|
return t.node.props.body ?? [];
|
|
691
695
|
}
|
|
692
|
-
function
|
|
696
|
+
function s() {
|
|
693
697
|
return t.node.props.widths ?? [];
|
|
694
698
|
}
|
|
695
|
-
function o(
|
|
696
|
-
const
|
|
697
|
-
|
|
699
|
+
function o(l, u, b) {
|
|
700
|
+
const y = i().map((g) => [...g]);
|
|
701
|
+
y[l][u] = b, n.updateProps(t.node.id, { body: y });
|
|
698
702
|
}
|
|
699
|
-
function
|
|
700
|
-
const
|
|
701
|
-
|
|
703
|
+
function p() {
|
|
704
|
+
const l = i().map((b) => [...b]), u = l[0]?.length ?? 2;
|
|
705
|
+
l.push(Array(u).fill("")), n.updateProps(t.node.id, { body: l });
|
|
702
706
|
}
|
|
703
|
-
function
|
|
704
|
-
const
|
|
705
|
-
if (
|
|
706
|
-
|
|
707
|
+
function f(l) {
|
|
708
|
+
const u = i().map((y) => [...y]);
|
|
709
|
+
if (u.length <= 1) return;
|
|
710
|
+
u.splice(l, 1), t.node.props.headerRows > u.length ? n.updateProps(t.node.id, { body: u, headerRows: u.length }) : n.updateProps(t.node.id, { body: u });
|
|
707
711
|
}
|
|
708
712
|
function d() {
|
|
709
|
-
const
|
|
710
|
-
n.updateProps(t.node.id, { body:
|
|
713
|
+
const l = i().map((b) => [...b, ""]), u = [...s(), "*"];
|
|
714
|
+
n.updateProps(t.node.id, { body: l, widths: u });
|
|
711
715
|
}
|
|
712
|
-
function r(
|
|
713
|
-
const
|
|
714
|
-
const
|
|
715
|
-
return
|
|
716
|
+
function r(l) {
|
|
717
|
+
const u = i().map((y) => {
|
|
718
|
+
const g = [...y];
|
|
719
|
+
return g.splice(l, 1), g;
|
|
716
720
|
});
|
|
717
|
-
if ((
|
|
718
|
-
const
|
|
719
|
-
|
|
721
|
+
if ((u[0]?.length ?? 0) < 1) return;
|
|
722
|
+
const b = [...s()];
|
|
723
|
+
b.splice(l, 1), n.updateProps(t.node.id, { body: u, widths: b });
|
|
720
724
|
}
|
|
721
|
-
return (
|
|
725
|
+
return (l, u) => (a(), c("div", At, [
|
|
722
726
|
m("div", { class: "brick-table-editor__actions" }, [
|
|
723
727
|
m("button", {
|
|
724
728
|
class: "brick-table-editor__btn",
|
|
725
|
-
onClick:
|
|
729
|
+
onClick: p
|
|
726
730
|
}, "+ Row"),
|
|
727
731
|
m("button", {
|
|
728
732
|
class: "brick-table-editor__btn",
|
|
@@ -733,38 +737,38 @@ const At = { class: "brick-table-editor" }, Vt = { class: "brick-table-editor__g
|
|
|
733
737
|
m("table", null, [
|
|
734
738
|
m("thead", null, [
|
|
735
739
|
m("tr", null, [
|
|
736
|
-
|
|
737
|
-
(
|
|
738
|
-
key:
|
|
740
|
+
u[0] || (u[0] = m("th", { class: "brick-table-editor__corner" }, null, -1)),
|
|
741
|
+
(a(!0), c(C, null, P(i()[0] ?? [], (b, y) => (a(), c("th", {
|
|
742
|
+
key: y,
|
|
739
743
|
class: "brick-table-editor__col-header"
|
|
740
744
|
}, [
|
|
741
|
-
ie(" Col " + w(
|
|
742
|
-
(
|
|
745
|
+
ie(" Col " + w(y + 1) + " ", 1),
|
|
746
|
+
(i()[0]?.length ?? 0) > 1 ? (a(), c("button", {
|
|
743
747
|
key: 0,
|
|
744
748
|
class: "brick-table-editor__remove-btn",
|
|
745
749
|
title: "Remove column",
|
|
746
|
-
onClick: (
|
|
750
|
+
onClick: (g) => r(y)
|
|
747
751
|
}, "x", 8, Ft)) : $("", !0)
|
|
748
752
|
]))), 128))
|
|
749
753
|
])
|
|
750
754
|
]),
|
|
751
755
|
m("tbody", null, [
|
|
752
|
-
(
|
|
756
|
+
(a(!0), c(C, null, P(i(), (b, y) => (a(), c("tr", { key: y }, [
|
|
753
757
|
m("td", Ht, [
|
|
754
|
-
ie(w(
|
|
755
|
-
|
|
758
|
+
ie(w(y + 1) + " ", 1),
|
|
759
|
+
i().length > 1 ? (a(), c("button", {
|
|
756
760
|
key: 0,
|
|
757
761
|
class: "brick-table-editor__remove-btn",
|
|
758
762
|
title: "Remove row",
|
|
759
|
-
onClick: (
|
|
763
|
+
onClick: (g) => f(y)
|
|
760
764
|
}, "x", 8, Jt)) : $("", !0)
|
|
761
765
|
]),
|
|
762
|
-
(
|
|
766
|
+
(a(!0), c(C, null, P(b, (g, v) => (a(), c("td", { key: v }, [
|
|
763
767
|
m("input", {
|
|
764
768
|
class: "brick-table-editor__cell",
|
|
765
769
|
type: "text",
|
|
766
|
-
value:
|
|
767
|
-
onInput: (
|
|
770
|
+
value: g,
|
|
771
|
+
onInput: (h) => o(y, v, h.target.value)
|
|
768
772
|
}, null, 40, Ut)
|
|
769
773
|
]))), 128))
|
|
770
774
|
]))), 128))
|
|
@@ -800,16 +804,16 @@ const At = { class: "brick-table-editor" }, Vt = { class: "brick-table-editor__g
|
|
|
800
804
|
function qt() {
|
|
801
805
|
return { src: "", width: 200, height: 150, fit: null };
|
|
802
806
|
}
|
|
803
|
-
function
|
|
807
|
+
function Kt() {
|
|
804
808
|
return {};
|
|
805
809
|
}
|
|
806
|
-
function
|
|
810
|
+
function Gt(e) {
|
|
807
811
|
const t = {
|
|
808
812
|
image: e.props.src
|
|
809
813
|
};
|
|
810
814
|
return e.props.width && (t.width = e.props.width), e.props.height && (t.height = e.props.height), e.props.fit && (t.fit = e.props.fit), e.style.margin && (t.margin = e.style.margin), e.style.alignment && (t.alignment = e.style.alignment), e.style.opacity !== void 0 && (t.opacity = e.style.opacity), t;
|
|
811
815
|
}
|
|
812
|
-
const
|
|
816
|
+
const Xt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
813
817
|
key: 1,
|
|
814
818
|
class: "brick-el-image__placeholder"
|
|
815
819
|
}, en = /* @__PURE__ */ _({
|
|
@@ -818,8 +822,8 @@ const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
|
818
822
|
node: {}
|
|
819
823
|
},
|
|
820
824
|
setup(e) {
|
|
821
|
-
return (t, n) => (
|
|
822
|
-
e.node.props.src ? (
|
|
825
|
+
return (t, n) => (a(), c("div", Xt, [
|
|
826
|
+
e.node.props.src ? (a(), c("img", {
|
|
823
827
|
key: 0,
|
|
824
828
|
src: e.node.props.src,
|
|
825
829
|
style: N({
|
|
@@ -828,7 +832,7 @@ const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
|
828
832
|
objectFit: "contain",
|
|
829
833
|
opacity: e.node.style.opacity
|
|
830
834
|
})
|
|
831
|
-
}, null, 12, Qt)) : (
|
|
835
|
+
}, null, 12, Qt)) : (a(), c("div", Zt, " No image selected "))
|
|
832
836
|
]));
|
|
833
837
|
}
|
|
834
838
|
}), tn = /* @__PURE__ */ x(en, [["__scopeId", "data-v-38184258"]]), nn = { class: "brick-image-editor" }, on = /* @__PURE__ */ _({
|
|
@@ -837,7 +841,7 @@ const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
|
837
841
|
node: {}
|
|
838
842
|
},
|
|
839
843
|
setup(e) {
|
|
840
|
-
return (t, n) => (
|
|
844
|
+
return (t, n) => (a(), c("div", nn));
|
|
841
845
|
}
|
|
842
846
|
}), rn = {
|
|
843
847
|
type: "image",
|
|
@@ -845,7 +849,7 @@ const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
|
845
849
|
icon: "🖼",
|
|
846
850
|
isContainer: !1,
|
|
847
851
|
defaultProps: qt,
|
|
848
|
-
defaultStyle:
|
|
852
|
+
defaultStyle: Kt,
|
|
849
853
|
rendererComponent: tn,
|
|
850
854
|
propertyEditorComponent: on,
|
|
851
855
|
propertyFields: [
|
|
@@ -860,7 +864,7 @@ const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
|
860
864
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] },
|
|
861
865
|
{ key: "style.opacity", label: "Opacity", section: "advanced", type: "slider", min: 0, max: 1, step: 0.1, defaultValue: 1 }
|
|
862
866
|
],
|
|
863
|
-
toPdfmake:
|
|
867
|
+
toPdfmake: Gt
|
|
864
868
|
};
|
|
865
869
|
function ln() {
|
|
866
870
|
return { ordered: !1, items: ["Item 1", "Item 2", "Item 3"] };
|
|
@@ -869,8 +873,8 @@ function sn() {
|
|
|
869
873
|
return { fontSize: 12 };
|
|
870
874
|
}
|
|
871
875
|
function an(e) {
|
|
872
|
-
const t = e.props.items,
|
|
873
|
-
return e.style.fontSize && (
|
|
876
|
+
const t = e.props.items, i = e.props.ordered ? { ol: t } : { ul: t };
|
|
877
|
+
return e.style.fontSize && (i.fontSize = e.style.fontSize), e.style.color && (i.color = e.style.color), e.style.margin && (i.margin = e.style.margin), i;
|
|
874
878
|
}
|
|
875
879
|
const cn = /* @__PURE__ */ _({
|
|
876
880
|
__name: "ListRenderer",
|
|
@@ -878,13 +882,13 @@ const cn = /* @__PURE__ */ _({
|
|
|
878
882
|
node: {}
|
|
879
883
|
},
|
|
880
884
|
setup(e) {
|
|
881
|
-
return (t, n) => (
|
|
885
|
+
return (t, n) => (a(), c("div", {
|
|
882
886
|
class: "brick-el-list",
|
|
883
887
|
style: N({ fontSize: (e.node.style.fontSize ?? 12) + "px", color: e.node.style.color })
|
|
884
888
|
}, [
|
|
885
|
-
(
|
|
886
|
-
default:
|
|
887
|
-
(
|
|
889
|
+
(a(), M(te(e.node.props.ordered ? "ol" : "ul"), null, {
|
|
890
|
+
default: Y(() => [
|
|
891
|
+
(a(!0), c(C, null, P(e.node.props.items, (i, s) => (a(), c("li", { key: s }, w(i), 1))), 128))
|
|
888
892
|
]),
|
|
889
893
|
_: 1
|
|
890
894
|
}))
|
|
@@ -896,7 +900,7 @@ const cn = /* @__PURE__ */ _({
|
|
|
896
900
|
node: {}
|
|
897
901
|
},
|
|
898
902
|
setup(e) {
|
|
899
|
-
return (t, n) => (
|
|
903
|
+
return (t, n) => (a(), c("div", un));
|
|
900
904
|
}
|
|
901
905
|
}), fn = {
|
|
902
906
|
type: "list",
|
|
@@ -918,10 +922,10 @@ Item 3` },
|
|
|
918
922
|
],
|
|
919
923
|
toPdfmake: an
|
|
920
924
|
};
|
|
921
|
-
function
|
|
925
|
+
function yn() {
|
|
922
926
|
return { data: "https://example.com", fit: 100 };
|
|
923
927
|
}
|
|
924
|
-
function
|
|
928
|
+
function mn() {
|
|
925
929
|
return {};
|
|
926
930
|
}
|
|
927
931
|
function gn(e) {
|
|
@@ -931,13 +935,13 @@ function gn(e) {
|
|
|
931
935
|
};
|
|
932
936
|
return e.style.alignment && (t.alignment = e.style.alignment), e.style.margin && (t.margin = e.style.margin), t;
|
|
933
937
|
}
|
|
934
|
-
const bn = { class: "brick-el-qr__preview" },
|
|
938
|
+
const bn = { class: "brick-el-qr__preview" }, vn = /* @__PURE__ */ _({
|
|
935
939
|
__name: "QrRenderer",
|
|
936
940
|
props: {
|
|
937
941
|
node: {}
|
|
938
942
|
},
|
|
939
943
|
setup(e) {
|
|
940
|
-
return (t, n) => (
|
|
944
|
+
return (t, n) => (a(), c("div", {
|
|
941
945
|
class: "brick-el-qr",
|
|
942
946
|
style: N({
|
|
943
947
|
width: (e.node.props.fit ?? 100) + "px",
|
|
@@ -947,22 +951,22 @@ const bn = { class: "brick-el-qr__preview" }, hn = /* @__PURE__ */ _({
|
|
|
947
951
|
m("div", bn, "QR: " + w(e.node.props.data), 1)
|
|
948
952
|
], 4));
|
|
949
953
|
}
|
|
950
|
-
}),
|
|
954
|
+
}), hn = /* @__PURE__ */ x(vn, [["__scopeId", "data-v-f106ba48"]]), _n = { class: "brick-qr-editor" }, kn = /* @__PURE__ */ _({
|
|
951
955
|
__name: "QrPropertyEditor",
|
|
952
956
|
props: {
|
|
953
957
|
node: {}
|
|
954
958
|
},
|
|
955
959
|
setup(e) {
|
|
956
|
-
return (t, n) => (
|
|
960
|
+
return (t, n) => (a(), c("div", _n));
|
|
957
961
|
}
|
|
958
962
|
}), Sn = {
|
|
959
963
|
type: "qr",
|
|
960
964
|
label: "QR Code",
|
|
961
965
|
icon: "⊞",
|
|
962
966
|
isContainer: !1,
|
|
963
|
-
defaultProps:
|
|
964
|
-
defaultStyle:
|
|
965
|
-
rendererComponent:
|
|
967
|
+
defaultProps: yn,
|
|
968
|
+
defaultStyle: mn,
|
|
969
|
+
rendererComponent: hn,
|
|
966
970
|
propertyEditorComponent: kn,
|
|
967
971
|
propertyFields: [
|
|
968
972
|
{ key: "props.data", label: "QR Data", section: "content", type: "text", defaultValue: "https://example.com" },
|
|
@@ -998,7 +1002,7 @@ const Pn = ["innerHTML"], En = /* @__PURE__ */ _({
|
|
|
998
1002
|
node: {}
|
|
999
1003
|
},
|
|
1000
1004
|
setup(e) {
|
|
1001
|
-
return (t, n) => (
|
|
1005
|
+
return (t, n) => (a(), c("div", {
|
|
1002
1006
|
class: "brick-el-svg",
|
|
1003
1007
|
style: N({
|
|
1004
1008
|
width: e.node.props.width + "px",
|
|
@@ -1013,7 +1017,7 @@ const Pn = ["innerHTML"], En = /* @__PURE__ */ _({
|
|
|
1013
1017
|
node: {}
|
|
1014
1018
|
},
|
|
1015
1019
|
setup(e) {
|
|
1016
|
-
return (t, n) => (
|
|
1020
|
+
return (t, n) => (a(), c("div", $n));
|
|
1017
1021
|
}
|
|
1018
1022
|
}), Nn = {
|
|
1019
1023
|
type: "svg",
|
|
@@ -1052,7 +1056,7 @@ const Ln = { class: "brick-el-pagebreak" }, Mn = /* @__PURE__ */ _({
|
|
|
1052
1056
|
node: {}
|
|
1053
1057
|
},
|
|
1054
1058
|
setup(e) {
|
|
1055
|
-
return (t, n) => (
|
|
1059
|
+
return (t, n) => (a(), c("div", Ln, [...n[0] || (n[0] = [
|
|
1056
1060
|
m("hr", null, null, -1),
|
|
1057
1061
|
m("span", null, "Page Break", -1),
|
|
1058
1062
|
m("hr", null, null, -1)
|
|
@@ -1064,7 +1068,7 @@ const Ln = { class: "brick-el-pagebreak" }, Mn = /* @__PURE__ */ _({
|
|
|
1064
1068
|
node: {}
|
|
1065
1069
|
},
|
|
1066
1070
|
setup(e) {
|
|
1067
|
-
return (t, n) => (
|
|
1071
|
+
return (t, n) => (a(), c("div", On, [...n[0] || (n[0] = [
|
|
1068
1072
|
m("p", { style: { color: "#999", "font-size": "12px" } }, "No configurable properties.", -1)
|
|
1069
1073
|
])]));
|
|
1070
1074
|
}
|
|
@@ -1095,19 +1099,19 @@ const Hn = {
|
|
|
1095
1099
|
},
|
|
1096
1100
|
setup(e) {
|
|
1097
1101
|
const t = e, n = E(null);
|
|
1098
|
-
let
|
|
1099
|
-
const
|
|
1100
|
-
return
|
|
1101
|
-
n.value && (
|
|
1102
|
-
}),
|
|
1103
|
-
|
|
1104
|
-
}), (
|
|
1102
|
+
let i = null;
|
|
1103
|
+
const s = xe(), { isDragging: o } = s;
|
|
1104
|
+
return ye(() => {
|
|
1105
|
+
n.value && (i = s.initContainer(n.value, t.parentId));
|
|
1106
|
+
}), me(() => {
|
|
1107
|
+
i?.destroy();
|
|
1108
|
+
}), (p, f) => (a(), c("div", {
|
|
1105
1109
|
ref_key: "el",
|
|
1106
1110
|
ref: n,
|
|
1107
1111
|
class: ee(["brick-dropzone", { "brick-dropzone--horizontal": e.layout === "horizontal", "brick-dropzone--drag-active": k(o) && e.layout === "horizontal" }])
|
|
1108
1112
|
}, [
|
|
1109
|
-
Z(
|
|
1110
|
-
|
|
1113
|
+
Z(p.$slots, "default", {}, void 0, !0),
|
|
1114
|
+
p.$slots.default ? $("", !0) : (a(), c("div", Hn, " Drop elements here "))
|
|
1111
1115
|
], 2));
|
|
1112
1116
|
}
|
|
1113
1117
|
}), $e = /* @__PURE__ */ x(Jn, [["__scopeId", "data-v-b9596dad"]]), Un = ["data-element-id", "data-element-type"], Wn = {
|
|
@@ -1120,52 +1124,52 @@ const Hn = {
|
|
|
1120
1124
|
path: {}
|
|
1121
1125
|
},
|
|
1122
1126
|
setup(e) {
|
|
1123
|
-
const t = e, n = W(),
|
|
1124
|
-
function r(
|
|
1125
|
-
|
|
1127
|
+
const t = e, n = W(), i = j(), s = E(null), o = I(() => U(t.node.type)), p = I(() => n.selectedId.value === t.node.id), f = I(() => o.value ? o.value.propertyFields.some((y) => y.key === "props.width" || y.key === "style.width") : !1), d = I(() => o.value ? o.value.propertyFields.some((y) => y.key === "props.height" || y.key === "style.height") : !1);
|
|
1128
|
+
function r(y) {
|
|
1129
|
+
y.stopPropagation(), n.select(t.node.id);
|
|
1126
1130
|
}
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1129
|
-
const
|
|
1130
|
-
function
|
|
1131
|
-
const O = R.clientX -
|
|
1132
|
-
o.value?.propertyFields.some((F) => F.key === "props.width") ?
|
|
1131
|
+
function l(y) {
|
|
1132
|
+
y.stopPropagation(), y.preventDefault();
|
|
1133
|
+
const g = y.clientX, v = s.value?.offsetWidth ?? 200;
|
|
1134
|
+
function h(R) {
|
|
1135
|
+
const O = R.clientX - g, T = Math.max(20, v + O);
|
|
1136
|
+
o.value?.propertyFields.some((F) => F.key === "props.width") ? i.updateProps(t.node.id, { width: Math.round(T) }) : i.updateStyle(t.node.id, { width: Math.round(T) });
|
|
1133
1137
|
}
|
|
1134
1138
|
function S() {
|
|
1135
|
-
document.removeEventListener("pointermove",
|
|
1139
|
+
document.removeEventListener("pointermove", h), document.removeEventListener("pointerup", S), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1136
1140
|
}
|
|
1137
|
-
document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove",
|
|
1141
|
+
document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", h), document.addEventListener("pointerup", S);
|
|
1138
1142
|
}
|
|
1139
|
-
function y
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
function
|
|
1143
|
-
const O = R.clientY -
|
|
1144
|
-
o.value?.propertyFields.some((F) => F.key === "props.height") ?
|
|
1143
|
+
function u(y) {
|
|
1144
|
+
y.stopPropagation(), y.preventDefault();
|
|
1145
|
+
const g = y.clientY, v = s.value?.offsetHeight ?? 100;
|
|
1146
|
+
function h(R) {
|
|
1147
|
+
const O = R.clientY - g, T = Math.max(20, v + O);
|
|
1148
|
+
o.value?.propertyFields.some((F) => F.key === "props.height") ? i.updateProps(t.node.id, { height: Math.round(T) }) : i.updateStyle(t.node.id, { height: Math.round(T) });
|
|
1145
1149
|
}
|
|
1146
1150
|
function S() {
|
|
1147
|
-
document.removeEventListener("pointermove",
|
|
1151
|
+
document.removeEventListener("pointermove", h), document.removeEventListener("pointerup", S), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1148
1152
|
}
|
|
1149
|
-
document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove",
|
|
1153
|
+
document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", h), document.addEventListener("pointerup", S);
|
|
1150
1154
|
}
|
|
1151
|
-
function
|
|
1152
|
-
|
|
1153
|
-
const
|
|
1155
|
+
function b(y) {
|
|
1156
|
+
y.stopPropagation(), y.preventDefault();
|
|
1157
|
+
const g = y.clientX, v = y.clientY, h = s.value?.offsetWidth ?? 200, S = s.value?.offsetHeight ?? 100;
|
|
1154
1158
|
function R(T) {
|
|
1155
|
-
const
|
|
1156
|
-
Re ?
|
|
1159
|
+
const K = T.clientX - g, F = T.clientY - v, re = Math.max(20, h + K), le = Math.max(20, S + F), Re = o.value?.propertyFields.some((G) => G.key === "props.width"), Ne = o.value?.propertyFields.some((G) => G.key === "props.height");
|
|
1160
|
+
Re ? i.updateProps(t.node.id, { width: Math.round(re) }) : i.updateStyle(t.node.id, { width: Math.round(re) }), Ne ? i.updateProps(t.node.id, { height: Math.round(le) }) : i.updateStyle(t.node.id, { height: Math.round(le) });
|
|
1157
1161
|
}
|
|
1158
1162
|
function O() {
|
|
1159
1163
|
document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", O), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1160
1164
|
}
|
|
1161
1165
|
document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", R), document.addEventListener("pointerup", O);
|
|
1162
1166
|
}
|
|
1163
|
-
return (
|
|
1164
|
-
const
|
|
1165
|
-
return
|
|
1167
|
+
return (y, g) => {
|
|
1168
|
+
const v = Te("CanvasElement", !0);
|
|
1169
|
+
return a(), c("div", {
|
|
1166
1170
|
ref_key: "elRef",
|
|
1167
|
-
ref:
|
|
1168
|
-
class: ee(["brick-canvas-element", { "brick-canvas-element--selected":
|
|
1171
|
+
ref: s,
|
|
1172
|
+
class: ee(["brick-canvas-element", { "brick-canvas-element--selected": p.value }]),
|
|
1169
1173
|
"data-element-id": e.node.id,
|
|
1170
1174
|
"data-element-type": e.node.type,
|
|
1171
1175
|
style: N({
|
|
@@ -1179,21 +1183,21 @@ const Hn = {
|
|
|
1179
1183
|
}),
|
|
1180
1184
|
onClick: r
|
|
1181
1185
|
}, [
|
|
1182
|
-
o.value ? (
|
|
1186
|
+
o.value ? (a(), M(te(o.value.rendererComponent), {
|
|
1183
1187
|
key: 0,
|
|
1184
1188
|
node: e.node,
|
|
1185
1189
|
path: e.path
|
|
1186
1190
|
}, {
|
|
1187
|
-
default:
|
|
1188
|
-
o.value.isContainer ? (
|
|
1191
|
+
default: Y(() => [
|
|
1192
|
+
o.value.isContainer ? (a(), M($e, {
|
|
1189
1193
|
key: 0,
|
|
1190
1194
|
"parent-id": e.node.id,
|
|
1191
1195
|
layout: e.node.type === "columns" ? "horizontal" : "vertical"
|
|
1192
1196
|
}, {
|
|
1193
|
-
default:
|
|
1194
|
-
(
|
|
1195
|
-
key:
|
|
1196
|
-
node:
|
|
1197
|
+
default: Y(() => [
|
|
1198
|
+
(a(!0), c(C, null, P(e.node.children, (h, S) => (a(), M(v, {
|
|
1199
|
+
key: h.id,
|
|
1200
|
+
node: h,
|
|
1197
1201
|
path: [...e.path, S]
|
|
1198
1202
|
}, null, 8, ["node", "path"]))), 128))
|
|
1199
1203
|
]),
|
|
@@ -1201,28 +1205,28 @@ const Hn = {
|
|
|
1201
1205
|
}, 8, ["parent-id", "layout"])) : $("", !0)
|
|
1202
1206
|
]),
|
|
1203
1207
|
_: 1
|
|
1204
|
-
}, 8, ["node", "path"])) : (
|
|
1205
|
-
|
|
1206
|
-
|
|
1208
|
+
}, 8, ["node", "path"])) : (a(), c("div", Wn, " Unknown element: " + w(e.node.type), 1)),
|
|
1209
|
+
p.value ? (a(), c(C, { key: 2 }, [
|
|
1210
|
+
f.value ? (a(), c("div", {
|
|
1207
1211
|
key: 0,
|
|
1208
1212
|
class: "brick-resize-handle brick-resize-handle--e",
|
|
1209
|
-
onPointerdown:
|
|
1213
|
+
onPointerdown: l
|
|
1210
1214
|
}, null, 32)) : $("", !0),
|
|
1211
|
-
d.value ? (
|
|
1215
|
+
d.value ? (a(), c("div", {
|
|
1212
1216
|
key: 1,
|
|
1213
1217
|
class: "brick-resize-handle brick-resize-handle--s",
|
|
1214
|
-
onPointerdown:
|
|
1218
|
+
onPointerdown: u
|
|
1215
1219
|
}, null, 32)) : $("", !0),
|
|
1216
|
-
|
|
1220
|
+
f.value && d.value ? (a(), c("div", {
|
|
1217
1221
|
key: 2,
|
|
1218
1222
|
class: "brick-resize-handle brick-resize-handle--se",
|
|
1219
|
-
onPointerdown:
|
|
1223
|
+
onPointerdown: b
|
|
1220
1224
|
}, null, 32)) : $("", !0)
|
|
1221
1225
|
], 64)) : $("", !0)
|
|
1222
1226
|
], 14, Un);
|
|
1223
1227
|
};
|
|
1224
1228
|
}
|
|
1225
|
-
}), Yn = /* @__PURE__ */ x(jn, [["__scopeId", "data-v-6b9cadc1"]]), qn = { class: "brick-doc-bar" },
|
|
1229
|
+
}), Yn = /* @__PURE__ */ x(jn, [["__scopeId", "data-v-6b9cadc1"]]), qn = { class: "brick-doc-bar" }, Kn = { class: "brick-doc-bar__field" }, Gn = ["value"], Xn = { class: "brick-doc-bar__field" }, Qn = { class: "brick-doc-bar__field brick-doc-bar__field--margins" }, Zn = { class: "brick-doc-bar__margins" }, eo = ["placeholder", "title", "value", "onInput"], to = { class: "brick-doc-bar__field" }, no = ["value"], oo = /* @__PURE__ */ _({
|
|
1226
1230
|
__name: "DocumentSettings",
|
|
1227
1231
|
setup(e) {
|
|
1228
1232
|
const t = oe(), n = [
|
|
@@ -1232,28 +1236,28 @@ const Hn = {
|
|
|
1232
1236
|
{ label: "Letter", value: "LETTER" },
|
|
1233
1237
|
{ label: "Legal", value: "LEGAL" }
|
|
1234
1238
|
];
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1237
|
-
|
|
1239
|
+
function i(s, o) {
|
|
1240
|
+
const p = [...t.document.pageMargins];
|
|
1241
|
+
p[s] = o, t.document.pageMargins = p;
|
|
1238
1242
|
}
|
|
1239
|
-
return (
|
|
1240
|
-
m("div",
|
|
1243
|
+
return (s, o) => (a(), c("div", qn, [
|
|
1244
|
+
m("div", Kn, [
|
|
1241
1245
|
o[3] || (o[3] = m("label", null, "Size", -1)),
|
|
1242
|
-
|
|
1243
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1246
|
+
X(m("select", {
|
|
1247
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => k(t).document.pageSize = p)
|
|
1244
1248
|
}, [
|
|
1245
|
-
(
|
|
1246
|
-
key:
|
|
1247
|
-
value:
|
|
1248
|
-
}, w(
|
|
1249
|
+
(a(), c(C, null, P(n, (p) => m("option", {
|
|
1250
|
+
key: p.value,
|
|
1251
|
+
value: p.value
|
|
1252
|
+
}, w(p.label), 9, Gn)), 64))
|
|
1249
1253
|
], 512), [
|
|
1250
1254
|
[se, k(t).document.pageSize]
|
|
1251
1255
|
])
|
|
1252
1256
|
]),
|
|
1253
|
-
m("div",
|
|
1257
|
+
m("div", Xn, [
|
|
1254
1258
|
o[5] || (o[5] = m("label", null, "Orientation", -1)),
|
|
1255
|
-
|
|
1256
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
1259
|
+
X(m("select", {
|
|
1260
|
+
"onUpdate:modelValue": o[1] || (o[1] = (p) => k(t).document.pageOrientation = p)
|
|
1257
1261
|
}, [...o[4] || (o[4] = [
|
|
1258
1262
|
m("option", { value: "portrait" }, "Portrait", -1),
|
|
1259
1263
|
m("option", { value: "landscape" }, "Landscape", -1)
|
|
@@ -1264,13 +1268,13 @@ const Hn = {
|
|
|
1264
1268
|
m("div", Qn, [
|
|
1265
1269
|
o[6] || (o[6] = m("label", null, "Margins", -1)),
|
|
1266
1270
|
m("div", Zn, [
|
|
1267
|
-
(
|
|
1268
|
-
key:
|
|
1271
|
+
(a(), c(C, null, P(["L", "T", "R", "B"], (p, f) => m("input", {
|
|
1272
|
+
key: f,
|
|
1269
1273
|
type: "number",
|
|
1270
|
-
placeholder:
|
|
1271
|
-
title:
|
|
1272
|
-
value: k(t).document.pageMargins[
|
|
1273
|
-
onInput: (d) =>
|
|
1274
|
+
placeholder: p,
|
|
1275
|
+
title: p,
|
|
1276
|
+
value: k(t).document.pageMargins[f],
|
|
1277
|
+
onInput: (d) => i(f, Number(d.target.value))
|
|
1274
1278
|
}, null, 40, eo)), 64))
|
|
1275
1279
|
])
|
|
1276
1280
|
]),
|
|
@@ -1281,7 +1285,7 @@ const Hn = {
|
|
|
1281
1285
|
value: k(t).document.defaultStyle?.fontSize ?? 12,
|
|
1282
1286
|
min: "6",
|
|
1283
1287
|
max: "72",
|
|
1284
|
-
onInput: o[2] || (o[2] = (
|
|
1288
|
+
onInput: o[2] || (o[2] = (p) => (k(t).document.defaultStyle ??= {}).fontSize = Number(p.target.value))
|
|
1285
1289
|
}, null, 40, no)
|
|
1286
1290
|
])
|
|
1287
1291
|
]));
|
|
@@ -1289,32 +1293,32 @@ const Hn = {
|
|
|
1289
1293
|
}), ro = /* @__PURE__ */ x(oo, [["__scopeId", "data-v-39a2b54f"]]), lo = { class: "brick-canvas" }, V = 0.75, io = /* @__PURE__ */ _({
|
|
1290
1294
|
__name: "DesignCanvas",
|
|
1291
1295
|
setup(e) {
|
|
1292
|
-
const t = oe(), n = W(),
|
|
1296
|
+
const t = oe(), n = W(), i = {
|
|
1293
1297
|
A3: [841.89, 1190.55],
|
|
1294
1298
|
A4: [595.28, 841.89],
|
|
1295
1299
|
A5: [419.53, 595.28],
|
|
1296
1300
|
LETTER: [612, 792],
|
|
1297
1301
|
LEGAL: [612, 1008]
|
|
1298
|
-
},
|
|
1299
|
-
const [
|
|
1302
|
+
}, s = I(() => {
|
|
1303
|
+
const [f, d] = i[t.document.pageSize] ?? i.A4, r = t.document.pageOrientation === "landscape" ? d : f;
|
|
1300
1304
|
return Math.round(r * V);
|
|
1301
1305
|
}), o = I(() => {
|
|
1302
|
-
const [
|
|
1306
|
+
const [f, d] = i[t.document.pageSize] ?? i.A4, r = t.document.pageOrientation === "landscape" ? f : d;
|
|
1303
1307
|
return Math.round(r * V);
|
|
1304
1308
|
});
|
|
1305
|
-
function
|
|
1306
|
-
(
|
|
1309
|
+
function p(f) {
|
|
1310
|
+
(f.target === f.currentTarget || f.target.classList.contains("brick-canvas__page")) && n.deselect();
|
|
1307
1311
|
}
|
|
1308
|
-
return (
|
|
1312
|
+
return (f, d) => (a(), c("div", lo, [
|
|
1309
1313
|
B(ro),
|
|
1310
1314
|
m("div", {
|
|
1311
1315
|
class: "brick-canvas__scroll",
|
|
1312
|
-
onClick:
|
|
1316
|
+
onClick: p
|
|
1313
1317
|
}, [
|
|
1314
1318
|
m("div", {
|
|
1315
1319
|
class: "brick-canvas__page",
|
|
1316
1320
|
style: N({
|
|
1317
|
-
width:
|
|
1321
|
+
width: s.value + "px",
|
|
1318
1322
|
minHeight: o.value + "px",
|
|
1319
1323
|
paddingTop: k(t).document.pageMargins[1] * V + "px",
|
|
1320
1324
|
paddingRight: k(t).document.pageMargins[2] * V + "px",
|
|
@@ -1323,11 +1327,11 @@ const Hn = {
|
|
|
1323
1327
|
})
|
|
1324
1328
|
}, [
|
|
1325
1329
|
B($e, { "parent-id": null }, {
|
|
1326
|
-
default:
|
|
1327
|
-
(
|
|
1330
|
+
default: Y(() => [
|
|
1331
|
+
(a(!0), c(C, null, P(k(t).document.content, (r, l) => (a(), M(Yn, {
|
|
1328
1332
|
key: r.id,
|
|
1329
1333
|
node: r,
|
|
1330
|
-
path: [
|
|
1334
|
+
path: [l]
|
|
1331
1335
|
}, null, 8, ["node", "path"]))), 128))
|
|
1332
1336
|
]),
|
|
1333
1337
|
_: 1
|
|
@@ -1341,27 +1345,27 @@ const Hn = {
|
|
|
1341
1345
|
setup(e) {
|
|
1342
1346
|
const t = E(null);
|
|
1343
1347
|
let n = null;
|
|
1344
|
-
const
|
|
1345
|
-
return
|
|
1346
|
-
t.value && (n =
|
|
1347
|
-
}),
|
|
1348
|
+
const i = xe(), s = Be();
|
|
1349
|
+
return ye(() => {
|
|
1350
|
+
t.value && (n = i.initToolbar(t.value));
|
|
1351
|
+
}), me(() => {
|
|
1348
1352
|
n?.destroy();
|
|
1349
|
-
}), (o,
|
|
1353
|
+
}), (o, p) => (a(), c("div", {
|
|
1350
1354
|
ref_key: "el",
|
|
1351
1355
|
ref: t,
|
|
1352
1356
|
class: "brick-element-list"
|
|
1353
1357
|
}, [
|
|
1354
|
-
(
|
|
1355
|
-
key:
|
|
1358
|
+
(a(!0), c(C, null, P(k(s), (f) => (a(), c("div", {
|
|
1359
|
+
key: f.type,
|
|
1356
1360
|
class: "brick-element-list__item",
|
|
1357
|
-
"data-element-type":
|
|
1361
|
+
"data-element-type": f.type
|
|
1358
1362
|
}, [
|
|
1359
|
-
m("span", co, w(
|
|
1360
|
-
m("span", uo, w(
|
|
1363
|
+
m("span", co, w(f.icon), 1),
|
|
1364
|
+
m("span", uo, w(f.label), 1)
|
|
1361
1365
|
], 8, ao))), 128))
|
|
1362
1366
|
], 512));
|
|
1363
1367
|
}
|
|
1364
|
-
}), fo = /* @__PURE__ */ x(po, [["__scopeId", "data-v-2d0b1dbf"]]),
|
|
1368
|
+
}), fo = /* @__PURE__ */ x(po, [["__scopeId", "data-v-2d0b1dbf"]]), yo = { class: "brick-field" }, mo = { class: "brick-field__label" }, go = ["value"], bo = ["value"], vo = ["value", "min", "max", "step"], ho = ["value"], _o = ["value"], ko = ["value"], So = {
|
|
1365
1369
|
key: 5,
|
|
1366
1370
|
class: "brick-field__toggle"
|
|
1367
1371
|
}, xo = ["checked"], Co = {
|
|
@@ -1377,246 +1381,261 @@ const Hn = {
|
|
|
1377
1381
|
node: {}
|
|
1378
1382
|
},
|
|
1379
1383
|
setup(e) {
|
|
1380
|
-
const t = e, n =
|
|
1381
|
-
const d = t.descriptor.key.split("."), r = d[0],
|
|
1384
|
+
const t = e, n = j(), i = I(() => {
|
|
1385
|
+
const d = t.descriptor.key.split("."), r = d[0], l = d[1];
|
|
1382
1386
|
if (r === "props")
|
|
1383
|
-
return t.node.props[
|
|
1387
|
+
return t.node.props[l];
|
|
1384
1388
|
if (r === "style")
|
|
1385
|
-
return t.node.style[
|
|
1386
|
-
}),
|
|
1387
|
-
const d =
|
|
1389
|
+
return t.node.style[l];
|
|
1390
|
+
}), s = I(() => {
|
|
1391
|
+
const d = i.value;
|
|
1388
1392
|
return t.descriptor.type === "textarea" && Array.isArray(d) ? d.join(`
|
|
1389
1393
|
`) : d;
|
|
1390
1394
|
});
|
|
1391
1395
|
function o(d) {
|
|
1392
|
-
const r = t.descriptor.key.split("."),
|
|
1393
|
-
let
|
|
1394
|
-
t.descriptor.type === "textarea" && Array.isArray(
|
|
1395
|
-
`)),
|
|
1396
|
+
const r = t.descriptor.key.split("."), l = r[0], u = r[1];
|
|
1397
|
+
let b = d;
|
|
1398
|
+
t.descriptor.type === "textarea" && Array.isArray(i.value) && (b = d.split(`
|
|
1399
|
+
`)), l === "props" ? n.updateProps(t.node.id, { [u]: b }) : l === "style" && n.updateStyle(t.node.id, { [u]: b });
|
|
1396
1400
|
}
|
|
1397
|
-
function
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1401
|
+
function p(d, r) {
|
|
1402
|
+
const u = [...s.value ?? [0, 0, 0, 0]];
|
|
1403
|
+
u[d] = r, o(u);
|
|
1400
1404
|
}
|
|
1401
|
-
function
|
|
1402
|
-
const
|
|
1403
|
-
if (!
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
o(
|
|
1407
|
-
},
|
|
1405
|
+
function f(d) {
|
|
1406
|
+
const l = d.target.files?.[0];
|
|
1407
|
+
if (!l) return;
|
|
1408
|
+
const u = new FileReader();
|
|
1409
|
+
u.onload = () => {
|
|
1410
|
+
o(u.result);
|
|
1411
|
+
}, u.readAsDataURL(l);
|
|
1408
1412
|
}
|
|
1409
|
-
return (d, r) => (
|
|
1410
|
-
m("label",
|
|
1411
|
-
e.descriptor.type === "text" ? (
|
|
1413
|
+
return (d, r) => (a(), c("div", yo, [
|
|
1414
|
+
m("label", mo, w(e.descriptor.label), 1),
|
|
1415
|
+
e.descriptor.type === "text" ? (a(), c("input", {
|
|
1412
1416
|
key: 0,
|
|
1413
1417
|
type: "text",
|
|
1414
1418
|
class: "brick-field__input",
|
|
1415
|
-
value:
|
|
1416
|
-
onInput: r[0] || (r[0] = (
|
|
1417
|
-
}, null, 40, go)) : e.descriptor.type === "textarea" ? (
|
|
1419
|
+
value: s.value,
|
|
1420
|
+
onInput: r[0] || (r[0] = (l) => o(l.target.value))
|
|
1421
|
+
}, null, 40, go)) : e.descriptor.type === "textarea" ? (a(), c("textarea", {
|
|
1418
1422
|
key: 1,
|
|
1419
1423
|
class: "brick-field__textarea",
|
|
1420
|
-
value:
|
|
1424
|
+
value: s.value,
|
|
1421
1425
|
rows: "3",
|
|
1422
|
-
onInput: r[1] || (r[1] = (
|
|
1423
|
-
}, null, 40, bo)) : e.descriptor.type === "number" ? (
|
|
1426
|
+
onInput: r[1] || (r[1] = (l) => o(l.target.value))
|
|
1427
|
+
}, null, 40, bo)) : e.descriptor.type === "number" ? (a(), c("input", {
|
|
1424
1428
|
key: 2,
|
|
1425
1429
|
type: "number",
|
|
1426
1430
|
class: "brick-field__input",
|
|
1427
|
-
value:
|
|
1431
|
+
value: s.value,
|
|
1428
1432
|
min: e.descriptor.min,
|
|
1429
1433
|
max: e.descriptor.max,
|
|
1430
1434
|
step: e.descriptor.step,
|
|
1431
|
-
onInput: r[2] || (r[2] = (
|
|
1432
|
-
}, null, 40,
|
|
1435
|
+
onInput: r[2] || (r[2] = (l) => o(Number(l.target.value)))
|
|
1436
|
+
}, null, 40, vo)) : e.descriptor.type === "color" ? (a(), c("input", {
|
|
1433
1437
|
key: 3,
|
|
1434
1438
|
type: "color",
|
|
1435
1439
|
class: "brick-field__color",
|
|
1436
|
-
value:
|
|
1437
|
-
onInput: r[3] || (r[3] = (
|
|
1438
|
-
}, null, 40,
|
|
1440
|
+
value: s.value ?? "#000000",
|
|
1441
|
+
onInput: r[3] || (r[3] = (l) => o(l.target.value))
|
|
1442
|
+
}, null, 40, ho)) : e.descriptor.type === "select" ? (a(), c("select", {
|
|
1439
1443
|
key: 4,
|
|
1440
1444
|
class: "brick-field__select",
|
|
1441
|
-
value:
|
|
1442
|
-
onChange: r[4] || (r[4] = (
|
|
1445
|
+
value: s.value,
|
|
1446
|
+
onChange: r[4] || (r[4] = (l) => o(l.target.value || void 0))
|
|
1443
1447
|
}, [
|
|
1444
|
-
(
|
|
1445
|
-
key: String(
|
|
1446
|
-
value:
|
|
1447
|
-
}, w(
|
|
1448
|
-
], 40, _o)) : e.descriptor.type === "toggle" ? (
|
|
1448
|
+
(a(!0), c(C, null, P(e.descriptor.options, (l) => (a(), c("option", {
|
|
1449
|
+
key: String(l.value),
|
|
1450
|
+
value: l.value
|
|
1451
|
+
}, w(l.label), 9, ko))), 128))
|
|
1452
|
+
], 40, _o)) : e.descriptor.type === "toggle" ? (a(), c("label", So, [
|
|
1449
1453
|
m("input", {
|
|
1450
1454
|
type: "checkbox",
|
|
1451
|
-
checked:
|
|
1452
|
-
onChange: r[5] || (r[5] = (
|
|
1455
|
+
checked: s.value,
|
|
1456
|
+
onChange: r[5] || (r[5] = (l) => o(l.target.checked))
|
|
1453
1457
|
}, null, 40, xo),
|
|
1454
|
-
m("span", null, w(
|
|
1455
|
-
])) : e.descriptor.type === "margin" ? (
|
|
1456
|
-
(
|
|
1457
|
-
key:
|
|
1458
|
+
m("span", null, w(s.value ? "On" : "Off"), 1)
|
|
1459
|
+
])) : e.descriptor.type === "margin" ? (a(), c("div", Co, [
|
|
1460
|
+
(a(), c(C, null, P(["L", "T", "R", "B"], (l, u) => m("input", {
|
|
1461
|
+
key: l,
|
|
1458
1462
|
type: "number",
|
|
1459
1463
|
class: "brick-field__margin-input",
|
|
1460
|
-
placeholder:
|
|
1461
|
-
value: (
|
|
1462
|
-
onInput: (
|
|
1464
|
+
placeholder: l,
|
|
1465
|
+
value: (s.value ?? [0, 0, 0, 0])[u],
|
|
1466
|
+
onInput: (b) => p(u, Number(b.target.value))
|
|
1463
1467
|
}, null, 40, wo)), 64))
|
|
1464
|
-
])) : e.descriptor.type === "slider" ? (
|
|
1468
|
+
])) : e.descriptor.type === "slider" ? (a(), c("div", Po, [
|
|
1465
1469
|
m("input", {
|
|
1466
1470
|
type: "range",
|
|
1467
|
-
value:
|
|
1471
|
+
value: s.value,
|
|
1468
1472
|
min: e.descriptor.min,
|
|
1469
1473
|
max: e.descriptor.max,
|
|
1470
1474
|
step: e.descriptor.step,
|
|
1471
|
-
onInput: r[6] || (r[6] = (
|
|
1475
|
+
onInput: r[6] || (r[6] = (l) => o(Number(l.target.value)))
|
|
1472
1476
|
}, null, 40, Eo),
|
|
1473
|
-
m("span", Io, w(
|
|
1474
|
-
])) : e.descriptor.type === "file" ? (
|
|
1477
|
+
m("span", Io, w(s.value), 1)
|
|
1478
|
+
])) : e.descriptor.type === "file" ? (a(), c("input", {
|
|
1475
1479
|
key: 8,
|
|
1476
1480
|
type: "file",
|
|
1477
1481
|
accept: "image/*",
|
|
1478
1482
|
class: "brick-field__file",
|
|
1479
|
-
onChange:
|
|
1483
|
+
onChange: f
|
|
1480
1484
|
}, null, 32)) : $("", !0)
|
|
1481
1485
|
]));
|
|
1482
1486
|
}
|
|
1483
1487
|
}), Ro = /* @__PURE__ */ x($o, [["__scopeId", "data-v-5a3bec1b"]]), No = {
|
|
1484
1488
|
key: 0,
|
|
1485
1489
|
class: "brick-property-editor"
|
|
1486
|
-
}, zo = { class: "brick-property-editor__type" }, To = {
|
|
1490
|
+
}, zo = { class: "brick-property-editor__type" }, To = { class: "brick-property-editor__key" }, Do = ["value"], Lo = {
|
|
1487
1491
|
key: 0,
|
|
1488
1492
|
class: "brick-property-editor__group"
|
|
1489
|
-
},
|
|
1493
|
+
}, Mo = { class: "brick-property-editor__group-title" }, Bo = /* @__PURE__ */ _({
|
|
1490
1494
|
__name: "PropertyEditor",
|
|
1491
1495
|
setup(e) {
|
|
1492
|
-
const t = W(), n =
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1496
|
+
const t = W(), n = j();
|
|
1497
|
+
function i(d) {
|
|
1498
|
+
const r = t.selectedNode.value;
|
|
1499
|
+
r && n.updateKey(r.id, d.target.value);
|
|
1500
|
+
}
|
|
1501
|
+
const s = I(() => {
|
|
1502
|
+
const d = t.selectedNode.value;
|
|
1503
|
+
return d ? U(d.type) : null;
|
|
1504
|
+
}), o = I(() => {
|
|
1505
|
+
if (!s.value) return {};
|
|
1506
|
+
const d = {};
|
|
1507
|
+
for (const r of s.value.propertyFields)
|
|
1508
|
+
d[r.section] || (d[r.section] = []), d[r.section].push(r);
|
|
1509
|
+
return d;
|
|
1510
|
+
}), p = {
|
|
1502
1511
|
content: "Content",
|
|
1503
1512
|
style: "Style",
|
|
1504
1513
|
layout: "Layout",
|
|
1505
1514
|
advanced: "Advanced"
|
|
1506
|
-
},
|
|
1507
|
-
return (
|
|
1508
|
-
m("div", zo, w(
|
|
1509
|
-
(
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
+
}, f = ["content", "style", "layout", "advanced"];
|
|
1516
|
+
return (d, r) => k(t).selectedNode.value && s.value ? (a(), c("div", No, [
|
|
1517
|
+
m("div", zo, w(s.value.icon) + " " + w(s.value.label), 1),
|
|
1518
|
+
m("div", To, [
|
|
1519
|
+
r[0] || (r[0] = m("label", { class: "brick-property-editor__key-label" }, "Key", -1)),
|
|
1520
|
+
m("input", {
|
|
1521
|
+
type: "text",
|
|
1522
|
+
class: "brick-property-editor__key-input",
|
|
1523
|
+
value: k(t).selectedNode.value.key ?? "",
|
|
1524
|
+
placeholder: "(optional identifier)",
|
|
1525
|
+
onInput: i
|
|
1526
|
+
}, null, 40, Do)
|
|
1527
|
+
]),
|
|
1528
|
+
(a(), c(C, null, P(f, (l) => (a(), c(C, { key: l }, [
|
|
1529
|
+
o.value[l] ? (a(), c("div", Lo, [
|
|
1530
|
+
m("div", Mo, w(p[l]), 1),
|
|
1531
|
+
(a(!0), c(C, null, P(o.value[l], (u) => (a(), M(Ro, {
|
|
1532
|
+
key: u.key,
|
|
1533
|
+
descriptor: u,
|
|
1515
1534
|
node: k(t).selectedNode.value
|
|
1516
1535
|
}, null, 8, ["descriptor", "node"]))), 128))
|
|
1517
1536
|
])) : $("", !0)
|
|
1518
1537
|
], 64))), 64)),
|
|
1519
|
-
(
|
|
1538
|
+
(a(), M(te(s.value.propertyEditorComponent), {
|
|
1520
1539
|
node: k(t).selectedNode.value
|
|
1521
1540
|
}, null, 8, ["node"]))
|
|
1522
1541
|
])) : $("", !0);
|
|
1523
1542
|
}
|
|
1524
|
-
}),
|
|
1543
|
+
}), Oo = /* @__PURE__ */ x(Bo, [["__scopeId", "data-v-e49ddc4f"]]), Ao = { class: "brick-toolbar" }, Vo = { class: "brick-toolbar__section" }, Fo = {
|
|
1525
1544
|
key: 0,
|
|
1526
1545
|
class: "brick-toolbar__section"
|
|
1527
|
-
},
|
|
1546
|
+
}, Ho = /* @__PURE__ */ _({
|
|
1528
1547
|
__name: "Toolbar",
|
|
1529
1548
|
setup(e) {
|
|
1530
1549
|
const t = W();
|
|
1531
|
-
return (n,
|
|
1532
|
-
m("div",
|
|
1533
|
-
|
|
1550
|
+
return (n, i) => (a(), c("div", Ao, [
|
|
1551
|
+
m("div", Vo, [
|
|
1552
|
+
i[0] || (i[0] = m("h3", { class: "brick-toolbar__title" }, "Elements", -1)),
|
|
1534
1553
|
B(fo)
|
|
1535
1554
|
]),
|
|
1536
|
-
k(t).selectedNode.value ? (
|
|
1537
|
-
|
|
1538
|
-
B(
|
|
1555
|
+
k(t).selectedNode.value ? (a(), c("div", Fo, [
|
|
1556
|
+
i[1] || (i[1] = m("h3", { class: "brick-toolbar__title" }, "Properties", -1)),
|
|
1557
|
+
B(Oo)
|
|
1539
1558
|
])) : $("", !0)
|
|
1540
1559
|
]));
|
|
1541
1560
|
}
|
|
1542
|
-
}),
|
|
1561
|
+
}), Jo = /* @__PURE__ */ x(Ho, [["__scopeId", "data-v-0174c069"]]), Uo = { class: "brick-actionbar" }, Wo = { class: "brick-actionbar__group" }, jo = { class: "brick-actionbar__group" }, Yo = ["disabled"], qo = ["disabled"], Ko = ["disabled"], Go = { class: "brick-actionbar__group" }, Xo = /* @__PURE__ */ _({
|
|
1543
1562
|
__name: "ActionBar",
|
|
1544
1563
|
setup(e) {
|
|
1545
|
-
const t = xt(), n = zt(),
|
|
1564
|
+
const t = xt(), n = zt(), i = W(), s = j(), o = oe(), p = E("document"), f = E(null);
|
|
1546
1565
|
function d() {
|
|
1547
|
-
const
|
|
1548
|
-
|
|
1566
|
+
const y = i.selectedId.value;
|
|
1567
|
+
y && (i.deselect(), s.removeElement(y));
|
|
1549
1568
|
}
|
|
1550
1569
|
function r() {
|
|
1551
|
-
const
|
|
1552
|
-
n.exportPdf(
|
|
1570
|
+
const y = p.value.trim() || "document", g = y.endsWith(".pdf") ? y : y + ".pdf";
|
|
1571
|
+
n.exportPdf(g);
|
|
1553
1572
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const
|
|
1556
|
-
S.href =
|
|
1573
|
+
function l() {
|
|
1574
|
+
const y = o.exportDocument(), g = JSON.stringify(y, null, 2), v = new Blob([g], { type: "application/json" }), h = URL.createObjectURL(v), S = document.createElement("a"), R = p.value.trim() || "document";
|
|
1575
|
+
S.href = h, S.download = R.endsWith(".json") ? R : R + ".json", S.click(), URL.revokeObjectURL(h);
|
|
1557
1576
|
}
|
|
1558
|
-
function
|
|
1559
|
-
|
|
1577
|
+
function u() {
|
|
1578
|
+
f.value?.click();
|
|
1560
1579
|
}
|
|
1561
|
-
function
|
|
1562
|
-
const
|
|
1563
|
-
if (!
|
|
1564
|
-
const
|
|
1565
|
-
|
|
1580
|
+
function b(y) {
|
|
1581
|
+
const g = y.target, v = g.files?.[0];
|
|
1582
|
+
if (!v) return;
|
|
1583
|
+
const h = new FileReader();
|
|
1584
|
+
h.onload = () => {
|
|
1566
1585
|
try {
|
|
1567
|
-
const S = JSON.parse(
|
|
1586
|
+
const S = JSON.parse(h.result);
|
|
1568
1587
|
if (!S.content || !S.pageSize) {
|
|
1569
1588
|
alert("Invalid brick-pdf JSON file.");
|
|
1570
1589
|
return;
|
|
1571
1590
|
}
|
|
1572
|
-
|
|
1591
|
+
i.deselect(), o.loadDocument(S);
|
|
1573
1592
|
} catch {
|
|
1574
1593
|
alert("Failed to parse JSON file.");
|
|
1575
1594
|
}
|
|
1576
|
-
},
|
|
1595
|
+
}, h.readAsText(v), g.value = "";
|
|
1577
1596
|
}
|
|
1578
|
-
return (
|
|
1579
|
-
m("div",
|
|
1580
|
-
|
|
1581
|
-
"onUpdate:modelValue":
|
|
1597
|
+
return (y, g) => (a(), c("div", Uo, [
|
|
1598
|
+
m("div", Wo, [
|
|
1599
|
+
X(m("input", {
|
|
1600
|
+
"onUpdate:modelValue": g[0] || (g[0] = (v) => p.value = v),
|
|
1582
1601
|
class: "brick-actionbar__name",
|
|
1583
1602
|
type: "text",
|
|
1584
1603
|
placeholder: "Document name",
|
|
1585
1604
|
title: "Document name (used for export filename)"
|
|
1586
1605
|
}, null, 512), [
|
|
1587
|
-
[De,
|
|
1606
|
+
[De, p.value]
|
|
1588
1607
|
])
|
|
1589
1608
|
]),
|
|
1590
|
-
m("div",
|
|
1609
|
+
m("div", jo, [
|
|
1591
1610
|
m("button", {
|
|
1592
1611
|
class: "brick-actionbar__btn",
|
|
1593
1612
|
disabled: !k(t).canUndo.value,
|
|
1594
1613
|
title: "Undo",
|
|
1595
|
-
onClick:
|
|
1596
|
-
}, " Undo ", 8,
|
|
1614
|
+
onClick: g[1] || (g[1] = (v) => k(t).undo())
|
|
1615
|
+
}, " Undo ", 8, Yo),
|
|
1597
1616
|
m("button", {
|
|
1598
1617
|
class: "brick-actionbar__btn",
|
|
1599
1618
|
disabled: !k(t).canRedo.value,
|
|
1600
1619
|
title: "Redo",
|
|
1601
|
-
onClick:
|
|
1602
|
-
}, " Redo ", 8,
|
|
1620
|
+
onClick: g[2] || (g[2] = (v) => k(t).redo())
|
|
1621
|
+
}, " Redo ", 8, qo),
|
|
1603
1622
|
m("button", {
|
|
1604
1623
|
class: "brick-actionbar__btn brick-actionbar__btn--danger",
|
|
1605
|
-
disabled: !k(
|
|
1624
|
+
disabled: !k(i).selectedId.value,
|
|
1606
1625
|
title: "Delete selected element",
|
|
1607
1626
|
onClick: d
|
|
1608
|
-
}, " Delete ", 8,
|
|
1627
|
+
}, " Delete ", 8, Ko)
|
|
1609
1628
|
]),
|
|
1610
|
-
m("div",
|
|
1629
|
+
m("div", Go, [
|
|
1611
1630
|
m("button", {
|
|
1612
1631
|
class: "brick-actionbar__btn",
|
|
1613
1632
|
title: "Import JSON",
|
|
1614
|
-
onClick:
|
|
1633
|
+
onClick: u
|
|
1615
1634
|
}, " Import JSON "),
|
|
1616
1635
|
m("button", {
|
|
1617
1636
|
class: "brick-actionbar__btn",
|
|
1618
1637
|
title: "Export JSON",
|
|
1619
|
-
onClick:
|
|
1638
|
+
onClick: l
|
|
1620
1639
|
}, " Export JSON "),
|
|
1621
1640
|
m("button", {
|
|
1622
1641
|
class: "brick-actionbar__btn brick-actionbar__btn--primary",
|
|
@@ -1624,90 +1643,90 @@ const Hn = {
|
|
|
1624
1643
|
}, " Export PDF "),
|
|
1625
1644
|
m("button", {
|
|
1626
1645
|
class: "brick-actionbar__btn",
|
|
1627
|
-
onClick:
|
|
1646
|
+
onClick: g[3] || (g[3] = (v) => k(n).openPdf())
|
|
1628
1647
|
}, " Preview ")
|
|
1629
1648
|
]),
|
|
1630
1649
|
m("input", {
|
|
1631
1650
|
ref_key: "fileInput",
|
|
1632
|
-
ref:
|
|
1651
|
+
ref: f,
|
|
1633
1652
|
type: "file",
|
|
1634
1653
|
accept: ".json",
|
|
1635
1654
|
style: { display: "none" },
|
|
1636
|
-
onChange:
|
|
1655
|
+
onChange: b
|
|
1637
1656
|
}, null, 544)
|
|
1638
1657
|
]));
|
|
1639
1658
|
}
|
|
1640
|
-
}),
|
|
1659
|
+
}), Qo = /* @__PURE__ */ x(Xo, [["__scopeId", "data-v-be915a0f"]]), Zo = { class: "brick-pdf" }, er = { class: "brick-pdf__workspace" }, tr = /* @__PURE__ */ _({
|
|
1641
1660
|
__name: "BrickPdf",
|
|
1642
1661
|
props: {
|
|
1643
1662
|
modelValue: {}
|
|
1644
1663
|
},
|
|
1645
1664
|
emits: ["update:modelValue"],
|
|
1646
1665
|
setup(e, { emit: t }) {
|
|
1647
|
-
const n = e,
|
|
1666
|
+
const n = e, i = t;
|
|
1648
1667
|
Fn();
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1651
|
-
const o =
|
|
1668
|
+
const s = ft(n.modelValue ?? ne());
|
|
1669
|
+
yt(s);
|
|
1670
|
+
const o = mt(s);
|
|
1652
1671
|
gt(o);
|
|
1653
|
-
const
|
|
1654
|
-
St(
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1657
|
-
const d = Ct(
|
|
1672
|
+
const p = kt(s);
|
|
1673
|
+
St(p);
|
|
1674
|
+
const f = vt(s, p);
|
|
1675
|
+
ht(f);
|
|
1676
|
+
const d = Ct(s, f);
|
|
1658
1677
|
wt(d);
|
|
1659
|
-
const r = Rt(
|
|
1678
|
+
const r = Rt(s);
|
|
1660
1679
|
Nt(r);
|
|
1661
|
-
const
|
|
1662
|
-
Mt(
|
|
1663
|
-
const
|
|
1664
|
-
Ot(
|
|
1665
|
-
const
|
|
1666
|
-
return ae(
|
|
1680
|
+
const l = Lt(s, f);
|
|
1681
|
+
Mt(l);
|
|
1682
|
+
const u = Bt(f);
|
|
1683
|
+
Ot(u);
|
|
1684
|
+
const b = Me(), y = b.Delete, g = b.Backspace;
|
|
1685
|
+
return ae(y, () => {
|
|
1667
1686
|
if (!o.selectedId.value) return;
|
|
1668
|
-
const
|
|
1669
|
-
if (
|
|
1670
|
-
const
|
|
1671
|
-
o.deselect(),
|
|
1672
|
-
}), ae(
|
|
1687
|
+
const v = document.activeElement;
|
|
1688
|
+
if (v && (v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.tagName === "SELECT")) return;
|
|
1689
|
+
const h = o.selectedId.value;
|
|
1690
|
+
o.deselect(), f.removeElement(h);
|
|
1691
|
+
}), ae(g, () => {
|
|
1673
1692
|
if (!o.selectedId.value) return;
|
|
1674
|
-
const
|
|
1675
|
-
if (
|
|
1676
|
-
const
|
|
1677
|
-
o.deselect(),
|
|
1693
|
+
const v = document.activeElement;
|
|
1694
|
+
if (v && (v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.tagName === "SELECT")) return;
|
|
1695
|
+
const h = o.selectedId.value;
|
|
1696
|
+
o.deselect(), f.removeElement(h);
|
|
1678
1697
|
}), Le(
|
|
1679
|
-
() =>
|
|
1698
|
+
() => s.document,
|
|
1680
1699
|
() => {
|
|
1681
|
-
|
|
1700
|
+
i("update:modelValue", JSON.parse(JSON.stringify(J(s.document))));
|
|
1682
1701
|
},
|
|
1683
1702
|
{ deep: !0 }
|
|
1684
|
-
), (
|
|
1685
|
-
B(
|
|
1686
|
-
m("div",
|
|
1703
|
+
), (v, h) => (a(), c("div", Zo, [
|
|
1704
|
+
B(Qo),
|
|
1705
|
+
m("div", er, [
|
|
1687
1706
|
B(so),
|
|
1688
|
-
B(
|
|
1707
|
+
B(Jo)
|
|
1689
1708
|
])
|
|
1690
1709
|
]));
|
|
1691
1710
|
}
|
|
1692
|
-
}),
|
|
1711
|
+
}), nr = /* @__PURE__ */ x(tr, [["__scopeId", "data-v-f9b95ad8"]]), cr = {
|
|
1693
1712
|
install(e) {
|
|
1694
|
-
e.component("BrickPdf",
|
|
1713
|
+
e.component("BrickPdf", nr);
|
|
1695
1714
|
}
|
|
1696
1715
|
};
|
|
1697
1716
|
export {
|
|
1698
|
-
|
|
1717
|
+
nr as BrickPdf,
|
|
1699
1718
|
ne as createDefaultDocument,
|
|
1700
|
-
|
|
1719
|
+
cr as default,
|
|
1701
1720
|
Be as getAllElementDefinitions,
|
|
1702
1721
|
U as getElementDefinition,
|
|
1703
1722
|
z as registerElement,
|
|
1704
|
-
|
|
1705
|
-
|
|
1723
|
+
ir as unregisterElement,
|
|
1724
|
+
sr as useClipboard,
|
|
1706
1725
|
oe as useDocumentStore,
|
|
1707
1726
|
xe as useDragDrop,
|
|
1708
|
-
|
|
1727
|
+
j as useElementActions,
|
|
1709
1728
|
xt as useHistory,
|
|
1710
1729
|
zt as usePdfExport,
|
|
1711
|
-
|
|
1730
|
+
ar as useResize,
|
|
1712
1731
|
W as useSelection
|
|
1713
1732
|
};
|