@tscircuit/props 0.0.335 → 0.0.337
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 +10 -0
- package/dist/index.d.ts +783 -316
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +2 -2
- package/lib/components/group.ts +16 -0
- package/lib/components/net.ts +2 -2
- package/lib/components/trace.ts +1 -1
- package/package.json +1 -1
package/lib/common/layout.ts
CHANGED
|
@@ -152,7 +152,7 @@ export interface PinAttributeMap {
|
|
|
152
152
|
requiresVoltage?: string | number
|
|
153
153
|
doNotConnect?: boolean
|
|
154
154
|
includeInBoardPinout?: boolean
|
|
155
|
-
|
|
155
|
+
highlightColor?: string
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export const pinAttributeMap = z.object({
|
|
@@ -164,7 +164,7 @@ export const pinAttributeMap = z.object({
|
|
|
164
164
|
requiresVoltage: z.union([z.string(), z.number()]).optional(),
|
|
165
165
|
doNotConnect: z.boolean().optional(),
|
|
166
166
|
includeInBoardPinout: z.boolean().optional(),
|
|
167
|
-
|
|
167
|
+
highlightColor: z.string().optional(),
|
|
168
168
|
})
|
|
169
169
|
|
|
170
170
|
expectTypesMatch<PinAttributeMap, z.input<typeof pinAttributeMap>>(true)
|
package/lib/components/group.ts
CHANGED
|
@@ -19,6 +19,10 @@ import {
|
|
|
19
19
|
schematicPinArrangement,
|
|
20
20
|
type SchematicPinArrangement,
|
|
21
21
|
} from "lib/common/schematicPinDefinitions"
|
|
22
|
+
import {
|
|
23
|
+
schematicPinStyle,
|
|
24
|
+
type SchematicPinStyle,
|
|
25
|
+
} from "lib/common/schematicPinStyle"
|
|
22
26
|
import type { Connections } from "lib/utility-types/connections-and-selectors"
|
|
23
27
|
|
|
24
28
|
export const layoutConfig = z.object({
|
|
@@ -175,6 +179,16 @@ export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
|
|
|
175
179
|
*/
|
|
176
180
|
schPinArrangement?: SchematicPinArrangement
|
|
177
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Spacing between pins when rendered as a schematic box
|
|
184
|
+
*/
|
|
185
|
+
schPinSpacing?: Distance
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Styles to apply to individual pins in the schematic box representation
|
|
189
|
+
*/
|
|
190
|
+
schPinStyle?: SchematicPinStyle
|
|
191
|
+
|
|
178
192
|
pcbWidth?: Distance
|
|
179
193
|
pcbHeight?: Distance
|
|
180
194
|
schWidth?: Distance
|
|
@@ -409,6 +423,8 @@ export const baseGroupProps = commonLayoutProps.extend({
|
|
|
409
423
|
showAsSchematicBox: z.boolean().optional(),
|
|
410
424
|
connections: z.record(z.string(), connectionTarget.optional()).optional(),
|
|
411
425
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
426
|
+
schPinSpacing: length.optional(),
|
|
427
|
+
schPinStyle: schematicPinStyle.optional(),
|
|
412
428
|
|
|
413
429
|
...layoutConfig.shape,
|
|
414
430
|
grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
|
package/lib/components/net.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { expectTypesMatch } from "lib/typecheck"
|
|
|
4
4
|
export interface NetProps {
|
|
5
5
|
name: string
|
|
6
6
|
connectsTo?: string | string[]
|
|
7
|
-
|
|
7
|
+
highlightColor?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const netProps = z.object({
|
|
11
11
|
name: z.string(),
|
|
12
12
|
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
13
|
-
|
|
13
|
+
highlightColor: z.string().optional(),
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
type InferredNetProps = z.input<typeof netProps>
|
package/lib/components/trace.ts
CHANGED
|
@@ -18,7 +18,7 @@ const baseTraceProps = z.object({
|
|
|
18
18
|
pcbPath: z.array(point).optional(),
|
|
19
19
|
schDisplayLabel: z.string().optional(),
|
|
20
20
|
schStroke: z.string().optional(),
|
|
21
|
-
|
|
21
|
+
highlightColor: z.string().optional(),
|
|
22
22
|
maxLength: distance.optional(),
|
|
23
23
|
})
|
|
24
24
|
|