Conversation
- `src/bin/gen-theme.ts` and `package.json`: Added `gen-theme` as a bin command and removed it from the build script to decouple theme generation from the main build process. - `package.json`: Updated CSS exports to use explicit file mappings to ensure better package resolution for consumers. - `src/lib/**/*.svelte` and `src/lib/**/*.css`: Replaced `$style/index.css` references with the absolute package path `@celar-ui/svelte/styles/index.css` to resolve import errors in external projects. - `CHANGELOG.md` and `package.json`: Bumped version to 2.0.2.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 32 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refactors style references across 32+ component files, changing from local alias Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates @celar-ui/svelte to version 2.0.2, introducing a new CLI tool for theme generation and refactoring CSS exports and reference paths to use absolute package references. Feedback indicates several issues in package.json: the bin configuration uses a string which may cause naming conflicts and points to a TypeScript file that might not be included in the published package. Furthermore, removing theme generation from the build script risks publishing stale assets, and the breaking changes to style export paths suggest that a patch version bump is insufficient under Semantic Versioning.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
packages/svelte/src/lib/inputs/styles/radio_group.css (1)
1-1: Update Stylelint configuration to handle@referencedirective.Stylelint correctly flags
@referenceas an unknown at-rule since it's not part of standard CSS. If this is a valid custom PostCSS directive (pending verification in AdaptiveSidebar.svelte), update your Stylelint configuration to suppress this error.📝 Suggested Stylelint configuration update
Add to your
.stylelintrcor stylelint config:{ "rules": { "scss/at-rule-no-unknown": [ true, { "ignoreAtRules": ["reference"] } ] } }Or if using
at-rule-no-unknowndirectly:{ "rules": { "at-rule-no-unknown": [ true, { "ignoreAtRules": ["reference"] } ] } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/svelte/src/lib/inputs/styles/radio_group.css` at line 1, Stylelint is flagging the custom PostCSS at-rule "@reference" in radio_group.css as an unknown at-rule; update the project's Stylelint config (e.g., .stylelintrc) to ignore "reference" by adding it to the ignoreAtRules list for "scss/at-rule-no-unknown" or "at-rule-no-unknown", and confirm that the "@reference" usage in AdaptiveSidebar.svelte is an intentional/valid directive before suppressing the lint rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/svelte/CHANGELOG.md`:
- Line 8: Update the date on the changelog entry for version [2.0.2] from
2026-04-16 to the PR creation date 2026-04-15 (or to the intended release date
if this truly is a planned next-day release) so the header "## [2.0.2] -
2026-04-16" matches the PR timeline and avoids release tracking confusion.
In `@packages/svelte/package.json`:
- Line 48: The package.json uses a string-form "bin": "./src/bin/gen-theme.ts"
which causes npm to expose an executable named "svelte" and can collide with the
upstream CLI; change it to the object-form "bin" mapping a unique command name
to the existing script (e.g., map "celar-svelte-gen-theme" or another unique
identifier to "./src/bin/gen-theme.ts") so the package installs a uniquely named
CLI executable instead of overriding "svelte".
In `@packages/svelte/src/lib/overlay/styles/dialog.css`:
- Line 1: Stylelint is flagging the Tailwind v4 PostCSS `@reference` at-rule (seen
in the diff as "@reference '@celar-ui/svelte/styles/index.css';"); update the
Stylelint config by modifying the "scss/at-rule-no-unknown" rule to include
ignoreAtRules: ["reference"] (or alternatively configure a PostCSS-compatible
syntax parser) so that the `@reference` at-rule is allowed and the migrated files
no longer error.
In `@packages/svelte/src/lib/overlay/styles/popover.css`:
- Line 1: Add the `reference` at-rule to Stylelint's whitelist so `@reference`
usages (e.g., in packages/svelte/src/lib/overlay/styles/popover.css) stop
failing CI: update your Stylelint config file (.stylelintrc.json) to configure
the `scss/at-rule-no-unknown` rule to allow the "reference" at-rule (i.e.,
include "reference" in the ignoreAtRules array) so existing `@reference`
directives are treated as known.
---
Nitpick comments:
In `@packages/svelte/src/lib/inputs/styles/radio_group.css`:
- Line 1: Stylelint is flagging the custom PostCSS at-rule "@reference" in
radio_group.css as an unknown at-rule; update the project's Stylelint config
(e.g., .stylelintrc) to ignore "reference" by adding it to the ignoreAtRules
list for "scss/at-rule-no-unknown" or "at-rule-no-unknown", and confirm that the
"@reference" usage in AdaptiveSidebar.svelte is an intentional/valid directive
before suppressing the lint rule.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fc7b2e99-330f-45d6-8543-90200554ef31
📒 Files selected for processing (32)
packages/svelte/CHANGELOG.mdpackages/svelte/package.jsonpackages/svelte/src/bin/gen-theme.tspackages/svelte/src/lib/buttons/styles/button_utils.csspackages/svelte/src/lib/containment/Spacer.sveltepackages/svelte/src/lib/containment/styles/avatar.csspackages/svelte/src/lib/containment/styles/breadcrumb.csspackages/svelte/src/lib/containment/styles/card.csspackages/svelte/src/lib/containment/styles/container.csspackages/svelte/src/lib/containment/styles/surface-container.csspackages/svelte/src/lib/inputs/Checkbox.sveltepackages/svelte/src/lib/inputs/ColorInput.sveltepackages/svelte/src/lib/inputs/FileInput.sveltepackages/svelte/src/lib/inputs/RadioItem.sveltepackages/svelte/src/lib/inputs/Slider.sveltepackages/svelte/src/lib/inputs/Switch.sveltepackages/svelte/src/lib/inputs/TagInput.sveltepackages/svelte/src/lib/inputs/TextInput.sveltepackages/svelte/src/lib/inputs/styles/radio_group.csspackages/svelte/src/lib/misc/Badge.sveltepackages/svelte/src/lib/misc/DuckSpinner.sveltepackages/svelte/src/lib/misc/Gap.sveltepackages/svelte/src/lib/misc/LinearProgressIndicator.sveltepackages/svelte/src/lib/navigation/AdaptiveSidebar.sveltepackages/svelte/src/lib/navigation/AppBar.sveltepackages/svelte/src/lib/navigation/NavigationBar.sveltepackages/svelte/src/lib/navigation/NavigationBarButton.sveltepackages/svelte/src/lib/navigation/styles/navigation_drawer.csspackages/svelte/src/lib/overlay/styles/command.csspackages/svelte/src/lib/overlay/styles/dialog.csspackages/svelte/src/lib/overlay/styles/popover.csspackages/svelte/src/lib/overlay/styles/surface-dialog.css
- Update `package.json` to change the `bin` field from a string to an object. - Define the command name as `gen-theme` to ensure a consistent and clear CLI invocation.
src/bin/gen-theme.tsandpackage.json: Addedgen-themeas a bin command and removed it from the build script to decouple theme generation from the main build process.package.json: Updated CSS exports to use explicit file mappings to ensure better package resolution for consumers.src/lib/**/*.svelteandsrc/lib/**/*.css: Replaced$style/index.cssreferences with the absolute package path@celar-ui/svelte/styles/index.cssto resolve import errors in external projects.CHANGELOG.mdandpackage.json: Bumped version to 2.0.2.Summary by CodeRabbit
New Features
gen-themeCLI command for theme generation.Chores