circuit-json-to-kicad 0.0.37 → 0.0.38
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.ts +2 -33
- package/dist/index.js +9 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CircuitJson } from 'circuit-json';
|
|
|
2
2
|
import { CircuitJsonUtilObjects, cju } from '@tscircuit/circuit-json-util';
|
|
3
3
|
import { KicadSch, KicadPcb, SchematicSymbol } from 'kicadts';
|
|
4
4
|
import { Matrix } from 'transformation-matrix';
|
|
5
|
+
import { KicadFootprintMetadata } from '@tscircuit/props';
|
|
5
6
|
|
|
6
7
|
type PaperSize = "A0" | "A1" | "A2" | "A3" | "A4" | "A5";
|
|
7
8
|
interface PaperDimensions {
|
|
@@ -212,38 +213,6 @@ declare class CircuitJsonToKicadLibraryConverter {
|
|
|
212
213
|
getModel3dSourcePaths(): string[];
|
|
213
214
|
}
|
|
214
215
|
|
|
215
|
-
/**
|
|
216
|
-
* KiCad footprint metadata that can be extracted from component props.
|
|
217
|
-
* This mirrors the KicadFootprintMetadata type from @tscircuit/props.
|
|
218
|
-
*/
|
|
219
|
-
interface KicadFootprintMetadata {
|
|
220
|
-
footprintName?: string;
|
|
221
|
-
layer?: string;
|
|
222
|
-
properties?: {
|
|
223
|
-
Reference?: KicadPropertyMetadata;
|
|
224
|
-
Value?: KicadPropertyMetadata;
|
|
225
|
-
Datasheet?: KicadPropertyMetadata;
|
|
226
|
-
Description?: KicadPropertyMetadata;
|
|
227
|
-
};
|
|
228
|
-
attributes?: {
|
|
229
|
-
through_hole?: boolean;
|
|
230
|
-
smd?: boolean;
|
|
231
|
-
exclude_from_pos_files?: boolean;
|
|
232
|
-
exclude_from_bom?: boolean;
|
|
233
|
-
};
|
|
234
|
-
embeddedFonts?: boolean;
|
|
235
|
-
}
|
|
236
|
-
interface KicadPropertyMetadata {
|
|
237
|
-
value: string;
|
|
238
|
-
at?: {
|
|
239
|
-
x: number | string;
|
|
240
|
-
y: number | string;
|
|
241
|
-
rotation?: number | string;
|
|
242
|
-
};
|
|
243
|
-
layer?: string;
|
|
244
|
-
uuid?: string;
|
|
245
|
-
hide?: boolean;
|
|
246
|
-
}
|
|
247
216
|
interface KicadLibraryConverterOptions {
|
|
248
217
|
/**
|
|
249
218
|
* Name for the generated KiCad library (e.g., "my-library").
|
|
@@ -318,4 +287,4 @@ declare class KicadLibraryConverter {
|
|
|
318
287
|
getOutput(): KicadLibraryConverterOutput;
|
|
319
288
|
}
|
|
320
289
|
|
|
321
|
-
export { CircuitJsonToKicadLibraryConverter, CircuitJsonToKicadPcbConverter, CircuitJsonToKicadProConverter, CircuitJsonToKicadSchConverter, type FootprintEntry,
|
|
290
|
+
export { CircuitJsonToKicadLibraryConverter, CircuitJsonToKicadPcbConverter, CircuitJsonToKicadProConverter, CircuitJsonToKicadSchConverter, type FootprintEntry, KicadLibraryConverter, type KicadLibraryConverterOptions, type KicadLibraryConverterOutput, type KicadLibraryOutput, type SymbolEntry };
|
package/dist/index.js
CHANGED
|
@@ -2973,6 +2973,15 @@ function applyKicadFootprintMetadata(kicadModString, metadata, footprintName) {
|
|
|
2973
2973
|
if (!footprint) {
|
|
2974
2974
|
return kicadModString;
|
|
2975
2975
|
}
|
|
2976
|
+
if (metadata.version !== void 0) {
|
|
2977
|
+
footprint.version = Number(metadata.version);
|
|
2978
|
+
}
|
|
2979
|
+
if (metadata.generator !== void 0) {
|
|
2980
|
+
footprint.generator = metadata.generator;
|
|
2981
|
+
}
|
|
2982
|
+
if (metadata.generatorVersion !== void 0) {
|
|
2983
|
+
footprint.generatorVersion = String(metadata.generatorVersion);
|
|
2984
|
+
}
|
|
2976
2985
|
if (metadata.embeddedFonts !== void 0) {
|
|
2977
2986
|
}
|
|
2978
2987
|
if (metadata.properties) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circuit-json-to-kicad",
|
|
3
3
|
"main": "dist/index.js",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.38",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"@types/bun": "latest",
|
|
22
22
|
"circuit-json": "^0.0.302",
|
|
23
23
|
"circuit-to-svg": "^0.0.208",
|
|
24
|
-
"kicadts": "^0.0.
|
|
24
|
+
"kicadts": "^0.0.24",
|
|
25
25
|
"schematic-symbols": "^0.0.202",
|
|
26
26
|
"sharp": "^0.34.4",
|
|
27
27
|
"transformation-matrix": "^3.1.0",
|
|
28
|
-
"tscircuit": "^0.0.
|
|
28
|
+
"tscircuit": "^0.0.1186",
|
|
29
29
|
"tsup": "^8.5.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|