@orangecheck/app-design 1.0.0 → 1.1.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.
Files changed (62) hide show
  1. package/README.md +21 -5
  2. package/dist/chrome.d.mts +31 -42
  3. package/dist/chrome.d.ts +31 -42
  4. package/dist/chrome.js +500 -23
  5. package/dist/chrome.js.map +1 -1
  6. package/dist/chrome.mjs +495 -25
  7. package/dist/chrome.mjs.map +1 -1
  8. package/dist/code.d.mts +52 -0
  9. package/dist/code.d.ts +52 -0
  10. package/dist/code.js +534 -0
  11. package/dist/code.js.map +1 -0
  12. package/dist/code.mjs +522 -0
  13. package/dist/code.mjs.map +1 -0
  14. package/dist/components.d.mts +61 -117
  15. package/dist/components.d.ts +61 -117
  16. package/dist/components.js +2170 -105
  17. package/dist/components.js.map +1 -1
  18. package/dist/components.mjs +2142 -109
  19. package/dist/components.mjs.map +1 -1
  20. package/dist/docs-DhnstueM.d.ts +219 -0
  21. package/dist/docs-DiR6s43s.d.mts +219 -0
  22. package/dist/format.d.mts +12 -0
  23. package/dist/format.d.ts +12 -0
  24. package/dist/format.js +65 -0
  25. package/dist/format.js.map +1 -0
  26. package/dist/format.mjs +58 -0
  27. package/dist/format.mjs.map +1 -0
  28. package/dist/hero-Dn37il-9.d.mts +31 -0
  29. package/dist/hero-Dn37il-9.d.ts +31 -0
  30. package/dist/index.d.mts +10 -3
  31. package/dist/index.d.ts +10 -3
  32. package/dist/index.js +2668 -131
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +2614 -134
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/mdx.d.mts +58 -0
  37. package/dist/mdx.d.ts +58 -0
  38. package/dist/mdx.js +1712 -0
  39. package/dist/mdx.js.map +1 -0
  40. package/dist/mdx.mjs +1685 -0
  41. package/dist/mdx.mjs.map +1 -0
  42. package/dist/primitives.d.mts +22 -5
  43. package/dist/primitives.d.ts +22 -5
  44. package/dist/primitives.js +51 -5
  45. package/dist/primitives.js.map +1 -1
  46. package/dist/primitives.mjs +51 -7
  47. package/dist/primitives.mjs.map +1 -1
  48. package/dist/session.d.mts +18 -0
  49. package/dist/session.d.ts +18 -0
  50. package/dist/session.js +432 -0
  51. package/dist/session.js.map +1 -0
  52. package/dist/session.mjs +401 -0
  53. package/dist/session.mjs.map +1 -0
  54. package/dist/styles/code.css +97 -0
  55. package/dist/styles/theme.css +2 -0
  56. package/dist/styles/tokens.css +40 -0
  57. package/dist/styles.css +1 -0
  58. package/dist/tool-shell-B1C7ahKE.d.ts +81 -0
  59. package/dist/tool-shell-BDx_N5ai.d.mts +81 -0
  60. package/dist/tools-BggNN5DV.d.ts +131 -0
  61. package/dist/tools-DFIxIj5p.d.mts +131 -0
  62. package/package.json +31 -2
package/dist/chrome.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var lucideReact = require('lucide-react');
4
- var Link3 = require('next/link');
4
+ var Link5 = require('next/link');
5
5
  var react = require('react');
6
6
  var clsx = require('clsx');
7
7
  var tailwindMerge = require('tailwind-merge');
@@ -11,6 +11,9 @@ var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
11
11
  var PopoverPrimitive = require('@radix-ui/react-popover');
12
12
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
13
13
  var classVarianceAuthority = require('class-variance-authority');
14
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
15
+ require('sonner');
16
+ var reactSlot = require('@radix-ui/react-slot');
14
17
  var nextThemes = require('next-themes');
15
18
 
16
19
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -33,11 +36,12 @@ function _interopNamespace(e) {
33
36
  return Object.freeze(n);
34
37
  }
35
38
 
36
- var Link3__default = /*#__PURE__*/_interopDefault(Link3);
39
+ var Link5__default = /*#__PURE__*/_interopDefault(Link5);
37
40
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
38
41
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
39
42
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
40
43
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
44
+ var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
41
45
 
42
46
  var merge = tailwindMerge.extendTailwindMerge({
43
47
  extend: {
@@ -241,7 +245,10 @@ var FAMILY_GROUPS = [
241
245
  { id: "app", label: "Apps" },
242
246
  { id: "public-good", label: "Public goods" }
243
247
  ];
244
- new Map(FAMILY.map((s) => [s.slug, s]));
248
+ var BY_SLUG = new Map(FAMILY.map((s) => [s.slug, s]));
249
+ function protocolSite(slug) {
250
+ return BY_SLUG.get(slug);
251
+ }
245
252
  function familyByGroup() {
246
253
  return FAMILY_GROUPS.map((g) => ({ ...g, sites: FAMILY.filter((s) => s.group === g.id) }));
247
254
  }
@@ -252,7 +259,7 @@ var LEGAL_LINKS = [
252
259
  { href: `${OCHK_IO}/trademark`, label: "Trademarks" },
253
260
  { href: `${OCHK_IO}/contact`, label: "Contact" }
254
261
  ];
255
- [
262
+ var OCHK_IO_NAV = [
256
263
  {
257
264
  href: `${OCHK_IO}/protocols`,
258
265
  label: "Protocols",
@@ -263,6 +270,16 @@ var LEGAL_LINKS = [
263
270
  { href: `${OCHK_IO}/trust`, label: "Trust" },
264
271
  { href: `${OCHK_IO}/about`, label: "About" }
265
272
  ];
273
+ var OCHK_IO_FOOTER = [
274
+ {
275
+ heading: "Company",
276
+ links: [
277
+ { href: `${OCHK_IO}/about`, label: "About" },
278
+ { href: `${OCHK_IO}/trust`, label: "Trust" },
279
+ { href: "https://github.com/orangecheck", label: "GitHub", external: true }
280
+ ]
281
+ }
282
+ ];
266
283
  var overlayClass = "oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0";
267
284
  react.forwardRef(function DialogContent2({ className, children, hideClose, ...props }, ref) {
268
285
  return /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
@@ -543,16 +560,23 @@ function FamilyMenu({ current, className }) {
543
560
  )
544
561
  ] });
545
562
  }
546
- function NavLink({ item, className, onNavigate }) {
563
+ function NavLink({
564
+ item,
565
+ className,
566
+ onNavigate,
567
+ line = false
568
+ }) {
547
569
  const cls = cn(
548
570
  "rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
549
571
  item.active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
572
+ line && "relative after:absolute after:inset-x-3 after:-bottom-[0.625rem] after:h-0.5 after:rounded-full",
573
+ line && item.active && "after:bg-foreground",
550
574
  className
551
575
  );
552
576
  if (item.external) {
553
577
  return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: item.label });
554
578
  }
555
- return /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
579
+ return /* @__PURE__ */ jsxRuntime.jsx(Link5__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
556
580
  }
557
581
  function NavRow({ item, onNavigate }) {
558
582
  const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -563,7 +587,7 @@ function NavRow({ item, onNavigate }) {
563
587
  "flex flex-col gap-0.5 rounded-xl px-3 py-2 transition-colors hover:bg-accent",
564
588
  item.active && "bg-muted hover:bg-muted dark:bg-white/[0.06]"
565
589
  );
566
- return item.external ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: body }) : /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: body });
590
+ return item.external ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: body }) : /* @__PURE__ */ jsxRuntime.jsx(Link5__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: body });
567
591
  }
568
592
  var seeAll = (item) => typeof item.label === "string" ? `All ${item.label.toLowerCase()}` : "See all";
569
593
  function NavDropdown({ item }) {
@@ -605,13 +629,16 @@ function SiteHeader({
605
629
  search,
606
630
  actions,
607
631
  variant = "site",
632
+ navOnPhone = true,
633
+ menu: menuExtra,
608
634
  className
609
635
  }) {
610
636
  const [open, setOpen] = react.useState(false);
611
637
  const tool = variant === "tool";
612
638
  const size = tool ? 24 : 28;
613
639
  const current = typeof family === "string" ? family : void 0;
614
- const menu = nav.length > 0 || Boolean(family);
640
+ const phoneNav = navOnPhone ? nav : [];
641
+ const menu = phoneNav.length > 0 || Boolean(family) || Boolean(menuExtra);
615
642
  const brandNode = brand ?? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center", children: [
616
643
  /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size }),
617
644
  product ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -619,7 +646,9 @@ function SiteHeader({
619
646
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium tracking-[-0.01em]", style: { fontSize: size * 0.56 }, children: product })
620
647
  ] }) : null
621
648
  ] });
622
- const navigation = nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map((n) => n.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(NavDropdown, { item: n }, n.href) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { item: n }, n.href)) }) : null;
649
+ const navigation = nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map(
650
+ (n) => n.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(NavDropdown, { item: n }, n.href) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { item: n, line: tool }, n.href)
651
+ ) }) : null;
623
652
  return /* @__PURE__ */ jsxRuntime.jsx(
624
653
  "header",
625
654
  {
@@ -641,7 +670,7 @@ function SiteHeader({
641
670
  ),
642
671
  children: [
643
672
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex min-w-0 items-center gap-1", tool ? "md:gap-1" : "justify-self-start"), children: [
644
- /* @__PURE__ */ jsxRuntime.jsxs(Link3__default.default, { href: home, className: "-ml-1 min-w-0 rounded-lg p-1", children: [
673
+ /* @__PURE__ */ jsxRuntime.jsxs(Link5__default.default, { href: home, className: "-ml-1 min-w-0 rounded-lg p-1", children: [
645
674
  brandNode,
646
675
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " home" })
647
676
  ] }),
@@ -663,7 +692,8 @@ function SiteHeader({
663
692
  ),
664
693
  /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "pt-16", children: [
665
694
  /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Menu" }),
666
- nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: nav.map(
695
+ menuExtra ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col", (phoneNav.length > 0 || family) && "border-b border-border pb-3"), children: menuExtra }) : null,
696
+ phoneNav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: phoneNav.map(
667
697
  (n) => n.children?.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col py-2", children: [
668
698
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1 text-[0.8125rem] text-muted-foreground", children: n.label }),
669
699
  n.children.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -685,7 +715,7 @@ function SiteHeader({
685
715
  n.href
686
716
  )
687
717
  ) }) : null,
688
- family ? /* @__PURE__ */ jsxRuntime.jsxs("details", { className: cn("group", nav.length > 0 && "mt-2 border-t border-border pt-4"), children: [
718
+ family ? /* @__PURE__ */ jsxRuntime.jsxs("details", { className: cn("group", phoneNav.length > 0 && "mt-2 border-t border-border pt-4"), children: [
689
719
  /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2.5 text-[1.0625rem] [&::-webkit-details-marker]:hidden", children: [
690
720
  "All orangecheck sites",
691
721
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": true, className: "size-4 text-muted-foreground transition-transform group-open:rotate-180" })
@@ -916,12 +946,12 @@ function SignInFrame({
916
946
  children: [
917
947
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col px-4 pb-8 pt-5 sm:px-8 lg:px-14 lg:pt-8", children: [
918
948
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between gap-4", children: [
919
- /* @__PURE__ */ jsxRuntime.jsxs(Link3__default.default, { href: home, className: "w-fit rounded-lg", children: [
949
+ /* @__PURE__ */ jsxRuntime.jsxs(Link5__default.default, { href: home, className: "w-fit rounded-lg", children: [
920
950
  brand ?? /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 28 }),
921
951
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " home" })
922
952
  ] }),
923
953
  back === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
924
- Link3__default.default,
954
+ Link5__default.default,
925
955
  {
926
956
  href: home,
927
957
  className: "text-[0.9375rem] text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",
@@ -954,15 +984,335 @@ function SignInFrame({
954
984
  }
955
985
  );
956
986
  }
957
- var ShellContext = react.createContext({});
987
+ function Spinner({ className, label }) {
988
+ return /* @__PURE__ */ jsxRuntime.jsxs(
989
+ "svg",
990
+ {
991
+ viewBox: "0 0 24 24",
992
+ fill: "none",
993
+ role: label ? "status" : void 0,
994
+ "aria-label": label,
995
+ "aria-hidden": label ? void 0 : true,
996
+ className: cn("size-4 animate-spin", className),
997
+ children: [
998
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "2.5" }),
999
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
1000
+ ]
1001
+ }
1002
+ );
1003
+ }
1004
+ react.forwardRef(function Separator3({ className, orientation = "horizontal", decorative = true, ...props }, ref) {
1005
+ return /* @__PURE__ */ jsxRuntime.jsx(
1006
+ SeparatorPrimitive__namespace.Root,
1007
+ {
1008
+ ref,
1009
+ decorative,
1010
+ orientation,
1011
+ className: cn(
1012
+ "shrink-0 bg-border",
1013
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
1014
+ className
1015
+ ),
1016
+ ...props
1017
+ }
1018
+ );
1019
+ });
1020
+ function sharedContext(name, initial) {
1021
+ const key = /* @__PURE__ */ Symbol.for(`@orangecheck/app-design/${name}`);
1022
+ const store = globalThis;
1023
+ return store[key] ?? (store[key] = react.createContext(initial));
1024
+ }
1025
+
1026
+ // src/lib/density.ts
1027
+ var DensityContext = sharedContext("density", "comfortable");
1028
+ function DensityProvider({ density, children }) {
1029
+ return react.createElement(DensityContext.Provider, { value: density }, children);
1030
+ }
1031
+ var ShellContext = sharedContext("shell-place", {});
958
1032
  function useShellPlace() {
959
1033
  return react.useContext(ShellContext);
960
1034
  }
1035
+ var buttonVariants = classVarianceAuthority.cva(
1036
+ [
1037
+ "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium",
1038
+ "transition-[background-color,border-color,color,box-shadow,transform] duration-150",
1039
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1040
+ "active:translate-y-px disabled:pointer-events-none",
1041
+ // Disabled is one look for every variant: a quiet grey pill, never a
1042
+ // faded black or orange slab that reads as broken.
1043
+ "disabled:border disabled:border-border disabled:bg-muted disabled:text-oca-subtle disabled:shadow-none",
1044
+ "[&_svg]:pointer-events-none [&_svg]:size-[1.1em] [&_svg]:shrink-0"
1045
+ ],
1046
+ {
1047
+ variants: {
1048
+ variant: {
1049
+ primary: "bg-primary text-primary-foreground hover:bg-primary/85",
1050
+ secondary: "border border-border bg-secondary text-secondary-foreground hover:border-oca-hairline-strong hover:bg-accent",
1051
+ brand: "bg-brand text-brand-foreground hover:bg-oca-orange-deep",
1052
+ ghost: "text-foreground hover:bg-accent",
1053
+ danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1054
+ link: "h-auto rounded-none px-0 text-foreground underline decoration-foreground/35 underline-offset-4 hover:decoration-foreground",
1055
+ onInk: "bg-white text-oca-ink hover:bg-white/90",
1056
+ onInkOutline: "border border-white/20 text-white hover:bg-white/10"
1057
+ },
1058
+ size: {
1059
+ sm: "h-9 px-4 text-sm",
1060
+ md: "h-11 px-5 text-[0.9375rem]",
1061
+ lg: "h-14 px-7 text-[1.0625rem]",
1062
+ icon: "size-10",
1063
+ "icon-sm": "size-8"
1064
+ }
1065
+ },
1066
+ compoundVariants: [{ variant: "link", className: "h-auto px-0" }],
1067
+ defaultVariants: { variant: "primary", size: "md" }
1068
+ }
1069
+ );
1070
+ var Button = react.forwardRef(function Button2({ className, variant, size, asChild = false, loading = false, disabled, children, type, ...props }, ref) {
1071
+ const Comp = asChild ? reactSlot.Slot : "button";
1072
+ return /* @__PURE__ */ jsxRuntime.jsx(
1073
+ Comp,
1074
+ {
1075
+ ref,
1076
+ "data-ui": "button",
1077
+ className: cn(buttonVariants({ variant, size }), className),
1078
+ disabled: asChild ? void 0 : disabled || loading,
1079
+ "aria-busy": loading || void 0,
1080
+ type: asChild ? void 0 : type ?? "button",
1081
+ ...props,
1082
+ children: asChild ? children : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1083
+ loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "size-[1.1em]" }) : null,
1084
+ children
1085
+ ] })
1086
+ }
1087
+ );
1088
+ });
1089
+ function useActiveHeading(ids) {
1090
+ const [active, setActive] = react.useState(ids[0]);
1091
+ const key = ids.join("|");
1092
+ react.useEffect(() => {
1093
+ setActive(key.split("|")[0] || void 0);
1094
+ const els = key.split("|").map((id) => document.getElementById(id)).filter((el) => el !== null);
1095
+ if (els.length === 0 || typeof IntersectionObserver === "undefined") return;
1096
+ const io = new IntersectionObserver(
1097
+ (entries) => {
1098
+ const hit = entries.filter((e) => e.isIntersecting).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top)[0];
1099
+ if (hit) setActive(hit.target.id);
1100
+ },
1101
+ { rootMargin: "-80px 0px -65% 0px" }
1102
+ );
1103
+ els.forEach((el) => io.observe(el));
1104
+ return () => io.disconnect();
1105
+ }, [key]);
1106
+ return active;
1107
+ }
1108
+ function useHeadings(selector = "#docs-content", key) {
1109
+ const [items, setItems] = react.useState([]);
1110
+ react.useEffect(() => {
1111
+ const read = () => {
1112
+ const root = document.querySelector(selector);
1113
+ if (!root) return setItems([]);
1114
+ setItems(
1115
+ Array.from(root.querySelectorAll("h2[id], h3[id]")).map((h) => ({
1116
+ id: h.id,
1117
+ // The anchor link's "#" is not part of the name.
1118
+ label: (h.querySelector("[data-heading-text]") ?? h).textContent?.trim() ?? "",
1119
+ level: h.tagName === "H3" ? 3 : 2
1120
+ }))
1121
+ );
1122
+ };
1123
+ const raf = requestAnimationFrame(read);
1124
+ const t = setTimeout(read, 80);
1125
+ return () => {
1126
+ cancelAnimationFrame(raf);
1127
+ clearTimeout(t);
1128
+ };
1129
+ }, [selector, key]);
1130
+ const activeId = useActiveHeading(items.map((i) => i.id));
1131
+ return { items, activeId };
1132
+ }
1133
+ function OnThisPage({
1134
+ items,
1135
+ activeId,
1136
+ title = "On this page",
1137
+ onNavigate,
1138
+ className
1139
+ }) {
1140
+ const id = react.useId();
1141
+ if (items.length === 0) return null;
1142
+ return (
1143
+ // With no visible title (a folded list under its own summary) the name is still "On this page".
1144
+ /* @__PURE__ */ jsxRuntime.jsxs("nav", { "aria-labelledby": title ? id : void 0, "aria-label": title ? void 0 : "On this page", className, children: [
1145
+ title ? /* @__PURE__ */ jsxRuntime.jsx("p", { id, className: "mb-3 text-[0.875rem] font-medium", children: title }) : null,
1146
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { children: items.map((t) => {
1147
+ const on = t.id === activeId;
1148
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
1149
+ "a",
1150
+ {
1151
+ href: `#${t.id}`,
1152
+ onClick: onNavigate,
1153
+ "aria-current": on ? "location" : void 0,
1154
+ className: cn(
1155
+ "block border-l py-1.5 text-[0.875rem] leading-snug transition-colors",
1156
+ t.level === 3 ? "pl-7" : "pl-4",
1157
+ on ? "border-foreground text-foreground" : "border-border text-muted-foreground hover:text-foreground"
1158
+ ),
1159
+ children: t.label
1160
+ }
1161
+ ) }, t.id);
1162
+ }) })
1163
+ ] })
1164
+ );
1165
+ }
1166
+ var STATUS_WORDS = /* @__PURE__ */ new Set(["live", "testing", "not-yet", "paused", "good", "caution", "refused"]);
1167
+ var pathOf = (href) => href.split(/[?#]/)[0].replace(/(.)\/$/, "$1");
1168
+ function DocsNav({
1169
+ sections,
1170
+ current,
1171
+ onNavigate,
1172
+ className
1173
+ }) {
1174
+ const here = pathOf(current);
1175
+ const activeSection = react.useMemo(
1176
+ () => sections.findIndex((s) => s.items.some((i) => pathOf(i.href) === here)),
1177
+ [sections, here]
1178
+ );
1179
+ const [peeked, setPeeked] = react.useState(() => /* @__PURE__ */ new Set());
1180
+ react.useEffect(() => setPeeked(/* @__PURE__ */ new Set()), [activeSection]);
1181
+ const activeRef = react.useRef(null);
1182
+ react.useEffect(() => {
1183
+ const id = requestAnimationFrame(() => activeRef.current?.scrollIntoView({ block: "nearest" }));
1184
+ return () => cancelAnimationFrame(id);
1185
+ }, [here]);
1186
+ const base = react.useId();
1187
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Docs", className: cn("flex flex-col gap-0.5", className), children: sections.map((section, si) => {
1188
+ const isActive = si === activeSection;
1189
+ const open = isActive || peeked.has(si);
1190
+ const panel = `${base}-s${si}`;
1191
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1192
+ /* @__PURE__ */ jsxRuntime.jsxs(
1193
+ "button",
1194
+ {
1195
+ type: "button",
1196
+ "aria-expanded": open,
1197
+ "aria-controls": panel,
1198
+ onClick: () => {
1199
+ if (isActive) return;
1200
+ setPeeked((p) => {
1201
+ const n = new Set(p);
1202
+ if (n.has(si)) n.delete(si);
1203
+ else n.add(si);
1204
+ return n;
1205
+ });
1206
+ },
1207
+ className: cn(
1208
+ "flex min-h-9 w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-[0.875rem] transition-colors",
1209
+ isActive ? "font-medium text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground",
1210
+ isActive && "cursor-default"
1211
+ ),
1212
+ children: [
1213
+ section.label,
1214
+ /* @__PURE__ */ jsxRuntime.jsx(
1215
+ lucideReact.ChevronRight,
1216
+ {
1217
+ "aria-hidden": true,
1218
+ className: cn("size-3.5 shrink-0 text-oca-subtle transition-transform duration-200", open && "rotate-90")
1219
+ }
1220
+ )
1221
+ ]
1222
+ }
1223
+ ),
1224
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { id: panel, hidden: !open, className: "mb-2 ml-2.5 mt-0.5 border-l border-border", children: section.items.map((item) => {
1225
+ const on = pathOf(item.href) === here;
1226
+ const badge = typeof item.badge === "string" && STATUS_WORDS.has(item.badge) ? /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: item.badge }) : item.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: "muted", children: item.badge }) : null;
1227
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
1228
+ Link5__default.default,
1229
+ {
1230
+ href: item.href,
1231
+ ref: on ? activeRef : void 0,
1232
+ onClick: onNavigate,
1233
+ "aria-current": on ? "page" : void 0,
1234
+ className: cn(
1235
+ "-ml-px flex min-h-9 items-center gap-2 border-l-2 py-1.5 pl-3.5 pr-2 text-[0.875rem] leading-snug transition-colors",
1236
+ on ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:border-oca-hairline-strong hover:text-foreground"
1237
+ ),
1238
+ children: [
1239
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1", children: item.label }),
1240
+ badge
1241
+ ]
1242
+ }
1243
+ ) }, item.href);
1244
+ }) })
1245
+ ] }, section.label);
1246
+ }) });
1247
+ }
1248
+ var DOCS_HEADER_NAV = OCHK_IO_NAV.map((n) => n.href === DOCS_HREF ? { ...n, active: true } : n);
1249
+ function DocsShell({
1250
+ nav,
1251
+ current,
1252
+ header,
1253
+ search,
1254
+ actions,
1255
+ breadcrumbs,
1256
+ toc,
1257
+ pager,
1258
+ footer,
1259
+ children
1260
+ }) {
1261
+ const [menu, setMenu] = react.useState(false);
1262
+ react.useEffect(() => setMenu(false), [current]);
1263
+ const read = useHeadings("#docs-content", current);
1264
+ const items = toc ?? read.items;
1265
+ const activeId = toc ? void 0 : read.activeId;
1266
+ const here = pathOf(current);
1267
+ const place = react.useMemo(() => {
1268
+ for (const s of nav) {
1269
+ const it = s.items.find((i) => pathOf(i.href) === here);
1270
+ if (it) return { section: s.label, page: it.label };
1271
+ }
1272
+ return null;
1273
+ }, [nav, here]);
1274
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-dvh flex-col bg-background", children: [
1275
+ /* @__PURE__ */ jsxRuntime.jsx(SkipLink, {}),
1276
+ header ?? /* @__PURE__ */ jsxRuntime.jsx(SiteHeader, { home: OCHK_IO, family: "docs", nav: DOCS_HEADER_NAV, search, actions }),
1277
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-16 z-30 border-b border-border bg-background/95 backdrop-blur-md supports-[backdrop-filter]:bg-background/90 md:top-[4.5rem] lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container flex h-12 items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open: menu, onOpenChange: setMenu, children: [
1278
+ /* @__PURE__ */ jsxRuntime.jsxs(SheetTrigger, { className: "-ml-2 inline-flex h-10 min-w-0 items-center gap-2 rounded-full px-2.5 text-[0.875rem] hover:bg-accent", children: [
1279
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, { "aria-hidden": true, className: "size-[1.125rem] shrink-0" }),
1280
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Docs menu. " }),
1281
+ place ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
1282
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground", children: place.section }),
1283
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { "aria-hidden": true, className: "size-3.5 shrink-0 text-oca-subtle" }),
1284
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: place.page })
1285
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Docs" })
1286
+ ] }),
1287
+ /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "left", className: "w-[min(88vw,22rem)] gap-0 p-0", children: [
1288
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border px-5 py-4 pr-14", children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "text-[1.0625rem] font-medium", children: "Docs" }) }),
1289
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto p-3", children: /* @__PURE__ */ jsxRuntime.jsx(DocsNav, { sections: nav, current, onNavigate: () => setMenu(false) }) })
1290
+ ] })
1291
+ ] }) }) }),
1292
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:grid lg:grid-cols-[13.5rem_minmax(0,1fr)] lg:gap-x-10 xl:grid-cols-[13.5rem_minmax(0,1fr)_11rem]", children: [
1293
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-[4.5rem] hidden max-h-[calc(100dvh-4.5rem)] self-start overflow-y-auto overscroll-contain py-8 pr-1 lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(DocsNav, { sections: nav, current }) }),
1294
+ /* @__PURE__ */ jsxRuntime.jsxs("main", { id: "main-content", className: "min-w-0 pb-16 pt-6 md:pt-8", children: [
1295
+ breadcrumbs ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6 max-lg:hidden", children: breadcrumbs }) : null,
1296
+ items.length > 1 ? /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group mb-8 rounded-2xl border border-border bg-card xl:hidden", children: [
1297
+ /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex min-h-12 cursor-pointer list-none items-center justify-between px-4 text-[0.9375rem] font-medium [&::-webkit-details-marker]:hidden", children: [
1298
+ "On this page",
1299
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": true, className: "size-4 text-muted-foreground transition-transform group-open:rotate-180" })
1300
+ ] }),
1301
+ /* @__PURE__ */ jsxRuntime.jsx(OnThisPage, { items, activeId, title: null, className: "px-4 pb-4" })
1302
+ ] }) : null,
1303
+ /* @__PURE__ */ jsxRuntime.jsx("article", { id: "docs-content", className: "max-w-[46rem]", children }),
1304
+ pager ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-16 max-w-[46rem]", children: pager }) : null
1305
+ ] }),
1306
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-[4.5rem] hidden max-h-[calc(100dvh-4.5rem)] self-start overflow-y-auto py-10 xl:block", children: items.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(OnThisPage, { items, activeId }) : null })
1307
+ ] }) }),
1308
+ footer ?? /* @__PURE__ */ jsxRuntime.jsx(SiteFooter, { columns: OCHK_IO_FOOTER, family: true, legal: true, signature: false })
1309
+ ] });
1310
+ }
961
1311
  function SideNav({ groups, onNavigate }) {
962
1312
  return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Pages", className: "flex flex-col gap-5", children: groups.map((g, gi) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
963
1313
  g.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1 text-[0.8125rem] text-muted-foreground", children: g.label }) : null,
964
1314
  g.items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
965
- Link3__default.default,
1315
+ Link5__default.default,
966
1316
  {
967
1317
  href: it.href,
968
1318
  onClick: onNavigate,
@@ -997,7 +1347,7 @@ function SectionSwitch({
997
1347
  children: sections.map((sec) => {
998
1348
  const on = sec.id === current.id;
999
1349
  return /* @__PURE__ */ jsxRuntime.jsx(
1000
- Link3__default.default,
1350
+ Link5__default.default,
1001
1351
  {
1002
1352
  href: sec.href,
1003
1353
  onClick: onNavigate,
@@ -1027,7 +1377,7 @@ function TabBar({ items }) {
1027
1377
  className: "mx-auto grid h-14 max-w-[32rem] px-1.5",
1028
1378
  style: { gridTemplateColumns: `repeat(${items.length}, minmax(0, 1fr))` },
1029
1379
  children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
1030
- Link3__default.default,
1380
+ Link5__default.default,
1031
1381
  {
1032
1382
  href: it.href,
1033
1383
  "aria-current": it.active ? "page" : void 0,
@@ -1136,7 +1486,7 @@ function AppShell({
1136
1486
  footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer }) : null
1137
1487
  ] })
1138
1488
  ] }),
1139
- /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: home, "aria-label": "Home", className: "rounded-lg p-1", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 22 }) }),
1489
+ /* @__PURE__ */ jsxRuntime.jsx(Link5__default.default, { href: home, "aria-label": "Home", className: "rounded-lg p-1", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 22 }) }),
1140
1490
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center", children: account })
1141
1491
  ] }),
1142
1492
  place.page ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1159,7 +1509,7 @@ function AppShell({
1159
1509
  ] }),
1160
1510
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto flex w-full max-w-[90rem]", children: [
1161
1511
  /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "sticky top-0 hidden h-dvh w-[17rem] shrink-0 flex-col gap-6 overflow-y-auto px-4 py-6 lg:flex", children: [
1162
- /* @__PURE__ */ jsxRuntime.jsx(Link3__default.default, { href: home, className: "px-2", "aria-label": "Home", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }) }),
1512
+ /* @__PURE__ */ jsxRuntime.jsx(Link5__default.default, { href: home, className: "px-2", "aria-label": "Home", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }) }),
1163
1513
  switcher,
1164
1514
  /* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups }),
1165
1515
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer })
@@ -1190,9 +1540,16 @@ function AccountMenu({
1190
1540
  "inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-1 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring",
1191
1541
  nameFrom === "lg" ? "lg:pr-3.5" : "sm:pr-3.5"
1192
1542
  ),
1193
- "aria-label": `Account: ${name}`,
1543
+ "aria-label": `${name}, account menu`,
1194
1544
  children: [
1195
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background", children: initial }),
1545
+ /* @__PURE__ */ jsxRuntime.jsx(
1546
+ "span",
1547
+ {
1548
+ "aria-hidden": true,
1549
+ "data-initial": initial,
1550
+ className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background before:content-[attr(data-initial)]"
1551
+ }
1552
+ ),
1196
1553
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("max-w-[10rem] truncate", nameFrom === "lg" ? "max-lg:hidden" : "max-sm:hidden"), children: name })
1197
1554
  ]
1198
1555
  }
@@ -1204,7 +1561,7 @@ function AccountMenu({
1204
1561
  ] }),
1205
1562
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
1206
1563
  items.map(
1207
- (it, i) => it === "separator" ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}, `sep-${i}`) : it.href ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, destructive: it.destructive, children: /* @__PURE__ */ jsxRuntime.jsxs(Link3__default.default, { href: it.href, children: [
1564
+ (it, i) => it === "separator" ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}, `sep-${i}`) : it.href ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, destructive: it.destructive, children: /* @__PURE__ */ jsxRuntime.jsxs(Link5__default.default, { href: it.href, children: [
1208
1565
  it.icon,
1209
1566
  it.label
1210
1567
  ] }) }, it.label) : /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onSelect: it.onSelect, destructive: it.destructive, children: [
@@ -1237,10 +1594,129 @@ function ThemeToggle({ className }) {
1237
1594
  }
1238
1595
  );
1239
1596
  }
1597
+ var OCHK_APP_ACCOUNT = "https://ochk.app/me/account";
1598
+ function SessionAccountView({
1599
+ state,
1600
+ name,
1601
+ detail,
1602
+ items = [],
1603
+ signInHref,
1604
+ signInLabel = "Sign in",
1605
+ accountHref = OCHK_APP_ACCOUNT,
1606
+ onSignOut,
1607
+ nameFrom = "lg"
1608
+ }) {
1609
+ if (state === "in") {
1610
+ return /* @__PURE__ */ jsxRuntime.jsx(
1611
+ AccountMenu,
1612
+ {
1613
+ name: name || "Your account",
1614
+ detail,
1615
+ nameFrom,
1616
+ items: [
1617
+ ...items,
1618
+ ...items.length > 0 ? ["separator"] : [],
1619
+ { label: "Your account", href: accountHref, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleUser, {}) },
1620
+ "separator",
1621
+ { label: "Sign out", onSelect: onSignOut, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, {}) }
1622
+ ]
1623
+ }
1624
+ );
1625
+ }
1626
+ if (state === "unknown") {
1627
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, size: "sm", variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: accountHref, children: "Your account" }) });
1628
+ }
1629
+ return (
1630
+ // No box of its own: it sits exactly where the signed-in chip will. While checking it is only unseen.
1631
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: state === "checking" ? "contents invisible" : "contents", "aria-hidden": state === "checking" || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, size: "sm", variant: "secondary", tabIndex: state === "checking" ? -1 : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: signInHref, children: signInLabel }) }) })
1632
+ );
1633
+ }
1634
+ function ToolShell({
1635
+ protocol: protocol2,
1636
+ tools,
1637
+ home = "/",
1638
+ account,
1639
+ rail = false,
1640
+ railFooter,
1641
+ variant = "tool",
1642
+ banner,
1643
+ footer,
1644
+ children
1645
+ }) {
1646
+ const p = protocolSite(protocol2);
1647
+ const app = variant === "app";
1648
+ const tabs = app ? null : tabsFor([{ items: [...tools] }]);
1649
+ const about = /* @__PURE__ */ jsxRuntime.jsxs(
1650
+ "a",
1651
+ {
1652
+ href: p.pageHref,
1653
+ className: "inline-flex items-center gap-1 rounded-full px-3 py-2 text-[0.9375rem] text-muted-foreground transition-colors hover:text-foreground",
1654
+ children: [
1655
+ "About ",
1656
+ p.label,
1657
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { "aria-hidden": true, className: "size-3.5" })
1658
+ ]
1659
+ }
1660
+ );
1661
+ return /* @__PURE__ */ jsxRuntime.jsx(DensityProvider, { density: "compact", children: /* @__PURE__ */ jsxRuntime.jsxs(
1662
+ "div",
1663
+ {
1664
+ className: cn(
1665
+ "flex flex-col bg-background",
1666
+ app ? "h-dvh overflow-hidden" : "min-h-dvh",
1667
+ tabs && "max-md:pb-[calc(3.5rem_+_env(safe-area-inset-bottom))]"
1668
+ ),
1669
+ children: [
1670
+ /* @__PURE__ */ jsxRuntime.jsx(SkipLink, {}),
1671
+ banner,
1672
+ /* @__PURE__ */ jsxRuntime.jsx(
1673
+ SiteHeader,
1674
+ {
1675
+ variant: "tool",
1676
+ home,
1677
+ product: p.label,
1678
+ family: protocol2,
1679
+ nav: tools.map((t) => ({ href: t.href, label: t.label, active: t.active })),
1680
+ navOnPhone: !tabs,
1681
+ menu: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "[&>a]:px-3 [&>a]:py-3 [&>a]:text-[1.0625rem]", children: about }),
1682
+ className: cn(rail && "lg:[&_nav[aria-label=Main]]:hidden"),
1683
+ actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1684
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden lg:contents", children: about }),
1685
+ p.status !== "live" ? /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: p.status, className: "max-sm:hidden" }) : null,
1686
+ /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, { className: "max-sm:hidden" }),
1687
+ account
1688
+ ] })
1689
+ }
1690
+ ),
1691
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mx-auto flex w-full", app ? "min-h-0 flex-1" : "max-w-[90rem] flex-1"), children: [
1692
+ rail ? /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "sticky top-14 hidden h-[calc(100dvh-3.5rem)] w-60 shrink-0 flex-col gap-6 overflow-y-auto px-4 py-6 lg:flex", children: [
1693
+ /* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups: [{ label: "Tools", items: tools.map(({ href, label, icon, active }) => ({ href, label, icon, active })) }] }),
1694
+ railFooter ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-0.5 px-3 text-[0.875rem] text-muted-foreground [&_a:hover]:text-foreground [&_a]:py-1.5 [&_a]:transition-colors", children: railFooter }) : null
1695
+ ] }) : null,
1696
+ /* @__PURE__ */ jsxRuntime.jsx(
1697
+ "main",
1698
+ {
1699
+ id: "main-content",
1700
+ className: cn("min-w-0 flex-1", app ? "flex min-h-0 flex-col" : "px-4 pb-16 pt-8 md:px-8 md:pt-10"),
1701
+ children: app ? children : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-[72rem]", children })
1702
+ }
1703
+ )
1704
+ ] }),
1705
+ app || footer === false ? null : footer ?? /* @__PURE__ */ jsxRuntime.jsx(SiteFooter, { compact: true, family: true, legal: true }),
1706
+ tabs ? /* @__PURE__ */ jsxRuntime.jsx(TabBar, { items: tabs }) : null
1707
+ ]
1708
+ }
1709
+ ) });
1710
+ }
1240
1711
 
1241
1712
  exports.AccountMenu = AccountMenu;
1242
1713
  exports.AppShell = AppShell;
1714
+ exports.DOCS_HEADER_NAV = DOCS_HEADER_NAV;
1715
+ exports.DocsNav = DocsNav;
1716
+ exports.DocsShell = DocsShell;
1243
1717
  exports.FamilyMenu = FamilyMenu;
1718
+ exports.OCHK_APP_ACCOUNT = OCHK_APP_ACCOUNT;
1719
+ exports.SessionAccountView = SessionAccountView;
1244
1720
  exports.ShellContext = ShellContext;
1245
1721
  exports.SignInFrame = SignInFrame;
1246
1722
  exports.SiteBanner = SiteBanner;
@@ -1248,6 +1724,7 @@ exports.SiteFooter = SiteFooter;
1248
1724
  exports.SiteHeader = SiteHeader;
1249
1725
  exports.SkipLink = SkipLink;
1250
1726
  exports.ThemeToggle = ThemeToggle;
1727
+ exports.ToolShell = ToolShell;
1251
1728
  exports.useShellPlace = useShellPlace;
1252
1729
  //# sourceMappingURL=chrome.js.map
1253
1730
  //# sourceMappingURL=chrome.js.map