@tscircuit/props 0.0.528 → 0.0.529
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 +12 -2
- package/dist/index.js.map +1 -1
- package/lib/platformConfig.ts +20 -2
- package/package.json +1 -1
package/lib/platformConfig.ts
CHANGED
|
@@ -45,6 +45,19 @@ export interface AutorouterDefinition {
|
|
|
45
45
|
) => AutorouterInstance | Promise<AutorouterInstance>
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/** e.g. "kicad", this is the prefix used to reference libraries in footprinter strings e.g. kicad:Resistor_0402 **/
|
|
49
|
+
type FootprintLibraryPrefix = string
|
|
50
|
+
|
|
51
|
+
/** e.g. "kicad_mod", used to reference file extensions for loaders **/
|
|
52
|
+
type FileExtension = string
|
|
53
|
+
|
|
54
|
+
type FileContent = string | ArrayBufferLike
|
|
55
|
+
|
|
56
|
+
type EsModuleImportResult = {
|
|
57
|
+
__esModule: true
|
|
58
|
+
default: any
|
|
59
|
+
}
|
|
60
|
+
|
|
48
61
|
export interface PlatformConfig {
|
|
49
62
|
partsEngine?: PartsEngine
|
|
50
63
|
|
|
@@ -84,7 +97,7 @@ export interface PlatformConfig {
|
|
|
84
97
|
spiceEngineMap?: Record<string, SpiceEngine>
|
|
85
98
|
|
|
86
99
|
footprintLibraryMap?: Record<
|
|
87
|
-
|
|
100
|
+
FootprintLibraryPrefix,
|
|
88
101
|
| ((
|
|
89
102
|
path: string,
|
|
90
103
|
options?: { resolvedPcbStyle?: PcbStyle },
|
|
@@ -99,7 +112,12 @@ export interface PlatformConfig {
|
|
|
99
112
|
>
|
|
100
113
|
>
|
|
101
114
|
|
|
102
|
-
footprintFileParserMap?: Record<
|
|
115
|
+
footprintFileParserMap?: Record<FileExtension, FootprintFileParserEntry>
|
|
116
|
+
|
|
117
|
+
staticFileLoaderMap?: Record<
|
|
118
|
+
FileExtension,
|
|
119
|
+
(fileContent: FileContent) => Promise<EsModuleImportResult>
|
|
120
|
+
>
|
|
103
121
|
|
|
104
122
|
resolveProjectStaticFileImportUrl?: (path: string) => Promise<string>
|
|
105
123
|
nodeModulesResolver?: (modulePath: string) => Promise<string | null>
|