Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import styled, {
map as _map,
css,
create,
set,
__css__,
KEYS,
} from '@reshadow/core';
KEYS.__classProp__ = 'class';
const map = (element, data) => {
if (!data.attrs) return data;
data.attrs.class = data.class;
data.attrs.style = data.style;
data.attrs = _map(element, data.attrs);
data.class = data.attrs.class;
data.style = data.attrs.style;
delete data.attrs.class;
delete data.attrs.style;
return data;
};
const use = obj => {
const result = {attrs: {}};
result.attrs[KEYS.__use__] = obj;
module.exports = (babel, pluginOptions = {}) => {
const options = Object.assign({}, defaultOptions, pluginOptions);
const classProp = options.classProp || KEYS.__classProp__;
if (options.target === 'preact') {
if (pluginOptions.stringStyle !== undefined) {
options.stringStyle = true;
}
}
let moduleName = '@reshadow/core';
if (options.target === 'vue') {
moduleName = '@reshadow/vue';
}
let STYLED = new Set();
let IGNORE_TAGS = new Set();
let BINDINGS = {};