@jsenv/navi 0.29.177 → 0.29.178
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.
package/docs/css_architecture.md
CHANGED
|
@@ -560,28 +560,25 @@ from the app. Two reasons:
|
|
|
560
560
|
that knob, so a popup that genuinely needs its own `maxWidth` can still say so
|
|
561
561
|
without any of them escaping the app's screen.
|
|
562
562
|
|
|
563
|
-
#####
|
|
563
|
+
##### Placement follows the same rectangle
|
|
564
564
|
|
|
565
|
-
`--navi-app-max-width`
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
`--navi-app-max-width` moves where a popup is placed, not only how big it may
|
|
566
|
+
get. Placement is computed against the visual viewport narrowed to the app's
|
|
567
|
+
own rectangle: navi hands the centered bands to `@jsenv/dom` once
|
|
568
|
+
(`setPlacementViewportInsets`, wired in `navi_css_vars.js`), and
|
|
569
|
+
`pickPositionRelativeTo` reads them on every placement. Invisible for anything
|
|
568
570
|
centered on its cross axis — `center`, `bottom`, `top`, which is what a dialog
|
|
569
|
-
does nearly always — but
|
|
570
|
-
`positionArea` like `bottom-start`, a `SidePanel
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
Note that an app can already get all of it, placement included, by rendering
|
|
582
|
-
itself in an iframe of the target width: the viewport then genuinely _is_ the
|
|
583
|
-
app's screen and no token is needed at all. `--navi-app-max-width` is the answer
|
|
584
|
-
for an app that does not want to pay that price.
|
|
571
|
+
does nearly always — but it is what puts anything anchored to an edge (a
|
|
572
|
+
`positionArea` like `bottom-start`, a `SidePanel`) flush against the app
|
|
573
|
+
column's edge rather than the window's. `FixedBar` reads the same description
|
|
574
|
+
through CSS instead: it is pinned to `--navi-app-inset-*` (see
|
|
575
|
+
`docs/safe_area.md`), which says where the app's rectangle is in the window
|
|
576
|
+
rather than how wide it may be.
|
|
577
|
+
|
|
578
|
+
Note that an app can also get all of it by rendering itself in an iframe of
|
|
579
|
+
the target width: the viewport then genuinely _is_ the app's screen and no
|
|
580
|
+
token is needed at all. `--navi-app-max-width` is the answer for an app that
|
|
581
|
+
does not want to pay that price.
|
|
585
582
|
|
|
586
583
|
### 3. Direct rule override (avoid unless necessary)
|
|
587
584
|
|
package/docs/safe_area.md
CHANGED
|
@@ -151,11 +151,14 @@ _sizes_ must fit what is actually visible.
|
|
|
151
151
|
and turns the bottom bar's number red when it goes under the keyboard. On a
|
|
152
152
|
phone; a desktop has no keyboard to open.
|
|
153
153
|
|
|
154
|
-
##
|
|
155
|
-
|
|
156
|
-
Popup **placement**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
## Placement follows level 1
|
|
155
|
+
|
|
156
|
+
Popup **placement** answers to the level-1 rectangle too: `getAppInsets`
|
|
157
|
+
(`src/layout/responsive.js`) is the JS reading of the level-1 bands, and
|
|
158
|
+
`pickPositionRelativeTo` (in `@jsenv/dom`) computes against the visual
|
|
159
|
+
viewport narrowed by them (`setPlacementViewportInsets`, wired in
|
|
160
|
+
`navi_css_vars.js`). Invisible for anything centered on its cross axis —
|
|
161
|
+
which is what a dialog does nearly always — but it is what puts a
|
|
162
|
+
`positionArea` like `bottom-start` or a `SidePanel` against the app column's
|
|
163
|
+
edge rather than the window's. See "Placement follows the same rectangle" in
|
|
161
164
|
`css_architecture.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/navi",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.178",
|
|
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.
|
|
32
|
+
"@jsenv/dom": "0.17.44",
|
|
33
33
|
"@jsenv/humanize": "1.7.8",
|
|
34
34
|
"@jsenv/validity": "0.4.3"
|
|
35
35
|
},
|