@tscircuit/props 0.0.570 → 0.0.572
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 +13 -0
- package/dist/index.js +133 -130
- package/dist/index.js.map +1 -1
- package/lib/components/crystal.ts +7 -4
- package/lib/components/group.ts +4 -0
- 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(),
|
package/lib/components/group.ts
CHANGED
|
@@ -329,6 +329,8 @@ export interface RoutingTolerances {
|
|
|
329
329
|
|
|
330
330
|
export interface AutorouterConfig {
|
|
331
331
|
serverUrl?: string
|
|
332
|
+
cacheServerUrl?: string
|
|
333
|
+
shouldUploadToCache?: boolean
|
|
332
334
|
inputFormat?: "simplified" | "circuit-json"
|
|
333
335
|
serverMode?: "job" | "solve-endpoint"
|
|
334
336
|
serverCacheEnabled?: boolean
|
|
@@ -398,6 +400,8 @@ export const routingTolerances = z.object({
|
|
|
398
400
|
|
|
399
401
|
export const autorouterConfig = z.object({
|
|
400
402
|
serverUrl: url.optional(),
|
|
403
|
+
cacheServerUrl: url.optional(),
|
|
404
|
+
shouldUploadToCache: z.boolean().optional(),
|
|
401
405
|
inputFormat: z.enum(["simplified", "circuit-json"]).optional(),
|
|
402
406
|
serverMode: z.enum(["job", "solve-endpoint"]).optional(),
|
|
403
407
|
serverCacheEnabled: z.boolean().optional(),
|