@yuneta/gobj-ui 5.3.1 → 5.3.3
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/dist/gobj-ui.cjs.js +2 -1
- package/dist/gobj-ui.es.js +2 -1
- package/package.json +1 -1
- package/src/c_yui_node.css +19 -0
- package/src/c_yui_node.js +5 -1
- package/src/c_yui_shell.js +7 -1
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -2213,7 +2213,8 @@ function push_overlay_history(gobj, close, opts) {
|
|
|
2213
2213
|
let entry = {
|
|
2214
2214
|
id: ++priv.overlay_seq,
|
|
2215
2215
|
close,
|
|
2216
|
-
hash: window.location.hash
|
|
2216
|
+
hash: window.location.hash,
|
|
2217
|
+
keep_on_navigate: !!(opts && opts.keep_on_navigate)
|
|
2217
2218
|
};
|
|
2218
2219
|
priv.overlay_stack.push(entry);
|
|
2219
2220
|
try {
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -2208,7 +2208,8 @@ function push_overlay_history(gobj, close, opts) {
|
|
|
2208
2208
|
let entry = {
|
|
2209
2209
|
id: ++priv.overlay_seq,
|
|
2210
2210
|
close,
|
|
2211
|
-
hash: window.location.hash
|
|
2211
|
+
hash: window.location.hash,
|
|
2212
|
+
keep_on_navigate: !!(opts && opts.keep_on_navigate)
|
|
2212
2213
|
};
|
|
2213
2214
|
priv.overlay_stack.push(entry);
|
|
2214
2215
|
try {
|
package/package.json
CHANGED
package/src/c_yui_node.css
CHANGED
|
@@ -41,6 +41,25 @@
|
|
|
41
41
|
flex: 0 0 auto;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/* A LINK node is the other case: its viewer IS the page, so it takes
|
|
45
|
+
* the remaining height and is BOUNDED by it — the box the stage gives
|
|
46
|
+
* a view the shell mounts, which is the whole promise of a link ("a
|
|
47
|
+
* viewer cannot tell whether the shell mounted it or a node did").
|
|
48
|
+
*
|
|
49
|
+
* Sized by content, as above, it overflows its host instead of
|
|
50
|
+
* shrinking, and a viewer that MEASURES its own box to size a canvas
|
|
51
|
+
* (C_G6_NODES_TREE and its ResizeObserver) then grows the box it just
|
|
52
|
+
* measured: observe → setSize → bigger box → observe. That gclass
|
|
53
|
+
* documents "setSize does not change the observed box, so there is no
|
|
54
|
+
* feedback loop", and it is right — as long as somebody bounds the
|
|
55
|
+
* height. Under a link, that somebody is this rule. */
|
|
56
|
+
.NODE_CONTENT_LINK {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
flex: 1 1 auto;
|
|
60
|
+
min-height: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
44
63
|
/* The index projection (a card grid, a list…) is the page when this
|
|
45
64
|
* node is the tip: it takes the remaining height and scrolls. */
|
|
46
65
|
.NODE_INDEX {
|
package/src/c_yui_node.js
CHANGED
|
@@ -760,7 +760,11 @@ function render_self(gobj)
|
|
|
760
760
|
if(view) {
|
|
761
761
|
let $v = gobj_read_attr(view, "$container");
|
|
762
762
|
if($v) {
|
|
763
|
-
|
|
763
|
+
/* A LINK's viewer IS the page and must be BOUNDED by the
|
|
764
|
+
* body; a plain content is a header above the index and
|
|
765
|
+
* keeps its natural height. Two boxes, so two classes. */
|
|
766
|
+
let $slot = createElement2(["div", {class: has_link(gobj)
|
|
767
|
+
? "NODE_CONTENT NODE_CONTENT_LINK" : "NODE_CONTENT"}]);
|
|
764
768
|
$slot.appendChild($v);
|
|
765
769
|
priv.$body.appendChild($slot);
|
|
766
770
|
}
|
package/src/c_yui_shell.js
CHANGED
|
@@ -2389,7 +2389,13 @@ function push_overlay_history(gobj, close, opts)
|
|
|
2389
2389
|
* route (a `stay` action route parks the URL off it). Kept in sync
|
|
2390
2390
|
* by the silent replaceState fix-up in navigate_to(). */
|
|
2391
2391
|
let entry = { id: ++priv.overlay_seq, close: close,
|
|
2392
|
-
hash: window.location.hash
|
|
2392
|
+
hash: window.location.hash,
|
|
2393
|
+
/* Read by drain_overlays: a navigation PANEL survives a
|
|
2394
|
+
* resting-route change. Dropping it here left the whole
|
|
2395
|
+
* opt-out dead for overlays — invisible while the only
|
|
2396
|
+
* app exercising it had a window manager, because a
|
|
2397
|
+
* dock-managed window registers no overlay at all. */
|
|
2398
|
+
keep_on_navigate: !!(opts && opts.keep_on_navigate) };
|
|
2393
2399
|
priv.overlay_stack.push(entry);
|
|
2394
2400
|
try {
|
|
2395
2401
|
window.history.pushState({ __yui_overlay__: entry.id }, "");
|