|
|
@ -11,7 +11,8 @@ import {
|
|
|
|
generateRadii,
|
|
|
|
generateRadii,
|
|
|
|
generateFonts,
|
|
|
|
generateFonts,
|
|
|
|
composePreset,
|
|
|
|
composePreset,
|
|
|
|
getThemes
|
|
|
|
getThemes,
|
|
|
|
|
|
|
|
shadows2to3
|
|
|
|
} from '../../services/style_setter/style_setter.js'
|
|
|
|
} from '../../services/style_setter/style_setter.js'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
CURRENT_VERSION,
|
|
|
|
CURRENT_VERSION,
|
|
|
@ -159,6 +160,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// This needs optimization maybe
|
|
|
|
// This needs optimization maybe
|
|
|
|
previewContrast () {
|
|
|
|
previewContrast () {
|
|
|
|
|
|
|
|
try {
|
|
|
|
if (!this.previewTheme.colors.bg) return {}
|
|
|
|
if (!this.previewTheme.colors.bg) return {}
|
|
|
|
const colors = this.previewTheme.colors
|
|
|
|
const colors = this.previewTheme.colors
|
|
|
|
const opacity = this.previewTheme.opacity
|
|
|
|
const opacity = this.previewTheme.opacity
|
|
|
@ -215,6 +217,9 @@ export default {
|
|
|
|
}, {})
|
|
|
|
}, {})
|
|
|
|
|
|
|
|
|
|
|
|
return Object.entries(ratios).reduce((acc, [k, v]) => { acc[k] = hints(v); return acc }, {})
|
|
|
|
return Object.entries(ratios).reduce((acc, [k, v]) => { acc[k] = hints(v); return acc }, {})
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.warn('Failure computing contrasts', e)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
previewRules () {
|
|
|
|
previewRules () {
|
|
|
|
if (!this.preview.rules) return ''
|
|
|
|
if (!this.preview.rules) return ''
|
|
|
@ -466,7 +471,11 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.keepShadows) {
|
|
|
|
if (!this.keepShadows) {
|
|
|
|
this.clearShadows()
|
|
|
|
this.clearShadows()
|
|
|
|
|
|
|
|
if (version === 2) {
|
|
|
|
|
|
|
|
this.shadowsLocal = shadows2to3(shadows)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.shadowsLocal = shadows
|
|
|
|
this.shadowsLocal = shadows
|
|
|
|
|
|
|
|
}
|
|
|
|
this.shadowSelected = this.shadowsAvailable[0]
|
|
|
|
this.shadowSelected = this.shadowsAvailable[0]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|