schematic-symbols 0.0.104 → 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/dist/index.d.ts +4 -4
- package/dist/index.js +677 -497
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/boxresistor_down.ts +34 -0
- package/symbols/boxresistor_left.ts +34 -0
- package/symbols/boxresistor_right.ts +34 -0
- package/symbols/boxresistor_up.ts +34 -0
- package/symbols/capacitor_down.ts +33 -3
- package/symbols/capacitor_left.ts +10 -3
- package/symbols/capacitor_polarized_down.ts +29 -5
- package/symbols/capacitor_polarized_up.ts +29 -5
- package/symbols/capacitor_right.ts +9 -2
- package/symbols/capacitor_up.ts +33 -3
- package/symbols/boxresistor_horz.ts +0 -18
- package/symbols/boxresistor_vert.ts +0 -4
- package/symbols/capacitor_horz.ts +0 -18
- package/symbols/capacitor_vert.ts +0 -4
package/package.json
CHANGED
@@ -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,4 +1,34 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/capacitor.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
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.2,
|
13
|
+
y: 0.2094553499999995,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: "text",
|
17
|
+
text: "{VAL}",
|
18
|
+
x: 0.2,
|
19
|
+
y: 0.2094553499999995,
|
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}", "top_left")
|
30
|
+
.rotateRightFacingSymbol("down")
|
31
|
+
.labelPort("left1", ["1"])
|
32
|
+
.labelPort("right1", ["2"])
|
33
|
+
.changeTextAnchor("{REF}", "bottom_left")
|
34
|
+
.build()
|
@@ -1,4 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
import
|
1
|
+
import { isPrimitive } from "drawing/typeguards"
|
2
|
+
import { modifySymbol } from "../drawing/modify-symbol/modify-symbol"
|
3
|
+
import svgJson from "./capacitor_right"
|
3
4
|
|
4
|
-
export default
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
7
|
+
.rotateRightFacingSymbol("left")
|
8
|
+
.labelPort("left1", ["1"])
|
9
|
+
.labelPort("right1", ["2"])
|
10
|
+
.changeTextAnchor("{REF}", "middle_top")
|
11
|
+
.build()
|
@@ -1,10 +1,34 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/capacitor_polarized.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
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.2,
|
13
|
+
y: 0.2094553499999995,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: "text",
|
17
|
+
text: "{VAL}",
|
18
|
+
x: 0.3,
|
19
|
+
y: 0.2094553499999995,
|
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}", "top_left")
|
6
30
|
.rotateRightFacingSymbol("down")
|
7
31
|
.labelPort("left1", ["1"])
|
8
32
|
.labelPort("right1", ["2"])
|
9
|
-
.changeTextAnchor("{REF}", "
|
33
|
+
.changeTextAnchor("{REF}", "bottom_left")
|
10
34
|
.build()
|
@@ -1,10 +1,34 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/capacitor_polarized.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
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.1,
|
13
|
+
y: -0.2094553499999995,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: "text",
|
17
|
+
text: "{VAL}",
|
18
|
+
x: -0.2,
|
19
|
+
y: -0.2094553499999995,
|
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}", "top_left")
|
6
30
|
.rotateRightFacingSymbol("up")
|
7
31
|
.labelPort("left1", ["1"])
|
8
32
|
.labelPort("right1", ["2"])
|
9
|
-
.changeTextAnchor("{REF}", "
|
33
|
+
.changeTextAnchor("{REF}", "bottom_left")
|
10
34
|
.build()
|
@@ -1,3 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import svgJson from "assets/generated/capacitor.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
2
3
|
|
3
|
-
export default
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.rotateRightFacingSymbol("right")
|
6
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
7
|
+
.labelPort("left1", ["1"])
|
8
|
+
.labelPort("right1", ["2"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_left")
|
10
|
+
.build()
|
package/symbols/capacitor_up.ts
CHANGED
@@ -1,4 +1,34 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/capacitor.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
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.2,
|
13
|
+
y: -0.2094553499999995,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: "text",
|
17
|
+
text: "{VAL}",
|
18
|
+
x: -0.2,
|
19
|
+
y: -0.2094553499999995,
|
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}", "top_left")
|
30
|
+
.rotateRightFacingSymbol("up")
|
31
|
+
.labelPort("left1", ["1"])
|
32
|
+
.labelPort("right1", ["2"])
|
33
|
+
.changeTextAnchor("{REF}", "bottom_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,18 +0,0 @@
|
|
1
|
-
import svgJson from "assets/generated/capacitor.json"
|
2
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
3
|
-
|
4
|
-
const { paths, bounds, refblocks, texts } = 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
|
-
})
|