@tscircuit/props 0.0.656 → 0.0.658
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 +9 -0
- package/dist/index.d.ts +46 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/lib/components/autoroutingphase.ts +4 -0
- package/lib/components/chip.ts +1 -1
- package/lib/components/group.ts +12 -0
- package/lib/components/switch.ts +13 -1
- package/package.json +1 -1
|
@@ -7,8 +7,10 @@ import {
|
|
|
7
7
|
} from "../common/fanoutTracePath"
|
|
8
8
|
import {
|
|
9
9
|
type AutorouterProp,
|
|
10
|
+
type PreflightRoutingCheckPolicy,
|
|
10
11
|
type RoutingTolerances,
|
|
11
12
|
autorouterProp,
|
|
13
|
+
preflightRoutingCheckPolicy,
|
|
12
14
|
routingTolerances,
|
|
13
15
|
} from "./group"
|
|
14
16
|
|
|
@@ -24,6 +26,7 @@ export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
|
|
|
24
26
|
key?: any
|
|
25
27
|
name?: string
|
|
26
28
|
autorouter?: AutorouterProp
|
|
29
|
+
preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy
|
|
27
30
|
phaseIndex?: number
|
|
28
31
|
/**
|
|
29
32
|
* Saved PCB wire/via routes using the same format as fanout pcbTracePaths.
|
|
@@ -51,6 +54,7 @@ export const autoroutingPhaseProps = z
|
|
|
51
54
|
key: z.any().optional(),
|
|
52
55
|
name: z.string().optional(),
|
|
53
56
|
autorouter: autorouterProp.optional(),
|
|
57
|
+
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
54
58
|
phaseIndex: z.number().optional(),
|
|
55
59
|
pcbTracePaths: z.array(fanoutTracePath).optional(),
|
|
56
60
|
...routingTolerances.shape,
|
package/lib/components/chip.ts
CHANGED
package/lib/components/group.ts
CHANGED
|
@@ -491,6 +491,16 @@ export const autorouterProp: z.ZodType<AutorouterProp> = z.union([
|
|
|
491
491
|
|
|
492
492
|
export const autorouterEffortLevel = z.enum(["1x", "2x", "5x", "10x", "100x"])
|
|
493
493
|
|
|
494
|
+
export const preflightRoutingCheckPolicy = z.enum([
|
|
495
|
+
"none",
|
|
496
|
+
"basic",
|
|
497
|
+
"conservative",
|
|
498
|
+
])
|
|
499
|
+
|
|
500
|
+
export type PreflightRoutingCheckPolicy = z.infer<
|
|
501
|
+
typeof preflightRoutingCheckPolicy
|
|
502
|
+
>
|
|
503
|
+
|
|
494
504
|
export type AutorouterVersion =
|
|
495
505
|
| "beta_pipeline1"
|
|
496
506
|
| "beta_pipeline3"
|
|
@@ -542,6 +552,7 @@ export interface SubcircuitGroupProps
|
|
|
542
552
|
pcbRouteCache?: PcbRouteCache
|
|
543
553
|
|
|
544
554
|
autorouter?: AutorouterProp
|
|
555
|
+
preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy
|
|
545
556
|
autorouterEffortLevel?: "1x" | "2x" | "5x" | "10x" | "100x"
|
|
546
557
|
/**
|
|
547
558
|
* Selects the local autorouting pipeline. Unknown string values emit a
|
|
@@ -732,6 +743,7 @@ export const subcircuitGroupProps = baseGroupProps.extend({
|
|
|
732
743
|
_subcircuitCachingEnabled: z.boolean().optional(),
|
|
733
744
|
pcbRouteCache: z.custom<PcbRouteCache>((v) => true).optional(),
|
|
734
745
|
autorouter: autorouterProp.optional(),
|
|
746
|
+
preflightRoutingCheckPolicy: preflightRoutingCheckPolicy.optional(),
|
|
735
747
|
autorouterEffortLevel: autorouterEffortLevel.optional(),
|
|
736
748
|
autorouterVersion: autorouterVersion.optional(),
|
|
737
749
|
square: z.boolean().optional(),
|
package/lib/components/switch.ts
CHANGED
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
} from "lib/common/layout"
|
|
6
6
|
import { connectionTarget } from "lib/common/connectionsProp"
|
|
7
7
|
import type { SchematicPinLabel } from "lib/common/schematicPinLabel"
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
noConnectProp,
|
|
10
|
+
type PinLabelsProp,
|
|
11
|
+
pinLabelsProp,
|
|
12
|
+
} from "lib/components/chip"
|
|
9
13
|
import type { Connections } from "lib/utility-types/connections-and-selectors"
|
|
10
14
|
import { expectTypesMatch } from "lib/typecheck"
|
|
11
15
|
|
|
@@ -14,6 +18,13 @@ import { z } from "zod"
|
|
|
14
18
|
export interface SwitchProps extends CommonComponentProps {
|
|
15
19
|
type?: "spst" | "spdt" | "dpst" | "dpdt"
|
|
16
20
|
pinLabels?: PinLabelsProp<SchematicPinLabel>
|
|
21
|
+
/**
|
|
22
|
+
* Pin names or aliases intentionally left unconnected. Accepts mutable or
|
|
23
|
+
* readonly arrays, using the same label validation as chip noConnect.
|
|
24
|
+
* Omitted or empty arrays mark no pins. Parsed labels are preserved and
|
|
25
|
+
* matching source ports get do_not_connect; explicit connections are not removed.
|
|
26
|
+
*/
|
|
27
|
+
noConnect?: readonly SchematicPinLabel[] | SchematicPinLabel[]
|
|
17
28
|
isNormallyClosed?: boolean
|
|
18
29
|
spdt?: boolean
|
|
19
30
|
spst?: boolean
|
|
@@ -36,6 +47,7 @@ export const switchProps = commonComponentProps
|
|
|
36
47
|
dpst: z.boolean().optional(),
|
|
37
48
|
dpdt: z.boolean().optional(),
|
|
38
49
|
pinLabels: pinLabelsProp.optional(),
|
|
50
|
+
noConnect: noConnectProp.optional(),
|
|
39
51
|
simSwitchFrequency: frequency.optional(),
|
|
40
52
|
simCloseAt: ms.optional(),
|
|
41
53
|
simOpenAt: ms.optional(),
|