diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index bd5714b2..bc3fc991 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -76,6 +76,9 @@ export { groupConsecutiveStreamOutputs } from "./utils/output-grouping.js"; export { OutputTypesDemoPage } from "./OutputTypesDemoPage.js"; export { Incrementor } from "./Incrementor.js"; +// Error boundary +export { ErrorBoundary } from "react-error-boundary"; + // Re-export types from schema for convenience export type { OutputData, diff --git a/packages/notebook-preview/src/NotebookRenderer.tsx b/packages/notebook-preview/src/NotebookRenderer.tsx index 32e1d250..9682c53a 100644 --- a/packages/notebook-preview/src/NotebookRenderer.tsx +++ b/packages/notebook-preview/src/NotebookRenderer.tsx @@ -5,6 +5,7 @@ import { SuspenseSpinner, ExecutionCount, SyntaxHighlighter, + ErrorBoundary, } from "@runtimed/components"; // Jupyter notebook types @@ -158,25 +159,31 @@ function CodeCell({ cell, language }: { cell: JupyterCell; language: string }) {