@worm-print-platform/canvas 1.5.0 → 1.5.2
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/README.md +112 -359
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/canvas.css +1 -1
- package/dist/canvas.js +84 -81
- package/dist/core/default-template.d.ts +1 -1
- package/dist/core/element-definitions.d.ts +1 -1
- package/dist/core/format.d.ts +1 -1
- package/dist/core/h.d.ts +1 -1
- package/dist/core/icons.d.ts +1 -1
- package/dist/core/plugin.d.ts +1 -1
- package/dist/core/store.d.ts +1 -1
- package/dist/host-contract.d.ts +7 -3
- package/dist/index.cjs +14 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1289 -1242
- package/dist/print-designer.d.ts +7 -3
- package/dist/shell/binding.d.ts +1 -1
- package/dist/shell/canvas.d.ts +1 -1
- package/dist/shell/code.d.ts +1 -1
- package/dist/shell/color-picker.d.ts +1 -1
- package/dist/shell/controls.d.ts +4 -1
- package/dist/shell/crop-anchor.d.ts +1 -1
- package/dist/shell/elements.d.ts +1 -1
- package/dist/shell/expression-editor.d.ts +1 -1
- package/dist/shell/flow-list.d.ts +1 -1
- package/dist/shell/font-select.d.ts +1 -1
- package/dist/shell/format-bar.d.ts +1 -1
- package/dist/shell/help-content/advanced-settings.d.ts +1 -1
- package/dist/shell/help-content/changelog.d.ts +1 -1
- package/dist/shell/help-content/faq.d.ts +1 -1
- package/dist/shell/help-content/features.d.ts +1 -1
- package/dist/shell/help-content/getting-started.d.ts +1 -1
- package/dist/shell/help-content/index.d.ts +1 -1
- package/dist/shell/help-content/shortcuts.d.ts +1 -1
- package/dist/shell/help-modal.d.ts +1 -1
- package/dist/shell/page-extras.d.ts +1 -1
- package/dist/shell/panels.d.ts +1 -1
- package/dist/shell/plugin-ui.d.ts +1 -1
- package/dist/shell/prop-group.d.ts +1 -1
- package/dist/shell/property-panel.d.ts +1 -1
- package/dist/shell/property-search.d.ts +1 -1
- package/dist/shell/ruler.d.ts +1 -1
- package/dist/shell/table-props.d.ts +1 -1
- package/dist/shell/table.d.ts +2 -2
- package/dist/shell/toolbar-overflow.d.ts +1 -1
- package/dist/shell/toolbar.d.ts +1 -1
- package/dist/shell/watermark.d.ts +1 -1
- package/dist/vue3/PrintDesigner.d.ts +23 -1
- package/dist/vue3/PrintHtmlPreview.d.ts +1 -1
- package/dist/vue3/index.cjs +2 -2
- package/dist/vue3/index.d.ts +1 -1
- package/dist/vue3/index.js +121 -111
- package/dist/vue3/previewStyle.d.ts +1 -1
- package/dist/vue3/toolbarOverflow.d.ts +1 -1
- package/package.json +4 -4
package/dist/vue3/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, ref as y, onMounted as L, onBeforeUnmount as H, watch as w, h as g, computed as D, shallowRef as C, reactive as F, onUnmounted as _, provide as j, inject as V, nextTick as U } from "vue";
|
|
2
2
|
import { definePrintDesigner as Z } from "@worm-print-platform/canvas";
|
|
3
|
-
import { createDefaultTemplate as
|
|
3
|
+
import { createDefaultTemplate as Pe, toRuntimePool as Re } from "@worm-print-platform/canvas";
|
|
4
4
|
import { collectLayoutWarnings as G } from "@worm-print-platform/core";
|
|
5
5
|
import { renderHtmlPages as K, browserCodeRenderer as N } from "@worm-print-platform/core/browser";
|
|
6
|
-
import { browserCodeRenderer as
|
|
6
|
+
import { browserCodeRenderer as Se, renderHtmlPages as Ie } from "@worm-print-platform/core/browser";
|
|
7
7
|
import { resolvePrinterDpi as $, zoomPresets as q, paperWidthPx as Y, defaultZoomKey as Q, zoomValueOf as X, viewZoomHint as ee, applyPreviewViewZoom as te, resolveZoomKey as ne, resolveToolbarOverflow as oe } from "@worm-print-platform/core/designer";
|
|
8
|
-
import { DEFAULT_DEMO_DATA as
|
|
8
|
+
import { DEFAULT_DEMO_DATA as We, getDemoData as Ae } from "@worm-print-platform/core/designer";
|
|
9
9
|
import { TOOLBAR_OVERFLOW_KEY as ie } from "@worm-print-platform/plugin-kit";
|
|
10
10
|
function re(e, a) {
|
|
11
11
|
const v = a.map((s) => ({
|
|
@@ -18,7 +18,7 @@ function re(e, a) {
|
|
|
18
18
|
pages: i.map((s, r) => r === 0 ? { ...s, elements: v } : s)
|
|
19
19
|
} : { ...e, elements: v };
|
|
20
20
|
}
|
|
21
|
-
const ae =
|
|
21
|
+
const ae = B({
|
|
22
22
|
name: "PrintDesigner",
|
|
23
23
|
props: {
|
|
24
24
|
initialTemplate: {
|
|
@@ -46,6 +46,10 @@ const ae = L({
|
|
|
46
46
|
},
|
|
47
47
|
/** 是否展示帮助入口;不传时保持元素默认(展示) */
|
|
48
48
|
showHelp: { type: Boolean, default: void 0 },
|
|
49
|
+
/** 是否展示工具栏「预览」按钮;不传时保持元素默认(展示) */
|
|
50
|
+
showPreview: { type: Boolean, default: void 0 },
|
|
51
|
+
/** 是否展示工具栏「保存」按钮;不传时保持元素默认(展示) */
|
|
52
|
+
showSave: { type: Boolean, default: void 0 },
|
|
49
53
|
/** 模板级字体声明,保存 / 导出时写入模板 JSON */
|
|
50
54
|
fonts: {
|
|
51
55
|
type: Array,
|
|
@@ -62,7 +66,7 @@ const ae = L({
|
|
|
62
66
|
save: (e) => typeof e == "string"
|
|
63
67
|
},
|
|
64
68
|
setup(e, { emit: a, expose: v }) {
|
|
65
|
-
const i =
|
|
69
|
+
const i = y(null);
|
|
66
70
|
let s = null, r = null;
|
|
67
71
|
typeof customElements < "u" && Z();
|
|
68
72
|
function c(t) {
|
|
@@ -71,46 +75,52 @@ const ae = L({
|
|
|
71
75
|
return;
|
|
72
76
|
}
|
|
73
77
|
if (e.initialElements === void 0) return;
|
|
74
|
-
const
|
|
75
|
-
t.template = re(
|
|
78
|
+
const n = t.getTemplateJson(), f = JSON.parse(n);
|
|
79
|
+
t.template = re(f, e.initialElements);
|
|
76
80
|
}
|
|
77
81
|
function x() {
|
|
78
82
|
const t = i.value;
|
|
79
|
-
t && (c(t), e.fields !== void 0 && (t.fields = e.fields), e.fonts !== void 0 && (t.fonts = e.fonts), e.designData !== void 0 && (t.designData = e.designData), t.uploadImage = e.uploadImage, t.uploadDesignBackground = e.uploadDesignBackground, e.isEdit !== void 0 && (t.isEdit = e.isEdit), e.showHelp !== void 0 && (t.showHelp = e.showHelp));
|
|
83
|
+
t && (c(t), e.fields !== void 0 && (t.fields = e.fields), e.fonts !== void 0 && (t.fonts = e.fonts), e.designData !== void 0 && (t.designData = e.designData), t.uploadImage = e.uploadImage, t.uploadDesignBackground = e.uploadDesignBackground, e.isEdit !== void 0 && (t.isEdit = e.isEdit), e.showHelp !== void 0 && (t.showHelp = e.showHelp), e.showPreview !== void 0 && (t.showPreview = e.showPreview), e.showSave !== void 0 && (t.showSave = e.showSave));
|
|
80
84
|
}
|
|
81
|
-
return
|
|
85
|
+
return L(() => {
|
|
82
86
|
const t = i.value;
|
|
83
|
-
t && (s = (
|
|
87
|
+
t && (s = (n) => a("save", n.detail), r = () => a("preview"), t.addEventListener("save", s), t.addEventListener("preview", r), x());
|
|
84
88
|
}), H(() => {
|
|
85
89
|
const t = i.value;
|
|
86
90
|
s && t?.removeEventListener("save", s), r && t?.removeEventListener("preview", r), s = null, r = null;
|
|
87
|
-
}),
|
|
91
|
+
}), w(() => e.initialTemplate, () => {
|
|
88
92
|
const t = i.value;
|
|
89
93
|
t && c(t);
|
|
90
|
-
}),
|
|
94
|
+
}), w(() => e.initialElements, () => {
|
|
91
95
|
const t = i.value;
|
|
92
96
|
t && c(t);
|
|
93
|
-
}),
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
}),
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
}),
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
}),
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
}),
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
}),
|
|
112
|
-
const
|
|
113
|
-
|
|
97
|
+
}), w(() => e.fields, (t) => {
|
|
98
|
+
const n = i.value;
|
|
99
|
+
n && (n.fields = t ?? []);
|
|
100
|
+
}), w(() => e.fonts, (t) => {
|
|
101
|
+
const n = i.value;
|
|
102
|
+
n && (n.fonts = t);
|
|
103
|
+
}), w(() => e.designData, (t) => {
|
|
104
|
+
const n = i.value;
|
|
105
|
+
n && (n.designData = t);
|
|
106
|
+
}), w(() => e.uploadImage, (t) => {
|
|
107
|
+
const n = i.value;
|
|
108
|
+
n && (n.uploadImage = t);
|
|
109
|
+
}), w(() => e.uploadDesignBackground, (t) => {
|
|
110
|
+
const n = i.value;
|
|
111
|
+
n && (n.uploadDesignBackground = t);
|
|
112
|
+
}), w(() => e.isEdit, (t) => {
|
|
113
|
+
const n = i.value;
|
|
114
|
+
n && t !== void 0 && (n.isEdit = t);
|
|
115
|
+
}), w(() => e.showHelp, (t) => {
|
|
116
|
+
const n = i.value;
|
|
117
|
+
n && t !== void 0 && (n.showHelp = t);
|
|
118
|
+
}), w(() => e.showPreview, (t) => {
|
|
119
|
+
const n = i.value;
|
|
120
|
+
n && t !== void 0 && (n.showPreview = t);
|
|
121
|
+
}), w(() => e.showSave, (t) => {
|
|
122
|
+
const n = i.value;
|
|
123
|
+
n && t !== void 0 && (n.showSave = t);
|
|
114
124
|
}), v({
|
|
115
125
|
getTemplateJson() {
|
|
116
126
|
const t = i.value?.getTemplateJson();
|
|
@@ -124,7 +134,7 @@ const ae = L({
|
|
|
124
134
|
}
|
|
125
135
|
}), () => g("print-designer", { ref: i });
|
|
126
136
|
}
|
|
127
|
-
}),
|
|
137
|
+
}), ge = ae, A = "worm-print-canvas-vue3-preview", le = `
|
|
128
138
|
.pcv3-preview.print-html-preview {
|
|
129
139
|
width: 100%;
|
|
130
140
|
height: 100%;
|
|
@@ -207,11 +217,11 @@ const ae = L({
|
|
|
207
217
|
}
|
|
208
218
|
`;
|
|
209
219
|
function se() {
|
|
210
|
-
if (typeof document > "u" || document.getElementById(
|
|
220
|
+
if (typeof document > "u" || document.getElementById(A)) return;
|
|
211
221
|
const e = document.createElement("style");
|
|
212
|
-
e.id =
|
|
222
|
+
e.id = A, e.textContent = le, document.head.appendChild(e);
|
|
213
223
|
}
|
|
214
|
-
const ue =
|
|
224
|
+
const ue = B({
|
|
215
225
|
name: "PrintHtmlPreview",
|
|
216
226
|
props: {
|
|
217
227
|
/** 模板 JSON(设计器 TemplateData 结构兼容) */
|
|
@@ -239,24 +249,24 @@ const ue = L({
|
|
|
239
249
|
error: (e) => typeof e == "string"
|
|
240
250
|
},
|
|
241
251
|
setup(e, { emit: a, expose: v }) {
|
|
242
|
-
const i =
|
|
252
|
+
const i = y(), s = y(), r = y(!1), c = y(""), x = y([]);
|
|
243
253
|
let E = 0;
|
|
244
|
-
const t = D(() => $(e.templateJson)),
|
|
245
|
-
() => q(t.value,
|
|
246
|
-
),
|
|
254
|
+
const t = D(() => $(e.templateJson)), n = y(0), f = D(
|
|
255
|
+
() => q(t.value, n.value, Y(e.templateJson))
|
|
256
|
+
), p = y(Q(t.value)), k = D(() => X(f.value, p.value)), T = D(() => ee(t.value, p.value));
|
|
247
257
|
function O() {
|
|
248
|
-
|
|
258
|
+
n.value = s.value?.clientWidth ?? 0;
|
|
249
259
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
260
|
+
function S() {
|
|
261
|
+
p.value = ne(f.value, p.value, t.value);
|
|
252
262
|
}
|
|
253
|
-
function
|
|
254
|
-
te(i.value?.contentWindow?.document,
|
|
263
|
+
function P() {
|
|
264
|
+
te(i.value?.contentWindow?.document, k.value);
|
|
255
265
|
}
|
|
256
|
-
function
|
|
257
|
-
O(),
|
|
266
|
+
function I() {
|
|
267
|
+
O(), P();
|
|
258
268
|
}
|
|
259
|
-
async function
|
|
269
|
+
async function o() {
|
|
260
270
|
if (!e.templateJson) {
|
|
261
271
|
c.value = "", r.value = !1;
|
|
262
272
|
return;
|
|
@@ -264,7 +274,7 @@ const ue = L({
|
|
|
264
274
|
const l = ++E;
|
|
265
275
|
r.value = !0, c.value = "", x.value = [];
|
|
266
276
|
try {
|
|
267
|
-
const { html: u, pageCount: b, copies: d, pageLayouts:
|
|
277
|
+
const { html: u, pageCount: b, copies: d, pageLayouts: R } = await K(
|
|
268
278
|
e.templateJson,
|
|
269
279
|
e.printData,
|
|
270
280
|
e.baseUrl,
|
|
@@ -272,9 +282,9 @@ const ue = L({
|
|
|
272
282
|
{ fontBaseUrl: e.fontBaseUrl, renderers: e.renderers }
|
|
273
283
|
);
|
|
274
284
|
if (l !== E) return;
|
|
275
|
-
x.value = G(
|
|
276
|
-
const
|
|
277
|
-
|
|
285
|
+
x.value = G(R ?? []);
|
|
286
|
+
const h = i.value?.contentWindow?.document;
|
|
287
|
+
h && (h.open(), h.write(u), h.close()), O(), S(), P(), a("rendered", b, d);
|
|
278
288
|
} catch (u) {
|
|
279
289
|
if (l !== E) return;
|
|
280
290
|
c.value = u instanceof Error ? u.message : "未知错误", a("error", c.value);
|
|
@@ -287,19 +297,19 @@ const ue = L({
|
|
|
287
297
|
l && (l.focus(), l.print());
|
|
288
298
|
}
|
|
289
299
|
function z(l) {
|
|
290
|
-
|
|
300
|
+
f.value.some((u) => u.key === l) && (p.value = l);
|
|
291
301
|
}
|
|
292
|
-
return
|
|
302
|
+
return w(
|
|
293
303
|
() => [e.templateJson, e.printData, e.baseUrl, e.fontBaseUrl, e.renderers],
|
|
294
304
|
() => {
|
|
295
|
-
|
|
305
|
+
o();
|
|
296
306
|
},
|
|
297
307
|
{ deep: !0 }
|
|
298
|
-
),
|
|
299
|
-
se(), O(),
|
|
308
|
+
), w(k, () => P()), L(() => {
|
|
309
|
+
se(), O(), S(), window.addEventListener("resize", I), o();
|
|
300
310
|
}), H(() => {
|
|
301
|
-
E++, window.removeEventListener("resize",
|
|
302
|
-
}), v({ print: m, rerender:
|
|
311
|
+
E++, window.removeEventListener("resize", I);
|
|
312
|
+
}), v({ print: m, rerender: o, setViewZoom: z, zoomKey: p, presets: f, viewHint: T }), () => {
|
|
303
313
|
const l = r.value || !!c.value, u = [];
|
|
304
314
|
if (c.value ? u.push(g("div", { key: "error", class: "print-html-preview-error" }, [
|
|
305
315
|
g("span", null, `预览渲染失败:${c.value}`)
|
|
@@ -312,16 +322,16 @@ const ue = L({
|
|
|
312
322
|
})), x.value.length && !l && u.push(g("div", { key: "warn", class: "print-html-preview-warn", role: "status" }, [
|
|
313
323
|
g("span", null, `出纸提示:${x.value.join(";")}`)
|
|
314
324
|
])), e.templateJson && !l) {
|
|
315
|
-
const b =
|
|
325
|
+
const b = f.value.map((d) => g("button", {
|
|
316
326
|
key: d.key,
|
|
317
327
|
type: "button",
|
|
318
328
|
class: {
|
|
319
329
|
"print-html-preview-zoom-btn": !0,
|
|
320
|
-
active: d.key ===
|
|
330
|
+
active: d.key === p.value
|
|
321
331
|
},
|
|
322
332
|
title: d.tip,
|
|
323
333
|
onClick: () => {
|
|
324
|
-
|
|
334
|
+
p.value = d.key;
|
|
325
335
|
}
|
|
326
336
|
}, d.label));
|
|
327
337
|
T.value && b.push(g("span", { class: "print-html-preview-zoom-hint" }, T.value)), b.push(g("span", { class: "print-html-preview-zoom-note" }, "仅屏幕缩放,打印不受影响")), u.push(g("div", { key: "zoom", class: "print-html-preview-zoom" }, b));
|
|
@@ -336,73 +346,73 @@ const ue = L({
|
|
|
336
346
|
function be(e) {
|
|
337
347
|
return `tb-more-slot-${e}`;
|
|
338
348
|
}
|
|
339
|
-
const J = ie,
|
|
349
|
+
const J = ie, W = 2, de = 74;
|
|
340
350
|
function ve() {
|
|
341
351
|
const e = C(null), a = /* @__PURE__ */ new Map(), v = F(/* @__PURE__ */ new Map()), i = /* @__PURE__ */ new Map();
|
|
342
352
|
let s = 0;
|
|
343
|
-
const r =
|
|
353
|
+
const r = y(/* @__PURE__ */ new Set()), c = y(!1), x = D(() => [...v.values()].sort((o, m) => o.order - m.order)), E = D(() => r.value.size > 0);
|
|
344
354
|
function t() {
|
|
345
|
-
for (const [
|
|
355
|
+
for (const [o, m] of a) {
|
|
346
356
|
const z = m.offsetWidth;
|
|
347
|
-
z > 0 && i.set(
|
|
357
|
+
z > 0 && i.set(o, z);
|
|
348
358
|
}
|
|
349
359
|
}
|
|
350
|
-
function o
|
|
351
|
-
const m = getComputedStyle(
|
|
360
|
+
function n(o) {
|
|
361
|
+
const m = getComputedStyle(o), z = Number.parseFloat(m.gap) || W, l = Number.parseFloat(m.paddingLeft) || 0, u = Number.parseFloat(m.paddingRight) || 0;
|
|
352
362
|
let b = 0;
|
|
353
|
-
for (const d of Array.from(
|
|
363
|
+
for (const d of Array.from(o.children)) {
|
|
354
364
|
if (d.hasAttribute("data-overflow-more") || d.hasAttribute("data-overflow-spacer")) continue;
|
|
355
|
-
const
|
|
356
|
-
|
|
365
|
+
const R = Math.max(d.offsetWidth, d.scrollWidth);
|
|
366
|
+
R <= 0 || (b += R + z);
|
|
357
367
|
}
|
|
358
|
-
return { available:
|
|
368
|
+
return { available: o.clientWidth - l - u, natural: b };
|
|
359
369
|
}
|
|
360
|
-
function
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
363
|
-
const { available: m, natural: z } = o
|
|
370
|
+
function f() {
|
|
371
|
+
const o = e.value;
|
|
372
|
+
if (!o) return;
|
|
373
|
+
const { available: m, natural: z } = n(o), l = r.value.size > 0;
|
|
364
374
|
l || (s = z, t());
|
|
365
|
-
const u = x.value.map((
|
|
366
|
-
id:
|
|
367
|
-
order:
|
|
368
|
-
width: i.get(
|
|
369
|
-
})), b = u.reduce((
|
|
375
|
+
const u = x.value.map((h) => ({
|
|
376
|
+
id: h.id,
|
|
377
|
+
order: h.order,
|
|
378
|
+
width: i.get(h.id) ?? 0
|
|
379
|
+
})), b = u.reduce((h, M) => h - M.width - W, s), d = oe({
|
|
370
380
|
available: m,
|
|
371
381
|
pinned: b,
|
|
372
382
|
moreTriggerWidth: de,
|
|
373
|
-
gap:
|
|
383
|
+
gap: W,
|
|
374
384
|
units: u
|
|
375
385
|
});
|
|
376
|
-
d.movedIds.length === r.value.size && d.movedIds.every((
|
|
386
|
+
d.movedIds.length === r.value.size && d.movedIds.every((h) => r.value.has(h)) || (r.value = new Set(d.movedIds)), c.value = d.overflowRemains, l && r.value.size === 0 && U(f);
|
|
377
387
|
}
|
|
378
|
-
let
|
|
379
|
-
function
|
|
380
|
-
|
|
388
|
+
let p = null;
|
|
389
|
+
function k(o) {
|
|
390
|
+
o !== e.value && (p?.disconnect(), e.value = o, o && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => f()), p.observe(o)), U(f));
|
|
381
391
|
}
|
|
382
|
-
function T(
|
|
383
|
-
v.set(
|
|
392
|
+
function T(o, m) {
|
|
393
|
+
v.set(o.id, o), a.set(o.id, m), U(f);
|
|
384
394
|
}
|
|
385
|
-
function O(
|
|
386
|
-
a.delete(
|
|
395
|
+
function O(o) {
|
|
396
|
+
a.delete(o), v.delete(o), i.delete(o), U(f);
|
|
387
397
|
}
|
|
388
|
-
const
|
|
389
|
-
function
|
|
390
|
-
return r.value.has(
|
|
398
|
+
const S = document.createElement("div");
|
|
399
|
+
function P(o) {
|
|
400
|
+
return r.value.has(o);
|
|
391
401
|
}
|
|
392
|
-
function
|
|
393
|
-
return r.value, e.value?.querySelector(`[data-overflow-slot="${
|
|
402
|
+
function I(o) {
|
|
403
|
+
return r.value, e.value?.querySelector(`[data-overflow-slot="${o}"]`) ?? S;
|
|
394
404
|
}
|
|
395
|
-
return _(() =>
|
|
396
|
-
attachRoot:
|
|
405
|
+
return _(() => p?.disconnect()), {
|
|
406
|
+
attachRoot: k,
|
|
397
407
|
registerUnit: T,
|
|
398
408
|
unregisterUnit: O,
|
|
399
|
-
refresh:
|
|
409
|
+
refresh: f,
|
|
400
410
|
movedIds: r,
|
|
401
411
|
overflowRemains: c,
|
|
402
412
|
hasMoved: E,
|
|
403
413
|
chain: x,
|
|
404
|
-
moved:
|
|
405
|
-
slotEl:
|
|
414
|
+
moved: P,
|
|
415
|
+
slotEl: I
|
|
406
416
|
};
|
|
407
417
|
}
|
|
408
418
|
function xe() {
|
|
@@ -413,7 +423,7 @@ function Ee() {
|
|
|
413
423
|
return V(J, null);
|
|
414
424
|
}
|
|
415
425
|
function ze() {
|
|
416
|
-
const e =
|
|
426
|
+
const e = y(/* @__PURE__ */ new Set()), a = document.createElement("div");
|
|
417
427
|
return {
|
|
418
428
|
attachRoot: () => {
|
|
419
429
|
},
|
|
@@ -424,7 +434,7 @@ function ze() {
|
|
|
424
434
|
refresh: () => {
|
|
425
435
|
},
|
|
426
436
|
movedIds: e,
|
|
427
|
-
overflowRemains:
|
|
437
|
+
overflowRemains: y(!1),
|
|
428
438
|
hasMoved: D(() => !1),
|
|
429
439
|
chain: D(() => []),
|
|
430
440
|
moved: () => !1,
|
|
@@ -442,19 +452,19 @@ function De(e) {
|
|
|
442
452
|
};
|
|
443
453
|
}
|
|
444
454
|
export {
|
|
445
|
-
|
|
446
|
-
|
|
455
|
+
We as DEFAULT_DEMO_DATA,
|
|
456
|
+
ge as PrintDesigner,
|
|
447
457
|
ye as PrintHtmlPreview,
|
|
448
458
|
J as TOOLBAR_OVERFLOW,
|
|
449
|
-
|
|
450
|
-
|
|
459
|
+
Se as browserCodeRenderer,
|
|
460
|
+
Pe as createDefaultTemplate,
|
|
451
461
|
De as createOverflowUnitDirective,
|
|
452
462
|
ve as createToolbarOverflow,
|
|
453
463
|
ze as emptyToolbarOverflow,
|
|
454
|
-
|
|
464
|
+
Ae as getDemoData,
|
|
455
465
|
be as moreSlotId,
|
|
456
466
|
xe as provideToolbarOverflow,
|
|
457
|
-
|
|
458
|
-
|
|
467
|
+
Ie as renderHtmlPages,
|
|
468
|
+
Re as toRuntimePool,
|
|
459
469
|
Ee as useToolbarOverflow
|
|
460
470
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worm-print-platform/canvas",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"description": "
|
|
9
|
+
"description": "打印模板设计器权威实现:零框架原生 Custom Elements + Shadow DOM(vue 为可选 peer,/vue3 子路径提供 Vue 3 门面)",
|
|
10
10
|
"main": "./dist/index.cjs",
|
|
11
11
|
"module": "./dist/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"pretest": "npm run typecheck"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@worm-print-platform/core": "^1.5.
|
|
58
|
-
"@worm-print-platform/plugin-kit": "^1.5.
|
|
57
|
+
"@worm-print-platform/core": "^1.5.2",
|
|
58
|
+
"@worm-print-platform/plugin-kit": "^1.5.2",
|
|
59
59
|
"dompurify": "^3.4.12",
|
|
60
60
|
"jsbarcode": "^3.12.3",
|
|
61
61
|
"qrcode": "^1.5.4"
|