@tristan2828/ui-foundation 4.66.0 → 4.67.1
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/docs/add-an-entity.md +30 -18
- package/package.json +1 -1
- package/styles/index.css +8 -4
|
@@ -3,24 +3,25 @@
|
|
|
3
3
|
<!-- index: written by `npm run docs:index` in the package from the headings below; never edit it by hand -->
|
|
4
4
|
## Index
|
|
5
5
|
|
|
6
|
-
- [The reference files](#the-reference-files) · lines
|
|
7
|
-
- [Before anything: the entity plan](#before-anything-the-entity-plan) · lines
|
|
8
|
-
- Step 1: Add `<Entity>` to `openapi.yaml` · lines
|
|
9
|
-
- Step 2: `npm run gen:api` · lines
|
|
10
|
-
- Step 3: Add gateway tests in `tests/gateway/<entity>.test.ts`, derived from the spec · lines
|
|
11
|
-
- Step 4: Add MSW handlers in `src/mocks/<entity>.ts` · lines
|
|
12
|
-
- Step 5: Add a gateway module in `src/api/gateway/<entity>.ts` · lines
|
|
13
|
-
- Step 6: Copy the reference files, one for one, not just the two screens · lines
|
|
14
|
-
- Step 7: Register routes · lines
|
|
15
|
-
- Step 8: Add Playwright specs for all three screens · lines
|
|
16
|
-
- Step 9: Register the nav entry and route names · lines
|
|
17
|
-
- Step 10: `npm run verify`. · lines
|
|
18
|
-
- [How a list opens a record](#how-a-list-opens-a-record) · lines
|
|
19
|
-
- [The record view](#the-record-view) · lines
|
|
20
|
-
- [What not to copy](#what-not-to-copy) · lines
|
|
21
|
-
- [After a commit, in the backend](#after-a-commit-in-the-backend) · lines
|
|
22
|
-
- [Deleting](#deleting) · lines
|
|
23
|
-
- [Fields only a script writes](#fields-only-a-script-writes) · lines
|
|
6
|
+
- [The reference files](#the-reference-files) · lines 40–62
|
|
7
|
+
- [Before anything: the entity plan](#before-anything-the-entity-plan) · lines 64–749
|
|
8
|
+
- Step 1: Add `<Entity>` to `openapi.yaml` · lines 106–113
|
|
9
|
+
- Step 2: `npm run gen:api` · lines 114–115
|
|
10
|
+
- Step 3: Add gateway tests in `tests/gateway/<entity>.test.ts`, derived from the spec · lines 116–127
|
|
11
|
+
- Step 4: Add MSW handlers in `src/mocks/<entity>.ts` · lines 128–137
|
|
12
|
+
- Step 5: Add a gateway module in `src/api/gateway/<entity>.ts` · lines 138–142
|
|
13
|
+
- Step 6: Copy the reference files, one for one, not just the two screens · lines 143–638
|
|
14
|
+
- Step 7: Register routes · lines 639–652
|
|
15
|
+
- Step 8: Add Playwright specs for all three screens · lines 653–731
|
|
16
|
+
- Step 9: Register the nav entry and route names · lines 732–746
|
|
17
|
+
- Step 10: `npm run verify`. · lines 747–749
|
|
18
|
+
- [How a list opens a record](#how-a-list-opens-a-record) · lines 751–854
|
|
19
|
+
- [The record view](#the-record-view) · lines 829–854
|
|
20
|
+
- [What not to copy](#what-not-to-copy) · lines 856–882
|
|
21
|
+
- [After a commit, in the backend](#after-a-commit-in-the-backend) · lines 884–901
|
|
22
|
+
- [Deleting](#deleting) · lines 903–932
|
|
23
|
+
- [Fields only a script writes](#fields-only-a-script-writes) · lines 934–955
|
|
24
|
+
- [Searching one part of the app](#searching-one-part-of-the-app) · lines 957–966
|
|
24
25
|
|
|
25
26
|
<!-- /index -->
|
|
26
27
|
|
|
@@ -952,3 +953,14 @@ the next run would create the record a second time.
|
|
|
952
953
|
- Don't use it for a field the server works out itself (`computed`) or
|
|
953
954
|
one that's never on the request: those aren't in the create or update
|
|
954
955
|
schema to begin with.
|
|
956
|
+
|
|
957
|
+
## Searching one part of the app
|
|
958
|
+
|
|
959
|
+
An app built of parts (modules, areas) gives each entity's `McpEntity` a
|
|
960
|
+
`group`, the part's name in lowercase words joined by -
|
|
961
|
+
(`group="health"`). `search` then takes an optional `group` and looks only
|
|
962
|
+
in that group's entities, so a chat that searches "band" for a health
|
|
963
|
+
question isn't handed purchases and comics too. The tool's description
|
|
964
|
+
lists each group's entities, and `group` is offered only when some entity
|
|
965
|
+
has one; an unknown group is a refusal naming the ones there are. An
|
|
966
|
+
entity with no group is searched only when no group is given.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.67.1",
|
|
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": {
|
package/styles/index.css
CHANGED
|
@@ -228,7 +228,8 @@
|
|
|
228
228
|
- compact, the default: a full grid of hairlines, tight cells, the
|
|
229
229
|
header row on the heading band;
|
|
230
230
|
- boxed: a rounded box, roomier cells, the header row on the muted
|
|
231
|
-
fill
|
|
231
|
+
fill.
|
|
232
|
+
Both stripe their body rows (zebra, as DataTable's).
|
|
232
233
|
Row headers (a header column: src/lib/markdown-table.ts) sit on the
|
|
233
234
|
muted fill, semibold. A coloured cell (its whole text one highlight)
|
|
234
235
|
is painted in that wash, its words' own wash dropped. Unlayered, so a
|
|
@@ -294,9 +295,12 @@
|
|
|
294
295
|
background: var(--muted);
|
|
295
296
|
font-weight: var(--type-label-weight);
|
|
296
297
|
}
|
|
297
|
-
/* Zebra: <Markdown>'s body rows (after its <thead>), or
|
|
298
|
-
whose header row is its only <tbody>'s first.
|
|
299
|
-
|
|
298
|
+
/* Zebra, in both looks: <Markdown>'s body rows (after its <thead>), or
|
|
299
|
+
the editor's, whose header row is its only <tbody>'s first. Until
|
|
300
|
+
4.67.1 only boxed striped, so a compact table (the default) had its
|
|
301
|
+
header row tinted and nothing else. A cell picked by dragging keeps its
|
|
302
|
+
highlight (below) on a striped row. */
|
|
303
|
+
.prose-table :is(thead + tbody > tr:nth-child(even), tbody:only-child > tr:nth-child(odd):not(:first-child)) > :not([data-color], th[scope="row"], [data-row-header], .selectedCell) {
|
|
300
304
|
background: var(--table-stripe);
|
|
301
305
|
}
|
|
302
306
|
.prose-table :is(td, th)[data-color="amber"] { background: var(--highlight-amber); }
|