@aiquants/directory-tree 4.2.0 → 4.3.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,358 +1,358 @@
1
- import * as he from "react";
2
- import Qr, { useRef as V, useEffect as Se, useCallback as j, memo as _t, useState as ie, useMemo as G, useLayoutEffect as mr, useImperativeHandle as en, Fragment as tn, useTransition as rn } from "react";
3
- import { VIRTUAL_SCROLL_LABEL_KEYS as ut, VIRTUAL_SCROLL_LABEL_CATALOGS as pr, resolveVirtualScrollLocale as Pr, resolveVirtualScrollLabels as nn, VirtualScroll as on, ScrollBar as sn } from "@aiquants/virtualscroll";
4
- import { twMerge as O } from "tailwind-merge";
5
- import { FileIcon as an, FileText as ln, FileCode as cn, FileZip as dn, FileVideo as un, FileAudio as fn, FileImage as hn, FilePpt as mn, FileDoc as pn, FileCsv as yn, FileXls as bn, FilePdf as gn, FileMd as vn } from "@phosphor-icons/react";
6
- var ct = { exports: {} }, Ge = {};
7
- var yr;
8
- function wn() {
9
- if (yr) return Ge;
10
- yr = 1;
1
+ import * as ue from "react";
2
+ import ln, { useRef as U, useEffect as Pe, useCallback as j, memo as zt, useState as ie, useMemo as Y, useLayoutEffect as Sr, useImperativeHandle as cn, Fragment as dn, useTransition as un } from "react";
3
+ import { VIRTUAL_SCROLL_LABEL_KEYS as yt, VIRTUAL_SCROLL_LABEL_CATALOGS as Er, resolveVirtualScrollLocale as Dr, resolveVirtualScrollLabels as fn, VirtualScroll as hn, ScrollBar as mn } from "@aiquants/virtualscroll";
4
+ import { twMerge as A } from "tailwind-merge";
5
+ import { FileIcon as pn, FileText as yn, FileCode as gn, FileZip as bn, FileVideo as vn, FileAudio as wn, FileImage as xn, FilePpt as Sn, FileDoc as En, FileCsv as In, FileXls as Rn, FilePdf as kn, FileMd as Nn } from "@phosphor-icons/react";
6
+ var pt = { exports: {} }, qe = {};
7
+ var Ir;
8
+ function Tn() {
9
+ if (Ir) return qe;
10
+ Ir = 1;
11
11
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
12
- function r(o, a, l) {
13
- var c = null;
14
- if (l !== void 0 && (c = "" + l), a.key !== void 0 && (c = "" + a.key), "key" in a) {
15
- l = {};
16
- for (var i in a)
17
- i !== "key" && (l[i] = a[i]);
18
- } else l = a;
19
- return a = l.ref, {
12
+ function r(n, a, i) {
13
+ var l = null;
14
+ if (i !== void 0 && (l = "" + i), a.key !== void 0 && (l = "" + a.key), "key" in a) {
15
+ i = {};
16
+ for (var d in a)
17
+ d !== "key" && (i[d] = a[d]);
18
+ } else i = a;
19
+ return a = i.ref, {
20
20
  $$typeof: e,
21
- type: o,
22
- key: c,
21
+ type: n,
22
+ key: l,
23
23
  ref: a !== void 0 ? a : null,
24
- props: l
24
+ props: i
25
25
  };
26
26
  }
27
- return Ge.Fragment = t, Ge.jsx = r, Ge.jsxs = r, Ge;
27
+ return qe.Fragment = t, qe.jsx = r, qe.jsxs = r, qe;
28
28
  }
29
- var Ve = {};
30
- var br;
31
- function xn() {
32
- return br || (br = 1, process.env.NODE_ENV !== "production" && (function() {
33
- function e(n) {
34
- if (n == null) return null;
35
- if (typeof n == "function")
36
- return n.$$typeof === $ ? null : n.displayName || n.name || null;
37
- if (typeof n == "string") return n;
38
- switch (n) {
39
- case w:
29
+ var Qe = {};
30
+ var Rr;
31
+ function Pn() {
32
+ return Rr || (Rr = 1, process.env.NODE_ENV !== "production" && (function() {
33
+ function e(o) {
34
+ if (o == null) return null;
35
+ if (typeof o == "function")
36
+ return o.$$typeof === W ? null : o.displayName || o.name || null;
37
+ if (typeof o == "string") return o;
38
+ switch (o) {
39
+ case y:
40
40
  return "Fragment";
41
- case M:
41
+ case $:
42
42
  return "Profiler";
43
- case S:
43
+ case x:
44
44
  return "StrictMode";
45
- case K:
45
+ case M:
46
46
  return "Suspense";
47
- case U:
47
+ case D:
48
48
  return "SuspenseList";
49
- case te:
49
+ case ee:
50
50
  return "Activity";
51
51
  }
52
- if (typeof n == "object")
53
- switch (typeof n.tag == "number" && console.error(
52
+ if (typeof o == "object")
53
+ switch (typeof o.tag == "number" && console.error(
54
54
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
55
- ), n.$$typeof) {
56
- case f:
55
+ ), o.$$typeof) {
56
+ case m:
57
57
  return "Portal";
58
- case T:
59
- return n.displayName || "Context";
60
- case I:
61
- return (n._context.displayName || "Context") + ".Consumer";
62
- case y:
63
- var b = n.render;
64
- return n = n.displayName, n || (n = b.displayName || b.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
65
- case P:
66
- return b = n.displayName || null, b !== null ? b : e(n.type) || "Memo";
67
58
  case _:
68
- b = n._payload, n = n._init;
59
+ return o.displayName || "Context";
60
+ case P:
61
+ return (o._context.displayName || "Context") + ".Consumer";
62
+ case p:
63
+ var f = o.render;
64
+ return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
65
+ case C:
66
+ return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
67
+ case q:
68
+ f = o._payload, o = o._init;
69
69
  try {
70
- return e(n(b));
70
+ return e(o(f));
71
71
  } catch {
72
72
  }
73
73
  }
74
74
  return null;
75
75
  }
76
- function t(n) {
77
- return "" + n;
76
+ function t(o) {
77
+ return "" + o;
78
78
  }
79
- function r(n) {
79
+ function r(o) {
80
80
  try {
81
- t(n);
82
- var b = !1;
81
+ t(o);
82
+ var f = !1;
83
83
  } catch {
84
- b = !0;
84
+ f = !0;
85
85
  }
86
- if (b) {
87
- b = console;
88
- var m = b.error, C = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
89
- return m.call(
90
- b,
86
+ if (f) {
87
+ f = console;
88
+ var R = f.error, I = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
89
+ return R.call(
90
+ f,
91
91
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
92
- C
93
- ), t(n);
92
+ I
93
+ ), t(o);
94
94
  }
95
95
  }
96
- function o(n) {
97
- if (n === w) return "<>";
98
- if (typeof n == "object" && n !== null && n.$$typeof === _)
96
+ function n(o) {
97
+ if (o === y) return "<>";
98
+ if (typeof o == "object" && o !== null && o.$$typeof === q)
99
99
  return "<...>";
100
100
  try {
101
- var b = e(n);
102
- return b ? "<" + b + ">" : "<...>";
101
+ var f = e(o);
102
+ return f ? "<" + f + ">" : "<...>";
103
103
  } catch {
104
104
  return "<...>";
105
105
  }
106
106
  }
107
107
  function a() {
108
- var n = F.A;
109
- return n === null ? null : n.getOwner();
108
+ var o = G.A;
109
+ return o === null ? null : o.getOwner();
110
110
  }
111
- function l() {
111
+ function i() {
112
112
  return Error("react-stack-top-frame");
113
113
  }
114
- function c(n) {
115
- if (X.call(n, "key")) {
116
- var b = Object.getOwnPropertyDescriptor(n, "key").get;
117
- if (b && b.isReactWarning) return !1;
114
+ function l(o) {
115
+ if (de.call(o, "key")) {
116
+ var f = Object.getOwnPropertyDescriptor(o, "key").get;
117
+ if (f && f.isReactWarning) return !1;
118
118
  }
119
- return n.key !== void 0;
119
+ return o.key !== void 0;
120
120
  }
121
- function i(n, b) {
122
- function m() {
123
- J || (J = !0, console.error(
121
+ function d(o, f) {
122
+ function R() {
123
+ pe || (pe = !0, console.error(
124
124
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
125
- b
125
+ f
126
126
  ));
127
127
  }
128
- m.isReactWarning = !0, Object.defineProperty(n, "key", {
129
- get: m,
128
+ R.isReactWarning = !0, Object.defineProperty(o, "key", {
129
+ get: R,
130
130
  configurable: !0
131
131
  });
132
132
  }
133
- function R() {
134
- var n = e(this.type);
135
- return de[n] || (de[n] = !0, console.error(
133
+ function b() {
134
+ var o = e(this.type);
135
+ return V[o] || (V[o] = !0, console.error(
136
136
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
137
- )), n = this.props.ref, n !== void 0 ? n : null;
137
+ )), o = this.props.ref, o !== void 0 ? o : null;
138
138
  }
139
- function E(n, b, m, C, H, pe) {
140
- var A = m.ref;
141
- return n = {
142
- $$typeof: N,
143
- type: n,
144
- key: b,
145
- props: m,
146
- _owner: C
147
- }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(n, "ref", {
139
+ function v(o, f, R, I, fe, N) {
140
+ var O = R.ref;
141
+ return o = {
142
+ $$typeof: g,
143
+ type: o,
144
+ key: f,
145
+ props: R,
146
+ _owner: I
147
+ }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(o, "ref", {
148
148
  enumerable: !1,
149
- get: R
150
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
149
+ get: b
150
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
151
151
  configurable: !1,
152
152
  enumerable: !1,
153
153
  writable: !0,
154
154
  value: 0
155
- }), Object.defineProperty(n, "_debugInfo", {
155
+ }), Object.defineProperty(o, "_debugInfo", {
156
156
  configurable: !1,
157
157
  enumerable: !1,
158
158
  writable: !0,
159
159
  value: null
160
- }), Object.defineProperty(n, "_debugStack", {
160
+ }), Object.defineProperty(o, "_debugStack", {
161
161
  configurable: !1,
162
162
  enumerable: !1,
163
163
  writable: !0,
164
- value: H
165
- }), Object.defineProperty(n, "_debugTask", {
164
+ value: fe
165
+ }), Object.defineProperty(o, "_debugTask", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
- value: pe
170
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
169
+ value: N
170
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
171
171
  }
172
- function g(n, b, m, C, H, pe) {
173
- var A = b.children;
174
- if (A !== void 0)
175
- if (C)
176
- if (re(A)) {
177
- for (C = 0; C < A.length; C++)
178
- h(A[C]);
179
- Object.freeze && Object.freeze(A);
172
+ function w(o, f, R, I, fe, N) {
173
+ var O = f.children;
174
+ if (O !== void 0)
175
+ if (I)
176
+ if (J(O)) {
177
+ for (I = 0; I < O.length; I++)
178
+ E(O[I]);
179
+ Object.freeze && Object.freeze(O);
180
180
  } else
181
181
  console.error(
182
182
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
183
183
  );
184
- else h(A);
185
- if (X.call(b, "key")) {
186
- A = e(n);
187
- var ne = Object.keys(b).filter(function(ue) {
188
- return ue !== "key";
184
+ else E(O);
185
+ if (de.call(f, "key")) {
186
+ O = e(o);
187
+ var te = Object.keys(f).filter(function(Ee) {
188
+ return Ee !== "key";
189
189
  });
190
- C = 0 < ne.length ? "{key: someKey, " + ne.join(": ..., ") + ": ...}" : "{key: someKey}", le[A + C] || (ne = 0 < ne.length ? "{" + ne.join(": ..., ") + ": ...}" : "{}", console.error(
190
+ I = 0 < te.length ? "{key: someKey, " + te.join(": ..., ") + ": ...}" : "{key: someKey}", X[O + I] || (te = 0 < te.length ? "{" + te.join(": ..., ") + ": ...}" : "{}", console.error(
191
191
  `A props object containing a "key" prop is being spread into JSX:
192
192
  let props = %s;
193
193
  <%s {...props} />
194
194
  React keys must be passed directly to JSX without using spread:
195
195
  let props = %s;
196
196
  <%s key={someKey} {...props} />`,
197
- C,
198
- A,
199
- ne,
200
- A
201
- ), le[A + C] = !0);
197
+ I,
198
+ O,
199
+ te,
200
+ O
201
+ ), X[O + I] = !0);
202
202
  }
203
- if (A = null, m !== void 0 && (r(m), A = "" + m), c(b) && (r(b.key), A = "" + b.key), "key" in b) {
204
- m = {};
205
- for (var ye in b)
206
- ye !== "key" && (m[ye] = b[ye]);
207
- } else m = b;
208
- return A && i(
209
- m,
210
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
211
- ), E(
212
- n,
213
- A,
214
- m,
203
+ if (O = null, R !== void 0 && (r(R), O = "" + R), l(f) && (r(f.key), O = "" + f.key), "key" in f) {
204
+ R = {};
205
+ for (var he in f)
206
+ he !== "key" && (R[he] = f[he]);
207
+ } else R = f;
208
+ return O && d(
209
+ R,
210
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
211
+ ), v(
212
+ o,
213
+ O,
214
+ R,
215
215
  a(),
216
- H,
217
- pe
216
+ fe,
217
+ N
218
218
  );
219
219
  }
220
- function h(n) {
221
- p(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === _ && (n._payload.status === "fulfilled" ? p(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
220
+ function E(o) {
221
+ T(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === q && (o._payload.status === "fulfilled" ? T(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
222
222
  }
223
- function p(n) {
224
- return typeof n == "object" && n !== null && n.$$typeof === N;
223
+ function T(o) {
224
+ return typeof o == "object" && o !== null && o.$$typeof === g;
225
225
  }
226
- var x = Qr, N = /* @__PURE__ */ Symbol.for("react.transitional.element"), f = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), M = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), y = /* @__PURE__ */ Symbol.for("react.forward_ref"), K = /* @__PURE__ */ Symbol.for("react.suspense"), U = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), _ = /* @__PURE__ */ Symbol.for("react.lazy"), te = /* @__PURE__ */ Symbol.for("react.activity"), $ = /* @__PURE__ */ Symbol.for("react.client.reference"), F = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, re = Array.isArray, ae = console.createTask ? console.createTask : function() {
226
+ var h = ln, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), y = /* @__PURE__ */ Symbol.for("react.fragment"), x = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), p = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), D = /* @__PURE__ */ Symbol.for("react.suspense_list"), C = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), ee = /* @__PURE__ */ Symbol.for("react.activity"), W = /* @__PURE__ */ Symbol.for("react.client.reference"), G = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, J = Array.isArray, se = console.createTask ? console.createTask : function() {
227
227
  return null;
228
228
  };
229
- x = {
230
- react_stack_bottom_frame: function(n) {
231
- return n();
229
+ h = {
230
+ react_stack_bottom_frame: function(o) {
231
+ return o();
232
232
  }
233
233
  };
234
- var J, de = {}, me = x.react_stack_bottom_frame.bind(
235
- x,
236
- l
237
- )(), W = ae(o(l)), le = {};
238
- Ve.Fragment = w, Ve.jsx = function(n, b, m) {
239
- var C = 1e4 > F.recentlyCreatedOwnerStacks++;
240
- return g(
241
- n,
242
- b,
243
- m,
234
+ var pe, V = {}, ye = h.react_stack_bottom_frame.bind(
235
+ h,
236
+ i
237
+ )(), ge = se(n(i)), X = {};
238
+ Qe.Fragment = y, Qe.jsx = function(o, f, R) {
239
+ var I = 1e4 > G.recentlyCreatedOwnerStacks++;
240
+ return w(
241
+ o,
242
+ f,
243
+ R,
244
244
  !1,
245
- C ? Error("react-stack-top-frame") : me,
246
- C ? ae(o(n)) : W
245
+ I ? Error("react-stack-top-frame") : ye,
246
+ I ? se(n(o)) : ge
247
247
  );
248
- }, Ve.jsxs = function(n, b, m) {
249
- var C = 1e4 > F.recentlyCreatedOwnerStacks++;
250
- return g(
251
- n,
252
- b,
253
- m,
248
+ }, Qe.jsxs = function(o, f, R) {
249
+ var I = 1e4 > G.recentlyCreatedOwnerStacks++;
250
+ return w(
251
+ o,
252
+ f,
253
+ R,
254
254
  !0,
255
- C ? Error("react-stack-top-frame") : me,
256
- C ? ae(o(n)) : W
255
+ I ? Error("react-stack-top-frame") : ye,
256
+ I ? se(n(o)) : ge
257
257
  );
258
258
  };
259
- })()), Ve;
259
+ })()), Qe;
260
260
  }
261
- var gr;
262
- function En() {
263
- return gr || (gr = 1, process.env.NODE_ENV === "production" ? ct.exports = wn() : ct.exports = xn()), ct.exports;
261
+ var kr;
262
+ function jn() {
263
+ return kr || (kr = 1, process.env.NODE_ENV === "production" ? pt.exports = Tn() : pt.exports = Pn()), pt.exports;
264
264
  }
265
- var u = En();
266
- function Sn({
265
+ var u = jn();
266
+ function _n({
267
267
  title: e,
268
268
  titleId: t,
269
269
  ...r
270
- }, o) {
271
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
270
+ }, n) {
271
+ return /* @__PURE__ */ ue.createElement("svg", Object.assign({
272
272
  xmlns: "http://www.w3.org/2000/svg",
273
273
  viewBox: "0 0 24 24",
274
274
  fill: "currentColor",
275
275
  "aria-hidden": "true",
276
276
  "data-slot": "icon",
277
- ref: o,
277
+ ref: n,
278
278
  "aria-labelledby": t
279
- }, r), e ? /* @__PURE__ */ he.createElement("title", {
279
+ }, r), e ? /* @__PURE__ */ ue.createElement("title", {
280
280
  id: t
281
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
281
+ }, e) : null, /* @__PURE__ */ ue.createElement("path", {
282
282
  fillRule: "evenodd",
283
283
  d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
284
284
  clipRule: "evenodd"
285
285
  }));
286
286
  }
287
- const In = /* @__PURE__ */ he.forwardRef(Sn);
288
- function Rn({
287
+ const Cn = /* @__PURE__ */ ue.forwardRef(_n);
288
+ function On({
289
289
  title: e,
290
290
  titleId: t,
291
291
  ...r
292
- }, o) {
293
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
292
+ }, n) {
293
+ return /* @__PURE__ */ ue.createElement("svg", Object.assign({
294
294
  xmlns: "http://www.w3.org/2000/svg",
295
295
  viewBox: "0 0 24 24",
296
296
  fill: "currentColor",
297
297
  "aria-hidden": "true",
298
298
  "data-slot": "icon",
299
- ref: o,
299
+ ref: n,
300
300
  "aria-labelledby": t
301
- }, r), e ? /* @__PURE__ */ he.createElement("title", {
301
+ }, r), e ? /* @__PURE__ */ ue.createElement("title", {
302
302
  id: t
303
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
303
+ }, e) : null, /* @__PURE__ */ ue.createElement("path", {
304
304
  fillRule: "evenodd",
305
305
  d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
306
306
  clipRule: "evenodd"
307
307
  }));
308
308
  }
309
- const kn = /* @__PURE__ */ he.forwardRef(Rn);
310
- function Nn({
309
+ const An = /* @__PURE__ */ ue.forwardRef(On);
310
+ function Ln({
311
311
  title: e,
312
312
  titleId: t,
313
313
  ...r
314
- }, o) {
315
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
314
+ }, n) {
315
+ return /* @__PURE__ */ ue.createElement("svg", Object.assign({
316
316
  xmlns: "http://www.w3.org/2000/svg",
317
317
  viewBox: "0 0 24 24",
318
318
  fill: "currentColor",
319
319
  "aria-hidden": "true",
320
320
  "data-slot": "icon",
321
- ref: o,
321
+ ref: n,
322
322
  "aria-labelledby": t
323
- }, r), e ? /* @__PURE__ */ he.createElement("title", {
323
+ }, r), e ? /* @__PURE__ */ ue.createElement("title", {
324
324
  id: t
325
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
325
+ }, e) : null, /* @__PURE__ */ ue.createElement("path", {
326
326
  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"
327
327
  }));
328
328
  }
329
- const Tn = /* @__PURE__ */ he.forwardRef(Nn), it = 44, dt = 12, vr = 8, Ct = 14, D = {
329
+ const Dn = /* @__PURE__ */ ue.forwardRef(Ln), At = 44, Fn = 12, Mn = 8, ce = 14, $n = 14, Fr = (e) => e === void 0 ? void 0 : { fontSize: typeof e == "number" ? `${e}px` : e }, ae = (e) => ({ width: e, height: e }), F = {
330
330
  container: "directory-tree-container relative h-full transition-opacity duration-300 overflow-y-hidden pb-[3px] pr-[2px]",
331
331
  containerPending: "opacity-70",
332
332
  entry: "directory-tree-entry flex items-center cursor-pointer relative select-none text-xs leading-tight py-0.5",
333
333
  // ホバー時のスタイル(ライト/ダークモード対応)
334
- entryHover: O("directory-tree-entry--hover hover:bg-gray-400/15", "dark:hover:bg-gray-200/10"),
334
+ entryHover: A("directory-tree-entry--hover hover:bg-gray-400/15", "dark:hover:bg-gray-200/10"),
335
335
  // 選択時のスタイル(ライト/ダークモード対応)
336
- entrySelected: O("directory-tree-entry--selected bg-blue-400/10", "dark:bg-blue-400/15"),
336
+ entrySelected: A("directory-tree-entry--selected bg-blue-400/10", "dark:bg-blue-400/15"),
337
337
  // アイテム選択時のスタイル(ライト/ダークモード対応)
338
- entryItemSelected: O("directory-tree-entry--item-selected bg-blue-400/20 shadow-[0_0_0_1px_rgba(59,130,246,0.3)]", "dark:bg-blue-400/25 dark:shadow-[0_0_0_1px_rgba(96,165,250,0.4)]"),
339
- // アイコンのスタイル
340
- expandIcon: O("directory-tree-expand-icon w-3.5 h-3.5 flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
341
- expandIconSelected: O("directory-tree-expand-icon--selected text-blue-700", "dark:text-blue-400"),
342
- // 箱の大きさはクラスでなく TYPE_ICON_SIZE から行が付ける (ツリーラインのジオメトリと同じ値を読むため)
343
- typeIcon: O("directory-tree-type-icon flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
344
- typeIconSelected: O("directory-tree-type-icon--selected text-blue-700", "dark:text-blue-400"),
338
+ entryItemSelected: A("directory-tree-entry--item-selected bg-blue-400/20 shadow-[0_0_0_1px_rgba(59,130,246,0.3)]", "dark:bg-blue-400/25 dark:shadow-[0_0_0_1px_rgba(96,165,250,0.4)]"),
339
+ // 箱の大きさはクラスでなく EXPAND_BOX_SIZE から行が付ける (ツリーラインのジオメトリが印を置く箱と同じ値を読むため)
340
+ expandIcon: A("directory-tree-expand-icon flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
341
+ expandIconSelected: A("directory-tree-expand-icon--selected text-blue-700", "dark:text-blue-400"),
342
+ // 箱の大きさはクラスでなく visual.typeIconSize から行が付ける (ツリーラインのジオメトリと同じ値を読むため)
343
+ typeIcon: A("directory-tree-type-icon flex-shrink-0 flex items-center justify-center", "text-gray-500", "dark:text-gray-400"),
344
+ typeIconSelected: A("directory-tree-type-icon--selected text-blue-700", "dark:text-blue-400"),
345
345
  // テキストのスタイル
346
- name: O("directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 text-xs font-normal", "text-gray-700", "dark:text-gray-200"),
346
+ name: A("directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 text-xs font-normal", "text-gray-700", "dark:text-gray-200"),
347
347
  nameDirectory: "directory-tree-name--directory font-medium",
348
- nameSelected: O("directory-tree-name--selected text-blue-800 font-semibold", "dark:text-blue-300")
349
- }, At = (e) => {
348
+ nameSelected: A("directory-tree-name--selected text-blue-800 font-semibold", "dark:text-blue-300")
349
+ }, Ht = (e) => {
350
350
  const t = e.slice(e.lastIndexOf("/") + 1), r = t.lastIndexOf(".");
351
351
  return r <= 0 ? "" : t.slice(r + 1).toLowerCase();
352
- }, Pn = /^[a-z][a-z\d+.-]*:\/\//i, wr = (e) => At(Pn.test(e) ? e.split(/[?#]/, 1)[0] : e), jr = (e) => At(e.name) || wr(e.relativePath) || wr(e.absolutePath), _r = ({ isDirectory: e, isExpanded: t, showExpandIcons: r, useCanvasExpandIcons: o, expandIconSize: a }) => {
353
- const l = a ? { width: a, height: a } : void 0, c = a ? "" : "h-4 w-4";
354
- return !(r && e) || o ? /* @__PURE__ */ u.jsx("span", { className: c, style: l, "aria-hidden": "true" }) : t ? /* @__PURE__ */ u.jsx(In, { className: c, style: l }) : /* @__PURE__ */ u.jsx(kn, { className: c, style: l });
355
- }, Tt = (e, t) => {
352
+ }, zn = /^[a-z][a-z\d+.-]*:\/\//i, Nr = (e) => Ht(zn.test(e) ? e.split(/[?#]/, 1)[0] : e), Mr = (e) => Ht(e.name) || Nr(e.relativePath) || Nr(e.absolutePath), $r = ({ isDirectory: e, isExpanded: t, showExpandIcons: r, useCanvasExpandIcons: n, expandIconSize: a }) => {
353
+ const i = a ? { width: a, height: a } : void 0, l = a ? "" : "h-4 w-4";
354
+ return !(r && e) || n ? /* @__PURE__ */ u.jsx("span", { className: l, style: i, "aria-hidden": "true" }) : t ? /* @__PURE__ */ u.jsx(Cn, { className: l, style: i }) : /* @__PURE__ */ u.jsx(An, { className: l, style: i });
355
+ }, Dt = (e, t) => {
356
356
  if (e == null || typeof e == "boolean") return null;
357
357
  if (typeof e == "function")
358
358
  return console.warn(`[DirectoryTree] Function returned by renderer for "${t}". Return a node.`), null;
@@ -360,28 +360,28 @@ const Tn = /* @__PURE__ */ he.forwardRef(Nn), it = 44, dt = 12, vr = 8, Ct = 14,
360
360
  if ("then" in e)
361
361
  return console.warn(`[DirectoryTree] Promise returned for "${t}". Not supported.`), null;
362
362
  if (Array.isArray(e)) {
363
- const o = e.map((a) => Tt(a, t)).filter(Boolean);
364
- return o.length ? o : null;
363
+ const n = e.map((a) => Dt(a, t)).filter(Boolean);
364
+ return n.length ? n : null;
365
365
  }
366
366
  const r = e.type;
367
367
  if (r && r.$$typeof === /* @__PURE__ */ Symbol.for("react.lazy"))
368
368
  return console.warn(`[DirectoryTree] Lazy component for "${t}". Not supported.`), null;
369
369
  }
370
370
  return e;
371
- }, jn = {
372
- markdown: () => /* @__PURE__ */ u.jsx(vn, { className: "h-4 w-4 text-sky-500 dark:text-sky-400" }),
373
- pdf: () => /* @__PURE__ */ u.jsx(gn, { className: "h-4 w-4 text-red-500 dark:text-red-400" }),
374
- spreadsheet: () => /* @__PURE__ */ u.jsx(bn, { className: "h-4 w-4 text-emerald-600 dark:text-emerald-400" }),
375
- csv: () => /* @__PURE__ */ u.jsx(yn, { className: "h-4 w-4 text-emerald-600 dark:text-emerald-400" }),
376
- document: () => /* @__PURE__ */ u.jsx(pn, { className: "h-4 w-4 text-blue-600 dark:text-blue-400" }),
377
- presentation: () => /* @__PURE__ */ u.jsx(mn, { className: "h-4 w-4 text-orange-500 dark:text-orange-400" }),
378
- image: () => /* @__PURE__ */ u.jsx(hn, { className: "h-4 w-4 text-teal-500 dark:text-teal-400" }),
379
- audio: () => /* @__PURE__ */ u.jsx(fn, { className: "h-4 w-4 text-pink-500 dark:text-pink-400" }),
380
- video: () => /* @__PURE__ */ u.jsx(un, { className: "h-4 w-4 text-violet-500 dark:text-violet-400" }),
381
- archive: () => /* @__PURE__ */ u.jsx(dn, { className: "h-4 w-4 text-amber-500 dark:text-amber-400" }),
382
- code: () => /* @__PURE__ */ u.jsx(cn, { className: "h-4 w-4 text-purple-500 dark:text-purple-400" }),
383
- text: () => /* @__PURE__ */ u.jsx(ln, { className: "h-4 w-4 text-gray-500 dark:text-gray-400" })
384
- }, _n = {
371
+ }, Hn = {
372
+ markdown: (e) => /* @__PURE__ */ u.jsx(Nn, { className: "text-sky-500 dark:text-sky-400", style: ae(e) }),
373
+ pdf: (e) => /* @__PURE__ */ u.jsx(kn, { className: "text-red-500 dark:text-red-400", style: ae(e) }),
374
+ spreadsheet: (e) => /* @__PURE__ */ u.jsx(Rn, { className: "text-emerald-600 dark:text-emerald-400", style: ae(e) }),
375
+ csv: (e) => /* @__PURE__ */ u.jsx(In, { className: "text-emerald-600 dark:text-emerald-400", style: ae(e) }),
376
+ document: (e) => /* @__PURE__ */ u.jsx(En, { className: "text-blue-600 dark:text-blue-400", style: ae(e) }),
377
+ presentation: (e) => /* @__PURE__ */ u.jsx(Sn, { className: "text-orange-500 dark:text-orange-400", style: ae(e) }),
378
+ image: (e) => /* @__PURE__ */ u.jsx(xn, { className: "text-teal-500 dark:text-teal-400", style: ae(e) }),
379
+ audio: (e) => /* @__PURE__ */ u.jsx(wn, { className: "text-pink-500 dark:text-pink-400", style: ae(e) }),
380
+ video: (e) => /* @__PURE__ */ u.jsx(vn, { className: "text-violet-500 dark:text-violet-400", style: ae(e) }),
381
+ archive: (e) => /* @__PURE__ */ u.jsx(bn, { className: "text-amber-500 dark:text-amber-400", style: ae(e) }),
382
+ code: (e) => /* @__PURE__ */ u.jsx(gn, { className: "text-purple-500 dark:text-purple-400", style: ae(e) }),
383
+ text: (e) => /* @__PURE__ */ u.jsx(yn, { className: "text-gray-500 dark:text-gray-400", style: ae(e) })
384
+ }, Wn = {
385
385
  markdown: ["md", "markdown", "mdx"],
386
386
  pdf: ["pdf"],
387
387
  spreadsheet: ["xls", "xlsx", "xlsm", "xlsb", "ods"],
@@ -394,7 +394,7 @@ const Tn = /* @__PURE__ */ he.forwardRef(Nn), it = 44, dt = 12, vr = 8, Ct = 14,
394
394
  archive: ["zip", "tar", "gz", "7z", "rar", "tgz", "bz2"],
395
395
  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"],
396
396
  text: ["txt", "log"]
397
- }, Cn = new Map(Object.entries(_n).flatMap(([e, t]) => t.map((r) => [r, e]))), An = /* @__PURE__ */ new Set(["", "application/octet-stream", "binary/octet-stream", "text/plain", "application/x-empty"]), On = (e) => (e ?? "").split(";", 1)[0].trim().toLowerCase(), Ln = (e) => {
397
+ }, Bn = new Map(Object.entries(Wn).flatMap(([e, t]) => t.map((r) => [r, e]))), Yn = /* @__PURE__ */ new Set(["", "application/octet-stream", "binary/octet-stream", "text/plain", "application/x-empty"]), Gn = (e) => (e ?? "").split(";", 1)[0].trim().toLowerCase(), Vn = (e) => {
398
398
  if (e === "text/markdown" || e === "text/x-markdown") return "markdown";
399
399
  if (e === "application/pdf") return "pdf";
400
400
  if (e.includes("excel") || e.includes("spreadsheet")) return "spreadsheet";
@@ -408,162 +408,162 @@ const Tn = /* @__PURE__ */ he.forwardRef(Nn), it = 44, dt = 12, vr = 8, Ct = 14,
408
408
  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"))
409
409
  return "code";
410
410
  if (e.startsWith("text/")) return "text";
411
- }, Dn = (e, t, r) => {
412
- const o = On(e), a = Ln(o), l = Cn.get((t || (r ? At(r) : "")).toLowerCase()), i = (An.has(o) ? [l, a] : [a, l]).find((R) => R !== void 0);
413
- return i === void 0 ? /* @__PURE__ */ u.jsx(an, { className: "h-4 w-4 text-gray-400 dark:text-gray-400" }) : jn[i]();
414
- }, Cr = (e, t) => {
415
- const { entry: r, isDirectory: o, isExpanded: a, extension: l, mimeType: c } = e;
416
- let i;
417
- const R = c || r.mimeType;
418
- return r.icon !== void 0 ? i = r.icon : o ? i = a && t?.directoryExpanded || t?.directory || /* @__PURE__ */ u.jsx(Tn, { className: "h-4 w-4" }) : l && t?.fileByExtension?.[l] ? i = t.fileByExtension[l] : i = t?.file || Dn(R, l, r.name), Tt(typeof i == "function" ? i(e) : i, r.absolutePath);
419
- }, Fn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ar = (e) => {
411
+ }, Xn = (e, t, r, n) => {
412
+ const a = Gn(e), i = Vn(a), l = Bn.get((t || (r ? Ht(r) : "")).toLowerCase()), b = (Yn.has(a) ? [l, i] : [i, l]).find((v) => v !== void 0);
413
+ return b === void 0 ? /* @__PURE__ */ u.jsx(pn, { className: "text-gray-400 dark:text-gray-400", style: ae(n) }) : Hn[b](n);
414
+ }, zr = (e, t, r) => {
415
+ const { entry: n, isDirectory: a, isExpanded: i, extension: l, mimeType: d } = e;
416
+ let b;
417
+ const v = d || n.mimeType;
418
+ return n.icon !== void 0 ? b = n.icon : a ? b = i && t?.directoryExpanded || t?.directory || /* @__PURE__ */ u.jsx(Dn, { style: ae(r) }) : l && t?.fileByExtension?.[l] ? b = t.fileByExtension[l] : b = t?.file || Xn(v, l, n.name, r), Dt(typeof b == "function" ? b(e) : b, n.absolutePath);
419
+ }, Kn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Hr = (e) => {
420
420
  if (!e)
421
421
  return;
422
422
  const t = Object.entries(e).filter(([, r]) => r != null);
423
423
  if (t.length !== 0)
424
- return Object.fromEntries(t.map(([r, o]) => [`data-${Fn(r)}`, String(o)]));
425
- }, Mn = 500, Or = ({ entry: e, isDirectory: t, isExpanded: r, isItemSelected: o, selectionMode: a, onSelectionChange: l, onEntryClick: c, toggleDirectory: i, onToggleDirectoryRecursive: R }) => {
426
- const E = V(null);
427
- return Se(
424
+ return Object.fromEntries(t.map(([r, n]) => [`data-${Kn(r)}`, String(n)]));
425
+ }, Un = 500, Wr = ({ entry: e, isDirectory: t, isExpanded: r, isItemSelected: n, selectionMode: a, onSelectionChange: i, onEntryClick: l, toggleDirectory: d, onToggleDirectoryRecursive: b }) => {
426
+ const v = U(null);
427
+ return Pe(
428
428
  () => () => {
429
- E.current && window.clearTimeout(E.current);
429
+ v.current && window.clearTimeout(v.current);
430
430
  },
431
431
  []
432
432
  ), j(
433
- (g) => {
434
- g.stopPropagation(), a !== "none" && !t && l && l(e, !o);
435
- let h = !1;
436
- c({
433
+ (w) => {
434
+ w.stopPropagation(), a !== "none" && !t && i && i(e, !n);
435
+ let E = !1;
436
+ l({
437
437
  entry: e,
438
438
  isDirectory: t,
439
439
  isExpanded: r,
440
440
  preventDefault: () => {
441
- h = !0;
441
+ E = !0;
442
442
  }
443
- }), !(!t || h) && (E.current ? (window.clearTimeout(E.current), E.current = null, R(e)) : E.current = window.setTimeout(() => {
444
- i(e.absolutePath), E.current = null;
445
- }, Mn));
443
+ }), !(!t || E) && (v.current ? (window.clearTimeout(v.current), v.current = null, b(e)) : v.current = window.setTimeout(() => {
444
+ d(e.absolutePath), v.current = null;
445
+ }, Un));
446
446
  },
447
- [t, e, r, R, i, c, a, l, o]
447
+ [t, e, r, b, d, l, a, i, n]
448
448
  );
449
- }, Lr = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", xr = (e, t) => e.children !== void 0 && t(e.absolutePath), Dr = (e, t) => ({
449
+ }, Br = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", Tr = (e, t) => e.children !== void 0 && t(e.absolutePath), Yr = (e, t) => ({
450
450
  width: e,
451
451
  gridTemplateColumns: t
452
- }), Fr = _t(
452
+ }), Gr = zt(
453
453
  ({
454
454
  entry: e,
455
455
  indentLevel: t,
456
456
  positionInSet: r,
457
- setSize: o,
457
+ setSize: n,
458
458
  rowIndex: a,
459
- flatIndex: l,
460
- onRowFocus: c,
461
- onRowBlur: i,
462
- isSelectedForAria: R,
463
- rowHeight: E,
464
- isDirOpen: g,
465
- columns: h,
466
- numericTemplate: p,
467
- numericTotal: x,
468
- nameWidth: N,
469
- rowClassName: f,
470
- selection: { onEntryClick: w, selectedPath: S, currentPath: M, mode: I = "none", selectedItems: T, onSelectionChange: y },
471
- expansion: { toggleDirectory: K, onToggleDirectoryRecursive: U },
472
- visual: { iconOverrides: P, showExpandIcons: _ = !0, showDirectoryIcons: te = !0, showFileIcons: $ = !0, useCanvasExpandIcons: F = !1, expandIconSize: X, typeIconSize: re = Ct, indentSize: ae = dt, highlightStyles: J, expandIconClassName: de, expandIconStyle: me }
459
+ flatIndex: i,
460
+ onRowFocus: l,
461
+ onRowBlur: d,
462
+ isSelectedForAria: b,
463
+ rowHeight: v,
464
+ isDirOpen: w,
465
+ columns: E,
466
+ numericTemplate: T,
467
+ numericTotal: h,
468
+ nameWidth: g,
469
+ rowClassName: m,
470
+ selection: { onEntryClick: y, selectedPath: x, currentPath: $, mode: P = "none", selectedItems: _, onSelectionChange: p },
471
+ expansion: { toggleDirectory: M, onToggleDirectoryRecursive: D },
472
+ visual: { iconOverrides: C, showExpandIcons: q = !0, showDirectoryIcons: ee = !0, showFileIcons: W = !0, useCanvasExpandIcons: G = !1, expandIconSize: de, typeIconSize: J, fontSize: se, indentSize: pe, highlightStyles: V, expandIconClassName: ye, expandIconStyle: ge }
473
473
  }) => {
474
- const [W, le] = ie(!1), n = e.children !== void 0, b = n && g(e.absolutePath), m = e.absolutePath === S, C = e.absolutePath === M, H = !n && !!T?.has(e.absolutePath), pe = n ? void 0 : jr(e), A = Or({ entry: e, isDirectory: n, isExpanded: b, isItemSelected: H, selectionMode: I, onSelectionChange: y, onEntryClick: w, toggleDirectory: K, onToggleDirectoryRecursive: U }), ne = W ? J?.hoverClassName !== void 0 ? J.hoverClassName : D.entryHover : "", ye = (() => {
475
- if (n) {
476
- if (m) return J?.directorySelectedClassName !== void 0 ? J.directorySelectedClassName : D.entrySelected;
477
- } else if (m || H)
478
- return J?.itemSelectedClassName !== void 0 ? J.itemSelectedClassName : O(m && D.entrySelected, H && D.entryItemSelected);
474
+ const [X, o] = ie(!1), f = e.children !== void 0, R = f && w(e.absolutePath), I = e.absolutePath === x, fe = e.absolutePath === $, N = !f && !!_?.has(e.absolutePath), O = f ? void 0 : Mr(e), te = Wr({ entry: e, isDirectory: f, isExpanded: R, isItemSelected: N, selectionMode: P, onSelectionChange: p, onEntryClick: y, toggleDirectory: M, onToggleDirectoryRecursive: D }), he = X ? V?.hoverClassName !== void 0 ? V.hoverClassName : F.entryHover : "", Ee = (() => {
475
+ if (f) {
476
+ if (I) return V?.directorySelectedClassName !== void 0 ? V.directorySelectedClassName : F.entrySelected;
477
+ } else if (I || N)
478
+ return V?.itemSelectedClassName !== void 0 ? V.itemSelectedClassName : A(I && F.entrySelected, N && F.entryItemSelected);
479
479
  return "";
480
- })(), ue = typeof f == "function" ? f(e) : f, _e = O("dt-grid-row cursor-pointer select-none", ne, ye, ue, e.className), Ie = O(D.expandIcon, de, (m || H) && D.expandIconSelected), se = O(D.typeIcon, (m || H) && D.typeIconSelected), L = O("dt-grid-name-label ml-1", "text-gray-700 dark:text-gray-200", n && D.nameDirectory, (m || H) && D.nameSelected), fe = _r({ isDirectory: n, isExpanded: b, showExpandIcons: _, useCanvasExpandIcons: F, expandIconSize: X }), Q = (n ? te : $) ? Cr({ entry: e, isDirectory: n, isExpanded: b, isSelected: m, isItemSelected: H, extension: pe, mimeType: e.mimeType }, P) : null, Re = { indentLevel: t, isDirectory: n, isExpanded: b }, [z, ...Ce] = h, ke = z?.render ? z.render(e, Re) : e.label ?? e.name, Ne = {
481
- ...W ? J?.hoverStyle : {},
482
- ...n && m ? J?.directorySelectedStyle : {},
483
- ...!n && (m || H) ? J?.itemSelectedStyle : {}
480
+ })(), be = typeof m == "function" ? m(e) : m, Le = A("dt-grid-row cursor-pointer select-none", he, Ee, be, e.className), Ie = A(F.expandIcon, ye, (I || N) && F.expandIconSelected), je = A(F.typeIcon, (I || N) && F.typeIconSelected), L = A("dt-grid-name-label ml-1", "text-gray-700 dark:text-gray-200", f && F.nameDirectory, (I || N) && F.nameSelected), z = $r({ isDirectory: f, isExpanded: R, showExpandIcons: q, useCanvasExpandIcons: G, expandIconSize: de }), H = (f ? ee : W) ? zr({ entry: e, isDirectory: f, isExpanded: R, isSelected: I, isItemSelected: N, extension: O, mimeType: e.mimeType }, C, J) : null, _e = { indentLevel: t, isDirectory: f, isExpanded: R }, [ne, ...Re] = E, De = ne?.render ? ne.render(e, _e) : e.label ?? e.name, ve = {
481
+ ...X ? V?.hoverStyle : {},
482
+ ...f && I ? V?.directorySelectedStyle : {},
483
+ ...!f && (I || N) ? V?.itemSelectedStyle : {}
484
484
  };
485
485
  return /* @__PURE__ */ u.jsxs(
486
486
  "div",
487
487
  {
488
- className: _e,
489
- style: { height: E, ...Ne, ...e.style },
488
+ className: Le,
489
+ style: { height: v, ...ve, ...e.style },
490
490
  role: "row",
491
- "aria-expanded": n ? b : void 0,
491
+ "aria-expanded": f ? R : void 0,
492
492
  "aria-level": t + 1,
493
493
  "aria-posinset": r,
494
- "aria-setsize": o,
494
+ "aria-setsize": n,
495
495
  "aria-rowindex": a,
496
- "aria-selected": I === "none" ? void 0 : R,
497
- "aria-current": C ? "page" : void 0,
498
- ...Ar(e.data),
499
- "data-entry-type": n ? "directory" : "file",
500
- "data-entry-expanded": n ? String(b) : void 0,
501
- "data-entry-selected": m ? "true" : void 0,
502
- "data-entry-item-selected": H ? "true" : void 0,
503
- onClick: A,
504
- onMouseEnter: () => le(!0),
505
- onMouseLeave: () => le(!1),
506
- onFocus: (Z) => c(l, e.absolutePath, Z.currentTarget),
507
- onBlur: (Z) => i(e.absolutePath, Z.currentTarget),
496
+ "aria-selected": P === "none" ? void 0 : b,
497
+ "aria-current": fe ? "page" : void 0,
498
+ ...Hr(e.data),
499
+ "data-entry-type": f ? "directory" : "file",
500
+ "data-entry-expanded": f ? String(R) : void 0,
501
+ "data-entry-selected": I ? "true" : void 0,
502
+ "data-entry-item-selected": N ? "true" : void 0,
503
+ onClick: te,
504
+ onMouseEnter: () => o(!0),
505
+ onMouseLeave: () => o(!1),
506
+ onFocus: (Z) => l(i, e.absolutePath, Z.currentTarget),
507
+ onBlur: (Z) => d(e.absolutePath, Z.currentTarget),
508
508
  onKeyDown: (Z) => {
509
509
  if (Z.key === "Enter") {
510
510
  if (Z.repeat) {
511
511
  Z.preventDefault();
512
512
  return;
513
513
  }
514
- A(Z);
514
+ te(Z);
515
515
  }
516
516
  },
517
517
  tabIndex: 0,
518
518
  children: [
519
- /* @__PURE__ */ u.jsxs("div", { className: O("dt-grid-name-cell", z?.className), role: "gridcell", style: { width: N, paddingLeft: Math.max(0, t * ae) }, children: [
520
- (_ || F) && /* @__PURE__ */ u.jsx("span", { className: Ie, style: me, children: fe }),
521
- (n ? te : $) && /* @__PURE__ */ u.jsx("span", { className: se, style: { width: re, height: re }, children: Q }),
522
- /* @__PURE__ */ u.jsx("span", { className: L, children: ke })
519
+ /* @__PURE__ */ u.jsxs("div", { className: A("dt-grid-name-cell", ne?.className), role: "gridcell", style: { width: g, paddingLeft: Math.max(0, t * pe) }, children: [
520
+ (q || G) && /* @__PURE__ */ u.jsx("span", { className: Ie, style: { width: ce, height: ce, ...ge }, children: z }),
521
+ (f ? ee : W) && /* @__PURE__ */ u.jsx("span", { className: je, style: { width: J, height: J }, children: H }),
522
+ /* @__PURE__ */ u.jsx("span", { className: L, style: Fr(se), children: De })
523
523
  ] }),
524
- Ce.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-track", style: Dr(x, p), children: Ce.map((Z) => /* @__PURE__ */ u.jsx("div", { className: O("dt-grid-cell", Lr(Z.align), Z.className), role: "gridcell", children: Z.render ? Z.render(e, Re) : null }, Z.key)) }) })
524
+ Re.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-track", style: Yr(h, T), children: Re.map((Z) => /* @__PURE__ */ u.jsx("div", { className: A("dt-grid-cell", Br(Z.align), Z.className), role: "gridcell", children: Z.render ? Z.render(e, _e) : null }, Z.key)) }) })
525
525
  ]
526
526
  }
527
527
  );
528
528
  },
529
529
  (e, t) => {
530
530
  if (e.entry !== t.entry) return !1;
531
- const r = xr(e.entry, e.isDirOpen), o = xr(t.entry, t.isDirOpen);
531
+ const r = Tr(e.entry, e.isDirOpen), n = Tr(t.entry, t.isDirOpen);
532
532
  return e.indentLevel === t.indentLevel && e.positionInSet === t.positionInSet && e.setSize === t.setSize && e.rowIndex === t.rowIndex && // 焦点の通知は行番号で行うため、番号が変われば描き直してハンドラへ新しい番号を渡す
533
- e.flatIndex === t.flatIndex && e.isSelectedForAria === t.isSelectedForAria && e.rowHeight === t.rowHeight && r === o && e.columns === t.columns && e.numericTemplate === t.numericTemplate && e.numericTotal === t.numericTotal && e.nameWidth === t.nameWidth && e.rowClassName === t.rowClassName && e.selection.selectedPath === t.selection.selectedPath && e.selection.currentPath === t.selection.currentPath && e.selection.mode === t.selection.mode && e.selection.selectedItems === t.selection.selectedItems && e.visual === t.visual;
533
+ e.flatIndex === t.flatIndex && e.isSelectedForAria === t.isSelectedForAria && e.rowHeight === t.rowHeight && r === n && e.columns === t.columns && e.numericTemplate === t.numericTemplate && e.numericTotal === t.numericTotal && e.nameWidth === t.nameWidth && e.rowClassName === t.rowClassName && e.selection.selectedPath === t.selection.selectedPath && e.selection.currentPath === t.selection.currentPath && e.selection.mode === t.selection.mode && e.selection.selectedItems === t.selection.selectedItems && e.visual === t.visual;
534
534
  }
535
535
  );
536
- Fr.displayName = "DirectoryTreeGridRow";
537
- const Mr = ({
536
+ Gr.displayName = "DirectoryTreeGridRow";
537
+ const Vr = ({
538
538
  kind: e,
539
539
  columns: t,
540
540
  numericTemplate: r,
541
- numericTotal: o,
541
+ numericTotal: n,
542
542
  nameWidth: a,
543
- scrollBarWidth: l,
544
- className: c,
545
- nameContent: i,
546
- renderCell: R
543
+ scrollBarWidth: i,
544
+ className: l,
545
+ nameContent: d,
546
+ renderCell: b
547
547
  }) => {
548
- const [, ...E] = t, g = e === "header" ? "dt-grid-name-header" : "dt-grid-name-footer", h = e === "header" ? "dt-grid-header" : "dt-grid-footer", p = e === "header" ? "columnheader" : "gridcell";
549
- return /* @__PURE__ */ u.jsxs("div", { className: O(h, "text-gray-600 dark:text-gray-300", c), role: "row", children: [
550
- /* @__PURE__ */ u.jsx("div", { className: O(g, "px-1", t[0]?.className), role: p, style: { width: a }, children: i }),
551
- E.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-track", style: Dr(o, r), children: E.map((x) => /* @__PURE__ */ u.jsx("div", { className: O("dt-grid-cell", Lr(x.align), x.className), role: p, children: R(x) }, x.key)) }) }),
552
- /* @__PURE__ */ u.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: l }, "aria-hidden": "true" })
548
+ const [, ...v] = t, w = e === "header" ? "dt-grid-name-header" : "dt-grid-name-footer", E = e === "header" ? "dt-grid-header" : "dt-grid-footer", T = e === "header" ? "columnheader" : "gridcell";
549
+ return /* @__PURE__ */ u.jsxs("div", { className: A(E, "text-gray-600 dark:text-gray-300", l), role: "row", children: [
550
+ /* @__PURE__ */ u.jsx("div", { className: A(w, "px-1", t[0]?.className), role: T, style: { width: a }, children: d }),
551
+ v.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ u.jsx("div", { className: "dt-grid-numeric-track", style: Yr(n, r), children: v.map((h) => /* @__PURE__ */ u.jsx("div", { className: A("dt-grid-cell", Br(h.align), h.className), role: T, children: b(h) }, h.key)) }) }),
552
+ /* @__PURE__ */ u.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: i }, "aria-hidden": "true" })
553
553
  ] });
554
- }, $n = ({ columns: e, className: t, ...r }) => /* @__PURE__ */ u.jsx(Mr, { kind: "header", columns: e, className: t, nameContent: e[0]?.header ?? null, renderCell: (o) => o.header ?? null, ...r }), Er = (e, t) => typeof e == "function" ? e(t) : e ?? null, Hn = ({ columns: e, allEntries: t, className: r, ...o }) => /* @__PURE__ */ u.jsx(Mr, { kind: "footer", columns: e, className: r, nameContent: Er(e[0]?.footer, t), renderCell: (a) => Er(a.footer, t), ...o }), Bn = 240, $r = 96, Hr = 12, Pt = (e, t) => {
554
+ }, Jn = ({ columns: e, className: t, ...r }) => /* @__PURE__ */ u.jsx(Vr, { kind: "header", columns: e, className: t, nameContent: e[0]?.header ?? null, renderCell: (n) => n.header ?? null, ...r }), Pr = (e, t) => typeof e == "function" ? e(t) : e ?? null, Zn = ({ columns: e, allEntries: t, className: r, ...n }) => /* @__PURE__ */ u.jsx(Vr, { kind: "footer", columns: e, className: r, nameContent: Pr(e[0]?.footer, t), renderCell: (a) => Pr(a.footer, t), ...n }), qn = 240, Xr = 96, Kr = 12, Ft = (e, t) => {
555
555
  const r = e?.width;
556
556
  return typeof r == "number" && Number.isFinite(r) && r > 0 ? r : t;
557
- }, Wn = (e) => e.slice(1).map((t) => `${Pt(t, $r)}px`).join(" "), zn = ({ measuredWidth: e, columns: t, scrollBarWidth: r = Hr }) => {
558
- const o = Pt(t[0], Bn), a = t.slice(1).reduce((R, E) => R + Pt(E, $r), 0), l = Number.isFinite(e) && e > 0 ? e : 0, c = Math.max(0, l - o - Math.max(0, r)), i = Math.max(0, a - c);
559
- return { nameWidth: o, numericTotal: a, numericVisible: c, maxHScroll: i };
560
- }, Nt = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e, Yn = (e) => {
561
- const t = [], r = (o) => {
562
- for (const a of o)
557
+ }, Qn = (e) => e.slice(1).map((t) => `${Ft(t, Xr)}px`).join(" "), eo = ({ measuredWidth: e, columns: t, scrollBarWidth: r = Kr }) => {
558
+ const n = Ft(t[0], qn), a = t.slice(1).reduce((b, v) => b + Ft(v, Xr), 0), i = Number.isFinite(e) && e > 0 ? e : 0, l = Math.max(0, i - n - Math.max(0, r)), d = Math.max(0, a - l);
559
+ return { nameWidth: n, numericTotal: a, numericVisible: l, maxHScroll: d };
560
+ }, Lt = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e, to = (e) => {
561
+ const t = [], r = (n) => {
562
+ for (const a of n)
563
563
  t.push(a), a.children && a.children.length > 0 && r(a.children);
564
564
  };
565
565
  return r(e), t;
566
- }, Br = ["entryKindDirectory", "entryKindFile"], Sr = [...ut, ...Br], jt = Object.freeze({
566
+ }, Ur = ["entryKindDirectory", "entryKindFile"], jr = [...yt, ...Ur], Mt = Object.freeze({
567
567
  en: Object.freeze({
568
568
  entryKindDirectory: "directory",
569
569
  entryKindFile: "file"
@@ -572,45 +572,45 @@ const Mr = ({
572
572
  entryKindDirectory: "ディレクトリ",
573
573
  entryKindFile: "ファイル"
574
574
  })
575
- }), Gn = Object.freeze({
576
- en: Object.freeze({ ...pr.en, ...jt.en }),
577
- ja: Object.freeze({ ...pr.ja, ...jt.ja })
578
- }), Ir = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, Vn = (e) => {
575
+ }), ro = Object.freeze({
576
+ en: Object.freeze({ ...Er.en, ...Mt.en }),
577
+ ja: Object.freeze({ ...Er.ja, ...Mt.ja })
578
+ }), _r = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, no = (e) => {
579
579
  const t = {};
580
580
  let r = !1;
581
- for (const o of ut) {
582
- const a = Object.hasOwn(e, o) ? e[o] : void 0;
583
- a !== void 0 && (t[o] = a, r = !0);
581
+ for (const n of yt) {
582
+ const a = Object.hasOwn(e, n) ? e[n] : void 0;
583
+ a !== void 0 && (t[n] = a, r = !0);
584
584
  }
585
585
  return r ? t : void 0;
586
- }, Kn = (e, t) => {
587
- const r = Pr(e);
586
+ }, oo = (e, t) => {
587
+ const r = Dr(e);
588
588
  if (t === void 0)
589
- return Gn[r];
589
+ return ro[r];
590
590
  if (t === null || typeof t != "object")
591
- throw new RangeError(`[directory-tree] labels must be an object; got ${Ir(t)}`);
592
- const o = Object.getPrototypeOf(t);
593
- if (o !== Object.prototype && o !== null)
591
+ throw new RangeError(`[directory-tree] labels must be an object; got ${_r(t)}`);
592
+ const n = Object.getPrototypeOf(t);
593
+ if (n !== Object.prototype && n !== null)
594
594
  throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(t) ? "an array" : "an object with a non-plain prototype"}`);
595
- for (const c of Object.keys(t))
596
- if (!Sr.includes(c))
597
- throw new RangeError(`[directory-tree] labels.${c} is not a known label key; expected one of ${Sr.join(", ")}`);
598
- const l = { ...nn(r, Vn(t)), ...jt[r] };
599
- for (const c of Br) {
600
- const i = Object.hasOwn(t, c) ? t[c] : void 0;
601
- if (i !== void 0) {
602
- if (typeof i != "string" || i.trim() === "")
603
- throw new RangeError(`[directory-tree] labels.${c} must be a non-blank string; got ${Ir(i)}`);
604
- l[c] = i;
595
+ for (const l of Object.keys(t))
596
+ if (!jr.includes(l))
597
+ throw new RangeError(`[directory-tree] labels.${l} is not a known label key; expected one of ${jr.join(", ")}`);
598
+ const i = { ...fn(r, no(t)), ...Mt[r] };
599
+ for (const l of Ur) {
600
+ const d = Object.hasOwn(t, l) ? t[l] : void 0;
601
+ if (d !== void 0) {
602
+ if (typeof d != "string" || d.trim() === "")
603
+ throw new RangeError(`[directory-tree] labels.${l} must be a non-blank string; got ${_r(d)}`);
604
+ i[l] = d;
605
605
  }
606
606
  }
607
- return Object.freeze(l);
608
- }, Un = (e) => {
607
+ return Object.freeze(i);
608
+ }, so = (e) => {
609
609
  const t = {};
610
- for (const r of ut)
610
+ for (const r of yt)
611
611
  t[r] = e[r];
612
612
  return Object.freeze(t);
613
- }, Xn = () => {
613
+ }, ao = () => {
614
614
  let e = null;
615
615
  return {
616
616
  mark: (t) => {
@@ -621,183 +621,212 @@ const Mr = ({
621
621
  },
622
622
  landedOn: (t) => e?.includes(t) === !0
623
623
  };
624
- }, Jn = (e, t) => {
624
+ }, et = (e) => typeof e == "string" ? JSON.stringify(e) : String(e), $t = (e, t) => {
625
+ if (typeof t != "number" || !Number.isFinite(t) || t <= 0)
626
+ throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${et(t)}.`);
627
+ return t;
628
+ }, lo = (e) => {
629
+ if (typeof e == "string" && e.trim() !== "" || typeof e == "number" && Number.isFinite(e) && e > 0)
630
+ return e;
631
+ 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 ${et(e)}.`);
632
+ }, io = ({ indentSize: e, typeIconSize: t, fontSize: r }) => ({
633
+ indentSize: e === void 0 ? Fn : $t("indentSize", e),
634
+ typeIconSize: t === void 0 ? $n : $t("typeIconSize", t),
635
+ fontSize: r === void 0 ? void 0 : lo(r)
636
+ }), co = ({ indentSize: e, removeRootIndent: t, hasExpandBox: r }) => t ? Math.max(0, e - (r ? ce : 0)) : 0, uo = (e, t, r) => {
637
+ if (typeof e != "function")
638
+ return $t("itemHeight", e);
639
+ const n = e(t, r);
640
+ if (typeof n != "number" || !Number.isFinite(n) || n <= 0)
641
+ throw new RangeError(`[directory-tree] visual.itemHeight returned ${et(n)} for ${JSON.stringify(t.absolutePath)} (row ${r}); it must return a finite number greater than 0 (px).`);
642
+ return n;
643
+ }, fo = (e, t, r) => {
644
+ const n = t === void 0 ? Mn : t;
645
+ if (typeof n != "number" || !Number.isFinite(n) || n <= 0 || n > ce)
646
+ throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${ce} (the expand box, px) while tree lines are drawn; got ${et(n)}.`);
647
+ const { indentSize: a, typeIconSize: i } = e, l = n / 2, d = ce + i - n / 2;
648
+ if (a < l || a > d)
649
+ throw new RangeError(
650
+ `[directory-tree] visual.indentSize ${et(a)} does not fit the tree lines: with typeIconSize ${i} and an expand glyph of ${n} px it must be from ${l} (half the glyph) to ${d} (the ${ce} px expand box + typeIconSize − half the glyph).`
651
+ );
652
+ return { indentSize: a, typeIconSize: i, glyphSize: n, originX: r };
653
+ }, ho = ({ indentSize: e, typeIconSize: t, glyphSize: r }) => Math.min(Math.max(ce + t / 2 - e, r / 2), ce - r / 2), mo = (e, t) => {
625
654
  const r = e.length - 1;
626
655
  if (r <= 0) return 0;
627
- let o = 0, a = r - 1, l = 0;
628
- for (; o <= a; ) {
629
- const c = o + a >>> 1;
630
- e[c] <= t ? (l = c, o = c + 1) : a = c - 1;
656
+ let n = 0, a = r - 1, i = 0;
657
+ for (; n <= a; ) {
658
+ const l = n + a >>> 1;
659
+ e[l] <= t ? (i = l, n = l + 1) : a = l - 1;
631
660
  }
632
- return l;
633
- }, Zn = (e, t, r) => {
661
+ return i;
662
+ }, po = (e, t, r) => {
634
663
  if (r <= 0 || e.length === 0 || t.length !== e.length + 1)
635
664
  return null;
636
- const o = Jn(t, r), a = e[o];
665
+ const n = mo(t, r), a = e[n];
637
666
  return a ? {
638
667
  path: a.entry.absolutePath,
639
- offsetInViewport: r - t[o]
668
+ offsetInViewport: r - t[n]
640
669
  } : null;
641
- }, qn = (e, t, r) => {
670
+ }, yo = (e, t, r) => {
642
671
  if (t.length === 0 || r.length !== t.length + 1)
643
672
  return null;
644
- for (let o = 0; o < t.length; o++)
645
- if (t[o].entry.absolutePath === e.path)
646
- return Math.max(0, r[o] + e.offsetInViewport);
673
+ for (let n = 0; n < t.length; n++)
674
+ if (t[n].entry.absolutePath === e.path)
675
+ return Math.max(0, r[n] + e.offsetInViewport);
647
676
  return null;
648
- }, Qn = (e, t, r) => {
649
- const o = [];
677
+ }, go = (e, t, r) => {
678
+ const n = [];
650
679
  for (let a = t; a < r; a++) {
651
- const l = e[a];
652
- if (!(!l || l.length === 0))
653
- for (const c of l)
654
- o.push(c);
680
+ const i = e[a];
681
+ if (!(!i || i.length === 0))
682
+ for (const l of i)
683
+ n.push(l);
655
684
  }
656
- return o;
657
- }, eo = (e, t, r) => {
658
- const o = [];
685
+ return n;
686
+ }, bo = (e, t, r) => {
687
+ const n = [];
659
688
  for (let a = t; a < r; a++) {
660
- const l = e[a];
661
- if (!(!l || l.length === 0))
662
- for (const c of l)
663
- o.push(c);
689
+ const i = e[a];
690
+ if (!(!i || i.length === 0))
691
+ for (const l of i)
692
+ n.push(l);
664
693
  }
665
- return o;
666
- }, to = (e, t, r, o) => {
667
- const a = Math.max(1, Math.floor(t * o)), l = Math.max(1, Math.floor(r * o));
668
- (e.width !== a || e.height !== l) && (e.width = a, e.height = l);
669
- const c = e.style;
670
- c.width !== `${t}px` && (c.width = `${t}px`), c.height !== `${r}px` && (c.height = `${r}px`);
671
- }, ro = (e, t, r) => {
694
+ return n;
695
+ }, vo = (e, t, r, n) => {
696
+ const a = Math.max(1, Math.floor(t * n)), i = Math.max(1, Math.floor(r * n));
697
+ (e.width !== a || e.height !== i) && (e.width = a, e.height = i);
698
+ const l = e.style;
699
+ l.width !== `${t}px` && (l.width = `${t}px`), l.height !== `${r}px` && (l.height = `${r}px`);
700
+ }, wo = (e, t, r) => {
672
701
  e.lineWidth = r, e.beginPath();
673
- for (const o of t)
674
- e.moveTo(o.x1, o.y1), e.lineTo(o.x2, o.y2);
702
+ for (const n of t)
703
+ e.moveTo(n.x1, n.y1), e.lineTo(n.x2, n.y2);
675
704
  e.stroke();
676
- }, no = (e, t) => {
705
+ }, xo = (e, t) => {
677
706
  const r = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());
678
707
  if (!r)
679
708
  return null;
680
- let o = r[1];
681
- o.length === 3 && (o = o.split("").map((i) => i + i).join(""));
682
- const a = Number.parseInt(o.slice(0, 2), 16), l = Number.parseInt(o.slice(2, 4), 16), c = Number.parseInt(o.slice(4, 6), 16);
683
- return `rgba(${a}, ${l}, ${c}, ${t})`;
684
- }, oo = (e, t, r, o) => {
709
+ let n = r[1];
710
+ n.length === 3 && (n = n.split("").map((d) => d + d).join(""));
711
+ const a = Number.parseInt(n.slice(0, 2), 16), i = Number.parseInt(n.slice(2, 4), 16), l = Number.parseInt(n.slice(4, 6), 16);
712
+ return `rgba(${a}, ${i}, ${l}, ${t})`;
713
+ }, So = (e, t, r, n) => {
685
714
  if (t.length === 0)
686
715
  return;
687
- const a = no(r, 0.14), l = e.strokeStyle, c = e.fillStyle, i = e.lineWidth, R = e.lineCap, E = e.lineJoin;
716
+ const a = xo(r, 0.14), i = e.strokeStyle, l = e.fillStyle, d = e.lineWidth, b = e.lineCap, v = e.lineJoin;
688
717
  e.strokeStyle = r, e.lineCap = "round", e.lineJoin = "round";
689
- for (const g of t) {
690
- const h = o ?? g.size, p = Math.max(0, h / 2), x = Math.max(1, Math.round(h * 0.08)), N = Math.max(1, Math.round(h * 0.14)), f = Math.max(0, p - x * 0.8), w = Math.max(0, f * 0.55);
691
- a && (e.fillStyle = a, e.beginPath(), e.arc(g.centerX, g.centerY, f, 0, Math.PI * 2), e.fill()), e.lineWidth = x, e.beginPath(), e.arc(g.centerX, g.centerY, Math.max(0, p - x * 0.3), 0, Math.PI * 2), e.stroke(), e.lineWidth = N, e.beginPath(), e.moveTo(g.centerX - w, g.centerY), e.lineTo(g.centerX + w, g.centerY), e.stroke(), g.isExpanded || (e.beginPath(), e.moveTo(g.centerX, g.centerY - w), e.lineTo(g.centerX, g.centerY + w), e.stroke());
718
+ for (const w of t) {
719
+ const E = n ?? w.size, T = Math.max(0, E / 2), h = Math.max(1, Math.round(E * 0.08)), g = Math.max(1, Math.round(E * 0.14)), m = Math.max(0, T - h * 0.8), y = Math.max(0, m * 0.55);
720
+ a && (e.fillStyle = a, e.beginPath(), e.arc(w.centerX, w.centerY, m, 0, Math.PI * 2), e.fill()), e.lineWidth = h, e.beginPath(), e.arc(w.centerX, w.centerY, Math.max(0, T - h * 0.3), 0, Math.PI * 2), e.stroke(), e.lineWidth = g, e.beginPath(), e.moveTo(w.centerX - y, w.centerY), e.lineTo(w.centerX + y, w.centerY), e.stroke(), w.isExpanded || (e.beginPath(), e.moveTo(w.centerX, w.centerY - y), e.lineTo(w.centerX, w.centerY + y), e.stroke());
692
721
  }
693
- e.strokeStyle = l, e.fillStyle = c, e.lineWidth = i, e.lineCap = R, e.lineJoin = E;
694
- }, Wr = _t(({ segmentsByItem: e, glyphsByItem: t, itemHeight: r, width: o, viewportHeight: a, scrollPosition: l, color: c = "#a0aec0", strokeWidth: i = 1, renderStartIndex: R, renderEndIndex: E, lookaheadEndIndex: g, devicePixelRatio: h, expandGlyphColor: p, expandGlyphSize: x }) => {
695
- const N = V(null), f = V(null), w = V({
722
+ e.strokeStyle = i, e.fillStyle = l, e.lineWidth = d, e.lineCap = b, e.lineJoin = v;
723
+ }, Jr = zt(({ segmentsByItem: e, glyphsByItem: t, itemHeight: r, width: n, viewportHeight: a, scrollPosition: i, color: l = "#a0aec0", strokeWidth: d = 1, renderStartIndex: b, renderEndIndex: v, lookaheadEndIndex: w, devicePixelRatio: E, expandGlyphColor: T, expandGlyphSize: h }) => {
724
+ const g = U(null), m = U(null), y = U({
696
725
  segmentsByItem: e,
697
726
  glyphsByItem: t,
698
727
  itemHeight: r,
699
- width: o,
728
+ width: n,
700
729
  viewportHeight: a,
701
- scrollPosition: l,
702
- color: c,
703
- strokeWidth: i,
704
- renderStartIndex: R,
705
- renderEndIndex: E,
706
- lookaheadEndIndex: g,
707
- devicePixelRatio: h,
708
- expandGlyphColor: p,
709
- expandGlyphSize: x
710
- }), S = j(() => {
711
- f.current = null;
712
- const I = N.current;
713
- if (!I)
730
+ scrollPosition: i,
731
+ color: l,
732
+ strokeWidth: d,
733
+ renderStartIndex: b,
734
+ renderEndIndex: v,
735
+ lookaheadEndIndex: w,
736
+ devicePixelRatio: E,
737
+ expandGlyphColor: T,
738
+ expandGlyphSize: h
739
+ }), x = j(() => {
740
+ m.current = null;
741
+ const P = g.current;
742
+ if (!P)
714
743
  return;
715
- const T = I.getContext("2d");
716
- if (!T)
744
+ const _ = P.getContext("2d");
745
+ if (!_)
717
746
  return;
718
- const y = w.current;
719
- if (y.width <= 0 || y.viewportHeight <= 0) {
720
- T.clearRect(0, 0, I.width, I.height);
747
+ const p = y.current;
748
+ if (p.width <= 0 || p.viewportHeight <= 0) {
749
+ _.clearRect(0, 0, P.width, P.height);
721
750
  return;
722
751
  }
723
- const K = Number.isFinite(y.devicePixelRatio ?? NaN) ? y.devicePixelRatio : typeof window < "u" && window.devicePixelRatio || 1;
724
- to(I, y.width, y.viewportHeight, K);
725
- const U = y.segmentsByItem.length, P = typeof y.renderStartIndex == "number" && Number.isFinite(y.renderStartIndex) ? Math.max(0, Math.floor(y.renderStartIndex)) : Math.max(0, Math.floor(y.scrollPosition / y.itemHeight)), _ = Math.min(U, Math.ceil((y.scrollPosition + y.viewportHeight) / y.itemHeight)), te = (() => {
726
- if (typeof y.renderEndIndex == "number" && Number.isFinite(y.renderEndIndex)) {
727
- const re = Math.floor(y.renderEndIndex);
728
- return Math.max(Math.min(U, re + 1), P);
752
+ const M = Number.isFinite(p.devicePixelRatio ?? NaN) ? p.devicePixelRatio : typeof window < "u" && window.devicePixelRatio || 1;
753
+ vo(P, p.width, p.viewportHeight, M);
754
+ const D = p.segmentsByItem.length, C = typeof p.renderStartIndex == "number" && Number.isFinite(p.renderStartIndex) ? Math.max(0, Math.floor(p.renderStartIndex)) : Math.max(0, Math.floor(p.scrollPosition / p.itemHeight)), q = Math.min(D, Math.ceil((p.scrollPosition + p.viewportHeight) / p.itemHeight)), ee = (() => {
755
+ if (typeof p.renderEndIndex == "number" && Number.isFinite(p.renderEndIndex)) {
756
+ const J = Math.floor(p.renderEndIndex);
757
+ return Math.max(Math.min(D, J + 1), C);
729
758
  }
730
- return Math.max(_, P);
731
- })(), $ = (() => {
732
- if (typeof y.lookaheadEndIndex == "number" && Number.isFinite(y.lookaheadEndIndex)) {
733
- const re = Math.floor(y.lookaheadEndIndex), ae = Math.min(U, re + 1);
734
- return Math.max(ae, te);
759
+ return Math.max(q, C);
760
+ })(), W = (() => {
761
+ if (typeof p.lookaheadEndIndex == "number" && Number.isFinite(p.lookaheadEndIndex)) {
762
+ const J = Math.floor(p.lookaheadEndIndex), se = Math.min(D, J + 1);
763
+ return Math.max(se, ee);
735
764
  }
736
- return Math.max(_, te);
737
- })(), F = Qn(y.segmentsByItem, P, $), X = eo(y.glyphsByItem, P, $);
738
- T.save(), T.scale(K, K), T.clearRect(0, 0, y.width, y.viewportHeight), T.translate(0, -y.scrollPosition), T.strokeStyle = y.color, ro(T, F, y.strokeWidth), oo(T, X, y.expandGlyphColor ?? y.color, y.expandGlyphSize), T.restore();
739
- }, []), M = j(() => {
740
- f.current === null && (f.current = window.requestAnimationFrame(S));
741
- }, [S]);
742
- return Se(() => {
743
- w.current = {
765
+ return Math.max(q, ee);
766
+ })(), G = go(p.segmentsByItem, C, W), de = bo(p.glyphsByItem, C, W);
767
+ _.save(), _.scale(M, M), _.clearRect(0, 0, p.width, p.viewportHeight), _.translate(0, -p.scrollPosition), _.strokeStyle = p.color, wo(_, G, p.strokeWidth), So(_, de, p.expandGlyphColor ?? p.color, p.expandGlyphSize), _.restore();
768
+ }, []), $ = j(() => {
769
+ m.current === null && (m.current = window.requestAnimationFrame(x));
770
+ }, [x]);
771
+ return Pe(() => {
772
+ y.current = {
744
773
  segmentsByItem: e,
745
774
  glyphsByItem: t,
746
775
  itemHeight: r,
747
- width: o,
776
+ width: n,
748
777
  viewportHeight: a,
749
- scrollPosition: l,
750
- color: c,
751
- strokeWidth: i,
752
- renderStartIndex: R,
753
- renderEndIndex: E,
754
- lookaheadEndIndex: g,
755
- devicePixelRatio: h,
756
- expandGlyphColor: p,
757
- expandGlyphSize: x
758
- }, M();
759
- }, [e, t, r, o, a, l, c, i, R, E, g, h, p, x, M]), Se(() => () => {
760
- f.current !== null && (window.cancelAnimationFrame(f.current), f.current = null);
761
- }, []), /* @__PURE__ */ u.jsx("canvas", { ref: N, className: "pointer-events-none absolute top-0 left-0 z-0" });
778
+ scrollPosition: i,
779
+ color: l,
780
+ strokeWidth: d,
781
+ renderStartIndex: b,
782
+ renderEndIndex: v,
783
+ lookaheadEndIndex: w,
784
+ devicePixelRatio: E,
785
+ expandGlyphColor: T,
786
+ expandGlyphSize: h
787
+ }, $();
788
+ }, [e, t, r, n, a, i, l, d, b, v, w, E, T, h, $]), Pe(() => () => {
789
+ m.current !== null && (window.cancelAnimationFrame(m.current), m.current = null);
790
+ }, []), /* @__PURE__ */ u.jsx("canvas", { ref: g, className: "pointer-events-none absolute top-0 left-0 z-0" });
762
791
  });
763
- Wr.displayName = "TreeLineCanvas";
764
- const so = (e) => {
792
+ Jr.displayName = "TreeLineCanvas";
793
+ const Eo = (e) => {
765
794
  const t = /* @__PURE__ */ new Map();
766
795
  for (let r = 0; r < e.length; r++) {
767
- const o = e[r].entry.absolutePath;
768
- t.has(o) || t.set(o, r);
796
+ const n = e[r].entry.absolutePath;
797
+ t.has(n) || t.set(n, r);
769
798
  }
770
799
  return t;
771
- }, Rr = (e, t) => e.selectedPath === t ? e : { selectedPath: t, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, ao = (e, t) => ({ ...e, anchor: { path: t, selectionGeneration: e.selectionGeneration, focused: !0 } }), lo = (e, t) => {
772
- const { anchor: r, selectionGeneration: o, selectedPath: a } = t;
773
- if (r !== null && (r.focused || r.selectionGeneration === o)) {
774
- const l = e.get(r.path);
775
- if (l !== void 0)
776
- return l;
800
+ }, Cr = (e, t) => e.selectedPath === t ? e : { selectedPath: t, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, Io = (e, t) => ({ ...e, anchor: { path: t, selectionGeneration: e.selectionGeneration, focused: !0 } }), Ro = (e, t) => {
801
+ const { anchor: r, selectionGeneration: n, selectedPath: a } = t;
802
+ if (r !== null && (r.focused || r.selectionGeneration === n)) {
803
+ const i = e.get(r.path);
804
+ if (i !== void 0)
805
+ return i;
777
806
  }
778
807
  if (a !== null) {
779
- const l = e.get(a);
780
- if (l !== void 0)
781
- return l;
808
+ const i = e.get(a);
809
+ if (i !== void 0)
810
+ return i;
782
811
  }
783
812
  return 0;
784
- }, co = {
813
+ }, ko = {
785
814
  msOverflowStyle: "none",
786
815
  scrollbarWidth: "none"
787
- }, io = () => {
816
+ }, No = () => {
788
817
  let e = document.getElementById("directory-tree-webkit-scrollbar-hide");
789
818
  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));
790
- }, uo = (e) => {
791
- const t = V(null), r = t.current;
792
- return r !== null && ut.every((o) => r[o] === e[o]) ? r : (t.current = e, e);
793
- }, kr = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), Nr = (e) => {
819
+ }, To = (e) => {
820
+ const t = U(null), r = t.current;
821
+ return r !== null && yt.every((n) => r[n] === e[n]) ? r : (t.current = e, e);
822
+ }, Or = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), Ar = (e) => {
794
823
  const t = e?.align;
795
824
  if (t === void 0)
796
825
  return "top";
797
- if (!kr.has(t))
798
- throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[...kr].join(", ")}.`);
826
+ if (!Or.has(t))
827
+ throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[...Or].join(", ")}.`);
799
828
  return t;
800
- }, fo = {
829
+ }, Po = {
801
830
  position: "absolute",
802
831
  width: 1,
803
832
  height: 1,
@@ -807,234 +836,232 @@ const so = (e) => {
807
836
  overflow: "hidden",
808
837
  clipPath: "inset(50%)",
809
838
  whiteSpace: "nowrap"
810
- }, ho = (e, t, r, o, a) => {
811
- const l = [], c = [];
812
- let i = 0;
813
- const R = (E, g, h) => {
814
- const p = a ? [...E].sort(a) : E;
815
- for (let x = 0; x < p.length; x++) {
816
- const N = p[x], f = x === p.length - 1, w = [...h, f], S = N.children !== void 0, M = S && t(N.absolutePath, N.relativePath);
817
- let I = g, T = w, y = h;
818
- o && (I = g - 1, T = w.slice(1), y = h.slice(1)), l.push({ entry: N, indentLevel: I, depth: g, positionInSet: x + 1, setSize: p.length, parentIsLast: T }), r && (I > i && (i = I), c.push({
819
- id: N.absolutePath,
820
- name: N.name,
821
- absolutePath: N.absolutePath,
822
- indentLevel: I,
823
- isLastChild: f,
824
- isDirectory: S,
825
- isExpanded: M,
826
- ancestorIsLast: [...y],
827
- hideLines: o && g === 0
828
- })), S && M && N.children && R(N.children, g + 1, w);
839
+ }, jo = (e, t, r, n, a) => {
840
+ const i = [], l = [];
841
+ let d = 0;
842
+ const b = (v, w, E) => {
843
+ const T = a ? [...v].sort(a) : v;
844
+ for (let h = 0; h < T.length; h++) {
845
+ const g = T[h], m = h === T.length - 1, y = [...E, m], x = g.children !== void 0, $ = x && t(g.absolutePath, g.relativePath);
846
+ let P = w, _ = y, p = E;
847
+ n && (P = w - 1, _ = y.slice(1), p = E.slice(1)), i.push({ entry: g, indentLevel: P, depth: w, positionInSet: h + 1, setSize: T.length, parentIsLast: _ }), r && (P > d && (d = P), l.push({
848
+ id: g.absolutePath,
849
+ name: g.name,
850
+ absolutePath: g.absolutePath,
851
+ indentLevel: P,
852
+ isLastChild: m,
853
+ isDirectory: x,
854
+ isExpanded: $,
855
+ ancestorIsLast: [...p],
856
+ hideLines: n && w === 0
857
+ })), x && $ && g.children && b(g.children, w + 1, y);
829
858
  }
830
859
  };
831
- return R(e, 0, []), { flatItems: l, lineItems: c, maxIndent: i };
832
- }, Tr = (e, t) => {
860
+ return b(e, 0, []), { flatItems: i, lineItems: l, maxIndent: d };
861
+ }, Lr = (e, t) => {
833
862
  const r = e.length - 1;
834
863
  if (r <= 0) return 0;
835
- let o = 0, a = r - 1, l = 0;
836
- for (; o <= a; ) {
837
- const c = o + a >>> 1;
838
- e[c] <= t ? (l = c, o = c + 1) : a = c - 1;
864
+ let n = 0, a = r - 1, i = 0;
865
+ for (; n <= a; ) {
866
+ const l = n + a >>> 1;
867
+ e[l] <= t ? (i = l, n = l + 1) : a = l - 1;
839
868
  }
840
- return l;
841
- }, mo = (e, t, r, o, a, l) => {
842
- const c = o?.renderStart ?? Math.max(0, Tr(l, a)), i = t > 0 ? Tr(l, a + t) + r : c + r, R = e > 0 ? Math.min(e - 1, Math.max(c, i)) : c, E = o?.renderEnd ?? R, g = e > 0 ? Math.min(e - 1, E + r) : E;
843
- return { renderStart: c, renderEnd: E, lookaheadEnd: g };
844
- }, po = (e, t, r, o, a, l) => {
869
+ return i;
870
+ }, _o = (e, t, r, n, a, i) => {
871
+ const l = n?.renderStart ?? Math.max(0, Lr(i, a)), d = t > 0 ? Lr(i, a + t) + r : l + r, b = e > 0 ? Math.min(e - 1, Math.max(l, d)) : l, v = n?.renderEnd ?? b, w = e > 0 ? Math.min(e - 1, v + r) : v;
872
+ return { renderStart: l, renderEnd: v, lookaheadEnd: w };
873
+ }, Co = (e, t, r, n) => {
845
874
  if (e.length === 0)
846
875
  return { segmentsByItem: [], glyphsByItem: [] };
847
- const c = Array.from({ length: e.length }, () => []), i = Array.from({ length: e.length }, () => []), R = (h) => a ? typeof l == "number" && Number.isFinite(l) && l > 0 ? l : Math.max(8, Math.min(o * 0.9, h * 0.7)) : 0, E = 3, g = (h) => h * o + o / 2 + E;
876
+ const { indentSize: a, typeIconSize: i, glyphSize: l, originX: d } = n, b = Array.from({ length: e.length }, () => []), v = Array.from({ length: e.length }, () => []), w = d + ho(n), E = (h) => h * a + w, T = l / 2 + 2;
848
877
  for (let h = 0; h < e.length; h++) {
849
- const p = e[h], x = t[h] ?? 0, N = r[h] ?? 0, f = N + x / 2, w = e[h + 1], S = f + Ct / 2, M = N + x, I = w !== void 0 && w.indentLevel === p.indentLevel + 1 && S < M ? { key: `${p.id}-connector-children`, x1: g(w.indentLevel), y1: S, x2: g(w.indentLevel), y2: M, itemIndex: h } : null;
850
- if (p.hideLines) {
851
- I !== null && (c[h] = [I]);
878
+ const g = e[h], m = t[h] ?? 0, y = r[h] ?? 0, x = y + m / 2, $ = e[h + 1], P = x + i / 2, _ = y + m, p = $ !== void 0 && $.indentLevel === g.indentLevel + 1 && P < _ ? { key: `${g.id}-connector-children`, x1: E($.indentLevel), y1: P, x2: E($.indentLevel), y2: _, itemIndex: h } : null;
879
+ if (g.hideLines) {
880
+ p !== null && (b[h] = [p]);
852
881
  continue;
853
882
  }
854
- const T = [], y = R(x), K = y > 0 ? y / 2 + 2 : o / 1.5;
855
- for (let _ = 0; _ < p.indentLevel; _++) {
856
- if (p.ancestorIsLast[_] ?? !1)
883
+ const M = [];
884
+ for (let C = 0; C < g.indentLevel; C++) {
885
+ if (g.ancestorIsLast[C] ?? !1)
857
886
  continue;
858
- let $ = !1;
859
- for (let F = h; F < e.length; F++) {
860
- const X = e[F];
861
- if (X.indentLevel > _ && X.ancestorIsLast.length > _ && !X.ancestorIsLast[_]) {
862
- $ = !0;
887
+ let ee = !1;
888
+ for (let W = h; W < e.length; W++) {
889
+ const G = e[W];
890
+ if (G.indentLevel > C && G.ancestorIsLast.length > C && !G.ancestorIsLast[C]) {
891
+ ee = !0;
863
892
  break;
864
893
  }
865
- if (F > h && X.indentLevel === _)
894
+ if (W > h && G.indentLevel === C)
866
895
  break;
867
896
  }
868
- if ($) {
869
- const F = g(_);
870
- T.push({
871
- key: `${p.id}-ancestor-${_}`,
872
- x1: F,
873
- y1: N,
874
- x2: F,
875
- y2: N + x,
897
+ if (ee) {
898
+ const W = E(C);
899
+ M.push({
900
+ key: `${g.id}-ancestor-${C}`,
901
+ x1: W,
902
+ y1: y,
903
+ x2: W,
904
+ y2: y + m,
876
905
  itemIndex: h
877
906
  });
878
907
  }
879
908
  }
880
- const U = p.indentLevel * o, P = g(p.indentLevel);
881
- if (h > 0 && T.push({
882
- key: `${p.id}-connector-top`,
883
- x1: P,
884
- y1: N,
885
- x2: P,
886
- y2: p.isDirectory ? f - K : f,
909
+ const D = E(g.indentLevel);
910
+ h > 0 && M.push({
911
+ key: `${g.id}-connector-top`,
912
+ x1: D,
913
+ y1: y,
914
+ x2: D,
915
+ y2: g.isDirectory ? x - T : x,
887
916
  itemIndex: h
888
- }), !p.isDirectory && p.isLastChild && T.push({
889
- key: `${p.id}-connector-horizontal`,
890
- x1: P,
891
- y1: f,
892
- x2: U + o + E,
893
- y2: f,
917
+ }), !g.isDirectory && g.isLastChild && M.push({
918
+ key: `${g.id}-connector-horizontal`,
919
+ x1: D,
920
+ y1: x,
921
+ x2: d + g.indentLevel * a + ce,
922
+ y2: x,
894
923
  itemIndex: h
895
- }), p.isLastChild || (p.isDirectory ? T.push({
896
- key: `${p.id}-connector-bottom`,
897
- x1: P,
898
- y1: f + K,
899
- x2: P,
900
- y2: N + x,
924
+ }), g.isLastChild || (g.isDirectory ? M.push({
925
+ key: `${g.id}-connector-bottom`,
926
+ x1: D,
927
+ y1: x + T,
928
+ x2: D,
929
+ y2: y + m,
901
930
  itemIndex: h
902
- }) : T.push({
903
- key: `${p.id}-connector-bottom`,
904
- x1: P,
905
- y1: f,
906
- x2: P,
907
- y2: N + x,
931
+ }) : M.push({
932
+ key: `${g.id}-connector-bottom`,
933
+ x1: D,
934
+ y1: x,
935
+ x2: D,
936
+ y2: y + m,
908
937
  itemIndex: h
909
- })), I !== null && T.push(I), c[h] = T, a && p.isDirectory) {
910
- const _ = y, te = P, $ = f;
911
- i[h] = [
912
- {
913
- key: `${p.id}-glyph`,
914
- itemIndex: h,
915
- centerX: te,
916
- centerY: $,
917
- size: _,
918
- isExpanded: p.isExpanded
919
- }
920
- ];
921
- }
938
+ })), p !== null && M.push(p), b[h] = M, g.isDirectory && (v[h] = [
939
+ {
940
+ key: `${g.id}-glyph`,
941
+ itemIndex: h,
942
+ centerX: D,
943
+ centerY: x,
944
+ size: l,
945
+ isExpanded: g.isExpanded
946
+ }
947
+ ]);
922
948
  }
923
- return { segmentsByItem: c, glyphsByItem: i };
924
- }, Ot = _t(
949
+ return { segmentsByItem: b, glyphsByItem: v };
950
+ }, Wt = zt(
925
951
  ({
926
952
  entry: e,
927
953
  indentLevel: t,
928
- depth: r,
929
- positionInSet: o,
930
- setSize: a,
954
+ originX: r,
955
+ depth: n,
956
+ positionInSet: a,
957
+ setSize: i,
931
958
  isSelectedForAria: l,
932
- flatIndex: c,
933
- isActive: i,
934
- registerRowRef: R,
935
- onNavigationKeyDown: E,
936
- onRowFocus: g,
937
- onRowBlur: h,
938
- rowHeight: p,
939
- entryKindDirectory: x,
940
- entryKindFile: N,
941
- isDirOpen: f,
942
- parentIsLast: w,
943
- renderChildren: S = !0,
944
- expansion: { toggleDirectory: M, onToggleDirectoryRecursive: I },
945
- selection: { onEntryClick: T, selectedPath: y, currentPath: K, mode: U = "none", selectedItems: P, onSelectionChange: _ },
959
+ flatIndex: d,
960
+ isActive: b,
961
+ registerRowRef: v,
962
+ onNavigationKeyDown: w,
963
+ onRowFocus: E,
964
+ onRowBlur: T,
965
+ rowHeight: h,
966
+ entryKindDirectory: g,
967
+ entryKindFile: m,
968
+ isDirOpen: y,
969
+ parentIsLast: x,
970
+ renderChildren: $ = !0,
971
+ expansion: { toggleDirectory: P, onToggleDirectoryRecursive: _ },
972
+ selection: { onEntryClick: p, selectedPath: M, currentPath: D, mode: C = "none", selectedItems: q, onSelectionChange: ee },
946
973
  visual: {
947
- iconOverrides: te,
948
- showExpandIcons: $ = !0,
949
- showDirectoryIcons: F = !0,
950
- showFileIcons: X = !0,
951
- useCanvasExpandIcons: re = !1,
952
- expandIconSize: ae,
953
- typeIconSize: J = Ct,
954
- fontSize: de,
955
- indentSize: me = dt,
956
- highlightStyles: W,
957
- entryClassName: le,
958
- entryStyle: n,
959
- nameClassName: b,
960
- nameStyle: m,
961
- directoryNameClassName: C,
962
- directoryNameStyle: H,
963
- fileNameClassName: pe,
964
- fileNameStyle: A,
965
- expandIconClassName: ne,
966
- expandIconStyle: ye
974
+ iconOverrides: W,
975
+ showExpandIcons: G = !0,
976
+ showDirectoryIcons: de = !0,
977
+ showFileIcons: J = !0,
978
+ useCanvasExpandIcons: se = !1,
979
+ expandIconSize: pe,
980
+ typeIconSize: V,
981
+ fontSize: ye,
982
+ indentSize: ge,
983
+ highlightStyles: X,
984
+ entryClassName: o,
985
+ entryStyle: f,
986
+ nameClassName: R,
987
+ nameStyle: I,
988
+ directoryNameClassName: fe,
989
+ directoryNameStyle: N,
990
+ fileNameClassName: O,
991
+ fileNameStyle: te,
992
+ expandIconClassName: he,
993
+ expandIconStyle: Ee
967
994
  }
968
995
  }) => {
969
- const [ue, _e] = ie(null), [Ie, se] = ie(!1), L = e.children !== void 0, fe = L && f(e.absolutePath), Q = e.absolutePath === y, Re = e.absolutePath === K, z = !L && P?.has(e.absolutePath), Ce = j((Y) => R(c, Y), [R, c]), ke = L ? void 0 : jr(e);
970
- Se(() => {
971
- _e(fe && e.children ? e.children : null);
972
- }, [fe, e.children]);
973
- const Ne = Or({ entry: e, isDirectory: L, isExpanded: fe, isItemSelected: !!z, selectionMode: U, onSelectionChange: _, onEntryClick: T, toggleDirectory: M, onToggleDirectoryRecursive: I }), Z = Ie ? W?.hoverClassName !== void 0 ? W.hoverClassName : D.entryHover : "", $e = (() => {
996
+ const [be, Le] = ie(null), [Ie, je] = ie(!1), L = e.children !== void 0, z = L && y(e.absolutePath), H = e.absolutePath === M, _e = e.absolutePath === D, ne = !L && q?.has(e.absolutePath), Re = j((K) => v(d, K), [v, d]), De = L ? void 0 : Mr(e);
997
+ Pe(() => {
998
+ Le(z && e.children ? e.children : null);
999
+ }, [z, e.children]);
1000
+ const ve = Wr({ entry: e, isDirectory: L, isExpanded: z, isItemSelected: !!ne, selectionMode: C, onSelectionChange: ee, onEntryClick: p, toggleDirectory: P, onToggleDirectoryRecursive: _ }), Z = Ie ? X?.hoverClassName !== void 0 ? X.hoverClassName : F.entryHover : "", Ye = (() => {
974
1001
  if (L) {
975
- if (Q)
976
- return W?.directorySelectedClassName !== void 0 ? W.directorySelectedClassName : D.entrySelected;
977
- } else if (Q || z)
978
- return W?.itemSelectedClassName !== void 0 ? W.itemSelectedClassName : O(Q && D.entrySelected, z && D.entryItemSelected);
1002
+ if (H)
1003
+ return X?.directorySelectedClassName !== void 0 ? X.directorySelectedClassName : F.entrySelected;
1004
+ } else if (H || ne)
1005
+ return X?.itemSelectedClassName !== void 0 ? X.itemSelectedClassName : A(H && F.entrySelected, ne && F.entryItemSelected);
979
1006
  return "";
980
- })(), He = O(D.entry, Z, $e, le, e.className), Ke = O(D.expandIcon, ne, (Q || z) && D.expandIconSelected), ft = O(D.typeIcon, (Q || z) && D.typeIconSelected), Ae = O(D.name, b, L && D.nameDirectory, L && C, !L && pe, (Q || z) && D.nameSelected), Ue = _r({ isDirectory: L, isExpanded: fe, showExpandIcons: $, useCanvasExpandIcons: re, expandIconSize: ae }), Xe = (L ? F : X) ? Cr({ entry: e, isDirectory: L, isExpanded: fe, isSelected: Q, isItemSelected: !!z, extension: ke, mimeType: e.mimeType }, te) : null, Je = {
981
- ...Ie ? W?.hoverStyle : {},
982
- ...L && Q ? W?.directorySelectedStyle : {},
983
- ...!L && (Q || z) ? W?.itemSelectedStyle : {}
984
- }, Ze = Ar(e.data), qe = { width: J, height: J }, Be = de ? { fontSize: typeof de == "number" ? `${de}px` : de } : void 0;
985
- return /* @__PURE__ */ u.jsxs(tn, { children: [
1007
+ })(), tt = A(F.entry, Z, Ye, o, e.className), gt = A(F.expandIcon, he, (H || ne) && F.expandIconSelected), Ge = A(F.typeIcon, (H || ne) && F.typeIconSelected), Ve = A(F.name, R, L && F.nameDirectory, L && fe, !L && O, (H || ne) && F.nameSelected), rt = $r({ isDirectory: L, isExpanded: z, showExpandIcons: G && t >= 0, useCanvasExpandIcons: se, expandIconSize: pe }), bt = (L ? de : J) ? zr({ entry: e, isDirectory: L, isExpanded: z, isSelected: H, isItemSelected: !!ne, extension: De, mimeType: e.mimeType }, W, V) : null, Fe = {
1008
+ ...Ie ? X?.hoverStyle : {},
1009
+ ...L && H ? X?.directorySelectedStyle : {},
1010
+ ...!L && (H || ne) ? X?.itemSelectedStyle : {}
1011
+ }, nt = Hr(e.data), ot = { width: V, height: V }, Xe = Fr(ye), ke = r + t * ge;
1012
+ return /* @__PURE__ */ u.jsxs(dn, { children: [
986
1013
  /* @__PURE__ */ u.jsxs(
987
1014
  "div",
988
1015
  {
989
- className: He,
1016
+ className: tt,
990
1017
  style: {
991
- paddingLeft: `${Math.max(0, t * me)}px`,
992
- transform: t < 0 ? `translateX(${t * me}px)` : void 0,
993
- width: t < 0 ? `calc(100% + ${Math.abs(t * me)}px)` : void 0,
994
- height: `${p}px`,
995
- ...Be,
996
- ...Je,
997
- ...n,
1018
+ paddingLeft: `${Math.max(0, ke)}px`,
1019
+ transform: ke < 0 ? `translateX(${ke}px)` : void 0,
1020
+ width: ke < 0 ? `calc(100% + ${-ke}px)` : void 0,
1021
+ height: `${h}px`,
1022
+ ...Xe,
1023
+ ...Fe,
1024
+ ...f,
998
1025
  ...e.style
999
1026
  },
1000
- ...Ze,
1027
+ ...nt,
1001
1028
  "data-entry-type": L ? "directory" : "file",
1002
- "data-entry-expanded": L ? String(fe) : void 0,
1003
- "data-entry-selected": Q ? "true" : void 0,
1004
- "data-entry-item-selected": z ? "true" : void 0,
1005
- onClick: Ne,
1006
- onMouseEnter: () => se(!0),
1007
- onMouseLeave: () => se(!1),
1008
- onFocus: (Y) => g(c, e.absolutePath, Y.currentTarget),
1009
- onBlur: (Y) => h(e.absolutePath, Y.currentTarget),
1010
- ref: Ce,
1011
- onKeyDown: (Y) => {
1012
- if (Y.key === "Enter" || Y.key === " ") {
1013
- Y.preventDefault(), Y.repeat || Ne(Y);
1029
+ "data-entry-expanded": L ? String(z) : void 0,
1030
+ "data-entry-selected": H ? "true" : void 0,
1031
+ "data-entry-item-selected": ne ? "true" : void 0,
1032
+ onClick: ve,
1033
+ onMouseEnter: () => je(!0),
1034
+ onMouseLeave: () => je(!1),
1035
+ onFocus: (K) => E(d, e.absolutePath, K.currentTarget),
1036
+ onBlur: (K) => T(e.absolutePath, K.currentTarget),
1037
+ ref: Re,
1038
+ onKeyDown: (K) => {
1039
+ if (K.key === "Enter" || K.key === " ") {
1040
+ K.preventDefault(), K.repeat || ve(K);
1014
1041
  return;
1015
1042
  }
1016
- E(Y, c);
1043
+ w(K, d);
1017
1044
  },
1018
- tabIndex: i ? 0 : -1,
1045
+ tabIndex: b ? 0 : -1,
1019
1046
  role: "treeitem",
1020
- "aria-expanded": L ? fe : void 0,
1021
- "aria-level": r + 1,
1022
- "aria-posinset": o,
1023
- "aria-setsize": a,
1024
- "aria-selected": U === "none" ? void 0 : l,
1025
- "aria-current": Re ? "page" : void 0,
1026
- "aria-label": `${e.name} (${L ? x : N})`,
1047
+ "aria-expanded": L ? z : void 0,
1048
+ "aria-level": n + 1,
1049
+ "aria-posinset": a,
1050
+ "aria-setsize": i,
1051
+ "aria-selected": C === "none" ? void 0 : l,
1052
+ "aria-current": _e ? "page" : void 0,
1053
+ "aria-label": `${e.name} (${L ? g : m})`,
1027
1054
  children: [
1028
- ($ || re) && /* @__PURE__ */ u.jsx("span", { className: Ke, style: ye, children: Ue }),
1029
- (L ? F : X) && /* @__PURE__ */ u.jsx("span", { className: ft, style: qe, children: Xe }),
1055
+ (G || se) && /* @__PURE__ */ u.jsx("span", { className: gt, style: { width: ce, height: ce, ...Ee }, children: rt }),
1056
+ (L ? de : J) && /* @__PURE__ */ u.jsx("span", { className: Ge, style: ot, children: bt }),
1030
1057
  /* @__PURE__ */ u.jsx(
1031
1058
  "span",
1032
1059
  {
1033
- className: Ae,
1060
+ className: Ve,
1034
1061
  style: {
1035
- ...Be,
1036
- ...m,
1037
- ...L ? H : A
1062
+ ...Xe,
1063
+ ...I,
1064
+ ...L ? N : te
1038
1065
  },
1039
1066
  "data-entry-type": L ? "directory" : "file",
1040
1067
  "data-entry-role": "name",
@@ -1044,449 +1071,464 @@ const so = (e) => {
1044
1071
  ]
1045
1072
  }
1046
1073
  ),
1047
- fe && ue && S && /* @__PURE__ */ u.jsx("fieldset", { children: ue.map((Y, ge) => /* @__PURE__ */ u.jsx(
1048
- Ot,
1074
+ z && be && $ && /* @__PURE__ */ u.jsx("fieldset", { children: be.map((K, Ke) => /* @__PURE__ */ u.jsx(
1075
+ Wt,
1049
1076
  {
1050
- entry: Y,
1077
+ entry: K,
1051
1078
  indentLevel: t + 1,
1052
- depth: r + 1,
1053
- positionInSet: ge + 1,
1054
- setSize: ue.length,
1055
- isSelectedForAria: !!P?.has(Y.absolutePath),
1079
+ originX: r,
1080
+ depth: n + 1,
1081
+ positionInSet: Ke + 1,
1082
+ setSize: be.length,
1083
+ isSelectedForAria: !!q?.has(K.absolutePath),
1056
1084
  flatIndex: -1,
1057
1085
  isActive: !1,
1058
- registerRowRef: R,
1059
- onNavigationKeyDown: E,
1060
- onRowFocus: g,
1061
- onRowBlur: h,
1062
- rowHeight: p,
1063
- entryKindDirectory: x,
1064
- entryKindFile: N,
1065
- isDirOpen: f,
1066
- parentIsLast: [...w, ge === ue.length - 1],
1067
- expansion: { toggleDirectory: M, onToggleDirectoryRecursive: I },
1068
- selection: { onEntryClick: T, selectedPath: y, currentPath: K, mode: U, selectedItems: P, onSelectionChange: _ },
1086
+ registerRowRef: v,
1087
+ onNavigationKeyDown: w,
1088
+ onRowFocus: E,
1089
+ onRowBlur: T,
1090
+ rowHeight: h,
1091
+ entryKindDirectory: g,
1092
+ entryKindFile: m,
1093
+ isDirOpen: y,
1094
+ parentIsLast: [...x, Ke === be.length - 1],
1095
+ expansion: { toggleDirectory: P, onToggleDirectoryRecursive: _ },
1096
+ selection: { onEntryClick: p, selectedPath: M, currentPath: D, mode: C, selectedItems: q, onSelectionChange: ee },
1069
1097
  visual: {
1070
- iconOverrides: te,
1071
- showExpandIcons: $,
1072
- showDirectoryIcons: F,
1073
- showFileIcons: X,
1074
- useCanvasExpandIcons: re,
1075
- expandIconSize: ae,
1076
- highlightStyles: W,
1077
- entryClassName: le,
1078
- entryStyle: n,
1079
- nameClassName: b,
1080
- nameStyle: m,
1081
- directoryNameClassName: C,
1082
- directoryNameStyle: H,
1083
- fileNameClassName: pe,
1084
- fileNameStyle: A,
1085
- expandIconClassName: ne,
1086
- expandIconStyle: ye
1098
+ iconOverrides: W,
1099
+ showExpandIcons: G,
1100
+ showDirectoryIcons: de,
1101
+ showFileIcons: J,
1102
+ useCanvasExpandIcons: se,
1103
+ expandIconSize: pe,
1104
+ typeIconSize: V,
1105
+ fontSize: ye,
1106
+ indentSize: ge,
1107
+ highlightStyles: X,
1108
+ entryClassName: o,
1109
+ entryStyle: f,
1110
+ nameClassName: R,
1111
+ nameStyle: I,
1112
+ directoryNameClassName: fe,
1113
+ directoryNameStyle: N,
1114
+ fileNameClassName: O,
1115
+ fileNameStyle: te,
1116
+ expandIconClassName: he,
1117
+ expandIconStyle: Ee
1087
1118
  }
1088
1119
  },
1089
- Y.absolutePath
1120
+ K.absolutePath
1090
1121
  )) })
1091
1122
  ] }, e.absolutePath);
1092
1123
  },
1093
1124
  (e, t) => {
1094
1125
  if (e.entry !== t.entry) return !1;
1095
- const r = e.entry.children !== void 0, o = t.entry.children !== void 0, a = r && e.isDirOpen(e.entry.absolutePath), l = o && t.isDirOpen(t.entry.absolutePath);
1096
- return e.indentLevel === t.indentLevel && // 位置情報は aria として描画されるため、変化したら再描画が必要
1126
+ const r = e.entry.children !== void 0, n = t.entry.children !== void 0, a = r && e.isDirOpen(e.entry.absolutePath), i = n && t.isDirOpen(t.entry.absolutePath);
1127
+ return e.indentLevel === t.indentLevel && e.originX === t.originX && // 位置情報は aria として描画されるため、変化したら再描画が必要
1097
1128
  e.depth === t.depth && e.positionInSet === t.positionInSet && e.setSize === t.setSize && e.isSelectedForAria === t.isSelectedForAria && e.flatIndex === t.flatIndex && e.isActive === t.isActive && e.rowHeight === t.rowHeight && // 種別語はアクセシブルネームとして描画されるため、ロケール / 上書きの変更で再描画が必要
1098
- e.entryKindDirectory === t.entryKindDirectory && e.entryKindFile === t.entryKindFile && a === l && e.selection.selectedPath === t.selection.selectedPath && e.selection.currentPath === t.selection.currentPath && e.selection.mode === t.selection.mode && e.selection.selectedItems === t.selection.selectedItems && e.visual.iconOverrides === t.visual.iconOverrides && e.visual.showExpandIcons === t.visual.showExpandIcons && e.visual.showDirectoryIcons === t.visual.showDirectoryIcons && e.visual.showFileIcons === t.visual.showFileIcons && e.visual.useCanvasExpandIcons === t.visual.useCanvasExpandIcons && e.visual.expandIconSize === t.visual.expandIconSize && e.visual.highlightStyles === t.visual.highlightStyles && e.visual.entryClassName === t.visual.entryClassName && e.visual.entryStyle === t.visual.entryStyle && e.visual.nameClassName === t.visual.nameClassName && e.visual.nameStyle === t.visual.nameStyle && e.visual.directoryNameClassName === t.visual.directoryNameClassName && e.visual.directoryNameStyle === t.visual.directoryNameStyle && e.visual.fileNameClassName === t.visual.fileNameClassName && e.visual.fileNameStyle === t.visual.fileNameStyle && e.visual.expandIconClassName === t.visual.expandIconClassName && e.visual.expandIconStyle === t.visual.expandIconStyle && e.parentIsLast.length === t.parentIsLast.length && e.parentIsLast.every((c, i) => c === t.parentIsLast[i]);
1129
+ e.entryKindDirectory === t.entryKindDirectory && e.entryKindFile === t.entryKindFile && a === i && e.selection.selectedPath === t.selection.selectedPath && e.selection.currentPath === t.selection.currentPath && e.selection.mode === t.selection.mode && e.selection.selectedItems === t.selection.selectedItems && e.visual.iconOverrides === t.visual.iconOverrides && e.visual.showExpandIcons === t.visual.showExpandIcons && e.visual.showDirectoryIcons === t.visual.showDirectoryIcons && e.visual.showFileIcons === t.visual.showFileIcons && e.visual.useCanvasExpandIcons === t.visual.useCanvasExpandIcons && e.visual.expandIconSize === t.visual.expandIconSize && e.visual.typeIconSize === t.visual.typeIconSize && e.visual.fontSize === t.visual.fontSize && e.visual.indentSize === t.visual.indentSize && e.visual.highlightStyles === t.visual.highlightStyles && e.visual.entryClassName === t.visual.entryClassName && e.visual.entryStyle === t.visual.entryStyle && e.visual.nameClassName === t.visual.nameClassName && e.visual.nameStyle === t.visual.nameStyle && e.visual.directoryNameClassName === t.visual.directoryNameClassName && e.visual.directoryNameStyle === t.visual.directoryNameStyle && e.visual.fileNameClassName === t.visual.fileNameClassName && e.visual.fileNameStyle === t.visual.fileNameStyle && e.visual.expandIconClassName === t.visual.expandIconClassName && e.visual.expandIconStyle === t.visual.expandIconStyle && e.parentIsLast.length === t.parentIsLast.length && e.parentIsLast.every((l, d) => l === t.parentIsLast[d]);
1099
1130
  }
1100
1131
  );
1101
- Ot.displayName = "DirectoryEntryItem";
1102
- const zr = (e) => {
1132
+ Wt.displayName = "DirectoryEntryItem";
1133
+ const Zr = (e) => {
1103
1134
  const t = [];
1104
1135
  if (e.children)
1105
1136
  for (const r of e.children)
1106
- r.type === "directory" && (t.push(r.absolutePath), t.push(...zr(r)));
1137
+ r.type === "directory" && (t.push(r.absolutePath), t.push(...Zr(r)));
1107
1138
  return t;
1108
- }, wo = ({
1139
+ }, Fo = ({
1109
1140
  entries: e,
1110
- expansion: { toggle: t, isExpanded: r, expandMultiple: o, collapseMultiple: a, isPending: l, alwaysExpanded: c = !1, doubleClickAction: i = "recursive" },
1111
- selection: { onEntryClick: R, selectedPath: E, currentPath: g, mode: h = "none", selectedItems: p, onSelectionChange: x },
1141
+ expansion: { toggle: t, isExpanded: r, expandMultiple: n, collapseMultiple: a, isPending: i, alwaysExpanded: l = !1, doubleClickAction: d = "recursive" },
1142
+ selection: { onEntryClick: b, selectedPath: v, currentPath: w, mode: E = "none", selectedItems: T, onSelectionChange: h },
1112
1143
  visual: {
1113
- className: N,
1114
- style: f,
1115
- ariaLabel: w,
1116
- ariaLabelledBy: S,
1117
- lineColor: M = "#A0AEC0",
1118
- showTreeLines: I = !0,
1119
- showExpandIcons: T = !0,
1120
- showDirectoryIcons: y = !0,
1121
- showFileIcons: K = !0,
1122
- iconOverrides: U,
1123
- expandIconSize: P,
1124
- itemHeight: _ = it,
1125
- removeRootIndent: te = !1,
1126
- highlightStyles: $,
1127
- entryClassName: F,
1128
- entryStyle: X,
1129
- nameClassName: re,
1130
- nameStyle: ae,
1131
- directoryNameClassName: J,
1132
- directoryNameStyle: de,
1133
- fileNameClassName: me,
1134
- fileNameStyle: W,
1135
- expandIconClassName: le,
1136
- expandIconStyle: n
1144
+ className: g,
1145
+ style: m,
1146
+ ariaLabel: y,
1147
+ ariaLabelledBy: x,
1148
+ lineColor: $ = "#A0AEC0",
1149
+ showTreeLines: P = !0,
1150
+ showExpandIcons: _ = !0,
1151
+ showDirectoryIcons: p = !0,
1152
+ showFileIcons: M = !0,
1153
+ iconOverrides: D,
1154
+ expandIconSize: C,
1155
+ typeIconSize: q,
1156
+ fontSize: ee,
1157
+ indentSize: W,
1158
+ itemHeight: G = At,
1159
+ removeRootIndent: de = !1,
1160
+ highlightStyles: J,
1161
+ entryClassName: se,
1162
+ entryStyle: pe,
1163
+ nameClassName: V,
1164
+ nameStyle: ye,
1165
+ directoryNameClassName: ge,
1166
+ directoryNameStyle: X,
1167
+ fileNameClassName: o,
1168
+ fileNameStyle: f,
1169
+ expandIconClassName: R,
1170
+ expandIconStyle: I
1137
1171
  } = {},
1138
- virtualScroll: b,
1139
- grid: m,
1140
- sort: C,
1141
- locale: H,
1142
- labels: pe,
1143
- ref: A
1172
+ virtualScroll: fe,
1173
+ grid: N,
1174
+ sort: O,
1175
+ locale: te,
1176
+ labels: he,
1177
+ ref: Ee
1144
1178
  }) => {
1145
- const ne = Pr(H), ye = G(() => Kn(H, pe), [H, pe]), ue = uo(Un(ye)), { entryKindDirectory: _e, entryKindFile: Ie } = ye, se = m !== void 0, [L, fe] = ie(!1), Q = V(null), Re = V(null), z = V(null), [Ce, ke] = ie(0), [Ne, Z] = ie(0), [$e, He] = ie(0), [Ke, ft] = ie(null), {
1146
- overscanCount: Ae = 15,
1147
- className: Ue,
1148
- background: Xe,
1149
- onScroll: Je,
1150
- onRangeChange: Ze,
1151
- onScrollAdjust: qe,
1152
- liveRegion: Be,
1153
- initialScrollIndex: Y,
1154
- initialScrollOffset: ge,
1155
- initialScrollAnchor: Lt,
1156
- callbackThrottleMs: Dt = 5,
1157
- contentInsets: Ft,
1158
- onItemFocus: Mt,
1159
- viewportHeightOverride: ce,
1160
- scrollBarOptions: ht,
1161
- behaviorOptions: $t,
1162
- preserveScrollAnchor: Ht = !1,
1163
- getItemKey: Yr,
1179
+ const be = Dr(te), Le = Y(() => oo(te, he), [te, he]), Ie = To(so(Le)), { entryKindDirectory: je, entryKindFile: L } = Le, z = Y(() => io({ indentSize: W, typeIconSize: q, fontSize: ee }), [W, q, ee]), H = N !== void 0, [_e, ne] = ie(!1), Re = U(null), De = U(null), ve = U(null), [Z, Ye] = ie(0), [tt, gt] = ie(0), [Ge, Ve] = ie(0), [rt, bt] = ie(null), {
1180
+ overscanCount: Fe = 15,
1181
+ className: nt,
1182
+ background: ot,
1183
+ onScroll: Xe,
1184
+ onRangeChange: ke,
1185
+ onScrollAdjust: K,
1186
+ liveRegion: Ke,
1187
+ initialScrollIndex: Bt,
1188
+ initialScrollOffset: Me,
1189
+ initialScrollAnchor: Yt,
1190
+ callbackThrottleMs: Gt = 5,
1191
+ contentInsets: Vt,
1192
+ onItemFocus: Xt,
1193
+ viewportHeightOverride: le,
1194
+ scrollBarOptions: vt,
1195
+ behaviorOptions: Kt,
1196
+ preserveScrollAnchor: Ut = !1,
1197
+ getItemKey: qr,
1164
1198
  // 素通しの pass-through。型で受け付けているものは実際に転送する
1165
- testId: Bt,
1166
- contentProps: mt
1167
- } = b ?? {}, Wt = G(
1168
- () => se ? { ...mt, role: "rowgroup" } : { ...mt, role: "tree", "aria-label": S ? void 0 : w, "aria-labelledby": S, "aria-multiselectable": h === "multiple" ? !0 : void 0 },
1169
- [se, mt, w, S, h]
1170
- ), zt = G(() => ({ ...$t, enableKeyboardNavigation: !1 }), [$t]), [Qe, Yt] = ie(typeof ge == "number" ? ge : 0), pt = V(typeof ge == "number" ? ge : 0), Gt = j(
1171
- (s, d) => {
1172
- pt.current = s, Yt(s), Je?.(s, d);
1199
+ testId: Jt,
1200
+ contentProps: wt
1201
+ } = fe ?? {}, Zt = Y(
1202
+ () => H ? { ...wt, role: "rowgroup" } : { ...wt, role: "tree", "aria-label": x ? void 0 : y, "aria-labelledby": x, "aria-multiselectable": E === "multiple" ? !0 : void 0 },
1203
+ [H, wt, y, x, E]
1204
+ ), qt = Y(() => ({ ...Kt, enableKeyboardNavigation: !1 }), [Kt]), [st, Qt] = ie(typeof Me == "number" ? Me : 0), xt = U(typeof Me == "number" ? Me : 0), er = j(
1205
+ (s, c) => {
1206
+ xt.current = s, Qt(s), Xe?.(s, c);
1173
1207
  },
1174
- [Je]
1175
- ), Vt = j(
1208
+ [Xe]
1209
+ ), tr = j(
1176
1210
  (s) => {
1177
- const { renderingStartIndex: d, renderingEndIndex: v } = s;
1178
- ft((k) => k && k.renderStart === d && k.renderEnd === v ? k : { renderStart: d, renderEnd: v }), Ze?.(s);
1211
+ const { renderingStartIndex: c, renderingEndIndex: S } = s;
1212
+ bt((k) => k && k.renderStart === c && k.renderEnd === S ? k : { renderStart: c, renderEnd: S }), ke?.(s);
1179
1213
  },
1180
- [Ze]
1214
+ [ke]
1181
1215
  );
1182
- Se(() => {
1183
- fe(!0), io();
1184
- }, []), Se(() => {
1185
- const s = Q.current, d = se ? Re.current : s, v = () => {
1216
+ Pe(() => {
1217
+ ne(!0), No();
1218
+ }, []), Pe(() => {
1219
+ const s = Re.current, c = H ? De.current : s, S = () => {
1186
1220
  if (s) {
1187
1221
  const B = s.clientWidth;
1188
- Z((ee) => Math.abs(ee - B) > 1 ? B : ee);
1222
+ gt((re) => Math.abs(re - B) > 1 ? B : re);
1189
1223
  }
1190
- if (typeof ce == "number")
1191
- ke((B) => Math.abs(B - ce) > 1 ? ce : B);
1192
- else if (d) {
1193
- const B = d.clientHeight;
1194
- ke((ee) => Math.abs(ee - B) > 1 ? B : ee);
1224
+ if (typeof le == "number")
1225
+ Ye((B) => Math.abs(B - le) > 1 ? le : B);
1226
+ else if (c) {
1227
+ const B = c.clientHeight;
1228
+ Ye((re) => Math.abs(re - B) > 1 ? B : re);
1195
1229
  }
1196
1230
  };
1197
- if (!(s || d)) return ke(0);
1198
- v();
1199
- const k = new ResizeObserver(v);
1200
- return s && k.observe(s), d && d !== s && k.observe(d), () => k.disconnect();
1201
- }, [ce, se]);
1202
- const Oe = typeof ce == "number" ? ce : Ce, be = j((s) => c || (L ? r(s) : !1), [L, r, c]), Kt = O(D.container, l && D.containerPending, N), Ut = G(
1231
+ if (!(s || c)) return Ye(0);
1232
+ S();
1233
+ const k = new ResizeObserver(S);
1234
+ return s && k.observe(s), c && c !== s && k.observe(c), () => k.disconnect();
1235
+ }, [le, H]);
1236
+ const $e = typeof le == "number" ? le : Z, we = j((s) => l || (_e ? r(s) : !1), [_e, r, l]), rr = A(F.container, i && F.containerPending, g), nr = Y(
1203
1237
  () => ({
1204
- ...co,
1205
- ...f ?? {},
1206
- ...typeof ce == "number" ? { height: ce, minHeight: ce } : {}
1238
+ ...ko,
1239
+ ...m ?? {},
1240
+ ...typeof le == "number" ? { height: le, minHeight: le } : {}
1207
1241
  }),
1208
- [f, ce]
1209
- ), yt = j(
1210
- (s, d) => {
1211
- const v = [s.absolutePath, ...zr(s)], k = d || i;
1212
- if (v.every((we) => be(we))) return a(v);
1213
- if (v.every((we) => !be(we)) || k === "recursive") return o(v);
1214
- if (k === "toggle") return a(v);
1242
+ [m, le]
1243
+ ), St = j(
1244
+ (s, c) => {
1245
+ const S = [s.absolutePath, ...Zr(s)], k = c || d;
1246
+ if (S.every((Se) => we(Se))) return a(S);
1247
+ if (S.every((Se) => !we(Se)) || k === "recursive") return n(S);
1248
+ if (k === "toggle") return a(S);
1215
1249
  console.warn(`[DirectoryTree] Unknown double click action: ${k}. No action taken.`);
1216
1250
  },
1217
- [be, o, a, i]
1218
- ), Xt = se ? !1 : te, { flatItems: Te, lineItems: bt, maxIndent: Jt } = G(() => ho(e, be, I, Xt, C), [e, be, I, Xt, C]), q = G(
1219
- () => Te.map((s, d) => {
1220
- const v = typeof _ == "function" ? _(s.entry, d) : _;
1221
- return { ...s, rowHeight: Number.isFinite(v) && v > 0 ? v : it };
1222
- }),
1223
- [Te, _]
1224
- ), xe = G(() => q.map((s) => s.rowHeight), [q]), Pe = G(() => {
1225
- const s = new Array(xe.length + 1);
1251
+ [we, n, a, d]
1252
+ ), Et = H ? !1 : de, { flatItems: Ce, lineItems: It, maxIndent: or } = Y(() => jo(e, we, P, Et, O), [e, we, P, Et, O]), at = co({ indentSize: z.indentSize, removeRootIndent: Et, hasExpandBox: _ || P }), me = Y(() => P ? fo(z, C, at) : null, [P, z, C, at]), Q = Y(() => Ce.map((s, c) => ({ ...s, rowHeight: uo(G, s.entry, c) })), [Ce, G]), Ne = Y(() => Q.map((s) => s.rowHeight), [Q]), Oe = Y(() => {
1253
+ const s = new Array(Ne.length + 1);
1226
1254
  s[0] = 0;
1227
- for (let d = 0; d < xe.length; d++)
1228
- s[d + 1] = s[d] + xe[d];
1255
+ for (let c = 0; c < Ne.length; c++)
1256
+ s[c + 1] = s[c] + Ne[c];
1229
1257
  return s;
1230
- }, [xe]), Zt = j((s) => q[s]?.rowHeight ?? it, [q]), Gr = j((s) => q[s]?.entry.absolutePath ?? s, [q]), qt = Yr ?? Gr, Le = E ?? null, gt = g ?? null, [Qt, We] = ie(() => ({ selectedPath: Le, selectionGeneration: 0, anchor: null })), vt = Rr(Qt, Le);
1231
- vt !== Qt && We((s) => Rr(s, Le));
1232
- const et = G(() => so(Te), [Te]), De = G(() => lo(et, vt), [et, vt]), ze = V(/* @__PURE__ */ new Map()), tt = V(null), [rt] = ie(Xn), Ye = V(null), [Vr, er] = ie(!0), wt = V(Te);
1233
- wt.current = Te;
1234
- const tr = V(be);
1235
- tr.current = be;
1236
- const xt = V(t);
1237
- xt.current = t;
1238
- const rr = V(et);
1239
- rr.current = et;
1240
- const Et = V(De);
1241
- Et.current = De;
1242
- const nr = V(Mt);
1243
- nr.current = Mt;
1244
- const je = j((s) => {
1245
- const d = z.current;
1246
- return !d || d.getViewportSize() <= 0 ? !1 : (d.scrollToIndex(s, { align: "nearest" }), !0);
1247
- }, []), ve = j(
1258
+ }, [Ne]), sr = j((s) => Q[s]?.rowHeight ?? At, [Q]), Qr = j((s) => Q[s]?.entry.absolutePath ?? s, [Q]), ar = qr ?? Qr, ze = v ?? null, Rt = w ?? null, [lr, Ue] = ie(() => ({ selectedPath: ze, selectionGeneration: 0, anchor: null })), kt = Cr(lr, ze);
1259
+ kt !== lr && Ue((s) => Cr(s, ze));
1260
+ const lt = Y(() => Eo(Ce), [Ce]), He = Y(() => Ro(lt, kt), [lt, kt]), Je = U(/* @__PURE__ */ new Map()), it = U(null), [ct] = ie(ao), Ze = U(null), [en, ir] = ie(!0), Nt = U(Ce);
1261
+ Nt.current = Ce;
1262
+ const cr = U(we);
1263
+ cr.current = we;
1264
+ const Tt = U(t);
1265
+ Tt.current = t;
1266
+ const dr = U(lt);
1267
+ dr.current = lt;
1268
+ const Pt = U(He);
1269
+ Pt.current = He;
1270
+ const ur = U(Xt);
1271
+ ur.current = Xt;
1272
+ const Ae = j((s) => {
1273
+ const c = ve.current;
1274
+ return !c || c.getViewportSize() <= 0 ? !1 : (c.scrollToIndex(s, { align: "nearest" }), !0);
1275
+ }, []), xe = j(
1248
1276
  (s) => {
1249
- const d = ze.current.get(s);
1250
- if (d === void 0) {
1251
- Ye.current = s, je(s) || (Ye.current = null);
1277
+ const c = Je.current.get(s);
1278
+ if (c === void 0) {
1279
+ Ze.current = s, Ae(s) || (Ze.current = null);
1252
1280
  return;
1253
1281
  }
1254
- Ye.current = null, je(s), d.focus({ preventScroll: !0 });
1282
+ Ze.current = null, Ae(s), c.focus({ preventScroll: !0 });
1255
1283
  },
1256
- [je]
1257
- ), or = j((s, d) => {
1258
- if (d)
1259
- ze.current.set(s, d), Ye.current === s ? (Ye.current = null, d.focus({ preventScroll: !0 })) : d.contains(d.ownerDocument.activeElement) && We((v) => v.anchor === null ? v : { ...v, anchor: { ...v.anchor, focused: !0 } });
1284
+ [Ae]
1285
+ ), fr = j((s, c) => {
1286
+ if (c)
1287
+ Je.current.set(s, c), Ze.current === s ? (Ze.current = null, c.focus({ preventScroll: !0 })) : c.contains(c.ownerDocument.activeElement) && Ue((S) => S.anchor === null ? S : { ...S, anchor: { ...S.anchor, focused: !0 } });
1260
1288
  else {
1261
- const v = ze.current.get(s);
1262
- ze.current.delete(s), v?.contains(v.ownerDocument.activeElement) && We((k) => k.anchor === null ? k : { ...k, anchor: { ...k.anchor, focused: !1 } });
1289
+ const S = Je.current.get(s);
1290
+ Je.current.delete(s), S?.contains(S.ownerDocument.activeElement) && Ue((k) => k.anchor === null ? k : { ...k, anchor: { ...k.anchor, focused: !1 } });
1263
1291
  }
1264
- s === Et.current && er(d !== null);
1292
+ s === Pt.current && ir(c !== null);
1265
1293
  }, []);
1266
- mr(() => {
1267
- er(ze.current.has(De));
1268
- }, [De]);
1269
- const St = j(
1270
- (s, d, v) => {
1271
- const k = tt.current === v;
1272
- tt.current = null, k || (We((B) => ao(B, d)), rt.landedOn(v) || je(s)), nr.current?.(s);
1294
+ Sr(() => {
1295
+ ir(Je.current.has(He));
1296
+ }, [He]);
1297
+ const jt = j(
1298
+ (s, c, S) => {
1299
+ const k = it.current === S;
1300
+ it.current = null, k || (Ue((B) => Io(B, c)), ct.landedOn(S) || Ae(s)), ur.current?.(s);
1273
1301
  },
1274
- [je, rt]
1275
- ), nt = j((s) => rt.mark(s.nativeEvent), [rt]), It = j((s, d) => {
1276
- const { ownerDocument: v } = d;
1277
- if (!v.hasFocus() && d.contains(v.activeElement)) {
1278
- tt.current = d;
1302
+ [Ae, ct]
1303
+ ), dt = j((s) => ct.mark(s.nativeEvent), [ct]), _t = j((s, c) => {
1304
+ const { ownerDocument: S } = c;
1305
+ if (!S.hasFocus() && c.contains(S.activeElement)) {
1306
+ it.current = c;
1279
1307
  return;
1280
1308
  }
1281
- tt.current = null, We((k) => k.anchor !== null && k.anchor.path === s ? { ...k, anchor: { ...k.anchor, focused: !1 } } : k);
1282
- }, []), Kr = j(() => ve(Et.current), [ve]), Rt = j(
1283
- (s, d) => {
1284
- const v = Nr(d), k = wt.current.length;
1309
+ it.current = null, Ue((k) => k.anchor !== null && k.anchor.path === s ? { ...k, anchor: { ...k.anchor, focused: !1 } } : k);
1310
+ }, []), tn = j(() => xe(Pt.current), [xe]), Ct = j(
1311
+ (s, c) => {
1312
+ const S = Ar(c), k = Nt.current.length;
1285
1313
  if (!Number.isInteger(s) || s < 0 || s >= k)
1286
1314
  throw new RangeError(`[directory-tree] scrollToIndex: ${String(s)} is not a row index (${k === 0 ? "the tree has no rows" : `expected an integer in 0..${String(k - 1)}`}).`);
1287
- if (v === "nearest") {
1288
- je(s);
1315
+ if (S === "nearest") {
1316
+ Ae(s);
1289
1317
  return;
1290
1318
  }
1291
- z.current?.scrollToIndex(s, { align: v });
1319
+ ve.current?.scrollToIndex(s, { align: S });
1292
1320
  },
1293
- [je]
1321
+ [Ae]
1294
1322
  );
1295
- en(
1296
- A,
1323
+ cn(
1324
+ Ee,
1297
1325
  () => ({
1298
- scrollToIndex: Rt,
1299
- scrollToPath: (s, d) => {
1300
- Nr(d);
1301
- const v = rr.current.get(s);
1302
- return v === void 0 ? !1 : (Rt(v, d), !0);
1326
+ scrollToIndex: Ct,
1327
+ scrollToPath: (s, c) => {
1328
+ Ar(c);
1329
+ const S = dr.current.get(s);
1330
+ return S === void 0 ? !1 : (Ct(S, c), !0);
1303
1331
  },
1304
- getScrollAnchor: () => z.current?.getScrollAnchor() ?? null
1332
+ getScrollAnchor: () => ve.current?.getScrollAnchor() ?? null
1305
1333
  }),
1306
- [Rt]
1334
+ [Ct]
1307
1335
  );
1308
- const sr = j(
1309
- (s, d) => {
1336
+ const hr = j(
1337
+ (s, c) => {
1310
1338
  if (s.altKey || s.ctrlKey || s.metaKey)
1311
1339
  return;
1312
- const v = wt.current, k = v.length - 1;
1340
+ const S = Nt.current, k = S.length - 1;
1313
1341
  if (k < 0) return;
1314
- const B = v[d], ee = B?.entry.children !== void 0, we = ee && tr.current(B.entry.absolutePath);
1342
+ const B = S[c], re = B?.entry.children !== void 0, Se = re && cr.current(B.entry.absolutePath);
1315
1343
  switch (s.key) {
1316
1344
  case "ArrowDown":
1317
- s.preventDefault(), ve(Math.min(d + 1, k));
1345
+ s.preventDefault(), xe(Math.min(c + 1, k));
1318
1346
  break;
1319
1347
  case "ArrowUp":
1320
- s.preventDefault(), ve(Math.max(d - 1, 0));
1348
+ s.preventDefault(), xe(Math.max(c - 1, 0));
1321
1349
  break;
1322
1350
  case "Home":
1323
- s.preventDefault(), ve(0);
1351
+ s.preventDefault(), xe(0);
1324
1352
  break;
1325
1353
  case "End":
1326
- s.preventDefault(), ve(k);
1354
+ s.preventDefault(), xe(k);
1327
1355
  break;
1328
1356
  case "ArrowRight":
1329
- s.preventDefault(), ee && !we ? xt.current(B.entry.absolutePath) : ee && d < k && v[d + 1].depth > B.depth && ve(d + 1);
1357
+ s.preventDefault(), re && !Se ? Tt.current(B.entry.absolutePath) : re && c < k && S[c + 1].depth > B.depth && xe(c + 1);
1330
1358
  break;
1331
1359
  case "ArrowLeft": {
1332
- if (s.preventDefault(), ee && we) {
1333
- xt.current(B.entry.absolutePath);
1360
+ if (s.preventDefault(), re && Se) {
1361
+ Tt.current(B.entry.absolutePath);
1334
1362
  break;
1335
1363
  }
1336
- const qr = B?.depth ?? 0;
1337
- for (let lt = d - 1; lt >= 0; lt--)
1338
- if (v[lt].depth < qr) {
1339
- ve(lt);
1364
+ const an = B?.depth ?? 0;
1365
+ for (let mt = c - 1; mt >= 0; mt--)
1366
+ if (S[mt].depth < an) {
1367
+ xe(mt);
1340
1368
  break;
1341
1369
  }
1342
1370
  break;
1343
1371
  }
1344
1372
  }
1345
1373
  },
1346
- [ve]
1347
- ), ot = G(
1348
- () => !I || bt.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : po(bt, xe, Pe, dt, I, P ?? vr),
1349
- [bt, xe, Pe, I, P]
1350
- ), st = G(() => !I || e.length === 0 ? 0 : (Jt + 2) * dt, [e.length, Jt, I]), { renderStart: ar, renderEnd: lr, lookaheadEnd: cr } = G(
1351
- () => mo(q.length, Oe, Ae, Ke, Qe, Pe),
1352
- [q.length, Oe, Ae, Ke, Qe, Pe]
1353
- ), kt = G(() => !I || st <= 0 || Oe <= 0 || ot.segmentsByItem.length === 0 ? null : /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute inset-0 z-0", "aria-hidden": "true", children: /* @__PURE__ */ u.jsx("div", { className: "absolute top-0 left-0", style: { width: st, height: Oe }, children: /* @__PURE__ */ u.jsx(
1354
- Wr,
1374
+ [xe]
1375
+ ), ut = Y(() => me === null || It.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : Co(It, Ne, Oe, me), [It, Ne, Oe, me]), ft = Y(() => me === null || e.length === 0 ? 0 : me.originX + or * me.indentSize + ce + me.typeIconSize, [e.length, or, me]), { renderStart: mr, renderEnd: pr, lookaheadEnd: yr } = Y(
1376
+ () => _o(Q.length, $e, Fe, rt, st, Oe),
1377
+ [Q.length, $e, Fe, rt, st, Oe]
1378
+ ), Ot = Y(() => me === null || ft <= 0 || $e <= 0 || ut.segmentsByItem.length === 0 ? null : /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute inset-0 z-0", "aria-hidden": "true", children: /* @__PURE__ */ u.jsx("div", { className: "absolute top-0 left-0", style: { width: ft, height: $e }, children: /* @__PURE__ */ u.jsx(
1379
+ Jr,
1355
1380
  {
1356
- segmentsByItem: ot.segmentsByItem,
1357
- glyphsByItem: ot.glyphsByItem,
1358
- itemHeight: xe[0] ?? it,
1359
- width: st,
1360
- viewportHeight: Oe,
1361
- scrollPosition: Qe,
1362
- color: M,
1363
- expandGlyphColor: M,
1364
- expandGlyphSize: P ?? vr,
1365
- renderStartIndex: ar,
1366
- renderEndIndex: lr,
1367
- lookaheadEndIndex: cr
1381
+ segmentsByItem: ut.segmentsByItem,
1382
+ glyphsByItem: ut.glyphsByItem,
1383
+ itemHeight: Ne[0] ?? At,
1384
+ width: ft,
1385
+ viewportHeight: $e,
1386
+ scrollPosition: st,
1387
+ color: $,
1388
+ expandGlyphColor: $,
1389
+ expandGlyphSize: me.glyphSize,
1390
+ renderStartIndex: mr,
1391
+ renderEndIndex: pr,
1392
+ lookaheadEndIndex: yr
1368
1393
  }
1369
- ) }) }), [st, Oe, ar, lr, cr, Qe, ot, M, I, P, xe]), ir = j((s) => q[s], [q]), dr = V(null);
1370
- mr(() => {
1371
- const s = dr.current;
1372
- if (dr.current = { items: q, offsets: Pe }, !Ht || !s || s.items === q)
1394
+ ) }) }), [ft, $e, mr, pr, yr, st, ut, $, me, Ne]), gr = j((s) => Q[s], [Q]), br = U(null);
1395
+ Sr(() => {
1396
+ const s = br.current;
1397
+ if (br.current = { items: Q, offsets: Oe }, !Ut || !s || s.items === Q)
1373
1398
  return;
1374
- const d = z.current, v = d?.getScrollPosition(), k = typeof v == "number" && v >= 0 ? v : pt.current, B = Zn(s.items, s.offsets, k);
1399
+ const c = ve.current, S = c?.getScrollPosition(), k = typeof S == "number" && S >= 0 ? S : xt.current, B = po(s.items, s.offsets, k);
1375
1400
  if (!B)
1376
1401
  return;
1377
- const ee = qn(B, q, Pe);
1378
- if (ee === null || Math.abs(ee - k) < 1)
1402
+ const re = yo(B, Q, Oe);
1403
+ if (re === null || Math.abs(re - k) < 1)
1379
1404
  return;
1380
- const we = d ? d.scrollTo(ee) : ee;
1381
- pt.current = we, Yt(we);
1382
- }, [q, Pe, Ht]);
1383
- const Ee = m?.columns, Fe = m?.scrollBarWidth ?? ht?.width ?? Hr, oe = G(() => Ee ? zn({ measuredWidth: Ne, columns: Ee, scrollBarWidth: Fe }) : null, [Ee, Ne, Fe]), at = G(() => Ee ? Wn(Ee) : "", [Ee]), Ur = G(() => m?.showFooter && Ee ? Yn(e) : [], [m?.showFooter, Ee, e]), Me = oe?.maxHScroll ?? 0;
1384
- Se(() => {
1385
- He((s) => Nt(s, Me));
1386
- }, [Me]);
1387
- const ur = j((s) => He((d) => Nt(d + s, Me)), [Me]), fr = G(
1388
- () => ({ iconOverrides: U, showExpandIcons: T, showDirectoryIcons: y, showFileIcons: K, useCanvasExpandIcons: I, expandIconSize: P, highlightStyles: $, expandIconClassName: le, expandIconStyle: n }),
1389
- [U, T, y, K, I, P, $, le, n]
1390
- ), hr = G(
1405
+ const Se = c ? c.scrollTo(re) : re;
1406
+ xt.current = Se, Qt(Se);
1407
+ }, [Q, Oe, Ut]);
1408
+ const Te = N?.columns, We = N?.scrollBarWidth ?? vt?.width ?? Kr, oe = Y(() => Te ? eo({ measuredWidth: tt, columns: Te, scrollBarWidth: We }) : null, [Te, tt, We]), ht = Y(() => Te ? Qn(Te) : "", [Te]), rn = Y(() => N?.showFooter && Te ? to(e) : [], [N?.showFooter, Te, e]), Be = oe?.maxHScroll ?? 0;
1409
+ Pe(() => {
1410
+ Ve((s) => Lt(s, Be));
1411
+ }, [Be]);
1412
+ const vr = j((s) => Ve((c) => Lt(c + s, Be)), [Be]), wr = Y(
1413
+ () => ({
1414
+ iconOverrides: D,
1415
+ showExpandIcons: _,
1416
+ showDirectoryIcons: p,
1417
+ showFileIcons: M,
1418
+ useCanvasExpandIcons: P,
1419
+ expandIconSize: C,
1420
+ typeIconSize: z.typeIconSize,
1421
+ fontSize: z.fontSize,
1422
+ indentSize: z.indentSize,
1423
+ highlightStyles: J,
1424
+ expandIconClassName: R,
1425
+ expandIconStyle: I
1426
+ }),
1427
+ [D, _, p, M, P, C, z, J, R, I]
1428
+ ), xr = Y(
1391
1429
  () => /* @__PURE__ */ u.jsx(
1392
- on,
1430
+ hn,
1393
1431
  {
1394
- ref: z,
1395
- itemCount: q.length,
1396
- getItem: ir,
1397
- getItemHeight: Zt,
1398
- getItemKey: qt,
1399
- testId: Bt,
1400
- contentProps: Wt,
1401
- locale: ne,
1402
- labels: ue,
1403
- viewportSize: typeof ce == "number" ? ce : void 0,
1404
- overscanCount: Ae,
1405
- onScroll: Gt,
1406
- onRangeChange: Vt,
1407
- onScrollAdjust: qe,
1408
- liveRegion: Be,
1409
- className: Ue,
1410
- onWheelHorizontal: se ? ur : void 0,
1432
+ ref: ve,
1433
+ itemCount: Q.length,
1434
+ getItem: gr,
1435
+ getItemHeight: sr,
1436
+ getItemKey: ar,
1437
+ testId: Jt,
1438
+ contentProps: Zt,
1439
+ locale: be,
1440
+ labels: Ie,
1441
+ viewportSize: typeof le == "number" ? le : void 0,
1442
+ overscanCount: Fe,
1443
+ onScroll: er,
1444
+ onRangeChange: tr,
1445
+ onScrollAdjust: K,
1446
+ liveRegion: Ke,
1447
+ className: nt,
1448
+ onWheelHorizontal: H ? vr : void 0,
1411
1449
  background: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
1412
- se && oe ? (
1450
+ H && oe ? (
1413
1451
  // Clip the connector-line canvas to the frozen name column so deep trees never bleed into the numeric region.
1414
- /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-0 left-0 z-0 h-full overflow-hidden", style: { width: oe.nameWidth }, "aria-hidden": "true", children: kt })
1415
- ) : kt,
1416
- Xe
1452
+ /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-0 left-0 z-0 h-full overflow-hidden", style: { width: oe.nameWidth }, "aria-hidden": "true", children: Ot })
1453
+ ) : Ot,
1454
+ ot
1417
1455
  ] }),
1418
- initialScrollIndex: Y,
1419
- initialScrollOffset: ge,
1420
- initialScrollAnchor: Lt,
1421
- callbackThrottleMs: Dt,
1422
- contentInsets: Ft,
1423
- scrollBarOptions: ht,
1424
- behaviorOptions: zt,
1425
- children: (s, d) => s ? se && m && oe ? /* @__PURE__ */ u.jsx(
1426
- Fr,
1456
+ initialScrollIndex: Bt,
1457
+ initialScrollOffset: Me,
1458
+ initialScrollAnchor: Yt,
1459
+ callbackThrottleMs: Gt,
1460
+ contentInsets: Vt,
1461
+ scrollBarOptions: vt,
1462
+ behaviorOptions: qt,
1463
+ children: (s, c) => s ? H && N && oe ? /* @__PURE__ */ u.jsx(
1464
+ Gr,
1427
1465
  {
1428
1466
  entry: s.entry,
1429
1467
  indentLevel: s.indentLevel,
1430
1468
  positionInSet: s.positionInSet,
1431
1469
  setSize: s.setSize,
1432
- rowIndex: d + (m.showHeader ?? !0 ? 2 : 1),
1433
- flatIndex: d,
1434
- onRowFocus: St,
1435
- onRowBlur: It,
1436
- isSelectedForAria: !!p?.has(s.entry.absolutePath),
1470
+ rowIndex: c + (N.showHeader ?? !0 ? 2 : 1),
1471
+ flatIndex: c,
1472
+ onRowFocus: jt,
1473
+ onRowBlur: _t,
1474
+ isSelectedForAria: !!T?.has(s.entry.absolutePath),
1437
1475
  rowHeight: s.rowHeight,
1438
- isDirOpen: be,
1439
- columns: m.columns,
1440
- numericTemplate: at,
1476
+ isDirOpen: we,
1477
+ columns: N.columns,
1478
+ numericTemplate: ht,
1441
1479
  numericTotal: oe.numericTotal,
1442
1480
  nameWidth: oe.nameWidth,
1443
- rowClassName: m.rowClassName,
1444
- selection: { onEntryClick: R, selectedPath: Le, currentPath: gt, mode: h, selectedItems: p, onSelectionChange: x },
1445
- expansion: { toggleDirectory: t, onToggleDirectoryRecursive: yt },
1446
- visual: fr
1481
+ rowClassName: N.rowClassName,
1482
+ selection: { onEntryClick: b, selectedPath: ze, currentPath: Rt, mode: E, selectedItems: T, onSelectionChange: h },
1483
+ expansion: { toggleDirectory: t, onToggleDirectoryRecursive: St },
1484
+ visual: wr
1447
1485
  },
1448
1486
  s.entry.absolutePath
1449
1487
  ) : /* @__PURE__ */ u.jsx(
1450
- Ot,
1488
+ Wt,
1451
1489
  {
1452
1490
  entry: s.entry,
1453
1491
  indentLevel: s.indentLevel,
1492
+ originX: at,
1454
1493
  depth: s.depth,
1455
1494
  positionInSet: s.positionInSet,
1456
1495
  setSize: s.setSize,
1457
- isSelectedForAria: !!p?.has(s.entry.absolutePath),
1458
- flatIndex: d,
1459
- isActive: d === De,
1460
- registerRowRef: or,
1461
- onNavigationKeyDown: sr,
1462
- onRowFocus: St,
1463
- onRowBlur: It,
1496
+ isSelectedForAria: !!T?.has(s.entry.absolutePath),
1497
+ flatIndex: c,
1498
+ isActive: c === He,
1499
+ registerRowRef: fr,
1500
+ onNavigationKeyDown: hr,
1501
+ onRowFocus: jt,
1502
+ onRowBlur: _t,
1464
1503
  rowHeight: s.rowHeight,
1465
- entryKindDirectory: _e,
1466
- entryKindFile: Ie,
1467
- isDirOpen: be,
1504
+ entryKindDirectory: je,
1505
+ entryKindFile: L,
1506
+ isDirOpen: we,
1468
1507
  parentIsLast: s.parentIsLast,
1469
1508
  renderChildren: !1,
1470
- expansion: { toggleDirectory: t, onToggleDirectoryRecursive: yt },
1471
- selection: { onEntryClick: R, selectedPath: Le, currentPath: gt, mode: h, selectedItems: p, onSelectionChange: x },
1509
+ expansion: { toggleDirectory: t, onToggleDirectoryRecursive: St },
1510
+ selection: { onEntryClick: b, selectedPath: ze, currentPath: Rt, mode: E, selectedItems: T, onSelectionChange: h },
1472
1511
  visual: {
1473
- iconOverrides: U,
1474
- showExpandIcons: T,
1475
- showDirectoryIcons: y,
1476
- showFileIcons: K,
1477
- useCanvasExpandIcons: I,
1478
- expandIconSize: P,
1479
- highlightStyles: $,
1480
- entryClassName: F,
1481
- entryStyle: X,
1482
- nameClassName: re,
1483
- nameStyle: ae,
1484
- directoryNameClassName: J,
1485
- directoryNameStyle: de,
1486
- fileNameClassName: me,
1487
- fileNameStyle: W,
1488
- expandIconClassName: le,
1489
- expandIconStyle: n
1512
+ iconOverrides: D,
1513
+ showExpandIcons: _,
1514
+ showDirectoryIcons: p,
1515
+ showFileIcons: M,
1516
+ useCanvasExpandIcons: P,
1517
+ expandIconSize: C,
1518
+ typeIconSize: z.typeIconSize,
1519
+ fontSize: z.fontSize,
1520
+ indentSize: z.indentSize,
1521
+ highlightStyles: J,
1522
+ entryClassName: se,
1523
+ entryStyle: pe,
1524
+ nameClassName: V,
1525
+ nameStyle: ye,
1526
+ directoryNameClassName: ge,
1527
+ directoryNameStyle: X,
1528
+ fileNameClassName: o,
1529
+ fileNameStyle: f,
1530
+ expandIconClassName: R,
1531
+ expandIconStyle: I
1490
1532
  }
1491
1533
  },
1492
1534
  s.entry.absolutePath
@@ -1494,215 +1536,217 @@ const zr = (e) => {
1494
1536
  }
1495
1537
  ),
1496
1538
  [
1497
- q.length,
1498
- ir,
1539
+ Q.length,
1540
+ gr,
1541
+ sr,
1542
+ ar,
1543
+ Jt,
1499
1544
  Zt,
1500
- qt,
1501
- Bt,
1502
- Wt,
1503
- ne,
1504
- ue,
1505
- _e,
1545
+ be,
1506
1546
  Ie,
1507
- De,
1508
- or,
1509
- sr,
1510
- St,
1511
- It,
1512
- ce,
1513
- Ae,
1547
+ je,
1548
+ L,
1549
+ He,
1550
+ fr,
1551
+ hr,
1552
+ jt,
1553
+ _t,
1554
+ le,
1555
+ Fe,
1556
+ er,
1557
+ tr,
1558
+ K,
1559
+ Ke,
1560
+ nt,
1561
+ H,
1562
+ vr,
1563
+ oe,
1564
+ Ot,
1565
+ ot,
1566
+ Bt,
1567
+ Me,
1568
+ Yt,
1514
1569
  Gt,
1515
1570
  Vt,
1516
- qe,
1517
- Be,
1518
- Ue,
1519
- se,
1520
- ur,
1521
- oe,
1522
- kt,
1523
- Xe,
1524
- Y,
1525
- ge,
1526
- Lt,
1527
- Dt,
1528
- Ft,
1571
+ vt,
1572
+ qt,
1573
+ N,
1529
1574
  ht,
1530
- zt,
1531
- m,
1532
- at,
1533
- be,
1534
- R,
1535
- Le,
1536
- gt,
1575
+ we,
1576
+ b,
1577
+ ze,
1578
+ Rt,
1579
+ E,
1580
+ T,
1537
1581
  h,
1538
- p,
1539
- x,
1540
1582
  t,
1541
- yt,
1542
- fr,
1543
- U,
1544
- T,
1545
- y,
1546
- K,
1547
- I,
1583
+ St,
1584
+ wr,
1585
+ D,
1586
+ _,
1587
+ p,
1588
+ M,
1548
1589
  P,
1549
- $,
1550
- F,
1551
- X,
1552
- re,
1553
- ae,
1590
+ C,
1591
+ z,
1592
+ at,
1554
1593
  J,
1555
- de,
1556
- me,
1557
- W,
1558
- le,
1559
- n
1594
+ se,
1595
+ pe,
1596
+ V,
1597
+ ye,
1598
+ ge,
1599
+ X,
1600
+ o,
1601
+ f,
1602
+ R,
1603
+ I
1560
1604
  ]
1561
1605
  );
1562
- if (!(m && oe))
1563
- return /* @__PURE__ */ u.jsxs("div", { ref: Q, className: Kt, style: Ut, onPointerDownCapture: nt, onMouseDownCapture: nt, children: [
1564
- Te.length > 0 && !Vr && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外で DOM に無い間だけ Tab を受け、受けた瞬間にその行へ焦点を渡す。これが無いとツリーに Tab で入れない
1606
+ if (!(N && oe))
1607
+ return /* @__PURE__ */ u.jsxs("div", { ref: Re, className: rr, style: nr, onPointerDownCapture: dt, onMouseDownCapture: dt, children: [
1608
+ Ce.length > 0 && !en && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外で DOM に無い間だけ Tab を受け、受けた瞬間にその行へ焦点を渡す。これが無いとツリーに Tab で入れない
1565
1609
  // biome-ignore lint/a11y/noStaticElementInteractions: 同上 (焦点の受け渡しだけを担い、要素自身は操作の対象ではない)
1566
- /* @__PURE__ */ u.jsx("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: fo, onFocus: Kr }),
1567
- hr
1610
+ /* @__PURE__ */ u.jsx("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: Po, onFocus: tn }),
1611
+ xr
1568
1612
  ] });
1569
- const Xr = m.showHeader ?? !0, Jr = m.showFooter ?? !1, Zr = { ...Ut, "--dt-hscroll": `${$e}px` };
1613
+ const nn = N.showHeader ?? !0, on = N.showFooter ?? !1, sn = { ...nr, "--dt-hscroll": `${Ge}px` };
1570
1614
  return /* @__PURE__ */ u.jsxs(
1571
1615
  "div",
1572
1616
  {
1573
- ref: Q,
1574
- className: O(Kt, "dt-grid"),
1575
- style: Zr,
1617
+ ref: Re,
1618
+ className: A(rr, "dt-grid"),
1619
+ style: sn,
1576
1620
  role: "treegrid",
1577
- "aria-label": S ? void 0 : w,
1578
- "aria-labelledby": S,
1579
- "aria-multiselectable": h === "multiple" ? !0 : void 0,
1580
- "aria-rowcount": q.length + (m.showHeader ?? !0 ? 1 : 0),
1581
- onPointerDownCapture: nt,
1582
- onMouseDownCapture: nt,
1621
+ "aria-label": x ? void 0 : y,
1622
+ "aria-labelledby": x,
1623
+ "aria-multiselectable": E === "multiple" ? !0 : void 0,
1624
+ "aria-rowcount": Q.length + (N.showHeader ?? !0 ? 1 : 0),
1625
+ onPointerDownCapture: dt,
1626
+ onMouseDownCapture: dt,
1583
1627
  children: [
1584
- Xr && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1585
- /* @__PURE__ */ u.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ u.jsx($n, { columns: m.columns, numericTemplate: at, numericTotal: oe.numericTotal, nameWidth: oe.nameWidth, scrollBarWidth: Fe, className: m.headerClassName }) }),
1586
- /* @__PURE__ */ u.jsx("div", { ref: Re, className: "dt-grid-body", children: hr }),
1587
- Me > 0 && /* @__PURE__ */ u.jsxs("div", { className: "dt-grid-hscrollbar-row", children: [
1628
+ nn && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1629
+ /* @__PURE__ */ u.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ u.jsx(Jn, { columns: N.columns, numericTemplate: ht, numericTotal: oe.numericTotal, nameWidth: oe.nameWidth, scrollBarWidth: We, className: N.headerClassName }) }),
1630
+ /* @__PURE__ */ u.jsx("div", { ref: De, className: "dt-grid-body", children: xr }),
1631
+ Be > 0 && /* @__PURE__ */ u.jsxs("div", { className: "dt-grid-hscrollbar-row", children: [
1588
1632
  /* @__PURE__ */ u.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: oe.nameWidth }, "aria-hidden": "true" }),
1589
1633
  /* @__PURE__ */ u.jsx(
1590
- sn,
1634
+ mn,
1591
1635
  {
1592
1636
  horizontal: !0,
1593
1637
  contentSize: oe.numericTotal,
1594
1638
  viewportSize: oe.numericVisible,
1595
- scrollPosition: $e,
1596
- scrollBarWidth: Fe,
1597
- locale: ne,
1598
- labels: ue,
1639
+ scrollPosition: Ge,
1640
+ scrollBarWidth: We,
1641
+ locale: be,
1642
+ labels: Ie,
1599
1643
  onScroll: (s) => {
1600
- const d = typeof s == "function" ? s($e) : s, v = Nt(d, Me);
1601
- return He(v), v;
1644
+ const c = typeof s == "function" ? s(Ge) : s, S = Lt(c, Be);
1645
+ return Ve(S), S;
1602
1646
  }
1603
1647
  }
1604
1648
  ),
1605
- /* @__PURE__ */ u.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: Fe }, "aria-hidden": "true" })
1649
+ /* @__PURE__ */ u.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: We }, "aria-hidden": "true" })
1606
1650
  ] }),
1607
- Jr && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1608
- /* @__PURE__ */ u.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ u.jsx(Hn, { columns: m.columns, numericTemplate: at, numericTotal: oe.numericTotal, nameWidth: oe.nameWidth, scrollBarWidth: Fe, allEntries: Ur, className: m.footerClassName }) })
1651
+ on && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1652
+ /* @__PURE__ */ u.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ u.jsx(Zn, { columns: N.columns, numericTemplate: ht, numericTotal: oe.numericTotal, nameWidth: oe.nameWidth, scrollBarWidth: We, allEntries: rn, className: N.footerClassName }) })
1609
1653
  ]
1610
1654
  }
1611
1655
  );
1612
- }, xo = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: t } = {}) => {
1613
- const [r, o] = rn(), [a, l] = ie(() => {
1656
+ }, Mo = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: t } = {}) => {
1657
+ const [r, n] = un(), [a, i] = ie(() => {
1614
1658
  if (typeof window < "u" && t)
1615
1659
  try {
1616
- const f = window.localStorage.getItem(t);
1617
- if (f) {
1618
- const w = JSON.parse(f);
1619
- return new Set(w);
1660
+ const m = window.localStorage.getItem(t);
1661
+ if (m) {
1662
+ const y = JSON.parse(m);
1663
+ return new Set(y);
1620
1664
  }
1621
- } catch (f) {
1622
- console.error("[useDirectoryTreeState] Error reading from localStorage", f);
1665
+ } catch (m) {
1666
+ console.error("[useDirectoryTreeState] Error reading from localStorage", m);
1623
1667
  }
1624
1668
  return e;
1625
- }), c = j((f) => {
1626
- o(() => {
1627
- l((w) => {
1628
- const S = new Set(w);
1629
- return f(S), S;
1669
+ }), l = j((m) => {
1670
+ n(() => {
1671
+ i((y) => {
1672
+ const x = new Set(y);
1673
+ return m(x), x;
1630
1674
  });
1631
1675
  });
1632
- }, []), i = j(
1633
- (f, w) => {
1634
- c((S) => {
1635
- for (const M of f)
1636
- w(S, M);
1676
+ }, []), d = j(
1677
+ (m, y) => {
1678
+ l((x) => {
1679
+ for (const $ of m)
1680
+ y(x, $);
1637
1681
  });
1638
1682
  },
1639
- [c]
1683
+ [l]
1640
1684
  );
1641
- Se(() => {
1685
+ Pe(() => {
1642
1686
  if (t && typeof window < "u")
1643
1687
  try {
1644
1688
  window.localStorage.setItem(t, JSON.stringify(Array.from(a)));
1645
- } catch (f) {
1646
- console.warn(`Error setting localStorage key "${t}":`, f);
1689
+ } catch (m) {
1690
+ console.warn(`Error setting localStorage key "${t}":`, m);
1647
1691
  }
1648
1692
  }, [a, t]);
1649
- const R = j(
1650
- (f) => {
1651
- i([f], (w, S) => {
1652
- w.has(S) ? w.delete(S) : w.add(S);
1693
+ const b = j(
1694
+ (m) => {
1695
+ d([m], (y, x) => {
1696
+ y.has(x) ? y.delete(x) : y.add(x);
1653
1697
  });
1654
1698
  },
1655
- [i]
1656
- ), E = j(
1657
- (f) => {
1658
- i([f], (w, S) => {
1659
- w.add(S);
1699
+ [d]
1700
+ ), v = j(
1701
+ (m) => {
1702
+ d([m], (y, x) => {
1703
+ y.add(x);
1660
1704
  });
1661
1705
  },
1662
- [i]
1663
- ), g = j(
1664
- (f) => {
1665
- i([f], (w, S) => {
1666
- w.delete(S);
1706
+ [d]
1707
+ ), w = j(
1708
+ (m) => {
1709
+ d([m], (y, x) => {
1710
+ y.delete(x);
1667
1711
  });
1668
1712
  },
1669
- [i]
1670
- ), h = j(
1671
- (f) => {
1672
- i(f, (w, S) => {
1673
- w.delete(S);
1713
+ [d]
1714
+ ), E = j(
1715
+ (m) => {
1716
+ d(m, (y, x) => {
1717
+ y.delete(x);
1674
1718
  });
1675
1719
  },
1676
- [i]
1677
- ), p = j(
1678
- (f) => {
1679
- i(f, (w, S) => {
1680
- w.add(S);
1720
+ [d]
1721
+ ), T = j(
1722
+ (m) => {
1723
+ d(m, (y, x) => {
1724
+ y.add(x);
1681
1725
  });
1682
1726
  },
1683
- [i]
1684
- ), x = j(() => {
1685
- c((f) => {
1686
- f.clear();
1727
+ [d]
1728
+ ), h = j(() => {
1729
+ l((m) => {
1730
+ m.clear();
1687
1731
  });
1688
- }, [c]), N = j((f) => a.has(f), [a]);
1732
+ }, [l]), g = j((m) => a.has(m), [a]);
1689
1733
  return {
1690
1734
  expanded: a,
1691
- toggle: R,
1692
- expand: E,
1693
- collapse: g,
1694
- collapseMultiple: h,
1695
- expandMultiple: p,
1696
- collapseAll: x,
1697
- isExpanded: N,
1735
+ toggle: b,
1736
+ expand: v,
1737
+ collapse: w,
1738
+ collapseMultiple: E,
1739
+ expandMultiple: T,
1740
+ collapseAll: h,
1741
+ isExpanded: g,
1698
1742
  isPending: r
1699
1743
  };
1700
1744
  };
1701
1745
  export {
1702
- Gn as DIRECTORY_TREE_LABEL_CATALOGS,
1703
- Sr as DIRECTORY_TREE_LABEL_KEYS,
1704
- wo as DirectoryTree,
1705
- D as directoryTreeClasses,
1706
- Kn as resolveDirectoryTreeLabels,
1707
- xo as useDirectoryTreeState
1746
+ ro as DIRECTORY_TREE_LABEL_CATALOGS,
1747
+ jr as DIRECTORY_TREE_LABEL_KEYS,
1748
+ Fo as DirectoryTree,
1749
+ F as directoryTreeClasses,
1750
+ oo as resolveDirectoryTreeLabels,
1751
+ Mo as useDirectoryTreeState
1708
1752
  };