@tscircuit/core 0.0.683 → 0.0.684

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 +22 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5743,6 +5743,7 @@ function Trace_doInitialPcbTraceRender(trace) {
5743
5743
  }
5744
5744
 
5745
5745
  // lib/components/primitive-components/Trace/Trace_doInitialPcbManualTraceRender.ts
5746
+ import { applyToPoint as applyToPoint6, identity as identity3 } from "transformation-matrix";
5746
5747
  function Trace_doInitialPcbManualTraceRender(trace) {
5747
5748
  if (trace.root?.pcbDisabled) return;
5748
5749
  const { db } = trace.root;
@@ -5794,11 +5795,16 @@ function Trace_doInitialPcbManualTraceRender(trace) {
5794
5795
  layer,
5795
5796
  start_pcb_port_id: anchorPort.pcb_port_id
5796
5797
  });
5798
+ const transform = anchorPort?._computePcbGlobalTransformBeforeLayout?.() || identity3();
5797
5799
  for (const pt of props.pcbPath) {
5800
+ const transformed = applyToPoint6(transform, {
5801
+ x: pt.x,
5802
+ y: pt.y
5803
+ });
5798
5804
  route.push({
5799
5805
  route_type: "wire",
5800
- x: anchorPos.x + pt.x,
5801
- y: anchorPos.y + pt.y,
5806
+ x: transformed.x,
5807
+ y: transformed.y,
5802
5808
  width,
5803
5809
  layer
5804
5810
  });
@@ -7359,7 +7365,7 @@ var NormalComponent = class extends PrimitiveComponent2 {
7359
7365
 
7360
7366
  // lib/components/normal-components/Board.ts
7361
7367
  import { boardProps } from "@tscircuit/props";
7362
- import { identity as identity3 } from "transformation-matrix";
7368
+ import { identity as identity4 } from "transformation-matrix";
7363
7369
 
7364
7370
  // lib/components/primitive-components/Group/Group.ts
7365
7371
  import {
@@ -7521,7 +7527,7 @@ import "zod";
7521
7527
 
7522
7528
  // lib/components/primitive-components/TraceHint.ts
7523
7529
  import { traceHintProps } from "@tscircuit/props";
7524
- import { applyToPoint as applyToPoint6 } from "transformation-matrix";
7530
+ import { applyToPoint as applyToPoint7 } from "transformation-matrix";
7525
7531
  var TraceHint = class extends PrimitiveComponent2 {
7526
7532
  matchedPort = null;
7527
7533
  get config() {
@@ -7561,7 +7567,7 @@ var TraceHint = class extends PrimitiveComponent2 {
7561
7567
  const globalTransform = this._computePcbGlobalTransformBeforeLayout();
7562
7568
  return offsets.map(
7563
7569
  (offset) => ({
7564
- ...applyToPoint6(globalTransform, offset),
7570
+ ...applyToPoint7(globalTransform, offset),
7565
7571
  via: offset.via,
7566
7572
  to_layer: offset.to_layer,
7567
7573
  trace_width: offset.trace_width
@@ -11534,7 +11540,7 @@ var Board = class extends Group6 {
11534
11540
  this.pcb_board_id = null;
11535
11541
  }
11536
11542
  _computePcbGlobalTransformBeforeLayout() {
11537
- return identity3();
11543
+ return identity4();
11538
11544
  }
11539
11545
  doInitialPcbDesignRuleChecks() {
11540
11546
  if (this.root?.pcbDisabled) return;
@@ -12480,7 +12486,7 @@ var Constraint2 = class extends PrimitiveComponent2 {
12480
12486
 
12481
12487
  // lib/components/primitive-components/FabricationNotePath.ts
12482
12488
  import { fabricationNotePathProps } from "@tscircuit/props";
12483
- import { applyToPoint as applyToPoint7 } from "transformation-matrix";
12489
+ import { applyToPoint as applyToPoint8 } from "transformation-matrix";
12484
12490
  var FabricationNotePath = class extends PrimitiveComponent2 {
12485
12491
  fabrication_note_path_id = null;
12486
12492
  get config() {
@@ -12507,7 +12513,7 @@ var FabricationNotePath = class extends PrimitiveComponent2 {
12507
12513
  layer,
12508
12514
  color: props.color,
12509
12515
  route: props.route.map((p) => {
12510
- const transformedPosition = applyToPoint7(transform, {
12516
+ const transformedPosition = applyToPoint8(transform, {
12511
12517
  x: p.x,
12512
12518
  y: p.y
12513
12519
  });
@@ -12681,8 +12687,8 @@ var BreakoutPoint = class extends PrimitiveComponent2 {
12681
12687
  // lib/components/primitive-components/NetLabel.ts
12682
12688
  import { netLabelProps } from "@tscircuit/props";
12683
12689
  import {
12684
- applyToPoint as applyToPoint8,
12685
- identity as identity4,
12690
+ applyToPoint as applyToPoint9,
12691
+ identity as identity5,
12686
12692
  translate as translate6
12687
12693
  } from "transformation-matrix";
12688
12694
  import { calculateElbow as calculateElbow2 } from "calculate-elbow";
@@ -12732,8 +12738,8 @@ var NetLabel = class extends PrimitiveComponent2 {
12732
12738
  const connectedPorts = this._getConnectedPorts();
12733
12739
  if (connectedPorts.length > 0) {
12734
12740
  const portPos = connectedPorts[0]._getGlobalSchematicPositionBeforeLayout();
12735
- const parentCenter = applyToPoint8(
12736
- this.parent?.computeSchematicGlobalTransform?.() ?? identity4(),
12741
+ const parentCenter = applyToPoint9(
12742
+ this.parent?.computeSchematicGlobalTransform?.() ?? identity5(),
12737
12743
  { x: 0, y: 0 }
12738
12744
  );
12739
12745
  return translate6(portPos.x - parentCenter.x, portPos.y - parentCenter.y);
@@ -14044,13 +14050,13 @@ var SchematicCell = class extends PrimitiveComponent2 {
14044
14050
  // lib/RootCircuit.ts
14045
14051
  import { su as su5 } from "@tscircuit/circuit-json-util";
14046
14052
  import { isValidElement as isValidElement2 } from "react";
14047
- import { identity as identity5 } from "transformation-matrix";
14053
+ import { identity as identity6 } from "transformation-matrix";
14048
14054
 
14049
14055
  // package.json
14050
14056
  var package_default = {
14051
14057
  name: "@tscircuit/core",
14052
14058
  type: "module",
14053
- version: "0.0.682",
14059
+ version: "0.0.683",
14054
14060
  types: "dist/index.d.ts",
14055
14061
  main: "dist/index.js",
14056
14062
  module: "dist/index.js",
@@ -14292,10 +14298,10 @@ var RootCircuit = class {
14292
14298
  throw new Error("project.preview is not yet implemented");
14293
14299
  }
14294
14300
  computeSchematicGlobalTransform() {
14295
- return identity5();
14301
+ return identity6();
14296
14302
  }
14297
14303
  _computePcbGlobalTransformBeforeLayout() {
14298
- return identity5();
14304
+ return identity6();
14299
14305
  }
14300
14306
  selectAll(selector) {
14301
14307
  this._guessRootComponent();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.683",
4
+ "version": "0.0.684",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",