@modular-circuit/transpiler 0.0.67 → 0.0.69

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,8 +1,8 @@
1
1
  import { type NL_NetList } from '@modular-circuit/electronics-model';
2
- import type { ConvertGraphToKiCadContext } from './context';
2
+ import type { ConnectionGraphMap } from './context';
3
3
  export declare class GraphConverter {
4
4
  private ctx;
5
- constructor(ctx: ConvertGraphToKiCadContext);
5
+ constructor(ctx: ConnectionGraphMap);
6
6
  convert_to_netlist(): NL_NetList;
7
7
  }
8
8
  //# sourceMappingURL=graph_converter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph_converter.d.ts","sourceRoot":"","sources":["../../../src/converter/graph_to_netlist/graph_converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAIhB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AAE3D,qBAAa,cAAc;IACN,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,0BAA0B;IAEnD,kBAAkB,IAAI,UAAU;CA4ExC"}
1
+ {"version":3,"file":"graph_converter.d.ts","sourceRoot":"","sources":["../../../src/converter/graph_to_netlist/graph_converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAIhB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD,qBAAa,cAAc;IACN,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,kBAAkB;IAE3C,kBAAkB,IAAI,UAAU;CA4ExC"}
@@ -1,9 +1,10 @@
1
1
  import type { BOX2 } from '@modular-circuit/electronics-model';
2
+ export declare const GRID_SIZE: number;
2
3
  export declare function get_power_pos(pwr_number: number): {
3
4
  x: number;
4
5
  y: number;
5
6
  };
6
- export declare const BLOCK_PIN_GAP = 4;
7
+ export declare const BLOCK_PIN_GAP: number;
7
8
  export declare class Layout {
8
9
  private width;
9
10
  private height;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/converter/netlist_to_kicad/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAS9D,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM;;;EAE/C;AAID,eAAO,MAAM,aAAa,IAAI,CAAA;AAM9B,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAgB;IAE7B,OAAO,CAAC,MAAM,CAAgB;IAE9B,OAAO,CAAC,UAAU,CAAI;IAEf,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CA0B7C"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/converter/netlist_to_kicad/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAK9D,eAAO,MAAM,SAAS,QAAiB,CAAA;AASvC,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM;;;EAE/C;AAKD,eAAO,MAAM,aAAa,QAAgB,CAAA;AAO1C,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAgB;IAE7B,OAAO,CAAC,MAAM,CAAgB;IAE9B,OAAO,CAAC,UAAU,CAAI;IAEf,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CA0B7C"}
@@ -1,16 +1,18 @@
1
1
  import { PAPER_SIZE } from '../../utils/constraints';
2
- var POWER_START_Y = 30;
3
- var POWER_START_X = PAPER_SIZE.A4.height - 30;
4
- var POWER_Y_STEP = 16;
2
+ var MIL_TO_MM = 0.0254;
3
+ export var GRID_SIZE = 50 * MIL_TO_MM;
4
+ var POWER_START_Y = 30 * GRID_SIZE;
5
+ var POWER_START_X = (PAPER_SIZE.A4.height - 30) * GRID_SIZE;
6
+ var POWER_Y_STEP = 16 * GRID_SIZE;
5
7
  export function get_power_pos(pwr_number) {
6
8
  return { x: POWER_START_X, y: POWER_START_Y + POWER_Y_STEP * pwr_number };
7
9
  }
8
- var BLOCK_START_Y = 36;
10
+ var BLOCK_START_Y = 36 * GRID_SIZE;
9
11
  var BLOCK_START_X = BLOCK_START_Y;
10
- export var BLOCK_PIN_GAP = 4;
11
- var BLOCK_MARGIN_TOP = 8;
12
- var BLOCK_WIDTH = 36;
13
- var BLOCK_MARGIN_LEFT = 16;
12
+ export var BLOCK_PIN_GAP = 4 * GRID_SIZE;
13
+ var BLOCK_MARGIN_TOP = 8 * GRID_SIZE;
14
+ var BLOCK_WIDTH = 36 * GRID_SIZE;
15
+ var BLOCK_MARGIN_LEFT = 16 * GRID_SIZE;
14
16
  var BLOCK_MARGIN_RIGHT = BLOCK_MARGIN_LEFT;
15
17
  var Layout = /** @class */ (function () {
16
18
  function Layout() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/transpiler",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "Intermediate representation of the modular circuit",
5
5
  "main": "./build/index.js",
6
6
  "files": [
@@ -27,9 +27,9 @@
27
27
  "js-base64": "^3.7.7",
28
28
  "jszip": "^3.10.1",
29
29
  "@modular-circuit/ir": "0.0.58",
30
- "@modular-circuit/utils": "0.0.37",
30
+ "@modular-circuit/electronics-model": "0.0.50",
31
31
  "@modular-circuit/perc": "0.0.58",
32
- "@modular-circuit/electronics-model": "0.0.50"
32
+ "@modular-circuit/utils": "0.0.37"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "rimraf build",