@wlloyalty/wll-react-sdk 1.0.94 → 1.0.96

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/web.js CHANGED
@@ -8229,6 +8229,7 @@ var isValidColor = function (color) {
8229
8229
  */
8230
8230
  var validateTheme = function (theme) {
8231
8231
  var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', 'positive', 'negative', 'text'];
8232
+ // fontFamily is optional - it has a default value in defaultTheme
8232
8233
  return requiredColors.every(function (color) {
8233
8234
  return theme[color] && isValidColor(theme[color]);
8234
8235
  });
@@ -8457,6 +8458,12 @@ var createTheme = function (baseTheme) {
8457
8458
  baseTheme = {};
8458
8459
  }
8459
8460
  var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
8461
+ // Always log theme information to help with debugging
8462
+ console.debug('[WLL SDK] Theme created:', {
8463
+ fontFamily: mergedTheme.fontFamily,
8464
+ baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
8465
+ defaultTheme: defaultTheme.fontFamily
8466
+ });
8460
8467
  return __assign(__assign({}, mergedTheme), {
8461
8468
  sizes: sizes,
8462
8469
  derivedBackground: getDerivedColor(mergedTheme.background),
@@ -8492,6 +8499,14 @@ var WllSdkProvider = function (_a) {
8492
8499
  if (!validateTheme(themeToUse)) {
8493
8500
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
8494
8501
  }
8502
+ // Always log theme updates to help with debugging
8503
+ console.debug('[WLL SDK] Theme update details:', {
8504
+ 'providedTheme (full)': providedTheme,
8505
+ 'themeToUse.fontFamily': themeToUse.fontFamily,
8506
+ 'providedTheme.fontFamily': providedTheme === null || providedTheme === void 0 ? void 0 : providedTheme.fontFamily,
8507
+ 'defaultTheme.fontFamily': defaultTheme.fontFamily,
8508
+ 'providedTheme keys': providedTheme ? Object.keys(providedTheme) : 'none'
8509
+ });
8495
8510
  setThemeState(createTheme(themeToUse));
8496
8511
  }, [providedTheme]);
8497
8512
  var setTheme = React.useCallback(function (newTheme) {