schematic-symbols 0.0.60 → 0.0.62

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.60",
4
+ "version": "0.0.62",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -0,0 +1,33 @@
1
+ import { defineSymbol } from "drawing/defineSymbol"
2
+ import svgJson from "assets/generated/crystal.json"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+
6
+ export default defineSymbol({
7
+ primitives: [
8
+ ...Object.values(paths),
9
+ ...Object.values(circles),
10
+ // { ...texts.top1, anchor: "middle_left" },
11
+ // { ...texts.bottom1, anchor: "middle_left" },
12
+ {
13
+ type: "text",
14
+ text: "{REF}",
15
+ x: -0.012864500000000056,
16
+ y: -0.4150086999999978,
17
+ anchor: "middle_bottom",
18
+ },
19
+ {
20
+ type: "text",
21
+ text: "{VAL}",
22
+ x: -0.003850500000000423,
23
+ y: 0.4250087000000011,
24
+ anchor: "middle_top",
25
+ },
26
+ ] as any,
27
+ ports: [
28
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
29
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
30
+ ],
31
+ size: { width: bounds.width, height: bounds.height },
32
+ center: { x: bounds.centerX, y: bounds.centerY },
33
+ })
@@ -0,0 +1,10 @@
1
+ import { rotateSymbol } from "drawing/rotateSymbol"
2
+ import crystal_horz from "./crystal_horz"
3
+
4
+ const rotatedSymbol = rotateSymbol(crystal_horz)
5
+ const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")
6
+ const ref = texts.find((t) => t.text === "{REF}")!
7
+ const val = texts.find((t) => t.text === "{VAL}")!
8
+ val.x = -0.4
9
+ ref.x = 0.35
10
+ export default rotatedSymbol
@@ -0,0 +1,34 @@
1
+ import { defineSymbol } from "drawing/defineSymbol"
2
+ import svgJson from "assets/generated/resonator.json"
3
+
4
+ const { paths, texts, bounds, refblocks, circles } = svgJson
5
+
6
+ export default defineSymbol({
7
+ primitives: [
8
+ ...Object.values(paths),
9
+ ...Object.values(circles),
10
+ // { ...texts.top1, anchor: "middle_left" },
11
+ // { ...texts.bottom1, anchor: "middle_left" },
12
+ {
13
+ type: "text",
14
+ text: "{REF}",
15
+ x: 0.01596175000000022,
16
+ y: -0.5308501500000009,
17
+ anchor: "middle_bottom",
18
+ },
19
+ {
20
+ type: "text",
21
+ text: "{VAL}",
22
+ x: 0.013116750000000454,
23
+ y: 0.5408501499999989,
24
+ anchor: "middle_top",
25
+ },
26
+ ] as any,
27
+ ports: [
28
+ { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
29
+ { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
30
+ { ...refblocks.right2, labels: ["3"] }, // TODO add more "standard" labels
31
+ ],
32
+ size: { width: bounds.width, height: bounds.height },
33
+ center: { x: bounds.centerX, y: bounds.centerY },
34
+ })
@@ -0,0 +1,4 @@
1
+ import { rotateSymbol } from "drawing/rotateSymbol"
2
+ import resonator_horz from "./resonator_horz"
3
+
4
+ export default rotateSymbol(resonator_horz)