@wlloyalty/wll-react-sdk 1.0.93 → 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/index.d.ts CHANGED
@@ -256,6 +256,7 @@ type DerivedColors = {
256
256
  };
257
257
  type DesaturationType = BadgeTileType.Specific | BadgeTileType.Latest;
258
258
  type BaseThemeObject = {
259
+ fontFamily: string;
259
260
  accent: string;
260
261
  background: string;
261
262
  errorPrimary: string;
package/dist/native.js CHANGED
@@ -1620,6 +1620,7 @@ var commonStyles = reactNative.StyleSheet.create({
1620
1620
  },
1621
1621
  });
1622
1622
  var defaultTheme = {
1623
+ fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif',
1623
1624
  background: '#F0F0F0',
1624
1625
  text: '#000000',
1625
1626
  primary: '#392ed7',
@@ -1681,6 +1682,7 @@ var validateTheme = function (theme) {
1681
1682
  'negative',
1682
1683
  'text',
1683
1684
  ];
1685
+ // fontFamily is optional - it has a default value in defaultTheme
1684
1686
  return requiredColors.every(function (color) { return theme[color] && isValidColor(theme[color]); });
1685
1687
  };
1686
1688
  /**
@@ -1917,6 +1919,14 @@ function useResponsive() {
1917
1919
  var createTheme = function (baseTheme) {
1918
1920
  if (baseTheme === void 0) { baseTheme = {}; }
1919
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
+ }
1920
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) });
1921
1931
  };
1922
1932
  var WllSdkContext = React.createContext(undefined);
@@ -1935,6 +1945,16 @@ var WllSdkProvider = function (_a) {
1935
1945
  if (!validateTheme(themeToUse)) {
1936
1946
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
1937
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
+ }
1938
1958
  setThemeState(createTheme(themeToUse));
1939
1959
  }, [providedTheme]);
1940
1960
  var setTheme = React.useCallback(function (newTheme) {
@@ -2299,7 +2319,13 @@ var Text = function (_a) {
2299
2319
  }
2300
2320
  };
2301
2321
  var variantStyle = getVariantStyle(variant);
2302
- return jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [variantStyle, style] }, props));
2322
+ return (jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [
2323
+ variantStyle,
2324
+ style,
2325
+ {
2326
+ fontFamily: theme.fontFamily,
2327
+ },
2328
+ ] }, props)));
2303
2329
  };
2304
2330
 
2305
2331
  var MAX_WIDTH = 1080;