schematic-symbols 0.0.139 → 0.0.140

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,6 +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
338
  volt_meter_horz: undefined;
335
339
  volt_meter_vert: undefined;
336
340
  watt_hour_meter_horz: undefined;
@@ -357,7 +361,7 @@ declare const _default: {
357
361
  zener_diode_vert: undefined;
358
362
  };
359
363
 
360
- 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_alt" | "ground" | "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" | "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";
361
365
 
362
366
  /**
363
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() {
@@ -21069,6 +21069,166 @@ var varmeter_vert_default = {
21069
21069
  primitives: [...rotatedSymbol23.primitives, letter5]
21070
21070
  };
21071
21071
 
21072
+ // assets/generated/VCC.json
21073
+ var VCC_default = {
21074
+ paths: {
21075
+ "path28-2": {
21076
+ type: "path",
21077
+ points: [
21078
+ {
21079
+ x: 0.2804083705,
21080
+ y: 0.0013661499999990667
21081
+ },
21082
+ {
21083
+ x: 0.012067670500000016,
21084
+ y: 0.15638615000000122
21085
+ }
21086
+ ],
21087
+ color: "primary",
21088
+ fill: false
21089
+ },
21090
+ "path28-2-6": {
21091
+ type: "path",
21092
+ points: [
21093
+ {
21094
+ x: 0.2805724705000001,
21095
+ y: -0.001366150000000843
21096
+ },
21097
+ {
21098
+ x: 0.012231770500000572,
21099
+ y: -0.15638614999999945
21100
+ }
21101
+ ],
21102
+ color: "primary",
21103
+ fill: false
21104
+ },
21105
+ "path29-3": {
21106
+ type: "path",
21107
+ points: [
21108
+ {
21109
+ x: 0.27894777049999986,
21110
+ y: -11550000001747662e-21
21111
+ },
21112
+ {
21113
+ x: -0.2891629295000002,
21114
+ y: -11550000001747662e-21
21115
+ }
21116
+ ],
21117
+ color: "primary",
21118
+ fill: false
21119
+ }
21120
+ },
21121
+ texts: {
21122
+ right1: {
21123
+ type: "text",
21124
+ text: "{REF}",
21125
+ x: 0.3322337704999998,
21126
+ y: 0.004280050000000202
21127
+ }
21128
+ },
21129
+ refblocks: {
21130
+ left1: {
21131
+ x: -0.30407532950000027,
21132
+ y: 4801499999995684e-19
21133
+ }
21134
+ },
21135
+ bounds: {
21136
+ minX: -0.33223377050000025,
21137
+ maxX: 0.3322337704999998,
21138
+ minY: -0.15638614999999945,
21139
+ maxY: 0.15638615000000122,
21140
+ width: 0.664467541,
21141
+ height: 0.31277230000000067,
21142
+ centerX: -2220446049250313e-31,
21143
+ centerY: 8881784197001252e-31
21144
+ },
21145
+ circles: {}
21146
+ };
21147
+
21148
+ // symbols/VCC_down.ts
21149
+ var { paths: paths64, texts: texts80, bounds: bounds64, refblocks: refblocks64, circles: circles58 } = VCC_default;
21150
+ var VCC_down_default = modifySymbol({
21151
+ primitives: [
21152
+ ...Object.values(paths64),
21153
+ ...Object.values(circles58),
21154
+ {
21155
+ type: "text",
21156
+ text: "{REF}",
21157
+ x: 0.33,
21158
+ y: 0
21159
+ }
21160
+ ],
21161
+ ports: [
21162
+ { ...refblocks64.left1, labels: ["1"] }
21163
+ // TODO add more "standard" labels
21164
+ ],
21165
+ size: { width: bounds64.width, height: bounds64.height },
21166
+ center: { x: bounds64.centerX, y: bounds64.centerY }
21167
+ }).rotateRightFacingSymbol("down").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_top").build();
21168
+
21169
+ // symbols/VCC_left.ts
21170
+ var { paths: paths65, texts: texts81, bounds: bounds65, refblocks: refblocks65, circles: circles59 } = VCC_default;
21171
+ var VCC_left_default = modifySymbol({
21172
+ primitives: [
21173
+ ...Object.values(paths65),
21174
+ ...Object.values(circles59),
21175
+ {
21176
+ type: "text",
21177
+ text: "{REF}",
21178
+ x: 0.35,
21179
+ y: 0
21180
+ }
21181
+ ],
21182
+ ports: [
21183
+ { ...refblocks65.left1, labels: ["1"] }
21184
+ // TODO add more "standard" labels
21185
+ ],
21186
+ size: { width: bounds65.width, height: bounds65.height },
21187
+ center: { x: bounds65.centerX, y: bounds65.centerY }
21188
+ }).rotateRightFacingSymbol("left").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_right").build();
21189
+
21190
+ // symbols/VCC_right.ts
21191
+ var { paths: paths66, texts: texts82, bounds: bounds66, refblocks: refblocks66, circles: circles60 } = VCC_default;
21192
+ var VCC_right_default = modifySymbol({
21193
+ primitives: [
21194
+ ...Object.values(paths66),
21195
+ ...Object.values(circles60),
21196
+ {
21197
+ type: "text",
21198
+ text: "{REF}",
21199
+ x: 0.35,
21200
+ y: 0
21201
+ }
21202
+ ],
21203
+ ports: [
21204
+ { ...refblocks66.left1, labels: ["1"] }
21205
+ // TODO add more "standard" labels
21206
+ ],
21207
+ size: { width: bounds66.width, height: bounds66.height },
21208
+ center: { x: bounds66.centerX, y: bounds66.centerY }
21209
+ }).rotateRightFacingSymbol("right").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_left").build();
21210
+
21211
+ // symbols/VCC_up.ts
21212
+ var { paths: paths67, texts: texts83, bounds: bounds67, refblocks: refblocks67, circles: circles61 } = VCC_default;
21213
+ var VCC_up_default = modifySymbol({
21214
+ primitives: [
21215
+ ...Object.values(paths67),
21216
+ ...Object.values(circles61),
21217
+ {
21218
+ type: "text",
21219
+ text: "{REF}",
21220
+ x: 0.33,
21221
+ y: 0
21222
+ }
21223
+ ],
21224
+ ports: [
21225
+ { ...refblocks67.left1, labels: ["1"] }
21226
+ // TODO add more "standard" labels
21227
+ ],
21228
+ size: { width: bounds67.width, height: bounds67.height },
21229
+ center: { x: bounds67.centerX, y: bounds67.centerY }
21230
+ }).rotateRightFacingSymbol("up").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_bottom").build();
21231
+
21072
21232
  // assets/generated/volt_meter.json
21073
21233
  var volt_meter_default = {
21074
21234
  paths: {
@@ -21169,7 +21329,7 @@ var volt_meter_default = {
21169
21329
  };
21170
21330
 
21171
21331
  // symbols/volt_meter_horz.ts
21172
- var { paths: paths64, texts: texts80, bounds: bounds64, circles: circles58, refblocks: refblocks64 } = volt_meter_default;
21332
+ var { paths: paths68, texts: texts84, bounds: bounds68, circles: circles62, refblocks: refblocks68 } = volt_meter_default;
21173
21333
  var volt_meter_horz_default = modifySymbol(volt_meter_default).changeTextAnchor("{VAL}", "middle_top").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_bottom").build();
21174
21334
 
21175
21335
  // symbols/volt_meter_vert.ts
@@ -21262,11 +21422,11 @@ var watt_hour_meter_default = {
21262
21422
  };
21263
21423
 
21264
21424
  // symbols/watt_hour_meter_horz.ts
21265
- var { paths: paths65, texts: texts81, bounds: bounds65, refblocks: refblocks65, circles: circles59 } = watt_hour_meter_default;
21425
+ var { paths: paths69, texts: texts85, bounds: bounds69, refblocks: refblocks69, circles: circles63 } = watt_hour_meter_default;
21266
21426
  var watt_hour_meter_horz_default = defineSymbol({
21267
21427
  primitives: [
21268
- ...Object.values(paths65),
21269
- ...Object.values(circles59),
21428
+ ...Object.values(paths69),
21429
+ ...Object.values(circles63),
21270
21430
  {
21271
21431
  type: "text",
21272
21432
  text: "{REF}",
@@ -21281,16 +21441,16 @@ var watt_hour_meter_horz_default = defineSymbol({
21281
21441
  y: 0.35,
21282
21442
  anchor: "middle_bottom"
21283
21443
  },
21284
- { ...texts81.left1, anchor: "center", y: 0.01, fontSize: 0.2 }
21444
+ { ...texts85.left1, anchor: "center", y: 0.01, fontSize: 0.2 }
21285
21445
  ],
21286
21446
  ports: [
21287
- { ...refblocks65.left1, labels: ["1"] },
21447
+ { ...refblocks69.left1, labels: ["1"] },
21288
21448
  // TODO add more "standard" labels
21289
- { ...refblocks65.right1, labels: ["2"] }
21449
+ { ...refblocks69.right1, labels: ["2"] }
21290
21450
  // TODO add more "standard" labels
21291
21451
  ],
21292
- size: { width: bounds65.width, height: bounds65.height },
21293
- center: { x: bounds65.centerX, y: bounds65.centerY }
21452
+ size: { width: bounds69.width, height: bounds69.height },
21453
+ center: { x: bounds69.centerX, y: bounds69.centerY }
21294
21454
  });
21295
21455
 
21296
21456
  // symbols/watt_hour_meter_vert.ts
@@ -21394,11 +21554,11 @@ var wattmeter_default = {
21394
21554
  };
21395
21555
 
21396
21556
  // symbols/wattmeter_horz.ts
21397
- var { paths: paths66, texts: texts82, bounds: bounds66, refblocks: refblocks66, circles: circles60 } = wattmeter_default;
21557
+ var { paths: paths70, texts: texts86, bounds: bounds70, refblocks: refblocks70, circles: circles64 } = wattmeter_default;
21398
21558
  var wattmeter_horz_default = defineSymbol({
21399
21559
  primitives: [
21400
- ...Object.values(paths66),
21401
- ...Object.values(circles60),
21560
+ ...Object.values(paths70),
21561
+ ...Object.values(circles64),
21402
21562
  {
21403
21563
  type: "text",
21404
21564
  text: "{REF}",
@@ -21413,16 +21573,16 @@ var wattmeter_horz_default = defineSymbol({
21413
21573
  y: 0.35,
21414
21574
  anchor: "middle_bottom"
21415
21575
  },
21416
- { ...texts82.left1, anchor: "center", y: 0.01, fontSize: 0.3 }
21576
+ { ...texts86.left1, anchor: "center", y: 0.01, fontSize: 0.3 }
21417
21577
  ],
21418
21578
  ports: [
21419
- { ...refblocks66.left1, labels: ["1"] },
21579
+ { ...refblocks70.left1, labels: ["1"] },
21420
21580
  // TODO add more "standard" labels
21421
- { ...refblocks66.right1, labels: ["2"] }
21581
+ { ...refblocks70.right1, labels: ["2"] }
21422
21582
  // TODO add more "standard" labels
21423
21583
  ],
21424
- size: { width: bounds66.width, height: bounds66.height },
21425
- center: { x: bounds66.centerX, y: bounds66.centerY }
21584
+ size: { width: bounds70.width, height: bounds70.height },
21585
+ center: { x: bounds70.centerX, y: bounds70.centerY }
21426
21586
  });
21427
21587
 
21428
21588
  // symbols/wattmeter_vert.ts
@@ -21586,22 +21746,22 @@ var zener_diode_default = {
21586
21746
  };
21587
21747
 
21588
21748
  // symbols/zener_diode_horz.ts
21589
- var { paths: paths67, texts: texts83, bounds: bounds67, refblocks: refblocks67, circles: circles61 } = zener_diode_default;
21749
+ var { paths: paths71, texts: texts87, bounds: bounds71, refblocks: refblocks71, circles: circles65 } = zener_diode_default;
21590
21750
  var zener_diode_horz_default = defineSymbol({
21591
21751
  primitives: [
21592
- ...Object.values(paths67),
21593
- ...Object.values(circles61),
21594
- { ...texts83.top1, anchor: "middle_bottom" },
21595
- { ...texts83.bottom1, anchor: "middle_top" }
21752
+ ...Object.values(paths71),
21753
+ ...Object.values(circles65),
21754
+ { ...texts87.top1, anchor: "middle_bottom" },
21755
+ { ...texts87.bottom1, anchor: "middle_top" }
21596
21756
  ],
21597
21757
  ports: [
21598
- { ...refblocks67.left1, labels: ["1"] },
21758
+ { ...refblocks71.left1, labels: ["1"] },
21599
21759
  // TODO add more "standard" labels
21600
- { ...refblocks67.right1, labels: ["2"] }
21760
+ { ...refblocks71.right1, labels: ["2"] }
21601
21761
  // TODO add more "standard" labels
21602
21762
  ],
21603
- size: { width: bounds67.width, height: bounds67.height },
21604
- center: { x: bounds67.centerX, y: bounds67.centerY }
21763
+ size: { width: bounds71.width, height: bounds71.height },
21764
+ center: { x: bounds71.centerX, y: bounds71.centerY }
21605
21765
  });
21606
21766
 
21607
21767
  // symbols/zener_diode_vert.ts
@@ -21834,6 +21994,10 @@ var symbols_index_default = {
21834
21994
  "varistor_vert": varistor_vert_default,
21835
21995
  "varmeter_horz": varmeter_horz_default,
21836
21996
  "varmeter_vert": varmeter_vert_default,
21997
+ "VCC_down": VCC_down_default,
21998
+ "VCC_left": VCC_left_default,
21999
+ "VCC_right": VCC_right_default,
22000
+ "VCC_up": VCC_up_default,
21837
22001
  "volt_meter_horz": volt_meter_horz_default,
21838
22002
  "volt_meter_vert": volt_meter_vert_default,
21839
22003
  "watt_hour_meter_horz": watt_hour_meter_horz_default,