@tscircuit/core 0.0.194 → 0.0.196

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 CHANGED
@@ -149,6 +149,7 @@ declare abstract class PrimitiveComponent<ZodProps extends ZodType = any> extend
149
149
  props: z.input<ZodProps>;
150
150
  _parsedProps: z.infer<ZodProps>;
151
151
  get componentName(): string;
152
+ getInheritedProperty(propertyName: string): any;
152
153
  get lowercaseComponentName(): string;
153
154
  externallyAddedAliases: string[];
154
155
  /**
package/dist/index.js CHANGED
@@ -488,6 +488,16 @@ var PrimitiveComponent = class extends Renderable {
488
488
  get componentName() {
489
489
  return this.config.componentName;
490
490
  }
491
+ getInheritedProperty(propertyName) {
492
+ let current = this;
493
+ while (current) {
494
+ if (current._parsedProps && propertyName in current._parsedProps) {
495
+ return current._parsedProps[propertyName];
496
+ }
497
+ current = current.parent;
498
+ }
499
+ return void 0;
500
+ }
491
501
  get lowercaseComponentName() {
492
502
  return this.componentName.toLowerCase();
493
503
  }
@@ -4611,7 +4621,7 @@ var Chip = class extends NormalComponent {
4611
4621
  supplier_part_numbers: props.supplierPartNumbers
4612
4622
  });
4613
4623
  const dimensions = this._getSchematicBoxDimensions();
4614
- const hasOnlyLeftAndRightPins = props.schPortArrangement?.topSide !== void 0 && props.schPortArrangement?.bottomSide !== void 0;
4624
+ const hasTopOrBottomPins = props.schPortArrangement?.topSide !== void 0 || props.schPortArrangement?.bottomSide !== void 0;
4615
4625
  const schematic_box_width = dimensions?.getSize().width;
4616
4626
  const schematic_box_height = dimensions?.getSize().height;
4617
4627
  const manufacturer_part_number_text = db.schematic_text.insert({
@@ -4620,8 +4630,8 @@ var Chip = class extends NormalComponent {
4620
4630
  anchor: "left",
4621
4631
  rotation: 0,
4622
4632
  position: {
4623
- x: hasOnlyLeftAndRightPins ? (props.schX ?? 0) + (schematic_box_width ?? 0) / 2 : (props.schX ?? 0) - (schematic_box_width ?? 0) / 2,
4624
- y: hasOnlyLeftAndRightPins ? (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.55 : (props.schY ?? 0) - (schematic_box_height ?? 0) / 2 - 0.13
4633
+ x: hasTopOrBottomPins ? (props.schX ?? 0) + (schematic_box_width ?? 0) / 2 + 0.1 : (props.schX ?? 0) - (schematic_box_width ?? 0) / 2,
4634
+ y: hasTopOrBottomPins ? (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.35 : (props.schY ?? 0) - (schematic_box_height ?? 0) / 2 - 0.13
4625
4635
  },
4626
4636
  color: "#006464"
4627
4637
  });
@@ -4631,8 +4641,8 @@ var Chip = class extends NormalComponent {
4631
4641
  anchor: "left",
4632
4642
  rotation: 0,
4633
4643
  position: {
4634
- x: hasOnlyLeftAndRightPins ? (props.schX ?? 0) + (schematic_box_width ?? 0) / 2 : (props.schX ?? 0) - (schematic_box_width ?? 0) / 2,
4635
- y: hasOnlyLeftAndRightPins ? (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.35 : (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.13
4644
+ x: hasTopOrBottomPins ? (props.schX ?? 0) + (schematic_box_width ?? 0) / 2 + 0.1 : (props.schX ?? 0) - (schematic_box_width ?? 0) / 2,
4645
+ y: hasTopOrBottomPins ? (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.55 : (props.schY ?? 0) + (schematic_box_height ?? 0) / 2 + 0.13
4636
4646
  },
4637
4647
  color: "#006464"
4638
4648
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.194",
4
+ "version": "0.0.196",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "@tscircuit/soup-util": "^0.0.40",
46
46
  "circuit-json": "^0.0.104",
47
47
  "circuit-json-to-connectivity-map": "^0.0.17",
48
- "circuit-to-svg": "^0.0.82",
48
+ "circuit-to-svg": "^0.0.84",
49
49
  "format-si-unit": "^0.0.2",
50
50
  "nanoid": "^5.0.7",
51
51
  "performance-now": "^2.1.0",