@intelligentelectron/universal-netlist 0.0.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/LICENSE +190 -0
  3. package/NOTICE +4 -0
  4. package/README.md +246 -0
  5. package/dist/circuit-traversal.d.ts +73 -0
  6. package/dist/circuit-traversal.d.ts.map +1 -0
  7. package/dist/circuit-traversal.js +299 -0
  8. package/dist/circuit-traversal.js.map +1 -0
  9. package/dist/cli/commands.d.ts +23 -0
  10. package/dist/cli/commands.d.ts.map +1 -0
  11. package/dist/cli/commands.js +140 -0
  12. package/dist/cli/commands.js.map +1 -0
  13. package/dist/cli/prompts.d.ts +10 -0
  14. package/dist/cli/prompts.d.ts.map +1 -0
  15. package/dist/cli/prompts.js +22 -0
  16. package/dist/cli/prompts.js.map +1 -0
  17. package/dist/cli/shell.d.ts +15 -0
  18. package/dist/cli/shell.d.ts.map +1 -0
  19. package/dist/cli/shell.js +66 -0
  20. package/dist/cli/shell.js.map +1 -0
  21. package/dist/cli/updater.d.ts +46 -0
  22. package/dist/cli/updater.d.ts.map +1 -0
  23. package/dist/cli/updater.js +319 -0
  24. package/dist/cli/updater.js.map +1 -0
  25. package/dist/index.d.ts +16 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +63 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/parsers/altium/connectivity.d.ts +32 -0
  30. package/dist/parsers/altium/connectivity.d.ts.map +1 -0
  31. package/dist/parsers/altium/connectivity.js +308 -0
  32. package/dist/parsers/altium/connectivity.js.map +1 -0
  33. package/dist/parsers/altium/discovery.d.ts +30 -0
  34. package/dist/parsers/altium/discovery.d.ts.map +1 -0
  35. package/dist/parsers/altium/discovery.js +174 -0
  36. package/dist/parsers/altium/discovery.js.map +1 -0
  37. package/dist/parsers/altium/hierarchy.d.ts +29 -0
  38. package/dist/parsers/altium/hierarchy.d.ts.map +1 -0
  39. package/dist/parsers/altium/hierarchy.js +94 -0
  40. package/dist/parsers/altium/hierarchy.js.map +1 -0
  41. package/dist/parsers/altium/index.d.ts +53 -0
  42. package/dist/parsers/altium/index.d.ts.map +1 -0
  43. package/dist/parsers/altium/index.js +404 -0
  44. package/dist/parsers/altium/index.js.map +1 -0
  45. package/dist/parsers/altium/net-extractor.d.ts +24 -0
  46. package/dist/parsers/altium/net-extractor.d.ts.map +1 -0
  47. package/dist/parsers/altium/net-extractor.js +295 -0
  48. package/dist/parsers/altium/net-extractor.js.map +1 -0
  49. package/dist/parsers/altium/ole-reader.d.ts +91 -0
  50. package/dist/parsers/altium/ole-reader.d.ts.map +1 -0
  51. package/dist/parsers/altium/ole-reader.js +304 -0
  52. package/dist/parsers/altium/ole-reader.js.map +1 -0
  53. package/dist/parsers/altium/record-parser.d.ts +21 -0
  54. package/dist/parsers/altium/record-parser.d.ts.map +1 -0
  55. package/dist/parsers/altium/record-parser.js +117 -0
  56. package/dist/parsers/altium/record-parser.js.map +1 -0
  57. package/dist/parsers/altium/schemas.d.ts +277 -0
  58. package/dist/parsers/altium/schemas.d.ts.map +1 -0
  59. package/dist/parsers/altium/schemas.js +246 -0
  60. package/dist/parsers/altium/schemas.js.map +1 -0
  61. package/dist/parsers/altium/types.d.ts +213 -0
  62. package/dist/parsers/altium/types.d.ts.map +1 -0
  63. package/dist/parsers/altium/types.js +180 -0
  64. package/dist/parsers/altium/types.js.map +1 -0
  65. package/dist/parsers/cadence/discovery.d.ts +45 -0
  66. package/dist/parsers/cadence/discovery.d.ts.map +1 -0
  67. package/dist/parsers/cadence/discovery.js +277 -0
  68. package/dist/parsers/cadence/discovery.js.map +1 -0
  69. package/dist/parsers/cadence/index.d.ts +41 -0
  70. package/dist/parsers/cadence/index.d.ts.map +1 -0
  71. package/dist/parsers/cadence/index.js +139 -0
  72. package/dist/parsers/cadence/index.js.map +1 -0
  73. package/dist/parsers/cadence/pstchip-parser.d.ts +23 -0
  74. package/dist/parsers/cadence/pstchip-parser.d.ts.map +1 -0
  75. package/dist/parsers/cadence/pstchip-parser.js +82 -0
  76. package/dist/parsers/cadence/pstchip-parser.js.map +1 -0
  77. package/dist/parsers/cadence/pstxnet-parser.d.ts +15 -0
  78. package/dist/parsers/cadence/pstxnet-parser.d.ts.map +1 -0
  79. package/dist/parsers/cadence/pstxnet-parser.js +55 -0
  80. package/dist/parsers/cadence/pstxnet-parser.js.map +1 -0
  81. package/dist/parsers/cadence/pstxprt-parser.d.ts +24 -0
  82. package/dist/parsers/cadence/pstxprt-parser.d.ts.map +1 -0
  83. package/dist/parsers/cadence/pstxprt-parser.js +75 -0
  84. package/dist/parsers/cadence/pstxprt-parser.js.map +1 -0
  85. package/dist/parsers/index.d.ts +33 -0
  86. package/dist/parsers/index.d.ts.map +1 -0
  87. package/dist/parsers/index.js +49 -0
  88. package/dist/parsers/index.js.map +1 -0
  89. package/dist/server.d.ts +16 -0
  90. package/dist/server.d.ts.map +1 -0
  91. package/dist/server.js +277 -0
  92. package/dist/server.js.map +1 -0
  93. package/dist/service.d.ts +129 -0
  94. package/dist/service.d.ts.map +1 -0
  95. package/dist/service.js +759 -0
  96. package/dist/service.js.map +1 -0
  97. package/dist/types.d.ts +242 -0
  98. package/dist/types.d.ts.map +1 -0
  99. package/dist/types.js +27 -0
  100. package/dist/types.js.map +1 -0
  101. package/dist/version.d.ts +10 -0
  102. package/dist/version.d.ts.map +1 -0
  103. package/dist/version.js +25 -0
  104. package/dist/version.js.map +1 -0
  105. package/package.json +74 -0
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Altium Schematic Parser - Internal Types
3
+ *
4
+ * Type definitions for parsing Altium .SchDoc files.
5
+ * Record type IDs sourced from:
6
+ * - https://github.com/vadmium/python-altium/blob/master/format.md
7
+ * - https://github.com/gsuberland/altium_js
8
+ * - https://github.com/a3ng7n/Altium-Schematic-Parser
9
+ */
10
+ /**
11
+ * Complete Altium Schematic Record Type IDs
12
+ *
13
+ * These are the known record types found in Altium .SchDoc files.
14
+ * The format has been reverse-engineered from multiple sources.
15
+ */
16
+ export declare const RECORD_TYPES: {
17
+ /** Header/sheet properties (implicit, ID 0) */
18
+ readonly HEADER: "0";
19
+ /** Schematic component/part symbol */
20
+ readonly COMPONENT: "1";
21
+ /** Pin on a component */
22
+ readonly PIN: "2";
23
+ /** IEEE symbol (logic gates, etc.) */
24
+ readonly IEEE_SYMBOL: "3";
25
+ /** Text annotation/label */
26
+ readonly LABEL: "4";
27
+ /** Bezier curve */
28
+ readonly BEZIER: "5";
29
+ /** Polyline (multiple connected line segments) */
30
+ readonly POLYLINE: "6";
31
+ /** Filled polygon */
32
+ readonly POLYGON: "7";
33
+ /** Ellipse or circle */
34
+ readonly ELLIPSE: "8";
35
+ /** Pie chart segment */
36
+ readonly PIECHART: "9";
37
+ /** Rounded rectangle */
38
+ readonly ROUND_RECTANGLE: "10";
39
+ /** Elliptical arc */
40
+ readonly ELLIPTICAL_ARC: "11";
41
+ /** Circular arc */
42
+ readonly ARC: "12";
43
+ /** Simple line */
44
+ readonly LINE: "13";
45
+ /** Rectangle */
46
+ readonly RECTANGLE: "14";
47
+ /** Sheet symbol (represents a sub-sheet in hierarchical design) */
48
+ readonly SHEET_SYMBOL: "15";
49
+ /** Sheet entry (port on a sheet symbol) */
50
+ readonly SHEET_ENTRY: "16";
51
+ /** Power port (VCC, GND, etc.) */
52
+ readonly POWER_PORT: "17";
53
+ /** Port (sheet connector) */
54
+ readonly PORT: "18";
55
+ /** No ERC marker (suppress error checking) */
56
+ readonly NO_ERC: "22";
57
+ /** Net label (names a net) */
58
+ readonly NET_LABEL: "25";
59
+ /** Bus (group of signals) */
60
+ readonly BUS: "26";
61
+ /** Wire (electrical connection) */
62
+ readonly WIRE: "27";
63
+ /** Text frame (multi-line text box) */
64
+ readonly TEXT_FRAME: "28";
65
+ /** Junction (wire connection point) */
66
+ readonly JUNCTION: "29";
67
+ /** Embedded image */
68
+ readonly IMAGE: "30";
69
+ /** Sheet settings (fonts, grid, border, etc.) */
70
+ readonly SHEET: "31";
71
+ /** Sheet name */
72
+ readonly SHEET_NAME: "32";
73
+ /** Sheet file name */
74
+ readonly SHEET_FILE_NAME: "33";
75
+ /** Component designator (U1, R1, C1, etc.) */
76
+ readonly DESIGNATOR: "34";
77
+ /** Bus entry (connection from wire to bus) */
78
+ readonly BUS_ENTRY: "37";
79
+ /** Template reference */
80
+ readonly TEMPLATE: "39";
81
+ /** Parameter (component properties like MPN, value, etc.) */
82
+ readonly PARAMETER: "41";
83
+ /** Warning sign/marker */
84
+ readonly WARNING_SIGN: "43";
85
+ /** Implementation list (container for implementations) */
86
+ readonly IMPLEMENTATION_LIST: "44";
87
+ /** Implementation (footprint, simulation model, etc.) */
88
+ readonly IMPLEMENTATION: "45";
89
+ /** Implementation pin association */
90
+ readonly IMPLEMENTATION_PIN: "46";
91
+ /** Implementation parameter */
92
+ readonly IMPLEMENTATION_PARAM: "47";
93
+ /** Implementation map */
94
+ readonly IMPLEMENTATION_MAP: "48";
95
+ /** Hyperlink */
96
+ readonly HYPERLINK: "226";
97
+ };
98
+ /** Type for record type string values */
99
+ export type RecordType = (typeof RECORD_TYPES)[keyof typeof RECORD_TYPES];
100
+ /**
101
+ * Human-readable names for record types
102
+ */
103
+ export declare const RECORD_TYPE_NAMES: Record<string, string>;
104
+ /**
105
+ * Pin electrical types (from ELECTRICAL field on PIN records)
106
+ */
107
+ export declare const PIN_ELECTRICAL_TYPES: {
108
+ readonly INPUT: "0";
109
+ readonly IO: "1";
110
+ readonly OUTPUT: "2";
111
+ readonly OPEN_COLLECTOR: "3";
112
+ readonly PASSIVE: "4";
113
+ readonly HI_Z: "5";
114
+ readonly OPEN_EMITTER: "6";
115
+ readonly POWER: "7";
116
+ };
117
+ /**
118
+ * Power port styles (from STYLE field on POWER_PORT records)
119
+ */
120
+ export declare const POWER_PORT_STYLES: {
121
+ readonly CIRCLE: "0";
122
+ readonly ARROW: "1";
123
+ readonly BAR: "2";
124
+ readonly WAVE: "3";
125
+ readonly POWER_GROUND: "4";
126
+ readonly SIGNAL_GROUND: "5";
127
+ readonly EARTH: "6";
128
+ readonly GOST_ARROW: "7";
129
+ readonly GOST_POWER_GROUND: "8";
130
+ readonly GOST_EARTH: "9";
131
+ readonly GOST_BAR: "10";
132
+ };
133
+ /**
134
+ * A parsed record from the Altium schematic file.
135
+ * Records represent various schematic elements (parts, pins, wires, etc.)
136
+ */
137
+ export interface AltiumRecord {
138
+ /** Index position in the original record list */
139
+ index: number;
140
+ /** Record type identifier (e.g., "1" for component, "2" for pin) */
141
+ RECORD?: string;
142
+ /** Index of the owning/parent record */
143
+ OwnerIndex?: string;
144
+ /** Part ID within multi-part component (-1 for shared, 1+ for specific part) */
145
+ OwnerPartId?: string;
146
+ /** Child records (populated by hierarchy builder) */
147
+ children?: AltiumRecord[];
148
+ /** Calculated coordinates for connectivity detection */
149
+ coords?: Array<[number, number]>;
150
+ /** All other key-value pairs from the record */
151
+ [key: string]: unknown;
152
+ }
153
+ /**
154
+ * Parsed schematic structure containing header and records
155
+ */
156
+ export interface AltiumSchematic {
157
+ /** Header records (contain HEADER key) */
158
+ header: AltiumRecord[];
159
+ /** All other records (contain RECORD key) */
160
+ records: AltiumRecord[];
161
+ }
162
+ /**
163
+ * A net representing connected devices in the schematic
164
+ */
165
+ export interface AltiumNet {
166
+ /** Net name (from power port, label, or pin) */
167
+ name: string | null;
168
+ /** All devices connected to this net */
169
+ devices: AltiumRecord[];
170
+ }
171
+ /**
172
+ * OLE file directory entry
173
+ */
174
+ export interface OleDirectoryEntry {
175
+ /** Entry name (UTF-16LE decoded) */
176
+ name: string;
177
+ /** Entry type: 0=empty, 1=storage, 2=stream, 5=root */
178
+ type: number;
179
+ /** Starting sector for stream data */
180
+ startSector: number;
181
+ /** Stream size in bytes */
182
+ size: number;
183
+ }
184
+ /**
185
+ * OLE file header information
186
+ */
187
+ export interface OleHeader {
188
+ /** Major version (3 or 4) */
189
+ majorVersion: number;
190
+ /** Sector size in bytes (512 for v3, 4096 for v4) */
191
+ sectorSize: number;
192
+ /** Mini sector size (usually 64) */
193
+ miniSectorSize: number;
194
+ /** Mini stream cutoff size (4096) */
195
+ miniStreamCutoff: number;
196
+ /** First directory sector */
197
+ dirStartSector: number;
198
+ /** First mini FAT sector */
199
+ miniFatStartSector: number;
200
+ /** Number of mini FAT sectors */
201
+ numMiniFatSectors: number;
202
+ /** First DIFAT sector */
203
+ difatStartSector: number;
204
+ /** Number of DIFAT sectors */
205
+ numDifatSectors: number;
206
+ /** FAT sector locations from header (first 109) */
207
+ fatSectors: number[];
208
+ }
209
+ /**
210
+ * Output format options matching Python library API
211
+ */
212
+ export type OutputFormat = 'all-list' | 'all-hierarchy' | 'parts-list' | 'net-list';
213
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/parsers/altium/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,YAAY;IAEvB,+CAA+C;;IAE/C,sCAAsC;;IAEtC,yBAAyB;;IAEzB,sCAAsC;;IAEtC,4BAA4B;;IAI5B,mBAAmB;;IAEnB,kDAAkD;;IAElD,qBAAqB;;IAErB,wBAAwB;;IAExB,wBAAwB;;IAExB,wBAAwB;;IAExB,qBAAqB;;IAErB,mBAAmB;;IAEnB,kBAAkB;;IAElB,gBAAgB;;IAIhB,mEAAmE;;IAEnE,2CAA2C;;IAE3C,kCAAkC;;IAElC,6BAA6B;;IAI7B,8CAA8C;;IAE9C,8BAA8B;;IAE9B,6BAA6B;;IAE7B,mCAAmC;;IAEnC,uCAAuC;;IAEvC,uCAAuC;;IAIvC,qBAAqB;;IAErB,iDAAiD;;IAEjD,iBAAiB;;IAEjB,sBAAsB;;IAEtB,8CAA8C;;IAI9C,8CAA8C;;IAE9C,yBAAyB;;IAEzB,6DAA6D;;IAE7D,0BAA0B;;IAI1B,0DAA0D;;IAE1D,yDAAyD;;IAEzD,qCAAq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IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,6BAA6B;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,4BAA4B;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,UAAU,CAAC"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Altium Schematic Parser - Internal Types
3
+ *
4
+ * Type definitions for parsing Altium .SchDoc files.
5
+ * Record type IDs sourced from:
6
+ * - https://github.com/vadmium/python-altium/blob/master/format.md
7
+ * - https://github.com/gsuberland/altium_js
8
+ * - https://github.com/a3ng7n/Altium-Schematic-Parser
9
+ */
10
+ /**
11
+ * Complete Altium Schematic Record Type IDs
12
+ *
13
+ * These are the known record types found in Altium .SchDoc files.
14
+ * The format has been reverse-engineered from multiple sources.
15
+ */
16
+ export const RECORD_TYPES = {
17
+ // === Core Schematic Objects ===
18
+ /** Header/sheet properties (implicit, ID 0) */
19
+ HEADER: '0',
20
+ /** Schematic component/part symbol */
21
+ COMPONENT: '1',
22
+ /** Pin on a component */
23
+ PIN: '2',
24
+ /** IEEE symbol (logic gates, etc.) */
25
+ IEEE_SYMBOL: '3',
26
+ /** Text annotation/label */
27
+ LABEL: '4',
28
+ // === Graphical Primitives ===
29
+ /** Bezier curve */
30
+ BEZIER: '5',
31
+ /** Polyline (multiple connected line segments) */
32
+ POLYLINE: '6',
33
+ /** Filled polygon */
34
+ POLYGON: '7',
35
+ /** Ellipse or circle */
36
+ ELLIPSE: '8',
37
+ /** Pie chart segment */
38
+ PIECHART: '9',
39
+ /** Rounded rectangle */
40
+ ROUND_RECTANGLE: '10',
41
+ /** Elliptical arc */
42
+ ELLIPTICAL_ARC: '11',
43
+ /** Circular arc */
44
+ ARC: '12',
45
+ /** Simple line */
46
+ LINE: '13',
47
+ /** Rectangle */
48
+ RECTANGLE: '14',
49
+ // === Sheet/Hierarchy Objects ===
50
+ /** Sheet symbol (represents a sub-sheet in hierarchical design) */
51
+ SHEET_SYMBOL: '15',
52
+ /** Sheet entry (port on a sheet symbol) */
53
+ SHEET_ENTRY: '16',
54
+ /** Power port (VCC, GND, etc.) */
55
+ POWER_PORT: '17',
56
+ /** Port (sheet connector) */
57
+ PORT: '18',
58
+ // === Connectivity Objects ===
59
+ /** No ERC marker (suppress error checking) */
60
+ NO_ERC: '22',
61
+ /** Net label (names a net) */
62
+ NET_LABEL: '25',
63
+ /** Bus (group of signals) */
64
+ BUS: '26',
65
+ /** Wire (electrical connection) */
66
+ WIRE: '27',
67
+ /** Text frame (multi-line text box) */
68
+ TEXT_FRAME: '28',
69
+ /** Junction (wire connection point) */
70
+ JUNCTION: '29',
71
+ // === Document Objects ===
72
+ /** Embedded image */
73
+ IMAGE: '30',
74
+ /** Sheet settings (fonts, grid, border, etc.) */
75
+ SHEET: '31',
76
+ /** Sheet name */
77
+ SHEET_NAME: '32',
78
+ /** Sheet file name */
79
+ SHEET_FILE_NAME: '33',
80
+ /** Component designator (U1, R1, C1, etc.) */
81
+ DESIGNATOR: '34',
82
+ // === Additional Objects ===
83
+ /** Bus entry (connection from wire to bus) */
84
+ BUS_ENTRY: '37',
85
+ /** Template reference */
86
+ TEMPLATE: '39',
87
+ /** Parameter (component properties like MPN, value, etc.) */
88
+ PARAMETER: '41',
89
+ /** Warning sign/marker */
90
+ WARNING_SIGN: '43',
91
+ // === Implementation/Model Objects ===
92
+ /** Implementation list (container for implementations) */
93
+ IMPLEMENTATION_LIST: '44',
94
+ /** Implementation (footprint, simulation model, etc.) */
95
+ IMPLEMENTATION: '45',
96
+ /** Implementation pin association */
97
+ IMPLEMENTATION_PIN: '46',
98
+ /** Implementation parameter */
99
+ IMPLEMENTATION_PARAM: '47',
100
+ /** Implementation map */
101
+ IMPLEMENTATION_MAP: '48',
102
+ // === Extended Objects (found in newer Altium versions) ===
103
+ /** Hyperlink */
104
+ HYPERLINK: '226',
105
+ };
106
+ /**
107
+ * Human-readable names for record types
108
+ */
109
+ export const RECORD_TYPE_NAMES = {
110
+ '0': 'Header',
111
+ '1': 'Component',
112
+ '2': 'Pin',
113
+ '3': 'IEEE Symbol',
114
+ '4': 'Label',
115
+ '5': 'Bezier',
116
+ '6': 'Polyline',
117
+ '7': 'Polygon',
118
+ '8': 'Ellipse',
119
+ '9': 'Piechart',
120
+ '10': 'Round Rectangle',
121
+ '11': 'Elliptical Arc',
122
+ '12': 'Arc',
123
+ '13': 'Line',
124
+ '14': 'Rectangle',
125
+ '15': 'Sheet Symbol',
126
+ '16': 'Sheet Entry',
127
+ '17': 'Power Port',
128
+ '18': 'Port',
129
+ '22': 'No ERC',
130
+ '25': 'Net Label',
131
+ '26': 'Bus',
132
+ '27': 'Wire',
133
+ '28': 'Text Frame',
134
+ '29': 'Junction',
135
+ '30': 'Image',
136
+ '31': 'Sheet',
137
+ '32': 'Sheet Name',
138
+ '33': 'Sheet File Name',
139
+ '34': 'Designator',
140
+ '37': 'Bus Entry',
141
+ '39': 'Template',
142
+ '41': 'Parameter',
143
+ '43': 'Warning Sign',
144
+ '44': 'Implementation List',
145
+ '45': 'Implementation',
146
+ '46': 'Implementation Pin',
147
+ '47': 'Implementation Param',
148
+ '48': 'Implementation Map',
149
+ '226': 'Hyperlink',
150
+ };
151
+ /**
152
+ * Pin electrical types (from ELECTRICAL field on PIN records)
153
+ */
154
+ export const PIN_ELECTRICAL_TYPES = {
155
+ INPUT: '0',
156
+ IO: '1',
157
+ OUTPUT: '2',
158
+ OPEN_COLLECTOR: '3',
159
+ PASSIVE: '4',
160
+ HI_Z: '5',
161
+ OPEN_EMITTER: '6',
162
+ POWER: '7',
163
+ };
164
+ /**
165
+ * Power port styles (from STYLE field on POWER_PORT records)
166
+ */
167
+ export const POWER_PORT_STYLES = {
168
+ CIRCLE: '0',
169
+ ARROW: '1',
170
+ BAR: '2',
171
+ WAVE: '3',
172
+ POWER_GROUND: '4',
173
+ SIGNAL_GROUND: '5',
174
+ EARTH: '6',
175
+ GOST_ARROW: '7',
176
+ GOST_POWER_GROUND: '8',
177
+ GOST_EARTH: '9',
178
+ GOST_BAR: '10',
179
+ };
180
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/parsers/altium/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,iCAAiC;IACjC,+CAA+C;IAC/C,MAAM,EAAE,GAAG;IACX,sCAAsC;IACtC,SAAS,EAAE,GAAG;IACd,yBAAyB;IACzB,GAAG,EAAE,GAAG;IACR,sCAAsC;IACtC,WAAW,EAAE,GAAG;IAChB,4BAA4B;IAC5B,KAAK,EAAE,GAAG;IAEV,+BAA+B;IAC/B,mBAAmB;IACnB,MAAM,EAAE,GAAG;IACX,kDAAkD;IAClD,QAAQ,EAAE,GAAG;IACb,qBAAqB;IACrB,OAAO,EAAE,GAAG;IACZ,wBAAwB;IACxB,OAAO,EAAE,GAAG;IACZ,wBAAwB;IACxB,QAAQ,EAAE,GAAG;IACb,wBAAwB;IACxB,eAAe,EAAE,IAAI;IACrB,qBAAq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EAAE,GAAG;IACjB,KAAK,EAAE,GAAG;CACF,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,KAAK,EAAE,GAAG;IACV,UAAU,EAAE,GAAG;IACf,iBAAiB,EAAE,GAAG;IACtB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,IAAI;CACN,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Cadence design discovery module.
3
+ * Finds Cadence CIS (.dsn) and HDL (.cpm) designs with their .dat netlist files.
4
+ *
5
+ * Uses subtree-scoped matching: .dat files are matched to the design whose directory
6
+ * contains them (same directory or any subdirectory). This handles arbitrary folder
7
+ * structures since users can export netlists to any directory they choose.
8
+ */
9
+ declare const CADENCE_EXTENSIONS: readonly [".dsn", ".cpm"];
10
+ /**
11
+ * Cadence-specific discovered design with .dat file paths.
12
+ */
13
+ export interface CadenceDiscoveredDesign {
14
+ name: string;
15
+ sourcePath: string;
16
+ format: "cadence-cis" | "cadence-hdl";
17
+ datFiles: {
18
+ pstxnet: string | null;
19
+ pstxprt: string | null;
20
+ pstchip: string | null;
21
+ };
22
+ error?: string;
23
+ }
24
+ interface CadenceDatFiles {
25
+ pstxnet: string | null;
26
+ pstxprt: string | null;
27
+ pstchip: string | null;
28
+ }
29
+ /**
30
+ * Discover Cadence designs in a directory.
31
+ * Uses subtree-scoped matching to associate .dat files with designs.
32
+ */
33
+ export declare const discoverCadenceDesigns: (rootDir: string) => Promise<CadenceDiscoveredDesign[]>;
34
+ /**
35
+ * Find Cadence .dat files for a specific design file.
36
+ * Searches in the design's directory and all subdirectories.
37
+ */
38
+ export declare const findCadenceDatFiles: (designFilePath: string) => Promise<CadenceDatFiles>;
39
+ /**
40
+ * Check if a file path is a Cadence design file.
41
+ */
42
+ export declare const isCadenceFile: (filePath: string) => boolean;
43
+ /** Cadence file extensions */
44
+ export { CADENCE_EXTENSIONS };
45
+ //# sourceMappingURL=discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../src/parsers/cadence/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,QAAA,MAAM,kBAAkB,2BAA4B,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC;IACtC,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AASD,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAwPD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,KACd,OAAO,CAAC,uBAAuB,EAAE,CA0CnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,gBAAgB,MAAM,KACrB,OAAO,CAAC,eAAe,CAsCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,KAAG,OAKhD,CAAC;AAEF,8BAA8B;AAC9B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}