@tscircuit/props 0.0.663 → 0.0.665
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 +7 -0
- package/dist/index.d.ts +12 -20
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/lib/assembly/subassembly.ts +0 -14
- package/lib/components/autoroutingphase.ts +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -360,6 +360,13 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
360
360
|
key?: any;
|
|
361
361
|
name?: string;
|
|
362
362
|
autorouter?: AutorouterProp;
|
|
363
|
+
/**
|
|
364
|
+
* Custom async routing function accepting simple route JSON and returning the
|
|
365
|
+
* routing result, using the same contract as autorouter.algorithmFn. Parsing
|
|
366
|
+
* preserves the function unchanged. Omitted by default; no aliases or prop
|
|
367
|
+
* conflicts are introduced, and existing phases require no migration.
|
|
368
|
+
*/
|
|
369
|
+
algorithmFn?: AutorouterConfig["algorithmFn"];
|
|
363
370
|
preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy;
|
|
364
371
|
phaseIndex?: number;
|
|
365
372
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3143,14 +3143,6 @@ interface AssemblySubassemblyProps {
|
|
|
3143
3143
|
name: string;
|
|
3144
3144
|
/** Human-facing alternate to the stable name. */
|
|
3145
3145
|
displayName?: string;
|
|
3146
|
-
/**
|
|
3147
|
-
* Attachment target selector, resolved within the nearest assembly.device.
|
|
3148
|
-
* May select a connector, assembly.screen, assembly.subassembly, or its
|
|
3149
|
-
* assembly.cadassembly alias. Omit for an independently placed assembly.
|
|
3150
|
-
* This establishes attachment, not a copy of the target's geometry.
|
|
3151
|
-
* Target existence, ambiguity, and attachment cycles are checked by core.
|
|
3152
|
-
*/
|
|
3153
|
-
connectsTo?: string;
|
|
3154
3146
|
/** Optional CAD geometry using the existing component cadModel formats. */
|
|
3155
3147
|
cadModel?: CadModelProp;
|
|
3156
3148
|
/** Nested assembly elements or CAD geometry; preserved without parsing. */
|
|
@@ -3159,7 +3151,6 @@ interface AssemblySubassemblyProps {
|
|
|
3159
3151
|
declare const assemblySubassemblyProps: z.ZodObject<{
|
|
3160
3152
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
3161
3153
|
displayName: z.ZodOptional<z.ZodString>;
|
|
3162
|
-
connectsTo: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
3163
3154
|
cadModel: z.ZodOptional<z.ZodUnion<[z.ZodNull, z.ZodString, z.ZodType<react.ReactElement<any, string | react.JSXElementConstructor<any>>, z.ZodTypeDef, react.ReactElement<any, string | react.JSXElementConstructor<any>>>, z.ZodObject<{
|
|
3164
3155
|
rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
|
|
3165
3156
|
x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
@@ -4502,7 +4493,6 @@ declare const assemblySubassemblyProps: z.ZodObject<{
|
|
|
4502
4493
|
}, "strip", z.ZodTypeAny, {
|
|
4503
4494
|
name: string;
|
|
4504
4495
|
displayName?: string | undefined;
|
|
4505
|
-
connectsTo?: string | undefined;
|
|
4506
4496
|
cadModel?: string | {
|
|
4507
4497
|
stlUrl: string;
|
|
4508
4498
|
rotationOffset?: number | {
|
|
@@ -4788,7 +4778,6 @@ declare const assemblySubassemblyProps: z.ZodObject<{
|
|
|
4788
4778
|
}, {
|
|
4789
4779
|
name: string;
|
|
4790
4780
|
displayName?: string | undefined;
|
|
4791
|
-
connectsTo?: string | undefined;
|
|
4792
4781
|
cadModel?: string | {
|
|
4793
4782
|
stlUrl: string;
|
|
4794
4783
|
rotationOffset?: number | {
|
|
@@ -5078,7 +5067,6 @@ type AssemblySubassemblyPropsInput = z.input<typeof assemblySubassemblyProps>;
|
|
|
5078
5067
|
declare const assemblyCadAssemblyProps: zod.ZodObject<{
|
|
5079
5068
|
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
5080
5069
|
displayName: zod.ZodOptional<zod.ZodString>;
|
|
5081
|
-
connectsTo: zod.ZodOptional<zod.ZodEffects<zod.ZodString, string, string>>;
|
|
5082
5070
|
cadModel: zod.ZodOptional<zod.ZodUnion<[zod.ZodNull, zod.ZodString, zod.ZodType<react.ReactElement<any, string | react.JSXElementConstructor<any>>, zod.ZodTypeDef, react.ReactElement<any, string | react.JSXElementConstructor<any>>>, zod.ZodObject<{
|
|
5083
5071
|
rotationOffset: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodObject<{
|
|
5084
5072
|
x: zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>;
|
|
@@ -6421,7 +6409,6 @@ declare const assemblyCadAssemblyProps: zod.ZodObject<{
|
|
|
6421
6409
|
}, "strip", zod.ZodTypeAny, {
|
|
6422
6410
|
name: string;
|
|
6423
6411
|
displayName?: string | undefined;
|
|
6424
|
-
connectsTo?: string | undefined;
|
|
6425
6412
|
cadModel?: string | {
|
|
6426
6413
|
stlUrl: string;
|
|
6427
6414
|
rotationOffset?: number | {
|
|
@@ -6707,7 +6694,6 @@ declare const assemblyCadAssemblyProps: zod.ZodObject<{
|
|
|
6707
6694
|
}, {
|
|
6708
6695
|
name: string;
|
|
6709
6696
|
displayName?: string | undefined;
|
|
6710
|
-
connectsTo?: string | undefined;
|
|
6711
6697
|
cadModel?: string | {
|
|
6712
6698
|
stlUrl: string;
|
|
6713
6699
|
rotationOffset?: number | {
|
|
@@ -7034,7 +7020,6 @@ declare const assemblyProps: {
|
|
|
7034
7020
|
readonly subassembly: zod.ZodObject<{
|
|
7035
7021
|
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
7036
7022
|
displayName: zod.ZodOptional<zod.ZodString>;
|
|
7037
|
-
connectsTo: zod.ZodOptional<zod.ZodEffects<zod.ZodString, string, string>>;
|
|
7038
7023
|
cadModel: zod.ZodOptional<zod.ZodUnion<[zod.ZodNull, zod.ZodString, zod.ZodType<react.ReactElement<any, string | react.JSXElementConstructor<any>>, zod.ZodTypeDef, react.ReactElement<any, string | react.JSXElementConstructor<any>>>, zod.ZodObject<{
|
|
7039
7024
|
rotationOffset: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodObject<{
|
|
7040
7025
|
x: zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>;
|
|
@@ -8377,7 +8362,6 @@ declare const assemblyProps: {
|
|
|
8377
8362
|
}, "strip", zod.ZodTypeAny, {
|
|
8378
8363
|
name: string;
|
|
8379
8364
|
displayName?: string | undefined;
|
|
8380
|
-
connectsTo?: string | undefined;
|
|
8381
8365
|
cadModel?: string | {
|
|
8382
8366
|
stlUrl: string;
|
|
8383
8367
|
rotationOffset?: number | {
|
|
@@ -8663,7 +8647,6 @@ declare const assemblyProps: {
|
|
|
8663
8647
|
}, {
|
|
8664
8648
|
name: string;
|
|
8665
8649
|
displayName?: string | undefined;
|
|
8666
|
-
connectsTo?: string | undefined;
|
|
8667
8650
|
cadModel?: string | {
|
|
8668
8651
|
stlUrl: string;
|
|
8669
8652
|
rotationOffset?: number | {
|
|
@@ -8950,7 +8933,6 @@ declare const assemblyProps: {
|
|
|
8950
8933
|
readonly cadassembly: zod.ZodObject<{
|
|
8951
8934
|
name: zod.ZodEffects<zod.ZodString, string, string>;
|
|
8952
8935
|
displayName: zod.ZodOptional<zod.ZodString>;
|
|
8953
|
-
connectsTo: zod.ZodOptional<zod.ZodEffects<zod.ZodString, string, string>>;
|
|
8954
8936
|
cadModel: zod.ZodOptional<zod.ZodUnion<[zod.ZodNull, zod.ZodString, zod.ZodType<react.ReactElement<any, string | react.JSXElementConstructor<any>>, zod.ZodTypeDef, react.ReactElement<any, string | react.JSXElementConstructor<any>>>, zod.ZodObject<{
|
|
8955
8937
|
rotationOffset: zod.ZodOptional<zod.ZodUnion<[zod.ZodNumber, zod.ZodObject<{
|
|
8956
8938
|
x: zod.ZodUnion<[zod.ZodNumber, zod.ZodString]>;
|
|
@@ -10293,7 +10275,6 @@ declare const assemblyProps: {
|
|
|
10293
10275
|
}, "strip", zod.ZodTypeAny, {
|
|
10294
10276
|
name: string;
|
|
10295
10277
|
displayName?: string | undefined;
|
|
10296
|
-
connectsTo?: string | undefined;
|
|
10297
10278
|
cadModel?: string | {
|
|
10298
10279
|
stlUrl: string;
|
|
10299
10280
|
rotationOffset?: number | {
|
|
@@ -10579,7 +10560,6 @@ declare const assemblyProps: {
|
|
|
10579
10560
|
}, {
|
|
10580
10561
|
name: string;
|
|
10581
10562
|
displayName?: string | undefined;
|
|
10582
|
-
connectsTo?: string | undefined;
|
|
10583
10563
|
cadModel?: string | {
|
|
10584
10564
|
stlUrl: string;
|
|
10585
10565
|
rotationOffset?: number | {
|
|
@@ -156189,6 +156169,13 @@ interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
156189
156169
|
key?: any;
|
|
156190
156170
|
name?: string;
|
|
156191
156171
|
autorouter?: AutorouterProp;
|
|
156172
|
+
/**
|
|
156173
|
+
* Custom async routing function accepting simple route JSON and returning the
|
|
156174
|
+
* routing result, using the same contract as autorouter.algorithmFn. Parsing
|
|
156175
|
+
* preserves the function unchanged. Omitted by default; no aliases or prop
|
|
156176
|
+
* conflicts are introduced, and existing phases require no migration.
|
|
156177
|
+
*/
|
|
156178
|
+
algorithmFn?: AutorouterConfig["algorithmFn"];
|
|
156192
156179
|
preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy;
|
|
156193
156180
|
phaseIndex?: number;
|
|
156194
156181
|
/**
|
|
@@ -156285,6 +156272,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156285
156272
|
key: z.ZodOptional<z.ZodAny>;
|
|
156286
156273
|
name: z.ZodOptional<z.ZodString>;
|
|
156287
156274
|
autorouter: z.ZodOptional<z.ZodType<AutorouterProp, z.ZodTypeDef, AutorouterProp>>;
|
|
156275
|
+
algorithmFn: z.ZodOptional<z.ZodType<(simpleRouteJson: any) => Promise<any>, z.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
|
|
156288
156276
|
preflightRoutingCheckPolicy: z.ZodOptional<z.ZodEnum<["none", "basic", "conservative"]>>;
|
|
156289
156277
|
phaseIndex: z.ZodOptional<z.ZodNumber>;
|
|
156290
156278
|
pcbTracePaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -156450,6 +156438,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156450
156438
|
minBoardEdgeClearance?: number | undefined;
|
|
156451
156439
|
minViaHoleDiameter?: number | undefined;
|
|
156452
156440
|
minViaPadDiameter?: number | undefined;
|
|
156441
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
156453
156442
|
autorouter?: AutorouterProp | undefined;
|
|
156454
156443
|
preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
|
|
156455
156444
|
connection?: string | undefined;
|
|
@@ -156504,6 +156493,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156504
156493
|
minBoardEdgeClearance?: string | number | undefined;
|
|
156505
156494
|
minViaHoleDiameter?: string | number | undefined;
|
|
156506
156495
|
minViaPadDiameter?: string | number | undefined;
|
|
156496
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
156507
156497
|
autorouter?: AutorouterProp | undefined;
|
|
156508
156498
|
preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
|
|
156509
156499
|
connection?: string | undefined;
|
|
@@ -156568,6 +156558,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156568
156558
|
minBoardEdgeClearance?: number | undefined;
|
|
156569
156559
|
minViaHoleDiameter?: number | undefined;
|
|
156570
156560
|
minViaPadDiameter?: number | undefined;
|
|
156561
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
156571
156562
|
autorouter?: AutorouterProp | undefined;
|
|
156572
156563
|
preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
|
|
156573
156564
|
connection?: string | undefined;
|
|
@@ -156622,6 +156613,7 @@ declare const autoroutingPhaseProps: z.ZodEffects<z.ZodObject<{
|
|
|
156622
156613
|
minBoardEdgeClearance?: string | number | undefined;
|
|
156623
156614
|
minViaHoleDiameter?: string | number | undefined;
|
|
156624
156615
|
minViaPadDiameter?: string | number | undefined;
|
|
156616
|
+
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
156625
156617
|
autorouter?: AutorouterProp | undefined;
|
|
156626
156618
|
preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
|
|
156627
156619
|
connection?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -143,9 +143,6 @@ var assemblySubassemblyProps = z7.object({
|
|
|
143
143
|
message: "name cannot be empty"
|
|
144
144
|
}),
|
|
145
145
|
displayName: z7.string().optional(),
|
|
146
|
-
connectsTo: z7.string().refine((value) => value.trim().length > 0, {
|
|
147
|
-
message: "connectsTo cannot be empty"
|
|
148
|
-
}).optional(),
|
|
149
146
|
cadModel: cadModelProp.optional(),
|
|
150
147
|
children: z7.custom().optional()
|
|
151
148
|
});
|
|
@@ -18153,6 +18150,7 @@ var autoroutingPhaseProps = z93.object({
|
|
|
18153
18150
|
key: z93.any().optional(),
|
|
18154
18151
|
name: z93.string().optional(),
|
|
18155
18152
|
autorouter: autorouterProp.optional(),
|
|
18153
|
+
algorithmFn: autorouterConfig.shape.algorithmFn,
|
|
18156
18154
|
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
18157
18155
|
phaseIndex: z93.number().optional(),
|
|
18158
18156
|
pcbTracePaths: z93.array(fanoutTracePath).optional(),
|