@tscircuit/pcb-viewer 1.11.284 → 1.11.286
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 +58 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6938,11 +6938,9 @@ var getFullConnectivityMapFromCircuitJson = (circuitJson) => {
|
|
|
6938
6938
|
}
|
|
6939
6939
|
if (Array.isArray(route)) {
|
|
6940
6940
|
const startId = route.find(
|
|
6941
|
-
(rp) => rp
|
|
6941
|
+
(rp) => rp?.start_pcb_port_id
|
|
6942
6942
|
)?.start_pcb_port_id;
|
|
6943
|
-
const endId = route.find(
|
|
6944
|
-
(rp) => rp && rp.end_pcb_port_id
|
|
6945
|
-
)?.end_pcb_port_id;
|
|
6943
|
+
const endId = route.find((rp) => rp?.end_pcb_port_id)?.end_pcb_port_id;
|
|
6946
6944
|
if (startId && pcb_trace_id && endId) {
|
|
6947
6945
|
connections.push([startId, pcb_trace_id, endId]);
|
|
6948
6946
|
}
|
|
@@ -12696,7 +12694,7 @@ var isPcbGroup = (element) => element?.type === "pcb_group";
|
|
|
12696
12694
|
var isPcbBoard = (element) => element?.type === "pcb_board";
|
|
12697
12695
|
|
|
12698
12696
|
// src/components/AnchorOffsetOverlay/Board/index.tsx
|
|
12699
|
-
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
12697
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
12700
12698
|
var BoardAnchorOffsetOverlay = ({
|
|
12701
12699
|
elements,
|
|
12702
12700
|
highlightedPrimitives,
|
|
@@ -12857,7 +12855,7 @@ var BoardAnchorOffsetOverlay = ({
|
|
|
12857
12855
|
strokeDasharray: VISUAL_CONFIG.LINE_DASH_PATTERN
|
|
12858
12856
|
}
|
|
12859
12857
|
),
|
|
12860
|
-
/* @__PURE__ */ jsx12(
|
|
12858
|
+
target.type === "component" ? /* @__PURE__ */ jsx12(
|
|
12861
12859
|
"circle",
|
|
12862
12860
|
{
|
|
12863
12861
|
cx: targetScreen.x,
|
|
@@ -12867,7 +12865,30 @@ var BoardAnchorOffsetOverlay = ({
|
|
|
12867
12865
|
stroke: COLORS.COMPONENT_MARKER_STROKE,
|
|
12868
12866
|
strokeWidth: 1
|
|
12869
12867
|
}
|
|
12870
|
-
),
|
|
12868
|
+
) : /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
12869
|
+
/* @__PURE__ */ jsx12(
|
|
12870
|
+
"line",
|
|
12871
|
+
{
|
|
12872
|
+
x1: targetScreen.x - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
12873
|
+
y1: targetScreen.y,
|
|
12874
|
+
x2: targetScreen.x + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
12875
|
+
y2: targetScreen.y,
|
|
12876
|
+
stroke: COLORS.OFFSET_LINE,
|
|
12877
|
+
strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
|
|
12878
|
+
}
|
|
12879
|
+
),
|
|
12880
|
+
/* @__PURE__ */ jsx12(
|
|
12881
|
+
"line",
|
|
12882
|
+
{
|
|
12883
|
+
x1: targetScreen.x,
|
|
12884
|
+
y1: targetScreen.y - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
12885
|
+
x2: targetScreen.x,
|
|
12886
|
+
y2: targetScreen.y + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
12887
|
+
stroke: COLORS.OFFSET_LINE,
|
|
12888
|
+
strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
|
|
12889
|
+
}
|
|
12890
|
+
)
|
|
12891
|
+
] }),
|
|
12871
12892
|
shouldShowXLabel && /* @__PURE__ */ jsx12(
|
|
12872
12893
|
"foreignObject",
|
|
12873
12894
|
{
|
|
@@ -12938,7 +12959,7 @@ var BoardAnchorOffsetOverlay = ({
|
|
|
12938
12959
|
|
|
12939
12960
|
// src/components/AnchorOffsetOverlay/Group/index.tsx
|
|
12940
12961
|
import { applyToPoint as applyToPoint13 } from "transformation-matrix";
|
|
12941
|
-
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
12962
|
+
import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
12942
12963
|
var GroupAnchorOffsetOverlay = ({
|
|
12943
12964
|
elements,
|
|
12944
12965
|
highlightedPrimitives,
|
|
@@ -13140,7 +13161,7 @@ var GroupAnchorOffsetOverlay = ({
|
|
|
13140
13161
|
strokeDasharray: VISUAL_CONFIG.LINE_DASH_PATTERN
|
|
13141
13162
|
}
|
|
13142
13163
|
),
|
|
13143
|
-
/* @__PURE__ */ jsx13(
|
|
13164
|
+
target.type === "component" ? /* @__PURE__ */ jsx13(
|
|
13144
13165
|
"circle",
|
|
13145
13166
|
{
|
|
13146
13167
|
cx: targetScreen.x,
|
|
@@ -13150,7 +13171,30 @@ var GroupAnchorOffsetOverlay = ({
|
|
|
13150
13171
|
stroke: COLORS.COMPONENT_MARKER_STROKE,
|
|
13151
13172
|
strokeWidth: 1
|
|
13152
13173
|
}
|
|
13153
|
-
),
|
|
13174
|
+
) : /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
13175
|
+
/* @__PURE__ */ jsx13(
|
|
13176
|
+
"line",
|
|
13177
|
+
{
|
|
13178
|
+
x1: targetScreen.x - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
13179
|
+
y1: targetScreen.y,
|
|
13180
|
+
x2: targetScreen.x + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
13181
|
+
y2: targetScreen.y,
|
|
13182
|
+
stroke: COLORS.OFFSET_LINE,
|
|
13183
|
+
strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
|
|
13184
|
+
}
|
|
13185
|
+
),
|
|
13186
|
+
/* @__PURE__ */ jsx13(
|
|
13187
|
+
"line",
|
|
13188
|
+
{
|
|
13189
|
+
x1: targetScreen.x,
|
|
13190
|
+
y1: targetScreen.y - VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
13191
|
+
x2: targetScreen.x,
|
|
13192
|
+
y2: targetScreen.y + VISUAL_CONFIG.ANCHOR_MARKER_SIZE,
|
|
13193
|
+
stroke: COLORS.OFFSET_LINE,
|
|
13194
|
+
strokeWidth: VISUAL_CONFIG.ANCHOR_MARKER_STROKE_WIDTH
|
|
13195
|
+
}
|
|
13196
|
+
)
|
|
13197
|
+
] }),
|
|
13154
13198
|
shouldShowXLabel && /* @__PURE__ */ jsx13(
|
|
13155
13199
|
"foreignObject",
|
|
13156
13200
|
{
|
|
@@ -13223,7 +13267,7 @@ var GroupAnchorOffsetOverlay = ({
|
|
|
13223
13267
|
};
|
|
13224
13268
|
|
|
13225
13269
|
// src/components/MouseElementTracker.tsx
|
|
13226
|
-
import { Fragment as
|
|
13270
|
+
import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13227
13271
|
var getPolygonBoundingBox = (points) => {
|
|
13228
13272
|
if (points.length === 0) return null;
|
|
13229
13273
|
let minX = points[0].x;
|
|
@@ -13441,7 +13485,7 @@ var MouseElementTracker = ({
|
|
|
13441
13485
|
highlightedPrimitives
|
|
13442
13486
|
}
|
|
13443
13487
|
),
|
|
13444
|
-
transform && /* @__PURE__ */ jsxs11(
|
|
13488
|
+
transform && /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
|
13445
13489
|
/* @__PURE__ */ jsx14(
|
|
13446
13490
|
BoardAnchorOffsetOverlay,
|
|
13447
13491
|
{
|
|
@@ -13827,7 +13871,7 @@ import { css as css3 } from "@emotion/css";
|
|
|
13827
13871
|
// package.json
|
|
13828
13872
|
var package_default = {
|
|
13829
13873
|
name: "@tscircuit/pcb-viewer",
|
|
13830
|
-
version: "1.11.
|
|
13874
|
+
version: "1.11.285",
|
|
13831
13875
|
main: "dist/index.js",
|
|
13832
13876
|
type: "module",
|
|
13833
13877
|
repository: "tscircuit/pcb-viewer",
|
|
@@ -13864,7 +13908,7 @@ var package_default = {
|
|
|
13864
13908
|
"react-cosmos-plugin-vite": "7.0.0-beta.0",
|
|
13865
13909
|
"react-dom": "19.1.0",
|
|
13866
13910
|
"react-use": "^17.4.0",
|
|
13867
|
-
tscircuit: "^0.0.
|
|
13911
|
+
tscircuit: "^0.0.1040",
|
|
13868
13912
|
tsup: "^8.0.2",
|
|
13869
13913
|
"type-fest": "^3.0.0",
|
|
13870
13914
|
typescript: "^5.4.4",
|