@tscircuit/props 0.0.340 → 0.0.342
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 +15 -0
- package/dist/index.d.ts +61 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/lib/components/board.ts +36 -0
- package/lib/platformConfig.ts +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,6 +169,18 @@ export interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
|
169
169
|
borderRadius?: Distance;
|
|
170
170
|
boardAnchorPosition?: Point;
|
|
171
171
|
boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
|
|
172
|
+
/** Color applied to both top and bottom solder masks */
|
|
173
|
+
solderMaskColor?: BoardColor;
|
|
174
|
+
/** Color of the top solder mask */
|
|
175
|
+
topSolderMaskColor?: BoardColor;
|
|
176
|
+
/** Color of the bottom solder mask */
|
|
177
|
+
bottomSolderMaskColor?: BoardColor;
|
|
178
|
+
/** Color applied to both top and bottom silkscreens */
|
|
179
|
+
silkscreenColor?: BoardColor;
|
|
180
|
+
/** Color of the top silkscreen */
|
|
181
|
+
topSilkscreenColor?: BoardColor;
|
|
182
|
+
/** Color of the bottom silkscreen */
|
|
183
|
+
bottomSilkscreenColor?: BoardColor;
|
|
172
184
|
}
|
|
173
185
|
```
|
|
174
186
|
|
|
@@ -662,6 +674,7 @@ export interface MosfetProps<PinLabel extends string = string>
|
|
|
662
674
|
export interface NetProps {
|
|
663
675
|
name: string;
|
|
664
676
|
connectsTo?: string | string[];
|
|
677
|
+
highlightColor?: string;
|
|
665
678
|
}
|
|
666
679
|
```
|
|
667
680
|
|
|
@@ -1105,6 +1118,8 @@ export interface PlatformConfig {
|
|
|
1105
1118
|
schematicDisabled?: boolean;
|
|
1106
1119
|
partsEngineDisabled?: boolean;
|
|
1107
1120
|
|
|
1121
|
+
spiceEngine?: SpiceEngine;
|
|
1122
|
+
|
|
1108
1123
|
footprintLibraryMap?: Record<
|
|
1109
1124
|
string,
|
|
1110
1125
|
| ((path: string) => Promise<FootprintLibraryResult>)
|
package/dist/index.d.ts
CHANGED
|
@@ -10938,6 +10938,9 @@ declare const groupProps: z.ZodDiscriminatedUnion<"subcircuit", [z.ZodObject<{
|
|
|
10938
10938
|
|
|
10939
10939
|
declare const ninePointAnchor: z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>;
|
|
10940
10940
|
|
|
10941
|
+
declare const boardColorPresets: readonly ["not_specified", "green", "red", "blue", "purple", "black", "white", "yellow"];
|
|
10942
|
+
type BoardColorPreset = (typeof boardColorPresets)[number];
|
|
10943
|
+
type BoardColor = AutocompleteString<BoardColorPreset>;
|
|
10941
10944
|
interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
10942
10945
|
material?: "fr4" | "fr1";
|
|
10943
10946
|
/** Number of layers for the PCB */
|
|
@@ -10945,6 +10948,18 @@ interface BoardProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
|
10945
10948
|
borderRadius?: Distance;
|
|
10946
10949
|
boardAnchorPosition?: Point;
|
|
10947
10950
|
boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
|
|
10951
|
+
/** Color applied to both top and bottom solder masks */
|
|
10952
|
+
solderMaskColor?: BoardColor;
|
|
10953
|
+
/** Color of the top solder mask */
|
|
10954
|
+
topSolderMaskColor?: BoardColor;
|
|
10955
|
+
/** Color of the bottom solder mask */
|
|
10956
|
+
bottomSolderMaskColor?: BoardColor;
|
|
10957
|
+
/** Color applied to both top and bottom silkscreens */
|
|
10958
|
+
silkscreenColor?: BoardColor;
|
|
10959
|
+
/** Color of the top silkscreen */
|
|
10960
|
+
topSilkscreenColor?: BoardColor;
|
|
10961
|
+
/** Color of the bottom silkscreen */
|
|
10962
|
+
bottomSilkscreenColor?: BoardColor;
|
|
10948
10963
|
}
|
|
10949
10964
|
declare const boardProps: z.ZodObject<{
|
|
10950
10965
|
pcbX: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
|
|
@@ -11664,6 +11679,12 @@ declare const boardProps: z.ZodObject<{
|
|
|
11664
11679
|
y: string | number;
|
|
11665
11680
|
}>>;
|
|
11666
11681
|
boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
11682
|
+
solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11683
|
+
topSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11684
|
+
bottomSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11685
|
+
silkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11686
|
+
topSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11687
|
+
bottomSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
11667
11688
|
}, "strip", z.ZodTypeAny, {
|
|
11668
11689
|
material: "fr4" | "fr1";
|
|
11669
11690
|
layers: 2 | 4;
|
|
@@ -11960,6 +11981,12 @@ declare const boardProps: z.ZodObject<{
|
|
|
11960
11981
|
y: number;
|
|
11961
11982
|
} | undefined;
|
|
11962
11983
|
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
11984
|
+
solderMaskColor?: BoardColor | undefined;
|
|
11985
|
+
topSolderMaskColor?: BoardColor | undefined;
|
|
11986
|
+
bottomSolderMaskColor?: BoardColor | undefined;
|
|
11987
|
+
silkscreenColor?: BoardColor | undefined;
|
|
11988
|
+
topSilkscreenColor?: BoardColor | undefined;
|
|
11989
|
+
bottomSilkscreenColor?: BoardColor | undefined;
|
|
11963
11990
|
}, {
|
|
11964
11991
|
symbol?: SymbolProp | undefined;
|
|
11965
11992
|
key?: any;
|
|
@@ -12260,6 +12287,12 @@ declare const boardProps: z.ZodObject<{
|
|
|
12260
12287
|
y: string | number;
|
|
12261
12288
|
} | undefined;
|
|
12262
12289
|
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
12290
|
+
solderMaskColor?: BoardColor | undefined;
|
|
12291
|
+
topSolderMaskColor?: BoardColor | undefined;
|
|
12292
|
+
bottomSolderMaskColor?: BoardColor | undefined;
|
|
12293
|
+
silkscreenColor?: BoardColor | undefined;
|
|
12294
|
+
topSilkscreenColor?: BoardColor | undefined;
|
|
12295
|
+
bottomSilkscreenColor?: BoardColor | undefined;
|
|
12263
12296
|
}>;
|
|
12264
12297
|
|
|
12265
12298
|
interface BreakoutProps extends Omit<SubcircuitGroupProps, "subcircuit"> {
|
|
@@ -28237,6 +28270,12 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
28237
28270
|
y: string | number;
|
|
28238
28271
|
}>>;
|
|
28239
28272
|
boardAnchorAlignment: z.ZodOptional<z.ZodEnum<["top_left", "top_center", "top_right", "center_left", "center", "center_right", "bottom_left", "bottom_center", "bottom_right"]>>;
|
|
28273
|
+
solderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28274
|
+
topSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28275
|
+
bottomSolderMaskColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28276
|
+
silkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28277
|
+
topSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28278
|
+
bottomSilkscreenColor: z.ZodOptional<z.ZodType<BoardColor, z.ZodTypeDef, BoardColor>>;
|
|
28240
28279
|
} & {
|
|
28241
28280
|
leftPinCount: z.ZodOptional<z.ZodNumber>;
|
|
28242
28281
|
rightPinCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -28548,6 +28587,12 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
28548
28587
|
y: number;
|
|
28549
28588
|
} | undefined;
|
|
28550
28589
|
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
28590
|
+
solderMaskColor?: BoardColor | undefined;
|
|
28591
|
+
topSolderMaskColor?: BoardColor | undefined;
|
|
28592
|
+
bottomSolderMaskColor?: BoardColor | undefined;
|
|
28593
|
+
silkscreenColor?: BoardColor | undefined;
|
|
28594
|
+
topSilkscreenColor?: BoardColor | undefined;
|
|
28595
|
+
bottomSilkscreenColor?: BoardColor | undefined;
|
|
28551
28596
|
leftPins?: string[] | undefined;
|
|
28552
28597
|
rightPins?: string[] | undefined;
|
|
28553
28598
|
topPins?: string[] | undefined;
|
|
@@ -28858,6 +28903,12 @@ declare const stampboardProps: z.ZodObject<{
|
|
|
28858
28903
|
y: string | number;
|
|
28859
28904
|
} | undefined;
|
|
28860
28905
|
boardAnchorAlignment?: "top_left" | "top_center" | "top_right" | "center_left" | "center" | "center_right" | "bottom_left" | "bottom_center" | "bottom_right" | undefined;
|
|
28906
|
+
solderMaskColor?: BoardColor | undefined;
|
|
28907
|
+
topSolderMaskColor?: BoardColor | undefined;
|
|
28908
|
+
bottomSolderMaskColor?: BoardColor | undefined;
|
|
28909
|
+
silkscreenColor?: BoardColor | undefined;
|
|
28910
|
+
topSilkscreenColor?: BoardColor | undefined;
|
|
28911
|
+
bottomSilkscreenColor?: BoardColor | undefined;
|
|
28861
28912
|
leftPins?: string[] | undefined;
|
|
28862
28913
|
rightPins?: string[] | undefined;
|
|
28863
28914
|
topPins?: string[] | undefined;
|
|
@@ -49265,6 +49316,14 @@ interface FootprintLibraryResult {
|
|
|
49265
49316
|
interface FootprintFileParserEntry {
|
|
49266
49317
|
loadFromUrl: (url: string) => Promise<FootprintLibraryResult>;
|
|
49267
49318
|
}
|
|
49319
|
+
type CircuitJson = any[];
|
|
49320
|
+
interface SpiceEngineSimulationResult {
|
|
49321
|
+
engineVersionString?: string;
|
|
49322
|
+
simulationResultCircuitJson: CircuitJson;
|
|
49323
|
+
}
|
|
49324
|
+
interface SpiceEngine {
|
|
49325
|
+
simulate: (spiceString: string) => Promise<SpiceEngineSimulationResult>;
|
|
49326
|
+
}
|
|
49268
49327
|
interface PlatformConfig {
|
|
49269
49328
|
partsEngine?: PartsEngine;
|
|
49270
49329
|
autorouter?: AutorouterProp;
|
|
@@ -49279,6 +49338,7 @@ interface PlatformConfig {
|
|
|
49279
49338
|
pcbDisabled?: boolean;
|
|
49280
49339
|
schematicDisabled?: boolean;
|
|
49281
49340
|
partsEngineDisabled?: boolean;
|
|
49341
|
+
spiceEngine?: SpiceEngine;
|
|
49282
49342
|
footprintLibraryMap?: Record<string, ((path: string) => Promise<FootprintLibraryResult>) | Record<string, any[] | ((path: string) => Promise<FootprintLibraryResult>)>>;
|
|
49283
49343
|
footprintFileParserMap?: Record<string, FootprintFileParserEntry>;
|
|
49284
49344
|
}
|
|
@@ -49288,4 +49348,4 @@ interface ProjectConfig extends Pick<PlatformConfig, "projectName" | "projectBas
|
|
|
49288
49348
|
}
|
|
49289
49349
|
declare const projectConfig: z.ZodType<ProjectConfig>;
|
|
49290
49350
|
|
|
49291
|
-
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 CircleHoleProps, 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 FootprintFileParserEntry, 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 PillHoleProps, 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 ProjectConfig, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicArcProps, type SchematicBoxProps, type SchematicCellProps, type SchematicCircleProps, 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 SchematicRectProps, 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, projectConfig, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicArcProps, schematicBoxProps, schematicCellProps, schematicCircleProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRectProps, 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 };
|
|
49351
|
+
export { type AutocompleteString, type AutorouterConfig, type AutorouterProp, type BaseGroupProps, type BaseManualEditEvent, type BaseManualEditEventInput, type BasicFootprint, type BatteryPinLabels, type BatteryProps, type BoardColor, type BoardColorPreset, 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 CircleHoleProps, type CirclePlatedHoleProps, type CircleSmtPadProps, type CircleSolderPasteProps, type CircuitJson, 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 FootprintFileParserEntry, 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 PillHoleProps, 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 ProjectConfig, type PushButtonProps, type RectCutoutProps, type RectSmtPadProps, type RectSolderPasteProps, type ResistorPinLabels, type ResistorProps, type ResonatorPinVariant, type ResonatorProps, type RotatedRectSmtPadProps, type SchematicArcProps, type SchematicBoxProps, type SchematicCellProps, type SchematicCircleProps, 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 SchematicRectProps, 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 SpiceEngine, type SpiceEngineSimulationResult, 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, projectConfig, pushButtonProps, rectCutoutProps, rectSmtPadProps, rectSolderPasteProps, resistorPinLabels, resistorPins, resistorProps, resonatorProps, rotatedRectSmtPadProps, rotationPoint3, routeHintPointProps, schematicArcProps, schematicBoxProps, schematicCellProps, schematicCircleProps, schematicLineProps, schematicOrientation, schematicPathProps, schematicPinArrangement, schematicPinLabel, schematicPinStyle, schematicPortArrangement, schematicRectProps, 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
|
@@ -627,12 +627,19 @@ expectTypesMatch(true);
|
|
|
627
627
|
expectTypesMatch(true);
|
|
628
628
|
|
|
629
629
|
// lib/components/board.ts
|
|
630
|
+
var boardColor = z28.custom((value) => typeof value === "string");
|
|
630
631
|
var boardProps = subcircuitGroupProps.extend({
|
|
631
632
|
material: z28.enum(["fr4", "fr1"]).default("fr4"),
|
|
632
633
|
layers: z28.union([z28.literal(2), z28.literal(4)]).default(2),
|
|
633
634
|
borderRadius: distance.optional(),
|
|
634
635
|
boardAnchorPosition: point.optional(),
|
|
635
|
-
boardAnchorAlignment: ninePointAnchor.optional()
|
|
636
|
+
boardAnchorAlignment: ninePointAnchor.optional(),
|
|
637
|
+
solderMaskColor: boardColor.optional(),
|
|
638
|
+
topSolderMaskColor: boardColor.optional(),
|
|
639
|
+
bottomSolderMaskColor: boardColor.optional(),
|
|
640
|
+
silkscreenColor: boardColor.optional(),
|
|
641
|
+
topSilkscreenColor: boardColor.optional(),
|
|
642
|
+
bottomSilkscreenColor: boardColor.optional()
|
|
636
643
|
});
|
|
637
644
|
expectTypesMatch(true);
|
|
638
645
|
|
|
@@ -1874,6 +1881,15 @@ var footprintFileParserEntry = z92.object({
|
|
|
1874
1881
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
1875
1882
|
)
|
|
1876
1883
|
});
|
|
1884
|
+
var spiceEngineSimulationResult = z92.object({
|
|
1885
|
+
engineVersionString: z92.string().optional(),
|
|
1886
|
+
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
1887
|
+
});
|
|
1888
|
+
var spiceEngineZod = z92.object({
|
|
1889
|
+
simulate: z92.function().args(z92.string()).returns(z92.promise(spiceEngineSimulationResult)).describe(
|
|
1890
|
+
"A function that takes a SPICE string and returns a simulation result"
|
|
1891
|
+
)
|
|
1892
|
+
});
|
|
1877
1893
|
var platformConfig = z92.object({
|
|
1878
1894
|
partsEngine: partsEngine.optional(),
|
|
1879
1895
|
autorouter: autorouterProp.optional(),
|
|
@@ -1888,6 +1904,7 @@ var platformConfig = z92.object({
|
|
|
1888
1904
|
pcbDisabled: z92.boolean().optional(),
|
|
1889
1905
|
schematicDisabled: z92.boolean().optional(),
|
|
1890
1906
|
partsEngineDisabled: z92.boolean().optional(),
|
|
1907
|
+
spiceEngine: spiceEngineZod.optional(),
|
|
1891
1908
|
footprintLibraryMap: z92.record(
|
|
1892
1909
|
z92.string(),
|
|
1893
1910
|
z92.union([
|