jscad-electronics 0.0.179 → 0.0.181

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { AnyCircuitElement, PcbSmtPad, PcbPlatedHole } from 'circuit-json';
3
+ import { NemaMotorModelPropsInput, HexSocketBoltModelPropsInput, SheetMetalModelPropsInput } from '@tscircuit/modelprinter';
4
+ import * as _jscad_modeling_src_geometries_types from '@jscad/modeling/src/geometries/types';
3
5
 
4
6
  declare const A01005: ({ color }: {
5
7
  color?: string | undefined;
@@ -112,7 +114,7 @@ declare const Crystal: ({ horizontalPadPitch, verticalPadPitch, padWidth, padHei
112
114
  declare const ExtrudedPads: ({ circuitJson, footprint, }: {
113
115
  circuitJson?: AnyCircuitElement[];
114
116
  footprint?: string;
115
- }) => react_jsx_runtime.JSX.Element;
117
+ }) => react_jsx_runtime.JSX.Element | null;
116
118
 
117
119
  declare const FootprintPad: ({ pad, isPin1, }: {
118
120
  pad: PcbSmtPad;
@@ -184,6 +186,36 @@ interface SmdChipLeadProps {
184
186
  */
185
187
  declare const SmdChipLead: (props: SmdChipLeadProps) => react_jsx_runtime.JSX.Element;
186
188
 
189
+ type SmdLedSize = "0402" | "0603" | "0805";
190
+ /** Flat-top, two-contact LED packages in mm. The 0603 outline follows
191
+ * modelcdn meshes for two Kingbright parts; other sizes use catalog dimensions.
192
+ * A footprint alone cannot specify lens shape, emitted color, or exact height.
193
+ */
194
+ declare const smdLedDimensions: {
195
+ readonly "0402": {
196
+ readonly length: 1;
197
+ readonly width: 0.5;
198
+ readonly height: 0.5;
199
+ readonly terminalLength: 0.2;
200
+ };
201
+ readonly "0603": {
202
+ readonly length: 1.62;
203
+ readonly width: 0.8;
204
+ readonly height: 0.615;
205
+ readonly terminalLength: 0.21;
206
+ };
207
+ readonly "0805": {
208
+ readonly length: 2;
209
+ readonly width: 1.25;
210
+ readonly height: 0.75;
211
+ readonly terminalLength: 0.35;
212
+ };
213
+ };
214
+ declare function SmdLED({ footprint, color, }: {
215
+ footprint: SmdLedSize;
216
+ color?: string;
217
+ }): react_jsx_runtime.JSX.Element;
218
+
187
219
  interface SmdPinHeaderProps {
188
220
  numberOfPins: number;
189
221
  pitch?: number;
@@ -1299,4 +1331,57 @@ declare const MelfResistor: ({ size, footprint, }: {
1299
1331
  footprint?: string;
1300
1332
  }) => react_jsx_runtime.JSX.Element;
1301
1333
 
1302
- export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, AxialCapacitor, BGA, CeramicChipAntenna, ChipBody, type ChipBodyProps, Crystal, type CrystalProps, DFN, DO219AD, type DO219ADProps, DPAK, type DPAKProps, Display, ElectrolyticCapacitor, type ElectrolyticCapacitorProps, ExtrudedPads, FPC, type FPCProps, FemaleHeader, FemaleHeaderRow, FlexScreen, type FlexScreenAspectRatio, type FlexScreenOrientation, type FlexScreenProps, FootprintPad, FootprintPlatedHole, Footprinter3d, GullWingBody, type GullWingBodyProps, HC49, type HC49Props, JSTPH2_0mm, JSTXH2_5mm, type JSTXH2_5mmProps, JSTZH1_5mm, JstSh, LGA, type LGAProps, LQFP, type LQFPProps, Led2835, type Led2835Props, Led5050, type Led5050Props, MELF, type MELFProps, MINIMELF, type MINIMELFProps, MS012, MS013, MSOP, type MSOPProps, MelfResistor, type MelfResistorSize, MicroMELF, type MicroMELFProps, MountedPcbModule, PinHeader, PinRow, Potentiometer, type PotentiometerLead, type PotentiometerProps, QFN, type QFNProps, QFP, RJ45, type RJ45Props, type ResolvedFlexScreenSize, SMA, SMB, SMC, SMF, SOD123, SOD123F, SOD123FL, type SOD123Props, SOD123W, type SOD123WProps, SOD128, SOD323, SOD323F, SOD323FL, SOD323HE, type SOD323HEProps, SOD523, SOD723, SOD882, SOD923, SOIC, type SOICProps, SOT143, SOT223, type SOT223Props, SOT233P, SOT23W, SOT323, SOT363, SOT457, SOT563, SOT723, SOT886, SOT89, type SOT89Props, SOT963, SSOP, type SSOPProps, Screen, type ScreenProps, SmdChipLead, type SmdChipLeadProps, type SmdLeadPad, SmdPinHeader, type SmdPinHeaderProps, SmdPushButton, type SmdPushButtonProps, SmdSlideSwitch, StampBoard, TO220, type TO220Lead, type TO220Props, TO277, type TO277Props, TO92, type TO92Lead, type TO92Props, TQFP, TantalumCapacitor, type TantalumCase, Tssop, type TssopProps, TwoPadCrystal, type TwoPadCrystalPackage, UsbCMidmount, VSSOP, isJstShFootprint, melfResistorSizes, resolveFlexScreenSize, tantalumCases, twoPadCrystalPackages };
1334
+ type NemaMotorProps = NemaMotorModelPropsInput & {
1335
+ bodyColor?: string;
1336
+ capColor?: string;
1337
+ shaftColor?: string;
1338
+ };
1339
+ type NemaFrameMotorProps = Omit<NemaMotorProps, "nemaSize">;
1340
+ /** Mounting face at Z=0, body along -Z, shaft along +Z; all lengths in mm.
1341
+ * Parameters follow the modelprinter NEMA contract; JSCAD builds all geometry.
1342
+ */
1343
+ declare function NemaMotor({ bodyColor, capColor, shaftColor, ...props }: NemaMotorProps): react_jsx_runtime.JSX.Element;
1344
+ declare const NEMA8: (props: NemaFrameMotorProps) => react_jsx_runtime.JSX.Element;
1345
+ declare const NEMA17: (props: NemaFrameMotorProps) => react_jsx_runtime.JSX.Element;
1346
+ declare const NEMA23: (props: NemaFrameMotorProps) => react_jsx_runtime.JSX.Element;
1347
+
1348
+ /** Indexed triangles, counterclockwise from outside; millimeters, Z up. */
1349
+ interface HexSocketBoltMesh {
1350
+ positions: number[];
1351
+ indices: number[];
1352
+ }
1353
+ /**
1354
+ * Head bearing plane at Z=0; tip at -length; head extends along +Z.
1355
+ * Produces a closed surface with a blind hex socket and a right-hand,
1356
+ * truncated 60-degree helical thread. Threads are a visual approximation.
1357
+ * No renderer dependencies are needed to consume the indexed mesh.
1358
+ */
1359
+ declare const createHexSocketBoltMesh: (input: HexSocketBoltModelPropsInput) => HexSocketBoltMesh;
1360
+
1361
+ type HexSocketBoltProps = HexSocketBoltModelPropsInput & {
1362
+ color?: string;
1363
+ };
1364
+ /** Bearing plane Z=0, tip along -Z, head along +Z. Threads are approximate. */
1365
+ declare function createHexSocketBoltGeom(input: HexSocketBoltModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
1366
+ declare function HexSocketBolt({ color, ...props }: HexSocketBoltProps): react_jsx_runtime.JSX.Element;
1367
+
1368
+ interface SheetMetalMesh {
1369
+ positions: number[];
1370
+ indices: number[];
1371
+ }
1372
+ /** Watertight sheet-metal plate, 90-degree angle or U-channel. Millimeters,
1373
+ * right-handed +Z up. Base midsurface at Z=0, centered in X/Y; flanges rise
1374
+ * above it. Lengths measure straight tangent-to-tangent sections. Bend skins
1375
+ * use the specified inside radius and constant material thickness.
1376
+ * Holes are through-cut on straight panels only; no bend allowance/unfolding.
1377
+ */
1378
+ declare function createSheetMetalMesh(input: SheetMetalModelPropsInput): SheetMetalMesh;
1379
+
1380
+ type SheetMetalProps = SheetMetalModelPropsInput & {
1381
+ color?: string;
1382
+ };
1383
+ /** Base midsurface Z=0; bends and flanges rise along +Z. Dimensions in mm. */
1384
+ declare function createSheetMetalGeom(input: SheetMetalModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
1385
+ declare function SheetMetal({ color, ...props }: SheetMetalProps): react_jsx_runtime.JSX.Element;
1386
+
1387
+ export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, AxialCapacitor, BGA, CeramicChipAntenna, ChipBody, type ChipBodyProps, Crystal, type CrystalProps, DFN, DO219AD, type DO219ADProps, DPAK, type DPAKProps, Display, ElectrolyticCapacitor, type ElectrolyticCapacitorProps, ExtrudedPads, FPC, type FPCProps, FemaleHeader, FemaleHeaderRow, FlexScreen, type FlexScreenAspectRatio, type FlexScreenOrientation, type FlexScreenProps, FootprintPad, FootprintPlatedHole, Footprinter3d, GullWingBody, type GullWingBodyProps, HC49, type HC49Props, HexSocketBolt, type HexSocketBoltMesh, type HexSocketBoltProps, JSTPH2_0mm, JSTXH2_5mm, type JSTXH2_5mmProps, JSTZH1_5mm, JstSh, LGA, type LGAProps, LQFP, type LQFPProps, Led2835, type Led2835Props, Led5050, type Led5050Props, MELF, type MELFProps, MINIMELF, type MINIMELFProps, MS012, MS013, MSOP, type MSOPProps, MelfResistor, type MelfResistorSize, MicroMELF, type MicroMELFProps, MountedPcbModule, NEMA17, NEMA23, NEMA8, type NemaFrameMotorProps, NemaMotor, type NemaMotorProps, PinHeader, PinRow, Potentiometer, type PotentiometerLead, type PotentiometerProps, QFN, type QFNProps, QFP, RJ45, type RJ45Props, type ResolvedFlexScreenSize, SMA, SMB, SMC, SMF, SOD123, SOD123F, SOD123FL, type SOD123Props, SOD123W, type SOD123WProps, SOD128, SOD323, SOD323F, SOD323FL, SOD323HE, type SOD323HEProps, SOD523, SOD723, SOD882, SOD923, SOIC, type SOICProps, SOT143, SOT223, type SOT223Props, SOT233P, SOT23W, SOT323, SOT363, SOT457, SOT563, SOT723, SOT886, SOT89, type SOT89Props, SOT963, SSOP, type SSOPProps, Screen, type ScreenProps, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SmdChipLead, type SmdChipLeadProps, SmdLED, type SmdLeadPad, type SmdLedSize, SmdPinHeader, type SmdPinHeaderProps, SmdPushButton, type SmdPushButtonProps, SmdSlideSwitch, StampBoard, TO220, type TO220Lead, type TO220Props, TO277, type TO277Props, TO92, type TO92Lead, type TO92Props, TQFP, TantalumCapacitor, type TantalumCase, Tssop, type TssopProps, TwoPadCrystal, type TwoPadCrystalPackage, UsbCMidmount, VSSOP, createHexSocketBoltGeom, createHexSocketBoltMesh, createSheetMetalGeom, createSheetMetalMesh, isJstShFootprint, melfResistorSizes, resolveFlexScreenSize, smdLedDimensions, tantalumCases, twoPadCrystalPackages };