@tscircuit/props 0.0.718 → 0.0.719
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 +68648 -55426
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/lib/common/kicadFootprintMetadata.ts +26 -6
- package/lib/common/kicadSymbolMetadata.ts +29 -9
- package/package.json +1 -1
|
@@ -62,19 +62,39 @@ export const kicadProperty = z.object({
|
|
|
62
62
|
type InferredKicadProperty = z.input<typeof kicadProperty>
|
|
63
63
|
expectTypesMatch<KicadProperty, InferredKicadProperty>(true)
|
|
64
64
|
|
|
65
|
+
/** Built-in and custom property names share the same validated property shape. */
|
|
65
66
|
export interface KicadFootprintProperties {
|
|
67
|
+
[propertyName: string]: KicadProperty | undefined
|
|
66
68
|
Reference?: KicadProperty
|
|
67
69
|
Value?: KicadProperty
|
|
68
70
|
Datasheet?: KicadProperty
|
|
69
71
|
Description?: KicadProperty
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
const kicadFootprintPropertiesSchema = z
|
|
75
|
+
.object({
|
|
76
|
+
Reference: kicadProperty.optional(),
|
|
77
|
+
Value: kicadProperty.optional(),
|
|
78
|
+
Datasheet: kicadProperty.optional(),
|
|
79
|
+
Description: kicadProperty.optional(),
|
|
80
|
+
})
|
|
81
|
+
.catchall(kicadProperty.optional())
|
|
82
|
+
|
|
83
|
+
// Name the schema type so consumers retain the named properties without
|
|
84
|
+
// expanding the catchall throughout generated package declarations.
|
|
85
|
+
interface KicadFootprintPropertiesSchema
|
|
86
|
+
extends z.ZodObject<
|
|
87
|
+
typeof kicadFootprintPropertiesSchema.shape,
|
|
88
|
+
"strip",
|
|
89
|
+
z.ZodOptional<typeof kicadProperty>,
|
|
90
|
+
z.output<typeof kicadFootprintPropertiesSchema>,
|
|
91
|
+
KicadFootprintProperties
|
|
92
|
+
> {}
|
|
93
|
+
|
|
94
|
+
export { type KicadFootprintPropertiesSchema }
|
|
95
|
+
|
|
96
|
+
export const kicadFootprintProperties: KicadFootprintPropertiesSchema =
|
|
97
|
+
kicadFootprintPropertiesSchema
|
|
78
98
|
|
|
79
99
|
type InferredKicadFootprintProperties = z.input<typeof kicadFootprintProperties>
|
|
80
100
|
expectTypesMatch<KicadFootprintProperties, InferredKicadFootprintProperties>(
|
|
@@ -64,7 +64,9 @@ export const kicadSymbolProperty = z.object({
|
|
|
64
64
|
type InferredKicadSymbolProperty = z.input<typeof kicadSymbolProperty>
|
|
65
65
|
expectTypesMatch<KicadSymbolProperty, InferredKicadSymbolProperty>(true)
|
|
66
66
|
|
|
67
|
+
/** Built-in and custom property names share the same validated property shape. */
|
|
67
68
|
export interface KicadSymbolProperties {
|
|
69
|
+
[propertyName: string]: KicadSymbolProperty | undefined
|
|
68
70
|
Reference?: KicadSymbolProperty
|
|
69
71
|
Value?: KicadSymbolProperty
|
|
70
72
|
Footprint?: KicadSymbolProperty
|
|
@@ -74,15 +76,33 @@ export interface KicadSymbolProperties {
|
|
|
74
76
|
ki_fp_filters?: KicadSymbolProperty
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
const kicadSymbolPropertiesSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
Reference: kicadSymbolProperty.optional(),
|
|
82
|
+
Value: kicadSymbolProperty.optional(),
|
|
83
|
+
Footprint: kicadSymbolProperty.optional(),
|
|
84
|
+
Datasheet: kicadSymbolProperty.optional(),
|
|
85
|
+
Description: kicadSymbolProperty.optional(),
|
|
86
|
+
ki_keywords: kicadSymbolProperty.optional(),
|
|
87
|
+
ki_fp_filters: kicadSymbolProperty.optional(),
|
|
88
|
+
})
|
|
89
|
+
.catchall(kicadSymbolProperty.optional())
|
|
90
|
+
|
|
91
|
+
// Name the schema type so consumers retain the named properties without
|
|
92
|
+
// expanding the catchall throughout generated package declarations.
|
|
93
|
+
interface KicadSymbolPropertiesSchema
|
|
94
|
+
extends z.ZodObject<
|
|
95
|
+
typeof kicadSymbolPropertiesSchema.shape,
|
|
96
|
+
"strip",
|
|
97
|
+
z.ZodOptional<typeof kicadSymbolProperty>,
|
|
98
|
+
z.output<typeof kicadSymbolPropertiesSchema>,
|
|
99
|
+
KicadSymbolProperties
|
|
100
|
+
> {}
|
|
101
|
+
|
|
102
|
+
export { type KicadSymbolPropertiesSchema }
|
|
103
|
+
|
|
104
|
+
export const kicadSymbolProperties: KicadSymbolPropertiesSchema =
|
|
105
|
+
kicadSymbolPropertiesSchema
|
|
86
106
|
|
|
87
107
|
type InferredKicadSymbolProperties = z.input<typeof kicadSymbolProperties>
|
|
88
108
|
expectTypesMatch<KicadSymbolProperties, InferredKicadSymbolProperties>(true)
|