@aiquants/markdown-explorer 0.27.0 → 0.28.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/CHANGELOG.md +16 -0
- package/README.md +8 -4
- package/dist/{EditSurface-sUNqYw9o.js → EditSurface-BYKUL-a1.js} +30 -30
- package/dist/{EditSurface-B1yD7ywF.cjs → EditSurface-wXPvuB2n.cjs} +2 -2
- package/dist/{ExplorerSplit-pClUl3-e.js → ExplorerSplit-Bz-1G42e.js} +94 -94
- package/dist/{ExplorerSplit-Bn3ZnEMZ.cjs → ExplorerSplit-CLxr4_0K.cjs} +1 -1
- package/dist/MultiLayout-Coc-HQUb.cjs +1 -0
- package/dist/{MultiLayout-B-ft4_Vs.js → MultiLayout-DpxzsXKz.js} +167 -168
- package/dist/NativeScrollBar-CDgYgxXK.cjs +1 -0
- package/dist/{NativeScrollBar-ByawerpG.js → NativeScrollBar-DLdveoaN.js} +6 -7
- package/dist/{TreeLayout-DjIVKBG4.js → TreeLayout-C8TuS9ue.js} +9 -9
- package/dist/{TreeLayout-CXHbKdxy.cjs → TreeLayout-CJrJNZHq.cjs} +1 -1
- package/dist/{index-BNAkC0g3.js → index-CdYr9OQ-.js} +850 -845
- package/dist/index-CjyRD7qg.cjs +15 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/{location-BNFdxzhn.js → location-CKuabtKl.js} +83 -82
- package/dist/location-l_HysaZR.cjs +1 -0
- package/dist/{merge-DhHzRcAI.js → merge-BQgbDcHR.js} +1 -1
- package/dist/{merge-BBU1pDoT.cjs → merge-DRLuveD9.cjs} +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.js +2 -2
- package/dist/styles/markdown-explorer.css +1 -1
- package/dist/tapScrollCircle-B2A6CmmI.js +13 -0
- package/dist/tapScrollCircle-qD8iSmfq.cjs +1 -0
- package/dist/{useSplitPersistence-xGOSwpLM.cjs → useSplitPersistence-9Nu6J1WF.cjs} +1 -1
- package/dist/{useSplitPersistence-D5EjJwCg.js → useSplitPersistence-Bf4M35Il.js} +1 -1
- package/docs/behavior/layout.md +4 -1
- package/package.json +5 -5
- package/dist/MultiLayout-0Jh08fxo.cjs +0 -1
- package/dist/NativeScrollBar-D9QrjRJa.cjs +0 -1
- package/dist/index-DRMNpWDJ.cjs +0 -15
- package/dist/location-yvU5HUY1.cjs +0 -1
- package/dist/scrollBarGeometry-C46jBtmM.cjs +0 -1
- package/dist/scrollBarGeometry-DOBdGNV-.js +0 -4
- package/dist/tapScrollCircle-C5DGI-0H.cjs +0 -1
- package/dist/tapScrollCircle-u4EXeLhx.js +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as m, jsxs as L, Fragment as Qe } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as Z, s as At, U as Pe, Q as Je, V as kt, B as Oe, W as Lt, X as Pt, n as Ot, Y as qt, Z as Ct, _ as Ft } from "./index-CdYr9OQ-.js";
|
|
3
3
|
import * as f from "react";
|
|
4
4
|
import { use as ye, createContext as qe, useState as F, useCallback as w, useMemo as C, useRef as E, useLayoutEffect as H, useEffect as D, useSyncExternalStore as Ce, Suspense as et, useId as Re } from "react";
|
|
5
|
-
import { s as Mt, u as _t, v as tt, x as It, y as Dt, z as Ht, C as
|
|
5
|
+
import { s as Mt, u as _t, v as tt, x as It, y as Dt, z as Ht, C as Zt, F as $t, A as Ve, B as Bt, D as zt, b as Ee, G as Vt } from "./location-CKuabtKl.js";
|
|
6
6
|
import { useDirectoryTreeState as jt, DirectoryTree as Kt } from "@aiquants/directory-tree";
|
|
7
|
-
import { T as Gt } from "./tapScrollCircle-
|
|
7
|
+
import { T as Gt } from "./tapScrollCircle-B2A6CmmI.js";
|
|
8
8
|
import { s as Ut } from "./storage-CmGHg7OA.js";
|
|
9
9
|
import { PanelGroup as Wt, Panel as je, PanelResizeHandle as Xt } from "@aiquants/resize-panels";
|
|
10
|
-
import { a as Yt, u as Qt } from "./useSplitPersistence-
|
|
10
|
+
import { a as Yt, u as Qt } from "./useSplitPersistence-Bf4M35Il.js";
|
|
11
11
|
import { useLocation as Jt } from "react-router";
|
|
12
12
|
function en({
|
|
13
13
|
title: e,
|
|
@@ -97,7 +97,7 @@ function on({
|
|
|
97
97
|
}));
|
|
98
98
|
}
|
|
99
99
|
const sn = /* @__PURE__ */ f.forwardRef(on), cn = () => {
|
|
100
|
-
const { notices: e } =
|
|
100
|
+
const { notices: e } = Z(), t = ye(e);
|
|
101
101
|
return t.length === 0 ? null : /* @__PURE__ */ m("div", { className: "aqmx-explorer-notices", children: t.map((n) => /* @__PURE__ */ L("div", { className: "aqmx-callout", "data-aqmx-tone": n.tone, "data-testid": "markdown-explorer-notice", "data-aqmx-notice": n.id, children: [
|
|
102
102
|
/* @__PURE__ */ m("p", { className: "aqmx-callout-title", children: n.title }),
|
|
103
103
|
n.body === void 0 ? null : /* @__PURE__ */ m("p", { className: "aqmx-callout-body", children: n.body }),
|
|
@@ -252,7 +252,7 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
252
252
|
depthLimited: !1,
|
|
253
253
|
announcedStart: !1,
|
|
254
254
|
issuedAgainst: null
|
|
255
|
-
}),
|
|
255
|
+
}), An = (e, t) => {
|
|
256
256
|
const n = [];
|
|
257
257
|
let r = Le(t.entries, t.compare);
|
|
258
258
|
for (let o = 1; r.length > 0; o += 1) {
|
|
@@ -281,29 +281,29 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
281
281
|
r = c;
|
|
282
282
|
}
|
|
283
283
|
return n;
|
|
284
|
-
}, lt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || lt(n.children, t))),
|
|
284
|
+
}, lt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || lt(n.children, t))), kn = (e, t) => {
|
|
285
285
|
if (e.folderLimited) return { kind: "folder-limit", opened: e.opened };
|
|
286
286
|
if (e.depthLimited) return { kind: "depth-limit", opened: e.opened };
|
|
287
287
|
let n = 0;
|
|
288
288
|
for (const r of e.loads) t.childrenOf(r)?.status === "failed" && (n += 1);
|
|
289
289
|
return { kind: "done", opened: e.opened, failed: n, complete: lt(t.entries, t.isShownExpanded) };
|
|
290
|
-
},
|
|
291
|
-
const t = E(null), n = E(e), [r, o] = F(
|
|
290
|
+
}, Ae = Object.freeze({ state: "idle" }), Ln = (e) => {
|
|
291
|
+
const t = E(null), n = E(e), [r, o] = F(Ae);
|
|
292
292
|
H(() => {
|
|
293
293
|
n.current = e;
|
|
294
294
|
});
|
|
295
295
|
const c = w(() => {
|
|
296
296
|
t.current === null && (t.current = Nn(n.current.budget), o({ state: "running", opened: 0 }));
|
|
297
297
|
}, []), l = w(() => {
|
|
298
|
-
t.current = null, o(
|
|
298
|
+
t.current = null, o(Ae);
|
|
299
299
|
}, []), a = w((s) => {
|
|
300
300
|
const d = t.current;
|
|
301
301
|
if (d === null) return;
|
|
302
|
-
const u =
|
|
302
|
+
const u = An(d, s);
|
|
303
303
|
if (u.length > 0 && (d.issuedAgainst = s.expanded, n.current.expandMultiple([...u])), !d.announcedStart && (d.loads.size > 0 || s.waiting > 0) && (d.announcedStart = !0, n.current.onStart()), u.length === 0 && !s.expansionPending && s.expanded !== d.issuedAgainst && s.waiting === 0) {
|
|
304
304
|
t.current = null;
|
|
305
|
-
const p =
|
|
306
|
-
o(p.kind === "done" ?
|
|
305
|
+
const p = kn(d, s);
|
|
306
|
+
o(p.kind === "done" ? Ae : { state: "stopped", stop: p.kind, opened: p.opened }), n.current.onFinish(p);
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
const { opened: i } = d;
|
|
@@ -320,21 +320,21 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
320
320
|
R !== null && (i.current = null, R.phase === "asking" ? R.controller.abort() : h.current?.open(null));
|
|
321
321
|
}, []), P = w(() => {
|
|
322
322
|
s.current = null, v();
|
|
323
|
-
}, [v]),
|
|
323
|
+
}, [v]), k = w(() => {
|
|
324
324
|
const R = t.current;
|
|
325
325
|
s.current === null || p.current !== null || R === null || R.getClientRects().length === 0 || (p.current = requestAnimationFrame(() => {
|
|
326
326
|
p.current = null;
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
329
|
-
const S = g.current(
|
|
327
|
+
const A = s.current;
|
|
328
|
+
if (A === null) return;
|
|
329
|
+
const S = g.current(A);
|
|
330
330
|
if (S === 0) {
|
|
331
331
|
d.current = !0, i.current?.phase === "opening" && v();
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
if (e.current?.scrollToPath(
|
|
334
|
+
if (e.current?.scrollToPath(A, { align: "nearest" }) === !0) {
|
|
335
335
|
i.current?.phase === "opening" && v();
|
|
336
336
|
const { least: _, stalled: B } = u.current;
|
|
337
|
-
u.current = S < _ ? { least: S, stalled: 0 } : { least: _, stalled: B + 1 }, u.current.stalled < Pn &&
|
|
337
|
+
u.current = S < _ ? { least: S, stalled: 0 } : { least: _, stalled: B + 1 }, u.current.stalled < Pn && k();
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
const b = i.current;
|
|
@@ -342,19 +342,19 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
342
342
|
s.current = null;
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
|
-
b.phase === "opening" && h.current?.progress(b.folders,
|
|
345
|
+
b.phase === "opening" && h.current?.progress(b.folders, A) !== "loading" && P();
|
|
346
346
|
}));
|
|
347
347
|
}, [e, t, v, P]), q = w(() => {
|
|
348
|
-
d.current = !1, u.current = Ue,
|
|
349
|
-
}, [
|
|
348
|
+
d.current = !1, u.current = Ue, k();
|
|
349
|
+
}, [k]);
|
|
350
350
|
D(() => {
|
|
351
351
|
const R = t.current;
|
|
352
352
|
if (R === null) return;
|
|
353
|
-
const
|
|
354
|
-
|
|
353
|
+
const A = typeof ResizeObserver > "u" ? null : new ResizeObserver(q);
|
|
354
|
+
A?.observe(R);
|
|
355
355
|
for (const S of Ge) R.addEventListener(S, P, { passive: !0 });
|
|
356
356
|
return () => {
|
|
357
|
-
|
|
357
|
+
A?.disconnect();
|
|
358
358
|
for (const S of Ge) R.removeEventListener(S, P);
|
|
359
359
|
p.current !== null && cancelAnimationFrame(p.current), p.current = null, v();
|
|
360
360
|
};
|
|
@@ -364,10 +364,10 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
364
364
|
const R = t.current;
|
|
365
365
|
if (P(), n === null || R === null || R.contains(R.ownerDocument.activeElement)) return;
|
|
366
366
|
s.current = n;
|
|
367
|
-
const
|
|
368
|
-
if (y &&
|
|
367
|
+
const A = h.current;
|
|
368
|
+
if (y && A !== null) {
|
|
369
369
|
const S = new AbortController(), b = { phase: "asking", controller: S };
|
|
370
|
-
i.current = b,
|
|
370
|
+
i.current = b, A.ancestors(n, S.signal).then((_) => {
|
|
371
371
|
i.current === b && (_ === null ? i.current = null : (i.current = { phase: "opening", folders: _ }, h.current?.open(_)), q());
|
|
372
372
|
});
|
|
373
373
|
}
|
|
@@ -375,9 +375,9 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
375
375
|
}, [n, y, t, P, q]), D(() => {
|
|
376
376
|
(i.current?.phase === "opening" || s.current !== null && !d.current) && q();
|
|
377
377
|
}, [o, q]);
|
|
378
|
-
const
|
|
378
|
+
const $ = E(c);
|
|
379
379
|
D(() => {
|
|
380
|
-
|
|
380
|
+
$.current !== c && ($.current = c, P());
|
|
381
381
|
}, [c, P]);
|
|
382
382
|
const N = E(l);
|
|
383
383
|
D(() => {
|
|
@@ -407,12 +407,12 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
407
407
|
a?.disconnect();
|
|
408
408
|
};
|
|
409
409
|
}, [e, t]), n;
|
|
410
|
-
}, ot = "markdown-explorer-tree-scroll", Hn = 0.5, st = (e, t) => [...e.querySelectorAll(`[role="treeitem"][${ce}]`)].find((n) => n.getAttribute(ce) === t),
|
|
410
|
+
}, ot = "markdown-explorer-tree-scroll", Hn = 0.5, st = (e, t) => [...e.querySelectorAll(`[role="treeitem"][${ce}]`)].find((n) => n.getAttribute(ce) === t), Zn = (e, t) => {
|
|
411
411
|
const n = st(e, t), r = n?.closest(`[data-testid="${ot}"]`);
|
|
412
412
|
if (n === void 0 || r === null || r === void 0) return Number.POSITIVE_INFINITY;
|
|
413
413
|
const o = r.getBoundingClientRect(), c = n.getBoundingClientRect(), l = o.top - c.top, a = c.height > o.height ? Math.abs(l) : Math.max(0, l) + Math.max(0, c.bottom - o.bottom);
|
|
414
414
|
return a <= Hn ? 0 : a;
|
|
415
|
-
},
|
|
415
|
+
}, $n = {
|
|
416
416
|
testId: ot,
|
|
417
417
|
overscanCount: 13,
|
|
418
418
|
callbackThrottleMs: 13,
|
|
@@ -430,7 +430,7 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
430
430
|
const t = e instanceof Element ? e.closest(`[${ce}]`) : null;
|
|
431
431
|
return t === null || t.getAttribute("data-entry-type") !== "file" ? null : t.getAttribute(ce);
|
|
432
432
|
}, ct = (e, t, n, r) => n === "folder-limit" ? e.expandAllFolderLimit(r, t.maxFolders, e.expandAll) : e.expandAllDepthLimit(r, t.maxDepth), Wn = (e, t, n) => n.kind === "done" ? e.expandAllDone(n.opened, n.failed, n.complete) : ct(e, t, n.kind, n.opened), it = () => {
|
|
433
|
-
const { labels: e } =
|
|
433
|
+
const { labels: e } = Z();
|
|
434
434
|
return /* @__PURE__ */ L("div", { className: "aqmx-explorer-loading", "aria-busy": "true", "data-testid": "markdown-explorer-tree-loading", children: [
|
|
435
435
|
/* @__PURE__ */ m("p", { className: "aqmx-explorer-loading-text", children: e.treeLoading }),
|
|
436
436
|
/* @__PURE__ */ L("div", { className: "aqmx-skeleton", "aria-hidden": "true", children: [
|
|
@@ -442,14 +442,14 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
442
442
|
] })
|
|
443
443
|
] });
|
|
444
444
|
}, Xn = () => {
|
|
445
|
-
const { labels: e } =
|
|
445
|
+
const { labels: e } = Z();
|
|
446
446
|
return /* @__PURE__ */ L("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-tree-empty", children: [
|
|
447
447
|
/* @__PURE__ */ m(un, { className: "aqmx-explorer-empty-icon", "aria-hidden": "true" }),
|
|
448
448
|
/* @__PURE__ */ m("p", { className: "aqmx-empty-title", children: e.treeEmptyTitle }),
|
|
449
449
|
/* @__PURE__ */ m("p", { className: "aqmx-explorer-empty-body", children: e.treeEmptyBody })
|
|
450
450
|
] });
|
|
451
451
|
}, Yn = ({ name: e, onRetry: t }) => {
|
|
452
|
-
const { labels: n } =
|
|
452
|
+
const { labels: n } = Z(), r = Re();
|
|
453
453
|
return /* @__PURE__ */ L("span", { className: "aqmx-explorer-folder-failed", children: [
|
|
454
454
|
/* @__PURE__ */ m("span", { className: "aqmx-explorer-folder-name", children: e }),
|
|
455
455
|
/* @__PURE__ */ m("span", { id: r, className: "aqmx-explorer-folder-error", children: n.folderLoadFailed }),
|
|
@@ -494,7 +494,7 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
494
494
|
expandAll: v,
|
|
495
495
|
revealCancel: P
|
|
496
496
|
}) => {
|
|
497
|
-
const { trees:
|
|
497
|
+
const { trees: k, documents: q, labels: y, locale: $, theme: N, data: R, config: A, sources: S, reveals: b } = Z(), _ = ye(Fe), [B] = F(wn), ie = E(null), { rowHeight: re, lineColor: K } = Dn(ie, N), { isExpanded: G, toggle: ae, expandMultiple: z, collapseMultiple: Q, expanded: J, isPending: ee } = i, { alwaysExpanded: M, sortMode: le, folderPlacement: de, readmePlacement: he } = o, { direct: oe, markDirect: U, unmarkDirect: te, pruneDirect: we } = h, { running: ue, advance: me } = v, xe = E(null), se = E(null), W = C(() => _t({ sortMode: le, folderPlacement: de, readmePlacement: he }), [le, de, he]), O = C(() => gn(W), [W]), I = w((x) => k.children(r, x), [k, r]), V = C(() => bn(e), [e]), ne = w((x) => !pe(x) && (G(x) || M && !V.has(x)), [G, M, V]), X = E({ shownExpanded: ne, isExpanded: G, unloadedFolders: V, entries: e, childrenOf: I });
|
|
498
498
|
H(() => {
|
|
499
499
|
X.current = { shownExpanded: ne, isExpanded: G, unloadedFolders: V, entries: e, childrenOf: I };
|
|
500
500
|
}, [ne, G, V, e, I]);
|
|
@@ -530,14 +530,14 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
530
530
|
{
|
|
531
531
|
name: x.name,
|
|
532
532
|
onRetry: () => {
|
|
533
|
-
U(x.path),
|
|
533
|
+
U(x.path), k.retryChildren(r, x.path), X.current.shownExpanded(x.path) || z([x.path]);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
),
|
|
537
|
-
[
|
|
538
|
-
), He = n === "multi" ? l : jn, { loopFolderName:
|
|
539
|
-
for (const x of
|
|
540
|
-
}, [U]), { maxDepth: Te } =
|
|
537
|
+
[k, r, U, z]
|
|
538
|
+
), He = n === "multi" ? l : jn, { loopFolderName: Ze } = y, wt = C(() => B(e, { openPaths: He, childrenOf: I, renderFailedFolder: De, loopFolderName: Ze }), [B, e, He, I, De, Ze, t]), gt = kt(q, Un), $e = E([]), ge = w(() => {
|
|
539
|
+
for (const x of $e.current) X.current.unloadedFolders.has(x) && U(x);
|
|
540
|
+
}, [U]), { maxDepth: Te } = A.revealDocument, Be = E(u);
|
|
541
541
|
H(() => {
|
|
542
542
|
Be.current = u;
|
|
543
543
|
}, [u]);
|
|
@@ -554,19 +554,19 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
554
554
|
return Y.status !== "ok" || Y.source === null || Y.ancestors.length > Te ? null : Y.source === r ? Y.ancestors : (T.aborted || !S.some((fe) => fe.id === Y.source) || (b.move(Y.source, x, Y.ancestors), Be.current(Y.source)), null);
|
|
555
555
|
},
|
|
556
556
|
open: (x) => {
|
|
557
|
-
|
|
557
|
+
$e.current = x ?? [], x !== null && (ge(), z([...x]));
|
|
558
558
|
},
|
|
559
559
|
progress: (x, T) => En(X.current.entries, x, T, { isShownExpanded: X.current.shownExpanded, childrenOf: X.current.childrenOf })
|
|
560
560
|
}),
|
|
561
561
|
[R, r, S, b, Te, ge, z]
|
|
562
562
|
);
|
|
563
563
|
D(() => ge(), [ge, V]);
|
|
564
|
-
const bt = C(() => [e, t, J], [e, t, J]), Et = w((x) => se.current === null ? Number.POSITIVE_INFINITY :
|
|
564
|
+
const bt = C(() => [e, t, J], [e, t, J]), Et = w((x) => se.current === null ? Number.POSITIVE_INFINITY : Zn(se.current, x), []);
|
|
565
565
|
On({ tree: xe, container: se, path: c.path, chain: c.openFolders ? vt : null, rows: bt, cancel: P, displayed: _, placement: Et });
|
|
566
566
|
const ze = w((x) => oe.has(x), [oe]), ve = C(() => vn(e, { isShownExpanded: ne, childrenOf: I, compare: W, isDirect: ze }), [e, ne, I, W, ze, t]), be = _ && g;
|
|
567
567
|
H(() => {
|
|
568
568
|
p(e);
|
|
569
|
-
}, [e, p]), H(() => () => p(null), [p]), D(() =>
|
|
569
|
+
}, [e, p]), H(() => () => p(null), [p]), D(() => k.claimChildren(r, be ? ve.folders : Kn), [k, r, be, ve]), D(() => we(V), [we, V]), D(() => {
|
|
570
570
|
be && ue && me({ entries: e, isShownExpanded: ne, childrenOf: I, compare: W, expanded: J, waiting: ve.waiting, expansionPending: ee });
|
|
571
571
|
}, [be, ue, me, e, ne, I, W, J, ve, ee]);
|
|
572
572
|
const yt = w(
|
|
@@ -627,15 +627,15 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
627
627
|
entryStyle: Vn,
|
|
628
628
|
nameStyle: zn
|
|
629
629
|
},
|
|
630
|
-
virtualScroll:
|
|
630
|
+
virtualScroll: $n,
|
|
631
631
|
sort: O,
|
|
632
|
-
locale:
|
|
632
|
+
locale: $,
|
|
633
633
|
labels: Tt
|
|
634
634
|
}
|
|
635
635
|
)
|
|
636
636
|
] });
|
|
637
637
|
}, Jn = ({ pending: e, status: t }) => {
|
|
638
|
-
const { labels: n } =
|
|
638
|
+
const { labels: n } = Z(), r = t.state !== "running", [o, c] = F(0), l = E(!0);
|
|
639
639
|
H(() => {
|
|
640
640
|
const s = l.current;
|
|
641
641
|
if (l.current = r, !r || e > 0 && !s) {
|
|
@@ -656,27 +656,27 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
656
656
|
/* @__PURE__ */ m("span", { children: t.state === "running" ? n.expandAllProgress(t.opened, a) : n.foldersLoading(a) })
|
|
657
657
|
] });
|
|
658
658
|
}, er = ({ stop: e, opened: t, budget: n }) => {
|
|
659
|
-
const { labels: r } =
|
|
659
|
+
const { labels: r } = Z();
|
|
660
660
|
return /* @__PURE__ */ m("p", { className: "aqmx-explorer-expand-all-stop", "data-testid": "markdown-explorer-expand-all-stop", "data-aqmx-stop": e, children: ct(r, n, e, t) });
|
|
661
661
|
}, tr = ({ entries: e, ...t }) => {
|
|
662
|
-
const { trees: n } =
|
|
662
|
+
const { trees: n } = Z(), r = Ce(n.subscribe, n.version, n.version), { sourceId: o } = t, [c] = F(mn), l = C(() => c(e, (a) => n.children(o, a)), [c, e, n, o, r]);
|
|
663
663
|
return l.length === 0 ? /* @__PURE__ */ m(Xn, {}) : /* @__PURE__ */ m(Qn, { entries: l, version: r, ...t });
|
|
664
664
|
}, nr = ({ result: e, onRetry: t, ...n }) => {
|
|
665
|
-
const { renderTreeFailure: r } =
|
|
665
|
+
const { renderTreeFailure: r } = Z(), o = ye(e);
|
|
666
666
|
if (o.status === "deferred") return /* @__PURE__ */ m(it, {});
|
|
667
667
|
if (o.status === "ok") return /* @__PURE__ */ m(tr, { entries: o.entries, ...n });
|
|
668
668
|
const c = r?.(o.failure);
|
|
669
|
-
return /* @__PURE__ */ m("div", { className: "aqmx-explorer-tree-message", "data-testid": "markdown-explorer-tree-failure", "data-aqmx-failure": o.failure.reason, children: c !== void 0 ? c : /* @__PURE__ */ m(
|
|
669
|
+
return /* @__PURE__ */ m("div", { className: "aqmx-explorer-tree-message", "data-testid": "markdown-explorer-tree-failure", "data-aqmx-failure": o.failure.reason, children: c !== void 0 ? c : /* @__PURE__ */ m(At, { failure: o.failure, alert: !0, onRetry: t, testId: null }) });
|
|
670
670
|
}, rr = ({ onControls: e, ...t }) => {
|
|
671
|
-
const { trees: n, storageNamespace: r, labels: o, announcer: c, config: l } =
|
|
671
|
+
const { trees: n, storageNamespace: r, labels: o, announcer: c, config: l } = Z(), { sourceId: a } = t, s = jt({ storageKey: Ut(r).treeExpansion(a) });
|
|
672
672
|
Ce(n.subscribe, n.version, n.version);
|
|
673
673
|
const d = n.read(a), u = w(() => n.retry(a), [n, a]);
|
|
674
674
|
H(() => n.open(a), [n, a]);
|
|
675
|
-
const i = Tn(), { expanded: p, expandMultiple: h, collapseAll: g } = s, [v, P] = F(null),
|
|
675
|
+
const i = Tn(), { expanded: p, expandMultiple: h, collapseAll: g } = s, [v, P] = F(null), k = v !== p, q = E(p);
|
|
676
676
|
H(() => {
|
|
677
677
|
q.current = p;
|
|
678
678
|
}, [p]);
|
|
679
|
-
const y = l.expandAll,
|
|
679
|
+
const y = l.expandAll, $ = w(() => c.announce(o.expandAllStarted), [c, o]), N = w((M) => c.announce(Wn(o, y, M)), [c, o, y]), R = Ln({ budget: y, expandMultiple: h, onStart: $, onFinish: N }), { status: A, start: S, end: b, advance: _ } = R, B = A.state === "running", ie = C(() => ({ running: B, advance: _ }), [B, _]), re = E(null), [K, G] = F(!1), ae = w((M) => {
|
|
680
680
|
re.current = M, G(M !== null);
|
|
681
681
|
}, []);
|
|
682
682
|
D(
|
|
@@ -694,10 +694,10 @@ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt =
|
|
|
694
694
|
}, [e, ee, S, K, B]), D(() => () => e(null), [e]), D(() => {
|
|
695
695
|
K || b();
|
|
696
696
|
}, [K, b]), /* @__PURE__ */ L(Qe, { children: [
|
|
697
|
-
|
|
697
|
+
A.state === "stopped" ? /* @__PURE__ */ m(er, { stop: A.stop, opened: A.opened, budget: y }) : null,
|
|
698
698
|
/* @__PURE__ */ L("div", { className: "aqmx-explorer-tree-area", children: [
|
|
699
|
-
/* @__PURE__ */ m(et, { fallback: /* @__PURE__ */ m(it, {}), children: /* @__PURE__ */ m(nr, { result: d, onRetry: u, expansion: s, onShown: ae, marks: i, claimsHeld:
|
|
700
|
-
/* @__PURE__ */ m(Jn, { pending: n.pendingChildren(a), status:
|
|
699
|
+
/* @__PURE__ */ m(et, { fallback: /* @__PURE__ */ m(it, {}), children: /* @__PURE__ */ m(nr, { result: d, onRetry: u, expansion: s, onShown: ae, marks: i, claimsHeld: k, expandAll: ie, revealCancel: Q, ...t }) }),
|
|
700
|
+
/* @__PURE__ */ m(Jn, { pending: n.pendingChildren(a), status: A })
|
|
701
701
|
] })
|
|
702
702
|
] });
|
|
703
703
|
};
|
|
@@ -723,7 +723,7 @@ function ar({
|
|
|
723
723
|
}));
|
|
724
724
|
}
|
|
725
725
|
const dt = /* @__PURE__ */ f.forwardRef(ar), We = "markdown-explorer-selection-remove", lr = ({ selection: e, onRemove: t, onClear: n, onOpenSelection: r, onLeave: o }) => {
|
|
726
|
-
const { labels: c } =
|
|
726
|
+
const { labels: c } = Z(), l = Re(), a = E(null), s = [...e], d = (i, p) => {
|
|
727
727
|
if (p.ownerDocument.activeElement === p) {
|
|
728
728
|
const h = a.current === null ? [] : [...a.current.querySelectorAll(`[data-testid="${We}"]`)], g = h.indexOf(p), v = [h[g + 1], h[g - 1]].find((P) => P !== void 0);
|
|
729
729
|
v === void 0 ? o() : v.focus();
|
|
@@ -756,7 +756,7 @@ const dt = /* @__PURE__ */ f.forwardRef(ar), We = "markdown-explorer-selection-r
|
|
|
756
756
|
] }, i)) }),
|
|
757
757
|
r === void 0 ? null : /* @__PURE__ */ m("button", { type: "button", className: "aqmx-explorer-tray-open", "data-testid": "markdown-explorer-selection-open", onClick: () => r(s.map(([i]) => i)), children: c.openSelectionInMulti(s.length) })
|
|
758
758
|
] });
|
|
759
|
-
},
|
|
759
|
+
}, ke = /* @__PURE__ */ new Map(), or = (e, t) => {
|
|
760
760
|
if (t.selected === e.has(t.path)) return e;
|
|
761
761
|
const n = new Map(e);
|
|
762
762
|
return t.selected ? n.set(t.path, t.name) : n.delete(t.path), n;
|
|
@@ -969,7 +969,7 @@ function Tr({
|
|
|
969
969
|
}));
|
|
970
970
|
}
|
|
971
971
|
const Nr = /* @__PURE__ */ f.forwardRef(Tr);
|
|
972
|
-
function
|
|
972
|
+
function Ar({
|
|
973
973
|
title: e,
|
|
974
974
|
titleId: t,
|
|
975
975
|
...n
|
|
@@ -988,7 +988,7 @@ function kr({
|
|
|
988
988
|
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"
|
|
989
989
|
}));
|
|
990
990
|
}
|
|
991
|
-
const
|
|
991
|
+
const kr = /* @__PURE__ */ f.forwardRef(Ar);
|
|
992
992
|
function Lr({
|
|
993
993
|
title: e,
|
|
994
994
|
titleId: t,
|
|
@@ -1052,7 +1052,7 @@ function Cr({
|
|
|
1052
1052
|
}
|
|
1053
1053
|
const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
1054
1054
|
sortMode: mr,
|
|
1055
|
-
folderPlacement:
|
|
1055
|
+
folderPlacement: kr,
|
|
1056
1056
|
readmePlacement: pr,
|
|
1057
1057
|
selectionMode: xr,
|
|
1058
1058
|
doubleClickAction: Sr,
|
|
@@ -1069,7 +1069,7 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1069
1069
|
if (typeof n != "string") throw new TypeError(`[markdown-explorer] the tree setting ${t.key} must name a string label; labels.${t.labelKey} is a ${typeof n}`);
|
|
1070
1070
|
return n;
|
|
1071
1071
|
}, _r = ({ id: e, settings: t, descriptors: n, onAdvance: r, onClose: o, ref: c }) => {
|
|
1072
|
-
const { labels: l } =
|
|
1072
|
+
const { labels: l } = Z(), a = E([]);
|
|
1073
1073
|
D(() => {
|
|
1074
1074
|
a.current[0]?.focus();
|
|
1075
1075
|
}, []);
|
|
@@ -1109,8 +1109,8 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1109
1109
|
return /* @__PURE__ */ L(
|
|
1110
1110
|
"button",
|
|
1111
1111
|
{
|
|
1112
|
-
ref: (
|
|
1113
|
-
a.current[i] =
|
|
1112
|
+
ref: (k) => {
|
|
1113
|
+
a.current[i] = k;
|
|
1114
1114
|
},
|
|
1115
1115
|
type: "button",
|
|
1116
1116
|
tabIndex: -1,
|
|
@@ -1120,7 +1120,7 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1120
1120
|
"data-testid": "markdown-explorer-tree-settings-item",
|
|
1121
1121
|
"data-aqmx-setting": u.key,
|
|
1122
1122
|
onClick: () => r(u),
|
|
1123
|
-
onKeyDown: (
|
|
1123
|
+
onKeyDown: (k) => d(k, i),
|
|
1124
1124
|
children: [
|
|
1125
1125
|
/* @__PURE__ */ m(p, { className: "aqmx-explorer-menu-icon", "aria-hidden": "true" }),
|
|
1126
1126
|
/* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-name", children: h }),
|
|
@@ -1131,7 +1131,7 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1131
1131
|
);
|
|
1132
1132
|
}) });
|
|
1133
1133
|
}, Ir = ({ settings: e, descriptors: t, onAdvance: n }) => {
|
|
1134
|
-
const { labels: r, announcer: o } =
|
|
1134
|
+
const { labels: r, announcer: o } = Z(), [c, l] = F(!1), a = E(null), s = E(null), d = E(null), u = Re(), i = w(() => {
|
|
1135
1135
|
a.current?.focus(), l(!1);
|
|
1136
1136
|
}, []);
|
|
1137
1137
|
D(() => {
|
|
@@ -1181,21 +1181,21 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1181
1181
|
menu: c ? /* @__PURE__ */ m(_r, { ref: s, id: u, settings: e, descriptors: t, onAdvance: h, onClose: i }) : null
|
|
1182
1182
|
};
|
|
1183
1183
|
}, Dr = () => {
|
|
1184
|
-
const { treeSettings: e } =
|
|
1184
|
+
const { treeSettings: e } = Z();
|
|
1185
1185
|
return { settings: Ce(e.subscribe, e.getSnapshot, e.getServerSnapshot), advance: e.advance };
|
|
1186
|
-
}, Xe = /* @__PURE__ */ new Set(), Hr = '[role="tree"] [role="treeitem"][tabindex="0"]',
|
|
1187
|
-
const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: c, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: i, documents: p, announcer: h, reveals: g } =
|
|
1186
|
+
}, Xe = /* @__PURE__ */ new Set(), Hr = '[role="tree"] [role="treeitem"][tabindex="0"]', Zr = "[data-directory-tree-tab-stop]", ca = (e) => {
|
|
1187
|
+
const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: c, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: i, documents: p, announcer: h, reveals: g } = Z(), { settings: v, advance: P } = Dr(), k = C(() => It(t === "tree"), [t]), q = t === "tree" && v.selectionMode === "multiple";
|
|
1188
1188
|
cr(q);
|
|
1189
|
-
const y = e.mode === "tree" ? e.tray.onGatheredChange : null,
|
|
1189
|
+
const y = e.mode === "tree" ? e.tray.onGatheredChange : null, $ = e.mode === "tree" ? e.onOpenSelection : void 0, N = e.mode === "tree" ? e.onOpenFolder : null, R = e.mode === "tree" && e.currentFolder, A = C(() => N === null ? null : { current: r, open: N }, [N, r]), S = e.mode === "tree" && q ? e.tray.gathered : ke, b = w(
|
|
1190
1190
|
(O) => {
|
|
1191
1191
|
const I = P(O);
|
|
1192
|
-
return I.selectionMode !== "multiple" && y?.(
|
|
1192
|
+
return I.selectionMode !== "multiple" && y?.(ke), I;
|
|
1193
1193
|
},
|
|
1194
1194
|
[P, y]
|
|
1195
|
-
), _ = Ir({ settings: v, descriptors:
|
|
1195
|
+
), _ = Ir({ settings: v, descriptors: k, onAdvance: b }), B = w((O) => y?.((I) => or(I, O)), [y]), ie = w((O) => y?.((I) => sr(I, O)), [y]), re = w(() => y?.(ke), [y]), K = E(null), G = w(() => {
|
|
1196
1196
|
const O = K.current;
|
|
1197
1197
|
if (O === null) return;
|
|
1198
|
-
[Hr,
|
|
1198
|
+
[Hr, Zr, '[data-testid="markdown-explorer-tree-settings"]'].map((V) => O.querySelector(V)).find((V) => V !== null)?.focus();
|
|
1199
1199
|
}, []), ae = C(() => new Set(S.keys()), [S]), z = C(() => r === null ? Xe : /* @__PURE__ */ new Set([r]), [r]), Q = C(() => {
|
|
1200
1200
|
if (t === "multi") return { mode: "multiple", items: o, shownPath: null, onChange: null };
|
|
1201
1201
|
switch (v.selectionMode) {
|
|
@@ -1269,13 +1269,13 @@ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
|
|
|
1269
1269
|
/* @__PURE__ */ L("div", { className: "aqmx-explorer-body", "data-aqmx-explorer-body": "", children: [
|
|
1270
1270
|
oe !== null && oe.sourceId === n ? /* @__PURE__ */ m("p", { role: "alert", className: "aqmx-explorer-refresh-failure", "data-testid": "markdown-explorer-refresh-failure", "data-aqmx-failure": oe.failure.reason, children: d.treeRefreshFailed(Ot(d, oe.failure.reason)) }) : null,
|
|
1271
1271
|
/* @__PURE__ */ m(et, { fallback: null, children: /* @__PURE__ */ m(cn, {}) }),
|
|
1272
|
-
/* @__PURE__ */ m(rr, { mode: t, sourceId: n, settings: v, reveal: J, openPaths: o, selection: Q, onOpenDocument: c, folders:
|
|
1273
|
-
q && S.size > 0 ? /* @__PURE__ */ m(lr, { selection: S, onRemove: ie, onClear: re, onOpenSelection:
|
|
1272
|
+
/* @__PURE__ */ m(rr, { mode: t, sourceId: n, settings: v, reveal: J, openPaths: o, selection: Q, onOpenDocument: c, folders: A, onRevealSource: a, onControls: le }, n),
|
|
1273
|
+
q && S.size > 0 ? /* @__PURE__ */ m(lr, { selection: S, onRemove: ie, onClear: re, onOpenSelection: $, onLeave: G }) : null,
|
|
1274
1274
|
_.menu
|
|
1275
1275
|
] })
|
|
1276
1276
|
] });
|
|
1277
1277
|
};
|
|
1278
|
-
function
|
|
1278
|
+
function $r({
|
|
1279
1279
|
title: e,
|
|
1280
1280
|
titleId: t,
|
|
1281
1281
|
...n
|
|
@@ -1296,35 +1296,35 @@ function Zr({
|
|
|
1296
1296
|
clipRule: "evenodd"
|
|
1297
1297
|
}));
|
|
1298
1298
|
}
|
|
1299
|
-
const Br = /* @__PURE__ */ f.forwardRef(
|
|
1300
|
-
const { labels: c } =
|
|
1299
|
+
const Br = /* @__PURE__ */ f.forwardRef($r), zr = ({ explorer: e, toggleRef: t, covered: n, onNoticeSlotChange: r, dismissals: o }) => {
|
|
1300
|
+
const { labels: c } = Z(), l = Jt(), { location: a } = qt(), [s, d] = F(!1), [u, i] = F({ navigated: l, source: a.source }), [p, h] = F(!1);
|
|
1301
1301
|
u.navigated !== l && (i({ navigated: l, source: a.source }), u.source === a.source && !p && d(!1));
|
|
1302
1302
|
const [g, v] = F(o);
|
|
1303
1303
|
g !== o && (v(o), d(!1));
|
|
1304
|
-
const P = E(null),
|
|
1304
|
+
const P = E(null), k = E(null), q = E(null), y = E(!1), $ = Re();
|
|
1305
1305
|
H(() => {
|
|
1306
1306
|
const b = P.current;
|
|
1307
|
-
b !== null && (s && !b.open ? (b.showModal(),
|
|
1307
|
+
b !== null && (s && !b.open ? (b.showModal(), k.current?.focus()) : !s && b.open && (b.close(), t.current?.focus()), r(s ? q.current : null));
|
|
1308
1308
|
}, [s, t, r]), H(() => () => r(null), [r]);
|
|
1309
1309
|
const N = w((b) => {
|
|
1310
1310
|
b.key !== "Escape" || b.defaultPrevented || (Oe(b), d(!1));
|
|
1311
1311
|
}, []), R = w((b) => {
|
|
1312
1312
|
y.current = b.target === b.currentTarget;
|
|
1313
|
-
}, []),
|
|
1313
|
+
}, []), A = w((b) => {
|
|
1314
1314
|
const _ = y.current;
|
|
1315
1315
|
y.current = !1, _ && b.target === b.currentTarget && d(!1);
|
|
1316
1316
|
}, []), S = w(() => {
|
|
1317
1317
|
d(!1);
|
|
1318
1318
|
}, []);
|
|
1319
1319
|
return /* @__PURE__ */ L(Qe, { children: [
|
|
1320
|
-
/* @__PURE__ */ m("div", { className: "aqmx-sheet-bar", inert: n, children: /* @__PURE__ */ L("button", { ref: t, type: "button", className: "aqmx-sheet-toggle", "aria-haspopup": "dialog", "aria-expanded": s, "aria-controls":
|
|
1320
|
+
/* @__PURE__ */ m("div", { className: "aqmx-sheet-bar", inert: n, children: /* @__PURE__ */ L("button", { ref: t, type: "button", className: "aqmx-sheet-toggle", "aria-haspopup": "dialog", "aria-expanded": s, "aria-controls": $, "data-testid": "markdown-explorer-sheet-toggle", onClick: () => d(!0), children: [
|
|
1321
1321
|
/* @__PURE__ */ m(Br, { "aria-hidden": "true" }),
|
|
1322
1322
|
/* @__PURE__ */ m("span", { children: c.showExplorer })
|
|
1323
1323
|
] }) }),
|
|
1324
|
-
/* @__PURE__ */ m("dialog", { ref: P, id:
|
|
1324
|
+
/* @__PURE__ */ m("dialog", { ref: P, id: $, className: "aqmx-sheet", "aria-label": c.explorerRegion, "data-testid": "markdown-explorer-sheet", onKeyDown: N, onPointerDown: R, onClick: A, onClose: S, children: /* @__PURE__ */ L("div", { className: "aqmx-sheet-panel", children: [
|
|
1325
1325
|
/* @__PURE__ */ L("div", { className: "aqmx-sheet-header", children: [
|
|
1326
1326
|
/* @__PURE__ */ m("div", { ref: q, className: "aqmx-sheet-notice-slot" }),
|
|
1327
|
-
/* @__PURE__ */ m("button", { ref:
|
|
1327
|
+
/* @__PURE__ */ m("button", { ref: k, type: "button", className: "aqmx-sheet-close", "aria-label": c.hideExplorer, title: c.hideExplorer, "data-testid": "markdown-explorer-sheet-close", onClick: () => d(!1), children: /* @__PURE__ */ m(dt, { "aria-hidden": "true" }) })
|
|
1328
1328
|
] }),
|
|
1329
1329
|
/* @__PURE__ */ m("div", { className: "aqmx-sheet-body", children: /* @__PURE__ */ m(Fe, { value: s, children: /* @__PURE__ */ m(ut, { value: h, children: e }) }) }),
|
|
1330
1330
|
/* @__PURE__ */ m(Ct, { holds: s, testId: "markdown-explorer-sheet-announcer" })
|
|
@@ -1420,7 +1420,7 @@ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
|
|
|
1420
1420
|
onDraggingChange: c,
|
|
1421
1421
|
explorerMinPixels: l
|
|
1422
1422
|
}) => {
|
|
1423
|
-
const { viewSettings: a, labels: s } =
|
|
1423
|
+
const { viewSettings: a, labels: s } = Z(), u = Ft((N) => e === "tree" ? N.treeExplorer : N.multiExplorer) ?? (e === "tree" ? Bt : zt), i = E(!1), [p, h] = F(!1), g = E(c);
|
|
1424
1424
|
H(() => {
|
|
1425
1425
|
g.current = c;
|
|
1426
1426
|
}, [c]);
|
|
@@ -1428,7 +1428,7 @@ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
|
|
|
1428
1428
|
w(
|
|
1429
1429
|
(N) => {
|
|
1430
1430
|
if (N.length !== 2) return;
|
|
1431
|
-
const [R = 0,
|
|
1431
|
+
const [R = 0, A = 0] = N, S = R + A;
|
|
1432
1432
|
if (S <= 0 || R <= 0) return;
|
|
1433
1433
|
const b = Math.min(Ve, R / S * 100);
|
|
1434
1434
|
a.update(e === "tree" ? { treeExplorer: b } : { multiExplorer: b });
|
|
@@ -1442,13 +1442,13 @@ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
|
|
|
1442
1442
|
},
|
|
1443
1443
|
[]
|
|
1444
1444
|
);
|
|
1445
|
-
const
|
|
1445
|
+
const k = Qt() ? Zt : $t, q = C(() => ({ [jr]: `${String(t ? 0 : k)}px` }), [t, k]), y = w(
|
|
1446
1446
|
(N, R) => {
|
|
1447
|
-
const [
|
|
1448
|
-
N.length === 2 && S > 0 && h(
|
|
1447
|
+
const [A = 0, S = 0] = N;
|
|
1448
|
+
N.length === 2 && S > 0 && h(A <= 0), v.layoutChanged(N, R);
|
|
1449
1449
|
},
|
|
1450
1450
|
[v]
|
|
1451
|
-
),
|
|
1451
|
+
), $ = w(
|
|
1452
1452
|
(N) => {
|
|
1453
1453
|
i.current = N, c?.(N), v.draggingChanged(N);
|
|
1454
1454
|
},
|
|
@@ -1473,11 +1473,11 @@ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
|
|
|
1473
1473
|
Xt,
|
|
1474
1474
|
{
|
|
1475
1475
|
id: pt(e),
|
|
1476
|
-
thickness:
|
|
1476
|
+
thickness: k,
|
|
1477
1477
|
indicator: { visible: !0, thickness: Ee.gripThickness, length: Ee.gripLength, barThickness: Ee.barThickness, barLength: Ee.barLength },
|
|
1478
1478
|
title: s.resizeExplorer,
|
|
1479
1479
|
"aria-label": s.resizeExplorer,
|
|
1480
|
-
onDragging:
|
|
1480
|
+
onDragging: $,
|
|
1481
1481
|
inert: o,
|
|
1482
1482
|
className: "aqmx-split-handle"
|
|
1483
1483
|
}
|
|
@@ -1486,7 +1486,7 @@ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
|
|
|
1486
1486
|
] });
|
|
1487
1487
|
};
|
|
1488
1488
|
export {
|
|
1489
|
-
|
|
1489
|
+
ke as E,
|
|
1490
1490
|
Vr as S,
|
|
1491
1491
|
ia as a,
|
|
1492
1492
|
ca as b
|