@wlloyalty/wll-react-sdk 1.0.96 → 1.0.98

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,11 @@ 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
+ var missingOrInvalidColors = requiredColors.filter(function (color) { return !theme[color] || !isValidColor(theme[color]); });
1685
+ return missingOrInvalidColors.length === 0;
1687
1686
  };
1688
1687
  /**
1689
1688
  * Safely creates a Color instance with error handling
@@ -1919,12 +1918,6 @@ function useResponsive() {
1919
1918
  var createTheme = function (baseTheme) {
1920
1919
  if (baseTheme === void 0) { baseTheme = {}; }
1921
1920
  var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
1922
- // Always log theme information to help with debugging
1923
- console.debug('[WLL SDK] Theme created:', {
1924
- fontFamily: mergedTheme.fontFamily,
1925
- baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
1926
- defaultTheme: defaultTheme.fontFamily,
1927
- });
1928
1921
  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) });
1929
1922
  };
1930
1923
  var WllSdkContext = React.createContext(undefined);
@@ -1943,14 +1936,6 @@ var WllSdkProvider = function (_a) {
1943
1936
  if (!validateTheme(themeToUse)) {
1944
1937
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
1945
1938
  }
1946
- // Always log theme updates to help with debugging
1947
- console.debug('[WLL SDK] Theme update details:', {
1948
- 'providedTheme (full)': providedTheme,
1949
- 'themeToUse.fontFamily': themeToUse.fontFamily,
1950
- 'providedTheme.fontFamily': providedTheme === null || providedTheme === void 0 ? void 0 : providedTheme.fontFamily,
1951
- 'defaultTheme.fontFamily': defaultTheme.fontFamily,
1952
- 'providedTheme keys': providedTheme ? Object.keys(providedTheme) : 'none',
1953
- });
1954
1939
  setThemeState(createTheme(themeToUse));
1955
1940
  }, [providedTheme]);
1956
1941
  var setTheme = React.useCallback(function (newTheme) {
@@ -2315,13 +2300,11 @@ var Text = function (_a) {
2315
2300
  }
2316
2301
  };
2317
2302
  var variantStyle = getVariantStyle(variant);
2318
- return (jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [
2319
- variantStyle,
2320
- style,
2321
- {
2322
- fontFamily: theme.fontFamily,
2323
- },
2324
- ] }, props)));
2303
+ var baseTextStyle = {
2304
+ fontFamily: theme.fontFamily,
2305
+ };
2306
+ // NOTE: We must apply fontFamily as base style to ensure it's always applied
2307
+ return jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [baseTextStyle, variantStyle, style] }, props));
2325
2308
  };
2326
2309
 
2327
2310
  var MAX_WIDTH = 1080;
@@ -3527,10 +3510,12 @@ var useSectionHeaderStyles = function () {
3527
3510
  marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
3528
3511
  fontWeight: '700',
3529
3512
  color: theme.text,
3513
+ fontFamily: theme.fontFamily,
3530
3514
  },
3531
3515
  sectionDescription: {
3532
3516
  fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.md, isDesktop, isTablet),
3533
3517
  color: theme.alphaDerivedText[80],
3518
+ fontFamily: theme.fontFamily,
3534
3519
  },
3535
3520
  });
3536
3521
  };