@opentiny/tiny-engine-plugin-bridge 1.0.1 → 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 - present TinyEngine Authors.
4
+ Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import "./style.css";
2
- import { reactive as z, ref as C, watchEffect as Q, resolveComponent as l, openBlock as v, createElementBlock as U, createElementVNode as h, createVNode as o, Fragment as se, renderList as re, normalizeClass as ce, withModifiers as j, toDisplayString as B, createCommentVNode as b, pushScopeId as X, popScopeId as Z, computed as V, watch as le, onMounted as ie, createBlock as R, withCtx as c, withDirectives as de, vShow as pe, createTextVNode as F, nextTick as ue } from "vue";
3
- import { Search as me, Form as _e, Input as ge, Button as ye, FormItem as fe, Checkbox as ve, Switch as he, Tooltip as Ee, RadioGroup as Re, Radio as be, Tabs as Ce, TabItem as Te } from "@opentiny/vue";
4
- import { PluginSetting as Ve, VueMonaco as Se, SvgButton as $, PluginPanel as Ue } from "@opentiny/tiny-engine-common";
5
- import { isVsCodeEnv as ee } from "@opentiny/tiny-engine-common/js/environments";
6
- import { useApp as T, useResource as k, useNotify as I, useModal as ke, getGlobalConfig as Ie } from "@opentiny/tiny-engine-controller";
7
- import { setUtils as xe } from "@opentiny/tiny-engine-canvas";
8
- import { useHttp as we } from "@opentiny/tiny-engine-http";
9
- import { generateBridge as Ne, generateUtil as Oe } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
10
- import { iconUnknow as Be } from "@opentiny/vue-icon";
11
- import { theme as Le } from "@opentiny/tiny-engine-controller/adapter";
12
- const w = we(), Pe = (t, n) => w.get(`/app-center/api/apps/extension/list?app=${t}&category=${n}`), Fe = (t) => w.post("/app-center/api/apps/extension/create", t), Ae = (t) => w.post("/app-center/api/apps/extension/update", t), Ye = (t) => w.get(`/app-center/api/apps/extension/delete?${t}`), De = (t) => {
13
- w.get(`/app-center/api/apps/schema/${t}`).then((n) => {
14
- Ne(n.bridge), Oe(n.utils);
2
+ import { reactive as H, ref as V, watchEffect as $, resolveComponent as l, openBlock as h, createElementBlock as x, createElementVNode as v, createVNode as s, Fragment as ce, renderList as le, normalizeClass as ie, withModifiers as K, toDisplayString as w, createCommentVNode as T, pushScopeId as ee, popScopeId as te, computed as C, watch as de, onMounted as pe, createBlock as R, withCtx as r, withDirectives as ue, vShow as me, createTextVNode as k, nextTick as _e } from "vue";
3
+ import { Search as ge, Form as ye, Input as fe, Button as ve, FormItem as he, Checkbox as be, Switch as Ee, Tooltip as Re, RadioGroup as Ce, Radio as Te, Tabs as Ve, TabItem as Se } from "@opentiny/vue";
4
+ import { PluginSetting as Ue, VueMonaco as ke, SvgButton as ne, PluginPanel as Ie, LinkButton as xe } from "@opentiny/tiny-engine-common";
5
+ import { useApp as S, useResource as N, useNotify as B, useModal as we, getGlobalConfig as Ne, useHelp as Be } from "@opentiny/tiny-engine-controller";
6
+ import { isVsCodeEnv as oe } from "@opentiny/tiny-engine-common/js/environments";
7
+ import { updateUtils as Q, deleteUtils as Oe } from "@opentiny/tiny-engine-canvas";
8
+ import { useHttp as Pe } from "@opentiny/tiny-engine-http";
9
+ import { generateBridge as Le, generateUtil as Fe } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
10
+ import { iconUnknow as Ae } from "@opentiny/vue-icon";
11
+ import { theme as De } from "@opentiny/tiny-engine-controller/adapter";
12
+ const P = Pe(), Ye = (t, n) => P.get(`/app-center/api/apps/extension/list?app=${t}&category=${n}`), Ge = (t) => P.post("/app-center/api/apps/extension/create", t), Me = (t) => P.post("/app-center/api/apps/extension/update", t), qe = (t) => P.get(`/app-center/api/apps/extension/delete?${t}`), ze = (t) => {
13
+ P.get(`/app-center/api/apps/schema/${t}`).then((n) => {
14
+ Le(n.bridge), Fe(n.utils);
15
15
  });
16
- }, i = z({
16
+ }, i = H({
17
17
  actionType: "",
18
18
  type: "",
19
19
  category: "",
@@ -21,8 +21,8 @@ const w = we(), Pe = (t, n) => w.get(`/app-center/api/apps/extension/list?app=${
21
21
  resources: [],
22
22
  resourceNames: {},
23
23
  refresh: !1,
24
- id: T().appInfoState.selectedId
25
- }), W = {
24
+ id: S().appInfoState.selectedId
25
+ }), X = {
26
26
  name: "",
27
27
  type: "npm",
28
28
  content: {
@@ -33,7 +33,7 @@ const w = we(), Pe = (t, n) => w.get(`/app-center/api/apps/extension/list?app=${
33
33
  destructuring: !0,
34
34
  main: ""
35
35
  }
36
- }, Ge = {
36
+ }, He = {
37
37
  name: "",
38
38
  type: "function",
39
39
  content: {
@@ -43,66 +43,66 @@ const w = we(), Pe = (t, n) => w.get(`/app-center/api/apps/extension/list?app=${
43
43
  }, E = {
44
44
  Util: "utils",
45
45
  Bridge: "bridge"
46
- }, L = {
46
+ }, F = {
47
47
  Npm: "npm",
48
48
  Function: "function"
49
- }, Me = {
49
+ }, je = {
50
50
  [E.Util]: "新建工具类",
51
51
  [E.Bridge]: "新建桥接源"
52
- }, x = {
52
+ }, O = {
53
53
  Read: "read",
54
54
  Edit: "edit"
55
- }, qe = (t) => i.resourceNames[t], ze = (t, n) => {
55
+ }, Je = (t) => i.resourceNames[t], We = (t, n) => {
56
56
  i.resourceNames[t] = n;
57
- }, He = (t) => {
58
- const n = T().appInfoState.selectedId;
59
- return Pe(n, t);
60
- }, D = () => i.actionType, A = (t) => {
57
+ }, Ke = (t) => {
58
+ const n = S().appInfoState.selectedId;
59
+ return Ye(n, t);
60
+ }, G = () => i.actionType, D = (t) => {
61
61
  i.actionType = t;
62
- }, Je = () => i.resource, Y = (t = W) => {
63
- t || (t = i.category === L.Function ? Ge : W), i.resource = t;
64
- }, P = () => i.type, G = (t) => {
62
+ }, Qe = () => i.resource, Y = (t = X) => {
63
+ t || (t = i.category === F.Function ? He : X), i.resource = t;
64
+ }, A = () => i.type, M = (t) => {
65
65
  i.type = t;
66
- }, M = (t) => {
66
+ }, q = (t) => {
67
67
  i.category = t;
68
- }, K = () => i.category, q = (...t) => {
69
- ee && De(...t);
70
- }, je = (t, n, d) => {
71
- D() === x.Edit ? (t.id = i.resource.id, Ae(t).then((e) => {
68
+ }, Z = () => i.category, z = (...t) => {
69
+ oe && ze(...t);
70
+ }, Xe = (t, n, d) => {
71
+ G() === O.Edit ? (t.id = i.resource.id, Me(t).then((e) => {
72
72
  if (e) {
73
- const r = k().resState[t.category].findIndex((m) => m.name === e.name);
74
- k().resState[t.category][r] = e, xe([e], !1, !0), q(T().appInfoState.selectedId), I({
73
+ const o = N().resState[t.category].findIndex((g) => g.name === e.name);
74
+ N().resState[t.category][o] = e, Q([e]), z(S().appInfoState.selectedId), B({
75
75
  type: "success",
76
76
  message: "修改成功"
77
77
  }), d("refresh", i.type), i.refresh = !0, n();
78
78
  }
79
- })) : Fe(t).then((e) => {
80
- e && (k().resState[t.category].push(e), q(T().appInfoState.selectedId), I({
79
+ })) : Ge(t).then((e) => {
80
+ e && (N().resState[t.category].push(e), Q([e]), z(S().appInfoState.selectedId), B({
81
81
  type: "success",
82
82
  message: "创建成功"
83
83
  }), d("refresh", i.type), i.refresh = !0, n());
84
84
  });
85
- }, We = (t, n, d) => {
86
- var r;
87
- const e = `app=${T().appInfoState.selectedId}&id=${(r = i.resource) == null ? void 0 : r.id}`;
88
- Ye(e).then((m) => {
89
- if (m) {
90
- const y = k().resState[i.type].findIndex((f) => f.name === m.name);
91
- k().resState[i.type].splice(y, 1), q(T().appInfoState.selectedId), I({
85
+ }, Ze = (t, n, d) => {
86
+ var o;
87
+ const e = `app=${S().appInfoState.selectedId}&id=${(o = i.resource) == null ? void 0 : o.id}`;
88
+ qe(e).then((g) => {
89
+ if (g) {
90
+ const y = N().resState[i.type].findIndex((f) => f.name === g.name);
91
+ N().resState[i.type].splice(y, 1), Oe([g]), z(S().appInfoState.selectedId), B({
92
92
  type: "success",
93
93
  message: "删除成功"
94
94
  }), d("refresh", i.type), i.refresh = !0, n();
95
95
  }
96
96
  });
97
97
  };
98
- const H = (t, n) => {
98
+ const j = (t, n) => {
99
99
  const d = t.__vccOpts || t;
100
- for (const [e, r] of n)
101
- d[e] = r;
100
+ for (const [e, o] of n)
101
+ d[e] = o;
102
102
  return d;
103
- }, Ke = {
103
+ }, $e = {
104
104
  components: {
105
- TinySearch: me
105
+ TinySearch: ge
106
106
  },
107
107
  props: {
108
108
  name: {
@@ -112,47 +112,47 @@ const H = (t, n) => {
112
112
  },
113
113
  emits: ["open"],
114
114
  setup(t, { emit: n }) {
115
- const d = C([]), e = z({
115
+ const d = V([]), e = H({
116
116
  resourceList: [],
117
117
  activeIndex: -1,
118
118
  searchValue: ""
119
- }), r = (s = e.resourceList, a = e.searchValue) => s.filter((g) => g.name.toLowerCase().indexOf(a.toLowerCase()) > -1), m = async (s) => {
120
- e.resourceList = await He(s), ze(
121
- s,
122
- Array.isArray(e.resourceList) ? e.resourceList.map((a) => a.name) : []
123
- ), d.value = r(e.resourceList);
119
+ }), o = (a = e.resourceList, u = e.searchValue) => a.filter((c) => c.name.toLowerCase().indexOf(u.toLowerCase()) > -1), g = async (a) => {
120
+ e.resourceList = await Ke(a), We(
121
+ a,
122
+ Array.isArray(e.resourceList) ? e.resourceList.map((u) => u.name) : []
123
+ ), d.value = o(e.resourceList);
124
124
  };
125
- return Q(async () => {
126
- m(t.name);
125
+ return $(async () => {
126
+ g(t.name);
127
127
  }), {
128
128
  state: e,
129
129
  list: d,
130
- add: (s) => {
131
- A(""), G(t.name), Y(""), M(s), n("open");
130
+ add: (a) => {
131
+ D(""), M(t.name), Y(""), q(a), n("open");
132
132
  },
133
- openRead: (s, a) => {
134
- e.activeIndex = a, Y(s), A(x.Edit), n("open");
133
+ openRead: (a, u) => {
134
+ e.activeIndex = u, Y(a), D(O.Edit), n("open");
135
135
  },
136
- openEdit: (s, a) => {
137
- e.activeIndex = a, Y(s), A(x.Edit), G(t.name), M(s.type), n("open");
136
+ openEdit: (a, u) => {
137
+ e.activeIndex = u, Y(a), D(O.Edit), M(t.name), q(a.type), n("open");
138
138
  },
139
- refresh: m,
140
- getType: P,
139
+ refresh: g,
140
+ getType: A,
141
141
  RESOURCE_TYPE: E,
142
- searchBridgeData: (s) => {
143
- d.value = r(e.resourceList, s);
142
+ searchBridgeData: (a) => {
143
+ d.value = o(e.resourceList, a);
144
144
  }
145
145
  };
146
146
  }
147
- }, Qe = (t) => (X("data-v-70da6acf"), t = t(), Z(), t), Xe = { class: "manage-panel" }, Ze = { class: "manage-panel-search" }, $e = { class: "list" }, et = ["onClick"], tt = { class: "item-label" }, nt = {
147
+ }, et = (t) => (ee("data-v-70da6acf"), t = t(), te(), t), tt = { class: "manage-panel" }, nt = { class: "manage-panel-search" }, ot = { class: "list" }, at = ["onClick"], st = { class: "item-label" }, rt = {
148
148
  key: 0,
149
149
  class: "empty-wrap"
150
- }, ot = /* @__PURE__ */ Qe(() => /* @__PURE__ */ h("p", { class: "empty-text" }, "暂无数据", -1));
151
- function at(t, n, d, e, r, m) {
150
+ }, ct = /* @__PURE__ */ et(() => /* @__PURE__ */ v("p", { class: "empty-text" }, "暂无数据", -1));
151
+ function lt(t, n, d, e, o, g) {
152
152
  const y = l("tiny-search"), f = l("svg-icon");
153
- return v(), U("div", Xe, [
154
- h("div", Ze, [
155
- o(y, {
153
+ return h(), x("div", tt, [
154
+ v("div", nt, [
155
+ s(y, {
156
156
  modelValue: e.state.searchValue,
157
157
  "onUpdate:modelValue": [
158
158
  n[0] || (n[0] = (_) => e.state.searchValue = _),
@@ -162,54 +162,54 @@ function at(t, n, d, e, r, m) {
162
162
  placeholder: "请输入关键字搜索"
163
163
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
164
164
  ]),
165
- h("div", $e, [
166
- (v(!0), U(se, null, re(e.list, (_, u) => (v(), U("div", {
165
+ v("div", ot, [
166
+ (h(!0), x(ce, null, le(e.list, (_, b) => (h(), x("div", {
167
167
  key: _.name,
168
- class: ce(["list-item", u === e.state.activeIndex ? "active" : ""]),
169
- onClick: j((s) => e.openEdit(_, u), ["stop"])
168
+ class: ie(["list-item", b === e.state.activeIndex ? "active" : ""]),
169
+ onClick: K((a) => e.openEdit(_, b), ["stop"])
170
170
  }, [
171
- o(f, { name: "resources" }),
172
- h("div", tt, B(_.name), 1),
173
- o(f, {
171
+ s(f, { name: "resources" }),
172
+ v("div", st, w(_.name), 1),
173
+ s(f, {
174
174
  class: "setting-icon",
175
175
  name: "setting",
176
- onClick: j((s) => e.openEdit(_, u), ["stop"])
176
+ onClick: K((a) => e.openEdit(_, b), ["stop"])
177
177
  }, null, 8, ["onClick"])
178
- ], 10, et))), 128)),
179
- e.list.length ? b("", !0) : (v(), U("div", nt, [
180
- o(f, {
178
+ ], 10, at))), 128)),
179
+ e.list.length ? T("", !0) : (h(), x("div", rt, [
180
+ s(f, {
181
181
  class: "empty-icon",
182
182
  name: "empty"
183
183
  }),
184
- ot
184
+ ct
185
185
  ]))
186
186
  ])
187
187
  ]);
188
188
  }
189
- const st = /* @__PURE__ */ H(Ke, [["render", at], ["__scopeId", "data-v-70da6acf"]]);
190
- const J = C(!1), rt = () => {
191
- J.value = !0, ue(() => window.dispatchEvent(new Event("resize")));
192
- }, S = () => {
189
+ const it = /* @__PURE__ */ j($e, [["render", lt], ["__scopeId", "data-v-70da6acf"]]);
190
+ const J = V(!1), dt = () => {
191
+ J.value = !0, _e(() => window.dispatchEvent(new Event("resize")));
192
+ }, I = () => {
193
193
  J.value = !1;
194
- }, ct = {
194
+ }, pt = {
195
195
  components: {
196
- TinyForm: _e,
197
- TinyInput: ge,
198
- TinyButton: ye,
199
- TinyFormItem: fe,
200
- TinyCheckbox: ve,
201
- PluginSetting: Ve,
202
- TinySwitch: he,
203
- MonacoEditor: Se,
204
- IconUnknow: Be(),
205
- TinyTooltip: Ee,
206
- TinyRadioGroup: Re,
207
- TinyRadio: be,
208
- SvgButton: $
196
+ TinyForm: ye,
197
+ TinyInput: fe,
198
+ TinyButton: ve,
199
+ TinyFormItem: he,
200
+ TinyCheckbox: be,
201
+ PluginSetting: Ue,
202
+ TinySwitch: Ee,
203
+ MonacoEditor: ke,
204
+ IconUnknow: Ae(),
205
+ TinyTooltip: Re,
206
+ TinyRadioGroup: Ce,
207
+ TinyRadio: Te,
208
+ SvgButton: ne
209
209
  },
210
210
  setup(t, { emit: n }) {
211
211
  const d = {
212
- theme: Le(),
212
+ theme: De(),
213
213
  roundedSelection: !0,
214
214
  automaticLayout: !0,
215
215
  autoIndent: !0,
@@ -220,42 +220,49 @@ const J = C(!1), rt = () => {
220
220
  // 禁用滚动条边边一直显示的边框
221
221
  overviewRulerBorder: !1,
222
222
  renderLineHighlightOnlyWhenFocus: !0
223
- }, { confirm: e } = ke(), r = z({
224
- resource: V(() => Je()),
223
+ }, { confirm: e } = we(), o = H({
224
+ resource: C(() => Qe()),
225
225
  name: "",
226
226
  value: "",
227
227
  content: {},
228
- status: V(() => D() === x.Edit),
229
- category: V(() => K() === L.Npm),
230
- mode: V(() => {
231
- var a;
232
- return ((a = Ie()) == null ? void 0 : a.dslMode) !== "Vue";
228
+ status: C(() => G() === O.Edit),
229
+ category: C(() => Z() === F.Npm),
230
+ mode: C(() => {
231
+ var c;
232
+ return ((c = Ne()) == null ? void 0 : c.dslMode) !== "Vue";
233
233
  }),
234
234
  isInstance: !1,
235
- title: V(() => {
236
- const a = D() === x.Edit ? "编辑" : "添加", g = P() === E.Bridge ? "桥接源" : "工具类";
237
- return a + g;
235
+ title: C(() => {
236
+ const c = G() === O.Edit ? "编辑" : "添加", m = A() === E.Bridge ? "桥接源" : "工具类";
237
+ return c + m;
238
238
  }),
239
- type: L.Npm
239
+ type: F.Npm
240
+ }), g = C(() => {
241
+ const c = o.name || "name";
242
+ let m = c;
243
+ o.content.destructuring && (o.name && o.name === o.content.exportName ? m = `{ ${o.content.exportName || "exportName"} }` : m = `{ ${o.content.exportName || "exportName"} as ${c} }`);
244
+ const U = `${o.content.package || "package"}${o.content.main || ""}`;
245
+ return `import ${m} from '${U}'
246
+ export { ${c} }`;
240
247
  });
241
- Q(() => {
242
- var a, g;
243
- r.name = r.resource.name, r.content = r.resource.content || {}, r.value = ((g = (a = r.resource) == null ? void 0 : a.content) == null ? void 0 : g.value) || "";
244
- }), le(
245
- () => r.isInstance,
246
- (a) => {
247
- a || (r.content.instance = "");
248
+ $(() => {
249
+ var c, m;
250
+ o.name = o.resource.name, o.content = o.resource.content || {}, o.value = ((m = (c = o.resource) == null ? void 0 : c.content) == null ? void 0 : m.value) || "";
251
+ }), de(
252
+ () => o.isInstance,
253
+ (c) => {
254
+ c || (o.content.instance = "");
248
255
  }
249
256
  );
250
- const m = C(null), y = C(null);
251
- return ie(() => window.dispatchEvent(new Event("resize"))), {
257
+ const y = V(null), f = V(null);
258
+ return pe(() => window.dispatchEvent(new Event("resize"))), {
252
259
  rules: {
253
260
  name: [
254
261
  { required: !0, message: "必填", trigger: "change" },
255
262
  {
256
- validator: (a, g, N) => {
257
- const O = qe(P());
258
- Array.isArray(O) && O.includes(g) ? N(new Error("资源名称已存在")) : N();
263
+ validator: (c, m, U) => {
264
+ const L = Je(A());
265
+ Array.isArray(L) && L.includes(m) ? U(new Error("资源名称已存在")) : U();
259
266
  },
260
267
  trigger: "change"
261
268
  }
@@ -264,93 +271,94 @@ const J = C(!1), rt = () => {
264
271
  "content.exportName": [{ required: !0, message: "必填", trigger: "change" }],
265
272
  "content.instanceName": { required: !0, message: "必填", trigger: "change" }
266
273
  },
267
- resourceForm: y,
268
- editor: m,
269
- state: r,
274
+ resourceForm: f,
275
+ editor: y,
276
+ state: o,
277
+ codePreview: g,
270
278
  isOpen: J,
271
- closePanel: S,
279
+ closePanel: I,
272
280
  save: () => {
273
- const a = {
274
- category: P(),
275
- type: K(),
276
- name: r.name,
277
- app: T().appInfoState.selectedId,
278
- content: r.category ? r.content : {
281
+ const c = {
282
+ category: A(),
283
+ type: Z(),
284
+ name: o.name,
285
+ app: S().appInfoState.selectedId,
286
+ content: o.category ? o.content : {
279
287
  type: "JSFunction",
280
- value: m.value.getEditor().getValue()
288
+ value: y.value.getEditor().getValue()
281
289
  }
282
290
  };
283
- y.value.validate((g) => {
284
- if (!g) {
285
- I({
291
+ f.value.validate((m) => {
292
+ if (!m) {
293
+ B({
286
294
  type: "error",
287
295
  message: "请检查必填项"
288
296
  });
289
297
  return;
290
298
  }
291
- if (!r.category && !m.value.getEditor().getValue()) {
292
- I({
299
+ if (!o.category && !y.value.getEditor().getValue()) {
300
+ B({
293
301
  type: "error",
294
302
  message: "function 内容必填"
295
303
  });
296
304
  return;
297
305
  }
298
- je(a, S, n);
306
+ Xe(c, I, n);
299
307
  });
300
308
  },
301
309
  deleteReSource: () => {
302
310
  e({
303
311
  title: "删除资源",
304
- message: "您确认删除该资源吗?",
312
+ message: "如果删除正在使用的资源,将无法正常预览页面,确认要删除吗?",
305
313
  exec: () => {
306
- We(r.name, S, n);
314
+ Ze(o.name, I, n);
307
315
  }
308
316
  });
309
317
  },
310
318
  options: d,
311
- handleChangeType: (a) => {
312
- M(a);
319
+ handleChangeType: (c) => {
320
+ q(c);
313
321
  },
314
- RESOURCE_CATEGORY: L
322
+ RESOURCE_CATEGORY: F
315
323
  };
316
324
  }
317
- }, lt = (t) => (X("data-v-a65a6161"), t = t(), Z(), t), it = { class: "title-wrap" }, dt = { class: "header-wrap" }, pt = { class: "right-item" }, ut = { key: 2 }, mt = { class: "cdn-label-wrap" }, _t = /* @__PURE__ */ lt(() => /* @__PURE__ */ h("span", null, "CDN", -1));
318
- function gt(t, n, d, e, r, m) {
319
- const y = l("svg-button"), f = l("tiny-button"), _ = l("tiny-radio"), u = l("tiny-radio-group"), s = l("tiny-form-item"), a = l("tiny-input"), g = l("tiny-switch"), N = l("tiny-checkbox"), O = l("icon-unknow"), te = l("tiny-tooltip"), ne = l("monaco-editor"), oe = l("tiny-form"), ae = l("plugin-setting");
320
- return e.isOpen ? (v(), R(ae, { key: 0 }, {
321
- title: c(() => [
322
- h("div", it, [
323
- h("span", null, B(e.state.title), 1)
325
+ }, W = (t) => (ee("data-v-63e8b39d"), t = t(), te(), t), ut = { class: "title-wrap" }, mt = { class: "header-wrap" }, _t = { class: "right-item" }, gt = { key: 2 }, yt = { class: "cdn-label-wrap" }, ft = /* @__PURE__ */ W(() => /* @__PURE__ */ v("span", null, "CDN", -1)), vt = { class: "code-preview" }, ht = /* @__PURE__ */ W(() => /* @__PURE__ */ v("span", { class: "pre-title" }, "生成的", -1)), bt = /* @__PURE__ */ W(() => /* @__PURE__ */ v("span", { class: "pre-title" }, "代码预览", -1));
326
+ function Et(t, n, d, e, o, g) {
327
+ const y = l("svg-button"), f = l("tiny-button"), _ = l("tiny-radio"), b = l("tiny-radio-group"), a = l("tiny-form-item"), u = l("tiny-input"), c = l("tiny-switch"), m = l("tiny-checkbox"), U = l("icon-unknow"), L = l("tiny-tooltip"), ae = l("monaco-editor"), se = l("tiny-form"), re = l("plugin-setting");
328
+ return e.isOpen ? (h(), R(re, { key: 0 }, {
329
+ title: r(() => [
330
+ v("div", ut, [
331
+ v("span", null, w(e.state.title), 1)
324
332
  ])
325
333
  ]),
326
- header: c(() => [
327
- h("div", dt, [
328
- de(o(y, {
334
+ header: r(() => [
335
+ v("div", mt, [
336
+ ue(s(y, {
329
337
  class: "delete-btn",
330
338
  name: "delete",
331
339
  onClick: e.deleteReSource
332
340
  }, null, 8, ["onClick"]), [
333
- [pe, e.state.status]
341
+ [me, e.state.status]
334
342
  ]),
335
- o(f, {
343
+ s(f, {
336
344
  class: "save-btn",
337
345
  type: "primary",
338
346
  onClick: e.save
339
347
  }, {
340
- default: c(() => [
341
- F("保存")
348
+ default: r(() => [
349
+ k("保存")
342
350
  ]),
343
351
  _: 1
344
352
  }, 8, ["onClick"]),
345
- o(y, {
353
+ s(y, {
346
354
  class: "close-btn",
347
355
  name: "close",
348
356
  onClick: e.closePanel
349
357
  }, null, 8, ["onClick"])
350
358
  ])
351
359
  ]),
352
- content: c(() => [
353
- o(oe, {
360
+ content: r(() => [
361
+ s(se, {
354
362
  ref: "resourceForm",
355
363
  class: "resource-form",
356
364
  rules: e.rules,
@@ -360,36 +368,36 @@ function gt(t, n, d, e, r, m) {
360
368
  "label-position": "left",
361
369
  "label-align": !0
362
370
  }, {
363
- default: c(() => [
364
- h("div", pt, [
365
- e.state.status ? b("", !0) : (v(), R(s, {
371
+ default: r(() => [
372
+ v("div", _t, [
373
+ e.state.status ? T("", !0) : (h(), R(a, {
366
374
  key: 0,
367
375
  label: "工具类型",
368
376
  prop: "type"
369
377
  }, {
370
- default: c(() => [
371
- o(u, {
378
+ default: r(() => [
379
+ s(b, {
372
380
  modelValue: e.state.type,
373
381
  "onUpdate:modelValue": n[0] || (n[0] = (p) => e.state.type = p),
374
382
  class: "resource-type-radio-group",
375
383
  onChange: e.handleChangeType
376
384
  }, {
377
- default: c(() => [
378
- o(_, {
385
+ default: r(() => [
386
+ s(_, {
379
387
  label: e.RESOURCE_CATEGORY.Npm,
380
388
  class: "resource-type-radio-item"
381
389
  }, {
382
- default: c(() => [
383
- F(B(e.RESOURCE_CATEGORY.Npm), 1)
390
+ default: r(() => [
391
+ k(w(e.RESOURCE_CATEGORY.Npm), 1)
384
392
  ]),
385
393
  _: 1
386
394
  }, 8, ["label"]),
387
- o(_, {
395
+ s(_, {
388
396
  label: e.RESOURCE_CATEGORY.Function,
389
397
  class: "resource-type-radio-item"
390
398
  }, {
391
- default: c(() => [
392
- F(B(e.RESOURCE_CATEGORY.Function), 1)
399
+ default: r(() => [
400
+ k(w(e.RESOURCE_CATEGORY.Function), 1)
393
401
  ]),
394
402
  _: 1
395
403
  }, 8, ["label"])
@@ -399,84 +407,84 @@ function gt(t, n, d, e, r, m) {
399
407
  ]),
400
408
  _: 1
401
409
  })),
402
- e.state.status ? b("", !0) : (v(), R(s, {
410
+ e.state.status ? T("", !0) : (h(), R(a, {
403
411
  key: 1,
404
412
  label: "名称",
405
413
  prop: "name"
406
414
  }, {
407
- default: c(() => [
408
- o(a, {
415
+ default: r(() => [
416
+ s(u, {
409
417
  modelValue: e.state.name,
410
418
  "onUpdate:modelValue": n[1] || (n[1] = (p) => e.state.name = p),
411
- placeholder: "请输入名称"
419
+ placeholder: "请输入工具类名称"
412
420
  }, null, 8, ["modelValue"])
413
421
  ]),
414
422
  _: 1
415
423
  })),
416
- e.state.category ? (v(), U("div", ut, [
417
- o(s, {
424
+ e.state.category ? (h(), x("div", gt, [
425
+ s(a, {
418
426
  label: "包名",
419
427
  prop: "content.package"
420
428
  }, {
421
- default: c(() => [
422
- o(a, {
429
+ default: r(() => [
430
+ s(u, {
423
431
  modelValue: e.state.content.package,
424
432
  "onUpdate:modelValue": n[2] || (n[2] = (p) => e.state.content.package = p),
425
- placeholder: "package"
433
+ placeholder: "请输入npm包名称"
426
434
  }, null, 8, ["modelValue"])
427
435
  ]),
428
436
  _: 1
429
437
  }),
430
- o(s, {
438
+ s(a, {
431
439
  label: "导出名称",
432
440
  prop: "content.exportName"
433
441
  }, {
434
- default: c(() => [
435
- o(a, {
442
+ default: r(() => [
443
+ s(u, {
436
444
  modelValue: e.state.content.exportName,
437
445
  "onUpdate:modelValue": n[3] || (n[3] = (p) => e.state.content.exportName = p),
438
- placeholder: "exportName"
446
+ placeholder: "请输入npm包的导出名称"
439
447
  }, null, 8, ["modelValue"])
440
448
  ]),
441
449
  _: 1
442
450
  }),
443
- o(s, { label: "是否解构" }, {
444
- default: c(() => [
445
- o(g, {
451
+ s(a, { label: "是否解构" }, {
452
+ default: r(() => [
453
+ s(c, {
446
454
  modelValue: e.state.content.destructuring,
447
455
  "onUpdate:modelValue": n[4] || (n[4] = (p) => e.state.content.destructuring = p)
448
456
  }, null, 8, ["modelValue"])
449
457
  ]),
450
458
  _: 1
451
459
  }),
452
- e.state.mode ? (v(), R(s, {
460
+ e.state.mode ? (h(), R(a, {
453
461
  key: 0,
454
462
  label: "是否作为实例"
455
463
  }, {
456
- default: c(() => [
457
- o(N, {
464
+ default: r(() => [
465
+ s(m, {
458
466
  modelValue: e.state.isInstance,
459
467
  "onUpdate:modelValue": n[5] || (n[5] = (p) => e.state.isInstance = p)
460
468
  }, null, 8, ["modelValue"])
461
469
  ]),
462
470
  _: 1
463
- })) : b("", !0),
464
- e.state.isInstance ? (v(), R(s, {
471
+ })) : T("", !0),
472
+ e.state.isInstance ? (h(), R(a, {
465
473
  key: 1,
466
474
  label: "实例名称",
467
475
  prop: "content.instanceName"
468
476
  }, {
469
- default: c(() => [
470
- o(a, {
477
+ default: r(() => [
478
+ s(u, {
471
479
  modelValue: e.state.content.instance,
472
480
  "onUpdate:modelValue": n[6] || (n[6] = (p) => e.state.content.instance = p)
473
481
  }, null, 8, ["modelValue"])
474
482
  ]),
475
483
  _: 1
476
- })) : b("", !0),
477
- o(s, { label: "入口路径" }, {
478
- default: c(() => [
479
- o(a, {
484
+ })) : T("", !0),
485
+ s(a, { label: "入口路径" }, {
486
+ default: r(() => [
487
+ s(u, {
480
488
  modelValue: e.state.content.main,
481
489
  "onUpdate:modelValue": n[7] || (n[7] = (p) => e.state.content.main = p),
482
490
  placeholder: "main"
@@ -484,9 +492,9 @@ function gt(t, n, d, e, r, m) {
484
492
  ]),
485
493
  _: 1
486
494
  }),
487
- o(s, { label: "版本号" }, {
488
- default: c(() => [
489
- o(a, {
495
+ s(a, { label: "版本号" }, {
496
+ default: r(() => [
497
+ s(u, {
490
498
  modelValue: e.state.content.version,
491
499
  "onUpdate:modelValue": n[8] || (n[8] = (p) => e.state.content.version = p),
492
500
  placeholder: "latest"
@@ -494,32 +502,42 @@ function gt(t, n, d, e, r, m) {
494
502
  ]),
495
503
  _: 1
496
504
  }),
497
- o(s, null, {
498
- label: c(() => [
499
- h("div", mt, [
500
- _t,
501
- o(te, {
505
+ s(a, null, {
506
+ label: r(() => [
507
+ v("div", yt, [
508
+ ft,
509
+ s(L, {
502
510
  effect: "dark",
503
511
  content: "浏览器直接可用的生产包链接,请确保可用,否则可能会造成页面预览失败",
504
512
  placement: "top"
505
513
  }, {
506
- default: c(() => [
507
- o(O, { class: "cdn-tips-icon" })
514
+ default: r(() => [
515
+ s(U, { class: "cdn-tips-icon" })
508
516
  ]),
509
517
  _: 1
510
518
  })
511
519
  ])
512
520
  ]),
513
- default: c(() => [
514
- o(a, {
521
+ default: r(() => [
522
+ s(u, {
515
523
  modelValue: e.state.content.cdnLink,
516
524
  "onUpdate:modelValue": n[9] || (n[9] = (p) => e.state.content.cdnLink = p),
517
525
  placeholder: "浏览器直接可用的生产包链接,请确保可用,否则可能会造成页面预览失败"
518
526
  }, null, 8, ["modelValue"])
519
527
  ]),
520
528
  _: 1
521
- })
522
- ])) : (v(), R(ne, {
529
+ }),
530
+ v("div", vt, [
531
+ v("pre", null, [
532
+ k("// "),
533
+ ht,
534
+ k(" utils.js "),
535
+ bt,
536
+ k(`
537
+ ` + w(e.codePreview), 1)
538
+ ])
539
+ ])
540
+ ])) : (h(), R(ae, {
523
541
  key: 3,
524
542
  ref: "editor",
525
543
  value: e.state.value,
@@ -532,112 +550,115 @@ function gt(t, n, d, e, r, m) {
532
550
  }, 8, ["rules", "model"])
533
551
  ]),
534
552
  _: 1
535
- })) : b("", !0);
553
+ })) : T("", !0);
536
554
  }
537
- const yt = /* @__PURE__ */ H(ct, [["render", gt], ["__scopeId", "data-v-a65a6161"]]);
538
- const ft = {
555
+ const Rt = /* @__PURE__ */ j(pt, [["render", Et], ["__scopeId", "data-v-63e8b39d"]]);
556
+ const Ct = {
539
557
  components: {
540
- TinyTabs: Ce,
541
- TinyTabItem: Te,
542
- PluginPanel: Ue,
543
- SvgButton: $,
544
- BridgeManage: st,
545
- BridgeSetting: yt
558
+ TinyTabs: Ve,
559
+ TinyTabItem: Se,
560
+ PluginPanel: Ie,
561
+ SvgButton: ne,
562
+ BridgeManage: it,
563
+ BridgeSetting: Rt,
564
+ LinkButton: xe
546
565
  },
547
566
  setup() {
548
- const t = C(E.Util), n = C(null), d = C(null), e = V(() => Me[t.value]);
567
+ const t = V(E.Util), n = V(null), d = V(null), e = C(() => je[t.value]), o = Be().getDocsUrl("bridge");
549
568
  return {
550
- addResource: (u) => {
551
- t.value === E.Util ? d.value.add(u) : n.value.add(u);
569
+ addResource: (a) => {
570
+ t.value === E.Util ? d.value.add(a) : n.value.add(a);
552
571
  },
553
572
  RESOURCE_TYPE: E,
554
573
  activedName: t,
555
- switchTab: (u) => {
556
- S(), G(u.name);
574
+ switchTab: (a) => {
575
+ I(), M(a.name);
557
576
  },
558
577
  openBridgePanel: () => {
559
- rt();
578
+ dt();
560
579
  },
561
- closePanel: S,
580
+ closePanel: I,
562
581
  openUtilPanel: () => {
563
- S();
582
+ I();
564
583
  },
565
- refreshList: (u) => {
566
- u === E.Util ? d.value.refresh(u) : n.value.refresh(u);
584
+ refreshList: (a) => {
585
+ a === E.Util ? d.value.refresh(a) : n.value.refresh(a);
567
586
  },
568
587
  bridge: n,
569
- utils: d,
588
+ docsUrl: o,
589
+ utilsRef: d,
570
590
  tips: e,
571
- isVsCodeEnv: ee
591
+ isVsCodeEnv: oe
572
592
  };
573
593
  }
574
594
  };
575
- function vt(t, n, d, e, r, m) {
576
- const y = l("svg-button"), f = l("bridge-manage"), _ = l("tiny-tab-item"), u = l("tiny-tabs"), s = l("bridge-setting"), a = l("plugin-panel");
577
- return v(), R(a, {
595
+ function Tt(t, n, d, e, o, g) {
596
+ const y = l("link-button"), f = l("svg-button"), _ = l("bridge-manage"), b = l("tiny-tab-item"), a = l("tiny-tabs"), u = l("bridge-setting"), c = l("plugin-panel");
597
+ return h(), R(c, {
578
598
  title: "资源管理",
579
599
  isCloseLeft: !1,
580
600
  onClose: e.closePanel
581
601
  }, {
582
- header: c(() => [
583
- o(y, {
602
+ header: r(() => [
603
+ s(y, { href: e.docsUrl }, null, 8, ["href"]),
604
+ s(f, {
584
605
  name: "add-utils",
585
606
  placement: "left",
586
607
  tips: e.tips,
587
- onClick: n[0] || (n[0] = (g) => e.addResource("npm"))
608
+ onClick: n[0] || (n[0] = (m) => e.addResource("npm"))
588
609
  }, null, 8, ["tips"])
589
610
  ]),
590
- content: c(() => [
591
- o(u, {
611
+ content: r(() => [
612
+ s(a, {
592
613
  modelValue: e.activedName,
593
- "onUpdate:modelValue": n[1] || (n[1] = (g) => e.activedName = g),
614
+ "onUpdate:modelValue": n[1] || (n[1] = (m) => e.activedName = m),
594
615
  class: "tabs full-width-tabs",
595
616
  "tab-style": "button-card",
596
617
  onClick: e.switchTab
597
618
  }, {
598
- default: c(() => [
599
- o(_, {
619
+ default: r(() => [
620
+ s(b, {
600
621
  name: e.RESOURCE_TYPE.Util,
601
622
  title: "工具类"
602
623
  }, {
603
- default: c(() => [
604
- o(f, {
605
- ref: "utils",
624
+ default: r(() => [
625
+ s(_, {
626
+ ref: "utilsRef",
606
627
  name: e.RESOURCE_TYPE.Util,
607
628
  onOpen: e.openBridgePanel
608
629
  }, null, 8, ["name", "onOpen"])
609
630
  ]),
610
631
  _: 1
611
632
  }, 8, ["name"]),
612
- e.isVsCodeEnv ? (v(), R(_, {
633
+ e.isVsCodeEnv ? (h(), R(b, {
613
634
  key: 0,
614
635
  name: e.RESOURCE_TYPE.Bridge,
615
636
  title: "桥接源"
616
637
  }, {
617
- default: c(() => [
618
- o(f, {
638
+ default: r(() => [
639
+ s(_, {
619
640
  ref: "bridge",
620
641
  name: e.RESOURCE_TYPE.Bridge,
621
642
  onOpen: e.openBridgePanel
622
643
  }, null, 8, ["name", "onOpen"])
623
644
  ]),
624
645
  _: 1
625
- }, 8, ["name"])) : b("", !0)
646
+ }, 8, ["name"])) : T("", !0)
626
647
  ]),
627
648
  _: 1
628
649
  }, 8, ["modelValue", "onClick"]),
629
- o(s, { onRefresh: e.refreshList }, null, 8, ["onRefresh"])
650
+ s(u, { onRefresh: e.refreshList }, null, 8, ["onRefresh"])
630
651
  ]),
631
652
  _: 1
632
653
  }, 8, ["onClose"]);
633
654
  }
634
- const ht = /* @__PURE__ */ H(ft, [["render", vt], ["__scopeId", "data-v-c5fc42c1"]]), wt = {
655
+ const Vt = /* @__PURE__ */ j(Ct, [["render", Tt], ["__scopeId", "data-v-e04eb86e"]]), Ft = {
635
656
  id: "Bridge",
636
657
  title: "资源管理",
637
658
  icon: "plugin-icon-sresources",
638
659
  align: "top",
639
- component: ht
660
+ component: Vt
640
661
  };
641
662
  export {
642
- wt as default
663
+ Ft as default
643
664
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .manage-panel[data-v-70da6acf]{height:100%;display:flex;flex-direction:column;position:relative}.manage-panel .manage-panel-search[data-v-70da6acf]{padding:8px}.manage-panel .add-button[data-v-70da6acf]{align-self:flex-end;margin:6px}.manage-panel .list[data-v-70da6acf]{flex:1;border-top:1px solid var(--ti-lowcode-tabs-border-color);overflow:auto}.manage-panel .list-item[data-v-70da6acf]{height:28px;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-70da6acf]:hover,.manage-panel .list-item.active[data-v-70da6acf]{background:var(--ti-lowcode-bridge-list-bg)}.manage-panel .list-item svg[data-v-70da6acf]{color:var(--ti-lowcode-toolbar-more-hover-color)}.plugin-setting[data-v-a65a6161] .icon-wrap{margin-right:8px}.plugin-setting .resource-form[data-v-a65a6161] .tiny-form-item__label .cdn-tips-icon{margin-left:4px}.plugin-setting .title-wrap .help-link[data-v-a65a6161]{display:inline-block;color:var(--ti-lowcode-common-primary-color);font-size:12px;margin-left:16px}.plugin-setting .title-wrap .help-link[data-v-a65a6161]:hover{text-decoration:underline}.plugin-setting .header-wrap[data-v-a65a6161]{display:flex;align-items:center;column-gap:16px}.plugin-setting .header-wrap .delete-btn[data-v-a65a6161]{color:var(--ti-lowcode-common-text-color-5)}.plugin-setting .header-wrap .delete-btn[data-v-a65a6161]:hover{color:var(--ti-lowcode-common-primary-text-color)}.plugin-setting .resource-type-radio-item[data-v-a65a6161]{--ti-radio-text-color: var(--ti-lowcode-common-secondary-text-color)}.plugin-setting .monaco-editor[data-v-a65a6161]{height:500px;margin-top:8px;border:1px solid var(--ti-lowcode-birdge-editor-border-color)}.plugin-setting .resource-form-footer[data-v-a65a6161]{padding:12px 0 12px 80px}.plugin-setting .resource-form-footer .tiny-svg[data-v-a65a6161]{margin-right:6px}.plugin-setting .resource-form-footer .del[data-v-a65a6161]:hover{background-color:var(--ti-lowcode-delete-button-hover-bg)}.plugin-setting .cdn-label-wrap[data-v-a65a6161]{display:flex;align-items:center}.tabs[data-v-c5fc42c1]{height:calc(100% - 46px)}[data-v-c5fc42c1] .tiny-tabs__header{padding:8px;border-bottom:1px solid var(--ti-lowcode-tabs-border-color)}[data-v-c5fc42c1] .tiny-tabs__content{height:calc(100% - 45px);padding:0}[data-v-c5fc42c1] .tiny-tabs__content>div{height:100%}
1
+ .manage-panel[data-v-70da6acf]{height:100%;display:flex;flex-direction:column;position:relative}.manage-panel .manage-panel-search[data-v-70da6acf]{padding:8px}.manage-panel .add-button[data-v-70da6acf]{align-self:flex-end;margin:6px}.manage-panel .list[data-v-70da6acf]{flex:1;border-top:1px solid var(--ti-lowcode-tabs-border-color);overflow:auto}.manage-panel .list-item[data-v-70da6acf]{height:28px;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-70da6acf]:hover,.manage-panel .list-item.active[data-v-70da6acf]{background:var(--ti-lowcode-bridge-list-bg)}.manage-panel .list-item svg[data-v-70da6acf]{color:var(--ti-lowcode-toolbar-more-hover-color)}.plugin-setting[data-v-63e8b39d] .icon-wrap{margin-right:8px}.plugin-setting .resource-form[data-v-63e8b39d] .tiny-form-item__label .cdn-tips-icon{margin-left:4px}.plugin-setting .title-wrap .help-link[data-v-63e8b39d]{display:inline-block;color:var(--ti-lowcode-common-primary-color);font-size:12px;margin-left:16px}.plugin-setting .title-wrap .help-link[data-v-63e8b39d]:hover{text-decoration:underline}.plugin-setting .header-wrap[data-v-63e8b39d]{display:flex;align-items:center;column-gap:16px}.plugin-setting .header-wrap .delete-btn[data-v-63e8b39d]{color:var(--ti-lowcode-common-text-color-5)}.plugin-setting .header-wrap .delete-btn[data-v-63e8b39d]:hover{color:var(--ti-lowcode-common-primary-text-color)}.plugin-setting .resource-type-radio-item[data-v-63e8b39d]{--ti-radio-text-color: var(--ti-lowcode-common-secondary-text-color)}.plugin-setting .monaco-editor[data-v-63e8b39d]{height:500px;margin-top:8px;border:1px solid var(--ti-lowcode-birdge-editor-border-color)}.plugin-setting .resource-form-footer[data-v-63e8b39d]{padding:12px 0 12px 80px}.plugin-setting .resource-form-footer .tiny-svg[data-v-63e8b39d]{margin-right:6px}.plugin-setting .resource-form-footer .del[data-v-63e8b39d]:hover{background-color:var(--ti-lowcode-delete-button-hover-bg)}.plugin-setting .cdn-label-wrap[data-v-63e8b39d]{display:flex;align-items:center}.code-preview[data-v-63e8b39d]{font-size:14px;line-height:20px;margin-left:12px;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-63e8b39d]{font-family:Microsoft YaHei}.code-preview>pre[data-v-63e8b39d]{margin:0;padding:8px 20px;font-family:Consolas,Courier New,monospace}.tabs[data-v-e04eb86e]{height:calc(100% - 46px)}[data-v-e04eb86e] .tiny-tabs__header{padding:8px;border-bottom:1px solid var(--ti-lowcode-tabs-border-color)}[data-v-e04eb86e] .tiny-tabs__content{height:calc(100% - 45px);padding:0}[data-v-e04eb86e] .tiny-tabs__content>div{height:100%}[data-v-e04eb86e] .help-box{position:absolute;left:72px;top:3px}
package/package.json CHANGED
@@ -1,27 +1,40 @@
1
- {
2
- "name": "@opentiny/tiny-engine-plugin-bridge",
3
- "version": "1.0.1",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "scripts": {
8
- "build": "vite build"
9
- },
10
- "main": "dist/index.js",
11
- "module": "dist/index.js",
12
- "files": [
13
- "dist"
14
- ],
15
- "dependencies": {
16
- "@opentiny/tiny-engine-common": "^1.0.0",
17
- "@opentiny/tiny-engine-controller": "^1.0.0",
18
- "@opentiny/tiny-engine-http": "^1.0.0",
19
- "@opentiny/vue": "^3.8.0",
20
- "vue": "3.2.45"
21
- },
22
- "devDependencies": {
23
- "@vitejs/plugin-vue": "^4.2.3",
24
- "@vitejs/plugin-vue-jsx": "^1.3.10",
25
- "vite": "^4.3.7"
26
- }
27
- }
1
+ {
2
+ "name": "@opentiny/tiny-engine-plugin-bridge",
3
+ "version": "1.0.2",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/opentiny/tiny-engine",
15
+ "directory": "packages/plugins/bridge"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/opentiny/tiny-engine/issues"
19
+ },
20
+ "author": "OpenTiny Team",
21
+ "license": "MIT",
22
+ "homepage": "https://opentiny.design/tiny-engine",
23
+ "dependencies": {
24
+ "@opentiny/vue": "~3.10.0",
25
+ "@opentiny/vue-icon": "~3.10.0",
26
+ "vue": "3.2.45",
27
+ "@opentiny/tiny-engine-canvas": "1.0.2",
28
+ "@opentiny/tiny-engine-common": "1.0.1",
29
+ "@opentiny/tiny-engine-http": "1.0.1",
30
+ "@opentiny/tiny-engine-controller": "1.0.2"
31
+ },
32
+ "devDependencies": {
33
+ "@vitejs/plugin-vue": "^4.2.3",
34
+ "@vitejs/plugin-vue-jsx": "^1.3.10",
35
+ "vite": "^4.3.7"
36
+ },
37
+ "scripts": {
38
+ "build": "vite build"
39
+ }
40
+ }