@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.
@@ -7,6 +7,7 @@ export type DerivedColors = {
7
7
  };
8
8
  export type DesaturationType = BadgeTileType.Specific | BadgeTileType.Latest;
9
9
  export type BaseThemeObject = {
10
+ fontFamily: string;
10
11
  accent: string;
11
12
  background: string;
12
13
  errorPrimary: string;
@@ -6,6 +6,7 @@ export declare const storyBookThemes: {
6
6
  background: string;
7
7
  surface: string;
8
8
  surfaceText: string;
9
+ fontFamily: string;
9
10
  errorPrimary: string;
10
11
  negative: string;
11
12
  pageButtonBackground: string;
@@ -19,6 +20,7 @@ export declare const storyBookThemes: {
19
20
  background: string;
20
21
  surface: string;
21
22
  surfaceText: string;
23
+ fontFamily: string;
22
24
  errorPrimary: string;
23
25
  negative: string;
24
26
  pageButtonBackground: string;
@@ -33,6 +35,7 @@ export declare const storyBookThemes: {
33
35
  accent: string;
34
36
  surface: string;
35
37
  surfaceText: string;
38
+ fontFamily: string;
36
39
  errorPrimary: string;
37
40
  negative: string;
38
41
  pageButtonBackground: string;
@@ -45,6 +48,7 @@ export declare const storyBookThemes: {
45
48
  background: string;
46
49
  surface: string;
47
50
  surfaceText: string;
51
+ fontFamily: string;
48
52
  errorPrimary: string;
49
53
  negative: string;
50
54
  pageButtonBackground: string;
@@ -58,6 +62,7 @@ export declare const storyBookThemes: {
58
62
  background: string;
59
63
  surface: string;
60
64
  surfaceText: string;
65
+ fontFamily: string;
61
66
  errorPrimary: string;
62
67
  negative: string;
63
68
  pageButtonBackground: string;
package/dist/web.js CHANGED
@@ -6599,7 +6599,7 @@ function isPrimaryPointerDown(domEvent) {
6599
6599
  * when touches end and start again.
6600
6600
  */
6601
6601
 
6602
- var __DEV__$4 = process.env.NODE_ENV !== 'production';
6602
+ var __DEV__$5 = process.env.NODE_ENV !== 'production';
6603
6603
  var MAX_TOUCH_BANK = 20;
6604
6604
  function timestampForTouch(touch) {
6605
6605
  // The legacy internal implementation provides "timeStamp", which has been
@@ -6642,7 +6642,7 @@ function getTouchIdentifier(_ref) {
6642
6642
  if (identifier == null) {
6643
6643
  console.error('Touch object is missing identifier.');
6644
6644
  }
6645
- if (__DEV__$4) {
6645
+ if (__DEV__$5) {
6646
6646
  if (identifier > MAX_TOUCH_BANK) {
6647
6647
  console.error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);
6648
6648
  }
@@ -6740,7 +6740,7 @@ class ResponderTouchHistoryStore {
6740
6740
  break;
6741
6741
  }
6742
6742
  }
6743
- if (__DEV__$4) {
6743
+ if (__DEV__$5) {
6744
6744
  var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
6745
6745
  if (!(activeRecord != null && activeRecord.touchActive)) {
6746
6746
  console.error('Cannot find single active touch.');
@@ -7949,6 +7949,7 @@ var commonStyles = StyleSheet$1.create({
7949
7949
  }
7950
7950
  });
7951
7951
  var defaultTheme = {
7952
+ fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif',
7952
7953
  background: '#F0F0F0',
7953
7954
  text: '#000000',
7954
7955
  primary: '#392ed7',
@@ -8228,6 +8229,7 @@ var isValidColor = function (color) {
8228
8229
  */
8229
8230
  var validateTheme = function (theme) {
8230
8231
  var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', 'positive', 'negative', 'text'];
8232
+ // fontFamily is optional - it has a default value in defaultTheme
8231
8233
  return requiredColors.every(function (color) {
8232
8234
  return theme[color] && isValidColor(theme[color]);
8233
8235
  });
@@ -8456,6 +8458,14 @@ var createTheme = function (baseTheme) {
8456
8458
  baseTheme = {};
8457
8459
  }
8458
8460
  var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
8461
+ // Development mode logging for theme verification
8462
+ if (__DEV__) {
8463
+ console.debug('[WLL SDK] Theme created:', {
8464
+ fontFamily: mergedTheme.fontFamily,
8465
+ baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
8466
+ defaultTheme: defaultTheme.fontFamily
8467
+ });
8468
+ }
8459
8469
  return __assign(__assign({}, mergedTheme), {
8460
8470
  sizes: sizes,
8461
8471
  derivedBackground: getDerivedColor(mergedTheme.background),
@@ -8491,6 +8501,16 @@ var WllSdkProvider = function (_a) {
8491
8501
  if (!validateTheme(themeToUse)) {
8492
8502
  console.warn('Invalid theme provided. Some required colors are missing or invalid.');
8493
8503
  }
8504
+ // Development mode logging for theme updates
8505
+ if (__DEV__) {
8506
+ console.debug('[WLL SDK] Theme update details:', {
8507
+ 'providedTheme (full)': providedTheme,
8508
+ 'themeToUse.fontFamily': themeToUse.fontFamily,
8509
+ 'providedTheme.fontFamily': providedTheme === null || providedTheme === void 0 ? void 0 : providedTheme.fontFamily,
8510
+ 'defaultTheme.fontFamily': defaultTheme.fontFamily,
8511
+ 'providedTheme keys': providedTheme ? Object.keys(providedTheme) : 'none'
8512
+ });
8513
+ }
8494
8514
  setThemeState(createTheme(themeToUse));
8495
8515
  }, [providedTheme]);
8496
8516
  var setTheme = React.useCallback(function (newTheme) {
@@ -10912,9 +10932,9 @@ function _isEntirelyVisible(top, bottom, viewportHeight) {
10912
10932
  }
10913
10933
  var ViewabilityHelper$1 = ViewabilityHelper;
10914
10934
 
10915
- var __DEV__$3 = process.env.NODE_ENV !== 'production';
10935
+ var __DEV__$4 = process.env.NODE_ENV !== 'production';
10916
10936
  var VirtualizedListContext = /*#__PURE__*/React__namespace.createContext(null);
10917
- if (__DEV__$3) {
10937
+ if (__DEV__$4) {
10918
10938
  VirtualizedListContext.displayName = 'VirtualizedListContext';
10919
10939
  }
10920
10940
 
@@ -11284,7 +11304,7 @@ Object.defineProperty(nullthrows$2.exports, '__esModule', {value: true});
11284
11304
  var nullthrowsExports = nullthrows$2.exports;
11285
11305
  var nullthrows$1 = /*@__PURE__*/getDefaultExportFromCjs(nullthrowsExports);
11286
11306
 
11287
- var __DEV__$2 = process.env.NODE_ENV !== 'production';
11307
+ var __DEV__$3 = process.env.NODE_ENV !== 'production';
11288
11308
  var ON_EDGE_REACHED_EPSILON = 0.001;
11289
11309
  var _usedIndexForKey = false;
11290
11310
  var _keylessItemComponentName = '';
@@ -11993,7 +12013,7 @@ class VirtualizedList extends StateSafePureComponent {
11993
12013
  console.warn("initialScrollIndex \"" + initialScrollIndex + "\" is not valid (list has " + itemCount + " items)");
11994
12014
  this._hasWarned.initialScrollIndex = true;
11995
12015
  }
11996
- if (__DEV__$2 && !this._hasWarned.flexWrap) {
12016
+ if (__DEV__$3 && !this._hasWarned.flexWrap) {
11997
12017
  // $FlowFixMe[underconstrained-implicit-instantiation]
11998
12018
  var flatStyles = StyleSheet$1.flatten(this.props.contentContainerStyle);
11999
12019
  if (flatStyles != null && flatStyles.flexWrap === 'wrap') {
@@ -13945,7 +13965,7 @@ var AnimatedWithChildren$1 = AnimatedWithChildren;
13945
13965
  * @format
13946
13966
  */
13947
13967
 
13948
- var __DEV__$1 = process.env.NODE_ENV !== 'production';
13968
+ var __DEV__$2 = process.env.NODE_ENV !== 'production';
13949
13969
  var linear = t => t;
13950
13970
 
13951
13971
  /**
@@ -13958,7 +13978,7 @@ function createInterpolation(config) {
13958
13978
  }
13959
13979
  var outputRange = config.outputRange;
13960
13980
  var inputRange = config.inputRange;
13961
- if (__DEV__$1) {
13981
+ if (__DEV__$2) {
13962
13982
  checkInfiniteRange('outputRange', outputRange);
13963
13983
  checkInfiniteRange('inputRange', inputRange);
13964
13984
  checkValidInputRange(inputRange);
@@ -14173,7 +14193,7 @@ class AnimatedInterpolation extends AnimatedWithChildren$1 {
14173
14193
  return range.map(NativeAnimatedHelper.transformDataType);
14174
14194
  }
14175
14195
  __getNativeConfig() {
14176
- if (__DEV__$1) {
14196
+ if (__DEV__$2) {
14177
14197
  NativeAnimatedHelper.validateInterpolation(this._config);
14178
14198
  }
14179
14199
  return {
@@ -14462,7 +14482,7 @@ var AnimatedValue$1 = AnimatedValue;
14462
14482
  * @format
14463
14483
  */
14464
14484
 
14465
- var __DEV__ = process.env.NODE_ENV !== 'production';
14485
+ var __DEV__$1 = process.env.NODE_ENV !== 'production';
14466
14486
  function attachNativeEvent(viewRef, eventName, argMapping) {
14467
14487
  // Find animated values in `argMapping` and create an array representing their
14468
14488
  // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
@@ -14556,7 +14576,7 @@ class AnimatedEvent {
14556
14576
  __getHandler() {
14557
14577
  var _this = this;
14558
14578
  if (this.__isNative) {
14559
- if (__DEV__) {
14579
+ if (__DEV__$1) {
14560
14580
  var _validatedMapping = false;
14561
14581
  return function () {
14562
14582
  for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
@@ -14577,7 +14597,7 @@ class AnimatedEvent {
14577
14597
  for (var _len2 = arguments.length, args = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
14578
14598
  args[_key3] = arguments[_key3];
14579
14599
  }
14580
- if (__DEV__ && !validatedMapping) {
14600
+ if (__DEV__$1 && !validatedMapping) {
14581
14601
  validateMapping(_this._argMapping, args);
14582
14602
  validatedMapping = true;
14583
14603
  }
@@ -18900,7 +18920,9 @@ var Text = function (_a) {
18900
18920
  };
18901
18921
  var variantStyle = getVariantStyle(variant);
18902
18922
  return /*#__PURE__*/React__namespace.createElement(Text$3, __assign({
18903
- style: [variantStyle, style]
18923
+ style: [variantStyle, style, {
18924
+ fontFamily: theme.fontFamily
18925
+ }]
18904
18926
  }, props));
18905
18927
  };
18906
18928