@jsenv/navi 0.29.404 → 0.29.407

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.
@@ -232,8 +232,8 @@ to start when unsure which export solves a problem.
232
232
  `:nth-child`, `:empty`) on a container holding navi components.
233
233
  - `safe_area.md` — the two inset families, an app narrower than the window
234
234
  (`--navi-app-max-width`), `data-navi-safe-area`, which viewport is which under
235
- a virtual keyboard (overlaid on Chromium by default:
236
- `--navi-keyboard-inset-bottom`). Read before hand-writing an offset to clear a `FixedBar`.
235
+ a virtual keyboard (overlaid on Chromium only with
236
+ `enableVirtualKeyboardOverlay()`: `--navi-keyboard-inset-bottom`). Read before hand-writing an offset to clear a `FixedBar`.
237
237
  - `scroll.md` — where scrolling happens: `header`/`body`/`footer`, `List`'s
238
238
  `scroller`, where a list opens and what a search does to where it is, a popup
239
239
  that scrolls, hover while scrolling; many rows: `<List.Items>` and the render
package/docs/safe_area.md CHANGED
@@ -200,23 +200,27 @@ the keyboard moves depends on the browser.
200
200
  | `visualViewport.height` | yes, except where the keyboard overlays (below) |
201
201
  | `--navi-vvh` (tracks the visual) | same as `visualViewport.height` |
202
202
 
203
- Wherever the browser has the VirtualKeyboard API (Chromium), navi makes the
204
- keyboard overlay the page rather than shrink it (`src/layout/virtual_keyboard.js`):
205
- no viewport shrinks, and the keyboard arrives as `--navi-keyboard-inset-bottom`
206
- (`env(keyboard-inset-height)`), which `--navi-app-inset-bottom` adds. Firefox,
207
- Safari, and an app that called `disableVirtualKeyboardOverlay()` shrink the
208
- visual viewport instead, and `--navi-keyboard-inset-bottom` stays 0. Either way
203
+ By default the keyboard shrinks the visual viewport, on every browser, and
204
+ `--navi-keyboard-inset-bottom` stays 0. Where the browser has the VirtualKeyboard
205
+ API (Chromium), an app can call `enableVirtualKeyboardOverlay()` to make the
206
+ keyboard overlay the page instead (`src/layout/virtual_keyboard.js`): no viewport
207
+ shrinks, and the keyboard arrives as `--navi-keyboard-inset-bottom`
208
+ (`env(keyboard-inset-height)`), which `--navi-app-inset-bottom` adds. Either way
209
209
  `--navi-app-height` and the popup ceilings answer the part of the screen left
210
210
  visible.
211
211
 
212
212
  An overlaying keyboard is one the browser no longer scrolls the focused field
213
213
  out from under, so navi does: when the keyboard rises or resizes, and when focus
214
- moves to another field with the keyboard up, the focused field is scrolled to
215
- the nearest position clear of it. That scroll relies on both paddings — the
216
- `scroll-padding-bottom` counts the keyboard, and the room to scroll into comes
217
- from the marked element's `padding-bottom`, or, on a page that marked nothing,
218
- from a block navi adds at the end of the document for as long as the keyboard
219
- is up.
214
+ moves to another field with the keyboard up, a focused field that is not fully
215
+ inside the document's `scroll-padding` box is centered in it. Chrome paints an
216
+ autofill/suggestion strip above the keyboard that neither
217
+ `env(keyboard-inset-height)` nor `geometrychange` counts, so
218
+ `scroll-padding-bottom` adds `--navi-keyboard-strip-allowance` on top of the
219
+ keyboard — which also keeps Chrome's own caret-following, as a textarea grows
220
+ under typing, clear of the strip. The room to scroll into comes from the marked
221
+ element's `padding-bottom`, or, on a page that marked nothing, from a block navi
222
+ adds at the end of the document while the keyboard is up — both count the
223
+ keyboard and the allowance.
220
224
 
221
225
  `position: fixed` — so every `FixedBar` — is laid out against the **layout**
222
226
  viewport. Where the visual viewport is what shrinks, a bottom bar therefore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.404",
3
+ "version": "0.29.407",
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.77",
37
+ "@jsenv/dom": "0.17.79",
38
38
  "@jsenv/humanize": "1.8.6",
39
39
  "@jsenv/validity": "0.4.5"
40
40
  },