@leavepulse/ui 0.14.9 → 0.14.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.
@@ -0,0 +1,371 @@
1
+ import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot, mergeProps, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { subtreeIds, subtreeSize, formatSize, sortNodes, ancestorIds, checkStateOf } from "../components/fileTree.js";
3
+ import { _ as _sfc_main$1 } from "./LpEmptyState-CrfyRJUG.js";
4
+ import { _ as _sfc_main$3 } from "./LpFileTreeNode-D3lNEP-1.js";
5
+ import { _ as _sfc_main$2 } from "./LpScrollArea-BtnZCCBT.js";
6
+ const _hoisted_1 = {
7
+ key: 0,
8
+ class: "flex flex-col gap-1"
9
+ };
10
+ const _hoisted_2 = {
11
+ key: 2,
12
+ class: "flex min-h-0 flex-col"
13
+ };
14
+ const _hoisted_3 = ["aria-multiselectable"];
15
+ const _hoisted_4 = {
16
+ key: 0,
17
+ class: "shrink-0 border-t border-line px-2 py-1.5 text-xs text-muted"
18
+ };
19
+ const _sfc_main = /* @__PURE__ */ defineComponent({
20
+ __name: "LpFileTree",
21
+ props: {
22
+ nodes: {},
23
+ selected: {},
24
+ expanded: {},
25
+ loadingIds: {},
26
+ checkable: { type: Boolean, default: false },
27
+ checked: {},
28
+ showSize: { type: Boolean, default: false },
29
+ showModified: { type: Boolean, default: false },
30
+ sort: { type: Boolean, default: true },
31
+ iconSize: { default: 15 },
32
+ loading: { type: Boolean, default: false },
33
+ skeletonRows: { default: 8 },
34
+ emptyLabel: { default: "No files" },
35
+ emptyDescription: { default: "This folder is empty." }
36
+ },
37
+ emits: ["update:selected", "update:expanded", "select", "open", "expand", "collapse", "update:checked", "summary"],
38
+ setup(__props, { expose: __expose, emit: __emit }) {
39
+ const props = __props;
40
+ const emit = __emit;
41
+ const openIds = ref(new Set(props.expanded ?? []));
42
+ watch(
43
+ () => props.expanded,
44
+ (ids) => {
45
+ if (ids) openIds.value = new Set(ids);
46
+ }
47
+ );
48
+ const loadingSet = computed(() => new Set(props.loadingIds ?? []));
49
+ const checkedIds = ref(new Set(props.checked ?? []));
50
+ watch(
51
+ () => props.checked,
52
+ (ids) => {
53
+ if (ids) checkedIds.value = new Set(ids);
54
+ }
55
+ );
56
+ const byId = computed(() => {
57
+ const map = /* @__PURE__ */ new Map();
58
+ function walk(list) {
59
+ for (const node of list) {
60
+ map.set(node.id, node);
61
+ if (node.children) walk(node.children);
62
+ }
63
+ }
64
+ walk(props.nodes);
65
+ return map;
66
+ });
67
+ const summary = computed(() => {
68
+ let files = 0;
69
+ let dirs = 0;
70
+ let bytes = 0;
71
+ let sized = false;
72
+ for (const id of checkedIds.value) {
73
+ const node = byId.value.get(id);
74
+ if (!node) continue;
75
+ if (node.kind === "dir") {
76
+ dirs++;
77
+ const inside = node.children?.length ? subtreeIds(node).some((child) => child !== id && checkedIds.value.has(child)) : false;
78
+ if (!inside) {
79
+ const size = subtreeSize(node);
80
+ if (size !== void 0) {
81
+ bytes += size;
82
+ sized = true;
83
+ }
84
+ }
85
+ } else {
86
+ files++;
87
+ if (node.size !== void 0) {
88
+ bytes += node.size;
89
+ sized = true;
90
+ }
91
+ }
92
+ }
93
+ return {
94
+ files,
95
+ dirs,
96
+ bytes: sized ? bytes : void 0,
97
+ sizeLabel: sized ? formatSize(bytes) : "—"
98
+ };
99
+ });
100
+ watch(summary, (value) => emit("summary", value), { deep: false });
101
+ function setChecked(next) {
102
+ checkedIds.value = next;
103
+ emit("update:checked", [...next]);
104
+ }
105
+ function onCheck(node, value) {
106
+ if (node.disabled) return;
107
+ const next = new Set(checkedIds.value);
108
+ for (const id of subtreeIds(node)) {
109
+ const target = byId.value.get(id);
110
+ if (target?.disabled) continue;
111
+ if (value) next.add(id);
112
+ else next.delete(id);
113
+ }
114
+ for (const ancestorId of ancestorIds(props.nodes, node.id).reverse()) {
115
+ const ancestor = byId.value.get(ancestorId);
116
+ if (!ancestor?.children?.length) continue;
117
+ const all = ancestor.children.every((c) => c.disabled || next.has(c.id));
118
+ if (all) next.add(ancestorId);
119
+ else next.delete(ancestorId);
120
+ }
121
+ setChecked(next);
122
+ }
123
+ function checkAll() {
124
+ const next = /* @__PURE__ */ new Set();
125
+ for (const [id, node] of byId.value) if (!node.disabled) next.add(id);
126
+ setChecked(next);
127
+ }
128
+ function clearChecked() {
129
+ setChecked(/* @__PURE__ */ new Set());
130
+ }
131
+ const requested = /* @__PURE__ */ new Set();
132
+ const roots = computed(() => props.sort ? sortNodes(props.nodes) : props.nodes);
133
+ const visible = computed(() => {
134
+ const out = [];
135
+ function walk(list) {
136
+ for (const node of props.sort ? sortNodes(list) : list) {
137
+ out.push(node);
138
+ if (node.kind === "dir" && openIds.value.has(node.id) && node.children?.length) {
139
+ walk(node.children);
140
+ }
141
+ }
142
+ }
143
+ walk(props.nodes);
144
+ return out;
145
+ });
146
+ const focusedId = ref(props.selected);
147
+ watch(
148
+ () => props.selected,
149
+ (id) => {
150
+ if (id) focusedId.value = id;
151
+ }
152
+ );
153
+ watch(
154
+ visible,
155
+ (rows) => {
156
+ if (!rows.length) {
157
+ focusedId.value = void 0;
158
+ } else if (!rows.some((n) => n.id === focusedId.value)) {
159
+ focusedId.value = rows[0].id;
160
+ }
161
+ },
162
+ { immediate: true }
163
+ );
164
+ const root = ref(null);
165
+ function focusRow(id) {
166
+ focusedId.value = id;
167
+ const el = root.value?.querySelector(`[data-node-id="${CSS.escape(id)}"]`);
168
+ el?.focus();
169
+ el?.scrollIntoView({ block: "nearest" });
170
+ }
171
+ function setExpanded(next) {
172
+ openIds.value = next;
173
+ emit("update:expanded", [...next]);
174
+ }
175
+ function expand(node) {
176
+ if (node.kind !== "dir" || openIds.value.has(node.id)) return;
177
+ const next = new Set(openIds.value);
178
+ next.add(node.id);
179
+ setExpanded(next);
180
+ if (node.children === void 0 && !requested.has(node.id)) {
181
+ requested.add(node.id);
182
+ emit("expand", node);
183
+ }
184
+ }
185
+ function collapse(node) {
186
+ if (!openIds.value.has(node.id)) return;
187
+ const next = new Set(openIds.value);
188
+ next.delete(node.id);
189
+ setExpanded(next);
190
+ emit("collapse", node);
191
+ }
192
+ function onToggle(node) {
193
+ if (openIds.value.has(node.id)) collapse(node);
194
+ else expand(node);
195
+ }
196
+ function onSelect(node) {
197
+ if (node.disabled) return;
198
+ emit("update:selected", node.id);
199
+ emit("select", node);
200
+ if (node.kind === "file") emit("open", node);
201
+ }
202
+ function parentOf(id) {
203
+ const trail = ancestorIds(props.nodes, id);
204
+ const parentId = trail.at(-1);
205
+ return parentId ? visible.value.find((n) => n.id === parentId) : void 0;
206
+ }
207
+ function move(delta) {
208
+ const rows = visible.value;
209
+ if (!rows.length) return;
210
+ const i = rows.findIndex((n) => n.id === focusedId.value);
211
+ const next = rows[Math.min(rows.length - 1, Math.max(0, (i < 0 ? 0 : i) + delta))];
212
+ if (next) focusRow(next.id);
213
+ }
214
+ function current() {
215
+ return visible.value.find((n) => n.id === focusedId.value);
216
+ }
217
+ function onKeydown(e) {
218
+ const node = current();
219
+ switch (e.key) {
220
+ case "ArrowDown":
221
+ e.preventDefault();
222
+ move(1);
223
+ break;
224
+ case "ArrowUp":
225
+ e.preventDefault();
226
+ move(-1);
227
+ break;
228
+ case "ArrowRight": {
229
+ if (!node) return;
230
+ e.preventDefault();
231
+ if (node.kind === "dir" && !openIds.value.has(node.id)) expand(node);
232
+ else if (node.kind === "dir" && node.children?.length) move(1);
233
+ break;
234
+ }
235
+ case "ArrowLeft": {
236
+ if (!node) return;
237
+ e.preventDefault();
238
+ if (node.kind === "dir" && openIds.value.has(node.id)) collapse(node);
239
+ else {
240
+ const parent = parentOf(node.id);
241
+ if (parent) focusRow(parent.id);
242
+ }
243
+ break;
244
+ }
245
+ case "Home":
246
+ e.preventDefault();
247
+ if (visible.value[0]) focusRow(visible.value[0].id);
248
+ break;
249
+ case "End": {
250
+ e.preventDefault();
251
+ const last = visible.value.at(-1);
252
+ if (last) focusRow(last.id);
253
+ break;
254
+ }
255
+ case " ": {
256
+ if (!node) return;
257
+ e.preventDefault();
258
+ if (props.checkable) {
259
+ onCheck(node, checkStateOf(node, checkedIds.value) !== "checked");
260
+ break;
261
+ }
262
+ onSelect(node);
263
+ if (node.kind === "dir") onToggle(node);
264
+ break;
265
+ }
266
+ case "Enter": {
267
+ if (!node) return;
268
+ e.preventDefault();
269
+ onSelect(node);
270
+ if (node.kind === "dir") onToggle(node);
271
+ break;
272
+ }
273
+ }
274
+ }
275
+ function reveal(id) {
276
+ const next = new Set(openIds.value);
277
+ for (const ancestor of ancestorIds(props.nodes, id)) next.add(ancestor);
278
+ setExpanded(next);
279
+ emit("update:selected", id);
280
+ requestAnimationFrame(() => focusRow(id));
281
+ }
282
+ function expandAll() {
283
+ const next = new Set(openIds.value);
284
+ function walk(list) {
285
+ for (const node of list) {
286
+ if (node.kind === "dir" && node.children?.length) {
287
+ next.add(node.id);
288
+ walk(node.children);
289
+ }
290
+ }
291
+ }
292
+ walk(props.nodes);
293
+ setExpanded(next);
294
+ }
295
+ function collapseAll() {
296
+ setExpanded(/* @__PURE__ */ new Set());
297
+ }
298
+ __expose({ reveal, expandAll, collapseAll, checkAll, clearChecked, summary });
299
+ return (_ctx, _cache) => {
300
+ return __props.loading ? (openBlock(), createElementBlock("div", _hoisted_1, [
301
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.skeletonRows, (n) => {
302
+ return openBlock(), createElementBlock("div", {
303
+ key: n,
304
+ class: "h-7 animate-pulse rounded-control bg-surface-soft",
305
+ style: normalizeStyle({ marginLeft: `${n % 3 * 14}px` })
306
+ }, null, 4);
307
+ }), 128))
308
+ ])) : !roots.value.length ? (openBlock(), createBlock(_sfc_main$1, {
309
+ key: 1,
310
+ icon: "lucide:folder-search",
311
+ title: __props.emptyLabel,
312
+ description: __props.emptyDescription
313
+ }, null, 8, ["title", "description"])) : (openBlock(), createElementBlock("div", _hoisted_2, [
314
+ createVNode(_sfc_main$2, { class: "min-h-0 flex-1" }, {
315
+ default: withCtx(() => [
316
+ createElementVNode("ul", {
317
+ ref_key: "root",
318
+ ref: root,
319
+ role: "tree",
320
+ "aria-multiselectable": __props.checkable,
321
+ class: "flex flex-col",
322
+ onKeydown
323
+ }, [
324
+ (openBlock(true), createElementBlock(Fragment, null, renderList(roots.value, (node) => {
325
+ return openBlock(), createBlock(_sfc_main$3, {
326
+ key: node.id,
327
+ node,
328
+ depth: 0,
329
+ expanded: openIds.value,
330
+ loading: loadingSet.value,
331
+ "selected-id": __props.selected,
332
+ "focused-id": focusedId.value,
333
+ sort: __props.sort,
334
+ "icon-size": __props.iconSize,
335
+ checkable: __props.checkable,
336
+ checked: checkedIds.value,
337
+ "show-size": __props.showSize,
338
+ "show-modified": __props.showModified,
339
+ onSelect,
340
+ onToggle,
341
+ onFocus: _cache[0] || (_cache[0] = ($event) => focusedId.value = $event.id),
342
+ onCheck
343
+ }, {
344
+ row: withCtx((slotProps) => [
345
+ renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
346
+ ]),
347
+ _: 3
348
+ }, 8, ["node", "expanded", "loading", "selected-id", "focused-id", "sort", "icon-size", "checkable", "checked", "show-size", "show-modified"]);
349
+ }), 128))
350
+ ], 40, _hoisted_3)
351
+ ]),
352
+ _: 3
353
+ }),
354
+ __props.checkable && (_ctx.$slots.summary || summary.value.files || summary.value.dirs) ? (openBlock(), createElementBlock("div", _hoisted_4, [
355
+ renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps(summary.value)), () => [
356
+ createTextVNode(toDisplayString(summary.value.files) + " " + toDisplayString(summary.value.files === 1 ? "file" : "files"), 1),
357
+ summary.value.dirs ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
358
+ createTextVNode(", " + toDisplayString(summary.value.dirs) + " " + toDisplayString(summary.value.dirs === 1 ? "folder" : "folders"), 1)
359
+ ], 64)) : createCommentVNode("", true),
360
+ summary.value.bytes !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
361
+ createTextVNode(" · " + toDisplayString(summary.value.sizeLabel), 1)
362
+ ], 64)) : createCommentVNode("", true)
363
+ ])
364
+ ])) : createCommentVNode("", true)
365
+ ]));
366
+ };
367
+ }
368
+ });
369
+ export {
370
+ _sfc_main as _
371
+ };
@@ -0,0 +1,216 @@
1
+ import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, withModifiers, normalizeStyle, normalizeClass, createBlock, createCommentVNode, unref, renderSlot, createTextVNode, toDisplayString, Transition, Fragment, renderList, mergeProps } from "vue";
2
+ import { sortNodes, checkStateOf, subtreeSize, formatSize, formatModified, fileIcon } from "../components/fileTree.js";
3
+ import { _ as _sfc_main$3 } from "./LpCheckbox-BO0zuuPh.js";
4
+ import { _ as _sfc_main$1 } from "./LpContextMenu-D0mzXqA7.js";
5
+ import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
6
+ const _hoisted_1 = ["aria-level", "aria-selected", "aria-expanded", "aria-disabled"];
7
+ const _hoisted_2 = ["data-node-id", "tabindex"];
8
+ const _hoisted_3 = { class: "flex size-4 shrink-0 items-center justify-center" };
9
+ const _hoisted_4 = { class: "min-w-0 flex-1 truncate" };
10
+ const _hoisted_5 = {
11
+ key: 1,
12
+ class: "shrink-0 text-xs text-muted"
13
+ };
14
+ const _hoisted_6 = {
15
+ key: 2,
16
+ class: "shrink-0 text-xs tabular-nums text-muted/80"
17
+ };
18
+ const _hoisted_7 = {
19
+ key: 3,
20
+ class: "w-16 shrink-0 text-right text-xs tabular-nums text-muted"
21
+ };
22
+ const _hoisted_8 = {
23
+ key: 0,
24
+ role: "group",
25
+ class: "flex flex-col overflow-hidden"
26
+ };
27
+ const _sfc_main = /* @__PURE__ */ defineComponent({
28
+ __name: "LpFileTreeNode",
29
+ props: {
30
+ node: {},
31
+ depth: {},
32
+ expanded: {},
33
+ loading: {},
34
+ selectedId: {},
35
+ focusedId: {},
36
+ sort: { type: Boolean },
37
+ iconSize: {},
38
+ checkable: { type: Boolean },
39
+ checked: {},
40
+ showSize: { type: Boolean },
41
+ showModified: { type: Boolean }
42
+ },
43
+ emits: ["select", "toggle", "focus", "check"],
44
+ setup(__props, { emit: __emit }) {
45
+ const props = __props;
46
+ const emit = __emit;
47
+ const isDir = computed(() => props.node.kind === "dir");
48
+ const isOpen = computed(() => isDir.value && props.expanded.has(props.node.id));
49
+ const isLoading = computed(() => props.loading.has(props.node.id));
50
+ const isSelected = computed(() => props.selectedId === props.node.id);
51
+ const isFocused = computed(() => props.focusedId === props.node.id);
52
+ const hasChildren = computed(() => isDir.value && (props.node.children?.length ?? 0) > 0);
53
+ const canExpand = computed(() => isDir.value && (props.node.children === void 0 || hasChildren.value));
54
+ const children = computed(() => {
55
+ const list = props.node.children ?? [];
56
+ return props.sort ? sortNodes(list) : list;
57
+ });
58
+ const checkState = computed(
59
+ () => props.checkable ? checkStateOf(props.node, props.checked) : "unchecked"
60
+ );
61
+ const sizeLabel = computed(() => {
62
+ if (!props.showSize) return "";
63
+ const bytes = subtreeSize(props.node);
64
+ return bytes === void 0 ? "" : formatSize(bytes);
65
+ });
66
+ const modifiedLabel = computed(
67
+ () => props.showModified && props.node.modified !== void 0 ? formatModified(props.node.modified) : ""
68
+ );
69
+ function rowDelay(index) {
70
+ return `${Math.min(index * 18, 180)}ms`;
71
+ }
72
+ function reducedMotion() {
73
+ return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
74
+ }
75
+ function onBranchEnter(el, done) {
76
+ if (reducedMotion()) return done();
77
+ const height = el.scrollHeight;
78
+ el.animate(
79
+ [
80
+ { height: "0px", opacity: 0 },
81
+ { height: `${height}px`, opacity: 1 }
82
+ ],
83
+ { duration: 220, easing: "cubic-bezier(0.2, 0, 0, 1)" }
84
+ ).onfinish = () => done();
85
+ }
86
+ function onBranchLeave(el, done) {
87
+ if (reducedMotion()) return done();
88
+ const height = el.scrollHeight;
89
+ el.animate(
90
+ [
91
+ { height: `${height}px`, opacity: 1 },
92
+ { height: "0px", opacity: 0 }
93
+ ],
94
+ { duration: 180, easing: "cubic-bezier(0.2, 0, 0, 1)" }
95
+ ).onfinish = () => done();
96
+ }
97
+ function onActivate() {
98
+ if (props.node.disabled) return;
99
+ emit("focus", props.node);
100
+ emit("select", props.node);
101
+ if (isDir.value) emit("toggle", props.node);
102
+ }
103
+ return (_ctx, _cache) => {
104
+ const _component_LpFileTreeNode = resolveComponent("LpFileTreeNode", true);
105
+ return openBlock(), createElementBlock("li", {
106
+ role: "treeitem",
107
+ "aria-level": __props.depth + 1,
108
+ "aria-selected": isSelected.value,
109
+ "aria-expanded": canExpand.value ? isOpen.value : void 0,
110
+ "aria-disabled": __props.node.disabled || void 0
111
+ }, [
112
+ createVNode(_sfc_main$1, {
113
+ items: __props.node.menu ?? []
114
+ }, {
115
+ default: withCtx(() => [
116
+ createElementVNode("div", {
117
+ "data-node-id": __props.node.id,
118
+ tabindex: isFocused.value ? 0 : -1,
119
+ class: normalizeClass(["group/row relative flex cursor-pointer select-none items-center gap-1.5 rounded-control py-1 pr-2 text-sm outline-none transition-colors duration-[var(--duration-fast)] focus-visible:ring-2 focus-visible:ring-ring", [
120
+ __props.node.disabled ? "cursor-not-allowed text-muted/50" : isSelected.value ? "bg-brand-soft text-ink" : "text-muted hover:bg-surface-soft hover:text-ink"
121
+ ]]),
122
+ style: normalizeStyle({ paddingLeft: `${__props.depth * 14 + 6}px` }),
123
+ onClick: withModifiers(onActivate, ["stop"])
124
+ }, [
125
+ createElementVNode("span", _hoisted_3, [
126
+ isLoading.value ? (openBlock(), createBlock(_sfc_main$2, {
127
+ key: 0,
128
+ name: "lucide:loader-circle",
129
+ size: 13,
130
+ class: "animate-spin text-muted"
131
+ })) : canExpand.value ? (openBlock(), createBlock(_sfc_main$2, {
132
+ key: 1,
133
+ name: "lucide:chevron-right",
134
+ size: 14,
135
+ class: normalizeClass(["text-muted transition-transform duration-[var(--duration-fast)]", isOpen.value ? "rotate-90" : ""])
136
+ }, null, 8, ["class"])) : createCommentVNode("", true)
137
+ ]),
138
+ __props.checkable ? (openBlock(), createBlock(_sfc_main$3, {
139
+ key: 0,
140
+ "model-value": checkState.value === "checked",
141
+ indeterminate: checkState.value === "indeterminate",
142
+ disabled: __props.node.disabled,
143
+ class: "shrink-0",
144
+ "aria-label": __props.node.name,
145
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
146
+ }, ["stop"])),
147
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => emit("check", __props.node, $event))
148
+ }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label"])) : createCommentVNode("", true),
149
+ createVNode(_sfc_main$2, {
150
+ name: unref(fileIcon)(__props.node, isOpen.value),
151
+ size: __props.iconSize,
152
+ class: normalizeClass(["shrink-0", __props.node.disabled ? "" : isDir.value ? "text-brand" : "text-muted"])
153
+ }, null, 8, ["name", "size", "class"]),
154
+ createElementVNode("span", _hoisted_4, [
155
+ renderSlot(_ctx.$slots, "row", {
156
+ node: __props.node,
157
+ depth: __props.depth,
158
+ expanded: isOpen.value,
159
+ selected: isSelected.value
160
+ }, () => [
161
+ createTextVNode(toDisplayString(__props.node.name), 1)
162
+ ])
163
+ ]),
164
+ __props.node.meta ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.node.meta), 1)) : createCommentVNode("", true),
165
+ modifiedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(modifiedLabel.value), 1)) : createCommentVNode("", true),
166
+ sizeLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(sizeLabel.value), 1)) : createCommentVNode("", true)
167
+ ], 14, _hoisted_2)
168
+ ]),
169
+ _: 3
170
+ }, 8, ["items"]),
171
+ createVNode(Transition, {
172
+ css: false,
173
+ onEnter: onBranchEnter,
174
+ onLeave: onBranchLeave
175
+ }, {
176
+ default: withCtx(() => [
177
+ isOpen.value && hasChildren.value ? (openBlock(), createElementBlock("ul", _hoisted_8, [
178
+ (openBlock(true), createElementBlock(Fragment, null, renderList(children.value, (child, i) => {
179
+ return openBlock(), createBlock(_component_LpFileTreeNode, {
180
+ key: child.id,
181
+ style: normalizeStyle({ "--row-delay": rowDelay(i) }),
182
+ class: "animate-[tree-row-in_var(--duration-medium)_var(--ease-emphasized)_both] [animation-delay:var(--row-delay)] motion-reduce:animate-none",
183
+ node: child,
184
+ depth: __props.depth + 1,
185
+ expanded: __props.expanded,
186
+ loading: __props.loading,
187
+ "selected-id": __props.selectedId,
188
+ "focused-id": __props.focusedId,
189
+ sort: __props.sort,
190
+ "icon-size": __props.iconSize,
191
+ checkable: __props.checkable,
192
+ checked: __props.checked,
193
+ "show-size": __props.showSize,
194
+ "show-modified": __props.showModified,
195
+ onSelect: _cache[2] || (_cache[2] = ($event) => emit("select", $event)),
196
+ onToggle: _cache[3] || (_cache[3] = ($event) => emit("toggle", $event)),
197
+ onFocus: _cache[4] || (_cache[4] = ($event) => emit("focus", $event)),
198
+ onCheck: _cache[5] || (_cache[5] = (n, v) => emit("check", n, v))
199
+ }, {
200
+ row: withCtx((slotProps) => [
201
+ renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
202
+ ]),
203
+ _: 3
204
+ }, 8, ["style", "node", "depth", "expanded", "loading", "selected-id", "focused-id", "sort", "icon-size", "checkable", "checked", "show-size", "show-modified"]);
205
+ }), 128))
206
+ ])) : createCommentVNode("", true)
207
+ ]),
208
+ _: 3
209
+ })
210
+ ], 8, _hoisted_1);
211
+ };
212
+ }
213
+ });
214
+ export {
215
+ _sfc_main as _
216
+ };
@@ -1 +1 @@
1
- export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LayoutNode", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpCheckbox", "LpCodeBlock", "LpCommandPalette", "LpConfirmDialog", "LpContextMenu", "LpDatePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpEmptyState", "LpFormField", "LpIcon", "LpInfraNode", "LpInput", "LpLaneNode", "LpLink", "LpLogViewer", "LpModal", "LpNotificationBell", "LpNumberField", "LpOtpInput", "LpPagination", "LpPasswordInput", "LpPhoneInput", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpScrollArea", "LpSegmented", "LpSelect", "LpServiceNode", "LpSidebar", "LpSidebarNav", "LpSkeleton", "LpSlider", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTextarea", "LpThemeSwitcher", "LpTilt", "LpToaster", "LpTooltip", "LpTopologyCanvas", "LpUptimeBar"];
1
+ export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LayoutNode", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpCheckbox", "LpCodeBlock", "LpCommandPalette", "LpConfirmDialog", "LpContextMenu", "LpDatePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpEmptyState", "LpFileTree", "LpFileTreeNode", "LpFormField", "LpIcon", "LpInfraNode", "LpInput", "LpLaneNode", "LpLink", "LpLogViewer", "LpModal", "LpNotificationBell", "LpNumberField", "LpOtpInput", "LpPagination", "LpPasswordInput", "LpPhoneInput", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpScrollArea", "LpSegmented", "LpSelect", "LpServiceNode", "LpSidebar", "LpSidebarNav", "LpSkeleton", "LpSlider", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTextarea", "LpThemeSwitcher", "LpTilt", "LpToaster", "LpTooltip", "LpTopologyCanvas", "LpUptimeBar"];