Skip to content

feat: rename the Mcu component to Mtb, deprecate Mcu - #166

Merged
abernier merged 1 commit into
mainfrom
feat/rename-mcu-to-mtb
Aug 3, 2026
Merged

feat: rename the Mcu component to Mtb, deprecate Mcu#166
abernier merged 1 commit into
mainfrom
feat/rename-mcu-to-mtb

Conversation

@abernier

@abernier abernier commented Aug 3, 2026

Copy link
Copy Markdown
Owner

The React root component is now Mtb (after the package name, material-theme-builder). Mcu keeps working as a deprecated alias of Mtb — same component, same props — flagged @deprecated so editors strike it through; it will be removed in the next major.

  • src/Mcu.tsxsrc/Mtb.tsx (stories, helpers and tests renamed along)
  • material-theme-builder/react now exports both Mtb and the deprecated Mcu
  • useMcu / McuConfig / McuProvider are untouched (out of scope here)
  • changeset: minor

🤖 Generated with Claude Code

https://claude.ai/code/session_014ftmSFU2FTtvo5JSzXvXSn

… alias

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ftmSFU2FTtvo5JSzXvXSn
@abernier
abernier merged commit 571fda2 into main Aug 3, 2026
5 of 6 checks passed
@abernier
abernier deleted the feat/rename-mcu-to-mtb branch August 3, 2026 10:52
abernier added a commit that referenced this pull request Aug 5, 2026
The `Mcu` → `Mtb` rename (#166, #169) covered the component, the hook and the
config type, but left the shape of the value `useMtb()` returns untouched: it
still handed back `mcuConfig`, `setMcuConfig` and `getMcuColor`.

They are now `mtbConfig`, `setMtbConfig` and `getMtbColor`. The `mcu*` keys stay
on the context value as `@deprecated` aliases holding the very same references,
so existing destructuring keeps working until the next major.

The `id` of the injected `<style>` tag stays `mcu-styles` — it is observable
from user CSS and scripts, so renaming it would break selectors silently. Only
the local binding follows the rename.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dap13K3ck1Xjt5m5i7VNAu
abernier added a commit that referenced this pull request Aug 5, 2026
The `Mcu` → `Mtb` rename (#166, #169) covered the component, the hook and the
config type, but left the shape of the value `useMtb()` returns untouched: it
still handed back `mcuConfig`, `setMcuConfig` and `getMcuColor`.

They are now `mtbConfig`, `setMtbConfig` and `getMtbColor`. The `mcu*` keys stay
on the context value as `@deprecated` aliases holding the very same references,
so existing destructuring keeps working until the next major.

The `id` of the injected `<style>` tag stays `mcu-styles` — it is observable
from user CSS and scripts, so renaming it would break selectors silently. Only
the local binding follows the rename.


Claude-Session: https://claude.ai/code/session_01Dap13K3ck1Xjt5m5i7VNAu

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant