@vtj/designer 0.16.34 → 0.16.35

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.
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./index-DIpZt6oq.js";
2
+ export {
3
+ f as default
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 Te, 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";
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.34
22
+ * @version 0.16.35
23
23
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
24
24
  */
25
- const vr = "0.16.34", Fm = {
25
+ const vr = "0.16.35", 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 Te(100), s.value = e.simulator.contentWindow?.hotkeys;
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 Te(100);
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: Ce, chat: Ee } = ue.data;
2663
- Ee.type = Ce.type, G.value = [], $.value.unshift(Ce), S.value = !1, K.value = Ce;
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 Te(0), M.value && M.value.scrollToBottom();
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: Ce, chat: Ee } = ue.data;
2681
- G.value = [], $.value.unshift(Ce), S.value = !1, K.value = Ce, Ce.image && (Ee.image = b(Ce.image)), Ee.type = Ce.type;
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 Te(0), M.value && M.value.scrollToBottom();
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: Ce, chat: Ee } = ue.data;
2700
- G.value = [], $.value.unshift(Ce), S.value = !1, K.value = Ce, Ce.image && (Ee.image = b(Ce.image)), Ce.json && (Ee.json = y(Ce.json)), Ee.type = Ce.type, Ee.dataType = Ce.dataType;
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 Te(0), M.value && M.value.scrollToBottom();
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 Ce = an(ue.data);
2725
- G.value.push(Ce), Ke(Ce, async (Ee) => {
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 Te(0), M.value && M.value.scrollToBottom();
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 Ce = Date.now();
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() - Ce);
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 || {}, Ce = t.project.value?.toDsl(), Ee = await t.service.parseVue(Ce, {
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 Te(500), t.value.$vtjEl.click();
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,
@@ -8989,7 +8989,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
8989
8989
  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
8990
  o.current.value ? (l.value ? o.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (s.value?.setSelected(null), o.simulator.refresh()), Be("刷新完成", "success")) : Be("请先打开文件", "warning");
8991
8991
  }, g = async () => {
8992
- o.current.value ? (l.value && (o.skeleton?.closePreview(), l.value = !1, await Te(1e3)), s.value?.setSelected(o.current.value)) : Be("请先打开文件", "warning");
8992
+ o.current.value ? (l.value && (o.skeleton?.closePreview(), l.value = !1, await Ce(1e3)), s.value?.setSelected(o.current.value)) : Be("请先打开文件", "warning");
8993
8993
  }, m = () => {
8994
8994
  if (o.project.value)
8995
8995
  if (o.current.value) {
@@ -9008,16 +9008,18 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
9008
9008
  if (E)
9009
9009
  if (E.currentFile)
9010
9010
  if (await r()) {
9011
- const x = await o.simulator.capture(), { name: S, title: I, market: L } = E.currentFile;
9012
- if (!x) {
9011
+ const x = o.skeleton?.getRegion("Workspace").regionRef;
9012
+ x && await x.activeDesigner(), console.log(x);
9013
+ const S = await o.simulator.capture(), { name: I, title: L, market: $ } = E.currentFile;
9014
+ if (!S) {
9013
9015
  Be("截图失败", "warning");
9014
9016
  return;
9015
9017
  }
9016
9018
  d.value = {
9017
- id: L?.id,
9018
- canvas: x,
9019
- name: S,
9020
- label: I,
9019
+ id: $?.id,
9020
+ canvas: S,
9021
+ name: I,
9022
+ label: L,
9021
9023
  dsl: o.current.value?.toDsl()
9022
9024
  }, c.value = !0;
9023
9025
  } else
@@ -9049,7 +9051,8 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
9049
9051
  Be("项目没有页面,无需发布", "warning");
9050
9052
  return;
9051
9053
  }
9052
- E.active(x), await Te(300), u.value = await o.simulator.capture(), f?.value.openDialog();
9054
+ const S = o.skeleton?.getRegion("Workspace").regionRef;
9055
+ S && await S.activeDesigner(), E.active(x), await Ce(300), u.value = await o.simulator.capture(), f?.value.openDialog();
9053
9056
  }, O = (E) => {
9054
9057
  const x = o.project.value;
9055
9058
  if (x)
@@ -9361,7 +9364,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
9361
9364
  ]));
9362
9365
  }
9363
9366
  }), Ze = vp({
9364
- loader: () => import("./Editor-DXsu956x.js"),
9367
+ loader: () => import("./Editor-D-tp7Tlp.js"),
9365
9368
  loadingComponent: H({
9366
9369
  render() {
9367
9370
  return eo("div", "正在拼命加载...");
@@ -10897,7 +10900,7 @@ const Bw = "data:image/svg+xml,%3csvg%20width='200'%20height='200'%20xmlns='http
10897
10900
  }, u = async (k) => {
10898
10901
  if (s && r.value) {
10899
10902
  const A = await s.service.uploadStaticFile(k, r.value.id);
10900
- return await Te(150), d(A);
10903
+ return await Ce(150), d(A);
10901
10904
  }
10902
10905
  return null;
10903
10906
  }, p = (k) => k ? (k || "").split(",").map((E) => ({ url: E })) : [], g = R(
@@ -13115,9 +13118,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
13115
13118
  let J = we.keywordPatternRe.exec(Me), oe = "";
13116
13119
  for (; J; ) {
13117
13120
  oe += Me.substring(ne, J.index);
13118
- const ue = Ct.case_insensitive ? J[0].toLowerCase() : J[0], Ce = ye(we, ue);
13119
- if (Ce) {
13120
- const [Ee, _t] = Ce;
13121
+ const ue = Ct.case_insensitive ? J[0].toLowerCase() : J[0], Ae = ye(we, ue);
13122
+ if (Ae) {
13123
+ const [Ee, _t] = Ae;
13121
13124
  if (gt.addText(oe), oe = "", ie[ue] = (ie[ue] || 0) + 1, ie[ue] <= FE && (In += _t), Ee.startsWith("_"))
13122
13125
  oe += J[0];
13123
13126
  else {
@@ -13158,8 +13161,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
13158
13161
  oe++;
13159
13162
  continue;
13160
13163
  }
13161
- const Ce = Ct.classNameAliases[ne[oe]] || ne[oe], Ee = J[oe];
13162
- Ce ? Je(Ee, Ce) : (Me = Ee, Ge(), Me = ""), oe++;
13164
+ const Ae = Ct.classNameAliases[ne[oe]] || ne[oe], Ee = J[oe];
13165
+ Ae ? Je(Ee, Ae) : (Me = Ee, Ge(), Me = ""), oe++;
13163
13166
  }
13164
13167
  }
13165
13168
  function yt(ne, J) {
@@ -13169,8 +13172,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
13169
13172
  let ue = sE(ne.endRe, oe);
13170
13173
  if (ue) {
13171
13174
  if (ne["on:end"]) {
13172
- const Ce = new Ai(ne);
13173
- ne["on:end"](J, Ce), Ce.isMatchIgnored && (ue = !1);
13175
+ const Ae = new Ai(ne);
13176
+ ne["on:end"](J, Ae), Ae.isMatchIgnored && (ue = !1);
13174
13177
  }
13175
13178
  if (ue) {
13176
13179
  for (; ne.endsParent && ne.parent; )
@@ -13185,8 +13188,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
13185
13188
  return we.matcher.regexIndex === 0 ? (Me += ne[0], 1) : (qt = !0, 0);
13186
13189
  }
13187
13190
  function On(ne) {
13188
- const J = ne[0], oe = ne.rule, ue = new Ai(oe), Ce = [oe.__beforeBegin, oe["on:begin"]];
13189
- for (const Ee of Ce)
13191
+ const J = ne[0], oe = ne.rule, ue = new Ai(oe), Ae = [oe.__beforeBegin, oe["on:begin"]];
13192
+ for (const Ee of Ae)
13190
13193
  if (Ee && (Ee(ne, ue), ue.isMatchIgnored))
13191
13194
  return lt(J);
13192
13195
  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 +13198,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = D, te = B), W ==
13195
13198
  const J = ne[0], oe = B.substring(ne.index), ue = at(we, ne, oe);
13196
13199
  if (!ue)
13197
13200
  return Ni;
13198
- const Ce = we;
13199
- we.endScope && we.endScope._wrap ? (je(), Je(J, we.endScope._wrap)) : we.endScope && we.endScope._multi ? (je(), bn(we.endScope, ne)) : Ce.skip ? Me += J : (Ce.returnEnd || Ce.excludeEnd || (Me += J), je(), Ce.excludeEnd && (Me = J));
13201
+ const Ae = we;
13202
+ 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
13203
  do
13201
13204
  we.scope && gt.closeNode(), !we.skip && !we.subLanguage && (In += we.relevance), we = we.parent;
13202
13205
  while (we !== ue.parent);
13203
- return ue.starts && yt(ue.starts, ne), Ce.returnEnd ? 0 : J.length;
13206
+ return ue.starts && yt(ue.starts, ne), Ae.returnEnd ? 0 : J.length;
13204
13207
  }
13205
13208
  function xt() {
13206
13209
  const ne = [];
@@ -22872,8 +22875,8 @@ function Rx() {
22872
22875
  } : P instanceof Set && (P.add = P.clear = P.delete = function() {
22873
22876
  throw new Error("set is read-only");
22874
22877
  }), Object.freeze(P), Object.getOwnPropertyNames(P).forEach((q) => {
22875
- const se = P[q], Ae = typeof se;
22876
- (Ae === "object" || Ae === "function") && !Object.isFrozen(se) && e(se);
22878
+ const se = P[q], Te = typeof se;
22879
+ (Te === "object" || Te === "function") && !Object.isFrozen(se) && e(se);
22877
22880
  }), P;
22878
22881
  }
22879
22882
  class t {
@@ -22892,11 +22895,11 @@ function Rx() {
22892
22895
  }
22893
22896
  function o(P, ...q) {
22894
22897
  const se = /* @__PURE__ */ Object.create(null);
22895
- for (const Ae in P)
22896
- se[Ae] = P[Ae];
22897
- return q.forEach(function(Ae) {
22898
- for (const mt in Ae)
22899
- se[mt] = Ae[mt];
22898
+ for (const Te in P)
22899
+ se[Te] = P[Te];
22900
+ return q.forEach(function(Te) {
22901
+ for (const mt in Te)
22902
+ se[mt] = Te[mt];
22900
22903
  }), /** @type {T} */
22901
22904
  se;
22902
22905
  }
@@ -22907,7 +22910,7 @@ function Rx() {
22907
22910
  const se = P.split(".");
22908
22911
  return [
22909
22912
  `${q}${se.shift()}`,
22910
- ...se.map((Ae, mt) => `${Ae}${"_".repeat(mt + 1)}`)
22913
+ ...se.map((Te, mt) => `${Te}${"_".repeat(mt + 1)}`)
22911
22914
  ].join(" ");
22912
22915
  }
22913
22916
  return `${q}${P}`;
@@ -23008,7 +23011,7 @@ function Rx() {
23008
23011
  * @param {Node} node
23009
23012
  */
23010
23013
  static _walk(q, se) {
23011
- return typeof se == "string" ? q.addText(se) : se.children && (q.openNode(se), se.children.forEach((Ae) => this._walk(q, Ae)), q.closeNode(se)), q;
23014
+ 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
23015
  }
23013
23016
  /**
23014
23017
  * @param {Node} node
@@ -23044,8 +23047,8 @@ function Rx() {
23044
23047
  * @param {string} name
23045
23048
  */
23046
23049
  __addSublanguage(q, se) {
23047
- const Ae = q.root;
23048
- se && (Ae.scope = `language:${se}`), this.add(Ae);
23050
+ const Te = q.root;
23051
+ se && (Te.scope = `language:${se}`), this.add(Te);
23049
23052
  }
23050
23053
  toHTML() {
23051
23054
  return new l(this, this.options).value();
@@ -23074,7 +23077,7 @@ function Rx() {
23074
23077
  return typeof q == "object" && q.constructor === Object ? (P.splice(P.length - 1, 1), q) : {};
23075
23078
  }
23076
23079
  function _(...P) {
23077
- return "(" + (y(P).capture ? "" : "?:") + P.map((Ae) => u(Ae)).join("|") + ")";
23080
+ return "(" + (y(P).capture ? "" : "?:") + P.map((Te) => u(Te)).join("|") + ")";
23078
23081
  }
23079
23082
  function C(P) {
23080
23083
  return new RegExp(P.toString() + "|").exec("").length - 1;
@@ -23086,10 +23089,10 @@ function Rx() {
23086
23089
  const k = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
23087
23090
  function A(P, { joinWith: q }) {
23088
23091
  let se = 0;
23089
- return P.map((Ae) => {
23092
+ return P.map((Te) => {
23090
23093
  se += 1;
23091
23094
  const mt = se;
23092
- let ht = u(Ae), ge = "";
23095
+ let ht = u(Te), ge = "";
23093
23096
  for (; ht.length > 0; ) {
23094
23097
  const de = k.exec(ht);
23095
23098
  if (!de) {
@@ -23099,7 +23102,7 @@ function Rx() {
23099
23102
  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
23103
  }
23101
23104
  return ge;
23102
- }).map((Ae) => `(${Ae})`).join(q);
23105
+ }).map((Te) => `(${Te})`).join(q);
23103
23106
  }
23104
23107
  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
23108
  const q = /^#![ ]*\//;
@@ -23114,8 +23117,8 @@ function Rx() {
23114
23117
  end: /$/,
23115
23118
  relevance: 0,
23116
23119
  /** @type {ModeCallback} */
23117
- "on:begin": (se, Ae) => {
23118
- se.index !== 0 && Ae.ignoreMatch();
23120
+ "on:begin": (se, Te) => {
23121
+ se.index !== 0 && Te.ignoreMatch();
23119
23122
  }
23120
23123
  }, P);
23121
23124
  }, F = {
@@ -23136,7 +23139,7 @@ function Rx() {
23136
23139
  }, D = {
23137
23140
  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
23141
  }, B = function(P, q, se = {}) {
23139
- const Ae = o(
23142
+ const Te = o(
23140
23143
  {
23141
23144
  scope: "comment",
23142
23145
  begin: P,
@@ -23145,7 +23148,7 @@ function Rx() {
23145
23148
  },
23146
23149
  se
23147
23150
  );
23148
- Ae.contains.push({
23151
+ Te.contains.push({
23149
23152
  scope: "doctag",
23150
23153
  // hack to avoid the space from being included. the space is necessary to
23151
23154
  // match here to prevent the plain text rule below from gobbling up doctags
@@ -23175,7 +23178,7 @@ function Rx() {
23175
23178
  /[A-Za-z][a-z]{2,}/
23176
23179
  // allow capitalized words at beginning of sentences
23177
23180
  );
23178
- return Ae.contains.push(
23181
+ return Te.contains.push(
23179
23182
  {
23180
23183
  // TODO: how to include ", (, ) without breaking grammars that use these for
23181
23184
  // comment delimiters?
@@ -23200,7 +23203,7 @@ function Rx() {
23200
23203
  )
23201
23204
  // look for 3 words in a row
23202
23205
  }
23203
- ), Ae;
23206
+ ), Te;
23204
23207
  }, W = B("//", "$"), te = B("/\\*", "\\*/"), ie = B("#", "$"), ye = {
23205
23208
  scope: "number",
23206
23209
  begin: I,
@@ -23305,8 +23308,8 @@ function Rx() {
23305
23308
  if (!P.beforeMatch) return;
23306
23309
  if (P.starts) throw new Error("beforeMatch cannot be used with starts");
23307
23310
  const se = Object.assign({}, P);
23308
- Object.keys(P).forEach((Ae) => {
23309
- delete P[Ae];
23311
+ Object.keys(P).forEach((Te) => {
23312
+ delete P[Te];
23310
23313
  }), P.keywords = se.keywords, P.begin = b(se.beforeMatch, p(se.begin)), P.starts = {
23311
23314
  relevance: 0,
23312
23315
  contains: [
@@ -23330,17 +23333,17 @@ function Rx() {
23330
23333
  // common variable name
23331
23334
  ], we = "keyword";
23332
23335
  function po(P, q, se = we) {
23333
- const Ae = /* @__PURE__ */ Object.create(null);
23336
+ const Te = /* @__PURE__ */ Object.create(null);
23334
23337
  return typeof P == "string" ? mt(se, P.split(" ")) : Array.isArray(P) ? mt(se, P) : Object.keys(P).forEach(function(ht) {
23335
23338
  Object.assign(
23336
- Ae,
23339
+ Te,
23337
23340
  po(P[ht], q, ht)
23338
23341
  );
23339
- }), Ae;
23342
+ }), Te;
23340
23343
  function mt(ht, ge) {
23341
23344
  q && (ge = ge.map((de) => de.toLowerCase())), ge.forEach(function(de) {
23342
23345
  const ke = de.split("|");
23343
- Ae[ke[0]] = [ht, gt(ke[0], ke[1])];
23346
+ Te[ke[0]] = [ht, gt(ke[0], ke[1])];
23344
23347
  });
23345
23348
  }
23346
23349
  }
@@ -23358,10 +23361,10 @@ function Rx() {
23358
23361
  In[`${P}/${q}`] || (console.log(`Deprecated as of ${P}. ${q}`), In[`${P}/${q}`] = !0);
23359
23362
  }, ne = new Error();
23360
23363
  function J(P, q, { key: se }) {
23361
- let Ae = 0;
23364
+ let Te = 0;
23362
23365
  const mt = P[se], ht = {}, ge = {};
23363
23366
  for (let de = 1; de <= q.length; de++)
23364
- ge[de + Ae] = mt[de], ht[de + Ae] = !0, Ae += C(q[de - 1]);
23367
+ ge[de + Te] = mt[de], ht[de + Te] = !0, Te += C(q[de - 1]);
23365
23368
  P[se] = ge, P[se]._emit = ht, P[se]._multi = !0;
23366
23369
  }
23367
23370
  function oe(P) {
@@ -23382,11 +23385,11 @@ function Rx() {
23382
23385
  J(P, P.end, { key: "endScope" }), P.end = A(P.end, { joinWith: "" });
23383
23386
  }
23384
23387
  }
23385
- function Ce(P) {
23388
+ function Ae(P) {
23386
23389
  P.scope && typeof P.scope == "object" && P.scope !== null && (P.beginScope = P.scope, delete P.scope);
23387
23390
  }
23388
23391
  function Ee(P) {
23389
- Ce(P), typeof P.beginScope == "string" && (P.beginScope = { _wrap: P.beginScope }), typeof P.endScope == "string" && (P.endScope = { _wrap: P.endScope }), oe(P), ue(P);
23392
+ 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
23393
  }
23391
23394
  function _t(P) {
23392
23395
  function q(ge, de) {
@@ -23418,7 +23421,7 @@ function Rx() {
23418
23421
  return ke.splice(0, Tt), Object.assign(ke, wt);
23419
23422
  }
23420
23423
  }
23421
- class Ae {
23424
+ class Te {
23422
23425
  constructor() {
23423
23426
  this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
23424
23427
  }
@@ -23451,7 +23454,7 @@ function Rx() {
23451
23454
  }
23452
23455
  }
23453
23456
  function mt(ge) {
23454
- const de = new Ae();
23457
+ const de = new Te();
23455
23458
  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
23459
  }
23457
23460
  function ht(ge, de) {
@@ -23511,7 +23514,7 @@ function Rx() {
23511
23514
  }
23512
23515
  }
23513
23516
  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), Ae = [];
23517
+ const q = /* @__PURE__ */ Object.create(null), se = /* @__PURE__ */ Object.create(null), Te = [];
23515
23518
  let mt = !0;
23516
23519
  const ht = "Could not find the language '{}', did you forget to load/include a language module?", ge = { disableAutodetect: !0, name: "Plain text", contains: [] };
23517
23520
  let de = {
@@ -23871,15 +23874,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`), At = Z, We = ve), Pe
23871
23874
  });
23872
23875
  }
23873
23876
  function ep(Z) {
23874
- Zd(Z), Ae.push(Z);
23877
+ Zd(Z), Te.push(Z);
23875
23878
  }
23876
23879
  function tp(Z) {
23877
- const ve = Ae.indexOf(Z);
23878
- ve !== -1 && Ae.splice(ve, 1);
23880
+ const ve = Te.indexOf(Z);
23881
+ ve !== -1 && Te.splice(ve, 1);
23879
23882
  }
23880
23883
  function Vr(Z, ve) {
23881
23884
  const Pe = Z;
23882
- Ae.forEach(function(We) {
23885
+ Te.forEach(function(We) {
23883
23886
  We[Pe] && We[Pe](ve);
23884
23887
  });
23885
23888
  }
@@ -29897,7 +29900,7 @@ ${m}${b}`;
29897
29900
  ),
29898
29901
  r
29899
29902
  );
29900
- a.dir || (e.active(a), await Te(t.activeDelayMs));
29903
+ a.dir || (e.active(a), await Ce(t.activeDelayMs));
29901
29904
  const { name: l, title: c, layout: d, dir: f } = n;
29902
29905
  return a ? {
29903
29906
  name: l,
@@ -29946,7 +29949,7 @@ ${m}${b}`;
29946
29949
  "调用 updatePage 工具参数错误,第一个参数要求是 PageFile 对象"
29947
29950
  );
29948
29951
  const o = e.updatePage(n);
29949
- if (await Te(t.activeDelayMs), o) {
29952
+ if (await Ce(t.activeDelayMs), o) {
29950
29953
  const { name: s, title: r, layout: a, dir: l, id: c } = o;
29951
29954
  return { name: s, title: r, layout: a, dir: l, id: c };
29952
29955
  }
@@ -29981,7 +29984,7 @@ ${m}${b}`;
29981
29984
  required: !0
29982
29985
  }
29983
29986
  ],
29984
- createHandler: ({ project: e, config: t }) => async (n) => (e.removePage(n), await Te(t.activeDelayMs), !0)
29987
+ createHandler: ({ project: e, config: t }) => async (n) => (e.removePage(n), await Ce(t.activeDelayMs), !0)
29985
29988
  }, QA = {
29986
29989
  name: "getBlocks",
29987
29990
  description: "获取当前项目的全部区块组件",
@@ -30029,7 +30032,7 @@ ${m}${b}`;
30029
30032
  "调用 createBlock 工具参数错误,第一个参数要求是 BlockFile 对象"
30030
30033
  );
30031
30034
  const o = await e.createBlock(n);
30032
- e.active(o), await Te(t.activeDelayMs);
30035
+ e.active(o), await Ce(t.activeDelayMs);
30033
30036
  const { name: s, title: r, category: a } = n;
30034
30037
  return o ? {
30035
30038
  name: s,
@@ -30073,7 +30076,7 @@ ${m}${b}`;
30073
30076
  ],
30074
30077
  createHandler: ({ project: e, config: t }) => async (n) => {
30075
30078
  const o = e.updateBlock(n);
30076
- if (await Te(t.activeDelayMs), o) {
30079
+ if (await Ce(t.activeDelayMs), o) {
30077
30080
  const { name: s, title: r, id: a, category: l } = n;
30078
30081
  return {
30079
30082
  name: s,
@@ -30095,7 +30098,7 @@ ${m}${b}`;
30095
30098
  required: !0
30096
30099
  }
30097
30100
  ],
30098
- createHandler: ({ project: e, config: t }) => async (n) => (e.removeBlock(n), await Te(t.activeDelayMs), !0)
30101
+ createHandler: ({ project: e, config: t }) => async (n) => (e.removeBlock(n), await Ce(t.activeDelayMs), !0)
30099
30102
  }, eT = {
30100
30103
  name: "active",
30101
30104
  description: "打开一个文件(页面或区块组件)",
@@ -30109,7 +30112,7 @@ ${m}${b}`;
30109
30112
  ],
30110
30113
  createHandler: ({ project: e, config: t }) => async (n) => {
30111
30114
  const o = e.getFile(n);
30112
- return o ? (e.active(o), await Te(t.activeDelayMs), !0) : null;
30115
+ return o ? (e.active(o), await Ce(t.activeDelayMs), !0) : null;
30113
30116
  }
30114
30117
  }, tT = {
30115
30118
  name: "getCurrentFile",
@@ -30149,7 +30152,7 @@ ${m}${b}`;
30149
30152
  let n = null;
30150
30153
  return e.provider.errorHandler = (o) => {
30151
30154
  n = o;
30152
- }, e.simulator.refresh(), await Te(t.activeDelayMs), await Te(1e3), e.provider.errorHandler = null, n ? `运行时报错:
30155
+ }, e.simulator.refresh(), await Ce(t.activeDelayMs), await Ce(1e3), e.provider.errorHandler = null, n ? `运行时报错:
30153
30156
  ${n.message}
30154
30157
  请检查页面代码并修复` : !0;
30155
30158
  }
@@ -30187,7 +30190,7 @@ ${n.message}
30187
30190
  createHandler({ project: e, config: t }) {
30188
30191
  return async (n) => {
30189
30192
  const o = e.setApi(n);
30190
- return await Te(t.activeDelayMs), o;
30193
+ return await Ce(t.activeDelayMs), o;
30191
30194
  };
30192
30195
  }
30193
30196
  }, sT = {
@@ -30195,7 +30198,7 @@ ${n.message}
30195
30198
  description: "获取当前项目可用的APIs",
30196
30199
  parameters: [],
30197
30200
  createHandler({ project: e, config: t }) {
30198
- return async () => (await Te(t.activeDelayMs), e.apis);
30201
+ return async () => (await Ce(t.activeDelayMs), e.apis);
30199
30202
  }
30200
30203
  }, aT = {
30201
30204
  name: "removeApi",
@@ -30208,7 +30211,7 @@ ${n.message}
30208
30211
  required: !0
30209
30212
  }
30210
30213
  ],
30211
- createHandler: ({ project: e, config: t }) => async (n) => (e.removeApi(n), await Te(t.activeDelayMs), !0)
30214
+ createHandler: ({ project: e, config: t }) => async (n) => (e.removeApi(n), await Ce(t.activeDelayMs), !0)
30212
30215
  }, lT = {
30213
30216
  name: "removeApis",
30214
30217
  description: "批量删除API",
@@ -30227,7 +30230,7 @@ ${n.message}
30227
30230
  createHandler: ({ project: e, config: t }) => async (n = []) => {
30228
30231
  for (const o of n)
30229
30232
  e.removeApi(o);
30230
- return await Te(t.activeDelayMs), !0;
30233
+ return await Ce(t.activeDelayMs), !0;
30231
30234
  }
30232
30235
  }, iT = {
30233
30236
  name: "setHomepage",
@@ -30240,7 +30243,7 @@ ${n.message}
30240
30243
  required: !0
30241
30244
  }
30242
30245
  ],
30243
- createHandler: ({ project: e, config: t }) => async (n) => (e.setHomepage(n), await Te(t.activeDelayMs), !0)
30246
+ createHandler: ({ project: e, config: t }) => async (n) => (e.setHomepage(n), await Ce(t.activeDelayMs), !0)
30244
30247
  }, cT = {
30245
30248
  name: "setGlobalCss",
30246
30249
  description: "设置应用的全局css代码",
@@ -30252,13 +30255,13 @@ ${n.message}
30252
30255
  required: !0
30253
30256
  }
30254
30257
  ],
30255
- createHandler: ({ project: e, config: t }) => async (n) => (e.platform === "uniapp" ? e.setUniConfig("css", n) : e.setGloblas("css", n), await Te(t.activeDelayMs), !0)
30258
+ createHandler: ({ project: e, config: t }) => async (n) => (e.platform === "uniapp" ? e.setUniConfig("css", n) : e.setGloblas("css", n), await Ce(t.activeDelayMs), !0)
30256
30259
  }, uT = {
30257
30260
  name: "getGlobalCss",
30258
30261
  description: "获取应用的全局css代码",
30259
30262
  parameters: [],
30260
30263
  createHandler: ({ project: e, config: t }) => async () => {
30261
- if (await Te(t.activeDelayMs), e.platform === "uniapp")
30264
+ if (await Ce(t.activeDelayMs), e.platform === "uniapp")
30262
30265
  e.uniConfig.css;
30263
30266
  else
30264
30267
  return e.globals.css || "没有全局CSS";
@@ -30297,12 +30300,12 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
30297
30300
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("store", {
30298
30301
  type: "JSFunction",
30299
30302
  value: n
30300
- }), await Te(t.activeDelayMs), !0)
30303
+ }), await Ce(t.activeDelayMs), !0)
30301
30304
  }, pT = {
30302
30305
  name: "getGlobalStore",
30303
30306
  description: "获取应用的全局状态(Pinia Store)",
30304
30307
  parameters: [],
30305
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.store?.value || "当前没有配置全局状态")
30308
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.store?.value || "当前没有配置全局状态")
30306
30309
  }, fT = {
30307
30310
  name: "setGlobalAccess",
30308
30311
  description: `设置权限控制插件配置项, 配置样例:
@@ -30337,17 +30340,17 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
30337
30340
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("access", {
30338
30341
  type: "JSFunction",
30339
30342
  value: n
30340
- }), await Te(t.activeDelayMs), !0)
30343
+ }), await Ce(t.activeDelayMs), !0)
30341
30344
  }, gT = {
30342
30345
  name: "getGlobalAccess",
30343
30346
  description: "查看权限控制插件配置项",
30344
30347
  parameters: [],
30345
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.access?.value || "当前没有配置权限控制插件")
30348
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.access?.value || "当前没有配置权限控制插件")
30346
30349
  }, mT = {
30347
30350
  name: "getGlobalAxios",
30348
30351
  description: "查看Axios请求工具配置项",
30349
30352
  parameters: [],
30350
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.axios?.value || "当前没有配置请求工具")
30353
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.axios?.value || "当前没有配置请求工具")
30351
30354
  }, hT = {
30352
30355
  name: "setGlobalAxios",
30353
30356
  description: `
@@ -30384,7 +30387,7 @@ store的代码是一个js函数,函数接收的app参数是 Vue的应用实例
30384
30387
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("axios", {
30385
30388
  type: "JSFunction",
30386
30389
  value: n
30387
- }), await Te(t.activeDelayMs), !0)
30390
+ }), await Ce(t.activeDelayMs), !0)
30388
30391
  }, vT = {
30389
30392
  name: "setGlobalRequestInterceptor",
30390
30393
  description: `设置全局Axios全局请求拦截器, 代码样例:
@@ -30413,12 +30416,12 @@ axios请求拦截的代码是一个js函数,函数接收两个参数:
30413
30416
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("request", {
30414
30417
  type: "JSFunction",
30415
30418
  value: n
30416
- }), await Te(t.activeDelayMs), !0)
30419
+ }), await Ce(t.activeDelayMs), !0)
30417
30420
  }, bT = {
30418
30421
  name: "getGlobalRequestInterceptor",
30419
30422
  description: "查看全局Axios全局请求拦截器",
30420
30423
  parameters: [],
30421
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.request?.value || "当前没有配置请求拦截器")
30424
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.request?.value || "当前没有配置请求拦截器")
30422
30425
  }, yT = {
30423
30426
  name: "setGlobalResponseInterceptor",
30424
30427
  description: `设置全局Axios全局响应拦截器, 代码样例:
@@ -30447,22 +30450,22 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
30447
30450
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("response", {
30448
30451
  type: "JSFunction",
30449
30452
  value: n
30450
- }), await Te(t.activeDelayMs), !0)
30453
+ }), await Ce(t.activeDelayMs), !0)
30451
30454
  }, _T = {
30452
30455
  name: "getGlobalResponseInterceptor",
30453
30456
  description: "查看全局Axios全局响应拦截器",
30454
30457
  parameters: [],
30455
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.response?.value || "当前没有配置响应拦截器")
30458
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.response?.value || "当前没有配置响应拦截器")
30456
30459
  }, wT = {
30457
30460
  name: "getGlobalBeforeEach",
30458
30461
  description: "查看全局前置路由守卫",
30459
30462
  parameters: [],
30460
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.beforeEach?.value || "当前没有全局前置路由守卫")
30463
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.beforeEach?.value || "当前没有全局前置路由守卫")
30461
30464
  }, ET = {
30462
30465
  name: "getGlobalAfterEach",
30463
30466
  description: "查看全局后置路由守卫",
30464
30467
  parameters: [],
30465
- createHandler: ({ project: e, config: t }) => async () => (await Te(t.activeDelayMs), e.globals.afterEach?.value || "当前没有全局后置路由守卫")
30468
+ createHandler: ({ project: e, config: t }) => async () => (await Ce(t.activeDelayMs), e.globals.afterEach?.value || "当前没有全局后置路由守卫")
30466
30469
  }, kT = {
30467
30470
  name: "setGlobalBeforeEach",
30468
30471
  description: `设置全局前置路由守卫, 代码样例:
@@ -30493,7 +30496,7 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
30493
30496
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("beforeEach", {
30494
30497
  type: "JSFunction",
30495
30498
  value: n
30496
- }), await Te(t.activeDelayMs), !0)
30499
+ }), await Ce(t.activeDelayMs), !0)
30497
30500
  }, ST = {
30498
30501
  name: "setGlobalAfterEach",
30499
30502
  description: `设置全局后置路由守卫, 代码样例:
@@ -30524,7 +30527,7 @@ axios响应拦截的代码是一个js函数,函数接收两个参数:
30524
30527
  createHandler: ({ project: e, config: t }) => async (n) => (e.setGloblas("afterEach", {
30525
30528
  type: "JSFunction",
30526
30529
  value: n
30527
- }), await Te(t.activeDelayMs), !0)
30530
+ }), await Ce(t.activeDelayMs), !0)
30528
30531
  }, xT = {
30529
30532
  name: "getNodeSelected",
30530
30533
  description: "获取当前页面选中的节点路径,用于定位当前选中的页面元素,路径最后一个是选中的元素名称",
@@ -31408,7 +31411,7 @@ class BT {
31408
31411
  this.setSelected(null), this.setHover(null), this.setDragging(null), this.setDropping(null);
31409
31412
  }
31410
31413
  async updateRect() {
31411
- await Te(100);
31414
+ await Ce(100);
31412
31415
  const t = i(this.selected), n = i(this.hover);
31413
31416
  if (t) {
31414
31417
  const o = t.el.getBoundingClientRect();
@@ -31430,7 +31433,7 @@ class BT {
31430
31433
  this.lines.value = [];
31431
31434
  return;
31432
31435
  }
31433
- await Te(100);
31436
+ await Ce(100);
31434
31437
  const t = this.engine.simulator.renderer?.context?.__refs || {}, n = [], o = Object.keys(Vo.nodes);
31435
31438
  for (const s of o) {
31436
31439
  const r = t[s];
@@ -32696,11 +32699,11 @@ class KO extends rc {
32696
32699
  if (r || (r = a[0]?.id), !o || !s || !r) return;
32697
32700
  const l = o.getPage(r);
32698
32701
  l && !l.raw && (s.regionRef?.setActive("Pages"), this.simulator.ready(async () => {
32699
- o.active(l), await Te(1e3), this.simulator.designer.value?.setSelected(this.current.value);
32702
+ o.active(l), await Ce(1e3), this.simulator.designer.value?.setSelected(this.current.value);
32700
32703
  }));
32701
32704
  const c = o.getBlock(r);
32702
32705
  c && (s.regionRef?.setActive("Blocks"), this.simulator?.ready(async () => {
32703
- o.active(c), await Te(1e3), this.simulator.designer.value?.setSelected(this.current.value);
32706
+ o.active(c), await Ce(1e3), this.simulator.designer.value?.setSelected(this.current.value);
32704
32707
  }));
32705
32708
  }
32706
32709
  }
@@ -33576,22 +33579,24 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
33576
33579
  onMenuChecked: f,
33577
33580
  closeAllTabs: u,
33578
33581
  closeOtherTabs: p
33579
- } = _v(o), g = R(!0), m = (k, A = {}) => {
33580
- const E = A.url;
33581
- E && window.open(E);
33582
- }, b = (k) => {
33582
+ } = _v(o), g = R(!0), m = (A, E = {}) => {
33583
+ const x = E.url;
33584
+ x && window.open(x);
33585
+ }, b = (A) => {
33583
33586
  if (s.value) {
33584
- const A = s.value[0]?.widgetRef;
33585
- if (!A) return;
33586
- switch (k.name) {
33587
+ const E = s.value[0]?.widgetRef;
33588
+ if (!E) return;
33589
+ switch (A.name) {
33587
33590
  case "home":
33588
- A.reload();
33591
+ E.reload();
33589
33592
  break;
33590
33593
  }
33591
33594
  }
33592
33595
  }, y = async () => {
33593
33596
  g.value = !1, await Bt(), g.value = !0;
33594
- }, _ = () => c.value === "Designer", C = [
33597
+ }, _ = () => c.value === "Designer", C = async () => {
33598
+ _() || (c.value = "Designer", await Ce(300));
33599
+ }, O = [
33595
33600
  {
33596
33601
  label: "关闭其他",
33597
33602
  value: "other",
@@ -33602,8 +33607,8 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
33602
33607
  value: "all",
33603
33608
  command: "all"
33604
33609
  }
33605
- ], O = (k) => {
33606
- k === "all" ? u() : k === "other" && p();
33610
+ ], k = (A) => {
33611
+ A === "all" ? u() : A === "other" && p();
33607
33612
  };
33608
33613
  return t({
33609
33614
  currentTab: l,
@@ -33611,42 +33616,43 @@ const Hi = new qT(), QT = /* @__PURE__ */ H({
33611
33616
  widgetsRef: s,
33612
33617
  openTab: m,
33613
33618
  reload: y,
33614
- isDesignerActive: _
33615
- }), (k, A) => (h(), T(i(Is), {
33619
+ isDesignerActive: _,
33620
+ activeDesigner: C
33621
+ }), (A, E) => (h(), T(i(Is), {
33616
33622
  class: "v-workspace-region",
33617
33623
  items: i(r),
33618
33624
  menus: i(a),
33619
33625
  modelValue: i(l),
33620
- "onUpdate:modelValue": A[0] || (A[0] = (E) => to(l) ? l.value = E : null),
33626
+ "onUpdate:modelValue": E[0] || (E[0] = (x) => to(l) ? l.value = x : null),
33621
33627
  checkable: "",
33622
33628
  onRemove: i(d),
33623
33629
  onActionClick: b
33624
33630
  }, {
33625
33631
  menus: w(() => [
33626
- (h(!0), j(ee, null, pe(i(a), (E) => (h(), T(i(Ne), {
33632
+ (h(!0), j(ee, null, pe(i(a), (x) => (h(), T(i(Ne), {
33627
33633
  mode: "icon",
33628
33634
  size: "small",
33629
- type: i(c) === E.name ? "primary" : "info",
33635
+ type: i(c) === x.name ? "primary" : "info",
33630
33636
  background: "always",
33631
- label: E.label,
33632
- onClick: (x) => i(f)(E)
33637
+ label: x.label,
33638
+ onClick: (S) => i(f)(x)
33633
33639
  }, null, 8, ["type", "label", "onClick"]))), 256)),
33634
33640
  v(i(R0), {
33635
- menus: C,
33636
- onCommand: O
33641
+ menus: O,
33642
+ onCommand: k
33637
33643
  })
33638
33644
  ]),
33639
33645
  default: w(() => [
33640
- (h(!0), j(ee, null, pe(i(o), (E) => (h(), j(ee, {
33641
- key: E.name
33646
+ (h(!0), j(ee, null, pe(i(o), (x) => (h(), j(ee, {
33647
+ key: x.name
33642
33648
  }, [
33643
- g.value && i(c) === E.name ? (h(), T(i(Cn), {
33649
+ g.value && i(c) === x.name ? (h(), T(i(Cn), {
33644
33650
  ref_for: !0,
33645
33651
  ref_key: "widgetsRef",
33646
33652
  ref: s,
33647
33653
  key: `${i(c)}_${i(l)}`,
33648
33654
  region: e.region,
33649
- widget: { ...E, props: {} }
33655
+ widget: { ...x, props: {} }
33650
33656
  }, null, 8, ["region", "widget"])) : U("", !0)
33651
33657
  ], 64))), 128))
33652
33658
  ]),
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, a as E, b as r, c as t, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as u, o as K, p as m, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ra, a4 as ta, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La, ao as Ma } from "./index-dmpcFWLr.js";
1
+ import { A as e, a as E, b as r, c as t, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as u, o as K, p as m, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ra, a4 as ta, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La, ao as Ma } from "./index-DIpZt6oq.js";
2
2
  export {
3
3
  e as API_METHOD_TYPES,
4
4
  E as ActionMenu,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/designer",
3
3
  "private": false,
4
- "version": "0.16.34",
4
+ "version": "0.16.35",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -29,12 +29,12 @@
29
29
  "marked": "~17.0.1",
30
30
  "mockjs": "~1.1.0",
31
31
  "monaco-editor": "~0.55.0",
32
- "@vtj/core": "~0.16.34",
33
- "@vtj/icons": "~0.16.34",
34
- "@vtj/uni": "~0.16.34",
35
- "@vtj/utils": "~0.16.34",
36
- "@vtj/renderer": "~0.16.34",
37
- "@vtj/ui": "~0.16.34"
32
+ "@vtj/core": "~0.16.35",
33
+ "@vtj/icons": "~0.16.35",
34
+ "@vtj/uni": "~0.16.35",
35
+ "@vtj/renderer": "~0.16.35",
36
+ "@vtj/utils": "~0.16.35",
37
+ "@vtj/ui": "~0.16.35"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/mockjs": "~1.0.10",
@@ -192,6 +192,7 @@ export declare const regions: {
192
192
  openTab: (_name: string, props?: Record<string, any>) => void;
193
193
  reload: () => Promise<void>;
194
194
  isDesignerActive: () => boolean;
195
+ activeDesigner: () => Promise<void>;
195
196
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
196
197
  widgetsRef: ( CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
197
198
  region: {
@@ -11,6 +11,7 @@ declare const _default: DefineComponent<Props, {
11
11
  openTab: (_name: string, props?: Record<string, any>) => void;
12
12
  reload: () => Promise<void>;
13
13
  isDesignerActive: () => boolean;
14
+ activeDesigner: () => Promise<void>;
14
15
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
15
16
  widgetsRef: ( CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
16
17
  region: {
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.16.33
5
+ * @version 0.16.34
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.16.33";
8
+ export declare const version = "0.16.34";
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-dmpcFWLr.js";
2
- export {
3
- f as default
4
- };