Skip to content

chore(theme): delete dead css-vars/resolve token path - #808

Merged
robsongajunior merged 6 commits into
mainfrom
chore/theme-delete-dead-css-vars
Jul 27, 2026
Merged

chore(theme): delete dead css-vars/resolve token path#808
robsongajunior merged 6 commits into
mainfrom
chore/theme-delete-dead-css-vars

Conversation

@robsongajunior

@robsongajunior robsongajunior commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #807 (base = its branch; GitHub auto-retargets to main when #807 merges — #807 modifies resolve.js and this PR deletes it, so basing on main would guarantee a modify/delete conflict).

Deletes the dead runtime CSS-vars path that #807's unresolved-tokenRef guard exposed as rotten:

  • scripts/css-vars.js + scripts/resolve.js deleted. Zero callers anywhere in the monorepo; unreachable for consumers twice over (./tokens is not in theme's v4 exports map, and the root tokens.js entry isn't in files, so it never ships); its data carried 4 dangling refs (primitives.alpha.neutral.25, primitives.alpha.brand.primary.65alpha has no neutral/brand shades). The healthy, publicly exported path (./theme-colorscompile-theme.js) does the same job.
  • tokens/index.js: the createCssVars/cssVarsString/injectCssVars re-export dropped (barrel keeps its 7 remaining exports — smoke-tested).
  • Every stale doc reference updated, not just deleted:
    • README.md: the runtime-injection example now shows the real API (injectThemeCss from @aziontech/theme/theme-colors); the fictional build/css-vars.js/build/resolve.js export listings and tree entry removed; the token-resolution example rewritten to compileThemeVars.
    • tokens/README.md: architecture diagram + file tree corrected (also drops the phantom tests/*.html harness entries and the wrong "legacy compiler" label on compile-theme.js); the JS-API sections now document compileThemeVars/compileThemeCss/injectThemeCss; the tokenRef prefix table now lists the surviving resolvers' prefixes (two deleted-resolver rows dropped, theme.surfaces.* added) and states that unresolved refs fail the build — replacing the now-false "left as the raw path string" claim.
    • semantic/colors.js: semanticColorsData's header comment no longer points at the deleted file and warns in-place that its backdrop/primary-mask refs point at nonexistent alpha shades — fix them before ever rewiring that data to a compiler.
    • compile-primitives.js: header comment re-anchored from injectCssVars to injectThemeCss.

Second commit — full README.md rewrite for the v4 package (+104/−326). The old README was v2/v3-era fiction well beyond the css-vars references: a @aziontech/theme/widget theme and default.js/widget.js entries that don't exist, @aziontech/theme/tokens with preset/tokenUtilities Tailwind-config examples (no preset or plugin exists; /tokens is neither exported nor shipped), textSemantic/backgroundSemantic/borderSemantic modules that don't exist, a neutral palette (it's gray), wrong hex values (orange[500] is #F3652B, not #fe601f), a build/ directory tree, and a semantic-release versioning claim. The new README documents the real package — one Tailwind-v4 CSS import (@theme/@utility, bundled @font-face, no config step), the true five-path exports table, JS examples with values and shapes verified by introspection (curve['productive-exit'], duration['fast-02'], responsive textsData bundles, compileThemeVars output), the real theme-switch selectors from the dist, the prepack rebuild guarantee, the actual project tree, and release-please versioning — with a pointer to src/tokens/README.md as the deep reference.

Verification

  • build:tokens green; dist/v4 output byte-identical to the pre-chore(theme): fail token build on unresolved tokenRef #807 baseline.
  • build:dts (publish-path vue-tsc emit) green without the deleted files.
  • Smoke: tokens/index.js barrel imports cleanly (7 exports); injectThemeCss present on ./theme-colors.
  • Repo-wide sweep: zero remaining references to createCssVars/cssVarsString/injectCssVars/resolveRefsToCssVars/scripts/css-vars/scripts/resolve in code or docs.
  • Prettier clean on every touched file.

Notes

  • chore → no release; net −178 lines; nothing shipped changes (the deleted API never reached the tarball).
  • Closes the follow-up decision recorded in chore(theme): fail token build on unresolved tokenRef #807 ("fix the refs or delete the dead path") — deletion chosen; the refs' brokenness is now annotated at the data source instead.

@robsongajunior
robsongajunior requested a review from a team as a code owner July 27, 2026 03:07
@robsongajunior robsongajunior added theme documentation Improvements or additions to documentation refactor labels Jul 27, 2026
@robsongajunior
robsongajunior changed the base branch from chore/theme-fail-on-unresolved-tokenref to main July 27, 2026 13:15
@robsongajunior robsongajunior changed the title [NO-ISSUE] chore(theme): delete dead css-vars/resolve token path chore(theme): delete dead css-vars/resolve token path Jul 27, 2026
@robsongajunior
robsongajunior merged commit e138728 into main Jul 27, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor theme

Development

Successfully merging this pull request may close these issues.

3 participants