@tscircuit/props 0.0.500 → 0.0.501

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.
@@ -1,63 +1,15 @@
1
- import { distance } from "circuit-json"
2
- import {
3
- type CommonComponentProps,
4
- commonComponentProps,
5
- } from "lib/common/layout"
6
- import {
7
- type SchematicPortArrangement,
8
- schematicPortArrangement,
9
- } from "lib/common/schematicPinDefinitions"
10
- import {
11
- type SchematicPinStyle,
12
- schematicPinStyle,
13
- } from "lib/common/schematicPinStyle"
14
- import {
15
- schematicPinLabel,
16
- type SchematicPinLabel,
17
- } from "lib/common/schematicPinLabel"
1
+ import { chipProps, type ChipPropsSU } from "./chip"
18
2
  import { expectTypesMatch } from "lib/typecheck"
19
3
  import { z } from "zod"
20
4
 
21
- export interface ConnectorProps extends CommonComponentProps {
22
- manufacturerPartNumber?: string
23
- pinLabels?: Record<
24
- number | SchematicPinLabel,
25
- SchematicPinLabel | SchematicPinLabel[]
26
- >
27
- schPinStyle?: SchematicPinStyle
28
- schPinSpacing?: number | string
29
- schWidth?: number | string
30
- schHeight?: number | string
31
- schDirection?: "left" | "right"
32
- schPortArrangement?: SchematicPortArrangement
33
- /**
34
- * Groups of pins that are internally connected
35
- * e.g., [["1","2"], ["2","3"]]
36
- */
37
- internallyConnectedPins?: (string | number)[][]
5
+ export interface ConnectorProps extends ChipPropsSU {
38
6
  /**
39
7
  * Connector standard, e.g. usb_c, m2
40
8
  */
41
9
  standard?: "usb_c" | "m2"
42
10
  }
43
11
 
44
- export const connectorProps = commonComponentProps.extend({
45
- manufacturerPartNumber: z.string().optional(),
46
- pinLabels: z
47
- .record(
48
- z.number().or(schematicPinLabel),
49
- schematicPinLabel.or(z.array(schematicPinLabel)),
50
- )
51
- .optional(),
52
- schPinStyle: schematicPinStyle.optional(),
53
- schPinSpacing: distance.optional(),
54
- schWidth: distance.optional(),
55
- schHeight: distance.optional(),
56
- schDirection: z.enum(["left", "right"]).optional(),
57
- schPortArrangement: schematicPortArrangement.optional(),
58
- internallyConnectedPins: z
59
- .array(z.array(z.union([z.string(), z.number()])))
60
- .optional(),
12
+ export const connectorProps = chipProps.extend({
61
13
  standard: z.enum(["usb_c", "m2"]).optional(),
62
14
  })
63
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.500",
3
+ "version": "0.0.501",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",