@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
|
@@ -8,14 +8,6 @@ export interface AssemblySubassemblyProps {
|
|
|
8
8
|
name: string
|
|
9
9
|
/** Human-facing alternate to the stable name. */
|
|
10
10
|
displayName?: string
|
|
11
|
-
/**
|
|
12
|
-
* Attachment target selector, resolved within the nearest assembly.device.
|
|
13
|
-
* May select a connector, assembly.screen, assembly.subassembly, or its
|
|
14
|
-
* assembly.cadassembly alias. Omit for an independently placed assembly.
|
|
15
|
-
* This establishes attachment, not a copy of the target's geometry.
|
|
16
|
-
* Target existence, ambiguity, and attachment cycles are checked by core.
|
|
17
|
-
*/
|
|
18
|
-
connectsTo?: string
|
|
19
11
|
/** Optional CAD geometry using the existing component cadModel formats. */
|
|
20
12
|
cadModel?: CadModelProp
|
|
21
13
|
/** Nested assembly elements or CAD geometry; preserved without parsing. */
|
|
@@ -27,12 +19,6 @@ export const assemblySubassemblyProps = z.object({
|
|
|
27
19
|
message: "name cannot be empty",
|
|
28
20
|
}),
|
|
29
21
|
displayName: z.string().optional(),
|
|
30
|
-
connectsTo: z
|
|
31
|
-
.string()
|
|
32
|
-
.refine((value) => value.trim().length > 0, {
|
|
33
|
-
message: "connectsTo cannot be empty",
|
|
34
|
-
})
|
|
35
|
-
.optional(),
|
|
36
22
|
cadModel: cadModelProp.optional(),
|
|
37
23
|
children: z.custom<ReactNode>().optional(),
|
|
38
24
|
})
|
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
fanoutTracePath,
|
|
7
7
|
} from "../common/fanoutTracePath"
|
|
8
8
|
import {
|
|
9
|
+
type AutorouterConfig,
|
|
9
10
|
type AutorouterProp,
|
|
10
11
|
type PreflightRoutingCheckPolicy,
|
|
11
12
|
type RoutingTolerances,
|
|
13
|
+
autorouterConfig,
|
|
12
14
|
autorouterProp,
|
|
13
15
|
preflightRoutingCheckPolicy,
|
|
14
16
|
routingTolerances,
|
|
@@ -26,6 +28,13 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
26
28
|
key?: any
|
|
27
29
|
name?: string
|
|
28
30
|
autorouter?: AutorouterProp
|
|
31
|
+
/**
|
|
32
|
+
* Custom async routing function accepting simple route JSON and returning the
|
|
33
|
+
* routing result, using the same contract as autorouter.algorithmFn. Parsing
|
|
34
|
+
* preserves the function unchanged. Omitted by default; no aliases or prop
|
|
35
|
+
* conflicts are introduced, and existing phases require no migration.
|
|
36
|
+
*/
|
|
37
|
+
algorithmFn?: AutorouterConfig["algorithmFn"]
|
|
29
38
|
preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy
|
|
30
39
|
phaseIndex?: number
|
|
31
40
|
/**
|
|
@@ -54,6 +63,7 @@ export const autoroutingPhaseProps = z
|
|
|
54
63
|
key: z.any().optional(),
|
|
55
64
|
name: z.string().optional(),
|
|
56
65
|
autorouter: autorouterProp.optional(),
|
|
66
|
+
algorithmFn: autorouterConfig.shape.algorithmFn,
|
|
57
67
|
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
58
68
|
phaseIndex: z.number().optional(),
|
|
59
69
|
pcbTracePaths: z.array(fanoutTracePath).optional(),
|