@tscircuit/core 0.0.861 → 0.0.862

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15862,6 +15862,32 @@ function inflateSourceInductor(sourceElm, inflatorContext) {
15862
15862
  }
15863
15863
  }
15864
15864
 
15865
+ // lib/components/primitive-components/Group/Subcircuit/inflators/inflateSourceDiode.ts
15866
+ function inflateSourceDiode(sourceElm, inflatorContext) {
15867
+ const { injectionDb, subcircuit, groupsMap } = inflatorContext;
15868
+ const pcbElm = injectionDb.pcb_component.getWhere({
15869
+ source_component_id: sourceElm.source_component_id
15870
+ });
15871
+ const cadElm = injectionDb.cad_component.getWhere({
15872
+ source_component_id: sourceElm.source_component_id
15873
+ });
15874
+ const diode = new Diode({
15875
+ name: sourceElm.name
15876
+ });
15877
+ if (pcbElm) {
15878
+ inflatePcbComponent(pcbElm, {
15879
+ ...inflatorContext,
15880
+ normalComponent: diode
15881
+ });
15882
+ }
15883
+ if (sourceElm.source_group_id && groupsMap?.has(sourceElm.source_group_id)) {
15884
+ const group = groupsMap.get(sourceElm.source_group_id);
15885
+ group.add(diode);
15886
+ } else {
15887
+ subcircuit.add(diode);
15888
+ }
15889
+ }
15890
+
15865
15891
  // lib/components/primitive-components/Group/Subcircuit/Subcircuit.ts
15866
15892
  var Subcircuit = class extends Group6 {
15867
15893
  constructor(props) {
@@ -15913,6 +15939,9 @@ var Subcircuit = class extends Group6 {
15913
15939
  case "simple_inductor":
15914
15940
  inflateSourceInductor(sourceComponent, inflationCtx);
15915
15941
  break;
15942
+ case "simple_diode":
15943
+ inflateSourceDiode(sourceComponent, inflationCtx);
15944
+ break;
15916
15945
  case "simple_chip":
15917
15946
  inflateSourceChip(sourceComponent, inflationCtx);
15918
15947
  break;
@@ -17775,7 +17804,7 @@ import { identity as identity6 } from "transformation-matrix";
17775
17804
  var package_default = {
17776
17805
  name: "@tscircuit/core",
17777
17806
  type: "module",
17778
- version: "0.0.860",
17807
+ version: "0.0.861",
17779
17808
  types: "dist/index.d.ts",
17780
17809
  main: "dist/index.js",
17781
17810
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.861",
4
+ "version": "0.0.862",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",