@lincyaw/aegis-ui 0.8.0 → 0.9.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/dist/components/ui/AgentHud.cjs +2 -0
- package/dist/components/ui/AgentHud.cjs.map +1 -0
- package/dist/components/ui/AgentHud.d.ts +23 -0
- package/dist/components/ui/AgentHud.js +45 -0
- package/dist/components/ui/AgentHud.js.map +1 -0
- package/dist/components/ui/ChartLegend.cjs +1 -1
- package/dist/components/ui/ChartLegend.cjs.map +1 -1
- package/dist/components/ui/ChartLegend.d.ts +2 -0
- package/dist/components/ui/ChartLegend.js +11 -10
- package/dist/components/ui/ChartLegend.js.map +1 -1
- package/dist/components/ui/ColumnChart.cjs +2 -0
- package/dist/components/ui/ColumnChart.cjs.map +1 -0
- package/dist/components/ui/ColumnChart.d.ts +46 -0
- package/dist/components/ui/ColumnChart.js +154 -0
- package/dist/components/ui/ColumnChart.js.map +1 -0
- package/dist/components/ui/DotRangeChart.cjs +2 -0
- package/dist/components/ui/DotRangeChart.cjs.map +1 -0
- package/dist/components/ui/DotRangeChart.d.ts +44 -0
- package/dist/components/ui/DotRangeChart.js +80 -0
- package/dist/components/ui/DotRangeChart.js.map +1 -0
- package/dist/components/ui/HeadlineStat.cjs +2 -0
- package/dist/components/ui/HeadlineStat.cjs.map +1 -0
- package/dist/components/ui/HeadlineStat.d.ts +10 -0
- package/dist/components/ui/HeadlineStat.js +22 -0
- package/dist/components/ui/HeadlineStat.js.map +1 -0
- package/dist/components/ui/Heatmap.cjs +2 -0
- package/dist/components/ui/Heatmap.cjs.map +1 -0
- package/dist/components/ui/Heatmap.d.ts +52 -0
- package/dist/components/ui/Heatmap.js +82 -0
- package/dist/components/ui/Heatmap.js.map +1 -0
- package/dist/components/ui/KeyMomentCard.cjs +2 -0
- package/dist/components/ui/KeyMomentCard.cjs.map +1 -0
- package/dist/components/ui/KeyMomentCard.d.ts +19 -0
- package/dist/components/ui/KeyMomentCard.js +45 -0
- package/dist/components/ui/KeyMomentCard.js.map +1 -0
- package/dist/components/ui/LineChart.cjs +2 -0
- package/dist/components/ui/LineChart.cjs.map +1 -0
- package/dist/components/ui/LineChart.d.ts +48 -0
- package/dist/components/ui/LineChart.js +199 -0
- package/dist/components/ui/LineChart.js.map +1 -0
- package/dist/components/ui/ParetoChart.cjs +1 -1
- package/dist/components/ui/ParetoChart.cjs.map +1 -1
- package/dist/components/ui/ParetoChart.d.ts +34 -2
- package/dist/components/ui/ParetoChart.js +250 -173
- package/dist/components/ui/ParetoChart.js.map +1 -1
- package/dist/components/ui/RankBar.cjs +1 -1
- package/dist/components/ui/RankBar.cjs.map +1 -1
- package/dist/components/ui/RankBar.d.ts +7 -3
- package/dist/components/ui/RankBar.js +64 -45
- package/dist/components/ui/RankBar.js.map +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs.map +1 -1
- package/dist/components/ui/ReplayStepStrip.d.ts +13 -1
- package/dist/components/ui/ReplayStepStrip.js +99 -76
- package/dist/components/ui/ReplayStepStrip.js.map +1 -1
- package/dist/components/ui/ResultMatrix.cjs +2 -0
- package/dist/components/ui/ResultMatrix.cjs.map +1 -0
- package/dist/components/ui/ResultMatrix.d.ts +23 -0
- package/dist/components/ui/ResultMatrix.js +53 -0
- package/dist/components/ui/ResultMatrix.js.map +1 -0
- package/dist/components/ui/ScrollStory.cjs +2 -2
- package/dist/components/ui/ScrollStory.cjs.map +1 -1
- package/dist/components/ui/ScrollStory.d.ts +3 -1
- package/dist/components/ui/ScrollStory.js +34 -32
- package/dist/components/ui/ScrollStory.js.map +1 -1
- package/dist/components/ui/SeriesLabel.cjs +2 -0
- package/dist/components/ui/SeriesLabel.cjs.map +1 -0
- package/dist/components/ui/SeriesLabel.d.ts +21 -0
- package/dist/components/ui/SeriesLabel.js +38 -0
- package/dist/components/ui/SeriesLabel.js.map +1 -0
- package/dist/components/ui/StackedBar.cjs +1 -1
- package/dist/components/ui/StackedBar.cjs.map +1 -1
- package/dist/components/ui/StackedBar.d.ts +13 -1
- package/dist/components/ui/StackedBar.js +95 -74
- package/dist/components/ui/StackedBar.js.map +1 -1
- package/dist/components/ui/TableOfContents.cjs +1 -1
- package/dist/components/ui/TableOfContents.cjs.map +1 -1
- package/dist/components/ui/TableOfContents.js +31 -89
- package/dist/components/ui/TableOfContents.js.map +1 -1
- package/dist/components/ui/ThoughtCard.cjs +2 -0
- package/dist/components/ui/ThoughtCard.cjs.map +1 -0
- package/dist/components/ui/ThoughtCard.d.ts +23 -0
- package/dist/components/ui/ThoughtCard.js +55 -0
- package/dist/components/ui/ThoughtCard.js.map +1 -0
- package/dist/components/ui/index.d.ts +20 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useSectionSpy.cjs +2 -0
- package/dist/hooks/useSectionSpy.cjs.map +1 -0
- package/dist/hooks/useSectionSpy.d.ts +23 -0
- package/dist/hooks/useSectionSpy.js +78 -0
- package/dist/hooks/useSectionSpy.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +337 -310
- package/dist/index.js.map +1 -1
- package/dist/layouts/site/SiteAnchorNav.cjs +2 -0
- package/dist/layouts/site/SiteAnchorNav.cjs.map +1 -0
- package/dist/layouts/site/SiteAnchorNav.d.ts +22 -0
- package/dist/layouts/site/SiteAnchorNav.js +51 -0
- package/dist/layouts/site/SiteAnchorNav.js.map +1 -0
- package/dist/layouts/site/SiteSectionHeader.cjs +2 -0
- package/dist/layouts/site/SiteSectionHeader.cjs.map +1 -0
- package/dist/layouts/site/SiteSectionHeader.d.ts +20 -0
- package/dist/layouts/site/SiteSectionHeader.js +30 -0
- package/dist/layouts/site/SiteSectionHeader.js.map +1 -0
- package/dist/layouts/site/index.d.ts +4 -0
- package/dist/lib/chart.cjs +1 -1
- package/dist/lib/chart.cjs.map +1 -1
- package/dist/lib/chart.d.ts +8 -2
- package/dist/lib/chart.js +20 -16
- package/dist/lib/chart.js.map +1 -1
- package/dist/locale/strings.cjs +1 -1
- package/dist/locale/strings.cjs.map +1 -1
- package/dist/locale/strings.d.ts +2 -0
- package/dist/locale/strings.js +2 -0
- package/dist/locale/strings.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,104 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { activationRootMargin as B, findCurrentIndex as j, scrollerOf as h, viewBoundsOf as K } from "../../lib/scrollView.js";
|
|
1
|
+
import { jsx as i, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useSectionSpy as m } from "../../hooks/useSectionSpy.js";
|
|
4
3
|
/* empty css */
|
|
5
|
-
import { useStrings as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Math.max(f, 0),
|
|
14
|
-
c.scrollHeight - c.clientHeight
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
function U({
|
|
18
|
-
items: r,
|
|
19
|
-
currentId: a,
|
|
20
|
-
onCurrentChange: c,
|
|
21
|
-
scrollContainer: o = null,
|
|
22
|
-
className: f
|
|
4
|
+
import { useStrings as h } from "../../locale/useStrings.js";
|
|
5
|
+
const k = 25;
|
|
6
|
+
function j({
|
|
7
|
+
items: e,
|
|
8
|
+
currentId: o,
|
|
9
|
+
onCurrentChange: s,
|
|
10
|
+
scrollContainer: c = null,
|
|
11
|
+
className: t
|
|
23
12
|
}) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, []);
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const T = document.getElementById(i);
|
|
34
|
-
return T ? [T] : [];
|
|
35
|
-
});
|
|
36
|
-
if (t.length === 0)
|
|
37
|
-
return;
|
|
38
|
-
const e = () => {
|
|
39
|
-
const i = d.current;
|
|
40
|
-
if (i) {
|
|
41
|
-
if (!i.settled || y(o, i.top))
|
|
42
|
-
return;
|
|
43
|
-
d.current = null;
|
|
44
|
-
}
|
|
45
|
-
I(
|
|
46
|
-
t[j(t, o, w)].id
|
|
47
|
-
);
|
|
48
|
-
}, n = () => {
|
|
49
|
-
d.current && (d.current = { ...d.current, settled: !0 }), e();
|
|
50
|
-
}, s = new IntersectionObserver(e, {
|
|
51
|
-
root: o,
|
|
52
|
-
rootMargin: B(w)
|
|
53
|
-
});
|
|
54
|
-
for (const i of t)
|
|
55
|
-
s.observe(i);
|
|
56
|
-
const l = o ?? document;
|
|
57
|
-
return l.addEventListener("scrollend", n), () => {
|
|
58
|
-
s.disconnect(), l.removeEventListener("scrollend", n);
|
|
59
|
-
};
|
|
60
|
-
}, [k, o, I]);
|
|
61
|
-
const M = (t, e) => {
|
|
62
|
-
if (t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey)
|
|
63
|
-
return;
|
|
64
|
-
t.preventDefault(), e !== _ && c?.(e), p.current = e, b(e);
|
|
65
|
-
const n = document.getElementById(e);
|
|
66
|
-
if (!n)
|
|
67
|
-
return;
|
|
68
|
-
window.history.replaceState(window.history.state, "", `#${e}`), n.hasAttribute("tabindex") || (n.tabIndex = -1), n.focus({ preventScroll: !0 });
|
|
69
|
-
const s = $(n, o), l = y(o, s);
|
|
70
|
-
d.current = {
|
|
71
|
-
top: s,
|
|
72
|
-
settled: l || !("onscrollend" in window)
|
|
73
|
-
}, !l && h(o).scrollTo({
|
|
74
|
-
top: s,
|
|
75
|
-
behavior: window.matchMedia(D).matches ? "instant" : "smooth"
|
|
76
|
-
});
|
|
77
|
-
}, N = ["aegis-toc", f ?? ""].filter(Boolean).join(" ");
|
|
78
|
-
return /* @__PURE__ */ u("nav", { "aria-label": S.tableOfContents, className: N, children: /* @__PURE__ */ u("ol", { className: "aegis-toc__list", children: r.map((t) => {
|
|
79
|
-
const e = t.id === _, n = t.level ?? 1, s = [
|
|
13
|
+
const r = h(), { activeId: d, onLinkClick: _ } = m({
|
|
14
|
+
ids: e.map((n) => n.id),
|
|
15
|
+
activationPercent: k,
|
|
16
|
+
currentId: o,
|
|
17
|
+
onCurrentChange: s,
|
|
18
|
+
scrollContainer: c
|
|
19
|
+
}), p = ["aegis-toc", t ?? ""].filter(Boolean).join(" ");
|
|
20
|
+
return /* @__PURE__ */ i("nav", { "aria-label": r.tableOfContents, className: p, children: /* @__PURE__ */ i("ol", { className: "aegis-toc__list", children: e.map((n) => {
|
|
21
|
+
const l = n.id === d, a = n.level ?? 1, u = [
|
|
80
22
|
"aegis-toc__link",
|
|
81
|
-
|
|
82
|
-
|
|
23
|
+
l ? "aegis-toc__link--current" : "",
|
|
24
|
+
a > 1 ? `aegis-toc__link--level-${a}` : ""
|
|
83
25
|
].filter(Boolean).join(" ");
|
|
84
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ g(
|
|
85
27
|
"a",
|
|
86
28
|
{
|
|
87
|
-
href: `#${
|
|
88
|
-
className:
|
|
89
|
-
"aria-current":
|
|
90
|
-
onClick: (
|
|
91
|
-
|
|
29
|
+
href: `#${n.id}`,
|
|
30
|
+
className: u,
|
|
31
|
+
"aria-current": l ? "location" : void 0,
|
|
32
|
+
onClick: (f) => {
|
|
33
|
+
_(f, n.id);
|
|
92
34
|
},
|
|
93
35
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ i("span", { className: "aegis-toc__indicator", "aria-hidden": "true" }),
|
|
37
|
+
/* @__PURE__ */ i("span", { className: "aegis-toc__label", children: n.label })
|
|
96
38
|
]
|
|
97
39
|
}
|
|
98
|
-
) },
|
|
40
|
+
) }, n.id);
|
|
99
41
|
}) }) });
|
|
100
42
|
}
|
|
101
43
|
export {
|
|
102
|
-
|
|
44
|
+
j as TableOfContents
|
|
103
45
|
};
|
|
104
46
|
//# sourceMappingURL=TableOfContents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableOfContents.js","sources":["../../../src/components/ui/TableOfContents.tsx"],"sourcesContent":["import {\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n activationRootMargin,\n findCurrentIndex,\n scrollerOf,\n viewBoundsOf,\n} from '../../lib/scrollView';\nimport { useStrings } from '../../locale';\nimport './TableOfContents.css';\n\nexport interface TableOfContentsItem {\n /** The id of the section element, already in the document, the item links to. */\n id: string;\n label: ReactNode;\n /** Nesting depth of the section; 2 and 3 indent the label. Defaults to 1. */\n level?: 1 | 2 | 3;\n}\n\nexport interface TableOfContentsProps {\n /** The sections in document order. */\n items: TableOfContentsItem[];\n /** Controls the current item; omit it to follow the scroll position. */\n currentId?: string;\n /** Called with the id that scrolling or a click makes current. */\n onCurrentChange?: (id: string) => void;\n /** The element that scrolls the sections; omitted or null means the viewport. */\n scrollContainer?: HTMLElement | null;\n className?: string;\n}\n\n/** A section becomes current once its top passes this share of the view. */\nconst ACTIVATION_PERCENT = 25;\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * The section a click scrolled to keeps the highlight while the scroll\n * runs (`settled` false until scrollend) and afterwards for as long as the\n * view stays at `top`, even if the geometry would pick another section.\n */\ninterface ClickScroll {\n top: number;\n settled: boolean;\n}\n\nfunction isScrolledTo(container: HTMLElement | null, top: number): boolean {\n return Math.abs(scrollerOf(container).scrollTop - top) < 1;\n}\n\n/** The scroll offset that puts the section's top, less its scroll-margin, at the top of the view. */\nfunction sectionScrollTop(\n section: HTMLElement,\n container: HTMLElement | null,\n): number {\n const scroller = scrollerOf(container);\n const margin = parseFloat(getComputedStyle(section).scrollMarginTop);\n const top =\n section.getBoundingClientRect().top -\n viewBoundsOf(container).top +\n scroller.scrollTop -\n margin;\n return Math.min(\n Math.max(top, 0),\n scroller.scrollHeight - scroller.clientHeight,\n );\n}\n\nexport function TableOfContents({\n items,\n currentId,\n onCurrentChange,\n scrollContainer = null,\n className,\n}: TableOfContentsProps): ReactElement {\n const strings = useStrings();\n const [trackedId, setTrackedId] = useState(() => items[0]?.id);\n const trackedIdRef = useRef(trackedId);\n const onCurrentChangeRef = useRef(onCurrentChange);\n const clickScrollRef = useRef<ClickScroll | null>(null);\n const activeId = currentId ?? trackedId;\n const sectionIds = items.map((item) => item.id).join(' ');\n\n useEffect(() => {\n onCurrentChangeRef.current = onCurrentChange;\n }, [onCurrentChange]);\n\n const track = useCallback((id: string): void => {\n if (id === trackedIdRef.current) {\n return;\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n onCurrentChangeRef.current?.(id);\n }, []);\n\n useEffect(() => {\n const sections = sectionIds.split(' ').flatMap((id) => {\n const section = document.getElementById(id);\n return section ? [section] : [];\n });\n if (sections.length === 0) {\n return undefined;\n }\n const sync = (): void => {\n const clickScroll = clickScrollRef.current;\n if (clickScroll) {\n if (\n !clickScroll.settled ||\n isScrolledTo(scrollContainer, clickScroll.top)\n ) {\n return;\n }\n clickScrollRef.current = null;\n }\n track(\n sections[\n findCurrentIndex(sections, scrollContainer, ACTIVATION_PERCENT)\n ].id,\n );\n };\n /* A jump can skip the activation band without an intersection change,\n * so the settled position is checked again. */\n const handleScrollEnd = (): void => {\n if (clickScrollRef.current) {\n clickScrollRef.current = { ...clickScrollRef.current, settled: true };\n }\n sync();\n };\n const observer = new IntersectionObserver(sync, {\n root: scrollContainer,\n rootMargin: activationRootMargin(ACTIVATION_PERCENT),\n });\n for (const section of sections) {\n observer.observe(section);\n }\n const scrollEvents: EventTarget = scrollContainer ?? document;\n scrollEvents.addEventListener('scrollend', handleScrollEnd);\n return () => {\n observer.disconnect();\n scrollEvents.removeEventListener('scrollend', handleScrollEnd);\n };\n }, [sectionIds, scrollContainer, track]);\n\n const handleClick = (\n event: MouseEvent<HTMLAnchorElement>,\n id: string,\n ): void => {\n if (\n event.button !== 0 ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey\n ) {\n return;\n }\n event.preventDefault();\n if (id !== activeId) {\n onCurrentChange?.(id);\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n const section = document.getElementById(id);\n if (!section) {\n return;\n }\n // As an in-page link does: the URL names the section, and the next Tab\n // continues from the section rather than from the contents.\n window.history.replaceState(window.history.state, '', `#${id}`);\n if (!section.hasAttribute('tabindex')) {\n section.tabIndex = -1;\n }\n section.focus({ preventScroll: true });\n const top = sectionScrollTop(section, scrollContainer);\n const arrived = isScrolledTo(scrollContainer, top);\n /* Without scrollend support nothing would settle the click. */\n clickScrollRef.current = {\n top,\n settled: arrived || !('onscrollend' in window),\n };\n if (arrived) {\n return;\n }\n scrollerOf(scrollContainer).scrollTo({\n top,\n behavior: window.matchMedia(REDUCED_MOTION).matches\n ? 'instant'\n : 'smooth',\n });\n };\n\n const cls = ['aegis-toc', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <nav aria-label={strings.tableOfContents} className={cls}>\n <ol className=\"aegis-toc__list\">\n {items.map((item) => {\n const current = item.id === activeId;\n const level = item.level ?? 1;\n const linkCls = [\n 'aegis-toc__link',\n current ? 'aegis-toc__link--current' : '',\n level > 1 ? `aegis-toc__link--level-${level}` : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <li key={item.id}>\n <a\n href={`#${item.id}`}\n className={linkCls}\n aria-current={current ? 'location' : undefined}\n onClick={(event) => {\n handleClick(event, item.id);\n }}\n >\n <span className=\"aegis-toc__indicator\" aria-hidden=\"true\" />\n <span className=\"aegis-toc__label\">{item.label}</span>\n </a>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"names":["ACTIVATION_PERCENT","REDUCED_MOTION","isScrolledTo","container","top","scrollerOf","sectionScrollTop","section","scroller","margin","viewBoundsOf","TableOfContents","items","currentId","onCurrentChange","scrollContainer","className","strings","useStrings","trackedId","setTrackedId","useState","trackedIdRef","useRef","onCurrentChangeRef","clickScrollRef","activeId","sectionIds","item","useEffect","track","useCallback","id","sections","sync","clickScroll","findCurrentIndex","handleScrollEnd","observer","activationRootMargin","scrollEvents","handleClick","event","arrived","cls","jsx","current","level","linkCls","jsxs"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"TableOfContents.js","sources":["../../../src/components/ui/TableOfContents.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\n\nimport { useSectionSpy } from '../../hooks/useSectionSpy';\nimport { useStrings } from '../../locale';\nimport './TableOfContents.css';\n\nexport interface TableOfContentsItem {\n /** The id of the section element, already in the document, the item links to. */\n id: string;\n label: ReactNode;\n /** Nesting depth of the section; 2 and 3 indent the label. Defaults to 1. */\n level?: 1 | 2 | 3;\n}\n\nexport interface TableOfContentsProps {\n /** The sections in document order. */\n items: TableOfContentsItem[];\n /** Controls the current item; omit it to follow the scroll position. */\n currentId?: string;\n /** Called with the id that scrolling or a click makes current. */\n onCurrentChange?: (id: string) => void;\n /** The element that scrolls the sections; omitted or null means the viewport. */\n scrollContainer?: HTMLElement | null;\n className?: string;\n}\n\n/** A section becomes current once its top passes this share of the view. */\nconst ACTIVATION_PERCENT = 25;\n\nexport function TableOfContents({\n items,\n currentId,\n onCurrentChange,\n scrollContainer = null,\n className,\n}: TableOfContentsProps): ReactElement {\n const strings = useStrings();\n const { activeId, onLinkClick } = useSectionSpy({\n ids: items.map((item) => item.id),\n activationPercent: ACTIVATION_PERCENT,\n currentId,\n onCurrentChange,\n scrollContainer,\n });\n\n const cls = ['aegis-toc', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <nav aria-label={strings.tableOfContents} className={cls}>\n <ol className=\"aegis-toc__list\">\n {items.map((item) => {\n const current = item.id === activeId;\n const level = item.level ?? 1;\n const linkCls = [\n 'aegis-toc__link',\n current ? 'aegis-toc__link--current' : '',\n level > 1 ? `aegis-toc__link--level-${level}` : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <li key={item.id}>\n <a\n href={`#${item.id}`}\n className={linkCls}\n aria-current={current ? 'location' : undefined}\n onClick={(event) => {\n onLinkClick(event, item.id);\n }}\n >\n <span className=\"aegis-toc__indicator\" aria-hidden=\"true\" />\n <span className=\"aegis-toc__label\">{item.label}</span>\n </a>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"names":["ACTIVATION_PERCENT","TableOfContents","items","currentId","onCurrentChange","scrollContainer","className","strings","useStrings","activeId","onLinkClick","useSectionSpy","item","cls","jsx","current","level","linkCls","jsxs","event"],"mappings":";;;;AA2BA,MAAMA,IAAqB;AAEpB,SAASC,EAAgB;AAAA,EAC9B,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AACF,GAAuC;AACrC,QAAMC,IAAUC,EAAA,GACV,EAAE,UAAAC,GAAU,aAAAC,EAAA,IAAgBC,EAAc;AAAA,IAC9C,KAAKT,EAAM,IAAI,CAACU,MAASA,EAAK,EAAE;AAAA,IAChC,mBAAmBZ;AAAA,IACnB,WAAAG;AAAA,IACA,iBAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,CACD,GAEKQ,IAAM,CAAC,aAAaP,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAEnE,SACE,gBAAAQ,EAAC,OAAA,EAAI,cAAYP,EAAQ,iBAAiB,WAAWM,GACnD,UAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,mBACX,UAAAZ,EAAM,IAAI,CAACU,MAAS;AACnB,UAAMG,IAAUH,EAAK,OAAOH,GACtBO,IAAQJ,EAAK,SAAS,GACtBK,IAAU;AAAA,MACd;AAAA,MACAF,IAAU,6BAA6B;AAAA,MACvCC,IAAQ,IAAI,0BAA0BA,CAAK,KAAK;AAAA,IAAA,EAE/C,OAAO,OAAO,EACd,KAAK,GAAG;AACX,6BACG,MAAA,EACC,UAAA,gBAAAE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM,IAAIN,EAAK,EAAE;AAAA,QACjB,WAAWK;AAAA,QACX,gBAAcF,IAAU,aAAa;AAAA,QACrC,SAAS,CAACI,MAAU;AAClB,UAAAT,EAAYS,GAAOP,EAAK,EAAE;AAAA,QAC5B;AAAA,QAEA,UAAA;AAAA,UAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,wBAAuB,eAAY,QAAO;AAAA,UAC1D,gBAAAA,EAAC,QAAA,EAAK,WAAU,oBAAoB,YAAK,MAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,EACjD,GAXOF,EAAK,EAYd;AAAA,EAEJ,CAAC,GACH,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("../../lib/chart.cjs");;/* empty css */function l({turn:o,clock:e,thought:d,action:t,outcome:r,outcomeColor:n="var(--text-muted)",current:c=!1,onSelect:s,className:u}){const h=["aegis-thought-card",c?"aegis-thought-card--current":"",s?"aegis-thought-card--interactive":"",u??""].filter(Boolean).join(" "),i=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"aegis-thought-card__head",children:[a.jsx("span",{className:"aegis-thought-card__turn",children:o}),e!==void 0&&a.jsx("span",{className:"aegis-thought-card__clock",children:e})]}),a.jsx("span",{className:"aegis-thought-card__thought",children:d}),t!==void 0&&a.jsx("code",{className:"aegis-thought-card__action",children:t}),r!==void 0&&a.jsxs("span",{className:"aegis-thought-card__outcome",children:[a.jsx("span",{className:"aegis-thought-card__dot",style:{"--aegis-thought-card-color":g.chartColorValue(n)},"aria-hidden":"true"}),r]})]});return s?a.jsx("button",{type:"button",className:h,"aria-current":c?"step":void 0,onClick:s,children:i}):a.jsx("div",{className:h,children:i})}exports.ThoughtCard=l;
|
|
2
|
+
//# sourceMappingURL=ThoughtCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThoughtCard.cjs","sources":["../../../src/components/ui/ThoughtCard.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement, ReactNode } from 'react';\n\nimport { type ChartColor, chartColorValue } from '../../lib/chart';\nimport './ThoughtCard.css';\n\nexport interface ThoughtCardProps {\n /** The turn or step, e.g. \"T42\". */\n turn: ReactNode;\n /** When in the replay it happened, e.g. \"06:12\". */\n clock?: ReactNode;\n /** What the agent reasoned. */\n thought: ReactNode;\n /** What it did, as recorded, e.g. `move(unit=7, to=\"E5\")`. */\n action?: ReactNode;\n /** What came of it, e.g. \"占领 E5 · +12 分\". */\n outcome?: ReactNode;\n /** The outcome's colour, the same as its kind on the replay's strip. */\n outcomeColor?: ChartColor;\n /** The turn the replay is on; earlier turns read quieter. */\n current?: boolean;\n /** Makes the card a button, e.g. one that moves the replay to the turn. */\n onSelect?: () => void;\n className?: string;\n}\n\n/** One turn of an agent's reasoning beside a replay: its thought, action and outcome. */\nexport function ThoughtCard({\n turn,\n clock,\n thought,\n action,\n outcome,\n outcomeColor = 'var(--text-muted)',\n current = false,\n onSelect,\n className,\n}: ThoughtCardProps): ReactElement {\n const cls = [\n 'aegis-thought-card',\n current ? 'aegis-thought-card--current' : '',\n onSelect ? 'aegis-thought-card--interactive' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n const body = (\n <>\n <span className=\"aegis-thought-card__head\">\n <span className=\"aegis-thought-card__turn\">{turn}</span>\n {clock !== undefined && (\n <span className=\"aegis-thought-card__clock\">{clock}</span>\n )}\n </span>\n <span className=\"aegis-thought-card__thought\">{thought}</span>\n {action !== undefined && (\n <code className=\"aegis-thought-card__action\">{action}</code>\n )}\n {outcome !== undefined && (\n <span className=\"aegis-thought-card__outcome\">\n <span\n className=\"aegis-thought-card__dot\"\n style={\n {\n '--aegis-thought-card-color': chartColorValue(outcomeColor),\n } as CSSProperties\n }\n aria-hidden=\"true\"\n />\n {outcome}\n </span>\n )}\n </>\n );\n return onSelect ? (\n <button\n type=\"button\"\n className={cls}\n aria-current={current ? 'step' : undefined}\n onClick={onSelect}\n >\n {body}\n </button>\n ) : (\n <div className={cls}>{body}</div>\n );\n}\n"],"names":["ThoughtCard","turn","clock","thought","action","outcome","outcomeColor","current","onSelect","className","cls","body","jsxs","Fragment","jsx","chartColorValue"],"mappings":"uLA0BO,SAASA,EAAY,CAC1B,KAAAC,EACA,MAAAC,EACA,QAAAC,EACA,OAAAC,EACA,QAAAC,EACA,aAAAC,EAAe,oBACf,QAAAC,EAAU,GACV,SAAAC,EACA,UAAAC,CACF,EAAmC,CACjC,MAAMC,EAAM,CACV,qBACAH,EAAU,8BAAgC,GAC1CC,EAAW,kCAAoC,GAC/CC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACLE,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAD,EAAAA,KAAC,OAAA,CAAK,UAAU,2BACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,2BAA4B,SAAAb,EAAK,EAChDC,IAAU,QACTY,EAAAA,IAAC,OAAA,CAAK,UAAU,4BAA6B,SAAAZ,CAAA,CAAM,CAAA,EAEvD,EACAY,EAAAA,IAAC,OAAA,CAAK,UAAU,8BAA+B,SAAAX,EAAQ,EACtDC,IAAW,QACVU,EAAAA,IAAC,OAAA,CAAK,UAAU,6BAA8B,SAAAV,EAAO,EAEtDC,IAAY,QACXO,OAAC,OAAA,CAAK,UAAU,8BACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CACC,UAAU,0BACV,MACE,CACE,6BAA8BC,EAAAA,gBAAgBT,CAAY,CAAA,EAG9D,cAAY,MAAA,CAAA,EAEbD,CAAA,CAAA,CACH,CAAA,EAEJ,EAEF,OAAOG,EACLM,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAWJ,EACX,eAAcH,EAAU,OAAS,OACjC,QAASC,EAER,SAAAG,CAAA,CAAA,EAGHG,EAAAA,IAAC,MAAA,CAAI,UAAWJ,EAAM,SAAAC,EAAK,CAE/B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ChartColor } from '../../lib/chart';
|
|
3
|
+
export interface ThoughtCardProps {
|
|
4
|
+
/** The turn or step, e.g. "T42". */
|
|
5
|
+
turn: ReactNode;
|
|
6
|
+
/** When in the replay it happened, e.g. "06:12". */
|
|
7
|
+
clock?: ReactNode;
|
|
8
|
+
/** What the agent reasoned. */
|
|
9
|
+
thought: ReactNode;
|
|
10
|
+
/** What it did, as recorded, e.g. `move(unit=7, to="E5")`. */
|
|
11
|
+
action?: ReactNode;
|
|
12
|
+
/** What came of it, e.g. "占领 E5 · +12 分". */
|
|
13
|
+
outcome?: ReactNode;
|
|
14
|
+
/** The outcome's colour, the same as its kind on the replay's strip. */
|
|
15
|
+
outcomeColor?: ChartColor;
|
|
16
|
+
/** The turn the replay is on; earlier turns read quieter. */
|
|
17
|
+
current?: boolean;
|
|
18
|
+
/** Makes the card a button, e.g. one that moves the replay to the turn. */
|
|
19
|
+
onSelect?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/** One turn of an agent's reasoning beside a replay: its thought, action and outcome. */
|
|
23
|
+
export declare function ThoughtCard({ turn, clock, thought, action, outcome, outcomeColor, current, onSelect, className, }: ThoughtCardProps): ReactElement;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as e, Fragment as u, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { chartColorValue as m } from "../../lib/chart.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function v({
|
|
5
|
+
turn: d,
|
|
6
|
+
clock: s,
|
|
7
|
+
thought: n,
|
|
8
|
+
action: r,
|
|
9
|
+
outcome: h,
|
|
10
|
+
outcomeColor: g = "var(--text-muted)",
|
|
11
|
+
current: c = !1,
|
|
12
|
+
onSelect: t,
|
|
13
|
+
className: l
|
|
14
|
+
}) {
|
|
15
|
+
const i = [
|
|
16
|
+
"aegis-thought-card",
|
|
17
|
+
c ? "aegis-thought-card--current" : "",
|
|
18
|
+
t ? "aegis-thought-card--interactive" : "",
|
|
19
|
+
l ?? ""
|
|
20
|
+
].filter(Boolean).join(" "), o = /* @__PURE__ */ e(u, { children: [
|
|
21
|
+
/* @__PURE__ */ e("span", { className: "aegis-thought-card__head", children: [
|
|
22
|
+
/* @__PURE__ */ a("span", { className: "aegis-thought-card__turn", children: d }),
|
|
23
|
+
s !== void 0 && /* @__PURE__ */ a("span", { className: "aegis-thought-card__clock", children: s })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ a("span", { className: "aegis-thought-card__thought", children: n }),
|
|
26
|
+
r !== void 0 && /* @__PURE__ */ a("code", { className: "aegis-thought-card__action", children: r }),
|
|
27
|
+
h !== void 0 && /* @__PURE__ */ e("span", { className: "aegis-thought-card__outcome", children: [
|
|
28
|
+
/* @__PURE__ */ a(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
className: "aegis-thought-card__dot",
|
|
32
|
+
style: {
|
|
33
|
+
"--aegis-thought-card-color": m(g)
|
|
34
|
+
},
|
|
35
|
+
"aria-hidden": "true"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
h
|
|
39
|
+
] })
|
|
40
|
+
] });
|
|
41
|
+
return t ? /* @__PURE__ */ a(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
className: i,
|
|
46
|
+
"aria-current": c ? "step" : void 0,
|
|
47
|
+
onClick: t,
|
|
48
|
+
children: o
|
|
49
|
+
}
|
|
50
|
+
) : /* @__PURE__ */ a("div", { className: i, children: o });
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
v as ThoughtCard
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=ThoughtCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThoughtCard.js","sources":["../../../src/components/ui/ThoughtCard.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement, ReactNode } from 'react';\n\nimport { type ChartColor, chartColorValue } from '../../lib/chart';\nimport './ThoughtCard.css';\n\nexport interface ThoughtCardProps {\n /** The turn or step, e.g. \"T42\". */\n turn: ReactNode;\n /** When in the replay it happened, e.g. \"06:12\". */\n clock?: ReactNode;\n /** What the agent reasoned. */\n thought: ReactNode;\n /** What it did, as recorded, e.g. `move(unit=7, to=\"E5\")`. */\n action?: ReactNode;\n /** What came of it, e.g. \"占领 E5 · +12 分\". */\n outcome?: ReactNode;\n /** The outcome's colour, the same as its kind on the replay's strip. */\n outcomeColor?: ChartColor;\n /** The turn the replay is on; earlier turns read quieter. */\n current?: boolean;\n /** Makes the card a button, e.g. one that moves the replay to the turn. */\n onSelect?: () => void;\n className?: string;\n}\n\n/** One turn of an agent's reasoning beside a replay: its thought, action and outcome. */\nexport function ThoughtCard({\n turn,\n clock,\n thought,\n action,\n outcome,\n outcomeColor = 'var(--text-muted)',\n current = false,\n onSelect,\n className,\n}: ThoughtCardProps): ReactElement {\n const cls = [\n 'aegis-thought-card',\n current ? 'aegis-thought-card--current' : '',\n onSelect ? 'aegis-thought-card--interactive' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n const body = (\n <>\n <span className=\"aegis-thought-card__head\">\n <span className=\"aegis-thought-card__turn\">{turn}</span>\n {clock !== undefined && (\n <span className=\"aegis-thought-card__clock\">{clock}</span>\n )}\n </span>\n <span className=\"aegis-thought-card__thought\">{thought}</span>\n {action !== undefined && (\n <code className=\"aegis-thought-card__action\">{action}</code>\n )}\n {outcome !== undefined && (\n <span className=\"aegis-thought-card__outcome\">\n <span\n className=\"aegis-thought-card__dot\"\n style={\n {\n '--aegis-thought-card-color': chartColorValue(outcomeColor),\n } as CSSProperties\n }\n aria-hidden=\"true\"\n />\n {outcome}\n </span>\n )}\n </>\n );\n return onSelect ? (\n <button\n type=\"button\"\n className={cls}\n aria-current={current ? 'step' : undefined}\n onClick={onSelect}\n >\n {body}\n </button>\n ) : (\n <div className={cls}>{body}</div>\n );\n}\n"],"names":["ThoughtCard","turn","clock","thought","action","outcome","outcomeColor","current","onSelect","className","cls","body","jsxs","Fragment","jsx","chartColorValue"],"mappings":";;;AA0BO,SAASA,EAAY;AAAA,EAC1B,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,WAAAC;AACF,GAAmC;AACjC,QAAMC,IAAM;AAAA,IACV;AAAA,IACAH,IAAU,gCAAgC;AAAA,IAC1CC,IAAW,oCAAoC;AAAA,IAC/CC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,GACLE,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,4BACd,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,4BAA4B,UAAAb,GAAK;AAAA,MAChDC,MAAU,UACT,gBAAAY,EAAC,QAAA,EAAK,WAAU,6BAA6B,UAAAZ,EAAA,CAAM;AAAA,IAAA,GAEvD;AAAA,IACA,gBAAAY,EAAC,QAAA,EAAK,WAAU,+BAA+B,UAAAX,GAAQ;AAAA,IACtDC,MAAW,UACV,gBAAAU,EAAC,QAAA,EAAK,WAAU,8BAA8B,UAAAV,GAAO;AAAA,IAEtDC,MAAY,UACX,gBAAAO,EAAC,QAAA,EAAK,WAAU,+BACd,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,OACE;AAAA,YACE,8BAA8BC,EAAgBT,CAAY;AAAA,UAAA;AAAA,UAG9D,eAAY;AAAA,QAAA;AAAA,MAAA;AAAA,MAEbD;AAAA,IAAA,EAAA,CACH;AAAA,EAAA,GAEJ;AAEF,SAAOG,IACL,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWJ;AAAA,MACX,gBAAcH,IAAU,SAAS;AAAA,MACjC,SAASC;AAAA,MAER,UAAAG;AAAA,IAAA;AAAA,EAAA,IAGH,gBAAAG,EAAC,OAAA,EAAI,WAAWJ,GAAM,UAAAC,GAAK;AAE/B;"}
|
|
@@ -43,7 +43,27 @@ export type { RankBarItem } from './RankBar';
|
|
|
43
43
|
export { ScoreBar } from './ScoreBar';
|
|
44
44
|
export { RunPips } from './RunPips';
|
|
45
45
|
export type { RunPipsCounts } from './RunPips';
|
|
46
|
+
export { AgentHud } from './AgentHud';
|
|
47
|
+
export type { AgentHudMeter, AgentHudProps } from './AgentHud';
|
|
46
48
|
export { ChartLegend } from './ChartLegend';
|
|
49
|
+
export { ColumnChart } from './ColumnChart';
|
|
50
|
+
export type { ColumnChartItem, ColumnChartProps } from './ColumnChart';
|
|
51
|
+
export { DotRangeChart } from './DotRangeChart';
|
|
52
|
+
export type { DotRangeChartDot, DotRangeChartItem, DotRangeChartProps, } from './DotRangeChart';
|
|
53
|
+
export { HeadlineStat } from './HeadlineStat';
|
|
54
|
+
export type { HeadlineStatProps } from './HeadlineStat';
|
|
55
|
+
export { Heatmap } from './Heatmap';
|
|
56
|
+
export type { HeatmapCell, HeatmapColumn, HeatmapProps, HeatmapRow, } from './Heatmap';
|
|
57
|
+
export { KeyMomentCard } from './KeyMomentCard';
|
|
58
|
+
export type { KeyMomentCardProps } from './KeyMomentCard';
|
|
59
|
+
export { LineChart } from './LineChart';
|
|
60
|
+
export type { LineChartMarker, LineChartPoint, LineChartProps, LineChartSeries, } from './LineChart';
|
|
61
|
+
export { ResultMatrix } from './ResultMatrix';
|
|
62
|
+
export type { ResultMatrixProps } from './ResultMatrix';
|
|
63
|
+
export { SeriesLabel } from './SeriesLabel';
|
|
64
|
+
export type { SeriesLabelProps } from './SeriesLabel';
|
|
65
|
+
export { ThoughtCard } from './ThoughtCard';
|
|
66
|
+
export type { ThoughtCardProps } from './ThoughtCard';
|
|
47
67
|
export { ReplayScrubber } from './ReplayScrubber';
|
|
48
68
|
export type { ReplayScrubberMarker, ReplayScrubberProps, } from './ReplayScrubber';
|
|
49
69
|
export { ReplayStepStrip } from './ReplayStepStrip';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { useCopyToClipboard } from './useCopyToClipboard';
|
|
2
2
|
export type { UseCopyToClipboardResult } from './useCopyToClipboard';
|
|
3
|
+
export { useMediaQuery } from './useMediaQuery';
|
|
3
4
|
export { useResizable } from './useResizable';
|
|
4
5
|
export type { UseResizableOptions, UseResizableReturn } from './useResizable';
|
|
5
6
|
export { useSavedQueries } from './useSavedQueries';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),f=require("../lib/scrollView.cjs"),E="(prefers-reduced-motion: reduce)";function I(c,o){return Math.abs(f.scrollerOf(c).scrollTop-o)<1}function M(c,o){const a=f.scrollerOf(o),u=parseFloat(getComputedStyle(c).scrollMarginTop),e=c.getBoundingClientRect().top-f.viewBoundsOf(o).top+a.scrollTop-u;return Math.min(Math.max(e,0),a.scrollHeight-a.clientHeight)}function v({ids:c,activationPercent:o,currentId:a,onCurrentChange:u,scrollContainer:e=null}){const[S,y]=l.useState(c[0]),m=l.useRef(S),h=l.useRef(u),i=l.useRef(null),b=a??S,g=c.join(" ");l.useEffect(()=>{h.current=u},[u]);const k=l.useCallback(t=>{t!==m.current&&(m.current=t,y(t),h.current?.(t))},[]);return l.useEffect(()=>{const t=g.split(" ").flatMap(s=>{const w=document.getElementById(s);return w?[w]:[]});if(t.length===0)return;const r=()=>{const s=i.current;if(s){if(!s.settled||I(e,s.top))return;i.current=null}k(t[f.findCurrentIndex(t,e,o)].id)},n=()=>{i.current&&(i.current={...i.current,settled:!0}),r()},d=new IntersectionObserver(r,{root:e,rootMargin:f.activationRootMargin(o)});for(const s of t)d.observe(s);const p=e??document;return p.addEventListener("scrollend",n),()=>{d.disconnect(),p.removeEventListener("scrollend",n)}},[g,o,e,k]),{activeId:b,onLinkClick:(t,r)=>{if(t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;t.preventDefault(),r!==b&&u?.(r),m.current=r,y(r);const n=document.getElementById(r);if(!n)return;window.history.replaceState(window.history.state,"",`#${r}`),n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0});const d=M(n,e),p=I(e,d);i.current={top:d,settled:p||!("onscrollend"in window)},!p&&f.scrollerOf(e).scrollTo({top:d,behavior:window.matchMedia(E).matches?"instant":"smooth"})}}}exports.useSectionSpy=v;
|
|
2
|
+
//# sourceMappingURL=useSectionSpy.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSectionSpy.cjs","sources":["../../src/hooks/useSectionSpy.ts"],"sourcesContent":["import {\n type MouseEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n activationRootMargin,\n findCurrentIndex,\n scrollerOf,\n viewBoundsOf,\n} from '../lib/scrollView';\n\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * The section a click scrolled to keeps the highlight while the scroll\n * runs (`settled` false until scrollend) and afterwards for as long as the\n * view stays at `top`, even if the geometry would pick another section.\n */\ninterface ClickScroll {\n top: number;\n settled: boolean;\n}\n\nfunction isScrolledTo(container: HTMLElement | null, top: number): boolean {\n return Math.abs(scrollerOf(container).scrollTop - top) < 1;\n}\n\n/** The scroll offset that puts the section's top, less its scroll-margin, at the top of the view. */\nfunction sectionScrollTop(\n section: HTMLElement,\n container: HTMLElement | null,\n): number {\n const scroller = scrollerOf(container);\n const margin = parseFloat(getComputedStyle(section).scrollMarginTop);\n const top =\n section.getBoundingClientRect().top -\n viewBoundsOf(container).top +\n scroller.scrollTop -\n margin;\n return Math.min(\n Math.max(top, 0),\n scroller.scrollHeight - scroller.clientHeight,\n );\n}\n\nexport interface UseSectionSpyOptions {\n /** The ids of the section elements, in document order. */\n ids: string[];\n /** A section becomes current once its top passes this share of the view. */\n activationPercent: number;\n /** Controls the current section; omit it to follow the scroll position. */\n currentId?: string;\n /** Called with the id that scrolling or a click makes current. */\n onCurrentChange?: (id: string) => void;\n /** The element that scrolls the sections; omitted or null means the viewport. */\n scrollContainer?: HTMLElement | null;\n}\n\nexport interface UseSectionSpyResult {\n activeId: string | undefined;\n /** Scrolls to the section as an in-page link does; a modified click stays a plain link. */\n onLinkClick: (event: MouseEvent<HTMLAnchorElement>, id: string) => void;\n}\n\n/**\n * Tracks which of a page's sections is current as the page scrolls, for a\n * nav that follows the reader through a long page.\n */\nexport function useSectionSpy({\n ids,\n activationPercent,\n currentId,\n onCurrentChange,\n scrollContainer = null,\n}: UseSectionSpyOptions): UseSectionSpyResult {\n const [trackedId, setTrackedId] = useState<string | undefined>(ids[0]);\n const trackedIdRef = useRef(trackedId);\n const onCurrentChangeRef = useRef(onCurrentChange);\n const clickScrollRef = useRef<ClickScroll | null>(null);\n const activeId = currentId ?? trackedId;\n const sectionIds = ids.join(' ');\n\n useEffect(() => {\n onCurrentChangeRef.current = onCurrentChange;\n }, [onCurrentChange]);\n\n const track = useCallback((id: string): void => {\n if (id === trackedIdRef.current) {\n return;\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n onCurrentChangeRef.current?.(id);\n }, []);\n\n useEffect(() => {\n const sections = sectionIds.split(' ').flatMap((id) => {\n const section = document.getElementById(id);\n return section ? [section] : [];\n });\n if (sections.length === 0) {\n return undefined;\n }\n const sync = (): void => {\n const clickScroll = clickScrollRef.current;\n if (clickScroll) {\n if (\n !clickScroll.settled ||\n isScrolledTo(scrollContainer, clickScroll.top)\n ) {\n return;\n }\n clickScrollRef.current = null;\n }\n track(\n sections[findCurrentIndex(sections, scrollContainer, activationPercent)]\n .id,\n );\n };\n /* A jump can skip the activation band without an intersection change,\n * so the settled position is checked again. */\n const handleScrollEnd = (): void => {\n if (clickScrollRef.current) {\n clickScrollRef.current = { ...clickScrollRef.current, settled: true };\n }\n sync();\n };\n const observer = new IntersectionObserver(sync, {\n root: scrollContainer,\n rootMargin: activationRootMargin(activationPercent),\n });\n for (const section of sections) {\n observer.observe(section);\n }\n const scrollEvents: EventTarget = scrollContainer ?? document;\n scrollEvents.addEventListener('scrollend', handleScrollEnd);\n return () => {\n observer.disconnect();\n scrollEvents.removeEventListener('scrollend', handleScrollEnd);\n };\n }, [sectionIds, activationPercent, scrollContainer, track]);\n\n const onLinkClick = (\n event: MouseEvent<HTMLAnchorElement>,\n id: string,\n ): void => {\n if (\n event.button !== 0 ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey\n ) {\n return;\n }\n event.preventDefault();\n if (id !== activeId) {\n onCurrentChange?.(id);\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n const section = document.getElementById(id);\n if (!section) {\n return;\n }\n // As an in-page link does: the URL names the section, and the next Tab\n // continues from the section rather than from the nav.\n window.history.replaceState(window.history.state, '', `#${id}`);\n if (!section.hasAttribute('tabindex')) {\n section.tabIndex = -1;\n }\n section.focus({ preventScroll: true });\n const top = sectionScrollTop(section, scrollContainer);\n const arrived = isScrolledTo(scrollContainer, top);\n /* Without scrollend support nothing would settle the click. */\n clickScrollRef.current = {\n top,\n settled: arrived || !('onscrollend' in window),\n };\n if (arrived) {\n return;\n }\n scrollerOf(scrollContainer).scrollTo({\n top,\n behavior: window.matchMedia(REDUCED_MOTION).matches\n ? 'instant'\n : 'smooth',\n });\n };\n\n return { activeId, onLinkClick };\n}\n"],"names":["REDUCED_MOTION","isScrolledTo","container","top","scrollerOf","sectionScrollTop","section","scroller","margin","viewBoundsOf","useSectionSpy","ids","activationPercent","currentId","onCurrentChange","scrollContainer","trackedId","setTrackedId","useState","trackedIdRef","useRef","onCurrentChangeRef","clickScrollRef","activeId","sectionIds","useEffect","track","useCallback","id","sections","sync","clickScroll","findCurrentIndex","handleScrollEnd","observer","activationRootMargin","scrollEvents","event","arrived"],"mappings":"4IAeMA,EAAiB,mCAYvB,SAASC,EAAaC,EAA+BC,EAAsB,CACzE,OAAO,KAAK,IAAIC,EAAAA,WAAWF,CAAS,EAAE,UAAYC,CAAG,EAAI,CAC3D,CAGA,SAASE,EACPC,EACAJ,EACQ,CACR,MAAMK,EAAWH,EAAAA,WAAWF,CAAS,EAC/BM,EAAS,WAAW,iBAAiBF,CAAO,EAAE,eAAe,EAC7DH,EACJG,EAAQ,sBAAA,EAAwB,IAChCG,eAAaP,CAAS,EAAE,IACxBK,EAAS,UACTC,EACF,OAAO,KAAK,IACV,KAAK,IAAIL,EAAK,CAAC,EACfI,EAAS,aAAeA,EAAS,YAAA,CAErC,CAyBO,SAASG,EAAc,CAC5B,IAAAC,EACA,kBAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,gBAAAC,EAAkB,IACpB,EAA8C,CAC5C,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAA6BP,EAAI,CAAC,CAAC,EAC/DQ,EAAeC,EAAAA,OAAOJ,CAAS,EAC/BK,EAAqBD,EAAAA,OAAON,CAAe,EAC3CQ,EAAiBF,EAAAA,OAA2B,IAAI,EAChDG,EAAWV,GAAaG,EACxBQ,EAAab,EAAI,KAAK,GAAG,EAE/Bc,EAAAA,UAAU,IAAM,CACdJ,EAAmB,QAAUP,CAC/B,EAAG,CAACA,CAAe,CAAC,EAEpB,MAAMY,EAAQC,cAAaC,GAAqB,CAC1CA,IAAOT,EAAa,UAGxBA,EAAa,QAAUS,EACvBX,EAAaW,CAAE,EACfP,EAAmB,UAAUO,CAAE,EACjC,EAAG,CAAA,CAAE,EAELH,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMI,EAAWL,EAAW,MAAM,GAAG,EAAE,QAASI,GAAO,CACrD,MAAMtB,EAAU,SAAS,eAAesB,CAAE,EAC1C,OAAOtB,EAAU,CAACA,CAAO,EAAI,CAAA,CAC/B,CAAC,EACD,GAAIuB,EAAS,SAAW,EACtB,OAEF,MAAMC,EAAO,IAAY,CACvB,MAAMC,EAAcT,EAAe,QACnC,GAAIS,EAAa,CACf,GACE,CAACA,EAAY,SACb9B,EAAac,EAAiBgB,EAAY,GAAG,EAE7C,OAEFT,EAAe,QAAU,IAC3B,CACAI,EACEG,EAASG,EAAAA,iBAAiBH,EAAUd,EAAiBH,CAAiB,CAAC,EACpE,EAAA,CAEP,EAGMqB,EAAkB,IAAY,CAC9BX,EAAe,UACjBA,EAAe,QAAU,CAAE,GAAGA,EAAe,QAAS,QAAS,EAAA,GAEjEQ,EAAA,CACF,EACMI,EAAW,IAAI,qBAAqBJ,EAAM,CAC9C,KAAMf,EACN,WAAYoB,EAAAA,qBAAqBvB,CAAiB,CAAA,CACnD,EACD,UAAWN,KAAWuB,EACpBK,EAAS,QAAQ5B,CAAO,EAE1B,MAAM8B,EAA4BrB,GAAmB,SACrD,OAAAqB,EAAa,iBAAiB,YAAaH,CAAe,EACnD,IAAM,CACXC,EAAS,WAAA,EACTE,EAAa,oBAAoB,YAAaH,CAAe,CAC/D,CACF,EAAG,CAACT,EAAYZ,EAAmBG,EAAiBW,CAAK,CAAC,EAkDnD,CAAE,SAAAH,EAAU,YAhDC,CAClBc,EACAT,IACS,CACT,GACES,EAAM,SAAW,GACjBA,EAAM,SACNA,EAAM,SACNA,EAAM,UACNA,EAAM,OAEN,OAEFA,EAAM,eAAA,EACFT,IAAOL,GACTT,IAAkBc,CAAE,EAEtBT,EAAa,QAAUS,EACvBX,EAAaW,CAAE,EACf,MAAMtB,EAAU,SAAS,eAAesB,CAAE,EAC1C,GAAI,CAACtB,EACH,OAIF,OAAO,QAAQ,aAAa,OAAO,QAAQ,MAAO,GAAI,IAAIsB,CAAE,EAAE,EACzDtB,EAAQ,aAAa,UAAU,IAClCA,EAAQ,SAAW,IAErBA,EAAQ,MAAM,CAAE,cAAe,EAAA,CAAM,EACrC,MAAMH,EAAME,EAAiBC,EAASS,CAAe,EAC/CuB,EAAUrC,EAAac,EAAiBZ,CAAG,EAEjDmB,EAAe,QAAU,CACvB,IAAAnB,EACA,QAASmC,GAAW,EAAE,gBAAiB,OAAA,EAErC,CAAAA,GAGJlC,aAAWW,CAAe,EAAE,SAAS,CACnC,IAAAZ,EACA,SAAU,OAAO,WAAWH,CAAc,EAAE,QACxC,UACA,QAAA,CACL,CACH,CAEmB,CACrB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
export interface UseSectionSpyOptions {
|
|
3
|
+
/** The ids of the section elements, in document order. */
|
|
4
|
+
ids: string[];
|
|
5
|
+
/** A section becomes current once its top passes this share of the view. */
|
|
6
|
+
activationPercent: number;
|
|
7
|
+
/** Controls the current section; omit it to follow the scroll position. */
|
|
8
|
+
currentId?: string;
|
|
9
|
+
/** Called with the id that scrolling or a click makes current. */
|
|
10
|
+
onCurrentChange?: (id: string) => void;
|
|
11
|
+
/** The element that scrolls the sections; omitted or null means the viewport. */
|
|
12
|
+
scrollContainer?: HTMLElement | null;
|
|
13
|
+
}
|
|
14
|
+
export interface UseSectionSpyResult {
|
|
15
|
+
activeId: string | undefined;
|
|
16
|
+
/** Scrolls to the section as an in-page link does; a modified click stays a plain link. */
|
|
17
|
+
onLinkClick: (event: MouseEvent<HTMLAnchorElement>, id: string) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Tracks which of a page's sections is current as the page scrolls, for a
|
|
21
|
+
* nav that follows the reader through a long page.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useSectionSpy({ ids, activationPercent, currentId, onCurrentChange, scrollContainer, }: UseSectionSpyOptions): UseSectionSpyResult;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useState as M, useRef as p, useEffect as w, useCallback as v } from "react";
|
|
2
|
+
import { activationRootMargin as T, findCurrentIndex as R, scrollerOf as m, viewBoundsOf as x } from "../lib/scrollView.js";
|
|
3
|
+
const O = "(prefers-reduced-motion: reduce)";
|
|
4
|
+
function E(c, o) {
|
|
5
|
+
return Math.abs(m(c).scrollTop - o) < 1;
|
|
6
|
+
}
|
|
7
|
+
function B(c, o) {
|
|
8
|
+
const d = m(o), l = parseFloat(getComputedStyle(c).scrollMarginTop), e = c.getBoundingClientRect().top - x(o).top + d.scrollTop - l;
|
|
9
|
+
return Math.min(
|
|
10
|
+
Math.max(e, 0),
|
|
11
|
+
d.scrollHeight - d.clientHeight
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
function H({
|
|
15
|
+
ids: c,
|
|
16
|
+
activationPercent: o,
|
|
17
|
+
currentId: d,
|
|
18
|
+
onCurrentChange: l,
|
|
19
|
+
scrollContainer: e = null
|
|
20
|
+
}) {
|
|
21
|
+
const [h, k] = M(c[0]), a = p(h), y = p(l), u = p(null), I = d ?? h, S = c.join(" ");
|
|
22
|
+
w(() => {
|
|
23
|
+
y.current = l;
|
|
24
|
+
}, [l]);
|
|
25
|
+
const b = v((t) => {
|
|
26
|
+
t !== a.current && (a.current = t, k(t), y.current?.(t));
|
|
27
|
+
}, []);
|
|
28
|
+
return w(() => {
|
|
29
|
+
const t = S.split(" ").flatMap((s) => {
|
|
30
|
+
const g = document.getElementById(s);
|
|
31
|
+
return g ? [g] : [];
|
|
32
|
+
});
|
|
33
|
+
if (t.length === 0)
|
|
34
|
+
return;
|
|
35
|
+
const r = () => {
|
|
36
|
+
const s = u.current;
|
|
37
|
+
if (s) {
|
|
38
|
+
if (!s.settled || E(e, s.top))
|
|
39
|
+
return;
|
|
40
|
+
u.current = null;
|
|
41
|
+
}
|
|
42
|
+
b(
|
|
43
|
+
t[R(t, e, o)].id
|
|
44
|
+
);
|
|
45
|
+
}, n = () => {
|
|
46
|
+
u.current && (u.current = { ...u.current, settled: !0 }), r();
|
|
47
|
+
}, i = new IntersectionObserver(r, {
|
|
48
|
+
root: e,
|
|
49
|
+
rootMargin: T(o)
|
|
50
|
+
});
|
|
51
|
+
for (const s of t)
|
|
52
|
+
i.observe(s);
|
|
53
|
+
const f = e ?? document;
|
|
54
|
+
return f.addEventListener("scrollend", n), () => {
|
|
55
|
+
i.disconnect(), f.removeEventListener("scrollend", n);
|
|
56
|
+
};
|
|
57
|
+
}, [S, o, e, b]), { activeId: I, onLinkClick: (t, r) => {
|
|
58
|
+
if (t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey)
|
|
59
|
+
return;
|
|
60
|
+
t.preventDefault(), r !== I && l?.(r), a.current = r, k(r);
|
|
61
|
+
const n = document.getElementById(r);
|
|
62
|
+
if (!n)
|
|
63
|
+
return;
|
|
64
|
+
window.history.replaceState(window.history.state, "", `#${r}`), n.hasAttribute("tabindex") || (n.tabIndex = -1), n.focus({ preventScroll: !0 });
|
|
65
|
+
const i = B(n, e), f = E(e, i);
|
|
66
|
+
u.current = {
|
|
67
|
+
top: i,
|
|
68
|
+
settled: f || !("onscrollend" in window)
|
|
69
|
+
}, !f && m(e).scrollTo({
|
|
70
|
+
top: i,
|
|
71
|
+
behavior: window.matchMedia(O).matches ? "instant" : "smooth"
|
|
72
|
+
});
|
|
73
|
+
} };
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
H as useSectionSpy
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=useSectionSpy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSectionSpy.js","sources":["../../src/hooks/useSectionSpy.ts"],"sourcesContent":["import {\n type MouseEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n activationRootMargin,\n findCurrentIndex,\n scrollerOf,\n viewBoundsOf,\n} from '../lib/scrollView';\n\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * The section a click scrolled to keeps the highlight while the scroll\n * runs (`settled` false until scrollend) and afterwards for as long as the\n * view stays at `top`, even if the geometry would pick another section.\n */\ninterface ClickScroll {\n top: number;\n settled: boolean;\n}\n\nfunction isScrolledTo(container: HTMLElement | null, top: number): boolean {\n return Math.abs(scrollerOf(container).scrollTop - top) < 1;\n}\n\n/** The scroll offset that puts the section's top, less its scroll-margin, at the top of the view. */\nfunction sectionScrollTop(\n section: HTMLElement,\n container: HTMLElement | null,\n): number {\n const scroller = scrollerOf(container);\n const margin = parseFloat(getComputedStyle(section).scrollMarginTop);\n const top =\n section.getBoundingClientRect().top -\n viewBoundsOf(container).top +\n scroller.scrollTop -\n margin;\n return Math.min(\n Math.max(top, 0),\n scroller.scrollHeight - scroller.clientHeight,\n );\n}\n\nexport interface UseSectionSpyOptions {\n /** The ids of the section elements, in document order. */\n ids: string[];\n /** A section becomes current once its top passes this share of the view. */\n activationPercent: number;\n /** Controls the current section; omit it to follow the scroll position. */\n currentId?: string;\n /** Called with the id that scrolling or a click makes current. */\n onCurrentChange?: (id: string) => void;\n /** The element that scrolls the sections; omitted or null means the viewport. */\n scrollContainer?: HTMLElement | null;\n}\n\nexport interface UseSectionSpyResult {\n activeId: string | undefined;\n /** Scrolls to the section as an in-page link does; a modified click stays a plain link. */\n onLinkClick: (event: MouseEvent<HTMLAnchorElement>, id: string) => void;\n}\n\n/**\n * Tracks which of a page's sections is current as the page scrolls, for a\n * nav that follows the reader through a long page.\n */\nexport function useSectionSpy({\n ids,\n activationPercent,\n currentId,\n onCurrentChange,\n scrollContainer = null,\n}: UseSectionSpyOptions): UseSectionSpyResult {\n const [trackedId, setTrackedId] = useState<string | undefined>(ids[0]);\n const trackedIdRef = useRef(trackedId);\n const onCurrentChangeRef = useRef(onCurrentChange);\n const clickScrollRef = useRef<ClickScroll | null>(null);\n const activeId = currentId ?? trackedId;\n const sectionIds = ids.join(' ');\n\n useEffect(() => {\n onCurrentChangeRef.current = onCurrentChange;\n }, [onCurrentChange]);\n\n const track = useCallback((id: string): void => {\n if (id === trackedIdRef.current) {\n return;\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n onCurrentChangeRef.current?.(id);\n }, []);\n\n useEffect(() => {\n const sections = sectionIds.split(' ').flatMap((id) => {\n const section = document.getElementById(id);\n return section ? [section] : [];\n });\n if (sections.length === 0) {\n return undefined;\n }\n const sync = (): void => {\n const clickScroll = clickScrollRef.current;\n if (clickScroll) {\n if (\n !clickScroll.settled ||\n isScrolledTo(scrollContainer, clickScroll.top)\n ) {\n return;\n }\n clickScrollRef.current = null;\n }\n track(\n sections[findCurrentIndex(sections, scrollContainer, activationPercent)]\n .id,\n );\n };\n /* A jump can skip the activation band without an intersection change,\n * so the settled position is checked again. */\n const handleScrollEnd = (): void => {\n if (clickScrollRef.current) {\n clickScrollRef.current = { ...clickScrollRef.current, settled: true };\n }\n sync();\n };\n const observer = new IntersectionObserver(sync, {\n root: scrollContainer,\n rootMargin: activationRootMargin(activationPercent),\n });\n for (const section of sections) {\n observer.observe(section);\n }\n const scrollEvents: EventTarget = scrollContainer ?? document;\n scrollEvents.addEventListener('scrollend', handleScrollEnd);\n return () => {\n observer.disconnect();\n scrollEvents.removeEventListener('scrollend', handleScrollEnd);\n };\n }, [sectionIds, activationPercent, scrollContainer, track]);\n\n const onLinkClick = (\n event: MouseEvent<HTMLAnchorElement>,\n id: string,\n ): void => {\n if (\n event.button !== 0 ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey\n ) {\n return;\n }\n event.preventDefault();\n if (id !== activeId) {\n onCurrentChange?.(id);\n }\n trackedIdRef.current = id;\n setTrackedId(id);\n const section = document.getElementById(id);\n if (!section) {\n return;\n }\n // As an in-page link does: the URL names the section, and the next Tab\n // continues from the section rather than from the nav.\n window.history.replaceState(window.history.state, '', `#${id}`);\n if (!section.hasAttribute('tabindex')) {\n section.tabIndex = -1;\n }\n section.focus({ preventScroll: true });\n const top = sectionScrollTop(section, scrollContainer);\n const arrived = isScrolledTo(scrollContainer, top);\n /* Without scrollend support nothing would settle the click. */\n clickScrollRef.current = {\n top,\n settled: arrived || !('onscrollend' in window),\n };\n if (arrived) {\n return;\n }\n scrollerOf(scrollContainer).scrollTo({\n top,\n behavior: window.matchMedia(REDUCED_MOTION).matches\n ? 'instant'\n : 'smooth',\n });\n };\n\n return { activeId, onLinkClick };\n}\n"],"names":["REDUCED_MOTION","isScrolledTo","container","top","scrollerOf","sectionScrollTop","section","scroller","margin","viewBoundsOf","useSectionSpy","ids","activationPercent","currentId","onCurrentChange","scrollContainer","trackedId","setTrackedId","useState","trackedIdRef","useRef","onCurrentChangeRef","clickScrollRef","activeId","sectionIds","useEffect","track","useCallback","id","sections","sync","clickScroll","findCurrentIndex","handleScrollEnd","observer","activationRootMargin","scrollEvents","event","arrived"],"mappings":"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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const d=require("./lib/format.cjs"),t=require("./lib/timeRange.cjs"),e=require("./lib/chart.cjs"),S=require("./layouts/PageWrapper.cjs"),i=require("./theme/antdTheme.cjs"),m=require("./theme/ThemeProvider.cjs"),C=require("./theme/themeInitScript.cjs"),p=require("./theme/useTheme.cjs"),g=require("./agent/core/AegisRuntimeProvider.cjs"),T=require("./layouts/shell/AegisShell.cjs"),P=require("./agent/chat/AgentChatProvider.cjs"),h=require("./components/ui/AgentPanel.cjs"),A=require("./components/ui/Alert.cjs"),v=require("./components/ui/AmbientBackground.cjs"),k=require("./agent/ask/AskOverlay.cjs"),b=require("./agent/ask/AskPanel.cjs"),y=require("./components/ui/AuthLayout.cjs"),R=require("./auth/AuthProvider.cjs"),L=require("./components/ui/Avatar.cjs"),B=require("./components/ui/BlastRadiusBar.cjs"),D=require("./components/ui/Breadcrumb.cjs"),f=require("./components/ui/BucketCard.cjs"),n=require("./components/ui/Button.cjs"),M=require("./components/ui/Carousel.cjs"),E=require("./components/ui/ChartLegend.cjs"),F=require("./components/ui/ChatComposer.cjs"),I=require("./components/ui/ChatMessage.cjs"),w=require("./components/ui/ChatMessageList.cjs"),N=require("./components/ui/ChatSessionList.cjs"),z=require("./components/ui/CheckGrid.cjs"),x=require("./components/ui/Checkbox.cjs"),V=require("./components/ui/Chip.cjs"),O=require("./components/ui/CodeBlock.cjs"),j=require("./components/ui/CodeEditor.cjs"),Q=require("./components/ui/Collapse.cjs"),_=require("./components/ui/ColumnLayout.cjs"),H=require("./components/ui/CommandInvocationCard.cjs"),G=require("./components/ui/CommandPalette.cjs"),U=require("./commands/CommandProvider.cjs"),a=require("./components/ui/ContentInspectorDialog.cjs"),K=require("./components/ui/ControlListItem.cjs"),W=require("./components/ui/DangerZone.cjs"),Z=require("./components/ui/DataList.cjs"),$=require("./components/ui/DataTable.cjs"),J=require("./components/ui/Dialog.cjs"),X=require("./components/ui/DiffViewer.cjs"),Y=require("./components/ui/DropdownMenu.cjs"),ee=require("./layouts/shell/environments/types.cjs"),re=require("./components/ui/EmptyState.cjs"),te=require("./components/ui/EnvironmentSwitcher.cjs"),oe=require("./components/ui/ErrorState.cjs"),ie=require("./components/ui/EventTable.cjs"),ne=require("./components/ui/FileDropzone.cjs"),ae=require("./components/ui/FilePreview.cjs"),se=require("./components/ui/FileTree.cjs"),ue=require("./components/ui/FolderDropzone.cjs"),ce=require("./components/ui/ForgotPasswordForm.cjs"),le=require("./components/ui/FormRow.cjs"),qe=require("./components/ui/IdentityCell.cjs"),de=require("./components/ui/InboxPage.cjs"),Se=require("./components/ui/KeyValueList.cjs"),me=require("./locale/LocaleProvider.cjs"),Ce=require("./components/ui/LoginForm.cjs"),pe=require("./components/ui/Markdown.cjs"),ge=require("./components/ui/MdxDocument.cjs"),Te=require("./components/ui/MetadataList.cjs"),Pe=require("./components/ui/MetricCard.cjs"),he=require("./components/ui/MetricLabel.cjs"),Ae=require("./components/ui/MonoValue.cjs"),ve=require("./components/ui/NotificationBell.cjs"),ke=require("./notifications/NotificationProvider.cjs"),be=require("./components/ui/ObjectBrowser.cjs"),ye=require("./components/ui/ObjectInspector.cjs"),Re=require("./components/ui/PageHeader.cjs"),Le=require("./components/ui/PageSizeSelect.cjs"),Be=require("./components/ui/Pagination.cjs"),De=require("./components/ui/Panel.cjs"),fe=require("./components/ui/PanelTitle.cjs"),Me=require("./components/ui/ParetoChart.cjs"),Ee=require("./components/ui/ParquetViewer.cjs"),Fe=require("./components/ui/PasswordField.cjs"),Ie=require("./components/ui/PickerField.cjs"),we=require("./components/ui/ProjectSelector.cjs"),Ne=require("./components/ui/QueryAutocomplete.cjs"),ze=require("./components/ui/RankBar.cjs"),xe=require("./components/ui/RegisterForm.cjs"),Ve=require("./components/ui/ReplayScrubber.cjs"),Oe=require("./components/ui/ReplayStepStrip.cjs"),je=require("./components/ui/ReplayTransport.cjs"),Qe=require("./auth/RequireAuth.cjs"),_e=require("./components/ui/ResizableSidePanel.cjs"),He=require("./components/ui/Reveal.cjs"),Ge=require("./components/ui/RunPips.cjs"),Ue=require("./components/ui/SavedQueryBar.cjs"),Ke=require("./components/ui/ScoreBar.cjs"),We=require("./components/ui/ScrollStory.cjs"),Ze=require("./components/ui/SearchInput.cjs"),$e=require("./components/ui/SectionDivider.cjs"),Je=require("./components/ui/Select.cjs"),Xe=require("./components/ui/ServiceMap.cjs"),Ye=require("./components/ui/SettingsSection.cjs"),er=require("./components/ui/ShareLinkDialog.cjs"),rr=require("./layouts/site/SiteFooter.cjs"),tr=require("./layouts/site/SiteLayout.cjs"),or=require("./layouts/site/SiteNav.cjs"),ir=require("./layouts/site/SiteSection.cjs"),s=require("./components/ui/Skeleton.cjs"),nr=require("./components/ui/SparkLine.cjs"),ar=require("./components/ui/StackedBar.cjs"),sr=require("./components/ui/StatBlock.cjs"),ur=require("./components/ui/StatusDot.cjs"),cr=require("./components/ui/TableOfContents.cjs"),lr=require("./components/ui/Tabs.cjs"),qr=require("./components/ui/Terminal.cjs"),dr=require("./components/ui/TextField.cjs"),Sr=require("./components/ui/ThemeToggle.cjs"),mr=require("./components/ui/TimeDisplay.cjs"),Cr=require("./components/ui/TimeRangePicker.cjs"),pr=require("./components/ui/Timeline.cjs"),gr=require("./components/ui/TimelineChart.cjs"),Tr=require("./components/ui/ToolCallCard.cjs"),Pr=require("./components/ui/Toolbar.cjs"),hr=require("./components/ui/TraceSpanInspector.cjs"),Ar=require("./components/ui/TraceTree.cjs"),vr=require("./components/ui/TrajectoryStep.cjs"),kr=require("./components/ui/TrajectoryTimeline.cjs"),br=require("./components/ui/UploadQueue.cjs"),yr=require("./agent/ask/buildAskContext.cjs"),r=require("./layouts/shell/environments/manifest.cjs"),Rr=require("./agent/core/runtime.cjs"),u=require("./locale/strings.cjs"),Lr=require("./commands/shortcut.cjs"),Br=require("./components/ui/mdxTableOfContents.cjs"),Dr=require("./components/ui/ContentInspectorContent.cjs"),c=require("./lib/luceneQuery/tokenizeAtCursor.cjs"),fr=require("./layouts/shell/activeAppContext.cjs"),o=require("./agent/core/hooks.cjs"),Mr=require("./agent/chat/useAgentChat.cjs"),l=require("./layouts/shell/useAppNavigate.cjs"),Er=require("./auth/useAuth.cjs"),Fr=require("./commands/useCommands.cjs"),Ir=require("./hooks/useCopyToClipboard.cjs"),q=require("./layouts/shell/environments/hooks.cjs"),wr=require("./notifications/useNotifications.cjs"),Nr=require("./commands/useRegisterCommands.cjs"),zr=require("./hooks/useReplayPlayback.cjs"),xr=require("./hooks/useResizable.cjs"),Vr=require("./hooks/useSavedQueries.cjs"),Or=require("./hooks/useScrollProgress.cjs"),jr=require("./locale/useStrings.cjs");exports.formatBytes=d.formatBytes;exports.RELATIVE_TIME_PRESETS=t.RELATIVE_TIME_PRESETS;exports.parseRelativeTime=t.parseRelativeTime;exports.parseTimeRangeInput=t.parseTimeRangeInput;exports.chartColorValue=e.chartColorValue;exports.niceTicks=e.niceTicks;exports.staggeredProgress=e.staggeredProgress;exports.zeroAnchoredDomain=e.zeroAnchoredDomain;exports.PageWrapper=S.PageWrapper;exports.aegisTheme=i.aegisTheme;exports.getAegisTheme=i.getAegisTheme;exports.ThemeProvider=m.ThemeProvider;exports.themeInitScript=C.themeInitScript;exports.useTheme=p.useTheme;exports.AegisRuntimeProvider=g.AegisRuntimeProvider;exports.AegisShell=T.AegisShell;exports.AgentChatProvider=P.AgentChatProvider;exports.AgentPanel=h.AgentPanel;exports.Alert=A.Alert;exports.AmbientBackground=v.AmbientBackground;exports.AskOverlay=k.AskOverlay;exports.AskPanel=b.AskPanel;exports.AuthLayout=y.AuthLayout;exports.AuthProvider=R.AuthProvider;exports.Avatar=L.Avatar;exports.BlastRadiusBar=B.BlastRadiusBar;exports.Breadcrumb=D.Breadcrumb;exports.BucketCard=f.BucketCard;exports.Button=n.Button;exports.ButtonLink=n.ButtonLink;exports.Carousel=M.Carousel;exports.ChartLegend=E.ChartLegend;exports.ChatComposer=F.ChatComposer;exports.ChatMessage=I.ChatMessage;exports.ChatMessageList=w.ChatMessageList;exports.ChatSessionList=N.ChatSessionList;exports.CheckGrid=z.CheckGrid;exports.Checkbox=x.Checkbox;exports.Chip=V.Chip;exports.CodeBlock=O.CodeBlock;exports.CodeEditor=j.CodeEditor;exports.Collapse=Q.Collapse;exports.ColumnLayout=_.ColumnLayout;exports.CommandInvocationCard=H.CommandInvocationCard;exports.CommandPalette=G.CommandPalette;exports.CommandProvider=U.CommandProvider;exports.ContentInspectorDialog=a.ContentInspectorDialog;exports.ContentPreview=a.ContentPreview;exports.ControlListItem=K.ControlListItem;exports.DangerZone=W.DangerZone;exports.DataList=Z.DataList;exports.DataTable=$.DataTable;exports.Dialog=J.Dialog;exports.DiffViewer=X.DiffViewer;exports.DropdownMenu=Y.DropdownMenu;exports.ENVIRONMENT_CHANGED_EVENT=ee.ENVIRONMENT_CHANGED_EVENT;exports.EmptyState=re.EmptyState;exports.EnvironmentSwitcher=te.EnvironmentSwitcher;exports.ErrorState=oe.ErrorState;exports.EventTable=ie.EventTable;exports.FileDropzone=ne.FileDropzone;exports.FilePreview=ae.FilePreview;exports.FileTree=se.FileTree;exports.FolderDropzone=ue.FolderDropzone;exports.ForgotPasswordForm=ce.ForgotPasswordForm;exports.FormRow=le.FormRow;exports.IdentityCell=qe.IdentityCell;exports.InboxPage=de.InboxPage;exports.KeyValueList=Se.KeyValueList;exports.LocaleProvider=me.LocaleProvider;exports.LoginForm=Ce.LoginForm;exports.Markdown=pe.Markdown;exports.MdxDocument=ge.MdxDocument;exports.MetadataList=Te.MetadataList;exports.MetricCard=Pe.MetricCard;exports.MetricLabel=he.MetricLabel;exports.MonoValue=Ae.MonoValue;exports.NotificationBell=ve.NotificationBell;exports.NotificationProvider=ke.NotificationProvider;exports.ObjectBrowser=be.ObjectBrowser;exports.ObjectInspector=ye.ObjectInspector;exports.PageHeader=Re.PageHeader;exports.PageSizeSelect=Le.PageSizeSelect;exports.Pagination=Be.Pagination;exports.Panel=De.Panel;exports.PanelTitle=fe.PanelTitle;exports.ParetoChart=Me.ParetoChart;exports.ParquetViewer=Ee.ParquetViewer;exports.PasswordField=Fe.PasswordField;exports.PickerField=Ie.PickerField;exports.ProjectSelector=we.ProjectSelector;exports.QueryAutocomplete=Ne.QueryAutocomplete;exports.RankBar=ze.RankBar;exports.RegisterForm=xe.RegisterForm;exports.ReplayScrubber=Ve.ReplayScrubber;exports.ReplayStepStrip=Oe.ReplayStepStrip;exports.ReplayTransport=je.ReplayTransport;exports.RequireAuth=Qe.RequireAuth;exports.ResizableSidePanel=_e.ResizableSidePanel;exports.Reveal=He.Reveal;exports.RunPips=Ge.RunPips;exports.SavedQueryBar=Ue.SavedQueryBar;exports.ScoreBar=Ke.ScoreBar;exports.ScrollStory=We.ScrollStory;exports.SearchInput=Ze.SearchInput;exports.SectionDivider=$e.SectionDivider;exports.Select=Je.Select;exports.ServiceMap=Xe.ServiceMap;exports.SettingsSection=Ye.SettingsSection;exports.ShareLinkDialog=er.ShareLinkDialog;exports.SiteFooter=rr.SiteFooter;exports.SiteLayout=tr.SiteLayout;exports.SiteNav=or.SiteNav;exports.SiteSection=ir.SiteSection;exports.Skeleton=s.Skeleton;exports.SkeletonText=s.SkeletonText;exports.SparkLine=nr.SparkLine;exports.StackedBar=ar.StackedBar;exports.StatBlock=sr.StatBlock;exports.StatusDot=ur.StatusDot;exports.TableOfContents=cr.TableOfContents;exports.Tabs=lr.Tabs;exports.Terminal=qr.Terminal;exports.TextField=dr.TextField;exports.ThemeToggle=Sr.ThemeToggle;exports.TimeDisplay=mr.TimeDisplay;exports.TimeRangePicker=Cr.TimeRangePicker;exports.Timeline=pr.Timeline;exports.TimelineChart=gr.TimelineChart;exports.ToolCallCard=Tr.ToolCallCard;exports.Toolbar=Pr.Toolbar;exports.TraceSpanInspector=hr.TraceSpanInspector;exports.TraceTree=Ar.TraceTree;exports.TrajectoryStep=vr.TrajectoryStep;exports.TrajectoryTimeline=kr.TrajectoryTimeline;exports.UploadQueue=br.UploadQueue;exports.buildAskContext=yr.buildAskContext;exports.clearManifestCache=r.clearManifestCache;exports.fetchManifest=r.fetchManifest;exports.manifestUrl=r.manifestUrl;exports.validateManifest=r.validateManifest;exports.createAegisRuntime=Rr.createAegisRuntime;exports.enStrings=u.enStrings;exports.zhCNStrings=u.zhCNStrings;exports.formatShortcut=Lr.formatShortcut;exports.mdxTableOfContents=Br.mdxTableOfContents;exports.prepareInspectableContent=Dr.prepareInspectableContent;exports.replaceTokenAtCursor=c.replaceTokenAtCursor;exports.tokenizeAtCursor=c.tokenizeAtCursor;exports.useActiveApp=fr.useActiveApp;exports.useAegisAction=o.useAegisAction;exports.useAegisSearchProvider=o.useAegisSearchProvider;exports.useAegisSurface=o.useAegisSurface;exports.useAgentChat=Mr.useAgentChat;exports.useAppHref=l.useAppHref;exports.useAppNavigate=l.useAppNavigate;exports.useAuth=Er.useAuth;exports.useCommands=Fr.useCommands;exports.useCopyToClipboard=Ir.useCopyToClipboard;exports.useCurrentEnvironment=q.useCurrentEnvironment;exports.useEnvironmentManifest=q.useEnvironmentManifest;exports.useNotifications=wr.useNotifications;exports.useRegisterCommands=Nr.useRegisterCommands;exports.useReplayPlayback=zr.useReplayPlayback;exports.useResizable=xr.useResizable;exports.useSavedQueries=Vr.useSavedQueries;exports.useScrollProgress=Or.useScrollProgress;exports.useStrings=jr.useStrings;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const d=require("./lib/format.cjs"),t=require("./lib/timeRange.cjs"),e=require("./lib/chart.cjs"),S=require("./layouts/PageWrapper.cjs"),i=require("./theme/antdTheme.cjs"),C=require("./theme/ThemeProvider.cjs"),m=require("./theme/themeInitScript.cjs"),g=require("./theme/useTheme.cjs"),p=require("./agent/core/AegisRuntimeProvider.cjs"),h=require("./layouts/shell/AegisShell.cjs"),T=require("./agent/chat/AgentChatProvider.cjs"),P=require("./components/ui/AgentHud.cjs"),A=require("./components/ui/AgentPanel.cjs"),v=require("./components/ui/Alert.cjs"),y=require("./components/ui/AmbientBackground.cjs"),b=require("./agent/ask/AskOverlay.cjs"),k=require("./agent/ask/AskPanel.cjs"),R=require("./components/ui/AuthLayout.cjs"),L=require("./auth/AuthProvider.cjs"),M=require("./components/ui/Avatar.cjs"),D=require("./components/ui/BlastRadiusBar.cjs"),B=require("./components/ui/Breadcrumb.cjs"),f=require("./components/ui/BucketCard.cjs"),n=require("./components/ui/Button.cjs"),E=require("./components/ui/Carousel.cjs"),F=require("./components/ui/ChartLegend.cjs"),I=require("./components/ui/ChatComposer.cjs"),w=require("./components/ui/ChatMessage.cjs"),N=require("./components/ui/ChatMessageList.cjs"),x=require("./components/ui/ChatSessionList.cjs"),z=require("./components/ui/CheckGrid.cjs"),V=require("./components/ui/Checkbox.cjs"),H=require("./components/ui/Chip.cjs"),O=require("./components/ui/CodeBlock.cjs"),j=require("./components/ui/CodeEditor.cjs"),Q=require("./components/ui/Collapse.cjs"),_=require("./components/ui/ColumnChart.cjs"),K=require("./components/ui/ColumnLayout.cjs"),G=require("./components/ui/CommandInvocationCard.cjs"),U=require("./components/ui/CommandPalette.cjs"),W=require("./commands/CommandProvider.cjs"),a=require("./components/ui/ContentInspectorDialog.cjs"),Z=require("./components/ui/ControlListItem.cjs"),$=require("./components/ui/DangerZone.cjs"),J=require("./components/ui/DataList.cjs"),X=require("./components/ui/DataTable.cjs"),Y=require("./components/ui/Dialog.cjs"),ee=require("./components/ui/DiffViewer.cjs"),re=require("./components/ui/DotRangeChart.cjs"),te=require("./components/ui/DropdownMenu.cjs"),oe=require("./layouts/shell/environments/types.cjs"),ie=require("./components/ui/EmptyState.cjs"),ne=require("./components/ui/EnvironmentSwitcher.cjs"),ae=require("./components/ui/ErrorState.cjs"),se=require("./components/ui/EventTable.cjs"),ue=require("./components/ui/FileDropzone.cjs"),ce=require("./components/ui/FilePreview.cjs"),le=require("./components/ui/FileTree.cjs"),qe=require("./components/ui/FolderDropzone.cjs"),de=require("./components/ui/ForgotPasswordForm.cjs"),Se=require("./components/ui/FormRow.cjs"),Ce=require("./components/ui/HeadlineStat.cjs"),me=require("./components/ui/Heatmap.cjs"),ge=require("./components/ui/IdentityCell.cjs"),pe=require("./components/ui/InboxPage.cjs"),he=require("./components/ui/KeyMomentCard.cjs"),Te=require("./components/ui/KeyValueList.cjs"),Pe=require("./components/ui/LineChart.cjs"),Ae=require("./locale/LocaleProvider.cjs"),ve=require("./components/ui/LoginForm.cjs"),ye=require("./components/ui/Markdown.cjs"),be=require("./components/ui/MdxDocument.cjs"),ke=require("./components/ui/MetadataList.cjs"),Re=require("./components/ui/MetricCard.cjs"),Le=require("./components/ui/MetricLabel.cjs"),Me=require("./components/ui/MonoValue.cjs"),De=require("./components/ui/NotificationBell.cjs"),Be=require("./notifications/NotificationProvider.cjs"),fe=require("./components/ui/ObjectBrowser.cjs"),Ee=require("./components/ui/ObjectInspector.cjs"),Fe=require("./components/ui/PageHeader.cjs"),Ie=require("./components/ui/PageSizeSelect.cjs"),we=require("./components/ui/Pagination.cjs"),Ne=require("./components/ui/Panel.cjs"),xe=require("./components/ui/PanelTitle.cjs"),ze=require("./components/ui/ParetoChart.cjs"),Ve=require("./components/ui/ParquetViewer.cjs"),He=require("./components/ui/PasswordField.cjs"),Oe=require("./components/ui/PickerField.cjs"),je=require("./components/ui/ProjectSelector.cjs"),Qe=require("./components/ui/QueryAutocomplete.cjs"),_e=require("./components/ui/RankBar.cjs"),Ke=require("./components/ui/RegisterForm.cjs"),Ge=require("./components/ui/ReplayScrubber.cjs"),Ue=require("./components/ui/ReplayStepStrip.cjs"),We=require("./components/ui/ReplayTransport.cjs"),Ze=require("./auth/RequireAuth.cjs"),$e=require("./components/ui/ResizableSidePanel.cjs"),Je=require("./components/ui/ResultMatrix.cjs"),Xe=require("./components/ui/Reveal.cjs"),Ye=require("./components/ui/RunPips.cjs"),er=require("./components/ui/SavedQueryBar.cjs"),rr=require("./components/ui/ScoreBar.cjs"),tr=require("./components/ui/ScrollStory.cjs"),or=require("./components/ui/SearchInput.cjs"),ir=require("./components/ui/SectionDivider.cjs"),nr=require("./components/ui/Select.cjs"),ar=require("./components/ui/SeriesLabel.cjs"),sr=require("./components/ui/ServiceMap.cjs"),ur=require("./components/ui/SettingsSection.cjs"),cr=require("./components/ui/ShareLinkDialog.cjs"),lr=require("./layouts/site/SiteAnchorNav.cjs"),qr=require("./layouts/site/SiteFooter.cjs"),dr=require("./layouts/site/SiteLayout.cjs"),Sr=require("./layouts/site/SiteNav.cjs"),Cr=require("./layouts/site/SiteSection.cjs"),mr=require("./layouts/site/SiteSectionHeader.cjs"),s=require("./components/ui/Skeleton.cjs"),gr=require("./components/ui/SparkLine.cjs"),pr=require("./components/ui/StackedBar.cjs"),hr=require("./components/ui/StatBlock.cjs"),Tr=require("./components/ui/StatusDot.cjs"),Pr=require("./components/ui/TableOfContents.cjs"),Ar=require("./components/ui/Tabs.cjs"),vr=require("./components/ui/Terminal.cjs"),yr=require("./components/ui/TextField.cjs"),br=require("./components/ui/ThemeToggle.cjs"),kr=require("./components/ui/ThoughtCard.cjs"),Rr=require("./components/ui/TimeDisplay.cjs"),Lr=require("./components/ui/TimeRangePicker.cjs"),Mr=require("./components/ui/Timeline.cjs"),Dr=require("./components/ui/TimelineChart.cjs"),Br=require("./components/ui/ToolCallCard.cjs"),fr=require("./components/ui/Toolbar.cjs"),Er=require("./components/ui/TraceSpanInspector.cjs"),Fr=require("./components/ui/TraceTree.cjs"),Ir=require("./components/ui/TrajectoryStep.cjs"),wr=require("./components/ui/TrajectoryTimeline.cjs"),Nr=require("./components/ui/UploadQueue.cjs"),xr=require("./agent/ask/buildAskContext.cjs"),r=require("./layouts/shell/environments/manifest.cjs"),zr=require("./agent/core/runtime.cjs"),u=require("./locale/strings.cjs"),Vr=require("./commands/shortcut.cjs"),Hr=require("./components/ui/mdxTableOfContents.cjs"),Or=require("./components/ui/ContentInspectorContent.cjs"),c=require("./lib/luceneQuery/tokenizeAtCursor.cjs"),jr=require("./layouts/shell/activeAppContext.cjs"),o=require("./agent/core/hooks.cjs"),Qr=require("./agent/chat/useAgentChat.cjs"),l=require("./layouts/shell/useAppNavigate.cjs"),_r=require("./auth/useAuth.cjs"),Kr=require("./commands/useCommands.cjs"),Gr=require("./hooks/useCopyToClipboard.cjs"),q=require("./layouts/shell/environments/hooks.cjs"),Ur=require("./hooks/useMediaQuery.cjs"),Wr=require("./notifications/useNotifications.cjs"),Zr=require("./commands/useRegisterCommands.cjs"),$r=require("./hooks/useReplayPlayback.cjs"),Jr=require("./hooks/useResizable.cjs"),Xr=require("./hooks/useSavedQueries.cjs"),Yr=require("./hooks/useScrollProgress.cjs"),et=require("./locale/useStrings.cjs");exports.formatBytes=d.formatBytes;exports.RELATIVE_TIME_PRESETS=t.RELATIVE_TIME_PRESETS;exports.parseRelativeTime=t.parseRelativeTime;exports.parseTimeRangeInput=t.parseTimeRangeInput;exports.chartColorValue=e.chartColorValue;exports.niceTicks=e.niceTicks;exports.stageProgress=e.stageProgress;exports.staggeredProgress=e.staggeredProgress;exports.zeroAnchoredDomain=e.zeroAnchoredDomain;exports.PageWrapper=S.PageWrapper;exports.aegisTheme=i.aegisTheme;exports.getAegisTheme=i.getAegisTheme;exports.ThemeProvider=C.ThemeProvider;exports.themeInitScript=m.themeInitScript;exports.useTheme=g.useTheme;exports.AegisRuntimeProvider=p.AegisRuntimeProvider;exports.AegisShell=h.AegisShell;exports.AgentChatProvider=T.AgentChatProvider;exports.AgentHud=P.AgentHud;exports.AgentPanel=A.AgentPanel;exports.Alert=v.Alert;exports.AmbientBackground=y.AmbientBackground;exports.AskOverlay=b.AskOverlay;exports.AskPanel=k.AskPanel;exports.AuthLayout=R.AuthLayout;exports.AuthProvider=L.AuthProvider;exports.Avatar=M.Avatar;exports.BlastRadiusBar=D.BlastRadiusBar;exports.Breadcrumb=B.Breadcrumb;exports.BucketCard=f.BucketCard;exports.Button=n.Button;exports.ButtonLink=n.ButtonLink;exports.Carousel=E.Carousel;exports.ChartLegend=F.ChartLegend;exports.ChatComposer=I.ChatComposer;exports.ChatMessage=w.ChatMessage;exports.ChatMessageList=N.ChatMessageList;exports.ChatSessionList=x.ChatSessionList;exports.CheckGrid=z.CheckGrid;exports.Checkbox=V.Checkbox;exports.Chip=H.Chip;exports.CodeBlock=O.CodeBlock;exports.CodeEditor=j.CodeEditor;exports.Collapse=Q.Collapse;exports.ColumnChart=_.ColumnChart;exports.ColumnLayout=K.ColumnLayout;exports.CommandInvocationCard=G.CommandInvocationCard;exports.CommandPalette=U.CommandPalette;exports.CommandProvider=W.CommandProvider;exports.ContentInspectorDialog=a.ContentInspectorDialog;exports.ContentPreview=a.ContentPreview;exports.ControlListItem=Z.ControlListItem;exports.DangerZone=$.DangerZone;exports.DataList=J.DataList;exports.DataTable=X.DataTable;exports.Dialog=Y.Dialog;exports.DiffViewer=ee.DiffViewer;exports.DotRangeChart=re.DotRangeChart;exports.DropdownMenu=te.DropdownMenu;exports.ENVIRONMENT_CHANGED_EVENT=oe.ENVIRONMENT_CHANGED_EVENT;exports.EmptyState=ie.EmptyState;exports.EnvironmentSwitcher=ne.EnvironmentSwitcher;exports.ErrorState=ae.ErrorState;exports.EventTable=se.EventTable;exports.FileDropzone=ue.FileDropzone;exports.FilePreview=ce.FilePreview;exports.FileTree=le.FileTree;exports.FolderDropzone=qe.FolderDropzone;exports.ForgotPasswordForm=de.ForgotPasswordForm;exports.FormRow=Se.FormRow;exports.HeadlineStat=Ce.HeadlineStat;exports.Heatmap=me.Heatmap;exports.IdentityCell=ge.IdentityCell;exports.InboxPage=pe.InboxPage;exports.KeyMomentCard=he.KeyMomentCard;exports.KeyValueList=Te.KeyValueList;exports.LineChart=Pe.LineChart;exports.LocaleProvider=Ae.LocaleProvider;exports.LoginForm=ve.LoginForm;exports.Markdown=ye.Markdown;exports.MdxDocument=be.MdxDocument;exports.MetadataList=ke.MetadataList;exports.MetricCard=Re.MetricCard;exports.MetricLabel=Le.MetricLabel;exports.MonoValue=Me.MonoValue;exports.NotificationBell=De.NotificationBell;exports.NotificationProvider=Be.NotificationProvider;exports.ObjectBrowser=fe.ObjectBrowser;exports.ObjectInspector=Ee.ObjectInspector;exports.PageHeader=Fe.PageHeader;exports.PageSizeSelect=Ie.PageSizeSelect;exports.Pagination=we.Pagination;exports.Panel=Ne.Panel;exports.PanelTitle=xe.PanelTitle;exports.ParetoChart=ze.ParetoChart;exports.ParquetViewer=Ve.ParquetViewer;exports.PasswordField=He.PasswordField;exports.PickerField=Oe.PickerField;exports.ProjectSelector=je.ProjectSelector;exports.QueryAutocomplete=Qe.QueryAutocomplete;exports.RankBar=_e.RankBar;exports.RegisterForm=Ke.RegisterForm;exports.ReplayScrubber=Ge.ReplayScrubber;exports.ReplayStepStrip=Ue.ReplayStepStrip;exports.ReplayTransport=We.ReplayTransport;exports.RequireAuth=Ze.RequireAuth;exports.ResizableSidePanel=$e.ResizableSidePanel;exports.ResultMatrix=Je.ResultMatrix;exports.Reveal=Xe.Reveal;exports.RunPips=Ye.RunPips;exports.SavedQueryBar=er.SavedQueryBar;exports.ScoreBar=rr.ScoreBar;exports.ScrollStory=tr.ScrollStory;exports.SearchInput=or.SearchInput;exports.SectionDivider=ir.SectionDivider;exports.Select=nr.Select;exports.SeriesLabel=ar.SeriesLabel;exports.ServiceMap=sr.ServiceMap;exports.SettingsSection=ur.SettingsSection;exports.ShareLinkDialog=cr.ShareLinkDialog;exports.SiteAnchorNav=lr.SiteAnchorNav;exports.SiteFooter=qr.SiteFooter;exports.SiteLayout=dr.SiteLayout;exports.SiteNav=Sr.SiteNav;exports.SiteSection=Cr.SiteSection;exports.SiteSectionHeader=mr.SiteSectionHeader;exports.Skeleton=s.Skeleton;exports.SkeletonText=s.SkeletonText;exports.SparkLine=gr.SparkLine;exports.StackedBar=pr.StackedBar;exports.StatBlock=hr.StatBlock;exports.StatusDot=Tr.StatusDot;exports.TableOfContents=Pr.TableOfContents;exports.Tabs=Ar.Tabs;exports.Terminal=vr.Terminal;exports.TextField=yr.TextField;exports.ThemeToggle=br.ThemeToggle;exports.ThoughtCard=kr.ThoughtCard;exports.TimeDisplay=Rr.TimeDisplay;exports.TimeRangePicker=Lr.TimeRangePicker;exports.Timeline=Mr.Timeline;exports.TimelineChart=Dr.TimelineChart;exports.ToolCallCard=Br.ToolCallCard;exports.Toolbar=fr.Toolbar;exports.TraceSpanInspector=Er.TraceSpanInspector;exports.TraceTree=Fr.TraceTree;exports.TrajectoryStep=Ir.TrajectoryStep;exports.TrajectoryTimeline=wr.TrajectoryTimeline;exports.UploadQueue=Nr.UploadQueue;exports.buildAskContext=xr.buildAskContext;exports.clearManifestCache=r.clearManifestCache;exports.fetchManifest=r.fetchManifest;exports.manifestUrl=r.manifestUrl;exports.validateManifest=r.validateManifest;exports.createAegisRuntime=zr.createAegisRuntime;exports.enStrings=u.enStrings;exports.zhCNStrings=u.zhCNStrings;exports.formatShortcut=Vr.formatShortcut;exports.mdxTableOfContents=Hr.mdxTableOfContents;exports.prepareInspectableContent=Or.prepareInspectableContent;exports.replaceTokenAtCursor=c.replaceTokenAtCursor;exports.tokenizeAtCursor=c.tokenizeAtCursor;exports.useActiveApp=jr.useActiveApp;exports.useAegisAction=o.useAegisAction;exports.useAegisSearchProvider=o.useAegisSearchProvider;exports.useAegisSurface=o.useAegisSurface;exports.useAgentChat=Qr.useAgentChat;exports.useAppHref=l.useAppHref;exports.useAppNavigate=l.useAppNavigate;exports.useAuth=_r.useAuth;exports.useCommands=Kr.useCommands;exports.useCopyToClipboard=Gr.useCopyToClipboard;exports.useCurrentEnvironment=q.useCurrentEnvironment;exports.useEnvironmentManifest=q.useEnvironmentManifest;exports.useMediaQuery=Ur.useMediaQuery;exports.useNotifications=Wr.useNotifications;exports.useRegisterCommands=Zr.useRegisterCommands;exports.useReplayPlayback=$r.useReplayPlayback;exports.useResizable=Jr.useResizable;exports.useSavedQueries=Xr.useSavedQueries;exports.useScrollProgress=Yr.useScrollProgress;exports.useStrings=et.useStrings;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export * from './components/ui';
|
|
2
|
-
export { useCopyToClipboard, useResizable, useReplayPlayback, useSavedQueries, useScrollProgress, } from './hooks';
|
|
2
|
+
export { useCopyToClipboard, useMediaQuery, useResizable, useReplayPlayback, useSavedQueries, useScrollProgress, } from './hooks';
|
|
3
3
|
export type { SavedQuery, ScrollProgressRange, UseCopyToClipboardResult, UseResizableOptions, UseResizableReturn, UseSavedQueriesOptions, UseReplayPlaybackOptions, UseReplayPlaybackResult, UseSavedQueriesReturn, UseScrollProgressOptions, UseScrollProgressResult, } from './hooks';
|
|
4
4
|
export { formatBytes } from './lib/format';
|
|
5
5
|
export { RELATIVE_TIME_PRESETS, parseRelativeTime, parseTimeRangeInput, } from './lib/timeRange';
|
|
6
6
|
export type { RelativeTimePreset, TimeRange } from './lib/timeRange';
|
|
7
7
|
export { replaceTokenAtCursor, tokenizeAtCursor } from './lib/luceneQuery';
|
|
8
8
|
export type { CursorToken } from './lib/luceneQuery';
|
|
9
|
-
export { chartColorValue, niceTicks, staggeredProgress, zeroAnchoredDomain, } from './lib/chart';
|
|
9
|
+
export { chartColorValue, niceTicks, stageProgress, staggeredProgress, zeroAnchoredDomain, } from './lib/chart';
|
|
10
10
|
export type { ChartColor, ChartPaletteColor } from './lib/chart';
|
|
11
11
|
export { PageWrapper } from './layouts/PageWrapper';
|
|
12
12
|
export type { PageWrapperProps } from './layouts/PageWrapper';
|
|
13
|
-
export { SiteFooter, SiteLayout, SiteNav, SiteSection } from './layouts/site';
|
|
14
|
-
export type { SiteFooterColumn, SiteFooterLink, SiteFooterProps, SiteLayoutProps, SiteNavItem, SiteNavProps, SiteSectionProps, } from './layouts/site';
|
|
13
|
+
export { SiteAnchorNav, SiteFooter, SiteLayout, SiteNav, SiteSection, SiteSectionHeader, } from './layouts/site';
|
|
14
|
+
export type { SiteAnchorNavItem, SiteAnchorNavProps, SiteFooterColumn, SiteFooterLink, SiteFooterProps, SiteLayoutProps, SiteNavItem, SiteNavProps, SiteSectionHeaderProps, SiteSectionProps, } from './layouts/site';
|
|
15
15
|
export { AegisShell, ENVIRONMENT_CHANGED_EVENT, clearManifestCache, fetchManifest, manifestUrl, useActiveApp, useAppHref, useAppNavigate, useCurrentEnvironment, useEnvironmentManifest, validateManifest, } from './layouts/shell';
|
|
16
16
|
export type { ActiveAppContextValue, AegisApp, AegisAppEnvironmentsConfig, AegisAppNavGroup, AegisAppNavItem, AegisBrand, AegisShellProps, AegisUser, AegisUserMenuItem, EnvironmentBadge, EnvironmentChangedEventDetail, EnvironmentDescriptor, EnvironmentManifest, EnvironmentManifestStatus, } from './layouts/shell';
|
|
17
17
|
export { aegisTheme, getAegisTheme } from './theme/antdTheme';
|