schematic-symbols 0.0.15 → 0.0.17

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 CHANGED
@@ -1,7 +1,19 @@
1
+ // drawing/path.ts
2
+ function path(options) {
3
+ return { type: "path", ...options };
4
+ }
5
+
6
+ // drawing/text.ts
7
+ function text(text2, options) {
8
+ return { type: "text", text: text2, ...options };
9
+ }
10
+
11
+ // drawing/defineSymbol.ts
12
+ function defineSymbol(symbol) {
13
+ return symbol;
14
+ }
15
+
1
16
  // symbols/boxresistor_horz.ts
2
- import { path } from "drawing/path";
3
- import { text } from "drawing/text";
4
- import { defineSymbol } from "drawing/defineSymbol";
5
17
  var boxresistor_horz_default = defineSymbol({
6
18
  primitives: [
7
19
  path({
@@ -34,15 +46,220 @@ var boxresistor_horz_default = defineSymbol({
34
46
  size: { width: 1, height: 0.55 }
35
47
  });
36
48
 
49
+ // drawing/rotateSymbol.ts
50
+ import { rotate, applyToPoint } from "transformation-matrix";
51
+ var rotateAnchor = (anchor) => {
52
+ switch (anchor) {
53
+ case "middle_top":
54
+ return "middle_right";
55
+ case "middle_bottom":
56
+ return "middle_left";
57
+ }
58
+ return anchor;
59
+ };
60
+ var rotateSymbol = (symbol, overrides) => {
61
+ const transform = rotate(Math.PI / 2, symbol.center.x, symbol.center.y);
62
+ const { primitives, center, size, ports } = symbol;
63
+ const rotatedPrimitives = primitives.map((primitive) => {
64
+ primitive = { ...primitive };
65
+ switch (primitive.type) {
66
+ case "path":
67
+ return {
68
+ ...primitive,
69
+ points: primitive.points.map(
70
+ (point) => applyToPoint(transform, point)
71
+ )
72
+ };
73
+ case "text":
74
+ const rotatedPoint = applyToPoint(transform, {
75
+ x: primitive.x,
76
+ y: primitive.y
77
+ });
78
+ primitive.anchor = rotateAnchor(primitive.anchor);
79
+ return {
80
+ ...primitive,
81
+ x: rotatedPoint.x,
82
+ y: rotatedPoint.y
83
+ };
84
+ case "circle":
85
+ const rotatedCenter = applyToPoint(transform, {
86
+ x: primitive.x,
87
+ y: primitive.y
88
+ });
89
+ return {
90
+ ...primitive,
91
+ x: rotatedCenter.x,
92
+ y: rotatedCenter.y
93
+ };
94
+ case "box":
95
+ const rotatedCorner = applyToPoint(transform, {
96
+ x: primitive.x,
97
+ y: primitive.y
98
+ });
99
+ return {
100
+ ...primitive,
101
+ x: rotatedCorner.x,
102
+ y: rotatedCorner.y,
103
+ width: primitive.height,
104
+ height: primitive.width
105
+ };
106
+ }
107
+ });
108
+ const rotatedPorts = ports.map(
109
+ (port) => ({
110
+ ...port,
111
+ ...applyToPoint(transform, port)
112
+ })
113
+ );
114
+ return {
115
+ primitives: rotatedPrimitives,
116
+ center,
117
+ ports: rotatedPorts,
118
+ // TODO recompute size using overrides
119
+ size: {
120
+ width: size.height,
121
+ height: size.width
122
+ },
123
+ ...overrides
124
+ };
125
+ };
126
+
37
127
  // symbols/boxresistor_vert.ts
38
- import { rotateSymbol } from "drawing/rotateSymbol";
39
128
  var boxresistor_vert_default = rotateSymbol(boxresistor_horz_default);
40
129
 
130
+ // assets/symbols-svg-json/diode.json
131
+ var diode_default = {
132
+ paths: {
133
+ path40: {
134
+ type: "path",
135
+ points: [
136
+ {
137
+ x: 0.1413337499999998,
138
+ y: 0
139
+ },
140
+ {
141
+ x: -0.12324954999999971,
142
+ y: 0.13229169999999968
143
+ }
144
+ ],
145
+ color: "primary",
146
+ fill: false
147
+ },
148
+ path41: {
149
+ type: "path",
150
+ points: [
151
+ {
152
+ x: -0.12324954999999971,
153
+ y: -0.13229170000000323
154
+ },
155
+ {
156
+ x: 0.1413337499999998,
157
+ y: 0
158
+ }
159
+ ],
160
+ color: "primary",
161
+ fill: false
162
+ },
163
+ path42: {
164
+ type: "path",
165
+ points: [
166
+ {
167
+ x: -0.12324954999999971,
168
+ y: 0.13229169999999613
169
+ },
170
+ {
171
+ x: -0.12324954999999971,
172
+ y: -0.13229170000000323
173
+ }
174
+ ],
175
+ color: "primary",
176
+ fill: false
177
+ },
178
+ path43: {
179
+ type: "path",
180
+ points: [
181
+ {
182
+ x: 0.1413337499999998,
183
+ y: -0.13229170000000323
184
+ },
185
+ {
186
+ x: 0.1413337499999998,
187
+ y: 0.13229169999999613
188
+ }
189
+ ],
190
+ color: "primary",
191
+ fill: false
192
+ },
193
+ path44: {
194
+ type: "path",
195
+ points: [
196
+ {
197
+ x: -0.12545424999999977,
198
+ y: 0
199
+ },
200
+ {
201
+ x: -0.5201245499999998,
202
+ y: 0
203
+ }
204
+ ],
205
+ color: "primary",
206
+ fill: false
207
+ },
208
+ "path44-0": {
209
+ type: "path",
210
+ points: [
211
+ {
212
+ x: 0.5201245499999998,
213
+ y: 8519999999734296e-20
214
+ },
215
+ {
216
+ x: 0.1464164499999998,
217
+ y: 8519999999734296e-20
218
+ }
219
+ ],
220
+ color: "primary",
221
+ fill: false
222
+ }
223
+ },
224
+ texts: {
225
+ top1: {
226
+ type: "text",
227
+ text: "{REF}",
228
+ x: -0.008280249999999878,
229
+ y: -0.22980899999999949
230
+ },
231
+ bottom1: {
232
+ type: "text",
233
+ text: "{VAL}",
234
+ x: -0.0033669500000002017,
235
+ y: 0.31788159999999976
236
+ }
237
+ },
238
+ refblocks: {
239
+ left1: {
240
+ x: -0.5224022500000003,
241
+ y: -8844000000003405e-19
242
+ },
243
+ right1: {
244
+ x: 0.5158919499999999,
245
+ y: 14019999999703714e-20
246
+ }
247
+ },
248
+ bounds: {
249
+ minX: -0.5201245499999998,
250
+ maxX: 0.5201245499999998,
251
+ minY: -0.13229170000000323,
252
+ maxY: 0.13229169999999968,
253
+ width: 1.0402490999999996,
254
+ height: 0.2645834000000029,
255
+ centerX: 0,
256
+ centerY: -17763568394002505e-31
257
+ }
258
+ };
259
+
41
260
  // symbols/diode_horz.ts
42
- import { defineSymbol as defineSymbol2 } from "drawing/defineSymbol";
43
- import svgJson from "assets/symbols-svg-json/diode.json";
44
- var { paths, texts, bounds, refblocks } = svgJson;
45
- var diode_horz_default = defineSymbol2({
261
+ var { paths, texts, bounds, refblocks } = diode_default;
262
+ var diode_horz_default = defineSymbol({
46
263
  primitives: [
47
264
  ...Object.values(paths),
48
265
  { ...texts.top1, anchor: "middle_left" },
@@ -59,14 +276,97 @@ var diode_horz_default = defineSymbol2({
59
276
  });
60
277
 
61
278
  // symbols/diode_vert.ts
62
- import { rotateSymbol as rotateSymbol2 } from "drawing/rotateSymbol";
63
- var diode_vert_default = rotateSymbol2(diode_horz_default);
279
+ var diode_vert_default = rotateSymbol(diode_horz_default);
280
+
281
+ // assets/symbols-svg-json/fuse.json
282
+ var fuse_default = {
283
+ paths: {
284
+ path10: {
285
+ type: "path",
286
+ points: [
287
+ {
288
+ x: -0.529167000000001,
289
+ y: 0
290
+ },
291
+ {
292
+ x: 0.5291669999999993,
293
+ y: 0
294
+ }
295
+ ],
296
+ color: "primary",
297
+ fill: false
298
+ },
299
+ path14: {
300
+ type: "path",
301
+ points: [
302
+ {
303
+ x: 1999999998503199e-21,
304
+ y: -0.13229169999999968
305
+ },
306
+ {
307
+ x: 0.2645849999999985,
308
+ y: -0.13229169999999968
309
+ },
310
+ {
311
+ x: 0.2645849999999985,
312
+ y: 0.13229169999999968
313
+ },
314
+ {
315
+ x: -0.26458200000000076,
316
+ y: 0.13229169999999968
317
+ },
318
+ {
319
+ x: -0.26458200000000076,
320
+ y: -0.13229169999999968
321
+ },
322
+ {
323
+ x: 1999999998503199e-21,
324
+ y: -0.13229169999999968
325
+ }
326
+ ],
327
+ color: "primary",
328
+ fill: false
329
+ }
330
+ },
331
+ texts: {
332
+ top1: {
333
+ type: "text",
334
+ text: "{REF}",
335
+ x: -0.00912720000000089,
336
+ y: -0.1995035999999999
337
+ },
338
+ bottom1: {
339
+ type: "text",
340
+ text: "{VAL}",
341
+ x: -0.17251720000000148,
342
+ y: 0.27233090000000004
343
+ }
344
+ },
345
+ refblocks: {
346
+ left1: {
347
+ x: -0.5354181000000011,
348
+ y: -0.0030468999999992974
349
+ },
350
+ right1: {
351
+ x: 0.5336915999999992,
352
+ y: 0.0011575000000014768
353
+ }
354
+ },
355
+ bounds: {
356
+ minX: -0.529167000000001,
357
+ maxX: 0.5291669999999993,
358
+ minY: -0.13229169999999968,
359
+ maxY: 0.13229169999999968,
360
+ width: 1.0583340000000003,
361
+ height: 0.26458339999999936,
362
+ centerX: -8881784197001252e-31,
363
+ centerY: 0
364
+ }
365
+ };
64
366
 
65
367
  // symbols/fuse_horz.ts
66
- import { defineSymbol as defineSymbol3 } from "drawing/defineSymbol";
67
- import svgJson2 from "assets/symbols-svg-json/fuse.json";
68
- var { paths: paths2, texts: texts2, bounds: bounds2, refblocks: refblocks2 } = svgJson2;
69
- var fuse_horz_default = defineSymbol3({
368
+ var { paths: paths2, texts: texts2, bounds: bounds2, refblocks: refblocks2 } = fuse_default;
369
+ var fuse_horz_default = defineSymbol({
70
370
  primitives: [
71
371
  ...Object.values(paths2),
72
372
  { ...texts2.top1, anchor: "middle_bottom" },
@@ -89,14 +389,233 @@ var fuse_horz_default = defineSymbol3({
89
389
  });
90
390
 
91
391
  // symbols/fuse_vert.ts
92
- import { rotateSymbol as rotateSymbol3 } from "drawing/rotateSymbol";
93
- var fuse_vert_default = rotateSymbol3(fuse_horz_default);
392
+ var fuse_vert_default = rotateSymbol(fuse_horz_default);
393
+
394
+ // assets/symbols-svg-json/led.json
395
+ var led_default = {
396
+ paths: {
397
+ path45: {
398
+ type: "path",
399
+ points: [
400
+ {
401
+ x: 0.13537969999999966,
402
+ y: 0.09743664999999524
403
+ },
404
+ {
405
+ x: -0.1292036000000003,
406
+ y: 0.22972834999999847
407
+ }
408
+ ],
409
+ color: "primary",
410
+ fill: false
411
+ },
412
+ "path1-8": {
413
+ type: "path",
414
+ points: [
415
+ {
416
+ x: 0.12715889999999996,
417
+ y: 0.09766044999999579
418
+ },
419
+ {
420
+ x: 0.5260786,
421
+ y: 0.09766044999999579
422
+ }
423
+ ],
424
+ color: "primary",
425
+ fill: false
426
+ },
427
+ path46: {
428
+ type: "path",
429
+ points: [
430
+ {
431
+ x: -0.1292036000000003,
432
+ y: -0.03485505000000444
433
+ },
434
+ {
435
+ x: 0.13537969999999966,
436
+ y: 0.09743664999999524
437
+ }
438
+ ],
439
+ color: "primary",
440
+ fill: false
441
+ },
442
+ path47: {
443
+ type: "path",
444
+ points: [
445
+ {
446
+ x: -0.1292036000000003,
447
+ y: 0.22972834999999847
448
+ },
449
+ {
450
+ x: -0.1292036000000003,
451
+ y: -0.03485505000000444
452
+ }
453
+ ],
454
+ color: "primary",
455
+ fill: false
456
+ },
457
+ path48: {
458
+ type: "path",
459
+ points: [
460
+ {
461
+ x: 0.13537969999999966,
462
+ y: -0.03485505000000444
463
+ },
464
+ {
465
+ x: 0.13537969999999966,
466
+ y: 0.22972834999999847
467
+ }
468
+ ],
469
+ color: "primary",
470
+ fill: false
471
+ },
472
+ path49: {
473
+ type: "path",
474
+ points: [
475
+ {
476
+ x: -0.13124740000000035,
477
+ y: 0.09743664999999524
478
+ },
479
+ {
480
+ x: -0.5260786000000004,
481
+ y: 0.09743664999999524
482
+ }
483
+ ],
484
+ color: "primary",
485
+ fill: false
486
+ },
487
+ path25: {
488
+ type: "path",
489
+ points: [
490
+ {
491
+ x: -0.15622170000000057,
492
+ y: -0.19171255000000187
493
+ },
494
+ {
495
+ x: -0.25356400000000034,
496
+ y: -0.20859175000000363
497
+ },
498
+ {
499
+ x: -0.2192612000000005,
500
+ y: -0.11582895000000448
501
+ },
502
+ {
503
+ x: -0.15622170000000057,
504
+ y: -0.19171255000000187
505
+ }
506
+ ],
507
+ color: "primary",
508
+ fill: true
509
+ },
510
+ path78: {
511
+ type: "path",
512
+ points: [
513
+ {
514
+ x: -0.08048230000000034,
515
+ y: -0.07216775000000197
516
+ },
517
+ {
518
+ x: -0.09250580000000008,
519
+ y: -0.0811007500000045
520
+ },
521
+ {
522
+ x: -0.21426230000000057,
523
+ y: -0.17155655000000536
524
+ },
525
+ {
526
+ x: -0.21489230000000026,
527
+ y: -0.17250655000000492
528
+ }
529
+ ],
530
+ color: "primary",
531
+ fill: false
532
+ },
533
+ "path25-0": {
534
+ type: "path",
535
+ points: [
536
+ {
537
+ x: 0.021244599999999725,
538
+ y: -0.21284915000000026
539
+ },
540
+ {
541
+ x: -0.07609770000000049,
542
+ y: -0.22972835000000202
543
+ },
544
+ {
545
+ x: -0.04179490000000019,
546
+ y: -0.13696555000000288
547
+ },
548
+ {
549
+ x: 0.021244599999999725,
550
+ y: -0.21284915000000026
551
+ }
552
+ ],
553
+ color: "primary",
554
+ fill: true
555
+ },
556
+ "path78-6": {
557
+ type: "path",
558
+ points: [
559
+ {
560
+ x: 0.09698399999999996,
561
+ y: -0.09330435000000037
562
+ },
563
+ {
564
+ x: 0.08496049999999977,
565
+ y: -0.10223735000000289
566
+ },
567
+ {
568
+ x: -0.03679600000000027,
569
+ y: -0.19269315000000375
570
+ },
571
+ {
572
+ x: -0.0374260000000004,
573
+ y: -0.19364315000000332
574
+ }
575
+ ],
576
+ color: "primary",
577
+ fill: false
578
+ }
579
+ },
580
+ texts: {
581
+ bottom1: {
582
+ type: "text",
583
+ text: "{VAL}",
584
+ x: -0.010039500000000423,
585
+ y: 0.4172088499999944
586
+ },
587
+ right1: {
588
+ type: "text",
589
+ text: "{REF}",
590
+ x: 0.31416289999999947,
591
+ y: -0.13012545000000486
592
+ }
593
+ },
594
+ refblocks: {
595
+ left1: {
596
+ x: -0.5366871000000006,
597
+ y: 0.09817314999999738
598
+ },
599
+ right1: {
600
+ x: 0.5357314999999994,
601
+ y: 0.09862664999999993
602
+ }
603
+ },
604
+ bounds: {
605
+ minX: -0.5260786000000004,
606
+ maxX: 0.5260786,
607
+ minY: -0.22972835000000202,
608
+ maxY: 0.22972834999999847,
609
+ width: 1.0521572000000003,
610
+ height: 0.4594567000000005,
611
+ centerX: -2220446049250313e-31,
612
+ centerY: -17763568394002505e-31
613
+ }
614
+ };
94
615
 
95
616
  // symbols/led_horz.ts
96
- import { defineSymbol as defineSymbol4 } from "drawing/defineSymbol";
97
- import svgJson3 from "assets/symbols-svg-json/led.json";
98
- var { paths: paths3, texts: texts3, bounds: bounds3, refblocks: refblocks3 } = svgJson3;
99
- var led_horz_default = defineSymbol4({
617
+ var { paths: paths3, texts: texts3, bounds: bounds3, refblocks: refblocks3 } = led_default;
618
+ var led_horz_default = defineSymbol({
100
619
  primitives: [
101
620
  ...Object.values(paths3),
102
621
  { ...texts3.bottom1, anchor: "middle_left" },
@@ -111,14 +630,280 @@ var led_horz_default = defineSymbol4({
111
630
  });
112
631
 
113
632
  // symbols/led_vert.ts
114
- import { rotateSymbol as rotateSymbol4 } from "drawing/rotateSymbol";
115
- var led_vert_default = rotateSymbol4(led_horz_default);
633
+ var led_vert_default = rotateSymbol(led_horz_default);
634
+
635
+ // assets/symbols-svg-json/mosfet_depletion_normally_on.json
636
+ var mosfet_depletion_normally_on_default = {
637
+ paths: {
638
+ path208: {
639
+ type: "path",
640
+ points: [
641
+ {
642
+ x: 0.39687494999999995,
643
+ y: -0.13228999999999935
644
+ },
645
+ {
646
+ x: 0.5291666500000005,
647
+ y: 0.13229300000000066
648
+ }
649
+ ],
650
+ color: "primary",
651
+ fill: false
652
+ },
653
+ path209: {
654
+ type: "path",
655
+ points: [
656
+ {
657
+ x: 0.26458325000000027,
658
+ y: 0.13229300000000066
659
+ },
660
+ {
661
+ x: 0.39687494999999995,
662
+ y: -0.13228999999999935
663
+ }
664
+ ],
665
+ color: "primary",
666
+ fill: false
667
+ },
668
+ path210: {
669
+ type: "path",
670
+ points: [
671
+ {
672
+ x: 0.5291666500000005,
673
+ y: 0.13229300000000066
674
+ },
675
+ {
676
+ x: 0.26458325000000027,
677
+ y: 0.13229300000000066
678
+ }
679
+ ],
680
+ color: "primary",
681
+ fill: false
682
+ },
683
+ path211: {
684
+ type: "path",
685
+ points: [
686
+ {
687
+ x: 0.26458325000000027,
688
+ y: -0.13228999999999935
689
+ },
690
+ {
691
+ x: 0.5291666500000005,
692
+ y: -0.13228999999999935
693
+ }
694
+ ],
695
+ color: "primary",
696
+ fill: false
697
+ },
698
+ path212: {
699
+ type: "path",
700
+ points: [
701
+ {
702
+ x: 0.13229165000000087,
703
+ y: 0.39687499999999964
704
+ },
705
+ {
706
+ x: 0.39687494999999995,
707
+ y: 0.39687499999999964
708
+ }
709
+ ],
710
+ color: "primary",
711
+ fill: false
712
+ },
713
+ path213: {
714
+ type: "path",
715
+ points: [
716
+ {
717
+ x: 0.39687494999999995,
718
+ y: -0.3968740000000004
719
+ },
720
+ {
721
+ x: 0.13229165000000087,
722
+ y: -0.3968740000000004
723
+ }
724
+ ],
725
+ color: "primary",
726
+ fill: false
727
+ },
728
+ path214: {
729
+ type: "path",
730
+ points: [
731
+ {
732
+ x: 0.13229165000000087,
733
+ y: -0.529166
734
+ },
735
+ {
736
+ x: 0.13229165000000087,
737
+ y: -0.1852090000000004
738
+ }
739
+ ],
740
+ color: "primary",
741
+ fill: false
742
+ },
743
+ path215: {
744
+ type: "path",
745
+ points: [
746
+ {
747
+ x: 0.13229165000000087,
748
+ y: 0.529166
749
+ },
750
+ {
751
+ x: 0.13229165000000087,
752
+ y: -9999999992515995e-22
753
+ }
754
+ ],
755
+ color: "primary",
756
+ fill: false
757
+ },
758
+ path216: {
759
+ type: "path",
760
+ points: [
761
+ {
762
+ x: 0.39687494999999995,
763
+ y: 0.39687563000000026
764
+ },
765
+ {
766
+ x: 0.39687494999999995,
767
+ y: -0.3968746999999997
768
+ }
769
+ ],
770
+ color: "primary",
771
+ fill: false
772
+ },
773
+ path217: {
774
+ type: "path",
775
+ points: [
776
+ {
777
+ x: -0.13229164999999998,
778
+ y: -0.2645850000000003
779
+ },
780
+ {
781
+ x: -0.13229164999999998,
782
+ y: 0.26458099999999973
783
+ }
784
+ ],
785
+ color: "primary",
786
+ fill: false
787
+ },
788
+ path218: {
789
+ type: "path",
790
+ points: [
791
+ {
792
+ x: -0.21166664999999885,
793
+ y: 0.264581999999999
794
+ },
795
+ {
796
+ x: -0.21166664999999885,
797
+ y: -0.26458399999999926
798
+ }
799
+ ],
800
+ color: "primary",
801
+ fill: false
802
+ },
803
+ path219: {
804
+ type: "path",
805
+ points: [
806
+ {
807
+ x: -0.5291666499999996,
808
+ y: 0.26458099999999973
809
+ },
810
+ {
811
+ x: -0.21166664999999885,
812
+ y: 0.264583
813
+ }
814
+ ],
815
+ color: "primary",
816
+ fill: false
817
+ },
818
+ path220: {
819
+ type: "path",
820
+ points: [
821
+ {
822
+ x: -0.13229164999999998,
823
+ y: 0.18520600000000087
824
+ },
825
+ {
826
+ x: 0.13229175000000026,
827
+ y: 0.18520600000000087
828
+ }
829
+ ],
830
+ color: "primary",
831
+ fill: false
832
+ },
833
+ path221: {
834
+ type: "path",
835
+ points: [
836
+ {
837
+ x: -0.13229164999999998,
838
+ y: -0.18520999999999965
839
+ },
840
+ {
841
+ x: 0.13229175000000026,
842
+ y: -0.18520999999999965
843
+ }
844
+ ],
845
+ color: "primary",
846
+ fill: false
847
+ },
848
+ path222: {
849
+ type: "path",
850
+ points: [
851
+ {
852
+ x: -0.05291665000000023,
853
+ y: -9999999992515995e-22
854
+ },
855
+ {
856
+ x: 0.13229165000000087,
857
+ y: -9999999992515995e-22
858
+ }
859
+ ],
860
+ color: "primary",
861
+ fill: false
862
+ }
863
+ },
864
+ texts: {
865
+ right1: {
866
+ type: "text",
867
+ text: "{REF}",
868
+ x: 0.5827374500000007,
869
+ y: -0.20929270999999972
870
+ },
871
+ right2: {
872
+ type: "text",
873
+ text: "{VAL}",
874
+ x: 0.58412285,
875
+ y: -0.021192649999999702
876
+ }
877
+ },
878
+ refblocks: {
879
+ top1: {
880
+ x: 0.13275345000000005,
881
+ y: -0.5440228900000008
882
+ },
883
+ bottom1: {
884
+ x: 0.13239525000000096,
885
+ y: 0.54252477
886
+ },
887
+ left1: {
888
+ x: -0.5308188500000002,
889
+ y: 0.26564980000000027
890
+ }
891
+ },
892
+ bounds: {
893
+ minX: -0.5291666499999996,
894
+ maxX: 0.5291666500000005,
895
+ minY: -0.529166,
896
+ maxY: 0.529166,
897
+ width: 1.0583333000000001,
898
+ height: 1.058332,
899
+ centerX: 4440892098500626e-31,
900
+ centerY: 0
901
+ }
902
+ };
116
903
 
117
904
  // symbols/mosfet_depletion_normally_on_horz.ts
118
- import { defineSymbol as defineSymbol5 } from "drawing/defineSymbol";
119
- import svgJson4 from "assets/symbols-svg-json/mosfet_depletion_normally_on.json";
120
- var { paths: paths4, texts: texts4, bounds: bounds4, refblocks: refblocks4 } = svgJson4;
121
- var mosfet_depletion_normally_on_horz_default = defineSymbol5({
905
+ var { paths: paths4, texts: texts4, bounds: bounds4, refblocks: refblocks4 } = mosfet_depletion_normally_on_default;
906
+ var mosfet_depletion_normally_on_horz_default = defineSymbol({
122
907
  primitives: [
123
908
  ...Object.values(paths4),
124
909
  { ...texts4.right1, anchor: "middle_left" },
@@ -137,8 +922,7 @@ var mosfet_depletion_normally_on_horz_default = defineSymbol5({
137
922
  });
138
923
 
139
924
  // symbols/mosfet_depletion_normally_on_vert.ts
140
- import { rotateSymbol as rotateSymbol5 } from "drawing/rotateSymbol";
141
- var rotated = rotateSymbol5(mosfet_depletion_normally_on_horz_default);
925
+ var rotated = rotateSymbol(mosfet_depletion_normally_on_horz_default);
142
926
  var ref = rotated.primitives.find(
143
927
  (p) => p.type === "text" && p.text === "{REF}"
144
928
  );
@@ -151,11 +935,148 @@ ref.x = val.x;
151
935
  val.y += 0.15;
152
936
  var mosfet_depletion_normally_on_vert_default = rotated;
153
937
 
938
+ // assets/symbols-svg-json/potentiometer.json
939
+ var potentiometer_default = {
940
+ paths: {
941
+ path11: {
942
+ type: "path",
943
+ points: [
944
+ {
945
+ x: -0.5291669499999998,
946
+ y: 0.1434596500000005
947
+ },
948
+ {
949
+ x: -0.26458365000000006,
950
+ y: 0.1434596500000005
951
+ }
952
+ ],
953
+ color: "primary",
954
+ fill: false
955
+ },
956
+ path12: {
957
+ type: "path",
958
+ points: [
959
+ {
960
+ x: 0.26458334999999966,
961
+ y: 0.1434596500000005
962
+ },
963
+ {
964
+ x: 0.52916695,
965
+ y: 0.1434596500000005
966
+ }
967
+ ],
968
+ color: "primary",
969
+ fill: false
970
+ },
971
+ path13: {
972
+ type: "path",
973
+ points: [
974
+ {
975
+ x: 12499999999526779e-22,
976
+ y: 0.011167849999999646
977
+ },
978
+ {
979
+ x: 0.26458424999999997,
980
+ y: 0.011167849999999646
981
+ },
982
+ {
983
+ x: 0.26458424999999997,
984
+ y: 0.2757512500000008
985
+ },
986
+ {
987
+ x: -0.26458274999999976,
988
+ y: 0.2757512500000008
989
+ },
990
+ {
991
+ x: -0.26458274999999976,
992
+ y: 0.011167849999999646
993
+ },
994
+ {
995
+ x: 12500000012849455e-22,
996
+ y: 0.011167849999999646
997
+ }
998
+ ],
999
+ color: "primary",
1000
+ fill: false
1001
+ },
1002
+ path15: {
1003
+ type: "path",
1004
+ points: [
1005
+ {
1006
+ x: 0.06517084999999989,
1007
+ y: -0.10588935
1008
+ },
1009
+ {
1010
+ x: -0.06529785000000032,
1011
+ y: -0.10588935
1012
+ },
1013
+ {
1014
+ x: -6345000000029799e-20,
1015
+ y: 0.00700125000000007
1016
+ },
1017
+ {
1018
+ x: 0.06517084999999989,
1019
+ y: -0.10588935
1020
+ }
1021
+ ],
1022
+ color: "primary",
1023
+ fill: true
1024
+ },
1025
+ path17: {
1026
+ type: "path",
1027
+ points: [
1028
+ {
1029
+ x: 25875000000041837e-20,
1030
+ y: -0.2757512500000008
1031
+ },
1032
+ {
1033
+ x: 25875000000041837e-20,
1034
+ y: -0.060545249999998774
1035
+ }
1036
+ ],
1037
+ color: "primary",
1038
+ fill: false
1039
+ }
1040
+ },
1041
+ texts: {
1042
+ bottom1: {
1043
+ type: "text",
1044
+ text: "{VAL}",
1045
+ x: -0.007583050000000924,
1046
+ y: 0.4315381500000015
1047
+ },
1048
+ right1: {
1049
+ type: "text",
1050
+ text: "{REF}",
1051
+ x: 0.12478014999999942,
1052
+ y: -0.09260654999999929
1053
+ }
1054
+ },
1055
+ refblocks: {
1056
+ left1: {
1057
+ x: -0.5449899500000002,
1058
+ y: 0.14431244999999926
1059
+ },
1060
+ right1: {
1061
+ x: 0.5378069499999998,
1062
+ y: 0.14331605000000103
1063
+ }
1064
+ },
1065
+ bounds: {
1066
+ minX: -0.5291669499999998,
1067
+ maxX: 0.52916695,
1068
+ minY: -0.2757512500000008,
1069
+ maxY: 0.2757512500000008,
1070
+ width: 1.0583338999999998,
1071
+ height: 0.5515025000000016,
1072
+ centerX: 11102230246251565e-32,
1073
+ centerY: 0
1074
+ }
1075
+ };
1076
+
154
1077
  // symbols/potentiometer_horz.ts
155
- import { defineSymbol as defineSymbol6 } from "drawing/defineSymbol";
156
- import svgJson5 from "assets/symbols-svg-json/potentiometer.json";
157
- var { paths: paths5, texts: texts5, bounds: bounds5, refblocks: refblocks5 } = svgJson5;
158
- var potentiometer_horz_default = defineSymbol6({
1078
+ var { paths: paths5, texts: texts5, bounds: bounds5, refblocks: refblocks5 } = potentiometer_default;
1079
+ var potentiometer_horz_default = defineSymbol({
159
1080
  primitives: [
160
1081
  ...Object.values(paths5),
161
1082
  { ...texts5.bottom1, y: 0.35, anchor: "middle_top" },
@@ -172,15 +1093,174 @@ var potentiometer_horz_default = defineSymbol6({
172
1093
  });
173
1094
 
174
1095
  // symbols/potentiometer_vert.ts
175
- import { rotateSymbol as rotateSymbol6 } from "drawing/rotateSymbol";
176
- var rotated2 = rotateSymbol6(potentiometer_horz_default);
1096
+ var rotated2 = rotateSymbol(potentiometer_horz_default);
177
1097
  var potentiometer_vert_default = rotated2;
178
1098
 
1099
+ // assets/symbols-svg-json/potentiometer2.json
1100
+ var potentiometer2_default = {
1101
+ paths: {
1102
+ path18: {
1103
+ type: "path",
1104
+ points: [
1105
+ {
1106
+ x: -0.5291669499999998,
1107
+ y: 8545000000008685e-19
1108
+ },
1109
+ {
1110
+ x: -0.26458365000000006,
1111
+ y: 8545000000008685e-19
1112
+ }
1113
+ ],
1114
+ color: "primary",
1115
+ fill: false
1116
+ },
1117
+ path19: {
1118
+ type: "path",
1119
+ points: [
1120
+ {
1121
+ x: 0.26458334999999966,
1122
+ y: 8545000000008685e-19
1123
+ },
1124
+ {
1125
+ x: 0.5291669499999996,
1126
+ y: 8545000000008685e-19
1127
+ }
1128
+ ],
1129
+ color: "primary",
1130
+ fill: false
1131
+ },
1132
+ path20: {
1133
+ type: "path",
1134
+ points: [
1135
+ {
1136
+ x: 12499999995085886e-22,
1137
+ y: -0.1314371999999988
1138
+ },
1139
+ {
1140
+ x: 0.26458424999999997,
1141
+ y: -0.1314371999999988
1142
+ },
1143
+ {
1144
+ x: 0.26458424999999997,
1145
+ y: 0.13314619999999877
1146
+ },
1147
+ {
1148
+ x: -0.26458274999999976,
1149
+ y: 0.13314619999999877
1150
+ },
1151
+ {
1152
+ x: -0.26458274999999976,
1153
+ y: -0.1314371999999988
1154
+ },
1155
+ {
1156
+ x: 12500000012849455e-22,
1157
+ y: -0.1314371999999988
1158
+ }
1159
+ ],
1160
+ color: "primary",
1161
+ fill: false
1162
+ },
1163
+ path23: {
1164
+ type: "path",
1165
+ points: [
1166
+ {
1167
+ x: 0.28137284999999945,
1168
+ y: 0.2822274
1169
+ },
1170
+ {
1171
+ x: 0.17906194999999903,
1172
+ y: 0.25486950000000164
1173
+ },
1174
+ {
1175
+ x: 0.2540149499999984,
1176
+ y: 0.1799165000000027
1177
+ },
1178
+ {
1179
+ x: 0.28137284999999945,
1180
+ y: 0.2822274
1181
+ }
1182
+ ],
1183
+ color: "primary",
1184
+ fill: true
1185
+ },
1186
+ path24: {
1187
+ type: "path",
1188
+ points: [
1189
+ {
1190
+ x: 0.29134274999999965,
1191
+ y: 0.2921307000000013
1192
+ },
1193
+ {
1194
+ x: 0.2577490499999997,
1195
+ y: 0.16634940000000142
1196
+ },
1197
+ {
1198
+ x: 0.16536614999999966,
1199
+ y: 0.25853690000000284
1200
+ },
1201
+ {
1202
+ x: 0.29134274999999965,
1203
+ y: 0.2921307000000013
1204
+ }
1205
+ ],
1206
+ color: "primary",
1207
+ fill: true
1208
+ },
1209
+ path26: {
1210
+ type: "path",
1211
+ points: [
1212
+ {
1213
+ x: -0.29551765000000074,
1214
+ y: -0.2921307000000013
1215
+ },
1216
+ {
1217
+ x: 0.23295514999999956,
1218
+ y: 0.2328032000000011
1219
+ }
1220
+ ],
1221
+ color: "primary",
1222
+ fill: false
1223
+ }
1224
+ },
1225
+ texts: {
1226
+ top1: {
1227
+ type: "text",
1228
+ text: "{REF}",
1229
+ x: 0.05811516999999933,
1230
+ y: -0.2009376800000009
1231
+ },
1232
+ bottom1: {
1233
+ type: "text",
1234
+ text: "{VAL}",
1235
+ x: -0.09712293000000072,
1236
+ y: 0.27857531999999985
1237
+ }
1238
+ },
1239
+ refblocks: {
1240
+ left1: {
1241
+ x: -0.5316179500000004,
1242
+ y: 0.0013439000000019519
1243
+ },
1244
+ right1: {
1245
+ x: 0.5377649500000006,
1246
+ y: 0.001956599999999753
1247
+ }
1248
+ },
1249
+ bounds: {
1250
+ minX: -0.5291669499999998,
1251
+ maxX: 0.5291669499999996,
1252
+ minY: -0.2921307000000013,
1253
+ maxY: 0.2921307000000013,
1254
+ width: 1.0583338999999994,
1255
+ height: 0.5842614000000026,
1256
+ centerX: -11102230246251565e-32,
1257
+ centerY: 0
1258
+ }
1259
+ };
1260
+
179
1261
  // symbols/potentiometer2_horz.ts
180
- import { defineSymbol as defineSymbol7 } from "drawing/defineSymbol";
181
- import svgJson6 from "assets/symbols-svg-json/potentiometer2.json";
182
- var { paths: paths6, texts: texts6, bounds: bounds6, refblocks: refblocks6 } = svgJson6;
183
- var potentiometer2_horz_default = defineSymbol7({
1262
+ var { paths: paths6, texts: texts6, bounds: bounds6, refblocks: refblocks6 } = potentiometer2_default;
1263
+ var potentiometer2_horz_default = defineSymbol({
184
1264
  primitives: [...Object.values(paths6), ...Object.values(texts6)],
185
1265
  ports: [
186
1266
  { ...refblocks6.left1, labels: ["1"] },
@@ -193,14 +1273,142 @@ var potentiometer2_horz_default = defineSymbol7({
193
1273
  });
194
1274
 
195
1275
  // symbols/potentiometer2_vert.ts
196
- import { rotateSymbol as rotateSymbol7 } from "drawing/rotateSymbol";
197
- var potentiometer2_vert_default = rotateSymbol7(potentiometer2_horz_default);
1276
+ var potentiometer2_vert_default = rotateSymbol(potentiometer2_horz_default);
1277
+
1278
+ // assets/symbols-svg-json/varistor.json
1279
+ var varistor_default = {
1280
+ paths: {
1281
+ path5: {
1282
+ type: "path",
1283
+ points: [
1284
+ {
1285
+ x: -0.5291668,
1286
+ y: 0
1287
+ },
1288
+ {
1289
+ x: -0.2645835000000005,
1290
+ y: 0
1291
+ }
1292
+ ],
1293
+ color: "primary",
1294
+ fill: false
1295
+ },
1296
+ path6: {
1297
+ type: "path",
1298
+ points: [
1299
+ {
1300
+ x: 0.2645835000000005,
1301
+ y: 0
1302
+ },
1303
+ {
1304
+ x: 0.5291668,
1305
+ y: 0
1306
+ }
1307
+ ],
1308
+ color: "primary",
1309
+ fill: false
1310
+ },
1311
+ path7: {
1312
+ type: "path",
1313
+ points: [
1314
+ {
1315
+ x: 0.2645835000000005,
1316
+ y: 0.23812500000000192
1317
+ },
1318
+ {
1319
+ x: -0.2645834999999992,
1320
+ y: -0.23812500000000014
1321
+ }
1322
+ ],
1323
+ color: "primary",
1324
+ fill: false
1325
+ },
1326
+ path8: {
1327
+ type: "path",
1328
+ points: [
1329
+ {
1330
+ x: 0.3704165000000006,
1331
+ y: 0.23812500000000192
1332
+ },
1333
+ {
1334
+ x: 0.2645835000000005,
1335
+ y: 0.23812500000000192
1336
+ }
1337
+ ],
1338
+ color: "primary",
1339
+ fill: false
1340
+ },
1341
+ path9: {
1342
+ type: "path",
1343
+ points: [
1344
+ {
1345
+ x: 1400000000817414e-21,
1346
+ y: -0.13229179999999907
1347
+ },
1348
+ {
1349
+ x: 0.2645844000000013,
1350
+ y: -0.13229179999999907
1351
+ },
1352
+ {
1353
+ x: 0.2645844000000013,
1354
+ y: 0.13229160000000206
1355
+ },
1356
+ {
1357
+ x: -0.26458259999999845,
1358
+ y: 0.13229160000000206
1359
+ },
1360
+ {
1361
+ x: -0.26458259999999845,
1362
+ y: -0.13229179999999907
1363
+ },
1364
+ {
1365
+ x: 14000000021496817e-22,
1366
+ y: -0.13229179999999907
1367
+ }
1368
+ ],
1369
+ color: "primary",
1370
+ fill: false
1371
+ }
1372
+ },
1373
+ texts: {
1374
+ top1: {
1375
+ type: "text",
1376
+ text: "{REF}",
1377
+ x: -0.06307419999999953,
1378
+ y: -0.2470063999999983
1379
+ },
1380
+ bottom1: {
1381
+ type: "text",
1382
+ text: "{VAL}",
1383
+ x: 0.0039234000000010205,
1384
+ y: 0.256324600000001
1385
+ }
1386
+ },
1387
+ refblocks: {
1388
+ left1: {
1389
+ x: -0.5438152999999999,
1390
+ y: 0.0016897000000017925
1391
+ },
1392
+ right1: {
1393
+ x: 0.5346478000000006,
1394
+ y: -6806999999984242e-19
1395
+ }
1396
+ },
1397
+ bounds: {
1398
+ minX: -0.5291668,
1399
+ maxX: 0.5291668,
1400
+ minY: -0.23812500000000014,
1401
+ maxY: 0.23812500000000192,
1402
+ width: 1.0583336,
1403
+ height: 0.47625000000000206,
1404
+ centerX: 0,
1405
+ centerY: 8881784197001252e-31
1406
+ }
1407
+ };
198
1408
 
199
1409
  // symbols/varistor_horz.ts
200
- import { defineSymbol as defineSymbol8 } from "drawing/defineSymbol";
201
- import svgJson7 from "assets/symbols-svg-json/varistor.json";
202
- var { paths: paths7, texts: texts7, bounds: bounds7, refblocks: refblocks7 } = svgJson7;
203
- var varistor_horz_default = defineSymbol8({
1410
+ var { paths: paths7, texts: texts7, bounds: bounds7, refblocks: refblocks7 } = varistor_default;
1411
+ var varistor_horz_default = defineSymbol({
204
1412
  primitives: [
205
1413
  ...Object.values(paths7),
206
1414
  { ...texts7.top1, anchor: "middle_left" },
@@ -222,8 +1430,7 @@ var varistor_horz_default = defineSymbol8({
222
1430
  });
223
1431
 
224
1432
  // symbols/varistor_vert.ts
225
- import { rotateSymbol as rotateSymbol8 } from "drawing/rotateSymbol";
226
- var varistor_vert_default = rotateSymbol8(varistor_horz_default, {});
1433
+ var varistor_vert_default = rotateSymbol(varistor_horz_default, {});
227
1434
 
228
1435
  // generated/symbols-index.ts
229
1436
  var symbols_index_default = {
@@ -245,9 +1452,6 @@ var symbols_index_default = {
245
1452
  "varistor_vert": varistor_vert_default
246
1453
  };
247
1454
 
248
- // drawing/svgPathToPoints.ts
249
- import { parseSVG, makeAbsolute } from "svg-path-parser";
250
-
251
1455
  // drawing/pathToSvgD.ts
252
1456
  function pathToSvgD(points, closed = false) {
253
1457
  const pathCommands = points.map((point, index) => `${index === 0 ? "M" : "L"}${point.x},${point.y}`).join(" ");