@tscircuit/props 0.0.555 → 0.0.557

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.
@@ -261,9 +261,13 @@ export interface CommonComponentProps<PinLabel extends string = string>
261
261
  mfn?: string
262
262
  manufacturerPartNumber?: string
263
263
  /**
264
- *This component will be drawn as part of this section e.g. \"Power\
264
+ * This component will be drawn as part of this section e.g. "Power"
265
265
  */
266
266
  schSectionName?: string
267
+ /**
268
+ * This component will be drawn as part of this sheet e.g. "Main"
269
+ */
270
+ schSheetName?: string
267
271
  }
268
272
 
269
273
  export const commonComponentProps = commonLayoutProps
@@ -278,6 +282,12 @@ export const commonComponentProps = commonLayoutProps
278
282
  .describe(
279
283
  'This component will be drawn as part of this section e.g. "Power"',
280
284
  ),
285
+ schSheetName: z
286
+ .string()
287
+ .optional()
288
+ .describe(
289
+ 'This component will be drawn as part of this sheet e.g. "Main"',
290
+ ),
281
291
  datasheetUrl: url.optional(),
282
292
  cadModel: cadModelProp.optional(),
283
293
  kicadFootprintMetadata: kicadFootprintMetadata.optional(),
@@ -475,6 +475,11 @@ export interface SubcircuitGroupProps
475
475
  */
476
476
  circuitJson?: any[]
477
477
 
478
+ /**
479
+ * Nets from this subcircuit that should be exposed to parent circuits
480
+ */
481
+ exposedNets?: string[]
482
+
478
483
  /**
479
484
  * If true, we'll automatically layout the schematic for this group. Must be
480
485
  * a subcircuit (currently). This is eventually going to be replaced with more
@@ -643,6 +648,7 @@ export const subcircuitGroupProps = baseGroupProps.extend({
643
648
  outlineOffsetX: distance.optional(),
644
649
  outlineOffsetY: distance.optional(),
645
650
  circuitJson: z.array(z.any()).optional(),
651
+ exposedNets: z.array(z.string()).optional(),
646
652
  })
647
653
 
648
654
  export const subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
@@ -0,0 +1,18 @@
1
+ import { z } from "zod"
2
+ import { expectTypesMatch } from "lib/typecheck"
3
+
4
+ export interface SchematicSheetProps {
5
+ name: string
6
+ displayName: string
7
+ children?: any
8
+ }
9
+
10
+ export const schematicSheetProps = z.object({
11
+ name: z.string(),
12
+ displayName: z.string(),
13
+ children: z.any().optional(),
14
+ })
15
+
16
+ export type InferredSchematicSheetProps = z.input<typeof schematicSheetProps>
17
+
18
+ expectTypesMatch<SchematicSheetProps, z.input<typeof schematicSheetProps>>(true)
package/lib/index.ts CHANGED
@@ -108,6 +108,7 @@ export * from "./components/schematic-table"
108
108
  export * from "./components/schematic-row"
109
109
  export * from "./components/schematic-cell"
110
110
  export * from "./components/schematic-section"
111
+ export * from "./components/schematic-sheet"
111
112
  export * from "./components/copper-text"
112
113
  export * from "./components/silkscreen-text"
113
114
  export * from "./components/silkscreen-path"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.555",
3
+ "version": "0.0.557",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",