@tscircuit/core 0.0.267 → 0.0.268

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
@@ -648,6 +648,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
648
648
  _doInitialSchematicTraceRenderWithDisplayLabel(): void;
649
649
  private _isSymbolToChipConnection;
650
650
  private _isSymbolToSymbolConnection;
651
+ private _isChipToChipConnection;
651
652
  doInitialSchematicTraceRender(): void;
652
653
  }
653
654
 
package/dist/index.js CHANGED
@@ -5119,6 +5119,15 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
5119
5119
  const isPort2Symbol = !port2.parent.config.shouldRenderAsSchematicBox;
5120
5120
  return isPort1Symbol && isPort2Symbol;
5121
5121
  }
5122
+ _isChipToChipConnection() {
5123
+ const { allPortsFound, ports } = this._findConnectedPorts();
5124
+ if (!allPortsFound || ports.length !== 2) return false;
5125
+ const [port1, port2] = ports;
5126
+ if (!port1?.parent || !port2?.parent) return false;
5127
+ const isPort1Chip = port1.parent.config.shouldRenderAsSchematicBox;
5128
+ const isPort2Chip = port2.parent.config.shouldRenderAsSchematicBox;
5129
+ return isPort1Chip && isPort2Chip;
5130
+ }
5122
5131
  doInitialSchematicTraceRender() {
5123
5132
  if (this.root?.schematicDisabled) return;
5124
5133
  const { db } = this.root;
@@ -5214,7 +5223,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
5214
5223
  });
5215
5224
  let results = autorouter.solveAndMapToTraces();
5216
5225
  if (results.length === 0) {
5217
- if (this._isSymbolToChipConnection() || this._isSymbolToSymbolConnection()) {
5226
+ if (this._isSymbolToChipConnection() || this._isSymbolToSymbolConnection() || this._isChipToChipConnection()) {
5218
5227
  this._doInitialSchematicTraceRenderWithDisplayLabel();
5219
5228
  return;
5220
5229
  }
@@ -5267,7 +5276,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
5267
5276
  if (!this.source_trace_id) {
5268
5277
  throw new Error("Missing source_trace_id for schematic trace insertion.");
5269
5278
  }
5270
- if (this.getSubcircuit()._parsedProps.schTraceAutoLabelEnabled && countComplexElements(junctions, edges) >= 5 && (this._isSymbolToChipConnection() || this._isSymbolToSymbolConnection())) {
5279
+ if (this.getSubcircuit()._parsedProps.schTraceAutoLabelEnabled && countComplexElements(junctions, edges) >= 5 && (this._isSymbolToChipConnection() || this._isSymbolToSymbolConnection() || this._isChipToChipConnection())) {
5271
5280
  this._doInitialSchematicTraceRenderWithDisplayLabel();
5272
5281
  return;
5273
5282
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.267",
4
+ "version": "0.0.268",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",