@tscircuit/props 0.0.473 → 0.0.475
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/dist/index.d.ts +114 -17
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +10 -0
- package/lib/components/port.ts +4 -0
- package/package.json +1 -1
package/lib/common/layout.ts
CHANGED
|
@@ -267,6 +267,10 @@ export interface CommonComponentProps<PinLabel extends string = string>
|
|
|
267
267
|
children?: any
|
|
268
268
|
symbolName?: string
|
|
269
269
|
doNotPlace?: boolean
|
|
270
|
+
/**
|
|
271
|
+
* Allows the PCB component to hang off the board (e.g. for USB ports or displays)
|
|
272
|
+
*/
|
|
273
|
+
allowOffBoard?: boolean
|
|
270
274
|
/**
|
|
271
275
|
* Does this component take up all the space within its bounds on a layer. This is generally true
|
|
272
276
|
* except for when separated pin headers are being represented by a single component (in which case,
|
|
@@ -294,6 +298,12 @@ export const commonComponentProps = commonLayoutProps
|
|
|
294
298
|
children: z.any().optional(),
|
|
295
299
|
symbolName: z.string().optional(),
|
|
296
300
|
doNotPlace: z.boolean().optional(),
|
|
301
|
+
allowOffBoard: z
|
|
302
|
+
.boolean()
|
|
303
|
+
.optional()
|
|
304
|
+
.describe(
|
|
305
|
+
"Allows the PCB component to hang off the board (e.g. for USB ports or displays)",
|
|
306
|
+
),
|
|
297
307
|
obstructsWithinBounds: z
|
|
298
308
|
.boolean()
|
|
299
309
|
.optional()
|
package/lib/components/port.ts
CHANGED
|
@@ -8,6 +8,10 @@ export const portProps = commonLayoutProps.extend({
|
|
|
8
8
|
pinNumber: z.number().optional(),
|
|
9
9
|
schStemLength: z.number().optional(),
|
|
10
10
|
aliases: z.array(z.string()).optional(),
|
|
11
|
+
layer: z.string().optional(),
|
|
12
|
+
layers: z.array(z.string()).optional(),
|
|
13
|
+
schX: z.number().optional(),
|
|
14
|
+
schY: z.number().optional(),
|
|
11
15
|
direction: direction,
|
|
12
16
|
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
13
17
|
kicadPinMetadata: kicadPinMetadata.optional(),
|