@usableapp/cardds 0.7.79 → 0.7.80
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 +6 -0
- package/README.md +1 -1
- package/bin/cardds.mjs +3 -2
- package/css/card.css +3 -0
- package/dist/actions/Btn.d.ts +2 -1
- package/dist/cardds.css +3 -0
- package/dist/cards/CardFoot.d.ts +2 -1
- package/dist/cards/CardFoot.js +2 -1
- package/dist/catalog.json +1 -1
- package/lib/mcp.mjs +26 -5
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.7.80 — 2026-10-10
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **`Btn form` keeps its own width in a card's foot** (Lh 2026-10-10, from timebank's home feed: one button filling the card's foot read too big) — before → after: any `Btn` in `CardFoot` / `Card foot` / `FeedCard foot` was stretched over the row, `form` included → a `Btn form` there is as wide as its words (with its wide sides) and centred; a plain `Btn` still fills the foot, and several still share it. The card is still pressed whole. To use it: `foot={<Btn primary form>…</Btn>}`. Which button a card wears is the project's choice. Story `CardFoot · CardFootWordsWide`.
|
|
9
|
+
- **The catalog knows the functions an app calls, and the MCP server serves it as it is now** (Lh 2026-10-10) — before → after: `list_components` / `get_component` / `find_components` did not know `slideScreen`, `installScreenSlide`, `setWords`, `word`, `setTextScale`, `controlsFor` (they live in `.ts` files the catalog did not read) → all six are in, with their docs. And a `cardds mcp` server loaded the catalog once and kept it for the life of its session, so a session opened before a release never learned what the release added → it now loads again whenever the sources (a live repo) or the package's catalog file changed. A session whose server was started before this change must be restarted once to get the new server.
|
|
10
|
+
|
|
5
11
|
## 0.7.79 — 2026-10-10
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ lets anyone on the same network open the dev server: use it on a network you tru
|
|
|
83
83
|
### In another project
|
|
84
84
|
|
|
85
85
|
**React (the main way, 2026-09-16):** the package is `@usableapp/cardds` on npm
|
|
86
|
-
(published from
|
|
86
|
+
(published from this machine: `npm run release` sends every `v*` tag the registry lacks, oldest first).
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
npm i @usableapp/cardds
|
package/bin/cardds.mjs
CHANGED
|
@@ -72,8 +72,9 @@ import them, never copy their markup: the behaviour lives in the component. Gall
|
|
|
72
72
|
return 0;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// the exports beside the components that are not components (docs/roles.md rows `a function, not a component`…): shape `—` and nothing to tell them from a structural part, so they are named
|
|
76
|
-
|
|
75
|
+
// the exports beside the components that are not components (docs/roles.md rows `a function, not a component`…): shape `—` and nothing to tell them from a structural part, so they are named.
|
|
76
|
+
// A new one joins here and in the list test of tests/catalog.spec.js, or it is listed as structure
|
|
77
|
+
const HELPERS = new Set(['applyMask', 'slideTo', 'slideScreen', 'installScreenSlide', 'useLayer', 'useLayers', 'useOptionalLayer', 'registerIcons', 'LayerHistory', 'setWords', 'word', 'setTextScale', 'controlsFor']);
|
|
77
78
|
const one = (text) => text.replace(/\s+/g, ' ').trim();
|
|
78
79
|
const indent = (text, by = ' ') => text.replace(/^(?=.)/gm, by);
|
|
79
80
|
|
package/css/card.css
CHANGED
|
@@ -136,6 +136,9 @@
|
|
|
136
136
|
three on they drop their side padding so the labels keep the room. */
|
|
137
137
|
.card__foot { display: flex; gap: var(--card-foot-gap, var(--sp-2)); align-items: center; }
|
|
138
138
|
.card__foot > .btn { flex: 1 1 0; min-width: 0; }
|
|
139
|
+
/* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
|
|
140
|
+
a card's foot read too big — which button a card wears is the project's choice, so the foot must not undo it) */
|
|
141
|
+
.card__foot > .btn--form { flex: 0 1 auto; }
|
|
139
142
|
.card__foot:has(> :nth-child(3)) > .btn { padding-inline: var(--sp-2); }
|
|
140
143
|
/* a small link under the buttons (CardFoot link — Lh 2026-09-23, as the ActionBar's ctaLink): the row wraps, the link takes a
|
|
141
144
|
whole short row of its own, centred — it never shares the buttons' line */
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
7
7
|
/** full width */
|
|
8
8
|
block?: boolean;
|
|
9
9
|
/** a form's button: sized to its words with wide side padding, centred on its own row — it reads as part of the form above it,
|
|
10
|
-
* not a page CTA (Lh 2026-09-25).
|
|
10
|
+
* not a page CTA (Lh 2026-09-25). In a card's foot (`CardFoot`, `Card foot`, `FeedCard foot`) it keeps that size instead of
|
|
11
|
+
* filling the row. Replaces the native `form` attribute (a button outside its <form> — not a cardds pattern). */
|
|
11
12
|
form?: boolean;
|
|
12
13
|
/** the one giant call to action in a tinted card ("Taxi!") */
|
|
13
14
|
xl?: boolean;
|
package/dist/cardds.css
CHANGED
|
@@ -822,6 +822,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
822
822
|
three on they drop their side padding so the labels keep the room. */
|
|
823
823
|
.card__foot { display: flex; gap: var(--card-foot-gap, var(--sp-2)); align-items: center; }
|
|
824
824
|
.card__foot > .btn { flex: 1 1 0; min-width: 0; }
|
|
825
|
+
/* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
|
|
826
|
+
a card's foot read too big — which button a card wears is the project's choice, so the foot must not undo it) */
|
|
827
|
+
.card__foot > .btn--form { flex: 0 1 auto; }
|
|
825
828
|
.card__foot:has(> :nth-child(3)) > .btn { padding-inline: var(--sp-2); }
|
|
826
829
|
/* a small link under the buttons (CardFoot link — Lh 2026-09-23, as the ActionBar's ctaLink): the row wraps, the link takes a
|
|
827
830
|
whole short row of its own, centred — it never shares the buttons' line */
|
package/dist/cards/CardFoot.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export interface CardFootProps extends ComponentProps<'div'> {
|
|
|
5
5
|
link?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
/** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only in the row; a small
|
|
8
|
-
* link goes in `link`, under it.
|
|
8
|
+
* link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words, centred — for a foot whose one button
|
|
9
|
+
* should not fill the card. */
|
|
9
10
|
export declare function CardFoot({ link, className, children, ...rest }: CardFootProps): import("react").JSX.Element;
|
package/dist/cards/CardFoot.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
3
|
/** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only in the row; a small
|
|
4
|
-
* link goes in `link`, under it.
|
|
4
|
+
* link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words, centred — for a foot whose one button
|
|
5
|
+
* should not fill the card. */
|
|
5
6
|
export function CardFoot({ link, className, children, ...rest }) {
|
|
6
7
|
return (_jsxs("div", { className: cx('card__foot', link != null && 'card__foot--link', className), ...rest, children: [children, link != null && _jsx("div", { className: "card__foot-link", children: link })] }));
|
|
7
8
|
}
|