@usableapp/cardds 0.6.7 → 0.6.8

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,10 @@
2
2
 
3
3
  > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap.
4
4
 
5
+ ## 0.6.8 — 2026-09-23
6
+
7
+ - **`Walkthrough`: a new page starts at its lead.** On a page turn (the pager, or the app changing `at`), the walk scrolls back to the top, so the next page never opens where the last one was scrolled to (Lh 2026-09-23).
8
+
5
9
  ## 0.6.7 — 2026-09-23
6
10
 
7
11
  ### A walk scrolls as one run (Lh 2026-09-23 — answers timebank #138)
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef, useState } from 'react';
2
+ import { useEffect, useRef, useState } from 'react';
3
3
  import { Screen } from '../scaffold/Screen.js';
4
4
  import { Step } from '../sheets/Step.js';
5
5
  import { Page } from '../scaffold/Page.js';
@@ -19,6 +19,9 @@ export function Walkthrough({ pages, at: atProp, defaultAt = 0, onAtChange, cta,
19
19
  const [own, setOwn] = useState(defaultAt);
20
20
  const at = atProp ?? own;
21
21
  const step = useRef(null);
22
+ // a new page starts where a page starts — at its lead, not where the last one was scrolled to (Lh 2026-09-23)
23
+ useEffect(() => { const p = step.current?.querySelector(':scope > .pages'); if (p)
24
+ p.scrollTop = 0; }, [at]);
22
25
  const count = pages.length;
23
26
  const go = (to) => {
24
27
  if (to < 0 || to >= count || to === at)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev), tests/ measures the geometry.",