@yuneta/gobj-ui 5.3.0 → 5.3.2

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.
@@ -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 {
@@ -13866,7 +13867,7 @@ function yui_shell_show_route_map(shell, opts) {
13866
13867
  title: "site map",
13867
13868
  icon: "yi-bars",
13868
13869
  body: $body,
13869
- manager: (0, _yuneta_gobj_js.gobj_find_service)("__window_manager__", false),
13870
+ manager: (0, _yuneta_gobj_js.gobj_find_service)("__window_manager__", false) || null,
13870
13871
  keep_on_navigate: true
13871
13872
  }, shell);
13872
13873
  if (!win) {
@@ -53164,6 +53165,7 @@ function setup_dev(self, show) {
53164
53165
  title: "Developer",
53165
53166
  icon: "yi-terminal",
53166
53167
  manager: (0, _yuneta_gobj_js.gobj_find_service)("__window_manager__", false) || null,
53168
+ keep_on_navigate: true,
53167
53169
  on_close: function() {
53168
53170
  (0, _yuneta_gobj_js.kw_set_local_storage_value)("open_developer_window", 0);
53169
53171
  }
@@ -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 {
@@ -13860,7 +13861,7 @@ function yui_shell_show_route_map(shell, opts) {
13860
13861
  title: "site map",
13861
13862
  icon: "yi-bars",
13862
13863
  body: $body,
13863
- manager: gobj_find_service("__window_manager__", false),
13864
+ manager: gobj_find_service("__window_manager__", false) || null,
13864
13865
  keep_on_navigate: true
13865
13866
  }, shell);
13866
13867
  if (!win) {
@@ -53150,6 +53151,7 @@ function setup_dev(self, show) {
53150
53151
  title: "Developer",
53151
53152
  icon: "yi-terminal",
53152
53153
  manager: gobj_find_service("__window_manager__", false) || null,
53154
+ keep_on_navigate: true,
53153
53155
  on_close: function() {
53154
53156
  kw_set_local_storage_value("open_developer_window", 0);
53155
53157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -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 }, "");
@@ -456,6 +456,15 @@ export function yui_shell_show_route_map(shell, opts)
456
456
  /* Preferred: a resizable, maximisable floating window. */
457
457
  if(gclass_find_by_name("C_YUI_WINDOW") !== null) {
458
458
  let win_ref = {gobj: null};
459
+ /* A workspace surface, not a thing floating over one view: it
460
+ * joins the dock when the app HAS one (minimise, restore, focus
461
+ * like any other window). Passed only when it exists —
462
+ * gobj_find_service() answers `undefined` for an absent
463
+ * service, and handing undefined to a DTP_POINTER attr is one
464
+ * "attr undefined: manager" per open in every app without a
465
+ * dock. Without one the map stays a floating overlay, and
466
+ * `keep_on_navigate` gives it the same survives-navigation
467
+ * behaviour there. */
459
468
  let $body = build_body(shell, t);
460
469
  let $parent = yui_shell_popup_layer(shell) ||
461
470
  (typeof document !== "undefined" &&
@@ -475,12 +484,14 @@ export function yui_shell_show_route_map(shell, opts)
475
484
  title: "site map",
476
485
  icon: "yi-bars",
477
486
  body: $body,
478
- /* A workspace surface, not a thing floating over one view:
479
- * it joins the dock when the app has one (minimise, restore,
480
- * focus like any other window). Without a dock it stays a
481
- * floating overlay, and `keep_on_navigate` gives it the same
482
- * survives-navigation behaviour there. */
483
- manager: gobj_find_service("__window_manager__", false),
487
+ /* Opt into the dock/taskbar if the app provides one. `|| null`
488
+ * because gobj_find_service returns UNDEFINED when absent, and an
489
+ * undefined attr value logs "attr undefined: manager" one per
490
+ * open in every app without a window manager (wattyzer). The same
491
+ * trap yui_dev.js already documents; null = no dock, and
492
+ * keep_on_navigate then gives the map the same
493
+ * survives-navigation behaviour a docked window has. */
494
+ manager: gobj_find_service("__window_manager__", false) || null,
484
495
  keep_on_navigate: true
485
496
  }, shell);
486
497
  if(!win) {
package/src/yui_dev.js CHANGED
@@ -1547,6 +1547,11 @@ function setup_dev(self, show)
1547
1547
  * an undefined attr value logs "attr undefined: manager" (apps
1548
1548
  * without a window manager, e.g. wattyzer). null = no dock. */
1549
1549
  manager: gobj_find_service("__window_manager__", false) || null,
1550
+ /* A monitor is watched WHILE navigating: closing it on every
1551
+ * route change made it useless for the one job it has. A
1552
+ * dock-managed window is outside the drain already; this is
1553
+ * the same for an app with no dock. */
1554
+ keep_on_navigate: true,
1550
1555
  on_close: function() {
1551
1556
  kw_set_local_storage_value("open_developer_window", 0);
1552
1557
  }