@assistant-ui/mcp-docs-server 0.1.30 → 0.1.32
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/waterfall.md +8 -8
- package/.docs/organized/code-examples/with-a2a.md +10 -10
- package/.docs/organized/code-examples/with-ag-ui.md +12 -12
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +14 -14
- package/.docs/organized/code-examples/with-artifacts.md +14 -14
- package/.docs/organized/code-examples/with-assistant-transport.md +11 -11
- package/.docs/organized/code-examples/with-browser-extension.md +345 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +129 -63
- package/.docs/organized/code-examples/with-cloud-standalone.md +13 -13
- package/.docs/organized/code-examples/with-cloud.md +13 -13
- package/.docs/organized/code-examples/with-custom-thread-list.md +65 -20
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +18 -17
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +18 -17
- package/.docs/organized/code-examples/with-expo.md +25 -25
- package/.docs/organized/code-examples/with-external-store.md +10 -10
- package/.docs/organized/code-examples/with-ffmpeg.md +14 -14
- package/.docs/organized/code-examples/with-generative-ui.md +211 -14
- package/.docs/organized/code-examples/with-google-adk.md +12 -12
- package/.docs/organized/code-examples/with-heat-graph.md +8 -8
- package/.docs/organized/code-examples/with-image-generation.md +454 -0
- package/.docs/organized/code-examples/with-interactables.md +14 -14
- package/.docs/organized/code-examples/with-langchain.md +12 -12
- package/.docs/organized/code-examples/with-langgraph.md +15 -12
- package/.docs/organized/code-examples/with-livekit.md +19 -18
- package/.docs/organized/code-examples/with-mcp.md +748 -0
- package/.docs/organized/code-examples/with-opencode.md +107 -62
- package/.docs/organized/code-examples/with-parent-id-grouping.md +12 -12
- package/.docs/organized/code-examples/with-react-hook-form.md +14 -14
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +16 -16
- package/.docs/organized/code-examples/with-resumable-stream.md +660 -0
- package/.docs/organized/code-examples/with-store.md +8 -8
- package/.docs/organized/code-examples/with-tanstack.md +14 -14
- package/.docs/organized/code-examples/with-tap-runtime.md +11 -10
- package/.docs/raw/docs/(docs)/cli.mdx +3 -1
- package/.docs/raw/docs/(docs)/copilots/assistant-frame.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +10 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +8 -3
- package/.docs/raw/docs/(docs)/copilots/make-assistant-visible.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +1 -0
- package/.docs/raw/docs/(docs)/copilots/use-assistant-instructions.mdx +1 -0
- package/.docs/raw/docs/(docs)/devtools.mdx +1 -0
- package/.docs/raw/docs/(docs)/index.mdx +3 -2
- package/.docs/raw/docs/(docs)/installation.mdx +2 -1
- package/.docs/raw/docs/(docs)/rtl.mdx +1 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +36 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +34 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +55 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +36 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +31 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +28 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +94 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +464 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +125 -125
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +46 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +70 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +182 -554
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +82 -86
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -314
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +43 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -42
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +68 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +92 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +131 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +230 -2
- package/.docs/raw/docs/cloud/ai-sdk.mdx +222 -4
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/cloud/langgraph.mdx +274 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/attachments.mdx +45 -40
- package/.docs/raw/docs/guides/branching.mdx +76 -0
- package/.docs/raw/docs/guides/chain-of-thought.mdx +166 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/context-api.mdx +54 -26
- package/.docs/raw/docs/{(docs)/guides → guides}/dictation.mdx +3 -1
- package/.docs/raw/docs/guides/editing.mdx +102 -0
- package/.docs/raw/docs/guides/generative-ui.mdx +142 -0
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +103 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/interactables.mdx +51 -2
- package/.docs/raw/docs/{(docs)/guides → guides}/latex.mdx +53 -10
- package/.docs/raw/docs/guides/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/mentions.mdx +63 -88
- package/.docs/raw/docs/{(docs)/guides → guides}/message-timing.mdx +45 -6
- package/.docs/raw/docs/{(docs)/guides → guides}/multi-agent.mdx +66 -6
- package/.docs/raw/docs/{(docs)/guides → guides}/quoting.mdx +11 -18
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/slash-commands.mdx +104 -38
- package/.docs/raw/docs/guides/speech.mdx +156 -0
- package/.docs/raw/docs/{(docs)/guides → guides}/suggestions.mdx +91 -69
- package/.docs/raw/docs/{(docs)/guides → guides}/tool-ui.mdx +110 -38
- package/.docs/raw/docs/{(docs)/guides → guides}/tools.mdx +197 -40
- package/.docs/raw/docs/{(docs)/guides → guides}/voice.mdx +41 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/index.mdx +11 -14
- package/.docs/raw/docs/ink/migration.mdx +1 -3
- package/.docs/raw/docs/ink/primitives.mdx +386 -9
- package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +520 -0
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +191 -0
- package/.docs/raw/docs/integrations/auth/clerk.mdx +172 -0
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +196 -0
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +79 -0
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +188 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +57 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +201 -0
- package/.docs/raw/docs/integrations/gateways/index.mdx +162 -0
- package/.docs/raw/docs/integrations/index.mdx +185 -0
- package/.docs/raw/docs/integrations/observability/helicone.mdx +130 -0
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +163 -0
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +150 -0
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +712 -0
- package/.docs/raw/docs/integrations/tools/mcp.mdx +267 -0
- package/.docs/raw/docs/integrations/tools/react-mcp.mdx +337 -0
- package/.docs/raw/docs/migrations/v0-14.mdx +297 -0
- package/.docs/raw/docs/primitives/action-bar.mdx +1 -0
- package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/primitives/attachment.mdx +1 -0
- package/.docs/raw/docs/primitives/branch-picker.mdx +1 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +90 -85
- package/.docs/raw/docs/primitives/composer.mdx +55 -1
- package/.docs/raw/docs/primitives/error.mdx +1 -0
- package/.docs/raw/docs/primitives/index.mdx +4 -3
- package/.docs/raw/docs/primitives/message.mdx +68 -5
- package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -0
- package/.docs/raw/docs/primitives/suggestion.mdx +10 -0
- package/.docs/raw/docs/primitives/thread-list.mdx +39 -0
- package/.docs/raw/docs/primitives/thread.mdx +16 -13
- package/.docs/raw/docs/react-native/hooks.mdx +2 -2
- package/.docs/raw/docs/react-native/index.mdx +5 -7
- package/.docs/raw/docs/react-native/migration.mdx +1 -3
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +396 -0
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +60 -0
- package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +216 -0
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +70 -0
- package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +243 -0
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +154 -0
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +52 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +73 -128
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +70 -64
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +337 -123
- package/.docs/raw/docs/runtimes/concepts/adapters.mdx +265 -0
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +125 -0
- package/.docs/raw/docs/runtimes/concepts/stability.mdx +67 -0
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +428 -0
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +703 -0
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +348 -0
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +261 -1236
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +746 -0
- package/.docs/raw/docs/runtimes/custom/overview.mdx +71 -0
- package/.docs/raw/docs/runtimes/google-adk/api.mdx +256 -0
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +717 -0
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +69 -0
- package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +229 -0
- package/.docs/raw/docs/runtimes/langchain.mdx +533 -0
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +305 -0
- package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +104 -0
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +84 -0
- package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +496 -0
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +127 -0
- package/.docs/raw/docs/runtimes/langgraph/threads.mdx +113 -0
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +3 -3
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -23
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
- package/.docs/raw/docs/runtimes/opencode/hooks.mdx +191 -0
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +48 -0
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +119 -0
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +78 -203
- package/.docs/raw/docs/ui/accordion.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-modal.mdx +1 -0
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -0
- package/.docs/raw/docs/ui/attachment.mdx +1 -0
- package/.docs/raw/docs/ui/badge.mdx +1 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +12 -1
- package/.docs/raw/docs/ui/context-display.mdx +1 -0
- package/.docs/raw/docs/ui/diff-viewer.mdx +1 -0
- package/.docs/raw/docs/ui/directive-text.mdx +1 -0
- package/.docs/raw/docs/ui/file.mdx +1 -0
- package/.docs/raw/docs/ui/image.mdx +1 -0
- package/.docs/raw/docs/ui/markdown.mdx +2 -14
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/mermaid.mdx +1 -0
- package/.docs/raw/docs/ui/message-timing.mdx +3 -2
- package/.docs/raw/docs/ui/model-selector.mdx +9 -8
- package/.docs/raw/docs/ui/part-grouping.mdx +325 -313
- package/.docs/raw/docs/ui/quote.mdx +1 -0
- package/.docs/raw/docs/ui/reasoning.mdx +66 -33
- package/.docs/raw/docs/ui/scrollbar.mdx +1 -0
- package/.docs/raw/docs/ui/select.mdx +1 -0
- package/.docs/raw/docs/ui/sources.mdx +18 -0
- package/.docs/raw/docs/ui/streamdown.mdx +35 -2
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -0
- package/.docs/raw/docs/ui/tabs.mdx +1 -0
- package/.docs/raw/docs/ui/thread-list.mdx +19 -2
- package/.docs/raw/docs/ui/thread.mdx +58 -3
- package/.docs/raw/docs/ui/tool-fallback.mdx +1 -0
- package/.docs/raw/docs/ui/tool-group.mdx +39 -11
- package/.docs/raw/docs/ui/voice.mdx +1 -0
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -0
- package/.docs/raw/docs/utilities/react-o11y.mdx +278 -0
- package/.docs/raw/docs/utilities/tw-shimmer.mdx +1 -0
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +6 -6
- package/src/tools/tests/path-traversal.test.ts +1 -1
- package/.docs/raw/docs/(docs)/guides/branching.mdx +0 -65
- package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +0 -164
- package/.docs/raw/docs/(docs)/guides/editing.mdx +0 -66
- package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -38
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +0 -159
- package/.docs/raw/docs/runtimes/a2a/index.mdx +0 -298
- package/.docs/raw/docs/runtimes/assistant-transport.mdx +0 -1033
- package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +0 -314
- package/.docs/raw/docs/runtimes/custom/local.mdx +0 -1464
- package/.docs/raw/docs/runtimes/data-stream.mdx +0 -422
- package/.docs/raw/docs/runtimes/google-adk/index.mdx +0 -686
- package/.docs/raw/docs/runtimes/helicone.mdx +0 -61
- package/.docs/raw/docs/runtimes/langchain/comparison.mdx +0 -60
- package/.docs/raw/docs/runtimes/langchain/index.mdx +0 -210
- package/.docs/raw/docs/runtimes/langgraph/index.mdx +0 -699
- package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +0 -12
- package/.docs/raw/docs/runtimes/langserve.mdx +0 -116
- package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -218
- package/.docs/raw/docs/runtimes/mastra/overview.mdx +0 -18
- package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -217
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: ComposerPrimitive
|
|
3
|
-
description:
|
|
3
|
+
description: Composable input primitives for assistant-ui prompts, send controls, cancellation, attachments, and composer state.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { ComposerPrimitiveAddAttachmentProps, ComposerPrimitiveAttachmentByIndexProps, ComposerPrimitiveAttachmentDropzoneProps, ComposerPrimitiveAttachmentsProps, ComposerPrimitiveCancelProps, ComposerPrimitiveDictateProps, ComposerPrimitiveDictationTranscriptProps, ComposerPrimitiveIfProps, ComposerPrimitiveInputProps, ComposerPrimitiveQueueProps, ComposerPrimitiveQuoteDismissProps, ComposerPrimitiveQuoteProps, ComposerPrimitiveQuoteTextProps, ComposerPrimitiveRootProps, ComposerPrimitiveSendProps, ComposerPrimitiveStopDictationProps, ComposerPrimitiveUnstable_TriggerPopoverBackProps, ComposerPrimitiveUnstable_TriggerPopoverCategoriesProps, ComposerPrimitiveUnstable_TriggerPopoverCategoryItemProps, ComposerPrimitiveUnstable_TriggerPopoverItemProps, ComposerPrimitiveUnstable_TriggerPopoverItemsProps, ComposerPrimitiveUnstable_TriggerPopoverProps, ComposerPrimitiveUnstable_TriggerPopoverRootProps } from "@/generated/typeDocs";
|
|
7
|
+
import { ComposerPrimitive as ComposerPrimitiveDocs } from "@/generated/primitiveDocs";
|
|
7
8
|
|
|
9
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
10
|
+
{/* Do not edit manually. */}
|
|
8
11
|
|
|
12
|
+
For examples and usage patterns, see [Composer](/docs/primitives/composer).
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
**Dual Use!** A Composer placed directly inside a `Thread` will compose new
|
|
12
|
-
messages. A Composer placed inside a `Message` will edit that message.
|
|
13
|
-
</Callout>
|
|
14
|
-
|
|
14
|
+
{/* api-manual:start */}
|
|
15
15
|
## Anatomy
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
@@ -56,81 +56,47 @@ const ComposerWithDictation = () => (
|
|
|
56
56
|
</ComposerPrimitive.Root>
|
|
57
57
|
);
|
|
58
58
|
```
|
|
59
|
+
{/* api-manual:end */}
|
|
60
|
+
|
|
61
|
+
{/* api-reference:start */}
|
|
62
|
+
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
63
|
+
{/* Do not edit this block manually. */}
|
|
59
64
|
|
|
60
65
|
## API Reference
|
|
61
66
|
|
|
62
67
|
### Root
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
{ComposerPrimitiveDocs.Root?.deprecated && (
|
|
70
|
+
<Callout type="warn">
|
|
71
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Root.deprecated}
|
|
72
|
+
</Callout>
|
|
73
|
+
)}
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
{ComposerPrimitiveDocs.Root?.description}
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
]}
|
|
75
|
-
/>
|
|
77
|
+
{ComposerPrimitiveDocs.Root?.element && (
|
|
78
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Root?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
79
|
+
)}
|
|
80
|
+
|
|
81
|
+
<ParametersTable {...ComposerPrimitiveRootProps} />
|
|
76
82
|
|
|
77
83
|
### Input
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
name: "asChild",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: "submitMode",
|
|
91
|
-
type: '"enter" | "ctrlEnter" | "none"',
|
|
92
|
-
default: '"enter"',
|
|
93
|
-
description:
|
|
94
|
-
'Controls how the Enter key submits messages. "enter": plain Enter submits (Shift+Enter for newline). "ctrlEnter": Ctrl/Cmd+Enter submits (plain Enter for newline). "none": keyboard submission disabled.',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "cancelOnEscape",
|
|
98
|
-
type: "boolean",
|
|
99
|
-
default: "true",
|
|
100
|
-
description:
|
|
101
|
-
"Whether to cancel message composition when Escape is pressed.",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: "unstable_focusOnRunStart",
|
|
105
|
-
type: "boolean",
|
|
106
|
-
default: "true",
|
|
107
|
-
description:
|
|
108
|
-
"Whether to automatically focus the input when a new run starts.",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "unstable_focusOnScrollToBottom",
|
|
112
|
-
type: "boolean",
|
|
113
|
-
default: "true",
|
|
114
|
-
description:
|
|
115
|
-
"Whether to automatically focus the input when scrolling to bottom.",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "unstable_focusOnThreadSwitched",
|
|
119
|
-
type: "boolean",
|
|
120
|
-
default: "true",
|
|
121
|
-
description:
|
|
122
|
-
"Whether to automatically focus the input when switching threads.",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: "addAttachmentOnPaste",
|
|
126
|
-
type: "boolean",
|
|
127
|
-
default: "true",
|
|
128
|
-
description:
|
|
129
|
-
"Whether to automatically add pasted files as attachments.",
|
|
130
|
-
},
|
|
131
|
-
]}
|
|
132
|
-
/>
|
|
85
|
+
{ComposerPrimitiveDocs.Input?.deprecated && (
|
|
86
|
+
<Callout type="warn">
|
|
87
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Input.deprecated}
|
|
88
|
+
</Callout>
|
|
89
|
+
)}
|
|
90
|
+
|
|
91
|
+
{ComposerPrimitiveDocs.Input?.description}
|
|
133
92
|
|
|
93
|
+
{ComposerPrimitiveDocs.Input?.element && (
|
|
94
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Input?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
<ParametersTable {...ComposerPrimitiveInputProps} />
|
|
98
|
+
|
|
99
|
+
{/* api-manual:ComposerPrimitive.Input:start */}
|
|
134
100
|
#### Keyboard Shortcuts
|
|
135
101
|
|
|
136
102
|
Default (`submitMode="enter"`):
|
|
@@ -149,506 +115,402 @@ With `submitMode="ctrlEnter"`:
|
|
|
149
115
|
| <Kbd>Enter</Kbd> | Inserts a newline. |
|
|
150
116
|
| <Kbd>Escape</Kbd> | Sends a cancel action. |
|
|
151
117
|
|
|
152
|
-
|
|
118
|
+
With `submitMode="none"`:
|
|
119
|
+
|
|
120
|
+
| Key | Description |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| <Kbd>Enter</Kbd> | Inserts a newline (no keyboard submission). |
|
|
123
|
+
| <Kbd>Escape</Kbd> | Sends a cancel action. |
|
|
153
124
|
|
|
154
|
-
|
|
125
|
+
#### Touch-primary devices
|
|
155
126
|
|
|
156
|
-
|
|
127
|
+
Pass `unstable_insertNewlineOnTouchEnter` to make plain Enter insert a newline on phones and tablets without a hardware keyboard, detected via the `(pointer: coarse) and (not (any-pointer: fine))` media query. Messages then dispatch only via the explicit Send button, matching the chat-input convention used by WhatsApp, Slack, Discord, iMessage, ChatGPT, and Claude.ai.
|
|
157
128
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
name: "asChild",
|
|
163
|
-
},
|
|
164
|
-
]}
|
|
129
|
+
```tsx
|
|
130
|
+
<ComposerPrimitive.Input
|
|
131
|
+
placeholder="Ask anything..."
|
|
132
|
+
unstable_insertNewlineOnTouchEnter
|
|
165
133
|
/>
|
|
134
|
+
```
|
|
166
135
|
|
|
167
|
-
|
|
136
|
+
Only takes effect when `submitMode` resolves to `"enter"` (the default); `"ctrlEnter"` and `"none"` are unchanged, so a tablet paired with a hardware keyboard can still submit via Cmd/Ctrl+Enter.
|
|
137
|
+
{/* api-manual:ComposerPrimitive.Input:end */}
|
|
168
138
|
|
|
169
|
-
|
|
139
|
+
### Send
|
|
170
140
|
|
|
171
|
-
|
|
172
|
-
|
|
141
|
+
{ComposerPrimitiveDocs.Send?.deprecated && (
|
|
142
|
+
<Callout type="warn">
|
|
143
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Send.deprecated}
|
|
144
|
+
</Callout>
|
|
145
|
+
)}
|
|
173
146
|
|
|
174
|
-
|
|
147
|
+
{ComposerPrimitiveDocs.Send?.description}
|
|
175
148
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
{
|
|
180
|
-
name: "asChild",
|
|
181
|
-
},
|
|
182
|
-
]}
|
|
183
|
-
/>
|
|
149
|
+
{ComposerPrimitiveDocs.Send?.element && (
|
|
150
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Send?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
151
|
+
)}
|
|
184
152
|
|
|
185
|
-
|
|
153
|
+
<ParametersTable {...ComposerPrimitiveSendProps} />
|
|
186
154
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
<ParametersTable
|
|
190
|
-
type="ComposerPrimitiveAttachmentsProps"
|
|
191
|
-
parameters={[
|
|
192
|
-
{
|
|
193
|
-
name: "components",
|
|
194
|
-
type: "ComposerAttachmentsComponents",
|
|
195
|
-
description: "The component to render for each attachment.",
|
|
196
|
-
children: [
|
|
197
|
-
{
|
|
198
|
-
type: "ComposerPrimitiveAttachmentsProps['components']",
|
|
199
|
-
parameters: [
|
|
200
|
-
{
|
|
201
|
-
name: "Image",
|
|
202
|
-
type: "ComponentType",
|
|
203
|
-
description: "The component to render for each image attachment.",
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
name: "Document",
|
|
207
|
-
type: "ComponentType",
|
|
208
|
-
description:
|
|
209
|
-
"The component to render for each document attachment.",
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: "File",
|
|
213
|
-
type: "ComponentType",
|
|
214
|
-
description: "The component to render for each file attachment.",
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
name: "Attachment",
|
|
218
|
-
type: "ComponentType",
|
|
219
|
-
description: "The fallback component to render for each attachment type.",
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
]}
|
|
226
|
-
/>
|
|
155
|
+
### Cancel
|
|
227
156
|
|
|
228
|
-
|
|
157
|
+
{ComposerPrimitiveDocs.Cancel?.deprecated && (
|
|
158
|
+
<Callout type="warn">
|
|
159
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Cancel.deprecated}
|
|
160
|
+
</Callout>
|
|
161
|
+
)}
|
|
229
162
|
|
|
230
|
-
|
|
163
|
+
{ComposerPrimitiveDocs.Cancel?.description}
|
|
231
164
|
|
|
232
|
-
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
components={{
|
|
236
|
-
Image: MyImageAttachment,
|
|
237
|
-
Document: MyDocumentAttachment
|
|
238
|
-
}}
|
|
239
|
-
/>
|
|
240
|
-
```
|
|
165
|
+
{ComposerPrimitiveDocs.Cancel?.element && (
|
|
166
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Cancel?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
167
|
+
)}
|
|
241
168
|
|
|
242
|
-
<ParametersTable
|
|
243
|
-
type="ComposerPrimitive.AttachmentByIndex.Props"
|
|
244
|
-
parameters={[
|
|
245
|
-
{
|
|
246
|
-
name: "index",
|
|
247
|
-
type: "number",
|
|
248
|
-
required: true,
|
|
249
|
-
description: "The index of the attachment to render.",
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
name: "components",
|
|
253
|
-
type: "ComposerAttachmentsComponents",
|
|
254
|
-
description: "The components to render for the attachment.",
|
|
255
|
-
},
|
|
256
|
-
]}
|
|
257
|
-
/>
|
|
169
|
+
<ParametersTable {...ComposerPrimitiveCancelProps} />
|
|
258
170
|
|
|
259
171
|
### AddAttachment
|
|
260
172
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
type="ComposerPrimitiveAddAttachmentProps"
|
|
267
|
-
parameters={[
|
|
268
|
-
{
|
|
269
|
-
name: "asChild",
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
name: "multiple",
|
|
273
|
-
type: "boolean | undefined",
|
|
274
|
-
description: "Allow selecting multiple attachments at the same time.",
|
|
275
|
-
default: "true",
|
|
276
|
-
},
|
|
277
|
-
]}
|
|
278
|
-
/>
|
|
173
|
+
{ComposerPrimitiveDocs.AddAttachment?.deprecated && (
|
|
174
|
+
<Callout type="warn">
|
|
175
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.AddAttachment.deprecated}
|
|
176
|
+
</Callout>
|
|
177
|
+
)}
|
|
279
178
|
|
|
280
|
-
|
|
179
|
+
{ComposerPrimitiveDocs.AddAttachment?.description}
|
|
281
180
|
|
|
282
|
-
|
|
181
|
+
{ComposerPrimitiveDocs.AddAttachment?.element && (
|
|
182
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.AddAttachment?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
183
|
+
)}
|
|
283
184
|
|
|
284
|
-
|
|
185
|
+
<ParametersTable {...ComposerPrimitiveAddAttachmentProps} />
|
|
285
186
|
|
|
286
|
-
|
|
187
|
+
### Attachments
|
|
287
188
|
|
|
288
|
-
|
|
289
|
-
<
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
```
|
|
189
|
+
{ComposerPrimitiveDocs.Attachments?.deprecated && (
|
|
190
|
+
<Callout type="warn">
|
|
191
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Attachments.deprecated}
|
|
192
|
+
</Callout>
|
|
193
|
+
)}
|
|
294
194
|
|
|
295
|
-
|
|
296
|
-
type="ComposerPrimitiveAttachmentDropzoneProps"
|
|
297
|
-
parameters={[
|
|
298
|
-
{
|
|
299
|
-
name: "asChild",
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
name: "disabled",
|
|
303
|
-
type: "boolean | undefined",
|
|
304
|
-
description: "When true, drag-and-drop is disabled and files will not be added on drop.",
|
|
305
|
-
},
|
|
306
|
-
]}
|
|
307
|
-
/>
|
|
195
|
+
{ComposerPrimitiveDocs.Attachments?.description}
|
|
308
196
|
|
|
309
|
-
|
|
197
|
+
{ComposerPrimitiveDocs.Attachments?.element && (
|
|
198
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Attachments?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
199
|
+
)}
|
|
310
200
|
|
|
311
|
-
|
|
201
|
+
<ParametersTable {...ComposerPrimitiveAttachmentsProps} />
|
|
312
202
|
|
|
313
|
-
|
|
203
|
+
### AttachmentByIndex
|
|
314
204
|
|
|
315
|
-
|
|
205
|
+
{ComposerPrimitiveDocs.AttachmentByIndex?.deprecated && (
|
|
206
|
+
<Callout type="warn">
|
|
207
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.AttachmentByIndex.deprecated}
|
|
208
|
+
</Callout>
|
|
209
|
+
)}
|
|
316
210
|
|
|
317
|
-
|
|
318
|
-
type="ComposerPrimitiveDictateProps"
|
|
319
|
-
parameters={[
|
|
320
|
-
{
|
|
321
|
-
name: "asChild",
|
|
322
|
-
},
|
|
323
|
-
]}
|
|
324
|
-
/>
|
|
211
|
+
{ComposerPrimitiveDocs.AttachmentByIndex?.description}
|
|
325
212
|
|
|
326
|
-
|
|
213
|
+
{ComposerPrimitiveDocs.AttachmentByIndex?.element && (
|
|
214
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.AttachmentByIndex?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
215
|
+
)}
|
|
327
216
|
|
|
328
|
-
|
|
217
|
+
<ParametersTable {...ComposerPrimitiveAttachmentByIndexProps} />
|
|
329
218
|
|
|
330
|
-
|
|
219
|
+
### AttachmentDropzone
|
|
331
220
|
|
|
332
|
-
|
|
221
|
+
{ComposerPrimitiveDocs.AttachmentDropzone?.deprecated && (
|
|
222
|
+
<Callout type="warn">
|
|
223
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.AttachmentDropzone.deprecated}
|
|
224
|
+
</Callout>
|
|
225
|
+
)}
|
|
333
226
|
|
|
334
|
-
|
|
335
|
-
type="ComposerPrimitiveStopDictationProps"
|
|
336
|
-
parameters={[
|
|
337
|
-
{
|
|
338
|
-
name: "asChild",
|
|
339
|
-
},
|
|
340
|
-
]}
|
|
341
|
-
/>
|
|
227
|
+
{ComposerPrimitiveDocs.AttachmentDropzone?.description}
|
|
342
228
|
|
|
343
|
-
|
|
229
|
+
{ComposerPrimitiveDocs.AttachmentDropzone?.element && (
|
|
230
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.AttachmentDropzone?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
231
|
+
)}
|
|
344
232
|
|
|
345
|
-
|
|
233
|
+
<ParametersTable {...ComposerPrimitiveAttachmentDropzoneProps} />
|
|
346
234
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
235
|
+
{/* api-manual:ComposerPrimitive.AttachmentDropzone:start */}
|
|
236
|
+
| Data attribute | Values |
|
|
237
|
+
| --- | --- |
|
|
238
|
+
| `[data-dragging]` | Present while a file is being dragged over the dropzone. |
|
|
239
|
+
{/* api-manual:ComposerPrimitive.AttachmentDropzone:end */}
|
|
351
240
|
|
|
352
|
-
|
|
241
|
+
### Dictate
|
|
353
242
|
|
|
354
|
-
|
|
243
|
+
{ComposerPrimitiveDocs.Dictate?.deprecated && (
|
|
244
|
+
<Callout type="warn">
|
|
245
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Dictate.deprecated}
|
|
246
|
+
</Callout>
|
|
247
|
+
)}
|
|
355
248
|
|
|
356
|
-
|
|
357
|
-
{/* Optional: Display interim transcript separately with custom styling */}
|
|
358
|
-
<AuiIf condition={(s) => s.composer.dictation != null}>
|
|
359
|
-
<div className="dictation-preview">
|
|
360
|
-
<ComposerPrimitive.DictationTranscript className="italic text-muted" />
|
|
361
|
-
</div>
|
|
362
|
-
</AuiIf>
|
|
363
|
-
```
|
|
249
|
+
{ComposerPrimitiveDocs.Dictate?.description}
|
|
364
250
|
|
|
365
|
-
|
|
251
|
+
{ComposerPrimitiveDocs.Dictate?.element && (
|
|
252
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Dictate?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
253
|
+
)}
|
|
366
254
|
|
|
367
|
-
|
|
255
|
+
<ParametersTable {...ComposerPrimitiveDictateProps} />
|
|
368
256
|
|
|
369
|
-
|
|
257
|
+
### StopDictation
|
|
370
258
|
|
|
371
|
-
|
|
372
|
-
<
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
```
|
|
259
|
+
{ComposerPrimitiveDocs.StopDictation?.deprecated && (
|
|
260
|
+
<Callout type="warn">
|
|
261
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.StopDictation.deprecated}
|
|
262
|
+
</Callout>
|
|
263
|
+
)}
|
|
377
264
|
|
|
378
|
-
|
|
265
|
+
{ComposerPrimitiveDocs.StopDictation?.description}
|
|
379
266
|
|
|
380
|
-
|
|
267
|
+
{ComposerPrimitiveDocs.StopDictation?.element && (
|
|
268
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.StopDictation?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
269
|
+
)}
|
|
381
270
|
|
|
382
|
-
|
|
271
|
+
<ParametersTable {...ComposerPrimitiveStopDictationProps} />
|
|
383
272
|
|
|
384
|
-
###
|
|
273
|
+
### DictationTranscript
|
|
385
274
|
|
|
386
|
-
|
|
275
|
+
{ComposerPrimitiveDocs.DictationTranscript?.deprecated && (
|
|
276
|
+
<Callout type="warn">
|
|
277
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.DictationTranscript.deprecated}
|
|
278
|
+
</Callout>
|
|
279
|
+
)}
|
|
387
280
|
|
|
388
|
-
|
|
281
|
+
{ComposerPrimitiveDocs.DictationTranscript?.description}
|
|
389
282
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
{
|
|
394
|
-
name: "asChild",
|
|
395
|
-
},
|
|
396
|
-
]}
|
|
397
|
-
/>
|
|
283
|
+
{ComposerPrimitiveDocs.DictationTranscript?.element && (
|
|
284
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.DictationTranscript?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
285
|
+
)}
|
|
398
286
|
|
|
399
|
-
<
|
|
400
|
-
See the [Quoting guide](/docs/guides/quoting) for a complete walkthrough including the floating selection toolbar and backend handling.
|
|
401
|
-
</Callout>
|
|
287
|
+
<ParametersTable {...ComposerPrimitiveDictationTranscriptProps} />
|
|
402
288
|
|
|
403
|
-
###
|
|
289
|
+
### If
|
|
404
290
|
|
|
405
|
-
|
|
291
|
+
{ComposerPrimitiveDocs.If?.deprecated && (
|
|
292
|
+
<Callout type="warn">
|
|
293
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.If.deprecated}
|
|
294
|
+
</Callout>
|
|
295
|
+
)}
|
|
406
296
|
|
|
407
|
-
|
|
408
|
-
import { AuiIf } from "@assistant-ui/react";
|
|
297
|
+
{ComposerPrimitiveDocs.If?.description}
|
|
409
298
|
|
|
410
|
-
|
|
411
|
-
{
|
|
412
|
-
|
|
299
|
+
{ComposerPrimitiveDocs.If?.element && (
|
|
300
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.If?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
301
|
+
)}
|
|
413
302
|
|
|
414
|
-
<
|
|
415
|
-
{/* rendered if dictation is active */}
|
|
416
|
-
</AuiIf>
|
|
417
|
-
```
|
|
303
|
+
<ParametersTable {...ComposerPrimitiveIfProps} />
|
|
418
304
|
|
|
419
|
-
|
|
305
|
+
### Quote
|
|
420
306
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
307
|
+
{ComposerPrimitiveDocs.Quote?.deprecated && (
|
|
308
|
+
<Callout type="warn">
|
|
309
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Quote.deprecated}
|
|
310
|
+
</Callout>
|
|
311
|
+
)}
|
|
424
312
|
|
|
425
|
-
|
|
313
|
+
{ComposerPrimitiveDocs.Quote?.description}
|
|
426
314
|
|
|
427
|
-
|
|
315
|
+
{ComposerPrimitiveDocs.Quote?.element && (
|
|
316
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Quote?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
317
|
+
)}
|
|
428
318
|
|
|
429
|
-
|
|
430
|
-
import { ComposerPrimitive } from "@assistant-ui/react";
|
|
431
|
-
import { unstable_defaultDirectiveFormatter } from "@assistant-ui/core";
|
|
319
|
+
<ParametersTable {...ComposerPrimitiveQuoteProps} />
|
|
432
320
|
|
|
433
|
-
|
|
434
|
-
<ComposerPrimitive.Unstable_TriggerPopoverRoot>
|
|
435
|
-
<ComposerPrimitive.Root>
|
|
436
|
-
<ComposerPrimitive.Input />
|
|
321
|
+
### QuoteText
|
|
437
322
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
{...mention.directive}
|
|
444
|
-
/>
|
|
445
|
-
<ComposerPrimitive.Unstable_TriggerPopoverCategories>
|
|
446
|
-
{(categories) =>
|
|
447
|
-
categories.map((cat) => (
|
|
448
|
-
<ComposerPrimitive.Unstable_TriggerPopoverCategoryItem
|
|
449
|
-
key={cat.id}
|
|
450
|
-
categoryId={cat.id}
|
|
451
|
-
>
|
|
452
|
-
{cat.label}
|
|
453
|
-
</ComposerPrimitive.Unstable_TriggerPopoverCategoryItem>
|
|
454
|
-
))
|
|
455
|
-
}
|
|
456
|
-
</ComposerPrimitive.Unstable_TriggerPopoverCategories>
|
|
457
|
-
<ComposerPrimitive.Unstable_TriggerPopoverItems>
|
|
458
|
-
{(items) =>
|
|
459
|
-
items.map((item) => (
|
|
460
|
-
<ComposerPrimitive.Unstable_TriggerPopoverItem
|
|
461
|
-
key={item.id}
|
|
462
|
-
item={item}
|
|
463
|
-
>
|
|
464
|
-
{item.label}
|
|
465
|
-
</ComposerPrimitive.Unstable_TriggerPopoverItem>
|
|
466
|
-
))
|
|
467
|
-
}
|
|
468
|
-
</ComposerPrimitive.Unstable_TriggerPopoverItems>
|
|
469
|
-
<ComposerPrimitive.Unstable_TriggerPopoverBack>
|
|
470
|
-
Back
|
|
471
|
-
</ComposerPrimitive.Unstable_TriggerPopoverBack>
|
|
472
|
-
</ComposerPrimitive.Unstable_TriggerPopover>
|
|
473
|
-
</ComposerPrimitive.Root>
|
|
474
|
-
</ComposerPrimitive.Unstable_TriggerPopoverRoot>
|
|
475
|
-
);
|
|
476
|
-
```
|
|
323
|
+
{ComposerPrimitiveDocs.QuoteText?.deprecated && (
|
|
324
|
+
<Callout type="warn">
|
|
325
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.QuoteText.deprecated}
|
|
326
|
+
</Callout>
|
|
327
|
+
)}
|
|
477
328
|
|
|
478
|
-
|
|
329
|
+
{ComposerPrimitiveDocs.QuoteText?.description}
|
|
479
330
|
|
|
480
|
-
|
|
331
|
+
{ComposerPrimitiveDocs.QuoteText?.element && (
|
|
332
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.QuoteText?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
333
|
+
)}
|
|
481
334
|
|
|
482
|
-
|
|
335
|
+
<ParametersTable {...ComposerPrimitiveQuoteTextProps} />
|
|
483
336
|
|
|
484
|
-
###
|
|
337
|
+
### QuoteDismiss
|
|
485
338
|
|
|
486
|
-
|
|
339
|
+
{ComposerPrimitiveDocs.QuoteDismiss?.deprecated && (
|
|
340
|
+
<Callout type="warn">
|
|
341
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.QuoteDismiss.deprecated}
|
|
342
|
+
</Callout>
|
|
343
|
+
)}
|
|
487
344
|
|
|
488
|
-
|
|
489
|
-
| --- | --- | --- | --- |
|
|
490
|
-
| `char` | `string` | — | Character(s) that activate the trigger (e.g. `"@"`, `"/"`) — unique within the root |
|
|
491
|
-
| `adapter` | `Unstable_TriggerAdapter` | — | Provides categories, items, and search |
|
|
345
|
+
{ComposerPrimitiveDocs.QuoteDismiss?.description}
|
|
492
346
|
|
|
493
|
-
|
|
347
|
+
{ComposerPrimitiveDocs.QuoteDismiss?.element && (
|
|
348
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.QuoteDismiss?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
349
|
+
)}
|
|
494
350
|
|
|
495
|
-
|
|
496
|
-
- [`Unstable_TriggerPopover.Action`](#unstable_triggerpopoveraction) — fires `onExecute` on selection; leaves a directive chip as an audit trail by default.
|
|
351
|
+
<ParametersTable {...ComposerPrimitiveQuoteDismissProps} />
|
|
497
352
|
|
|
498
|
-
|
|
353
|
+
### Queue
|
|
499
354
|
|
|
500
|
-
|
|
355
|
+
{ComposerPrimitiveDocs.Queue?.deprecated && (
|
|
356
|
+
<Callout type="warn">
|
|
357
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Queue.deprecated}
|
|
358
|
+
</Callout>
|
|
359
|
+
)}
|
|
501
360
|
|
|
502
|
-
|
|
361
|
+
{ComposerPrimitiveDocs.Queue?.description}
|
|
503
362
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
| `onInserted` | `(item) => void` | — | Fires after the directive text has been inserted. |
|
|
363
|
+
{ComposerPrimitiveDocs.Queue?.element && (
|
|
364
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Queue?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
365
|
+
)}
|
|
508
366
|
|
|
509
|
-
|
|
367
|
+
<ParametersTable {...ComposerPrimitiveQueueProps} />
|
|
510
368
|
|
|
511
|
-
|
|
369
|
+
### Unstable_TriggerPopover
|
|
512
370
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
371
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopover?.deprecated && (
|
|
372
|
+
<Callout type="warn">
|
|
373
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopover.deprecated}
|
|
374
|
+
</Callout>
|
|
375
|
+
)}
|
|
518
376
|
|
|
519
|
-
|
|
377
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopover?.description}
|
|
520
378
|
|
|
521
|
-
|
|
379
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopover?.element && (
|
|
380
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopover?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
381
|
+
)}
|
|
522
382
|
|
|
523
|
-
|
|
524
|
-
import type { Unstable_TriggerBehavior } from "@assistant-ui/react";
|
|
383
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverProps} />
|
|
525
384
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
385
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopover:start */}
|
|
386
|
+
| Data attribute | Values |
|
|
387
|
+
| --- | --- |
|
|
388
|
+
| `[data-state]` | `"open"` when the trigger popover is open. |
|
|
389
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopover:end */}
|
|
390
|
+
|
|
391
|
+
### Unstable_TriggerPopoverRoot
|
|
392
|
+
|
|
393
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverRoot?.deprecated && (
|
|
394
|
+
<Callout type="warn">
|
|
395
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverRoot.deprecated}
|
|
396
|
+
</Callout>
|
|
397
|
+
)}
|
|
398
|
+
|
|
399
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverRoot?.description}
|
|
400
|
+
|
|
401
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverRoot?.element && (
|
|
402
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverRoot?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
403
|
+
)}
|
|
404
|
+
|
|
405
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverRootProps} />
|
|
531
406
|
|
|
532
407
|
### Unstable_TriggerPopoverCategories
|
|
533
408
|
|
|
534
|
-
|
|
409
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategories?.deprecated && (
|
|
410
|
+
<Callout type="warn">
|
|
411
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverCategories.deprecated}
|
|
412
|
+
</Callout>
|
|
413
|
+
)}
|
|
414
|
+
|
|
415
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategories?.description}
|
|
416
|
+
|
|
417
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategories?.element && (
|
|
418
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverCategories?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
419
|
+
)}
|
|
420
|
+
|
|
421
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverCategoriesProps} />
|
|
535
422
|
|
|
536
423
|
### Unstable_TriggerPopoverCategoryItem
|
|
537
424
|
|
|
538
|
-
|
|
425
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategoryItem?.deprecated && (
|
|
426
|
+
<Callout type="warn">
|
|
427
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverCategoryItem.deprecated}
|
|
428
|
+
</Callout>
|
|
429
|
+
)}
|
|
539
430
|
|
|
540
|
-
|
|
541
|
-
| --- | --- | --- |
|
|
542
|
-
| `categoryId` | `string` | The category to select on click |
|
|
431
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategoryItem?.description}
|
|
543
432
|
|
|
544
|
-
|
|
433
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverCategoryItem?.element && (
|
|
434
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverCategoryItem?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
435
|
+
)}
|
|
545
436
|
|
|
546
|
-
|
|
437
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverCategoryItemProps} />
|
|
547
438
|
|
|
548
|
-
|
|
439
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopoverCategoryItem:start */}
|
|
440
|
+
| Data attribute | Values |
|
|
441
|
+
| --- | --- |
|
|
442
|
+
| `[data-highlighted]` | Present when keyboard-highlighted. |
|
|
443
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopoverCategoryItem:end */}
|
|
549
444
|
|
|
550
|
-
|
|
445
|
+
### Unstable_TriggerPopoverItems
|
|
551
446
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
447
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItems?.deprecated && (
|
|
448
|
+
<Callout type="warn">
|
|
449
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverItems.deprecated}
|
|
450
|
+
</Callout>
|
|
451
|
+
)}
|
|
556
452
|
|
|
557
|
-
|
|
453
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItems?.description}
|
|
558
454
|
|
|
559
|
-
|
|
455
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItems?.element && (
|
|
456
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverItems?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
457
|
+
)}
|
|
560
458
|
|
|
561
|
-
|
|
459
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverItemsProps} />
|
|
562
460
|
|
|
563
|
-
|
|
461
|
+
### Unstable_TriggerPopoverItem
|
|
564
462
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
highlightedIndex,
|
|
571
|
-
categories,
|
|
572
|
-
items,
|
|
573
|
-
activeCategoryId,
|
|
574
|
-
selectCategory,
|
|
575
|
-
selectItem,
|
|
576
|
-
goBack,
|
|
577
|
-
close,
|
|
578
|
-
handleKeyDown,
|
|
579
|
-
} = unstable_useTriggerPopoverScopeContext();
|
|
580
|
-
```
|
|
463
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItem?.deprecated && (
|
|
464
|
+
<Callout type="warn">
|
|
465
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverItem.deprecated}
|
|
466
|
+
</Callout>
|
|
467
|
+
)}
|
|
581
468
|
|
|
582
|
-
|
|
469
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItem?.description}
|
|
583
470
|
|
|
584
|
-
|
|
471
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverItem?.element && (
|
|
472
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverItem?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
473
|
+
)}
|
|
585
474
|
|
|
586
|
-
|
|
475
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverItemProps} />
|
|
587
476
|
|
|
588
|
-
|
|
477
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopoverItem:start */}
|
|
478
|
+
| Data attribute | Values |
|
|
479
|
+
| --- | --- |
|
|
480
|
+
| `[data-highlighted]` | Present when keyboard-highlighted. |
|
|
481
|
+
{/* api-manual:ComposerPrimitive.Unstable_TriggerPopoverItem:end */}
|
|
589
482
|
|
|
590
|
-
|
|
591
|
-
import {
|
|
592
|
-
unstable_useMentionAdapter,
|
|
593
|
-
type Unstable_Mention,
|
|
594
|
-
} from "@assistant-ui/react";
|
|
595
|
-
|
|
596
|
-
function MyComposer() {
|
|
597
|
-
// Default: tools from model context as a single "Tools" category
|
|
598
|
-
const mention = unstable_useMentionAdapter();
|
|
599
|
-
|
|
600
|
-
return (
|
|
601
|
-
<ComposerTriggerPopover char="@" {...mention} />
|
|
602
|
-
);
|
|
603
|
-
}
|
|
604
|
-
```
|
|
483
|
+
### Unstable_TriggerPopoverBack
|
|
605
484
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
{ id: "files", label: "Files", items: [/* ... */] },
|
|
612
|
-
],
|
|
613
|
-
includeModelContextTools: true,
|
|
614
|
-
});
|
|
615
|
-
```
|
|
485
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverBack?.deprecated && (
|
|
486
|
+
<Callout type="warn">
|
|
487
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_TriggerPopoverBack.deprecated}
|
|
488
|
+
</Callout>
|
|
489
|
+
)}
|
|
616
490
|
|
|
617
|
-
|
|
491
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverBack?.description}
|
|
618
492
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
| `categories` | `{ id, label, items: Unstable_Mention[] }[]` | Drill-down groups. |
|
|
623
|
-
| `includeModelContextTools` | `boolean \| { category?, formatLabel?, icon? }` | Tools integration. Defaults to `true` iff neither `items` nor `categories`. |
|
|
624
|
-
| `formatter` | `Unstable_DirectiveFormatter` | Override directive serialization. |
|
|
625
|
-
| `onInserted` | `(item) => void` | Fires after the directive is inserted. |
|
|
626
|
-
| `iconMap` | `Record<string, Unstable_IconComponent>` | `metadata.icon` / category id → React component. |
|
|
627
|
-
| `fallbackIcon` | `Unstable_IconComponent` | Fallback when no `iconMap` entry matches. |
|
|
493
|
+
{ComposerPrimitiveDocs.Unstable_TriggerPopoverBack?.element && (
|
|
494
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_TriggerPopoverBack?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
495
|
+
)}
|
|
628
496
|
|
|
629
|
-
|
|
497
|
+
<ParametersTable {...ComposerPrimitiveUnstable_TriggerPopoverBackProps} />
|
|
630
498
|
|
|
631
|
-
###
|
|
499
|
+
### Unstable_RegisteredTrigger
|
|
632
500
|
|
|
633
|
-
|
|
501
|
+
{ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.deprecated && (
|
|
502
|
+
<Callout type="warn">
|
|
503
|
+
<strong>Deprecated.</strong> {ComposerPrimitiveDocs.Unstable_RegisteredTrigger.deprecated}
|
|
504
|
+
</Callout>
|
|
505
|
+
)}
|
|
634
506
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
const SLASH_COMMANDS: readonly Unstable_SlashCommand[] = [
|
|
642
|
-
{ id: "summarize", execute: () => runSummarize(), icon: "FileText" },
|
|
643
|
-
{ id: "translate", execute: () => runTranslate(), icon: "Languages" },
|
|
644
|
-
];
|
|
645
|
-
|
|
646
|
-
function MyComposer() {
|
|
647
|
-
const slash = unstable_useSlashCommandAdapter({ commands: SLASH_COMMANDS });
|
|
648
|
-
return (
|
|
649
|
-
<ComposerTriggerPopover char="/" {...slash} />
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
```
|
|
507
|
+
{ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.description}
|
|
508
|
+
|
|
509
|
+
{ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.element && (
|
|
510
|
+
<p>This primitive renders a <code>{`<${ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.element}>`}</code> element unless <code>asChild</code> is set.</p>
|
|
511
|
+
)}
|
|
653
512
|
|
|
654
|
-
|
|
513
|
+
{ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.props && (
|
|
514
|
+
<ParametersTable type={ComposerPrimitiveDocs.Unstable_RegisteredTrigger?.element} parameters={ComposerPrimitiveDocs.Unstable_RegisteredTrigger.props} />
|
|
515
|
+
)}
|
|
516
|
+
{/* api-reference:end */}
|