schematic-symbols 0.0.31 → 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.js +238 -162
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/boxresistor_horz.ts +11 -28
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
|
@@ -2499,22 +2575,22 @@ var tunnel_diode_default = {
|
|
2499
2575
|
};
|
2500
2576
|
|
2501
2577
|
// symbols/tunnel_diode_horz.ts
|
2502
|
-
var { paths:
|
2578
|
+
var { paths: paths14, texts: texts15, bounds: bounds14, refblocks: refblocks14, circles: circles4 } = tunnel_diode_default;
|
2503
2579
|
var tunnel_diode_horz_default = defineSymbol({
|
2504
2580
|
primitives: [
|
2505
|
-
...Object.values(
|
2581
|
+
...Object.values(paths14),
|
2506
2582
|
...Object.values(circles4),
|
2507
|
-
{ ...
|
2508
|
-
{ ...
|
2583
|
+
{ ...texts15.top1, anchor: "middle_bottom" },
|
2584
|
+
{ ...texts15.bottom1, anchor: "middle_top" }
|
2509
2585
|
],
|
2510
2586
|
ports: [
|
2511
|
-
{ ...
|
2587
|
+
{ ...refblocks14.left1, labels: ["1"] },
|
2512
2588
|
// TODO add more "standard" labels
|
2513
|
-
{ ...
|
2589
|
+
{ ...refblocks14.right1, labels: ["2"] }
|
2514
2590
|
// TODO add more "standard" labels
|
2515
2591
|
],
|
2516
|
-
size: { width:
|
2517
|
-
center: { x:
|
2592
|
+
size: { width: bounds14.width, height: bounds14.height },
|
2593
|
+
center: { x: bounds14.centerX, y: bounds14.centerY }
|
2518
2594
|
});
|
2519
2595
|
|
2520
2596
|
// symbols/tunnel_diode_vert.ts
|
@@ -2676,22 +2752,22 @@ var varactor_diode_default = {
|
|
2676
2752
|
};
|
2677
2753
|
|
2678
2754
|
// symbols/varactor_diode_horz.ts
|
2679
|
-
var { paths:
|
2755
|
+
var { paths: paths15, texts: texts16, bounds: bounds15, refblocks: refblocks15, circles: circles5 } = varactor_diode_default;
|
2680
2756
|
var varactor_diode_horz_default = defineSymbol({
|
2681
2757
|
primitives: [
|
2682
|
-
...Object.values(
|
2758
|
+
...Object.values(paths15),
|
2683
2759
|
...Object.values(circles5),
|
2684
|
-
{ ...
|
2685
|
-
{ ...
|
2760
|
+
{ ...texts16.top1, anchor: "middle_bottom" },
|
2761
|
+
{ ...texts16.bottom1, anchor: "middle_top" }
|
2686
2762
|
],
|
2687
2763
|
ports: [
|
2688
|
-
{ ...
|
2764
|
+
{ ...refblocks15.left1, labels: ["1"] },
|
2689
2765
|
// TODO add more "standard" labels
|
2690
|
-
{ ...
|
2766
|
+
{ ...refblocks15.right1, labels: ["2"] }
|
2691
2767
|
// TODO add more "standard" labels
|
2692
2768
|
],
|
2693
|
-
size: { width:
|
2694
|
-
center: { x:
|
2769
|
+
size: { width: bounds15.width, height: bounds15.height },
|
2770
|
+
center: { x: bounds15.centerX, y: bounds15.centerY }
|
2695
2771
|
});
|
2696
2772
|
|
2697
2773
|
// symbols/varactor_diode_vert.ts
|
@@ -2838,26 +2914,26 @@ var varistor_default = {
|
|
2838
2914
|
};
|
2839
2915
|
|
2840
2916
|
// symbols/varistor_horz.ts
|
2841
|
-
var { paths:
|
2917
|
+
var { paths: paths16, texts: texts17, bounds: bounds16, refblocks: refblocks16 } = varistor_default;
|
2842
2918
|
var varistor_horz_default = defineSymbol({
|
2843
2919
|
primitives: [
|
2844
|
-
...Object.values(
|
2845
|
-
{ ...
|
2846
|
-
{ ...
|
2920
|
+
...Object.values(paths16),
|
2921
|
+
{ ...texts17.top1, anchor: "middle_left" },
|
2922
|
+
{ ...texts17.bottom1, anchor: "middle_right" }
|
2847
2923
|
],
|
2848
2924
|
ports: [
|
2849
2925
|
{
|
2850
|
-
...
|
2926
|
+
...refblocks16.left1,
|
2851
2927
|
labels: ["1", "-"]
|
2852
2928
|
},
|
2853
2929
|
{
|
2854
|
-
...
|
2930
|
+
...refblocks16.right1,
|
2855
2931
|
labels: ["2", "+"]
|
2856
2932
|
}
|
2857
2933
|
],
|
2858
|
-
size: { width:
|
2934
|
+
size: { width: bounds16.width, height: bounds16.height },
|
2859
2935
|
//{ width: 1, height: 0.24 },
|
2860
|
-
center: { x:
|
2936
|
+
center: { x: bounds16.centerX, y: bounds16.centerY }
|
2861
2937
|
});
|
2862
2938
|
|
2863
2939
|
// symbols/varistor_vert.ts
|
@@ -2963,10 +3039,10 @@ var volt_meter_default = {
|
|
2963
3039
|
};
|
2964
3040
|
|
2965
3041
|
// symbols/volt_meter_horz.ts
|
2966
|
-
var { paths:
|
3042
|
+
var { paths: paths17, texts: texts18, bounds: bounds17, circles: circles6, refblocks: refblocks17 } = volt_meter_default;
|
2967
3043
|
var volt_meter_horz_default = defineSymbol({
|
2968
3044
|
primitives: [
|
2969
|
-
...Object.values(
|
3045
|
+
...Object.values(paths17),
|
2970
3046
|
...Object.values(circles6),
|
2971
3047
|
{
|
2972
3048
|
type: "text",
|
@@ -2984,13 +3060,13 @@ var volt_meter_horz_default = defineSymbol({
|
|
2984
3060
|
}
|
2985
3061
|
],
|
2986
3062
|
ports: [
|
2987
|
-
{ ...
|
3063
|
+
{ ...refblocks17.left1, labels: ["1"] },
|
2988
3064
|
// TODO add more "standard" labels
|
2989
|
-
{ ...
|
3065
|
+
{ ...refblocks17.right1, labels: ["2"] }
|
2990
3066
|
// TODO add more "standard" labels
|
2991
3067
|
],
|
2992
|
-
size: { width:
|
2993
|
-
center: { x:
|
3068
|
+
size: { width: bounds17.width, height: bounds17.height },
|
3069
|
+
center: { x: bounds17.centerX, y: bounds17.centerY }
|
2994
3070
|
});
|
2995
3071
|
|
2996
3072
|
// symbols/volt_meter_vert.ts
|
@@ -3143,22 +3219,22 @@ var zener_diode_default = {
|
|
3143
3219
|
};
|
3144
3220
|
|
3145
3221
|
// symbols/zener_diode_horz.ts
|
3146
|
-
var { paths:
|
3222
|
+
var { paths: paths18, texts: texts19, bounds: bounds18, refblocks: refblocks18, circles: circles7 } = zener_diode_default;
|
3147
3223
|
var zener_diode_horz_default = defineSymbol({
|
3148
3224
|
primitives: [
|
3149
|
-
...Object.values(
|
3225
|
+
...Object.values(paths18),
|
3150
3226
|
...Object.values(circles7),
|
3151
|
-
{ ...
|
3152
|
-
{ ...
|
3227
|
+
{ ...texts19.top1, anchor: "middle_bottom" },
|
3228
|
+
{ ...texts19.bottom1, anchor: "middle_top" }
|
3153
3229
|
],
|
3154
3230
|
ports: [
|
3155
|
-
{ ...
|
3231
|
+
{ ...refblocks18.left1, labels: ["1"] },
|
3156
3232
|
// TODO add more "standard" labels
|
3157
|
-
{ ...
|
3233
|
+
{ ...refblocks18.right1, labels: ["2"] }
|
3158
3234
|
// TODO add more "standard" labels
|
3159
3235
|
],
|
3160
|
-
size: { width:
|
3161
|
-
center: { x:
|
3236
|
+
size: { width: bounds18.width, height: bounds18.height },
|
3237
|
+
center: { x: bounds18.centerX, y: bounds18.centerY }
|
3162
3238
|
});
|
3163
3239
|
|
3164
3240
|
// symbols/zener_diode_vert.ts
|
@@ -3238,7 +3314,7 @@ function createDiamondElement(center, size = 0.05) {
|
|
3238
3314
|
return `<path d="M ${x} ${y - halfSize} L ${x + halfSize} ${y} L ${x} ${y + halfSize} L ${x - halfSize} ${y} Z" fill="green" />`;
|
3239
3315
|
}
|
3240
3316
|
function createTextElement(primitive) {
|
3241
|
-
const { x, y, text
|
3317
|
+
const { x, y, text, fontSize = 0.1, anchor } = primitive;
|
3242
3318
|
let textAnchor;
|
3243
3319
|
const dx = 0;
|
3244
3320
|
let dy = 0;
|
@@ -3279,7 +3355,7 @@ function createTextElement(primitive) {
|
|
3279
3355
|
break;
|
3280
3356
|
}
|
3281
3357
|
return {
|
3282
|
-
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>`,
|
3283
3359
|
anchor: `<rect x="${x - 0.025 / 2}" y="${y - 0.025 / 2}" width="0.025" height="0.025" fill="blue" />`
|
3284
3360
|
};
|
3285
3361
|
}
|