schematic-symbols 0.0.105 → 0.0.106

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "schematic-symbols",
3
3
  "main": "./dist/index.js",
4
- "version": "0.0.105",
4
+ "version": "0.0.106",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -0,0 +1,34 @@
1
+ import svgJson from "assets/generated/boxresistor.json"
2
+ import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+ export default modifySymbol({
6
+ primitives: [
7
+ ...Object.values(paths),
8
+ ...Object.values(circles),
9
+ {
10
+ type: "text",
11
+ text: "{REF}",
12
+ x: -0.16,
13
+ y: 0.2294553499999995,
14
+ },
15
+ {
16
+ type: "text",
17
+ text: "{VAL}",
18
+ x: 0.16,
19
+ y: 0.2294553499999995,
20
+ },
21
+ ] as any,
22
+ ports: [
23
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
24
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
25
+ ],
26
+ size: { width: bounds.width, height: bounds.height },
27
+ center: { x: bounds.centerX, y: bounds.centerY },
28
+ })
29
+ .changeTextAnchor("{VAL}", "middle_bottom")
30
+ .rotateRightFacingSymbol("down")
31
+ .labelPort("left1", ["1"])
32
+ .labelPort("right1", ["2"])
33
+ .changeTextAnchor("{REF}", "middle_left")
34
+ .build()
@@ -0,0 +1,34 @@
1
+ import svgJson from "assets/generated/boxresistor.json"
2
+ import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+ export default modifySymbol({
6
+ primitives: [
7
+ ...Object.values(paths),
8
+ ...Object.values(circles),
9
+ {
10
+ type: "text",
11
+ text: "{REF}",
12
+ x: 0,
13
+ y: 0.2294553499999995,
14
+ },
15
+ {
16
+ type: "text",
17
+ text: "{VAL}",
18
+ x: 0,
19
+ y: -0.1594553499999995,
20
+ },
21
+ ] as any,
22
+ ports: [
23
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
24
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
25
+ ],
26
+ size: { width: bounds.width, height: bounds.height },
27
+ center: { x: bounds.centerX, y: bounds.centerY },
28
+ })
29
+ .changeTextAnchor("{VAL}", "middle_top")
30
+ .rotateRightFacingSymbol("right")
31
+ .labelPort("left1", ["1"])
32
+ .labelPort("right1", ["2"])
33
+ .changeTextAnchor("{REF}", "middle_bottom")
34
+ .build()
@@ -0,0 +1,34 @@
1
+ import svgJson from "assets/generated/boxresistor.json"
2
+ import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+ export default modifySymbol({
6
+ primitives: [
7
+ ...Object.values(paths),
8
+ ...Object.values(circles),
9
+ {
10
+ type: "text",
11
+ text: "{REF}",
12
+ x: 0,
13
+ y: 0.2294553499999995,
14
+ },
15
+ {
16
+ type: "text",
17
+ text: "{VAL}",
18
+ x: 0,
19
+ y: -0.1594553499999995,
20
+ },
21
+ ] as any,
22
+ ports: [
23
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
24
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
25
+ ],
26
+ size: { width: bounds.width, height: bounds.height },
27
+ center: { x: bounds.centerX, y: bounds.centerY },
28
+ })
29
+ .changeTextAnchor("{VAL}", "middle_top")
30
+ .rotateRightFacingSymbol("right")
31
+ .labelPort("left1", ["1"])
32
+ .labelPort("right1", ["2"])
33
+ .changeTextAnchor("{REF}", "middle_bottom")
34
+ .build()
@@ -0,0 +1,34 @@
1
+ import svgJson from "assets/generated/boxresistor.json"
2
+ import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+ export default modifySymbol({
6
+ primitives: [
7
+ ...Object.values(paths),
8
+ ...Object.values(circles),
9
+ {
10
+ type: "text",
11
+ text: "{REF}",
12
+ x: -0.16,
13
+ y: 0.2294553499999995,
14
+ },
15
+ {
16
+ type: "text",
17
+ text: "{VAL}",
18
+ x: 0.16,
19
+ y: 0.2294553499999995,
20
+ },
21
+ ] as any,
22
+ ports: [
23
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
24
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
25
+ ],
26
+ size: { width: bounds.width, height: bounds.height },
27
+ center: { x: bounds.centerX, y: bounds.centerY },
28
+ })
29
+ .changeTextAnchor("{VAL}", "middle_bottom")
30
+ .rotateRightFacingSymbol("down")
31
+ .labelPort("left1", ["1"])
32
+ .labelPort("right1", ["2"])
33
+ .changeTextAnchor("{REF}", "middle_left")
34
+ .build()
@@ -1,18 +0,0 @@
1
- import svgJson from "assets/generated/boxresistor.json"
2
- import { defineSymbol } from "drawing/defineSymbol"
3
-
4
- const { paths, texts, bounds, refblocks } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- { ...texts.top1, anchor: "middle_bottom" },
10
- { ...texts.bottom1, anchor: "middle_top" },
11
- ] as any,
12
- ports: [
13
- { ...refblocks.left1, labels: ["1"] },
14
- { ...refblocks.right1, labels: ["2"] },
15
- ],
16
- size: { width: bounds.width, height: bounds.height }, //{ width: 1, height: 0.24 },
17
- center: { x: bounds.centerX, y: bounds.centerY },
18
- })
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import boxresistor_horz from "./boxresistor_horz"
3
-
4
- export default rotateSymbol(boxresistor_horz)