schematic-symbols 0.0.77 → 0.0.79

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "schematic-symbols",
3
3
  "main": "./dist/index.js",
4
- "version": "0.0.77",
4
+ "version": "0.0.79",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -0,0 +1,20 @@
1
+ import { defineSymbol } from "drawing/defineSymbol"
2
+ import svgJson from "assets/generated/battery.json"
3
+ import { Primitive } from "drawing/types"
4
+
5
+ const { paths, texts, bounds, refblocks, circles } = svgJson
6
+
7
+ export default defineSymbol({
8
+ primitives: [
9
+ ...Object.values(paths),
10
+ ...Object.values(circles),
11
+ { ...texts.top1, anchor: "middle_bottom" },
12
+ { ...texts.bottom1, anchor: "middle_top" },
13
+ ] as Primitive[],
14
+ ports: [
15
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
16
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
17
+ ],
18
+ size: { width: bounds.width, height: bounds.height },
19
+ center: { x: bounds.centerX, y: bounds.centerY },
20
+ })
@@ -0,0 +1,4 @@
1
+ import { rotateSymbol } from "drawing/rotateSymbol"
2
+ import battery_horz from "./battery_horz"
3
+
4
+ export default rotateSymbol(battery_horz)
@@ -7,7 +7,7 @@ export default defineSymbol({
7
7
  primitives: [
8
8
  ...Object.values(paths),
9
9
  { ...texts.bottom1, y: 0.35, anchor: "middle_top" },
10
- { ...texts.right1, anchor: "middle_left" },
10
+ { ...texts.top1, anchor: "middle_left" },
11
11
  ] as any,
12
12
  ports: [
13
13
  { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels