@aiquants/markdown-explorer 0.33.0 → 0.34.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 +280 -0
- package/README.md +31 -18
- package/dist/{EditSurface-BPqqykro.cjs → EditSurface-CF82jZQg.cjs} +5 -5
- package/dist/{EditSurface-CWq35IWQ.js → EditSurface-CqHk2R3k.js} +73 -63
- package/dist/ExplorerSplit-D325YGEf.cjs +1 -0
- package/dist/ExplorerSplit-DGH9bckm.js +1500 -0
- package/dist/MultiLayout-CzR7yJ0m.cjs +1 -0
- package/dist/{MultiLayout-DYNGlNy0.js → MultiLayout-kcZyVnvK.js} +176 -176
- package/dist/NativeScrollBar-UNed10Na.js +62 -0
- package/dist/NativeScrollBar-pUbA4Zq3.cjs +1 -0
- package/dist/TreeLayout-BnIU87HX.js +96 -0
- package/dist/TreeLayout-DtvIpuOe.cjs +1 -0
- package/dist/core/geometry.d.cts +1 -0
- package/dist/core/geometry.d.ts +1 -0
- package/dist/core/labels.d.cts +10 -0
- package/dist/core/labels.d.ts +10 -0
- package/dist/core/location.d.cts +2 -0
- package/dist/core/location.d.ts +2 -0
- package/dist/core/viewSettings.d.cts +2 -0
- package/dist/core/viewSettings.d.ts +2 -0
- package/dist/{dataRoute-DLhQfdoW.js → dataRoute-D6KiSHIc.js} +20 -20
- package/dist/index-BDCbvHDs.cjs +15 -0
- package/dist/{index-CO-RgTml.js → index-DR31S_-4.js} +2029 -1929
- package/dist/index.cjs +1 -1
- package/dist/index.js +17 -17
- package/dist/{location-perTmwct.js → location-C44b9H1S.js} +291 -278
- package/dist/location-hGLhCCg4.cjs +1 -0
- package/dist/{merge-DZI4pkWI.cjs → merge-BziXxZkE.cjs} +1 -1
- package/dist/{merge-D7L_pINl.js → merge-C1MWvhCS.js} +1 -1
- package/dist/{sanitizePolicy-By0tKOpZ.js → sanitizePolicy-CwvyPpp5.js} +1 -1
- package/dist/sanitizeWorker.js +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.js +4 -4
- package/dist/styles/markdown-explorer.css +1 -1
- package/dist/tapScrollCircle-D_BpaLwY.js +14 -0
- package/dist/tapScrollCircle-DigcJCsu.cjs +1 -0
- package/dist/useSplitPersistence-DCeYbJMx.js +38 -0
- package/dist/useSplitPersistence-QGcvyMAa.cjs +1 -0
- package/docs/behavior/dom-hooks.md +12 -3
- package/docs/behavior/layout.md +64 -16
- package/docs/behavior/localization.md +4 -3
- package/docs/behavior/security.md +2 -1
- package/docs/behavior/url-contract.md +11 -5
- package/package.json +11 -11
- package/dist/ExplorerSplit-BRY4uy6x.js +0 -1493
- package/dist/ExplorerSplit-CQxr6b0v.cjs +0 -1
- package/dist/MultiLayout-TXbet9k3.cjs +0 -1
- package/dist/NativeScrollBar-BsWdvkHa.js +0 -64
- package/dist/NativeScrollBar-UpjxjLlB.cjs +0 -1
- package/dist/TreeLayout-BQEgZhz9.js +0 -72
- package/dist/TreeLayout-C0O1OGi4.cjs +0 -1
- package/dist/index-DSkK8iLE.cjs +0 -15
- package/dist/location-BxiJRTyw.cjs +0 -1
- package/dist/tapScrollCircle-CRKZremf.js +0 -12
- package/dist/tapScrollCircle-Cbf17x8g.cjs +0 -1
- package/dist/useSplitPersistence-Du01PHNg.js +0 -42
- package/dist/useSplitPersistence-pPmE4GTT.cjs +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollBar as m } from "@aiquants/virtualscroll";
|
|
3
|
+
import { useCallback as S, useMemo as d, useSyncExternalStore as h } from "react";
|
|
4
|
+
import { u as b, c as v, N as f, s as T } from "./index-DR31S_-4.js";
|
|
5
|
+
import { NO_TAP_SCROLL_CIRCLE as g, tapScrollCircleFor as H } from "./tapScrollCircle-D_BpaLwY.js";
|
|
6
|
+
const p = (e) => ({ scrollTop: e.scrollTop, scrollHeight: e.scrollHeight, clientHeight: e.clientHeight }), C = (e, t) => e.scrollTop === t.scrollTop && e.scrollHeight === t.scrollHeight && e.clientHeight === t.clientHeight, O = (e) => {
|
|
7
|
+
let t = p(e);
|
|
8
|
+
return {
|
|
9
|
+
getSnapshot: () => t,
|
|
10
|
+
subscribe: (s) => {
|
|
11
|
+
const o = () => {
|
|
12
|
+
const a = p(e);
|
|
13
|
+
C(t, a) || (t = a, s());
|
|
14
|
+
};
|
|
15
|
+
let n = 0;
|
|
16
|
+
const c = () => {
|
|
17
|
+
n === 0 && (n = requestAnimationFrame(() => {
|
|
18
|
+
n = 0, o();
|
|
19
|
+
}));
|
|
20
|
+
}, r = typeof ResizeObserver > "u" ? null : new ResizeObserver(c), i = () => {
|
|
21
|
+
if (r !== null) {
|
|
22
|
+
r.disconnect(), r.observe(e);
|
|
23
|
+
for (const a of e.children) r.observe(a);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
i();
|
|
27
|
+
const l = typeof MutationObserver > "u" ? null : new MutationObserver(() => {
|
|
28
|
+
i(), c();
|
|
29
|
+
});
|
|
30
|
+
return l?.observe(e, { childList: !0 }), e.addEventListener("scroll", o, { passive: !0 }), o(), () => {
|
|
31
|
+
e.removeEventListener("scroll", o), l?.disconnect(), r?.disconnect(), cancelAnimationFrame(n);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}, L = (e) => {
|
|
36
|
+
const t = d(() => O(e), [e]);
|
|
37
|
+
return h(t.subscribe, t.getSnapshot, t.getSnapshot);
|
|
38
|
+
}, A = (e, t) => {
|
|
39
|
+
const s = typeof t == "function" ? t(e.scrollTop) : t;
|
|
40
|
+
return e.scrollTo({ top: s, behavior: "instant" }), e.scrollTop;
|
|
41
|
+
}, _ = ({ scroller: e, kind: t }) => {
|
|
42
|
+
const { locale: s } = b(), o = v(), { scrollTop: n, scrollHeight: c, clientHeight: r } = L(e), i = S((l) => A(e, l), [e]);
|
|
43
|
+
return /* @__PURE__ */ u("div", { className: "aqmx-native-scroll-bar", children: /* @__PURE__ */ u(
|
|
44
|
+
m,
|
|
45
|
+
{
|
|
46
|
+
contentSize: c,
|
|
47
|
+
viewportSize: r,
|
|
48
|
+
scrollPosition: n,
|
|
49
|
+
onScroll: i,
|
|
50
|
+
scrollBarWidth: f,
|
|
51
|
+
...T(o),
|
|
52
|
+
enableArrowButtonTabStops: !1,
|
|
53
|
+
tapScrollCircleOptions: t === "content" ? H(o) : g,
|
|
54
|
+
locale: s
|
|
55
|
+
}
|
|
56
|
+
) });
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
_ as NativeScrollBar,
|
|
60
|
+
A as scrollScrollerTo,
|
|
61
|
+
L as useScrollerMetrics
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),T=require("@aiquants/virtualscroll"),S=require("react"),u=require("./index-BDCbvHDs.cjs"),d=require("./tapScrollCircle-DigcJCsu.cjs"),v=e=>({scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight}),m=(e,t)=>e.scrollTop===t.scrollTop&&e.scrollHeight===t.scrollHeight&&e.clientHeight===t.clientHeight,g=e=>{let t=v(e);return{getSnapshot:()=>t,subscribe:s=>{const o=()=>{const a=v(e);m(t,a)||(t=a,s())};let n=0;const c=()=>{n===0&&(n=requestAnimationFrame(()=>{n=0,o()}))},r=typeof ResizeObserver>"u"?null:new ResizeObserver(c),l=()=>{if(r!==null){r.disconnect(),r.observe(e);for(const a of e.children)r.observe(a)}};l();const i=typeof MutationObserver>"u"?null:new MutationObserver(()=>{l(),c()});return i?.observe(e,{childList:!0}),e.addEventListener("scroll",o,{passive:!0}),o(),()=>{e.removeEventListener("scroll",o),i?.disconnect(),r?.disconnect(),cancelAnimationFrame(n)}}}},b=e=>{const t=S.useMemo(()=>g(e),[e]);return S.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)},h=(e,t)=>{const s=typeof t=="function"?t(e.scrollTop):t;return e.scrollTo({top:s,behavior:"instant"}),e.scrollTop},f=({scroller:e,kind:t})=>{const{locale:s}=u.useExplorer(),o=u.useCoarsePointer(),{scrollTop:n,scrollHeight:c,clientHeight:r}=b(e),l=S.useCallback(i=>h(e,i),[e]);return p.jsx("div",{className:"aqmx-native-scroll-bar",children:p.jsx(T.ScrollBar,{contentSize:c,viewportSize:r,scrollPosition:n,onScroll:l,scrollBarWidth:u.NATIVE_SCROLL_BAR_WIDTH,...u.scrollBarControlsFor(o),enableArrowButtonTabStops:!1,tapScrollCircleOptions:t==="content"?d.tapScrollCircleFor(o):d.NO_TAP_SCROLL_CIRCLE,locale:s})})};exports.NativeScrollBar=f;exports.scrollScrollerTo=h;exports.useScrollerMetrics=b;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as v, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as m, useMemo as w, useEffect as g, useSyncExternalStore as G, useState as j, useRef as q, useLayoutEffect as H } from "react";
|
|
3
|
+
import { useLocation as U } from "react-router";
|
|
4
|
+
import { e as p, c as $ } from "./location-C44b9H1S.js";
|
|
5
|
+
import { u as E, f as D, r as B, F as Y, g as J, h as K, i as Q, D as V, P as W, j as X } from "./index-DR31S_-4.js";
|
|
6
|
+
import { isMaximizeEscape as Z } from "@aiquants/drag-drop-panels";
|
|
7
|
+
import { l as I } from "./dataRoute-D6KiSHIc.js";
|
|
8
|
+
import { E as ee, a as te, b as ne } from "./ExplorerSplit-DGH9bckm.js";
|
|
9
|
+
const re = (t) => {
|
|
10
|
+
const { config: e, labels: n, announcer: r } = E(), a = D(), i = m(() => {
|
|
11
|
+
const s = t.doc !== null ? t.doc : t.folder;
|
|
12
|
+
if (s === null) throw new RangeError("[markdown-explorer] a tree view without a document or a folder has nothing to maximize");
|
|
13
|
+
a(p(e, { ...t, maximized: !t.maximized }), "browse");
|
|
14
|
+
const o = I(s);
|
|
15
|
+
r.announce(t.maximized ? n.documentRestored(o) : n.documentMaximized(o));
|
|
16
|
+
}, [e, a, t, r, n]);
|
|
17
|
+
return w(() => ({ maximized: t.maximized, toggle: i }), [t.maximized, i]);
|
|
18
|
+
}, ae = (t, e) => {
|
|
19
|
+
g(() => {
|
|
20
|
+
if (!t) return;
|
|
21
|
+
const n = (r) => {
|
|
22
|
+
Z(r) && (r.preventDefault(), e());
|
|
23
|
+
};
|
|
24
|
+
return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
|
|
25
|
+
}, [t, e]);
|
|
26
|
+
}, se = (t, e) => t.claim !== e.claim || t.readme.status !== e.readme.status ? !1 : t.readme.status === "failed" && e.readme.status === "failed" ? t.readme.failure === e.readme.failure : t.readme.status === "ok" && e.readme.status === "ok" ? t.readme.readme === e.readme.readme : !0, oe = (t, e, n) => {
|
|
27
|
+
let r = null;
|
|
28
|
+
return () => {
|
|
29
|
+
const a = t.version(), i = t.read(e), s = i.status !== "pending";
|
|
30
|
+
if (r !== null && r.version === a && r.tree === i && r.settled === s) return r.state;
|
|
31
|
+
const o = B(t, e, n), u = r !== null && se(r.state, o) ? r.state : o;
|
|
32
|
+
return r = { version: a, tree: i, settled: s, state: u }, u;
|
|
33
|
+
};
|
|
34
|
+
}, ue = (t, e, n) => {
|
|
35
|
+
let r = !0, a = null;
|
|
36
|
+
const i = () => {
|
|
37
|
+
r && n();
|
|
38
|
+
}, s = () => {
|
|
39
|
+
const u = t.read(e);
|
|
40
|
+
u === a || u.status !== "pending" || (a = u, u.then(i, i));
|
|
41
|
+
};
|
|
42
|
+
s();
|
|
43
|
+
const o = t.subscribe(() => {
|
|
44
|
+
s(), n();
|
|
45
|
+
});
|
|
46
|
+
return () => {
|
|
47
|
+
r = !1, o();
|
|
48
|
+
};
|
|
49
|
+
}, ie = () => Y, ce = (t, e) => {
|
|
50
|
+
const { trees: n } = E(), r = w(() => e === null ? null : oe(n, t, e), [n, t, e]), a = m((l) => r === null ? () => {
|
|
51
|
+
} : ue(n, t, l), [r, n, t]), i = m(() => r === null ? null : r(), [r]), s = m(() => r === null ? null : ie(), [r]), o = G(a, i, s), u = o?.claim === !0;
|
|
52
|
+
return g(() => e === null ? void 0 : n.open(t), [n, t, e]), g(() => e === null || !u ? void 0 : n.claimChildren(t, /* @__PURE__ */ new Map([[e, "direct"]])), [n, t, e, u]), o === null ? null : o.readme;
|
|
53
|
+
}, le = /* @__PURE__ */ new Set(), me = Object.freeze({ kind: "loading" }), de = (t, e) => e.status === "loading" ? me : e.status === "failed" ? { kind: "failure", folder: t, failure: e.failure, onRetry: e.retry } : { kind: "no-readme", folder: t }, Se = ({ location: t }) => {
|
|
54
|
+
const { config: e } = E(), n = D(), { hash: r } = U(), { source: a, doc: i, folder: s, overrides: o, markup: u, maximized: l } = t, [h, R] = j(ee), M = w(() => ({ gathered: h, onGatheredChange: R }), [h]), f = ce(a, s), c = f === null ? i : f.status === "ok" ? f.readme : null, S = w(() => s === null || f === null ? J : de(s, f), [s, f]), x = l && (c !== null || S.kind === "loading"), N = m((d) => n(p(e, { view: "tree", source: a, doc: d, overrides: o }), "browse"), [n, e, a, o]), P = m((d) => n(p(e, { view: "tree", source: a, folder: d, overrides: o }), "browse"), [n, e, a, o]), T = m((d) => n(p(e, { view: "tree", source: d, doc: i, folder: s, overrides: o, markup: u, maximized: l }), "switch-source"), [n, e, i, s, o, u, l]), F = m((d) => n(`${p(e, { view: "tree", source: d, doc: i, folder: s, overrides: o, markup: u, maximized: l })}${r}`, "browse"), [n, e, i, s, o, u, l, r]), L = m(
|
|
55
|
+
(d) => {
|
|
56
|
+
const O = $(e, d);
|
|
57
|
+
n(p(e, { view: "multi", source: a, docs: O, markup: u && c !== null && O.includes(c) ? [c] : [] }), "switch-view");
|
|
58
|
+
},
|
|
59
|
+
[n, e, a, c, u]
|
|
60
|
+
), C = w(() => ({ href: p(e, c === null ? { view: "multi", source: a } : { view: "multi", source: a, docs: [c], markup: u ? [c] : [] }), target: "multi" }), [e, a, c, u]), b = q(l);
|
|
61
|
+
H(() => {
|
|
62
|
+
b.current = l;
|
|
63
|
+
}, [l]);
|
|
64
|
+
const z = m(() => b.current, []), _ = w(() => ({ kind: "page", view: "tree", overrides: o, embed: {}, maximized: z }), [o, z]), y = K(t), k = re(t);
|
|
65
|
+
return ae(x, k.toggle), /* @__PURE__ */ v(
|
|
66
|
+
te,
|
|
67
|
+
{
|
|
68
|
+
view: "tree",
|
|
69
|
+
contentCoversPage: x,
|
|
70
|
+
explorer: /* @__PURE__ */ v(
|
|
71
|
+
ne,
|
|
72
|
+
{
|
|
73
|
+
mode: "tree",
|
|
74
|
+
sourceId: a,
|
|
75
|
+
currentPath: s === null ? i : s,
|
|
76
|
+
openPaths: le,
|
|
77
|
+
onOpenDocument: N,
|
|
78
|
+
onOpenFolder: P,
|
|
79
|
+
currentFolder: s !== null,
|
|
80
|
+
onSourceChange: T,
|
|
81
|
+
onRevealSource: F,
|
|
82
|
+
viewSwitch: C,
|
|
83
|
+
tray: M,
|
|
84
|
+
onOpenSelection: L
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
content: /* @__PURE__ */ A("div", { className: "aqmx-document-column aqmx-tree-document", "data-aqmx-maximized": x ? "true" : "false", ...Q, children: [
|
|
88
|
+
c === null ? null : /* @__PURE__ */ v(V, { path: c, placement: W, markup: y, maximize: k }),
|
|
89
|
+
/* @__PURE__ */ v(X, { path: c, absence: S, markup: u, variant: _ })
|
|
90
|
+
] })
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
export {
|
|
95
|
+
Se as TreeLayout
|
|
96
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),s=require("react"),L=require("react-router"),x=require("./location-hGLhCCg4.cjs"),i=require("./index-BDCbvHDs.cjs"),F=require("@aiquants/drag-drop-panels"),H=require("./dataRoute-DwYtgyt6.cjs"),g=require("./ExplorerSplit-D325YGEf.cjs"),_=t=>{const{config:e,labels:n,announcer:r}=i.useExplorer(),a=i.useExplorerNavigate(),c=s.useCallback(()=>{const o=t.doc!==null?t.doc:t.folder;if(o===null)throw new RangeError("[markdown-explorer] a tree view without a document or a folder has nothing to maximize");a(x.explorerHref(e,{...t,maximized:!t.maximized}),"browse");const u=H.lastPathSegment(o);r.announce(t.maximized?n.documentRestored(u):n.documentMaximized(u))},[e,a,t,r,n]);return s.useMemo(()=>({maximized:t.maximized,toggle:c}),[t.maximized,c])},j=(t,e)=>{s.useEffect(()=>{if(!t)return;const n=r=>{F.isMaximizeEscape(r)&&(r.preventDefault(),e())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t,e])},A=(t,e)=>t.claim!==e.claim||t.readme.status!==e.readme.status?!1:t.readme.status==="failed"&&e.readme.status==="failed"?t.readme.failure===e.readme.failure:t.readme.status==="ok"&&e.readme.status==="ok"?t.readme.readme===e.readme.readme:!0,G=(t,e,n)=>{let r=null;return()=>{const a=t.version(),c=t.read(e),o=c.status!=="pending";if(r!==null&&r.version===a&&r.tree===c&&r.settled===o)return r.state;const u=i.readFolderReadme(t,e,n),l=r!==null&&A(r.state,u)?r.state:u;return r={version:a,tree:c,settled:o,state:l},l}},U=(t,e,n)=>{let r=!0,a=null;const c=()=>{r&&n()},o=()=>{const l=t.read(e);l===a||l.status!=="pending"||(a=l,l.then(c,c))};o();const u=t.subscribe(()=>{o(),n()});return()=>{r=!1,u()}},B=()=>i.FOLDER_README_LOADING,Y=(t,e)=>{const{trees:n}=i.useExplorer(),r=s.useMemo(()=>e===null?null:G(n,t,e),[n,t,e]),a=s.useCallback(d=>r===null?()=>{}:U(n,t,d),[r,n,t]),c=s.useCallback(()=>r===null?null:r(),[r]),o=s.useCallback(()=>r===null?null:B(),[r]),u=s.useSyncExternalStore(a,c,o),l=u?.claim===!0;return s.useEffect(()=>e===null?void 0:n.open(t),[n,t,e]),s.useEffect(()=>e===null||!l?void 0:n.claimChildren(t,new Map([[e,"direct"]])),[n,t,e,l]),u===null?null:u.readme},J=new Set,K=Object.freeze({kind:"loading"}),Q=(t,e)=>e.status==="loading"?K:e.status==="failed"?{kind:"failure",folder:t,failure:e.failure,onRetry:e.retry}:{kind:"no-readme",folder:t},V=({location:t})=>{const{config:e}=i.useExplorer(),n=i.useExplorerNavigate(),{hash:r}=L.useLocation(),{source:a,doc:c,folder:o,overrides:u,markup:l,maximized:d}=t,[E,M]=s.useState(g.EMPTY_SELECTION),C=s.useMemo(()=>({gathered:E,onGatheredChange:M}),[E]),f=Y(a,o),m=f===null?c:f.status==="ok"?f.readme:null,b=s.useMemo(()=>o===null||f===null?i.NO_DOCUMENT:Q(o,f),[o,f]),v=d&&(m!==null||b.kind==="loading"),O=s.useCallback(p=>n(x.explorerHref(e,{view:"tree",source:a,doc:p,overrides:u}),"browse"),[n,e,a,u]),R=s.useCallback(p=>n(x.explorerHref(e,{view:"tree",source:a,folder:p,overrides:u}),"browse"),[n,e,a,u]),D=s.useCallback(p=>n(x.explorerHref(e,{view:"tree",source:p,doc:c,folder:o,overrides:u,markup:l,maximized:d}),"switch-source"),[n,e,c,o,u,l,d]),N=s.useCallback(p=>n(`${x.explorerHref(e,{view:"tree",source:p,doc:c,folder:o,overrides:u,markup:l,maximized:d})}${r}`,"browse"),[n,e,c,o,u,l,d,r]),P=s.useCallback(p=>{const z=x.canonicalMultiDocuments(e,p);n(x.explorerHref(e,{view:"multi",source:a,docs:z,markup:l&&m!==null&&z.includes(m)?[m]:[]}),"switch-view")},[n,e,a,m,l]),T=s.useMemo(()=>({href:x.explorerHref(e,m===null?{view:"multi",source:a}:{view:"multi",source:a,docs:[m],markup:l?[m]:[]}),target:"multi"}),[e,a,m,l]),k=s.useRef(d);s.useLayoutEffect(()=>{k.current=d},[d]);const h=s.useCallback(()=>k.current,[]),q=s.useMemo(()=>({kind:"page",view:"tree",overrides:u,embed:{},maximized:h}),[u,h]),y=i.usePageMarkupToggle(t),S=_(t);return j(v,S.toggle),w.jsx(g.ExplorerSplit,{view:"tree",contentCoversPage:v,explorer:w.jsx(g.ExplorerPane,{mode:"tree",sourceId:a,currentPath:o===null?c:o,openPaths:J,onOpenDocument:O,onOpenFolder:R,currentFolder:o!==null,onSourceChange:D,onRevealSource:N,viewSwitch:T,tray:C,onOpenSelection:P}),content:w.jsxs("div",{className:"aqmx-document-column aqmx-tree-document","data-aqmx-maximized":v?"true":"false",...i.CONTENT_PANE,children:[m===null?null:w.jsx(i.DocumentRefreshBar,{path:m,placement:i.PAGE_DOCUMENT_REFRESH,markup:y,maximize:S}),w.jsx(i.DocumentPane,{path:m,absence:b,markup:l,variant:q})]})})};exports.TreeLayout=V;
|
package/dist/core/geometry.d.cts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
|
30
30
|
export declare const CONTROL_BLOCK_PIXELS = 44;
|
|
31
31
|
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
32
|
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const EXPLORER_BAR_PIXELS: number;
|
|
33
34
|
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
35
|
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
36
|
export declare const COLUMN_MIN_MEASURE = "40ch";
|
package/dist/core/geometry.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
|
30
30
|
export declare const CONTROL_BLOCK_PIXELS = 44;
|
|
31
31
|
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
32
|
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const EXPLORER_BAR_PIXELS: number;
|
|
33
34
|
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
35
|
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
36
|
export declare const COLUMN_MIN_MEASURE = "40ch";
|
package/dist/core/labels.d.cts
CHANGED
|
@@ -21,6 +21,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
21
21
|
readonly refreshDocument: string;
|
|
22
22
|
readonly refreshDocumentNamed: (name: string) => string;
|
|
23
23
|
readonly documentRefreshed: (name: string) => string;
|
|
24
|
+
readonly documentMaximize: string;
|
|
25
|
+
readonly documentRestore: string;
|
|
26
|
+
readonly documentMaximized: (name: string) => string;
|
|
27
|
+
readonly documentRestored: (name: string) => string;
|
|
24
28
|
readonly documentRefreshFailed: (reason: string) => string;
|
|
25
29
|
readonly showMarkupLabel: string;
|
|
26
30
|
readonly showMarkup: string;
|
|
@@ -276,6 +280,12 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
276
280
|
readonly viewerSvgImageFullscreen: string;
|
|
277
281
|
readonly viewerSvgImageExitFullscreen: string;
|
|
278
282
|
readonly viewerSvgImageFullscreenDialog: string;
|
|
283
|
+
readonly viewerCodeBlockCopy: string;
|
|
284
|
+
readonly viewerCodeBlockCopied: string;
|
|
285
|
+
readonly viewerCodeBlockCopyFailed: string;
|
|
286
|
+
readonly viewerDisplayMathCopy: string;
|
|
287
|
+
readonly viewerDisplayMathCopied: string;
|
|
288
|
+
readonly viewerDisplayMathCopyFailed: string;
|
|
279
289
|
readonly multiRegion: string;
|
|
280
290
|
readonly multiEmpty: string;
|
|
281
291
|
readonly panelLimit: (max: number) => string;
|
package/dist/core/labels.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
21
21
|
readonly refreshDocument: string;
|
|
22
22
|
readonly refreshDocumentNamed: (name: string) => string;
|
|
23
23
|
readonly documentRefreshed: (name: string) => string;
|
|
24
|
+
readonly documentMaximize: string;
|
|
25
|
+
readonly documentRestore: string;
|
|
26
|
+
readonly documentMaximized: (name: string) => string;
|
|
27
|
+
readonly documentRestored: (name: string) => string;
|
|
24
28
|
readonly documentRefreshFailed: (reason: string) => string;
|
|
25
29
|
readonly showMarkupLabel: string;
|
|
26
30
|
readonly showMarkup: string;
|
|
@@ -276,6 +280,12 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
276
280
|
readonly viewerSvgImageFullscreen: string;
|
|
277
281
|
readonly viewerSvgImageExitFullscreen: string;
|
|
278
282
|
readonly viewerSvgImageFullscreenDialog: string;
|
|
283
|
+
readonly viewerCodeBlockCopy: string;
|
|
284
|
+
readonly viewerCodeBlockCopied: string;
|
|
285
|
+
readonly viewerCodeBlockCopyFailed: string;
|
|
286
|
+
readonly viewerDisplayMathCopy: string;
|
|
287
|
+
readonly viewerDisplayMathCopied: string;
|
|
288
|
+
readonly viewerDisplayMathCopyFailed: string;
|
|
279
289
|
readonly multiRegion: string;
|
|
280
290
|
readonly multiEmpty: string;
|
|
281
291
|
readonly panelLimit: (max: number) => string;
|
package/dist/core/location.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ export type ExplorerLocation = {
|
|
|
19
19
|
readonly folder: string | null;
|
|
20
20
|
readonly overrides: ExplorerOverrides;
|
|
21
21
|
readonly markup: boolean;
|
|
22
|
+
readonly maximized: boolean;
|
|
22
23
|
} | {
|
|
23
24
|
readonly view: "multi";
|
|
24
25
|
readonly source: string;
|
|
@@ -48,6 +49,7 @@ export type ExplorerHrefTarget = {
|
|
|
48
49
|
readonly folder?: string | null;
|
|
49
50
|
readonly overrides?: ExplorerOverrides;
|
|
50
51
|
readonly markup?: boolean;
|
|
52
|
+
readonly maximized?: boolean;
|
|
51
53
|
} | {
|
|
52
54
|
readonly view: "multi";
|
|
53
55
|
readonly source?: string;
|
package/dist/core/location.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type ExplorerLocation = {
|
|
|
19
19
|
readonly folder: string | null;
|
|
20
20
|
readonly overrides: ExplorerOverrides;
|
|
21
21
|
readonly markup: boolean;
|
|
22
|
+
readonly maximized: boolean;
|
|
22
23
|
} | {
|
|
23
24
|
readonly view: "multi";
|
|
24
25
|
readonly source: string;
|
|
@@ -48,6 +49,7 @@ export type ExplorerHrefTarget = {
|
|
|
48
49
|
readonly folder?: string | null;
|
|
49
50
|
readonly overrides?: ExplorerOverrides;
|
|
50
51
|
readonly markup?: boolean;
|
|
52
|
+
readonly maximized?: boolean;
|
|
51
53
|
} | {
|
|
52
54
|
readonly view: "multi";
|
|
53
55
|
readonly source?: string;
|
|
@@ -2,7 +2,9 @@ import { ContentAlign } from "@aiquants/markdown/viewer-settings";
|
|
|
2
2
|
export type ContentAlignment = ContentAlign;
|
|
3
3
|
export type ExplorerViewSettings = {
|
|
4
4
|
readonly treeExplorer?: number;
|
|
5
|
+
readonly treeExplorerHidden?: boolean;
|
|
5
6
|
readonly multiExplorer?: number;
|
|
7
|
+
readonly multiExplorerHidden?: boolean;
|
|
6
8
|
readonly style?: string;
|
|
7
9
|
readonly align?: ContentAlignment;
|
|
8
10
|
};
|
|
@@ -2,7 +2,9 @@ import { ContentAlign } from "@aiquants/markdown/viewer-settings";
|
|
|
2
2
|
export type ContentAlignment = ContentAlign;
|
|
3
3
|
export type ExplorerViewSettings = {
|
|
4
4
|
readonly treeExplorer?: number;
|
|
5
|
+
readonly treeExplorerHidden?: boolean;
|
|
5
6
|
readonly multiExplorer?: number;
|
|
7
|
+
readonly multiExplorerHidden?: boolean;
|
|
6
8
|
readonly style?: string;
|
|
7
9
|
readonly align?: ContentAlignment;
|
|
8
10
|
};
|
|
@@ -243,14 +243,14 @@ const N = Object.freeze([
|
|
|
243
243
|
return t !== void 0 && n.length === 0 ? t : "failed";
|
|
244
244
|
};
|
|
245
245
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
Ke as A,
|
|
247
|
+
p as B,
|
|
248
|
+
Xe as C,
|
|
249
|
+
Ve as D,
|
|
250
250
|
Te as E,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
Je as F,
|
|
252
|
+
N as G,
|
|
253
|
+
xe as H,
|
|
254
254
|
Fe as I,
|
|
255
255
|
He as J,
|
|
256
256
|
Be as K,
|
|
@@ -280,19 +280,19 @@ export {
|
|
|
280
280
|
R as i,
|
|
281
281
|
Q as j,
|
|
282
282
|
Z as k,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
_e as l,
|
|
284
|
+
se as m,
|
|
285
|
+
d as n,
|
|
286
|
+
T as o,
|
|
287
|
+
u as p,
|
|
288
|
+
ne as q,
|
|
289
289
|
fe as r,
|
|
290
290
|
le as s,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
291
|
+
Se as t,
|
|
292
|
+
Oe as u,
|
|
293
|
+
qe as v,
|
|
294
|
+
be as w,
|
|
295
|
+
Ye as x,
|
|
296
|
+
Ge as y,
|
|
297
|
+
We as z
|
|
298
298
|
};
|