@jsenv/navi 0.29.500 → 0.29.502

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.
@@ -8727,11 +8727,7 @@ const route = (pattern, options = {}) => {
8727
8727
  );
8728
8728
  }
8729
8729
  // eslint-disable-next-line no-loop-func
8730
- const cleanupSignalUrlEffect = effect(() => {
8731
- const value = paramSignal.value;
8732
- // Use peek() to avoid subscribing to URL-derived signals.
8733
- // This effect should only re-run when the param signal changes,
8734
- // not when the URL changes (which would create a cycle: signal→URL→signal).
8730
+ const writeValueInUrl = (value) => {
8735
8731
  const rawParams = route.rawParamsSignal.peek();
8736
8732
  const urlParamValue = rawParams[paramName];
8737
8733
  const matching = route.matchingSignal.peek();
@@ -8806,6 +8802,14 @@ const route = (pattern, options = {}) => {
8806
8802
  debounceUrl,
8807
8803
  },
8808
8804
  );
8805
+ };
8806
+ const cleanupSignalUrlEffect = effect(() => {
8807
+ const value = paramSignal.value;
8808
+ // Only the param signal re-runs this effect. Writing the url reads
8809
+ // more (the route's other params, to build it): subscribed to those,
8810
+ // the write is made again whenever one of them changes — a second
8811
+ // entry when the write pushes.
8812
+ untracked(() => writeValueInUrl(value));
8809
8813
  });
8810
8814
  cleanupSignalUrlEffectSet.add(cleanupSignalUrlEffect);
8811
8815
  }
@@ -24726,6 +24730,10 @@ const DROP_CONTAINER_ATTRIBUTE = "data-drop-container";
24726
24730
  // every outcome — a list runs one way, and something being put somewhere goes
24727
24731
  // wherever it is put.
24728
24732
  const AXIS_ATTRIBUTE = "data-drag-axis";
24733
+ // Which of those axes a press takes it by, when not all of them: a card pulled
24734
+ // up out of a strip that scrolls sideways, then carried both ways. Said nothing,
24735
+ // it is every axis the drag walks.
24736
+ const INTENT_AXIS_ATTRIBUTE = "data-drag-intent-axis";
24729
24737
  // How the items of a reordered list are laid out: "column", "row", or "wrap" for
24730
24738
  // side by side over several lines. Said nothing, it is read from where the
24731
24739
  // items stand.
@@ -24821,6 +24829,10 @@ defineInteractionDetector({
24821
24829
  ? "xy"
24822
24830
  : "y"
24823
24831
  : "xy");
24832
+ const intentAxis =
24833
+ element
24834
+ .closest(`[${INTENT_AXIS_ATTRIBUTE}]`)
24835
+ ?.getAttribute(INTENT_AXIS_ATTRIBUTE) || axes;
24824
24836
  // Where the places are, read at setup for the same reason as the axes: they
24825
24837
  // are what the gesture is about, and it is what holds the two sides of it
24826
24838
  // that says them.
@@ -24834,11 +24846,13 @@ defineInteractionDetector({
24834
24846
  if (canReorder) {
24835
24847
  element.setAttribute(REORDERABLE_ATTRIBUTE, "");
24836
24848
  }
24837
- // What @jsenv/dom puts on a drag source: the axes written in the DOM for
24838
- // whoever else answers this press (a sheet pushed down to close it, a row of
24839
- // slides), no iOS callout, the touch left to the scroll until the press
24840
- // becomes a grab, and the listener that lets the grab take it back.
24841
- const unmarkDragSource = markDragSource(element, axes);
24849
+ // What @jsenv/dom puts on a drag source: the axes a press takes it by,
24850
+ // written in the DOM for whoever else answers this press (a sheet pushed
24851
+ // down to close it, a row of slides, a finger given back to the scroll), no
24852
+ // iOS callout, the touch left to the scroll until the press becomes a grab,
24853
+ // and the listener that lets the grab take it back. Once taken, the copy
24854
+ // walks `axes`.
24855
+ const unmarkDragSource = markDragSource(element, intentAxis);
24842
24856
 
24843
24857
  // What a release can mean, which is not all of what was declared: "grab",
24844
24858
  // "release" and "refuse" are moments, not outcomes, and "moving" is the carry