@opentiny/tiny-engine-plugin-bridge 2.5.0-rc.2 → 2.5.0-rc.4

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.
Files changed (2) hide show
  1. package/dist/index.js +157 -157
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import "./style.css";
2
- import { reactive as G, ref as N, watchEffect as ee, resolveComponent as d, createElementBlock as I, openBlock as E, createElementVNode as h, createVNode as a, withCtx as l, Fragment as oe, renderList as ae, withModifiers as X, normalizeClass as se, toDisplayString as U, computed as F, watch as re, onMounted as le, nextTick as ie, createBlock as R, createCommentVNode as S, createTextVNode as D, provide as ce } from "vue";
3
- import { SvgButton as j, SearchEmpty as ue, ButtonGroup as de, VueMonaco as pe, PluginSetting as me, PluginPanel as ge } from "@opentiny/tiny-engine-common";
4
- import { getMetaApi as V, META_SERVICE as B, useResource as k, useNotify as x, useModal as ye, useLayout as te, getMergeMeta as fe } from "@opentiny/tiny-engine-meta-register";
2
+ import { reactive as M, ref as U, watchEffect as ee, resolveComponent as p, createElementBlock as O, openBlock as h, createElementVNode as E, createVNode as a, withCtx as l, Fragment as oe, renderList as ae, withModifiers as X, normalizeClass as se, toDisplayString as B, computed as b, watch as re, onMounted as le, nextTick as ie, createBlock as C, createCommentVNode as N, createTextVNode as L, provide as ce } from "vue";
3
+ import { SvgButton as j, SearchEmpty as de, ButtonGroup as pe, VueMonaco as ue, PluginSetting as me, PluginPanel as ge } from "@opentiny/tiny-engine-common";
4
+ import { getMetaApi as S, META_SERVICE as x, useResource as I, useNotify as T, useModal as ye, useLayout as te, getMergeMeta as fe } from "@opentiny/tiny-engine-meta-register";
5
5
  import { isVsCodeEnv as _e } from "@opentiny/tiny-engine-common/js/environments";
6
- import { generateBridge as ve, generateUtil as Ee } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
7
- import { Search as he, Radio as Ce, RadioGroup as Fe, Checkbox as Re, FormItem as be, Button as Ve, Input as Be, Form as Se } from "@opentiny/vue";
8
- import { iconSearch as xe } from "@opentiny/vue-icon";
9
- const Ne = (n, t) => V(B.Http).get(`/app-center/api/apps/extension/list?app=${n}&category=${t}`), Te = (n) => V(B.Http).post("/app-center/api/apps/extension/create", n), Ue = (n) => V(B.Http).post("/app-center/api/apps/extension/update", n), ke = (n) => V(B.Http).get(`/app-center/api/apps/extension/delete?${n}`), Ae = (n) => {
10
- V(B.Http).get(`/app-center/api/apps/schema/${n}`).then((t) => {
11
- ve(t.bridge), Ee(t.utils);
6
+ import { generateBridge as ve, generateUtil as he } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
7
+ import { Search as Ee, Radio as Re, RadioGroup as be, Checkbox as Ce, FormItem as Ve, Button as Se, Input as xe, Form as Ne } from "@opentiny/vue";
8
+ import { iconSearch as Te } from "@opentiny/vue-icon";
9
+ const Ue = (n, t) => S(x.Http).get(`/app-center/api/apps/extension/list?app=${n}&category=${t}`), ke = (n) => S(x.Http).post("/app-center/api/apps/extension/create", n), Be = (n) => S(x.Http).post("/app-center/api/apps/extension/update", n), Ie = (n) => S(x.Http).get(`/app-center/api/apps/extension/delete?${n}`), we = (n) => {
10
+ S(x.Http).get(`/app-center/api/apps/schema/${n}`).then((t) => {
11
+ ve(t.bridge), he(t.utils);
12
12
  });
13
- }, m = G({
13
+ }, m = M({
14
14
  actionType: "",
15
15
  type: "",
16
16
  category: "",
@@ -30,146 +30,146 @@ const Ne = (n, t) => V(B.Http).get(`/app-center/api/apps/extension/list?app=${n}
30
30
  destructuring: !0,
31
31
  main: ""
32
32
  }
33
- }, De = {
33
+ }, Le = {
34
34
  name: "",
35
35
  type: "function",
36
36
  content: {
37
37
  type: "JSFunction",
38
38
  value: ""
39
39
  }
40
- }, b = {
40
+ }, V = {
41
41
  Util: "utils",
42
42
  Bridge: "bridge"
43
- }, w = {
43
+ }, P = {
44
44
  Npm: "npm",
45
45
  Function: "function"
46
- }, Ie = {
47
- [b.Util]: "新建工具类",
48
- [b.Bridge]: "新建桥接源"
49
- }, A = {
46
+ }, Oe = {
47
+ [V.Util]: "新建工具类",
48
+ [V.Bridge]: "新建桥接源"
49
+ }, w = {
50
50
  Edit: "edit"
51
- }, P = () => V(B.GlobalService).getBaseInfo().id, we = (n) => m.resourceNames[n], Le = (n, t) => {
51
+ }, G = () => S(x.GlobalService).getBaseInfo().id, Pe = (n) => m.resourceNames[n], Ae = (n, t) => {
52
52
  m.resourceNames[n] = t;
53
- }, Oe = (n) => {
54
- const t = P();
55
- return Ne(t, n);
56
- }, H = () => m.actionType, M = (n) => {
53
+ }, Fe = (n) => {
54
+ const t = G();
55
+ return Ue(t, n);
56
+ }, H = () => m.actionType, D = (n) => {
57
57
  m.actionType = n;
58
- }, Pe = () => m.resource, q = (n = Z) => {
59
- n || (n = m.category === w.Function ? De : Z), m.resource = n;
60
- }, L = () => m.type, $ = (n) => {
58
+ }, Ge = () => m.resource, q = (n = Z) => {
59
+ n || (n = m.category === P.Function ? Le : Z), m.resource = n;
60
+ }, A = () => m.type, $ = (n) => {
61
61
  m.type = n;
62
62
  }, z = (n) => {
63
63
  m.category = n;
64
64
  }, Y = () => m.category, ne = (...n) => {
65
- _e && Ae(...n);
66
- }, Ge = async (n, t, p) => {
67
- const e = H() === A.Edit;
65
+ _e && we(...n);
66
+ }, Me = async (n, t, u) => {
67
+ const e = H() === w.Edit;
68
68
  try {
69
69
  if (e) {
70
70
  n.id = m.resource.id;
71
- const i = await Ue(n);
71
+ const i = await Be(n);
72
72
  if (i) {
73
- const g = k().appSchemaState[n.category].findIndex((y) => y.name === i.name);
73
+ const g = I().appSchemaState[n.category].findIndex((y) => y.name === i.name);
74
74
  if (g === -1) {
75
- x({
75
+ T({
76
76
  type: "error",
77
77
  message: "修改失败"
78
78
  });
79
79
  return;
80
80
  }
81
- k().appSchemaState[n.category][g] = i;
81
+ I().appSchemaState[n.category][g] = i;
82
82
  }
83
83
  } else {
84
- const i = await Te(n);
85
- i && k().appSchemaState[n.category].push(i);
84
+ const i = await ke(n);
85
+ i && I().appSchemaState[n.category].push(i);
86
86
  }
87
- ne(P()), x({
87
+ ne(G()), T({
88
88
  type: "success",
89
89
  message: `${e ? "修改" : "创建"}成功`
90
- }), p("refresh", m.type), m.refresh = !0, t();
90
+ }), u("refresh", m.type), m.refresh = !0, t();
91
91
  } catch (i) {
92
- x({
92
+ T({
93
93
  type: "error",
94
94
  message: `工具类${e ? "修改" : "创建"}失败:${i.message}`
95
95
  });
96
96
  }
97
- }, Me = (n, t, p) => {
97
+ }, De = (n, t, u) => {
98
98
  var i;
99
- const e = `app=${P()}&id=${(i = m.resource) == null ? void 0 : i.id}`;
100
- ke(e).then((g) => {
99
+ const e = `app=${G()}&id=${(i = m.resource) == null ? void 0 : i.id}`;
100
+ Ie(e).then((g) => {
101
101
  if (g) {
102
- const y = k().appSchemaState[m.type].findIndex((o) => o.name === g.name);
102
+ const y = I().appSchemaState[m.type].findIndex((o) => o.name === g.name);
103
103
  if (y === -1) {
104
- x({
104
+ T({
105
105
  type: "error",
106
106
  message: "删除失败"
107
107
  });
108
108
  return;
109
109
  }
110
- k().appSchemaState[m.type].splice(y, 1), ne(P()), x({
110
+ I().appSchemaState[m.type].splice(y, 1), ne(G()), T({
111
111
  type: "success",
112
112
  message: "删除成功"
113
- }), p("refresh", m.type), m.refresh = !0, t();
113
+ }), u("refresh", m.type), m.refresh = !0, t();
114
114
  }
115
115
  });
116
116
  }, qe = {
117
117
  components: {
118
- TinySearch: he,
119
- TinyIconSearch: xe(),
120
- SearchEmpty: ue,
118
+ TinySearch: Ee,
119
+ TinyIconSearch: Te(),
120
+ SearchEmpty: de,
121
121
  SvgButton: j
122
122
  },
123
123
  props: {
124
124
  name: {
125
125
  type: String,
126
- default: b.Util
126
+ default: V.Util
127
127
  }
128
128
  },
129
129
  emits: ["open"],
130
130
  setup(n, { emit: t }) {
131
- const p = N([]), e = G({
131
+ const u = U([]), e = M({
132
132
  resourceList: [],
133
133
  activeIndex: -1,
134
134
  searchValue: ""
135
135
  }), i = (r = e.resourceList, s = e.searchValue) => r.filter((f) => f.name.toLowerCase().indexOf(s.toLowerCase()) > -1), g = async (r) => {
136
- e.resourceList = await Oe(r), Le(
136
+ e.resourceList = await Fe(r), Ae(
137
137
  r,
138
138
  Array.isArray(e.resourceList) ? e.resourceList.map((s) => s.name) : []
139
- ), p.value = i(e.resourceList);
139
+ ), u.value = i(e.resourceList);
140
140
  };
141
141
  return ee(async () => {
142
142
  g(n.name);
143
143
  }), {
144
144
  state: e,
145
- list: p,
145
+ list: u,
146
146
  add: (r) => {
147
- M(""), $(n.name), q(""), z(r), t("open");
147
+ D(""), $(n.name), q(""), z(r), t("open");
148
148
  },
149
149
  openRead: (r, s) => {
150
- e.activeIndex = s, q(r), M(A.Edit), t("open");
150
+ e.activeIndex = s, q(r), D(w.Edit), t("open");
151
151
  },
152
152
  openEdit: (r, s) => {
153
- e.activeIndex = s, q(r), M(A.Edit), $(n.name), z(r.type), t("open");
153
+ e.activeIndex = s, q(r), D(w.Edit), $(n.name), z(r.type), t("open");
154
154
  },
155
155
  refresh: g,
156
- getType: L,
157
- RESOURCE_TYPE: b,
156
+ getType: A,
157
+ RESOURCE_TYPE: V,
158
158
  searchBridgeData: (r) => {
159
- p.value = i(e.resourceList, r);
159
+ u.value = i(e.resourceList, r);
160
160
  }
161
161
  };
162
162
  }
163
163
  }, J = (n, t) => {
164
- const p = n.__vccOpts || n;
164
+ const u = n.__vccOpts || n;
165
165
  for (const [e, i] of t)
166
- p[e] = i;
167
- return p;
166
+ u[e] = i;
167
+ return u;
168
168
  }, Ye = { class: "manage-panel" }, He = { class: "manage-panel-search" }, ze = { class: "list lowcode-scrollbar" }, je = ["onClick"], Je = { class: "item-label" };
169
- function We(n, t, p, e, i, g) {
170
- const y = d("tiny-icon-search"), o = d("tiny-search"), C = d("svg-icon"), v = d("svg-button"), r = d("search-empty");
171
- return E(), I("div", Ye, [
172
- h("div", He, [
169
+ function We(n, t, u, e, i, g) {
170
+ const y = p("tiny-icon-search"), o = p("tiny-search"), R = p("svg-icon"), v = p("svg-button"), r = p("search-empty");
171
+ return h(), O("div", Ye, [
172
+ E("div", He, [
173
173
  a(o, {
174
174
  modelValue: e.state.searchValue,
175
175
  "onUpdate:modelValue": [
@@ -185,22 +185,22 @@ function We(n, t, p, e, i, g) {
185
185
  _: 1
186
186
  }, 8, ["modelValue", "onUpdate:modelValue"])
187
187
  ]),
188
- h("div", ze, [
189
- (E(!0), I(oe, null, ae(e.list, (s, f) => (E(), I("div", {
188
+ E("div", ze, [
189
+ (h(!0), O(oe, null, ae(e.list, (s, f) => (h(), O("div", {
190
190
  key: s.name,
191
191
  class: se(["list-item", f === e.state.activeIndex ? "active" : ""]),
192
- onClick: X((T) => e.openEdit(s, f), ["stop"])
192
+ onClick: X((k) => e.openEdit(s, f), ["stop"])
193
193
  }, [
194
- a(C, {
194
+ a(R, {
195
195
  name: "plugin-icon-sresources",
196
196
  class: "list-item-icon"
197
197
  }),
198
- h("div", Je, U(s.name), 1),
198
+ E("div", Je, B(s.name), 1),
199
199
  a(v, {
200
200
  class: "setting-icon",
201
201
  hoverBgColor: !1,
202
202
  name: "setting",
203
- onClick: X((T) => e.openEdit(s, f), ["stop"])
203
+ onClick: X((k) => e.openEdit(s, f), ["stop"])
204
204
  }, null, 8, ["onClick"])
205
205
  ], 10, je))), 128)),
206
206
  a(r, {
@@ -209,67 +209,67 @@ function We(n, t, p, e, i, g) {
209
209
  ])
210
210
  ]);
211
211
  }
212
- const Ke = /* @__PURE__ */ J(qe, [["render", We], ["__scopeId", "data-v-accaf761"]]), W = N(!1), Qe = () => {
212
+ const Ke = /* @__PURE__ */ J(qe, [["render", We], ["__scopeId", "data-v-accaf761"]]), W = U(!1), Qe = () => {
213
213
  W.value = !0, ie(() => window.dispatchEvent(new Event("resize")));
214
- }, O = () => {
214
+ }, F = () => {
215
215
  W.value = !1;
216
216
  }, Xe = {
217
217
  components: {
218
- TinyForm: Se,
219
- TinyInput: Be,
220
- TinyButton: Ve,
221
- TinyFormItem: be,
222
- TinyCheckbox: Re,
218
+ TinyForm: Ne,
219
+ TinyInput: xe,
220
+ TinyButton: Se,
221
+ TinyFormItem: Ve,
222
+ TinyCheckbox: Ce,
223
223
  PluginSetting: me,
224
- MonacoEditor: pe,
225
- TinyRadioGroup: Fe,
226
- TinyRadio: Ce,
224
+ MonacoEditor: ue,
225
+ TinyRadioGroup: be,
226
+ TinyRadio: Re,
227
227
  SvgButton: j,
228
- ButtonGroup: de
228
+ ButtonGroup: pe
229
229
  },
230
230
  setup(n, { emit: t }) {
231
- const p = {
231
+ const u = {
232
232
  language: "javascript",
233
233
  mouseStyle: "default",
234
234
  minimap: { enabled: !1 },
235
235
  // 禁用滚动条边边一直显示的边框
236
236
  overviewRulerBorder: !1,
237
237
  renderLineHighlightOnlyWhenFocus: !0
238
- }, { confirm: e } = ye(), { PLUGIN_NAME: i, getPluginByLayout: g } = te(), y = F(() => g(i.Bridge)), o = G({
239
- resource: F(() => Pe()),
238
+ }, { confirm: e } = ye(), { PLUGIN_NAME: i, getPluginByLayout: g } = te(), y = b(() => g(i.Bridge)), o = M({
239
+ resource: b(() => Ge()),
240
240
  name: "",
241
241
  value: "",
242
242
  content: {},
243
- status: F(() => H() === A.Edit),
244
- category: F(() => Y() === w.Npm),
245
- mode: F(() => {
246
- var u;
247
- return ((u = fe("engine.config")) == null ? void 0 : u.dslMode) !== "Vue";
243
+ status: b(() => H() === w.Edit),
244
+ category: b(() => Y() === P.Npm),
245
+ mode: b(() => {
246
+ var d;
247
+ return ((d = fe("engine.config")) == null ? void 0 : d.dslMode) !== "Vue";
248
248
  }),
249
249
  isInstance: !1,
250
- title: F(() => {
251
- const u = H() === A.Edit ? "编辑" : "添加", _ = L() === b.Bridge ? "桥接源" : "工具类";
252
- return u + _;
250
+ title: b(() => {
251
+ const d = H() === w.Edit ? "编辑" : "添加", _ = A() === V.Bridge ? "桥接源" : "工具类";
252
+ return d + _;
253
253
  }),
254
- type: w.Npm
255
- }), C = F(() => {
256
- const u = o.name || "name";
257
- let _ = u;
258
- o.content.destructuring && (o.name && o.name === o.content.exportName ? _ = `{ ${o.content.exportName || "exportName"} }` : _ = `{ ${o.content.exportName || "exportName"} as ${u} }`);
254
+ type: P.Npm
255
+ }), R = b(() => {
256
+ const d = o.name || "name";
257
+ let _ = d;
258
+ o.content.destructuring && (o.name && o.name === o.content.exportName ? _ = `{ ${o.content.exportName || "exportName"} }` : _ = `{ ${o.content.exportName || "exportName"} as ${d} }`);
259
259
  const c = `${o.content.package || "package"}${o.content.main || ""}`;
260
260
  return `import ${_} from '${c}'
261
- export { ${u} }`;
261
+ export { ${d} }`;
262
262
  });
263
263
  ee(() => {
264
- var u, _;
265
- o.name = o.resource.name, o.content = o.resource.content || {}, o.value = ((_ = (u = o.resource) == null ? void 0 : u.content) == null ? void 0 : _.value) || "", o.type = Y();
264
+ var d, _;
265
+ o.name = o.resource.name, o.content = o.resource.content || {}, o.value = ((_ = (d = o.resource) == null ? void 0 : d.content) == null ? void 0 : _.value) || "", o.type = Y();
266
266
  }), re(
267
267
  () => o.isInstance,
268
- (u) => {
269
- u || (o.content.instance = "");
268
+ (d) => {
269
+ d || (o.content.instance = "");
270
270
  }
271
271
  );
272
- const v = N(null), r = N(null);
272
+ const v = U(null), r = U(null);
273
273
  return le(() => window.dispatchEvent(new Event("resize"))), {
274
274
  align: y,
275
275
  PLUGIN_NAME: i,
@@ -277,8 +277,8 @@ export { ${u} }`;
277
277
  name: [
278
278
  { required: !0, message: "必填", trigger: "change" },
279
279
  {
280
- validator: (u, _, c) => {
281
- const Q = we(L());
280
+ validator: (d, _, c) => {
281
+ const Q = Pe(A());
282
282
  Array.isArray(Q) && Q.includes(_) ? c(new Error("资源名称已存在")) : c();
283
283
  },
284
284
  trigger: "change"
@@ -291,15 +291,15 @@ export { ${u} }`;
291
291
  resourceForm: r,
292
292
  editor: v,
293
293
  state: o,
294
- codePreview: C,
294
+ codePreview: R,
295
295
  isOpen: W,
296
- closePanel: O,
296
+ closePanel: F,
297
297
  save: () => {
298
- const u = {
299
- category: L(),
298
+ const d = {
299
+ category: A(),
300
300
  type: Y(),
301
301
  name: o.name,
302
- app: V(B.GlobalService).getBaseInfo().id,
302
+ app: S(x.GlobalService).getBaseInfo().id,
303
303
  content: o.category ? o.content : {
304
304
  type: "JSFunction",
305
305
  value: v.value.getEditor().getValue()
@@ -308,13 +308,13 @@ export { ${u} }`;
308
308
  r.value.validate((_) => {
309
309
  if (_) {
310
310
  if (!o.category && !v.value.getEditor().getValue()) {
311
- x({
311
+ T({
312
312
  type: "error",
313
313
  message: "function 内容必填"
314
314
  });
315
315
  return;
316
316
  }
317
- Ge(u, O, t);
317
+ Me(d, F, t);
318
318
  }
319
319
  });
320
320
  },
@@ -323,32 +323,32 @@ export { ${u} }`;
323
323
  title: "删除资源",
324
324
  message: "如果删除正在使用的资源,将无法正常预览页面,确认要删除吗?",
325
325
  exec: () => {
326
- Me(o.name, O, t);
326
+ De(o.name, F, t);
327
327
  }
328
328
  });
329
329
  },
330
- options: p,
331
- handleChangeType: (u) => {
332
- z(u);
330
+ options: u,
331
+ handleChangeType: (d) => {
332
+ z(d);
333
333
  },
334
- RESOURCE_CATEGORY: w
334
+ RESOURCE_CATEGORY: P
335
335
  };
336
336
  }
337
337
  }, Ze = { class: "title-wrap" }, $e = { class: "right-item" }, et = { key: 2 }, tt = { class: "code-preview" };
338
- function nt(n, t, p, e, i, g) {
339
- const y = d("tiny-button"), o = d("svg-button"), C = d("button-group"), v = d("tiny-radio"), r = d("tiny-radio-group"), s = d("tiny-form-item"), f = d("tiny-input"), T = d("tiny-checkbox"), K = d("monaco-editor"), u = d("tiny-form"), _ = d("plugin-setting");
340
- return e.isOpen ? (E(), R(_, {
338
+ function nt(n, t, u, e, i, g) {
339
+ const y = p("tiny-button"), o = p("svg-button"), R = p("button-group"), v = p("tiny-radio"), r = p("tiny-radio-group"), s = p("tiny-form-item"), f = p("tiny-input"), k = p("tiny-checkbox"), K = p("monaco-editor"), d = p("tiny-form"), _ = p("plugin-setting");
340
+ return e.isOpen ? (h(), C(_, {
341
341
  key: 0,
342
342
  align: e.align,
343
343
  "fixed-name": e.PLUGIN_NAME.Bridge
344
344
  }, {
345
345
  title: l(() => [
346
- h("div", Ze, [
347
- h("span", null, U(e.state.title), 1)
346
+ E("div", Ze, [
347
+ E("span", null, B(e.state.title), 1)
348
348
  ])
349
349
  ]),
350
350
  header: l(() => [
351
- a(C, null, {
351
+ a(R, null, {
352
352
  default: l(() => [
353
353
  a(y, {
354
354
  class: "save-btn",
@@ -356,16 +356,16 @@ function nt(n, t, p, e, i, g) {
356
356
  onClick: e.save
357
357
  }, {
358
358
  default: l(() => t[10] || (t[10] = [
359
- D("保存")
359
+ L("保存")
360
360
  ])),
361
361
  _: 1
362
362
  }, 8, ["onClick"]),
363
- e.state.status ? (E(), R(o, {
363
+ e.state.status ? (h(), C(o, {
364
364
  key: 0,
365
365
  class: "delete-btn",
366
366
  name: "delete",
367
367
  onClick: e.deleteReSource
368
- }, null, 8, ["onClick"])) : S("", !0),
368
+ }, null, 8, ["onClick"])) : N("", !0),
369
369
  a(o, {
370
370
  class: "close-btn",
371
371
  name: "close",
@@ -376,7 +376,7 @@ function nt(n, t, p, e, i, g) {
376
376
  })
377
377
  ]),
378
378
  content: l(() => [
379
- a(u, {
379
+ a(d, {
380
380
  ref: "resourceForm",
381
381
  class: "resource-form",
382
382
  rules: e.rules,
@@ -387,8 +387,8 @@ function nt(n, t, p, e, i, g) {
387
387
  "label-align": !0
388
388
  }, {
389
389
  default: l(() => [
390
- h("div", $e, [
391
- e.state.status ? S("", !0) : (E(), R(s, {
390
+ E("div", $e, [
391
+ e.state.status ? N("", !0) : (h(), C(s, {
392
392
  key: 0,
393
393
  label: "工具类型",
394
394
  prop: "type"
@@ -405,7 +405,7 @@ function nt(n, t, p, e, i, g) {
405
405
  label: e.RESOURCE_CATEGORY.Npm
406
406
  }, {
407
407
  default: l(() => [
408
- D(U(e.RESOURCE_CATEGORY.Npm), 1)
408
+ L(B(e.RESOURCE_CATEGORY.Npm), 1)
409
409
  ]),
410
410
  _: 1
411
411
  }, 8, ["label"]),
@@ -413,7 +413,7 @@ function nt(n, t, p, e, i, g) {
413
413
  label: e.RESOURCE_CATEGORY.Function
414
414
  }, {
415
415
  default: l(() => [
416
- D(U(e.RESOURCE_CATEGORY.Function), 1)
416
+ L(B(e.RESOURCE_CATEGORY.Function), 1)
417
417
  ]),
418
418
  _: 1
419
419
  }, 8, ["label"])
@@ -423,7 +423,7 @@ function nt(n, t, p, e, i, g) {
423
423
  ]),
424
424
  _: 1
425
425
  })),
426
- e.state.status ? S("", !0) : (E(), R(s, {
426
+ e.state.status ? N("", !0) : (h(), C(s, {
427
427
  key: 1,
428
428
  label: "工具名称",
429
429
  prop: "name"
@@ -437,7 +437,7 @@ function nt(n, t, p, e, i, g) {
437
437
  ]),
438
438
  _: 1
439
439
  })),
440
- e.state.category ? (E(), I("div", et, [
440
+ e.state.category ? (h(), O("div", et, [
441
441
  a(s, {
442
442
  label: "npm包名",
443
443
  prop: "content.package"
@@ -466,31 +466,31 @@ function nt(n, t, p, e, i, g) {
466
466
  }),
467
467
  a(s, { label: "" }, {
468
468
  default: l(() => [
469
- a(T, {
469
+ a(k, {
470
470
  modelValue: e.state.content.destructuring,
471
471
  "onUpdate:modelValue": t[4] || (t[4] = (c) => e.state.content.destructuring = c)
472
472
  }, {
473
473
  default: l(() => t[11] || (t[11] = [
474
- D("解构npm包")
474
+ L("解构npm包")
475
475
  ])),
476
476
  _: 1
477
477
  }, 8, ["modelValue"])
478
478
  ]),
479
479
  _: 1
480
480
  }),
481
- e.state.mode ? (E(), R(s, {
481
+ e.state.mode ? (h(), C(s, {
482
482
  key: 0,
483
483
  label: "是否作为实例"
484
484
  }, {
485
485
  default: l(() => [
486
- a(T, {
486
+ a(k, {
487
487
  modelValue: e.state.isInstance,
488
488
  "onUpdate:modelValue": t[5] || (t[5] = (c) => e.state.isInstance = c)
489
489
  }, null, 8, ["modelValue"])
490
490
  ]),
491
491
  _: 1
492
- })) : S("", !0),
493
- e.state.isInstance ? (E(), R(s, {
492
+ })) : N("", !0),
493
+ e.state.isInstance ? (h(), C(s, {
494
494
  key: 1,
495
495
  label: "实例名称",
496
496
  prop: "content.instanceName"
@@ -502,7 +502,7 @@ function nt(n, t, p, e, i, g) {
502
502
  }, null, 8, ["modelValue"])
503
503
  ]),
504
504
  _: 1
505
- })) : S("", !0),
505
+ })) : N("", !0),
506
506
  a(s, { label: "入口路径" }, {
507
507
  default: l(() => [
508
508
  a(f, {
@@ -525,8 +525,8 @@ function nt(n, t, p, e, i, g) {
525
525
  }),
526
526
  a(s, null, {
527
527
  label: l(() => t[12] || (t[12] = [
528
- h("div", { class: "cdn-label-wrap" }, [
529
- h("span", null, "CDN")
528
+ E("div", { class: "cdn-label-wrap" }, [
529
+ E("span", null, "CDN")
530
530
  ], -1)
531
531
  ])),
532
532
  default: l(() => [
@@ -535,19 +535,19 @@ function nt(n, t, p, e, i, g) {
535
535
  "onUpdate:modelValue": t[9] || (t[9] = (c) => e.state.content.cdnLink = c),
536
536
  placeholder: "CDN"
537
537
  }, null, 8, ["modelValue"]),
538
- t[13] || (t[13] = h("div", { class: "tip" }, "浏览器直接可用的生产包链接,请确保可用,否则可能会造成页面预览失败", -1))
538
+ t[13] || (t[13] = E("div", { class: "tip" }, "浏览器直接可用的生产包链接,请确保可用,否则可能会造成页面预览失败", -1))
539
539
  ]),
540
540
  _: 1
541
541
  }),
542
542
  a(s, { label: "生成utils.js代码预览" }, {
543
543
  default: l(() => [
544
- h("div", tt, [
545
- h("pre", null, U(e.codePreview), 1)
544
+ E("div", tt, [
545
+ E("pre", null, B(e.codePreview), 1)
546
546
  ])
547
547
  ]),
548
548
  _: 1
549
549
  })
550
- ])) : (E(), R(K, {
550
+ ])) : (h(), C(K, {
551
551
  key: 3,
552
552
  ref: "editor",
553
553
  value: e.state.value,
@@ -560,7 +560,7 @@ function nt(n, t, p, e, i, g) {
560
560
  }, 8, ["rules", "model"])
561
561
  ]),
562
562
  _: 1
563
- }, 8, ["align", "fixed-name"])) : S("", !0);
563
+ }, 8, ["align", "fixed-name"])) : N("", !0);
564
564
  }
565
565
  const ot = /* @__PURE__ */ J(Xe, [["render", nt], ["__scopeId", "data-v-a30fa265"]]), at = {
566
566
  components: {
@@ -575,7 +575,7 @@ const ot = /* @__PURE__ */ J(Xe, [["render", nt], ["__scopeId", "data-v-a30fa265
575
575
  }
576
576
  },
577
577
  setup(n, { emit: t }) {
578
- const p = N(b.Util), e = N(null), i = F(() => Ie[p.value]), { PLUGIN_NAME: g } = te(), y = G({
578
+ const u = U(V.Util), e = U(null), i = b(() => Oe[u.value]), { PLUGIN_NAME: g } = te(), y = M({
579
579
  emitEvent: t
580
580
  });
581
581
  return ce("panelState", y), {
@@ -583,12 +583,12 @@ const ot = /* @__PURE__ */ J(Xe, [["render", nt], ["__scopeId", "data-v-a30fa265
583
583
  addResource: (r) => {
584
584
  e.value.add(r);
585
585
  },
586
- RESOURCE_TYPE: b,
587
- activedName: p,
586
+ RESOURCE_TYPE: V,
587
+ activedName: u,
588
588
  openBridgePanel: () => {
589
589
  Qe();
590
590
  },
591
- closePanel: O,
591
+ closePanel: F,
592
592
  refreshList: (r) => {
593
593
  e.value.refresh(r);
594
594
  },
@@ -597,13 +597,13 @@ const ot = /* @__PURE__ */ J(Xe, [["render", nt], ["__scopeId", "data-v-a30fa265
597
597
  };
598
598
  }
599
599
  };
600
- function st(n, t, p, e, i, g) {
601
- const y = d("svg-button"), o = d("bridge-manage"), C = d("bridge-setting"), v = d("plugin-panel");
602
- return E(), R(v, {
600
+ function st(n, t, u, e, i, g) {
601
+ const y = p("svg-button"), o = p("bridge-manage"), R = p("bridge-setting"), v = p("plugin-panel");
602
+ return h(), C(v, {
603
603
  title: "资源管理",
604
604
  class: "plugin-bridge",
605
605
  "fixed-name": e.PLUGIN_NAME.Bridge,
606
- fixedPanels: p.fixedPanels,
606
+ fixedPanels: u.fixedPanels,
607
607
  onClose: e.closePanel
608
608
  }, {
609
609
  header: l(() => [
@@ -620,7 +620,7 @@ function st(n, t, p, e, i, g) {
620
620
  name: e.RESOURCE_TYPE.Util,
621
621
  onOpen: e.openBridgePanel
622
622
  }, null, 8, ["name", "onOpen"]),
623
- a(C, { onRefresh: e.refreshList }, null, 8, ["onRefresh"])
623
+ a(R, { onRefresh: e.refreshList }, null, 8, ["onRefresh"])
624
624
  ]),
625
625
  _: 1
626
626
  }, 8, ["fixed-name", "fixedPanels", "onClose"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-plugin-bridge",
3
- "version": "2.5.0-rc.2",
3
+ "version": "2.5.0-rc.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -25,11 +25,11 @@
25
25
  "license": "MIT",
26
26
  "homepage": "https://opentiny.design/tiny-engine",
27
27
  "dependencies": {
28
- "@opentiny/tiny-engine-common": "2.5.0-rc.2",
29
- "@opentiny/tiny-engine-meta-register": "2.5.0-rc.2"
28
+ "@opentiny/tiny-engine-common": "2.5.0-rc.4",
29
+ "@opentiny/tiny-engine-meta-register": "2.5.0-rc.4"
30
30
  },
31
31
  "devDependencies": {
32
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.5.0-rc.2",
32
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.5.0-rc.4",
33
33
  "@vitejs/plugin-vue": "^5.1.2",
34
34
  "@vitejs/plugin-vue-jsx": "^4.0.1",
35
35
  "vite": "^5.4.2"
@@ -39,5 +39,5 @@
39
39
  "@opentiny/vue-icon": "^3.20.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "684832b3ac6306b103bb698ed6d8567a29f65dd8"
42
+ "gitHead": "37ad17e95ed469c5b0b64d8246698d7c7e78393d"
43
43
  }