@tscircuit/core 0.0.1963 → 0.0.1965
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 +417 -13
- package/dist/index.js +134 -25
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as circuit_json from 'circuit-json';
|
|
2
|
-
import { PcbGroup, PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, PcbVia as PcbVia$1, LayerRef, AnyCircuitElement, Size, PcbTrace as PcbTrace$1, PcbTraceRoutePoint, AnySourceComponent, PcbComponent, SchematicPort, SchematicComponent, SimulationVoltageSource, SimulationCurrentSource, PcbSilkscreenGraphic, SourceBus, RouteHintPoint, PcbBoard, SchematicSheet as SchematicSheet$1, SchematicGraphic as SchematicGraphic$1, SimulationExperiment, SimulationParameterSweep, CircuitJson } from 'circuit-json';
|
|
2
|
+
import { PcbGroup, PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, PcbVia as PcbVia$1, LayerRef, AnyCircuitElement, Size, PcbTrace as PcbTrace$1, PcbTraceRoutePoint, AnySourceComponent, PcbComponent, SchematicPort, SchematicComponent, SimulationVoltageSource, SimulationCurrentSource, PcbSilkscreenGraphic, SourceBus, RouteHintPoint, PcbBoard, SchematicSheet as SchematicSheet$1, SchematicGraphic as SchematicGraphic$1, SimulationExperiment, SimulationParameterSweep, PcbBend as PcbBend$1, PcbStiffener as PcbStiffener$1, CircuitJson } from 'circuit-json';
|
|
3
3
|
import * as _tscircuit_props from '@tscircuit/props';
|
|
4
|
-
import { PlatformConfig, traceProps, netProps, AutoroutingPhaseProps, AutorouterProp, subcircuitGroupProps, AutorouterConfig, PcbSx, portProps, PinAttributeMap, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, platedHoleProps, BoardOutlinePoint, boardProps, subcircuitProps, subpanelProps, capacitorProps, antennaProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, ammeterProps, resistorProps, constraintProps, drcCheckProps, autoroutingPhaseProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, courtyardCircleProps, courtyardOutlineProps, courtyardRectProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, silkscreenGraphicProps, smtPadProps, fiducialProps, busProps, differentialPairProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, assemblyDeviceProps, assemblyScreenProps, assemblySubassemblyProps, enclosureCutoutApertureProps, enclosureFdmBoxProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, CrystalPinLabels, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicSymbolProps, schematicSectionProps, schematicSheetProps, schematicGraphicProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, analogTransientSimulationProps, analogDcOperatingPointSimulationProps, analogDcSweepSimulationProps, analogAcSweepSimulationProps, analogSweepParameterProps, voltageProbeProps, spicemodelProps, AnalogTransientSimulationProps, AnalogDcSweepSimulationProps, AnalogAcSweepSimulationProps, AnalogSweepParameterProps, AssemblySubassemblyPropsInput, AssemblyDevicePropsInput, AssemblyScreenPropsInput, EnclosureCutoutApertureProps, EnclosureFdmBoxProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
4
|
+
import { PlatformConfig, traceProps, netProps, AutoroutingPhaseProps, AutorouterProp, subcircuitGroupProps, AutorouterConfig, PcbSx, portProps, PinAttributeMap, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, platedHoleProps, BoardOutlinePoint, boardProps, subcircuitProps, subpanelProps, capacitorProps, antennaProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, ammeterProps, resistorProps, constraintProps, drcCheckProps, autoroutingPhaseProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, courtyardCircleProps, courtyardOutlineProps, courtyardRectProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, silkscreenGraphicProps, smtPadProps, fiducialProps, busProps, differentialPairProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, assemblyDeviceProps, assemblyScreenProps, assemblySubassemblyProps, enclosureCutoutApertureProps, enclosureFdmBoxProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, CrystalPinLabels, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicSymbolProps, schematicSectionProps, schematicSheetProps, schematicGraphicProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, analogTransientSimulationProps, analogDcOperatingPointSimulationProps, analogDcSweepSimulationProps, analogAcSweepSimulationProps, analogSweepParameterProps, voltageProbeProps, spicemodelProps, pcbBendProps, pcbStiffenerProps, AnalogTransientSimulationProps, AnalogDcSweepSimulationProps, AnalogAcSweepSimulationProps, AnalogSweepParameterProps, AssemblySubassemblyPropsInput, AssemblyDevicePropsInput, AssemblyScreenPropsInput, EnclosureCutoutApertureProps, EnclosureFdmBoxProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
5
5
|
export { FanoutTracePath, fanoutTracePath, kicadFootprintStrings } from '@tscircuit/props';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import react__default, { ReactElement, ReactNode } from 'react';
|
|
7
|
+
import react__default, { ReactElement, ReactNode, Attributes } from 'react';
|
|
8
8
|
export { createElement } from 'react';
|
|
9
9
|
import * as zod from 'zod';
|
|
10
10
|
import { z, ZodType } from 'zod';
|
|
@@ -368,9 +368,9 @@ interface IIsolatedCircuit {
|
|
|
368
368
|
interface IRootCircuit extends IIsolatedCircuit {
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "RenderIsolatedSubcircuits", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "FetchPartFootprint", "ResolveFootprintPinLabels", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "CreateAutoplacedBreakoutPoints", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "CheckRefDesConvention", "SourceComponentPropertyValidation", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SymbolContainerRender", "SchematicPrimitiveRender", "SchematicSymbolResize", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicSectionRender", "SchematicTraceRender", "SchematicSheetRender", "SchematicReplaceNetLabelsWithSymbols", "SchematicLabelNetsWithConflictingNames", "PanelBoardLayout", "ValidatePcbCoordinates", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbCalcPlacementResolution", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbAutoplaceBreakoutPoints", "PcbTraceHintRender", "PcbManualTraceRender", "PcbPlacementDesignRuleChecks", "PcbTraceRender", "PcbRouteNetIslands", "PcbImplicitCopperPourRender", "PcbCopperPourRender", "PcbViaStitchRender", "PcbCopperPourCleanup", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "PartOrientationAnalysis", "SupplierFootprintMismatchWarning", "SimulationSpiceEngineRender"];
|
|
371
|
+
declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "RenderIsolatedSubcircuits", "InflateSubcircuitCircuitJson", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "FetchPartFootprint", "ResolveFootprintPinLabels", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "CreateAutoplacedBreakoutPoints", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "CheckRefDesConvention", "SourceComponentPropertyValidation", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SymbolContainerRender", "SchematicPrimitiveRender", "SchematicSymbolResize", "SchematicComponentSizeCalculation", "SchematicLayout", "SchematicSectionRender", "SchematicTraceRender", "SchematicSheetRender", "SchematicReplaceNetLabelsWithSymbols", "SchematicLabelNetsWithConflictingNames", "PanelBoardLayout", "ValidatePcbCoordinates", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbComponentAnchorAlignment", "PcbCalcPlacementResolution", "PcbLayout", "PcbBoardAutoSize", "PanelLayout", "PcbFlexRender", "PcbAutoplaceBreakoutPoints", "PcbTraceHintRender", "PcbManualTraceRender", "PcbPlacementDesignRuleChecks", "PcbTraceRender", "PcbRouteNetIslands", "PcbImplicitCopperPourRender", "PcbCopperPourRender", "PcbViaStitchRender", "PcbCopperPourCleanup", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender", "PartOrientationAnalysis", "SupplierFootprintMismatchWarning", "SimulationSpiceEngineRender"];
|
|
372
372
|
type RenderPhase = (typeof orderedRenderPhases)[number];
|
|
373
|
-
declare const renderPhaseIndexMap: Map<"ReactSubtreesRender" | "RenderIsolatedSubcircuits" | "InflateSubcircuitCircuitJson" | "SourceNameDuplicateComponentRemoval" | "PcbFootprintStringRender" | "FetchPartFootprint" | "ResolveFootprintPinLabels" | "InitializePortsFromChildren" | "CreateNetsFromProps" | "AssignFallbackProps" | "CreateTracesFromProps" | "CreateTracesFromNetLabels" | "CreateTraceHintsFromProps" | "CreateAutoplacedBreakoutPoints" | "SourceGroupRender" | "AssignNameToUnnamedComponents" | "SourceRender" | "CheckRefDesConvention" | "SourceComponentPropertyValidation" | "SourceParentAttachment" | "PortMatching" | "OptimizeSelectorCache" | "SourceTraceRender" | "SourceAddConnectivityMapKey" | "SourceDesignRuleChecks" | "SimulationRender" | "SchematicComponentRender" | "SchematicPortRender" | "SymbolContainerRender" | "SchematicPrimitiveRender" | "SchematicSymbolResize" | "SchematicComponentSizeCalculation" | "SchematicLayout" | "SchematicSectionRender" | "SchematicTraceRender" | "SchematicSheetRender" | "SchematicReplaceNetLabelsWithSymbols" | "SchematicLabelNetsWithConflictingNames" | "PanelBoardLayout" | "ValidatePcbCoordinates" | "PcbComponentRender" | "PcbPrimitiveRender" | "PcbFootprintLayout" | "PcbPortRender" | "PcbPortAttachment" | "PcbComponentSizeCalculation" | "PcbComponentAnchorAlignment" | "PcbCalcPlacementResolution" | "PcbLayout" | "PcbBoardAutoSize" | "PanelLayout" | "PcbAutoplaceBreakoutPoints" | "PcbTraceHintRender" | "PcbManualTraceRender" | "PcbPlacementDesignRuleChecks" | "PcbTraceRender" | "PcbRouteNetIslands" | "PcbImplicitCopperPourRender" | "PcbCopperPourRender" | "PcbViaStitchRender" | "PcbCopperPourCleanup" | "PcbDesignRuleChecks" | "SilkscreenOverlapAdjustment" | "CadModelRender" | "PartsEngineRender" | "PartOrientationAnalysis" | "SupplierFootprintMismatchWarning" | "SimulationSpiceEngineRender", number>;
|
|
373
|
+
declare const renderPhaseIndexMap: Map<"ReactSubtreesRender" | "RenderIsolatedSubcircuits" | "InflateSubcircuitCircuitJson" | "SourceNameDuplicateComponentRemoval" | "PcbFootprintStringRender" | "FetchPartFootprint" | "ResolveFootprintPinLabels" | "InitializePortsFromChildren" | "CreateNetsFromProps" | "AssignFallbackProps" | "CreateTracesFromProps" | "CreateTracesFromNetLabels" | "CreateTraceHintsFromProps" | "CreateAutoplacedBreakoutPoints" | "SourceGroupRender" | "AssignNameToUnnamedComponents" | "SourceRender" | "CheckRefDesConvention" | "SourceComponentPropertyValidation" | "SourceParentAttachment" | "PortMatching" | "OptimizeSelectorCache" | "SourceTraceRender" | "SourceAddConnectivityMapKey" | "SourceDesignRuleChecks" | "SimulationRender" | "SchematicComponentRender" | "SchematicPortRender" | "SymbolContainerRender" | "SchematicPrimitiveRender" | "SchematicSymbolResize" | "SchematicComponentSizeCalculation" | "SchematicLayout" | "SchematicSectionRender" | "SchematicTraceRender" | "SchematicSheetRender" | "SchematicReplaceNetLabelsWithSymbols" | "SchematicLabelNetsWithConflictingNames" | "PanelBoardLayout" | "ValidatePcbCoordinates" | "PcbComponentRender" | "PcbPrimitiveRender" | "PcbFootprintLayout" | "PcbPortRender" | "PcbPortAttachment" | "PcbComponentSizeCalculation" | "PcbComponentAnchorAlignment" | "PcbCalcPlacementResolution" | "PcbLayout" | "PcbBoardAutoSize" | "PanelLayout" | "PcbFlexRender" | "PcbAutoplaceBreakoutPoints" | "PcbTraceHintRender" | "PcbManualTraceRender" | "PcbPlacementDesignRuleChecks" | "PcbTraceRender" | "PcbRouteNetIslands" | "PcbImplicitCopperPourRender" | "PcbCopperPourRender" | "PcbViaStitchRender" | "PcbCopperPourCleanup" | "PcbDesignRuleChecks" | "SilkscreenOverlapAdjustment" | "CadModelRender" | "PartsEngineRender" | "PartOrientationAnalysis" | "SupplierFootprintMismatchWarning" | "SimulationSpiceEngineRender", number>;
|
|
374
374
|
type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
|
|
375
375
|
type RenderPhaseStates = Record<RenderPhase, {
|
|
376
376
|
initialized: boolean;
|
|
@@ -98194,7 +98194,7 @@ declare const baseBreakoutPointProps: zod.ZodObject<Omit<{
|
|
|
98194
98194
|
pcbOffsetX?: number | undefined;
|
|
98195
98195
|
pcbOffsetY?: number | undefined;
|
|
98196
98196
|
pcbPositionAnchor?: string | undefined;
|
|
98197
|
-
pcbPositionMode?: "
|
|
98197
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
98198
98198
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
98199
98199
|
pcbMarginTop?: number | undefined;
|
|
98200
98200
|
pcbMarginRight?: number | undefined;
|
|
@@ -98225,7 +98225,7 @@ declare const baseBreakoutPointProps: zod.ZodObject<Omit<{
|
|
|
98225
98225
|
pcbOffsetX?: string | number | undefined;
|
|
98226
98226
|
pcbOffsetY?: string | number | undefined;
|
|
98227
98227
|
pcbPositionAnchor?: string | undefined;
|
|
98228
|
-
pcbPositionMode?: "
|
|
98228
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
98229
98229
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
98230
98230
|
pcbMarginTop?: string | number | undefined;
|
|
98231
98231
|
pcbMarginRight?: string | number | undefined;
|
|
@@ -108349,7 +108349,7 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
108349
108349
|
pcbOffsetY?: number | undefined;
|
|
108350
108350
|
pcbRotation?: number | undefined;
|
|
108351
108351
|
pcbPositionAnchor?: string | undefined;
|
|
108352
|
-
pcbPositionMode?: "
|
|
108352
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
108353
108353
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
108354
108354
|
pcbMarginTop?: number | undefined;
|
|
108355
108355
|
pcbMarginRight?: number | undefined;
|
|
@@ -108418,7 +108418,7 @@ declare const pcbViaProps: z.ZodObject<{
|
|
|
108418
108418
|
pcbOffsetY?: string | number | undefined;
|
|
108419
108419
|
pcbRotation?: string | number | undefined;
|
|
108420
108420
|
pcbPositionAnchor?: string | undefined;
|
|
108421
|
-
pcbPositionMode?: "
|
|
108421
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
108422
108422
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
108423
108423
|
pcbMarginTop?: string | number | undefined;
|
|
108424
108424
|
pcbMarginRight?: string | number | undefined;
|
|
@@ -108609,7 +108609,7 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
108609
108609
|
pcbOffsetY?: number | undefined;
|
|
108610
108610
|
pcbRotation?: number | undefined;
|
|
108611
108611
|
pcbPositionAnchor?: string | undefined;
|
|
108612
|
-
pcbPositionMode?: "
|
|
108612
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
108613
108613
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
108614
108614
|
pcbMarginTop?: number | undefined;
|
|
108615
108615
|
pcbMarginRight?: number | undefined;
|
|
@@ -108678,7 +108678,7 @@ declare class PcbVia extends PrimitiveComponent<typeof pcbViaProps> {
|
|
|
108678
108678
|
pcbOffsetY?: string | number | undefined;
|
|
108679
108679
|
pcbRotation?: string | number | undefined;
|
|
108680
108680
|
pcbPositionAnchor?: string | undefined;
|
|
108681
|
-
pcbPositionMode?: "
|
|
108681
|
+
pcbPositionMode?: "auto" | "relative_to_group_anchor" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
108682
108682
|
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
108683
108683
|
pcbMarginTop?: string | number | undefined;
|
|
108684
108684
|
pcbMarginRight?: string | number | undefined;
|
|
@@ -186961,11 +186961,11 @@ declare class SchematicLine extends PrimitiveComponent<typeof schematicLineProps
|
|
|
186961
186961
|
dashLength: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
186962
186962
|
dashGap: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
186963
186963
|
}, "strip", zod.ZodTypeAny, {
|
|
186964
|
-
isDashed: boolean;
|
|
186965
186964
|
x1: number;
|
|
186966
186965
|
y1: number;
|
|
186967
186966
|
x2: number;
|
|
186968
186967
|
y2: number;
|
|
186968
|
+
isDashed: boolean;
|
|
186969
186969
|
strokeWidth?: number | undefined;
|
|
186970
186970
|
color?: string | undefined;
|
|
186971
186971
|
dashLength?: number | undefined;
|
|
@@ -194008,6 +194008,408 @@ declare class SpiceModel extends PrimitiveComponent<typeof spicemodelProps> {
|
|
|
194008
194008
|
private _insertSpiceModelError;
|
|
194009
194009
|
}
|
|
194010
194010
|
|
|
194011
|
+
declare class PcbBend extends PrimitiveComponent<typeof pcbBendProps> {
|
|
194012
|
+
pcb_bend_id: PcbBend$1["pcb_bend_id"] | null;
|
|
194013
|
+
get config(): {
|
|
194014
|
+
componentName: string;
|
|
194015
|
+
zodProps: zod.ZodEffects<zod.ZodObject<{
|
|
194016
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
194017
|
+
x1: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194018
|
+
y1: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194019
|
+
x2: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194020
|
+
y2: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194021
|
+
bendAngle: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194022
|
+
bendRadius: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194023
|
+
bendSide: zod.ZodEnum<["left", "right"]>;
|
|
194024
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194025
|
+
x1: number;
|
|
194026
|
+
y1: number;
|
|
194027
|
+
x2: number;
|
|
194028
|
+
y2: number;
|
|
194029
|
+
bendAngle: number;
|
|
194030
|
+
bendRadius: number;
|
|
194031
|
+
bendSide: "left" | "right";
|
|
194032
|
+
name?: string | undefined;
|
|
194033
|
+
}, {
|
|
194034
|
+
x1: string | number;
|
|
194035
|
+
y1: string | number;
|
|
194036
|
+
x2: string | number;
|
|
194037
|
+
y2: string | number;
|
|
194038
|
+
bendAngle: string | number;
|
|
194039
|
+
bendRadius: string | number;
|
|
194040
|
+
bendSide: "left" | "right";
|
|
194041
|
+
name?: string | undefined;
|
|
194042
|
+
}>, {
|
|
194043
|
+
x1: number;
|
|
194044
|
+
y1: number;
|
|
194045
|
+
x2: number;
|
|
194046
|
+
y2: number;
|
|
194047
|
+
bendAngle: number;
|
|
194048
|
+
bendRadius: number;
|
|
194049
|
+
bendSide: "left" | "right";
|
|
194050
|
+
name?: string | undefined;
|
|
194051
|
+
}, {
|
|
194052
|
+
x1: string | number;
|
|
194053
|
+
y1: string | number;
|
|
194054
|
+
x2: string | number;
|
|
194055
|
+
y2: string | number;
|
|
194056
|
+
bendAngle: string | number;
|
|
194057
|
+
bendRadius: string | number;
|
|
194058
|
+
bendSide: "left" | "right";
|
|
194059
|
+
name?: string | undefined;
|
|
194060
|
+
}>;
|
|
194061
|
+
};
|
|
194062
|
+
doInitialPcbFlexRender(): void;
|
|
194063
|
+
doRemovePcbFlexRender(): void;
|
|
194064
|
+
}
|
|
194065
|
+
|
|
194066
|
+
declare class PcbStiffener extends PrimitiveComponent<typeof pcbStiffenerProps> {
|
|
194067
|
+
pcb_stiffener_id: PcbStiffener$1["pcb_stiffener_id"] | null;
|
|
194068
|
+
get config(): {
|
|
194069
|
+
componentName: string;
|
|
194070
|
+
zodProps: zod.ZodDiscriminatedUnion<"shape", [zod.ZodObject<Omit<{
|
|
194071
|
+
pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194072
|
+
pcbY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194073
|
+
pcbLeftEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194074
|
+
pcbRightEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194075
|
+
pcbTopEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194076
|
+
pcbBottomEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194077
|
+
pcbOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194078
|
+
pcbOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194079
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194080
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
194081
|
+
pcbPositionMode: zod.ZodOptional<zod.ZodEnum<["relative_to_group_anchor", "auto", "relative_to_board_anchor", "relative_to_component_anchor"]>>;
|
|
194082
|
+
shouldBeOnEdgeOfBoard: zod.ZodOptional<zod.ZodBoolean>;
|
|
194083
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, zod.ZodObject<{
|
|
194084
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
194085
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194086
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194087
|
+
}, {
|
|
194088
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194089
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
194090
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194091
|
+
}>>;
|
|
194092
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194093
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194094
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194095
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194096
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194097
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194098
|
+
pcbStyle: zod.ZodOptional<zod.ZodObject<{
|
|
194099
|
+
silkscreenFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194100
|
+
viaPadDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194101
|
+
viaHoleDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194102
|
+
silkscreenTextPosition: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["centered", "outside", "none"]>, zod.ZodObject<{
|
|
194103
|
+
offsetX: zod.ZodNumber;
|
|
194104
|
+
offsetY: zod.ZodNumber;
|
|
194105
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194106
|
+
offsetX: number;
|
|
194107
|
+
offsetY: number;
|
|
194108
|
+
}, {
|
|
194109
|
+
offsetX: number;
|
|
194110
|
+
offsetY: number;
|
|
194111
|
+
}>]>>;
|
|
194112
|
+
silkscreenTextVisibility: zod.ZodOptional<zod.ZodEnum<["hidden", "visible", "inherit"]>>;
|
|
194113
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194114
|
+
silkscreenFontSize?: number | undefined;
|
|
194115
|
+
viaPadDiameter?: number | undefined;
|
|
194116
|
+
viaHoleDiameter?: number | undefined;
|
|
194117
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194118
|
+
offsetX: number;
|
|
194119
|
+
offsetY: number;
|
|
194120
|
+
} | undefined;
|
|
194121
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194122
|
+
}, {
|
|
194123
|
+
silkscreenFontSize?: string | number | undefined;
|
|
194124
|
+
viaPadDiameter?: string | number | undefined;
|
|
194125
|
+
viaHoleDiameter?: string | number | undefined;
|
|
194126
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194127
|
+
offsetX: number;
|
|
194128
|
+
offsetY: number;
|
|
194129
|
+
} | undefined;
|
|
194130
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194131
|
+
}>>;
|
|
194132
|
+
pcbSx: zod.ZodOptional<zod.ZodType<_tscircuit_props.PcbSx, zod.ZodTypeDef, _tscircuit_props.PcbSx>>;
|
|
194133
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
194134
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
194135
|
+
}, "layer"> & {
|
|
194136
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
194137
|
+
layer: zod.ZodEnum<["top", "bottom"]>;
|
|
194138
|
+
material: zod.ZodEnum<["fr4", "polyimide", "stainless_steel", "aluminum"]>;
|
|
194139
|
+
thickness: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194140
|
+
adhesiveThickness: zod.ZodOptional<zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>>;
|
|
194141
|
+
} & {
|
|
194142
|
+
shape: zod.ZodLiteral<"rect">;
|
|
194143
|
+
width: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194144
|
+
height: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194145
|
+
outline: zod.ZodOptional<zod.ZodNever>;
|
|
194146
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194147
|
+
shape: "rect";
|
|
194148
|
+
width: number;
|
|
194149
|
+
height: number;
|
|
194150
|
+
thickness: number;
|
|
194151
|
+
layer: "top" | "bottom";
|
|
194152
|
+
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum";
|
|
194153
|
+
name?: string | undefined;
|
|
194154
|
+
pcbX?: string | number | undefined;
|
|
194155
|
+
pcbY?: string | number | undefined;
|
|
194156
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
194157
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
194158
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
194159
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
194160
|
+
pcbOffsetX?: number | undefined;
|
|
194161
|
+
pcbOffsetY?: number | undefined;
|
|
194162
|
+
pcbRotation?: number | undefined;
|
|
194163
|
+
pcbPositionAnchor?: string | undefined;
|
|
194164
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
194165
|
+
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
194166
|
+
pcbMarginTop?: number | undefined;
|
|
194167
|
+
pcbMarginRight?: number | undefined;
|
|
194168
|
+
pcbMarginBottom?: number | undefined;
|
|
194169
|
+
pcbMarginLeft?: number | undefined;
|
|
194170
|
+
pcbMarginX?: number | undefined;
|
|
194171
|
+
pcbMarginY?: number | undefined;
|
|
194172
|
+
pcbStyle?: {
|
|
194173
|
+
silkscreenFontSize?: number | undefined;
|
|
194174
|
+
viaPadDiameter?: number | undefined;
|
|
194175
|
+
viaHoleDiameter?: number | undefined;
|
|
194176
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194177
|
+
offsetX: number;
|
|
194178
|
+
offsetY: number;
|
|
194179
|
+
} | undefined;
|
|
194180
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194181
|
+
} | undefined;
|
|
194182
|
+
pcbSx?: _tscircuit_props.PcbSx | undefined;
|
|
194183
|
+
pcbRelative?: boolean | undefined;
|
|
194184
|
+
relative?: boolean | undefined;
|
|
194185
|
+
outline?: undefined;
|
|
194186
|
+
adhesiveThickness?: number | undefined;
|
|
194187
|
+
}, {
|
|
194188
|
+
shape: "rect";
|
|
194189
|
+
width: string | number;
|
|
194190
|
+
height: string | number;
|
|
194191
|
+
thickness: string | number;
|
|
194192
|
+
layer: "top" | "bottom";
|
|
194193
|
+
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum";
|
|
194194
|
+
name?: string | undefined;
|
|
194195
|
+
pcbX?: string | number | undefined;
|
|
194196
|
+
pcbY?: string | number | undefined;
|
|
194197
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
194198
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
194199
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
194200
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
194201
|
+
pcbOffsetX?: string | number | undefined;
|
|
194202
|
+
pcbOffsetY?: string | number | undefined;
|
|
194203
|
+
pcbRotation?: string | number | undefined;
|
|
194204
|
+
pcbPositionAnchor?: string | undefined;
|
|
194205
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
194206
|
+
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
194207
|
+
pcbMarginTop?: string | number | undefined;
|
|
194208
|
+
pcbMarginRight?: string | number | undefined;
|
|
194209
|
+
pcbMarginBottom?: string | number | undefined;
|
|
194210
|
+
pcbMarginLeft?: string | number | undefined;
|
|
194211
|
+
pcbMarginX?: string | number | undefined;
|
|
194212
|
+
pcbMarginY?: string | number | undefined;
|
|
194213
|
+
pcbStyle?: {
|
|
194214
|
+
silkscreenFontSize?: string | number | undefined;
|
|
194215
|
+
viaPadDiameter?: string | number | undefined;
|
|
194216
|
+
viaHoleDiameter?: string | number | undefined;
|
|
194217
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194218
|
+
offsetX: number;
|
|
194219
|
+
offsetY: number;
|
|
194220
|
+
} | undefined;
|
|
194221
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194222
|
+
} | undefined;
|
|
194223
|
+
pcbSx?: _tscircuit_props.PcbSx | undefined;
|
|
194224
|
+
pcbRelative?: boolean | undefined;
|
|
194225
|
+
relative?: boolean | undefined;
|
|
194226
|
+
outline?: undefined;
|
|
194227
|
+
adhesiveThickness?: string | number | undefined;
|
|
194228
|
+
}>, zod.ZodObject<Omit<{
|
|
194229
|
+
pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194230
|
+
pcbY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194231
|
+
pcbLeftEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194232
|
+
pcbRightEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194233
|
+
pcbTopEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194234
|
+
pcbBottomEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
194235
|
+
pcbOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194236
|
+
pcbOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194237
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194238
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
194239
|
+
pcbPositionMode: zod.ZodOptional<zod.ZodEnum<["relative_to_group_anchor", "auto", "relative_to_board_anchor", "relative_to_component_anchor"]>>;
|
|
194240
|
+
shouldBeOnEdgeOfBoard: zod.ZodOptional<zod.ZodBoolean>;
|
|
194241
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>, zod.ZodObject<{
|
|
194242
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6", "inner7", "inner8"]>;
|
|
194243
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194244
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194245
|
+
}, {
|
|
194246
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194247
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8" | {
|
|
194248
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | "inner7" | "inner8";
|
|
194249
|
+
}>>;
|
|
194250
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194251
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194252
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194253
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194254
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194255
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194256
|
+
pcbStyle: zod.ZodOptional<zod.ZodObject<{
|
|
194257
|
+
silkscreenFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194258
|
+
viaPadDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194259
|
+
viaHoleDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
194260
|
+
silkscreenTextPosition: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["centered", "outside", "none"]>, zod.ZodObject<{
|
|
194261
|
+
offsetX: zod.ZodNumber;
|
|
194262
|
+
offsetY: zod.ZodNumber;
|
|
194263
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194264
|
+
offsetX: number;
|
|
194265
|
+
offsetY: number;
|
|
194266
|
+
}, {
|
|
194267
|
+
offsetX: number;
|
|
194268
|
+
offsetY: number;
|
|
194269
|
+
}>]>>;
|
|
194270
|
+
silkscreenTextVisibility: zod.ZodOptional<zod.ZodEnum<["hidden", "visible", "inherit"]>>;
|
|
194271
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194272
|
+
silkscreenFontSize?: number | undefined;
|
|
194273
|
+
viaPadDiameter?: number | undefined;
|
|
194274
|
+
viaHoleDiameter?: number | undefined;
|
|
194275
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194276
|
+
offsetX: number;
|
|
194277
|
+
offsetY: number;
|
|
194278
|
+
} | undefined;
|
|
194279
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194280
|
+
}, {
|
|
194281
|
+
silkscreenFontSize?: string | number | undefined;
|
|
194282
|
+
viaPadDiameter?: string | number | undefined;
|
|
194283
|
+
viaHoleDiameter?: string | number | undefined;
|
|
194284
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194285
|
+
offsetX: number;
|
|
194286
|
+
offsetY: number;
|
|
194287
|
+
} | undefined;
|
|
194288
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194289
|
+
}>>;
|
|
194290
|
+
pcbSx: zod.ZodOptional<zod.ZodType<_tscircuit_props.PcbSx, zod.ZodTypeDef, _tscircuit_props.PcbSx>>;
|
|
194291
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
194292
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
194293
|
+
}, "layer"> & {
|
|
194294
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
194295
|
+
layer: zod.ZodEnum<["top", "bottom"]>;
|
|
194296
|
+
material: zod.ZodEnum<["fr4", "polyimide", "stainless_steel", "aluminum"]>;
|
|
194297
|
+
thickness: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194298
|
+
adhesiveThickness: zod.ZodOptional<zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>>;
|
|
194299
|
+
} & {
|
|
194300
|
+
shape: zod.ZodLiteral<"polygon">;
|
|
194301
|
+
outline: zod.ZodEffects<zod.ZodArray<zod.ZodObject<{
|
|
194302
|
+
x: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194303
|
+
y: zod.ZodPipeline<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>, zod.ZodNumber>;
|
|
194304
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194305
|
+
x: number;
|
|
194306
|
+
y: number;
|
|
194307
|
+
}, {
|
|
194308
|
+
x: string | number;
|
|
194309
|
+
y: string | number;
|
|
194310
|
+
}>, "many">, {
|
|
194311
|
+
x: number;
|
|
194312
|
+
y: number;
|
|
194313
|
+
}[], {
|
|
194314
|
+
x: string | number;
|
|
194315
|
+
y: string | number;
|
|
194316
|
+
}[]>;
|
|
194317
|
+
width: zod.ZodOptional<zod.ZodNever>;
|
|
194318
|
+
height: zod.ZodOptional<zod.ZodNever>;
|
|
194319
|
+
}, "strip", zod.ZodTypeAny, {
|
|
194320
|
+
shape: "polygon";
|
|
194321
|
+
thickness: number;
|
|
194322
|
+
layer: "top" | "bottom";
|
|
194323
|
+
outline: {
|
|
194324
|
+
x: number;
|
|
194325
|
+
y: number;
|
|
194326
|
+
}[];
|
|
194327
|
+
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum";
|
|
194328
|
+
width?: undefined;
|
|
194329
|
+
height?: undefined;
|
|
194330
|
+
name?: string | undefined;
|
|
194331
|
+
pcbX?: string | number | undefined;
|
|
194332
|
+
pcbY?: string | number | undefined;
|
|
194333
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
194334
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
194335
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
194336
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
194337
|
+
pcbOffsetX?: number | undefined;
|
|
194338
|
+
pcbOffsetY?: number | undefined;
|
|
194339
|
+
pcbRotation?: number | undefined;
|
|
194340
|
+
pcbPositionAnchor?: string | undefined;
|
|
194341
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
194342
|
+
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
194343
|
+
pcbMarginTop?: number | undefined;
|
|
194344
|
+
pcbMarginRight?: number | undefined;
|
|
194345
|
+
pcbMarginBottom?: number | undefined;
|
|
194346
|
+
pcbMarginLeft?: number | undefined;
|
|
194347
|
+
pcbMarginX?: number | undefined;
|
|
194348
|
+
pcbMarginY?: number | undefined;
|
|
194349
|
+
pcbStyle?: {
|
|
194350
|
+
silkscreenFontSize?: number | undefined;
|
|
194351
|
+
viaPadDiameter?: number | undefined;
|
|
194352
|
+
viaHoleDiameter?: number | undefined;
|
|
194353
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194354
|
+
offsetX: number;
|
|
194355
|
+
offsetY: number;
|
|
194356
|
+
} | undefined;
|
|
194357
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194358
|
+
} | undefined;
|
|
194359
|
+
pcbSx?: _tscircuit_props.PcbSx | undefined;
|
|
194360
|
+
pcbRelative?: boolean | undefined;
|
|
194361
|
+
relative?: boolean | undefined;
|
|
194362
|
+
adhesiveThickness?: number | undefined;
|
|
194363
|
+
}, {
|
|
194364
|
+
shape: "polygon";
|
|
194365
|
+
thickness: string | number;
|
|
194366
|
+
layer: "top" | "bottom";
|
|
194367
|
+
outline: {
|
|
194368
|
+
x: string | number;
|
|
194369
|
+
y: string | number;
|
|
194370
|
+
}[];
|
|
194371
|
+
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum";
|
|
194372
|
+
width?: undefined;
|
|
194373
|
+
height?: undefined;
|
|
194374
|
+
name?: string | undefined;
|
|
194375
|
+
pcbX?: string | number | undefined;
|
|
194376
|
+
pcbY?: string | number | undefined;
|
|
194377
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
194378
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
194379
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
194380
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
194381
|
+
pcbOffsetX?: string | number | undefined;
|
|
194382
|
+
pcbOffsetY?: string | number | undefined;
|
|
194383
|
+
pcbRotation?: string | number | undefined;
|
|
194384
|
+
pcbPositionAnchor?: string | undefined;
|
|
194385
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
194386
|
+
shouldBeOnEdgeOfBoard?: boolean | undefined;
|
|
194387
|
+
pcbMarginTop?: string | number | undefined;
|
|
194388
|
+
pcbMarginRight?: string | number | undefined;
|
|
194389
|
+
pcbMarginBottom?: string | number | undefined;
|
|
194390
|
+
pcbMarginLeft?: string | number | undefined;
|
|
194391
|
+
pcbMarginX?: string | number | undefined;
|
|
194392
|
+
pcbMarginY?: string | number | undefined;
|
|
194393
|
+
pcbStyle?: {
|
|
194394
|
+
silkscreenFontSize?: string | number | undefined;
|
|
194395
|
+
viaPadDiameter?: string | number | undefined;
|
|
194396
|
+
viaHoleDiameter?: string | number | undefined;
|
|
194397
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
194398
|
+
offsetX: number;
|
|
194399
|
+
offsetY: number;
|
|
194400
|
+
} | undefined;
|
|
194401
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
194402
|
+
} | undefined;
|
|
194403
|
+
pcbSx?: _tscircuit_props.PcbSx | undefined;
|
|
194404
|
+
pcbRelative?: boolean | undefined;
|
|
194405
|
+
relative?: boolean | undefined;
|
|
194406
|
+
adhesiveThickness?: string | number | undefined;
|
|
194407
|
+
}>]>;
|
|
194408
|
+
};
|
|
194409
|
+
doInitialPcbFlexRender(): void;
|
|
194410
|
+
doRemovePcbFlexRender(): void;
|
|
194411
|
+
}
|
|
194412
|
+
|
|
194011
194413
|
declare const analog: {
|
|
194012
194414
|
readonly transientsimulation: react.FunctionComponent<AnalogTransientSimulationProps>;
|
|
194013
194415
|
readonly dcoperatingpointsimulation: react.FunctionComponent<_tscircuit_props.AnalogAnalysisSimulationBaseProps>;
|
|
@@ -195736,6 +196138,8 @@ interface TscircuitElements {
|
|
|
195736
196138
|
courtyardrect: _tscircuit_props.CourtyardRectProps;
|
|
195737
196139
|
pcbtrace: _tscircuit_props.PcbTraceProps;
|
|
195738
196140
|
fabricationnoterect: _tscircuit_props.FabricationNoteRectProps;
|
|
196141
|
+
pcbbend: _tscircuit_props.PcbBendProps & Attributes;
|
|
196142
|
+
pcbstiffener: _tscircuit_props.PcbStiffenerProps & Attributes;
|
|
195739
196143
|
pcbnoteline: _tscircuit_props.PcbNoteLineProps;
|
|
195740
196144
|
pcbnoterect: _tscircuit_props.PcbNoteRectProps;
|
|
195741
196145
|
pcbnotetext: _tscircuit_props.PcbNoteTextProps;
|
|
@@ -195788,4 +196192,4 @@ declare module "react/jsx-runtime" {
|
|
|
195788
196192
|
}
|
|
195789
196193
|
}
|
|
195790
196194
|
|
|
195791
|
-
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, type AssemblyCadAssemblyJsxProps, AssemblyDevice, type AssemblyDeviceJsxProps, AssemblyScreen, type AssemblyScreenJsxProps, AssemblySubassembly, type AssemblySubassemblyJsxProps, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingCacheDisabledReason, type AutoroutingCacheStatus, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingExecutionMetadata, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, Bus, CadAssembly, CadModel, Capacitor, Chip, Circuit, type CircuitJsonMetadata, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, DifferentialPair, Diode, DrcCheck, EnclosureCutoutAperture, EnclosureFdmBox, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Breakout as Fanout, BreakoutPoint as FanoutPoint, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, type PcbGroupId, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, PcbVia, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicGraphic, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicSheet, SchematicSymbol, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenGraphic, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteBounds, type SimpleRouteBus, type SimpleRouteBusTermination, type SimpleRouteConnection, type SimpleRouteDifferentialPair, type SimpleRouteJson, type SimpleRoutePoint, type SimplifiedPcbTrace, type SingleLayerConnectionPoint, SmtPad, SolderJumper, type SolverEndedEvent, type SolverName, type SolverStartedEvent, SpiceModel, type SrjConnectionName, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, analog, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, assembly, createUseComponent, enclosure, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
196195
|
+
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, type AssemblyCadAssemblyJsxProps, AssemblyDevice, type AssemblyDeviceJsxProps, AssemblyScreen, type AssemblyScreenJsxProps, AssemblySubassembly, type AssemblySubassemblyJsxProps, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingCacheDisabledReason, type AutoroutingCacheStatus, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingExecutionMetadata, AutoroutingPhase, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, Bus, CadAssembly, CadModel, Capacitor, Chip, Circuit, type CircuitJsonMetadata, type ComponentWithPins, Connector, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardOutline, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, DifferentialPair, Diode, DrcCheck, EnclosureCutoutAperture, EnclosureFdmBox, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Breakout as Fanout, BreakoutPoint as FanoutPoint, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IIsolatedCircuit, type IRenderable, type IRootCircuit, Inductor, Interconnect, IsolatedCircuit, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, MountedBoard, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbBend, type PcbGroupId, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbStiffener, PcbTrace, PcbVia, PinHeader, type PinLabelSpec, Pinout, PlatedHole, Port, Potentiometer, PowerSource, PrimitiveComponent, Project, PushButton, type RenderPhase, type RenderPhaseFn, type RenderPhaseFunctions, type RenderPhaseStates, Renderable, Resistor, Resonator, RootCircuit, type RootCircuitEventName, SOLVERS, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicGraphic, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicSection, SchematicSheet, SchematicSymbol, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenGraphic, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteBounds, type SimpleRouteBus, type SimpleRouteBusTermination, type SimpleRouteConnection, type SimpleRouteDifferentialPair, type SimpleRouteJson, type SimpleRoutePoint, type SimplifiedPcbTrace, type SingleLayerConnectionPoint, SmtPad, SolderJumper, type SolverEndedEvent, type SolverName, type SolverStartedEvent, SpiceModel, type SrjConnectionName, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, analog, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, assembly, createUseComponent, enclosure, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -67,11 +67,13 @@ __export(components_exports, {
|
|
|
67
67
|
NormalComponent: () => NormalComponent,
|
|
68
68
|
OpAmp: () => OpAmp,
|
|
69
69
|
Panel: () => Panel,
|
|
70
|
+
PcbBend: () => PcbBend,
|
|
70
71
|
PcbNoteDimension: () => PcbNoteDimension,
|
|
71
72
|
PcbNoteLine: () => PcbNoteLine,
|
|
72
73
|
PcbNotePath: () => PcbNotePath,
|
|
73
74
|
PcbNoteRect: () => PcbNoteRect,
|
|
74
75
|
PcbNoteText: () => PcbNoteText,
|
|
76
|
+
PcbStiffener: () => PcbStiffener,
|
|
75
77
|
PcbTrace: () => PcbTrace,
|
|
76
78
|
PcbVia: () => PcbVia,
|
|
77
79
|
PinHeader: () => PinHeader,
|
|
@@ -387,6 +389,24 @@ var mergeRoutes = (routes) => {
|
|
|
387
389
|
// lib/components/primitive-components/Net.ts
|
|
388
390
|
import { netProps } from "@tscircuit/props";
|
|
389
391
|
|
|
392
|
+
// lib/components/base-components/PrimitiveComponent/select-net-by-literal-selector.ts
|
|
393
|
+
var netsBySelectorByNets = /* @__PURE__ */ new WeakMap();
|
|
394
|
+
var selectNetByLiteralSelector = (nets, selector) => {
|
|
395
|
+
let netsBySelector = netsBySelectorByNets.get(nets);
|
|
396
|
+
if (!netsBySelector) {
|
|
397
|
+
netsBySelector = /* @__PURE__ */ new Map();
|
|
398
|
+
for (const net of nets) {
|
|
399
|
+
for (const alias of net.getNameAndAliases().join(" ").split(/\s+/)) {
|
|
400
|
+
const netSelector = `net.${alias}`;
|
|
401
|
+
if (!netsBySelector.has(netSelector))
|
|
402
|
+
netsBySelector.set(netSelector, net);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
netsBySelectorByNets.set(nets, netsBySelector);
|
|
406
|
+
}
|
|
407
|
+
return netsBySelector.get(selector) ?? null;
|
|
408
|
+
};
|
|
409
|
+
|
|
390
410
|
// lib/components/base-components/PrimitiveComponent/PrimitiveComponent.ts
|
|
391
411
|
import { selectAll, selectOne } from "css-select";
|
|
392
412
|
import "debug";
|
|
@@ -446,6 +466,7 @@ var orderedRenderPhases = [
|
|
|
446
466
|
"PcbLayout",
|
|
447
467
|
"PcbBoardAutoSize",
|
|
448
468
|
"PanelLayout",
|
|
469
|
+
"PcbFlexRender",
|
|
449
470
|
"PcbAutoplaceBreakoutPoints",
|
|
450
471
|
"PcbTraceHintRender",
|
|
451
472
|
"PcbManualTraceRender",
|
|
@@ -2351,6 +2372,14 @@ var PrimitiveComponent2 = class extends Renderable {
|
|
|
2351
2372
|
}
|
|
2352
2373
|
_cachedSelectOneQueries = /* @__PURE__ */ new Map();
|
|
2353
2374
|
selectOne(selectorRaw, options) {
|
|
2375
|
+
if (/^net\.[A-Za-z_][A-Za-z0-9_]*$/.test(selectorRaw)) {
|
|
2376
|
+
if (options?.port || options?.type && options.type !== "net")
|
|
2377
|
+
return null;
|
|
2378
|
+
return selectNetByLiteralSelector(
|
|
2379
|
+
this.selectAll("net"),
|
|
2380
|
+
selectorRaw
|
|
2381
|
+
);
|
|
2382
|
+
}
|
|
2354
2383
|
if (this._cachedSelectOneQueries.has(selectorRaw)) {
|
|
2355
2384
|
return this._cachedSelectOneQueries.get(selectorRaw);
|
|
2356
2385
|
}
|
|
@@ -2715,24 +2744,6 @@ var Net = class extends PrimitiveComponent2 {
|
|
|
2715
2744
|
};
|
|
2716
2745
|
|
|
2717
2746
|
// lib/utils/components/createNetsFromProps.ts
|
|
2718
|
-
var netSelectorsByNets = /* @__PURE__ */ new WeakMap();
|
|
2719
|
-
var hasNet = (subcircuit, selector) => {
|
|
2720
|
-
if (!/^net\.[A-Za-z_][A-Za-z0-9_]*$/.test(selector)) {
|
|
2721
|
-
return Boolean(subcircuit.selectOne(selector));
|
|
2722
|
-
}
|
|
2723
|
-
const nets = subcircuit.selectAll("net");
|
|
2724
|
-
let netSelectors = netSelectorsByNets.get(nets);
|
|
2725
|
-
if (!netSelectors) {
|
|
2726
|
-
netSelectors = /* @__PURE__ */ new Set();
|
|
2727
|
-
for (const net of nets) {
|
|
2728
|
-
for (const alias of net.getNameAndAliases().join(" ").split(/\s+/)) {
|
|
2729
|
-
netSelectors.add(`net.${alias}`);
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
netSelectorsByNets.set(nets, netSelectors);
|
|
2733
|
-
}
|
|
2734
|
-
return netSelectors.has(selector);
|
|
2735
|
-
};
|
|
2736
2747
|
var createNetsFromProps = (component, props) => {
|
|
2737
2748
|
for (const prop of props) {
|
|
2738
2749
|
if (typeof prop === "string" && prop.startsWith("net.")) {
|
|
@@ -2753,7 +2764,7 @@ var createNetsFromProps = (component, props) => {
|
|
|
2753
2764
|
);
|
|
2754
2765
|
}
|
|
2755
2766
|
const subcircuit = component.getSubcircuit();
|
|
2756
|
-
if (!
|
|
2767
|
+
if (!subcircuit.selectOne(prop)) {
|
|
2757
2768
|
const net = new Net({
|
|
2758
2769
|
name: prop.split("net.")[1]
|
|
2759
2770
|
});
|
|
@@ -63763,7 +63774,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
63763
63774
|
var package_default = {
|
|
63764
63775
|
name: "@tscircuit/core",
|
|
63765
63776
|
type: "module",
|
|
63766
|
-
version: "0.0.
|
|
63777
|
+
version: "0.0.1964",
|
|
63767
63778
|
types: "dist/index.d.ts",
|
|
63768
63779
|
main: "dist/index.js",
|
|
63769
63780
|
module: "dist/index.js",
|
|
@@ -63817,7 +63828,7 @@ var package_default = {
|
|
|
63817
63828
|
"@tscircuit/math-utils": "^0.0.36",
|
|
63818
63829
|
"@tscircuit/miniflex": "^0.0.4",
|
|
63819
63830
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
63820
|
-
"@tscircuit/props": "^0.0.
|
|
63831
|
+
"@tscircuit/props": "^0.0.666",
|
|
63821
63832
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
63822
63833
|
"@tscircuit/schematic-trace-solver": "^0.0.205",
|
|
63823
63834
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -63833,10 +63844,10 @@ var package_default = {
|
|
|
63833
63844
|
"bun-match-svg": "0.0.12",
|
|
63834
63845
|
"calculate-elbow": "^0.0.12",
|
|
63835
63846
|
"chokidar-cli": "^3.0.0",
|
|
63836
|
-
"circuit-json": "^0.0.
|
|
63847
|
+
"circuit-json": "^0.0.499",
|
|
63837
63848
|
"circuit-json-to-bpc": "^0.0.13",
|
|
63838
63849
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
63839
|
-
"circuit-json-to-gltf": "^0.0.
|
|
63850
|
+
"circuit-json-to-gltf": "^0.0.133",
|
|
63840
63851
|
"circuit-json-to-spice": "^0.0.45",
|
|
63841
63852
|
"circuit-to-svg": "^0.0.430",
|
|
63842
63853
|
concurrently: "^9.1.2",
|
|
@@ -63896,8 +63907,8 @@ var package_default = {
|
|
|
63896
63907
|
},
|
|
63897
63908
|
overrides: {
|
|
63898
63909
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
63899
|
-
"@tscircuit/props": "^0.0.
|
|
63900
|
-
"circuit-json": "^0.0.
|
|
63910
|
+
"@tscircuit/props": "^0.0.666",
|
|
63911
|
+
"circuit-json": "^0.0.499"
|
|
63901
63912
|
}
|
|
63902
63913
|
};
|
|
63903
63914
|
|
|
@@ -78200,6 +78211,102 @@ var SpiceModel = class extends PrimitiveComponent2 {
|
|
|
78200
78211
|
}
|
|
78201
78212
|
};
|
|
78202
78213
|
|
|
78214
|
+
// lib/components/primitive-components/PcbBend.ts
|
|
78215
|
+
import { pcbBendProps } from "@tscircuit/props";
|
|
78216
|
+
import { applyToPoint as applyToPoint37 } from "transformation-matrix";
|
|
78217
|
+
|
|
78218
|
+
// lib/components/primitive-components/getPcbFlexBoardTransform.ts
|
|
78219
|
+
import { compose as compose18, translate as translate18 } from "transformation-matrix";
|
|
78220
|
+
function getPcbFlexBoardTransform(primitive) {
|
|
78221
|
+
const boardId = primitive._getBoard()?.pcb_board_id;
|
|
78222
|
+
const board = boardId ? primitive.root.db.pcb_board.get(boardId) : null;
|
|
78223
|
+
if (!board)
|
|
78224
|
+
throw new Error(`${primitive.componentName} must be inside a board`);
|
|
78225
|
+
const transform = compose18(
|
|
78226
|
+
translate18(-board.center.x, -board.center.y),
|
|
78227
|
+
primitive._computePcbGlobalTransformBeforeLayout()
|
|
78228
|
+
);
|
|
78229
|
+
return { board, transform };
|
|
78230
|
+
}
|
|
78231
|
+
|
|
78232
|
+
// lib/components/primitive-components/PcbBend.ts
|
|
78233
|
+
var PcbBend = class extends PrimitiveComponent2 {
|
|
78234
|
+
pcb_bend_id = null;
|
|
78235
|
+
get config() {
|
|
78236
|
+
return { componentName: "PcbBend", zodProps: pcbBendProps };
|
|
78237
|
+
}
|
|
78238
|
+
// Resolve board-relative geometry after board autosizing and panel placement.
|
|
78239
|
+
doInitialPcbFlexRender() {
|
|
78240
|
+
if (this.root?.pcbDisabled) return;
|
|
78241
|
+
const { db } = this.root;
|
|
78242
|
+
const props = this._parsedProps;
|
|
78243
|
+
const { board, transform } = getPcbFlexBoardTransform(this);
|
|
78244
|
+
this.pcb_bend_id = db.pcb_bend.insert({
|
|
78245
|
+
pcb_board_id: board.pcb_board_id,
|
|
78246
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
|
|
78247
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
78248
|
+
name: props.name,
|
|
78249
|
+
start: applyToPoint37(transform, { x: props.x1, y: props.y1 }),
|
|
78250
|
+
end: applyToPoint37(transform, { x: props.x2, y: props.y2 }),
|
|
78251
|
+
bend_angle: props.bendAngle,
|
|
78252
|
+
bend_radius: props.bendRadius,
|
|
78253
|
+
bend_side: props.bendSide
|
|
78254
|
+
}).pcb_bend_id;
|
|
78255
|
+
}
|
|
78256
|
+
doRemovePcbFlexRender() {
|
|
78257
|
+
if (!this.pcb_bend_id) return;
|
|
78258
|
+
this.root.db.pcb_bend.delete(this.pcb_bend_id);
|
|
78259
|
+
this.pcb_bend_id = null;
|
|
78260
|
+
}
|
|
78261
|
+
};
|
|
78262
|
+
|
|
78263
|
+
// lib/components/primitive-components/PcbStiffener.ts
|
|
78264
|
+
import { pcbStiffenerProps } from "@tscircuit/props";
|
|
78265
|
+
import { applyToPoint as applyToPoint38, decomposeTSR as decomposeTSR10 } from "transformation-matrix";
|
|
78266
|
+
var PcbStiffener = class extends PrimitiveComponent2 {
|
|
78267
|
+
pcb_stiffener_id = null;
|
|
78268
|
+
get config() {
|
|
78269
|
+
return { componentName: "PcbStiffener", zodProps: pcbStiffenerProps };
|
|
78270
|
+
}
|
|
78271
|
+
doInitialPcbFlexRender() {
|
|
78272
|
+
if (this.root?.pcbDisabled) return;
|
|
78273
|
+
const { db } = this.root;
|
|
78274
|
+
const props = this._parsedProps;
|
|
78275
|
+
const { board, transform } = getPcbFlexBoardTransform(this);
|
|
78276
|
+
const base = {
|
|
78277
|
+
pcb_board_id: board.pcb_board_id,
|
|
78278
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0,
|
|
78279
|
+
subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
|
|
78280
|
+
name: props.name,
|
|
78281
|
+
layer: props.layer,
|
|
78282
|
+
material: props.material,
|
|
78283
|
+
thickness: props.thickness,
|
|
78284
|
+
adhesive_thickness: props.adhesiveThickness
|
|
78285
|
+
};
|
|
78286
|
+
const geometry = props.shape === "rect" ? {
|
|
78287
|
+
shape: "rect",
|
|
78288
|
+
center: applyToPoint38(transform, { x: 0, y: 0 }),
|
|
78289
|
+
rotation: decomposeTSR10(transform).rotation.angle * 180 / Math.PI,
|
|
78290
|
+
width: props.width,
|
|
78291
|
+
height: props.height
|
|
78292
|
+
} : {
|
|
78293
|
+
shape: "polygon",
|
|
78294
|
+
outline: props.outline.map(
|
|
78295
|
+
(point6) => applyToPoint38(transform, point6)
|
|
78296
|
+
)
|
|
78297
|
+
};
|
|
78298
|
+
this.pcb_stiffener_id = db.pcb_stiffener.insert({
|
|
78299
|
+
...base,
|
|
78300
|
+
...geometry
|
|
78301
|
+
}).pcb_stiffener_id;
|
|
78302
|
+
}
|
|
78303
|
+
doRemovePcbFlexRender() {
|
|
78304
|
+
if (!this.pcb_stiffener_id) return;
|
|
78305
|
+
this.root.db.pcb_stiffener.delete(this.pcb_stiffener_id);
|
|
78306
|
+
this.pcb_stiffener_id = null;
|
|
78307
|
+
}
|
|
78308
|
+
};
|
|
78309
|
+
|
|
78203
78310
|
// lib/namespaced-elements/create-namespaced-element.ts
|
|
78204
78311
|
import { createElement } from "react";
|
|
78205
78312
|
var createNamespacedElement = (hostType) => {
|
|
@@ -78551,11 +78658,13 @@ export {
|
|
|
78551
78658
|
NormalComponent,
|
|
78552
78659
|
OpAmp,
|
|
78553
78660
|
Panel,
|
|
78661
|
+
PcbBend,
|
|
78554
78662
|
PcbNoteDimension,
|
|
78555
78663
|
PcbNoteLine,
|
|
78556
78664
|
PcbNotePath,
|
|
78557
78665
|
PcbNoteRect,
|
|
78558
78666
|
PcbNoteText,
|
|
78667
|
+
PcbStiffener,
|
|
78559
78668
|
PcbTrace,
|
|
78560
78669
|
PcbVia,
|
|
78561
78670
|
PinHeader,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1965",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@tscircuit/math-utils": "^0.0.36",
|
|
56
56
|
"@tscircuit/miniflex": "^0.0.4",
|
|
57
57
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
58
|
-
"@tscircuit/props": "^0.0.
|
|
58
|
+
"@tscircuit/props": "^0.0.666",
|
|
59
59
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
60
60
|
"@tscircuit/schematic-trace-solver": "^0.0.205",
|
|
61
61
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"bun-match-svg": "0.0.12",
|
|
72
72
|
"calculate-elbow": "^0.0.12",
|
|
73
73
|
"chokidar-cli": "^3.0.0",
|
|
74
|
-
"circuit-json": "^0.0.
|
|
74
|
+
"circuit-json": "^0.0.499",
|
|
75
75
|
"circuit-json-to-bpc": "^0.0.13",
|
|
76
76
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
77
|
-
"circuit-json-to-gltf": "^0.0.
|
|
77
|
+
"circuit-json-to-gltf": "^0.0.133",
|
|
78
78
|
"circuit-json-to-spice": "^0.0.45",
|
|
79
79
|
"circuit-to-svg": "^0.0.430",
|
|
80
80
|
"concurrently": "^9.1.2",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
},
|
|
135
135
|
"overrides": {
|
|
136
136
|
"@tscircuit/circuit-json-util": "^0.0.116",
|
|
137
|
-
"@tscircuit/props": "^0.0.
|
|
138
|
-
"circuit-json": "^0.0.
|
|
137
|
+
"@tscircuit/props": "^0.0.666",
|
|
138
|
+
"circuit-json": "^0.0.499"
|
|
139
139
|
}
|
|
140
140
|
}
|