@vercel/geistdocs 2.7.8 → 2.7.10

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 (39) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/dialog.d.ts +2 -0
  3. package/dist/components/dialog.d.ts.map +1 -0
  4. package/dist/components/dialog.js +3 -0
  5. package/dist/config.d.ts +4 -5
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/internal/chat/message.d.ts.map +1 -1
  8. package/dist/internal/chat/message.js +2 -5
  9. package/dist/internal/mdx-to-markdown.d.ts.map +1 -1
  10. package/dist/internal/mdx-to-markdown.js +209 -11
  11. package/dist/internal/navbar/desktop-menu.js +2 -2
  12. package/dist/internal/navbar/mobile-menu.d.ts +1 -1
  13. package/dist/internal/navbar/mobile-menu.d.ts.map +1 -1
  14. package/dist/internal/navbar/navbar-brand.d.ts.map +1 -1
  15. package/dist/internal/navbar/navbar-brand.js +2 -4
  16. package/dist/internal/navbar/navbar-logo.d.ts +10 -16
  17. package/dist/internal/navbar/navbar-logo.d.ts.map +1 -1
  18. package/dist/internal/navbar/navbar-logo.js +9 -78
  19. package/dist/navbar.d.ts.map +1 -1
  20. package/dist/navbar.js +3 -4
  21. package/dist/providers/public/components/dialog.d.ts +27 -0
  22. package/dist/providers/public/components/dialog.d.ts.map +1 -0
  23. package/dist/providers/public/components/dialog.js +17 -0
  24. package/docs/agents.md +2 -1
  25. package/docs/llms.txt +81 -1
  26. package/docs/manifest.json +10 -1
  27. package/docs/pages/components/dialog.md +74 -0
  28. package/docs/pages/components/index.md +1 -0
  29. package/docs/sitemap.md +1 -0
  30. package/package.json +5 -1
  31. package/public-foundation.css +12 -0
  32. package/template/components/geistdocs/dialog-demo.tsx +44 -0
  33. package/template/content/docs/components/dialog.mdx +70 -0
  34. package/template/content/docs/components/index.mdx +1 -0
  35. package/template/content/docs/components/meta.json +1 -0
  36. package/template/package.json +1 -1
  37. package/dist/providers/public/components/modal.d.ts +0 -22
  38. package/dist/providers/public/components/modal.d.ts.map +0 -1
  39. package/dist/providers/public/components/modal.js +0 -19
@@ -1,14 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Link from "next/link";
4
- import { usePathname, useRouter } from "next/navigation";
5
- import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
6
- import { useEffect, useRef, useState } from "react";
7
4
  import { IconSlashForward } from "#geistdocs-assets/icons";
8
5
  import { LogoEveSvg } from "#geistdocs-assets/logos";
9
6
  import { cn } from "#geistdocs-ui/utils";
10
7
  import { LocalizedLink, useLocalizedHref } from "../localized-link";
11
- import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, } from "../ui/navigation-menu";
8
+ import { NavigationMenuLink } from "../ui/navigation-menu";
12
9
  import { NavbarBrand } from "./navbar-brand";
13
10
  export const DEFAULT_OSS_SECTION = "Open Source";
14
11
  export const DEFAULT_OSS_PRODUCTS = [
@@ -99,43 +96,23 @@ export const DEFAULT_OSS_PRODUCTS = [
99
96
  section: "Other",
100
97
  },
101
98
  ];
102
- /** Group products into columns by `section`, preserving first-seen order. */
103
- function groupOssProducts(products) {
104
- const sections = [];
105
- for (const product of products) {
106
- const heading = product.section ?? DEFAULT_OSS_SECTION;
107
- const existing = sections.find((section) => section.heading === heading);
108
- if (existing) {
109
- existing.items.push(product);
110
- }
111
- else {
112
- sections.push({ heading, items: [product] });
113
- }
114
- }
115
- return sections;
116
- }
117
99
  /**
118
- * Full-bleed panel below the header, shared by the OSS flyout and nav
119
- * dropdowns so both match the vercel.com header panel treatment. Rendered
120
- * with forceMount + hidden-when-closed so links stay in the server HTML.
100
+ * Full-bleed panel below the header used by navbar dropdowns. Rendered with
101
+ * forceMount + hidden-when-closed so links stay in the server HTML.
121
102
  */
122
103
  export const NAVBAR_PANEL_CLASSNAME = "fixed inset-x-0 top-16 z-30 w-screen bg-background-200 shadow-[0_1px_0_0_var(--ds-gray-alpha-300)] before:absolute before:inset-x-0 before:-top-3 before:h-3 before:content-[''] data-[state=closed]:hidden";
123
104
  /**
124
- * Plain hover-underline panel link, shared by the OSS flyout and nav
125
- * dropdowns. `active` marks the current page (aria-current + underline).
105
+ * Plain hover-underline link for navbar dropdown panels. `active` marks the
106
+ * current page (aria-current + underline).
126
107
  */
127
108
  export function PanelLink({ active, product, }) {
128
109
  const external = product.external ?? product.href.startsWith("http");
129
110
  const label = (_jsx("span", { className: "inline-flex items-baseline gap-1 rounded-sm text-gray-1000 text-label-20 group-focus-visible/osslink:ring-2 group-focus-visible/osslink:ring-blue-700 group-focus-visible/osslink:ring-offset-4 group-focus-visible/osslink:ring-offset-background-200", children: _jsx("span", { className: "decoration-1 underline-offset-[5px] group-hover/osslink:underline group-hover/osslink:decoration-gray-500 group-aria-[current=page]/osslink:underline group-aria-[current=page]/osslink:decoration-gray-500", children: product.label }) }));
130
111
  return (_jsx(NavigationMenuLink, { active: active, asChild: true, children: external ? (_jsx("a", { className: "group/osslink inline-flex w-full no-underline outline-none", href: product.href, rel: "noopener noreferrer", target: "_blank", children: label })) : (_jsx(LocalizedLink, { className: "group/osslink inline-flex w-full no-underline outline-none", href: product.href, children: label })) }));
131
112
  }
132
- function OssFeaturedCard({ product }) {
133
- const external = product.external ?? product.href.startsWith("http");
134
- const card = (_jsxs("span", { className: "flex h-full w-[220px] flex-col gap-3 rounded-lg border border-gray-alpha-400 bg-background-100 p-4 no-underline transition-colors hover:border-gray-alpha-500", children: [_jsx("span", { className: "flex flex-1 items-center justify-center rounded-md bg-gray-100", children: product.logo }), product.description ? (_jsx("span", { className: "text-copy-14 text-gray-900", children: product.description })) : null] }));
135
- return (_jsx(NavigationMenuLink, { asChild: true, children: external ? (_jsx("a", { className: "w-fit! rounded-lg no-underline outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-200", href: product.href, rel: "noopener noreferrer", target: "_blank", children: card })) : (_jsx(LocalizedLink, { className: "w-fit! rounded-lg no-underline outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-200", href: product.href, children: card })) }));
136
- }
137
113
  /**
138
- * Resolve the OSS flyout list (custom or default) and drop the active product.
114
+ * Resolve the mobile OSS product list (custom or default) and drop the active
115
+ * product.
139
116
  * Lives here (a "use client" module) because `DEFAULT_OSS_PRODUCTS` holds JSX
140
117
  * and is a client-only value — resolving it on the server yields a client
141
118
  * reference, not the array.
@@ -144,53 +121,7 @@ export function resolveOssProducts(products, activeProduct) {
144
121
  return (products ?? DEFAULT_OSS_PRODUCTS).filter((product) => product.id !== activeProduct && product.href !== activeProduct);
145
122
  }
146
123
  export function NavbarLogo({ brand, className, href = "/", ...props }) {
147
- const isOss = props.variant === "oss";
148
- const ossProducts = isOss
149
- ? resolveOssProducts(props.ossProducts, props.activeProduct)
150
- : [];
151
- const featuredProducts = ossProducts.filter((product) => product.featured);
152
- const ossSections = groupOssProducts(ossProducts.filter((product) => !product.featured));
153
- const [navValue, setNavValue] = useState("");
154
- const logoHoveredRef = useRef(false);
155
- const suppressLogoHoverRef = useRef(false);
156
- const pathname = usePathname();
157
- const previousPathnameRef = useRef(pathname);
158
- const router = useRouter();
159
124
  // Like every other navbar link, the wordmark keeps the active locale.
160
125
  const localizedHref = useLocalizedHref(href);
161
- useEffect(() => {
162
- if (isOss) {
163
- router.prefetch(localizedHref);
164
- }
165
- }, [isOss, router, localizedHref]);
166
- useEffect(() => {
167
- if (pathname !== previousPathnameRef.current) {
168
- logoHoveredRef.current = false;
169
- setNavValue("");
170
- previousPathnameRef.current = pathname;
171
- }
172
- }, [pathname]);
173
- return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(NavbarBrand, { brand: brand, variant: props.variant }), _jsx("div", { className: "w-5 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, { size: 20 }) }), isOss ? (_jsxs(_Fragment, { children: [_jsx(Link, { className: "flex @min-[1024px]:hidden items-center text-gray-1000", href: localizedHref, prefetch: true, children: props.logo }), _jsxs("div", { className: "@min-[1024px]:contents hidden", children: [_jsx(NavigationMenu, { "aria-label": "Product navigation", delayDuration: 0, onValueChange: (value) => {
174
- if (value && suppressLogoHoverRef.current) {
175
- return;
176
- }
177
- if (value || !logoHoveredRef.current) {
178
- setNavValue(value);
179
- }
180
- }, skipDelayDuration: 0, value: navValue, viewport: false, children: _jsx(NavigationMenuList, { className: "h-16 items-stretch", children: _jsxs(NavigationMenuItem, { className: "-mr-3 flex h-full items-center", onMouseLeave: () => {
181
- suppressLogoHoverRef.current = false;
182
- }, value: "oss-products", children: [_jsx(Link, { className: "relative flex h-full items-center text-gray-1000 outline-none before:absolute before:inset-x-0 before:top-1/2 before:h-9 before:-translate-y-1/2 before:rounded-md before:content-[''] focus-visible:before:ring-2 focus-visible:before:ring-blue-700 focus-visible:before:ring-inset", href: localizedHref, onClick: () => {
183
- suppressLogoHoverRef.current = true;
184
- if (pathname === localizedHref) {
185
- logoHoveredRef.current = false;
186
- setNavValue("");
187
- }
188
- }, onMouseEnter: () => {
189
- logoHoveredRef.current = true;
190
- if (!suppressLogoHoverRef.current) {
191
- setNavValue("oss-products");
192
- }
193
- }, onMouseLeave: () => {
194
- logoHoveredRef.current = false;
195
- }, children: props.logo }), _jsx(NavigationMenuTrigger, { "aria-label": "Open product menu", className: "relative flex h-full w-10 items-center justify-center px-1 text-gray-1000 outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-inset [&_svg]:top-0 [&_svg]:-translate-x-1.5" }), _jsx(NavigationMenuPrimitive.Content, { className: NAVBAR_PANEL_CLASSNAME, forceMount: true, children: _jsx("div", { className: "mx-auto w-full max-w-[1448px] px-2", children: _jsxs("div", { className: "flex flex-nowrap gap-x-10 pt-4 pb-6 pl-4", children: [featuredProducts.length > 0 ? (_jsxs("div", { className: "flex shrink-0 flex-col", children: [_jsx("p", { className: "text-gray-900 text-label-14", children: "Latest" }), _jsx("div", { className: "mt-[5px] flex flex-1 gap-x-10", children: featuredProducts.map((product) => (_jsx(OssFeaturedCard, { product: product }, product.href))) })] })) : null, ossSections.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((product) => (_jsx("li", { className: "flex", children: _jsx(PanelLink, { product: product }) }, product.href))) })] }, section.heading)))] }) }) })] }) }) }), _jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none fixed inset-x-0 top-16 bottom-0 z-0 bg-background-200/60", navValue ? "opacity-100" : "opacity-0") })] })] })) : (_jsx(Link, { className: "flex items-center text-gray-1000", href: localizedHref, prefetch: true, children: props.logo }))] }));
126
+ return (_jsxs("span", { className: cn("flex items-center gap-2.5", className), children: [_jsx(NavbarBrand, { brand: brand, variant: props.variant }), _jsx("div", { className: "w-5 text-center text-gray-alpha-400 text-lg dark:text-gray-600", children: _jsx(IconSlashForward, { size: 20 }) }), _jsx(Link, { className: "flex items-center text-gray-1000", href: localizedHref, prefetch: true, children: props.logo })] }));
196
127
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,UAAU,GACV,KAAK,GACL,qBAAqB,GACrB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CAsE7C,CAAC"}
1
+ {"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../src/navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQhD,UAAU,WAAW;IACnB,MAAM,EAAE,IAAI,CACV,eAAe,EACb,QAAQ,GACR,MAAM,GACN,UAAU,GACV,KAAK,GACL,qBAAqB,GACrB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,eAAe,CAClB,CAAC;CACH;AAKD,eAAO,MAAM,MAAM,GAAI,YAAY,WAAW,4CAmE7C,CAAC"}
package/dist/navbar.js CHANGED
@@ -13,9 +13,8 @@ export const Navbar = ({ config }) => {
13
13
  const isOss = variant === "oss";
14
14
  const showGithub = config.navbarGithub?.enabled !== false;
15
15
  const githubUrl = showGithub ? getGithubRepoUrl(config.github) : null;
16
- // The default product list lives in a "use client" module, so it can only be
17
- // resolved and filtered inside the client menus below. Pass the raw custom
18
- // list (if any) and the active product down; each menu drops the active one.
16
+ // The default product list lives in a "use client" module, so it is resolved
17
+ // and filtered inside the mobile menu.
19
18
  const activeProduct = config.navbarActiveProduct;
20
- return (_jsx(NavbarShell, { children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [isOss ? (_jsx(NavbarLogo, { activeProduct: activeProduct, brand: config.navbarBrand, className: "ml-4", href: config.logoHref, logo: config.logo, ossProducts: config.navbarOssProducts, variant: "oss" })) : (_jsx(NavbarLogo, { brand: config.navbarBrand, className: "ml-4", href: config.logoHref, logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: "@min-[1024px]:flex hidden w-36" }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0", size: "small", variant: "secondary" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden", size: "small", variant: "secondary" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { activeProduct: activeProduct, githubUrl: githubUrl, nav: nav, ossProducts: config.navbarOssProducts, showOss: isOss })] })] }) }));
19
+ return (_jsx(NavbarShell, { children: _jsxs("div", { className: "@container mx-auto flex w-full max-w-[1448px] justify-between px-2", children: [_jsxs("div", { className: "flex select-none flex-row items-center", children: [isOss ? (_jsx(NavbarLogo, { brand: config.navbarBrand, className: "ml-4", href: config.logoHref, logo: config.logo, variant: "oss" })) : (_jsx(NavbarLogo, { brand: config.navbarBrand, className: "ml-4", href: config.logoHref, logo: config.logo, variant: "standard" })), _jsx(DesktopMenu, { className: "@min-[1024px]:flex hidden", items: nav })] }), _jsxs("div", { className: "mr-4 flex flex-row items-center justify-end gap-2", children: [_jsx(SearchButton, { className: "@min-[1024px]:flex hidden w-36" }), _jsx(AskAIButton, { className: "@min-[768px]:flex hidden shrink-0", size: "small", variant: "secondary" }), _jsx(AskAIButton, { className: "@min-[768px]:hidden", size: "small", variant: "secondary" }), showGithub ? (_jsx(GitHubButton, { className: "@min-[768px]:inline-flex hidden shrink-0", github: config.github })) : null, _jsx(MobileMenu, { activeProduct: activeProduct, githubUrl: githubUrl, nav: nav, ossProducts: config.navbarOssProducts, showOss: isOss })] })] }) }));
21
20
  };
@@ -0,0 +1,27 @@
1
+ import { Dialog as DialogPrimitive } from "radix-ui";
2
+ import type { ComponentProps, CSSProperties, ReactNode } from "react";
3
+ import { Button } from "./button";
4
+ interface DialogProps {
5
+ active: boolean;
6
+ children: ReactNode;
7
+ drawer?: boolean;
8
+ onClickOutside: () => void;
9
+ style?: CSSProperties;
10
+ width?: number | string;
11
+ }
12
+ export declare const Dialog: ({ active, children, onClickOutside, style, width, }: DialogProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const DialogContent: ({ className, padding, style, ...props }: ComponentProps<"div"> & {
14
+ padding?: number | string | false;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const DialogHeader: ({ className, ...props }: ComponentProps<"header">) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const DialogTitle: ({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const DialogDescription: ({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const DialogFooter: ({ as: Component, children, className, }: {
20
+ as?: "footer" | "form";
21
+ children: ReactNode;
22
+ className?: string;
23
+ }) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const DialogAction: (props: ComponentProps<typeof Button>) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const DialogClose: (props: ComponentProps<typeof DialogAction>) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
27
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../src/providers/public/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,MAAM,GAAI,qDAMpB,WAAW,4CAmBb,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,yCAK3B,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;CAAE,4CAM/D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,yBAG1B,cAAc,CAAC,QAAQ,CAAC,4CAE1B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAGzB,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,4CAK9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,yBAG/B,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,4CAKpD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,yCAI1B;IACD,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CASA,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,cAAc,CAAC,OAAO,MAAM,CAAC,4CAEhE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,cAAc,CAAC,OAAO,YAAY,CAAC,4CAErE,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog as DialogPrimitive } from "radix-ui";
4
+ import { cn } from "../utils";
5
+ import { Button } from "./button";
6
+ export const Dialog = ({ active, children, onClickOutside, style, width = 540, }) => (_jsx(DialogPrimitive.Root, { onOpenChange: (open) => {
7
+ if (!open) {
8
+ onClickOutside();
9
+ }
10
+ }, open: active, children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-60 bg-gray-100 opacity-80 duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none dark:bg-background-200" }), _jsx(DialogPrimitive.Content, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.96] data-[state=open]:zoom-in-[0.96] fixed top-1/2 left-1/2 z-70 max-h-[85dvh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-auto rounded-xl bg-background-100 shadow-[var(--ds-shadow-modal-elevated)] outline-none duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.1)] data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", style: { maxWidth: width, ...style }, children: children })] }) }));
11
+ export const DialogContent = ({ className, padding = 20, style, ...props }) => (_jsx("div", { className: cn("relative overflow-x-hidden", className), style: { padding: padding || 0, ...style }, ...props }));
12
+ export const DialogHeader = ({ className, ...props }) => (_jsx("header", { className: cn("mb-5 last:mb-0", className), ...props }));
13
+ export const DialogTitle = ({ className, ...props }) => (_jsx(DialogPrimitive.Title, { className: cn("text-gray-1000 text-heading-20", className), ...props }));
14
+ export const DialogDescription = ({ className, ...props }) => (_jsx(DialogPrimitive.Description, { className: cn("mt-2 mb-1 text-copy-14 text-gray-900", className), ...props }));
15
+ export const DialogFooter = ({ as: Component = "footer", children, className, }) => (_jsx(Component, { className: cn("sticky bottom-0 flex shrink-0 justify-between p-3 before:absolute before:bottom-full before:left-0 before:-z-10 before:h-3 before:w-full before:translate-y-[275%] before:bg-black/[0.075] before:blur-[3px] before:transition-transform before:duration-200 after:absolute after:inset-0 after:-z-10 after:rounded-none after:bg-background-200 after:shadow-[0_-1px_0_0_var(--ds-gray-alpha-400)] peer-[&]/sticky-bottom:before:translate-y-[75%] sm:after:rounded-b-xl dark-theme:before:bg-white/10 [&>div]:flex [&>div]:gap-4", className), children: children }));
16
+ export const DialogAction = (props) => (_jsx(Button, { ...props, size: "small" }));
17
+ export const DialogClose = (props) => (_jsx(DialogAction, { ...props }));
package/docs/agents.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Docs
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 2.7.8 so agents can understand the installed package without web access.
3
+ These docs are bundled with `@vercel/geistdocs` 2.7.10 so agents can understand the installed package without web access.
4
4
  They are generated from `apps/template/content/docs` during the package build.
5
5
 
6
6
  ## How to use these files
@@ -47,6 +47,7 @@ They are generated from `apps/template/content/docs` during the package build.
47
47
  - [Configure sidebar navigation](pages/guides/nested-navigation.md): Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
48
48
  - [Copy Prompt](pages/components/copy-prompt.md): Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
49
49
  - [Details](pages/components/details.md): Compose Details and Summary for accessible browser-native disclosures.
50
+ - [Dialog](pages/components/dialog.md): Compose Dialog primitives for modal search, chat, forms, and confirmations.
50
51
  - [Dropdown Menu](pages/components/dropdown-menu.md): Compose DropdownMenu primitives for application-owned menus outside MDX.
51
52
  - [Edit on GitHub](pages/edit-on-github.md): A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
52
53
  - [Feedback](pages/feedback.md): An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Geistdocs Package Documentation
2
2
 
3
- These docs are bundled with `@vercel/geistdocs` 2.7.8.
3
+ These docs are bundled with `@vercel/geistdocs` 2.7.10.
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
@@ -30,6 +30,7 @@ They describe how to build package-backed Geistdocs sites and how to use the pac
30
30
  - [Configure sidebar navigation](pages/guides/nested-navigation.md): Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
31
31
  - [Copy Prompt](pages/components/copy-prompt.md): Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
32
32
  - [Details](pages/components/details.md): Compose Details and Summary for accessible browser-native disclosures.
33
+ - [Dialog](pages/components/dialog.md): Compose Dialog primitives for modal search, chat, forms, and confirmations.
33
34
  - [Dropdown Menu](pages/components/dropdown-menu.md): Compose DropdownMenu primitives for application-owned menus outside MDX.
34
35
  - [Edit on GitHub](pages/edit-on-github.md): A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
35
36
  - [Feedback](pages/feedback.md): An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
@@ -4310,6 +4311,7 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
4310
4311
  | [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
4311
4312
  | [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
4312
4313
  | [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
4314
+ | [Dialog](/docs/components/dialog) | `components/dialog` | Modal search, chat, forms, and confirmations |
4313
4315
  | [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
4314
4316
  | [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
4315
4317
  | [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
@@ -4636,6 +4638,84 @@ export function Disclosure() {
4636
4638
  `Details` and `Summary` are also included in the default MDX component map.
4637
4639
 
4638
4640
 
4641
+ ---
4642
+
4643
+ ---
4644
+ title: Dialog
4645
+ description: Display focused content in an accessible modal
4646
+ type: reference
4647
+ summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
4648
+ url: /docs/components/dialog
4649
+ source: apps/template/content/docs/components/dialog.mdx
4650
+ related:
4651
+ - /docs/components
4652
+ - /docs/components/button
4653
+ - /docs/components/popover
4654
+ ---
4655
+
4656
+ # Dialog
4657
+
4658
+ import { DialogDemo } from "@/components/geistdocs/dialog-demo";
4659
+
4660
+ <div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
4661
+ <DialogDemo />
4662
+ </div>
4663
+
4664
+ ```tsx
4665
+ "use client";
4666
+
4667
+ import {
4668
+ Dialog,
4669
+ DialogAction,
4670
+ DialogClose,
4671
+ DialogContent,
4672
+ DialogDescription,
4673
+ DialogFooter,
4674
+ DialogHeader,
4675
+ DialogTitle,
4676
+ } from "@vercel/geistdocs/components/dialog";
4677
+ import { useState } from "react";
4678
+
4679
+ export function SearchDialog() {
4680
+ const [active, setActive] = useState(false);
4681
+
4682
+ return (
4683
+ <>
4684
+ <button onClick={() => setActive(true)}>Search</button>
4685
+ <Dialog
4686
+ active={active}
4687
+ drawer={false}
4688
+ onClickOutside={() => setActive(false)}
4689
+ >
4690
+ <DialogContent>
4691
+ <DialogHeader>
4692
+ <DialogTitle>Search documentation</DialogTitle>
4693
+ <DialogDescription>Type a query to find a page.</DialogDescription>
4694
+ </DialogHeader>
4695
+ {/* Search input and results */}
4696
+ </DialogContent>
4697
+ <DialogFooter>
4698
+ <DialogClose
4699
+ onClick={() => setActive(false)}
4700
+ variant="secondary"
4701
+ >
4702
+ Cancel
4703
+ </DialogClose>
4704
+ <DialogAction onClick={() => setActive(false)}>Search</DialogAction>
4705
+ </DialogFooter>
4706
+ </Dialog>
4707
+ </>
4708
+ );
4709
+ }
4710
+ ```
4711
+
4712
+ `Dialog` is controlled through `active` and `onClickOutside`. Set `drawer={false}` for a centered dialog on every viewport, or omit it to allow mobile drawer behavior where supported.
4713
+
4714
+ Always provide a `DialogTitle` and `DialogDescription`. `DialogAction` and `DialogClose` render action buttons; call your close-state setter from `DialogClose.onClick`.
4715
+
4716
+ Import these components from `@vercel/geistdocs/components/dialog`. The public package provides a compatible implementation, while the private package aliases Geistcn's official Modal components under the same `Dialog*` names.
4717
+
4718
+
4639
4719
  ---
4640
4720
 
4641
4721
  ---
@@ -233,6 +233,15 @@
233
233
  "type": "reference",
234
234
  "url": "/docs/components/details"
235
235
  },
236
+ {
237
+ "description": "Display focused content in an accessible modal",
238
+ "path": "pages/components/dialog.md",
239
+ "source": "apps/template/content/docs/components/dialog.mdx",
240
+ "summary": "Compose Dialog primitives for modal search, chat, forms, and confirmations.",
241
+ "title": "Dialog",
242
+ "type": "reference",
243
+ "url": "/docs/components/dialog"
244
+ },
236
245
  {
237
246
  "description": "Render accessible action and selection menus",
238
247
  "path": "pages/components/dropdown-menu.md",
@@ -449,5 +458,5 @@
449
458
  }
450
459
  ],
451
460
  "source": "apps/template/content/docs",
452
- "version": "2.7.8"
461
+ "version": "2.7.10"
453
462
  }
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: Dialog
3
+ description: Display focused content in an accessible modal
4
+ type: reference
5
+ summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
6
+ url: /docs/components/dialog
7
+ source: apps/template/content/docs/components/dialog.mdx
8
+ related:
9
+ - /docs/components
10
+ - /docs/components/button
11
+ - /docs/components/popover
12
+ ---
13
+
14
+ # Dialog
15
+
16
+ import { DialogDemo } from "@/components/geistdocs/dialog-demo";
17
+
18
+ <div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
19
+ <DialogDemo />
20
+ </div>
21
+
22
+ ```tsx
23
+ "use client";
24
+
25
+ import {
26
+ Dialog,
27
+ DialogAction,
28
+ DialogClose,
29
+ DialogContent,
30
+ DialogDescription,
31
+ DialogFooter,
32
+ DialogHeader,
33
+ DialogTitle,
34
+ } from "@vercel/geistdocs/components/dialog";
35
+ import { useState } from "react";
36
+
37
+ export function SearchDialog() {
38
+ const [active, setActive] = useState(false);
39
+
40
+ return (
41
+ <>
42
+ <button onClick={() => setActive(true)}>Search</button>
43
+ <Dialog
44
+ active={active}
45
+ drawer={false}
46
+ onClickOutside={() => setActive(false)}
47
+ >
48
+ <DialogContent>
49
+ <DialogHeader>
50
+ <DialogTitle>Search documentation</DialogTitle>
51
+ <DialogDescription>Type a query to find a page.</DialogDescription>
52
+ </DialogHeader>
53
+ {/* Search input and results */}
54
+ </DialogContent>
55
+ <DialogFooter>
56
+ <DialogClose
57
+ onClick={() => setActive(false)}
58
+ variant="secondary"
59
+ >
60
+ Cancel
61
+ </DialogClose>
62
+ <DialogAction onClick={() => setActive(false)}>Search</DialogAction>
63
+ </DialogFooter>
64
+ </Dialog>
65
+ </>
66
+ );
67
+ }
68
+ ```
69
+
70
+ `Dialog` is controlled through `active` and `onClickOutside`. Set `drawer={false}` for a centered dialog on every viewport, or omit it to allow mobile drawer behavior where supported.
71
+
72
+ Always provide a `DialogTitle` and `DialogDescription`. `DialogAction` and `DialogClose` render action buttons; call your close-state setter from `DialogClose.onClick`.
73
+
74
+ Import these components from `@vercel/geistdocs/components/dialog`. The public package provides a compatible implementation, while the private package aliases Geistcn's official Modal components under the same `Dialog*` names.
@@ -32,6 +32,7 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
32
32
  | [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
33
33
  | [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
34
34
  | [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
35
+ | [Dialog](/docs/components/dialog) | `components/dialog` | Modal search, chat, forms, and confirmations |
35
36
  | [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
36
37
  | [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
37
38
  | [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
package/docs/sitemap.md CHANGED
@@ -28,6 +28,7 @@ Use it to choose focused page files from `docs/pages/` before reading the full `
28
28
  - [Configure sidebar navigation](pages/guides/nested-navigation.md) | URL: /docs/guides/nested-navigation | Type: guide | Summary: Configure sidebar order, section labels, folder landing pages, and deeply nested page trees with meta.json files.
29
29
  - [Copy Prompt](pages/components/copy-prompt.md) | URL: /docs/components/copy-prompt | Type: reference | Summary: Use CopyPrompt for reusable instructions that readers can send to an AI assistant.
30
30
  - [Details](pages/components/details.md) | URL: /docs/components/details | Type: reference | Summary: Compose Details and Summary for accessible browser-native disclosures.
31
+ - [Dialog](pages/components/dialog.md) | URL: /docs/components/dialog | Type: reference | Summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
31
32
  - [Dropdown Menu](pages/components/dropdown-menu.md) | URL: /docs/components/dropdown-menu | Type: reference | Summary: Compose DropdownMenu primitives for application-owned menus outside MDX.
32
33
  - [Edit on GitHub](pages/edit-on-github.md) | URL: /docs/edit-on-github | Type: integration | Summary: A direct link on every documentation page that lets readers propose changes through GitHub pull requests.
33
34
  - [Feedback](pages/feedback.md) | URL: /docs/feedback | Type: integration | Summary: An interactive feedback widget that collects user sentiment and creates structured GitHub Issues automatically.
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": "2.7.8",
4
+ "version": "2.7.10",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -235,6 +235,10 @@
235
235
  "types": "./dist/components/details.d.ts",
236
236
  "default": "./dist/components/details.js"
237
237
  },
238
+ "./components/dialog": {
239
+ "types": "./dist/components/dialog.d.ts",
240
+ "default": "./dist/components/dialog.js"
241
+ },
238
242
  "./components/image": {
239
243
  "types": "./dist/components/image.d.ts",
240
244
  "default": "./dist/components/image.js"
@@ -287,6 +287,12 @@
287
287
  0px 8px 16px -4px rgba(0, 0, 0, 0.04),
288
288
  0px 24px 32px -8px rgba(0, 0, 0, 0.06), var(--ds-shadow-background-border);
289
289
 
290
+ --ds-shadow-modal-elevated:
291
+ 0px 0px 0px 1px rgba(0, 0, 0, 0.08),
292
+ 0px 32px 72px -12px rgba(0, 0, 0, 0.06),
293
+ 0px 8px 32px -12px rgba(0, 0, 0, 0.08),
294
+ 0px 8px 24px -12px rgba(0, 0, 0, 0.12);
295
+
290
296
  --ds-focus-ring:
291
297
  0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-blue-700);
292
298
  --ds-focus-border:
@@ -444,6 +450,12 @@
444
450
  0px 8px 16px -4px rgba(0, 0, 0, 0.16),
445
451
  0px 24px 32px -8px rgba(0, 0, 0, 0.24), var(--ds-shadow-background-border);
446
452
 
453
+ --ds-shadow-modal-elevated:
454
+ 0 0 0 1px var(--ds-gray-alpha-400),
455
+ 0px 32px 72px -12px rgba(0, 0, 0, 0.06),
456
+ 0px 8px 32px -12px rgba(0, 0, 0, 0.08),
457
+ 0px 8px 24px -12px rgba(0, 0, 0, 0.12);
458
+
447
459
  --ds-shadow-fullscreen:
448
460
  var(--ds-shadow-border-base), 0px 1px 1px rgba(0, 0, 0, 0.08),
449
461
  0px 8px 16px -4px rgba(0, 0, 0, 0.16),
@@ -0,0 +1,44 @@
1
+ "use client";
2
+
3
+ import { Button } from "@vercel/geistdocs/components/button";
4
+ import {
5
+ Dialog,
6
+ DialogClose,
7
+ DialogContent,
8
+ DialogDescription,
9
+ DialogFooter,
10
+ DialogHeader,
11
+ DialogTitle,
12
+ } from "@vercel/geistdocs/components/dialog";
13
+ import { useState } from "react";
14
+
15
+ export function DialogDemo() {
16
+ const [active, setActive] = useState(false);
17
+
18
+ return (
19
+ <>
20
+ <Button onClick={() => setActive(true)} variant="secondary">
21
+ Open dialog
22
+ </Button>
23
+ <Dialog
24
+ active={active}
25
+ drawer={false}
26
+ onClickOutside={() => setActive(false)}
27
+ >
28
+ <DialogContent>
29
+ <DialogHeader>
30
+ <DialogTitle>Search documentation</DialogTitle>
31
+ <DialogDescription>
32
+ Dialogs work for search, chat, forms, and focused decisions.
33
+ </DialogDescription>
34
+ </DialogHeader>
35
+ </DialogContent>
36
+ <DialogFooter>
37
+ <DialogClose onClick={() => setActive(false)} variant="secondary">
38
+ Done
39
+ </DialogClose>
40
+ </DialogFooter>
41
+ </Dialog>
42
+ </>
43
+ );
44
+ }
@@ -0,0 +1,70 @@
1
+ ---
2
+ title: Dialog
3
+ description: Display focused content in an accessible modal
4
+ type: reference
5
+ summary: Compose Dialog primitives for modal search, chat, forms, and confirmations.
6
+ related:
7
+ - /docs/components
8
+ - /docs/components/button
9
+ - /docs/components/popover
10
+ ---
11
+
12
+ import { DialogDemo } from "@/components/geistdocs/dialog-demo";
13
+
14
+ <div className="not-prose my-6 flex min-h-32 items-center justify-center rounded-lg border border-gray-400 bg-background-100 p-6">
15
+ <DialogDemo />
16
+ </div>
17
+
18
+ ```tsx
19
+ "use client";
20
+
21
+ import {
22
+ Dialog,
23
+ DialogAction,
24
+ DialogClose,
25
+ DialogContent,
26
+ DialogDescription,
27
+ DialogFooter,
28
+ DialogHeader,
29
+ DialogTitle,
30
+ } from "@vercel/geistdocs/components/dialog";
31
+ import { useState } from "react";
32
+
33
+ export function SearchDialog() {
34
+ const [active, setActive] = useState(false);
35
+
36
+ return (
37
+ <>
38
+ <button onClick={() => setActive(true)}>Search</button>
39
+ <Dialog
40
+ active={active}
41
+ drawer={false}
42
+ onClickOutside={() => setActive(false)}
43
+ >
44
+ <DialogContent>
45
+ <DialogHeader>
46
+ <DialogTitle>Search documentation</DialogTitle>
47
+ <DialogDescription>Type a query to find a page.</DialogDescription>
48
+ </DialogHeader>
49
+ {/* Search input and results */}
50
+ </DialogContent>
51
+ <DialogFooter>
52
+ <DialogClose
53
+ onClick={() => setActive(false)}
54
+ variant="secondary"
55
+ >
56
+ Cancel
57
+ </DialogClose>
58
+ <DialogAction onClick={() => setActive(false)}>Search</DialogAction>
59
+ </DialogFooter>
60
+ </Dialog>
61
+ </>
62
+ );
63
+ }
64
+ ```
65
+
66
+ `Dialog` is controlled through `active` and `onClickOutside`. Set `drawer={false}` for a centered dialog on every viewport, or omit it to allow mobile drawer behavior where supported.
67
+
68
+ Always provide a `DialogTitle` and `DialogDescription`. `DialogAction` and `DialogClose` render action buttons; call your close-state setter from `DialogClose.onClick`.
69
+
70
+ Import these components from `@vercel/geistdocs/components/dialog`. The public package provides a compatible implementation, while the private package aliases Geistcn's official Modal components under the same `Dialog*` names.
@@ -28,6 +28,7 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
28
28
  | [Tabs](/docs/components/tabs) | `components/tabs`, `components/tabs-with-children` | Tab navigation and mounted content panels |
29
29
  | [Collapsible](/docs/components/collapsible) | `components/collapsible` | Expandable content regions |
30
30
  | [Details](/docs/components/details) | `components/details` | Styled native disclosure elements |
31
+ | [Dialog](/docs/components/dialog) | `components/dialog` | Modal search, chat, forms, and confirmations |
31
32
  | [Callout](/docs/components/callout) | `components/callout` | Notices with optional titles and descriptions |
32
33
  | [Code Block](/docs/components/code-block) | `components/code-block`, `components/code-block-tabs` | Highlighted code and tabbed code groups |
33
34
  | [Command Prompt](/docs/components/command-prompt) | `components/command-prompt` | Command surfaces with copy support and alternatives |
@@ -11,6 +11,7 @@
11
11
  "tabs",
12
12
  "collapsible",
13
13
  "details",
14
+ "dialog",
14
15
  "callout",
15
16
  "code-block",
16
17
  "command-prompt",
@@ -17,7 +17,7 @@
17
17
  "@streamdown/code": "^1.0.1",
18
18
  "@vercel/agent-readability": "^0.7.0",
19
19
  "@vercel/analytics": "^1.6.1",
20
- "@vercel/geistdocs": "2.7.8",
20
+ "@vercel/geistdocs": "2.7.10",
21
21
  "@vercel/speed-insights": "^1.3.1",
22
22
  "ai": "^6.0.132",
23
23
  "clsx": "^2.1.1",