@tscircuit/pcb-viewer 1.11.243 → 1.11.245
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 +28 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6276,7 +6276,8 @@ import { useContext } from "react";
|
|
|
6276
6276
|
import { useCallback } from "react";
|
|
6277
6277
|
var STORAGE_KEYS = {
|
|
6278
6278
|
IS_SHOWING_PCB_GROUPS: "pcb_viewer_is_showing_pcb_groups",
|
|
6279
|
-
PCB_GROUP_VIEW_MODE: "pcb_viewer_group_view_mode"
|
|
6279
|
+
PCB_GROUP_VIEW_MODE: "pcb_viewer_group_view_mode",
|
|
6280
|
+
IS_SHOWING_COPPER_POURS: "pcb_viewer_is_showing_copper_pours"
|
|
6280
6281
|
};
|
|
6281
6282
|
var getStoredBoolean = (key, defaultValue) => {
|
|
6282
6283
|
if (typeof window === "undefined") return defaultValue;
|
|
@@ -6327,7 +6328,10 @@ var createStore = (initialState = {}, disablePcbGroups = false) => createZustand
|
|
|
6327
6328
|
is_showing_rats_nest: false,
|
|
6328
6329
|
is_showing_autorouting: true,
|
|
6329
6330
|
is_showing_drc_errors: true,
|
|
6330
|
-
is_showing_copper_pours:
|
|
6331
|
+
is_showing_copper_pours: getStoredBoolean(
|
|
6332
|
+
STORAGE_KEYS.IS_SHOWING_COPPER_POURS,
|
|
6333
|
+
true
|
|
6334
|
+
),
|
|
6331
6335
|
is_showing_pcb_groups: disablePcbGroups ? false : getStoredBoolean(STORAGE_KEYS.IS_SHOWING_PCB_GROUPS, true),
|
|
6332
6336
|
pcb_group_view_mode: disablePcbGroups ? "all" : getStoredString(
|
|
6333
6337
|
STORAGE_KEYS.PCB_GROUP_VIEW_MODE,
|
|
@@ -6350,7 +6354,10 @@ var createStore = (initialState = {}, disablePcbGroups = false) => createZustand
|
|
|
6350
6354
|
setIsShowingMultipleTracesLength: (is_showing) => set({ is_showing_multiple_traces_length: is_showing }),
|
|
6351
6355
|
setIsShowingAutorouting: (is_showing) => set({ is_showing_autorouting: is_showing }),
|
|
6352
6356
|
setIsShowingDrcErrors: (is_showing) => set({ is_showing_drc_errors: is_showing }),
|
|
6353
|
-
setIsShowingCopperPours: (is_showing) =>
|
|
6357
|
+
setIsShowingCopperPours: (is_showing) => {
|
|
6358
|
+
setStoredBoolean(STORAGE_KEYS.IS_SHOWING_COPPER_POURS, is_showing);
|
|
6359
|
+
set({ is_showing_copper_pours: is_showing });
|
|
6360
|
+
},
|
|
6354
6361
|
setIsShowingPcbGroups: (is_showing) => {
|
|
6355
6362
|
if (disablePcbGroups) return;
|
|
6356
6363
|
setStoredBoolean(STORAGE_KEYS.IS_SHOWING_PCB_GROUPS, is_showing);
|
|
@@ -8462,6 +8469,7 @@ var LAYER_NAME_TO_COLOR = {
|
|
|
8462
8469
|
top: colors_default.board.copper.f,
|
|
8463
8470
|
inner1: colors_default.board.copper.in1,
|
|
8464
8471
|
inner2: colors_default.board.copper.in2,
|
|
8472
|
+
inner3: colors_default.board.copper.in3,
|
|
8465
8473
|
inner4: colors_default.board.copper.in4,
|
|
8466
8474
|
inner5: colors_default.board.copper.in5,
|
|
8467
8475
|
inner6: colors_default.board.copper.in6,
|
|
@@ -8481,16 +8489,16 @@ var LAYER_NAME_TO_COLOR = {
|
|
|
8481
8489
|
};
|
|
8482
8490
|
var DEFAULT_DRAW_ORDER = [
|
|
8483
8491
|
"board",
|
|
8484
|
-
"
|
|
8485
|
-
"top_silkscreen",
|
|
8486
|
-
"bottom_silkscreen",
|
|
8487
|
-
"bottom",
|
|
8488
|
-
"inner1",
|
|
8489
|
-
"inner2",
|
|
8490
|
-
"inner3",
|
|
8491
|
-
"inner4",
|
|
8492
|
+
"inner6",
|
|
8492
8493
|
"inner5",
|
|
8493
|
-
"
|
|
8494
|
+
"inner4",
|
|
8495
|
+
"inner3",
|
|
8496
|
+
"inner2",
|
|
8497
|
+
"inner1",
|
|
8498
|
+
"bottom",
|
|
8499
|
+
"bottom_silkscreen",
|
|
8500
|
+
"top",
|
|
8501
|
+
"top_silkscreen"
|
|
8494
8502
|
];
|
|
8495
8503
|
var Drawer = class {
|
|
8496
8504
|
canvasLayerMap;
|
|
@@ -8789,18 +8797,20 @@ var Drawer = class {
|
|
|
8789
8797
|
foregroundLayer === "top" ? "top_silkscreen" : foregroundLayer === "bottom" ? "bottom_silkscreen" : ""
|
|
8790
8798
|
]);
|
|
8791
8799
|
const order = [
|
|
8792
|
-
"drill",
|
|
8793
8800
|
"board",
|
|
8794
|
-
|
|
8795
|
-
...DEFAULT_DRAW_ORDER.filter((l) => l !== foregroundLayer)
|
|
8801
|
+
"drill",
|
|
8802
|
+
...DEFAULT_DRAW_ORDER.filter((l) => l !== foregroundLayer),
|
|
8803
|
+
foregroundLayer
|
|
8796
8804
|
];
|
|
8797
8805
|
order.forEach((layer, i) => {
|
|
8798
8806
|
const canvas = canvasLayerMap[layer];
|
|
8799
8807
|
if (!canvas) return;
|
|
8800
|
-
if (layer ===
|
|
8808
|
+
if (layer === foregroundLayer) {
|
|
8801
8809
|
canvas.style.zIndex = `${zIndexMap.topLayer}`;
|
|
8810
|
+
} else if (layer === "bottom_silkscreen" && foregroundLayer === "bottom" || layer === "top_silkscreen" && foregroundLayer === "top") {
|
|
8811
|
+
canvas.style.zIndex = `${zIndexMap.topLayer + 1}`;
|
|
8802
8812
|
} else {
|
|
8803
|
-
canvas.style.zIndex = `${zIndexMap.topLayer - i}`;
|
|
8813
|
+
canvas.style.zIndex = `${zIndexMap.topLayer - (order.length - i)}`;
|
|
8804
8814
|
}
|
|
8805
8815
|
canvas.style.opacity = opaqueLayers.has(layer) ? "1" : "0.5";
|
|
8806
8816
|
});
|
|
@@ -12320,7 +12330,7 @@ import { css as css3 } from "@emotion/css";
|
|
|
12320
12330
|
// package.json
|
|
12321
12331
|
var package_default = {
|
|
12322
12332
|
name: "@tscircuit/pcb-viewer",
|
|
12323
|
-
version: "1.11.
|
|
12333
|
+
version: "1.11.244",
|
|
12324
12334
|
main: "dist/index.js",
|
|
12325
12335
|
type: "module",
|
|
12326
12336
|
repository: "tscircuit/pcb-viewer",
|