@tscircuit/props 0.0.216 → 0.0.218

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.
@@ -36,6 +36,10 @@ export interface ChipPropsSU<PinLabel extends string = string>
36
36
  extends CommonComponentProps {
37
37
  manufacturerPartNumber?: string
38
38
  pinLabels?: PinLabelsProp<string, PinLabel>
39
+ /**
40
+ * Whether to show pin aliases in the schematic
41
+ */
42
+ showPinAliases?: boolean
39
43
  schPinArrangement?: SchematicPortArrangement
40
44
  /** @deprecated Use schPinArrangement instead. */
41
45
  schPortArrangement?: SchematicPortArrangement
@@ -121,6 +125,7 @@ export const pinCompatibleVariant = z.object({
121
125
  export const chipProps = commonComponentProps.extend({
122
126
  manufacturerPartNumber: z.string().optional(),
123
127
  pinLabels: pinLabelsProp.optional(),
128
+ showPinAliases: z.boolean().optional(),
124
129
  internallyConnectedPins: z.array(z.array(z.string())).optional(),
125
130
  externallyConnectedPins: z.array(z.array(z.string())).optional(),
126
131
  schPinArrangement: schematicPinArrangement.optional(),
@@ -3,16 +3,22 @@ import { expectTypesMatch } from "lib/typecheck"
3
3
  import { distance } from "lib/common/distance"
4
4
  import { rotation } from "circuit-json"
5
5
 
6
+ /**
7
+ * @deprecated Use NetLabelProps instead.
8
+ */
6
9
  export interface NetAliasProps {
7
10
  net?: string
11
+ connection?: string
8
12
  schX?: number | string
9
13
  schY?: number | string
10
14
  schRotation?: number | string
11
15
  anchorSide?: "left" | "up" | "right" | "down"
12
16
  }
13
17
 
18
+ /** @deprecated Use netLabelProps instead. */
14
19
  export const netAliasProps = z.object({
15
20
  net: z.string().optional(),
21
+ connection: z.string().optional(),
16
22
  schX: distance.optional(),
17
23
  schY: distance.optional(),
18
24
  schRotation: rotation.optional(),
@@ -0,0 +1,25 @@
1
+ import { z } from "zod"
2
+ import { expectTypesMatch } from "lib/typecheck"
3
+ import { distance } from "lib/common/distance"
4
+ import { rotation } from "circuit-json"
5
+
6
+ export interface NetLabelProps {
7
+ net?: string
8
+ connection?: string
9
+ schX?: number | string
10
+ schY?: number | string
11
+ schRotation?: number | string
12
+ anchorSide?: "left" | "up" | "right" | "down"
13
+ }
14
+
15
+ export const netLabelProps = z.object({
16
+ net: z.string().optional(),
17
+ connection: z.string().optional(),
18
+ schX: distance.optional(),
19
+ schY: distance.optional(),
20
+ schRotation: rotation.optional(),
21
+ anchorSide: z.enum(["left", "up", "right", "down"]).optional(),
22
+ })
23
+
24
+ type InferredNetLabelProps = z.input<typeof netLabelProps>
25
+ expectTypesMatch<NetLabelProps, InferredNetLabelProps>(true)
package/lib/index.ts CHANGED
@@ -36,6 +36,7 @@ export * from "./components/footprint"
36
36
  export * from "./components/battery"
37
37
  export * from "./components/pin-header"
38
38
  export * from "./components/netalias"
39
+ export * from "./components/netlabel"
39
40
  export * from "./components/push-button"
40
41
  export * from "./components/subcircuit"
41
42
  export * from "./manual-edits"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.216",
3
+ "version": "0.0.218",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",