@modular-circuit/transpiler 0.1.9 → 0.1.12
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 -63
- package/dist/index.d.ts +5 -63
- package/dist/index.js +105 -271
- package/dist/index.mjs +102 -204
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VECTOR2, At, Color, ConnectionGraph, NL_NetList, BOX2 } from '@modular-circuit/electronics-model';
|
|
2
|
-
import { SCHEMATIC, PIN_DISPLAY_OPT, LIB_SYMBOL, Drawing, PIN_DEFINITION, SCH_LABEL, SCH_SYMBOL, SCH_LINE, PIN_INSTANCE, SCH_SHEET, SCH_SHEET_PIN, Effects, Justify, SCH_FIELD, Fill, Stroke, Project, IR_Graph, ModuleResolver, ModuleCircuit
|
|
2
|
+
import { SCHEMATIC, PIN_DISPLAY_OPT, LIB_SYMBOL, Drawing, PIN_DEFINITION, SCH_LABEL, SCH_SYMBOL, SCH_LINE, PIN_INSTANCE, SCH_SHEET, SCH_SHEET_PIN, Effects, Justify, SCH_FIELD, Fill, Stroke, Project, IR_Graph, DesignBlockContent, ModuleResolver, ModuleCircuit } from '@modular-circuit/ir';
|
|
3
3
|
import { CG_SCHEMATIC, CONNECTION_GRAPH_BUILDER_CTX } from '@modular-circuit/perc';
|
|
4
4
|
|
|
5
5
|
declare function get_sch_default_drawing_sheet(): string;
|
|
@@ -128,69 +128,11 @@ declare class NetListConverter {
|
|
|
128
128
|
private convert_net_label;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
declare function convert_graph_to_sheets(ctx: ConvertGraphToKiCadInput): Promise<Record<string, string>>;
|
|
132
|
+
|
|
131
133
|
declare function convert_graph_to_kicad_project(ctx: ConvertGraphToKiCadInput): Promise<Blob>;
|
|
132
134
|
|
|
133
|
-
declare
|
|
134
|
-
declare const SchematicSymbolFileExtension = "sym";
|
|
135
|
-
declare const LegacySymbolLibFileExtension = "lib";
|
|
136
|
-
declare const LegacySymbolDocumentFileExtension = "dcm";
|
|
137
|
-
declare const VrmlFileExtension = "wrl";
|
|
138
|
-
declare const ProjectFileExtension = "kicad_pro";
|
|
139
|
-
declare const LegacyProjectFileExtension = "pro";
|
|
140
|
-
declare const ProjectLocalSettingsFileExtension = "kicad_prl";
|
|
141
|
-
declare const LegacySchematicFileExtension = "sch";
|
|
142
|
-
declare const CadstarSchematicFileExtension = "csa";
|
|
143
|
-
declare const CadstarPartsLibraryFileExtension = "lib";
|
|
144
|
-
declare const KiCadSchematicFileExtension = "kicad_sch";
|
|
145
|
-
declare const SpiceFileExtension = "cir";
|
|
146
|
-
declare const CadstarNetlistFileExtension = "frp";
|
|
147
|
-
declare const OrCadPcb2NetlistFileExtension = "net";
|
|
148
|
-
declare const NetlistFileExtension = "net";
|
|
149
|
-
declare const AllegroNetlistFileExtension = "txt";
|
|
150
|
-
declare const FootprintAssignmentFileExtension = "cmp";
|
|
151
|
-
declare const GerberFileExtension = "gbr";
|
|
152
|
-
declare const GerberJobFileExtension = "gbrjob";
|
|
153
|
-
declare const HtmlFileExtension = "html";
|
|
154
|
-
declare const EquFileExtension = "equ";
|
|
155
|
-
declare const HotkeyFileExtension = "hotkeys";
|
|
156
|
-
declare const DatabaseLibraryFileExtension = "kicad_dbl";
|
|
157
|
-
declare const HTTPLibraryFileExtension = "kicad_httplib";
|
|
158
|
-
declare const ArchiveFileExtension = "zip";
|
|
159
|
-
declare const LegacyPcbFileExtension = "brd";
|
|
160
|
-
declare const EaglePcbFileExtension = "brd";
|
|
161
|
-
declare const CadstarPcbFileExtension = "cpa";
|
|
162
|
-
declare const KiCadPcbFileExtension = "kicad_pcb";
|
|
163
|
-
declare const DrawingSheetFileExtension = "kicad_wks";
|
|
164
|
-
declare const DesignRulesFileExtension = "kicad_dru";
|
|
165
|
-
declare const PdfFileExtension = "pdf";
|
|
166
|
-
declare const MacrosFileExtension = "mcr";
|
|
167
|
-
declare const DrillFileExtension = "drl";
|
|
168
|
-
declare const SVGFileExtension = "svg";
|
|
169
|
-
declare const ReportFileExtension = "rpt";
|
|
170
|
-
declare const FootprintPlaceFileExtension = "pos";
|
|
171
|
-
declare const KiCadFootprintLibPathExtension = "pretty";
|
|
172
|
-
declare const LegacyFootprintLibPathExtension = "mod";
|
|
173
|
-
declare const AltiumFootprintLibPathExtension = "PcbLib";
|
|
174
|
-
declare const CadstarFootprintLibPathExtension = "cpa";
|
|
175
|
-
declare const EagleFootprintLibPathExtension = "lbr";
|
|
176
|
-
declare const GedaPcbFootprintLibFileExtension = "fp";
|
|
177
|
-
declare const KiCadFootprintFileExtension = "kicad_mod";
|
|
178
|
-
declare const SpecctraDsnFileExtension = "dsn";
|
|
179
|
-
declare const SpecctraSessionFileExtension = "ses";
|
|
180
|
-
declare const IpcD356FileExtension = "d356";
|
|
181
|
-
declare const Ipc2581FileExtension = "xml";
|
|
182
|
-
declare const WorkbookFileExtension = "wbk";
|
|
183
|
-
declare const PngFileExtension = "png";
|
|
184
|
-
declare const JpegFileExtension = "jpg";
|
|
185
|
-
declare const TextFileExtension = "txt";
|
|
186
|
-
declare const MarkdownFileExtension = "md";
|
|
187
|
-
declare const CsvFileExtension = "csv";
|
|
188
|
-
declare const XmlFileExtension = "xml";
|
|
189
|
-
declare const JsonFileExtension = "json";
|
|
190
|
-
declare const StepFileExtension = "step";
|
|
191
|
-
declare const StepFileAbrvExtension = "stp";
|
|
192
|
-
declare const GltfBinaryFileExtension = "glb";
|
|
193
|
-
declare const GerberFileExtensionsRegex: RegExp;
|
|
135
|
+
declare function convert_graph_to_design_block(ctx: ConvertGraphToKiCadInput): Promise<DesignBlockContent>;
|
|
194
136
|
|
|
195
137
|
declare const KICAD_SCH_FRAME: string;
|
|
196
138
|
declare class KiCadProjectArchive {
|
|
@@ -478,4 +420,4 @@ declare const gen_sch_gnd: (value: string, pwr_number: number, port_id: string,
|
|
|
478
420
|
|
|
479
421
|
declare const gen_sch_vcc: (value: string, pwr_number: number, port_id: string, position: VECTOR2) => SCH_SYMBOL;
|
|
480
422
|
|
|
481
|
-
export {
|
|
423
|
+
export { BLOCK_PIN_GAP, BLOCK_PIN_TB_MARGIN, type BlockLabelPadding, type BlockSize, type BoxGeometry, type ConnectionGraphMap, type ConvertGraphToKiCadContext, type ConvertGraphToKiCadInput, DEFAULT_PAPER_SIZE, FONT_SIZE, GENERATOR_NAME, GENERATOR_VERSION, GRID_SIZE, GraphConverter, KICAD_SCH_FRAME, KiCadProjectArchive, type LabelPadding, Layout, NetListConverter, type NetlistProject, type NetlistToKicadContext, PAPER, PAPER_SIZE, SCHEMATIC_PRINTER, SCH_VERSION, type Size, StringFormatter, WIRE_PADDING, collect_sub_sheets, collect_sub_sheets_by_id, convert_graph_to_design_block, convert_graph_to_kicad_project, convert_graph_to_sheets, filterNullOrUndefined, gen_lib_gnd, gen_lib_vcc, gen_sch_gnd, gen_sch_vcc, get_power_pos, get_sch_default_drawing_sheet, tab };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VECTOR2, At, Color, ConnectionGraph, NL_NetList, BOX2 } from '@modular-circuit/electronics-model';
|
|
2
|
-
import { SCHEMATIC, PIN_DISPLAY_OPT, LIB_SYMBOL, Drawing, PIN_DEFINITION, SCH_LABEL, SCH_SYMBOL, SCH_LINE, PIN_INSTANCE, SCH_SHEET, SCH_SHEET_PIN, Effects, Justify, SCH_FIELD, Fill, Stroke, Project, IR_Graph, ModuleResolver, ModuleCircuit
|
|
2
|
+
import { SCHEMATIC, PIN_DISPLAY_OPT, LIB_SYMBOL, Drawing, PIN_DEFINITION, SCH_LABEL, SCH_SYMBOL, SCH_LINE, PIN_INSTANCE, SCH_SHEET, SCH_SHEET_PIN, Effects, Justify, SCH_FIELD, Fill, Stroke, Project, IR_Graph, DesignBlockContent, ModuleResolver, ModuleCircuit } from '@modular-circuit/ir';
|
|
3
3
|
import { CG_SCHEMATIC, CONNECTION_GRAPH_BUILDER_CTX } from '@modular-circuit/perc';
|
|
4
4
|
|
|
5
5
|
declare function get_sch_default_drawing_sheet(): string;
|
|
@@ -128,69 +128,11 @@ declare class NetListConverter {
|
|
|
128
128
|
private convert_net_label;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
declare function convert_graph_to_sheets(ctx: ConvertGraphToKiCadInput): Promise<Record<string, string>>;
|
|
132
|
+
|
|
131
133
|
declare function convert_graph_to_kicad_project(ctx: ConvertGraphToKiCadInput): Promise<Blob>;
|
|
132
134
|
|
|
133
|
-
declare
|
|
134
|
-
declare const SchematicSymbolFileExtension = "sym";
|
|
135
|
-
declare const LegacySymbolLibFileExtension = "lib";
|
|
136
|
-
declare const LegacySymbolDocumentFileExtension = "dcm";
|
|
137
|
-
declare const VrmlFileExtension = "wrl";
|
|
138
|
-
declare const ProjectFileExtension = "kicad_pro";
|
|
139
|
-
declare const LegacyProjectFileExtension = "pro";
|
|
140
|
-
declare const ProjectLocalSettingsFileExtension = "kicad_prl";
|
|
141
|
-
declare const LegacySchematicFileExtension = "sch";
|
|
142
|
-
declare const CadstarSchematicFileExtension = "csa";
|
|
143
|
-
declare const CadstarPartsLibraryFileExtension = "lib";
|
|
144
|
-
declare const KiCadSchematicFileExtension = "kicad_sch";
|
|
145
|
-
declare const SpiceFileExtension = "cir";
|
|
146
|
-
declare const CadstarNetlistFileExtension = "frp";
|
|
147
|
-
declare const OrCadPcb2NetlistFileExtension = "net";
|
|
148
|
-
declare const NetlistFileExtension = "net";
|
|
149
|
-
declare const AllegroNetlistFileExtension = "txt";
|
|
150
|
-
declare const FootprintAssignmentFileExtension = "cmp";
|
|
151
|
-
declare const GerberFileExtension = "gbr";
|
|
152
|
-
declare const GerberJobFileExtension = "gbrjob";
|
|
153
|
-
declare const HtmlFileExtension = "html";
|
|
154
|
-
declare const EquFileExtension = "equ";
|
|
155
|
-
declare const HotkeyFileExtension = "hotkeys";
|
|
156
|
-
declare const DatabaseLibraryFileExtension = "kicad_dbl";
|
|
157
|
-
declare const HTTPLibraryFileExtension = "kicad_httplib";
|
|
158
|
-
declare const ArchiveFileExtension = "zip";
|
|
159
|
-
declare const LegacyPcbFileExtension = "brd";
|
|
160
|
-
declare const EaglePcbFileExtension = "brd";
|
|
161
|
-
declare const CadstarPcbFileExtension = "cpa";
|
|
162
|
-
declare const KiCadPcbFileExtension = "kicad_pcb";
|
|
163
|
-
declare const DrawingSheetFileExtension = "kicad_wks";
|
|
164
|
-
declare const DesignRulesFileExtension = "kicad_dru";
|
|
165
|
-
declare const PdfFileExtension = "pdf";
|
|
166
|
-
declare const MacrosFileExtension = "mcr";
|
|
167
|
-
declare const DrillFileExtension = "drl";
|
|
168
|
-
declare const SVGFileExtension = "svg";
|
|
169
|
-
declare const ReportFileExtension = "rpt";
|
|
170
|
-
declare const FootprintPlaceFileExtension = "pos";
|
|
171
|
-
declare const KiCadFootprintLibPathExtension = "pretty";
|
|
172
|
-
declare const LegacyFootprintLibPathExtension = "mod";
|
|
173
|
-
declare const AltiumFootprintLibPathExtension = "PcbLib";
|
|
174
|
-
declare const CadstarFootprintLibPathExtension = "cpa";
|
|
175
|
-
declare const EagleFootprintLibPathExtension = "lbr";
|
|
176
|
-
declare const GedaPcbFootprintLibFileExtension = "fp";
|
|
177
|
-
declare const KiCadFootprintFileExtension = "kicad_mod";
|
|
178
|
-
declare const SpecctraDsnFileExtension = "dsn";
|
|
179
|
-
declare const SpecctraSessionFileExtension = "ses";
|
|
180
|
-
declare const IpcD356FileExtension = "d356";
|
|
181
|
-
declare const Ipc2581FileExtension = "xml";
|
|
182
|
-
declare const WorkbookFileExtension = "wbk";
|
|
183
|
-
declare const PngFileExtension = "png";
|
|
184
|
-
declare const JpegFileExtension = "jpg";
|
|
185
|
-
declare const TextFileExtension = "txt";
|
|
186
|
-
declare const MarkdownFileExtension = "md";
|
|
187
|
-
declare const CsvFileExtension = "csv";
|
|
188
|
-
declare const XmlFileExtension = "xml";
|
|
189
|
-
declare const JsonFileExtension = "json";
|
|
190
|
-
declare const StepFileExtension = "step";
|
|
191
|
-
declare const StepFileAbrvExtension = "stp";
|
|
192
|
-
declare const GltfBinaryFileExtension = "glb";
|
|
193
|
-
declare const GerberFileExtensionsRegex: RegExp;
|
|
135
|
+
declare function convert_graph_to_design_block(ctx: ConvertGraphToKiCadInput): Promise<DesignBlockContent>;
|
|
194
136
|
|
|
195
137
|
declare const KICAD_SCH_FRAME: string;
|
|
196
138
|
declare class KiCadProjectArchive {
|
|
@@ -478,4 +420,4 @@ declare const gen_sch_gnd: (value: string, pwr_number: number, port_id: string,
|
|
|
478
420
|
|
|
479
421
|
declare const gen_sch_vcc: (value: string, pwr_number: number, port_id: string, position: VECTOR2) => SCH_SYMBOL;
|
|
480
422
|
|
|
481
|
-
export {
|
|
423
|
+
export { BLOCK_PIN_GAP, BLOCK_PIN_TB_MARGIN, type BlockLabelPadding, type BlockSize, type BoxGeometry, type ConnectionGraphMap, type ConvertGraphToKiCadContext, type ConvertGraphToKiCadInput, DEFAULT_PAPER_SIZE, FONT_SIZE, GENERATOR_NAME, GENERATOR_VERSION, GRID_SIZE, GraphConverter, KICAD_SCH_FRAME, KiCadProjectArchive, type LabelPadding, Layout, NetListConverter, type NetlistProject, type NetlistToKicadContext, PAPER, PAPER_SIZE, SCHEMATIC_PRINTER, SCH_VERSION, type Size, StringFormatter, WIRE_PADDING, collect_sub_sheets, collect_sub_sheets_by_id, convert_graph_to_design_block, convert_graph_to_kicad_project, convert_graph_to_sheets, filterNullOrUndefined, gen_lib_gnd, gen_lib_vcc, gen_sch_gnd, gen_sch_vcc, get_power_pos, get_sch_default_drawing_sheet, tab };
|