@tscircuit/core 0.0.1341 → 0.0.1342

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 +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -18091,7 +18091,7 @@ import Debug8 from "debug";
18091
18091
  import { getBoundFromCenteredRect } from "@tscircuit/math-utils";
18092
18092
  import { symbols as symbols3 } from "schematic-symbols";
18093
18093
  var SYMBOL_TEXT_FONT_SIZE = 0.18;
18094
- var TEXT_BOX_ENABLED_FTYPES = /* @__PURE__ */ new Set(["simple_resistor"]);
18094
+ var TEXT_BOX_ENABLED_FTYPES = /* @__PURE__ */ new Set(["simple_resistor", "simple_capacitor"]);
18095
18095
  function getTextBounds({
18096
18096
  text,
18097
18097
  position,
@@ -19802,6 +19802,11 @@ function extendTraceEndpointsToReachPinsInsideExpandedBoundingBox(params, db) {
19802
19802
  const result = points.map((p) => ({ x: p.x, y: p.y }));
19803
19803
  const d2 = (a, b) => (a.x - b.x) ** 2 + (a.y - b.y) ** 2;
19804
19804
  const usedCenters = /* @__PURE__ */ new Set();
19805
+ for (let i = 0; i < centers.length; i++) {
19806
+ if (result.some((p) => d2(centers[i], p) <= 1e-12)) {
19807
+ usedCenters.add(i);
19808
+ }
19809
+ }
19805
19810
  const snap = (endpoint) => {
19806
19811
  const pt = endpoint === "start" ? result[0] : result[result.length - 1];
19807
19812
  let bestIndex = -1;
@@ -24047,7 +24052,7 @@ import { identity as identity5 } from "transformation-matrix";
24047
24052
  var package_default = {
24048
24053
  name: "@tscircuit/core",
24049
24054
  type: "module",
24050
- version: "0.0.1340",
24055
+ version: "0.0.1341",
24051
24056
  types: "dist/index.d.ts",
24052
24057
  main: "dist/index.js",
24053
24058
  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.1341",
4
+ "version": "0.0.1342",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",