@tscircuit/props 0.0.261 → 0.0.263
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 +334 -305
- package/dist/index.d.ts +1213 -107
- package/dist/index.js +24 -12
- package/dist/index.js.map +1 -1
- package/lib/common/layout.ts +22 -4
- package/lib/components/board.ts +0 -12
- package/lib/components/group.ts +23 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -102,6 +102,15 @@ var supplierProps = z6.object({
|
|
|
102
102
|
supplierPartNumbers: z6.record(supplier_name, z6.array(z6.string())).optional()
|
|
103
103
|
});
|
|
104
104
|
expectTypesMatch(true);
|
|
105
|
+
var pinAttributeMap = z6.object({
|
|
106
|
+
providesPower: z6.boolean().optional(),
|
|
107
|
+
requiresPower: z6.boolean().optional(),
|
|
108
|
+
providesGround: z6.boolean().optional(),
|
|
109
|
+
requiresGround: z6.boolean().optional(),
|
|
110
|
+
providesVoltage: z6.union([z6.string(), z6.number()]).optional(),
|
|
111
|
+
requiresVoltage: z6.union([z6.string(), z6.number()]).optional()
|
|
112
|
+
});
|
|
113
|
+
expectTypesMatch(true);
|
|
105
114
|
var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
|
|
106
115
|
key: z6.any().optional(),
|
|
107
116
|
name: z6.string(),
|
|
@@ -109,7 +118,7 @@ var commonComponentProps = commonLayoutProps.merge(supplierProps).extend({
|
|
|
109
118
|
children: z6.any().optional(),
|
|
110
119
|
symbolName: z6.string().optional(),
|
|
111
120
|
doNotPlace: z6.boolean().optional(),
|
|
112
|
-
pinAttributes: z6.record(z6.string(),
|
|
121
|
+
pinAttributes: z6.record(z6.string(), pinAttributeMap).optional()
|
|
113
122
|
});
|
|
114
123
|
expectTypesMatch(true);
|
|
115
124
|
var componentProps = commonComponentProps;
|
|
@@ -196,7 +205,10 @@ import { z as z10 } from "zod";
|
|
|
196
205
|
var schematicPinLabel = z10.string().regex(/^[A-Za-z0-9_]+$/);
|
|
197
206
|
|
|
198
207
|
// lib/components/board.ts
|
|
199
|
-
import {
|
|
208
|
+
import { z as z24 } from "zod";
|
|
209
|
+
|
|
210
|
+
// lib/components/group.ts
|
|
211
|
+
import { length, distance as distance5 } from "circuit-json";
|
|
200
212
|
|
|
201
213
|
// lib/common/point.ts
|
|
202
214
|
import { distance as distance4 } from "circuit-json";
|
|
@@ -206,11 +218,7 @@ var point = z11.object({
|
|
|
206
218
|
y: distance4
|
|
207
219
|
});
|
|
208
220
|
|
|
209
|
-
// lib/components/board.ts
|
|
210
|
-
import { z as z24 } from "zod";
|
|
211
|
-
|
|
212
221
|
// lib/components/group.ts
|
|
213
|
-
import { length } from "circuit-json";
|
|
214
222
|
import { z as z23 } from "zod";
|
|
215
223
|
|
|
216
224
|
// lib/manual-edits/manual-edit-events/base_manual_edit_event.ts
|
|
@@ -426,7 +434,15 @@ var subcircuitGroupProps = baseGroupProps.extend({
|
|
|
426
434
|
minTraceWidth: length.optional(),
|
|
427
435
|
partsEngine: partsEngine.optional(),
|
|
428
436
|
pcbRouteCache: z23.custom((v) => true).optional(),
|
|
429
|
-
autorouter: autorouterProp.optional()
|
|
437
|
+
autorouter: autorouterProp.optional(),
|
|
438
|
+
square: z23.boolean().optional(),
|
|
439
|
+
emptyArea: z23.string().optional(),
|
|
440
|
+
filledArea: z23.string().optional(),
|
|
441
|
+
width: distance5.optional(),
|
|
442
|
+
height: distance5.optional(),
|
|
443
|
+
outline: z23.array(point).optional(),
|
|
444
|
+
outlineOffsetX: distance5.optional(),
|
|
445
|
+
outlineOffsetY: distance5.optional()
|
|
430
446
|
});
|
|
431
447
|
var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
|
|
432
448
|
subcircuit: z23.literal(true)
|
|
@@ -441,11 +457,6 @@ expectTypesMatch(true);
|
|
|
441
457
|
|
|
442
458
|
// lib/components/board.ts
|
|
443
459
|
var boardProps = subcircuitGroupProps.extend({
|
|
444
|
-
width: distance5.optional(),
|
|
445
|
-
height: distance5.optional(),
|
|
446
|
-
outline: z24.array(point).optional(),
|
|
447
|
-
outlineOffsetX: distance5.optional(),
|
|
448
|
-
outlineOffsetY: distance5.optional(),
|
|
449
460
|
material: z24.enum(["fr4", "fr1"]).default("fr4")
|
|
450
461
|
});
|
|
451
462
|
expectTypesMatch(true);
|
|
@@ -1636,6 +1647,7 @@ export {
|
|
|
1636
1647
|
pcbXDistConstraintProps,
|
|
1637
1648
|
pcbYDistConstraintProps,
|
|
1638
1649
|
pillSmtPadProps,
|
|
1650
|
+
pinAttributeMap,
|
|
1639
1651
|
pinCompatibleVariant,
|
|
1640
1652
|
pinHeaderProps,
|
|
1641
1653
|
pinLabelsProp,
|