@opentiny/tiny-robot 0.4.2-alpha.0 → 0.4.2-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/index7.js CHANGED
@@ -1,5 +1,5 @@
1
- import { onMounted as ne, onBeforeUnmount as oe, ref as _, defineComponent as P, openBlock as r, createElementBlock as a, createElementVNode as w, createVNode as T, 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
- import { IconEmptySearch as ue, IconEditPen as ce, IconDelete as de, IconCheck as me, IconClose as fe, IconMenu2 as pe } from "@opentiny/tiny-robot-svgs";
1
+ import { onMounted as ne, onBeforeUnmount as oe, ref as _, defineComponent as P, openBlock as l, createElementBlock as u, createElementVNode as w, createVNode as T, 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 re, withModifiers as J, vModelText as le, vShow as ue } from "vue";
2
+ import { IconEmptySearch as ae, IconEditPen as ce, IconDelete as de, IconCheck as me, IconClose as fe, IconMore as pe } from "@opentiny/tiny-robot-svgs";
3
3
  import { _ as z } from "./_plugin-vue_export-helper.js";
4
4
  import { o as Z, d as ve, c as ge, b as ye } from "./index4.js";
5
5
  import { t as O } from "./utils.js";
@@ -38,9 +38,9 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
38
38
  },
39
39
  setup(s) {
40
40
  const m = s;
41
- return (t, c) => (r(), a("div", ke, [
41
+ return (t, c) => (l(), u("div", ke, [
42
42
  w("span", Le, [
43
- T(n(ue))
43
+ T(n(ae))
44
44
  ]),
45
45
  w("span", Ee, B(m.text), 1)
46
46
  ]));
@@ -76,19 +76,19 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
76
76
  }), v = (L) => {
77
77
  C("item-click", L), t.value = null, c.value = null;
78
78
  };
79
- return (L, g) => (r(), a("ul", {
79
+ return (L, g) => (l(), u("ul", {
80
80
  class: "tr-history__menu-list",
81
81
  ref_key: "menuRef",
82
82
  ref: E,
83
83
  style: ie(o.value)
84
84
  }, [
85
- (r(!0), a(S, null, V(h.items, (u) => (r(), a("li", {
85
+ (l(!0), u(S, null, V(h.items, (a) => (l(), u("li", {
86
86
  class: "tr-history__menu-list__item",
87
- key: u.id,
88
- onClick: (K) => v(u)
87
+ key: a.id,
88
+ onClick: (K) => v(a)
89
89
  }, [
90
- (r(), H(Y(u.icon))),
91
- w("span", null, B(u.text), 1)
90
+ (l(), H(Y(a.icon))),
91
+ w("span", null, B(a.text), 1)
92
92
  ], 8, Ie))), 128))
93
93
  ], 4));
94
94
  }
@@ -170,41 +170,41 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
170
170
  onItemTitleChange: (i, e) => {
171
171
  c("item-title-change", i, e);
172
172
  }
173
- }), { isTouchDevice: L } = Ce(), g = _(null), u = _(null), K = (i, e) => {
173
+ }), { isTouchDevice: L } = Ce(), g = _(null), a = _(null), K = (i, e) => {
174
174
  if (i.currentTarget instanceof HTMLButtonElement) {
175
- if (u.value === e) {
176
- g.value = null, u.value = null;
175
+ if (a.value === e) {
176
+ g.value = null, a.value = null;
177
177
  return;
178
178
  }
179
- g.value = i.currentTarget, u.value = e;
179
+ g.value = i.currentTarget, a.value = e;
180
180
  } else
181
- g.value = null, u.value = null;
181
+ g.value = null, a.value = null;
182
182
  }, ee = (i) => {
183
- const e = u.value;
183
+ const e = a.value;
184
184
  e && (i.id === "rename" && R(e), c("item-action", i, e));
185
185
  };
186
- return (i, e) => (r(), a("div", {
186
+ return (i, e) => (l(), u("div", {
187
187
  class: U(["tr-history", { "touch-device": n(L) }])
188
188
  }, [
189
- E.value ? (r(), H(Re, { key: 1 })) : (r(), a(S, { key: 0 }, [
190
- (r(!0), a(S, null, V(C.value, (f) => (r(), a("div", {
189
+ E.value ? (l(), H(Re, { key: 1 })) : (l(), u(S, { key: 0 }, [
190
+ (l(!0), u(S, null, V(C.value, (f) => (l(), u("div", {
191
191
  class: "tr-history__group",
192
192
  key: f.group
193
193
  }, [
194
- f.group !== n(X) ? (r(), a("div", Te, B(f.group), 1)) : G("", !0),
194
+ f.group !== n(X) ? (l(), u("div", Te, B(f.group), 1)) : G("", !0),
195
195
  w("div", $e, [
196
- (r(!0), a(S, null, V(f.items, (l, te) => (r(), a("div", {
196
+ (l(!0), u(S, null, V(f.items, (r, te) => (l(), u("div", {
197
197
  class: U(["tr-history__item", {
198
- selected: l.id && l.id === t.selected,
199
- editing: n(p) === l,
200
- active: u.value === l
198
+ selected: r.id && r.id === t.selected,
199
+ editing: n(p) === r,
200
+ active: a.value === r
201
201
  }]),
202
- key: l.id || te,
203
- onClick: (d) => c("item-click", l)
202
+ key: r.id || te,
203
+ onClick: (d) => c("item-click", r)
204
204
  }, [
205
- q(i.$slots, "item-prefix", { item: l }, void 0, !0),
206
- l.icon ? (r(), H(Y(l.icon), { key: 0 })) : G("", !0),
207
- n(p) === l ? A((r(), a("input", {
205
+ q(i.$slots, "item-prefix", { item: r }, void 0, !0),
206
+ r.icon ? (l(), H(Y(r.icon), { key: 0 })) : G("", !0),
207
+ n(p) === r ? A((l(), u("input", {
208
208
  key: 1,
209
209
  class: "tr-history__item-editor",
210
210
  type: "text",
@@ -213,7 +213,7 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
213
213
  ref_for: !0,
214
214
  ref_key: "editorRefList",
215
215
  ref: x,
216
- "onUpdate:modelValue": e[1] || (e[1] = (d) => le(k) ? k.value = d : null),
216
+ "onUpdate:modelValue": e[1] || (e[1] = (d) => re(k) ? k.value = d : null),
217
217
  onKeydown: [
218
218
  e[2] || (e[2] = F(
219
219
  //@ts-ignore
@@ -227,22 +227,22 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
227
227
  ))
228
228
  ]
229
229
  }, null, 544)), [
230
- [re, n(k)]
230
+ [le, n(k)]
231
231
  ]) : q(i.$slots, "item-title", {
232
232
  key: 2,
233
- item: l
233
+ item: r
234
234
  }, () => [
235
235
  w("span", {
236
236
  class: "text",
237
- title: l.title
238
- }, B(l.title), 9, Oe)
237
+ title: r.title
238
+ }, B(r.title), 9, Oe)
239
239
  ], !0),
240
240
  w("span", {
241
241
  class: "tr-history__item-actions",
242
242
  onClick: e[6] || (e[6] = J(() => {
243
243
  }, ["stop"]))
244
244
  }, [
245
- t.showRenameControls && n(p) === l ? (r(), a("button", {
245
+ t.showRenameControls && n(p) === r ? (l(), u("button", {
246
246
  key: 0,
247
247
  class: "editor-confirm",
248
248
  ref_for: !0,
@@ -253,7 +253,7 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
253
253
  }, [
254
254
  T(n(me))
255
255
  ], 512)) : G("", !0),
256
- t.showRenameControls && n(p) === l ? (r(), a("button", {
256
+ t.showRenameControls && n(p) === r ? (l(), u("button", {
257
257
  key: 1,
258
258
  class: "editor-cancel",
259
259
  ref_for: !0,
@@ -265,8 +265,8 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
265
265
  T(n(fe))
266
266
  ], 512)) : G("", !0),
267
267
  w("button", {
268
- class: U(["menu", { hidden: n(p) === l }]),
269
- onClick: (d) => K(d, l)
268
+ class: U(["menu", { hidden: n(p) === r }]),
269
+ onClick: (d) => K(d, r)
270
270
  }, [
271
271
  T(n(pe))
272
272
  ], 10, Se)
@@ -277,18 +277,18 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
277
277
  A(T(Me, {
278
278
  trigger: g.value,
279
279
  "onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
280
- data: u.value,
281
- "onUpdate:data": e[8] || (e[8] = (f) => u.value = f),
280
+ data: a.value,
281
+ "onUpdate:data": e[8] || (e[8] = (f) => a.value = f),
282
282
  items: t.menuItems,
283
283
  "menu-list-gap": t.menuListGap,
284
284
  onItemClick: ee
285
285
  }, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
286
- [ae, g.value]
286
+ [ue, g.value]
287
287
  ])
288
288
  ], 64))
289
289
  ], 2));
290
290
  }
291
- }), N = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-97a7e8a2"]]), De = function(s) {
291
+ }), N = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-125148d2"]]), De = function(s) {
292
292
  s.component(N.name, N);
293
293
  };
294
294
  Object.assign(N, {