@tscircuit/props 0.0.656 → 0.0.657
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 +13 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/lib/components/chip.ts +1 -1
- package/lib/components/switch.ts +13 -1
- package/package.json +1 -1
package/lib/components/chip.ts
CHANGED
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(),
|