@modular-circuit/ir 0.0.59 → 0.0.62
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/constraints/index.js +1 -1
- package/build/kicad/common/page_size.js +1 -1
- package/build/modular_circuits/eda_port_annotation.js +3 -2
- package/build/modular_circuits/module_resolver.d.ts +12 -0
- package/build/modular_circuits/module_resolver.d.ts.map +1 -1
- package/build/modular_circuits/project.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var MODULAR_CIRCUIT_SCH_EXT = 'modular_circuit';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ELECTRICAL_PINTYPE, convert_label_shape_to_pin_type } from '@modular-circuit/electronics-model';
|
|
2
|
-
export
|
|
2
|
+
export var 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,6 +7,7 @@ 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;
|
|
10
11
|
if (!eda_annotation)
|
|
11
12
|
return {
|
|
12
13
|
pin_type: ELECTRICAL_PINTYPE.PT_UNSPECIFIED,
|
|
@@ -17,7 +18,7 @@ export function parse_eda_annotation(eda_annotation) {
|
|
|
17
18
|
pin_type: convert_label_shape_to_pin_type(eda_annotation.shape),
|
|
18
19
|
port_annot_type: PORT_ANNOT_TYPE.NORMAL_SYMBOL_PIN,
|
|
19
20
|
};
|
|
20
|
-
if ('lib_id' in eda_annotation && eda_annotation.lib_id
|
|
21
|
+
if ('lib_id' in eda_annotation && ((_a = eda_annotation.lib_id) === null || _a === void 0 ? void 0 : _a.endsWith(KICAD_GND_NAME)))
|
|
21
22
|
return { pin_type: ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: PORT_ANNOT_TYPE.GLOBAL_GND_PIN };
|
|
22
23
|
return { pin_type: ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: PORT_ANNOT_TYPE.GLOBAL_POWER_PIN };
|
|
23
24
|
}
|
|
@@ -6,6 +6,10 @@ export interface ModuleName {
|
|
|
6
6
|
export interface ModuleIndex extends ModuleName {
|
|
7
7
|
version: string;
|
|
8
8
|
}
|
|
9
|
+
export type RuntimeModuleCircuit = ModuleCircuit & {
|
|
10
|
+
cate_name: string;
|
|
11
|
+
file_zip: string;
|
|
12
|
+
};
|
|
9
13
|
export interface ModuleResolver {
|
|
10
14
|
/**
|
|
11
15
|
* 获取一个已发布项目(项目)的design(.zip)的url
|
|
@@ -16,5 +20,13 @@ export interface ModuleResolver {
|
|
|
16
20
|
* 获取模块的详细信息
|
|
17
21
|
*/
|
|
18
22
|
get_module_circuit(idx: ModuleIndex): Promise<ModuleCircuit | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* 获取模块的详细信息
|
|
25
|
+
*/
|
|
26
|
+
get_module_circuit_by_id(id: string): Promise<ModuleCircuit | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* 根据后端的id获取一个已发布项目(项目)的design(.zip)的url
|
|
29
|
+
*/
|
|
30
|
+
get_module_achieve_by_id(id: string): Promise<URL | undefined>;
|
|
19
31
|
}
|
|
20
32
|
//# sourceMappingURL=module_resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module_resolver.d.ts","sourceRoot":"","sources":["../../src/modular_circuits/module_resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MA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G,SAAS,CAAC,CAAA;CAEhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var 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.
|
|
3
|
+
"version": "0.0.62",
|
|
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.
|
|
27
|
+
"@modular-circuit/electronics-model": "0.0.54"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"clean": "rimraf build",
|