Skip to content

fix: update component library usage to import theme.css instead of preset - #47

Merged
kampsy merged 4 commits into
mainfrom
dev
Jan 20, 2026
Merged

fix: update component library usage to import theme.css instead of preset#47
kampsy merged 4 commits into
mainfrom
dev

Conversation

@kampsy

@kampsy kampsy commented Jan 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Updated component library usage from preset-based configuration to direct CSS theme import
  • Removed preset configuration in favor of importing theme.css directly
  • Updated installation documentation to reflect the new approach
  • Simplified setup process for users by eliminating preset configuration steps

Changes

  • Replaced kampsy-ui/preset import with direct @import "kampsy-ui/theme.css"
  • Updated package.json exports to include theme.css
  • Removed preset configuration file
  • Updated installation docs and examples
  • Simplified Tailwind CSS v4 integration

Testing

  • Verified installation instructions work correctly
  • Confirmed theme imports function as expected
  • Tested documentation examples

Summary by CodeRabbit

  • New Features

    • Public theme stylesheet/export added for direct CSS imports and standalone theming.
  • Changes

    • Switched from a preset-based theme to a CSS-import theming model with consolidated light/dark palettes.
    • Reduced inline CSS token surface in the core stylesheet.
    • Updated Svelte peer and dev versions.
  • Removals

    • Removed the previous preset export and the extended installation example.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Jan 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
kampsy-ui Ready Ready Preview, Comment Jan 20, 2026 0:22am

@coderabbitai

coderabbitai Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Refactors theming from a Tailwind preset to a CSS-first approach: removes the exported Tailwind preset, adds src/theme.css and a ./theme.css package export, updates src/app.css to import the new theme, and updates docs and examples to reference the CSS import and @source directive. Also bumps Svelte peer/dev versions.

Changes

Cohort / File(s) Summary
Package & Exports
package.json
Removed ./preset export; added ./theme.css export -> ./src/theme.css; added "src/theme.css" to files; bumped peerDependency svelte to ^5.45.6 and devDependency svelte to ^5.43.6.
Preset Removal
src/lib/preset/index.ts
Deleted default Tailwind preset export and related imports; file no longer provides the Tailwind config.
CSS Theming
src/app.css, src/theme.css
src/app.css now imports ./theme.css and reduced inline theme tokens to a minimal @theme font var; new src/theme.css supplies full light/dark color palettes, alpha scales, and base border-color rules.
Docs & Routes
src/docs/data/installation.ts, src/routes/installation/+page.svelte, static/llms.txt
Removed installationConfigLong export and its usage; updated installation examples to use @import "kampsy-ui/theme.css" with an @source directive replacing preset-based instructions; docs text adjusted accordingly.

Sequence Diagram(s)

(omitted — changes are theme and packaging updates without multi-component sequential control flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I unspooled the preset, wove CSS threads bright,
Light and dark in variables, tucked neat for the night,
Borders hum in steady lines,
Docs now point to themed designs,
Hop—style shipped, and everything's light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating from preset-based configuration to direct CSS theme import.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
static/llms.txt (1)

1289-1296: Remove the now-invalid preset section.
The file still advertises kampsy-ui/preset, which no longer exists, and will mislead readers.

🧹 Suggested cleanup
-## Preset
-
-Preset configurations are available from the `kampsy-ui/preset` export.
-
-**Usage:**
-```javascript
-import preset from 'kampsy-ui/preset';
-```
+## Preset
+
+Preset usage has been removed. Import the theme instead:
+```css
+@import "kampsy-ui/theme.css";
+```
🧹 Nitpick comments (2)
src/routes/installation/+page.svelte (1)

147-151: Clarify the target CSS file for setup.
SvelteKit projects typically use src/app.css or src/routes/+layout.css; consider naming the exact path to avoid confusion.

package.json (1)

50-71: Align devDependency Svelte version with the peer requirement.
The peer dependency is ^5.45.6 while devDependencies still use ^5.43.3, which can cause local builds/tests to validate against an older compiler.

🔧 Suggested alignment
-		"svelte": "^5.43.3",
+		"svelte": "^5.45.6",

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 49-51: The peerDependencies entry declares "svelte": "^5.45.6" but
devDependencies currently install "svelte" at "^5.43.6", so update package.json
so the devDependency for "svelte" satisfies the peer constraint; either lower
the peerDependencies version to "^5.43.6" or (preferred) bump the
devDependencies "svelte" version to "^5.45.6" so that the devDependency used in
tests matches the peerDependencies requirement and ensures CI/local testing
covers the declared supported minimum.

In `@static/llms.txt`:
- Around line 15-19: Change the fenced code block language tag from "javascript"
to "css" so the block containing `@import` "kampsy-ui/theme.css"; and `@source`
"../../node_modules/kampsy-ui/dist"; is correctly highlighted; also add a short
note near that block (or documentation comment) advising that the `@source` path
(../../node_modules/kampsy-ui/dist) may need to be adjusted per project layout
or replaced with a supported absolute/path pattern for Tailwind v4.
🧹 Nitpick comments (1)
package.json (1)

41-45: LGTM with minor formatting note.

The theme.css export and files array inclusion are correctly configured to distribute the CSS theme file.

Minor nit: Line 41 has an extra leading space before "./theme.css" that's inconsistent with other export entries.

-		 "./theme.css": "./src/theme.css"
+		"./theme.css": "./src/theme.css"

Comment thread package.json
Comment on lines 49 to 51
"peerDependencies": {
"svelte": "^5.0.0-next.1"
"svelte": "^5.45.6"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Peer dependency version exceeds dev dependency version.

The peer dependency requires svelte: ^5.45.6 but the dev dependency only installs ^5.43.6. The dev dependency should satisfy the peer dependency constraint to ensure the library is tested against the minimum version it declares support for.

Suggested fix

Either lower the peer dependency to match what you're testing against:

 "peerDependencies": {
-    "svelte": "^5.45.6"
+    "svelte": "^5.43.6"
 },

Or update the dev dependency to match the peer dependency:

-    "svelte": "^5.43.6",
+    "svelte": "^5.45.6",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"peerDependencies": {
"svelte": "^5.0.0-next.1"
"svelte": "^5.45.6"
},
"peerDependencies": {
"svelte": "^5.43.6"
},
🤖 Prompt for AI Agents
In `@package.json` around lines 49 - 51, The peerDependencies entry declares
"svelte": "^5.45.6" but devDependencies currently install "svelte" at "^5.43.6",
so update package.json so the devDependency for "svelte" satisfies the peer
constraint; either lower the peerDependencies version to "^5.43.6" or
(preferred) bump the devDependencies "svelte" version to "^5.45.6" so that the
devDependency used in tests matches the peerDependencies requirement and ensures
CI/local testing covers the declared supported minimum.

Comment thread static/llms.txt Outdated
@kampsy kampsy self-assigned this Jan 20, 2026
@kampsy
kampsy merged commit 80a362c into main Jan 20, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant