@wlloyalty/wll-react-sdk 1.0.97 → 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 +1 -18
- package/dist/native.js.map +1 -1
- package/dist/web.js +1 -18
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/native.js
CHANGED
|
@@ -1681,11 +1681,7 @@ var validateTheme = function (theme) {
|
|
|
1681
1681
|
'text',
|
|
1682
1682
|
];
|
|
1683
1683
|
// fontFamily is optional - it has a default value in defaultTheme
|
|
1684
|
-
// Log missing or invalid colors for debugging
|
|
1685
1684
|
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
1685
|
return missingOrInvalidColors.length === 0;
|
|
1690
1686
|
};
|
|
1691
1687
|
/**
|
|
@@ -1922,12 +1918,6 @@ function useResponsive() {
|
|
|
1922
1918
|
var createTheme = function (baseTheme) {
|
|
1923
1919
|
if (baseTheme === void 0) { baseTheme = {}; }
|
|
1924
1920
|
var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
|
|
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
|
-
});
|
|
1931
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) });
|
|
1932
1922
|
};
|
|
1933
1923
|
var WllSdkContext = React.createContext(undefined);
|
|
@@ -1946,14 +1936,6 @@ var WllSdkProvider = function (_a) {
|
|
|
1946
1936
|
if (!validateTheme(themeToUse)) {
|
|
1947
1937
|
console.warn('Invalid theme provided. Some required colors are missing or invalid.');
|
|
1948
1938
|
}
|
|
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
|
-
});
|
|
1957
1939
|
setThemeState(createTheme(themeToUse));
|
|
1958
1940
|
}, [providedTheme]);
|
|
1959
1941
|
var setTheme = React.useCallback(function (newTheme) {
|
|
@@ -2321,6 +2303,7 @@ var Text = function (_a) {
|
|
|
2321
2303
|
var baseTextStyle = {
|
|
2322
2304
|
fontFamily: theme.fontFamily,
|
|
2323
2305
|
};
|
|
2306
|
+
// NOTE: We must apply fontFamily as base style to ensure it's always applied
|
|
2324
2307
|
return jsxRuntimeExports.jsx(reactNative.Text, __assign({ style: [baseTextStyle, variantStyle, style] }, props));
|
|
2325
2308
|
};
|
|
2326
2309
|
|