@tscircuit/schematic-viewer 0.0.2 → 0.0.4
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/dist/index.d.ts +6 -1
- package/dist/index.js +35176 -5772
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
- package/src/pages/led-circuit.tsx +8 -1
- package/tsconfig.json +2 -1
- package/dist/Schematic.d.ts +0 -6
- package/dist/Schematic.js +0 -8609
- package/dist/Schematic.js.map +0 -1
- package/dist/lib/hooks/index.d.ts +0 -1
- package/dist/lib/hooks/index.js +0 -2170
- package/dist/lib/hooks/index.js.map +0 -1
- package/dist/lib/hooks/use-maybe-promise.d.ts +0 -3
- package/dist/lib/hooks/use-maybe-promise.js +0 -2170
- package/dist/lib/hooks/use-maybe-promise.js.map +0 -1
- package/dist/lib/render-context/index.d.ts +0 -10
- package/dist/lib/render-context/index.js +0 -45
- package/dist/lib/render-context/index.js.map +0 -1
- package/dist/lib/types/core.d.ts +0 -149
- package/dist/lib/types/core.js +0 -18
- package/dist/lib/types/core.js.map +0 -1
- package/dist/lib/types/index.d.ts +0 -4
- package/dist/lib/types/index.js +0 -18
- package/dist/lib/types/index.js.map +0 -1
- package/dist/lib/types/route-solver.d.ts +0 -24
- package/dist/lib/types/route-solver.js +0 -18
- package/dist/lib/types/route-solver.js.map +0 -1
- package/dist/lib/types/source-component.d.ts +0 -44
- package/dist/lib/types/source-component.js +0 -18
- package/dist/lib/types/source-component.js.map +0 -1
- package/dist/lib/types/util.d.ts +0 -14
- package/dist/lib/types/util.js +0 -18
- package/dist/lib/types/util.js.map +0 -1
- package/dist/lib/utils/direction-to-vec.d.ts +0 -13
- package/dist/lib/utils/direction-to-vec.js +0 -96
- package/dist/lib/utils/direction-to-vec.js.map +0 -1
- package/dist/lib/utils/get-svg-path-bounds.d.ts +0 -10
- package/dist/lib/utils/get-svg-path-bounds.js +0 -51
- package/dist/lib/utils/get-svg-path-bounds.js.map +0 -1
- package/dist/lib/utils/point-math.d.ts +0 -20
- package/dist/lib/utils/point-math.js +0 -57
- package/dist/lib/utils/point-math.js.map +0 -1
- package/dist/pages/_app.d.ts +0 -5
- package/dist/pages/_app.js +0 -2714
- package/dist/pages/_app.js.map +0 -1
- package/dist/pages/index.d.ts +0 -3
- package/dist/pages/index.js +0 -8615
- package/dist/pages/index.js.map +0 -1
- package/dist/pages/led-circuit-react.d.ts +0 -3
- package/dist/pages/led-circuit-react.js +0 -8640
- package/dist/pages/led-circuit-react.js.map +0 -1
- package/dist/pages/led-circuit.d.ts +0 -3
- package/dist/pages/led-circuit.js +0 -8659
- package/dist/pages/led-circuit.js.map +0 -1
- package/dist/schematic-components/MovableGrid/MovableGrid.stories.d.ts +0 -7
- package/dist/schematic-components/MovableGrid/MovableGrid.stories.js +0 -47
- package/dist/schematic-components/MovableGrid/MovableGrid.stories.js.map +0 -1
- package/dist/schematic-components/MovableGrid/index.d.ts +0 -3
- package/dist/schematic-components/MovableGrid/index.js +0 -34
- package/dist/schematic-components/MovableGrid/index.js.map +0 -1
- package/dist/schematic-components/ProjectComponent.d.ts +0 -10
- package/dist/schematic-components/ProjectComponent.js +0 -8584
- package/dist/schematic-components/ProjectComponent.js.map +0 -1
- package/dist/schematic-components/RenderError.d.ts +0 -6
- package/dist/schematic-components/RenderError.js +0 -40
- package/dist/schematic-components/RenderError.js.map +0 -1
- package/dist/schematic-components/SVGPathComponent.d.ts +0 -19
- package/dist/schematic-components/SVGPathComponent.js +0 -90
- package/dist/schematic-components/SVGPathComponent.js.map +0 -1
- package/dist/schematic-components/SchematicBug.d.ts +0 -13
- package/dist/schematic-components/SchematicBug.js +0 -468
- package/dist/schematic-components/SchematicBug.js.map +0 -1
- package/dist/schematic-components/SchematicComponent.d.ts +0 -13
- package/dist/schematic-components/SchematicComponent.js +0 -8451
- package/dist/schematic-components/SchematicComponent.js.map +0 -1
- package/dist/schematic-components/SchematicGroup.d.ts +0 -3
- package/dist/schematic-components/SchematicGroup.js +0 -32
- package/dist/schematic-components/SchematicGroup.js.map +0 -1
- package/dist/schematic-components/SchematicPort.d.ts +0 -13
- package/dist/schematic-components/SchematicPort.js +0 -8348
- package/dist/schematic-components/SchematicPort.js.map +0 -1
- package/dist/schematic-components/SchematicText.d.ts +0 -10
- package/dist/schematic-components/SchematicText.js +0 -71
- package/dist/schematic-components/SchematicText.js.map +0 -1
- package/dist/schematic-components/SchematicTrace.d.ts +0 -13
- package/dist/schematic-components/SchematicTrace.js +0 -137
- package/dist/schematic-components/SchematicTrace.js.map +0 -1
- package/dist/schematic-components/SimpleCapacitor.d.ts +0 -13
- package/dist/schematic-components/SimpleCapacitor.js +0 -103
- package/dist/schematic-components/SimpleCapacitor.js.map +0 -1
- package/dist/schematic-components/SimpleDiode.d.ts +0 -13
- package/dist/schematic-components/SimpleDiode.js +0 -101
- package/dist/schematic-components/SimpleDiode.js.map +0 -1
- package/dist/schematic-components/SimpleGround.d.ts +0 -13
- package/dist/schematic-components/SimpleGround.js +0 -102
- package/dist/schematic-components/SimpleGround.js.map +0 -1
- package/dist/schematic-components/SimpleInductor.d.ts +0 -13
- package/dist/schematic-components/SimpleInductor.js +0 -102
- package/dist/schematic-components/SimpleInductor.js.map +0 -1
- package/dist/schematic-components/SimplePowerSource.d.ts +0 -13
- package/dist/schematic-components/SimplePowerSource.js +0 -104
- package/dist/schematic-components/SimplePowerSource.js.map +0 -1
- package/dist/schematic-components/SimpleResistor.d.ts +0 -13
- package/dist/schematic-components/SimpleResistor.js +0 -102
- package/dist/schematic-components/SimpleResistor.js.map +0 -1
- package/dist/schematic-components/index.d.ts +0 -18
- package/dist/schematic-components/index.js +0 -8618
- package/dist/schematic-components/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/schematic-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "next dev",
|
|
8
8
|
"typecheck": "tsc --noEmit",
|
|
9
|
-
"build": "tsup ./src --dts --sourcemap",
|
|
9
|
+
"build": "tsup ./src/index.ts --dts --sourcemap",
|
|
10
10
|
"yalc": "npm run build && yalc push"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
@@ -30,9 +30,7 @@
|
|
|
30
30
|
"react-dom": "^18.2.0",
|
|
31
31
|
"tsup": "^6.2.3",
|
|
32
32
|
"type-fest": "^2.17.0",
|
|
33
|
-
"typescript": "^4.8.4"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
33
|
+
"typescript": "^4.8.4",
|
|
36
34
|
"@chakra-ui/react": "^2.2.4",
|
|
37
35
|
"@emotion/react": "^11",
|
|
38
36
|
"@emotion/styled": "^11",
|
|
@@ -87,5 +87,12 @@ const $elements = pb
|
|
|
87
87
|
export default () => {
|
|
88
88
|
const elements = useMaybePromise($elements)
|
|
89
89
|
if (!elements) return null
|
|
90
|
-
return
|
|
90
|
+
return (
|
|
91
|
+
<>
|
|
92
|
+
<Schematic elements={elements} />
|
|
93
|
+
<pre style={{ marginTop: 600 }}>
|
|
94
|
+
{JSON.stringify(elements, null, " ")}
|
|
95
|
+
</pre>
|
|
96
|
+
</>
|
|
97
|
+
)
|
|
91
98
|
}
|
package/tsconfig.json
CHANGED