@assistant-ui/mcp-docs-server 0.1.17 → 0.1.19
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/.docs/organized/code-examples/with-ag-ui.md +518 -234
- package/.docs/organized/code-examples/{with-ai-sdk-v5.md → with-ai-sdk-v6.md} +476 -189
- package/.docs/organized/code-examples/with-assistant-transport.md +503 -301
- package/.docs/organized/code-examples/with-cloud.md +524 -226
- package/.docs/organized/code-examples/with-custom-thread-list.md +433 -146
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +2241 -0
- package/.docs/organized/code-examples/with-external-store.md +517 -231
- package/.docs/organized/code-examples/with-ffmpeg.md +500 -220
- package/.docs/organized/code-examples/with-langgraph.md +630 -319
- package/.docs/organized/code-examples/with-parent-id-grouping.md +517 -231
- package/.docs/organized/code-examples/with-react-hook-form.md +517 -233
- package/.docs/organized/code-examples/with-react-router.md +2167 -0
- package/.docs/organized/code-examples/{store-example.md → with-store.md} +18 -22
- package/.docs/organized/code-examples/with-tanstack.md +23 -41
- package/.docs/raw/blog/2025-01-31-changelog/index.mdx +0 -2
- package/.docs/raw/docs/{about-assistantui.mdx → (docs)/about-assistantui.mdx} +2 -1
- package/.docs/raw/docs/{architecture.mdx → (docs)/architecture.mdx} +3 -2
- package/.docs/raw/docs/{cli.mdx → (docs)/cli.mdx} +1 -19
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-readable.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool-ui.mdx +2 -1
- package/.docs/raw/docs/{copilots → (docs)/copilots}/make-assistant-tool.mdx +2 -1
- package/.docs/raw/docs/{copilots → (docs)/copilots}/model-context.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/motivation.mdx +1 -0
- package/.docs/raw/docs/{copilots → (docs)/copilots}/use-assistant-instructions.mdx +1 -0
- package/.docs/raw/docs/{devtools.mdx → (docs)/devtools.mdx} +4 -4
- package/.docs/raw/docs/{guides/Attachments.mdx → (docs)/guides/attachments.mdx} +4 -5
- package/.docs/raw/docs/{guides/Branching.mdx → (docs)/guides/branching.mdx} +2 -1
- package/.docs/raw/docs/{guides → (docs)/guides}/context-api.mdx +1 -0
- package/.docs/raw/docs/(docs)/guides/dictation.mdx +370 -0
- package/.docs/raw/docs/{guides/Editing.mdx → (docs)/guides/editing.mdx} +1 -0
- package/.docs/raw/docs/{guides/Latex.mdx → (docs)/guides/latex.mdx} +1 -2
- package/.docs/raw/docs/{guides/Speech.mdx → (docs)/guides/speech.mdx} +9 -10
- package/.docs/raw/docs/{guides/ToolUI.mdx → (docs)/guides/tool-ui.mdx} +15 -14
- package/.docs/raw/docs/{guides/Tools.mdx → (docs)/guides/tools.mdx} +10 -7
- package/.docs/raw/docs/{getting-started.mdx → (docs)/index.mdx} +17 -22
- package/.docs/raw/docs/{mcp-docs-server.mdx → (docs)/mcp-docs-server.mdx} +1 -2
- package/.docs/raw/docs/{api-reference/context-providers/AssistantRuntimeProvider.mdx → (reference)/api-reference/context-providers/assistant-runtime-provider.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/context-providers/TextMessagePartProvider.mdx → (reference)/api-reference/context-providers/text-message-part-provider.mdx} +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-data-stream.mdx +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/react-hook-form.mdx +2 -1
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/integrations/vercel-ai-sdk.mdx +2 -2
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/overview.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +327 -0
- package/.docs/raw/docs/{api-reference/primitives/ActionBar.mdx → (reference)/api-reference/primitives/action-bar.mdx} +3 -1
- package/.docs/raw/docs/{api-reference/primitives/AssistantIf.mdx → (reference)/api-reference/primitives/assistant-if.mdx} +2 -2
- package/.docs/raw/docs/{api-reference/primitives/AssistantModal.mdx → (reference)/api-reference/primitives/assistant-modal.mdx} +3 -1
- package/.docs/raw/docs/{api-reference/primitives/Attachment.mdx → (reference)/api-reference/primitives/attachment.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/primitives/BranchPicker.mdx → (reference)/api-reference/primitives/branch-picker.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/Composer.mdx → (reference)/api-reference/primitives/composer.mdx} +101 -2
- package/.docs/raw/docs/{api-reference → (reference)/api-reference}/primitives/composition.mdx +1 -0
- package/.docs/raw/docs/{api-reference/primitives/Error.mdx → (reference)/api-reference/primitives/error.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/MessagePart.mdx → (reference)/api-reference/primitives/message-part.mdx} +2 -2
- package/.docs/raw/docs/{api-reference/primitives/Message.mdx → (reference)/api-reference/primitives/message.mdx} +2 -1
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +221 -0
- package/.docs/raw/docs/{api-reference/primitives/ThreadListItem.mdx → (reference)/api-reference/primitives/thread-list-item.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/ThreadList.mdx → (reference)/api-reference/primitives/thread-list.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/primitives/Thread.mdx → (reference)/api-reference/primitives/thread.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/AssistantRuntime.mdx → (reference)/api-reference/runtimes/assistant-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/AttachmentRuntime.mdx → (reference)/api-reference/runtimes/attachment-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/ComposerRuntime.mdx → (reference)/api-reference/runtimes/composer-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/MessagePartRuntime.mdx → (reference)/api-reference/runtimes/message-part-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/MessageRuntime.mdx → (reference)/api-reference/runtimes/message-runtime.mdx} +3 -2
- package/.docs/raw/docs/{api-reference/runtimes/ThreadListItemRuntime.mdx → (reference)/api-reference/runtimes/thread-list-item-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/ThreadListRuntime.mdx → (reference)/api-reference/runtimes/thread-list-runtime.mdx} +2 -1
- package/.docs/raw/docs/{api-reference/runtimes/ThreadRuntime.mdx → (reference)/api-reference/runtimes/thread-runtime.mdx} +3 -5
- package/.docs/raw/docs/{legacy/styled/AssistantModal.mdx → (reference)/legacy/styled/assistant-modal.mdx} +2 -3
- package/.docs/raw/docs/{legacy/styled/Decomposition.mdx → (reference)/legacy/styled/decomposition.mdx} +1 -0
- package/.docs/raw/docs/{legacy/styled/Markdown.mdx → (reference)/legacy/styled/markdown.mdx} +2 -4
- package/.docs/raw/docs/{legacy/styled/Scrollbar.mdx → (reference)/legacy/styled/scrollbar.mdx} +2 -1
- package/.docs/raw/docs/{legacy/styled/ThreadWidth.mdx → (reference)/legacy/styled/thread-width.mdx} +1 -0
- package/.docs/raw/docs/{legacy/styled/Thread.mdx → (reference)/legacy/styled/thread.mdx} +2 -3
- package/.docs/raw/docs/{migrations → (reference)/migrations}/deprecation-policy.mdx +1 -0
- package/.docs/raw/docs/{migrations → (reference)/migrations}/react-langgraph-v0-7.mdx +1 -2
- package/.docs/raw/docs/{migrations → (reference)/migrations}/v0-11.mdx +1 -0
- package/.docs/raw/docs/{migrations → (reference)/migrations}/v0-12.mdx +1 -0
- package/.docs/raw/docs/{react-compatibility.mdx → (reference)/react-compatibility.mdx} +2 -3
- package/.docs/raw/docs/cloud/authorization.mdx +1 -0
- package/.docs/raw/docs/cloud/overview.mdx +1 -0
- package/.docs/raw/docs/cloud/persistence/ai-sdk.mdx +2 -3
- package/.docs/raw/docs/cloud/persistence/langgraph.mdx +5 -7
- package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +9 -8
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +2 -3
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +7 -6
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +38 -3
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +6 -8
- package/.docs/raw/docs/runtimes/custom/local.mdx +43 -16
- package/.docs/raw/docs/runtimes/data-stream.mdx +32 -4
- package/.docs/raw/docs/runtimes/helicone.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +3 -3
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +2 -1
- package/.docs/raw/docs/runtimes/langserve.mdx +2 -2
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +4 -5
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +1 -0
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +3 -4
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +2 -4
- package/.docs/raw/docs/ui/assistant-modal.mdx +163 -0
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +90 -0
- package/.docs/raw/docs/ui/attachment.mdx +227 -0
- package/.docs/raw/docs/ui/{Markdown.mdx → markdown.mdx} +11 -6
- package/.docs/raw/docs/ui/{Mermaid.mdx → mermaid.mdx} +12 -5
- package/.docs/raw/docs/ui/{PartGrouping.mdx → part-grouping.mdx} +4 -6
- package/.docs/raw/docs/ui/reasoning.mdx +148 -0
- package/.docs/raw/docs/ui/{Scrollbar.mdx → scrollbar.mdx} +9 -7
- package/.docs/raw/docs/ui/sources.mdx +87 -0
- package/.docs/raw/docs/ui/{SyntaxHighlighting.mdx → syntax-highlighting.mdx} +9 -5
- package/.docs/raw/docs/ui/thread-list.mdx +275 -0
- package/.docs/raw/docs/ui/{Thread.mdx → thread.mdx} +5 -6
- package/.docs/raw/docs/ui/tool-fallback.mdx +112 -0
- package/.docs/raw/docs/ui/tool-group.mdx +214 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +14 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -1
- package/dist/index.js.map +1 -0
- package/dist/prepare-docs/code-examples.d.ts +2 -0
- package/dist/prepare-docs/code-examples.d.ts.map +1 -0
- package/dist/prepare-docs/code-examples.js +129 -0
- package/dist/prepare-docs/code-examples.js.map +1 -0
- package/dist/prepare-docs/copy-raw.d.ts +2 -0
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -0
- package/dist/prepare-docs/copy-raw.js +50 -0
- package/dist/prepare-docs/copy-raw.js.map +1 -0
- package/dist/prepare-docs/prepare.d.ts +2 -0
- package/dist/prepare-docs/prepare.d.ts.map +1 -0
- package/dist/prepare-docs/prepare.js +18 -195
- package/dist/prepare-docs/prepare.js.map +1 -0
- package/dist/stdio.d.ts +3 -0
- package/dist/stdio.d.ts.map +1 -0
- package/dist/stdio.js +4 -5
- package/dist/stdio.js.map +1 -0
- package/dist/tools/docs.d.ts +23 -0
- package/dist/tools/docs.d.ts.map +1 -0
- package/dist/tools/docs.js +168 -0
- package/dist/tools/docs.js.map +1 -0
- package/dist/tools/examples.d.ts +23 -0
- package/dist/tools/examples.d.ts.map +1 -0
- package/dist/tools/examples.js +95 -0
- package/dist/tools/examples.js.map +1 -0
- package/dist/tools/tests/test-setup.d.ts +4 -0
- package/dist/tools/tests/test-setup.d.ts.map +1 -0
- package/dist/tools/tests/test-setup.js +36 -0
- package/dist/tools/tests/test-setup.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +20 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mcp-format.d.ts +7 -0
- package/dist/utils/mcp-format.d.ts.map +1 -0
- package/dist/utils/mcp-format.js +11 -0
- package/dist/utils/mcp-format.js.map +1 -0
- package/dist/utils/mdx.d.ts +9 -0
- package/dist/utils/mdx.d.ts.map +1 -0
- package/dist/utils/mdx.js +27 -0
- package/dist/utils/mdx.js.map +1 -0
- package/dist/utils/paths.d.ts +8 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +84 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/security.d.ts +2 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +43 -0
- package/dist/utils/security.js.map +1 -0
- package/package.json +37 -19
- package/src/constants.ts +22 -0
- package/src/index.ts +51 -0
- package/src/prepare-docs/code-examples.ts +158 -0
- package/src/prepare-docs/copy-raw.ts +55 -0
- package/src/prepare-docs/prepare.ts +24 -0
- package/src/stdio.ts +7 -0
- package/src/tools/docs.ts +207 -0
- package/src/tools/examples.ts +107 -0
- package/src/tools/tests/docs.test.ts +124 -0
- package/src/tools/tests/examples.test.ts +94 -0
- package/src/tools/tests/integration.test.ts +46 -0
- package/src/tools/tests/json-parsing.test.ts +23 -0
- package/src/tools/tests/mcp-protocol.test.ts +133 -0
- package/src/tools/tests/path-traversal.test.ts +81 -0
- package/src/tools/tests/test-setup.ts +40 -0
- package/src/utils/logger.ts +20 -0
- package/src/utils/mcp-format.ts +12 -0
- package/src/utils/mdx.ts +39 -0
- package/src/utils/paths.ts +114 -0
- package/src/utils/security.ts +52 -0
- package/src/utils/tests/security.test.ts +119 -0
- package/.docs/raw/docs/index.mdx +0 -7
- package/.docs/raw/docs/ui/AssistantModal.mdx +0 -45
- package/.docs/raw/docs/ui/AssistantSidebar.mdx +0 -41
- package/.docs/raw/docs/ui/Attachment.mdx +0 -84
- package/.docs/raw/docs/ui/Reasoning.mdx +0 -152
- package/.docs/raw/docs/ui/ThreadList.mdx +0 -90
- package/.docs/raw/docs/ui/ToolFallback.mdx +0 -63
- package/.docs/raw/docs/ui/ToolGroup.mdx +0 -96
- package/dist/chunk-M2RKUM66.js +0 -38
- package/dist/chunk-NVNFQ5ZO.js +0 -423
- /package/.docs/raw/docs/{copilots → (docs)/copilots}/assistant-frame.mdx +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Syntax Highlighting
|
|
3
|
+
description: Code block syntax highlighting with react-shiki or react-syntax-highlighter.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TypeTable } from "fumadocs-ui/components/type-table";
|
|
8
|
-
import { InstallCommand } from "@/components/docs/install-command";
|
|
6
|
+
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
7
|
+
import { SyntaxHighlightingSample } from "@/components/docs/samples/syntax-highlighting";
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
<SyntaxHighlightingSample />
|
|
11
10
|
|
|
12
11
|
<Callout type="warn">Syntax highlighting is not enabled in markdown by default.</Callout>
|
|
13
12
|
|
|
@@ -248,3 +247,8 @@ By default, the syntax highlighter uses a light build that only includes languag
|
|
|
248
247
|
```tsx title="/components/assistant-ui/syntax-highlighter.tsx"
|
|
249
248
|
import { makePrismAsyncSyntaxHighlighter } from "@assistant-ui/react-syntax-highlighter/full";
|
|
250
249
|
```
|
|
250
|
+
|
|
251
|
+
## Related Components
|
|
252
|
+
|
|
253
|
+
- [Markdown](/docs/ui/markdown) - Rich text rendering that uses syntax highlighting
|
|
254
|
+
- [Mermaid](/docs/ui/mermaid) - Render diagrams instead of code blocks
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ThreadList
|
|
3
|
+
description: Switch between conversations. Supports sidebar or dropdown layouts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
|
+
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
8
|
+
import { ThreadListSample } from "@/components/docs/samples/threadlist";
|
|
9
|
+
|
|
10
|
+
<ThreadListSample />
|
|
11
|
+
|
|
12
|
+
<Callout>
|
|
13
|
+
This demo uses **ThreadListSidebar**, which includes `thread-list` as a dependency and provides a complete sidebar layout. For custom implementations, you can use `thread-list` directly.
|
|
14
|
+
</Callout>
|
|
15
|
+
|
|
16
|
+
## Getting Started
|
|
17
|
+
|
|
18
|
+
<Steps>
|
|
19
|
+
<Step>
|
|
20
|
+
|
|
21
|
+
### Add the component
|
|
22
|
+
|
|
23
|
+
Use `threadlist-sidebar` for a complete sidebar layout or `thread-list` for custom layouts.
|
|
24
|
+
|
|
25
|
+
#### ThreadListSidebar
|
|
26
|
+
|
|
27
|
+
<InstallCommand shadcn={["threadlist-sidebar"]} />
|
|
28
|
+
|
|
29
|
+
#### ThreadList
|
|
30
|
+
|
|
31
|
+
<InstallCommand shadcn={["thread-list"]} />
|
|
32
|
+
|
|
33
|
+
</Step>
|
|
34
|
+
<Step>
|
|
35
|
+
|
|
36
|
+
### Use in your application
|
|
37
|
+
|
|
38
|
+
<Tabs items={["With Sidebar", "Without Sidebar"]}>
|
|
39
|
+
<Tab value="With Sidebar">
|
|
40
|
+
```tsx title="/app/assistant.tsx"
|
|
41
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
42
|
+
import { ThreadListSidebar } from "@/components/assistant-ui/threadlist-sidebar";
|
|
43
|
+
import {
|
|
44
|
+
SidebarProvider,
|
|
45
|
+
SidebarInset,
|
|
46
|
+
SidebarTrigger
|
|
47
|
+
} from "@/components/ui/sidebar";
|
|
48
|
+
|
|
49
|
+
export default function Assistant() {
|
|
50
|
+
return (
|
|
51
|
+
<SidebarProvider>
|
|
52
|
+
<div className="flex h-dvh w-full">
|
|
53
|
+
<ThreadListSidebar />
|
|
54
|
+
<SidebarInset>
|
|
55
|
+
{/* Add sidebar trigger, location can be customized */}
|
|
56
|
+
<SidebarTrigger className="absolute top-4 left-4" />
|
|
57
|
+
<Thread />
|
|
58
|
+
</SidebarInset>
|
|
59
|
+
</div>
|
|
60
|
+
</SidebarProvider>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
</Tab>
|
|
65
|
+
<Tab value="Without Sidebar">
|
|
66
|
+
```tsx title="/app/assistant.tsx"
|
|
67
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
68
|
+
import { ThreadList } from "@/components/assistant-ui/thread-list";
|
|
69
|
+
|
|
70
|
+
export default function Assistant() {
|
|
71
|
+
return (
|
|
72
|
+
<div className="grid h-full grid-cols-[200px_1fr]">
|
|
73
|
+
<ThreadList />
|
|
74
|
+
<Thread />
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
</Tab>
|
|
80
|
+
</Tabs>
|
|
81
|
+
|
|
82
|
+
</Step>
|
|
83
|
+
</Steps>
|
|
84
|
+
|
|
85
|
+
## Anatomy
|
|
86
|
+
|
|
87
|
+
The ThreadList component is built with the following primitives:
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
import { ThreadListPrimitive, ThreadListItemPrimitive } from "@assistant-ui/react";
|
|
91
|
+
|
|
92
|
+
<ThreadListPrimitive.Root>
|
|
93
|
+
<ThreadListPrimitive.New />
|
|
94
|
+
<ThreadListPrimitive.Items
|
|
95
|
+
components={{
|
|
96
|
+
ThreadListItem: () => (
|
|
97
|
+
<ThreadListItemPrimitive.Root>
|
|
98
|
+
<ThreadListItemPrimitive.Trigger>
|
|
99
|
+
<ThreadListItemPrimitive.Title />
|
|
100
|
+
</ThreadListItemPrimitive.Trigger>
|
|
101
|
+
<ThreadListItemPrimitive.Archive />
|
|
102
|
+
<ThreadListItemPrimitive.Delete />
|
|
103
|
+
</ThreadListItemPrimitive.Root>
|
|
104
|
+
),
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
</ThreadListPrimitive.Root>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## API Reference
|
|
111
|
+
|
|
112
|
+
### ThreadListPrimitive.Root
|
|
113
|
+
|
|
114
|
+
Container for the thread list.
|
|
115
|
+
|
|
116
|
+
<ParametersTable
|
|
117
|
+
type="ThreadListPrimitiveRootProps"
|
|
118
|
+
parameters={[
|
|
119
|
+
{
|
|
120
|
+
name: "asChild",
|
|
121
|
+
type: "boolean",
|
|
122
|
+
default: "false",
|
|
123
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
124
|
+
},
|
|
125
|
+
]}
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
### ThreadListPrimitive.Items
|
|
129
|
+
|
|
130
|
+
Renders all threads in the list.
|
|
131
|
+
|
|
132
|
+
<ParametersTable
|
|
133
|
+
type="ThreadListPrimitiveItemsProps"
|
|
134
|
+
parameters={[
|
|
135
|
+
{
|
|
136
|
+
name: "archived",
|
|
137
|
+
type: "boolean",
|
|
138
|
+
description: "When true, renders archived threads instead of active threads.",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "components",
|
|
142
|
+
type: "object",
|
|
143
|
+
required: true,
|
|
144
|
+
description: "Component configuration.",
|
|
145
|
+
children: [
|
|
146
|
+
{
|
|
147
|
+
type: "Components",
|
|
148
|
+
parameters: [
|
|
149
|
+
{
|
|
150
|
+
name: "ThreadListItem",
|
|
151
|
+
type: "ComponentType",
|
|
152
|
+
required: true,
|
|
153
|
+
description: "Component to render for each thread item.",
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
]}
|
|
160
|
+
/>
|
|
161
|
+
|
|
162
|
+
### ThreadListPrimitive.New
|
|
163
|
+
|
|
164
|
+
A button to create a new thread.
|
|
165
|
+
|
|
166
|
+
<ParametersTable
|
|
167
|
+
type="ThreadListPrimitiveNewProps"
|
|
168
|
+
parameters={[
|
|
169
|
+
{
|
|
170
|
+
name: "asChild",
|
|
171
|
+
type: "boolean",
|
|
172
|
+
default: "false",
|
|
173
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
174
|
+
},
|
|
175
|
+
]}
|
|
176
|
+
/>
|
|
177
|
+
|
|
178
|
+
### ThreadListItemPrimitive.Root
|
|
179
|
+
|
|
180
|
+
Container for a single thread item. Automatically sets `data-active` and `aria-current` when this is the current thread.
|
|
181
|
+
|
|
182
|
+
<ParametersTable
|
|
183
|
+
type="ThreadListItemPrimitiveRootProps"
|
|
184
|
+
parameters={[
|
|
185
|
+
{
|
|
186
|
+
name: "asChild",
|
|
187
|
+
type: "boolean",
|
|
188
|
+
default: "false",
|
|
189
|
+
description: "Merge props with child element instead of rendering a wrapper div.",
|
|
190
|
+
},
|
|
191
|
+
]}
|
|
192
|
+
/>
|
|
193
|
+
|
|
194
|
+
### ThreadListItemPrimitive.Trigger
|
|
195
|
+
|
|
196
|
+
A button that switches to this thread when clicked.
|
|
197
|
+
|
|
198
|
+
<ParametersTable
|
|
199
|
+
type="ThreadListItemPrimitiveTriggerProps"
|
|
200
|
+
parameters={[
|
|
201
|
+
{
|
|
202
|
+
name: "asChild",
|
|
203
|
+
type: "boolean",
|
|
204
|
+
default: "false",
|
|
205
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
206
|
+
},
|
|
207
|
+
]}
|
|
208
|
+
/>
|
|
209
|
+
|
|
210
|
+
### ThreadListItemPrimitive.Title
|
|
211
|
+
|
|
212
|
+
Renders the thread's title.
|
|
213
|
+
|
|
214
|
+
<ParametersTable
|
|
215
|
+
type="ThreadListItemPrimitiveTitleProps"
|
|
216
|
+
parameters={[
|
|
217
|
+
{
|
|
218
|
+
name: "fallback",
|
|
219
|
+
type: "ReactNode",
|
|
220
|
+
description: "Content to display when the thread has no title.",
|
|
221
|
+
},
|
|
222
|
+
]}
|
|
223
|
+
/>
|
|
224
|
+
|
|
225
|
+
### ThreadListItemPrimitive.Archive
|
|
226
|
+
|
|
227
|
+
A button to archive the thread.
|
|
228
|
+
|
|
229
|
+
<ParametersTable
|
|
230
|
+
type="ThreadListItemPrimitiveArchiveProps"
|
|
231
|
+
parameters={[
|
|
232
|
+
{
|
|
233
|
+
name: "asChild",
|
|
234
|
+
type: "boolean",
|
|
235
|
+
default: "false",
|
|
236
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
237
|
+
},
|
|
238
|
+
]}
|
|
239
|
+
/>
|
|
240
|
+
|
|
241
|
+
### ThreadListItemPrimitive.Unarchive
|
|
242
|
+
|
|
243
|
+
A button to restore an archived thread.
|
|
244
|
+
|
|
245
|
+
### ThreadListItemPrimitive.Delete
|
|
246
|
+
|
|
247
|
+
A button to permanently delete the thread.
|
|
248
|
+
|
|
249
|
+
<ParametersTable
|
|
250
|
+
type="ThreadListItemPrimitiveDeleteProps"
|
|
251
|
+
parameters={[
|
|
252
|
+
{
|
|
253
|
+
name: "asChild",
|
|
254
|
+
type: "boolean",
|
|
255
|
+
default: "false",
|
|
256
|
+
description: "Merge props with child element instead of rendering a wrapper button.",
|
|
257
|
+
},
|
|
258
|
+
]}
|
|
259
|
+
/>
|
|
260
|
+
|
|
261
|
+
### ThreadListItemMore
|
|
262
|
+
|
|
263
|
+
A dropdown menu for additional thread actions, built on Radix UI DropdownMenu:
|
|
264
|
+
|
|
265
|
+
- `ThreadListItemMorePrimitive.Root` - Menu container
|
|
266
|
+
- `ThreadListItemMorePrimitive.Trigger` - Button to open the menu
|
|
267
|
+
- `ThreadListItemMorePrimitive.Content` - Menu content container
|
|
268
|
+
- `ThreadListItemMorePrimitive.Item` - Individual menu item
|
|
269
|
+
- `ThreadListItemMorePrimitive.Separator` - Visual separator between items
|
|
270
|
+
|
|
271
|
+
## Related Components
|
|
272
|
+
|
|
273
|
+
- [Thread](/docs/ui/thread) - The main chat interface displayed alongside the list
|
|
274
|
+
|
|
275
|
+
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Thread
|
|
3
|
+
description: The main chat container with messages, composer, and auto-scroll.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { InstallCommand } from "@/components/docs/install-command";
|
|
9
|
-
import { ThreadSample } from "@/components/samples/thread-sample";
|
|
6
|
+
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
7
|
+
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
8
|
+
import { ThreadSample } from "@/components/docs/samples/thread";
|
|
10
9
|
|
|
11
10
|
A complete chat interface that combines message rendering, auto-scrolling, composer input,
|
|
12
11
|
attachments, and conditional UI states. Fully customizable and composable.
|
|
@@ -398,4 +397,4 @@ The condition function receives an `AssistantState` object with access to `threa
|
|
|
398
397
|
|
|
399
398
|
## Related Components
|
|
400
399
|
|
|
401
|
-
- [ThreadList](/docs/ui/
|
|
400
|
+
- [ThreadList](/docs/ui/thread-list) - List of threads, with or without sidebar
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ToolFallback
|
|
3
|
+
description: Default UI component for tools without dedicated custom renderers.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
7
|
+
import {
|
|
8
|
+
ToolFallbackSample,
|
|
9
|
+
ToolFallbackRunningSample,
|
|
10
|
+
ToolFallbackCancelledSample,
|
|
11
|
+
ToolFallbackStreamingSample,
|
|
12
|
+
} from "@/components/docs/samples/tool-fallback";
|
|
13
|
+
|
|
14
|
+
<ToolFallbackSample />
|
|
15
|
+
|
|
16
|
+
## Getting Started
|
|
17
|
+
|
|
18
|
+
<Steps>
|
|
19
|
+
<Step>
|
|
20
|
+
|
|
21
|
+
### Add `tool-fallback`
|
|
22
|
+
|
|
23
|
+
<InstallCommand shadcn={["tool-fallback"]} />
|
|
24
|
+
|
|
25
|
+
This adds a `/components/assistant-ui/tool-fallback.tsx` file to your project, which you can adjust as needed.
|
|
26
|
+
|
|
27
|
+
</Step>
|
|
28
|
+
<Step>
|
|
29
|
+
|
|
30
|
+
### Use it in your application
|
|
31
|
+
|
|
32
|
+
Pass the `ToolFallback` component to the `MessagePrimitive.Parts` component
|
|
33
|
+
|
|
34
|
+
```tsx title="/components/assistant-ui/thread.tsx" {1,9}
|
|
35
|
+
import { ToolFallback } from "@/components/assistant-ui/tool-fallback";
|
|
36
|
+
|
|
37
|
+
const AssistantMessage = () => {
|
|
38
|
+
return (
|
|
39
|
+
<MessagePrimitive.Root>
|
|
40
|
+
<MessagePrimitive.Parts
|
|
41
|
+
components={{
|
|
42
|
+
tools: {
|
|
43
|
+
Fallback: ToolFallback
|
|
44
|
+
},
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</MessagePrimitive.Root>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</Step>
|
|
53
|
+
</Steps>
|
|
54
|
+
|
|
55
|
+
## Examples
|
|
56
|
+
|
|
57
|
+
### Streaming Demo
|
|
58
|
+
|
|
59
|
+
Interactive demo showing the full tool call lifecycle: running → complete.
|
|
60
|
+
|
|
61
|
+
<ToolFallbackStreamingSample />
|
|
62
|
+
|
|
63
|
+
### Running State
|
|
64
|
+
|
|
65
|
+
Shows a loading spinner and shimmer animation while the tool is executing.
|
|
66
|
+
|
|
67
|
+
<ToolFallbackRunningSample />
|
|
68
|
+
|
|
69
|
+
### Cancelled State
|
|
70
|
+
|
|
71
|
+
Shows a muted appearance when a tool call was cancelled.
|
|
72
|
+
|
|
73
|
+
<ToolFallbackCancelledSample />
|
|
74
|
+
|
|
75
|
+
## Composable API
|
|
76
|
+
|
|
77
|
+
All sub-components are exported for custom layouts:
|
|
78
|
+
|
|
79
|
+
| Component | Description |
|
|
80
|
+
| --------- | ----------- |
|
|
81
|
+
| `ToolFallback.Root` | Collapsible container with scroll lock |
|
|
82
|
+
| `ToolFallback.Trigger` | Header with tool name, status icon, and shimmer |
|
|
83
|
+
| `ToolFallback.Content` | Animated collapsible content wrapper |
|
|
84
|
+
| `ToolFallback.Args` | Displays tool arguments |
|
|
85
|
+
| `ToolFallback.Result` | Displays tool execution result |
|
|
86
|
+
| `ToolFallback.Error` | Displays error or cancellation messages |
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import {
|
|
90
|
+
ToolFallback,
|
|
91
|
+
ToolFallbackRoot,
|
|
92
|
+
ToolFallbackTrigger,
|
|
93
|
+
ToolFallbackContent,
|
|
94
|
+
ToolFallbackArgs,
|
|
95
|
+
ToolFallbackResult,
|
|
96
|
+
ToolFallbackError,
|
|
97
|
+
} from "@/components/assistant-ui/tool-fallback";
|
|
98
|
+
|
|
99
|
+
// Compound component syntax
|
|
100
|
+
<ToolFallback.Root>
|
|
101
|
+
<ToolFallback.Trigger toolName="get_weather" status={status} />
|
|
102
|
+
<ToolFallback.Content>
|
|
103
|
+
<ToolFallback.Error status={status} />
|
|
104
|
+
<ToolFallback.Args argsText={argsText} />
|
|
105
|
+
<ToolFallback.Result result={result} />
|
|
106
|
+
</ToolFallback.Content>
|
|
107
|
+
</ToolFallback.Root>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Related Components
|
|
111
|
+
|
|
112
|
+
- [ToolGroup](/docs/ui/tool-group) - Group consecutive tool calls together
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ToolGroup
|
|
3
|
+
description: Wrapper for consecutive tool calls with collapsible and styled options.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { InstallCommand } from "@/components/docs/fumadocs/install/install-command";
|
|
7
|
+
import { ParametersTable } from "@/components/docs/tables/ParametersTable";
|
|
8
|
+
import {
|
|
9
|
+
ToolGroupSample,
|
|
10
|
+
ToolGroupStreamingSample,
|
|
11
|
+
} from "@/components/docs/samples/tool-group";
|
|
12
|
+
|
|
13
|
+
A wrapper component that groups consecutive tool calls together, displaying them in a collapsible container with auto-expand behavior during streaming.
|
|
14
|
+
|
|
15
|
+
<ToolGroupSample />
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
<Steps>
|
|
20
|
+
<Step>
|
|
21
|
+
|
|
22
|
+
### Add `tool-group`
|
|
23
|
+
|
|
24
|
+
<InstallCommand shadcn={["tool-group"]} />
|
|
25
|
+
|
|
26
|
+
This adds a `/components/assistant-ui/tool-group.tsx` file to your project, which you can adjust as needed.
|
|
27
|
+
|
|
28
|
+
</Step>
|
|
29
|
+
<Step>
|
|
30
|
+
|
|
31
|
+
### Use it in your application
|
|
32
|
+
|
|
33
|
+
Pass the `ToolGroup` component to the `MessagePrimitive.Parts` component
|
|
34
|
+
|
|
35
|
+
```tsx title="/components/assistant-ui/thread.tsx" {1,8}
|
|
36
|
+
import { ToolGroup } from "@/components/assistant-ui/tool-group";
|
|
37
|
+
|
|
38
|
+
const AssistantMessage = () => {
|
|
39
|
+
return (
|
|
40
|
+
<MessagePrimitive.Root>
|
|
41
|
+
<MessagePrimitive.Parts
|
|
42
|
+
components={{
|
|
43
|
+
ToolGroup,
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</MessagePrimitive.Root>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</Step>
|
|
52
|
+
</Steps>
|
|
53
|
+
|
|
54
|
+
## Variants
|
|
55
|
+
|
|
56
|
+
Use the `variant` prop on `ToolGroup.Root` to change the visual style:
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
<ToolGroup.Root variant="outline">...</ToolGroup.Root>
|
|
60
|
+
<ToolGroup.Root variant="muted">...</ToolGroup.Root>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
| Variant | Description |
|
|
64
|
+
| --------- | ---------------------------------- |
|
|
65
|
+
| `default` | No additional styling |
|
|
66
|
+
| `outline` | Rounded border |
|
|
67
|
+
| `muted` | Muted background with border |
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
### Streaming Demo (Custom UI + Fallback)
|
|
72
|
+
|
|
73
|
+
Interactive demo showing tool group with **custom tool UIs** and **ToolFallback** working together. Watch as weather cards stream in with loading states, followed by a search tool using the fallback UI.
|
|
74
|
+
|
|
75
|
+
<ToolGroupStreamingSample />
|
|
76
|
+
|
|
77
|
+
### Custom Tool UIs
|
|
78
|
+
|
|
79
|
+
ToolGroup works with any custom tool UI components:
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
// Custom Weather Tool UI
|
|
83
|
+
function WeatherToolUI({ location, temperature, condition }) {
|
|
84
|
+
return (
|
|
85
|
+
<div className="flex items-center gap-3 rounded-lg border p-3">
|
|
86
|
+
<WeatherIcon condition={condition} />
|
|
87
|
+
<div>
|
|
88
|
+
<div className="text-xs text-muted-foreground">{location}</div>
|
|
89
|
+
<div className="text-lg font-medium">{temperature}°F</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Use in ToolGroup
|
|
96
|
+
<ToolGroupRoot variant="outline">
|
|
97
|
+
<ToolGroupTrigger count={3} />
|
|
98
|
+
<ToolGroupContent>
|
|
99
|
+
<WeatherToolUI location="New York" temperature={65} condition="Cloudy" />
|
|
100
|
+
<WeatherToolUI location="London" temperature={55} condition="Rainy" />
|
|
101
|
+
<SearchToolUI query="best restaurants" results={24} />
|
|
102
|
+
</ToolGroupContent>
|
|
103
|
+
</ToolGroupRoot>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Composable API
|
|
107
|
+
|
|
108
|
+
All sub-components are exported for custom layouts:
|
|
109
|
+
|
|
110
|
+
| Component | Description |
|
|
111
|
+
| --------- | ----------- |
|
|
112
|
+
| `ToolGroup.Root` | Collapsible container with scroll lock and variants |
|
|
113
|
+
| `ToolGroup.Trigger` | Header with tool count, shimmer animation, and chevron |
|
|
114
|
+
| `ToolGroup.Content` | Animated collapsible content wrapper |
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
import {
|
|
118
|
+
ToolGroup,
|
|
119
|
+
ToolGroupRoot,
|
|
120
|
+
ToolGroupTrigger,
|
|
121
|
+
ToolGroupContent,
|
|
122
|
+
} from "@/components/assistant-ui/tool-group";
|
|
123
|
+
|
|
124
|
+
// Compound component syntax
|
|
125
|
+
<ToolGroup.Root variant="outline" defaultOpen>
|
|
126
|
+
<ToolGroup.Trigger count={3} active={false} />
|
|
127
|
+
<ToolGroup.Content>
|
|
128
|
+
{/* Any tool UI components - custom or ToolFallback */}
|
|
129
|
+
</ToolGroup.Content>
|
|
130
|
+
</ToolGroup.Root>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## API Reference
|
|
134
|
+
|
|
135
|
+
### ToolGroupRoot
|
|
136
|
+
|
|
137
|
+
<ParametersTable
|
|
138
|
+
type="ToolGroupRootProps"
|
|
139
|
+
parameters={[
|
|
140
|
+
{
|
|
141
|
+
name: "variant",
|
|
142
|
+
type: '"default" | "outline" | "muted"',
|
|
143
|
+
default: '"default"',
|
|
144
|
+
description: "Visual variant of the tool group container.",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "open",
|
|
148
|
+
type: "boolean",
|
|
149
|
+
description: "Controlled open state.",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "onOpenChange",
|
|
153
|
+
type: "(open: boolean) => void",
|
|
154
|
+
description: "Callback when open state changes.",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "defaultOpen",
|
|
158
|
+
type: "boolean",
|
|
159
|
+
default: "false",
|
|
160
|
+
description: "Initial open state for uncontrolled usage.",
|
|
161
|
+
},
|
|
162
|
+
]}
|
|
163
|
+
/>
|
|
164
|
+
|
|
165
|
+
### ToolGroupTrigger
|
|
166
|
+
|
|
167
|
+
<ParametersTable
|
|
168
|
+
type="ToolGroupTriggerProps"
|
|
169
|
+
parameters={[
|
|
170
|
+
{
|
|
171
|
+
name: "count",
|
|
172
|
+
type: "number",
|
|
173
|
+
required: true,
|
|
174
|
+
description: "Number of tool calls to display in the label.",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "active",
|
|
178
|
+
type: "boolean",
|
|
179
|
+
default: "false",
|
|
180
|
+
description: "Shows loading spinner and shimmer animation when true.",
|
|
181
|
+
},
|
|
182
|
+
]}
|
|
183
|
+
/>
|
|
184
|
+
|
|
185
|
+
### ToolGroup (Default Export)
|
|
186
|
+
|
|
187
|
+
<ParametersTable
|
|
188
|
+
type="ToolGroupProps"
|
|
189
|
+
parameters={[
|
|
190
|
+
{
|
|
191
|
+
name: "startIndex",
|
|
192
|
+
type: "number",
|
|
193
|
+
required: true,
|
|
194
|
+
description: "The index of the first tool call in the group.",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "endIndex",
|
|
198
|
+
type: "number",
|
|
199
|
+
required: true,
|
|
200
|
+
description: "The index of the last tool call in the group.",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "children",
|
|
204
|
+
type: "ReactNode",
|
|
205
|
+
required: true,
|
|
206
|
+
description: "The rendered tool call components.",
|
|
207
|
+
},
|
|
208
|
+
]}
|
|
209
|
+
/>
|
|
210
|
+
|
|
211
|
+
## Related Components
|
|
212
|
+
|
|
213
|
+
- [ToolFallback](/docs/ui/tool-fallback) - Default UI for tools without custom renderers
|
|
214
|
+
- [PartGrouping](/docs/ui/part-grouping) - Advanced message part grouping (experimental)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ROOT_DIR: string;
|
|
2
|
+
export declare const PACKAGE_DIR: string;
|
|
3
|
+
export declare const EXAMPLES_PATH: string;
|
|
4
|
+
export declare const DOCS_PATH: string;
|
|
5
|
+
export declare const CODE_EXAMPLES_PATH: string;
|
|
6
|
+
export declare const MDX_EXTENSION = ".mdx";
|
|
7
|
+
export declare const MD_EXTENSION = ".md";
|
|
8
|
+
export declare const MAX_FILE_SIZE: number;
|
|
9
|
+
export declare const IS_PREPARE_MODE: boolean | undefined;
|
|
10
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,QAA+B,CAAC;AACrD,eAAO,MAAM,WAAW,QAAyB,CAAC;AAElD,eAAO,MAAM,aAAa,QAA6B,CAAC;AAGxD,eAAO,MAAM,SAAS,QAA8B,CAAC;AACrD,eAAO,MAAM,kBAAkB,QAA6C,CAAC;AAE7E,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,eAAO,MAAM,aAAa,QAAmB,CAAC;AAE9C,eAAO,MAAM,eAAe,qBAE3B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
4
|
+
export const ROOT_DIR = join(__dirname, "../../../");
|
|
5
|
+
export const PACKAGE_DIR = join(__dirname, "../");
|
|
6
|
+
export const EXAMPLES_PATH = join(ROOT_DIR, "examples");
|
|
7
|
+
const DOCS_BASE = join(PACKAGE_DIR, ".docs");
|
|
8
|
+
export const DOCS_PATH = join(DOCS_BASE, "raw/docs");
|
|
9
|
+
export const CODE_EXAMPLES_PATH = join(DOCS_BASE, "organized/code-examples");
|
|
10
|
+
export const MDX_EXTENSION = ".mdx";
|
|
11
|
+
export const MD_EXTENSION = ".md";
|
|
12
|
+
export const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
13
|
+
export const IS_PREPARE_MODE = process.argv[1]?.includes("prepare-docs/prepare");
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAExD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAC7C,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AACpC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CACtD,sBAAsB,CACvB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAcpE,eAAO,MAAM,MAAM,WAGjB,CAAC;AAeH,wBAAsB,SAAS,kBAW9B"}
|