@tscircuit/core 0.0.858 → 0.0.860
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.js +36 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9775,7 +9775,7 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
9775
9775
|
source_group_id: group.source_group_id
|
|
9776
9776
|
});
|
|
9777
9777
|
const bpcGraphBeforeGeneratedNetLabels = convertCircuitJsonToBpc(subtreeCircuitJson);
|
|
9778
|
-
if (debug4.enabled && global
|
|
9778
|
+
if (debug4.enabled && global?.debugGraphics) {
|
|
9779
9779
|
global.debugGraphics?.push(
|
|
9780
9780
|
getGraphicsForBpcGraph(bpcGraphBeforeGeneratedNetLabels, {
|
|
9781
9781
|
title: `floatingBpcGraph-${group.name}`
|
|
@@ -9821,7 +9821,7 @@ function Group_doInitialSchematicLayoutMatchAdapt(group) {
|
|
|
9821
9821
|
corpus: {}
|
|
9822
9822
|
}
|
|
9823
9823
|
);
|
|
9824
|
-
if (debug4.enabled && global
|
|
9824
|
+
if (debug4.enabled && global?.debugGraphics) {
|
|
9825
9825
|
global.debugGraphics?.push(
|
|
9826
9826
|
getGraphicsForBpcGraph(laidOutBpcGraph, {
|
|
9827
9827
|
title: `laidOutBpcGraph-${group.name}`
|
|
@@ -10280,7 +10280,7 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
|
|
|
10280
10280
|
}
|
|
10281
10281
|
const solver = new LayoutPipelineSolver(inputProblem);
|
|
10282
10282
|
debug5("Starting LayoutPipelineSolver...");
|
|
10283
|
-
if (debug5.enabled && global
|
|
10283
|
+
if (debug5.enabled && global?.debugGraphics) {
|
|
10284
10284
|
const initialViz = solver.visualize();
|
|
10285
10285
|
global.debugGraphics.push({
|
|
10286
10286
|
...initialViz,
|
|
@@ -10297,7 +10297,7 @@ function Group_doInitialSchematicLayoutMatchPack(group) {
|
|
|
10297
10297
|
const outputLayout = solver.getOutputLayout();
|
|
10298
10298
|
debug5("OutputLayout:", JSON.stringify(outputLayout, null, 2));
|
|
10299
10299
|
debug5("Solver completed successfully:", !solver.failed);
|
|
10300
|
-
if (debug5.enabled && global
|
|
10300
|
+
if (debug5.enabled && global?.debugGraphics) {
|
|
10301
10301
|
const finalViz = solver.visualize();
|
|
10302
10302
|
global.debugGraphics.push({
|
|
10303
10303
|
...finalViz,
|
|
@@ -11791,7 +11791,7 @@ var Group_doInitialPcbLayoutPack = (group) => {
|
|
|
11791
11791
|
});
|
|
11792
11792
|
}
|
|
11793
11793
|
const packOutput = pack(packInput);
|
|
11794
|
-
if (debug6.enabled && global
|
|
11794
|
+
if (debug6.enabled && global?.debugGraphics) {
|
|
11795
11795
|
const graphics = getGraphicsFromPackOutput(packOutput);
|
|
11796
11796
|
graphics.title = `packOutput-${group.name}`;
|
|
11797
11797
|
global.debugGraphics?.push(graphics);
|
|
@@ -15770,6 +15770,33 @@ var inflateSourceChip = (sourceElm, inflatorContext) => {
|
|
|
15770
15770
|
}
|
|
15771
15771
|
};
|
|
15772
15772
|
|
|
15773
|
+
// lib/components/primitive-components/Group/Subcircuit/inflators/inflateSourceCapacitor.ts
|
|
15774
|
+
function inflateSourceCapacitor(sourceElm, inflatorContext) {
|
|
15775
|
+
const { injectionDb, subcircuit, groupsMap } = inflatorContext;
|
|
15776
|
+
const pcbElm = injectionDb.pcb_component.getWhere({
|
|
15777
|
+
source_component_id: sourceElm.source_component_id
|
|
15778
|
+
});
|
|
15779
|
+
const cadElm = injectionDb.cad_component.getWhere({
|
|
15780
|
+
source_component_id: sourceElm.source_component_id
|
|
15781
|
+
});
|
|
15782
|
+
const capacitor = new Capacitor({
|
|
15783
|
+
name: sourceElm.name,
|
|
15784
|
+
capacitance: sourceElm.capacitance
|
|
15785
|
+
});
|
|
15786
|
+
if (pcbElm) {
|
|
15787
|
+
inflatePcbComponent(pcbElm, {
|
|
15788
|
+
...inflatorContext,
|
|
15789
|
+
normalComponent: capacitor
|
|
15790
|
+
});
|
|
15791
|
+
}
|
|
15792
|
+
if (sourceElm.source_group_id && groupsMap?.has(sourceElm.source_group_id)) {
|
|
15793
|
+
const group = groupsMap.get(sourceElm.source_group_id);
|
|
15794
|
+
group.add(capacitor);
|
|
15795
|
+
} else {
|
|
15796
|
+
subcircuit.add(capacitor);
|
|
15797
|
+
}
|
|
15798
|
+
}
|
|
15799
|
+
|
|
15773
15800
|
// lib/components/primitive-components/Group/Subcircuit/Subcircuit.ts
|
|
15774
15801
|
var Subcircuit = class extends Group6 {
|
|
15775
15802
|
constructor(props) {
|
|
@@ -15815,6 +15842,9 @@ var Subcircuit = class extends Group6 {
|
|
|
15815
15842
|
case "simple_resistor":
|
|
15816
15843
|
inflateSourceResistor(sourceComponent, inflationCtx);
|
|
15817
15844
|
break;
|
|
15845
|
+
case "simple_capacitor":
|
|
15846
|
+
inflateSourceCapacitor(sourceComponent, inflationCtx);
|
|
15847
|
+
break;
|
|
15818
15848
|
case "simple_chip":
|
|
15819
15849
|
inflateSourceChip(sourceComponent, inflationCtx);
|
|
15820
15850
|
break;
|
|
@@ -17715,7 +17745,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17715
17745
|
var package_default = {
|
|
17716
17746
|
name: "@tscircuit/core",
|
|
17717
17747
|
type: "module",
|
|
17718
|
-
version: "0.0.
|
|
17748
|
+
version: "0.0.859",
|
|
17719
17749
|
types: "dist/index.d.ts",
|
|
17720
17750
|
main: "dist/index.js",
|
|
17721
17751
|
module: "dist/index.js",
|