@tscircuit/props 0.0.520 → 0.0.522
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 +16 -0
- package/dist/index.d.ts +146 -1
- package/dist/index.js +127 -112
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +10 -0
- package/lib/components/group.ts +2 -0
- package/lib/components/schematic-section.ts +20 -0
- package/lib/index.ts +1 -0
- package/package.json +1 -1
package/lib/common/layout.ts
CHANGED
|
@@ -260,6 +260,10 @@ export interface CommonComponentProps<PinLabel extends string = string>
|
|
|
260
260
|
showAsTranslucentModel?: boolean
|
|
261
261
|
mfn?: string
|
|
262
262
|
manufacturerPartNumber?: string
|
|
263
|
+
/**
|
|
264
|
+
*This component will be drawn as part of this section e.g. \"Power\
|
|
265
|
+
*/
|
|
266
|
+
schSectionName?: string
|
|
263
267
|
}
|
|
264
268
|
|
|
265
269
|
export const commonComponentProps = commonLayoutProps
|
|
@@ -268,6 +272,12 @@ export const commonComponentProps = commonLayoutProps
|
|
|
268
272
|
key: z.any().optional(),
|
|
269
273
|
name: z.string(),
|
|
270
274
|
displayName: z.string().optional(),
|
|
275
|
+
schSectionName: z
|
|
276
|
+
.string()
|
|
277
|
+
.optional()
|
|
278
|
+
.describe(
|
|
279
|
+
'This component will be drawn as part of this section e.g. "Power"',
|
|
280
|
+
),
|
|
271
281
|
datasheetUrl: url.optional(),
|
|
272
282
|
cadModel: cadModelProp.optional(),
|
|
273
283
|
kicadFootprintMetadata: kicadFootprintMetadata.optional(),
|
package/lib/components/group.ts
CHANGED
|
@@ -439,6 +439,7 @@ export interface SubcircuitGroupProps extends BaseGroupProps {
|
|
|
439
439
|
minTraceToPadEdgeClearance?: Distance
|
|
440
440
|
minPadEdgeToPadEdgeClearance?: Distance
|
|
441
441
|
minBoardEdgeClearance?: Distance
|
|
442
|
+
minViaEdgeToPadEdgeClearance?: Distance
|
|
442
443
|
minViaHoleDiameter?: Distance
|
|
443
444
|
minViaPadDiameter?: Distance
|
|
444
445
|
|
|
@@ -605,6 +606,7 @@ export const subcircuitGroupProps = baseGroupProps.extend({
|
|
|
605
606
|
defaultTraceWidth: length.optional(),
|
|
606
607
|
minTraceWidth: length.optional(),
|
|
607
608
|
minViaHoleEdgeToViaHoleEdgeClearance: length.optional(),
|
|
609
|
+
minViaEdgeToPadEdgeClearance: length.optional(),
|
|
608
610
|
minPlatedHoleDrillEdgeToDrillEdgeClearance: length.optional(),
|
|
609
611
|
minTraceToPadEdgeClearance: length.optional(),
|
|
610
612
|
minPadEdgeToPadEdgeClearance: length.optional(),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod"
|
|
2
|
+
import { expectTypesMatch } from "lib/typecheck"
|
|
3
|
+
|
|
4
|
+
export interface SchematicSectionProps {
|
|
5
|
+
displayName?: string
|
|
6
|
+
name: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const schematicSectionProps = z.object({
|
|
10
|
+
displayName: z.string().optional(),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export type InferredSchematicSectionProps = z.input<
|
|
15
|
+
typeof schematicSectionProps
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
expectTypesMatch<SchematicSectionProps, z.input<typeof schematicSectionProps>>(
|
|
19
|
+
true,
|
|
20
|
+
)
|
package/lib/index.ts
CHANGED
|
@@ -102,6 +102,7 @@ export * from "./components/schematic-path"
|
|
|
102
102
|
export * from "./components/schematic-table"
|
|
103
103
|
export * from "./components/schematic-row"
|
|
104
104
|
export * from "./components/schematic-cell"
|
|
105
|
+
export * from "./components/schematic-section"
|
|
105
106
|
export * from "./components/copper-text"
|
|
106
107
|
export * from "./components/silkscreen-text"
|
|
107
108
|
export * from "./components/silkscreen-path"
|