@jsenv/dom 0.17.64 → 0.17.66
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_dom.js +36 -5
- package/package.json +1 -1
package/dist/jsenv_dom.js
CHANGED
|
@@ -207,11 +207,13 @@ const looksLikeGeneratedId = (id) => {
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
|
-
*
|
|
210
|
+
* Creates an internal event without dispatching it, for a caller that hands
|
|
211
|
+
* the event to more than the element — an outcome told to the element that
|
|
212
|
+
* asked for it when it is still there, and to the closures waiting on it
|
|
213
|
+
* either way.
|
|
211
214
|
* Does not bubble — stays within the local subtree.
|
|
212
215
|
*/
|
|
213
|
-
const
|
|
214
|
-
el,
|
|
216
|
+
const createInternalCustomEvent = (
|
|
215
217
|
customEventName,
|
|
216
218
|
customEventDetail,
|
|
217
219
|
) => {
|
|
@@ -220,6 +222,22 @@ const dispatchInternalCustomEvent = (
|
|
|
220
222
|
cancelable: true,
|
|
221
223
|
});
|
|
222
224
|
chainEvent(customEvent, customEventDetail?.event);
|
|
225
|
+
return customEvent;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Dispatches an internal event on `el`.
|
|
230
|
+
* Does not bubble — stays within the local subtree.
|
|
231
|
+
*/
|
|
232
|
+
const dispatchInternalCustomEvent = (
|
|
233
|
+
el,
|
|
234
|
+
customEventName,
|
|
235
|
+
customEventDetail,
|
|
236
|
+
) => {
|
|
237
|
+
const customEvent = createInternalCustomEvent(
|
|
238
|
+
customEventName,
|
|
239
|
+
customEventDetail,
|
|
240
|
+
);
|
|
223
241
|
return el.dispatchEvent(customEvent);
|
|
224
242
|
};
|
|
225
243
|
|
|
@@ -8867,7 +8885,7 @@ const captureHolderByPointerId = new Map();
|
|
|
8867
8885
|
* back the gesture — `gestureInfo` (its `layout` with `xDelta`/`yDelta`, its velocity, the way
|
|
8868
8886
|
* it is going), `drag`, `release`, and `addDragCallback`/`addReleaseCallback` for whoever joins
|
|
8869
8887
|
* after it started. `grabViaPointer` gives back `null` when the press is not one it can read: a
|
|
8870
|
-
* secondary button, a text node.
|
|
8888
|
+
* secondary button, a text node, an element that has left the document since the press.
|
|
8871
8889
|
*/
|
|
8872
8890
|
const createDragGestureController = (options = {}) => {
|
|
8873
8891
|
const {
|
|
@@ -9505,6 +9523,19 @@ const createDragGestureController = (options = {}) => {
|
|
|
9505
9523
|
|
|
9506
9524
|
const grabViaPointer = (grabEvent, options) => {
|
|
9507
9525
|
if (grabEvent.type === "pointerdown") {
|
|
9526
|
+
// The element the pointer is held on is chosen at the press, and the
|
|
9527
|
+
// press is not always the moment the gesture starts: a drag that waits
|
|
9528
|
+
// for a distance or a hold starts later, and what the page did in
|
|
9529
|
+
// between — the answer to a hold, a render — can have taken that element
|
|
9530
|
+
// out of the document. The browser refuses a capture there, and a
|
|
9531
|
+
// capture whose element leaves the document mid-gesture is the gesture
|
|
9532
|
+
// ending (see onCaptureLost): gone before the grab is the same end, come
|
|
9533
|
+
// earlier. Said before anything is installed, so there is nothing to
|
|
9534
|
+
// take back down.
|
|
9535
|
+
const captureTarget = options?.pointerCaptureElement || grabEvent.target;
|
|
9536
|
+
if (!captureTarget.isConnected) {
|
|
9537
|
+
return null;
|
|
9538
|
+
}
|
|
9508
9539
|
return initDragByPointer(
|
|
9509
9540
|
grabEvent,
|
|
9510
9541
|
options,
|
|
@@ -21762,4 +21793,4 @@ const useResizeStatus = (elementRef, { as = "number" } = {}) => {
|
|
|
21762
21793
|
};
|
|
21763
21794
|
};
|
|
21764
21795
|
|
|
21765
|
-
export { EASING, ELEMENT_SIZE_CHANGE, activeElementSignal, addActiveElementEffect, addAttributeEffect, allowWheelThrough, appendStyles, applyNewPosition, canScroll, captureScrollState, chainEvent, claimWheelGesture, clickIsSuppressed, closestOpenableAncestor, contrastColor, createBackgroundColorTransition, createBackgroundTransition, createBorderRadiusTransition, createBorderTransition, createDragGestureController, createDragToMoveGestureController, createEventGroupLogger, createGroupTransitionController, createHeightTransition, createIterableWeakSet, createOpacityTransition, createPubSub, createStyleController, createTimelineTransition, createTransition, createTranslateXTransition, createValueEffect, createWidthTransition, cubicBezier, dispatchCustomEvent, dispatchInternalCustomEvent, dispatchPublicCustomEvent, dragAfterIntent, elementIsFocusable, elementIsVisibleForFocus, elementIsVisuallyVisible, findAfter, findAncestor, findBefore, findDescendant, findEvent, findFocusDelegateTarget, findFocusable, findSelfOrAncestorFixedPosition, formatEventSideEffect, getAncestorOpenType, getAvailableHeight, getAvailableWidth, getBackground, getBackgroundColor, getBorder, getBorderRadius, getBorderSizes, getContrastRatio, getDefaultStyles, getDragCoordinates, getDropTargetInfo, getElementSignature, getFirstVisuallyVisibleAncestor, getFocusVisibilityInfo, getHeight, getHeightWithoutTransition, getInnerHeight, getInnerWidth, getKeyboardEventDefaultAction, getLuminance, getMarginSizes, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOpacityWithoutTransition, getPaddingSizes, getPositionedParent, getPositioningScrollOffset, getPreferedColorScheme, getScrollBox, getScrollContainer, getScrollContainerSet, getScrollIntoViewScopedOffsets, getScrollRelativeRect, getSelfAndAncestorScrolls, getStyle, getTranslateX, getTranslateXWithoutTransition, getTranslateY, getVirtualKeyboardOverlayHeight, getVisuallyVisibleInfo, getWidth, getWidthWithoutTransition, hasCSSSizeUnit, initFlexDetailsSet, initFocusGroup, initPositionSticky, installPanZoom, isAncestorOpen, isDisplayedDespiteClosedAncestor, isPressDisputedByDrag, isPressDrivenClick, isPrimaryButtonEvent, isSameColor, isScrollable, isTouchDrivenEvent, keepTouchRefusable, markDragSource, measureLongestVisualLineWidth, measureScrollbar, measureWidestChildRow, mergeOneStyle, mergeTwoStyles, normalizeKeyboardKey, normalizeStyle, normalizeStyles, observeAncestorOpenState, onAncestorReopen, parsePositionArea, parseStyle, performTabNavigation, pickPositionRelativeTo, prefersDarkColors, prefersLightColors, preventFocusNav, preventFocusNavViaKeyboard, preventIntermediateScrollbar, refuseDragTo, releaseWheelGesture, resolveCSSColor, resolveCSSSize, resolveColorLuminance, resolveOklchLightness, scrollIntoViewScoped, scrollIntoViewThroughScrollables, scrollIntoViewWithStickyAwareness, scrollRoomTowards, setAttribute, setAttributes, setPlacementViewportInsets, setStyles, setVirtualKeyboardOverlaysContent, snapToPixel, startDragTo, startDragToResizeGesture, startDragToTravel, stickyAsRelativeCoords, stringifyStyle, subscribeVirtualKeyboardGeometryChange, subscribeVisualViewportResizeSettled, subscribeWindowResizeSettled, suppressClickAfterGesture, trapFocusInside, trapScrollInside, useActiveElement, useAvailableHeight, useAvailableWidth, useMaxHeight, useMaxWidth, useResizeStatus, visibleRectEffect, waitForPressHeld, waitForTap, watchWheelTravel, wheelGestureIsTakenFrom };
|
|
21796
|
+
export { EASING, ELEMENT_SIZE_CHANGE, activeElementSignal, addActiveElementEffect, addAttributeEffect, allowWheelThrough, appendStyles, applyNewPosition, canScroll, captureScrollState, chainEvent, claimWheelGesture, clickIsSuppressed, closestOpenableAncestor, contrastColor, createBackgroundColorTransition, createBackgroundTransition, createBorderRadiusTransition, createBorderTransition, createDragGestureController, createDragToMoveGestureController, createEventGroupLogger, createGroupTransitionController, createHeightTransition, createInternalCustomEvent, createIterableWeakSet, createOpacityTransition, createPubSub, createStyleController, createTimelineTransition, createTransition, createTranslateXTransition, createValueEffect, createWidthTransition, cubicBezier, dispatchCustomEvent, dispatchInternalCustomEvent, dispatchPublicCustomEvent, dragAfterIntent, dragSourceThatStoodDown, elementIsFocusable, elementIsVisibleForFocus, elementIsVisuallyVisible, findAfter, findAncestor, findBefore, findDescendant, findEvent, findFocusDelegateTarget, findFocusable, findSelfOrAncestorFixedPosition, formatEventSideEffect, getAncestorOpenType, getAvailableHeight, getAvailableWidth, getBackground, getBackgroundColor, getBorder, getBorderRadius, getBorderSizes, getContrastRatio, getDefaultStyles, getDragCoordinates, getDropTargetInfo, getElementSignature, getFirstVisuallyVisibleAncestor, getFocusVisibilityInfo, getHeight, getHeightWithoutTransition, getInnerHeight, getInnerWidth, getKeyboardEventDefaultAction, getLuminance, getMarginSizes, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOpacityWithoutTransition, getPaddingSizes, getPositionedParent, getPositioningScrollOffset, getPreferedColorScheme, getScrollBox, getScrollContainer, getScrollContainerSet, getScrollIntoViewScopedOffsets, getScrollRelativeRect, getSelfAndAncestorScrolls, getStyle, getTranslateX, getTranslateXWithoutTransition, getTranslateY, getVirtualKeyboardOverlayHeight, getVisuallyVisibleInfo, getWidth, getWidthWithoutTransition, hasCSSSizeUnit, initFlexDetailsSet, initFocusGroup, initPositionSticky, installPanZoom, isAncestorOpen, isDisplayedDespiteClosedAncestor, isPressDisputedByDrag, isPressDrivenClick, isPrimaryButtonEvent, isSameColor, isScrollable, isTouchDrivenEvent, keepTouchRefusable, markDragSource, measureLongestVisualLineWidth, measureScrollbar, measureWidestChildRow, mergeOneStyle, mergeTwoStyles, normalizeKeyboardKey, normalizeStyle, normalizeStyles, observeAncestorOpenState, onAncestorReopen, parsePositionArea, parseStyle, performTabNavigation, pickPositionRelativeTo, prefersDarkColors, prefersLightColors, preventFocusNav, preventFocusNavViaKeyboard, preventIntermediateScrollbar, refuseDragTo, releaseWheelGesture, resolveCSSColor, resolveCSSSize, resolveColorLuminance, resolveOklchLightness, scrollIntoViewScoped, scrollIntoViewThroughScrollables, scrollIntoViewWithStickyAwareness, scrollRoomTowards, setAttribute, setAttributes, setPlacementViewportInsets, setStyles, setVirtualKeyboardOverlaysContent, snapToPixel, startDragTo, startDragToResizeGesture, startDragToTravel, stickyAsRelativeCoords, stringifyStyle, subscribeVirtualKeyboardGeometryChange, subscribeVisualViewportResizeSettled, subscribeWindowResizeSettled, suppressClickAfterGesture, trapFocusInside, trapScrollInside, useActiveElement, useAvailableHeight, useAvailableWidth, useMaxHeight, useMaxWidth, useResizeStatus, visibleRectEffect, waitForPressHeld, waitForTap, watchWheelTravel, wheelGestureIsTakenFrom };
|