@tscircuit/schematic-viewer 1.3.0 → 1.4.0
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 +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +694 -687
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/src/Schematic.tsx +139 -65
- package/src/lib/types/core.ts +14 -49
- package/src/lib/types/source-component.ts +5 -0
- package/src/lib/utils/collect-element-refs.ts +1 -0
- package/src/lib/utils/colors.ts +236 -0
- package/src/schematic-components/SVGPathComponent.tsx +84 -144
- package/src/schematic-components/SchematicChip.tsx +183 -0
- package/src/schematic-components/SchematicComponent.tsx +18 -24
- package/src/schematic-components/SchematicComponentFromSymbol.tsx +44 -0
- package/src/schematic-components/SchematicElement.tsx +0 -28
- package/src/schematic-components/SchematicTrace.tsx +4 -3
- package/src/schematic-components/index.tsx +7 -14
- package/src/stories/basics/schematic-net-labels-2.stories.tsx +22 -20
- package/src/stories/bug-connections.stories.tsx +3 -0
- package/src/stories/bug-high-port-numbers.stories.tsx +99 -85
- package/src/stories/bugs/bug3-scaling-trace.stories.tsx +11 -5
- package/src/stories/bugs/bug4-schematic-line.stories.tsx +0 -1
- package/src/stories/bugs/bug5-diode.stories.tsx +0 -1
- package/src/stories/bugs/bug8-autolayout.stories.tsx +20 -29
- package/src/stories/circuit-components/diode.stories.tsx +3 -1
- package/src/stories/circuit-components/resistor.stories.tsx +3 -1
- package/src/stories/led-circuit-react.stories.tsx +40 -48
- package/src/pages/led-circuit.tsx +0 -96
- package/src/schematic-components/ProjectComponent.tsx +0 -70
- package/src/schematic-components/SchematicBox.tsx +0 -29
- package/src/schematic-components/SchematicBug.tsx +0 -107
- package/src/schematic-components/SchematicLine.tsx +0 -48
- package/src/schematic-components/SchematicPath.tsx +0 -51
- package/src/schematic-components/SchematicPort.tsx +0 -63
- package/src/schematic-components/SimpleCapacitor.tsx +0 -29
- package/src/schematic-components/SimpleDiode.tsx +0 -42
- package/src/schematic-components/SimpleGround.tsx +0 -30
- package/src/schematic-components/SimpleInductor.tsx +0 -29
- package/src/schematic-components/SimplePowerSource.tsx +0 -43
- package/src/schematic-components/SimpleResistor.tsx +0 -28
- package/src/stories/led-circuit-builder.stories.tsx +0 -104
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/js/@tscircuit%2Fschematic-viewer)
|
|
4
4
|
|
|
5
|
-
[Examples](https://schematic-viewer.vercel.app/) · [TSCircuit](https://tscircuit.com) · [Open in CodeSandbox](https://codesandbox.io/s/github/tscircuit/schematic-viewer)
|
|
5
|
+
[Examples](https://schematic-viewer.vercel.app/) · [TSCircuit](https://tscircuit.com) · [Open in CodeSandbox](https://codesandbox.io/s/github/tscircuit/schematic-viewer) · [discord](https://tscircuit.com/join)
|
|
6
6
|
|
|
7
7
|
View schematics from [tscircuit jsx](https://tscircuit.com).
|
|
8
8
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { AnyCircuitElement } from 'circuit-json';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
|
|
4
5
|
interface SchematicProps {
|
|
5
6
|
children?: any;
|
|
6
|
-
/** @deprecated use soup */
|
|
7
|
-
elements?: any;
|
|
8
7
|
soup?: AnyCircuitElement[];
|
|
9
|
-
style?:
|
|
8
|
+
style?: React.CSSProperties;
|
|
10
9
|
showTable?: boolean;
|
|
11
10
|
_soupPostProcessor?: (soup: AnyCircuitElement[]) => AnyCircuitElement[];
|
|
12
11
|
}
|
|
13
12
|
declare const Schematic: (props: SchematicProps) => react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare const SchematicWithoutContext: ({ children,
|
|
13
|
+
declare const SchematicWithoutContext: ({ children, soup, style, showTable, _soupPostProcessor, }: SchematicProps) => react_jsx_runtime.JSX.Element;
|
|
15
14
|
|
|
16
15
|
export { Schematic, SchematicProps, SchematicWithoutContext };
|