@leavepulse/ui 0.22.12 → 0.22.13
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,5 +1,5 @@
|
|
|
1
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 { formatSize, sortNodes,
|
|
2
|
+
import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./LpEmptyState-CrfyRJUG.js";
|
|
4
4
|
import { _ as _sfc_main$3 } from "./LpFileTreeNode-DFg4PhOK.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
|
|
@@ -67,6 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
return { byId: byId2, parentOfId };
|
|
68
68
|
});
|
|
69
69
|
const byId = computed(() => index.value.byId);
|
|
70
|
+
const stats = computed(() => computeStats(props.nodes, checkedIds.value));
|
|
70
71
|
const summary = computed(() => {
|
|
71
72
|
let files = 0;
|
|
72
73
|
let dirs = 0;
|
|
@@ -146,7 +147,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
147
|
}
|
|
147
148
|
const requested = /* @__PURE__ */ new Set();
|
|
148
149
|
const roots = computed(() => props.sort ? sortNodes(props.nodes) : props.nodes);
|
|
149
|
-
const stats = computed(() => computeStats(props.nodes, checkedIds.value));
|
|
150
150
|
const visible = computed(() => {
|
|
151
151
|
const out = [];
|
|
152
152
|
function walk(list) {
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { _ as _19 } from "./chunks/LpDivider-CUX46KR0.js";
|
|
|
22
22
|
import { _ as _20 } from "./chunks/LpDrawer-DAJN5rGK.js";
|
|
23
23
|
import { _ as _21 } from "./chunks/LpDropdownMenu-DJpoqRCb.js";
|
|
24
24
|
import { _ as _22 } from "./chunks/LpEmptyState-CrfyRJUG.js";
|
|
25
|
-
import { _ as _23 } from "./chunks/LpFileTree-
|
|
25
|
+
import { _ as _23 } from "./chunks/LpFileTree-Cw50eG_y.js";
|
|
26
26
|
import { ancestorIds, checkStateOf, checkedCount, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize } from "./components/fileTree.js";
|
|
27
27
|
import { _ as _24 } from "./chunks/LpFormField-Bn-ZwC6z.js";
|
|
28
28
|
import { _ as _25 } from "./chunks/LpIcon-CCnX5_2j.js";
|
package/package.json
CHANGED
|
@@ -155,6 +155,12 @@ const index = computed(() => {
|
|
|
155
155
|
|
|
156
156
|
const byId = computed(() => index.value.byId)
|
|
157
157
|
|
|
158
|
+
// One pass for the whole tree; every row reads its entry by id instead of
|
|
159
|
+
// walking its own subtree on each render. Declared before `summary`, which
|
|
160
|
+
// reads it and is watched eagerly — a `const` below that watcher is still in
|
|
161
|
+
// its temporal dead zone when the watcher first runs.
|
|
162
|
+
const stats = computed(() => computeStats(props.nodes, checkedIds.value))
|
|
163
|
+
|
|
158
164
|
/**
|
|
159
165
|
* What the ticked set adds up to. Directories are counted but not sized — their
|
|
160
166
|
* bytes arrive through the files inside them, so summing both would double-count.
|
|
@@ -268,10 +274,6 @@ const requested = new Set<string>()
|
|
|
268
274
|
|
|
269
275
|
const roots = computed(() => (props.sort ? sortNodes(props.nodes) : props.nodes))
|
|
270
276
|
|
|
271
|
-
// One pass for the whole tree; every row reads its entry by id instead of
|
|
272
|
-
// walking its own subtree on each render.
|
|
273
|
-
const stats = computed(() => computeStats(props.nodes, checkedIds.value))
|
|
274
|
-
|
|
275
277
|
/** Rows currently visible, in render order — the axis the arrow keys walk. */
|
|
276
278
|
const visible = computed(() => {
|
|
277
279
|
const out: FileNode[] = []
|