@modular-circuit/ir 0.0.57 → 0.0.59

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.
@@ -1 +1 @@
1
- export var MODULAR_CIRCUIT_SCH_EXT = 'modular_circuit';
1
+ export const MODULAR_CIRCUIT_SCH_EXT = 'modular_circuit';
@@ -1,4 +1,4 @@
1
- export var PaperSize = {
1
+ export const PaperSize = {
2
2
  User: [431.8, 279.4],
3
3
  A0: [1189, 841],
4
4
  A1: [841, 594],
@@ -1,5 +1,5 @@
1
1
  import { ELECTRICAL_PINTYPE, convert_label_shape_to_pin_type } from '@modular-circuit/electronics-model';
2
- export var KICAD_GND_NAME = 'GND';
2
+ export const KICAD_GND_NAME = 'GND';
3
3
  export var PORT_ANNOT_TYPE;
4
4
  (function (PORT_ANNOT_TYPE) {
5
5
  PORT_ANNOT_TYPE[PORT_ANNOT_TYPE["NORMAL_SYMBOL_PIN"] = 0] = "NORMAL_SYMBOL_PIN";
@@ -7,7 +7,6 @@ export var PORT_ANNOT_TYPE;
7
7
  PORT_ANNOT_TYPE[PORT_ANNOT_TYPE["GLOBAL_POWER_PIN"] = 2] = "GLOBAL_POWER_PIN";
8
8
  })(PORT_ANNOT_TYPE || (PORT_ANNOT_TYPE = {}));
9
9
  export function parse_eda_annotation(eda_annotation) {
10
- var _a;
11
10
  if (!eda_annotation)
12
11
  return {
13
12
  pin_type: ELECTRICAL_PINTYPE.PT_UNSPECIFIED,
@@ -18,7 +17,7 @@ export function parse_eda_annotation(eda_annotation) {
18
17
  pin_type: convert_label_shape_to_pin_type(eda_annotation.shape),
19
18
  port_annot_type: PORT_ANNOT_TYPE.NORMAL_SYMBOL_PIN,
20
19
  };
21
- if ('lib_id' in eda_annotation && ((_a = eda_annotation.lib_id) === null || _a === void 0 ? void 0 : _a.endsWith(KICAD_GND_NAME)))
20
+ if ('lib_id' in eda_annotation && eda_annotation.lib_id?.endsWith(KICAD_GND_NAME))
22
21
  return { pin_type: ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: PORT_ANNOT_TYPE.GLOBAL_GND_PIN };
23
22
  return { pin_type: ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: PORT_ANNOT_TYPE.GLOBAL_POWER_PIN };
24
23
  }
@@ -1 +1 @@
1
- export var MODULAR_CIRCUIT_EXT = 'modular_circuit';
1
+ export const MODULAR_CIRCUIT_EXT = 'modular_circuit';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/ir",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "description": "Intermediate representation of the modular circuit",
5
5
  "main": "./build/index.js",
6
6
  "exports": {
@@ -24,7 +24,7 @@
24
24
  "typescript": "^5.4.5"
25
25
  },
26
26
  "dependencies": {
27
- "@modular-circuit/electronics-model": "0.0.49"
27
+ "@modular-circuit/electronics-model": "0.0.52"
28
28
  },
29
29
  "scripts": {
30
30
  "clean": "rimraf build",