@opentiny/tiny-engine-plugin-bridge 2.0.0-alpha.5 → 2.0.0-rc.0

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/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import "./style.css";
2
- import { reactive as j, ref as b, watchEffect as X, resolveComponent as m, openBlock as h, createElementBlock as L, createElementVNode as _, createVNode as s, withCtx as l, Fragment as ee, renderList as te, normalizeClass as ne, withModifiers as W, toDisplayString as U, computed as E, watch as oe, onMounted as ae, createBlock as C, createTextVNode as B, withDirectives as se, vShow as re, createCommentVNode as T, nextTick as le } from "vue";
3
- import { SearchEmpty as ce, PluginSetting as ie, VueMonaco as de, SvgButton as Z, PluginPanel as pe } from "@opentiny/tiny-engine-common";
4
- import { useApp as x, useCanvas as $, useResource as k, useNotify as N, useModal as ue, getMergeMeta as me } from "@opentiny/tiny-engine-meta-register";
5
- import { isVsCodeEnv as ge } from "@opentiny/tiny-engine-common/js/environments";
6
- import { useHttp as fe } from "@opentiny/tiny-engine-http";
7
- import { generateBridge as ye, generateUtil as _e } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
8
- import { Search as ve, Form as he, Input as Re, Button as Ee, FormItem as Ce, Checkbox as Ve, RadioGroup as Se, Radio as be } from "@opentiny/vue";
9
- import { iconSearch as xe } from "@opentiny/vue-icon";
10
- const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${n}&category=${t}`), Ue = (n) => w.post("/app-center/api/apps/extension/create", n), ke = (n) => w.post("/app-center/api/apps/extension/update", n), Ne = (n) => w.get(`/app-center/api/apps/extension/delete?${n}`), Ie = (n) => {
2
+ import { reactive as j, ref as S, watchEffect as X, resolveComponent as m, openBlock as h, createElementBlock as A, createElementVNode as _, createVNode as s, withCtx as l, Fragment as ne, renderList as oe, normalizeClass as ae, withModifiers as W, toDisplayString as T, computed as R, watch as se, onMounted as re, createBlock as C, createTextVNode as B, withDirectives as le, vShow as ce, createCommentVNode as x, nextTick as ie } from "vue";
3
+ import { SearchEmpty as de, PluginSetting as pe, VueMonaco as ue, SvgButton as Z, PluginPanel as me } from "@opentiny/tiny-engine-common";
4
+ import { getMetaApi as $, META_SERVICE as ee, useCanvas as te, useResource as U, useNotify as k, useModal as ge, getMergeMeta as ye } from "@opentiny/tiny-engine-meta-register";
5
+ import { isVsCodeEnv as fe } from "@opentiny/tiny-engine-common/js/environments";
6
+ import { useHttp as _e } from "@opentiny/tiny-engine-http";
7
+ import { generateBridge as ve, generateUtil as he } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
8
+ import { Search as Ee, Form as Re, Input as Ce, Button as Ve, FormItem as be, Checkbox as Se, RadioGroup as xe, Radio as Te } from "@opentiny/vue";
9
+ import { iconSearch as Ue } from "@opentiny/vue-icon";
10
+ const w = _e(), ke = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${n}&category=${t}`), Ne = (n) => w.post("/app-center/api/apps/extension/create", n), Ie = (n) => w.post("/app-center/api/apps/extension/update", n), we = (n) => w.get(`/app-center/api/apps/extension/delete?${n}`), Oe = (n) => {
11
11
  w.get(`/app-center/api/apps/schema/${n}`).then((t) => {
12
- ye(t.bridge), _e(t.utils);
12
+ ve(t.bridge), he(t.utils);
13
13
  });
14
14
  }, i = j({
15
15
  actionType: "",
@@ -31,7 +31,7 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
31
31
  destructuring: !0,
32
32
  main: ""
33
33
  }
34
- }, we = {
34
+ }, Be = {
35
35
  name: "",
36
36
  type: "function",
37
37
  content: {
@@ -41,53 +41,53 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
41
41
  }, V = {
42
42
  Util: "utils",
43
43
  Bridge: "bridge"
44
- }, A = {
44
+ }, L = {
45
45
  Npm: "npm",
46
46
  Function: "function"
47
- }, Oe = {
47
+ }, Ae = {
48
48
  [V.Util]: "新建工具类",
49
49
  [V.Bridge]: "新建桥接源"
50
- }, I = {
50
+ }, N = {
51
51
  Read: "read",
52
52
  Edit: "edit"
53
- }, Be = (n) => i.resourceNames[n], Le = (n, t) => {
53
+ }, I = () => $(ee.GlobalService).getState().appInfo.id, Le = (n) => i.resourceNames[n], Fe = (n, t) => {
54
54
  i.resourceNames[n] = t;
55
- }, Ae = (n) => {
56
- const t = x().appInfoState.selectedId;
57
- return Te(t, n);
58
- }, G = () => i.actionType, D = (n) => {
55
+ }, Pe = (n) => {
56
+ const t = I();
57
+ return ke(t, n);
58
+ }, q = () => i.actionType, D = (n) => {
59
59
  i.actionType = n;
60
- }, Fe = () => i.resource, M = (n = K) => {
61
- n || (n = i.category === A.Function ? we : K), i.resource = n;
60
+ }, De = () => i.resource, M = (n = K) => {
61
+ n || (n = i.category === L.Function ? Be : K), i.resource = n;
62
62
  }, F = () => i.type, Q = (n) => {
63
63
  i.type = n;
64
64
  }, Y = (n) => {
65
65
  i.category = n;
66
- }, q = () => i.category, z = (...n) => {
67
- ge && Ie(...n);
68
- }, Pe = (n, t, u) => {
69
- const { updateUtils: e } = $().canvasApi.value;
70
- G() === I.Edit ? (n.id = i.resource.id, ke(n).then((o) => {
66
+ }, G = () => i.category, z = (...n) => {
67
+ fe && Oe(...n);
68
+ }, Me = (n, t, u) => {
69
+ const { updateUtils: e } = te().canvasApi.value;
70
+ q() === N.Edit ? (n.id = i.resource.id, Ie(n).then((o) => {
71
71
  if (o) {
72
- const f = k().resState[n.category].findIndex((c) => c.name === o.name);
73
- k().resState[n.category][f] = o, e([o]), z(x().appInfoState.selectedId), N({
72
+ const y = U().resState[n.category].findIndex((c) => c.name === o.name);
73
+ U().resState[n.category][y] = o, e([o]), z(I()), k({
74
74
  type: "success",
75
75
  message: "修改成功"
76
76
  }), u("refresh", i.type), i.refresh = !0, t();
77
77
  }
78
- })) : Ue(n).then((o) => {
79
- o && (k().resState[n.category].push(o), e([o]), z(x().appInfoState.selectedId), N({
78
+ })) : Ne(n).then((o) => {
79
+ o && (U().resState[n.category].push(o), e([o]), z(I()), k({
80
80
  type: "success",
81
81
  message: "创建成功"
82
82
  }), u("refresh", i.type), i.refresh = !0, t());
83
83
  });
84
- }, De = (n, t, u) => {
85
- var f;
86
- const e = `app=${x().appInfoState.selectedId}&id=${(f = i.resource) == null ? void 0 : f.id}`, { deleteUtils: o } = $().canvasApi.value;
87
- Ne(e).then((c) => {
84
+ }, Ge = (n, t, u) => {
85
+ var y;
86
+ const e = `app=${I()}&id=${(y = i.resource) == null ? void 0 : y.id}`, { deleteUtils: o } = te().canvasApi.value;
87
+ we(e).then((c) => {
88
88
  if (c) {
89
- const y = k().resState[i.type].findIndex((v) => v.name === c.name);
90
- k().resState[i.type].splice(y, 1), o([c]), z(x().appInfoState.selectedId), N({
89
+ const f = U().resState[i.type].findIndex((v) => v.name === c.name);
90
+ U().resState[i.type].splice(f, 1), o([c]), z(I()), k({
91
91
  type: "success",
92
92
  message: "删除成功"
93
93
  }), u("refresh", i.type), i.refresh = !0, t();
@@ -98,11 +98,11 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
98
98
  for (const [e, o] of t)
99
99
  u[e] = o;
100
100
  return u;
101
- }, Me = {
101
+ }, qe = {
102
102
  components: {
103
- TinySearch: ve,
104
- TinyIconSearch: xe(),
105
- SearchEmpty: ce
103
+ TinySearch: Ee,
104
+ TinyIconSearch: Ue(),
105
+ SearchEmpty: de
106
106
  },
107
107
  props: {
108
108
  name: {
@@ -112,18 +112,18 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
112
112
  },
113
113
  emits: ["open"],
114
114
  setup(n, { emit: t }) {
115
- const u = b([]), e = j({
115
+ const u = S([]), e = j({
116
116
  resourceList: [],
117
117
  activeIndex: -1,
118
118
  searchValue: ""
119
- }), o = (a = e.resourceList, d = e.searchValue) => a.filter((r) => r.name.toLowerCase().indexOf(d.toLowerCase()) > -1), f = async (a) => {
120
- e.resourceList = await Ae(a), Le(
119
+ }), o = (a = e.resourceList, d = e.searchValue) => a.filter((r) => r.name.toLowerCase().indexOf(d.toLowerCase()) > -1), y = async (a) => {
120
+ e.resourceList = await Pe(a), Fe(
121
121
  a,
122
122
  Array.isArray(e.resourceList) ? e.resourceList.map((d) => d.name) : []
123
123
  ), u.value = o(e.resourceList);
124
124
  };
125
125
  return X(async () => {
126
- f(n.name);
126
+ y(n.name);
127
127
  }), {
128
128
  state: e,
129
129
  list: u,
@@ -131,12 +131,12 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
131
131
  D(""), Q(n.name), M(""), Y(a), t("open");
132
132
  },
133
133
  openRead: (a, d) => {
134
- e.activeIndex = d, M(a), D(I.Edit), t("open");
134
+ e.activeIndex = d, M(a), D(N.Edit), t("open");
135
135
  },
136
136
  openEdit: (a, d) => {
137
- e.activeIndex = d, M(a), D(I.Edit), Q(n.name), Y(a.type), t("open");
137
+ e.activeIndex = d, M(a), D(N.Edit), Q(n.name), Y(a.type), t("open");
138
138
  },
139
- refresh: f,
139
+ refresh: y,
140
140
  getType: F,
141
141
  RESOURCE_TYPE: V,
142
142
  searchBridgeData: (a) => {
@@ -144,12 +144,12 @@ const w = fe(), Te = (n, t) => w.get(`/app-center/api/apps/extension/list?app=${
144
144
  }
145
145
  };
146
146
  }
147
- }, qe = { class: "manage-panel" }, Ge = { class: "manage-panel-search" }, Ye = { class: "list" }, ze = ["onClick"], je = { class: "item-label" };
148
- function He(n, t, u, e, o, f) {
149
- const c = m("tiny-icon-search"), y = m("tiny-search"), v = m("svg-icon"), R = m("search-empty");
150
- return h(), L("div", qe, [
151
- _("div", Ge, [
152
- s(y, {
147
+ }, Ye = { class: "manage-panel" }, ze = { class: "manage-panel-search" }, je = { class: "list" }, He = ["onClick"], Je = { class: "item-label" };
148
+ function We(n, t, u, e, o, y) {
149
+ const c = m("tiny-icon-search"), f = m("tiny-search"), v = m("svg-icon"), E = m("search-empty");
150
+ return h(), A("div", Ye, [
151
+ _("div", ze, [
152
+ s(f, {
153
153
  modelValue: e.state.searchValue,
154
154
  "onUpdate:modelValue": [
155
155
  t[0] || (t[0] = (a) => e.state.searchValue = a),
@@ -164,41 +164,41 @@ function He(n, t, u, e, o, f) {
164
164
  _: 1
165
165
  }, 8, ["modelValue", "onUpdate:modelValue"])
166
166
  ]),
167
- _("div", Ye, [
168
- (h(!0), L(ee, null, te(e.list, (a, d) => (h(), L("div", {
167
+ _("div", je, [
168
+ (h(!0), A(ne, null, oe(e.list, (a, d) => (h(), A("div", {
169
169
  key: a.name,
170
- class: ne(["list-item", d === e.state.activeIndex ? "active" : ""]),
170
+ class: ae(["list-item", d === e.state.activeIndex ? "active" : ""]),
171
171
  onClick: W((r) => e.openEdit(a, d), ["stop"])
172
172
  }, [
173
173
  s(v, { name: "plugin-icon-sresources" }),
174
- _("div", je, U(a.name), 1),
174
+ _("div", Je, T(a.name), 1),
175
175
  s(v, {
176
176
  class: "setting-icon",
177
177
  name: "setting",
178
178
  onClick: W((r) => e.openEdit(a, d), ["stop"])
179
179
  }, null, 8, ["onClick"])
180
- ], 10, ze))), 128)),
181
- s(R, {
180
+ ], 10, He))), 128)),
181
+ s(E, {
182
182
  isShow: !e.list.length
183
183
  }, null, 8, ["isShow"])
184
184
  ])
185
185
  ]);
186
186
  }
187
- const Je = /* @__PURE__ */ H(Me, [["render", He], ["__scopeId", "data-v-f297beff"]]), J = b(!1), We = () => {
188
- J.value = !0, le(() => window.dispatchEvent(new Event("resize")));
187
+ const Ke = /* @__PURE__ */ H(qe, [["render", We], ["__scopeId", "data-v-f297beff"]]), J = S(!1), Qe = () => {
188
+ J.value = !0, ie(() => window.dispatchEvent(new Event("resize")));
189
189
  }, P = () => {
190
190
  J.value = !1;
191
- }, Ke = {
191
+ }, Xe = {
192
192
  components: {
193
- TinyForm: he,
194
- TinyInput: Re,
195
- TinyButton: Ee,
196
- TinyFormItem: Ce,
197
- TinyCheckbox: Ve,
198
- PluginSetting: ie,
199
- MonacoEditor: de,
200
- TinyRadioGroup: Se,
201
- TinyRadio: be,
193
+ TinyForm: Re,
194
+ TinyInput: Ce,
195
+ TinyButton: Ve,
196
+ TinyFormItem: be,
197
+ TinyCheckbox: Se,
198
+ PluginSetting: pe,
199
+ MonacoEditor: ue,
200
+ TinyRadioGroup: xe,
201
+ TinyRadio: Te,
202
202
  SvgButton: Z
203
203
  },
204
204
  setup(n, { emit: t }) {
@@ -209,49 +209,49 @@ const Je = /* @__PURE__ */ H(Me, [["render", He], ["__scopeId", "data-v-f297beff
209
209
  // 禁用滚动条边边一直显示的边框
210
210
  overviewRulerBorder: !1,
211
211
  renderLineHighlightOnlyWhenFocus: !0
212
- }, { confirm: e } = ue(), o = j({
213
- resource: E(() => Fe()),
212
+ }, { confirm: e } = ge(), o = j({
213
+ resource: R(() => De()),
214
214
  name: "",
215
215
  value: "",
216
216
  content: {},
217
- status: E(() => G() === I.Edit),
218
- category: E(() => q() === A.Npm),
219
- mode: E(() => {
217
+ status: R(() => q() === N.Edit),
218
+ category: R(() => G() === L.Npm),
219
+ mode: R(() => {
220
220
  var r;
221
- return ((r = me("engine.config")) == null ? void 0 : r.dslMode) !== "Vue";
221
+ return ((r = ye("engine.config")) == null ? void 0 : r.dslMode) !== "Vue";
222
222
  }),
223
223
  isInstance: !1,
224
- title: E(() => {
225
- const r = G() === I.Edit ? "编辑" : "添加", g = F() === V.Bridge ? "桥接源" : "工具类";
224
+ title: R(() => {
225
+ const r = q() === N.Edit ? "编辑" : "添加", g = F() === V.Bridge ? "桥接源" : "工具类";
226
226
  return r + g;
227
227
  }),
228
- type: A.Npm
229
- }), f = E(() => {
228
+ type: L.Npm
229
+ }), y = R(() => {
230
230
  const r = o.name || "name";
231
231
  let g = r;
232
232
  o.content.destructuring && (o.name && o.name === o.content.exportName ? g = `{ ${o.content.exportName || "exportName"} }` : g = `{ ${o.content.exportName || "exportName"} as ${r} }`);
233
- const S = `${o.content.package || "package"}${o.content.main || ""}`;
234
- return `import ${g} from '${S}'
233
+ const b = `${o.content.package || "package"}${o.content.main || ""}`;
234
+ return `import ${g} from '${b}'
235
235
  export { ${r} }`;
236
236
  });
237
237
  X(() => {
238
238
  var r, g;
239
- o.name = o.resource.name, o.content = o.resource.content || {}, o.value = ((g = (r = o.resource) == null ? void 0 : r.content) == null ? void 0 : g.value) || "", o.type = q();
240
- }), oe(
239
+ o.name = o.resource.name, o.content = o.resource.content || {}, o.value = ((g = (r = o.resource) == null ? void 0 : r.content) == null ? void 0 : g.value) || "", o.type = G();
240
+ }), se(
241
241
  () => o.isInstance,
242
242
  (r) => {
243
243
  r || (o.content.instance = "");
244
244
  }
245
245
  );
246
- const c = b(null), y = b(null);
247
- return ae(() => window.dispatchEvent(new Event("resize"))), {
246
+ const c = S(null), f = S(null);
247
+ return re(() => window.dispatchEvent(new Event("resize"))), {
248
248
  rules: {
249
249
  name: [
250
250
  { required: !0, message: "必填", trigger: "change" },
251
251
  {
252
- validator: (r, g, S) => {
253
- const O = Be(F());
254
- Array.isArray(O) && O.includes(g) ? S(new Error("资源名称已存在")) : S();
252
+ validator: (r, g, b) => {
253
+ const O = Le(F());
254
+ Array.isArray(O) && O.includes(g) ? b(new Error("资源名称已存在")) : b();
255
255
  },
256
256
  trigger: "change"
257
257
  }
@@ -260,39 +260,39 @@ export { ${r} }`;
260
260
  "content.exportName": [{ required: !0, message: "必填", trigger: "change" }],
261
261
  "content.instanceName": { required: !0, message: "必填", trigger: "change" }
262
262
  },
263
- resourceForm: y,
263
+ resourceForm: f,
264
264
  editor: c,
265
265
  state: o,
266
- codePreview: f,
266
+ codePreview: y,
267
267
  isOpen: J,
268
268
  closePanel: P,
269
269
  save: () => {
270
270
  const r = {
271
271
  category: F(),
272
- type: q(),
272
+ type: G(),
273
273
  name: o.name,
274
- app: x().appInfoState.selectedId,
274
+ app: $(ee.GlobalService).getState().appInfo.id,
275
275
  content: o.category ? o.content : {
276
276
  type: "JSFunction",
277
277
  value: c.value.getEditor().getValue()
278
278
  }
279
279
  };
280
- y.value.validate((g) => {
280
+ f.value.validate((g) => {
281
281
  if (!g) {
282
- N({
282
+ k({
283
283
  type: "error",
284
284
  message: "请检查必填项"
285
285
  });
286
286
  return;
287
287
  }
288
288
  if (!o.category && !c.value.getEditor().getValue()) {
289
- N({
289
+ k({
290
290
  type: "error",
291
291
  message: "function 内容必填"
292
292
  });
293
293
  return;
294
294
  }
295
- Pe(r, P, t);
295
+ Me(r, P, t);
296
296
  });
297
297
  },
298
298
  deleteReSource: () => {
@@ -300,7 +300,7 @@ export { ${r} }`;
300
300
  title: "删除资源",
301
301
  message: "如果删除正在使用的资源,将无法正常预览页面,确认要删除吗?",
302
302
  exec: () => {
303
- De(o.name, P, t);
303
+ Ge(o.name, P, t);
304
304
  }
305
305
  });
306
306
  },
@@ -308,20 +308,20 @@ export { ${r} }`;
308
308
  handleChangeType: (r) => {
309
309
  Y(r);
310
310
  },
311
- RESOURCE_CATEGORY: A
311
+ RESOURCE_CATEGORY: L
312
312
  };
313
313
  }
314
- }, Qe = { class: "title-wrap" }, Xe = { class: "header-wrap" }, Ze = { class: "right-item" }, $e = { key: 2 }, et = { class: "code-preview" };
315
- function tt(n, t, u, e, o, f) {
316
- const c = m("tiny-button"), y = m("svg-button"), v = m("tiny-radio"), R = m("tiny-radio-group"), a = m("tiny-form-item"), d = m("tiny-input"), r = m("tiny-checkbox"), g = m("monaco-editor"), S = m("tiny-form"), O = m("plugin-setting");
314
+ }, Ze = { class: "title-wrap" }, $e = { class: "header-wrap" }, et = { class: "right-item" }, tt = { key: 2 }, nt = { class: "code-preview" };
315
+ function ot(n, t, u, e, o, y) {
316
+ const c = m("tiny-button"), f = m("svg-button"), v = m("tiny-radio"), E = m("tiny-radio-group"), a = m("tiny-form-item"), d = m("tiny-input"), r = m("tiny-checkbox"), g = m("monaco-editor"), b = m("tiny-form"), O = m("plugin-setting");
317
317
  return e.isOpen ? (h(), C(O, { key: 0 }, {
318
318
  title: l(() => [
319
- _("div", Qe, [
320
- _("span", null, U(e.state.title), 1)
319
+ _("div", Ze, [
320
+ _("span", null, T(e.state.title), 1)
321
321
  ])
322
322
  ]),
323
323
  header: l(() => [
324
- _("div", Xe, [
324
+ _("div", $e, [
325
325
  s(c, {
326
326
  class: "save-btn",
327
327
  type: "primary",
@@ -332,14 +332,14 @@ function tt(n, t, u, e, o, f) {
332
332
  ])),
333
333
  _: 1
334
334
  }, 8, ["onClick"]),
335
- se(s(y, {
335
+ le(s(f, {
336
336
  class: "delete-btn",
337
337
  name: "delete",
338
338
  onClick: e.deleteReSource
339
339
  }, null, 8, ["onClick"]), [
340
- [re, e.state.status]
340
+ [ce, e.state.status]
341
341
  ]),
342
- s(y, {
342
+ s(f, {
343
343
  class: "close-btn",
344
344
  name: "close",
345
345
  onClick: e.closePanel
@@ -347,7 +347,7 @@ function tt(n, t, u, e, o, f) {
347
347
  ])
348
348
  ]),
349
349
  content: l(() => [
350
- s(S, {
350
+ s(b, {
351
351
  ref: "resourceForm",
352
352
  class: "resource-form",
353
353
  rules: e.rules,
@@ -358,14 +358,14 @@ function tt(n, t, u, e, o, f) {
358
358
  "label-align": !0
359
359
  }, {
360
360
  default: l(() => [
361
- _("div", Ze, [
362
- e.state.status ? T("", !0) : (h(), C(a, {
361
+ _("div", et, [
362
+ e.state.status ? x("", !0) : (h(), C(a, {
363
363
  key: 0,
364
364
  label: "工具类型",
365
365
  prop: "type"
366
366
  }, {
367
367
  default: l(() => [
368
- s(R, {
368
+ s(E, {
369
369
  modelValue: e.state.type,
370
370
  "onUpdate:modelValue": t[0] || (t[0] = (p) => e.state.type = p),
371
371
  class: "resource-type-radio-group",
@@ -376,7 +376,7 @@ function tt(n, t, u, e, o, f) {
376
376
  label: e.RESOURCE_CATEGORY.Npm
377
377
  }, {
378
378
  default: l(() => [
379
- B(U(e.RESOURCE_CATEGORY.Npm), 1)
379
+ B(T(e.RESOURCE_CATEGORY.Npm), 1)
380
380
  ]),
381
381
  _: 1
382
382
  }, 8, ["label"]),
@@ -384,7 +384,7 @@ function tt(n, t, u, e, o, f) {
384
384
  label: e.RESOURCE_CATEGORY.Function
385
385
  }, {
386
386
  default: l(() => [
387
- B(U(e.RESOURCE_CATEGORY.Function), 1)
387
+ B(T(e.RESOURCE_CATEGORY.Function), 1)
388
388
  ]),
389
389
  _: 1
390
390
  }, 8, ["label"])
@@ -394,7 +394,7 @@ function tt(n, t, u, e, o, f) {
394
394
  ]),
395
395
  _: 1
396
396
  })),
397
- e.state.status ? T("", !0) : (h(), C(a, {
397
+ e.state.status ? x("", !0) : (h(), C(a, {
398
398
  key: 1,
399
399
  label: "工具名称",
400
400
  prop: "name"
@@ -408,7 +408,7 @@ function tt(n, t, u, e, o, f) {
408
408
  ]),
409
409
  _: 1
410
410
  })),
411
- e.state.category ? (h(), L("div", $e, [
411
+ e.state.category ? (h(), A("div", tt, [
412
412
  s(a, {
413
413
  label: "npm包名",
414
414
  prop: "content.package"
@@ -460,7 +460,7 @@ function tt(n, t, u, e, o, f) {
460
460
  }, null, 8, ["modelValue"])
461
461
  ]),
462
462
  _: 1
463
- })) : T("", !0),
463
+ })) : x("", !0),
464
464
  e.state.isInstance ? (h(), C(a, {
465
465
  key: 1,
466
466
  label: "实例名称",
@@ -473,7 +473,7 @@ function tt(n, t, u, e, o, f) {
473
473
  }, null, 8, ["modelValue"])
474
474
  ]),
475
475
  _: 1
476
- })) : T("", !0),
476
+ })) : x("", !0),
477
477
  s(a, { label: "入口路径" }, {
478
478
  default: l(() => [
479
479
  s(d, {
@@ -512,8 +512,8 @@ function tt(n, t, u, e, o, f) {
512
512
  }),
513
513
  s(a, { label: "生成utils.js代码预览" }, {
514
514
  default: l(() => [
515
- _("div", et, [
516
- _("pre", null, U(e.codePreview), 1)
515
+ _("div", nt, [
516
+ _("pre", null, T(e.codePreview), 1)
517
517
  ])
518
518
  ]),
519
519
  _: 1
@@ -531,17 +531,17 @@ function tt(n, t, u, e, o, f) {
531
531
  }, 8, ["rules", "model"])
532
532
  ]),
533
533
  _: 1
534
- })) : T("", !0);
534
+ })) : x("", !0);
535
535
  }
536
- const nt = /* @__PURE__ */ H(Ke, [["render", tt], ["__scopeId", "data-v-0d684f9e"]]), ot = {
536
+ const at = /* @__PURE__ */ H(Xe, [["render", ot], ["__scopeId", "data-v-6ca97625"]]), st = {
537
537
  components: {
538
- PluginPanel: pe,
538
+ PluginPanel: me,
539
539
  SvgButton: Z,
540
- BridgeManage: Je,
541
- BridgeSetting: nt
540
+ BridgeManage: Ke,
541
+ BridgeSetting: at
542
542
  },
543
543
  setup() {
544
- const n = b(V.Util), t = b(null), u = E(() => Oe[n.value]);
544
+ const n = S(V.Util), t = S(null), u = R(() => Ae[n.value]);
545
545
  return {
546
546
  addResource: (c) => {
547
547
  n.value == t.value.add(c);
@@ -549,7 +549,7 @@ const nt = /* @__PURE__ */ H(Ke, [["render", tt], ["__scopeId", "data-v-0d684f9e
549
549
  RESOURCE_TYPE: V,
550
550
  activedName: n,
551
551
  openBridgePanel: () => {
552
- We();
552
+ Qe();
553
553
  },
554
554
  closePanel: P,
555
555
  refreshList: (c) => {
@@ -560,9 +560,9 @@ const nt = /* @__PURE__ */ H(Ke, [["render", tt], ["__scopeId", "data-v-0d684f9e
560
560
  };
561
561
  }
562
562
  };
563
- function at(n, t, u, e, o, f) {
564
- const c = m("svg-button"), y = m("bridge-manage"), v = m("bridge-setting"), R = m("plugin-panel");
565
- return h(), C(R, {
563
+ function rt(n, t, u, e, o, y) {
564
+ const c = m("svg-button"), f = m("bridge-manage"), v = m("bridge-setting"), E = m("plugin-panel");
565
+ return h(), C(E, {
566
566
  title: "资源管理",
567
567
  isCloseLeft: !1,
568
568
  onClose: e.closePanel
@@ -576,7 +576,7 @@ function at(n, t, u, e, o, f) {
576
576
  }, null, 8, ["tips"])
577
577
  ]),
578
578
  content: l(() => [
579
- s(y, {
579
+ s(f, {
580
580
  ref: "utilsRef",
581
581
  name: e.RESOURCE_TYPE.Util,
582
582
  onOpen: e.openBridgePanel
@@ -586,16 +586,16 @@ function at(n, t, u, e, o, f) {
586
586
  _: 1
587
587
  }, 8, ["onClose"]);
588
588
  }
589
- const st = /* @__PURE__ */ H(ot, [["render", at], ["__scopeId", "data-v-c14cfd0a"]]), rt = {
589
+ const lt = /* @__PURE__ */ H(st, [["render", rt], ["__scopeId", "data-v-c14cfd0a"]]), ct = {
590
590
  id: "engine.plugins.bridge",
591
591
  title: "资源管理",
592
592
  type: "plugins",
593
593
  align: "top",
594
594
  icon: "plugin-icon-sresources"
595
- }, yt = {
596
- ...rt,
597
- entry: st
595
+ }, vt = {
596
+ ...ct,
597
+ entry: lt
598
598
  };
599
599
  export {
600
- yt as default
600
+ vt as default
601
601
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .manage-panel[data-v-f297beff]{height:100%;display:flex;flex-direction:column;position:relative}.manage-panel .manage-panel-search[data-v-f297beff]{padding:0 12px 12px}.manage-panel .add-button[data-v-f297beff]{align-self:flex-end;margin:6px}.manage-panel .list[data-v-f297beff]{flex:1;border-top:1px solid var(--ti-lowcode-tabs-border-color);overflow:auto;padding:12px 0}.manage-panel .list-item[data-v-f297beff]{height:24px;line-height:24px;display:grid;grid-template-columns:16px 1fr auto;column-gap:8px;align-items:center;padding:0 12px;position:relative;color:var(--ti-lowcode-bridge-list-color);cursor:pointer;font-size:12px}.manage-panel .list-item[data-v-f297beff]:hover,.manage-panel .list-item.active[data-v-f297beff]{background:var(--ti-lowcode-bridge-list-bg)}.manage-panel .list-item:hover .setting-icon[data-v-f297beff],.manage-panel .list-item.active .setting-icon[data-v-f297beff]{display:block}.manage-panel .list-item .setting-icon[data-v-f297beff]{display:none;color:var(--ti-lowcode-toolbar-more-hover-color)}.plugin-setting[data-v-0d684f9e] .icon-wrap{margin-right:8px}.plugin-setting .resource-form .tip[data-v-0d684f9e]{font-size:11px;line-height:18px;margin-top:8px;color:var(--ti-lowcode-datasource-tip-color)}.plugin-setting .resource-form[data-v-0d684f9e] .tiny-form-item__label .cdn-tips-icon{margin-left:4px}.plugin-setting .title-wrap[data-v-0d684f9e]{font-size:12px;font-weight:700;color:var(--ti-lowcode-data-source-color)}.plugin-setting .title-wrap .help-link[data-v-0d684f9e]{display:inline-block;color:var(--ti-lowcode-common-primary-color);font-size:12px;margin-left:16px}.plugin-setting .title-wrap .help-link[data-v-0d684f9e]:hover{text-decoration:underline}.plugin-setting .header-wrap[data-v-0d684f9e]{display:flex;align-items:center;column-gap:6px}.plugin-setting .header-wrap .tiny-button[data-v-0d684f9e]{width:40px;padding:0;min-width:40px;margin-right:2px}.plugin-setting .monaco-editor[data-v-0d684f9e]{height:500px;margin-top:8px;border:1px solid var(--ti-lowcode-birdge-editor-border-color)}.plugin-setting .resource-form-footer[data-v-0d684f9e]{padding:12px 0 12px 80px}.plugin-setting .resource-form-footer .tiny-svg[data-v-0d684f9e]{margin-right:6px}.plugin-setting .resource-form-footer .del[data-v-0d684f9e]:hover{background-color:var(--ti-lowcode-delete-button-hover-bg)}.plugin-setting .cdn-label-wrap[data-v-0d684f9e]{display:flex;align-items:center}.code-preview[data-v-0d684f9e]{font-size:14px;line-height:20px;color:var(--ti-lowcode-birdge-code-preview-color);background-color:var(--ti-lowcode-birdge-code-preview-bg-color);border-radius:6px}.code-preview .pre-title[data-v-0d684f9e]{font-family:Microsoft YaHei}.code-preview>pre[data-v-0d684f9e]{margin:0;padding:8px 20px;font-family:Consolas,Courier New,monospace}[data-v-c14cfd0a] .tiny-button{border-radius:4px;height:24px;line-height:24px}
1
+ .manage-panel[data-v-f297beff]{height:100%;display:flex;flex-direction:column;position:relative}.manage-panel .manage-panel-search[data-v-f297beff]{padding:0 12px 12px}.manage-panel .add-button[data-v-f297beff]{align-self:flex-end;margin:6px}.manage-panel .list[data-v-f297beff]{flex:1;border-top:1px solid var(--ti-lowcode-tabs-border-color);overflow:auto;padding:12px 0}.manage-panel .list-item[data-v-f297beff]{height:24px;line-height:24px;display:grid;grid-template-columns:16px 1fr auto;column-gap:8px;align-items:center;padding:0 12px;position:relative;color:var(--ti-lowcode-bridge-list-color);cursor:pointer;font-size:12px}.manage-panel .list-item[data-v-f297beff]:hover,.manage-panel .list-item.active[data-v-f297beff]{background:var(--ti-lowcode-bridge-list-bg)}.manage-panel .list-item:hover .setting-icon[data-v-f297beff],.manage-panel .list-item.active .setting-icon[data-v-f297beff]{display:block}.manage-panel .list-item .setting-icon[data-v-f297beff]{display:none;color:var(--ti-lowcode-toolbar-more-hover-color)}.plugin-setting[data-v-6ca97625] .icon-wrap{margin-right:8px}.plugin-setting .resource-form .tip[data-v-6ca97625]{font-size:11px;line-height:18px;margin-top:8px;color:var(--ti-lowcode-datasource-tip-color)}.plugin-setting .resource-form[data-v-6ca97625] .tiny-form-item__label .cdn-tips-icon{margin-left:4px}.plugin-setting .title-wrap[data-v-6ca97625]{font-size:12px;font-weight:700;color:var(--ti-lowcode-data-source-color)}.plugin-setting .title-wrap .help-link[data-v-6ca97625]{display:inline-block;color:var(--ti-lowcode-common-primary-color);font-size:12px;margin-left:16px}.plugin-setting .title-wrap .help-link[data-v-6ca97625]:hover{text-decoration:underline}.plugin-setting .header-wrap[data-v-6ca97625]{display:flex;align-items:center;column-gap:6px}.plugin-setting .header-wrap .tiny-button[data-v-6ca97625]{width:40px;padding:0;min-width:40px;margin-right:2px}.plugin-setting .monaco-editor[data-v-6ca97625]{height:500px;margin-top:8px;border:1px solid var(--ti-lowcode-birdge-editor-border-color)}.plugin-setting .resource-form-footer[data-v-6ca97625]{padding:12px 0 12px 80px}.plugin-setting .resource-form-footer .tiny-svg[data-v-6ca97625]{margin-right:6px}.plugin-setting .resource-form-footer .del[data-v-6ca97625]:hover{background-color:var(--ti-lowcode-delete-button-hover-bg)}.plugin-setting .cdn-label-wrap[data-v-6ca97625]{display:flex;align-items:center}.code-preview[data-v-6ca97625]{font-size:14px;line-height:20px;color:var(--ti-lowcode-birdge-code-preview-color);background-color:var(--ti-lowcode-birdge-code-preview-bg-color);border-radius:6px}.code-preview .pre-title[data-v-6ca97625]{font-family:Microsoft YaHei}.code-preview>pre[data-v-6ca97625]{margin:0;padding:8px 20px;font-family:Consolas,Courier New,monospace}[data-v-c14cfd0a] .tiny-button{border-radius:4px;height:24px;line-height:24px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-plugin-bridge",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-rc.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -25,12 +25,12 @@
25
25
  "license": "MIT",
26
26
  "homepage": "https://opentiny.design/tiny-engine",
27
27
  "dependencies": {
28
- "@opentiny/tiny-engine-common": "2.0.0-alpha.5",
29
- "@opentiny/tiny-engine-http": "2.0.0-alpha.5",
30
- "@opentiny/tiny-engine-meta-register": "2.0.0-alpha.5"
28
+ "@opentiny/tiny-engine-common": "2.0.0-rc.0",
29
+ "@opentiny/tiny-engine-http": "2.0.0-rc.0",
30
+ "@opentiny/tiny-engine-meta-register": "2.0.0-rc.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.5",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-rc.0",
34
34
  "@vitejs/plugin-vue": "^5.1.2",
35
35
  "@vitejs/plugin-vue-jsx": "^4.0.1",
36
36
  "vite": "^5.4.2"
@@ -40,5 +40,5 @@
40
40
  "@opentiny/vue-icon": "^3.14.0",
41
41
  "vue": "^3.4.15"
42
42
  },
43
- "gitHead": "add50e9750903d33ca0748a96c01b7f325ff8e5e"
43
+ "gitHead": "d158fcd9aa5bbc2aaa7adf40b26a0ed8dcef80f3"
44
44
  }