vlite3 1.3.3 → 1.3.5

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