@tscircuit/props 0.0.479 → 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.
- package/README.md +4 -1
- package/dist/index.d.ts +2220 -62
- package/dist/index.js +49 -7
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +93 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,6 +30,10 @@ import {
|
|
|
30
30
|
rotation as rotation2,
|
|
31
31
|
supplier_name
|
|
32
32
|
} from "circuit-json";
|
|
33
|
+
import { z as z15 } from "zod";
|
|
34
|
+
|
|
35
|
+
// lib/common/cadModel.ts
|
|
36
|
+
import { z as z6 } from "zod";
|
|
33
37
|
|
|
34
38
|
// lib/common/distance.ts
|
|
35
39
|
import { distance as baseDistance, length } from "circuit-json";
|
|
@@ -38,12 +42,6 @@ var calcString = z3.string().regex(/^calc\(.*\)$/);
|
|
|
38
42
|
var distance = baseDistance;
|
|
39
43
|
var pcbCoordinate = calcString.or(baseDistance);
|
|
40
44
|
|
|
41
|
-
// lib/common/layout.ts
|
|
42
|
-
import { z as z15 } from "zod";
|
|
43
|
-
|
|
44
|
-
// lib/common/cadModel.ts
|
|
45
|
-
import { z as z6 } from "zod";
|
|
46
|
-
|
|
47
45
|
// lib/common/point3.ts
|
|
48
46
|
import { distance as distance2 } from "circuit-json";
|
|
49
47
|
import { z as z4 } from "zod";
|
|
@@ -377,6 +375,40 @@ var supplierProps = z15.object({
|
|
|
377
375
|
});
|
|
378
376
|
expectTypesMatch(true);
|
|
379
377
|
var pinAttributeMap = z15.object({
|
|
378
|
+
capabilities: z15.array(
|
|
379
|
+
z15.enum([
|
|
380
|
+
"i2c_sda",
|
|
381
|
+
"i2c_scl",
|
|
382
|
+
"spi_cs",
|
|
383
|
+
"spi_sck",
|
|
384
|
+
"spi_mosi",
|
|
385
|
+
"spi_miso",
|
|
386
|
+
"uart_tx",
|
|
387
|
+
"uart_rx"
|
|
388
|
+
])
|
|
389
|
+
).optional(),
|
|
390
|
+
activeCapabilities: z15.array(
|
|
391
|
+
z15.enum([
|
|
392
|
+
"i2c_sda",
|
|
393
|
+
"i2c_scl",
|
|
394
|
+
"spi_cs",
|
|
395
|
+
"spi_sck",
|
|
396
|
+
"spi_mosi",
|
|
397
|
+
"spi_miso",
|
|
398
|
+
"uart_tx",
|
|
399
|
+
"uart_rx"
|
|
400
|
+
])
|
|
401
|
+
).optional(),
|
|
402
|
+
activeCapability: z15.enum([
|
|
403
|
+
"i2c_sda",
|
|
404
|
+
"i2c_scl",
|
|
405
|
+
"spi_cs",
|
|
406
|
+
"spi_sck",
|
|
407
|
+
"spi_mosi",
|
|
408
|
+
"spi_miso",
|
|
409
|
+
"uart_tx",
|
|
410
|
+
"uart_rx"
|
|
411
|
+
]).optional(),
|
|
380
412
|
providesPower: z15.boolean().optional(),
|
|
381
413
|
requiresPower: z15.boolean().optional(),
|
|
382
414
|
providesGround: z15.boolean().optional(),
|
|
@@ -386,7 +418,17 @@ var pinAttributeMap = z15.object({
|
|
|
386
418
|
doNotConnect: z15.boolean().optional(),
|
|
387
419
|
includeInBoardPinout: z15.boolean().optional(),
|
|
388
420
|
highlightColor: z15.string().optional(),
|
|
389
|
-
mustBeConnected: z15.boolean().optional()
|
|
421
|
+
mustBeConnected: z15.boolean().optional(),
|
|
422
|
+
canUseInternalPullup: z15.boolean().optional(),
|
|
423
|
+
isUsingInternalPullup: z15.boolean().optional(),
|
|
424
|
+
needsExternalPullup: z15.boolean().optional(),
|
|
425
|
+
canUseInternalPulldown: z15.boolean().optional(),
|
|
426
|
+
isUsingInternalPulldown: z15.boolean().optional(),
|
|
427
|
+
needsExternalPulldown: z15.boolean().optional(),
|
|
428
|
+
canUseOpenDrain: z15.boolean().optional(),
|
|
429
|
+
isUsingOpenDrain: z15.boolean().optional(),
|
|
430
|
+
canUsePushPull: z15.boolean().optional(),
|
|
431
|
+
isUsingPushPull: z15.boolean().optional()
|
|
390
432
|
});
|
|
391
433
|
expectTypesMatch(true);
|
|
392
434
|
var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
|