@jsenv/navi 0.29.452 → 0.29.454

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.
@@ -39081,27 +39081,34 @@ const TARGET_WAIT_MS = 1000;
39081
39081
  // covers is a render, not a fetch. Past it the popup's picture plays out on
39082
39082
  // its own.
39083
39083
  const LANDING_WAIT_MS = 300;
39084
- // The popup's own animation duration, published on the root because the
39085
- // ::view-transition tree hangs off it and inherits from nowhere else.
39084
+ // What the pictures are told — the popup's pace, the lifted card's paint, the
39085
+ // corners — is written on ::view-transition (transition_values.js), the root of
39086
+ // the pseudo-element tree they inherit from. Never on the document's root: a
39087
+ // custom property there is inherited by every element, and writing or removing
39088
+ // it restyles the whole document — at the press, again when the app reads
39089
+ // style before the first picture, and once more as the movement ends.
39090
+ //
39091
+ // The popup's own animation duration, for the pictures; the wall reads it off
39092
+ // the popup itself (dialog.jsx).
39086
39093
  const DURATION_PROPERTY = "--navi-popup-lift-duration";
39087
39094
  // The fixed bars (fixed_bar.jsx): the popup is placed in the room between
39088
39095
  // them, and the moving picture is clipped to that room on the way.
39089
39096
  const FIXED_BAR_SELECTOR = ".navi_fixed_bar";
39090
- // The paint of the lifted node, published the same way: the box wears the
39091
- // card's own background, so where it has grown past the picture it carries it
39092
- // is the card that has grown, not a picture fading into a bigger one. Read off
39093
- // the lifted node rather than the anchor: the anchor is often a bare trigger
39094
- // around the card, painting nothing of its own, while the lifted node IS the
39095
- // card — and a card does not change colour on the way.
39097
+ // The paint of the lifted node: the box wears the card's own background, so
39098
+ // where it has grown past the picture it carries it is the card that has
39099
+ // grown, not a picture fading into a bigger one. Read off the lifted node
39100
+ // rather than the anchor: the anchor is often a bare trigger around the card,
39101
+ // painting nothing of its own, while the lifted node IS the card — and a card
39102
+ // does not change colour on the way.
39096
39103
  const BACKGROUND_COLOR_PROPERTY = "--navi-popup-lift-background-color";
39097
39104
  const BACKGROUND_IMAGE_PROPERTY = "--navi-popup-lift-background-image";
39098
- // The corners of the box the movement starts from, published the same way —
39099
- // and, unlike the paint, not kept for the length of the movement: a corner is
39100
- // written per box, on purpose, the same card at two sizes not wanting the same
39101
- // round (a 6px corner stops showing on a big card). The moving box leaves with
39102
- // the corners of the box it leaves and arrives with those of the box it
39103
- // arrives on, the two authored values interpolated on the group's own clock
39104
- // (see animateMovingBox).
39105
+ // The corners of the box the movement starts from — and, unlike the paint, not
39106
+ // kept for the length of the movement: a corner is written per box, on
39107
+ // purpose, the same card at two sizes not wanting the same round (a 6px corner
39108
+ // stops showing on a big card). The moving box leaves with the corners of the
39109
+ // box it leaves and arrives with those of the box it arrives on, the two
39110
+ // authored values interpolated on the group's own clock (see
39111
+ // animateMovingBox).
39105
39112
  const BORDER_RADIUS_PROPERTY = "--navi-popup-lift-border-radius";
39106
39113
 
39107
39114
  let releaseLiftInProgress = null;
@@ -39162,11 +39169,9 @@ const liftPopupFromAnchor = (
39162
39169
  releaseLiftInProgress?.();
39163
39170
 
39164
39171
  const elementLeaving = opened ? resolveAnchor() : resolveLiftTarget(popupEl);
39165
- // Everything read about the leaving side, before the first write. A read
39166
- // brings the style up to date, and the writes below land on the root — an
39167
- // attribute or an unregistered custom property there invalidates the
39168
- // computed style of every element — so a read placed after any of them is
39169
- // the whole document's style over again. Nothing on the leaving side moves
39172
+ // Everything read about the leaving side, before the first write: a read
39173
+ // brings the style up to date, and one placed after the writes below would
39174
+ // pay for them on the spot, in the press. Nothing on the leaving side moves
39170
39175
  // before the movement, the page being held from here on.
39171
39176
  releaseScrollHold = trapScrollInside(popupEl, { backdrop: true });
39172
39177
  const duration = getComputedStyle(popupEl)
@@ -39184,9 +39189,9 @@ const liftPopupFromAnchor = (
39184
39189
  // Empty would substitute into `animation-duration:` as nothing at all,
39185
39190
  // which computes to 0s — a movement nobody sees rather than one at the
39186
39191
  // browser's own pace.
39187
- root.style.setProperty(DURATION_PROPERTY, duration);
39192
+ setTransitionValue(DURATION_PROPERTY, duration);
39188
39193
  }
39189
- root.style.setProperty(BORDER_RADIUS_PROPERTY, cornersLeaving);
39194
+ setTransitionValue(BORDER_RADIUS_PROPERTY, cornersLeaving);
39190
39195
  if (paintLeaving) {
39191
39196
  publishBoxPaint(paintLeaving);
39192
39197
  }
@@ -39213,10 +39218,10 @@ const liftPopupFromAnchor = (
39213
39218
  root.removeAttribute(ROOT_ATTRIBUTE);
39214
39219
  root.removeAttribute(KIND_ATTRIBUTE);
39215
39220
  root.removeAttribute(FIT_ATTRIBUTE);
39216
- root.style.removeProperty(DURATION_PROPERTY);
39217
- root.style.removeProperty(BORDER_RADIUS_PROPERTY);
39218
- root.style.removeProperty(BACKGROUND_COLOR_PROPERTY);
39219
- root.style.removeProperty(BACKGROUND_IMAGE_PROPERTY);
39221
+ removeTransitionValue(DURATION_PROPERTY);
39222
+ removeTransitionValue(BORDER_RADIUS_PROPERTY);
39223
+ removeTransitionValue(BACKGROUND_COLOR_PROPERTY);
39224
+ removeTransitionValue(BACKGROUND_IMAGE_PROPERTY);
39220
39225
  callLiftOverCallbacks();
39221
39226
  };
39222
39227
  releaseLiftInProgress = release;
@@ -39290,8 +39295,6 @@ const liftPopupFromAnchor = (
39290
39295
  popupEl.removeAttribute(ARRIVING_ATTRIBUTE);
39291
39296
  };
39292
39297
  const liftTarget = (target) => {
39293
- // The last write before the transition: nothing reads between it and the
39294
- // style pass the browser makes on its own to take the first picture.
39295
39298
  publishBoxPaint(readBoxPaint(target));
39296
39299
  startMovement(reveal, () => target);
39297
39300
  };
@@ -39320,9 +39323,8 @@ const readBoxPaint = (liftedElement) => {
39320
39323
  };
39321
39324
 
39322
39325
  const publishBoxPaint = ({ backgroundColor, backgroundImage }) => {
39323
- const root = document.documentElement;
39324
- root.style.setProperty(BACKGROUND_COLOR_PROPERTY, backgroundColor);
39325
- root.style.setProperty(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
39326
+ setTransitionValue(BACKGROUND_COLOR_PROPERTY, backgroundColor);
39327
+ setTransitionValue(BACKGROUND_IMAGE_PROPERTY, backgroundImage);
39326
39328
  };
39327
39329
 
39328
39330
  // The corners of a box: the first round found going down through children
@@ -39575,6 +39577,50 @@ const callLiftOverCallbacks = () => {
39575
39577
  });
39576
39578
  };
39577
39579
 
39580
+ /**
39581
+ * What a gesture changes in a closed picker is sent at once.
39582
+ *
39583
+ * A picker's `action` waits for its popup to close: what is done in there is
39584
+ * one answer, given when the person is done. A change made while the popup is
39585
+ * closed — a chip's cross, a paste, a cut, a value proposed from beside it
39586
+ * (`--navi-update`) — has no close coming, so nothing would ever send it: the
39587
+ * value moves on screen and the record behind it stays. Each of those gestures
39588
+ * calls this right after setting the value; a failing action puts the value
39589
+ * back (resetOnError), as it does after a close.
39590
+ *
39591
+ * Called by gestures only. A value set without one — a bound signal followed, a
39592
+ * cancel or a failure rolled back — is the picker being told, not asked, which
39593
+ * is why this is not a reaction to every value set on a closed picker.
39594
+ *
39595
+ * The clear cross does the same through `--navi-send` (see --navi-clear in
39596
+ * commands.js), and so does not come through here.
39597
+ */
39598
+
39599
+
39600
+ const sendClosedPickerChange = (element, { event, name, requester }) => {
39601
+ const controlHost = findControlHost(element) || element;
39602
+ const controlRoot = findControlRoot(controlHost);
39603
+ if (!controlRoot || controlRoot.getAttribute("navi-control") !== "picker") {
39604
+ return;
39605
+ }
39606
+ if (controlRoot.getAttribute("aria-expanded") === "true") {
39607
+ return;
39608
+ }
39609
+ const { props } = controlHost.__uiStateController__;
39610
+ if (!props.action) {
39611
+ return;
39612
+ }
39613
+ // A picker that picks nothing (`type="confirm"`, a menu of actions) holds no
39614
+ // value its action would be sending: that action is the yes of its popup,
39615
+ // and a paste landing on the trigger must not say it.
39616
+ if (props.picksNothing) {
39617
+ return;
39618
+ }
39619
+ // `requester`: the source of a command may have claimed the press to send
39620
+ // this very change (see isAimedAtSelfInteractionsBelow).
39621
+ dispatchRequestAction(controlHost, { event, name, requester });
39622
+ };
39623
+
39578
39624
  /**
39579
39625
  * Runs a navi command from JS. It is the LAST RESORT: the attributes say the
39580
39626
  * same thing declaratively and go through this very function, so a press that
@@ -39950,6 +39996,11 @@ registerNaviCommand("--navi-update", (source, event, { argument }) => {
39950
39996
  event,
39951
39997
  behavior: argument,
39952
39998
  });
39999
+ sendClosedPickerChange(target, {
40000
+ event,
40001
+ name: "--navi-update",
40002
+ requester: source,
40003
+ });
39953
40004
  },
39954
40005
  });
39955
40006
  },
@@ -50857,11 +50908,15 @@ const LinkWithRoute = ({
50857
50908
  also: currentAlso
50858
50909
  });
50859
50910
  const innerCurrent = current || linkMatching;
50911
+
50912
+ // What a childless link shows is LinkPlain's call (hrefFallback); a route
50913
+ // only says it the way its pattern writes it, not as the resolved href.
50860
50914
  return jsx(Link, {
50861
50915
  href: url,
50916
+ hrefText: route.buildRelativeUrl(routeParams),
50862
50917
  current: innerCurrent,
50863
50918
  ...rest,
50864
- children: children || route.buildRelativeUrl(routeParams)
50919
+ children: children
50865
50920
  });
50866
50921
  };
50867
50922
  const LinkPlain = props => {
@@ -50887,6 +50942,7 @@ const LinkPlain = props => {
50887
50942
  revealOnInteraction = false,
50888
50943
  stretch,
50889
50944
  hrefFallback = !anchor,
50945
+ hrefText = href,
50890
50946
  routeTransition,
50891
50947
  pressableDuringRouteTransition,
50892
50948
  replace,
@@ -51022,7 +51078,7 @@ const LinkPlain = props => {
51022
51078
  const documentRequest = isDocument ? {
51023
51079
  [LINK_DOCUMENT_ATTRIBUTE]: ""
51024
51080
  } : null;
51025
- const innerChildren = children || (hrefFallback ? href : children);
51081
+ const innerChildren = children || (hrefFallback ? hrefText : children);
51026
51082
  const startIconEl = startIcon;
51027
51083
  const endIconEl = innerEndIcon;
51028
51084
 
@@ -51073,6 +51129,7 @@ const LinkPlain = props => {
51073
51129
  startIcon: undefined,
51074
51130
  endIcon: undefined,
51075
51131
  hrefFallback: undefined,
51132
+ hrefText: undefined,
51076
51133
  routeTransition: undefined,
51077
51134
  pressableDuringRouteTransition: undefined,
51078
51135
  replace: undefined,
@@ -65109,6 +65166,70 @@ const giveUpOnControlsHoldingPopup = (controlsHolding, reason) => {
65109
65166
  */
65110
65167
 
65111
65168
  const popupCss = /* css */ `
65169
+ /* Not inherited: what the placement writes on a popup (applyNewPosition in
65170
+ @jsenv/dom) and what the popup derives from it are read by the popup
65171
+ alone, for its own size and cut. Inherited, every element of its content
65172
+ carries a copy, and each placement restyles all of them before the first
65173
+ frame. A popup nested in another also stops reading the outer one's values
65174
+ where its own are unset. "*" keeps them untyped: var() substitutes them as
65175
+ it does an unregistered property. */
65176
+ @property --container-position-room-top {
65177
+ syntax: "*";
65178
+ inherits: false;
65179
+ }
65180
+ @property --container-position-room-right {
65181
+ syntax: "*";
65182
+ inherits: false;
65183
+ }
65184
+ @property --container-position-room-bottom {
65185
+ syntax: "*";
65186
+ inherits: false;
65187
+ }
65188
+ @property --container-position-room-left {
65189
+ syntax: "*";
65190
+ inherits: false;
65191
+ }
65192
+ @property --container-position-remaining-height {
65193
+ syntax: "*";
65194
+ inherits: false;
65195
+ }
65196
+ @property --container-position-remaining-width {
65197
+ syntax: "*";
65198
+ inherits: false;
65199
+ }
65200
+ @property --x-popup-cut-top-at-area {
65201
+ syntax: "*";
65202
+ inherits: false;
65203
+ }
65204
+ @property --x-popup-cut-right-at-area {
65205
+ syntax: "*";
65206
+ inherits: false;
65207
+ }
65208
+ @property --x-popup-cut-bottom-at-area {
65209
+ syntax: "*";
65210
+ inherits: false;
65211
+ }
65212
+ @property --x-popup-cut-left-at-area {
65213
+ syntax: "*";
65214
+ inherits: false;
65215
+ }
65216
+ @property --x-popup-cut-top {
65217
+ syntax: "*";
65218
+ inherits: false;
65219
+ }
65220
+ @property --x-popup-cut-right {
65221
+ syntax: "*";
65222
+ inherits: false;
65223
+ }
65224
+ @property --x-popup-cut-bottom {
65225
+ syntax: "*";
65226
+ inherits: false;
65227
+ }
65228
+ @property --x-popup-cut-left {
65229
+ syntax: "*";
65230
+ inherits: false;
65231
+ }
65232
+
65112
65233
  @layer navi {
65113
65234
  .navi_popover,
65114
65235
  .navi_dialog {
@@ -65123,29 +65244,6 @@ const popupCss = /* css */ `
65123
65244
 
65124
65245
  .navi_popover,
65125
65246
  .navi_dialog {
65126
- /* The translate property is deliberately absent from this list — it
65127
- carries where the popup stands, and applyNewPosition (visible_rect.js)
65128
- owns it and drives its own transition through the Web Animations API
65129
- instead of CSS, so it stays independent of whatever this list contains
65130
- (no shared transition-property to clobber, no propertyName to filter).
65131
- What moves here is transform, which composes under it. */
65132
- &[navi-animation] {
65133
- /* clip-path takes the translate's own duration, for the one cut that
65134
- still moves (a band of glass beside the app — see this file's top
65135
- comment for why every other cut is a constant). A constant cut, or a
65136
- kind that sets none, has the same value on both sides of the change,
65137
- which costs nothing. */
65138
- transition-property:
65139
- display, overlay, opacity, transform, scale, box-shadow, clip-path;
65140
- transition-duration:
65141
- var(--popup-animation-duration), var(--popup-animation-duration),
65142
- var(--popup-opacity-duration), var(--popup-translate-duration),
65143
- var(--popup-scale-duration), var(--popup-animation-duration),
65144
- var(--popup-translate-duration);
65145
- transition-timing-function: ease;
65146
- transition-behavior: allow-discrete;
65147
- }
65148
-
65149
65247
  /* Where a travel may be cut, per side, in the popup's own coordinates.
65150
65248
  --container-position-room-* is how far past each of its own edges the
65151
65249
  popup may still paint before reaching the edge of the area it was placed
@@ -65177,6 +65275,28 @@ const popupCss = /* css */ `
65177
65275
  -1 * var(--container-position-room-left, 100vmax) - 100vmax +
65178
65276
  min(100vmax, var(--navi-app-inset-left, 0px) * 1000000)
65179
65277
  );
65278
+ /* The translate property is deliberately absent from this list — it
65279
+ carries where the popup stands, and applyNewPosition (visible_rect.js)
65280
+ owns it and drives its own transition through the Web Animations API
65281
+ instead of CSS, so it stays independent of whatever this list contains
65282
+ (no shared transition-property to clobber, no propertyName to filter).
65283
+ What moves here is transform, which composes under it. */
65284
+ &[navi-animation] {
65285
+ /* clip-path takes the translate's own duration, for the one cut that
65286
+ still moves (a band of glass beside the app — see this file's top
65287
+ comment for why every other cut is a constant). A constant cut, or a
65288
+ kind that sets none, has the same value on both sides of the change,
65289
+ which costs nothing. */
65290
+ transition-property:
65291
+ display, overlay, opacity, transform, scale, box-shadow, clip-path;
65292
+ transition-duration:
65293
+ var(--popup-animation-duration), var(--popup-animation-duration),
65294
+ var(--popup-opacity-duration), var(--popup-translate-duration),
65295
+ var(--popup-scale-duration), var(--popup-animation-duration),
65296
+ var(--popup-translate-duration);
65297
+ transition-timing-function: ease;
65298
+ transition-behavior: allow-discrete;
65299
+ }
65180
65300
  /* A local popup is clipped by its clip wrapper (a static ancestor sized to
65181
65301
  the container, overflow: hidden): nothing is left for a cut to hide. */
65182
65302
  &[data-layer="local"] {
@@ -65306,7 +65426,6 @@ const popupCss = /* css */ `
65306
65426
  transform: translate(var(--x-popup-travel-x), var(--x-popup-travel-y));
65307
65427
  }
65308
65428
  }
65309
-
65310
65429
  }
65311
65430
 
65312
65431
  .navi_popover {
@@ -65671,6 +65790,62 @@ let openLocalDialogCount = 0;
65671
65790
  const css$E = /* css */`
65672
65791
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
65673
65792
  order depending on which popup renders first. */
65793
+
65794
+ /* Not inherited: each is written on the dialog or derived there — by its
65795
+ placement (see popup_css.js for what inheriting would cost), by its
65796
+ opening (the anchor box under sizeFromAnchor, the stack order) or from the
65797
+ minWidth/maxWidth/minHeight/maxHeight props — and read by the dialog
65798
+ alone. Inherited, a dialog nested in this one would also open at this
65799
+ one's size. */
65800
+ @property --dialog-stack-order {
65801
+ syntax: "*";
65802
+ inherits: false;
65803
+ }
65804
+ @property --anchor-width {
65805
+ syntax: "*";
65806
+ inherits: false;
65807
+ }
65808
+ @property --anchor-height {
65809
+ syntax: "*";
65810
+ inherits: false;
65811
+ }
65812
+ @property --dialog-min-width {
65813
+ syntax: "*";
65814
+ inherits: false;
65815
+ }
65816
+ @property --dialog-max-width {
65817
+ syntax: "*";
65818
+ inherits: false;
65819
+ }
65820
+ @property --dialog-min-height {
65821
+ syntax: "*";
65822
+ inherits: false;
65823
+ }
65824
+ @property --dialog-max-height {
65825
+ syntax: "*";
65826
+ inherits: false;
65827
+ }
65828
+ @property --x-dialog-container-spacing {
65829
+ syntax: "*";
65830
+ inherits: false;
65831
+ }
65832
+ @property --dialog-maxmax-width {
65833
+ syntax: "*";
65834
+ inherits: false;
65835
+ }
65836
+ @property --dialog-maxmax-height {
65837
+ syntax: "*";
65838
+ inherits: false;
65839
+ }
65840
+ @property --x-dialog-max-width {
65841
+ syntax: "*";
65842
+ inherits: false;
65843
+ }
65844
+ @property --x-dialog-max-height {
65845
+ syntax: "*";
65846
+ inherits: false;
65847
+ }
65848
+
65674
65849
  @layer navi {
65675
65850
  .navi_dialog {
65676
65851
  /* Min gap between the dialog and the edges of its container. Written
@@ -65768,18 +65943,6 @@ const css$E = /* css */`
65768
65943
  --x-corner-bottom-right-radius: initial;
65769
65944
  --x-corner-bottom-left-radius: initial;
65770
65945
 
65771
- /* Sizing is per dialog: the anchor box (sizeFromAnchor) and the
65772
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
65773
- element, and an inline declaration wins over these resets. Without
65774
- them, a dialog nested in another dialog would inherit its parent's
65775
- inline values and open at the parent's size. */
65776
- --anchor-width: initial;
65777
- --anchor-height: initial;
65778
- --dialog-min-width: initial;
65779
- --dialog-max-width: initial;
65780
- --dialog-min-height: initial;
65781
- --dialog-max-height: initial;
65782
-
65783
65946
  /* Computed once, reused by both max-width itself and min-width's own
65784
65947
  clamp below (see its comment for why) — avoids repeating the same
65785
65948
  min(..., ...) expression twice. */
@@ -66034,7 +66197,7 @@ const css$E = /* css */`
66034
66197
  &[aria-expanded="true"]:not([navi-transitions-off])::backdrop {
66035
66198
  opacity: 1;
66036
66199
  transition-property: opacity;
66037
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
66200
+ transition-duration: var(--popup-animation-duration, 0.18s);
66038
66201
  transition-timing-function: ease;
66039
66202
 
66040
66203
  @starting-style {
@@ -66217,7 +66380,7 @@ const css$E = /* css */`
66217
66380
  &[aria-expanded="true"] {
66218
66381
  opacity: 1;
66219
66382
  transition-property: opacity;
66220
- transition-duration: var(--navi-popup-lift-duration, 0.25s);
66383
+ transition-duration: var(--popup-animation-duration);
66221
66384
  transition-timing-function: ease;
66222
66385
  }
66223
66386
  }
@@ -66255,8 +66418,9 @@ const css$E = /* css */`
66255
66418
  and unpressable while the movement plays: under a modal wall at the
66256
66419
  opening, and for the popup's --popup-animation-duration at the closing. */
66257
66420
  :root[data-navi-popup-lift] {
66258
- /* The popup's own pace, published on the root by popup_lift.js because the
66259
- ::view-transition tree hangs off it and inherits from nowhere else. */
66421
+ /* The popup's own pace, published on ::view-transition by popup_lift.js:
66422
+ the pictures inherit from nowhere else. The wall reads it off the
66423
+ dialog itself (the [data-lifting] backdrop rules above). */
66260
66424
  &::view-transition-group(navi-popup-lift),
66261
66425
  &::view-transition-old(navi-popup-lift),
66262
66426
  &::view-transition-new(navi-popup-lift),
@@ -67998,6 +68162,58 @@ let openLocalPopoverCount = 0;
67998
68162
  const css$D = /* css */`
67999
68163
  /* jsenv-css-opaque: popupCss overlaps these rules, own sheet = cascade
68000
68164
  order depending on which popup renders first. */
68165
+
68166
+ /* Not inherited: each is written on the popover or derived there — by its
68167
+ placement (the anchor box included; see popup_css.js for what inheriting
68168
+ would cost), by its opening (the stack order, which the backdrop gets a
68169
+ copy of) or from the minWidth/maxWidth/minHeight/maxHeight props — and
68170
+ read by the popover alone. Inherited, a popover nested in another popup
68171
+ would also open at the outer one's size. */
68172
+ @property --popover-stack-order {
68173
+ syntax: "*";
68174
+ inherits: false;
68175
+ }
68176
+ @property --anchor-width {
68177
+ syntax: "*";
68178
+ inherits: false;
68179
+ }
68180
+ @property --anchor-height {
68181
+ syntax: "*";
68182
+ inherits: false;
68183
+ }
68184
+ @property --anchor-inner-width {
68185
+ syntax: "*";
68186
+ inherits: false;
68187
+ }
68188
+ @property --anchor-inner-height {
68189
+ syntax: "*";
68190
+ inherits: false;
68191
+ }
68192
+ @property --popover-min-width {
68193
+ syntax: "*";
68194
+ inherits: false;
68195
+ }
68196
+ @property --popover-max-width {
68197
+ syntax: "*";
68198
+ inherits: false;
68199
+ }
68200
+ @property --popover-min-height {
68201
+ syntax: "*";
68202
+ inherits: false;
68203
+ }
68204
+ @property --popover-max-height {
68205
+ syntax: "*";
68206
+ inherits: false;
68207
+ }
68208
+ @property --x-popover-max-width {
68209
+ syntax: "*";
68210
+ inherits: false;
68211
+ }
68212
+ @property --x-popover-max-height {
68213
+ syntax: "*";
68214
+ inherits: false;
68215
+ }
68216
+
68001
68217
  @layer navi {
68002
68218
  .navi_popover {
68003
68219
  /* soft: user-configurable preferred max-height. Kept as a *default*
@@ -68059,21 +68275,6 @@ const css$D = /* css */`
68059
68275
  --x-corner-bottom-right-radius: initial;
68060
68276
  --x-corner-bottom-left-radius: initial;
68061
68277
 
68062
- /* Sizing is per popover: the anchor box and the
68063
- minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
68064
- element, and an inline declaration wins over these resets. Without
68065
- them, a popover nested in another popup (or opened without an anchor
68066
- inside one sized from its own) would inherit the outer inline values
68067
- and open at the outer size. */
68068
- --anchor-width: initial;
68069
- --anchor-height: initial;
68070
- --anchor-inner-width: initial;
68071
- --anchor-inner-height: initial;
68072
- --popover-min-width: initial;
68073
- --popover-max-width: initial;
68074
- --popover-min-height: initial;
68075
- --popover-max-height: initial;
68076
-
68077
68278
  --x-popover-max-width: min(
68078
68279
  var(--popover-max-width, var(--popover-maxmax-width)),
68079
68280
  var(--container-position-remaining-width, var(--popover-maxmax-width)),
@@ -68202,10 +68403,8 @@ const css$D = /* css */`
68202
68403
  "position: absolute" above. */
68203
68404
  &[popover] {
68204
68405
  position: fixed;
68205
- /* The native top layer already gives "last shown wins" for free —
68206
- --popover-stack-order is only ever set by the custom renderer's own
68207
- openEffect, but reset here regardless in case a consumer sets the
68208
- var directly on an ancestor. */
68406
+ /* The native top layer already gives "last shown wins" for free: the
68407
+ custom renderer's stack order has no say here. */
68209
68408
  z-index: unset;
68210
68409
  padding: 0;
68211
68410
 
@@ -81035,7 +81234,9 @@ const PickerArrayUI = /*#__PURE__*/asPickerOwnUI(() => {
81035
81234
  /**
81036
81235
  * One value the picker holds, drawn as a chip with a cross that takes it back
81037
81236
  * out. Sits wherever the application draws what was picked — on the picker's
81038
- * façade (`ui`) or inside its popup — and both behave the same.
81237
+ * façade (`ui`) or inside its popup. Inside the open popup the removal waits
81238
+ * for the close like any change made there; pressed while the popup is closed
81239
+ * it is the whole gesture, and the picker's `action` runs at once.
81039
81240
  *
81040
81241
  * The cross asks with `--navi-unselect` rather than writing a new list, and it
81041
81242
  * asks the picker — which holds what was picked, and hands it down to whatever
@@ -82063,15 +82264,25 @@ const PickerButton = props => {
82063
82264
  const displayText = pickerEl.querySelector(".navi_picker_value")?.textContent ?? String(uiState);
82064
82265
  e.clipboardData.setData("text/plain", displayText);
82065
82266
  e.clipboardData.setData("application/x-navi", JSON.stringify(uiState));
82267
+ e.preventDefault();
82268
+ // A picker that asks before its cross clears anything is not
82269
+ // emptied by a keystroke without the question: the cut copies,
82270
+ // and the value stays.
82271
+ if (clearConfirm !== undefined) {
82272
+ return;
82273
+ }
82066
82274
  // the clear ui state part need control to be interactable
82067
82275
  dispatchRequestInteraction(pickerEl, {
82068
82276
  event: e,
82069
82277
  name: "cut",
82070
82278
  allowed: () => {
82071
82279
  dispatchRequestClearUIState(inputRef.current, e);
82280
+ sendClosedPickerChange(inputRef.current, {
82281
+ event: e,
82282
+ name: "cut"
82283
+ });
82072
82284
  }
82073
82285
  });
82074
- e.preventDefault();
82075
82286
  },
82076
82287
  onPaste: e => {
82077
82288
  const pickerEl = ref.current;
@@ -82097,6 +82308,10 @@ const PickerButton = props => {
82097
82308
  dispatchRequestSetUIState(inputRef.current, pasteValue, {
82098
82309
  event: e
82099
82310
  });
82311
+ sendClosedPickerChange(inputRef.current, {
82312
+ event: e,
82313
+ name: "paste"
82314
+ });
82100
82315
  }
82101
82316
  });
82102
82317
  e.preventDefault();
@@ -82330,6 +82545,10 @@ const requestPickerListEntry = (pickerEl, pickerInputEl, e, goal) => {
82330
82545
  dispatchRequestSetUIState(pickerInputEl, uiStateNext, {
82331
82546
  event: e
82332
82547
  });
82548
+ sendClosedPickerChange(pickerInputEl, {
82549
+ event: e,
82550
+ name: goal
82551
+ });
82333
82552
  }
82334
82553
  });
82335
82554
  };
@@ -93819,6 +94038,10 @@ const css$5 = /* css */`@keyframes navi_image_shimmer {
93819
94038
  `;
93820
94039
  const DEFAULT_PLACEHOLDER_LIGHT = "#d4d8dd";
93821
94040
  const DEFAULT_PLACEHOLDER_DARK = "#374151";
94041
+ // On an <img>, width/height describe the image: they stay HTML attributes.
94042
+ // Box would write them as inline styles, which beat every stylesheet rule, so
94043
+ // an image given its file's size (3840×2160) would overflow the box sizing it.
94044
+ const IMAGE_ATTRIBUTE_PROP_SET = new Set(["width", "height"]);
93822
94045
 
93823
94046
  /**
93824
94047
  * The props may come in any order: `src` and `srcset` reach the element after
@@ -93827,6 +94050,12 @@ const DEFAULT_PLACEHOLDER_DARK = "#374151";
93827
94050
  * decides whether to load when `src` is set, and an image whose `src` came
93828
94051
  * first loads, lazy or not.
93829
94052
  *
94053
+ * @param {number} [props.width] - The image's width in pixels, written as the
94054
+ * `<img>` attribute, like `height`. Given both, the browser reserves the
94055
+ * aspect ratio before the bytes arrive. They size the element only while no
94056
+ * stylesheet rule does: a box that holds the image sizes it with CSS (or
94057
+ * `style`) and keeps the ratio.
94058
+ * @param {number} [props.height] - The image's height in pixels, see `width`.
93830
94059
  * @param {string|false} [props.placeholderColor] - Background color shown while the image loads.
93831
94060
  * Defaults to a light gray. Pass `false` to disable.
93832
94061
  * @param {boolean} [props.placeholderDark] - Use a dark default placeholder color,
@@ -93851,6 +94080,7 @@ const Image = ({
93851
94080
  ...rest,
93852
94081
  as: "img",
93853
94082
  baseClassName: "navi_image",
94083
+ childPropSet: IMAGE_ATTRIBUTE_PROP_SET,
93854
94084
  "navi-placeholder": loadedRef.current ? undefined : "",
93855
94085
  style: {
93856
94086
  "--placeholder-color": resolvedPlaceholder || undefined,