@tscircuit/cli 0.0.57 → 0.0.59
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/bun.lockb +0 -0
- package/dev-server-api/routes/api/export_files/create_or_update.ts +0 -0
- package/dev-server-api/routes/api/export_files/download.ts +0 -0
- package/dev-server-api/routes/api/export_requests/create.ts +62 -0
- package/dev-server-api/routes/api/export_requests/get.ts +0 -0
- package/dev-server-api/src/db/create-schema.ts +26 -0
- package/dev-server-api/src/db/get-db.ts +19 -0
- package/dev-server-frontend/bun.lockb +0 -0
- package/dev-server-frontend/package-lock.json +58 -321
- package/dev-server-frontend/package.json +4 -3
- package/dev-server-frontend/src/ExampleContentView.tsx +16 -11
- package/dist/cli.js +159 -31
- package/lib/cmd-fns/dev/index.ts +2 -2
- package/lib/cmd-fns/dev/{start-watcher.ts → start-fs-watcher.ts} +1 -1
- package/lib/cmd-fns/dev-server-upload.ts +36 -5
- package/lib/cmd-fns/export-gerbers.ts +22 -0
- package/lib/cmd-fns/index.ts +1 -0
- package/lib/export-gerbers.ts +84 -0
- package/lib/get-program.ts +15 -0
- package/lib/soupify.ts +22 -0
- package/package.json +3 -1
- package/tests/assets/example-project/src/MyCircuit.tsx +1 -1
|
@@ -4,6 +4,7 @@ import axios from "axios"
|
|
|
4
4
|
import { Schematic } from "@tscircuit/schematic-viewer"
|
|
5
5
|
import { PCBViewer } from "@tscircuit/pcb-viewer"
|
|
6
6
|
import { cn } from "./lib/utils"
|
|
7
|
+
import { ErrorBoundary } from "react-error-boundary"
|
|
7
8
|
|
|
8
9
|
export const ExampleContentView = () => {
|
|
9
10
|
const devExamplePackageId = useGlobalStore(
|
|
@@ -53,19 +54,23 @@ export const ExampleContentView = () => {
|
|
|
53
54
|
)}
|
|
54
55
|
>
|
|
55
56
|
{pkg && (viewMode === "schematic" || viewMode === "split") && (
|
|
56
|
-
<Schematic
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
<ErrorBoundary fallback={<div>Failed to render Schematic</div>}>
|
|
58
|
+
<Schematic
|
|
59
|
+
key={`sch-${pkg?.last_updated_at}`}
|
|
60
|
+
style={{ height: itemHeight }}
|
|
61
|
+
soup={pkg.tscircuit_soup}
|
|
62
|
+
showTable={false}
|
|
63
|
+
/>
|
|
64
|
+
</ErrorBoundary>
|
|
62
65
|
)}
|
|
63
66
|
{pkg && (viewMode === "pcb" || viewMode === "split") && (
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
<ErrorBoundary fallback={<div>Failed to render PCB</div>}>
|
|
68
|
+
<PCBViewer
|
|
69
|
+
key={`pcb-${pkg?.last_updated_at}`}
|
|
70
|
+
height={itemHeight}
|
|
71
|
+
soup={pkg.tscircuit_soup}
|
|
72
|
+
/>
|
|
73
|
+
</ErrorBoundary>
|
|
69
74
|
)}
|
|
70
75
|
{pkg?.error && (
|
|
71
76
|
<div className="absolute top-0 w-full">
|