@tscircuit/pcb-viewer 1.11.449 → 1.11.450
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.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17518,6 +17518,12 @@ var COLORS = {
|
|
|
17518
17518
|
LABEL_TEXT: "white"
|
|
17519
17519
|
};
|
|
17520
17520
|
|
|
17521
|
+
// src/components/AnchorOffsetOverlay/common/format-offset-label.ts
|
|
17522
|
+
var formatOffsetLabel = (displayOffset, computedOffsetMm) => {
|
|
17523
|
+
const value = displayOffset === void 0 || displayOffset === null ? computedOffsetMm.toFixed(2) : String(displayOffset);
|
|
17524
|
+
return value.trim().endsWith("mm") ? value : `${value}mm`;
|
|
17525
|
+
};
|
|
17526
|
+
|
|
17521
17527
|
// src/components/AnchorOffsetOverlay/AnchorOffsetOverlay.tsx
|
|
17522
17528
|
import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
17523
17529
|
var AnchorOffsetOverlay = ({
|
|
@@ -17583,8 +17589,8 @@ var AnchorOffsetOverlay = ({
|
|
|
17583
17589
|
const yLabelOffset = isTargetRightOfAnchor ? VISUAL_CONFIG.LABEL_OFFSET_RIGHT : VISUAL_CONFIG.LABEL_OFFSET_LEFT;
|
|
17584
17590
|
const shouldShowXLabel = xLineLength > VISUAL_CONFIG.MIN_LINE_LENGTH_FOR_LABEL;
|
|
17585
17591
|
const shouldShowYLabel = yLineLength > VISUAL_CONFIG.MIN_LINE_LENGTH_FOR_LABEL;
|
|
17586
|
-
const xLabelText =
|
|
17587
|
-
const yLabelText =
|
|
17592
|
+
const xLabelText = formatOffsetLabel(target.display_offset_x, offsetX);
|
|
17593
|
+
const yLabelText = formatOffsetLabel(target.display_offset_y, offsetY);
|
|
17588
17594
|
return /* @__PURE__ */ jsxs8("g", { children: [
|
|
17589
17595
|
/* @__PURE__ */ jsx11(
|
|
17590
17596
|
"line",
|
|
@@ -19211,7 +19217,7 @@ import {
|
|
|
19211
19217
|
// package.json
|
|
19212
19218
|
var package_default = {
|
|
19213
19219
|
name: "@tscircuit/pcb-viewer",
|
|
19214
|
-
version: "1.11.
|
|
19220
|
+
version: "1.11.449",
|
|
19215
19221
|
main: "dist/index.js",
|
|
19216
19222
|
type: "module",
|
|
19217
19223
|
repository: {
|