wix-style-processor
Advanced tools
Comparing version 3.0.28 to 3.0.29
@@ -40,3 +40,3 @@ "use strict"; | ||
catch (e) { | ||
throw 'unparsable color ' + colorValue; | ||
throw "Unparsable color " + colorValue; | ||
} | ||
@@ -51,3 +51,3 @@ }, | ||
var _a = utils_1.parseJson(font), theme = _a.theme, overrides = __rest(_a, ["theme"]); | ||
fontValue = Object.assign({}, tpaParams.fonts[theme], overrides); | ||
fontValue = Object.assign({ style: '', variant: '', weight: '', stretch: '', size: '', lineHeight: '', family: [] }, tpaParams.fonts[theme], overrides); | ||
} | ||
@@ -54,0 +54,0 @@ else if (tpaParams.fonts[font]) { |
@@ -20,2 +20,3 @@ "use strict"; | ||
defaultOptions.shouldUseCssVars = domService_1.default.isCssVarsSupported() && (wixService.isEditorMode() || wixService.isPreviewMode()); | ||
defaultOptions.shouldApplyCSSFunctions = !wixService.isStandaloneMode(); | ||
options = Object.assign({}, defaultOptions, options); | ||
@@ -22,0 +23,0 @@ var styleUpdater = styleUpdater_1.default(wixService, domServiceOverride, options); |
@@ -34,3 +34,5 @@ "use strict"; | ||
applyDeclarationReplacers(options.plugins, stylis); | ||
applyCssFunctionsExtraction({ tpaParams: tpaParams, cacheMap: cacheMap, options: options }, stylis); | ||
if (options.shouldApplyCSSFunctions) { | ||
applyCssFunctionsExtraction({ tpaParams: tpaParams, cacheMap: cacheMap, options: options }, stylis); | ||
} | ||
var newCss = stylis('', css); | ||
@@ -48,3 +50,3 @@ domService.overrideStyle(tagStyle, newCss); | ||
}).catch(function (err) { | ||
console.error('failed updating styles', err); | ||
console.error('Failed updating styles:', err); | ||
throw err; | ||
@@ -51,0 +53,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"description": "An alternative Wix Styles TPA processor", | ||
"version": "3.0.28", | ||
"version": "3.0.29", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "Eran Shabi", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4412940
31379