nextworks 0.2.0-alpha.7 → 0.2.0-alpha.8

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.
Files changed (55) hide show
  1. package/dist/commands/blocks.js +5 -5
  2. package/dist/commands/blocks.js.map +1 -1
  3. package/dist/commands/remove-blocks.js +1 -1
  4. package/dist/commands/remove-blocks.js.map +1 -1
  5. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -269
  6. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
  7. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
  8. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
  9. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
  10. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
  11. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
  12. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
  13. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
  14. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +1 -2
  15. package/dist/kits/blocks/app/templates/gallery/page.tsx +300 -303
  16. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +1 -0
  17. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +0 -94
  18. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +2 -45
  19. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +4 -11
  20. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +1 -2
  21. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +1 -1
  22. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +6 -7
  23. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +8 -54
  24. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +1 -1
  25. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +1 -1
  26. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +1 -1
  27. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +1 -1
  28. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +2 -1
  29. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +1 -1
  30. package/dist/kits/blocks/app/templates/saasdashboard/README.md +1 -1
  31. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +0 -47
  32. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +2 -2
  33. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +0 -1
  34. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +0 -1
  35. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +0 -1
  36. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +4 -46
  37. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +3 -4
  38. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +1 -1
  39. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +17 -5
  40. package/dist/kits/blocks/components/sections/CTA.tsx +0 -1
  41. package/dist/kits/blocks/components/sections/FAQ.tsx +0 -11
  42. package/dist/kits/blocks/components/sections/Features.tsx +2 -4
  43. package/dist/kits/blocks/components/sections/HeroMotion.tsx +1 -1
  44. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +2 -2
  45. package/dist/kits/blocks/components/sections/HeroSplit.tsx +1 -1
  46. package/dist/kits/blocks/components/sections/Navbar.tsx +1 -4
  47. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +0 -1
  48. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +1 -1
  49. package/dist/kits/blocks/components/theme-provider.tsx +0 -33
  50. package/dist/kits/blocks/components/ui/theme-selector.tsx +0 -4
  51. package/dist/kits/blocks/lib/utils.ts +0 -3
  52. package/dist/kits/blocks/package-deps.json +40 -40
  53. package/dist/utils/package-manager.js +1 -1
  54. package/dist/utils/package-manager.js.map +1 -1
  55. package/package.json +1 -1
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.addBlocks = addBlocks;
40
- // inquirer is ESM-only. Use dynamic import() at runtime to avoid require() errors when CLI is compiled to CommonJS.
40
+ // `inquirer` is ESM-only; load it via runtime `import()` for CJS builds and fall back if unavailable.
41
41
  const file_operations_1 = require("../utils/file-operations");
42
42
  const installation_tracker_1 = require("../utils/installation-tracker");
43
43
  const package_manager_1 = require("../utils/package-manager");
@@ -204,8 +204,8 @@ async function addBlocks(options = {}) {
204
204
  }
205
205
  const appRouterLayoutExists = await (0, file_operations_1.fileExists)(detectedLayoutPath);
206
206
  const pagesRouterAppExists = await (0, file_operations_1.fileExists)(detectedPagesAppPath);
207
- // Hybrid projects (common with create-next-app) may have both /app and /pages.
208
- // In that case we should patch BOTH entrypoints so routes in either router
207
+ // Hybrid projects may have both /app and /pages.
208
+ // In that case patch BOTH entrypoints so routes in either router
209
209
  // are wrapped with providers.
210
210
  if (appRouterLayoutExists && pagesRouterAppExists) {
211
211
  try {
@@ -288,7 +288,7 @@ async function addBlocks(options = {}) {
288
288
  // Make app-providers.tsx point at the Pages-safe implementation.
289
289
  // (The kit defaults to App Router; Pages Router can't import @nextworks/blocks-core/server.)
290
290
  //
291
- // Patch whichever path exists (some repos have src/pages but root-level components/).
291
+ // Patch whichever path exists.
292
292
  const candidateAppProvidersPaths = [
293
293
  "components/app-providers.tsx",
294
294
  "src/components/app-providers.tsx",
@@ -321,7 +321,7 @@ async function addBlocks(options = {}) {
321
321
  // Make app-providers.tsx point at the Pages-safe implementation.
322
322
  // (The kit defaults to App Router; Pages Router can't import @nextworks/blocks-core/server.)
323
323
  //
324
- // Patch whichever path exists (some repos have src/pages but root-level components/).
324
+ // Patch whichever path exists.
325
325
  const candidateAppProvidersPaths = [
326
326
  "components/app-providers.tsx",
327
327
  "src/components/app-providers.tsx",
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../src/commands/blocks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,8BA2bC;AAteD,oHAAoH;AACpH,8DAUkC;AAClC,wEAAgE;AAChE,8DAGkC;AAClC,gDAAwB;AA0BjB,KAAK,UAAU,SAAS,CAAC,UAA4B,EAAE;IAC5D,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IAExC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,kCAAgB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,MAAM,YAAY,GAAG,IAAA,kCAAgB,EACnC,eAAe,EACf,sBAAsB,CACvB,CAAC;QAEF,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,8BAAY,EAAC,YAAY,CAAC,CAAmB,CAAC;QAEtE,kCAAkC;QAClC,wFAAwF;QACxF,YAAY;QACZ,8DAA8D;QAC9D,8CAA8C;QAC9C,gDAAgD;QAChD,2EAA2E;QAC3E,8EAA8E;QAC9E,MAAM,cAAc,GAAa,EAAE,CAAC;QAEpC,MAAM,YAAY,GAChB,OAAO,OAAO,CAAC,QAAQ,KAAK,SAAS;YACrC,OAAO,OAAO,CAAC,SAAS,KAAK,SAAS;YACtC,OAAO,OAAO,CAAC,OAAO,KAAK,SAAS;YACpC,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC;QAEtC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,sCAAsC;YACtC,MAAM,eAAe,GAAa,QAAQ,CAAC,MAAM;gBAC/C,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,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AO,CAAC,GAAG,CACT,2GAA2G,CAC5G,CAAC;YACF,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YACrD,OAAO,CAAC,GAAG,CACT,kIAAkI,CACnI,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;QAC9C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -10,7 +10,7 @@ async function removeBlocks(options) {
10
10
  const config = await (0, installation_tracker_1.getLpkConfig)();
11
11
  const installed = config.installedKits.find((k) => k.name === "blocks");
12
12
  // Prefer removing exactly what was installed (tracked in .nextworks/config.json)
13
- // so we don't accidentally delete user-owned files or miss router-mapped paths.
13
+ // to avoid accidentally deleting user-owned files or missing router-mapped paths.
14
14
  let files = installed?.files ?? [];
15
15
  // Fallback: if the kit isn't tracked (older installs), remove the union of
16
16
  // manifest groups plus manifest.files.
@@ -1 +1 @@
1
- {"version":3,"file":"remove-blocks.js","sourceRoot":"","sources":["../../src/commands/remove-blocks.ts"],"names":[],"mappings":";;AAiBA,oCA0EC;AA3FD,8DAMkC;AAClC,wEAIuC;AACvC,8DAGkC;AAE3B,KAAK,UAAU,YAAY,CAAC,OAGlC;IACC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAEtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAY,GAAE,CAAC;QACpC,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QAExE,iFAAiF;QACjF,gFAAgF;QAChF,IAAI,KAAK,GAAa,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC;QAE7C,2EAA2E;QAC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AAC;QAClD,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,IAAA,sCAAoB,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,UAAU,GAAG,IAAA,mCAAiB,EAAC,EAAE,CAAC,CAAC;QAEzC,OAAO,CAAC,GAAG,CACT,6BAA6B,UAAU,4BAA4B,CACpE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC7C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,269 +1,269 @@
1
- # Theme System Guide
2
-
3
- This file is shipped with the Nextworks Blocks kit and lives under `.nextworks/docs/THEME_GUIDE.md` in your project.
4
-
5
- The content below is the canonical theme guide for projects using Nextworks Blocks.
6
-
7
- ---
8
-
9
- ## Overview
10
-
11
- This project now includes a comprehensive theming system that allows you to easily switch between different color schemes and have all components automatically adapt.
12
-
13
- ## How to Use
14
-
15
- ### 1. Basic Setup
16
-
17
- Your app is configured with the enhanced theme provider via `AppProviders` in your router entrypoint:
18
-
19
- - App Router: `app/layout.tsx`
20
- - Pages Router: `pages/_app.tsx`
21
-
22
- **Turbopack / Next 16 note (fonts + AppProviders)**
23
-
24
- As of the current alpha, shared packages intentionally avoid importing `next/font/*`.
25
- Fonts are instead configured directly in your app’s router entrypoint (the CLI patches this for you):
26
-
27
- - App Router: `app/layout.tsx`
28
- - Pages Router: `pages/_app.tsx`
29
- This avoids Turbopack dev issues related to internal Next font modules.
30
-
31
- If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
32
-
33
- ```bash
34
- npx nextworks@latest add blocks --sections --templates
35
- ```
36
-
37
- to re-apply the router entrypoint patch, and ensure your entrypoint contains a valid
38
- `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
39
-
40
- The default theme variant is set to "monochrome".
41
-
42
- ### 2. Available Themes
43
-
44
- - **Monochrome** - Clean black and white theme
45
- - **Blue** - Professional blue color scheme
46
- - **Green** - Fresh green color scheme
47
- - **Purple** - Modern purple color scheme
48
- - **Orange** - Vibrant orange color scheme
49
- - **Default** - Standard shadCN theme
50
-
51
- ### 3. Using Theme-Aware Components
52
-
53
- #### Navbar2 Component
54
-
55
- ```tsx
56
- import { Navbar2 } from "@/components/sections/Navbar2";
57
-
58
- <Navbar2
59
- brand="My App"
60
- brandNode={<YourLogoComponent />}
61
- menuItems={[
62
- { label: "Home", href: "/" },
63
- { label: "About", href: "/about" },
64
- ]}
65
- ctaButton={{ label: "Get Started", href: "/signup" }}
66
- showThemeSelector={true}
67
- />;
68
- ```
69
-
70
- #### Theme Selector
71
-
72
- The `ThemeSelector` component is automatically included in Navbar2 and allows users to:
73
-
74
- - Switch between theme variants (monochrome, blue, green, etc.)
75
- - Toggle between light/dark modes
76
- - Use system preference
77
-
78
- ### 4. Converting Existing Components
79
-
80
- To make your existing components theme-aware, replace hardcoded colors with semantic classes:
81
-
82
- #### Before (Hardcoded Colors):
83
-
84
- ```tsx
85
- className = "bg-gray-50 dark:bg-gray-800 text-gray-800 dark:text-white";
86
- ```
87
-
88
- #### After (Theme-Aware):
89
-
90
- ```tsx
91
- className = "bg-background text-foreground";
92
- ```
93
-
94
- #### Common Replacements:
95
-
96
- - `text-gray-800 dark:text-white` → `text-foreground`
97
- - `bg-gray-50 dark:bg-gray-800` → `bg-background`
98
- - `border-gray-200 dark:border-gray-700` → `border-border`
99
- - `hover:bg-gray-100 dark:hover:bg-gray-700` → `hover:bg-accent`
100
- - `text-blue-600 dark:text-blue-500` → `text-primary`
101
-
102
- ### 5. Semantic Color Classes
103
-
104
- Use these semantic classes for consistent theming:
105
-
106
- - `text-primary` - Primary brand color
107
- - `text-secondary` - Secondary text color
108
- - `text-muted-foreground` - Muted text color
109
- - `bg-background` - Main background color
110
- - `bg-card` - Card background color
111
- - `bg-accent` - Accent background color
112
- - `border-border` - Border color
113
- - `ring-ring` - Focus ring color
114
-
115
- ### 6. Creating Custom Themes
116
-
117
- To create a custom theme, modify `lib/themes.ts`:
118
-
119
- ```ts
120
- export const themes: Record<ThemeVariant, ThemeConfig> = {
121
- // ... existing themes
122
- myCustomTheme: {
123
- name: "My Custom Theme",
124
- colors: {
125
- primary: "oklch(0.5 0.2 120)", // Custom green
126
- primaryForeground: "oklch(0.98 0 0)",
127
- // ... other colors
128
- },
129
- },
130
- };
131
- ```
132
-
133
- ### 7. Example Usage
134
-
135
- See the templates and `lib/themes.ts` for concrete examples of how themes are wired up.
136
-
137
- Template paths depend on your router:
138
-
139
- - App Router: `app/templates/<template>/**`
140
- - Pages Router:
141
- - route entry file: `pages/templates/<template>/index.tsx`
142
- - supporting template files: `components/templates/<template>/**`
143
-
144
- ## Benefits
145
-
146
- 1. **Consistent Design**: All components automatically use the same color scheme
147
- 2. **Easy Customization**: Change the entire app's look by switching themes
148
- 3. **Accessibility**: Proper contrast ratios maintained across all themes
149
- 4. **Developer Experience**: No need to manually style each component
150
- 5. **User Choice**: Users can choose their preferred theme and light/dark mode
151
-
152
- ---
153
-
154
- ## Mixing tokens and local overrides
155
-
156
- Sometimes you want the speed and consistency of the Color Theme (tokens), but still make template-specific tweaks. This project supports three patterns:
157
-
158
- - Token-first: use semantic classes/variants everywhere (default behavior)
159
- - Hybrid: keep tokens for most things and override specific slots/elements
160
- - Full control: bypass tokens with unstyled primitives and fully custom classes
161
-
162
- ### 1) Prefer additive overrides first
163
-
164
- - Keep variant/size from tokens and add className for small tweaks.
165
- - Use component slot props for targeted overrides rather than global changes.
166
-
167
- Example: override only mobile link hover background in the shared Navbar from a preset, leaving everything else token-based.
168
-
169
- ```tsx
170
- // App Router install:
171
- // app/templates/productlaunch/components/Navbar.tsx
172
- //
173
- // Pages Router install:
174
- // components/templates/productlaunch/components/Navbar.tsx
175
- mobileLinks: {
176
- className: "hover:bg-purple-50 dark:hover:bg-purple-900/20",
177
- },
178
- ```
179
-
180
- ### 2) Override focus ring colors locally
181
-
182
- Links in Navbar apply a token focus ring (`focus:ring-ring`). You can override it per preset by placing your ring utilities in `links.className` (these are merged last):
183
-
184
- ```tsx
185
- // App Router install:
186
- // app/templates/productlaunch/components/Navbar.tsx
187
- //
188
- // Pages Router install:
189
- // components/templates/productlaunch/components/Navbar.tsx
190
- links: {
191
- className:
192
- "text-sm font-medium font-inter text-gray-800 dark:text-white hover:text-purple-700 dark:hover:text-purple-500 " +
193
- "focus:ring-purple-500 dark:focus:ring-purple-400",
194
- },
195
- ```
196
-
197
- ### 3) ThemeToggle with local styling
198
-
199
- `ThemeToggle` accepts `buttonProps` that forward to the internal `Button`. For small tweaks, keep token variants and just add classes. For full control, use `unstyled: true` to bypass tokens:
200
-
201
- ```tsx
202
- // App Router install:
203
- // app/templates/productlaunch/components/Navbar.tsx
204
- //
205
- // Pages Router install:
206
- // components/templates/productlaunch/components/Navbar.tsx
207
- themeToggle: {
208
- buttonProps: {
209
- unstyled: true,
210
- className:
211
- "size-9 p-0 flex items-center justify-center rounded-md border border-gray-200 " +
212
- "bg-white text-gray-700 hover:bg-purple-50 hover:text-purple-700 " +
213
- "dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-purple-900/20 " +
214
- "transition-colors focus:outline-none focus:ring-2 focus:ring-purple-500 dark:focus:ring-purple-400",
215
- },
216
- moonClassName: "text-gray-700 dark:text-gray-100",
217
- sunClassName: "text-gray-700 dark:text-gray-100",
218
- },
219
- ```
220
-
221
- ### 4) Unstyled escape hatch for primitives
222
-
223
- Shared primitives like `Button` support an `unstyled` prop to bypass tokenized CVA classes and allow complete consumer control:
224
-
225
- ```tsx
226
- // components/ui/button.tsx
227
- <Button unstyled className="rounded-md bg-purple-600 px-3 py-2 text-white ...">
228
- Click me
229
- </Button>
230
- ```
231
-
232
- Use this when a section must not be influenced by the global Color Theme.
233
-
234
- ### 5) Navbar accent via CSS variables (recommended for presets)
235
-
236
- Set a small set of CSS variables on the Navbar root in your preset, and internal elements (ThemeToggle, mobile links, focus rings) will read them automatically with fallbacks to tokens.
237
-
238
- Suggested variables:
239
-
240
- - `--navbar-accent`: icon/text accent color
241
- - `--navbar-hover-bg`: hover background color for toggle and mobile links
242
- - `--navbar-toggle-bg`: default background for the theme toggle button
243
- - `--navbar-ring`: focus ring color
244
- - `--navbar-border`: border color for theme toggle and similar controls
245
-
246
- Example in a preset:
247
-
248
- ```tsx
249
- // App Router install:
250
- // app/templates/productlaunch/components/Navbar.tsx
251
- //
252
- // Pages Router install:
253
- // components/templates/productlaunch/components/Navbar.tsx
254
- nav: {
255
- className:
256
- "bg-white dark:bg-gray-900 text-gray-800 dark:text-white border-b border-gray-200 dark:border-gray-800 " +
257
- "[--navbar-accent:theme(colors.purple.600)] dark:[--navbar-accent:theme(colors.purple.400)] " +
258
- "[--navbar-hover-bg:theme(colors.purple.50)] dark:[--navbar-hover-bg:color-mix(in oklab,oklch(0.17 0.05 324) 20%, transparent)] " +
259
- "[--navbar-ring:theme(colors.purple.500)] dark:[--navbar-ring:theme(colors.purple.400)]",
260
- },
261
- ```
262
-
263
- After setting these, you generally don’t need to pass `themeToggle` overrides; the toggle and links will align to your preset accent automatically.
264
-
265
- Notes:
266
-
267
- - Consumer `className` is merged last, so your overrides win when conflicts exist.
268
- - Always include `dark:` variants when you override hover/focus to maintain dark mode parity.
269
- - Scope overrides narrowly (slots/elements) to avoid surprising global changes.
1
+ # Theme System Guide
2
+
3
+ This file is shipped with the Nextworks Blocks kit and lives under `.nextworks/docs/THEME_GUIDE.md` in your project.
4
+
5
+ The content below is the canonical theme guide for projects using Nextworks Blocks.
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ This project now includes a comprehensive theming system that allows you to easily switch between different color schemes and have all components automatically adapt.
12
+
13
+ ## How to Use
14
+
15
+ ### 1. Basic Setup
16
+
17
+ Your app is configured with the enhanced theme provider via `AppProviders` in your router entrypoint:
18
+
19
+ - App Router: `app/layout.tsx`
20
+ - Pages Router: `pages/_app.tsx`
21
+
22
+ **Turbopack / Next 16 note (fonts + AppProviders)**
23
+
24
+ As of the current alpha, shared packages intentionally avoid importing `next/font/*`.
25
+ Fonts are instead configured directly in your app’s router entrypoint (the CLI patches this for you):
26
+
27
+ - App Router: `app/layout.tsx`
28
+ - Pages Router: `pages/_app.tsx`
29
+ This avoids Turbopack dev issues related to internal Next font modules.
30
+
31
+ If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
32
+
33
+ ```bash
34
+ npx nextworks@latest add blocks --sections --templates
35
+ ```
36
+
37
+ to re-apply the router entrypoint patch, and ensure your entrypoint contains a valid
38
+ `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
39
+
40
+ The default theme variant is set to "monochrome".
41
+
42
+ ### 2. Available Themes
43
+
44
+ - **Monochrome** - Clean black and white theme
45
+ - **Blue** - Professional blue color scheme
46
+ - **Green** - Fresh green color scheme
47
+ - **Purple** - Modern purple color scheme
48
+ - **Orange** - Vibrant orange color scheme
49
+ - **Default** - Standard shadCN theme
50
+
51
+ ### 3. Using Theme-Aware Components
52
+
53
+ #### Navbar2 Component
54
+
55
+ ```tsx
56
+ import { Navbar2 } from "@/components/sections/Navbar2";
57
+
58
+ <Navbar2
59
+ brand="My App"
60
+ brandNode={<YourLogoComponent />}
61
+ menuItems={[
62
+ { label: "Home", href: "/" },
63
+ { label: "About", href: "/about" },
64
+ ]}
65
+ ctaButton={{ label: "Get Started", href: "/signup" }}
66
+ showThemeSelector={true}
67
+ />;
68
+ ```
69
+
70
+ #### Theme Selector
71
+
72
+ The `ThemeSelector` component is automatically included in Navbar2 and allows users to:
73
+
74
+ - Switch between theme variants (monochrome, blue, green, etc.)
75
+ - Toggle between light/dark modes
76
+ - Use system preference
77
+
78
+ ### 4. Converting Existing Components
79
+
80
+ To make your existing components theme-aware, replace hardcoded colors with semantic classes:
81
+
82
+ #### Before (Hardcoded Colors):
83
+
84
+ ```tsx
85
+ className = "bg-gray-50 dark:bg-gray-800 text-gray-800 dark:text-white";
86
+ ```
87
+
88
+ #### After (Theme-Aware):
89
+
90
+ ```tsx
91
+ className = "bg-background text-foreground";
92
+ ```
93
+
94
+ #### Common Replacements:
95
+
96
+ - `text-gray-800 dark:text-white` → `text-foreground`
97
+ - `bg-gray-50 dark:bg-gray-800` → `bg-background`
98
+ - `border-gray-200 dark:border-gray-700` → `border-border`
99
+ - `hover:bg-gray-100 dark:hover:bg-gray-700` → `hover:bg-accent`
100
+ - `text-blue-600 dark:text-blue-500` → `text-primary`
101
+
102
+ ### 5. Semantic Color Classes
103
+
104
+ Use these semantic classes for consistent theming:
105
+
106
+ - `text-primary` - Primary brand color
107
+ - `text-secondary` - Secondary text color
108
+ - `text-muted-foreground` - Muted text color
109
+ - `bg-background` - Main background color
110
+ - `bg-card` - Card background color
111
+ - `bg-accent` - Accent background color
112
+ - `border-border` - Border color
113
+ - `ring-ring` - Focus ring color
114
+
115
+ ### 6. Creating Custom Themes
116
+
117
+ To create a custom theme, modify `lib/themes.ts`:
118
+
119
+ ```ts
120
+ export const themes: Record<ThemeVariant, ThemeConfig> = {
121
+ // ... existing themes
122
+ myCustomTheme: {
123
+ name: "My Custom Theme",
124
+ colors: {
125
+ primary: "oklch(0.5 0.2 120)", // Custom green
126
+ primaryForeground: "oklch(0.98 0 0)",
127
+ // ... other colors
128
+ },
129
+ },
130
+ };
131
+ ```
132
+
133
+ ### 7. Example Usage
134
+
135
+ See the templates and `lib/themes.ts` for concrete examples of how themes are wired up.
136
+
137
+ Template paths depend on your router:
138
+
139
+ - App Router: `app/templates/<template>/**`
140
+ - Pages Router:
141
+ - route entry file: `pages/templates/<template>/index.tsx`
142
+ - supporting template files: `components/templates/<template>/**`
143
+
144
+ ## Benefits
145
+
146
+ 1. **Consistent Design**: All components automatically use the same color scheme
147
+ 2. **Easy Customization**: Change the entire app's look by switching themes
148
+ 3. **Accessibility**: Proper contrast ratios maintained across all themes
149
+ 4. **Developer Experience**: No need to manually style each component
150
+ 5. **User Choice**: Users can choose their preferred theme and light/dark mode
151
+
152
+ ---
153
+
154
+ ## Mixing tokens and local overrides
155
+
156
+ Sometimes you want the speed and consistency of the Color Theme (tokens), but still make template-specific tweaks. This project supports three patterns:
157
+
158
+ - Token-first: use semantic classes/variants everywhere (default behavior)
159
+ - Hybrid: keep tokens for most things and override specific slots/elements
160
+ - Full control: bypass tokens with unstyled primitives and fully custom classes
161
+
162
+ ### 1) Prefer additive overrides first
163
+
164
+ - Keep variant/size from tokens and add className for small tweaks.
165
+ - Use component slot props for targeted overrides rather than global changes.
166
+
167
+ Example: override only mobile link hover background in the shared Navbar from a preset, leaving everything else token-based.
168
+
169
+ ```tsx
170
+ // App Router install:
171
+ // app/templates/productlaunch/components/Navbar.tsx
172
+ //
173
+ // Pages Router install:
174
+ // components/templates/productlaunch/components/Navbar.tsx
175
+ mobileLinks: {
176
+ className: "hover:bg-purple-50 dark:hover:bg-purple-900/20",
177
+ },
178
+ ```
179
+
180
+ ### 2) Override focus ring colors locally
181
+
182
+ Links in Navbar apply a token focus ring (`focus:ring-ring`). You can override it per preset by placing your ring utilities in `links.className` (these are merged last):
183
+
184
+ ```tsx
185
+ // App Router install:
186
+ // app/templates/productlaunch/components/Navbar.tsx
187
+ //
188
+ // Pages Router install:
189
+ // components/templates/productlaunch/components/Navbar.tsx
190
+ links: {
191
+ className:
192
+ "text-sm font-medium font-inter text-gray-800 dark:text-white hover:text-purple-700 dark:hover:text-purple-500 " +
193
+ "focus:ring-purple-500 dark:focus:ring-purple-400",
194
+ },
195
+ ```
196
+
197
+ ### 3) ThemeToggle with local styling
198
+
199
+ `ThemeToggle` accepts `buttonProps` that forward to the internal `Button`. For small tweaks, keep token variants and just add classes. For full control, use `unstyled: true` to bypass tokens:
200
+
201
+ ```tsx
202
+ // App Router install:
203
+ // app/templates/productlaunch/components/Navbar.tsx
204
+ //
205
+ // Pages Router install:
206
+ // components/templates/productlaunch/components/Navbar.tsx
207
+ themeToggle: {
208
+ buttonProps: {
209
+ unstyled: true,
210
+ className:
211
+ "size-9 p-0 flex items-center justify-center rounded-md border border-gray-200 " +
212
+ "bg-white text-gray-700 hover:bg-purple-50 hover:text-purple-700 " +
213
+ "dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-purple-900/20 " +
214
+ "transition-colors focus:outline-none focus:ring-2 focus:ring-purple-500 dark:focus:ring-purple-400",
215
+ },
216
+ moonClassName: "text-gray-700 dark:text-gray-100",
217
+ sunClassName: "text-gray-700 dark:text-gray-100",
218
+ },
219
+ ```
220
+
221
+ ### 4) Unstyled escape hatch for primitives
222
+
223
+ Shared primitives like `Button` support an `unstyled` prop to bypass tokenized CVA classes and allow complete consumer control:
224
+
225
+ ```tsx
226
+ // components/ui/button.tsx
227
+ <Button unstyled className="rounded-md bg-purple-600 px-3 py-2 text-white ...">
228
+ Click me
229
+ </Button>
230
+ ```
231
+
232
+ Use this when a section must not be influenced by the global Color Theme.
233
+
234
+ ### 5) Navbar accent via CSS variables (recommended for presets)
235
+
236
+ Set a small set of CSS variables on the Navbar root in your preset, and internal elements (ThemeToggle, mobile links, focus rings) will read them automatically with fallbacks to tokens.
237
+
238
+ Suggested variables:
239
+
240
+ - `--navbar-accent`: icon/text accent color
241
+ - `--navbar-hover-bg`: hover background color for toggle and mobile links
242
+ - `--navbar-toggle-bg`: default background for the theme toggle button
243
+ - `--navbar-ring`: focus ring color
244
+ - `--navbar-border`: border color for theme toggle and similar controls
245
+
246
+ Example in a preset:
247
+
248
+ ```tsx
249
+ // App Router install:
250
+ // app/templates/productlaunch/components/Navbar.tsx
251
+ //
252
+ // Pages Router install:
253
+ // components/templates/productlaunch/components/Navbar.tsx
254
+ nav: {
255
+ className:
256
+ "bg-white dark:bg-gray-900 text-gray-800 dark:text-white border-b border-gray-200 dark:border-gray-800 " +
257
+ "[--navbar-accent:theme(colors.purple.600)] dark:[--navbar-accent:theme(colors.purple.400)] " +
258
+ "[--navbar-hover-bg:theme(colors.purple.50)] dark:[--navbar-hover-bg:color-mix(in oklab,oklch(0.17 0.05 324) 20%, transparent)] " +
259
+ "[--navbar-ring:theme(colors.purple.500)] dark:[--navbar-ring:theme(colors.purple.400)]",
260
+ },
261
+ ```
262
+
263
+ After setting these, you generally don’t need to pass `themeToggle` overrides; the toggle and links will align to your preset accent automatically.
264
+
265
+ Notes:
266
+
267
+ - Consumer `className` is merged last, so your overrides win when conflicts exist.
268
+ - Always include `dark:` variants when you override hover/focus to maintain dark mode parity.
269
+ - Scope overrides narrowly (slots/elements) to avoid surprising global changes.