@modular-circuit/transpiler 0.0.61 → 0.0.63
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.
|
@@ -41,11 +41,9 @@ class SCHEMATIC_PRINTER {
|
|
|
41
41
|
)
|
|
42
42
|
`;
|
|
43
43
|
}
|
|
44
|
-
@utils_2.filterNullOrUndefined
|
|
45
44
|
power(power) {
|
|
46
45
|
return power ? '(power)' : '';
|
|
47
46
|
}
|
|
48
|
-
@utils_2.filterNullOrUndefined
|
|
49
47
|
pin_display_opt(opt) {
|
|
50
48
|
if (!opt)
|
|
51
49
|
return;
|
|
@@ -69,7 +67,6 @@ class SCHEMATIC_PRINTER {
|
|
|
69
67
|
)
|
|
70
68
|
`;
|
|
71
69
|
}
|
|
72
|
-
@utils_2.filterNullOrUndefined
|
|
73
70
|
lib_children(libs) {
|
|
74
71
|
if (!libs)
|
|
75
72
|
return '';
|
|
@@ -78,7 +75,6 @@ class SCHEMATIC_PRINTER {
|
|
|
78
75
|
pts(points) {
|
|
79
76
|
return `(pts ${points.map((i) => `(xy ${i.x} ${i.y} )`).join(SPACE)})`;
|
|
80
77
|
}
|
|
81
|
-
@utils_2.filterNullOrUndefined
|
|
82
78
|
drawings(draws) {
|
|
83
79
|
if (!draws)
|
|
84
80
|
return;
|
|
@@ -97,7 +93,6 @@ class SCHEMATIC_PRINTER {
|
|
|
97
93
|
}
|
|
98
94
|
throw new Error(`Unhandled drawing ${draw}`);
|
|
99
95
|
}
|
|
100
|
-
@utils_2.filterNullOrUndefined
|
|
101
96
|
pin_defs(defs) {
|
|
102
97
|
if (!defs)
|
|
103
98
|
return;
|
|
@@ -123,7 +118,6 @@ class SCHEMATIC_PRINTER {
|
|
|
123
118
|
${this.uuid(label.uuid)}
|
|
124
119
|
)`;
|
|
125
120
|
}
|
|
126
|
-
@utils_2.filterNullOrUndefined
|
|
127
121
|
unit(c) {
|
|
128
122
|
return `(unit ${c})`;
|
|
129
123
|
}
|
|
@@ -137,7 +131,6 @@ class SCHEMATIC_PRINTER {
|
|
|
137
131
|
${sch_symbol.pins.map((pin) => this.sch_symbol_pin(pin)).join(SCOPE_START)}
|
|
138
132
|
)`;
|
|
139
133
|
}
|
|
140
|
-
@utils_2.filterNullOrUndefined
|
|
141
134
|
lib_id(id) {
|
|
142
135
|
if (!id)
|
|
143
136
|
return;
|
|
@@ -178,7 +171,6 @@ class SCHEMATIC_PRINTER {
|
|
|
178
171
|
)${this.justify(e.justify)}${e.hide ? '(hide yes)' : ''}
|
|
179
172
|
)`;
|
|
180
173
|
}
|
|
181
|
-
@utils_2.filterNullOrUndefined
|
|
182
174
|
justify(justify) {
|
|
183
175
|
if (!justify)
|
|
184
176
|
return;
|
|
@@ -194,7 +186,6 @@ class SCHEMATIC_PRINTER {
|
|
|
194
186
|
}
|
|
195
187
|
return res.join(SCOPE_START);
|
|
196
188
|
}
|
|
197
|
-
@utils_2.filterNullOrUndefined
|
|
198
189
|
fields(fields) {
|
|
199
190
|
if (!fields)
|
|
200
191
|
return;
|
|
@@ -206,7 +197,6 @@ class SCHEMATIC_PRINTER {
|
|
|
206
197
|
${this.effects(field.effects)}
|
|
207
198
|
)`;
|
|
208
199
|
}
|
|
209
|
-
@utils_2.filterNullOrUndefined
|
|
210
200
|
fill(f) {
|
|
211
201
|
if (!f)
|
|
212
202
|
return;
|
|
@@ -218,7 +208,6 @@ class SCHEMATIC_PRINTER {
|
|
|
218
208
|
fields_autoplaced() {
|
|
219
209
|
return '(fields_autoplaced yes)';
|
|
220
210
|
}
|
|
221
|
-
@utils_2.filterNullOrUndefined
|
|
222
211
|
stroke(s) {
|
|
223
212
|
if (!s)
|
|
224
213
|
return;
|
|
@@ -228,7 +217,6 @@ class SCHEMATIC_PRINTER {
|
|
|
228
217
|
${this.color(s.color)}
|
|
229
218
|
)`;
|
|
230
219
|
}
|
|
231
|
-
@utils_2.filterNullOrUndefined
|
|
232
220
|
color(c) {
|
|
233
221
|
if (!c)
|
|
234
222
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=filter_null_undefined.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_null_undefined.d.ts","sourceRoot":"","sources":["../../src/utils/filter_null_undefined.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"filter_null_undefined.d.ts","sourceRoot":"","sources":["../../src/utils/filter_null_undefined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,CAAA"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterNullOrUndefined = filterNullOrUndefined;
|
|
4
|
-
function filterNullOrUndefined(originalMethod, _context) {
|
|
5
|
-
function replacementMethod(...args) {
|
|
6
|
-
if (args.length === 0 || (args.length === 1 && (args[0] === undefined || args[0] === null)))
|
|
7
|
-
return '';
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
const result = originalMethod.call(this, ...args);
|
|
10
|
-
return result;
|
|
11
|
-
}
|
|
12
|
-
return replacementMethod;
|
|
13
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modular-circuit/transpiler",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.63",
|
|
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.56",
|
|
30
|
+
"@modular-circuit/utils": "0.0.34",
|
|
31
|
+
"@modular-circuit/perc": "0.0.56",
|
|
32
|
+
"@modular-circuit/electronics-model": "0.0.48"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"clean": "rimraf build",
|