@tscircuit/core 0.0.859 → 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 +31 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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",
|