vlite3 1.3.4 → 1.3.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 (33) hide show
  1. package/components/Dropdown/Dropdown.vue.js +17 -16
  2. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  3. package/components/Dropdown/DropdownMenu.vue2.js +56 -56
  4. package/components/FileTree/FileTree.vue.d.ts +1 -0
  5. package/components/FileTree/FileTree.vue.js +3 -3
  6. package/components/FileTree/FileTree.vue2.js +33 -31
  7. package/components/FileTree/FileTreeNode.vue.d.ts +2 -0
  8. package/components/FileTree/FileTreeNode.vue.js +72 -70
  9. package/components/FileTree/types.d.ts +1 -0
  10. package/components/Form/Form.vue.d.ts +2 -0
  11. package/components/Form/Form.vue.js +1 -1
  12. package/components/Form/Form.vue2.js +258 -229
  13. package/components/Form/FormFields.vue.d.ts +18 -1
  14. package/components/Form/FormFields.vue.js +1 -1
  15. package/components/Form/FormFields.vue2.js +108 -96
  16. package/components/Form/types.d.ts +2 -0
  17. package/components/ImportData/ImportData.vue.js +3 -2
  18. package/components/Input.vue.js +1 -1
  19. package/components/Modal.vue.js +1 -1
  20. package/components/Modal.vue2.js +1 -1
  21. package/components/NavbarCommandPalette.vue.d.ts +1 -1
  22. package/components/Screen/Screen.vue.d.ts +2 -0
  23. package/components/Screen/Screen.vue.js +180 -176
  24. package/components/Stats/Stats.vue.d.ts +1 -1
  25. package/components/Stats/Stats.vue.js +50 -22
  26. package/components/StatusChip/status-map.js +1 -0
  27. package/components/ThemeToggle.vue.d.ts +1 -1
  28. package/components/ThemeToggle.vue.js +2 -2
  29. package/components/Timeline/TimelineItem.vue.js +74 -91
  30. package/composables/useTheme.d.ts +1 -1
  31. package/composables/useTheme.js +15 -15
  32. package/package.json +2 -2
  33. package/style.css +12 -3
@@ -1,5 +1,5 @@
1
- import { defineComponent as U, computed as a, resolveComponent as A, openBlock as s, createElementBlock as d, createElementVNode as c, normalizeClass as m, normalizeStyle as y, createCommentVNode as u, withModifiers as C, createVNode as E, createBlock as f, Fragment as K, renderList as M, toDisplayString as L, renderSlot as I, isMemoSame as G, createSlots as H, withCtx as J, mergeProps as R } from "vue";
2
- import x from "../Icon.vue.js";
1
+ import { defineComponent as U, computed as d, resolveComponent as A, openBlock as i, createElementBlock as a, createElementVNode as c, normalizeClass as m, normalizeStyle as x, createCommentVNode as u, withModifiers as L, createVNode as E, createBlock as y, Fragment as C, renderList as K, toDisplayString as M, renderSlot as I, isMemoSame as G, createSlots as H, withCtx as J, mergeProps as R } from "vue";
2
+ import f from "../Icon.vue.js";
3
3
  import W from "../CheckBox.vue.js";
4
4
  import { $t as X } from "../../utils/i18n.js";
5
5
  const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
@@ -8,7 +8,7 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
8
8
  }, _ = { class: "mr-2 text-muted-foreground shrink-0" }, ee = { class: "flex-1 truncate text-sm font-medium" }, te = { class: "mr-2 text-gray-400 select-none shrink-0" }, ne = { class: "truncate" }, le = {
9
9
  key: 0,
10
10
  class: "relative flex flex-col"
11
- }, ae = /* @__PURE__ */ U({
11
+ }, de = /* @__PURE__ */ U({
12
12
  name: "FileTreeNode",
13
13
  __name: "FileTreeNode",
14
14
  props: {
@@ -22,52 +22,53 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
22
22
  showCheckboxes: { type: Boolean, default: !1 },
23
23
  highlightSearch: { type: Boolean, default: !1 },
24
24
  searchQuery: {},
25
- variant: { default: "default" }
25
+ variant: { default: "default" },
26
+ maxLabelLength: { default: 35 }
26
27
  },
27
28
  emits: ["toggle-expand", "toggle-select", "click-node"],
28
29
  setup(e, { emit: P }) {
29
- const l = e, v = P, w = a(() => l.selectedKeys.has(l.node.id)), Q = a(() => l.indeterminateKeys.has(l.node.id)), k = a(() => l.expandedKeys.has(l.node.id)), S = a(() => l.loadingKeys.has(l.node.id)), g = a(
30
- () => l.node.isFolder || l.node.children && l.node.children.length > 0
31
- ), q = a(() => l.depth * 20 + "px"), $ = a(() => l.node.labelI18n ? X(l.node.labelI18n) : l.node.label), z = a(() => {
32
- const t = $.value, n = 35;
33
- if (t.length <= n) return t;
30
+ const n = e, b = P, w = d(() => n.selectedKeys.has(n.node.id)), Q = d(() => n.indeterminateKeys.has(n.node.id)), v = d(() => n.expandedKeys.has(n.node.id)), S = d(() => n.loadingKeys.has(n.node.id)), g = d(
31
+ () => n.node.isFolder || n.node.children && n.node.children.length > 0
32
+ ), q = d(() => n.depth * 20 + "px"), $ = d(() => n.node.labelI18n ? X(n.node.labelI18n) : n.node.label), z = d(() => {
33
+ const t = $.value, l = n.maxLabelLength;
34
+ if (t.length <= l) return t;
34
35
  const o = t.lastIndexOf(".");
35
36
  if (o === -1 || t.length - o > 10)
36
- return t.substring(0, n) + "...";
37
- const i = t.substring(o), h = t.substring(0, o), F = Math.max(0, n - i.length - 3);
38
- return h.substring(0, F) + "..." + i;
39
- }), V = a(() => {
37
+ return t.substring(0, l) + "...";
38
+ const s = t.substring(o), h = t.substring(0, o), F = Math.max(0, l - s.length - 3);
39
+ return h.substring(0, F) + "..." + s;
40
+ }), V = d(() => {
40
41
  const t = z.value;
41
- if (!l.highlightSearch || !l.searchQuery)
42
+ if (!n.highlightSearch || !n.searchQuery)
42
43
  return [{ text: t, highlight: !1 }];
43
- const n = l.searchQuery.toLowerCase(), o = t.toLowerCase().indexOf(n);
44
+ const l = n.searchQuery.toLowerCase(), o = t.toLowerCase().indexOf(l);
44
45
  return o === -1 ? [{ text: t, highlight: !1 }] : [
45
46
  { text: t.slice(0, o), highlight: !1 },
46
47
  {
47
- text: t.slice(o, o + n.length),
48
+ text: t.slice(o, o + l.length),
48
49
  highlight: !0
49
50
  },
50
- { text: t.slice(o + n.length), highlight: !1 }
51
+ { text: t.slice(o + l.length), highlight: !1 }
51
52
  ];
52
- }), D = a(() => {
53
- const t = l.node.searchMatch;
53
+ }), D = d(() => {
54
+ const t = n.node.searchMatch;
54
55
  if (!t) return [];
55
- const n = t.line_content, o = t.match_start, i = t.match_length;
56
- return o < 0 || o >= n.length ? [{ text: n, highlight: !1 }] : [
57
- { text: n.substring(0, o), highlight: !1 },
58
- { text: n.substring(o, o + i), highlight: !0 },
59
- { text: n.substring(o + i), highlight: !1 }
56
+ const l = t.line_content, o = t.match_start, s = t.match_length;
57
+ return o < 0 || o >= l.length ? [{ text: l, highlight: !1 }] : [
58
+ { text: l.substring(0, o), highlight: !1 },
59
+ { text: l.substring(o, o + s), highlight: !0 },
60
+ { text: l.substring(o + s), highlight: !1 }
60
61
  ];
61
62
  }), N = (t) => {
62
- t && t.stopPropagation(), v("toggle-expand", l.node);
63
+ t && t.stopPropagation(), b("toggle-expand", n.node);
63
64
  }, O = () => {
64
- v("toggle-select", l.node);
65
+ b("toggle-select", n.node);
65
66
  }, j = (t) => {
66
- t.stopPropagation(), g.value ? N() : l.selectionMode !== "none" && v("toggle-select", l.node), v("click-node", l.node);
67
+ t.stopPropagation(), g.value ? N() : n.selectionMode !== "none" && b("toggle-select", n.node), b("click-node", n.node);
67
68
  };
68
- return (t, n) => {
69
+ return (t, l) => {
69
70
  const o = A("FileTreeNode", !0);
70
- return s(), d("div", Y, [
71
+ return i(), a("div", Y, [
71
72
  c("div", {
72
73
  class: m(["group flex flex-col transition-colors cursor-pointer relative", {
73
74
  "bg-accent/50 text-accent-foreground": w.value && e.selectionMode === "single" && !e.showCheckboxes,
@@ -79,30 +80,30 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
79
80
  onClick: j,
80
81
  title: $.value
81
82
  }, [
82
- e.variant === "bordered" ? (s(), d("div", {
83
+ e.variant === "bordered" ? (i(), a("div", {
83
84
  key: 0,
84
85
  class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
85
- style: y({ left: e.depth * 20 + "px" })
86
+ style: x({ left: e.depth * 20 + "px" })
86
87
  }, null, 4)) : u("", !0),
87
88
  c("div", {
88
89
  class: m(["flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
89
- style: y({ paddingLeft: q.value })
90
+ style: x({ paddingLeft: q.value })
90
91
  }, [
91
- g.value ? (s(), d("button", {
92
+ g.value ? (i(), a("button", {
92
93
  key: 0,
93
94
  type: "button",
94
- class: m(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": k.value }]),
95
- onClick: C(N, ["stop"])
95
+ class: m(["p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": v.value }]),
96
+ onClick: L(N, ["stop"])
96
97
  }, [
97
- E(x, {
98
+ E(f, {
98
99
  icon: "lucide:chevron-right",
99
100
  class: "w-4 h-4"
100
101
  })
101
- ], 2)) : (s(), d("div", p)),
102
- e.showCheckboxes && e.selectionMode !== "none" ? (s(), d("div", {
102
+ ], 2)) : (i(), a("div", p)),
103
+ e.showCheckboxes && e.selectionMode !== "none" ? (i(), a("div", {
103
104
  key: 2,
104
105
  class: "mr-2 flex items-center justify-center bg-transparent",
105
- onClick: n[0] || (n[0] = C(() => {
106
+ onClick: l[0] || (l[0] = L(() => {
106
107
  }, ["stop"]))
107
108
  }, [
108
109
  E(W, {
@@ -115,68 +116,68 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
115
116
  }, null, 8, ["checked", "indeterminate", "disabled"])
116
117
  ])) : u("", !0),
117
118
  c("div", _, [
118
- S.value ? (s(), f(x, {
119
+ S.value ? (i(), y(f, {
119
120
  key: 0,
120
121
  icon: "lucide:loader-2",
121
122
  class: "w-4 h-4 animate-spin"
122
- })) : e.node.icon ? (s(), f(x, {
123
+ })) : e.node.icon ? (i(), y(f, {
123
124
  key: 1,
124
125
  icon: e.node.icon,
125
126
  class: "w-4 h-4"
126
- }, null, 8, ["icon"])) : g.value ? (s(), f(x, {
127
+ }, null, 8, ["icon"])) : g.value ? (i(), y(f, {
127
128
  key: 2,
128
- icon: k.value ? "lucide:folder-open" : "lucide:folder",
129
+ icon: v.value ? "lucide:folder-open" : "lucide:folder",
129
130
  class: "w-4 h-4"
130
- }, null, 8, ["icon"])) : (s(), f(x, {
131
+ }, null, 8, ["icon"])) : (i(), y(f, {
131
132
  key: 3,
132
133
  icon: "lucide:file",
133
134
  class: "w-4 h-4"
134
135
  }))
135
136
  ]),
136
137
  c("div", ee, [
137
- (s(!0), d(K, null, M(V.value, (i, h) => (s(), d("span", {
138
+ (i(!0), a(C, null, K(V.value, (s, h) => (i(), a("span", {
138
139
  key: h,
139
140
  class: m({
140
- "bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
141
+ "bg-yellow-100 text-yellow-900 rounded-sm px-0.5": s.highlight
141
142
  })
142
- }, L(i.text), 3))), 128))
143
+ }, M(s.text), 3))), 128))
143
144
  ]),
144
- t.$slots.actions ? (s(), d("div", {
145
+ t.$slots.actions ? (i(), a("div", {
145
146
  key: 3,
146
147
  class: "ml-2 flex items-center shrink-0",
147
- onClick: n[1] || (n[1] = C(() => {
148
+ onClick: l[1] || (l[1] = L(() => {
148
149
  }, ["stop"]))
149
150
  }, [
150
151
  I(t.$slots, "actions", { node: e.node })
151
152
  ])) : u("", !0)
152
153
  ], 6),
153
- e.node.searchMatch ? (s(), d("div", {
154
+ e.node.searchMatch ? (i(), a("div", {
154
155
  key: 1,
155
156
  class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
156
- style: y({ paddingLeft: e.depth * 20 + 28 + "px" })
157
+ style: x({ paddingLeft: e.depth * 20 + 28 + "px" })
157
158
  }, [
158
- c("span", te, "L" + L(e.node.searchMatch.line_number), 1),
159
+ c("span", te, "L" + M(e.node.searchMatch.line_number), 1),
159
160
  c("div", ne, [
160
- (s(!0), d(K, null, M(D.value, (i, h) => (s(), d("span", {
161
+ (i(!0), a(C, null, K(D.value, (s, h) => (i(), a("span", {
161
162
  key: h,
162
163
  class: m({
163
- "bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": i.highlight
164
+ "bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": s.highlight
164
165
  })
165
- }, L(i.text), 3))), 128))
166
+ }, M(s.text), 3))), 128))
166
167
  ])
167
168
  ], 4)) : u("", !0)
168
169
  ], 10, Z),
169
- k.value && g.value && !S.value ? (s(), d("div", le, [
170
+ v.value && g.value && !S.value ? (i(), a("div", le, [
170
171
  c("div", {
171
172
  class: "absolute top-1 bottom-1 border-l border-border",
172
- style: y({ left: e.depth * 20 + 10 + "px" })
173
+ style: x({ left: e.depth * 20 + 10 + "px" })
173
174
  }, null, 4),
174
- e.node.children && e.node.children.length > 0 ? (s(!0), d(K, { key: 0 }, M(e.node.children, (i, h, F, b) => {
175
- const T = [i, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, !!t.$slots.actions];
176
- if (b && b.key === i.id && G(b, T)) return b;
177
- const B = (s(), f(o, {
178
- key: i.id,
179
- node: i,
175
+ e.node.children && e.node.children.length > 0 ? (i(!0), a(C, { key: 0 }, K(e.node.children, (s, h, F, k) => {
176
+ const T = [s, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, e.maxLabelLength, !!t.$slots.actions];
177
+ if (k && k.key === s.id && G(k, T)) return k;
178
+ const B = (i(), y(o, {
179
+ key: s.id,
180
+ node: s,
180
181
  depth: e.depth + 1,
181
182
  "selection-mode": e.selectionMode,
182
183
  "selected-keys": e.selectedKeys,
@@ -187,9 +188,10 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
187
188
  "highlight-search": e.highlightSearch,
188
189
  "search-query": e.searchQuery,
189
190
  variant: e.variant,
190
- onToggleExpand: n[2] || (n[2] = (r) => t.$emit("toggle-expand", r)),
191
- onToggleSelect: n[3] || (n[3] = (r) => t.$emit("toggle-select", r)),
192
- onClickNode: n[4] || (n[4] = (r) => t.$emit("click-node", r))
191
+ "max-label-length": e.maxLabelLength,
192
+ onToggleExpand: l[2] || (l[2] = (r) => t.$emit("toggle-expand", r)),
193
+ onToggleSelect: l[3] || (l[3] = (r) => t.$emit("toggle-select", r)),
194
+ onClickNode: l[4] || (l[4] = (r) => t.$emit("click-node", r))
193
195
  }, H({ _: 2 }, [
194
196
  t.$slots.actions ? {
195
197
  name: "actions",
@@ -198,12 +200,12 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
198
200
  ]),
199
201
  key: "0"
200
202
  } : void 0
201
- ]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant"]));
203
+ ]), 1032, ["node", "depth", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
202
204
  return B.memo = T, B;
203
- }, n, 5), 128)) : k.value && g.value && (!e.node.children || e.node.children.length === 0) ? (s(), d("div", {
205
+ }, l, 5), 128)) : v.value && g.value && (!e.node.children || e.node.children.length === 0) ? (i(), a("div", {
204
206
  key: 1,
205
207
  class: "py-0.5 text-xs text-muted-foreground italic",
206
- style: y({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
208
+ style: x({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
207
209
  }, null, 4)) : u("", !0)
208
210
  ])) : u("", !0)
209
211
  ]);
@@ -211,5 +213,5 @@ const Y = { class: "flex flex-col select-none" }, Z = ["title"], p = {
211
213
  }
212
214
  });
213
215
  export {
214
- ae as default
216
+ de as default
215
217
  };
@@ -32,6 +32,7 @@ export interface FileTreeProps {
32
32
  emptyText?: string;
33
33
  emptyTextI18n?: string;
34
34
  variant?: FileTreeVariant;
35
+ maxLabelLength?: number;
35
36
  }
36
37
  export interface FileTreeEvents {
37
38
  (e: 'update:modelValue', keys: string[]): void;
@@ -37,6 +37,7 @@ interface Props {
37
37
  pageHeaderClass?: string;
38
38
  backButtonProps?: ButtonProps;
39
39
  backButtonPath?: string;
40
+ layout?: 'vertical' | 'inline';
40
41
  }
41
42
  declare function __VLS_template(): {
42
43
  attrs: Partial<{}>;
@@ -87,6 +88,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
87
88
  footer: boolean;
88
89
  class: string;
89
90
  loading: boolean;
91
+ layout: "vertical" | "inline";
90
92
  isUpdate: boolean;
91
93
  folderId: string;
92
94
  className: string;
@@ -1,7 +1,7 @@
1
1
  import o from "./Form.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fdd38572"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c8a43921"]]);
5
5
  export {
6
6
  p as default
7
7
  };