@usableapp/cardds 0.7.95 → 0.7.96
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 +62 -0
- package/README.md +95 -9
- package/bin/cardds.mjs +1 -1
- package/css/actions.css +9 -12
- package/css/base.css +3 -6
- package/css/card.css +11 -17
- package/css/choice.css +14 -11
- package/css/finish.css +4 -2
- package/css/journey.css +7 -4
- package/css/layover.css +16 -11
- package/css/lists.css +4 -9
- package/css/media.css +20 -16
- package/css/numbers.css +16 -18
- package/css/palette.css +79 -97
- package/css/people.css +5 -4
- package/css/post.css +2 -1
- package/css/sheet.css +13 -10
- package/css/sticky.css +6 -5
- package/css/theme.template.css +16 -7
- package/css/tokens.css +69 -35
- package/dist/cardds.css +280 -260
- package/dist/cards/cardGrounds.d.ts +22 -0
- package/dist/cards/cardGrounds.js +84 -0
- package/dist/cards/inkGrounds.d.ts +34 -0
- package/dist/cards/inkGrounds.js +181 -0
- package/dist/catalog.json +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/lib/guide.mjs +1 -1
- package/lint/rules.mjs +5 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export * from './scaffold/Centre.js';
|
|
|
21
21
|
export * from './scaffold/slideScreen.js';
|
|
22
22
|
export * from './scaffold/LayerHistory.js';
|
|
23
23
|
export * from './cards/Card.js';
|
|
24
|
+
export * from './cards/cardGrounds.js';
|
|
25
|
+
export * from './cards/inkGrounds.js';
|
|
24
26
|
export * from './cards/CardHead.js';
|
|
25
27
|
export * from './cards/CardFoot.js';
|
|
26
28
|
export * from './cards/CardParts.js';
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,8 @@ export * from './scaffold/Centre.js';
|
|
|
25
25
|
export * from './scaffold/slideScreen.js';
|
|
26
26
|
export * from './scaffold/LayerHistory.js';
|
|
27
27
|
export * from './cards/Card.js';
|
|
28
|
+
export * from './cards/cardGrounds.js';
|
|
29
|
+
export * from './cards/inkGrounds.js';
|
|
28
30
|
export * from './cards/CardHead.js';
|
|
29
31
|
export * from './cards/CardFoot.js';
|
|
30
32
|
export * from './cards/CardParts.js';
|
package/lib/guide.mjs
CHANGED
|
@@ -7,7 +7,7 @@ ORDER: find → scaffold or get → write → check. First question: has cardds
|
|
|
7
7
|
TOOLS: find_components · scaffold_screen · get_component · list_components · check_source. No MCP: npx cardds find|scaffold|get|list|check (all take --json).
|
|
8
8
|
What no checker sees:
|
|
9
9
|
1. cardds is a framework you take from outside. Never edit, commit to or release cardds from a consumer project, never node_modules. What cannot be set from outside is a framework gap: STOP and tell the user exactly what you needed.
|
|
10
|
-
2. Adjust from outside only, widest first: theme.css bases → knobs (--<component>-<what>) → props/slots. The theme's values are the user's call; never pick them.
|
|
10
|
+
2. Adjust from outside only, widest first: theme.css bases → knobs (--<component>-<what>) → props/slots. The theme's values are the user's call; never pick them. cardGrounds() names a card the member cannot see on that theme; inkGrounds() a word or glyph they cannot read (README "Ink follows its ground").
|
|
11
11
|
3. Every component is controlled like an input (state/open/value + its on…, or default…) and none knows another: the app owns the state and wires them.
|
|
12
12
|
4. Import components, never copy their markup or classes: a component is the look AND the behaviour.
|
|
13
13
|
5. Mobile only, big targets; never adapt it to desktop.
|
package/lint/rules.mjs
CHANGED
|
@@ -251,8 +251,12 @@ export function checkSource(source, file, { classes = carddsClasses() } = {}) {
|
|
|
251
251
|
const el = elementAt(text, m.index);
|
|
252
252
|
const btns = [...el.slice(tag.length).matchAll(/<Btn\b(?![\w.])/g)].map((b) => m.index + tag.length + b.index);
|
|
253
253
|
if (btns.length < 2) continue;
|
|
254
|
+
// the two branches of a conditional (`last ? <Btn primary>Send</Btn> : <Btn primary>Next</Btn>`) are ONE slot: both are the forward one
|
|
255
|
+
const slot = []; let n = 0;
|
|
256
|
+
btns.forEach((at, i) => { if (i && /^\s*\)?\s*:\s*\(?\s*$/.test(text.slice(btns[i - 1] + elementAt(text, btns[i - 1]).length, at))) slot.push(n); else slot.push(++n); });
|
|
257
|
+
if (n < 2) continue;
|
|
254
258
|
btns.forEach((at, i) => {
|
|
255
|
-
const forward = i ===
|
|
259
|
+
const forward = slot[i] === n, primary = /\sprimary\b(?!\s*=\s*\{\s*false)/.test(tagAt(text, at));
|
|
256
260
|
if (primary !== forward) add('pager-forward-primary', 'error', at, forward
|
|
257
261
|
? 'the forward <Btn> of a worded pager is not `primary`: back and next carry the same signal. The last Btn (the step it leads to) is <Btn primary>; the back one stays plain.'
|
|
258
262
|
: 'a back <Btn> of a worded pager is `primary`: only the forward one (the last) is. Drop `primary` here.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.96",
|
|
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.",
|