@tscircuit/props 0.0.521 → 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.
@@ -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(),
@@ -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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.521",
3
+ "version": "0.0.522",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",