drizzle-cube 0.1.31 → 0.1.33

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,63 @@ 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
+ ✅ **Light/Dark Themes** - Automatic theme support with CSS custom properties
160
+
161
+ ## Theming
162
+
163
+ Drizzle Cube supports light and dark themes out of the box. All components automatically adapt to your app's theme using CSS custom properties.
164
+
165
+ ### Quick Start
166
+
167
+ ```typescript
168
+ import { isDarkMode, watchThemeChanges } from 'drizzle-cube/client'
169
+
170
+ // Toggle dark mode
171
+ document.documentElement.classList.toggle('dark')
172
+
173
+ // Or use data-theme attribute
174
+ document.documentElement.setAttribute('data-theme', 'dark')
175
+
176
+ // Watch for theme changes
177
+ watchThemeChanges((isDark) => {
178
+ console.log('Theme changed:', isDark ? 'dark' : 'light')
179
+ })
180
+ ```
181
+
182
+ ### Customization
183
+
184
+ Override CSS variables in your app's stylesheet:
185
+
186
+ ```css
187
+ :root {
188
+ --dc-primary: #3b82f6; /* Primary color */
189
+ --dc-surface: #ffffff; /* Background */
190
+ --dc-text: #111827; /* Text color */
191
+ }
192
+
193
+ .dark {
194
+ --dc-primary: #60a5fa;
195
+ --dc-surface: #1e293b;
196
+ --dc-text: #f1f5f9;
197
+ }
198
+ ```
199
+
200
+ **[Complete Theming Guide →](./docs/THEMING.md)**
158
201
 
159
202
  ## Documentation
160
203