@vtj/designer 0.8.61 → 0.8.63
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/{Editor-bVAaI2zL.js → Editor-DjXowHju.js} +1 -1
- package/dist/{css.worker-BG3X4ypZ.js → css.worker-DsXsg0f9.js} +1 -2
- package/dist/{editor.worker-CdJourTJ.js → editor.worker-C6rtsk95.js} +1 -2
- package/dist/{html.worker-BCBdCLMV.js → html.worker-DOZaicN7.js} +1 -2
- package/dist/index.mjs +44 -75
- package/dist/{json.worker-BhNp9C2F.js → json.worker-Bm0JMgNu.js} +1 -2
- package/dist/{ts.worker-yjAiJiOi.js → ts.worker-CdTDJbmm.js} +1 -2
- package/package.json +8 -8
- package/types/version.d.ts +2 -2
|
@@ -19,7 +19,7 @@ const T = /* @__PURE__ */ p({
|
|
|
19
19
|
createTrustedTypesPolicy: void 0,
|
|
20
20
|
async getWorker(o, a) {
|
|
21
21
|
let n;
|
|
22
|
-
return a === "json" && (n = await import("./json.worker-
|
|
22
|
+
return a === "json" && (n = await import("./json.worker-Bm0JMgNu.js")), ["css", "scss", "less"].includes(a) && (n = await import("./css.worker-DsXsg0f9.js")), ["html", "handlebars", "razor", "vue"].includes(a) && (n = await import("./html.worker-DOZaicN7.js")), ["typescript", "javascript"].includes(a) && (n = await import("./ts.worker-CdTDJbmm.js")), n = n || await import("./editor.worker-C6rtsk95.js"), new n.default();
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const r = d, i = f();
|
|
@@ -2,8 +2,7 @@ const W = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzIGRje2NvbnN0cnVjdG9yKCl7dGhpc
|
|
|
2
2
|
function d(Z) {
|
|
3
3
|
let l;
|
|
4
4
|
try {
|
|
5
|
-
if (l = G && (window.URL || window.webkitURL).createObjectURL(G), !l)
|
|
6
|
-
throw "";
|
|
5
|
+
if (l = G && (window.URL || window.webkitURL).createObjectURL(G), !l) throw "";
|
|
7
6
|
const b = new Worker(l, {
|
|
8
7
|
name: Z?.name
|
|
9
8
|
});
|
|
@@ -2,8 +2,7 @@ const c = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzIFhye2NvbnN0cnVjdG9yKCl7dGhpc
|
|
|
2
2
|
function W(Z) {
|
|
3
3
|
let l;
|
|
4
4
|
try {
|
|
5
|
-
if (l = d && (window.URL || window.webkitURL).createObjectURL(d), !l)
|
|
6
|
-
throw "";
|
|
5
|
+
if (l = d && (window.URL || window.webkitURL).createObjectURL(d), !l) throw "";
|
|
7
6
|
const b = new Worker(l, {
|
|
8
7
|
name: Z?.name
|
|
9
8
|
});
|
|
@@ -2,8 +2,7 @@ const d = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzIHBze2NvbnN0cnVjdG9yKCl7dGhpc
|
|
|
2
2
|
function W(l) {
|
|
3
3
|
let Z;
|
|
4
4
|
try {
|
|
5
|
-
if (Z = G && (window.URL || window.webkitURL).createObjectURL(G), !Z)
|
|
6
|
-
throw "";
|
|
5
|
+
if (Z = G && (window.URL || window.webkitURL).createObjectURL(G), !Z) throw "";
|
|
7
6
|
const b = new Worker(Z, {
|
|
8
7
|
name: l?.name
|
|
9
8
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -11,10 +11,10 @@ import As from "mockjs";
|
|
|
11
11
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
12
12
|
* @name @vtj/designer
|
|
13
13
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
14
|
-
* @version 0.8.
|
|
14
|
+
* @version 0.8.63
|
|
15
15
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
16
16
|
*/
|
|
17
|
-
const js = "0.8.
|
|
17
|
+
const js = "0.8.63", Ut = {
|
|
18
18
|
width: 390,
|
|
19
19
|
height: 844
|
|
20
20
|
}, qt = {
|
|
@@ -176,8 +176,7 @@ function Fs(u) {
|
|
|
176
176
|
return o;
|
|
177
177
|
}
|
|
178
178
|
function dt(u, e) {
|
|
179
|
-
if (!e)
|
|
180
|
-
return null;
|
|
179
|
+
if (!e) return null;
|
|
181
180
|
const { left: t, top: l, width: a, height: r } = u === "dropping" ? Fs(e) : e.rect, s = {
|
|
182
181
|
left: `${t}px`,
|
|
183
182
|
top: `${l}px`,
|
|
@@ -205,8 +204,7 @@ function ke() {
|
|
|
205
204
|
function Ns(u, e) {
|
|
206
205
|
const t = k(""), { selected: l, isSelectBlock: a } = ke(), r = S(() => l.value?.model.id), s = S(() => {
|
|
207
206
|
const i = mt(u), g = mt(e), p = [];
|
|
208
|
-
if (!i)
|
|
209
|
-
return p;
|
|
207
|
+
if (!i) return p;
|
|
210
208
|
const v = g?.__contextRefs[r.value || ""], b = g === v || a.value ? [] : Object.keys(v?.context || {}).filter(($) => !["context", "ref"].includes($)).map(($) => `this.context.${$}`);
|
|
211
209
|
b.length && p.push({ title: "上下文", items: b });
|
|
212
210
|
const c = i.inject.map(($) => `this.${$.name}`);
|
|
@@ -232,8 +230,7 @@ function Ns(u, e) {
|
|
|
232
230
|
);
|
|
233
231
|
return O.length && p.push({ title: "refs", items: O }), p;
|
|
234
232
|
}), o = S(() => {
|
|
235
|
-
if (!t.value)
|
|
236
|
-
return s.value;
|
|
233
|
+
if (!t.value) return s.value;
|
|
237
234
|
const i = t.value.toLowerCase(), g = [];
|
|
238
235
|
return s.value.forEach((p) => {
|
|
239
236
|
const v = p.items.filter(
|
|
@@ -298,8 +295,7 @@ function Ws(u) {
|
|
|
298
295
|
value: Array.isArray(t.value.children) ? "" : t.value.children
|
|
299
296
|
}
|
|
300
297
|
] : []), r = S(() => {
|
|
301
|
-
if (!t.value)
|
|
302
|
-
return [];
|
|
298
|
+
if (!t.value) return [];
|
|
303
299
|
const v = l.value || e.assets.componentMap.get(t.value.name);
|
|
304
300
|
return v ? (v.props || []).map((b) => ({
|
|
305
301
|
...b,
|
|
@@ -404,24 +400,21 @@ function Ms(u) {
|
|
|
404
400
|
}
|
|
405
401
|
);
|
|
406
402
|
const a = S(() => {
|
|
407
|
-
if (ee(t.value))
|
|
408
|
-
return [];
|
|
403
|
+
if (ee(t.value)) return [];
|
|
409
404
|
const o = t.value?.events || {};
|
|
410
405
|
return Es.map((i) => ({
|
|
411
406
|
name: i,
|
|
412
407
|
event: o[i]
|
|
413
408
|
}));
|
|
414
409
|
}), r = S(() => {
|
|
415
|
-
if (ee(t.value))
|
|
416
|
-
return [];
|
|
410
|
+
if (ee(t.value)) return [];
|
|
417
411
|
const o = t.value?.events || {};
|
|
418
412
|
return Ps.map((i) => ({
|
|
419
413
|
name: i,
|
|
420
414
|
event: o[i]
|
|
421
415
|
}));
|
|
422
416
|
}), s = S(() => {
|
|
423
|
-
if (!t.value || ee(t.value))
|
|
424
|
-
return [];
|
|
417
|
+
if (!t.value || ee(t.value)) return [];
|
|
425
418
|
const o = t.value.events || {};
|
|
426
419
|
return (l.value?.events || e.assets.componentMap.get(t.value.name)?.events || []).map((g) => {
|
|
427
420
|
const p = typeof g == "string" ? g : g.name;
|
|
@@ -447,8 +440,7 @@ const Ht = (u, e) => new hn({
|
|
|
447
440
|
arg: u
|
|
448
441
|
});
|
|
449
442
|
function Us(u) {
|
|
450
|
-
if (!u)
|
|
451
|
-
return [];
|
|
443
|
+
if (!u) return [];
|
|
452
444
|
const { props: e = [], events: t = [] } = u;
|
|
453
445
|
if (e.length && t.length) {
|
|
454
446
|
const l = t.filter((a) => (typeof a == "string" ? a : a.name).startsWith("update:")).map((a) => a = typeof a == "string" ? a : a.name);
|
|
@@ -461,8 +453,7 @@ function qs(u) {
|
|
|
461
453
|
const c = u.value?.model || null;
|
|
462
454
|
return ee(c) ? null : c;
|
|
463
455
|
}), l = (c) => S(() => t.value && (t.value.directives || []).find((_) => _.name === c) || Ht(c)), a = () => S(() => {
|
|
464
|
-
if (!t.value)
|
|
465
|
-
return [];
|
|
456
|
+
if (!t.value) return [];
|
|
466
457
|
const c = e.assets.componentMap.get(t.value.name || "");
|
|
467
458
|
return (c ? Us(c) : []).map((w) => (t.value?.directives || []).find(
|
|
468
459
|
(x) => x.name === "vModel" && x.arg == w.name
|
|
@@ -498,8 +489,7 @@ function qs(u) {
|
|
|
498
489
|
}
|
|
499
490
|
},
|
|
500
491
|
onModelChange: (c, _) => {
|
|
501
|
-
if (!t.value)
|
|
502
|
-
return;
|
|
492
|
+
if (!t.value) return;
|
|
503
493
|
const w = parseInt(c), x = g.value[w];
|
|
504
494
|
x && (_ ? (x.value = _, t.value.setDirective(x)) : (x.value = void 0, t.value.removeDirective(x)));
|
|
505
495
|
}
|
|
@@ -1997,13 +1987,11 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
1997
1987
|
},
|
|
1998
1988
|
setup(u) {
|
|
1999
1989
|
const e = u, t = S(() => [`is-${e.mode}`]), l = S(() => {
|
|
2000
|
-
if (e.mode === "pc")
|
|
2001
|
-
return 1;
|
|
1990
|
+
if (e.mode === "pc") return 1;
|
|
2002
1991
|
const r = e.mode === "mobile" ? Ut : qt, { width: s, height: o } = r, i = s > 0 ? (e.width || 0) / s : 1, g = o > 0 ? (e.height || 0) / o : 1;
|
|
2003
1992
|
return Math.min(i, g);
|
|
2004
1993
|
}), a = S(() => {
|
|
2005
|
-
if (e.mode === "pc")
|
|
2006
|
-
return {};
|
|
1994
|
+
if (e.mode === "pc") return {};
|
|
2007
1995
|
const r = e.mode === "mobile" ? Ut : qt, { width: s, height: o } = r;
|
|
2008
1996
|
return {
|
|
2009
1997
|
width: `${s}px`,
|
|
@@ -2239,8 +2227,7 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
2239
2227
|
return ".js,.css,.json";
|
|
2240
2228
|
}), b = S(() => s.value?.fromType === "Plugin"), c = async (D) => {
|
|
2241
2229
|
const R = D, P = l.project.value;
|
|
2242
|
-
if (!P)
|
|
2243
|
-
return !1;
|
|
2230
|
+
if (!P) return !1;
|
|
2244
2231
|
if (D.id)
|
|
2245
2232
|
if (!P.existBlockName(R.name, [R.id]))
|
|
2246
2233
|
P.updateBlock(R);
|
|
@@ -2485,16 +2472,14 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
2485
2472
|
__name: "index",
|
|
2486
2473
|
setup(u) {
|
|
2487
2474
|
const { engine: e, designer: t, selected: l } = ke(), { current: a } = ie(), r = k([]), s = (D, R) => {
|
|
2488
|
-
if (R === "slot")
|
|
2489
|
-
return [];
|
|
2475
|
+
if (R === "slot") return [];
|
|
2490
2476
|
if (ee(D))
|
|
2491
2477
|
return D.locked ? ["unlock"] : ["lock"];
|
|
2492
2478
|
const P = D.parent;
|
|
2493
2479
|
return P && (P.locked || P.invisible) ? [] : a.value?.locked ? [] : D.locked ? ["unlock"] : D.invisible ? ["visible"] : ["lock", "invisible", "copy", "remove"];
|
|
2494
2480
|
}, o = (D, R) => {
|
|
2495
2481
|
const P = {};
|
|
2496
|
-
if (!D.some((F) => F.slot))
|
|
2497
|
-
return i(D);
|
|
2482
|
+
if (!D.some((F) => F.slot)) return i(D);
|
|
2498
2483
|
for (const F of D) {
|
|
2499
2484
|
const L = F.slot?.name || "default";
|
|
2500
2485
|
P[L] || (P[L] = []), P[L].push(F);
|
|
@@ -2523,8 +2508,7 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
2523
2508
|
Array.isArray(P.children) && (X.children = o(P.children, P)), R.push(X);
|
|
2524
2509
|
}), R;
|
|
2525
2510
|
}, g = () => {
|
|
2526
|
-
if (!a.value)
|
|
2527
|
-
return [];
|
|
2511
|
+
if (!a.value) return [];
|
|
2528
2512
|
const { id: D, name: R, nodes: P } = a.value;
|
|
2529
2513
|
return [
|
|
2530
2514
|
{
|
|
@@ -2753,7 +2737,7 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
2753
2737
|
]));
|
|
2754
2738
|
}
|
|
2755
2739
|
}), le = Gn({
|
|
2756
|
-
loader: () => import("./Editor-
|
|
2740
|
+
loader: () => import("./Editor-DjXowHju.js"),
|
|
2757
2741
|
loadingComponent: E({
|
|
2758
2742
|
render() {
|
|
2759
2743
|
return Te("div", "正在拼命加载...");
|
|
@@ -4918,8 +4902,7 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
4918
4902
|
}
|
|
4919
4903
|
}, c = async (w) => {
|
|
4920
4904
|
const { transform: x, test: C, name: I } = w;
|
|
4921
|
-
if (!e.current)
|
|
4922
|
-
return !1;
|
|
4905
|
+
if (!e.current) return !1;
|
|
4923
4906
|
if (!e.item && e.current.dataSources[I])
|
|
4924
4907
|
return ne(`名称【${I}】已经存在,请更换名称`), !1;
|
|
4925
4908
|
if (x?.value) {
|
|
@@ -4934,8 +4917,7 @@ const Io = { class: "v-context-viewer" }, Bo = /* @__PURE__ */ E({
|
|
|
4934
4917
|
w.test = void 0;
|
|
4935
4918
|
return e.current?.setDataSource(w), !0;
|
|
4936
4919
|
}, _ = async () => {
|
|
4937
|
-
if (!e.context)
|
|
4938
|
-
return;
|
|
4920
|
+
if (!e.context) return;
|
|
4939
4921
|
if (!s.value.ref) {
|
|
4940
4922
|
ne("请先选择API");
|
|
4941
4923
|
return;
|
|
@@ -8631,7 +8613,11 @@ class bu {
|
|
|
8631
8613
|
), t.addEventListener(
|
|
8632
8614
|
"scroll",
|
|
8633
8615
|
this.bind(this.onViewChange, "onViewChange")
|
|
8634
|
-
), e.addEventListener("resize", this.bind(this.onViewChange, "onViewChange")), t.addEventListener("mouseleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragover", this.bind(this.onDragOver, "onDragOver")), t.addEventListener("drop", this.bind(this.onDrop, "onDrop")), t.addEventListener(
|
|
8616
|
+
), e.addEventListener("resize", this.bind(this.onViewChange, "onViewChange")), t.addEventListener("mouseleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragleave", this.bind(this.onLeave, "onLeave")), t.addEventListener("dragover", this.bind(this.onDragOver, "onDragOver")), t.addEventListener("drop", this.bind(this.onDrop, "onDrop")), t.addEventListener(
|
|
8617
|
+
"click",
|
|
8618
|
+
this.bind(this.onSelected, "onSelected"),
|
|
8619
|
+
!0
|
|
8620
|
+
), te.on(
|
|
8635
8621
|
wt,
|
|
8636
8622
|
this.bind(this.onActiveChange, "onActiveChange")
|
|
8637
8623
|
), te.on(Je, this.bind(this.onViewChange, "onViewChange"));
|
|
@@ -8671,11 +8657,9 @@ class bu {
|
|
|
8671
8657
|
this.hover.value = null, this.dropping.value = null, this.selected.value = null;
|
|
8672
8658
|
}
|
|
8673
8659
|
async getDropSlot(e) {
|
|
8674
|
-
if (!e)
|
|
8675
|
-
return;
|
|
8660
|
+
if (!e) return;
|
|
8676
8661
|
const { engine: t } = this, l = t.assets, a = l.componentMap, r = await l.getBlockMaterial(e.from) || a.get(e.name);
|
|
8677
|
-
if (!r?.slots)
|
|
8678
|
-
return;
|
|
8662
|
+
if (!r?.slots) return;
|
|
8679
8663
|
const s = (r?.slots || ["default"]).map(
|
|
8680
8664
|
(i) => typeof i == "string" ? {
|
|
8681
8665
|
name: i,
|
|
@@ -8696,11 +8680,9 @@ class bu {
|
|
|
8696
8680
|
async onDrop(e) {
|
|
8697
8681
|
e.preventDefault();
|
|
8698
8682
|
const { engine: t, dragging: l, dropping: a, draggingNode: r } = this, s = t.current.value, o = this.getHelper(e);
|
|
8699
|
-
if (!s || !l || !a.value || !o)
|
|
8700
|
-
return;
|
|
8683
|
+
if (!s || !l || !a.value || !o) return;
|
|
8701
8684
|
const i = o.model, g = a.value.type;
|
|
8702
|
-
if (!await this.allowDrop(i, g))
|
|
8703
|
-
return;
|
|
8685
|
+
if (!await this.allowDrop(i, g)) return;
|
|
8704
8686
|
let p;
|
|
8705
8687
|
if (r)
|
|
8706
8688
|
p = r;
|
|
@@ -8721,12 +8703,11 @@ class bu {
|
|
|
8721
8703
|
this.dropping.value = null, t.simulator.refresh(), t.assets.clearCaches();
|
|
8722
8704
|
}
|
|
8723
8705
|
onSelected(e) {
|
|
8724
|
-
this.setHover(null), this.selected.value = this.getHelper(e);
|
|
8706
|
+
e.stopPropagation(), this.setHover(null), this.selected.value = this.getHelper(e);
|
|
8725
8707
|
}
|
|
8726
8708
|
async onDragOver(e) {
|
|
8727
8709
|
const t = this.getHelper(e);
|
|
8728
|
-
if (!t)
|
|
8729
|
-
return;
|
|
8710
|
+
if (!t) return;
|
|
8730
8711
|
const { model: l, type: a } = t;
|
|
8731
8712
|
l && await this.allowDrop(l, a) ? (e.preventDefault(), this.dropping.value = t) : this.dropping.value = null;
|
|
8732
8713
|
}
|
|
@@ -8779,11 +8760,9 @@ class bu {
|
|
|
8779
8760
|
}
|
|
8780
8761
|
getHelper(e) {
|
|
8781
8762
|
const t = e.composedPath() || [], l = this.findVtjElement(t) || this.document?.body;
|
|
8782
|
-
if (!l)
|
|
8783
|
-
return null;
|
|
8763
|
+
if (!l) return null;
|
|
8784
8764
|
const a = this.getNodeByElement(l) || this.engine.current.value;
|
|
8785
|
-
if (!a)
|
|
8786
|
-
return null;
|
|
8765
|
+
if (!a) return null;
|
|
8787
8766
|
const r = l.getBoundingClientRect(), s = this.getDropType(r, e.clientX, e.clientY), o = this.getNodePath(t);
|
|
8788
8767
|
return {
|
|
8789
8768
|
el: l,
|
|
@@ -8823,8 +8802,7 @@ class bu {
|
|
|
8823
8802
|
async setHover(e) {
|
|
8824
8803
|
if (await we(), e) {
|
|
8825
8804
|
const t = this.getElmenetByModel(e);
|
|
8826
|
-
if (!t)
|
|
8827
|
-
return;
|
|
8805
|
+
if (!t) return;
|
|
8828
8806
|
const l = t.getBoundingClientRect(), a = ee(e) ? [] : this.findPathByNode(e);
|
|
8829
8807
|
this.hover.value = {
|
|
8830
8808
|
el: t,
|
|
@@ -8839,8 +8817,7 @@ class bu {
|
|
|
8839
8817
|
async setSelected(e) {
|
|
8840
8818
|
if (await we(), e) {
|
|
8841
8819
|
const t = this.getElmenetByModel(e) || this.document?.createElement("span");
|
|
8842
|
-
if (!t)
|
|
8843
|
-
return;
|
|
8820
|
+
if (!t) return;
|
|
8844
8821
|
const l = t.getBoundingClientRect(), a = ee(e) ? [] : this.findPathByNode(e);
|
|
8845
8822
|
this.selected.value = {
|
|
8846
8823
|
el: t,
|
|
@@ -8855,8 +8832,7 @@ class bu {
|
|
|
8855
8832
|
async setDropping(e, t = "inner") {
|
|
8856
8833
|
if (await we(), e) {
|
|
8857
8834
|
const l = this.getElmenetByModel(e);
|
|
8858
|
-
if (!l)
|
|
8859
|
-
return;
|
|
8835
|
+
if (!l) return;
|
|
8860
8836
|
const a = l.getBoundingClientRect(), r = ee(e) ? [] : this.findPathByNode(e);
|
|
8861
8837
|
this.dropping.value = {
|
|
8862
8838
|
el: l,
|
|
@@ -8870,15 +8846,12 @@ class bu {
|
|
|
8870
8846
|
}
|
|
8871
8847
|
async allowDrop(e, t = "inner") {
|
|
8872
8848
|
const { dragging: l, engine: a, draggingNode: r } = this, s = a.current.value;
|
|
8873
|
-
if (!l || !s)
|
|
8874
|
-
|
|
8875
|
-
if (ee(e))
|
|
8876
|
-
return !0;
|
|
8849
|
+
if (!l || !s) return !1;
|
|
8850
|
+
if (ee(e)) return !0;
|
|
8877
8851
|
if (r && e.id === r.id || r && r.isChild(e))
|
|
8878
8852
|
return !1;
|
|
8879
8853
|
const o = a.assets.componentMap, i = t !== "inner" && e.parent || e, g = await a.assets.getBlockMaterial(i.from) || o.get(i.name);
|
|
8880
|
-
if (!g)
|
|
8881
|
-
return !1;
|
|
8854
|
+
if (!g) return !1;
|
|
8882
8855
|
const { parentIncludes: p = !0, name: v } = l, { childIncludes: f = !0 } = g, b = p === !0 || Array.isArray(p) && p.includes(i.name), c = f === !0 || Array.isArray(f) && f.includes(v);
|
|
8883
8856
|
return b && c;
|
|
8884
8857
|
}
|
|
@@ -9165,15 +9138,13 @@ class wu {
|
|
|
9165
9138
|
this.groups.value = this.parseGroups(t), this.componentMap = _l(this.components, "name");
|
|
9166
9139
|
}
|
|
9167
9140
|
async getBlockMaterial(e, t) {
|
|
9168
|
-
if (!e || typeof e == "string")
|
|
9169
|
-
return null;
|
|
9141
|
+
if (!e || typeof e == "string") return null;
|
|
9170
9142
|
let l;
|
|
9171
9143
|
if (e.type === "Schema" && e.id && (l = this.caches[e.id] || await this.service.getFile(e.id), this.caches[e.id] = l), e.type === "UrlSchema" && e.url && (l = this.caches[e.url] || await this.provider.getDslByUrl(e.url), this.caches[e.url] = l), e.type === "Plugin") {
|
|
9172
9144
|
const v = await this.service.getPluginMaterial(e);
|
|
9173
9145
|
return v ? (v.name = t || v.name, v.from = e, this.componentMap.set(v.name, v), v) : null;
|
|
9174
9146
|
}
|
|
9175
|
-
if (!l)
|
|
9176
|
-
return null;
|
|
9147
|
+
if (!l) return null;
|
|
9177
9148
|
l.name = t || l.name;
|
|
9178
9149
|
const { id: a, name: r, slots: s, props: o, emits: i } = l, g = (v) => {
|
|
9179
9150
|
const f = Array.isArray(v) ? v : [v];
|
|
@@ -9384,8 +9355,7 @@ class sc extends bn {
|
|
|
9384
9355
|
}
|
|
9385
9356
|
async openFile(e) {
|
|
9386
9357
|
const t = this.project.value, l = this.skeleton?.getRegion("Apps"), a = e || t?.homepage;
|
|
9387
|
-
if (!t || !l || !a)
|
|
9388
|
-
return;
|
|
9358
|
+
if (!t || !l || !a) return;
|
|
9389
9359
|
const r = t.getPage(a);
|
|
9390
9360
|
r && !r.raw && (l.regionRef?.setActive("Pages"), this.simulator.ready(() => {
|
|
9391
9361
|
t.active(r);
|
|
@@ -10121,8 +10091,7 @@ const je = E({
|
|
|
10121
10091
|
}, b = (c) => {
|
|
10122
10092
|
if (a.value) {
|
|
10123
10093
|
const _ = a.value[0]?.widgetRef;
|
|
10124
|
-
if (!_)
|
|
10125
|
-
return;
|
|
10094
|
+
if (!_) return;
|
|
10126
10095
|
switch (c.name) {
|
|
10127
10096
|
case "home":
|
|
10128
10097
|
_.refresh();
|
|
@@ -2,8 +2,7 @@ const m = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzIFBhe2NvbnN0cnVjdG9yKCl7dGhpc
|
|
|
2
2
|
function G(l) {
|
|
3
3
|
let Z;
|
|
4
4
|
try {
|
|
5
|
-
if (Z = d && (window.URL || window.webkitURL).createObjectURL(d), !Z)
|
|
6
|
-
throw "";
|
|
5
|
+
if (Z = d && (window.URL || window.webkitURL).createObjectURL(d), !Z) throw "";
|
|
7
6
|
const b = new Worker(Z, {
|
|
8
7
|
name: l?.name
|
|
9
8
|
});
|
|
@@ -2,8 +2,7 @@ const G = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzIHdOZXtjb25zdHJ1Y3Rvcigpe3Roa
|
|
|
2
2
|
function m(l) {
|
|
3
3
|
let Z;
|
|
4
4
|
try {
|
|
5
|
-
if (Z = W && (window.URL || window.webkitURL).createObjectURL(W), !Z)
|
|
6
|
-
throw "";
|
|
5
|
+
if (Z = W && (window.URL || window.webkitURL).createObjectURL(W), !Z) throw "";
|
|
7
6
|
const b = new Worker(Z, {
|
|
8
7
|
name: l?.name
|
|
9
8
|
});
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/designer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.63",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"mockjs": "~1.1.0",
|
|
8
8
|
"monaco-editor": "~0.48.0",
|
|
9
|
-
"@vtj/
|
|
10
|
-
"@vtj/
|
|
11
|
-
"@vtj/
|
|
12
|
-
"@vtj/ui": "~0.8.
|
|
13
|
-
"@vtj/utils": "~0.8.
|
|
9
|
+
"@vtj/core": "~0.8.63",
|
|
10
|
+
"@vtj/renderer": "~0.8.63",
|
|
11
|
+
"@vtj/icons": "~0.8.63",
|
|
12
|
+
"@vtj/ui": "~0.8.63",
|
|
13
|
+
"@vtj/utils": "~0.8.63"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/mockjs": "~1.0.10",
|
|
17
17
|
"vue": "~3.4.15",
|
|
18
|
-
"vue-router": "~4.
|
|
19
|
-
"@vtj/cli": "~0.8.
|
|
18
|
+
"vue-router": "~4.4.0",
|
|
19
|
+
"@vtj/cli": "~0.8.16"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
package/types/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/designer
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.8.
|
|
5
|
+
* @version 0.8.62
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
7
|
*/
|
|
8
|
-
export declare const version = "0.8.
|
|
8
|
+
export declare const version = "0.8.62";
|