@starci/eslint-grammar-core 0.20.1 → 0.21.0
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 +23 -2
- package/README.md +5 -4
- package/dist/app-shell.js +1 -1
- package/dist/grammar-boundary.js +5 -5
- package/dist/icon.d.ts +0 -4
- package/dist/icon.js +1 -64
- package/dist/index.js +4 -2
- package/dist/lib/app-shell-cluster.js +1 -1
- package/dist/lib/app-shell-owner.js +1 -1
- package/dist/lib/app-shell-scope.js +1 -1
- package/dist/lib/app-shell-visible.js +0 -1
- package/dist/lib/app-shell.js +2 -2
- package/dist/lib/grammar-imports.d.ts +16 -0
- package/dist/lib/grammar-imports.js +37 -0
- package/dist/lib/why.js +33 -8
- package/dist/page-header.d.ts +11 -4
- package/dist/page-header.js +12 -42
- package/dist/page.d.ts +3 -3
- package/dist/page.js +21 -21
- package/dist/pane.js +3 -3
- package/dist/status-colors.d.ts +10 -4
- package/dist/status-colors.js +103 -29
- package/dist/surface-card.d.ts +9 -0
- package/dist/surface-card.js +191 -0
- package/dist/surface-depth.d.ts +1 -1
- package/dist/surface-depth.js +53 -49
- package/dist/text-rules.d.ts +18 -0
- package/dist/text-rules.js +160 -0
- package/dist/tokens.d.ts +0 -2
- package/dist/tokens.js +0 -38
- package/docs/app-shell.md +3 -3
- package/docs/grammar-boundary.md +1 -1
- package/docs/page-header.md +15 -12
- package/docs/page.md +5 -5
- package/docs/status-colors.md +17 -8
- package/docs/surface-card.md +57 -0
- package/docs/surface-depth.md +16 -14
- package/package.json +3 -3
- package/runtime/bundle.json +2 -1
- package/runtime/knowledge/grammars/core/playbook.yaml +41 -51
- package/runtime/knowledge/hfs/canon-pins.yaml +7 -7
- package/runtime/knowledge/hfs/rules.yaml +374 -36
- package/runtime/knowledge/hfs/slots.yaml +5 -5
- package/runtime/knowledge/patterns/fe/ui.yaml +0 -1
- package/runtime/knowledge/ui/proof/anatomy-source.yaml +1 -1
- package/runtime/scripts/hfs/architecture/component-tiers.mjs +161 -0
- package/runtime/scripts/hfs/architecture/config.mjs +1 -1
- package/runtime/scripts/hfs/slot-manifest-shape.mjs +16 -1
- package/dist/typography.d.ts +0 -13
- package/dist/typography.js +0 -72
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# The one card has a kind
|
|
2
|
+
|
|
3
|
+
Law module: `surface-card.ts`. Catalogue: R355 FE_SURFACE_CARD_KIND, R366 FE_LABEL_IN_GRID.
|
|
4
|
+
|
|
5
|
+
`SurfaceCard` is one component whose `kind` the compiler checks: `body` (the default), `figures`, `list`, `accordion`,
|
|
6
|
+
`bands` and `tile`. What a kind draws is not drawn by hand around it, and where the name sits follows the kind (ruling
|
|
7
|
+
`card-label-by-kind`): a card that heads a section has a `label` outside the material, a tile names itself inside.
|
|
8
|
+
|
|
9
|
+
Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline. It applies to product
|
|
10
|
+
source; a script or a file no slot owns is not judged.
|
|
11
|
+
|
|
12
|
+
## `starci-grammar/surface-card-kind`
|
|
13
|
+
|
|
14
|
+
Finding code: `FE_SURFACE_CARD_KIND` (R355). The direct children of a `SurfaceCard` of the `body` kind (no `kind`, or
|
|
15
|
+
`kind="body"`) are not a raw `ul`, `ol`, `li` or `dl`, not a `Divider`, and not a `SectionHeader` or `Heading` standing as a
|
|
16
|
+
second title. A `Section` whose only child is one `SurfaceCard` frames one subject twice. Children are read through
|
|
17
|
+
`cond && <x/>`, `cond ? <x/> : <y/>` and `.map`.
|
|
18
|
+
|
|
19
|
+
**Invalid** (`src/components/blocks/Runs/component.tsx`)
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<SurfaceCard label="Runs">
|
|
23
|
+
<ul>{runs.map((run) => <li key={run.id}>{run.name}</li>)}</ul>
|
|
24
|
+
<Divider />
|
|
25
|
+
<SectionHeader title="Totals" />
|
|
26
|
+
</SurfaceCard>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Valid** (`src/components/blocks/Runs/component.tsx`)
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<SurfaceCard kind="list" label="Runs" items={runs.map((run) => ({ id: run.id, title: run.name }))} empty={empty} />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## `starci-grammar/no-label-in-grid`
|
|
36
|
+
|
|
37
|
+
Finding code: `FE_LABEL_IN_GRID` (R366). A `SurfaceCard` with a `label` repeated in a `Grid kind="cards"` (two or more as
|
|
38
|
+
direct children, or one written in a `.map`) is refused. A peer you recognise and open is a tile, named inside beside its
|
|
39
|
+
mark; comparing a fact across peers is one `kind="list"` card.
|
|
40
|
+
|
|
41
|
+
**Invalid** (`src/components/blocks/Connectors/component.tsx`)
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<Grid kind="cards">
|
|
45
|
+
{connectors.map((c) => <SurfaceCard key={c.id} label={c.name}>{c.summary}</SurfaceCard>)}
|
|
46
|
+
</Grid>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Valid** (`src/components/blocks/Connectors/component.tsx`)
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<Grid kind="cards">
|
|
53
|
+
{connectors.map((c) => <SurfaceCard key={c.id} kind="tile" name={c.name} mark={{ icon: c.icon }} description={c.summary} />)}
|
|
54
|
+
</Grid>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
|
package/docs/surface-depth.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# A
|
|
1
|
+
# A surface never stands inside another surface
|
|
2
2
|
|
|
3
3
|
Law module: `surface-depth.ts`. Catalogue: R340 FE_RAISED_SURFACE_IN_SURFACE.
|
|
4
4
|
|
|
5
|
-
Grammar
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
The Grammar draws one depth, raised, and no nested edge: a `SurfaceCard` inside another `SurfaceCard`, inside a
|
|
6
|
+
`Pane surface`, or inside a `Dialog`, `Drawer`, `AlertDialog` or `Popover` is refused (owner decision: surface in surface
|
|
7
|
+
is banned totally, dialogs and drawers included). Development throws the same refusal from the Grammar itself; this rule is
|
|
8
|
+
its same-file half and R356 closes it across files.
|
|
9
9
|
|
|
10
10
|
Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline. It applies to product
|
|
11
11
|
source (the route, feature, component, hook, foundation, module and transport tiers and the workspace packages); a script or
|
|
@@ -13,26 +13,28 @@ a file no slot owns is not judged.
|
|
|
13
13
|
|
|
14
14
|
## `starci-grammar/no-raised-surface-in-surface`
|
|
15
15
|
|
|
16
|
-
A `
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`
|
|
16
|
+
A `SurfaceCard` (or `<ns>.SurfaceCard`) imported from `@starci/grammar` that a `SurfaceCard`, `Dialog`, `Drawer`,
|
|
17
|
+
`AlertDialog`, `Popover`, or a `Pane` with a `surface` prop of the same file encloses is a finding. An overlay's `trigger` is
|
|
18
|
+
not its content, so a card written in a trigger is not enclosed by it. A surface no element of the file encloses is judged
|
|
19
|
+
where its parent is written. The fix gives the content to the host's own body, or uses a kind of the outer card (`bands`,
|
|
20
|
+
`list`, `figures`) for what needs its own faces.
|
|
21
21
|
|
|
22
22
|
**Invalid** (`src/components/blocks/Runs/component.tsx`)
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
25
25
|
<SurfaceCard label="Run">
|
|
26
|
-
<
|
|
26
|
+
<SurfaceCard label="Steps">...</SurfaceCard>
|
|
27
27
|
</SurfaceCard>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**Valid** (`src/components/blocks/Runs/component.tsx`)
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
<SurfaceCard
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<SurfaceCard
|
|
34
|
+
kind="bands"
|
|
35
|
+
label="Run"
|
|
36
|
+
bands={[{ kind: "body", children: summary }, { kind: "list", items: steps, empty }]}
|
|
37
|
+
/>
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
**Finding code:** `FE_RAISED_SURFACE_IN_SURFACE`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-grammar-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "ESLint rules for the core Grammar's component, token and composition contracts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=22"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@starci/eslint-canon-fe": "9.
|
|
44
|
+
"@starci/eslint-canon-fe": "9.9.0",
|
|
45
45
|
"eslint": ">=9",
|
|
46
46
|
"typescript": ">=5.9"
|
|
47
47
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"build": "node -e \"require('node:fs').rmSync('dist', {recursive: true, force: true})\" && tsc -p tsconfig.build.json && node -e \"const fs = require('node:fs'); for (const f of fs.readdirSync('dist', {recursive: true}).filter((n) => n.endsWith('.d.ts'))) fs.writeFileSync('dist/' + f, fs.readFileSync('dist/' + f, 'utf8').replace(/((?:from |import\\()['\\x22]\\.\\.?\\/[^'\\x22]+)\\.ts(['\\x22])/g, (all, head, quote) => head + '.js' + quote))\"",
|
|
56
56
|
"typecheck": "tsc -p tsconfig.json",
|
|
57
57
|
"prepack": "npm run build",
|
|
58
|
-
"test": "npm run typecheck && node --import ./fixtures/fs-audit-preload.ts --test \"src/**/*.spec.ts\""
|
|
58
|
+
"test": "npm run typecheck && node --import ./fixtures/canon-fe-source.ts --import ./fixtures/fs-audit-preload.ts --test \"src/**/*.spec.ts\""
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@starci/eslint-canon-fe": "file:../eslint-canon-fe",
|
package/runtime/bundle.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"knowledge/grammars/core/playbook.yaml",
|
|
15
15
|
"knowledge/grammars/index.yaml",
|
|
16
16
|
"knowledge/hfs/canon-pins.yaml",
|
|
17
|
+
"knowledge/hfs/rules.yaml",
|
|
17
18
|
"knowledge/ui/presentation/font.yaml",
|
|
18
19
|
"knowledge/ui/presentation/padding.yaml",
|
|
19
20
|
"modules/kernel/removed-vocabulary.yaml",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"modules/models/runtimes.yaml",
|
|
22
23
|
"modules/models/tiers.yaml",
|
|
23
24
|
"scripts/hfs/allows.mjs",
|
|
25
|
+
"scripts/hfs/architecture/component-tiers.mjs",
|
|
24
26
|
"scripts/hfs/architecture/config.mjs",
|
|
25
27
|
"scripts/hfs/architecture/side-boundary.mjs",
|
|
26
28
|
"scripts/hfs/architecture/type-context.mjs",
|
|
@@ -62,7 +64,6 @@
|
|
|
62
64
|
"own": [
|
|
63
65
|
"engine/config.mjs",
|
|
64
66
|
"engine/invalid-config.mjs",
|
|
65
|
-
"knowledge/hfs/rules.yaml",
|
|
66
67
|
"knowledge/hfs/slots.yaml",
|
|
67
68
|
"knowledge/patterns/fe/index.yaml",
|
|
68
69
|
"knowledge/patterns/fe/ui.yaml",
|
|
@@ -171,10 +171,6 @@ shapes:
|
|
|
171
171
|
Both opener paths default visibility to wide; an explicit visibility also resolves to wide.
|
|
172
172
|
Under viewport="fixed",
|
|
173
173
|
navigationTrack defaults to intrinsic so a collapsed sidebar leaves no empty track.
|
|
174
|
-
- renderer: NavigationFeatureNav
|
|
175
|
-
role: |
|
|
176
|
-
The navbar may use this renderer or the WorkspaceShell header with TopBar. Its family CSS
|
|
177
|
-
supplies sticky top placement, a 4rem band, a solid surface and a full-width bottom separator.
|
|
178
174
|
- renderer: Sidebar
|
|
179
175
|
role: |
|
|
180
176
|
Desktop navigation uses the expanded or collapsed rail; the left mobile Drawer composes
|
|
@@ -201,10 +197,10 @@ shapes:
|
|
|
201
197
|
- id: workspace-identity
|
|
202
198
|
implements: [FE-APP-SHELL-2]
|
|
203
199
|
compose: |
|
|
204
|
-
IdentityLockup
|
|
200
|
+
IdentityLockup is itself the pressable (size="control"). Its square logo mark has a
|
|
205
201
|
transparent background, no radius and object-fit contain; without an image it uses Avatar's
|
|
206
202
|
bundled DiceBear initials. The title
|
|
207
|
-
has a muted role subtitle and no caret.
|
|
203
|
+
has a muted role subtitle and no caret. The lockup has no button shape or hover effect;
|
|
208
204
|
press uses scale(0.96), focus remains visible and reduced motion removes the zoom.
|
|
209
205
|
- id: navbar-right-cluster
|
|
210
206
|
implements: [FE-APP-SHELL-3]
|
|
@@ -343,7 +339,7 @@ guidance:
|
|
|
343
339
|
LAYOUT-1 case-10 (owner:joined-multi-pane): the selected family realizes one touching pane
|
|
344
340
|
surface with vertical Dividers. SURFACE-1 case-4 (owner:scroll-region-background-tone):
|
|
345
341
|
VerticalScrollRegion tone="background" under messages and log entries, with the header and
|
|
346
|
-
composer on the surface. ACTION-3 case-5 (owner:hover-actions-floating-toolbar):
|
|
342
|
+
composer on the surface. ACTION-3 case-5 (owner:hover-actions-floating-toolbar): MessageBubble's
|
|
347
343
|
public floating toolbar owns the IconButtons and tooltips beside the text; apps do not target
|
|
348
344
|
starci-core internals. CTA-6 case-4 (owner:button-variant-follows-intent): ordinary repeated
|
|
349
345
|
item commands are neutral and render ghost.
|
|
@@ -351,23 +347,22 @@ guidance:
|
|
|
351
347
|
ownership: FE-RULE-OWNERSHIP
|
|
352
348
|
implements: [ANATOMY-2, PADDING-0]
|
|
353
349
|
requirement: |
|
|
354
|
-
SurfaceCard (always painted
|
|
355
|
-
AlertDialog, Drawer and Popover establish the surface nesting context; Rail and
|
|
356
|
-
|
|
350
|
+
SurfaceCard (always painted, of any kind, the accordion kind when painted), Sidebar, Dialog,
|
|
351
|
+
AlertDialog, Drawer and Popover establish the surface nesting context; Rail and
|
|
352
|
+
an unpainted accordion SurfaceCard pass their parent's context through. Input, SearchField, Textarea,
|
|
357
353
|
NumberField, DateField, TimeField, Select, ComboBox, DatePicker, DateRangePicker, Checkbox,
|
|
358
354
|
CheckboxGroup, RadioGroup, OtpInput and PressableField resolve variant="secondary" inside it and
|
|
359
355
|
variant="primary" outside. Compose the surface and omit the field variant.
|
|
360
356
|
Switch and Slider have no layer variant; a Radio follows its RadioGroup. PaneGrid's
|
|
361
|
-
collapsed-pane drawer also establishes the context. SurfaceCard and bounded
|
|
357
|
+
collapsed-pane drawer also establishes the context. SurfaceCard and a bounded accordion SurfaceCard derive
|
|
362
358
|
data-grammar-surface-depth from the parent context. The top layer is raised and a nested layer is
|
|
363
359
|
subordinate; never raise both. The family DNA owns their surface paint.
|
|
364
|
-
|
|
365
|
-
anywhere in app code and primary Tabs inside a painted surface; FE_GRAMMAR_LAYOUT_ONLY rejects
|
|
360
|
+
The field `variant` is not in the prop types, so an app cannot set it; FE_GRAMMAR_LAYOUT_ONLY rejects
|
|
366
361
|
application paint utilities, arbitrary paint properties and inline style paint.
|
|
367
362
|
DRAW_NESTED_VARIANT checks the corresponding rendered variant and
|
|
368
363
|
surface stamps.
|
|
369
364
|
ListBox resolves inset="panel" inside that context; callers may select the same value explicitly
|
|
370
|
-
elsewhere. Its rows and sections captions share the panel edge.
|
|
365
|
+
elsewhere. Its rows and sections captions share the panel edge. The list kind of SurfaceCard owns its list
|
|
371
366
|
shell with no added inset; SurfaceCard composition="joined" owns flush bands. A grouping wrapper
|
|
372
367
|
adds no padding. An extra px-*, ps-* or pe-* around ListBox or a section caption stacks the inset
|
|
373
368
|
and fails FE_LIST_PANEL_PADDING.
|
|
@@ -440,27 +435,27 @@ guidance:
|
|
|
440
435
|
uiRules: [STATE-2]
|
|
441
436
|
render: |
|
|
442
437
|
The ready tree, drawn from placeholder data of the slot's type, in the shape the unit's
|
|
443
|
-
`xDefaultState` names, with
|
|
438
|
+
`xDefaultState` names, with isLoading on every owner: same card, same bands, same row count
|
|
444
439
|
(idiom pending-same-tree). Never a spinner and never a different tree. The skeleton renders
|
|
445
440
|
inert geometry and states no value; an unknown number is a bar, never a rendered zero.
|
|
446
441
|
skeletonMap:
|
|
447
442
|
- part: Text line or Heading
|
|
448
|
-
render: "`
|
|
443
|
+
render: "`isLoading` on the owner: one bar at that type-scale step's line height, as long as the placeholder text"
|
|
449
444
|
- part: Media (Image, MediaFrame viewport)
|
|
450
445
|
render: "`Skeleton shape=\"rect\"` at the frame's `ratio` (square, landscape, wide); `shape=\"circle\"` for an avatar. A block at the ratio, never a collapsed box"
|
|
451
446
|
- part: Button
|
|
452
447
|
render: |
|
|
453
448
|
A bar at the Button's height with the Button's pill corner (family.yaml button-pill):
|
|
454
|
-
`
|
|
449
|
+
`isLoading` where the installed Button publishes it, otherwise `Skeleton shape="rect"` in
|
|
455
450
|
the Button's box. It never fires (idiom pending-same-tree action-must-not-fire)
|
|
456
451
|
- part: A region that exists only on ready data (a disclosure of the loaded lines)
|
|
457
|
-
render: Absent while
|
|
452
|
+
render: Absent while isLoading (STATE-3)
|
|
458
453
|
- status: unauthorized
|
|
459
454
|
uiRules: [STATE-3]
|
|
460
455
|
render: |
|
|
461
456
|
401 is its own status, never forbidden and never an error. The slot shows one sign-in prompt in
|
|
462
457
|
place: `EmptyNotice message={labels.unauthorized} actionLabel={labels.signIn}
|
|
463
|
-
|
|
458
|
+
onAction={signIn}`, where `signIn` opens the product's sign-in route and
|
|
464
459
|
returns to this address. The prompt discloses none of the slot's data. A secondary slot hides, as
|
|
465
460
|
forbidden does, so a page whose reads all need a session shows the prompt once, in its primary slot.
|
|
466
461
|
- status: forbidden
|
|
@@ -475,7 +470,7 @@ guidance:
|
|
|
475
470
|
render: |
|
|
476
471
|
Retry at the slot, re-running that slot's read only (the query's `mutate`), never a page
|
|
477
472
|
reload. Block form, where the slot is a region: `EmptyNotice message={labels.error}
|
|
478
|
-
actionLabel={labels.retry}
|
|
473
|
+
actionLabel={labels.retry} onAction={retry}` with `isActionPending`
|
|
479
474
|
bound while the retry runs. Inline form, where the slot is one line inside a row or band too
|
|
480
475
|
small for a notice: `Alert tone="negative"` in the slot's place, carrying the retry action. A
|
|
481
476
|
command that is unsafe to repeat is not retried (FEEDBACK-2 case-4); a rejected field value
|
|
@@ -486,7 +481,7 @@ guidance:
|
|
|
486
481
|
`EmptyNotice message={labels.empty}` with the slot's own empty sentence; `actionLabel` and
|
|
487
482
|
`onAction` only when a real next step exists, otherwise both are omitted.
|
|
488
483
|
- status: ready
|
|
489
|
-
render: The slot's items through the same tree,
|
|
484
|
+
render: The slot's items through the same tree, isLoading false.
|
|
490
485
|
notFound: |
|
|
491
486
|
A route whose resource does not exist calls `notFound()` in its route adapter (FE-FUNCTION-7
|
|
492
487
|
case-2). 404 is never a page state, a shape or a slot status.
|
|
@@ -615,9 +610,6 @@ presentation:
|
|
|
615
610
|
- component: HorizontalScrollRegion
|
|
616
611
|
element: root
|
|
617
612
|
rule: PADDING-1
|
|
618
|
-
- component: NavigationFeatureNav
|
|
619
|
-
element: primary
|
|
620
|
-
rule: PADDING-3
|
|
621
613
|
- component: OtpInput
|
|
622
614
|
element: root
|
|
623
615
|
rule: PADDING-1
|
|
@@ -669,22 +661,22 @@ presentation:
|
|
|
669
661
|
- component: Subnav
|
|
670
662
|
element: root
|
|
671
663
|
rule: PADDING-3
|
|
672
|
-
- component:
|
|
664
|
+
- component: SurfaceCard (accordion kind)
|
|
673
665
|
element: accordion panel
|
|
674
666
|
rule: PADDING-0
|
|
675
|
-
- component:
|
|
667
|
+
- component: SurfaceCard (accordion kind)
|
|
676
668
|
element: accordion trigger
|
|
677
669
|
rule: PADDING-4
|
|
678
|
-
- component:
|
|
670
|
+
- component: SurfaceCard (accordion kind)
|
|
679
671
|
element: body padding-top
|
|
680
672
|
rule: PADDING-0
|
|
681
|
-
- component:
|
|
673
|
+
- component: SurfaceCard (accordion kind)
|
|
682
674
|
element: body padding-bottom
|
|
683
675
|
rule: PADDING-3
|
|
684
|
-
- component:
|
|
676
|
+
- component: SurfaceCard (accordion kind)
|
|
685
677
|
element: body padding-right
|
|
686
678
|
rule: PADDING-4
|
|
687
|
-
- component:
|
|
679
|
+
- component: SurfaceCard (accordion kind)
|
|
688
680
|
element: body padding-left
|
|
689
681
|
rule: PADDING-5
|
|
690
682
|
- component: SurfaceCard
|
|
@@ -693,7 +685,7 @@ presentation:
|
|
|
693
685
|
- component: SurfaceCard
|
|
694
686
|
element: content, composition="joined"
|
|
695
687
|
rule: PADDING-0
|
|
696
|
-
- component:
|
|
688
|
+
- component: SurfaceCard (list kind)
|
|
697
689
|
element: root
|
|
698
690
|
rule: PADDING-0
|
|
699
691
|
- component: Tabs
|
|
@@ -776,7 +768,7 @@ presentation:
|
|
|
776
768
|
render: '`composition="joined"` already sets `0`'
|
|
777
769
|
- id: case-3
|
|
778
770
|
when: A Grammar list sits inside a panel or its rows own their own inset
|
|
779
|
-
owner: "`
|
|
771
|
+
owner: "`SurfaceCard` list kind / `ListBox`"
|
|
780
772
|
render: ListBox resolves inset="panel" in a surface nesting context, or callers select it explicitly. Its
|
|
781
773
|
row boxes align with the panel content edge, like the search field and tabs boxes, without
|
|
782
774
|
negative-margin bleed (owner:panel-list-box-edge). The list retains HeroUI p-1; items retain
|
|
@@ -842,7 +834,7 @@ presentation:
|
|
|
842
834
|
render: Compose the card; no padding
|
|
843
835
|
- id: case-3
|
|
844
836
|
when: A disclosure trigger and its expanded panel
|
|
845
|
-
owner: "`
|
|
837
|
+
owner: "`SurfaceCard` accordion kind"
|
|
846
838
|
render: Compose the card; no padding
|
|
847
839
|
- id: case-4
|
|
848
840
|
when: An empty-state notice
|
|
@@ -995,9 +987,6 @@ presentation:
|
|
|
995
987
|
- component: Text
|
|
996
988
|
element: root, size="md"
|
|
997
989
|
rule: FONT-3
|
|
998
|
-
- component: Text
|
|
999
|
-
element: root, size="metric-lead"
|
|
1000
|
-
rule: FONT-5
|
|
1001
990
|
- component: Text
|
|
1002
991
|
element: root, size="sm"
|
|
1003
992
|
rule: FONT-2
|
|
@@ -1016,10 +1005,10 @@ presentation:
|
|
|
1016
1005
|
- component: Tooltip
|
|
1017
1006
|
element: content
|
|
1018
1007
|
rule: FONT-1
|
|
1019
|
-
- component:
|
|
1008
|
+
- component: SurfaceCard (list kind)
|
|
1020
1009
|
element: fact, label is visible and fact is present, depth="nested"
|
|
1021
1010
|
rule: FONT-1
|
|
1022
|
-
- component:
|
|
1011
|
+
- component: SurfaceCard (list kind)
|
|
1023
1012
|
element: fact, label is visible and fact is present, depth!="nested"
|
|
1024
1013
|
rule: FONT-2
|
|
1025
1014
|
guidance:
|
|
@@ -1029,11 +1018,14 @@ presentation:
|
|
|
1029
1018
|
Weight is a second axis, not a position on the size scale. Its public set is closed.
|
|
1030
1019
|
| Prop | Rendered | Use for |
|
|
1031
1020
|
| --- | --- | --- |
|
|
1032
|
-
|
|
|
1033
|
-
|
|
|
1034
|
-
| `
|
|
1021
|
+
| Where | Rendered | Use for |
|
|
1022
|
+
| --- | --- | --- |
|
|
1023
|
+
| `Text`, no prop | `font-normal`, the default | Reading copy and ordinary facts |
|
|
1024
|
+
| `Heading` levels 3 and 4, and labels | `font-medium` | A compact label, or a title above its own description |
|
|
1025
|
+
| `Text isStrong` | `font-semibold` | A value or a term that must be found first inside its line |
|
|
1035
1026
|
Weight refines a rank the application has already chosen. It never manufactures a new hierarchy
|
|
1036
|
-
level, and it never substitutes for a heading
|
|
1027
|
+
level, and it never substitutes for a heading: a group is headed by its `Section` title or its
|
|
1028
|
+
card label, never by a strong `Text`. `Heading` applies its own weight per level and takes
|
|
1037
1029
|
no weight prop.
|
|
1038
1030
|
Bold beyond `semibold` has no public prop. Treat an intent that needs it as a gap rather than writing
|
|
1039
1031
|
a class.
|
|
@@ -1089,8 +1081,8 @@ presentation:
|
|
|
1089
1081
|
cases:
|
|
1090
1082
|
- id: case-1
|
|
1091
1083
|
when: The single leading metric or short value that is the main fact of its region
|
|
1092
|
-
owner: "`
|
|
1093
|
-
render: '`<
|
|
1084
|
+
owner: "`DescriptionList` layout=\"stat-strip\""
|
|
1085
|
+
render: '`<DescriptionList layout="stat-strip" items={[{ id: "rate", term: "Resolved", description: "84%" }]} />`'
|
|
1094
1086
|
notThisRule: sentences, decoration, or imitating a heading. It creates no heading semantics.
|
|
1095
1087
|
- rule: FONT-6
|
|
1096
1088
|
title: "`text-4xl` / `leading-tight`"
|
|
@@ -1105,7 +1097,7 @@ anatomyObservations:
|
|
|
1105
1097
|
lane: ui
|
|
1106
1098
|
kind: proven-template
|
|
1107
1099
|
summary: |-
|
|
1108
|
-
Verified in the draw lab against the real
|
|
1100
|
+
Verified in the draw lab against the real list SurfaceCard render — the prompt shape that
|
|
1109
1101
|
produced a direction both faithful and beautiful:
|
|
1110
1102
|
1. Frame: flat product UI screenshot, size, light theme.
|
|
1111
1103
|
2. SUBJECT: screen name + product name.
|
|
@@ -1122,11 +1114,9 @@ anatomyObservations:
|
|
|
1122
1114
|
lane: ui
|
|
1123
1115
|
kind: anatomy-detail
|
|
1124
1116
|
summary: |-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
renders its label and fact as siblings on the page background ABOVE the list shell —
|
|
1129
|
-
the card bounds only the rows, the footer sits below it.
|
|
1117
|
+
Every `SurfaceCard` kind except `tile` places its label outside: an unpainted row above the material
|
|
1118
|
+
with the fact and the end action, and the card bounds only the content, the footer note below it.
|
|
1119
|
+
A prompt that draws the label inside the card invents a placement the grammar does not have.
|
|
1130
1120
|
- id: list-separator-bleed
|
|
1131
1121
|
lane: ui
|
|
1132
1122
|
kind: anatomy-detail
|
|
@@ -1140,7 +1130,7 @@ anatomyObservations:
|
|
|
1140
1130
|
lane: ui
|
|
1141
1131
|
kind: anatomy-detail
|
|
1142
1132
|
summary: |-
|
|
1143
|
-
An interactive row in a
|
|
1133
|
+
An interactive row in a list SurfaceCard is the grammar `ListRow` (@starci/grammar 0.9.1), never an
|
|
1144
1134
|
app-owned `<li>` and never a second `<ul>` nested in the card (the card already renders the list,
|
|
1145
1135
|
so a nested list loses the row inset and the separator - a defect that leaves rows flush against
|
|
1146
1136
|
the card edge). Its slots, in reading order: `leading`
|
|
@@ -31,42 +31,42 @@ pins:
|
|
|
31
31
|
source: packages/event-stream/package.json
|
|
32
32
|
why: 'the one server-sent-events client of every front end (fe-stack event-stream, owner:event-stream-package): the transport client layer (modules/api/sse/clients) creates one instance for the app with the bearer token source and the stream operations follow on it; it carries Last-Event-ID resume, the capped doubling backoff, the heartbeat timeout, the single 401 renewal and the useSWRSubscription adapter, so no app keeps a hand-written reader.'
|
|
33
33
|
'@starci/grammar':
|
|
34
|
-
version: 0.
|
|
34
|
+
version: 0.21.0
|
|
35
35
|
group: starci
|
|
36
36
|
install: registry
|
|
37
37
|
side: fe
|
|
38
38
|
source: packages/grammar/package.json
|
|
39
39
|
why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
|
|
40
40
|
'@starci/eslint-canon-be':
|
|
41
|
-
version: 3.11.
|
|
41
|
+
version: 3.11.7
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: be
|
|
45
45
|
source: packages/eslint-canon-be/package.json
|
|
46
46
|
why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
|
|
47
47
|
'@starci/eslint-canon-fe':
|
|
48
|
-
version: 9.
|
|
48
|
+
version: 9.9.0
|
|
49
49
|
group: starci
|
|
50
50
|
install: registry
|
|
51
51
|
side: fe
|
|
52
52
|
source: packages/eslint-canon-fe/package.json
|
|
53
53
|
why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
|
|
54
54
|
'@starci/eslint-grammar-core':
|
|
55
|
-
version: 0.
|
|
55
|
+
version: 0.21.0
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: fe
|
|
59
59
|
source: packages/eslint-grammar-core/package.json
|
|
60
60
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
61
61
|
'@starci/eslint-grammar-offset-pop':
|
|
62
|
-
version: 0.
|
|
62
|
+
version: 0.21.0
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
66
66
|
source: packages/eslint-grammar-offset-pop/package.json
|
|
67
67
|
why: 'the Offset Pop Grammar component API lint, versioned with @starci/grammar; its shared component contract comes from the StarCi family lint without copying rules.'
|
|
68
68
|
'@starci/stylelint-canon':
|
|
69
|
-
version: 2.
|
|
69
|
+
version: 2.5.0
|
|
70
70
|
group: starci
|
|
71
71
|
install: registry
|
|
72
72
|
side: fe
|
|
@@ -106,7 +106,7 @@ pins:
|
|
|
106
106
|
source: packages/ai-router/package.json
|
|
107
107
|
why: 'the AI pool router of a back end: a NestJS module that routes OpenAI-compatible chat, stream and embeddings calls across keys, models and providers, with @starci/ai-router/testing for its specs; @starci/jest-preset compiles it as an ESM-only dependency.'
|
|
108
108
|
'@starci/hfs':
|
|
109
|
-
version: 4.
|
|
109
|
+
version: 4.17.0
|
|
110
110
|
group: starci
|
|
111
111
|
install: registry
|
|
112
112
|
side: both
|