@opentiny/tiny-robot 0.3.0-alpha.9 → 0.3.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.
@@ -1,15 +1,15 @@
1
- import { defineComponent as J, useSlots as Q, computed as a, createElementBlock as m, openBlock as r, normalizeClass as w, renderSlot as H, createBlock as S, resolveDynamicComponent as b, createCommentVNode as M, toDisplayString as ne, mergeModels as N, useModel as le, ref as d, watch as R, nextTick as $, createElementVNode as D, Fragment as z, renderList as G, isVNode as K, createVNode as j, Transition as se, withCtx as re, unref as ae } from "vue";
2
- import { K as ie } from "../tiny-robot-svgs.js";
3
- import { c as ce, d as q, w as ue, o as fe, e as de } from "../index2.js";
1
+ import { defineComponent as J, useSlots as K, computed as a, createElementBlock as m, openBlock as r, normalizeClass as w, renderSlot as H, createBlock as S, resolveDynamicComponent as b, createCommentVNode as A, toDisplayString as ne, mergeModels as N, useModel as le, ref as d, watch as R, nextTick as $, createElementVNode as D, Fragment as z, renderList as G, isVNode as U, createVNode as j, Transition as se, withCtx as re, unref as ae } from "vue";
2
+ import { IconArrowUp as ie } from "@opentiny/tiny-robot-svgs";
3
+ import { e as ce, b as q, f as ue, o as fe, g as de } from "../index2.js";
4
4
  import { u as me } from "../useSlotRefs.js";
5
- import { _ as U } from "../_plugin-vue_export-helper.js";
5
+ import { _ as Q } from "../_plugin-vue_export-helper.js";
6
6
  const pe = { key: 0 }, ge = /* @__PURE__ */ J({
7
7
  __name: "PillButton",
8
8
  props: {
9
9
  item: {}
10
10
  },
11
11
  setup(i) {
12
- const v = i, _ = Q(), p = a(() => {
12
+ const v = i, _ = K(), p = a(() => {
13
13
  var o;
14
14
  return !!(_.icon || (o = v.item) != null && o.icon);
15
15
  }), I = a(() => {
@@ -28,12 +28,12 @@ const pe = { key: 0 }, ge = /* @__PURE__ */ J({
28
28
  H(o.$slots, "default", {}, () => {
29
29
  var c;
30
30
  return [
31
- (c = o.item) != null && c.text ? (r(), m("span", pe, ne(o.item.text), 1)) : M("", !0)
31
+ (c = o.item) != null && c.text ? (r(), m("span", pe, ne(o.item.text), 1)) : A("", !0)
32
32
  ];
33
33
  }, !0)
34
34
  ], 2));
35
35
  }
36
- }), h = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-5c433c31"]]), he = { class: "tr-suggestion-pills__more-wrapper" }, ve = /* @__PURE__ */ J({
36
+ }), h = /* @__PURE__ */ Q(ge, [["__scopeId", "data-v-5c433c31"]]), he = { class: "tr-suggestion-pills__more-wrapper" }, ve = /* @__PURE__ */ J({
37
37
  __name: "index",
38
38
  props: /* @__PURE__ */ N({
39
39
  showAll: { type: Boolean },
@@ -46,11 +46,11 @@ const pe = { key: 0 }, ge = /* @__PURE__ */ J({
46
46
  }),
47
47
  emits: /* @__PURE__ */ N(["click-outside"], ["update:showAll"]),
48
48
  setup(i, { expose: v, emit: _ }) {
49
- const p = i, I = Q(), x = _, { vnodes: o } = me(I.default, !0), u = le(i, "showAll"), c = d(null), f = d(null), A = d(null), { width: W } = ce(f), C = d(0), B = a(() => p.overflowMode === "expand" && W.value < C.value), g = d(-1), X = a(() => B.value && u.value ? o.value.slice(0, g.value) : o.value), T = a(() => B.value && u.value ? o.value.slice(g.value).map((e, t) => ({
49
+ const p = i, I = K(), x = _, { vnodes: o } = me(I.default, !0), u = le(i, "showAll"), c = d(null), f = d(null), M = d(null), { width: W } = ce(f), C = d(0), B = a(() => p.overflowMode === "expand" && W.value < C.value), g = d(-1), X = a(() => B.value && u.value ? o.value.slice(0, g.value) : o.value), T = a(() => B.value && u.value ? o.value.slice(g.value).map((e, t) => ({
50
50
  vnode: e,
51
51
  index: t + g.value
52
52
  })) : []), E = d([]), P = d([]), V = a(() => E.value.map((e) => q(e)).filter((e) => e instanceof Element)), Y = a(() => P.value.map((e) => q(e)).filter((e) => e instanceof Element)), L = () => {
53
- const e = f.value, t = A.value;
53
+ const e = f.value, t = M.value;
54
54
  return Array.from((e == null ? void 0 : e.children) || []).concat(Array.from((t == null ? void 0 : t.children) || []));
55
55
  }, O = () => {
56
56
  $(() => {
@@ -122,7 +122,7 @@ const pe = { key: 0 }, ge = /* @__PURE__ */ J({
122
122
  ref: f
123
123
  }, [
124
124
  (r(!0), m(z, null, G(X.value, (n, l) => (r(), S(b(n), {
125
- key: K(n) ? n.key : l,
125
+ key: U(n) ? n.key : l,
126
126
  ref_for: !0,
127
127
  ref_key: "staticMaybeItemRefs",
128
128
  ref: E
@@ -135,15 +135,15 @@ const pe = { key: 0 }, ge = /* @__PURE__ */ J({
135
135
  key: 0,
136
136
  class: "tr-suggestion-pills__more",
137
137
  ref_key: "floatingItemsRef",
138
- ref: A
138
+ ref: M
139
139
  }, [
140
140
  (r(!0), m(z, null, G(T.value, ({ vnode: n, index: l }) => (r(), S(b(n), {
141
- key: K(n) ? n.key : l,
141
+ key: U(n) ? n.key : l,
142
142
  ref_for: !0,
143
143
  ref_key: "floatingMaybeItemRefs",
144
144
  ref: P
145
145
  }))), 128))
146
- ], 512)) : M("", !0)
146
+ ], 512)) : A("", !0)
147
147
  ]),
148
148
  _: 1
149
149
  })
@@ -156,10 +156,10 @@ const pe = { key: 0 }, ge = /* @__PURE__ */ J({
156
156
  j(ae(ie), {
157
157
  class: w(["tr-suggestion-pills__expand-icon", { rotate: u.value }])
158
158
  }, null, 8, ["class"])
159
- ], 2)) : M("", !0)
159
+ ], 2)) : A("", !0)
160
160
  ], 512));
161
161
  }
162
- }), k = /* @__PURE__ */ U(ve, [["__scopeId", "data-v-ebbd7a00"]]);
162
+ }), k = /* @__PURE__ */ Q(ve, [["__scopeId", "data-v-ebbd7a00"]]);
163
163
  k.name = "TrSuggestionPills";
164
164
  const _e = function(i) {
165
165
  i.component(k.name, k);