@tscircuit/core 0.0.1009 → 0.0.1010
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 +168 -2
- package/dist/index.js +65 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as circuit_json from 'circuit-json';
|
|
2
2
|
import { PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, LayerRef, AnyCircuitElement, Size, AnySourceComponent, PcbTraceRoutePoint, PcbTrace as PcbTrace$1, PcbVia, SchematicPort, SchematicComponent, RouteHintPoint, CircuitJson } from 'circuit-json';
|
|
3
3
|
import * as _tscircuit_props from '@tscircuit/props';
|
|
4
|
-
import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, subpanelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, resistorProps, constraintProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, courtyardCircleProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
4
|
+
import { PlatformConfig, subcircuitGroupProps, AutorouterConfig, traceProps, SupplierPartNumbers, CadModelProp, SchematicPortArrangement, groupProps, boardProps, subpanelProps, capacitorProps, chipProps, pinoutProps, diodeProps, fuseProps, jumperProps, interconnectProps, solderjumperProps, ledProps, powerSourceProps, voltageSourceProps, currentSourceProps, resistorProps, constraintProps, fabricationNoteRectProps, fabricationNotePathProps, fabricationNoteTextProps, fabricationNoteDimensionProps, pcbNoteLineProps, pcbNoteRectProps, pcbNoteTextProps, pcbNotePathProps, pcbNoteDimensionProps, footprintProps, subcircuitProps, breakoutProps, breakoutPointProps, holeProps, pcbKeepoutProps, netLabelProps, cadmodelProps, cadassemblyProps, platedHoleProps, courtyardCircleProps, courtyardRectProps, silkscreenCircleProps, silkscreenPathProps, silkscreenRectProps, silkscreenTextProps, silkscreenLineProps, smtPadProps, fiducialProps, traceHintProps, viaProps, copperPourProps, copperTextProps, cutoutProps, batteryProps, pinHeaderProps, resonatorProps, inductorProps, potentiometerProps, pushButtonProps, crystalProps, transistorProps, mosfetProps, opampProps, OpAmpPinLabels, switchProps, SwitchProps, testpointProps, schematicTextProps, schematicLineProps, schematicRectProps, schematicArcProps, schematicCircleProps, schematicPathProps, schematicBoxProps, schematicTableProps, schematicRowProps, schematicCellProps, symbolProps, analogSimulationProps, voltageProbeProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactElement, DetailedHTMLProps, SVGProps } from 'react';
|
|
7
7
|
export { createElement } from 'react';
|
|
@@ -67027,6 +67027,171 @@ declare class CourtyardCircle extends PrimitiveComponent<typeof courtyardCircleP
|
|
|
67027
67027
|
}): void;
|
|
67028
67028
|
}
|
|
67029
67029
|
|
|
67030
|
+
declare class CourtyardRect extends PrimitiveComponent<typeof courtyardRectProps> {
|
|
67031
|
+
pcb_courtyard_rect_id: string | null;
|
|
67032
|
+
isPcbPrimitive: boolean;
|
|
67033
|
+
get config(): {
|
|
67034
|
+
componentName: string;
|
|
67035
|
+
zodProps: zod.ZodObject<Omit<{
|
|
67036
|
+
pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67037
|
+
pcbY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67038
|
+
pcbLeftEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67039
|
+
pcbRightEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67040
|
+
pcbTopEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67041
|
+
pcbBottomEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
67042
|
+
pcbOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67043
|
+
pcbOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67044
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67045
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
67046
|
+
pcbPositionMode: zod.ZodOptional<zod.ZodEnum<["relative_to_group_anchor", "auto", "relative_to_board_anchor", "relative_to_component_anchor"]>>;
|
|
67047
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
67048
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
67049
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67050
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
67051
|
+
}, {
|
|
67052
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
67053
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
67054
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
67055
|
+
}>>;
|
|
67056
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67057
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67058
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67059
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67060
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67061
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67062
|
+
pcbStyle: zod.ZodOptional<zod.ZodObject<{
|
|
67063
|
+
silkscreenFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67064
|
+
viaPadDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67065
|
+
viaHoleDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67066
|
+
silkscreenTextPosition: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["centered", "outside", "none"]>, zod.ZodObject<{
|
|
67067
|
+
offsetX: zod.ZodNumber;
|
|
67068
|
+
offsetY: zod.ZodNumber;
|
|
67069
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67070
|
+
offsetX: number;
|
|
67071
|
+
offsetY: number;
|
|
67072
|
+
}, {
|
|
67073
|
+
offsetX: number;
|
|
67074
|
+
offsetY: number;
|
|
67075
|
+
}>]>>;
|
|
67076
|
+
silkscreenTextVisibility: zod.ZodOptional<zod.ZodEnum<["hidden", "visible", "inherit"]>>;
|
|
67077
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67078
|
+
silkscreenFontSize?: number | undefined;
|
|
67079
|
+
viaPadDiameter?: number | undefined;
|
|
67080
|
+
viaHoleDiameter?: number | undefined;
|
|
67081
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
67082
|
+
offsetX: number;
|
|
67083
|
+
offsetY: number;
|
|
67084
|
+
} | undefined;
|
|
67085
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
67086
|
+
}, {
|
|
67087
|
+
silkscreenFontSize?: string | number | undefined;
|
|
67088
|
+
viaPadDiameter?: string | number | undefined;
|
|
67089
|
+
viaHoleDiameter?: string | number | undefined;
|
|
67090
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
67091
|
+
offsetX: number;
|
|
67092
|
+
offsetY: number;
|
|
67093
|
+
} | undefined;
|
|
67094
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
67095
|
+
}>>;
|
|
67096
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
67097
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
67098
|
+
}, "pcbRotation"> & {
|
|
67099
|
+
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
67100
|
+
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
67101
|
+
strokeWidth: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
67102
|
+
isFilled: zod.ZodOptional<zod.ZodBoolean>;
|
|
67103
|
+
hasStroke: zod.ZodOptional<zod.ZodBoolean>;
|
|
67104
|
+
isStrokeDashed: zod.ZodOptional<zod.ZodBoolean>;
|
|
67105
|
+
color: zod.ZodOptional<zod.ZodString>;
|
|
67106
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67107
|
+
width: number;
|
|
67108
|
+
height: number;
|
|
67109
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
67110
|
+
pcbX?: string | number | undefined;
|
|
67111
|
+
pcbY?: string | number | undefined;
|
|
67112
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
67113
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
67114
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
67115
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
67116
|
+
pcbOffsetX?: number | undefined;
|
|
67117
|
+
pcbOffsetY?: number | undefined;
|
|
67118
|
+
pcbPositionAnchor?: string | undefined;
|
|
67119
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
67120
|
+
pcbMarginTop?: number | undefined;
|
|
67121
|
+
pcbMarginRight?: number | undefined;
|
|
67122
|
+
pcbMarginBottom?: number | undefined;
|
|
67123
|
+
pcbMarginLeft?: number | undefined;
|
|
67124
|
+
pcbMarginX?: number | undefined;
|
|
67125
|
+
pcbMarginY?: number | undefined;
|
|
67126
|
+
pcbStyle?: {
|
|
67127
|
+
silkscreenFontSize?: number | undefined;
|
|
67128
|
+
viaPadDiameter?: number | undefined;
|
|
67129
|
+
viaHoleDiameter?: number | undefined;
|
|
67130
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
67131
|
+
offsetX: number;
|
|
67132
|
+
offsetY: number;
|
|
67133
|
+
} | undefined;
|
|
67134
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
67135
|
+
} | undefined;
|
|
67136
|
+
pcbRelative?: boolean | undefined;
|
|
67137
|
+
relative?: boolean | undefined;
|
|
67138
|
+
strokeWidth?: number | undefined;
|
|
67139
|
+
color?: string | undefined;
|
|
67140
|
+
isFilled?: boolean | undefined;
|
|
67141
|
+
hasStroke?: boolean | undefined;
|
|
67142
|
+
isStrokeDashed?: boolean | undefined;
|
|
67143
|
+
}, {
|
|
67144
|
+
width: string | number;
|
|
67145
|
+
height: string | number;
|
|
67146
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
67147
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
67148
|
+
} | undefined;
|
|
67149
|
+
pcbX?: string | number | undefined;
|
|
67150
|
+
pcbY?: string | number | undefined;
|
|
67151
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
67152
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
67153
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
67154
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
67155
|
+
pcbOffsetX?: string | number | undefined;
|
|
67156
|
+
pcbOffsetY?: string | number | undefined;
|
|
67157
|
+
pcbPositionAnchor?: string | undefined;
|
|
67158
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
67159
|
+
pcbMarginTop?: string | number | undefined;
|
|
67160
|
+
pcbMarginRight?: string | number | undefined;
|
|
67161
|
+
pcbMarginBottom?: string | number | undefined;
|
|
67162
|
+
pcbMarginLeft?: string | number | undefined;
|
|
67163
|
+
pcbMarginX?: string | number | undefined;
|
|
67164
|
+
pcbMarginY?: string | number | undefined;
|
|
67165
|
+
pcbStyle?: {
|
|
67166
|
+
silkscreenFontSize?: string | number | undefined;
|
|
67167
|
+
viaPadDiameter?: string | number | undefined;
|
|
67168
|
+
viaHoleDiameter?: string | number | undefined;
|
|
67169
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
67170
|
+
offsetX: number;
|
|
67171
|
+
offsetY: number;
|
|
67172
|
+
} | undefined;
|
|
67173
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
67174
|
+
} | undefined;
|
|
67175
|
+
pcbRelative?: boolean | undefined;
|
|
67176
|
+
relative?: boolean | undefined;
|
|
67177
|
+
strokeWidth?: string | number | undefined;
|
|
67178
|
+
color?: string | undefined;
|
|
67179
|
+
isFilled?: boolean | undefined;
|
|
67180
|
+
hasStroke?: boolean | undefined;
|
|
67181
|
+
isStrokeDashed?: boolean | undefined;
|
|
67182
|
+
}>;
|
|
67183
|
+
};
|
|
67184
|
+
doInitialPcbPrimitiveRender(): void;
|
|
67185
|
+
getPcbSize(): {
|
|
67186
|
+
width: number;
|
|
67187
|
+
height: number;
|
|
67188
|
+
};
|
|
67189
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
67190
|
+
deltaX: number;
|
|
67191
|
+
deltaY: number;
|
|
67192
|
+
}): void;
|
|
67193
|
+
}
|
|
67194
|
+
|
|
67030
67195
|
declare class SilkscreenCircle extends PrimitiveComponent<typeof silkscreenCircleProps> {
|
|
67031
67196
|
pcb_silkscreen_circle_id: string | null;
|
|
67032
67197
|
isPcbPrimitive: boolean;
|
|
@@ -131251,6 +131416,7 @@ interface TscircuitElements {
|
|
|
131251
131416
|
silkscreencircle: _tscircuit_props.SilkscreenCircleProps;
|
|
131252
131417
|
tracehint: _tscircuit_props.TraceHintProps;
|
|
131253
131418
|
courtyardcircle: _tscircuit_props.CourtyardCircleProps;
|
|
131419
|
+
courtyardrect: _tscircuit_props.CourtyardRectProps;
|
|
131254
131420
|
pcbtrace: _tscircuit_props.PcbTraceProps;
|
|
131255
131421
|
fabricationnoterect: _tscircuit_props.FabricationNoteRectProps;
|
|
131256
131422
|
pcbnoteline: _tscircuit_props.PcbNoteLineProps;
|
|
@@ -131293,4 +131459,4 @@ declare module "react/jsx-runtime" {
|
|
|
131293
131459
|
}
|
|
131294
131460
|
}
|
|
131295
131461
|
|
|
131296
|
-
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, CopperText, CourtyardCircle, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, 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, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
131462
|
+
export { AnalogSimulation, type AsyncEffect, type AutorouterCompleteEvent, type AutorouterErrorEvent, type AutorouterEvent, type AutorouterProgressEvent, type AutoroutingEndEvent, type AutoroutingErrorEvent, type AutoroutingProgressEvent, type AutoroutingStartEvent, Battery, Board, Breakout, BreakoutPoint, CadAssembly, CadModel, Capacitor, Chip, Circuit, type ComponentWithPins, Constraint, CopperPour, CopperText, CourtyardCircle, CourtyardRect, Crystal, CurrentSource, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Fiducial, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Interconnect, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, OpAmp, type PackingEndEvent, type PackingErrorEvent, type PackingStartEvent, Panel, PcbNoteDimension, PcbNoteLine, PcbNotePath, PcbNoteRect, PcbNoteText, PcbTrace, 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, SchematicLine, SchematicPath, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, type SolverName, type SolverStartedEvent, Subcircuit, Subpanel, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, renderPhaseIndexMap, resolveStaticFileImport, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __export(components_exports, {
|
|
|
20
20
|
CopperPour: () => CopperPour,
|
|
21
21
|
CopperText: () => CopperText,
|
|
22
22
|
CourtyardCircle: () => CourtyardCircle,
|
|
23
|
+
CourtyardRect: () => CourtyardRect,
|
|
23
24
|
Crystal: () => Crystal,
|
|
24
25
|
CurrentSource: () => CurrentSource,
|
|
25
26
|
Cutout: () => Cutout,
|
|
@@ -19406,6 +19407,68 @@ var CourtyardCircle = class extends PrimitiveComponent2 {
|
|
|
19406
19407
|
}
|
|
19407
19408
|
};
|
|
19408
19409
|
|
|
19410
|
+
// lib/components/primitive-components/CourtyardRect.ts
|
|
19411
|
+
import { courtyardRectProps } from "@tscircuit/props";
|
|
19412
|
+
var CourtyardRect = class extends PrimitiveComponent2 {
|
|
19413
|
+
pcb_courtyard_rect_id = null;
|
|
19414
|
+
isPcbPrimitive = true;
|
|
19415
|
+
get config() {
|
|
19416
|
+
return {
|
|
19417
|
+
componentName: "CourtyardRect",
|
|
19418
|
+
zodProps: courtyardRectProps
|
|
19419
|
+
};
|
|
19420
|
+
}
|
|
19421
|
+
doInitialPcbPrimitiveRender() {
|
|
19422
|
+
if (this.root?.pcbDisabled) return;
|
|
19423
|
+
const { db } = this.root;
|
|
19424
|
+
const { _parsedProps: props } = this;
|
|
19425
|
+
const position = this._getGlobalPcbPositionBeforeLayout();
|
|
19426
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
19427
|
+
const layer = maybeFlipLayer(props.layer ?? "top");
|
|
19428
|
+
if (layer !== "top" && layer !== "bottom") {
|
|
19429
|
+
throw new Error(
|
|
19430
|
+
`Invalid layer "${layer}" for CourtyardRect. Must be "top" or "bottom".`
|
|
19431
|
+
);
|
|
19432
|
+
}
|
|
19433
|
+
const subcircuit = this.getSubcircuit();
|
|
19434
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id;
|
|
19435
|
+
const pcb_courtyard_rect = db.pcb_courtyard_rect.insert({
|
|
19436
|
+
pcb_component_id,
|
|
19437
|
+
layer,
|
|
19438
|
+
center: {
|
|
19439
|
+
x: position.x,
|
|
19440
|
+
y: position.y
|
|
19441
|
+
},
|
|
19442
|
+
width: props.width,
|
|
19443
|
+
height: props.height,
|
|
19444
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
19445
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
19446
|
+
});
|
|
19447
|
+
this.pcb_courtyard_rect_id = pcb_courtyard_rect.pcb_courtyard_rect_id;
|
|
19448
|
+
}
|
|
19449
|
+
getPcbSize() {
|
|
19450
|
+
const { _parsedProps: props } = this;
|
|
19451
|
+
return { width: props.width, height: props.height };
|
|
19452
|
+
}
|
|
19453
|
+
_moveCircuitJsonElements({
|
|
19454
|
+
deltaX,
|
|
19455
|
+
deltaY
|
|
19456
|
+
}) {
|
|
19457
|
+
if (this.root?.pcbDisabled) return;
|
|
19458
|
+
const { db } = this.root;
|
|
19459
|
+
if (!this.pcb_courtyard_rect_id) return;
|
|
19460
|
+
const rect = db.pcb_courtyard_rect.get(this.pcb_courtyard_rect_id);
|
|
19461
|
+
if (rect) {
|
|
19462
|
+
db.pcb_courtyard_rect.update(this.pcb_courtyard_rect_id, {
|
|
19463
|
+
center: {
|
|
19464
|
+
x: rect.center.x + deltaX,
|
|
19465
|
+
y: rect.center.y + deltaY
|
|
19466
|
+
}
|
|
19467
|
+
});
|
|
19468
|
+
}
|
|
19469
|
+
}
|
|
19470
|
+
};
|
|
19471
|
+
|
|
19409
19472
|
// lib/components/primitive-components/SilkscreenCircle.ts
|
|
19410
19473
|
import { silkscreenCircleProps } from "@tscircuit/props";
|
|
19411
19474
|
var SilkscreenCircle = class extends PrimitiveComponent2 {
|
|
@@ -21851,7 +21914,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21851
21914
|
var package_default = {
|
|
21852
21915
|
name: "@tscircuit/core",
|
|
21853
21916
|
type: "module",
|
|
21854
|
-
version: "0.0.
|
|
21917
|
+
version: "0.0.1009",
|
|
21855
21918
|
types: "dist/index.d.ts",
|
|
21856
21919
|
main: "dist/index.js",
|
|
21857
21920
|
module: "dist/index.js",
|
|
@@ -22441,6 +22504,7 @@ export {
|
|
|
22441
22504
|
CopperPour,
|
|
22442
22505
|
CopperText,
|
|
22443
22506
|
CourtyardCircle,
|
|
22507
|
+
CourtyardRect,
|
|
22444
22508
|
Crystal,
|
|
22445
22509
|
CurrentSource,
|
|
22446
22510
|
Cutout,
|