@jsenv/navi 0.29.320 → 0.29.321
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 +29 -2
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +29 -2
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/interactions.md +4 -1
- package/package.json +2 -2
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { installImportMetaCssBuild, windowHeightSignal, windowWidthSignal, visualViewportHeightSignal, visualViewportWidthSignal, getAppHeight, getAppWidth, coarsePointerSignal, smallTouchScreenSignal } from "./jsenv_navi_side_effects.js";
|
|
6
6
|
export { disableVirtualKeyboardOverlay } from "./jsenv_navi_side_effects.js";
|
|
7
|
-
import { elementIsFocusable, createIterableWeakSet, dispatchInternalCustomEvent, dispatchCustomEvent, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, getElementSignature, createPubSub, findEvent, createValueEffect, findFocusDelegateTarget, findFocusable, scrollIntoViewThroughScrollables, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, ELEMENT_SIZE_CHANGE, findSelfOrAncestorFixedPosition, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, chainEvent, keepTouchRefusable, isPressDrivenClick, waitForTap, waitForPressHeld, suppressClickAfterGesture, startDragToTravel, markDragSource, refuseDragTo, startDragTo, installPanZoom, createEventGroupLogger, getKeyboardEventDefaultAction, activeElementSignal, normalizeStyle, mergeOneStyle, getPositionedParent, normalizeStyles, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, scrollRoomTowards, getScrollContainer, isTouchDrivenEvent, scrollIntoViewScoped, closestOpenableAncestor, isAncestorOpen, isDisplayedDespiteClosedAncestor, observeAncestorOpenState, getAncestorOpenType, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, releaseWheelGesture, getScrollIntoViewScopedOffsets, wheelGestureIsTakenFrom, claimWheelGesture, initFocusGroup, stringifyStyle as stringifyStyle$1, resolveOklchLightness, contrastColor, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, getVirtualKeyboardOverlayHeight, onAncestorReopen, isPressDisputedByDrag, canScroll, measureWidestChildRow, performTabNavigation, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement } from "@jsenv/dom";
|
|
7
|
+
import { elementIsFocusable, createIterableWeakSet, dispatchInternalCustomEvent, dispatchCustomEvent, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, getElementSignature, createPubSub, findEvent, createValueEffect, findFocusDelegateTarget, findFocusable, scrollIntoViewThroughScrollables, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, ELEMENT_SIZE_CHANGE, findSelfOrAncestorFixedPosition, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, chainEvent, keepTouchRefusable, isPressDrivenClick, waitForTap, waitForPressHeld, suppressClickAfterGesture, startDragToTravel, dragSourceThatStoodDown, markDragSource, refuseDragTo, startDragTo, installPanZoom, createEventGroupLogger, getKeyboardEventDefaultAction, activeElementSignal, normalizeStyle, mergeOneStyle, getPositionedParent, normalizeStyles, createGroupTransitionController, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, watchWheelTravel, scrollRoomTowards, getScrollContainer, isTouchDrivenEvent, scrollIntoViewScoped, closestOpenableAncestor, isAncestorOpen, isDisplayedDespiteClosedAncestor, observeAncestorOpenState, getAncestorOpenType, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, releaseWheelGesture, getScrollIntoViewScopedOffsets, wheelGestureIsTakenFrom, claimWheelGesture, initFocusGroup, stringifyStyle as stringifyStyle$1, resolveOklchLightness, contrastColor, parsePositionArea, snapToPixel, trapFocusInside, trapScrollInside, getVirtualKeyboardOverlayHeight, onAncestorReopen, isPressDisputedByDrag, canScroll, measureWidestChildRow, performTabNavigation, dragAfterIntent, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement } from "@jsenv/dom";
|
|
8
8
|
export { chainEvent, clickIsSuppressed, contrastColor, createDragGestureController, dragAfterIntent, findEvent, markDragSource, startDragTo } from "@jsenv/dom";
|
|
9
9
|
import { signal, computed, effect, untracked, batch, useComputed, useSignal } from "@preact/signals";
|
|
10
10
|
import { isValidElement, createContext, render, h, toChildArray, options, cloneElement, Fragment as Fragment$1 } from "preact";
|
|
@@ -10911,7 +10911,17 @@ defineInteractionDetector({
|
|
|
10911
10911
|
},
|
|
10912
10912
|
});
|
|
10913
10913
|
}
|
|
10914
|
-
|
|
10914
|
+
// A press on something INSIDE this element that is picked up and
|
|
10915
|
+
// carried is that thing's, the same nearer word as the inner hold below:
|
|
10916
|
+
// a finger held still on a piece is the piece's own hold when it drags
|
|
10917
|
+
// by holding, and when it drags by distance it has decided nothing yet
|
|
10918
|
+
// at the delay — a hold answered there is a hold on a piece, and a carry
|
|
10919
|
+
// out of the same press the moment the hand moves. A surface that pans
|
|
10920
|
+
// steps back from the same source at the press (see pan_zoom.js).
|
|
10921
|
+
if (
|
|
10922
|
+
hasLongPress &&
|
|
10923
|
+
!isPressOnDragSourceInside(pointerDownEvent, element)
|
|
10924
|
+
) {
|
|
10915
10925
|
// A hold declared INSIDE this element, on this same press: the nearer
|
|
10916
10926
|
// one answers, the way a click is the innermost target's, and this
|
|
10917
10927
|
// wait is given up — two sheets opening from one hold is nobody's
|
|
@@ -11091,6 +11101,23 @@ const startSwipe = (
|
|
|
11091
11101
|
});
|
|
11092
11102
|
};
|
|
11093
11103
|
|
|
11104
|
+
// Whether the press landed on a drag source strictly inside the element — the
|
|
11105
|
+
// element itself being one is the other arrangement, where the grab answers
|
|
11106
|
+
// the hold (see refuseDragTo in @jsenv/dom). A source that stood down from this
|
|
11107
|
+
// press carries nothing, so it is no reason to hold back, and the walk goes on
|
|
11108
|
+
// above it the way a surface's does.
|
|
11109
|
+
const isPressOnDragSourceInside = (pointerDownEvent, element) => {
|
|
11110
|
+
const target = pointerDownEvent.target;
|
|
11111
|
+
if (!target || typeof target.closest !== "function") {
|
|
11112
|
+
return false;
|
|
11113
|
+
}
|
|
11114
|
+
let source = target.closest("[data-drag-source]");
|
|
11115
|
+
if (source && source === dragSourceThatStoodDown(pointerDownEvent)) {
|
|
11116
|
+
source = source.parentElement?.closest("[data-drag-source]") || null;
|
|
11117
|
+
}
|
|
11118
|
+
return Boolean(source) && source !== element && element.contains(source);
|
|
11119
|
+
};
|
|
11120
|
+
|
|
11094
11121
|
// Whether a press landing now completes the tap before it: the same hand, soon
|
|
11095
11122
|
// enough, and near enough. Axis by axis rather than as a distance, the way every
|
|
11096
11123
|
// other slop in this family is read.
|