@jsenv/dom 0.17.29 → 0.17.31
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 +39 -1
- package/package.json +1 -1
package/dist/jsenv_dom.js
CHANGED
|
@@ -12817,6 +12817,14 @@ const startDragToCarryCopy = (event, {
|
|
|
12817
12817
|
const allItems = [];
|
|
12818
12818
|
const items = [];
|
|
12819
12819
|
for (const el of containerElement.querySelectorAll(itemSelector)) {
|
|
12820
|
+
// The copy in hand is a clone of an item, attributes included, and it
|
|
12821
|
+
// lives in this same parent: it matches the selector without being
|
|
12822
|
+
// an item. Excluded here rather than by stripping attributes off the
|
|
12823
|
+
// clone, because a custom itemSelector (a class, a tag) would still
|
|
12824
|
+
// match it.
|
|
12825
|
+
if (cloneWrapper.contains(el)) {
|
|
12826
|
+
continue;
|
|
12827
|
+
}
|
|
12820
12828
|
allItems.push(el);
|
|
12821
12829
|
if (el !== draggedElement) {
|
|
12822
12830
|
items.push(el);
|
|
@@ -14324,6 +14332,36 @@ const isAncestorOpen = (ancestor) => {
|
|
|
14324
14332
|
return true;
|
|
14325
14333
|
};
|
|
14326
14334
|
|
|
14335
|
+
/**
|
|
14336
|
+
* Whether `element` is on screen even though the openable ancestor it was
|
|
14337
|
+
* resolved against is closed. Ask it only about an ancestor `isAncestorOpen`
|
|
14338
|
+
* already said is closed.
|
|
14339
|
+
*
|
|
14340
|
+
* `[aria-expanded]` in OPENABLE_SELECTOR covers two opposite kinds of element:
|
|
14341
|
+
* the surface being opened (a <dialog>, a [popover], and the plain <div> navi's
|
|
14342
|
+
* custom renderers build a popup out of, which carries aria-expanded and
|
|
14343
|
+
* nothing else), which takes its whole subtree off screen while closed — and
|
|
14344
|
+
* the *trigger* that opens one (a picker's root, an expandable's header), whose
|
|
14345
|
+
* aria-expanded describes the popup it controls rather than its own contents:
|
|
14346
|
+
* its façade stays on screen the entire time aria-expanded is "false".
|
|
14347
|
+
*
|
|
14348
|
+
* Markup tells the two apart badly, so ask the layout instead. A closed surface
|
|
14349
|
+
* is display:none, natively for [popover]/<dialog> and through the library's
|
|
14350
|
+
* own closed-state CSS ([navi-hidden], :not([popover])) for the custom
|
|
14351
|
+
* renderers — so nothing inside one answers true here, while everything a
|
|
14352
|
+
* trigger keeps on screen does.
|
|
14353
|
+
*/
|
|
14354
|
+
const isDisplayedDespiteClosedAncestor = (element) => {
|
|
14355
|
+
if (typeof element.checkVisibility !== "function") {
|
|
14356
|
+
// Nothing to tell the two apart with: leave the caller treating the closed
|
|
14357
|
+
// ancestor as hiding this element.
|
|
14358
|
+
return false;
|
|
14359
|
+
}
|
|
14360
|
+
// Default options: the question is "does it have a layout box", not "can it
|
|
14361
|
+
// be seen" — visibility:hidden/opacity:0 keep geometry intact.
|
|
14362
|
+
return element.checkVisibility();
|
|
14363
|
+
};
|
|
14364
|
+
|
|
14327
14365
|
const getAncestorOpenType = (ancestor) => {
|
|
14328
14366
|
if (ancestor === document) {
|
|
14329
14367
|
return "document";
|
|
@@ -20021,4 +20059,4 @@ const useResizeStatus = (elementRef, { as = "number" } = {}) => {
|
|
|
20021
20059
|
};
|
|
20022
20060
|
};
|
|
20023
20061
|
|
|
20024
|
-
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, getScrollRelativeRect, getSelfAndAncestorScrolls, getStyle, getTranslateX, getTranslateXWithoutTransition, getTranslateY, getVirtualKeyboardOverlayHeight, getVisuallyVisibleInfo, getWidth, getWidthWithoutTransition, hasCSSSizeUnit, initFlexDetailsSet, initFocusGroup, initPositionSticky, isAncestorOpen, isPrimaryButtonEvent, isSameColor, isScrollable, isTouchDrivenEvent, markDragSource, measureLongestVisualLineWidth, measureScrollbar, measureWidestChildRow, mergeOneStyle, mergeTwoStyles, normalizeKeyboardKey, normalizeStyle, normalizeStyles, observeAncestorOpenState, onAncestorReopen, parsePositionArea, parseStyle, performTabNavigation, pickPositionRelativeTo, prefersDarkColors, prefersLightColors, preventFocusNav, preventFocusNavViaKeyboard, preventIntermediateScrollbar, releaseWheelGesture, resolveCSSColor, resolveCSSSize, resolveColorLuminance, resolveOklchLightness, scrollIntoViewScoped, scrollIntoViewWithStickyAwareness, scrollRoomTowards, setAttribute, setAttributes, setStyles, setVirtualKeyboardOverlaysContent, snapToPixel, startDragTo, startDragToResizeGesture, startDragToTravel, stickyAsRelativeCoords, stringifyStyle, subscribeVirtualKeyboardGeometryChange, subscribeVisualViewportResizeSettled, subscribeWindowResizeSettled, suppressClickAfterGesture, trapFocusInside, trapScrollInside, useActiveElement, useAvailableHeight, useAvailableWidth, useMaxHeight, useMaxWidth, useResizeStatus, visibleRectEffect, waitForPressHeld, watchWheelTravel, wheelGestureIsTakenFrom };
|
|
20062
|
+
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, getScrollRelativeRect, getSelfAndAncestorScrolls, getStyle, getTranslateX, getTranslateXWithoutTransition, getTranslateY, getVirtualKeyboardOverlayHeight, getVisuallyVisibleInfo, getWidth, getWidthWithoutTransition, hasCSSSizeUnit, initFlexDetailsSet, initFocusGroup, initPositionSticky, isAncestorOpen, isDisplayedDespiteClosedAncestor, isPrimaryButtonEvent, isSameColor, isScrollable, isTouchDrivenEvent, markDragSource, measureLongestVisualLineWidth, measureScrollbar, measureWidestChildRow, mergeOneStyle, mergeTwoStyles, normalizeKeyboardKey, normalizeStyle, normalizeStyles, observeAncestorOpenState, onAncestorReopen, parsePositionArea, parseStyle, performTabNavigation, pickPositionRelativeTo, prefersDarkColors, prefersLightColors, preventFocusNav, preventFocusNavViaKeyboard, preventIntermediateScrollbar, releaseWheelGesture, resolveCSSColor, resolveCSSSize, resolveColorLuminance, resolveOklchLightness, scrollIntoViewScoped, scrollIntoViewWithStickyAwareness, scrollRoomTowards, setAttribute, setAttributes, setStyles, setVirtualKeyboardOverlaysContent, snapToPixel, startDragTo, startDragToResizeGesture, startDragToTravel, stickyAsRelativeCoords, stringifyStyle, subscribeVirtualKeyboardGeometryChange, subscribeVisualViewportResizeSettled, subscribeWindowResizeSettled, suppressClickAfterGesture, trapFocusInside, trapScrollInside, useActiveElement, useAvailableHeight, useAvailableWidth, useMaxHeight, useMaxWidth, useResizeStatus, visibleRectEffect, waitForPressHeld, watchWheelTravel, wheelGestureIsTakenFrom };
|