@aiquants/directory-tree 6.1.0 → 6.1.1

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,13 +1,13 @@
1
- import * as he from "react";
2
- import pr, { useRef as Y, useEffect as De, useCallback as _, memo as Ft, useState as fe, useMemo as M, useLayoutEffect as In, useImperativeHandle as yr, useTransition as gr } from "react";
3
- import { VIRTUAL_SCROLL_LABEL_KEYS as pt, VIRTUAL_SCROLL_LABEL_CATALOGS as kn, resolveVirtualScrollLocale as zn, resolveVirtualScrollLabels as br, VirtualScroll as vr, ScrollBar as Sr } from "@aiquants/virtualscroll";
1
+ import * as fe from "react";
2
+ import mr, { useRef as G, useEffect as $e, useCallback as _, memo as Ft, useState as ge, useMemo as M, useSyncExternalStore as pr, useLayoutEffect as Rn, useImperativeHandle as yr, useTransition as gr } from "react";
3
+ import { VIRTUAL_SCROLL_LABEL_KEYS as mt, VIRTUAL_SCROLL_LABEL_CATALOGS as In, resolveVirtualScrollLocale as Mn, resolveVirtualScrollLabels as br, VirtualScroll as vr, ScrollBar as Sr } from "@aiquants/virtualscroll";
4
4
  import { twMerge as U } from "tailwind-merge";
5
5
  import { FileIcon as wr, FileText as Er, FileCode as xr, FileZip as Rr, FileVideo as Ir, FileAudio as kr, FileImage as Nr, FilePpt as Tr, FileDoc as Pr, FileCsv as _r, FileXls as Cr, FilePdf as Or, FileMd as jr } from "@phosphor-icons/react";
6
- var mt = { exports: {} }, qe = {};
7
- var Nn;
6
+ var ht = { exports: {} }, qe = {};
7
+ var kn;
8
8
  function Ar() {
9
- if (Nn) return qe;
10
- Nn = 1;
9
+ if (kn) return qe;
10
+ kn = 1;
11
11
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
12
12
  function n(r, a, i) {
13
13
  var l = null;
@@ -27,9 +27,9 @@ function Ar() {
27
27
  return qe.Fragment = t, qe.jsx = n, qe.jsxs = n, qe;
28
28
  }
29
29
  var Qe = {};
30
- var Tn;
30
+ var Nn;
31
31
  function Lr() {
32
- return Tn || (Tn = 1, process.env.NODE_ENV !== "production" && (function() {
32
+ return Nn || (Nn = 1, process.env.NODE_ENV !== "production" && (function() {
33
33
  function e(o) {
34
34
  if (o == null) return null;
35
35
  if (typeof o == "function")
@@ -105,14 +105,14 @@ function Lr() {
105
105
  }
106
106
  }
107
107
  function a() {
108
- var o = B.A;
108
+ var o = Y.A;
109
109
  return o === null ? null : o.getOwner();
110
110
  }
111
111
  function i() {
112
112
  return Error("react-stack-top-frame");
113
113
  }
114
114
  function l(o) {
115
- if (me.call(o, "key")) {
115
+ if (he.call(o, "key")) {
116
116
  var u = Object.getOwnPropertyDescriptor(o, "key").get;
117
117
  if (u && u.isReactWarning) return !1;
118
118
  }
@@ -120,7 +120,7 @@ function Lr() {
120
120
  }
121
121
  function d(o, u) {
122
122
  function I() {
123
- pe || (pe = !0, console.error(
123
+ me || (me = !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
125
  u
126
126
  ));
@@ -182,7 +182,7 @@ function Lr() {
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
184
  else x(j);
185
- if (me.call(u, "key")) {
185
+ if (he.call(u, "key")) {
186
186
  j = e(o);
187
187
  var ee = Object.keys(u).filter(function(Ne) {
188
188
  return Ne !== "key";
@@ -202,8 +202,8 @@ React keys must be passed directly to JSX without using spread:
202
202
  }
203
203
  if (j = null, I !== void 0 && (n(I), j = "" + I), l(u) && (n(u.key), j = "" + u.key), "key" in u) {
204
204
  I = {};
205
- for (var ye in u)
206
- ye !== "key" && (I[ye] = u[ye]);
205
+ for (var pe in u)
206
+ pe !== "key" && (I[pe] = u[pe]);
207
207
  } else I = u;
208
208
  return j && d(
209
209
  I,
@@ -223,7 +223,7 @@ React keys must be passed directly to JSX without using spread:
223
223
  function T(o) {
224
224
  return typeof o == "object" && o !== null && o.$$typeof === y;
225
225
  }
226
- var m = pr, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), p = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), F = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), C = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), D = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), Q = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), z = /* @__PURE__ */ Symbol.for("react.client.reference"), B = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, me = Object.prototype.hasOwnProperty, W = Array.isArray, oe = console.createTask ? console.createTask : function() {
226
+ var m = mr, y = /* @__PURE__ */ Symbol.for("react.transitional.element"), p = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), F = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), C = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), D = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), Q = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), z = /* @__PURE__ */ Symbol.for("react.client.reference"), Y = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, he = Object.prototype.hasOwnProperty, W = Array.isArray, oe = console.createTask ? console.createTask : function() {
227
227
  return null;
228
228
  };
229
229
  m = {
@@ -231,36 +231,36 @@ React keys must be passed directly to JSX without using spread:
231
231
  return o();
232
232
  }
233
233
  };
234
- var pe, V = {}, X = m.react_stack_bottom_frame.bind(
234
+ var me, V = {}, X = m.react_stack_bottom_frame.bind(
235
235
  m,
236
236
  i
237
- )(), xe = oe(r(i)), be = {};
237
+ )(), Ee = oe(r(i)), be = {};
238
238
  Qe.Fragment = w, Qe.jsx = function(o, u, I) {
239
- var E = 1e4 > B.recentlyCreatedOwnerStacks++;
239
+ var E = 1e4 > Y.recentlyCreatedOwnerStacks++;
240
240
  return N(
241
241
  o,
242
242
  u,
243
243
  I,
244
244
  !1,
245
245
  E ? Error("react-stack-top-frame") : X,
246
- E ? oe(r(o)) : xe
246
+ E ? oe(r(o)) : Ee
247
247
  );
248
248
  }, Qe.jsxs = function(o, u, I) {
249
- var E = 1e4 > B.recentlyCreatedOwnerStacks++;
249
+ var E = 1e4 > Y.recentlyCreatedOwnerStacks++;
250
250
  return N(
251
251
  o,
252
252
  u,
253
253
  I,
254
254
  !0,
255
255
  E ? Error("react-stack-top-frame") : X,
256
- E ? oe(r(o)) : xe
256
+ E ? oe(r(o)) : Ee
257
257
  );
258
258
  };
259
259
  })()), Qe;
260
260
  }
261
- var Pn;
261
+ var Tn;
262
262
  function Dr() {
263
- return Pn || (Pn = 1, process.env.NODE_ENV === "production" ? mt.exports = Ar() : mt.exports = Lr()), mt.exports;
263
+ return Tn || (Tn = 1, process.env.NODE_ENV === "production" ? ht.exports = Ar() : ht.exports = Lr()), ht.exports;
264
264
  }
265
265
  var f = Dr();
266
266
  function $r({
@@ -268,7 +268,7 @@ function $r({
268
268
  titleId: t,
269
269
  ...n
270
270
  }, r) {
271
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
271
+ return /* @__PURE__ */ fe.createElement("svg", Object.assign({
272
272
  xmlns: "http://www.w3.org/2000/svg",
273
273
  viewBox: "0 0 24 24",
274
274
  fill: "currentColor",
@@ -276,21 +276,21 @@ function $r({
276
276
  "data-slot": "icon",
277
277
  ref: r,
278
278
  "aria-labelledby": t
279
- }, n), e ? /* @__PURE__ */ he.createElement("title", {
279
+ }, n), e ? /* @__PURE__ */ fe.createElement("title", {
280
280
  id: t
281
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
281
+ }, e) : null, /* @__PURE__ */ fe.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 Fr = /* @__PURE__ */ he.forwardRef($r);
287
+ const Fr = /* @__PURE__ */ fe.forwardRef($r);
288
288
  function Mr({
289
289
  title: e,
290
290
  titleId: t,
291
291
  ...n
292
292
  }, r) {
293
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
293
+ return /* @__PURE__ */ fe.createElement("svg", Object.assign({
294
294
  xmlns: "http://www.w3.org/2000/svg",
295
295
  viewBox: "0 0 24 24",
296
296
  fill: "currentColor",
@@ -298,21 +298,21 @@ function Mr({
298
298
  "data-slot": "icon",
299
299
  ref: r,
300
300
  "aria-labelledby": t
301
- }, n), e ? /* @__PURE__ */ he.createElement("title", {
301
+ }, n), e ? /* @__PURE__ */ fe.createElement("title", {
302
302
  id: t
303
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
303
+ }, e) : null, /* @__PURE__ */ fe.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 zr = /* @__PURE__ */ he.forwardRef(Mr);
309
+ const zr = /* @__PURE__ */ fe.forwardRef(Mr);
310
310
  function Hr({
311
311
  title: e,
312
312
  titleId: t,
313
313
  ...n
314
314
  }, r) {
315
- return /* @__PURE__ */ he.createElement("svg", Object.assign({
315
+ return /* @__PURE__ */ fe.createElement("svg", Object.assign({
316
316
  xmlns: "http://www.w3.org/2000/svg",
317
317
  viewBox: "0 0 24 24",
318
318
  fill: "currentColor",
@@ -320,17 +320,17 @@ function Hr({
320
320
  "data-slot": "icon",
321
321
  ref: r,
322
322
  "aria-labelledby": t
323
- }, n), e ? /* @__PURE__ */ he.createElement("title", {
323
+ }, n), e ? /* @__PURE__ */ fe.createElement("title", {
324
324
  id: t
325
- }, e) : null, /* @__PURE__ */ he.createElement("path", {
325
+ }, e) : null, /* @__PURE__ */ fe.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 Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
329
+ const Wr = /* @__PURE__ */ fe.forwardRef(Hr), Br = {
330
330
  icon: { light: "#6a7282", dark: "#99a1af" },
331
331
  iconSelected: { light: "#1447e6", dark: "#51a2ff" },
332
332
  checkedRing: { light: "#155dfc", dark: "#51a2ff" }
333
- }, Jo = {
333
+ }, Qo = {
334
334
  markdown: { light: "#0084d1", dark: "#00bcff" },
335
335
  pdf: { light: "#e7000b", dark: "#ff6467" },
336
336
  spreadsheet: { light: "#007a55", dark: "#00d492" },
@@ -343,7 +343,7 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
343
343
  archive: { light: "#bb4d00", dark: "#ffb900" },
344
344
  code: { light: "#9810fa", dark: "#c27aff" },
345
345
  text: Br.icon
346
- }, Hn = "#71829b", ce = {
346
+ }, zn = "#71829b", ce = {
347
347
  rowHover: "hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",
348
348
  rowSelected: "bg-[color:light-dark(#eff6ff,#162456)]",
349
349
  checkedRing: "inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",
@@ -365,7 +365,7 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
365
365
  archive: "text-[color:light-dark(#bb4d00,#ffb900)]",
366
366
  code: "text-[color:light-dark(#9810fa,#c27aff)]",
367
367
  text: "text-[color:light-dark(#6a7282,#99a1af)]"
368
- }, Wn = "text-[length:var(--dt-font-size-body,0.8125rem)]", Yr = `${Wn} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`, Ot = 44, Gr = 12, Vr = 8, de = 14, Xr = 14, Bn = (e) => e === void 0 ? void 0 : { fontSize: typeof e == "number" ? `${e}px` : e }, ae = (e) => ({ width: e, height: e }), L = {
368
+ }, Hn = "text-[length:var(--dt-font-size-body,0.8125rem)]", Yr = `${Hn} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`, Ot = 44, Gr = 12, Vr = 8, de = 14, Xr = 14, Wn = (e) => e === void 0 ? void 0 : { fontSize: typeof e == "number" ? `${e}px` : e }, ae = (e) => ({ width: e, height: e }), L = {
369
369
  container: "directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",
370
370
  // 保留中も薄めない。薄めた文字と印は地と混ざり、配色表の組の対比 (文字 7:1・印 3:1) を割る
371
371
  containerPending: "cursor-progress",
@@ -383,13 +383,13 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
383
383
  typeIcon: `directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${ce.icon}`,
384
384
  typeIconSelected: `directory-tree-type-icon--selected ${ce.iconSelected}`,
385
385
  // 文字の行の高さ (line-height) は行 (entry) の body の行を受け継ぐため、名前には文字の大きさだけを付ける
386
- name: `directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${Wn} font-normal ${ce.name}`,
386
+ name: `directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${Hn} font-normal ${ce.name}`,
387
387
  nameDirectory: "directory-tree-name--directory font-medium",
388
388
  nameSelected: `directory-tree-name--selected font-semibold ${ce.nameSelected}`
389
389
  }, Mt = (e) => {
390
390
  const t = e.slice(e.lastIndexOf("/") + 1), n = t.lastIndexOf(".");
391
391
  return n <= 0 ? "" : t.slice(n + 1).toLowerCase();
392
- }, Kr = /^[a-z][a-z\d+.-]*:\/\//i, _n = (e) => Mt(Kr.test(e) ? e.split(/[?#]/, 1)[0] : e), Yn = (e) => Mt(e.name) || _n(e.relativePath) || _n(e.absolutePath), Gn = ({ isDirectory: e, isExpanded: t, showExpandIcons: n, useCanvasExpandIcons: r, expandIconSize: a }) => {
392
+ }, Kr = /^[a-z][a-z\d+.-]*:\/\//i, Pn = (e) => Mt(Kr.test(e) ? e.split(/[?#]/, 1)[0] : e), Bn = (e) => Mt(e.name) || Pn(e.relativePath) || Pn(e.absolutePath), Yn = ({ isDirectory: e, isExpanded: t, showExpandIcons: n, useCanvasExpandIcons: r, expandIconSize: a }) => {
393
393
  const i = a ? { width: a, height: a } : void 0, l = a ? "" : "h-4 w-4";
394
394
  return !(n && e) || r ? /* @__PURE__ */ f.jsx("span", { className: l, style: i, "aria-hidden": "true" }) : t ? /* @__PURE__ */ f.jsx(Fr, { className: l, style: i }) : /* @__PURE__ */ f.jsx(zr, { className: l, style: i });
395
395
  }, At = (e, t) => {
@@ -451,12 +451,12 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
451
451
  }, to = (e, t, n, r) => {
452
452
  const a = Qr(e), i = eo(a), l = Zr.get((t || (n ? Mt(n) : "")).toLowerCase()), h = (qr.has(a) ? [l, i] : [i, l]).find((b) => b !== void 0);
453
453
  return h === void 0 ? /* @__PURE__ */ f.jsx(wr, { className: ce.icon, style: ae(r) }) : Ur[h](r);
454
- }, Vn = (e, t, n) => {
454
+ }, Gn = (e, t, n) => {
455
455
  const { entry: r, isDirectory: a, isExpanded: i, extension: l, mimeType: d } = e;
456
456
  let h;
457
457
  const b = d || r.mimeType;
458
458
  return r.icon !== void 0 ? h = r.icon : a ? h = i && t?.directoryExpanded || t?.directory || /* @__PURE__ */ f.jsx(Wr, { style: ae(n) }) : l && t?.fileByExtension?.[l] ? h = t.fileByExtension[l] : h = t?.file || to(b, l, r.name, n), At(typeof h == "function" ? h(e) : h, r.absolutePath);
459
- }, no = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xn = (e) => {
459
+ }, no = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Vn = (e) => {
460
460
  if (!e)
461
461
  return;
462
462
  const t = Object.entries(e).filter(([, n]) => n != null);
@@ -509,20 +509,20 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
509
509
  "textDecorationThickness",
510
510
  "textUnderlineOffset",
511
511
  "textTransform"
512
- ], oo = ["color", "opacity"], so = "the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)", ao = new Set(ro), io = new Set(oo), Cn = (e, t) => {
512
+ ], oo = ["color", "opacity"], so = "the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)", ao = new Set(ro), io = new Set(oo), _n = (e, t) => {
513
513
  const n = t === void 0 ? e.option : `${e.option}.${t}`;
514
514
  return e.absolutePath === void 0 ? n : `${n} of "${e.absolutePath}"`;
515
- }, Kn = (e, t, n, r) => {
515
+ }, Xn = (e, t, n, r) => {
516
516
  if (e !== void 0) {
517
517
  if (typeof e != "object" || e === null)
518
- throw new RangeError(`${Cn(n, void 0)} must be an object of CSS properties or undefined, got ${e === null ? "null" : typeof e}.`);
518
+ throw new RangeError(`${_n(n, void 0)} must be an object of CSS properties or undefined, got ${e === null ? "null" : typeof e}.`);
519
519
  for (const [a, i] of Object.entries(e))
520
520
  if (i !== void 0 && !t.has(a))
521
- throw new RangeError(`${Cn(n, a)} cannot be set: ${so}, so ${r}.`);
521
+ throw new RangeError(`${_n(n, a)} cannot be set: ${so}, so ${r}.`);
522
522
  }
523
- }, Ge = (e, t) => Kn(e, ao, t, "a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"), lo = (e, t) => Kn(e, io, t, "the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"), co = 500, Un = ({ entry: e, isDirectory: t, isExpanded: n, isItemSelected: r, selectionMode: a, onSelectionChange: i, onEntryClick: l, toggleDirectory: d, onToggleDirectoryRecursive: h }) => {
524
- const b = Y(null);
525
- return De(
523
+ }, Ge = (e, t) => Xn(e, ao, t, "a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"), lo = (e, t) => Xn(e, io, t, "the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"), co = 500, Kn = ({ entry: e, isDirectory: t, isExpanded: n, isItemSelected: r, selectionMode: a, onSelectionChange: i, onEntryClick: l, toggleDirectory: d, onToggleDirectoryRecursive: h }) => {
524
+ const b = G(null);
525
+ return $e(
526
526
  () => () => {
527
527
  b.current && window.clearTimeout(b.current);
528
528
  },
@@ -544,10 +544,10 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
544
544
  },
545
545
  [t, e, n, h, d, l, a, i, r]
546
546
  );
547
- }, Jn = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", On = (e, t) => e.children !== void 0 && t(e.absolutePath), Zn = (e, t) => ({
547
+ }, Un = (e) => e === "right" ? "dt-grid-cell--right" : e === "center" ? "dt-grid-cell--center" : "", Cn = (e, t) => e.children !== void 0 && t(e.absolutePath), Jn = (e, t) => ({
548
548
  width: e,
549
549
  gridTemplateColumns: t
550
- }), qn = Ft(
550
+ }), Zn = Ft(
551
551
  ({
552
552
  entry: e,
553
553
  indentLevel: t,
@@ -567,16 +567,16 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
567
567
  rowClassName: p,
568
568
  selection: { onEntryClick: w, selectedPath: v, currentPath: F, mode: P = "none", selectedItems: C, onSelectionChange: g },
569
569
  expansion: { toggleDirectory: D, onToggleDirectoryRecursive: $ },
570
- visual: { iconOverrides: O, showExpandIcons: Q = !0, showDirectoryIcons: J = !0, showFileIcons: z = !0, useCanvasExpandIcons: B = !1, expandIconSize: me, typeIconSize: W, fontSize: oe, indentSize: pe, highlightStyles: V, expandIconClassName: X, expandIconStyle: xe }
570
+ visual: { iconOverrides: O, showExpandIcons: Q = !0, showDirectoryIcons: J = !0, showFileIcons: z = !0, useCanvasExpandIcons: Y = !1, expandIconSize: he, typeIconSize: W, fontSize: oe, indentSize: me, highlightStyles: V, expandIconClassName: X, expandIconStyle: Ee }
571
571
  }) => {
572
572
  Ge(e.style, { option: "entry.style", absolutePath: e.absolutePath });
573
- const [be, o] = fe(!1), u = e.children !== void 0, I = u && N(e.absolutePath), E = e.absolutePath === v, ve = e.absolutePath === F, k = !u && !!C?.has(e.absolutePath), j = u ? void 0 : Yn(e), ee = Un({ entry: e, isDirectory: u, isExpanded: I, isItemSelected: k, selectionMode: P, onSelectionChange: g, onEntryClick: w, toggleDirectory: D, onToggleDirectoryRecursive: $ }), ye = be ? V?.hoverClassName !== void 0 ? V.hoverClassName : L.entryHover : "", Ne = (() => {
573
+ const [be, o] = ge(!1), u = e.children !== void 0, I = u && N(e.absolutePath), E = e.absolutePath === v, ve = e.absolutePath === F, k = !u && !!C?.has(e.absolutePath), j = u ? void 0 : Bn(e), ee = Kn({ entry: e, isDirectory: u, isExpanded: I, isItemSelected: k, selectionMode: P, onSelectionChange: g, onEntryClick: w, toggleDirectory: D, onToggleDirectoryRecursive: $ }), pe = be ? V?.hoverClassName !== void 0 ? V.hoverClassName : L.entryHover : "", Ne = (() => {
574
574
  if (u) {
575
575
  if (E) return V?.directorySelectedClassName !== void 0 ? V.directorySelectedClassName : L.entrySelected;
576
576
  } else if (E || k)
577
577
  return V?.itemSelectedClassName !== void 0 ? V.itemSelectedClassName : U(E && L.entrySelected, k && L.entryItemSelected);
578
578
  return "";
579
- })(), A = typeof p == "function" ? p(e) : p, Se = U("dt-grid-row cursor-pointer select-none", ye, Ne, A, e.className), Z = U(L.expandIcon, X, (E || k) && L.expandIconSelected), $e = U(L.typeIcon, (E || k) && L.typeIconSelected), se = U("dt-grid-name-label ml-1", ce.name, u && L.nameDirectory, (E || k) && L.nameSelected), te = Gn({ isDirectory: u, isExpanded: I, showExpandIcons: Q, useCanvasExpandIcons: B, expandIconSize: me }), ie = (u ? J : z) ? Vn({ entry: e, isDirectory: u, isExpanded: I, isSelected: E, isItemSelected: k, extension: j, mimeType: e.mimeType }, O, W) : null, Te = { indentLevel: t, isDirectory: u, isExpanded: I }, [Oe, ...Pe] = x, Fe = Oe?.render ? Oe.render(e, Te) : e.label ?? e.name, Re = {
579
+ })(), A = typeof p == "function" ? p(e) : p, Se = U("dt-grid-row cursor-pointer select-none", pe, Ne, A, e.className), Z = U(L.expandIcon, X, (E || k) && L.expandIconSelected), Fe = U(L.typeIcon, (E || k) && L.typeIconSelected), se = U("dt-grid-name-label ml-1", ce.name, u && L.nameDirectory, (E || k) && L.nameSelected), te = Yn({ isDirectory: u, isExpanded: I, showExpandIcons: Q, useCanvasExpandIcons: Y, expandIconSize: he }), ie = (u ? J : z) ? Gn({ entry: e, isDirectory: u, isExpanded: I, isSelected: E, isItemSelected: k, extension: j, mimeType: e.mimeType }, O, W) : null, Te = { indentLevel: t, isDirectory: u, isExpanded: I }, [xe, ...Oe] = x, Re = xe?.render ? xe.render(e, Te) : e.label ?? e.name, Ve = {
580
580
  ...be ? V?.hoverStyle : {},
581
581
  ...u && E ? V?.directorySelectedStyle : {},
582
582
  ...!u && (E || k) ? V?.itemSelectedStyle : {}
@@ -585,7 +585,7 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
585
585
  "div",
586
586
  {
587
587
  className: Se,
588
- style: { ...Re, ...e.style, height: b },
588
+ style: { ...Ve, ...e.style, height: b },
589
589
  role: "row",
590
590
  "aria-expanded": u ? I : void 0,
591
591
  "aria-level": t + 1,
@@ -594,7 +594,7 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
594
594
  "aria-rowindex": a,
595
595
  "aria-selected": P === "none" ? void 0 : h,
596
596
  "aria-current": ve ? "page" : void 0,
597
- ...Xn(e.data),
597
+ ...Vn(e.data),
598
598
  "data-entry-type": u ? "directory" : "file",
599
599
  "data-entry-expanded": u ? String(I) : void 0,
600
600
  "data-entry-selected": E ? "true" : void 0,
@@ -602,38 +602,38 @@ const Wr = /* @__PURE__ */ he.forwardRef(Hr), Br = {
602
602
  onClick: ee,
603
603
  onMouseEnter: () => o(!0),
604
604
  onMouseLeave: () => o(!1),
605
- onFocus: (G) => l(i, e.absolutePath, G.currentTarget),
606
- onBlur: (G) => d(e.absolutePath, G.currentTarget),
607
- onKeyDown: (G) => {
608
- if (G.key === "Enter") {
609
- if (G.repeat) {
610
- G.preventDefault();
605
+ onFocus: (B) => l(i, e.absolutePath, B.currentTarget),
606
+ onBlur: (B) => d(e.absolutePath, B.currentTarget),
607
+ onKeyDown: (B) => {
608
+ if (B.key === "Enter") {
609
+ if (B.repeat) {
610
+ B.preventDefault();
611
611
  return;
612
612
  }
613
- ee(G);
613
+ ee(B);
614
614
  }
615
615
  },
616
616
  tabIndex: 0,
617
617
  children: [
618
- /* @__PURE__ */ f.jsxs("div", { className: U("dt-grid-name-cell", Oe?.className), role: "gridcell", style: { width: y, paddingLeft: Math.max(0, t * pe) }, children: [
619
- (Q || B) && /* @__PURE__ */ f.jsx("span", { className: Z, style: { ...xe, width: de, height: de }, children: te }),
620
- (u ? J : z) && /* @__PURE__ */ f.jsx("span", { className: $e, style: { width: W, height: W }, children: ie }),
621
- /* @__PURE__ */ f.jsx("span", { className: se, style: Bn(oe), children: Fe })
618
+ /* @__PURE__ */ f.jsxs("div", { className: U("dt-grid-name-cell", xe?.className), role: "gridcell", style: { width: y, paddingLeft: Math.max(0, t * me) }, children: [
619
+ (Q || Y) && /* @__PURE__ */ f.jsx("span", { className: Z, style: { ...Ee, width: de, height: de }, children: te }),
620
+ (u ? J : z) && /* @__PURE__ */ f.jsx("span", { className: Fe, style: { width: W, height: W }, children: ie }),
621
+ /* @__PURE__ */ f.jsx("span", { className: se, style: Wn(oe), children: Re })
622
622
  ] }),
623
- Pe.length > 0 && /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-track", style: Zn(m, T), children: Pe.map((G) => /* @__PURE__ */ f.jsx("div", { className: U("dt-grid-cell", Jn(G.align), G.className), role: "gridcell", children: G.render ? G.render(e, Te) : null }, G.key)) }) })
623
+ Oe.length > 0 && /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-track", style: Jn(m, T), children: Oe.map((B) => /* @__PURE__ */ f.jsx("div", { className: U("dt-grid-cell", Un(B.align), B.className), role: "gridcell", children: B.render ? B.render(e, Te) : null }, B.key)) }) })
624
624
  ]
625
625
  }
626
626
  );
627
627
  },
628
628
  (e, t) => {
629
629
  if (e.entry !== t.entry) return !1;
630
- const n = On(e.entry, e.isDirOpen), r = On(t.entry, t.isDirOpen);
630
+ const n = Cn(e.entry, e.isDirOpen), r = Cn(t.entry, t.isDirOpen);
631
631
  return e.indentLevel === t.indentLevel && e.positionInSet === t.positionInSet && e.setSize === t.setSize && e.rowIndex === t.rowIndex && // 焦点の通知は行番号で行うため、番号が変われば描き直してハンドラへ新しい番号を渡す
632
632
  e.flatIndex === t.flatIndex && e.isSelectedForAria === t.isSelectedForAria && e.rowHeight === t.rowHeight && n === r && 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;
633
633
  }
634
634
  );
635
- qn.displayName = "DirectoryTreeGridRow";
636
- const Qn = ({
635
+ Zn.displayName = "DirectoryTreeGridRow";
636
+ const qn = ({
637
637
  kind: e,
638
638
  columns: t,
639
639
  numericTemplate: n,
@@ -647,14 +647,14 @@ const Qn = ({
647
647
  const [, ...b] = t, N = e === "header" ? "dt-grid-name-header" : "dt-grid-name-footer", x = e === "header" ? "dt-grid-header" : "dt-grid-footer", T = e === "header" ? "columnheader" : "gridcell";
648
648
  return /* @__PURE__ */ f.jsxs("div", { className: U(x, ce.gridEdge, l), role: "row", children: [
649
649
  /* @__PURE__ */ f.jsx("div", { className: U(N, "px-1", t[0]?.className), role: T, style: { width: a }, children: d }),
650
- b.length > 0 && /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-track", style: Zn(r, n), children: b.map((m) => /* @__PURE__ */ f.jsx("div", { className: U("dt-grid-cell", Jn(m.align), m.className), role: T, children: h(m) }, m.key)) }) }),
650
+ b.length > 0 && /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-viewport", children: /* @__PURE__ */ f.jsx("div", { className: "dt-grid-numeric-track", style: Jn(r, n), children: b.map((m) => /* @__PURE__ */ f.jsx("div", { className: U("dt-grid-cell", Un(m.align), m.className), role: T, children: h(m) }, m.key)) }) }),
651
651
  /* @__PURE__ */ f.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: i }, "aria-hidden": "true" })
652
652
  ] });
653
- }, uo = ({ columns: e, className: t, ...n }) => /* @__PURE__ */ f.jsx(Qn, { kind: "header", columns: e, className: t, nameContent: e[0]?.header ?? null, renderCell: (r) => r.header ?? null, ...n }), jn = (e, t) => typeof e == "function" ? e(t) : e ?? null, fo = ({ columns: e, allEntries: t, className: n, ...r }) => /* @__PURE__ */ f.jsx(Qn, { kind: "footer", columns: e, className: n, nameContent: jn(e[0]?.footer, t), renderCell: (a) => jn(a.footer, t), ...r }), ho = 240, er = 96, tr = 12, Lt = (e, t) => {
653
+ }, uo = ({ columns: e, className: t, ...n }) => /* @__PURE__ */ f.jsx(qn, { kind: "header", columns: e, className: t, nameContent: e[0]?.header ?? null, renderCell: (r) => r.header ?? null, ...n }), On = (e, t) => typeof e == "function" ? e(t) : e ?? null, fo = ({ columns: e, allEntries: t, className: n, ...r }) => /* @__PURE__ */ f.jsx(qn, { kind: "footer", columns: e, className: n, nameContent: On(e[0]?.footer, t), renderCell: (a) => On(a.footer, t), ...r }), ho = 240, Qn = 96, er = 12, Lt = (e, t) => {
654
654
  const n = e?.width;
655
655
  return typeof n == "number" && Number.isFinite(n) && n > 0 ? n : t;
656
- }, mo = (e) => e.slice(1).map((t) => `${Lt(t, er)}px`).join(" "), po = ({ measuredWidth: e, columns: t, scrollBarWidth: n = tr }) => {
657
- const r = Lt(t[0], ho), a = t.slice(1).reduce((h, b) => h + Lt(b, er), 0), i = Number.isFinite(e) && e > 0 ? e : 0, l = Math.max(0, i - r - Math.max(0, n)), d = Math.max(0, a - l);
656
+ }, mo = (e) => e.slice(1).map((t) => `${Lt(t, Qn)}px`).join(" "), po = ({ measuredWidth: e, columns: t, scrollBarWidth: n = er }) => {
657
+ const r = Lt(t[0], ho), a = t.slice(1).reduce((h, b) => h + Lt(b, Qn), 0), i = Number.isFinite(e) && e > 0 ? e : 0, l = Math.max(0, i - r - Math.max(0, n)), d = Math.max(0, a - l);
658
658
  return { nameWidth: r, numericTotal: a, numericVisible: l, maxHScroll: d };
659
659
  }, jt = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : e > t ? t : e, yo = (e) => {
660
660
  const t = [], n = (r) => {
@@ -662,7 +662,7 @@ const Qn = ({
662
662
  t.push(a), a.children && a.children.length > 0 && n(a.children);
663
663
  };
664
664
  return n(e), t;
665
- }, nr = ["entryKindDirectory", "entryKindFile"], An = [...pt, ...nr], Dt = Object.freeze({
665
+ }, tr = ["entryKindDirectory", "entryKindFile"], jn = [...mt, ...tr], Dt = Object.freeze({
666
666
  en: Object.freeze({
667
667
  entryKindDirectory: "directory",
668
668
  entryKindFile: "file"
@@ -672,41 +672,41 @@ const Qn = ({
672
672
  entryKindFile: "ファイル"
673
673
  })
674
674
  }), go = Object.freeze({
675
- en: Object.freeze({ ...kn.en, ...Dt.en }),
676
- ja: Object.freeze({ ...kn.ja, ...Dt.ja })
677
- }), Ln = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, bo = (e) => {
675
+ en: Object.freeze({ ...In.en, ...Dt.en }),
676
+ ja: Object.freeze({ ...In.ja, ...Dt.ja })
677
+ }), An = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, bo = (e) => {
678
678
  const t = {};
679
679
  let n = !1;
680
- for (const r of pt) {
680
+ for (const r of mt) {
681
681
  const a = Object.hasOwn(e, r) ? e[r] : void 0;
682
682
  a !== void 0 && (t[r] = a, n = !0);
683
683
  }
684
684
  return n ? t : void 0;
685
685
  }, vo = (e, t) => {
686
- const n = zn(e);
686
+ const n = Mn(e);
687
687
  if (t === void 0)
688
688
  return go[n];
689
689
  if (t === null || typeof t != "object")
690
- throw new RangeError(`[directory-tree] labels must be an object; got ${Ln(t)}`);
690
+ throw new RangeError(`[directory-tree] labels must be an object; got ${An(t)}`);
691
691
  const r = Object.getPrototypeOf(t);
692
692
  if (r !== Object.prototype && r !== null)
693
693
  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"}`);
694
694
  for (const l of Object.keys(t))
695
- if (!An.includes(l))
696
- throw new RangeError(`[directory-tree] labels.${l} is not a known label key; expected one of ${An.join(", ")}`);
695
+ if (!jn.includes(l))
696
+ throw new RangeError(`[directory-tree] labels.${l} is not a known label key; expected one of ${jn.join(", ")}`);
697
697
  const i = { ...br(n, bo(t)), ...Dt[n] };
698
- for (const l of nr) {
698
+ for (const l of tr) {
699
699
  const d = Object.hasOwn(t, l) ? t[l] : void 0;
700
700
  if (d !== void 0) {
701
701
  if (typeof d != "string" || d.trim() === "")
702
- throw new RangeError(`[directory-tree] labels.${l} must be a non-blank string; got ${Ln(d)}`);
702
+ throw new RangeError(`[directory-tree] labels.${l} must be a non-blank string; got ${An(d)}`);
703
703
  i[l] = d;
704
704
  }
705
705
  }
706
706
  return Object.freeze(i);
707
707
  }, So = (e) => {
708
708
  const t = {};
709
- for (const n of pt)
709
+ for (const n of mt)
710
710
  t[n] = e[n];
711
711
  return Object.freeze(t);
712
712
  }, wo = () => {
@@ -811,8 +811,8 @@ const Qn = ({
811
811
  e.lineWidth = x, e.beginPath(), e.arc(h.centerX, h.centerY, Math.max(0, N - x * 0.3), 0, Math.PI * 2), e.stroke(), e.lineWidth = T, e.beginPath(), e.moveTo(h.centerX - y, h.centerY), e.lineTo(h.centerX + y, h.centerY), e.stroke(), h.isExpanded || (e.beginPath(), e.moveTo(h.centerX, h.centerY - y), e.lineTo(h.centerX, h.centerY + y), e.stroke());
812
812
  }
813
813
  e.strokeStyle = a, e.lineWidth = i, e.lineCap = l, e.lineJoin = d;
814
- }, rr = Ft(({ segmentsByItem: e, glyphsByItem: t, itemHeight: n, width: r, viewportHeight: a, scrollPosition: i, color: l = Hn, strokeWidth: d = 1, renderStartIndex: h, renderEndIndex: b, lookaheadEndIndex: N, devicePixelRatio: x, expandGlyphColor: T, expandGlyphSize: m }) => {
815
- const y = Y(null), p = Y(null), w = Y({
814
+ }, nr = Ft(({ segmentsByItem: e, glyphsByItem: t, itemHeight: n, width: r, viewportHeight: a, scrollPosition: i, color: l = zn, strokeWidth: d = 1, renderStartIndex: h, renderEndIndex: b, lookaheadEndIndex: N, devicePixelRatio: x, expandGlyphColor: T, expandGlyphSize: m }) => {
815
+ const y = G(null), p = G(null), w = G({
816
816
  segmentsByItem: e,
817
817
  glyphsByItem: t,
818
818
  itemHeight: n,
@@ -854,12 +854,12 @@ const Qn = ({
854
854
  return Math.max(oe, J);
855
855
  }
856
856
  return Math.max(Q, J);
857
- })(), B = Co(g.segmentsByItem, O, z), me = Oo(g.glyphsByItem, O, z);
858
- C.save(), C.scale(D, D), C.clearRect(0, 0, g.width, g.viewportHeight), C.translate(0, -g.scrollPosition), C.strokeStyle = g.color, Ao(C, B, g.strokeWidth), Lo(C, me, g.expandGlyphColor ?? g.color, g.expandGlyphSize), C.restore();
857
+ })(), Y = Co(g.segmentsByItem, O, z), he = Oo(g.glyphsByItem, O, z);
858
+ C.save(), C.scale(D, D), C.clearRect(0, 0, g.width, g.viewportHeight), C.translate(0, -g.scrollPosition), C.strokeStyle = g.color, Ao(C, Y, g.strokeWidth), Lo(C, he, g.expandGlyphColor ?? g.color, g.expandGlyphSize), C.restore();
859
859
  }, []), F = _(() => {
860
860
  p.current === null && (p.current = window.requestAnimationFrame(v));
861
861
  }, [v]);
862
- return De(() => {
862
+ return $e(() => {
863
863
  w.current = {
864
864
  segmentsByItem: e,
865
865
  glyphsByItem: t,
@@ -876,11 +876,11 @@ const Qn = ({
876
876
  expandGlyphColor: T,
877
877
  expandGlyphSize: m
878
878
  }, F();
879
- }, [e, t, n, r, a, i, l, d, h, b, N, x, T, m, F]), De(() => () => {
879
+ }, [e, t, n, r, a, i, l, d, h, b, N, x, T, m, F]), $e(() => () => {
880
880
  p.current !== null && (window.cancelAnimationFrame(p.current), p.current = null);
881
881
  }, []), /* @__PURE__ */ f.jsx("canvas", { ref: y, className: "pointer-events-none absolute top-0 left-0 z-0" });
882
882
  });
883
- rr.displayName = "TreeLineCanvas";
883
+ nr.displayName = "TreeLineCanvas";
884
884
  const Do = (e) => {
885
885
  const t = /* @__PURE__ */ new Map();
886
886
  for (let n = 0; n < e.length; n++) {
@@ -888,7 +888,7 @@ const Do = (e) => {
888
888
  t.has(r) || t.set(r, n);
889
889
  }
890
890
  return t;
891
- }, Dn = (e, t) => e.selectedPath === t ? e : { selectedPath: t, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, $o = (e, t) => ({ ...e, anchor: { path: t, selectionGeneration: e.selectionGeneration, focused: !0 } }), Fo = (e, t) => {
891
+ }, Ln = (e, t) => e.selectedPath === t ? e : { selectedPath: t, selectionGeneration: e.selectionGeneration + 1, anchor: e.anchor }, $o = (e, t) => ({ ...e, anchor: { path: t, selectionGeneration: e.selectionGeneration, focused: !0 } }), Fo = (e, t) => {
892
892
  const { anchor: n, selectionGeneration: r, selectedPath: a } = t;
893
893
  if (n !== null && (n.focused || n.selectionGeneration === r)) {
894
894
  const i = e.get(n.path);
@@ -907,17 +907,18 @@ const Do = (e) => {
907
907
  }, zo = () => {
908
908
  let e = document.getElementById("directory-tree-webkit-scrollbar-hide");
909
909
  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));
910
- }, Ho = (e) => {
911
- const t = Y(null), n = t.current;
912
- return n !== null && pt.every((r) => n[r] === e[r]) ? n : (t.current = e, e);
913
- }, $n = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), Fn = (e) => {
910
+ }, Ho = () => () => {
911
+ }, Wo = () => !0, Bo = () => !1, Yo = (e) => {
912
+ const t = G(null), n = t.current;
913
+ return n !== null && mt.every((r) => n[r] === e[r]) ? n : (t.current = e, e);
914
+ }, Dn = /* @__PURE__ */ new Set(["top", "bottom", "center", "nearest"]), $n = (e) => {
914
915
  const t = e?.align;
915
916
  if (t === void 0)
916
917
  return "top";
917
- if (!$n.has(t))
918
- throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[...$n].join(", ")}.`);
918
+ if (!Dn.has(t))
919
+ throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[...Dn].join(", ")}.`);
919
920
  return t;
920
- }, Wo = {
921
+ }, Go = {
921
922
  position: "absolute",
922
923
  width: 1,
923
924
  height: 1,
@@ -927,7 +928,7 @@ const Do = (e) => {
927
928
  overflow: "hidden",
928
929
  clipPath: "inset(50%)",
929
930
  whiteSpace: "nowrap"
930
- }, Bo = (e, t, n, r, a) => {
931
+ }, Vo = (e, t, n, r, a) => {
931
932
  const i = [], l = [];
932
933
  let d = 0;
933
934
  const h = (b, N, x) => {
@@ -949,7 +950,7 @@ const Do = (e) => {
949
950
  }
950
951
  };
951
952
  return h(e, 0, []), { flatItems: i, lineItems: l, maxIndent: d };
952
- }, Mn = (e, t) => {
953
+ }, Fn = (e, t) => {
953
954
  const n = e.length - 1;
954
955
  if (n <= 0) return 0;
955
956
  let r = 0, a = n - 1, i = 0;
@@ -958,10 +959,10 @@ const Do = (e) => {
958
959
  e[l] <= t ? (i = l, r = l + 1) : a = l - 1;
959
960
  }
960
961
  return i;
961
- }, Yo = (e, t, n, r, a, i) => {
962
- const l = r?.renderStart ?? Math.max(0, Mn(i, a)), d = t > 0 ? Mn(i, a + t) + n : l + n, h = e > 0 ? Math.min(e - 1, Math.max(l, d)) : l, b = r?.renderEnd ?? h, N = e > 0 ? Math.min(e - 1, b + n) : b;
962
+ }, Xo = (e, t, n, r, a, i) => {
963
+ const l = r?.renderStart ?? Math.max(0, Fn(i, a)), d = t > 0 ? Fn(i, a + t) + n : l + n, h = e > 0 ? Math.min(e - 1, Math.max(l, d)) : l, b = r?.renderEnd ?? h, N = e > 0 ? Math.min(e - 1, b + n) : b;
963
964
  return { renderStart: l, renderEnd: b, lookaheadEnd: N };
964
- }, Go = (e, t, n, r) => {
965
+ }, Ko = (e, t, n, r) => {
965
966
  if (e.length === 0)
966
967
  return { segmentsByItem: [], glyphsByItem: [] };
967
968
  const { indentSize: a, typeIconSize: i, glyphSize: l, originX: d } = r, h = Array.from({ length: e.length }, () => []), b = Array.from({ length: e.length }, () => []), N = d + No(r), x = (m) => m * a + N, T = l / 2 + 2;
@@ -977,12 +978,12 @@ const Do = (e) => {
977
978
  continue;
978
979
  let J = !1;
979
980
  for (let z = m; z < e.length; z++) {
980
- const B = e[z];
981
- if (B.indentLevel > O && B.ancestorIsLast.length > O && !B.ancestorIsLast[O]) {
981
+ const Y = e[z];
982
+ if (Y.indentLevel > O && Y.ancestorIsLast.length > O && !Y.ancestorIsLast[O]) {
982
983
  J = !0;
983
984
  break;
984
985
  }
985
- if (z > m && B.indentLevel === O)
986
+ if (z > m && Y.indentLevel === O)
986
987
  break;
987
988
  }
988
989
  if (J) {
@@ -1038,7 +1039,7 @@ const Do = (e) => {
1038
1039
  ]);
1039
1040
  }
1040
1041
  return { segmentsByItem: h, glyphsByItem: b };
1041
- }, or = Ft(
1042
+ }, rr = Ft(
1042
1043
  ({
1043
1044
  entry: e,
1044
1045
  indentLevel: t,
@@ -1063,14 +1064,14 @@ const Do = (e) => {
1063
1064
  iconOverrides: Q,
1064
1065
  showExpandIcons: J = !0,
1065
1066
  showDirectoryIcons: z = !0,
1066
- showFileIcons: B = !0,
1067
- useCanvasExpandIcons: me = !1,
1067
+ showFileIcons: Y = !0,
1068
+ useCanvasExpandIcons: he = !1,
1068
1069
  expandIconSize: W,
1069
1070
  typeIconSize: oe,
1070
- fontSize: pe,
1071
+ fontSize: me,
1071
1072
  indentSize: V,
1072
1073
  highlightStyles: X,
1073
- entryClassName: xe,
1074
+ entryClassName: Ee,
1074
1075
  entryStyle: be,
1075
1076
  nameClassName: o,
1076
1077
  nameStyle: u,
@@ -1083,35 +1084,35 @@ const Do = (e) => {
1083
1084
  }
1084
1085
  }) => {
1085
1086
  Ge(e.style, { option: "entry.style", absolutePath: e.absolutePath });
1086
- const [ye, Ne] = fe(!1), A = e.children !== void 0, Se = A && w(e.absolutePath), Z = e.absolutePath === C, $e = e.absolutePath === g, se = !A && $?.has(e.absolutePath), te = _((ne) => b(d, ne), [b, d]), ie = A ? void 0 : Yn(e), Te = Un({ entry: e, isDirectory: A, isExpanded: Se, isItemSelected: !!se, selectionMode: D, onSelectionChange: O, onEntryClick: P, toggleDirectory: v, onToggleDirectoryRecursive: F }), Oe = ye ? X?.hoverClassName !== void 0 ? X.hoverClassName : L.entryHover : "", Pe = (() => {
1087
+ const [pe, Ne] = ge(!1), A = e.children !== void 0, Se = A && w(e.absolutePath), Z = e.absolutePath === C, Fe = e.absolutePath === g, se = !A && $?.has(e.absolutePath), te = _((ne) => b(d, ne), [b, d]), ie = A ? void 0 : Bn(e), Te = Kn({ entry: e, isDirectory: A, isExpanded: Se, isItemSelected: !!se, selectionMode: D, onSelectionChange: O, onEntryClick: P, toggleDirectory: v, onToggleDirectoryRecursive: F }), xe = pe ? X?.hoverClassName !== void 0 ? X.hoverClassName : L.entryHover : "", Oe = (() => {
1087
1088
  if (A) {
1088
1089
  if (Z)
1089
1090
  return X?.directorySelectedClassName !== void 0 ? X.directorySelectedClassName : L.entrySelected;
1090
1091
  } else if (Z || se)
1091
1092
  return X?.itemSelectedClassName !== void 0 ? X.itemSelectedClassName : U(Z && L.entrySelected, se && L.entryItemSelected);
1092
1093
  return "";
1093
- })(), Fe = U(L.entry, Oe, Pe, xe, e.className), Re = U(L.expandIcon, j, (Z || se) && L.expandIconSelected), G = U(L.typeIcon, (Z || se) && L.typeIconSelected), Ve = U(L.name, o, A && L.nameDirectory, A && I, !A && ve, (Z || se) && L.nameSelected), tt = Gn({ isDirectory: A, isExpanded: Se, showExpandIcons: J && t >= 0, useCanvasExpandIcons: me, expandIconSize: W }), yt = (A ? z : B) ? Vn({ entry: e, isDirectory: A, isExpanded: Se, isSelected: Z, isItemSelected: !!se, extension: ie, mimeType: e.mimeType }, Q, oe) : null, Xe = {
1094
- ...ye ? X?.hoverStyle : {},
1094
+ })(), Re = U(L.entry, xe, Oe, Ee, e.className), Ve = U(L.expandIcon, j, (Z || se) && L.expandIconSelected), B = U(L.typeIcon, (Z || se) && L.typeIconSelected), tt = U(L.name, o, A && L.nameDirectory, A && I, !A && ve, (Z || se) && L.nameSelected), pt = Yn({ isDirectory: A, isExpanded: Se, showExpandIcons: J && t >= 0, useCanvasExpandIcons: he, expandIconSize: W }), Xe = (A ? z : Y) ? Gn({ entry: e, isDirectory: A, isExpanded: Se, isSelected: Z, isItemSelected: !!se, extension: ie, mimeType: e.mimeType }, Q, oe) : null, Ke = {
1095
+ ...pe ? X?.hoverStyle : {},
1095
1096
  ...A && Z ? X?.directorySelectedStyle : {},
1096
1097
  ...!A && (Z || se) ? X?.itemSelectedStyle : {}
1097
- }, Ke = Xn(e.data), nt = { width: oe, height: oe }, rt = Bn(pe), we = n + t * V;
1098
+ }, nt = Vn(e.data), yt = { width: oe, height: oe }, je = Wn(me), Pe = n + t * V;
1098
1099
  return /* @__PURE__ */ f.jsxs(
1099
1100
  "div",
1100
1101
  {
1101
- className: Fe,
1102
+ className: Re,
1102
1103
  style: {
1103
- ...rt,
1104
- ...Xe,
1104
+ ...je,
1105
+ ...Ke,
1105
1106
  ...be,
1106
1107
  ...e.style,
1107
1108
  // 箱の性質はホストのスタイルの後に書く。スプレッドは値が undefined のキーも写し、React はそれを空にするため、
1108
1109
  // 前に書くと検査が通す { height: undefined } が行の高さを消す
1109
- paddingLeft: `${Math.max(0, we)}px`,
1110
- transform: we < 0 ? `translateX(${we}px)` : void 0,
1111
- width: we < 0 ? `calc(100% + ${-we}px)` : void 0,
1110
+ paddingLeft: `${Math.max(0, Pe)}px`,
1111
+ transform: Pe < 0 ? `translateX(${Pe}px)` : void 0,
1112
+ width: Pe < 0 ? `calc(100% + ${-Pe}px)` : void 0,
1112
1113
  height: `${m}px`
1113
1114
  },
1114
- ...Ke,
1115
+ ...nt,
1115
1116
  "data-entry-type": A ? "directory" : "file",
1116
1117
  "data-entry-expanded": A ? String(Se) : void 0,
1117
1118
  "data-entry-selected": Z ? "true" : void 0,
@@ -1136,17 +1137,17 @@ const Do = (e) => {
1136
1137
  "aria-posinset": a,
1137
1138
  "aria-setsize": i,
1138
1139
  "aria-selected": D === "none" ? void 0 : l,
1139
- "aria-current": $e ? "page" : void 0,
1140
+ "aria-current": Fe ? "page" : void 0,
1140
1141
  "aria-label": `${e.name} (${A ? y : p})`,
1141
1142
  children: [
1142
- (J || me) && /* @__PURE__ */ f.jsx("span", { className: Re, style: { ...ee, width: de, height: de }, children: tt }),
1143
- (A ? z : B) && /* @__PURE__ */ f.jsx("span", { className: G, style: nt, children: yt }),
1143
+ (J || he) && /* @__PURE__ */ f.jsx("span", { className: Ve, style: { ...ee, width: de, height: de }, children: pt }),
1144
+ (A ? z : Y) && /* @__PURE__ */ f.jsx("span", { className: B, style: yt, children: Xe }),
1144
1145
  /* @__PURE__ */ f.jsx(
1145
1146
  "span",
1146
1147
  {
1147
- className: Ve,
1148
+ className: tt,
1148
1149
  style: {
1149
- ...rt,
1150
+ ...je,
1150
1151
  ...u,
1151
1152
  ...A ? E : k
1152
1153
  },
@@ -1167,14 +1168,14 @@ const Do = (e) => {
1167
1168
  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;
1168
1169
  }
1169
1170
  );
1170
- or.displayName = "DirectoryEntryItem";
1171
- const sr = (e) => {
1171
+ rr.displayName = "DirectoryEntryItem";
1172
+ const or = (e) => {
1172
1173
  const t = [];
1173
1174
  if (e.children)
1174
1175
  for (const n of e.children)
1175
- n.type === "directory" && (t.push(n.absolutePath), t.push(...sr(n)));
1176
+ n.type === "directory" && (t.push(n.absolutePath), t.push(...or(n)));
1176
1177
  return t;
1177
- }, Zo = ({
1178
+ }, es = ({
1178
1179
  entries: e,
1179
1180
  expansion: { toggle: t, isExpanded: n, expandMultiple: r, collapseMultiple: a, isPending: i, alwaysExpanded: l = !1, doubleClickAction: d = "recursive" },
1180
1181
  selection: { onEntryClick: h, selectedPath: b, currentPath: N, mode: x = "none", selectedItems: T, onSelectionChange: m },
@@ -1183,7 +1184,7 @@ const sr = (e) => {
1183
1184
  style: p,
1184
1185
  ariaLabel: w,
1185
1186
  ariaLabelledBy: v,
1186
- lineColor: F = Hn,
1187
+ lineColor: F = zn,
1187
1188
  showTreeLines: P = !0,
1188
1189
  showExpandIcons: C = !0,
1189
1190
  showDirectoryIcons: g = !0,
@@ -1193,14 +1194,14 @@ const sr = (e) => {
1193
1194
  typeIconSize: Q,
1194
1195
  fontSize: J,
1195
1196
  indentSize: z,
1196
- itemHeight: B = Ot,
1197
- removeRootIndent: me = !1,
1197
+ itemHeight: Y = Ot,
1198
+ removeRootIndent: he = !1,
1198
1199
  highlightStyles: W,
1199
1200
  entryClassName: oe,
1200
- entryStyle: pe,
1201
+ entryStyle: me,
1201
1202
  nameClassName: V,
1202
1203
  nameStyle: X,
1203
- directoryNameClassName: xe,
1204
+ directoryNameClassName: Ee,
1204
1205
  directoryNameStyle: be,
1205
1206
  fileNameClassName: o,
1206
1207
  fileNameStyle: u,
@@ -1211,36 +1212,36 @@ const sr = (e) => {
1211
1212
  grid: k,
1212
1213
  sort: j,
1213
1214
  locale: ee,
1214
- labels: ye,
1215
+ labels: pe,
1215
1216
  ref: Ne
1216
1217
  }) => {
1217
- const A = zn(ee), Se = M(() => vo(ee, ye), [ee, ye]), Z = Ho(So(Se)), { entryKindDirectory: $e, entryKindFile: se } = Se, te = M(() => xo({ indentSize: z, typeIconSize: Q, fontSize: J }), [z, Q, J]);
1218
+ const A = Mn(ee), Se = M(() => vo(ee, pe), [ee, pe]), Z = Yo(So(Se)), { entryKindDirectory: Fe, entryKindFile: se } = Se, te = M(() => xo({ indentSize: z, typeIconSize: Q, fontSize: J }), [z, Q, J]);
1218
1219
  M(() => {
1219
- Ge(pe, { option: "visual.entryStyle" }), Ge(W?.hoverStyle, { option: "visual.highlightStyles.hoverStyle" }), Ge(W?.directorySelectedStyle, { option: "visual.highlightStyles.directorySelectedStyle" }), Ge(W?.itemSelectedStyle, { option: "visual.highlightStyles.itemSelectedStyle" }), lo(E, { option: "visual.expandIconStyle" });
1220
- }, [pe, W, E]);
1221
- const ie = k !== void 0, [Te, Oe] = fe(!1), Pe = Y(null), Fe = Y(null), Re = Y(null), [G, Ve] = fe(0), [tt, yt] = fe(0), [Xe, Ke] = fe(0), [nt, rt] = fe(null), {
1222
- overscanCount: we = 15,
1223
- className: ne,
1224
- background: zt,
1225
- onScroll: Ht,
1226
- onRangeChange: Wt,
1227
- onScrollAdjust: Bt,
1228
- liveRegion: Yt,
1229
- initialScrollIndex: Gt,
1220
+ Ge(me, { option: "visual.entryStyle" }), Ge(W?.hoverStyle, { option: "visual.highlightStyles.hoverStyle" }), Ge(W?.directorySelectedStyle, { option: "visual.highlightStyles.directorySelectedStyle" }), Ge(W?.itemSelectedStyle, { option: "visual.highlightStyles.itemSelectedStyle" }), lo(E, { option: "visual.expandIconStyle" });
1221
+ }, [me, W, E]);
1222
+ const ie = k !== void 0, Te = pr(Ho, Wo, Bo), xe = G(null), Oe = G(null), Re = G(null), [Ve, B] = ge(0), [tt, pt] = ge(0), [Xe, Ke] = ge(0), [nt, yt] = ge(null), {
1223
+ overscanCount: je = 15,
1224
+ className: Pe,
1225
+ background: ne,
1226
+ onScroll: zt,
1227
+ onRangeChange: Ht,
1228
+ onScrollAdjust: Wt,
1229
+ liveRegion: Bt,
1230
+ initialScrollIndex: Yt,
1230
1231
  initialScrollOffset: Me,
1231
- initialScrollAnchor: Vt,
1232
- callbackThrottleMs: Xt = 5,
1233
- contentInsets: Kt,
1234
- onItemFocus: Ut,
1232
+ initialScrollAnchor: Gt,
1233
+ callbackThrottleMs: Vt = 5,
1234
+ contentInsets: Xt,
1235
+ onItemFocus: Kt,
1235
1236
  viewportHeightOverride: le,
1236
1237
  scrollBarOptions: gt,
1237
- behaviorOptions: Jt,
1238
- preserveScrollAnchor: Zt = !1,
1239
- getItemKey: ar,
1238
+ behaviorOptions: Ut,
1239
+ preserveScrollAnchor: Jt = !1,
1240
+ getItemKey: sr,
1240
1241
  // 素通しの pass-through。型で受け付けているものは実際に転送する
1241
- testId: qt,
1242
+ testId: Zt,
1242
1243
  contentProps: bt
1243
- } = ve ?? {}, Qt = M(
1244
+ } = ve ?? {}, qt = M(
1244
1245
  () => ie ? { ...bt, role: "rowgroup" } : {
1245
1246
  ...bt,
1246
1247
  role: "tree",
@@ -1250,39 +1251,39 @@ const sr = (e) => {
1250
1251
  "aria-busy": i ? !0 : void 0
1251
1252
  },
1252
1253
  [ie, bt, w, v, x, i]
1253
- ), en = M(() => ({ ...Jt, enableKeyboardNavigation: !1 }), [Jt]), [ot, tn] = fe(typeof Me == "number" ? Me : 0), vt = Y(typeof Me == "number" ? Me : 0), nn = _(
1254
+ ), Qt = M(() => ({ ...Ut, enableKeyboardNavigation: !1 }), [Ut]), [rt, en] = ge(typeof Me == "number" ? Me : 0), vt = G(typeof Me == "number" ? Me : 0), tn = _(
1254
1255
  (s, c) => {
1255
- vt.current = s, tn(s), Ht?.(s, c);
1256
+ vt.current = s, en(s), zt?.(s, c);
1256
1257
  },
1257
- [Ht]
1258
- ), rn = _(
1258
+ [zt]
1259
+ ), nn = _(
1259
1260
  (s) => {
1260
1261
  const { renderingStartIndex: c, renderingEndIndex: S } = s;
1261
- rt((R) => R && R.renderStart === c && R.renderEnd === S ? R : { renderStart: c, renderEnd: S }), Wt?.(s);
1262
+ yt((R) => R && R.renderStart === c && R.renderEnd === S ? R : { renderStart: c, renderEnd: S }), Ht?.(s);
1262
1263
  },
1263
- [Wt]
1264
+ [Ht]
1264
1265
  );
1265
- De(() => {
1266
- Oe(!0), zo();
1267
- }, []), De(() => {
1268
- const s = Pe.current, c = ie ? Fe.current : s, S = () => {
1266
+ $e(() => {
1267
+ zo();
1268
+ }, []), $e(() => {
1269
+ const s = xe.current, c = ie ? Oe.current : s, S = () => {
1269
1270
  if (s) {
1270
1271
  const H = s.clientWidth;
1271
- yt((q) => Math.abs(q - H) > 1 ? H : q);
1272
+ pt((q) => Math.abs(q - H) > 1 ? H : q);
1272
1273
  }
1273
1274
  if (typeof le == "number")
1274
- Ve((H) => Math.abs(H - le) > 1 ? le : H);
1275
+ B((H) => Math.abs(H - le) > 1 ? le : H);
1275
1276
  else if (c) {
1276
1277
  const H = c.clientHeight;
1277
- Ve((q) => Math.abs(q - H) > 1 ? H : q);
1278
+ B((q) => Math.abs(q - H) > 1 ? H : q);
1278
1279
  }
1279
1280
  };
1280
- if (!(s || c)) return Ve(0);
1281
+ if (!(s || c)) return B(0);
1281
1282
  S();
1282
1283
  const R = new ResizeObserver(S);
1283
1284
  return s && R.observe(s), c && c !== s && R.observe(c), () => R.disconnect();
1284
1285
  }, [le, ie]);
1285
- const ze = typeof le == "number" ? le : G, Ee = _((s) => l || (Te ? n(s) : !1), [Te, n, l]), on = U(L.container, i && L.containerPending, y), sn = M(
1286
+ const ze = typeof le == "number" ? le : Ve, we = _((s) => l || (Te ? n(s) : !1), [Te, n, l]), rn = U(L.container, i && L.containerPending, y), on = M(
1286
1287
  () => ({
1287
1288
  ...Mo,
1288
1289
  ...p ?? {},
@@ -1291,104 +1292,104 @@ const sr = (e) => {
1291
1292
  [p, le]
1292
1293
  ), St = _(
1293
1294
  (s, c) => {
1294
- const S = [s.absolutePath, ...sr(s)], R = c || d;
1295
- if (S.every((ke) => Ee(ke))) return a(S);
1296
- if (S.every((ke) => !Ee(ke)) || R === "recursive") return r(S);
1295
+ const S = [s.absolutePath, ...or(s)], R = c || d;
1296
+ if (S.every((ke) => we(ke))) return a(S);
1297
+ if (S.every((ke) => !we(ke)) || R === "recursive") return r(S);
1297
1298
  if (R === "toggle") return a(S);
1298
1299
  console.warn(`[DirectoryTree] Unknown double click action: ${R}. No action taken.`);
1299
1300
  },
1300
- [Ee, r, a, d]
1301
- ), wt = ie ? !1 : me, { flatItems: je, lineItems: Et, maxIndent: an } = M(() => Bo(e, Ee, P, wt, j), [e, Ee, P, wt, j]), st = Ro({ indentSize: te.indentSize, removeRootIndent: wt, hasExpandBox: C || P }), ge = M(() => P ? ko(te, O, st) : null, [P, te, O, st]), K = M(() => je.map((s, c) => ({ ...s, rowHeight: Io(B, s.entry, c) })), [je, B]), _e = M(() => K.map((s) => s.rowHeight), [K]), Ae = M(() => {
1301
+ [we, r, a, d]
1302
+ ), wt = ie ? !1 : he, { flatItems: Ae, lineItems: Et, maxIndent: sn } = M(() => Vo(e, we, P, wt, j), [e, we, P, wt, j]), ot = Ro({ indentSize: te.indentSize, removeRootIndent: wt, hasExpandBox: C || P }), ye = M(() => P ? ko(te, O, ot) : null, [P, te, O, ot]), K = M(() => Ae.map((s, c) => ({ ...s, rowHeight: Io(Y, s.entry, c) })), [Ae, Y]), _e = M(() => K.map((s) => s.rowHeight), [K]), Le = M(() => {
1302
1303
  const s = new Array(_e.length + 1);
1303
1304
  s[0] = 0;
1304
1305
  for (let c = 0; c < _e.length; c++)
1305
1306
  s[c + 1] = s[c] + _e[c];
1306
1307
  return s;
1307
- }, [_e]), ln = _((s) => K[s]?.rowHeight ?? Ot, [K]), ir = _((s) => K[s]?.entry.absolutePath ?? s, [K]), cn = ar ?? ir, He = b ?? null, xt = N ?? null, [dn, Ue] = fe(() => ({ selectedPath: He, selectionGeneration: 0, anchor: null })), Rt = Dn(dn, He);
1308
- Rt !== dn && Ue((s) => Dn(s, He));
1309
- const at = M(() => Do(je), [je]), We = M(() => Fo(at, Rt), [at, Rt]), Je = Y(/* @__PURE__ */ new Map()), it = Y(null), [lt] = fe(wo), Ze = Y(null), [lr, un] = fe(!0), It = Y(je);
1310
- It.current = je;
1311
- const fn = Y(Ee);
1312
- fn.current = Ee;
1313
- const kt = Y(t);
1308
+ }, [_e]), an = _((s) => K[s]?.rowHeight ?? Ot, [K]), ar = _((s) => K[s]?.entry.absolutePath ?? s, [K]), ln = sr ?? ar, He = b ?? null, xt = N ?? null, [cn, Ue] = ge(() => ({ selectedPath: He, selectionGeneration: 0, anchor: null })), Rt = Ln(cn, He);
1309
+ Rt !== cn && Ue((s) => Ln(s, He));
1310
+ const st = M(() => Do(Ae), [Ae]), We = M(() => Fo(st, Rt), [st, Rt]), Je = G(/* @__PURE__ */ new Map()), at = G(null), [it] = ge(wo), Ze = G(null), [ir, dn] = ge(!0), It = G(Ae);
1311
+ It.current = Ae;
1312
+ const un = G(we);
1313
+ un.current = we;
1314
+ const kt = G(t);
1314
1315
  kt.current = t;
1315
- const hn = Y(at);
1316
- hn.current = at;
1317
- const Nt = Y(We);
1316
+ const fn = G(st);
1317
+ fn.current = st;
1318
+ const Nt = G(We);
1318
1319
  Nt.current = We;
1319
- const mn = Y(Ut);
1320
- mn.current = Ut;
1321
- const Le = _((s) => {
1320
+ const hn = G(Kt);
1321
+ hn.current = Kt;
1322
+ const De = _((s) => {
1322
1323
  const c = Re.current;
1323
1324
  return !c || c.getViewportSize() <= 0 ? !1 : (c.scrollToIndex(s, { align: "nearest" }), !0);
1324
1325
  }, []), Ie = _(
1325
1326
  (s) => {
1326
1327
  const c = Je.current.get(s);
1327
1328
  if (c === void 0) {
1328
- Ze.current = s, Le(s) || (Ze.current = null);
1329
+ Ze.current = s, De(s) || (Ze.current = null);
1329
1330
  return;
1330
1331
  }
1331
- Ze.current = null, Le(s), c.focus({ preventScroll: !0 });
1332
+ Ze.current = null, De(s), c.focus({ preventScroll: !0 });
1332
1333
  },
1333
- [Le]
1334
- ), pn = _((s, c) => {
1334
+ [De]
1335
+ ), mn = _((s, c) => {
1335
1336
  if (c)
1336
1337
  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 } });
1337
1338
  else {
1338
1339
  const S = Je.current.get(s);
1339
1340
  Je.current.delete(s), S?.contains(S.ownerDocument.activeElement) && Ue((R) => R.anchor === null ? R : { ...R, anchor: { ...R.anchor, focused: !1 } });
1340
1341
  }
1341
- s === Nt.current && un(c !== null);
1342
+ s === Nt.current && dn(c !== null);
1342
1343
  }, []);
1343
- In(() => {
1344
- un(Je.current.has(We));
1344
+ Rn(() => {
1345
+ dn(Je.current.has(We));
1345
1346
  }, [We]);
1346
1347
  const Tt = _(
1347
1348
  (s, c, S) => {
1348
- const R = it.current === S;
1349
- it.current = null, R || (Ue((H) => $o(H, c)), lt.landedOn(S) || Le(s)), mn.current?.(s);
1349
+ const R = at.current === S;
1350
+ at.current = null, R || (Ue((H) => $o(H, c)), it.landedOn(S) || De(s)), hn.current?.(s);
1350
1351
  },
1351
- [Le, lt]
1352
- ), ct = _((s) => lt.mark(s.nativeEvent), [lt]), Pt = _((s, c) => {
1352
+ [De, it]
1353
+ ), lt = _((s) => it.mark(s.nativeEvent), [it]), Pt = _((s, c) => {
1353
1354
  const { ownerDocument: S } = c;
1354
1355
  if (!S.hasFocus() && c.contains(S.activeElement)) {
1355
- it.current = c;
1356
+ at.current = c;
1356
1357
  return;
1357
1358
  }
1358
- it.current = null, Ue((R) => R.anchor !== null && R.anchor.path === s ? { ...R, anchor: { ...R.anchor, focused: !1 } } : R);
1359
- }, []), cr = _(() => Ie(Nt.current), [Ie]), _t = _(
1359
+ at.current = null, Ue((R) => R.anchor !== null && R.anchor.path === s ? { ...R, anchor: { ...R.anchor, focused: !1 } } : R);
1360
+ }, []), lr = _(() => Ie(Nt.current), [Ie]), _t = _(
1360
1361
  (s, c) => {
1361
- const S = Fn(c), R = It.current.length;
1362
+ const S = $n(c), R = It.current.length;
1362
1363
  if (!Number.isInteger(s) || s < 0 || s >= R)
1363
1364
  throw new RangeError(`[directory-tree] scrollToIndex: ${String(s)} is not a row index (${R === 0 ? "the tree has no rows" : `expected an integer in 0..${String(R - 1)}`}).`);
1364
1365
  if (S === "nearest") {
1365
- Le(s);
1366
+ De(s);
1366
1367
  return;
1367
1368
  }
1368
1369
  Re.current?.scrollToIndex(s, { align: S });
1369
1370
  },
1370
- [Le]
1371
+ [De]
1371
1372
  );
1372
1373
  yr(
1373
1374
  Ne,
1374
1375
  () => ({
1375
1376
  scrollToIndex: _t,
1376
1377
  scrollToPath: (s, c) => {
1377
- Fn(c);
1378
- const S = hn.current.get(s);
1378
+ $n(c);
1379
+ const S = fn.current.get(s);
1379
1380
  return S === void 0 ? !1 : (_t(S, c), !0);
1380
1381
  },
1381
1382
  getScrollAnchor: () => Re.current?.getScrollAnchor() ?? null
1382
1383
  }),
1383
1384
  [_t]
1384
1385
  );
1385
- const yn = _(
1386
+ const pn = _(
1386
1387
  (s, c) => {
1387
1388
  if (s.altKey || s.ctrlKey || s.metaKey)
1388
1389
  return;
1389
1390
  const S = It.current, R = S.length - 1;
1390
1391
  if (R < 0) return;
1391
- const H = S[c], q = H?.entry.children !== void 0, ke = q && fn.current(H.entry.absolutePath);
1392
+ const H = S[c], q = H?.entry.children !== void 0, ke = q && un.current(H.entry.absolutePath);
1392
1393
  switch (s.key) {
1393
1394
  case "ArrowDown":
1394
1395
  s.preventDefault(), Ie(Math.min(c + 1, R));
@@ -1410,10 +1411,10 @@ const sr = (e) => {
1410
1411
  kt.current(H.entry.absolutePath);
1411
1412
  break;
1412
1413
  }
1413
- const mr = H?.depth ?? 0;
1414
- for (let ht = c - 1; ht >= 0; ht--)
1415
- if (S[ht].depth < mr) {
1416
- Ie(ht);
1414
+ const hr = H?.depth ?? 0;
1415
+ for (let ft = c - 1; ft >= 0; ft--)
1416
+ if (S[ft].depth < hr) {
1417
+ Ie(ft);
1417
1418
  break;
1418
1419
  }
1419
1420
  break;
@@ -1421,44 +1422,44 @@ const sr = (e) => {
1421
1422
  }
1422
1423
  },
1423
1424
  [Ie]
1424
- ), dt = M(() => ge === null || Et.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : Go(Et, _e, Ae, ge), [Et, _e, Ae, ge]), ut = M(() => ge === null || e.length === 0 ? 0 : ge.originX + an * ge.indentSize + de + ge.typeIconSize, [e.length, an, ge]), { renderStart: gn, renderEnd: bn, lookaheadEnd: vn } = M(
1425
- () => Yo(K.length, ze, we, nt, ot, Ae),
1426
- [K.length, ze, we, nt, ot, Ae]
1427
- ), Ct = M(() => ge === null || ut <= 0 || ze <= 0 || dt.segmentsByItem.length === 0 ? null : /* @__PURE__ */ f.jsx("div", { className: "pointer-events-none absolute inset-0 z-1", "aria-hidden": "true", children: /* @__PURE__ */ f.jsx("div", { className: "absolute top-0 left-0", style: { width: ut, height: ze }, children: /* @__PURE__ */ f.jsx(
1428
- rr,
1425
+ ), ct = M(() => ye === null || Et.length === 0 ? { segmentsByItem: [], glyphsByItem: [] } : Ko(Et, _e, Le, ye), [Et, _e, Le, ye]), dt = M(() => ye === null || e.length === 0 ? 0 : ye.originX + sn * ye.indentSize + de + ye.typeIconSize, [e.length, sn, ye]), { renderStart: yn, renderEnd: gn, lookaheadEnd: bn } = M(
1426
+ () => Xo(K.length, ze, je, nt, rt, Le),
1427
+ [K.length, ze, je, nt, rt, Le]
1428
+ ), Ct = M(() => ye === null || dt <= 0 || ze <= 0 || ct.segmentsByItem.length === 0 ? null : /* @__PURE__ */ f.jsx("div", { className: "pointer-events-none absolute inset-0 z-1", "aria-hidden": "true", children: /* @__PURE__ */ f.jsx("div", { className: "absolute top-0 left-0", style: { width: dt, height: ze }, children: /* @__PURE__ */ f.jsx(
1429
+ nr,
1429
1430
  {
1430
- segmentsByItem: dt.segmentsByItem,
1431
- glyphsByItem: dt.glyphsByItem,
1431
+ segmentsByItem: ct.segmentsByItem,
1432
+ glyphsByItem: ct.glyphsByItem,
1432
1433
  itemHeight: _e[0] ?? Ot,
1433
- width: ut,
1434
+ width: dt,
1434
1435
  viewportHeight: ze,
1435
- scrollPosition: ot,
1436
+ scrollPosition: rt,
1436
1437
  color: F,
1437
1438
  expandGlyphColor: F,
1438
- expandGlyphSize: ge.glyphSize,
1439
- renderStartIndex: gn,
1440
- renderEndIndex: bn,
1441
- lookaheadEndIndex: vn
1439
+ expandGlyphSize: ye.glyphSize,
1440
+ renderStartIndex: yn,
1441
+ renderEndIndex: gn,
1442
+ lookaheadEndIndex: bn
1442
1443
  }
1443
- ) }) }), [ut, ze, gn, bn, vn, ot, dt, F, ge, _e]), Sn = _((s) => K[s], [K]), wn = Y(null);
1444
- In(() => {
1445
- const s = wn.current;
1446
- if (wn.current = { items: K, offsets: Ae }, !Zt || !s || s.items === K)
1444
+ ) }) }), [dt, ze, yn, gn, bn, rt, ct, F, ye, _e]), vn = _((s) => K[s], [K]), Sn = G(null);
1445
+ Rn(() => {
1446
+ const s = Sn.current;
1447
+ if (Sn.current = { items: K, offsets: Le }, !Jt || !s || s.items === K)
1447
1448
  return;
1448
1449
  const c = Re.current, S = c?.getScrollPosition(), R = typeof S == "number" && S >= 0 ? S : vt.current, H = Po(s.items, s.offsets, R);
1449
1450
  if (!H)
1450
1451
  return;
1451
- const q = _o(H, K, Ae);
1452
+ const q = _o(H, K, Le);
1452
1453
  if (q === null || Math.abs(q - R) < 1)
1453
1454
  return;
1454
1455
  const ke = c ? c.scrollTo(q) : q;
1455
- vt.current = ke, tn(ke);
1456
- }, [K, Ae, Zt]);
1457
- const Ce = k?.columns, Be = k?.scrollBarWidth ?? gt?.width ?? tr, re = M(() => Ce ? po({ measuredWidth: tt, columns: Ce, scrollBarWidth: Be }) : null, [Ce, tt, Be]), ft = M(() => Ce ? mo(Ce) : "", [Ce]), dr = M(() => k?.showFooter && Ce ? yo(e) : [], [k?.showFooter, Ce, e]), Ye = re?.maxHScroll ?? 0;
1458
- De(() => {
1456
+ vt.current = ke, en(ke);
1457
+ }, [K, Le, Jt]);
1458
+ const Ce = k?.columns, Be = k?.scrollBarWidth ?? gt?.width ?? er, re = M(() => Ce ? po({ measuredWidth: tt, columns: Ce, scrollBarWidth: Be }) : null, [Ce, tt, Be]), ut = M(() => Ce ? mo(Ce) : "", [Ce]), cr = M(() => k?.showFooter && Ce ? yo(e) : [], [k?.showFooter, Ce, e]), Ye = re?.maxHScroll ?? 0;
1459
+ $e(() => {
1459
1460
  Ke((s) => jt(s, Ye));
1460
1461
  }, [Ye]);
1461
- const En = _((s) => Ke((c) => jt(c + s, Ye)), [Ye]), xn = M(
1462
+ const wn = _((s) => Ke((c) => jt(c + s, Ye)), [Ye]), En = M(
1462
1463
  () => ({
1463
1464
  iconOverrides: $,
1464
1465
  showExpandIcons: C,
@@ -1474,43 +1475,43 @@ const sr = (e) => {
1474
1475
  expandIconStyle: E
1475
1476
  }),
1476
1477
  [$, C, g, D, P, O, te, W, I, E]
1477
- ), Rn = M(
1478
+ ), xn = M(
1478
1479
  () => /* @__PURE__ */ f.jsx(
1479
1480
  vr,
1480
1481
  {
1481
1482
  ref: Re,
1482
1483
  itemCount: K.length,
1483
- getItem: Sn,
1484
- getItemHeight: ln,
1485
- getItemKey: cn,
1486
- testId: qt,
1487
- contentProps: Qt,
1484
+ getItem: vn,
1485
+ getItemHeight: an,
1486
+ getItemKey: ln,
1487
+ testId: Zt,
1488
+ contentProps: qt,
1488
1489
  locale: A,
1489
1490
  labels: Z,
1490
1491
  viewportSize: typeof le == "number" ? le : void 0,
1491
- overscanCount: we,
1492
- onScroll: nn,
1493
- onRangeChange: rn,
1494
- onScrollAdjust: Bt,
1495
- liveRegion: Yt,
1496
- className: ne,
1497
- onWheelHorizontal: ie ? En : void 0,
1492
+ overscanCount: je,
1493
+ onScroll: tn,
1494
+ onRangeChange: nn,
1495
+ onScrollAdjust: Wt,
1496
+ liveRegion: Bt,
1497
+ className: Pe,
1498
+ onWheelHorizontal: ie ? wn : void 0,
1498
1499
  background: /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
1499
1500
  ie && re ? (
1500
1501
  // Clip the connector-line canvas to the frozen name column so deep trees never bleed into the numeric region.
1501
1502
  /* @__PURE__ */ f.jsx("div", { className: "pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden", style: { width: re.nameWidth }, "aria-hidden": "true", children: Ct })
1502
1503
  ) : Ct,
1503
- zt
1504
+ ne
1504
1505
  ] }),
1505
- initialScrollIndex: Gt,
1506
+ initialScrollIndex: Yt,
1506
1507
  initialScrollOffset: Me,
1507
- initialScrollAnchor: Vt,
1508
- callbackThrottleMs: Xt,
1509
- contentInsets: Kt,
1508
+ initialScrollAnchor: Gt,
1509
+ callbackThrottleMs: Vt,
1510
+ contentInsets: Xt,
1510
1511
  scrollBarOptions: gt,
1511
- behaviorOptions: en,
1512
+ behaviorOptions: Qt,
1512
1513
  children: (s, c) => s ? ie && k && re ? /* @__PURE__ */ f.jsx(
1513
- qn,
1514
+ Zn,
1514
1515
  {
1515
1516
  entry: s.entry,
1516
1517
  indentLevel: s.indentLevel,
@@ -1522,37 +1523,37 @@ const sr = (e) => {
1522
1523
  onRowBlur: Pt,
1523
1524
  isSelectedForAria: !!T?.has(s.entry.absolutePath),
1524
1525
  rowHeight: s.rowHeight,
1525
- isDirOpen: Ee,
1526
+ isDirOpen: we,
1526
1527
  columns: k.columns,
1527
- numericTemplate: ft,
1528
+ numericTemplate: ut,
1528
1529
  numericTotal: re.numericTotal,
1529
1530
  nameWidth: re.nameWidth,
1530
1531
  rowClassName: k.rowClassName,
1531
1532
  selection: { onEntryClick: h, selectedPath: He, currentPath: xt, mode: x, selectedItems: T, onSelectionChange: m },
1532
1533
  expansion: { toggleDirectory: t, onToggleDirectoryRecursive: St },
1533
- visual: xn
1534
+ visual: En
1534
1535
  },
1535
1536
  s.entry.absolutePath
1536
1537
  ) : /* @__PURE__ */ f.jsx(
1537
- or,
1538
+ rr,
1538
1539
  {
1539
1540
  entry: s.entry,
1540
1541
  indentLevel: s.indentLevel,
1541
- originX: st,
1542
+ originX: ot,
1542
1543
  depth: s.depth,
1543
1544
  positionInSet: s.positionInSet,
1544
1545
  setSize: s.setSize,
1545
1546
  isSelectedForAria: !!T?.has(s.entry.absolutePath),
1546
1547
  flatIndex: c,
1547
1548
  isActive: c === We,
1548
- registerRowRef: pn,
1549
- onNavigationKeyDown: yn,
1549
+ registerRowRef: mn,
1550
+ onNavigationKeyDown: pn,
1550
1551
  onRowFocus: Tt,
1551
1552
  onRowBlur: Pt,
1552
1553
  rowHeight: s.rowHeight,
1553
- entryKindDirectory: $e,
1554
+ entryKindDirectory: Fe,
1554
1555
  entryKindFile: se,
1555
- isDirOpen: Ee,
1556
+ isDirOpen: we,
1556
1557
  expansion: { toggleDirectory: t, onToggleDirectoryRecursive: St },
1557
1558
  selection: { onEntryClick: h, selectedPath: He, currentPath: xt, mode: x, selectedItems: T, onSelectionChange: m },
1558
1559
  visual: {
@@ -1567,10 +1568,10 @@ const sr = (e) => {
1567
1568
  indentSize: te.indentSize,
1568
1569
  highlightStyles: W,
1569
1570
  entryClassName: oe,
1570
- entryStyle: pe,
1571
+ entryStyle: me,
1571
1572
  nameClassName: V,
1572
1573
  nameStyle: X,
1573
- directoryNameClassName: xe,
1574
+ directoryNameClassName: Ee,
1574
1575
  directoryNameStyle: be,
1575
1576
  fileNameClassName: o,
1576
1577
  fileNameStyle: u,
@@ -1584,42 +1585,42 @@ const sr = (e) => {
1584
1585
  ),
1585
1586
  [
1586
1587
  K.length,
1587
- Sn,
1588
+ vn,
1589
+ an,
1588
1590
  ln,
1589
- cn,
1591
+ Zt,
1590
1592
  qt,
1591
- Qt,
1592
1593
  A,
1593
1594
  Z,
1594
- $e,
1595
+ Fe,
1595
1596
  se,
1596
1597
  We,
1598
+ mn,
1597
1599
  pn,
1598
- yn,
1599
1600
  Tt,
1600
1601
  Pt,
1601
1602
  le,
1602
- we,
1603
+ je,
1604
+ tn,
1603
1605
  nn,
1604
- rn,
1606
+ Wt,
1605
1607
  Bt,
1606
- Yt,
1607
- ne,
1608
+ Pe,
1608
1609
  ie,
1609
- En,
1610
+ wn,
1610
1611
  re,
1611
1612
  Ct,
1612
- zt,
1613
- Gt,
1613
+ ne,
1614
+ Yt,
1614
1615
  Me,
1616
+ Gt,
1615
1617
  Vt,
1616
1618
  Xt,
1617
- Kt,
1618
1619
  gt,
1619
- en,
1620
+ Qt,
1620
1621
  k,
1621
- ft,
1622
- Ee,
1622
+ ut,
1623
+ we,
1623
1624
  h,
1624
1625
  He,
1625
1626
  xt,
@@ -1628,7 +1629,7 @@ const sr = (e) => {
1628
1629
  m,
1629
1630
  t,
1630
1631
  St,
1631
- xn,
1632
+ En,
1632
1633
  $,
1633
1634
  C,
1634
1635
  g,
@@ -1636,13 +1637,13 @@ const sr = (e) => {
1636
1637
  P,
1637
1638
  O,
1638
1639
  te,
1639
- st,
1640
+ ot,
1640
1641
  W,
1641
1642
  oe,
1642
- pe,
1643
+ me,
1643
1644
  V,
1644
1645
  X,
1645
- xe,
1646
+ Ee,
1646
1647
  be,
1647
1648
  o,
1648
1649
  u,
@@ -1651,31 +1652,31 @@ const sr = (e) => {
1651
1652
  ]
1652
1653
  );
1653
1654
  if (!(k && re))
1654
- return /* @__PURE__ */ f.jsxs("div", { ref: Pe, className: on, style: sn, onPointerDownCapture: ct, onMouseDownCapture: ct, children: [
1655
- je.length > 0 && !lr && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外で DOM に無い間だけ Tab を受け、受けた瞬間にその行へ焦点を渡す。これが無いとツリーに Tab で入れない
1655
+ return /* @__PURE__ */ f.jsxs("div", { ref: xe, className: rn, style: on, onPointerDownCapture: lt, onMouseDownCapture: lt, children: [
1656
+ Ae.length > 0 && !ir && // biome-ignore lint/a11y/noNoninteractiveTabindex: 停止点の行が描画窓の外で DOM に無い間だけ Tab を受け、受けた瞬間にその行へ焦点を渡す。これが無いとツリーに Tab で入れない
1656
1657
  // biome-ignore lint/a11y/noStaticElementInteractions: 同上 (焦点の受け渡しだけを担い、要素自身は操作の対象ではない)
1657
- /* @__PURE__ */ f.jsx("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: Wo, onFocus: cr }),
1658
- Rn
1658
+ /* @__PURE__ */ f.jsx("span", { tabIndex: 0, "data-directory-tree-tab-stop": "", style: Go, onFocus: lr }),
1659
+ xn
1659
1660
  ] });
1660
- const ur = k.showHeader ?? !0, fr = k.showFooter ?? !1, hr = { ...sn, "--dt-hscroll": `${Xe}px` };
1661
+ const dr = k.showHeader ?? !0, ur = k.showFooter ?? !1, fr = { ...on, "--dt-hscroll": `${Xe}px` };
1661
1662
  return /* @__PURE__ */ f.jsxs(
1662
1663
  "div",
1663
1664
  {
1664
- ref: Pe,
1665
- className: U(on, "dt-grid"),
1666
- style: hr,
1665
+ ref: xe,
1666
+ className: U(rn, "dt-grid"),
1667
+ style: fr,
1667
1668
  role: "treegrid",
1668
1669
  "aria-label": v ? void 0 : w,
1669
1670
  "aria-labelledby": v,
1670
1671
  "aria-multiselectable": x === "multiple" ? !0 : void 0,
1671
1672
  "aria-busy": i ? !0 : void 0,
1672
1673
  "aria-rowcount": K.length + (k.showHeader ?? !0 ? 1 : 0),
1673
- onPointerDownCapture: ct,
1674
- onMouseDownCapture: ct,
1674
+ onPointerDownCapture: lt,
1675
+ onMouseDownCapture: lt,
1675
1676
  children: [
1676
- ur && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1677
- /* @__PURE__ */ f.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ f.jsx(uo, { columns: k.columns, numericTemplate: ft, numericTotal: re.numericTotal, nameWidth: re.nameWidth, scrollBarWidth: Be, className: k.headerClassName }) }),
1678
- /* @__PURE__ */ f.jsx("div", { ref: Fe, className: "dt-grid-body", children: Rn }),
1677
+ dr && // biome-ignore lint/a11y/useSemanticElements: 仮想スクロールの treegrid は絶対配置行を使うため native table 要素にできない。ARIA ロールで意味を提供する
1678
+ /* @__PURE__ */ f.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ f.jsx(uo, { columns: k.columns, numericTemplate: ut, numericTotal: re.numericTotal, nameWidth: re.nameWidth, scrollBarWidth: Be, className: k.headerClassName }) }),
1679
+ /* @__PURE__ */ f.jsx("div", { ref: Oe, className: "dt-grid-body", children: xn }),
1679
1680
  Ye > 0 && /* @__PURE__ */ f.jsxs("div", { className: "dt-grid-hscrollbar-row", children: [
1680
1681
  /* @__PURE__ */ f.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: re.nameWidth }, "aria-hidden": "true" }),
1681
1682
  /* @__PURE__ */ f.jsx(
@@ -1696,13 +1697,13 @@ const sr = (e) => {
1696
1697
  ),
1697
1698
  /* @__PURE__ */ f.jsx("div", { className: "dt-grid-scrollbar-spacer", style: { width: Be }, "aria-hidden": "true" })
1698
1699
  ] }),
1699
- fr && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1700
- /* @__PURE__ */ f.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ f.jsx(fo, { columns: k.columns, numericTemplate: ft, numericTotal: re.numericTotal, nameWidth: re.nameWidth, scrollBarWidth: Be, allEntries: dr, className: k.footerClassName }) })
1700
+ ur && // biome-ignore lint/a11y/useSemanticElements: 同上 (フッタ行も絶対配置レイアウトの一部)
1701
+ /* @__PURE__ */ f.jsx("div", { role: "rowgroup", children: /* @__PURE__ */ f.jsx(fo, { columns: k.columns, numericTemplate: ut, numericTotal: re.numericTotal, nameWidth: re.nameWidth, scrollBarWidth: Be, allEntries: cr, className: k.footerClassName }) })
1701
1702
  ]
1702
1703
  }
1703
1704
  );
1704
- }, qo = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: t } = {}) => {
1705
- const [n, r] = gr(), [a, i] = fe(() => {
1705
+ }, ts = ({ initialExpanded: e = /* @__PURE__ */ new Set(), storageKey: t } = {}) => {
1706
+ const [n, r] = gr(), [a, i] = ge(() => {
1706
1707
  if (typeof window < "u" && t)
1707
1708
  try {
1708
1709
  const p = window.localStorage.getItem(t);
@@ -1730,7 +1731,7 @@ const sr = (e) => {
1730
1731
  },
1731
1732
  [l]
1732
1733
  );
1733
- De(() => {
1734
+ $e(() => {
1734
1735
  if (t && typeof window < "u")
1735
1736
  try {
1736
1737
  window.localStorage.setItem(t, JSON.stringify(Array.from(a)));
@@ -1792,13 +1793,13 @@ const sr = (e) => {
1792
1793
  };
1793
1794
  export {
1794
1795
  go as DIRECTORY_TREE_LABEL_CATALOGS,
1795
- An as DIRECTORY_TREE_LABEL_KEYS,
1796
- Zo as DirectoryTree,
1796
+ jn as DIRECTORY_TREE_LABEL_KEYS,
1797
+ es as DirectoryTree,
1797
1798
  oo as EXPAND_ICON_STYLE_PROPERTIES,
1798
- Jo as FILE_ICON_PAIRS,
1799
+ Qo as FILE_ICON_PAIRS,
1799
1800
  Br as MARK_PAIRS,
1800
1801
  ro as ROW_STYLE_PROPERTIES,
1801
1802
  L as directoryTreeClasses,
1802
1803
  vo as resolveDirectoryTreeLabels,
1803
- qo as useDirectoryTreeState
1804
+ ts as useDirectoryTreeState
1804
1805
  };