@tscircuit/core 0.0.1902 → 0.0.1904
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 +8 -4
- package/dist/index.js +5 -8
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -138,11 +138,13 @@ type SimplifiedPcbTrace = Omit<SimplifiedPcbTrace$1, "connection_name" | "route"
|
|
|
138
138
|
};
|
|
139
139
|
/** A connection identifier in Simple Route JSON. */
|
|
140
140
|
type SrjConnectionName = string;
|
|
141
|
-
|
|
141
|
+
/** Core emits fixed-layer routing terminals, not multilayer connection points. */
|
|
142
|
+
type SingleLayerConnectionPoint = {
|
|
142
143
|
x: number;
|
|
143
144
|
y: number;
|
|
144
145
|
layer: string;
|
|
145
|
-
layers
|
|
146
|
+
/** Reject mixed layer/layers objects even when assigned through a variable. */
|
|
147
|
+
layers?: never;
|
|
146
148
|
pointId?: string;
|
|
147
149
|
pcb_port_id?: string;
|
|
148
150
|
/** Stable semantic selector for the source port, e.g. `U1.USB_DM`. */
|
|
@@ -152,6 +154,8 @@ type SimpleRoutePoint = {
|
|
|
152
154
|
viaDiameter?: number;
|
|
153
155
|
};
|
|
154
156
|
};
|
|
157
|
+
/** Backward-compatible name for core's single-layer routing terminals. */
|
|
158
|
+
type SimpleRoutePoint = SingleLayerConnectionPoint;
|
|
155
159
|
type SimpleRouteConnection = {
|
|
156
160
|
name: SrjConnectionName;
|
|
157
161
|
routingPcbGroupId?: PcbGroupId;
|
|
@@ -163,7 +167,7 @@ type SimpleRouteConnection = {
|
|
|
163
167
|
nominalTraceWidth?: number;
|
|
164
168
|
/** @deprecated Use `nominalTraceWidth` instead. */
|
|
165
169
|
width?: number;
|
|
166
|
-
pointsToConnect:
|
|
170
|
+
pointsToConnect: SingleLayerConnectionPoint[];
|
|
167
171
|
/** @deprecated DO NOT USE **/
|
|
168
172
|
externallyConnectedPointIds?: string[][];
|
|
169
173
|
};
|
|
@@ -193707,4 +193711,4 @@ declare module "react/jsx-runtime" {
|
|
|
193707
193711
|
}
|
|
193708
193712
|
}
|
|
193709
193713
|
|
|
193710
|
-
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, AssemblyDevice, type AssemblyDeviceJsxProps, 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, 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 };
|
|
193714
|
+
export { Ammeter, AnalogAcSweepSimulation, AnalogAnalysisSimulation, AnalogDcOperatingPointSimulation, AnalogDcSweepSimulation, AnalogSimulation, AnalogSweepParameter, AnalogTransientSimulation, Antenna, AssemblyDevice, type AssemblyDeviceJsxProps, 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 };
|
package/dist/index.js
CHANGED
|
@@ -61218,7 +61218,7 @@ import { getBoundsFromPoints as getBoundsFromPoints8 } from "@tscircuit/math-uti
|
|
|
61218
61218
|
|
|
61219
61219
|
// lib/components/primitive-components/Group/get-saved-autorouting-phase-traces.ts
|
|
61220
61220
|
import { applyToPoint as applyToPoint30, compose as compose12, translate as translate12 } from "transformation-matrix";
|
|
61221
|
-
var touchesEndpoint = (point6, endpoint) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 &&
|
|
61221
|
+
var touchesEndpoint = (point6, endpoint) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 && point6.layer === endpoint.layer;
|
|
61222
61222
|
function getSavedAutoroutingPhaseTraces(phase, input, isFanout) {
|
|
61223
61223
|
const group = phase.getGroup();
|
|
61224
61224
|
const transformBeforeLayout = group._computePcbGlobalTransformBeforeLayout();
|
|
@@ -61314,7 +61314,6 @@ function getSavedAutoroutingPhaseTraces(phase, input, isFanout) {
|
|
|
61314
61314
|
x: last.x,
|
|
61315
61315
|
y: last.y,
|
|
61316
61316
|
layer: lastLayer,
|
|
61317
|
-
layers: [lastLayer],
|
|
61318
61317
|
pointId: `${pcbTraceId}_exit`
|
|
61319
61318
|
};
|
|
61320
61319
|
}
|
|
@@ -61598,7 +61597,7 @@ function getSavedFanoutTraces(breakout, input) {
|
|
|
61598
61597
|
];
|
|
61599
61598
|
if (connection.pointsToConnect.some(
|
|
61600
61599
|
(point6) => !endpoints.some(
|
|
61601
|
-
(endpoint) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 &&
|
|
61600
|
+
(endpoint) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 && point6.layer === endpoint.layer
|
|
61602
61601
|
)
|
|
61603
61602
|
))
|
|
61604
61603
|
throw new Error(
|
|
@@ -62036,7 +62035,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
62036
62035
|
var package_default = {
|
|
62037
62036
|
name: "@tscircuit/core",
|
|
62038
62037
|
type: "module",
|
|
62039
|
-
version: "0.0.
|
|
62038
|
+
version: "0.0.1903",
|
|
62040
62039
|
types: "dist/index.d.ts",
|
|
62041
62040
|
main: "dist/index.js",
|
|
62042
62041
|
module: "dist/index.js",
|
|
@@ -62108,7 +62107,7 @@ var package_default = {
|
|
|
62108
62107
|
"circuit-json": "^0.0.487",
|
|
62109
62108
|
"circuit-json-to-bpc": "^0.0.13",
|
|
62110
62109
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
62111
|
-
"circuit-json-to-gltf": "^0.0.
|
|
62110
|
+
"circuit-json-to-gltf": "^0.0.125",
|
|
62112
62111
|
"circuit-json-to-spice": "^0.0.45",
|
|
62113
62112
|
"circuit-to-svg": "^0.0.416",
|
|
62114
62113
|
concurrently: "^9.1.2",
|
|
@@ -62122,7 +62121,7 @@ var package_default = {
|
|
|
62122
62121
|
"live-server": "^1.2.2",
|
|
62123
62122
|
minicssgrid: "^0.0.9",
|
|
62124
62123
|
"pkg-pr-new": "^0.0.37",
|
|
62125
|
-
poppygl: "^0.0.
|
|
62124
|
+
poppygl: "^0.0.29",
|
|
62126
62125
|
react: "^19.1.0",
|
|
62127
62126
|
"react-dom": "^19.1.0",
|
|
62128
62127
|
"schematic-symbols": "^0.0.244",
|
|
@@ -62514,7 +62513,6 @@ function Group_syncFanoutExitsWithGlobalConnections({
|
|
|
62514
62513
|
previousPoint
|
|
62515
62514
|
} of globalPointMatches) {
|
|
62516
62515
|
const {
|
|
62517
|
-
layers: _previousLayers,
|
|
62518
62516
|
terminalVia: _previousTerminalVia,
|
|
62519
62517
|
...previousPointWithoutLayerOverrides
|
|
62520
62518
|
} = previousPoint;
|
|
@@ -62523,7 +62521,6 @@ function Group_syncFanoutExitsWithGlobalConnections({
|
|
|
62523
62521
|
x: fanoutExitPoint.x,
|
|
62524
62522
|
y: fanoutExitPoint.y,
|
|
62525
62523
|
layer: fanoutExitPoint.layer,
|
|
62526
|
-
...fanoutExitPoint.layers ? { layers: [...fanoutExitPoint.layers] } : {},
|
|
62527
62524
|
...fanoutExitPoint.terminalVia ? { terminalVia: { ...fanoutExitPoint.terminalVia } } : {}
|
|
62528
62525
|
};
|
|
62529
62526
|
globalConnection.pointsToConnect[pointIndex] = synchronizedGlobalPoint;
|
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.1904",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"circuit-json": "^0.0.487",
|
|
74
74
|
"circuit-json-to-bpc": "^0.0.13",
|
|
75
75
|
"circuit-json-to-connectivity-map": "^0.0.30",
|
|
76
|
-
"circuit-json-to-gltf": "^0.0.
|
|
76
|
+
"circuit-json-to-gltf": "^0.0.125",
|
|
77
77
|
"circuit-json-to-spice": "^0.0.45",
|
|
78
78
|
"circuit-to-svg": "^0.0.416",
|
|
79
79
|
"concurrently": "^9.1.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"live-server": "^1.2.2",
|
|
88
88
|
"minicssgrid": "^0.0.9",
|
|
89
89
|
"pkg-pr-new": "^0.0.37",
|
|
90
|
-
"poppygl": "^0.0.
|
|
90
|
+
"poppygl": "^0.0.29",
|
|
91
91
|
"react": "^19.1.0",
|
|
92
92
|
"react-dom": "^19.1.0",
|
|
93
93
|
"schematic-symbols": "^0.0.244",
|