Skip to content

fix: inline chakra theme helpers to avoid external resolution issues#606

Merged
Agilulfo1820 merged 1 commit intomainfrom
fix/inline-chakra-theme-helpers
Mar 16, 2026
Merged

fix: inline chakra theme helpers to avoid external resolution issues#606
Agilulfo1820 merged 1 commit intomainfrom
fix/inline-chakra-theme-helpers

Conversation

@Agilulfo1820
Copy link
Copy Markdown
Member

Summary

  • Replaces @chakra-ui/anatomy imports and createMultiStyleConfigHelpers from @chakra-ui/react with inline equivalents in theme files (card.ts, modal.ts, popover.ts)
  • The previous fix (fix: add missing @chakra-ui/anatomy dependency #605) added @chakra-ui/anatomy as a dependency, but the root cause is that both @chakra-ui/anatomy and createMultiStyleConfigHelpers are externalized in the dist bundle via the tsdown config. This causes runtime errors (createMultiStyleConfigHelpers is not a function) in projects using Chakra UI v3 or Turbopack, where the bundler resolves @chakra-ui/react to v3 which lacks this v2-only API
  • createMultiStyleConfigHelpers is an identity helper (definePartsStyle returns its argument, defineMultiStyleConfig adds a parts array). Inlining these eliminates the external dependency while preserving identical runtime behavior
  • Removes the now-unnecessary @chakra-ui/anatomy dependency

Test plan

  • yarn typecheck passes
  • yarn build succeeds
  • dist contains no references to @chakra-ui/anatomy or createMultiStyleConfigHelpers
  • Verify a project using Chakra UI v3 + Turbopack (next dev --turbo) no longer errors

Made with Cursor

Replace @chakra-ui/anatomy imports and createMultiStyleConfigHelpers
from @chakra-ui/react with inline equivalents in theme files (card.ts,
modal.ts, popover.ts).

These were externalized in the dist bundle via tsdown config, causing
runtime failures in projects using Chakra UI v3 or Turbopack, where
the bundler resolves @chakra-ui/react to v3 which lacks the v2-only
createMultiStyleConfigHelpers API.

By inlining the anatomy keys and the identity helper functions, the
theme system no longer depends on external Chakra packages at runtime.

Also removes the now-unnecessary @chakra-ui/anatomy dependency added
in the previous fix.

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

Warning

Rate limit exceeded

@Agilulfo1820 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4811c1df-e0e5-430d-ac6b-120fcff95876

📥 Commits

Reviewing files that changed from the base of the PR and between 742b822 and ee66eb7.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • packages/vechain-kit/package.json
  • packages/vechain-kit/src/theme/card.ts
  • packages/vechain-kit/src/theme/modal.ts
  • packages/vechain-kit/src/theme/popover.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/inline-chakra-theme-helpers
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

@Agilulfo1820 Agilulfo1820 merged commit f59c77f into main Mar 16, 2026
7 checks passed
@Agilulfo1820 Agilulfo1820 deleted the fix/inline-chakra-theme-helpers branch March 16, 2026 11:13
@github-actions
Copy link
Copy Markdown

Size Change: +702 B (+0.01%)

Total Size: 7.62 MB

Filename Size Change
packages/vechain-kit/dist/index-Bs6t5GxR.d.mts 0 B -5.63 kB (removed) 🏆
packages/vechain-kit/dist/index-Bs6t5GxR.d.mts.map 0 B -2.99 kB (removed) 🏆
packages/vechain-kit/dist/index-CuuY6FEu.d.cts 0 B -153 kB (removed) 🏆
packages/vechain-kit/dist/index-CuuY6FEu.d.cts.map 0 B -44.2 kB (removed) 🏆
packages/vechain-kit/dist/index-CY6cbYyx.d.mts 0 B -153 kB (removed) 🏆
packages/vechain-kit/dist/index-CY6cbYyx.d.mts.map 0 B -44.2 kB (removed) 🏆
packages/vechain-kit/dist/index-DSMUkHcK.d.cts 0 B -5.63 kB (removed) 🏆
packages/vechain-kit/dist/index-DSMUkHcK.d.cts.map 0 B -2.99 kB (removed) 🏆
packages/vechain-kit/dist/index-BWv81Pya.d.cts 153 kB +153 kB (new file) 🆕
packages/vechain-kit/dist/index-BWv81Pya.d.cts.map 44.2 kB +44.2 kB (new file) 🆕
packages/vechain-kit/dist/index-CWViOs1U.d.mts 5.63 kB +5.63 kB (new file) 🆕
packages/vechain-kit/dist/index-CWViOs1U.d.mts.map 2.99 kB +2.99 kB (new file) 🆕
packages/vechain-kit/dist/index-I8fe7GR2.d.cts 5.63 kB +5.63 kB (new file) 🆕
packages/vechain-kit/dist/index-I8fe7GR2.d.cts.map 2.99 kB +2.99 kB (new file) 🆕
packages/vechain-kit/dist/index-P_K3IyC6.d.mts 153 kB +153 kB (new file) 🆕
packages/vechain-kit/dist/index-P_K3IyC6.d.mts.map 44.2 kB +44.2 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
packages/vechain-kit/dist/assets 4.1 kB 0 B
packages/vechain-kit/dist/assets-BL24r-Yp.mjs 51.3 kB 0 B
packages/vechain-kit/dist/assets-BL24r-Yp.mjs.map 74.1 kB 0 B
packages/vechain-kit/dist/assets-DNJsQD7_.cjs 58.5 kB 0 B
packages/vechain-kit/dist/assets-DNJsQD7_.cjs.map 75.5 kB 0 B
packages/vechain-kit/dist/assets/index.cjs 716 B 0 B
packages/vechain-kit/dist/assets/index.d.cts 973 B 0 B
packages/vechain-kit/dist/assets/index.d.mts 973 B 0 B
packages/vechain-kit/dist/assets/index.mjs 718 B 0 B
packages/vechain-kit/dist/index.cjs 1.01 MB -89 B (-0.01%)
packages/vechain-kit/dist/index.cjs.map 2.38 MB +405 B (+0.02%)
packages/vechain-kit/dist/index.d.cts 20.6 kB 0 B
packages/vechain-kit/dist/index.d.mts 20.6 kB 0 B
packages/vechain-kit/dist/index.mjs 977 kB -46 B (0%)
packages/vechain-kit/dist/index.mjs.map 2.33 MB +477 B (+0.02%)
packages/vechain-kit/dist/utils 4.1 kB 0 B
packages/vechain-kit/dist/utils-B3mmhtVy.cjs 26.2 kB 0 B
packages/vechain-kit/dist/utils-B3mmhtVy.cjs.map 65.3 kB 0 B
packages/vechain-kit/dist/utils-fXJ3K1K6.mjs 21.1 kB 0 B
packages/vechain-kit/dist/utils-fXJ3K1K6.mjs.map 64.6 kB 0 B
packages/vechain-kit/dist/utils/index.cjs 1.98 kB 0 B
packages/vechain-kit/dist/utils/index.d.cts 3.04 kB 0 B
packages/vechain-kit/dist/utils/index.d.mts 3.04 kB 0 B
packages/vechain-kit/dist/utils/index.mjs 2 kB 0 B

compressed-size-action

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