@nice-code/action 0.4.1 → 0.4.2
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/build/devtools/browser/index.js +20 -15
- package/package.json +4 -4
|
@@ -4880,9 +4880,15 @@ var MONO_FONT = "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace";
|
|
|
4880
4880
|
var SANS_FONT = "ui-sans-serif, system-ui, sans-serif";
|
|
4881
4881
|
var DOCKED_SIZE_MIN = 140;
|
|
4882
4882
|
var POSITION_GRID = [
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4883
|
+
{ key: "tl", pos: null },
|
|
4884
|
+
{ key: "tc", pos: "dock-top" },
|
|
4885
|
+
{ key: "tr", pos: null },
|
|
4886
|
+
{ key: "ml", pos: "dock-left" },
|
|
4887
|
+
{ key: "mc", pos: null },
|
|
4888
|
+
{ key: "mr", pos: "dock-right" },
|
|
4889
|
+
{ key: "bl", pos: null },
|
|
4890
|
+
{ key: "bc", pos: "dock-bottom" },
|
|
4891
|
+
{ key: "br", pos: null }
|
|
4886
4892
|
];
|
|
4887
4893
|
function getDockSide(pos) {
|
|
4888
4894
|
switch (pos) {
|
|
@@ -5003,12 +5009,11 @@ function PositionPicker({
|
|
|
5003
5009
|
return /* @__PURE__ */ jsxDEV21("div", {
|
|
5004
5010
|
title: "Move / dock panel",
|
|
5005
5011
|
style: { display: "grid", gridTemplateColumns: "repeat(3, 9px)", gap: "2px", padding: "2px" },
|
|
5006
|
-
children: POSITION_GRID.
|
|
5012
|
+
children: POSITION_GRID.map(({ key, pos }) => {
|
|
5007
5013
|
if (pos == null)
|
|
5008
5014
|
return /* @__PURE__ */ jsxDEV21("div", {
|
|
5009
5015
|
style: { width: "9px", height: "9px" }
|
|
5010
|
-
},
|
|
5011
|
-
const isDock = pos.startsWith("dock-");
|
|
5016
|
+
}, key, false, undefined, this);
|
|
5012
5017
|
const isTopBottom = pos === "dock-top" || pos === "dock-bottom";
|
|
5013
5018
|
const isActive = pos === position;
|
|
5014
5019
|
return /* @__PURE__ */ jsxDEV21("div", {
|
|
@@ -5024,13 +5029,13 @@ function PositionPicker({
|
|
|
5024
5029
|
},
|
|
5025
5030
|
children: /* @__PURE__ */ jsxDEV21("div", {
|
|
5026
5031
|
style: {
|
|
5027
|
-
width:
|
|
5028
|
-
height:
|
|
5029
|
-
borderRadius:
|
|
5032
|
+
width: isTopBottom ? "9px" : "3px",
|
|
5033
|
+
height: isTopBottom ? "3px" : "9px",
|
|
5034
|
+
borderRadius: "1px",
|
|
5030
5035
|
background: isActive ? DEVTOOL_COLOR_SEMANTIC_SYSTEM : DEVTOOL_COLOR_TEXT_FAINT
|
|
5031
5036
|
}
|
|
5032
5037
|
}, undefined, false, undefined, this)
|
|
5033
|
-
},
|
|
5038
|
+
}, key, false, undefined, this);
|
|
5034
5039
|
})
|
|
5035
5040
|
}, undefined, false, undefined, this);
|
|
5036
5041
|
}
|
|
@@ -5403,12 +5408,12 @@ function NiceActionDevtools_Panel({
|
|
|
5403
5408
|
}
|
|
5404
5409
|
};
|
|
5405
5410
|
const setPrefs = (update) => {
|
|
5406
|
-
setPrefsRaw((prev) => {
|
|
5407
|
-
const next = { ...prev, ...update };
|
|
5408
|
-
writePrefs(next);
|
|
5409
|
-
return next;
|
|
5410
|
-
});
|
|
5411
|
+
setPrefsRaw((prev) => ({ ...prev, ...update }));
|
|
5411
5412
|
};
|
|
5413
|
+
useEffect4(() => {
|
|
5414
|
+
const timer = setTimeout(() => writePrefs(prefs), 250);
|
|
5415
|
+
return () => clearTimeout(timer);
|
|
5416
|
+
}, [prefs]);
|
|
5412
5417
|
const { position, isOpen, dockedHeight, dockedWidth, detailRatio } = prefs;
|
|
5413
5418
|
const dockSide = getDockSide(position);
|
|
5414
5419
|
const isHorizDock = dockSide === "top" || dockSide === "bottom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-code/action",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"build-types": "tsc --project tsconfig.build.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@nice-code/common-errors": "0.4.
|
|
48
|
-
"@nice-code/error": "0.4.
|
|
49
|
-
"@nice-code/util": "0.4.
|
|
47
|
+
"@nice-code/common-errors": "0.4.2",
|
|
48
|
+
"@nice-code/error": "0.4.2",
|
|
49
|
+
"@nice-code/util": "0.4.2",
|
|
50
50
|
"@standard-schema/spec": "^1.1.0",
|
|
51
51
|
"@tanstack/react-virtual": "^3.13.26",
|
|
52
52
|
"http-status-codes": "^2.3.0",
|