@usableapp/cardds 0.7.98 → 0.7.99

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,18 @@
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. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
4
4
 
5
+ ## 0.7.99 — 2026-10-19
6
+
7
+ The check only (`cardds check` and the ESLint plugin); no component, prop, class or token changes.
8
+
9
+ Components: none
10
+
11
+ ### Added
12
+ - **`cardds check` rule `field-off-sheet` (error): a form is never on the ground, it sits only on a sheet** (Lh 2026-10-18, from timebank's ask steps). Before → after: `field-in-card` refused a control only when a `<Card>` was round it, so a `Composer`, a `Dropdown` and a `Calendar` written straight on a `<Page>` (timebank's ask steps, slid inside a tab's `<Pages>`) passed with 0 errors → a control the member fills or picks (the same list as `field-in-card`) whose nearest container in the file is a `Page`, `Pages`, `Step` or `Screen` is an error. Not flagged: under a `Sheet`, `SheetBody`, `SheetStep`, `StackSheet` or `SheetStack`; a bar's control (in an `ActionBarTier`, a `FilterRow`, a `TopBar`'s actions or an `AppBar`); and a control with no container in its file (a step component's fragment), which the file that places it decides. The check reads one file at a time, so a bare `Page` built in one file and placed in another is seen where it holds the controls. To pass: put the form on its own sheet over the screen, `<SheetStage over dim><Sheet>…<SheetBody>…controls…</SheetBody>…</Sheet></SheetStage>` (gallery `Home/AskSheet`). The ESLint plugin reports it under `cardds/check`.
13
+
14
+ ### Fixed
15
+ - **`cardds check` takes an absolute path.** Before → after: `npx cardds check /abs/path` answered "no such folder or file" because the path was joined onto the folder the check ran in → an absolute path is that path.
16
+
5
17
  ## 0.7.98 — 2026-10-18
6
18
 
7
19
  Components: all
package/bin/cardds.mjs CHANGED
@@ -28,12 +28,12 @@ function* sources(dir) {
28
28
  // A check that read nothing has proved nothing: a path that is not there, or a folder with no source in it, is exit 2 — never "clean".
29
29
  function check(dirs) {
30
30
  const roots = dirs.length ? dirs : ['src'];
31
- const missing = roots.filter((d) => !existsSync(join(cwd, d)));
31
+ const missing = roots.filter((d) => !existsSync(resolve(cwd, d)));
32
32
  if (missing.length) { for (const d of missing) console.error(`cardds check: ${d}: no such folder or file — \`npx cardds check <dir>\``); return 2; }
33
33
  let errors = 0, warns = 0, read = 0;
34
34
  for (const dir of roots) {
35
35
  let here = 0;
36
- for (const file of sources(join(cwd, dir))) {
36
+ for (const file of sources(resolve(cwd, dir))) {
37
37
  here++;
38
38
  for (const f of checkSource(readFileSync(file, 'utf8'), relative(cwd, file))) {
39
39
  f.level === 'error' ? errors++ : warns++;