plan.tsx 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Derived from vercel/ai-elements (skills/ai-elements/scripts/plan.tsx).
  3. * Copyright 2023 Vercel, Inc. Licensed under Apache-2.0.
  4. * Modified by ZCode: local integration, formatting and adaptations.
  5. * See THIRD-PARTY-NOTICES.md in the repository root for license and provenance.
  6. */
  7. "use client";
  8. import {
  9. Plan,
  10. PlanAction,
  11. PlanContent,
  12. PlanDescription,
  13. PlanFooter,
  14. PlanHeader,
  15. PlanTitle,
  16. PlanTrigger,
  17. } from "@/components/ai-elements/plan";
  18. import { Button } from "@/components/ui/button";
  19. import { FileText } from "lucide-react";
  20. const Example = () => (
  21. <Plan defaultOpen={false}>
  22. <PlanHeader>
  23. <div>
  24. <div className="mb-4 flex items-center gap-2">
  25. <FileText className="size-4" />
  26. <PlanTitle>Rewrite AI Elements to SolidJS</PlanTitle>
  27. </div>
  28. <PlanDescription>
  29. Rewrite the AI Elements component library from React to SolidJS while maintaining
  30. compatibility with existing React-based shadcn/ui components using solid-js/compat,
  31. updating all 29 components and their test suite.
  32. </PlanDescription>
  33. </div>
  34. <PlanTrigger />
  35. </PlanHeader>
  36. <PlanContent>
  37. <div className="space-y-4 text-sm">
  38. <div>
  39. <h3 className="mb-2 font-semibold">Overview</h3>
  40. <p>
  41. This plan outlines the migration strategy for converting the AI Elements library from
  42. React to SolidJS, ensuring compatibility and maintaining existing functionality.
  43. </p>
  44. </div>
  45. <div>
  46. <h3 className="mb-2 font-semibold">Key Steps</h3>
  47. <ul className="list-inside list-disc space-y-1">
  48. <li>Set up SolidJS project structure</li>
  49. <li>Install solid-js/compat for React compatibility</li>
  50. <li>Migrate components one by one</li>
  51. <li>Update test suite for each component</li>
  52. <li>Verify compatibility with shadcn/ui</li>
  53. </ul>
  54. </div>
  55. </div>
  56. </PlanContent>
  57. <PlanFooter className="justify-end">
  58. <PlanAction>
  59. <Button size="sm">
  60. Build <kbd className="font-mono">⌘↩</kbd>
  61. </Button>
  62. </PlanAction>
  63. </PlanFooter>
  64. </Plan>
  65. );
  66. export default Example;