@tscircuit/runframe 0.0.10 → 0.0.12
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/README.md +31 -1
- package/dist/standalone.min.js +11 -2
- package/package.json +11 -3
- package/.github/workflows/bun-formatcheck.yml +0 -26
- package/.github/workflows/bun-pver-release.yml +0 -25
- package/.github/workflows/bun-typecheck.yml +0 -26
- package/biome.json +0 -57
- package/bun.lockb +0 -0
- package/cosmos.config.json +0 -3
- package/cosmos.decorator.tsx +0 -3
- package/examples/resistor.fixture.tsx +0 -12
- package/examples/runframe-with-api-1.fixture.tsx +0 -41
- package/examples/runframe1-basic.fixture.tsx +0 -19
- package/index.html +0 -13
- package/lib/components/BomTable.tsx +0 -69
- package/lib/components/CircuitJsonPreview.tsx +0 -348
- package/lib/components/CircuitJsonTableViewer/CircuitJsonTableViewer.tsx +0 -315
- package/lib/components/CircuitJsonTableViewer/ClickableText.tsx +0 -20
- package/lib/components/CircuitJsonTableViewer/HeaderCell.tsx +0 -26
- package/lib/components/CircuitJsonTableViewer/Modal.tsx +0 -38
- package/lib/components/ErrorFallback.tsx +0 -25
- package/lib/components/ErrorTabContent.tsx +0 -86
- package/lib/components/PcbViewerWithContainerHeight.tsx +0 -47
- package/lib/components/PreviewEmptyState.tsx +0 -14
- package/lib/components/RunFrame.tsx +0 -68
- package/lib/components/RunFrameWithApi/index.tsx +0 -44
- package/lib/components/RunFrameWithApi/standalone.tsx +0 -6
- package/lib/components/RunFrameWithApi/store.ts +0 -122
- package/lib/components/RunFrameWithApi/types.ts +0 -43
- package/lib/components/ui/button.tsx +0 -57
- package/lib/components/ui/dropdown-menu.tsx +0 -203
- package/lib/components/ui/tabs.tsx +0 -53
- package/lib/dev/render-to-circuit-json.ts +0 -7
- package/lib/hooks/use-styles.ts +0 -17
- package/lib/preview.ts +0 -1
- package/lib/runner.ts +0 -2
- package/lib/utils/index.ts +0 -6
- package/lib/utils/pcbManualEditEventHandler.ts +0 -156
- package/postcss.config.js +0 -8
- package/renovate.json +0 -15
- package/scripts/build-css.ts +0 -26
- package/src/main.tsx +0 -13
- package/tailwind.config.js +0 -3
- package/tsconfig.json +0 -45
- package/vite.config.ts +0 -72
package/renovate.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"extends": ["config:base"],
|
|
4
|
-
"packageRules": [
|
|
5
|
-
{
|
|
6
|
-
"packagePatterns": ["*"],
|
|
7
|
-
"excludePackagePatterns": ["@tscircuit/*", "circuit-to-svg"],
|
|
8
|
-
"enabled": false
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"matchUpdateTypes": ["major", "minor", "patch"],
|
|
12
|
-
"automerge": true
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
package/scripts/build-css.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs"
|
|
2
|
-
import postcss from "postcss"
|
|
3
|
-
import tailwindcss from "tailwindcss"
|
|
4
|
-
import autoprefixer from "autoprefixer"
|
|
5
|
-
import cssnano from "cssnano"
|
|
6
|
-
import tailwindConfig from "../tailwind.config"
|
|
7
|
-
|
|
8
|
-
async function buildCss() {
|
|
9
|
-
// Read your base CSS file with @tailwind directives
|
|
10
|
-
const css = "@tailwind components; @tailwind utilities;"
|
|
11
|
-
|
|
12
|
-
const result = await postcss([
|
|
13
|
-
tailwindcss(tailwindConfig),
|
|
14
|
-
autoprefixer,
|
|
15
|
-
cssnano,
|
|
16
|
-
]).process(css, {
|
|
17
|
-
from: undefined,
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
fs.writeFileSync(
|
|
21
|
-
"./lib/hooks/styles.generated.ts",
|
|
22
|
-
`export default \`${result.css.replace(/\\/g, "\\\\")}\``,
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
buildCss()
|
package/src/main.tsx
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RunFrameWithApi } from "lib/components/RunFrameWithApi"
|
|
2
|
-
import React from "react"
|
|
3
|
-
import { createRoot } from "react-dom/client"
|
|
4
|
-
|
|
5
|
-
const root = createRoot(document.getElementById("root")!)
|
|
6
|
-
|
|
7
|
-
root.render(
|
|
8
|
-
<React.StrictMode>
|
|
9
|
-
<div style={{ width: "100vw", height: "100vh" }}>
|
|
10
|
-
<RunFrameWithApi />
|
|
11
|
-
</div>
|
|
12
|
-
</React.StrictMode>,
|
|
13
|
-
)
|
package/tailwind.config.js
DELETED
package/tsconfig.json
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// Enable latest features
|
|
4
|
-
"lib": ["ESNext", "DOM"],
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"jsx": "react-jsx",
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
|
|
11
|
-
"baseUrl": ".",
|
|
12
|
-
"paths": {
|
|
13
|
-
"lib/*": ["lib/*"]
|
|
14
|
-
},
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
|
|
17
|
-
// Bundler mode
|
|
18
|
-
"moduleResolution": "bundler",
|
|
19
|
-
"allowImportingTsExtensions": true,
|
|
20
|
-
"verbatimModuleSyntax": true,
|
|
21
|
-
"noEmit": true,
|
|
22
|
-
|
|
23
|
-
// Best practices
|
|
24
|
-
"strict": true,
|
|
25
|
-
"skipLibCheck": true,
|
|
26
|
-
"noFallthroughCasesInSwitch": true,
|
|
27
|
-
|
|
28
|
-
// Some stricter flags (disabled by default)
|
|
29
|
-
"noUnusedLocals": false,
|
|
30
|
-
"noUnusedParameters": false,
|
|
31
|
-
"noPropertyAccessFromIndexSignature": false
|
|
32
|
-
},
|
|
33
|
-
"include": [
|
|
34
|
-
"lib/**/*.ts",
|
|
35
|
-
"lib/**/*.tsx",
|
|
36
|
-
"examples/**/*.ts",
|
|
37
|
-
"examples/**/*.tsx",
|
|
38
|
-
"cli/**/*.ts",
|
|
39
|
-
"cli/**/*.tsx",
|
|
40
|
-
"scripts/**/*.ts",
|
|
41
|
-
"scripts/**/*.tsx",
|
|
42
|
-
"src/**/*.ts",
|
|
43
|
-
"src/**/*.tsx"
|
|
44
|
-
]
|
|
45
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineConfig, type Plugin } from "vite"
|
|
2
|
-
import react from "@vitejs/plugin-react"
|
|
3
|
-
import { resolve } from "node:path"
|
|
4
|
-
import winterspecBundle from "@tscircuit/file-server/dist/bundle"
|
|
5
|
-
import { getNodeHandler } from "winterspec/adapters/node"
|
|
6
|
-
import { visualizer } from "rollup-plugin-visualizer"
|
|
7
|
-
|
|
8
|
-
const fakeHandler = getNodeHandler(winterspecBundle as any, {})
|
|
9
|
-
|
|
10
|
-
function apiServerPlugin(): Plugin {
|
|
11
|
-
return {
|
|
12
|
-
name: "api-server",
|
|
13
|
-
configureServer(server) {
|
|
14
|
-
server.middlewares.use(async (req, res, next) => {
|
|
15
|
-
if (req.url?.startsWith("/api/")) {
|
|
16
|
-
req.url = req.url.replace("/api/", "/")
|
|
17
|
-
fakeHandler(req, res)
|
|
18
|
-
} else {
|
|
19
|
-
next()
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const plugins: any[] = [react()]
|
|
27
|
-
|
|
28
|
-
if (!process.env.VERCEL && !process.env.STANDALONE) {
|
|
29
|
-
plugins.push(apiServerPlugin())
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let build: any = undefined
|
|
33
|
-
|
|
34
|
-
if (process.env.STANDALONE) {
|
|
35
|
-
// plugins.push(
|
|
36
|
-
// visualizer({
|
|
37
|
-
// filename: "stats.html",
|
|
38
|
-
// open: true, // Will open the stats.html file after build
|
|
39
|
-
// gzipSize: true,
|
|
40
|
-
// brotliSize: true,
|
|
41
|
-
// }),
|
|
42
|
-
// )
|
|
43
|
-
build = {
|
|
44
|
-
lib: {
|
|
45
|
-
entry: resolve(__dirname, "src/main.tsx"),
|
|
46
|
-
name: "standalone",
|
|
47
|
-
fileName: (format) => `standalone.min.js`,
|
|
48
|
-
formats: ["umd"],
|
|
49
|
-
},
|
|
50
|
-
minify: true,
|
|
51
|
-
// reportCompressedSize: true,
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default defineConfig({
|
|
56
|
-
plugins,
|
|
57
|
-
resolve: {
|
|
58
|
-
alias: {
|
|
59
|
-
lib: resolve(__dirname, "./lib"),
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
define: {
|
|
63
|
-
global: {
|
|
64
|
-
process: {
|
|
65
|
-
env: {},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
root: ".",
|
|
70
|
-
publicDir: "public",
|
|
71
|
-
build,
|
|
72
|
-
})
|