@tscircuit/core 0.0.1352 → 0.0.1353

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 +28 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20385,16 +20385,33 @@ var insertNetLabelsForPortsMissingTrace = ({
20385
20385
  const dx = existingNetLabelForCurrentSourceConnection.anchor_position.x - schPort.center.x;
20386
20386
  const dy = existingNetLabelForCurrentSourceConnection.anchor_position.y - schPort.center.y;
20387
20387
  const labelIsNearPort = dx * dx + dy * dy < NEAR_EXISTING_NET_LABEL_DISTANCE * NEAR_EXISTING_NET_LABEL_DISTANCE;
20388
- if (labelIsNearPort && isGndNet) {
20389
- db.schematic_net_label.update(
20390
- existingNetLabelForCurrentSourceConnection.schematic_net_label_id,
20391
- {
20392
- text,
20393
- anchor_position: schPort.center,
20394
- center,
20395
- anchor_side: side
20396
- }
20397
- );
20388
+ if (labelIsNearPort) {
20389
+ if (isGndNet) {
20390
+ db.schematic_net_label.update(
20391
+ existingNetLabelForCurrentSourceConnection.schematic_net_label_id,
20392
+ {
20393
+ text,
20394
+ anchor_position: schPort.center,
20395
+ center,
20396
+ anchor_side: side
20397
+ }
20398
+ );
20399
+ } else if (!isPowerNet && existingNetLabelForCurrentSourceConnection.text === text) {
20400
+ const anchor_side = existingNetLabelForCurrentSourceConnection.anchor_side ?? side;
20401
+ db.schematic_net_label.update(
20402
+ existingNetLabelForCurrentSourceConnection.schematic_net_label_id,
20403
+ {
20404
+ text,
20405
+ anchor_position: schPort.center,
20406
+ center: computeSchematicNetLabelCenter({
20407
+ anchor_position: schPort.center,
20408
+ anchor_side,
20409
+ text
20410
+ }),
20411
+ anchor_side
20412
+ }
20413
+ );
20414
+ }
20398
20415
  continue;
20399
20416
  }
20400
20417
  const existingAtPort = db.schematic_net_label.list().some((nl) => {
@@ -24197,7 +24214,7 @@ import { identity as identity5 } from "transformation-matrix";
24197
24214
  var package_default = {
24198
24215
  name: "@tscircuit/core",
24199
24216
  type: "module",
24200
- version: "0.0.1351",
24217
+ version: "0.0.1352",
24201
24218
  types: "dist/index.d.ts",
24202
24219
  main: "dist/index.js",
24203
24220
  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.1352",
4
+ "version": "0.0.1353",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",