@wlloyalty/wll-react-sdk 1.0.95 → 1.0.97

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
@@ -1678,12 +1678,15 @@ var validateTheme = function (theme) {
1678
1678
  'primary',
1679
1679
  'surface',
1680
1680
  'surfaceText',
1681
- 'positive',
1682
- 'negative',
1683
1681
  'text',
1684
1682
  ];
1685
1683
  // fontFamily is optional - it has a default value in defaultTheme
1686
- return requiredColors.every(function (color) { return theme[color] && isValidColor(theme[color]); });
1684
+ // Log missing or invalid colors for debugging
1685
+ var missingOrInvalidColors = requiredColors.filter(function (color) { return !theme[color] || !isValidColor(theme[color]); });
1686
+ if (missingOrInvalidColors.length > 0) {
1687
+ console.warn('[WLL SDK] Missing or invalid required colors:', missingOrInvalidColors);
1688
+ }
1689
+ return missingOrInvalidColors.length === 0;
1687
1690
  };
1688
1691
  /**
1689
1692
  * Safely creates a Color instance with error handling
@@ -1919,14 +1922,12 @@ function useResponsive() {
1919
1922
  var createTheme = function (baseTheme) {
1920
1923
  if (baseTheme === void 0) { baseTheme = {}; }
1921
1924
  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
- }
1925
+ // Always log theme information to help with debugging
1926
+ console.debug('[WLL SDK] Theme created:', {
1927
+ fontFamily: mergedTheme.fontFamily,
1928
+ baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
1929
+ defaultTheme: defaultTheme.fontFamily,
1930
+ });
1930
1931
  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) });
1931
1932
  };
1932
1933
  var WllSdkContext = React.createContext(undefined);
@@ -1945,16 +1946,14 @@ var WllSdkProvider = function (_a) {
1945
1946
  if (!validateTheme(themeToUse)) {
1946
1947
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
1947
1948
  }
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
- }
1949
+ // Always log theme updates to help with debugging
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
+ });
1958
1957
  setThemeState(createTheme(themeToUse));
1959
1958
  }, [providedTheme]);
1960
1959
  var setTheme = React.useCallback(function (newTheme) {
@@ -2319,13 +2318,10 @@ var Text = function (_a) {
2319
2318
  }
2320
2319
  };
2321
2320
  var variantStyle = getVariantStyle(variant);
2322
- return (jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [
2323
- variantStyle,
2324
- style,
2325
- {
2326
- fontFamily: theme.fontFamily,
2327
- },
2328
- ] }, props)));
2321
+ var baseTextStyle = {
2322
+ fontFamily: theme.fontFamily,
2323
+ };
2324
+ return jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [baseTextStyle, variantStyle, style] }, props));
2329
2325
  };
2330
2326
 
2331
2327
  var MAX_WIDTH = 1080;
@@ -3531,10 +3527,12 @@ var useSectionHeaderStyles = function () {
3531
3527
  marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
3532
3528
  fontWeight: '700',
3533
3529
  color: theme.text,
3530
+ fontFamily: theme.fontFamily,
3534
3531
  },
3535
3532
  sectionDescription: {
3536
3533
  fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.md, isDesktop, isTablet),
3537
3534
  color: theme.alphaDerivedText[80],
3535
+ fontFamily: theme.fontFamily,
3538
3536
  },
3539
3537
  });
3540
3538
  };