@opentiny/tiny-robot 0.4.0-alpha.1 → 0.4.0-alpha.10

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/index3.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as _, onMounted as ne, onBeforeUnmount as oe, defineComponent as P, createElementBlock as a, openBlock as r, createElementVNode as w, createVNode as $, unref as n, toDisplayString as B, mergeModels as W, useModel as j, computed as I, normalizeStyle as ie, Fragment as S, renderList as V, createBlock as H, resolveDynamicComponent as Y, nextTick as se, normalizeClass as U, withDirectives as q, createCommentVNode as G, renderSlot as A, withKeys as F, withModifiers as J, isRef as le, vModelText as re, vShow as ae } from "vue";
1
+ import { onMounted as ne, onBeforeUnmount as oe, ref as _, defineComponent as P, openBlock as r, createElementBlock as a, createElementVNode as w, createVNode as $, unref as n, toDisplayString as B, useModel as W, computed as I, normalizeStyle as ie, Fragment as S, renderList as V, createBlock as H, resolveDynamicComponent as Y, mergeModels as j, nextTick as se, normalizeClass as U, createCommentVNode as G, renderSlot as q, withDirectives as A, withKeys as F, isRef as le, withModifiers as J, vModelText as re, vShow as ae } from "vue";
2
2
  import { IconEmptySearch as ue, IconEditPen as ce, IconDelete as de, IconCheck as me, IconClose as fe, IconMenu2 as pe } from "@opentiny/tiny-robot-svgs";
3
3
  import { _ as z } from "./_plugin-vue_export-helper.js";
4
4
  import { o as Z, c as ve, e as ge, d as ye } from "./index5.js";
@@ -47,7 +47,7 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
47
47
  }
48
48
  }), Re = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Ie = ["onClick"], Q = 4, xe = /* @__PURE__ */ P({
49
49
  __name: "MenuList",
50
- props: /* @__PURE__ */ W({
50
+ props: /* @__PURE__ */ j({
51
51
  items: {},
52
52
  menuListGap: { default: 8 }
53
53
  }, {
@@ -56,9 +56,9 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
56
56
  data: { default: null },
57
57
  dataModifiers: {}
58
58
  }),
59
- emits: /* @__PURE__ */ W(["item-click"], ["update:trigger", "update:data"]),
59
+ emits: /* @__PURE__ */ j(["item-click"], ["update:trigger", "update:data"]),
60
60
  setup(s, { emit: m }) {
61
- const t = j(s, "trigger"), c = j(s, "data"), h = s, C = m, E = _(null);
61
+ const t = W(s, "trigger"), c = W(s, "data"), h = s, C = m, E = _(null);
62
62
  Z(
63
63
  E,
64
64
  () => {
@@ -202,9 +202,9 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
202
202
  key: l.id || te,
203
203
  onClick: (d) => c("item-click", l)
204
204
  }, [
205
- A(i.$slots, "item-prefix", { item: l }, void 0, !0),
205
+ q(i.$slots, "item-prefix", { item: l }, void 0, !0),
206
206
  l.icon ? (r(), H(Y(l.icon), { key: 0 })) : G("", !0),
207
- n(p) === l ? q((r(), a("input", {
207
+ n(p) === l ? A((r(), a("input", {
208
208
  key: 1,
209
209
  class: "tr-history__item-editor",
210
210
  type: "text",
@@ -228,7 +228,7 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
228
228
  ]
229
229
  }, null, 544)), [
230
230
  [re, n(k)]
231
- ]) : A(i.$slots, "item-title", {
231
+ ]) : q(i.$slots, "item-title", {
232
232
  key: 2,
233
233
  item: l
234
234
  }, () => [
@@ -274,7 +274,7 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
274
274
  ], 10, Ge))), 128))
275
275
  ])
276
276
  ]))), 128)),
277
- q($(Me, {
277
+ A($(Me, {
278
278
  trigger: g.value,
279
279
  "onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
280
280
  data: u.value,
package/dist/index4.js CHANGED
@@ -13,7 +13,7 @@ function d(n) {
13
13
  function be(n) {
14
14
  return n >= " ";
15
15
  }
16
- function E(n) {
16
+ function O(n) {
17
17
  return `,:[]/{}()
18
18
  +`.includes(n);
19
19
  }
@@ -29,10 +29,10 @@ function Z(n) {
29
29
  +`.includes(n);
30
30
  }
31
31
  function _(n) {
32
- return O(n) || Se.test(n);
32
+ return E(n) || Se.test(n);
33
33
  }
34
34
  const Se = /^[[{\w-]$/;
35
- function ke(n) {
35
+ function Ne(n) {
36
36
  return n === `
37
37
  ` || n === "\r" || n === " " || n === "\b" || n === "\f";
38
38
  }
@@ -40,7 +40,7 @@ function p(n, e) {
40
40
  const r = n.charCodeAt(e);
41
41
  return r === q || r === ae || r === H || r === P;
42
42
  }
43
- function Ne(n, e) {
43
+ function ke(n, e) {
44
44
  const r = n.charCodeAt(e);
45
45
  return r === q || r === H || r === P;
46
46
  }
@@ -48,7 +48,7 @@ function $e(n, e) {
48
48
  const r = n.charCodeAt(e);
49
49
  return r === de || r >= pe && r <= he || r === ge || r === we || r === me;
50
50
  }
51
- function O(n) {
51
+ function E(n) {
52
52
  return G(n) || Q(n);
53
53
  }
54
54
  function G(n) {
@@ -65,8 +65,8 @@ function T(n) {
65
65
  }
66
66
  function S(n, e) {
67
67
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
68
- const k = n.lastIndexOf(e);
69
- return k !== -1 ? n.substring(0, k) + (r ? "" : n.substring(k + 1)) : n;
68
+ const N = n.lastIndexOf(e);
69
+ return N !== -1 ? n.substring(0, N) + (r ? "" : n.substring(N + 1)) : n;
70
70
  }
71
71
  function l(n, e) {
72
72
  let r = n.length;
@@ -79,10 +79,10 @@ function l(n, e) {
79
79
  function Ae(n, e, r) {
80
80
  return n.substring(0, e) + n.substring(e + r);
81
81
  }
82
- function Ee(n) {
82
+ function Oe(n) {
83
83
  return /[,\n][ \t\r]*$/.test(n);
84
84
  }
85
- const Oe = {
85
+ const Ee = {
86
86
  "\b": "\\b",
87
87
  "\f": "\\f",
88
88
  "\n": "\\n",
@@ -104,7 +104,7 @@ function We(n) {
104
104
  let e = 0, r = "";
105
105
  U(["```", "[```", "{```"]), m() || ce(), U(["```", "```]", "```}"]);
106
106
  const y = C(",");
107
- for (y && t(), _(n[e]) && Ee(r) ? (y || (r = l(r, ",")), re()) : y && (r = S(r, ",")); n[e] === "}" || n[e] === "]"; )
107
+ for (y && t(), _(n[e]) && Oe(r) ? (y || (r = l(r, ",")), re()) : y && (r = S(r, ",")); n[e] === "}" || n[e] === "]"; )
108
108
  e++, t();
109
109
  if (e >= n.length)
110
110
  return r;
@@ -124,7 +124,7 @@ function We(n) {
124
124
  return e > s;
125
125
  }
126
126
  function v(i) {
127
- const s = i ? p : Ne;
127
+ const s = i ? p : ke;
128
128
  let u = "";
129
129
  for (; ; )
130
130
  if (s(n, e))
@@ -170,18 +170,18 @@ function We(n) {
170
170
  function C(i) {
171
171
  return n[e] === i ? (r += n[e], e++, !0) : !1;
172
172
  }
173
- function N(i) {
173
+ function k(i) {
174
174
  return n[e] === i ? (e++, !0) : !1;
175
175
  }
176
176
  function x() {
177
- return N("\\");
177
+ return k("\\");
178
178
  }
179
179
  function V() {
180
- return t(), n[e] === "." && n[e + 1] === "." && n[e + 2] === "." ? (e += 3, t(), N(","), !0) : !1;
180
+ return t(), n[e] === "." && n[e + 1] === "." && n[e + 2] === "." ? (e += 3, t(), k(","), !0) : !1;
181
181
  }
182
182
  function ee() {
183
183
  if (n[e] === "{") {
184
- r += "{", e++, t(), N(",") && t();
184
+ r += "{", e++, t(), k(",") && t();
185
185
  let i = !0;
186
186
  for (; e < n.length && n[e] !== "}"; ) {
187
187
  let s;
@@ -199,7 +199,7 @@ function We(n) {
199
199
  }
200
200
  function ne() {
201
201
  if (n[e] === "[") {
202
- r += "[", e++, t(), N(",") && t();
202
+ r += "[", e++, t(), k(",") && t();
203
203
  let i = !0;
204
204
  for (; e < n.length && n[e] !== "]"; )
205
205
  if (i ? i = !1 : C(",") || (r = l(r, ",")), V(), !m()) {
@@ -220,24 +220,24 @@ ${r}
220
220
  }
221
221
  function h() {
222
222
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1, u = n[e] === "\\";
223
- if (u && (e++, u = !0), O(n[e])) {
223
+ if (u && (e++, u = !0), E(n[e])) {
224
224
  const A = z(n[e]) ? z : T(n[e]) ? T : Q(n[e]) ? Q : G, a = e, b = r.length;
225
225
  let o = '"';
226
226
  for (e++; ; ) {
227
227
  if (e >= n.length) {
228
228
  const c = D(e - 1);
229
- return !i && E(n.charAt(c)) ? (e = a, r = r.substring(0, b), h(!0)) : (o = l(o, '"'), r += o, !0);
229
+ return !i && O(n.charAt(c)) ? (e = a, r = r.substring(0, b), h(!0)) : (o = l(o, '"'), r += o, !0);
230
230
  }
231
231
  if (e === s)
232
232
  return o = l(o, '"'), r += o, !0;
233
233
  if (A(n[e])) {
234
234
  const c = e, I = o.length;
235
- if (o += '"', e++, r += o, t(!1), i || e >= n.length || E(n[e]) || O(n[e]) || d(n[e]))
235
+ if (o += '"', e++, r += o, t(!1), i || e >= n.length || O(n[e]) || E(n[e]) || d(n[e]))
236
236
  return B(), !0;
237
237
  const f = D(c - 1), K = n.charAt(f);
238
238
  if (K === ",")
239
239
  return e = a, r = r.substring(0, b), h(!1, f);
240
- if (E(K))
240
+ if (O(K))
241
241
  return e = a, r = r.substring(0, b), h(!0);
242
242
  r = r.substring(0, b), e = c + 1, o = `${o.substring(0, I)}\\${o.substring(I)}`;
243
243
  } else if (i && Z(n[e])) {
@@ -258,7 +258,7 @@ ${r}
258
258
  o += c, e += 2;
259
259
  } else {
260
260
  const c = n.charAt(e);
261
- c === '"' && n[e - 1] !== "\\" ? (o += `\\${c}`, e++) : ke(c) ? (o += Oe[c], e++) : (be(c) || oe(c), o += c, e++);
261
+ c === '"' && n[e - 1] !== "\\" ? (o += `\\${c}`, e++) : Ne(c) ? (o += Ee[c], e++) : (be(c) || oe(c), o += c, e++);
262
262
  }
263
263
  u && x();
264
264
  }
@@ -326,7 +326,7 @@ ${r}
326
326
  if (n[u] === "(")
327
327
  return e = u + 1, m(), n[e] === ")" && (e++, n[e] === ";" && e++), !0;
328
328
  }
329
- for (; e < n.length && !Z(n[e]) && !O(n[e]) && (!i || n[e] !== ":"); )
329
+ for (; e < n.length && !Z(n[e]) && !E(n[e]) && (!i || n[e] !== ":"); )
330
330
  e++;
331
331
  if (n[e - 1] === ":" && M.test(n.substring(s, e + 2)))
332
332
  for (; e < n.length && R.test(n[e]); )
@@ -343,7 +343,7 @@ ${r}
343
343
  const i = e;
344
344
  for (e++; e < n.length && (n[e] !== "/" || n[e - 1] === "\\"); )
345
345
  e++;
346
- return e++, r += `"${n.substring(i, e)}"`, !0;
346
+ return e++, r += JSON.stringify(n.substring(i, e)), !0;
347
347
  }
348
348
  }
349
349
  function D(i) {
@@ -353,7 +353,7 @@ ${r}
353
353
  return s;
354
354
  }
355
355
  function $() {
356
- return e >= n.length || E(n[e]) || p(n, e);
356
+ return e >= n.length || O(n[e]) || p(n, e);
357
357
  }
358
358
  function W(i) {
359
359
  r += `${n.slice(i, e)}0`;
package/dist/index5.js CHANGED
@@ -695,8 +695,8 @@ function tt(e = {}) {
695
695
  return { width: r, height: s };
696
696
  }
697
697
  export {
698
- S as a,
699
- M as b,
698
+ M as a,
699
+ S as b,
700
700
  qe as c,
701
701
  tt as d,
702
702
  Je as e,
package/dist/index6.js CHANGED
@@ -1,9 +1,9 @@
1
- import { onMounted as U, nextTick as B, h as C, defineComponent as _, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as g, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
2
- import { a as oe, c as re, e as ne } from "./index5.js";
1
+ import { onMounted as U, nextTick as B, h as C, render as R, onBeforeUnmount as D, defineComponent as b, Teleport as W, computed as h, ref as E, openBlock as g, createBlock as F, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, renderSlot as J, createCommentVNode as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
2
+ import { b as oe, c as re, e as ne } from "./index5.js";
3
3
  import { t as u } from "./utils.js";
4
4
  import { _ as N } from "./_plugin-vue_export-helper.js";
5
5
  import { u as se } from "./useSlotRefs.js";
6
- const pe = _({
6
+ const pe = b({
7
7
  setup: (r) => () => C(W, r.propsFactory(), r.vnodeFactory()),
8
8
  props: ["propsFactory", "vnodeFactory"]
9
9
  });
@@ -34,7 +34,7 @@ function ce(r, n) {
34
34
  return d;
35
35
  });
36
36
  }
37
- const ie = /* @__PURE__ */ _({
37
+ const ie = /* @__PURE__ */ b({
38
38
  __name: "Popper",
39
39
  props: {
40
40
  show: { type: Boolean },
@@ -52,13 +52,13 @@ const ie = /* @__PURE__ */ _({
52
52
  ref_key: "popperRef",
53
53
  ref: e
54
54
  }, [
55
- K(t.$slots, "default", {}, void 0, !0)
56
- ], 512)) : J("", !0)
55
+ J(t.$slots, "default", {}, void 0, !0)
56
+ ], 512)) : K("", !0)
57
57
  ]),
58
58
  _: 3
59
59
  }, 16));
60
60
  }
61
- }), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ _({
61
+ }), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ b({
62
62
  inheritAttrs: !1,
63
63
  __name: "index",
64
64
  props: {
@@ -88,7 +88,7 @@ const ie = /* @__PURE__ */ _({
88
88
  for (const [c, a] of Object.entries(o))
89
89
  /^on[A-Z]/.test(c) && typeof a == "function" && (p[c] = a);
90
90
  return p;
91
- }, f = E(null), b = h(() => {
91
+ }, f = E(null), _ = h(() => {
92
92
  var o;
93
93
  return ((o = f.value) == null ? void 0 : o.popperRef) || null;
94
94
  }), m = h(() => {
@@ -110,7 +110,7 @@ const ie = /* @__PURE__ */ _({
110
110
  } = re(i), {
111
111
  width: x,
112
112
  height: P
113
- } = ne(b, void 0, {
113
+ } = ne(_, void 0, {
114
114
  box: "border-box"
115
115
  }), H = h(() => {
116
116
  const {
@@ -146,7 +146,7 @@ const ie = /* @__PURE__ */ _({
146
146
  }
147
147
  })), n({
148
148
  triggerRef: i,
149
- popperRef: b,
149
+ popperRef: _,
150
150
  update: A
151
151
  }), (o, p) => (g(), F(ee(S(s)[0]), k({
152
152
  ref: S(d)
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as _, openBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
1
+ import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, openBlock as _, createElementBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
2
2
  import { TinyRadioGroup as E } from "@opentiny/vue";
3
3
  import { f as L } from "../index5.js";
4
4
  import { _ as T } from "../_plugin-vue_export-helper.js";
@@ -37,7 +37,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
37
37
  };
38
38
  return R(() => {
39
39
  r();
40
- }), (m, e) => (v(), _("form", M, [
40
+ }), (m, e) => (_(), v("form", M, [
41
41
  t("div", S, [
42
42
  e[5] || (e[5] = t("label", { class: "form-editor__label" }, "名称", -1)),
43
43
  c(t("input", {
@@ -116,7 +116,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
116
116
  emits: ["update:codeData"],
117
117
  setup(i) {
118
118
  const d = k(i, "codeData");
119
- return (o, s) => (v(), _("div", j, [
119
+ return (o, s) => (_(), v("div", j, [
120
120
  t("div", q, [
121
121
  t("div", z, [
122
122
  c(t("textarea", {
@@ -158,7 +158,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
158
158
  }, a = (V) => {
159
159
  s("update:addType", V);
160
160
  };
161
- return (V, l) => (v(), _("div", G, [
161
+ return (V, l) => (_(), v("div", G, [
162
162
  t("div", W, [
163
163
  t("div", K, [
164
164
  l[3] || (l[3] = t("span", { class: "mcp-add-form__add-type-label" }, "添加方式", -1)),
@@ -172,13 +172,13 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
172
172
  options: x
173
173
  }, null, 8, ["modelValue"])
174
174
  ]),
175
- r.value === "form" ? (v(), _("div", Q, [
175
+ r.value === "form" ? (_(), v("div", Q, [
176
176
  y(D(h), {
177
177
  "form-data": n.value,
178
178
  "onUpdate:formData": l[1] || (l[1] = (p) => n.value = p)
179
179
  }, null, 8, ["form-data"])
180
180
  ])) : $("", !0),
181
- r.value === "code" ? (v(), _("div", X, [
181
+ r.value === "code" ? (_(), v("div", X, [
182
182
  y(D(J), {
183
183
  "code-data": u.value,
184
184
  "onUpdate:codeData": l[2] || (l[2] = (p) => u.value = p)