@tscircuit/props 0.0.570 → 0.0.571
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 +5 -0
- package/dist/index.js +131 -130
- package/dist/index.js.map +1 -1
- package/lib/components/crystal.ts +7 -4
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { capacitance, distance, frequency } from "circuit-json"
|
|
2
|
+
import { createConnectionsProp } from "lib/common/connectionsProp"
|
|
2
3
|
import {
|
|
3
4
|
type CommonComponentProps,
|
|
4
5
|
commonComponentProps,
|
|
5
6
|
lrPins,
|
|
6
7
|
} from "lib/common/layout"
|
|
7
|
-
import type { Connections } from "lib/utility-types/connections-and-selectors"
|
|
8
|
-
import { createConnectionsProp } from "lib/common/connectionsProp"
|
|
9
8
|
import {
|
|
10
|
-
schematicOrientation,
|
|
11
9
|
type SchematicOrientation,
|
|
10
|
+
schematicOrientation,
|
|
12
11
|
} from "lib/common/schematicOrientation"
|
|
13
12
|
import { expectTypesMatch } from "lib/typecheck"
|
|
13
|
+
import type { Connections } from "lib/utility-types/connections-and-selectors"
|
|
14
14
|
import { z } from "zod"
|
|
15
15
|
|
|
16
16
|
export type PinVariant = "two_pin" | "four_pin"
|
|
@@ -22,6 +22,8 @@ export interface CrystalProps<PinLabel extends string = string>
|
|
|
22
22
|
extends CommonComponentProps<PinLabel> {
|
|
23
23
|
frequency: number | string
|
|
24
24
|
loadCapacitance: number | string
|
|
25
|
+
/** Maximum allowed PCB trace length between the crystal and its connected component */
|
|
26
|
+
maxTraceLength?: number | string
|
|
25
27
|
manufacturerPartNumber?: string
|
|
26
28
|
mpn?: string
|
|
27
29
|
pinVariant?: PinVariant
|
|
@@ -32,6 +34,7 @@ export interface CrystalProps<PinLabel extends string = string>
|
|
|
32
34
|
export const crystalProps = commonComponentProps.extend({
|
|
33
35
|
frequency: frequency,
|
|
34
36
|
loadCapacitance: capacitance,
|
|
37
|
+
maxTraceLength: distance.optional(),
|
|
35
38
|
manufacturerPartNumber: z.string().optional(),
|
|
36
39
|
mpn: z.string().optional(),
|
|
37
40
|
pinVariant: z.enum(["two_pin", "four_pin"]).optional(),
|