@tristan2828/ui-foundation 4.129.0 → 4.129.2
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/conventions/AGENTS.md
CHANGED
|
@@ -118,13 +118,19 @@ Follow `docs/foundation/reminders.md`. Never ask for notification
|
|
|
118
118
|
permission on page load: only from the click on "Allow Reminders".
|
|
119
119
|
|
|
120
120
|
## Scope and Stopping
|
|
121
|
-
- Do the task you were given
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
- Do the task you were given. Its tests, its docs and anything it breaks
|
|
122
|
+
are part of it; a refactor or a feature nobody asked for is not. Ideas
|
|
123
|
+
beyond the task go in the app's backlog, not in code.
|
|
124
|
+
- A task is done when the app's gate passes, not when it feels complete:
|
|
125
|
+
`npm run verify`, unless the app's own section below names its gate. Do
|
|
126
|
+
not report a task complete on a failing gate. The developer reviews
|
|
127
|
+
results (the running app, a screenshot, an options page), not every
|
|
128
|
+
line, so the gates are the safety net.
|
|
129
|
+
- If the gate cannot pass without breaking a Hard Rule, an instruction
|
|
124
130
|
conflicts with current library docs, or the change would exceed the
|
|
125
|
-
task's scope:
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
task's scope: stop. In a chat with the developer, ask them; working
|
|
132
|
+
alone, write `docs/BLOCKERS.md` (what, why, what you tried). Do not
|
|
133
|
+
guess past it, and do not widen the task to get around it.
|
|
128
134
|
|
|
129
135
|
## Correct Patterns
|
|
130
136
|
```tsx
|
|
@@ -153,12 +159,6 @@ before guessing props — component APIs move between releases and training
|
|
|
153
159
|
data lags them. The package's own props are in its type declarations
|
|
154
160
|
(`node_modules/@tristan2828/ui-foundation/dist/**/*.d.ts`).
|
|
155
161
|
|
|
156
|
-
## Before You Finish
|
|
157
|
-
Run `npm run verify`. It must pass. Do not report a task complete on a
|
|
158
|
-
failing gate. The developer reviews results — the running app, a
|
|
159
|
-
screenshot, an options page — not every line, so the gates are the safety
|
|
160
|
-
net.
|
|
161
|
-
|
|
162
162
|
## Adding an Entity
|
|
163
163
|
Follow `docs/foundation/add-an-entity.md` (in Claude Code, `/new-entity
|
|
164
164
|
<Name>` is a shortcut to it). It builds from the entity's plan,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: spec-tester
|
|
3
3
|
description: Writes gateway translation tests from openapi.yaml and contracts.ts only. Used in Phase 2 and by the new-entity playbook — never invoked to test code it can read.
|
|
4
4
|
tools: Read, Write, Bash(vitest *)
|
|
5
|
+
model: sonnet
|
|
5
6
|
hooks:
|
|
6
7
|
PreToolUse:
|
|
7
8
|
- matcher: "Read"
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -123,6 +123,13 @@ export declare const POPUP_FOCUS_GUARDS = "[data-base-ui-focus-guard]";
|
|
|
123
123
|
* by design (`disableRules: ['region']`) and brings focus guards
|
|
124
124
|
* (`exclude: [POPUP_FOCUS_GUARDS]`), while every other rule, contrast
|
|
125
125
|
* included, still checks the list.
|
|
126
|
+
*
|
|
127
|
+
* It scans in axe's legacy mode: axe runs inside the page and opens no
|
|
128
|
+
* other. The default mode finishes each scan in a fresh blank page, and
|
|
129
|
+
* starting that page's renderer stalled scans past a test's 30 s when
|
|
130
|
+
* several browsers started together (a run's first wave, or the fresh
|
|
131
|
+
* workers after a failure). The cost: cross-origin frames aren't scanned;
|
|
132
|
+
* same-origin frames still are.
|
|
126
133
|
*/
|
|
127
134
|
export declare function expectNoAxeViolations(page: Page, options?: {
|
|
128
135
|
disableRules?: string[];
|
package/dist/testing/index.js
CHANGED
|
@@ -287,10 +287,17 @@ export const POPUP_FOCUS_GUARDS = '[data-base-ui-focus-guard]';
|
|
|
287
287
|
* by design (`disableRules: ['region']`) and brings focus guards
|
|
288
288
|
* (`exclude: [POPUP_FOCUS_GUARDS]`), while every other rule, contrast
|
|
289
289
|
* included, still checks the list.
|
|
290
|
+
*
|
|
291
|
+
* It scans in axe's legacy mode: axe runs inside the page and opens no
|
|
292
|
+
* other. The default mode finishes each scan in a fresh blank page, and
|
|
293
|
+
* starting that page's renderer stalled scans past a test's 30 s when
|
|
294
|
+
* several browsers started together (a run's first wave, or the fresh
|
|
295
|
+
* workers after a failure). The cost: cross-origin frames aren't scanned;
|
|
296
|
+
* same-origin frames still are.
|
|
290
297
|
*/
|
|
291
298
|
export async function expectNoAxeViolations(page, options = {}) {
|
|
292
299
|
await waitForTransitions(page);
|
|
293
|
-
const builder = new AxeBuilder({ page });
|
|
300
|
+
const builder = new AxeBuilder({ page }).setLegacyMode(true);
|
|
294
301
|
if (options.disableRules?.length)
|
|
295
302
|
builder.disableRules(options.disableRules);
|
|
296
303
|
for (const selector of options.exclude ?? [])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.129.
|
|
3
|
+
"version": "4.129.2",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|