jscad-electronics 0.0.238 → 0.0.240

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,14 +1,40 @@
1
1
  import * as react from 'react';
2
+ import { JscadModel, JscadReferenceFeature } from 'jscad-fiber/model';
3
+ import * as _tscircuit_jscad from '@tscircuit/jscad';
4
+ export { IndexedMesh as IndustrialIndexedMesh, geom3ToIndexedMesh } from '@tscircuit/jscad';
2
5
  import { AnyCircuitElement, PcbSmtPad, PcbPlatedHole } from 'circuit-json';
3
6
  import { z } from 'zod';
4
7
  import jscad from '@jscad/modeling';
5
8
  import * as _jscad_modeling_src_geometries_types from '@jscad/modeling/src/geometries/types';
9
+ import * as jscad_fiber from 'jscad-fiber';
6
10
  import { Geom3 } from '@jscad/modeling/src/geometries/geom3';
7
11
 
8
12
  declare const A01005: ({ color }: {
9
13
  color?: string | undefined;
10
14
  }) => react.JSX.Element;
11
15
 
16
+ /** Model output collected from names declared in the Fiber component tree. */
17
+ type NamedJscadModel = JscadModel;
18
+ interface JscadNamedEdgePath {
19
+ points: {
20
+ x: number;
21
+ y: number;
22
+ z: number;
23
+ }[];
24
+ closed: boolean;
25
+ }
26
+ declare function listJscadNamedEdges(model: NamedJscadModel): string[];
27
+ declare function listJscadReferenceFeatures(model: NamedJscadModel): string[];
28
+ /** Other consumers can use the same declared names for native solid, face or
29
+ * profile features, without forcing them into an edge measurement contract.
30
+ */
31
+ declare function readJscadReferenceFeature(model: NamedJscadModel, name: string): JscadReferenceFeature;
32
+ /** Read a planar native edge with its complete Fiber ancestor placement. Samples
33
+ * are CAD mm (+Z up) relative to the rendered model root. The caller applies any
34
+ * outer CAD component placement before passing points to a drawing exporter.
35
+ */
36
+ declare function readJscadNamedEdge(model: NamedJscadModel, name: string): JscadNamedEdgePath;
37
+
12
38
  declare const A0201: ({ color }: {
13
39
  color?: string | undefined;
14
40
  }) => react.JSX.Element;
@@ -6274,12 +6300,16 @@ type RectangularTubeProps = RectangularTubeModelPropsInput & {
6274
6300
  };
6275
6301
  declare function RectangularTube({ color, ...props }: RectangularTubeProps): react.JSX.Element;
6276
6302
 
6277
- /** Open rectangular stock tube. Outer and inner radii are independent; minimum corner clearance is validated. Section centered on XY, ends Z=0 and Z=length. */
6303
+ /** Open rectangular stock tube, defined by its normal Fiber construction nodes.
6304
+ * Section centered on XY, ends Z=0 and Z=length.
6305
+ */
6278
6306
  declare function createRectangularTubeGeom(input: RectangularTubeModelPropsInput): jscad.geometries.geom3.Geom3;
6279
- declare function createRectangularTubeMesh(input: RectangularTubeModelPropsInput): {
6280
- positions: number[];
6281
- indices: number[];
6282
- };
6307
+ declare function createRectangularTubeMesh(input: RectangularTubeModelPropsInput): _tscircuit_jscad.IndexedMesh;
6308
+
6309
+ /** Convenience for rendering the same Fiber component used by the model
6310
+ * registry. Its declared named features are collected by the Fiber renderer.
6311
+ */
6312
+ declare function createRectangularTubeModel(input: RectangularTubeModelPropsInput): jscad_fiber.JscadModel;
6283
6313
 
6284
6314
  type RigidCouplerMesh = ShaftMountMesh;
6285
6315
  /** Geometry is driven by the corresponding modelprinter schema and hole layout. */
@@ -6536,4 +6566,4 @@ type ZeeBarProps = ZeeBarModelPropsInput & {
6536
6566
  declare function createZeeBarGeom(input: ZeeBarModelPropsInput): _jscad_modeling_src_geometries_types.Geom3;
6537
6567
  declare function ZeeBar({ color, ...props }: ZeeBarProps): react.JSX.Element;
6538
6568
 
6539
- export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, AngleBar, type AngleBarProps, AxialCapacitor, BGA, BallBearing, type BallBearingMesh, type BallBearingMeshOptions, type BallBearingMeshPart, type BallBearingProps, BallTransferUnit, type BallTransferUnitMesh, type BallTransferUnitMeshPart, type BallTransferUnitProps, ButtonScrew, type ButtonScrewMesh, type ButtonScrewMeshOptions, type ButtonScrewProps, CableGrommet, type CableGrommetMesh, type CableGrommetMeshOptions, type CableGrommetProps, CeramicChipAntenna, ChannelBar, type ChannelBarProps, ChipBody, type ChipBodyProps, ClampingShaftCollar, type ClampingShaftCollarMesh, type ClampingShaftCollarProps, CompressionSpring, type CompressionSpringMesh, type CompressionSpringMeshOptions, type CompressionSpringProps, Crystal, type CrystalProps, DFN, DO219AD, type DO219ADProps, DPAK, type DPAKProps, Display, DowelPin, type DowelPinMesh, type DowelPinMeshOptions, type DowelPinProps, ElectrolyticCapacitor, type ElectrolyticCapacitorProps, ExtrudedPads, FPC, type FPCProps, FemaleHeader, FemaleHeaderRow, FemaleStandoff, type FemaleStandoffMesh, type FemaleStandoffMeshOptions, type FemaleStandoffProps, FlangeBolt, type FlangeBoltMesh, type FlangeBoltMeshOptions, type FlangeBoltProps, FlangeNut, type FlangeNutMesh, type FlangeNutMeshOptions, type FlangeNutProps, FlangedBushing, type FlangedBushingMesh, type FlangedBushingProps, FlatCableClip, type FlatCableClipProps, FlatGasket, type FlatGasketMesh, type FlatGasketProps, FlatHeadScrew, type FlatHeadScrewMesh, type FlatHeadScrewMeshOptions, type FlatHeadScrewProps, FlexScreen, type FlexScreenAspectRatio, type FlexScreenProps, FootprintPad, FootprintPlatedHole, Footprinter3d, GullWingBody, type GullWingBodyProps, HC49, type HC49Props, HatSection, type HatSectionMesh, type HatSectionProps, HeatSetInsert, type HeatSetInsertMesh, type HeatSetInsertMeshOptions, type HeatSetInsertProps, HelicalGear, type HelicalGearMesh, type HelicalGearProps, HexBolt, type HexBoltMesh, type HexBoltMeshOptions, type HexBoltProps, HexNut, type HexNutMesh, type HexNutMeshOptions, type HexNutProps, HexSocketBolt, type HexSocketBoltMesh, type HexSocketBoltProps, HollowPositioningArmTube, type HollowPositioningArmTubeMesh, type HollowPositioningArmTubeMeshOptions, type HollowPositioningArmTubeProps, 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, MaleFemaleStandoff, type MaleFemaleStandoffMesh, type MaleFemaleStandoffMeshOptions, type MaleFemaleStandoffProps, MelfResistor, type MelfResistorSize, MicroMELF, type MicroMELFProps, MountedPcbModule, NEMA17, NEMA23, NEMA34, NEMA8, type NemaFrameMotorProps, NemaMotor, type NemaMotorProps, NylonLockNut, type NylonLockNutMesh, type NylonLockNutMeshOptions, type NylonLockNutMeshes, type NylonLockNutProps, PanScrew, type PanScrewMesh, type PanScrewMeshOptions, type PanScrewProps, PerforatedAngle, type PerforatedAngleMesh, type PerforatedAngleProps, PerforatedSheet, type PerforatedSheetProps, PinHeader, PinRow, PlainBushing, type PlainBushingMesh, type PlainBushingProps, Potentiometer, type PotentiometerLead, type PotentiometerProps, PushFitPlug, type PushFitPlugProps, QFN, type QFNProps, QFP, RJ45, type RJ45Props, RectangularBar, type RectangularBarProps, RectangularGasket, type RectangularGasketMesh, type RectangularGasketProps, RectangularTube, type RectangularTubeProps, type ResolvedFlexScreenSize, RigidCoupler, type RigidCouplerMesh, type RigidCouplerProps, 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, SetScrew, type SetScrewMesh, type SetScrewMeshOptions, type SetScrewProps, ShaftCollar, type ShaftCollarMesh, type ShaftCollarProps, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SlottedChannel, type SlottedChannelMesh, type SlottedChannelProps, SmdChipLead, type SmdChipLeadProps, SmdLED, type SmdLeadPad, type SmdLedSize, SmdPinHeader, type SmdPinHeaderProps, SmdPushButton, type SmdPushButtonProps, SmdSlideSwitch, Spacer, type SpacerMesh, type SpacerProps, SplitGrommet, type SplitGrommetMesh, type SplitGrommetProps, SplitWasher, type SplitWasherMesh, type SplitWasherMeshOptions, type SplitWasherProps, SpurGear, type SpurGearMesh, type SpurGearProps, StampBoard, TO220, type TO220Lead, type TO220Props, TO277, type TO277Props, TO92, type TO92Lead, type TO92Props, TQFP, TSlotCoverStrip, type TSlotCoverStripProps, TSlotExtrusion, type TSlotExtrusionMesh, type TSlotExtrusionProps, TSlotGusset, type TSlotGussetMesh, type TSlotGussetProps, TSlotInsideCorner, type TSlotInsideCornerMesh, type TSlotInsideCornerProps, TantalumCapacitor, type TantalumCase, ThreadedRod, type ThreadedRodMesh, type ThreadedRodMeshOptions, type ThreadedRodProps, TorsionSpring, type TorsionSpringMesh, type TorsionSpringMeshOptions, type TorsionSpringProps, Tssop, type TssopProps, TwoPadCrystal, type TwoPadCrystalPackage, Ufl, type UflGeometry, type UflProps, UsbCMidmount, VSSOP, WormGear, type WormGearMesh, type WormGearProps, ZeeBar, type ZeeBarMesh, type ZeeBarProps, createAngleBarGeom, createAngleBarMesh, createBallBearingGeom, createBallBearingMesh, createBallTransferUnitGeom, createBallTransferUnitMesh, createButtonScrewGeom, createButtonScrewMesh, createCableGrommetGeom, createCableGrommetMesh, createChannelBarGeom, createChannelBarMesh, createClampingShaftCollarGeom, createClampingShaftCollarMesh, createCompressionSpringGeom, createCompressionSpringMesh, createDowelPinGeom, createDowelPinMesh, createFemaleStandoffGeom, createFemaleStandoffMesh, createFlangeBoltGeom, createFlangeBoltMesh, createFlangeNutGeom, createFlangeNutMesh, createFlangedBushingGeom, createFlangedBushingMesh, createFlatCableClipGeom, createFlatCableClipMesh, createFlatGasketGeom, createFlatGasketMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHatSectionGeom, createHatSectionMesh, createHeatSetInsertGeom, createHeatSetInsertMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexNutGeom, createHexNutMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createHollowPositioningArmTubeGeom, createHollowPositioningArmTubeMesh, createMaleFemaleStandoffGeom, createMaleFemaleStandoffMesh, createNylonLockNutGeom, createNylonLockNutGeometries, createNylonLockNutMesh, createNylonLockNutMeshes, createPanScrewGeom, createPanScrewMesh, createPerforatedAngleGeom, createPerforatedAngleMesh, createPerforatedSheetGeom, createPerforatedSheetMesh, createPlainBushingGeom, createPlainBushingMesh, createPushFitPlugGeom, createPushFitPlugMesh, createRectangularBarGeom, createRectangularBarMesh, createRectangularGasketGeom, createRectangularGasketMesh, createRectangularTubeGeom, createRectangularTubeMesh, createRigidCouplerGeom, createRigidCouplerMesh, createSetScrewGeom, createSetScrewMesh, createShaftCollarGeom, createShaftCollarMesh, createSheetMetalGeom, createSheetMetalMesh, createSlottedChannelGeom, createSlottedChannelMesh, createSpacerGeom, createSpacerMesh, createSplitGrommetGeom, createSplitGrommetMesh, createSplitWasherGeom, createSplitWasherMesh, createSpurGearGeom, createSpurGearMesh, createTSlotCoverStripGeom, createTSlotCoverStripMesh, createTSlotExtrusionGeom, createTSlotExtrusionMesh, createTSlotGussetGeom, createTSlotGussetMesh, createTSlotInsideCornerGeom, createTSlotInsideCornerMesh, createThreadedRodGeom, createThreadedRodMesh, createTorsionSpringGeom, createTorsionSpringMesh, createUflGeometries, createWormGearGeom, createWormGearMesh, createZeeBarGeom, createZeeBarMesh, isJstShFootprint, melfResistorSizes, resolveFlexScreenSize, smdLedDimensions, tantalumCases, twoPadCrystalPackages };
6569
+ export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, AngleBar, type AngleBarProps, AxialCapacitor, BGA, BallBearing, type BallBearingMesh, type BallBearingMeshOptions, type BallBearingMeshPart, type BallBearingProps, BallTransferUnit, type BallTransferUnitMesh, type BallTransferUnitMeshPart, type BallTransferUnitProps, ButtonScrew, type ButtonScrewMesh, type ButtonScrewMeshOptions, type ButtonScrewProps, CableGrommet, type CableGrommetMesh, type CableGrommetMeshOptions, type CableGrommetProps, CeramicChipAntenna, ChannelBar, type ChannelBarProps, ChipBody, type ChipBodyProps, ClampingShaftCollar, type ClampingShaftCollarMesh, type ClampingShaftCollarProps, CompressionSpring, type CompressionSpringMesh, type CompressionSpringMeshOptions, type CompressionSpringProps, Crystal, type CrystalProps, DFN, DO219AD, type DO219ADProps, DPAK, type DPAKProps, Display, DowelPin, type DowelPinMesh, type DowelPinMeshOptions, type DowelPinProps, ElectrolyticCapacitor, type ElectrolyticCapacitorProps, ExtrudedPads, FPC, type FPCProps, FemaleHeader, FemaleHeaderRow, FemaleStandoff, type FemaleStandoffMesh, type FemaleStandoffMeshOptions, type FemaleStandoffProps, FlangeBolt, type FlangeBoltMesh, type FlangeBoltMeshOptions, type FlangeBoltProps, FlangeNut, type FlangeNutMesh, type FlangeNutMeshOptions, type FlangeNutProps, FlangedBushing, type FlangedBushingMesh, type FlangedBushingProps, FlatCableClip, type FlatCableClipProps, FlatGasket, type FlatGasketMesh, type FlatGasketProps, FlatHeadScrew, type FlatHeadScrewMesh, type FlatHeadScrewMeshOptions, type FlatHeadScrewProps, FlexScreen, type FlexScreenAspectRatio, type FlexScreenProps, FootprintPad, FootprintPlatedHole, Footprinter3d, GullWingBody, type GullWingBodyProps, HC49, type HC49Props, HatSection, type HatSectionMesh, type HatSectionProps, HeatSetInsert, type HeatSetInsertMesh, type HeatSetInsertMeshOptions, type HeatSetInsertProps, HelicalGear, type HelicalGearMesh, type HelicalGearProps, HexBolt, type HexBoltMesh, type HexBoltMeshOptions, type HexBoltProps, HexNut, type HexNutMesh, type HexNutMeshOptions, type HexNutProps, HexSocketBolt, type HexSocketBoltMesh, type HexSocketBoltProps, HollowPositioningArmTube, type HollowPositioningArmTubeMesh, type HollowPositioningArmTubeMeshOptions, type HollowPositioningArmTubeProps, JSTPH2_0mm, JSTXH2_5mm, type JSTXH2_5mmProps, JSTZH1_5mm, type JscadNamedEdgePath, JstSh, LGA, type LGAProps, LQFP, type LQFPProps, Led2835, type Led2835Props, Led5050, type Led5050Props, MELF, type MELFProps, MINIMELF, type MINIMELFProps, MS012, MS013, MSOP, type MSOPProps, MaleFemaleStandoff, type MaleFemaleStandoffMesh, type MaleFemaleStandoffMeshOptions, type MaleFemaleStandoffProps, MelfResistor, type MelfResistorSize, MicroMELF, type MicroMELFProps, MountedPcbModule, NEMA17, NEMA23, NEMA34, NEMA8, type NamedJscadModel, type NemaFrameMotorProps, NemaMotor, type NemaMotorProps, NylonLockNut, type NylonLockNutMesh, type NylonLockNutMeshOptions, type NylonLockNutMeshes, type NylonLockNutProps, PanScrew, type PanScrewMesh, type PanScrewMeshOptions, type PanScrewProps, PerforatedAngle, type PerforatedAngleMesh, type PerforatedAngleProps, PerforatedSheet, type PerforatedSheetProps, PinHeader, PinRow, PlainBushing, type PlainBushingMesh, type PlainBushingProps, Potentiometer, type PotentiometerLead, type PotentiometerProps, PushFitPlug, type PushFitPlugProps, QFN, type QFNProps, QFP, RJ45, type RJ45Props, RectangularBar, type RectangularBarProps, RectangularGasket, type RectangularGasketMesh, type RectangularGasketProps, RectangularTube, type RectangularTubeProps, type ResolvedFlexScreenSize, RigidCoupler, type RigidCouplerMesh, type RigidCouplerProps, 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, SetScrew, type SetScrewMesh, type SetScrewMeshOptions, type SetScrewProps, ShaftCollar, type ShaftCollarMesh, type ShaftCollarProps, SheetMetal, type SheetMetalMesh, type SheetMetalProps, SlottedChannel, type SlottedChannelMesh, type SlottedChannelProps, SmdChipLead, type SmdChipLeadProps, SmdLED, type SmdLeadPad, type SmdLedSize, SmdPinHeader, type SmdPinHeaderProps, SmdPushButton, type SmdPushButtonProps, SmdSlideSwitch, Spacer, type SpacerMesh, type SpacerProps, SplitGrommet, type SplitGrommetMesh, type SplitGrommetProps, SplitWasher, type SplitWasherMesh, type SplitWasherMeshOptions, type SplitWasherProps, SpurGear, type SpurGearMesh, type SpurGearProps, StampBoard, TO220, type TO220Lead, type TO220Props, TO277, type TO277Props, TO92, type TO92Lead, type TO92Props, TQFP, TSlotCoverStrip, type TSlotCoverStripProps, TSlotExtrusion, type TSlotExtrusionMesh, type TSlotExtrusionProps, TSlotGusset, type TSlotGussetMesh, type TSlotGussetProps, TSlotInsideCorner, type TSlotInsideCornerMesh, type TSlotInsideCornerProps, TantalumCapacitor, type TantalumCase, ThreadedRod, type ThreadedRodMesh, type ThreadedRodMeshOptions, type ThreadedRodProps, TorsionSpring, type TorsionSpringMesh, type TorsionSpringMeshOptions, type TorsionSpringProps, Tssop, type TssopProps, TwoPadCrystal, type TwoPadCrystalPackage, Ufl, type UflGeometry, type UflProps, UsbCMidmount, VSSOP, WormGear, type WormGearMesh, type WormGearProps, ZeeBar, type ZeeBarMesh, type ZeeBarProps, createAngleBarGeom, createAngleBarMesh, createBallBearingGeom, createBallBearingMesh, createBallTransferUnitGeom, createBallTransferUnitMesh, createButtonScrewGeom, createButtonScrewMesh, createCableGrommetGeom, createCableGrommetMesh, createChannelBarGeom, createChannelBarMesh, createClampingShaftCollarGeom, createClampingShaftCollarMesh, createCompressionSpringGeom, createCompressionSpringMesh, createDowelPinGeom, createDowelPinMesh, createFemaleStandoffGeom, createFemaleStandoffMesh, createFlangeBoltGeom, createFlangeBoltMesh, createFlangeNutGeom, createFlangeNutMesh, createFlangedBushingGeom, createFlangedBushingMesh, createFlatCableClipGeom, createFlatCableClipMesh, createFlatGasketGeom, createFlatGasketMesh, createFlatHeadScrewGeom, createFlatHeadScrewMesh, createHatSectionGeom, createHatSectionMesh, createHeatSetInsertGeom, createHeatSetInsertMesh, createHelicalGearGeom, createHelicalGearMesh, createHexBoltGeom, createHexBoltMesh, createHexNutGeom, createHexNutMesh, createHexSocketBoltGeom, createHexSocketBoltMesh, createHollowPositioningArmTubeGeom, createHollowPositioningArmTubeMesh, createMaleFemaleStandoffGeom, createMaleFemaleStandoffMesh, createNylonLockNutGeom, createNylonLockNutGeometries, createNylonLockNutMesh, createNylonLockNutMeshes, createPanScrewGeom, createPanScrewMesh, createPerforatedAngleGeom, createPerforatedAngleMesh, createPerforatedSheetGeom, createPerforatedSheetMesh, createPlainBushingGeom, createPlainBushingMesh, createPushFitPlugGeom, createPushFitPlugMesh, createRectangularBarGeom, createRectangularBarMesh, createRectangularGasketGeom, createRectangularGasketMesh, createRectangularTubeGeom, createRectangularTubeMesh, createRectangularTubeModel, createRigidCouplerGeom, createRigidCouplerMesh, createSetScrewGeom, createSetScrewMesh, createShaftCollarGeom, createShaftCollarMesh, createSheetMetalGeom, createSheetMetalMesh, createSlottedChannelGeom, createSlottedChannelMesh, createSpacerGeom, createSpacerMesh, createSplitGrommetGeom, createSplitGrommetMesh, createSplitWasherGeom, createSplitWasherMesh, createSpurGearGeom, createSpurGearMesh, createTSlotCoverStripGeom, createTSlotCoverStripMesh, createTSlotExtrusionGeom, createTSlotExtrusionMesh, createTSlotGussetGeom, createTSlotGussetMesh, createTSlotInsideCornerGeom, createTSlotInsideCornerMesh, createThreadedRodGeom, createThreadedRodMesh, createTorsionSpringGeom, createTorsionSpringMesh, createUflGeometries, createWormGearGeom, createWormGearMesh, createZeeBarGeom, createZeeBarMesh, isJstShFootprint, listJscadNamedEdges, listJscadReferenceFeatures, melfResistorSizes, readJscadNamedEdge, readJscadReferenceFeature, resolveFlexScreenSize, smdLedDimensions, tantalumCases, twoPadCrystalPackages };