drizzle-cube 0.1.32 → 0.1.34

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
@@ -141,20 +141,78 @@ function App() {
141
141
 
142
142
  ## Key Features
143
143
 
144
- 🔒 **SQL Injection Proof** - All queries use Drizzle's parameterized SQL
145
- 🛡️ **Type Safe** - Full TypeScript inference from your database schema
146
- ⚡ **Performance** - Prepared statements and query optimization
147
- 🧩 **Cube.js Compatible** - Works with existing Cube.js React components
144
+ 🔒 **SQL Injection Proof** - All queries use Drizzle's parameterized SQL
145
+ 🛡️ **Type Safe** - Full TypeScript inference from your database schema
146
+ ⚡ **Performance** - Prepared statements and query optimization
147
+ 🧩 **Cube.js Compatible** - Works with existing Cube.js React components
148
148
  🎯 **Zero Config** - Infer cube definitions from your Drizzle schema
149
+ 🎨 **Themeable** - Built-in light/dark themes with CSS variables
149
150
 
150
151
 
151
152
  ## Supported Features
152
153
 
153
- ✅ **Multiple Database Types** - PostgreSQL, MySQL
154
- ✅ **Framework Adapters** - Hono, Express, Fastify, Next.js
155
- ✅ **Full Type Safety** - Complete TypeScript inference
156
- ✅ **All SQL Features** - Joins, CTEs, subqueries, window functions
154
+ ✅ **Multiple Database Types** - PostgreSQL, MySQL
155
+ ✅ **Framework Adapters** - Hono, Express, Fastify, Next.js
156
+ ✅ **Full Type Safety** - Complete TypeScript inference
157
+ ✅ **All SQL Features** - Joins, CTEs, subqueries, window functions
157
158
  ✅ **Cube.js Compatibility** - Drop-in replacement for existing apps
159
+ ✅ **Scalable Theming** - Built-in themes (light/dark/neon) with semantic CSS variables
160
+
161
+ ## Theming
162
+
163
+ Drizzle Cube features a **scalable semantic theming system** with three built-in themes. All components automatically adapt using CSS variables - no component changes needed when adding new themes!
164
+
165
+ ### Built-in Themes
166
+
167
+ 🌞 **Light** - Clean white backgrounds with blue accents
168
+ 🌙 **Dark** - Slate grays with lighter blue highlights
169
+ ⚡ **Neon** - Bold fluorescent colors with deep purple backgrounds
170
+
171
+ ### Quick Start
172
+
173
+ ```typescript
174
+ import { getTheme, setTheme, watchThemeChanges } from 'drizzle-cube/client'
175
+
176
+ // Set a theme programmatically
177
+ setTheme('neon') // 'light' | 'dark' | 'neon'
178
+
179
+ // Get current theme
180
+ const currentTheme = getTheme()
181
+
182
+ // Watch for theme changes
183
+ watchThemeChanges((theme) => {
184
+ console.log('Theme changed:', theme)
185
+ })
186
+ ```
187
+
188
+ ### Adding Custom Themes
189
+
190
+ Create your own theme by defining CSS variables - **zero component changes required**:
191
+
192
+ ```css
193
+ [data-theme="ocean"] {
194
+ /* Surface colors */
195
+ --dc-surface: #001f3f;
196
+ --dc-surface-secondary: #002b5c;
197
+ --dc-card-bg: #003366;
198
+
199
+ /* Text colors */
200
+ --dc-text: #e6f7ff;
201
+ --dc-text-secondary: #b3d9ff;
202
+
203
+ /* Primary/accent colors */
204
+ --dc-primary: #39cccc;
205
+ --dc-border: #004d66;
206
+ /* ... other semantic variables */
207
+ }
208
+ ```
209
+
210
+ Then update your theme toggle to include the new theme:
211
+ ```typescript
212
+ setTheme('ocean') // It just works! ✨
213
+ ```
214
+
215
+ **[Complete Theming Guide →](./docs/THEMING.md)**
158
216
 
159
217
  ## Documentation
160
218