@tscircuit/schematic-viewer 0.0.1
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/.prettierrc +1 -0
- package/.storybook/main.js +15 -0
- package/.storybook/preview.js +9 -0
- package/README.md +26 -0
- package/ava.config.js +7 -0
- package/dist/Schematic.js +8606 -0
- package/dist/Schematic.js.map +1 -0
- package/dist/lib/hooks/index.js +2170 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/use-maybe-promise.js +2170 -0
- package/dist/lib/hooks/use-maybe-promise.js.map +1 -0
- package/dist/lib/render-context/index.js +45 -0
- package/dist/lib/render-context/index.js.map +1 -0
- package/dist/lib/types/core.js +18 -0
- package/dist/lib/types/core.js.map +1 -0
- package/dist/lib/types/index.js +18 -0
- package/dist/lib/types/index.js.map +1 -0
- package/dist/lib/types/route-solver.js +18 -0
- package/dist/lib/types/route-solver.js.map +1 -0
- package/dist/lib/types/source-component.js +18 -0
- package/dist/lib/types/source-component.js.map +1 -0
- package/dist/lib/types/util.js +18 -0
- package/dist/lib/types/util.js.map +1 -0
- package/dist/lib/utils/direction-to-vec.js +96 -0
- package/dist/lib/utils/direction-to-vec.js.map +1 -0
- package/dist/lib/utils/get-svg-path-bounds.js +51 -0
- package/dist/lib/utils/get-svg-path-bounds.js.map +1 -0
- package/dist/lib/utils/point-math.js +57 -0
- package/dist/lib/utils/point-math.js.map +1 -0
- package/dist/pages/_app.js +2714 -0
- package/dist/pages/_app.js.map +1 -0
- package/dist/pages/index.js +8612 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/led-circuit-react.js +2185 -0
- package/dist/pages/led-circuit-react.js.map +1 -0
- package/dist/pages/led-circuit.js +8656 -0
- package/dist/pages/led-circuit.js.map +1 -0
- package/dist/schematic-components/MovableGrid/MovableGrid.stories.js +47 -0
- package/dist/schematic-components/MovableGrid/MovableGrid.stories.js.map +1 -0
- package/dist/schematic-components/MovableGrid/index.js +34 -0
- package/dist/schematic-components/MovableGrid/index.js.map +1 -0
- package/dist/schematic-components/ProjectComponent.js +8584 -0
- package/dist/schematic-components/ProjectComponent.js.map +1 -0
- package/dist/schematic-components/RenderError.js +40 -0
- package/dist/schematic-components/RenderError.js.map +1 -0
- package/dist/schematic-components/SVGPathComponent.js +90 -0
- package/dist/schematic-components/SVGPathComponent.js.map +1 -0
- package/dist/schematic-components/SchematicBug.js +468 -0
- package/dist/schematic-components/SchematicBug.js.map +1 -0
- package/dist/schematic-components/SchematicComponent.js +8451 -0
- package/dist/schematic-components/SchematicComponent.js.map +1 -0
- package/dist/schematic-components/SchematicGroup.js +32 -0
- package/dist/schematic-components/SchematicGroup.js.map +1 -0
- package/dist/schematic-components/SchematicPort.js +8348 -0
- package/dist/schematic-components/SchematicPort.js.map +1 -0
- package/dist/schematic-components/SchematicText.js +71 -0
- package/dist/schematic-components/SchematicText.js.map +1 -0
- package/dist/schematic-components/SchematicTrace.js +137 -0
- package/dist/schematic-components/SchematicTrace.js.map +1 -0
- package/dist/schematic-components/SimpleCapacitor.js +103 -0
- package/dist/schematic-components/SimpleCapacitor.js.map +1 -0
- package/dist/schematic-components/SimpleDiode.js +101 -0
- package/dist/schematic-components/SimpleDiode.js.map +1 -0
- package/dist/schematic-components/SimpleGround.js +102 -0
- package/dist/schematic-components/SimpleGround.js.map +1 -0
- package/dist/schematic-components/SimpleInductor.js +102 -0
- package/dist/schematic-components/SimpleInductor.js.map +1 -0
- package/dist/schematic-components/SimplePowerSource.js +104 -0
- package/dist/schematic-components/SimplePowerSource.js.map +1 -0
- package/dist/schematic-components/SimpleResistor.js +102 -0
- package/dist/schematic-components/SimpleResistor.js.map +1 -0
- package/dist/schematic-components/index.js +8618 -0
- package/dist/schematic-components/index.js.map +1 -0
- package/next-env.d.ts +5 -0
- package/package.json +52 -0
- package/parsel.d.ts +81 -0
- package/src/Schematic.tsx +40 -0
- package/src/lib/hooks/index.ts +1 -0
- package/src/lib/hooks/use-maybe-promise.ts +14 -0
- package/src/lib/render-context/index.ts +15 -0
- package/src/lib/types/core.ts +179 -0
- package/src/lib/types/index.ts +4 -0
- package/src/lib/types/route-solver.ts +10 -0
- package/src/lib/types/source-component.ts +63 -0
- package/src/lib/types/util.ts +52 -0
- package/src/lib/utils/direction-to-vec.ts +50 -0
- package/src/lib/utils/get-svg-path-bounds.ts +22 -0
- package/src/lib/utils/point-math.ts +26 -0
- package/src/pages/_app.tsx +23 -0
- package/src/pages/index.tsx +10 -0
- package/src/pages/led-circuit-react.tsx +51 -0
- package/src/pages/led-circuit.tsx +91 -0
- package/src/schematic-components/MovableGrid/MovableGrid.stories.tsx +23 -0
- package/src/schematic-components/MovableGrid/index.tsx +4 -0
- package/src/schematic-components/ProjectComponent.tsx +62 -0
- package/src/schematic-components/RenderError.tsx +23 -0
- package/src/schematic-components/SVGPathComponent.tsx +64 -0
- package/src/schematic-components/SchematicBug.tsx +52 -0
- package/src/schematic-components/SchematicComponent.tsx +42 -0
- package/src/schematic-components/SchematicGroup.tsx +3 -0
- package/src/schematic-components/SchematicPort.tsx +39 -0
- package/src/schematic-components/SchematicText.tsx +41 -0
- package/src/schematic-components/SchematicTrace.tsx +48 -0
- package/src/schematic-components/SimpleCapacitor.tsx +29 -0
- package/src/schematic-components/SimpleDiode.tsx +38 -0
- package/src/schematic-components/SimpleGround.tsx +28 -0
- package/src/schematic-components/SimpleInductor.tsx +29 -0
- package/src/schematic-components/SimplePowerSource.tsx +30 -0
- package/src/schematic-components/SimpleResistor.tsx +28 -0
- package/src/schematic-components/index.tsx +17 -0
- package/tsconfig.json +31 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/schematic-components/SchematicGroup.tsx
|
|
20
|
+
var SchematicGroup_exports = {};
|
|
21
|
+
__export(SchematicGroup_exports, {
|
|
22
|
+
SchematicGroup: () => SchematicGroup
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(SchematicGroup_exports);
|
|
25
|
+
var SchematicGroup = () => {
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
SchematicGroup
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=SchematicGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schematic-components/SchematicGroup.tsx"],"sourcesContent":["export const SchematicGroup = () => {\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,iBAAiB,MAAM;AAClC,SAAO;AACT;","names":[]}
|