Skip to content

Commit 55a4aa3

Browse files
authored
Merge pull request #12 from peoray/feature/plan
feat: add plan component
2 parents f1fc8a8 + 0bc9c91 commit 55a4aa3

File tree

21 files changed

+694
-0
lines changed

21 files changed

+694
-0
lines changed

apps/test/app/examples/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export { default as Loader } from './loader.vue'
88
export { default as MessageMarkdown } from './message-markdown.vue'
99
export { default as Message } from './message.vue'
1010
export { default as OpenInChat } from './open-in-chat.vue'
11+
export { default as Plan } from './plan.vue'
1112
export { default as PromptInput } from './prompt-input.vue'
1213
export { default as Response } from './response.vue'
1314
export { default as Shimmer } from './shimmer.vue'

apps/test/app/examples/plan.vue

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<script setup lang="ts">
2+
import {
3+
Plan,
4+
PlanAction,
5+
PlanContent,
6+
PlanDescription,
7+
PlanFooter,
8+
PlanHeader,
9+
PlanTitle,
10+
PlanTrigger,
11+
} from '@repo/elements/plan'
12+
import { Button } from '@repo/shadcn-vue/components/ui/button'
13+
import { Kbd, KbdGroup } from '@repo/shadcn-vue/components/ui/kbd'
14+
import { FileText } from 'lucide-vue-next'
15+
</script>
16+
17+
<template>
18+
<Plan :default-open="false">
19+
<PlanHeader>
20+
<div>
21+
<div class="mb-4 flex items-center gap-2">
22+
<FileText class="size-4" />
23+
<PlanTitle>Rewrite AI Elements to VueJS</PlanTitle>
24+
</div>
25+
<PlanDescription>
26+
Rewrite the AI Elements component library from React to VueJS while
27+
maintaining compatibility with existing React-based shadcn/ui
28+
components using vue-js/compat, updating all 29 components and their
29+
test suite.
30+
</PlanDescription>
31+
</div>
32+
<PlanTrigger />
33+
</PlanHeader>
34+
<PlanContent>
35+
<div class="space-y-4 text-sm">
36+
<div>
37+
<h3 class="mb-2 font-semibold">
38+
Overview
39+
</h3>
40+
<p>
41+
This plan outlines the migration strategy for converting the AI
42+
Elements library from React to VueJS, ensuring compatibility and
43+
maintaining existing functionality.
44+
</p>
45+
</div>
46+
<div>
47+
<h3 class="mb-2 font-semibold">
48+
Key Steps
49+
</h3>
50+
<ul class="list-inside list-disc space-y-1">
51+
<li>Set up VueJS project structure</li>
52+
<li>Install vue-js/compat for React compatibility</li>
53+
<li>Migrate components one by one</li>
54+
<li>Update test suite for each component</li>
55+
<li>Verify compatibility with shadcn/ui</li>
56+
</ul>
57+
</div>
58+
</div>
59+
</PlanContent>
60+
<PlanFooter class="justify-end">
61+
<PlanAction>
62+
<Button size="sm">
63+
Build
64+
<KbdGroup class="gap-0">
65+
<Kbd class="bg-transparent text-inherit">⌘</Kbd>
66+
<Kbd class="translate-y-px bg-transparent text-inherit">↩</Kbd>
67+
</KbdGroup>
68+
</Button>
69+
</PlanAction>
70+
</PlanFooter>
71+
</Plan>
72+
</template>

apps/test/app/pages/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Loader from '~/examples/loader.vue'
1010
import MessageMarkdown from '~/examples/message-markdown.vue'
1111
import Message from '~/examples/message.vue'
1212
import OpenInChat from '~/examples/open-in-chat.vue'
13+
import Plan from '~/examples/plan.vue'
1314
import PromptInput from '~/examples/prompt-input.vue'
1415
import Response from '~/examples/response.vue'
1516
import Shimmer from '~/examples/shimmer.vue'
@@ -34,6 +35,7 @@ const components = [
3435
{ name: 'OpenInChat', Component: OpenInChat },
3536
{ name: 'Loader', Component: Loader },
3637
{ name: 'Sources', Component: Sources },
38+
{ name: 'Plan', Component: Plan },
3739
]
3840
</script>
3941

0 commit comments

Comments
 (0)