@tscircuit/props 0.0.667 → 0.0.669
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/README.md +2 -0
- package/dist/index.d.ts +74 -3
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/lib/common/fanoutTracePath.ts +24 -1
- package/lib/common/schematicSize.ts +3 -2
- package/lib/components/diode.ts +8 -0
- package/lib/components/led.ts +4 -0
- package/lib/components/trace.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -902,6 +902,8 @@ export interface DiodeProps<
|
|
|
902
902
|
photo?: boolean;
|
|
903
903
|
tvs?: boolean;
|
|
904
904
|
schOrientation?: SchematicOrientation;
|
|
905
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
906
|
+
schSize?: SchematicSymbolSize;
|
|
905
907
|
}
|
|
906
908
|
```
|
|
907
909
|
|
package/dist/index.d.ts
CHANGED
|
@@ -27561,7 +27561,7 @@ declare const schematicPinStyle: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
27561
27561
|
declare const schematicPinLabel: z.ZodString;
|
|
27562
27562
|
type SchematicPinLabel = z.infer<typeof schematicPinLabel>;
|
|
27563
27563
|
|
|
27564
|
-
declare const schematicSymbolSize: z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
27564
|
+
declare const schematicSymbolSize: z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>;
|
|
27565
27565
|
type SchematicSymbolSize = z.input<typeof schematicSymbolSize>;
|
|
27566
27566
|
|
|
27567
27567
|
declare const kicadPinElectricalType: z.ZodEnum<["input", "output", "bidirectional", "tri_state", "passive", "free", "unspecified", "power_in", "power_out", "open_collector", "open_emitter", "no_connect"]>;
|
|
@@ -39905,6 +39905,10 @@ declare const subpanelProps: z.ZodObject<Omit<{
|
|
|
39905
39905
|
* fanout's local PCB frame, in mm: +X right, +Y up, right-handed with +Z
|
|
39906
39906
|
* above the board. They are points (placement adds translation), not
|
|
39907
39907
|
* directions. Numeric distances are mm; unit strings are parsed to mm.
|
|
39908
|
+
* A wire point's optional width_interpolation_mode interpolates its width to
|
|
39909
|
+
* the next wire point's width. Omitted means the existing constant-width
|
|
39910
|
+
* behavior; there are no aliases or migration requirements. Interpolation
|
|
39911
|
+
* cannot terminate at a via directly: put a wire point at the via position.
|
|
39908
39912
|
* Layers are physical board layers, independent of placement. Either endpoint
|
|
39909
39913
|
* may be a via: the initial layer is its from_layer and the final layer is its
|
|
39910
39914
|
* to_layer. Placement legality (including allowViaInPad) is checked by core,
|
|
@@ -39917,6 +39921,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
39917
39921
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
39918
39922
|
y: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
39919
39923
|
width: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
39924
|
+
width_interpolation_mode: z.ZodOptional<z.ZodEnum<["linear", "quadratic"]>>;
|
|
39920
39925
|
layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, z.ZodObject<{
|
|
39921
39926
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
39922
39927
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -39932,6 +39937,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
39932
39937
|
y: number;
|
|
39933
39938
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
39934
39939
|
route_type: "wire";
|
|
39940
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
39935
39941
|
}, {
|
|
39936
39942
|
width: string | number;
|
|
39937
39943
|
x: string | number;
|
|
@@ -39940,6 +39946,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
39940
39946
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
39941
39947
|
};
|
|
39942
39948
|
route_type: "wire";
|
|
39949
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
39943
39950
|
}>, z.ZodObject<{
|
|
39944
39951
|
route_type: z.ZodLiteral<"via">;
|
|
39945
39952
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
@@ -39990,6 +39997,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
39990
39997
|
y: number;
|
|
39991
39998
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
39992
39999
|
route_type: "wire";
|
|
40000
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
39993
40001
|
} | {
|
|
39994
40002
|
x: number;
|
|
39995
40003
|
y: number;
|
|
@@ -40006,6 +40014,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
40006
40014
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
40007
40015
|
};
|
|
40008
40016
|
route_type: "wire";
|
|
40017
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
40009
40018
|
} | {
|
|
40010
40019
|
x: string | number;
|
|
40011
40020
|
y: string | number;
|
|
@@ -40026,6 +40035,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
40026
40035
|
y: number;
|
|
40027
40036
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
40028
40037
|
route_type: "wire";
|
|
40038
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
40029
40039
|
} | {
|
|
40030
40040
|
x: number;
|
|
40031
40041
|
y: number;
|
|
@@ -40045,6 +40055,7 @@ declare const fanoutTracePath: z.ZodObject<{
|
|
|
40045
40055
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
40046
40056
|
};
|
|
40047
40057
|
route_type: "wire";
|
|
40058
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
40048
40059
|
} | {
|
|
40049
40060
|
x: string | number;
|
|
40050
40061
|
y: string | number;
|
|
@@ -41161,6 +41172,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41161
41172
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
41162
41173
|
y: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
41163
41174
|
width: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
41175
|
+
width_interpolation_mode: z.ZodOptional<z.ZodEnum<["linear", "quadratic"]>>;
|
|
41164
41176
|
layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, z.ZodObject<{
|
|
41165
41177
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
41166
41178
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -41176,6 +41188,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41176
41188
|
y: number;
|
|
41177
41189
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41178
41190
|
route_type: "wire";
|
|
41191
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41179
41192
|
}, {
|
|
41180
41193
|
width: string | number;
|
|
41181
41194
|
x: string | number;
|
|
@@ -41184,6 +41197,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41184
41197
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41185
41198
|
};
|
|
41186
41199
|
route_type: "wire";
|
|
41200
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41187
41201
|
}>, z.ZodObject<{
|
|
41188
41202
|
route_type: z.ZodLiteral<"via">;
|
|
41189
41203
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
@@ -41234,6 +41248,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41234
41248
|
y: number;
|
|
41235
41249
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41236
41250
|
route_type: "wire";
|
|
41251
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41237
41252
|
} | {
|
|
41238
41253
|
x: number;
|
|
41239
41254
|
y: number;
|
|
@@ -41250,6 +41265,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41250
41265
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41251
41266
|
};
|
|
41252
41267
|
route_type: "wire";
|
|
41268
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41253
41269
|
} | {
|
|
41254
41270
|
x: string | number;
|
|
41255
41271
|
y: string | number;
|
|
@@ -41270,6 +41286,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41270
41286
|
y: number;
|
|
41271
41287
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41272
41288
|
route_type: "wire";
|
|
41289
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41273
41290
|
} | {
|
|
41274
41291
|
x: number;
|
|
41275
41292
|
y: number;
|
|
@@ -41289,6 +41306,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41289
41306
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41290
41307
|
};
|
|
41291
41308
|
route_type: "wire";
|
|
41309
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41292
41310
|
} | {
|
|
41293
41311
|
x: string | number;
|
|
41294
41312
|
y: string | number;
|
|
@@ -41649,6 +41667,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
41649
41667
|
y: number;
|
|
41650
41668
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
41651
41669
|
route_type: "wire";
|
|
41670
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
41652
41671
|
} | {
|
|
41653
41672
|
x: number;
|
|
41654
41673
|
y: number;
|
|
@@ -42010,6 +42029,7 @@ declare const breakoutProps: z.ZodObject<{
|
|
|
42010
42029
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
42011
42030
|
};
|
|
42012
42031
|
route_type: "wire";
|
|
42032
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
42013
42033
|
} | {
|
|
42014
42034
|
x: string | number;
|
|
42015
42035
|
y: string | number;
|
|
@@ -92875,7 +92895,7 @@ declare const resistorProps: z.ZodObject<{
|
|
|
92875
92895
|
pulldownFor: z.ZodOptional<z.ZodString>;
|
|
92876
92896
|
pulldownTo: z.ZodOptional<z.ZodString>;
|
|
92877
92897
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
92878
|
-
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
92898
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
92879
92899
|
connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "pin2", "pos", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
92880
92900
|
}, "strip", z.ZodTypeAny, {
|
|
92881
92901
|
name: string;
|
|
@@ -115589,7 +115609,7 @@ declare const capacitorProps: z.ZodObject<{
|
|
|
115589
115609
|
bypassTo: z.ZodOptional<z.ZodString>;
|
|
115590
115610
|
maxDecouplingTraceLength: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
115591
115611
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
115592
|
-
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.
|
|
115612
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
115593
115613
|
connections: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "pin2", "pos", "neg", "anode", "cathode"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
115594
115614
|
}, "strip", z.ZodTypeAny, {
|
|
115595
115615
|
name: string;
|
|
@@ -132152,6 +132172,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132152
132172
|
} | undefined;
|
|
132153
132173
|
trace_width?: string | number | undefined;
|
|
132154
132174
|
}>, "many">>;
|
|
132175
|
+
pcbTeardrops: z.ZodOptional<z.ZodBoolean>;
|
|
132176
|
+
pcbTeardropStart: z.ZodOptional<z.ZodBoolean>;
|
|
132177
|
+
pcbTeardropEnd: z.ZodOptional<z.ZodBoolean>;
|
|
132155
132178
|
pcbPathRelativeTo: z.ZodOptional<z.ZodString>;
|
|
132156
132179
|
pcbPath: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
132157
132180
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -132310,6 +132333,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132310
132333
|
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
132311
132334
|
trace_width?: number | undefined;
|
|
132312
132335
|
}[] | undefined;
|
|
132336
|
+
pcbTeardrops?: boolean | undefined;
|
|
132337
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132338
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132313
132339
|
pcbPathRelativeTo?: string | undefined;
|
|
132314
132340
|
pcbPaths?: (string | {
|
|
132315
132341
|
x: number;
|
|
@@ -132359,6 +132385,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132359
132385
|
} | undefined;
|
|
132360
132386
|
trace_width?: string | number | undefined;
|
|
132361
132387
|
}[] | undefined;
|
|
132388
|
+
pcbTeardrops?: boolean | undefined;
|
|
132389
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132390
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132362
132391
|
pcbPathRelativeTo?: string | undefined;
|
|
132363
132392
|
pcbPaths?: (string | {
|
|
132364
132393
|
x: string | number;
|
|
@@ -132420,6 +132449,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132420
132449
|
} | undefined;
|
|
132421
132450
|
trace_width?: string | number | undefined;
|
|
132422
132451
|
}>, "many">>;
|
|
132452
|
+
pcbTeardrops: z.ZodOptional<z.ZodBoolean>;
|
|
132453
|
+
pcbTeardropStart: z.ZodOptional<z.ZodBoolean>;
|
|
132454
|
+
pcbTeardropEnd: z.ZodOptional<z.ZodBoolean>;
|
|
132423
132455
|
pcbPathRelativeTo: z.ZodOptional<z.ZodString>;
|
|
132424
132456
|
pcbPath: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
132425
132457
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -132586,6 +132618,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132586
132618
|
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
132587
132619
|
trace_width?: number | undefined;
|
|
132588
132620
|
}[] | undefined;
|
|
132621
|
+
pcbTeardrops?: boolean | undefined;
|
|
132622
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132623
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132589
132624
|
pcbPathRelativeTo?: string | undefined;
|
|
132590
132625
|
pcbPaths?: (string | {
|
|
132591
132626
|
x: number;
|
|
@@ -132638,6 +132673,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132638
132673
|
} | undefined;
|
|
132639
132674
|
trace_width?: string | number | undefined;
|
|
132640
132675
|
}[] | undefined;
|
|
132676
|
+
pcbTeardrops?: boolean | undefined;
|
|
132677
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132678
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132641
132679
|
pcbPathRelativeTo?: string | undefined;
|
|
132642
132680
|
pcbPaths?: (string | {
|
|
132643
132681
|
x: string | number;
|
|
@@ -132699,6 +132737,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132699
132737
|
} | undefined;
|
|
132700
132738
|
trace_width?: string | number | undefined;
|
|
132701
132739
|
}>, "many">>;
|
|
132740
|
+
pcbTeardrops: z.ZodOptional<z.ZodBoolean>;
|
|
132741
|
+
pcbTeardropStart: z.ZodOptional<z.ZodBoolean>;
|
|
132742
|
+
pcbTeardropEnd: z.ZodOptional<z.ZodBoolean>;
|
|
132702
132743
|
pcbPathRelativeTo: z.ZodOptional<z.ZodString>;
|
|
132703
132744
|
pcbPath: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
132704
132745
|
x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
|
|
@@ -132865,6 +132906,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132865
132906
|
to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | undefined;
|
|
132866
132907
|
trace_width?: number | undefined;
|
|
132867
132908
|
}[] | undefined;
|
|
132909
|
+
pcbTeardrops?: boolean | undefined;
|
|
132910
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132911
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132868
132912
|
pcbPathRelativeTo?: string | undefined;
|
|
132869
132913
|
pcbPaths?: (string | {
|
|
132870
132914
|
x: number;
|
|
@@ -132917,6 +132961,9 @@ declare const traceProps: z.ZodUnion<[z.ZodObject<{
|
|
|
132917
132961
|
} | undefined;
|
|
132918
132962
|
trace_width?: string | number | undefined;
|
|
132919
132963
|
}[] | undefined;
|
|
132964
|
+
pcbTeardrops?: boolean | undefined;
|
|
132965
|
+
pcbTeardropStart?: boolean | undefined;
|
|
132966
|
+
pcbTeardropEnd?: boolean | undefined;
|
|
132920
132967
|
pcbPathRelativeTo?: string | undefined;
|
|
132921
132968
|
pcbPaths?: (string | {
|
|
132922
132969
|
x: string | number;
|
|
@@ -156728,6 +156775,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156728
156775
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
156729
156776
|
y: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
156730
156777
|
width: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
156778
|
+
width_interpolation_mode: z.ZodOptional<z.ZodEnum<["linear", "quadratic"]>>;
|
|
156731
156779
|
layer: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, z.ZodObject<{
|
|
156732
156780
|
name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
156733
156781
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -156743,6 +156791,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156743
156791
|
y: number;
|
|
156744
156792
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156745
156793
|
route_type: "wire";
|
|
156794
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156746
156795
|
}, {
|
|
156747
156796
|
width: string | number;
|
|
156748
156797
|
x: string | number;
|
|
@@ -156751,6 +156800,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156751
156800
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156752
156801
|
};
|
|
156753
156802
|
route_type: "wire";
|
|
156803
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156754
156804
|
}>, z.ZodObject<{
|
|
156755
156805
|
route_type: z.ZodLiteral<"via">;
|
|
156756
156806
|
x: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, number, string | number>;
|
|
@@ -156801,6 +156851,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156801
156851
|
y: number;
|
|
156802
156852
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156803
156853
|
route_type: "wire";
|
|
156854
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156804
156855
|
} | {
|
|
156805
156856
|
x: number;
|
|
156806
156857
|
y: number;
|
|
@@ -156817,6 +156868,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156817
156868
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156818
156869
|
};
|
|
156819
156870
|
route_type: "wire";
|
|
156871
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156820
156872
|
} | {
|
|
156821
156873
|
x: string | number;
|
|
156822
156874
|
y: string | number;
|
|
@@ -156837,6 +156889,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156837
156889
|
y: number;
|
|
156838
156890
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156839
156891
|
route_type: "wire";
|
|
156892
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156840
156893
|
} | {
|
|
156841
156894
|
x: number;
|
|
156842
156895
|
y: number;
|
|
@@ -156856,6 +156909,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156856
156909
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156857
156910
|
};
|
|
156858
156911
|
route_type: "wire";
|
|
156912
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156859
156913
|
} | {
|
|
156860
156914
|
x: string | number;
|
|
156861
156915
|
y: string | number;
|
|
@@ -156907,6 +156961,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156907
156961
|
y: number;
|
|
156908
156962
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156909
156963
|
route_type: "wire";
|
|
156964
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156910
156965
|
} | {
|
|
156911
156966
|
x: number;
|
|
156912
156967
|
y: number;
|
|
@@ -156969,6 +157024,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156969
157024
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
156970
157025
|
};
|
|
156971
157026
|
route_type: "wire";
|
|
157027
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
156972
157028
|
} | {
|
|
156973
157029
|
x: string | number;
|
|
156974
157030
|
y: string | number;
|
|
@@ -157029,6 +157085,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
157029
157085
|
y: number;
|
|
157030
157086
|
layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
157031
157087
|
route_type: "wire";
|
|
157088
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
157032
157089
|
} | {
|
|
157033
157090
|
x: number;
|
|
157034
157091
|
y: number;
|
|
@@ -157091,6 +157148,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
157091
157148
|
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
157092
157149
|
};
|
|
157093
157150
|
route_type: "wire";
|
|
157151
|
+
width_interpolation_mode?: "linear" | "quadratic" | undefined;
|
|
157094
157152
|
} | {
|
|
157095
157153
|
x: string | number;
|
|
157096
157154
|
y: string | number;
|
|
@@ -182146,6 +182204,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
182146
182204
|
photo: z.ZodOptional<z.ZodBoolean>;
|
|
182147
182205
|
tvs: z.ZodOptional<z.ZodBoolean>;
|
|
182148
182206
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
182207
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
182149
182208
|
pinLabels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
182150
182209
|
}, "strip", z.ZodTypeAny, {
|
|
182151
182210
|
name: string;
|
|
@@ -182824,6 +182883,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
182824
182883
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
182825
182884
|
standard?: boolean | undefined;
|
|
182826
182885
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
182886
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
182827
182887
|
schottky?: boolean | undefined;
|
|
182828
182888
|
zener?: boolean | undefined;
|
|
182829
182889
|
avalanche?: boolean | undefined;
|
|
@@ -183507,6 +183567,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
183507
183567
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
183508
183568
|
standard?: boolean | undefined;
|
|
183509
183569
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
183570
|
+
schSize?: string | number | undefined;
|
|
183510
183571
|
schottky?: boolean | undefined;
|
|
183511
183572
|
zener?: boolean | undefined;
|
|
183512
183573
|
avalanche?: boolean | undefined;
|
|
@@ -184190,6 +184251,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
184190
184251
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
184191
184252
|
standard?: boolean | undefined;
|
|
184192
184253
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
184254
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
184193
184255
|
schottky?: boolean | undefined;
|
|
184194
184256
|
zener?: boolean | undefined;
|
|
184195
184257
|
avalanche?: boolean | undefined;
|
|
@@ -184873,6 +184935,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
184873
184935
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
184874
184936
|
standard?: boolean | undefined;
|
|
184875
184937
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
184938
|
+
schSize?: string | number | undefined;
|
|
184876
184939
|
schottky?: boolean | undefined;
|
|
184877
184940
|
zener?: boolean | undefined;
|
|
184878
184941
|
avalanche?: boolean | undefined;
|
|
@@ -185561,6 +185624,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
185561
185624
|
connections?: Partial<Record<"pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
185562
185625
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
185563
185626
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
185627
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
185564
185628
|
}, {
|
|
185565
185629
|
name: string;
|
|
185566
185630
|
symbol?: SymbolProp | undefined;
|
|
@@ -186239,6 +186303,7 @@ declare const diodeProps: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
186239
186303
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
186240
186304
|
standard?: boolean | undefined;
|
|
186241
186305
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
186306
|
+
schSize?: string | number | undefined;
|
|
186242
186307
|
schottky?: boolean | undefined;
|
|
186243
186308
|
zener?: boolean | undefined;
|
|
186244
186309
|
avalanche?: boolean | undefined;
|
|
@@ -186264,6 +186329,8 @@ interface DiodeProps<PinLabel extends string = string> extends CommonComponentPr
|
|
|
186264
186329
|
photo?: boolean;
|
|
186265
186330
|
tvs?: boolean;
|
|
186266
186331
|
schOrientation?: SchematicOrientation;
|
|
186332
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
186333
|
+
schSize?: SchematicSymbolSize;
|
|
186267
186334
|
}
|
|
186268
186335
|
type InferredDiodeProps = z.input<typeof diodeProps>;
|
|
186269
186336
|
|
|
@@ -190180,6 +190247,8 @@ declare const ledProps: z.ZodObject<{
|
|
|
190180
190247
|
wavelength: z.ZodOptional<z.ZodString>;
|
|
190181
190248
|
schDisplayValue: z.ZodOptional<z.ZodString>;
|
|
190182
190249
|
schOrientation: z.ZodOptional<z.ZodEnum<["vertical", "horizontal", "pos_top", "pos_bottom", "pos_left", "pos_right", "neg_top", "neg_bottom", "neg_left", "neg_right"]>>;
|
|
190250
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
190251
|
+
schSize: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["xs", "sm", "default", "md"]>, z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>]>>;
|
|
190183
190252
|
pinLabels: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodEnum<["pin1", "left", "anode", "pos", "pin2", "right", "cathode", "neg"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>, z.ZodEffects<z.ZodRecord<z.ZodEnum<["1", "2"]>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "many">>]>, z.ZodArray<z.ZodString, "many">]>>, {
|
|
190184
190253
|
pin2?: string | readonly string[] | string[] | undefined;
|
|
190185
190254
|
pin1?: string | readonly string[] | string[] | undefined;
|
|
@@ -190864,6 +190933,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
190864
190933
|
pin1?: string | readonly string[] | string[] | undefined;
|
|
190865
190934
|
} | undefined;
|
|
190866
190935
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
190936
|
+
schSize?: number | "default" | "xs" | "sm" | "md" | undefined;
|
|
190867
190937
|
color?: string | undefined;
|
|
190868
190938
|
wavelength?: string | undefined;
|
|
190869
190939
|
schDisplayValue?: string | undefined;
|
|
@@ -191545,6 +191615,7 @@ declare const ledProps: z.ZodObject<{
|
|
|
191545
191615
|
connections?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | undefined;
|
|
191546
191616
|
pinLabels?: Partial<Record<"left" | "right" | "pin1" | "pin2" | "anode" | "pos" | "cathode" | "neg", string | readonly string[] | string[]>> | Partial<Record<"1" | "2", string | readonly string[] | string[]>> | undefined;
|
|
191547
191617
|
schOrientation?: "vertical" | "horizontal" | "pos_top" | "pos_bottom" | "pos_left" | "pos_right" | "neg_top" | "neg_bottom" | "neg_left" | "neg_right" | undefined;
|
|
191618
|
+
schSize?: string | number | undefined;
|
|
191548
191619
|
color?: string | undefined;
|
|
191549
191620
|
wavelength?: string | undefined;
|
|
191550
191621
|
schDisplayValue?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -16192,7 +16192,7 @@ var schematicPinLabel = z27.string().regex(/^[A-Za-z0-9_]+$/);
|
|
|
16192
16192
|
// lib/common/schematicSize.ts
|
|
16193
16193
|
import { distance as distance10 } from "circuit-json";
|
|
16194
16194
|
import { z as z28 } from "zod";
|
|
16195
|
-
var schematicSymbolSize =
|
|
16195
|
+
var schematicSymbolSize = z28.enum(["xs", "sm", "default", "md"]).or(distance10.pipe(z28.number().finite())).describe("distance between pin1 and pin2 of the schematic symbol");
|
|
16196
16196
|
|
|
16197
16197
|
// lib/common/kicadPinMetadata.ts
|
|
16198
16198
|
import { z as z29 } from "zod";
|
|
@@ -16893,6 +16893,7 @@ var routePoint = z50.discriminatedUnion("route_type", [
|
|
|
16893
16893
|
x: coordinate,
|
|
16894
16894
|
y: coordinate,
|
|
16895
16895
|
width: positiveDistance3,
|
|
16896
|
+
width_interpolation_mode: z50.enum(["linear", "quadratic"]).optional().describe("Interpolate width from this point to the next wire point."),
|
|
16896
16897
|
layer: layer_ref5
|
|
16897
16898
|
}),
|
|
16898
16899
|
z50.object({
|
|
@@ -16910,7 +16911,17 @@ var fanoutTracePath = z50.object({
|
|
|
16910
16911
|
route: z50.array(routePoint).min(2).superRefine((route, ctx) => {
|
|
16911
16912
|
const first = route[0];
|
|
16912
16913
|
let layer = first?.route_type === "via" ? first.from_layer : first?.layer;
|
|
16913
|
-
for (const point8 of route) {
|
|
16914
|
+
for (const [index, point8] of route.entries()) {
|
|
16915
|
+
if (point8.route_type === "wire" && point8.width_interpolation_mode) {
|
|
16916
|
+
const next = route[index + 1];
|
|
16917
|
+
if (next?.route_type !== "wire" || next.layer !== point8.layer || next.x === point8.x && next.y === point8.y) {
|
|
16918
|
+
ctx.addIssue({
|
|
16919
|
+
code: "custom",
|
|
16920
|
+
path: [index, "width_interpolation_mode"],
|
|
16921
|
+
message: "Width interpolation requires a distinct next wire point on the same layer"
|
|
16922
|
+
});
|
|
16923
|
+
}
|
|
16924
|
+
}
|
|
16914
16925
|
if ((point8.route_type === "wire" ? point8.layer : point8.from_layer) !== layer) {
|
|
16915
16926
|
ctx.addIssue({
|
|
16916
16927
|
code: "custom",
|
|
@@ -17727,6 +17738,9 @@ var baseTraceProps = z77.object({
|
|
|
17727
17738
|
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17728
17739
|
schematicRouteHints: z77.array(point).optional(),
|
|
17729
17740
|
pcbRouteHints: z77.array(route_hint_point2).optional(),
|
|
17741
|
+
pcbTeardrops: z77.boolean().optional().describe("Enable PCB trace teardrops."),
|
|
17742
|
+
pcbTeardropStart: z77.boolean().optional().describe("Teardrop at the start (from) of trace"),
|
|
17743
|
+
pcbTeardropEnd: z77.boolean().optional().describe("Teardrop at the end (to) of trace"),
|
|
17730
17744
|
pcbPathRelativeTo: z77.string().optional(),
|
|
17731
17745
|
pcbPath: pcbPath.optional(),
|
|
17732
17746
|
pcbPaths: z77.array(pcbPath).optional(),
|
|
@@ -18367,6 +18381,7 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18367
18381
|
photo: z102.boolean().optional(),
|
|
18368
18382
|
tvs: z102.boolean().optional(),
|
|
18369
18383
|
schOrientation: schematicOrientation.optional(),
|
|
18384
|
+
schSize: schematicSymbolSize.optional(),
|
|
18370
18385
|
pinLabels: diodePinLabelsProp.optional()
|
|
18371
18386
|
}).superRefine((data, ctx) => {
|
|
18372
18387
|
const enabledFlags = [
|
|
@@ -18442,6 +18457,8 @@ var ledProps = commonComponentProps.extend({
|
|
|
18442
18457
|
wavelength: z103.string().optional(),
|
|
18443
18458
|
schDisplayValue: z103.string().optional(),
|
|
18444
18459
|
schOrientation: schematicOrientation.optional(),
|
|
18460
|
+
/** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
|
|
18461
|
+
schSize: schematicSymbolSize.optional(),
|
|
18445
18462
|
// Numeric keys are accepted for compatibility with legacy generated LED
|
|
18446
18463
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18447
18464
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|