@kilivi/payloadcms-theme-management 0.5.6 → 0.5.7
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 +34 -38
- package/dist/components/ServerThemeInjector.d.ts.map +1 -1
- package/dist/components/ServerThemeInjector.js +1 -11
- package/dist/components/ServerThemeInjector.js.map +1 -1
- package/dist/components/ThemePreview.d.ts.map +1 -1
- package/dist/components/ThemePreview.js +3 -3
- package/dist/components/ThemePreview.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/providers/Theme/themeConfig.d.ts.map +1 -1
- package/dist/providers/Theme/themeConfig.js +256 -8
- package/dist/providers/Theme/themeConfig.js.map +1 -1
- package/dist/providers/Theme/types.d.ts +5 -3
- package/dist/providers/Theme/types.d.ts.map +1 -1
- package/dist/providers/Theme/types.js +34 -13
- package/dist/providers/Theme/types.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/utils/generateThemeCSS.d.ts +11 -0
- package/dist/utils/generateThemeCSS.d.ts.map +1 -0
- package/dist/utils/generateThemeCSS.js +309 -0
- package/dist/utils/generateThemeCSS.js.map +1 -0
- package/dist/utils/resolveThemeConfiguration.d.ts +1 -1
- package/dist/utils/resolveThemeConfiguration.d.ts.map +1 -1
- package/dist/utils/resolveThemeConfiguration.js +3 -3
- package/dist/utils/resolveThemeConfiguration.js.map +1 -1
- package/dist/utils/themeAssets.d.ts +7 -0
- package/dist/utils/themeAssets.d.ts.map +1 -1
- package/dist/utils/themeAssets.js +23 -35
- package/dist/utils/themeAssets.js.map +1 -1
- package/dist/utils/themeCSS.d.ts +11 -0
- package/dist/utils/themeCSS.d.ts.map +1 -0
- package/dist/utils/themeCSS.js +32 -0
- package/dist/utils/themeCSS.js.map +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export const themeConfigs = {
|
|
|
3
3
|
name: 'cool',
|
|
4
4
|
label: 'Cool & Professional',
|
|
5
5
|
borderRadius: 'medium',
|
|
6
|
-
|
|
6
|
+
dynamicCSS: true,
|
|
7
7
|
preview: {
|
|
8
8
|
colors: {
|
|
9
9
|
primary: 'hsl(221 83% 53%)',
|
|
@@ -16,7 +16,7 @@ export const themeConfigs = {
|
|
|
16
16
|
name: 'brutal',
|
|
17
17
|
label: 'Modern Brutalism',
|
|
18
18
|
borderRadius: 'none',
|
|
19
|
-
|
|
19
|
+
dynamicCSS: true,
|
|
20
20
|
preview: {
|
|
21
21
|
colors: {
|
|
22
22
|
primary: 'hsl(0 0% 0%)',
|
|
@@ -29,7 +29,7 @@ export const themeConfigs = {
|
|
|
29
29
|
name: 'neon',
|
|
30
30
|
label: 'Neon Cyberpunk',
|
|
31
31
|
borderRadius: 'medium',
|
|
32
|
-
|
|
32
|
+
dynamicCSS: true,
|
|
33
33
|
preview: {
|
|
34
34
|
colors: {
|
|
35
35
|
primary: 'hsl(263 90% 51%)',
|
|
@@ -42,7 +42,7 @@ export const themeConfigs = {
|
|
|
42
42
|
name: 'solar',
|
|
43
43
|
label: 'Solar',
|
|
44
44
|
borderRadius: 'large',
|
|
45
|
-
|
|
45
|
+
dynamicCSS: true,
|
|
46
46
|
preview: {
|
|
47
47
|
colors: {
|
|
48
48
|
primary: 'hsl(20 90% 45%)',
|
|
@@ -55,7 +55,7 @@ export const themeConfigs = {
|
|
|
55
55
|
name: 'dealership',
|
|
56
56
|
label: 'Dealership',
|
|
57
57
|
borderRadius: 'medium',
|
|
58
|
-
|
|
58
|
+
dynamicCSS: true,
|
|
59
59
|
preview: {
|
|
60
60
|
colors: {
|
|
61
61
|
primary: 'hsl(225 25% 25%)',
|
|
@@ -68,7 +68,7 @@ export const themeConfigs = {
|
|
|
68
68
|
name: 'real-estate',
|
|
69
69
|
label: 'Real Estate Blue',
|
|
70
70
|
borderRadius: 'large',
|
|
71
|
-
|
|
71
|
+
dynamicCSS: true,
|
|
72
72
|
preview: {
|
|
73
73
|
colors: {
|
|
74
74
|
primary: 'hsl(220 90% 48%)',
|
|
@@ -81,7 +81,7 @@ export const themeConfigs = {
|
|
|
81
81
|
name: 'real-estate-gold',
|
|
82
82
|
label: 'Real Estate Gold',
|
|
83
83
|
borderRadius: 'large',
|
|
84
|
-
|
|
84
|
+
dynamicCSS: true,
|
|
85
85
|
preview: {
|
|
86
86
|
colors: {
|
|
87
87
|
primary: 'hsl(38 75% 45%)',
|
|
@@ -94,7 +94,7 @@ export const themeConfigs = {
|
|
|
94
94
|
name: 'real-estate-neutral',
|
|
95
95
|
label: 'Real Estate Neutral',
|
|
96
96
|
borderRadius: 'large',
|
|
97
|
-
|
|
97
|
+
dynamicCSS: true,
|
|
98
98
|
preview: {
|
|
99
99
|
colors: {
|
|
100
100
|
primary: 'hsl(25 35% 25%)',
|
|
@@ -102,6 +102,254 @@ export const themeConfigs = {
|
|
|
102
102
|
accent: 'hsl(35 25% 45%)'
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
},
|
|
106
|
+
// Extended 20 color themes (Dynamic CSS generation)
|
|
107
|
+
cyberpunk: {
|
|
108
|
+
name: 'cyberpunk',
|
|
109
|
+
label: 'Cyberpunk Neon',
|
|
110
|
+
borderRadius: 'large',
|
|
111
|
+
dynamicCSS: true,
|
|
112
|
+
preview: {
|
|
113
|
+
colors: {
|
|
114
|
+
primary: 'hsl(320, 25%, 65%)',
|
|
115
|
+
background: 'hsl(180, 2%, 98%)',
|
|
116
|
+
accent: 'hsl(290, 22%, 75%)'
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
minimal: {
|
|
121
|
+
name: 'minimal',
|
|
122
|
+
label: 'Minimal Clean',
|
|
123
|
+
borderRadius: 'none',
|
|
124
|
+
dynamicCSS: true,
|
|
125
|
+
preview: {
|
|
126
|
+
colors: {
|
|
127
|
+
primary: 'hsl(0, 0%, 12%)',
|
|
128
|
+
background: 'hsl(0, 0%, 100%)',
|
|
129
|
+
accent: 'hsl(0, 0%, 96%)'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
retro: {
|
|
134
|
+
name: 'retro',
|
|
135
|
+
label: 'Retro Vintage',
|
|
136
|
+
borderRadius: 'small',
|
|
137
|
+
dynamicCSS: true,
|
|
138
|
+
preview: {
|
|
139
|
+
colors: {
|
|
140
|
+
primary: 'hsl(35, 18%, 55%)',
|
|
141
|
+
background: 'hsl(80, 3%, 96%)',
|
|
142
|
+
accent: 'hsl(50, 16%, 68%)'
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
pastel: {
|
|
147
|
+
name: 'pastel',
|
|
148
|
+
label: 'Pastel Soft',
|
|
149
|
+
borderRadius: 'xl',
|
|
150
|
+
dynamicCSS: true,
|
|
151
|
+
preview: {
|
|
152
|
+
colors: {
|
|
153
|
+
primary: 'hsl(270, 12%, 70%)',
|
|
154
|
+
background: 'hsl(250, 1%, 98%)',
|
|
155
|
+
accent: 'hsl(300, 8%, 85%)'
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
ocean: {
|
|
160
|
+
name: 'ocean',
|
|
161
|
+
label: 'Ocean Deep',
|
|
162
|
+
borderRadius: 'medium',
|
|
163
|
+
dynamicCSS: true,
|
|
164
|
+
preview: {
|
|
165
|
+
colors: {
|
|
166
|
+
primary: 'hsl(230, 18%, 55%)',
|
|
167
|
+
background: 'hsl(220, 2%, 97%)',
|
|
168
|
+
accent: 'hsl(190, 15%, 68%)'
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
forest: {
|
|
173
|
+
name: 'forest',
|
|
174
|
+
label: 'Forest Green',
|
|
175
|
+
borderRadius: 'medium',
|
|
176
|
+
dynamicCSS: true,
|
|
177
|
+
preview: {
|
|
178
|
+
colors: {
|
|
179
|
+
primary: 'hsl(145, 16%, 52%)',
|
|
180
|
+
background: 'hsl(145, 2%, 97%)',
|
|
181
|
+
accent: 'hsl(155, 14%, 65%)'
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
sunset: {
|
|
186
|
+
name: 'sunset',
|
|
187
|
+
label: 'Sunset Warm',
|
|
188
|
+
borderRadius: 'large',
|
|
189
|
+
dynamicCSS: true,
|
|
190
|
+
preview: {
|
|
191
|
+
colors: {
|
|
192
|
+
primary: 'hsl(35, 20%, 60%)',
|
|
193
|
+
background: 'hsl(50, 3%, 97%)',
|
|
194
|
+
accent: 'hsl(20, 18%, 68%)'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
lavender: {
|
|
199
|
+
name: 'lavender',
|
|
200
|
+
label: 'Lavender Dream',
|
|
201
|
+
borderRadius: 'xl',
|
|
202
|
+
dynamicCSS: true,
|
|
203
|
+
preview: {
|
|
204
|
+
colors: {
|
|
205
|
+
primary: 'hsl(295, 16%, 62%)',
|
|
206
|
+
background: 'hsl(295, 2%, 98%)',
|
|
207
|
+
accent: 'hsl(310, 14%, 72%)'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
neutral: {
|
|
212
|
+
name: 'neutral',
|
|
213
|
+
label: 'Neutral',
|
|
214
|
+
borderRadius: 'medium',
|
|
215
|
+
dynamicCSS: true,
|
|
216
|
+
preview: {
|
|
217
|
+
colors: {
|
|
218
|
+
primary: 'hsl(0, 0%, 0%)',
|
|
219
|
+
background: 'hsl(0, 0%, 99%)',
|
|
220
|
+
accent: 'hsl(0, 0%, 94%)'
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
blue: {
|
|
225
|
+
name: 'blue',
|
|
226
|
+
label: 'Blue',
|
|
227
|
+
borderRadius: 'large',
|
|
228
|
+
dynamicCSS: true,
|
|
229
|
+
preview: {
|
|
230
|
+
colors: {
|
|
231
|
+
primary: 'hsl(221, 83%, 53%)',
|
|
232
|
+
background: 'hsl(0, 0%, 100%)',
|
|
233
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
green: {
|
|
238
|
+
name: 'green',
|
|
239
|
+
label: 'Green',
|
|
240
|
+
borderRadius: 'large',
|
|
241
|
+
dynamicCSS: true,
|
|
242
|
+
preview: {
|
|
243
|
+
colors: {
|
|
244
|
+
primary: 'hsl(85, 85%, 35%)',
|
|
245
|
+
background: 'hsl(0, 0%, 100%)',
|
|
246
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
red: {
|
|
251
|
+
name: 'red',
|
|
252
|
+
label: 'Red',
|
|
253
|
+
borderRadius: 'large',
|
|
254
|
+
dynamicCSS: true,
|
|
255
|
+
preview: {
|
|
256
|
+
colors: {
|
|
257
|
+
primary: 'hsl(0, 72%, 51%)',
|
|
258
|
+
background: 'hsl(0, 0%, 100%)',
|
|
259
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
orange: {
|
|
264
|
+
name: 'orange',
|
|
265
|
+
label: 'Orange',
|
|
266
|
+
borderRadius: 'large',
|
|
267
|
+
dynamicCSS: true,
|
|
268
|
+
preview: {
|
|
269
|
+
colors: {
|
|
270
|
+
primary: 'hsl(21, 90%, 48%)',
|
|
271
|
+
background: 'hsl(0, 0%, 100%)',
|
|
272
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
rose: {
|
|
277
|
+
name: 'rose',
|
|
278
|
+
label: 'Rose',
|
|
279
|
+
borderRadius: 'large',
|
|
280
|
+
dynamicCSS: true,
|
|
281
|
+
preview: {
|
|
282
|
+
colors: {
|
|
283
|
+
primary: 'hsl(347, 77%, 50%)',
|
|
284
|
+
background: 'hsl(0, 0%, 100%)',
|
|
285
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
violet: {
|
|
290
|
+
name: 'violet',
|
|
291
|
+
label: 'Violet',
|
|
292
|
+
borderRadius: 'large',
|
|
293
|
+
dynamicCSS: true,
|
|
294
|
+
preview: {
|
|
295
|
+
colors: {
|
|
296
|
+
primary: 'hsl(262, 83%, 58%)',
|
|
297
|
+
background: 'hsl(0, 0%, 100%)',
|
|
298
|
+
accent: 'hsl(0, 0%, 97%)'
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
zinc: {
|
|
303
|
+
name: 'zinc',
|
|
304
|
+
label: 'Zinc',
|
|
305
|
+
borderRadius: 'medium',
|
|
306
|
+
dynamicCSS: true,
|
|
307
|
+
preview: {
|
|
308
|
+
colors: {
|
|
309
|
+
primary: 'hsl(286.375, 1%, 14%)',
|
|
310
|
+
background: 'hsl(0, 0%, 100%)',
|
|
311
|
+
accent: 'hsl(286.375, 0%, 96%)'
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
slate: {
|
|
316
|
+
name: 'slate',
|
|
317
|
+
label: 'Slate',
|
|
318
|
+
borderRadius: 'medium',
|
|
319
|
+
dynamicCSS: true,
|
|
320
|
+
preview: {
|
|
321
|
+
colors: {
|
|
322
|
+
primary: 'hsl(254.624, 1%, 15%)',
|
|
323
|
+
background: 'hsl(0, 0%, 100%)',
|
|
324
|
+
accent: 'hsl(254.624, 0%, 96%)'
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
stone: {
|
|
329
|
+
name: 'stone',
|
|
330
|
+
label: 'Stone',
|
|
331
|
+
borderRadius: 'medium',
|
|
332
|
+
dynamicCSS: true,
|
|
333
|
+
preview: {
|
|
334
|
+
colors: {
|
|
335
|
+
primary: 'hsl(56.365, 1%, 14%)',
|
|
336
|
+
background: 'hsl(0, 0%, 100%)',
|
|
337
|
+
accent: 'hsl(60, 0%, 96%)'
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
gray: {
|
|
342
|
+
name: 'gray',
|
|
343
|
+
label: 'Gray',
|
|
344
|
+
borderRadius: 'medium',
|
|
345
|
+
dynamicCSS: true,
|
|
346
|
+
preview: {
|
|
347
|
+
colors: {
|
|
348
|
+
primary: 'hsl(0, 0%, 14%)',
|
|
349
|
+
background: 'hsl(0, 0%, 100%)',
|
|
350
|
+
accent: 'hsl(0, 0%, 96%)'
|
|
351
|
+
}
|
|
352
|
+
}
|
|
105
353
|
}
|
|
106
354
|
};
|
|
107
355
|
export const borderRadiusPresets = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/providers/Theme/themeConfig.ts"],"sourcesContent":["import type { ThemeConfig, ThemeDefaults } from './types.js'\n\nexport const themeConfigs: Record<ThemeDefaults, ThemeConfig> = {\n cool: {\n name: 'cool',\n label: 'Cool & Professional',\n borderRadius: 'medium',\n cssFile: '/themes/cool.css',\n preview: {\n colors: {\n primary: 'hsl(221 83% 53%)',\n background: 'hsl(0 0% 100%)',\n accent: 'hsl(210 40% 95%)',\n },\n },\n },\n brutal: {\n name: 'brutal',\n label: 'Modern Brutalism',\n borderRadius: 'none',\n cssFile: '/themes/brutal.css',\n preview: {\n colors: {\n primary: 'hsl(0 0% 0%)',\n background: 'hsl(0 0% 100%)',\n accent: 'hsl(0 72% 51%)',\n },\n },\n },\n neon: {\n name: 'neon',\n label: 'Neon Cyberpunk',\n borderRadius: 'medium',\n cssFile: '/themes/neon.css',\n preview: {\n colors: {\n primary: 'hsl(263 90% 51%)',\n background: 'hsl(230 25% 5%)',\n accent: 'hsl(180 100% 50%)',\n },\n },\n },\n solar: {\n name: 'solar',\n label: 'Solar',\n borderRadius: 'large',\n cssFile: '/themes/solar.css',\n preview: {\n colors: {\n primary: 'hsl(20 90% 45%)',\n background: 'hsl(40 30% 95%)',\n accent: 'hsl(40 100% 50%)',\n },\n },\n },\n dealership: {\n name: 'dealership',\n label: 'Dealership',\n borderRadius: 'medium',\n cssFile: '/themes/dealership.css',\n preview: {\n colors: {\n primary: 'hsl(225 25% 25%)',\n background: 'hsl(0 0% 98%)',\n accent: 'hsl(15 85% 55%)',\n },\n },\n },\n 'real-estate': {\n name: 'real-estate',\n label: 'Real Estate Blue',\n borderRadius: 'large',\n cssFile: '/themes/real-estate.css',\n preview: {\n colors: {\n primary: 'hsl(220 90% 48%)',\n background: 'hsl(220 40% 98.5%)',\n accent: 'hsl(210 85% 55%)',\n },\n },\n },\n 'real-estate-gold': {\n name: 'real-estate-gold',\n label: 'Real Estate Gold',\n borderRadius: 'large',\n cssFile: '/themes/real-estate-gold.css',\n preview: {\n colors: {\n primary: 'hsl(38 75% 45%)',\n background: 'hsl(45 25% 97%)',\n accent: 'hsl(42 85% 55%)',\n },\n },\n },\n 'real-estate-neutral': {\n name: 'real-estate-neutral',\n label: 'Real Estate Neutral',\n borderRadius: 'large',\n cssFile: '/themes/real-estate-neutral.css',\n preview: {\n colors: {\n primary: 'hsl(25 35% 25%)',\n background: 'hsl(30 8% 98%)',\n accent: 'hsl(35 25% 45%)',\n },\n },\n },\n}\n\nexport const borderRadiusPresets = {\n none: {\n label: 'None',\n value: 'none',\n css: {\n '--radius-xs': '0',\n '--radius-small': '0',\n '--radius-default': '0',\n '--radius-medium': '0',\n '--radius-large': '0',\n '--radius-xl': '0',\n },\n },\n small: {\n label: 'Small',\n value: 'small',\n css: {\n '--radius-xs': '0.125rem',\n '--radius-small': '0.25rem',\n '--radius-default': '0.375rem',\n '--radius-medium': '0.5rem',\n '--radius-large': '0.75rem',\n '--radius-xl': '1rem',\n },\n },\n medium: {\n label: 'Medium',\n value: 'medium',\n css: {\n '--radius-xs': '0.25rem',\n '--radius-small': '0.5rem',\n '--radius-default': '0.75rem',\n '--radius-medium': '1rem',\n '--radius-large': '1.5rem',\n '--radius-xl': '2rem',\n },\n },\n large: {\n label: 'Large',\n value: 'large',\n css: {\n '--radius-xs': '0.5rem',\n '--radius-small': '0.75rem',\n '--radius-default': '1rem',\n '--radius-medium': '1.5rem',\n '--radius-large': '2rem',\n '--radius-xl': '2.5rem',\n },\n },\n xl: {\n label: 'Extra Large',\n value: 'xl',\n css: {\n '--radius-xs': '0.75rem',\n '--radius-small': '1rem',\n '--radius-default': '1.5rem',\n '--radius-medium': '2rem',\n '--radius-large': '2.5rem',\n '--radius-xl': '3rem',\n },\n },\n} as const\n\nexport function getThemeConfig(theme: ThemeDefaults): ThemeConfig {\n return themeConfigs[theme]\n}\n\nexport function getBorderRadiusConfig(preset: keyof typeof borderRadiusPresets) {\n return borderRadiusPresets[preset]\n}\n"],"names":["themeConfigs","cool","name","label","borderRadius","cssFile","preview","colors","primary","background","accent","brutal","neon","solar","dealership","borderRadiusPresets","none","value","css","small","medium","large","xl","getThemeConfig","theme","getBorderRadiusConfig","preset"],"mappings":"AAEA,OAAO,MAAMA,eAAmD;IAC9DC,MAAM;QACJC,MAAM;QACNC,OAAO;QACPC,cAAc;QACdC,SAAS;QACTC,SAAS;YACPC,QAAQ;gBACNC,SAAS;gBACTC,YAAY;gBACZC,QAAQ;YACV;QACF;IACF;IACAC,QAAQ;QACNT,MAAM;QACNC,OAAO;QACPC,cAAc;QACdC,SAAS;QACTC,SAAS;YACPC,QAAQ;gBACNC,SAAS;gBACTC,YAAY;gBACZC,QAAQ;YACV;QACF;IACF;IACAE,MAAM;QACJV,MAAM;QACNC,OAAO;QACPC,cAAc;QACdC,SAAS;QACTC,SAAS;YACPC,QAAQ;gBACNC,SAAS;gBACTC,YAAY;gBACZC,QAAQ;YACV;QACF;IACF;IACAG,OAAO;QACLX,MAAM;QACNC,OAAO;QACPC,cAAc;QACdC,SAAS;QACTC,SAAS;YACPC,QAAQ;gBACNC,SAAS;gBACTC,YAAY;gBACZC,QAAQ;YACV;QACF;IACF;IACAI,YAAY;QACVZ,MAAM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B,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;AACF,EAAU;AAEV,OAAO,SAASK,eAAeC,KAAoB;IACjD,OAAOxB,YAAY,CAACwB,MAAM;AAC5B;AAEA,OAAO,SAASC,sBAAsBC,MAAwC;IAC5E,OAAOX,mBAAmB,CAACW,OAAO;AACpC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/providers/Theme/themeConfig.ts"],"sourcesContent":["import type { ThemeConfig, ThemeDefaults } from './types.js'\n\nexport const themeConfigs: Record<ThemeDefaults, ThemeConfig> = {\n cool: {\n name: 'cool',\n label: 'Cool & Professional',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(221 83% 53%)',\n background: 'hsl(0 0% 100%)',\n accent: 'hsl(210 40% 95%)',\n },\n },\n },\n brutal: {\n name: 'brutal',\n label: 'Modern Brutalism',\n borderRadius: 'none',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(0 0% 0%)',\n background: 'hsl(0 0% 100%)',\n accent: 'hsl(0 72% 51%)',\n },\n },\n },\n neon: {\n name: 'neon',\n label: 'Neon Cyberpunk',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(263 90% 51%)',\n background: 'hsl(230 25% 5%)',\n accent: 'hsl(180 100% 50%)',\n },\n },\n },\n solar: {\n name: 'solar',\n label: 'Solar',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(20 90% 45%)',\n background: 'hsl(40 30% 95%)',\n accent: 'hsl(40 100% 50%)',\n },\n },\n },\n dealership: {\n name: 'dealership',\n label: 'Dealership',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(225 25% 25%)',\n background: 'hsl(0 0% 98%)',\n accent: 'hsl(15 85% 55%)',\n },\n },\n },\n 'real-estate': {\n name: 'real-estate',\n label: 'Real Estate Blue',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(220 90% 48%)',\n background: 'hsl(220 40% 98.5%)',\n accent: 'hsl(210 85% 55%)',\n },\n },\n },\n 'real-estate-gold': {\n name: 'real-estate-gold',\n label: 'Real Estate Gold',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(38 75% 45%)',\n background: 'hsl(45 25% 97%)',\n accent: 'hsl(42 85% 55%)',\n },\n },\n },\n 'real-estate-neutral': {\n name: 'real-estate-neutral',\n label: 'Real Estate Neutral',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(25 35% 25%)',\n background: 'hsl(30 8% 98%)',\n accent: 'hsl(35 25% 45%)',\n },\n },\n },\n // Extended 20 color themes (Dynamic CSS generation)\n cyberpunk: {\n name: 'cyberpunk',\n label: 'Cyberpunk Neon',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(320, 25%, 65%)',\n background: 'hsl(180, 2%, 98%)',\n accent: 'hsl(290, 22%, 75%)',\n },\n },\n },\n minimal: {\n name: 'minimal',\n label: 'Minimal Clean',\n borderRadius: 'none',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(0, 0%, 12%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 96%)',\n },\n },\n },\n retro: {\n name: 'retro',\n label: 'Retro Vintage',\n borderRadius: 'small',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(35, 18%, 55%)',\n background: 'hsl(80, 3%, 96%)',\n accent: 'hsl(50, 16%, 68%)',\n },\n },\n },\n pastel: {\n name: 'pastel',\n label: 'Pastel Soft',\n borderRadius: 'xl',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(270, 12%, 70%)',\n background: 'hsl(250, 1%, 98%)',\n accent: 'hsl(300, 8%, 85%)',\n },\n },\n },\n ocean: {\n name: 'ocean',\n label: 'Ocean Deep',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(230, 18%, 55%)',\n background: 'hsl(220, 2%, 97%)',\n accent: 'hsl(190, 15%, 68%)',\n },\n },\n },\n forest: {\n name: 'forest',\n label: 'Forest Green',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(145, 16%, 52%)',\n background: 'hsl(145, 2%, 97%)',\n accent: 'hsl(155, 14%, 65%)',\n },\n },\n },\n sunset: {\n name: 'sunset',\n label: 'Sunset Warm',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(35, 20%, 60%)',\n background: 'hsl(50, 3%, 97%)',\n accent: 'hsl(20, 18%, 68%)',\n },\n },\n },\n lavender: {\n name: 'lavender',\n label: 'Lavender Dream',\n borderRadius: 'xl',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(295, 16%, 62%)',\n background: 'hsl(295, 2%, 98%)',\n accent: 'hsl(310, 14%, 72%)',\n },\n },\n },\n neutral: {\n name: 'neutral',\n label: 'Neutral',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(0, 0%, 0%)',\n background: 'hsl(0, 0%, 99%)',\n accent: 'hsl(0, 0%, 94%)',\n },\n },\n },\n blue: {\n name: 'blue',\n label: 'Blue',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(221, 83%, 53%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n green: {\n name: 'green',\n label: 'Green',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(85, 85%, 35%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n red: {\n name: 'red',\n label: 'Red',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(0, 72%, 51%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n orange: {\n name: 'orange',\n label: 'Orange',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(21, 90%, 48%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n rose: {\n name: 'rose',\n label: 'Rose',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(347, 77%, 50%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n violet: {\n name: 'violet',\n label: 'Violet',\n borderRadius: 'large',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(262, 83%, 58%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 97%)',\n },\n },\n },\n zinc: {\n name: 'zinc',\n label: 'Zinc',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(286.375, 1%, 14%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(286.375, 0%, 96%)',\n },\n },\n },\n slate: {\n name: 'slate',\n label: 'Slate',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(254.624, 1%, 15%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(254.624, 0%, 96%)',\n },\n },\n },\n stone: {\n name: 'stone',\n label: 'Stone',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(56.365, 1%, 14%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(60, 0%, 96%)',\n },\n },\n },\n gray: {\n name: 'gray',\n label: 'Gray',\n borderRadius: 'medium',\n dynamicCSS: true,\n preview: {\n colors: {\n primary: 'hsl(0, 0%, 14%)',\n background: 'hsl(0, 0%, 100%)',\n accent: 'hsl(0, 0%, 96%)',\n },\n },\n },\n}\n\nexport const borderRadiusPresets = {\n none: {\n label: 'None',\n value: 'none',\n css: {\n '--radius-xs': '0',\n '--radius-small': '0',\n '--radius-default': '0',\n '--radius-medium': '0',\n '--radius-large': '0',\n '--radius-xl': '0',\n },\n },\n small: {\n label: 'Small',\n value: 'small',\n css: {\n '--radius-xs': '0.125rem',\n '--radius-small': '0.25rem',\n '--radius-default': '0.375rem',\n '--radius-medium': '0.5rem',\n '--radius-large': '0.75rem',\n '--radius-xl': '1rem',\n },\n },\n medium: {\n label: 'Medium',\n value: 'medium',\n css: {\n '--radius-xs': '0.25rem',\n '--radius-small': '0.5rem',\n '--radius-default': '0.75rem',\n '--radius-medium': '1rem',\n '--radius-large': '1.5rem',\n '--radius-xl': '2rem',\n },\n },\n large: {\n label: 'Large',\n value: 'large',\n css: {\n '--radius-xs': '0.5rem',\n '--radius-small': '0.75rem',\n '--radius-default': '1rem',\n '--radius-medium': '1.5rem',\n '--radius-large': '2rem',\n '--radius-xl': '2.5rem',\n },\n },\n xl: {\n label: 'Extra Large',\n value: 'xl',\n css: {\n '--radius-xs': '0.75rem',\n '--radius-small': '1rem',\n '--radius-default': '1.5rem',\n '--radius-medium': '2rem',\n '--radius-large': '2.5rem',\n '--radius-xl': '3rem',\n },\n },\n} as const\n\nexport function getThemeConfig(theme: ThemeDefaults): ThemeConfig {\n return themeConfigs[theme]\n}\n\nexport function getBorderRadiusConfig(preset: keyof typeof borderRadiusPresets) {\n return borderRadiusPresets[preset]\n}\n"],"names":["themeConfigs","cool","name","label","borderRadius","dynamicCSS","preview","colors","primary","background","accent","brutal","neon","solar","dealership","cyberpunk","minimal","retro","pastel","ocean","forest","sunset","lavender","neutral","blue","green","red","orange","rose","violet","zinc","slate","stone","gray","borderRadiusPresets","none","value","css","small","medium","large","xl","getThemeConfig","theme","getBorderRadiusConfig","preset"],"mappings":"AAEA,OAAO,MAAMA,eAAmD;IAC9DC,MAAM;QACJC,MAAM;QACNC,OAAO;QACPC,cAAc;QACdC,YAAY;QACZC,SAAS;YACPC,QAAQ;gBACNC,SAAS;gBACTC,YAA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gBACNC,SAAS;gBACTC,YAAY;gBACZC,QAAQ;YACV;QACF;IACF;AACF,EAAC;AAED,OAAO,MAAMwB,sBAAsB;IACjCC,MAAM;QACJhC,OAAO;QACPiC,OAAO;QACPC,KAAK;YACH,eAAe;YACf,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;IACAC,OAAO;QACLnC,OAAO;QACPiC,OAAO;QACPC,KAAK;YACH,eAAe;YACf,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;IACAE,QAAQ;QACNpC,OAAO;QACPiC,OAAO;QACPC,KAAK;YACH,eAAe;YACf,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;IACAG,OAAO;QACLrC,OAAO;QACPiC,OAAO;QACPC,KAAK;YACH,eAAe;YACf,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;IACAI,IAAI;QACFtC,OAAO;QACPiC,OAAO;QACPC,KAAK;YACH,eAAe;YACf,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,kBAAkB;YAClB,eAAe;QACjB;IACF;AACF,EAAU;AAEV,OAAO,SAASK,eAAeC,KAAoB;IACjD,OAAO3C,YAAY,CAAC2C,MAAM;AAC5B;AAEA,OAAO,SAASC,sBAAsBC,MAAwC;IAC5E,OAAOX,mBAAmB,CAACW,OAAO;AACpC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const THEME_DEFAULTS: readonly ["cool", "brutal", "neon", "solar", "dealership", "real-estate", "real-estate-gold", "real-estate-neutral", "cyberpunk", "minimal", "retro", "pastel", "ocean", "forest", "sunset", "lavender", "neutral", "blue", "green", "red", "orange", "rose", "violet", "zinc", "slate", "stone", "gray"];
|
|
2
|
+
export type ThemeDefaults = (typeof THEME_DEFAULTS)[number];
|
|
2
3
|
export type Mode = 'dark' | 'light' | 'auto';
|
|
3
4
|
export type BorderRadiusPreset = 'none' | 'small' | 'medium' | 'large' | 'xl';
|
|
4
5
|
export type FontScalePreset = 'small' | 'medium' | 'large' | 'xl';
|
|
@@ -9,7 +10,8 @@ export interface ThemeConfig {
|
|
|
9
10
|
name: string;
|
|
10
11
|
label: string;
|
|
11
12
|
borderRadius: BorderRadiusPreset;
|
|
12
|
-
cssFile
|
|
13
|
+
cssFile?: string;
|
|
14
|
+
dynamicCSS?: boolean;
|
|
13
15
|
preview?: {
|
|
14
16
|
colors: {
|
|
15
17
|
primary: string;
|
|
@@ -35,7 +37,7 @@ export interface ThemeContextType {
|
|
|
35
37
|
setAnimationLevel?: (level: AnimationLevelPreset) => void;
|
|
36
38
|
preloadTheme?: (theme: ThemeDefaults) => Promise<boolean>;
|
|
37
39
|
isThemeLoaded?: (theme: ThemeDefaults) => boolean;
|
|
38
|
-
themeConfig?:
|
|
40
|
+
themeConfig?: unknown;
|
|
39
41
|
}
|
|
40
42
|
export interface ThemeOption {
|
|
41
43
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/Theme/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/Theme/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,2SA4BjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAE5C,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAA;AAE7E,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,OAA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,CAAA;IAC7C,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAGzD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACzD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAA;IAGjD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,CAAA;IACpB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,IAAI,aAAa,CAE3E;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,IAAI,IAAI,CAEjE"}
|
|
@@ -1,20 +1,41 @@
|
|
|
1
|
+
export const THEME_DEFAULTS = [
|
|
2
|
+
'cool',
|
|
3
|
+
'brutal',
|
|
4
|
+
'neon',
|
|
5
|
+
'solar',
|
|
6
|
+
'dealership',
|
|
7
|
+
'real-estate',
|
|
8
|
+
'real-estate-gold',
|
|
9
|
+
'real-estate-neutral',
|
|
10
|
+
'cyberpunk',
|
|
11
|
+
'minimal',
|
|
12
|
+
'retro',
|
|
13
|
+
'pastel',
|
|
14
|
+
'ocean',
|
|
15
|
+
'forest',
|
|
16
|
+
'sunset',
|
|
17
|
+
'lavender',
|
|
18
|
+
'neutral',
|
|
19
|
+
'blue',
|
|
20
|
+
'green',
|
|
21
|
+
'red',
|
|
22
|
+
'orange',
|
|
23
|
+
'rose',
|
|
24
|
+
'violet',
|
|
25
|
+
'zinc',
|
|
26
|
+
'slate',
|
|
27
|
+
'stone',
|
|
28
|
+
'gray'
|
|
29
|
+
];
|
|
1
30
|
export function themeIsValid(string) {
|
|
2
|
-
return string
|
|
3
|
-
'cool',
|
|
4
|
-
'brutal',
|
|
5
|
-
'neon',
|
|
6
|
-
'solar',
|
|
7
|
-
'dealership',
|
|
8
|
-
'real-estate',
|
|
9
|
-
'real-estate-gold',
|
|
10
|
-
'real-estate-neutral'
|
|
11
|
-
].includes(string) : false;
|
|
31
|
+
return typeof string === 'string' && THEME_DEFAULTS.includes(string);
|
|
12
32
|
}
|
|
13
33
|
export function modeIsValid(string) {
|
|
14
|
-
return string
|
|
34
|
+
return typeof string === 'string' && [
|
|
15
35
|
'dark',
|
|
16
|
-
'light'
|
|
17
|
-
|
|
36
|
+
'light',
|
|
37
|
+
'auto'
|
|
38
|
+
].includes(string);
|
|
18
39
|
}
|
|
19
40
|
|
|
20
41
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/providers/Theme/types.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../../../src/providers/Theme/types.ts"],"sourcesContent":["export const THEME_DEFAULTS = [\n 'cool',\n 'brutal',\n 'neon',\n 'solar',\n 'dealership',\n 'real-estate',\n 'real-estate-gold',\n 'real-estate-neutral',\n 'cyberpunk',\n 'minimal',\n 'retro',\n 'pastel',\n 'ocean',\n 'forest',\n 'sunset',\n 'lavender',\n 'neutral',\n 'blue',\n 'green',\n 'red',\n 'orange',\n 'rose',\n 'violet',\n 'zinc',\n 'slate',\n 'stone',\n 'gray',\n] as const\n\nexport type ThemeDefaults = (typeof THEME_DEFAULTS)[number]\n\nexport type Mode = 'dark' | 'light' | 'auto'\n\nexport type BorderRadiusPreset = 'none' | 'small' | 'medium' | 'large' | 'xl'\n\nexport type FontScalePreset = 'small' | 'medium' | 'large' | 'xl'\n\nexport type SpacingPreset = 'compact' | 'medium' | 'spacious'\n\nexport type AnimationLevelPreset = 'none' | 'reduced' | 'medium' | 'high'\n\nexport type ColorModePreset = 'auto' | 'light' | 'dark'\n\nexport interface ThemeConfig {\n name: string\n label: string\n borderRadius: BorderRadiusPreset\n cssFile?: string // Optional - if not provided, CSS is generated dynamically\n dynamicCSS?: boolean // If true, CSS is generated from theme preset\n preview?: {\n colors: {\n primary: string\n background: string\n accent: string\n }\n }\n}\n\nexport interface ThemeContextType {\n // Theme management\n theme?: ThemeDefaults | null\n setTheme?: (theme: ThemeDefaults) => void // Add setTheme for enhanced functionality\n refreshTheme: () => void // Refresh theme (now handled server-side)\n\n // Color mode\n mode?: Mode | null\n setMode: (mode: Mode | null) => void\n isColorModeToggleAllowed?: boolean // Whether admin allows color mode changes\n\n // Design controls\n borderRadius?: BorderRadiusPreset\n setBorderRadius?: (radius: BorderRadiusPreset) => void\n fontScale?: FontScalePreset\n setFontScale?: (scale: FontScalePreset) => void\n spacing?: SpacingPreset\n setSpacing?: (spacing: SpacingPreset) => void\n animationLevel?: AnimationLevelPreset\n setAnimationLevel?: (level: AnimationLevelPreset) => void\n\n // Theme loading\n preloadTheme?: (theme: ThemeDefaults) => Promise<boolean>\n isThemeLoaded?: (theme: ThemeDefaults) => boolean\n\n // Enhanced configuration\n themeConfig?: unknown // Enhanced theme configuration from plugin\n}\n\nexport interface ThemeOption {\n label: string\n value: ThemeDefaults\n config?: ThemeConfig\n}\n\nexport function themeIsValid(string: null | string): string is ThemeDefaults {\n return typeof string === 'string' && (THEME_DEFAULTS as readonly string[]).includes(string)\n}\n\nexport function modeIsValid(string: null | string): string is Mode {\n return typeof string === 'string' && ['dark', 'light', 'auto'].includes(string)\n}\n"],"names":["THEME_DEFAULTS","themeIsValid","string","includes","modeIsValid"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAS;AAkEV,OAAO,SAASC,aAAaC,MAAqB;IAChD,OAAO,OAAOA,WAAW,YAAY,AAACF,eAAqCG,QAAQ,CAACD;AACtF;AAEA,OAAO,SAASE,YAAYF,MAAqB;IAC/C,OAAO,OAAOA,WAAW,YAAY;QAAC;QAAQ;QAAS;KAAO,CAACC,QAAQ,CAACD;AAC1E"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
2
|
export { ServerThemeInjector } from './components/ServerThemeInjector.js';
|
|
3
|
-
export { createFallbackCriticalCSS,
|
|
3
|
+
export { createFallbackCriticalCSS, getThemeCriticalCSS, getThemeCSS, generateThemePreloadLinks, getThemeCSSPath, } from './utils/themeAssets.js';
|
|
4
4
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAEzE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAEzE,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,yBAAyB,EACzB,eAAe,GAChB,MAAM,wBAAwB,CAAA"}
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
2
|
export { ServerThemeInjector } from './components/ServerThemeInjector.js';
|
|
3
|
-
export { createFallbackCriticalCSS,
|
|
3
|
+
export { createFallbackCriticalCSS, getThemeCriticalCSS, getThemeCSS, generateThemePreloadLinks, getThemeCSSPath } from './utils/themeAssets.js';
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server.ts"],"sourcesContent":["import 'server-only'\n\nexport { ServerThemeInjector } from './components/ServerThemeInjector.js'\n\nexport {\n createFallbackCriticalCSS,\n
|
|
1
|
+
{"version":3,"sources":["../src/server.ts"],"sourcesContent":["import 'server-only'\n\nexport { ServerThemeInjector } from './components/ServerThemeInjector.js'\n\nexport {\n createFallbackCriticalCSS,\n getThemeCriticalCSS,\n getThemeCSS,\n generateThemePreloadLinks,\n getThemeCSSPath,\n} from './utils/themeAssets.js'\n"],"names":["ServerThemeInjector","createFallbackCriticalCSS","getThemeCriticalCSS","getThemeCSS","generateThemePreloadLinks","getThemeCSSPath"],"mappings":"AAAA,OAAO,cAAa;AAEpB,SAASA,mBAAmB,QAAQ,sCAAqC;AAEzE,SACEC,yBAAyB,EACzBC,mBAAmB,EACnBC,WAAW,EACXC,yBAAyB,EACzBC,eAAe,QACV,yBAAwB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ThemePreset } from '../presets.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates complete CSS for a theme preset
|
|
4
|
+
* Creates both light and dark mode CSS variables
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateThemeCSS(preset: ThemePreset): string;
|
|
7
|
+
/**
|
|
8
|
+
* Generate CSS for all themes
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateAllThemesCSS(presets: ThemePreset[]): string;
|
|
11
|
+
//# sourceMappingURL=generateThemeCSS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateThemeCSS.d.ts","sourceRoot":"","sources":["../../src/utils/generateThemeCSS.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGhD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAuC5D;AAuSD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAEnE"}
|