Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

[Spec] Lifecycle records for the 0.7 theme compatibility removal (#7300)

Cindy Zhang21875fc0e973
diff --git a/docs/architecture/component-theming-surface.md b/docs/architecture/component-theming-surface.md
index 2ae02729fd..7c7277c119 100644
--- a/docs/architecture/component-theming-surface.md
+++ b/docs/architecture/component-theming-surface.md
@@ -289,6 +289,64 @@ dynamic theme objects and custom CSS receive the complete mapping above.
This record does not own semantic token definitions, theme authoring precedence,
how themes become output, or the design rationale for a component's appearance.
+### DEP-0013 — Deprecate the 21 component-theming target aliases
+
+| Field | Value |
+| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| id | `DEP-0013` |
+| cleanup | `CLN-0022` |
+| package | `@astryxdesign/core`, `@astryxdesign/cli` |
+| surface | Theme target names: the 21 aliases in the mapping table above, as `defineTheme({components})` keys and as `.astryx-<alias>` CSS classes, plus the machinery that exists only for them: `themeProps(..., {legacyNames})`, `ThemePropsOptions.legacyNames`, `ComponentThemingTarget.deprecatedFor`, and alias-only discovery and filtering |
+| old contract | Each alias is emitted beside its canonical target on the same element, accepted by theme build, and listed by CLI discovery |
+| replacement | The canonical target in the mapping table above, as both theme key and CSS class |
+| direct authority | `architecture:component-theming-surface` INV12 and this section. Owners: `cixzhang`, `imdreamrunner` |
+| warning | Theme build warns `Deprecated component target "<alias>". Use "<canonical>" instead.`; CLI discovery labels each alias with its replacement |
+| migration | Run `astryx upgrade --from <0.6 version> --apply --path .`; review each `TODO(astryx upgrade)` it adds |
+| codemod | `migrate-deprecated-theme-surface`: renames static keys in theme `components` maps and alias classes in CSS. It adds a TODO when an old and a canonical key coexist. The four clear-icon aliases keep their owner scope in CSS with `:where(.astryx-<owner> *)`; a theme key cannot carry that scope, so the codemod adds a TODO. Computed keys and CSS inside strings are reported cases, not rewritten |
+| downstream | Maintained themes, CLI templates, and copyable examples use only canonical keys; the bundled and probe themes build with no alias |
+| transition | `no prior transition` |
+| state | `proposed` |
+| target plan | `CLN-0022` in 0.7.0 |
+
+### CLN-0022 — Canonical theme targets only
+
+| Field | Value |
+| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| id | `CLN-0022` |
+| lifecycle | `DEP-0013` |
+| delta | Components stop emitting the 21 alias classes. Theme build treats an alias key as an unknown component and suggests the canonical key. CLI discovery and generated docs list only canonical targets. `legacyNames`, `ThemePropsOptions`, and `deprecatedFor` are removed |
+| rollback | Restore alias emission, metadata, and discovery from the final 0.6 baseline |
+| state | `pending` — lands only in a minor release whose frozen manifest lists `CLN-0022` |
+
+### DEP-0014 — Deprecate bare prop and state classes
+
+| Field | Value |
+| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| id | `DEP-0014` |
+| cleanup | `CLN-0023` |
+| package | `@astryxdesign/core` |
+| surface | Rendered CSS classes: one bare class per visual prop or state value on every themed element (`.primary`, `.sm`, `.checked`; a value that starts with a digit keeps its prop prefix, such as `.level-2`), repeated on alias targets |
+| old contract | A selector that qualifies an Astryx target with a bare value class, such as `.astryx-button.primary`, matches that prop or state |
+| replacement | The canonical target plus its reflected `data-*` attribute, such as `.astryx-button[data-variant="primary"]`. Theme `components` keys are unchanged |
+| direct authority | `architecture:component-theming-surface`, this section. Owners: `cixzhang`, `imdreamrunner` |
+| warning | Consumer docs label the classes deprecated and name the replacement |
+| migration | Run `astryx upgrade --from <0.6 version> --apply --path .`. Replace unqualified bare classes by hand, only where they target Astryx |
+| codemod | `migrate-deprecated-theme-surface`: rewrites target-qualified bare classes in `.css` files to reflected `data-*` selectors, using every bare class the final 0.6 release emitted. It adds a TODO when a class Astryx once emitted has no known meaning on the target it qualifies. Unqualified classes cannot be classified, because a bare class does not name its axis and may be application-owned |
+| downstream | Generated CSS for every maintained theme contains no target-qualified bare class; the probe theme and visual gate exercise only `data-*` selectors |
+| transition | `no prior transition` |
+| state | `proposed` |
+| target plan | `CLN-0023` in 0.7.0 |
+
+### CLN-0023 — Reflected attributes only
+
+| Field | Value |
+| --------- | -------------------------------------------------------------------------------------------------------------------------- |
+| id | `CLN-0023` |
+| lifecycle | `DEP-0014` |
+| delta | `themeProps()` emits one canonical target class and reflected `data-*` attributes; no bare prop or state class is rendered |
+| rollback | Restore bare-class emission from the final 0.6 baseline |
+| state | `pending` — lands only in a minor release whose frozen manifest lists `CLN-0023` |
+
## Change coupling
- Adding or renaming a `themeProps()` target updates its component-spec map,