@fakhrirafiki/theme-engine 0.4.15 → 0.4.18

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.
package/README.md CHANGED
@@ -8,6 +8,9 @@ Theme system for **Next.js (App Router)**: mode (`light | dark | system`) + them
8
8
  ![npm downloads](https://img.shields.io/npm/dm/@fakhrirafiki/theme-engine)
9
9
  ![license](https://img.shields.io/npm/l/@fakhrirafiki/theme-engine)
10
10
 
11
+ Live demo: https://theme-engine-example.vercel.app/
12
+ Example repo: https://github.com/fakhrirafiki/theme-engine-example
13
+
11
14
  ## ✨ Why use this?
12
15
 
13
16
  - ⚡ **Fast setup**: 1 CSS import + 1 provider
@@ -407,7 +410,7 @@ export function ThemePresetSelect({
407
410
 
408
411
  {isActive && (
409
412
  <span className="inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-foreground">
410
- Aktif
413
+ Active
411
414
  </span>
412
415
  )}
413
416
  </span>
@@ -415,7 +418,7 @@ export function ThemePresetSelect({
415
418
  );
416
419
  })}
417
420
 
418
- {presets.length === 0 && <p className="text-xs text-muted-foreground">Belum ada tema yang tersedia.</p>}
421
+ {presets.length === 0 && <p className="text-xs text-muted-foreground">No themes available yet.</p>}
419
422
  </div>
420
423
  );
421
424
  }
@@ -503,6 +506,14 @@ Note: the thrown error string might mention `useTheme` because `useThemeEngine()
503
506
 
504
507
  Ensure your `globals.css` imports `@fakhrirafiki/theme-engine/styles` (and Tailwind v4 is configured if you rely on Tailwind utilities).
505
508
 
509
+ ### Turbopack: “module factory is not available” (HMR) after upgrading
510
+
511
+ This is a Next.js Turbopack dev/HMR issue that can happen after updating dependencies in `node_modules` (or when using a locally linked package that rebuilds `dist/` while `next dev` is running).
512
+
513
+ - Restart `next dev` (often enough).
514
+ - If it persists: delete `.next/` and restart.
515
+ - Workaround: run dev server with webpack: `next dev --webpack`
516
+
506
517
  ---
507
518
 
508
519
  ## License
@@ -26,18 +26,11 @@
26
26
 
27
27
  /* Icon transition for theme toggle */
28
28
  .theme-toggle-icon {
29
+ display: block;
29
30
  transition: all 0.3s ease-in-out;
30
31
  color: hsl(var(--foreground));
31
32
  }
32
33
 
33
- .theme-toggle[data-theme="light"] .theme-toggle-icon {
34
- rotate: 0deg;
35
- }
36
-
37
- .theme-toggle[data-theme="dark"] .theme-toggle-icon {
38
- rotate: 180deg;
39
- }
40
-
41
34
  /* ThemePresetButtons: lightweight CSS-based animations and hover affordances */
42
35
 
43
36
  /* ThemePresetButtons: base button styling (no Tailwind required) */
@@ -59,10 +52,7 @@
59
52
  box-shadow: 0 1px 0 hsl(var(--border) / 0.35);
60
53
  cursor: pointer;
61
54
 
62
- transition:
63
- transform 0.2s ease-out,
64
- background-color 0.2s ease-out,
65
- border-color 0.2s ease-out,
55
+ transition: transform 0.2s ease-out, background-color 0.2s ease-out, border-color 0.2s ease-out,
66
56
  box-shadow 0.2s ease-out;
67
57
  }
68
58
 
@@ -111,9 +101,7 @@
111
101
  z-index: 20;
112
102
  background: hsl(var(--card) / 0.95);
113
103
  border-color: hsl(var(--primary) / 0.2);
114
- box-shadow:
115
- 0 10px 25px hsl(0 0% 0% / 0.12),
116
- 0 0 0 1px hsl(var(--border) / 0.35);
104
+ box-shadow: 0 10px 25px hsl(0 0% 0% / 0.12), 0 0 0 1px hsl(var(--border) / 0.35);
117
105
  }
118
106
 
119
107
  /* Color boxes within preset buttons - fallback only */
@@ -192,7 +180,7 @@
192
180
  .theme-preset-button {
193
181
  min-width: 120px;
194
182
  }
195
-
183
+
196
184
  .color-palette-grid {
197
185
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
198
186
  }
@@ -204,7 +192,7 @@
204
192
  .theme-preset-button {
205
193
  border-width: 2px;
206
194
  }
207
-
195
+
208
196
  .theme-color-box {
209
197
  border-width: 2px;
210
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fakhrirafiki/theme-engine",
3
- "version": "0.4.15",
3
+ "version": "0.4.18",
4
4
  "description": "Elegant theming system with smooth transitions, custom presets, semantic accent colors, and complete shadcn/ui support for modern React applications",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "type": "git",
38
38
  "url": "git+https://github.com/fakhrirafiki/theme-engine.git"
39
39
  },
40
- "homepage": "https://github.com/fakhrirafiki/theme-engine",
40
+ "homepage": "https://theme-engine-example.vercel.app/",
41
41
  "bugs": {
42
42
  "url": "https://github.com/fakhrirafiki/theme-engine/issues"
43
43
  },