@tscircuit/core 0.0.824 → 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 +53 -30
- 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":
|
|
@@ -10857,7 +10878,8 @@ function getPresetAutoroutingConfig(autorouterConfig) {
|
|
|
10857
10878
|
}
|
|
10858
10879
|
const preset = typeof autorouterConfig === "object" ? autorouterConfig.preset : autorouterConfig;
|
|
10859
10880
|
const providedConfig = typeof autorouterConfig === "object" ? autorouterConfig : {};
|
|
10860
|
-
|
|
10881
|
+
const normalizedPreset = typeof preset === "string" ? preset.replace(/_/g, "-") : preset;
|
|
10882
|
+
switch (normalizedPreset) {
|
|
10861
10883
|
case "auto-local":
|
|
10862
10884
|
return {
|
|
10863
10885
|
local: true,
|
|
@@ -10905,7 +10927,7 @@ import {
|
|
|
10905
10927
|
import {
|
|
10906
10928
|
length as length4
|
|
10907
10929
|
} from "circuit-json";
|
|
10908
|
-
import
|
|
10930
|
+
import Debug8 from "debug";
|
|
10909
10931
|
|
|
10910
10932
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack/applyComponentConstraintClusters.ts
|
|
10911
10933
|
import * as kiwi2 from "@lume/kiwi";
|
|
@@ -11342,7 +11364,7 @@ function getObstacleDimensionsFromPlatedHole(hole) {
|
|
|
11342
11364
|
|
|
11343
11365
|
// lib/components/primitive-components/Group/Group_doInitialPcbLayoutPack/Group_doInitialPcbLayoutPack.ts
|
|
11344
11366
|
var DEFAULT_MIN_GAP = "1mm";
|
|
11345
|
-
var debug6 =
|
|
11367
|
+
var debug6 = Debug8("Group_doInitialPcbLayoutPack");
|
|
11346
11368
|
var Group_doInitialPcbLayoutPack = (group) => {
|
|
11347
11369
|
const { db } = group.root;
|
|
11348
11370
|
const { _parsedProps: props } = group;
|
|
@@ -11634,7 +11656,7 @@ import { convertSrjToGraphicsObject } from "@tscircuit/capacity-autorouter";
|
|
|
11634
11656
|
|
|
11635
11657
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
|
|
11636
11658
|
import { SchematicTracePipelineSolver as SchematicTracePipelineSolver4 } from "@tscircuit/schematic-trace-solver";
|
|
11637
|
-
import
|
|
11659
|
+
import Debug11 from "debug";
|
|
11638
11660
|
|
|
11639
11661
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/createSchematicTraceSolverInputProblem.ts
|
|
11640
11662
|
import "@tscircuit/schematic-trace-solver";
|
|
@@ -12153,8 +12175,8 @@ function computeJunctions(traces, opts = {}) {
|
|
|
12153
12175
|
}
|
|
12154
12176
|
|
|
12155
12177
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyTracesFromSolverOutput.ts
|
|
12156
|
-
import
|
|
12157
|
-
var debug7 =
|
|
12178
|
+
import Debug9 from "debug";
|
|
12179
|
+
var debug7 = Debug9("Group_doInitialSchematicTraceRender");
|
|
12158
12180
|
function applyTracesFromSolverOutput(args) {
|
|
12159
12181
|
const { group, solver, pinIdToSchematicPortId, userNetIdToSck } = args;
|
|
12160
12182
|
const { db } = group.root;
|
|
@@ -12266,8 +12288,8 @@ var getNetNameFromPorts = (ports) => {
|
|
|
12266
12288
|
};
|
|
12267
12289
|
|
|
12268
12290
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/applyNetLabelPlacements.ts
|
|
12269
|
-
import
|
|
12270
|
-
var debug8 =
|
|
12291
|
+
import Debug10 from "debug";
|
|
12292
|
+
var debug8 = Debug10("Group_doInitialSchematicTraceRender");
|
|
12271
12293
|
function applyNetLabelPlacements(args) {
|
|
12272
12294
|
const {
|
|
12273
12295
|
group,
|
|
@@ -12432,7 +12454,7 @@ var getSchematicPortIdsWithRoutedTraces = ({
|
|
|
12432
12454
|
};
|
|
12433
12455
|
|
|
12434
12456
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/Group_doInitialSchematicTraceRender.ts
|
|
12435
|
-
var debug9 =
|
|
12457
|
+
var debug9 = Debug11("Group_doInitialSchematicTraceRender");
|
|
12436
12458
|
var Group_doInitialSchematicTraceRender = (group) => {
|
|
12437
12459
|
if (!group.root?._featureMspSchematicTraceRouting) return;
|
|
12438
12460
|
if (!group.isSubcircuit) return;
|
|
@@ -12492,7 +12514,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
|
|
|
12492
12514
|
|
|
12493
12515
|
// lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
|
|
12494
12516
|
import { circuitJsonToSpice } from "circuit-json-to-spice";
|
|
12495
|
-
import
|
|
12517
|
+
import Debug12 from "debug";
|
|
12496
12518
|
|
|
12497
12519
|
// lib/spice/get-spicey-engine.ts
|
|
12498
12520
|
import { simulate, spiceyTranToVGraphs } from "spicey";
|
|
@@ -12514,7 +12536,7 @@ var getSpiceyEngine = () => {
|
|
|
12514
12536
|
};
|
|
12515
12537
|
|
|
12516
12538
|
// lib/components/primitive-components/Group/Group_doInitialSimulationSpiceEngineRender.ts
|
|
12517
|
-
var debug10 =
|
|
12539
|
+
var debug10 = Debug12("tscircuit:core:Group_doInitialSimulationSpiceEngineRender");
|
|
12518
12540
|
function Group_doInitialSimulationSpiceEngineRender(group) {
|
|
12519
12541
|
if (!group.isSubcircuit) return;
|
|
12520
12542
|
const { root } = group;
|
|
@@ -12859,14 +12881,14 @@ var Group6 = class extends NormalComponent3 {
|
|
|
12859
12881
|
return false;
|
|
12860
12882
|
}
|
|
12861
12883
|
_hasTracesToRoute() {
|
|
12862
|
-
const debug11 =
|
|
12884
|
+
const debug11 = Debug13("tscircuit:core:_hasTracesToRoute");
|
|
12863
12885
|
const traces = this.selectAll("trace");
|
|
12864
12886
|
debug11(`[${this.getString()}] has ${traces.length} traces to route`);
|
|
12865
12887
|
return traces.length > 0;
|
|
12866
12888
|
}
|
|
12867
12889
|
async _runEffectMakeHttpAutoroutingRequest() {
|
|
12868
12890
|
const { db } = this.root;
|
|
12869
|
-
const debug11 =
|
|
12891
|
+
const debug11 = Debug13("tscircuit:core:_runEffectMakeHttpAutoroutingRequest");
|
|
12870
12892
|
const props = this._parsedProps;
|
|
12871
12893
|
const autorouterConfig = this._getAutorouterConfig();
|
|
12872
12894
|
const serverUrl = autorouterConfig.serverUrl;
|
|
@@ -12988,7 +13010,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
12988
13010
|
async _runLocalAutorouting() {
|
|
12989
13011
|
const { db } = this.root;
|
|
12990
13012
|
const props = this._parsedProps;
|
|
12991
|
-
const debug11 =
|
|
13013
|
+
const debug11 = Debug13("tscircuit:core:_runLocalAutorouting");
|
|
12992
13014
|
debug11(`[${this.getString()}] starting local autorouting`);
|
|
12993
13015
|
const autorouterConfig = this._getAutorouterConfig();
|
|
12994
13016
|
const { simpleRouteJson } = getSimpleRouteJsonFromCircuitJson({
|
|
@@ -13089,7 +13111,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
13089
13111
|
}
|
|
13090
13112
|
}
|
|
13091
13113
|
doInitialPcbTraceRender() {
|
|
13092
|
-
const debug11 =
|
|
13114
|
+
const debug11 = Debug13("tscircuit:core:doInitialPcbTraceRender");
|
|
13093
13115
|
if (!this.isSubcircuit) return;
|
|
13094
13116
|
if (this.root?.pcbDisabled) return;
|
|
13095
13117
|
if (this.getInheritedProperty("routingDisabled")) return;
|
|
@@ -13110,7 +13132,7 @@ var Group6 = class extends NormalComponent3 {
|
|
|
13110
13132
|
Group_doInitialSchematicTraceRender(this);
|
|
13111
13133
|
}
|
|
13112
13134
|
updatePcbTraceRender() {
|
|
13113
|
-
const debug11 =
|
|
13135
|
+
const debug11 = Debug13("tscircuit:core:updatePcbTraceRender");
|
|
13114
13136
|
debug11(`[${this.getString()}] updating...`);
|
|
13115
13137
|
if (!this.isSubcircuit) return;
|
|
13116
13138
|
if (this._shouldRouteAsync() && this._hasTracesToRoute() && !this._hasStartedAsyncAutorouting) {
|
|
@@ -17288,7 +17310,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17288
17310
|
var package_default = {
|
|
17289
17311
|
name: "@tscircuit/core",
|
|
17290
17312
|
type: "module",
|
|
17291
|
-
version: "0.0.
|
|
17313
|
+
version: "0.0.825",
|
|
17292
17314
|
types: "dist/index.d.ts",
|
|
17293
17315
|
main: "dist/index.js",
|
|
17294
17316
|
module: "dist/index.js",
|
|
@@ -17329,7 +17351,7 @@ var package_default = {
|
|
|
17329
17351
|
"@tscircuit/matchpack": "^0.0.16",
|
|
17330
17352
|
"@tscircuit/math-utils": "^0.0.29",
|
|
17331
17353
|
"@tscircuit/miniflex": "^0.0.4",
|
|
17332
|
-
"@tscircuit/props": "0.0.
|
|
17354
|
+
"@tscircuit/props": "0.0.381",
|
|
17333
17355
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
17334
17356
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
17335
17357
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
@@ -17400,7 +17422,7 @@ var package_default = {
|
|
|
17400
17422
|
};
|
|
17401
17423
|
|
|
17402
17424
|
// lib/RootCircuit.ts
|
|
17403
|
-
import
|
|
17425
|
+
import Debug14 from "debug";
|
|
17404
17426
|
var RootCircuit = class {
|
|
17405
17427
|
firstChild = null;
|
|
17406
17428
|
children;
|
|
@@ -17586,9 +17608,9 @@ var RootCircuit = class {
|
|
|
17586
17608
|
}
|
|
17587
17609
|
enableDebug(debug11) {
|
|
17588
17610
|
if (typeof debug11 === "string") {
|
|
17589
|
-
|
|
17611
|
+
Debug14.enable(debug11);
|
|
17590
17612
|
} else if (debug11 === null || debug11 === false) {
|
|
17591
|
-
|
|
17613
|
+
Debug14.disable();
|
|
17592
17614
|
}
|
|
17593
17615
|
}
|
|
17594
17616
|
getClientOrigin() {
|
|
@@ -17898,6 +17920,7 @@ export {
|
|
|
17898
17920
|
getSimpleRouteJsonFromCircuitJson,
|
|
17899
17921
|
normalizePinLabels,
|
|
17900
17922
|
orderedRenderPhases,
|
|
17923
|
+
resolveStaticFileImport,
|
|
17901
17924
|
sel,
|
|
17902
17925
|
useCapacitor,
|
|
17903
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",
|