@tscircuit/core 0.0.825 → 0.0.826
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 +21 -1
- package/dist/index.js +51 -29
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -206,6 +206,8 @@ interface DebugLogOutputEvent {
|
|
|
206
206
|
content: any;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
declare function resolveStaticFileImport(path: string, platform?: PlatformConfig): Promise<string>;
|
|
210
|
+
|
|
209
211
|
declare class RootCircuit {
|
|
210
212
|
firstChild: PrimitiveComponent | null;
|
|
211
213
|
children: PrimitiveComponent[];
|
|
@@ -18978,6 +18980,9 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
18978
18980
|
color: zod.ZodOptional<zod.ZodString>;
|
|
18979
18981
|
arrowSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
18980
18982
|
units: zod.ZodOptional<zod.ZodEnum<["in", "mm"]>>;
|
|
18983
|
+
outerEdgeToEdge: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
18984
|
+
centerToCenter: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
18985
|
+
innerEdgeToEdge: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
18981
18986
|
}, "strip", zod.ZodTypeAny, {
|
|
18982
18987
|
from: string | {
|
|
18983
18988
|
x: number;
|
|
@@ -18998,6 +19003,7 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
18998
19003
|
pcbMarginY?: number | undefined;
|
|
18999
19004
|
pcbRelative?: boolean | undefined;
|
|
19000
19005
|
relative?: boolean | undefined;
|
|
19006
|
+
centerToCenter?: true | undefined;
|
|
19001
19007
|
color?: string | undefined;
|
|
19002
19008
|
text?: string | undefined;
|
|
19003
19009
|
font?: "tscircuit2024" | undefined;
|
|
@@ -19005,6 +19011,8 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
19005
19011
|
offset?: number | undefined;
|
|
19006
19012
|
arrowSize?: number | undefined;
|
|
19007
19013
|
units?: "in" | "mm" | undefined;
|
|
19014
|
+
outerEdgeToEdge?: true | undefined;
|
|
19015
|
+
innerEdgeToEdge?: true | undefined;
|
|
19008
19016
|
}, {
|
|
19009
19017
|
from: string | {
|
|
19010
19018
|
x: string | number;
|
|
@@ -19027,6 +19035,7 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
19027
19035
|
pcbMarginY?: string | number | undefined;
|
|
19028
19036
|
pcbRelative?: boolean | undefined;
|
|
19029
19037
|
relative?: boolean | undefined;
|
|
19038
|
+
centerToCenter?: true | undefined;
|
|
19030
19039
|
color?: string | undefined;
|
|
19031
19040
|
text?: string | undefined;
|
|
19032
19041
|
font?: "tscircuit2024" | undefined;
|
|
@@ -19034,6 +19043,8 @@ declare class FabricationNoteDimension extends PrimitiveComponent<typeof fabrica
|
|
|
19034
19043
|
offset?: string | number | undefined;
|
|
19035
19044
|
arrowSize?: string | number | undefined;
|
|
19036
19045
|
units?: "in" | "mm" | undefined;
|
|
19046
|
+
outerEdgeToEdge?: true | undefined;
|
|
19047
|
+
innerEdgeToEdge?: true | undefined;
|
|
19037
19048
|
}>;
|
|
19038
19049
|
};
|
|
19039
19050
|
private _resolvePoint;
|
|
@@ -19493,6 +19504,9 @@ declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensio
|
|
|
19493
19504
|
color: zod.ZodOptional<zod.ZodString>;
|
|
19494
19505
|
arrowSize: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
19495
19506
|
units: zod.ZodOptional<zod.ZodEnum<["in", "mm"]>>;
|
|
19507
|
+
outerEdgeToEdge: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
19508
|
+
centerToCenter: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
19509
|
+
innerEdgeToEdge: zod.ZodOptional<zod.ZodLiteral<true>>;
|
|
19496
19510
|
}, "strip", zod.ZodTypeAny, {
|
|
19497
19511
|
from: string | {
|
|
19498
19512
|
x: number;
|
|
@@ -19513,6 +19527,7 @@ declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensio
|
|
|
19513
19527
|
pcbMarginY?: number | undefined;
|
|
19514
19528
|
pcbRelative?: boolean | undefined;
|
|
19515
19529
|
relative?: boolean | undefined;
|
|
19530
|
+
centerToCenter?: true | undefined;
|
|
19516
19531
|
color?: string | undefined;
|
|
19517
19532
|
text?: string | undefined;
|
|
19518
19533
|
font?: "tscircuit2024" | undefined;
|
|
@@ -19520,6 +19535,8 @@ declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensio
|
|
|
19520
19535
|
offset?: number | undefined;
|
|
19521
19536
|
arrowSize?: number | undefined;
|
|
19522
19537
|
units?: "in" | "mm" | undefined;
|
|
19538
|
+
outerEdgeToEdge?: true | undefined;
|
|
19539
|
+
innerEdgeToEdge?: true | undefined;
|
|
19523
19540
|
}, {
|
|
19524
19541
|
from: string | {
|
|
19525
19542
|
x: string | number;
|
|
@@ -19542,6 +19559,7 @@ declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensio
|
|
|
19542
19559
|
pcbMarginY?: string | number | undefined;
|
|
19543
19560
|
pcbRelative?: boolean | undefined;
|
|
19544
19561
|
relative?: boolean | undefined;
|
|
19562
|
+
centerToCenter?: true | undefined;
|
|
19545
19563
|
color?: string | undefined;
|
|
19546
19564
|
text?: string | undefined;
|
|
19547
19565
|
font?: "tscircuit2024" | undefined;
|
|
@@ -19549,6 +19567,8 @@ declare class PcbNoteDimension extends PrimitiveComponent<typeof pcbNoteDimensio
|
|
|
19549
19567
|
offset?: string | number | undefined;
|
|
19550
19568
|
arrowSize?: string | number | undefined;
|
|
19551
19569
|
units?: "in" | "mm" | undefined;
|
|
19570
|
+
outerEdgeToEdge?: true | undefined;
|
|
19571
|
+
innerEdgeToEdge?: true | undefined;
|
|
19552
19572
|
}>;
|
|
19553
19573
|
};
|
|
19554
19574
|
private _resolvePoint;
|
|
@@ -37706,4 +37726,4 @@ declare module "react/jsx-runtime" {
|
|
|
37706
37726
|
}
|
|
37707
37727
|
}
|
|
37708
37728
|
|
|
37709
|
-
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, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, 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, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
|
37729
|
+
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, Crystal, Cutout, type DebugLogOutputEvent, Diode, FabricationNoteDimension, FabricationNotePath, FabricationNoteRect, FabricationNoteText, Footprint, Fuse, type GenericConnectionsAndSelectorsSel, type GenericLocalAutorouter, Group, Hole, type IRenderable, Inductor, Jumper, Keepout, Led, type LocalCacheEngine, Mosfet, Net, NetLabel, NormalComponent, type Obstacle, 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, SchematicArc, SchematicBox, SchematicCell, SchematicCircle, SchematicLine, SchematicRect, SchematicRow, SchematicTable, SchematicText, type Sel, SilkscreenCircle, SilkscreenLine, SilkscreenPath, SilkscreenRect, SilkscreenText, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, SmtPad, SolderJumper, Subcircuit, Switch, SymbolComponent as Symbol, TestPoint, Trace, TraceHint, Transistor, Via, VoltageProbe, VoltageSource, applyEditEvents, applyEditEventsToManualEditsFile, applyPcbEditEventsToManualEditsFile, applySchematicEditEventsToManualEditsFile, createUseComponent, getPhaseTimingsFromRenderEvents, getSimpleRouteJsonFromCircuitJson, normalizePinLabels, orderedRenderPhases, resolveStaticFileImport, sel, useCapacitor, useChip, useDiode, useLed, useRenderedCircuit, useResistor };
|
package/dist/index.js
CHANGED
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
schematic_manual_edit_conflict_warning
|
|
95
95
|
} from "circuit-json";
|
|
96
96
|
import { decomposeTSR as decomposeTSR5 } from "transformation-matrix";
|
|
97
|
-
import
|
|
97
|
+
import Debug5 from "debug";
|
|
98
98
|
|
|
99
99
|
// lib/fiber/create-instance-from-react-element.ts
|
|
100
100
|
import "react";
|
|
@@ -7227,6 +7227,28 @@ import {
|
|
|
7227
7227
|
// lib/components/base-components/NormalComponent/utils/isStaticAssetPath.ts
|
|
7228
7228
|
var isStaticAssetPath = (s) => s.startsWith("/");
|
|
7229
7229
|
|
|
7230
|
+
// lib/utils/resolveStaticFileImport.ts
|
|
7231
|
+
import Debug4 from "debug";
|
|
7232
|
+
var resolveStaticFileImportDebug = Debug4(
|
|
7233
|
+
"tscircuit:core:resolveStaticFileImport"
|
|
7234
|
+
);
|
|
7235
|
+
async function resolveStaticFileImport(path, platform) {
|
|
7236
|
+
if (!path) return path;
|
|
7237
|
+
const resolver = platform?.resolveProjectStaticFileImportUrl;
|
|
7238
|
+
if (resolver && path.startsWith("/")) {
|
|
7239
|
+
try {
|
|
7240
|
+
const resolved = await resolver(path);
|
|
7241
|
+
if (resolved) return resolved;
|
|
7242
|
+
} catch (error) {
|
|
7243
|
+
resolveStaticFileImportDebug(
|
|
7244
|
+
"failed to resolve static file via platform resolver",
|
|
7245
|
+
error
|
|
7246
|
+
);
|
|
7247
|
+
}
|
|
7248
|
+
}
|
|
7249
|
+
return constructAssetUrl(path, platform?.projectBaseUrl);
|
|
7250
|
+
}
|
|
7251
|
+
|
|
7230
7252
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
|
|
7231
7253
|
function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsyncEffect) {
|
|
7232
7254
|
let { footprint } = component.props;
|
|
@@ -7238,9 +7260,8 @@ function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsync
|
|
|
7238
7260
|
if (typeof footprint === "string" && (isHttpUrl(footprint) || isStaticAssetPath(footprint)) && footprintParser) {
|
|
7239
7261
|
if (component._hasStartedFootprintUrlLoad) return;
|
|
7240
7262
|
component._hasStartedFootprintUrlLoad = true;
|
|
7241
|
-
const projectBaseUrl = component.root?.platform?.projectBaseUrl;
|
|
7242
|
-
const footprintUrl = isHttpUrl(footprint) ? footprint : constructAssetUrl(footprint, projectBaseUrl);
|
|
7243
7263
|
queueAsyncEffect("load-footprint-from-platform-file-parser", async () => {
|
|
7264
|
+
const footprintUrl = isHttpUrl(footprint) ? footprint : await resolveStaticFileImport(footprint, component.root?.platform);
|
|
7244
7265
|
try {
|
|
7245
7266
|
const result = await footprintParser.loadFromUrl(footprintUrl);
|
|
7246
7267
|
const fpComponents = createComponentsFromCircuitJson(
|
|
@@ -7503,7 +7524,7 @@ function NormalComponent_doInitialPcbComponentAnchorAlignment(component) {
|
|
|
7503
7524
|
|
|
7504
7525
|
// lib/components/base-components/NormalComponent/NormalComponent.ts
|
|
7505
7526
|
import { normalizeDegrees } from "@tscircuit/math-utils";
|
|
7506
|
-
var debug3 =
|
|
7527
|
+
var debug3 = Debug5("tscircuit:core");
|
|
7507
7528
|
var rotation32 = z9.object({
|
|
7508
7529
|
x: rotation2,
|
|
7509
7530
|
y: rotation2,
|
|
@@ -8810,7 +8831,7 @@ var CapacityMeshAutorouter = class {
|
|
|
8810
8831
|
import {
|
|
8811
8832
|
distance as distance5
|
|
8812
8833
|
} from "circuit-json";
|
|
8813
|
-
import
|
|
8834
|
+
import Debug13 from "debug";
|
|
8814
8835
|
import "zod";
|
|
8815
8836
|
|
|
8816
8837
|
// lib/components/primitive-components/TraceHint.ts
|
|
@@ -9459,7 +9480,7 @@ import { getBoundsFromPoints as getBoundsFromPoints3 } from "@tscircuit/math-uti
|
|
|
9459
9480
|
// lib/components/primitive-components/Group/Group_doInitialSchematicLayoutMatchAdapt.ts
|
|
9460
9481
|
import { convertCircuitJsonToBpc } from "circuit-json-to-bpc";
|
|
9461
9482
|
import { getGraphicsForBpcGraph, layoutSchematicGraphVariants } from "bpc-graph";
|
|
9462
|
-
import
|
|
9483
|
+
import Debug6 from "debug";
|
|
9463
9484
|
import { buildSubtree } from "@tscircuit/circuit-json-util";
|
|
9464
9485
|
|
|
9465
9486
|
// lib/components/primitive-components/Group/utils/updateSchematicPrimitivesForLayoutShift.ts
|
|
@@ -9502,7 +9523,7 @@ function updateSchematicPrimitivesForLayoutShift({
|
|
|
9502
9523
|
}
|
|
9503
9524
|
|
|
9504
9525
|
// lib/components/primitive-components/Group/Group_doInitialSchematicLayoutMatchAdapt.ts
|
|
9505
|
-
var debug4 =
|
|
9526
|
+
var debug4 = Debug6("Group_doInitialSchematicLayoutMatchAdapt");
|
|
9506
9527
|
function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
9507
9528
|
const { db } = group.root;
|
|
9508
9529
|
const subtreeCircuitJson = buildSubtree(db.toArray(), {
|
|
@@ -9628,8 +9649,8 @@ import {
|
|
|
9628
9649
|
getCircuitJsonTree
|
|
9629
9650
|
} from "@tscircuit/circuit-json-util";
|
|
9630
9651
|
import { LayoutPipelineSolver } from "@tscircuit/matchpack";
|
|
9631
|
-
import
|
|
9632
|
-
var debug5 =
|
|
9652
|
+
import Debug7 from "debug";
|
|
9653
|
+
var debug5 = Debug7("Group_doInitialSchematicLayoutMatchpack");
|
|
9633
9654
|
function facingDirectionToSide(facingDirection) {
|
|
9634
9655
|
switch (facingDirection) {
|
|
9635
9656
|
case "up":
|
|
@@ -10906,7 +10927,7 @@ import {
|
|
|
10906
10927
|
import {
|
|
10907
10928
|
length as length4
|
|
10908
10929
|
} from "circuit-json";
|
|
10909
|
-
import
|
|
10930
|
+
import Debug8 from "debug";
|
|
10910
10931
|
|
|
10911
10932
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack/applyComponentConstraintClusters.ts
|
|
10912
10933
|
import * as kiwi2 from "@lume/kiwi";
|
|
@@ -11343,7 +11364,7 @@ function getObstacleDimensionsFromPlatedHole(hole) {
|
|
|
11343
11364
|
|
|
11344
11365
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack/Group_doInitialPcbLayoutPack.ts
|
|
11345
11366
|
var DEFAULT_MIN_GAP = "1mm";
|
|
11346
|
-
var debug6 =
|
|
11367
|
+
var debug6 = Debug8("Group_doInitialPcbLayoutPack");
|
|
11347
11368
|
var Group_doInitialPcbLayoutPack = (group) => {
|
|
11348
11369
|
const { db } = group.root;
|
|
11349
11370
|
const { _parsedProps: props } = group;
|
|
@@ -11635,7 +11656,7 @@ import { convertSrjToGraphicsObject } from "@tscircuit/capacity-autorouter";
|
|
|
11635
11656
|
|
|
11636
11657
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
|
|
11637
11658
|
import { SchematicTracePipelineSolver as SchematicTracePipelineSolver4 } from "@tscircuit/schematic-trace-solver";
|
|
11638
|
-
import
|
|
11659
|
+
import Debug11 from "debug";
|
|
11639
11660
|
|
|
11640
11661
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/createSchematicTraceSolverInputProblem.ts
|
|
11641
11662
|
import "@tscircuit/schematic-trace-solver";
|
|
@@ -12154,8 +12175,8 @@ function computeJunctions(traces, opts = {}) {
|
|
|
12154
12175
|
}
|
|
12155
12176
|
|
|
12156
12177
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyTracesFromSolverOutput.ts
|
|
12157
|
-
import
|
|
12158
|
-
var debug7 =
|
|
12178
|
+
import Debug9 from "debug";
|
|
12179
|
+
var debug7 = Debug9("Group_doInitialSchematicTraceRender");
|
|
12159
12180
|
function applyTracesFromSolverOutput(args) {
|
|
12160
12181
|
const { group, solver, pinIdToSchematicPortId, userNetIdToSck } = args;
|
|
12161
12182
|
const { db } = group.root;
|
|
@@ -12267,8 +12288,8 @@ var getNetNameFromPorts = (ports) => {
|
|
|
12267
12288
|
};
|
|
12268
12289
|
|
|
12269
12290
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyNetLabelPlacements.ts
|
|
12270
|
-
import
|
|
12271
|
-
var debug8 =
|
|
12291
|
+
import Debug10 from "debug";
|
|
12292
|
+
var debug8 = Debug10("Group_doInitialSchematicTraceRender");
|
|
12272
12293
|
function applyNetLabelPlacements(args) {
|
|
12273
12294
|
const {
|
|
12274
12295
|
group,
|
|
@@ -12433,7 +12454,7 @@ var getSchematicPortIdsWithRoutedTraces = ({
|
|
|
12433
12454
|
};
|
|
12434
12455
|
|
|
12435
12456
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
|
|
12436
|
-
var debug9 =
|
|
12457
|
+
var debug9 = Debug11("Group_doInitialSchematicTraceRender");
|
|
12437
12458
|
var Group_doInitialSchematicTraceRender = (group) => {
|
|
12438
12459
|
if (!group.root?._featureMspSchematicTraceRouting) return;
|
|
12439
12460
|
if (!group.isSubcircuit) return;
|
|
@@ -12493,7 +12514,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
|
|
|
12493
12514
|
|
|
12494
12515
|
// lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
|
|
12495
12516
|
import { circuitJsonToSpice } from "circuit-json-to-spice";
|
|
12496
|
-
import
|
|
12517
|
+
import Debug12 from "debug";
|
|
12497
12518
|
|
|
12498
12519
|
// lib/spice/get-spicey-engine.ts
|
|
12499
12520
|
import { simulate, spiceyTranToVGraphs } from "spicey";
|
|
@@ -12515,7 +12536,7 @@ var getSpiceyEngine = () => {
|
|
|
12515
12536
|
};
|
|
12516
12537
|
|
|
12517
12538
|
// lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
|
|
12518
|
-
var debug10 =
|
|
12539
|
+
var debug10 = Debug12("tscircuit:core:Group_doInitialSimulationSpiceEngineRender");
|
|
12519
12540
|
function Group_doInitialSimulationSpiceEngineRender(group) {
|
|
12520
12541
|
if (!group.isSubcircuit) return;
|
|
12521
12542
|
const { root } = group;
|
|
@@ -12860,14 +12881,14 @@ var Group6 = class extends NormalComponent3 {
|
|
|
12860
12881
|
return false;
|
|
12861
12882
|
}
|
|
12862
12883
|
_hasTracesToRoute() {
|
|
12863
|
-
const debug11 =
|
|
12884
|
+
const debug11 = Debug13("tscircuit:core:_hasTracesToRoute");
|
|
12864
12885
|
const traces = this.selectAll("trace");
|
|
12865
12886
|
debug11(`[${this.getString()}] has ${traces.length} traces to route`);
|
|
12866
12887
|
return traces.length > 0;
|
|
12867
12888
|
}
|
|
12868
12889
|
async _runEffectMakeHttpAutoroutingRequest() {
|
|
12869
12890
|
const { db } = this.root;
|
|
12870
|
-
const debug11 =
|
|
12891
|
+
const debug11 = Debug13("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
|
|
12871
12892
|
const props = this._parsedProps;
|
|
12872
12893
|
const autorouterConfig = this._getAutorouterConfig();
|
|
12873
12894
|
const serverUrl = autorouterConfig.serverUrl;
|
|
@@ -12989,7 +13010,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
12989
13010
|
async _runLocalAutorouting() {
|
|
12990
13011
|
const { db } = this.root;
|
|
12991
13012
|
const props = this._parsedProps;
|
|
12992
|
-
const debug11 =
|
|
13013
|
+
const debug11 = Debug13("tscircuit:core:_runLocalAutorouting");
|
|
12993
13014
|
debug11(`[${this.getString()}] starting local autorouting`);
|
|
12994
13015
|
const autorouterConfig = this._getAutorouterConfig();
|
|
12995
13016
|
const { simpleRouteJson } = getSimpleRouteJsonFromCircuitJson({
|
|
@@ -13090,7 +13111,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
13090
13111
|
}
|
|
13091
13112
|
}
|
|
13092
13113
|
doInitialPcbTraceRender() {
|
|
13093
|
-
const debug11 =
|
|
13114
|
+
const debug11 = Debug13("tscircuit:core:doInitialPcbTraceRender");
|
|
13094
13115
|
if (!this.isSubcircuit) return;
|
|
13095
13116
|
if (this.root?.pcbDisabled) return;
|
|
13096
13117
|
if (this.getInheritedProperty("routingDisabled")) return;
|
|
@@ -13111,7 +13132,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
13111
13132
|
Group_doInitialSchematicTraceRender(this);
|
|
13112
13133
|
}
|
|
13113
13134
|
updatePcbTraceRender() {
|
|
13114
|
-
const debug11 =
|
|
13135
|
+
const debug11 = Debug13("tscircuit:core:updatePcbTraceRender");
|
|
13115
13136
|
debug11(`[${this.getString()}] updating...`);
|
|
13116
13137
|
if (!this.isSubcircuit) return;
|
|
13117
13138
|
if (this._shouldRouteAsync() && this._hasTracesToRoute() && !this._hasStartedAsyncAutorouting) {
|
|
@@ -17289,7 +17310,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17289
17310
|
var package_default = {
|
|
17290
17311
|
name: "@tscircuit/core",
|
|
17291
17312
|
type: "module",
|
|
17292
|
-
version: "0.0.
|
|
17313
|
+
version: "0.0.825",
|
|
17293
17314
|
types: "dist/index.d.ts",
|
|
17294
17315
|
main: "dist/index.js",
|
|
17295
17316
|
module: "dist/index.js",
|
|
@@ -17330,7 +17351,7 @@ var package_default = {
|
|
|
17330
17351
|
"@tscircuit/matchpack": "^0.0.16",
|
|
17331
17352
|
"@tscircuit/math-utils": "^0.0.29",
|
|
17332
17353
|
"@tscircuit/miniflex": "^0.0.4",
|
|
17333
|
-
"@tscircuit/props": "0.0.
|
|
17354
|
+
"@tscircuit/props": "0.0.381",
|
|
17334
17355
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
17335
17356
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
17336
17357
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -17401,7 +17422,7 @@ var package_default = {
|
|
|
17401
17422
|
};
|
|
17402
17423
|
|
|
17403
17424
|
// lib/RootCircuit.ts
|
|
17404
|
-
import
|
|
17425
|
+
import Debug14 from "debug";
|
|
17405
17426
|
var RootCircuit = class {
|
|
17406
17427
|
firstChild = null;
|
|
17407
17428
|
children;
|
|
@@ -17587,9 +17608,9 @@ var RootCircuit = class {
|
|
|
17587
17608
|
}
|
|
17588
17609
|
enableDebug(debug11) {
|
|
17589
17610
|
if (typeof debug11 === "string") {
|
|
17590
|
-
|
|
17611
|
+
Debug14.enable(debug11);
|
|
17591
17612
|
} else if (debug11 === null || debug11 === false) {
|
|
17592
|
-
|
|
17613
|
+
Debug14.disable();
|
|
17593
17614
|
}
|
|
17594
17615
|
}
|
|
17595
17616
|
getClientOrigin() {
|
|
@@ -17899,6 +17920,7 @@ export {
|
|
|
17899
17920
|
getSimpleRouteJsonFromCircuitJson,
|
|
17900
17921
|
normalizePinLabels,
|
|
17901
17922
|
orderedRenderPhases,
|
|
17923
|
+
resolveStaticFileImport,
|
|
17902
17924
|
sel,
|
|
17903
17925
|
useCapacitor,
|
|
17904
17926
|
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.826",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@tscircuit/matchpack": "^0.0.16",
|
|
43
43
|
"@tscircuit/math-utils": "^0.0.29",
|
|
44
44
|
"@tscircuit/miniflex": "^0.0.4",
|
|
45
|
-
"@tscircuit/props": "0.0.
|
|
45
|
+
"@tscircuit/props": "0.0.381",
|
|
46
46
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
47
47
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
48
48
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|