@aiquants/markdown-explorer 0.4.0 → 0.6.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 +31 -0
- package/README.md +30 -4
- package/dist/ExplorerSplit-CN5TvRj6.js +1495 -0
- package/dist/ExplorerSplit-CUIbSLQm.cjs +1 -0
- package/dist/MultiLayout-BDcQSpa6.cjs +1 -0
- package/dist/{MultiLayout-8s7q3-Hm.js → MultiLayout-hPmV-bae.js} +69 -66
- package/dist/{NativeScrollBar-DqkutcGb.cjs → NativeScrollBar-CHEQgaVx.cjs} +1 -1
- package/dist/{NativeScrollBar-D3VDRQqf.js → NativeScrollBar-DYEv2GLV.js} +1 -1
- package/dist/TreeLayout-BDaIyoGT.cjs +1 -0
- package/dist/TreeLayout-CqzxLpoM.js +23 -0
- package/dist/core/contracts.d.cts +23 -7
- package/dist/core/contracts.d.ts +23 -7
- package/dist/core/labels.d.cts +4 -0
- package/dist/core/labels.d.ts +4 -0
- package/dist/dataRoute-CUXlMhUJ.cjs +1 -0
- package/dist/{dataRoute-Dl6xmEFs.js → dataRoute-Ce6EIuu4.js} +69 -63
- package/dist/index-B3nShkkt.cjs +3 -0
- package/dist/{index-Dv9lUZqD.js → index-gJp1iXTc.js} +1020 -916
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/{location-CaNtUswk.js → location-CtM94G0O.js} +1 -1
- package/dist/{location-2QZADLiv.cjs → location-FavgY_gB.cjs} +1 -1
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +1 -1
- package/dist/server/errors.d.cts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/ports.d.cts +1 -0
- package/dist/server/ports.d.ts +1 -0
- package/dist/server.cjs +1 -1
- package/dist/server.js +753 -716
- package/dist/styles/markdown-explorer.css +1 -1
- package/docs/behavior/dom-hooks.md +6 -3
- package/docs/behavior/layout.md +6 -0
- package/docs/behavior/localization.md +4 -1
- package/docs/behavior/security.md +11 -4
- package/docs/behavior/url-contract.md +1 -0
- package/package.json +4 -3
- package/dist/ExplorerSplit-rUVsf5i-.cjs +0 -1
- package/dist/ExplorerSplit-uX2ojZe8.js +0 -1479
- package/dist/MultiLayout-ZK2V9nms.cjs +0 -1
- package/dist/TreeLayout-C7ZNnaOr.js +0 -22
- package/dist/TreeLayout-DkTVgxxb.cjs +0 -1
- package/dist/dataRoute-DYjYBiXF.cjs +0 -1
- package/dist/index-CLe6vRXs.cjs +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
/*! @aiquants/markdown-explorer — component styles, layered in `components`. The layer order is pinned first (theme, base, components, utilities, as Tailwind CSS declares it), so a Tailwind host's preflight in `base` cannot override the explorer when this sheet is the first to name a layer. */
|
|
3
|
-
@layer theme,base;@layer components{.aqmx-root{--aqmx-space-1:.0625rem;--aqmx-space-2:.125rem;--aqmx-space-3:.1875rem;--aqmx-space-4:.3125rem;--aqmx-space-5:.5rem;--aqmx-space-6:.8125rem;--aqmx-space-7:1.3125rem;--aqmx-space-8:2.125rem;--aqmx-space-9:3.4375rem;--aqmx-control:2.125rem;--aqmx-focus-ring-width:var(--aqmx-space-2);--aqmx-focus-ring-offset:var(--aqmx-space-2);--aqmx-icon:1rem;--aqmx-radius-s:.3125rem;--aqmx-radius-m:.5rem;--aqmx-radius-l:.8125rem;--aqmx-duration-1:89ms;--aqmx-duration-2:.144s;--aqmx-duration-3:.233s;--aqmx-duration-4:.377s;--aqmx-delay-progress:.233s;--aqmx-ease:cubic-bezier(.2, 0, 0, 1);--aqmx-font-size-body:.8125rem;--aqmx-font-size-title:1rem;--aqmx-font-size-display:1.3125rem;--aqmx-line-height-compact:1.382;--aqmx-line-height-prose:1.618;--aqmx-column-measure:40ch;--aqmx-surface:#fff;--aqmx-surface-raised:#f8fafc;--aqmx-surface-sunken:#f1f5f9;--aqmx-border:#cbd5e1;--aqmx-border-strong:#94a3b8;--aqmx-text:#0f172a;--aqmx-text-muted:#475569;--aqmx-accent:#1d4ed8;--aqmx-accent-surface:#dbeafe;--aqmx-tree-line:#64748b;--aqmx-tree-row-tint:#0f172a0f;--aqmx-tree-row-accent-tint:#2563eb29;--aqmx-focus:#2563eb;--aqmx-info-surface:#eff6ff;--aqmx-info-border:#93c5fd;--aqmx-info-text:#1e3a8a;--aqmx-warning-surface:#fffbeb;--aqmx-warning-border:#fcd34d;--aqmx-warning-text:#78350f;--aqmx-danger-surface:#fef2f2;--aqmx-danger-border:#fca5a5;--aqmx-danger-text:#7f1d1d;--aqmx-shadow:0 .0625rem .1875rem #0f172a21, 0 .3125rem .8125rem #0f172a14}.aqmx-root[data-aqmx-theme=dark]{--aqmx-surface:#0f172a;--aqmx-surface-raised:#1e293b;--aqmx-surface-sunken:#020617;--aqmx-border:#334155;--aqmx-border-strong:#64748b;--aqmx-text:#e2e8f0;--aqmx-text-muted:#94a3b8;--aqmx-accent:#93c5fd;--aqmx-accent-surface:#1e3a8a;--aqmx-tree-line:#94a3b8;--aqmx-tree-row-tint:#e2e8f00f;--aqmx-tree-row-accent-tint:#2563eb70;--aqmx-focus:#60a5fa;--aqmx-info-surface:#172554;--aqmx-info-border:#1d4ed8;--aqmx-info-text:#bfdbfe;--aqmx-warning-surface:#422006;--aqmx-warning-border:#a16207;--aqmx-warning-text:#fde68a;--aqmx-danger-surface:#450a0a;--aqmx-danger-border:#b91c1c;--aqmx-danger-text:#fecaca;--aqmx-shadow:0 .0625rem .1875rem #0000008c, 0 .3125rem .8125rem #00000057}@media (pointer:coarse){.aqmx-root{--aqmx-control:2.75rem}}@media (forced-colors:active){.aqmx-root.aqmx-root[data-aqmx-theme]{--aqmx-tree-line:CanvasText}}@media (prefers-reduced-motion:reduce){.aqmx-root{--aqmx-duration-1:0s;--aqmx-duration-2:0s;--aqmx-duration-3:0s;--aqmx-duration-4:0s}}.aqmx-root{block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);font-size:var(--aqmx-font-size-body);line-height:var(--aqmx-line-height-compact);flex-direction:column;display:flex;position:relative}.aqmx-root *,.aqmx-root :before,.aqmx-root :after{box-sizing:border-box}.aqmx-icon-button{inline-size:var(--aqmx-control);block-size:var(--aqmx-control);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease), color var(--aqmx-duration-2) var(--aqmx-ease);background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.aqmx-icon-button:hover{color:var(--aqmx-text);background:var(--aqmx-surface-sunken)}.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{color:var(--aqmx-accent);background:var(--aqmx-accent-surface)}.aqmx-icon-button:disabled{opacity:.382;cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]{cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]:hover{color:var(--aqmx-text-muted);background:0 0}.aqmx-icon-button>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-icon-button[aria-disabled=true]>svg{opacity:.382}.aqmx-root :focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:var(--aqmx-focus-ring-offset)}.aqmx-callout{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-info-border);border-radius:var(--aqmx-radius-l);color:var(--aqmx-info-text);background:var(--aqmx-info-surface);line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-callout[data-aqmx-tone=warning]{border-color:var(--aqmx-warning-border);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface)}.aqmx-callout[data-aqmx-tone=danger]{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-callout-title{font-size:var(--aqmx-font-size-title);font-weight:600;line-height:var(--aqmx-line-height-compact);margin:0}.aqmx-callout-body{margin:0}.aqmx-callout-action{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border:var(--aqmx-space-1) solid currentColor;border-radius:var(--aqmx-radius-m);color:inherit;font:inherit;cursor:pointer;background:0 0;justify-self:start;align-items:center;font-weight:600;text-decoration:none;display:inline-flex}.aqmx-progress{z-index:2;block-size:var(--aqmx-space-3);pointer-events:none;position:absolute;inset-block-start:0;inset-inline:0;overflow:hidden}.aqmx-progress:before{content:"";background:var(--aqmx-accent);inline-size:38.1966%;animation:aqmx-progress calc(var(--aqmx-duration-4) * 3) var(--aqmx-ease) infinite;position:absolute;inset-block:0}@keyframes aqmx-progress{0%{inset-inline-start:-38.1966%}to{inset-inline-start:100%}}.aqmx-empty{place-content:center;justify-items:center;gap:var(--aqmx-space-6);block-size:100%;padding:var(--aqmx-space-8);color:var(--aqmx-text-muted);text-align:center;line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-empty-title{color:var(--aqmx-text);font-size:var(--aqmx-font-size-title);margin:0;font-weight:600}.aqmx-skeleton{gap:var(--aqmx-space-6);padding:var(--aqmx-space-7);display:grid}.aqmx-skeleton>span{block-size:var(--aqmx-space-6);border-radius:var(--aqmx-radius-s);background:var(--aqmx-surface-sunken);animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite;display:block}.aqmx-skeleton>span:nth-child(3n+1){inline-size:61.8034%}.aqmx-skeleton>span:nth-child(3n+2){inline-size:100%}.aqmx-skeleton>span:nth-child(3n){inline-size:85.4102%}@keyframes aqmx-pulse{50%{opacity:.618}}.aqmx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.aqmx-toast{z-index:60;max-inline-size:min(34rem, calc(100% - var(--aqmx-space-8)));padding:var(--aqmx-space-5) var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-warning-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface);box-shadow:var(--aqmx-shadow);position:absolute;inset-block-start:var(--aqmx-space-6);inset-inline-end:var(--aqmx-space-7)}@media (prefers-reduced-motion:reduce){.aqmx-progress:before,.aqmx-skeleton>span{animation:none}}@media (forced-colors:active){.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-icon-button[aria-disabled=true]{color:graytext}.aqmx-root :focus-visible{outline-color:highlight}.aqmx-progress:before{forced-color-adjust:none;background:highlight}.aqmx-skeleton>span{forced-color-adjust:none;background:graytext}}.aqmx-explorer{gap:var(--aqmx-space-5);block-size:100%;min-block-size:0;min-inline-size:0;padding:var(--aqmx-space-4);color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow-y:auto}.aqmx-explorer-header{align-items:center;gap:var(--aqmx-space-4);min-block-size:var(--aqmx-control);flex-wrap:wrap;flex:none;display:flex}.aqmx-explorer-source{min-inline-size:min(100%,9rem);block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface-raised);font:inherit;text-overflow:ellipsis;cursor:pointer;flex:9rem}.aqmx-explorer-actions{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);flex-wrap:wrap;flex:0 auto;min-inline-size:0;margin-inline-start:auto;display:flex}.aqmx-explorer-body{gap:var(--aqmx-space-5);flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-labelled-button{gap:var(--aqmx-space-2);min-inline-size:var(--aqmx-control);inline-size:auto;padding-inline:var(--aqmx-space-3);white-space:nowrap;flex:0 auto;display:inline-flex}.aqmx-labelled-button>svg{flex:none}.aqmx-labelled-button>span{text-overflow:ellipsis;min-inline-size:0;overflow:hidden}.aqmx-explorer-refresh-failure,.aqmx-explorer-expand-all-stop{padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid;border-radius:var(--aqmx-radius-m);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;flex:none;margin:0}.aqmx-explorer-refresh-failure{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-explorer-expand-all-stop{border-color:var(--aqmx-info-border);color:var(--aqmx-info-text);background:var(--aqmx-info-surface)}.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}@keyframes aqmx-explorer-spin{to{rotate:1turn}}.aqmx-explorer-actions>.aqmx-icon-button[aria-busy=true]{cursor:progress}.aqmx-explorer-menu{z-index:50;gap:var(--aqmx-space-1);max-block-size:100%;inline-size:min(21rem,100%);padding:var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);display:grid;position:absolute;inset-block-start:0;inset-inline-end:0;overflow-y:auto}.aqmx-explorer-menu-item{align-items:center;gap:var(--aqmx-space-5);inline-size:100%;min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--aqmx-duration-1) var(--aqmx-ease);background:0 0;border:0;display:flex}.aqmx-explorer-menu-item:hover,.aqmx-explorer-menu-item:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-explorer-menu-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);color:var(--aqmx-text-muted);flex:none}.aqmx-explorer-menu-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;overflow:hidden}.aqmx-explorer-menu-value{color:var(--aqmx-accent);font-variant-numeric:tabular-nums;flex:none;font-weight:600}.aqmx-explorer-notices{gap:var(--aqmx-space-5);flex:none;display:grid}.aqmx-explorer-tree-area{min-block-size:calc(var(--aqmx-control) * 3);flex-direction:column;flex:1 1 0;min-inline-size:0;display:flex;position:relative}.aqmx-explorer-tree{flex:1 1 0;min-block-size:0;position:relative}.aqmx-explorer-tree-view{block-size:100%}.aqmx-explorer-tree-progress{z-index:1;align-items:center;gap:var(--aqmx-space-2) var(--aqmx-space-4);max-inline-size:calc(100% - var(--aqmx-space-5) * 3);padding:var(--aqmx-space-3) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;pointer-events:none;animation:aqmx-appear var(--aqmx-duration-2) ease-out var(--aqmx-delay-progress) both;flex-wrap:wrap;margin:0;display:flex;position:absolute;inset-block-end:var(--aqmx-space-9);inset-inline-start:var(--aqmx-space-5)}.aqmx-explorer-tree-progress-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite;flex:none}@keyframes aqmx-appear{0%{opacity:0}}.aqmx-explorer-tree-probe{inline-size:0;block-size:var(--aqmx-control);visibility:hidden;pointer-events:none;color:var(--aqmx-tree-line);forced-color-adjust:none;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-explorer-loading{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6) var(--aqmx-space-5);color:var(--aqmx-text-muted);display:grid}.aqmx-explorer-loading-text{margin:0}.aqmx-explorer-loading>.aqmx-skeleton{padding:0}.aqmx-explorer-tree-message{padding:var(--aqmx-space-5);overflow-y:auto}.aqmx-explorer-empty-icon{inline-size:var(--aqmx-space-8);block-size:var(--aqmx-space-8);color:var(--aqmx-border-strong)}.aqmx-explorer-empty-body{margin:0}.aqmx-explorer-tree [role=treeitem]{border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);transition:background-color var(--aqmx-duration-1) var(--aqmx-ease)}.aqmx-explorer-tree [role=treeitem]:hover{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint)}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint);box-shadow:inset var(--aqmx-space-2) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{color:var(--aqmx-accent);background:var(--aqmx-tree-row-accent-tint)}.aqmx-explorer-tree [role=treeitem]:focus-visible{outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible{box-shadow:inset calc(var(--aqmx-space-2) + var(--aqmx-focus-ring-width)) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{font-weight:600}.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite}.aqmx-explorer-tree [role=treeitem][data-aqmx-loop]{color:var(--aqmx-text-muted);font-style:italic}.aqmx-explorer-folder-failed{--aqmx-folder-name-floor:3em;align-items:center;min-inline-size:0;max-inline-size:100%;display:flex}.aqmx-explorer-folder-name{flex:10000 1 var(--aqmx-folder-name-floor);text-overflow:ellipsis;white-space:nowrap;min-inline-size:0;max-inline-size:max-content;overflow:hidden}.aqmx-explorer-folder-error{min-inline-size:0;color:var(--aqmx-danger-text);text-indent:var(--aqmx-space-4);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;overflow:hidden}.aqmx-explorer-folder-retry{flex:1000000 0 calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);min-inline-size:calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);max-inline-size:max-content;min-block-size:var(--aqmx-control);padding:0 var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-s);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);font:inherit;line-height:var(--aqmx-line-height-compact);cursor:pointer;justify-content:center;align-items:center;margin-inline-start:var(--aqmx-space-4);display:inline-flex;overflow:hidden}.aqmx-explorer-folder-retry:focus-visible{outline-offset:calc(-1 * (var(--aqmx-focus-ring-width) + var(--aqmx-space-1)))}.aqmx-explorer-folder-retry-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-explorer-folder-retry-text{min-inline-size:0;text-indent:var(--aqmx-space-3);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.aqmx-explorer-tray{gap:var(--aqmx-space-4);min-block-size:calc(var(--aqmx-control) + (var(--aqmx-space-5) + var(--aqmx-space-1)) * 2);padding:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);flex-direction:column;flex:0 auto;display:flex;overflow-y:auto}.aqmx-explorer-tray-header{justify-content:space-between;align-items:center;gap:var(--aqmx-space-5);flex:none;display:flex}.aqmx-explorer-tray-title{margin:0;font-weight:600}.aqmx-explorer-tray-button{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-m);color:var(--aqmx-accent);font:inherit;cursor:pointer;background:0 0;border:0;flex:none;font-weight:600}.aqmx-explorer-tray-button:hover{background:var(--aqmx-surface-sunken)}.aqmx-explorer-tray-list{gap:var(--aqmx-space-1);min-block-size:var(--aqmx-control);max-block-size:calc(var(--aqmx-control) * 3);flex:0 auto;margin:0;padding:0;list-style:none;display:grid;overflow-y:auto}.aqmx-explorer-tray-item{align-items:center;gap:var(--aqmx-space-4);display:flex}.aqmx-explorer-tray-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.aqmx-explorer-tray-open{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border-radius:var(--aqmx-radius-m);color:var(--aqmx-surface);background:var(--aqmx-accent);font:inherit;cursor:pointer;border:0;flex:none;font-weight:600}@media (forced-colors:active){.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true],.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true],.aqmx-explorer-menu-item[aria-checked=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-explorer-menu-item[aria-checked=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true] *{color:inherit!important}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]:focus-visible{outline-color:highlighttext}.aqmx-explorer-tray-button,.aqmx-explorer-tray-open,.aqmx-explorer-tray-remove{border:var(--aqmx-space-1) solid ButtonText}}@media (prefers-reduced-motion:reduce){.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg,.aqmx-explorer-tree-progress-icon,.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:none}.aqmx-explorer-tree-view{transition-duration:0s!important}}.aqmx-document{contain:layout paint;--aqmd-toolbar-inset-block-start:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow:hidden}.aqmx-document-viewer:has([data-aqmd-scroll-bar]){--aqmd-toolbar-inset-inline-end:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document [data-theme]{background-color:#0000!important}.aqmx-document .markdown-body :is(sup,sub) a{outline-offset:var(--aqmx-focus-ring-offset)!important}.aqmx-document *{scroll-margin:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document[aria-busy=true]>:not(.aqmx-progress){opacity:.618;transition:opacity var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-document-viewer{flex:1 1 0;min-block-size:0;min-inline-size:0}.aqmx-document-notice{margin:var(--aqmx-space-6) var(--aqmx-space-7) 0;overflow-wrap:anywhere;flex:none}.aqmx-document-scroll-row{flex:1 1 0;min-block-size:0}.aqmx-document-failure{min-block-size:0;padding:var(--aqmx-space-7);flex:1 1 0;overflow:auto}.aqmx-document-file{flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex}.aqmx-document-toolbar{align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3) var(--aqmx-space-6);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex-wrap:wrap;flex:none;display:flex}.aqmx-document-file-icon{color:var(--aqmx-text-muted);flex:none;display:inline-flex}.aqmx-document-file-icon>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-document-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-inline-size:0;font-weight:600;overflow:hidden}.aqmx-document-level{min-inline-size:var(--aqmx-space-9);color:var(--aqmx-text-muted);font-variant-numeric:tabular-nums;text-align:center;flex:none}.aqmx-document-canvas{min-block-size:0;padding:var(--aqmx-space-7);background-color:var(--aqmx-surface-sunken);background-image:radial-gradient(var(--aqmx-border) var(--aqmx-space-1), transparent var(--aqmx-space-1));background-size:var(--aqmx-space-6) var(--aqmx-space-6);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);display:grid;overflow:auto}.aqmx-document-image{margin:auto;display:block}.aqmx-document-image[data-aqmx-image-mode=fit]{object-fit:contain;max-block-size:100%;max-inline-size:100%}.aqmx-document-image[data-aqmx-image-mode=level]{max-block-size:none;max-inline-size:none}.aqmx-document-stage{min-block-size:0;padding:var(--aqmx-space-7);background:var(--aqmx-surface-sunken);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;display:grid;overflow:auto}.aqmx-document-file[data-aqmx-media-type=pdf] .aqmx-document-stage{place-items:stretch stretch;padding:0}.aqmx-document-video{border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface-raised);max-block-size:100%;max-inline-size:100%;box-shadow:var(--aqmx-shadow)}.aqmx-document-audio{inline-size:min(100%, var(--aqmx-column-measure))}.aqmx-document-frame{background:var(--aqmx-surface);border:0;block-size:100%;inline-size:100%}.aqmx-document-inert-link{color:var(--aqmx-text-muted);cursor:not-allowed;text-decoration-style:dotted}.aqmx-document[data-aqmx-document-flow=content]{contain:layout;block-size:auto;overflow:visible}.aqmx-document[data-aqmx-document-flow=content]>*,.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-file>*{flex:none}.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-frame{aspect-ratio:1/1.41421;block-size:auto}.aqmx-document-refresh-bar{flex-direction:column;flex:none;display:flex}.aqmx-document-refresh-row{padding:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));justify-content:flex-end;align-items:center;display:flex}.aqmx-document-refresh-failure{margin:0 var(--aqmx-space-3) var(--aqmx-space-2);padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere}.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}.aqmx-document-refresh-row>.aqmx-icon-button[aria-busy=true]{cursor:progress}@media (prefers-reduced-motion:reduce){.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:none}}.aqmx-multi-stage{--aqmx-multi-panel-body-floor:calc(3rem * var(--aqmx-line-height-prose));--aqdd-stage-padding-block:var(--aqmx-space-7);--aqdd-stage-padding-inline:var(--aqmx-space-6) calc(var(--aqmx-space-6) + var(--aqmx-multi-stage-bar-gutter));--aqdd-column-gap:var(--aqmx-space-6);--aqdd-panel-surface:var(--aqmx-surface);--aqdd-panel-border:var(--aqmx-border);--aqdd-panel-title-color:var(--aqmx-text);--aqdd-header-button-color:var(--aqmx-text-muted);--aqdd-header-button-hover-color:var(--aqmx-text);--aqdd-header-button-hover-surface:var(--aqmx-surface-sunken);--aqdd-custom-badge-color:var(--aqmx-warning-text);--aqdd-custom-badge-surface:var(--aqmx-warning-surface);--aqdd-restore-button-color:var(--aqmx-surface);--aqdd-restore-button-surface:var(--aqmx-accent);--aqdd-restore-button-hover-surface:var(--aqmx-info-text);--aqdd-drop-placeholder-color:var(--aqmx-accent);--aqdd-drop-placeholder-surface:var(--aqmx-surface);--aqdd-drop-placeholder-target-surface:var(--aqmx-accent-surface);background:var(--aqmx-surface-sunken);block-size:100%;min-block-size:0;min-inline-size:0;color:var(--aqmx-text);flex-direction:column;display:flex;position:relative}.aqmx-multi-stage:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-probe{inline-size:var(--aqmx-column-measure);visibility:hidden;pointer-events:none;block-size:0;font-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-multi-layout{flex:auto;min-block-size:0}.aqmx-multi-skeleton{grid-template-columns:repeat(auto-fit, minmax(min(100%, var(--aqmx-column-measure)), 1fr));align-content:start;gap:var(--aqmx-space-7);padding:var(--aqmx-space-7);display:grid;overflow:hidden}.aqmx-multi-skeleton-column{border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface)}.aqmx-multi-column{min-inline-size:0}.aqmx-multi-panel{outline:var(--aqmx-space-1) solid var(--aqmx-border-strong);outline-offset:0;color:var(--aqmx-text)}.aqmx-multi-panel[data-maximized]{outline-color:var(--aqmx-focus)}.aqmx-multi-panel-frame{content-visibility:auto;contain-intrinsic-block-size:auto var(--aqmx-space-9);min-block-size:100%}.aqmx-multi-panel-frame:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-panel-frame[data-aqmx-maximized=false]{-webkit-user-select:none;user-select:none}.aqmx-multi-panel-frame>.aqmx-document-refresh-bar{z-index:1;background:var(--aqmx-surface);position:sticky;inset-block-start:0}.aqmx-multi-panel-frame{--aqmx-multi-panel-pinned-block-size:0px}.aqmx-multi-panel-frame .aqmx-document *{scroll-margin-block-start:calc(var(--aqmx-multi-panel-pinned-block-size) + var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-multi-panel-frame .aqmx-document-toolbar>.aqmx-icon-button{flex-shrink:1;min-inline-size:0}.aqmx-multi-toast{animation:aqmx-multi-toast-in var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-multi-toast:popover-open{max-inline-size:min(34rem, calc(var(--aqmx-multi-toast-room) - var(--aqmx-space-8)));margin:0;position:fixed;inset:auto;inset-block-start:calc(var(--aqmx-multi-toast-block-start) + var(--aqmx-space-6));inset-inline-end:calc(var(--aqmx-multi-toast-inline-end) + var(--aqmx-space-7));overflow:visible}@keyframes aqmx-multi-toast-in{0%{opacity:0;translate:0 calc(var(--aqmx-space-5) * -1)}}@media (prefers-reduced-motion:reduce){.aqmx-multi-toast{animation:none}}@media (forced-colors:active){.aqmx-multi-stage:focus-visible,.aqmx-multi-stage :focus-visible,.aqmx-multi-panel[data-maximized]{outline-color:highlight}}.aqmx-split-frame{--aqmx-sheet-target:2.75rem;flex-direction:column;flex:auto;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-rem-probe{visibility:hidden;pointer-events:none;block-size:0;inline-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0}.aqmx-split{flex:auto;min-block-size:0}.aqmx-split-explorer,.aqmx-split-content{background:var(--aqmx-surface);min-block-size:0}.aqmx-split-explorer{background:var(--aqmx-surface-raised)}.aqmx-split-handle{background:var(--aqmx-surface-raised);transition:background-color var(--aqmx-duration-2) var(--aqmx-ease)}.aqmx-split-handle:hover,.aqmx-split-handle:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-sheet-bar{padding:var(--aqmx-space-3) var(--aqmx-space-5);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex:none;align-items:center;display:flex}.aqmx-sheet-toggle,.aqmx-sheet-close{justify-content:center;align-items:center;gap:var(--aqmx-space-5);min-inline-size:var(--aqmx-sheet-target);min-block-size:var(--aqmx-sheet-target);padding:0 var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface);font:inherit;cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease);display:inline-flex}.aqmx-sheet-close{z-index:1;color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);border-color:#0000;padding:0;position:relative}.aqmx-sheet-toggle:hover,.aqmx-sheet-close:hover{background:var(--aqmx-surface-sunken)}.aqmx-sheet-toggle>svg,.aqmx-sheet-close>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-sheet{inline-size:min(calc(100vw - var(--aqmx-space-9)), 21rem);border:0;border-inline-end:var(--aqmx-space-1) solid var(--aqmx-border);block-size:100dvh;max-block-size:none;max-inline-size:none;color:var(--aqmx-text);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);margin:0;padding:0;position:fixed;inset-block:0;inset-inline:0 auto}.aqmx-sheet::backdrop{background:#0f172a61}.aqmx-sheet-panel{flex-direction:column;block-size:100%;display:flex}.aqmx-sheet-header{z-index:1;justify-content:flex-end;align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);flex:none;display:flex;position:relative}.aqmx-sheet-notice-slot>.aqmx-toast{--aqmx-sheet-notice-band:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3) * 2);--aqmx-sheet-notice-line:calc(var(--aqmx-line-height-compact) * 1em);--aqmx-sheet-notice-inset:calc((var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-line)) / 2);z-index:0;max-inline-size:none;padding-block:var(--aqmx-sheet-notice-inset) 0;padding-inline:var(--aqmx-space-6) var(--aqmx-space-3);border:0;border-block-end:var(--aqmx-space-1) solid var(--aqmx-warning-border);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;box-shadow:none;border-radius:0;position:absolute;inset-block:0 auto;inset-inline:0}.aqmx-sheet-notice-slot>.aqmx-toast:before{content:"";float:inline-end;inline-size:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3));block-size:calc(var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1))}.aqmx-sheet-notice-slot>.aqmx-toast:after{content:"";block-size:calc(var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1));display:block}.aqmx-sheet-body{isolation:isolate;flex-direction:column;flex:auto;min-block-size:0;display:flex;position:relative;overflow:hidden}.aqmx-document-column{flex-direction:column;min-block-size:0;display:flex}.aqmx-document-column>.aqmx-document{flex:1 1 0;block-size:auto;min-block-size:0}.aqmx-single{flex:auto;position:relative}.aqmx-tree-document{block-size:100%;inline-size:100%}.aqmx-split-fallback,.aqmx-stage-fallback{background:var(--aqmx-surface-sunken);flex:auto;min-block-size:0}@media (forced-colors:active){.aqmx-sheet-toggle[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-sheet-toggle:focus-visible,.aqmx-sheet-close:focus-visible{outline-color:highlight}.aqmx-split-handle:focus-visible{outline:var(--aqmx-focus-ring-width) solid Highlight!important;outline-offset:calc(-1 * var(--aqmx-focus-ring-width))!important}}@media (prefers-reduced-motion:reduce){.aqmx-split-handle,.aqmx-split-handle *{transition-duration:0s!important}}}@layer utilities;
|
|
3
|
+
@layer theme,base;@layer components{.aqmx-root{--aqmx-space-1:.0625rem;--aqmx-space-2:.125rem;--aqmx-space-3:.1875rem;--aqmx-space-4:.3125rem;--aqmx-space-5:.5rem;--aqmx-space-6:.8125rem;--aqmx-space-7:1.3125rem;--aqmx-space-8:2.125rem;--aqmx-space-9:3.4375rem;--aqmx-control:2.125rem;--aqmx-focus-ring-width:var(--aqmx-space-2);--aqmx-focus-ring-offset:var(--aqmx-space-2);--aqmx-icon:1rem;--aqmx-radius-s:.3125rem;--aqmx-radius-m:.5rem;--aqmx-radius-l:.8125rem;--aqmx-duration-1:89ms;--aqmx-duration-2:.144s;--aqmx-duration-3:.233s;--aqmx-duration-4:.377s;--aqmx-delay-progress:.233s;--aqmx-ease:cubic-bezier(.2, 0, 0, 1);--aqmx-font-size-body:.8125rem;--aqmx-font-size-title:1rem;--aqmx-font-size-display:1.3125rem;--aqmx-line-height-compact:1.382;--aqmx-line-height-prose:1.618;--aqmx-column-measure:40ch;--aqmx-surface:#fff;--aqmx-surface-raised:#f8fafc;--aqmx-surface-sunken:#f1f5f9;--aqmx-border:#cbd5e1;--aqmx-border-strong:#94a3b8;--aqmx-text:#0f172a;--aqmx-text-muted:#475569;--aqmx-accent:#1d4ed8;--aqmx-accent-surface:#dbeafe;--aqmx-tree-line:#64748b;--aqmx-tree-row-tint:#0f172a0f;--aqmx-tree-row-accent-tint:#2563eb29;--aqmx-focus:#2563eb;--aqmx-info-surface:#eff6ff;--aqmx-info-border:#93c5fd;--aqmx-info-text:#1e3a8a;--aqmx-warning-surface:#fffbeb;--aqmx-warning-border:#fcd34d;--aqmx-warning-text:#78350f;--aqmx-danger-surface:#fef2f2;--aqmx-danger-border:#fca5a5;--aqmx-danger-text:#7f1d1d;--aqmx-shadow:0 .0625rem .1875rem #0f172a21, 0 .3125rem .8125rem #0f172a14}.aqmx-root[data-aqmx-theme=dark]{--aqmx-surface:#0f172a;--aqmx-surface-raised:#1e293b;--aqmx-surface-sunken:#020617;--aqmx-border:#334155;--aqmx-border-strong:#64748b;--aqmx-text:#e2e8f0;--aqmx-text-muted:#94a3b8;--aqmx-accent:#93c5fd;--aqmx-accent-surface:#1e3a8a;--aqmx-tree-line:#94a3b8;--aqmx-tree-row-tint:#e2e8f00f;--aqmx-tree-row-accent-tint:#2563eb70;--aqmx-focus:#60a5fa;--aqmx-info-surface:#172554;--aqmx-info-border:#1d4ed8;--aqmx-info-text:#bfdbfe;--aqmx-warning-surface:#422006;--aqmx-warning-border:#a16207;--aqmx-warning-text:#fde68a;--aqmx-danger-surface:#450a0a;--aqmx-danger-border:#b91c1c;--aqmx-danger-text:#fecaca;--aqmx-shadow:0 .0625rem .1875rem #0000008c, 0 .3125rem .8125rem #00000057}@media (pointer:coarse){.aqmx-root{--aqmx-control:2.75rem}}@media (forced-colors:active){.aqmx-root.aqmx-root[data-aqmx-theme]{--aqmx-tree-line:CanvasText}}@media (prefers-reduced-motion:reduce){.aqmx-root{--aqmx-duration-1:0s;--aqmx-duration-2:0s;--aqmx-duration-3:0s;--aqmx-duration-4:0s}}.aqmx-root{block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);font-size:var(--aqmx-font-size-body);line-height:var(--aqmx-line-height-compact);flex-direction:column;display:flex;position:relative}.aqmx-root *,.aqmx-root :before,.aqmx-root :after{box-sizing:border-box}.aqmx-icon-button{inline-size:var(--aqmx-control);block-size:var(--aqmx-control);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease), color var(--aqmx-duration-2) var(--aqmx-ease);background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.aqmx-icon-button:hover{color:var(--aqmx-text);background:var(--aqmx-surface-sunken)}.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{color:var(--aqmx-accent);background:var(--aqmx-accent-surface)}.aqmx-icon-button:disabled{opacity:.382;cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]{cursor:not-allowed}.aqmx-icon-button[aria-disabled=true]:hover{color:var(--aqmx-text-muted);background:0 0}.aqmx-icon-button>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-icon-button[aria-disabled=true]>svg{opacity:.382}.aqmx-root :focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:var(--aqmx-focus-ring-offset)}.aqmx-callout{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-info-border);border-radius:var(--aqmx-radius-l);color:var(--aqmx-info-text);background:var(--aqmx-info-surface);line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-callout[data-aqmx-tone=warning]{border-color:var(--aqmx-warning-border);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface)}.aqmx-callout[data-aqmx-tone=danger]{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-callout-title{font-size:var(--aqmx-font-size-title);font-weight:600;line-height:var(--aqmx-line-height-compact);margin:0}.aqmx-callout-body{margin:0}.aqmx-callout-action{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border:var(--aqmx-space-1) solid currentColor;border-radius:var(--aqmx-radius-m);color:inherit;font:inherit;cursor:pointer;background:0 0;justify-self:start;align-items:center;font-weight:600;text-decoration:none;display:inline-flex}.aqmx-progress{z-index:2;block-size:var(--aqmx-space-3);pointer-events:none;position:absolute;inset-block-start:0;inset-inline:0;overflow:hidden}.aqmx-progress:before{content:"";background:var(--aqmx-accent);inline-size:38.1966%;animation:aqmx-progress calc(var(--aqmx-duration-4) * 3) var(--aqmx-ease) infinite;position:absolute;inset-block:0}@keyframes aqmx-progress{0%{inset-inline-start:-38.1966%}to{inset-inline-start:100%}}.aqmx-empty{place-content:center;justify-items:center;gap:var(--aqmx-space-6);block-size:100%;padding:var(--aqmx-space-8);color:var(--aqmx-text-muted);text-align:center;line-height:var(--aqmx-line-height-prose);display:grid}.aqmx-empty-title{color:var(--aqmx-text);font-size:var(--aqmx-font-size-title);margin:0;font-weight:600}.aqmx-skeleton{gap:var(--aqmx-space-6);padding:var(--aqmx-space-7);display:grid}.aqmx-skeleton>span{block-size:var(--aqmx-space-6);border-radius:var(--aqmx-radius-s);background:var(--aqmx-surface-sunken);animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite;display:block}.aqmx-skeleton>span:nth-child(3n+1){inline-size:61.8034%}.aqmx-skeleton>span:nth-child(3n+2){inline-size:100%}.aqmx-skeleton>span:nth-child(3n){inline-size:85.4102%}@keyframes aqmx-pulse{50%{opacity:.618}}.aqmx-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.aqmx-toast{z-index:60;max-inline-size:min(34rem, calc(100% - var(--aqmx-space-8)));padding:var(--aqmx-space-5) var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-warning-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-warning-text);background:var(--aqmx-warning-surface);box-shadow:var(--aqmx-shadow);position:absolute;inset-block-start:var(--aqmx-space-6);inset-inline-end:var(--aqmx-space-7)}@media (prefers-reduced-motion:reduce){.aqmx-progress:before,.aqmx-skeleton>span{animation:none}}@media (forced-colors:active){.aqmx-icon-button[aria-pressed=true],.aqmx-icon-button[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-icon-button[aria-disabled=true]{color:graytext}.aqmx-root :focus-visible{outline-color:highlight}.aqmx-progress:before{forced-color-adjust:none;background:highlight}.aqmx-skeleton>span{forced-color-adjust:none;background:graytext}}.aqmx-explorer{gap:var(--aqmx-space-5);block-size:100%;min-block-size:0;min-inline-size:0;padding:var(--aqmx-space-4);color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow-y:auto}.aqmx-explorer-header{align-items:center;gap:var(--aqmx-space-4);min-block-size:var(--aqmx-control);flex-wrap:wrap;flex:none;display:flex}.aqmx-explorer-source{min-inline-size:min(100%,9rem);block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface-raised);font:inherit;text-overflow:ellipsis;cursor:pointer;flex:9rem}.aqmx-explorer-actions{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);flex-wrap:wrap;flex:0 auto;min-inline-size:0;margin-inline-start:auto;display:flex}.aqmx-explorer-body{gap:var(--aqmx-space-5);flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-labelled-button{gap:var(--aqmx-space-2);min-inline-size:var(--aqmx-control);inline-size:auto;padding-inline:var(--aqmx-space-3);white-space:nowrap;flex:0 auto;display:inline-flex}.aqmx-labelled-button>svg{flex:none}.aqmx-labelled-button>span{text-overflow:ellipsis;min-inline-size:0;overflow:hidden}.aqmx-explorer-refresh-failure,.aqmx-explorer-expand-all-stop{padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid;border-radius:var(--aqmx-radius-m);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;flex:none;margin:0}.aqmx-explorer-refresh-failure{border-color:var(--aqmx-danger-border);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface)}.aqmx-explorer-expand-all-stop{border-color:var(--aqmx-info-border);color:var(--aqmx-info-text);background:var(--aqmx-info-surface)}.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}@keyframes aqmx-explorer-spin{to{rotate:1turn}}.aqmx-explorer-actions>.aqmx-icon-button[aria-busy=true]{cursor:progress}.aqmx-explorer-menu{z-index:50;gap:var(--aqmx-space-1);max-block-size:100%;inline-size:min(21rem,100%);padding:var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);display:grid;position:absolute;inset-block-start:0;inset-inline-end:0;overflow-y:auto}.aqmx-explorer-menu-item{align-items:center;gap:var(--aqmx-space-5);inline-size:100%;min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);font:inherit;text-align:start;cursor:pointer;transition:background-color var(--aqmx-duration-1) var(--aqmx-ease);background:0 0;border:0;display:flex}.aqmx-explorer-menu-item:hover,.aqmx-explorer-menu-item:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-explorer-menu-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);color:var(--aqmx-text-muted);flex:none}.aqmx-explorer-menu-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;overflow:hidden}.aqmx-explorer-menu-value{color:var(--aqmx-accent);font-variant-numeric:tabular-nums;flex:none;font-weight:600}.aqmx-explorer-notices{gap:var(--aqmx-space-5);flex:none;display:grid}.aqmx-explorer-tree-area{min-block-size:calc(var(--aqmx-control) * 3);flex-direction:column;flex:1 1 0;min-inline-size:0;display:flex;position:relative}.aqmx-explorer-tree{flex:1 1 0;min-block-size:0;position:relative}.aqmx-explorer-tree-view{block-size:100%}.aqmx-explorer-tree-progress{z-index:1;align-items:center;gap:var(--aqmx-space-2) var(--aqmx-space-4);max-inline-size:calc(100% - var(--aqmx-space-5) * 3);padding:var(--aqmx-space-3) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;pointer-events:none;animation:aqmx-appear var(--aqmx-duration-2) ease-out var(--aqmx-delay-progress) both;flex-wrap:wrap;margin:0;display:flex;position:absolute;inset-block-end:var(--aqmx-space-9);inset-inline-start:var(--aqmx-space-5)}.aqmx-explorer-tree-progress-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite;flex:none}@keyframes aqmx-appear{0%{opacity:0}}.aqmx-explorer-tree-probe{inline-size:0;block-size:var(--aqmx-control);visibility:hidden;pointer-events:none;color:var(--aqmx-tree-line);forced-color-adjust:none;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-explorer-loading{gap:var(--aqmx-space-5);padding:var(--aqmx-space-6) var(--aqmx-space-5);color:var(--aqmx-text-muted);display:grid}.aqmx-explorer-loading-text{margin:0}.aqmx-explorer-loading>.aqmx-skeleton{padding:0}.aqmx-explorer-tree-message{padding:var(--aqmx-space-5);overflow-y:auto}.aqmx-explorer-empty-icon{inline-size:var(--aqmx-space-8);block-size:var(--aqmx-space-8);color:var(--aqmx-border-strong)}.aqmx-explorer-empty-body{margin:0}.aqmx-explorer-tree [role=treeitem]{border-radius:var(--aqmx-radius-s);color:var(--aqmx-text);transition:background-color var(--aqmx-duration-1) var(--aqmx-ease)}.aqmx-explorer-tree [role=treeitem]:hover{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint)}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]{color:var(--aqmx-text);background:var(--aqmx-tree-row-tint);box-shadow:inset var(--aqmx-space-2) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{color:var(--aqmx-accent);background:var(--aqmx-tree-row-accent-tint)}.aqmx-explorer-tree [role=treeitem]:focus-visible{outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible{box-shadow:inset calc(var(--aqmx-space-2) + var(--aqmx-focus-ring-width)) 0 0 currentColor}.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]{font-weight:600}.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:aqmx-pulse calc(var(--aqmx-duration-4) * 4) ease-in-out infinite}.aqmx-explorer-tree [role=treeitem][data-aqmx-loop]{color:var(--aqmx-text-muted);font-style:italic}.aqmx-explorer-folder-failed{--aqmx-folder-name-floor:3em;align-items:center;min-inline-size:0;max-inline-size:100%;display:flex}.aqmx-explorer-folder-name{flex:10000 1 var(--aqmx-folder-name-floor);text-overflow:ellipsis;white-space:nowrap;min-inline-size:0;max-inline-size:max-content;overflow:hidden}.aqmx-explorer-folder-error{min-inline-size:0;color:var(--aqmx-danger-text);text-indent:var(--aqmx-space-4);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;overflow:hidden}.aqmx-explorer-folder-retry{flex:1000000 0 calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);min-inline-size:calc(var(--aqmx-icon) + (var(--aqmx-space-3) + var(--aqmx-space-1)) * 2);max-inline-size:max-content;min-block-size:var(--aqmx-control);padding:0 var(--aqmx-space-3);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-s);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);font:inherit;line-height:var(--aqmx-line-height-compact);cursor:pointer;justify-content:center;align-items:center;margin-inline-start:var(--aqmx-space-4);display:inline-flex;overflow:hidden}.aqmx-explorer-folder-retry:focus-visible{outline-offset:calc(-1 * (var(--aqmx-focus-ring-width) + var(--aqmx-space-1)))}.aqmx-explorer-folder-retry-icon{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-explorer-folder-retry-text{min-inline-size:0;text-indent:var(--aqmx-space-3);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.aqmx-explorer-tray{gap:var(--aqmx-space-4);min-block-size:calc(var(--aqmx-control) + (var(--aqmx-space-5) + var(--aqmx-space-1)) * 2);padding:var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);flex-direction:column;flex:0 auto;display:flex;overflow-y:auto}.aqmx-explorer-tray-header{justify-content:space-between;align-items:center;gap:var(--aqmx-space-5);flex:none;display:flex}.aqmx-explorer-tray-title{margin:0;font-weight:600}.aqmx-explorer-tray-button{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-5);border-radius:var(--aqmx-radius-m);color:var(--aqmx-accent);font:inherit;cursor:pointer;background:0 0;border:0;flex:none;font-weight:600}.aqmx-explorer-tray-button:hover{background:var(--aqmx-surface-sunken)}.aqmx-explorer-tray-list{gap:var(--aqmx-space-1);min-block-size:var(--aqmx-control);max-block-size:calc(var(--aqmx-control) * 3);flex:0 auto;margin:0;padding:0;list-style:none;display:grid;overflow-y:auto}.aqmx-explorer-tray-item{align-items:center;gap:var(--aqmx-space-4);display:flex}.aqmx-explorer-tray-name{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-inline-size:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.aqmx-explorer-tray-open{min-block-size:var(--aqmx-control);padding-inline:var(--aqmx-space-6);border-radius:var(--aqmx-radius-m);color:var(--aqmx-surface);background:var(--aqmx-accent);font:inherit;cursor:pointer;border:0;flex:none;font-weight:600}@media (forced-colors:active){.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true],.aqmx-explorer-tree [role=treeitem][data-entry-selected=true],.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true],.aqmx-explorer-menu-item[aria-checked=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-explorer-menu-item[aria-checked=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true] *,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true] *{color:inherit!important}.aqmx-explorer-tree [role=treeitem][data-entry-item-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-entry-selected=true]:focus-visible,.aqmx-explorer-tree [role=treeitem][data-aqmx-open=true]:focus-visible{outline-color:highlighttext}.aqmx-explorer-tray-button,.aqmx-explorer-tray-open,.aqmx-explorer-tray-remove{border:var(--aqmx-space-1) solid ButtonText}}@media (prefers-reduced-motion:reduce){.aqmx-explorer-actions>.aqmx-labelled-button[data-aqmx-busy=true]>svg,.aqmx-explorer-tree-progress-icon,.aqmx-explorer-tree [role=treeitem][data-aqmx-children=loading]{animation:none}.aqmx-explorer-tree-view{transition-duration:0s!important}}.aqmx-document{contain:layout paint;--aqmd-toolbar-inset-block-start:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));block-size:100%;min-block-size:0;inline-size:100%;min-inline-size:0;color:var(--aqmx-text);background:var(--aqmx-surface);flex-direction:column;display:flex;position:relative;overflow:hidden}.aqmx-document-viewer:has([data-aqmd-scroll-bar]){--aqmd-toolbar-inset-inline-end:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document [data-theme]{background-color:#0000!important}.aqmx-document .markdown-body :is(sup,sub) a{outline-offset:var(--aqmx-focus-ring-offset)!important}.aqmx-document *{scroll-margin:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-document[aria-busy=true]>:not(.aqmx-progress){opacity:.618;transition:opacity var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-document-viewer{flex:1 1 0;min-block-size:0;min-inline-size:0}.aqmx-document-notice{margin:var(--aqmx-space-6) var(--aqmx-space-7) 0;overflow-wrap:anywhere;flex:none}.aqmx-document-scroll-row{flex:1 1 0;min-block-size:0}.aqmx-document-failure{min-block-size:0;padding:var(--aqmx-space-7);flex:1 1 0;overflow:auto}.aqmx-document-file{flex-direction:column;flex:1 1 0;min-block-size:0;min-inline-size:0;display:flex}.aqmx-document-toolbar{align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3) var(--aqmx-space-6);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex-wrap:wrap;flex:none;display:flex}.aqmx-document-file-icon{color:var(--aqmx-text-muted);flex:none;display:inline-flex}.aqmx-document-file-icon>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon)}.aqmx-document-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-inline-size:0;font-weight:600;overflow:hidden}.aqmx-document-level{min-inline-size:var(--aqmx-space-9);color:var(--aqmx-text-muted);font-variant-numeric:tabular-nums;text-align:center;flex:none}.aqmx-document-canvas{min-block-size:0;padding:var(--aqmx-space-7);background-color:var(--aqmx-surface-sunken);background-image:radial-gradient(var(--aqmx-border) var(--aqmx-space-1), transparent var(--aqmx-space-1));background-size:var(--aqmx-space-6) var(--aqmx-space-6);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);display:grid;overflow:auto}.aqmx-document-image{margin:auto;display:block}.aqmx-document-image[data-aqmx-image-mode=fit]{object-fit:contain;max-block-size:100%;max-inline-size:100%}.aqmx-document-image[data-aqmx-image-mode=level]{max-block-size:none;max-inline-size:none}.aqmx-document-stage{min-block-size:0;padding:var(--aqmx-space-7);background:var(--aqmx-surface-sunken);flex:1 1 0;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;display:grid;overflow:auto}.aqmx-document-file[data-aqmx-media-type=pdf] .aqmx-document-stage{place-items:stretch stretch;padding:0}.aqmx-document-video{border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface-raised);max-block-size:100%;max-inline-size:100%;box-shadow:var(--aqmx-shadow)}.aqmx-document-audio{inline-size:min(100%, var(--aqmx-column-measure))}.aqmx-document-frame{background:var(--aqmx-surface);border:0;block-size:100%;inline-size:100%}.aqmx-document-inert-link{color:var(--aqmx-text-muted);cursor:not-allowed;text-decoration-style:dotted}.aqmx-document[data-aqmx-document-flow=content]{contain:layout;block-size:auto;overflow:visible}.aqmx-document[data-aqmx-document-flow=content]>*,.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-file>*{flex:none}.aqmx-document[data-aqmx-document-flow=content] .aqmx-document-frame{aspect-ratio:1/1.41421;block-size:auto}.aqmx-document-refresh-bar{flex-direction:column;flex:none;display:flex}.aqmx-document-refresh-row{justify-content:flex-end;align-items:center;gap:var(--aqmx-space-2);padding:calc(var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset));display:flex}.aqmx-document-refresh-failure{margin:0 var(--aqmx-space-3) var(--aqmx-space-2);padding:var(--aqmx-space-4) var(--aqmx-space-5);border:var(--aqmx-space-1) solid var(--aqmx-danger-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-danger-text);background:var(--aqmx-danger-surface);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere}.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:aqmx-explorer-spin calc(var(--aqmx-duration-4) * 3) linear infinite}.aqmx-document-refresh-row>.aqmx-icon-button[aria-busy=true]{cursor:progress}@media (prefers-reduced-motion:reduce){.aqmx-document-refresh-row>.aqmx-icon-button[data-aqmx-busy=true]>svg{animation:none}}.aqmx-multi-stage{--aqmx-multi-panel-body-floor:calc(3rem * var(--aqmx-line-height-prose));--aqdd-stage-padding-block:var(--aqmx-space-7);--aqdd-stage-padding-inline:var(--aqmx-space-6) calc(var(--aqmx-space-6) + var(--aqmx-multi-stage-bar-gutter));--aqdd-column-gap:var(--aqmx-space-6);--aqdd-panel-surface:var(--aqmx-surface);--aqdd-panel-border:var(--aqmx-border);--aqdd-panel-title-color:var(--aqmx-text);--aqdd-header-button-color:var(--aqmx-text-muted);--aqdd-header-button-hover-color:var(--aqmx-text);--aqdd-header-button-hover-surface:var(--aqmx-surface-sunken);--aqdd-custom-badge-color:var(--aqmx-warning-text);--aqdd-custom-badge-surface:var(--aqmx-warning-surface);--aqdd-restore-button-color:var(--aqmx-surface);--aqdd-restore-button-surface:var(--aqmx-accent);--aqdd-restore-button-hover-surface:var(--aqmx-info-text);--aqdd-drop-placeholder-color:var(--aqmx-accent);--aqdd-drop-placeholder-surface:var(--aqmx-surface);--aqdd-drop-placeholder-target-surface:var(--aqmx-accent-surface);background:var(--aqmx-surface-sunken);block-size:100%;min-block-size:0;min-inline-size:0;color:var(--aqmx-text);flex-direction:column;display:flex;position:relative}.aqmx-multi-stage:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-probe{inline-size:var(--aqmx-column-measure);visibility:hidden;pointer-events:none;block-size:0;font-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.aqmx-multi-layout{flex:auto;min-block-size:0}.aqmx-multi-skeleton{grid-template-columns:repeat(auto-fit, minmax(min(100%, var(--aqmx-column-measure)), 1fr));align-content:start;gap:var(--aqmx-space-7);padding:var(--aqmx-space-7);display:grid;overflow:hidden}.aqmx-multi-skeleton-column{border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-l);background:var(--aqmx-surface)}.aqmx-multi-column{min-inline-size:0}.aqmx-multi-panel{outline:var(--aqmx-space-1) solid var(--aqmx-border-strong);outline-offset:0;color:var(--aqmx-text)}.aqmx-multi-panel[data-maximized]{outline-color:var(--aqmx-focus)}.aqmx-multi-panel-frame{content-visibility:auto;contain-intrinsic-block-size:auto var(--aqmx-space-9);min-block-size:100%}.aqmx-multi-panel-frame:focus-visible{outline:var(--aqmx-focus-ring-width) solid var(--aqmx-focus);outline-offset:calc(-1 * var(--aqmx-focus-ring-width))}.aqmx-multi-panel-frame[data-aqmx-maximized=false]{-webkit-user-select:none;user-select:none}.aqmx-multi-panel-frame>.aqmx-document-refresh-bar{z-index:1;background:var(--aqmx-surface);position:sticky;inset-block-start:0}.aqmx-multi-panel-frame{--aqmx-multi-panel-pinned-block-size:0px}.aqmx-multi-panel-frame .aqmx-document *{scroll-margin-block-start:calc(var(--aqmx-multi-panel-pinned-block-size) + var(--aqmx-focus-ring-width) + var(--aqmx-focus-ring-offset))}.aqmx-multi-panel-frame .aqmx-document-toolbar>.aqmx-icon-button{flex-shrink:1;min-inline-size:0}.aqmx-multi-toast{animation:aqmx-multi-toast-in var(--aqmx-duration-3) var(--aqmx-ease)}.aqmx-multi-toast:popover-open{max-inline-size:min(34rem, calc(var(--aqmx-multi-toast-room) - var(--aqmx-space-8)));margin:0;position:fixed;inset:auto;inset-block-start:calc(var(--aqmx-multi-toast-block-start) + var(--aqmx-space-6));inset-inline-end:calc(var(--aqmx-multi-toast-inline-end) + var(--aqmx-space-7));overflow:visible}@keyframes aqmx-multi-toast-in{0%{opacity:0;translate:0 calc(var(--aqmx-space-5) * -1)}}@media (prefers-reduced-motion:reduce){.aqmx-multi-toast{animation:none}}@media (forced-colors:active){.aqmx-multi-stage:focus-visible,.aqmx-multi-stage :focus-visible,.aqmx-multi-panel[data-maximized]{outline-color:highlight}}.aqmx-split-frame{--aqmx-sheet-target:2.75rem;flex-direction:column;flex:auto;min-block-size:0;min-inline-size:0;display:flex;position:relative}.aqmx-rem-probe{visibility:hidden;pointer-events:none;block-size:0;inline-size:1rem;position:absolute;inset-block-start:0;inset-inline-start:0}.aqmx-split{flex:auto;min-block-size:0}.aqmx-split-explorer,.aqmx-split-content{background:var(--aqmx-surface);min-block-size:0}.aqmx-split-explorer{background:var(--aqmx-surface-raised)}.aqmx-split-handle{background:var(--aqmx-surface-raised);transition:background-color var(--aqmx-duration-2) var(--aqmx-ease)}.aqmx-split-handle:hover,.aqmx-split-handle:focus-visible{background:var(--aqmx-surface-sunken)}.aqmx-sheet-bar{padding:var(--aqmx-space-3) var(--aqmx-space-5);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);background:var(--aqmx-surface-raised);flex:none;align-items:center;display:flex}.aqmx-sheet-toggle,.aqmx-sheet-close{justify-content:center;align-items:center;gap:var(--aqmx-space-5);min-inline-size:var(--aqmx-sheet-target);min-block-size:var(--aqmx-sheet-target);padding:0 var(--aqmx-space-6);border:var(--aqmx-space-1) solid var(--aqmx-border);border-radius:var(--aqmx-radius-m);color:var(--aqmx-text);background:var(--aqmx-surface);font:inherit;cursor:pointer;transition:background-color var(--aqmx-duration-2) var(--aqmx-ease);display:inline-flex}.aqmx-sheet-close{z-index:1;color:var(--aqmx-text-muted);background:var(--aqmx-surface-raised);border-color:#0000;padding:0;position:relative}.aqmx-sheet-toggle:hover,.aqmx-sheet-close:hover{background:var(--aqmx-surface-sunken)}.aqmx-sheet-toggle>svg,.aqmx-sheet-close>svg{inline-size:var(--aqmx-icon);block-size:var(--aqmx-icon);flex:none}.aqmx-sheet{inline-size:min(calc(100vw - var(--aqmx-space-9)), 21rem);border:0;border-inline-end:var(--aqmx-space-1) solid var(--aqmx-border);block-size:100dvh;max-block-size:none;max-inline-size:none;color:var(--aqmx-text);background:var(--aqmx-surface-raised);box-shadow:var(--aqmx-shadow);margin:0;padding:0;position:fixed;inset-block:0;inset-inline:0 auto}.aqmx-sheet::backdrop{background:#0f172a61}.aqmx-sheet-panel{flex-direction:column;block-size:100%;display:flex}.aqmx-sheet-header{z-index:1;justify-content:flex-end;align-items:center;gap:var(--aqmx-space-3);padding:var(--aqmx-space-3);border-block-end:var(--aqmx-space-1) solid var(--aqmx-border);flex:none;display:flex;position:relative}.aqmx-sheet-notice-slot>.aqmx-toast{--aqmx-sheet-notice-band:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3) * 2);--aqmx-sheet-notice-line:calc(var(--aqmx-line-height-compact) * 1em);--aqmx-sheet-notice-inset:calc((var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-line)) / 2);z-index:0;max-inline-size:none;padding-block:var(--aqmx-sheet-notice-inset) 0;padding-inline:var(--aqmx-space-6) var(--aqmx-space-3);border:0;border-block-end:var(--aqmx-space-1) solid var(--aqmx-warning-border);line-height:var(--aqmx-line-height-compact);overflow-wrap:anywhere;box-shadow:none;border-radius:0;position:absolute;inset-block:0 auto;inset-inline:0}.aqmx-sheet-notice-slot>.aqmx-toast:before{content:"";float:inline-end;inline-size:calc(var(--aqmx-sheet-target) + var(--aqmx-space-3));block-size:calc(var(--aqmx-sheet-notice-band) - var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1))}.aqmx-sheet-notice-slot>.aqmx-toast:after{content:"";block-size:calc(var(--aqmx-sheet-notice-inset) - var(--aqmx-space-1));display:block}.aqmx-sheet-body{isolation:isolate;flex-direction:column;flex:auto;min-block-size:0;display:flex;position:relative;overflow:hidden}.aqmx-document-column{flex-direction:column;min-block-size:0;display:flex}.aqmx-document-column>.aqmx-document{flex:1 1 0;block-size:auto;min-block-size:0}.aqmx-single{flex:auto;position:relative}.aqmx-tree-document{block-size:100%;inline-size:100%}.aqmx-split-fallback,.aqmx-stage-fallback{background:var(--aqmx-surface-sunken);flex:auto;min-block-size:0}@media (forced-colors:active){.aqmx-sheet-toggle[aria-expanded=true]{forced-color-adjust:none;color:highlighttext;background:highlight}.aqmx-sheet-toggle:focus-visible,.aqmx-sheet-close:focus-visible{outline-color:highlight}.aqmx-split-handle:focus-visible{outline:var(--aqmx-focus-ring-width) solid Highlight!important;outline-offset:calc(-1 * var(--aqmx-focus-ring-width))!important}}@media (prefers-reduced-motion:reduce){.aqmx-split-handle,.aqmx-split-handle *{transition-duration:0s!important}}}@layer utilities;
|
|
@@ -18,7 +18,8 @@ Tests and host styling may rely on the `data-testid` values and `data-aqmx-*` at
|
|
|
18
18
|
| `data-testid="markdown-explorer-sheet-announcer"` | The sheet's polite live region (`role="status"`), inside the dialog | Holds the announcements while the sheet is open (the modal dialog hides the root's region), with the same text as the root's region would; empty while the sheet is closed and when it opens |
|
|
19
19
|
| `data-testid="markdown-explorer-split-loading"` | Placeholder while the tree view's code loads | |
|
|
20
20
|
| `data-testid="markdown-explorer-single"` | Single view frame | |
|
|
21
|
-
| `data-testid="markdown-explorer-document-refresh-bar"` | The document refresh bar | In the tree and single views, above the document region (the button at its inline end; absent while the tree view shows no document); in the multi view, the first row of each panel's body, inside the panel's scroll area and pinned (sticky) to its top while the document scrolls under it. Holds the button row and, below it, the failure notice |
|
|
21
|
+
| `data-testid="markdown-explorer-document-refresh-bar"` | The document refresh bar | In the tree and single views, above the document region (the button at its inline end; absent while the tree view shows no document); in the multi view, the first row of each panel's body, inside the panel's scroll area and pinned (sticky) to its top while the document scrolls under it. Holds the button row (the Source toggle while the document is Markdown, then the Refresh document button) and, below it, the failure notice |
|
|
22
|
+
| `data-testid="markdown-explorer-document-markup"` | The Source toggle, in the bar before Refresh document | Shown only while the bar's document is a loaded Markdown document. A toggle button: `aria-pressed="true"` while the document shows as written (its source), `"false"` while it shows rendered; a press switches the reader's choice for that document, which every view follows while the explorer is open and which is never saved. The page views name it by its visible label (`showMarkupLabel`; tooltip `showMarkup`); a panel's is icon-only, with `aria-label` and `title` set to `showMarkupNamed` (the panel title) |
|
|
22
23
|
| `data-testid="markdown-explorer-document-refresh"` | The Refresh document button, in the bar | Reads that document alone again past the host's caches. The page views name it by its visible label (`refreshDocumentLabel`; tooltip `refreshDocument`); a panel's is icon-only, with `aria-label` and `title` set to `refreshDocumentNamed` (the panel title). Carries `aria-busy="true"` and `data-aqmx-busy="true"` while it runs, and `aria-disabled="true"` then and while the document loads (never `disabled`) |
|
|
23
24
|
| `data-testid="markdown-explorer-document-refresh-failure"` | Notice of a document refresh that failed, inside the bar below its button row | No live role (the announcer speaks the same text); carries `data-aqmx-failure` (the reason). Shown while the copy of the document it kept stays on screen: a newer answer that replaces or confirms that copy, a move to another document (it does not come back on return) and that control's next refresh take it down |
|
|
24
25
|
| `data-aqmx-key-repeat="allow"` | A control inside the explorer, or an element around controls | Opts the control (or every control inside the element) in to the key repeat of a held Enter, which the explorer otherwise ignores: a press of Enter that began on the control keeps activating it once per repeat while the focus stays there, and a press that began elsewhere and handed the focus to it does not (see [Held keys](layout.md#held-keys)); the explorer sets it on Zoom in and Zoom out |
|
|
@@ -57,12 +58,14 @@ The tree is named by `treeRegion`, apart from the explorer `nav` (`explorerRegio
|
|
|
57
58
|
|
|
58
59
|
| Hook | Element | Meaning |
|
|
59
60
|
| --- | --- | --- |
|
|
60
|
-
| `data-testid="markdown-explorer-document"` | Document region (`role="region"`) | Carries `data-aqmx-document-kind`: `empty`, `loading`, `markdown`, `text`, `image`, `media`, `file` or `failure`. Named by `documentRegion` in the tree and single views, and in a multi-view panel by the document's name (the last segment of its path before it loads and for a failure). Not focusable: after a click in a document's text, PageDown, the arrow keys, Space, Home and End scroll the document |
|
|
61
|
+
| `data-testid="markdown-explorer-document"` | Document region (`role="region"`) | Carries `data-aqmx-document-kind`: `empty`, `loading`, `markdown`, `text`, `image`, `media`, `file` or `failure`. A Markdown document's region also carries `data-aqmx-document-view`: `rendered`, or `markup` while it shows as written (the Source toggle). Named by `documentRegion` in the tree and single views, and in a multi-view panel by the document's name (the last segment of its path before it loads and for a failure). Not focusable: after a click in a document's text, PageDown, the arrow keys, Space, Home and End scroll the document |
|
|
61
62
|
| `data-testid="markdown-explorer-document-empty"` | No document selected | |
|
|
62
63
|
| `data-testid="markdown-explorer-document-skeleton"` | Placeholder while a pane has no document to show yet (its first document, or one the server gave up on) | The region carries `aria-busy="true"` |
|
|
63
64
|
| `data-testid="markdown-explorer-document-progress"` | Progress bar while the next document (or a fresh copy of a failed one) loads over the one still shown | The region carries `aria-busy="true"` meanwhile, also during router navigations |
|
|
64
65
|
| `data-testid="markdown-explorer-document-failure"` | Document failure | Carries `data-aqmx-failure` (the reason); its callout has no role in every view (tree, single and multi-view panels): the announcer speaks the failure (`documentFailed`), once for each failed attempt |
|
|
65
|
-
| `data-testid="markdown-explorer-text-truncated"` | Notice under a cut text preview | |
|
|
66
|
+
| `data-testid="markdown-explorer-text-truncated"` | Notice under a cut text preview, or a cut source of a Markdown document shown as written | |
|
|
67
|
+
| `data-testid="markdown-explorer-markup-skeleton"` | Placeholder while the source of a Markdown document shown as written loads (until its first answer) | Hidden from assistive technology; the region holds the screen-reader text `markupLoading` beside it |
|
|
68
|
+
| `data-testid="markdown-explorer-markup-failure"` | Failure to read the source of a Markdown document shown as written | Carries `data-aqmx-failure` (the reason); its callout has no role: the announcer speaks the failure (`documentFailed`), once for each answer. A `failed` read offers Try again (`retry`) |
|
|
66
69
|
| `data-testid="markdown-explorer-image-view"` | Image viewer | |
|
|
67
70
|
| `data-testid="markdown-explorer-image-canvas"` | The image's scroll area | The element that scrolls. In the tree and single views it sits in `@aiquants/markdown`'s HostedScrollArea row (`data-aqmd-scroll-row`, inside its clipping cell `data-aqmd-scroll-clip`), whose bar slot (`data-aqmd-scroll-bar`) holds the explorer's pointer scroll bar; so do a medium's and a file view's stage and the failure view (`data-aqmx-document-scroller`). In a multi-view panel they have no row |
|
|
68
71
|
| `data-testid="markdown-explorer-image"` | The image (`img`) | Carries `data-aqmx-image-mode` (`fit` / `level`) |
|
package/docs/behavior/layout.md
CHANGED
|
@@ -139,6 +139,12 @@ Documents in the multi-panel view sit in `multiView.columns` logical columns (4
|
|
|
139
139
|
The region itself never takes focus, and focus outside the region, focus that was never in it, and focus the reader moved away from it are never taken. The reader moves it away by moving it to an element or into a frame outside the region, or by pressing anywhere outside the region — whenever the press happens, also after the focus had already fallen to the page, and whether or not the press moves the focus — unless the focus stays inside the region (a press whose default action the page prevented).
|
|
140
140
|
Focus that fell from the region to the page while the reader stayed with it (a press on the document's text, the browser's own fragment navigation, the focused content removed, the window losing the focus to another window or application) counts as inside.
|
|
141
141
|
So does focus in a frame inside the region (a PDF document's frame, an embedded frame of `iframeHosts`), also when it entered the frame straight from outside the region (a click from the tree, Tab), and a press outside the region moves it away from there as well.
|
|
142
|
+
- **Source of a Markdown document.** While the bar's document is a loaded Markdown document, the bar's button row holds a Source toggle before Refresh document: a toggle button (`aria-pressed`) labelled like its neighbour — visible text beside a page view's pane (`showMarkupLabel`, «Source» / 「ソース」, its accessible name; its tooltip is `showMarkup`), icon-only in a panel and named after the panel's document (`showMarkupNamed`, «Source of a.md» / 「a.md のソース」).
|
|
143
|
+
An image, media, text or file document and a failure show no toggle, and neither does a document still loading, which gets it once it is there.
|
|
144
|
+
Pressing it shows the document as written instead of rendered, in place and without moving the focus from the toggle: the pane reads the document's file through the data route's `text` operation (only once the toggle is pressed) and shows the text the way it shows a text file — the file header with Open and Download, the note `textTruncated` when the server cut the file at its `textMaxBytes`, and the text, which wraps and is never interpreted.
|
|
145
|
+
Until the first answer the region shows a skeleton (`markupLoading` for screen readers); a failure shows the failure callout, with Try again for a `failed` read, and is announced once (`documentFailed`), like a document's.
|
|
146
|
+
Every new answer for the document — Refresh document, Refresh tree, a background revalidation — reads the text again, the previous text staying on screen meanwhile. The next press shows the document rendered again.
|
|
147
|
+
The choice belongs to the reader and to the document, not to the view: every view that shows the document (the tree and single views' pane, a multi-view panel) shows it the same way, a document the reader comes back to keeps it, another document shows rendered until the reader chooses its source, and nothing is saved, so a reload (or another reader) starts with every document rendered. The region tells which way a Markdown document shows with `data-aqmx-document-view` (`rendered` / `markup`).
|
|
142
148
|
|
|
143
149
|
## Switching views
|
|
144
150
|
|
|
@@ -16,6 +16,8 @@ This page is part of the host-facing contract of `@aiquants/markdown-explorer`;
|
|
|
16
16
|
- `treeRegion` names the tree itself, apart from `explorerRegion`, which names the explorer's landmark (and the sheet on narrow frames).
|
|
17
17
|
- `refreshTreeLabel` is the visible text of the explorer's Refresh tree button and `refreshDocumentLabel` that of the page views' (tree and single) Refresh document button, each also its button's accessible name; `refreshTree` and `refreshDocument` are their tooltips.
|
|
18
18
|
A multi-view panel's Refresh document is icon-only, and `refreshDocumentNamed(name)` (the panel title) is its accessible name and its tooltip. A successful reload is announced with `treeRefreshed` or `documentRefreshed(name)`. A failed one is shown with `treeRefreshFailed(reason)` (an alert in the explorer) or `documentRefreshFailed(reason)` (a notice, which the announcer also speaks), where `reason` is the failure's title (the matching `failure…Title` label).
|
|
19
|
+
- `showMarkupLabel` is the visible text of the page views' Source toggle beside Refresh document (shown for a Markdown document), also its accessible name, and `showMarkup` its tooltip; a multi-view panel's toggle is icon-only, and `showMarkupNamed(name)` (the panel title) is its accessible name and its tooltip.
|
|
20
|
+
The toggle's pressed state, not its name, tells whether the source shows. `markupLoading` is the screen-reader text while the source loads; a source that cannot be read is announced with `documentFailed(name, title)`, like a document, and a cut source shows `textTruncated`, like a cut text file.
|
|
19
21
|
- `switchToTree` and `switchToMulti` name their destination with the README's view names ("Open in the tree view" / "ツリービューで開く", "Open in the multi-panel view" / "マルチビューで開く"); no label names the single view, which no control inside the explorer opens.
|
|
20
22
|
|
|
21
23
|
## Overrides
|
|
@@ -33,7 +35,8 @@ const HANDBOOK_LABELS = {
|
|
|
33
35
|
|
|
34
36
|
- Strings that embed a value are functions — `foldersLoadFailedNamed(names)` (the announcement of the folders whose children failed to load within one frame, named in one sentence with the language's list format;
|
|
35
37
|
`folderLoadFailed` is the text shown in a row), `announcementSequence(messages)` (the live region's text for two or more messages announced within one frame, as separate sentences), `selectionTitle(count)`, `openSelectionInMulti(count)`, `removeFromSelection(name)`, `expandIconSizeValue(pixels)`, `settingAnnouncement(setting, value)`, `documentShown(name)`, `foldersLoading(count)` (the tree's progress line: the source's folder listings queued or in flight), `expandAllProgress(opened, loading)` (the progress line during an Expand all press), `expandAllDone(opened, failed, complete)` (the end of a press that no limit stopped; `complete` is whether every folder is open at the end, false when the reader closed one during the press, so the sentence then claims nothing about the rest; nothing opened, nothing failed and complete means every folder was already open), `expandAllFolderLimit(opened, limit, expandAll)` (a press stopped at `expandAll.maxFolders`; `expandAll` is the Expand all button's own label, so a host that renames the button keeps the invitation to press it again consistent), `expandAllDepthLimit(opened, depth)` (a press that left folders deeper than `expandAll.maxDepth` closed), `loopFolderName(name)` (the name of a loop row, a folder met again among its own ancestors), `documentFailed(name, title)` (a document that could not be shown:
|
|
36
|
-
the path's last segment and the failure's title — the text of the matching `failure…Title` label, not the reason's code), `imageZoomLevel(percent)`, `treeRefreshFailed(reason)`, `documentRefreshed(name)`, `documentRefreshFailed(reason)`, `refreshDocumentNamed(name)` (a multi-view panel's icon-only Refresh document: its accessible name and tooltip, `name` being the panel title),
|
|
38
|
+
the path's last segment and the failure's title — the text of the matching `failure…Title` label, not the reason's code), `imageZoomLevel(percent)`, `treeRefreshFailed(reason)`, `documentRefreshed(name)`, `documentRefreshFailed(reason)`, `refreshDocumentNamed(name)` (a multi-view panel's icon-only Refresh document: its accessible name and tooltip, `name` being the panel title),
|
|
39
|
+
`showMarkupNamed(name)` (a multi-view panel's icon-only Source toggle: its accessible name and tooltip, `name` being the panel title), `panelLimit(max)`, `panelOpened(name)`, `panelClosed(name)`, `panelAlreadyOpen(name)`, `panelHidden(name)`, `panelShown(name)`, `panelMaximized(name)`, `panelRestored(name)` — so each language can place the value where its grammar needs it.
|
|
37
40
|
- The labels `@aiquants/drag-drop-panels` fills itself are templates instead, strings whose `{name}` placeholders mark where each value goes: `panelMoved` (`{title}` the panel's name, `{column}` its visible column, `{position}` its place among that column's shown panels), `panelMoveUnavailable` (`{title}`, and `{move}` the name of the move, one of the `panelMove…` labels), `panelDragStarted` and `panelDragCancelled` (`{title}`) and `multiColumnRegion` (`{column}`); columns and positions count from 1. `MARKDOWN_EXPLORER_LABEL_TEMPLATES` lists each template's placeholders, and braces in every other label are literal text.
|
|
38
41
|
- `labels` must be a plain object. An unknown key throws a `RangeError` that lists the valid keys, a value of the wrong type (a string where a function is expected, or the reverse) throws a `TypeError`, and a blank string throws a `RangeError`, because a blank name is neither shown nor announced. A template that uses a placeholder its key does not offer (`{name}` for `{title}`, say) throws a `RangeError` naming the placeholders it accepts, because a placeholder that is never filled would be read out as it is. A key set to `undefined` keeps the catalog's string.
|
|
39
42
|
- The overrides are compared by value, key by key: writing `labels={{ … }}` inline does not re-render the explorer on every render of the host, but a function created inline is a new value each time — hoist it, or memoize the object.
|
|
@@ -27,6 +27,8 @@ The explorer renders documents that the reader did not write, from storage the r
|
|
|
27
27
|
- A `contains` that throws or answers anything but a boolean is logged (operation `boundary`) and counts as outside (a promise it answers is not awaited, and its rejection is logged the same way); a malformed `confirm` answer is logged and counts as outside; a `readPath` that is not an acceptable document path or that the deny rules refuse is logged and answered `failed`. A broken boundary therefore never opens a document.
|
|
28
28
|
- The union is exactly what the deployment exposes: a source whose boundary admits every document a reader can read in a store opens every such document through every view, link and asset URL, so documents of that store are confined only when every source over it has a confined boundary.
|
|
29
29
|
- The bytes of a file take exactly the document admission: an `asset` request passes the deny rules (a refusal is logged once with the operation `asset`), then the same union of boundaries and confirmations, and the host's `asset` receives the admitting source's `readPath`. A boundary miss answers 403 without a log, since an embedded image outside every source is ordinary.
|
|
30
|
+
- The text of a file takes the same admission: a `text` request passes the deny rules (a refusal is logged once with the operation `text`, since the explorer asks it only for a document it rendered), then the same union of boundaries and confirmations, and the host's `asset` receives the admitting source's `readPath`; a boundary miss is answered `forbidden` without a log.
|
|
31
|
+
It serves nothing the `asset` operation does not already serve the same reader: the beginning of that file's bytes, at most `textMaxBytes`, decoded as UTF-8 and escaped as a JSON string, which the browser shows as text and never interprets.
|
|
30
32
|
|
|
31
33
|
## HTML
|
|
32
34
|
|
|
@@ -83,12 +85,17 @@ In a tree or children listing, an entry with an empty name, or with a path the b
|
|
|
83
85
|
- Every JSON data response of the explorer's own carries `Content-Type: application/json; charset=utf-8`, `Cache-Control: private, no-store`, `X-Content-Type-Options: nosniff`, `Content-Security-Policy: default-src 'none'; frame-ancestors 'none'; sandbox` and `Cross-Origin-Resource-Policy: same-origin`, and has a JSON body.
|
|
84
86
|
- The page loader's responses carry `Cache-Control: private, no-store` through the exported `headers`, to both the HTML document and the single-fetch data.
|
|
85
87
|
- The data route answers a React Router single-fetch request (`<dataPath>/<operation>.data`: its own URL path ends in `.data`, which React Router strips from the route's `url` argument and `params` but not from `request.url`) with a `not-found` failure (404) before authenticating or calling a source. React Router would run the route for it, read the whole response into memory and keep none of the headers above but `Set-Cookie`.
|
|
86
|
-
- Status codes: 200 for a tree, children, ancestors, document or refresh answer (a refresh answers the reloaded tree, as a tree request does, failures included), 400 for a missing or malformed parameter, 401 when the reader is signed out, 403 when the reader may not use the explorer (or a refresh, or a document request marked as one's, lacks its proof), 404 for an unknown operation or source for a children request to a source without `children()` and for an ancestors request to a source without `ancestors()`, 405 (with `Allow`) for a wrong method.
|
|
88
|
+
- Status codes: 200 for a tree, children, ancestors, reveal, document, text or refresh answer (a refresh answers the reloaded tree, as a tree request does, failures included), 400 for a missing or malformed parameter, 401 when the reader is signed out, 403 when the reader may not use the explorer (or a refresh, or a document request marked as one's, lacks its proof), 404 for an unknown operation or source for a children request to a source without `children()` and for an ancestors request to a source without `ancestors()`, 405 (with `Allow`) for a wrong method.
|
|
87
89
|
When `authenticate`, `principalKey` or the route itself throws, the answer is the failure the exception maps to, with that failure's status: an `ExplorerError` keeps its reason (`too-large` is 413; `not-configured`, `unsupported` and `failed` are 500; the other reasons take the statuses above), and any other exception is logged and answered `failed` with 500.
|
|
88
90
|
A document or folder that cannot be shown — missing, denied, too large — is answered with status 200 and a failure in the JSON, so one inaccessible document does not break the multi-panel view.
|
|
89
|
-
- The tree refresh (`POST {dataPath}/refresh`) requires the custom request header `X-Markdown-Explorer: refresh` and
|
|
91
|
+
- The tree refresh (`POST {dataPath}/refresh`) requires the custom request header `X-Markdown-Explorer: refresh` and passes the shared cross-origin check of server routes (`crossOriginRefusal` of `@aiquants/request-isolation`, serving no navigation from another origin).
|
|
92
|
+
That check refuses a request whose `Sec-Fetch-Site` is present and neither `same-origin` nor `none`, and a request without Fetch Metadata whose `Origin` is present and does not name the request's host (another host or port, `null`, or a value that is not a URL), so neither a cross-site form nor a page of a sibling subdomain can trigger it.
|
|
93
|
+
It reloads the tree from the source (the source receives `refresh: true`) and answers a tree whose walk began after the refresh arrived; refreshes arriving while a walk runs share one trailing walk, so repeated refreshes never run more than one walk of a tree at a time.
|
|
90
94
|
Once the reload settled and unless the request went away, `onTreeRefreshed` receives the tree's cache key, which a multi-process host relays to its other processes' `forgetTree`; the response does not wait for a promise it returns, and a throw or that promise's rejection is logged (operation `refresh`).
|
|
91
|
-
- A document GET carrying `X-Markdown-Explorer: refresh` marks a request a refresh triggered: the host's `document` (and the admitting source's `confirm`) receive `refresh: true` and skip their caches. Such a request must carry the header's exact value and
|
|
95
|
+
- A document GET carrying `X-Markdown-Explorer: refresh` marks a request a refresh triggered: the host's `document` (and the admitting source's `confirm`) receive `refresh: true` and skip their caches. Such a request must carry the header's exact value and pass the same cross-origin check as the refresh itself (as a `GET`, a request without Fetch Metadata passes whatever its `Origin`, since another origin's page cannot add the header without a CORS preflight), or it is answered 403 before any host call, so a cross-site page cannot make the host re-parse documents.
|
|
96
|
+
- The `text` operation (`GET {dataPath}/text?path=`) answers JSON like a document request: GET and HEAD only; a missing, repeated or unacceptable `path` is 400; signed out 401 and forbidden 403.
|
|
97
|
+
Everything else is status 200: a text document (`name`, `text`, `truncated`, and the file's asset `url` with its version), or a failure document — `forbidden` for a denied or unadmitted path, `unsupported` for a file whose kept bytes hold NUL, the reason of an `ExplorerError` the host's `asset` port throws, and otherwise `failed`, logged with the operation `text` (a stream that ends before the size the port reported included).
|
|
98
|
+
It carries no refresh mark: the host's `asset` port receives `refresh: false`. The file is opened as the asset operation opens it — the first `textMaxBytes` bytes as a range when the port reports a longer size, the whole file otherwise, an empty file never — and the stream is cancelled once enough was read.
|
|
92
99
|
- The `asset` operation answers bytes instead of JSON (its failures stay JSON failures with the statuses above). GET and HEAD only; a request whose own URL path ends in `.data` is 404 before authentication; signed out 401 and forbidden 403 with no redirect; a missing, repeated or unacceptable `path` 400; a denied or unadmitted path 403.
|
|
93
100
|
After admission it answers 304 for a matching `If-None-Match`, 200 for the whole file (without `Accept-Ranges` and `Content-Length` when the host reports no size; empty with `Content-Length: 0` for an empty file), 206 for one satisfiable byte range, and 416 (`Content-Range: bytes */<size>`, `Cache-Control: private, no-store`) for a range starting at or after the end; HEAD carries the GET's status and headers without a body.
|
|
94
101
|
`If-None-Match` matches the ETag (`"<version>"`) as RFC 9110 evaluates it: `*`, or a comma-separated list holding the ETag by the weak comparison, so `W/"<version>"` matches too, while a malformed element matches nothing; an `If-Range` counts only when it is the ETag itself (the strong comparison).
|
|
@@ -129,7 +136,7 @@ In a tree or children listing, an entry with an empty name, or with a path the b
|
|
|
129
136
|
- Set `scopeSecret` from configuration, kept out of the source code and the browser: at least 32 characters, the same on every server instance.
|
|
130
137
|
- Keep the package external in your server bundle, so the sanitizer's worker file stays next to the server entry.
|
|
131
138
|
- Implement the ports: `document` and `asset` (and `children` for lazy folders) read what the explorer admitted, with the `readPath` it hands them, and report the same `version` for the same file.
|
|
132
|
-
The explorer serves every file's bytes itself (see [What the explorer serves](#what-the-explorer-serves)), so the host writes no asset route; the `asset` port only finds the file and opens its bytes, through a handle it checked (for example by comparing the opened file's device, inode, size and modification time with those of the checked path, refusing a file that has changed since it was found) and aborting with the request's signal.
|
|
139
|
+
The explorer serves every file's bytes itself (see [What the explorer serves](#what-the-explorer-serves)), so the host writes no asset route (nor a route for a document's source, which the `text` operation reads through the same port); the `asset` port only finds the file and opens its bytes, through a handle it checked (for example by comparing the opened file's device, inode, size and modification time with those of the checked path, refusing a file that has changed since it was found) and aborting with the request's signal.
|
|
133
140
|
- Refuse React Router single-fetch requests in any code your data route module runs before it hands the request to `dataLoader` or `dataAction` (which refuse them themselves), and in every resource route of your own: answer 404 for a request whose own URL path (`new URL(request.url).pathname`) ends in `.data`, before authenticating or touching storage.
|
|
134
141
|
React Router strips that suffix from `params` and from the loader's `url` argument, runs the loader for such a request, reads the whole `Response` body into memory and drops every header but `Set-Cookie`.
|
|
135
142
|
- When a source addresses documents by ID rather than by name (a cloud drive, for example), the deny rules can only filter its listings by entry name; its `document` function must refuse denied names itself, since the request carries only the ID.
|
|
@@ -115,6 +115,7 @@ In the tree and single views that address is the page's URL (the same view, with
|
|
|
115
115
|
| Following a document link inside the tree or single view | Pushes |
|
|
116
116
|
| Activating an entry of the document viewer's table of contents in the tree or single view | Pushes the heading's hash (nothing when the URL's hash already names that heading); in a multi-view panel the URL does not change |
|
|
117
117
|
| Switching the tree's source | Pushes |
|
|
118
|
+
| The reveal of the open document moving the tree to the source that holds it (the reader's `revealDocument`) | Replaces the current entry: only `source` changes (the view, the documents, the maximized document, the overrides and the fragment stay) |
|
|
118
119
|
| Switching between the views (the view switch, "open selection in the multi-panel view") | Pushes |
|
|
119
120
|
| Any multi-panel action (open, close, maximize, restore, navigate inside a panel, rearrange (drag or move)) | Replaces; hiding and showing a panel do not change the URL (browser storage remembers them) |
|
|
120
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/markdown-explorer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Markdown document explorer for React Router 8 (framework mode): a source tree with a single-document view and a multi-panel reading view, storage-agnostic server ports, golden-ratio layout and an en / ja UI.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"LICENSE"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"@aiquants/request-isolation": "^0.1.0",
|
|
57
58
|
"isomorphic-dompurify": "^2.36.0",
|
|
58
59
|
"parse5": "^8.0.0"
|
|
59
60
|
},
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"@aiquants/drag-drop-panels": "^0.10.0",
|
|
63
64
|
"@aiquants/markdown": "^6.2.0",
|
|
64
65
|
"@aiquants/resize-panels": "^2.1.0",
|
|
65
|
-
"@aiquants/virtualscroll": "^3.
|
|
66
|
+
"@aiquants/virtualscroll": "^3.17.0",
|
|
66
67
|
"react": "^19.2.7",
|
|
67
68
|
"react-dom": "^19.2.7",
|
|
68
69
|
"react-router": "^8.0.0"
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"@aiquants/drag-drop-panels": "0.10.0",
|
|
73
74
|
"@aiquants/markdown": "6.2.0",
|
|
74
75
|
"@aiquants/resize-panels": "2.1.0",
|
|
75
|
-
"@aiquants/virtualscroll": "3.
|
|
76
|
+
"@aiquants/virtualscroll": "3.17.0",
|
|
76
77
|
"@heroicons/react": "^2.2.0",
|
|
77
78
|
"@playwright/test": "^1.59.1",
|
|
78
79
|
"@tailwindcss/cli": "^4.1.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),y=require("./index-CLe6vRXs.cjs"),r=require("react"),O=require("./location-2QZADLiv.cjs"),Oe=require("@aiquants/directory-tree"),ot=require("./tapScrollCircle-C5DGI-0H.cjs"),st=require("./storage-Bkb2Axdi.cjs"),ie=require("@aiquants/resize-panels"),ct=require("react-router");function it(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=it(r);function ut({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const dt=m.forwardRef(ut);function ft({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const mt=m.forwardRef(ft);function pt({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{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"}),m.createElement("path",{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"}))}const ht=m.forwardRef(pt);function xt({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const wt=m.forwardRef(xt),gt=()=>{const{notices:e}=y.useExplorer(),t=r.use(e);return t.length===0?null:i.jsx("div",{className:"aqmx-explorer-notices",children:t.map(n=>i.jsxs("div",{className:"aqmx-callout","data-aqmx-tone":n.tone,"data-testid":"markdown-explorer-notice","data-aqmx-notice":n.id,children:[i.jsx("p",{className:"aqmx-callout-title",children:n.title}),n.body===void 0?null:i.jsx("p",{className:"aqmx-callout-body",children:n.body}),n.action===void 0?null:i.jsx("a",{className:"aqmx-callout-action",href:n.action.href,children:n.action.label})]},n.id))})};function Et({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const bt=m.forwardRef(Et),he=r.createContext(!0),Me="\0loop\0",qe="\0",vt=()=>{const e=new WeakMap,t=new WeakMap,n=new WeakMap,a=o=>{const l=e.get(o);if(l!==void 0)return l;const s=Object.freeze({type:"loop",name:o.name,path:o.path});return e.set(o,s),s},c=(o,l,s)=>{let h=!1;const f=o.map(p=>{const x=u(p,l,s);return x!==p&&(h=!0),x});if(!h)return o;const d=n.get(o);return d!==void 0&&d.length===f.length&&d.every((p,x)=>p===f[x])?d:(n.set(o,f),f)},u=(o,l,s)=>{if(o.type!=="directory")return o;if(s.has(o.path))return a(o);const h=o.lazy===!0?l(o.path):void 0,f=h?.status==="loaded",d=f?h.entries:o.children;if(d===void 0)return o;s.add(o.path);const p=c(d,l,s);if(s.delete(o.path),!f&&p===o.children)return o;const x=t.get(o);if(x!==void 0&&x.state===h&&x.children===p)return x.grafted;const g={...o,children:p,lazy:f?!1:o.lazy};return t.set(o,{state:h,children:p,grafted:g}),g};return(o,l)=>c(o,l,new Set)},Rt=(e,t)=>`${Me}${e}${qe}${t}`,ae=e=>e.startsWith(Me),yt=e=>e.slice(e.lastIndexOf(qe)+1),te="data-aqmx-path",St=(e,t,n,a,c)=>{const u={aqmxPath:e.path};return n&&(u.aqmxOpen=!0),(a==="loading"||a==="failed")&&(u.aqmxChildren=a),{name:e.name,type:e.type,absolutePath:e.path,relativePath:e.path,mimeType:e.mimeType,children:t,label:c,data:u}},kt=(e,t,n,a)=>{const c=Rt(t,e.path);return{name:n,type:"directory",absolutePath:c,relativePath:c,children:a,data:{aqmxLoop:e.path}}},Ct=()=>{const e=new WeakMap,t=new WeakMap,n=new WeakMap,a=[],c=(l,s,h)=>{const f=l.map(p=>p.type==="loop"?u(p,s,h):o(p,s)),d=n.get(l);return d!==void 0&&d.length===f.length&&d.every((p,x)=>p===f[x])?d:(n.set(l,f),f)},u=(l,s,h)=>{const f=t.get(l);if(f!==void 0&&f.parentKey===h&&f.loopFolderName===s.loopFolderName)return f.row;const d=kt(l,h,s.loopFolderName(l.name),a);return t.set(l,{row:d,parentKey:h,loopFolderName:s.loopFolderName}),d},o=(l,s)=>{const h=l.type==="directory"?l.children===void 0?a:c(l.children,s,l.path):void 0,f=s.openPaths.has(l.path),d=l.type==="directory"&&l.lazy===!0?s.childrenOf(l.path)?.status:void 0,p=d==="failed"?s.renderFailedFolder:void 0,x=e.get(l);if(x!==void 0&&x.open===f&&x.childrenStatus===d&&x.children===h&&x.renderFailedFolder===p)return x.row;const g=St(l,h,f,d,p===void 0?void 0:p(l));return e.set(l,{row:g,open:f,childrenStatus:d,children:h,renderFailedFolder:p}),g};return(l,s)=>c(l,s,"")},Tt=e=>{if(e===void 0)return;const t=n=>({name:n.name,path:n.absolutePath,type:n.type});return(n,a)=>e(t(n),t(a))},pe=(e,t)=>{const n=e.filter(a=>a.type==="directory");return t===void 0?n:n.sort(t)},Lt=(e,t)=>{const n=new Map;let a=0;const c=u=>{for(const o of pe(u,t.compare))if(t.isShownExpanded(o.path)){if(o.lazy!==!0){o.children!==void 0&&c(o.children);continue}n.has(o.path)||(n.set(o.path,t.isDirect(o.path)?"direct":"bulk"),t.childrenOf(o.path)?.status!=="failed"&&(a+=1))}};return c(e),{folders:n,waiting:a}},jt=e=>{const t=new Set,n=a=>{for(const c of a)c.type==="directory"&&(c.lazy===!0&&t.add(c.path),c.children!==void 0&&n(c.children))};return n(e),t},Ae=(e,t)=>{for(const n of e){if(n.type!=="directory")continue;if(n.path===t)return n;const a=n.children===void 0?null:Ae(n.children,t);if(a!==null)return a}return null},Nt=(e,t,n,a)=>{let c=e;for(const u of t){const o=c.find(l=>l.type==="directory"&&l.path===u);if(o===void 0)return"missing";if(o.lazy===!0)return a.childrenOf(o.path)?.status==="failed"?"failed":"loading";if(!a.isShownExpanded(o.path))return"loading";c=o.children??[]}return c.some(u=>u.type==="file"&&u.path===n)?"ready":"missing"},Ce=new Set,Pt=(e,t)=>e.has(t)?e:new Set(e).add(t),Ot=(e,t)=>{if(!t.some(a=>e.has(a)))return e;const n=new Set(t);return new Set([...e].filter(a=>!n.has(a)))},Mt=(e,t)=>[...e].every(n=>t.has(n))?e:new Set([...e].filter(n=>t.has(n))),qt=()=>{const[e,t]=r.useState(Ce),n=r.useCallback(o=>t(l=>Pt(l,o)),[]),a=r.useCallback(o=>t(l=>Ot(l,o)),[]),c=r.useCallback(o=>t(l=>Mt(l,o)),[]),u=r.useCallback(()=>t(Ce),[]);return r.useMemo(()=>({direct:e,markDirect:n,unmarkDirect:a,pruneDirect:c,clearDirect:u}),[e,n,a,c,u])},At=e=>({budget:e,handled:new Set,loads:new Set,opened:0,folderLimited:!1,depthLimited:!1,announcedStart:!1,issuedAgainst:null}),Ft=(e,t)=>{const n=[];let a=pe(t.entries,t.compare);for(let c=1;a.length>0;c+=1){const u=[];for(const o of a){const{path:l}=o;if(t.isShownExpanded(l))e.handled.add(l);else{if(e.handled.has(l))continue;if(e.handled.add(l),o.lazy===!0&&t.childrenOf(l)===void 0){if(c>e.budget.maxDepth){e.depthLimited=!0;continue}if(e.loads.size>=e.budget.maxFolders){e.folderLimited=!0;continue}e.loads.add(l)}n.push(l),e.opened+=1}o.lazy!==!0&&o.children!==void 0&&u.push(...pe(o.children,t.compare))}a=u}return n},Fe=(e,t)=>e.every(n=>n.type!=="directory"||t(n.path)&&(n.lazy===!0||n.children===void 0||Fe(n.children,t))),_t=(e,t)=>{if(e.folderLimited)return{kind:"folder-limit",opened:e.opened};if(e.depthLimited)return{kind:"depth-limit",opened:e.opened};let n=0;for(const a of e.loads)t.childrenOf(a)?.status==="failed"&&(n+=1);return{kind:"done",opened:e.opened,failed:n,complete:Fe(t.entries,t.isShownExpanded)}},me=Object.freeze({state:"idle"}),It=e=>{const t=r.useRef(null),n=r.useRef(e),[a,c]=r.useState(me);r.useLayoutEffect(()=>{n.current=e});const u=r.useCallback(()=>{t.current===null&&(t.current=At(n.current.budget),c({state:"running",opened:0}))},[]),o=r.useCallback(()=>{t.current=null,c(me)},[]),l=r.useCallback(s=>{const h=t.current;if(h===null)return;const f=Ft(h,s);if(f.length>0&&(h.issuedAgainst=s.expanded,n.current.expandMultiple([...f])),!h.announcedStart&&(h.loads.size>0||s.waiting>0)&&(h.announcedStart=!0,n.current.onStart()),f.length===0&&!s.expansionPending&&s.expanded!==h.issuedAgainst&&s.waiting===0){t.current=null;const p=_t(h,s);c(p.kind==="done"?me:{state:"stopped",stop:p.kind,opened:p.opened}),n.current.onFinish(p);return}const{opened:d}=h;c(p=>p.state==="running"&&p.opened===d?p:{state:"running",opened:d})},[]);return r.useMemo(()=>({status:a,start:u,end:o,advance:l}),[a,u,o,l])},Te=["pointerdown","wheel","touchstart","keydown","focusin"],Dt=8,Le={least:Number.POSITIVE_INFINITY,stalled:0},Ht=({tree:e,container:t,path:n,chain:a,rows:c,cancel:u,displayed:o,placement:l})=>{const s=r.useRef(null),h=r.useRef(!0),f=r.useRef(Le),d=r.useRef(null),p=r.useRef(null),x=r.useRef(a),g=r.useRef(l);r.useLayoutEffect(()=>{x.current=a,g.current=l},[a,l]);const b=r.useCallback(()=>{const S=d.current;S!==null&&(d.current=null,S.phase==="asking"?S.controller.abort():x.current?.open(null))},[]),T=r.useCallback(()=>{s.current=null,b()},[b]),R=r.useCallback(()=>{const S=t.current;s.current===null||p.current!==null||S===null||S.getClientRects().length===0||(p.current=requestAnimationFrame(()=>{p.current=null;const E=s.current;if(E===null)return;const k=g.current(E);if(k===0){h.current=!0,d.current?.phase==="opening"&&b();return}if(e.current?.scrollToPath(E,{align:"nearest"})===!0){d.current?.phase==="opening"&&b();const{least:j,stalled:M}=f.current;f.current=k<j?{least:k,stalled:0}:{least:j,stalled:M+1},f.current.stalled<Dt&&R();return}const v=d.current;if(v===null){s.current=null;return}v.phase==="opening"&&x.current?.progress(v.folders,E)!=="loading"&&T()}))},[e,t,b,T]),N=r.useCallback(()=>{h.current=!1,f.current=Le,R()},[R]);r.useEffect(()=>{const S=t.current;if(S===null)return;const E=typeof ResizeObserver>"u"?null:new ResizeObserver(N);E?.observe(S);for(const k of Te)S.addEventListener(k,T,{passive:!0});return()=>{E?.disconnect();for(const k of Te)S.removeEventListener(k,T);p.current!==null&&cancelAnimationFrame(p.current),p.current=null,b()}},[t,N,T,b]);const L=a!==null;r.useEffect(()=>{const S=t.current;if(T(),n===null||S===null||S.contains(S.ownerDocument.activeElement))return;s.current=n;const E=x.current;if(L&&E!==null){const k=new AbortController,v={phase:"asking",controller:k};d.current=v,E.ancestors(n,k.signal).then(j=>{d.current===v&&(j===null?d.current=null:(d.current={phase:"opening",folders:j},x.current?.open(j)),N())})}N()},[n,L,t,T,N]),r.useEffect(()=>{(d.current?.phase==="opening"||s.current!==null&&!h.current)&&N()},[c,N]);const A=r.useRef(u);r.useEffect(()=>{A.current!==u&&(A.current=u,T())},[u,T]);const _=r.useRef(o);r.useEffect(()=>{_.current&&!o&&b(),_.current=o},[o,b])},Zt="--aqmx-tree-line",$t=Object.freeze(["(forced-colors: active)","(prefers-color-scheme: dark)"]),Bt="data-aqmx-tree-probe",zt=Object.freeze({rowHeight:O.CONTROL_BLOCK_PIXELS,lineColor:null}),Vt=/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/u,Kt=e=>{const t=Vt.exec(e);return t===null?e:`#${t.slice(1).map(n=>Number(n).toString(16).padStart(2,"0")).join("")}`},Xt=(e,t)=>{const[n,a]=r.useState(zt);return r.useLayoutEffect(()=>{const c=e.current;if(c===null)return;const u=()=>{const s=Math.round(c.getBoundingClientRect().height),h=getComputedStyle(c),f=h.getPropertyValue(Zt).trim()===""?null:Kt(h.color);a(d=>{const p=Number.isFinite(s)&&s>0?s:d.rowHeight;return d.rowHeight===p&&d.lineColor===f?d:{rowHeight:p,lineColor:f}})};u();const o=$t.map(s=>window.matchMedia(s));for(const s of o)s.addEventListener("change",u);const l=typeof ResizeObserver>"u"?null:new ResizeObserver(u);return l?.observe(c),()=>{for(const s of o)s.removeEventListener("change",u);l?.disconnect()}},[e,t]),n},_e="markdown-explorer-tree-scroll",Wt=.5,Ie=(e,t)=>[...e.querySelectorAll(`[role="treeitem"][${te}]`)].find(n=>n.getAttribute(te)===t),Ut=(e,t)=>{const n=Ie(e,t),a=n?.closest(`[data-testid="${_e}"]`);if(n===void 0||a===null||a===void 0)return Number.POSITIVE_INFINITY;const c=a.getBoundingClientRect(),u=n.getBoundingClientRect(),o=c.top-u.top,l=u.height>c.height?Math.abs(o):Math.max(0,o)+Math.max(0,u.bottom-c.bottom);return l<=Wt?0:l},Gt={testId:_e,overscanCount:13,callbackThrottleMs:13,scrollBarOptions:{width:8,enableTrackClick:!0,enableThumbDrag:!0,enableArrowButtons:!0,enableArrowButtonTabStops:!1,enableScrollToTopBottomButtons:!0,tapScrollCircleOptions:ot.TAP_SCROLL_CIRCLE},behaviorOptions:{enablePointerDrag:!0}},Yt={hoverClassName:"",directorySelectedClassName:"",itemSelectedClassName:""},Qt={color:"inherit"},Jt={paddingBlock:0},en=new Set,tn=new Map,nn={color:"var(--aqmx-tree-line)"},rn=e=>{const t=e instanceof Element?e.closest(`[${te}]`):null;return t===null||t.getAttribute("data-entry-type")!=="file"?null:t.getAttribute(te)},De=(e,t,n,a)=>n==="folder-limit"?e.expandAllFolderLimit(a,t.maxFolders,e.expandAll):e.expandAllDepthLimit(a,t.maxDepth),an=(e,t,n)=>n.kind==="done"?e.expandAllDone(n.opened,n.failed,n.complete):De(e,t,n.kind,n.opened),He=()=>{const{labels:e}=y.useExplorer();return i.jsxs("div",{className:"aqmx-explorer-loading","aria-busy":"true","data-testid":"markdown-explorer-tree-loading",children:[i.jsx("p",{className:"aqmx-explorer-loading-text",children:e.treeLoading}),i.jsxs("div",{className:"aqmx-skeleton","aria-hidden":"true",children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]})]})},ln=()=>{const{labels:e}=y.useExplorer();return i.jsxs("div",{className:"aqmx-empty","data-testid":"markdown-explorer-tree-empty",children:[i.jsx(bt,{className:"aqmx-explorer-empty-icon","aria-hidden":"true"}),i.jsx("p",{className:"aqmx-empty-title",children:e.treeEmptyTitle}),i.jsx("p",{className:"aqmx-explorer-empty-body",children:e.treeEmptyBody})]})},on=({name:e,onRetry:t})=>{const{labels:n}=y.useExplorer(),a=r.useId();return i.jsxs("span",{className:"aqmx-explorer-folder-failed",children:[i.jsx("span",{className:"aqmx-explorer-folder-name",children:e}),i.jsx("span",{id:a,className:"aqmx-explorer-folder-error",children:n.folderLoadFailed}),i.jsxs("button",{type:"button",className:"aqmx-explorer-folder-retry","aria-describedby":a,"data-testid":"markdown-explorer-folder-retry",onClick:c=>{c.stopPropagation();const u=c.currentTarget,o=u.ownerDocument.activeElement===u?u.closest('[role="treeitem"]'):null;o instanceof HTMLElement&&y.focusWithoutScroll(o),t()},onKeyDown:c=>{c.key!=="Escape"&&c.stopPropagation()},children:[i.jsx(y.ForwardRef,{className:"aqmx-explorer-folder-retry-icon","aria-hidden":"true"}),i.jsx("span",{className:"aqmx-explorer-folder-retry-text",children:n.retry})]})]})},sn=({entries:e,version:t,mode:n,sourceId:a,settings:c,reveal:u,openPaths:o,selection:l,onOpenDocument:s,expansion:h,onShown:f,marks:d,claimsHeld:p,expandAll:x,revealCancel:g})=>{const{trees:b,documents:T,labels:R,locale:N,theme:L,data:A,config:_}=y.useExplorer(),S=r.use(he),[E]=r.useState(Ct),k=r.useRef(null),{rowHeight:v,lineColor:j}=Xt(k,L),{isExpanded:M,toggle:Y,expandMultiple:F,collapseMultiple:Z,expanded:H,isPending:Q}=h,{alwaysExpanded:$,sortMode:J,folderPlacement:B}=c,{direct:X,markDirect:P,unmarkDirect:z,pruneDirect:ne}=d,{running:ee,advance:le}=x,re=r.useRef(null),W=r.useRef(null),C=r.useMemo(()=>O.createEntryComparator({sortMode:J,folderPlacement:B}),[J,B]),V=r.useMemo(()=>Tt(C),[C]),I=r.useCallback(w=>b.children(a,w),[b,a]),U=r.useMemo(()=>jt(e),[e]),G=r.useCallback(w=>!ae(w)&&(M(w)||$&&!U.has(w)),[M,$,U]),K=r.useRef({shownExpanded:G,isExpanded:M,unloadedFolders:U,entries:e,childrenOf:I});r.useLayoutEffect(()=>{K.current={shownExpanded:G,isExpanded:M,unloadedFolders:U,entries:e,childrenOf:I}},[G,M,U,e,I]);const Ee=r.useCallback(w=>{re.current?.scrollToPath(w,{align:"nearest"}),requestAnimationFrame(()=>{const q=W.current,D=q===null?void 0:Ie(q,w);D!==void 0&&y.focusWithoutScroll(D)})},[]),We=r.useCallback(w=>{if(ae(w)){Ee(yt(w));return}K.current.isExpanded(w)?z([w]):K.current.unloadedFolders.has(w)&&P(w),Y(w)},[Ee,P,z,Y]),de=r.useCallback(w=>{const q=w.filter(D=>!ae(D));q.length!==0&&(z(q),Z(q))},[z,Z]),Ue=r.useCallback(w=>{const q=w.filter(D=>!ae(D));q.length!==0&&(q.length<w.length&&q.every(D=>K.current.shownExpanded(D))?de(q):F(q))},[F,de]),be=r.useCallback(w=>i.jsx(on,{name:w.name,onRetry:()=>{P(w.path),b.retryChildren(a,w.path),K.current.shownExpanded(w.path)||F([w.path])}}),[b,a,P,F]),ve=n==="multi"?o:en,{loopFolderName:Re}=R,Ge=r.useMemo(()=>E(e,{openPaths:ve,childrenOf:I,renderFailedFolder:be,loopFolderName:Re}),[E,e,ve,I,be,Re,t]),Ye=y.useIntentPrefetch(T,rn),ye=r.useRef([]),oe=r.useCallback(()=>{for(const w of ye.current)K.current.unloadedFolders.has(w)&&P(w)},[P]),{maxDepth:Se}=_.revealDocument,Qe=r.useMemo(()=>({ancestors:async(w,q)=>{const D=await A.ancestors(a,w,q);return D.status!=="ok"||D.ancestors===null||D.ancestors.length>Se?null:D.ancestors},open:w=>{ye.current=w??[],w!==null&&(oe(),F([...w]))},progress:(w,q)=>Nt(K.current.entries,w,q,{isShownExpanded:K.current.shownExpanded,childrenOf:K.current.childrenOf})}),[A,a,Se,oe,F]);r.useEffect(()=>oe(),[oe,U]);const Je=r.useMemo(()=>[e,t,H],[e,t,H]),et=r.useCallback(w=>W.current===null?Number.POSITIVE_INFINITY:Ut(W.current,w),[]);Ht({tree:re,container:W,path:u.path,chain:u.openFolders?Qe:null,rows:Je,cancel:g,displayed:S,placement:et});const ke=r.useCallback(w=>X.has(w),[X]),se=r.useMemo(()=>Lt(e,{isShownExpanded:G,childrenOf:I,compare:C,isDirect:ke}),[e,G,I,C,ke,t]),ce=S&&p;r.useLayoutEffect(()=>{f(e)},[e,f]),r.useLayoutEffect(()=>()=>f(null),[f]),r.useEffect(()=>b.claimChildren(a,ce?se.folders:tn),[b,a,ce,se]),r.useEffect(()=>ne(U),[ne,U]),r.useEffect(()=>{ce&&ee&&le({entries:e,isShownExpanded:G,childrenOf:I,compare:C,expanded:H,waiting:se.waiting,expansionPending:Q})},[ce,ee,le,e,G,I,C,H,se,Q]);const tt=r.useCallback(w=>{w.isDirectory||s(w.entry.absolutePath)},[s]),{onChange:fe}=l,nt=r.useMemo(()=>fe===null?void 0:(w,q)=>{ae(w.absolutePath)||fe({path:w.absolutePath,name:w.name,selected:q})},[fe]),rt=r.useMemo(()=>new Set(l.items),[l.items]),at=r.useMemo(()=>({entryKindDirectory:R.treeEntryKindDirectory,entryKindFile:R.treeEntryKindFile,scrollUp:R.treeScrollUp,scrollDown:R.treeScrollDown,scrollToTop:R.treeScrollToTop,scrollToBottom:R.treeScrollToBottom}),[R]),lt=j===null?{showTreeLines:!1}:{showTreeLines:c.lines,lineColor:j};return i.jsxs("div",{ref:W,className:"aqmx-explorer-tree","data-testid":"markdown-explorer-tree",...Ye,children:[i.jsx("span",{ref:k,className:"aqmx-explorer-tree-probe","aria-hidden":"true",[Bt]:""}),i.jsx(Oe.DirectoryTree,{ref:re,entries:Ge,expansion:{toggle:We,isExpanded:G,expandMultiple:Ue,collapseMultiple:de,isPending:Q&&!ee,doubleClickAction:c.doubleClickAction},selection:{mode:l.mode,selectedPath:l.shownPath,currentPath:l.shownPath,selectedItems:rt,onEntryClick:tt,onSelectionChange:nt},visual:{className:"aqmx-explorer-tree-view",ariaLabel:R.treeRegion,...lt,showExpandIcons:c.expandIcons,expandIconStyle:nn,showDirectoryIcons:c.directoryIcons,showFileIcons:c.fileIcons,expandIconSize:c.expandIconSize,itemHeight:v,removeRootIndent:c.removeRootIndent,highlightStyles:Yt,entryStyle:Jt,nameStyle:Qt},virtualScroll:Gt,sort:V,locale:N,labels:at})]})},cn=({pending:e,status:t})=>{const{labels:n}=y.useExplorer(),a=t.state!=="running",[c,u]=r.useState(0),o=r.useRef(!0);r.useLayoutEffect(()=>{const s=o.current;if(o.current=a,!a||e>0&&!s){u(0);return}if(e>0){u(e);return}if(c===0)return;const h=setTimeout(()=>u(0),0);return()=>clearTimeout(h)},[a,e,c]);const l=a&&e===0?c:e;return l===0&&a?null:i.jsxs("p",{className:"aqmx-explorer-tree-progress","data-testid":"markdown-explorer-tree-progress","data-aqmx-loading":String(l),"data-aqmx-expand-all":t.state,children:[l>0?i.jsx(y.ForwardRef,{className:"aqmx-explorer-tree-progress-icon","aria-hidden":"true"}):null,i.jsx("span",{children:t.state==="running"?n.expandAllProgress(t.opened,l):n.foldersLoading(l)})]})},un=({stop:e,opened:t,budget:n})=>{const{labels:a}=y.useExplorer();return i.jsx("p",{className:"aqmx-explorer-expand-all-stop","data-testid":"markdown-explorer-expand-all-stop","data-aqmx-stop":e,children:De(a,n,e,t)})},dn=({entries:e,...t})=>{const{trees:n}=y.useExplorer(),a=r.useSyncExternalStore(n.subscribe,n.version,n.version),{sourceId:c}=t,[u]=r.useState(vt),o=r.useMemo(()=>u(e,l=>n.children(c,l)),[u,e,n,c,a]);return o.length===0?i.jsx(ln,{}):i.jsx(sn,{entries:o,version:a,...t})},fn=({result:e,onRetry:t,...n})=>{const{renderTreeFailure:a}=y.useExplorer(),c=r.use(e);if(c.status==="deferred")return i.jsx(He,{});if(c.status==="ok")return i.jsx(dn,{entries:c.entries,...n});const u=a?.(c.failure);return i.jsx("div",{className:"aqmx-explorer-tree-message","data-testid":"markdown-explorer-tree-failure","data-aqmx-failure":c.failure.reason,children:u!==void 0?u:i.jsx(y.FailureView,{failure:c.failure,alert:!0,onRetry:t,testId:null})})},mn=({onControls:e,...t})=>{const{trees:n,storageNamespace:a,labels:c,announcer:u,config:o}=y.useExplorer(),{sourceId:l}=t,s=Oe.useDirectoryTreeState({storageKey:st.storageKeys(a).treeExpansion(l)});r.useSyncExternalStore(n.subscribe,n.version,n.version);const h=n.read(l),f=r.useCallback(()=>n.retry(l),[n,l]);r.useLayoutEffect(()=>n.open(l),[n,l]);const d=qt(),{expanded:p,expandMultiple:x,collapseAll:g}=s,[b,T]=r.useState(null),R=b!==p,N=r.useRef(p);r.useLayoutEffect(()=>{N.current=p},[p]);const L=o.expandAll,A=r.useCallback(()=>u.announce(c.expandAllStarted),[u,c]),_=r.useCallback(P=>u.announce(an(c,L,P)),[u,c,L]),S=It({budget:L,expandMultiple:x,onStart:A,onFinish:_}),{status:E,start:k,end:v,advance:j}=S,M=E.state==="running",Y=r.useMemo(()=>({running:M,advance:j}),[M,j]),F=r.useRef(null),[Z,H]=r.useState(!1),Q=r.useCallback(P=>{F.current=P,H(P!==null)},[]);r.useEffect(()=>n.subscribeChildrenFailures(P=>{const z=P.sourceId===l&&F.current!==null?Ae(F.current,P.path):null;z!==null&&u.announce({list:c.foldersLoadFailedNamed,item:z.name})}),[n,l,u,c]);const{clearDirect:$}=d,[J,B]=r.useState(0),X=r.useCallback(()=>{B(P=>P+1),v(),$(),T(N.current),g()},[v,$,g]);return r.useEffect(()=>{e({collapseAll:X,expandAll:Z?k:null,expanding:M})},[e,X,k,Z,M]),r.useEffect(()=>()=>e(null),[e]),r.useEffect(()=>{Z||v()},[Z,v]),i.jsxs(i.Fragment,{children:[E.state==="stopped"?i.jsx(un,{stop:E.stop,opened:E.opened,budget:L}):null,i.jsxs("div",{className:"aqmx-explorer-tree-area",children:[i.jsx(r.Suspense,{fallback:i.jsx(He,{}),children:i.jsx(fn,{result:h,onRetry:f,expansion:s,onShown:Q,marks:d,claimsHeld:R,expandAll:Y,revealCancel:J,...t})}),i.jsx(cn,{pending:n.pendingChildren(l),status:E})]})]})};function pn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Ze=m.forwardRef(pn),je="markdown-explorer-selection-remove",hn=({selection:e,onRemove:t,onClear:n,onOpenSelection:a,onLeave:c})=>{const{labels:u}=y.useExplorer(),o=r.useId(),l=r.useRef(null),s=[...e],h=(d,p)=>{if(p.ownerDocument.activeElement===p){const x=l.current===null?[]:[...l.current.querySelectorAll(`[data-testid="${je}"]`)],g=x.indexOf(p),b=[x[g+1],x[g-1]].find(T=>T!==void 0);b===void 0?c():b.focus()}t(d)},f=()=>{const d=l.current;d!==null&&d.contains(d.ownerDocument.activeElement)&&c(),n()};return i.jsxs("section",{ref:l,className:"aqmx-explorer-tray","aria-labelledby":o,"data-testid":"markdown-explorer-selection-tray",children:[i.jsxs("div",{className:"aqmx-explorer-tray-header",children:[i.jsx("p",{id:o,className:"aqmx-explorer-tray-title",children:u.selectionTitle(s.length)}),i.jsx("button",{type:"button",className:"aqmx-explorer-tray-button","data-testid":"markdown-explorer-selection-clear",onClick:f,children:u.clearSelection})]}),i.jsx("ul",{className:"aqmx-explorer-tray-list",children:s.map(([d,p])=>i.jsxs("li",{className:"aqmx-explorer-tray-item",children:[i.jsx("span",{className:"aqmx-explorer-tray-name",title:d,children:p}),i.jsx("button",{type:"button",className:"aqmx-icon-button aqmx-explorer-tray-remove","aria-label":u.removeFromSelection(p),title:u.removeFromSelection(p),"data-testid":je,"data-aqmx-path":d,onClick:x=>h(d,x.currentTarget),children:i.jsx(Ze,{"aria-hidden":"true"})})]},d))}),a===void 0?null:i.jsx("button",{type:"button",className:"aqmx-explorer-tray-open","data-testid":"markdown-explorer-selection-open",onClick:()=>a(s.map(([d])=>d)),children:u.openSelectionInMulti(s.length)})]})},ue=new Map,xn=(e,t)=>{if(t.selected===e.has(t.path))return e;const n=new Map(e);return t.selected?n.set(t.path,t.name):n.delete(t.path),n},wn=(e,t)=>{if(!e.has(t))return e;const n=new Map(e);return n.delete(t),n},$e=r.createContext(null),gn=e=>{const t=r.use($e);r.useLayoutEffect(()=>{if(t!==null)return t(e),()=>t(!1)},[t,e])};function En({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const bn=m.forwardRef(En);function vn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Rn=m.forwardRef(vn);function yn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Sn=m.forwardRef(yn);function kn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Cn=m.forwardRef(kn);function Tn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Ln=m.forwardRef(Tn);function jn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Nn=m.forwardRef(jn);function Pn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const On=m.forwardRef(Pn);function Mn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}),m.createElement("path",{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"}))}const qn=m.forwardRef(Mn);function An({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const Fn=m.forwardRef(An);function _n({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{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"}))}const In=m.forwardRef(_n);function Dn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{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"}))}const Hn=m.forwardRef(Dn);function Zn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const $n=m.forwardRef(Zn);function Bn({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{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"}))}const zn=m.forwardRef(Bn),xe=e=>{e.preventDefault(),e.stopPropagation()},Vn=Object.freeze({sortMode:Rn,folderPlacement:In,selectionMode:Sn,doubleClickAction:On,expandIconSize:$n,alwaysExpanded:bn,revealDocument:Fn,removeRootIndent:Cn,lines:zn,expandIcons:Ln,directoryIcons:Hn,fileIcons:qn}),Be=(e,t)=>{const n=e[t.labelKey];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}`);return n},Kn=({id:e,settings:t,descriptors:n,onAdvance:a,onClose:c,ref:u})=>{const{labels:o}=y.useExplorer(),l=r.useRef([]);r.useEffect(()=>{l.current[0]?.focus()},[]);const s=r.useCallback(f=>{const d=n.length;l.current[(f%d+d)%d]?.focus()},[n.length]),h=r.useCallback((f,d)=>{switch(f.key){case"ArrowDown":f.preventDefault(),s(d+1);break;case"ArrowUp":f.preventDefault(),s(d-1);break;case"Home":f.preventDefault(),s(0);break;case"End":f.preventDefault(),s(n.length-1);break;case"Escape":xe(f),c();break;case"Tab":c();break}},[n.length,s,c]);return i.jsx("div",{ref:u,id:e,role:"menu","aria-label":o.treeSettings,className:"aqmx-explorer-menu","data-testid":"markdown-explorer-tree-settings-menu",children:n.map((f,d)=>{const p=Vn[f.key],x=Be(o,f),g=O.formatTreeSettingValue(o,t,f.key),b=t[f.key],T=typeof b=="boolean"?{role:"menuitemcheckbox","aria-checked":b,"aria-label":x}:{role:"menuitem","aria-label":`${x}: ${g}`};return i.jsxs("button",{ref:R=>{l.current[d]=R},type:"button",tabIndex:-1,...T,title:`${x}: ${g}`,className:"aqmx-explorer-menu-item","data-testid":"markdown-explorer-tree-settings-item","data-aqmx-setting":f.key,onClick:()=>a(f),onKeyDown:R=>h(R,d),children:[i.jsx(p,{className:"aqmx-explorer-menu-icon","aria-hidden":"true"}),i.jsx("span",{className:"aqmx-explorer-menu-name",children:x}),i.jsx("span",{className:"aqmx-explorer-menu-value",children:g})]},f.key)})})},Xn=({settings:e,descriptors:t,onAdvance:n})=>{const{labels:a,announcer:c}=y.useExplorer(),[u,o]=r.useState(!1),l=r.useRef(null),s=r.useRef(null),h=r.useRef(null),f=r.useId(),d=r.useCallback(()=>{l.current?.focus(),o(!1)},[]);r.useEffect(()=>{if(!u)return;const g=b=>{b.target instanceof Node&&(l.current?.contains(b.target)===!0||s.current?.contains(b.target)===!0)||(o(!1),h.current!==null&&window.clearTimeout(h.current),h.current=window.setTimeout(()=>{h.current=null,(document.activeElement===null||document.activeElement===document.body)&&l.current?.focus()},0))};return document.addEventListener("pointerdown",g),()=>document.removeEventListener("pointerdown",g)},[u]),r.useEffect(()=>()=>{h.current!==null&&window.clearTimeout(h.current)},[]);const p=r.useCallback(g=>{g.key!=="Escape"||!u||(xe(g),d())},[u,d]),x=r.useCallback(g=>{const b=n(g.key);c.announce(a.settingAnnouncement(Be(a,g),O.formatTreeSettingValue(a,b,g.key)))},[c,a,n]);return{trigger:i.jsx("button",{ref:l,type:"button",className:"aqmx-icon-button","aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?f:void 0,"aria-label":a.treeSettings,title:a.treeSettings,"data-testid":"markdown-explorer-tree-settings",onClick:()=>o(g=>!g),onKeyDown:p,children:i.jsx(Nn,{"aria-hidden":"true"})}),menu:u?i.jsx(Kn,{ref:s,id:f,settings:e,descriptors:t,onAdvance:x,onClose:d}):null}},Wn=()=>{const{treeSettings:e}=y.useExplorer();return{settings:r.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot),advance:e.advance}},Ne=new Set,Un='[role="tree"] [role="treeitem"][tabindex="0"]',Gn="[data-directory-tree-tab-stop]",Yn=e=>{const{mode:t,sourceId:n,currentPath:a,openPaths:c,onOpenDocument:u,onSourceChange:o,viewSwitch:l}=e,{labels:s,sources:h,trees:f,documents:d,announcer:p}=y.useExplorer(),{settings:x,advance:g}=Wn(),b=r.useMemo(()=>O.visibleTreeSettingDescriptors(t==="tree"),[t]),T=t==="tree"&&x.selectionMode==="multiple";gn(T);const R=e.mode==="tree"?e.tray.onGatheredChange:null,N=e.mode==="tree"?e.onOpenSelection:void 0,L=e.mode==="tree"&&T?e.tray.gathered:ue,A=r.useCallback(C=>{const V=g(C);return V.selectionMode!=="multiple"&&R?.(ue),V},[g,R]),_=Xn({settings:x,descriptors:b,onAdvance:A}),S=r.useCallback(C=>R?.(V=>xn(V,C)),[R]),E=r.useCallback(C=>R?.(V=>wn(V,C)),[R]),k=r.useCallback(()=>R?.(ue),[R]),v=r.useRef(null),j=r.useCallback(()=>{const C=v.current;if(C===null)return;[Un,Gn,'[data-testid="markdown-explorer-tree-settings"]'].map(I=>C.querySelector(I)).find(I=>I!==null)?.focus()},[]),M=r.useMemo(()=>new Set(L.keys()),[L]),Y=r.useMemo(()=>a===null?Ne:new Set([a]),[a]),F=r.useMemo(()=>{if(t==="multi")return{mode:"multiple",items:c,shownPath:null,onChange:null};switch(x.selectionMode){case"single":return{mode:"single",items:Y,shownPath:a,onChange:null};case"multiple":return{mode:"multiple",items:M,shownPath:a,onChange:S};case"none":return{mode:"none",items:Ne,shownPath:null,onChange:null}}},[t,c,x.selectionMode,Y,a,M,S]),Z=r.useMemo(()=>x.revealDocument?{path:a,openFolders:!0}:{path:F.shownPath,openFolders:!1},[x.revealDocument,a,F.shownPath]),[H,Q]=r.useState(null),[$,J]=r.useState(!1),[B,X]=r.useState(null),P=r.useRef(!1),z=r.useCallback(async()=>{if(!P.current){P.current=!0,J(!0),X(null);try{const C=await f.refresh(n);if(C.status==="superseded")return;d.invalidate(),C.status==="failed"?X({sourceId:n,failure:C.failure}):p.announce(s.treeRefreshed)}finally{P.current=!1,J(!1)}}},[f,d,n,p,s]),ne=H===null?null:H.expandAll,ee=H?.expanding===!0,le=h.find(C=>C.id===n),re=l.target==="multi"?wt:ht,W=l.target==="multi"?s.switchToMulti:s.switchToTree;return i.jsxs("nav",{ref:v,"aria-label":s.explorerRegion,className:"aqmx-explorer","data-testid":"markdown-explorer-explorer","data-aqmx-mode":t,children:[i.jsxs("div",{className:"aqmx-explorer-header",children:[h.length>1?i.jsx("select",{className:"aqmx-explorer-source","aria-label":s.sourceLabel,title:le?.label,value:n,onChange:C=>o(C.currentTarget.value),"data-testid":"markdown-explorer-source-select",children:h.map(C=>i.jsx("option",{value:C.id,children:C.label},C.id))}):null,i.jsxs("div",{className:"aqmx-explorer-actions",children:[i.jsx(y.ExplorerLink,{to:l.href,navigation:"switch-view",className:"aqmx-icon-button","aria-label":W,title:W,"data-testid":"markdown-explorer-view-switch","data-aqmx-target":l.target,children:i.jsx(re,{"aria-hidden":"true"})}),i.jsxs("button",{type:"button",className:"aqmx-icon-button aqmx-labelled-button",title:s.refreshTree,"aria-disabled":$,"aria-busy":$,"data-aqmx-busy":$?"true":void 0,"data-testid":"markdown-explorer-refresh",onClick:()=>{z()},children:[i.jsx(y.ForwardRef,{"aria-hidden":"true"}),i.jsx("span",{children:s.refreshTreeLabel})]}),i.jsx("button",{type:"button",className:"aqmx-icon-button","aria-label":s.expandAll,title:s.expandAll,"aria-disabled":ne===null||ee,"aria-busy":ee,"data-aqmx-busy":ee?"true":void 0,"data-testid":"markdown-explorer-expand-all",onClick:()=>ne?.(),children:i.jsx(mt,{"aria-hidden":"true"})}),i.jsx("button",{type:"button",className:"aqmx-icon-button","aria-label":s.collapseAll,title:s.collapseAll,"aria-disabled":H===null,"data-testid":"markdown-explorer-collapse-all",onClick:()=>H?.collapseAll(),children:i.jsx(dt,{"aria-hidden":"true"})}),_.trigger]})]}),i.jsxs("div",{className:"aqmx-explorer-body","data-aqmx-explorer-body":"",children:[B!==null&&B.sourceId===n?i.jsx("p",{role:"alert",className:"aqmx-explorer-refresh-failure","data-testid":"markdown-explorer-refresh-failure","data-aqmx-failure":B.failure.reason,children:s.treeRefreshFailed(y.failureTitleOf(s,B.failure.reason))}):null,i.jsx(r.Suspense,{fallback:null,children:i.jsx(gt,{})}),i.jsx(mn,{mode:t,sourceId:n,settings:x,reveal:Z,openPaths:c,selection:F,onOpenDocument:u,onControls:Q},n),T&&L.size>0?i.jsx(hn,{selection:L,onRemove:E,onClear:k,onOpenSelection:N,onLeave:j}):null,_.menu]})]})},ze="(pointer: coarse)",Qn=e=>{const t=window.matchMedia(ze);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},Jn=()=>window.matchMedia(ze).matches,er=()=>!1,tr=()=>r.useSyncExternalStore(Qn,Jn,er);function nr({title:e,titleId:t,...n},a){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",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",clipRule:"evenodd"}))}const rr=m.forwardRef(nr),ar=({explorer:e,toggleRef:t,covered:n,onNoticeSlotChange:a,dismissals:c})=>{const{labels:u}=y.useExplorer(),o=ct.useLocation(),{location:l}=y.useExplorerLocation(),[s,h]=r.useState(!1),[f,d]=r.useState({navigated:o,source:l.source}),[p,x]=r.useState(!1);f.navigated!==o&&(d({navigated:o,source:l.source}),f.source===l.source&&!p&&h(!1));const[g,b]=r.useState(c);g!==c&&(b(c),h(!1));const T=r.useRef(null),R=r.useRef(null),N=r.useRef(null),L=r.useRef(!1),A=r.useId();r.useLayoutEffect(()=>{const v=T.current;v!==null&&(s&&!v.open?(v.showModal(),R.current?.focus()):!s&&v.open&&(v.close(),t.current?.focus()),a(s?N.current:null))},[s,t,a]),r.useLayoutEffect(()=>()=>a(null),[a]);const _=r.useCallback(v=>{v.key!=="Escape"||v.defaultPrevented||(xe(v),h(!1))},[]),S=r.useCallback(v=>{L.current=v.target===v.currentTarget},[]),E=r.useCallback(v=>{const j=L.current;L.current=!1,j&&v.target===v.currentTarget&&h(!1)},[]),k=r.useCallback(()=>{h(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"aqmx-sheet-bar",inert:n,children:i.jsxs("button",{ref:t,type:"button",className:"aqmx-sheet-toggle","aria-haspopup":"dialog","aria-expanded":s,"aria-controls":A,"data-testid":"markdown-explorer-sheet-toggle",onClick:()=>h(!0),children:[i.jsx(rr,{"aria-hidden":"true"}),i.jsx("span",{children:u.showExplorer})]})}),i.jsx("dialog",{ref:T,id:A,className:"aqmx-sheet","aria-label":u.explorerRegion,"data-testid":"markdown-explorer-sheet",onKeyDown:_,onPointerDown:S,onClick:E,onClose:k,children:i.jsxs("div",{className:"aqmx-sheet-panel",children:[i.jsxs("div",{className:"aqmx-sheet-header",children:[i.jsx("div",{ref:N,className:"aqmx-sheet-notice-slot"}),i.jsx("button",{ref:R,type:"button",className:"aqmx-sheet-close","aria-label":u.hideExplorer,title:u.hideExplorer,"data-testid":"markdown-explorer-sheet-close",onClick:()=>h(!1),children:i.jsx(Ze,{"aria-hidden":"true"})})]}),i.jsx("div",{className:"aqmx-sheet-body",children:i.jsx(he,{value:s,children:i.jsx($e,{value:x,children:e})})}),i.jsx(y.LiveRegion,{holds:s,testId:"markdown-explorer-sheet-announcer"})]})})]})},Ve=r.createContext(null),we="aqmx-explorer",Ke="aqmx-content",ge='[role="tree"] [role="treeitem"]',lr=`${ge}[tabindex="0"]`,or="[data-directory-tree-tab-stop]",sr=(e,t)=>{for(const n of e.querySelectorAll(`[data-panel-id="${we}"] ${ge}`))if(n.getAttribute(te)===t)return n;return null},Pe=(e,t)=>({inlineSize:e>0?e:null,rootFontPixels:t>0?t:O.ASSUMED_ROOT_FONT_PIXELS}),cr=(e,t)=>{const[n,a]=r.useState(()=>Pe(0,0));return r.useLayoutEffect(()=>{const c=e.current,u=t.current;if(c===null||u===null)throw new Error("[markdown-explorer] the split frame is not mounted");const o={frame:c.getBoundingClientRect().width,rem:u.getBoundingClientRect().width},l=()=>{const h=Pe(o.frame,o.rem);a(f=>f.inlineSize===h.inlineSize&&f.rootFontPixels===h.rootFontPixels?f:h)};l();const s=new ResizeObserver(h=>{for(const f of h){const[d]=f.borderBoxSize;d!==void 0&&(f.target===c&&(o.frame=d.inlineSize),f.target===u&&(o.rem=d.inlineSize))}l()});return s.observe(c),s.observe(u),()=>s.disconnect()},[e,t]),n},Xe=e=>`aqmx-split-handle-${e}`,ir=(e,{frameRef:t,sheetToggleRef:n,handleId:a})=>{const c=r.useRef(!1),u=r.useRef(null),o=r.useRef(!1);r.useLayoutEffect(()=>{const s=t.current;if(s===null)throw new Error("[markdown-explorer] the split frame is not mounted");const h=d=>{const p=d.target instanceof Element?d.target:null;c.current=p!==null&&p.closest(`[data-panel-id="${Ke}"]`)===null,!o.current&&(u.current=p?.closest(`${ge}[${te}]`)?.getAttribute(te)??null)},f=d=>{d.relatedTarget instanceof Node&&!s.contains(d.relatedTarget)&&(c.current=!1)};return s.addEventListener("focusin",h),s.addEventListener("focusout",f),()=>{s.removeEventListener("focusin",h),s.removeEventListener("focusout",f)}},[t]);const l=r.useRef(e);r.useLayoutEffect(()=>{if(l.current===e)return;l.current=e;const s=t.current;if(s===null||!c.current)return;const h=f=>{const{activeElement:d,body:p}=s.ownerDocument;if(d!==null&&d!==p)return;const x=f.find(g=>g!==null);if(x!=null){o.current=!0;try{x.focus()}finally{o.current=!1}}};if(e){h([n.current]);return}queueMicrotask(()=>{if(l.current!==e||!c.current)return;const f=u.current,d=`[data-panel-id="${we}"]`;h([f===null?null:sr(s,f),s.querySelector(`${d} ${lr}`),s.querySelector(`${d} ${or}`),s.querySelector(`[data-resize-handle-id="${a}"]`)])})},[e,t,n,a])},ur=({view:e,explorer:t,content:n,contentCoversPage:a=!1,sheetDismissals:c=0,onDraggingChange:u})=>{const o=r.useRef(null),[l,s]=r.useState(null),h=r.useRef(null),f=r.useRef(null),{inlineSize:d,rootFontPixels:p}=cr(o,h),x=d!==null&&d<O.explorerSheetBelowPixels(p);return ir(x,{frameRef:o,sheetToggleRef:f,handleId:Xe(e)}),i.jsxs("div",{ref:o,className:"aqmx-split-frame","data-aqmx-explorer-mode":x?"sheet":"split",children:[i.jsx("span",{ref:h,className:"aqmx-rem-probe","aria-hidden":"true","data-aqmx-rem-probe":""}),x?i.jsx(ar,{explorer:t,toggleRef:f,covered:a,onNoticeSlotChange:s,dismissals:c}):null,i.jsx(Ve,{value:x?l:null,children:i.jsx(dr,{view:e,sheet:x,explorer:t,content:n,contentCoversPage:a,onDraggingChange:u,explorerMinPixels:O.explorerMinPixels(p)})})]})},dr=({view:e,sheet:t,explorer:n,content:a,contentCoversPage:c,onDraggingChange:u,explorerMinPixels:o})=>{const{viewSettings:l,labels:s}=y.useExplorer(),f=y.useViewSetting(E=>e==="tree"?E.treeExplorer:E.multiExplorer)??(e==="tree"?O.EXPLORER_DEFAULT_PERCENT:O.EXPLORER_MULTI_DEFAULT_PERCENT),d=r.useRef(null),p=r.useRef(null),x=r.useRef(!1),g=r.useRef(!1),[b,T]=r.useState(!1),R=r.useRef(u);r.useLayoutEffect(()=>{R.current=u},[u]);const N=r.useCallback(()=>{const E=d.current;if(E===null||E.length!==2)return;const[k=0,v=0]=E,j=k+v;if(j<=0||k<=0)return;const M=Math.min(O.EXPLORER_MAX_PERCENT,k/j*100);l.update(e==="tree"?{treeExplorer:M}:{multiExplorer:M})},[l,e]),L=r.useCallback(()=>{p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,N()},O.EXPLORER_WIDTH_PERSIST_DELAY_MS)},[N]);r.useEffect(()=>()=>{p.current!==null&&clearTimeout(p.current),g.current&&R.current?.(!1)},[]);const A=tr(),_=r.useCallback((E,k)=>{d.current=E;const[v=0,j=0]=E;E.length===2&&j>0&&T(v<=0),k.source==="keyboard"?L():k.source==="pointer"&&(x.current=!0)},[L]),S=r.useCallback(E=>{if(g.current=E,u?.(E),E){x.current=!1;return}x.current&&(x.current=!1,L())},[u,L]);return i.jsxs(ie.PanelGroup,{id:`aqmx-split-${e}`,direction:"horizontal",onLayout:_,className:"aqmx-split","data-aqmx-split":e,children:[t?null:i.jsx(ie.Panel,{id:we,defaultSize:{value:f,unit:"percentage"},minSize:{value:o,unit:"pixels"},maxSize:{value:O.EXPLORER_MAX_PERCENT,unit:"percentage"},collapsible:{from:"end"},pixelAdjustPriority:1,inert:c,className:"aqmx-split-explorer",children:i.jsx(he,{value:!b,children:n})}),t?null:i.jsx(ie.PanelResizeHandle,{id:Xe(e),thickness:A?O.COARSE_TARGET_PIXELS:O.FINE_TARGET_PIXELS,indicator:{visible:!0,thickness:O.SPLIT_HANDLE_PIXELS.gripThickness,length:O.SPLIT_HANDLE_PIXELS.gripLength,barThickness:O.SPLIT_HANDLE_PIXELS.barThickness,barLength:O.SPLIT_HANDLE_PIXELS.barLength},title:s.resizeExplorer,"aria-label":s.resizeExplorer,onDragging:S,inert:c,className:"aqmx-split-handle"}),i.jsx(ie.Panel,{id:Ke,defaultSize:{value:100-f,unit:"percentage"},contentOverflow:"hidden",className:"aqmx-split-content",...c?{style:{isolation:"auto"}}:{},children:a})]})};exports.EMPTY_SELECTION=ue;exports.ExplorerPane=Yn;exports.ExplorerSplit=ur;exports.SheetNoticeSlotContext=Ve;
|