@tscircuit/schematic-viewer 0.0.1 → 0.0.2

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.
Files changed (48) hide show
  1. package/dist/Schematic.d.ts +6 -0
  2. package/dist/Schematic.js +5 -2
  3. package/dist/Schematic.js.map +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +8611 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/hooks/index.d.ts +1 -0
  8. package/dist/lib/hooks/use-maybe-promise.d.ts +3 -0
  9. package/dist/lib/render-context/index.d.ts +10 -0
  10. package/dist/lib/types/core.d.ts +149 -0
  11. package/dist/lib/types/index.d.ts +4 -0
  12. package/dist/lib/types/route-solver.d.ts +24 -0
  13. package/dist/lib/types/source-component.d.ts +44 -0
  14. package/dist/lib/types/util.d.ts +14 -0
  15. package/dist/lib/utils/direction-to-vec.d.ts +13 -0
  16. package/dist/lib/utils/get-svg-path-bounds.d.ts +10 -0
  17. package/dist/lib/utils/point-math.d.ts +20 -0
  18. package/dist/pages/_app.d.ts +5 -0
  19. package/dist/pages/index.d.ts +3 -0
  20. package/dist/pages/index.js +5 -2
  21. package/dist/pages/index.js.map +1 -1
  22. package/dist/pages/led-circuit-react.d.ts +3 -0
  23. package/dist/pages/led-circuit-react.js +6476 -21
  24. package/dist/pages/led-circuit-react.js.map +1 -1
  25. package/dist/pages/led-circuit.d.ts +3 -0
  26. package/dist/pages/led-circuit.js +5 -2
  27. package/dist/pages/led-circuit.js.map +1 -1
  28. package/dist/schematic-components/MovableGrid/MovableGrid.stories.d.ts +7 -0
  29. package/dist/schematic-components/MovableGrid/index.d.ts +3 -0
  30. package/dist/schematic-components/ProjectComponent.d.ts +10 -0
  31. package/dist/schematic-components/RenderError.d.ts +6 -0
  32. package/dist/schematic-components/SVGPathComponent.d.ts +19 -0
  33. package/dist/schematic-components/SchematicBug.d.ts +13 -0
  34. package/dist/schematic-components/SchematicComponent.d.ts +13 -0
  35. package/dist/schematic-components/SchematicGroup.d.ts +3 -0
  36. package/dist/schematic-components/SchematicPort.d.ts +13 -0
  37. package/dist/schematic-components/SchematicText.d.ts +10 -0
  38. package/dist/schematic-components/SchematicTrace.d.ts +13 -0
  39. package/dist/schematic-components/SimpleCapacitor.d.ts +13 -0
  40. package/dist/schematic-components/SimpleDiode.d.ts +13 -0
  41. package/dist/schematic-components/SimpleGround.d.ts +13 -0
  42. package/dist/schematic-components/SimpleInductor.d.ts +13 -0
  43. package/dist/schematic-components/SimplePowerSource.d.ts +13 -0
  44. package/dist/schematic-components/SimpleResistor.d.ts +13 -0
  45. package/dist/schematic-components/index.d.ts +18 -0
  46. package/package.json +1 -1
  47. package/src/index.ts +1 -0
  48. package/tsconfig.json +1 -2
@@ -0,0 +1,7 @@
1
+ import { ComponentMeta } from '@storybook/react';
2
+
3
+ declare const _default: ComponentMeta<() => JSX.Element>;
4
+
5
+ declare const Primary: any;
6
+
7
+ export { Primary, _default as default };
@@ -0,0 +1,3 @@
1
+ declare const MovableGrid: () => JSX.Element;
2
+
3
+ export { MovableGrid, MovableGrid as default };
@@ -0,0 +1,10 @@
1
+ import { Project } from '../lib/types/core.js';
2
+ import '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ project: Project | Promise<Project>;
7
+ }
8
+ declare const ProjectComponent: ({ project: $project }: Props) => JSX.Element;
9
+
10
+ export { ProjectComponent, ProjectComponent as default };
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ text: string;
3
+ }
4
+ declare const _default: ({ text }: Props) => JSX.Element;
5
+
6
+ export { _default as default };
@@ -0,0 +1,19 @@
1
+ interface Props {
2
+ rotation: number;
3
+ center: {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ size: {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ paths: Array<{
12
+ strokeWidth: number;
13
+ stroke: string;
14
+ d: string;
15
+ }>;
16
+ }
17
+ declare const SVGPathComponent: ({ size, center, rotation, paths }: Props) => JSX.Element;
18
+
19
+ export { SVGPathComponent, SVGPathComponent as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleBug } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleBug;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SchematicBug: ({ component: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SchematicBug, SchematicBug as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent as SchematicComponent$1 } from '../lib/types/core.js';
2
+ import { SourceComponent } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SourceComponent;
8
+ schematic: SchematicComponent$1;
9
+ };
10
+ }
11
+ declare const SchematicComponent: ({ component }: Props) => JSX.Element;
12
+
13
+ export { SchematicComponent, SchematicComponent as default };
@@ -0,0 +1,3 @@
1
+ declare const SchematicGroup: () => any;
2
+
3
+ export { SchematicGroup };
@@ -0,0 +1,13 @@
1
+ import { SourcePort, SchematicPort as SchematicPort$1 } from '../lib/types/core.js';
2
+ import '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ port: {
7
+ source: SourcePort;
8
+ schematic: SchematicPort$1;
9
+ };
10
+ }
11
+ declare const SchematicPort: ({ port: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SchematicPort, SchematicPort as default };
@@ -0,0 +1,10 @@
1
+ import { SchematicText as SchematicText$1 } from '../lib/types/core.js';
2
+ import '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ schematic_text: SchematicText$1;
7
+ }
8
+ declare const SchematicText: ({ schematic_text }: Props) => JSX.Element;
9
+
10
+ export { SchematicText, SchematicText as default };
@@ -0,0 +1,13 @@
1
+ import { SourceTrace, SchematicTrace as SchematicTrace$1 } from '../lib/types/core.js';
2
+ import '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ trace: {
7
+ source: SourceTrace;
8
+ schematic: SchematicTrace$1;
9
+ };
10
+ }
11
+ declare const SchematicTrace: ({ trace: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SchematicTrace, SchematicTrace as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleCapacitor as SimpleCapacitor$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleCapacitor$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimpleCapacitor: ({ component: { source, schematic }, }: Props) => JSX.Element;
12
+
13
+ export { SimpleCapacitor, SimpleCapacitor as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleDiode as SimpleDiode$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleDiode$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimpleDiode: ({ component: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SimpleDiode, SimpleDiode as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleGround as SimpleGround$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleGround$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimpleGround: ({ component: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SimpleGround, SimpleGround as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleInductor as SimpleInductor$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleInductor$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimpleInductor: ({ component: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SimpleInductor, SimpleInductor as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimplePowerSource as SimplePowerSource$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimplePowerSource$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimplePowerSource: ({ component: { source, schematic }, }: Props) => JSX.Element;
12
+
13
+ export { SimplePowerSource, SimplePowerSource as default };
@@ -0,0 +1,13 @@
1
+ import { SchematicComponent } from '../lib/types/core.js';
2
+ import { SimpleResistor as SimpleResistor$1 } from '../lib/types/source-component.js';
3
+ import '../lib/types/util.js';
4
+
5
+ interface Props {
6
+ component: {
7
+ source: SimpleResistor$1;
8
+ schematic: SchematicComponent;
9
+ };
10
+ }
11
+ declare const SimpleResistor: ({ component: { source, schematic } }: Props) => JSX.Element;
12
+
13
+ export { SimpleResistor, SimpleResistor as default };
@@ -0,0 +1,18 @@
1
+ export { default as MovableGrid } from './MovableGrid/index.js';
2
+ export { SchematicGroup } from './SchematicGroup.js';
3
+ export { default as SimpleResistor } from './SimpleResistor.js';
4
+ export { default as SimpleCapacitor } from './SimpleCapacitor.js';
5
+ export { default as SVGPathComponent } from './SVGPathComponent.js';
6
+ export { default as ProjectComponent } from './ProjectComponent.js';
7
+ export { default as SchematicComponent } from './SchematicComponent.js';
8
+ export { default as SchematicPort } from './SchematicPort.js';
9
+ export { default as SchematicText } from './SchematicText.js';
10
+ export { default as SchematicTrace } from './SchematicTrace.js';
11
+ export { default as SchematicBug } from './SchematicBug.js';
12
+ export { default as SimplePowerSource } from './SimplePowerSource.js';
13
+ export { default as SimpleGround } from './SimpleGround.js';
14
+ export { default as SimpleInductor } from './SimpleInductor.js';
15
+ export { default as SimpleDiode } from './SimpleDiode.js';
16
+ import '../lib/types/core.js';
17
+ import '../lib/types/source-component.js';
18
+ import '../lib/types/util.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/schematic-viewer",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./Schematic"
package/tsconfig.json CHANGED
@@ -17,8 +17,7 @@
17
17
  "baseUrl": "./src",
18
18
  "resolveJsonModule": true,
19
19
  "isolatedModules": true,
20
- "jsx": "preserve",
21
- "incremental": true
20
+ "jsx": "preserve"
22
21
  },
23
22
  "include": [
24
23
  "next-env.d.ts",