@vtj/designer 0.16.34 → 0.16.36
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-DVUZplwr.js +4 -0
- package/dist/{index-dmpcFWLr.js → index-BmBAxe9U.js} +160 -149
- package/dist/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/types/components/regions/index.d.ts +1 -0
- package/types/components/regions/workspace.d.ts +1 -0
- package/types/version.d.ts +2 -2
- package/dist/Editor-DXsu956x.js +0 -4
|
@@ -7,7 +7,7 @@ import Mp from "element-plus/es/locale/lang/zh-cn";
|
|
|
7
7
|
import { XDialogForm as Wt, XField as Y, XIcon as zt, createDialog as ec, XDialog as Xt, XPanel as ws, XAction as Ne, XTabs as Es, XContainer as Ie, XForm as Fa, XAttachment as jp, XGrid as Ha, XActionBar as tc, XInputUnit as nc, vResizable as Ll } from "@vtj/ui";
|
|
8
8
|
import { BUILT_IN_NAME as os, isNode as Dn, isBlockSchema as Lp, NodeModel as Vo, cloneDsl as Ul, isBlock as it, DirectiveModel as oc, I18N_LOCALES as Up, createNodeFrom as Bp, BUILT_IN_VUE as Bl, BUILT_IN_VUE_ROUTER as $p, emitter as vt, EVENT_PROJECT_ACTIVED as fa, EVENT_NODE_CHANGE as mr, EVENT_BLOCK_CHANGE as ga, Base as rc, BUILT_IN_LIBRARAY_MAP as zp, ProjectModel as Fp, EVENT_PROJECT_CHANGE as Hp, EVENT_PROJECT_BLOCKS_CHANGE as Jp, EVENT_PROJECT_PAGES_CHANGE as Gp, EVENT_PROJECT_DEPS_CHANGE as Kp, EVENT_PROJECT_PUBLISH as Wp, EVENT_PROJECT_FILE_PUBLISH as qp, EVENT_HISTORY_CHANGE as Qp, EVENT_HISTORY_LOAD as Yp, EVENT_PROJECT_GEN_SOURCE as Xp, BlockModel as Bs, HistoryModel as Zp } from "@vtj/core";
|
|
9
9
|
import { parseExpression as Lo, parseFunction as Ja, BUILT_IN_DIRECTIVES as ef, nodeCache as tf, createSchemaApi as nf, isJSFunction as sc, JSCodeToString as Uo, LIFE_CYCLES_LIST as of, DATA_TYPES as rf, createMock as sf, isJSExpression as Eo, REMOTE as ac, NodeEnv as Hn, HTML_TAGS as af, ContextMode as ma, clearLoaderCache as $l, parseDeps as lf, parseUrls as cf, createAssetsCss as uf, createAssetScripts as zl, getRawComponent as Fl, createSchemaApis as df, mockCleanup as pf, mockApis as ff, adoptStylesToInline as gf, Provider as mf, Access as hf, ACCESS as vf } from "@vtj/renderer";
|
|
10
|
-
import { delay as
|
|
10
|
+
import { delay as Ce, storage as ln, uid as ks, kebabCase as bf, jsonp as Gn, groupBy as hr, isUrl as yf, camelCase as _f, dataURLtoBlob as lc, fileToBase64 as Ga, upperFirstCamelCase as ic, toRawType as $s, cloneDeep as Or, merge as Ss, logger as jn, isPlainObject as wf, throttle as Ef, toArray as Ka, debounce as kf, uuid as Sf, getClientInfo as xf, base64 as Cf, arrayToMap as Af, isBoolean as Tf } from "@vtj/utils";
|
|
11
11
|
import * as Of from "@vtj/icons";
|
|
12
12
|
import { VtjIconBack as If, VtjIconPc as Rf, VtjIconPhone as Df, VtjIconPad as Nf, VtjIconEdit as Wa, VtjIconUndo as Vf, VtjIconRedo as Pf, VtjIconTemplate as lr, Upload as cc, Share as Mf, Lock as jf, VtjIconPreview as Lf, VtjIconRefresh as uc, VtjIconPageSetting as Uf, Download as ir, VtjIconPublish as Hl, VtjIconProject as Bf, icons as ha, ArrowDown as xs, Search as un, CopyDocument as dc, Back as $f, VtjIconPlus as pc, EditPen as fc, Delete as qa, VtjIconSave as Qa, ArrowUp as gc, MoreFilled as So, VtjIconCheck as Ya, VtjIconComponents as mc, VtjIconShare as zf, VtjIconHome as Ff, VtjIconVisible as Hf, VtjIconInvisible as hc, VtjIconUnlock as Jf, VtjIconLock as vc, VtjIconRemove as Cs, VtjIconCopy as Xa, Files as Gf, VtjIconSearch as Kf, Flag as Wf, VtjIconDiff as qf, VtjIconHelp as bc, VtjIconOpenapi as Qf, VtjIconLayers as yc, Edit as Yf, Rank as Xf, VtjIconArrowUp as Zf, VtjIconArrowDown as eg, IconDisplayBlock as tg, IconDisplayFlex as ng, IconDisplayInlineBlock as og, IconDisplayInline as rg, IconEyeInvisible as sg, IconFlexDirectionrow as ag, IconFlexDirectionrowReverse as lg, IconFlexDirectioncolumn as ig, IconFlexDirectioncolumnReverse as cg, IconFlexJustifyflexStartrow as ug, IconFlexJustifyflexEndrow as dg, IconFlexJustifycenterrow as pg, IconFlexJustifyspaceBetweenrow as fg, IconFlexJustifyspaceAroundrow as gg, IconFlexAlignflexStartrow as mg, IconFlexAlignflexEndrow as hg, IconFlexAligncenterrow as vg, IconFlexAlignbaselinerow as bg, IconFlexAlignstretchrow as yg, IconPositionTopLeft as _g, IconPositionTopRight as wg, IconPositionBottomLeft as Eg, IconPositionBottomRight as kg, IconPositionLeft as Sg, IconPositionRight as xg, IconPositionTop as Cg, IconPositionBottom as Ag, IconPositionAll as Tg, IconTextAlignLeft as Og, IconTextAlignCenter as Ig, IconTextAlignRight as Rg, IconTextAlignJustify as Dg, IconFontStyleNone as Ng, IconFontStyleItalic as Vg, IconCross as _c, IconTextDecorationUnderline as Pg, IconTextDecorationStrike as Mg, IconTextDecorationOverline as jg, IconTileXy as Lg, IconTileX as Ug, IconTileY as Bg, IconClose as $g, IconBorderAll as zg, IconBorderLeft as Fg, IconBorderTop as Hg, IconBorderBottom as Jg, IconBorderRight as Gg, IconBorderStyleSolid as Kg, IconBorderStyleDashed as Wg, IconBorderStyleDotted as qg, IconCursorAuto as Qg, IconCursorPointer as Yg, IconCursorNotAllowed as Xg, IconCursorNone as Zg, ArrowRight as em, UserFilled as Za, VtjIconInfo as tm, VtjIconNewChat as wc, Plus as Ec, Promotion as rs, CircleClose as nm, ArrowDownBold as om, ArrowUpBold as rm, Refresh as sm, View as kc, VtjIconAi as Sc, VtjIconNpCancel as am, UploadFilled as xc, CloseBold as Cc, ShoppingCart as lm, Finished as im, Hide as cm, Top as um, Bottom as dm, VtjIconChatRecord as pm, VtjIconClose as fm, Setting as gm, VtjIconDevTools as mm, VtjIconLeftPanel as hm, VtjIconBottomPanel as vm, VtjIconRightPanel as bm, Sunny as ym, Moon as _m, VtjIconDocument as wm, VtjIconBlock as Em, VtjIconOutline as km, VtjIconHistory as Sm, VtjIconApi as xm, VtjIconCategory as Cm, VtjIconUniapp as Am, VtjIconMaster as Tm, VtjIconGlobal as Om, VtjIconLang as Im, VtjIconEnv as Rm, HomeFilled as Dm, Close as Nm, VtjIconVars as Vm, VtjIconSwitch as Pm, Switch as Mm } from "@vtj/icons";
|
|
13
13
|
import { PAGE_LIFE_CYCLES_LIST as jm, COMPONENT_LIFE_CYCLES_LIST as Lm, APP_LIFE_CYCLE as el, createUniAppComponent as Um, setupUniApp as Bm } from "@vtj/uni";
|
|
@@ -19,10 +19,10 @@ import { editor as zm } from "monaco-editor";
|
|
|
19
19
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
20
20
|
* @name @vtj/designer
|
|
21
21
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
22
|
-
* @version 0.16.
|
|
22
|
+
* @version 0.16.36
|
|
23
23
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
24
24
|
*/
|
|
25
|
-
const vr = "0.16.
|
|
25
|
+
const vr = "0.16.36", Fm = {
|
|
26
26
|
width: 390,
|
|
27
27
|
height: 844
|
|
28
28
|
}, Hm = {
|
|
@@ -1217,7 +1217,7 @@ if (typeof window < "u") {
|
|
|
1217
1217
|
const Uc = "ctrl+s, command+s", Bc = "ctrl+p, command+p", $c = "f5, ctrl+r, command+r", zc = "ctrl+z, command+z", Fc = "shift+ctrl+z, shift+command+z", Hc = "backspace", Jc = "ctrl+c, command+c", Gc = "ctrl+v, command+v", Kc = "ctrl+x, command+x", Wc = "up", qc = "down", Qc = "left", Yc = "right", Xc = "shift+up, shift+left", Zc = "shift+down, shift+right", eu = "escape", tu = "ctrl+a, command+a", Gs = "Designer_Clipboard__";
|
|
1218
1218
|
function Gh() {
|
|
1219
1219
|
const e = Le(), { copy: t, text: n } = Ts({}), o = {}, s = bt(null), r = async () => {
|
|
1220
|
-
await
|
|
1220
|
+
await Ce(100), s.value = e.simulator.contentWindow?.hotkeys;
|
|
1221
1221
|
}, a = (u, p) => {
|
|
1222
1222
|
o[u] = p, s.value && (s.value(u, p), Yt(u, p));
|
|
1223
1223
|
}, l = (u) => {
|
|
@@ -1254,7 +1254,7 @@ function Gh() {
|
|
|
1254
1254
|
u?.preventDefault();
|
|
1255
1255
|
const p = e.skeleton?.getRegion("Apps").regionRef;
|
|
1256
1256
|
if (p) {
|
|
1257
|
-
p.setActive("History"), await
|
|
1257
|
+
p.setActive("History"), await Ce(100);
|
|
1258
1258
|
const g = e.skeleton?.getWidget("History")?.widgetRef;
|
|
1259
1259
|
g && g.openAdd();
|
|
1260
1260
|
}
|
|
@@ -2659,8 +2659,8 @@ function yv() {
|
|
|
2659
2659
|
x.value = !0;
|
|
2660
2660
|
const oe = await vv(J, t), ue = await o(oe).catch(() => null);
|
|
2661
2661
|
if (x.value = !1, ue && ue.success) {
|
|
2662
|
-
const { topic:
|
|
2663
|
-
Ee.type =
|
|
2662
|
+
const { topic: Ae, chat: Ee } = ue.data;
|
|
2663
|
+
Ee.type = Ae.type, G.value = [], $.value.unshift(Ae), S.value = !1, K.value = Ae;
|
|
2664
2664
|
const _t = an(Ee);
|
|
2665
2665
|
G.value.push(_t), Ke(_t, async (dt) => {
|
|
2666
2666
|
if (J.auto && await Me(dt), ft(dt))
|
|
@@ -2669,7 +2669,7 @@ function yv() {
|
|
|
2669
2669
|
toolCallId: dt.toolCallId,
|
|
2670
2670
|
prompt: je(dt)
|
|
2671
2671
|
});
|
|
2672
|
-
}), await
|
|
2672
|
+
}), await Ce(0), M.value && M.value.scrollToBottom();
|
|
2673
2673
|
} else
|
|
2674
2674
|
await at();
|
|
2675
2675
|
return ue;
|
|
@@ -2677,8 +2677,8 @@ function yv() {
|
|
|
2677
2677
|
x.value = !0;
|
|
2678
2678
|
const oe = await ei(J, t), ue = await _(oe);
|
|
2679
2679
|
if (x.value = !1, ue && ue.success) {
|
|
2680
|
-
const { topic:
|
|
2681
|
-
G.value = [], $.value.unshift(
|
|
2680
|
+
const { topic: Ae, chat: Ee } = ue.data;
|
|
2681
|
+
G.value = [], $.value.unshift(Ae), S.value = !1, K.value = Ae, Ae.image && (Ee.image = b(Ae.image)), Ee.type = Ae.type;
|
|
2682
2682
|
const _t = an(Ee);
|
|
2683
2683
|
G.value.push(_t), Ke(_t, async (dt) => {
|
|
2684
2684
|
if (dt.status === "Success" && J.auto && await Me(dt), ft(dt))
|
|
@@ -2688,7 +2688,7 @@ function yv() {
|
|
|
2688
2688
|
toolCallId: dt.toolCallId,
|
|
2689
2689
|
prompt: je(dt)
|
|
2690
2690
|
});
|
|
2691
|
-
}), await
|
|
2691
|
+
}), await Ce(0), M.value && M.value.scrollToBottom();
|
|
2692
2692
|
} else
|
|
2693
2693
|
await at();
|
|
2694
2694
|
return ue;
|
|
@@ -2696,8 +2696,8 @@ function yv() {
|
|
|
2696
2696
|
x.value = !0;
|
|
2697
2697
|
const oe = await ei(J, t), ue = await C(oe);
|
|
2698
2698
|
if (x.value = !1, ue && ue.success) {
|
|
2699
|
-
const { topic:
|
|
2700
|
-
G.value = [], $.value.unshift(
|
|
2699
|
+
const { topic: Ae, chat: Ee } = ue.data;
|
|
2700
|
+
G.value = [], $.value.unshift(Ae), S.value = !1, K.value = Ae, Ae.image && (Ee.image = b(Ae.image)), Ae.json && (Ee.json = y(Ae.json)), Ee.type = Ae.type, Ee.dataType = Ae.dataType;
|
|
2701
2701
|
const _t = an(Ee);
|
|
2702
2702
|
G.value.push(_t), Ke(_t, async (dt) => {
|
|
2703
2703
|
if (dt.status === "Success" && J.auto && await Me(dt), ft(dt))
|
|
@@ -2707,7 +2707,7 @@ function yv() {
|
|
|
2707
2707
|
toolCallId: dt.toolCallId,
|
|
2708
2708
|
prompt: je(dt)
|
|
2709
2709
|
});
|
|
2710
|
-
}), await
|
|
2710
|
+
}), await Ce(0), M.value && M.value.scrollToBottom();
|
|
2711
2711
|
} else
|
|
2712
2712
|
await at();
|
|
2713
2713
|
return ue;
|
|
@@ -2721,15 +2721,15 @@ function yv() {
|
|
|
2721
2721
|
source: await Je()
|
|
2722
2722
|
}, ue = await a(oe).catch(() => null);
|
|
2723
2723
|
if (x.value = !1, ue && ue.success) {
|
|
2724
|
-
const
|
|
2725
|
-
G.value.push(
|
|
2724
|
+
const Ae = an(ue.data);
|
|
2725
|
+
G.value.push(Ae), Ke(Ae, async (Ee) => {
|
|
2726
2726
|
if (Ee.status === "Success" && J.auto && await Me(Ee), ft(Ee))
|
|
2727
2727
|
return xt({
|
|
2728
2728
|
...J,
|
|
2729
2729
|
toolCallId: Ee.toolCallId,
|
|
2730
2730
|
prompt: je(Ee)
|
|
2731
2731
|
});
|
|
2732
|
-
}), await
|
|
2732
|
+
}), await Ce(0), M.value && M.value.scrollToBottom();
|
|
2733
2733
|
} else
|
|
2734
2734
|
await at();
|
|
2735
2735
|
return ue;
|
|
@@ -2739,7 +2739,7 @@ function yv() {
|
|
|
2739
2739
|
}, Ke = async (J, oe) => {
|
|
2740
2740
|
t.state.streaming = !0, B.value = "", J.content = "", J.reasoning = "", J.status = "Pending", J.reasoning = "", J.message = "";
|
|
2741
2741
|
let ue = 0;
|
|
2742
|
-
const
|
|
2742
|
+
const Ae = Date.now();
|
|
2743
2743
|
return er = await c(
|
|
2744
2744
|
J.topicId,
|
|
2745
2745
|
J.id,
|
|
@@ -2747,7 +2747,7 @@ function yv() {
|
|
|
2747
2747
|
const Yo = Ee?.choices?.[0]?.delta;
|
|
2748
2748
|
if (Yo) {
|
|
2749
2749
|
const Ao = Yo.content || "", Dr = Yo.reasoning_content || "";
|
|
2750
|
-
Ao && (J.content += Ao), Dr && (J.reasoning += Dr, ue += Date.now() -
|
|
2750
|
+
Ao && (J.content += Ao), Dr && (J.reasoning += Dr, ue += Date.now() - Ae);
|
|
2751
2751
|
}
|
|
2752
2752
|
if (Ee?.usage && (J.tokens = (J.tokens || 0) + (Ee.usage.completion_tokens || 0)), _t) {
|
|
2753
2753
|
J.status = "Success", J.thinking = Math.ceil(ue / 1e3);
|
|
@@ -2762,7 +2762,7 @@ function yv() {
|
|
|
2762
2762
|
), er;
|
|
2763
2763
|
}, Ct = async (J) => {
|
|
2764
2764
|
if (!K.value || !F.value || !J) return;
|
|
2765
|
-
const { name: oe = "", id: ue = "" } = t.current.value || {},
|
|
2765
|
+
const { name: oe = "", id: ue = "" } = t.current.value || {}, Ae = t.project.value?.toDsl(), Ee = await t.service.parseVue(Ae, {
|
|
2766
2766
|
id: ue,
|
|
2767
2767
|
name: oe,
|
|
2768
2768
|
source: J
|
|
@@ -8293,7 +8293,7 @@ function Lw() {
|
|
|
8293
8293
|
);
|
|
8294
8294
|
_r.splice(m, 1);
|
|
8295
8295
|
const b = g.find((_) => _.id === p), y = g.find((_) => _.id !== p);
|
|
8296
|
-
y && o.value && (await bo.toggleApp(y.id), ls(y)), b && (wa(b.app), s.value.callHook("app:unmount", b.app)), await
|
|
8296
|
+
y && o.value && (await bo.toggleApp(y.id), ls(y)), b && (wa(b.app), s.value.callHook("app:unmount", b.app)), await Ce(500), t.value.$vtjEl.click();
|
|
8297
8297
|
};
|
|
8298
8298
|
return {
|
|
8299
8299
|
dialogRef: t,
|
|
@@ -8688,10 +8688,11 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
8688
8688
|
v(i(Y), { label: "截图" }, {
|
|
8689
8689
|
editor: w(() => [
|
|
8690
8690
|
N("div", e0, [
|
|
8691
|
-
|
|
8691
|
+
u.value ? (h(), T(i(Go), {
|
|
8692
|
+
key: 0,
|
|
8692
8693
|
src: u.value,
|
|
8693
8694
|
fit: "cover"
|
|
8694
|
-
}, null, 8, ["src"]),
|
|
8695
|
+
}, null, 8, ["src"])) : U("", !0),
|
|
8695
8696
|
v(i(Ko), {
|
|
8696
8697
|
class: "v-actions-widget__upload",
|
|
8697
8698
|
onChange: g,
|
|
@@ -8773,7 +8774,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
8773
8774
|
_: 1
|
|
8774
8775
|
}, 8, ["icon", "model"]));
|
|
8775
8776
|
}
|
|
8776
|
-
}), n0 = /* @__PURE__ */ Lt(t0, [["__scopeId", "data-v-
|
|
8777
|
+
}), n0 = /* @__PURE__ */ Lt(t0, [["__scopeId", "data-v-1448b860"]]), o0 = { class: "x-coder-result" }, r0 = ["href"], s0 = /* @__PURE__ */ H({
|
|
8777
8778
|
__name: "coder",
|
|
8778
8779
|
props: {
|
|
8779
8780
|
link: {}
|
|
@@ -8896,10 +8897,11 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
8896
8897
|
v(i(Y), { label: "截图" }, {
|
|
8897
8898
|
editor: w(() => [
|
|
8898
8899
|
N("div", a0, [
|
|
8899
|
-
|
|
8900
|
+
a.value ? (h(), T(i(Go), {
|
|
8901
|
+
key: 0,
|
|
8900
8902
|
src: a.value,
|
|
8901
8903
|
fit: "cover"
|
|
8902
|
-
}, null, 8, ["src"]),
|
|
8904
|
+
}, null, 8, ["src"])) : U("", !0),
|
|
8903
8905
|
v(i(Ko), {
|
|
8904
8906
|
class: "v-actions-widget__upload",
|
|
8905
8907
|
onChange: l,
|
|
@@ -8972,7 +8974,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
8972
8974
|
_: 1
|
|
8973
8975
|
}, 8, ["modelValue", "icon", "model"])) : U("", !0);
|
|
8974
8976
|
}
|
|
8975
|
-
}), i0 = /* @__PURE__ */ Lt(l0, [["__scopeId", "data-v-
|
|
8977
|
+
}), i0 = /* @__PURE__ */ Lt(l0, [["__scopeId", "data-v-864ffcec"]]), c0 = { class: "v-actions-widget" }, u0 = /* @__PURE__ */ H({
|
|
8976
8978
|
name: "ActionsWidget",
|
|
8977
8979
|
inheritAttrs: !1,
|
|
8978
8980
|
__name: "index",
|
|
@@ -8989,7 +8991,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
8989
8991
|
const n = e, { engine: o, designer: s } = mn(), { isLogined: r, toRemoteAuth: a } = io(), l = R(!1), c = R(!1), d = R(), f = R(), u = R(), p = () => {
|
|
8990
8992
|
o.current.value ? (l.value ? o.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (s.value?.setSelected(null), o.simulator.refresh()), Be("刷新完成", "success")) : Be("请先打开文件", "warning");
|
|
8991
8993
|
}, g = async () => {
|
|
8992
|
-
o.current.value ? (l.value && (o.skeleton?.closePreview(), l.value = !1, await
|
|
8994
|
+
o.current.value ? (l.value && (o.skeleton?.closePreview(), l.value = !1, await Ce(1e3)), s.value?.setSelected(o.current.value)) : Be("请先打开文件", "warning");
|
|
8993
8995
|
}, m = () => {
|
|
8994
8996
|
if (o.project.value)
|
|
8995
8997
|
if (o.current.value) {
|
|
@@ -9008,16 +9010,14 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
9008
9010
|
if (E)
|
|
9009
9011
|
if (E.currentFile)
|
|
9010
9012
|
if (await r()) {
|
|
9011
|
-
const x =
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
name: S,
|
|
9020
|
-
label: I,
|
|
9013
|
+
const x = o.skeleton?.getRegion("Workspace").regionRef;
|
|
9014
|
+
x && await x.activeDesigner();
|
|
9015
|
+
const S = await o.simulator.capture().catch(() => null), { name: I, title: L, market: $ } = E.currentFile;
|
|
9016
|
+
S || Be("截图失败", "warning"), d.value = {
|
|
9017
|
+
id: $?.id,
|
|
9018
|
+
canvas: S,
|
|
9019
|
+
name: I,
|
|
9020
|
+
label: L,
|
|
9021
9021
|
dsl: o.current.value?.toDsl()
|
|
9022
9022
|
}, c.value = !0;
|
|
9023
9023
|
} else
|
|
@@ -9049,7 +9049,14 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
9049
9049
|
Be("项目没有页面,无需发布", "warning");
|
|
9050
9050
|
return;
|
|
9051
9051
|
}
|
|
9052
|
-
|
|
9052
|
+
const S = o.skeleton?.getRegion("Workspace").regionRef;
|
|
9053
|
+
S && await S.activeDesigner(), E.active(x), await Ce(300);
|
|
9054
|
+
try {
|
|
9055
|
+
u.value = await o.simulator.capture();
|
|
9056
|
+
} catch (I) {
|
|
9057
|
+
console.warn(I);
|
|
9058
|
+
}
|
|
9059
|
+
f?.value.openDialog();
|
|
9053
9060
|
}, O = (E) => {
|
|
9054
9061
|
const x = o.project.value;
|
|
9055
9062
|
if (x)
|
|
@@ -9361,7 +9368,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
9361
9368
|
]));
|
|
9362
9369
|
}
|
|
9363
9370
|
}), Ze = vp({
|
|
9364
|
-
loader: () => import("./Editor-
|
|
9371
|
+
loader: () => import("./Editor-DVUZplwr.js"),
|
|
9365
9372
|
loadingComponent: H({
|
|
9366
9373
|
render() {
|
|
9367
9374
|
return eo("div", "正在拼命加载...");
|
|
@@ -10897,7 +10904,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
|
|
|
10897
10904
|
}, u = async (k) => {
|
|
10898
10905
|
if (s && r.value) {
|
|
10899
10906
|
const A = await s.service.uploadStaticFile(k, r.value.id);
|
|
10900
|
-
return await
|
|
10907
|
+
return await Ce(150), d(A);
|
|
10901
10908
|
}
|
|
10902
10909
|
return null;
|
|
10903
10910
|
}, p = (k) => k ? (k || "").split(",").map((E) => ({ url: E })) : [], g = R(
|
|
@@ -13115,9 +13122,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
|
|
|
13115
13122
|
let J = we.keywordPatternRe.exec(Me), oe = "";
|
|
13116
13123
|
for (; J; ) {
|
|
13117
13124
|
oe += Me.substring(ne, J.index);
|
|
13118
|
-
const ue = Ct.case_insensitive ? J[0].toLowerCase() : J[0],
|
|
13119
|
-
if (
|
|
13120
|
-
const [Ee, _t] =
|
|
13125
|
+
const ue = Ct.case_insensitive ? J[0].toLowerCase() : J[0], Ae = ye(we, ue);
|
|
13126
|
+
if (Ae) {
|
|
13127
|
+
const [Ee, _t] = Ae;
|
|
13121
13128
|
if (gt.addText(oe), oe = "", ie[ue] = (ie[ue] || 0) + 1, ie[ue] <= FE && (In += _t), Ee.startsWith("_"))
|
|
13122
13129
|
oe += J[0];
|
|
13123
13130
|
else {
|
|
@@ -13158,8 +13165,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
|
|
|
13158
13165
|
oe++;
|
|
13159
13166
|
continue;
|
|
13160
13167
|
}
|
|
13161
|
-
const
|
|
13162
|
-
|
|
13168
|
+
const Ae = Ct.classNameAliases[ne[oe]] || ne[oe], Ee = J[oe];
|
|
13169
|
+
Ae ? Je(Ee, Ae) : (Me = Ee, Ge(), Me = ""), oe++;
|
|
13163
13170
|
}
|
|
13164
13171
|
}
|
|
13165
13172
|
function yt(ne, J) {
|
|
@@ -13169,8 +13176,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
|
|
|
13169
13176
|
let ue = sE(ne.endRe, oe);
|
|
13170
13177
|
if (ue) {
|
|
13171
13178
|
if (ne["on:end"]) {
|
|
13172
|
-
const
|
|
13173
|
-
ne["on:end"](J,
|
|
13179
|
+
const Ae = new Ai(ne);
|
|
13180
|
+
ne["on:end"](J, Ae), Ae.isMatchIgnored && (ue = !1);
|
|
13174
13181
|
}
|
|
13175
13182
|
if (ue) {
|
|
13176
13183
|
for (; ne.endsParent && ne.parent; )
|
|
@@ -13185,8 +13192,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
|
|
|
13185
13192
|
return we.matcher.regexIndex === 0 ? (Me += ne[0], 1) : (qt = !0, 0);
|
|
13186
13193
|
}
|
|
13187
13194
|
function On(ne) {
|
|
13188
|
-
const J = ne[0], oe = ne.rule, ue = new Ai(oe),
|
|
13189
|
-
for (const Ee of
|
|
13195
|
+
const J = ne[0], oe = ne.rule, ue = new Ai(oe), Ae = [oe.__beforeBegin, oe["on:begin"]];
|
|
13196
|
+
for (const Ee of Ae)
|
|
13190
13197
|
if (Ee && (Ee(ne, ue), ue.isMatchIgnored))
|
|
13191
13198
|
return lt(J);
|
|
13192
13199
|
return oe.skip ? Me += J : (oe.excludeBegin && (Me += J), je(), !oe.returnBegin && !oe.excludeBegin && (Me = J)), yt(oe, ne), oe.returnBegin ? 0 : J.length;
|
|
@@ -13195,12 +13202,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
|
|
|
13195
13202
|
const J = ne[0], oe = B.substring(ne.index), ue = at(we, ne, oe);
|
|
13196
13203
|
if (!ue)
|
|
13197
13204
|
return Ni;
|
|
13198
|
-
const
|
|
13199
|
-
we.endScope && we.endScope._wrap ? (je(), Je(J, we.endScope._wrap)) : we.endScope && we.endScope._multi ? (je(), bn(we.endScope, ne)) :
|
|
13205
|
+
const Ae = we;
|
|
13206
|
+
we.endScope && we.endScope._wrap ? (je(), Je(J, we.endScope._wrap)) : we.endScope && we.endScope._multi ? (je(), bn(we.endScope, ne)) : Ae.skip ? Me += J : (Ae.returnEnd || Ae.excludeEnd || (Me += J), je(), Ae.excludeEnd && (Me = J));
|
|
13200
13207
|
do
|
|
13201
13208
|
we.scope && gt.closeNode(), !we.skip && !we.subLanguage && (In += we.relevance), we = we.parent;
|
|
13202
13209
|
while (we !== ue.parent);
|
|
13203
|
-
return ue.starts && yt(ue.starts, ne),
|
|
13210
|
+
return ue.starts && yt(ue.starts, ne), Ae.returnEnd ? 0 : J.length;
|
|
13204
13211
|
}
|
|
13205
13212
|
function xt() {
|
|
13206
13213
|
const ne = [];
|
|
@@ -22872,8 +22879,8 @@ function Rx() {
|
|
|
22872
22879
|
} : P instanceof Set && (P.add = P.clear = P.delete = function() {
|
|
22873
22880
|
throw new Error("set is read-only");
|
|
22874
22881
|
}), Object.freeze(P), Object.getOwnPropertyNames(P).forEach((q) => {
|
|
22875
|
-
const se = P[q],
|
|
22876
|
-
(
|
|
22882
|
+
const se = P[q], Te = typeof se;
|
|
22883
|
+
(Te === "object" || Te === "function") && !Object.isFrozen(se) && e(se);
|
|
22877
22884
|
}), P;
|
|
22878
22885
|
}
|
|
22879
22886
|
class t {
|
|
@@ -22892,11 +22899,11 @@ function Rx() {
|
|
|
22892
22899
|
}
|
|
22893
22900
|
function o(P, ...q) {
|
|
22894
22901
|
const se = /* @__PURE__ */ Object.create(null);
|
|
22895
|
-
for (const
|
|
22896
|
-
se[
|
|
22897
|
-
return q.forEach(function(
|
|
22898
|
-
for (const mt in
|
|
22899
|
-
se[mt] =
|
|
22902
|
+
for (const Te in P)
|
|
22903
|
+
se[Te] = P[Te];
|
|
22904
|
+
return q.forEach(function(Te) {
|
|
22905
|
+
for (const mt in Te)
|
|
22906
|
+
se[mt] = Te[mt];
|
|
22900
22907
|
}), /** @type {T} */
|
|
22901
22908
|
se;
|
|
22902
22909
|
}
|
|
@@ -22907,7 +22914,7 @@ function Rx() {
|
|
|
22907
22914
|
const se = P.split(".");
|
|
22908
22915
|
return [
|
|
22909
22916
|
`${q}${se.shift()}`,
|
|
22910
|
-
...se.map((
|
|
22917
|
+
...se.map((Te, mt) => `${Te}${"_".repeat(mt + 1)}`)
|
|
22911
22918
|
].join(" ");
|
|
22912
22919
|
}
|
|
22913
22920
|
return `${q}${P}`;
|
|
@@ -23008,7 +23015,7 @@ function Rx() {
|
|
|
23008
23015
|
* @param {Node} node
|
|
23009
23016
|
*/
|
|
23010
23017
|
static _walk(q, se) {
|
|
23011
|
-
return typeof se == "string" ? q.addText(se) : se.children && (q.openNode(se), se.children.forEach((
|
|
23018
|
+
return typeof se == "string" ? q.addText(se) : se.children && (q.openNode(se), se.children.forEach((Te) => this._walk(q, Te)), q.closeNode(se)), q;
|
|
23012
23019
|
}
|
|
23013
23020
|
/**
|
|
23014
23021
|
* @param {Node} node
|
|
@@ -23044,8 +23051,8 @@ function Rx() {
|
|
|
23044
23051
|
* @param {string} name
|
|
23045
23052
|
*/
|
|
23046
23053
|
__addSublanguage(q, se) {
|
|
23047
|
-
const
|
|
23048
|
-
se && (
|
|
23054
|
+
const Te = q.root;
|
|
23055
|
+
se && (Te.scope = `language:${se}`), this.add(Te);
|
|
23049
23056
|
}
|
|
23050
23057
|
toHTML() {
|
|
23051
23058
|
return new l(this, this.options).value();
|
|
@@ -23074,7 +23081,7 @@ function Rx() {
|
|
|
23074
23081
|
return typeof q == "object" && q.constructor === Object ? (P.splice(P.length - 1, 1), q) : {};
|
|
23075
23082
|
}
|
|
23076
23083
|
function _(...P) {
|
|
23077
|
-
return "(" + (y(P).capture ? "" : "?:") + P.map((
|
|
23084
|
+
return "(" + (y(P).capture ? "" : "?:") + P.map((Te) => u(Te)).join("|") + ")";
|
|
23078
23085
|
}
|
|
23079
23086
|
function C(P) {
|
|
23080
23087
|
return new RegExp(P.toString() + "|").exec("").length - 1;
|
|
@@ -23086,10 +23093,10 @@ function Rx() {
|
|
|
23086
23093
|
const k = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
23087
23094
|
function A(P, { joinWith: q }) {
|
|
23088
23095
|
let se = 0;
|
|
23089
|
-
return P.map((
|
|
23096
|
+
return P.map((Te) => {
|
|
23090
23097
|
se += 1;
|
|
23091
23098
|
const mt = se;
|
|
23092
|
-
let ht = u(
|
|
23099
|
+
let ht = u(Te), ge = "";
|
|
23093
23100
|
for (; ht.length > 0; ) {
|
|
23094
23101
|
const de = k.exec(ht);
|
|
23095
23102
|
if (!de) {
|
|
@@ -23099,7 +23106,7 @@ function Rx() {
|
|
|
23099
23106
|
ge += ht.substring(0, de.index), ht = ht.substring(de.index + de[0].length), de[0][0] === "\\" && de[1] ? ge += "\\" + String(Number(de[1]) + mt) : (ge += de[0], de[0] === "(" && se++);
|
|
23100
23107
|
}
|
|
23101
23108
|
return ge;
|
|
23102
|
-
}).map((
|
|
23109
|
+
}).map((Te) => `(${Te})`).join(q);
|
|
23103
23110
|
}
|
|
23104
23111
|
const E = /\b\B/, x = "[a-zA-Z]\\w*", S = "[a-zA-Z_]\\w*", I = "\\b\\d+(\\.\\d+)?", L = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", $ = "\\b(0b[01]+)", G = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", K = (P = {}) => {
|
|
23105
23112
|
const q = /^#![ ]*\//;
|
|
@@ -23114,8 +23121,8 @@ function Rx() {
|
|
|
23114
23121
|
end: /$/,
|
|
23115
23122
|
relevance: 0,
|
|
23116
23123
|
/** @type {ModeCallback} */
|
|
23117
|
-
"on:begin": (se,
|
|
23118
|
-
se.index !== 0 &&
|
|
23124
|
+
"on:begin": (se, Te) => {
|
|
23125
|
+
se.index !== 0 && Te.ignoreMatch();
|
|
23119
23126
|
}
|
|
23120
23127
|
}, P);
|
|
23121
23128
|
}, F = {
|
|
@@ -23136,7 +23143,7 @@ function Rx() {
|
|
|
23136
23143
|
}, D = {
|
|
23137
23144
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
23138
23145
|
}, B = function(P, q, se = {}) {
|
|
23139
|
-
const
|
|
23146
|
+
const Te = o(
|
|
23140
23147
|
{
|
|
23141
23148
|
scope: "comment",
|
|
23142
23149
|
begin: P,
|
|
@@ -23145,7 +23152,7 @@ function Rx() {
|
|
|
23145
23152
|
},
|
|
23146
23153
|
se
|
|
23147
23154
|
);
|
|
23148
|
-
|
|
23155
|
+
Te.contains.push({
|
|
23149
23156
|
scope: "doctag",
|
|
23150
23157
|
// hack to avoid the space from being included. the space is necessary to
|
|
23151
23158
|
// match here to prevent the plain text rule below from gobbling up doctags
|
|
@@ -23175,7 +23182,7 @@ function Rx() {
|
|
|
23175
23182
|
/[A-Za-z][a-z]{2,}/
|
|
23176
23183
|
// allow capitalized words at beginning of sentences
|
|
23177
23184
|
);
|
|
23178
|
-
return
|
|
23185
|
+
return Te.contains.push(
|
|
23179
23186
|
{
|
|
23180
23187
|
// TODO: how to include ", (, ) without breaking grammars that use these for
|
|
23181
23188
|
// comment delimiters?
|
|
@@ -23200,7 +23207,7 @@ function Rx() {
|
|
|
23200
23207
|
)
|
|
23201
23208
|
// look for 3 words in a row
|
|
23202
23209
|
}
|
|
23203
|
-
),
|
|
23210
|
+
), Te;
|
|
23204
23211
|
}, W = B("//", "$"), te = B("/\\*", "\\*/"), ie = B("#", "$"), ye = {
|
|
23205
23212
|
scope: "number",
|
|
23206
23213
|
begin: I,
|
|
@@ -23305,8 +23312,8 @@ function Rx() {
|
|
|
23305
23312
|
if (!P.beforeMatch) return;
|
|
23306
23313
|
if (P.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
23307
23314
|
const se = Object.assign({}, P);
|
|
23308
|
-
Object.keys(P).forEach((
|
|
23309
|
-
delete P[
|
|
23315
|
+
Object.keys(P).forEach((Te) => {
|
|
23316
|
+
delete P[Te];
|
|
23310
23317
|
}), P.keywords = se.keywords, P.begin = b(se.beforeMatch, p(se.begin)), P.starts = {
|
|
23311
23318
|
relevance: 0,
|
|
23312
23319
|
contains: [
|
|
@@ -23330,17 +23337,17 @@ function Rx() {
|
|
|
23330
23337
|
// common variable name
|
|
23331
23338
|
], we = "keyword";
|
|
23332
23339
|
function po(P, q, se = we) {
|
|
23333
|
-
const
|
|
23340
|
+
const Te = /* @__PURE__ */ Object.create(null);
|
|
23334
23341
|
return typeof P == "string" ? mt(se, P.split(" ")) : Array.isArray(P) ? mt(se, P) : Object.keys(P).forEach(function(ht) {
|
|
23335
23342
|
Object.assign(
|
|
23336
|
-
|
|
23343
|
+
Te,
|
|
23337
23344
|
po(P[ht], q, ht)
|
|
23338
23345
|
);
|
|
23339
|
-
}),
|
|
23346
|
+
}), Te;
|
|
23340
23347
|
function mt(ht, ge) {
|
|
23341
23348
|
q && (ge = ge.map((de) => de.toLowerCase())), ge.forEach(function(de) {
|
|
23342
23349
|
const ke = de.split("|");
|
|
23343
|
-
|
|
23350
|
+
Te[ke[0]] = [ht, gt(ke[0], ke[1])];
|
|
23344
23351
|
});
|
|
23345
23352
|
}
|
|
23346
23353
|
}
|
|
@@ -23358,10 +23365,10 @@ function Rx() {
|
|
|
23358
23365
|
In[`${P}/${q}`] || (console.log(`Deprecated as of ${P}. ${q}`), In[`${P}/${q}`] = !0);
|
|
23359
23366
|
}, ne = new Error();
|
|
23360
23367
|
function J(P, q, { key: se }) {
|
|
23361
|
-
let
|
|
23368
|
+
let Te = 0;
|
|
23362
23369
|
const mt = P[se], ht = {}, ge = {};
|
|
23363
23370
|
for (let de = 1; de <= q.length; de++)
|
|
23364
|
-
ge[de +
|
|
23371
|
+
ge[de + Te] = mt[de], ht[de + Te] = !0, Te += C(q[de - 1]);
|
|
23365
23372
|
P[se] = ge, P[se]._emit = ht, P[se]._multi = !0;
|
|
23366
23373
|
}
|
|
23367
23374
|
function oe(P) {
|
|
@@ -23382,11 +23389,11 @@ function Rx() {
|
|
|
23382
23389
|
J(P, P.end, { key: "endScope" }), P.end = A(P.end, { joinWith: "" });
|
|
23383
23390
|
}
|
|
23384
23391
|
}
|
|
23385
|
-
function
|
|
23392
|
+
function Ae(P) {
|
|
23386
23393
|
P.scope && typeof P.scope == "object" && P.scope !== null && (P.beginScope = P.scope, delete P.scope);
|
|
23387
23394
|
}
|
|
23388
23395
|
function Ee(P) {
|
|
23389
|
-
|
|
23396
|
+
Ae(P), typeof P.beginScope == "string" && (P.beginScope = { _wrap: P.beginScope }), typeof P.endScope == "string" && (P.endScope = { _wrap: P.endScope }), oe(P), ue(P);
|
|
23390
23397
|
}
|
|
23391
23398
|
function _t(P) {
|
|
23392
23399
|
function q(ge, de) {
|
|
@@ -23418,7 +23425,7 @@ function Rx() {
|
|
|
23418
23425
|
return ke.splice(0, Tt), Object.assign(ke, wt);
|
|
23419
23426
|
}
|
|
23420
23427
|
}
|
|
23421
|
-
class
|
|
23428
|
+
class Te {
|
|
23422
23429
|
constructor() {
|
|
23423
23430
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
23424
23431
|
}
|
|
@@ -23451,7 +23458,7 @@ function Rx() {
|
|
|
23451
23458
|
}
|
|
23452
23459
|
}
|
|
23453
23460
|
function mt(ge) {
|
|
23454
|
-
const de = new
|
|
23461
|
+
const de = new Te();
|
|
23455
23462
|
return ge.contains.forEach((ke) => de.addRule(ke.begin, { rule: ke, type: "begin" })), ge.terminatorEnd && de.addRule(ge.terminatorEnd, { type: "end" }), ge.illegal && de.addRule(ge.illegal, { type: "illegal" }), de;
|
|
23456
23463
|
}
|
|
23457
23464
|
function ht(ge, de) {
|
|
@@ -23511,7 +23518,7 @@ function Rx() {
|
|
|
23511
23518
|
}
|
|
23512
23519
|
}
|
|
23513
23520
|
const Ds = n, xl = o, Cl = Symbol("nomatch"), Jd = 7, Al = function(P) {
|
|
23514
|
-
const q = /* @__PURE__ */ Object.create(null), se = /* @__PURE__ */ Object.create(null),
|
|
23521
|
+
const q = /* @__PURE__ */ Object.create(null), se = /* @__PURE__ */ Object.create(null), Te = [];
|
|
23515
23522
|
let mt = !0;
|
|
23516
23523
|
const ht = "Could not find the language '{}', did you forget to load/include a language module?", ge = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
23517
23524
|
let de = {
|
|
@@ -23871,15 +23878,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`), At = Z, We = ve), Pe
|
|
|
23871
23878
|
});
|
|
23872
23879
|
}
|
|
23873
23880
|
function ep(Z) {
|
|
23874
|
-
Zd(Z),
|
|
23881
|
+
Zd(Z), Te.push(Z);
|
|
23875
23882
|
}
|
|
23876
23883
|
function tp(Z) {
|
|
23877
|
-
const ve =
|
|
23878
|
-
ve !== -1 &&
|
|
23884
|
+
const ve = Te.indexOf(Z);
|
|
23885
|
+
ve !== -1 && Te.splice(ve, 1);
|
|
23879
23886
|
}
|
|
23880
23887
|
function Vr(Z, ve) {
|
|
23881
23888
|
const Pe = Z;
|
|
23882
|
-
|
|
23889
|
+
Te.forEach(function(We) {
|
|
23883
23890
|
We[Pe] && We[Pe](ve);
|
|
23884
23891
|
});
|
|
23885
23892
|
}
|
|
@@ -29897,7 +29904,7 @@ ${m}${b}`;
|
|
|
29897
29904
|
),
|
|
29898
29905
|
r
|
|
29899
29906
|
);
|
|
29900
|
-
a.dir || (e.active(a), await
|
|
29907
|
+
a.dir || (e.active(a), await Ce(t.activeDelayMs));
|
|
29901
29908
|
const { name: l, title: c, layout: d, dir: f } = n;
|
|
29902
29909
|
return a ? {
|
|
29903
29910
|
name: l,
|
|
@@ -29946,7 +29953,7 @@ ${m}${b}`;
|
|
|
29946
29953
|
"调用 updatePage 工具参数错误,第一个参数要求是 PageFile 对象"
|
|
29947
29954
|
);
|
|
29948
29955
|
const o = e.updatePage(n);
|
|
29949
|
-
if (await
|
|
29956
|
+
if (await Ce(t.activeDelayMs), o) {
|
|
29950
29957
|
const { name: s, title: r, layout: a, dir: l, id: c } = o;
|
|
29951
29958
|
return { name: s, title: r, layout: a, dir: l, id: c };
|
|
29952
29959
|
}
|
|
@@ -29981,7 +29988,7 @@ ${m}${b}`;
|
|
|
29981
29988
|
required: !0
|
|
29982
29989
|
}
|
|
29983
29990
|
],
|
|
29984
|
-
createHandler: ({ project: e, config: t }) => async (n) => (e.removePage(n), await
|
|
29991
|
+
createHandler: ({ project: e, config: t }) => async (n) => (e.removePage(n), await Ce(t.activeDelayMs), !0)
|
|
29985
29992
|
}, QA = {
|
|
29986
29993
|
name: "getBlocks",
|
|
29987
29994
|
description: "获取当前项目的全部区块组件",
|
|
@@ -30029,7 +30036,7 @@ ${m}${b}`;
|
|
|
30029
30036
|
"调用 createBlock 工具参数错误,第一个参数要求是 BlockFile 对象"
|
|
30030
30037
|
);
|
|
30031
30038
|
const o = await e.createBlock(n);
|
|
30032
|
-
e.active(o), await
|
|
30039
|
+
e.active(o), await Ce(t.activeDelayMs);
|
|
30033
30040
|
const { name: s, title: r, category: a } = n;
|
|
30034
30041
|
return o ? {
|
|
30035
30042
|
name: s,
|
|
@@ -30073,7 +30080,7 @@ ${m}${b}`;
|
|
|
30073
30080
|
],
|
|
30074
30081
|
createHandler: ({ project: e, config: t }) => async (n) => {
|
|
30075
30082
|
const o = e.updateBlock(n);
|
|
30076
|
-
if (await
|
|
30083
|
+
if (await Ce(t.activeDelayMs), o) {
|
|
30077
30084
|
const { name: s, title: r, id: a, category: l } = n;
|
|
30078
30085
|
return {
|
|
30079
30086
|
name: s,
|
|
@@ -30095,7 +30102,7 @@ ${m}${b}`;
|
|
|
30095
30102
|
required: !0
|
|
30096
30103
|
}
|
|
30097
30104
|
],
|
|
30098
|
-
createHandler: ({ project: e, config: t }) => async (n) => (e.removeBlock(n), await
|
|
30105
|
+
createHandler: ({ project: e, config: t }) => async (n) => (e.removeBlock(n), await Ce(t.activeDelayMs), !0)
|
|
30099
30106
|
}, eT = {
|
|
30100
30107
|
name: "active",
|
|
30101
30108
|
description: "打开一个文件(页面或区块组件)",
|
|
@@ -30109,7 +30116,7 @@ ${m}${b}`;
|
|
|
30109
30116
|
],
|
|
30110
30117
|
createHandler: ({ project: e, config: t }) => async (n) => {
|
|
30111
30118
|
const o = e.getFile(n);
|
|
30112
|
-
return o ? (e.active(o), await
|
|
30119
|
+
return o ? (e.active(o), await Ce(t.activeDelayMs), !0) : null;
|
|
30113
30120
|
}
|
|
30114
30121
|
}, tT = {
|
|
30115
30122
|
name: "getCurrentFile",
|
|
@@ -30149,7 +30156,7 @@ ${m}${b}`;
|
|
|
30149
30156
|
let n = null;
|
|
30150
30157
|
return e.provider.errorHandler = (o) => {
|
|
30151
30158
|
n = o;
|
|
30152
|
-
}, e.simulator.refresh(), await
|
|
30159
|
+
}, e.simulator.refresh(), await Ce(t.activeDelayMs), await Ce(1e3), e.provider.errorHandler = null, n ? `运行时报错:
|
|
30153
30160
|
${n.message}
|
|
30154
30161
|
请检查页面代码并修复` : !0;
|
|
30155
30162
|
}
|
|
@@ -30187,7 +30194,7 @@ ${n.message}
|
|
|
30187
30194
|
createHandler({ project: e, config: t }) {
|
|
30188
30195
|
return async (n) => {
|
|
30189
30196
|
const o = e.setApi(n);
|
|
30190
|
-
return await
|
|
30197
|
+
return await Ce(t.activeDelayMs), o;
|
|
30191
30198
|
};
|
|
30192
30199
|
}
|
|
30193
30200
|
}, sT = {
|
|
@@ -30195,7 +30202,7 @@ ${n.message}
|
|
|
30195
30202
|
description: "获取当前项目可用的APIs",
|
|
30196
30203
|
parameters: [],
|
|
30197
30204
|
createHandler({ project: e, config: t }) {
|
|
30198
|
-
return async () => (await
|
|
30205
|
+
return async () => (await Ce(t.activeDelayMs), e.apis);
|
|
30199
30206
|
}
|
|
30200
30207
|
}, aT = {
|
|
30201
30208
|
name: "removeApi",
|
|
@@ -30208,7 +30215,7 @@ ${n.message}
|
|
|
30208
30215
|
required: !0
|
|
30209
30216
|
}
|
|
30210
30217
|
],
|
|
30211
|
-
createHandler: ({ project: e, config: t }) => async (n) => (e.removeApi(n), await
|
|
30218
|
+
createHandler: ({ project: e, config: t }) => async (n) => (e.removeApi(n), await Ce(t.activeDelayMs), !0)
|
|
30212
30219
|
}, lT = {
|
|
30213
30220
|
name: "removeApis",
|
|
30214
30221
|
description: "批量删除API",
|
|
@@ -30227,7 +30234,7 @@ ${n.message}
|
|
|
30227
30234
|
createHandler: ({ project: e, config: t }) => async (n = []) => {
|
|
30228
30235
|
for (const o of n)
|
|
30229
30236
|
e.removeApi(o);
|
|
30230
|
-
return await
|
|
30237
|
+
return await Ce(t.activeDelayMs), !0;
|
|
30231
30238
|
}
|
|
30232
30239
|
}, iT = {
|
|
30233
30240
|
name: "setHomepage",
|
|
@@ -30240,7 +30247,7 @@ ${n.message}
|
|
|
30240
30247
|
required: !0
|
|
30241
30248
|
}
|
|
30242
30249
|
],
|
|
30243
|
-
createHandler: ({ project: e, config: t }) => async (n) => (e.setHomepage(n), await
|
|
30250
|
+
createHandler: ({ project: e, config: t }) => async (n) => (e.setHomepage(n), await Ce(t.activeDelayMs), !0)
|
|
30244
30251
|
}, cT = {
|
|
30245
30252
|
name: "setGlobalCss",
|
|
30246
30253
|
description: "设置应用的全局css代码",
|
|
@@ -30252,13 +30259,13 @@ ${n.message}
|
|
|
30252
30259
|
required: !0
|
|
30253
30260
|
}
|
|
30254
30261
|
],
|
|
30255
|
-
createHandler: ({ project: e, config: t }) => async (n) => (e.platform === "uniapp" ? e.setUniConfig("css", n) : e.setGloblas("css", n), await
|
|
30262
|
+
createHandler: ({ project: e, config: t }) => async (n) => (e.platform === "uniapp" ? e.setUniConfig("css", n) : e.setGloblas("css", n), await Ce(t.activeDelayMs), !0)
|
|
30256
30263
|
}, uT = {
|
|
30257
30264
|
name: "getGlobalCss",
|
|
30258
30265
|
description: "获取应用的全局css代码",
|
|
30259
30266
|
parameters: [],
|
|
30260
30267
|
createHandler: ({ project: e, config: t }) => async () => {
|
|
30261
|
-
if (await
|
|
30268
|
+
if (await Ce(t.activeDelayMs), e.platform === "uniapp")
|
|
30262
30269
|
e.uniConfig.css;
|
|
30263
30270
|
else
|
|
30264
30271
|
return e.globals.css || "没有全局CSS";
|
|
@@ -30297,12 +30304,12 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
|
|
|
30297
30304
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("store", {
|
|
30298
30305
|
type: "JSFunction",
|
|
30299
30306
|
value: n
|
|
30300
|
-
}), await
|
|
30307
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30301
30308
|
}, pT = {
|
|
30302
30309
|
name: "getGlobalStore",
|
|
30303
30310
|
description: "获取应用的全局状态(Pinia Store)",
|
|
30304
30311
|
parameters: [],
|
|
30305
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30312
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.store?.value || "当前没有配置全局状态")
|
|
30306
30313
|
}, fT = {
|
|
30307
30314
|
name: "setGlobalAccess",
|
|
30308
30315
|
description: `设置权限控制插件配置项, 配置样例:
|
|
@@ -30337,17 +30344,17 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
|
|
|
30337
30344
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("access", {
|
|
30338
30345
|
type: "JSFunction",
|
|
30339
30346
|
value: n
|
|
30340
|
-
}), await
|
|
30347
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30341
30348
|
}, gT = {
|
|
30342
30349
|
name: "getGlobalAccess",
|
|
30343
30350
|
description: "查看权限控制插件配置项",
|
|
30344
30351
|
parameters: [],
|
|
30345
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30352
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.access?.value || "当前没有配置权限控制插件")
|
|
30346
30353
|
}, mT = {
|
|
30347
30354
|
name: "getGlobalAxios",
|
|
30348
30355
|
description: "查看Axios请求工具配置项",
|
|
30349
30356
|
parameters: [],
|
|
30350
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30357
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.axios?.value || "当前没有配置请求工具")
|
|
30351
30358
|
}, hT = {
|
|
30352
30359
|
name: "setGlobalAxios",
|
|
30353
30360
|
description: `
|
|
@@ -30384,7 +30391,7 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
|
|
|
30384
30391
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("axios", {
|
|
30385
30392
|
type: "JSFunction",
|
|
30386
30393
|
value: n
|
|
30387
|
-
}), await
|
|
30394
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30388
30395
|
}, vT = {
|
|
30389
30396
|
name: "setGlobalRequestInterceptor",
|
|
30390
30397
|
description: `设置全局Axios全局请求拦截器, 代码样例:
|
|
@@ -30413,12 +30420,12 @@ axios请求拦截的代码是一个js函数,函数接收两个参数:
|
|
|
30413
30420
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("request", {
|
|
30414
30421
|
type: "JSFunction",
|
|
30415
30422
|
value: n
|
|
30416
|
-
}), await
|
|
30423
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30417
30424
|
}, bT = {
|
|
30418
30425
|
name: "getGlobalRequestInterceptor",
|
|
30419
30426
|
description: "查看全局Axios全局请求拦截器",
|
|
30420
30427
|
parameters: [],
|
|
30421
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30428
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.request?.value || "当前没有配置请求拦截器")
|
|
30422
30429
|
}, yT = {
|
|
30423
30430
|
name: "setGlobalResponseInterceptor",
|
|
30424
30431
|
description: `设置全局Axios全局响应拦截器, 代码样例:
|
|
@@ -30447,22 +30454,22 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
|
|
|
30447
30454
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("response", {
|
|
30448
30455
|
type: "JSFunction",
|
|
30449
30456
|
value: n
|
|
30450
|
-
}), await
|
|
30457
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30451
30458
|
}, _T = {
|
|
30452
30459
|
name: "getGlobalResponseInterceptor",
|
|
30453
30460
|
description: "查看全局Axios全局响应拦截器",
|
|
30454
30461
|
parameters: [],
|
|
30455
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30462
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.response?.value || "当前没有配置响应拦截器")
|
|
30456
30463
|
}, wT = {
|
|
30457
30464
|
name: "getGlobalBeforeEach",
|
|
30458
30465
|
description: "查看全局前置路由守卫",
|
|
30459
30466
|
parameters: [],
|
|
30460
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30467
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.beforeEach?.value || "当前没有全局前置路由守卫")
|
|
30461
30468
|
}, ET = {
|
|
30462
30469
|
name: "getGlobalAfterEach",
|
|
30463
30470
|
description: "查看全局后置路由守卫",
|
|
30464
30471
|
parameters: [],
|
|
30465
|
-
createHandler: ({ project: e, config: t }) => async () => (await
|
|
30472
|
+
createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.afterEach?.value || "当前没有全局后置路由守卫")
|
|
30466
30473
|
}, kT = {
|
|
30467
30474
|
name: "setGlobalBeforeEach",
|
|
30468
30475
|
description: `设置全局前置路由守卫, 代码样例:
|
|
@@ -30493,7 +30500,7 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
|
|
|
30493
30500
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("beforeEach", {
|
|
30494
30501
|
type: "JSFunction",
|
|
30495
30502
|
value: n
|
|
30496
|
-
}), await
|
|
30503
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30497
30504
|
}, ST = {
|
|
30498
30505
|
name: "setGlobalAfterEach",
|
|
30499
30506
|
description: `设置全局后置路由守卫, 代码样例:
|
|
@@ -30524,7 +30531,7 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
|
|
|
30524
30531
|
createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("afterEach", {
|
|
30525
30532
|
type: "JSFunction",
|
|
30526
30533
|
value: n
|
|
30527
|
-
}), await
|
|
30534
|
+
}), await Ce(t.activeDelayMs), !0)
|
|
30528
30535
|
}, xT = {
|
|
30529
30536
|
name: "getNodeSelected",
|
|
30530
30537
|
description: "获取当前页面选中的节点路径,用于定位当前选中的页面元素,路径最后一个是选中的元素名称",
|
|
@@ -31340,7 +31347,8 @@ class BT {
|
|
|
31340
31347
|
this.setDraggingNode(null), this.setDragging(null);
|
|
31341
31348
|
}
|
|
31342
31349
|
isVtjElement(t) {
|
|
31343
|
-
|
|
31350
|
+
const n = this.engine.current.value, o = t?.hasAttribute;
|
|
31351
|
+
return n && o ? t.hasAttribute(`data-v-${n.id}`) && !!t.__vtj__ : !!t.__vtj__ && !!t.__context__;
|
|
31344
31352
|
}
|
|
31345
31353
|
findVtjElement(t) {
|
|
31346
31354
|
return t.find((n) => this.isVtjElement(n));
|
|
@@ -31408,7 +31416,7 @@ class BT {
|
|
|
31408
31416
|
this.setSelected(null), this.setHover(null), this.setDragging(null), this.setDropping(null);
|
|
31409
31417
|
}
|
|
31410
31418
|
async updateRect() {
|
|
31411
|
-
await
|
|
31419
|
+
await Ce(100);
|
|
31412
31420
|
const t = i(this.selected), n = i(this.hover);
|
|
31413
31421
|
if (t) {
|
|
31414
31422
|
const o = t.el.getBoundingClientRect();
|
|
@@ -31430,7 +31438,7 @@ class BT {
|
|
|
31430
31438
|
this.lines.value = [];
|
|
31431
31439
|
return;
|
|
31432
31440
|
}
|
|
31433
|
-
await
|
|
31441
|
+
await Ce(100);
|
|
31434
31442
|
const t = this.engine.simulator.renderer?.context?.__refs || {}, n = [], o = Object.keys(Vo.nodes);
|
|
31435
31443
|
for (const s of o) {
|
|
31436
31444
|
const r = t[s];
|
|
@@ -32696,11 +32704,11 @@ class KO extends rc {
|
|
|
32696
32704
|
if (r || (r = a[0]?.id), !o || !s || !r) return;
|
|
32697
32705
|
const l = o.getPage(r);
|
|
32698
32706
|
l && !l.raw && (s.regionRef?.setActive("Pages"), this.simulator.ready(async () => {
|
|
32699
|
-
o.active(l), await
|
|
32707
|
+
o.active(l), await Ce(1e3), this.simulator.designer.value?.setSelected(this.current.value);
|
|
32700
32708
|
}));
|
|
32701
32709
|
const c = o.getBlock(r);
|
|
32702
32710
|
c && (s.regionRef?.setActive("Blocks"), this.simulator?.ready(async () => {
|
|
32703
|
-
o.active(c), await
|
|
32711
|
+
o.active(c), await Ce(1e3), this.simulator.designer.value?.setSelected(this.current.value);
|
|
32704
32712
|
}));
|
|
32705
32713
|
}
|
|
32706
32714
|
}
|
|
@@ -33576,22 +33584,24 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
|
|
|
33576
33584
|
onMenuChecked: f,
|
|
33577
33585
|
closeAllTabs: u,
|
|
33578
33586
|
closeOtherTabs: p
|
|
33579
|
-
} = _v(o), g = R(!0), m = (
|
|
33580
|
-
const
|
|
33581
|
-
|
|
33582
|
-
}, b = (
|
|
33587
|
+
} = _v(o), g = R(!0), m = (A, E = {}) => {
|
|
33588
|
+
const x = E.url;
|
|
33589
|
+
x && window.open(x);
|
|
33590
|
+
}, b = (A) => {
|
|
33583
33591
|
if (s.value) {
|
|
33584
|
-
const
|
|
33585
|
-
if (!
|
|
33586
|
-
switch (
|
|
33592
|
+
const E = s.value[0]?.widgetRef;
|
|
33593
|
+
if (!E) return;
|
|
33594
|
+
switch (A.name) {
|
|
33587
33595
|
case "home":
|
|
33588
|
-
|
|
33596
|
+
E.reload();
|
|
33589
33597
|
break;
|
|
33590
33598
|
}
|
|
33591
33599
|
}
|
|
33592
33600
|
}, y = async () => {
|
|
33593
33601
|
g.value = !1, await Bt(), g.value = !0;
|
|
33594
|
-
}, _ = () => c.value === "Designer", C =
|
|
33602
|
+
}, _ = () => c.value === "Designer", C = async () => {
|
|
33603
|
+
_() || (c.value = "Designer", await Ce(300));
|
|
33604
|
+
}, O = [
|
|
33595
33605
|
{
|
|
33596
33606
|
label: "关闭其他",
|
|
33597
33607
|
value: "other",
|
|
@@ -33602,8 +33612,8 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
|
|
|
33602
33612
|
value: "all",
|
|
33603
33613
|
command: "all"
|
|
33604
33614
|
}
|
|
33605
|
-
],
|
|
33606
|
-
|
|
33615
|
+
], k = (A) => {
|
|
33616
|
+
A === "all" ? u() : A === "other" && p();
|
|
33607
33617
|
};
|
|
33608
33618
|
return t({
|
|
33609
33619
|
currentTab: l,
|
|
@@ -33611,42 +33621,43 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
|
|
|
33611
33621
|
widgetsRef: s,
|
|
33612
33622
|
openTab: m,
|
|
33613
33623
|
reload: y,
|
|
33614
|
-
isDesignerActive: _
|
|
33615
|
-
|
|
33624
|
+
isDesignerActive: _,
|
|
33625
|
+
activeDesigner: C
|
|
33626
|
+
}), (A, E) => (h(), T(i(Is), {
|
|
33616
33627
|
class: "v-workspace-region",
|
|
33617
33628
|
items: i(r),
|
|
33618
33629
|
menus: i(a),
|
|
33619
33630
|
modelValue: i(l),
|
|
33620
|
-
"onUpdate:modelValue":
|
|
33631
|
+
"onUpdate:modelValue": E[0] || (E[0] = (x) => to(l) ? l.value = x : null),
|
|
33621
33632
|
checkable: "",
|
|
33622
33633
|
onRemove: i(d),
|
|
33623
33634
|
onActionClick: b
|
|
33624
33635
|
}, {
|
|
33625
33636
|
menus: w(() => [
|
|
33626
|
-
(h(!0), j(ee, null, pe(i(a), (
|
|
33637
|
+
(h(!0), j(ee, null, pe(i(a), (x) => (h(), T(i(Ne), {
|
|
33627
33638
|
mode: "icon",
|
|
33628
33639
|
size: "small",
|
|
33629
|
-
type: i(c) ===
|
|
33640
|
+
type: i(c) === x.name ? "primary" : "info",
|
|
33630
33641
|
background: "always",
|
|
33631
|
-
label:
|
|
33632
|
-
onClick: (
|
|
33642
|
+
label: x.label,
|
|
33643
|
+
onClick: (S) => i(f)(x)
|
|
33633
33644
|
}, null, 8, ["type", "label", "onClick"]))), 256)),
|
|
33634
33645
|
v(i(R0), {
|
|
33635
|
-
menus:
|
|
33636
|
-
onCommand:
|
|
33646
|
+
menus: O,
|
|
33647
|
+
onCommand: k
|
|
33637
33648
|
})
|
|
33638
33649
|
]),
|
|
33639
33650
|
default: w(() => [
|
|
33640
|
-
(h(!0), j(ee, null, pe(i(o), (
|
|
33641
|
-
key:
|
|
33651
|
+
(h(!0), j(ee, null, pe(i(o), (x) => (h(), j(ee, {
|
|
33652
|
+
key: x.name
|
|
33642
33653
|
}, [
|
|
33643
|
-
g.value && i(c) ===
|
|
33654
|
+
g.value && i(c) === x.name ? (h(), T(i(Cn), {
|
|
33644
33655
|
ref_for: !0,
|
|
33645
33656
|
ref_key: "widgetsRef",
|
|
33646
33657
|
ref: s,
|
|
33647
33658
|
key: `${i(c)}_${i(l)}`,
|
|
33648
33659
|
region: e.region,
|
|
33649
|
-
widget: { ...
|
|
33660
|
+
widget: { ...x, props: {} }
|
|
33650
33661
|
}, null, 8, ["region", "widget"])) : U("", !0)
|
|
33651
33662
|
], 64))), 128))
|
|
33652
33663
|
]),
|