@tscircuit/props 0.0.316 → 0.0.318

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 CHANGED
@@ -24,6 +24,8 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
24
24
  | `<board />` | [`BoardProps`](#boardprops-board) |
25
25
  | `<breakout />` | [`BreakoutProps`](#breakoutprops-breakout) |
26
26
  | `<breakoutpoint />` | [`BreakoutPointProps`](#breakoutpointprops-breakoutpoint) |
27
+ | `<cadassembly />` | [`CadAssemblyProps`](#cadassemblyprops-cadassembly) |
28
+ | `<cadmodel />` | [`CadModelProps`](#cadmodelprops-cadmodel) |
27
29
  | `<capacitor />` | [`CapacitorProps`](#capacitorprops-capacitor) |
28
30
  | `<chip />` | [`ChipProps`](#chipprops-chip) |
29
31
  | `<connector />` | [`ConnectorProps`](#connectorprops-connector) |
@@ -194,6 +196,39 @@ export interface BreakoutPointProps
194
196
 
195
197
  [Source](https://github.com/tscircuit/props/blob/main/lib/components/breakoutpoint.ts)
196
198
 
199
+ ### CadAssemblyProps `<cadassembly />`
200
+
201
+ ```ts
202
+ export interface CadAssemblyProps {
203
+ /**
204
+ * The layer that the CAD assembly is designed for. If you set this to "top"
205
+ * then it means the children were intended to represent the top layer. If
206
+ * the <chip /> with this assembly is moved to the bottom layer, then the
207
+ * components will be mirrored.
208
+ *
209
+ * Generally, you shouldn't set this except where it can help prevent
210
+ * confusion because you have a complex multi-layer assembly. Default is
211
+ * "top" and this is most intuitive.
212
+ */
213
+ originalLayer?: LayerRef;
214
+ }
215
+ ```
216
+
217
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/cadassembly.ts)
218
+
219
+ ### CadModelProps `<cadmodel />`
220
+
221
+ ```ts
222
+ export interface CadModelProps extends CadModelBase {
223
+ modelUrl: string;
224
+ pcbX?: Distance;
225
+ pcbY?: Distance;
226
+ pcbZ?: Distance;
227
+ }
228
+ ```
229
+
230
+ [Source](https://github.com/tscircuit/props/blob/main/lib/components/cadmodel.ts)
231
+
197
232
  ### CapacitorProps `<capacitor />`
198
233
 
199
234
  ```ts
@@ -1026,6 +1061,7 @@ export interface PlatformConfig {
1026
1061
  cloudAutorouterUrl?: string;
1027
1062
 
1028
1063
  projectName?: string;
1064
+ projectBaseUrl?: string;
1029
1065
  version?: string;
1030
1066
  url?: string;
1031
1067
  printBoardInformationToSilkscreen?: boolean;
package/dist/index.d.ts CHANGED
@@ -43493,6 +43493,136 @@ declare const copperPourProps: z.ZodObject<{
43493
43493
  }>;
43494
43494
  type CopperPourPropsInput = z.input<typeof copperPourProps>;
43495
43495
 
43496
+ interface CadAssemblyProps {
43497
+ /**
43498
+ * The layer that the CAD assembly is designed for. If you set this to "top"
43499
+ * then it means the children were intended to represent the top layer. If
43500
+ * the <chip /> with this assembly is moved to the bottom layer, then the
43501
+ * components will be mirrored.
43502
+ *
43503
+ * Generally, you shouldn't set this except where it can help prevent
43504
+ * confusion because you have a complex multi-layer assembly. Default is
43505
+ * "top" and this is most intuitive.
43506
+ */
43507
+ originalLayer?: LayerRef;
43508
+ }
43509
+ declare const cadassemblyProps: z.ZodObject<{
43510
+ originalLayer: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, z.ZodObject<{
43511
+ name: z.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
43512
+ }, "strip", z.ZodTypeAny, {
43513
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
43514
+ }, {
43515
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
43516
+ }>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
43517
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
43518
+ }>>>;
43519
+ }, "strip", z.ZodTypeAny, {
43520
+ originalLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
43521
+ }, {
43522
+ originalLayer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
43523
+ name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
43524
+ } | undefined;
43525
+ }>;
43526
+ type CadAssemblyPropsInput = z.input<typeof cadassemblyProps>;
43527
+
43528
+ interface CadModelProps extends CadModelBase {
43529
+ modelUrl: string;
43530
+ pcbX?: Distance;
43531
+ pcbY?: Distance;
43532
+ pcbZ?: Distance;
43533
+ }
43534
+ declare const cadmodelProps: z.ZodUnion<[z.ZodNull, z.ZodString, z.ZodObject<{
43535
+ rotationOffset: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
43536
+ x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
43537
+ y: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
43538
+ z: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
43539
+ }, "strip", z.ZodTypeAny, {
43540
+ x: string | number;
43541
+ y: string | number;
43542
+ z: string | number;
43543
+ }, {
43544
+ x: string | number;
43545
+ y: string | number;
43546
+ z: string | number;
43547
+ }>]>>;
43548
+ positionOffset: z.ZodOptional<z.ZodObject<{
43549
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43550
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43551
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43552
+ }, "strip", z.ZodTypeAny, {
43553
+ x: number;
43554
+ y: number;
43555
+ z: number;
43556
+ }, {
43557
+ x: string | number;
43558
+ y: string | number;
43559
+ z: string | number;
43560
+ }>>;
43561
+ size: z.ZodOptional<z.ZodObject<{
43562
+ x: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43563
+ y: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43564
+ z: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>;
43565
+ }, "strip", z.ZodTypeAny, {
43566
+ x: number;
43567
+ y: number;
43568
+ z: number;
43569
+ }, {
43570
+ x: string | number;
43571
+ y: string | number;
43572
+ z: string | number;
43573
+ }>>;
43574
+ modelUnitToMmScale: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
43575
+ } & {
43576
+ modelUrl: z.ZodString;
43577
+ } & {
43578
+ pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
43579
+ pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
43580
+ pcbZ: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
43581
+ }, "strip", z.ZodTypeAny, {
43582
+ modelUrl: string;
43583
+ rotationOffset?: number | {
43584
+ x: string | number;
43585
+ y: string | number;
43586
+ z: string | number;
43587
+ } | undefined;
43588
+ positionOffset?: {
43589
+ x: number;
43590
+ y: number;
43591
+ z: number;
43592
+ } | undefined;
43593
+ size?: {
43594
+ x: number;
43595
+ y: number;
43596
+ z: number;
43597
+ } | undefined;
43598
+ modelUnitToMmScale?: number | undefined;
43599
+ pcbX?: number | undefined;
43600
+ pcbY?: number | undefined;
43601
+ pcbZ?: number | undefined;
43602
+ }, {
43603
+ modelUrl: string;
43604
+ rotationOffset?: number | {
43605
+ x: string | number;
43606
+ y: string | number;
43607
+ z: string | number;
43608
+ } | undefined;
43609
+ positionOffset?: {
43610
+ x: string | number;
43611
+ y: string | number;
43612
+ z: string | number;
43613
+ } | undefined;
43614
+ size?: {
43615
+ x: string | number;
43616
+ y: string | number;
43617
+ z: string | number;
43618
+ } | undefined;
43619
+ modelUnitToMmScale?: string | number | undefined;
43620
+ pcbX?: string | number | undefined;
43621
+ pcbY?: string | number | undefined;
43622
+ pcbZ?: string | number | undefined;
43623
+ }>]>;
43624
+ type CadModelPropsInput = z.input<typeof cadmodelProps>;
43625
+
43496
43626
  declare const powerSourceProps: z.ZodObject<{
43497
43627
  pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
43498
43628
  pcbY: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -46473,6 +46603,7 @@ interface PlatformConfig {
46473
46603
  registryApiUrl?: string;
46474
46604
  cloudAutorouterUrl?: string;
46475
46605
  projectName?: string;
46606
+ projectBaseUrl?: string;
46476
46607
  version?: string;
46477
46608
  url?: string;
46478
46609
  printBoardInformationToSilkscreen?: boolean;
@@ -46483,4 +46614,4 @@ interface PlatformConfig {
46483
46614
  }
46484
46615
  declare const platformConfig: z.ZodType<PlatformConfig>;
46485
46616
 
46486
- export { type AutocompleteString, type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BasicFootprint, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadModelBase, type CadModelGlb, type CadModelGltf, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelStep, type CadModelStl, type CadModelWrl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CopperPourProps, type CopperPourPropsInput, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintLibraryResult, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type KicadAutocompleteStringPath, type KicadPath, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinAttributeMap, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PinoutProps, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinLabel, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type SymbolProp, type SymbolProps, type SymbolPropsInput, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, type VoltageSourcePinLabels, type VoltageSourceProps, type WaveShape, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelGlb, cadModelGltf, cadModelJscad, cadModelObj, cadModelProp, cadModelStep, cadModelStl, cadModelWrl, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, copperPourProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinAttributeMap, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, pinoutProps, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, symbolProp, symbolProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorPinsLabels, transistorProps, viaProps, voltageSourcePinLabels, voltageSourcePins, voltageSourceProps };
46617
+ export { type AutocompleteString, type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BasicFootprint, type BatteryPinLabels, type BatteryProps, type BoardProps, type Border, type BreakoutPointProps, type BreakoutProps, type CadAssemblyProps, type CadAssemblyPropsInput, type CadModelBase, type CadModelGlb, type CadModelGltf, type CadModelJscad, type CadModelObj, type CadModelProp, type CadModelProps, type CadModelPropsInput, type CadModelStep, type CadModelStl, type CadModelWrl, type CapacitorPinLabels, type CapacitorProps, type ChipConnections, type ChipPinLabels, type ChipProps, type ChipPropsSU, type CircleCutoutProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircularHoleWithRectPlatedProps, type CommonComponentProps, type CommonLayoutProps, type ComponentProps, type ConnectionTarget, type Connections, type ConnectorProps, type ConstrainedLayoutProps, type ConstraintProps, type CopperPourProps, type CopperPourPropsInput, type CrystalPinLabels, type CrystalProps, type CutoutProps, type CutoutPropsInput, type DiodePinLabels, type DiodeProps, type Direction, type DirectionAlongEdge, type EditPcbComponentLocationEvent, type EditPcbComponentLocationEventInput, type EditPcbGroupLocationEvent, type EditPcbGroupLocationEventInput, type EditSchematicComponentLocationEvent, type EditSchematicComponentLocationEventInput, type EditSchematicGroupLocationEvent, type EditSchematicGroupLocationEventInput, type EditTraceHintEvent, type EditTraceHintEventInput, type FabricationNotePathProps, type FabricationNoteTextProps, type FootprintLibraryResult, type FootprintProp, type FootprintProps, type FootprintPropsInput, type FootprintSoupElements, type FusePinLabels, type FuseProps, type GroupProps, type HoleProps, type InductorPinLabels, type InductorProps, type InferredChipProps, type InferredConstrainedLayoutProps, type InferredDiodeProps, type InferredFuseProps, type InferredHoleProps, type InferredSmtPadProps, type InferredSolderPasteProps, type InferredSwitchProps, type InferredTestpointProps, type InferredViaProps, type JumperProps, type KicadAutocompleteStringPath, type KicadPath, type LayoutConfig, type LedPinLabels, type LedProps, type ManualEditEvent, type ManualEditEventInput, type ManualEditsFile, type ManualEditsFileInput, type ManualPcbPlacement, type ManualPcbPlacementInput, type ManualSchematicPlacement, type ManualSchematicPlacementInput, type ManualTraceHint, type ManualTraceHintInput, type MosfetPinLabels, type MosfetProps, type NetAliasProps, type NetLabelProps, type NetProps, type NonSubcircuitGroupProps, type OvalPlatedHoleProps, type PartsEngine, type PcbKeepoutProps, type PcbLayoutProps, type PcbRouteCache, type PcbSameXConstraint, type PcbSameYConstraint, type PcbTraceProps, type PcbXDistConstraint, type PcbYDistConstraint, type PillPlatedHoleProps, type PillSmtPadProps, type PillWithRectPadPlatedHoleProps, type PinAttributeMap, type PinCompatibleVariant, type PinHeaderProps, type PinLabelFromPinLabelMap, type PinLabelsProp, type PinSideDefinition, type PinVariant, type PinoutProps, type PlatedHoleProps, type PlatformConfig, type PolygonCutoutProps, type PolygonSmtPadProps, type PortHints, type PortProps, type PotentiometerPinVariant, type PotentiometerProps, type PowerSourceProps, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicBoxProps, type SchematicCellProps, type SchematicLineProps, type SchematicOrientation, type SchematicPathProps, type SchematicPinArrangement, type SchematicPinArrangementWithPinCounts, type SchematicPinArrangementWithSides, type SchematicPinArrangementWithSizes, type SchematicPinLabel, type SchematicPinStyle, type SchematicPortArrangement, type SchematicPortArrangementWithPinCounts, type SchematicPortArrangementWithSides, type SchematicPortArrangementWithSizes, type SchematicRowProps, type SchematicTableProps, type SchematicTextProps, type Selectors, type SilkscreenCircleProps, type SilkscreenLineProps, type SilkscreenPathProps, type SilkscreenRectProps, type SilkscreenTextProps, type SmtPadProps, type SolderJumperProps, type SolderPasteProps, type StampboardProps, type SubcircuitGroupProps, type SubcircuitGroupPropsWithBool, type SubcircuitProps, type SupplierName, type SupplierPartNumbers, type SupplierProps, type SwitchProps, type SymbolProp, type SymbolProps, type SymbolPropsInput, type TestpointProps, type TraceHintProps, type TraceProps, type TransistorPinLabels, type TransistorProps, type ViaProps, type VoltageSourcePinLabels, type VoltageSourceProps, type WaveShape, autorouterConfig, autorouterProp, baseGroupProps, base_manual_edit_event, batteryPins, batteryProps, boardProps, border, breakoutPointProps, breakoutProps, bugProps, cadModelBase, cadModelGlb, cadModelGltf, cadModelJscad, cadModelObj, cadModelProp, cadModelStep, cadModelStl, cadModelWrl, cadassemblyProps, cadmodelProps, capacitorPinLabels, capacitorPins, capacitorProps, chipProps, circleCutoutProps, circleSmtPadProps, circleSolderPasteProps, commonComponentProps, commonLayoutProps, componentProps, connectorProps, constrainedLayoutProps, constraintProps, copperPourProps, crystalPins, crystalProps, cutoutProps, diodePins, diodeProps, direction, directionAlongEdge, distanceOrMultiplier, edit_component_location_event, edit_pcb_component_location_event, edit_pcb_group_location_event, edit_schematic_component_location_event, edit_schematic_group_location_event, edit_trace_hint_event, explicitPinSideDefinition, fabricationNotePathProps, fabricationNoteTextProps, footprintProp, footprintProps, fusePinLabels, fuseProps, groupProps, holeProps, inductorPins, inductorProps, jumperProps, layoutConfig, ledPins, ledProps, lrPins, lrPolarPins, manual_edit_event, manual_edits_file, manual_pcb_placement, manual_schematic_placement, manual_trace_hint, mosfetPins, mosfetProps, netAliasProps, netLabelProps, netProps, ninePointAnchor, partsEngine, pcbKeepoutProps, pcbLayoutProps, pcbSameXConstraintProps, pcbSameYConstraintProps, pcbTraceProps, pcbXDistConstraintProps, pcbYDistConstraintProps, pillSmtPadProps, pinAttributeMap, pinCompatibleVariant, pinHeaderProps, pinLabelsProp, pinoutProps, platedHoleProps, platformConfig, point3, polygonCutoutProps, polygonSmtPadProps, portHints, portProps, portRef, potentiometerProps, powerSourceProps, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicBoxProps, schematicCellProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRowProps, schematicTableProps, schematicTextProps, silkscreenCircleProps, silkscreenLineProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, smtPadProps, solderPasteProps, solderjumperProps, stampboardProps, subcircuitGroupProps, subcircuitGroupPropsWithBool, subcircuitProps, supplierProps, switchProps, symbolProp, symbolProps, testpointProps, traceHintProps, traceProps, transistorPins, transistorPinsLabels, transistorProps, viaProps, voltageSourcePinLabels, voltageSourcePins, voltageSourceProps };
package/dist/index.js CHANGED
@@ -1503,6 +1503,28 @@ var copperPourProps = z70.object({
1503
1503
  });
1504
1504
  expectTypesMatch(true);
1505
1505
 
1506
+ // lib/components/cadassembly.ts
1507
+ import { layer_ref as layer_ref7 } from "circuit-json";
1508
+ import { z as z71 } from "zod";
1509
+ var cadassemblyProps = z71.object({
1510
+ originalLayer: layer_ref7.default("top").optional()
1511
+ });
1512
+ expectTypesMatch(true);
1513
+
1514
+ // lib/components/cadmodel.ts
1515
+ import { z as z72 } from "zod";
1516
+ var pcbPosition = z72.object({
1517
+ pcbX: distance.optional(),
1518
+ pcbY: distance.optional(),
1519
+ pcbZ: distance.optional()
1520
+ });
1521
+ var cadModelBaseWithUrl = cadModelBase.extend({
1522
+ modelUrl: z72.string()
1523
+ });
1524
+ var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
1525
+ expectTypesMatch(true);
1526
+ var cadmodelProps = z72.union([z72.null(), z72.string(), cadModelObject]);
1527
+
1506
1528
  // lib/components/power-source.ts
1507
1529
  import { voltage as voltage3 } from "circuit-json";
1508
1530
  var powerSourceProps = commonComponentProps.extend({
@@ -1511,9 +1533,9 @@ var powerSourceProps = commonComponentProps.extend({
1511
1533
 
1512
1534
  // lib/components/voltagesource.ts
1513
1535
  import { frequency as frequency3, rotation as rotation4, voltage as voltage4 } from "circuit-json";
1514
- import { z as z71 } from "zod";
1536
+ import { z as z73 } from "zod";
1515
1537
  var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
1516
- var percentage = z71.union([z71.string(), z71.number()]).transform((val) => {
1538
+ var percentage = z73.union([z73.string(), z73.number()]).transform((val) => {
1517
1539
  if (typeof val === "string") {
1518
1540
  if (val.endsWith("%")) {
1519
1541
  return parseFloat(val.slice(0, -1)) / 100;
@@ -1522,13 +1544,13 @@ var percentage = z71.union([z71.string(), z71.number()]).transform((val) => {
1522
1544
  }
1523
1545
  return val;
1524
1546
  }).pipe(
1525
- z71.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
1547
+ z73.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
1526
1548
  );
1527
1549
  var voltageSourceProps = commonComponentProps.extend({
1528
1550
  voltage: voltage4.optional(),
1529
1551
  frequency: frequency3.optional(),
1530
1552
  peakToPeakVoltage: voltage4.optional(),
1531
- waveShape: z71.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
1553
+ waveShape: z73.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
1532
1554
  phase: rotation4.optional(),
1533
1555
  dutyCycle: percentage.optional(),
1534
1556
  connections: createConnectionsProp(voltageSourcePinLabels).optional()
@@ -1538,11 +1560,11 @@ expectTypesMatch(true);
1538
1560
 
1539
1561
  // lib/components/schematic-box.ts
1540
1562
  import { distance as distance19 } from "circuit-json";
1541
- import { z as z73 } from "zod";
1563
+ import { z as z75 } from "zod";
1542
1564
 
1543
1565
  // lib/common/ninePointAnchor.ts
1544
- import { z as z72 } from "zod";
1545
- var ninePointAnchor = z72.enum([
1566
+ import { z as z74 } from "zod";
1567
+ var ninePointAnchor = z74.enum([
1546
1568
  "top_left",
1547
1569
  "top_center",
1548
1570
  "top_right",
@@ -1555,23 +1577,23 @@ var ninePointAnchor = z72.enum([
1555
1577
  ]);
1556
1578
 
1557
1579
  // lib/components/schematic-box.ts
1558
- var schematicBoxProps = z73.object({
1580
+ var schematicBoxProps = z75.object({
1559
1581
  schX: distance19.optional(),
1560
1582
  schY: distance19.optional(),
1561
1583
  width: distance19.optional(),
1562
1584
  height: distance19.optional(),
1563
- overlay: z73.array(z73.string()).optional(),
1585
+ overlay: z75.array(z75.string()).optional(),
1564
1586
  padding: distance19.optional(),
1565
1587
  paddingLeft: distance19.optional(),
1566
1588
  paddingRight: distance19.optional(),
1567
1589
  paddingTop: distance19.optional(),
1568
1590
  paddingBottom: distance19.optional(),
1569
- title: z73.string().optional(),
1591
+ title: z75.string().optional(),
1570
1592
  titleAlignment: ninePointAnchor.default("top_left"),
1571
- titleColor: z73.string().optional(),
1593
+ titleColor: z75.string().optional(),
1572
1594
  titleFontSize: distance19.optional(),
1573
- titleInside: z73.boolean().default(false),
1574
- strokeStyle: z73.enum(["solid", "dashed"]).default("solid")
1595
+ titleInside: z75.boolean().default(false),
1596
+ strokeStyle: z75.enum(["solid", "dashed"]).default("solid")
1575
1597
  }).refine(
1576
1598
  (elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
1577
1599
  {
@@ -1586,8 +1608,8 @@ var schematicBoxProps = z73.object({
1586
1608
 
1587
1609
  // lib/components/schematic-line.ts
1588
1610
  import { distance as distance20 } from "circuit-json";
1589
- import { z as z74 } from "zod";
1590
- var schematicLineProps = z74.object({
1611
+ import { z as z76 } from "zod";
1612
+ var schematicLineProps = z76.object({
1591
1613
  x1: distance20,
1592
1614
  y1: distance20,
1593
1615
  x2: distance20,
@@ -1596,11 +1618,11 @@ var schematicLineProps = z74.object({
1596
1618
 
1597
1619
  // lib/components/schematic-text.ts
1598
1620
  import { distance as distance21, rotation as rotation5 } from "circuit-json";
1599
- import { z as z76 } from "zod";
1621
+ import { z as z78 } from "zod";
1600
1622
 
1601
1623
  // lib/common/fivePointAnchor.ts
1602
- import { z as z75 } from "zod";
1603
- var fivePointAnchor = z75.enum([
1624
+ import { z as z77 } from "zod";
1625
+ var fivePointAnchor = z77.enum([
1604
1626
  "center",
1605
1627
  "left",
1606
1628
  "right",
@@ -1609,32 +1631,32 @@ var fivePointAnchor = z75.enum([
1609
1631
  ]);
1610
1632
 
1611
1633
  // lib/components/schematic-text.ts
1612
- var schematicTextProps = z76.object({
1634
+ var schematicTextProps = z78.object({
1613
1635
  schX: distance21.optional(),
1614
1636
  schY: distance21.optional(),
1615
- text: z76.string(),
1616
- fontSize: z76.number().default(1),
1617
- anchor: z76.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
1618
- color: z76.string().default("#000000"),
1637
+ text: z78.string(),
1638
+ fontSize: z78.number().default(1),
1639
+ anchor: z78.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
1640
+ color: z78.string().default("#000000"),
1619
1641
  schRotation: rotation5.default(0)
1620
1642
  });
1621
1643
 
1622
1644
  // lib/components/schematic-path.ts
1623
1645
  import { point as point5 } from "circuit-json";
1624
- import { z as z77 } from "zod";
1625
- var schematicPathProps = z77.object({
1626
- points: z77.array(point5),
1627
- isFilled: z77.boolean().optional().default(false),
1628
- fillColor: z77.enum(["red", "blue"]).optional()
1646
+ import { z as z79 } from "zod";
1647
+ var schematicPathProps = z79.object({
1648
+ points: z79.array(point5),
1649
+ isFilled: z79.boolean().optional().default(false),
1650
+ fillColor: z79.enum(["red", "blue"]).optional()
1629
1651
  });
1630
1652
 
1631
1653
  // lib/components/schematic-table.ts
1632
1654
  import { distance as distance22 } from "circuit-json";
1633
- import { z as z78 } from "zod";
1634
- var schematicTableProps = z78.object({
1655
+ import { z as z80 } from "zod";
1656
+ var schematicTableProps = z80.object({
1635
1657
  schX: distance22.optional(),
1636
1658
  schY: distance22.optional(),
1637
- children: z78.any().optional(),
1659
+ children: z80.any().optional(),
1638
1660
  cellPadding: distance22.optional(),
1639
1661
  borderWidth: distance22.optional(),
1640
1662
  anchor: ninePointAnchor.optional(),
@@ -1644,53 +1666,53 @@ expectTypesMatch(true);
1644
1666
 
1645
1667
  // lib/components/schematic-row.ts
1646
1668
  import { distance as distance23 } from "circuit-json";
1647
- import { z as z79 } from "zod";
1648
- var schematicRowProps = z79.object({
1649
- children: z79.any().optional(),
1669
+ import { z as z81 } from "zod";
1670
+ var schematicRowProps = z81.object({
1671
+ children: z81.any().optional(),
1650
1672
  height: distance23.optional()
1651
1673
  });
1652
1674
  expectTypesMatch(true);
1653
1675
 
1654
1676
  // lib/components/schematic-cell.ts
1655
1677
  import { distance as distance24 } from "circuit-json";
1656
- import { z as z80 } from "zod";
1657
- var schematicCellProps = z80.object({
1658
- children: z80.string().optional(),
1659
- horizontalAlign: z80.enum(["left", "center", "right"]).optional(),
1660
- verticalAlign: z80.enum(["top", "middle", "bottom"]).optional(),
1678
+ import { z as z82 } from "zod";
1679
+ var schematicCellProps = z82.object({
1680
+ children: z82.string().optional(),
1681
+ horizontalAlign: z82.enum(["left", "center", "right"]).optional(),
1682
+ verticalAlign: z82.enum(["top", "middle", "bottom"]).optional(),
1661
1683
  fontSize: distance24.optional(),
1662
- rowSpan: z80.number().optional(),
1663
- colSpan: z80.number().optional(),
1684
+ rowSpan: z82.number().optional(),
1685
+ colSpan: z82.number().optional(),
1664
1686
  width: distance24.optional(),
1665
- text: z80.string().optional()
1687
+ text: z82.string().optional()
1666
1688
  });
1667
1689
  expectTypesMatch(true);
1668
1690
 
1669
1691
  // lib/components/silkscreen-text.ts
1670
- import { layer_ref as layer_ref7, length as length5 } from "circuit-json";
1671
- import { z as z81 } from "zod";
1692
+ import { layer_ref as layer_ref8, length as length5 } from "circuit-json";
1693
+ import { z as z83 } from "zod";
1672
1694
  var silkscreenTextProps = pcbLayoutProps.extend({
1673
- text: z81.string(),
1695
+ text: z83.string(),
1674
1696
  anchorAlignment: ninePointAnchor.default("center"),
1675
- font: z81.enum(["tscircuit2024"]).optional(),
1697
+ font: z83.enum(["tscircuit2024"]).optional(),
1676
1698
  fontSize: length5.optional(),
1677
1699
  /**
1678
1700
  * If true, text will knock out underlying silkscreen
1679
1701
  */
1680
- isKnockout: z81.boolean().optional(),
1702
+ isKnockout: z83.boolean().optional(),
1681
1703
  knockoutPadding: length5.optional(),
1682
1704
  knockoutPaddingLeft: length5.optional(),
1683
1705
  knockoutPaddingRight: length5.optional(),
1684
1706
  knockoutPaddingTop: length5.optional(),
1685
1707
  knockoutPaddingBottom: length5.optional(),
1686
- layers: z81.array(layer_ref7).optional()
1708
+ layers: z83.array(layer_ref8).optional()
1687
1709
  });
1688
1710
 
1689
1711
  // lib/components/silkscreen-path.ts
1690
1712
  import { length as length6, route_hint_point as route_hint_point5 } from "circuit-json";
1691
- import { z as z82 } from "zod";
1713
+ import { z as z84 } from "zod";
1692
1714
  var silkscreenPathProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotation: true }).extend({
1693
- route: z82.array(route_hint_point5),
1715
+ route: z84.array(route_hint_point5),
1694
1716
  strokeWidth: length6.optional()
1695
1717
  });
1696
1718
 
@@ -1706,10 +1728,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({ pcbX: true, pcbY: true, pcbRotat
1706
1728
 
1707
1729
  // lib/components/silkscreen-rect.ts
1708
1730
  import { distance as distance26 } from "circuit-json";
1709
- import { z as z83 } from "zod";
1731
+ import { z as z85 } from "zod";
1710
1732
  var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1711
- filled: z83.boolean().default(true).optional(),
1712
- stroke: z83.enum(["dashed", "solid", "none"]).optional(),
1733
+ filled: z85.boolean().default(true).optional(),
1734
+ stroke: z85.enum(["dashed", "solid", "none"]).optional(),
1713
1735
  strokeWidth: distance26.optional(),
1714
1736
  width: distance26,
1715
1737
  height: distance26
@@ -1717,70 +1739,71 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1717
1739
 
1718
1740
  // lib/components/silkscreen-circle.ts
1719
1741
  import { distance as distance27 } from "circuit-json";
1720
- import { z as z84 } from "zod";
1742
+ import { z as z86 } from "zod";
1721
1743
  var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
1722
- isFilled: z84.boolean().optional(),
1723
- isOutline: z84.boolean().optional(),
1744
+ isFilled: z86.boolean().optional(),
1745
+ isOutline: z86.boolean().optional(),
1724
1746
  strokeWidth: distance27.optional(),
1725
1747
  radius: distance27
1726
1748
  });
1727
1749
 
1728
1750
  // lib/components/trace-hint.ts
1729
- import { distance as distance28, layer_ref as layer_ref8, route_hint_point as route_hint_point6 } from "circuit-json";
1730
- import { z as z85 } from "zod";
1731
- var routeHintPointProps = z85.object({
1751
+ import { distance as distance28, layer_ref as layer_ref9, route_hint_point as route_hint_point6 } from "circuit-json";
1752
+ import { z as z87 } from "zod";
1753
+ var routeHintPointProps = z87.object({
1732
1754
  x: distance28,
1733
1755
  y: distance28,
1734
- via: z85.boolean().optional(),
1735
- toLayer: layer_ref8.optional()
1756
+ via: z87.boolean().optional(),
1757
+ toLayer: layer_ref9.optional()
1736
1758
  });
1737
- var traceHintProps = z85.object({
1738
- for: z85.string().optional().describe(
1759
+ var traceHintProps = z87.object({
1760
+ for: z87.string().optional().describe(
1739
1761
  "Selector for the port you're targeting, not required if you're inside a trace"
1740
1762
  ),
1741
- order: z85.number().optional(),
1763
+ order: z87.number().optional(),
1742
1764
  offset: route_hint_point6.or(routeHintPointProps).optional(),
1743
- offsets: z85.array(route_hint_point6).or(z85.array(routeHintPointProps)).optional(),
1744
- traceWidth: z85.number().optional()
1765
+ offsets: z87.array(route_hint_point6).or(z87.array(routeHintPointProps)).optional(),
1766
+ traceWidth: z87.number().optional()
1745
1767
  });
1746
1768
 
1747
1769
  // lib/components/port.ts
1748
- import { z as z86 } from "zod";
1770
+ import { z as z88 } from "zod";
1749
1771
  var portProps = commonLayoutProps.extend({
1750
- name: z86.string(),
1751
- pinNumber: z86.number().optional(),
1752
- aliases: z86.array(z86.string()).optional(),
1772
+ name: z88.string(),
1773
+ pinNumber: z88.number().optional(),
1774
+ aliases: z88.array(z88.string()).optional(),
1753
1775
  direction
1754
1776
  });
1755
1777
 
1756
1778
  // lib/platformConfig.ts
1757
- import { z as z87 } from "zod";
1758
- var unvalidatedCircuitJson = z87.array(z87.any()).describe("Circuit JSON");
1759
- var footprintLibraryResult = z87.object({
1760
- footprintCircuitJson: z87.array(z87.any()),
1779
+ import { z as z89 } from "zod";
1780
+ var unvalidatedCircuitJson = z89.array(z89.any()).describe("Circuit JSON");
1781
+ var footprintLibraryResult = z89.object({
1782
+ footprintCircuitJson: z89.array(z89.any()),
1761
1783
  cadModel: cadModelProp.optional()
1762
1784
  });
1763
- var pathToCircuitJsonFn = z87.function().args(z87.string()).returns(z87.promise(footprintLibraryResult)).describe("A function that takes a path and returns Circuit JSON");
1764
- var platformConfig = z87.object({
1785
+ var pathToCircuitJsonFn = z89.function().args(z89.string()).returns(z89.promise(footprintLibraryResult)).describe("A function that takes a path and returns Circuit JSON");
1786
+ var platformConfig = z89.object({
1765
1787
  partsEngine: partsEngine.optional(),
1766
1788
  autorouter: autorouterProp.optional(),
1767
- registryApiUrl: z87.string().optional(),
1768
- cloudAutorouterUrl: z87.string().optional(),
1769
- projectName: z87.string().optional(),
1770
- version: z87.string().optional(),
1771
- url: z87.string().optional(),
1772
- printBoardInformationToSilkscreen: z87.boolean().optional(),
1773
- localCacheEngine: z87.any().optional(),
1774
- pcbDisabled: z87.boolean().optional(),
1775
- schematicDisabled: z87.boolean().optional(),
1776
- partsEngineDisabled: z87.boolean().optional(),
1777
- footprintLibraryMap: z87.record(
1778
- z87.string(),
1779
- z87.union([
1789
+ registryApiUrl: z89.string().optional(),
1790
+ cloudAutorouterUrl: z89.string().optional(),
1791
+ projectName: z89.string().optional(),
1792
+ projectBaseUrl: z89.string().optional(),
1793
+ version: z89.string().optional(),
1794
+ url: z89.string().optional(),
1795
+ printBoardInformationToSilkscreen: z89.boolean().optional(),
1796
+ localCacheEngine: z89.any().optional(),
1797
+ pcbDisabled: z89.boolean().optional(),
1798
+ schematicDisabled: z89.boolean().optional(),
1799
+ partsEngineDisabled: z89.boolean().optional(),
1800
+ footprintLibraryMap: z89.record(
1801
+ z89.string(),
1802
+ z89.union([
1780
1803
  pathToCircuitJsonFn,
1781
- z87.record(
1782
- z87.string(),
1783
- z87.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
1804
+ z89.record(
1805
+ z89.string(),
1806
+ z89.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
1784
1807
  )
1785
1808
  ])
1786
1809
  ).optional()
@@ -1807,6 +1830,8 @@ export {
1807
1830
  cadModelStep,
1808
1831
  cadModelStl,
1809
1832
  cadModelWrl,
1833
+ cadassemblyProps,
1834
+ cadmodelProps,
1810
1835
  capacitorPinLabels,
1811
1836
  capacitorPins,
1812
1837
  capacitorProps,