@modular-circuit/transpiler 0.0.58 → 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.
- package/build/builder/graph_to_kicad/do_convert_graph_to_kicad_project.js +19 -106
- package/build/builder/graph_to_kicad/index.js +4 -59
- package/build/converter/graph_to_netlist/graph_converter.js +51 -171
- package/build/converter/kicad_sexpr/eeschema/drawing_sheet/sch_default_drawing_sheet.js +1 -1
- package/build/converter/kicad_sexpr/eeschema/printer.js +228 -281
- package/build/converter/link_to_netlist/converter.js +77 -135
- package/build/converter/link_to_netlist/links/converter_base.js +38 -131
- package/build/converter/link_to_netlist/links/converters.js +316 -554
- package/build/converter/netlist_to_kicad/layout.js +19 -23
- package/build/converter/netlist_to_kicad/netlist_converter.js +74 -167
- package/build/kicad/constraints/index.js +1 -1
- package/build/kicad/label/net_label.js +2 -2
- package/build/kicad/label/sheet_pin.js +11 -19
- package/build/kicad/project/kicad_prl.js +3 -3
- package/build/kicad/project/kicad_pro.js +4 -4
- package/build/kicad/project/kicad_project_achieve.js +31 -45
- package/build/kicad/project/wildcards_and_files_ext.js +61 -61
- package/build/kicad/sheet/sheet.js +3 -3
- package/build/kicad/symbols/lib_symbol/gnd.js +6 -6
- package/build/kicad/symbols/lib_symbol/vcc.js +7 -7
- package/build/kicad/symbols/sch_symbol/gnd.js +9 -9
- package/build/kicad/symbols/sch_symbol/vcc.js +9 -9
- package/build/kicad/symbols/symbol_utils.js +1 -1
- package/build/utils/collect_sub_sheets.js +32 -146
- package/build/utils/constraints.js +6 -6
- package/build/utils/filter_null_undefined.js +2 -31
- package/build/utils/string_formatter.js +23 -29
- package/package.json +5 -5
|
@@ -1,35 +1,29 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const tab = '\t';
|
|
2
|
+
export class StringFormatter {
|
|
3
|
+
intend;
|
|
4
|
+
content = '';
|
|
5
|
+
constructor(intend = 0) {
|
|
5
6
|
this.intend = intend;
|
|
6
|
-
this.content = '';
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
toString() {
|
|
9
9
|
return this.content;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
enumerable: false,
|
|
16
|
-
configurable: true
|
|
17
|
-
});
|
|
18
|
-
StringFormatter.prototype.enter_scope = function () {
|
|
10
|
+
}
|
|
11
|
+
get intend_level() {
|
|
12
|
+
return this.intend;
|
|
13
|
+
}
|
|
14
|
+
enter_scope() {
|
|
19
15
|
this.intend += 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
16
|
+
}
|
|
17
|
+
exit_scope() {
|
|
22
18
|
this.intend -= 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
19
|
+
}
|
|
20
|
+
append(str) {
|
|
25
21
|
this.content += str;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
this.content +=
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
this.append("
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}());
|
|
35
|
-
export { StringFormatter };
|
|
22
|
+
}
|
|
23
|
+
append_line(str) {
|
|
24
|
+
this.content += `${tab.repeat(this.intend)}${str}`;
|
|
25
|
+
}
|
|
26
|
+
append_quote(str) {
|
|
27
|
+
this.append(`"${str}"`);
|
|
28
|
+
}
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modular-circuit/transpiler",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"description": "Intermediate representation of the modular circuit",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"js-base64": "^3.7.7",
|
|
28
28
|
"jszip": "^3.10.1",
|
|
29
|
-
"@modular-circuit/ir": "0.0.
|
|
30
|
-
"@modular-circuit/
|
|
31
|
-
"@modular-circuit/
|
|
32
|
-
"@modular-circuit/
|
|
29
|
+
"@modular-circuit/ir": "0.0.52",
|
|
30
|
+
"@modular-circuit/electronics-model": "0.0.44",
|
|
31
|
+
"@modular-circuit/perc": "0.0.52",
|
|
32
|
+
"@modular-circuit/utils": "0.0.30"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"clean": "rimraf build",
|