@jsenv/navi 0.29.473 → 0.29.475

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.
@@ -33,8 +33,9 @@ somewhere else in the app.
33
33
  | `value` (or `checked`) | you | nothing moves until you hand a new one down |
34
34
 
35
35
  A control given `value` and nothing to listen to it (`uiAction`, `action`, a
36
- `signal`, a surrounding form) is read-only, and says so in dev: it is showing
37
- something nobody can change.
36
+ `signal`, a `command`, a form or group collecting it) is read-only, and says so
37
+ in dev: it is showing something nobody can change. A `<Details>` around it
38
+ collects nothing, and a `standalone` control is collected by nobody.
38
39
 
39
40
  ## A bound signal works in both directions
40
41
 
@@ -124,15 +124,29 @@ screen has not asked for it to swap places with whatever it flew over.
124
124
  | Attribute | Meaning |
125
125
  | -------------------------------------------------------- | -------------------------------------- |
126
126
  | `data-drag-axis="x"\|"y"\|"xy"` | which axes the drag walks |
127
+ | `data-reorder-flow="column"\|"row"\|"wrap"` | how the items of a list are laid out |
127
128
  | `data-drag-delay` `data-drag-slop` `data-drag-threshold` | when the press becomes a grab |
128
129
  | `data-drag-on-contact` | a finger may drag by travelling too |
129
130
  | `data-drag-free` | it may leave its scroll area |
130
131
  | `data-toss-distance` `data-toss-speed` | how far and how fast counts as a throw |
131
132
  | `data-drop-container` | where the places are looked for |
132
133
 
133
- `data-drag-axis` is `y` for a `reorder` with no `land`, `toss` or `leave` beside
134
- it — it walks the list; a list that runs sideways says `x` — and `xy` for
135
- everything else, which goes wherever the hand takes it.
134
+ **How the items of a list are laid out**, `data-reorder-flow` on the list or
135
+ any ancestor: `column`, one under the other; `row`, side by side on one line;
136
+ `wrap`, side by side over as many lines as it takes — inline-blocks, a
137
+ `flex-wrap`, a grid. A row runs in the writing direction of its list. Said
138
+ nothing, it is read from where the items stand: one level with the next makes a
139
+ row, and which of the two is on the left says which way it runs.
140
+
141
+ It decides which side of an item the copy goes. Down a column, by how far down
142
+ the copy is. Along a row, wrapped or not, by how far across its middle is,
143
+ whatever the widths of the two: let go over the far half of an item, it goes
144
+ after it; how high it is says nothing there.
145
+
146
+ `data-drag-axis` follows it for a `reorder` with no `land`, `toss` or `leave`
147
+ beside it — the copy walks the list: `y` down a column (also when nothing is
148
+ said), `x` along a row, `xy` for a row that wraps, its copy changing line — and
149
+ is `xy` for everything else, which goes wherever the hand takes it.
136
150
 
137
151
  ### While it is being moved: `moving`
138
152
 
@@ -336,7 +350,10 @@ it.
336
350
  The drop hint follows what a place is: a line drawn in the gap for `reorder`, the
337
351
  place itself lit up for `land`. Both are drawn among the places — the parent, or
338
352
  the `data-drop-container` — so the variables dressing them are set on the list,
339
- the board or the surface and reach them by inheritance:
353
+ the board or the surface and reach them by inheritance. Along a row the line
354
+ stands upright, as tall as the item, and each margin keeps its axis:
355
+ `--drop-hint-margin-y` takes it into the gap down a list, `--drop-hint-margin-x`
356
+ along a row, and the other one shortens it.
340
357
 
341
358
  | Variable | Dresses |
342
359
  | ------------------------------------------------------------------------------------------ | ----------------------- |
@@ -299,15 +299,16 @@ What each row costs depends on what reads the picker's value before anything
299
299
  opens. A picker told no value — no `value`, `defaultValue` or `signal` — holds
300
300
  what the control in its popup holds, so that popup is built, closed, as soon as
301
301
  something reads the value: the trigger navi draws (no `ui`, a `Picker.UI.*`, a
302
- component `ui` handed `value`), the clear cross, a form or group collecting it,
303
- an element `ui` calling `usePickerState()`. A hundred such rows is then a
304
- hundred closed popups. One heavy enough to matter can say
305
- `mount="from-first-open"`, and the picker then knows nothing of what that
306
- control holds until the first opening: its trigger cannot draw it, and nothing
307
- reading the picker sees it. A picker read by nothing before it opens — its
308
- trigger a drawing of the caller's that does not ask for the value, no name, no
309
- cross — builds on the first open, like a picker told a value, a
310
- `type="confirm"` and a `mode="callout"`.
302
+ component `ui` handed `value`), the clear cross, a form or group collecting it
303
+ (a `<Details>` around it collects nothing), an element `ui` calling
304
+ `usePickerState()`. A hundred such rows is then a hundred closed popups. One
305
+ heavy enough to matter can say `mount="from-first-open"`, and the picker then
306
+ knows nothing of what that control holds until the first opening: its trigger
307
+ cannot draw it, and nothing reading the picker sees it. A picker read by nothing
308
+ before it opens — its trigger a drawing of the caller's that does not ask for
309
+ the value, no name, no cross — builds on the first open, like a picker told a
310
+ value, one that picks nothing (`picksNothing`, `type="confirm"`) and a
311
+ `mode="callout"`.
311
312
 
312
313
  ### Composing a value, or doing work
313
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.473",
3
+ "version": "0.29.475",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "preact": "^11.0.0-rc.2"
35
35
  },
36
36
  "dependencies": {
37
- "@jsenv/dom": "0.17.92",
37
+ "@jsenv/dom": "0.17.93",
38
38
  "@jsenv/humanize": "1.8.7",
39
39
  "@jsenv/validity": "0.4.5"
40
40
  },