@vercel/geistdocs 2.13.1 → 2.14.0-canary.fbbc4b6

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 (68) hide show
  1. package/dist/assets/icons/icon-brain.d.ts +26 -0
  2. package/dist/assets/icons/icon-brain.d.ts.map +1 -0
  3. package/dist/assets/icons/icon-brain.js +25 -0
  4. package/dist/assets/icons/icon-buildings.d.ts +26 -0
  5. package/dist/assets/icons/icon-buildings.d.ts.map +1 -0
  6. package/dist/assets/icons/icon-buildings.js +25 -0
  7. package/dist/assets/icons/icon-chart-activity.d.ts +26 -0
  8. package/dist/assets/icons/icon-chart-activity.d.ts.map +1 -0
  9. package/dist/assets/icons/icon-chart-activity.js +25 -0
  10. package/dist/assets/icons/icon-code.d.ts +26 -0
  11. package/dist/assets/icons/icon-code.d.ts.map +1 -0
  12. package/dist/assets/icons/icon-code.js +25 -0
  13. package/dist/assets/icons/icon-git-merge.d.ts +26 -0
  14. package/dist/assets/icons/icon-git-merge.d.ts.map +1 -0
  15. package/dist/assets/icons/icon-git-merge.js +25 -0
  16. package/dist/assets/icons/icon-git-pull-request.d.ts +26 -0
  17. package/dist/assets/icons/icon-git-pull-request.d.ts.map +1 -0
  18. package/dist/assets/icons/icon-git-pull-request.js +25 -0
  19. package/dist/assets/icons/icon-headset.d.ts +26 -0
  20. package/dist/assets/icons/icon-headset.d.ts.map +1 -0
  21. package/dist/assets/icons/icon-headset.js +25 -0
  22. package/dist/assets/icons/icon-magnifying-glass.d.ts +26 -0
  23. package/dist/assets/icons/icon-magnifying-glass.d.ts.map +1 -0
  24. package/dist/assets/icons/icon-magnifying-glass.js +25 -0
  25. package/dist/assets/icons/icon-target.d.ts +26 -0
  26. package/dist/assets/icons/icon-target.d.ts.map +1 -0
  27. package/dist/assets/icons/icon-target.js +26 -0
  28. package/dist/assets/icons/icon-warning.d.ts +26 -0
  29. package/dist/assets/icons/icon-warning.d.ts.map +1 -0
  30. package/dist/assets/icons/icon-warning.js +25 -0
  31. package/dist/assets/icons/index.d.ts +10 -0
  32. package/dist/assets/icons/index.d.ts.map +1 -1
  33. package/dist/assets/icons/index.js +10 -0
  34. package/dist/assets/logos/index.d.ts +1 -0
  35. package/dist/assets/logos/index.d.ts.map +1 -1
  36. package/dist/assets/logos/index.js +1 -0
  37. package/dist/assets/logos/logo-icon-microsoft-teams-svg.d.ts +4 -0
  38. package/dist/assets/logos/logo-icon-microsoft-teams-svg.d.ts.map +1 -0
  39. package/dist/assets/logos/logo-icon-microsoft-teams-svg.js +12 -0
  40. package/dist/cli/index.js +1 -1
  41. package/dist/internal/chat/loading-skeleton.d.ts.map +1 -1
  42. package/dist/internal/chat/loading-skeleton.js +1 -3
  43. package/dist/internal/chat/prompt-input.js +1 -1
  44. package/dist/internal/chat/shell.d.ts.map +1 -1
  45. package/dist/internal/chat/shell.js +6 -7
  46. package/dist/internal/navbar/desktop-menu.d.ts.map +1 -1
  47. package/dist/internal/navbar/desktop-menu.js +4 -4
  48. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  49. package/dist/internal/navbar/mobile-menu.js +4 -4
  50. package/dist/internal/navbar/use-nav-active.d.ts +12 -5
  51. package/dist/internal/navbar/use-nav-active.d.ts.map +1 -1
  52. package/dist/internal/navbar/use-nav-active.js +30 -14
  53. package/dist/internal/sidebar.d.ts +3 -1
  54. package/dist/internal/sidebar.d.ts.map +1 -1
  55. package/dist/internal/sidebar.js +8 -8
  56. package/dist/layout.d.ts +7 -1
  57. package/dist/layout.d.ts.map +1 -1
  58. package/dist/layout.js +2 -2
  59. package/dist/providers/public/components/drawer.d.ts +2 -1
  60. package/dist/providers/public/components/drawer.d.ts.map +1 -1
  61. package/dist/providers/public/components/drawer.js +2 -2
  62. package/docs/agents.md +1 -1
  63. package/docs/llms.txt +2 -2
  64. package/docs/manifest.json +1 -1
  65. package/docs/pages/ask-ai.md +1 -1
  66. package/package.json +6 -6
  67. package/template/content/docs/ask-ai.mdx +1 -1
  68. package/template/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/icons/index.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AAGrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,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Y,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -13,6 +13,9 @@ export { IconArrowUpRightSmall } from "./icon-arrow-up-right-small";
13
13
  export { IconBell } from "./icon-bell";
14
14
  export { IconBookmark } from "./icon-bookmark";
15
15
  export { IconBox } from "./icon-box";
16
+ export { IconBrain } from "./icon-brain";
17
+ export { IconBuildings } from "./icon-buildings";
18
+ export { IconChartActivity } from "./icon-chart-activity";
16
19
  export { IconCheck } from "./icon-check";
17
20
  export { IconCheckCircleFill } from "./icon-check-circle-fill";
18
21
  export { IconChevronDoubleRight } from "./icon-chevron-double-right";
@@ -25,6 +28,7 @@ export { IconChevronUp } from "./icon-chevron-up";
25
28
  export { IconChevronUpDown } from "./icon-chevron-up-down";
26
29
  export { IconCircle } from "./icon-circle";
27
30
  export { IconClock } from "./icon-clock";
31
+ export { IconCode } from "./icon-code";
28
32
  export { IconCopy } from "./icon-copy";
29
33
  export { IconCreditCard } from "./icon-credit-card";
30
34
  export { IconCross } from "./icon-cross";
@@ -39,12 +43,16 @@ export { IconFolderOpen } from "./icon-folder-open";
39
43
  export { IconForward10Seconds10 } from "./icon-forward-10-seconds-10";
40
44
  export { IconFullscreen } from "./icon-fullscreen";
41
45
  export { IconFullscreenClose } from "./icon-fullscreen-close";
46
+ export { IconGitMerge } from "./icon-git-merge";
47
+ export { IconGitPullRequest } from "./icon-git-pull-request";
48
+ export { IconHeadset } from "./icon-headset";
42
49
  export { IconInformation } from "./icon-information";
43
50
  export { IconLanguages } from "./icon-languages";
44
51
  export { IconLink } from "./icon-link";
45
52
  export { IconLinked } from "./icon-linked";
46
53
  export { IconLocation } from "./icon-location";
47
54
  export { IconLogs } from "./icon-logs";
55
+ export { IconMagnifyingGlass } from "./icon-magnifying-glass";
48
56
  export { IconMenuAlt } from "./icon-menu-alt";
49
57
  export { IconMessage } from "./icon-message";
50
58
  export { IconMoon } from "./icon-moon";
@@ -67,11 +75,13 @@ export { IconSpeakerVolumeLoud } from "./icon-speaker-volume-loud";
67
75
  export { IconStopCircle } from "./icon-stop-circle";
68
76
  export { IconSun } from "./icon-sun";
69
77
  export { IconSunSmall } from "./icon-sun-small";
78
+ export { IconTarget } from "./icon-target";
70
79
  export { IconTerminal } from "./icon-terminal";
71
80
  export { IconThumbDown } from "./icon-thumb-down";
72
81
  export { IconThumbUp } from "./icon-thumb-up";
73
82
  export { IconToggleOn } from "./icon-toggle-on";
74
83
  export { IconTrash } from "./icon-trash";
75
84
  export { IconUser } from "./icon-user";
85
+ export { IconWarning } from "./icon-warning";
76
86
  export { IconWorkflow } from "./icon-workflow";
77
87
  export { IconWrench } from "./icon-wrench";
@@ -12,6 +12,7 @@ export { LogoIconGithubSvg, LogoIconGithubSvg as LogoIconGithub, } from "./logo-
12
12
  export { LogoIconGoogleSvg, LogoIconGoogleSvg as LogoIconGoogle, } from "./logo-icon-google-svg";
13
13
  export { LogoIconGrokSvg, LogoIconGrokSvg as LogoIconGrok, } from "./logo-icon-grok-svg";
14
14
  export { LogoIconMetaSvg, LogoIconMetaSvg as LogoIconMeta, } from "./logo-icon-meta-svg";
15
+ export { LogoIconMicrosoftTeamsSvg, LogoIconMicrosoftTeamsSvg as LogoIconMicrosoftTeams, } from "./logo-icon-microsoft-teams-svg";
15
16
  export { LogoIconMistralSvg, LogoIconMistralSvg as LogoIconMistral, } from "./logo-icon-mistral-svg";
16
17
  export { LogoIconMoonshotSvg, LogoIconMoonshotSvg as LogoIconMoonshot, } from "./logo-icon-moonshot-svg";
17
18
  export { LogoIconNuxtSvg, LogoIconNuxtSvg as LogoIconNuxt, } from "./logo-icon-nuxt-svg";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/index.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AAGrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,eAAe,GACtC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,IAAI,iBAAiB,GAC1C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mBA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,cAAc,EACd,cAAc,IAAI,WAAW,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,cAAc,IAAI,WAAW,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -13,6 +13,7 @@ export { LogoIconGithubSvg, LogoIconGithubSvg as LogoIconGithub, } from "./logo-
13
13
  export { LogoIconGoogleSvg, LogoIconGoogleSvg as LogoIconGoogle, } from "./logo-icon-google-svg";
14
14
  export { LogoIconGrokSvg, LogoIconGrokSvg as LogoIconGrok, } from "./logo-icon-grok-svg";
15
15
  export { LogoIconMetaSvg, LogoIconMetaSvg as LogoIconMeta, } from "./logo-icon-meta-svg";
16
+ export { LogoIconMicrosoftTeamsSvg, LogoIconMicrosoftTeamsSvg as LogoIconMicrosoftTeams, } from "./logo-icon-microsoft-teams-svg";
16
17
  export { LogoIconMistralSvg, LogoIconMistralSvg as LogoIconMistral, } from "./logo-icon-mistral-svg";
17
18
  export { LogoIconMoonshotSvg, LogoIconMoonshotSvg as LogoIconMoonshot, } from "./logo-icon-moonshot-svg";
18
19
  export { LogoIconNuxtSvg, LogoIconNuxtSvg as LogoIconNuxt, } from "./logo-icon-nuxt-svg";
@@ -0,0 +1,4 @@
1
+ import type { JSX } from "react";
2
+ import { type IconProps } from "../_internal/components/icon/base-icon.js";
3
+ export declare function LogoIconMicrosoftTeamsSvg(props: IconProps): JSX.Element;
4
+ //# sourceMappingURL=logo-icon-microsoft-teams-svg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo-icon-microsoft-teams-svg.d.ts","sourceRoot":"","sources":["../../../src/assets/logos/logo-icon-microsoft-teams-svg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,2CAA2C,CAAC;AAGnD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAMvE"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BaseIcon, } from "../_internal/components/icon/base-icon.js";
3
+ // Copied from Geistcn assets 2.1.0.
4
+ export function LogoIconMicrosoftTeamsSvg(props) {
5
+ return (_jsx(BaseIcon, { "$generated": GENERATED_CONFIG, ...props, children: ICON_PATHS }));
6
+ }
7
+ const GENERATED_CONFIG = {
8
+ height: 16,
9
+ aspectRatio: 1,
10
+ viewBox: "0 0 16 16",
11
+ };
12
+ const ICON_PATHS = (_jsx("g", { children: _jsx("path", { d: "M11.97 6.18a.7.7 0 0 1 .68.72v4.5q0 .24-.04.46a4.2 4.2 0 0 1-4.05 3.62 4.2 4.2 0 0 1-3.67-2.34H7.5c.93 0 1.69-.76 1.69-1.69V6.18zm3.32 0c.4 0 .71.32.71.7v3.77a2.6 2.6 0 0 1-2.6 2.6h-.13q.4-.96.38-2.06v-4.3q0-.38-.15-.7zM7.5 3.95a.7.7 0 0 1 .69.68v6.82a1 1 0 0 1-.1.36l-.03.04-.16.16-.04.02-.06.04-.05.02-.08.02-.17.03H.68a.7.7 0 0 1-.68-.69V4.63c0-.38.3-.68.68-.68zm-5.2 2.6h1.36v3.7h.86v-3.7H5.9v-.73h-3.6zm11.65-4.46a1.67 1.67 0 1 1 0 3.35 1.67 1.67 0 0 1 0-3.35M8.75.6a2.42 2.42 0 0 1 .44 4.8v-.77c0-.93-.76-1.68-1.69-1.68H6.33A2.4 2.4 0 0 1 8.74.6", fill: "currentColor" }) }));
package/dist/cli/index.js CHANGED
@@ -4,4 +4,4 @@ import{Option as Rn,program as A}from"commander";import{access as Ke,copyFile as
4
4
  `);throw new AggregateError(i,`Mixedbread search sync did not complete:
5
5
  ${a}`)}return r},Ft=async({client:e,file:t,pollIntervalMs:n,pollTimeoutMs:r,sleep:i})=>{let s=t,o=Date.now()+r;for(;s.status==="pending"||s.status==="in_progress";){if(Date.now()>=o)throw new Error(`Mixedbread timed out while indexing file ${t.id}.`);await i(n),s=await e.retrieveStoreFile(t.id)}if(s.status!=="completed")throw new Error(`Mixedbread failed to index file ${t.id} (${s.status}).`);return s},Dt=async({client:e,desired:t,pollIntervalMs:n,pollTimeoutMs:r,sleep:i})=>{let s=await e.uploadFile({content:t.document.content,filename:`${U(t.document.id).slice(0,32)}.md`}),o;try{o=await e.createStoreFile({externalId:t.externalId,fileId:s,metadata:{...t.metadata,[g.rawFileId]:s}})}catch(a){try{await e.deleteFile(s)}catch(d){throw new AggregateError([a,d],`Mixedbread failed to attach and clean up raw file ${s}.`)}throw a}return Ft({client:e,file:o,pollIntervalMs:n,pollTimeoutMs:r,sleep:i})},Ie=async({client:e,concurrency:t=St,manifest:n,pollIntervalMs:r=_t,pollTimeoutMs:i=Tt,revision:s,revisionAncestors:o=[],revisionTimestamp:a,sleep:d=Rt})=>{let c=_e(n);if(c.provider!=="mixedbread")return{deleted:0,skipped:c.documents.length,uploaded:0};let u=c.siteId?.trim();if(!u)throw new Error("Mixedbread retrieval requires a non-empty siteId in geistdocs.tsx.");if(c.documents.length===0)throw new Error("The Geistdocs search export is empty. Refusing to remove indexed documents.");let l=c.documents.map(p=>At(p,u,s,o,a)),m=new Map(l.map(p=>[p.document.id,p])),h=(await be(e)).flatMap(p=>{let y=q(p.metadata);return y?.siteId===u?[{file:p,metadata:y}]:[]}),x=new Map,P=new Set;for(let p of h){W(p.metadata,s,a)&&P.add(p.metadata.documentId);let y=m.get(p.metadata.documentId);y&&p.metadata.contentHash===y.hash&&p.file.status==="completed"&&!x.has(p.metadata.documentId)&&x.set(p.metadata.documentId,p)}let _=l.filter(p=>!(x.has(p.document.id)||P.has(p.document.id)));await Ee(_,t,p=>Dt({client:e,desired:p,pollIntervalMs:r,pollTimeoutMs:i,sleep:d}));let b=(await be(e)).flatMap(p=>{let y=q(p.metadata);return y?.siteId===u?[{file:p,metadata:y}]:[]}),D=new Set(b.filter(({metadata:p})=>W(p,s,a)).map(({metadata:p})=>p.documentId)),ie=new Set;for(let p of l){if(D.has(p.document.id))continue;let ae=b.filter(({file:V,metadata:k})=>V.status==="completed"&&k.documentId===p.document.id&&k.contentHash===p.hash).sort((V,k)=>V.file.id.localeCompare(k.file.id))[0];ae&&ie.add(ae.file.id)}let oe=b.filter(({file:p,metadata:y})=>p.status!=="pending"&&p.status!=="in_progress"&&!W(y,s,a)&&Mt({currentRevision:s,currentRevisionAncestors:o,currentRevisionTimestamp:a,desired:m.get(y.documentId),metadata:y})&&!ie.has(p.id));return await Ee(oe,t,async({file:p,metadata:y})=>{await e.deleteFile(y.rawFileId??p.id),await e.deleteStoreFile(p.id)}),{deleted:oe.length,skipped:l.length-_.length,uploaded:_.length}};var Ot=50,$t=e=>`vercel integration add mixedbread --name docs-${e||"your-site-id"} --environment production`,ve=(e,t)=>kt("git",t,{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim(),Nt=e=>{let t=process.env.VERCEL_GIT_COMMIT_SHA?.trim(),n=[];try{n=ve(e,["rev-list",`--max-count=${Ot+1}`,t||"HEAD"]).split(`
6
6
  `).filter(Boolean)}catch{n=[]}let r=t||n[0],i;for(let s of Array.from(new Set([r,"HEAD"].filter(Boolean))))try{let o=Number(ve(e,["show","-s","--format=%ct",s]));if(Number.isFinite(o)){i=o;break}}catch{}return{revision:r,revisionAncestors:n.filter(s=>s!==r),revisionTimestamp:i}},Pe=async({allowNonProduction:e=!1,dir:t=".next"}={})=>{let n=process.cwd();Ct.loadEnvConfig(n,!1);let r=process.env.MXBAI_API_KEY?.trim(),i=process.env.MXBAI_STORE_ID?.trim();if(process.env.VERCEL_ENV!=="production"&&!e){console.log("Geistdocs search sync skipped: this is not a production Vercel build.");return}if(!!r!=!!i)throw new Error("Mixedbread is partially configured. Set both MXBAI_API_KEY and MXBAI_STORE_ID.");let s;try{s=await Te({cwd:n,outputDirectory:t})}catch(a){if(!(r||i)){console.log("Geistdocs search sync skipped: no Mixedbread credentials or static search export were found.");return}throw a}if(s.provider!=="mixedbread"){console.log("Geistdocs search sync skipped: Ask AI uses local retrieval.");return}if(!(r&&i))throw new Error(["Mixedbread retrieval is enabled, but MXBAI_API_KEY or MXBAI_STORE_ID is missing.","From the root of this site's repository, linked to the correct Vercel project, run:",$t(s.siteId)].join(`
7
- `));let o=await Ie({client:we({apiBaseUrl:process.env.MXBAI_BASE_URL,apiKey:r,storeId:i}),manifest:s,...Nt(n)});console.log(`Geistdocs search sync complete: ${o.uploaded} uploaded, ${o.deleted} deleted, ${o.skipped} unchanged.`)};import{readFileSync as Gt,writeFileSync as Ut}from"fs";import{mkdir as Lt,readFile as Z,writeFile as jt}from"fs/promises";import{dirname as Bt,extname as Vt,relative as Fe,resolve as j}from"path";import{intro as Jt,isCancel as Ht,log as I,multiselect as Xt,outro as L,spinner as Kt}from"@clack/prompts";import{glob as Yt}from"glob";import{Node as F,Project as qt,SyntaxKind as zt}from"ts-morph";var Wt="geistdocs.tsx",Qt="content/docs/**/*.mdx",ee=".translation-cache.json",Q=8,Ae=()=>({version:1,entries:{}}),Zt=async e=>{let t=await Z(e),{createHash:n}=await import("crypto");return n("sha256").update(t).digest("hex")},en=e=>{let t=j(process.cwd(),e);return Gt(t,"utf8")},Me=e=>F.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(F.isPropertyAssignment(t)){let n=t.getNameNode();if(F.isIdentifier(n)||F.isStringLiteral(n))return[n.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],tn=e=>{try{let t=new qt({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),n=en(e),s=t.createSourceFile(e,n,{overwrite:!0}).getVariableDeclarations().find(a=>a.getName()==="translations")?.getInitializer();if(!s)return[];if(F.isObjectLiteralExpression(s))return Me(s);let o=s.getFirstDescendantByKind(zt.ObjectLiteralExpression);return o?Me(o):[]}catch(t){let n=t instanceof Error?t.message:`${t}`;return I.warn(`Failed to read locales from ${e}: ${n}`),[]}},nn=async()=>{let e=await Xt({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 Ht(e)&&(L("Translation cancelled"),process.exit(0)),e},rn=async e=>(await Yt(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),sn=async()=>{let e=j(process.cwd(),ee);try{let t=await Z(e,"utf8"),n=JSON.parse(t);return n.version!==1||!n.entries?Ae():{version:1,entries:n.entries}}catch{return Ae()}},Re=e=>{let t=j(process.cwd(),ee),n=JSON.stringify(e,null,2);Ut(t,n,"utf8")},on=async e=>{let t=await Promise.all(e.map(async n=>[n,await Zt(n)]));return Object.fromEntries(t)},an=(e,t)=>{let n=Vt(e);return`${e.slice(0,-n.length)}.${t}${n}`},De=(e,t)=>`${Fe(process.cwd(),e)}::${t}`,cn=(e,t,n,r,i=!1)=>{let s=[],o=0;for(let a of t){let d=n[a];for(let c of e){let u=an(a,c),l=De(a,c),m=r.entries[l];if(!i&&m?.hash===d){o+=1;continue}s.push({locale:c,sourceFile:a,sourceHash:d,targetFile:u})}}return{tasks:s,skippedCount:o}},dn=async e=>{await Lt(Bt(e),{recursive:!0})},ln=async(e,t,n)=>{let r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:n})});if(!r.ok){let s=await r.text();throw new Error(`API request failed (${r.status}): ${s}`)}let i=await r.json();if(!i.translation)throw new Error("API response did not include a translation");return i.translation},pn=async(e,t,n)=>{let r=await Z(e.sourceFile,"utf8"),i=await ln(t,r,e.locale);await dn(e.targetFile),await jt(e.targetFile,i,"utf8"),n.entries[De(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},ke=async(e,t)=>{Jt("Translate MDX content");let n=e??Qt,r=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",i=tn(t.config??Wt),s=await rn(n);s.length===0&&(I.error(`No MDX files found matching pattern: ${n}`),L("Translation cancelled"),process.exit(1)),I.info(`Found ${s.length} MDX file(s) matching pattern`),i.length===0&&(i=await nn());let o=j(process.cwd(),ee),a=await sn();await Re(a),I.info(`Using cache: ${o}`);let d=await on(s),{tasks:c,skippedCount:u}=cn(i,s,d,a,t.force);if(c.length===0){I.success("All translations are up to date!"),L(`Skipped ${u} file(s) (unchanged)`);return}let l=[];for(let h=0;h<c.length;h+=Q)l.push(c.slice(h,h+Q));I.info(`Processing ${c.length} translation(s) in ${l.length} batch(es) of up to ${Q}`),u>0&&I.info(`Skipped ${u} translation(s) (unchanged)`);let m=Kt();m.start("Translating content...");let f=0;for(let h of l)await Promise.all(h.map(async x=>{await pn(x,r,a),f+=1,m.message(`Translated ${f}/${c.length}: ${Fe(process.cwd(),x.targetFile)}`)})),await Re(a);m.stop("Translation complete!"),L(`Created/updated ${c.length} file(s)`)};import{access as un,copyFile as gn,mkdir as Ne,rm as re}from"fs/promises";import{dirname as mn,join as v}from"path";import{intro as fn,log as w,outro as B,spinner as Ge}from"@clack/prompts";import{glob as hn}from"glob";var wn=["**/*"],yn=["content/docs/**"],te=".geistdocs-tmp",xn=async(e,t)=>{let n=v(e,t);await re(n,{recursive:!0,force:!0}),await Ne(n,{recursive:!0})},ne=async e=>await re(e,{recursive:!0,force:!0}),Ce=async(e,t,n)=>(await hn(e,{cwd:n,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),bn=async e=>{try{return await un(e),!0}catch{return!1}},En=async(e,t,n)=>{let r=v(t,e),i=v(n,e);return await bn(r)?(await gn(r,i),{success:!0}):{success:!1,error:`Source file not found: ${r}`}},Sn=async(e,t)=>{let n=v(t,e);return await re(n,{force:!0}),{success:!0}},Oe=20,$e=async(e,t,n)=>{let r=[];for(let i=0;i<e.length;i+=n){let s=e.slice(i,i+n),o=await Promise.all(s.map(t));r.push(...o)}return r},_n=async(e,t,n,r,i)=>{let s={success:[],deleted:[],failed:[]},o=[...new Set(e.map(d=>mn(v(r,d))))];i.message(`Creating ${o.length} directories...`),await Promise.all(o.map(d=>Ne(d,{recursive:!0}))),i.message(`Updating ${e.length} files...`);let a=await $e(e,async d=>{let c=await En(d,n,r);return{file:d,...c}},Oe);for(let{file:d,success:c,error:u}of a)c?s.success.push(d):s.failed.push({file:d,error:u??"Unknown error"});if(t.length>0){i.message(`Deleting ${t.length} files...`);let d=await $e(t,async c=>{try{return await Sn(c,r),{file:c,success:!0}}catch(u){let l=u instanceof Error?u.message:`${u}`;return{file:c,success:!1,error:l}}},Oe);for(let c of d)c.success?s.deleted.push(c.file):s.failed.push({file:c.file,error:c.error})}return s},Tn=e=>{if(e.success.length>0){w.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)w.info(` \u2713 ${t}`)}if(e.deleted.length>0){w.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)w.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){w.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:n}of e.failed)w.error(` \u2717 ${t}: ${n}`)}},In=e=>e.includes("canary")?"canary":"latest",vn=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(S)}`);if(!t.ok)throw new Error(`Failed to resolve ${S}@${e}`);let r=(await t.json())["dist-tags"]?.[e];if(!r)throw new Error(`Could not find dist-tag ${e} for ${S}`);return r},Pn=async e=>{let t=await M(e),n=J(t,S);if(!n)return{currentVersion:n,nextVersion:void 0,updated:!1};let r=In(n),i=await vn(r);return n===i?{currentVersion:n,nextVersion:i,updateTag:r,updated:!1}:($(t,S,i),await O(e,t),{currentVersion:n,nextVersion:i,updateTag:r,updated:!0})},An=async(e,t,n)=>{let r=await M(e);if(!le(r,S))return!1;t&&t.length>0&&w.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),n?.sync&&w.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:i,nextVersion:s,updateTag:o,updated:a}=await Pn(e);if(!a)return w.success(i?`@vercel/geistdocs is already at ${s} (${o}).`:"No package version update was needed."),B("Package-based site is already up to date."),!0;w.info(`Bumping ${S} from ${i} to ${s} (${o})`);let d=Ge();return d.start("Installing updated package version..."),await T("pnpm",["install"],{cwd:e}),d.stop("Package update complete!"),B("Please review and test the upgraded package version."),!0},Mn=async(e,t,n,r,i)=>{let s=v(e,te),o=Ge(),a=i?.sync?s:t;o.start("Preparing template snapshot..."),i?.sync&&(await xn(e,te),await N(s)),o.message("Scanning for files...");let d=await Ce(n,r,a),c=[];if(i?.sync){o.message("Comparing with local files...");let l=await Ce(n,r,e),m=new Set(d);c=l.filter(f=>!m.has(f))}if(o.stop(`Found ${d.length} files to update`),d.length===0&&c.length===0){w.warn("No files matched the patterns. Nothing to update."),i?.sync&&await ne(s),B("Update cancelled.");return}w.info(`Patterns: ${n.length}`),w.info(`Files to update: ${d.length}`),i?.sync&&w.info(`Files to delete: ${c.length}`),o.start("Updating files...");let u=await _n(d,c,a,e,o);i?.sync&&(o.message("Cleaning up..."),await ne(s)),o.stop("Update complete!"),Tn(u),B("Please review and test the changes carefully.")},Ue=async(e,t)=>{let n=process.cwd(),r=H(),i=e&&e.length>0?e:wn,s=e&&e.length>0?[]:yn;try{if(fn("Let's update your Geistdocs project!"),await An(n,e,t))return;w.info("Template source: bundled package snapshot"),e&&e.length>0&&w.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&w.info("Sync mode enabled: will delete files removed from template"),await Mn(n,r,i,s,t)}catch(o){let a=o instanceof Error?o.message:`${o}`;try{await ne(v(n,te))}catch{}w.error(`Failed to update project: ${a}`),process.exit(1)}};A.name("geistdocs").description("CLI for Geistdocs projects").version("2.13.1","-v, --version","Output the current version");A.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").addOption(new Rn("--brand <brand>","Navbar brand").choices(["vercel","labs"]).default("vercel")).option("--disable-git","Disable git initialization").action(he);A.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(Ue);A.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(ke);var Fn=A.command("search").description("Manage the external search index used by Ask AI");Fn.command("sync").description("Sync the latest static docs export to Mixedbread").option("--dir <path>","Next.js output directory",".next").option("--allow-non-production","Run outside a production Vercel build").action(Pe);await A.parseAsync(process.argv).catch(e=>{console.error(e instanceof Error?e.message:e),process.exitCode=1});
7
+ `));let o=await Ie({client:we({apiBaseUrl:process.env.MXBAI_BASE_URL,apiKey:r,storeId:i}),manifest:s,...Nt(n)});console.log(`Geistdocs search sync complete: ${o.uploaded} uploaded, ${o.deleted} deleted, ${o.skipped} unchanged.`)};import{readFileSync as Gt,writeFileSync as Ut}from"fs";import{mkdir as Lt,readFile as Z,writeFile as jt}from"fs/promises";import{dirname as Bt,extname as Vt,relative as Fe,resolve as j}from"path";import{intro as Jt,isCancel as Ht,log as I,multiselect as Xt,outro as L,spinner as Kt}from"@clack/prompts";import{glob as Yt}from"glob";import{Node as F,Project as qt,SyntaxKind as zt}from"ts-morph";var Wt="geistdocs.tsx",Qt="content/docs/**/*.mdx",ee=".translation-cache.json",Q=8,Ae=()=>({version:1,entries:{}}),Zt=async e=>{let t=await Z(e),{createHash:n}=await import("crypto");return n("sha256").update(t).digest("hex")},en=e=>{let t=j(process.cwd(),e);return Gt(t,"utf8")},Me=e=>F.isObjectLiteralExpression(e)?e.getProperties().flatMap(t=>{if(F.isPropertyAssignment(t)){let n=t.getNameNode();if(F.isIdentifier(n)||F.isStringLiteral(n))return[n.getText().replaceAll(/['"]/g,"")]}return[]}).filter(Boolean):[],tn=e=>{try{let t=new qt({compilerOptions:{allowJs:!0,jsx:4,module:99,target:10},skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0}),n=en(e),s=t.createSourceFile(e,n,{overwrite:!0}).getVariableDeclarations().find(a=>a.getName()==="translations")?.getInitializer();if(!s)return[];if(F.isObjectLiteralExpression(s))return Me(s);let o=s.getFirstDescendantByKind(zt.ObjectLiteralExpression);return o?Me(o):[]}catch(t){let n=t instanceof Error?t.message:`${t}`;return I.warn(`Failed to read locales from ${e}: ${n}`),[]}},nn=async()=>{let e=await Xt({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 Ht(e)&&(L("Translation cancelled"),process.exit(0)),e},rn=async e=>(await Yt(e,{cwd:process.cwd(),absolute:!0,nodir:!0})).sort(),sn=async()=>{let e=j(process.cwd(),ee);try{let t=await Z(e,"utf8"),n=JSON.parse(t);return n.version!==1||!n.entries?Ae():{version:1,entries:n.entries}}catch{return Ae()}},Re=e=>{let t=j(process.cwd(),ee),n=JSON.stringify(e,null,2);Ut(t,n,"utf8")},on=async e=>{let t=await Promise.all(e.map(async n=>[n,await Zt(n)]));return Object.fromEntries(t)},an=(e,t)=>{let n=Vt(e);return`${e.slice(0,-n.length)}.${t}${n}`},De=(e,t)=>`${Fe(process.cwd(),e)}::${t}`,cn=(e,t,n,r,i=!1)=>{let s=[],o=0;for(let a of t){let d=n[a];for(let c of e){let u=an(a,c),l=De(a,c),m=r.entries[l];if(!i&&m?.hash===d){o+=1;continue}s.push({locale:c,sourceFile:a,sourceHash:d,targetFile:u})}}return{tasks:s,skippedCount:o}},dn=async e=>{await Lt(Bt(e),{recursive:!0})},ln=async(e,t,n)=>{let r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,locale:n})});if(!r.ok){let s=await r.text();throw new Error(`API request failed (${r.status}): ${s}`)}let i=await r.json();if(!i.translation)throw new Error("API response did not include a translation");return i.translation},pn=async(e,t,n)=>{let r=await Z(e.sourceFile,"utf8"),i=await ln(t,r,e.locale);await dn(e.targetFile),await jt(e.targetFile,i,"utf8"),n.entries[De(e.sourceFile,e.locale)]={hash:e.sourceHash,updatedAt:new Date().toISOString()}},ke=async(e,t)=>{Jt("Translate MDX content");let n=e??Qt,r=t.url||process.env.GEISTDOCS_TRANSLATE_URL||"https://geistdocs.com/translate",i=tn(t.config??Wt),s=await rn(n);s.length===0&&(I.error(`No MDX files found matching pattern: ${n}`),L("Translation cancelled"),process.exit(1)),I.info(`Found ${s.length} MDX file(s) matching pattern`),i.length===0&&(i=await nn());let o=j(process.cwd(),ee),a=await sn();await Re(a),I.info(`Using cache: ${o}`);let d=await on(s),{tasks:c,skippedCount:u}=cn(i,s,d,a,t.force);if(c.length===0){I.success("All translations are up to date!"),L(`Skipped ${u} file(s) (unchanged)`);return}let l=[];for(let h=0;h<c.length;h+=Q)l.push(c.slice(h,h+Q));I.info(`Processing ${c.length} translation(s) in ${l.length} batch(es) of up to ${Q}`),u>0&&I.info(`Skipped ${u} translation(s) (unchanged)`);let m=Kt();m.start("Translating content...");let f=0;for(let h of l)await Promise.all(h.map(async x=>{await pn(x,r,a),f+=1,m.message(`Translated ${f}/${c.length}: ${Fe(process.cwd(),x.targetFile)}`)})),await Re(a);m.stop("Translation complete!"),L(`Created/updated ${c.length} file(s)`)};import{access as un,copyFile as gn,mkdir as Ne,rm as re}from"fs/promises";import{dirname as mn,join as v}from"path";import{intro as fn,log as w,outro as B,spinner as Ge}from"@clack/prompts";import{glob as hn}from"glob";var wn=["**/*"],yn=["content/docs/**"],te=".geistdocs-tmp",xn=async(e,t)=>{let n=v(e,t);await re(n,{recursive:!0,force:!0}),await Ne(n,{recursive:!0})},ne=async e=>await re(e,{recursive:!0,force:!0}),Ce=async(e,t,n)=>(await hn(e,{cwd:n,nodir:!0,dot:!0,ignore:[".git/**",...t]})).sort(),bn=async e=>{try{return await un(e),!0}catch{return!1}},En=async(e,t,n)=>{let r=v(t,e),i=v(n,e);return await bn(r)?(await gn(r,i),{success:!0}):{success:!1,error:`Source file not found: ${r}`}},Sn=async(e,t)=>{let n=v(t,e);return await re(n,{force:!0}),{success:!0}},Oe=20,$e=async(e,t,n)=>{let r=[];for(let i=0;i<e.length;i+=n){let s=e.slice(i,i+n),o=await Promise.all(s.map(t));r.push(...o)}return r},_n=async(e,t,n,r,i)=>{let s={success:[],deleted:[],failed:[]},o=[...new Set(e.map(d=>mn(v(r,d))))];i.message(`Creating ${o.length} directories...`),await Promise.all(o.map(d=>Ne(d,{recursive:!0}))),i.message(`Updating ${e.length} files...`);let a=await $e(e,async d=>{let c=await En(d,n,r);return{file:d,...c}},Oe);for(let{file:d,success:c,error:u}of a)c?s.success.push(d):s.failed.push({file:d,error:u??"Unknown error"});if(t.length>0){i.message(`Deleting ${t.length} files...`);let d=await $e(t,async c=>{try{return await Sn(c,r),{file:c,success:!0}}catch(u){let l=u instanceof Error?u.message:`${u}`;return{file:c,success:!1,error:l}}},Oe);for(let c of d)c.success?s.deleted.push(c.file):s.failed.push({file:c.file,error:c.error})}return s},Tn=e=>{if(e.success.length>0){w.success(`Successfully updated ${e.success.length} files:`);for(let t of e.success)w.info(` \u2713 ${t}`)}if(e.deleted.length>0){w.success(`Deleted ${e.deleted.length} files:`);for(let t of e.deleted)w.info(` \u{1F5D1} ${t}`)}if(e.failed.length>0){w.warn(`Failed to update ${e.failed.length} files:`);for(let{file:t,error:n}of e.failed)w.error(` \u2717 ${t}: ${n}`)}},In=e=>e.includes("canary")?"canary":"latest",vn=async e=>{let t=await fetch(`https://registry.npmjs.org/${encodeURIComponent(S)}`);if(!t.ok)throw new Error(`Failed to resolve ${S}@${e}`);let r=(await t.json())["dist-tags"]?.[e];if(!r)throw new Error(`Could not find dist-tag ${e} for ${S}`);return r},Pn=async e=>{let t=await M(e),n=J(t,S);if(!n)return{currentVersion:n,nextVersion:void 0,updated:!1};let r=In(n),i=await vn(r);return n===i?{currentVersion:n,nextVersion:i,updateTag:r,updated:!1}:($(t,S,i),await O(e,t),{currentVersion:n,nextVersion:i,updateTag:r,updated:!0})},An=async(e,t,n)=>{let r=await M(e);if(!le(r,S))return!1;t&&t.length>0&&w.warn("Ignoring file patterns for a package-based site. This update will bump the package version instead."),n?.sync&&w.warn("Ignoring --sync for a package-based site. Runtime updates now come from the package version.");let{currentVersion:i,nextVersion:s,updateTag:o,updated:a}=await Pn(e);if(!a)return w.success(i?`@vercel/geistdocs is already at ${s} (${o}).`:"No package version update was needed."),B("Package-based site is already up to date."),!0;w.info(`Bumping ${S} from ${i} to ${s} (${o})`);let d=Ge();return d.start("Installing updated package version..."),await T("pnpm",["install"],{cwd:e}),d.stop("Package update complete!"),B("Please review and test the upgraded package version."),!0},Mn=async(e,t,n,r,i)=>{let s=v(e,te),o=Ge(),a=i?.sync?s:t;o.start("Preparing template snapshot..."),i?.sync&&(await xn(e,te),await N(s)),o.message("Scanning for files...");let d=await Ce(n,r,a),c=[];if(i?.sync){o.message("Comparing with local files...");let l=await Ce(n,r,e),m=new Set(d);c=l.filter(f=>!m.has(f))}if(o.stop(`Found ${d.length} files to update`),d.length===0&&c.length===0){w.warn("No files matched the patterns. Nothing to update."),i?.sync&&await ne(s),B("Update cancelled.");return}w.info(`Patterns: ${n.length}`),w.info(`Files to update: ${d.length}`),i?.sync&&w.info(`Files to delete: ${c.length}`),o.start("Updating files...");let u=await _n(d,c,a,e,o);i?.sync&&(o.message("Cleaning up..."),await ne(s)),o.stop("Update complete!"),Tn(u),B("Please review and test the changes carefully.")},Ue=async(e,t)=>{let n=process.cwd(),r=H(),i=e&&e.length>0?e:wn,s=e&&e.length>0?[]:yn;try{if(fn("Let's update your Geistdocs project!"),await An(n,e,t))return;w.info("Template source: bundled package snapshot"),e&&e.length>0&&w.info(`Updating specific files: ${e.join(", ")}`),t?.sync&&w.info("Sync mode enabled: will delete files removed from template"),await Mn(n,r,i,s,t)}catch(o){let a=o instanceof Error?o.message:`${o}`;try{await ne(v(n,te))}catch{}w.error(`Failed to update project: ${a}`),process.exit(1)}};A.name("geistdocs").description("CLI for Geistdocs projects").version("2.14.0-canary.fbbc4b6","-v, --version","Output the current version");A.command("init").description("Initialize a new Geistdocs project").option("--name <name>","Name of the project").addOption(new Rn("--brand <brand>","Navbar brand").choices(["vercel","labs"]).default("vercel")).option("--disable-git","Disable git initialization").action(he);A.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(Ue);A.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(ke);var Fn=A.command("search").description("Manage the external search index used by Ask AI");Fn.command("sync").description("Sync the latest static docs export to Mixedbread").option("--dir <path>","Next.js output directory",".next").option("--allow-non-production","Run outside a production Vercel build").action(Pe);await A.parseAsync(process.argv).catch(e=>{console.error(e instanceof Error?e.message:e),process.exitCode=1});
@@ -1 +1 @@
1
- {"version":3,"file":"loading-skeleton.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/loading-skeleton.tsx"],"names":[],"mappings":"AAsCA,eAAO,MAAM,wBAAwB,+CAyCpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,+CAsB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,sBAGjC;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,4CAmBA,CAAC"}
1
+ {"version":3,"file":"loading-skeleton.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/loading-skeleton.tsx"],"names":[],"mappings":"AAsCA,eAAO,MAAM,wBAAwB,+CAyCpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,+CAsB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,sBAGjC;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,4CAiBA,CAAC"}
@@ -40,7 +40,5 @@ export const ChatLoadingSkeleton = ({ isMobile, title, }) => {
40
40
  useEffect(() => {
41
41
  getMessageCount(title).then((count) => setConversation(count > 0));
42
42
  }, [title]);
43
- return (_jsx("div", { className: cn("fixed z-45 flex flex-col bg-background-100", isMobile
44
- ? "inset-x-0 bottom-0 h-[80dvh] rounded-t-xl"
45
- : "inset-y-0 right-0 w-[400px] border-l"), children: conversation ? _jsx(ChatConversationSkeleton, {}) : _jsx(ChatEmptySkeleton, {}) }));
43
+ return (_jsx("div", { className: cn("fixed z-45 flex flex-col bg-background-100", isMobile ? "inset-0" : "inset-y-0 right-0 w-[400px] border-l"), children: conversation ? _jsx(ChatConversationSkeleton, {}) : _jsx(ChatEmptySkeleton, {}) }));
46
44
  };
@@ -33,5 +33,5 @@ export const ChatPromptInput = ({ onChange, onStop, onSubmit, status, textareaRe
33
33
  event.currentTarget.form?.requestSubmit();
34
34
  }
35
35
  };
36
- return (_jsx("div", { className: "cursor-text rounded-[12px] border border-gray-300 border-solid pt-2 pb-2 shadow-xs transition-colors duration-250 focus-within:border-gray-500", children: _jsxs("form", { className: "flex flex-col items-center gap-2", onSubmit: onSubmit, children: [_jsx("textarea", { className: "min-h-0 w-full resize-none rounded-none border-0 bg-transparent px-4 py-2 font-sans text-gray-1000 text-sm shadow-none outline-hidden ring-0 placeholder:text-gray-600 focus:outline-none focus-visible:ring-0", maxLength: 1000, name: "message", onChange: handleChange, onKeyDown: handleKeyDown, placeholder: "Ask a question...", ref: textareaRef, value: value }), _jsx("div", { className: "flex w-full items-center justify-end px-2", children: isGenerating && onStop ? (_jsx(Button, { className: "animate-fade-in-scale", onClick: onStop, prefix: _jsx(IconStopCircle, { className: "size-4" }), size: "small", typeName: "button", children: "Stop" })) : (_jsx(Button, { "aria-label": "Submit", className: "size-8 animate-fade-in-scale p-0", disabled: value.trim().length <= 3, shape: "square", size: "small", svgOnly: true, typeName: "submit", children: _jsx(IconArrowUp, { className: "size-4" }) })) })] }) }));
36
+ return (_jsx("div", { className: "cursor-text rounded-[12px] border border-gray-300 border-solid pt-2 pb-2 shadow-xs transition-colors duration-250 focus-within:border-gray-500", children: _jsxs("form", { className: "flex flex-col items-center gap-2", onSubmit: onSubmit, children: [_jsx("textarea", { className: "min-h-0 w-full resize-none rounded-none border-0 bg-transparent px-4 py-2 font-sans text-copy-16 text-gray-1000 shadow-none outline-hidden ring-0 placeholder:text-gray-600 focus:outline-none focus-visible:ring-0 min-[768px]:text-copy-14", maxLength: 1000, name: "message", onChange: handleChange, onKeyDown: handleKeyDown, placeholder: "Ask a question...", ref: textareaRef, value: value }), _jsx("div", { className: "flex w-full items-center justify-end px-2", children: isGenerating && onStop ? (_jsx(Button, { className: "animate-fade-in-scale", onClick: onStop, prefix: _jsx(IconStopCircle, { className: "size-4" }), size: "small", typeName: "button", children: "Stop" })) : (_jsx(Button, { "aria-label": "Submit", className: "size-8 animate-fade-in-scale p-0", disabled: value.trim().length <= 3, shape: "square", size: "small", svgOnly: true, typeName: "submit", children: _jsx(IconArrowUp, { className: "size-4" }) })) })] }) }));
37
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/shell.tsx"],"names":[],"mappings":"AAsaA,eAAO,MAAM,kBAAkB,sDAqD9B,CAAC"}
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/internal/chat/shell.tsx"],"names":[],"mappings":"AAuaA,eAAO,MAAM,kBAAkB,sDA+D9B,CAAC"}
@@ -31,22 +31,21 @@ const ChatLoading = () => (_jsx("div", { className: "flex size-full w-full flex-
31
31
  // Centers the header, transcript, and composer when the panel fills the
32
32
  // viewport, so lines stay readable on wide screens.
33
33
  const EXPANDED_COLUMN = "mx-auto w-full max-w-5xl";
34
- const GeistdocsChatInner = ({ active, expandable = false, isOpen, }) => {
34
+ const GeistdocsChatInner = ({ active, expandable = false, focusOnOpen, isOpen, }) => {
35
35
  const state = useChatSession();
36
36
  const textareaRef = useRef(null);
37
37
  const ready = state.status === "ready";
38
- // Focus the prompt when the chat opens or finishes loading while open. It
39
- // lives here rather than in the panel so the panel mounting when this
40
- // shell becomes active (a breakpoint change) doesn't move focus.
38
+ // Desktop readers can type immediately. Mobile readers choose when to open
39
+ // the software keyboard after the full-screen chat has settled.
41
40
  useEffect(() => {
42
- if (!(isOpen && ready)) {
41
+ if (!(active && focusOnOpen && isOpen && ready)) {
43
42
  return;
44
43
  }
45
44
  const timer = setTimeout(() => {
46
45
  textareaRef.current?.focus();
47
46
  }, 100);
48
47
  return () => clearTimeout(timer);
49
- }, [isOpen, ready]);
48
+ }, [active, focusOnOpen, isOpen, ready]);
50
49
  // The inactive shell is hidden, so it renders nothing: only the visible
51
50
  // shell subscribes to the chat and re-renders as a response streams. When
52
51
  // the breakpoint changes, the newly active shell renders the shared
@@ -160,5 +159,5 @@ export const GeistdocsChatShell = () => {
160
159
  // modal surfaces like the search command menu, dialogs, and
161
160
  // dropdowns (z-50), so opening the command menu paints over an
162
161
  // open chat panel.
163
- "fixed inset-y-0 right-0 z-45 hidden h-full flex-col gap-4 border-l bg-background-100 transition-transform min-[768px]:flex", isExpanded ? "w-screen border-l-0" : "w-[400px] max-w-[75vw]", "translate-x-full data-[state=open]:translate-x-0"), "data-state": isOpen ? "open" : "closed", children: _jsx(GeistdocsChatErrorBoundary, { chatTitle: chatTitle, onClose: () => setIsOpen(false), children: _jsx(GeistdocsChatInner, { active: !isMobile, expandable: true, isOpen: isOpen }) }) }) }), _jsx("div", { className: "min-[768px]:hidden", children: _jsxs(Drawer, { className: "flex flex-col bg-background-100", height: "80dvh", onDismiss: () => setIsOpen(false), show: isMobile && isOpen, children: [_jsx(DrawerTitle, { className: "sr-only", children: chatTitle }), _jsx(GeistdocsChatErrorBoundary, { chatTitle: chatTitle, onClose: () => setIsOpen(false), children: _jsx(GeistdocsChatInner, { active: isMobile, isOpen: isOpen }) })] }) })] }));
162
+ "fixed inset-y-0 right-0 z-45 hidden h-full flex-col gap-4 border-l bg-background-100 transition-transform min-[768px]:flex", isExpanded ? "w-screen border-l-0" : "w-[400px] max-w-[75vw]", "translate-x-full data-[state=open]:translate-x-0"), "data-state": isOpen ? "open" : "closed", children: _jsx(GeistdocsChatErrorBoundary, { chatTitle: chatTitle, onClose: () => setIsOpen(false), children: _jsx(GeistdocsChatInner, { active: !isMobile, expandable: true, focusOnOpen: true, isOpen: isOpen }) }) }) }), _jsx("div", { className: "min-[768px]:hidden", children: _jsxs(Drawer, { className: "flex max-h-none flex-col rounded-none bg-background-100", height: "100dvh", onDismiss: () => setIsOpen(false), repositionInputs: false, show: isMobile && isOpen, children: [_jsx(DrawerTitle, { className: "sr-only", children: chatTitle }), _jsx(GeistdocsChatErrorBoundary, { chatTitle: chatTitle, onClose: () => setIsOpen(false), children: _jsx(GeistdocsChatInner, { active: isMobile, focusOnOpen: false, isOpen: isOpen }) })] }) })] }));
164
163
  };
@@ -1 +1 @@
1
- {"version":3,"file":"desktop-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/desktop-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAYtB,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAiBD,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,wBAAwB,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,oBAAoB,GAC7B,eAAe,EAAE,CAYnB;AA4DD,eAAO,MAAM,WAAW,GAAI,sBAAsB,gBAAgB,4CAsEjE,CAAC"}
1
+ {"version":3,"file":"desktop-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/desktop-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAYtB,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAiBD,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,wBAAwB,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,oBAAoB,GAC7B,eAAe,EAAE,CAYnB;AA8DD,eAAO,MAAM,WAAW,GAAI,sBAAsB,gBAAgB,4CAuEjE,CAAC"}
@@ -40,14 +40,14 @@ export function groupDropdownItems(dropdown) {
40
40
  * the vercel.com header pattern with columned sections and plain
41
41
  * hover-underline links.
42
42
  */
43
- const DropdownNavItem = ({ first, item, }) => {
44
- const isActive = useNavActive();
43
+ const DropdownNavItem = ({ first, item, navItems, }) => {
44
+ const isActive = useNavActive(navItems);
45
45
  const hasActiveChild = item.items.some((child) => !isExternal(child) && isActive(child.href));
46
46
  const sections = groupDropdownItems(item);
47
47
  return (_jsxs(NavigationMenuItem, { className: "flex", children: [_jsx(NavigationMenuTrigger, { className: topLevelItemClassName(first), "data-active": hasActiveChild ? "" : undefined, children: item.label }), _jsx(NavigationMenuPrimitive.Content, { className: NAVBAR_PANEL_CLASSNAME, forceMount: true, children: _jsx("div", { className: "mx-auto w-full max-w-[1448px] px-2", children: _jsx("div", { className: "flex flex-nowrap gap-x-10 pt-4 pb-6 pl-4", children: sections.map((section) => (_jsxs("div", { className: "min-w-[180px] shrink-0", children: [_jsx("p", { className: "text-gray-900 text-label-14", children: section.heading }), _jsx("ul", { className: "mt-[5px] flex list-none flex-col", children: section.items.map((child) => (_jsx("li", { className: "flex", children: _jsx(PanelLink, { active: !isExternal(child) && isActive(child.href), product: child }) }, child.href))) })] }, section.heading))) }) }) })] }));
48
48
  };
49
49
  export const DesktopMenu = ({ items, className }) => {
50
- const isActive = useNavActive();
50
+ const isActive = useNavActive(items);
51
51
  const [navOpen, setNavOpen] = useState(false);
52
- return (_jsxs(_Fragment, { children: [_jsx(NavigationMenu, { "aria-label": "Primary navigation", delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: cn("h-16 items-stretch gap-0", className), children: items.map((item, index) => "items" in item ? (_jsx(DropdownNavItem, { first: index === 0, item: item }, item.label)) : (_jsx(NavigationMenuItem, { className: "flex", children: _jsx(NavigationMenuLink, { active: isActive(item.href), asChild: true, className: topLevelItemClassName(index === 0), children: item.href.startsWith("http") ? (_jsxs("a", { className: "flex flex-row items-center gap-1", href: item.href, rel: "noopener", target: "_blank", children: [item.label, _jsx(IconArrowUpRightSmall, { "aria-hidden": "true", className: cn(navOpen && "will-change-transform"), size: 12 })] })) : (_jsx(LocalizedLink, { href: item.href, children: item.label })) }) }, item.href))) }) }), _jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none fixed inset-x-0 top-16 bottom-0 z-0 bg-background-200/60", navOpen ? "opacity-100" : "opacity-0") })] }));
52
+ return (_jsxs(_Fragment, { children: [_jsx(NavigationMenu, { "aria-label": "Primary navigation", delayDuration: 0, onValueChange: (value) => setNavOpen(Boolean(value)), skipDelayDuration: 0, viewport: false, children: _jsx(NavigationMenuList, { className: cn("h-16 items-stretch gap-0", className), children: items.map((item, index) => "items" in item ? (_jsx(DropdownNavItem, { first: index === 0, item: item, navItems: items }, item.label)) : (_jsx(NavigationMenuItem, { className: "flex", children: _jsx(NavigationMenuLink, { active: isActive(item.href), asChild: true, className: topLevelItemClassName(index === 0), children: item.href.startsWith("http") ? (_jsxs("a", { className: "flex flex-row items-center gap-1", href: item.href, rel: "noopener", target: "_blank", children: [item.label, _jsx(IconArrowUpRightSmall, { "aria-hidden": "true", className: cn(navOpen && "will-change-transform"), size: 12 })] })) : (_jsx(LocalizedLink, { href: item.href, children: item.label })) }) }, item.href))) }) }), _jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none fixed inset-x-0 top-16 bottom-0 z-0 bg-background-200/60", navOpen ? "opacity-100" : "opacity-0") })] }));
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/mobile-menu.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,yBAAyB,EAEzB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAQtB,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,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA4YD,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEhD,CAAC"}
1
+ {"version":3,"file":"mobile-menu.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/mobile-menu.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,yBAAyB,EAEzB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAQtB,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,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA+YD,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEhD,CAAC"}
@@ -34,8 +34,8 @@ function SubNavLink({ active, children, external, href, onClick, }) {
34
34
  * collapsible: uppercase section headings when items declare sections, a
35
35
  * flat list when none do.
36
36
  */
37
- function NavDropdownCollapsible({ dropdown, onLinkClick, }) {
38
- const isActive = useNavActive();
37
+ function NavDropdownCollapsible({ dropdown, navItems, onLinkClick, }) {
38
+ const isActive = useNavActive(navItems);
39
39
  const sections = groupDropdownItems(dropdown);
40
40
  const flat = sections.length === 1 && sections[0].heading === dropdown.label;
41
41
  const renderItems = (items) => items.map((item) => {
@@ -57,7 +57,7 @@ function MobileMenuButton({ expanded, onClick, }) {
57
57
  const MobileMenuState = ({ activeProduct, githubUrl, nav, ossProducts, showOss = false, }) => {
58
58
  const isDesktop = useMediaQuery("(min-width: 1024px)");
59
59
  const [show, setShow] = useState(false);
60
- const isActive = useNavActive();
60
+ const isActive = useNavActive(nav);
61
61
  // Resolve the default/custom list and drop the active product here on the
62
62
  // client, where `DEFAULT_OSS_PRODUCTS` is a real array (see resolveOssProducts).
63
63
  const products = showOss
@@ -122,6 +122,6 @@ const MobileMenuState = ({ activeProduct, githubUrl, nav, ossProducts, showOss =
122
122
  const close = () => setShow(false);
123
123
  return (_jsxs(_Fragment, { children: [_jsx(MobileMenuButton, { expanded: show, onClick: () => setShow(!show) }), _jsx("div", { className: cn("fixed inset-0 top-16 z-40 @min-[1024px]:hidden bg-background-200", show
124
124
  ? "pointer-events-auto opacity-100"
125
- : "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", show ? "opacity-100" : "pointer-events-none 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((item) => "items" in item ? (_jsx(NavDropdownCollapsible, { dropdown: item, onLinkClick: close }, item.label)) : (_jsx(NavLink, { active: isActive(item.href), external: item.href.startsWith("http"), href: item.href, onClick: close, children: item.label }, item.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 }) })] })] }));
125
+ : "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", show ? "opacity-100" : "pointer-events-none 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((item) => "items" in item ? (_jsx(NavDropdownCollapsible, { dropdown: item, navItems: nav, onLinkClick: close }, item.label)) : (_jsx(NavLink, { active: isActive(item.href), external: item.href.startsWith("http"), href: item.href, onClick: close, children: item.label }, item.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 }) })] })] }));
126
126
  };
127
127
  export const MobileMenu = (props) => (_jsx(MobileMenuState, { ...props }, usePathname()));
@@ -1,8 +1,15 @@
1
+ import type { GeistdocsNavItem } from "../../config";
1
2
  /**
2
- * Returns a predicate that reports whether a top-level nav item matches the
3
- * current page. External links are never active. Internal links are active
4
- * when the current path equals the item's href or is nested beneath it, so a
5
- * top-level section stays highlighted while browsing its sub-pages.
3
+ * The href of the most specific nav item that matches the path: the path
4
+ * equals the href or is nested beneath it. External links never match. When
5
+ * nav items nest (`/docs` and `/docs/lib`), only the longest match is active,
6
+ * so `/docs/lib/models` highlights `/docs/lib` rather than both.
6
7
  */
7
- export declare const useNavActive: () => (href: string) => boolean;
8
+ export declare const getActiveNavHref: (pathname: string, hrefs: readonly string[]) => string | undefined;
9
+ /**
10
+ * Returns a predicate that reports whether a nav item is the active one for
11
+ * the current page. A section stays highlighted while browsing its
12
+ * sub-pages, unless a more specific nav item matches.
13
+ */
14
+ export declare const useNavActive: (items: readonly GeistdocsNavItem[]) => (href: string) => boolean;
8
15
  //# sourceMappingURL=use-nav-active.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-nav-active.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/use-nav-active.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,SAYf,MAAM,MAAM,YAWrB,CAAC"}
1
+ {"version":3,"file":"use-nav-active.d.ts","sourceRoot":"","sources":["../../../src/internal/navbar/use-nav-active.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AASrD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,OAAO,SAAS,MAAM,EAAE,KACvB,MAAM,GAAG,SAeX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,gBAAgB,EAAE,MAarD,MAAM,MAAM,YACrB,CAAC"}
@@ -1,12 +1,35 @@
1
1
  "use client";
2
2
  import { useParams, usePathname } from "next/navigation";
3
+ const getNavHrefs = (items) => items.flatMap((item) => "items" in item
4
+ ? item.items.filter((child) => !child.external).map((child) => child.href)
5
+ : [item.href]);
3
6
  /**
4
- * Returns a predicate that reports whether a top-level nav item matches the
5
- * current page. External links are never active. Internal links are active
6
- * when the current path equals the item's href or is nested beneath it, so a
7
- * top-level section stays highlighted while browsing its sub-pages.
7
+ * The href of the most specific nav item that matches the path: the path
8
+ * equals the href or is nested beneath it. External links never match. When
9
+ * nav items nest (`/docs` and `/docs/lib`), only the longest match is active,
10
+ * so `/docs/lib/models` highlights `/docs/lib` rather than both.
8
11
  */
9
- export const useNavActive = () => {
12
+ export const getActiveNavHref = (pathname, hrefs) => {
13
+ let active;
14
+ for (const href of hrefs) {
15
+ if (href.startsWith("http")) {
16
+ continue;
17
+ }
18
+ const matches = href === "/"
19
+ ? pathname === "/"
20
+ : pathname === href || pathname.startsWith(`${href}/`);
21
+ if (matches && (active === undefined || href.length > active.length)) {
22
+ active = href;
23
+ }
24
+ }
25
+ return active;
26
+ };
27
+ /**
28
+ * Returns a predicate that reports whether a nav item is the active one for
29
+ * the current page. A section stays highlighted while browsing its
30
+ * sub-pages, unless a more specific nav item matches.
31
+ */
32
+ export const useNavActive = (items) => {
10
33
  const pathname = usePathname();
11
34
  const params = useParams();
12
35
  const lang = typeof params.lang === "string" ? params.lang : null;
@@ -15,13 +38,6 @@ export const useNavActive = () => {
15
38
  const normalizedPath = lang && (pathname === `/${lang}` || pathname.startsWith(`/${lang}/`))
16
39
  ? pathname.slice(lang.length + 1) || "/"
17
40
  : pathname;
18
- return (href) => {
19
- if (href.startsWith("http")) {
20
- return false;
21
- }
22
- if (href === "/") {
23
- return normalizedPath === "/";
24
- }
25
- return normalizedPath === href || normalizedPath.startsWith(`${href}/`);
26
- };
41
+ const active = getActiveNavHref(normalizedPath, getNavHrefs(items));
42
+ return (href) => href === active;
27
43
  };
@@ -1,7 +1,9 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type GeistdocsSidebarMode } from "../sidebar";
3
- export declare const GeistdocsSidebar: ({ mode, showDesktop, top, }: {
3
+ export declare const GeistdocsSidebar: ({ mode, scrollToActive, showDesktop, top, }: {
4
4
  mode?: GeistdocsSidebarMode;
5
+ /** Scroll the desktop sidebar to reveal the current page on navigation. */
6
+ scrollToActive?: boolean;
5
7
  showDesktop?: boolean;
6
8
  top?: ReactNode;
7
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/internal/sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,KAAK,oBAAoB,EAAuB,MAAM,YAAY,CAAC;AAi/B5E,eAAO,MAAM,gBAAgB,GAAI,6BAI9B;IACD,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,4CAiEA,CAAC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/internal/sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,KAAK,oBAAoB,EAAuB,MAAM,YAAY,CAAC;AAu/B5E,eAAO,MAAM,gBAAgB,GAAI,6CAK9B;IACD,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,2EAA2E;IAC3E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,4CAkEA,CAAC"}
@@ -213,9 +213,9 @@ const SidebarTree = ({ activeUrl, idScope, nodes, onNavigate, openFirstLevel = f
213
213
  useActiveItemScroll(listRef, activeUrl, scrollActive && visible, opened.join(":"), manualToggleRef);
214
214
  return (_jsx("ul", { className: "m-0 flex list-none flex-col gap-px p-0", ref: listRef, children: _jsx(SidebarTreeItems, { depth: 0, nodes: nodes, parentPath: [], state: state }) }));
215
215
  };
216
- const SidebarRootList = ({ activeSection, activeUrl, groups, onSelect, visible, }) => {
216
+ const SidebarRootList = ({ activeSection, activeUrl, groups, onSelect, scrollToActive, visible, }) => {
217
217
  const contentRef = useRef(null);
218
- useActiveItemScroll(contentRef, activeUrl, visible, activeSection?.$id ?? "root");
218
+ useActiveItemScroll(contentRef, activeUrl, scrollToActive && visible, activeSection?.$id ?? "root");
219
219
  return (_jsx("div", { className: "flex flex-col gap-4 px-2 pt-1 pb-2", ref: contentRef, children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [group.label || group.icon ? (_jsxs("div", { className: "flex items-center gap-2 px-2 pt-2 pb-1 font-medium text-gray-900 text-label-13 [&_svg]:size-4", children: [group.icon ? (_jsx("span", { className: "shrink-0", children: group.icon })) : null, _jsx("span", { className: "min-w-0 truncate", children: group.label })] })) : null, _jsx("ul", { className: "m-0 flex list-none flex-col gap-px p-0", children: group.items.map((section, index) => (_jsx(SidebarRootItem, { activeSection: activeSection, activeUrl: activeUrl, item: section, onSelect: onSelect }, getSidebarNodeId(section, [index])))) })] }, group.id))) }));
220
220
  };
221
221
  const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
@@ -250,7 +250,7 @@ const SidebarRootItem = ({ activeSection, activeUrl, item, onSelect, }) => {
250
250
  return (_jsxs("li", { className: cn(separateDisclosure && "flex items-center gap-px"), children: [renderedItem, separateDisclosure ? (_jsx("button", { "aria-label": getRootDisclosureLabel(item.name), className: "grid size-8 flex-none cursor-pointer touch-manipulation place-content-center rounded-md bg-transparent p-0 text-gray-900 hover:bg-gray-100 focus-visible:bg-gray-100 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", onClick: (event) => onSelect(item, event.currentTarget), type: "button", children: _jsx(IconChevronRightSmall, { size: 16 }) })) : null] }));
251
251
  };
252
252
  const SidebarSectionHeader = ({ buttonRef, onBack, section, }) => (_jsx("div", { className: "mb-2 px-2 pt-1", children: _jsxs("button", { "aria-label": "Back to all documentation sections", className: "flex w-full cursor-pointer touch-manipulation flex-row items-center justify-between gap-1 rounded-md border-0 bg-transparent p-0 text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none motion-reduce:transition-none", onClick: onBack, ref: buttonRef, type: "button", children: [_jsx("span", { className: "grid size-9 flex-none place-content-center", children: _jsx(IconChevronRightSmall, { className: "rotate-180", size: 16 }) }), _jsx("span", { className: "flex min-w-0 flex-1 items-center justify-center text-button-14", children: _jsx("span", { className: "truncate", children: section.name }) }), _jsx("span", { className: "size-9 flex-none" })] }) }));
253
- const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
253
+ const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, scrollToActive, top, }) => {
254
254
  const groups = useMemo(() => getSidebarRootGroups(nodes), [nodes]);
255
255
  const currentSection = useMemo(() => findActiveRootSection(nodes, activeUrl), [activeUrl, nodes]);
256
256
  const [selectedSection, setSelectedSection] = useState(null);
@@ -335,14 +335,14 @@ const DesktopSectionsSidebar = ({ activeUrl, nodes, rootScope, top, }) => {
335
335
  shouldFocusSectionRef.current = true;
336
336
  setSelectedSection(section);
337
337
  setView("section");
338
- }, visible: !rootHidden }) }), activeSection ? (_jsxs("div", { className: cn("geistdocs-sidebar-pane", sectionHidden &&
338
+ }, scrollToActive: scrollToActive, visible: !rootHidden }) }), activeSection ? (_jsxs("div", { className: cn("geistdocs-sidebar-pane", sectionHidden &&
339
339
  "pointer-events-none absolute inset-x-0 top-0 opacity-0 [transform:translateX(8px)] motion-reduce:invisible"), "data-sidebar-pane": "section", inert: sectionHidden || undefined, children: [_jsx(SidebarSectionHeader, { buttonRef: sectionHeaderRef, onBack: () => {
340
340
  shouldFocusRootRef.current = true;
341
341
  setSelectedSection(null);
342
342
  setView("root");
343
- }, section: activeSection }), _jsx("div", { className: "px-2", children: _jsx(SidebarTree, { activeUrl: activeUrl, idScope: sectionScope, nodes: sectionItems, openFirstLevel: true, scrollActive: true, visible: !sectionHidden }) })] })) : null] })] }) }) }) }));
343
+ }, section: activeSection }), _jsx("div", { className: "px-2", children: _jsx(SidebarTree, { activeUrl: activeUrl, idScope: sectionScope, nodes: sectionItems, openFirstLevel: true, scrollActive: scrollToActive, visible: !sectionHidden }) })] })) : null] })] }) }) }) }));
344
344
  };
345
- const DesktopTreeSidebar = ({ activeUrl, nodes, rootScope, top, }) => (_jsx("div", { className: "pointer-events-none sticky top-(--fd-docs-row-1) z-20 @min-[961px]:block hidden h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] @min-[961px]:layout:[--fd-sidebar-width:300px] [grid-area:sidebar] *:pointer-events-auto", "data-sidebar-mode": "tree", "data-sidebar-placeholder": true, children: _jsx("aside", { className: "h-full w-[300px] pr-3 text-gray-900", children: _jsx(MouseDownNavigation, { children: _jsxs("nav", { "aria-label": "Documentation", className: "geistdocs-sidebar-scroll h-full w-full overflow-auto overflow-x-hidden px-3 pt-14 pb-1 outline-none", "data-geistdocs-sidebar-scroll": true, children: [top ? _jsx("div", { className: "pb-3", children: top }) : null, _jsx(SidebarTree, { activeUrl: activeUrl, idScope: rootScope, nodes: nodes, openFirstLevel: true, scrollActive: true })] }) }) }) }));
345
+ const DesktopTreeSidebar = ({ activeUrl, nodes, rootScope, scrollToActive, top, }) => (_jsx("div", { className: "pointer-events-none sticky top-(--fd-docs-row-1) z-20 @min-[961px]:block hidden h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] @min-[961px]:layout:[--fd-sidebar-width:300px] [grid-area:sidebar] *:pointer-events-auto", "data-sidebar-mode": "tree", "data-sidebar-placeholder": true, children: _jsx("aside", { className: "h-full w-[300px] pr-3 text-gray-900", children: _jsx(MouseDownNavigation, { children: _jsxs("nav", { "aria-label": "Documentation", className: "geistdocs-sidebar-scroll h-full w-full overflow-auto overflow-x-hidden px-3 pt-14 pb-1 outline-none", "data-geistdocs-sidebar-scroll": true, children: [top ? _jsx("div", { className: "pb-3", children: top }) : null, _jsx(SidebarTree, { activeUrl: activeUrl, idScope: rootScope, nodes: nodes, openFirstLevel: true, scrollActive: scrollToActive })] }) }) }) }));
346
346
  const DesktopSidebar = ({ mode, ...props }) => {
347
347
  if (mode === "tree") {
348
348
  return _jsx(DesktopTreeSidebar, { ...props });
@@ -353,7 +353,7 @@ const MobileSidebar = ({ activeUrl, idScope, nodes, onOpenChange, open, top, })
353
353
  // A full-width slide with no fade, so the page never shows through.
354
354
  // `!` overrides the state-variant animation classes provider sheets set.
355
355
  "data-[state=closed]:fade-out-100! data-[state=open]:fade-in-100! data-[state=closed]:slide-out-to-left! data-[state=open]:slide-in-from-left! duration-300! ease-[cubic-bezier(0.32,0.72,0,1)]! motion-reduce:animate-none!"), "data-geistdocs-mobile-sidebar": true, noOverlay: true, side: "left", children: [_jsxs(SheetHeader, { className: "h-16 shrink-0 flex-row items-center justify-between gap-2 border-b px-4 py-0 text-left", children: [_jsx(SheetTitle, { className: "text-label-16", children: "Browse" }), _jsx(SheetDescription, { className: "sr-only", children: "Navigation for the documentation." }), _jsx(SheetClose, { "aria-label": "Close menu", className: "-mr-2 grid size-8 shrink-0 touch-manipulation place-items-center rounded-md text-gray-900 transition-colors hover:bg-gray-alpha-100 hover:text-gray-1000 focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none active:bg-gray-alpha-300 motion-reduce:transition-none", children: _jsx(IconCross, { size: 16 }) })] }), _jsx(MouseDownNavigation, { children: _jsxs("nav", { "aria-label": "Documentation", className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-2 py-3 text-gray-900", "data-geistdocs-sidebar-scroll": true, children: [_jsx("div", { className: "pb-4 [&>button]:w-full", children: _jsx(SearchButton, { onClick: () => onOpenChange(false) }) }), top ? _jsx("div", { className: "pb-4", children: top }) : null, _jsx(SidebarTree, { activeUrl: activeUrl, idScope: idScope, nodes: nodes, onNavigate: () => onOpenChange(false), scrollActive: true, visible: open })] }) })] }) }));
356
- export const GeistdocsSidebar = ({ mode = "sections", showDesktop = true, top, }) => {
356
+ export const GeistdocsSidebar = ({ mode = "sections", scrollToActive = true, showDesktop = true, top, }) => {
357
357
  const { root, full } = useTreeContext();
358
358
  const { isOpen, setIsOpen } = useGeistdocsSidebar();
359
359
  const containerRef = useRef(null);
@@ -383,5 +383,5 @@ export const GeistdocsSidebar = ({ mode = "sections", showDesktop = true, top, }
383
383
  return (_jsxs(_Fragment, { children: [_jsx("span", { hidden: true, ref: (marker) => {
384
384
  containerRef.current =
385
385
  marker?.closest("[data-geistdocs-container]") ?? null;
386
- } }), showDesktop ? (_jsx(DesktopSidebar, { activeUrl: activeUrl, mode: mode, nodes: root.children, rootScope: rootScope, top: top }, root.$id)) : null, _jsx(MobileSidebar, { activeUrl: activeUrl, idScope: rootScope, nodes: root.children, onOpenChange: setIsOpen, open: isOpen, top: top })] }));
386
+ } }), showDesktop ? (_jsx(DesktopSidebar, { activeUrl: activeUrl, mode: mode, nodes: root.children, rootScope: rootScope, scrollToActive: scrollToActive, top: top }, root.$id)) : null, _jsx(MobileSidebar, { activeUrl: activeUrl, idScope: rootScope, nodes: root.children, onOpenChange: setIsOpen, open: isOpen, top: top })] }));
387
387
  };
package/dist/layout.d.ts CHANGED
@@ -9,9 +9,15 @@ interface GeistdocsDocsLayoutProps {
9
9
  config: Pick<GeistdocsConfig, "defaultLanguage" | "translations">;
10
10
  containerProps?: ComponentProps<typeof FumadocsDocsLayout>["containerProps"];
11
11
  sidebarMode?: GeistdocsSidebarMode;
12
+ /**
13
+ * Scroll the desktop sidebar to reveal the current page when it is out of
14
+ * view after a navigation. Set false to keep the sidebar where it is.
15
+ * @default true
16
+ */
17
+ sidebarScrollToActive?: boolean;
12
18
  sidebarTop?: ReactNode;
13
19
  tree: ComponentProps<typeof FumadocsDocsLayout>["tree"];
14
20
  }
15
- export declare const GeistdocsDocsLayout: ({ config, containerProps, sidebarMode, sidebarTop, tree, children, }: GeistdocsDocsLayoutProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const GeistdocsDocsLayout: ({ config, containerProps, sidebarMode, sidebarScrollToActive, sidebarTop, tree, children, }: GeistdocsDocsLayoutProps) => import("react/jsx-runtime").JSX.Element;
16
22
  export {};
17
23
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,WAAW,CAAC;AAEhF,eAAO,MAAM,iBAAiB,iHAA0B,CAAC;AAIzD,eAAO,MAAM,oBAAoB,+CAShC,CAAC;AAEF,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,GAAI,sEAOjC,wBAAwB,4CAkC1B,CAAC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,WAAW,CAAC;AAEhF,eAAO,MAAM,iBAAiB,iHAA0B,CAAC;AAIzD,eAAO,MAAM,oBAAoB,+CAShC,CAAC;AAEF,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7E,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,GAAI,6FAQjC,wBAAwB,4CAwC1B,CAAC"}
package/dist/layout.js CHANGED
@@ -11,7 +11,7 @@ const chatOpenScript = `(function(){try{if(localStorage.getItem(${JSON.stringify
11
11
  export const GeistdocsThemeScript = () => (_jsxs(_Fragment, { children: [_jsx(GeistThemeScript, { storageKey: "geistdocs-theme" }), _jsx("script", {
12
12
  // biome-ignore lint/security/noDangerouslySetInnerHtml: the storage key and attribute are package constants; no user-authored HTML is inserted.
13
13
  dangerouslySetInnerHTML: { __html: chatOpenScript }, id: "geistdocs-chat-open-script" })] }));
14
- export const GeistdocsDocsLayout = ({ config, containerProps, sidebarMode, sidebarTop, tree, children, }) => {
14
+ export const GeistdocsDocsLayout = ({ config, containerProps, sidebarMode, sidebarScrollToActive, sidebarTop, tree, children, }) => {
15
15
  const { i18n } = createGeistdocsI18n(config);
16
16
  return (_jsx(GeistdocsSidebarProvider, { children: _jsx(FumadocsDocsLayout, { containerProps: {
17
17
  ...containerProps,
@@ -25,7 +25,7 @@ export const GeistdocsDocsLayout = ({ config, containerProps, sidebarMode, sideb
25
25
  enabled: false,
26
26
  }, sidebar: {
27
27
  collapsible: false,
28
- component: _jsx(GeistdocsSidebar, { mode: sidebarMode, top: sidebarTop }),
28
+ component: (_jsx(GeistdocsSidebar, { mode: sidebarMode, scrollToActive: sidebarScrollToActive, top: sidebarTop })),
29
29
  }, tabMode: "auto", themeSwitch: {
30
30
  enabled: false,
31
31
  }, tree: tree, children: _jsx("main", { className: "contents", children: children }) }) }));
@@ -5,9 +5,10 @@ interface DrawerProps {
5
5
  className?: string;
6
6
  height?: number | string;
7
7
  onDismiss?: () => void;
8
+ repositionInputs?: boolean;
8
9
  show?: boolean;
9
10
  }
10
- export declare const Drawer: ({ children, className, height, onDismiss, show, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Drawer: ({ children, className, height, onDismiss, repositionInputs, show, }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export declare const DrawerTitle: ({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
12
13
  export {};
13
14
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/providers/public/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAGjD,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,GAAI,mDAMpB,WAAW,4CAsBb,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAGzB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAK9C,CAAC"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/providers/public/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAGjD,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,GAAI,qEAOpB,WAAW,4CAuBb,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAGzB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAK9C,CAAC"}