@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.
@@ -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
- key={`sch-${pkg?.last_updated_at}`}
58
- style={{ height: itemHeight }}
59
- soup={pkg.tscircuit_soup}
60
- showTable={false}
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
- <PCBViewer
65
- key={`pcb-${pkg?.last_updated_at}`}
66
- height={itemHeight}
67
- soup={pkg.tscircuit_soup}
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">