@jsenv/navi 0.29.317 → 0.29.318
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/dev/jsenv_navi.js +42 -17
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +42 -17
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -63300,20 +63300,33 @@ const PickerCalloutPopup = ({
|
|
|
63300
63300
|
onnavi_request_confirm?.(e);
|
|
63301
63301
|
};
|
|
63302
63302
|
calloutElement.addEventListener("navi_request_confirm", forwardConfirm);
|
|
63303
|
+
// Said once the content is in the shown callout: what the content defers
|
|
63304
|
+
// until it is displayed (useDisplayedLayoutEffect, watching this attribute)
|
|
63305
|
+
// then measures it where it is drawn. Same call stack as the open, like
|
|
63306
|
+
// Popover's own — see observeAncestorOpenState in @jsenv/dom.
|
|
63307
|
+
dock.setAttribute("aria-expanded", "true");
|
|
63303
63308
|
return closeEvent => {
|
|
63304
63309
|
calloutElement.removeEventListener("navi_request_confirm", forwardConfirm);
|
|
63305
63310
|
calloutManager.removeOpenToken(PICKER_CALLOUT_CONTENT_TOKEN, closeEvent);
|
|
63306
63311
|
dock.appendChild(host);
|
|
63312
|
+
dock.setAttribute("aria-expanded", "false");
|
|
63307
63313
|
};
|
|
63308
63314
|
};
|
|
63309
63315
|
return (
|
|
63310
63316
|
// What the picker addresses (aria-controls, the request events it
|
|
63311
63317
|
// forwards); the callout itself lives where the callout manager puts it.
|
|
63318
|
+
// aria-expanded here, on the dock rather than on the content element: the
|
|
63319
|
+
// openable ancestor the content finds at mount (the only time it looks),
|
|
63320
|
+
// and one that is no ancestor of the content once the callout holds it —
|
|
63321
|
+
// so a --navi-close said in there still resolves to the callout element,
|
|
63322
|
+
// the closest [aria-expanded] from the button. The open effect keeps it
|
|
63323
|
+
// current; preact leaves it alone, the prop never changes.
|
|
63312
63324
|
jsx(Box, {
|
|
63313
63325
|
as: "span",
|
|
63314
63326
|
ref: ref,
|
|
63315
63327
|
id: id,
|
|
63316
63328
|
className: "navi_picker_callout_dock",
|
|
63329
|
+
"aria-expanded": "false",
|
|
63317
63330
|
style: {
|
|
63318
63331
|
display: "contents"
|
|
63319
63332
|
},
|
|
@@ -66178,27 +66191,39 @@ const useListScrollSync = ({
|
|
|
66178
66191
|
});
|
|
66179
66192
|
const renderWindowRef = useRef(null);
|
|
66180
66193
|
renderWindowRef.current = renderWindow;
|
|
66181
|
-
//
|
|
66182
|
-
//
|
|
66183
|
-
//
|
|
66184
|
-
// moves
|
|
66185
|
-
|
|
66186
|
-
|
|
66187
|
-
|
|
66194
|
+
// The window is as wide as the budget says, whatever the state holds: a
|
|
66195
|
+
// budget that changes (the first paint's giving way to the scrolling one)
|
|
66196
|
+
// re-frames the window where it stands, in the render itself, the way
|
|
66197
|
+
// holdWindow below moves it — nothing else would, the scroll listener only
|
|
66198
|
+
// moves a window the user is about to leave. Derived on every render and
|
|
66199
|
+
// not written once: the state keeps the width it had, and the next render
|
|
66200
|
+
// copies it back into the ref above. The same object is handed out for as
|
|
66201
|
+
// long as the numbers hold, so the rows are not told about a window that
|
|
66202
|
+
// did not move.
|
|
66203
|
+
const framedWindowRef = useRef(null);
|
|
66204
|
+
{
|
|
66188
66205
|
const {
|
|
66189
|
-
start
|
|
66206
|
+
start,
|
|
66207
|
+
end
|
|
66190
66208
|
} = renderWindowRef.current;
|
|
66191
66209
|
const total = virtual.totalSignal.peek();
|
|
66192
|
-
let
|
|
66193
|
-
let
|
|
66194
|
-
if (total > 0 &&
|
|
66195
|
-
|
|
66196
|
-
|
|
66210
|
+
let framedStart = start;
|
|
66211
|
+
let framedEnd = start + renderBudget;
|
|
66212
|
+
if (total > 0 && framedEnd > total) {
|
|
66213
|
+
framedEnd = total;
|
|
66214
|
+
framedStart = total - renderBudget < 0 ? 0 : total - renderBudget;
|
|
66215
|
+
}
|
|
66216
|
+
if (framedStart !== start || framedEnd !== end) {
|
|
66217
|
+
const framed = framedWindowRef.current;
|
|
66218
|
+
if (framed && framed.start === framedStart && framed.end === framedEnd) {
|
|
66219
|
+
renderWindowRef.current = framed;
|
|
66220
|
+
} else {
|
|
66221
|
+
framedWindowRef.current = renderWindowRef.current = {
|
|
66222
|
+
start: framedStart,
|
|
66223
|
+
end: framedEnd
|
|
66224
|
+
};
|
|
66225
|
+
}
|
|
66197
66226
|
}
|
|
66198
|
-
renderWindowRef.current = {
|
|
66199
|
-
start: newStart,
|
|
66200
|
-
end: newEnd
|
|
66201
|
-
};
|
|
66202
66227
|
}
|
|
66203
66228
|
const updateRenderWindow = (newStart, newEnd, reason) => {
|
|
66204
66229
|
const {
|