@vercel/geistdocs 1.15.5 → 1.16.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 (45) hide show
  1. package/dist/assets/icons/icon-display-small.d.ts +5 -0
  2. package/dist/assets/icons/icon-display-small.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-display-small.js +4 -0
  4. package/dist/assets/icons/icon-display.d.ts +5 -0
  5. package/dist/assets/icons/icon-display.d.ts.map +1 -0
  6. package/dist/assets/icons/icon-display.js +4 -0
  7. package/dist/assets/icons/icon-moon-small.d.ts +5 -0
  8. package/dist/assets/icons/icon-moon-small.d.ts.map +1 -0
  9. package/dist/assets/icons/icon-moon-small.js +4 -0
  10. package/dist/assets/icons/icon-moon.d.ts +5 -0
  11. package/dist/assets/icons/icon-moon.d.ts.map +1 -0
  12. package/dist/assets/icons/icon-moon.js +4 -0
  13. package/dist/assets/icons/icon-sun-small.d.ts +5 -0
  14. package/dist/assets/icons/icon-sun-small.d.ts.map +1 -0
  15. package/dist/assets/icons/icon-sun-small.js +4 -0
  16. package/dist/assets/icons/icon-sun.d.ts +5 -0
  17. package/dist/assets/icons/icon-sun.d.ts.map +1 -0
  18. package/dist/assets/icons/icon-sun.js +4 -0
  19. package/dist/assets/icons/index.d.ts +6 -0
  20. package/dist/assets/icons/index.d.ts.map +1 -1
  21. package/dist/assets/icons/index.js +6 -0
  22. package/dist/cli/index.js +1 -1
  23. package/dist/components/theme-switcher.d.ts +8 -0
  24. package/dist/components/theme-switcher.d.ts.map +1 -0
  25. package/dist/components/theme-switcher.js +37 -0
  26. package/dist/footer.d.ts +1 -7
  27. package/dist/footer.d.ts.map +1 -1
  28. package/dist/footer.js +170 -5
  29. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  30. package/dist/internal/navbar/mobile-menu.js +2 -1
  31. package/dist/internal/navbar/navbar-logo.js +1 -1
  32. package/dist/internal/navbar/navbar-shell.d.ts +5 -0
  33. package/dist/internal/navbar/navbar-shell.d.ts.map +1 -0
  34. package/dist/internal/navbar/navbar-shell.js +17 -0
  35. package/dist/navbar.d.ts.map +1 -1
  36. package/dist/navbar.js +2 -1
  37. package/docs/agents.md +1 -1
  38. package/docs/llms.txt +1 -1
  39. package/docs/manifest.json +1 -1
  40. package/package.json +5 -1
  41. package/template/app/[lang]/layout.tsx +1 -1
  42. package/template/app/styles/geistdocs.css +7 -0
  43. package/template/lib/geistdocs/fonts.ts +7 -10
  44. package/template/package.json +2 -1
  45. package/theme.css +4 -0
@@ -0,0 +1,5 @@
1
+ export declare function IconDisplaySmall({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-display-small.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-display-small.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-display-small.tsx"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconDisplaySmall({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { clipRule: "evenodd", d: "M2.5 5.25C2.5 3.45 3.96 2 5.75 2h4.5c1.8 0 3.25 1.46 3.25 3.25V14h-11V5.25M5.75 3.5C4.78 3.5 4 4.28 4 5.25v7.25h8V5.25c0-.97-.78-1.75-1.75-1.75zM5 5.5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1V9H5zm3.5 6H11V10H8.5z", fill: "currentColor", fillRule: "evenodd" }) }));
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare function IconDisplay({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-display.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-display.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,EAC1B,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconDisplay({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { clipRule: "evenodd", d: "M1 3.25C1 1.45 2.46 0 4.25 0h7.5C13.55 0 15 1.46 15 3.25V16H1V3.25M4.25 1.5c-.97 0-1.75.78-1.75 1.75V14.5h11V3.25c0-.97-.78-1.75-1.75-1.75zM4 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6H4zm5 9h3v-1.5H9z", fill: "currentColor", fillRule: "evenodd" }) }));
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare function IconMoonSmall({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-moon-small.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-moon-small.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-moon-small.tsx"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,EAC5B,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAkBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconMoonSmall({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "m6.3 3.3.7.25A4.25 4.25 0 0 0 12.45 9l.96.96-.08.2A5.75 5.75 0 1 1 6.04 2.6zM5.25 4.76a4.24 4.24 0 1 0 6 5.99H11a5.75 5.75 0 0 1-5.75-6M12.5 3.5h1.25V5H12.5v1.25H11V5H9.75V3.5H11V2.25h1.5zM7 3.55l-.7-.25-.26-.7z", fill: "currentColor" }) }));
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare function IconMoon({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-moon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-moon.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-moon.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,EACvB,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconMoon({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { clipRule: "evenodd", d: "M1.5 8a6 6 0 0 1 3.62-5.51 7 7 0 0 0 7.08 9.25A5.99 5.99 0 0 1 1.5 8M6.42.58a7.5 7.5 0 1 0 7.96 10.41l-.92-1.01a5.5 5.5 0 0 1-6.3-8.25zm6.83.42v1.75H15v1.5h-1.75V6h-1.5V4.25H10v-1.5h1.75V1z", fill: "currentColor", fillRule: "evenodd" }) }));
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare function IconSunSmall({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-sun-small.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-sun-small.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-sun-small.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,EAC3B,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconSunSmall({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { clipRule: "evenodd", d: "M8.75 2v-.75h-1.5V3h1.5V2M8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 1.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7m.75 1.5v1.75h-1.5V13zM13 7.25h1.75v1.5H13zm-11 0h-.75v1.5H3v-1.5H2m9-3.32.54-.53.17-.17.53-.53 1.06 1.06-.53.53-.17.17-.53.53zm-7.77 7.78-.53.53 1.06 1.06.53-.53.17-.17.53-.53L3.93 11l-.53.53zM3.93 5l-.53-.53-.17-.17-.53-.53L3.76 2.7l.53.53.17.17.53.53zm7.78 7.78.53.53 1.06-1.06-.53-.53-.17-.17-.53-.53L11 12.07l.53.53z", fill: "currentColor", fillRule: "evenodd" }) }));
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare function IconSun({ size, className, }: {
2
+ size?: number;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=icon-sun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-sun.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/icon-sun.tsx"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,EACtB,IAAS,EACT,SAAS,GACV,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAoBA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function IconSun({ size = 16, className, }) {
3
+ return (_jsx("svg", { "aria-hidden": "true", className: className, fill: "none", height: size, role: "img", viewBox: "0 0 16 16", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { clipRule: "evenodd", d: "M8.75.75V0h-1.5v2h1.5V.75M3.26 4.32l-.53-.53-.35-.35-.53-.53L2.9 1.85l.53.53.35.35.53.53zm8.42-1.06.53-.53.35-.35.53-.53 1.06 1.06-.53.53-.35.35-.53.53zM8 11.25a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5m0 1.5a4.75 4.75 0 1 0 0-9.5 4.75 4.75 0 0 0 0 9.5m6-5.5h2v1.5h-2zm-13.25 0H0v1.5h2v-1.5H.75m1.62 5.32-.53.53 1.06 1.06.53-.53.35-.35.53-.53-1.06-1.06-.53.53zm10.2 1.06.53.53 1.06-1.06-.53-.53-.35-.35-.53-.53-1.06 1.06.53.53zM8.75 14v2h-1.5v-2z", fill: "currentColor", fillRule: "evenodd" }) }));
4
+ }
@@ -9,11 +9,15 @@ export { IconCheck } from "./icon-check";
9
9
  export { IconChevronDownSmall } from "./icon-chevron-down-small";
10
10
  export { IconClock } from "./icon-clock";
11
11
  export { IconCopy } from "./icon-copy";
12
+ export { IconDisplay } from "./icon-display";
13
+ export { IconDisplaySmall } from "./icon-display-small";
12
14
  export { IconFileText } from "./icon-file-text";
13
15
  export { IconFolderOpen } from "./icon-folder-open";
14
16
  export { IconLinked } from "./icon-linked";
15
17
  export { IconLogs } from "./icon-logs";
16
18
  export { IconMessage } from "./icon-message";
19
+ export { IconMoon } from "./icon-moon";
20
+ export { IconMoonSmall } from "./icon-moon-small";
17
21
  export { IconOpenai } from "./icon-openai";
18
22
  export { IconPlusCircle } from "./icon-plus-circle";
19
23
  export { IconRefreshCounterClockwise } from "./icon-refresh-counter-clockwise";
@@ -21,6 +25,8 @@ export { IconRobot } from "./icon-robot";
21
25
  export { IconSandbox } from "./icon-sandbox";
22
26
  export { IconSlashForward } from "./icon-slash-forward";
23
27
  export { IconSparkles } from "./icon-sparkles";
28
+ export { IconSun } from "./icon-sun";
29
+ export { IconSunSmall } from "./icon-sun-small";
24
30
  export { IconTrash } from "./icon-trash";
25
31
  export { IconUser } from "./icon-user";
26
32
  export { IconWorkflow } from "./icon-workflow";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -10,11 +10,15 @@ export { IconCheck } from "./icon-check";
10
10
  export { IconChevronDownSmall } from "./icon-chevron-down-small";
11
11
  export { IconClock } from "./icon-clock";
12
12
  export { IconCopy } from "./icon-copy";
13
+ export { IconDisplay } from "./icon-display";
14
+ export { IconDisplaySmall } from "./icon-display-small";
13
15
  export { IconFileText } from "./icon-file-text";
14
16
  export { IconFolderOpen } from "./icon-folder-open";
15
17
  export { IconLinked } from "./icon-linked";
16
18
  export { IconLogs } from "./icon-logs";
17
19
  export { IconMessage } from "./icon-message";
20
+ export { IconMoon } from "./icon-moon";
21
+ export { IconMoonSmall } from "./icon-moon-small";
18
22
  export { IconOpenai } from "./icon-openai";
19
23
  export { IconPlusCircle } from "./icon-plus-circle";
20
24
  export { IconRefreshCounterClockwise } from "./icon-refresh-counter-clockwise";
@@ -22,6 +26,8 @@ export { IconRobot } from "./icon-robot";
22
26
  export { IconSandbox } from "./icon-sandbox";
23
27
  export { IconSlashForward } from "./icon-slash-forward";
24
28
  export { IconSparkles } from "./icon-sparkles";
29
+ export { IconSun } from "./icon-sun";
30
+ export { IconSunSmall } from "./icon-sun-small";
25
31
  export { IconTrash } from "./icon-trash";
26
32
  export { IconUser } from "./icon-user";
27
33
  export { IconWorkflow } from "./icon-workflow";
package/dist/cli/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import{program as T}from"commander";import{access as ce,copyFile as le}from"fs/promises";import{join as pe}from"path";import{cancel as de,intro as ge,isCancel as ue,log as fe,outro as me,spinner as he,text as we}from"@clack/prompts";import{spawn as te}from"child_process";import{readFileSync as se}from"fs";import{cp as ne,readFile as ae,rename as re,writeFile as ie}from"fs/promises";import{join as $}from"path";import{fileURLToPath as oe}from"url";var g="@vercel/geistdocs",m=(e,t=[],s={})=>new Promise((n,a)=>{let r=te(e,t,{stdio:"inherit",...s});r.on("error",a),r.on("close",i=>{if(i===0){n();return}a(new Error(`Command failed with exit code ${i}: ${[e,...t].join(" ")}`))})}),A=["dependencies","devDependencies","optionalDependencies","peerDependencies"],_=()=>JSON.parse(se(new URL("../../package.json",import.meta.url),"utf8")).version,P=async e=>{let t=$(e,"package.json"),s=await ae(t,"utf8");return JSON.parse(s)},x=async(e,t)=>{let s=$(e,"package.json");await ie(s,`${JSON.stringify(t,null,2)}
3
- `,"utf8")},R=(e,t)=>{for(let s of A){let n=e[s];if(n&&t in n)return n[t]}},V=(e,t)=>!!R(e,t),b=(e,t,s)=>{let n=!1;for(let a of A){let r=e[a];r&&t in r&&(r[t]=s,n=!0)}return n},j=()=>oe(new URL("../../template",import.meta.url)),F=async e=>{await ne(j(),e,{recursive:!0});let t=$(e,".gitignore"),s=$(e,"_gitignore");try{await re(s,t)}catch{}};var ye=async e=>{await F(e)},Pe=async e=>{try{return await ce(e),!0}catch{return!1}},ve=async()=>{await Pe(".env.example")&&await le(".env.example",".env.local")},Te=async e=>{let t=await P(e),s=_();return b(t,g,s)?(await x(e,t),!0):!1},ke=async e=>{await m("pnpm",["install"],{cwd:e,env:process.env,stdio:"inherit"})},$e=async e=>{await m("git",["init"],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["add","."],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["commit","-m","\u2728 Initial commit"],{cwd:e,env:process.env,stdio:"inherit"})},xe=async()=>{let e=await we({message:"What is your project named?",placeholder:"my-app",validate(t){if(t.length===0)return"Please enter a project name."}});return ue(e)&&(de("Operation cancelled."),process.exit(0)),e.toString()},G=async e=>{try{ge("Let's start a Geistdocs project!");let t=process.cwd(),s=e.name||await xe(),n=he(),a=pe(t,s);n.start("Copying bundled template..."),await ye(s),n.message("Setting up environment variables..."),process.chdir(a),await ve(),n.message("Rewriting package dependency versions..."),await Te(a),n.message("Installing dependencies..."),await ke(a),e.disableGit||(n.message("Initializing Git repository..."),await $e(a)),n.stop("Project initialized successfully!"),me("Run `pnpm dev` to start the development server.")}catch(t){let s=t instanceof Error?t.message:`Failed to initialize project: ${t}`;fe.error(s),process.exit(1)}};import{readFileSync as be,writeFileSync as Fe}from"fs";import{mkdir as De,readFile as N,writeFile as Se}from"fs/promises";import{dirname as Ce,extname as Re,relative as M,resolve as S}from"path";import{intro as je,isCancel as Ee,log as h,multiselect as Ne,outro as D,spinner as Ue}from"@clack/prompts";import{glob as Oe}from"glob";import{Node as v,Project as Ie,SyntaxKind as Je}from"ts-morph";var Le="geistdocs.tsx",Ae="content/docs/**/*.mdx",U=".translation-cache.json",E=8,B=()=>({version:1,entries:{}}),_e=async e=>{let t=await N(e),{createHash:s}=await import("crypto");return s("sha256").update(t).digest("hex")},Ve=e=>{let t=S(process.cwd(),e);return be(t,"utf8")},z=e=>v.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(v.isPropertyAssignment(t)){let s=t.getNameNode();if(v.isIdentifier(s)||v.isStringLiteral(s))return[s.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],Ge=e=>{try{let t=new Ie({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),s=Ve(e),r=t.createSourceFile(e,s,{overwrite:!0}).getVariableDeclarations().find(l=>l.getName()==="translations")?.getInitializer();if(!r)return[];if(v.isObjectLiteralExpression(r))return z(r);let i=r.getFirstDescendantByKind(Je.ObjectLiteralExpression);return i?z(i):[]}catch(t){let s=t instanceof Error?t.message:`${t}`;return h.warn(`Failed to read locales from ${e}: ${s}`),[]}},Be=async()=>{let e=await Ne({message:"Which locales should be translated?",options:[{value:"cn",label:"Chinese (cn)"},{value:"jp",label:"Japanese (jp)"},{value:"es",label:"Spanish (es)"},{value:"fr",label:"French (fr)"},{value:"de",label:"German (de)"}],required:!0});return Ee(e)&&(D("Translation cancelled"),process.exit(0)),e},ze=async e=>(await Oe(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),He=async()=>{let e=S(process.cwd(),U);try{let t=await N(e,"utf8"),s=JSON.parse(t);return s.version!==1||!s.entries?B():{version:1,entries:s.entries}}catch{return B()}},H=e=>{let t=S(process.cwd(),U),s=JSON.stringify(e,null,2);Fe(t,s,"utf8")},Me=async e=>{let t=await Promise.all(e.map(async s=>[s,await _e(s)]));return Object.fromEntries(t)},Ke=(e,t)=>{let s=Re(e);return`${e.slice(0,-s.length)}.${t}${s}`},K=(e,t)=>`${M(process.cwd(),e)}::${t}`,qe=(e,t,s,n,a=!1)=>{let r=[],i=0;for(let l of t){let c=s[l];for(let o of e){let d=Ke(l,o),u=K(l,o),f=n.entries[u];if(!a&&f?.hash===c){i+=1;continue}r.push({locale:o,sourceFile:l,sourceHash:c,targetFile:d})}}return{tasks:r,skippedCount:i}},Xe=async e=>{await De(Ce(e),{recursive:!0})},We=async(e,t,s)=>{let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:s})});if(!n.ok){let r=await n.text();throw new Error(`API request failed (${n.status}): ${r}`)}let a=await n.json();if(!a.translation)throw new Error("API response did not include a translation");return a.translation},Ye=async(e,t,s)=>{let n=await N(e.sourceFile,"utf8"),a=await We(t,n,e.locale);await Xe(e.targetFile),await Se(e.targetFile,a,"utf8"),s.entries[K(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},q=async(e,t)=>{je("Translate MDX content");let s=e??Ae,n=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",a=Ge(t.config??Le),r=await ze(s);r.length===0&&(h.error(`No MDX files found matching pattern: ${s}`),D("Translation cancelled"),process.exit(1)),h.info(`Found ${r.length} MDX file(s) matching pattern`),a.length===0&&(a=await Be());let i=S(process.cwd(),U),l=await He();await H(l),h.info(`Using cache: ${i}`);let c=await Me(r),{tasks:o,skippedCount:d}=qe(a,r,c,l,t.force);if(o.length===0){h.success("All translations are up to date!"),D(`Skipped ${d} file(s) (unchanged)`);return}let u=[];for(let y=0;y<o.length;y+=E)u.push(o.slice(y,y+E));h.info(`Processing ${o.length} translation(s) in ${u.length} batch(es) of up to ${E}`),d>0&&h.info(`Skipped ${d} translation(s) (unchanged)`);let f=Ue();f.start("Translating content...");let k=0;for(let y of u)await Promise.all(y.map(async L=>{await Ye(L,n,l),k+=1,f.message(`Translated ${k}/${o.length}: ${M(process.cwd(),L.targetFile)}`)})),await H(l);f.stop("Translation complete!"),D(`Created/updated ${o.length} file(s)`)};import{access as Ze,copyFile as Qe,mkdir as Z,rm as J}from"fs/promises";import{dirname as et,join as w}from"path";import{intro as tt,log as p,outro as C,spinner as Q}from"@clack/prompts";import{glob as st}from"glob";var nt=["**/*"],at=["content/docs/**"],O=".geistdocs-tmp",rt=async(e,t)=>{let s=w(e,t);await J(s,{recursive:!0,force:!0}),await Z(s,{recursive:!0})},I=async e=>await J(e,{recursive:!0,force:!0}),X=async(e,t,s)=>(await st(e,{cwd:s,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),it=async e=>{try{return await Ze(e),!0}catch{return!1}},ot=async(e,t,s)=>{let n=w(t,e),a=w(s,e);return await it(n)?(await Qe(n,a),{success:!0}):{success:!1,error:`Source file not found: ${n}`}},ct=async(e,t)=>{let s=w(t,e);return await J(s,{force:!0}),{success:!0}},W=20,Y=async(e,t,s)=>{let n=[];for(let a=0;a<e.length;a+=s){let r=e.slice(a,a+s),i=await Promise.all(r.map(t));n.push(...i)}return n},lt=async(e,t,s,n,a)=>{let r={success:[],deleted:[],failed:[]},i=[...new Set(e.map(c=>et(w(n,c))))];a.message(`Creating ${i.length} directories...`),await Promise.all(i.map(c=>Z(c,{recursive:!0}))),a.message(`Updating ${e.length} files...`);let l=await Y(e,async c=>{let o=await ot(c,s,n);return{file:c,...o}},W);for(let{file:c,success:o,error:d}of l)o?r.success.push(c):r.failed.push({file:c,error:d??"Unknown error"});if(t.length>0){a.message(`Deleting ${t.length} files...`);let c=await Y(t,async o=>{try{return await ct(o,n),{file:o,success:!0}}catch(d){let u=d instanceof Error?d.message:`${d}`;return{file:o,success:!1,error:u}}},W);for(let o of c)o.success?r.deleted.push(o.file):r.failed.push({file:o.file,error:o.error})}return r},pt=e=>{if(e.success.length>0){p.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)p.info(` \u2713 ${t}`)}if(e.deleted.length>0){p.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)p.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){p.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:s}of e.failed)p.error(` \u2717 ${t}: ${s}`)}},dt=e=>e.includes("canary")?"canary":"latest",gt=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(g)}`);if(!t.ok)throw new Error(`Failed to resolve ${g}@${e}`);let n=(await t.json())["dist-tags"]?.[e];if(!n)throw new Error(`Could not find dist-tag ${e} for ${g}`);return n},ut=async e=>{let t=await P(e),s=R(t,g);if(!s)return{currentVersion:s,nextVersion:void 0,updated:!1};let n=dt(s),a=await gt(n);return s===a?{currentVersion:s,nextVersion:a,updateTag:n,updated:!1}:(b(t,g,a),await x(e,t),{currentVersion:s,nextVersion:a,updateTag:n,updated:!0})},ft=async(e,t,s)=>{let n=await P(e);if(!V(n,g))return!1;t&&t.length>0&&p.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),s?.sync&&p.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:a,nextVersion:r,updateTag:i,updated:l}=await ut(e);if(!l)return p.success(a?`@vercel/geistdocs is already at ${r} (${i}).`:"No package version update was needed."),C("Package-based site is already up to date."),!0;p.info(`Bumping ${g} from ${a} to ${r} (${i})`);let c=Q();return c.start("Installing updated package version..."),await m("pnpm",["install"],{cwd:e}),c.stop("Package update complete!"),C("Please review and test the upgraded package version."),!0},mt=async(e,t,s,n,a)=>{let r=w(e,O),i=Q(),l=a?.sync?r:t;i.start("Preparing template snapshot..."),a?.sync&&(await rt(e,O),await F(r)),i.message("Scanning for files...");let c=await X(s,n,l),o=[];if(a?.sync){i.message("Comparing with local files...");let u=await X(s,n,e),f=new Set(c);o=u.filter(k=>!f.has(k))}if(i.stop(`Found ${c.length} files to update`),c.length===0&&o.length===0){p.warn("No files matched the patterns. Nothing to update."),a?.sync&&await I(r),C("Update cancelled.");return}p.info(`Patterns: ${s.length}`),p.info(`Files to update: ${c.length}`),a?.sync&&p.info(`Files to delete: ${o.length}`),i.start("Updating files...");let d=await lt(c,o,l,e,i);a?.sync&&(i.message("Cleaning up..."),await I(r)),i.stop("Update complete!"),pt(d),C("Please review and test the changes carefully.")},ee=async(e,t)=>{let s=process.cwd(),n=j(),a=e&&e.length>0?e:nt,r=e&&e.length>0?[]:at;try{if(tt("Let's update your Geistdocs project!"),await ft(s,e,t))return;p.info("Template source: bundled package snapshot"),e&&e.length>0&&p.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&p.info("Sync mode enabled: will delete files removed from template"),await mt(s,n,a,r,t)}catch(i){let l=i instanceof Error?i.message:`${i}`;try{await I(w(s,O))}catch{}p.error(`Failed to update project: ${l}`),process.exit(1)}};T.name("geistdocs").description("CLI for Geistdocs projects").version("1.15.5","-v, --version","Output the current version");T.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").option("--disable-git","Disable git initialization").action(G);T.command("update [files...]").description("Update a Geistdocs project (optionally specify files/patterns to update)").option("--sync","Delete local files that no longer exist in the template").action(ee);T.command("translate [pattern]").description("Translate MDX file(s) to one or more locales (default: content/docs/**/*.mdx)").option("--config <path>","Path to config file to load locales from (defaults to geistdocs.tsx)").option("--url <url>","Custom translation API URL (defaults to GEISTDOCS_TRANSLATE_URL or https://geistdocs.com/translate)").option("--force","Force re-translation of all files, ignoring cache").action(q);T.parse(process.argv);
3
+ `,"utf8")},R=(e,t)=>{for(let s of A){let n=e[s];if(n&&t in n)return n[t]}},V=(e,t)=>!!R(e,t),b=(e,t,s)=>{let n=!1;for(let a of A){let r=e[a];r&&t in r&&(r[t]=s,n=!0)}return n},j=()=>oe(new URL("../../template",import.meta.url)),F=async e=>{await ne(j(),e,{recursive:!0});let t=$(e,".gitignore"),s=$(e,"_gitignore");try{await re(s,t)}catch{}};var ye=async e=>{await F(e)},Pe=async e=>{try{return await ce(e),!0}catch{return!1}},ve=async()=>{await Pe(".env.example")&&await le(".env.example",".env.local")},Te=async e=>{let t=await P(e),s=_();return b(t,g,s)?(await x(e,t),!0):!1},ke=async e=>{await m("pnpm",["install"],{cwd:e,env:process.env,stdio:"inherit"})},$e=async e=>{await m("git",["init"],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["add","."],{cwd:e,env:process.env,stdio:"inherit"}),await m("git",["commit","-m","\u2728 Initial commit"],{cwd:e,env:process.env,stdio:"inherit"})},xe=async()=>{let e=await we({message:"What is your project named?",placeholder:"my-app",validate(t){if(t.length===0)return"Please enter a project name."}});return ue(e)&&(de("Operation cancelled."),process.exit(0)),e.toString()},G=async e=>{try{ge("Let's start a Geistdocs project!");let t=process.cwd(),s=e.name||await xe(),n=he(),a=pe(t,s);n.start("Copying bundled template..."),await ye(s),n.message("Setting up environment variables..."),process.chdir(a),await ve(),n.message("Rewriting package dependency versions..."),await Te(a),n.message("Installing dependencies..."),await ke(a),e.disableGit||(n.message("Initializing Git repository..."),await $e(a)),n.stop("Project initialized successfully!"),me("Run `pnpm dev` to start the development server.")}catch(t){let s=t instanceof Error?t.message:`Failed to initialize project: ${t}`;fe.error(s),process.exit(1)}};import{readFileSync as be,writeFileSync as Fe}from"fs";import{mkdir as De,readFile as N,writeFile as Se}from"fs/promises";import{dirname as Ce,extname as Re,relative as M,resolve as S}from"path";import{intro as je,isCancel as Ee,log as h,multiselect as Ne,outro as D,spinner as Ue}from"@clack/prompts";import{glob as Oe}from"glob";import{Node as v,Project as Ie,SyntaxKind as Je}from"ts-morph";var Le="geistdocs.tsx",Ae="content/docs/**/*.mdx",U=".translation-cache.json",E=8,B=()=>({version:1,entries:{}}),_e=async e=>{let t=await N(e),{createHash:s}=await import("crypto");return s("sha256").update(t).digest("hex")},Ve=e=>{let t=S(process.cwd(),e);return be(t,"utf8")},z=e=>v.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(v.isPropertyAssignment(t)){let s=t.getNameNode();if(v.isIdentifier(s)||v.isStringLiteral(s))return[s.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],Ge=e=>{try{let t=new Ie({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),s=Ve(e),r=t.createSourceFile(e,s,{overwrite:!0}).getVariableDeclarations().find(l=>l.getName()==="translations")?.getInitializer();if(!r)return[];if(v.isObjectLiteralExpression(r))return z(r);let i=r.getFirstDescendantByKind(Je.ObjectLiteralExpression);return i?z(i):[]}catch(t){let s=t instanceof Error?t.message:`${t}`;return h.warn(`Failed to read locales from ${e}: ${s}`),[]}},Be=async()=>{let e=await Ne({message:"Which locales should be translated?",options:[{value:"cn",label:"Chinese (cn)"},{value:"jp",label:"Japanese (jp)"},{value:"es",label:"Spanish (es)"},{value:"fr",label:"French (fr)"},{value:"de",label:"German (de)"}],required:!0});return Ee(e)&&(D("Translation cancelled"),process.exit(0)),e},ze=async e=>(await Oe(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),He=async()=>{let e=S(process.cwd(),U);try{let t=await N(e,"utf8"),s=JSON.parse(t);return s.version!==1||!s.entries?B():{version:1,entries:s.entries}}catch{return B()}},H=e=>{let t=S(process.cwd(),U),s=JSON.stringify(e,null,2);Fe(t,s,"utf8")},Me=async e=>{let t=await Promise.all(e.map(async s=>[s,await _e(s)]));return Object.fromEntries(t)},Ke=(e,t)=>{let s=Re(e);return`${e.slice(0,-s.length)}.${t}${s}`},K=(e,t)=>`${M(process.cwd(),e)}::${t}`,qe=(e,t,s,n,a=!1)=>{let r=[],i=0;for(let l of t){let c=s[l];for(let o of e){let d=Ke(l,o),u=K(l,o),f=n.entries[u];if(!a&&f?.hash===c){i+=1;continue}r.push({locale:o,sourceFile:l,sourceHash:c,targetFile:d})}}return{tasks:r,skippedCount:i}},Xe=async e=>{await De(Ce(e),{recursive:!0})},We=async(e,t,s)=>{let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:s})});if(!n.ok){let r=await n.text();throw new Error(`API request failed (${n.status}): ${r}`)}let a=await n.json();if(!a.translation)throw new Error("API response did not include a translation");return a.translation},Ye=async(e,t,s)=>{let n=await N(e.sourceFile,"utf8"),a=await We(t,n,e.locale);await Xe(e.targetFile),await Se(e.targetFile,a,"utf8"),s.entries[K(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},q=async(e,t)=>{je("Translate MDX content");let s=e??Ae,n=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",a=Ge(t.config??Le),r=await ze(s);r.length===0&&(h.error(`No MDX files found matching pattern: ${s}`),D("Translation cancelled"),process.exit(1)),h.info(`Found ${r.length} MDX file(s) matching pattern`),a.length===0&&(a=await Be());let i=S(process.cwd(),U),l=await He();await H(l),h.info(`Using cache: ${i}`);let c=await Me(r),{tasks:o,skippedCount:d}=qe(a,r,c,l,t.force);if(o.length===0){h.success("All translations are up to date!"),D(`Skipped ${d} file(s) (unchanged)`);return}let u=[];for(let y=0;y<o.length;y+=E)u.push(o.slice(y,y+E));h.info(`Processing ${o.length} translation(s) in ${u.length} batch(es) of up to ${E}`),d>0&&h.info(`Skipped ${d} translation(s) (unchanged)`);let f=Ue();f.start("Translating content...");let k=0;for(let y of u)await Promise.all(y.map(async L=>{await Ye(L,n,l),k+=1,f.message(`Translated ${k}/${o.length}: ${M(process.cwd(),L.targetFile)}`)})),await H(l);f.stop("Translation complete!"),D(`Created/updated ${o.length} file(s)`)};import{access as Ze,copyFile as Qe,mkdir as Z,rm as J}from"fs/promises";import{dirname as et,join as w}from"path";import{intro as tt,log as p,outro as C,spinner as Q}from"@clack/prompts";import{glob as st}from"glob";var nt=["**/*"],at=["content/docs/**"],O=".geistdocs-tmp",rt=async(e,t)=>{let s=w(e,t);await J(s,{recursive:!0,force:!0}),await Z(s,{recursive:!0})},I=async e=>await J(e,{recursive:!0,force:!0}),X=async(e,t,s)=>(await st(e,{cwd:s,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),it=async e=>{try{return await Ze(e),!0}catch{return!1}},ot=async(e,t,s)=>{let n=w(t,e),a=w(s,e);return await it(n)?(await Qe(n,a),{success:!0}):{success:!1,error:`Source file not found: ${n}`}},ct=async(e,t)=>{let s=w(t,e);return await J(s,{force:!0}),{success:!0}},W=20,Y=async(e,t,s)=>{let n=[];for(let a=0;a<e.length;a+=s){let r=e.slice(a,a+s),i=await Promise.all(r.map(t));n.push(...i)}return n},lt=async(e,t,s,n,a)=>{let r={success:[],deleted:[],failed:[]},i=[...new Set(e.map(c=>et(w(n,c))))];a.message(`Creating ${i.length} directories...`),await Promise.all(i.map(c=>Z(c,{recursive:!0}))),a.message(`Updating ${e.length} files...`);let l=await Y(e,async c=>{let o=await ot(c,s,n);return{file:c,...o}},W);for(let{file:c,success:o,error:d}of l)o?r.success.push(c):r.failed.push({file:c,error:d??"Unknown error"});if(t.length>0){a.message(`Deleting ${t.length} files...`);let c=await Y(t,async o=>{try{return await ct(o,n),{file:o,success:!0}}catch(d){let u=d instanceof Error?d.message:`${d}`;return{file:o,success:!1,error:u}}},W);for(let o of c)o.success?r.deleted.push(o.file):r.failed.push({file:o.file,error:o.error})}return r},pt=e=>{if(e.success.length>0){p.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)p.info(` \u2713 ${t}`)}if(e.deleted.length>0){p.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)p.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){p.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:s}of e.failed)p.error(` \u2717 ${t}: ${s}`)}},dt=e=>e.includes("canary")?"canary":"latest",gt=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(g)}`);if(!t.ok)throw new Error(`Failed to resolve ${g}@${e}`);let n=(await t.json())["dist-tags"]?.[e];if(!n)throw new Error(`Could not find dist-tag ${e} for ${g}`);return n},ut=async e=>{let t=await P(e),s=R(t,g);if(!s)return{currentVersion:s,nextVersion:void 0,updated:!1};let n=dt(s),a=await gt(n);return s===a?{currentVersion:s,nextVersion:a,updateTag:n,updated:!1}:(b(t,g,a),await x(e,t),{currentVersion:s,nextVersion:a,updateTag:n,updated:!0})},ft=async(e,t,s)=>{let n=await P(e);if(!V(n,g))return!1;t&&t.length>0&&p.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),s?.sync&&p.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:a,nextVersion:r,updateTag:i,updated:l}=await ut(e);if(!l)return p.success(a?`@vercel/geistdocs is already at ${r} (${i}).`:"No package version update was needed."),C("Package-based site is already up to date."),!0;p.info(`Bumping ${g} from ${a} to ${r} (${i})`);let c=Q();return c.start("Installing updated package version..."),await m("pnpm",["install"],{cwd:e}),c.stop("Package update complete!"),C("Please review and test the upgraded package version."),!0},mt=async(e,t,s,n,a)=>{let r=w(e,O),i=Q(),l=a?.sync?r:t;i.start("Preparing template snapshot..."),a?.sync&&(await rt(e,O),await F(r)),i.message("Scanning for files...");let c=await X(s,n,l),o=[];if(a?.sync){i.message("Comparing with local files...");let u=await X(s,n,e),f=new Set(c);o=u.filter(k=>!f.has(k))}if(i.stop(`Found ${c.length} files to update`),c.length===0&&o.length===0){p.warn("No files matched the patterns. Nothing to update."),a?.sync&&await I(r),C("Update cancelled.");return}p.info(`Patterns: ${s.length}`),p.info(`Files to update: ${c.length}`),a?.sync&&p.info(`Files to delete: ${o.length}`),i.start("Updating files...");let d=await lt(c,o,l,e,i);a?.sync&&(i.message("Cleaning up..."),await I(r)),i.stop("Update complete!"),pt(d),C("Please review and test the changes carefully.")},ee=async(e,t)=>{let s=process.cwd(),n=j(),a=e&&e.length>0?e:nt,r=e&&e.length>0?[]:at;try{if(tt("Let's update your Geistdocs project!"),await ft(s,e,t))return;p.info("Template source: bundled package snapshot"),e&&e.length>0&&p.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&p.info("Sync mode enabled: will delete files removed from template"),await mt(s,n,a,r,t)}catch(i){let l=i instanceof Error?i.message:`${i}`;try{await I(w(s,O))}catch{}p.error(`Failed to update project: ${l}`),process.exit(1)}};T.name("geistdocs").description("CLI for Geistdocs projects").version("1.16.0","-v, --version","Output the current version");T.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").option("--disable-git","Disable git initialization").action(G);T.command("update [files...]").description("Update a Geistdocs project (optionally specify files/patterns to update)").option("--sync","Delete local files that no longer exist in the template").action(ee);T.command("translate [pattern]").description("Translate MDX file(s) to one or more locales (default: content/docs/**/*.mdx)").option("--config <path>","Path to config file to load locales from (defaults to geistdocs.tsx)").option("--url <url>","Custom translation API URL (defaults to GEISTDOCS_TRANSLATE_URL or https://geistdocs.com/translate)").option("--force","Force re-translation of all files, ignoring cache").action(q);T.parse(process.argv);
@@ -0,0 +1,8 @@
1
+ interface ThemeSwitcherProps {
2
+ className?: string;
3
+ /** Compact variant with smaller segments. */
4
+ small?: boolean;
5
+ }
6
+ export declare const ThemeSwitcher: ({ className, small }: ThemeSwitcherProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
8
+ //# sourceMappingURL=theme-switcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-switcher.d.ts","sourceRoot":"","sources":["../../src/components/theme-switcher.tsx"],"names":[],"mappings":"AAoBA,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,eAAO,MAAM,aAAa,GAAI,sBAAsB,kBAAkB,mDAoDrE,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useTheme } from "next-themes";
4
+ import { useEffect, useId, useState } from "react";
5
+ import { IconDisplay } from "../assets/icons/icon-display";
6
+ import { IconDisplaySmall } from "../assets/icons/icon-display-small";
7
+ import { IconMoon } from "../assets/icons/icon-moon";
8
+ import { IconMoonSmall } from "../assets/icons/icon-moon-small";
9
+ import { IconSun } from "../assets/icons/icon-sun";
10
+ import { IconSunSmall } from "../assets/icons/icon-sun-small";
11
+ import { cn } from "../internal/cn";
12
+ // Like geistcn: the large/default switcher uses the detailed glyphs, the
13
+ // compact (`small`) variant uses the simplified small glyphs. Both render 16px.
14
+ const THEMES = [
15
+ { Icon: IconDisplay, SmallIcon: IconDisplaySmall, key: "system" },
16
+ { Icon: IconSun, SmallIcon: IconSunSmall, key: "light" },
17
+ { Icon: IconMoon, SmallIcon: IconMoonSmall, key: "dark" },
18
+ ];
19
+ // Segmented system / light / dark theme control matching the vercel.com
20
+ // (geistcn) theme switcher.
21
+ export const ThemeSwitcher = ({ className, small }) => {
22
+ const { theme, setTheme } = useTheme();
23
+ const rId = useId();
24
+ const [mounted, setMounted] = useState(false);
25
+ useEffect(() => {
26
+ setMounted(true);
27
+ }, []);
28
+ // Avoid a hydration mismatch: the active theme is only known on the client.
29
+ if (!mounted) {
30
+ return null;
31
+ }
32
+ return (_jsxs("fieldset", { className: cn("isolate m-0 flex h-8 w-fit rounded-full border-0 p-0 shadow-[var(--ds-shadow-border)] data-[small]:h-6", className), "data-small": small ? "" : undefined, children: [_jsx("legend", { className: "sr-only", children: "Select a display theme:" }), THEMES.map(({ Icon, SmallIcon, key }) => {
33
+ const Glyph = small ? SmallIcon : Icon;
34
+ const id = `theme-switch-${key}-${rId}`;
35
+ return (_jsxs("span", { className: "h-full", children: [_jsx("input", { "aria-label": key, checked: key === theme, className: "peer absolute m-0 appearance-none p-0 outline-none", id: id, onChange: () => setTheme(key), type: "radio", value: key }), _jsxs("label", { className: "group relative m-0 flex size-8 cursor-pointer items-center justify-center rounded-full bg-none text-gray-700 hover:text-gray-1000 peer-checked:bg-background-100 peer-checked:text-gray-1000 peer-checked:shadow-[0_0_0_1px_var(--ds-gray-400),0px_1px_2px_0px_var(--ds-gray-alpha-100)] peer-focus-visible:text-gray-1000 peer-focus-visible:shadow-[var(--ds-focus-ring)] data-[small]:size-6", "data-small": small ? "" : undefined, htmlFor: id, children: [_jsx("span", { className: "sr-only", children: key }), _jsx("span", { className: "relative z-[1] size-4", children: _jsx(Glyph, {}) })] })] }, key));
36
+ })] }));
37
+ };
package/dist/footer.d.ts CHANGED
@@ -1,8 +1,2 @@
1
- import type { GeistdocsConfig } from "./config";
2
- interface FooterProps {
3
- config: Pick<GeistdocsConfig, "basePath" | "github">;
4
- copyright?: string;
5
- }
6
- export declare const Footer: ({ config, copyright, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
1
+ export declare const Footer: () => import("react/jsx-runtime").JSX.Element;
8
2
  //# sourceMappingURL=footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../src/footer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,GAAI,wBAGpB,WAAW,4CAiBb,CAAC"}
1
+ {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../src/footer.tsx"],"names":[],"mappings":"AAwOA,eAAO,MAAM,MAAM,+CA4ClB,CAAC"}
package/dist/footer.js CHANGED
@@ -1,6 +1,171 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SiVercel } from "@icons-pack/react-simple-icons";
3
- import { LanguageSelector, ThemeToggle } from "./controls";
4
- import { RSSButton } from "./internal/footer/rss-button";
5
- import { GitHubButton } from "./internal/github-button";
6
- export const Footer = ({ config, copyright = `Copyright Vercel ${new Date().getFullYear()}. All rights reserved.`, }) => (_jsx("footer", { className: "border-t px-4 py-5 md:px-6", children: _jsxs("div", { className: "mx-auto flex max-w-[1448px] flex-col items-center justify-between gap-4 sm:flex-row", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SiVercel, { className: "size-4 shrink-0" }), _jsx("p", { className: "text-center text-gray-800 text-sm sm:text-left", children: copyright })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(LanguageSelector, {}), _jsx(RSSButton, { basePath: config.basePath }), _jsx(GitHubButton, { github: config.github }), _jsx(ThemeToggle, {})] })] }) }));
2
+ import { LogoIconVercel } from "./assets/logos/logo-icon-vercel";
3
+ import { Badge } from "./components/badge";
4
+ import { ThemeSwitcher } from "./components/theme-switcher";
5
+ import { cn } from "./internal/cn";
6
+ // Vercel product directory (mirrors the vercel.com home footer). Relative hrefs
7
+ // resolve against vercel.com; `external` marks off-domain links.
8
+ const VERCEL = "https://vercel.com";
9
+ const FOOTER_GROUPS = [
10
+ {
11
+ title: "Agent Stack",
12
+ items: [
13
+ { href: "/ai-sdk", name: "AI SDK" },
14
+ { href: "/ai-gateway", name: "AI Gateway" },
15
+ { href: "/sandbox", name: "Sandbox" },
16
+ { href: "/workflows", name: "Workflows" },
17
+ { href: "/connect", name: "Connect", badge: "New" },
18
+ { href: "/passport", name: "Passport", badge: "New" },
19
+ { href: "/eve", name: "eve", badge: "New" },
20
+ ],
21
+ },
22
+ {
23
+ title: "Core Platform",
24
+ items: [
25
+ { href: "/products/previews", name: "CI/CD" },
26
+ { href: "/cdn", name: "Content Delivery" },
27
+ { href: "/fluid", name: "Fluid Compute" },
28
+ { href: "/products/observability", name: "Observability" },
29
+ ],
30
+ },
31
+ {
32
+ title: "Security",
33
+ items: [
34
+ { href: "/security", name: "Platform Security" },
35
+ { href: "/security/web-application-firewall", name: "WAF" },
36
+ { href: "/security/bot-management", name: "Bot Management" },
37
+ { href: "/botid", name: "Bot ID" },
38
+ ],
39
+ },
40
+ {
41
+ title: "Tools",
42
+ items: [
43
+ { href: "/drop", name: "Vercel Drop", badge: "New" },
44
+ { href: "/agent", name: "Vercel Agent" },
45
+ { href: "/plugin", name: "Vercel Plugin", badge: "New" },
46
+ { href: "https://skills.sh", name: "Agent Skills", external: true },
47
+ { href: "/frameworks/nextjs", name: "Next.js" },
48
+ { href: "/domains", name: "Domains" },
49
+ { href: "https://v0.app", name: "v0", external: true },
50
+ ],
51
+ },
52
+ {
53
+ title: "Frameworks",
54
+ items: [
55
+ { href: "https://eve.dev/", name: "eve", external: true, badge: "New" },
56
+ { href: "/docs/frameworks/full-stack/nuxt", name: "Nuxt" },
57
+ { href: "/docs/frameworks/full-stack/sveltekit", name: "SvelteKit" },
58
+ { href: "/docs/frameworks/backend/nitro", name: "Nitro" },
59
+ { href: "/solutions/turborepo", name: "Turborepo" },
60
+ {
61
+ href: "/docs/frameworks/full-stack/tanstack-start",
62
+ name: "Tanstack Start",
63
+ },
64
+ { href: "/docs/frameworks/backend/fastapi", name: "FastAPI" },
65
+ { href: "/docs/frameworks/backend/xmcp", name: "xmcp" },
66
+ { href: "/docs/frameworks", name: "All frameworks" },
67
+ ],
68
+ },
69
+ {
70
+ title: "SDKs",
71
+ items: [
72
+ { href: "/docs/rest-api/sdk", name: "Vercel SDK" },
73
+ { href: "/workflows", name: "Workflow SDK", badge: "New" },
74
+ { href: "/docs/flags/flags-sdk-reference", name: "Flags SDK" },
75
+ { href: "/chat", name: "Chat SDK", badge: "New" },
76
+ { href: "/docs/queues/sdk", name: "Queues SDK", badge: "New" },
77
+ { href: "https://streamdown.ai", name: "Streamdown", external: true },
78
+ ],
79
+ },
80
+ {
81
+ title: "Build",
82
+ items: [
83
+ { href: "/solutions/ai-apps", name: "AI Apps" },
84
+ { href: "/solutions/web-apps", name: "Web Apps" },
85
+ { href: "/solutions/marketing-sites", name: "Marketing Sites" },
86
+ { href: "/solutions/multi-tenant-saas", name: "Platforms" },
87
+ { href: "/solutions/composable-commerce", name: "Commerce" },
88
+ { href: "/solutions/platform-engineering", name: "Platform Engineers" },
89
+ { href: "/solutions/design-engineering", name: "Design Engineers" },
90
+ ],
91
+ },
92
+ {
93
+ title: "Learn",
94
+ items: [
95
+ { href: "/docs", name: "Docs" },
96
+ { href: "/blog", name: "Blog" },
97
+ { href: "/changelog", name: "Changelog" },
98
+ { href: "/kb", name: "Knowledge Base" },
99
+ { href: "/academy", name: "Academy" },
100
+ { href: "/i", name: "Articles" },
101
+ {
102
+ href: "https://community.vercel.com",
103
+ name: "Community",
104
+ external: true,
105
+ },
106
+ ],
107
+ },
108
+ {
109
+ title: "Explore",
110
+ items: [
111
+ { href: "/customers", name: "Customers" },
112
+ { href: "/marketplace", name: "Marketplace" },
113
+ { href: "/templates", name: "Templates" },
114
+ { href: "/partners/solution-partners", name: "Partner Finder" },
115
+ { href: "/partners/aws", name: "Vercel + AWS" },
116
+ ],
117
+ },
118
+ {
119
+ title: "Company",
120
+ items: [
121
+ { href: "/about", name: "About" },
122
+ { href: "/careers", name: "Careers" },
123
+ { href: "/press", name: "Press" },
124
+ { href: "/events", name: "Events" },
125
+ { href: "/startups", name: "Startups" },
126
+ { href: "/shipped", name: "Shipped on Vercel" },
127
+ { href: "/open-source-program", name: "Open Source Program" },
128
+ { href: "/enterprise", name: "Enterprise" },
129
+ { href: "/pricing", name: "Pricing" },
130
+ { href: "/help", name: "Help" },
131
+ ],
132
+ },
133
+ {
134
+ title: "Legal & Trust",
135
+ items: [
136
+ { href: "/legal/privacy-policy", name: "Privacy Policy" },
137
+ { href: "/legal/terms", name: "Terms of Service" },
138
+ { href: "/legal/cookie-policy", name: "Cookie Policy" },
139
+ { href: "/legal/dpa", name: "DPA" },
140
+ { href: "/legal/acceptable-use-policy", name: "Acceptable Use Policy" },
141
+ { href: "/legal", name: "Legal" },
142
+ {
143
+ href: "https://security.vercel.com",
144
+ name: "Trust Center",
145
+ external: true,
146
+ },
147
+ { href: "https://vercel-status.com", name: "Status", external: true },
148
+ ],
149
+ },
150
+ ];
151
+ const SOCIAL_LINKS = [
152
+ { href: "https://github.com/vercel", name: "GitHub", external: true },
153
+ { href: "https://x.com/vercel", name: "X", external: true },
154
+ {
155
+ href: "https://linkedin.com/company/vercel",
156
+ name: "LinkedIn",
157
+ external: true,
158
+ },
159
+ { href: "https://youtube.com/@VercelHQ", name: "YouTube", external: true },
160
+ {
161
+ href: "https://www.instagram.com/vercelhq/",
162
+ name: "Instagram",
163
+ external: true,
164
+ },
165
+ ];
166
+ const resolveHref = (item) => item.external || item.href.startsWith("http")
167
+ ? item.href
168
+ : `${VERCEL}${item.href}`;
169
+ const FooterGroup = ({ title, children, }) => (_jsxs("div", { children: [title ? (_jsx("h2", { className: "my-3 font-medium text-gray-1000 text-label-14", children: title })) : null, _jsx("ul", { className: "m-0 list-none p-0", children: children })] }));
170
+ const FooterLink = ({ badge, children, external, href, }) => (_jsx("li", { className: "py-0.5 leading-5", children: _jsxs("a", { className: "-ml-0.5 flex w-fit items-center gap-1.5 p-0.5 text-gray-800 transition-colors hover:text-gray-1000 motion-reduce:transition-none", href: href, rel: external ? "noopener" : undefined, target: external ? "_blank" : undefined, children: [children, badge ? (_jsx(Badge, { className: "h-5 bg-gray-200 px-2 text-[11px]/[20px] tabular-nums tracking-[0.2px]", variant: "secondary", children: badge })) : null] }) }));
171
+ export const Footer = () => (_jsxs("footer", { className: "mx-auto max-w-[1448px] px-6 pt-10 pb-6 text-sm", children: [_jsxs("div", { className: cn("grid grid-cols-2 gap-6 md:grid-cols-3 lg:grid-cols-4 lg:gap-y-7 xl:grid-cols-6"), children: [FOOTER_GROUPS.map((group) => (_jsx(FooterGroup, { title: group.title, children: group.items.map((item) => (_jsx(FooterLink, { badge: item.badge, external: item.external, href: resolveHref(item), children: item.name }, item.href + item.name))) }, group.title))), _jsx(FooterGroup, { title: "Social", children: SOCIAL_LINKS.map((item) => (_jsx(FooterLink, { external: item.external, href: item.href, children: item.name }, item.name))) })] }), _jsxs("div", { className: "mt-10 flex items-center justify-between", children: [_jsx("a", { "aria-label": "Vercel", className: "inline-flex text-gray-1000", href: `${VERCEL}/home`, rel: "noopener", target: "_blank", children: _jsx(LogoIconVercel, { size: 16 }) }), _jsx(ThemeSwitcher, { small: true })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/mobile-menu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQhF,UAAU,eAAe;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,EAAE,gBAAgB,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA2KD,eAAO,MAAM,UAAU,GAAI,0DAMxB,eAAe,4CAsHjB,CAAC"}
1
+ {"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/mobile-menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQhF,UAAU,eAAe;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,EAAE,gBAAgB,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAC1C,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA2KD,eAAO,MAAM,UAAU,GAAI,0DAMxB,eAAe,4CA0HjB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from "react";
4
4
  import { IconChevronDownSmall } from "../../assets/icons/icon-chevron-down-small";
5
+ import { ThemeSwitcher } from "../../components/theme-switcher";
5
6
  import { SearchButton } from "../../controls";
6
7
  import { cn } from "../cn";
7
8
  import { ExternalArrow } from "../external-arrow";
@@ -98,5 +99,5 @@ export const MobileMenu = ({ activeProduct, githubUrl, nav, ossProducts, showOss
98
99
  ? "pointer-events-auto opacity-100"
99
100
  : "pointer-events-none opacity-0"), onClick: close }), _jsxs("div", { className: cn("fixed inset-x-0 top-16 bottom-0 z-40 @min-[1024px]:hidden overflow-y-auto bg-background-200 px-2 transition-all duration-200", show
100
101
  ? "translate-y-0 opacity-100"
101
- : "pointer-events-none -translate-y-2 opacity-0"), children: [_jsx("div", { className: "p-4", children: _jsx(SearchButton, { className: "w-full py-4.5", onClick: close }) }), _jsxs("nav", { className: "flex flex-col px-1", children: [nav.map(({ label, href }) => (_jsx(NavLink, { active: isActive(href), external: href.startsWith("http"), href: href, onClick: close, children: label }, href))), githubUrl ? (_jsx(NavLink, { external: true, href: githubUrl, onClick: close, children: "GitHub" })) : null, _jsx(OssCollapsible, { onLinkClick: close, sections: ossSections })] })] })] }));
102
+ : "pointer-events-none -translate-y-2 opacity-0"), children: [_jsx("div", { className: "p-4", children: _jsx(SearchButton, { className: "w-full py-4.5", onClick: close }) }), _jsxs("nav", { className: "flex flex-col px-1", children: [nav.map(({ label, href }) => (_jsx(NavLink, { active: isActive(href), external: href.startsWith("http"), href: href, onClick: close, children: label }, href))), githubUrl ? (_jsx(NavLink, { external: true, href: githubUrl, onClick: close, children: "GitHub" })) : null, _jsx(OssCollapsible, { onLinkClick: close, sections: ossSections })] }), _jsx("div", { className: "mt-2 flex justify-end px-4 py-4", children: _jsx(ThemeSwitcher, { small: true }) })] })] }));
102
103
  };
@@ -147,7 +147,7 @@ export function NavbarLogo({ className, href = "/", ...props }) {
147
147
  router.prefetch(href);
148
148
  }
149
149
  }, [isOss, router, href]);
150
- return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(Link, { className: "relative flex items-center text-gray-1000 outline-none before:absolute before:-inset-x-1 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", href: isOss ? "https://vercel.com/oss" : "https://vercel.com/", rel: "noopener", target: "_blank", children: isOss ? (_jsxs(_Fragment, { children: [_jsx(LogoIconVercel, { className: "@min-[640px]:hidden", size: 20 }), _jsx(LogoVercelOss, { className: "@min-[640px]:block hidden", size: 18 })] })) : (_jsx(LogoIconVercel, { size: 20 })) }), _jsx("div", { className: "w-4 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, {}) }), isOss ? (_jsxs(_Fragment, { children: [_jsx(Link, { className: "flex @min-[1024px]:hidden items-center text-gray-1000", href: href, children: props.logo }), _jsxs("div", { className: "@min-[1024px]:contents hidden", children: [_jsx(NavigationMenu, { delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: "h-16 items-stretch", children: _jsxs(NavigationMenuItem, { className: "flex h-full items-center", children: [_jsx(NavigationMenuTrigger, { className: "relative -mx-3 flex h-full items-center gap-1.5 px-3 text-gray-1000 outline-none before:absolute before:inset-x-0 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", onClick: (e) => {
150
+ return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(Link, { className: "-mx-2 flex items-center rounded-md p-2 text-gray-1000 outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-inset", href: isOss ? "https://vercel.com/oss" : "https://vercel.com/", rel: "noopener", target: "_blank", children: isOss ? (_jsxs(_Fragment, { children: [_jsx(LogoIconVercel, { className: "@min-[640px]:hidden", size: 18 }), _jsx(LogoVercelOss, { className: "@min-[640px]:block hidden", size: 18 })] })) : (_jsx(LogoIconVercel, { size: 18 })) }), _jsx("div", { className: "w-4 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, {}) }), isOss ? (_jsxs(_Fragment, { children: [_jsx(Link, { className: "flex @min-[1024px]:hidden items-center text-gray-1000", href: href, children: props.logo }), _jsxs("div", { className: "@min-[1024px]:contents hidden", children: [_jsx(NavigationMenu, { delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: "h-16 items-stretch", children: _jsxs(NavigationMenuItem, { className: "flex h-full items-center", children: [_jsx(NavigationMenuTrigger, { className: "relative -mx-3 flex h-full items-center gap-1.5 px-3 text-gray-1000 outline-none before:absolute before:inset-x-0 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", onClick: (e) => {
151
151
  if (e.detail !== 0) {
152
152
  router.push(href);
153
153
  }
@@ -0,0 +1,5 @@
1
+ import { type ReactNode } from "react";
2
+ export declare const NavbarShell: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=navbar-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navbar-shell.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/navbar-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAM5D,eAAO,MAAM,WAAW,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAqBhE,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { cn } from "../cn";
5
+ // Sticky navbar shell that reveals its bottom divider (a box-shadow, so it
6
+ // doesn't consume the 64px content row) only once the page is scrolled —
7
+ // matching the vercel.com header.
8
+ export const NavbarShell = ({ children }) => {
9
+ const [scrolled, setScrolled] = useState(false);
10
+ useEffect(() => {
11
+ const onScroll = () => setScrolled(window.scrollY > 0);
12
+ onScroll();
13
+ window.addEventListener("scroll", onScroll, { passive: true });
14
+ return () => window.removeEventListener("scroll", onScroll);
15
+ }, []);
16
+ return (_jsx("header", { className: cn("sticky top-0 z-40 flex h-16 justify-center bg-background-200 transition-shadow motion-reduce:transition-none", scrolled && "shadow-[0_1px_0_0_var(--ds-gray-alpha-400)]"), "data-scrolled": scrolled ? "" : undefined, children: children }));
17
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,KAAK,GACL,qBAAqB,GACrB,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CAkE7C,CAAC"}
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,KAAK,GACL,qBAAqB,GACrB,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CAkE7C,CAAC"}
package/dist/navbar.js CHANGED
@@ -4,6 +4,7 @@ import { GitHubButton, getGithubRepoUrl } from "./internal/github-button";
4
4
  import { DesktopMenu } from "./internal/navbar/desktop-menu";
5
5
  import { MobileMenu } from "./internal/navbar/mobile-menu";
6
6
  import { NavbarLogo } from "./internal/navbar/navbar-logo";
7
+ import { NavbarShell } from "./internal/navbar/navbar-shell";
7
8
  const SEARCH_BUTTON_CLASSES = "group hidden h-10 justify-between pr-1.5 text-gray-900 shadow-none @min-[1024px]:flex @min-[1024px]:h-8 @min-[1024px]:w-[150px] [&_[data-slot=kbd]]:transition-colors group-hover:[&_[data-slot=kbd]]:text-gray-1000";
8
9
  export const Navbar = ({ config }) => {
9
10
  const nav = config.nav ?? [];
@@ -15,5 +16,5 @@ export const Navbar = ({ config }) => {
15
16
  // resolved and filtered inside the client menus below. Pass the raw custom
16
17
  // list (if any) and the active product down; each menu drops the active one.
17
18
  const activeProduct = config.navbarActiveProduct;
18
- return (_jsx("header", { className: "sticky top-0 z-40 flex h-16 justify-center border-b bg-background-200", children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [isOss ? (_jsx(NavbarLogo, { activeProduct: activeProduct, className: "ml-4", logo: config.logo, ossProducts: config.navbarOssProducts, variant: "oss" })) : (_jsx(NavbarLogo, { className: "ml-4", logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: SEARCH_BUTTON_CLASSES }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0 shadow-none", size: "sm", variant: "outline" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden shadow-none", size: "sm", variant: "outline" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { activeProduct: activeProduct, githubUrl: githubUrl, nav: nav, ossProducts: config.navbarOssProducts, showOss: isOss })] })] }) }));
19
+ return (_jsx(NavbarShell, { children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [isOss ? (_jsx(NavbarLogo, { activeProduct: activeProduct, className: "ml-4", logo: config.logo, ossProducts: config.navbarOssProducts, variant: "oss" })) : (_jsx(NavbarLogo, { className: "ml-4", logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: SEARCH_BUTTON_CLASSES }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0 shadow-none", size: "sm", variant: "outline" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden shadow-none", size: "sm", variant: "outline" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { activeProduct: activeProduct, githubUrl: githubUrl, nav: nav, ossProducts: config.navbarOssProducts, showOss: isOss })] })] }) }));
19
20
  };
package/docs/agents.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Docs
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.15.5 so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 1.16.0 so agents can understand the installed package without web access.
4
4
  They are generated from `apps/template/content/docs` during the package build.
5
5
 
6
6
  ## How to use these files
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 1.15.5.
3
+ These docs are bundled with `@vercel/geistdocs` 1.16.0.
4
4
  They describe how to build package-backed Geistdocs sites and how to use the package APIs from generated project adapters.
5
5
 
6
6
  ## Documentation Index
@@ -208,5 +208,5 @@
208
208
  }
209
209
  ],
210
210
  "source": "apps/template/content/docs",
211
- "version": "1.15.5"
211
+ "version": "1.16.0"
212
212
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vercel/geistdocs",
3
3
  "description": "Runtime and CLI for Geistdocs projects.",
4
- "version": "1.15.5",
4
+ "version": "1.16.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -219,6 +219,10 @@
219
219
  "types": "./dist/components/switch.d.ts",
220
220
  "default": "./dist/components/switch.js"
221
221
  },
222
+ "./components/theme-switcher": {
223
+ "types": "./dist/components/theme-switcher.d.ts",
224
+ "default": "./dist/components/theme-switcher.js"
225
+ },
222
226
  "./components/textarea": {
223
227
  "types": "./dist/components/textarea.d.ts",
224
228
  "default": "./dist/components/textarea.js"
@@ -19,7 +19,7 @@ const Layout = async ({ children, params }: LayoutProps<"/[lang]">) => {
19
19
  <GeistdocsProvider basePath={config.basePath} lang={lang}>
20
20
  <Navbar config={config} />
21
21
  {children}
22
- <Footer config={config} />
22
+ <Footer />
23
23
  </GeistdocsProvider>
24
24
  </body>
25
25
  </html>
@@ -14,6 +14,13 @@
14
14
  body {
15
15
  @apply bg-background-200 text-gray-1000;
16
16
  }
17
+
18
+ /* Geist Sans is loaded from the `geist` npm package, which exposes the
19
+ `--font-geist-sans` variable. Alias it so `font-sans`/`--font-sans`
20
+ resolves to it. */
21
+ :root {
22
+ --font-sans: var(--font-geist-sans);
23
+ }
17
24
  }
18
25
 
19
26
  /* Align docs content with navbar on mobile */
@@ -1,14 +1,11 @@
1
- import {
2
- Geist_Mono as createMono,
3
- Geist as createSans,
4
- } from "next/font/google";
1
+ import { GeistSans } from "geist/font/sans";
2
+ import { Geist_Mono as createMono } from "next/font/google";
5
3
 
6
- export const sans = createSans({
7
- variable: "--font-sans",
8
- subsets: ["latin"],
9
- weight: "variable",
10
- display: "swap",
11
- });
4
+ // Geist Sans is loaded from the `geist` npm package (local woff2) rather than
5
+ // Google Fonts so the full font-feature-settings — e.g. the `ss11` alternate
6
+ // "I" enabled in the geistdocs theme — are available. The package hardcodes the
7
+ // `--font-geist-sans` variable; it's aliased to `--font-sans` in geistdocs.css.
8
+ export const sans = GeistSans;
12
9
 
13
10
  export const mono = createMono({
14
11
  variable: "--font-mono",
@@ -18,7 +18,7 @@
18
18
  "@streamdown/code": "^1.0.1",
19
19
  "@vercel/agent-readability": "^0.2.1",
20
20
  "@vercel/analytics": "^1.6.1",
21
- "@vercel/geistdocs": "1.15.5",
21
+ "@vercel/geistdocs": "1.16.0",
22
22
  "@vercel/speed-insights": "^1.3.1",
23
23
  "ai": "^6.0.132",
24
24
  "class-variance-authority": "^0.7.1",
@@ -30,6 +30,7 @@
30
30
  "fumadocs-core": "16.2.2",
31
31
  "fumadocs-mdx": "14.0.4",
32
32
  "fumadocs-ui": "16.2.2",
33
+ "geist": "^1.7.1",
33
34
  "jotai": "^2.15.2",
34
35
  "lucide-react": "^0.555.0",
35
36
  "mermaid": "^11.12.2",
package/theme.css CHANGED
@@ -486,6 +486,10 @@
486
486
  }
487
487
 
488
488
  html {
489
+ font-feature-settings:
490
+ "rlig" 1,
491
+ "calt" 0,
492
+ "ss11" 1;
489
493
  text-rendering: optimizelegibility;
490
494
  }
491
495