@wlloyalty/wll-react-sdk 1.0.98 → 1.0.99

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/web.js CHANGED
@@ -8229,10 +8229,19 @@ var isValidColor = function (color) {
8229
8229
  */
8230
8230
  var validateTheme = function (theme) {
8231
8231
  var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', 'text'];
8232
- // fontFamily is optional - it has a default value in defaultTheme
8233
8232
  var missingOrInvalidColors = requiredColors.filter(function (color) {
8234
8233
  return !theme[color] || !isValidColor(theme[color]);
8235
8234
  });
8235
+ if (missingOrInvalidColors.length > 0) {
8236
+ console.warn('Theme validation failed. Missing or invalid colors:', missingOrInvalidColors.map(function (color) {
8237
+ return {
8238
+ color: color,
8239
+ value: theme[color],
8240
+ exists: !!theme[color],
8241
+ isValid: theme[color] ? isValidColor(theme[color]) : false
8242
+ };
8243
+ }));
8244
+ }
8236
8245
  return missingOrInvalidColors.length === 0;
8237
8246
  };
8238
8247
  /**
@@ -8242,7 +8251,11 @@ var validateTheme = function (theme) {
8242
8251
  */
8243
8252
  var createSafeColor = function (color) {
8244
8253
  try {
8245
- return Color(color);
8254
+ var colorInstance = Color(color);
8255
+ console.log('Original color:', color);
8256
+ console.log('Color instance toString:', colorInstance.toString());
8257
+ console.log('Color instance hex:', colorInstance.hex());
8258
+ return colorInstance;
8246
8259
  } catch (error) {
8247
8260
  console.error("Invalid color value: ".concat(color), error);
8248
8261
  return null;