@craftzbay/ui 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ // Set theme before paint to avoid flash. Honour user preference, default to light.
2
+ // Served as an external script so the page can run under a strict CSP without
3
+ // 'unsafe-inline' on script-src.
4
+ try {
5
+ var stored = localStorage.getItem('theme');
6
+ var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
7
+ var theme = stored != null ? stored : prefersDark ? 'dark' : 'light';
8
+ if (theme === 'dark') document.documentElement.classList.add('dark');
9
+ } catch (e) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craftzbay/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Refined-minimal Tailwind v4 + React design system — 40+ accessible primitives and ready-made page patterns.",
5
5
  "license": "MIT",
6
6
  "author": "craftzbay",