@dheme/react 2.8.0 → 2.9.0
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/dist/index.js +11 -0
- package/dist/index.mjs +11 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -323,6 +323,14 @@ function DhemeProvider({
|
|
|
323
323
|
setError(null);
|
|
324
324
|
try {
|
|
325
325
|
const data = await fetchTheme(params);
|
|
326
|
+
if (process.env.NODE_ENV === "development") {
|
|
327
|
+
console.log("[dheme] theme data received:", {
|
|
328
|
+
hasColors: !!data?.colors,
|
|
329
|
+
mode: modeRef.current,
|
|
330
|
+
colors: data?.colors?.[modeRef.current],
|
|
331
|
+
autoApply: autoApplyRef.current
|
|
332
|
+
});
|
|
333
|
+
}
|
|
326
334
|
setTheme(data);
|
|
327
335
|
setIsReady(true);
|
|
328
336
|
if (autoApplyRef.current) {
|
|
@@ -336,6 +344,9 @@ function DhemeProvider({
|
|
|
336
344
|
onThemeChangeRef.current?.(data);
|
|
337
345
|
} catch (err) {
|
|
338
346
|
const error2 = err instanceof Error ? err : new Error(String(err));
|
|
347
|
+
if (process.env.NODE_ENV === "development") {
|
|
348
|
+
console.error("[dheme] generateTheme failed:", error2);
|
|
349
|
+
}
|
|
339
350
|
setError(error2);
|
|
340
351
|
onErrorRef.current?.(error2);
|
|
341
352
|
} finally {
|
package/dist/index.mjs
CHANGED
|
@@ -273,6 +273,14 @@ function DhemeProvider({
|
|
|
273
273
|
setError(null);
|
|
274
274
|
try {
|
|
275
275
|
const data = await fetchTheme(params);
|
|
276
|
+
if (process.env.NODE_ENV === "development") {
|
|
277
|
+
console.log("[dheme] theme data received:", {
|
|
278
|
+
hasColors: !!data?.colors,
|
|
279
|
+
mode: modeRef.current,
|
|
280
|
+
colors: data?.colors?.[modeRef.current],
|
|
281
|
+
autoApply: autoApplyRef.current
|
|
282
|
+
});
|
|
283
|
+
}
|
|
276
284
|
setTheme(data);
|
|
277
285
|
setIsReady(true);
|
|
278
286
|
if (autoApplyRef.current) {
|
|
@@ -286,6 +294,9 @@ function DhemeProvider({
|
|
|
286
294
|
onThemeChangeRef.current?.(data);
|
|
287
295
|
} catch (err) {
|
|
288
296
|
const error2 = err instanceof Error ? err : new Error(String(err));
|
|
297
|
+
if (process.env.NODE_ENV === "development") {
|
|
298
|
+
console.error("[dheme] generateTheme failed:", error2);
|
|
299
|
+
}
|
|
289
300
|
setError(error2);
|
|
290
301
|
onErrorRef.current?.(error2);
|
|
291
302
|
} finally {
|