|
1 | | -import { |
2 | | - Artifact, |
3 | | - ChainOfThought, |
4 | | - Checkpoint, |
5 | | - CodeBlock, |
6 | | - CodeBlockDark, |
7 | | - Confirmation, |
8 | | - ConfirmationAccepted, |
9 | | - ConfirmationRejected, |
10 | | - ConfirmationRequest, |
11 | | - Context, |
12 | | - Conversation, |
13 | | - Image, |
14 | | - InlineCitation, |
15 | | - Loader, |
16 | | - LoaderCustomStyling, |
17 | | - LoaderSizes, |
18 | | - Message, |
19 | | - ModelSelector, |
20 | | - OpenInChat, |
21 | | - Plan, |
22 | | - PromptInput, |
23 | | - Queue, |
24 | | - QueueCustom, |
25 | | - QueuePromptInput, |
26 | | - Reasoning, |
27 | | - Shimmer, |
28 | | - ShimmerCustomElements, |
29 | | - ShimmerDurations, |
30 | | - Sources, |
31 | | - SourcesCustomRendering, |
32 | | - Suggestion, |
33 | | - SuggestionAiInput, |
34 | | - Task, |
35 | | - Tool, |
36 | | - ToolInputAvailable, |
37 | | - ToolInputStreaming, |
38 | | - ToolOutputAvailable, |
39 | | - ToolOutputError, |
40 | | - WebPreview, |
41 | | - Workflow, |
42 | | -} from '@repo/examples' |
43 | | - |
| 1 | +import type { NuxtApp } from 'nuxt/app' |
| 2 | +import * as Components from '@repo/examples' |
44 | 3 | import ComponentLoader from '@/components/ComponentLoader.vue' |
45 | 4 | import ComponentViewer from '@/components/ComponentViewer.vue' |
46 | 5 |
|
47 | | -export default defineNuxtPlugin((nuxtApp) => { |
| 6 | +export default defineNuxtPlugin((nuxtApp: NuxtApp) => { |
48 | 7 | const { vueApp } = nuxtApp |
49 | 8 |
|
50 | 9 | vueApp.component('ComponentLoader', ComponentLoader) |
51 | 10 | vueApp.component('ComponentViewer', ComponentViewer) |
52 | 11 |
|
53 | | - vueApp.component('Artifact', Artifact) |
54 | | - vueApp.component('Message', Message) |
55 | | - vueApp.component('PromptInput', PromptInput) |
56 | | - vueApp.component('Conversation', Conversation) |
57 | | - vueApp.component('Image', Image) |
58 | | - vueApp.component('Shimmer', Shimmer) |
59 | | - vueApp.component('ShimmerCustomElements', ShimmerCustomElements) |
60 | | - vueApp.component('ShimmerDurations', ShimmerDurations) |
61 | | - vueApp.component('Sources', Sources) |
62 | | - vueApp.component('SourcesCustomRendering', SourcesCustomRendering) |
63 | | - vueApp.component('Task', Task) |
64 | | - vueApp.component('Suggestion', Suggestion) |
65 | | - vueApp.component('SuggestionAiInput', SuggestionAiInput) |
66 | | - vueApp.component('OpenInChat', OpenInChat) |
67 | | - vueApp.component('Loader', Loader) |
68 | | - vueApp.component('LoaderCustomStyling', LoaderCustomStyling) |
69 | | - vueApp.component('LoaderSizes', LoaderSizes) |
70 | | - vueApp.component('ChainOfThought', ChainOfThought) |
71 | | - vueApp.component('QueueCustom', QueueCustom) |
72 | | - vueApp.component('Queue', Queue) |
73 | | - vueApp.component('QueuePromptInput', QueuePromptInput) |
74 | | - vueApp.component('Plan', Plan) |
75 | | - vueApp.component('InlineCitation', InlineCitation) |
76 | | - vueApp.component('CodeBlock', CodeBlock) |
77 | | - vueApp.component('CodeBlockDark', CodeBlockDark) |
78 | | - vueApp.component('Checkpoint', Checkpoint) |
79 | | - vueApp.component('Workflow', Workflow) |
80 | | - vueApp.component('Tool', Tool) |
81 | | - vueApp.component('ToolInputStreaming', ToolInputStreaming) |
82 | | - vueApp.component('ToolInputAvailable', ToolInputAvailable) |
83 | | - vueApp.component('ToolOutputAvailable', ToolOutputAvailable) |
84 | | - vueApp.component('ToolOutputError', ToolOutputError) |
85 | | - vueApp.component('ModelSelector', ModelSelector) |
86 | | - vueApp.component('Context', Context) |
87 | | - vueApp.component('Confirmation', Confirmation) |
88 | | - vueApp.component('ConfirmationAccepted', ConfirmationAccepted) |
89 | | - vueApp.component('ConfirmationRejected', ConfirmationRejected) |
90 | | - vueApp.component('ConfirmationRequest', ConfirmationRequest) |
91 | | - vueApp.component('Reasoning', Reasoning) |
92 | | - vueApp.component('WebPreview', WebPreview) |
| 12 | + Object.entries(Components).forEach(([name, component]) => { |
| 13 | + vueApp.component(name, component) |
| 14 | + }) |
93 | 15 | }) |
0 commit comments