Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions docs/architecture/component-style-authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ verified_by:
internal/eslint-plugin-astryx/no-stylex-null-override.test.mjs,
internal/eslint-plugin-astryx/no-style-only-wrapper.test.mjs,
]
deciding_specs: [spec:AST-080/DEC-4, spec:AST-017/DEC-26, spec:AST-017/DEC-29]
deciding_specs:
[
spec:AST-080/DEC-4,
spec:AST-080/DEC-5,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ## Deciding specs section (line 279) still credits INV6 to DEC-4 alone. A line for DEC-5 there would tell its readers that the lazy-loading remedy was replaced.

spec:AST-017/DEC-26,
spec:AST-017/DEC-29,
]
---

# Component style authoring architecture
Expand Down Expand Up @@ -101,9 +107,10 @@ not evidence of conformance or violation.
in, including its transitive modules, and that component's gzip CSS delta in
its package stylesheet (`spec:AST-080` FR8). A feature that runs only on a
coarse pointer and adds more than 2 KB gzip of JavaScript or 1 KB gzip of CSS
to one component is flagged. Its pull request either loads that JavaScript
lazily, only when a coarse pointer needs it, so the component's import does
not carry it, or justifies the cost. For flagged CSS, its pull request
to one component is flagged. Its pull request either takes that JavaScript
from the shared internal touch modules (`architecture:react-component-runtime`
INV13), which a page carries once however many components use them, or
justifies the cost. For flagged CSS, its pull request
justifies the cost, because that CSS stays in the package stylesheet
(`spec:AST-080` FR1, FR8). Sizes are gzip at the default compression level,
and 1 KB is 1,024 bytes; measured as `spec:AST-080` FR8 measures CSS, a
Expand Down Expand Up @@ -274,6 +281,8 @@ before assigning a verdict.
- `spec:AST-080/DEC-4` — every pull request reports component JavaScript and
CSS size; touch-only JavaScript over 2 KB or CSS over 1 KB is flagged, and
shared value tables ship only the rows a component uses (INV6).
- `spec:AST-080/DEC-5` — touch primitives come from the shared internal touch
modules, or the cost is justified; no component lazy-loads its own (INV6).
- `spec:AST-017/DEC-26` — components are built from minimal DOM, with two
budgets and an owner-recorded exception path; reducing DOM is compatible
(INV7).
Expand Down
7 changes: 5 additions & 2 deletions docs/architecture/public-component-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ guidance owns the process used to propose and test APIs.
return, utility signature, default, or operation reachable from a supported
package path is public even when its source comment, filename, or current use
calls it internal. Privacy requires removing the export or moving the capability
behind a non-exported boundary.
behind a non-exported boundary. Core's `./internal/*` subpaths are the one
exception: reachable, but reserved for Core and Lab, undocumented, versioned
in lockstep with Core, limited by lint to those two packages, and outside
the compatibility promise (`spec:AST-017` FR21).
- **INV13 — Public deltas route to their authority owner.** Every public API update
and every public behavior change follows the result and disposition defined by
`architecture:knowledge-contracts`. Tests, a Changeset, or a generated manifest
Expand Down Expand Up @@ -271,7 +274,7 @@ copy the component matrix.
| INV5, INV6, INV7 | BaseProps/passthrough lint and representative runtime tests | Consumer ARIA/data/style/events are dropped, clobber component semantics, or fail to compose |
| INV9 | Published-surface, Changeset, migration, and public-type checks | A released API changes without explicit compatibility evidence |
| INV11 | Public-API admission review plus owning theming/component tests | A public semantic custom property exposes derivable or unsupported implementation detail |
| INV12, INV13 | Generated declaration/export/behavior inventory plus canonical-owner mapping | A reachable supporting type or behavior is called internal, or mechanical evidence is treated as permission to accept it |
| INV12, INV13 | Generated declaration/export/behavior inventory plus canonical-owner mapping | A reachable supporting type or behavior outside `./internal/*` is called internal, or mechanical evidence is treated as permission to accept it |
| INV14 | `AppShell.test.tsx` | A component hardcodes a divergent point or treats equality as below |
| INV15 | Public-API review of the generated declaration inventory | A part or StyleX-typed styling prop ships without class-name and inline-style counterparts on the same element |
| INV16 | Public-API review of touch presentations plus coarse- and fine-pointer runtime tests | A stable component that presents a different surface or switches an open surface's input mode under a coarse pointer and has no `presentation` value that keeps its fine-pointer surface and mode; such a touch mode callers cannot reach; a default that overrides an explicit caller choice |
Expand Down
Loading
Loading