@tscircuit/props 0.0.618 → 0.0.619
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 +20 -0
- package/dist/index.d.ts +24097 -119
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/lib/common/cadModel.ts +22 -0
- package/lib/components/footprint.ts +25 -0
- package/lib/enclosure/cutout-aperture.ts +75 -13
- package/lib/enclosure/fdm/box.ts +40 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63,9 +63,13 @@ var assemblyProps = {
|
|
|
63
63
|
// lib/enclosure/cutout-aperture.ts
|
|
64
64
|
import { z as z5 } from "zod";
|
|
65
65
|
var enclosureCutoutApertureShapes = ["pill", "rect", "circle"];
|
|
66
|
-
var
|
|
67
|
-
margin: distance.optional()
|
|
68
|
-
|
|
66
|
+
var cutoutApertureBaseProps = z5.object({
|
|
67
|
+
margin: distance.optional(),
|
|
68
|
+
widthDimensionOffset: distance.optional(),
|
|
69
|
+
heightDimensionOffset: distance.optional(),
|
|
70
|
+
depth: distance.optional()
|
|
71
|
+
});
|
|
72
|
+
var apertureOnlyProps = cutoutApertureBaseProps.shape;
|
|
69
73
|
var enclosureCutoutApertureProps = z5.discriminatedUnion("shape", [
|
|
70
74
|
pillShapeProps.extend(apertureOnlyProps),
|
|
71
75
|
rectShapeProps.extend(apertureOnlyProps),
|
|
@@ -76,11 +80,19 @@ expectTypesMatch(true);
|
|
|
76
80
|
// lib/enclosure/fdm/box.ts
|
|
77
81
|
import { z as z6 } from "zod";
|
|
78
82
|
var enclosureFdmBoxProps = z6.object({
|
|
83
|
+
name: z6.string().optional(),
|
|
79
84
|
boardRef: z6.string().min(1),
|
|
80
85
|
width: distance.optional(),
|
|
81
86
|
height: distance.optional(),
|
|
82
87
|
depth: distance.optional(),
|
|
83
|
-
wallThickness: distance.default("2mm")
|
|
88
|
+
wallThickness: distance.default("2mm"),
|
|
89
|
+
floorThickness: distance.optional(),
|
|
90
|
+
lidThickness: distance.optional(),
|
|
91
|
+
boardClearance: distance.optional(),
|
|
92
|
+
standoffHeight: distance.optional(),
|
|
93
|
+
topHeadroom: distance.optional(),
|
|
94
|
+
lidLipDepth: distance.optional(),
|
|
95
|
+
disableCutouts: z6.boolean().optional()
|
|
84
96
|
});
|
|
85
97
|
expectTypesMatch(true);
|
|
86
98
|
|
|
@@ -146,6 +158,7 @@ var cadModelBase = z10.object({
|
|
|
146
158
|
rotationOffset: z10.number().or(rotationPoint3).optional(),
|
|
147
159
|
positionOffset: point3.optional(),
|
|
148
160
|
modelOriginPosition: point3.optional(),
|
|
161
|
+
modelBounds: z10.object({ min: point3, max: point3 }).optional(),
|
|
149
162
|
size: point3.optional(),
|
|
150
163
|
modelUnitToMmScale: distance.optional(),
|
|
151
164
|
modelBoardNormalDirection: cadModelAxisDirection.optional(),
|
|
@@ -17483,6 +17496,9 @@ var footprintProps = z73.object({
|
|
|
17483
17496
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17484
17497
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17485
17498
|
"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
|
|
17499
|
+
),
|
|
17500
|
+
cutoutApertureDirection: footprintInsertionDirection.optional().describe(
|
|
17501
|
+
"Direction the part's enclosure opening faces, in its unrotated orientation. Distinct from insertionDirection: a side-actuated switch is installed from above and actuated from the side. Falls back to insertionDirection when absent."
|
|
17486
17502
|
)
|
|
17487
17503
|
});
|
|
17488
17504
|
expectTypesMatch(true);
|
|
@@ -19144,6 +19160,7 @@ export {
|
|
|
19144
19160
|
currentSourcePins,
|
|
19145
19161
|
currentSourceProps,
|
|
19146
19162
|
customDrcCheckFn,
|
|
19163
|
+
cutoutApertureBaseProps,
|
|
19147
19164
|
cutoutProps,
|
|
19148
19165
|
differentialPairProps,
|
|
19149
19166
|
diodePinLabelsProp,
|