@aria-framework/notify 0.7.0 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  Older releases are recorded in the README's "Upgrading to …" sections; this file starts at 0.7.0.
4
4
 
5
+ ## 0.7.1 — 2026-11-16
6
+
7
+ **Fix: "Live updates paused. Refresh to see changes." no longer stays on screen after the stream reconnects.**
8
+ The strip carries Bootstrap's `d-flex` (`display:flex !important`), which beats the `hidden` attribute (reboot's
9
+ `[hidden]{display:none!important}` comes first at the same specificity). 0.7.0 hid it with `strip.hidden = true` only,
10
+ so after ANY momentary drop (the hub sign-in cutting streams at 30 minutes, a network blip) the strip stayed visible
11
+ for good while the regions were live again; the tests read the attribute, not what is displayed.
12
+
13
+ - `live.js` hides the strip (and the "N new" bar) with `hidden` AND Bootstrap's `d-none`, and shows it by removing both.
14
+ - `bell.css` adds `.live-strip[hidden], .live-newbar[hidden] { display:none !important }` — two selectors' worth of
15
+ specificity, so it wins over `.d-flex` in any order and without depending on the host's CSS framework.
16
+ - **New, additive:** the strip carries `data-live-reason` — `down` (the stream dropped) or the live-stop's reason
17
+ (`too_many`, `evicted`, `off`, …) — and drops it when hidden. The words are unchanged.
18
+ - Tests (`test/live-client.js`) now read the strip's COMPUTED display under Bootstrap 5.3.3's own rules: down → shown
19
+ (flex), reopen → not displayed and undimmed, live-stop → shown and stays; each mechanism alone. jsdom settles two
20
+ `!important` declarations by order, not specificity, so the bell.css rule's specificity is asserted structurally.
21
+
22
+ No app code changes: bump `@aria-framework/notify` to `^0.7.1` and refresh the lockfile.
23
+
5
24
  ## 0.7.0 — 2026-11-04
6
25
 
7
26
  Carries 0.6.0 (per-audience stream caps), which was merged but never published: **publish 0.7.0 only**.
package/README.md CHANGED
@@ -247,7 +247,9 @@ sit on the row or its first cell): with `data-live-insert` (draw it on page 1, d
247
247
  ticked, new rows are put in and marked New; otherwise a bar says "N new. Show them". Every reconnect catches every
248
248
  region up once (there is no replay). When the stream drops or is stopped, a strip says "Live updates paused" with a
249
249
  Refresh button — or, when the app refused the topics with the reason `off` (0.5.1: its installation-wide switch),
250
- "Live updates are off". Frames that arrive after this page submitted a form are ignored (the mid-navigation trap above)
250
+ "Live updates are off". The strip carries `data-live-reason` (0.7.1: `down`, or the stop's reason) and clears on the
251
+ next open; it is hidden with `hidden` AND `d-none`, and bell.css (linked by the bell partial) keeps
252
+ `.live-strip[hidden]` undisplayed, because Bootstrap's `.d-flex` beats the bare attribute. Frames that arrive after this page submitted a form are ignored (the mid-navigation trap above)
251
253
  until the page navigates — or, for a submit that does not (a download, `target=_blank`), until it is visible again
252
254
  or 8 s pass; a submit a script prevented is not a navigation.
253
255
 
package/assets/bell.css CHANGED
@@ -87,6 +87,12 @@
87
87
  .notif-row.is-read .notif-body{color:var(--text-faint, var(--bs-secondary-color));}
88
88
 
89
89
  /* ── Live page regions (assets/live.js, 0.5.0) ─────────────────────────────────────────────── */
90
+ /* 0.7.1: a hidden strip or bar is NOT displayed, whatever the host's CSS. Both carry Bootstrap's .d-flex
91
+ * (display:flex !important), which beats the [hidden] attribute (reboot's rule comes first at the same
92
+ * specificity), so 0.7.0's "Live updates paused" strip stayed on screen after every reconnect. Two classes'
93
+ * worth of specificity outranks .d-flex in any order; live.js also toggles .d-none. */
94
+ .live-strip[hidden],
95
+ .live-newbar[hidden]{display:none !important;}
90
96
  .live-paused{opacity:.6;transition:opacity .2s;}
91
97
  .live-new{background:rgba(var(--brand-rgb, var(--bs-primary-rgb)), .07);transition:background 2s;}
92
98
  .live-new-pill{display:inline-block;margin-right:.4em;padding:0 .45em;border-radius:1em;font-size:.72em;font-weight:600;
package/assets/live.js CHANGED
@@ -97,13 +97,27 @@
97
97
  : (reason === 'too_many' || reason === 'evicted')
98
98
  ? 'Live updates paused: too many open tabs. Close one and refresh, or refresh to see changes.'
99
99
  : 'Live updates paused. Refresh to see changes.';
100
- strip.hidden = false;
100
+ // data-live-reason (0.7.1): the reason word — 'down', or the live-stop's own (too_many, evicted, off, …) — for
101
+ // styling or a test; the words above are unchanged.
102
+ strip.setAttribute('data-live-reason', reason || 'down');
103
+ setShown(strip, true);
101
104
  REGIONS.forEach(function (r) { r.classList.add('live-paused'); });
102
105
  }
103
106
  function clearStrip() {
104
- if (strip) strip.hidden = true;
107
+ if (strip) { setShown(strip, false); strip.removeAttribute('data-live-reason'); }
105
108
  REGIONS.forEach(function (r) { r.classList.remove('live-paused'); });
106
109
  }
110
+ /**
111
+ * SHOW OR HIDE an element that carries a Bootstrap display utility (0.7.1). The `hidden` attribute alone does not
112
+ * hide it: Bootstrap 5.3's `.d-flex{display:flex!important}` comes after reboot's `[hidden]{display:none!important}`
113
+ * at the same specificity, so it wins, and 0.7.0's strip stayed on screen after every reconnect. So: `hidden` (what
114
+ * assistive tech reads) AND `d-none` (Bootstrap's own `display:none!important`, later than `.d-flex` in its sheet),
115
+ * with bell.css's `.live-strip[hidden]` rule as the guard that does not depend on Bootstrap's order.
116
+ */
117
+ function setShown(el, on) {
118
+ el.hidden = !on;
119
+ el.classList.toggle('d-none', !on);
120
+ }
107
121
 
108
122
  // ── Re-fetch and swap ─────────────────────────────────────────────────────────────────────
109
123
  /**
@@ -196,7 +210,7 @@
196
210
  if (bar.parentNode) bar.parentNode.removeChild(bar);
197
211
  };
198
212
  bar.__fresh = fresh;
199
- bar.hidden = false;
213
+ setShown(bar, true);
200
214
  }
201
215
 
202
216
  /** Replace `el` by `fresh`, marking rows `fresh` has that `el` had not. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aria-framework/notify",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Aria App Framework — notify module. In-app notifications: ownership-scoped rows, a per-process SSE hub for live delivery (with topics, caps per session, user, audience and process, and a per-event authorise hook for live pages), and a fire-and-forget emitter that needs no request and no actor, so a scheduler can raise one.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,