@jsenv/navi 0.29.365 → 0.29.366
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 +50 -6
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +8 -6
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/popup_lift.md +9 -0
- package/docs/popup_open.md +15 -2
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -64090,8 +64090,8 @@ const PickerCustom = props => {
|
|
|
64090
64090
|
// before computing popupId below, so two Pickers without an explicit id never collide.
|
|
64091
64091
|
// Captured before the fallback chain below overwrites props.id — needed to
|
|
64092
64092
|
// know whether the id actually came from the caller (stable) or from
|
|
64093
|
-
// useId()/ControlIdContext (
|
|
64094
|
-
// pickerNavType below.
|
|
64093
|
+
// useId()/ControlIdContext (a generated id names one mount: a reload, or a
|
|
64094
|
+
// return to this page, generates another), see pickerNavType below.
|
|
64095
64095
|
const hasExplicitId = Boolean(props.id);
|
|
64096
64096
|
const idDefault = useId();
|
|
64097
64097
|
const controlId = useContext(ControlIdContext);
|
|
@@ -64167,10 +64167,12 @@ const PickerCustom = props => {
|
|
|
64167
64167
|
// pushes a history entry so the back button closes it. Every other case
|
|
64168
64168
|
// (popover mode, or a dialog whose id was auto-generated via useId()/
|
|
64169
64169
|
// ControlIdContext) replaces the current history state instead — a
|
|
64170
|
-
// generated id
|
|
64171
|
-
//
|
|
64172
|
-
//
|
|
64173
|
-
//
|
|
64170
|
+
// generated id names one mount, so pushing it would either leave an entry
|
|
64171
|
+
// nothing reads or, worse, collide with a different component's own
|
|
64172
|
+
// generated id (see useNavState's own fallback for the same concern,
|
|
64173
|
+
// applied here proactively for the id we control). What a generated id
|
|
64174
|
+
// costs either way: the state is written, and the mount coming back to
|
|
64175
|
+
// the page (or a reload) finds it under a key it does not have.
|
|
64174
64176
|
const pickerNavType = mode === "dialog" && hasExplicitId ? "push" : "replace";
|
|
64175
64177
|
const [expanded, enterExpanded, leaveExpanded] = useNavState(popupId, {
|
|
64176
64178
|
type: pickerNavType,
|