@jsenv/navi 0.29.37 → 0.29.38
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/jsenv_navi.js +20 -7
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* using @jsenv/navi as intended.
|
|
4
4
|
*/
|
|
5
5
|
import { installImportMetaCssBuild, windowHeightSignal, windowWidthSignal, visualViewportHeightSignal, visualViewportWidthSignal, coarsePointerSignal } from "./jsenv_navi_side_effects.js";
|
|
6
|
-
import { elementIsFocusable, createPubSub, dispatchInternalCustomEvent, dispatchCustomEvent, getElementSignature, findEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, ELEMENT_SIZE_CHANGE, findSelfOrAncestorFixedPosition, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, chainEvent, waitForPressHeld, suppressClickAfterGesture, startDragToTravel, startDragTo, createIterableWeakSet, createEventGroupLogger, getKeyboardEventDefaultAction, activeElementSignal, normalizeStyle, mergeOneStyle, getPositionedParent, mergeTwoStyles, normalizeStyles, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, closestOpenableAncestor, isAncestorOpen, observeAncestorOpenState, getAncestorOpenType, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, onAncestorReopen, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, scrollRoomTowards, findBefore, findAfter, initFocusGroup, scrollIntoViewScoped, getScrollContainer, canScroll, measureWidestChildRow, performTabNavigation, wheelGestureIsTakenFrom, releaseWheelGesture, claimWheelGesture, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
|
|
6
|
+
import { elementIsFocusable, createPubSub, dispatchInternalCustomEvent, dispatchCustomEvent, getElementSignature, findEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, ELEMENT_SIZE_CHANGE, findSelfOrAncestorFixedPosition, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, chainEvent, waitForPressHeld, suppressClickAfterGesture, startDragToTravel, markDragSource, startDragTo, createIterableWeakSet, createEventGroupLogger, getKeyboardEventDefaultAction, activeElementSignal, normalizeStyle, mergeOneStyle, getPositionedParent, mergeTwoStyles, normalizeStyles, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, closestOpenableAncestor, isAncestorOpen, observeAncestorOpenState, getAncestorOpenType, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, onAncestorReopen, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, scrollRoomTowards, findBefore, findAfter, initFocusGroup, scrollIntoViewScoped, getScrollContainer, canScroll, measureWidestChildRow, performTabNavigation, wheelGestureIsTakenFrom, releaseWheelGesture, claimWheelGesture, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
|
|
7
7
|
export { contrastColor, findEvent, startDragTo } from "@jsenv/dom";
|
|
8
8
|
import { signal, computed, effect, batch, useSignal } from "@preact/signals";
|
|
9
9
|
import { createContext, isValidElement, h, Fragment, render, toChildArray, options, cloneElement } from "preact";
|
|
@@ -12550,10 +12550,11 @@ defineInteractionDetector({
|
|
|
12550
12550
|
if (canReorder) {
|
|
12551
12551
|
element.setAttribute(REORDERABLE_ATTRIBUTE, "");
|
|
12552
12552
|
}
|
|
12553
|
-
// What @jsenv/dom puts on a drag source: no iOS callout,
|
|
12554
|
-
// the scroll until the press becomes a grab
|
|
12555
|
-
//
|
|
12556
|
-
|
|
12553
|
+
// What @jsenv/dom puts on a drag source: no iOS callout, the touch left to
|
|
12554
|
+
// the scroll until the press becomes a grab, and the listener that lets the
|
|
12555
|
+
// grab take it back. Its argument is the axis the SURROUNDINGS scroll on,
|
|
12556
|
+
// which for a list is the axis the list runs on.
|
|
12557
|
+
const unmarkDragSource = markDragSource(element, axes);
|
|
12557
12558
|
|
|
12558
12559
|
// What a release can mean, which is not all of what was declared: "grab" is a
|
|
12559
12560
|
// moment, not an outcome, and the gesture must not read it as one.
|
|
@@ -12630,7 +12631,7 @@ defineInteractionDetector({
|
|
|
12630
12631
|
|
|
12631
12632
|
return () => {
|
|
12632
12633
|
element.removeAttribute(REORDERABLE_ATTRIBUTE);
|
|
12633
|
-
|
|
12634
|
+
unmarkDragSource();
|
|
12634
12635
|
element.removeEventListener("pointerdown", onPointerDown);
|
|
12635
12636
|
};
|
|
12636
12637
|
},
|
|
@@ -26901,7 +26902,19 @@ const findFocusTarget = (containerEl) => {
|
|
|
26901
26902
|
// Neither is dropped, both are simply tried later — step 3 below for the
|
|
26902
26903
|
// first, and for the second the restore transferFocus does before ever
|
|
26903
26904
|
// calling here.
|
|
26904
|
-
|
|
26905
|
+
//
|
|
26906
|
+
// Skipped for good, unlike the two above: an element hidden from assistive
|
|
26907
|
+
// technology is not a place the focus can land at all. Something aria-hidden
|
|
26908
|
+
// and out of the tab order is a value holder standing behind what one
|
|
26909
|
+
// actually uses — a spin's headless picker behind its slides, say — and
|
|
26910
|
+
// landing there puts a ring on it, raises a phone's keyboard over the panel
|
|
26911
|
+
// that just opened, and has the browser complain about a focused aria-hidden
|
|
26912
|
+
// element. What one came to use is further down the same container.
|
|
26913
|
+
const isHiddenFromAssistiveTech = (element) =>
|
|
26914
|
+
Boolean(element.closest?.(`[aria-hidden="true"]`));
|
|
26915
|
+
|
|
26916
|
+
const skip = (element) =>
|
|
26917
|
+
isRestorableAutofocus(element) || isHiddenFromAssistiveTech(element);
|
|
26905
26918
|
|
|
26906
26919
|
// Every mark, not just the first: a mark is only worth stopping at if it
|
|
26907
26920
|
// leads somewhere focusable. One inside a screen waiting its turn (an inert
|