@qontinui/ui-bridge-wrapper 0.10.0 → 0.12.0

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/README.md CHANGED
@@ -214,6 +214,40 @@ arriving (under `--throttle`, its slow-network load) while the override still
214
214
  confirms decode before it answers. In `--capture-matrix` a relative `dir` lands
215
215
  in each cell's directory.
216
216
 
217
+ ### Text hidden for one frame: text over images on real pixels
218
+
219
+ A snapshot from the injected runtime holds a page's headings, paragraphs and other
220
+ static text as content rows, beside its controls and media, so this measures a hero's
221
+ own heading as well as a link laid over it. Content rows do not count toward settle:
222
+ a `<h1>Loading…</h1>` splash is not the page having arrived. They do reach every
223
+ analyzer that reads the snapshot, so a layout check can report text it could not see
224
+ before: python.org's layout criticals went from 1 to 4 on upgrading. At most 500 are
225
+ registered, with headings and prose ahead of table cells and list items within a
226
+ seed pass; nothing evicts a row already held, so text mounted after the cap is full
227
+ gets none.
228
+
229
+ The injected runtime also serves the `textVisibility` dev control, which makes
230
+ every glyph on the page transparent for one frame and then restores the page
231
+ exactly. Frame A (normal) and frame B (text hidden) against one snapshot differ,
232
+ inside each text element's box, exactly where its glyphs paint, and frame B
233
+ shows what they sit on:
234
+
235
+ ```bash
236
+ ui-bridge-inject --url http://127.0.0.1:3000/ --screenshot './frames/frame-{n}.png' \
237
+ --exec 'getControlSnapshot {}' \
238
+ --exec 'textVisibility {"hidden":true}' --exec 'getControlSnapshot {}' \
239
+ --exec 'textVisibility {"hidden":false}'
240
+ ```
241
+
242
+ Hiding writes inline `!important` values on every element: `color`,
243
+ `-webkit-text-fill-color` and SVG text `fill` go transparent, `text-shadow`
244
+ goes `none` and transitions are switched off, so frame B is never caught
245
+ mid-fade. Paint that only followed the text colour (a `currentColor` border or
246
+ icon) is pinned to the colour it had, so only glyphs change. `{"hidden":false}`
247
+ writes every `style` attribute back byte for byte (`restore.verified: true`),
248
+ without the text fading back in; a TTL (`ttlMs`, default 30000) restores the
249
+ page by itself if the run dies.
250
+
217
251
  #### Sourcing credentials from SSM (qontinui operators)
218
252
 
219
253
  The bins read credentials from env / flags only — they intentionally do **not**
@@ -611,7 +611,7 @@ var InjectedTransport = class extends HeadlessTransport {
611
611
  }
612
612
  /**
613
613
  * Best-effort digest of the first {@link DIGEST_MAX_ELEMENTS} registered
614
- * interactive elements, read through the in-page dispatcher's
614
+ * interactive and media elements, read through the in-page dispatcher's
615
615
  * `getControlSnapshot` action (the snapshot's per-element projection is
616
616
  * already redaction-safe — we never read raw DOM labels here). Returns
617
617
  * `null` on ANY failure or timeout: this feeds error diagnostics only, and a
@@ -633,7 +633,10 @@ var InjectedTransport = class extends HeadlessTransport {
633
633
  const elements = snapshot.elements;
634
634
  if (!Array.isArray(elements)) return null;
635
635
  const digest = [];
636
- for (const el of elements.slice(0, DIGEST_MAX_ELEMENTS)) {
636
+ const counted = elements.filter(
637
+ (el) => el?.category !== "content"
638
+ );
639
+ for (const el of counted.slice(0, DIGEST_MAX_ELEMENTS)) {
637
640
  if (!el || typeof el !== "object") continue;
638
641
  const e = el;
639
642
  if (typeof e.id !== "string") continue;