Repository navigation
feat(core): add typed direct-icon library adapters - #7222
rubyycheung wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
a49f229 to
fe71bc6
Compare
PR Analysis Report
|
There was a problem hiding this comment.
Thanks for the careful, well-documented draft — the opt-in design, atomic fallback to the supplied default, and preservation of ordinary direct icons and caller-owned props all read clearly.
Approval needs a maintainer spec decision first. Current Icon authority covers glyph source, size, color and accessibility, but does not yet establish a direct-icon adapter factory, its name/shape (including the optional output-key list), or its release lifecycle. Please have a maintainer provide or identify the governing spec for this addition and confirm how it should land with its stacked dependencies before this can be approved. No rewrite is being requested for that reason alone.
One additional item to address in parallel: the change is large for a single review (over two thousand authored lines, mostly tests and fixtures). Once the direction is settled, please either split independently reviewable parts or add a short justification showing why the production code, consumer harness and CLI bridge must land together.
No concrete break to ordinary icons, accessibility semantics or caller prop ownership was found in static review. The included tests were not rerun in this automated pass, so please rely on CI and owner verification for runtime confirmation.
[Automated review]
There was a problem hiding this comment.
Approval is on hold for a maintainer decision: createIconAdapter and its types are a new public Icon API that no current spec admits yet, so a maintainer needs to provide or identify the governing spec, settling whether the factory is adopted, its name and curried shape, the propNames default and which output keys a mapper may return, its stable or experimental lifecycle, and the landing order with the stacked capability-engine work. Independently of that decision, two items need changes:
- The shipped icons guide says a mapper cannot change color, accessibility or styles, but declared SVG attributes such as
fill,visibilityordisplaypass the allowlist and reach the rendered<svg>, so either describe the enforced boundary or reject those keys. - At 2,172 authored lines the change is over the 2,000-line review threshold, so once direction is settled please split independently reviewable parts (for example the CLI bridge or the consumer harness) or explain why they must land together.
[Automated review]
| }, | ||
| { | ||
| type: 'prose', | ||
| text: 'ProductIconImpl must support optional primitive glyphStyle and thickness props as well as SVGProps. The .js imports refer to the compiled modules. An adapter translates supported theme intent; it does not restructure the component or edit its SVG. For example, an Astryx duotone appearance maps only when the library exposes an equivalent variant such as weight="duotone"; the library still owns how the two tones are colored. If the library instead requires primaryColor and secondaryColor props, this adapter receives no theme color axis and must not invent those values. A mapper cannot change source selection, color, accessibility, events, refs, styles or children. Unsupported explicit appearance or weight warns once in development and points to createIconAdapter guidance; unsupported theme choices silently use the library default. Invalid mapping results safely render that default. Missing size support is normal fallback, not a warning. Consumer SVG, ref, event and styling props retain their normal precedence.', |
There was a problem hiding this comment.
This promises more than the adapter enforces: declared SVG attributes such as fill, stroke, opacity, visibility or display pass the propNames allowlist and reach the rendered <svg>, so a mapper can repaint the glyph or hide a labelled icon. Either describe the enforced boundary here (Icon- and caller-owned props are rejected; declared drawing attributes pass through as declared) or reject those keys in the allowlist.
| 'appearance', | ||
| 'weight', | ||
| ]); | ||
| function isAllowedPropName(name: string): boolean { |
There was a problem hiding this comment.
isAllowedPropName, like the public IconAdapterProps filter, rejects Icon- and caller-owned names but admits SVG presentation attributes (fill, stroke, opacity, visibility, display, transform, pointerEvents). If the guide's guarantee is intended, deny the paint, visibility and display keys here (keeping weight-style keys such as strokeWidth if libraries need them) and add a regression case; otherwise align the docs with this boundary.
AST-054 B — typed direct-icon library adapter
Draft only. Exact implementation head:
e3d22318b6a09eb6ccc07f83e15768ce1b7bf4ed; B aggregate range:f07f13744f42a139f1a78c75b5cfc6c91af12ca6..e3d22318b6a09eb6ccc07f83e15768ce1b7bf4ed(three B commits). The structural dependency is published A #7214 at that exact base. Canonical main snapshot and review authority:b3d9a89e578121493a60c276645d384acbf3bb41. The earlier WIP was checkpointed with known inference failures; this repaired stack is rebased onto the required code-only A head. No landing is performed here.User need
Library authors need a supplied direct icon to follow theme appearance or weight without replacing its SVG defaults, accessibility or native props. Ordinary SVG components intentionally remain fixed; application-specific wrappers otherwise repeat theme selection at every integration and can accidentally mix presentation with DOM ownership. One opt-in adapter maps a local supported request to declared primitive library props while preserving the supplied component when no supported intent exists.
Problem and solution fit
Current specification
Existing Icon/public API, theme compilation and size-cascade ownership remain the compatibility floor. The matched current global claims are retained in the canonical receipt below; routing does not grant authority beyond each listed claim.
Approval dependencies are #6891 and #7116, not structural bases. This code-only B delta edits no specification, architecture, family, design or other authority record. AST-054/public factory naming and shape, including the optional
propNamescandidate, remain subject to final owner/API/authority approval (OQ1). Local implementation direction, tests, publication of A and earlier reference code do not settle that approval. No on-tree current AST-054 record or normative promotion is claimed.Public delta and caller burden
The new operation is only
createIconAdapter, plus its necessary adapter types:IconAdapterProps<P>,IconAdapterRequest<C>andIconAdapterOptions<C, MapperProps, PropNames>. The curried factory binds a capability contract and mapper before wrapping the supplied component. OptionalpropNamesdeclares the mapper's output-key allowlist; its default is['appearance', 'weight']. A caller choosing other primitive library fields names them explicitly and must provide a component whose props accept those mapped keys and values plus the original SVG props, without required extra or mapped props that the no-intent default cannot supply.Discoverability is part of this PR. The Icon page now distinguishes semantic/registered artwork, fixed direct icons and direct icons that need theme presentation. The shipped icons guide adds a decision table, a one-time library-boundary integration example, unsupported-property fallback, duotone/color ownership, and explicit-versus-theme diagnostic behavior. An explicit appearance or weight on an ordinary direct icon warns once in development with
createIconAdapter()guidance; theme-only fallback stays quiet.Before,
<Icon icon={ProductIconImpl} />is an ordinary fixed direct SVG. After, a library can opt in once:Here
ProductIconImplsupports optional primitiveappearance/weightlibrary props alongside SVG props. Other library spellings use explicitpropNames; the two-module shipped guide shows that path and compiled.jsimports. Existing direct components need no migration.IconTyperemains exactlyComponentType<SVGProps<SVGSVGElement>>. Wrapper identity is stable. No supported intent—including an implicit standalone/context size alone—skips the mapper and renders the wrapped supplied default. An admitted locally supported explicit size or resolved appearance/weight may activate mapping; every mapped axis is narrowed to the adapter's local contract.sizefield is not a new geometric size axis. A's existing sizing/rem compatibility is unchanged.Released signatures remain:
renderIconSlotremains size/color-only; control-size unions and existing fixed artwork remain unchanged. No new provider, request transport or package subpath is introduced.Design and alternatives
Opt-in immutable local metadata is used instead of recognizing arbitrary components or installing capabilities globally. Declared output keys plus component typing are used instead of deriving erased prop types at runtime, invoking the mapper on empty intent or allowing arbitrary DOM props. Mapping retains exact primitive requests instead of synthesizing artwork or interpreting CSS font weight. These are draft implementation choices, not new authority decisions.
Evidence
Configured changed-source lint is reported separately from environment/runtime advisories. Known Node module-type/Vite placeholder-URL advisories, expected negative-test diagnostics, catalog fallback/CLDR notices and Neutral font/setup notes remain separate from configured source-lint findings. No warning-free execution, browser pixels, Node 24 confirmation or full CI is inferred from these focused checks. Source/program fixtures use fresh compiler hosts within package scope without source-path aliases; emitted checks use this B's fresh output, not A or integrated reference output.
Scope
byState,roleSizeOverrides, new slot API, Button change, component enrollment, inventory/conformance or mixed later-slice tutorials.Testing
From the repository root, with repository-pinned pnpm 11 and the installed workspace dependencies:
Scoped Core UI, using the actual branch UI configuration without its root build setup:
Native CLI reproduction below uses the already-built Core output. The recorded two processes ran in parallel; this loop runs the same configurations sequentially. No root config, user plugin/alias, setup file or build is requested. Existing fixture
ensureCoreBuiltguards found fresh output and did not rebuild in the recorded run.The focused Core UI lane uses
config:falsewith flattened actual branch plugins, aliases, environment and setup; no root globalSetup, nested inherited projects or temporary config. The native CLI fixture uses actual package imports from the completed owner-built B output and preserves build/check sentinels on rejection. Source-deletion proof retains the importable library while removing both original theme files; it is not an old integrated-suite substitute.All B source bytes were banked before the f07 restack and compared afterward: all 12 paths are unchanged. Final-head Core build, source/emitted consumers, UI, CLI native suites, docs and type checks use the repaired stack, not the earlier WIP output. The complete two-commit B aggregate is limited to those 12 paths; no authority record, manifest, lockfile or tracked build output changed. Normal hooks ran on the green repair before the byte-identical restack; final checks were repeated afterward.
Pending, not claimed complete: real-browser execution/rendered bounds/theme-switch/root-font matrix; Node 24 confirmation; broader cross-package/full CI and unrun expanded performance/parity coverage; final owner/API/authority approval and OQ1; later C–E work and OQ2. This is a coherent local draft boundary, not green-to-land authorization.
Writing rubric results
Not applicable to record edits: B changes no specification, architecture, family, design or other authority record. R1–R6 standing-record content is untouched; proposals, implementation choices and check receipts stay in this description rather than being written into current authority.
Canonical review receipt
The authority is the specified canonical main snapshot
b3d9a89e578121493a60c276645d384acbf3bb41, verified as the published code-only A dependency's canonical main merge-base and the final B main merge-base—not B's implementation parent or an integrated reference. Semantic triggers are accessibility, behavior, compatibility, component-slots, layout, public-api, testing and theming. Every matched record/claim/trigger/reason is retained below with canonical raw digest validation and lossless reconstruction; the direct owner still settles the exact public delta.Complete lossless receipt: 242 matches across 21 records
Exact receipt metadata:
{"schemaVersion": 1, "authorityCommit": "b3d9a89e578121493a60c276645d384acbf3bb41", "reviewHead": "fe71bc6c53ee35df5835423ec0bfa7c2d71b96ea", "requestedTriggers": ["accessibility", "behavior", "compatibility", "component-slots", "layout", "public-api", "testing", "theming"]}Each trigger@ordinal cell is one match; ordinals restore original order. Authority commit is shared above, path/digest once per record. Claim strings are JSON-quoted without content changes.
The exact match reason for every cell is:
Substitute that cell’s trigger and record/claim IDs. All original matches and reasons reconstruct exactly; all canonical record digests verify.
architecture:component-size-cascadePath:
docs/architecture/component-size-cascade.md; digest:a66fae4c1dd966500a2a2c3c1f345de7afe19c142a744e9eb32449ac8c451410.INV1[layout@1]: "The standard axis is shared."INV2[layout@2]: "Participation is explicit."INV3[layout@3]: "Explicit intent wins."INV4[layout@4]: "The nearest provider wins."INV5[layout@5]: "Local default is final."INV9[layout@6]: "Public, rendered, and visual size agree."architecture:component-test-sufficiencyPath:
docs/architecture/component-test-sufficiency.md; digest:2312a6256ab09360e04167e14f562aa6cebc34fbd7e6eba7c68cdf773679de66.INV1[testing@7]: "Authority and evidence are distinct."INV10[testing@8]: "Gaps and hardening are distinct."INV11[testing@9]: "New tests require a new proof obligation."INV2[testing@10]: "Critical promises have regression evidence."INV3[testing@11]: "Previously fixed behavior defects remain protected."INV4[testing@12]: "Partitions follow behavior and risk."INV5[testing@13]: "Assertions observe the contract."INV6[testing@14]: "Evidence is mutation-sensitive."INV7[testing@15]: "Coverage remains bounded and intentional."architecture:component-theming-surfacePath:
docs/architecture/component-theming-surface.md; digest:78928cd4356402a212c2c8d4d76a9a67bd0831e873e7e7cd0dbe777e12ec8597.INV10[theming@16]: "Public semantic variables are admitted, not inferred."INV12[theming@17]: "Aliases are compatibility, not anatomy."INV14[theming@18]: "Extensible axes need a theme-independent fallback."INV15[theming@19]: "Conditional styling does not create conditional API."INV3[theming@20]: "Anatomy does not imply target proliferation."INV4[theming@21]: "Targets paint."INV5[theming@22]: "Composition preserves ownership."INV6[theming@23]: "State stays on the owning target."INV7[theming@24]: "Guarantees use one catalog and exact target declarations."INV8[theming@25]: "Names imply nothing beyond themselves."INV9[theming@26]: "Generic styling is best effort."architecture:container-paddingPath:
docs/architecture/container-padding.md; digest:3e277a151e5184eebc1115cd0eda4212817e6c328495e34629aa967efb6360f5.INV1[layout@27]: "Internal geometry is not theme API."INV10[layout@28, public-api@34]: "The public vocabulary names intent."INV11[layout@29, public-api@35]: "Participation and host eligibility are explicit."INV3[layout@30, public-api@36]: "Bleed is opt-in and edge-specific."INV6[layout@31]: "Overlay boundaries terminate stale geometry."INV8[layout@32]: "Participation is explicit."INV9[layout@33, public-api@38]: "Edge compensation has two geometry owners, not shared tokens."INV7[public-api@37]: "Composition keeps component ownership."architecture:icon-resolution-and-component-slotsPath:
docs/architecture/icon-resolution-and-component-slots.md; digest:fb4160089d30a46465c988c357f0aa3cc02cfda92b47bc51b950151da595b81c.INV1[component-slots@39]: "Shared names and component roles are separate."INV10[component-slots@40]: "Existing keys coexist."INV2[component-slots@41]: "Slots are typed and owner-declared."INV3[component-slots@42]: "Slots map to shared meanings."INV6[component-slots@43]: "Resolution order is stable."INV7[component-slots@44]: "Component slots do not grow the shared name set."architecture:layer-runtimePath:
docs/architecture/layer-runtime.md; digest:f1330dd884a04ecd0505934f4ab9812ede8602baf35036876d6a149cebde6aca.INV11[layout@45]: "One viewport gutter."INV12[layout@46]: "The first frame is the settled frame."INV3[layout@47]: "Positioning modes do not leak."architecture:public-component-apiPath:
docs/architecture/public-component-api.md; digest:1cd2cc5d705ba8f94886794ae844dd5be86262261db276fad539074f3775f33c.INV1[public-api@48]: "Public exports are reachable."INV12[public-api@49]: "Reachability outranks internal labels."INV2[public-api@50]: "Names carry the same meaning."INV3[public-api@51]: "One prop controls one independent concept."INV4[public-api@52]: "New props express caller-owned intent."INV5[public-api@53]: "Accepted consumer props are preserved."INV6[public-api@54]: "Styling inputs combine."INV7[public-api@55]: "Event handlers compose deliberately."INV8[public-api@56]: "Refs follow React 19."INV9[public-api@57]: "Released APIs change deliberately."architecture:theme-applicationPath:
docs/architecture/theme-application.md; digest:77631b8bd5cf5aa74f6ea402a403d5e49dcd3f454cd418c61b0aabbdcf0cc3e2.INV1[theming@58]: "The nearest provider wins."INV2[theming@59]: "Only the root provider changes<html>."INV3[theming@60]: "Detached consumers share one root-theme store."INV7[theming@61]: "System mode follows the platform."INV8[theming@62]: "Media surfaces do not replace the theme."INV9[theming@63]: "Application does not change compiled rules."architecture:theme-authoring-contractPath:
docs/architecture/theme-authoring-contract.md; digest:09b609519bc2acb4a22a0f0cbcf43da7e8ba6e67c7327f5381797bfe2e29710b.INV1[theming@64]: "One input produces one normalized theme."INV11[theming@65]: "defineThemevalidates only what it constructs."INV12[theming@66]: "Themedefine*helpers construct theme values."INV3[theming@67]: "Extension is semantically flattened."INV8[theming@68]: "Local-token enrollment is explicit and owner-tracked."INV9[theming@69]: "Authoring and output are separate systems."architecture:theme-compilationPath:
docs/architecture/theme-compilation.md; digest:623dcf810adda23681bcff3c2cfd39a25d2bce8e8301ddb7436d11372ad57b2f.INV10[theming@70]: "Shared intent keeps the same meaning."INV2[theming@71]: "Web has one compiler."INV3[theming@72]: "Mounting and saving do not change the rules."INV4[theming@73]: "Web uses one cascade contract."INV6[theming@74]: "Private variables stay private."INV9[theming@75]: "Platform details stay out of shared authoring."spec:AST-002Path:
docs/specs/AST-002/spec.md; digest:cf7c14cf5f607a2a224044ffa835fd207dd4d5ebe00a8958581e4b9d41d7243c.DEC-1[public-api@76]: "Public props require a non-derivable caller distinction"DEC-2[public-api@77]: "Caller need does not admit an unclear or unenforceable API"DEC-3[public-api@78]: "One semantic action uses one canonical operation name"DEC-6[public-api@79]: "Public inputs keep one semantic responsibility"DEC-7[public-api@80]: "Public module and utility verbs disclose atomic roles"DEC-8[public-api@81]: "Public primitives are intentional semantic contracts"FR15[public-api@82]: "Invalid states are prevented where practical."FR4[public-api@83]: "Existing composition and styling seams come first."spec:AST-009Path:
docs/specs/AST-009/spec.md; digest:d779066d710ce499c8c124bfdc734b4b38e8cc207cfe75bf5a31cb3bba349a2f.FR1[accessibility@84]: "The gate follows the claimed user outcome. Real AT/browser evidence is required only when the intended outcome depends on AT-specific behavior: how AT exposes or announces focus, AT-specific focus order, spoken/braille output, browse or virtual-cursor behavior, mode changes, or a known AT/browser divergence. A semantic code change or focus-only browser behavior is not the trigger; the trigger is an AT-dependent claim that cannot be proved below the real-AT layer."FR10[accessibility@85]: "The tested state is the claimed state. Evidence exercises the transition or state that carries the user outcome, such as opening the surface, moving focus, producing the status update, dismissing and restoring focus, or entering with the virtual cursor. A static baseline that merely contains the component is insufficient."FR11[accessibility@86]: "Real means the shipping pairing. A real-AT check runs the named assistive technology against the named shipping browser on its supported operating system. A virtual machine, remote machine, or simulator is acceptable only when it runs that actual pairing and preserves the input/mode under test. A DOM emulator, accessibility snapshot, synthetic speech stub, or browser engine standing in for a branded browser is not real-AT evidence."FR12[accessibility@87]: "Desktop-neutral AT-specific focus exposure/order or announcement claims use two independent stacks: at least NVDA + Chrome on Windows and VoiceOver + Safari on macOS. A platform-specific claim uses its matching pairing only unless FR14 expands it."FR13[accessibility@88]: "Mobile claims use a matching mobile stack. A mobile or touch/virtual-cursor outcome uses at least one matching mobile pairing. Both iOS and Android are required only when the claim covers both and platform-specific code, behavior, or recorded evidence gives reason to expect different outcomes."FR14[accessibility@89]: "Divergence expands rather than replaces. Every side named in a known divergence is included even when that adds a pairing beyond FR12 or FR13."FR15[accessibility@90]: "Versions and modes are part of the matrix. The receipt names OS, AT, browser, input mode, and material settings or verbosity that affect the result. “Screen reader checked” or a browser name without its AT is not a matrix."FR16[accessibility@91]: "Representative does not mean exhaustive. Passing the selected matrix supports only the recorded outcome and pairings. It does not claim every AT, browser, verbosity setting, locale, or input method behaves identically."FR2[accessibility@92]: "Focus changes trigger only for AT-specific outcomes. Real AT/browser verification is required when the claim depends on how AT exposes, announces, or orders programmatic, initial, restored, composite, or after-dismissal focus. Focus destination, order, return, keyboard operation, focus-ring styling, a refactor preserving the same browser focus target, or a statictabIndexcorrection does not trigger by itself. The owning component and interaction-modality record define those browser and visual behaviors."FR3[accessibility@93]: "Role, name, and description changes trigger when announcement or mode is the outcome. A computed role, accessible name, or description may be proved by accessibility-tree evidence when the claim ends at browser exposure. Real AT/browser verification is additionally required when the change relies on that semantic being announced during entry or a state transition, changing interaction/browse mode, or resolving a known AT/browser divergence."FR4[accessibility@94]: "Announcement content and timing trigger directly. A live region, status message, alert, validation announcement, loading/completion transition, or other spoken/braille update requires real AT/browser evidence when success depends on what is announced, its order, when it occurs, whether it repeats, or whether it is skipped."FR5[accessibility@95]: "Virtual-cursor entry triggers directly. Opening, navigation, or focus behavior requires real AT/browser evidence when success depends on where screen-reader browse or virtual cursor enters, whether content is discoverable from that entry point, or whether the user can move between browse and interaction modes. Ordinary keyboard Tab order with no browse-mode claim does not trigger this requirement."FR6[accessibility@96]: "Known divergence keeps the gate active. A changed pattern with a recorded AT/browser divergence requires checks for every named side of that divergence until an owner records that the divergence no longer applies. A passing result from one side does not stand in for another known to differ."FR7[accessibility@97]: "Untriggered changes use proportionate evidence. Static semantics, keyboard behavior, color/contrast, target size, source order, and similar accessibility changes use the least expensive evidence layer that directly proves the claim. They do not acquire a real-AT gate merely because they are accessibility work."FR9[accessibility@98]: "Evidence composes by claim. A triggered change normally keeps its lower-layer evidence and adds real AT/browser checks only for claims those checks can prove. Real AT observation MUST NOT replace deterministic regression coverage for behavior the lower layers own."spec:AST-012Path:
docs/specs/AST-012/spec.md; digest:f06af20e9991a664c47c81e62d38965ac15ce9cf08e77b2db1c9c5c268e373ce.FR4[theming@99]: "Rules use the theme value contract."FR5[theming@100]: "Media surfaces remain more specific."FR6[theming@101]: "Rule order determines precedence."FR7[theming@102]: "Theme extension preserves cascade order."spec:AST-017Path:
docs/specs/AST-017/spec.md; digest:1cc3879298f7a9db0dec9ab7af88aadd9bc2c922a5628bdc3e3d5f13ddadb32b.DEC-1[compatibility@103]: "Breaking means a released consumer must change"DEC-10[compatibility@104]: "Replacement-first records own deprecation and cleanup"DEC-11[compatibility@105]: "Behavior-correcting incompatibility is not an ordinary fix"DEC-12[compatibility@106]: "The paired minor admits only three delta classes"DEC-13[compatibility@107]: "Cadence guides planning; readiness and authority gate the cut"DEC-14[compatibility@108]: "Documentation catalog display names and routes are mutable data"DEC-15[compatibility@109]: "A minor is scheduled before its breaking work lands"DEC-16[compatibility@110]: "Deprecation acts at authoring surfaces, not production runtime"DEC-5[compatibility@111]: "Supported CLI behavior is never hidden"DEC-6[compatibility@112]: "Global CLI controls prove global value"DEC-7[compatibility@113]: "Cross-cutting controls are complete, observable, and per invocation"DEC-8[compatibility@114]: "Configuration is a last resort, and contributions compose"DEC-9[compatibility@115]: "Existing stable components incubate APIs behind one explicit boundary"FR12[compatibility@116]: "Supported inter-package ranges are contracts."FR14[compatibility@117]: "No supported CLI behavior is hidden."FR15[compatibility@118]: "Global controls require CLI-wide value and semantics."FR16[compatibility@119]: "Cross-cutting guarantees define and close their boundary."FR17[compatibility@120]: "Suppressed work is observable."FR18[compatibility@121]: "Programmatic controls are explicit and invocation-scoped."FR19[compatibility@122]: "Configuration is admitted only on evidence."FR20[compatibility@123]: "Integration contributions compose predictably and visibly."FR21[compatibility@124]: "Experimental APIs are explicit and opt-in before publication."FR22[compatibility@125]: "Experimental changes are patch-level and stay confined."FR23[compatibility@126]: "Promotion creates a stable contract deliberately."FR24[compatibility@127]: "Experimental status is verified per public surface."FR25[compatibility@128]: "Stable Core and every published stable package default to compatibility."FR26[compatibility@129]: "Public lifecycle state is explicit."FR27[compatibility@130]: "Experimental isolation covers every surface kind."FR28[compatibility@131]: "Deprecation is replacement-first, actionable, and machine-readable."FR29[compatibility@132]: "Deprecation adds no production-runtime behavior."FR29a[compatibility@133]: "Warnings live at the earliest accurate authoring surface."FR29b[compatibility@134]: "Guidance teaches one modern path."FR29c[compatibility@135]: "Modernization is safe and verifiable."FR29d[compatibility@136]: "Each public surface projects the lifecycle without inventing another one."FR3[compatibility@137]: "Released contracts include behavior, not only types."FR30[compatibility@138]: "Deprecation minima come only from direct authority."FR31[compatibility@139]: "Cleanup is one-to-one with approved ids and proven modernization."FR32[compatibility@140]: "Behavior-correcting incompatibility is a distinct classification."FR33[compatibility@141]: "Incompatible-fix evidence and approval are complete."FR34[compatibility@142]: "Incompatible fixes use a corrective lifecycle."FR35[compatibility@143]: "Emergency correction is narrow and never relabeled as a patch."FR36[compatibility@144]: "Minor frequency is planning guidance, not eligibility."FR37[compatibility@145]: "Every minor has an owner-approved public plan and freeze."FR38[compatibility@146]: "The final patch is the paired minor's locked baseline."FR39[compatibility@147]: "Every final-patch-to-minor delta has exactly one class."FR4[compatibility@148]: "Preserved old usage is nonbreaking."FR40[compatibility@149]: "Compatible fixes may be disclosed separately in the minor."FR41[compatibility@150]: "Records use closed schemas."FR42[compatibility@151]: "Contributors declare compatibility intent once."FR43[compatibility@152]: "CI validates semantics, not labels."FR44[compatibility@153]: "Exact-main release gates and rollback preserve one identity."FR45[compatibility@154]: "Documentation catalog display names and routes are mutable data."FR46[compatibility@155]: "Main targets a patch by default."FR47[compatibility@156]: "A minor is scheduled explicitly, by an owner, before its work lands."FR48[compatibility@157]: "While main targets a patch, incompatible work is refused."FR49[compatibility@158]: "The schedule fails closed."FR5[compatibility@159]: "Additive and victim-free contract restorations are nonbreaking."FR50[compatibility@160]: "Returning to a patch target is ordinary cleanup."spec:AST-020Path:
docs/specs/AST-020/spec.md; digest:07e607f636b6243057d510d11bef4385e77e9644e16a1f61ad9a1b5af8489dba.FR1[accessibility@161]: "WCAG 2.2 A and AA are the conformance baseline."FR2[accessibility@162]: "APG defines an adopted widget pattern, not universal conformance."FR6[accessibility@163]: "Evidence layers keep distinct proof boundaries."spec:AST-030Path:
docs/specs/AST-030/spec.md; digest:1fc6ffc51f3d19e7877d6d88157d717dcf157ffc64e77b58781f94605cf12925.FR11[testing@164]: "Each surface owns one test and applicable build lane."FR7[testing@165]: "Required check names remain stable."spec:AST-055Path:
docs/specs/AST-055-caller-rendered-trigger/spec.md; digest:e40db994f7de57d27adf6a148460a169625bc605b437570c2af957808713acc9.AR1[accessibility@166]: "The caller's control carries the disclosure."AR2[accessibility@167]: "One interactive element, one focus ring."AR3[accessibility@168]: "Focus returns to the control."AR4[accessibility@169]: "Every supported configuration keeps a complete keyboard path."DEC-1[public-api@170]: "A caller-supplied overlay control is a render prop"DEC-4[public-api@171]: "Hook trigger props are a different convention"FR1[public-api@172]: "A component that lets a caller supply the control which opens its overlay MUST take that control as a render prop namedrenderTrigger(DEC-5): a function the component calls with one props object, whose returned element the component renders as given. The component MUST NOT wrap the returned element in an element of its own, and MUST NOT require a particular tag or a particular Astryx component."FR2[public-api@173]: "Spreading the handed-back props onto one element MUST be the whole integration. The object MUST carry the ref or anchor the overlay positions against, theidAR1 needs, every handler that opens, toggles, and closes the overlay from that control on the component's supported input paths, and the disclosure attributes of AR1. The object's type MUST be exported from the component's public entry point."FR3[public-api@174]: "A caller-supplied control MUST NOT be taken as aReactNodeslot that the component renders inside an interactive element of its own. Callers routinely pass an interactive component, and that shape nests one interactive element inside another (AR2). A content slot rendered inside a component-owned control remains valid for non-interactive content and is unchanged."FR7[public-api@175]: "Where a component offers both a built-in control and this prop, exactly one control MUST render. The caller's control MUST win, identically in every presentation the component supports, and a development warning MUST fire; the component's own chrome for the replaced control MUST NOT render. Silently ignoring a supplied prop, or rendering both, is rejected."FR8[public-api@176]: "A hook that returns props for a trigger —triggerPropsandgetTriggerPropsonuseLightbox,usePopover,useMenuHover, anduseHoverCard— follows hook conventions and is unchanged by this record. Those return-value names are NOT precedent for a component prop's name or shape. This record does not require a hook to grow a render prop, nor a component to republish its trigger props as a hook return."spec:AST-056Path:
docs/specs/AST-056-search-prop-shape/spec.md; digest:d308f4bde211ce082c0eccd1fdc2c4d85a3a40fecb78db893a8d1dc7fb579b1f.AR1[accessibility@177]: "The empty-result message reaches assistive technology as written."AR2[accessibility@178]: "The query input has an accessible name that is not its placeholder."FR7[compatibility@179, public-api@190]: "Every prop this record renames is a released public surface with a victim, so it MUST followspec:AST-017FR28–FR31: the replacement ships first, old usage stays equivalent through the overlap, each old prop gets aDEP-*id and a distinctCLN-*id, and removal happens only in a minor whose frozen manifest carries both. While both exist, a component given both MUST resolve to the new prop and MUST fire a development warning."DEC-1[public-api@180]: "One name and one type for "the query matched nothing""DEC-2[public-api@181]: "Nosearchconfiguration object"DEC-3[public-api@182]: "A query-only capability is enabled by a boolean and reported through the existing change callback"DEC-4[public-api@183]: "The vocabulary is fixed; new capabilities join it"FR1[public-api@184]: "One observable state has one prop name and one type across every component with a typed query. "The query matched nothing" isemptySearchText, acceptingReactNode.emptySearchResultsTextresolves to it and itsstringtyping is widened, so a caller may pass an element. No component may name or type this state differently."FR2[public-api@185]: ""The query matched nothing" and "the component was given no choices at all" are different states and MUST stay separately expressible under distinct names:emptySearchTextandemptyText.SelectorandMultiSelectoralready declare both, so neither name may absorb the other, and a component offering only one MUST still use the name that matches the state it means."FR3[public-api@186]: "Whatever a caller supplies for an empty state MUST reach the person operating the component, visually and non-visually alike. A component that announces this state MUST announce what it rendered. Announcing a built-in default while rendering the caller's element is a defect, not a fallback."FR4[public-api@187]: "Who resolves the query is settled by who owns the choices, and is not restated per component. A component that holds its own choice set resolves the query itself, matching case-insensitively on each choice's displayed label at minimum, and exposes a boolean to turn the query input on. A component whose presented choices ARE the query's result takes a requiredsearchSource. Both kinds reach the same observable states: a narrowed list, an empty result, andemptyText."FR5[public-api@188]: "A capability that cannot function without a typed query MUST have exactly one switch, and MUST report through the component's primary change callback with a descriptor naming the kind of change, rather than through a handler prop of its own. A caller MUST NOT be able to express a configuration that renders nothing and reports nothing, whichhasCreate && hasSearch && onCreate != nullpermits whenever any one piece is missing. Enabling it on a component with no query input MUST warn in development rather than fail silently."FR6[public-api@189]: "A new search-related capability is admitted underspec:AST-002against this record, or not at all. A new top-level prop whose name carries the wordsearchMUST name the state or capability it governs in the vocabulary this record fixes, and MUST NOT introduce a second name for a state one of these props already expresses."spec:AST-057Path:
docs/specs/AST-057-row-actions/spec.md; digest:1e1dff68e3a59c8c6ada5f8348e36647a4aa3c497f3baf645746047a5a5d0be0.AR1[accessibility@191]: "The panel is real while resting and absent while closed."AR2[accessibility@192]: "The gesture touches nothing on a pointer that can hover."AR3[accessibility@193]: "The row's primary stays one tab stop."DEC-2[behavior@194]: "Rest is the default; commit is a caller choice for one verb"DEC-5[behavior@195]: "The root translates and the panels counter-translate; no element is added"FR4[behavior@196]: "A sideways drag on a coarse pointer MUST move the row and uncover the side's panel, showing each entry'slabelandiconas a filled surface in itsvariant's colour; the panel MUST NOT be visible at rest, by any pixel."FR5[behavior@197]: "Underreveal, a release past the panel's width MUST leave the row resting open with every entry tappable, and a drag past the commit point or a fling MUST fire the outermost entry and no other. Undercommit, a release past the commit point or a fling MUST slide the row out and fire the outermost entry; nothing MUST rest. After any entry fires, under either model, the row MUST spring back unless the entry hashasRemoval, in which case it MUST hold out at the edge it travelled toward. That bit is the only thing an entry declares about the row; the component MUST NOT wait on, observe, or act on what the caller does next, and MUST NOT warn if a held-out row is never removed. A release short of the threshold MUST spring back under both models.onActivateMUST fire at activation and may return a Promise."FR6[behavior@198]: "The drag MUST decide its axis once, early, and a mostly vertical drag MUST stay the scroller's. A mouse MUST NOT start the drag. The click the browser synthesizes after a drag MUST NOT fire the row's primary action."FR7[behavior@199]: "A resting row MUST close on a pointer landing anywhere outside it, on Escape with focus inside it, on firing an entry, and on unmount. Because a drag on a neighbour is a pointer outside it, at most one row rests open at a time without any shared state."FR8[behavior@200]: "Directions MUST be logical:trailingis uncovered by a drag toward the inline start and sits at the inline end;leadingthe reverse; so the finger, the uncovered edge, and the panel agree under RTL."DEC-1[public-api@201]: "Swipe actions are declared as data"DEC-3[public-api@202]: "The capability isItem's; where it is available follows the row's role"DEC-4[public-api@203]: "No hover reveal"DEC-6[public-api@204]: "The verb variant set isneutral | accent | destructive, minted knowingly"FR1[public-api@205]: "ItemMUST take its swipe actions asswipeActions: {leading?: ItemSwipeAction[]; trailing?: ItemSwipeAction[]}, whereItemSwipeActionis `{id?, label: string, icon?: ReactNode, onActivate, isDisabled?, variant?: 'neutral' \"FR2[public-api@206]: "ItemMUST render each side's panel from its entries into an out-of-flow position on its existing root and MUST add no element to the row for it. The gesture MUST drive the row's travel by writing a custom property on the root; the root's transform MUST read it and each panel's transform its negation."FR3[public-api@207]: "swipeBehaviorMUST be one enum with the closed valuesrevealandcommit, defaultreveal.commitwith more than one entry on a side MUST warn in development, because the other entries have no touch path."FR9[public-api@208]: "The element containing swipe-capable rows MUST clip in the inline axis withoverflow-inline: clip, neverhidden.ListMUST set it;Item's consumer documentation MUST state the obligation for any other host."spec:AST-058Path:
docs/specs/AST-058-option-actions/spec.md; digest:c6b62f16eff00ba153ab0d7c2861d8f4b82766fc2c436e7f8ff9c72c24e8ef0c.AR1[accessibility@209]: "The tree is valid in both modes."AR2[accessibility@210]: "Names stay separate."AR3[accessibility@211]: "Every modality reaches the action."AR4[accessibility@212]: "Selection semantics are unchanged."DEC-2[accessibility@213]: "The host is a grid once an option carries an action"DEC-3[accessibility@214]: "Two fixed cells per row"FR3[behavior@215]: "In a grid, each option is onerole=\"row\"carrying the option's id,aria-selected, andaria-disabled, with exactly twogridcellchildren for every row: the first holds everything the option renders today — selection mark or checkbox, icon, label, description,renderOptionoutput — and the second holds itsactionnode, empty when it declares none. Rows the component mints (select-all, a create row) are rows of the same shape with an empty action cell. No row has one cell or three."FR4[behavior@216]: "Activating an action runs the caller's own handler and nothing else: the selection does not change, the highlighted row does not change on its account, and the panel neither closes nor re-filters. Pressing the option cell selects or toggles exactly as it does today. An option'sdisabledgoverns its selection only; whether an action is disabled is the caller's control's own state, and the host does not read it."FR5[behavior@217]: "Up and Down move the highlight between rows as today, landing on the option cell; the inline-end arrow moves it from the option cell to the row's action cell, and the inline-start arrow moves it back, so the keys follow visual direction under RTL. Enter or Space on the option cell selects as today; Enter or Space on the action cell activates the control there. Typing to jump, Home, End, PageUp, PageDown, Escape and Tab keep their current meanings. No action control is in the sequential tab order."FR6[behavior@218]: "aria-activedescendanton the element that holds focus — the trigger, the search input, or the bottom-sheet panel — references the row while the highlight is on the option cell, and the action's control while it is on the action cell. It never references an element the person cannot act on."FR7[behavior@219]: "In a grid, a section is arowgroupnamed by its title, with its heading hidden as today. Dividers and the "nothing matched" message stay out of the accessibility tree, asSelectorandMultiSelectoralready keep them;BaseTypeahead's message, anoptiontoday, becomes presentational in every mode and is announced asspec:AST-056AR1 requires. The popover and the bottom sheet render the same tree."FR8[behavior@220]: "An action is visible at rest on every input and every pointer type. The host places the caller's control in the action cell with the cell's size and alignment and paints nothing of its own over it. Nothing is revealed on hover, focus, or swipe."DEC-1[public-api@221]: "The action is one node on the option, because the host only places it"DEC-4[public-api@222]: "One key, one type, both option vocabularies; the typeahead family adopts through its one panel"DEC-5[public-api@223]: "The grid is conditional: detection reads the declared options and latches"FR1[public-api@224]: "An option carries its secondary control asaction?: ReactNode, one node. The key has the same name and the same type onSelectorOptionDataand onSearchableItem. The caller renders the control and owns its name, its handler, its disabled state, and its appearance; a caller with several verbs renders one menu trigger whose popup owns the rest. The host renders the node where FR3 says and MUST NOT inspect, clone, or wrap it to decide anything; checking that it is present (FR2) is not inspection. No host-owned type or component for an action exists."FR2[public-api@225]: "A popup is a listbox until a render in which any declared option — at any depth of sections, before any query filters it — carries anactionthat is notnullorundefined; from that render it is a grid and stays a grid while the component is mounted. The control that owns the popup advertises the role in force througharia-haspopup(grid; the bottom sheet keepsdialog). A popup whose role followed the filtered view, or switched back, is a defect."FR9[public-api@226]: "Selector,MultiSelector,Typeahead, andTokenizeradopt this contract; the last two through the one panelBaseTypeaheadrenders. A host that renders either option vocabulary in a listbox it owns and has not adopted MUST NOT render the action inside the option; until it adopts, it renders the option without the action and warns in development when an item carries one."spec:AST-059Path:
docs/specs/AST-059-layer-viewport-inset/spec.md; digest:f638794dcd66ae5bd6dd206540a5efaf84dcf805e5ccc4e99b3375aa2f8e7b35.FR2[behavior@227, layout@234]: "The cap is the viewport, never the span."FR4[behavior@228, layout@236]: "One fallback order."FR5[behavior@229, layout@237]: "An off-screen anchor holds."FR7[behavior@230]: "Consumers inherit; a consumer's own size rule cannot defeat the cap."FR8[behavior@231, layout@239]: "The first frame is the settled frame."DEC-2[layout@232]: "A content-sized layer wraps if it can and moves if it cannot"FR1[layout@233]: "One gutter."FR3[layout@235]: "Placement-axis cap."FR6[layout@238, public-api@242]: "The app declares a floating bar once, onLayerProvider."DEC-4[public-api@240]: "An app's floating bar is app state, not a theme value"DEC-5[public-api@241]: "One declaration serves toasts and anchored layers; zero is the default"