@tscircuit/runframe 0.0.8 → 0.0.10

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,9 @@ import { useRunFrameStore, selectCurrentFileMap } from "./store"
4
4
  import type { RunFrameWithApiProps } from "./types"
5
5
 
6
6
  const guessEntrypoint = (files: string[]) =>
7
+ files.find((file) => file.includes("entrypoint.")) ??
8
+ files.find((file) => file.includes("index.")) ??
9
+ files.find((file) => file.includes("main.")) ??
7
10
  files.find((file) => file.endsWith(".tsx"))
8
11
 
9
12
  export const RunFrameWithApi = ({ apiBaseUrl }: RunFrameWithApiProps) => {
@@ -23,9 +26,9 @@ export const RunFrameWithApi = ({ apiBaseUrl }: RunFrameWithApiProps) => {
23
26
  return () => stopPolling()
24
27
  }, [startPolling, stopPolling])
25
28
 
26
- const entrypoint = guessEntrypoint(Object.keys(fsMap))
29
+ const entrypoint = guessEntrypoint(Object.keys(fsMap)) ?? "entrypoint.tsx"
27
30
 
28
- if (!entrypoint) {
31
+ if (!fsMap[entrypoint]) {
29
32
  return <div>No entrypoint found for Run Frame!</div>
30
33
  }
31
34
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/runframe",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.8",
5
+ "version": "0.0.10",
6
6
  "scripts": {
7
7
  "start": "cosmos",
8
8
  "build": "bun run build:css && bun run build:standalone && bun run build:lib",
@@ -23,6 +23,7 @@
23
23
  "@vitejs/plugin-react": "^4.3.4",
24
24
  "autoprefixer": "^10.4.20",
25
25
  "class-variance-authority": "^0.7.1",
26
+ "playwright": "^1.49.1",
26
27
  "react": "18",
27
28
  "react-cosmos": "^6.2.1",
28
29
  "react-dom": "18",
@@ -41,7 +42,7 @@
41
42
  "@radix-ui/react-tabs": "^1.1.1",
42
43
  "@tscircuit/3d-viewer": "^0.0.58",
43
44
  "@tscircuit/eval-webworker": "^0.0.22",
44
- "@tscircuit/file-server": "^0.0.5",
45
+ "@tscircuit/file-server": "^0.0.6",
45
46
  "@tscircuit/pcb-viewer": "^1.10.22",
46
47
  "@tscircuit/schematic-viewer": "2.0.3",
47
48
  "circuit-to-svg": "^0.0.91",
package/vite.config.ts CHANGED
@@ -60,7 +60,11 @@ export default defineConfig({
60
60
  },
61
61
  },
62
62
  define: {
63
- global: {},
63
+ global: {
64
+ process: {
65
+ env: {},
66
+ },
67
+ },
64
68
  },
65
69
  root: ".",
66
70
  publicDir: "public",