ardo 3.2.0 → 3.2.1
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/{DocPage-BVibJR9O.js → DocPage-CIBiCAxZ.js} +35 -22
- package/dist/DocPage-CIBiCAxZ.js.map +1 -0
- package/dist/assets/src/ui/{TOC.css.ts.vanilla-435FKDcl.css → Toc.css.ts.vanilla-CYqcWgvD.css} +9 -9
- package/dist/brand-icons-DLJKqTun.js +59 -0
- package/dist/brand-icons-DLJKqTun.js.map +1 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/{contract.css-QS0y3-CM.d.ts → contract.css-DYvFVCFE.d.ts} +1 -1
- package/dist/contract.css-DYvFVCFE.d.ts.map +1 -0
- package/dist/{generator-DcUomVnD.js → generator-DPtRXxM_.js} +19 -18
- package/dist/generator-DPtRXxM_.js.map +1 -0
- package/dist/icons/index.d.ts +22 -1
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/{index-DSeJoaxz.d.ts → index-BTeHvysI.d.ts} +190 -321
- package/dist/index-BTeHvysI.d.ts.map +1 -0
- package/dist/{index-DNKCjxv5.d.ts → index-DySzkJlC.d.ts} +12 -12
- package/dist/{index-DNKCjxv5.d.ts.map → index-DySzkJlC.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/mdx/provider.d.ts.map +1 -1
- package/dist/mdx/provider.js +4 -4
- package/dist/mdx/provider.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/sidebar-utils-1Skqle1Q.js.map +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/typedoc/components/index.d.ts +13 -13
- package/dist/typedoc/components/index.d.ts.map +1 -1
- package/dist/typedoc/components/index.js +12 -1
- package/dist/typedoc/components/index.js.map +1 -1
- package/dist/typedoc/index.d.ts +3 -3
- package/dist/typedoc/index.d.ts.map +1 -1
- package/dist/typedoc/index.js +2 -2
- package/dist/typedoc/index.js.map +1 -1
- package/dist/{types-DAZHcySL.d.ts → types-BCuJBsJu.d.ts} +19 -19
- package/dist/types-BCuJBsJu.d.ts.map +1 -0
- package/dist/{types-DVodb4lK.d.ts → types-CTd_mkrv.d.ts} +51 -74
- package/dist/types-CTd_mkrv.d.ts.map +1 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/styles.css +9 -9
- package/dist/ui/styles.js +1 -1
- package/dist/{ui-NhRDIFUN.js → ui-3grzJSsq.js} +24 -11
- package/dist/ui-3grzJSsq.js.map +1 -0
- package/dist/vite/index.d.ts +17 -19
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +53 -40
- package/dist/vite/index.js.map +1 -1
- package/package.json +15 -12
- package/dist/DocPage-BVibJR9O.js.map +0 -1
- package/dist/contract.css-QS0y3-CM.d.ts.map +0 -1
- package/dist/generator-DcUomVnD.js.map +0 -1
- package/dist/index-DSeJoaxz.d.ts.map +0 -1
- package/dist/types-DAZHcySL.d.ts.map +0 -1
- package/dist/types-DVodb4lK.d.ts.map +0 -1
- package/dist/ui-NhRDIFUN.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { d as useArdoSiteConfig, f as useArdoTOC, l as useArdoPageData, n as get
|
|
|
2
2
|
import { Children, createContext, isValidElement, use, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Link, Links, Meta, Scripts, ScrollRestoration, useLocation } from "react-router";
|
|
5
|
-
import { Check as CheckIcon, ChevronDown as ChevronDownIcon, CircleX as XCircleIcon, Copy as CopyIcon, FileText as FileTextIcon,
|
|
5
|
+
import { Check as CheckIcon, ChevronDown as ChevronDownIcon, CircleX as XCircleIcon, Copy as CopyIcon, FileText as FileTextIcon, Info as InfoIcon, Lightbulb as LightbulbIcon, MessageCircle as MessageCircleIcon, Monitor as MonitorIcon, Moon as MoonIcon, Search as SearchIcon, Sun as SunIcon, TriangleAlert as AlertTriangleIcon, X as XIcon } from "lucide-react";
|
|
6
6
|
import "./assets/src/ui/Footer.css.ts.vanilla-BSzPIPt4.css";
|
|
7
7
|
import "./assets/src/ui/Layout.css.ts.vanilla-Bpx_-gJt.css";
|
|
8
8
|
import "./assets/src/ui/components/CodeBlock.css.ts.vanilla-lNKqskjQ.css";
|
|
@@ -14,7 +14,7 @@ import "./assets/src/ui/components/Tabs.css.ts.vanilla-C4-vJSnf.css";
|
|
|
14
14
|
import "./assets/src/ui/Breadcrumb.css.ts.vanilla-Dpgq-C_p.css";
|
|
15
15
|
import "./assets/src/ui/content.css.ts.vanilla-O_RaSPXm.css";
|
|
16
16
|
import "./assets/src/ui/DocPage.css.ts.vanilla-CXKuz4U-.css";
|
|
17
|
-
import "./assets/src/ui/
|
|
17
|
+
import "./assets/src/ui/Toc.css.ts.vanilla-CYqcWgvD.css";
|
|
18
18
|
//#region src/ui/Footer.css.ts
|
|
19
19
|
var contentMeta = "_169q00b9";
|
|
20
20
|
var footer = "_169q00b0";
|
|
@@ -280,9 +280,11 @@ function ArdoCodeGroup({ children, labels: labelsStr }) {
|
|
|
280
280
|
const childArray = Children.toArray(children).filter((child) => isValidElement(child));
|
|
281
281
|
const labelArray = hasLabels ? (labelsStr ?? "").split(",") : [];
|
|
282
282
|
const tabs = childArray.map((child, index) => {
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
if (index < labelArray.length) {
|
|
284
|
+
const explicitLabel = labelArray[index];
|
|
285
|
+
if (explicitLabel !== "") return explicitLabel;
|
|
286
|
+
}
|
|
287
|
+
return readStringProp(child.props, "data-label") ?? readStringProp(child.props, "title") ?? readStringProp(child.props, "language") ?? `Tab ${index + 1}`;
|
|
286
288
|
});
|
|
287
289
|
return /* @__PURE__ */ jsxs("div", {
|
|
288
290
|
className: codeGroup,
|
|
@@ -306,6 +308,14 @@ function ArdoCodeGroup({ children, labels: labelsStr }) {
|
|
|
306
308
|
})]
|
|
307
309
|
});
|
|
308
310
|
}
|
|
311
|
+
function readStringProp(props, name) {
|
|
312
|
+
if (!isRecord(props)) return;
|
|
313
|
+
const value = props[name];
|
|
314
|
+
return typeof value === "string" && value !== "" ? value : void 0;
|
|
315
|
+
}
|
|
316
|
+
function isRecord(value) {
|
|
317
|
+
return value != null && typeof value === "object";
|
|
318
|
+
}
|
|
309
319
|
function tabAt(tabs, index) {
|
|
310
320
|
return tabs[index];
|
|
311
321
|
}
|
|
@@ -611,16 +621,19 @@ function ArdoTabPanels({ children }) {
|
|
|
611
621
|
}
|
|
612
622
|
function findFirstTabValue(children) {
|
|
613
623
|
for (const child of Children.toArray(children)) {
|
|
614
|
-
|
|
615
|
-
if (
|
|
616
|
-
const nestedChildren = child.props.children;
|
|
617
|
-
if (nestedChildren != null) {
|
|
618
|
-
const nestedValue = findFirstTabValue(nestedChildren);
|
|
619
|
-
if (nestedValue) return nestedValue;
|
|
620
|
-
}
|
|
624
|
+
const tabValue = getFirstTabValueFromChild(child);
|
|
625
|
+
if (tabValue != null) return tabValue;
|
|
621
626
|
}
|
|
622
627
|
return "";
|
|
623
628
|
}
|
|
629
|
+
function getFirstTabValueFromChild(child) {
|
|
630
|
+
if (!isValidElement(child)) return null;
|
|
631
|
+
if (isValidElement(child) && child.type === ArdoTab) return child.props.value ?? `${AUTO_TAB_PREFIX}0`;
|
|
632
|
+
const nestedChildren = child.props.children;
|
|
633
|
+
if (nestedChildren == null) return null;
|
|
634
|
+
const nestedValue = findFirstTabValue(nestedChildren);
|
|
635
|
+
return nestedValue === "" ? null : nestedValue;
|
|
636
|
+
}
|
|
624
637
|
//#endregion
|
|
625
638
|
//#region src/ui/Breadcrumb.css.ts
|
|
626
639
|
var breadcrumb = "_19g8fxh0";
|
|
@@ -811,13 +824,13 @@ function ContentPrevNext({ prev, next }) {
|
|
|
811
824
|
});
|
|
812
825
|
}
|
|
813
826
|
//#endregion
|
|
814
|
-
//#region src/ui/
|
|
815
|
-
var toc = "
|
|
816
|
-
var tocLink = "
|
|
817
|
-
var tocList = "
|
|
818
|
-
var tocTitle = "
|
|
827
|
+
//#region src/ui/Toc.css.ts
|
|
828
|
+
var toc = "_16vvfx80";
|
|
829
|
+
var tocLink = "_16vvfx83";
|
|
830
|
+
var tocList = "_16vvfx82";
|
|
831
|
+
var tocTitle = "_16vvfx81";
|
|
819
832
|
//#endregion
|
|
820
|
-
//#region src/ui/
|
|
833
|
+
//#region src/ui/Toc.tsx
|
|
821
834
|
function ArdoTOC({ label: labelProp } = {}) {
|
|
822
835
|
const toc$1 = useArdoTOC();
|
|
823
836
|
const siteConfig = useArdoSiteConfig();
|
|
@@ -906,8 +919,8 @@ function TOCItemComponent({ item, activeId, onClickItem }) {
|
|
|
906
919
|
href: `#${item.id}`,
|
|
907
920
|
className: [
|
|
908
921
|
tocLink,
|
|
909
|
-
item.level === 3 && "
|
|
910
|
-
item.level === 4 && "
|
|
922
|
+
item.level === 3 && "_16vvfx84",
|
|
923
|
+
item.level === 4 && "_16vvfx85",
|
|
911
924
|
isActive && "active",
|
|
912
925
|
hasActiveChild && "child-active"
|
|
913
926
|
].filter(Boolean).join(" "),
|
|
@@ -992,6 +1005,6 @@ function ArdoDocLayout({ content }) {
|
|
|
992
1005
|
return /* @__PURE__ */ jsx(ArdoDocPage, { children: content });
|
|
993
1006
|
}
|
|
994
1007
|
//#endregion
|
|
995
|
-
export { home as A, footerSeparator as B, ArdoCopyButton as C, ArdoBareContent as D, codeWrapper as E, footerContainer as F,
|
|
1008
|
+
export { home as A, footerSeparator as B, ArdoCopyButton as C, ArdoBareContent as D, codeWrapper as E, footerContainer as F, SearchIcon as G, MessageCircleIcon as H, footerCopyright as I, SunIcon as K, footerLink as L, layout as M, footer as N, ArdoLayout as O, footerBuildTime as P, footerMessage as R, ArdoCodeGroup as S, codeTitle as T, MonitorIcon as U, ChevronDownIcon as V, MoonIcon as W, ArdoInfo as _, ArdoContent as a, ArdoWarning as b, ArdoTabPanel as c, ArdoSteps as d, ArdoIcon as f, ArdoDanger as g, ArdoContainer as h, ArdoTOC as i, homeMain as j, ArdoRootLayout as k, ArdoTabPanels as l, registerIcons as m, ArdoDocLayout as n, ArdoTab as o, getRegisteredIconNames as p, XIcon as q, ArdoDocPage as r, ArdoTabList as s, ArdoDocContent as t, ArdoTabs as u, ArdoNote as v, codeBlock as w, ArdoCodeBlock as x, ArdoTip as y, footerPrimary as z };
|
|
996
1009
|
|
|
997
|
-
//# sourceMappingURL=DocPage-
|
|
1010
|
+
//# sourceMappingURL=DocPage-CIBiCAxZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocPage-CIBiCAxZ.js","names":["styles.skipLink","styles.layoutContainer","styles.main","styles.copyButton","styles.copyText","styles.codeLine","styles.codeBlock","styles.codeWrapper","styles.codeGroup","styles.codeGroupTabs","styles.codeGroupTab","styles.codeGroupPanels","styles.codeGroupPanel","styles.container","styles.containerIcon","styles.containerBody","styles.containerTitle","styles.containerContent","styles.steps","styles.tabs","styles.tabList","styles.tab","styles.tabPanel","styles.tabPanels","styles.breadcrumb","styles.breadcrumbCurrent","docStyles.contentBody","docStyles.contentContainer","docStyles.contentHeader","docStyles.contentTitle","footerStyles.contentMeta","prevLink","nextLink","footerStyles.prevNext","footerStyles.prevLink","footerStyles.prevNextLabel","footerStyles.prevNextTitle","footerStyles.nextLink","toc","styles.toc","styles.tocTitle","styles.tocList","styles.tocLink","styles.docPage"],"sources":["../src/ui/Footer.css.ts","../src/ui/Layout.css.ts","../src/ui/Layout.tsx","../src/ui/BareContent.tsx","../src/ui/components/CodeBlock.css.ts","../src/ui/components/CopyButton.css.ts","../src/ui/components/CopyButton.tsx","../src/ui/components/CodeBlock.tsx","../src/ui/components/Container.css.ts","../src/ui/components/Container.tsx","../src/ui/components/Icon.tsx","../src/ui/components/Steps.css.ts","../src/ui/components/Steps.tsx","../src/ui/components/Tabs.css.ts","../src/ui/components/Tabs.tsx","../src/ui/Breadcrumb.css.ts","../src/ui/Breadcrumb.tsx","../src/ui/content.css.ts","../src/ui/DocPage.css.ts","../src/ui/Content.tsx","../src/ui/Toc.css.ts","../src/ui/Toc.tsx","../src/ui/DocPage.tsx"],"sourcesContent":["import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\nexport const footer = style({\n maxWidth: \"80rem\",\n padding: `${vars.space[\"2xl\"]} 0`,\n textAlign: \"left\",\n borderTop: `1px solid ${vars.color.border}`,\n marginTop: vars.space[\"2xl\"],\n})\n\nexport const footerContainer = style({})\n\nexport const footerPrimary = style({\n display: \"flex\",\n alignItems: \"center\",\n gap: 0,\n flexWrap: \"wrap\",\n fontSize: vars.fontSize.sm,\n color: vars.color.textLight,\n marginBottom: vars.space.xs,\n})\n\nexport const footerSeparator = style({\n display: \"inline-block\",\n width: vars.space.xs,\n height: vars.space.xs,\n borderRadius: \"50%\",\n background: vars.color.textLighter,\n margin: `0 0.75rem`,\n verticalAlign: \"middle\",\n})\n\nexport const footerLink = style({\n color: vars.color.brand,\n textDecoration: \"none\",\n transition: `opacity ${vars.transition.fast}`,\n selectors: {\n \"&:hover\": {\n opacity: 0.8,\n },\n },\n})\n\nexport const footerMessage = style({\n fontSize: vars.fontSize.sm,\n color: vars.color.textLighter,\n})\n\nexport const footerCopyright = style({\n fontSize: vars.fontSize.sm,\n color: vars.color.textLighter,\n})\n\nexport const footerBuildTime = style({\n fontSize: vars.fontSize.xs,\n color: vars.color.textLighter,\n marginTop: vars.space.xs,\n})\n\nexport const contentFooter = style({\n marginTop: vars.space[\"2xl\"],\n})\n\nexport const contentMeta = style({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginBottom: vars.space.lg,\n fontSize: vars.fontSize.sm,\n color: vars.color.textLighter,\n})\n\nexport const editLink = style({\n color: vars.color.brand,\n textDecoration: \"none\",\n fontWeight: 500,\n transition: `opacity ${vars.transition.fast}`,\n selectors: {\n \"&:hover\": {\n opacity: 0.8,\n },\n },\n})\n\nexport const prevNext = style({\n display: \"grid\",\n gridTemplateColumns: \"1fr 1fr\",\n gap: vars.space.md,\n maxWidth: \"80rem\",\n})\n\nconst prevNextLinkBase = style({\n display: \"flex\",\n flexDirection: \"column\",\n padding: `1.25rem ${vars.space.lg}`,\n border: `1px solid ${vars.color.border}`,\n borderRadius: vars.radius.lg,\n textDecoration: \"none\",\n transition: `all ${vars.transition.base}`,\n selectors: {\n \"&:hover\": {\n borderColor: vars.color.brand,\n background: vars.color.brandSubtle,\n },\n },\n})\n\nexport const prevLink = style([prevNextLinkBase])\n\nexport const nextLink = style([prevNextLinkBase, { textAlign: \"right\" }])\n\nexport const prevNextLabel = style({\n fontSize: vars.fontSize.xs,\n fontWeight: 500,\n color: vars.color.textLighter,\n textTransform: \"uppercase\",\n letterSpacing: \"0.05em\",\n marginBottom: vars.space.xs,\n})\n\nexport const prevNextTitle = style({\n fontWeight: 600,\n color: vars.color.brand,\n})\n","import { globalStyle, style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\nexport const layout = style({\n height: \"100vh\",\n display: \"flex\",\n flexDirection: \"column\",\n background: vars.color.sidebarBg,\n overflow: \"hidden\",\n})\n\nexport const layoutContainer = style({\n display: \"flex\",\n flex: 1,\n paddingTop: vars.layout.headerHeight,\n minHeight: 0,\n})\n\nexport const main = style({\n flex: 1,\n minWidth: 0,\n marginRight: vars.space.sm,\n marginBottom: vars.space.sm,\n background: vars.color.bg,\n borderRadius: vars.radius.lg,\n border: `1px solid ${vars.color.border}`,\n // Content scrolls inside the card\n overflowY: \"auto\",\n scrollPaddingTop: vars.space.xl,\n padding: vars.space.xl,\n \"@media\": {\n \"(max-width: 1024px)\": {\n marginRight: 0,\n marginBottom: 0,\n borderRadius: 0,\n border: \"none\",\n },\n },\n})\n\nexport const home = style({\n height: \"auto\",\n minHeight: \"100vh\",\n overflow: \"visible\",\n})\n\nexport const homeMain = style({\n paddingTop: vars.layout.headerHeight,\n})\n\n// No card styling on home page\nglobalStyle(`${home} .${main}`, {\n marginLeft: 0,\n padding: 0,\n margin: 0,\n borderRadius: 0,\n border: \"none\",\n background: vars.color.bg,\n overflow: \"visible\",\n})\n\nexport const skipLink = style({\n position: \"absolute\",\n top: \"-100%\",\n left: vars.space.md,\n zIndex: 200,\n padding: `0.75rem ${vars.space.lg}`,\n background: vars.color.brand,\n color: \"white\",\n fontWeight: 600,\n fontSize: vars.fontSize.sm,\n textDecoration: \"none\",\n borderRadius: vars.radius.base,\n boxShadow: vars.color.shadowMd,\n selectors: {\n \"&:focus\": {\n top: vars.space.md,\n },\n },\n})\n","import { type ReactNode, use } from \"react\"\nimport { Links, Meta, Scripts, ScrollRestoration } from \"react-router\"\n\nimport { ArdoContext } from \"../runtime/hooks\"\nimport * as styles from \"./Layout.css\"\n\n// =============================================================================\n// RootLayout Component (html/head/body shell)\n// =============================================================================\n\nconst ARDO_FAVICON =\n \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20style%3D%22stroke-linecap%3Around%3Bstroke-linejoin%3Around%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cdefs%3E%3Csymbol%20id%3D%22a%22%20overflow%3D%22visible%22%3E%3Cpath%20d%3D%22M300%20300%20151%20128l2%20178-41%2094h93c-35%2032-55%2068-63%20107m63-106%2095%2081m-32-96%2028%2088%22%2F%3E%3Cellipse%20cx%3D%22222%22%20cy%3D%22327%22%20fill%3D%22%2300655a%22%20rx%3D%2220%22%20ry%3D%2233%22%2F%3E%3Ccircle%20cx%3D%22227%22%20cy%3D%22324%22%20r%3D%2271%22%2F%3E%3C%2Fsymbol%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%2300655a%22%20stroke-width%3D%2216%22%3E%3Cpath%20d%3D%22M155%20318c2-70%2066-126%20145-126s143%2056%20145%20126%22%2F%3E%3Ccircle%20cx%3D%22300%22%20cy%3D%22290%22%20r%3D%22270%22%2F%3E%3Cuse%20href%3D%22%23a%22%2F%3E%3Cuse%20href%3D%22%23a%22%20transform%3D%22matrix%28-1%200%200%201%20600%200%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"\n\nexport type ArdoRootLayoutProps = {\n children: ReactNode\n /** Favicon URL (renders <link rel=\"icon\">) */\n favicon?: string\n /** Language attribute for <html> (default: from config or \"en\") */\n lang?: string\n}\n\n/**\n * Default HTML shell for Ardo sites. Replaces the boilerplate `Layout` export\n * that every root.tsx must define for React Router.\n *\n * @example Basic usage\n * ```tsx\n * // app/root.tsx\n * export { RootLayout as Layout } from \"ardo/ui\"\n * ```\n *\n * @example With favicon\n * ```tsx\n * import logo from \"./assets/logo.svg\"\n * export const Layout = (props) => <RootLayout favicon={logo} {...props} />\n * ```\n */\nexport function ArdoRootLayout({ children, favicon, lang }: ArdoRootLayoutProps) {\n // Use optional context (RootLayout renders before ArdoProvider is available)\n const context = use(ArdoContext)\n const resolvedLang = lang ?? context?.config.lang ?? \"en\"\n\n return (\n <html lang={resolvedLang} suppressHydrationWarning>\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href={favicon ?? ARDO_FAVICON} />\n <Meta />\n <Links />\n </head>\n <body suppressHydrationWarning>\n {children}\n <ScrollRestoration />\n <Scripts />\n </body>\n </html>\n )\n}\n\n// =============================================================================\n// Layout Component\n// =============================================================================\n\nexport type ArdoLayoutProps = {\n /** Header content */\n header?: ReactNode\n /** Sidebar content */\n sidebar?: ReactNode\n /** Footer content */\n footer?: ReactNode\n /** Main content */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Layout component with explicit slot props.\n *\n * @example\n * ```tsx\n * <Layout\n * header={<Header logo=\"/logo.svg\" title=\"Ardo\" nav={...} />}\n * sidebar={<Sidebar>...</Sidebar>}\n * footer={<Footer message=\"MIT License\" />}\n * >\n * <Outlet />\n * </Layout>\n * ```\n */\nexport function ArdoLayout({ header, sidebar, footer, children, className }: ArdoLayoutProps) {\n return (\n <div className={className ?? styles.layout}>\n <a href=\"#main-content\" className={styles.skipLink}>\n Skip to content\n </a>\n {header}\n <div className={styles.layoutContainer}>\n {sidebar}\n <main id=\"main-content\" className={styles.main}>\n {children}\n {footer}\n </main>\n </div>\n </div>\n )\n}\n","import { createContext, type ReactNode, use } from \"react\"\n\nconst BareContentContext = createContext(false)\n\n/**\n * Wraps imported MDX content to render without the full Content wrapper\n * (article, header, footer, navigation). Only the content body is rendered.\n *\n * ```tsx\n * import MySnippet from \"./snippet.mdx\"\n *\n * <BareContent>\n * <MySnippet />\n * </BareContent>\n * ```\n */\nexport function ArdoBareContent({ children }: { children: ReactNode }) {\n return <BareContentContext value>{children}</BareContentContext>\n}\n\nexport function useBareContent(): boolean {\n return use(BareContentContext)\n}\n","import { globalStyle, style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"../theme/contract.css\"\nimport { shikiContainerClassName } from \"./code-block-classes\"\n\n// =============================================================================\n// React CodeBlock component styles\n// =============================================================================\n\nexport const codeBlock = style({\n margin: `${vars.space.md} 0`,\n maxWidth: \"120ch\",\n borderRadius: vars.radius.base,\n overflow: \"hidden\",\n background: vars.color.bgSoft,\n})\n\nexport const codeTitle = style({\n padding: `${vars.space.sm} ${vars.space.md}`,\n fontSize: vars.fontSize.xs,\n fontWeight: 500,\n fontFamily: vars.font.mono,\n color: vars.color.textLighter,\n borderBottom: `1px solid ${vars.color.borderLight}`,\n})\n\nexport const codeWrapper = style({\n position: \"relative\",\n})\n\nglobalStyle(`${codeWrapper} pre`, {\n margin: 0,\n padding: vars.space.md,\n overflowX: \"auto\",\n fontFamily: vars.font.mono,\n fontSize: vars.fontSize.sm,\n lineHeight: 1.7,\n color: vars.color.text,\n background: \"transparent !important\",\n})\n\nglobalStyle(`.dark ${codeWrapper} pre`, {\n color: \"#e2e8f0\",\n})\n\nglobalStyle(`${codeWrapper} pre code`, {\n display: \"flex\",\n flexDirection: \"column\",\n})\n\nglobalStyle(`${codeWrapper} pre code .line`, {\n minHeight: \"1lh\",\n})\n\nexport const codeLine = style({\n display: \"block\",\n margin: `0 -${vars.space.md}`,\n padding: `0 ${vars.space.md}`,\n borderLeft: \"3px solid transparent\",\n selectors: {\n \"&.highlighted\": {\n background: \"oklch(0.48 0.15 170 / 0.08)\",\n borderLeftColor: vars.color.brand,\n },\n },\n})\n\nexport const lineNumber = style({\n display: \"inline-block\",\n width: \"2rem\",\n color: vars.color.textLighter,\n textAlign: \"right\",\n marginRight: vars.space.md,\n userSelect: \"none\",\n selectors: {\n \".dark &\": {\n color: \"#475569\",\n },\n },\n})\n\n// =============================================================================\n// Server-rendered shiki code blocks\n// =============================================================================\n\nconst s = `.${shikiContainerClassName}`\n\nglobalStyle(`${s} > [data-title]`, {\n padding: `${vars.space.sm} ${vars.space.md}`,\n fontSize: vars.fontSize.xs,\n fontWeight: 500,\n fontFamily: vars.font.mono,\n color: vars.color.textLighter,\n borderBottom: `1px solid ${vars.color.borderLight}`,\n})\n\nglobalStyle(`${s} > [data-lang]`, {\n position: \"relative\",\n})\n\nglobalStyle(`${s} pre`, {\n margin: 0,\n padding: vars.space.md,\n overflowX: \"auto\",\n fontFamily: vars.font.mono,\n fontSize: vars.fontSize.sm,\n lineHeight: 1.7,\n color: vars.color.text,\n background: \"transparent !important\",\n})\n\nglobalStyle(`.dark ${s} pre`, {\n color: \"#e2e8f0\",\n})\n\nglobalStyle(`${s} pre code`, {\n display: \"flex\",\n flexDirection: \"column\",\n})\n\nglobalStyle(`${s} .line`, {\n display: \"block\",\n minHeight: \"1lh\",\n margin: `0 -${vars.space.md}`,\n padding: `0 ${vars.space.md}`,\n borderLeft: \"3px solid transparent\",\n})\n\nglobalStyle(`${s} .line.highlighted`, {\n background: \"oklch(0.48 0.15 170 / 0.08)\",\n borderLeftColor: vars.color.brand,\n})\n\nglobalStyle(`${s} .line[data-ln]::before`, {\n content: \"attr(data-ln)\",\n display: \"inline-block\",\n width: \"2rem\",\n color: vars.color.textLighter,\n textAlign: \"right\",\n marginRight: vars.space.md,\n userSelect: \"none\",\n})\n\nglobalStyle(`.dark ${s} .line[data-ln]::before`, {\n color: \"#475569\",\n})\n\n// Copy button - hidden by default, shown on hover\nglobalStyle(`${s} button[data-code]`, {\n position: \"absolute\",\n top: vars.space.sm,\n right: vars.space.sm,\n display: \"flex\",\n alignItems: \"center\",\n gap: vars.space.xs,\n padding: `${vars.space.xs} ${vars.space.sm}`,\n background: vars.color.bg,\n border: `1px solid ${vars.color.border}`,\n borderRadius: vars.radius.sm,\n cursor: \"pointer\",\n fontSize: vars.fontSize.xs,\n fontFamily: vars.font.family,\n color: vars.color.textLight,\n opacity: 0,\n transition: `all ${vars.transition.base}`,\n})\n\nglobalStyle(`${s}:hover button[data-code]`, {\n opacity: 1,\n})\n\nglobalStyle(`${s} button[data-code]:hover`, {\n opacity: 1,\n borderColor: vars.color.brand,\n color: vars.color.brand,\n})\n\n// =============================================================================\n// Shiki theme integration\n// =============================================================================\n\nglobalStyle(\".shiki\", {\n background: \"transparent !important\",\n})\n\nglobalStyle(\".shiki span\", {\n color: \"var(--shiki-light)\",\n})\n\nglobalStyle(\".dark .shiki span\", {\n color: \"var(--shiki-dark)\",\n})\n\n// =============================================================================\n// Code group styles\n// =============================================================================\n\nexport const codeGroup = style({\n margin: `${vars.space.md} 0`,\n maxWidth: \"120ch\",\n borderRadius: vars.radius.base,\n overflow: \"hidden\",\n background: vars.color.bgSoft,\n})\n\nexport const codeGroupTabs = style({\n display: \"flex\",\n borderBottom: `1px solid ${vars.color.borderLight}`,\n})\n\nexport const codeGroupTab = style({\n padding: `${vars.space.sm} ${vars.space.md}`,\n background: \"none\",\n border: \"none\",\n cursor: \"pointer\",\n fontSize: vars.fontSize.sm,\n fontFamily: vars.font.mono,\n color: vars.color.textLighter,\n borderBottom: \"2px solid transparent\",\n marginBottom: \"-1px\",\n transition: `all ${vars.transition.fast}`,\n selectors: {\n \"&:hover\": {\n color: vars.color.text,\n },\n \"&.active\": {\n color: vars.color.brand,\n borderBottomColor: vars.color.brand,\n },\n },\n})\n\nexport const codeGroupPanels = style({})\n\nexport const codeGroupPanel = style({})\n\nglobalStyle(`${codeGroupPanel} ${codeBlock}`, {\n margin: 0,\n border: \"none\",\n borderRadius: 0,\n boxShadow: \"none\",\n background: \"transparent\",\n})\n","import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"../theme/contract.css\"\n\nexport const copyText = style({})\n\nexport const copyButton = style({\n position: \"absolute\",\n top: \"10px\",\n right: \"10px\",\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n padding: \"6px 10px\",\n background: vars.color.bg,\n border: `1px solid ${vars.color.border}`,\n borderRadius: vars.radius.sm,\n cursor: \"pointer\",\n fontSize: \"12px\",\n fontFamily: vars.font.family,\n color: vars.color.textLight,\n opacity: 0.6,\n transition: `all ${vars.transition.base}`,\n selectors: {\n \"&:hover\": {\n opacity: 1,\n background: vars.color.bgSoft,\n borderColor: vars.color.brand,\n color: vars.color.brand,\n },\n },\n})\n","import { useState } from \"react\"\n\nimport { CheckIcon, CopyIcon } from \"../icons\"\nimport * as styles from \"./CopyButton.css\"\n\ntype CopyButtonProps = {\n code: string\n}\n\nexport function ArdoCopyButton({ code }: CopyButtonProps) {\n const [copied, setCopied] = useState(false)\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(code)\n setCopied(true)\n setTimeout(() => {\n setCopied(false)\n }, 2000)\n } catch (error) {\n console.error(\"Failed to copy:\", error)\n }\n }\n\n return (\n <button\n type=\"button\"\n className={styles.copyButton}\n onClick={() => {\n void handleCopy()\n }}\n aria-label={copied ? \"Copied!\" : \"Copy code\"}\n >\n {copied ? <CheckIcon size={16} /> : <CopyIcon size={16} />}\n <span className={styles.copyText}>{copied ? \"Copied!\" : \"Copy\"}</span>\n </button>\n )\n}\n","import { Children, isValidElement, useState } from \"react\"\n\nimport * as styles from \"./CodeBlock.css\"\nimport { ArdoCopyButton } from \"./CopyButton\"\n\nconst EMPTY_HIGHLIGHT_LINES: number[] = []\n\n/**\n * Strips leading/trailing blank lines and removes common leading whitespace\n * so that template literals in indented JSX render cleanly.\n */\nfunction outdent(text: string): string {\n let start = 0\n while (start < text.length && text[start] === \"\\n\") {\n start++\n }\n\n let end = text.length\n while (\n end > start &&\n (text[end - 1] === \"\\n\" ||\n text[end - 1] === \"\\r\" ||\n text[end - 1] === \"\\t\" ||\n text[end - 1] === \" \")\n ) {\n end--\n }\n\n const trimmed = text.slice(start, end)\n const lines = trimmed.split(\"\\n\")\n\n // Find minimum indentation (ignoring empty lines)\n const indent = lines.reduce((min, line) => {\n if (line.trim().length === 0) return min\n const match = /^(\\s*)/.exec(line)\n return match ? Math.min(min, match[1].length) : min\n }, Infinity)\n\n if (indent === 0 || indent === Infinity) return trimmed\n return lines.map((line) => line.slice(indent)).join(\"\\n\")\n}\n\nexport type ArdoCodeBlockProps = {\n /** The code to display (as prop or as children string) */\n code?: string\n /** Programming language for syntax highlighting */\n language?: string\n /** Optional title shown above the code */\n title?: string\n /** Show line numbers */\n lineNumbers?: boolean\n /** Line numbers to highlight */\n highlightLines?: number[]\n /** Code as children — supports template literals with auto-outdent */\n children?: React.ReactNode\n /** Pre-rendered Shiki HTML (injected by ardo:codeblock-highlight plugin) */\n __html?: string\n}\n\nfunction CodeBlockContent({\n html,\n hasHtml,\n hasCustomChildren,\n language,\n lines,\n highlightLines,\n lineNumbers,\n children,\n}: {\n html?: string\n hasHtml: boolean\n hasCustomChildren: boolean\n language: string\n lines: string[]\n highlightLines: number[]\n lineNumbers: boolean\n children?: React.ReactNode\n}) {\n if (hasHtml) return <div dangerouslySetInnerHTML={{ __html: html ?? \"\" }} />\n if (hasCustomChildren) return <>{children}</>\n return (\n <pre className={`language-${language}`}>\n <code>\n {lines.map((line, index) => {\n const lineNum = index + 1\n const cls = highlightLines.includes(lineNum)\n ? `${styles.codeLine} highlighted`\n : styles.codeLine\n return (\n <span key={`${lineNum}-${line}`} className={cls}>\n {lineNumbers && <span className={styles.lineNumber}>{lineNum}</span>}\n <span>{line}</span>\n {index < lines.length - 1 && \"\\n\"}\n </span>\n )\n })}\n </code>\n </pre>\n )\n}\n\n/**\n * Syntax-highlighted code block with copy button.\n *\n * Code can be provided via the `code` prop or as children:\n * ```tsx\n * <CodeBlock language=\"typescript\">{`\n * const x = 42\n * `}</CodeBlock>\n * ```tsx\n * When children is a string, leading/trailing blank lines and common\n * indentation are stripped automatically.\n */\nexport function ArdoCodeBlock({\n code: codeProp,\n language = \"text\",\n title,\n lineNumbers = false,\n highlightLines = EMPTY_HIGHLIGHT_LINES,\n children,\n __html,\n}: ArdoCodeBlockProps) {\n const code = codeProp ?? (typeof children === \"string\" ? outdent(children) : \"\")\n const hasCustomChildren = children != null && typeof children !== \"string\"\n const hasHtml = (__html ?? \"\") !== \"\"\n const hasTitle = (title ?? \"\") !== \"\"\n const lines = code.split(\"\\n\")\n\n return (\n <div className={styles.codeBlock} data-lang={language}>\n {hasTitle && <div className={styles.codeTitle}>{title}</div>}\n <div className={styles.codeWrapper}>\n <CodeBlockContent\n html={__html}\n hasHtml={hasHtml}\n hasCustomChildren={hasCustomChildren}\n language={language}\n lines={lines}\n highlightLines={highlightLines}\n lineNumbers={lineNumbers}\n >\n {children}\n </CodeBlockContent>\n <ArdoCopyButton code={code} />\n </div>\n </div>\n )\n}\n\nexport type ArdoCodeGroupProps = {\n /** CodeBlock components to display as tabs */\n children: React.ReactNode\n /** Comma-separated tab labels */\n labels?: string\n}\n\n/**\n * Tabbed group of code blocks.\n * Labels come from the `labels` prop (set at remark level) or fall back to\n * data-label / title / language props on children.\n */\nexport function ArdoCodeGroup({ children, labels: labelsStr }: ArdoCodeGroupProps) {\n const [activeTab, setActiveTab] = useState(0)\n const hasLabels = (labelsStr ?? \"\") !== \"\"\n\n // Filter to only valid React elements (skip whitespace text nodes)\n const childArray = Children.toArray(children).filter((child) => isValidElement(child))\n const labelArray = hasLabels ? (labelsStr ?? \"\").split(\",\") : []\n const tabs = childArray.map((child, index) => {\n if (index < labelArray.length) {\n const explicitLabel = labelArray[index]\n if (explicitLabel !== \"\") return explicitLabel\n }\n\n return (\n readStringProp(child.props, \"data-label\") ??\n readStringProp(child.props, \"title\") ??\n readStringProp(child.props, \"language\") ??\n `Tab ${index + 1}`\n )\n })\n\n return (\n <div className={styles.codeGroup}>\n <div className={styles.codeGroupTabs}>\n {tabs.map((tab, index) => (\n <button\n type=\"button\"\n key={tab}\n className={[styles.codeGroupTab, index === activeTab && \"active\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => {\n setActiveTab(index)\n }}\n >\n {tab}\n </button>\n ))}\n </div>\n <div className={styles.codeGroupPanels}>\n {childArray.map((child, index) => (\n <div\n key={tabAt(tabs, index)}\n className={[styles.codeGroupPanel, index === activeTab && \"active\"]\n .filter(Boolean)\n .join(\" \")}\n style={{ display: index === activeTab ? \"block\" : \"none\" }}\n >\n {child}\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nfunction readStringProp(props: unknown, name: string): string | undefined {\n if (!isRecord(props)) {\n return undefined\n }\n\n const value = props[name]\n return typeof value === \"string\" && value !== \"\" ? value : undefined\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value != null && typeof value === \"object\"\n}\n\nfunction tabAt(tabs: string[], index: number): string {\n return tabs[index]\n}\n","import { style } from \"@vanilla-extract/css\"\nimport { recipe } from \"@vanilla-extract/recipes\"\n\nimport { vars } from \"../theme/contract.css\"\n\nexport const container = recipe({\n base: {\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: vars.space.md,\n margin: `${vars.space.md} 0`,\n padding: `${vars.space.md} ${vars.space.lg}`,\n borderRadius: vars.radius.lg,\n border: \"1px solid\",\n },\n variants: {\n type: {\n tip: {\n background: vars.color.tipBg,\n borderColor: vars.color.tipBorder,\n color: vars.color.tip,\n },\n warning: {\n background: vars.color.warningBg,\n borderColor: vars.color.warningBorder,\n color: vars.color.warning,\n },\n danger: {\n background: vars.color.dangerBg,\n borderColor: vars.color.dangerBorder,\n color: vars.color.danger,\n },\n info: {\n background: vars.color.infoBg,\n borderColor: vars.color.infoBorder,\n color: vars.color.info,\n },\n note: {\n background: vars.color.noteBg,\n borderColor: vars.color.noteBorder,\n color: vars.color.note,\n },\n },\n },\n})\n\nexport const containerIcon = recipe({\n base: {\n flexShrink: 0,\n marginTop: \"0.125rem\",\n },\n variants: {\n type: {\n tip: { color: vars.color.tip },\n warning: { color: vars.color.warning },\n danger: { color: vars.color.danger },\n info: { color: vars.color.info },\n note: { color: vars.color.note },\n },\n },\n})\n\nexport const containerBody = style({\n flex: 1,\n minWidth: 0,\n color: vars.color.text,\n fontSize: vars.fontSize.sm,\n lineHeight: 1.6,\n})\n\nexport const containerTitle = recipe({\n base: {\n fontWeight: 600,\n fontSize: vars.fontSize.sm,\n marginBottom: vars.space.xs,\n },\n variants: {\n type: {\n tip: { color: vars.color.tip },\n warning: { color: vars.color.warning },\n danger: { color: vars.color.danger },\n info: { color: vars.color.info },\n note: { color: vars.color.note },\n },\n },\n})\n\nexport const containerContent = style({})\n","import type { ReactNode } from \"react\"\n\nimport { AlertTriangleIcon, FileTextIcon, InfoIcon, LightbulbIcon, XCircleIcon } from \"../icons\"\nimport * as styles from \"./Container.css\"\n\nexport type ArdoContainerType = \"danger\" | \"info\" | \"note\" | \"tip\" | \"warning\"\n\nexport type ArdoContainerProps = {\n /** Container type determining the style */\n type: ArdoContainerType\n /** Optional custom title */\n title?: string\n /** Content to display inside the container */\n children: ReactNode\n}\n\nconst defaultTitles: Record<ArdoContainerType, string> = {\n tip: \"TIP\",\n warning: \"WARNING\",\n danger: \"DANGER\",\n info: \"INFO\",\n note: \"NOTE\",\n}\n\nconst icons: Record<ArdoContainerType, ReactNode> = {\n tip: <LightbulbIcon size={18} />,\n warning: <AlertTriangleIcon size={18} />,\n danger: <XCircleIcon size={18} />,\n info: <InfoIcon size={18} />,\n note: <FileTextIcon size={18} />,\n}\n\n/**\n * A styled container for callouts, tips, warnings, etc.\n */\nexport function ArdoContainer({ type, title, children }: ArdoContainerProps) {\n const hasCustomTitle = title != null && title !== \"\" && title !== defaultTitles[type]\n\n return (\n <div className={styles.container({ type })}>\n <span className={styles.containerIcon({ type })}>{icons[type]}</span>\n <div className={styles.containerBody}>\n {hasCustomTitle && <p className={styles.containerTitle({ type })}>{title}</p>}\n <div className={styles.containerContent}>{children}</div>\n </div>\n </div>\n )\n}\n\nexport type ArdoTipProps = {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A tip container for helpful information.\n */\nexport function ArdoTip({ title, children }: ArdoTipProps) {\n return (\n <ArdoContainer type=\"tip\" title={title}>\n {children}\n </ArdoContainer>\n )\n}\n\nexport type ArdoWarningProps = {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A warning container for cautionary information.\n */\nexport function ArdoWarning({ title, children }: ArdoWarningProps) {\n return (\n <ArdoContainer type=\"warning\" title={title}>\n {children}\n </ArdoContainer>\n )\n}\n\nexport type ArdoDangerProps = {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A danger container for critical warnings.\n */\nexport function ArdoDanger({ title, children }: ArdoDangerProps) {\n return (\n <ArdoContainer type=\"danger\" title={title}>\n {children}\n </ArdoContainer>\n )\n}\n\nexport type ArdoInfoProps = {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * An info container for informational content.\n */\nexport function ArdoInfo({ title, children }: ArdoInfoProps) {\n return (\n <ArdoContainer type=\"info\" title={title}>\n {children}\n </ArdoContainer>\n )\n}\n\nexport type ArdoNoteProps = {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A note container for additional information.\n */\nexport function ArdoNote({ title, children }: ArdoNoteProps) {\n return (\n <ArdoContainer type=\"note\" title={title}>\n {children}\n </ArdoContainer>\n )\n}\n","import type { ComponentType, ReactNode, SVGAttributes } from \"react\"\n\ntype IconComponent = ComponentType<{ size?: number } & SVGAttributes<SVGSVGElement>>\n\nexport type ArdoIconProps = {\n /** Name of the registered icon */\n name: string\n /** Icon size */\n size?: number\n} & SVGAttributes<SVGSVGElement>\n\n// Icon registry - users register only the icons they need\nconst iconRegistry = new Map<string, IconComponent>()\n\n/**\n * Register icons for use with the Icon component.\n * Only registered icons are included in your bundle.\n *\n * @example\n * ```tsx\n * // In your app's entry point or layout:\n * import { registerIcons } from \"ardo/ui\"\n * import { Zap, Rocket, Code } from \"lucide-react\"\n *\n * registerIcons({ Zap, Rocket, Code })\n * ```\n */\nexport function registerIcons(icons: Record<string, IconComponent>): void {\n for (const [name, icon] of Object.entries(icons)) {\n iconRegistry.set(name, icon)\n }\n}\n\n/**\n * Get all registered icon names (useful for documentation).\n */\nexport function getRegisteredIconNames(): string[] {\n return [...iconRegistry.keys()]\n}\n\n/**\n * Renders a registered icon by name.\n * Icons must be registered first using `registerIcons()`.\n *\n * @example\n * ```tsx\n * // First register icons in your app:\n * import { registerIcons } from \"ardo/ui\"\n * import { Zap, Rocket } from \"lucide-react\"\n * registerIcons({ Zap, Rocket })\n *\n * // Then use in MDX:\n * <Icon name=\"Zap\" size={24} />\n * <Icon name=\"Rocket\" className=\"text-brand\" />\n * ```\n *\n * @see https://lucide.dev/icons for available icon names\n */\nexport function ArdoIcon({ name, ...props }: ArdoIconProps): ReactNode {\n const IconComp = iconRegistry.get(name)\n\n if (!IconComp) {\n console.warn(`[Ardo] Icon \"${name}\" not found. Did you register it with registerIcons()?`)\n return null\n }\n\n return <IconComp {...props} />\n}\n","import { globalStyle, style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"../theme/contract.css\"\n\nexport const steps = style({\n margin: \"24px 0\",\n})\n\nglobalStyle(`${steps} ol`, {\n listStyle: \"none\",\n paddingLeft: 0,\n counterReset: \"ardo-step\",\n})\n\nglobalStyle(`${steps} ol > li`, {\n position: \"relative\",\n paddingLeft: \"48px\",\n paddingBottom: \"24px\",\n counterIncrement: \"ardo-step\",\n marginBottom: 0,\n})\n\nglobalStyle(`${steps} ol > li:last-child`, {\n paddingBottom: 0,\n})\n\nglobalStyle(`${steps} ol > li::before`, {\n content: \"counter(ardo-step)\",\n position: \"absolute\",\n left: 0,\n top: \"2px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"32px\",\n height: \"32px\",\n borderRadius: \"50%\",\n background: vars.color.brand,\n color: \"white\",\n fontSize: \"14px\",\n fontWeight: 700,\n lineHeight: 1,\n flexShrink: 0,\n})\n\nglobalStyle(`${steps} ol > li::after`, {\n content: '\"\"',\n position: \"absolute\",\n left: \"15px\",\n top: \"38px\",\n bottom: 0,\n width: \"2px\",\n background: vars.color.border,\n})\n\nglobalStyle(`${steps} ol > li:last-child::after`, {\n display: \"none\",\n})\n\nglobalStyle(`.ardo-content ${steps} ol`, {\n paddingLeft: 0,\n maxWidth: \"none\",\n})\n\nglobalStyle(`.ardo-content ${steps} ol > li`, {\n paddingLeft: \"48px\",\n marginBottom: 0,\n})\n\nglobalStyle(`.ardo-content ${steps} ol > li::marker`, {\n content: \"none\",\n})\n","import type { ReactNode } from \"react\"\n\nimport * as styles from \"./Steps.css\"\n\nexport type ArdoStepsProps = {\n /** Content to display, typically an ordered list (`<ol>`) */\n children: ReactNode\n}\n\n/**\n * A wrapper for step-by-step instructions rendered as an ordered list.\n *\n * @example\n * ```tsx\n * <ArdoSteps>\n * <ol>\n * <li>Install the package</li>\n * <li>Configure your site</li>\n * <li>Start writing</li>\n * </ol>\n * </ArdoSteps>\n * ```\n */\nexport function ArdoSteps({ children }: ArdoStepsProps) {\n return <div className={styles.steps}>{children}</div>\n}\n","import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"../theme/contract.css\"\n\nexport const tabs = style({\n margin: \"20px 0\",\n})\n\nexport const tabList = style({\n display: \"flex\",\n borderBottom: `1px solid ${vars.color.border}`,\n gap: \"4px\",\n})\n\nexport const tab = style({\n padding: \"10px 18px\",\n background: \"none\",\n border: \"none\",\n cursor: \"pointer\",\n fontSize: \"14px\",\n fontWeight: 500,\n color: vars.color.textLight,\n borderBottom: \"2px solid transparent\",\n marginBottom: \"-1px\",\n transition: `all ${vars.transition.fast}`,\n selectors: {\n \"&:hover\": {\n color: vars.color.text,\n },\n \"&.active\": {\n color: vars.color.brand,\n borderBottomColor: vars.color.brand,\n },\n },\n})\n\nexport const tabPanel = style({\n padding: \"20px 0\",\n})\n\nexport const tabPanels = style({})\n","import {\n Children,\n createContext,\n isValidElement,\n type ReactNode,\n use,\n useMemo,\n useRef,\n useState,\n} from \"react\"\n\nimport * as styles from \"./Tabs.css\"\n\ntype TabsContextValue = {\n activeTab: string\n setActiveTab: (tab: string) => void\n getTabValue: (value?: string) => string\n getPanelValue: (value?: string) => string\n}\n\nconst TabsContext = createContext<null | TabsContextValue>(null)\nconst AUTO_TAB_PREFIX = \"__ardo-tab-\"\n\nfunction useTabsContext() {\n const context = use(TabsContext)\n if (!context) {\n throw new Error(\"Tab components must be used within an ArdoTabs component\")\n }\n return context\n}\n\nexport type ArdoTabsProps = {\n /** Default active tab value */\n defaultValue?: string\n /** Tab components (ArdoTabList and ArdoTabPanels) */\n children: ReactNode\n}\n\n/**\n * Tabs container component for organizing content into tabbed panels.\n */\nexport function ArdoTabs({ defaultValue, children }: ArdoTabsProps) {\n const [activeTab, setActiveTab] = useState(() => defaultValue ?? findFirstTabValue(children))\n const tabIndexRef = useRef(0)\n const panelIndexRef = useRef(0)\n\n tabIndexRef.current = 0\n panelIndexRef.current = 0\n\n const getTabValue = (value?: string) => {\n const index = tabIndexRef.current++\n return value ?? `${AUTO_TAB_PREFIX}${index}`\n }\n\n const getPanelValue = (value?: string) => {\n const index = panelIndexRef.current++\n return value ?? `${AUTO_TAB_PREFIX}${index}`\n }\n\n const effectiveTab = defaultValue ?? activeTab\n\n const contextValue = useMemo(\n () => ({ activeTab: effectiveTab, setActiveTab, getTabValue, getPanelValue }),\n [effectiveTab]\n )\n\n return (\n <TabsContext value={contextValue}>\n <div className={styles.tabs}>{children}</div>\n </TabsContext>\n )\n}\n\nexport type ArdoTabListProps = {\n /** Tab buttons */\n children: ReactNode\n}\n\n/**\n * Container for ArdoTab buttons.\n */\nexport function ArdoTabList({ children }: ArdoTabListProps) {\n return (\n <div className={styles.tabList} role=\"tablist\">\n {children}\n </div>\n )\n}\n\nexport type ArdoTabProps = {\n /** Unique value identifying this tab (optional if tab order matches panels) */\n value?: string\n /** Tab button label */\n children: ReactNode\n}\n\n/**\n * Individual tab button.\n */\nexport function ArdoTab({ value, children }: ArdoTabProps) {\n const { activeTab, setActiveTab, getTabValue } = useTabsContext()\n const resolvedValue = getTabValue(value)\n const isActive = activeTab === resolvedValue\n\n return (\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n className={[styles.tab, isActive && \"active\"].filter(Boolean).join(\" \")}\n onClick={() => {\n setActiveTab(resolvedValue)\n }}\n >\n {children}\n </button>\n )\n}\n\nexport type ArdoTabPanelProps = {\n /** Value matching the corresponding ArdoTab (optional if panel order matches tabs) */\n value?: string\n /** Panel content */\n children: ReactNode\n}\n\n/**\n * Content panel for a tab.\n */\nexport function ArdoTabPanel({ value, children }: ArdoTabPanelProps) {\n const { activeTab, getPanelValue } = useTabsContext()\n const resolvedValue = getPanelValue(value)\n const isActive = activeTab === resolvedValue\n\n if (!isActive) {\n return null\n }\n\n return (\n <div role=\"tabpanel\" className={styles.tabPanel}>\n {children}\n </div>\n )\n}\n\nexport type ArdoTabPanelsProps = {\n /** ArdoTabPanel components */\n children: ReactNode\n}\n\n/**\n * Container for ArdoTabPanel components.\n */\nexport function ArdoTabPanels({ children }: ArdoTabPanelsProps) {\n return <div className={styles.tabPanels}>{children}</div>\n}\n\nfunction findFirstTabValue(children: ReactNode): string {\n for (const child of Children.toArray(children)) {\n const tabValue = getFirstTabValueFromChild(child)\n if (tabValue != null) {\n return tabValue\n }\n }\n\n return \"\"\n}\n\nfunction getFirstTabValueFromChild(child: ReactNode): null | string {\n if (!isValidElement<{ children?: ReactNode }>(child)) {\n return null\n }\n\n if (isValidElement<ArdoTabProps>(child) && child.type === ArdoTab) {\n return child.props.value ?? `${AUTO_TAB_PREFIX}0`\n }\n\n const nestedChildren = child.props.children\n if (nestedChildren == null) {\n return null\n }\n\n const nestedValue = findFirstTabValue(nestedChildren)\n return nestedValue === \"\" ? null : nestedValue\n}\n","import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\nexport const breadcrumb = style({\n display: \"none\",\n alignItems: \"center\",\n gap: vars.space.sm,\n fontSize: vars.fontSize.sm,\n color: vars.color.textLighter,\n marginBottom: vars.space.md,\n \"@media\": {\n \"(max-width: 1024px)\": {\n display: \"flex\",\n },\n },\n})\n\nexport const breadcrumbSeparator = style({\n color: vars.color.textLighter,\n})\n\nexport const breadcrumbCurrent = style({\n color: vars.color.text,\n fontWeight: 500,\n})\n","import { useLocation } from \"react-router\"\n\nimport type { SidebarItem } from \"../config/types\"\n\nimport { useArdoSidebar } from \"../runtime/hooks\"\nimport * as styles from \"./Breadcrumb.css\"\n\ntype BreadcrumbResult = {\n section?: string\n page?: string\n}\n\nfunction matchInChildren(\n groupText: string,\n items: SidebarItem[],\n path: string\n): BreadcrumbResult | undefined {\n for (const item of items) {\n if (item.link === path) return { section: groupText, page: item.text }\n if (item.items != null) {\n const sub = item.items.find((s) => s.link === path)\n if (sub != null) return { section: groupText, page: sub.text }\n }\n }\n return undefined\n}\n\nfunction findBreadcrumb(sidebar: SidebarItem[], currentPath: string): BreadcrumbResult {\n for (const group of sidebar) {\n if (group.link === currentPath) return { page: group.text }\n if (group.items != null) {\n const found = matchInChildren(group.text, group.items, currentPath)\n if (found != null) return found\n }\n }\n return {}\n}\n\nexport function ArdoBreadcrumb() {\n const sidebar = useArdoSidebar()\n const location = useLocation()\n const { section, page } = findBreadcrumb(sidebar, location.pathname)\n\n if (page == null || page === \"\") return null\n\n return (\n <nav className={styles.breadcrumb} aria-label=\"Breadcrumb\">\n {section != null && section !== \"\" && (\n <>\n <span>{section}</span>\n <span className={styles.breadcrumbSeparator} aria-hidden>\n ›\n </span>\n </>\n )}\n <span className={styles.breadcrumbCurrent}>{page}</span>\n </nav>\n )\n}\n","import { globalStyle, style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\nexport const ardoContent = style({})\nconst c = `.${ardoContent}`\n\nglobalStyle(`${c} h1, ${c} h2, ${c} h3, ${c} h4, ${c} h5, ${c} h6`, {\n fontFamily: vars.font.familyHeading,\n fontWeight: 600,\n lineHeight: 1.3,\n marginTop: vars.space.xl,\n marginBottom: vars.space.sm,\n letterSpacing: \"-0.02em\",\n})\n\nglobalStyle(`${c} h1`, {\n fontSize: vars.fontSize[\"2xl\"],\n fontWeight: 700,\n marginTop: vars.space[\"2xl\"],\n})\n\nglobalStyle(`${c} h2`, {\n fontSize: vars.fontSize.xl,\n paddingTop: vars.space.sm,\n letterSpacing: \"-0.015em\",\n})\n\nglobalStyle(`${c} h3`, {\n fontSize: vars.fontSize.base,\n fontWeight: 600,\n})\n\nglobalStyle(`${c} h4`, {\n fontSize: vars.fontSize.sm,\n fontWeight: 600,\n})\n\nglobalStyle(`${c} p`, {\n marginBottom: vars.space.md,\n maxWidth: \"68ch\",\n})\n\nglobalStyle(`${c} a`, {\n color: vars.color.brand,\n textDecoration: \"underline\",\n textDecorationColor: \"transparent\",\n textDecorationThickness: \"1px\",\n textUnderlineOffset: \"2px\",\n transition: `text-decoration-color ${vars.transition.fast}`,\n})\n\nglobalStyle(`${c} a:hover`, {\n textDecorationColor: vars.color.brand,\n})\n\nglobalStyle(`${c} ul, ${c} ol`, {\n marginBottom: vars.space.md,\n paddingLeft: vars.space.lg,\n maxWidth: \"68ch\",\n})\n\nglobalStyle(`${c} li`, {\n marginBottom: vars.space.xs,\n})\n\nglobalStyle(`${c} li::marker`, {\n color: vars.color.textLighter,\n})\n\nglobalStyle(`${c} blockquote`, {\n margin: `${vars.space.lg} 0`,\n padding: `${vars.space.md} ${vars.space.lg}`,\n borderLeft: `3px solid ${vars.color.brand}`,\n background: vars.color.bgSoft,\n borderRadius: `0 ${vars.radius.base} ${vars.radius.base} 0`,\n color: vars.color.text,\n fontSize: vars.fontSize.base,\n})\n\nglobalStyle(`${c} hr`, {\n margin: `${vars.space.xl} 0`,\n border: \"none\",\n borderTop: `1px solid ${vars.color.border}`,\n})\n\nglobalStyle(`${c} table`, {\n width: \"100%\",\n margin: `${vars.space.lg} 0`,\n borderCollapse: \"collapse\",\n fontSize: vars.fontSize.sm,\n borderRadius: vars.radius.base,\n overflow: \"hidden\",\n border: `1px solid ${vars.color.border}`,\n})\n\nglobalStyle(`${c} th, ${c} td`, {\n padding: `${vars.space.sm} ${vars.space.md}`,\n borderBottom: `1px solid ${vars.color.borderLight}`,\n textAlign: \"left\",\n})\n\nglobalStyle(`${c} th`, {\n background: vars.color.bgSoft,\n fontWeight: 600,\n fontSize: vars.fontSize.xs,\n textTransform: \"uppercase\",\n letterSpacing: \"0.04em\",\n})\n\nglobalStyle(`${c} img`, {\n maxWidth: \"100%\",\n borderRadius: vars.radius.base,\n border: `1px solid ${vars.color.border}`,\n})\n\n// Inline code\nglobalStyle(`${c} code`, {\n fontFamily: vars.font.mono,\n fontSize: \"0.875em\",\n padding: \"0.125rem 0.375rem\",\n background: vars.color.bgMute,\n borderRadius: vars.radius.sm,\n fontWeight: 500,\n})\n\nglobalStyle(`${c} pre code`, {\n padding: 0,\n background: \"none\",\n border: \"none\",\n fontWeight: 400,\n})\n","import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\n/**\n * 3-column layout: Sidebar (fixed) | Content (fluid) | TOC (fixed)\n */\nexport const docPage = style({\n display: \"flex\",\n flex: 1,\n minWidth: 0,\n gap: vars.space[\"3xl\"],\n maxWidth: \"80rem\",\n})\n\nexport const contentContainer = style({\n flex: 1,\n minWidth: 0,\n maxWidth: \"none\",\n})\n\nexport const contentHeader = style({\n marginBottom: vars.space.lg,\n paddingBottom: vars.space.md,\n borderBottom: `1px solid ${vars.color.border}`,\n})\n\nexport const contentTitle = style({\n fontSize: vars.fontSize[\"2xl\"],\n fontFamily: vars.font.familyHeading,\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: \"-0.025em\",\n marginBottom: vars.space.xs,\n})\n\nexport const contentDescription = style({\n fontSize: vars.fontSize.base,\n color: vars.color.textLight,\n lineHeight: 1.6,\n maxWidth: \"60ch\",\n})\n\nexport const contentBody = style({\n lineHeight: 1.6,\n})\n","import type { ReactNode } from \"react\"\n\nimport { Link, useLocation } from \"react-router\"\n\nimport { useArdoPageData, useArdoSidebar, useArdoSiteConfig } from \"../runtime/hooks\"\nimport { getPrevNextLinks } from \"../runtime/sidebar-utils\"\nimport { useBareContent } from \"./BareContent\"\nimport { ArdoBreadcrumb } from \"./Breadcrumb\"\nimport { ardoContent } from \"./content.css\"\nimport * as docStyles from \"./DocPage.css\"\nimport * as footerStyles from \"./Footer.css\"\n\ntype ContentProps = {\n children: ReactNode\n /** Edit link configuration (overrides ArdoSiteConfig) */\n editLink?: { pattern: string; text?: string }\n /** Last updated configuration (overrides ArdoSiteConfig) */\n lastUpdated?: { enabled?: boolean; text?: string; formatOptions?: Intl.DateTimeFormatOptions }\n}\n\ntype ContentMetaInput = {\n pageData: ReturnType<typeof useArdoPageData>\n editLink: ContentProps[\"editLink\"]\n lastUpdated: ContentProps[\"lastUpdated\"]\n siteConfig: ReturnType<typeof useArdoSiteConfig>\n}\n\nfunction resolveEditLink(input: ContentMetaInput) {\n const resolved = input.editLink ?? input.siteConfig.editLink\n const pattern = resolved?.pattern ?? \"\"\n const relativePath = input.pageData?.relativePath ?? \"\"\n const show =\n input.pageData?.frontmatter.editLink !== false && pattern !== \"\" && input.pageData !== undefined\n return {\n href: show ? pattern.replace(\":path\", relativePath) : undefined,\n text: resolved?.text ?? \"Edit this page\",\n show,\n }\n}\n\nfunction resolveLastUpdated(input: ContentMetaInput) {\n const resolved = input.lastUpdated ?? input.siteConfig.lastUpdated\n const value = input.pageData?.lastUpdated\n const show =\n input.pageData?.frontmatter.lastUpdated !== false &&\n resolved?.enabled === true &&\n typeof value === \"number\"\n const formatOptions = resolved?.formatOptions ?? {\n year: \"numeric\" as const,\n month: \"long\" as const,\n day: \"numeric\" as const,\n }\n return {\n label: resolved?.text ?? \"Last updated\",\n text: show ? new Date(value).toLocaleDateString(undefined, formatOptions) : undefined,\n show,\n }\n}\n\nexport function ArdoContent({ children, editLink, lastUpdated }: ContentProps) {\n const isBare = useBareContent()\n const pageData = useArdoPageData()\n const siteConfig = useArdoSiteConfig()\n const sidebar = useArdoSidebar()\n const location = useLocation()\n\n if (isBare) {\n return <div className={`${docStyles.contentBody} ${ardoContent}`}>{children}</div>\n }\n\n const input: ContentMetaInput = { pageData, editLink, lastUpdated, siteConfig }\n const edit = resolveEditLink(input)\n const updated = resolveLastUpdated(input)\n const { prev, next } = getPrevNextLinks(sidebar, location.pathname)\n\n return (\n <article className={docStyles.contentContainer}>\n <ArdoBreadcrumb />\n <ContentHeader\n title={pageData?.frontmatter.title ?? \"\"}\n description={pageData?.frontmatter.description ?? \"\"}\n />\n <div className={`${docStyles.contentBody} ${ardoContent}`}>{children}</div>\n <ContentMeta edit={edit} updated={updated} />\n <ContentPrevNext prev={prev} next={next} />\n </article>\n )\n}\n\nfunction ContentHeader({ title, description }: { title: string; description: string }) {\n if (title === \"\") return null\n return (\n <header className={docStyles.contentHeader}>\n <h1 className={docStyles.contentTitle}>{title}</h1>\n {description !== \"\" && <p className={docStyles.contentDescription}>{description}</p>}\n </header>\n )\n}\n\nfunction ContentMeta({\n edit,\n updated,\n}: {\n edit: ReturnType<typeof resolveEditLink>\n updated: ReturnType<typeof resolveLastUpdated>\n}) {\n if (!edit.show && !updated.show) return null\n return (\n <div className={footerStyles.contentMeta}>\n {edit.show && (\n <a\n href={edit.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={footerStyles.editLink}\n >\n {edit.text}\n </a>\n )}\n {updated.show && (\n <span>\n {updated.label}: {updated.text}\n </span>\n )}\n </div>\n )\n}\n\nfunction ContentPrevNext({\n prev,\n next,\n}: {\n prev: ReturnType<typeof getPrevNextLinks>[\"prev\"]\n next: ReturnType<typeof getPrevNextLinks>[\"next\"]\n}) {\n const prevLink = prev?.link ?? \"\"\n const nextLink = next?.link ?? \"\"\n const hasPrev = prevLink !== \"\"\n const hasNext = nextLink !== \"\"\n if (!hasPrev && !hasNext) return null\n\n return (\n <nav className={footerStyles.prevNext} aria-label=\"Page navigation\">\n {hasPrev ? (\n <Link to={prevLink} className={footerStyles.prevLink}>\n <span className={footerStyles.prevNextLabel}>Previous</span>\n <span className={footerStyles.prevNextTitle}>{prev?.text}</span>\n </Link>\n ) : (\n <div />\n )}\n {hasNext ? (\n <Link to={nextLink} className={footerStyles.nextLink}>\n <span className={footerStyles.prevNextLabel}>Next</span>\n <span className={footerStyles.prevNextTitle}>{next?.text}</span>\n </Link>\n ) : (\n <div />\n )}\n </nav>\n )\n}\n","import { style } from \"@vanilla-extract/css\"\n\nimport { vars } from \"./theme/contract.css\"\n\nexport const toc = style({\n width: vars.layout.tocWidth,\n flexShrink: 0,\n position: \"sticky\",\n top: 0,\n alignSelf: \"flex-start\",\n maxHeight: \"100%\",\n padding: `${vars.space.xl} 0`,\n overflowY: \"auto\",\n \"@media\": {\n \"(max-width: 1280px)\": {\n display: \"none\",\n },\n },\n})\n\nexport const tocTitle = style({\n fontSize: vars.fontSize.xs,\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \"0.06em\",\n color: vars.color.textLight,\n marginBottom: vars.space.md,\n})\n\nexport const tocList = style({\n listStyle: \"none\",\n})\n\nexport const tocLink = style({\n display: \"block\",\n padding: `${vars.space.xs} 0 ${vars.space.xs} ${vars.space.md}`,\n color: vars.color.textLighter,\n textDecoration: \"none\",\n fontSize: vars.fontSize.sm,\n lineHeight: 1.5,\n fontWeight: 400,\n borderLeft: \"2px solid transparent\",\n transition: `all ${vars.transition.fast}`,\n selectors: {\n \"&:hover\": {\n color: vars.color.text,\n borderLeftColor: vars.color.borderLight,\n },\n \"&.active\": {\n color: vars.color.brand,\n borderLeftColor: vars.color.brand,\n fontWeight: 500,\n },\n },\n})\n\nexport const tocLink3 = style({\n paddingLeft: \"1.75rem\",\n})\n\nexport const tocLink4 = style({\n paddingLeft: \"2.5rem\",\n})\n","import { useEffect, useRef, useState } from \"react\"\n\nimport type { TOCItem } from \"../config/types\"\n\nimport { useArdoSiteConfig, useArdoTOC } from \"../runtime/hooks\"\nimport * as styles from \"./Toc.css\"\n\nexport type ArdoTOCProps = {\n /** Label for the TOC heading (default: \"On this page\") */\n label?: string\n}\n\nexport function ArdoTOC({ label: labelProp }: ArdoTOCProps = {}) {\n const toc = useArdoTOC()\n const siteConfig = useArdoSiteConfig()\n const [activeId, setActiveId] = useState<string>(\"\")\n const scrollContainerRef = useRef<HTMLElement | null>(null)\n const isClickScrolling = useRef(false)\n\n const label = labelProp ?? siteConfig.tocLabel ?? \"On this page\"\n\n useEffect(() => {\n scrollContainerRef.current = document.getElementById(\"main-content\")\n }, [])\n\n useEffect(() => {\n if (toc.length === 0) return\n\n const scrollContainer = scrollContainerRef.current\n if (!scrollContainer) return\n\n const headingElements = toc.map((item) => document.getElementById(item.id)).filter(Boolean)\n if (headingElements.length === 0) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (isClickScrolling.current) return\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setActiveId(entry.target.id)\n break\n }\n }\n },\n {\n root: scrollContainer,\n // Shrink the detection zone to a narrow band at the top.\n // The -20px top accounts for scroll-padding, -85% bottom means\n // only headings in the top ~15% of the container trigger activation.\n rootMargin: \"-20px 0px -85% 0px\",\n threshold: 0,\n }\n )\n\n for (const element of headingElements) {\n if (element !== null) observer.observe(element)\n }\n\n return () => {\n for (const element of headingElements) {\n if (element !== null) observer.unobserve(element)\n }\n }\n }, [toc])\n\n const handleClickItem = (id: string) => {\n setActiveId(id)\n isClickScrolling.current = true\n const element = document.getElementById(id)\n const container = scrollContainerRef.current\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n globalThis.history.pushState(null, \"\", `#${id}`)\n }\n // Re-enable observer after scroll finishes\n if (container) {\n const onScrollEnd = () => {\n isClickScrolling.current = false\n container.removeEventListener(\"scrollend\", onScrollEnd)\n }\n container.addEventListener(\"scrollend\", onScrollEnd, { once: true })\n // Fallback for browsers without scrollend\n setTimeout(() => {\n isClickScrolling.current = false\n }, 1000)\n } else {\n isClickScrolling.current = false\n }\n }\n\n if (toc.length === 0) {\n return null\n }\n\n return (\n <aside className={styles.toc}>\n <div>\n <h3 className={styles.tocTitle}>{label}</h3>\n <nav aria-label=\"Table of contents\">\n <TOCItems items={toc} activeId={activeId} onClickItem={handleClickItem} />\n </nav>\n </div>\n </aside>\n )\n}\n\ntype TOCItemsProps = {\n items: TOCItem[]\n activeId: string\n onClickItem: (id: string) => void\n}\n\nfunction TOCItems({ items, activeId, onClickItem }: TOCItemsProps) {\n return (\n <ul className={styles.tocList}>\n {items.map((item) => (\n <TOCItemComponent key={item.id} item={item} activeId={activeId} onClickItem={onClickItem} />\n ))}\n </ul>\n )\n}\n\ntype TOCItemComponentProps = {\n item: TOCItem\n activeId: string\n onClickItem: (id: string) => void\n}\n\nfunction TOCItemComponent({ item, activeId, onClickItem }: TOCItemComponentProps) {\n const isActive = item.id === activeId\n const hasActiveChild = hasActiveDescendant(item, activeId)\n\n return (\n <li>\n <a\n href={`#${item.id}`}\n className={[\n styles.tocLink,\n item.level === 3 && styles.tocLink3,\n item.level === 4 && styles.tocLink4,\n isActive && \"active\",\n hasActiveChild && \"child-active\",\n ]\n .filter(Boolean)\n .join(\" \")}\n onClick={(e) => {\n e.preventDefault()\n onClickItem(item.id)\n }}\n >\n {item.text}\n </a>\n {item.children && item.children.length > 0 && (\n <TOCItems items={item.children} activeId={activeId} onClickItem={onClickItem} />\n )}\n </li>\n )\n}\n\nfunction hasActiveDescendant(item: TOCItem, activeId: string): boolean {\n if (!item.children) return false\n\n for (const child of item.children) {\n if (child.id === activeId) return true\n if (hasActiveDescendant(child, activeId)) return true\n }\n\n return false\n}\n","import type { ReactNode } from \"react\"\n\nimport { useArdoPageData } from \"../runtime/hooks\"\nimport { ArdoContent } from \"./Content\"\nimport * as styles from \"./DocPage.css\"\nimport { ArdoLayout } from \"./Layout\"\nimport { ArdoTOC } from \"./Toc\"\n\n// =============================================================================\n// DocPage Component (includes Layout - for backwards compatibility)\n// =============================================================================\n\ntype DocPageProps = {\n children: ReactNode\n /** Edit link configuration (forwarded to Content) */\n editLink?: { pattern: string; text?: string }\n /** Last updated configuration (forwarded to Content) */\n lastUpdated?: { enabled?: boolean; text?: string; formatOptions?: Intl.DateTimeFormatOptions }\n /** TOC label (forwarded to TOC) */\n tocLabel?: string\n}\n\n/**\n * Full documentation page with Layout wrapper.\n * Use this when you don't have a _layout.tsx file.\n *\n * @example\n * ```tsx\n * <DocPage>\n * <Content />\n * </DocPage>\n * ```\n */\nexport function ArdoDocPage({ children, editLink, lastUpdated, tocLabel }: DocPageProps) {\n const pageData = useArdoPageData()\n const hideToc = pageData?.frontmatter.outline === false\n\n return (\n <ArdoLayout>\n <div className={styles.docPage}>\n <ArdoContent editLink={editLink} lastUpdated={lastUpdated}>\n {children}\n </ArdoContent>\n {!hideToc && <ArdoTOC label={tocLabel} />}\n </div>\n </ArdoLayout>\n )\n}\n\n// =============================================================================\n// DocContent Component (without Layout - for use with _layout.tsx)\n// =============================================================================\n\ntype DocContentProps = {\n children: ReactNode\n /** Edit link configuration (forwarded to Content) */\n editLink?: { pattern: string; text?: string }\n /** Last updated configuration (forwarded to Content) */\n lastUpdated?: { enabled?: boolean; text?: string; formatOptions?: Intl.DateTimeFormatOptions }\n /** TOC label (forwarded to TOC) */\n tocLabel?: string\n}\n\n/**\n * Documentation content without Layout wrapper.\n * Use this when you have a _layout.tsx that provides the Layout.\n *\n * @example\n * ```tsx\n * // In _layout.tsx:\n * <Layout>\n * <Header ... />\n * <Sidebar ... />\n * <Outlet />\n * <Footer ... />\n * </Layout>\n *\n * // In page routes:\n * <DocContent>\n * <MarkdownContent />\n * </DocContent>\n * ```\n */\nexport function ArdoDocContent({ children, editLink, lastUpdated, tocLabel }: DocContentProps) {\n const pageData = useArdoPageData()\n const hideToc = pageData?.frontmatter.outline === false\n\n return (\n <div className={styles.docPage}>\n <ArdoContent editLink={editLink} lastUpdated={lastUpdated}>\n {children}\n </ArdoContent>\n {!hideToc && <ArdoTOC label={tocLabel} />}\n </div>\n )\n}\n\n// =============================================================================\n// DocLayout Component (legacy alias)\n// =============================================================================\n\ntype DocLayoutProps = {\n content: ReactNode\n}\n\n/**\n * @deprecated Use DocPage or DocContent instead\n */\nexport function ArdoDocLayout({ content }: DocLayoutProps) {\n return <ArdoDocPage>{content}</ArdoDocPage>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEUA,MAAM,eACJ;;;;;;;;;;;;;;;;;AA0BF,SAAgB,eAAe,EAAE,UAAU,SAAS,QAA6B;CAE/E,MAAM,UAAU,IAAI,YAAY;CAGhC,OACE,qBAAC,QAAD;EAAM,MAHa,QAAQ,SAAS,OAAO,QAAQ;EAGzB,0BAAA;YAA1B,CACE,qBAAC,QAAD,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,SAAQ,SAAU,CAAA;GACxB,oBAAC,QAAD;IAAM,MAAK;IAAW,SAAQ;IAAwC,CAAA;GACtE,oBAAC,QAAD;IAAM,KAAI;IAAO,MAAK;IAAgB,MAAM,WAAW;IAAgB,CAAA;GACvE,oBAAC,MAAD,EAAQ,CAAA;GACR,oBAAC,OAAD,EAAS,CAAA;GACJ,EAAA,CAAA,EACP,qBAAC,QAAD;GAAM,0BAAA;aAAN;IACG;IACD,oBAAC,mBAAD,EAAqB,CAAA;IACrB,oBAAC,SAAD,EAA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UACE,qBAAC,OAAD;EAAK,WAAWC;YAAhB,CACE,oBAAC,aAAD;GAAuB;GAAuB;GAC3C;GACW,CAAA,EACb,CAAC,WAAW,oBAAC,SAAD,EAAS,OAAO,UAAY,CAAA,CACrC;KACK,CAAA;;;;;;;;;;;;;;;;;;;;;;AAsCjB,SAAgB,eAAe,EAAE,UAAU,UAAU,aAAa,YAA6B;CAE7F,MAAM,UADW,iBACO,EAAE,YAAY,YAAY;CAElD,OACE,qBAAC,OAAD;EAAK,WAAWA;YAAhB,CACE,oBAAC,aAAD;GAAuB;GAAuB;GAC3C;GACW,CAAA,EACb,CAAC,WAAW,oBAAC,SAAD,EAAS,OAAO,UAAY,CAAA,CACrC;;;;;;AAeV,SAAgB,cAAc,EAAE,WAA2B;CACzD,OAAO,oBAAC,aAAD,EAAA,UAAc,SAAsB,CAAA"}
|
package/dist/assets/src/ui/{TOC.css.ts.vanilla-435FKDcl.css → Toc.css.ts.vanilla-CYqcWgvD.css}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._16vvfx80 {
|
|
2
2
|
width: var(--ardo-layout-tocWidth);
|
|
3
3
|
flex-shrink: 0;
|
|
4
4
|
position: sticky;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
padding: var(--ardo-space-xl) 0;
|
|
9
9
|
overflow-y: auto;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
._16vvfx81 {
|
|
12
12
|
font-size: var(--ardo-fontSize-xs);
|
|
13
13
|
font-weight: 700;
|
|
14
14
|
text-transform: uppercase;
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
color: var(--ardo-color-textLight);
|
|
17
17
|
margin-bottom: var(--ardo-space-md);
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
._16vvfx82 {
|
|
20
20
|
list-style: none;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
._16vvfx83 {
|
|
23
23
|
display: block;
|
|
24
24
|
padding: var(--ardo-space-xs) 0 var(--ardo-space-xs) var(--ardo-space-md);
|
|
25
25
|
color: var(--ardo-color-textLighter);
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
border-left: 2px solid transparent;
|
|
31
31
|
transition: all var(--ardo-transition-fast);
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
._16vvfx83:hover {
|
|
34
34
|
color: var(--ardo-color-text);
|
|
35
35
|
border-left-color: var(--ardo-color-borderLight);
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
._16vvfx83.active {
|
|
38
38
|
color: var(--ardo-color-brand);
|
|
39
39
|
border-left-color: var(--ardo-color-brand);
|
|
40
40
|
font-weight: 500;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
._16vvfx84 {
|
|
43
43
|
padding-left: 1.75rem;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
._16vvfx85 {
|
|
46
46
|
padding-left: 2.5rem;
|
|
47
47
|
}
|
|
48
48
|
@media (max-width: 1280px) {
|
|
49
|
-
.
|
|
49
|
+
._16vvfx80 {
|
|
50
50
|
display: none;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/ui/brand-icons.tsx
|
|
3
|
+
function BrandIconSvg({ path, size = 24, title, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
width: size,
|
|
8
|
+
height: size,
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
role: title == null ? void 0 : "img",
|
|
11
|
+
"aria-hidden": title == null ? true : void 0,
|
|
12
|
+
...props,
|
|
13
|
+
children: [title == null ? null : /* @__PURE__ */ jsx("title", { children: title }), /* @__PURE__ */ jsx("path", { d: path })]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const GITHUB_PATH = "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12";
|
|
17
|
+
const LINKEDIN_PATH = "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z";
|
|
18
|
+
const NPM_PATH = "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z";
|
|
19
|
+
const TWITTER_PATH = "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z";
|
|
20
|
+
const YOUTUBE_PATH = "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z";
|
|
21
|
+
function GithubIcon(props) {
|
|
22
|
+
return /* @__PURE__ */ jsx(BrandIconSvg, {
|
|
23
|
+
path: GITHUB_PATH,
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function LinkedinIcon(props) {
|
|
28
|
+
return /* @__PURE__ */ jsx(BrandIconSvg, {
|
|
29
|
+
path: LINKEDIN_PATH,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function NpmIcon(props) {
|
|
34
|
+
return /* @__PURE__ */ jsx(BrandIconSvg, {
|
|
35
|
+
path: NPM_PATH,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function TwitterIcon(props) {
|
|
40
|
+
return /* @__PURE__ */ jsx(BrandIconSvg, {
|
|
41
|
+
path: TWITTER_PATH,
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function YoutubeIcon(props) {
|
|
46
|
+
return /* @__PURE__ */ jsx(BrandIconSvg, {
|
|
47
|
+
path: YOUTUBE_PATH,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const Github = GithubIcon;
|
|
52
|
+
const Linkedin = LinkedinIcon;
|
|
53
|
+
const Npm = NpmIcon;
|
|
54
|
+
const Twitter = TwitterIcon;
|
|
55
|
+
const Youtube = YoutubeIcon;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { Npm as a, TwitterIcon as c, LinkedinIcon as i, Youtube as l, GithubIcon as n, NpmIcon as o, Linkedin as r, Twitter as s, Github as t, YoutubeIcon as u };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=brand-icons-DLJKqTun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-icons-DLJKqTun.js","names":[],"sources":["../src/ui/brand-icons.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nexport type BrandIconProps = {\n size?: number | string\n title?: string\n} & Omit<ComponentProps<\"svg\">, \"children\">\n\ntype BrandIconSvgProps = {\n path: string\n} & BrandIconProps\n\nfunction BrandIconSvg({ path, size = 24, title, ...props }: BrandIconSvgProps) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n fill=\"currentColor\"\n role={title == null ? undefined : \"img\"}\n aria-hidden={title == null ? true : undefined}\n {...props}\n >\n {title == null ? null : <title>{title}</title>}\n <path d={path} />\n </svg>\n )\n}\n\n// Vendored from Simple Icons. GitHub, X, YouTube, and npm use v16.17.0.\n// LinkedIn uses v12.4.0; it was removed from Simple Icons in later releases.\nconst GITHUB_PATH =\n \"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\nconst LINKEDIN_PATH =\n \"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\"\nconst NPM_PATH =\n \"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z\"\nconst TWITTER_PATH =\n \"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z\"\nconst YOUTUBE_PATH =\n \"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z\"\n\nexport function GithubIcon(props: BrandIconProps) {\n return <BrandIconSvg path={GITHUB_PATH} {...props} />\n}\n\nexport function LinkedinIcon(props: BrandIconProps) {\n return <BrandIconSvg path={LINKEDIN_PATH} {...props} />\n}\n\nexport function NpmIcon(props: BrandIconProps) {\n return <BrandIconSvg path={NPM_PATH} {...props} />\n}\n\nexport function TwitterIcon(props: BrandIconProps) {\n return <BrandIconSvg path={TWITTER_PATH} {...props} />\n}\n\nexport function YoutubeIcon(props: BrandIconProps) {\n return <BrandIconSvg path={YOUTUBE_PATH} {...props} />\n}\n\nexport const Github = GithubIcon\nexport const Linkedin = LinkedinIcon\nexport const Npm = NpmIcon\nexport const Twitter = TwitterIcon\nexport const Youtube = YoutubeIcon\n"],"mappings":";;AAWA,SAAS,aAAa,EAAE,MAAM,OAAO,IAAI,OAAO,GAAG,SAA4B;CAC7E,OACE,qBAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,OAAO;EACP,QAAQ;EACR,MAAK;EACL,MAAM,SAAS,OAAO,KAAA,IAAY;EAClC,eAAa,SAAS,OAAO,OAAO,KAAA;EACpC,GAAI;YARN,CAUG,SAAS,OAAO,OAAO,oBAAC,SAAD,EAAA,UAAQ,OAAc,CAAA,EAC9C,oBAAC,QAAD,EAAM,GAAG,MAAQ,CAAA,CACb;;;AAMV,MAAM,cACJ;AACF,MAAM,gBACJ;AACF,MAAM,WACJ;AACF,MAAM,eACJ;AACF,MAAM,eACJ;AAEF,SAAgB,WAAW,OAAuB;CAChD,OAAO,oBAAC,cAAD;EAAc,MAAM;EAAa,GAAI;EAAS,CAAA;;AAGvD,SAAgB,aAAa,OAAuB;CAClD,OAAO,oBAAC,cAAD;EAAc,MAAM;EAAe,GAAI;EAAS,CAAA;;AAGzD,SAAgB,QAAQ,OAAuB;CAC7C,OAAO,oBAAC,cAAD;EAAc,MAAM;EAAU,GAAI;EAAS,CAAA;;AAGpD,SAAgB,YAAY,OAAuB;CACjD,OAAO,oBAAC,cAAD;EAAc,MAAM;EAAc,GAAI;EAAS,CAAA;;AAGxD,SAAgB,YAAY,OAAuB;CACjD,OAAO,oBAAC,cAAD;EAAc,MAAM;EAAc,GAAI;EAAS,CAAA;;AAGxD,MAAa,SAAS;AACtB,MAAa,WAAW;AACxB,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as PageData, c as ResolvedConfig, d as SponsorConfig, f as TOCItem, i as NavItem, l as SidebarItem, n as HeadConfig, o as PageFrontmatter, p as TypeDocConfig, r as MarkdownConfig, s as ProjectMeta, t as ArdoConfig, u as SocialLink } from "../types-
|
|
1
|
+
import { a as PageData, c as ResolvedConfig, d as SponsorConfig, f as TOCItem, i as NavItem, l as SidebarItem, n as HeadConfig, o as PageFrontmatter, p as TypeDocConfig, r as MarkdownConfig, s as ProjectMeta, t as ArdoConfig, u as SocialLink } from "../types-CTd_mkrv.js";
|
|
2
2
|
|
|
3
3
|
//#region src/config/index.d.ts
|
|
4
4
|
declare function defineConfig(config: ArdoConfig): ArdoConfig;
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/config/index.ts"],"sourcesContent":["import path from \"node:path\"\n\nimport type {\n ArdoConfig,\n HeadConfig,\n MarkdownConfig,\n NavItem,\n PageData,\n PageFrontmatter,\n ProjectMeta,\n ResolvedConfig,\n SidebarItem,\n SocialLink,\n SponsorConfig,\n TOCItem,\n TypeDocConfig,\n} from \"./types\"\n\nexport type {\n ArdoConfig,\n HeadConfig,\n MarkdownConfig,\n NavItem,\n PageData,\n PageFrontmatter,\n ProjectMeta,\n ResolvedConfig,\n SidebarItem,\n SocialLink,\n SponsorConfig,\n TOCItem,\n TypeDocConfig,\n}\n\nexport function defineConfig(config: ArdoConfig): ArdoConfig {\n return config\n}\n\nexport const defaultMarkdownConfig: MarkdownConfig = {\n theme: {\n light: \"github-light-default\",\n dark: \"github-dark-default\",\n },\n lineNumbers: false,\n anchor: true,\n toc: {\n level: [2, 3],\n },\n}\n\nexport function resolveConfig(config: ArdoConfig, root: string): ResolvedConfig {\n const srcDir = config.srcDir ?? \"content\"\n const contentDir = path.resolve(root, srcDir)\n\n return {\n title: config.title,\n description: config.description ?? \"\",\n titleSeparator: config.titleSeparator ?? \" | \",\n base: config.base ?? \"/\",\n srcDir,\n outDir: config.outDir ?? \"dist\",\n lang: config.lang ?? \"en\",\n head: config.head ?? [],\n markdown: {\n ...defaultMarkdownConfig,\n ...config.markdown,\n },\n vite: config.vite,\n project: config.project ?? {},\n root,\n contentDir,\n }\n}\n\nexport async function loadConfig(root: string): Promise<ResolvedConfig> {\n const configPath = path.resolve(root, \"press.config.ts\")\n\n try {\n const configModule: unknown = await import(configPath)\n const config =\n typeof configModule === \"object\" && configModule !== null && \"default\" in configModule\n ? configModule.default\n : undefined\n\n if (isArdoConfig(config)) {\n return resolveConfig(config, root)\n }\n } catch {\n // Fall through to default config\n }\n\n return resolveConfig(\n {\n title: \"Ardo\",\n description: \"Documentation powered by Ardo\",\n },\n root\n )\n}\n\nfunction isArdoConfig(value: unknown): value is ArdoConfig {\n if (typeof value !== \"object\" || value === null) {\n return false\n }\n\n return \"title\" in value && typeof value.title === \"string\"\n}\n"],"mappings":";;AAkCA,SAAgB,aAAa,QAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/config/index.ts"],"sourcesContent":["import path from \"node:path\"\n\nimport type {\n ArdoConfig,\n HeadConfig,\n MarkdownConfig,\n NavItem,\n PageData,\n PageFrontmatter,\n ProjectMeta,\n ResolvedConfig,\n SidebarItem,\n SocialLink,\n SponsorConfig,\n TOCItem,\n TypeDocConfig,\n} from \"./types\"\n\nexport type {\n ArdoConfig,\n HeadConfig,\n MarkdownConfig,\n NavItem,\n PageData,\n PageFrontmatter,\n ProjectMeta,\n ResolvedConfig,\n SidebarItem,\n SocialLink,\n SponsorConfig,\n TOCItem,\n TypeDocConfig,\n}\n\nexport function defineConfig(config: ArdoConfig): ArdoConfig {\n return config\n}\n\nexport const defaultMarkdownConfig: MarkdownConfig = {\n theme: {\n light: \"github-light-default\",\n dark: \"github-dark-default\",\n },\n lineNumbers: false,\n anchor: true,\n toc: {\n level: [2, 3],\n },\n}\n\nexport function resolveConfig(config: ArdoConfig, root: string): ResolvedConfig {\n const srcDir = config.srcDir ?? \"content\"\n const contentDir = path.resolve(root, srcDir)\n\n return {\n title: config.title,\n description: config.description ?? \"\",\n titleSeparator: config.titleSeparator ?? \" | \",\n base: config.base ?? \"/\",\n srcDir,\n outDir: config.outDir ?? \"dist\",\n lang: config.lang ?? \"en\",\n head: config.head ?? [],\n markdown: {\n ...defaultMarkdownConfig,\n ...config.markdown,\n },\n vite: config.vite,\n project: config.project ?? {},\n root,\n contentDir,\n }\n}\n\nexport async function loadConfig(root: string): Promise<ResolvedConfig> {\n const configPath = path.resolve(root, \"press.config.ts\")\n\n try {\n const configModule: unknown = await import(configPath)\n const config =\n typeof configModule === \"object\" && configModule !== null && \"default\" in configModule\n ? configModule.default\n : undefined\n\n if (isArdoConfig(config)) {\n return resolveConfig(config, root)\n }\n } catch {\n // Fall through to default config\n }\n\n return resolveConfig(\n {\n title: \"Ardo\",\n description: \"Documentation powered by Ardo\",\n },\n root\n )\n}\n\nfunction isArdoConfig(value: unknown): value is ArdoConfig {\n if (typeof value !== \"object\" || value === null) {\n return false\n }\n\n return \"title\" in value && typeof value.title === \"string\"\n}\n"],"mappings":";;AAkCA,SAAgB,aAAa,QAAgC;CAC3D,OAAO;;AAGT,MAAa,wBAAwC;CACnD,OAAO;EACL,OAAO;EACP,MAAM;EACP;CACD,aAAa;CACb,QAAQ;CACR,KAAK,EACH,OAAO,CAAC,GAAG,EAAE,EACd;CACF;AAED,SAAgB,cAAc,QAAoB,MAA8B;CAC9E,MAAM,SAAS,OAAO,UAAU;CAChC,MAAM,aAAa,KAAK,QAAQ,MAAM,OAAO;CAE7C,OAAO;EACL,OAAO,OAAO;EACd,aAAa,OAAO,eAAe;EACnC,gBAAgB,OAAO,kBAAkB;EACzC,MAAM,OAAO,QAAQ;EACrB;EACA,QAAQ,OAAO,UAAU;EACzB,MAAM,OAAO,QAAQ;EACrB,MAAM,OAAO,QAAQ,EAAE;EACvB,UAAU;GACR,GAAG;GACH,GAAG,OAAO;GACX;EACD,MAAM,OAAO;EACb,SAAS,OAAO,WAAW,EAAE;EAC7B;EACA;EACD;;AAGH,eAAsB,WAAW,MAAuC;CACtE,MAAM,aAAa,KAAK,QAAQ,MAAM,kBAAkB;CAExD,IAAI;EACF,MAAM,eAAwB,MAAM,OAAO;EAC3C,MAAM,SACJ,OAAO,iBAAiB,YAAY,iBAAiB,QAAQ,aAAa,eACtE,aAAa,UACb,KAAA;EAEN,IAAI,aAAa,OAAO,EACtB,OAAO,cAAc,QAAQ,KAAK;SAE9B;CAIR,OAAO,cACL;EACE,OAAO;EACP,aAAa;EACd,EACD,KACD;;AAGH,SAAS,aAAa,OAAqC;CACzD,IAAI,OAAO,UAAU,YAAY,UAAU,MACzC,OAAO;CAGT,OAAO,WAAW,SAAS,OAAO,MAAM,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.css-DYvFVCFE.d.ts","names":[],"sources":["../src/ui/theme/contract.css.ts"],"mappings":";cAIa,IAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import { readPackageUp } from "read-package-up";
|
|
4
|
-
import { Application, ReflectionKind, TSConfigReader, TypeDocReader } from "typedoc";
|
|
4
|
+
import { Application, DeclarationReflection, ReflectionKind, TSConfigReader, TypeDocReader } from "typedoc";
|
|
5
5
|
//#region src/typedoc/generator-config.ts
|
|
6
6
|
function resolveTypeDocConfig(config) {
|
|
7
7
|
const sidebar = resolveSidebarConfig(config.sidebar);
|
|
@@ -161,14 +161,13 @@ function getKindGroupName(kind, name) {
|
|
|
161
161
|
if (isReactComponent(name)) return "React Components";
|
|
162
162
|
return "Functions";
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
164
|
+
return {
|
|
165
|
+
[ReflectionKind.Class]: "Classes",
|
|
166
|
+
[ReflectionKind.Enum]: "Enums",
|
|
167
|
+
[ReflectionKind.Interface]: "Interfaces",
|
|
168
|
+
[ReflectionKind.TypeAlias]: "Types",
|
|
169
|
+
[ReflectionKind.Variable]: "Variables"
|
|
170
|
+
}[kind] ?? "Other";
|
|
172
171
|
}
|
|
173
172
|
function isReactComponent(name) {
|
|
174
173
|
const first = name.slice(0, 1);
|
|
@@ -328,11 +327,10 @@ function renderModuleIndex(params) {
|
|
|
328
327
|
//#endregion
|
|
329
328
|
//#region src/typedoc/generator-render-component.ts
|
|
330
329
|
function getTypeName(paramType) {
|
|
331
|
-
if (paramType
|
|
332
|
-
|
|
333
|
-
if (
|
|
334
|
-
if (
|
|
335
|
-
if (typeof typeRecord.qualifiedName === "string" && typeRecord.qualifiedName.length > 0) return typeRecord.qualifiedName;
|
|
330
|
+
if (!isRecord(paramType)) return null;
|
|
331
|
+
if (typeof paramType.name === "string" && paramType.name.length > 0) return paramType.name;
|
|
332
|
+
if (paramType.type !== "reference") return null;
|
|
333
|
+
if (typeof paramType.qualifiedName === "string" && paramType.qualifiedName.length > 0) return paramType.qualifiedName;
|
|
336
334
|
return null;
|
|
337
335
|
}
|
|
338
336
|
function getPropsFromType(context, paramType) {
|
|
@@ -345,18 +343,21 @@ function getPropsFromType(context, paramType) {
|
|
|
345
343
|
return extractPropsFromChildren(reflection.children ?? []);
|
|
346
344
|
}
|
|
347
345
|
function getInlineDeclarationProps(paramType) {
|
|
348
|
-
if (paramType
|
|
346
|
+
if (!isRecord(paramType)) return [];
|
|
349
347
|
const declaration = paramType.declaration;
|
|
350
348
|
if (declaration == null) return [];
|
|
351
|
-
return extractPropsFromChildren(declaration.children ?? []);
|
|
349
|
+
return declaration instanceof DeclarationReflection ? extractPropsFromChildren(declaration.children ?? []) : [];
|
|
352
350
|
}
|
|
353
351
|
function findReflectionByName(context, typeName) {
|
|
354
352
|
const direct = context.project.getChildByName(typeName);
|
|
355
|
-
if (direct
|
|
353
|
+
if (direct instanceof DeclarationReflection) return direct;
|
|
356
354
|
const children = context.project.children ?? [];
|
|
357
355
|
for (const child of children) if (child.name === typeName) return child;
|
|
358
356
|
return null;
|
|
359
357
|
}
|
|
358
|
+
function isRecord(value) {
|
|
359
|
+
return value != null && typeof value === "object";
|
|
360
|
+
}
|
|
360
361
|
function extractPropsFromChildren(children) {
|
|
361
362
|
return children.map((child) => ({
|
|
362
363
|
description: child.comment?.summary == null ? "" : renderCommentShort(child.comment.summary),
|
|
@@ -1190,4 +1191,4 @@ async function generateApiDocs(config, outputDir) {
|
|
|
1190
1191
|
//#endregion
|
|
1191
1192
|
export { generateApiDocs as n, TypeDocGenerator as t };
|
|
1192
1193
|
|
|
1193
|
-
//# sourceMappingURL=generator-
|
|
1194
|
+
//# sourceMappingURL=generator-DPtRXxM_.js.map
|