@tscircuit/props 0.0.480 → 0.0.481

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.
@@ -226,6 +226,35 @@ export const supplierProps = z.object({
226
226
  expectTypesMatch<SupplierProps, z.input<typeof supplierProps>>(true)
227
227
 
228
228
  export interface PinAttributeMap {
229
+ capabilities?: Array<
230
+ | "i2c_sda"
231
+ | "i2c_scl"
232
+ | "spi_cs"
233
+ | "spi_sck"
234
+ | "spi_mosi"
235
+ | "spi_miso"
236
+ | "uart_tx"
237
+ | "uart_rx"
238
+ >
239
+ activeCapabilities?: Array<
240
+ | "i2c_sda"
241
+ | "i2c_scl"
242
+ | "spi_cs"
243
+ | "spi_sck"
244
+ | "spi_mosi"
245
+ | "spi_miso"
246
+ | "uart_tx"
247
+ | "uart_rx"
248
+ >
249
+ activeCapability?:
250
+ | "i2c_sda"
251
+ | "i2c_scl"
252
+ | "spi_cs"
253
+ | "spi_sck"
254
+ | "spi_mosi"
255
+ | "spi_miso"
256
+ | "uart_tx"
257
+ | "uart_rx"
229
258
  providesPower?: boolean
230
259
  requiresPower?: boolean
231
260
  providesGround?: boolean
@@ -236,14 +265,6 @@ export interface PinAttributeMap {
236
265
  includeInBoardPinout?: boolean
237
266
  highlightColor?: string
238
267
  mustBeConnected?: boolean
239
- isI2cSda?: boolean
240
- isI2cScl?: boolean
241
- isSpiMosi?: boolean
242
- isSpiMiso?: boolean
243
- isSpiSck?: boolean
244
- isSpiCs?: boolean
245
- isUartTx?: boolean
246
- isUartRx?: boolean
247
268
  canUseInternalPullup?: boolean
248
269
  isUsingInternalPullup?: boolean
249
270
  needsExternalPullup?: boolean
@@ -257,6 +278,46 @@ export interface PinAttributeMap {
257
278
  }
258
279
 
259
280
  export const pinAttributeMap = z.object({
281
+ capabilities: z
282
+ .array(
283
+ z.enum([
284
+ "i2c_sda",
285
+ "i2c_scl",
286
+ "spi_cs",
287
+ "spi_sck",
288
+ "spi_mosi",
289
+ "spi_miso",
290
+ "uart_tx",
291
+ "uart_rx",
292
+ ]),
293
+ )
294
+ .optional(),
295
+ activeCapabilities: z
296
+ .array(
297
+ z.enum([
298
+ "i2c_sda",
299
+ "i2c_scl",
300
+ "spi_cs",
301
+ "spi_sck",
302
+ "spi_mosi",
303
+ "spi_miso",
304
+ "uart_tx",
305
+ "uart_rx",
306
+ ]),
307
+ )
308
+ .optional(),
309
+ activeCapability: z
310
+ .enum([
311
+ "i2c_sda",
312
+ "i2c_scl",
313
+ "spi_cs",
314
+ "spi_sck",
315
+ "spi_mosi",
316
+ "spi_miso",
317
+ "uart_tx",
318
+ "uart_rx",
319
+ ])
320
+ .optional(),
260
321
  providesPower: z.boolean().optional(),
261
322
  requiresPower: z.boolean().optional(),
262
323
  providesGround: z.boolean().optional(),
@@ -267,14 +328,6 @@ export const pinAttributeMap = z.object({
267
328
  includeInBoardPinout: z.boolean().optional(),
268
329
  highlightColor: z.string().optional(),
269
330
  mustBeConnected: z.boolean().optional(),
270
- isI2cSda: z.boolean().optional(),
271
- isI2cScl: z.boolean().optional(),
272
- isSpiMosi: z.boolean().optional(),
273
- isSpiMiso: z.boolean().optional(),
274
- isSpiSck: z.boolean().optional(),
275
- isSpiCs: z.boolean().optional(),
276
- isUartTx: z.boolean().optional(),
277
- isUartRx: z.boolean().optional(),
278
331
  canUseInternalPullup: z.boolean().optional(),
279
332
  isUsingInternalPullup: z.boolean().optional(),
280
333
  needsExternalPullup: z.boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.480",
3
+ "version": "0.0.481",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",