@wlloyalty/wll-react-sdk 1.0.94 → 1.0.95

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/native.js CHANGED
@@ -1682,6 +1682,7 @@ var validateTheme = function (theme) {
1682
1682
  'negative',
1683
1683
  'text',
1684
1684
  ];
1685
+ // fontFamily is optional - it has a default value in defaultTheme
1685
1686
  return requiredColors.every(function (color) { return theme[color] && isValidColor(theme[color]); });
1686
1687
  };
1687
1688
  /**
@@ -1918,6 +1919,14 @@ function useResponsive() {
1918
1919
  var createTheme = function (baseTheme) {
1919
1920
  if (baseTheme === void 0) { baseTheme = {}; }
1920
1921
  var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
1922
+ // Development mode logging for theme verification
1923
+ if (__DEV__) {
1924
+ console.debug('[WLL SDK] Theme created:', {
1925
+ fontFamily: mergedTheme.fontFamily,
1926
+ baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
1927
+ defaultTheme: defaultTheme.fontFamily
1928
+ });
1929
+ }
1921
1930
  return __assign(__assign({}, mergedTheme), { sizes: sizes, derivedBackground: getDerivedColor(mergedTheme.background), primaryText: getReadableTextColor(mergedTheme.primary), accentText: getReadableTextColor(mergedTheme.accent), positiveText: getReadableTextColor(mergedTheme.positive), negativeText: getReadableTextColor(mergedTheme.negative), derivedSurface: getDerivedColorPercentages(mergedTheme.surface), derivedSurfaceText: getDerivedColorPercentages(mergedTheme.surfaceText), alphaDerivedPrimary: getAlphaDerivedColors(mergedTheme.primary), alphaDerivedText: getAlphaDerivedColors(mergedTheme.text) });
1922
1931
  };
1923
1932
  var WllSdkContext = React.createContext(undefined);
@@ -1936,6 +1945,16 @@ var WllSdkProvider = function (_a) {
1936
1945
  if (!validateTheme(themeToUse)) {
1937
1946
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
1938
1947
  }
1948
+ // Development mode logging for theme updates
1949
+ if (__DEV__) {
1950
+ console.debug('[WLL SDK] Theme update details:', {
1951
+ 'providedTheme (full)': providedTheme,
1952
+ 'themeToUse.fontFamily': themeToUse.fontFamily,
1953
+ 'providedTheme.fontFamily': providedTheme === null || providedTheme === void 0 ? void 0 : providedTheme.fontFamily,
1954
+ 'defaultTheme.fontFamily': defaultTheme.fontFamily,
1955
+ 'providedTheme keys': providedTheme ? Object.keys(providedTheme) : 'none'
1956
+ });
1957
+ }
1939
1958
  setThemeState(createTheme(themeToUse));
1940
1959
  }, [providedTheme]);
1941
1960
  var setTheme = React.useCallback(function (newTheme) {