schematic-symbols 0.0.73 → 0.0.74
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 +424 -222
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/pnp_bipolar_transistor_horz.ts +33 -0
- package/symbols/pnp_bipolar_transistor_vert.ts +12 -0
package/package.json
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
import svgJson from "assets/generated/pnp_bipolar_transistor.json"
|
2
|
+
import { defineSymbol } from "drawing/defineSymbol"
|
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
|
+
{
|
12
|
+
type: "text",
|
13
|
+
text: "{REF}",
|
14
|
+
x: -0.07,
|
15
|
+
y: -0.3596647999999991,
|
16
|
+
anchor: "middle_right",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
type: "text",
|
20
|
+
text: "{VAL}",
|
21
|
+
x: -0.0679100444999996,
|
22
|
+
y: 0.4129789000000006,
|
23
|
+
anchor: "middle_right",
|
24
|
+
},
|
25
|
+
] as Primitive[],
|
26
|
+
ports: [
|
27
|
+
{ ...refblocks.top1, labels: ["1", "collector"] },
|
28
|
+
{ ...refblocks.bottom1, labels: ["2", "emitter"] },
|
29
|
+
{ ...refblocks.left1, labels: ["3", "base"] },
|
30
|
+
],
|
31
|
+
size: { width: bounds.width, height: bounds.height },
|
32
|
+
center: { x: bounds.centerX, y: bounds.centerY },
|
33
|
+
})
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import pnp_bipolar_transistor_horz from "./pnp_bipolar_transistor_horz"
|
3
|
+
|
4
|
+
const rotatedSymbol = rotateSymbol(pnp_bipolar_transistor_horz)
|
5
|
+
|
6
|
+
const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")
|
7
|
+
|
8
|
+
const ref = texts.find((t) => t.text === "{REF}")!
|
9
|
+
|
10
|
+
ref.anchor = "middle_left"
|
11
|
+
|
12
|
+
export default rotatedSymbol
|