@usableapp/cardds 0.7.98 → 0.7.100
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 +22 -0
- package/bin/cardds.mjs +2 -2
- package/dist/catalog.json +1 -1
- package/docs/reference.md +6 -0
- package/lint/rules.mjs +29 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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.100 — 2026-10-19
|
|
6
|
+
|
|
7
|
+
The check only (`cardds check` and the ESLint plugin); no component, prop, class or token changes. The line below reads `all` only because a script of the build changed (`scripts/ci.mjs`, the release's own check); no screen needs a new look.
|
|
8
|
+
|
|
9
|
+
Components: all
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **`field-off-sheet` no longer flags a form that is on a sheet** (timebank on 0.7.99: 9 errors, none real). Before → after: a TypeScript type argument (`Record<Step, string>`, `useState<Step>`) was read as an opening `<Step>` that never closed, so every control after it in the file was "on the ground", even inside a `SheetBody` or a `ModalAsk` → a `<` right after a name is not a tag, and an element that never closes holds nothing. A `Modal`, `ModalAsk` and `CallSheet` are surfaces, not the ground. A `Pages`/`Page` inside a sheet is fine: a component of the same file whose `<Page>` is rendered inside a `SheetBody` further up the file is on that sheet (the ask steps slid by `Pages` inside the ask `Sheet`). A bare `Page` exported and placed in another file is still flagged where it holds the controls.
|
|
13
|
+
- **A `/*` inside a string no longer hides code from `cardds check`.** Before → after: `accept="image/*"` opened a comment that ran to the next `*/`, so a sheet's closing tag vanished with it → a string is stepped over whole when comments are taken out.
|
|
14
|
+
|
|
15
|
+
## 0.7.99 — 2026-10-19
|
|
16
|
+
|
|
17
|
+
The check only (`cardds check` and the ESLint plugin); no component, prop, class or token changes.
|
|
18
|
+
|
|
19
|
+
Components: none
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- **`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`.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **`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.
|
|
26
|
+
|
|
5
27
|
## 0.7.98 — 2026-10-18
|
|
6
28
|
|
|
7
29
|
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(
|
|
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(
|
|
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++;
|