schematic-symbols 0.0.145 → 0.0.146

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 CHANGED
@@ -331,10 +331,10 @@ declare const _default: {
331
331
  height: number;
332
332
  };
333
333
  };
334
- vcc_down: undefined;
335
- vcc_left: undefined;
336
- vcc_right: undefined;
337
- vcc_up: undefined;
334
+ VCC_down: undefined;
335
+ VCC_left: undefined;
336
+ VCC_right: undefined;
337
+ VCC_up: undefined;
338
338
  volt_meter_horz: undefined;
339
339
  volt_meter_vert: undefined;
340
340
  watt_hour_meter_horz: undefined;
@@ -361,7 +361,7 @@ declare const _default: {
361
361
  zener_diode_vert: undefined;
362
362
  };
363
363
 
364
- type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "backward_diode" | "battery" | "boxresistor" | "boxresistor_small" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_normally_closed_switch" | "dpdt_switch" | "dpst_normally_closed_switch" | "dpst_switch" | "ferrite_bead" | "filled_diode" | "frequency_meter" | "fuse" | "ground" | "ground2" | "gunn_diode" | "icled" | "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" | "potentiometer3" | "power_factor_meter" | "push_button_normally_closed_momentary" | "push_button_normally_open_momentary" | "rectifier_diode" | "resistor" | "resonator" | "schottky_diode" | "silicon_controlled_rectifier" | "solderjumper2_bridged12" | "solderjumper2" | "solderjumper3_bridged12" | "solderjumper3_bridged123" | "solderjumper3_bridged23" | "solderjumper3" | "spdt_normally_closed_switch" | "spdt_switch" | "spst_normally_closed_switch" | "spst_switch" | "step_recovery_diode" | "tachometer" | "tilted_ground" | "triac" | "tunnel_diode" | "unijunction_transistor" | "var_meter" | "varactor_diode" | "varistor" | "varmeter" | "vcc" | "volt_meter" | "watt_hour_meter" | "wattmeter" | "zener_diode";
364
+ type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "backward_diode" | "battery" | "boxresistor" | "boxresistor_small" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_normally_closed_switch" | "dpdt_switch" | "dpst_normally_closed_switch" | "dpst_switch" | "ferrite_bead" | "filled_diode" | "frequency_meter" | "fuse" | "ground" | "ground2" | "gunn_diode" | "icled" | "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" | "potentiometer3" | "power_factor_meter" | "push_button_normally_closed_momentary" | "push_button_normally_open_momentary" | "rectifier_diode" | "resistor" | "resonator" | "schottky_diode" | "silicon_controlled_rectifier" | "solderjumper2_bridged12" | "solderjumper2" | "solderjumper3_bridged12" | "solderjumper3_bridged123" | "solderjumper3_bridged23" | "solderjumper3" | "spdt_normally_closed_switch" | "spdt_switch" | "spst_normally_closed_switch" | "spst_switch" | "step_recovery_diode" | "tachometer" | "tilted_ground" | "triac" | "tunnel_diode" | "unijunction_transistor" | "var_meter" | "varactor_diode" | "varistor" | "varmeter" | "VCC" | "volt_meter" | "watt_hour_meter" | "wattmeter" | "zener_diode";
365
365
 
366
366
  /**
367
367
  * Utility for easier autocomplete:
package/dist/index.js CHANGED
@@ -44,10 +44,10 @@ function getBoundsOfPrimitives(primitives) {
44
44
  function defineSymbol(symbol5) {
45
45
  let size = symbol5.size;
46
46
  if (!size) {
47
- const bounds68 = getBoundsOfPrimitives(symbol5.primitives);
47
+ const bounds72 = getBoundsOfPrimitives(symbol5.primitives);
48
48
  size = {
49
- width: bounds68.maxX - bounds68.minX,
50
- height: bounds68.maxY - bounds68.minY
49
+ width: bounds72.maxX - bounds72.minX,
50
+ height: bounds72.maxY - bounds72.minY
51
51
  };
52
52
  }
53
53
  return { ...symbol5, size };
@@ -494,14 +494,14 @@ var rotateRightFacingSymbol = (symbol5, opts) => {
494
494
  ...applyToPoint(transform2, port)
495
495
  })
496
496
  );
497
- const bounds68 = getBoundsOfPrimitives(rotatedPrimitives);
497
+ const bounds72 = getBoundsOfPrimitives(rotatedPrimitives);
498
498
  return {
499
499
  primitives: rotatedPrimitives,
500
500
  center,
501
501
  ports: rotatedPorts,
502
502
  size: {
503
- width: bounds68.maxX - bounds68.minX,
504
- height: bounds68.maxY - bounds68.minY
503
+ width: bounds72.maxX - bounds72.minX,
504
+ height: bounds72.maxY - bounds72.minY
505
505
  },
506
506
  ...overrides
507
507
  };
@@ -902,10 +902,10 @@ var SymbolModifier = class {
902
902
  return this;
903
903
  }
904
904
  computeSize() {
905
- const bounds68 = getBoundsOfPrimitives(this.symbol.primitives);
905
+ const bounds72 = getBoundsOfPrimitives(this.symbol.primitives);
906
906
  return {
907
- width: bounds68.maxX - bounds68.minX,
908
- height: bounds68.maxY - bounds68.minY
907
+ width: bounds72.maxX - bounds72.minX,
908
+ height: bounds72.maxY - bounds72.minY
909
909
  };
910
910
  }
911
911
  build() {
@@ -21078,19 +21078,19 @@ var varmeter_vert_default = {
21078
21078
  primitives: [...rotatedSymbol23.primitives, letter5]
21079
21079
  };
21080
21080
 
21081
- // assets/generated/vcc.json
21082
- var vcc_default = {
21081
+ // assets/generated/VCC.json
21082
+ var VCC_default = {
21083
21083
  paths: {
21084
21084
  "path28-2": {
21085
21085
  type: "path",
21086
21086
  points: [
21087
21087
  {
21088
- x: 0.20277703000000047,
21089
- y: 0.0014636499999962638
21088
+ x: 0.2804083705,
21089
+ y: 0.0013661499999990667
21090
21090
  },
21091
21091
  {
21092
- x: 0.011706329999999987,
21093
- y: 0.09263974999999824
21092
+ x: 0.012067670500000016,
21093
+ y: 0.15638615000000122
21094
21094
  }
21095
21095
  ],
21096
21096
  color: "primary",
@@ -21100,12 +21100,12 @@ var vcc_default = {
21100
21100
  type: "path",
21101
21101
  points: [
21102
21102
  {
21103
- x: 0.2026774300000005,
21104
- y: -0.0014636500000015928
21103
+ x: 0.2805724705000001,
21104
+ y: -0.001366150000000843
21105
21105
  },
21106
21106
  {
21107
- x: 0.01160622999999994,
21108
- y: -0.09263975000000002
21107
+ x: 0.012231770500000572,
21108
+ y: -0.15638614999999945
21109
21109
  }
21110
21110
  ],
21111
21111
  color: "primary",
@@ -21115,12 +21115,12 @@ var vcc_default = {
21115
21115
  type: "path",
21116
21116
  points: [
21117
21117
  {
21118
- x: 0.19773533,
21119
- y: 40854999999773156e-20
21118
+ x: 0.27894777049999986,
21119
+ y: -11550000001747662e-21
21120
21120
  },
21121
21121
  {
21122
- x: -0.20678487000000034,
21123
- y: 40854999999773156e-20
21122
+ x: -0.2891629295000002,
21123
+ y: -11550000001747662e-21
21124
21124
  }
21125
21125
  ],
21126
21126
  color: "primary",
@@ -21131,40 +21131,112 @@ var vcc_default = {
21131
21131
  right1: {
21132
21132
  type: "text",
21133
21133
  text: "{REF}",
21134
- x: 0.24263703000000003,
21135
- y: 0.0011810499999977964
21134
+ x: 0.3322337704999998,
21135
+ y: 0.004280050000000202
21136
21136
  }
21137
21137
  },
21138
21138
  refblocks: {
21139
21139
  left1: {
21140
- x: -0.2217313700000001,
21141
- y: -7457500000018769e-19
21140
+ x: -0.30407532950000027,
21141
+ y: 4801499999995684e-19
21142
21142
  }
21143
21143
  },
21144
21144
  bounds: {
21145
- minX: -0.2426370300000001,
21146
- maxX: 0.24263703000000003,
21147
- minY: -0.09263975000000002,
21148
- maxY: 0.09263974999999824,
21149
- width: 0.4852740600000001,
21150
- height: 0.18527949999999827,
21151
- centerX: -27755575615628914e-33,
21152
- centerY: -8881784197001252e-31
21145
+ minX: -0.33223377050000025,
21146
+ maxX: 0.3322337704999998,
21147
+ minY: -0.15638614999999945,
21148
+ maxY: 0.15638615000000122,
21149
+ width: 0.664467541,
21150
+ height: 0.31277230000000067,
21151
+ centerX: -2220446049250313e-31,
21152
+ centerY: 8881784197001252e-31
21153
21153
  },
21154
21154
  circles: {}
21155
21155
  };
21156
21156
 
21157
- // symbols/vcc_down.ts
21158
- var vcc_down_default = modifySymbol(vcc_default).rotateRightFacingSymbol("down").labelPort("left1", ["1"]).changeTextAnchor("{REF}", "middle_top").build();
21157
+ // symbols/VCC_down.ts
21158
+ var { paths: paths64, texts: texts80, bounds: bounds64, refblocks: refblocks64, circles: circles58 } = VCC_default;
21159
+ var VCC_down_default = modifySymbol({
21160
+ primitives: [
21161
+ ...Object.values(paths64),
21162
+ ...Object.values(circles58),
21163
+ {
21164
+ type: "text",
21165
+ text: "{REF}",
21166
+ x: 0.33,
21167
+ y: 0
21168
+ }
21169
+ ],
21170
+ ports: [
21171
+ { ...refblocks64.left1, labels: ["1"] }
21172
+ // TODO add more "standard" labels
21173
+ ],
21174
+ size: { width: bounds64.width, height: bounds64.height },
21175
+ center: { x: bounds64.centerX, y: bounds64.centerY }
21176
+ }).rotateRightFacingSymbol("down").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_top").build();
21159
21177
 
21160
- // symbols/vcc_left.ts
21161
- var vcc_left_default = modifySymbol(vcc_default).rotateRightFacingSymbol("left").labelPort("left1", ["1"]).changeTextAnchor("{REF}", "middle_right").build();
21178
+ // symbols/VCC_left.ts
21179
+ var { paths: paths65, texts: texts81, bounds: bounds65, refblocks: refblocks65, circles: circles59 } = VCC_default;
21180
+ var VCC_left_default = modifySymbol({
21181
+ primitives: [
21182
+ ...Object.values(paths65),
21183
+ ...Object.values(circles59),
21184
+ {
21185
+ type: "text",
21186
+ text: "{REF}",
21187
+ x: 0.35,
21188
+ y: 0
21189
+ }
21190
+ ],
21191
+ ports: [
21192
+ { ...refblocks65.left1, labels: ["1"] }
21193
+ // TODO add more "standard" labels
21194
+ ],
21195
+ size: { width: bounds65.width, height: bounds65.height },
21196
+ center: { x: bounds65.centerX, y: bounds65.centerY }
21197
+ }).rotateRightFacingSymbol("left").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_right").build();
21162
21198
 
21163
- // symbols/vcc_right.ts
21164
- var vcc_right_default = modifySymbol(vcc_default).rotateRightFacingSymbol("right").labelPort("left1", ["1"]).changeTextAnchor("{REF}", "middle_left").build();
21199
+ // symbols/VCC_right.ts
21200
+ var { paths: paths66, texts: texts82, bounds: bounds66, refblocks: refblocks66, circles: circles60 } = VCC_default;
21201
+ var VCC_right_default = modifySymbol({
21202
+ primitives: [
21203
+ ...Object.values(paths66),
21204
+ ...Object.values(circles60),
21205
+ {
21206
+ type: "text",
21207
+ text: "{REF}",
21208
+ x: 0.35,
21209
+ y: 0
21210
+ }
21211
+ ],
21212
+ ports: [
21213
+ { ...refblocks66.left1, labels: ["1"] }
21214
+ // TODO add more "standard" labels
21215
+ ],
21216
+ size: { width: bounds66.width, height: bounds66.height },
21217
+ center: { x: bounds66.centerX, y: bounds66.centerY }
21218
+ }).rotateRightFacingSymbol("right").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_left").build();
21165
21219
 
21166
- // symbols/vcc_up.ts
21167
- var vcc_up_default = modifySymbol(vcc_default).rotateRightFacingSymbol("up").labelPort("left1", ["1"]).changeTextAnchor("{REF}", "middle_bottom").build();
21220
+ // symbols/VCC_up.ts
21221
+ var { paths: paths67, texts: texts83, bounds: bounds67, refblocks: refblocks67, circles: circles61 } = VCC_default;
21222
+ var VCC_up_default = modifySymbol({
21223
+ primitives: [
21224
+ ...Object.values(paths67),
21225
+ ...Object.values(circles61),
21226
+ {
21227
+ type: "text",
21228
+ text: "{REF}",
21229
+ x: 0.33,
21230
+ y: 0
21231
+ }
21232
+ ],
21233
+ ports: [
21234
+ { ...refblocks67.left1, labels: ["1"] }
21235
+ // TODO add more "standard" labels
21236
+ ],
21237
+ size: { width: bounds67.width, height: bounds67.height },
21238
+ center: { x: bounds67.centerX, y: bounds67.centerY }
21239
+ }).rotateRightFacingSymbol("up").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_bottom").build();
21168
21240
 
21169
21241
  // assets/generated/volt_meter.json
21170
21242
  var volt_meter_default = {
@@ -21266,7 +21338,7 @@ var volt_meter_default = {
21266
21338
  };
21267
21339
 
21268
21340
  // symbols/volt_meter_horz.ts
21269
- var { paths: paths64, texts: texts80, bounds: bounds64, circles: circles58, refblocks: refblocks64 } = volt_meter_default;
21341
+ var { paths: paths68, texts: texts84, bounds: bounds68, circles: circles62, refblocks: refblocks68 } = volt_meter_default;
21270
21342
  var volt_meter_horz_default = modifySymbol(volt_meter_default).changeTextAnchor("{VAL}", "middle_top").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_bottom").build();
21271
21343
 
21272
21344
  // symbols/volt_meter_vert.ts
@@ -21359,11 +21431,11 @@ var watt_hour_meter_default = {
21359
21431
  };
21360
21432
 
21361
21433
  // symbols/watt_hour_meter_horz.ts
21362
- var { paths: paths65, texts: texts81, bounds: bounds65, refblocks: refblocks65, circles: circles59 } = watt_hour_meter_default;
21434
+ var { paths: paths69, texts: texts85, bounds: bounds69, refblocks: refblocks69, circles: circles63 } = watt_hour_meter_default;
21363
21435
  var watt_hour_meter_horz_default = defineSymbol({
21364
21436
  primitives: [
21365
- ...Object.values(paths65),
21366
- ...Object.values(circles59),
21437
+ ...Object.values(paths69),
21438
+ ...Object.values(circles63),
21367
21439
  {
21368
21440
  type: "text",
21369
21441
  text: "{REF}",
@@ -21378,16 +21450,16 @@ var watt_hour_meter_horz_default = defineSymbol({
21378
21450
  y: 0.35,
21379
21451
  anchor: "middle_bottom"
21380
21452
  },
21381
- { ...texts81.left1, anchor: "center", y: 0.01, fontSize: 0.2 }
21453
+ { ...texts85.left1, anchor: "center", y: 0.01, fontSize: 0.2 }
21382
21454
  ],
21383
21455
  ports: [
21384
- { ...refblocks65.left1, labels: ["1"] },
21456
+ { ...refblocks69.left1, labels: ["1"] },
21385
21457
  // TODO add more "standard" labels
21386
- { ...refblocks65.right1, labels: ["2"] }
21458
+ { ...refblocks69.right1, labels: ["2"] }
21387
21459
  // TODO add more "standard" labels
21388
21460
  ],
21389
- size: { width: bounds65.width, height: bounds65.height },
21390
- center: { x: bounds65.centerX, y: bounds65.centerY }
21461
+ size: { width: bounds69.width, height: bounds69.height },
21462
+ center: { x: bounds69.centerX, y: bounds69.centerY }
21391
21463
  });
21392
21464
 
21393
21465
  // symbols/watt_hour_meter_vert.ts
@@ -21491,11 +21563,11 @@ var wattmeter_default = {
21491
21563
  };
21492
21564
 
21493
21565
  // symbols/wattmeter_horz.ts
21494
- var { paths: paths66, texts: texts82, bounds: bounds66, refblocks: refblocks66, circles: circles60 } = wattmeter_default;
21566
+ var { paths: paths70, texts: texts86, bounds: bounds70, refblocks: refblocks70, circles: circles64 } = wattmeter_default;
21495
21567
  var wattmeter_horz_default = defineSymbol({
21496
21568
  primitives: [
21497
- ...Object.values(paths66),
21498
- ...Object.values(circles60),
21569
+ ...Object.values(paths70),
21570
+ ...Object.values(circles64),
21499
21571
  {
21500
21572
  type: "text",
21501
21573
  text: "{REF}",
@@ -21510,16 +21582,16 @@ var wattmeter_horz_default = defineSymbol({
21510
21582
  y: 0.35,
21511
21583
  anchor: "middle_bottom"
21512
21584
  },
21513
- { ...texts82.left1, anchor: "center", y: 0.01, fontSize: 0.3 }
21585
+ { ...texts86.left1, anchor: "center", y: 0.01, fontSize: 0.3 }
21514
21586
  ],
21515
21587
  ports: [
21516
- { ...refblocks66.left1, labels: ["1"] },
21588
+ { ...refblocks70.left1, labels: ["1"] },
21517
21589
  // TODO add more "standard" labels
21518
- { ...refblocks66.right1, labels: ["2"] }
21590
+ { ...refblocks70.right1, labels: ["2"] }
21519
21591
  // TODO add more "standard" labels
21520
21592
  ],
21521
- size: { width: bounds66.width, height: bounds66.height },
21522
- center: { x: bounds66.centerX, y: bounds66.centerY }
21593
+ size: { width: bounds70.width, height: bounds70.height },
21594
+ center: { x: bounds70.centerX, y: bounds70.centerY }
21523
21595
  });
21524
21596
 
21525
21597
  // symbols/wattmeter_vert.ts
@@ -21683,22 +21755,22 @@ var zener_diode_default = {
21683
21755
  };
21684
21756
 
21685
21757
  // symbols/zener_diode_horz.ts
21686
- var { paths: paths67, texts: texts83, bounds: bounds67, refblocks: refblocks67, circles: circles61 } = zener_diode_default;
21758
+ var { paths: paths71, texts: texts87, bounds: bounds71, refblocks: refblocks71, circles: circles65 } = zener_diode_default;
21687
21759
  var zener_diode_horz_default = defineSymbol({
21688
21760
  primitives: [
21689
- ...Object.values(paths67),
21690
- ...Object.values(circles61),
21691
- { ...texts83.top1, anchor: "middle_bottom" },
21692
- { ...texts83.bottom1, anchor: "middle_top" }
21761
+ ...Object.values(paths71),
21762
+ ...Object.values(circles65),
21763
+ { ...texts87.top1, anchor: "middle_bottom" },
21764
+ { ...texts87.bottom1, anchor: "middle_top" }
21693
21765
  ],
21694
21766
  ports: [
21695
- { ...refblocks67.left1, labels: ["1"] },
21767
+ { ...refblocks71.left1, labels: ["1"] },
21696
21768
  // TODO add more "standard" labels
21697
- { ...refblocks67.right1, labels: ["2"] }
21769
+ { ...refblocks71.right1, labels: ["2"] }
21698
21770
  // TODO add more "standard" labels
21699
21771
  ],
21700
- size: { width: bounds67.width, height: bounds67.height },
21701
- center: { x: bounds67.centerX, y: bounds67.centerY }
21772
+ size: { width: bounds71.width, height: bounds71.height },
21773
+ center: { x: bounds71.centerX, y: bounds71.centerY }
21702
21774
  });
21703
21775
 
21704
21776
  // symbols/zener_diode_vert.ts
@@ -21931,10 +22003,10 @@ var symbols_index_default = {
21931
22003
  "varistor_vert": varistor_vert_default,
21932
22004
  "varmeter_horz": varmeter_horz_default,
21933
22005
  "varmeter_vert": varmeter_vert_default,
21934
- "vcc_down": vcc_down_default,
21935
- "vcc_left": vcc_left_default,
21936
- "vcc_right": vcc_right_default,
21937
- "vcc_up": vcc_up_default,
22006
+ "VCC_down": VCC_down_default,
22007
+ "VCC_left": VCC_left_default,
22008
+ "VCC_right": VCC_right_default,
22009
+ "VCC_up": VCC_up_default,
21938
22010
  "volt_meter_horz": volt_meter_horz_default,
21939
22011
  "volt_meter_vert": volt_meter_vert_default,
21940
22012
  "watt_hour_meter_horz": watt_hour_meter_horz_default,