@vercel/geistdocs 1.15.4 → 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 (70) 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/code-block.js +1 -1
  24. package/dist/components/dialog.js +1 -1
  25. package/dist/components/theme-switcher.d.ts +8 -0
  26. package/dist/components/theme-switcher.d.ts.map +1 -0
  27. package/dist/components/theme-switcher.js +37 -0
  28. package/dist/config.d.ts +4 -0
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/controls.js +1 -1
  31. package/dist/footer.d.ts +1 -7
  32. package/dist/footer.d.ts.map +1 -1
  33. package/dist/footer.js +170 -5
  34. package/dist/internal/navbar/mobile-menu.d.ts +4 -1
  35. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  36. package/dist/internal/navbar/mobile-menu.js +12 -6
  37. package/dist/internal/navbar/navbar-logo.d.ts +8 -0
  38. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -1
  39. package/dist/internal/navbar/navbar-logo.js +86 -14
  40. package/dist/internal/navbar/navbar-shell.d.ts +5 -0
  41. package/dist/internal/navbar/navbar-shell.d.ts.map +1 -0
  42. package/dist/internal/navbar/navbar-shell.js +17 -0
  43. package/dist/internal/page-actions-client.d.ts +7 -1
  44. package/dist/internal/page-actions-client.d.ts.map +1 -1
  45. package/dist/internal/page-actions-client.js +35 -16
  46. package/dist/internal/search.d.ts.map +1 -1
  47. package/dist/internal/search.js +1 -1
  48. package/dist/internal/sidebar.d.ts.map +1 -1
  49. package/dist/internal/sidebar.js +1 -1
  50. package/dist/internal/ui/drawer.js +1 -1
  51. package/dist/internal/ui/sheet.d.ts +4 -1
  52. package/dist/internal/ui/sheet.d.ts.map +1 -1
  53. package/dist/internal/ui/sheet.js +2 -2
  54. package/dist/mobile-docs-bar.d.ts.map +1 -1
  55. package/dist/mobile-docs-bar.js +22 -3
  56. package/dist/navbar.d.ts +1 -1
  57. package/dist/navbar.d.ts.map +1 -1
  58. package/dist/navbar.js +8 -5
  59. package/dist/pages/docs.d.ts.map +1 -1
  60. package/dist/pages/docs.js +6 -2
  61. package/docs/agents.md +1 -1
  62. package/docs/llms.txt +1 -1
  63. package/docs/manifest.json +1 -1
  64. package/package.json +8 -3
  65. package/template/app/[lang]/layout.tsx +1 -1
  66. package/template/app/styles/geistdocs.css +7 -0
  67. package/template/lib/geistdocs/fonts.ts +7 -10
  68. package/template/next.config.ts +13 -0
  69. package/template/package.json +3 -2
  70. package/theme.css +22 -31
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.4.
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.4"
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.4",
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"
@@ -274,7 +278,7 @@
274
278
  "mermaid": "^11.12.2",
275
279
  "motion": "^12.23.25",
276
280
  "next-themes": "^0.4.6",
277
- "radix-ui": "latest",
281
+ "radix-ui": "1.6.4",
278
282
  "react-player": "^3.4.0",
279
283
  "sonner": "^2.0.7",
280
284
  "streamdown": "^2.1.0",
@@ -305,6 +309,7 @@
305
309
  "typescript": "^5.9.3"
306
310
  },
307
311
  "scripts": {
308
- "build": "rm -rf dist docs template && node ./scripts/bundle-template.mjs && node ./scripts/bundle-docs.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts"
312
+ "build": "rm -rf dist docs template && node ./scripts/bundle-template.mjs && node ./scripts/bundle-docs.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts",
313
+ "dev": "tsc -p tsconfig.runtime.json --watch --preserveWatchOutput"
309
314
  }
310
315
  }
@@ -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",
@@ -1,8 +1,19 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join } from "node:path";
1
3
  import { createMDX } from "fumadocs-mdx/next";
2
4
  import type { NextConfig } from "next";
3
5
 
4
6
  const withMDX = createMDX();
5
7
 
8
+ // In this monorepo, compile @vercel/geistdocs from its workspace source so edits
9
+ // to the package hot-reload in the running dev server (no rebuild/restart).
10
+ // Turbopack only watches packages listed here; without it, changes to the
11
+ // prebuilt dist in node_modules are ignored. Published/scaffolded installs have
12
+ // no workspace source, so this is skipped and the prebuilt dist is used as-is.
13
+ const inMonorepo = existsSync(
14
+ join(process.cwd(), "../../packages/geistdocs/src")
15
+ );
16
+
6
17
  // Distinct favicon per environment; production keeps the default (no-op).
7
18
  const ENV_FAVICONS = {
8
19
  development: "/favicon.development.ico",
@@ -13,6 +24,8 @@ const environment = process.env.VERCEL_ENV ?? process.env.NODE_ENV;
13
24
  const envFavicon = ENV_FAVICONS[environment as keyof typeof ENV_FAVICONS];
14
25
 
15
26
  const config: NextConfig = {
27
+ ...(inMonorepo ? { transpilePackages: ["@vercel/geistdocs"] } : {}),
28
+
16
29
  experimental: {
17
30
  turbopackFileSystemCacheForDev: true,
18
31
  },
@@ -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.4",
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",
@@ -37,7 +38,7 @@
37
38
  "nanoid": "^5.1.6",
38
39
  "next": "16.2.6",
39
40
  "next-themes": "^0.4.6",
40
- "radix-ui": "latest",
41
+ "radix-ui": "1.6.4",
41
42
  "react": "^19.2.3",
42
43
  "react-dom": "^19.2.3",
43
44
  "react-player": "^3.4.0",
package/theme.css CHANGED
@@ -20,6 +20,11 @@
20
20
  `./dist` resolves next to this file in both the workspace and an install. */
21
21
  @source "./dist/**/*.js";
22
22
 
23
+ /* Monorepo dev only: also scan the package's TypeScript source so new Tailwind
24
+ classes hot-reload without rebuilding `dist`. `./src` exists only in the
25
+ workspace; a published install has no `src`, so Tailwind ignores it. */
26
+ @source "./src/**/*.{ts,tsx}";
27
+
23
28
  @custom-variant dark (&:is(.dark *));
24
29
 
25
30
  @theme inline {
@@ -481,6 +486,10 @@
481
486
  }
482
487
 
483
488
  html {
489
+ font-feature-settings:
490
+ "rlig" 1,
491
+ "calt" 0,
492
+ "ss11" 1;
484
493
  text-rendering: optimizelegibility;
485
494
  }
486
495
 
@@ -861,6 +870,12 @@
861
870
  }
862
871
  }
863
872
 
873
+ /* fumadocs hardcodes the search dialog's className, so the command modal
874
+ shadow is applied here via the data attribute set in search.tsx. */
875
+ [data-geistdocs-command-modal] {
876
+ box-shadow: var(--ds-shadow-modal);
877
+ }
878
+
864
879
  [data-geistdocs-mobile-sidebar] [data-slot="sheet-header"] {
865
880
  height: calc(4rem + env(safe-area-inset-top));
866
881
  padding-top: env(safe-area-inset-top);
@@ -879,41 +894,17 @@
879
894
  right: max(1rem, env(safe-area-inset-right));
880
895
  }
881
896
 
882
- [data-geistdocs-mobile-toc] [data-slot="sheet-close"] {
883
- top: calc(1rem + env(safe-area-inset-top));
884
- right: max(1rem, env(safe-area-inset-right));
885
- }
886
-
887
- [data-geistdocs-mobile-toc] [data-slot="sheet-header"] {
888
- padding-top: max(1rem, env(safe-area-inset-top));
889
- padding-right: max(1rem, env(safe-area-inset-right));
890
- padding-left: max(1rem, env(safe-area-inset-left));
891
- }
892
-
893
- [data-geistdocs-mobile-toc] nav {
894
- padding-right: max(1rem, env(safe-area-inset-right));
895
- padding-bottom: max(1rem, env(safe-area-inset-bottom));
896
- padding-left: max(1rem, env(safe-area-inset-left));
897
- }
898
-
899
- /* Show a slim scrollbar on long tables of contents. `scrollbar-width: auto`
900
- overrides the component's `scrollbar-width: none`, which would otherwise
901
- suppress the WebKit styling below too. */
897
+ /* Keep the table of contents scrollbar hidden on every platform. The
898
+ mask-gradient fade on the scroll area already signals that the list scrolls,
899
+ so a visible bar only adds clutter. `scrollbar-width: none` covers Firefox
900
+ (and non-overlay contexts); the WebKit rule covers Chrome/Safari on platforms
901
+ that render classic, space-consuming scrollbars. */
902
902
  #nd-toc .geistdocs-toc-scroll {
903
- scrollbar-width: auto;
903
+ scrollbar-width: none;
904
904
  }
905
905
 
906
906
  #nd-toc .geistdocs-toc-scroll::-webkit-scrollbar {
907
- width: 6px;
908
- }
909
-
910
- #nd-toc .geistdocs-toc-scroll::-webkit-scrollbar-thumb {
911
- background-color: var(--color-gray-alpha-500);
912
- border-radius: 9999px;
913
- }
914
-
915
- #nd-toc .geistdocs-toc-scroll::-webkit-scrollbar-thumb:hover {
916
- background-color: var(--color-gray-alpha-600);
907
+ display: none;
917
908
  }
918
909
 
919
910
  [data-mobile-docs-bar] {