@tscircuit/props 0.0.645 → 0.0.646
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 +6 -6
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/lib/components/autoroutingphase.ts +14 -0
- package/lib/components/group.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -369,6 +369,8 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
369
369
|
};
|
|
370
370
|
connection?: string;
|
|
371
371
|
connections?: string[];
|
|
372
|
+
// Reroutes traces selected by region or connection. The simplify autorouter
|
|
373
|
+
// may omit a selector to simplify every existing trace in the phase.
|
|
372
374
|
reroute?: boolean;
|
|
373
375
|
}
|
|
374
376
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -21140,9 +21140,9 @@ interface AutorouterConfig {
|
|
|
21140
21140
|
algorithmFn?: (simpleRouteJson: any) => Promise<any>;
|
|
21141
21141
|
/** Override the solver used to place implicit breakout points. */
|
|
21142
21142
|
implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn;
|
|
21143
|
-
preset?: "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "laser_prefab" | "single_layer_fanout" | "fanout" | /** @deprecated Use "auto_jumper" */ "auto-jumper" | /** @deprecated Use "sequential_trace" */ "sequential-trace" | /** @deprecated Use "auto_local" */ "auto-local" | /** @deprecated Use "auto_cloud" */ "auto-cloud";
|
|
21143
|
+
preset?: "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | /** @deprecated Use "auto_jumper" */ "auto-jumper" | /** @deprecated Use "sequential_trace" */ "sequential-trace" | /** @deprecated Use "auto_local" */ "auto-local" | /** @deprecated Use "auto_cloud" */ "auto-cloud";
|
|
21144
21144
|
}
|
|
21145
|
-
type AutorouterPreset = "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "sequential-trace" | "auto-local" | "auto-cloud";
|
|
21145
|
+
type AutorouterPreset = "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "sequential-trace" | "auto-local" | "auto-cloud";
|
|
21146
21146
|
type AutorouterProp = AutorouterConfig | AutocompleteString<AutorouterPreset>;
|
|
21147
21147
|
declare const routingTolerances: z.ZodObject<{
|
|
21148
21148
|
minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -21187,7 +21187,7 @@ declare const autorouterConfig: z.ZodObject<{
|
|
|
21187
21187
|
groupMode: z.ZodOptional<z.ZodEnum<["sequential_trace", "subcircuit", "sequential-trace"]>>;
|
|
21188
21188
|
algorithmFn: z.ZodOptional<z.ZodType<(simpleRouteJson: any) => Promise<any>, z.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
|
|
21189
21189
|
implicitBreakoutPointSolverFn: z.ZodOptional<z.ZodType<ImplicitBreakoutPointSolverFn, z.ZodTypeDef, ImplicitBreakoutPointSolverFn>>;
|
|
21190
|
-
preset: z.ZodOptional<z.ZodEnum<["sequential_trace", "subcircuit", "default", "auto", "auto_local", "auto_cloud", "auto_jumper", "tscircuit_beta", "krt", "freerouting", "laser_prefab", "single_layer_fanout", "fanout", "auto-jumper", "sequential-trace", "auto-local", "auto-cloud"]>>;
|
|
21190
|
+
preset: z.ZodOptional<z.ZodEnum<["sequential_trace", "subcircuit", "default", "auto", "auto_local", "auto_cloud", "auto_jumper", "tscircuit_beta", "krt", "freerouting", "simplify", "laser_prefab", "single_layer_fanout", "fanout", "auto-jumper", "sequential-trace", "auto-local", "auto-cloud"]>>;
|
|
21191
21191
|
local: z.ZodOptional<z.ZodBoolean>;
|
|
21192
21192
|
}, "strip", z.ZodTypeAny, {
|
|
21193
21193
|
serverUrl?: string | undefined;
|
|
@@ -21201,7 +21201,7 @@ declare const autorouterConfig: z.ZodObject<{
|
|
|
21201
21201
|
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
21202
21202
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
21203
21203
|
implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn | undefined;
|
|
21204
|
-
preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
|
|
21204
|
+
preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
|
|
21205
21205
|
local?: boolean | undefined;
|
|
21206
21206
|
}, {
|
|
21207
21207
|
serverUrl?: string | undefined;
|
|
@@ -21215,10 +21215,10 @@ declare const autorouterConfig: z.ZodObject<{
|
|
|
21215
21215
|
groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
|
|
21216
21216
|
algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
|
|
21217
21217
|
implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn | undefined;
|
|
21218
|
-
preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
|
|
21218
|
+
preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
|
|
21219
21219
|
local?: boolean | undefined;
|
|
21220
21220
|
}>;
|
|
21221
|
-
declare const autorouterPreset: z.ZodUnion<[z.ZodLiteral<"sequential_trace">, z.ZodLiteral<"subcircuit">, z.ZodLiteral<"default">, z.ZodLiteral<"auto">, z.ZodLiteral<"auto_local">, z.ZodLiteral<"auto_cloud">, z.ZodLiteral<"auto_jumper">, z.ZodLiteral<"tscircuit_beta">, z.ZodLiteral<"krt">, z.ZodLiteral<"freerouting">, z.ZodLiteral<"laser_prefab">, z.ZodLiteral<"single_layer_fanout">, z.ZodLiteral<"fanout">, z.ZodLiteral<"auto-jumper">, z.ZodLiteral<"sequential-trace">, z.ZodLiteral<"auto-local">, z.ZodLiteral<"auto-cloud">]>;
|
|
21221
|
+
declare const autorouterPreset: z.ZodUnion<[z.ZodLiteral<"sequential_trace">, z.ZodLiteral<"subcircuit">, z.ZodLiteral<"default">, z.ZodLiteral<"auto">, z.ZodLiteral<"auto_local">, z.ZodLiteral<"auto_cloud">, z.ZodLiteral<"auto_jumper">, z.ZodLiteral<"tscircuit_beta">, z.ZodLiteral<"krt">, z.ZodLiteral<"freerouting">, z.ZodLiteral<"simplify">, z.ZodLiteral<"laser_prefab">, z.ZodLiteral<"single_layer_fanout">, z.ZodLiteral<"fanout">, z.ZodLiteral<"auto-jumper">, z.ZodLiteral<"sequential-trace">, z.ZodLiteral<"auto-local">, z.ZodLiteral<"auto-cloud">]>;
|
|
21222
21222
|
declare const autorouterProp: z.ZodType<AutorouterProp>;
|
|
21223
21223
|
declare const autorouterEffortLevel: z.ZodEnum<["1x", "2x", "5x", "10x", "100x"]>;
|
|
21224
21224
|
type AutorouterVersion = "beta_pipeline1" | "beta_pipeline3" | "beta_pipeline4" | "beta_pipeline5" | "beta_pipeline7" | "beta_pipeline9" | "latest";
|
package/dist/index.js
CHANGED
|
@@ -16453,6 +16453,7 @@ var autorouterConfig = z43.object({
|
|
|
16453
16453
|
"tscircuit_beta",
|
|
16454
16454
|
"krt",
|
|
16455
16455
|
"freerouting",
|
|
16456
|
+
"simplify",
|
|
16456
16457
|
"laser_prefab",
|
|
16457
16458
|
"single_layer_fanout",
|
|
16458
16459
|
"fanout",
|
|
@@ -16474,6 +16475,7 @@ var autorouterPreset = z43.union([
|
|
|
16474
16475
|
z43.literal("tscircuit_beta"),
|
|
16475
16476
|
z43.literal("krt"),
|
|
16476
16477
|
z43.literal("freerouting"),
|
|
16478
|
+
z43.literal("simplify"),
|
|
16477
16479
|
z43.literal("laser_prefab"),
|
|
16478
16480
|
// Prefabricated PCB with laser copper ablation
|
|
16479
16481
|
z43.literal("single_layer_fanout"),
|
|
@@ -18050,7 +18052,13 @@ var autoroutingPhaseProps = z91.object({
|
|
|
18050
18052
|
reroute: z91.boolean().optional(),
|
|
18051
18053
|
...fanoutProps.shape
|
|
18052
18054
|
}).superRefine((value, ctx) => {
|
|
18053
|
-
|
|
18055
|
+
const isSimplifyAutorouter = value.autorouter === "simplify" || typeof value.autorouter === "object" && value.autorouter?.preset === "simplify";
|
|
18056
|
+
if (isSimplifyAutorouter && value.reroute !== true) {
|
|
18057
|
+
console.warn(
|
|
18058
|
+
'The "simplify" autorouter preset should only be used with reroute=true'
|
|
18059
|
+
);
|
|
18060
|
+
}
|
|
18061
|
+
if (value.reroute !== void 0 && !(isSimplifyAutorouter && value.reroute === true) && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
18054
18062
|
ctx.addIssue({
|
|
18055
18063
|
code: z91.ZodIssueCode.custom,
|
|
18056
18064
|
message: "region, connection, or connections is required when reroute is provided",
|