@tscircuit/core 0.0.1007 → 0.0.1008
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 +150 -2
- package/dist/index.js +67 -3
- package/package.json +3 -3
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, 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, 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';
|
|
@@ -66880,6 +66880,153 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
|
|
|
66880
66880
|
}): void;
|
|
66881
66881
|
}
|
|
66882
66882
|
|
|
66883
|
+
declare class CourtyardCircle extends PrimitiveComponent<typeof courtyardCircleProps> {
|
|
66884
|
+
pcb_courtyard_circle_id: string | null;
|
|
66885
|
+
isPcbPrimitive: boolean;
|
|
66886
|
+
get config(): {
|
|
66887
|
+
componentName: string;
|
|
66888
|
+
zodProps: zod.ZodObject<Omit<{
|
|
66889
|
+
pcbX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66890
|
+
pcbY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66891
|
+
pcbLeftEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66892
|
+
pcbRightEdgeX: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66893
|
+
pcbTopEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66894
|
+
pcbBottomEdgeY: zod.ZodOptional<zod.ZodUnion<[zod.ZodString, zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>]>>;
|
|
66895
|
+
pcbOffsetX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66896
|
+
pcbOffsetY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66897
|
+
pcbRotation: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66898
|
+
pcbPositionAnchor: zod.ZodOptional<zod.ZodString>;
|
|
66899
|
+
pcbPositionMode: zod.ZodOptional<zod.ZodEnum<["relative_to_group_anchor", "auto", "relative_to_board_anchor", "relative_to_component_anchor"]>>;
|
|
66900
|
+
layer: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>, zod.ZodObject<{
|
|
66901
|
+
name: zod.ZodEnum<["top", "bottom", "inner1", "inner2", "inner3", "inner4", "inner5", "inner6"]>;
|
|
66902
|
+
}, "strip", zod.ZodTypeAny, {
|
|
66903
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
66904
|
+
}, {
|
|
66905
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
66906
|
+
}>]>, "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6", "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
66907
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
66908
|
+
}>>;
|
|
66909
|
+
pcbMarginTop: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66910
|
+
pcbMarginRight: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66911
|
+
pcbMarginBottom: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66912
|
+
pcbMarginLeft: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66913
|
+
pcbMarginX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66914
|
+
pcbMarginY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66915
|
+
pcbStyle: zod.ZodOptional<zod.ZodObject<{
|
|
66916
|
+
silkscreenFontSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66917
|
+
viaPadDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66918
|
+
viaHoleDiameter: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
66919
|
+
silkscreenTextPosition: zod.ZodOptional<zod.ZodUnion<[zod.ZodEnum<["centered", "outside", "none"]>, zod.ZodObject<{
|
|
66920
|
+
offsetX: zod.ZodNumber;
|
|
66921
|
+
offsetY: zod.ZodNumber;
|
|
66922
|
+
}, "strip", zod.ZodTypeAny, {
|
|
66923
|
+
offsetX: number;
|
|
66924
|
+
offsetY: number;
|
|
66925
|
+
}, {
|
|
66926
|
+
offsetX: number;
|
|
66927
|
+
offsetY: number;
|
|
66928
|
+
}>]>>;
|
|
66929
|
+
silkscreenTextVisibility: zod.ZodOptional<zod.ZodEnum<["hidden", "visible", "inherit"]>>;
|
|
66930
|
+
}, "strip", zod.ZodTypeAny, {
|
|
66931
|
+
silkscreenFontSize?: number | undefined;
|
|
66932
|
+
viaPadDiameter?: number | undefined;
|
|
66933
|
+
viaHoleDiameter?: number | undefined;
|
|
66934
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
66935
|
+
offsetX: number;
|
|
66936
|
+
offsetY: number;
|
|
66937
|
+
} | undefined;
|
|
66938
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
66939
|
+
}, {
|
|
66940
|
+
silkscreenFontSize?: string | number | undefined;
|
|
66941
|
+
viaPadDiameter?: string | number | undefined;
|
|
66942
|
+
viaHoleDiameter?: string | number | undefined;
|
|
66943
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
66944
|
+
offsetX: number;
|
|
66945
|
+
offsetY: number;
|
|
66946
|
+
} | undefined;
|
|
66947
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
66948
|
+
}>>;
|
|
66949
|
+
pcbRelative: zod.ZodOptional<zod.ZodBoolean>;
|
|
66950
|
+
relative: zod.ZodOptional<zod.ZodBoolean>;
|
|
66951
|
+
}, "pcbRotation"> & {
|
|
66952
|
+
radius: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
66953
|
+
}, "strip", zod.ZodTypeAny, {
|
|
66954
|
+
radius: number;
|
|
66955
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
|
|
66956
|
+
pcbX?: string | number | undefined;
|
|
66957
|
+
pcbY?: string | number | undefined;
|
|
66958
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
66959
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
66960
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
66961
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
66962
|
+
pcbOffsetX?: number | undefined;
|
|
66963
|
+
pcbOffsetY?: number | undefined;
|
|
66964
|
+
pcbPositionAnchor?: string | undefined;
|
|
66965
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
66966
|
+
pcbMarginTop?: number | undefined;
|
|
66967
|
+
pcbMarginRight?: number | undefined;
|
|
66968
|
+
pcbMarginBottom?: number | undefined;
|
|
66969
|
+
pcbMarginLeft?: number | undefined;
|
|
66970
|
+
pcbMarginX?: number | undefined;
|
|
66971
|
+
pcbMarginY?: number | undefined;
|
|
66972
|
+
pcbStyle?: {
|
|
66973
|
+
silkscreenFontSize?: number | undefined;
|
|
66974
|
+
viaPadDiameter?: number | undefined;
|
|
66975
|
+
viaHoleDiameter?: number | undefined;
|
|
66976
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
66977
|
+
offsetX: number;
|
|
66978
|
+
offsetY: number;
|
|
66979
|
+
} | undefined;
|
|
66980
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
66981
|
+
} | undefined;
|
|
66982
|
+
pcbRelative?: boolean | undefined;
|
|
66983
|
+
relative?: boolean | undefined;
|
|
66984
|
+
}, {
|
|
66985
|
+
radius: string | number;
|
|
66986
|
+
layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | {
|
|
66987
|
+
name: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
|
|
66988
|
+
} | undefined;
|
|
66989
|
+
pcbX?: string | number | undefined;
|
|
66990
|
+
pcbY?: string | number | undefined;
|
|
66991
|
+
pcbLeftEdgeX?: string | number | undefined;
|
|
66992
|
+
pcbRightEdgeX?: string | number | undefined;
|
|
66993
|
+
pcbTopEdgeY?: string | number | undefined;
|
|
66994
|
+
pcbBottomEdgeY?: string | number | undefined;
|
|
66995
|
+
pcbOffsetX?: string | number | undefined;
|
|
66996
|
+
pcbOffsetY?: string | number | undefined;
|
|
66997
|
+
pcbPositionAnchor?: string | undefined;
|
|
66998
|
+
pcbPositionMode?: "relative_to_group_anchor" | "auto" | "relative_to_board_anchor" | "relative_to_component_anchor" | undefined;
|
|
66999
|
+
pcbMarginTop?: string | number | undefined;
|
|
67000
|
+
pcbMarginRight?: string | number | undefined;
|
|
67001
|
+
pcbMarginBottom?: string | number | undefined;
|
|
67002
|
+
pcbMarginLeft?: string | number | undefined;
|
|
67003
|
+
pcbMarginX?: string | number | undefined;
|
|
67004
|
+
pcbMarginY?: string | number | undefined;
|
|
67005
|
+
pcbStyle?: {
|
|
67006
|
+
silkscreenFontSize?: string | number | undefined;
|
|
67007
|
+
viaPadDiameter?: string | number | undefined;
|
|
67008
|
+
viaHoleDiameter?: string | number | undefined;
|
|
67009
|
+
silkscreenTextPosition?: "centered" | "outside" | "none" | {
|
|
67010
|
+
offsetX: number;
|
|
67011
|
+
offsetY: number;
|
|
67012
|
+
} | undefined;
|
|
67013
|
+
silkscreenTextVisibility?: "hidden" | "visible" | "inherit" | undefined;
|
|
67014
|
+
} | undefined;
|
|
67015
|
+
pcbRelative?: boolean | undefined;
|
|
67016
|
+
relative?: boolean | undefined;
|
|
67017
|
+
}>;
|
|
67018
|
+
};
|
|
67019
|
+
doInitialPcbPrimitiveRender(): void;
|
|
67020
|
+
getPcbSize(): {
|
|
67021
|
+
width: number;
|
|
67022
|
+
height: number;
|
|
67023
|
+
};
|
|
67024
|
+
_moveCircuitJsonElements({ deltaX, deltaY, }: {
|
|
67025
|
+
deltaX: number;
|
|
67026
|
+
deltaY: number;
|
|
67027
|
+
}): void;
|
|
67028
|
+
}
|
|
67029
|
+
|
|
66883
67030
|
declare class SilkscreenCircle extends PrimitiveComponent<typeof silkscreenCircleProps> {
|
|
66884
67031
|
pcb_silkscreen_circle_id: string | null;
|
|
66885
67032
|
isPcbPrimitive: boolean;
|
|
@@ -131103,6 +131250,7 @@ interface TscircuitElements {
|
|
|
131103
131250
|
silkscreenrect: _tscircuit_props.SilkscreenRectProps;
|
|
131104
131251
|
silkscreencircle: _tscircuit_props.SilkscreenCircleProps;
|
|
131105
131252
|
tracehint: _tscircuit_props.TraceHintProps;
|
|
131253
|
+
courtyardcircle: _tscircuit_props.CourtyardCircleProps;
|
|
131106
131254
|
pcbtrace: _tscircuit_props.PcbTraceProps;
|
|
131107
131255
|
fabricationnoterect: _tscircuit_props.FabricationNoteRectProps;
|
|
131108
131256
|
pcbnoteline: _tscircuit_props.PcbNoteLineProps;
|
|
@@ -131145,4 +131293,4 @@ declare module "react/jsx-runtime" {
|
|
|
131145
131293
|
}
|
|
131146
131294
|
}
|
|
131147
131295
|
|
|
131148
|
-
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, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __export(components_exports, {
|
|
|
19
19
|
Constraint: () => Constraint3,
|
|
20
20
|
CopperPour: () => CopperPour,
|
|
21
21
|
CopperText: () => CopperText,
|
|
22
|
+
CourtyardCircle: () => CourtyardCircle,
|
|
22
23
|
Crystal: () => Crystal,
|
|
23
24
|
CurrentSource: () => CurrentSource,
|
|
24
25
|
Cutout: () => Cutout,
|
|
@@ -19307,6 +19308,68 @@ var NetLabel = class extends PrimitiveComponent2 {
|
|
|
19307
19308
|
}
|
|
19308
19309
|
};
|
|
19309
19310
|
|
|
19311
|
+
// lib/components/primitive-components/CourtyardCircle.ts
|
|
19312
|
+
import { courtyardCircleProps } from "@tscircuit/props";
|
|
19313
|
+
var CourtyardCircle = class extends PrimitiveComponent2 {
|
|
19314
|
+
pcb_courtyard_circle_id = null;
|
|
19315
|
+
isPcbPrimitive = true;
|
|
19316
|
+
get config() {
|
|
19317
|
+
return {
|
|
19318
|
+
componentName: "CourtyardCircle",
|
|
19319
|
+
zodProps: courtyardCircleProps
|
|
19320
|
+
};
|
|
19321
|
+
}
|
|
19322
|
+
doInitialPcbPrimitiveRender() {
|
|
19323
|
+
if (this.root?.pcbDisabled) return;
|
|
19324
|
+
const { db } = this.root;
|
|
19325
|
+
const { _parsedProps: props } = this;
|
|
19326
|
+
const position = this._getGlobalPcbPositionBeforeLayout();
|
|
19327
|
+
const { maybeFlipLayer } = this._getPcbPrimitiveFlippedHelpers();
|
|
19328
|
+
const layer = maybeFlipLayer(props.layer ?? "top");
|
|
19329
|
+
if (layer !== "top" && layer !== "bottom") {
|
|
19330
|
+
throw new Error(
|
|
19331
|
+
`Invalid layer "${layer}" for CourtyardCircle. Must be "top" or "bottom".`
|
|
19332
|
+
);
|
|
19333
|
+
}
|
|
19334
|
+
const subcircuit = this.getSubcircuit();
|
|
19335
|
+
const pcb_component_id = this.parent?.pcb_component_id ?? this.getPrimitiveContainer()?.pcb_component_id;
|
|
19336
|
+
const pcb_courtyard_circle = db.pcb_courtyard_circle.insert({
|
|
19337
|
+
pcb_component_id,
|
|
19338
|
+
layer,
|
|
19339
|
+
center: {
|
|
19340
|
+
x: position.x,
|
|
19341
|
+
y: position.y
|
|
19342
|
+
},
|
|
19343
|
+
radius: props.radius,
|
|
19344
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
19345
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
19346
|
+
});
|
|
19347
|
+
this.pcb_courtyard_circle_id = pcb_courtyard_circle.pcb_courtyard_circle_id;
|
|
19348
|
+
}
|
|
19349
|
+
getPcbSize() {
|
|
19350
|
+
const { _parsedProps: props } = this;
|
|
19351
|
+
const diameter = props.radius * 2;
|
|
19352
|
+
return { width: diameter, height: diameter };
|
|
19353
|
+
}
|
|
19354
|
+
_moveCircuitJsonElements({
|
|
19355
|
+
deltaX,
|
|
19356
|
+
deltaY
|
|
19357
|
+
}) {
|
|
19358
|
+
if (this.root?.pcbDisabled) return;
|
|
19359
|
+
const { db } = this.root;
|
|
19360
|
+
if (!this.pcb_courtyard_circle_id) return;
|
|
19361
|
+
const circle = db.pcb_courtyard_circle.get(this.pcb_courtyard_circle_id);
|
|
19362
|
+
if (circle) {
|
|
19363
|
+
db.pcb_courtyard_circle.update(this.pcb_courtyard_circle_id, {
|
|
19364
|
+
center: {
|
|
19365
|
+
x: circle.center.x + deltaX,
|
|
19366
|
+
y: circle.center.y + deltaY
|
|
19367
|
+
}
|
|
19368
|
+
});
|
|
19369
|
+
}
|
|
19370
|
+
}
|
|
19371
|
+
};
|
|
19372
|
+
|
|
19310
19373
|
// lib/components/primitive-components/SilkscreenCircle.ts
|
|
19311
19374
|
import { silkscreenCircleProps } from "@tscircuit/props";
|
|
19312
19375
|
var SilkscreenCircle = class extends PrimitiveComponent2 {
|
|
@@ -21752,7 +21815,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21752
21815
|
var package_default = {
|
|
21753
21816
|
name: "@tscircuit/core",
|
|
21754
21817
|
type: "module",
|
|
21755
|
-
version: "0.0.
|
|
21818
|
+
version: "0.0.1007",
|
|
21756
21819
|
types: "dist/index.d.ts",
|
|
21757
21820
|
main: "dist/index.js",
|
|
21758
21821
|
module: "dist/index.js",
|
|
@@ -21810,13 +21873,13 @@ var package_default = {
|
|
|
21810
21873
|
"bun-match-svg": "0.0.12",
|
|
21811
21874
|
"calculate-elbow": "^0.0.12",
|
|
21812
21875
|
"chokidar-cli": "^3.0.0",
|
|
21813
|
-
"circuit-json": "^0.0.
|
|
21876
|
+
"circuit-json": "^0.0.374",
|
|
21814
21877
|
"circuit-json-to-bpc": "^0.0.13",
|
|
21815
21878
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
21816
21879
|
"circuit-json-to-gltf": "^0.0.62",
|
|
21817
21880
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
21818
21881
|
"circuit-json-to-spice": "^0.0.33",
|
|
21819
|
-
"circuit-to-svg": "^0.0.
|
|
21882
|
+
"circuit-to-svg": "^0.0.323",
|
|
21820
21883
|
concurrently: "^9.1.2",
|
|
21821
21884
|
"connectivity-map": "^1.0.0",
|
|
21822
21885
|
debug: "^4.3.6",
|
|
@@ -22341,6 +22404,7 @@ export {
|
|
|
22341
22404
|
Constraint3 as Constraint,
|
|
22342
22405
|
CopperPour,
|
|
22343
22406
|
CopperText,
|
|
22407
|
+
CourtyardCircle,
|
|
22344
22408
|
Crystal,
|
|
22345
22409
|
CurrentSource,
|
|
22346
22410
|
Cutout,
|
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.1008",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"bun-match-svg": "0.0.12",
|
|
60
60
|
"calculate-elbow": "^0.0.12",
|
|
61
61
|
"chokidar-cli": "^3.0.0",
|
|
62
|
-
"circuit-json": "^0.0.
|
|
62
|
+
"circuit-json": "^0.0.374",
|
|
63
63
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64
64
|
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
65
65
|
"circuit-json-to-gltf": "^0.0.62",
|
|
66
66
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
67
67
|
"circuit-json-to-spice": "^0.0.33",
|
|
68
|
-
"circuit-to-svg": "^0.0.
|
|
68
|
+
"circuit-to-svg": "^0.0.323",
|
|
69
69
|
"concurrently": "^9.1.2",
|
|
70
70
|
"connectivity-map": "^1.0.0",
|
|
71
71
|
"debug": "^4.3.6",
|