@jsenv/navi 0.29.61 → 0.29.63

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.
@@ -3,7 +3,7 @@
3
3
  * using @jsenv/navi as intended.
4
4
  */
5
5
  import { installImportMetaCssBuild, windowHeightSignal, windowWidthSignal, visualViewportHeightSignal, visualViewportWidthSignal, getAppHeight, getAppWidth, smallTouchScreenSignal } from "./jsenv_navi_side_effects.js";
6
- export { coarsePointerSignal } from "./jsenv_navi_side_effects.js";
6
+ export { coarsePointerSignal, disableVirtualKeyboardOverlay } from "./jsenv_navi_side_effects.js";
7
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
8
  export { contrastColor, findEvent, startDragTo } from "@jsenv/dom";
9
9
  import { signal, computed, effect, batch, untracked, useSignal } from "@preact/signals";
@@ -16829,8 +16829,11 @@ const DIMENSION_PROPS = {
16829
16829
  return { flexGrow: expandWeight(value), flexBasis: "0%" };
16830
16830
  }
16831
16831
  if (parentBoxFlow === "flex-y" || parentBoxFlow === "inline-flex-y") {
16832
+ // width 100% is what fills the cross axis; align-self stretch would do
16833
+ // the same but takes the parent's alignX away — a maxWidth-capped item
16834
+ // in an alignX="center" parent would then sit at the start instead of
16835
+ // in the middle.
16832
16836
  return {
16833
- alignSelf: "stretch",
16834
16837
  width: "100%",
16835
16838
  };
16836
16839
  }
@@ -30335,8 +30338,40 @@ const useDialogProps = props => {
30335
30338
  // argument at all) docks it against the viewport (layer="top"/isModal)
30336
30339
  // or its own positioned ancestor (layer="local", the same
30337
30340
  // positionedAncestor computed above), same mechanism as Popover's own
30338
- // custom renderer. applyNewPosition sets --container-position-remaining-height/-width
30339
- // from the result, same as popover.jsx.
30341
+ // custom renderer. applyDialogPosition sets --container-position-remaining-height/-width
30342
+ // from the result, same as popover.jsx — except for layer="top", see its
30343
+ // own comment just above.
30344
+ // The placement is a snapshot taken on a debounce; the size caps must not
30345
+ // be one too. applyNewPosition writes --container-position-remaining-
30346
+ // height/width on every reposition, from what pickPositionRelativeTo
30347
+ // measured the container as at that instant. For layer="top" that value
30348
+ // says nothing --dialog-maxmax-height/width doesn't already say live: the
30349
+ // container IS the visual viewport and Dialog is never anchored, so the
30350
+ // "remaining" space is always the whole container net of its own margins
30351
+ // — the very definition of --dialog-maxmax-*, which tracks the visual
30352
+ // viewport through --navi-vvh/--navi-app-height without waiting for
30353
+ // anything. Identical values, one of them one debounce late.
30354
+ //
30355
+ // That lag stays invisible while the viewport SHRINKS — the two are
30356
+ // combined with min(), so the live var is the one that binds and the
30357
+ // dialog follows the mobile keyboard down, its top edge pinned. On the
30358
+ // way back up the stale pixel value is the smaller one, so it binds
30359
+ // instead and the dialog stays keyboard-sized until the debounced
30360
+ // reposition fires — which then places a still-shrunk box in a
30361
+ // full-height viewport (centered: visibly lower), grows it in the same
30362
+ // call, and has to slide it back up: the bounce. Dropping the property
30363
+ // for layer="top" leaves the live var alone in charge, so the height
30364
+ // comes back exactly the way it left, from the bottom edge.
30365
+ //
30366
+ // Kept for layer="local": there the container is a real element, its own
30367
+ // box is what the caps must read, and nothing in CSS tracks it.
30368
+ const applyDialogPosition = position => {
30369
+ applyNewPosition(dialogEl, position);
30370
+ if (isModal) {
30371
+ dialogEl.style.removeProperty("--container-position-remaining-height");
30372
+ dialogEl.style.removeProperty("--container-position-remaining-width");
30373
+ }
30374
+ };
30340
30375
  const positionDialog = triggerEvent => {
30341
30376
  const {
30342
30377
  positionArea,
@@ -30366,8 +30401,8 @@ const useDialogProps = props => {
30366
30401
  event: triggerEvent
30367
30402
  };
30368
30403
  let position = pickPositionRelativeTo(dialogEl, null, pickOptions);
30369
- applyNewPosition(dialogEl, position);
30370
- // applyNewPosition above just set --container-position-remaining-
30404
+ applyDialogPosition(position);
30405
+ // applyDialogPosition above just set --container-position-remaining-
30371
30406
  // width/height to the real available space — narrower than whatever
30372
30407
  // dialogEl measured at just before (nothing, on a first open — see
30373
30408
  // popover.jsx's own identical comment on its own positionPopover for
@@ -30380,7 +30415,7 @@ const useDialogProps = props => {
30380
30415
  // correct it — that one only reacts on the *next* animation frame.
30381
30416
  if (dialogEl.offsetWidth !== position.width || dialogEl.offsetHeight !== position.height) {
30382
30417
  position = pickPositionRelativeTo(dialogEl, null, pickOptions);
30383
- applyNewPosition(dialogEl, position);
30418
+ applyDialogPosition(position);
30384
30419
  }
30385
30420
  // A descendant's own visibleRectEffect (visible_rect.js — e.g. a
30386
30421
  // Callout anchored to something inside this Dialog) knowing to