@jsenv/navi 0.27.74 → 0.27.75

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 @@ import { isValidElement, createContext, h, toChildArray, render, Fragment, clone
3
3
  import { useErrorBoundary, useLayoutEffect, useEffect, useContext, useMemo, useRef, useState, useCallback, useId } from "preact/hooks";
4
4
  import { jsxs, jsx, Fragment as Fragment$1 } from "preact/jsx-runtime";
5
5
  import { signal, effect, computed, batch, useSignal } from "@preact/signals";
6
- import { createIterableWeakSet, createEventGroupLogger, normalizeStyle, mergeOneStyle, createPubSub, findEvent, dispatchInternalCustomEvent, mergeTwoStyles, normalizeStyles, createGroupTransitionController, getElementSignature, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, dispatchCustomEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, getKeyboardEventDefaultAction, chainEvent, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, activeElementSignal, initFocusGroup, elementIsFocusable, parsePositionArea, getPositionedParent, snapToPixel, trapFocusInside, trapScrollInside, scrollIntoViewScoped, measureWidestChildRow, performTabNavigation, dragAfterThreshold, getScrollContainer, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement } from "@jsenv/dom";
6
+ import { createIterableWeakSet, createEventGroupLogger, normalizeStyle, mergeOneStyle, createPubSub, findEvent, dispatchInternalCustomEvent, mergeTwoStyles, normalizeStyles, createGroupTransitionController, getElementSignature, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, dispatchCustomEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, getKeyboardEventDefaultAction, chainEvent, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, activeElementSignal, initFocusGroup, elementIsFocusable, parsePositionArea, getPositionedParent, snapToPixel, trapFocusInside, trapScrollInside, scrollIntoViewScoped, measureWidestChildRow, performTabNavigation, dragAfterThreshold, getScrollContainer, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
7
7
  export { contrastColor, startDragToReorder } from "@jsenv/dom";
8
8
  import { prefixFirstAndIndentRemainingLines } from "@jsenv/humanize";
9
9
  import { createValidity, parseDuration, durationContainsNaN, compareTwoDurations, durationToSeconds, durationToISOString } from "@jsenv/validity";
@@ -41505,6 +41505,15 @@ const css$m = /* css */`
41505
41505
  grid-column: 1 / -1;
41506
41506
  }
41507
41507
 
41508
+ /* Same reasoning as the filler rule above, for the separator (the default
41509
+ Separator rendered between items when List's own separator prop is
41510
+ set): a grid track only ever spans the single column it is placed in
41511
+ by default, so without this it would collapse into just the first
41512
+ column's width instead of the full row. */
41513
+ .navi_list[navi-box-flow="grid"] > .navi_separator {
41514
+ grid-column: 1 / -1;
41515
+ }
41516
+
41508
41517
  /* Empty state — hidden by default, shown when no list items are rendered.
41509
41518
  order: 1 pushes fallbacks after all regular items in flex column layout.
41510
41519
  The list children are open-ended (headers, presentation items, real items),
@@ -50009,17 +50018,17 @@ const SidePanel = ({
50009
50018
  className: withPropsClassName("navi_side_panel", className),
50010
50019
  "navi-side": side,
50011
50020
  style: {
50012
- "--navi-side-panel-width": toCssLength(width),
50013
- "--navi-side-panel-height": toCssLength(height)
50021
+ "--navi-side-panel-width": toCssLength(width, "width"),
50022
+ "--navi-side-panel-height": toCssLength(height, "height")
50014
50023
  },
50015
50024
  ...rest,
50016
50025
  children: children
50017
50026
  });
50018
50027
  };
50019
- // Preact doesn't auto-append "px" to bare numeric style values the way React
50020
- // does an unsuffixed number is an invalid CSS length, silently rejected by
50021
- // the browser (leaving the property unset instead of sized).
50022
- const toCssLength = value => value === undefined || value === null ? undefined : typeof value === "number" ? `${value}px` : value;
50028
+ // Same width/height normalization Box itself uses for its own styleCSSVars
50029
+ // props (see box_style_util.js's own getStringifier) bare numbers become
50030
+ // px, percentages/calc()/CSS keywords pass through untouched.
50031
+ const toCssLength = (value, propertyName) => value === undefined || value === null ? undefined : stringifyStyle$1(value, propertyName);
50023
50032
 
50024
50033
  /**
50025
50034
  * Stuck to the top of the panel's own scrollable area (`position: sticky`)