schematic-symbols 0.0.30 → 0.0.32
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 +3 -1
- package/dist/index.js +439 -169
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/boxresistor_horz.ts +11 -28
- package/symbols/tunnel_diode_horz.ts +19 -0
- package/symbols/tunnel_diode_vert.ts +18 -0
package/dist/index.js
CHANGED
@@ -273,47 +273,123 @@ ref.anchor = "middle_left";
|
|
273
273
|
val.anchor = "middle_right";
|
274
274
|
var avalanche_diode_vert_default = rotated;
|
275
275
|
|
276
|
-
//
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
276
|
+
// assets/generated/boxresistor.json
|
277
|
+
var boxresistor_default = {
|
278
|
+
paths: {
|
279
|
+
path1: {
|
280
|
+
type: "path",
|
281
|
+
points: [
|
282
|
+
{
|
283
|
+
x: -0.5291666499999996,
|
284
|
+
y: 0
|
285
|
+
},
|
286
|
+
{
|
287
|
+
x: -0.2645833500000001,
|
288
|
+
y: 0
|
289
|
+
}
|
290
|
+
],
|
291
|
+
color: "primary",
|
292
|
+
fill: false
|
293
|
+
},
|
294
|
+
path2: {
|
295
|
+
type: "path",
|
296
|
+
points: [
|
297
|
+
{
|
298
|
+
x: 0.2645832500000007,
|
299
|
+
y: 0
|
300
|
+
},
|
301
|
+
{
|
302
|
+
x: 0.5291666500000001,
|
303
|
+
y: 0
|
304
|
+
}
|
305
|
+
],
|
306
|
+
color: "primary",
|
307
|
+
fill: false
|
308
|
+
},
|
309
|
+
path3: {
|
310
|
+
type: "path",
|
311
|
+
points: [
|
312
|
+
{
|
313
|
+
x: -14999999997655777e-23,
|
314
|
+
y: -0.13229169999999968
|
315
|
+
},
|
316
|
+
{
|
317
|
+
x: 0.26458314999999955,
|
318
|
+
y: -0.13229169999999968
|
319
|
+
},
|
320
|
+
{
|
321
|
+
x: 0.26458314999999955,
|
322
|
+
y: 0.13229169999999968
|
323
|
+
},
|
324
|
+
{
|
325
|
+
x: -0.2645835500000011,
|
326
|
+
y: 0.13229169999999968
|
327
|
+
},
|
328
|
+
{
|
329
|
+
x: -0.2645835500000011,
|
330
|
+
y: -0.13229169999999968
|
331
|
+
},
|
332
|
+
{
|
333
|
+
x: -15000000175291461e-23,
|
334
|
+
y: -0.13229169999999968
|
335
|
+
}
|
336
|
+
],
|
337
|
+
color: "primary",
|
338
|
+
fill: false
|
339
|
+
}
|
340
|
+
},
|
341
|
+
texts: {
|
342
|
+
top1: {
|
343
|
+
type: "text",
|
344
|
+
text: "{REF}",
|
345
|
+
x: -0.018740649999999803,
|
346
|
+
y: -0.20383659999999892
|
347
|
+
},
|
348
|
+
bottom1: {
|
349
|
+
type: "text",
|
350
|
+
text: "{VAL}",
|
351
|
+
x: -0.01777865000000034,
|
352
|
+
y: 0.2961594000000023
|
353
|
+
}
|
354
|
+
},
|
355
|
+
refblocks: {
|
356
|
+
left1: {
|
357
|
+
x: -0.5511065500000007,
|
358
|
+
y: 3562000000023602e-19
|
359
|
+
},
|
360
|
+
right1: {
|
361
|
+
x: 0.5164748499999998,
|
362
|
+
y: 9027000000010332e-19
|
363
|
+
}
|
364
|
+
},
|
365
|
+
bounds: {
|
366
|
+
minX: -0.5291666499999996,
|
367
|
+
maxX: 0.5291666500000001,
|
368
|
+
minY: -0.13229169999999968,
|
369
|
+
maxY: 0.13229169999999968,
|
370
|
+
width: 1.0583332999999997,
|
371
|
+
height: 1,
|
372
|
+
centerX: 2220446049250313e-31,
|
373
|
+
centerY: 0
|
374
|
+
},
|
375
|
+
circles: {}
|
376
|
+
};
|
285
377
|
|
286
378
|
// symbols/boxresistor_horz.ts
|
379
|
+
var { paths: paths2, texts: texts2, bounds: bounds2, refblocks: refblocks2 } = boxresistor_default;
|
287
380
|
var boxresistor_horz_default = defineSymbol({
|
288
381
|
primitives: [
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
{ x: 0.2, y: 0 },
|
293
|
-
{ x: 0.2, y: -0.12 },
|
294
|
-
{ x: 0.8, y: -0.12 },
|
295
|
-
{ x: 0.8, y: 0.12 },
|
296
|
-
{ x: 0.2, y: 0.12 },
|
297
|
-
{ x: 0.2, y: 0 }
|
298
|
-
],
|
299
|
-
color: "primary"
|
300
|
-
}),
|
301
|
-
path({
|
302
|
-
points: [
|
303
|
-
{ x: 0.8, y: 0 },
|
304
|
-
{ x: 1, y: 0 }
|
305
|
-
],
|
306
|
-
color: "primary"
|
307
|
-
}),
|
308
|
-
text("{REF}", { x: 0.5, y: -0.2, anchor: "middle_bottom" }),
|
309
|
-
text("{VAL}", { x: 0.5, y: 0.2, anchor: "middle_top" })
|
382
|
+
...Object.values(paths2),
|
383
|
+
{ ...texts2.top1, anchor: "middle_bottom" },
|
384
|
+
{ ...texts2.bottom1, anchor: "middle_top" }
|
310
385
|
],
|
311
386
|
ports: [
|
312
|
-
{
|
313
|
-
{
|
387
|
+
{ ...refblocks2.left1, labels: ["1"] },
|
388
|
+
{ ...refblocks2.right1, labels: ["2"] }
|
314
389
|
],
|
315
|
-
|
316
|
-
|
390
|
+
size: { width: bounds2.width, height: bounds2.height },
|
391
|
+
//{ width: 1, height: 0.24 },
|
392
|
+
center: { x: bounds2.centerX, y: bounds2.centerY }
|
317
393
|
});
|
318
394
|
|
319
395
|
// symbols/boxresistor_vert.ts
|
@@ -420,20 +496,20 @@ var capacitor_default = {
|
|
420
496
|
};
|
421
497
|
|
422
498
|
// symbols/capacitor_horz.ts
|
423
|
-
var { paths:
|
499
|
+
var { paths: paths3, bounds: bounds3, refblocks: refblocks3, texts: texts3 } = capacitor_default;
|
424
500
|
var capacitor_horz_default = defineSymbol({
|
425
501
|
primitives: [
|
426
|
-
...Object.values(
|
427
|
-
{ ...
|
428
|
-
{ ...
|
502
|
+
...Object.values(paths3),
|
503
|
+
{ ...texts3.top1, anchor: "middle_bottom" },
|
504
|
+
{ ...texts3.bottom1, anchor: "middle_top" }
|
429
505
|
],
|
430
506
|
ports: [
|
431
|
-
{ ...
|
432
|
-
{ ...
|
507
|
+
{ ...refblocks3.left1, labels: ["1"] },
|
508
|
+
{ ...refblocks3.right1, labels: ["2"] }
|
433
509
|
],
|
434
|
-
size: { width:
|
510
|
+
size: { width: bounds3.width, height: bounds3.height },
|
435
511
|
//{ width: 1, height: 0.24 },
|
436
|
-
center: { x:
|
512
|
+
center: { x: bounds3.centerX, y: bounds3.centerY }
|
437
513
|
});
|
438
514
|
|
439
515
|
// symbols/capacitor_vert.ts
|
@@ -570,21 +646,21 @@ var diode_default = {
|
|
570
646
|
};
|
571
647
|
|
572
648
|
// symbols/diode_horz.ts
|
573
|
-
var { paths:
|
649
|
+
var { paths: paths4, texts: texts4, bounds: bounds4, refblocks: refblocks4 } = diode_default;
|
574
650
|
var diode_horz_default = defineSymbol({
|
575
651
|
primitives: [
|
576
|
-
...Object.values(
|
577
|
-
{ ...
|
578
|
-
{ ...
|
652
|
+
...Object.values(paths4),
|
653
|
+
{ ...texts4.top1, anchor: "middle_bottom" },
|
654
|
+
{ ...texts4.bottom1, anchor: "middle_top" }
|
579
655
|
],
|
580
656
|
ports: [
|
581
|
-
{ ...
|
657
|
+
{ ...refblocks4.left1, labels: ["1"] },
|
582
658
|
// TODO add more "standard" labels
|
583
|
-
{ ...
|
659
|
+
{ ...refblocks4.right1, labels: ["2"] }
|
584
660
|
// TODO add more "standard" labels
|
585
661
|
],
|
586
|
-
size: { width:
|
587
|
-
center: { x:
|
662
|
+
size: { width: bounds4.width, height: bounds4.height },
|
663
|
+
center: { x: bounds4.centerX, y: bounds4.centerY }
|
588
664
|
});
|
589
665
|
|
590
666
|
// symbols/diode_vert.ts
|
@@ -677,11 +753,11 @@ var fuse_default = {
|
|
677
753
|
};
|
678
754
|
|
679
755
|
// symbols/fuse_horz.ts
|
680
|
-
var { paths:
|
756
|
+
var { paths: paths5, texts: texts5, bounds: bounds5, refblocks: refblocks5 } = fuse_default;
|
681
757
|
var fuse_horz_default = defineSymbol({
|
682
758
|
primitives: [
|
683
|
-
...Object.values(
|
684
|
-
{ ...
|
759
|
+
...Object.values(paths5),
|
760
|
+
{ ...texts5.top1, anchor: "middle_bottom" },
|
685
761
|
{
|
686
762
|
type: "text",
|
687
763
|
text: "{VAL}",
|
@@ -691,13 +767,13 @@ var fuse_horz_default = defineSymbol({
|
|
691
767
|
}
|
692
768
|
],
|
693
769
|
ports: [
|
694
|
-
{ ...
|
770
|
+
{ ...refblocks5.left1, labels: ["1"] },
|
695
771
|
// TODO add more "standard" labels
|
696
|
-
{ ...
|
772
|
+
{ ...refblocks5.right1, labels: ["2"] }
|
697
773
|
// TODO add more "standard" labels
|
698
774
|
],
|
699
|
-
size: { width:
|
700
|
-
center: { x:
|
775
|
+
size: { width: bounds5.width, height: bounds5.height },
|
776
|
+
center: { x: bounds5.centerX, y: bounds5.centerY }
|
701
777
|
});
|
702
778
|
|
703
779
|
// symbols/fuse_vert.ts
|
@@ -918,19 +994,19 @@ var led_default = {
|
|
918
994
|
};
|
919
995
|
|
920
996
|
// symbols/led_horz.ts
|
921
|
-
var { paths:
|
997
|
+
var { paths: paths6, texts: texts6, bounds: bounds6, refblocks: refblocks6 } = led_default;
|
922
998
|
var led_horz_default = defineSymbol({
|
923
999
|
primitives: [
|
924
|
-
...Object.values(
|
925
|
-
{ ...
|
926
|
-
{ ...
|
1000
|
+
...Object.values(paths6),
|
1001
|
+
{ ...texts6.bottom1, anchor: "middle_right" },
|
1002
|
+
{ ...texts6.right1, anchor: "middle_left" }
|
927
1003
|
],
|
928
1004
|
ports: [
|
929
|
-
{ ...
|
930
|
-
{ ...
|
1005
|
+
{ ...refblocks6.left1, labels: ["1", "anode", "pos"] },
|
1006
|
+
{ ...refblocks6.right1, labels: ["2", "cathode", "neg"] }
|
931
1007
|
],
|
932
|
-
size: { width:
|
933
|
-
center: { x:
|
1008
|
+
size: { width: bounds6.width, height: bounds6.height },
|
1009
|
+
center: { x: bounds6.centerX, y: bounds6.centerY + 0.1 }
|
934
1010
|
});
|
935
1011
|
|
936
1012
|
// symbols/led_vert.ts
|
@@ -1219,23 +1295,23 @@ var mosfet_depletion_normally_on_default = {
|
|
1219
1295
|
};
|
1220
1296
|
|
1221
1297
|
// symbols/mosfet_depletion_normally_on_horz.ts
|
1222
|
-
var { paths:
|
1298
|
+
var { paths: paths7, texts: texts7, bounds: bounds7, refblocks: refblocks7 } = mosfet_depletion_normally_on_default;
|
1223
1299
|
var mosfet_depletion_normally_on_horz_default = defineSymbol({
|
1224
1300
|
primitives: [
|
1225
|
-
...Object.values(
|
1226
|
-
{ ...
|
1227
|
-
{ ...
|
1301
|
+
...Object.values(paths7),
|
1302
|
+
{ ...texts7.right1, anchor: "middle_left" },
|
1303
|
+
{ ...texts7.right2, anchor: "middle_left" }
|
1228
1304
|
],
|
1229
1305
|
ports: [
|
1230
|
-
{ ...
|
1306
|
+
{ ...refblocks7.top1, labels: ["1"] },
|
1231
1307
|
// TODO add more "standard" labels
|
1232
|
-
{ ...
|
1308
|
+
{ ...refblocks7.bottom1, labels: ["2"] },
|
1233
1309
|
// TODO add more "standard" labels
|
1234
|
-
{ ...
|
1310
|
+
{ ...refblocks7.left1, labels: ["3"] }
|
1235
1311
|
// TODO add more "standard" labels
|
1236
1312
|
],
|
1237
|
-
size: { width:
|
1238
|
-
center: { x:
|
1313
|
+
size: { width: bounds7.width + 0.4, height: bounds7.height },
|
1314
|
+
center: { x: bounds7.centerX + 0.2, y: bounds7.centerY }
|
1239
1315
|
});
|
1240
1316
|
|
1241
1317
|
// symbols/mosfet_depletion_normally_on_vert.ts
|
@@ -1477,10 +1553,10 @@ var photodiode_default = {
|
|
1477
1553
|
};
|
1478
1554
|
|
1479
1555
|
// symbols/photodiode_horz.ts
|
1480
|
-
var { paths:
|
1556
|
+
var { paths: paths8, texts: texts8, bounds: bounds8, refblocks: refblocks8, circles: circles2 } = photodiode_default;
|
1481
1557
|
var photodiode_horz_default = defineSymbol({
|
1482
1558
|
primitives: [
|
1483
|
-
...Object.values(
|
1559
|
+
...Object.values(paths8),
|
1484
1560
|
...Object.values(circles2),
|
1485
1561
|
{
|
1486
1562
|
type: "text",
|
@@ -1498,19 +1574,19 @@ var photodiode_horz_default = defineSymbol({
|
|
1498
1574
|
}
|
1499
1575
|
],
|
1500
1576
|
ports: [
|
1501
|
-
{ ...
|
1577
|
+
{ ...refblocks8.left1, labels: ["1"] },
|
1502
1578
|
// TODO add more "standard" labels
|
1503
|
-
{ ...
|
1579
|
+
{ ...refblocks8.right1, labels: ["2"] }
|
1504
1580
|
// TODO add more "standard" labels
|
1505
1581
|
],
|
1506
|
-
size: { width:
|
1507
|
-
center: { x:
|
1582
|
+
size: { width: bounds8.width, height: bounds8.height },
|
1583
|
+
center: { x: bounds8.centerX, y: bounds8.centerY }
|
1508
1584
|
});
|
1509
1585
|
|
1510
1586
|
// symbols/photodiode_vert.ts
|
1511
1587
|
var rotatedSymbol = rotateSymbol(photodiode_horz_default);
|
1512
|
-
var
|
1513
|
-
var ref4 =
|
1588
|
+
var texts9 = rotatedSymbol.primitives.filter((p) => p.type === "text");
|
1589
|
+
var ref4 = texts9.find((t) => t.text === "{REF}");
|
1514
1590
|
ref4.y = 0;
|
1515
1591
|
ref4.anchor = "middle_left";
|
1516
1592
|
var photodiode_vert_default = rotatedSymbol;
|
@@ -1651,21 +1727,21 @@ var potentiometer_default = {
|
|
1651
1727
|
};
|
1652
1728
|
|
1653
1729
|
// symbols/potentiometer_horz.ts
|
1654
|
-
var { paths:
|
1730
|
+
var { paths: paths9, texts: texts10, bounds: bounds9, refblocks: refblocks9 } = potentiometer_default;
|
1655
1731
|
var potentiometer_horz_default = defineSymbol({
|
1656
1732
|
primitives: [
|
1657
|
-
...Object.values(
|
1658
|
-
{ ...
|
1659
|
-
{ ...
|
1733
|
+
...Object.values(paths9),
|
1734
|
+
{ ...texts10.bottom1, y: 0.35, anchor: "middle_top" },
|
1735
|
+
{ ...texts10.right1, anchor: "middle_left" }
|
1660
1736
|
],
|
1661
1737
|
ports: [
|
1662
|
-
{ ...
|
1738
|
+
{ ...refblocks9.left1, labels: ["1"] },
|
1663
1739
|
// TODO add more "standard" labels
|
1664
|
-
{ ...
|
1740
|
+
{ ...refblocks9.right1, labels: ["2"] }
|
1665
1741
|
// TODO add more "standard" labels
|
1666
1742
|
],
|
1667
|
-
size: { width:
|
1668
|
-
center: { x:
|
1743
|
+
size: { width: bounds9.width + 0.05, height: bounds9.height },
|
1744
|
+
center: { x: bounds9.centerX, y: bounds9.centerY }
|
1669
1745
|
});
|
1670
1746
|
|
1671
1747
|
// symbols/potentiometer_vert.ts
|
@@ -1827,21 +1903,21 @@ var potentiometer2_default = {
|
|
1827
1903
|
};
|
1828
1904
|
|
1829
1905
|
// symbols/potentiometer2_horz.ts
|
1830
|
-
var { paths:
|
1906
|
+
var { paths: paths10, texts: texts11, bounds: bounds10, refblocks: refblocks10 } = potentiometer2_default;
|
1831
1907
|
var potentiometer2_horz_default = defineSymbol({
|
1832
1908
|
primitives: [
|
1833
|
-
...Object.values(
|
1834
|
-
{ ...
|
1835
|
-
{ ...
|
1909
|
+
...Object.values(paths10),
|
1910
|
+
{ ...texts11.bottom1, anchor: "middle_right" },
|
1911
|
+
{ ...texts11.top1, anchor: "middle_left" }
|
1836
1912
|
],
|
1837
1913
|
ports: [
|
1838
|
-
{ ...
|
1914
|
+
{ ...refblocks10.left1, labels: ["1"] },
|
1839
1915
|
// TODO add more "standard" labels
|
1840
|
-
{ ...
|
1916
|
+
{ ...refblocks10.right1, labels: ["2"] }
|
1841
1917
|
// TODO add more "standard" labels
|
1842
1918
|
],
|
1843
|
-
size: { width:
|
1844
|
-
center: { x:
|
1919
|
+
size: { width: bounds10.width, height: bounds10.height },
|
1920
|
+
center: { x: bounds10.centerX, y: bounds10.centerY }
|
1845
1921
|
});
|
1846
1922
|
|
1847
1923
|
// symbols/potentiometer2_vert.ts
|
@@ -1948,21 +2024,21 @@ var push_button_normally_closed_momentary_default = {
|
|
1948
2024
|
};
|
1949
2025
|
|
1950
2026
|
// symbols/push_button_normally_closed_momentary_horz.ts
|
1951
|
-
var { paths:
|
2027
|
+
var { paths: paths11, texts: texts12, bounds: bounds11, refblocks: refblocks11 } = push_button_normally_closed_momentary_default;
|
1952
2028
|
var push_button_normally_closed_momentary_horz_default = defineSymbol({
|
1953
2029
|
primitives: [
|
1954
|
-
...Object.values(
|
1955
|
-
{ ...
|
1956
|
-
{ ...
|
2030
|
+
...Object.values(paths11),
|
2031
|
+
{ ...texts12.top1, anchor: "middle_bottom" },
|
2032
|
+
{ ...texts12.bottom1, anchor: "middle_top" }
|
1957
2033
|
],
|
1958
2034
|
ports: [
|
1959
|
-
{ ...
|
2035
|
+
{ ...refblocks11.left1, labels: ["1"] },
|
1960
2036
|
// TODO add more "standard" labels
|
1961
|
-
{ ...
|
2037
|
+
{ ...refblocks11.right1, labels: ["2"] }
|
1962
2038
|
// TODO add more "standard" labels
|
1963
2039
|
],
|
1964
|
-
size: { width:
|
1965
|
-
center: { x:
|
2040
|
+
size: { width: bounds11.width, height: bounds11.height },
|
2041
|
+
center: { x: bounds11.centerX, y: bounds11.centerY }
|
1966
2042
|
});
|
1967
2043
|
|
1968
2044
|
// symbols/push_button_normally_closed_momentary_vert.ts
|
@@ -2082,21 +2158,21 @@ var push_button_normally_open_momentary_default = {
|
|
2082
2158
|
};
|
2083
2159
|
|
2084
2160
|
// symbols/push_button_normally_open_momentary_horz.ts
|
2085
|
-
var { paths:
|
2161
|
+
var { paths: paths12, texts: texts13, bounds: bounds12, refblocks: refblocks12 } = push_button_normally_open_momentary_default;
|
2086
2162
|
var push_button_normally_open_momentary_horz_default = defineSymbol({
|
2087
2163
|
primitives: [
|
2088
|
-
...Object.values(
|
2089
|
-
{ ...
|
2090
|
-
{ ...
|
2164
|
+
...Object.values(paths12),
|
2165
|
+
{ ...texts13.top1, anchor: "middle_bottom" },
|
2166
|
+
{ ...texts13.bottom1, anchor: "middle_top" }
|
2091
2167
|
],
|
2092
2168
|
ports: [
|
2093
|
-
{ ...
|
2169
|
+
{ ...refblocks12.left1, labels: ["1"] },
|
2094
2170
|
// TODO add more "standard" labels
|
2095
|
-
{ ...
|
2171
|
+
{ ...refblocks12.right1, labels: ["2"] }
|
2096
2172
|
// TODO add more "standard" labels
|
2097
2173
|
],
|
2098
|
-
size: { width:
|
2099
|
-
center: { x:
|
2174
|
+
size: { width: bounds12.width, height: bounds12.height },
|
2175
|
+
center: { x: bounds12.centerX, y: bounds12.centerY }
|
2100
2176
|
});
|
2101
2177
|
|
2102
2178
|
// symbols/push_button_normally_open_momentary_vert.ts
|
@@ -2307,22 +2383,22 @@ var schottky_diode_default = {
|
|
2307
2383
|
};
|
2308
2384
|
|
2309
2385
|
// symbols/schottky_diode_horz.ts
|
2310
|
-
var { paths:
|
2386
|
+
var { paths: paths13, texts: texts14, bounds: bounds13, refblocks: refblocks13, circles: circles3 } = schottky_diode_default;
|
2311
2387
|
var schottky_diode_horz_default = defineSymbol({
|
2312
2388
|
primitives: [
|
2313
|
-
...Object.values(
|
2389
|
+
...Object.values(paths13),
|
2314
2390
|
...Object.values(circles3),
|
2315
|
-
{ ...
|
2316
|
-
{ ...
|
2391
|
+
{ ...texts14.top1, anchor: "middle_bottom" },
|
2392
|
+
{ ...texts14.bottom1, anchor: "middle_top" }
|
2317
2393
|
],
|
2318
2394
|
ports: [
|
2319
|
-
{ ...
|
2395
|
+
{ ...refblocks13.left1, labels: ["1"] },
|
2320
2396
|
// TODO add more "standard" labels
|
2321
|
-
{ ...
|
2397
|
+
{ ...refblocks13.right1, labels: ["2"] }
|
2322
2398
|
// TODO add more "standard" labels
|
2323
2399
|
],
|
2324
|
-
size: { width:
|
2325
|
-
center: { x:
|
2400
|
+
size: { width: bounds13.width, height: bounds13.height },
|
2401
|
+
center: { x: bounds13.centerX, y: bounds13.centerY }
|
2326
2402
|
});
|
2327
2403
|
|
2328
2404
|
// symbols/schottky_diode_vert.ts
|
@@ -2337,6 +2413,198 @@ ref7.anchor = "middle_left";
|
|
2337
2413
|
val6.anchor = "middle_right";
|
2338
2414
|
var schottky_diode_vert_default = rotated7;
|
2339
2415
|
|
2416
|
+
// assets/generated/tunnel_diode.json
|
2417
|
+
var tunnel_diode_default = {
|
2418
|
+
paths: {
|
2419
|
+
path40: {
|
2420
|
+
type: "path",
|
2421
|
+
points: [
|
2422
|
+
{
|
2423
|
+
x: 0.1413337499999996,
|
2424
|
+
y: -41674999999941065e-20
|
2425
|
+
},
|
2426
|
+
{
|
2427
|
+
x: -0.12324954999999993,
|
2428
|
+
y: 0.13187495000000093
|
2429
|
+
}
|
2430
|
+
],
|
2431
|
+
color: "primary",
|
2432
|
+
fill: false
|
2433
|
+
},
|
2434
|
+
path41: {
|
2435
|
+
type: "path",
|
2436
|
+
points: [
|
2437
|
+
{
|
2438
|
+
x: -0.12324954999999993,
|
2439
|
+
y: -0.13270844999999976
|
2440
|
+
},
|
2441
|
+
{
|
2442
|
+
x: 0.1413337499999996,
|
2443
|
+
y: -41674999999941065e-20
|
2444
|
+
}
|
2445
|
+
],
|
2446
|
+
color: "primary",
|
2447
|
+
fill: false
|
2448
|
+
},
|
2449
|
+
path42: {
|
2450
|
+
type: "path",
|
2451
|
+
points: [
|
2452
|
+
{
|
2453
|
+
x: -0.12324954999999993,
|
2454
|
+
y: 0.1318749499999996
|
2455
|
+
},
|
2456
|
+
{
|
2457
|
+
x: -0.12324954999999993,
|
2458
|
+
y: -0.13270844999999976
|
2459
|
+
}
|
2460
|
+
],
|
2461
|
+
color: "primary",
|
2462
|
+
fill: false
|
2463
|
+
},
|
2464
|
+
path43: {
|
2465
|
+
type: "path",
|
2466
|
+
points: [
|
2467
|
+
{
|
2468
|
+
x: 0.1413337499999996,
|
2469
|
+
y: -0.13270844999999976
|
2470
|
+
},
|
2471
|
+
{
|
2472
|
+
x: 0.1413337499999996,
|
2473
|
+
y: 0.1318749499999996
|
2474
|
+
}
|
2475
|
+
],
|
2476
|
+
color: "primary",
|
2477
|
+
fill: false
|
2478
|
+
},
|
2479
|
+
path44: {
|
2480
|
+
type: "path",
|
2481
|
+
points: [
|
2482
|
+
{
|
2483
|
+
x: -0.12545425,
|
2484
|
+
y: -41674999999941065e-20
|
2485
|
+
},
|
2486
|
+
{
|
2487
|
+
x: -0.52012455,
|
2488
|
+
y: -41674999999941065e-20
|
2489
|
+
}
|
2490
|
+
],
|
2491
|
+
color: "primary",
|
2492
|
+
fill: false
|
2493
|
+
},
|
2494
|
+
"path44-0": {
|
2495
|
+
type: "path",
|
2496
|
+
points: [
|
2497
|
+
{
|
2498
|
+
x: 0.5201245499999998,
|
2499
|
+
y: -33154999999984724e-20
|
2500
|
+
},
|
2501
|
+
{
|
2502
|
+
x: 0.14641644999999937,
|
2503
|
+
y: -33154999999984724e-20
|
2504
|
+
}
|
2505
|
+
],
|
2506
|
+
color: "primary",
|
2507
|
+
fill: false
|
2508
|
+
},
|
2509
|
+
"path43-8": {
|
2510
|
+
type: "path",
|
2511
|
+
points: [
|
2512
|
+
{
|
2513
|
+
x: 0.1401360499999995,
|
2514
|
+
y: -0.13319134999999993
|
2515
|
+
},
|
2516
|
+
{
|
2517
|
+
x: 0.07403164999999912,
|
2518
|
+
y: -0.13270134999999916
|
2519
|
+
}
|
2520
|
+
],
|
2521
|
+
color: "primary",
|
2522
|
+
fill: false
|
2523
|
+
},
|
2524
|
+
"path43-8-8": {
|
2525
|
+
type: "path",
|
2526
|
+
points: [
|
2527
|
+
{
|
2528
|
+
x: 0.14135174999999967,
|
2529
|
+
y: 0.13270134999999939
|
2530
|
+
},
|
2531
|
+
{
|
2532
|
+
x: 0.07524734999999927,
|
2533
|
+
y: 0.13319134999999993
|
2534
|
+
}
|
2535
|
+
],
|
2536
|
+
color: "primary",
|
2537
|
+
fill: false
|
2538
|
+
}
|
2539
|
+
},
|
2540
|
+
texts: {
|
2541
|
+
top1: {
|
2542
|
+
type: "text",
|
2543
|
+
text: "{REF}",
|
2544
|
+
x: -0.0082802500000001,
|
2545
|
+
y: -0.23022574999999956
|
2546
|
+
},
|
2547
|
+
bottom1: {
|
2548
|
+
type: "text",
|
2549
|
+
text: "{VAL}",
|
2550
|
+
x: -0.0033669500000002017,
|
2551
|
+
y: 0.31746485000000035
|
2552
|
+
}
|
2553
|
+
},
|
2554
|
+
refblocks: {
|
2555
|
+
left1: {
|
2556
|
+
x: -0.5224022500000005,
|
2557
|
+
y: -0.0013011500000004173
|
2558
|
+
},
|
2559
|
+
right1: {
|
2560
|
+
x: 0.5158919499999994,
|
2561
|
+
y: -27654999999948693e-20
|
2562
|
+
}
|
2563
|
+
},
|
2564
|
+
bounds: {
|
2565
|
+
minX: -0.52012455,
|
2566
|
+
maxX: 0.5201245499999998,
|
2567
|
+
minY: -0.13319134999999993,
|
2568
|
+
maxY: 0.13319134999999993,
|
2569
|
+
width: 1.0402490999999998,
|
2570
|
+
height: 1,
|
2571
|
+
centerX: -11102230246251565e-32,
|
2572
|
+
centerY: 0
|
2573
|
+
},
|
2574
|
+
circles: {}
|
2575
|
+
};
|
2576
|
+
|
2577
|
+
// symbols/tunnel_diode_horz.ts
|
2578
|
+
var { paths: paths14, texts: texts15, bounds: bounds14, refblocks: refblocks14, circles: circles4 } = tunnel_diode_default;
|
2579
|
+
var tunnel_diode_horz_default = defineSymbol({
|
2580
|
+
primitives: [
|
2581
|
+
...Object.values(paths14),
|
2582
|
+
...Object.values(circles4),
|
2583
|
+
{ ...texts15.top1, anchor: "middle_bottom" },
|
2584
|
+
{ ...texts15.bottom1, anchor: "middle_top" }
|
2585
|
+
],
|
2586
|
+
ports: [
|
2587
|
+
{ ...refblocks14.left1, labels: ["1"] },
|
2588
|
+
// TODO add more "standard" labels
|
2589
|
+
{ ...refblocks14.right1, labels: ["2"] }
|
2590
|
+
// TODO add more "standard" labels
|
2591
|
+
],
|
2592
|
+
size: { width: bounds14.width, height: bounds14.height },
|
2593
|
+
center: { x: bounds14.centerX, y: bounds14.centerY }
|
2594
|
+
});
|
2595
|
+
|
2596
|
+
// symbols/tunnel_diode_vert.ts
|
2597
|
+
var rotated8 = rotateSymbol(tunnel_diode_horz_default);
|
2598
|
+
var ref8 = rotated8.primitives.find(
|
2599
|
+
(p) => p.type === "text" && p.text === "{REF}"
|
2600
|
+
);
|
2601
|
+
var val7 = rotated8.primitives.find(
|
2602
|
+
(p) => p.type === "text" && p.text === "{VAL}"
|
2603
|
+
);
|
2604
|
+
ref8.anchor = "middle_left";
|
2605
|
+
val7.anchor = "middle_right";
|
2606
|
+
var tunnel_diode_vert_default = rotated8;
|
2607
|
+
|
2340
2608
|
// assets/generated/varactor_diode.json
|
2341
2609
|
var varactor_diode_default = {
|
2342
2610
|
paths: {
|
@@ -2484,35 +2752,35 @@ var varactor_diode_default = {
|
|
2484
2752
|
};
|
2485
2753
|
|
2486
2754
|
// symbols/varactor_diode_horz.ts
|
2487
|
-
var { paths:
|
2755
|
+
var { paths: paths15, texts: texts16, bounds: bounds15, refblocks: refblocks15, circles: circles5 } = varactor_diode_default;
|
2488
2756
|
var varactor_diode_horz_default = defineSymbol({
|
2489
2757
|
primitives: [
|
2490
|
-
...Object.values(
|
2491
|
-
...Object.values(
|
2492
|
-
{ ...
|
2493
|
-
{ ...
|
2758
|
+
...Object.values(paths15),
|
2759
|
+
...Object.values(circles5),
|
2760
|
+
{ ...texts16.top1, anchor: "middle_bottom" },
|
2761
|
+
{ ...texts16.bottom1, anchor: "middle_top" }
|
2494
2762
|
],
|
2495
2763
|
ports: [
|
2496
|
-
{ ...
|
2764
|
+
{ ...refblocks15.left1, labels: ["1"] },
|
2497
2765
|
// TODO add more "standard" labels
|
2498
|
-
{ ...
|
2766
|
+
{ ...refblocks15.right1, labels: ["2"] }
|
2499
2767
|
// TODO add more "standard" labels
|
2500
2768
|
],
|
2501
|
-
size: { width:
|
2502
|
-
center: { x:
|
2769
|
+
size: { width: bounds15.width, height: bounds15.height },
|
2770
|
+
center: { x: bounds15.centerX, y: bounds15.centerY }
|
2503
2771
|
});
|
2504
2772
|
|
2505
2773
|
// symbols/varactor_diode_vert.ts
|
2506
|
-
var
|
2507
|
-
var
|
2774
|
+
var rotated9 = rotateSymbol(varactor_diode_horz_default);
|
2775
|
+
var ref9 = rotated9.primitives.find(
|
2508
2776
|
(p) => p.type === "text" && p.text === "{REF}"
|
2509
2777
|
);
|
2510
|
-
var
|
2778
|
+
var val8 = rotated9.primitives.find(
|
2511
2779
|
(p) => p.type === "text" && p.text === "{VAL}"
|
2512
2780
|
);
|
2513
|
-
|
2514
|
-
|
2515
|
-
var varactor_diode_vert_default =
|
2781
|
+
ref9.anchor = "middle_left";
|
2782
|
+
val8.anchor = "middle_right";
|
2783
|
+
var varactor_diode_vert_default = rotated9;
|
2516
2784
|
|
2517
2785
|
// assets/generated/varistor.json
|
2518
2786
|
var varistor_default = {
|
@@ -2646,26 +2914,26 @@ var varistor_default = {
|
|
2646
2914
|
};
|
2647
2915
|
|
2648
2916
|
// symbols/varistor_horz.ts
|
2649
|
-
var { paths:
|
2917
|
+
var { paths: paths16, texts: texts17, bounds: bounds16, refblocks: refblocks16 } = varistor_default;
|
2650
2918
|
var varistor_horz_default = defineSymbol({
|
2651
2919
|
primitives: [
|
2652
|
-
...Object.values(
|
2653
|
-
{ ...
|
2654
|
-
{ ...
|
2920
|
+
...Object.values(paths16),
|
2921
|
+
{ ...texts17.top1, anchor: "middle_left" },
|
2922
|
+
{ ...texts17.bottom1, anchor: "middle_right" }
|
2655
2923
|
],
|
2656
2924
|
ports: [
|
2657
2925
|
{
|
2658
|
-
...
|
2926
|
+
...refblocks16.left1,
|
2659
2927
|
labels: ["1", "-"]
|
2660
2928
|
},
|
2661
2929
|
{
|
2662
|
-
...
|
2930
|
+
...refblocks16.right1,
|
2663
2931
|
labels: ["2", "+"]
|
2664
2932
|
}
|
2665
2933
|
],
|
2666
|
-
size: { width:
|
2934
|
+
size: { width: bounds16.width, height: bounds16.height },
|
2667
2935
|
//{ width: 1, height: 0.24 },
|
2668
|
-
center: { x:
|
2936
|
+
center: { x: bounds16.centerX, y: bounds16.centerY }
|
2669
2937
|
});
|
2670
2938
|
|
2671
2939
|
// symbols/varistor_vert.ts
|
@@ -2771,11 +3039,11 @@ var volt_meter_default = {
|
|
2771
3039
|
};
|
2772
3040
|
|
2773
3041
|
// symbols/volt_meter_horz.ts
|
2774
|
-
var { paths:
|
3042
|
+
var { paths: paths17, texts: texts18, bounds: bounds17, circles: circles6, refblocks: refblocks17 } = volt_meter_default;
|
2775
3043
|
var volt_meter_horz_default = defineSymbol({
|
2776
3044
|
primitives: [
|
2777
|
-
...Object.values(
|
2778
|
-
...Object.values(
|
3045
|
+
...Object.values(paths17),
|
3046
|
+
...Object.values(circles6),
|
2779
3047
|
{
|
2780
3048
|
type: "text",
|
2781
3049
|
text: "{REF}",
|
@@ -2792,13 +3060,13 @@ var volt_meter_horz_default = defineSymbol({
|
|
2792
3060
|
}
|
2793
3061
|
],
|
2794
3062
|
ports: [
|
2795
|
-
{ ...
|
3063
|
+
{ ...refblocks17.left1, labels: ["1"] },
|
2796
3064
|
// TODO add more "standard" labels
|
2797
|
-
{ ...
|
3065
|
+
{ ...refblocks17.right1, labels: ["2"] }
|
2798
3066
|
// TODO add more "standard" labels
|
2799
3067
|
],
|
2800
|
-
size: { width:
|
2801
|
-
center: { x:
|
3068
|
+
size: { width: bounds17.width, height: bounds17.height },
|
3069
|
+
center: { x: bounds17.centerX, y: bounds17.centerY }
|
2802
3070
|
});
|
2803
3071
|
|
2804
3072
|
// symbols/volt_meter_vert.ts
|
@@ -2951,35 +3219,35 @@ var zener_diode_default = {
|
|
2951
3219
|
};
|
2952
3220
|
|
2953
3221
|
// symbols/zener_diode_horz.ts
|
2954
|
-
var { paths:
|
3222
|
+
var { paths: paths18, texts: texts19, bounds: bounds18, refblocks: refblocks18, circles: circles7 } = zener_diode_default;
|
2955
3223
|
var zener_diode_horz_default = defineSymbol({
|
2956
3224
|
primitives: [
|
2957
|
-
...Object.values(
|
2958
|
-
...Object.values(
|
2959
|
-
{ ...
|
2960
|
-
{ ...
|
3225
|
+
...Object.values(paths18),
|
3226
|
+
...Object.values(circles7),
|
3227
|
+
{ ...texts19.top1, anchor: "middle_bottom" },
|
3228
|
+
{ ...texts19.bottom1, anchor: "middle_top" }
|
2961
3229
|
],
|
2962
3230
|
ports: [
|
2963
|
-
{ ...
|
3231
|
+
{ ...refblocks18.left1, labels: ["1"] },
|
2964
3232
|
// TODO add more "standard" labels
|
2965
|
-
{ ...
|
3233
|
+
{ ...refblocks18.right1, labels: ["2"] }
|
2966
3234
|
// TODO add more "standard" labels
|
2967
3235
|
],
|
2968
|
-
size: { width:
|
2969
|
-
center: { x:
|
3236
|
+
size: { width: bounds18.width, height: bounds18.height },
|
3237
|
+
center: { x: bounds18.centerX, y: bounds18.centerY }
|
2970
3238
|
});
|
2971
3239
|
|
2972
3240
|
// symbols/zener_diode_vert.ts
|
2973
|
-
var
|
2974
|
-
var
|
3241
|
+
var rotated10 = rotateSymbol(zener_diode_horz_default);
|
3242
|
+
var ref10 = rotated10.primitives.find(
|
2975
3243
|
(p) => p.type === "text" && p.text === "{REF}"
|
2976
3244
|
);
|
2977
|
-
var
|
3245
|
+
var val9 = rotated10.primitives.find(
|
2978
3246
|
(p) => p.type === "text" && p.text === "{VAL}"
|
2979
3247
|
);
|
2980
|
-
|
2981
|
-
|
2982
|
-
var zener_diode_vert_default =
|
3248
|
+
ref10.anchor = "middle_left";
|
3249
|
+
val9.anchor = "middle_right";
|
3250
|
+
var zener_diode_vert_default = rotated10;
|
2983
3251
|
|
2984
3252
|
// generated/symbols-index.ts
|
2985
3253
|
var symbols_index_default = {
|
@@ -3009,6 +3277,8 @@ var symbols_index_default = {
|
|
3009
3277
|
"push_button_normally_open_momentary_vert": push_button_normally_open_momentary_vert_default,
|
3010
3278
|
"schottky_diode_horz": schottky_diode_horz_default,
|
3011
3279
|
"schottky_diode_vert": schottky_diode_vert_default,
|
3280
|
+
"tunnel_diode_horz": tunnel_diode_horz_default,
|
3281
|
+
"tunnel_diode_vert": tunnel_diode_vert_default,
|
3012
3282
|
"varactor_diode_horz": varactor_diode_horz_default,
|
3013
3283
|
"varactor_diode_vert": varactor_diode_vert_default,
|
3014
3284
|
"varistor_horz": varistor_horz_default,
|
@@ -3044,7 +3314,7 @@ function createDiamondElement(center, size = 0.05) {
|
|
3044
3314
|
return `<path d="M ${x} ${y - halfSize} L ${x + halfSize} ${y} L ${x} ${y + halfSize} L ${x - halfSize} ${y} Z" fill="green" />`;
|
3045
3315
|
}
|
3046
3316
|
function createTextElement(primitive) {
|
3047
|
-
const { x, y, text
|
3317
|
+
const { x, y, text, fontSize = 0.1, anchor } = primitive;
|
3048
3318
|
let textAnchor;
|
3049
3319
|
const dx = 0;
|
3050
3320
|
let dy = 0;
|
@@ -3085,7 +3355,7 @@ function createTextElement(primitive) {
|
|
3085
3355
|
break;
|
3086
3356
|
}
|
3087
3357
|
return {
|
3088
|
-
text: `<text x="${x}" y="${y}" dx="${dx}" dy="${dy}" text-anchor="${textAnchor}" style="font: ${fontSize ?? 0.1}px monospace; fill: ${mapColor("primary")}">${
|
3358
|
+
text: `<text x="${x}" y="${y}" dx="${dx}" dy="${dy}" text-anchor="${textAnchor}" style="font: ${fontSize ?? 0.1}px monospace; fill: ${mapColor("primary")}">${text}</text>`,
|
3089
3359
|
anchor: `<rect x="${x - 0.025 / 2}" y="${y - 0.025 / 2}" width="0.025" height="0.025" fill="blue" />`
|
3090
3360
|
};
|
3091
3361
|
}
|