@aiquants/markdown-explorer 0.5.0 → 0.7.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 +49 -0
- package/README.md +65 -8
- package/dist/EditSurface-BCB-0vUK.js +371 -0
- package/dist/EditSurface-BZ98L7hy.cjs +2 -0
- package/dist/ExplorerSplit-BTRTah7R.cjs +1 -0
- package/dist/{ExplorerSplit-CWcK1E4I.js → ExplorerSplit-DpoMtzq3.js} +391 -417
- package/dist/MultiLayout-B7OiXgWH.cjs +1 -0
- package/dist/MultiLayout-BD2LiwOe.js +947 -0
- package/dist/{NativeScrollBar-DbzyQ85y.cjs → NativeScrollBar-B4j3Vigb.cjs} +1 -1
- package/dist/{NativeScrollBar-apXjIKRW.js → NativeScrollBar-EXOKhHP4.js} +1 -1
- package/dist/TreeLayout-B9dF2A3h.cjs +1 -0
- package/dist/TreeLayout-hn2bfU22.js +29 -0
- package/dist/client/MarkdownExplorer.d.cts +2 -1
- package/dist/client/MarkdownExplorer.d.ts +2 -1
- package/dist/client/storage.d.cts +1 -0
- package/dist/client/storage.d.ts +1 -0
- package/dist/core/contracts.d.cts +67 -6
- package/dist/core/contracts.d.ts +67 -6
- package/dist/core/labels.d.cts +53 -0
- package/dist/core/labels.d.ts +53 -0
- package/dist/core/location.d.cts +7 -0
- package/dist/core/location.d.ts +7 -0
- package/dist/dataRoute-CcZ8PK00.cjs +1 -0
- package/dist/dataRoute-D1vE1wFW.js +270 -0
- package/dist/index-C0gh_dRY.js +3188 -0
- package/dist/index-CCc6qUbM.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -31
- package/dist/location-DmzVAFvo.cjs +1 -0
- package/dist/{location-c1zdeySY.js → location-Q4sgRrUm.js} +202 -193
- package/dist/merge-0W6xtIxj.cjs +5 -0
- package/dist/merge-Bi41vtSe.js +20 -0
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +173 -172
- package/dist/server/errors.d.cts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/ports.d.cts +34 -1
- package/dist/server/ports.d.ts +34 -1
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +889 -729
- package/dist/{storage-DA4ItHzl.js → storage-BSthKLSG.js} +14 -13
- package/dist/storage-Dgi4JXaB.cjs +1 -0
- package/dist/storage.cjs +1 -1
- package/dist/storage.js +1 -1
- package/dist/styles/markdown-explorer.css +1 -1
- package/docs/behavior/dom-hooks.md +20 -3
- package/docs/behavior/layout.md +11 -0
- package/docs/behavior/localization.md +4 -1
- package/docs/behavior/security.md +21 -4
- package/docs/behavior/url-contract.md +13 -4
- package/package.json +14 -5
- package/dist/ExplorerSplit-ajN3GSdA.cjs +0 -1
- package/dist/MultiLayout-BtWtCzJV.js +0 -922
- package/dist/MultiLayout-DvkcdO9c.cjs +0 -1
- package/dist/TreeLayout-BcHsv9G8.js +0 -23
- package/dist/TreeLayout-rwhJfLmU.cjs +0 -1
- package/dist/dataRoute-Btg4w3vO.js +0 -205
- package/dist/dataRoute-DHpu0fg2.cjs +0 -1
- package/dist/index-CIZw73j9.js +0 -2154
- package/dist/index-Cie6WPiM.cjs +0 -3
- package/dist/location-CSIhx-L4.cjs +0 -1
- package/dist/storage-Bkb2Axdi.cjs +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as D, F as Nt,
|
|
3
|
-
import * as
|
|
4
|
-
import { use as
|
|
5
|
-
import { C as
|
|
6
|
-
import { useDirectoryTreeState as
|
|
7
|
-
import { T as
|
|
8
|
-
import { s as
|
|
9
|
-
import { PanelGroup as
|
|
10
|
-
import { useLocation as
|
|
11
|
-
function
|
|
1
|
+
import { jsx as m, jsxs as O, Fragment as Ge } from "react/jsx-runtime";
|
|
2
|
+
import { u as D, F as Nt, q as Oe, o as Ye, r as kt, k as Pe, s as Lt, t as Ot, h as Pt, w as At, x as qt, y as Ct } from "./index-C0gh_dRY.js";
|
|
3
|
+
import * as p from "react";
|
|
4
|
+
import { use as be, createContext as Ae, useState as q, useCallback as w, useMemo as F, useRef as g, useLayoutEffect as I, useEffect as _, useSyncExternalStore as Ee, Suspense as Qe, useId as ye } from "react";
|
|
5
|
+
import { C as Ft, k as Mt, l as Je, v as _t, m as It, n as Dt, E as Ht, o as Be, q as $t, s as Zt, S as ve, t as Bt, F as zt, A as Vt } from "./location-Q4sgRrUm.js";
|
|
6
|
+
import { useDirectoryTreeState as jt, DirectoryTree as Kt } from "@aiquants/directory-tree";
|
|
7
|
+
import { T as Ut } from "./tapScrollCircle-u4EXeLhx.js";
|
|
8
|
+
import { s as Wt } from "./storage-BSthKLSG.js";
|
|
9
|
+
import { PanelGroup as Xt, Panel as ze, PanelResizeHandle as Gt } from "@aiquants/resize-panels";
|
|
10
|
+
import { useLocation as Yt } from "react-router";
|
|
11
|
+
function Qt({
|
|
12
12
|
title: e,
|
|
13
13
|
titleId: t,
|
|
14
14
|
...n
|
|
15
15
|
}, r) {
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
18
|
viewBox: "0 0 24 24",
|
|
19
19
|
fill: "currentColor",
|
|
@@ -21,21 +21,21 @@ function Yt({
|
|
|
21
21
|
"data-slot": "icon",
|
|
22
22
|
ref: r,
|
|
23
23
|
"aria-labelledby": t
|
|
24
|
-
}, n), e ? /* @__PURE__ */
|
|
24
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
25
25
|
id: t
|
|
26
|
-
}, e) : null, /* @__PURE__ */
|
|
26
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
27
27
|
fillRule: "evenodd",
|
|
28
28
|
d: "M19.5 21a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-5.379a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H4.5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h15ZM9 12.75a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5H9Z",
|
|
29
29
|
clipRule: "evenodd"
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const Jt = /* @__PURE__ */ p.forwardRef(Qt);
|
|
33
|
+
function en({
|
|
34
34
|
title: e,
|
|
35
35
|
titleId: t,
|
|
36
36
|
...n
|
|
37
37
|
}, r) {
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
39
39
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
40
|
viewBox: "0 0 24 24",
|
|
41
41
|
fill: "currentColor",
|
|
@@ -43,21 +43,21 @@ function Jt({
|
|
|
43
43
|
"data-slot": "icon",
|
|
44
44
|
ref: r,
|
|
45
45
|
"aria-labelledby": t
|
|
46
|
-
}, n), e ? /* @__PURE__ */
|
|
46
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
47
47
|
id: t
|
|
48
|
-
}, e) : null, /* @__PURE__ */
|
|
48
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
49
49
|
fillRule: "evenodd",
|
|
50
50
|
d: "M19.5 21a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-5.379a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H4.5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h15Zm-6.75-10.5a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25v2.25a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V10.5Z",
|
|
51
51
|
clipRule: "evenodd"
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
54
|
+
const tn = /* @__PURE__ */ p.forwardRef(en);
|
|
55
|
+
function nn({
|
|
56
56
|
title: e,
|
|
57
57
|
titleId: t,
|
|
58
58
|
...n
|
|
59
59
|
}, r) {
|
|
60
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
viewBox: "0 0 24 24",
|
|
63
63
|
fill: "currentColor",
|
|
@@ -65,21 +65,21 @@ function tn({
|
|
|
65
65
|
"data-slot": "icon",
|
|
66
66
|
ref: r,
|
|
67
67
|
"aria-labelledby": t
|
|
68
|
-
}, n), e ? /* @__PURE__ */
|
|
68
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
69
69
|
id: t
|
|
70
|
-
}, e) : null, /* @__PURE__ */
|
|
70
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
71
71
|
d: "M16.5 6a3 3 0 0 0-3-3H6a3 3 0 0 0-3 3v7.5a3 3 0 0 0 3 3v-6A4.5 4.5 0 0 1 10.5 6h6Z"
|
|
72
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ p.createElement("path", {
|
|
73
73
|
d: "M18 7.5a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3h-7.5a3 3 0 0 1-3-3v-7.5a3 3 0 0 1 3-3H18Z"
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
76
|
+
const rn = /* @__PURE__ */ p.forwardRef(nn);
|
|
77
|
+
function an({
|
|
78
78
|
title: e,
|
|
79
79
|
titleId: t,
|
|
80
80
|
...n
|
|
81
81
|
}, r) {
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
83
83
|
xmlns: "http://www.w3.org/2000/svg",
|
|
84
84
|
viewBox: "0 0 24 24",
|
|
85
85
|
fill: "currentColor",
|
|
@@ -87,30 +87,30 @@ function rn({
|
|
|
87
87
|
"data-slot": "icon",
|
|
88
88
|
ref: r,
|
|
89
89
|
"aria-labelledby": t
|
|
90
|
-
}, n), e ? /* @__PURE__ */
|
|
90
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
91
91
|
id: t
|
|
92
|
-
}, e) : null, /* @__PURE__ */
|
|
92
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
93
93
|
fillRule: "evenodd",
|
|
94
94
|
d: "M3 6a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3V6ZM3 15.75a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-2.25Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3v-2.25Z",
|
|
95
95
|
clipRule: "evenodd"
|
|
96
96
|
}));
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
const { notices: e } = D(), t =
|
|
100
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
n.body === void 0 ? null : /* @__PURE__ */
|
|
98
|
+
const ln = /* @__PURE__ */ p.forwardRef(an), on = () => {
|
|
99
|
+
const { notices: e } = D(), t = be(e);
|
|
100
|
+
return t.length === 0 ? null : /* @__PURE__ */ m("div", { className: "aqmx-explorer-notices", children: t.map((n) => /* @__PURE__ */ O("div", { className: "aqmx-callout", "data-aqmx-tone": n.tone, "data-testid": "markdown-explorer-notice", "data-aqmx-notice": n.id, children: [
|
|
101
|
+
/* @__PURE__ */ m("p", { className: "aqmx-callout-title", children: n.title }),
|
|
102
|
+
n.body === void 0 ? null : /* @__PURE__ */ m("p", { className: "aqmx-callout-body", children: n.body }),
|
|
103
103
|
n.action === void 0 ? null : (
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ m("a", { className: "aqmx-callout-action", href: n.action.href, children: n.action.label })
|
|
105
105
|
)
|
|
106
106
|
] }, n.id)) });
|
|
107
107
|
};
|
|
108
|
-
function
|
|
108
|
+
function sn({
|
|
109
109
|
title: e,
|
|
110
110
|
titleId: t,
|
|
111
111
|
...n
|
|
112
112
|
}, r) {
|
|
113
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
114
114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
115
115
|
viewBox: "0 0 24 24",
|
|
116
116
|
fill: "currentColor",
|
|
@@ -118,15 +118,15 @@ function on({
|
|
|
118
118
|
"data-slot": "icon",
|
|
119
119
|
ref: r,
|
|
120
120
|
"aria-labelledby": t
|
|
121
|
-
}, n), e ? /* @__PURE__ */
|
|
121
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
122
122
|
id: t
|
|
123
|
-
}, e) : null, /* @__PURE__ */
|
|
123
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
124
124
|
fillRule: "evenodd",
|
|
125
125
|
d: "M6.912 3a3 3 0 0 0-2.868 2.118l-2.411 7.838a3 3 0 0 0-.133.882V18a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3v-4.162c0-.299-.045-.596-.133-.882l-2.412-7.838A3 3 0 0 0 17.088 3H6.912Zm13.823 9.75-2.213-7.191A1.5 1.5 0 0 0 17.088 4.5H6.912a1.5 1.5 0 0 0-1.434 1.059L3.265 12.75H6.11a3 3 0 0 1 2.684 1.658l.256.513a1.5 1.5 0 0 0 1.342.829h3.218a1.5 1.5 0 0 0 1.342-.83l.256-.512a3 3 0 0 1 2.684-1.658h2.844Z",
|
|
126
126
|
clipRule: "evenodd"
|
|
127
127
|
}));
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Ae(!0), et = "\0loop\0", tt = "\0", dn = () => {
|
|
130
130
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = (l) => {
|
|
131
131
|
const a = e.get(l);
|
|
132
132
|
if (a !== void 0) return a;
|
|
@@ -134,28 +134,28 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
134
134
|
return e.set(l, s), s;
|
|
135
135
|
}, o = (l, a, s) => {
|
|
136
136
|
let d = !1;
|
|
137
|
-
const u = l.map((
|
|
138
|
-
const h = i(
|
|
139
|
-
return h !==
|
|
137
|
+
const u = l.map((f) => {
|
|
138
|
+
const h = i(f, a, s);
|
|
139
|
+
return h !== f && (d = !0), h;
|
|
140
140
|
});
|
|
141
141
|
if (!d) return l;
|
|
142
142
|
const c = n.get(l);
|
|
143
|
-
return c !== void 0 && c.length === u.length && c.every((
|
|
143
|
+
return c !== void 0 && c.length === u.length && c.every((f, h) => f === u[h]) ? c : (n.set(l, u), u);
|
|
144
144
|
}, i = (l, a, s) => {
|
|
145
145
|
if (l.type !== "directory") return l;
|
|
146
146
|
if (s.has(l.path)) return r(l);
|
|
147
147
|
const d = l.lazy === !0 ? a(l.path) : void 0, u = d?.status === "loaded", c = u ? d.entries : l.children;
|
|
148
148
|
if (c === void 0) return l;
|
|
149
149
|
s.add(l.path);
|
|
150
|
-
const
|
|
151
|
-
if (s.delete(l.path), !u &&
|
|
150
|
+
const f = o(c, a, s);
|
|
151
|
+
if (s.delete(l.path), !u && f === l.children) return l;
|
|
152
152
|
const h = t.get(l);
|
|
153
|
-
if (h !== void 0 && h.state === d && h.children ===
|
|
154
|
-
const v = { ...l, children:
|
|
155
|
-
return t.set(l, { state: d, children:
|
|
153
|
+
if (h !== void 0 && h.state === d && h.children === f) return h.grafted;
|
|
154
|
+
const v = { ...l, children: f, lazy: u ? !1 : l.lazy };
|
|
155
|
+
return t.set(l, { state: d, children: f, grafted: v }), v;
|
|
156
156
|
};
|
|
157
157
|
return (l, a) => o(l, a, /* @__PURE__ */ new Set());
|
|
158
|
-
},
|
|
158
|
+
}, un = (e, t) => `${et}${e}${tt}${t}`, pe = (e) => e.startsWith(et), mn = (e) => e.slice(e.lastIndexOf(tt) + 1), se = "data-aqmx-path", fn = (e, t, n, r, o) => {
|
|
159
159
|
const i = { aqmxPath: e.path };
|
|
160
160
|
return n && (i.aqmxOpen = !0), (r === "loading" || r === "failed") && (i.aqmxChildren = r), {
|
|
161
161
|
name: e.name,
|
|
@@ -167,34 +167,34 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
167
167
|
label: o,
|
|
168
168
|
data: i
|
|
169
169
|
};
|
|
170
|
-
},
|
|
171
|
-
const o =
|
|
170
|
+
}, pn = (e, t, n, r) => {
|
|
171
|
+
const o = un(t, e.path);
|
|
172
172
|
return { name: n, type: "directory", absolutePath: o, relativePath: o, children: r, data: { aqmxLoop: e.path } };
|
|
173
|
-
},
|
|
173
|
+
}, hn = () => {
|
|
174
174
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = [], o = (a, s, d) => {
|
|
175
|
-
const u = a.map((
|
|
176
|
-
return c !== void 0 && c.length === u.length && c.every((
|
|
175
|
+
const u = a.map((f) => f.type === "loop" ? i(f, s, d) : l(f, s)), c = n.get(a);
|
|
176
|
+
return c !== void 0 && c.length === u.length && c.every((f, h) => f === u[h]) ? c : (n.set(a, u), u);
|
|
177
177
|
}, i = (a, s, d) => {
|
|
178
178
|
const u = t.get(a);
|
|
179
179
|
if (u !== void 0 && u.parentKey === d && u.loopFolderName === s.loopFolderName) return u.row;
|
|
180
|
-
const c =
|
|
180
|
+
const c = pn(a, d, s.loopFolderName(a.name), r);
|
|
181
181
|
return t.set(a, { row: c, parentKey: d, loopFolderName: s.loopFolderName }), c;
|
|
182
182
|
}, l = (a, s) => {
|
|
183
|
-
const d = a.type === "directory" ? a.children === void 0 ? r : o(a.children, s, a.path) : void 0, u = s.openPaths.has(a.path), c = a.type === "directory" && a.lazy === !0 ? s.childrenOf(a.path)?.status : void 0,
|
|
184
|
-
if (h !== void 0 && h.open === u && h.childrenStatus === c && h.children === d && h.renderFailedFolder ===
|
|
183
|
+
const d = a.type === "directory" ? a.children === void 0 ? r : o(a.children, s, a.path) : void 0, u = s.openPaths.has(a.path), c = a.type === "directory" && a.lazy === !0 ? s.childrenOf(a.path)?.status : void 0, f = c === "failed" ? s.renderFailedFolder : void 0, h = e.get(a);
|
|
184
|
+
if (h !== void 0 && h.open === u && h.childrenStatus === c && h.children === d && h.renderFailedFolder === f)
|
|
185
185
|
return h.row;
|
|
186
|
-
const v =
|
|
187
|
-
return e.set(a, { row: v, open: u, childrenStatus: c, children: d, renderFailedFolder:
|
|
186
|
+
const v = fn(a, d, u, c, f === void 0 ? void 0 : f(a));
|
|
187
|
+
return e.set(a, { row: v, open: u, childrenStatus: c, children: d, renderFailedFolder: f }), v;
|
|
188
188
|
};
|
|
189
189
|
return (a, s) => o(a, s, "");
|
|
190
|
-
},
|
|
190
|
+
}, xn = (e) => {
|
|
191
191
|
if (e === void 0) return;
|
|
192
192
|
const t = (n) => ({ name: n.name, path: n.absolutePath, type: n.type });
|
|
193
193
|
return (n, r) => e(t(n), t(r));
|
|
194
194
|
}, Le = (e, t) => {
|
|
195
195
|
const n = e.filter((r) => r.type === "directory");
|
|
196
196
|
return t === void 0 ? n : n.sort(t);
|
|
197
|
-
},
|
|
197
|
+
}, wn = (e, t) => {
|
|
198
198
|
const n = /* @__PURE__ */ new Map();
|
|
199
199
|
let r = 0;
|
|
200
200
|
const o = (i) => {
|
|
@@ -208,7 +208,7 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
return o(e), { folders: n, waiting: r };
|
|
211
|
-
},
|
|
211
|
+
}, gn = (e) => {
|
|
212
212
|
const t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
213
213
|
for (const o of r)
|
|
214
214
|
o.type === "directory" && (o.lazy === !0 && t.add(o.path), o.children !== void 0 && n(o.children));
|
|
@@ -222,7 +222,7 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
222
222
|
if (r !== null) return r;
|
|
223
223
|
}
|
|
224
224
|
return null;
|
|
225
|
-
},
|
|
225
|
+
}, vn = (e, t, n, r) => {
|
|
226
226
|
let o = e;
|
|
227
227
|
for (const i of t) {
|
|
228
228
|
const l = o.find((a) => a.type === "directory" && a.path === i);
|
|
@@ -232,14 +232,14 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
232
232
|
o = l.children ?? [];
|
|
233
233
|
}
|
|
234
234
|
return o.some((i) => i.type === "file" && i.path === n) ? "ready" : "missing";
|
|
235
|
-
}, Ve = /* @__PURE__ */ new Set(),
|
|
235
|
+
}, Ve = /* @__PURE__ */ new Set(), bn = (e, t) => e.has(t) ? e : new Set(e).add(t), En = (e, t) => {
|
|
236
236
|
if (!t.some((r) => e.has(r))) return e;
|
|
237
237
|
const n = new Set(t);
|
|
238
238
|
return new Set([...e].filter((r) => !n.has(r)));
|
|
239
|
-
},
|
|
240
|
-
const [e, t] = q(Ve), n = w((l) => t((a) =>
|
|
239
|
+
}, yn = (e, t) => [...e].every((n) => t.has(n)) ? e : new Set([...e].filter((n) => t.has(n))), Rn = () => {
|
|
240
|
+
const [e, t] = q(Ve), n = w((l) => t((a) => bn(a, l)), []), r = w((l) => t((a) => En(a, l)), []), o = w((l) => t((a) => yn(a, l)), []), i = w(() => t(Ve), []);
|
|
241
241
|
return F(() => ({ direct: e, markDirect: n, unmarkDirect: r, pruneDirect: o, clearDirect: i }), [e, n, r, o, i]);
|
|
242
|
-
},
|
|
242
|
+
}, Sn = (e) => ({
|
|
243
243
|
budget: e,
|
|
244
244
|
handled: /* @__PURE__ */ new Set(),
|
|
245
245
|
loads: /* @__PURE__ */ new Set(),
|
|
@@ -248,7 +248,7 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
248
248
|
depthLimited: !1,
|
|
249
249
|
announcedStart: !1,
|
|
250
250
|
issuedAgainst: null
|
|
251
|
-
}),
|
|
251
|
+
}), Tn = (e, t) => {
|
|
252
252
|
const n = [];
|
|
253
253
|
let r = Le(t.entries, t.compare);
|
|
254
254
|
for (let o = 1; r.length > 0; o += 1) {
|
|
@@ -277,60 +277,60 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
277
277
|
r = i;
|
|
278
278
|
}
|
|
279
279
|
return n;
|
|
280
|
-
}, rt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || rt(n.children, t))),
|
|
280
|
+
}, rt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || rt(n.children, t))), Nn = (e, t) => {
|
|
281
281
|
if (e.folderLimited) return { kind: "folder-limit", opened: e.opened };
|
|
282
282
|
if (e.depthLimited) return { kind: "depth-limit", opened: e.opened };
|
|
283
283
|
let n = 0;
|
|
284
284
|
for (const r of e.loads) t.childrenOf(r)?.status === "failed" && (n += 1);
|
|
285
285
|
return { kind: "done", opened: e.opened, failed: n, complete: rt(t.entries, t.isShownExpanded) };
|
|
286
|
-
}, Ne = Object.freeze({ state: "idle" }),
|
|
286
|
+
}, Ne = Object.freeze({ state: "idle" }), kn = (e) => {
|
|
287
287
|
const t = g(null), n = g(e), [r, o] = q(Ne);
|
|
288
288
|
I(() => {
|
|
289
289
|
n.current = e;
|
|
290
290
|
});
|
|
291
291
|
const i = w(() => {
|
|
292
|
-
t.current === null && (t.current =
|
|
292
|
+
t.current === null && (t.current = Sn(n.current.budget), o({ state: "running", opened: 0 }));
|
|
293
293
|
}, []), l = w(() => {
|
|
294
294
|
t.current = null, o(Ne);
|
|
295
295
|
}, []), a = w((s) => {
|
|
296
296
|
const d = t.current;
|
|
297
297
|
if (d === null) return;
|
|
298
|
-
const u =
|
|
298
|
+
const u = Tn(d, s);
|
|
299
299
|
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) {
|
|
300
300
|
t.current = null;
|
|
301
|
-
const
|
|
302
|
-
o(
|
|
301
|
+
const f = Nn(d, s);
|
|
302
|
+
o(f.kind === "done" ? Ne : { state: "stopped", stop: f.kind, opened: f.opened }), n.current.onFinish(f);
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
const { opened: c } = d;
|
|
306
|
-
o((
|
|
306
|
+
o((f) => f.state === "running" && f.opened === c ? f : { state: "running", opened: c });
|
|
307
307
|
}, []);
|
|
308
308
|
return F(() => ({ status: r, start: i, end: l, advance: a }), [r, i, l, a]);
|
|
309
|
-
}, je = ["pointerdown", "wheel", "touchstart", "keydown", "focusin"],
|
|
310
|
-
const s = g(null), d = g(!0), u = g(Ke), c = g(null),
|
|
309
|
+
}, je = ["pointerdown", "wheel", "touchstart", "keydown", "focusin"], Ln = 8, Ke = { least: Number.POSITIVE_INFINITY, stalled: 0 }, On = ({ tree: e, container: t, path: n, chain: r, rows: o, cancel: i, displayed: l, placement: a }) => {
|
|
310
|
+
const s = g(null), d = g(!0), u = g(Ke), c = g(null), f = g(null), h = g(r), v = g(a);
|
|
311
311
|
I(() => {
|
|
312
312
|
h.current = r, v.current = a;
|
|
313
313
|
}, [r, a]);
|
|
314
|
-
const
|
|
314
|
+
const E = w(() => {
|
|
315
315
|
const L = c.current;
|
|
316
316
|
L !== null && (c.current = null, L.phase === "asking" ? L.controller.abort() : h.current?.open(null));
|
|
317
317
|
}, []), S = w(() => {
|
|
318
|
-
s.current = null,
|
|
319
|
-
}, [
|
|
318
|
+
s.current = null, E();
|
|
319
|
+
}, [E]), C = w(() => {
|
|
320
320
|
const L = t.current;
|
|
321
|
-
s.current === null ||
|
|
322
|
-
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
const R = v.current(
|
|
321
|
+
s.current === null || f.current !== null || L === null || L.getClientRects().length === 0 || (f.current = requestAnimationFrame(() => {
|
|
322
|
+
f.current = null;
|
|
323
|
+
const b = s.current;
|
|
324
|
+
if (b === null) return;
|
|
325
|
+
const R = v.current(b);
|
|
326
326
|
if (R === 0) {
|
|
327
|
-
d.current = !0, c.current?.phase === "opening" &&
|
|
327
|
+
d.current = !0, c.current?.phase === "opening" && E();
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
if (e.current?.scrollToPath(
|
|
331
|
-
c.current?.phase === "opening" &&
|
|
330
|
+
if (e.current?.scrollToPath(b, { align: "nearest" }) === !0) {
|
|
331
|
+
c.current?.phase === "opening" && E();
|
|
332
332
|
const { least: P, stalled: H } = u.current;
|
|
333
|
-
u.current = R < P ? { least: R, stalled: 0 } : { least: P, stalled: H + 1 }, u.current.stalled <
|
|
333
|
+
u.current = R < P ? { least: R, stalled: 0 } : { least: P, stalled: H + 1 }, u.current.stalled < Ln && C();
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
const y = c.current;
|
|
@@ -338,32 +338,32 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
338
338
|
s.current = null;
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
y.phase === "opening" && h.current?.progress(y.folders,
|
|
341
|
+
y.phase === "opening" && h.current?.progress(y.folders, b) !== "loading" && S();
|
|
342
342
|
}));
|
|
343
|
-
}, [e, t,
|
|
343
|
+
}, [e, t, E, S]), T = w(() => {
|
|
344
344
|
d.current = !1, u.current = Ke, C();
|
|
345
345
|
}, [C]);
|
|
346
346
|
_(() => {
|
|
347
347
|
const L = t.current;
|
|
348
348
|
if (L === null) return;
|
|
349
|
-
const
|
|
350
|
-
|
|
349
|
+
const b = typeof ResizeObserver > "u" ? null : new ResizeObserver(T);
|
|
350
|
+
b?.observe(L);
|
|
351
351
|
for (const R of je) L.addEventListener(R, S, { passive: !0 });
|
|
352
352
|
return () => {
|
|
353
|
-
|
|
353
|
+
b?.disconnect();
|
|
354
354
|
for (const R of je) L.removeEventListener(R, S);
|
|
355
|
-
|
|
355
|
+
f.current !== null && cancelAnimationFrame(f.current), f.current = null, E();
|
|
356
356
|
};
|
|
357
|
-
}, [t, T, S,
|
|
357
|
+
}, [t, T, S, E]);
|
|
358
358
|
const k = r !== null;
|
|
359
359
|
_(() => {
|
|
360
360
|
const L = t.current;
|
|
361
361
|
if (S(), n === null || L === null || L.contains(L.ownerDocument.activeElement)) return;
|
|
362
362
|
s.current = n;
|
|
363
|
-
const
|
|
364
|
-
if (k &&
|
|
363
|
+
const b = h.current;
|
|
364
|
+
if (k && b !== null) {
|
|
365
365
|
const R = new AbortController(), y = { phase: "asking", controller: R };
|
|
366
|
-
c.current = y,
|
|
366
|
+
c.current = y, b.ancestors(n, R.signal).then((P) => {
|
|
367
367
|
c.current === y && (P === null ? c.current = null : (c.current = { phase: "opening", folders: P }, h.current?.open(P)), T());
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -371,31 +371,31 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
371
371
|
}, [n, k, t, S, T]), _(() => {
|
|
372
372
|
(c.current?.phase === "opening" || s.current !== null && !d.current) && T();
|
|
373
373
|
}, [o, T]);
|
|
374
|
-
const
|
|
374
|
+
const Z = g(i);
|
|
375
375
|
_(() => {
|
|
376
|
-
|
|
376
|
+
Z.current !== i && (Z.current = i, S());
|
|
377
377
|
}, [i, S]);
|
|
378
378
|
const M = g(l);
|
|
379
379
|
_(() => {
|
|
380
|
-
M.current && !l &&
|
|
381
|
-
}, [l,
|
|
382
|
-
},
|
|
383
|
-
const t =
|
|
380
|
+
M.current && !l && E(), M.current = l;
|
|
381
|
+
}, [l, E]);
|
|
382
|
+
}, Pn = "--aqmx-tree-line", An = Object.freeze(["(forced-colors: active)", "(prefers-color-scheme: dark)"]), qn = "data-aqmx-tree-probe", Cn = Object.freeze({ rowHeight: Ft, lineColor: null }), Fn = /^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/u, Mn = (e) => {
|
|
383
|
+
const t = Fn.exec(e);
|
|
384
384
|
return t === null ? e : `#${t.slice(1).map((n) => Number(n).toString(16).padStart(2, "0")).join("")}`;
|
|
385
|
-
},
|
|
386
|
-
const [n, r] = q(
|
|
385
|
+
}, _n = (e, t) => {
|
|
386
|
+
const [n, r] = q(Cn);
|
|
387
387
|
return I(() => {
|
|
388
388
|
const o = e.current;
|
|
389
389
|
if (o === null) return;
|
|
390
390
|
const i = () => {
|
|
391
|
-
const s = Math.round(o.getBoundingClientRect().height), d = getComputedStyle(o), u = d.getPropertyValue(
|
|
391
|
+
const s = Math.round(o.getBoundingClientRect().height), d = getComputedStyle(o), u = d.getPropertyValue(Pn).trim() === "" ? null : Mn(d.color);
|
|
392
392
|
r((c) => {
|
|
393
|
-
const
|
|
394
|
-
return c.rowHeight ===
|
|
393
|
+
const f = Number.isFinite(s) && s > 0 ? s : c.rowHeight;
|
|
394
|
+
return c.rowHeight === f && c.lineColor === u ? c : { rowHeight: f, lineColor: u };
|
|
395
395
|
});
|
|
396
396
|
};
|
|
397
397
|
i();
|
|
398
|
-
const l =
|
|
398
|
+
const l = An.map((s) => window.matchMedia(s));
|
|
399
399
|
for (const s of l) s.addEventListener("change", i);
|
|
400
400
|
const a = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
|
|
401
401
|
return a?.observe(o), () => {
|
|
@@ -403,12 +403,12 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
403
403
|
a?.disconnect();
|
|
404
404
|
};
|
|
405
405
|
}, [e, t]), n;
|
|
406
|
-
}, at = "markdown-explorer-tree-scroll",
|
|
406
|
+
}, at = "markdown-explorer-tree-scroll", In = 0.5, lt = (e, t) => [...e.querySelectorAll(`[role="treeitem"][${se}]`)].find((n) => n.getAttribute(se) === t), Dn = (e, t) => {
|
|
407
407
|
const n = lt(e, t), r = n?.closest(`[data-testid="${at}"]`);
|
|
408
408
|
if (n === void 0 || r === null || r === void 0) return Number.POSITIVE_INFINITY;
|
|
409
409
|
const o = r.getBoundingClientRect(), i = n.getBoundingClientRect(), l = o.top - i.top, a = i.height > o.height ? Math.abs(l) : Math.max(0, l) + Math.max(0, i.bottom - o.bottom);
|
|
410
|
-
return a <=
|
|
411
|
-
},
|
|
410
|
+
return a <= In ? 0 : a;
|
|
411
|
+
}, Hn = {
|
|
412
412
|
testId: at,
|
|
413
413
|
overscanCount: 13,
|
|
414
414
|
callbackThrottleMs: 13,
|
|
@@ -419,36 +419,36 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
419
419
|
enableArrowButtons: !0,
|
|
420
420
|
enableArrowButtonTabStops: !1,
|
|
421
421
|
enableScrollToTopBottomButtons: !0,
|
|
422
|
-
tapScrollCircleOptions:
|
|
422
|
+
tapScrollCircleOptions: Ut
|
|
423
423
|
},
|
|
424
424
|
behaviorOptions: { enablePointerDrag: !0 }
|
|
425
|
-
},
|
|
425
|
+
}, $n = { hoverClassName: "", directorySelectedClassName: "", itemSelectedClassName: "" }, Zn = { color: "inherit" }, Bn = { paddingBlock: 0 }, zn = /* @__PURE__ */ new Set(), Vn = /* @__PURE__ */ new Map(), jn = { color: "var(--aqmx-tree-line)" }, Kn = (e) => {
|
|
426
426
|
const t = e instanceof Element ? e.closest(`[${se}]`) : null;
|
|
427
427
|
return t === null || t.getAttribute("data-entry-type") !== "file" ? null : t.getAttribute(se);
|
|
428
|
-
}, ot = (e, t, n, r) => n === "folder-limit" ? e.expandAllFolderLimit(r, t.maxFolders, e.expandAll) : e.expandAllDepthLimit(r, t.maxDepth),
|
|
428
|
+
}, ot = (e, t, n, r) => n === "folder-limit" ? e.expandAllFolderLimit(r, t.maxFolders, e.expandAll) : e.expandAllDepthLimit(r, t.maxDepth), Un = (e, t, n) => n.kind === "done" ? e.expandAllDone(n.opened, n.failed, n.complete) : ot(e, t, n.kind, n.opened), st = () => {
|
|
429
429
|
const { labels: e } = D();
|
|
430
430
|
return /* @__PURE__ */ O("div", { className: "aqmx-explorer-loading", "aria-busy": "true", "data-testid": "markdown-explorer-tree-loading", children: [
|
|
431
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ m("p", { className: "aqmx-explorer-loading-text", children: e.treeLoading }),
|
|
432
432
|
/* @__PURE__ */ O("div", { className: "aqmx-skeleton", "aria-hidden": "true", children: [
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ m("span", {}),
|
|
434
|
+
/* @__PURE__ */ m("span", {}),
|
|
435
|
+
/* @__PURE__ */ m("span", {}),
|
|
436
|
+
/* @__PURE__ */ m("span", {}),
|
|
437
|
+
/* @__PURE__ */ m("span", {})
|
|
438
438
|
] })
|
|
439
439
|
] });
|
|
440
|
-
},
|
|
440
|
+
}, Wn = () => {
|
|
441
441
|
const { labels: e } = D();
|
|
442
442
|
return /* @__PURE__ */ O("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-tree-empty", children: [
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ m(cn, { className: "aqmx-explorer-empty-icon", "aria-hidden": "true" }),
|
|
444
|
+
/* @__PURE__ */ m("p", { className: "aqmx-empty-title", children: e.treeEmptyTitle }),
|
|
445
|
+
/* @__PURE__ */ m("p", { className: "aqmx-explorer-empty-body", children: e.treeEmptyBody })
|
|
446
446
|
] });
|
|
447
|
-
},
|
|
447
|
+
}, Xn = ({ name: e, onRetry: t }) => {
|
|
448
448
|
const { labels: n } = D(), r = ye();
|
|
449
449
|
return /* @__PURE__ */ O("span", { className: "aqmx-explorer-folder-failed", children: [
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ m("span", { className: "aqmx-explorer-folder-name", children: e }),
|
|
451
|
+
/* @__PURE__ */ m("span", { id: r, className: "aqmx-explorer-folder-error", children: n.folderLoadFailed }),
|
|
452
452
|
/* @__PURE__ */ O(
|
|
453
453
|
"button",
|
|
454
454
|
{
|
|
@@ -465,13 +465,13 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
465
465
|
o.key !== "Escape" && o.stopPropagation();
|
|
466
466
|
},
|
|
467
467
|
children: [
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ m(Oe, { className: "aqmx-explorer-folder-retry-icon", "aria-hidden": "true" }),
|
|
469
|
+
/* @__PURE__ */ m("span", { className: "aqmx-explorer-folder-retry-text", children: n.retry })
|
|
470
470
|
]
|
|
471
471
|
}
|
|
472
472
|
)
|
|
473
473
|
] });
|
|
474
|
-
},
|
|
474
|
+
}, Gn = ({
|
|
475
475
|
entries: e,
|
|
476
476
|
version: t,
|
|
477
477
|
mode: n,
|
|
@@ -484,12 +484,12 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
484
484
|
onRevealSource: d,
|
|
485
485
|
expansion: u,
|
|
486
486
|
onShown: c,
|
|
487
|
-
marks:
|
|
487
|
+
marks: f,
|
|
488
488
|
claimsHeld: h,
|
|
489
489
|
expandAll: v,
|
|
490
|
-
revealCancel:
|
|
490
|
+
revealCancel: E
|
|
491
491
|
}) => {
|
|
492
|
-
const { trees: S, documents: C, labels: T, locale: k, theme:
|
|
492
|
+
const { trees: S, documents: C, labels: T, locale: k, theme: Z, data: M, config: L, sources: b, reveals: R } = D(), y = be(qe), [P] = q(hn), H = g(null), { rowHeight: de, lineColor: X } = _n(H, Z), { isExpanded: B, toggle: ee, expandMultiple: K, collapseMultiple: ae, expanded: V, isPending: le } = u, { alwaysExpanded: G, sortMode: $, folderPlacement: U } = o, { direct: ue, markDirect: W, unmarkDirect: ce, pruneDirect: me } = f, { running: oe, advance: he } = v, fe = g(null), te = g(null), N = F(() => Mt({ sortMode: $, folderPlacement: U }), [$, U]), Y = F(() => xn(N), [N]), z = w((x) => S.children(r, x), [S, r]), ne = F(() => gn(e), [e]), re = w((x) => !pe(x) && (B(x) || G && !ne.has(x)), [B, G, ne]), Q = g({ shownExpanded: re, isExpanded: B, unloadedFolders: ne, entries: e, childrenOf: z });
|
|
493
493
|
I(() => {
|
|
494
494
|
Q.current = { shownExpanded: re, isExpanded: B, unloadedFolders: ne, entries: e, childrenOf: z };
|
|
495
495
|
}, [re, B, ne, e, z]);
|
|
@@ -501,7 +501,7 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
501
501
|
}, []), pt = w(
|
|
502
502
|
(x) => {
|
|
503
503
|
if (pe(x)) {
|
|
504
|
-
Me(
|
|
504
|
+
Me(mn(x));
|
|
505
505
|
return;
|
|
506
506
|
}
|
|
507
507
|
Q.current.isExpanded(x) ? ce([x]) : Q.current.unloadedFolders.has(x) && W(x), ee(x);
|
|
@@ -520,8 +520,8 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
520
520
|
},
|
|
521
521
|
[K, Re]
|
|
522
522
|
), _e = w(
|
|
523
|
-
(x) => /* @__PURE__ */
|
|
524
|
-
|
|
523
|
+
(x) => /* @__PURE__ */ m(
|
|
524
|
+
Xn,
|
|
525
525
|
{
|
|
526
526
|
name: x.name,
|
|
527
527
|
onRetry: () => {
|
|
@@ -530,11 +530,11 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
532
|
[S, r, W, K]
|
|
533
|
-
), Ie = n === "multi" ? l :
|
|
533
|
+
), Ie = n === "multi" ? l : zn, { loopFolderName: De } = T, xt = F(() => P(e, { openPaths: Ie, childrenOf: z, renderFailedFolder: _e, loopFolderName: De }), [P, e, Ie, z, _e, De, t]), wt = kt(C, Kn), He = g([]), xe = w(() => {
|
|
534
534
|
for (const x of He.current) Q.current.unloadedFolders.has(x) && W(x);
|
|
535
|
-
}, [W]), { maxDepth: Se } = L.revealDocument,
|
|
535
|
+
}, [W]), { maxDepth: Se } = L.revealDocument, $e = g(d);
|
|
536
536
|
I(() => {
|
|
537
|
-
|
|
537
|
+
$e.current = d;
|
|
538
538
|
}, [d]);
|
|
539
539
|
const gt = F(
|
|
540
540
|
() => ({
|
|
@@ -546,25 +546,25 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
546
546
|
return ie.status !== "ok" || ie.ancestors === null || ie.ancestors.length > Se ? null : ie.ancestors;
|
|
547
547
|
}
|
|
548
548
|
const J = await M.reveal(r, x, A);
|
|
549
|
-
return J.status !== "ok" || J.source === null || J.ancestors.length > Se ? null : J.source === r ? J.ancestors : (A.aborted || !
|
|
549
|
+
return J.status !== "ok" || J.source === null || J.ancestors.length > Se ? null : J.source === r ? J.ancestors : (A.aborted || !b.some((ie) => ie.id === J.source) || (R.move(J.source, x, J.ancestors), $e.current(J.source)), null);
|
|
550
550
|
},
|
|
551
551
|
open: (x) => {
|
|
552
552
|
He.current = x ?? [], x !== null && (xe(), K([...x]));
|
|
553
553
|
},
|
|
554
|
-
progress: (x, A) =>
|
|
554
|
+
progress: (x, A) => vn(Q.current.entries, x, A, { isShownExpanded: Q.current.shownExpanded, childrenOf: Q.current.childrenOf })
|
|
555
555
|
}),
|
|
556
|
-
[M, r,
|
|
556
|
+
[M, r, b, R, Se, xe, K]
|
|
557
557
|
);
|
|
558
558
|
_(() => xe(), [xe, ne]);
|
|
559
|
-
const vt = F(() => [e, t, V], [e, t, V]),
|
|
560
|
-
|
|
561
|
-
const
|
|
559
|
+
const vt = F(() => [e, t, V], [e, t, V]), bt = w((x) => te.current === null ? Number.POSITIVE_INFINITY : Dn(te.current, x), []);
|
|
560
|
+
On({ tree: fe, container: te, path: i.path, chain: i.openFolders ? gt : null, rows: vt, cancel: E, displayed: y, placement: bt });
|
|
561
|
+
const Ze = w((x) => ue.has(x), [ue]), we = F(() => wn(e, { isShownExpanded: re, childrenOf: z, compare: N, isDirect: Ze }), [e, re, z, N, Ze, t]), ge = y && h;
|
|
562
562
|
I(() => {
|
|
563
563
|
c(e);
|
|
564
|
-
}, [e, c]), I(() => () => c(null), [c]), _(() => S.claimChildren(r, ge ? we.folders :
|
|
564
|
+
}, [e, c]), I(() => () => c(null), [c]), _(() => S.claimChildren(r, ge ? we.folders : Vn), [S, r, ge, we]), _(() => me(ne), [me, ne]), _(() => {
|
|
565
565
|
ge && oe && he({ entries: e, isShownExpanded: re, childrenOf: z, compare: N, expanded: V, waiting: we.waiting, expansionPending: le });
|
|
566
566
|
}, [ge, oe, he, e, re, z, N, V, we, le]);
|
|
567
|
-
const
|
|
567
|
+
const Et = w(
|
|
568
568
|
(x) => {
|
|
569
569
|
x.isDirectory || (R.settle(x.entry.absolutePath), s(x.entry.absolutePath));
|
|
570
570
|
},
|
|
@@ -586,9 +586,9 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
586
586
|
[T]
|
|
587
587
|
), Tt = X === null ? { showTreeLines: !1 } : { showTreeLines: o.lines, lineColor: X };
|
|
588
588
|
return /* @__PURE__ */ O("div", { ref: te, className: "aqmx-explorer-tree", "data-testid": "markdown-explorer-tree", ...wt, children: [
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
|
|
589
|
+
/* @__PURE__ */ m("span", { ref: H, className: "aqmx-explorer-tree-probe", "aria-hidden": "true", [qn]: "" }),
|
|
590
|
+
/* @__PURE__ */ m(
|
|
591
|
+
Kt,
|
|
592
592
|
{
|
|
593
593
|
ref: fe,
|
|
594
594
|
entries: xt,
|
|
@@ -600,30 +600,30 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
600
600
|
isPending: le && !oe,
|
|
601
601
|
doubleClickAction: o.doubleClickAction
|
|
602
602
|
},
|
|
603
|
-
selection: { mode: a.mode, selectedPath: a.shownPath, currentPath: a.shownPath, selectedItems: Rt, onEntryClick:
|
|
603
|
+
selection: { mode: a.mode, selectedPath: a.shownPath, currentPath: a.shownPath, selectedItems: Rt, onEntryClick: Et, onSelectionChange: yt },
|
|
604
604
|
visual: {
|
|
605
605
|
className: "aqmx-explorer-tree-view",
|
|
606
606
|
ariaLabel: T.treeRegion,
|
|
607
607
|
...Tt,
|
|
608
608
|
showExpandIcons: o.expandIcons,
|
|
609
|
-
expandIconStyle:
|
|
609
|
+
expandIconStyle: jn,
|
|
610
610
|
showDirectoryIcons: o.directoryIcons,
|
|
611
611
|
showFileIcons: o.fileIcons,
|
|
612
612
|
expandIconSize: o.expandIconSize,
|
|
613
613
|
itemHeight: de,
|
|
614
614
|
removeRootIndent: o.removeRootIndent,
|
|
615
|
-
highlightStyles:
|
|
616
|
-
entryStyle:
|
|
615
|
+
highlightStyles: $n,
|
|
616
|
+
entryStyle: Bn,
|
|
617
617
|
nameStyle: Zn
|
|
618
618
|
},
|
|
619
|
-
virtualScroll:
|
|
619
|
+
virtualScroll: Hn,
|
|
620
620
|
sort: Y,
|
|
621
621
|
locale: k,
|
|
622
622
|
labels: St
|
|
623
623
|
}
|
|
624
624
|
)
|
|
625
625
|
] });
|
|
626
|
-
},
|
|
626
|
+
}, Yn = ({ pending: e, status: t }) => {
|
|
627
627
|
const { labels: n } = D(), r = t.state !== "running", [o, i] = q(0), l = g(!0);
|
|
628
628
|
I(() => {
|
|
629
629
|
const s = l.current;
|
|
@@ -641,61 +641,61 @@ const sn = /* @__PURE__ */ m.forwardRef(on), Ae = Pe(!0), et = "\0loop\0", tt =
|
|
|
641
641
|
}, [r, e, o]);
|
|
642
642
|
const a = r && e === 0 ? o : e;
|
|
643
643
|
return a === 0 && r ? null : /* @__PURE__ */ O("p", { className: "aqmx-explorer-tree-progress", "data-testid": "markdown-explorer-tree-progress", "data-aqmx-loading": String(a), "data-aqmx-expand-all": t.state, children: [
|
|
644
|
-
a > 0 ? /* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */
|
|
644
|
+
a > 0 ? /* @__PURE__ */ m(Oe, { className: "aqmx-explorer-tree-progress-icon", "aria-hidden": "true" }) : null,
|
|
645
|
+
/* @__PURE__ */ m("span", { children: t.state === "running" ? n.expandAllProgress(t.opened, a) : n.foldersLoading(a) })
|
|
646
646
|
] });
|
|
647
|
-
},
|
|
647
|
+
}, Qn = ({ stop: e, opened: t, budget: n }) => {
|
|
648
648
|
const { labels: r } = D();
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
},
|
|
651
|
-
const { trees: n } = D(), r =
|
|
652
|
-
return l.length === 0 ? /* @__PURE__ */
|
|
653
|
-
},
|
|
654
|
-
const { renderTreeFailure: r } = D(), o =
|
|
655
|
-
if (o.status === "deferred") return /* @__PURE__ */
|
|
656
|
-
if (o.status === "ok") return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ m("p", { className: "aqmx-explorer-expand-all-stop", "data-testid": "markdown-explorer-expand-all-stop", "data-aqmx-stop": e, children: ot(r, n, e, t) });
|
|
650
|
+
}, Jn = ({ entries: e, ...t }) => {
|
|
651
|
+
const { trees: n } = D(), r = Ee(n.subscribe, n.version, n.version), { sourceId: o } = t, [i] = q(dn), l = F(() => i(e, (a) => n.children(o, a)), [i, e, n, o, r]);
|
|
652
|
+
return l.length === 0 ? /* @__PURE__ */ m(Wn, {}) : /* @__PURE__ */ m(Gn, { entries: l, version: r, ...t });
|
|
653
|
+
}, er = ({ result: e, onRetry: t, ...n }) => {
|
|
654
|
+
const { renderTreeFailure: r } = D(), o = be(e);
|
|
655
|
+
if (o.status === "deferred") return /* @__PURE__ */ m(st, {});
|
|
656
|
+
if (o.status === "ok") return /* @__PURE__ */ m(Jn, { entries: o.entries, ...n });
|
|
657
657
|
const i = r?.(o.failure);
|
|
658
|
-
return /* @__PURE__ */
|
|
659
|
-
},
|
|
660
|
-
const { trees: n, storageNamespace: r, labels: o, announcer: i, config: l } = D(), { sourceId: a } = t, s =
|
|
661
|
-
|
|
658
|
+
return /* @__PURE__ */ m("div", { className: "aqmx-explorer-tree-message", "data-testid": "markdown-explorer-tree-failure", "data-aqmx-failure": o.failure.reason, children: i !== void 0 ? i : /* @__PURE__ */ m(Nt, { failure: o.failure, alert: !0, onRetry: t, testId: null }) });
|
|
659
|
+
}, tr = ({ onControls: e, ...t }) => {
|
|
660
|
+
const { trees: n, storageNamespace: r, labels: o, announcer: i, config: l } = D(), { sourceId: a } = t, s = jt({ storageKey: Wt(r).treeExpansion(a) });
|
|
661
|
+
Ee(n.subscribe, n.version, n.version);
|
|
662
662
|
const d = n.read(a), u = w(() => n.retry(a), [n, a]);
|
|
663
663
|
I(() => n.open(a), [n, a]);
|
|
664
|
-
const c =
|
|
664
|
+
const c = Rn(), { expanded: f, expandMultiple: h, collapseAll: v } = s, [E, S] = q(null), C = E !== f, T = g(f);
|
|
665
665
|
I(() => {
|
|
666
|
-
T.current =
|
|
667
|
-
}, [
|
|
668
|
-
const k = l.expandAll,
|
|
669
|
-
X.current =
|
|
666
|
+
T.current = f;
|
|
667
|
+
}, [f]);
|
|
668
|
+
const k = l.expandAll, Z = w(() => i.announce(o.expandAllStarted), [i, o]), M = w(($) => i.announce(Un(o, k, $)), [i, o, k]), L = kn({ budget: k, expandMultiple: h, onStart: Z, onFinish: M }), { status: b, start: R, end: y, advance: P } = L, H = b.state === "running", de = F(() => ({ running: H, advance: P }), [H, P]), X = g(null), [B, ee] = q(!1), K = w(($) => {
|
|
669
|
+
X.current = $, ee($ !== null);
|
|
670
670
|
}, []);
|
|
671
671
|
_(
|
|
672
|
-
() => n.subscribeChildrenFailures((
|
|
673
|
-
const U =
|
|
672
|
+
() => n.subscribeChildrenFailures(($) => {
|
|
673
|
+
const U = $.sourceId === a && X.current !== null ? nt(X.current, $.path) : null;
|
|
674
674
|
U !== null && i.announce({ list: o.foldersLoadFailedNamed, item: U.name });
|
|
675
675
|
}),
|
|
676
676
|
[n, a, i, o]
|
|
677
677
|
);
|
|
678
678
|
const { clearDirect: ae } = c, [V, le] = q(0), G = w(() => {
|
|
679
|
-
le((
|
|
679
|
+
le(($) => $ + 1), y(), ae(), S(T.current), v();
|
|
680
680
|
}, [y, ae, v]);
|
|
681
681
|
return _(() => {
|
|
682
682
|
e({ collapseAll: G, expandAll: B ? R : null, expanding: H });
|
|
683
683
|
}, [e, G, R, B, H]), _(() => () => e(null), [e]), _(() => {
|
|
684
684
|
B || y();
|
|
685
685
|
}, [B, y]), /* @__PURE__ */ O(Ge, { children: [
|
|
686
|
-
|
|
686
|
+
b.state === "stopped" ? /* @__PURE__ */ m(Qn, { stop: b.stop, opened: b.opened, budget: k }) : null,
|
|
687
687
|
/* @__PURE__ */ O("div", { className: "aqmx-explorer-tree-area", children: [
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ m(Qe, { fallback: /* @__PURE__ */ m(st, {}), children: /* @__PURE__ */ m(er, { result: d, onRetry: u, expansion: s, onShown: K, marks: c, claimsHeld: C, expandAll: de, revealCancel: V, ...t }) }),
|
|
689
|
+
/* @__PURE__ */ m(Yn, { pending: n.pendingChildren(a), status: b })
|
|
690
690
|
] })
|
|
691
691
|
] });
|
|
692
692
|
};
|
|
693
|
-
function
|
|
693
|
+
function nr({
|
|
694
694
|
title: e,
|
|
695
695
|
titleId: t,
|
|
696
696
|
...n
|
|
697
697
|
}, r) {
|
|
698
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
699
699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
700
700
|
viewBox: "0 0 24 24",
|
|
701
701
|
fill: "currentColor",
|
|
@@ -703,19 +703,19 @@ function tr({
|
|
|
703
703
|
"data-slot": "icon",
|
|
704
704
|
ref: r,
|
|
705
705
|
"aria-labelledby": t
|
|
706
|
-
}, n), e ? /* @__PURE__ */
|
|
706
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
707
707
|
id: t
|
|
708
|
-
}, e) : null, /* @__PURE__ */
|
|
708
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
709
709
|
fillRule: "evenodd",
|
|
710
710
|
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
711
711
|
clipRule: "evenodd"
|
|
712
712
|
}));
|
|
713
713
|
}
|
|
714
|
-
const ct = /* @__PURE__ */
|
|
715
|
-
const { labels: i } = D(), l = ye(), a = g(null), s = [...e], d = (c,
|
|
716
|
-
if (
|
|
717
|
-
const h = a.current === null ? [] : [...a.current.querySelectorAll(`[data-testid="${Ue}"]`)], v = h.indexOf(
|
|
718
|
-
|
|
714
|
+
const ct = /* @__PURE__ */ p.forwardRef(nr), Ue = "markdown-explorer-selection-remove", rr = ({ selection: e, onRemove: t, onClear: n, onOpenSelection: r, onLeave: o }) => {
|
|
715
|
+
const { labels: i } = D(), l = ye(), a = g(null), s = [...e], d = (c, f) => {
|
|
716
|
+
if (f.ownerDocument.activeElement === f) {
|
|
717
|
+
const h = a.current === null ? [] : [...a.current.querySelectorAll(`[data-testid="${Ue}"]`)], v = h.indexOf(f), E = [h[v + 1], h[v - 1]].find((S) => S !== void 0);
|
|
718
|
+
E === void 0 ? o() : E.focus();
|
|
719
719
|
}
|
|
720
720
|
t(c);
|
|
721
721
|
}, u = () => {
|
|
@@ -724,48 +724,48 @@ const ct = /* @__PURE__ */ m.forwardRef(tr), Ue = "markdown-explorer-selection-r
|
|
|
724
724
|
};
|
|
725
725
|
return /* @__PURE__ */ O("section", { ref: a, className: "aqmx-explorer-tray", "aria-labelledby": l, "data-testid": "markdown-explorer-selection-tray", children: [
|
|
726
726
|
/* @__PURE__ */ O("div", { className: "aqmx-explorer-tray-header", children: [
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ m("p", { id: l, className: "aqmx-explorer-tray-title", children: i.selectionTitle(s.length) }),
|
|
728
|
+
/* @__PURE__ */ m("button", { type: "button", className: "aqmx-explorer-tray-button", "data-testid": "markdown-explorer-selection-clear", onClick: u, children: i.clearSelection })
|
|
729
729
|
] }),
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ m("ul", { className: "aqmx-explorer-tray-list", children: s.map(([c, f]) => /* @__PURE__ */ O("li", { className: "aqmx-explorer-tray-item", children: [
|
|
731
|
+
/* @__PURE__ */ m("span", { className: "aqmx-explorer-tray-name", title: c, children: f }),
|
|
732
|
+
/* @__PURE__ */ m(
|
|
733
733
|
"button",
|
|
734
734
|
{
|
|
735
735
|
type: "button",
|
|
736
736
|
className: "aqmx-icon-button aqmx-explorer-tray-remove",
|
|
737
|
-
"aria-label": i.removeFromSelection(
|
|
738
|
-
title: i.removeFromSelection(
|
|
737
|
+
"aria-label": i.removeFromSelection(f),
|
|
738
|
+
title: i.removeFromSelection(f),
|
|
739
739
|
"data-testid": Ue,
|
|
740
740
|
"data-aqmx-path": c,
|
|
741
741
|
onClick: (h) => d(c, h.currentTarget),
|
|
742
|
-
children: /* @__PURE__ */
|
|
742
|
+
children: /* @__PURE__ */ m(ct, { "aria-hidden": "true" })
|
|
743
743
|
}
|
|
744
744
|
)
|
|
745
745
|
] }, c)) }),
|
|
746
|
-
r === void 0 ? null : /* @__PURE__ */
|
|
746
|
+
r === void 0 ? null : /* @__PURE__ */ m("button", { type: "button", className: "aqmx-explorer-tray-open", "data-testid": "markdown-explorer-selection-open", onClick: () => r(s.map(([c]) => c)), children: i.openSelectionInMulti(s.length) })
|
|
747
747
|
] });
|
|
748
|
-
}, ke = /* @__PURE__ */ new Map(),
|
|
748
|
+
}, ke = /* @__PURE__ */ new Map(), ar = (e, t) => {
|
|
749
749
|
if (t.selected === e.has(t.path)) return e;
|
|
750
750
|
const n = new Map(e);
|
|
751
751
|
return t.selected ? n.set(t.path, t.name) : n.delete(t.path), n;
|
|
752
|
-
},
|
|
752
|
+
}, lr = (e, t) => {
|
|
753
753
|
if (!e.has(t)) return e;
|
|
754
754
|
const n = new Map(e);
|
|
755
755
|
return n.delete(t), n;
|
|
756
|
-
}, it =
|
|
757
|
-
const t =
|
|
756
|
+
}, it = Ae(null), or = (e) => {
|
|
757
|
+
const t = be(it);
|
|
758
758
|
I(() => {
|
|
759
759
|
if (t !== null)
|
|
760
760
|
return t(e), () => t(!1);
|
|
761
761
|
}, [t, e]);
|
|
762
762
|
};
|
|
763
|
-
function
|
|
763
|
+
function sr({
|
|
764
764
|
title: e,
|
|
765
765
|
titleId: t,
|
|
766
766
|
...n
|
|
767
767
|
}, r) {
|
|
768
|
-
return /* @__PURE__ */
|
|
768
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
769
769
|
xmlns: "http://www.w3.org/2000/svg",
|
|
770
770
|
viewBox: "0 0 24 24",
|
|
771
771
|
fill: "currentColor",
|
|
@@ -773,21 +773,21 @@ function or({
|
|
|
773
773
|
"data-slot": "icon",
|
|
774
774
|
ref: r,
|
|
775
775
|
"aria-labelledby": t
|
|
776
|
-
}, n), e ? /* @__PURE__ */
|
|
776
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
777
777
|
id: t
|
|
778
|
-
}, e) : null, /* @__PURE__ */
|
|
778
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
779
779
|
fillRule: "evenodd",
|
|
780
780
|
d: "M15 3.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V5.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l3.97-3.97h-2.69a.75.75 0 0 1-.75-.75Zm-12 0A.75.75 0 0 1 3.75 3h4.5a.75.75 0 0 1 0 1.5H5.56l3.97 3.97a.75.75 0 0 1-1.06 1.06L4.5 5.56v2.69a.75.75 0 0 1-1.5 0v-4.5Zm11.47 11.78a.75.75 0 1 1 1.06-1.06l3.97 3.97v-2.69a.75.75 0 0 1 1.5 0v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-3.97-3.97Zm-4.94-1.06a.75.75 0 0 1 0 1.06L5.56 19.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0Z",
|
|
781
781
|
clipRule: "evenodd"
|
|
782
782
|
}));
|
|
783
783
|
}
|
|
784
|
-
const
|
|
785
|
-
function
|
|
784
|
+
const cr = /* @__PURE__ */ p.forwardRef(sr);
|
|
785
|
+
function ir({
|
|
786
786
|
title: e,
|
|
787
787
|
titleId: t,
|
|
788
788
|
...n
|
|
789
789
|
}, r) {
|
|
790
|
-
return /* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
791
791
|
xmlns: "http://www.w3.org/2000/svg",
|
|
792
792
|
viewBox: "0 0 24 24",
|
|
793
793
|
fill: "currentColor",
|
|
@@ -795,21 +795,21 @@ function cr({
|
|
|
795
795
|
"data-slot": "icon",
|
|
796
796
|
ref: r,
|
|
797
797
|
"aria-labelledby": t
|
|
798
|
-
}, n), e ? /* @__PURE__ */
|
|
798
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
799
799
|
id: t
|
|
800
|
-
}, e) : null, /* @__PURE__ */
|
|
800
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
801
801
|
fillRule: "evenodd",
|
|
802
802
|
d: "M6.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.25 4.81V16.5a.75.75 0 0 1-1.5 0V4.81L3.53 8.03a.75.75 0 0 1-1.06-1.06l4.5-4.5Zm9.53 4.28a.75.75 0 0 1 .75.75v11.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06l3.22 3.22V7.5a.75.75 0 0 1 .75-.75Z",
|
|
803
803
|
clipRule: "evenodd"
|
|
804
804
|
}));
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
function
|
|
806
|
+
const dr = /* @__PURE__ */ p.forwardRef(ir);
|
|
807
|
+
function ur({
|
|
808
808
|
title: e,
|
|
809
809
|
titleId: t,
|
|
810
810
|
...n
|
|
811
811
|
}, r) {
|
|
812
|
-
return /* @__PURE__ */
|
|
812
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
813
813
|
xmlns: "http://www.w3.org/2000/svg",
|
|
814
814
|
viewBox: "0 0 24 24",
|
|
815
815
|
fill: "currentColor",
|
|
@@ -817,21 +817,21 @@ function dr({
|
|
|
817
817
|
"data-slot": "icon",
|
|
818
818
|
ref: r,
|
|
819
819
|
"aria-labelledby": t
|
|
820
|
-
}, n), e ? /* @__PURE__ */
|
|
820
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
821
821
|
id: t
|
|
822
|
-
}, e) : null, /* @__PURE__ */
|
|
822
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
823
823
|
fillRule: "evenodd",
|
|
824
824
|
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
825
825
|
clipRule: "evenodd"
|
|
826
826
|
}));
|
|
827
827
|
}
|
|
828
|
-
const
|
|
829
|
-
function
|
|
828
|
+
const mr = /* @__PURE__ */ p.forwardRef(ur);
|
|
829
|
+
function fr({
|
|
830
830
|
title: e,
|
|
831
831
|
titleId: t,
|
|
832
832
|
...n
|
|
833
833
|
}, r) {
|
|
834
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
835
835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
836
836
|
viewBox: "0 0 24 24",
|
|
837
837
|
fill: "currentColor",
|
|
@@ -839,21 +839,21 @@ function mr({
|
|
|
839
839
|
"data-slot": "icon",
|
|
840
840
|
ref: r,
|
|
841
841
|
"aria-labelledby": t
|
|
842
|
-
}, n), e ? /* @__PURE__ */
|
|
842
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
843
843
|
id: t
|
|
844
|
-
}, e) : null, /* @__PURE__ */
|
|
844
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
845
845
|
fillRule: "evenodd",
|
|
846
846
|
d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
|
|
847
847
|
clipRule: "evenodd"
|
|
848
848
|
}));
|
|
849
849
|
}
|
|
850
|
-
const
|
|
851
|
-
function
|
|
850
|
+
const pr = /* @__PURE__ */ p.forwardRef(fr);
|
|
851
|
+
function hr({
|
|
852
852
|
title: e,
|
|
853
853
|
titleId: t,
|
|
854
854
|
...n
|
|
855
855
|
}, r) {
|
|
856
|
-
return /* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
857
857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
858
858
|
viewBox: "0 0 24 24",
|
|
859
859
|
fill: "currentColor",
|
|
@@ -861,21 +861,21 @@ function pr({
|
|
|
861
861
|
"data-slot": "icon",
|
|
862
862
|
ref: r,
|
|
863
863
|
"aria-labelledby": t
|
|
864
|
-
}, n), e ? /* @__PURE__ */
|
|
864
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
865
865
|
id: t
|
|
866
|
-
}, e) : null, /* @__PURE__ */
|
|
866
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
867
867
|
fillRule: "evenodd",
|
|
868
868
|
d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
|
|
869
869
|
clipRule: "evenodd"
|
|
870
870
|
}));
|
|
871
871
|
}
|
|
872
|
-
const
|
|
873
|
-
function
|
|
872
|
+
const xr = /* @__PURE__ */ p.forwardRef(hr);
|
|
873
|
+
function wr({
|
|
874
874
|
title: e,
|
|
875
875
|
titleId: t,
|
|
876
876
|
...n
|
|
877
877
|
}, r) {
|
|
878
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
879
879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
880
880
|
viewBox: "0 0 24 24",
|
|
881
881
|
fill: "currentColor",
|
|
@@ -883,21 +883,21 @@ function xr({
|
|
|
883
883
|
"data-slot": "icon",
|
|
884
884
|
ref: r,
|
|
885
885
|
"aria-labelledby": t
|
|
886
|
-
}, n), e ? /* @__PURE__ */
|
|
886
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
887
887
|
id: t
|
|
888
|
-
}, e) : null, /* @__PURE__ */
|
|
888
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
889
889
|
fillRule: "evenodd",
|
|
890
890
|
d: "M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z",
|
|
891
891
|
clipRule: "evenodd"
|
|
892
892
|
}));
|
|
893
893
|
}
|
|
894
|
-
const
|
|
895
|
-
function
|
|
894
|
+
const gr = /* @__PURE__ */ p.forwardRef(wr);
|
|
895
|
+
function vr({
|
|
896
896
|
title: e,
|
|
897
897
|
titleId: t,
|
|
898
898
|
...n
|
|
899
899
|
}, r) {
|
|
900
|
-
return /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
901
901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
902
902
|
viewBox: "0 0 24 24",
|
|
903
903
|
fill: "currentColor",
|
|
@@ -905,21 +905,21 @@ function gr({
|
|
|
905
905
|
"data-slot": "icon",
|
|
906
906
|
ref: r,
|
|
907
907
|
"aria-labelledby": t
|
|
908
|
-
}, n), e ? /* @__PURE__ */
|
|
908
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
909
909
|
id: t
|
|
910
|
-
}, e) : null, /* @__PURE__ */
|
|
910
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
911
911
|
fillRule: "evenodd",
|
|
912
912
|
d: "M12 1.5a.75.75 0 0 1 .75.75V4.5a.75.75 0 0 1-1.5 0V2.25A.75.75 0 0 1 12 1.5ZM5.636 4.136a.75.75 0 0 1 1.06 0l1.592 1.591a.75.75 0 0 1-1.061 1.06l-1.591-1.59a.75.75 0 0 1 0-1.061Zm12.728 0a.75.75 0 0 1 0 1.06l-1.591 1.592a.75.75 0 0 1-1.06-1.061l1.59-1.591a.75.75 0 0 1 1.061 0Zm-6.816 4.496a.75.75 0 0 1 .82.311l5.228 7.917a.75.75 0 0 1-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 0 1-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 0 1-1.247-.606l.569-9.47a.75.75 0 0 1 .554-.68ZM3 10.5a.75.75 0 0 1 .75-.75H6a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 10.5Zm14.25 0a.75.75 0 0 1 .75-.75h2.25a.75.75 0 0 1 0 1.5H18a.75.75 0 0 1-.75-.75Zm-8.962 3.712a.75.75 0 0 1 0 1.061l-1.591 1.591a.75.75 0 1 1-1.061-1.06l1.591-1.592a.75.75 0 0 1 1.06 0Z",
|
|
913
913
|
clipRule: "evenodd"
|
|
914
914
|
}));
|
|
915
915
|
}
|
|
916
|
-
const
|
|
916
|
+
const br = /* @__PURE__ */ p.forwardRef(vr);
|
|
917
917
|
function Er({
|
|
918
918
|
title: e,
|
|
919
919
|
titleId: t,
|
|
920
920
|
...n
|
|
921
921
|
}, r) {
|
|
922
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
923
923
|
xmlns: "http://www.w3.org/2000/svg",
|
|
924
924
|
viewBox: "0 0 24 24",
|
|
925
925
|
fill: "currentColor",
|
|
@@ -927,23 +927,23 @@ function Er({
|
|
|
927
927
|
"data-slot": "icon",
|
|
928
928
|
ref: r,
|
|
929
929
|
"aria-labelledby": t
|
|
930
|
-
}, n), e ? /* @__PURE__ */
|
|
930
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
931
931
|
id: t
|
|
932
|
-
}, e) : null, /* @__PURE__ */
|
|
932
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
933
933
|
fillRule: "evenodd",
|
|
934
934
|
d: "M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",
|
|
935
935
|
clipRule: "evenodd"
|
|
936
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ p.createElement("path", {
|
|
937
937
|
d: "M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"
|
|
938
938
|
}));
|
|
939
939
|
}
|
|
940
|
-
const
|
|
941
|
-
function
|
|
940
|
+
const yr = /* @__PURE__ */ p.forwardRef(Er);
|
|
941
|
+
function Rr({
|
|
942
942
|
title: e,
|
|
943
943
|
titleId: t,
|
|
944
944
|
...n
|
|
945
945
|
}, r) {
|
|
946
|
-
return /* @__PURE__ */
|
|
946
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
947
947
|
xmlns: "http://www.w3.org/2000/svg",
|
|
948
948
|
viewBox: "0 0 24 24",
|
|
949
949
|
fill: "currentColor",
|
|
@@ -951,43 +951,19 @@ function yr({
|
|
|
951
951
|
"data-slot": "icon",
|
|
952
952
|
ref: r,
|
|
953
953
|
"aria-labelledby": t
|
|
954
|
-
}, n), e ? /* @__PURE__ */
|
|
954
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
955
955
|
id: t
|
|
956
|
-
}, e) : null, /* @__PURE__ */
|
|
957
|
-
d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
|
|
958
|
-
}), /* @__PURE__ */ m.createElement("path", {
|
|
959
|
-
fillRule: "evenodd",
|
|
960
|
-
d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z",
|
|
961
|
-
clipRule: "evenodd"
|
|
962
|
-
}));
|
|
963
|
-
}
|
|
964
|
-
const Rr = /* @__PURE__ */ m.forwardRef(yr);
|
|
965
|
-
function Sr({
|
|
966
|
-
title: e,
|
|
967
|
-
titleId: t,
|
|
968
|
-
...n
|
|
969
|
-
}, r) {
|
|
970
|
-
return /* @__PURE__ */ m.createElement("svg", Object.assign({
|
|
971
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
972
|
-
viewBox: "0 0 24 24",
|
|
973
|
-
fill: "currentColor",
|
|
974
|
-
"aria-hidden": "true",
|
|
975
|
-
"data-slot": "icon",
|
|
976
|
-
ref: r,
|
|
977
|
-
"aria-labelledby": t
|
|
978
|
-
}, n), e ? /* @__PURE__ */ m.createElement("title", {
|
|
979
|
-
id: t
|
|
980
|
-
}, e) : null, /* @__PURE__ */ m.createElement("path", {
|
|
956
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
981
957
|
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"
|
|
982
958
|
}));
|
|
983
959
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
960
|
+
const Sr = /* @__PURE__ */ p.forwardRef(Rr);
|
|
961
|
+
function Tr({
|
|
986
962
|
title: e,
|
|
987
963
|
titleId: t,
|
|
988
964
|
...n
|
|
989
965
|
}, r) {
|
|
990
|
-
return /* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
991
967
|
xmlns: "http://www.w3.org/2000/svg",
|
|
992
968
|
viewBox: "0 0 24 24",
|
|
993
969
|
fill: "currentColor",
|
|
@@ -995,19 +971,19 @@ function Nr({
|
|
|
995
971
|
"data-slot": "icon",
|
|
996
972
|
ref: r,
|
|
997
973
|
"aria-labelledby": t
|
|
998
|
-
}, n), e ? /* @__PURE__ */
|
|
974
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
999
975
|
id: t
|
|
1000
|
-
}, e) : null, /* @__PURE__ */
|
|
976
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
1001
977
|
d: "M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"
|
|
1002
978
|
}));
|
|
1003
979
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
980
|
+
const Nr = /* @__PURE__ */ p.forwardRef(Tr);
|
|
981
|
+
function kr({
|
|
1006
982
|
title: e,
|
|
1007
983
|
titleId: t,
|
|
1008
984
|
...n
|
|
1009
985
|
}, r) {
|
|
1010
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
1011
987
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1012
988
|
viewBox: "0 0 24 24",
|
|
1013
989
|
fill: "currentColor",
|
|
@@ -1015,21 +991,21 @@ function Lr({
|
|
|
1015
991
|
"data-slot": "icon",
|
|
1016
992
|
ref: r,
|
|
1017
993
|
"aria-labelledby": t
|
|
1018
|
-
}, n), e ? /* @__PURE__ */
|
|
994
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
1019
995
|
id: t
|
|
1020
|
-
}, e) : null, /* @__PURE__ */
|
|
996
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
1021
997
|
fillRule: "evenodd",
|
|
1022
998
|
d: "M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Zm8.25-3.75a.75.75 0 0 1 .75.75v2.25h2.25a.75.75 0 0 1 0 1.5h-2.25v2.25a.75.75 0 0 1-1.5 0v-2.25H7.5a.75.75 0 0 1 0-1.5h2.25V7.5a.75.75 0 0 1 .75-.75Z",
|
|
1023
999
|
clipRule: "evenodd"
|
|
1024
1000
|
}));
|
|
1025
1001
|
}
|
|
1026
|
-
const
|
|
1027
|
-
function
|
|
1002
|
+
const Lr = /* @__PURE__ */ p.forwardRef(kr);
|
|
1003
|
+
function Or({
|
|
1028
1004
|
title: e,
|
|
1029
1005
|
titleId: t,
|
|
1030
1006
|
...n
|
|
1031
1007
|
}, r) {
|
|
1032
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
1033
1009
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1034
1010
|
viewBox: "0 0 24 24",
|
|
1035
1011
|
fill: "currentColor",
|
|
@@ -1037,32 +1013,30 @@ function Pr({
|
|
|
1037
1013
|
"data-slot": "icon",
|
|
1038
1014
|
ref: r,
|
|
1039
1015
|
"aria-labelledby": t
|
|
1040
|
-
}, n), e ? /* @__PURE__ */
|
|
1016
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
1041
1017
|
id: t
|
|
1042
|
-
}, e) : null, /* @__PURE__ */
|
|
1018
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
1043
1019
|
d: "M5.625 3.75a2.625 2.625 0 1 0 0 5.25h12.75a2.625 2.625 0 0 0 0-5.25H5.625ZM3.75 11.25a.75.75 0 0 0 0 1.5h16.5a.75.75 0 0 0 0-1.5H3.75ZM3 15.75a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75ZM3.75 18.75a.75.75 0 0 0 0 1.5h16.5a.75.75 0 0 0 0-1.5H3.75Z"
|
|
1044
1020
|
}));
|
|
1045
1021
|
}
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
directoryIcons: kr,
|
|
1060
|
-
fileIcons: br
|
|
1022
|
+
const Pr = /* @__PURE__ */ p.forwardRef(Or), Ar = Object.freeze({
|
|
1023
|
+
sortMode: dr,
|
|
1024
|
+
folderPlacement: Sr,
|
|
1025
|
+
selectionMode: mr,
|
|
1026
|
+
doubleClickAction: br,
|
|
1027
|
+
expandIconSize: Lr,
|
|
1028
|
+
alwaysExpanded: cr,
|
|
1029
|
+
revealDocument: Lt,
|
|
1030
|
+
removeRootIndent: pr,
|
|
1031
|
+
lines: Pr,
|
|
1032
|
+
expandIcons: xr,
|
|
1033
|
+
directoryIcons: Nr,
|
|
1034
|
+
fileIcons: yr
|
|
1061
1035
|
}), dt = (e, t) => {
|
|
1062
1036
|
const n = e[t.labelKey];
|
|
1063
1037
|
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}`);
|
|
1064
1038
|
return n;
|
|
1065
|
-
},
|
|
1039
|
+
}, qr = ({ id: e, settings: t, descriptors: n, onAdvance: r, onClose: o, ref: i }) => {
|
|
1066
1040
|
const { labels: l } = D(), a = g([]);
|
|
1067
1041
|
_(() => {
|
|
1068
1042
|
a.current[0]?.focus();
|
|
@@ -1089,7 +1063,7 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1089
1063
|
u.preventDefault(), s(n.length - 1);
|
|
1090
1064
|
break;
|
|
1091
1065
|
case "Escape":
|
|
1092
|
-
|
|
1066
|
+
Pe(u), o();
|
|
1093
1067
|
break;
|
|
1094
1068
|
case "Tab":
|
|
1095
1069
|
o();
|
|
@@ -1098,8 +1072,8 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1098
1072
|
},
|
|
1099
1073
|
[n.length, s, o]
|
|
1100
1074
|
);
|
|
1101
|
-
return /* @__PURE__ */
|
|
1102
|
-
const
|
|
1075
|
+
return /* @__PURE__ */ m("div", { ref: i, id: e, role: "menu", "aria-label": l.treeSettings, className: "aqmx-explorer-menu", "data-testid": "markdown-explorer-tree-settings-menu", children: n.map((u, c) => {
|
|
1076
|
+
const f = Ar[u.key], h = dt(l, u), v = Je(l, t, u.key), E = t[u.key], S = typeof E == "boolean" ? { role: "menuitemcheckbox", "aria-checked": E, "aria-label": h } : { role: "menuitem", "aria-label": `${h}: ${v}` };
|
|
1103
1077
|
return /* @__PURE__ */ O(
|
|
1104
1078
|
"button",
|
|
1105
1079
|
{
|
|
@@ -1116,22 +1090,22 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1116
1090
|
onClick: () => r(u),
|
|
1117
1091
|
onKeyDown: (C) => d(C, c),
|
|
1118
1092
|
children: [
|
|
1119
|
-
/* @__PURE__ */ f
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ m(f, { className: "aqmx-explorer-menu-icon", "aria-hidden": "true" }),
|
|
1094
|
+
/* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-name", children: h }),
|
|
1095
|
+
/* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-value", children: v })
|
|
1122
1096
|
]
|
|
1123
1097
|
},
|
|
1124
1098
|
u.key
|
|
1125
1099
|
);
|
|
1126
1100
|
}) });
|
|
1127
|
-
},
|
|
1101
|
+
}, Cr = ({ settings: e, descriptors: t, onAdvance: n }) => {
|
|
1128
1102
|
const { labels: r, announcer: o } = D(), [i, l] = q(!1), a = g(null), s = g(null), d = g(null), u = ye(), c = w(() => {
|
|
1129
1103
|
a.current?.focus(), l(!1);
|
|
1130
1104
|
}, []);
|
|
1131
1105
|
_(() => {
|
|
1132
1106
|
if (!i) return;
|
|
1133
|
-
const v = (
|
|
1134
|
-
|
|
1107
|
+
const v = (E) => {
|
|
1108
|
+
E.target instanceof Node && (a.current?.contains(E.target) === !0 || s.current?.contains(E.target) === !0) || (l(!1), d.current !== null && window.clearTimeout(d.current), d.current = window.setTimeout(() => {
|
|
1135
1109
|
d.current = null, (document.activeElement === null || document.activeElement === document.body) && a.current?.focus();
|
|
1136
1110
|
}, 0));
|
|
1137
1111
|
};
|
|
@@ -1142,20 +1116,20 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1142
1116
|
},
|
|
1143
1117
|
[]
|
|
1144
1118
|
);
|
|
1145
|
-
const
|
|
1119
|
+
const f = w(
|
|
1146
1120
|
(v) => {
|
|
1147
|
-
v.key !== "Escape" || !i || (
|
|
1121
|
+
v.key !== "Escape" || !i || (Pe(v), c());
|
|
1148
1122
|
},
|
|
1149
1123
|
[i, c]
|
|
1150
1124
|
), h = w(
|
|
1151
1125
|
(v) => {
|
|
1152
|
-
const
|
|
1153
|
-
o.announce(r.settingAnnouncement(dt(r, v), Je(r,
|
|
1126
|
+
const E = n(v.key);
|
|
1127
|
+
o.announce(r.settingAnnouncement(dt(r, v), Je(r, E, v.key)));
|
|
1154
1128
|
},
|
|
1155
1129
|
[o, r, n]
|
|
1156
1130
|
);
|
|
1157
1131
|
return {
|
|
1158
|
-
trigger: /* @__PURE__ */
|
|
1132
|
+
trigger: /* @__PURE__ */ m(
|
|
1159
1133
|
"button",
|
|
1160
1134
|
{
|
|
1161
1135
|
ref: a,
|
|
@@ -1168,31 +1142,31 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1168
1142
|
title: r.treeSettings,
|
|
1169
1143
|
"data-testid": "markdown-explorer-tree-settings",
|
|
1170
1144
|
onClick: () => l((v) => !v),
|
|
1171
|
-
onKeyDown:
|
|
1172
|
-
children: /* @__PURE__ */
|
|
1145
|
+
onKeyDown: f,
|
|
1146
|
+
children: /* @__PURE__ */ m(gr, { "aria-hidden": "true" })
|
|
1173
1147
|
}
|
|
1174
1148
|
),
|
|
1175
|
-
menu: i ? /* @__PURE__ */
|
|
1149
|
+
menu: i ? /* @__PURE__ */ m(qr, { ref: s, id: u, settings: e, descriptors: t, onAdvance: h, onClose: c }) : null
|
|
1176
1150
|
};
|
|
1177
|
-
},
|
|
1151
|
+
}, Fr = () => {
|
|
1178
1152
|
const { treeSettings: e } = D();
|
|
1179
|
-
return { settings:
|
|
1180
|
-
}, We = /* @__PURE__ */ new Set(),
|
|
1181
|
-
const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: i, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: c, documents:
|
|
1182
|
-
|
|
1183
|
-
const k = e.mode === "tree" ? e.tray.onGatheredChange : null,
|
|
1153
|
+
return { settings: Ee(e.subscribe, e.getSnapshot, e.getServerSnapshot), advance: e.advance };
|
|
1154
|
+
}, We = /* @__PURE__ */ new Set(), Mr = '[role="tree"] [role="treeitem"][tabindex="0"]', _r = "[data-directory-tree-tab-stop]", oa = (e) => {
|
|
1155
|
+
const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: i, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: c, documents: f, announcer: h, reveals: v } = D(), { settings: E, advance: S } = Fr(), C = F(() => _t(t === "tree"), [t]), T = t === "tree" && E.selectionMode === "multiple";
|
|
1156
|
+
or(T);
|
|
1157
|
+
const k = e.mode === "tree" ? e.tray.onGatheredChange : null, Z = e.mode === "tree" ? e.onOpenSelection : void 0, M = e.mode === "tree" && T ? e.tray.gathered : ke, L = w(
|
|
1184
1158
|
(N) => {
|
|
1185
1159
|
const Y = S(N);
|
|
1186
1160
|
return Y.selectionMode !== "multiple" && k?.(ke), Y;
|
|
1187
1161
|
},
|
|
1188
1162
|
[S, k]
|
|
1189
|
-
),
|
|
1163
|
+
), b = Cr({ settings: E, descriptors: C, onAdvance: L }), R = w((N) => k?.((Y) => ar(Y, N)), [k]), y = w((N) => k?.((Y) => lr(Y, N)), [k]), P = w(() => k?.(ke), [k]), H = g(null), de = w(() => {
|
|
1190
1164
|
const N = H.current;
|
|
1191
1165
|
if (N === null) return;
|
|
1192
|
-
[
|
|
1166
|
+
[Mr, _r, '[data-testid="markdown-explorer-tree-settings"]'].map((z) => N.querySelector(z)).find((z) => z !== null)?.focus();
|
|
1193
1167
|
}, []), X = F(() => new Set(M.keys()), [M]), B = F(() => r === null ? We : /* @__PURE__ */ new Set([r]), [r]), ee = F(() => {
|
|
1194
1168
|
if (t === "multi") return { mode: "multiple", items: o, shownPath: null, onChange: null };
|
|
1195
|
-
switch (
|
|
1169
|
+
switch (E.selectionMode) {
|
|
1196
1170
|
case "single":
|
|
1197
1171
|
return { mode: "single", items: B, shownPath: r, onChange: null };
|
|
1198
1172
|
case "multiple":
|
|
@@ -1200,28 +1174,28 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1200
1174
|
case "none":
|
|
1201
1175
|
return { mode: "none", items: We, shownPath: null, onChange: null };
|
|
1202
1176
|
}
|
|
1203
|
-
}, [t, o,
|
|
1177
|
+
}, [t, o, E.selectionMode, B, r, X, R]), K = F(() => E.revealDocument ? { path: r, openFolders: !0 } : { path: ee.shownPath, openFolders: !1 }, [E.revealDocument, r, ee.shownPath]), ae = w(
|
|
1204
1178
|
(N) => {
|
|
1205
1179
|
r !== null && v.settle(r), l(N);
|
|
1206
1180
|
},
|
|
1207
1181
|
[r, v, l]
|
|
1208
|
-
), [V, le] = q(null), [G,
|
|
1182
|
+
), [V, le] = q(null), [G, $] = q(!1), [U, ue] = q(null), W = g(!1), ce = w(async () => {
|
|
1209
1183
|
if (!W.current) {
|
|
1210
|
-
W.current = !0,
|
|
1184
|
+
W.current = !0, $(!0), ue(null);
|
|
1211
1185
|
try {
|
|
1212
1186
|
const N = await c.refresh(n);
|
|
1213
1187
|
if (N.status === "superseded") return;
|
|
1214
|
-
|
|
1188
|
+
f.invalidate(), N.status === "failed" ? ue({ sourceId: n, failure: N.failure }) : h.announce(d.treeRefreshed);
|
|
1215
1189
|
} finally {
|
|
1216
|
-
W.current = !1,
|
|
1190
|
+
W.current = !1, $(!1);
|
|
1217
1191
|
}
|
|
1218
1192
|
}
|
|
1219
|
-
}, [c,
|
|
1193
|
+
}, [c, f, n, h, d]), me = V === null ? null : V.expandAll, oe = V?.expanding === !0, he = u.find((N) => N.id === n), fe = s.target === "multi" ? ln : rn, te = s.target === "multi" ? d.switchToMulti : d.switchToTree;
|
|
1220
1194
|
return /* @__PURE__ */ O("nav", { ref: H, "aria-label": d.explorerRegion, className: "aqmx-explorer", "data-testid": "markdown-explorer-explorer", "data-aqmx-mode": t, children: [
|
|
1221
1195
|
/* @__PURE__ */ O("div", { className: "aqmx-explorer-header", children: [
|
|
1222
|
-
u.length > 1 ? /* @__PURE__ */
|
|
1196
|
+
u.length > 1 ? /* @__PURE__ */ m("select", { className: "aqmx-explorer-source", "aria-label": d.sourceLabel, title: he?.label, value: n, onChange: (N) => ae(N.currentTarget.value), "data-testid": "markdown-explorer-source-select", children: u.map((N) => /* @__PURE__ */ m("option", { value: N.id, children: N.label }, N.id)) }) : null,
|
|
1223
1197
|
/* @__PURE__ */ O("div", { className: "aqmx-explorer-actions", children: [
|
|
1224
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ m(Ot, { to: s.href, navigation: "switch-view", className: "aqmx-icon-button", "aria-label": te, title: te, "data-testid": "markdown-explorer-view-switch", "data-aqmx-target": s.target, children: /* @__PURE__ */ m(fe, { "aria-hidden": "true" }) }),
|
|
1225
1199
|
/* @__PURE__ */ O(
|
|
1226
1200
|
"button",
|
|
1227
1201
|
{
|
|
@@ -1236,12 +1210,12 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1236
1210
|
ce();
|
|
1237
1211
|
},
|
|
1238
1212
|
children: [
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ m(Oe, { "aria-hidden": "true" }),
|
|
1214
|
+
/* @__PURE__ */ m("span", { children: d.refreshTreeLabel })
|
|
1241
1215
|
]
|
|
1242
1216
|
}
|
|
1243
1217
|
),
|
|
1244
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ m(
|
|
1245
1219
|
"button",
|
|
1246
1220
|
{
|
|
1247
1221
|
type: "button",
|
|
@@ -1253,31 +1227,31 @@ const Ar = /* @__PURE__ */ m.forwardRef(Pr), qe = (e) => {
|
|
|
1253
1227
|
"data-aqmx-busy": oe ? "true" : void 0,
|
|
1254
1228
|
"data-testid": "markdown-explorer-expand-all",
|
|
1255
1229
|
onClick: () => me?.(),
|
|
1256
|
-
children: /* @__PURE__ */
|
|
1230
|
+
children: /* @__PURE__ */ m(tn, { "aria-hidden": "true" })
|
|
1257
1231
|
}
|
|
1258
1232
|
),
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
|
|
1233
|
+
/* @__PURE__ */ m("button", { type: "button", className: "aqmx-icon-button", "aria-label": d.collapseAll, title: d.collapseAll, "aria-disabled": V === null, "data-testid": "markdown-explorer-collapse-all", onClick: () => V?.collapseAll(), children: /* @__PURE__ */ m(Jt, { "aria-hidden": "true" }) }),
|
|
1234
|
+
b.trigger
|
|
1261
1235
|
] })
|
|
1262
1236
|
] }),
|
|
1263
1237
|
/* @__PURE__ */ O("div", { className: "aqmx-explorer-body", "data-aqmx-explorer-body": "", children: [
|
|
1264
|
-
U !== null && U.sourceId === n ? /* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
T && M.size > 0 ? /* @__PURE__ */
|
|
1268
|
-
|
|
1238
|
+
U !== null && U.sourceId === n ? /* @__PURE__ */ m("p", { role: "alert", className: "aqmx-explorer-refresh-failure", "data-testid": "markdown-explorer-refresh-failure", "data-aqmx-failure": U.failure.reason, children: d.treeRefreshFailed(Pt(d, U.failure.reason)) }) : null,
|
|
1239
|
+
/* @__PURE__ */ m(Qe, { fallback: null, children: /* @__PURE__ */ m(on, {}) }),
|
|
1240
|
+
/* @__PURE__ */ m(tr, { mode: t, sourceId: n, settings: E, reveal: K, openPaths: o, selection: ee, onOpenDocument: i, onRevealSource: a, onControls: le }, n),
|
|
1241
|
+
T && M.size > 0 ? /* @__PURE__ */ m(rr, { selection: M, onRemove: y, onClear: P, onOpenSelection: Z, onLeave: de }) : null,
|
|
1242
|
+
b.menu
|
|
1269
1243
|
] })
|
|
1270
1244
|
] });
|
|
1271
|
-
}, ut = "(pointer: coarse)",
|
|
1245
|
+
}, ut = "(pointer: coarse)", Ir = (e) => {
|
|
1272
1246
|
const t = window.matchMedia(ut);
|
|
1273
1247
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
1274
|
-
},
|
|
1275
|
-
function
|
|
1248
|
+
}, Dr = () => window.matchMedia(ut).matches, Hr = () => !1, $r = () => Ee(Ir, Dr, Hr);
|
|
1249
|
+
function Zr({
|
|
1276
1250
|
title: e,
|
|
1277
1251
|
titleId: t,
|
|
1278
1252
|
...n
|
|
1279
1253
|
}, r) {
|
|
1280
|
-
return /* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ p.createElement("svg", Object.assign({
|
|
1281
1255
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1282
1256
|
viewBox: "0 0 24 24",
|
|
1283
1257
|
fill: "currentColor",
|
|
@@ -1285,55 +1259,55 @@ function Br({
|
|
|
1285
1259
|
"data-slot": "icon",
|
|
1286
1260
|
ref: r,
|
|
1287
1261
|
"aria-labelledby": t
|
|
1288
|
-
}, n), e ? /* @__PURE__ */
|
|
1262
|
+
}, n), e ? /* @__PURE__ */ p.createElement("title", {
|
|
1289
1263
|
id: t
|
|
1290
|
-
}, e) : null, /* @__PURE__ */
|
|
1264
|
+
}, e) : null, /* @__PURE__ */ p.createElement("path", {
|
|
1291
1265
|
fillRule: "evenodd",
|
|
1292
1266
|
d: "M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z",
|
|
1293
1267
|
clipRule: "evenodd"
|
|
1294
1268
|
}));
|
|
1295
1269
|
}
|
|
1296
|
-
const
|
|
1297
|
-
const { labels: i } = D(), l =
|
|
1298
|
-
u.navigated !== l && (c({ navigated: l, source: a.source }), u.source === a.source && !
|
|
1299
|
-
const [v,
|
|
1300
|
-
v !== o && (
|
|
1301
|
-
const S = g(null), C = g(null), T = g(null), k = g(!1),
|
|
1270
|
+
const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t, covered: n, onNoticeSlotChange: r, dismissals: o }) => {
|
|
1271
|
+
const { labels: i } = D(), l = Yt(), { location: a } = At(), [s, d] = q(!1), [u, c] = q({ navigated: l, source: a.source }), [f, h] = q(!1);
|
|
1272
|
+
u.navigated !== l && (c({ navigated: l, source: a.source }), u.source === a.source && !f && d(!1));
|
|
1273
|
+
const [v, E] = q(o);
|
|
1274
|
+
v !== o && (E(o), d(!1));
|
|
1275
|
+
const S = g(null), C = g(null), T = g(null), k = g(!1), Z = ye();
|
|
1302
1276
|
I(() => {
|
|
1303
1277
|
const y = S.current;
|
|
1304
1278
|
y !== null && (s && !y.open ? (y.showModal(), C.current?.focus()) : !s && y.open && (y.close(), t.current?.focus()), r(s ? T.current : null));
|
|
1305
1279
|
}, [s, t, r]), I(() => () => r(null), [r]);
|
|
1306
1280
|
const M = w((y) => {
|
|
1307
|
-
y.key !== "Escape" || y.defaultPrevented || (
|
|
1281
|
+
y.key !== "Escape" || y.defaultPrevented || (Pe(y), d(!1));
|
|
1308
1282
|
}, []), L = w((y) => {
|
|
1309
1283
|
k.current = y.target === y.currentTarget;
|
|
1310
|
-
}, []),
|
|
1284
|
+
}, []), b = w((y) => {
|
|
1311
1285
|
const P = k.current;
|
|
1312
1286
|
k.current = !1, P && y.target === y.currentTarget && d(!1);
|
|
1313
1287
|
}, []), R = w(() => {
|
|
1314
1288
|
d(!1);
|
|
1315
1289
|
}, []);
|
|
1316
1290
|
return /* @__PURE__ */ O(Ge, { children: [
|
|
1317
|
-
/* @__PURE__ */
|
|
1318
|
-
/* @__PURE__ */
|
|
1319
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ m("div", { className: "aqmx-sheet-bar", inert: n, children: /* @__PURE__ */ O("button", { ref: t, type: "button", className: "aqmx-sheet-toggle", "aria-haspopup": "dialog", "aria-expanded": s, "aria-controls": Z, "data-testid": "markdown-explorer-sheet-toggle", onClick: () => d(!0), children: [
|
|
1292
|
+
/* @__PURE__ */ m(Br, { "aria-hidden": "true" }),
|
|
1293
|
+
/* @__PURE__ */ m("span", { children: i.showExplorer })
|
|
1320
1294
|
] }) }),
|
|
1321
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ m("dialog", { ref: S, id: Z, className: "aqmx-sheet", "aria-label": i.explorerRegion, "data-testid": "markdown-explorer-sheet", onKeyDown: M, onPointerDown: L, onClick: b, onClose: R, children: /* @__PURE__ */ O("div", { className: "aqmx-sheet-panel", children: [
|
|
1322
1296
|
/* @__PURE__ */ O("div", { className: "aqmx-sheet-header", children: [
|
|
1323
|
-
/* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ m("div", { ref: T, className: "aqmx-sheet-notice-slot" }),
|
|
1298
|
+
/* @__PURE__ */ m("button", { ref: C, type: "button", className: "aqmx-sheet-close", "aria-label": i.hideExplorer, title: i.hideExplorer, "data-testid": "markdown-explorer-sheet-close", onClick: () => d(!1), children: /* @__PURE__ */ m(ct, { "aria-hidden": "true" }) })
|
|
1325
1299
|
] }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ m("div", { className: "aqmx-sheet-body", children: /* @__PURE__ */ m(qe, { value: s, children: /* @__PURE__ */ m(it, { value: h, children: e }) }) }),
|
|
1301
|
+
/* @__PURE__ */ m(qt, { holds: s, testId: "markdown-explorer-sheet-announcer" })
|
|
1328
1302
|
] }) })
|
|
1329
1303
|
] });
|
|
1330
|
-
},
|
|
1304
|
+
}, Vr = Ae(null), Ce = "aqmx-explorer", mt = "aqmx-content", Fe = '[role="tree"] [role="treeitem"]', jr = `${Fe}[tabindex="0"]`, Kr = "[data-directory-tree-tab-stop]", Ur = (e, t) => {
|
|
1331
1305
|
for (const n of e.querySelectorAll(`[data-panel-id="${Ce}"] ${Fe}`)) if (n.getAttribute(se) === t) return n;
|
|
1332
1306
|
return null;
|
|
1333
1307
|
}, Xe = (e, t) => ({
|
|
1334
1308
|
inlineSize: e > 0 ? e : null,
|
|
1335
|
-
rootFontPixels: t > 0 ? t :
|
|
1336
|
-
}),
|
|
1309
|
+
rootFontPixels: t > 0 ? t : Vt
|
|
1310
|
+
}), Wr = (e, t) => {
|
|
1337
1311
|
const [n, r] = q(() => Xe(0, 0));
|
|
1338
1312
|
return I(() => {
|
|
1339
1313
|
const o = e.current, i = t.current;
|
|
@@ -1352,14 +1326,14 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1352
1326
|
});
|
|
1353
1327
|
return s.observe(o), s.observe(i), () => s.disconnect();
|
|
1354
1328
|
}, [e, t]), n;
|
|
1355
|
-
}, ft = (e) => `aqmx-split-handle-${e}`,
|
|
1329
|
+
}, ft = (e) => `aqmx-split-handle-${e}`, Xr = (e, { frameRef: t, sheetToggleRef: n, handleId: r }) => {
|
|
1356
1330
|
const o = g(!1), i = g(null), l = g(!1);
|
|
1357
1331
|
I(() => {
|
|
1358
1332
|
const s = t.current;
|
|
1359
1333
|
if (s === null) throw new Error("[markdown-explorer] the split frame is not mounted");
|
|
1360
1334
|
const d = (c) => {
|
|
1361
|
-
const
|
|
1362
|
-
o.current =
|
|
1335
|
+
const f = c.target instanceof Element ? c.target : null;
|
|
1336
|
+
o.current = f !== null && f.closest(`[data-panel-id="${mt}"]`) === null, !l.current && (i.current = f?.closest(`${Fe}[${se}]`)?.getAttribute(se) ?? null);
|
|
1363
1337
|
}, u = (c) => {
|
|
1364
1338
|
c.relatedTarget instanceof Node && !s.contains(c.relatedTarget) && (o.current = !1);
|
|
1365
1339
|
};
|
|
@@ -1374,8 +1348,8 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1374
1348
|
const s = t.current;
|
|
1375
1349
|
if (s === null || !o.current) return;
|
|
1376
1350
|
const d = (u) => {
|
|
1377
|
-
const { activeElement: c, body:
|
|
1378
|
-
if (c !== null && c !==
|
|
1351
|
+
const { activeElement: c, body: f } = s.ownerDocument;
|
|
1352
|
+
if (c !== null && c !== f) return;
|
|
1379
1353
|
const h = u.find((v) => v !== null);
|
|
1380
1354
|
if (h != null) {
|
|
1381
1355
|
l.current = !0;
|
|
@@ -1394,21 +1368,21 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1394
1368
|
if (a.current !== e || !o.current) return;
|
|
1395
1369
|
const u = i.current, c = `[data-panel-id="${Ce}"]`;
|
|
1396
1370
|
d([
|
|
1397
|
-
u === null ? null :
|
|
1371
|
+
u === null ? null : Ur(s, u),
|
|
1372
|
+
s.querySelector(`${c} ${jr}`),
|
|
1398
1373
|
s.querySelector(`${c} ${Kr}`),
|
|
1399
|
-
s.querySelector(`${c} ${Ur}`),
|
|
1400
1374
|
s.querySelector(`[data-resize-handle-id="${r}"]`)
|
|
1401
1375
|
]);
|
|
1402
1376
|
});
|
|
1403
1377
|
}, [e, t, n, r]);
|
|
1404
|
-
},
|
|
1405
|
-
const l = g(null), [a, s] = q(null), d = g(null), u = g(null), { inlineSize: c, rootFontPixels:
|
|
1406
|
-
return
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
h ? /* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */
|
|
1378
|
+
}, sa = ({ view: e, explorer: t, content: n, contentCoversPage: r = !1, sheetDismissals: o = 0, onDraggingChange: i }) => {
|
|
1379
|
+
const l = g(null), [a, s] = q(null), d = g(null), u = g(null), { inlineSize: c, rootFontPixels: f } = Wr(l, d), h = c !== null && c < It(f);
|
|
1380
|
+
return Xr(h, { frameRef: l, sheetToggleRef: u, handleId: ft(e) }), /* @__PURE__ */ O("div", { ref: l, className: "aqmx-split-frame", "data-aqmx-explorer-mode": h ? "sheet" : "split", children: [
|
|
1381
|
+
/* @__PURE__ */ m("span", { ref: d, className: "aqmx-rem-probe", "aria-hidden": "true", "data-aqmx-rem-probe": "" }),
|
|
1382
|
+
h ? /* @__PURE__ */ m(zr, { explorer: t, toggleRef: u, covered: r, onNoticeSlotChange: s, dismissals: o }) : null,
|
|
1383
|
+
/* @__PURE__ */ m(Vr, { value: h ? a : null, children: /* @__PURE__ */ m(Gr, { view: e, sheet: h, explorer: t, content: n, contentCoversPage: r, onDraggingChange: i, explorerMinPixels: Dt(f) }) })
|
|
1410
1384
|
] });
|
|
1411
|
-
},
|
|
1385
|
+
}, Gr = ({
|
|
1412
1386
|
view: e,
|
|
1413
1387
|
sheet: t,
|
|
1414
1388
|
explorer: n,
|
|
@@ -1417,38 +1391,38 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1417
1391
|
onDraggingChange: i,
|
|
1418
1392
|
explorerMinPixels: l
|
|
1419
1393
|
}) => {
|
|
1420
|
-
const { viewSettings: a, labels: s } = D(), u =
|
|
1394
|
+
const { viewSettings: a, labels: s } = D(), u = Ct((b) => e === "tree" ? b.treeExplorer : b.multiExplorer) ?? (e === "tree" ? $t : Zt), c = g(null), f = g(null), h = g(!1), v = g(!1), [E, S] = q(!1), C = g(i);
|
|
1421
1395
|
I(() => {
|
|
1422
1396
|
C.current = i;
|
|
1423
1397
|
}, [i]);
|
|
1424
1398
|
const T = w(() => {
|
|
1425
|
-
const
|
|
1426
|
-
if (
|
|
1427
|
-
const [R = 0, y = 0] =
|
|
1399
|
+
const b = c.current;
|
|
1400
|
+
if (b === null || b.length !== 2) return;
|
|
1401
|
+
const [R = 0, y = 0] = b, P = R + y;
|
|
1428
1402
|
if (P <= 0 || R <= 0) return;
|
|
1429
1403
|
const H = Math.min(Be, R / P * 100);
|
|
1430
1404
|
a.update(e === "tree" ? { treeExplorer: H } : { multiExplorer: H });
|
|
1431
1405
|
}, [a, e]), k = w(() => {
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
},
|
|
1406
|
+
f.current !== null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
1407
|
+
f.current = null, T();
|
|
1408
|
+
}, Ht);
|
|
1435
1409
|
}, [T]);
|
|
1436
1410
|
_(
|
|
1437
1411
|
() => () => {
|
|
1438
|
-
|
|
1412
|
+
f.current !== null && clearTimeout(f.current), v.current && C.current?.(!1);
|
|
1439
1413
|
},
|
|
1440
1414
|
[]
|
|
1441
1415
|
);
|
|
1442
|
-
const
|
|
1443
|
-
(
|
|
1444
|
-
c.current =
|
|
1445
|
-
const [y = 0, P = 0] =
|
|
1446
|
-
|
|
1416
|
+
const Z = $r(), M = w(
|
|
1417
|
+
(b, R) => {
|
|
1418
|
+
c.current = b;
|
|
1419
|
+
const [y = 0, P = 0] = b;
|
|
1420
|
+
b.length === 2 && P > 0 && S(y <= 0), R.source === "keyboard" ? k() : R.source === "pointer" && (h.current = !0);
|
|
1447
1421
|
},
|
|
1448
1422
|
[k]
|
|
1449
1423
|
), L = w(
|
|
1450
|
-
(
|
|
1451
|
-
if (v.current =
|
|
1424
|
+
(b) => {
|
|
1425
|
+
if (v.current = b, i?.(b), b) {
|
|
1452
1426
|
h.current = !1;
|
|
1453
1427
|
return;
|
|
1454
1428
|
}
|
|
@@ -1456,8 +1430,8 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1456
1430
|
},
|
|
1457
1431
|
[i, k]
|
|
1458
1432
|
);
|
|
1459
|
-
return /* @__PURE__ */ O(
|
|
1460
|
-
t ? null : /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ O(Xt, { id: `aqmx-split-${e}`, direction: "horizontal", onLayout: M, className: "aqmx-split", "data-aqmx-split": e, children: [
|
|
1434
|
+
t ? null : /* @__PURE__ */ m(
|
|
1461
1435
|
ze,
|
|
1462
1436
|
{
|
|
1463
1437
|
id: Ce,
|
|
@@ -1468,14 +1442,14 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1468
1442
|
pixelAdjustPriority: 1,
|
|
1469
1443
|
inert: o,
|
|
1470
1444
|
className: "aqmx-split-explorer",
|
|
1471
|
-
children: /* @__PURE__ */
|
|
1445
|
+
children: /* @__PURE__ */ m(qe, { value: !E, children: n })
|
|
1472
1446
|
}
|
|
1473
1447
|
),
|
|
1474
|
-
t ? null : /* @__PURE__ */
|
|
1475
|
-
|
|
1448
|
+
t ? null : /* @__PURE__ */ m(
|
|
1449
|
+
Gt,
|
|
1476
1450
|
{
|
|
1477
1451
|
id: ft(e),
|
|
1478
|
-
thickness:
|
|
1452
|
+
thickness: Z ? Bt : zt,
|
|
1479
1453
|
indicator: { visible: !0, thickness: ve.gripThickness, length: ve.gripLength, barThickness: ve.barThickness, barLength: ve.barLength },
|
|
1480
1454
|
title: s.resizeExplorer,
|
|
1481
1455
|
"aria-label": s.resizeExplorer,
|
|
@@ -1484,12 +1458,12 @@ const zr = /* @__PURE__ */ m.forwardRef(Br), Vr = ({ explorer: e, toggleRef: t,
|
|
|
1484
1458
|
className: "aqmx-split-handle"
|
|
1485
1459
|
}
|
|
1486
1460
|
),
|
|
1487
|
-
/* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ m(ze, { id: mt, defaultSize: { value: 100 - u, unit: "percentage" }, contentOverflow: "hidden", className: "aqmx-split-content", ...o ? { style: { isolation: "auto" } } : {}, children: r })
|
|
1488
1462
|
] });
|
|
1489
1463
|
};
|
|
1490
1464
|
export {
|
|
1491
1465
|
ke as E,
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1466
|
+
Vr as S,
|
|
1467
|
+
sa as a,
|
|
1468
|
+
oa as b
|
|
1495
1469
|
};
|