@tscircuit/core 0.0.2119 → 0.0.2120
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 +31 -4
- package/dist/index.js +56 -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 { PcbGroup, PcbTraceError, PcbPlacementError, PcbManualEditConflictWarning, PcbViaClearanceError, PcbVia as PcbVia$1, LayerRef, AnyCircuitElement, Size, PcbTrace as PcbTrace$1, PcbTraceRoutePoint, AnySourceComponent, SourcePort, PcbComponent, SchematicPort, SchematicComponent, SimulationVoltageSource, SimulationCurrentSource, PcbSilkscreenGraphic, PcbSolderPastePolygon, SourceBus, RouteHintPoint, PcbBoard, SchematicSheet as SchematicSheet$1, SchematicGraphic as SchematicGraphic$1, SimulationExperiment, SimulationParameterSweep, PcbBend as PcbBend$1, PcbStiffener as PcbStiffener$1, PcbSoldermaskOpening as PcbSoldermaskOpening$1, CircuitJson } from 'circuit-json';
|
|
3
3
|
import * as _tscircuit_props from '@tscircuit/props';
|
|
4
|
-
import { FanoutTracePath, PlatformConfig, autoroutingPhaseProps, 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, 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, assemblyMotorProps, assemblyScreenProps, assemblySubassemblyProps, assemblyPartProps, assemblyReferenceSurfaceProps, 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, pcbSoldermaskOpeningProps, assemblyPrintedPartProps, assemblyCableProps, AnalogTransientSimulationProps, AnalogDcSweepSimulationProps, AnalogAcSweepSimulationProps, AnalogSweepParameterProps, AssemblyCablePropsInput, AssemblySubassemblyPropsInput, AssemblyDevicePropsInput, AssemblyMotorPropsInput, AssemblyPartPropsInput, AssemblyPrintedPartPropsInput, AssemblyScreenPropsInput, EnclosureCutoutApertureProps, EnclosureFdmBoxProps, CapacitorProps, ChipProps, DiodeProps, ResistorProps, ManualEditEvent, ManualEditsFile, ChipConnections, manual_edits_file } from '@tscircuit/props';
|
|
4
|
+
import { FanoutTracePath, PlatformConfig, autoroutingPhaseProps, 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, 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, assemblyMotorProps, assemblyScreenProps, assemblySubassemblyProps, assemblyPartProps, assemblyReferenceSurfaceProps, 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, pcbReturnCurrentSimulationProps, voltageProbeProps, spicemodelProps, pcbBendProps, pcbStiffenerProps, pcbSoldermaskOpeningProps, assemblyPrintedPartProps, assemblyCableProps, AnalogTransientSimulationProps, AnalogDcSweepSimulationProps, AnalogAcSweepSimulationProps, AnalogSweepParameterProps, AssemblyCablePropsInput, AssemblySubassemblyPropsInput, AssemblyDevicePropsInput, AssemblyMotorPropsInput, AssemblyPartPropsInput, AssemblyPrintedPartPropsInput, AssemblyScreenPropsInput, EnclosureCutoutApertureProps, EnclosureFdmBoxProps, PcbReturnCurrentSimulationProps, 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
7
|
import react__default, { ReactElement, ReactNode, Attributes } from 'react';
|
|
@@ -194771,9 +194771,9 @@ declare class AnalogSimulation extends PrimitiveComponent<typeof analogSimulatio
|
|
|
194771
194771
|
doInitialSimulationRender(): void;
|
|
194772
194772
|
}
|
|
194773
194773
|
|
|
194774
|
-
type SimulationExperimentId = SimulationExperiment["simulation_experiment_id"];
|
|
194774
|
+
type SimulationExperimentId$1 = SimulationExperiment["simulation_experiment_id"];
|
|
194775
194775
|
declare abstract class AnalogAnalysisSimulation<PropsSchema extends ZodType> extends PrimitiveComponent<PropsSchema> {
|
|
194776
|
-
simulation_experiment_id: SimulationExperimentId | null;
|
|
194776
|
+
simulation_experiment_id: SimulationExperimentId$1 | null;
|
|
194777
194777
|
protected abstract insertSimulationExperiment(): SimulationExperiment | null;
|
|
194778
194778
|
getSpiceEngineName(): string | undefined;
|
|
194779
194779
|
usesIndependentGraphAxes(): boolean;
|
|
@@ -195421,6 +195421,28 @@ declare class AnalogSweepParameter extends PrimitiveComponent<typeof analogSweep
|
|
|
195421
195421
|
doInitialSimulationRender(): void;
|
|
195422
195422
|
}
|
|
195423
195423
|
|
|
195424
|
+
type SimulationExperimentId = SimulationExperiment["simulation_experiment_id"];
|
|
195425
|
+
/** Declares a pending experiment; running an EM solver is a separate operation. */
|
|
195426
|
+
declare class PcbReturnCurrentSimulation extends PrimitiveComponent<typeof pcbReturnCurrentSimulationProps> {
|
|
195427
|
+
simulation_experiment_id: SimulationExperimentId | null;
|
|
195428
|
+
get config(): {
|
|
195429
|
+
componentName: string;
|
|
195430
|
+
zodProps: zod.ZodObject<{
|
|
195431
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
195432
|
+
children: zod.ZodOptional<zod.ZodType<react.ReactNode, zod.ZodTypeDef, react.ReactNode>>;
|
|
195433
|
+
}, "strict", zod.ZodTypeAny, {
|
|
195434
|
+
name?: string | undefined;
|
|
195435
|
+
children?: react.ReactNode;
|
|
195436
|
+
}, {
|
|
195437
|
+
name?: string | undefined;
|
|
195438
|
+
children?: react.ReactNode;
|
|
195439
|
+
}>;
|
|
195440
|
+
};
|
|
195441
|
+
doInitialSimulationRender(): void;
|
|
195442
|
+
updateSimulationRender(): void;
|
|
195443
|
+
removeSimulationRender(): void;
|
|
195444
|
+
}
|
|
195445
|
+
|
|
195424
195446
|
declare class VoltageProbe extends PrimitiveComponent<typeof voltageProbeProps> {
|
|
195425
195447
|
simulation_voltage_probe_id: string | null;
|
|
195426
195448
|
schematic_voltage_probe_id: string | null;
|
|
@@ -204277,6 +204299,10 @@ declare const enclosure: {
|
|
|
204277
204299
|
};
|
|
204278
204300
|
};
|
|
204279
204301
|
|
|
204302
|
+
declare const simulation: {
|
|
204303
|
+
readonly pcbreturncurrentsimulation: react.FunctionComponent<PcbReturnCurrentSimulationProps>;
|
|
204304
|
+
};
|
|
204305
|
+
|
|
204280
204306
|
declare function resolveStaticFileImport(path: string, platform?: PlatformConfig): Promise<string>;
|
|
204281
204307
|
|
|
204282
204308
|
declare class RootCircuit extends IsolatedCircuit {
|
|
@@ -206014,6 +206040,7 @@ interface TscircuitElements {
|
|
|
206014
206040
|
analogdcsweepsimulation: _tscircuit_props.AnalogDcSweepSimulationProps;
|
|
206015
206041
|
analogacsweepsimulation: _tscircuit_props.AnalogAcSweepSimulationProps;
|
|
206016
206042
|
analogsweepparameter: _tscircuit_props.AnalogSweepParameterProps;
|
|
206043
|
+
pcbreturncurrentsimulation: _tscircuit_props.PcbReturnCurrentSimulationProps;
|
|
206017
206044
|
spicemodel: _tscircuit_props.SpiceModelProps;
|
|
206018
206045
|
fiducial: _tscircuit_props.FiducialProps;
|
|
206019
206046
|
jscad: any;
|
|
@@ -206036,4 +206063,4 @@ declare module "react/jsx-runtime" {
|
|
|
206036
206063
|
}
|
|
206037
206064
|
}
|
|
206038
206065
|
|
|
206039
|
-
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, AssemblyCable, type AssemblyCableJsxProps, type AssemblyCadAssemblyJsxProps, AssemblyDevice, type AssemblyDeviceJsxProps, AssemblyMotor, type AssemblyMotorJsxProps, AssemblyPart, type AssemblyPartJsxProps, AssemblyPrintedPart, type AssemblyPrintedPartJsxProps, AssemblyReferenceSurface, 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, PcbSoldermaskOpening, 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 };
|
|
206066
|
+
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, AssemblyCable, type AssemblyCableJsxProps, type AssemblyCadAssemblyJsxProps, AssemblyDevice, type AssemblyDeviceJsxProps, AssemblyMotor, type AssemblyMotorJsxProps, AssemblyPart, type AssemblyPartJsxProps, AssemblyPrintedPart, type AssemblyPrintedPartJsxProps, AssemblyReferenceSurface, 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, PcbReturnCurrentSimulation, PcbSoldermaskOpening, 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, simulation, unrouteCircuitJson, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -84,6 +84,7 @@ __export(components_exports, {
|
|
|
84
84
|
PcbNotePath: () => PcbNotePath,
|
|
85
85
|
PcbNoteRect: () => PcbNoteRect,
|
|
86
86
|
PcbNoteText: () => PcbNoteText,
|
|
87
|
+
PcbReturnCurrentSimulation: () => PcbReturnCurrentSimulation,
|
|
87
88
|
PcbSoldermaskOpening: () => PcbSoldermaskOpening,
|
|
88
89
|
PcbStiffener: () => PcbStiffener,
|
|
89
90
|
PcbTrace: () => PcbTrace,
|
|
@@ -118340,7 +118341,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
118340
118341
|
var package_default = {
|
|
118341
118342
|
name: "@tscircuit/core",
|
|
118342
118343
|
type: "module",
|
|
118343
|
-
version: "0.0.
|
|
118344
|
+
version: "0.0.2119",
|
|
118344
118345
|
types: "dist/index.d.ts",
|
|
118345
118346
|
main: "dist/index.js",
|
|
118346
118347
|
module: "dist/index.js",
|
|
@@ -118399,7 +118400,7 @@ var package_default = {
|
|
|
118399
118400
|
"@tscircuit/miniflex": "^0.0.4",
|
|
118400
118401
|
"@tscircuit/modelprinter": "^0.0.18",
|
|
118401
118402
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
118402
|
-
"@tscircuit/props": "^0.0.
|
|
118403
|
+
"@tscircuit/props": "^0.0.698",
|
|
118403
118404
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
118404
118405
|
"@tscircuit/schematic-trace-solver": "https://jscdn.tscircuit.com/@tscircuit/schematic-trace-solver/0.0.230.tgz",
|
|
118405
118406
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -118483,7 +118484,7 @@ var package_default = {
|
|
|
118483
118484
|
},
|
|
118484
118485
|
overrides: {
|
|
118485
118486
|
"@tscircuit/circuit-json-util": "^0.0.119",
|
|
118486
|
-
"@tscircuit/props": "^0.0.
|
|
118487
|
+
"@tscircuit/props": "^0.0.698",
|
|
118487
118488
|
"circuit-json": "^0.0.525",
|
|
118488
118489
|
"@tscircuit/cableprinter": "^0.0.6"
|
|
118489
118490
|
}
|
|
@@ -133090,6 +133091,49 @@ var AnalogSweepParameter = class extends PrimitiveComponent2 {
|
|
|
133090
133091
|
}
|
|
133091
133092
|
};
|
|
133092
133093
|
|
|
133094
|
+
// lib/components/primitive-components/PcbReturnCurrentSimulation.ts
|
|
133095
|
+
import { pcbReturnCurrentSimulationProps } from "@tscircuit/props";
|
|
133096
|
+
var PcbReturnCurrentSimulation = class extends PrimitiveComponent2 {
|
|
133097
|
+
simulation_experiment_id = null;
|
|
133098
|
+
get config() {
|
|
133099
|
+
return {
|
|
133100
|
+
componentName: "PcbReturnCurrentSimulation",
|
|
133101
|
+
zodProps: pcbReturnCurrentSimulationProps
|
|
133102
|
+
};
|
|
133103
|
+
}
|
|
133104
|
+
doInitialSimulationRender() {
|
|
133105
|
+
if (this.root?.pcbDisabled) return;
|
|
133106
|
+
if (this.parent?.componentName === "PcbReturnCurrentSimulation") {
|
|
133107
|
+
this.renderError(
|
|
133108
|
+
"A PCB return-current simulation cannot contain another simulation."
|
|
133109
|
+
);
|
|
133110
|
+
}
|
|
133111
|
+
if (this.children.some(
|
|
133112
|
+
(child) => child.componentName !== "PcbReturnCurrentExcitation"
|
|
133113
|
+
)) {
|
|
133114
|
+
this.renderError(
|
|
133115
|
+
"A PCB return-current simulation can contain only return-current excitations."
|
|
133116
|
+
);
|
|
133117
|
+
}
|
|
133118
|
+
const experiment = this.root.db.simulation_experiment.insert({
|
|
133119
|
+
name: this._parsedProps.name ?? "PCB return current",
|
|
133120
|
+
experiment_type: "pcb_return_current"
|
|
133121
|
+
});
|
|
133122
|
+
this.simulation_experiment_id = experiment.simulation_experiment_id;
|
|
133123
|
+
}
|
|
133124
|
+
updateSimulationRender() {
|
|
133125
|
+
if (!this.simulation_experiment_id) return;
|
|
133126
|
+
this.root.db.simulation_experiment.update(this.simulation_experiment_id, {
|
|
133127
|
+
name: this._parsedProps.name ?? "PCB return current"
|
|
133128
|
+
});
|
|
133129
|
+
}
|
|
133130
|
+
removeSimulationRender() {
|
|
133131
|
+
if (!this.simulation_experiment_id) return;
|
|
133132
|
+
this.root.db.simulation_experiment.delete(this.simulation_experiment_id);
|
|
133133
|
+
this.simulation_experiment_id = null;
|
|
133134
|
+
}
|
|
133135
|
+
};
|
|
133136
|
+
|
|
133093
133137
|
// lib/components/primitive-components/VoltageProbe.ts
|
|
133094
133138
|
import { voltageProbeProps } from "@tscircuit/props";
|
|
133095
133139
|
|
|
@@ -134544,6 +134588,13 @@ var enclosure = {
|
|
|
134544
134588
|
}
|
|
134545
134589
|
};
|
|
134546
134590
|
|
|
134591
|
+
// lib/namespaced-elements/simulation.ts
|
|
134592
|
+
var simulation = {
|
|
134593
|
+
pcbreturncurrentsimulation: createNamespacedElement(
|
|
134594
|
+
"pcbreturncurrentsimulation"
|
|
134595
|
+
)
|
|
134596
|
+
};
|
|
134597
|
+
|
|
134547
134598
|
// lib/RootCircuit.ts
|
|
134548
134599
|
var RootCircuit = class extends IsolatedCircuit {
|
|
134549
134600
|
isRootCircuit = true;
|
|
@@ -134861,6 +134912,7 @@ export {
|
|
|
134861
134912
|
PcbNotePath,
|
|
134862
134913
|
PcbNoteRect,
|
|
134863
134914
|
PcbNoteText,
|
|
134915
|
+
PcbReturnCurrentSimulation,
|
|
134864
134916
|
PcbSoldermaskOpening,
|
|
134865
134917
|
PcbStiffener,
|
|
134866
134918
|
PcbTrace,
|
|
@@ -134932,6 +134984,7 @@ export {
|
|
|
134932
134984
|
renderPhaseIndexMap,
|
|
134933
134985
|
resolveStaticFileImport,
|
|
134934
134986
|
sel,
|
|
134987
|
+
simulation,
|
|
134935
134988
|
unrouteCircuitJson,
|
|
134936
134989
|
useCapacitor,
|
|
134937
134990
|
useChip,
|
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.2120",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@tscircuit/miniflex": "^0.0.4",
|
|
61
61
|
"@tscircuit/modelprinter": "^0.0.18",
|
|
62
62
|
"@tscircuit/ngspice-spice-engine": "^0.0.20",
|
|
63
|
-
"@tscircuit/props": "^0.0.
|
|
63
|
+
"@tscircuit/props": "^0.0.698",
|
|
64
64
|
"@tscircuit/schematic-match-adapt": "^0.0.18",
|
|
65
65
|
"@tscircuit/schematic-trace-solver": "https://jscdn.tscircuit.com/@tscircuit/schematic-trace-solver/0.0.230.tgz",
|
|
66
66
|
"@tscircuit/solver-utils": "^0.0.16",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
},
|
|
145
145
|
"overrides": {
|
|
146
146
|
"@tscircuit/circuit-json-util": "^0.0.119",
|
|
147
|
-
"@tscircuit/props": "^0.0.
|
|
147
|
+
"@tscircuit/props": "^0.0.698",
|
|
148
148
|
"circuit-json": "^0.0.525",
|
|
149
149
|
"@tscircuit/cableprinter": "^0.0.6"
|
|
150
150
|
}
|