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 +51 -8
- package/dist/adapters/{compiler-CVega_Gv.js → compiler-Ce33cdy6.js} +925 -896
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-MTxju0dv.js → charts-D4v7aUDh.js} +268 -244
- package/dist/client/chunks/charts-D4v7aUDh.js.map +1 -0
- package/dist/client/chunks/components-BXU3r9yv.js +19905 -0
- package/dist/client/chunks/components-BXU3r9yv.js.map +1 -0
- package/dist/client/chunks/{icons-C_McHd9z.js → icons-CEfXECaS.js} +174 -298
- package/dist/client/chunks/icons-CEfXECaS.js.map +1 -0
- package/dist/client/components/Modal.d.ts +1 -1
- package/dist/client/components.js +16 -19642
- package/dist/client/components.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +31 -24
- package/dist/client/styles.css +1 -1
- package/dist/client/theme/index.d.ts +101 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.d.ts +11 -2
- package/dist/server/index.js +1258 -1229
- package/package.json +2 -2
- package/dist/client/chunks/charts-MTxju0dv.js.map +0 -1
- package/dist/client/chunks/icons-C_McHd9z.js.map +0 -1
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
|
|