dsh-sidebar-shelves 0.1.4 → 0.1.6
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/client.js +7 -9
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -1525,13 +1525,6 @@ window.__ModuleLoader__.load({
|
|
|
1525
1525
|
const [removeProject, setRemoveProject] = React.useState(null);
|
|
1526
1526
|
const [toast, setToast] = React.useState(null);
|
|
1527
1527
|
const [clock, bumpClock] = React.useReducer((n) => n + 1, 0);
|
|
1528
|
-
// The pointer point is a zero-size rect; the Menu primitive clamps it to
|
|
1529
|
-
// the viewport and follows scroll and resize while open.
|
|
1530
|
-
const cardMenuRect = React.useCallback(() => {
|
|
1531
|
-
const menu = cardMenuRef.current;
|
|
1532
|
-
if (menu === null) return null;
|
|
1533
|
-
return { left: menu.x, right: menu.x, top: menu.y, bottom: menu.y, width: 0, height: 0 };
|
|
1534
|
-
}, []);
|
|
1535
1528
|
|
|
1536
1529
|
React.useEffect(() => {
|
|
1537
1530
|
const id = window.setInterval(bumpClock, 60000);
|
|
@@ -2346,8 +2339,12 @@ window.__ModuleLoader__.load({
|
|
|
2346
2339
|
onClose: closeCardMenu,
|
|
2347
2340
|
side: 'bottom',
|
|
2348
2341
|
portal: true,
|
|
2342
|
+
contextual: true,
|
|
2349
2343
|
autoFocus: cardMenu?.keyboard === true,
|
|
2350
|
-
getAnchorRect
|
|
2344
|
+
// DSH 0.2.2 replaced Menu.getAnchorRect with a client-viewport
|
|
2345
|
+
// anchorPoint; a pointer gesture passes clientX/clientY, a keyboard
|
|
2346
|
+
// open passes the row's rect origin, both in the same coordinates.
|
|
2347
|
+
anchorPoint: cardMenu === null ? undefined : { x: cardMenu.x, y: cardMenu.y },
|
|
2351
2348
|
}),
|
|
2352
2349
|
toast === null
|
|
2353
2350
|
? null
|
|
@@ -2527,7 +2524,8 @@ window.__ModuleLoader__.load({
|
|
|
2527
2524
|
onClose,
|
|
2528
2525
|
side: 'bottom',
|
|
2529
2526
|
portal: true,
|
|
2530
|
-
getAnchorRect
|
|
2527
|
+
// DSH 0.2.2 replaced Menu.getAnchorRect with an external anchor ref.
|
|
2528
|
+
anchorRef,
|
|
2531
2529
|
}),
|
|
2532
2530
|
h(
|
|
2533
2531
|
Modal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sidebar-shelves",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Two-line session cards for the DSH sidebar: per-workspace project icons, pinning, archiving, project removal, status markers, job counts, and recency sorting",
|
|
6
6
|
"license": "MIT",
|