@modular-circuit/ir 0.1.0 → 0.1.1
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/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +7 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -689,12 +689,14 @@ interface IR_Port extends IR_GraphItem {
|
|
|
689
689
|
type: PortType | string;
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
+
type ModuleCircuitId = string;
|
|
693
|
+
declare const block_is_associated_with_concrete_module: (block_type: IR_Block["type"]) => block_type is ModuleCircuitId;
|
|
692
694
|
interface IR_Block extends IR_GraphItem {
|
|
693
695
|
name?: string;
|
|
694
696
|
/**
|
|
695
|
-
* 模块类型
|
|
697
|
+
* 模块类型(索引),可以是作者+名称,或者直接就是模块ID
|
|
696
698
|
*/
|
|
697
|
-
type: ModuleName;
|
|
699
|
+
type: ModuleName | ModuleCircuitId;
|
|
698
700
|
/**
|
|
699
701
|
* 模块摆到画布上之后的ID
|
|
700
702
|
*/
|
|
@@ -736,4 +738,4 @@ interface IR_Graph extends IR_GraphItem {
|
|
|
736
738
|
|
|
737
739
|
declare const MODULAR_CIRCUIT_SCH_EXT = "modular_circuit";
|
|
738
740
|
|
|
739
|
-
export { type Arc, type BASE_SYMBOL, type Bezier, type BlockBase, type BlockPort, type BomItem, type Bus, type BusAlias, type BusEntry, type Circle, type Component, type ComponentProperty, type ConcreteBlockDesign, type Design, type DesignPort, type Drawing, type EDA_DESIGN, type EDA_ITEM, type EDA_PORT_ANNOTATION, type EDA_PORT_ELECTRICAL_ANNOT, type EDA_TEXT, type EMBEDDED_FILE, type EMBEDDED_FILES, type Effects, FILE_TYPE, type Fill, type Font, type GeneralModuleDesign, type GlobalLabel, type GraphicItem, type HierarchicalLabel, type IR_Block, type IR_GND, type IR_Graph, type IR_GraphItem, type IR_Junction, type IR_Label, type IR_Port, type IR_PowerSym, type IR_Wire, type Junction, type Justify, KICAD_GND_NAME, type KiCadBlock, type LABEL_META, type LIB_SYMBOL, type LIB_SYMBOLS, type LabelType, MODULAR_CIRCUIT_EXT, MODULAR_CIRCUIT_SCH_EXT, type ModuleBlock, type ModuleBom, type ModuleCircuit, type ModuleDesignBase, type ModuleIndex, type ModuleName, type ModuleResolver, type ModuleSpec, type NetLabel, type NoConnect, type PIN_ALTERNATE, type PIN_DEFINITION, type PIN_DISPLAY_OPT, type PIN_INSTANCE, PORT_ANNOT_TYPE, type Paper, PaperSize, type PaperSizeName, type Polyline, type Project, type ProjectDesign, type PublishedProjectDesign, type Rectangle, type ReusableDesign, type RuntimeModuleCircuit, type SCHEMATIC, type SCH_FIELD, type SCH_IMAGE, type SCH_ITEM, type SCH_ITEM_PROPERTY, type SCH_LABEL, type SCH_LINE, type SCH_SHEET, type SCH_SHEET_INSTANCE, type SCH_SHEET_PIN, type SCH_SYMBOL, type SCH_SYMBOL_META, type SCH_SYMBOL_PROPERTIES, type SCH_TEXT, type SCH_TEXT_BOX, type SERIALIZABLE, SHAPE_T, SHEET_FIELD_TYPE, type SYMBOL_INSTANCE, type SheetInstance, type SheetInstances, type Stroke, type Tag, type TextBox, type TitleBlock, parse_eda_annotation };
|
|
741
|
+
export { type Arc, type BASE_SYMBOL, type Bezier, type BlockBase, type BlockPort, type BomItem, type Bus, type BusAlias, type BusEntry, type Circle, type Component, type ComponentProperty, type ConcreteBlockDesign, type Design, type DesignPort, type Drawing, type EDA_DESIGN, type EDA_ITEM, type EDA_PORT_ANNOTATION, type EDA_PORT_ELECTRICAL_ANNOT, type EDA_TEXT, type EMBEDDED_FILE, type EMBEDDED_FILES, type Effects, FILE_TYPE, type Fill, type Font, type GeneralModuleDesign, type GlobalLabel, type GraphicItem, type HierarchicalLabel, type IR_Block, type IR_GND, type IR_Graph, type IR_GraphItem, type IR_Junction, type IR_Label, type IR_Port, type IR_PowerSym, type IR_Wire, type Junction, type Justify, KICAD_GND_NAME, type KiCadBlock, type LABEL_META, type LIB_SYMBOL, type LIB_SYMBOLS, type LabelType, MODULAR_CIRCUIT_EXT, MODULAR_CIRCUIT_SCH_EXT, type ModuleBlock, type ModuleBom, type ModuleCircuit, type ModuleCircuitId, type ModuleDesignBase, type ModuleIndex, type ModuleName, type ModuleResolver, type ModuleSpec, type NetLabel, type NoConnect, type PIN_ALTERNATE, type PIN_DEFINITION, type PIN_DISPLAY_OPT, type PIN_INSTANCE, PORT_ANNOT_TYPE, type Paper, PaperSize, type PaperSizeName, type Polyline, type Project, type ProjectDesign, type PublishedProjectDesign, type Rectangle, type ReusableDesign, type RuntimeModuleCircuit, type SCHEMATIC, type SCH_FIELD, type SCH_IMAGE, type SCH_ITEM, type SCH_ITEM_PROPERTY, type SCH_LABEL, type SCH_LINE, type SCH_SHEET, type SCH_SHEET_INSTANCE, type SCH_SHEET_PIN, type SCH_SYMBOL, type SCH_SYMBOL_META, type SCH_SYMBOL_PROPERTIES, type SCH_TEXT, type SCH_TEXT_BOX, type SERIALIZABLE, SHAPE_T, SHEET_FIELD_TYPE, type SYMBOL_INSTANCE, type SheetInstance, type SheetInstances, type Stroke, type Tag, type TextBox, type TitleBlock, block_is_associated_with_concrete_module, parse_eda_annotation };
|
package/dist/index.d.ts
CHANGED
|
@@ -689,12 +689,14 @@ interface IR_Port extends IR_GraphItem {
|
|
|
689
689
|
type: PortType | string;
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
+
type ModuleCircuitId = string;
|
|
693
|
+
declare const block_is_associated_with_concrete_module: (block_type: IR_Block["type"]) => block_type is ModuleCircuitId;
|
|
692
694
|
interface IR_Block extends IR_GraphItem {
|
|
693
695
|
name?: string;
|
|
694
696
|
/**
|
|
695
|
-
* 模块类型
|
|
697
|
+
* 模块类型(索引),可以是作者+名称,或者直接就是模块ID
|
|
696
698
|
*/
|
|
697
|
-
type: ModuleName;
|
|
699
|
+
type: ModuleName | ModuleCircuitId;
|
|
698
700
|
/**
|
|
699
701
|
* 模块摆到画布上之后的ID
|
|
700
702
|
*/
|
|
@@ -736,4 +738,4 @@ interface IR_Graph extends IR_GraphItem {
|
|
|
736
738
|
|
|
737
739
|
declare const MODULAR_CIRCUIT_SCH_EXT = "modular_circuit";
|
|
738
740
|
|
|
739
|
-
export { type Arc, type BASE_SYMBOL, type Bezier, type BlockBase, type BlockPort, type BomItem, type Bus, type BusAlias, type BusEntry, type Circle, type Component, type ComponentProperty, type ConcreteBlockDesign, type Design, type DesignPort, type Drawing, type EDA_DESIGN, type EDA_ITEM, type EDA_PORT_ANNOTATION, type EDA_PORT_ELECTRICAL_ANNOT, type EDA_TEXT, type EMBEDDED_FILE, type EMBEDDED_FILES, type Effects, FILE_TYPE, type Fill, type Font, type GeneralModuleDesign, type GlobalLabel, type GraphicItem, type HierarchicalLabel, type IR_Block, type IR_GND, type IR_Graph, type IR_GraphItem, type IR_Junction, type IR_Label, type IR_Port, type IR_PowerSym, type IR_Wire, type Junction, type Justify, KICAD_GND_NAME, type KiCadBlock, type LABEL_META, type LIB_SYMBOL, type LIB_SYMBOLS, type LabelType, MODULAR_CIRCUIT_EXT, MODULAR_CIRCUIT_SCH_EXT, type ModuleBlock, type ModuleBom, type ModuleCircuit, type ModuleDesignBase, type ModuleIndex, type ModuleName, type ModuleResolver, type ModuleSpec, type NetLabel, type NoConnect, type PIN_ALTERNATE, type PIN_DEFINITION, type PIN_DISPLAY_OPT, type PIN_INSTANCE, PORT_ANNOT_TYPE, type Paper, PaperSize, type PaperSizeName, type Polyline, type Project, type ProjectDesign, type PublishedProjectDesign, type Rectangle, type ReusableDesign, type RuntimeModuleCircuit, type SCHEMATIC, type SCH_FIELD, type SCH_IMAGE, type SCH_ITEM, type SCH_ITEM_PROPERTY, type SCH_LABEL, type SCH_LINE, type SCH_SHEET, type SCH_SHEET_INSTANCE, type SCH_SHEET_PIN, type SCH_SYMBOL, type SCH_SYMBOL_META, type SCH_SYMBOL_PROPERTIES, type SCH_TEXT, type SCH_TEXT_BOX, type SERIALIZABLE, SHAPE_T, SHEET_FIELD_TYPE, type SYMBOL_INSTANCE, type SheetInstance, type SheetInstances, type Stroke, type Tag, type TextBox, type TitleBlock, parse_eda_annotation };
|
|
741
|
+
export { type Arc, type BASE_SYMBOL, type Bezier, type BlockBase, type BlockPort, type BomItem, type Bus, type BusAlias, type BusEntry, type Circle, type Component, type ComponentProperty, type ConcreteBlockDesign, type Design, type DesignPort, type Drawing, type EDA_DESIGN, type EDA_ITEM, type EDA_PORT_ANNOTATION, type EDA_PORT_ELECTRICAL_ANNOT, type EDA_TEXT, type EMBEDDED_FILE, type EMBEDDED_FILES, type Effects, FILE_TYPE, type Fill, type Font, type GeneralModuleDesign, type GlobalLabel, type GraphicItem, type HierarchicalLabel, type IR_Block, type IR_GND, type IR_Graph, type IR_GraphItem, type IR_Junction, type IR_Label, type IR_Port, type IR_PowerSym, type IR_Wire, type Junction, type Justify, KICAD_GND_NAME, type KiCadBlock, type LABEL_META, type LIB_SYMBOL, type LIB_SYMBOLS, type LabelType, MODULAR_CIRCUIT_EXT, MODULAR_CIRCUIT_SCH_EXT, type ModuleBlock, type ModuleBom, type ModuleCircuit, type ModuleCircuitId, type ModuleDesignBase, type ModuleIndex, type ModuleName, type ModuleResolver, type ModuleSpec, type NetLabel, type NoConnect, type PIN_ALTERNATE, type PIN_DEFINITION, type PIN_DISPLAY_OPT, type PIN_INSTANCE, PORT_ANNOT_TYPE, type Paper, PaperSize, type PaperSizeName, type Polyline, type Project, type ProjectDesign, type PublishedProjectDesign, type Rectangle, type ReusableDesign, type RuntimeModuleCircuit, type SCHEMATIC, type SCH_FIELD, type SCH_IMAGE, type SCH_ITEM, type SCH_ITEM_PROPERTY, type SCH_LABEL, type SCH_LINE, type SCH_SHEET, type SCH_SHEET_INSTANCE, type SCH_SHEET_PIN, type SCH_SYMBOL, type SCH_SYMBOL_META, type SCH_SYMBOL_PROPERTIES, type SCH_TEXT, type SCH_TEXT_BOX, type SERIALIZABLE, SHAPE_T, SHEET_FIELD_TYPE, type SYMBOL_INSTANCE, type SheetInstance, type SheetInstances, type Stroke, type Tag, type TextBox, type TitleBlock, block_is_associated_with_concrete_module, parse_eda_annotation };
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __export(index_exports, {
|
|
|
28
28
|
PaperSize: () => PaperSize,
|
|
29
29
|
SHAPE_T: () => SHAPE_T,
|
|
30
30
|
SHEET_FIELD_TYPE: () => SHEET_FIELD_TYPE,
|
|
31
|
+
block_is_associated_with_concrete_module: () => block_is_associated_with_concrete_module,
|
|
31
32
|
parse_eda_annotation: () => parse_eda_annotation
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -108,6 +109,11 @@ function parse_eda_annotation(eda_annotation) {
|
|
|
108
109
|
return { pin_type: import_electronics_model.ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: 2 /* GLOBAL_POWER_PIN */ };
|
|
109
110
|
}
|
|
110
111
|
|
|
112
|
+
// src/graph/ir_block.ts
|
|
113
|
+
var block_is_associated_with_concrete_module = (block_type) => {
|
|
114
|
+
return typeof block_type === "string";
|
|
115
|
+
};
|
|
116
|
+
|
|
111
117
|
// src/constraints/index.ts
|
|
112
118
|
var MODULAR_CIRCUIT_SCH_EXT = "modular_circuit";
|
|
113
119
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -120,5 +126,6 @@ var MODULAR_CIRCUIT_SCH_EXT = "modular_circuit";
|
|
|
120
126
|
PaperSize,
|
|
121
127
|
SHAPE_T,
|
|
122
128
|
SHEET_FIELD_TYPE,
|
|
129
|
+
block_is_associated_with_concrete_module,
|
|
123
130
|
parse_eda_annotation
|
|
124
131
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -74,6 +74,11 @@ function parse_eda_annotation(eda_annotation) {
|
|
|
74
74
|
return { pin_type: ELECTRICAL_PINTYPE.PT_POWER_IN, port_annot_type: 2 /* GLOBAL_POWER_PIN */ };
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// src/graph/ir_block.ts
|
|
78
|
+
var block_is_associated_with_concrete_module = (block_type) => {
|
|
79
|
+
return typeof block_type === "string";
|
|
80
|
+
};
|
|
81
|
+
|
|
77
82
|
// src/constraints/index.ts
|
|
78
83
|
var MODULAR_CIRCUIT_SCH_EXT = "modular_circuit";
|
|
79
84
|
export {
|
|
@@ -85,5 +90,6 @@ export {
|
|
|
85
90
|
PaperSize,
|
|
86
91
|
SHAPE_T,
|
|
87
92
|
SHEET_FIELD_TYPE,
|
|
93
|
+
block_is_associated_with_concrete_module,
|
|
88
94
|
parse_eda_annotation
|
|
89
95
|
};
|