@tscircuit/fake-snippets 0.0.4 → 0.0.6

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.
@@ -8,6 +8,7 @@ import { Button } from "@/components/ui/button"
8
8
  import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
9
9
  import { TypeBadge } from "@/components/TypeBadge"
10
10
  import { JLCPCBImportDialog } from "@/components/JLCPCBImportDialog"
11
+ import { CircuitJsonImportDialog } from "@/components/CircuitJsonImportDialog"
11
12
  import { useNotImplementedToast } from "@/hooks/use-toast"
12
13
  import { useGlobalStore } from "@/hooks/use-global-store"
13
14
  import { cn } from "@/lib/utils"
@@ -16,6 +17,8 @@ import { PrefetchPageLink } from "@/components/PrefetchPageLink"
16
17
  export const QuickstartPage = () => {
17
18
  const axios = useAxios()
18
19
  const [isJLCPCBDialogOpen, setIsJLCPCBDialogOpen] = useState(false)
20
+ const [isCircuitJsonImportDialogOpen, setIsCircuitJsonImportDialogOpen] =
21
+ useState(false)
19
22
  const toastNotImplemented = useNotImplementedToast()
20
23
  const currentUser = useGlobalStore((s) => s.session?.github_username)
21
24
  const { data: mySnippets, isLoading } = useQuery<Snippet[]>(
@@ -159,6 +162,22 @@ export const QuickstartPage = () => {
159
162
  </Button>
160
163
  </CardContent>
161
164
  </Card>
165
+ <Card className="hover:shadow-md transition-shadow rounded-md">
166
+ <CardHeader className="p-4 pb-0">
167
+ <CardTitle className="text-lg flex items-center justify-between">
168
+ Circuit Json
169
+ <TypeBadge type="module" className="ml-2" />
170
+ </CardTitle>
171
+ </CardHeader>
172
+ <CardContent className="p-4">
173
+ <Button
174
+ className="w-full"
175
+ onClick={() => setIsCircuitJsonImportDialogOpen(true)}
176
+ >
177
+ Import Circuit JSON
178
+ </Button>
179
+ </CardContent>
180
+ </Card>
162
181
  </div>
163
182
  </div>
164
183
 
@@ -167,6 +186,11 @@ export const QuickstartPage = () => {
167
186
  onOpenChange={setIsJLCPCBDialogOpen}
168
187
  />
169
188
 
189
+ <CircuitJsonImportDialog
190
+ open={isCircuitJsonImportDialogOpen}
191
+ onOpenChange={setIsCircuitJsonImportDialogOpen}
192
+ />
193
+
170
194
  <div>
171
195
  <h2 className="text-xl font-semibold mb-4 mt-12">
172
196
  Start from a Template