cursedbelt 5.85.1 → 5.87.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.
Files changed (46) hide show
  1. package/dist/react/components/ListToolbar.d.ts +8 -4
  2. package/dist/react/components/ListToolbar.d.ts.map +1 -1
  3. package/dist/react/components/ListToolbar.js +15 -11
  4. package/dist/react/components/ListToolbar.js.map +1 -1
  5. package/dist/react/components/Page.d.ts +3 -0
  6. package/dist/react/components/Page.d.ts.map +1 -1
  7. package/dist/react/components/Page.js +3 -0
  8. package/dist/react/components/Page.js.map +1 -1
  9. package/dist/react/engagement/beacon.d.ts +8 -1
  10. package/dist/react/engagement/beacon.d.ts.map +1 -1
  11. package/dist/react/engagement/beacon.js +22 -7
  12. package/dist/react/engagement/beacon.js.map +1 -1
  13. package/dist/react/engagement/beaconClient.d.ts +27 -0
  14. package/dist/react/engagement/beaconClient.d.ts.map +1 -1
  15. package/dist/react/engagement/beaconClient.js +45 -0
  16. package/dist/react/engagement/beaconClient.js.map +1 -1
  17. package/dist/react/engagement/index.d.ts +2 -2
  18. package/dist/react/engagement/index.d.ts.map +1 -1
  19. package/dist/react/engagement/index.js +3 -3
  20. package/dist/react/engagement/index.js.map +1 -1
  21. package/dist/styles-areas/workbench.css +5 -5
  22. package/dist/styles-static.css +7 -0
  23. package/dist/styles-utilities.css +3 -0
  24. package/dist/styles.css +7 -0
  25. package/dist/testing/appleWalk.d.ts +7 -0
  26. package/dist/testing/appleWalk.d.ts.map +1 -1
  27. package/dist/testing/appleWalk.js +19 -1
  28. package/dist/testing/appleWalk.js.map +1 -1
  29. package/dist/testing/designAudit.d.ts +1 -1
  30. package/dist/testing/designAudit.d.ts.map +1 -1
  31. package/dist/testing/designAudit.js +27 -0
  32. package/dist/testing/designAudit.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/react/components/ListToolbar.tsx +14 -11
  35. package/src/react/components/Page.tsx +3 -0
  36. package/src/react/engagement/beacon.spec.tsx +62 -0
  37. package/src/react/engagement/beacon.tsx +32 -7
  38. package/src/react/engagement/beaconClient.spec.ts +44 -1
  39. package/src/react/engagement/beaconClient.ts +50 -0
  40. package/src/react/engagement/index.ts +4 -2
  41. package/src/styles-areas/workbench.css +5 -5
  42. package/src/styles-static.css +7 -0
  43. package/src/styles-utilities.css +3 -0
  44. package/src/styles.css +7 -0
  45. package/src/testing/appleWalk.ts +17 -1
  46. package/src/testing/designAudit.ts +31 -0
@@ -19,6 +19,7 @@
19
19
  /** Every rule this audit decides. The IDs are the design guide's, unchanged. */
20
20
  export const DESIGN_RULES = [
21
21
  'LAY-10',
22
+ 'LAY-8',
22
23
  'FND-6',
23
24
  'CPY-1',
24
25
  'DAT-16',
@@ -46,6 +47,7 @@ export type DesignRuleId = (typeof DESIGN_RULES)[number];
46
47
  /** What each rule says, in one line — printed beside every finding so a red reads on its own. */
47
48
  export const DESIGN_RULE_TITLES: Record<DesignRuleId, string> = {
48
49
  'LAY-10': 'the page scrolls sideways',
50
+ 'LAY-8': 'a ScrollArea taller than the screen that nothing scrolls — what is below the first screen is unreachable',
49
51
  'FND-6': 'visible text under 12px',
50
52
  'CPY-1': 'a run of text over 200 characters outside a prose/help surface',
51
53
  'DAT-16': 'a non-value (`[object Object]`, `undefined`, `NaN`, `null`, `Invalid Date`) on screen',
@@ -200,6 +202,35 @@ export function designProbe({ rules, allowProse, specimens }: ProbeArgs): Design
200
202
  push('LAY-10', null, `scrollWidth ${scroller.scrollWidth}px > viewport ${window.innerWidth}px`);
201
203
  }
202
204
 
205
+ // ── LAY-8 · a ScrollArea is bounded, or nothing below the first screen is reachable ──
206
+ // roms, 2026-10-21 (forge task 3493): `/stats` and `/settings` put their `Page` in a slot that was
207
+ // a plain block, not a flex column, so the Page grew to its content (2048px in a 900px window),
208
+ // its ScrollArea had nothing to scroll, and under the shell's `overflow: hidden` every pixel below
209
+ // the first screen was unreachable — in production, past every gate. A bounded area is never
210
+ // taller than the screen; one that is, whose bottom no scrolling ancestor and no document scroll
211
+ // can bring into view, is that bug.
212
+ if (on.has('LAY-8')) {
213
+ const scrollsY = (el: Element) => /auto|scroll/.test(getComputedStyle(el).overflowY);
214
+ const clipped = (el: Element) => /hidden|clip/.test(getComputedStyle(el).overflowY);
215
+ const documentScrolls =
216
+ scroller.scrollHeight > window.innerHeight + 1 && !clipped(document.documentElement) && !clipped(document.body);
217
+ for (const area of document.querySelectorAll('[data-cb-scrollarea]')) {
218
+ if (!shown(area) || !scrollsY(area)) continue;
219
+ if (area.clientHeight <= window.innerHeight + 1 || area.getBoundingClientRect().bottom <= window.innerHeight + 1) continue;
220
+ let reachable = documentScrolls;
221
+ for (let cur = area.parentElement; !reachable && cur && cur !== document.body; cur = cur.parentElement) {
222
+ reachable = scrollsY(cur) && cur.scrollHeight > cur.clientHeight + 1;
223
+ }
224
+ if (!reachable) {
225
+ push(
226
+ 'LAY-8',
227
+ area,
228
+ `${area.clientHeight}px tall in a ${window.innerHeight}px window, and nothing scrolls it — its Page is not in a flex column (or a slot of definite height)`,
229
+ );
230
+ }
231
+ }
232
+ }
233
+
203
234
  // ── Text: FND-6 size floor · CPY-1 run length · DAT-16 non-values ───────────
204
235
  const fnd6 = new Set<Element>();
205
236
  const cpy1 = new Set<Element>();