@jsenv/navi 0.29.41 → 0.29.42

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.
@@ -228,8 +228,35 @@ name what moves.
228
228
  | -------------------------------------------------------- | -------------------------------------- |
229
229
  | `data-drag-axis="x"\|"y"\|"xy"` | which axes the drag walks |
230
230
  | `data-drag-delay` `data-drag-slop` `data-drag-threshold` | when the press becomes a grab |
231
+ | `data-drag-on-contact` | a finger may drag by travelling too |
231
232
  | `data-toss-distance` `data-toss-speed` | how far and how fast counts as a throw |
232
233
 
234
+ ### A finger that does not have to wait: `data-drag-on-contact`
235
+
236
+ A finger is asked to hold still because travel is exactly what a scroll looks
237
+ like, and the two have to be told apart. Where nothing scrolls there is nothing
238
+ to tell apart, and the wait asks the hand to prove something nothing else could
239
+ have meant — a dialog holding the page still, a board that fills the screen.
240
+
241
+ ```jsx
242
+ <Dialog data-drag-on-contact>
243
+ {pieces.map((piece) => (
244
+ <Piece id={piece.id} interactions={{ land: swapPlaces }} />
245
+ ))}
246
+ </Dialog>
247
+ ```
248
+
249
+ It says a **place**, not an element: put on what holds the page still, every
250
+ source inside it reads by distance — the same few pixels a mouse travels, so the
251
+ gesture is the desktop one. A tap is untouched by that, so a piece that is also a
252
+ link or a card stays one; only `pinch-zoom` is left of the browser's own touch,
253
+ because zoom belongs to the reader and two fingers are never a drag.
254
+
255
+ Opt-in and nothing else: navi cannot see whether the surroundings scroll — a page
256
+ scrolls by default and an `overflow` is one property away — and guessing it wrong
257
+ this way means the list runs away under the finger that meant to reorder it. You
258
+ know you took the scroll away; say so.
259
+
233
260
  ### Landing on a place: `land`
234
261
 
235
262
  `reorder` and `land` both come down on an item, and what separates them is **what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.41",
3
+ "version": "0.29.42",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "prepublishOnly": "npm run build"
30
30
  },
31
31
  "dependencies": {
32
- "@jsenv/dom": "0.17.14",
32
+ "@jsenv/dom": "0.17.15",
33
33
  "@jsenv/humanize": "1.7.8",
34
34
  "@jsenv/validity": "0.4.2"
35
35
  },