@vercel/geistdocs 1.2.3 → 1.3.0-canary.5af98bc
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.
- package/dist/cli/index.js +3 -0
- package/dist/components/callout.d.ts +12 -0
- package/dist/components/callout.d.ts.map +1 -0
- package/dist/components/callout.js +7 -0
- package/dist/components/code-block-tabs.d.ts +7 -0
- package/dist/components/code-block-tabs.d.ts.map +1 -0
- package/dist/components/code-block-tabs.js +7 -0
- package/dist/components/code-block.d.ts +14 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +45 -0
- package/dist/components/copy-prompt.d.ts +11 -0
- package/dist/components/copy-prompt.d.ts.map +1 -0
- package/dist/components/copy-prompt.js +58 -0
- package/dist/components/mermaid.d.ts +4 -0
- package/dist/components/mermaid.d.ts.map +1 -0
- package/dist/components/mermaid.js +44 -0
- package/dist/components/theme-aware-image.d.ts +12 -0
- package/dist/components/theme-aware-image.d.ts.map +1 -0
- package/dist/components/theme-aware-image.js +8 -0
- package/dist/components/video.d.ts +6 -0
- package/dist/components/video.d.ts.map +1 -0
- package/dist/components/video.js +3 -0
- package/dist/config.d.ts +52 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/controls.d.ts +15 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +52 -0
- package/dist/internal/chat/context.d.ts +19 -0
- package/dist/internal/chat/context.d.ts.map +1 -0
- package/dist/internal/chat/context.js +36 -0
- package/dist/internal/chat/conversation.d.ts +10 -0
- package/dist/internal/chat/conversation.d.ts.map +1 -0
- package/dist/internal/chat/conversation.js +16 -0
- package/dist/internal/chat/copy-chat.d.ts +5 -0
- package/dist/internal/chat/copy-chat.d.ts.map +1 -0
- package/dist/internal/chat/copy-chat.js +35 -0
- package/dist/internal/chat/db.d.ts +13 -0
- package/dist/internal/chat/db.d.ts.map +1 -0
- package/dist/internal/chat/db.js +19 -0
- package/dist/internal/chat/message-metadata.d.ts +8 -0
- package/dist/internal/chat/message-metadata.d.ts.map +1 -0
- package/dist/internal/chat/message-metadata.js +29 -0
- package/dist/internal/chat/message.d.ts +11 -0
- package/dist/internal/chat/message.d.ts.map +1 -0
- package/dist/internal/chat/message.js +11 -0
- package/dist/internal/chat/prompt-input.d.ts +13 -0
- package/dist/internal/chat/prompt-input.d.ts.map +1 -0
- package/dist/internal/chat/prompt-input.js +39 -0
- package/dist/internal/chat/shell.d.ts +2 -0
- package/dist/internal/chat/shell.d.ts.map +1 -0
- package/dist/internal/chat/shell.js +194 -0
- package/dist/internal/chat/shimmer.d.ts +11 -0
- package/dist/internal/chat/shimmer.d.ts.map +1 -0
- package/dist/internal/chat/shimmer.js +18 -0
- package/dist/internal/chat/sources.d.ts +13 -0
- package/dist/internal/chat/sources.d.ts.map +1 -0
- package/dist/internal/chat/sources.js +9 -0
- package/dist/internal/chat/suggestion.d.ts +11 -0
- package/dist/internal/chat/suggestion.d.ts.map +1 -0
- package/dist/internal/chat/suggestion.js +12 -0
- package/dist/internal/cn.d.ts +3 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/internal/cn.js +3 -0
- package/dist/internal/feedback-action.d.ts +14 -0
- package/dist/internal/feedback-action.d.ts.map +1 -0
- package/dist/internal/feedback-action.js +34 -0
- package/dist/internal/i18n.d.ts +6 -0
- package/dist/internal/i18n.d.ts.map +1 -0
- package/dist/internal/i18n.js +18 -0
- package/dist/internal/languages.d.ts +7 -0
- package/dist/internal/languages.d.ts.map +1 -0
- package/dist/internal/languages.js +18 -0
- package/dist/internal/not-implemented.d.ts +2 -0
- package/dist/internal/not-implemented.d.ts.map +1 -0
- package/dist/internal/not-implemented.js +4 -0
- package/dist/internal/page-actions-client.d.ts +13 -0
- package/dist/internal/page-actions-client.d.ts.map +1 -0
- package/dist/internal/page-actions-client.js +160 -0
- package/dist/internal/page-actions.d.ts +18 -0
- package/dist/internal/page-actions.d.ts.map +1 -0
- package/dist/internal/page-actions.js +4 -0
- package/dist/internal/provider-client.d.ts +9 -0
- package/dist/internal/provider-client.d.ts.map +1 -0
- package/dist/internal/provider-client.js +23 -0
- package/dist/internal/search.d.ts +5 -0
- package/dist/internal/search.d.ts.map +1 -0
- package/dist/internal/search.js +14 -0
- package/dist/internal/sidebar.d.ts +6 -0
- package/dist/internal/sidebar.d.ts.map +1 -0
- package/dist/internal/sidebar.js +38 -0
- package/dist/internal/table-of-contents.d.ts +9 -0
- package/dist/internal/table-of-contents.d.ts.map +1 -0
- package/dist/internal/table-of-contents.js +5 -0
- package/dist/internal/ui/button-group.d.ts +13 -0
- package/dist/internal/ui/button-group.d.ts.map +1 -0
- package/dist/internal/ui/button-group.js +26 -0
- package/dist/internal/ui/button.d.ts +12 -0
- package/dist/internal/ui/button.d.ts.map +1 -0
- package/dist/internal/ui/button.js +33 -0
- package/dist/internal/ui/card.d.ts +6 -0
- package/dist/internal/ui/card.d.ts.map +1 -0
- package/dist/internal/ui/card.js +14 -0
- package/dist/internal/ui/collapsible.d.ts +6 -0
- package/dist/internal/ui/collapsible.d.ts.map +1 -0
- package/dist/internal/ui/collapsible.js +12 -0
- package/dist/internal/ui/drawer.d.ts +6 -0
- package/dist/internal/ui/drawer.d.ts.map +1 -0
- package/dist/internal/ui/drawer.js +13 -0
- package/dist/internal/ui/dropdown-menu.d.ts +22 -0
- package/dist/internal/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/internal/ui/dropdown-menu.js +41 -0
- package/dist/internal/ui/input-group.d.ts +15 -0
- package/dist/internal/ui/input-group.d.ts.map +1 -0
- package/dist/internal/ui/input-group.js +44 -0
- package/dist/internal/ui/input.d.ts +3 -0
- package/dist/internal/ui/input.d.ts.map +1 -0
- package/dist/internal/ui/input.js +5 -0
- package/dist/internal/ui/kbd.d.ts +4 -0
- package/dist/internal/ui/kbd.d.ts.map +1 -0
- package/dist/internal/ui/kbd.js +8 -0
- package/dist/internal/ui/popover.d.ts +6 -0
- package/dist/internal/ui/popover.d.ts.map +1 -0
- package/dist/internal/ui/popover.js +13 -0
- package/dist/internal/ui/scroll-area.d.ts +5 -0
- package/dist/internal/ui/scroll-area.d.ts.map +1 -0
- package/dist/internal/ui/scroll-area.js +12 -0
- package/dist/internal/ui/separator.d.ts +4 -0
- package/dist/internal/ui/separator.d.ts.map +1 -0
- package/dist/internal/ui/separator.js +7 -0
- package/dist/internal/ui/sheet.d.ts +10 -0
- package/dist/internal/ui/sheet.d.ts.map +1 -0
- package/dist/internal/ui/sheet.js +24 -0
- package/dist/internal/ui/sonner.d.ts +3 -0
- package/dist/internal/ui/sonner.d.ts.map +1 -0
- package/dist/internal/ui/sonner.js +20 -0
- package/dist/internal/ui/spinner.d.ts +3 -0
- package/dist/internal/ui/spinner.d.ts.map +1 -0
- package/dist/internal/ui/spinner.js +6 -0
- package/dist/internal/ui/textarea.d.ts +3 -0
- package/dist/internal/ui/textarea.d.ts.map +1 -0
- package/dist/internal/ui/textarea.js +5 -0
- package/dist/internal/ui/tooltip.d.ts +7 -0
- package/dist/internal/ui/tooltip.d.ts.map +1 -0
- package/dist/internal/ui/tooltip.js +16 -0
- package/dist/internal/use-mobile.d.ts +2 -0
- package/dist/internal/use-mobile.d.ts.map +1 -0
- package/dist/internal/use-mobile.js +16 -0
- package/dist/layout.d.ts +13 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +31 -0
- package/dist/mdx.d.ts +36 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +74 -0
- package/dist/pages/docs.d.ts +55 -0
- package/dist/pages/docs.d.ts.map +1 -0
- package/dist/pages/docs.js +69 -0
- package/dist/proxy.d.ts +21 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +109 -0
- package/dist/routes/chat.d.ts +13 -0
- package/dist/routes/chat.d.ts.map +1 -0
- package/dist/routes/chat.js +229 -0
- package/dist/routes/llms.d.ts +33 -0
- package/dist/routes/llms.d.ts.map +1 -0
- package/dist/routes/llms.js +39 -0
- package/dist/routes/search.d.ts +10 -0
- package/dist/routes/search.d.ts.map +1 -0
- package/dist/routes/search.js +33 -0
- package/dist/routes/sitemap.d.ts +35 -0
- package/dist/routes/sitemap.d.ts.map +1 -0
- package/dist/routes/sitemap.js +150 -0
- package/dist/sidebar.d.ts +11 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +16 -0
- package/dist/source.d.ts +30 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +72 -0
- package/package.json +137 -9
- package/styles.css +193 -0
- package/template/_gitignore +29 -0
- package/template/app/[lang]/(home)/components/centered-section.tsx +26 -0
- package/template/app/[lang]/(home)/components/cta.tsx +19 -0
- package/template/app/[lang]/(home)/components/hero.tsx +27 -0
- package/template/app/[lang]/(home)/components/one-two-section.tsx +25 -0
- package/template/app/[lang]/(home)/components/templates.tsx +50 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +20 -0
- package/template/app/[lang]/(home)/layout.tsx +14 -0
- package/template/app/[lang]/(home)/page.tsx +126 -0
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +19 -0
- package/template/app/[lang]/docs/layout.tsx +14 -0
- package/template/app/[lang]/layout.tsx +29 -0
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +7 -0
- package/template/app/[lang]/llms.txt/route.ts +6 -0
- package/template/app/[lang]/og/[...slug]/background.png +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-regular.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/geist-sans-semibold.ttf +0 -0
- package/template/app/[lang]/og/[...slug]/route.tsx +95 -0
- package/template/app/[lang]/rss.xml/route.ts +52 -0
- package/template/app/[lang]/sitemap.md/route.ts +9 -0
- package/template/app/actions/feedback/emotions.ts +18 -0
- package/template/app/actions/feedback/index.ts +45 -0
- package/template/app/api/chat/route.ts +8 -0
- package/template/app/api/search/route.ts +5 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/global.css +2 -0
- package/template/app/robots.ts +14 -0
- package/template/app/sitemap.ts +36 -0
- package/template/app/styles/geistdocs.css +554 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right-small.tsx +35 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-arrow-up-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-check.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-down-small.tsx +30 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-chevron-right.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-copy.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-file-text.tsx +25 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-menu-alt.tsx +27 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/icon-slash-forward.tsx +36 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/icons/index.tsx +11 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/index.tsx +14 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-elements.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-ai-sdk.tsx +38 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-chat-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-flags-sdk.tsx +42 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-icon-vercel.tsx +31 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-streamdown.tsx +29 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-vercel-oss.tsx +24 -0
- package/template/components/geistcn-fallbacks/geistcn-assets/logos/logo-workflow-sdk.tsx +73 -0
- package/template/components/geistdocs/callout.tsx +40 -0
- package/template/components/geistdocs/chat.tsx +24 -0
- package/template/components/geistdocs/code-block-tabs.tsx +61 -0
- package/template/components/geistdocs/code-block.tsx +134 -0
- package/template/components/geistdocs/copy-page.tsx +27 -0
- package/template/components/geistdocs/desktop-menu.tsx +52 -0
- package/template/components/geistdocs/docs-layout.tsx +20 -0
- package/template/components/geistdocs/docs-page.tsx +35 -0
- package/template/components/geistdocs/edit-source.tsx +30 -0
- package/template/components/geistdocs/feedback.tsx +139 -0
- package/template/components/geistdocs/footer.tsx +30 -0
- package/template/components/geistdocs/github-button.tsx +19 -0
- package/template/components/geistdocs/home-layout.tsx +46 -0
- package/template/components/geistdocs/icons.tsx +13 -0
- package/template/components/geistdocs/installer.tsx +58 -0
- package/template/components/geistdocs/language-selector.tsx +3 -0
- package/template/components/geistdocs/mdx-components.tsx +5 -0
- package/template/components/geistdocs/mermaid.tsx +68 -0
- package/template/components/geistdocs/mobile-docs-bar.tsx +77 -0
- package/template/components/geistdocs/mobile-menu.tsx +150 -0
- package/template/components/geistdocs/navbar-logo.tsx +124 -0
- package/template/components/geistdocs/navbar.tsx +22 -0
- package/template/components/geistdocs/provider.tsx +31 -0
- package/template/components/geistdocs/rss-button.tsx +10 -0
- package/template/components/geistdocs/scroll-top.tsx +21 -0
- package/template/components/geistdocs/search.tsx +17 -0
- package/template/components/geistdocs/sidebar.tsx +128 -0
- package/template/components/geistdocs/theme-aware-image.tsx +22 -0
- package/template/components/geistdocs/theme-toggle.tsx +3 -0
- package/template/components/geistdocs/video.tsx +16 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button-group.tsx +83 -0
- package/template/components/ui/button.tsx +60 -0
- package/template/components/ui/card.tsx +92 -0
- package/template/components/ui/collapsible.tsx +33 -0
- package/template/components/ui/command-prompt.tsx +488 -0
- package/template/components/ui/command.tsx +184 -0
- package/template/components/ui/dialog.tsx +143 -0
- package/template/components/ui/drawer.tsx +135 -0
- package/template/components/ui/dropdown-menu.tsx +257 -0
- package/template/components/ui/hover-card.tsx +44 -0
- package/template/components/ui/input-group.tsx +170 -0
- package/template/components/ui/input.tsx +21 -0
- package/template/components/ui/kbd.tsx +28 -0
- package/template/components/ui/navigation-menu.tsx +192 -0
- package/template/components/ui/popover.tsx +48 -0
- package/template/components/ui/scroll-area.tsx +58 -0
- package/template/components/ui/select.tsx +187 -0
- package/template/components/ui/separator.tsx +28 -0
- package/template/components/ui/sheet.tsx +139 -0
- package/template/components/ui/sonner.tsx +40 -0
- package/template/components/ui/spinner.tsx +16 -0
- package/template/components/ui/textarea.tsx +18 -0
- package/template/components/ui/tooltip.tsx +61 -0
- package/template/components.json +22 -0
- package/template/content/docs/ask-ai.cn.mdx +85 -0
- package/template/content/docs/ask-ai.mdx +89 -0
- package/template/content/docs/configuration.cn.mdx +115 -0
- package/template/content/docs/configuration.mdx +118 -0
- package/template/content/docs/deployment.cn.mdx +34 -0
- package/template/content/docs/deployment.mdx +40 -0
- package/template/content/docs/edit-on-github.cn.mdx +47 -0
- package/template/content/docs/edit-on-github.mdx +51 -0
- package/template/content/docs/env.cn.mdx +25 -0
- package/template/content/docs/env.mdx +29 -0
- package/template/content/docs/feedback.cn.mdx +85 -0
- package/template/content/docs/feedback.mdx +89 -0
- package/template/content/docs/getting-started.cn.mdx +86 -0
- package/template/content/docs/getting-started.mdx +107 -0
- package/template/content/docs/index.cn.mdx +54 -0
- package/template/content/docs/index.mdx +85 -0
- package/template/content/docs/internationalization.cn.mdx +111 -0
- package/template/content/docs/internationalization.mdx +122 -0
- package/template/content/docs/llms-txt.cn.mdx +50 -0
- package/template/content/docs/llms-txt.mdx +54 -0
- package/template/content/docs/md.cn.mdx +68 -0
- package/template/content/docs/md.mdx +72 -0
- package/template/content/docs/meta.json +21 -0
- package/template/content/docs/open-in-chat.cn.mdx +78 -0
- package/template/content/docs/open-in-chat.mdx +82 -0
- package/template/content/docs/provider.cn.mdx +69 -0
- package/template/content/docs/provider.mdx +73 -0
- package/template/content/docs/rss.cn.mdx +104 -0
- package/template/content/docs/rss.mdx +108 -0
- package/template/content/docs/syntax.cn.mdx +416 -0
- package/template/content/docs/syntax.mdx +411 -0
- package/template/content/docs/theme-aware-image.mdx +57 -0
- package/template/geistdocs.tsx +51 -0
- package/template/hooks/geistdocs/use-sidebar.ts +13 -0
- package/template/hooks/use-mobile.ts +19 -0
- package/template/lib/geistdocs/config.tsx +27 -0
- package/template/lib/geistdocs/fonts.ts +18 -0
- package/template/lib/geistdocs/i18n.ts +13 -0
- package/template/lib/geistdocs/md-tracking.ts +56 -0
- package/template/lib/geistdocs/source.ts +12 -0
- package/template/lib/utils.ts +6 -0
- package/template/next.config.ts +22 -0
- package/template/package.json +63 -0
- package/template/postcss.config.mjs +5 -0
- package/template/proxy.ts +16 -0
- package/template/source.config.ts +62 -0
- package/template/tsconfig.json +37 -0
- package/dist/index.js +0 -2
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../cn";
|
|
6
|
+
export function DropdownMenu(props) {
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
export function DropdownMenuTrigger(props) {
|
|
10
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
11
|
+
}
|
|
12
|
+
export function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", className), "data-slot": "dropdown-menu-content", sideOffset: sideOffset, ...props }) }));
|
|
14
|
+
}
|
|
15
|
+
export function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
16
|
+
return (_jsx(DropdownMenuPrimitive.Item, { className: cn("data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-item", "data-variant": variant, ...props }));
|
|
17
|
+
}
|
|
18
|
+
export function DropdownMenuLabel({ className, inset, ...props }) {
|
|
19
|
+
return (_jsx(DropdownMenuPrimitive.Label, { className: cn("px-2 py-1.5 font-medium text-sm data-[inset]:pl-8", className), "data-inset": inset, "data-slot": "dropdown-menu-label", ...props }));
|
|
20
|
+
}
|
|
21
|
+
export function DropdownMenuSeparator({ className, ...props }) {
|
|
22
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { className: cn("-mx-1 my-1 h-px bg-border", className), "data-slot": "dropdown-menu-separator", ...props }));
|
|
23
|
+
}
|
|
24
|
+
export function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
25
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { checked: checked, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-checkbox-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
26
|
+
}
|
|
27
|
+
export function DropdownMenuRadioGroup(props) {
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
29
|
+
}
|
|
30
|
+
export function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
31
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "dropdown-menu-radio-item", ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
export function DropdownMenuSub(props) {
|
|
34
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
35
|
+
}
|
|
36
|
+
export function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
37
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { className: cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[inset]:pl-8 data-[state=open]:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "dropdown-menu-sub-trigger", ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
38
|
+
}
|
|
39
|
+
export function DropdownMenuSubContent({ className, ...props }) {
|
|
40
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in", className), "data-slot": "dropdown-menu-sub-content", ...props }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
export declare function InputGroup({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare function InputGroupAddon({ className, align, ...props }: ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function InputGroupTextarea({ className, ...props }: ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=input-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/input-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAkBxE;AAED,QAAA,MAAM,uBAAuB;;8EAmB5B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,KAAsB,EACtB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,2CAStE;AAED,QAAA,MAAM,wBAAwB;;8EAgB7B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,IAAe,EACf,OAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,CAAC,GAC5C,YAAY,CAAC,OAAO,wBAAwB,CAAC,2CAU9C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,UAAU,CAAC,2CAW5B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../cn";
|
|
5
|
+
import { Button } from "./button";
|
|
6
|
+
import { Textarea } from "./textarea";
|
|
7
|
+
export function InputGroup({ className, ...props }) {
|
|
8
|
+
return (_jsx("div", { className: cn("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className), "data-slot": "input-group", ...props }));
|
|
9
|
+
}
|
|
10
|
+
const inputGroupAddonVariants = cva("flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 font-medium text-muted-foreground text-sm group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
11
|
+
variants: {
|
|
12
|
+
align: {
|
|
13
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
14
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
15
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3",
|
|
16
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
align: "inline-start",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
export function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
24
|
+
return (_jsx("div", { className: cn(inputGroupAddonVariants({ align }), className), "data-align": align, "data-slot": "input-group-addon", ...props }));
|
|
25
|
+
}
|
|
26
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
30
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
31
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
32
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "xs",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
export function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
40
|
+
return (_jsx(Button, { className: cn(inputGroupButtonVariants({ size }), className), "data-size": size, type: type, variant: variant, ...props }));
|
|
41
|
+
}
|
|
42
|
+
export function InputGroupTextarea({ className, ...props }) {
|
|
43
|
+
return (_jsx(Textarea, { className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className), "data-slot": "input-group-control", ...props }));
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,2CAc3E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../cn";
|
|
3
|
+
export function Input({ className, type, ...props }) {
|
|
4
|
+
return (_jsx("input", { className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), "data-slot": "input", type: type, ...props }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export declare function Kbd({ className, ...props }: ComponentProps<"kbd">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function KbdGroup({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAajE;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQtE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../cn";
|
|
3
|
+
export function Kbd({ className, ...props }) {
|
|
4
|
+
return (_jsx("kbd", { className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm bg-muted px-1 font-medium font-sans text-muted-foreground text-xs", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), "data-slot": "kbd", ...props }));
|
|
5
|
+
}
|
|
6
|
+
export function KbdGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx("kbd", { className: cn("inline-flex items-center gap-1", className), "data-slot": "kbd-group", ...props }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare function Popover(props: ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function PopoverTrigger(props: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAE1E;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAGvD;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAejD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../cn";
|
|
5
|
+
export function Popover(props) {
|
|
6
|
+
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
|
+
}
|
|
8
|
+
export function PopoverTrigger(props) {
|
|
9
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
10
|
+
}
|
|
11
|
+
export function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
12
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { align: align, className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in", className), "data-slot": "popover-content", sideOffset: sideOffset, ...props }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare function ScrollArea({ className, children, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,2CAiBjD;AAED,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBhE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../cn";
|
|
5
|
+
export function ScrollArea({ className, children, ...props }) {
|
|
6
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { className: cn("relative", className), "data-slot": "scroll-area", ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50", "data-slot": "scroll-area-viewport", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
|
+
}
|
|
8
|
+
export function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
9
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { className: cn("flex touch-none select-none p-px transition-colors", orientation === "vertical" &&
|
|
10
|
+
"h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" &&
|
|
11
|
+
"h-2.5 flex-col border-t border-t-transparent", className), "data-slot": "scroll-area-scrollbar", orientation: orientation, ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border", "data-slot": "scroll-area-thumb" }) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare function Separator({ className, orientation, decorative, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,WAA0B,EAC1B,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAahD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../cn";
|
|
5
|
+
export function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
6
|
+
return (_jsx(SeparatorPrimitive.Root, { className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px", className), "data-slot": "separator", decorative: decorative, orientation: orientation, ...props }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function SheetContent({ className, children, side, ...props }: ComponentProps<typeof SheetPrimitive.Content> & {
|
|
5
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function SheetHeader({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/sheet.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAEtE;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,IAAc,EACd,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG;IACjD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC5C,2CA+BA;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAQ7C;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,2CAQnD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../cn";
|
|
6
|
+
export function Sheet(props) {
|
|
7
|
+
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
8
|
+
}
|
|
9
|
+
export function SheetContent({ className, children, side = "right", ...props }) {
|
|
10
|
+
return (_jsxs(SheetPrimitive.Portal, { "data-slot": "sheet-portal", children: [_jsx(SheetPrimitive.Overlay, { className: "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", "data-slot": "sheet-overlay" }), _jsxs(SheetPrimitive.Content, { className: cn("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" &&
|
|
11
|
+
"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" &&
|
|
12
|
+
"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" &&
|
|
13
|
+
"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" &&
|
|
14
|
+
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className), "data-slot": "sheet-content", ...props, children: [children, _jsxs(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
|
|
15
|
+
}
|
|
16
|
+
export function SheetHeader({ className, ...props }) {
|
|
17
|
+
return (_jsx("div", { className: cn("flex flex-col gap-1.5 p-4", className), "data-slot": "sheet-header", ...props }));
|
|
18
|
+
}
|
|
19
|
+
export function SheetTitle({ className, ...props }) {
|
|
20
|
+
return (_jsx(SheetPrimitive.Title, { className: cn("font-semibold text-foreground", className), "data-slot": "sheet-title", ...props }));
|
|
21
|
+
}
|
|
22
|
+
export function SheetDescription({ className, ...props }) {
|
|
23
|
+
return (_jsx(SheetPrimitive.Description, { className: cn("text-muted-foreground text-sm", className), "data-slot": "sheet-description", ...props }));
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/sonner.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE9D,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,4CAyB1C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, } from "lucide-react";
|
|
4
|
+
import { useTheme } from "next-themes";
|
|
5
|
+
import { Toaster as Sonner } from "sonner";
|
|
6
|
+
export const Toaster = (props) => {
|
|
7
|
+
const { theme = "system" } = useTheme();
|
|
8
|
+
return (_jsx(Sonner, { className: "toaster group", icons: {
|
|
9
|
+
success: _jsx(CircleCheckIcon, { className: "size-4" }),
|
|
10
|
+
info: _jsx(InfoIcon, { className: "size-4" }),
|
|
11
|
+
warning: _jsx(TriangleAlertIcon, { className: "size-4" }),
|
|
12
|
+
error: _jsx(OctagonXIcon, { className: "size-4" }),
|
|
13
|
+
loading: _jsx(Loader2Icon, { className: "size-4 animate-spin" }),
|
|
14
|
+
}, style: {
|
|
15
|
+
"--normal-bg": "var(--popover)",
|
|
16
|
+
"--normal-text": "var(--popover-foreground)",
|
|
17
|
+
"--normal-border": "var(--border)",
|
|
18
|
+
"--border-radius": "var(--radius)",
|
|
19
|
+
}, theme: theme, ...props }));
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/spinner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CASrE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2Icon } from "lucide-react";
|
|
3
|
+
import { cn } from "../cn";
|
|
4
|
+
export function Spinner({ className, ...props }) {
|
|
5
|
+
return (_jsx(Loader2Icon, { "aria-label": "Loading", className: cn("size-4 animate-spin", className), role: "status", ...props }));
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,UAAU,CAAC,2CAW3E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../cn";
|
|
3
|
+
export function Textarea({ className, ...props }) {
|
|
4
|
+
return (_jsx("textarea", { className: cn("field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className), "data-slot": "textarea", ...props }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function Tooltip(props: ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function TooltipTrigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function TooltipContent({ className, sideOffset, children, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/internal/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,eAAe,CAAC,EAC9B,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQlD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAM1E;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAGvD;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAiBjD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../cn";
|
|
5
|
+
export function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
6
|
+
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
7
|
+
}
|
|
8
|
+
export function Tooltip(props) {
|
|
9
|
+
return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) }));
|
|
10
|
+
}
|
|
11
|
+
export function TooltipTrigger(props) {
|
|
12
|
+
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
export function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
15
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { className: cn("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in text-balance rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=closed]:animate-out", className), "data-slot": "tooltip-content", sideOffset: sideOffset, ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })] }) }));
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/internal/use-mobile.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,eAgBvB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
const MOBILE_BREAKPOINT = 768;
|
|
4
|
+
export const useIsMobile = () => {
|
|
5
|
+
const [isMobile, setIsMobile] = useState(undefined);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
+
const onChange = () => {
|
|
9
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
+
};
|
|
11
|
+
mql.addEventListener("change", onChange);
|
|
12
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
+
return () => mql.removeEventListener("change", onChange);
|
|
14
|
+
}, []);
|
|
15
|
+
return !!isMobile;
|
|
16
|
+
};
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocsLayout as FumadocsDocsLayout } from "fumadocs-ui/layouts/docs";
|
|
2
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import type { GeistdocsConfig } from "./config";
|
|
4
|
+
export declare const GeistdocsProvider: (props: import("./internal/provider-client").GeistdocsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
interface GeistdocsDocsLayoutProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
config: Pick<GeistdocsConfig, "defaultLanguage" | "translations">;
|
|
8
|
+
containerProps?: ComponentProps<typeof FumadocsDocsLayout>["containerProps"];
|
|
9
|
+
tree: ComponentProps<typeof FumadocsDocsLayout>["tree"];
|
|
10
|
+
}
|
|
11
|
+
export declare const GeistdocsDocsLayout: ({ config, containerProps, tree, children, }: GeistdocsDocsLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +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;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAWhD,eAAO,MAAM,iBAAiB,iHAA0B,CAAC;AAEzD,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,IAAI,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,mBAAmB,GAAI,6CAKjC,wBAAwB,4CAuC1B,CAAC"}
|
package/dist/layout.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DocsLayout as FumadocsDocsLayout } from "fumadocs-ui/layouts/docs";
|
|
3
|
+
import { createGeistdocsI18n } from "./internal/i18n";
|
|
4
|
+
import { GeistdocsProvider as GeistdocsProviderClient } from "./internal/provider-client";
|
|
5
|
+
import { GeistdocsSidebar, GeistdocsSidebarFolder, GeistdocsSidebarItem, GeistdocsSidebarSeparator, } from "./internal/sidebar";
|
|
6
|
+
import { GeistdocsSidebarProvider } from "./sidebar";
|
|
7
|
+
export const GeistdocsProvider = GeistdocsProviderClient;
|
|
8
|
+
export const GeistdocsDocsLayout = ({ config, containerProps, tree, children, }) => {
|
|
9
|
+
const { i18n } = createGeistdocsI18n(config);
|
|
10
|
+
return (_jsx(GeistdocsSidebarProvider, { children: _jsx(FumadocsDocsLayout, { containerProps: {
|
|
11
|
+
...containerProps,
|
|
12
|
+
style: {
|
|
13
|
+
...(containerProps?.style ?? {}),
|
|
14
|
+
"--fd-docs-row-1": "4rem",
|
|
15
|
+
},
|
|
16
|
+
}, i18n: i18n, nav: {
|
|
17
|
+
enabled: false,
|
|
18
|
+
}, searchToggle: {
|
|
19
|
+
enabled: false,
|
|
20
|
+
}, sidebar: {
|
|
21
|
+
collapsible: false,
|
|
22
|
+
component: _jsx(GeistdocsSidebar, {}),
|
|
23
|
+
components: {
|
|
24
|
+
Folder: GeistdocsSidebarFolder,
|
|
25
|
+
Item: GeistdocsSidebarItem,
|
|
26
|
+
Separator: GeistdocsSidebarSeparator,
|
|
27
|
+
},
|
|
28
|
+
}, tabMode: "auto", themeSwitch: {
|
|
29
|
+
enabled: false,
|
|
30
|
+
}, tree: tree, children: children }) }));
|
|
31
|
+
};
|
package/dist/mdx.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineConfig as defineFumadocsConfig } from "fumadocs-mdx/config";
|
|
2
|
+
import type { MDXComponents } from "mdx/types";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
type FumadocsConfigInput = NonNullable<Parameters<typeof defineFumadocsConfig>[0]>;
|
|
5
|
+
type FumadocsMDXOptions = Exclude<NonNullable<FumadocsConfigInput["mdxOptions"]>, (...args: never[]) => unknown>;
|
|
6
|
+
interface GeistdocsSourceConfigOptions {
|
|
7
|
+
mdxOptions?: FumadocsMDXOptions;
|
|
8
|
+
plugins?: FumadocsConfigInput["plugins"];
|
|
9
|
+
}
|
|
10
|
+
export type GeistdocsMDXComponents = MDXComponents;
|
|
11
|
+
export declare const geistdocsFrontmatterSchema: z.ZodObject<{
|
|
12
|
+
title: z.ZodString;
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
15
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
_openapi: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
17
|
+
product: z.ZodOptional<z.ZodString>;
|
|
18
|
+
url: z.ZodOptional<z.ZodString>;
|
|
19
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
conceptual: "conceptual";
|
|
21
|
+
guide: "guide";
|
|
22
|
+
reference: "reference";
|
|
23
|
+
troubleshooting: "troubleshooting";
|
|
24
|
+
integration: "integration";
|
|
25
|
+
overview: "overview";
|
|
26
|
+
}>>;
|
|
27
|
+
prerequisites: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const getGeistdocsMDXComponents: (components?: GeistdocsMDXComponents) => GeistdocsMDXComponents;
|
|
32
|
+
export declare const createMdxComponents: (components?: GeistdocsMDXComponents) => GeistdocsMDXComponents;
|
|
33
|
+
export declare const mergeGeistdocsMDXComponents: (...componentSets: Array<GeistdocsMDXComponents | undefined>) => GeistdocsMDXComponents;
|
|
34
|
+
export declare const defineGeistdocsSourceConfig: (config?: GeistdocsSourceConfigOptions) => import("fumadocs-mdx/config").GlobalConfig;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=mdx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,IAAI,oBAAoB,EAErC,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,KAAK,mBAAmB,GAAG,WAAW,CACpC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;AACF,KAAK,kBAAkB,GAAG,OAAO,CAC/B,WAAW,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,EAC9C,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAC9B,CAAC;AAEF,UAAU,4BAA4B;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAEnD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;iBA6BrC,CAAC;AAEH,eAAO,MAAM,yBAAyB,GACpC,aAAa,sBAAsB,KAClC,sBA8BD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,sBAAsB,KAClC,sBAA+D,CAAC;AAEnE,eAAO,MAAM,2BAA2B,GACtC,GAAG,eAAe,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,KAC1D,sBACkD,CAAC;AAEtD,eAAO,MAAM,2BAA2B,GACtC,SAAQ,4BAAiC,+CAe1C,CAAC"}
|
package/dist/mdx.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DynamicLink } from "fumadocs-core/dynamic-link";
|
|
3
|
+
import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
|
|
4
|
+
import { defineConfig as defineFumadocsConfig, frontmatterSchema, } from "fumadocs-mdx/config";
|
|
5
|
+
import lastModified from "fumadocs-mdx/plugins/last-modified";
|
|
6
|
+
import { TypeTable } from "fumadocs-ui/components/type-table";
|
|
7
|
+
import defaultMdxComponents from "fumadocs-ui/mdx";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { Callout, CalloutContainer, CalloutDescription, CalloutTitle, } from "./components/callout";
|
|
10
|
+
import { CodeBlock } from "./components/code-block";
|
|
11
|
+
import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, } from "./components/code-block-tabs";
|
|
12
|
+
import { CopyPrompt } from "./components/copy-prompt";
|
|
13
|
+
import { Mermaid } from "./components/mermaid";
|
|
14
|
+
import { Video } from "./components/video";
|
|
15
|
+
export const geistdocsFrontmatterSchema = frontmatterSchema.extend({
|
|
16
|
+
product: z.string().optional(),
|
|
17
|
+
url: z
|
|
18
|
+
.string()
|
|
19
|
+
.regex(/^\/.*/, { message: "url must start with a slash" })
|
|
20
|
+
.optional(),
|
|
21
|
+
type: z
|
|
22
|
+
.enum([
|
|
23
|
+
"conceptual",
|
|
24
|
+
"guide",
|
|
25
|
+
"reference",
|
|
26
|
+
"troubleshooting",
|
|
27
|
+
"integration",
|
|
28
|
+
"overview",
|
|
29
|
+
])
|
|
30
|
+
.optional(),
|
|
31
|
+
prerequisites: z
|
|
32
|
+
.array(z.string().regex(/^\/.*/, {
|
|
33
|
+
message: "prerequisites must start with a slash",
|
|
34
|
+
}))
|
|
35
|
+
.optional(),
|
|
36
|
+
related: z
|
|
37
|
+
.array(z.string().regex(/^\/.*/, { message: "related must start with a slash" }))
|
|
38
|
+
.optional(),
|
|
39
|
+
summary: z.string().optional(),
|
|
40
|
+
});
|
|
41
|
+
export const getGeistdocsMDXComponents = (components) => ({
|
|
42
|
+
...defaultMdxComponents,
|
|
43
|
+
pre: CodeBlock,
|
|
44
|
+
a: ({ href, ...props }) => typeof href === "string" && href.startsWith("/") ? (_jsx(DynamicLink, { className: "font-normal text-primary no-underline", href: `/[lang]${href}`, ...props })) : (_jsx("a", { href: href, ...props, className: "font-normal text-primary no-underline" })),
|
|
45
|
+
CodeBlockTabs,
|
|
46
|
+
CodeBlockTabsList,
|
|
47
|
+
CodeBlockTabsTrigger,
|
|
48
|
+
CodeBlockTab,
|
|
49
|
+
TypeTable,
|
|
50
|
+
Callout,
|
|
51
|
+
CalloutContainer,
|
|
52
|
+
CalloutTitle,
|
|
53
|
+
CalloutDescription,
|
|
54
|
+
CopyPrompt,
|
|
55
|
+
Mermaid,
|
|
56
|
+
Video,
|
|
57
|
+
...components,
|
|
58
|
+
});
|
|
59
|
+
export const createMdxComponents = (components) => getGeistdocsMDXComponents(components);
|
|
60
|
+
export const mergeGeistdocsMDXComponents = (...componentSets) => Object.assign({}, ...componentSets.filter(Boolean));
|
|
61
|
+
export const defineGeistdocsSourceConfig = (config = {}) => {
|
|
62
|
+
const existingRemarkPlugins = Array.isArray(config.mdxOptions?.remarkPlugins)
|
|
63
|
+
? config.mdxOptions.remarkPlugins
|
|
64
|
+
: [];
|
|
65
|
+
const existingPlugins = Array.isArray(config.plugins) ? config.plugins : [];
|
|
66
|
+
return defineFumadocsConfig({
|
|
67
|
+
...config,
|
|
68
|
+
mdxOptions: {
|
|
69
|
+
...config.mdxOptions,
|
|
70
|
+
remarkPlugins: [remarkMdxMermaid, ...existingRemarkPlugins],
|
|
71
|
+
},
|
|
72
|
+
plugins: [lastModified(), ...existingPlugins],
|
|
73
|
+
});
|
|
74
|
+
};
|