schematic-symbols 0.0.70 → 0.0.71
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +448 -297
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/filled_diode_horz.ts +32 -0
- package/symbols/filled_diode_vert.ts +4 -0
package/package.json
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
import { defineSymbol } from "drawing/defineSymbol"
|
2
|
+
import svgJson from "assets/generated/filled_diode.json"
|
3
|
+
import { TextPrimitive } 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
|
+
{
|
12
|
+
type: "text",
|
13
|
+
text: "{REF}",
|
14
|
+
x: -0.1,
|
15
|
+
y: -0.38,
|
16
|
+
anchor: "middle_bottom",
|
17
|
+
} as TextPrimitive,
|
18
|
+
{
|
19
|
+
type: "text",
|
20
|
+
text: "{VAL}",
|
21
|
+
x: -0.1,
|
22
|
+
y: 0.28,
|
23
|
+
anchor: "middle_top",
|
24
|
+
} as TextPrimitive,
|
25
|
+
] as any,
|
26
|
+
ports: [
|
27
|
+
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
28
|
+
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
29
|
+
],
|
30
|
+
size: { width: bounds.width, height: bounds.height },
|
31
|
+
center: { x: bounds.centerX, y: bounds.centerY },
|
32
|
+
})
|