@aiquants/directory-tree 6.1.3 → 6.2.0

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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as m, jsxs as b0, Fragment as y2 } from "react/jsx-runtime";
2
- import { VIRTUAL_SCROLL_LABEL_KEYS as m1, VIRTUAL_SCROLL_LABEL_CATALOGS as ye, resolveVirtualScrollLocale as Re, resolveVirtualScrollLabels as M2, VirtualScroll as E2, ScrollBar as w2 } from "@aiquants/virtualscroll";
1
+ import { jsx as f, jsxs as Z0, Fragment as M2 } from "react/jsx-runtime";
2
+ import { VIRTUAL_SCROLL_LABEL_KEYS as p1, VIRTUAL_SCROLL_LABEL_CATALOGS as Me, resolveVirtualScrollLocale as ke, resolveVirtualScrollLabels as E2, VirtualScroll as b2, ScrollBar as w2 } from "@aiquants/virtualscroll";
3
3
  import * as t from "react";
4
- import { createContext as b2, useRef as _, useEffect as k0, useCallback as b, memo as T1, useState as h0, useMemo as F, useSyncExternalStore as S2, useLayoutEffect as Me, useImperativeHandle as L2, useTransition as I2 } from "react";
5
- import { twMerge as W } from "tailwind-merge";
6
- function C2({
4
+ import { createContext as S2, useRef as _, useEffect as T0, useCallback as b, memo as D1, useState as f0, useMemo as R, useSyncExternalStore as L2, useLayoutEffect as Ee, useImperativeHandle as I2, useTransition as C2 } from "react";
5
+ import { twMerge as j } from "tailwind-merge";
6
+ function F2({
7
7
  title: e,
8
8
  titleId: a,
9
9
  ...n
@@ -24,8 +24,8 @@ function C2({
24
24
  clipRule: "evenodd"
25
25
  }));
26
26
  }
27
- const x2 = /* @__PURE__ */ t.forwardRef(C2);
28
- function F2({
27
+ const N2 = /* @__PURE__ */ t.forwardRef(F2);
28
+ function x2({
29
29
  title: e,
30
30
  titleId: a,
31
31
  ...n
@@ -46,8 +46,8 @@ function F2({
46
46
  clipRule: "evenodd"
47
47
  }));
48
48
  }
49
- const N2 = /* @__PURE__ */ t.forwardRef(F2);
50
- function R2({
49
+ const R2 = /* @__PURE__ */ t.forwardRef(x2);
50
+ function k2({
51
51
  title: e,
52
52
  titleId: a,
53
53
  ...n
@@ -66,50 +66,50 @@ function R2({
66
66
  d: "M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"
67
67
  }));
68
68
  }
69
- const k2 = /* @__PURE__ */ t.forwardRef(R2), P2 = b2({
69
+ const P2 = /* @__PURE__ */ t.forwardRef(k2), T2 = S2({
70
70
  color: "currentColor",
71
71
  size: "1em",
72
72
  weight: "regular",
73
73
  mirrored: !1
74
- }), a0 = t.forwardRef(
74
+ }), n0 = t.forwardRef(
75
75
  (e, a) => {
76
76
  const {
77
77
  alt: n,
78
78
  color: r,
79
79
  size: o,
80
- weight: s,
81
- mirrored: c,
80
+ weight: c,
81
+ mirrored: s,
82
82
  children: d,
83
- weights: h,
84
- ...A
85
- } = e, {
86
- color: M = "currentColor",
87
- size: Z,
88
- weight: E = "regular",
89
- mirrored: u = !1,
83
+ weights: u,
90
84
  ...p
91
- } = t.useContext(P2);
85
+ } = e, {
86
+ color: y = "currentColor",
87
+ size: E,
88
+ weight: M = "regular",
89
+ mirrored: H = !1,
90
+ ...m
91
+ } = t.useContext(T2);
92
92
  return /* @__PURE__ */ t.createElement(
93
93
  "svg",
94
94
  {
95
95
  ref: a,
96
96
  xmlns: "http://www.w3.org/2000/svg",
97
- width: o ?? Z,
98
- height: o ?? Z,
99
- fill: r ?? M,
97
+ width: o ?? E,
98
+ height: o ?? E,
99
+ fill: r ?? y,
100
100
  viewBox: "0 0 256 256",
101
- transform: c || u ? "scale(-1, 1)" : void 0,
102
- ...p,
103
- ...A
101
+ transform: s || H ? "scale(-1, 1)" : void 0,
102
+ ...m,
103
+ ...p
104
104
  },
105
105
  !!n && /* @__PURE__ */ t.createElement("title", null, n),
106
106
  d,
107
- h.get(s ?? E)
107
+ u.get(c ?? M)
108
108
  );
109
109
  }
110
110
  );
111
- a0.displayName = "IconBase";
112
- const T2 = /* @__PURE__ */ new Map([
111
+ n0.displayName = "IconBase";
112
+ const O2 = /* @__PURE__ */ new Map([
113
113
  [
114
114
  "bold",
115
115
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z" }))
@@ -134,9 +134,9 @@ const T2 = /* @__PURE__ */ new Map([
134
134
  "thin",
135
135
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z" }))
136
136
  ]
137
- ]), ke = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: T2 }));
138
- ke.displayName = "FileIcon";
139
- const O2 = /* @__PURE__ */ new Map([
137
+ ]), Pe = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: O2 }));
138
+ Pe.displayName = "FileIcon";
139
+ const $2 = /* @__PURE__ */ new Map([
140
140
  [
141
141
  "bold",
142
142
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M96.59,124.91a12,12,0,0,0-13.08,2.6L63,148H44a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H63l20.48,20.48A12,12,0,0,0,104,224V136A12,12,0,0,0,96.59,124.91ZM80,195l-3.51-3.52A12,12,0,0,0,68,188H56V172H68a12,12,0,0,0,8.49-3.51L80,165Zm80-15a44.55,44.55,0,0,1-21.95,38.36A12,12,0,1,1,126,197.64a20.51,20.51,0,0,0,0-35.28,12,12,0,1,1,12.1-20.72A44.55,44.55,0,0,1,160,180ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v72a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z" }))
@@ -161,9 +161,9 @@ const O2 = /* @__PURE__ */ new Map([
161
161
  "thin",
162
162
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M97.53,132.3a4,4,0,0,0-4.36.87L70.34,156H48a4,4,0,0,0-4,4v40a4,4,0,0,0,4,4H70.34l22.83,22.83A4,4,0,0,0,100,224V136A4,4,0,0,0,97.53,132.3Zm-5.53,82L74.83,197.17A4,4,0,0,0,72,196H52V164H72a4,4,0,0,0,2.83-1.17L92,145.66ZM148,180a36.52,36.52,0,0,1-18,31.45,4,4,0,0,1-4-6.9,28.5,28.5,0,0,0,0-49.1,4,4,0,0,1,4-6.9A36.52,36.52,0,0,1,148,180Zm62.83-94.83-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H168a4,4,0,0,0,0,8h32a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z" }))
163
163
  ]
164
- ]), Pe = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: O2 }));
165
- Pe.displayName = "FileAudioIcon";
166
- const $2 = /* @__PURE__ */ new Map([
164
+ ]), Te = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: $2 }));
165
+ Te.displayName = "FileAudioIcon";
166
+ const D2 = /* @__PURE__ */ new Map([
167
167
  [
168
168
  "bold",
169
169
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z" }))
@@ -188,9 +188,9 @@ const $2 = /* @__PURE__ */ new Map([
188
188
  "thin",
189
189
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z" }))
190
190
  ]
191
- ]), Te = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: $2 }));
192
- Te.displayName = "FileCodeIcon";
193
- const D2 = /* @__PURE__ */ new Map([
191
+ ]), Oe = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: D2 }));
192
+ Oe.displayName = "FileCodeIcon";
193
+ const _2 = /* @__PURE__ */ new Map([
194
194
  [
195
195
  "bold",
196
196
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M48,180c0,8.67,5.49,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.49,164,48,171.31,48,180Zm97.51-5.71c-5.13-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69.24,69.24,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2,2,0,0,1-.22.71c-1.36,1.55-9.57,1.79-16.39-.06a12,12,0,0,0-6.45,23.11A63.73,63.73,0,0,0,125.09,220c6.47,0,13.74-1.17,19.74-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.32,179.53,145.51,174.27ZM216,140.68A12,12,0,0,0,200.7,148L192,172.3,183.3,148A12,12,0,1,0,160.7,156l20,56a12,12,0,0,0,22.6,0l20-56A12,12,0,0,0,216,140.68ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z" }))
@@ -215,9 +215,9 @@ const D2 = /* @__PURE__ */ new Map([
215
215
  "thin",
216
216
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,1,1,5.78,5.54A26.11,26.11,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm82.85-26.92a4,4,0,0,0-5.11,2.42L188,196.11l-16.23-45.46a4,4,0,1,0-7.54,2.7l20,56a4,4,0,0,0,7.54,0l20-56A4,4,0,0,0,209.34,148.23ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z" }))
217
217
  ]
218
- ]), Oe = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: D2 }));
219
- Oe.displayName = "FileCsvIcon";
220
- const _2 = /* @__PURE__ */ new Map([
218
+ ]), $e = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: _2 }));
219
+ $e.displayName = "FileCsvIcon";
220
+ const z2 = /* @__PURE__ */ new Map([
221
221
  [
222
222
  "bold",
223
223
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M48,140H32a12,12,0,0,0-12,12v56a12,12,0,0,0,12,12H48a40,40,0,0,0,0-80Zm0,56H44V164h4a16,16,0,0,1,0,32Zm180.3-3.8a12,12,0,0,1,.37,17A34,34,0,0,1,204,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,0,1-17.34,16.6A10.27,10.27,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43A12,12,0,0,1,228.3,192.2ZM128,140c-19.85,0-36,17.94-36,40s16.15,40,36,40,36-17.94,36-40S147.85,140,128,140Zm0,56c-6.5,0-12-7.33-12-16s5.5-16,12-16,12,7.33,12,16S134.5,196,128,196ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z" }))
@@ -242,9 +242,9 @@ const _2 = /* @__PURE__ */ new Map([
242
242
  "thin",
243
243
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M52,148H36a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4H52a32,32,0,0,0,0-64Zm0,56H40V156H52a24,24,0,0,1,0,48Zm166.77-6a4,4,0,0,1,.12,5.66A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a18.15,18.15,0,0,0,13.11-5.9A4,4,0,0,1,218.77,198ZM128,148c-15.44,0-28,14.36-28,32s12.56,32,28,32,28-14.36,28-32S143.44,148,128,148Zm0,56c-11,0-20-10.77-20-24s9-24,20-24,20,10.77,20,24S139,204,128,204ZM48,116a4,4,0,0,0,4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72A4,4,0,0,0,48,116ZM156,41.65,198.34,84H156Z" }))
244
244
  ]
245
- ]), $e = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: _2 }));
246
- $e.displayName = "FileDocIcon";
247
- const z2 = /* @__PURE__ */ new Map([
245
+ ]), De = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: z2 }));
246
+ De.displayName = "FileDocIcon";
247
+ const B2 = /* @__PURE__ */ new Map([
248
248
  [
249
249
  "bold",
250
250
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M114,145.34a12,12,0,0,0-20,0L79,167.82,72.3,157.73a12,12,0,0,0-20.07.17L13.91,217.51A12,12,0,0,0,24,236H152a12,12,0,0,0,10-18.66ZM46,212,62.5,186.3l6.55,9.81a12,12,0,0,0,20,0l15-22.48L129.58,212ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v84a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z" }))
@@ -275,9 +275,9 @@ const z2 = /* @__PURE__ */ new Map([
275
275
  "thin",
276
276
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M107.33,149.78a4,4,0,0,0-6.66,0L76.42,186.15,63.36,165.84a4,4,0,0,0-6.72,0l-36,56A4,4,0,0,0,24,228H152a4,4,0,0,0,3.33-6.22ZM31.33,220,60,175.4l13,20.22a4,4,0,0,0,3.33,1.83,3.93,3.93,0,0,0,3.36-1.78L104,159.21,144.53,220ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v88a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z" }))
277
277
  ]
278
- ]), De = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: z2 }));
279
- De.displayName = "FileImageIcon";
280
- const B2 = /* @__PURE__ */ new Map([
278
+ ]), _e = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: B2 }));
279
+ _e.displayName = "FileImageIcon";
280
+ const W2 = /* @__PURE__ */ new Map([
281
281
  [
282
282
  "bold",
283
283
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z" }))
@@ -302,9 +302,9 @@ const B2 = /* @__PURE__ */ new Map([
302
302
  "thin",
303
303
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z" }))
304
304
  ]
305
- ]), _e = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: B2 }));
306
- _e.displayName = "FileMdIcon";
307
- const W2 = /* @__PURE__ */ new Map([
305
+ ]), ze = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: W2 }));
306
+ ze.displayName = "FileMdIcon";
307
+ const j2 = /* @__PURE__ */ new Map([
308
308
  [
309
309
  "bold",
310
310
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z" }))
@@ -329,9 +329,9 @@ const W2 = /* @__PURE__ */ new Map([
329
329
  "thin",
330
330
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z" }))
331
331
  ]
332
- ]), ze = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: W2 }));
333
- ze.displayName = "FilePdfIcon";
334
- const j2 = /* @__PURE__ */ new Map([
332
+ ]), Be = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: j2 }));
333
+ Be.displayName = "FilePdfIcon";
334
+ const K2 = /* @__PURE__ */ new Map([
335
335
  [
336
336
  "bold",
337
337
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M232,152a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,232,152ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm96,0a32,32,0,0,1-32,32h-4v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h16A32,32,0,0,1,164,172Zm-24,0a8,8,0,0,0-8-8h-4v16h4A8,8,0,0,0,140,172ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,80h23L160,57Z" }))
@@ -356,9 +356,9 @@ const j2 = /* @__PURE__ */ new Map([
356
356
  "thin",
357
357
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M220,152a4,4,0,0,1-4,4H200v52a4,4,0,0,1-8,0V156H176a4,4,0,0,1,0-8h40A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm76,0a24,24,0,0,1-24,24H120v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h16A24,24,0,0,1,156,172Zm-8,0a16,16,0,0,0-16-16H120v32h12A16,16,0,0,0,148,172ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z" }))
358
358
  ]
359
- ]), Be = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: j2 }));
360
- Be.displayName = "FilePptIcon";
361
- const K2 = /* @__PURE__ */ new Map([
359
+ ]), We = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: K2 }));
360
+ We.displayName = "FilePptIcon";
361
+ const G2 = /* @__PURE__ */ new Map([
362
362
  [
363
363
  "bold",
364
364
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z" }))
@@ -383,9 +383,9 @@ const K2 = /* @__PURE__ */ new Map([
383
383
  "thin",
384
384
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z" }))
385
385
  ]
386
- ]), We = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: K2 }));
387
- We.displayName = "FileTextIcon";
388
- const G2 = /* @__PURE__ */ new Map([
386
+ ]), je = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: G2 }));
387
+ je.displayName = "FileTextIcon";
388
+ const Y2 = /* @__PURE__ */ new Map([
389
389
  [
390
390
  "bold",
391
391
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z" }))
@@ -416,9 +416,9 @@ const G2 = /* @__PURE__ */ new Map([
416
416
  "thin",
417
417
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z" }))
418
418
  ]
419
- ]), je = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: G2 }));
420
- je.displayName = "FileVideoIcon";
421
- const Y2 = /* @__PURE__ */ new Map([
419
+ ]), Ke = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: Y2 }));
420
+ Ke.displayName = "FileVideoIcon";
421
+ const X2 = /* @__PURE__ */ new Map([
422
422
  [
423
423
  "bold",
424
424
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M160,208a12,12,0,0,1-12,12H120a12,12,0,0,1-12-12V152a12,12,0,0,1,24,0v44h16A12,12,0,0,1,160,208ZM91,142.22A12,12,0,0,0,74.24,145L64,159.34,53.77,145a12,12,0,1,0-19.53,14l15,21-15,21A12,12,0,1,0,53.77,215L64,200.62,74.24,215A12,12,0,0,0,93.77,201l-15-21,15-21A12,12,0,0,0,91,142.22Zm122.53,32.05c-5.12-3.45-11.32-5.24-16.79-6.82a79.69,79.69,0,0,1-7.92-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z" }))
@@ -443,9 +443,9 @@ const Y2 = /* @__PURE__ */ new Map([
443
443
  "thin",
444
444
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M152,208a4,4,0,0,1-4,4H120a4,4,0,0,1-4-4V152a4,4,0,0,1,8,0v52h24A4,4,0,0,1,152,208ZM90.32,148.75a4,4,0,0,0-5.58.92L68,173.12,51.25,149.67a4,4,0,0,0-6.5,4.66L63.08,180,44.75,205.67a4,4,0,0,0,.93,5.58A3.91,3.91,0,0,0,48,212a4,4,0,0,0,3.25-1.67L68,186.88l16.74,23.45A4,4,0,0,0,88,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L72.91,180l18.34-25.67A4,4,0,0,0,90.32,148.75Zm100.17,26.4c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z" }))
445
445
  ]
446
- ]), Ke = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: Y2 }));
447
- Ke.displayName = "FileXlsIcon";
448
- const X2 = /* @__PURE__ */ new Map([
446
+ ]), Ge = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: X2 }));
447
+ Ge.displayName = "FileXlsIcon";
448
+ const U2 = /* @__PURE__ */ new Map([
449
449
  [
450
450
  "bold",
451
451
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M188,140H172a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm-48-28v56a12,12,0,0,1-24,0V152a12,12,0,0,1,24,0ZM96,208a12,12,0,0,1-12,12H52a12,12,0,0,1-10.42-17.95L63.32,164H52a12,12,0,0,1,0-24H84A12,12,0,0,1,94.42,158L72.68,196H84A12,12,0,0,1,96,208ZM216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88A12,12,0,0,0,216.49,79.52ZM160,80V57l23,23Z" }))
@@ -470,13 +470,13 @@ const X2 = /* @__PURE__ */ new Map([
470
470
  "thin",
471
471
  /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("path", { d: "M184,148H168a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H172V156h12a16,16,0,0,1,0,32Zm-52-36v56a4,4,0,0,1-8,0V152a4,4,0,0,1,8,0Zm-40.53,2L62.89,204H88a4,4,0,0,1,0,8H56a4,4,0,0,1-3.47-6l28.58-50H56a4,4,0,0,1,0-8H88a4,4,0,0,1,3.47,6ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z" }))
472
472
  ]
473
- ]), Ge = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(a0, { ref: a, ...e, weights: X2 }));
474
- Ge.displayName = "FileZipIcon";
475
- const U2 = {
473
+ ]), Ye = t.forwardRef((e, a) => /* @__PURE__ */ t.createElement(n0, { ref: a, ...e, weights: U2 }));
474
+ Ye.displayName = "FileZipIcon";
475
+ const J2 = {
476
476
  icon: { light: "#6a7282", dark: "#99a1af" },
477
477
  iconSelected: { light: "#1447e6", dark: "#51a2ff" },
478
478
  checkedRing: { light: "#155dfc", dark: "#51a2ff" }
479
- }, l8 = {
479
+ }, o8 = {
480
480
  markdown: { light: "#0084d1", dark: "#00bcff" },
481
481
  pdf: { light: "#e7000b", dark: "#ff6467" },
482
482
  spreadsheet: { light: "#007a55", dark: "#00d492" },
@@ -488,8 +488,8 @@ const U2 = {
488
488
  video: { light: "#7f22fe", dark: "#a684ff" },
489
489
  archive: { light: "#bb4d00", dark: "#ffb900" },
490
490
  code: { light: "#9810fa", dark: "#c27aff" },
491
- text: U2.icon
492
- }, Ye = "#71829b", o0 = {
491
+ text: J2.icon
492
+ }, Xe = "#71829b", c0 = {
493
493
  rowHover: "hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",
494
494
  rowSelected: "bg-[color:light-dark(#eff6ff,#162456)]",
495
495
  checkedRing: "inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",
@@ -498,7 +498,7 @@ const U2 = {
498
498
  gridEdge: "text-[color:light-dark(#4a5565,#d1d5dc)]",
499
499
  icon: "text-[color:light-dark(#6a7282,#99a1af)]",
500
500
  iconSelected: "text-[color:light-dark(#1447e6,#51a2ff)]"
501
- }, s0 = {
501
+ }, i0 = {
502
502
  markdown: "text-[color:light-dark(#0084d1,#00bcff)]",
503
503
  pdf: "text-[color:light-dark(#e7000b,#ff6467)]",
504
504
  spreadsheet: "text-[color:light-dark(#007a55,#00d492)]",
@@ -511,34 +511,34 @@ const U2 = {
511
511
  archive: "text-[color:light-dark(#bb4d00,#ffb900)]",
512
512
  code: "text-[color:light-dark(#9810fa,#c27aff)]",
513
513
  text: "text-[color:light-dark(#6a7282,#99a1af)]"
514
- }, Xe = "text-[length:var(--dt-font-size-body,0.8125rem)]", J2 = `${Xe} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`, x1 = 44, q2 = 12, Q2 = 8, c0 = 14, et = 14, Ue = (e) => e === void 0 ? void 0 : { fontSize: typeof e == "number" ? `${e}px` : e }, t0 = (e) => ({ width: e, height: e }), x = {
514
+ }, Ue = "text-[length:var(--dt-font-size-body,0.8125rem)]", q2 = `${Ue} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`, R1 = 44, Q2 = 12, et = 8, s0 = 14, tt = 14, Je = (e) => e === void 0 ? void 0 : { fontSize: typeof e == "number" ? `${e}px` : e }, a0 = (e) => ({ width: e, height: e }), F = {
515
515
  container: "directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",
516
516
  // 保留中も薄めない。薄めた文字と印は地と混ざり、配色表の組の対比 (文字 7:1・印 3:1) を割る
517
517
  containerPending: "cursor-progress",
518
518
  // 行は itemHeight の固定の箱で中身を縦の中央に置くため、上下の詰め物は行の高さを中身から奪うだけになる
519
519
  // (行の中に置いたホストのボタンが行の高さいっぱいの的にならない)
520
- entry: `directory-tree-entry flex items-center cursor-pointer relative select-none ${J2}`,
521
- entryHover: `directory-tree-entry--hover ${o0.rowHover}`,
522
- entrySelected: `directory-tree-entry--selected ${o0.rowSelected}`,
520
+ entry: `directory-tree-entry flex items-center cursor-pointer relative select-none ${q2}`,
521
+ entryHover: `directory-tree-entry--hover ${c0.rowHover}`,
522
+ entrySelected: `directory-tree-entry--selected ${c0.rowSelected}`,
523
523
  // 輪は行の内側に描く。外側の輪は、後に描く隣の行の不透明な地 (ホバーや選択) に覆われる
524
- entryItemSelected: `directory-tree-entry--item-selected ${o0.rowSelected} ${o0.checkedRing}`,
524
+ entryItemSelected: `directory-tree-entry--item-selected ${c0.rowSelected} ${c0.checkedRing}`,
525
525
  // 箱の大きさはクラスでなく EXPAND_BOX_SIZE から行が付ける (ツリーラインのジオメトリが印を置く箱と同じ値を読むため)
526
- expandIcon: `directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${o0.icon}`,
527
- expandIconSelected: `directory-tree-expand-icon--selected ${o0.iconSelected}`,
526
+ expandIcon: `directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${c0.icon}`,
527
+ expandIconSelected: `directory-tree-expand-icon--selected ${c0.iconSelected}`,
528
528
  // 箱の大きさはクラスでなく visual.typeIconSize から行が付ける (ツリーラインのジオメトリと同じ値を読むため)
529
- typeIcon: `directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${o0.icon}`,
530
- typeIconSelected: `directory-tree-type-icon--selected ${o0.iconSelected}`,
529
+ typeIcon: `directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${c0.icon}`,
530
+ typeIconSelected: `directory-tree-type-icon--selected ${c0.iconSelected}`,
531
531
  // 文字の行の高さ (line-height) は行 (entry) の body の行を受け継ぐため、名前には文字の大きさだけを付ける
532
- name: `directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${Xe} font-normal ${o0.name}`,
532
+ name: `directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${Ue} font-normal ${c0.name}`,
533
533
  nameDirectory: "directory-tree-name--directory font-medium",
534
- nameSelected: `directory-tree-name--selected font-semibold ${o0.nameSelected}`
535
- }, O1 = (e) => {
534
+ nameSelected: `directory-tree-name--selected font-semibold ${c0.nameSelected}`
535
+ }, _1 = (e) => {
536
536
  const a = e.slice(e.lastIndexOf("/") + 1), n = a.lastIndexOf(".");
537
537
  return n <= 0 ? "" : a.slice(n + 1).toLowerCase();
538
- }, tt = /^[a-z][a-z\d+.-]*:\/\//i, Ee = (e) => O1(tt.test(e) ? e.split(/[?#]/, 1)[0] : e), Je = (e) => O1(e.name) || Ee(e.relativePath) || Ee(e.absolutePath), qe = ({ isDirectory: e, isExpanded: a, showExpandIcons: n, useCanvasExpandIcons: r, expandIconSize: o }) => {
539
- const s = o ? { width: o, height: o } : void 0, c = o ? "" : "h-4 w-4";
540
- return !(n && e) || r ? /* @__PURE__ */ m("span", { className: c, style: s, "aria-hidden": "true" }) : a ? /* @__PURE__ */ m(x2, { className: c, style: s }) : /* @__PURE__ */ m(N2, { className: c, style: s });
541
- }, N1 = (e, a) => {
538
+ }, at = /^[a-z][a-z\d+.-]*:\/\//i, be = (e) => _1(at.test(e) ? e.split(/[?#]/, 1)[0] : e), qe = (e) => _1(e.name) || be(e.relativePath) || be(e.absolutePath), Qe = ({ isDirectory: e, isExpanded: a, showExpandIcons: n, useCanvasExpandIcons: r, expandIconSize: o }) => {
539
+ const c = o ? { width: o, height: o } : void 0, s = o ? "" : "h-4 w-4";
540
+ return !(n && e) || r ? /* @__PURE__ */ f("span", { className: s, style: c, "aria-hidden": "true" }) : a ? /* @__PURE__ */ f(N2, { className: s, style: c }) : /* @__PURE__ */ f(R2, { className: s, style: c });
541
+ }, P1 = (e, a) => {
542
542
  if (e == null || typeof e == "boolean") return null;
543
543
  if (typeof e == "function")
544
544
  return console.warn(`[DirectoryTree] Function returned by renderer for "${a}". Return a node.`), null;
@@ -546,7 +546,7 @@ const U2 = {
546
546
  if ("then" in e)
547
547
  return console.warn(`[DirectoryTree] Promise returned for "${a}". Not supported.`), null;
548
548
  if (Array.isArray(e)) {
549
- const r = e.map((o) => N1(o, a)).filter(Boolean);
549
+ const r = e.map((o) => P1(o, a)).filter(Boolean);
550
550
  return r.length ? r : null;
551
551
  }
552
552
  const n = e.type;
@@ -554,20 +554,20 @@ const U2 = {
554
554
  return console.warn(`[DirectoryTree] Lazy component for "${a}". Not supported.`), null;
555
555
  }
556
556
  return e;
557
- }, at = {
558
- markdown: (e) => /* @__PURE__ */ m(_e, { className: s0.markdown, style: t0(e) }),
559
- pdf: (e) => /* @__PURE__ */ m(ze, { className: s0.pdf, style: t0(e) }),
560
- spreadsheet: (e) => /* @__PURE__ */ m(Ke, { className: s0.spreadsheet, style: t0(e) }),
561
- csv: (e) => /* @__PURE__ */ m(Oe, { className: s0.csv, style: t0(e) }),
562
- document: (e) => /* @__PURE__ */ m($e, { className: s0.document, style: t0(e) }),
563
- presentation: (e) => /* @__PURE__ */ m(Be, { className: s0.presentation, style: t0(e) }),
564
- image: (e) => /* @__PURE__ */ m(De, { className: s0.image, style: t0(e) }),
565
- audio: (e) => /* @__PURE__ */ m(Pe, { className: s0.audio, style: t0(e) }),
566
- video: (e) => /* @__PURE__ */ m(je, { className: s0.video, style: t0(e) }),
567
- archive: (e) => /* @__PURE__ */ m(Ge, { className: s0.archive, style: t0(e) }),
568
- code: (e) => /* @__PURE__ */ m(Te, { className: s0.code, style: t0(e) }),
569
- text: (e) => /* @__PURE__ */ m(We, { className: s0.text, style: t0(e) })
570
557
  }, nt = {
558
+ markdown: (e) => /* @__PURE__ */ f(ze, { className: i0.markdown, style: a0(e) }),
559
+ pdf: (e) => /* @__PURE__ */ f(Be, { className: i0.pdf, style: a0(e) }),
560
+ spreadsheet: (e) => /* @__PURE__ */ f(Ge, { className: i0.spreadsheet, style: a0(e) }),
561
+ csv: (e) => /* @__PURE__ */ f($e, { className: i0.csv, style: a0(e) }),
562
+ document: (e) => /* @__PURE__ */ f(De, { className: i0.document, style: a0(e) }),
563
+ presentation: (e) => /* @__PURE__ */ f(We, { className: i0.presentation, style: a0(e) }),
564
+ image: (e) => /* @__PURE__ */ f(_e, { className: i0.image, style: a0(e) }),
565
+ audio: (e) => /* @__PURE__ */ f(Te, { className: i0.audio, style: a0(e) }),
566
+ video: (e) => /* @__PURE__ */ f(Ke, { className: i0.video, style: a0(e) }),
567
+ archive: (e) => /* @__PURE__ */ f(Ye, { className: i0.archive, style: a0(e) }),
568
+ code: (e) => /* @__PURE__ */ f(Oe, { className: i0.code, style: a0(e) }),
569
+ text: (e) => /* @__PURE__ */ f(je, { className: i0.text, style: a0(e) })
570
+ }, rt = {
571
571
  markdown: ["md", "markdown", "mdx"],
572
572
  pdf: ["pdf"],
573
573
  spreadsheet: ["xls", "xlsx", "xlsm", "xlsb", "ods"],
@@ -580,7 +580,7 @@ const U2 = {
580
580
  archive: ["zip", "tar", "gz", "7z", "rar", "tgz", "bz2"],
581
581
  code: ["js", "mjs", "cjs", "ts", "tsx", "jsx", "json", "html", "htm", "css", "scss", "py", "go", "rs", "c", "cpp", "h", "hpp", "sh", "bash", "yaml", "yml", "sql", "xml", "toml"],
582
582
  text: ["txt", "log"]
583
- }, rt = new Map(Object.entries(nt).flatMap(([e, a]) => a.map((n) => [n, e]))), lt = /* @__PURE__ */ new Set(["", "application/octet-stream", "binary/octet-stream", "text/plain", "application/x-empty"]), ot = (e) => (e ?? "").split(";", 1)[0].trim().toLowerCase(), ct = (e) => {
583
+ }, lt = new Map(Object.entries(rt).flatMap(([e, a]) => a.map((n) => [n, e]))), ot = /* @__PURE__ */ new Set(["", "application/octet-stream", "binary/octet-stream", "text/plain", "application/x-empty"]), ct = (e) => (e ?? "").split(";", 1)[0].trim().toLowerCase(), st = (e) => {
584
584
  if (e === "text/markdown" || e === "text/x-markdown") return "markdown";
585
585
  if (e === "application/pdf") return "pdf";
586
586
  if (e.includes("excel") || e.includes("spreadsheet")) return "spreadsheet";
@@ -594,21 +594,21 @@ const U2 = {
594
594
  if (e === "application/json" || e.includes("javascript") || e.includes("typescript") || e.includes("xml") || e.startsWith("text/html") || e.startsWith("text/css") || e.includes("x-python") || e.includes("x-sh") || e.includes("x-go") || e.includes("x-rust"))
595
595
  return "code";
596
596
  if (e.startsWith("text/")) return "text";
597
- }, st = (e, a, n, r) => {
598
- const o = ot(e), s = ct(o), c = rt.get((a || (n ? O1(n) : "")).toLowerCase()), h = (lt.has(o) ? [c, s] : [s, c]).find((A) => A !== void 0);
599
- return h === void 0 ? /* @__PURE__ */ m(ke, { className: o0.icon, style: t0(r) }) : at[h](r);
600
- }, Qe = (e, a, n) => {
601
- const { entry: r, isDirectory: o, isExpanded: s, extension: c, mimeType: d } = e;
602
- let h;
603
- const A = d || r.mimeType;
604
- return r.icon !== void 0 ? h = r.icon : o ? h = s && a?.directoryExpanded || a?.directory || /* @__PURE__ */ m(k2, { style: t0(n) }) : c && a?.fileByExtension?.[c] ? h = a.fileByExtension[c] : h = a?.file || st(A, c, r.name, n), N1(typeof h == "function" ? h(e) : h, r.absolutePath);
605
- }, it = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), e2 = (e) => {
597
+ }, it = (e, a, n, r) => {
598
+ const o = ct(e), c = st(o), s = lt.get((a || (n ? _1(n) : "")).toLowerCase()), u = (ot.has(o) ? [s, c] : [c, s]).find((p) => p !== void 0);
599
+ return u === void 0 ? /* @__PURE__ */ f(Pe, { className: c0.icon, style: a0(r) }) : nt[u](r);
600
+ }, e2 = (e, a, n) => {
601
+ const { entry: r, isDirectory: o, isExpanded: c, extension: s, mimeType: d } = e;
602
+ let u;
603
+ const p = d || r.mimeType;
604
+ return r.icon !== void 0 ? u = r.icon : o ? u = c && a?.directoryExpanded || a?.directory || /* @__PURE__ */ f(P2, { style: a0(n) }) : s && a?.fileByExtension?.[s] ? u = a.fileByExtension[s] : u = a?.file || it(p, s, r.name, n), P1(typeof u == "function" ? u(e) : u, r.absolutePath);
605
+ }, dt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), t2 = (e) => {
606
606
  if (!e)
607
607
  return;
608
608
  const a = Object.entries(e).filter(([, n]) => n != null);
609
609
  if (a.length !== 0)
610
- return Object.fromEntries(a.map(([n, r]) => [`data-${it(n)}`, String(r)]));
611
- }, dt = [
610
+ return Object.fromEntries(a.map(([n, r]) => [`data-${dt(n)}`, String(r)]));
611
+ }, ht = [
612
612
  // 塗り: 箱の大きさと位置を変えずに行の面・縁・指す形だけを描く (アウトラインと影は箱の外に描かれ、場所を取らない)
613
613
  "color",
614
614
  "background",
@@ -655,160 +655,171 @@ const U2 = {
655
655
  "textDecorationThickness",
656
656
  "textUnderlineOffset",
657
657
  "textTransform"
658
- ], ht = ["color", "opacity"], ut = "the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)", mt = new Set(dt), ft = new Set(ht), we = (e, a) => {
658
+ ], ut = ["color", "opacity"], mt = "the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)", ft = new Set(ht), pt = new Set(ut), we = (e, a) => {
659
659
  const n = a === void 0 ? e.option : `${e.option}.${a}`;
660
660
  return e.absolutePath === void 0 ? n : `${n} of "${e.absolutePath}"`;
661
- }, t2 = (e, a, n, r) => {
661
+ }, a2 = (e, a, n, r) => {
662
662
  if (e !== void 0) {
663
663
  if (typeof e != "object" || e === null)
664
664
  throw new RangeError(`${we(n, void 0)} must be an object of CSS properties or undefined, got ${e === null ? "null" : typeof e}.`);
665
- for (const [o, s] of Object.entries(e))
666
- if (s !== void 0 && !a.has(o))
667
- throw new RangeError(`${we(n, o)} cannot be set: ${ut}, so ${r}.`);
665
+ for (const [o, c] of Object.entries(e))
666
+ if (c !== void 0 && !a.has(o))
667
+ throw new RangeError(`${we(n, o)} cannot be set: ${mt}, so ${r}.`);
668
668
  }
669
- }, K0 = (e, a) => t2(e, mt, a, "a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"), pt = (e, a) => t2(e, ft, a, "the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"), At = 500, a2 = ({ entry: e, isDirectory: a, isExpanded: n, isItemSelected: r, selectionMode: o, onSelectionChange: s, onEntryClick: c, toggleDirectory: d, onToggleDirectoryRecursive: h }) => {
670
- const A = _(null);
671
- return k0(
669
+ }, q0 = (e, a) => a2(e, ft, a, "a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"), At = (e, a) => a2(e, pt, a, "the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"), vt = 500, n2 = ({ entry: e, isDirectory: a, isExpanded: n, isItemSelected: r, selectionMode: o, onSelectionChange: c, onEntryClick: s, toggleDirectory: d, onToggleDirectoryRecursive: u }) => {
670
+ const p = _(null);
671
+ T0(
672
672
  () => () => {
673
- A.current && window.clearTimeout(A.current);
673
+ p.current && window.clearTimeout(p.current);
674
674
  },
675
675
  []
676
- ), b(
677
- (M) => {
678
- M.stopPropagation(), o !== "none" && !a && s && s(e, !r);
679
- let Z = !1;
680
- c({
681
- entry: e,
682
- isDirectory: a,
683
- isExpanded: n,
684
- preventDefault: () => {
685
- Z = !0;
686
- }
687
- }), !(!a || Z) && (A.current ? (window.clearTimeout(A.current), A.current = null, h(e)) : A.current = window.setTimeout(() => {
688
- d(e.absolutePath), A.current = null;
689
- }, At));
676
+ );
677
+ const y = b(() => {
678
+ o !== "none" && !a && c && c(e, !r);
679
+ let H = !1;
680
+ return s({
681
+ entry: e,
682
+ isDirectory: a,
683
+ isExpanded: n,
684
+ preventDefault: () => {
685
+ H = !0;
686
+ }
687
+ }), a && !H;
688
+ }, [e, a, n, r, o, c, s]), E = b(
689
+ (H) => {
690
+ H.stopPropagation(), y() && (p.current ? (window.clearTimeout(p.current), p.current = null, u(e)) : p.current = window.setTimeout(() => {
691
+ d(e.absolutePath), p.current = null;
692
+ }, vt));
690
693
  },
691
- [a, e, n, h, d, c, o, s, r]
694
+ [y, e, u, d]
695
+ ), M = b(
696
+ (H) => {
697
+ H.stopPropagation(), y() && d(e.absolutePath);
698
+ },
699
+ [y, e, d]
692
700
  );
693
- }, n2 = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", be = (e, a) => e.children !== void 0 && a(e.absolutePath), r2 = (e, a) => ({
701
+ return { handleClick: E, handleKeyActivate: M };
702
+ }, r2 = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", Se = (e, a) => e.children !== void 0 && a(e.absolutePath), l2 = (e, a) => ({
694
703
  width: e,
695
704
  gridTemplateColumns: a
696
- }), l2 = T1(
705
+ }), o2 = D1(
697
706
  ({
698
707
  entry: e,
699
708
  indentLevel: a,
700
709
  positionInSet: n,
701
710
  setSize: r,
702
711
  rowIndex: o,
703
- flatIndex: s,
704
- onRowFocus: c,
705
- onRowBlur: d,
706
- isSelectedForAria: h,
707
- rowHeight: A,
708
- isDirOpen: M,
709
- columns: Z,
710
- numericTemplate: E,
711
- numericTotal: u,
712
- nameWidth: p,
713
- rowClassName: f,
714
- selection: { onEntryClick: V, selectedPath: H, currentPath: T, mode: S = "none", selectedItems: L, onSelectionChange: v },
715
- expansion: { toggleDirectory: N, onToggleDirectoryRecursive: R },
716
- visual: { iconOverrides: C, showExpandIcons: i0 = !0, showDirectoryIcons: J = !0, showFileIcons: $ = !0, useCanvasExpandIcons: G = !1, expandIconSize: H0, typeIconSize: z, fontSize: u0, indentSize: V0, highlightStyles: q, expandIconClassName: Q, expandIconStyle: P0 }
712
+ flatIndex: c,
713
+ isActive: s,
714
+ registerRowRef: d,
715
+ onNavigationKeyDown: u,
716
+ onRowFocus: p,
717
+ onRowBlur: y,
718
+ isSelectedForAria: E,
719
+ rowHeight: M,
720
+ isDirOpen: H,
721
+ columns: m,
722
+ numericTemplate: h,
723
+ numericTotal: Z,
724
+ nameWidth: g,
725
+ rowClassName: I,
726
+ selection: { onEntryClick: w, selectedPath: S, currentPath: A, mode: D = "none", selectedItems: P, onSelectionChange: T },
727
+ expansion: { toggleDirectory: z, onToggleDirectoryRecursive: O },
728
+ visual: { iconOverrides: d0, showExpandIcons: r0 = !0, showDirectoryIcons: B = !0, showFileIcons: x = !0, useCanvasExpandIcons: h0 = !1, expandIconSize: y0, typeIconSize: M0, fontSize: Q, indentSize: O0, highlightStyles: e0, expandIconClassName: $0, expandIconStyle: D0 }
717
729
  }) => {
718
- K0(e.style, { option: "entry.style", absolutePath: e.absolutePath });
719
- const [S0, L0] = h0(!1), k = e.children !== void 0, n0 = k && M(e.absolutePath), D = e.absolutePath === H, G0 = e.absolutePath === T, w = !k && !!L?.has(e.absolutePath), T0 = k ? void 0 : Je(e), Z0 = a2({ entry: e, isDirectory: k, isExpanded: n0, isItemSelected: w, selectionMode: S, onSelectionChange: v, onEntryClick: V, toggleDirectory: N, onToggleDirectoryRecursive: R }), I0 = S0 ? q?.hoverClassName !== void 0 ? q.hoverClassName : x.entryHover : "", O0 = (() => {
720
- if (k) {
721
- if (D) return q?.directorySelectedClassName !== void 0 ? q.directorySelectedClassName : x.entrySelected;
722
- } else if (D || w)
723
- return q?.itemSelectedClassName !== void 0 ? q.itemSelectedClassName : W(D && x.entrySelected, w && x.entryItemSelected);
730
+ q0(e.style, { option: "entry.style", absolutePath: e.absolutePath });
731
+ const [v0, u0] = f0(!1), $ = e.children !== void 0, L = $ && H(e.absolutePath), Y = e.absolutePath === S, I0 = e.absolutePath === A, X = !$ && !!P?.has(e.absolutePath), _0 = $ ? void 0 : qe(e), C = b((N) => d(c, N), [d, c]), { handleClick: p0, handleKeyActivate: K } = n2({ entry: e, isDirectory: $, isExpanded: L, isItemSelected: X, selectionMode: D, onSelectionChange: T, onEntryClick: w, toggleDirectory: z, onToggleDirectoryRecursive: O }), z0 = v0 ? e0?.hoverClassName !== void 0 ? e0.hoverClassName : F.entryHover : "", t0 = (() => {
732
+ if ($) {
733
+ if (Y) return e0?.directorySelectedClassName !== void 0 ? e0.directorySelectedClassName : F.entrySelected;
734
+ } else if (Y || X)
735
+ return e0?.itemSelectedClassName !== void 0 ? e0.itemSelectedClassName : j(Y && F.entrySelected, X && F.entryItemSelected);
724
736
  return "";
725
- })(), I = typeof f == "function" ? f(e) : f, m0 = W("dt-grid-row cursor-pointer select-none", I0, O0, I, e.className), j = W(x.expandIcon, Q, (D || w) && x.expandIconSelected), $0 = W(x.typeIcon, (D || w) && x.typeIconSelected), e0 = W("dt-grid-name-label ml-1", o0.name, k && x.nameDirectory, (D || w) && x.nameSelected), Y = qe({ isDirectory: k, isExpanded: n0, showExpandIcons: i0, useCanvasExpandIcons: G, expandIconSize: H0 }), r0 = (k ? J : $) ? Qe({ entry: e, isDirectory: k, isExpanded: n0, isSelected: D, isItemSelected: w, extension: T0, mimeType: e.mimeType }, C, z) : null, y0 = { indentLevel: a, isDirectory: k, isExpanded: n0 }, [p0, ...C0] = Z, A0 = p0?.render ? p0.render(e, y0) : e.label ?? e.name, Y0 = {
726
- ...S0 ? q?.hoverStyle : {},
727
- ...k && D ? q?.directorySelectedStyle : {},
728
- ...!k && (D || w) ? q?.itemSelectedStyle : {}
737
+ })(), U = typeof I == "function" ? I(e) : I, l0 = j("dt-grid-row cursor-pointer select-none", z0, t0, U, e.className), B0 = j(F.expandIcon, $0, (Y || X) && F.expandIconSelected), C0 = j(F.typeIcon, (Y || X) && F.typeIconSelected), W0 = j("dt-grid-name-label ml-1", c0.name, $ && F.nameDirectory, (Y || X) && F.nameSelected), g0 = Qe({ isDirectory: $, isExpanded: L, showExpandIcons: r0, useCanvasExpandIcons: h0, expandIconSize: y0 }), Q0 = ($ ? B : x) ? e2({ entry: e, isDirectory: $, isExpanded: L, isSelected: Y, isItemSelected: X, extension: _0, mimeType: e.mimeType }, d0, M0) : null, E0 = { indentLevel: a, isDirectory: $, isExpanded: L }, [b0, ...j0] = m, F0 = b0?.render ? b0.render(e, E0) : e.label ?? e.name, N0 = {
738
+ ...v0 ? e0?.hoverStyle : {},
739
+ ...$ && Y ? e0?.directorySelectedStyle : {},
740
+ ...!$ && (Y || X) ? e0?.itemSelectedStyle : {}
729
741
  };
730
- return /* @__PURE__ */ b0(
742
+ return /* @__PURE__ */ Z0(
731
743
  "div",
732
744
  {
733
- className: m0,
734
- style: { ...Y0, ...e.style, height: A },
745
+ className: l0,
746
+ style: { ...N0, ...e.style, height: M },
735
747
  role: "row",
736
- "aria-expanded": k ? n0 : void 0,
748
+ "aria-expanded": $ ? L : void 0,
737
749
  "aria-level": a + 1,
738
750
  "aria-posinset": n,
739
751
  "aria-setsize": r,
740
752
  "aria-rowindex": o,
741
- "aria-selected": S === "none" ? void 0 : h,
742
- "aria-current": G0 ? "page" : void 0,
743
- ...e2(e.data),
744
- "data-entry-type": k ? "directory" : "file",
745
- "data-entry-expanded": k ? String(n0) : void 0,
746
- "data-entry-selected": D ? "true" : void 0,
747
- "data-entry-item-selected": w ? "true" : void 0,
748
- onClick: Z0,
749
- onMouseEnter: () => L0(!0),
750
- onMouseLeave: () => L0(!1),
751
- onFocus: (O) => c(s, e.absolutePath, O.currentTarget),
752
- onBlur: (O) => d(e.absolutePath, O.currentTarget),
753
- onKeyDown: (O) => {
754
- if (O.key === "Enter") {
755
- if (O.repeat) {
756
- O.preventDefault();
757
- return;
758
- }
759
- Z0(O);
753
+ "aria-selected": D === "none" ? void 0 : E,
754
+ "aria-current": I0 ? "page" : void 0,
755
+ ...t2(e.data),
756
+ "data-entry-type": $ ? "directory" : "file",
757
+ "data-entry-expanded": $ ? String(L) : void 0,
758
+ "data-entry-selected": Y ? "true" : void 0,
759
+ "data-entry-item-selected": X ? "true" : void 0,
760
+ onClick: p0,
761
+ onMouseEnter: () => u0(!0),
762
+ onMouseLeave: () => u0(!1),
763
+ onFocus: (N) => p(c, e.absolutePath, N.currentTarget),
764
+ onBlur: (N) => y(e.absolutePath, N.currentTarget),
765
+ ref: C,
766
+ onKeyDown: (N) => {
767
+ if (N.key === "Enter" || N.key === " ") {
768
+ N.preventDefault(), N.repeat || K(N);
769
+ return;
760
770
  }
771
+ u(N, c);
761
772
  },
762
- tabIndex: 0,
773
+ tabIndex: s ? 0 : -1,
763
774
  children: [
764
- /* @__PURE__ */ b0("div", { className: W("dt-grid-name-cell", p0?.className), role: "gridcell", style: { width: p, paddingLeft: Math.max(0, a * V0) }, children: [
765
- (i0 || G) && /* @__PURE__ */ m("span", { className: j, style: { ...P0, width: c0, height: c0 }, children: Y }),
766
- (k ? J : $) && /* @__PURE__ */ m("span", { className: $0, style: { width: z, height: z }, children: r0 }),
767
- /* @__PURE__ */ m("span", { className: e0, style: Ue(u0), children: A0 })
775
+ /* @__PURE__ */ Z0("div", { className: j("dt-grid-name-cell", b0?.className), role: "gridcell", style: { width: g, paddingLeft: Math.max(0, a * O0) }, children: [
776
+ (r0 || h0) && /* @__PURE__ */ f("span", { className: B0, style: { ...D0, width: s0, height: s0 }, children: g0 }),
777
+ ($ ? B : x) && /* @__PURE__ */ f("span", { className: C0, style: { width: M0, height: M0 }, children: Q0 }),
778
+ /* @__PURE__ */ f("span", { className: W0, style: Je(Q), children: F0 })
768
779
  ] }),
769
- C0.length > 0 && /* @__PURE__ */ m("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ m("div", { className: "dt-grid-numeric-track", style: r2(u, E), children: C0.map((O) => /* @__PURE__ */ m("div", { className: W("dt-grid-cell", n2(O.align), O.className), role: "gridcell", children: O.render ? O.render(e, y0) : null }, O.key)) }) })
780
+ j0.length > 0 && /* @__PURE__ */ f("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f("div", { className: "dt-grid-numeric-track", style: l2(Z, h), children: j0.map((N) => /* @__PURE__ */ f("div", { className: j("dt-grid-cell", r2(N.align), N.className), role: "gridcell", children: N.render ? N.render(e, E0) : null }, N.key)) }) })
770
781
  ]
771
782
  }
772
783
  );
773
784
  },
774
785
  (e, a) => {
775
786
  if (e.entry !== a.entry) return !1;
776
- const n = be(e.entry, e.isDirOpen), r = be(a.entry, a.isDirOpen);
787
+ const n = Se(e.entry, e.isDirOpen), r = Se(a.entry, a.isDirOpen);
777
788
  return e.indentLevel === a.indentLevel && e.positionInSet === a.positionInSet && e.setSize === a.setSize && e.rowIndex === a.rowIndex && // 焦点の通知は行番号で行うため、番号が変われば描き直してハンドラへ新しい番号を渡す
778
- e.flatIndex === a.flatIndex && e.isSelectedForAria === a.isSelectedForAria && e.rowHeight === a.rowHeight && n === r && e.columns === a.columns && e.numericTemplate === a.numericTemplate && e.numericTotal === a.numericTotal && e.nameWidth === a.nameWidth && e.rowClassName === a.rowClassName && e.selection.selectedPath === a.selection.selectedPath && e.selection.currentPath === a.selection.currentPath && e.selection.mode === a.selection.mode && e.selection.selectedItems === a.selection.selectedItems && e.visual === a.visual;
789
+ e.flatIndex === a.flatIndex && e.isActive === a.isActive && e.isSelectedForAria === a.isSelectedForAria && e.rowHeight === a.rowHeight && n === r && e.columns === a.columns && e.numericTemplate === a.numericTemplate && e.numericTotal === a.numericTotal && e.nameWidth === a.nameWidth && e.rowClassName === a.rowClassName && e.selection.selectedPath === a.selection.selectedPath && e.selection.currentPath === a.selection.currentPath && e.selection.mode === a.selection.mode && e.selection.selectedItems === a.selection.selectedItems && e.visual === a.visual;
779
790
  }
780
791
  );
781
- l2.displayName = "DirectoryTreeGridRow";
782
- const o2 = ({
792
+ o2.displayName = "DirectoryTreeGridRow";
793
+ const c2 = ({
783
794
  kind: e,
784
795
  columns: a,
785
796
  numericTemplate: n,
786
797
  numericTotal: r,
787
798
  nameWidth: o,
788
- scrollBarWidth: s,
789
- className: c,
799
+ scrollBarWidth: c,
800
+ className: s,
790
801
  nameContent: d,
791
- renderCell: h
802
+ renderCell: u
792
803
  }) => {
793
- const [, ...A] = a, M = e === "header" ? "dt-grid-name-header" : "dt-grid-name-footer", Z = e === "header" ? "dt-grid-header" : "dt-grid-footer", E = e === "header" ? "columnheader" : "gridcell";
794
- return /* @__PURE__ */ b0("div", { className: W(Z, o0.gridEdge, c), role: "row", children: [
795
- /* @__PURE__ */ m("div", { className: W(M, "px-1", a[0]?.className), role: E, style: { width: o }, children: d }),
796
- A.length > 0 && /* @__PURE__ */ m("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ m("div", { className: "dt-grid-numeric-track", style: r2(r, n), children: A.map((u) => /* @__PURE__ */ m("div", { className: W("dt-grid-cell", n2(u.align), u.className), role: E, children: h(u) }, u.key)) }) }),
797
- /* @__PURE__ */ m("div", { className: "dt-grid-scrollbar-spacer", style: { width: s }, "aria-hidden": "true" })
804
+ const [, ...p] = a, y = e === "header" ? "dt-grid-name-header" : "dt-grid-name-footer", E = e === "header" ? "dt-grid-header" : "dt-grid-footer", M = e === "header" ? "columnheader" : "gridcell";
805
+ return /* @__PURE__ */ Z0("div", { className: j(E, c0.gridEdge, s), role: "row", children: [
806
+ /* @__PURE__ */ f("div", { className: j(y, "px-1", a[0]?.className), role: M, style: { width: o }, children: d }),
807
+ p.length > 0 && /* @__PURE__ */ f("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f("div", { className: "dt-grid-numeric-track", style: l2(r, n), children: p.map((H) => /* @__PURE__ */ f("div", { className: j("dt-grid-cell", r2(H.align), H.className), role: M, children: u(H) }, H.key)) }) }),
808
+ /* @__PURE__ */ f("div", { className: "dt-grid-scrollbar-spacer", style: { width: c }, "aria-hidden": "true" })
798
809
  ] });
799
- }, vt = ({ columns: e, className: a, ...n }) => /* @__PURE__ */ m(o2, { kind: "header", columns: e, className: a, nameContent: e[0]?.header ?? null, renderCell: (r) => r.header ?? null, ...n }), Se = (e, a) => typeof e == "function" ? e(a) : e ?? null, gt = ({ columns: e, allEntries: a, className: n, ...r }) => /* @__PURE__ */ m(o2, { kind: "footer", columns: e, className: n, nameContent: Se(e[0]?.footer, a), renderCell: (o) => Se(o.footer, a), ...r }), Ht = 240, c2 = 96, s2 = 12, R1 = (e, a) => {
810
+ }, gt = ({ columns: e, className: a, ...n }) => /* @__PURE__ */ f(c2, { kind: "header", columns: e, className: a, nameContent: e[0]?.header ?? null, renderCell: (r) => r.header ?? null, ...n }), Le = (e, a) => typeof e == "function" ? e(a) : e ?? null, Ht = ({ columns: e, allEntries: a, className: n, ...r }) => /* @__PURE__ */ f(c2, { kind: "footer", columns: e, className: n, nameContent: Le(e[0]?.footer, a), renderCell: (o) => Le(o.footer, a), ...r }), Vt = 240, s2 = 96, i2 = 12, T1 = (e, a) => {
800
811
  const n = e?.width;
801
812
  return typeof n == "number" && Number.isFinite(n) && n > 0 ? n : a;
802
- }, Vt = (e) => e.slice(1).map((a) => `${R1(a, c2)}px`).join(" "), Zt = ({ measuredWidth: e, columns: a, scrollBarWidth: n = s2 }) => {
803
- const r = R1(a[0], Ht), o = a.slice(1).reduce((h, A) => h + R1(A, c2), 0), s = Number.isFinite(e) && e > 0 ? e : 0, c = Math.max(0, s - r - Math.max(0, n)), d = Math.max(0, o - c);
804
- return { nameWidth: r, numericTotal: o, numericVisible: c, maxHScroll: d };
805
- }, F1 = (e, a) => !Number.isFinite(e) || e < 0 ? 0 : e > a ? a : e, yt = (e) => {
813
+ }, Zt = (e) => e.slice(1).map((a) => `${T1(a, s2)}px`).join(" "), yt = ({ measuredWidth: e, columns: a, scrollBarWidth: n = i2 }) => {
814
+ const r = T1(a[0], Vt), o = a.slice(1).reduce((u, p) => u + T1(p, s2), 0), c = Number.isFinite(e) && e > 0 ? e : 0, s = Math.max(0, c - r - Math.max(0, n)), d = Math.max(0, o - s);
815
+ return { nameWidth: r, numericTotal: o, numericVisible: s, maxHScroll: d };
816
+ }, k1 = (e, a) => !Number.isFinite(e) || e < 0 ? 0 : e > a ? a : e, Mt = (e) => {
806
817
  const a = [], n = (r) => {
807
818
  for (const o of r)
808
819
  a.push(o), o.children && o.children.length > 0 && n(o.children);
809
820
  };
810
821
  return n(e), a;
811
- }, i2 = ["entryKindDirectory", "entryKindFile"], Le = [...m1, ...i2], k1 = Object.freeze({
822
+ }, d2 = ["entryKindDirectory", "entryKindFile"], Ie = [...p1, ...d2], O1 = Object.freeze({
812
823
  en: Object.freeze({
813
824
  entryKindDirectory: "directory",
814
825
  entryKindFile: "file"
@@ -817,45 +828,45 @@ const o2 = ({
817
828
  entryKindDirectory: "ディレクトリ",
818
829
  entryKindFile: "ファイル"
819
830
  })
820
- }), Mt = Object.freeze({
821
- en: Object.freeze({ ...ye.en, ...k1.en }),
822
- ja: Object.freeze({ ...ye.ja, ...k1.ja })
823
- }), Ie = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, Et = (e) => {
831
+ }), Et = Object.freeze({
832
+ en: Object.freeze({ ...Me.en, ...O1.en }),
833
+ ja: Object.freeze({ ...Me.ja, ...O1.ja })
834
+ }), Ce = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, bt = (e) => {
824
835
  const a = {};
825
836
  let n = !1;
826
- for (const r of m1) {
837
+ for (const r of p1) {
827
838
  const o = Object.hasOwn(e, r) ? e[r] : void 0;
828
839
  o !== void 0 && (a[r] = o, n = !0);
829
840
  }
830
841
  return n ? a : void 0;
831
842
  }, wt = (e, a) => {
832
- const n = Re(e);
843
+ const n = ke(e);
833
844
  if (a === void 0)
834
- return Mt[n];
845
+ return Et[n];
835
846
  if (a === null || typeof a != "object")
836
- throw new RangeError(`[directory-tree] labels must be an object; got ${Ie(a)}`);
847
+ throw new RangeError(`[directory-tree] labels must be an object; got ${Ce(a)}`);
837
848
  const r = Object.getPrototypeOf(a);
838
849
  if (r !== Object.prototype && r !== null)
839
850
  throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(a) ? "an array" : "an object with a non-plain prototype"}`);
840
- for (const c of Object.keys(a))
841
- if (!Le.includes(c))
842
- throw new RangeError(`[directory-tree] labels.${c} is not a known label key; expected one of ${Le.join(", ")}`);
843
- const s = { ...M2(n, Et(a)), ...k1[n] };
844
- for (const c of i2) {
845
- const d = Object.hasOwn(a, c) ? a[c] : void 0;
851
+ for (const s of Object.keys(a))
852
+ if (!Ie.includes(s))
853
+ throw new RangeError(`[directory-tree] labels.${s} is not a known label key; expected one of ${Ie.join(", ")}`);
854
+ const c = { ...E2(n, bt(a)), ...O1[n] };
855
+ for (const s of d2) {
856
+ const d = Object.hasOwn(a, s) ? a[s] : void 0;
846
857
  if (d !== void 0) {
847
858
  if (typeof d != "string" || d.trim() === "")
848
- throw new RangeError(`[directory-tree] labels.${c} must be a non-blank string; got ${Ie(d)}`);
849
- s[c] = d;
859
+ throw new RangeError(`[directory-tree] labels.${s} must be a non-blank string; got ${Ce(d)}`);
860
+ c[s] = d;
850
861
  }
851
862
  }
852
- return Object.freeze(s);
853
- }, bt = (e) => {
863
+ return Object.freeze(c);
864
+ }, St = (e) => {
854
865
  const a = {};
855
- for (const n of m1)
866
+ for (const n of p1)
856
867
  a[n] = e[n];
857
868
  return Object.freeze(a);
858
- }, St = () => {
869
+ }, Lt = () => {
859
870
  let e = null;
860
871
  return {
861
872
  mark: (a) => {
@@ -866,205 +877,205 @@ const o2 = ({
866
877
  },
867
878
  landedOn: (a) => e?.includes(a) === !0
868
879
  };
869
- }, e1 = (e) => typeof e == "string" ? JSON.stringify(e) : String(e), P1 = (e, a) => {
880
+ }, r1 = (e) => typeof e == "string" ? JSON.stringify(e) : String(e), $1 = (e, a) => {
870
881
  if (typeof a != "number" || !Number.isFinite(a) || a <= 0)
871
- throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${e1(a)}.`);
882
+ throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${r1(a)}.`);
872
883
  return a;
873
- }, Lt = (e) => {
884
+ }, It = (e) => {
874
885
  if (typeof e == "string" && e.trim() !== "" || typeof e == "number" && Number.isFinite(e) && e > 0)
875
886
  return e;
876
- throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${e1(e)}.`);
877
- }, It = ({ indentSize: e, typeIconSize: a, fontSize: n }) => ({
878
- indentSize: e === void 0 ? q2 : P1("indentSize", e),
879
- typeIconSize: a === void 0 ? et : P1("typeIconSize", a),
880
- fontSize: n === void 0 ? void 0 : Lt(n)
881
- }), Ct = ({ indentSize: e, removeRootIndent: a, hasExpandBox: n }) => a ? Math.max(0, e - (n ? c0 : 0)) : 0, xt = (e, a, n) => {
887
+ throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${r1(e)}.`);
888
+ }, Ct = ({ indentSize: e, typeIconSize: a, fontSize: n }) => ({
889
+ indentSize: e === void 0 ? Q2 : $1("indentSize", e),
890
+ typeIconSize: a === void 0 ? tt : $1("typeIconSize", a),
891
+ fontSize: n === void 0 ? void 0 : It(n)
892
+ }), Ft = ({ indentSize: e, removeRootIndent: a, hasExpandBox: n }) => a ? Math.max(0, e - (n ? s0 : 0)) : 0, Nt = (e, a, n) => {
882
893
  if (typeof e != "function")
883
- return P1("itemHeight", e);
894
+ return $1("itemHeight", e);
884
895
  const r = e(a, n);
885
896
  if (typeof r != "number" || !Number.isFinite(r) || r <= 0)
886
- throw new RangeError(`[directory-tree] visual.itemHeight returned ${e1(r)} for ${JSON.stringify(a.absolutePath)} (row ${n}); it must return a finite number greater than 0 (px).`);
897
+ throw new RangeError(`[directory-tree] visual.itemHeight returned ${r1(r)} for ${JSON.stringify(a.absolutePath)} (row ${n}); it must return a finite number greater than 0 (px).`);
887
898
  return r;
888
- }, Ft = (e, a, n) => {
889
- const r = a === void 0 ? Q2 : a;
890
- if (typeof r != "number" || !Number.isFinite(r) || r <= 0 || r > c0)
891
- throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${c0} (the expand box, px) while tree lines are drawn; got ${e1(r)}.`);
892
- const { indentSize: o, typeIconSize: s } = e, c = r / 2, d = c0 + s - r / 2;
893
- if (o < c || o > d)
899
+ }, xt = (e, a, n) => {
900
+ const r = a === void 0 ? et : a;
901
+ if (typeof r != "number" || !Number.isFinite(r) || r <= 0 || r > s0)
902
+ throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${s0} (the expand box, px) while tree lines are drawn; got ${r1(r)}.`);
903
+ const { indentSize: o, typeIconSize: c } = e, s = r / 2, d = s0 + c - r / 2;
904
+ if (o < s || o > d)
894
905
  throw new RangeError(
895
- `[directory-tree] visual.indentSize ${e1(o)} does not fit the tree lines: with typeIconSize ${s} and an expand glyph of ${r} px it must be from ${c} (half the glyph) to ${d} (the ${c0} px expand box + typeIconSize − half the glyph).`
906
+ `[directory-tree] visual.indentSize ${r1(o)} does not fit the tree lines: with typeIconSize ${c} and an expand glyph of ${r} px it must be from ${s} (half the glyph) to ${d} (the ${s0} px expand box + typeIconSize − half the glyph).`
896
907
  );
897
- return { indentSize: o, typeIconSize: s, glyphSize: r, originX: n };
898
- }, Nt = ({ indentSize: e, typeIconSize: a, glyphSize: n }) => Math.min(Math.max(c0 + a / 2 - e, n / 2), c0 - n / 2), Rt = (e, a) => {
908
+ return { indentSize: o, typeIconSize: c, glyphSize: r, originX: n };
909
+ }, Rt = ({ indentSize: e, typeIconSize: a, glyphSize: n }) => Math.min(Math.max(s0 + a / 2 - e, n / 2), s0 - n / 2), kt = (e, a) => {
899
910
  const n = e.length - 1;
900
911
  if (n <= 0) return 0;
901
- let r = 0, o = n - 1, s = 0;
912
+ let r = 0, o = n - 1, c = 0;
902
913
  for (; r <= o; ) {
903
- const c = r + o >>> 1;
904
- e[c] <= a ? (s = c, r = c + 1) : o = c - 1;
914
+ const s = r + o >>> 1;
915
+ e[s] <= a ? (c = s, r = s + 1) : o = s - 1;
905
916
  }
906
- return s;
907
- }, kt = (e, a, n) => {
917
+ return c;
918
+ }, Pt = (e, a, n) => {
908
919
  if (n <= 0 || e.length === 0 || a.length !== e.length + 1)
909
920
  return null;
910
- const r = Rt(a, n), o = e[r];
921
+ const r = kt(a, n), o = e[r];
911
922
  return o ? {
912
923
  path: o.entry.absolutePath,
913
924
  offsetInViewport: n - a[r]
914
925
  } : null;
915
- }, Pt = (e, a, n) => {
926
+ }, Tt = (e, a, n) => {
916
927
  if (a.length === 0 || n.length !== a.length + 1)
917
928
  return null;
918
929
  for (let r = 0; r < a.length; r++)
919
930
  if (a[r].entry.absolutePath === e.path)
920
931
  return Math.max(0, n[r] + e.offsetInViewport);
921
932
  return null;
922
- }, Tt = (e, a, n) => {
933
+ }, Ot = (e, a, n) => {
923
934
  const r = [];
924
935
  for (let o = a; o < n; o++) {
925
- const s = e[o];
926
- if (!(!s || s.length === 0))
927
- for (const c of s)
928
- r.push(c);
936
+ const c = e[o];
937
+ if (!(!c || c.length === 0))
938
+ for (const s of c)
939
+ r.push(s);
929
940
  }
930
941
  return r;
931
- }, Ot = (e, a, n) => {
942
+ }, $t = (e, a, n) => {
932
943
  const r = [];
933
944
  for (let o = a; o < n; o++) {
934
- const s = e[o];
935
- if (!(!s || s.length === 0))
936
- for (const c of s)
937
- r.push(c);
945
+ const c = e[o];
946
+ if (!(!c || c.length === 0))
947
+ for (const s of c)
948
+ r.push(s);
938
949
  }
939
950
  return r;
940
- }, $t = (e, a, n, r) => {
941
- const o = Math.max(1, Math.floor(a * r)), s = Math.max(1, Math.floor(n * r));
942
- (e.width !== o || e.height !== s) && (e.width = o, e.height = s);
943
- const c = e.style;
944
- c.width !== `${a}px` && (c.width = `${a}px`), c.height !== `${n}px` && (c.height = `${n}px`);
945
- }, Dt = (e, a, n) => {
951
+ }, Dt = (e, a, n, r) => {
952
+ const o = Math.max(1, Math.floor(a * r)), c = Math.max(1, Math.floor(n * r));
953
+ (e.width !== o || e.height !== c) && (e.width = o, e.height = c);
954
+ const s = e.style;
955
+ s.width !== `${a}px` && (s.width = `${a}px`), s.height !== `${n}px` && (s.height = `${n}px`);
956
+ }, _t = (e, a, n) => {
946
957
  e.lineWidth = n, e.beginPath();
947
958
  for (const r of a)
948
959
  e.moveTo(r.x1, r.y1), e.lineTo(r.x2, r.y2);
949
960
  e.stroke();
950
- }, _t = (e, a, n, r) => {
961
+ }, zt = (e, a, n, r) => {
951
962
  if (a.length === 0)
952
963
  return;
953
- const o = e.strokeStyle, s = e.lineWidth, c = e.lineCap, d = e.lineJoin;
964
+ const o = e.strokeStyle, c = e.lineWidth, s = e.lineCap, d = e.lineJoin;
954
965
  e.strokeStyle = n, e.lineCap = "round", e.lineJoin = "round";
955
- for (const h of a) {
956
- const A = r ?? h.size, M = Math.max(0, A / 2), Z = Math.max(1, Math.round(A * 0.08)), E = Math.max(1, Math.round(A * 0.14)), u = Math.max(0, M - Z * 0.8), p = Math.max(0, u * 0.55);
957
- e.lineWidth = Z, e.beginPath(), e.arc(h.centerX, h.centerY, Math.max(0, M - Z * 0.3), 0, Math.PI * 2), e.stroke(), e.lineWidth = E, e.beginPath(), e.moveTo(h.centerX - p, h.centerY), e.lineTo(h.centerX + p, h.centerY), e.stroke(), h.isExpanded || (e.beginPath(), e.moveTo(h.centerX, h.centerY - p), e.lineTo(h.centerX, h.centerY + p), e.stroke());
966
+ for (const u of a) {
967
+ const p = r ?? u.size, y = Math.max(0, p / 2), E = Math.max(1, Math.round(p * 0.08)), M = Math.max(1, Math.round(p * 0.14)), H = Math.max(0, y - E * 0.8), m = Math.max(0, H * 0.55);
968
+ e.lineWidth = E, e.beginPath(), e.arc(u.centerX, u.centerY, Math.max(0, y - E * 0.3), 0, Math.PI * 2), e.stroke(), e.lineWidth = M, e.beginPath(), e.moveTo(u.centerX - m, u.centerY), e.lineTo(u.centerX + m, u.centerY), e.stroke(), u.isExpanded || (e.beginPath(), e.moveTo(u.centerX, u.centerY - m), e.lineTo(u.centerX, u.centerY + m), e.stroke());
958
969
  }
959
- e.strokeStyle = o, e.lineWidth = s, e.lineCap = c, e.lineJoin = d;
960
- }, d2 = T1(({ segmentsByItem: e, glyphsByItem: a, itemHeight: n, width: r, viewportHeight: o, scrollPosition: s, color: c = Ye, strokeWidth: d = 1, renderStartIndex: h, renderEndIndex: A, lookaheadEndIndex: M, devicePixelRatio: Z, expandGlyphColor: E, expandGlyphSize: u }) => {
961
- const p = _(null), f = _(null), V = _({
970
+ e.strokeStyle = o, e.lineWidth = c, e.lineCap = s, e.lineJoin = d;
971
+ }, h2 = D1(({ segmentsByItem: e, glyphsByItem: a, itemHeight: n, width: r, viewportHeight: o, scrollPosition: c, color: s = Xe, strokeWidth: d = 1, renderStartIndex: u, renderEndIndex: p, lookaheadEndIndex: y, devicePixelRatio: E, expandGlyphColor: M, expandGlyphSize: H }) => {
972
+ const m = _(null), h = _(null), Z = _({
962
973
  segmentsByItem: e,
963
974
  glyphsByItem: a,
964
975
  itemHeight: n,
965
976
  width: r,
966
977
  viewportHeight: o,
967
- scrollPosition: s,
968
- color: c,
978
+ scrollPosition: c,
979
+ color: s,
969
980
  strokeWidth: d,
970
- renderStartIndex: h,
971
- renderEndIndex: A,
972
- lookaheadEndIndex: M,
973
- devicePixelRatio: Z,
974
- expandGlyphColor: E,
975
- expandGlyphSize: u
976
- }), H = b(() => {
977
- f.current = null;
978
- const S = p.current;
979
- if (!S)
981
+ renderStartIndex: u,
982
+ renderEndIndex: p,
983
+ lookaheadEndIndex: y,
984
+ devicePixelRatio: E,
985
+ expandGlyphColor: M,
986
+ expandGlyphSize: H
987
+ }), g = b(() => {
988
+ h.current = null;
989
+ const w = m.current;
990
+ if (!w)
980
991
  return;
981
- const L = S.getContext("2d");
982
- if (!L)
992
+ const S = w.getContext("2d");
993
+ if (!S)
983
994
  return;
984
- const v = V.current;
985
- if (v.width <= 0 || v.viewportHeight <= 0) {
986
- L.clearRect(0, 0, S.width, S.height);
995
+ const A = Z.current;
996
+ if (A.width <= 0 || A.viewportHeight <= 0) {
997
+ S.clearRect(0, 0, w.width, w.height);
987
998
  return;
988
999
  }
989
- const N = Number.isFinite(v.devicePixelRatio ?? NaN) ? v.devicePixelRatio : typeof window < "u" && window.devicePixelRatio || 1;
990
- $t(S, v.width, v.viewportHeight, N);
991
- const R = v.segmentsByItem.length, C = typeof v.renderStartIndex == "number" && Number.isFinite(v.renderStartIndex) ? Math.max(0, Math.floor(v.renderStartIndex)) : Math.max(0, Math.floor(v.scrollPosition / v.itemHeight)), i0 = Math.min(R, Math.ceil((v.scrollPosition + v.viewportHeight) / v.itemHeight)), J = (() => {
992
- if (typeof v.renderEndIndex == "number" && Number.isFinite(v.renderEndIndex)) {
993
- const z = Math.floor(v.renderEndIndex);
994
- return Math.max(Math.min(R, z + 1), C);
1000
+ const D = Number.isFinite(A.devicePixelRatio ?? NaN) ? A.devicePixelRatio : typeof window < "u" && window.devicePixelRatio || 1;
1001
+ Dt(w, A.width, A.viewportHeight, D);
1002
+ const P = A.segmentsByItem.length, T = typeof A.renderStartIndex == "number" && Number.isFinite(A.renderStartIndex) ? Math.max(0, Math.floor(A.renderStartIndex)) : Math.max(0, Math.floor(A.scrollPosition / A.itemHeight)), z = Math.min(P, Math.ceil((A.scrollPosition + A.viewportHeight) / A.itemHeight)), O = (() => {
1003
+ if (typeof A.renderEndIndex == "number" && Number.isFinite(A.renderEndIndex)) {
1004
+ const x = Math.floor(A.renderEndIndex);
1005
+ return Math.max(Math.min(P, x + 1), T);
995
1006
  }
996
- return Math.max(i0, C);
997
- })(), $ = (() => {
998
- if (typeof v.lookaheadEndIndex == "number" && Number.isFinite(v.lookaheadEndIndex)) {
999
- const z = Math.floor(v.lookaheadEndIndex), u0 = Math.min(R, z + 1);
1000
- return Math.max(u0, J);
1007
+ return Math.max(z, T);
1008
+ })(), d0 = (() => {
1009
+ if (typeof A.lookaheadEndIndex == "number" && Number.isFinite(A.lookaheadEndIndex)) {
1010
+ const x = Math.floor(A.lookaheadEndIndex), h0 = Math.min(P, x + 1);
1011
+ return Math.max(h0, O);
1001
1012
  }
1002
- return Math.max(i0, J);
1003
- })(), G = Tt(v.segmentsByItem, C, $), H0 = Ot(v.glyphsByItem, C, $);
1004
- L.save(), L.scale(N, N), L.clearRect(0, 0, v.width, v.viewportHeight), L.translate(0, -v.scrollPosition), L.strokeStyle = v.color, Dt(L, G, v.strokeWidth), _t(L, H0, v.expandGlyphColor ?? v.color, v.expandGlyphSize), L.restore();
1005
- }, []), T = b(() => {
1006
- f.current === null && (f.current = window.requestAnimationFrame(H));
1007
- }, [H]);
1008
- return k0(() => {
1009
- V.current = {
1013
+ return Math.max(z, O);
1014
+ })(), r0 = Ot(A.segmentsByItem, T, d0), B = $t(A.glyphsByItem, T, d0);
1015
+ S.save(), S.scale(D, D), S.clearRect(0, 0, A.width, A.viewportHeight), S.translate(0, -A.scrollPosition), S.strokeStyle = A.color, _t(S, r0, A.strokeWidth), zt(S, B, A.expandGlyphColor ?? A.color, A.expandGlyphSize), S.restore();
1016
+ }, []), I = b(() => {
1017
+ h.current === null && (h.current = window.requestAnimationFrame(g));
1018
+ }, [g]);
1019
+ return T0(() => {
1020
+ Z.current = {
1010
1021
  segmentsByItem: e,
1011
1022
  glyphsByItem: a,
1012
1023
  itemHeight: n,
1013
1024
  width: r,
1014
1025
  viewportHeight: o,
1015
- scrollPosition: s,
1016
- color: c,
1026
+ scrollPosition: c,
1027
+ color: s,
1017
1028
  strokeWidth: d,
1018
- renderStartIndex: h,
1019
- renderEndIndex: A,
1020
- lookaheadEndIndex: M,
1021
- devicePixelRatio: Z,
1022
- expandGlyphColor: E,
1023
- expandGlyphSize: u
1024
- }, T();
1025
- }, [e, a, n, r, o, s, c, d, h, A, M, Z, E, u, T]), k0(() => () => {
1026
- f.current !== null && (window.cancelAnimationFrame(f.current), f.current = null);
1027
- }, []), /* @__PURE__ */ m("canvas", { ref: p, className: "pointer-events-none absolute top-0 left-0 z-0" });
1029
+ renderStartIndex: u,
1030
+ renderEndIndex: p,
1031
+ lookaheadEndIndex: y,
1032
+ devicePixelRatio: E,
1033
+ expandGlyphColor: M,
1034
+ expandGlyphSize: H
1035
+ }, I();
1036
+ }, [e, a, n, r, o, c, s, d, u, p, y, E, M, H, I]), T0(() => () => {
1037
+ h.current !== null && (window.cancelAnimationFrame(h.current), h.current = null);
1038
+ }, []), /* @__PURE__ */ f("canvas", { ref: m, className: "pointer-events-none absolute top-0 left-0 z-0" });
1028
1039
  });
1029
- d2.displayName = "TreeLineCanvas";
1030
- const zt = (e) => {
1040
+ h2.displayName = "TreeLineCanvas";
1041
+ const Bt = (e) => {
1031
1042
  const a = /* @__PURE__ */ new Map();
1032
1043
  for (let n = 0; n < e.length; n++) {
1033
1044
  const r = e[n].entry.absolutePath;
1034
1045
  a.has(r) || a.set(r, n);
1035
1046
  }
1036
1047
  return a;
1037
- }, Ce = (e, a) => e.selectedPath === a ? e : { selectedPath: a, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, Bt = (e, a) => ({ ...e, anchor: { path: a, selectionGeneration: e.selectionGeneration, focused: !0 } }), Wt = (e, a) => {
1048
+ }, Fe = (e, a) => e.selectedPath === a ? e : { selectedPath: a, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, Wt = (e, a) => ({ ...e, anchor: { path: a, selectionGeneration: e.selectionGeneration, focused: !0 } }), jt = (e, a) => {
1038
1049
  const { anchor: n, selectionGeneration: r, selectedPath: o } = a;
1039
1050
  if (n !== null && (n.focused || n.selectionGeneration === r)) {
1040
- const s = e.get(n.path);
1041
- if (s !== void 0)
1042
- return s;
1051
+ const c = e.get(n.path);
1052
+ if (c !== void 0)
1053
+ return c;
1043
1054
  }
1044
1055
  if (o !== null) {
1045
- const s = e.get(o);
1046
- if (s !== void 0)
1047
- return s;
1056
+ const c = e.get(o);
1057
+ if (c !== void 0)
1058
+ return c;
1048
1059
  }
1049
1060
  return 0;
1050
- }, jt = {
1061
+ }, Kt = {
1051
1062
  msOverflowStyle: "none",
1052
1063
  scrollbarWidth: "none"
1053
- }, Kt = () => {
1064
+ }, Gt = () => {
1054
1065
  let e = document.getElementById("directory-tree-webkit-scrollbar-hide");
1055
1066
  e || (e = document.createElement("style"), e.id = "directory-tree-webkit-scrollbar-hide", e.textContent = ".directory-tree-container::-webkit-scrollbar { display: none; }", document.head.appendChild(e));
1056
- }, Gt = () => () => {
1057
- }, Yt = () => !0, Xt = () => !1, Ut = (e) => {
1067
+ }, Yt = () => () => {
1068
+ }, Xt = () => !0, Ut = () => !1, Jt = (e) => {
1058
1069
  const a = _(null), n = a.current;
1059
- return n !== null && m1.every((r) => n[r] === e[r]) ? n : (a.current = e, e);
1060
- }, xe = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), Fe = (e) => {
1070
+ return n !== null && p1.every((r) => n[r] === e[r]) ? n : (a.current = e, e);
1071
+ }, Ne = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), xe = (e) => {
1061
1072
  const a = e?.align;
1062
1073
  if (a === void 0)
1063
1074
  return "top";
1064
- if (!xe.has(a))
1065
- throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(a)}; expected one of ${[...xe].join(", ")}.`);
1075
+ if (!Ne.has(a))
1076
+ throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(a)}; expected one of ${[...Ne].join(", ")}.`);
1066
1077
  return a;
1067
- }, Jt = {
1078
+ }, qt = {
1068
1079
  position: "absolute",
1069
1080
  width: 1,
1070
1081
  height: 1,
@@ -1074,230 +1085,230 @@ const zt = (e) => {
1074
1085
  overflow: "hidden",
1075
1086
  clipPath: "inset(50%)",
1076
1087
  whiteSpace: "nowrap"
1077
- }, qt = (e, a, n, r, o) => {
1078
- const s = [], c = [];
1088
+ }, Qt = (e, a, n, r, o) => {
1089
+ const c = [], s = [];
1079
1090
  let d = 0;
1080
- const h = (A, M, Z) => {
1081
- const E = o ? [...A].sort(o) : A;
1082
- for (let u = 0; u < E.length; u++) {
1083
- const p = E[u], f = u === E.length - 1, V = [...Z, f], H = p.children !== void 0, T = H && a(p.absolutePath, p.relativePath);
1084
- let S = M, L = Z;
1085
- r && (S = M - 1, L = Z.slice(1)), s.push({ entry: p, indentLevel: S, depth: M, positionInSet: u + 1, setSize: E.length }), n && (S > d && (d = S), c.push({
1086
- id: p.absolutePath,
1087
- name: p.name,
1088
- absolutePath: p.absolutePath,
1089
- indentLevel: S,
1090
- isLastChild: f,
1091
- isDirectory: H,
1092
- isExpanded: T,
1093
- ancestorIsLast: [...L],
1094
- hideLines: r && M === 0
1095
- })), H && T && p.children && h(p.children, M + 1, V);
1091
+ const u = (p, y, E) => {
1092
+ const M = o ? [...p].sort(o) : p;
1093
+ for (let H = 0; H < M.length; H++) {
1094
+ const m = M[H], h = H === M.length - 1, Z = [...E, h], g = m.children !== void 0, I = g && a(m.absolutePath, m.relativePath);
1095
+ let w = y, S = E;
1096
+ r && (w = y - 1, S = E.slice(1)), c.push({ entry: m, indentLevel: w, depth: y, positionInSet: H + 1, setSize: M.length }), n && (w > d && (d = w), s.push({
1097
+ id: m.absolutePath,
1098
+ name: m.name,
1099
+ absolutePath: m.absolutePath,
1100
+ indentLevel: w,
1101
+ isLastChild: h,
1102
+ isDirectory: g,
1103
+ isExpanded: I,
1104
+ ancestorIsLast: [...S],
1105
+ hideLines: r && y === 0
1106
+ })), g && I && m.children && u(m.children, y + 1, Z);
1096
1107
  }
1097
1108
  };
1098
- return h(e, 0, []), { flatItems: s, lineItems: c, maxIndent: d };
1099
- }, Ne = (e, a) => {
1109
+ return u(e, 0, []), { flatItems: c, lineItems: s, maxIndent: d };
1110
+ }, Re = (e, a) => {
1100
1111
  const n = e.length - 1;
1101
1112
  if (n <= 0) return 0;
1102
- let r = 0, o = n - 1, s = 0;
1113
+ let r = 0, o = n - 1, c = 0;
1103
1114
  for (; r <= o; ) {
1104
- const c = r + o >>> 1;
1105
- e[c] <= a ? (s = c, r = c + 1) : o = c - 1;
1115
+ const s = r + o >>> 1;
1116
+ e[s] <= a ? (c = s, r = s + 1) : o = s - 1;
1106
1117
  }
1107
- return s;
1108
- }, Qt = (e, a, n, r, o, s) => {
1109
- const c = r?.renderStart ?? Math.max(0, Ne(s, o)), d = a > 0 ? Ne(s, o + a) + n : c + n, h = e > 0 ? Math.min(e - 1, Math.max(c, d)) : c, A = r?.renderEnd ?? h, M = e > 0 ? Math.min(e - 1, A + n) : A;
1110
- return { renderStart: c, renderEnd: A, lookaheadEnd: M };
1111
- }, e8 = (e, a, n, r) => {
1118
+ return c;
1119
+ }, e8 = (e, a, n, r, o, c) => {
1120
+ const s = r?.renderStart ?? Math.max(0, Re(c, o)), d = a > 0 ? Re(c, o + a) + n : s + n, u = e > 0 ? Math.min(e - 1, Math.max(s, d)) : s, p = r?.renderEnd ?? u, y = e > 0 ? Math.min(e - 1, p + n) : p;
1121
+ return { renderStart: s, renderEnd: p, lookaheadEnd: y };
1122
+ }, t8 = (e, a, n, r, o) => {
1112
1123
  if (e.length === 0)
1113
1124
  return { segmentsByItem: [], glyphsByItem: [] };
1114
- const { indentSize: o, typeIconSize: s, glyphSize: c, originX: d } = r, h = Array.from({ length: e.length }, () => []), A = Array.from({ length: e.length }, () => []), M = d + Nt(r), Z = (u) => u * o + M, E = c / 2 + 2;
1115
- for (let u = 0; u < e.length; u++) {
1116
- const p = e[u], f = a[u] ?? 0, V = n[u] ?? 0, H = V + f / 2, T = e[u + 1], S = H + s / 2, L = V + f, v = T !== void 0 && T.indentLevel === p.indentLevel + 1 && S < L ? { key: `${p.id}-connector-children`, x1: Z(T.indentLevel), y1: S, x2: Z(T.indentLevel), y2: L, itemIndex: u } : null;
1117
- if (p.hideLines) {
1118
- v !== null && (h[u] = [v]);
1125
+ const { indentSize: c, typeIconSize: s, glyphSize: d, originX: u } = r, p = Array.from({ length: e.length }, () => []), y = Array.from({ length: e.length }, () => []), E = u + Rt(r), M = (m) => m * c + E, H = d / 2 + 2;
1126
+ for (let m = 0; m < e.length; m++) {
1127
+ const h = e[m], Z = a[m] ?? 0, g = n[m] ?? 0, I = g + Z / 2, w = e[m + 1], S = I + s / 2, A = g + Z, D = w !== void 0 && w.indentLevel === h.indentLevel + 1 && S < A ? { key: `${h.id}-connector-children`, x1: M(w.indentLevel), y1: S, x2: M(w.indentLevel), y2: A, itemIndex: m } : null;
1128
+ if (h.hideLines) {
1129
+ D !== null && (p[m] = [D]);
1119
1130
  continue;
1120
1131
  }
1121
- const N = [];
1122
- for (let C = 0; C < p.indentLevel; C++) {
1123
- if (p.ancestorIsLast[C] ?? !1)
1132
+ const P = [], T = h.isDirectory && o;
1133
+ for (let O = 0; O < h.indentLevel; O++) {
1134
+ if (h.ancestorIsLast[O] ?? !1)
1124
1135
  continue;
1125
- let J = !1;
1126
- for (let $ = u; $ < e.length; $++) {
1127
- const G = e[$];
1128
- if (G.indentLevel > C && G.ancestorIsLast.length > C && !G.ancestorIsLast[C]) {
1129
- J = !0;
1136
+ let r0 = !1;
1137
+ for (let B = m; B < e.length; B++) {
1138
+ const x = e[B];
1139
+ if (x.indentLevel > O && x.ancestorIsLast.length > O && !x.ancestorIsLast[O]) {
1140
+ r0 = !0;
1130
1141
  break;
1131
1142
  }
1132
- if ($ > u && G.indentLevel === C)
1143
+ if (B > m && x.indentLevel === O)
1133
1144
  break;
1134
1145
  }
1135
- if (J) {
1136
- const $ = Z(C);
1137
- N.push({
1138
- key: `${p.id}-ancestor-${C}`,
1139
- x1: $,
1140
- y1: V,
1141
- x2: $,
1142
- y2: V + f,
1143
- itemIndex: u
1146
+ if (r0) {
1147
+ const B = M(O);
1148
+ P.push({
1149
+ key: `${h.id}-ancestor-${O}`,
1150
+ x1: B,
1151
+ y1: g,
1152
+ x2: B,
1153
+ y2: g + Z,
1154
+ itemIndex: m
1144
1155
  });
1145
1156
  }
1146
1157
  }
1147
- const R = Z(p.indentLevel);
1148
- u > 0 && N.push({
1149
- key: `${p.id}-connector-top`,
1150
- x1: R,
1151
- y1: V,
1152
- x2: R,
1153
- y2: p.isDirectory ? H - E : H,
1154
- itemIndex: u
1155
- }), !p.isDirectory && p.isLastChild && N.push({
1156
- key: `${p.id}-connector-horizontal`,
1157
- x1: R,
1158
- y1: H,
1159
- x2: d + p.indentLevel * o + c0,
1160
- y2: H,
1161
- itemIndex: u
1162
- }), p.isLastChild || (p.isDirectory ? N.push({
1163
- key: `${p.id}-connector-bottom`,
1164
- x1: R,
1165
- y1: H + E,
1166
- x2: R,
1167
- y2: V + f,
1168
- itemIndex: u
1169
- }) : N.push({
1170
- key: `${p.id}-connector-bottom`,
1171
- x1: R,
1172
- y1: H,
1173
- x2: R,
1174
- y2: V + f,
1175
- itemIndex: u
1176
- })), v !== null && N.push(v), h[u] = N, p.isDirectory && (A[u] = [
1158
+ const z = M(h.indentLevel);
1159
+ m > 0 && P.push({
1160
+ key: `${h.id}-connector-top`,
1161
+ x1: z,
1162
+ y1: g,
1163
+ x2: z,
1164
+ y2: T ? I - H : I,
1165
+ itemIndex: m
1166
+ }), !T && h.isLastChild && P.push({
1167
+ key: `${h.id}-connector-horizontal`,
1168
+ x1: z,
1169
+ y1: I,
1170
+ x2: u + h.indentLevel * c + s0,
1171
+ y2: I,
1172
+ itemIndex: m
1173
+ }), h.isLastChild || (T ? P.push({
1174
+ key: `${h.id}-connector-bottom`,
1175
+ x1: z,
1176
+ y1: I + H,
1177
+ x2: z,
1178
+ y2: g + Z,
1179
+ itemIndex: m
1180
+ }) : P.push({
1181
+ key: `${h.id}-connector-bottom`,
1182
+ x1: z,
1183
+ y1: I,
1184
+ x2: z,
1185
+ y2: g + Z,
1186
+ itemIndex: m
1187
+ })), D !== null && P.push(D), p[m] = P, T && (y[m] = [
1177
1188
  {
1178
- key: `${p.id}-glyph`,
1179
- itemIndex: u,
1180
- centerX: R,
1181
- centerY: H,
1182
- size: c,
1183
- isExpanded: p.isExpanded
1189
+ key: `${h.id}-glyph`,
1190
+ itemIndex: m,
1191
+ centerX: z,
1192
+ centerY: I,
1193
+ size: d,
1194
+ isExpanded: h.isExpanded
1184
1195
  }
1185
1196
  ]);
1186
1197
  }
1187
- return { segmentsByItem: h, glyphsByItem: A };
1188
- }, h2 = T1(
1198
+ return { segmentsByItem: p, glyphsByItem: y };
1199
+ }, u2 = D1(
1189
1200
  ({
1190
1201
  entry: e,
1191
1202
  indentLevel: a,
1192
1203
  originX: n,
1193
1204
  depth: r,
1194
1205
  positionInSet: o,
1195
- setSize: s,
1196
- isSelectedForAria: c,
1206
+ setSize: c,
1207
+ isSelectedForAria: s,
1197
1208
  flatIndex: d,
1198
- isActive: h,
1199
- registerRowRef: A,
1200
- onNavigationKeyDown: M,
1201
- onRowFocus: Z,
1202
- onRowBlur: E,
1203
- rowHeight: u,
1204
- entryKindDirectory: p,
1205
- entryKindFile: f,
1206
- isDirOpen: V,
1207
- expansion: { toggleDirectory: H, onToggleDirectoryRecursive: T },
1208
- selection: { onEntryClick: S, selectedPath: L, currentPath: v, mode: N = "none", selectedItems: R, onSelectionChange: C },
1209
+ isActive: u,
1210
+ registerRowRef: p,
1211
+ onNavigationKeyDown: y,
1212
+ onRowFocus: E,
1213
+ onRowBlur: M,
1214
+ rowHeight: H,
1215
+ entryKindDirectory: m,
1216
+ entryKindFile: h,
1217
+ isDirOpen: Z,
1218
+ expansion: { toggleDirectory: g, onToggleDirectoryRecursive: I },
1219
+ selection: { onEntryClick: w, selectedPath: S, currentPath: A, mode: D = "none", selectedItems: P, onSelectionChange: T },
1209
1220
  visual: {
1210
- iconOverrides: i0,
1211
- showExpandIcons: J = !0,
1212
- showDirectoryIcons: $ = !0,
1213
- showFileIcons: G = !0,
1214
- useCanvasExpandIcons: H0 = !1,
1215
- expandIconSize: z,
1216
- typeIconSize: u0,
1217
- fontSize: V0,
1218
- indentSize: q,
1221
+ iconOverrides: z,
1222
+ showExpandIcons: O = !0,
1223
+ showDirectoryIcons: d0 = !0,
1224
+ showFileIcons: r0 = !0,
1225
+ useCanvasExpandIcons: B = !1,
1226
+ expandIconSize: x,
1227
+ typeIconSize: h0,
1228
+ fontSize: y0,
1229
+ indentSize: M0,
1219
1230
  highlightStyles: Q,
1220
- entryClassName: P0,
1221
- entryStyle: S0,
1222
- nameClassName: L0,
1223
- nameStyle: k,
1224
- directoryNameClassName: n0,
1225
- directoryNameStyle: D,
1226
- fileNameClassName: G0,
1227
- fileNameStyle: w,
1228
- expandIconClassName: T0,
1229
- expandIconStyle: Z0
1231
+ entryClassName: O0,
1232
+ entryStyle: e0,
1233
+ nameClassName: $0,
1234
+ nameStyle: D0,
1235
+ directoryNameClassName: v0,
1236
+ directoryNameStyle: u0,
1237
+ fileNameClassName: $,
1238
+ fileNameStyle: L,
1239
+ expandIconClassName: Y,
1240
+ expandIconStyle: I0
1230
1241
  }
1231
1242
  }) => {
1232
- K0(e.style, { option: "entry.style", absolutePath: e.absolutePath });
1233
- const [I0, O0] = h0(!1), I = e.children !== void 0, m0 = I && V(e.absolutePath), j = e.absolutePath === L, $0 = e.absolutePath === v, e0 = !I && R?.has(e.absolutePath), Y = b((X) => A(d, X), [A, d]), r0 = I ? void 0 : Je(e), y0 = a2({ entry: e, isDirectory: I, isExpanded: m0, isItemSelected: !!e0, selectionMode: N, onSelectionChange: C, onEntryClick: S, toggleDirectory: H, onToggleDirectoryRecursive: T }), p0 = I0 ? Q?.hoverClassName !== void 0 ? Q.hoverClassName : x.entryHover : "", C0 = (() => {
1234
- if (I) {
1235
- if (j)
1236
- return Q?.directorySelectedClassName !== void 0 ? Q.directorySelectedClassName : x.entrySelected;
1237
- } else if (j || e0)
1238
- return Q?.itemSelectedClassName !== void 0 ? Q.itemSelectedClassName : W(j && x.entrySelected, e0 && x.entryItemSelected);
1243
+ q0(e.style, { option: "entry.style", absolutePath: e.absolutePath });
1244
+ const [X, _0] = f0(!1), C = e.children !== void 0, p0 = C && Z(e.absolutePath), K = e.absolutePath === S, z0 = e.absolutePath === A, t0 = !C && P?.has(e.absolutePath), U = b((J) => p(d, J), [p, d]), l0 = C ? void 0 : qe(e), { handleClick: B0, handleKeyActivate: C0 } = n2({ entry: e, isDirectory: C, isExpanded: p0, isItemSelected: !!t0, selectionMode: D, onSelectionChange: T, onEntryClick: w, toggleDirectory: g, onToggleDirectoryRecursive: I }), W0 = X ? Q?.hoverClassName !== void 0 ? Q.hoverClassName : F.entryHover : "", g0 = (() => {
1245
+ if (C) {
1246
+ if (K)
1247
+ return Q?.directorySelectedClassName !== void 0 ? Q.directorySelectedClassName : F.entrySelected;
1248
+ } else if (K || t0)
1249
+ return Q?.itemSelectedClassName !== void 0 ? Q.itemSelectedClassName : j(K && F.entrySelected, t0 && F.entryItemSelected);
1239
1250
  return "";
1240
- })(), A0 = W(x.entry, p0, C0, P0, e.className), Y0 = W(x.expandIcon, T0, (j || e0) && x.expandIconSelected), O = W(x.typeIcon, (j || e0) && x.typeIconSelected), t1 = W(x.name, L0, I && x.nameDirectory, I && n0, !I && G0, (j || e0) && x.nameSelected), f1 = qe({ isDirectory: I, isExpanded: m0, showExpandIcons: J && a >= 0, useCanvasExpandIcons: H0, expandIconSize: z }), X0 = (I ? $ : G) ? Qe({ entry: e, isDirectory: I, isExpanded: m0, isSelected: j, isItemSelected: !!e0, extension: r0, mimeType: e.mimeType }, i0, u0) : null, U0 = {
1241
- ...I0 ? Q?.hoverStyle : {},
1242
- ...I && j ? Q?.directorySelectedStyle : {},
1243
- ...!I && (j || e0) ? Q?.itemSelectedStyle : {}
1244
- }, a1 = e2(e.data), p1 = { width: u0, height: u0 }, x0 = Ue(V0), M0 = n + a * q;
1245
- return /* @__PURE__ */ b0(
1251
+ })(), Q0 = j(F.entry, W0, g0, O0, e.className), E0 = j(F.expandIcon, Y, (K || t0) && F.expandIconSelected), b0 = j(F.typeIcon, (K || t0) && F.typeIconSelected), j0 = j(F.name, $0, C && F.nameDirectory, C && v0, !C && $, (K || t0) && F.nameSelected), F0 = Qe({ isDirectory: C, isExpanded: p0, showExpandIcons: O && a >= 0, useCanvasExpandIcons: B, expandIconSize: x }), N0 = (C ? d0 : r0) ? e2({ entry: e, isDirectory: C, isExpanded: p0, isSelected: K, isItemSelected: !!t0, extension: l0, mimeType: e.mimeType }, z, h0) : null, N = {
1252
+ ...X ? Q?.hoverStyle : {},
1253
+ ...C && K ? Q?.directorySelectedStyle : {},
1254
+ ...!C && (K || t0) ? Q?.itemSelectedStyle : {}
1255
+ }, A1 = t2(e.data), K0 = { width: h0, height: h0 }, e1 = Je(y0), w0 = n + a * M0;
1256
+ return /* @__PURE__ */ Z0(
1246
1257
  "div",
1247
1258
  {
1248
- className: A0,
1259
+ className: Q0,
1249
1260
  style: {
1250
- ...x0,
1251
- ...U0,
1252
- ...S0,
1261
+ ...e1,
1262
+ ...N,
1263
+ ...e0,
1253
1264
  ...e.style,
1254
1265
  // 箱の性質はホストのスタイルの後に書く。スプレッドは値が undefined のキーも写し、React はそれを空にするため、
1255
1266
  // 前に書くと検査が通す { height: undefined } が行の高さを消す
1256
- paddingLeft: `${Math.max(0, M0)}px`,
1257
- transform: M0 < 0 ? `translateX(${M0}px)` : void 0,
1258
- width: M0 < 0 ? `calc(100% + ${-M0}px)` : void 0,
1259
- height: `${u}px`
1267
+ paddingLeft: `${Math.max(0, w0)}px`,
1268
+ transform: w0 < 0 ? `translateX(${w0}px)` : void 0,
1269
+ width: w0 < 0 ? `calc(100% + ${-w0}px)` : void 0,
1270
+ height: `${H}px`
1260
1271
  },
1261
- ...a1,
1262
- "data-entry-type": I ? "directory" : "file",
1263
- "data-entry-expanded": I ? String(m0) : void 0,
1264
- "data-entry-selected": j ? "true" : void 0,
1265
- "data-entry-item-selected": e0 ? "true" : void 0,
1266
- onClick: y0,
1267
- onMouseEnter: () => O0(!0),
1268
- onMouseLeave: () => O0(!1),
1269
- onFocus: (X) => Z(d, e.absolutePath, X.currentTarget),
1270
- onBlur: (X) => E(e.absolutePath, X.currentTarget),
1271
- ref: Y,
1272
- onKeyDown: (X) => {
1273
- if (X.key === "Enter" || X.key === " ") {
1274
- X.preventDefault(), X.repeat || y0(X);
1272
+ ...A1,
1273
+ "data-entry-type": C ? "directory" : "file",
1274
+ "data-entry-expanded": C ? String(p0) : void 0,
1275
+ "data-entry-selected": K ? "true" : void 0,
1276
+ "data-entry-item-selected": t0 ? "true" : void 0,
1277
+ onClick: B0,
1278
+ onMouseEnter: () => _0(!0),
1279
+ onMouseLeave: () => _0(!1),
1280
+ onFocus: (J) => E(d, e.absolutePath, J.currentTarget),
1281
+ onBlur: (J) => M(e.absolutePath, J.currentTarget),
1282
+ ref: U,
1283
+ onKeyDown: (J) => {
1284
+ if (J.key === "Enter" || J.key === " ") {
1285
+ J.preventDefault(), J.repeat || C0(J);
1275
1286
  return;
1276
1287
  }
1277
- M(X, d);
1288
+ y(J, d);
1278
1289
  },
1279
- tabIndex: h ? 0 : -1,
1290
+ tabIndex: u ? 0 : -1,
1280
1291
  role: "treeitem",
1281
- "aria-expanded": I ? m0 : void 0,
1292
+ "aria-expanded": C ? p0 : void 0,
1282
1293
  "aria-level": r + 1,
1283
1294
  "aria-posinset": o,
1284
- "aria-setsize": s,
1285
- "aria-selected": N === "none" ? void 0 : c,
1286
- "aria-current": $0 ? "page" : void 0,
1287
- "aria-label": `${e.name} (${I ? p : f})`,
1295
+ "aria-setsize": c,
1296
+ "aria-selected": D === "none" ? void 0 : s,
1297
+ "aria-current": z0 ? "page" : void 0,
1298
+ "aria-label": `${e.name} (${C ? m : h})`,
1288
1299
  children: [
1289
- (J || H0) && /* @__PURE__ */ m("span", { className: Y0, style: { ...Z0, width: c0, height: c0 }, children: f1 }),
1290
- (I ? $ : G) && /* @__PURE__ */ m("span", { className: O, style: p1, children: X0 }),
1291
- /* @__PURE__ */ m(
1300
+ (O || B) && /* @__PURE__ */ f("span", { className: E0, style: { ...I0, width: s0, height: s0 }, children: F0 }),
1301
+ (C ? d0 : r0) && /* @__PURE__ */ f("span", { className: b0, style: K0, children: N0 }),
1302
+ /* @__PURE__ */ f(
1292
1303
  "span",
1293
1304
  {
1294
- className: t1,
1305
+ className: j0,
1295
1306
  style: {
1296
- ...x0,
1297
- ...k,
1298
- ...I ? D : w
1307
+ ...e1,
1308
+ ...D0,
1309
+ ...C ? u0 : L
1299
1310
  },
1300
- "data-entry-type": I ? "directory" : "file",
1311
+ "data-entry-type": C ? "directory" : "file",
1301
1312
  "data-entry-role": "name",
1302
1313
  children: e.label ?? e.name
1303
1314
  }
@@ -1308,421 +1319,427 @@ const zt = (e) => {
1308
1319
  },
1309
1320
  (e, a) => {
1310
1321
  if (e.entry !== a.entry) return !1;
1311
- const n = e.entry.children !== void 0, r = a.entry.children !== void 0, o = n && e.isDirOpen(e.entry.absolutePath), s = r && a.isDirOpen(a.entry.absolutePath);
1322
+ const n = e.entry.children !== void 0, r = a.entry.children !== void 0, o = n && e.isDirOpen(e.entry.absolutePath), c = r && a.isDirOpen(a.entry.absolutePath);
1312
1323
  return e.indentLevel === a.indentLevel && e.originX === a.originX && // 位置情報は aria として描画されるため、変化したら再描画が必要
1313
1324
  e.depth === a.depth && e.positionInSet === a.positionInSet && e.setSize === a.setSize && e.isSelectedForAria === a.isSelectedForAria && e.flatIndex === a.flatIndex && e.isActive === a.isActive && e.rowHeight === a.rowHeight && // 種別語はアクセシブルネームとして描画されるため、ロケール / 上書きの変更で再描画が必要
1314
- e.entryKindDirectory === a.entryKindDirectory && e.entryKindFile === a.entryKindFile && o === s && e.selection.selectedPath === a.selection.selectedPath && e.selection.currentPath === a.selection.currentPath && e.selection.mode === a.selection.mode && e.selection.selectedItems === a.selection.selectedItems && e.visual.iconOverrides === a.visual.iconOverrides && e.visual.showExpandIcons === a.visual.showExpandIcons && e.visual.showDirectoryIcons === a.visual.showDirectoryIcons && e.visual.showFileIcons === a.visual.showFileIcons && e.visual.useCanvasExpandIcons === a.visual.useCanvasExpandIcons && e.visual.expandIconSize === a.visual.expandIconSize && e.visual.typeIconSize === a.visual.typeIconSize && e.visual.fontSize === a.visual.fontSize && e.visual.indentSize === a.visual.indentSize && e.visual.highlightStyles === a.visual.highlightStyles && e.visual.entryClassName === a.visual.entryClassName && e.visual.entryStyle === a.visual.entryStyle && e.visual.nameClassName === a.visual.nameClassName && e.visual.nameStyle === a.visual.nameStyle && e.visual.directoryNameClassName === a.visual.directoryNameClassName && e.visual.directoryNameStyle === a.visual.directoryNameStyle && e.visual.fileNameClassName === a.visual.fileNameClassName && e.visual.fileNameStyle === a.visual.fileNameStyle && e.visual.expandIconClassName === a.visual.expandIconClassName && e.visual.expandIconStyle === a.visual.expandIconStyle;
1325
+ e.entryKindDirectory === a.entryKindDirectory && e.entryKindFile === a.entryKindFile && o === c && e.selection.selectedPath === a.selection.selectedPath && e.selection.currentPath === a.selection.currentPath && e.selection.mode === a.selection.mode && e.selection.selectedItems === a.selection.selectedItems && e.visual.iconOverrides === a.visual.iconOverrides && e.visual.showExpandIcons === a.visual.showExpandIcons && e.visual.showDirectoryIcons === a.visual.showDirectoryIcons && e.visual.showFileIcons === a.visual.showFileIcons && e.visual.useCanvasExpandIcons === a.visual.useCanvasExpandIcons && e.visual.expandIconSize === a.visual.expandIconSize && e.visual.typeIconSize === a.visual.typeIconSize && e.visual.fontSize === a.visual.fontSize && e.visual.indentSize === a.visual.indentSize && e.visual.highlightStyles === a.visual.highlightStyles && e.visual.entryClassName === a.visual.entryClassName && e.visual.entryStyle === a.visual.entryStyle && e.visual.nameClassName === a.visual.nameClassName && e.visual.nameStyle === a.visual.nameStyle && e.visual.directoryNameClassName === a.visual.directoryNameClassName && e.visual.directoryNameStyle === a.visual.directoryNameStyle && e.visual.fileNameClassName === a.visual.fileNameClassName && e.visual.fileNameStyle === a.visual.fileNameStyle && e.visual.expandIconClassName === a.visual.expandIconClassName && e.visual.expandIconStyle === a.visual.expandIconStyle;
1315
1326
  }
1316
1327
  );
1317
- h2.displayName = "DirectoryEntryItem";
1318
- const u2 = (e) => {
1328
+ u2.displayName = "DirectoryEntryItem";
1329
+ const m2 = (e) => {
1319
1330
  const a = [];
1320
1331
  if (e.children)
1321
1332
  for (const n of e.children)
1322
- n.type === "directory" && (a.push(n.absolutePath), a.push(...u2(n)));
1333
+ n.type === "directory" && (a.push(n.absolutePath), a.push(...m2(n)));
1323
1334
  return a;
1324
- }, o8 = ({
1335
+ }, c8 = ({
1325
1336
  entries: e,
1326
- expansion: { toggle: a, isExpanded: n, expandMultiple: r, collapseMultiple: o, isPending: s, alwaysExpanded: c = !1, doubleClickAction: d = "recursive" },
1327
- selection: { onEntryClick: h, selectedPath: A, currentPath: M, mode: Z = "none", selectedItems: E, onSelectionChange: u },
1337
+ expansion: { toggle: a, isExpanded: n, expandMultiple: r, collapseMultiple: o, isPending: c, alwaysExpanded: s = !1, doubleClickAction: d = "recursive" },
1338
+ selection: { onEntryClick: u, selectedPath: p, currentPath: y, mode: E = "none", selectedItems: M, onSelectionChange: H },
1328
1339
  visual: {
1329
- className: p,
1330
- style: f,
1331
- ariaLabel: V,
1332
- ariaLabelledBy: H,
1333
- lineColor: T = Ye,
1334
- showTreeLines: S = !0,
1335
- showExpandIcons: L = !0,
1336
- showDirectoryIcons: v = !0,
1337
- showFileIcons: N = !0,
1338
- iconOverrides: R,
1339
- expandIconSize: C,
1340
- typeIconSize: i0,
1341
- fontSize: J,
1342
- indentSize: $,
1343
- itemHeight: G = x1,
1344
- removeRootIndent: H0 = !1,
1345
- highlightStyles: z,
1346
- entryClassName: u0,
1347
- entryStyle: V0,
1348
- nameClassName: q,
1340
+ className: m,
1341
+ style: h,
1342
+ ariaLabel: Z,
1343
+ ariaLabelledBy: g,
1344
+ lineColor: I = Xe,
1345
+ showTreeLines: w = !0,
1346
+ showExpandIcons: S = !0,
1347
+ showDirectoryIcons: A = !0,
1348
+ showFileIcons: D = !0,
1349
+ iconOverrides: P,
1350
+ expandIconSize: T,
1351
+ typeIconSize: z,
1352
+ fontSize: O,
1353
+ indentSize: d0,
1354
+ itemHeight: r0 = R1,
1355
+ removeRootIndent: B = !1,
1356
+ highlightStyles: x,
1357
+ entryClassName: h0,
1358
+ entryStyle: y0,
1359
+ nameClassName: M0,
1349
1360
  nameStyle: Q,
1350
- directoryNameClassName: P0,
1351
- directoryNameStyle: S0,
1352
- fileNameClassName: L0,
1353
- fileNameStyle: k,
1354
- expandIconClassName: n0,
1355
- expandIconStyle: D
1361
+ directoryNameClassName: O0,
1362
+ directoryNameStyle: e0,
1363
+ fileNameClassName: $0,
1364
+ fileNameStyle: D0,
1365
+ expandIconClassName: v0,
1366
+ expandIconStyle: u0
1356
1367
  } = {},
1357
- virtualScroll: G0,
1358
- grid: w,
1359
- sort: T0,
1360
- locale: Z0,
1361
- labels: I0,
1362
- ref: O0
1368
+ virtualScroll: $,
1369
+ grid: L,
1370
+ sort: Y,
1371
+ locale: I0,
1372
+ labels: X,
1373
+ ref: _0
1363
1374
  }) => {
1364
- const I = Re(Z0), m0 = F(() => wt(Z0, I0), [Z0, I0]), j = Ut(bt(m0)), { entryKindDirectory: $0, entryKindFile: e0 } = m0, Y = F(() => It({ indentSize: $, typeIconSize: i0, fontSize: J }), [$, i0, J]);
1365
- F(() => {
1366
- K0(V0, { option: "visual.entryStyle" }), K0(z?.hoverStyle, { option: "visual.highlightStyles.hoverStyle" }), K0(z?.directorySelectedStyle, { option: "visual.highlightStyles.directorySelectedStyle" }), K0(z?.itemSelectedStyle, { option: "visual.highlightStyles.itemSelectedStyle" }), pt(D, { option: "visual.expandIconStyle" });
1367
- }, [V0, z, D]);
1368
- const r0 = w !== void 0, y0 = S2(Gt, Yt, Xt), p0 = _(null), C0 = _(null), A0 = _(null), [Y0, O] = h0(0), [t1, f1] = h0(0), [X0, U0] = h0(0), [a1, p1] = h0(null), {
1369
- overscanCount: x0 = 15,
1370
- className: M0,
1371
- background: X,
1372
- onScroll: $1,
1373
- onRangeChange: D1,
1374
- onScrollAdjust: _1,
1375
- liveRegion: z1,
1376
- initialScrollIndex: B1,
1377
- initialScrollOffset: D0,
1378
- initialScrollAnchor: W1,
1379
- callbackThrottleMs: j1 = 5,
1380
- contentInsets: K1,
1381
- onItemFocus: G1,
1382
- viewportHeightOverride: l0,
1383
- scrollBarOptions: A1,
1384
- behaviorOptions: Y1,
1385
- preserveScrollAnchor: X1 = !1,
1386
- getItemKey: m2,
1375
+ const C = ke(I0), p0 = R(() => wt(I0, X), [I0, X]), K = Jt(St(p0)), { entryKindDirectory: z0, entryKindFile: t0 } = p0, U = R(() => Ct({ indentSize: d0, typeIconSize: z, fontSize: O }), [d0, z, O]);
1376
+ R(() => {
1377
+ q0(y0, { option: "visual.entryStyle" }), q0(x?.hoverStyle, { option: "visual.highlightStyles.hoverStyle" }), q0(x?.directorySelectedStyle, { option: "visual.highlightStyles.directorySelectedStyle" }), q0(x?.itemSelectedStyle, { option: "visual.highlightStyles.itemSelectedStyle" }), At(u0, { option: "visual.expandIconStyle" });
1378
+ }, [y0, x, u0]);
1379
+ const l0 = L !== void 0, B0 = L2(Yt, Xt, Ut), C0 = _(null), W0 = _(null), g0 = _(null), [Q0, E0] = f0(0), [b0, j0] = f0(0), [F0, N0] = f0(0), [N, A1] = f0(null), {
1380
+ overscanCount: K0 = 15,
1381
+ className: e1,
1382
+ background: w0,
1383
+ onScroll: J,
1384
+ onRangeChange: z1,
1385
+ onScrollAdjust: B1,
1386
+ liveRegion: W1,
1387
+ initialScrollIndex: j1,
1388
+ initialScrollOffset: G0,
1389
+ initialScrollAnchor: K1,
1390
+ callbackThrottleMs: G1 = 5,
1391
+ contentInsets: Y1,
1392
+ onItemFocus: X1,
1393
+ viewportHeightOverride: o0,
1394
+ scrollBarOptions: v1,
1395
+ behaviorOptions: U1,
1396
+ preserveScrollAnchor: J1 = !1,
1397
+ getItemKey: f2,
1387
1398
  // 素通しの pass-through。型で受け付けているものは実際に転送する
1388
- testId: U1,
1389
- contentProps: v1
1390
- } = G0 ?? {}, J1 = F(
1391
- () => r0 ? { ...v1, role: "rowgroup" } : {
1392
- ...v1,
1399
+ testId: q1,
1400
+ contentProps: g1
1401
+ } = $ ?? {}, Q1 = R(
1402
+ () => l0 ? { ...g1, role: "rowgroup" } : {
1403
+ ...g1,
1393
1404
  role: "tree",
1394
- "aria-label": H ? void 0 : V,
1395
- "aria-labelledby": H,
1396
- "aria-multiselectable": Z === "multiple" ? !0 : void 0,
1397
- "aria-busy": s ? !0 : void 0
1405
+ "aria-label": g ? void 0 : Z,
1406
+ "aria-labelledby": g,
1407
+ "aria-multiselectable": E === "multiple" ? !0 : void 0,
1408
+ "aria-busy": c ? !0 : void 0
1398
1409
  },
1399
- [r0, v1, V, H, Z, s]
1400
- ), q1 = F(() => ({ ...Y1, enableKeyboardNavigation: !1 }), [Y1]), [n1, Q1] = h0(typeof D0 == "number" ? D0 : 0), g1 = _(typeof D0 == "number" ? D0 : 0), ee = b(
1410
+ [l0, g1, Z, g, E, c]
1411
+ ), ee = R(() => ({ ...U1, enableKeyboardNavigation: !1 }), [U1]), [l1, te] = f0(typeof G0 == "number" ? G0 : 0), H1 = _(typeof G0 == "number" ? G0 : 0), ae = b(
1401
1412
  (l, i) => {
1402
- g1.current = l, Q1(l), $1?.(l, i);
1413
+ H1.current = l, te(l), J?.(l, i);
1403
1414
  },
1404
- [$1]
1405
- ), te = b(
1415
+ [J]
1416
+ ), ne = b(
1406
1417
  (l) => {
1407
- const { renderingStartIndex: i, renderingEndIndex: g } = l;
1408
- p1((y) => y && y.renderStart === i && y.renderEnd === g ? y : { renderStart: i, renderEnd: g }), D1?.(l);
1418
+ const { renderingStartIndex: i, renderingEndIndex: v } = l;
1419
+ A1((V) => V && V.renderStart === i && V.renderEnd === v ? V : { renderStart: i, renderEnd: v }), z1?.(l);
1409
1420
  },
1410
- [D1]
1421
+ [z1]
1411
1422
  );
1412
- k0(() => {
1413
- Kt();
1414
- }, []), k0(() => {
1415
- const l = p0.current, i = r0 ? C0.current : l, g = () => {
1423
+ T0(() => {
1424
+ Gt();
1425
+ }, []), T0(() => {
1426
+ const l = C0.current, i = l0 ? W0.current : l, v = () => {
1416
1427
  if (l) {
1417
- const P = l.clientWidth;
1418
- f1((K) => Math.abs(K - P) > 1 ? P : K);
1428
+ const k = l.clientWidth;
1429
+ j0((G) => Math.abs(G - k) > 1 ? k : G);
1419
1430
  }
1420
- if (typeof l0 == "number")
1421
- O((P) => Math.abs(P - l0) > 1 ? l0 : P);
1431
+ if (typeof o0 == "number")
1432
+ E0((k) => Math.abs(k - o0) > 1 ? o0 : k);
1422
1433
  else if (i) {
1423
- const P = i.clientHeight;
1424
- O((K) => Math.abs(K - P) > 1 ? P : K);
1434
+ const k = i.clientHeight;
1435
+ E0((G) => Math.abs(G - k) > 1 ? k : G);
1425
1436
  }
1426
1437
  };
1427
- if (!(l || i)) return O(0);
1428
- g();
1429
- const y = new ResizeObserver(g);
1430
- return l && y.observe(l), i && i !== l && y.observe(i), () => y.disconnect();
1431
- }, [l0, r0]);
1432
- const _0 = typeof l0 == "number" ? l0 : Y0, f0 = b((l) => c || (y0 ? n(l) : !1), [y0, n, c]), ae = W(x.container, s && x.containerPending, p), ne = F(
1438
+ if (!(l || i)) return E0(0);
1439
+ v();
1440
+ const V = new ResizeObserver(v);
1441
+ return l && V.observe(l), i && i !== l && V.observe(i), () => V.disconnect();
1442
+ }, [o0, l0]);
1443
+ const Y0 = typeof o0 == "number" ? o0 : Q0, A0 = b((l) => s || (B0 ? n(l) : !1), [B0, n, s]), re = j(F.container, c && F.containerPending, m), le = R(
1433
1444
  () => ({
1434
- ...jt,
1435
- ...f ?? {},
1436
- ...typeof l0 == "number" ? { height: l0, minHeight: l0 } : {}
1445
+ ...Kt,
1446
+ ...h ?? {},
1447
+ ...typeof o0 == "number" ? { height: o0, minHeight: o0 } : {}
1437
1448
  }),
1438
- [f, l0]
1439
- ), H1 = b(
1449
+ [h, o0]
1450
+ ), V1 = b(
1440
1451
  (l, i) => {
1441
- const g = [l.absolutePath, ...u2(l)], y = i || d;
1442
- if (g.every((g0) => f0(g0))) return o(g);
1443
- if (g.every((g0) => !f0(g0)) || y === "recursive") return r(g);
1444
- if (y === "toggle") return o(g);
1445
- console.warn(`[DirectoryTree] Unknown double click action: ${y}. No action taken.`);
1452
+ const v = [l.absolutePath, ...m2(l)], V = i || d;
1453
+ if (v.every((V0) => A0(V0))) return o(v);
1454
+ if (v.every((V0) => !A0(V0)) || V === "recursive") return r(v);
1455
+ if (V === "toggle") return o(v);
1456
+ console.warn(`[DirectoryTree] Unknown double click action: ${V}. No action taken.`);
1446
1457
  },
1447
- [f0, r, o, d]
1448
- ), V1 = r0 ? !1 : H0, { flatItems: F0, lineItems: Z1, maxIndent: re } = F(() => qt(e, f0, S, V1, T0), [e, f0, S, V1, T0]), r1 = Ct({ indentSize: Y.indentSize, removeRootIndent: V1, hasExpandBox: L || S }), d0 = F(() => S ? Ft(Y, C, r1) : null, [S, Y, C, r1]), B = F(() => F0.map((l, i) => ({ ...l, rowHeight: xt(G, l.entry, i) })), [F0, G]), E0 = F(() => B.map((l) => l.rowHeight), [B]), N0 = F(() => {
1449
- const l = new Array(E0.length + 1);
1458
+ [A0, r, o, d]
1459
+ ), Z1 = l0 ? !1 : B, { flatItems: x0, lineItems: y1, maxIndent: oe } = R(() => Qt(e, A0, w, Z1, Y), [e, A0, w, Z1, Y]), o1 = Ft({ indentSize: U.indentSize, removeRootIndent: Z1, hasExpandBox: S || w }), m0 = R(() => w ? xt(U, T, o1) : null, [w, U, T, o1]), W = R(() => x0.map((l, i) => ({ ...l, rowHeight: Nt(r0, l.entry, i) })), [x0, r0]), S0 = R(() => W.map((l) => l.rowHeight), [W]), R0 = R(() => {
1460
+ const l = new Array(S0.length + 1);
1450
1461
  l[0] = 0;
1451
- for (let i = 0; i < E0.length; i++)
1452
- l[i + 1] = l[i] + E0[i];
1462
+ for (let i = 0; i < S0.length; i++)
1463
+ l[i + 1] = l[i] + S0[i];
1453
1464
  return l;
1454
- }, [E0]), le = b((l) => B[l]?.rowHeight ?? x1, [B]), f2 = b((l) => B[l]?.entry.absolutePath ?? l, [B]), oe = m2 ?? f2, z0 = A ?? null, y1 = M ?? null, [ce, J0] = h0(() => ({ selectedPath: z0, selectionGeneration: 0, anchor: null })), M1 = Ce(ce, z0);
1455
- M1 !== ce && J0((l) => Ce(l, z0));
1456
- const l1 = F(() => zt(F0), [F0]), B0 = F(() => Wt(l1, M1), [l1, M1]), q0 = _(/* @__PURE__ */ new Map()), o1 = _(null), [c1] = h0(St), Q0 = _(null), [p2, se] = h0(!0), E1 = _(F0);
1457
- E1.current = F0;
1458
- const ie = _(f0);
1459
- ie.current = f0;
1465
+ }, [S0]), ce = b((l) => W[l]?.rowHeight ?? R1, [W]), p2 = b((l) => W[l]?.entry.absolutePath ?? l, [W]), se = f2 ?? p2, X0 = p ?? null, M1 = y ?? null, [ie, t1] = f0(() => ({ selectedPath: X0, selectionGeneration: 0, anchor: null })), E1 = Fe(ie, X0);
1466
+ E1 !== ie && t1((l) => Fe(l, X0));
1467
+ const c1 = R(() => Bt(x0), [x0]), k0 = R(() => jt(c1, E1), [c1, E1]), a1 = _(/* @__PURE__ */ new Map()), s1 = _(null), [i1] = f0(Lt), n1 = _(null), [A2, de] = f0(!0), b1 = _(x0);
1468
+ b1.current = x0;
1469
+ const he = _(A0);
1470
+ he.current = A0;
1460
1471
  const w1 = _(a);
1461
1472
  w1.current = a;
1462
- const de = _(l1);
1463
- de.current = l1;
1464
- const b1 = _(B0);
1465
- b1.current = B0;
1466
- const he = _(G1);
1467
- he.current = G1;
1468
- const R0 = b((l) => {
1469
- const i = A0.current;
1473
+ const ue = _(c1);
1474
+ ue.current = c1;
1475
+ const S1 = _(k0);
1476
+ S1.current = k0;
1477
+ const me = _(X1);
1478
+ me.current = X1;
1479
+ const P0 = b((l) => {
1480
+ const i = g0.current;
1470
1481
  return !i || i.getViewportSize() <= 0 ? !1 : (i.scrollToIndex(l, { align: "nearest" }), !0);
1471
- }, []), v0 = b(
1482
+ }, []), H0 = b(
1472
1483
  (l) => {
1473
- const i = q0.current.get(l);
1484
+ const i = a1.current.get(l);
1474
1485
  if (i === void 0) {
1475
- Q0.current = l, R0(l) || (Q0.current = null);
1486
+ n1.current = l, P0(l) || (n1.current = null);
1476
1487
  return;
1477
1488
  }
1478
- Q0.current = null, R0(l), i.focus({ preventScroll: !0 });
1489
+ n1.current = null, P0(l), i.focus({ preventScroll: !0 });
1479
1490
  },
1480
- [R0]
1481
- ), ue = b((l, i) => {
1491
+ [P0]
1492
+ ), L1 = b((l, i) => {
1482
1493
  if (i)
1483
- q0.current.set(l, i), Q0.current === l ? (Q0.current = null, i.focus({ preventScroll: !0 })) : i.contains(i.ownerDocument.activeElement) && J0((g) => g.anchor === null ? g : { ...g, anchor: { ...g.anchor, focused: !0 } });
1494
+ a1.current.set(l, i), n1.current === l ? (n1.current = null, i.focus({ preventScroll: !0 })) : i.contains(i.ownerDocument.activeElement) && t1((v) => v.anchor === null ? v : { ...v, anchor: { ...v.anchor, focused: !0 } });
1484
1495
  else {
1485
- const g = q0.current.get(l);
1486
- q0.current.delete(l), g?.contains(g.ownerDocument.activeElement) && J0((y) => y.anchor === null ? y : { ...y, anchor: { ...y.anchor, focused: !1 } });
1496
+ const v = a1.current.get(l);
1497
+ a1.current.delete(l), v?.contains(v.ownerDocument.activeElement) && t1((V) => V.anchor === null ? V : { ...V, anchor: { ...V.anchor, focused: !1 } });
1487
1498
  }
1488
- l === b1.current && se(i !== null);
1499
+ l === S1.current && de(i !== null);
1489
1500
  }, []);
1490
- Me(() => {
1491
- se(q0.current.has(B0));
1492
- }, [B0]);
1493
- const S1 = b(
1494
- (l, i, g) => {
1495
- const y = o1.current === g;
1496
- o1.current = null, y || (J0((P) => Bt(P, i)), c1.landedOn(g) || R0(l)), he.current?.(l);
1501
+ Ee(() => {
1502
+ de(a1.current.has(k0));
1503
+ }, [k0]);
1504
+ const I1 = b(
1505
+ (l, i, v) => {
1506
+ const V = s1.current === v;
1507
+ s1.current = null, V || (t1((k) => Wt(k, i)), i1.landedOn(v) || P0(l)), me.current?.(l);
1497
1508
  },
1498
- [R0, c1]
1499
- ), s1 = b((l) => c1.mark(l.nativeEvent), [c1]), L1 = b((l, i) => {
1500
- const { ownerDocument: g } = i;
1501
- if (!g.hasFocus() && i.contains(g.activeElement)) {
1502
- o1.current = i;
1509
+ [P0, i1]
1510
+ ), d1 = b((l) => i1.mark(l.nativeEvent), [i1]), C1 = b((l, i) => {
1511
+ const { ownerDocument: v } = i;
1512
+ if (!v.hasFocus() && i.contains(v.activeElement)) {
1513
+ s1.current = i;
1503
1514
  return;
1504
1515
  }
1505
- o1.current = null, J0((y) => y.anchor !== null && y.anchor.path === l ? { ...y, anchor: { ...y.anchor, focused: !1 } } : y);
1506
- }, []), A2 = b(() => v0(b1.current), [v0]), I1 = b(
1516
+ s1.current = null, t1((V) => V.anchor !== null && V.anchor.path === l ? { ...V, anchor: { ...V.anchor, focused: !1 } } : V);
1517
+ }, []), v2 = b(() => H0(S1.current), [H0]), F1 = b(
1507
1518
  (l, i) => {
1508
- const g = Fe(i), y = E1.current.length;
1509
- if (!Number.isInteger(l) || l < 0 || l >= y)
1510
- throw new RangeError(`[directory-tree] scrollToIndex: ${String(l)} is not a row index (${y === 0 ? "the tree has no rows" : `expected an integer in 0..${String(y - 1)}`}).`);
1511
- if (g === "nearest") {
1512
- R0(l);
1519
+ const v = xe(i), V = b1.current.length;
1520
+ if (!Number.isInteger(l) || l < 0 || l >= V)
1521
+ throw new RangeError(`[directory-tree] scrollToIndex: ${String(l)} is not a row index (${V === 0 ? "the tree has no rows" : `expected an integer in 0..${String(V - 1)}`}).`);
1522
+ if (v === "nearest") {
1523
+ P0(l);
1513
1524
  return;
1514
1525
  }
1515
- A0.current?.scrollToIndex(l, { align: g });
1526
+ g0.current?.scrollToIndex(l, { align: v });
1516
1527
  },
1517
- [R0]
1528
+ [P0]
1518
1529
  );
1519
- L2(
1520
- O0,
1530
+ I2(
1531
+ _0,
1521
1532
  () => ({
1522
- scrollToIndex: I1,
1533
+ scrollToIndex: F1,
1523
1534
  scrollToPath: (l, i) => {
1524
- Fe(i);
1525
- const g = de.current.get(l);
1526
- return g === void 0 ? !1 : (I1(g, i), !0);
1535
+ xe(i);
1536
+ const v = ue.current.get(l);
1537
+ return v === void 0 ? !1 : (F1(v, i), !0);
1527
1538
  },
1528
- getScrollAnchor: () => A0.current?.getScrollAnchor() ?? null
1539
+ getScrollAnchor: () => g0.current?.getScrollAnchor() ?? null
1529
1540
  }),
1530
- [I1]
1541
+ [F1]
1531
1542
  );
1532
- const me = b(
1543
+ const N1 = b(
1533
1544
  (l, i) => {
1534
1545
  if (l.altKey || l.ctrlKey || l.metaKey)
1535
1546
  return;
1536
- const g = E1.current, y = g.length - 1;
1537
- if (y < 0) return;
1538
- const P = g[i], K = P?.entry.children !== void 0, g0 = K && ie.current(P.entry.absolutePath);
1547
+ const v = b1.current, V = v.length - 1;
1548
+ if (V < 0) return;
1549
+ const k = v[i], G = k?.entry.children !== void 0, V0 = G && he.current(k.entry.absolutePath);
1539
1550
  switch (l.key) {
1540
1551
  case "ArrowDown":
1541
- l.preventDefault(), v0(Math.min(i + 1, y));
1552
+ l.preventDefault(), H0(Math.min(i + 1, V));
1542
1553
  break;
1543
1554
  case "ArrowUp":
1544
- l.preventDefault(), v0(Math.max(i - 1, 0));
1555
+ l.preventDefault(), H0(Math.max(i - 1, 0));
1545
1556
  break;
1546
1557
  case "Home":
1547
- l.preventDefault(), v0(0);
1558
+ l.preventDefault(), H0(0);
1548
1559
  break;
1549
1560
  case "End":
1550
- l.preventDefault(), v0(y);
1561
+ l.preventDefault(), H0(V);
1551
1562
  break;
1552
1563
  case "ArrowRight":
1553
- l.preventDefault(), K && !g0 ? w1.current(P.entry.absolutePath) : K && i < y && g[i + 1].depth > P.depth && v0(i + 1);
1564
+ l.preventDefault(), G && !V0 ? w1.current(k.entry.absolutePath) : G && i < V && v[i + 1].depth > k.depth && H0(i + 1);
1554
1565
  break;
1555
1566
  case "ArrowLeft": {
1556
- if (l.preventDefault(), K && g0) {
1557
- w1.current(P.entry.absolutePath);
1567
+ if (l.preventDefault(), G && V0) {
1568
+ w1.current(k.entry.absolutePath);
1558
1569
  break;
1559
1570
  }
1560
- const Z2 = P?.depth ?? 0;
1561
- for (let u1 = i - 1; u1 >= 0; u1--)
1562
- if (g[u1].depth < Z2) {
1563
- v0(u1);
1571
+ const y2 = k?.depth ?? 0;
1572
+ for (let f1 = i - 1; f1 >= 0; f1--)
1573
+ if (v[f1].depth < y2) {
1574
+ H0(f1);
1564
1575
  break;
1565
1576
  }
1566
1577
  break;
1567
1578
  }
1568
1579
  }
1569
1580
  },
1570
- [v0]
1571
- ), i1 = F(() => d0 === null || Z1.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : e8(Z1, E0, N0, d0), [Z1, E0, N0, d0]), d1 = F(() => d0 === null || e.length === 0 ? 0 : d0.originX + re * d0.indentSize + c0 + d0.typeIconSize, [e.length, re, d0]), { renderStart: fe, renderEnd: pe, lookaheadEnd: Ae } = F(
1572
- () => Qt(B.length, _0, x0, a1, n1, N0),
1573
- [B.length, _0, x0, a1, n1, N0]
1574
- ), C1 = F(() => d0 === null || d1 <= 0 || _0 <= 0 || i1.segmentsByItem.length === 0 ? null : /* @__PURE__ */ m("div", { className: "pointer-events-none absolute inset-0 z-1", "aria-hidden": "true", children: /* @__PURE__ */ m("div", { className: "absolute top-0 left-0", style: { width: d1, height: _0 }, children: /* @__PURE__ */ m(
1575
- d2,
1581
+ [H0]
1582
+ ), h1 = R(
1583
+ () => m0 === null || y1.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : t8(y1, S0, R0, m0, S),
1584
+ [y1, S0, R0, m0, S]
1585
+ ), u1 = R(() => m0 === null || e.length === 0 ? 0 : m0.originX + oe * m0.indentSize + s0 + m0.typeIconSize, [e.length, oe, m0]), { renderStart: fe, renderEnd: pe, lookaheadEnd: Ae } = R(
1586
+ () => e8(W.length, Y0, K0, N, l1, R0),
1587
+ [W.length, Y0, K0, N, l1, R0]
1588
+ ), x1 = R(() => m0 === null || u1 <= 0 || Y0 <= 0 || h1.segmentsByItem.length === 0 ? null : /* @__PURE__ */ f("div", { className: "pointer-events-none absolute inset-0 z-1", "aria-hidden": "true", children: /* @__PURE__ */ f("div", { className: "absolute top-0 left-0", style: { width: u1, height: Y0 }, children: /* @__PURE__ */ f(
1589
+ h2,
1576
1590
  {
1577
- segmentsByItem: i1.segmentsByItem,
1578
- glyphsByItem: i1.glyphsByItem,
1579
- itemHeight: E0[0] ?? x1,
1580
- width: d1,
1581
- viewportHeight: _0,
1582
- scrollPosition: n1,
1583
- color: T,
1584
- expandGlyphColor: T,
1585
- expandGlyphSize: d0.glyphSize,
1591
+ segmentsByItem: h1.segmentsByItem,
1592
+ glyphsByItem: h1.glyphsByItem,
1593
+ itemHeight: S0[0] ?? R1,
1594
+ width: u1,
1595
+ viewportHeight: Y0,
1596
+ scrollPosition: l1,
1597
+ color: I,
1598
+ expandGlyphColor: I,
1599
+ expandGlyphSize: m0.glyphSize,
1586
1600
  renderStartIndex: fe,
1587
1601
  renderEndIndex: pe,
1588
1602
  lookaheadEndIndex: Ae
1589
1603
  }
1590
- ) }) }), [d1, _0, fe, pe, Ae, n1, i1, T, d0, E0]), ve = b((l) => B[l], [B]), ge = _(null);
1591
- Me(() => {
1604
+ ) }) }), [u1, Y0, fe, pe, Ae, l1, h1, I, m0, S0]), ve = b((l) => W[l], [W]), ge = _(null);
1605
+ Ee(() => {
1592
1606
  const l = ge.current;
1593
- if (ge.current = { items: B, offsets: N0 }, !X1 || !l || l.items === B)
1607
+ if (ge.current = { items: W, offsets: R0 }, !J1 || !l || l.items === W)
1594
1608
  return;
1595
- const i = A0.current, g = i?.getScrollPosition(), y = typeof g == "number" && g >= 0 ? g : g1.current, P = kt(l.items, l.offsets, y);
1596
- if (!P)
1609
+ const i = g0.current, v = i?.getScrollPosition(), V = typeof v == "number" && v >= 0 ? v : H1.current, k = Pt(l.items, l.offsets, V);
1610
+ if (!k)
1597
1611
  return;
1598
- const K = Pt(P, B, N0);
1599
- if (K === null || Math.abs(K - y) < 1)
1612
+ const G = Tt(k, W, R0);
1613
+ if (G === null || Math.abs(G - V) < 1)
1600
1614
  return;
1601
- const g0 = i ? i.scrollTo(K) : K;
1602
- g1.current = g0, Q1(g0);
1603
- }, [B, N0, X1]);
1604
- const w0 = w?.columns, W0 = w?.scrollBarWidth ?? A1?.width ?? s2, U = F(() => w0 ? Zt({ measuredWidth: t1, columns: w0, scrollBarWidth: W0 }) : null, [w0, t1, W0]), h1 = F(() => w0 ? Vt(w0) : "", [w0]), v2 = F(() => w?.showFooter && w0 ? yt(e) : [], [w?.showFooter, w0, e]), j0 = U?.maxHScroll ?? 0;
1605
- k0(() => {
1606
- U0((l) => F1(l, j0));
1607
- }, [j0]);
1608
- const He = b((l) => U0((i) => F1(i + l, j0)), [j0]), Ve = F(
1615
+ const V0 = i ? i.scrollTo(G) : G;
1616
+ H1.current = V0, te(V0);
1617
+ }, [W, R0, J1]);
1618
+ const L0 = L?.columns, U0 = L?.scrollBarWidth ?? v1?.width ?? i2, q = R(() => L0 ? yt({ measuredWidth: b0, columns: L0, scrollBarWidth: U0 }) : null, [L0, b0, U0]), m1 = R(() => L0 ? Zt(L0) : "", [L0]), g2 = R(() => L?.showFooter && L0 ? Mt(e) : [], [L?.showFooter, L0, e]), J0 = q?.maxHScroll ?? 0;
1619
+ T0(() => {
1620
+ N0((l) => k1(l, J0));
1621
+ }, [J0]);
1622
+ const He = b((l) => N0((i) => k1(i + l, J0)), [J0]), Ve = R(
1609
1623
  () => ({
1610
- iconOverrides: R,
1611
- showExpandIcons: L,
1612
- showDirectoryIcons: v,
1613
- showFileIcons: N,
1614
- useCanvasExpandIcons: S,
1615
- expandIconSize: C,
1616
- typeIconSize: Y.typeIconSize,
1617
- fontSize: Y.fontSize,
1618
- indentSize: Y.indentSize,
1619
- highlightStyles: z,
1620
- expandIconClassName: n0,
1621
- expandIconStyle: D
1624
+ iconOverrides: P,
1625
+ showExpandIcons: S,
1626
+ showDirectoryIcons: A,
1627
+ showFileIcons: D,
1628
+ useCanvasExpandIcons: w,
1629
+ expandIconSize: T,
1630
+ typeIconSize: U.typeIconSize,
1631
+ fontSize: U.fontSize,
1632
+ indentSize: U.indentSize,
1633
+ highlightStyles: x,
1634
+ expandIconClassName: v0,
1635
+ expandIconStyle: u0
1622
1636
  }),
1623
- [R, L, v, N, S, C, Y, z, n0, D]
1624
- ), Ze = F(
1625
- () => /* @__PURE__ */ m(
1626
- E2,
1637
+ [P, S, A, D, w, T, U, x, v0, u0]
1638
+ ), Ze = R(
1639
+ () => /* @__PURE__ */ f(
1640
+ b2,
1627
1641
  {
1628
- ref: A0,
1629
- itemCount: B.length,
1642
+ ref: g0,
1643
+ itemCount: W.length,
1630
1644
  getItem: ve,
1631
- getItemHeight: le,
1632
- getItemKey: oe,
1633
- testId: U1,
1634
- contentProps: J1,
1635
- locale: I,
1636
- labels: j,
1637
- viewportSize: typeof l0 == "number" ? l0 : void 0,
1638
- overscanCount: x0,
1639
- onScroll: ee,
1640
- onRangeChange: te,
1641
- onScrollAdjust: _1,
1642
- liveRegion: z1,
1643
- className: M0,
1644
- onWheelHorizontal: r0 ? He : void 0,
1645
- background: /* @__PURE__ */ b0(y2, { children: [
1646
- r0 && U ? (
1645
+ getItemHeight: ce,
1646
+ getItemKey: se,
1647
+ testId: q1,
1648
+ contentProps: Q1,
1649
+ locale: C,
1650
+ labels: K,
1651
+ viewportSize: typeof o0 == "number" ? o0 : void 0,
1652
+ overscanCount: K0,
1653
+ onScroll: ae,
1654
+ onRangeChange: ne,
1655
+ onScrollAdjust: B1,
1656
+ liveRegion: W1,
1657
+ className: e1,
1658
+ onWheelHorizontal: l0 ? He : void 0,
1659
+ background: /* @__PURE__ */ Z0(M2, { children: [
1660
+ l0 && q ? (
1647
1661
  // Clip the connector-line canvas to the frozen name column so deep trees never bleed into the numeric region.
1648
- /* @__PURE__ */ m("div", { className: "pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden", style: { width: U.nameWidth }, "aria-hidden": "true", children: C1 })
1649
- ) : C1,
1650
- X
1662
+ /* @__PURE__ */ f("div", { className: "pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden", style: { width: q.nameWidth }, "aria-hidden": "true", children: x1 })
1663
+ ) : x1,
1664
+ w0
1651
1665
  ] }),
1652
- initialScrollIndex: B1,
1653
- initialScrollOffset: D0,
1654
- initialScrollAnchor: W1,
1655
- callbackThrottleMs: j1,
1656
- contentInsets: K1,
1657
- scrollBarOptions: A1,
1658
- behaviorOptions: q1,
1659
- children: (l, i) => l ? r0 && w && U ? /* @__PURE__ */ m(
1660
- l2,
1666
+ initialScrollIndex: j1,
1667
+ initialScrollOffset: G0,
1668
+ initialScrollAnchor: K1,
1669
+ callbackThrottleMs: G1,
1670
+ contentInsets: Y1,
1671
+ scrollBarOptions: v1,
1672
+ behaviorOptions: ee,
1673
+ children: (l, i) => l ? l0 && L && q ? /* @__PURE__ */ f(
1674
+ o2,
1661
1675
  {
1662
1676
  entry: l.entry,
1663
1677
  indentLevel: l.indentLevel,
1664
1678
  positionInSet: l.positionInSet,
1665
1679
  setSize: l.setSize,
1666
- rowIndex: i + (w.showHeader ?? !0 ? 2 : 1),
1680
+ rowIndex: i + (L.showHeader ?? !0 ? 2 : 1),
1667
1681
  flatIndex: i,
1668
- onRowFocus: S1,
1669
- onRowBlur: L1,
1670
- isSelectedForAria: !!E?.has(l.entry.absolutePath),
1682
+ isActive: i === k0,
1683
+ registerRowRef: L1,
1684
+ onNavigationKeyDown: N1,
1685
+ onRowFocus: I1,
1686
+ onRowBlur: C1,
1687
+ isSelectedForAria: !!M?.has(l.entry.absolutePath),
1671
1688
  rowHeight: l.rowHeight,
1672
- isDirOpen: f0,
1673
- columns: w.columns,
1674
- numericTemplate: h1,
1675
- numericTotal: U.numericTotal,
1676
- nameWidth: U.nameWidth,
1677
- rowClassName: w.rowClassName,
1678
- selection: { onEntryClick: h, selectedPath: z0, currentPath: y1, mode: Z, selectedItems: E, onSelectionChange: u },
1679
- expansion: { toggleDirectory: a, onToggleDirectoryRecursive: H1 },
1689
+ isDirOpen: A0,
1690
+ columns: L.columns,
1691
+ numericTemplate: m1,
1692
+ numericTotal: q.numericTotal,
1693
+ nameWidth: q.nameWidth,
1694
+ rowClassName: L.rowClassName,
1695
+ selection: { onEntryClick: u, selectedPath: X0, currentPath: M1, mode: E, selectedItems: M, onSelectionChange: H },
1696
+ expansion: { toggleDirectory: a, onToggleDirectoryRecursive: V1 },
1680
1697
  visual: Ve
1681
1698
  },
1682
1699
  l.entry.absolutePath
1683
- ) : /* @__PURE__ */ m(
1684
- h2,
1700
+ ) : /* @__PURE__ */ f(
1701
+ u2,
1685
1702
  {
1686
1703
  entry: l.entry,
1687
1704
  indentLevel: l.indentLevel,
1688
- originX: r1,
1705
+ originX: o1,
1689
1706
  depth: l.depth,
1690
1707
  positionInSet: l.positionInSet,
1691
1708
  setSize: l.setSize,
1692
- isSelectedForAria: !!E?.has(l.entry.absolutePath),
1709
+ isSelectedForAria: !!M?.has(l.entry.absolutePath),
1693
1710
  flatIndex: i,
1694
- isActive: i === B0,
1695
- registerRowRef: ue,
1696
- onNavigationKeyDown: me,
1697
- onRowFocus: S1,
1698
- onRowBlur: L1,
1711
+ isActive: i === k0,
1712
+ registerRowRef: L1,
1713
+ onNavigationKeyDown: N1,
1714
+ onRowFocus: I1,
1715
+ onRowBlur: C1,
1699
1716
  rowHeight: l.rowHeight,
1700
- entryKindDirectory: $0,
1701
- entryKindFile: e0,
1702
- isDirOpen: f0,
1703
- expansion: { toggleDirectory: a, onToggleDirectoryRecursive: H1 },
1704
- selection: { onEntryClick: h, selectedPath: z0, currentPath: y1, mode: Z, selectedItems: E, onSelectionChange: u },
1717
+ entryKindDirectory: z0,
1718
+ entryKindFile: t0,
1719
+ isDirOpen: A0,
1720
+ expansion: { toggleDirectory: a, onToggleDirectoryRecursive: V1 },
1721
+ selection: { onEntryClick: u, selectedPath: X0, currentPath: M1, mode: E, selectedItems: M, onSelectionChange: H },
1705
1722
  visual: {
1706
- iconOverrides: R,
1707
- showExpandIcons: L,
1708
- showDirectoryIcons: v,
1709
- showFileIcons: N,
1710
- useCanvasExpandIcons: S,
1711
- expandIconSize: C,
1712
- typeIconSize: Y.typeIconSize,
1713
- fontSize: Y.fontSize,
1714
- indentSize: Y.indentSize,
1715
- highlightStyles: z,
1716
- entryClassName: u0,
1717
- entryStyle: V0,
1718
- nameClassName: q,
1723
+ iconOverrides: P,
1724
+ showExpandIcons: S,
1725
+ showDirectoryIcons: A,
1726
+ showFileIcons: D,
1727
+ useCanvasExpandIcons: w,
1728
+ expandIconSize: T,
1729
+ typeIconSize: U.typeIconSize,
1730
+ fontSize: U.fontSize,
1731
+ indentSize: U.indentSize,
1732
+ highlightStyles: x,
1733
+ entryClassName: h0,
1734
+ entryStyle: y0,
1735
+ nameClassName: M0,
1719
1736
  nameStyle: Q,
1720
- directoryNameClassName: P0,
1721
- directoryNameStyle: S0,
1722
- fileNameClassName: L0,
1723
- fileNameStyle: k,
1724
- expandIconClassName: n0,
1725
- expandIconStyle: D
1737
+ directoryNameClassName: O0,
1738
+ directoryNameStyle: e0,
1739
+ fileNameClassName: $0,
1740
+ fileNameStyle: D0,
1741
+ expandIconClassName: v0,
1742
+ expandIconStyle: u0
1726
1743
  }
1727
1744
  },
1728
1745
  l.entry.absolutePath
@@ -1730,222 +1747,225 @@ const u2 = (e) => {
1730
1747
  }
1731
1748
  ),
1732
1749
  [
1733
- B.length,
1750
+ W.length,
1734
1751
  ve,
1735
- le,
1736
- oe,
1737
- U1,
1738
- J1,
1739
- I,
1740
- j,
1741
- $0,
1742
- e0,
1743
- B0,
1744
- ue,
1745
- me,
1746
- S1,
1752
+ ce,
1753
+ se,
1754
+ q1,
1755
+ Q1,
1756
+ C,
1757
+ K,
1758
+ z0,
1759
+ t0,
1760
+ k0,
1747
1761
  L1,
1748
- l0,
1749
- x0,
1750
- ee,
1751
- te,
1752
- _1,
1753
- z1,
1754
- M0,
1755
- r0,
1756
- He,
1757
- U,
1762
+ N1,
1763
+ I1,
1758
1764
  C1,
1759
- X,
1765
+ o0,
1766
+ K0,
1767
+ ae,
1768
+ ne,
1760
1769
  B1,
1761
- D0,
1762
1770
  W1,
1771
+ e1,
1772
+ l0,
1773
+ He,
1774
+ q,
1775
+ x1,
1776
+ w0,
1763
1777
  j1,
1778
+ G0,
1764
1779
  K1,
1765
- A1,
1766
- q1,
1767
- w,
1768
- h1,
1769
- f0,
1770
- h,
1771
- z0,
1772
- y1,
1773
- Z,
1774
- E,
1780
+ G1,
1781
+ Y1,
1782
+ v1,
1783
+ ee,
1784
+ L,
1785
+ m1,
1786
+ A0,
1775
1787
  u,
1788
+ X0,
1789
+ M1,
1790
+ E,
1791
+ M,
1792
+ H,
1776
1793
  a,
1777
- H1,
1794
+ V1,
1778
1795
  Ve,
1779
- R,
1780
- L,
1781
- v,
1782
- N,
1796
+ P,
1783
1797
  S,
1784
- C,
1785
- Y,
1786
- r1,
1787
- z,
1788
- u0,
1789
- V0,
1790
- q,
1798
+ A,
1799
+ D,
1800
+ w,
1801
+ T,
1802
+ U,
1803
+ o1,
1804
+ x,
1805
+ h0,
1806
+ y0,
1807
+ M0,
1791
1808
  Q,
1792
- P0,
1793
- S0,
1794
- L0,
1795
- k,
1796
- n0,
1797
- D
1809
+ O0,
1810
+ e0,
1811
+ $0,
1812
+ D0,
1813
+ v0,
1814
+ u0
1798
1815
  ]
1799
- );
1800
- if (!(w && U))
1801
- return /* @__PURE__ */ b0("div", { ref: p0, className: ae, style: ne, onPointerDownCapture: s1, onMouseDownCapture: s1, children: [
1802
- F0.length > 0 && !p2 && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外で DOM に無い間だけ Tab を受け、受けた瞬間にその行へ焦点を渡す。これが無いとツリーに Tab で入れない
1803
- // biome-ignore lint/a11y/noStaticElementInteractions: 同上 (焦点の受け渡しだけを担い、要素自身は操作の対象ではない)
1804
- /* @__PURE__ */ m("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: Jt, onFocus: A2 }),
1816
+ ), ye = x0.length > 0 && !A2 && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外にある間だけの代わりの停止点 (上の訳)
1817
+ // biome-ignore lint/a11y/noStaticElementInteractions: 同上 (焦点の受け渡しだけを担い、要素自身は操作の対象ではない)
1818
+ /* @__PURE__ */ f("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: qt, onFocus: v2 });
1819
+ if (!(L && q))
1820
+ return /* @__PURE__ */ Z0("div", { ref: C0, className: re, style: le, onPointerDownCapture: d1, onMouseDownCapture: d1, children: [
1821
+ ye,
1805
1822
  Ze
1806
1823
  ] });
1807
- const g2 = w.showHeader ?? !0, H2 = w.showFooter ?? !1, V2 = { ...ne, "--dt-hscroll": `${X0}px` };
1808
- return /* @__PURE__ */ b0(
1824
+ const H2 = L.showHeader ?? !0, V2 = L.showFooter ?? !1, Z2 = { ...le, "--dt-hscroll": `${F0}px` };
1825
+ return /* @__PURE__ */ Z0(
1809
1826
  "div",
1810
1827
  {
1811
- ref: p0,
1812
- className: W(ae, "dt-grid"),
1813
- style: V2,
1828
+ ref: C0,
1829
+ className: j(re, "dt-grid"),
1830
+ style: Z2,
1814
1831
  role: "treegrid",
1815
- "aria-label": H ? void 0 : V,
1816
- "aria-labelledby": H,
1817
- "aria-multiselectable": Z === "multiple" ? !0 : void 0,
1818
- "aria-busy": s ? !0 : void 0,
1819
- "aria-rowcount": B.length + (w.showHeader ?? !0 ? 1 : 0),
1820
- onPointerDownCapture: s1,
1821
- onMouseDownCapture: s1,
1832
+ "aria-label": g ? void 0 : Z,
1833
+ "aria-labelledby": g,
1834
+ "aria-multiselectable": E === "multiple" ? !0 : void 0,
1835
+ "aria-busy": c ? !0 : void 0,
1836
+ "aria-rowcount": W.length + (L.showHeader ?? !0 ? 1 : 0),
1837
+ onPointerDownCapture: d1,
1838
+ onMouseDownCapture: d1,
1822
1839
  children: [
1823
- g2 && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1824
- /* @__PURE__ */ m("div", { role: "rowgroup", children: /* @__PURE__ */ m(vt, { columns: w.columns, numericTemplate: h1, numericTotal: U.numericTotal, nameWidth: U.nameWidth, scrollBarWidth: W0, className: w.headerClassName }) }),
1825
- /* @__PURE__ */ m("div", { ref: C0, className: "dt-grid-body", children: Ze }),
1826
- j0 > 0 && /* @__PURE__ */ b0("div", { className: "dt-grid-hscrollbar-row", children: [
1827
- /* @__PURE__ */ m("div", { className: "dt-grid-scrollbar-spacer", style: { width: U.nameWidth }, "aria-hidden": "true" }),
1828
- /* @__PURE__ */ m(
1840
+ H2 && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1841
+ /* @__PURE__ */ f("div", { role: "rowgroup", children: /* @__PURE__ */ f(gt, { columns: L.columns, numericTemplate: m1, numericTotal: q.numericTotal, nameWidth: q.nameWidth, scrollBarWidth: U0, className: L.headerClassName }) }),
1842
+ /* @__PURE__ */ Z0("div", { ref: W0, className: "dt-grid-body", children: [
1843
+ ye,
1844
+ Ze
1845
+ ] }),
1846
+ J0 > 0 && /* @__PURE__ */ Z0("div", { className: "dt-grid-hscrollbar-row", children: [
1847
+ /* @__PURE__ */ f("div", { className: "dt-grid-scrollbar-spacer", style: { width: q.nameWidth }, "aria-hidden": "true" }),
1848
+ /* @__PURE__ */ f(
1829
1849
  w2,
1830
1850
  {
1831
1851
  horizontal: !0,
1832
- contentSize: U.numericTotal,
1833
- viewportSize: U.numericVisible,
1834
- scrollPosition: X0,
1835
- scrollBarWidth: W0,
1836
- locale: I,
1837
- labels: j,
1852
+ contentSize: q.numericTotal,
1853
+ viewportSize: q.numericVisible,
1854
+ scrollPosition: F0,
1855
+ scrollBarWidth: U0,
1856
+ locale: C,
1857
+ labels: K,
1838
1858
  onScroll: (l) => {
1839
- const i = typeof l == "function" ? l(X0) : l, g = F1(i, j0);
1840
- return U0(g), g;
1859
+ const i = typeof l == "function" ? l(F0) : l, v = k1(i, J0);
1860
+ return N0(v), v;
1841
1861
  }
1842
1862
  }
1843
1863
  ),
1844
- /* @__PURE__ */ m("div", { className: "dt-grid-scrollbar-spacer", style: { width: W0 }, "aria-hidden": "true" })
1864
+ /* @__PURE__ */ f("div", { className: "dt-grid-scrollbar-spacer", style: { width: U0 }, "aria-hidden": "true" })
1845
1865
  ] }),
1846
- H2 && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1847
- /* @__PURE__ */ m("div", { role: "rowgroup", children: /* @__PURE__ */ m(gt, { columns: w.columns, numericTemplate: h1, numericTotal: U.numericTotal, nameWidth: U.nameWidth, scrollBarWidth: W0, allEntries: v2, className: w.footerClassName }) })
1866
+ V2 && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1867
+ /* @__PURE__ */ f("div", { role: "rowgroup", children: /* @__PURE__ */ f(Ht, { columns: L.columns, numericTemplate: m1, numericTotal: q.numericTotal, nameWidth: q.nameWidth, scrollBarWidth: U0, allEntries: g2, className: L.footerClassName }) })
1848
1868
  ]
1849
1869
  }
1850
1870
  );
1851
- }, c8 = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: a } = {}) => {
1852
- const [n, r] = I2(), [o, s] = h0(() => {
1871
+ }, s8 = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: a } = {}) => {
1872
+ const [n, r] = C2(), [o, c] = f0(() => {
1853
1873
  if (typeof window < "u" && a)
1854
1874
  try {
1855
- const f = window.localStorage.getItem(a);
1856
- if (f) {
1857
- const V = JSON.parse(f);
1858
- return new Set(V);
1875
+ const h = window.localStorage.getItem(a);
1876
+ if (h) {
1877
+ const Z = JSON.parse(h);
1878
+ return new Set(Z);
1859
1879
  }
1860
- } catch (f) {
1861
- console.error("[useDirectoryTreeState] Error reading from localStorage", f);
1880
+ } catch (h) {
1881
+ console.error("[useDirectoryTreeState] Error reading from localStorage", h);
1862
1882
  }
1863
1883
  return e;
1864
- }), c = b((f) => {
1884
+ }), s = b((h) => {
1865
1885
  r(() => {
1866
- s((V) => {
1867
- const H = new Set(V);
1868
- return f(H), H;
1886
+ c((Z) => {
1887
+ const g = new Set(Z);
1888
+ return h(g), g;
1869
1889
  });
1870
1890
  });
1871
1891
  }, []), d = b(
1872
- (f, V) => {
1873
- c((H) => {
1874
- for (const T of f)
1875
- V(H, T);
1892
+ (h, Z) => {
1893
+ s((g) => {
1894
+ for (const I of h)
1895
+ Z(g, I);
1876
1896
  });
1877
1897
  },
1878
- [c]
1898
+ [s]
1879
1899
  );
1880
- k0(() => {
1900
+ T0(() => {
1881
1901
  if (a && typeof window < "u")
1882
1902
  try {
1883
1903
  window.localStorage.setItem(a, JSON.stringify(Array.from(o)));
1884
- } catch (f) {
1885
- console.warn(`Error setting localStorage key "${a}":`, f);
1904
+ } catch (h) {
1905
+ console.warn(`Error setting localStorage key "${a}":`, h);
1886
1906
  }
1887
1907
  }, [o, a]);
1888
- const h = b(
1889
- (f) => {
1890
- d([f], (V, H) => {
1891
- V.has(H) ? V.delete(H) : V.add(H);
1908
+ const u = b(
1909
+ (h) => {
1910
+ d([h], (Z, g) => {
1911
+ Z.has(g) ? Z.delete(g) : Z.add(g);
1892
1912
  });
1893
1913
  },
1894
1914
  [d]
1895
- ), A = b(
1896
- (f) => {
1897
- d([f], (V, H) => {
1898
- V.add(H);
1915
+ ), p = b(
1916
+ (h) => {
1917
+ d([h], (Z, g) => {
1918
+ Z.add(g);
1899
1919
  });
1900
1920
  },
1901
1921
  [d]
1902
- ), M = b(
1903
- (f) => {
1904
- d([f], (V, H) => {
1905
- V.delete(H);
1922
+ ), y = b(
1923
+ (h) => {
1924
+ d([h], (Z, g) => {
1925
+ Z.delete(g);
1906
1926
  });
1907
1927
  },
1908
1928
  [d]
1909
- ), Z = b(
1910
- (f) => {
1911
- d(f, (V, H) => {
1912
- V.delete(H);
1929
+ ), E = b(
1930
+ (h) => {
1931
+ d(h, (Z, g) => {
1932
+ Z.delete(g);
1913
1933
  });
1914
1934
  },
1915
1935
  [d]
1916
- ), E = b(
1917
- (f) => {
1918
- d(f, (V, H) => {
1919
- V.add(H);
1936
+ ), M = b(
1937
+ (h) => {
1938
+ d(h, (Z, g) => {
1939
+ Z.add(g);
1920
1940
  });
1921
1941
  },
1922
1942
  [d]
1923
- ), u = b(() => {
1924
- c((f) => {
1925
- f.clear();
1943
+ ), H = b(() => {
1944
+ s((h) => {
1945
+ h.clear();
1926
1946
  });
1927
- }, [c]), p = b((f) => o.has(f), [o]);
1947
+ }, [s]), m = b((h) => o.has(h), [o]);
1928
1948
  return {
1929
1949
  expanded: o,
1930
- toggle: h,
1931
- expand: A,
1932
- collapse: M,
1933
- collapseMultiple: Z,
1934
- expandMultiple: E,
1935
- collapseAll: u,
1936
- isExpanded: p,
1950
+ toggle: u,
1951
+ expand: p,
1952
+ collapse: y,
1953
+ collapseMultiple: E,
1954
+ expandMultiple: M,
1955
+ collapseAll: H,
1956
+ isExpanded: m,
1937
1957
  isPending: n
1938
1958
  };
1939
1959
  };
1940
1960
  export {
1941
- Mt as DIRECTORY_TREE_LABEL_CATALOGS,
1942
- Le as DIRECTORY_TREE_LABEL_KEYS,
1943
- o8 as DirectoryTree,
1944
- ht as EXPAND_ICON_STYLE_PROPERTIES,
1945
- l8 as FILE_ICON_PAIRS,
1946
- U2 as MARK_PAIRS,
1947
- dt as ROW_STYLE_PROPERTIES,
1948
- x as directoryTreeClasses,
1961
+ Et as DIRECTORY_TREE_LABEL_CATALOGS,
1962
+ Ie as DIRECTORY_TREE_LABEL_KEYS,
1963
+ c8 as DirectoryTree,
1964
+ ut as EXPAND_ICON_STYLE_PROPERTIES,
1965
+ o8 as FILE_ICON_PAIRS,
1966
+ J2 as MARK_PAIRS,
1967
+ ht as ROW_STYLE_PROPERTIES,
1968
+ F as directoryTreeClasses,
1949
1969
  wt as resolveDirectoryTreeLabels,
1950
- c8 as useDirectoryTreeState
1970
+ s8 as useDirectoryTreeState
1951
1971
  };