@jsenv/navi 0.29.70 → 0.29.72
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 +17 -3
- package/dist/jsenv_navi.js.map +4 -3
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { installImportMetaCssBuild, windowHeightSignal, windowWidthSignal, visualViewportHeightSignal, visualViewportWidthSignal, getAppHeight, getAppWidth, smallTouchScreenSignal } from "./jsenv_navi_side_effects.js";
|
|
6
6
|
export { coarsePointerSignal, disableVirtualKeyboardOverlay } from "./jsenv_navi_side_effects.js";
|
|
7
|
-
import { elementIsFocusable, createPubSub, dispatchInternalCustomEvent, dispatchCustomEvent, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, getElementSignature, findEvent, createValueEffect, 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, scrollRoomTowards, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, onAncestorReopen, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, findBefore, findAfter, initFocusGroup, scrollIntoViewScoped, getScrollContainer, canScroll, measureWidestChildRow, performTabNavigation, wheelGestureIsTakenFrom, releaseWheelGesture, claimWheelGesture, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
|
|
8
|
-
export { contrastColor, findEvent, startDragTo } from "@jsenv/dom";
|
|
7
|
+
import { elementIsFocusable, createPubSub, dispatchInternalCustomEvent, dispatchCustomEvent, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, getElementSignature, findEvent, createValueEffect, 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, clickIsSuppressed, scrollRoomTowards, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, onAncestorReopen, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, findBefore, findAfter, initFocusGroup, scrollIntoViewScoped, getScrollContainer, canScroll, measureWidestChildRow, performTabNavigation, wheelGestureIsTakenFrom, releaseWheelGesture, claimWheelGesture, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
|
|
8
|
+
export { clickIsSuppressed, contrastColor, findEvent, startDragTo } from "@jsenv/dom";
|
|
9
9
|
import { signal, computed, effect, batch, untracked, useSignal } from "@preact/signals";
|
|
10
10
|
import { createContext, isValidElement, h, Fragment, render, toChildArray, options, cloneElement } from "preact";
|
|
11
11
|
import { useContext, useLayoutEffect, useCallback, useRef, useState, useEffect, useMemo, useId, useErrorBoundary } from "preact/hooks";
|
|
@@ -22317,6 +22317,13 @@ const setupBrowserIntegrationViaHistory = ({
|
|
|
22317
22317
|
if (e.defaultPrevented) {
|
|
22318
22318
|
return;
|
|
22319
22319
|
}
|
|
22320
|
+
if (clickIsSuppressed()) {
|
|
22321
|
+
// The click that ends a gesture (click_suppression.js in @jsenv/dom).
|
|
22322
|
+
// Its suppressor also listens on window in capture, so whichever
|
|
22323
|
+
// module registered first runs first — asked explicitly, the order
|
|
22324
|
+
// stops mattering.
|
|
22325
|
+
return;
|
|
22326
|
+
}
|
|
22320
22327
|
const linkElement = e.target.closest("a");
|
|
22321
22328
|
if (!linkElement) {
|
|
22322
22329
|
return;
|
|
@@ -52001,7 +52008,14 @@ const SlideContainer = ({
|
|
|
52001
52008
|
// Where the track ends up, always — the animation below only covers the way
|
|
52002
52009
|
// there, and when it is over this is what holds.
|
|
52003
52010
|
track.style.setProperty("--slide-container-offset", offset);
|
|
52004
|
-
|
|
52011
|
+
// A travel to this very offset is already playing: left to play. Same
|
|
52012
|
+
// courtesy as the stage above — a re-render in the middle of a travel (a
|
|
52013
|
+
// signal read higher up answering) changes nothing here, and setting off
|
|
52014
|
+
// again from the on-screen position would replay what is left over a full
|
|
52015
|
+
// duration (the ask is zero, so ratioOfOneTravel answers 1), slowing the
|
|
52016
|
+
// travel at every re-render.
|
|
52017
|
+
const sameTravelPlaying = travelInFlight && !offsetDragged && offsetTargetBefore === offset;
|
|
52018
|
+
const travels = !sameTravelPlaying && !noTravel && durationMs > 0 && offsetBefore !== undefined && offsetBefore !== offset;
|
|
52005
52019
|
if (travels) {
|
|
52006
52020
|
// The time it takes is the distance it has left to cover: a travel picked
|
|
52007
52021
|
// up a fifth of the way through goes back in a fifth of the time, so what
|