vlite3 1.0.4 → 1.0.6

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.
Files changed (49) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +19 -3
  2. package/components/AttachmentsList/AttachmentsList.vue.js +274 -111
  3. package/components/AttachmentsList/fileTypeIcon.d.ts +16 -0
  4. package/components/AttachmentsList/fileTypeIcon.js +127 -0
  5. package/components/AttachmentsList/index.d.ts +1 -0
  6. package/components/AttachmentsList/types.d.ts +74 -2
  7. package/components/Avatar.vue.js +2 -2
  8. package/components/Badge.vue.js +7 -7
  9. package/components/Button.vue.js +36 -43
  10. package/components/ButtonGroup.vue.js +2 -2
  11. package/components/ButtonGroup.vue2.js +8 -8
  12. package/components/CategoryManager/CategoryManager.vue.d.ts +36 -0
  13. package/components/CategoryManager/CategoryNode.vue.d.ts +15 -0
  14. package/components/CategoryManager/index.d.ts +2 -0
  15. package/components/CategoryManager/types.d.ts +43 -0
  16. package/components/Chat/ChatBubble.vue.js +70 -56
  17. package/components/Chat/ChatInterface.vue.js +182 -142
  18. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  19. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  20. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  21. package/components/Dropdown/DropdownMenu.vue2.js +1 -0
  22. package/components/FilePicker/FilePicker.vue.js +117 -122
  23. package/components/Input.vue.js +28 -26
  24. package/components/Kanban/Kanban.vue.d.ts +7 -16
  25. package/components/Kanban/Kanban.vue.js +1 -1
  26. package/components/Kanban/Kanban.vue2.js +79 -47
  27. package/components/Kanban/KanbanBoard.vue.js +2 -2
  28. package/components/Kanban/KanbanBoard.vue2.js +21 -21
  29. package/components/Kanban/types.d.ts +3 -0
  30. package/components/List/List.vue.js +89 -85
  31. package/components/Navbar/Navbar.vue.d.ts +4 -0
  32. package/components/Navbar/Navbar.vue.js +196 -173
  33. package/components/Navbar/NavbarTabs.vue.js +72 -66
  34. package/components/NavbarCommandPalette.vue.js +11 -11
  35. package/components/NumberInput.vue.js +2 -2
  36. package/components/NumberInput.vue2.js +144 -104
  37. package/components/Screen/Screen.vue.d.ts +12 -29
  38. package/components/Screen/Screen.vue.js +228 -195
  39. package/components/Screen/components/ScreenViewToggle.vue.d.ts +6 -3
  40. package/components/Screen/components/ScreenViewToggle.vue.js +29 -34
  41. package/components/Screen/types.d.ts +59 -7
  42. package/components/Stats/Stats.vue.d.ts +1 -0
  43. package/components/Stats/Stats.vue.js +184 -156
  44. package/components/Stats/types.d.ts +1 -0
  45. package/components/Workbook/Sheet.vue.d.ts +1 -1
  46. package/directives/vRipple.js +28 -9
  47. package/index.js +87 -85
  48. package/package.json +1 -1
  49. package/style.css +1 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as J, useSlots as K, computed as g, openBlock as r, createElementBlock as l, normalizeClass as C, renderSlot as p, createBlock as x, createCommentVNode as k, createElementVNode as d, toDisplayString as N, Fragment as b, renderList as f, unref as S, isMemoSame as B, createSlots as j, withCtx as L, mergeProps as M } from "vue";
1
+ import { defineComponent as J, useSlots as K, computed as h, openBlock as r, createElementBlock as n, normalizeClass as C, renderSlot as p, createBlock as x, createCommentVNode as k, createElementVNode as d, toDisplayString as N, Fragment as f, renderList as g, unref as S, isMemoSame as B, createSlots as j, withCtx as L, mergeProps as M } from "vue";
2
2
  import Q from "../Icon.vue.js";
3
3
  import F from "./ListFieldRow.vue.js";
4
4
  import { $t as U } from "../../utils/i18n.js";
5
- import { getObjectValue as $ } from "./utils.js";
5
+ import { getObjectValue as I } from "./utils.js";
6
6
  const W = {
7
7
  key: 0,
8
8
  class: "px-3 py-2.5 border-b border-border/70 flex items-center gap-2 bg-muted/60"
@@ -32,30 +32,34 @@ const W = {
32
32
  stackedBorderStyle: { default: "none" }
33
33
  },
34
34
  setup(s) {
35
- const o = s, G = K(), y = g(() => o.fields.filter((n) => {
36
- const u = $(n.key, o.data);
37
- return n.whenTrue && !u ? !1 : n.when ? n.when(u, o.data) : !0;
38
- })), i = g(() => {
35
+ const o = s, G = K(), y = h(() => o.fields.filter((l) => {
36
+ const u = I(l.key, o.data);
37
+ return l.whenTrue && !u ? !1 : l.when ? l.when(u, o.data) : !0;
38
+ })), i = h(() => {
39
39
  if (o.columns === 1)
40
40
  return { left: [], right: [], full: y.value };
41
- const n = [], u = [], t = [];
42
- for (const h of y.value) {
43
- if (h.lineByLine) {
44
- t.push(h);
41
+ const l = [], u = [], t = [];
42
+ for (const m of y.value) {
43
+ if (m.lineByLine) {
44
+ t.push(m);
45
45
  continue;
46
46
  }
47
- n.length <= u.length ? n.push(h) : u.push(h);
47
+ l.length <= u.length ? l.push(m) : u.push(m);
48
48
  }
49
- const e = Math.abs(n.length - u.length);
49
+ const e = Math.abs(l.length - u.length);
50
50
  if (e >= 2) {
51
- const h = n.length > u.length ? n : u, a = h.splice(h.length - Math.floor(e / 2));
51
+ const m = l.length > u.length ? l : u, a = m.splice(m.length - Math.floor(e / 2));
52
52
  t.unshift(...a);
53
53
  }
54
- return { left: n, right: u, full: t };
55
- }), D = g(() => i.value.full.length > 0), P = g(
54
+ if (o.columns === 2 && l.length === u.length + 1) {
55
+ const m = l.pop();
56
+ t.unshift(m);
57
+ }
58
+ return { left: l, right: u, full: t };
59
+ }), D = h(() => i.value.full.length > 0), P = h(
56
60
  () => i.value.left.length > 0 || i.value.right.length > 0
57
- ), E = g(() => o.titleI18n ? U(o.titleI18n) : o.title ?? ""), O = g(() => o.variant === "stacked"), q = g(() => {
58
- const n = {
61
+ ), E = h(() => o.titleI18n ? U(o.titleI18n) : o.title ?? ""), O = h(() => o.variant === "stacked"), q = h(() => {
62
+ const l = {
59
63
  default: "border border-border rounded",
60
64
  card: "border border-border rounded bg-card shadow-sm",
61
65
  minimal: "rounded",
@@ -66,22 +70,22 @@ const W = {
66
70
  };
67
71
  return [
68
72
  "list-component w-full overflow-hidden",
69
- n[o.variant] ?? n.default,
73
+ l[o.variant] ?? l.default,
70
74
  o.class
71
75
  ].join(" ");
72
- }), R = g(() => o.columns === 1 ? "grid grid-cols-1" : o.columns === 3 ? "grid grid-cols-1 md:grid-cols-3" : "grid grid-cols-1 md:grid-cols-2"), T = g(() => o.columns === 1 ? "" : "border-r border-border/70"), z = g(() => o.columns === 1 ? 1 : o.columns === 3 ? 3 : 2), A = g(() => o.columns === 1 ? "grid grid-cols-1 pb-2.5 pt-1 px-1" : o.columns === 3 ? "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 pb-2.5 pt-1 px-1" : "grid grid-cols-1 sm:grid-cols-2 pb-2.5 pt-1 px-1"), I = g(
73
- () => Object.keys(G).filter((n) => !["title", "header", "footer"].includes(n))
74
- ), V = g(() => Array.from({ length: o.skeletonRows }));
75
- function H(n) {
76
- return o.stackedBorderStyle === "divider" && n % z.value !== 0 ? "flex flex-col gap-1.5 py-2 border-l border-border pl-4 pr-3.5" : "flex flex-col gap-1.5 px-3.5 py-2";
76
+ }), R = h(() => o.columns === 1 ? "grid grid-cols-1" : o.columns === 3 ? "grid grid-cols-1 md:grid-cols-3" : "grid grid-cols-1 md:grid-cols-2"), T = h(() => o.columns === 1 ? "" : "border-r border-border/70"), z = h(() => o.columns === 1 ? 1 : o.columns === 3 ? 3 : 2), A = h(() => o.columns === 1 ? "grid grid-cols-1 pb-2.5 pt-1 px-1" : o.columns === 3 ? "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 pb-2.5 pt-1 px-1" : "grid grid-cols-1 sm:grid-cols-2 pb-2.5 pt-1 px-1"), $ = h(
77
+ () => Object.keys(G).filter((l) => !["title", "header", "footer"].includes(l))
78
+ ), V = h(() => Array.from({ length: o.skeletonRows }));
79
+ function H(l) {
80
+ return o.stackedBorderStyle === "divider" && l % z.value !== 0 ? "flex flex-col gap-1.5 py-2 border-l border-border pl-4 pr-3.5" : "flex flex-col gap-1.5 px-3.5 py-2";
77
81
  }
78
- return (n, u) => (r(), l("div", {
82
+ return (l, u) => (r(), n("div", {
79
83
  class: C(q.value),
80
84
  role: "table",
81
85
  "aria-label": "Information list"
82
86
  }, [
83
- E.value || s.titleIcon || n.$slots.title ? (r(), l("div", W, [
84
- p(n.$slots, "title", {}, () => [
87
+ E.value || s.titleIcon || l.$slots.title ? (r(), n("div", W, [
88
+ p(l.$slots, "title", {}, () => [
85
89
  s.titleIcon ? (r(), x(Q, {
86
90
  key: 0,
87
91
  icon: s.titleIcon,
@@ -90,10 +94,10 @@ const W = {
90
94
  d("h3", X, N(E.value), 1)
91
95
  ])
92
96
  ])) : k("", !0),
93
- s.loading ? (r(), l(b, { key: 1 }, [
94
- O.value ? (r(), l(b, { key: 0 }, [
97
+ s.loading ? (r(), n(f, { key: 1 }, [
98
+ O.value ? (r(), n(f, { key: 0 }, [
95
99
  d("div", Y, [
96
- (r(!0), l(b, null, f(V.value, (t, e) => (r(), l("div", {
100
+ (r(!0), n(f, null, g(V.value, (t, e) => (r(), n("div", {
97
101
  key: "sk-sm-" + e,
98
102
  class: "flex justify-between gap-3 px-3 py-2.5 border-b border-border/70 last:border-b-0"
99
103
  }, [...u[10] || (u[10] = [
@@ -105,7 +109,7 @@ const W = {
105
109
  d("div", {
106
110
  class: C(A.value)
107
111
  }, [
108
- (r(!0), l(b, null, f(V.value, (t, e) => (r(), l("div", {
112
+ (r(!0), n(f, null, g(V.value, (t, e) => (r(), n("div", {
109
113
  key: "sk-s-" + e,
110
114
  class: C(H(e))
111
115
  }, [...u[11] || (u[11] = [
@@ -114,12 +118,12 @@ const W = {
114
118
  ])], 2))), 128))
115
119
  ], 2)
116
120
  ])
117
- ], 64)) : (r(), l("div", {
121
+ ], 64)) : (r(), n("div", {
118
122
  key: 1,
119
123
  class: C(R.value)
120
124
  }, [
121
125
  d("div", null, [
122
- (r(!0), l(b, null, f(V.value, (t, e) => (r(), l("div", {
126
+ (r(!0), n(f, null, g(V.value, (t, e) => (r(), n("div", {
123
127
  key: "sk-l-" + e,
124
128
  class: "flex justify-between gap-3 px-3 py-2.5 border-b border-border/70 last:border-b-0"
125
129
  }, [...u[12] || (u[12] = [
@@ -127,11 +131,11 @@ const W = {
127
131
  d("div", { class: "h-4 w-2/5 rounded bg-muted/60 animate-pulse" }, null, -1)
128
132
  ])]))), 128))
129
133
  ]),
130
- s.columns !== 1 ? (r(), l("div", {
134
+ s.columns !== 1 ? (r(), n("div", {
131
135
  key: 0,
132
136
  class: C(T.value)
133
137
  }, [
134
- (r(!0), l(b, null, f(V.value, (t, e) => (r(), l("div", {
138
+ (r(!0), n(f, null, g(V.value, (t, e) => (r(), n("div", {
135
139
  key: "sk-r-" + e,
136
140
  class: "flex justify-between gap-3 px-3 py-2.5 border-b border-border/70 last:border-b-0"
137
141
  }, [...u[13] || (u[13] = [
@@ -140,13 +144,13 @@ const W = {
140
144
  ])]))), 128))
141
145
  ], 2)) : k("", !0)
142
146
  ], 2))
143
- ], 64)) : (r(), l(b, { key: 2 }, [
144
- O.value ? (r(), l(b, { key: 0 }, [
147
+ ], 64)) : (r(), n(f, { key: 2 }, [
148
+ O.value ? (r(), n(f, { key: 0 }, [
145
149
  d("div", _, [
146
- (r(!0), l(b, null, f(y.value, (t, e, h, a) => {
147
- const m = [t, S($)(t.key, o.data), s.variant, s.showColon];
148
- if (a && a.key === "mob-" + t.key + e && B(a, m)) return a;
149
- const v = (r(), x(F, {
150
+ (r(!0), n(f, null, g(y.value, (t, e, m, a) => {
151
+ const v = [t, S(I)(t.key, o.data), s.variant, s.showColon];
152
+ if (a && a.key === "mob-" + t.key + e && B(a, v)) return a;
153
+ const c = (r(), x(F, {
150
154
  key: "mob-" + t.key + e,
151
155
  field: t,
152
156
  data: o.data,
@@ -156,24 +160,24 @@ const W = {
156
160
  "is-last": e === y.value.length - 1,
157
161
  "show-border-bottom": e < y.value.length - 1
158
162
  }, j({ _: 2 }, [
159
- f(I.value, (c) => ({
160
- name: c,
163
+ g($.value, (b) => ({
164
+ name: b,
161
165
  fn: L((w) => [
162
- p(n.$slots, c, M({ ref_for: !0 }, w))
166
+ p(l.$slots, b, M({ ref_for: !0 }, w))
163
167
  ])
164
168
  }))
165
169
  ]), 1032, ["field", "data", "index", "show-colon", "is-last", "show-border-bottom"]));
166
- return v.memo = m, v;
170
+ return c.memo = v, c;
167
171
  }, u, 0), 128))
168
172
  ]),
169
173
  d("div", ee, [
170
174
  d("div", {
171
175
  class: C(A.value)
172
176
  }, [
173
- (r(!0), l(b, null, f(y.value, (t, e, h, a) => {
174
- const m = [t, S($)(t.key, o.data), s.variant, s.showColon];
175
- if (a && a.key === t.key + e && B(a, m)) return a;
176
- const v = (r(), x(F, {
177
+ (r(!0), n(f, null, g(y.value, (t, e, m, a) => {
178
+ const v = [t, S(I)(t.key, o.data), s.variant, s.showColon];
179
+ if (a && a.key === t.key + e && B(a, v)) return a;
180
+ const c = (r(), x(F, {
177
181
  key: t.key + e,
178
182
  field: t,
179
183
  data: o.data,
@@ -185,30 +189,30 @@ const W = {
185
189
  "stacked-col-index": e % z.value,
186
190
  "stacked-border-style": s.stackedBorderStyle
187
191
  }, j({ _: 2 }, [
188
- f(I.value, (c) => ({
189
- name: c,
192
+ g($.value, (b) => ({
193
+ name: b,
190
194
  fn: L((w) => [
191
- p(n.$slots, c, M({ ref_for: !0 }, w))
195
+ p(l.$slots, b, M({ ref_for: !0 }, w))
192
196
  ])
193
197
  }))
194
198
  ]), 1032, ["field", "data", "index", "variant", "is-last", "stacked-col-index", "stacked-border-style"]));
195
- return v.memo = m, v;
199
+ return c.memo = v, c;
196
200
  }, u, 2), 128))
197
201
  ], 2)
198
202
  ]),
199
- y.value.length === 0 ? (r(), l("div", te, " No information to display. ")) : k("", !0)
200
- ], 64)) : (r(), l(b, { key: 1 }, [
203
+ y.value.length === 0 ? (r(), n("div", te, " No information to display. ")) : k("", !0)
204
+ ], 64)) : (r(), n(f, { key: 1 }, [
201
205
  d("div", {
202
206
  class: C(R.value)
203
207
  }, [
204
- i.value.left.length > 0 ? (r(), l("div", {
208
+ i.value.left.length > 0 ? (r(), n("div", {
205
209
  key: 0,
206
210
  class: C(T.value)
207
211
  }, [
208
- (r(!0), l(b, null, f(i.value.left, (t, e, h, a) => {
209
- const m = [t, S($)(t.key, o.data), s.variant, s.showColon];
210
- if (a && a.key === t.key + e && B(a, m)) return a;
211
- const v = (r(), x(F, {
212
+ (r(!0), n(f, null, g(i.value.left, (t, e, m, a) => {
213
+ const v = [t, S(I)(t.key, o.data), s.variant, s.showColon];
214
+ if (a && a.key === t.key + e && B(a, v)) return a;
215
+ const c = (r(), x(F, {
212
216
  key: t.key + e,
213
217
  field: t,
214
218
  data: o.data,
@@ -218,21 +222,21 @@ const W = {
218
222
  "is-last": e === i.value.left.length - 1,
219
223
  "show-border-bottom": e < i.value.left.length - 1 || e === i.value.left.length - 1 && !D.value
220
224
  }, j({ _: 2 }, [
221
- f(I.value, (c) => ({
222
- name: c,
225
+ g($.value, (b) => ({
226
+ name: b,
223
227
  fn: L((w) => [
224
- p(n.$slots, c, M({ ref_for: !0 }, w))
228
+ p(l.$slots, b, M({ ref_for: !0 }, w))
225
229
  ])
226
230
  }))
227
231
  ]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]));
228
- return v.memo = m, v;
232
+ return c.memo = v, c;
229
233
  }, u, 4), 128))
230
234
  ], 2)) : k("", !0),
231
- s.columns !== 1 && i.value.right.length > 0 ? (r(), l("div", re, [
232
- (r(!0), l(b, null, f(i.value.right, (t, e, h, a) => {
233
- const m = [t, S($)(t.key, o.data), s.variant, s.showColon];
234
- if (a && a.key === t.key + e && B(a, m)) return a;
235
- const v = (r(), x(F, {
235
+ s.columns !== 1 && i.value.right.length > 0 ? (r(), n("div", re, [
236
+ (r(!0), n(f, null, g(i.value.right, (t, e, m, a) => {
237
+ const v = [t, S(I)(t.key, o.data), s.variant, s.showColon];
238
+ if (a && a.key === t.key + e && B(a, v)) return a;
239
+ const c = (r(), x(F, {
236
240
  key: t.key + e,
237
241
  field: t,
238
242
  data: o.data,
@@ -242,26 +246,26 @@ const W = {
242
246
  "is-last": e === i.value.right.length - 1,
243
247
  "show-border-bottom": e < i.value.right.length - 1 || e === i.value.right.length - 1 && !D.value
244
248
  }, j({ _: 2 }, [
245
- f(I.value, (c) => ({
246
- name: c,
249
+ g($.value, (b) => ({
250
+ name: b,
247
251
  fn: L((w) => [
248
- p(n.$slots, c, M({ ref_for: !0 }, w))
252
+ p(l.$slots, b, M({ ref_for: !0 }, w))
249
253
  ])
250
254
  }))
251
255
  ]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]));
252
- return v.memo = m, v;
256
+ return c.memo = v, c;
253
257
  }, u, 6), 128))
254
258
  ])) : k("", !0),
255
- s.columns === 3 ? (r(), l("div", oe)) : k("", !0)
259
+ s.columns === 3 ? (r(), n("div", oe)) : k("", !0)
256
260
  ], 2),
257
- D.value ? (r(), l("div", {
261
+ D.value ? (r(), n("div", {
258
262
  key: 0,
259
263
  class: C(P.value ? "border-t border-border" : "")
260
264
  }, [
261
- (r(!0), l(b, null, f(i.value.full, (t, e, h, a) => {
262
- const m = [t, S($)(t.key, o.data), s.variant, s.showColon];
263
- if (a && a.key === t.key + e && B(a, m)) return a;
264
- const v = (r(), x(F, {
265
+ (r(!0), n(f, null, g(i.value.full, (t, e, m, a) => {
266
+ const v = [t, S(I)(t.key, o.data), s.variant, s.showColon];
267
+ if (a && a.key === t.key + e && B(a, v)) return a;
268
+ const c = (r(), x(F, {
265
269
  key: t.key + e,
266
270
  field: t,
267
271
  data: o.data,
@@ -271,21 +275,21 @@ const W = {
271
275
  "is-last": e === i.value.full.length - 1,
272
276
  "show-border-bottom": e < i.value.full.length - 1
273
277
  }, j({ _: 2 }, [
274
- f(I.value, (c) => ({
275
- name: c,
278
+ g($.value, (b) => ({
279
+ name: b,
276
280
  fn: L((w) => [
277
- p(n.$slots, c, M({ ref_for: !0 }, w))
281
+ p(l.$slots, b, M({ ref_for: !0 }, w))
278
282
  ])
279
283
  }))
280
284
  ]), 1032, ["field", "data", "index", "variant", "show-colon", "is-last", "show-border-bottom"]));
281
- return v.memo = m, v;
285
+ return c.memo = v, c;
282
286
  }, u, 8), 128))
283
287
  ], 2)) : k("", !0),
284
- y.value.length === 0 ? (r(), l("div", le, " No information to display. ")) : k("", !0)
288
+ y.value.length === 0 ? (r(), n("div", le, " No information to display. ")) : k("", !0)
285
289
  ], 64))
286
290
  ], 64)),
287
- n.$slots.footer ? (r(), l("div", ne, [
288
- p(n.$slots, "footer")
291
+ l.$slots.footer ? (r(), n("div", ne, [
292
+ p(l.$slots, "footer")
289
293
  ])) : k("", !0)
290
294
  ], 2));
291
295
  }
@@ -71,6 +71,8 @@ declare function __VLS_template(): {
71
71
  'mobile-menu'?(_: {}): any;
72
72
  };
73
73
  refs: {
74
+ layoutMainRef: HTMLElement;
75
+ mainScrollRef: HTMLDivElement;
74
76
  mobileTriggerRef: HTMLButtonElement;
75
77
  mobileMenuRef: HTMLDivElement;
76
78
  };
@@ -109,6 +111,8 @@ declare const __VLS_component: import('vue').DefineComponent<NavbarProps, {}, {}
109
111
  breadcrumbClass: string;
110
112
  layoutMode: import('../../types/navbar.type').NavbarLayoutMode;
111
113
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
114
+ layoutMainRef: HTMLElement;
115
+ mainScrollRef: HTMLDivElement;
112
116
  mobileTriggerRef: HTMLButtonElement;
113
117
  mobileMenuRef: HTMLDivElement;
114
118
  }, any>;