From 6cd507f918a80ef649453b8c4c06f1fa5bdfec2c Mon Sep 17 00:00:00 2001 From: Rushabh Patil Date: Mon, 29 Jun 2026 09:42:26 +0530 Subject: [PATCH 1/2] Remove SuspenseRunFrame wrapper and decouple @tscircuit/runframe from library core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the unnecessary SuspenseRunFrame abstraction layer and drops @tscircuit/runframe as a library dependency, keeping the library focused on code editing. - Deletes SuspenseRunFrame — a dead wrapper that only added a className div around RunFrame - Removes @tscircuit/runframe from dependencies (library consumers no longer pull in the heavy runframe package) - Updates the workspace fixture to import RunFrame directly from @tscircuit/runframe/runner - Simplifies build externals since runframe is no longer a lib dependency Co-authored-by: CommandCodeBot --- bun.lock | 1 - ...TscircuitWorkspaceWithRunframe.fixture.tsx | 23 ++++++++++--------- package.json | 2 +- src/components/SuspenseRunFrame.tsx | 16 ------------- 4 files changed, 13 insertions(+), 29 deletions(-) delete mode 100644 src/components/SuspenseRunFrame.tsx diff --git a/bun.lock b/bun.lock index 4a2cb68..076a401 100644 --- a/bun.lock +++ b/bun.lock @@ -8,7 +8,6 @@ "@monaco-editor/react": "^4.7.0", "@shikijs/monaco": "^4.3.0", "@shikijs/vscode-textmate": "^10.0.2", - "@tscircuit/runframe": "^0.0.2128", "@typescript/ata": "^0.9.8", "monaco-editor": "^0.55.1", "shiki": "^4.3.0", diff --git a/examples/TscircuitWorkspaceWithRunframe.fixture.tsx b/examples/TscircuitWorkspaceWithRunframe.fixture.tsx index b6ea7be..87c4d54 100644 --- a/examples/TscircuitWorkspaceWithRunframe.fixture.tsx +++ b/examples/TscircuitWorkspaceWithRunframe.fixture.tsx @@ -1,8 +1,8 @@ +import { RunFrame } from "@tscircuit/runframe/runner" import { useMemo, useState } from "react" import "../src/styles.css" import type { EditorFile } from "../src" import { resolveTscircuitEntrypoint } from "../fixtures-support/resolveTscircuitEntrypoint" -import { SuspenseRunFrame } from "../src/components/SuspenseRunFrame" import { WorkspaceCodeEditor } from "../src/components/WorkspaceCodeEditor" import { useWorkspaceFiles } from "../src/hooks/useWorkspaceFiles" @@ -135,16 +135,17 @@ export default function TscircuitWorkspaceWithRunframeFixture() {
- setLastRenderState("running")} - onRenderFinished={() => setLastRenderState("finished")} - /> +
+ setLastRenderState("running")} + onRenderFinished={() => setLastRenderState("finished")} + /> +
diff --git a/package.json b/package.json index 2afd1d3..ebfa29c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "build": "bun run build:lib", - "build:lib": "tsc --noEmit && tsup src/index.ts --format esm --dts --external react,react-dom,@monaco-editor/react,monaco-editor,@typescript/ata,typescript,@tscircuit/runframe", + "build:lib": "tsc --noEmit && tsup src/index.ts --format esm --dts --external react,react-dom,@monaco-editor/react,monaco-editor,@typescript/ata,typescript", "dev": "cosmos", "cosmos": "cosmos", "cosmos:export": "cosmos-export", diff --git a/src/components/SuspenseRunFrame.tsx b/src/components/SuspenseRunFrame.tsx deleted file mode 100644 index ac29c35..0000000 --- a/src/components/SuspenseRunFrame.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { RunFrame } from "@tscircuit/runframe/runner" - -export type SuspenseRunFrameProps = React.ComponentProps & { - className?: string -} - -export function SuspenseRunFrame({ - className, - ...props -}: SuspenseRunFrameProps) { - return ( -
- -
- ) -} From 79d7043f0b24a3a4e66307699e9d62d81d189aed Mon Sep 17 00:00:00 2001 From: Rushabh Patil Date: Mon, 29 Jun 2026 10:42:36 +0530 Subject: [PATCH 2/2] up --- .../TscircuitWorkspaceWithRunframe.fixture.tsx | 1 + fixtures-support/resolveTscircuitEntrypoint.ts | 16 +--------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/examples/TscircuitWorkspaceWithRunframe.fixture.tsx b/examples/TscircuitWorkspaceWithRunframe.fixture.tsx index 87c4d54..5401ace 100644 --- a/examples/TscircuitWorkspaceWithRunframe.fixture.tsx +++ b/examples/TscircuitWorkspaceWithRunframe.fixture.tsx @@ -137,6 +137,7 @@ export default function TscircuitWorkspaceWithRunframeFixture() {
{ - return ( - /export default\s+\w+/.test(code) || - /export default\s+function\s*(\w*)\s*\(/.test(code) || - /export default\s*\(\s*\)\s*=>/.test(code) || - /export default\s*\(.*?\)\s*=>/.test(code) || - /export\s*\{\s*\w+\s+as\s+default\s*\}/.test(code) - ) -} - const findConfiguredEntrypoint = ( files: EditorFile[], field: "mainEntrypoint" | "previewComponentPath", @@ -44,11 +34,7 @@ export const resolveTscircuitEntrypoint = ( ? files.find((file) => file.path === currentFile) : null - if ( - currentFileData && - /\.(ts|tsx)$/.test(currentFileData.path) && - hasDefaultEntrypointExport(currentFileData.content) - ) { + if (currentFileData && /\.(ts|tsx)$/.test(currentFileData.path)) { return currentFileData.path }