schematic-symbols 0.0.111 → 0.0.113

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -177,6 +177,14 @@ declare const _default: {
177
177
  njfet_transistor_vert: undefined;
178
178
  npn_bipolar_transistor_horz: undefined;
179
179
  npn_bipolar_transistor_vert: undefined;
180
+ opamp_no_power_down: undefined;
181
+ opamp_no_power_left: undefined;
182
+ opamp_no_power_right: undefined;
183
+ opamp_no_power_up: undefined;
184
+ opamp_with_power_down: undefined;
185
+ opamp_with_power_left: undefined;
186
+ opamp_with_power_right: undefined;
187
+ opamp_with_power_up: undefined;
180
188
  p_channel_d_mosfet_transistor_horz: undefined;
181
189
  p_channel_d_mosfet_transistor_vert: undefined;
182
190
  p_channel_e_mosfet_transistor_horz: undefined;
@@ -269,7 +277,7 @@ declare const _default: {
269
277
  zener_diode_vert: undefined;
270
278
  };
271
279
 
272
- type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "battery" | "boxresistor" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_switch" | "dpst_switch" | "filled_diode" | "frequency_meter" | "fuse" | "ground" | "gunn_diode" | "igbt_transistor" | "illuminated_push_button_normally_open" | "inductor" | "laser_diode" | "led" | "light_dependent_resistor" | "mosfet_depletion_normally_on" | "mushroom_head_normally_open_momentary" | "n_channel_d_mosfet_transistor" | "n_channel_e_mosfet_transistor" | "njfet_transistor" | "npn_bipolar_transistor" | "p_channel_d_mosfet_transistor" | "p_channel_e_mosfet_transistor" | "photodiode" | "pjfet_transistor" | "pnp_bipolar_transistor" | "potentiometer" | "potentiometer2" | "power_factor_meter" | "push_button_normally_closed_momentary" | "push_button_normally_open_momentary" | "rectifier_diode" | "resonator" | "schottky_diode" | "silicon_controlled_rectifier" | "SPDT_switch" | "SPST_switch" | "step_recovery_diode" | "tachometer" | "triac" | "tunnel_diode" | "unijunction_transistor" | "var_meter" | "varactor_diode" | "varistor" | "varmeter" | "volt_meter" | "watt_hour_meter" | "wattmeter" | "zener_diode";
280
+ type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "battery" | "boxresistor" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_switch" | "dpst_switch" | "filled_diode" | "frequency_meter" | "fuse" | "ground" | "gunn_diode" | "igbt_transistor" | "illuminated_push_button_normally_open" | "inductor" | "laser_diode" | "led" | "light_dependent_resistor" | "mosfet_depletion_normally_on" | "mushroom_head_normally_open_momentary" | "n_channel_d_mosfet_transistor" | "n_channel_e_mosfet_transistor" | "njfet_transistor" | "npn_bipolar_transistor" | "opamp_no_power" | "opamp_with_power" | "p_channel_d_mosfet_transistor" | "p_channel_e_mosfet_transistor" | "photodiode" | "pjfet_transistor" | "pnp_bipolar_transistor" | "potentiometer" | "potentiometer2" | "power_factor_meter" | "push_button_normally_closed_momentary" | "push_button_normally_open_momentary" | "rectifier_diode" | "resonator" | "schottky_diode" | "silicon_controlled_rectifier" | "SPDT_switch" | "SPST_switch" | "step_recovery_diode" | "tachometer" | "triac" | "tunnel_diode" | "unijunction_transistor" | "var_meter" | "varactor_diode" | "varistor" | "varmeter" | "volt_meter" | "watt_hour_meter" | "wattmeter" | "zener_diode";
273
281
 
274
282
  /**
275
283
  * Utility for easier autocomplete:
package/dist/index.js CHANGED
@@ -1,6 +1,56 @@
1
+ // drawing/utils/getBoundsOfPrimitives.ts
2
+ function getBoundsOfPrimitives(primitives) {
3
+ if (primitives.length === 0) {
4
+ return { minX: 0, maxX: 0, minY: 0, maxY: 0 };
5
+ }
6
+ let minX = Infinity;
7
+ let maxX = -Infinity;
8
+ let minY = Infinity;
9
+ let maxY = -Infinity;
10
+ const updateBounds = (point) => {
11
+ minX = Math.min(minX, point.x);
12
+ maxX = Math.max(maxX, point.x);
13
+ minY = Math.min(minY, point.y);
14
+ maxY = Math.max(maxY, point.y);
15
+ };
16
+ primitives.forEach((primitive) => {
17
+ switch (primitive.type) {
18
+ case "path":
19
+ primitive.points.forEach(updateBounds);
20
+ break;
21
+ case "text":
22
+ updateBounds({ x: primitive.x, y: primitive.y });
23
+ break;
24
+ case "circle": {
25
+ const { x, y, radius } = primitive;
26
+ updateBounds({ x: x - radius, y: y - radius });
27
+ updateBounds({ x: x + radius, y: y + radius });
28
+ break;
29
+ }
30
+ case "box": {
31
+ const { x, y, width, height } = primitive;
32
+ const halfWidth = width / 2;
33
+ const halfHeight = height / 2;
34
+ updateBounds({ x: x - halfWidth, y: y - halfHeight });
35
+ updateBounds({ x: x + halfWidth, y: y + halfHeight });
36
+ break;
37
+ }
38
+ }
39
+ });
40
+ return { minX, maxX, minY, maxY };
41
+ }
42
+
1
43
  // drawing/defineSymbol.ts
2
44
  function defineSymbol(symbol) {
3
- return symbol;
45
+ let size = symbol.size;
46
+ if (!size) {
47
+ const bounds54 = getBoundsOfPrimitives(symbol.primitives);
48
+ size = {
49
+ width: bounds54.maxX - bounds54.minX,
50
+ height: bounds54.maxY - bounds54.minY
51
+ };
52
+ }
53
+ return { ...symbol, size };
4
54
  }
5
55
 
6
56
  // assets/generated/ac_voltmeter.json
@@ -444,13 +494,14 @@ var rotateRightFacingSymbol = (symbol, opts) => {
444
494
  ...applyToPoint(transform2, port)
445
495
  })
446
496
  );
497
+ const bounds54 = getBoundsOfPrimitives(rotatedPrimitives);
447
498
  return {
448
499
  primitives: rotatedPrimitives,
449
500
  center,
450
501
  ports: rotatedPorts,
451
502
  size: {
452
- width: newOrientation === "up" || newOrientation === "down" ? size.width : size.height,
453
- height: newOrientation === "up" || newOrientation === "down" ? size.height : size.width
503
+ width: bounds54.maxX - bounds54.minX,
504
+ height: bounds54.maxY - bounds54.minY
454
505
  },
455
506
  ...overrides
456
507
  };
@@ -884,6 +935,7 @@ var SymbolModifier = class {
884
935
  symbol;
885
936
  constructor(symbol) {
886
937
  this.symbol = JSON.parse(JSON.stringify(symbol));
938
+ this.symbol.size = this.computeSize();
887
939
  }
888
940
  changeTextAnchor(text, newAnchor) {
889
941
  this.symbol = {
@@ -915,8 +967,15 @@ var SymbolModifier = class {
915
967
  });
916
968
  return this;
917
969
  }
970
+ computeSize() {
971
+ const bounds54 = getBoundsOfPrimitives(this.symbol.primitives);
972
+ return {
973
+ width: bounds54.maxX - bounds54.minX,
974
+ height: bounds54.maxY - bounds54.minY
975
+ };
976
+ }
918
977
  build() {
919
- return this.symbol;
978
+ return { ...this.symbol, size: this.computeSize() };
920
979
  }
921
980
  };
922
981
  var modifySymbol = (symbol) => {
@@ -934,10 +993,6 @@ var modifySymbol = (symbol) => {
934
993
  center: symbol.center ?? {
935
994
  x: symbol.bounds.centerX,
936
995
  y: symbol.bounds.centerY
937
- },
938
- size: symbol.size ?? {
939
- width: symbol.bounds.width,
940
- height: symbol.bounds.height
941
996
  }
942
997
  });
943
998
  };
@@ -967,7 +1022,6 @@ var boxresistor_down_default = modifySymbol({
967
1022
  { ...refblocks4.right1, labels: ["2"] }
968
1023
  // TODO add more "standard" labels
969
1024
  ],
970
- size: { width: bounds4.width, height: bounds4.height },
971
1025
  center: { x: bounds4.centerX, y: bounds4.centerY }
972
1026
  }).changeTextAnchor("{VAL}", "middle_bottom").rotateRightFacingSymbol("down").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_left").build();
973
1027
 
@@ -996,7 +1050,6 @@ var boxresistor_left_default = modifySymbol({
996
1050
  { ...refblocks5.right1, labels: ["2"] }
997
1051
  // TODO add more "standard" labels
998
1052
  ],
999
- size: { width: bounds5.width, height: bounds5.height },
1000
1053
  center: { x: bounds5.centerX, y: bounds5.centerY }
1001
1054
  }).changeTextAnchor("{VAL}", "middle_top").rotateRightFacingSymbol("right").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_bottom").build();
1002
1055
 
@@ -1025,7 +1078,6 @@ var boxresistor_right_default = modifySymbol({
1025
1078
  { ...refblocks6.right1, labels: ["2"] }
1026
1079
  // TODO add more "standard" labels
1027
1080
  ],
1028
- size: { width: bounds6.width, height: bounds6.height },
1029
1081
  center: { x: bounds6.centerX, y: bounds6.centerY }
1030
1082
  }).changeTextAnchor("{VAL}", "middle_top").rotateRightFacingSymbol("right").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_bottom").build();
1031
1083
 
@@ -1054,7 +1106,6 @@ var boxresistor_up_default = modifySymbol({
1054
1106
  { ...refblocks7.right1, labels: ["2"] }
1055
1107
  // TODO add more "standard" labels
1056
1108
  ],
1057
- size: { width: bounds7.width, height: bounds7.height },
1058
1109
  center: { x: bounds7.centerX, y: bounds7.centerY }
1059
1110
  }).changeTextAnchor("{VAL}", "middle_bottom").rotateRightFacingSymbol("down").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_left").build();
1060
1111
 
@@ -10018,6 +10069,428 @@ var ref13 = texts36.find((t) => t.text === "{REF}");
10018
10069
  ref13.anchor = "middle_left";
10019
10070
  var npn_bipolar_transistor_vert_default = modifySymbol(npn_bipolar_transistor_default).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}", "middle_right").labelPort("left1", ["3"]).labelPort("top1", ["2"]).labelPort("bottom1", ["1"]).changeTextAnchor("{REF}", "middle_left").build();
10020
10071
 
10072
+ // assets/generated/opamp_no_power.json
10073
+ var opamp_no_power_default = {
10074
+ paths: {
10075
+ path40: {
10076
+ type: "path",
10077
+ points: [
10078
+ {
10079
+ x: 0.14458890000000002,
10080
+ y: 0.0390362999999998
10081
+ },
10082
+ {
10083
+ x: -0.3199943999999995,
10084
+ y: -0.21132800000000015
10085
+ }
10086
+ ],
10087
+ color: "primary",
10088
+ fill: false
10089
+ },
10090
+ path41: {
10091
+ type: "path",
10092
+ points: [
10093
+ {
10094
+ x: -0.3199943999999995,
10095
+ y: 0.31132800000000016
10096
+ },
10097
+ {
10098
+ x: 0.14458890000000002,
10099
+ y: 0.0390362999999998
10100
+ }
10101
+ ],
10102
+ color: "primary",
10103
+ fill: false
10104
+ },
10105
+ path42: {
10106
+ type: "path",
10107
+ points: [
10108
+ {
10109
+ x: -0.3199943999999995,
10110
+ y: -0.21132800000000015
10111
+ },
10112
+ {
10113
+ x: -0.3199943999999995,
10114
+ y: 0.31132800000000016
10115
+ }
10116
+ ],
10117
+ color: "primary",
10118
+ fill: false
10119
+ },
10120
+ path44: {
10121
+ type: "path",
10122
+ points: [
10123
+ {
10124
+ x: -0.3199943999999995,
10125
+ y: 0.1790362999999998
10126
+ },
10127
+ {
10128
+ x: -0.58168694,
10129
+ y: 0.1790362999999998
10130
+ }
10131
+ ],
10132
+ color: "primary",
10133
+ fill: false
10134
+ },
10135
+ path45: {
10136
+ type: "path",
10137
+ points: [
10138
+ {
10139
+ x: -0.3199943999999995,
10140
+ y: -0.0890362999999998
10141
+ },
10142
+ {
10143
+ x: -0.58168694,
10144
+ y: -0.0890362999999998
10145
+ }
10146
+ ],
10147
+ color: "primary",
10148
+ fill: false
10149
+ },
10150
+ "path44-0": {
10151
+ type: "path",
10152
+ points: [
10153
+ {
10154
+ x: 0.4233797000000002,
10155
+ y: 0.03895110000000024
10156
+ },
10157
+ {
10158
+ x: 0.1496715999999998,
10159
+ y: 0.03895110000000024
10160
+ }
10161
+ ],
10162
+ color: "primary",
10163
+ fill: false
10164
+ },
10165
+ "rect1577-3": {
10166
+ type: "path",
10167
+ points: [
10168
+ {
10169
+ x: -0.19898460000000012,
10170
+ y: 0.1790362999999998
10171
+ },
10172
+ {
10173
+ x: -0.26995180000000035,
10174
+ y: 0.1790362999999998
10175
+ }
10176
+ ],
10177
+ color: "primary",
10178
+ fill: true
10179
+ },
10180
+ "rect1577-4": {
10181
+ type: "path",
10182
+ points: [
10183
+ {
10184
+ x: -0.19898460000000012,
10185
+ y: -0.0890362999999998
10186
+ },
10187
+ {
10188
+ x: -0.26995180000000035,
10189
+ y: -0.0890362999999998
10190
+ }
10191
+ ],
10192
+ color: "primary",
10193
+ fill: true
10194
+ },
10195
+ "rect1577-4-7": {
10196
+ type: "path",
10197
+ points: [
10198
+ {
10199
+ x: -0.23480170000000036,
10200
+ y: -0.05337805000000034
10201
+ },
10202
+ {
10203
+ x: -0.23480170000000036,
10204
+ y: -0.12434525000000014
10205
+ }
10206
+ ],
10207
+ color: "primary",
10208
+ fill: true
10209
+ }
10210
+ },
10211
+ texts: {
10212
+ top1: {
10213
+ type: "text",
10214
+ text: "{REF}",
10215
+ x: -0.0050250999999996715,
10216
+ y: 0.4188453
10217
+ },
10218
+ bottom1: {
10219
+ type: "text",
10220
+ text: "{VAL}",
10221
+ x: -11179999999977319e-20,
10222
+ y: -0.29994529999999997
10223
+ }
10224
+ },
10225
+ refblocks: {
10226
+ left1: {
10227
+ x: -0.56868694,
10228
+ y: 0.1790362999999998
10229
+ },
10230
+ left2: {
10231
+ x: -0.56868694,
10232
+ y: -0.0890362999999998
10233
+ },
10234
+ right1: {
10235
+ x: 0.4291470999999999,
10236
+ y: 0.03889609999999988
10237
+ }
10238
+ },
10239
+ bounds: {
10240
+ minX: -0.5473055410000001,
10241
+ maxX: 0.5473055409999998,
10242
+ minY: -0.37884529999999994,
10243
+ maxY: 0.26884529999999995,
10244
+ width: 1.094611082,
10245
+ height: 0.2976905999999999,
10246
+ centerX: -11102230246251565e-32,
10247
+ centerY: 0.05499999999999999
10248
+ },
10249
+ circles: {}
10250
+ };
10251
+
10252
+ // symbols/opamp_no_power_right.ts
10253
+ var opamp_no_power_right_default = modifySymbol(opamp_no_power_default).labelPort("left1", ["1", "inp1"]).labelPort("left2", ["2", "inp2"]).labelPort("right1", ["3", "out"]).changeTextAnchor("{REF}", "middle_bottom").changeTextAnchor("{VAL}", "middle_top").build();
10254
+
10255
+ // symbols/opamp_no_power_down.ts
10256
+ var opamp_no_power_down_default = rotateSymbol(opamp_no_power_right_default, "down");
10257
+
10258
+ // symbols/opamp_no_power_left.ts
10259
+ var opamp_no_power_left_default = rotateSymbol(opamp_no_power_right_default, "left");
10260
+
10261
+ // symbols/opamp_no_power_up.ts
10262
+ var opamp_no_power_up_default = rotateSymbol(opamp_no_power_right_default, "up");
10263
+
10264
+ // assets/generated/opamp_with_power.json
10265
+ var opamp_with_power_default = {
10266
+ paths: {
10267
+ path40: {
10268
+ type: "path",
10269
+ points: [
10270
+ {
10271
+ x: 0.14458890000000002,
10272
+ y: 0.0390362999999998
10273
+ },
10274
+ {
10275
+ x: -0.3199943999999995,
10276
+ y: -0.21132800000000015
10277
+ }
10278
+ ],
10279
+ color: "primary",
10280
+ fill: false
10281
+ },
10282
+ path41: {
10283
+ type: "path",
10284
+ points: [
10285
+ {
10286
+ x: -0.3199943999999995,
10287
+ y: 0.31132800000000016
10288
+ },
10289
+ {
10290
+ x: 0.14458890000000002,
10291
+ y: 0.0390362999999998
10292
+ }
10293
+ ],
10294
+ color: "primary",
10295
+ fill: false
10296
+ },
10297
+ path42: {
10298
+ type: "path",
10299
+ points: [
10300
+ {
10301
+ x: -0.3199943999999995,
10302
+ y: -0.21132800000000015
10303
+ },
10304
+ {
10305
+ x: -0.3199943999999995,
10306
+ y: 0.31132800000000016
10307
+ }
10308
+ ],
10309
+ color: "primary",
10310
+ fill: false
10311
+ },
10312
+ path44: {
10313
+ type: "path",
10314
+ points: [
10315
+ {
10316
+ x: -0.3199943999999995,
10317
+ y: 0.1790362999999998
10318
+ },
10319
+ {
10320
+ x: -0.58168694,
10321
+ y: 0.1790362999999998
10322
+ }
10323
+ ],
10324
+ color: "primary",
10325
+ fill: false
10326
+ },
10327
+ path45: {
10328
+ type: "path",
10329
+ points: [
10330
+ {
10331
+ x: -0.3199943999999995,
10332
+ y: -0.0890362999999998
10333
+ },
10334
+ {
10335
+ x: -0.58168694,
10336
+ y: -0.0890362999999998
10337
+ }
10338
+ ],
10339
+ color: "primary",
10340
+ fill: false
10341
+ },
10342
+ "path44-0": {
10343
+ type: "path",
10344
+ points: [
10345
+ {
10346
+ x: 0.4233797000000002,
10347
+ y: 0.03895110000000024
10348
+ },
10349
+ {
10350
+ x: 0.1496715999999998,
10351
+ y: 0.03895110000000024
10352
+ }
10353
+ ],
10354
+ color: "primary",
10355
+ fill: false
10356
+ },
10357
+ "path44-1": {
10358
+ type: "path",
10359
+ points: [
10360
+ {
10361
+ x: -0.09945180000000035,
10362
+ y: 0.43895110000000026
10363
+ },
10364
+ {
10365
+ x: -0.09945180000000035,
10366
+ y: 0.1790362999999998
10367
+ }
10368
+ ],
10369
+ color: "primary",
10370
+ fill: false
10371
+ },
10372
+ "path44-2": {
10373
+ type: "path",
10374
+ points: [
10375
+ {
10376
+ x: -0.09345180000000035,
10377
+ y: -0.3389511000000002
10378
+ },
10379
+ {
10380
+ x: -0.09345180000000035,
10381
+ y: -0.0890362999999998
10382
+ }
10383
+ ],
10384
+ color: "primary",
10385
+ fill: false
10386
+ },
10387
+ "rect1577-3": {
10388
+ type: "path",
10389
+ points: [
10390
+ {
10391
+ x: -0.19898460000000012,
10392
+ y: 0.1790362999999998
10393
+ },
10394
+ {
10395
+ x: -0.26995180000000035,
10396
+ y: 0.1790362999999998
10397
+ }
10398
+ ],
10399
+ color: "primary",
10400
+ fill: true
10401
+ },
10402
+ "rect1577-4": {
10403
+ type: "path",
10404
+ points: [
10405
+ {
10406
+ x: -0.19898460000000012,
10407
+ y: -0.0890362999999998
10408
+ },
10409
+ {
10410
+ x: -0.26995180000000035,
10411
+ y: -0.0890362999999998
10412
+ }
10413
+ ],
10414
+ color: "primary",
10415
+ fill: true
10416
+ },
10417
+ "rect1577-4-7": {
10418
+ type: "path",
10419
+ points: [
10420
+ {
10421
+ x: -0.23485180000000036,
10422
+ y: 0.14405005000000035
10423
+ },
10424
+ {
10425
+ x: -0.23485180000000036,
10426
+ y: 0.2150405000000014
10427
+ }
10428
+ ],
10429
+ color: "primary",
10430
+ fill: true
10431
+ }
10432
+ },
10433
+ texts: {
10434
+ top1: {
10435
+ type: "text",
10436
+ text: "{REF}",
10437
+ x: 0.2502509999999967,
10438
+ y: 0.31884529999999994
10439
+ },
10440
+ bottom1: {
10441
+ type: "text",
10442
+ text: "{VAL}",
10443
+ x: 0.2502509999999967,
10444
+ y: -0.23599529999999996
10445
+ }
10446
+ },
10447
+ refblocks: {
10448
+ left1: {
10449
+ x: -0.56868694,
10450
+ y: 0.1790362999999998
10451
+ },
10452
+ left2: {
10453
+ x: -0.56868694,
10454
+ y: -0.0890362999999998
10455
+ },
10456
+ right1: {
10457
+ x: 0.4291470999999999,
10458
+ y: 0.03889609999999988
10459
+ },
10460
+ top2: {
10461
+ x: -0.09945180000000035,
10462
+ y: 0.43895110000000026
10463
+ },
10464
+ bottom1: {
10465
+ x: -0.09345180000000035,
10466
+ y: -0.3389511000000002
10467
+ }
10468
+ },
10469
+ bounds: {
10470
+ minX: -0.5473055410000001,
10471
+ maxX: 0.5473055409999998,
10472
+ minY: -0.37884529999999994,
10473
+ maxY: 0.26884529999999995,
10474
+ width: 1.094611082,
10475
+ height: 0.2976905999999999,
10476
+ centerX: -11102230246251565e-32,
10477
+ centerY: 0.05499999999999999
10478
+ },
10479
+ circles: {}
10480
+ };
10481
+
10482
+ // symbols/opamp_with_power_right.ts
10483
+ var opamp_with_power_right_default = modifySymbol(opamp_with_power_default).labelPort("left1", ["1", "inp1"]).labelPort("left2", ["2", "inp2"]).labelPort("right1", ["3", "out"]).labelPort("top2", ["4", "V+"]).labelPort("bottom1", ["5", "V-"]).changeTextAnchor("{REF}", "middle_bottom").changeTextAnchor("{VAL}", "middle_top").build();
10484
+
10485
+ // symbols/opamp_with_power_down.ts
10486
+ var opamp_with_power_down_default = rotateSymbol(opamp_with_power_right_default, "down");
10487
+
10488
+ // symbols/opamp_with_power_left.ts
10489
+ var opamp_with_power_left_default = rotateSymbol(opamp_with_power_right_default, "left");
10490
+
10491
+ // symbols/opamp_with_power_up.ts
10492
+ var opamp_with_power_up_default = rotateSymbol(opamp_with_power_right_default, "up");
10493
+
10021
10494
  // assets/generated/p_channel_d_mosfet_transistor.json
10022
10495
  var p_channel_d_mosfet_transistor_default = {
10023
10496
  paths: {
@@ -15709,6 +16182,14 @@ var symbols_index_default = {
15709
16182
  "njfet_transistor_vert": njfet_transistor_vert_default,
15710
16183
  "npn_bipolar_transistor_horz": npn_bipolar_transistor_horz_default,
15711
16184
  "npn_bipolar_transistor_vert": npn_bipolar_transistor_vert_default,
16185
+ "opamp_no_power_down": opamp_no_power_down_default,
16186
+ "opamp_no_power_left": opamp_no_power_left_default,
16187
+ "opamp_no_power_right": opamp_no_power_right_default,
16188
+ "opamp_no_power_up": opamp_no_power_up_default,
16189
+ "opamp_with_power_down": opamp_with_power_down_default,
16190
+ "opamp_with_power_left": opamp_with_power_left_default,
16191
+ "opamp_with_power_right": opamp_with_power_right_default,
16192
+ "opamp_with_power_up": opamp_with_power_up_default,
15712
16193
  "p_channel_d_mosfet_transistor_horz": p_channel_d_mosfet_transistor_horz_default,
15713
16194
  "p_channel_d_mosfet_transistor_vert": p_channel_d_mosfet_transistor_vert_default,
15714
16195
  "p_channel_e_mosfet_transistor_horz": p_channel_e_mosfet_transistor_horz_default,
@@ -15884,7 +16365,31 @@ function getInnerSvg(symbol, options = {}) {
15884
16365
  });
15885
16366
  const portElements = ports.map((p) => createPortElement(p, { yUpPositive: true })).join("\n ");
15886
16367
  const centerDiamond = createDiamondElement(symbol.center);
15887
- return [svgElements.join("\n "), portElements, centerDiamond].join("\n");
16368
+ const debugElements = [];
16369
+ if (debug) {
16370
+ const topLeft = {
16371
+ x: symbol.center.x - size.width / 2,
16372
+ y: symbol.center.y - size.height / 2
16373
+ };
16374
+ debugElements.push(
16375
+ `<text x="${topLeft.x}" y="${topLeft.y}" style="font: 0.05px monospace; fill: #833;">${size.width.toFixed(2)} x ${size.height.toFixed(2)}</text>`
16376
+ );
16377
+ ports.forEach((port, i) => {
16378
+ if (port.labels.length > 1) {
16379
+ const alternateLabels = port.labels.slice(1).join(", ");
16380
+ debugElements.push(
16381
+ `<text x="${topLeft.x}" y="${topLeft.y - (i + 1) * 0.05}" dy="-0.15" style="font: 0.05px monospace; fill: #833;">${port.labels[0]} [${alternateLabels}]</text>`
16382
+ );
16383
+ }
16384
+ });
16385
+ debugElements.push(...debugElements);
16386
+ }
16387
+ return [
16388
+ svgElements.join("\n "),
16389
+ portElements,
16390
+ centerDiamond,
16391
+ ...debugElements
16392
+ ].join("\n");
15888
16393
  }
15889
16394
  function getSvg(symbol, options = {}) {
15890
16395
  const { size } = symbol;