An open source design system that's fully customizable and agent ready
TypeScript
spec: record component icon slots in CodeBlock, Timestamp, and Table (#10045)
Xinzi Zhou3b8d81fd042a
diff --git a/docs/architecture/icon-resolution-and-component-slots.md b/docs/architecture/icon-resolution-and-component-slots.mdindex a90b1c4f9f..24eda0bb2e 100644--- a/docs/architecture/icon-resolution-and-component-slots.md+++ b/docs/architecture/icon-resolution-and-component-slots.md@@ -79,7 +79,9 @@ extension keys. Some component-owned artwork uses those extension keys directly.This record does not invalidate or require migration of that shipped behavior.The target model adds one rule for future component roles: new semantic component-slots use `componentIcons`. No Core slot has shipped. Selector's selected-option+slots use `componentIcons`. Each Core slot is recorded in its owning component's+contract or in the system spec that adds it (`spec:AST-032` FR2 for+`chat-send-button-send`). Selector's selected-optionmark is drawn by the `check` indicator, so it is not a component icon slot. Shipped extension keys remain supported until aseparate compatibility decision changes them. This record does not decide theoutcome for any existing component.diff --git a/docs/specs/components/CodeBlock/CodeBlock.spec.md b/docs/specs/components/CodeBlock/CodeBlock.spec.mdindex 2b30c83bd1..dbd0044a08 100644--- a/docs/specs/components/CodeBlock/CodeBlock.spec.md+++ b/docs/specs/components/CodeBlock/CodeBlock.spec.md@@ -31,6 +31,7 @@ architecture:architecture:component-theming-surface,architecture:component-test-sufficiency,architecture:theme-tokens,+ architecture:icon-resolution-and-component-slots,]contributing: []system_specs: [spec:AST-025]@@ -40,15 +41,15 @@ system_specs: [spec:AST-025]## Contract at a glance-| Area | Contract |-| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Public contract | `CodeBlock` and `CodeBlockProps` are exported from `@astryxdesign/core/CodeBlock`; `code` is required, and the remaining released props configure language, header, line presentation, copy, wrapping, sizing, syntax theme, and collapse behavior; `isDiff` (FR9) adds the diff layer as a caller choice over any language; `endContent` (FR10) places caller controls beside Copy; `language` takes a built-in identifier or a language value, each less common language is its own module at `@astryxdesign/core/CodeBlock/languages/<path>`, and `createCodeLanguage` makes a custom one from a tokenize function (FR13); `tokenizer` is deprecated. |-| Behavior | CodeBlock renders a read-only code surface, applies syntax highlighting when available, preserves the source string for copy, and exposes optional line, header, copy, caller-control, theme, and disclosure behavior without editing the content; no control covers the code, and a one-line block with no header (no title, language label hidden) reads as one row (FR11). |-| End-user impact | Readers can inspect and copy code, understand optional line emphasis, and operate long or collapsible examples with keyboard and assistive technology. Readers of a block with no header never have code under a control, at the cost of the controls' column width, and a one-line command whose label is hidden reads as one row with its controls beside it; product actions sit beside Copy instead of outside the block. Readers of C, C++, SQL, Rust, Kotlin, Swift, and Go snippets see them highlighted instead of plain (FR12), and so do readers of GraphQL, Java, Thrift, Objective-C, TOML, PowerShell, Ruby, Lua, and Dockerfile snippets wherever the product passes that language's module (FR13). |-| Builder impact | Builders choose the released display axes without an additional migration or opt-in; the diff layer is one more opt-in axis, `endContent` (FR10) is one optional slot for their own controls, a less common language is one import passed as `language` (FR13), and five defaulted syntax-theme slots mean no syntax theme has to change for it. |-| Compatibility/readiness | The released `CodeBlock` API remains stable except that `tokenizer` is deprecated in favour of a custom language value (FR13), and its defaults hold except for the visible headerless layout (FR11) and the newly built-in languages (FR12) in Compatibility below; FR10 (`endContent`, additive) and FR11 are current and await implementation; FR12 (built-in languages), FR13 (language values, additive apart from the `tokenizer` deprecation), and PR4 (their budget) are current and await implementation; FR9 (the diff layer) is current and shipped; Markdown's default path for `diff` fences follows it (`component:Markdown` FR29). |-| Review checks | Reject lost code text, copy of a transformed string, an unnamed copy or disclosure control, stale disclosure state/wiring, dropped root props/ref, a theme target off its painter, viewport focusability that ignores effective overflow, a control painted over the code, or caller controls that toggle the disclosure. |-| Governing rules | `architecture:public-component-api/INV1,INV5–INV9`; `architecture:component-theming-surface/INV3–INV7,INV12`; `architecture:component-test-sufficiency/INV1–INV7,INV10–INV11`; `spec:AST-025/FR12–FR13`; `architecture:theme-tokens` (syntax vocabulary and the diff slot defaults). |+| Area | Contract |+| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | `CodeBlock` and `CodeBlockProps` are exported from `@astryxdesign/core/CodeBlock`; `code` is required, and the remaining released props configure language, header, line presentation, copy, wrapping, sizing, syntax theme, and collapse behavior; `isDiff` (FR9) adds the diff layer as a caller choice over any language; `endContent` (FR10) places caller controls beside Copy; `language` takes a built-in identifier or a language value, each less common language is its own module at `@astryxdesign/core/CodeBlock/languages/<path>`, and `createCodeLanguage` makes a custom one from a tokenize function (FR13); `tokenizer` is deprecated. |+| Behavior | CodeBlock renders a read-only code surface, applies syntax highlighting when available, preserves the source string for copy, and exposes optional line, header, copy, caller-control, theme, and disclosure behavior without editing the content; no control covers the code, and a one-line block with no header (no title, language label hidden) reads as one row (FR11). The copy glyph resolves through the `code-block-copy` component icon slot with the copied state (FR15). |+| End-user impact | Readers can inspect and copy code, understand optional line emphasis, and operate long or collapsible examples with keyboard and assistive technology. Readers of a block with no header never have code under a control, at the cost of the controls' column width, and a one-line command whose label is hidden reads as one row with its controls beside it; product actions sit beside Copy instead of outside the block. Readers of C, C++, SQL, Rust, Kotlin, Swift, and Go snippets see them highlighted instead of plain (FR12), and so do readers of GraphQL, Java, Thrift, Objective-C, TOML, PowerShell, Ruby, Lua, and Dockerfile snippets wherever the product passes that language's module (FR13). |+| Builder impact | Builders choose the released display axes without an additional migration or opt-in; the diff layer is one more opt-in axis, `endContent` (FR10) is one optional slot for their own controls, a less common language is one import passed as `language` (FR13), and five defaulted syntax-theme slots mean no syntax theme has to change for it. |+| Compatibility/readiness | The released `CodeBlock` API remains stable except that `tokenizer` is deprecated in favour of a custom language value (FR13), and its defaults hold except for the visible headerless layout (FR11) and the newly built-in languages (FR12) in Compatibility below; FR10 (`endContent`, additive) and FR11 are current and await implementation; FR12 (built-in languages), FR13 (language values, additive apart from the `tokenizer` deprecation), and PR4 (their budget) are current and await implementation; FR9 (the diff layer) is current and shipped; Markdown's default path for `diff` fences follows it (`component:Markdown` FR29). FR15 (the copy icon slot, additive) is current and awaits implementation. |+| Review checks | Reject lost code text, copy of a transformed string, an unnamed copy or disclosure control, stale disclosure state/wiring, dropped root props/ref, a theme target off its painter, viewport focusability that ignores effective overflow, a control painted over the code, or caller controls that toggle the disclosure. |+| Governing rules | `architecture:public-component-api/INV1,INV5–INV9`; `architecture:component-theming-surface/INV3–INV7,INV12`; `architecture:component-test-sufficiency/INV1–INV7,INV10–INV11`; `spec:AST-025/FR12–FR13`; `architecture:theme-tokens` (syntax vocabulary and the diff slot defaults); `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8` (the copy icon slot). |This table is a review projection; the body below is authoritative only after owner approval.@@ -66,6 +67,7 @@ Present read-only, standalone or multi-line code with optional syntax, navigatio- Additive API (FR13): `language` also accepts a language module, each module has its own subpath under `@astryxdesign/core/CodeBlock/languages/`, and the exported `tokenize`, `tokenizeAsync`, and `tokenizeStreaming` accept a module wherever they accept a language identifier; nothing changes until a product imports a module and passes it.- Additive API (FR14), current state, not owner-reviewed: `startLineNumber` sets the first line's number in the source file; its default of 1 keeps the released gutter and `highlightLines` meaning- Deprecation (FR13): the released `tokenizer` prop is deprecated and still works exactly as released; a staged codemod rewrites `tokenizer={fn}` beside a static `language="x"` other than `plaintext` to `language={createCodeLanguage({name: 'x', identifiers: ['x'], tokenize: fn})}`, which keeps `data-language="x"` and the `x` label, and reports every use it cannot prove (a dynamic or missing language, `plaintext`, a spread); the prop is removed only at a minor release.+- Additive theme surface (FR15): a theme may map the copy glyph through `componentIcons['code-block-copy']`; with no entry, the glyph is unchanged.- Migration decision: deprecate `tokenizer` in favour of a custom language value; no change is required until its removalConsumer migration instructions belong in consumer docs and release notes.@@ -119,6 +121,7 @@ Consumer migration instructions belong in consumer docs and release notes.| FR12 | Without the deprecated `tokenizer`, given a built-in identifier, CodeBlock MUST paint syntax for these built-in identifiers and their aliases: `typescript`/`ts`, `javascript`/`js`, `tsx`, `jsx`; `json`; `html`, `xml`, `svg`; `css`, `scss`, `less`; `python`/`py`; `bash`, `sh`, `zsh`, `shell`; `php`; `hack`; `yaml`/`yml`; `markdown`/`md`; `c`, `h`; `cpp`, `c++`, `cc`, `cxx`, `hpp`, `hh`; `sql`; `rust`/`rs`; `kotlin`, `kt`, `kts`; `swift`; `go`/`golang`. Each built-in paints the comment, string, number, and keyword tokens its language has from the syntax theme. Any other identifier renders as plain code with its label unless the deprecated `tokenizer` paints it; an identifier string never resolves to a language value. | proposal | verify || FR13 | Each less common language MUST be its own module, one per subpath, each exporting one language value: `graphql` (`graphql`, `gql`), `java` (`java`), `thrift` (`thrift`), `objectiveC` (`objective-c`, `objc`, `m`, `mm`), `toml` (`toml`), `powershell` (`powershell`, `ps1`, `pwsh`), `ruby` (`ruby`, `rb`), `lua` (`lua`), and `dockerfile` (`dockerfile`, `docker`), at `@astryxdesign/core/CodeBlock/languages/<path>`, where `<path>` is the export's name in kebab case (`languages/graphql` exports `graphql`, `languages/objective-c` exports `objectiveC`). A language value is a `CodeLanguage` carrying everything needed to render that language: read-only `name` (the identifier its label shows, such as `graphql`: code text shown verbatim like a built-in identifier, never translated prose, so it needs no catalog entry), `identifiers`, `fileExtensions`, and `fileNames` (for example `graphql`, or `Dockerfile`), all required, and its grammar, which stays internal. `language` MUST accept a language value as well as an identifier string: given one, CodeBlock paints the code with that language, labels it with its `name`, and reflects its first identifier wherever it reflects the language, such as `data-language` on its theme targets (FR6), in the same render as a built-in would; a string selects only a built-in grammar (FR12). There is no provider, registry, or grouped export: each module is imported and passed on its own, and only modules a bundle imports reach it. A custom language is the same kind of value: `createCodeLanguage({name, identifiers, fileExtensions, fileNames, tokenize})`, exported from `@astryxdesign/core/CodeBlock`, makes one from a caller's `tokenize(code, language)` function returning `{type, start, end}` tokens, which runs synchronously; `fileExtensions` and `fileNames` default to none. It is passed and listed exactly like an Astryx module, and Astryx modules keep their grammar internal. In a `codeLanguages` list, a listed value takes precedence over a built-in with the same identifier, and a later entry over an earlier one. The released `tokenizer` prop is deprecated and still works exactly as released, taking precedence over the language's grammar; it is removed only at a minor release, and a codemod rewrites a block whose `language` is a static string literal other than `plaintext` to a custom language passed as `language`, whose first identifier is that string, and reports every other use it cannot rewrite. The exported `tokenize`, `tokenizeAsync`, and `tokenizeStreaming` MUST accept a language value wherever they accept a language identifier. A surface that sees only a fence's language word takes modules through its own prop: `Markdown`'s `codeLanguages` (`component:Markdown` FR30) and RichText's (`spec:AST-061`). Lab's `DiffViewer` takes a language value as its `language` the same way; without one it infers a file's language from the file's extension or name among the built-ins and the values in its own `codeLanguages`, and an unmatched file stays plain. It tokenizes each hunk's old and new side as continuous text with whichever grammar applies, and its line-number gutters and change marks are unaffected. Modules are opaque values: CodeBlock exposes no grammar format. The module is the portable form of a language (`spec:AST-082/FR3`): a platform CodeBlock takes the same kind of value for its language. | proposal | verify || FR14 | Current state, not owner-reviewed. `startLineNumber` (default 1) MUST set the number of the first line in the source file. The gutter MUST show file coordinates (`startLineNumber + index`), so an excerpt reads with its real line numbers. A value below 1 MUST clamp to 1. `highlightLines` MUST use the same file coordinates, and an out-of-range entry MUST render no highlight. The offset MUST NOT change the displayed or copied source text (FR1). | released public type and JSDoc; shipped API | verify |+| FR15 | The copy control's glyph MUST resolve through the `code-block-copy` component icon slot, passing `{copied}`, which is true while the copied feedback (FR2) shows. With no theme entry, the glyph is `copy`, and `check` while copied. When the slot resolves to no icon (a theme value of `null`, a slot function that returns `null`, or a request with `icon: null`), only the glyph is hidden: the control keeps its size, name, tooltip, and copy behavior, and shows no glyph at rest or while copied. A request `size` changes only the glyph, never the control. | proposal; `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8` | verify |### Allowed variation@@ -159,14 +162,14 @@ Consumer migration instructions belong in consumer docs and release notes.## Design relationships-| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |-| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------- | ----------------------- |-| Header Bar | Provides supporting file/language context and houses the optional disclosure, caller controls, and copy. | observed shipped representation | supporting context | FR3, FR5, FR10, AR1–AR3 |-| Header Title | Groups the visible title, language label, and disclosure indicator inside the header. | observed shipped representation | supporting context | FR3, FR5, AR1–AR2 |-| Line Numbers | Support code navigation without becoming part of copied source. | observed shipped representation | supporting metadata | FR1, FR4 |-| Code Body | Keeps code text dominant, readable, scrollable or wrappable, and syntax-themed. | observed shipped representation | primary content | FR1, FR4, FR8 |-| Highlighted Lines | Add optional emphasis without replacing or mutating the source string. | observed shipped representation | supporting emphasis | FR1, FR4 |-| Copy Button | Exposes the code-copy action and transient success feedback without toggling the disclosure; with no header it sits with the caller controls in the corner cluster beside the code, never over it. | objective interaction semantics | secondary action | FR2, FR11, AR1–AR3 |+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |+| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------- | ------------------------ |+| Header Bar | Provides supporting file/language context and houses the optional disclosure, caller controls, and copy. | observed shipped representation | supporting context | FR3, FR5, FR10, AR1–AR3 |+| Header Title | Groups the visible title, language label, and disclosure indicator inside the header. | observed shipped representation | supporting context | FR3, FR5, AR1–AR2 |+| Line Numbers | Support code navigation without becoming part of copied source. | observed shipped representation | supporting metadata | FR1, FR4 |+| Code Body | Keeps code text dominant, readable, scrollable or wrappable, and syntax-themed. | observed shipped representation | primary content | FR1, FR4, FR8 |+| Highlighted Lines | Add optional emphasis without replacing or mutating the source string. | observed shipped representation | supporting emphasis | FR1, FR4 |+| Copy Button | Exposes the code-copy action and transient success feedback without toggling the disclosure; with no header it sits with the caller controls in the corner cluster beside the code, never over it. | objective interaction semantics | secondary action | FR2, FR11, FR15, AR1–AR3 |Exact CodeBlock proportions and syntax colors are not contract requirements; they remain within the syntax-paint and theme-paint variation allowed above.@@ -207,6 +210,7 @@ Exact CodeBlock proportions and syntax colors are not contract requirements; the| FR10 | `CodeBlock.test.tsx` (before Copy in the header and in the corner cluster, outside the disclosure control, pointer and Enter/Space inside it do not toggle, no header created, kept in place without Copy); exact-head browser evidence | header and headerless, with and without Copy, collapsible, LTR and RTL | A caller control toggles collapse, sits inside the disclosure or after Copy, creates a header, or is renamed or restyled by CodeBlock. | `audit:CodeBlock/behavior` || FR11 | real-browser geometry evidence over built stories | a long first line at rest, scrolled to its end, and wrapped; a one-line headerless block with and without caller controls; a one-line block with a visible label (keeps its header); one line growing to several; both sizes; LTR and RTL; light and dark | Any control box overlaps the code viewport, the cluster leaves the first line's centre, a one-line headerless block's space above and below differs, a block with a visible label or title loses its header, or the controls move when lines are added. | `audit:CodeBlock/behavior` || FR14 | Current state, not owner-reviewed. `CodeBlock.startLineNumber.test.tsx` (gutter from 1 by default; file coordinates from `startLineNumber`; `highlightLines` in file coordinates; a value below 1 clamps to 1; out-of-range highlights render nothing; copy stays exact) | default; a three-line excerpt starting at line 40; a value of 0; a highlight inside the excerpt (42) and entries outside it (1, 2, 39, 43, 100) | The gutter starts at 1 when `startLineNumber` is set, a highlight lands on the excerpt index instead of the file line, a value below 1 shows a number below 1, or copy includes gutter numbers. | `audit:CodeBlock/behavior` |+| FR15 | `CodeBlock.test.tsx` copy icon slot suite; a slot inventory test that each declared slot is rendered by its component and listed in its consumer docs; theme-build parity between a built and a runtime theme | no entry, a mapped name, a slot function in both states, a function that returns `undefined` for one state, `null`, a size request, an unknown name | The glyph ignores the slot or its state, `null` removes the control, its name, or its copy action, a size request resizes the button, an unknown name loses the fallback, or the consumer docs do not list the slot. | `audit:CodeBlock/theming` || RTL | `rtl:audit -- --filter CodeBlock` D2 target plus exact-head browser evidence | title, caller controls, and copy order, and the corner cluster at the inline end, in LTR/RTL | Logical order fails to mirror or physical placement leaks. | `audit:CodeBlock/rtl` || Consumer metadata | CLI `component CodeBlock --json`; docs typecheck; prop/target validation; package-export checks | released props/defaults/ref and current/deprecated targets | A released prop/default/ref/target disappears from consumer discovery or docs name an unsupported value. | `audit:CodeBlock/docs` |diff --git a/docs/specs/components/Table/Table.spec.md b/docs/specs/components/Table/Table.spec.mdindex bdc2049a24..e6a731008d 100644--- a/docs/specs/components/Table/Table.spec.md+++ b/docs/specs/components/Table/Table.spec.md@@ -47,6 +47,7 @@ architecture:architecture:container-padding,architecture:interaction-modality,architecture:public-component-api,+ architecture:icon-resolution-and-component-slots,]contributing: []system_specs: [spec:AST-025]@@ -56,15 +57,15 @@ system_specs: [spec:AST-025]## Contract at a glance-| Area | Contract |-| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Public contract | The shared plugin protocol exposes optional immutable render context, declared row-model/whole-row ownership, and an observable `renderState` source with immutable loading/availability snapshots. `Table.virtualization` accepts the opaque capability from `useTableRowsVirtualization` together with data and explicit `idKey`. |-| Behavior | Table validates one canonical identity, admits compatible flat-row compositions, plans windows before cell construction, and coordinates one viewport, logical row sequence and paint resolution. |-| End-user impact | Row activation remains independent from selection; loaded rows keep state and focus, and large flat tables bound mounted work without changing native table semantics. |-| Builder impact | Existing use without the new capabilities is unchanged. Windowing requires explicit identity and fixed-height layout; arbitrary row/detail/tree output does not silently enter the supported mode. |-| Compatibility/readiness | Opt-in protocol additions preserve legacy row keys and body-relative ARIA without opt-in. New capabilities require their implementation and browser/performance verification before release. |-| Review checks | Reject a second key extractor, order-selected whole-row owners, rendering all cells before slicing, parallel scroll ownership, independent overlay writers or window-relative accessibility metadata. |-| Governing rules | Table owns the parent protocol; module records own capability behavior. Shared viewport behavior follows `spec:AST-025`; API caller burden follows `architecture:public-component-api`. |+| Area | Contract |+| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | The shared plugin protocol exposes optional immutable render context, declared row-model/whole-row ownership, and an observable `renderState` source with immutable loading/availability snapshots. `Table.virtualization` accepts the opaque capability from `useTableRowsVirtualization` together with data and explicit `idKey`. |+| Behavior | Table validates one canonical identity, admits compatible flat-row compositions, plans windows before cell construction, and coordinates one viewport, logical row sequence and paint resolution. |+| End-user impact | Row activation remains independent from selection; loaded rows keep state and focus, and large flat tables bound mounted work without changing native table semantics. |+| Builder impact | Existing use without the new capabilities is unchanged. Windowing requires explicit identity and fixed-height layout; arbitrary row/detail/tree output does not silently enter the supported mode. |+| Compatibility/readiness | Opt-in protocol additions preserve legacy row keys and body-relative ARIA without opt-in. New capabilities require their implementation and browser/performance verification before release. The `table-sort-indicator` (FR5) and `table-row-expand` (FR7) icon slots are additive, current, and await implementation; with no theme entry, output is unchanged. |+| Review checks | Reject a second key extractor, order-selected whole-row owners, rendering all cells before slicing, parallel scroll ownership, independent overlay writers or window-relative accessibility metadata. |+| Governing rules | Table owns the parent protocol; module records own capability behavior. Shared viewport behavior follows `spec:AST-025`; API caller burden follows `architecture:public-component-api`. |This table is a review projection; the body below is authoritative.@@ -100,6 +101,9 @@ public behavior and evidence, without privately replacing the Table renderer.pass-through and inline containment remain on the existing wrapper/content box.The canonical `table` target replaces the removed `base-table` alias; consumermigration instructions remain with the public docs and release owner.+- Additive theme surface (FR5, FR7): a theme may map the Sort indicator glyph+ through `componentIcons['table-sort-indicator']` and the Expansion glyph through+ `componentIcons['table-row-expand']`; with no entry, both glyphs are unchanged.- Migration decision: DEC-1/DEC-2 govern those retained corrections; DEC-4/DEC-5govern the capability additions and their distinct opt-in/remount boundary.@@ -199,30 +203,30 @@ Consumer data, columns, props, module signatures and usage remain documented in## Behavioral and layout contract-| ID | Invariant | Basis | Evidence state |-| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| FR1 | By default, Styled Table renders one named Scroll region around one observed content box and one semantic Table. The Scroll region takes the Table's own name (its `aria-labelledby`, else its `aria-label`), and a generic table name only when the Table has none. Its applicable axis is inline without windowing and both inline/block with admitted windowing. The viewport enters the keyboard order while at least one applicable axis effectively overflows. Inline overscroll is contained only while inline scrolling is effective; block chaining stays allowed, and fitting content passes gestures to its ancestor. Explicit scroll-wrapper plugin HTML attributes remain authoritative. | `spec:AST-025` FR12, FR14, FR19, FR21; current source, docs, and tests | Legacy inline entry/containment verified; both-axis opt-in entry requires implementation evidence |-| FR2 | Data-driven mode renders a Body section and a Header section with Column header cells when columns are present. Without windowing, each data item renders a standard Row and Cells; FR18 limits row/cell construction to the admitted mounted plan. Empty data renders the configured empty-state row when enabled, subject to FR22's default initial-loading suppression. It never creates a Footer section. Each Column header cell shows its column's `header`, and the column `key` only when `header` is omitted, `null`, or `undefined`; any other `header` renders as React renders it, so `header: ''`, the blank header of an actions column, renders an empty Column header cell, not the key (`architecture:react-component-runtime` INV16). | Current source, docs, and tests | Legacy rendering verified; FR18/FR22 exceptions require implementation evidence |-| FR3 | Children mode passes caller composition through to the Table. TableHeader, TableBody, and TableFooter provide the respective sections, and TableRow, TableHeaderCell, and TableCell provide standard rows and cells. | Current source, docs, and tests | Verified current composition; no new API or DOM rule |-| FR4 | `Table.doc.mjs` is the canonical aggregate consumer owner for the eight current targets: `table`, `table-scroll-wrapper`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-cell`, and `table-header-cell`. Member docs retain direct lookup metadata through `subComponentOf: 'Table'`. | Current docs and CLI target tests | Verified parent ownership; focused placement coverage is partial |-| FR5 | For a sortable column, useTableSortable renders a Sort control around the column label, an Icon-owned Sort indicator glyph, and a numeric Sort priority only while multi-sort has more than one active entry. | Current source, docs, and tests | Control and priority are tested; glyph presence is source-inspected only |-| FR6 | useTableSelection renders CheckboxInput-owned Selection controls in the generated selection Column header cell and each selectable body Cell; selection remains row state rather than separate anatomy. | Current source, docs, and tests | Verified stable delegated controls; no target or state change |-| FR7 | For an expandable row, useTableRowExpansion renders an Expansion control with an Icon-owned Expansion glyph and conditionally appends an Expanded detail panel whose cell spans the column count captured by that plugin's `transformColumns` step. | Current source, docs, and tests | Verified stable plugin parts; current target gaps remain |-| FR8 | Empty data renders the default compact EmptyState unless the caller supplies replacement content or disables it, with FR22 suppressing only the default during admitted initial loading. | Current source, docs, and tests | Legacy delegation verified; FR22 loading exception requires implementation evidence |-| FR9 | Table converts the caller's named plugin record into one ordered array after its built-in styling plugin. Known names use the current canonical sequence `columnSettings → sort → tree → selection → pagination`; every other name follows that known set while preserving its record insertion order. | Current source and docs | Current shared ordering; canonical-name coverage is source-inspected |-| FR10 | Every applicable non-context transform runs sequentially in the resolved plugin-array order, so a later plugin receives the value returned by every earlier successful plugin. A throwing transform reports a development error and leaves the prior accumulated value in the pipeline. | Current source and tests | Sequential composition is tested; failure isolation is source-inspected |-| FR11 | `transformColumns` completes before element transforms. Table then applies table, header-cell/header-row, body-cell/body-row, scroll-wrapper, and context phases at their render points. Header-cell contributions use `before`, `content`, `after`, `overlay`, and `below` slots. Content in a header cell's `overlay` slot never joins the header's accessible name. Context transforms run in reverse so the first plugin becomes the outermost provider. | Current source, types, and tests | Transform application is tested; complete cross-phase order is source-inspected |-| FR12 | When built-in and named plugin references are unchanged, Table reuses the resolved plugin array; unknown/custom plugin value identity and insertion order remain stable inputs to memoization. | Current source and performance tests | Current performance contract; focused named-order coverage is partial |-| FR13 | In data-driven mode, each explicit column whose `width` is omitted keeps one equal flexible share and a 60px readability floor. A column sets its own floor with `proportional(value, {minWidth})`, which replaces the 60px floor for that column; Table has no table-wide floor setting. Resolution is a pure function of the final column definitions: row values, rendered header/body measurement, locale, sorting, filtering, virtualization, and loading state do not change any floor. Explicit pixel and proportional widths retain their authored floors. When the resolved floors exceed available inline space, the existing Scroll region provides horizontal overflow. | `component:Table/DEC-2`; current source and tests | Verified by width-resolution unit coverage and the ResponsiveScroll real-browser geometry fixture |-| FR14 | Wherever Table shows a row divider, including while rows glide and in pinned columns, the divider has the width, style and colour the row's border would have: the theme's tokens and any app override on `tr`, `tbody` or `td` borders, so customizations still show. | `component:Table/DEC-3` | Verified by row-expansion glide unit coverage and real-browser divider checks, pinned cells and an open panel included; a transient 1 px WebKit pinned-cell step is a recorded gap |-| FR15 | `useTableRowExpansion` takes an `animatedLayout` option, the handle `spec:AST-105` FR1 defines: when an Expanded detail row opens, the panel plays in and the rows after it glide to their new places; when one closes, it hides at once and the rows after it glide up into its space (`spec:AST-105` Coverage). The Expansion glyph turns on the same motion; under reduced motion the rows move without travel (`spec:AST-105` FR4). Without the option, rows change at once. A table that draws column lines (`dividers="grid"` or `"columns"`) does not glide yet: with the option its panel and rows change at once, as without it, and the glyph keeps its own turn. | `spec:AST-105` FR1, FR4; owner decision, 2026-10-26 | Opening and closing glides, the case without a handle, the glyph's turn, reduced motion and column lines are tested; the panel's entrance and its hide on close are source-inspected |-| FR16 | Activation and windowing use one explicit canonical `idKey`. Property keys resolve valid strings/finite numbers through the existing string projection; function keys retain string/finite-number type. Missing, null, nonprimitive, nonfinite and duplicate values are invalid for these opt-ins. Table validates the complete logical dataset on data/key changes and supplies status; activation is inert on invalid rows and windowing falls back to full rendering. Internal type-tagged reconciliation keys distinguish numeric `0` from string `"0"` without changing callback equality. Invalid fallback keys are deterministic per record but promise no preserved state under invalid identity. Legacy keys without these opt-ins remain unchanged. | DEC-4; identity and compatibility boundary | Specified; release verification required |-| FR17 | Table supplies immutable `TableRowContext` and `TableRenderContext` rather than requiring module extractors or DOM mode inference. Row model and whole-row owner declarations precede eligibility/element transforms. Flat capability admission excludes tree/grouped/detail/custom structural output and unknown body modifiers without a compatible declaration. First-party `useTableSelection` and `useTableStickyColumns` declare `rowModel: 'flat'`; their selection cells and pinned-cell wrappers preserve flat product-row structure. More than one whole-row owner claim, including repeated activation entries, neutralizes activation in either plugin order, preserves the old owners and non-owning handlers, and emits one development diagnostic. A custom callback that owns a whole-row action must declare it; Table never infers arbitrary callback intent. | DEC-4; shared protocol | Specified; release verification required |-| FR18 | `Table.virtualization` is an opaque geometry capability; runtime admission requires data mode, explicit identity and constrained content together. The optional prop preserves the exported Table props interface; invalid combinations take the diagnostic full-render fallback. Table resolves complete input order, columns and identity, then plans mounted keyed records and inaccessible gaps before cell construction. Only mounted product/focus-island records enter element transforms. Default virtualized cells use existing single-line `textOverflow="truncate"`; explicit wrap, arbitrary row/cell renderers or unsafe structural output falls back to full rendering. Without opt-in, default wrapping and ordinary rendering remain unchanged. | DEC-5; native rendering and bounded work | Specified; release verification required |-| FR19 | Windowing uses the existing Table viewport/content-box composition on both logical axes with a bounded block size. Effective inline overflow contains chaining; block chaining remains allowed. Keyboard access, logical mapping, sticky/header/column behavior and geometry consumers share that owner, stable refs, pooled resize work and at most one scroll subscription/pending frame. No module creates a parallel ScrollableArea, detector or unknown external root. Modules without a Table block viewport may use viewport intersection; absent wrapper/context does not fabricate an after-table surface. | DEC-5; `spec:AST-025` FR12/FR18/FR19 | Specified; release verification required |-| FR20 | In virtualized flat nonempty data, the parent logical sequence assigns header indices 1 through H and product row i index H+i+1. Table owns `aria-rowcount`: it is `-1` while any currently admitted incremental-loading render-state contribution reports `hasMore=true`, including idle, busy and retry-paused states; otherwise it is the complete current count H+N. Loading publishes availability, not a separate total or ARIA writer, and virtualization consumes this same parent rule. Appending while more data remains does not turn the unknown total into a loaded-row count; exhaustion makes the total exact and renewed availability makes it unknown again. Visible numbering derives i+1 from the same zero-based index. Inaccessible gaps are excluded. Logical parity/final-row state, not gap-relative DOM position, controls striping/dividers. Caller legacy offsets/counts conflict with this mode and cause full-render fallback rather than a second source of truth. Empty data uses the existing placeholder/disabled-empty branch without a virtual metadata override. Nonvirtualized paginated metadata remains unchanged. | DEC-5; complete semantic sequence | Specified; release verification required |-| FR21 | Selection and activation publish semantic row state to one parent-coordinated paint resolution path. Selection wash wins while selected with row highlight enabled; otherwise activation's component fallback may apply, and the activation-owned non-colour cue remains independent. `hasRowHighlight=false` removes only selection wash. One effective overlay reaches ordinary/pinned cells and gives the same output for selection-first or activation-first updates; clearing either state restores the other applicable state, hover/striping and focus. No competing module writer removes another module's overlay or changes selection semantics. | Shared row-state ownership; activation presentation boundary | Specified; release verification required |-| FR22 | A loading module's stable render-state source notifies Table before section construction. Table resolves current data-mode, flat-model and wrapper admission first and ignores loading contributions from unsupported or no-chrome configurations. While admitted complete data is empty and effective loading is true, Table suppresses only the default EmptyState; explicitly caller-owned empty/error content remains caller-controlled. Completion/reset restores ordinary empty behavior if appropriate. If exhaustion removes the focused manual command, or virtual-row removal otherwise detaches current focus, the existing focus owner moves focus first to the named Table Scroll region with `preventScroll`, using temporary programmatic-only focusability when it has no sequential stop. No move occurs when the caller already moved focus to a surviving successor or focus already left the removed subtree; the temporary attribute is removed/restored on departure without changing explicit caller attributes. | Loading/render and focus ownership boundary | Specified; release verification required |+| ID | Invariant | Basis | Evidence state |+| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| FR1 | By default, Styled Table renders one named Scroll region around one observed content box and one semantic Table. The Scroll region takes the Table's own name (its `aria-labelledby`, else its `aria-label`), and a generic table name only when the Table has none. Its applicable axis is inline without windowing and both inline/block with admitted windowing. The viewport enters the keyboard order while at least one applicable axis effectively overflows. Inline overscroll is contained only while inline scrolling is effective; block chaining stays allowed, and fitting content passes gestures to its ancestor. Explicit scroll-wrapper plugin HTML attributes remain authoritative. | `spec:AST-025` FR12, FR14, FR19, FR21; current source, docs, and tests | Legacy inline entry/containment verified; both-axis opt-in entry requires implementation evidence |+| FR2 | Data-driven mode renders a Body section and a Header section with Column header cells when columns are present. Without windowing, each data item renders a standard Row and Cells; FR18 limits row/cell construction to the admitted mounted plan. Empty data renders the configured empty-state row when enabled, subject to FR22's default initial-loading suppression. It never creates a Footer section. Each Column header cell shows its column's `header`, and the column `key` only when `header` is omitted, `null`, or `undefined`; any other `header` renders as React renders it, so `header: ''`, the blank header of an actions column, renders an empty Column header cell, not the key (`architecture:react-component-runtime` INV16). | Current source, docs, and tests | Legacy rendering verified; FR18/FR22 exceptions require implementation evidence |+| FR3 | Children mode passes caller composition through to the Table. TableHeader, TableBody, and TableFooter provide the respective sections, and TableRow, TableHeaderCell, and TableCell provide standard rows and cells. | Current source, docs, and tests | Verified current composition; no new API or DOM rule |+| FR4 | `Table.doc.mjs` is the canonical aggregate consumer owner for the eight current targets: `table`, `table-scroll-wrapper`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-cell`, and `table-header-cell`. Member docs retain direct lookup metadata through `subComponentOf: 'Table'`. | Current docs and CLI target tests | Verified parent ownership; focused placement coverage is partial |+| FR5 | For a sortable column, useTableSortable renders a Sort control around the column label, an Icon-owned Sort indicator glyph, and a numeric Sort priority only while multi-sort has more than one active entry. The Sort indicator glyph resolves through the `table-sort-indicator` component icon slot, passing `{direction}`: `ascending`, `descending`, or `none` while the column is unsorted. With no theme entry it is `arrowUp`, `arrowDown`, or `arrowsUpDown`. When the slot resolves to no icon (a theme value of `null`, a slot function that returns `null`, or a request with `icon: null`), only the glyph is hidden: the Sort control, its label, its sorting, and the header's `aria-sort` remain, the hidden glyph takes no space beside the label, and a sorted column then shows no visible sort cue. A request `size` changes only the glyph, never the Sort control or the header row. | Current source, docs, and tests; `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8` for the icon slot | Control and priority are tested; glyph presence is source-inspected only; the icon slot awaits implementation |+| FR6 | useTableSelection renders CheckboxInput-owned Selection controls in the generated selection Column header cell and each selectable body Cell; selection remains row state rather than separate anatomy. | Current source, docs, and tests | Verified stable delegated controls; no target or state change |+| FR7 | For an expandable row, useTableRowExpansion renders an Expansion control with an Icon-owned Expansion glyph and conditionally appends an Expanded detail panel whose cell spans the column count captured by that plugin's `transformColumns` step. The Expansion glyph resolves through the `table-row-expand` component icon slot, passing `{expanded}`. With no theme entry it is `chevronRight`. Whatever the slot resolves, the control turns the glyph a quarter turn while the row is expanded and mirrors it in right-to-left layouts. When the slot resolves to no icon (a theme value of `null`, a slot function that returns `null`, or a request with `icon: null`), only the glyph is hidden: the Expansion control, its name, `aria-expanded`, and its toggling remain, and the control shows no glyph. A request `size` changes only the glyph. | Current source, docs, and tests; `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8` for the icon slot | Verified stable plugin parts; current target gaps remain; the icon slot awaits implementation |+| FR8 | Empty data renders the default compact EmptyState unless the caller supplies replacement content or disables it, with FR22 suppressing only the default during admitted initial loading. | Current source, docs, and tests | Legacy delegation verified; FR22 loading exception requires implementation evidence |+| FR9 | Table converts the caller's named plugin record into one ordered array after its built-in styling plugin. Known names use the current canonical sequence `columnSettings → sort → tree → selection → pagination`; every other name follows that known set while preserving its record insertion order. | Current source and docs | Current shared ordering; canonical-name coverage is source-inspected |+| FR10 | Every applicable non-context transform runs sequentially in the resolved plugin-array order, so a later plugin receives the value returned by every earlier successful plugin. A throwing transform reports a development error and leaves the prior accumulated value in the pipeline. | Current source and tests | Sequential composition is tested; failure isolation is source-inspected |+| FR11 | `transformColumns` completes before element transforms. Table then applies table, header-cell/header-row, body-cell/body-row, scroll-wrapper, and context phases at their render points. Header-cell contributions use `before`, `content`, `after`, `overlay`, and `below` slots. Content in a header cell's `overlay` slot never joins the header's accessible name. Context transforms run in reverse so the first plugin becomes the outermost provider. | Current source, types, and tests | Transform application is tested; complete cross-phase order is source-inspected |+| FR12 | When built-in and named plugin references are unchanged, Table reuses the resolved plugin array; unknown/custom plugin value identity and insertion order remain stable inputs to memoization. | Current source and performance tests | Current performance contract; focused named-order coverage is partial |+| FR13 | In data-driven mode, each explicit column whose `width` is omitted keeps one equal flexible share and a 60px readability floor. A column sets its own floor with `proportional(value, {minWidth})`, which replaces the 60px floor for that column; Table has no table-wide floor setting. Resolution is a pure function of the final column definitions: row values, rendered header/body measurement, locale, sorting, filtering, virtualization, and loading state do not change any floor. Explicit pixel and proportional widths retain their authored floors. When the resolved floors exceed available inline space, the existing Scroll region provides horizontal overflow. | `component:Table/DEC-2`; current source and tests | Verified by width-resolution unit coverage and the ResponsiveScroll real-browser geometry fixture |+| FR14 | Wherever Table shows a row divider, including while rows glide and in pinned columns, the divider has the width, style and colour the row's border would have: the theme's tokens and any app override on `tr`, `tbody` or `td` borders, so customizations still show. | `component:Table/DEC-3` | Verified by row-expansion glide unit coverage and real-browser divider checks, pinned cells and an open panel included; a transient 1 px WebKit pinned-cell step is a recorded gap |+| FR15 | `useTableRowExpansion` takes an `animatedLayout` option, the handle `spec:AST-105` FR1 defines: when an Expanded detail row opens, the panel plays in and the rows after it glide to their new places; when one closes, it hides at once and the rows after it glide up into its space (`spec:AST-105` Coverage). The Expansion glyph turns on the same motion; under reduced motion the rows move without travel (`spec:AST-105` FR4). Without the option, rows change at once. A table that draws column lines (`dividers="grid"` or `"columns"`) does not glide yet: with the option its panel and rows change at once, as without it, and the glyph keeps its own turn. | `spec:AST-105` FR1, FR4; owner decision, 2026-10-26 | Opening and closing glides, the case without a handle, the glyph's turn, reduced motion and column lines are tested; the panel's entrance and its hide on close are source-inspected |+| FR16 | Activation and windowing use one explicit canonical `idKey`. Property keys resolve valid strings/finite numbers through the existing string projection; function keys retain string/finite-number type. Missing, null, nonprimitive, nonfinite and duplicate values are invalid for these opt-ins. Table validates the complete logical dataset on data/key changes and supplies status; activation is inert on invalid rows and windowing falls back to full rendering. Internal type-tagged reconciliation keys distinguish numeric `0` from string `"0"` without changing callback equality. Invalid fallback keys are deterministic per record but promise no preserved state under invalid identity. Legacy keys without these opt-ins remain unchanged. | DEC-4; identity and compatibility boundary | Specified; release verification required |+| FR17 | Table supplies immutable `TableRowContext` and `TableRenderContext` rather than requiring module extractors or DOM mode inference. Row model and whole-row owner declarations precede eligibility/element transforms. Flat capability admission excludes tree/grouped/detail/custom structural output and unknown body modifiers without a compatible declaration. First-party `useTableSelection` and `useTableStickyColumns` declare `rowModel: 'flat'`; their selection cells and pinned-cell wrappers preserve flat product-row structure. More than one whole-row owner claim, including repeated activation entries, neutralizes activation in either plugin order, preserves the old owners and non-owning handlers, and emits one development diagnostic. A custom callback that owns a whole-row action must declare it; Table never infers arbitrary callback intent. | DEC-4; shared protocol | Specified; release verification required |+| FR18 | `Table.virtualization` is an opaque geometry capability; runtime admission requires data mode, explicit identity and constrained content together. The optional prop preserves the exported Table props interface; invalid combinations take the diagnostic full-render fallback. Table resolves complete input order, columns and identity, then plans mounted keyed records and inaccessible gaps before cell construction. Only mounted product/focus-island records enter element transforms. Default virtualized cells use existing single-line `textOverflow="truncate"`; explicit wrap, arbitrary row/cell renderers or unsafe structural output falls back to full rendering. Without opt-in, default wrapping and ordinary rendering remain unchanged. | DEC-5; native rendering and bounded work | Specified; release verification required |+| FR19 | Windowing uses the existing Table viewport/content-box composition on both logical axes with a bounded block size. Effective inline overflow contains chaining; block chaining remains allowed. Keyboard access, logical mapping, sticky/header/column behavior and geometry consumers share that owner, stable refs, pooled resize work and at most one scroll subscription/pending frame. No module creates a parallel ScrollableArea, detector or unknown external root. Modules without a Table block viewport may use viewport intersection; absent wrapper/context does not fabricate an after-table surface. | DEC-5; `spec:AST-025` FR12/FR18/FR19 | Specified; release verification required |+| FR20 | In virtualized flat nonempty data, the parent logical sequence assigns header indices 1 through H and product row i index H+i+1. Table owns `aria-rowcount`: it is `-1` while any currently admitted incremental-loading render-state contribution reports `hasMore=true`, including idle, busy and retry-paused states; otherwise it is the complete current count H+N. Loading publishes availability, not a separate total or ARIA writer, and virtualization consumes this same parent rule. Appending while more data remains does not turn the unknown total into a loaded-row count; exhaustion makes the total exact and renewed availability makes it unknown again. Visible numbering derives i+1 from the same zero-based index. Inaccessible gaps are excluded. Logical parity/final-row state, not gap-relative DOM position, controls striping/dividers. Caller legacy offsets/counts conflict with this mode and cause full-render fallback rather than a second source of truth. Empty data uses the existing placeholder/disabled-empty branch without a virtual metadata override. Nonvirtualized paginated metadata remains unchanged. | DEC-5; complete semantic sequence | Specified; release verification required |+| FR21 | Selection and activation publish semantic row state to one parent-coordinated paint resolution path. Selection wash wins while selected with row highlight enabled; otherwise activation's component fallback may apply, and the activation-owned non-colour cue remains independent. `hasRowHighlight=false` removes only selection wash. One effective overlay reaches ordinary/pinned cells and gives the same output for selection-first or activation-first updates; clearing either state restores the other applicable state, hover/striping and focus. No competing module writer removes another module's overlay or changes selection semantics. | Shared row-state ownership; activation presentation boundary | Specified; release verification required |+| FR22 | A loading module's stable render-state source notifies Table before section construction. Table resolves current data-mode, flat-model and wrapper admission first and ignores loading contributions from unsupported or no-chrome configurations. While admitted complete data is empty and effective loading is true, Table suppresses only the default EmptyState; explicitly caller-owned empty/error content remains caller-controlled. Completion/reset restores ordinary empty behavior if appropriate. If exhaustion removes the focused manual command, or virtual-row removal otherwise detaches current focus, the existing focus owner moves focus first to the named Table Scroll region with `preventScroll`, using temporary programmatic-only focusability when it has no sequential stop. No move occurs when the caller already moved focus to a surviving successor or focus already left the removed subtree; the temporary attribute is removed/restored on departure without changing explicit caller attributes. | Loading/render and focus ownership boundary | Specified; release verification required |### Current evidence and gaps@@ -259,7 +263,9 @@ Consumer data, columns, props, module signatures and usage remain documented incontent may vary without creating new anatomy parts.- **AV3 - Optional parts.** Header section, Footer section, default EmptyState,Sort, Selection, and Expansion parts may be absent according to columns,- rendering mode, plugin configuration, data, and row eligibility.+ rendering mode, plugin configuration, data, and row eligibility. The Sort+ indicator glyph and the Expansion glyph are also absent when their icon slot+ resolves to no icon (FR5, FR7).- **AV4 - Delegated rendering.** CheckboxInput, Icon, and EmptyState may changeinternal element shape while preserving their own public contracts.- **AV5 - Module participation.** Any named module may omit transform phases it does@@ -268,16 +274,16 @@ Consumer data, columns, props, module signatures and usage remain documented in### Representative states-| State | Required invariant | Allowed variation |-| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |-| Data-driven rows | Scroll region contains Table, Header when columns exist, and Body; one Row with Cells per item without windowing, or only FR18's mounted plan with windowing. | Counts, values, density, dividers, and cell content. |-| Width-less explicit columns | Every omitted-width column remains equally flexible above a 60px floor; combined floors trigger the existing Scroll region only when they no longer fit. | Row values, header nodes, sorting/filtering, virtualization, loading or empty rows, direction, and responsive container width. |-| Empty data | Default EmptyState is present unless replaced/disabled or FR22 suppresses it during admitted initial loading; ordinary empty output resumes on completion. | Caller replacement content or no empty state. |-| Children mode | Caller-supplied sections are passed directly to Table. | Header, Body, and Footer section presence and content. |-| Sortable column | Column header cell contains Sort control and Sort indicator glyph. | Direction and conditional multi-sort priority. |-| Selectable rows | Selection controls occupy generated header and body cells. | Checked, indeterminate, disabled, or absent per row. |-| Expandable row | Expansion control occupies a generated Cell; open state adds the detail panel after its row using the expansion plugin's captured column count. | Expanded state, caller detail content, and later plugin column transforms. |-| Multiple plugins | Built-in styling runs first, then named plugins compose in the resolved order; later transforms receive earlier results. | Supported transform subset, custom names, and omitted phases. |+| State | Required invariant | Allowed variation |+| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |+| Data-driven rows | Scroll region contains Table, Header when columns exist, and Body; one Row with Cells per item without windowing, or only FR18's mounted plan with windowing. | Counts, values, density, dividers, and cell content. |+| Width-less explicit columns | Every omitted-width column remains equally flexible above a 60px floor; combined floors trigger the existing Scroll region only when they no longer fit. | Row values, header nodes, sorting/filtering, virtualization, loading or empty rows, direction, and responsive container width. |+| Empty data | Default EmptyState is present unless replaced/disabled or FR22 suppresses it during admitted initial loading; ordinary empty output resumes on completion. | Caller replacement content or no empty state. |+| Children mode | Caller-supplied sections are passed directly to Table. | Header, Body, and Footer section presence and content. |+| Sortable column | Column header cell contains the Sort control and, unless the `table-sort-indicator` slot resolves to no icon (FR5), the Sort indicator glyph. | Direction and conditional multi-sort priority. |+| Selectable rows | Selection controls occupy generated header and body cells. | Checked, indeterminate, disabled, or absent per row. |+| Expandable row | Expansion control occupies a generated Cell and, unless the `table-row-expand` slot resolves to no icon (FR7), holds the Expansion glyph; open state adds the detail panel after its row using the expansion plugin's captured column count. | Expanded state, caller detail content, and later plugin column transforms. |+| Multiple plugins | Built-in styling runs first, then named plugins compose in the resolved order; later transforms receive earlier results. | Supported transform subset, custom names, and omitted phases. |### Transformation and precedence order@@ -345,7 +351,7 @@ module's output.| Header section | Groups Column header cells separately from body data. | Current source and public docs | Supporting | FR2-FR4 || Column header cell | Identifies one column and hosts optional header controls. | Current source and public docs | Prominent | FR2-FR6 || Sort control | Activates sorting for one sortable column. | Current source and public docs | Prominent | FR5 |-| Sort indicator glyph | Shows the current sort direction through Icon. | `component:Icon` | Supporting | FR5 |+| Sort indicator glyph | Shows the current sort direction through Icon; absent when the `table-sort-indicator` slot resolves to no icon. | `component:Icon` | Supporting | FR5 || Sort priority | Shows a column's position in active multi-sort order. | Current source and public docs | Supporting | FR5 || Selection control | Selects all eligible rows or one eligible row through CheckboxInput. | `component:CheckboxInput` | Prominent | FR6 || Body section | Groups data, empty-state, and expanded-detail rows. | Current source and public docs | Supporting | FR2-FR4, FR7, FR8 |@@ -353,7 +359,7 @@ module's output.| Cell | Contains one value or caller-provided content in a standard body or footer row. | Current source and public docs | Prominent | FR2-FR4, FR6, FR7 || Default empty state | Communicates that the current data array has no rows through EmptyState. | `component:EmptyState` | Prominent | FR8 || Expansion control | Expands or collapses one eligible row. | Current source and public docs | Prominent | FR7 |-| Expansion glyph | Shows the current expansion direction through Icon. | `component:Icon` | Supporting | FR7 |+| Expansion glyph | Shows the current expansion direction through Icon; absent when the `table-row-expand` slot resolves to no icon. | `component:Icon` | Supporting | FR7 || Expanded detail panel | Presents caller-provided detail content in a spanning row below the expanded row. | Current source and public docs | Prominent | FR7 || Footer section | Groups caller-supplied summary or total rows below the body. | Current source and public docs | Supporting | FR3, FR4 |@@ -433,23 +439,23 @@ for this aggregate ownership.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |-| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |-| FR1-FR3 | `Table.test.tsx` render, structure, fit/overflow transitions, children-mode, section, and target assertions | Fitting and inline-overflowing data-driven tables, empty data, and children composition | Removing Table, Scroll region, observed content box, conditional keyboard access, or effective-axis containment fails existing role, structure, state, class, style, or prop-forwarding assertions; Row and Cell are conditional on rendered data or caller composition. Evidence gap: FR2's column `header` rule (the `key` fallback only when `header` is omitted, `null`, or `undefined`, so `header: ''` renders a blank header) is source-inspected; no test passes `header: ''`. | `audit:Table/anatomy` |-| FR4 | CLI discovery and API target tests plus source inspection | Direct member docs and unfiltered/scoped target output | Duplicating a parent/member target or changing the canonical owner fails parent-aware discovery assertions; section target placement remains source-inspected. | `audit:Table/theming` |-| FR5 | `plugins/sortable/useTableSortable.test.tsx`; the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`, self-tested by `useTableSortable.a11y.test.tsx`), which the Table binding composes onto the base Table contract for its sorted state (`__tests__/Table.a11y.test.tsx`, `__tests__/Table.a11y.chromium.spec.ts`); plus source inspection | Unsorted, ascending, descending, and multi-sort | Removing the Sort control, conditional priority, or ARIA state fails existing assertions. Removing the Sort indicator glyph does not currently fail a focused test; glyph presence and delegated Icon target placement remain source-inspected. | `audit:Table/anatomy` |-| FR6 | `plugins/selection/useTableSelection.test.tsx` | Select all, individual, disabled, and non-selectable | Removing header/body Selection controls or row selection state fails existing structure, label, interaction, and ARIA assertions; delegated CheckboxInput target placement remains source-inspected. | `audit:Table/anatomy` |-| FR7 | `plugins/rowExpansion/useTableRowExpansion.test.tsx` plus source inspection | Collapsed, expanded, and non-expandable rows | Removing the Expansion control, conditional detail panel, captured-count `colSpan`, or ARIA state fails existing assertions in the covered plugin order; later column transforms, delegated Icon target placement, and untargeted panel wrappers remain source-inspected. | `audit:Table/anatomy` |-| FR8 | `Table.test.tsx` empty-state suite plus EmptyState public target metadata | Default, custom, disabled, and non-empty | Removing conditional empty behavior fails existing assertions; default EmptyState delegation remains source-inspected. | `audit:Table/anatomy` |-| FR9-FR11 | `Table.test.tsx`, `types.ts`, `BaseTable.tsx`, and `useBaseTablePlugins.ts`; `useTableColumnResize.test.tsx` "the handle never adds to its column header\'s name (AR1)" and `TableColumnResizeName.a11y.chromium.spec.ts` for the `overlay` slot\'s name | Built-in plus known and custom named plugins; every transform phase | Sequential composition, base-before-user behavior, transform application, and slot output have focused coverage; complete known-name sorting, phase order, exception continuation, and context nesting remain source-inspected. | `audit:Table/plugins` |-| FR12, PR1 | `Table.perf.test.tsx` plus `useBaseTablePlugins.ts` source inspection | Same plugin references, recreated record, and changed plugin value | Unchanged plugin values must preserve the resolved array and representative no-op row-update budgets; focused named-record identity coverage remains partial. | `audit:Table/performance` |-| FR13, PR3 | `Table.test.tsx`, `plugins/columnResize/useTableColumnResize.test.tsx`, `plugins/stickyColumns/useTableStickyColumns.test.tsx`, and `Table.stories.tsx` ResponsiveScroll play assertions | Width-less columns with empty, short, and long-token rows; mixed explicit widths; pinned columns; narrow and fitting containers | Removing the 60px floor, deriving it from row content, changing explicit width semantics, desynchronizing resize bounds or sticky offsets, or preventing the existing Scroll region from activating fails focused unit or real-browser geometry assertions. | `audit:Table/layout` |-| FR14 | `__tests__/TableRowGlide.a11y.browser.spec.ts` screenshot checks of the divider mid-glide, in pinned columns, and under an open detail panel; `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` for the divider an open panel carries | a theme with a custom divider colour; an app override of a row's border; both mid-glide and on a pinned cell; an open detail panel's divider under the same theme and override | a divider whose width, style or colour differs from the row's border, or that drops a theme or app override, fails | `audit:Table/theming` |-| FR15 | `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` and `__tests__/TableRowGlide.a11y.browser.spec.ts`: row expansion with and without `animatedLayout`, plus source inspection of the panel's entrance and its hide on close | open and close with the handle; without it; reduced motion under a coarse and a fine pointer; a glyph turn beside the glide; a `dividers="grid"` and a `dividers="columns"` table with the option | rows that jump with the handle in a table without column lines, a closing panel that animates or leaves its space empty before the rows arrive, a panel and rows on different motion, a glyph on its own timing beside the glide, travel under reduced motion, or any motion without the handle a table with column lines that glides or animates its panel, or one whose glyph does not keep its own turn, fails | `audit:Table/plugins` |-| Accessibility contract | `__tests__/Table.a11y.test.tsx` and `__tests__/Table.a11y.chromium.spec.ts` bind Table to the base Table contract (`internal/a11y-spec`), composing each module's contract only for the states rendered with that module: the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`) for the sorted state; `__tests__/TableScroll.a11y.chromium.spec.ts` keeps the Scroll region evidence | Labelled data-driven, sorted descending, composed RTL with row headers, and empty data | Losing the table role or declared name, row, header, or cell roles, or a part leaving its row or the table, fails the base binding; a missing or stale `aria-sort` fails the composed sort module contract. | `audit:Table/accessibility` |-| FR16-FR22 | Pending parent protocol, render-count, API-compile, lifecycle and browser tests plus the module verification maps | Canonical type/key collisions; first-party flat declarations and diagnostic full-render fallbacks; invalid/unknown modes; both owner orders; optional context arities; full/empty/loading/windowed data; pinned paint; native focus and no-op frames | A second key/offset/renderer, order-selected owner, full cell work before slicing, stale source/ref, empty-loading contradiction, or removed focus destination fails | `audit:Table/plugins` |-| Module backlink | `scripts/check-knowledge.mjs` | Active parent and colocated module record | A missing, duplicate, mis-parented, wrong-kind, misnamed, or undiscovered module record fails knowledge validation. | `audit:Table/modules` |-| Theming anatomy map | `scripts/check-knowledge.mjs`, `themingTargets.test.ts`, and CLI parent-aware target discovery tests | Canonical anatomy and eight current targets | Missing, extra, duplicated, prefixed, stale, or independently owned member mappings fail repository validation or discovery coverage. | `audit:Table/theming` |+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |+| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |+| FR1-FR3 | `Table.test.tsx` render, structure, fit/overflow transitions, children-mode, section, and target assertions | Fitting and inline-overflowing data-driven tables, empty data, and children composition | Removing Table, Scroll region, observed content box, conditional keyboard access, or effective-axis containment fails existing role, structure, state, class, style, or prop-forwarding assertions; Row and Cell are conditional on rendered data or caller composition. Evidence gap: FR2's column `header` rule (the `key` fallback only when `header` is omitted, `null`, or `undefined`, so `header: ''` renders a blank header) is source-inspected; no test passes `header: ''`. | `audit:Table/anatomy` |+| FR4 | CLI discovery and API target tests plus source inspection | Direct member docs and unfiltered/scoped target output | Duplicating a parent/member target or changing the canonical owner fails parent-aware discovery assertions; section target placement remains source-inspected. | `audit:Table/theming` |+| FR5 | `plugins/sortable/useTableSortable.test.tsx`; the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`, self-tested by `useTableSortable.a11y.test.tsx`), which the Table binding composes onto the base Table contract for its sorted state (`__tests__/Table.a11y.test.tsx`, `__tests__/Table.a11y.chromium.spec.ts`); plus source inspection; for the icon slot, a `useTableSortable.test.tsx` slot suite, a real-browser check that a larger glyph keeps the Sort control's and header row's height and that a hidden glyph leaves no gap, and the slot inventory test | Unsorted, ascending, descending, and multi-sort; the theme slot unset, a slot function, `null`, and a size request | Removing the Sort control, conditional priority, or ARIA state fails existing assertions. Removing the Sort indicator glyph does not currently fail a focused test; glyph presence and delegated Icon target placement remain source-inspected. For the icon slot, drawing the wrong fallback for a direction, ignoring the theme slot or its direction, letting `null` remove the control or its sorting, or a size request that grows the Sort control or the header row fails. | `audit:Table/anatomy` |+| FR6 | `plugins/selection/useTableSelection.test.tsx` | Select all, individual, disabled, and non-selectable | Removing header/body Selection controls or row selection state fails existing structure, label, interaction, and ARIA assertions; delegated CheckboxInput target placement remains source-inspected. | `audit:Table/anatomy` |+| FR7 | `plugins/rowExpansion/useTableRowExpansion.test.tsx` plus source inspection; for the icon slot, a `useTableRowExpansion.test.tsx` slot suite and the slot inventory test | Collapsed, expanded, and non-expandable rows; the theme slot unset, a slot function, `null`, and a size request | Removing the Expansion control, conditional detail panel, captured-count `colSpan`, or ARIA state fails existing assertions in the covered plugin order; later column transforms, delegated Icon target placement, and untargeted panel wrappers remain source-inspected. For the icon slot, ignoring the theme slot or its `expanded` state, dropping the turn, or letting `null` remove the control, its name, or its toggling fails. | `audit:Table/anatomy` |+| FR8 | `Table.test.tsx` empty-state suite plus EmptyState public target metadata | Default, custom, disabled, and non-empty | Removing conditional empty behavior fails existing assertions; default EmptyState delegation remains source-inspected. | `audit:Table/anatomy` |+| FR9-FR11 | `Table.test.tsx`, `types.ts`, `BaseTable.tsx`, and `useBaseTablePlugins.ts`; `useTableColumnResize.test.tsx` "the handle never adds to its column header\'s name (AR1)" and `TableColumnResizeName.a11y.chromium.spec.ts` for the `overlay` slot\'s name | Built-in plus known and custom named plugins; every transform phase | Sequential composition, base-before-user behavior, transform application, and slot output have focused coverage; complete known-name sorting, phase order, exception continuation, and context nesting remain source-inspected. | `audit:Table/plugins` |+| FR12, PR1 | `Table.perf.test.tsx` plus `useBaseTablePlugins.ts` source inspection | Same plugin references, recreated record, and changed plugin value | Unchanged plugin values must preserve the resolved array and representative no-op row-update budgets; focused named-record identity coverage remains partial. | `audit:Table/performance` |+| FR13, PR3 | `Table.test.tsx`, `plugins/columnResize/useTableColumnResize.test.tsx`, `plugins/stickyColumns/useTableStickyColumns.test.tsx`, and `Table.stories.tsx` ResponsiveScroll play assertions | Width-less columns with empty, short, and long-token rows; mixed explicit widths; pinned columns; narrow and fitting containers | Removing the 60px floor, deriving it from row content, changing explicit width semantics, desynchronizing resize bounds or sticky offsets, or preventing the existing Scroll region from activating fails focused unit or real-browser geometry assertions. | `audit:Table/layout` |+| FR14 | `__tests__/TableRowGlide.a11y.browser.spec.ts` screenshot checks of the divider mid-glide, in pinned columns, and under an open detail panel; `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` for the divider an open panel carries | a theme with a custom divider colour; an app override of a row's border; both mid-glide and on a pinned cell; an open detail panel's divider under the same theme and override | a divider whose width, style or colour differs from the row's border, or that drops a theme or app override, fails | `audit:Table/theming` |+| FR15 | `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` and `__tests__/TableRowGlide.a11y.browser.spec.ts`: row expansion with and without `animatedLayout`, plus source inspection of the panel's entrance and its hide on close | open and close with the handle; without it; reduced motion under a coarse and a fine pointer; a glyph turn beside the glide; a `dividers="grid"` and a `dividers="columns"` table with the option | rows that jump with the handle in a table without column lines, a closing panel that animates or leaves its space empty before the rows arrive, a panel and rows on different motion, a glyph on its own timing beside the glide, travel under reduced motion, or any motion without the handle a table with column lines that glides or animates its panel, or one whose glyph does not keep its own turn, fails | `audit:Table/plugins` |+| Accessibility contract | `__tests__/Table.a11y.test.tsx` and `__tests__/Table.a11y.chromium.spec.ts` bind Table to the base Table contract (`internal/a11y-spec`), composing each module's contract only for the states rendered with that module: the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`) for the sorted state; `__tests__/TableScroll.a11y.chromium.spec.ts` keeps the Scroll region evidence | Labelled data-driven, sorted descending, composed RTL with row headers, and empty data | Losing the table role or declared name, row, header, or cell roles, or a part leaving its row or the table, fails the base binding; a missing or stale `aria-sort` fails the composed sort module contract. | `audit:Table/accessibility` |+| FR16-FR22 | Pending parent protocol, render-count, API-compile, lifecycle and browser tests plus the module verification maps | Canonical type/key collisions; first-party flat declarations and diagnostic full-render fallbacks; invalid/unknown modes; both owner orders; optional context arities; full/empty/loading/windowed data; pinned paint; native focus and no-op frames | A second key/offset/renderer, order-selected owner, full cell work before slicing, stale source/ref, empty-loading contradiction, or removed focus destination fails | `audit:Table/plugins` |+| Module backlink | `scripts/check-knowledge.mjs` | Active parent and colocated module record | A missing, duplicate, mis-parented, wrong-kind, misnamed, or undiscovered module record fails knowledge validation. | `audit:Table/modules` |+| Theming anatomy map | `scripts/check-knowledge.mjs`, `themingTargets.test.ts`, and CLI parent-aware target discovery tests | Canonical anatomy and eight current targets | Missing, extra, duplicated, prefixed, stale, or independently owned member mappings fail repository validation or discovery coverage. | `audit:Table/theming` |## Decision logdiff --git a/docs/specs/components/Timestamp/Timestamp.spec.md b/docs/specs/components/Timestamp/Timestamp.spec.mdindex 662c3e919d..851cabecd3 100644--- a/docs/specs/components/Timestamp/Timestamp.spec.md+++ b/docs/specs/components/Timestamp/Timestamp.spec.md@@ -29,6 +29,7 @@ architecture:architecture:internationalization,architecture:public-component-api,architecture:react-component-runtime,+ architecture:icon-resolution-and-component-slots,]contributing: []system_specs: [spec:AST-009, spec:AST-013/FR12, spec:AST-085, spec:AST-111/FR18]@@ -38,15 +39,15 @@ system_specs: [spec:AST-009, spec:AST-013/FR12, spec:AST-085, spec:AST-111/FR18]## Contract at a glance-| Area | Contract |-| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Public contract | A `time` element for a `value` (Unix seconds, milliseconds, or ISO 8601) in one of twelve `format`s, with optional live updates, time-zone suffix, and a copyable hover card. |-| Behavior | Relative output carries the full absolute date as its default accessible name; relative output, or configured `tooltipEntries`, attach a keyboard-reachable hover card of copyable rows. |-| End-user impact | Readers see compact or exact times in their locale; screen-reader users hear the full date and time zone; keyboard users can open and copy the exact time. |-| Builder impact | Optional: set `calendar` on the `InternationalizationProvider` to write dates in another calendar. |-| Compatibility/readiness | No API or default changes. Without a provider calendar the output is unchanged; under one, date-bearing formats change calendar, and calendars that need `Temporal` fall back to Gregorian where it is missing (the `spec:AST-013` FR12 exception). A provider locale with a `-u-ca-` keyword keeps Gregorian dates (`spec:AST-111` DEC-2); set the provider's `calendar` to choose one. Three implementation gaps are listed under Current-state impact. |-| Review checks | Reject a relative timestamp without the full absolute name when the caller names nothing, a hover card without a tab stop, a change that makes more server markup depend on the server's zone, or a crash on an unparseable value. |-| Governing rules | `architecture:internationalization/INV4,INV8,INV10`; `spec:AST-111/FR18`; `spec:AST-013` FR12; `architecture:react-component-runtime/INV1,INV3,INV5`; `architecture:public-component-api/INV5,INV6,INV8`. |+| Area | Contract |+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | A `time` element for a `value` (Unix seconds, milliseconds, or ISO 8601) in one of twelve `format`s, with optional live updates, time-zone suffix, and a copyable hover card. |+| Behavior | Relative output carries the full absolute date as its default accessible name; relative output, or configured `tooltipEntries`, attach a keyboard-reachable hover card of copyable rows. |+| End-user impact | Readers see compact or exact times in their locale; screen-reader users hear the full date and time zone; keyboard users can open and copy the exact time. |+| Builder impact | Optional: set `calendar` on the `InternationalizationProvider` to write dates in another calendar. Optional: map the hover card's copy glyph through the `timestamp-copy` icon slot (FR10). |+| Compatibility/readiness | No prop or default changes; FR10 adds the opt-in `timestamp-copy` theme slot, which is current and awaits implementation. Without a provider calendar the output is unchanged; under one, date-bearing formats change calendar, and calendars that need `Temporal` fall back to Gregorian where it is missing (the `spec:AST-013` FR12 exception). A provider locale with a `-u-ca-` keyword keeps Gregorian dates (`spec:AST-111` DEC-2); set the provider's `calendar` to choose one. Three implementation gaps are listed under Current-state impact. |+| Review checks | Reject a relative timestamp without the full absolute name when the caller names nothing, a hover card without a tab stop, a change that makes more server markup depend on the server's zone, or a crash on an unparseable value. |+| Governing rules | `architecture:internationalization/INV4,INV8,INV10`; `spec:AST-111/FR18`; `spec:AST-013` FR12; `architecture:react-component-runtime/INV1,INV3,INV5`; `architecture:public-component-api/INV5,INV6,INV8`; `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8`. |This table is a review projection; the body below is authoritative.@@ -67,6 +68,8 @@ the exact time.choose one- Controlled/uncontrolled behavior: not applicable; the current clock isinternal state+- Additive theme surface (FR10): a theme may map the copy glyph through+ `componentIcons['timestamp-copy']`; with no entry, the glyph is unchanged.- Migration decision: noneConsumer migration instructions belong in consumer docs and release notes.@@ -121,17 +124,18 @@ Consumer migration instructions belong in consumer docs and release notes.## Behavioral and layout contract-| ID | Invariant | Basis |-| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |-| FR1 | Timestamp renders a Text element (default `type="supporting"`, `color="secondary"`, with `size` and `weight` passed through) carrying the `timestamp` target, which reflects the resolved format beside Text's type and color reflection; inside it an inline `time` element inherits the typography and carries the instant's ISO 8601 `datetime`. An unparseable value renders nothing and logs a development warning. | Current source and tests |-| FR2 | `auto` shows `relative` when the instant is within `autoThreshold` seconds of now (default seven days) and `date_time` otherwise. `relative` uses the locale's long relative phrase and `relative_short` its narrow phrase; a value a few seconds in the future reads as "now". Absolute formats use the shared instant formatter in the provider locale. The date-bearing formats (`date`, `date_long`, `date_weekday`, `date_time`, and the full date of FR5 and FR7) write the date in the calendar that the provider resolves (`spec:AST-111` FR2, FR5, FR18), which is Gregorian unless the application selects another; a locale's default calendar never applies, and `date_time` keeps its time of day. Each names the month and day that `component:Calendar` shows. `time`, the relative formats, `system_*`, and `unix_seconds` do not depend on the calendar. `system_*` formats are machine-readable Gregorian ISO, and `unix_seconds` is zone-independent. `isTimezoneShown` appends the zone abbreviation to `date_time` and `time` only. | Current source and tests |-| FR3 | Server markup does not depend on the server's time zone and hydrates without a mismatch. A format that needs the clock renders `date_time` in UTC and the Gregorian calendar with the zone shown until the client can read the clock; the client then shows the resolved format without committing the UTC placeholder. A calendar that needs `Temporal` hydrates without a mismatch only when the server and the browser resolve it the same way (the `spec:AST-013` FR12 exception). Implementation gap: absolute formats other than `unix_seconds` render in the host's time zone, so their server markup depends on the server's zone and hydrating it in another zone produces a text mismatch (Current-state impact). | Current source and tests |-| FR4 | With `isLive` and relative output, the clock refreshes every second under a minute old, every 30 seconds under an hour, every minute under a day, and every five minutes beyond; the timer is cleared on unmount or when the inputs change. Locale changes update the output live. | Current source and tests |-| FR5 | Relative output is named by the full absolute date and the long time-zone name unless a caller names the element; absolute output adds no name. A caller's explicit `aria-label` reaches the element (`architecture:public-component-api` INV5). | Current source and tests |-| FR6 | When `hasTooltip` is true and the output is relative or `tooltipEntries` is non-empty, a lazily loaded HoverCard named "Timestamp details" attaches above the timestamp, opening on hover and on keyboard focus; the `time` element gains `tabIndex={0}`. Otherwise no card renders and no tab stop is added. Focus placed on the timestamp stays there when the card attaches (`spec:AST-085` FR4). Implementation gap: while the card module loads, a fallback `time` with the tab stop renders, and attaching the card replaces it, so focus placed on it falls to the page body and no card opens (Current-state impact). | Current source and tests |-| FR7 | The card is a description list in a grid: an optional label column (present when any row has a label), the value column, and a trailing action column (present when any row is copyable). Without entries it has one copyable row with the full absolute time in the viewer's zone. Each configured entry is one row in the given order, rendered in its own time zone and format, read-only unless `isCopyable`. An unknown time zone does not crash. A description list holds only name-value groups (WCAG 2.2 1.3.1). Implementation gaps: once any row is copyable, every row carries an action-cell `div` inside its row group (empty on read-only rows), so the open card fails the `definition-list` structure check, and a card with no labelled rows, the default card included, renders each row as a lone `dd` with no `dt` (Current-state impact). | Current source and tests |-| FR8 | A copy button is a small ghost IconButton on the `timestamp-copy-button` target, named "Copy {value}" with a "Copy" tooltip; activating it writes the row's value to the clipboard, switches to a check icon and the "Copied" name and tooltip for 1.5 seconds, and announces "Copied" politely. A clipboard rejection does nothing. | Current source and tests |-| FR9 | `ref`, `data-testid`, and other supported DOM, ARIA, data, and event props reach the `time` element; `xstyle`, `className`, and `style` reach the Text wrapper. A caller `aria-labelledby` names the element in place of FR5's name. A caller's explicit `tabIndex` reaches the element (`architecture:public-component-api` INV5). | Current source and tests |+| ID | Invariant | Basis |+| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |+| FR1 | Timestamp renders a Text element (default `type="supporting"`, `color="secondary"`, with `size` and `weight` passed through) carrying the `timestamp` target, which reflects the resolved format beside Text's type and color reflection; inside it an inline `time` element inherits the typography and carries the instant's ISO 8601 `datetime`. An unparseable value renders nothing and logs a development warning. | Current source and tests |+| FR2 | `auto` shows `relative` when the instant is within `autoThreshold` seconds of now (default seven days) and `date_time` otherwise. `relative` uses the locale's long relative phrase and `relative_short` its narrow phrase; a value a few seconds in the future reads as "now". Absolute formats use the shared instant formatter in the provider locale. The date-bearing formats (`date`, `date_long`, `date_weekday`, `date_time`, and the full date of FR5 and FR7) write the date in the calendar that the provider resolves (`spec:AST-111` FR2, FR5, FR18), which is Gregorian unless the application selects another; a locale's default calendar never applies, and `date_time` keeps its time of day. Each names the month and day that `component:Calendar` shows. `time`, the relative formats, `system_*`, and `unix_seconds` do not depend on the calendar. `system_*` formats are machine-readable Gregorian ISO, and `unix_seconds` is zone-independent. `isTimezoneShown` appends the zone abbreviation to `date_time` and `time` only. | Current source and tests |+| FR3 | Server markup does not depend on the server's time zone and hydrates without a mismatch. A format that needs the clock renders `date_time` in UTC and the Gregorian calendar with the zone shown until the client can read the clock; the client then shows the resolved format without committing the UTC placeholder. A calendar that needs `Temporal` hydrates without a mismatch only when the server and the browser resolve it the same way (the `spec:AST-013` FR12 exception). Implementation gap: absolute formats other than `unix_seconds` render in the host's time zone, so their server markup depends on the server's zone and hydrating it in another zone produces a text mismatch (Current-state impact). | Current source and tests |+| FR4 | With `isLive` and relative output, the clock refreshes every second under a minute old, every 30 seconds under an hour, every minute under a day, and every five minutes beyond; the timer is cleared on unmount or when the inputs change. Locale changes update the output live. | Current source and tests |+| FR5 | Relative output is named by the full absolute date and the long time-zone name unless a caller names the element; absolute output adds no name. A caller's explicit `aria-label` reaches the element (`architecture:public-component-api` INV5). | Current source and tests |+| FR6 | When `hasTooltip` is true and the output is relative or `tooltipEntries` is non-empty, a lazily loaded HoverCard named "Timestamp details" attaches above the timestamp, opening on hover and on keyboard focus; the `time` element gains `tabIndex={0}`. Otherwise no card renders and no tab stop is added. Focus placed on the timestamp stays there when the card attaches (`spec:AST-085` FR4). Implementation gap: while the card module loads, a fallback `time` with the tab stop renders, and attaching the card replaces it, so focus placed on it falls to the page body and no card opens (Current-state impact). | Current source and tests |+| FR7 | The card is a description list in a grid: an optional label column (present when any row has a label), the value column, and a trailing action column (present when any row is copyable). Without entries it has one copyable row with the full absolute time in the viewer's zone. Each configured entry is one row in the given order, rendered in its own time zone and format, read-only unless `isCopyable`. An unknown time zone does not crash. A description list holds only name-value groups (WCAG 2.2 1.3.1). Implementation gaps: once any row is copyable, every row carries an action-cell `div` inside its row group (empty on read-only rows), so the open card fails the `definition-list` structure check, and a card with no labelled rows, the default card included, renders each row as a lone `dd` with no `dt` (Current-state impact). | Current source and tests |+| FR8 | A copy button is a small ghost IconButton on the `timestamp-copy-button` target, named "Copy {value}" with a "Copy" tooltip; activating it writes the row's value to the clipboard, switches to the copied glyph (`check` unless a theme maps `timestamp-copy`, FR10) and the "Copied" name and tooltip for 1.5 seconds, and announces "Copied" politely. A clipboard rejection does nothing. | Current source and tests |+| FR9 | `ref`, `data-testid`, and other supported DOM, ARIA, data, and event props reach the `time` element; `xstyle`, `className`, and `style` reach the Text wrapper. A caller `aria-labelledby` names the element in place of FR5's name. A caller's explicit `tabIndex` reaches the element (`architecture:public-component-api` INV5). | Current source and tests |+| FR10 | The copy button's glyph resolves through the `timestamp-copy` component icon slot, passing `{copied}`, which is true while the copied state (FR8) shows. With no theme entry, the glyph is `copy`, and `check` while copied. When the slot resolves to no icon (a theme value of `null`, a slot function that returns `null`, or a request with `icon: null`), only the glyph is hidden: the button keeps its size, name, tooltip, and copy behavior, and shows no glyph at rest or while copied. A request `size` changes only the glyph, never the button. | Proposal; `architecture:icon-resolution-and-component-slots/INV2,INV4–INV8` |### Allowed variation@@ -190,7 +194,7 @@ Consumer migration instructions belong in consumer docs and release notes.| Formatted text | The instant in compact or exact form, in supporting type by default. | Current source and docs | Prominent | FR1–FR5 || Hover card | A copyable card with the exact time or configured rows. | Current source and docs | Supporting | FR6, FR7, AR3 || Hover card row | An optional label beside one rendering of the instant. | Current source and docs | Supporting | FR7 |-| Copy button | Copies one row's value with brief confirmation. | Current source and docs | Supporting | FR8, AR4 |+| Copy button | Copies one row's value with brief confirmation. | Current source and docs | Supporting | FR8, FR10, AR4 |### Theming anatomy@@ -260,6 +264,7 @@ Consumer migration instructions belong in consumer docs and release notes.| FR6, AR3 | `Timestamp.test.tsx` keyboard-reachability suite | Relative, absolute, disabled, entries removed | A missing tab stop, `aria-expanded` on the trigger, or a stray tab stop fails. The aria-expanded test also pins `aria-haspopup` on the Text wrapper, which is current behavior, not contract. Gap: no test covers focus on the timestamp while the card module loads, or `aria-controls`. | `audit:Timestamp/a11y` || FR7, FR8, AR4 | `Timestamp.test.tsx` hover-card suites; `tooltipEntries.test.ts`; `useClipboard.test.tsx` | Default row, entries, copyable rows, unknown zone | A wrong row count or order, an unpaired label, a copy button on a read-only row, a wrong copied value, a missing copied state, or a missing announcement fails. Gap: no check runs the `definition-list` structure rule on the open card (the recorded gap); the grid columns and the 1.5-second reset have no automated check; `useClipboard.test.tsx` covers the clipboard-rejection no-op. The lone-`dd` rows of a label-less card are also unchecked. | `audit:Timestamp/behavior` || FR9 | `Timestamp.test.tsx` ref, test-id, and pass-through tests | Ref, test id, caller props | A ref, test id, or caller prop missing from the `time` element fails. A caller `tabIndex` replaced while a card is attached fails. Gap: no test asserts that `xstyle`, `className`, and `style` reach the Text wrapper, or covers a caller `aria-labelledby`. | `audit:Timestamp/behavior` |+| FR10 | `Timestamp.test.tsx` copy icon slot suite; the slot inventory test | No entry, a slot function in both states, `null`, a size request | The glyph ignores the slot or its state, `null` removes the button, its name, or its copy action, a size request resizes the button, or the consumer docs do not list the slot. | `audit:Timestamp/theming` || Theming anatomy map | `scripts/check-knowledge.mjs` | Consumer anatomy, targets, HoverCard delegate | Missing, extra, or stale mappings fail repository validation. | `audit:Timestamp/theming` || AR1 | `Timestamp.test.tsx` `datetime` tests | `date_time`; `date` | A missing or wrong ISO `datetime` on `date_time`, or a missing one on `date`, fails. Gap: no test asserts the exact `datetime` on relative or other absolute formats. | `audit:Timestamp/a11y` || AR2, AR4 | Accessibility-tree evidence (`spec:AST-009` FR3) | Relative output; copy buttons | Gap: no accessibility-tree check proves the computed name of relative output or the copy-button names; the unit tests query the DOM. | `audit:Timestamp/a11y` |