babel-plugin-tailwind-components
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -1,2 +0,2 @@ | ||
var e={"bg-bottom":{backgroundPosition:"bottom"},"bg-center":{backgroundPosition:"center"},"bg-left":{backgroundPosition:"left"},"bg-left-bottom":{backgroundPosition:"left bottom"},"bg-left-top":{backgroundPosition:"left top"},"bg-right":{backgroundPosition:"right"},"bg-right-bottom":{backgroundPosition:"right bottom"},"bg-right-top":{backgroundPosition:"right-top"},"bg-top":{backgroundPosition:"top"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-no-repeat":{backgroundRepeat:"no-repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-cover":{backgroundSize:"cover"},"bg-contain":{backgroundSize:"contain"},"bg-fixed":{backgroundAttachment:"fixed"},"bg-local":{backgroundAttachment:"local"},"bg-scroll":{backgroundAttachment:"scroll"},"border-solid":{borderStyle:"solid"},"border-dashed":{borderStyle:"dashed"},"border-dotted":{borderStyle:"dotted"},"border-none":{borderStyle:"none"},block:{display:"block"},"inline-block":{display:"inline-block"},inline:{display:"inline"},table:{display:"table"},"table-row":{display:"table-row"},"table-cell":{display:"table-cell"},hidden:{display:"none"},flex:{display:"flex"},"inline-flex":{display:"inline-flex"},"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"},"flex-no-wrap":{flexWrap:"nowrap"},"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"justify-start":{justifyContent:"flex-start"},"justify-center":{justifyContent:"center"},"justify-end":{justifyContent:"flex-end"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"items-stretch":{alignItems:"flex-stretch"},"items-start":{alignItems:"flex-start"},"items-center":{alignItems:"center"},"items-end":{alignItems:"flex-end"},"items-baseline":{alignItems:"baseline"},"content-start":{alignContent:"flex-start"},"content-center":{alignContent:"center"},"content-end":{alignContent:"flex-end"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-center":{alignSelf:"center"},"self-end":{alignSelf:"flex-end"},"self-stretch":{alignSelf:"stretch"},"flex-initial":{flex:"initial"},"flex-1":{flex:1},"flex-auto":{flex:"auto"},"flex-none":{flex:"none"},"flex-grow":{flexGrow:1},"flex-shrink":{flexShrink:1},"flex-no-grow":{flexGrow:0},"flex-no-shrink":{flexShrink:0},"float-right":{float:"right"},"float-left":{float:"left"},"float-none":{float:"none"},clearfix:{"::after":{content:'""',display:"table",clear:"both"}},"appearance-none":{appearance:"none"},"cursor-auto":{cursor:"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-not-allowed":{cursor:"not-allowed"},"resize-none":{resize:"none"},resize:{resize:"both"},"resize-y":{resize:"vertical"},"resize-x":{resize:"horizontal"},"pointer-events-none":{pointerEvents:"none"},"pointer-events-auto":{pointerEvents:"auto"},"select-none":{userSelect:"none"},"select-text":{userSelect:"text"},"list-reset":{listStyle:"none",padding:0},"overflow-visible":{overflow:"visible"},"overflow-auto":{overflow:"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-scroll":{overflowX:"auto"},"overflow-y-scroll":{overflowY:"auto"},"overflow-scroll":{overflow:"scroll"},"scrolling-touch":{webkitOverflowScrolling:"touch"},"scrolling-auto":{webkitOverflowScrolling:"auto"},static:{position:"static"},fixed:{position:"fixed"},absolute:{position:"absolute"},relative:{position:"relative"},"pin-t":{top:0},"pin-r":{right:0},"pin-b":{bottom:0},"pin-l":{left:0},"pin-y":{top:0,bottom:0},"pin-x":{right:0,left:0},pin:{top:0,right:0,bottom:0,left:0},"pin-none":{top:"auto",right:"auto",bottom:"auto",left:"auto"},"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"},italic:{fontStyle:"italic"},roman:{fontStyle:"normal"},uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"},underline:{textDecoration:"underline"},"line-through":{textDecoration:"line-through"},"no-underline":{textDecoration:"none"},antialiased:{webkitFontSmoothing:"antialiased",mozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{webkitFontSmoothing:"auto",mozOsxFontSmoothing:"auto"},"whitespace-normal":{whiteSpace:"normal"},"whitespace-no-wrap":{whiteSpace:"nowrap"},"whitespace-pre":{whiteSpace:"pre"},"whitespace-pre-line":{whiteSpace:"pre-line"},"whitespace-pre-wrap":{whiteSpace:"pre-wrap"},"break-words":{wordWrap:"break-word"},"break-normal":{wordWrap:"normal"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"align-baseline":{verticalAlign:"baseline"},"align-top":{verticalAlign:"top"},"align-middle":{verticalAlign:"middle"},"align-bottom":{verticalAlign:"bottom"},"align-text-top":{verticalAlign:"text-top"},"align-text-bottom":{verticalAlign:"text-bottom"},visible:{visibility:"visible"},invisible:{visibility:"hidden"}},r={bg:{prop:"backgroundColor",config:"backgroundColors"},"border-t":{prop:"borderTopWidth",config:"borderWidths"},"border-b":{prop:"borderBottomWidth",config:"borderWidths"},"border-l":{prop:"borderLeftWidth",config:"borderWidths"},"border-r":{prop:"borderRightWidth",config:"borderWidths"},border:[{prop:"borderColor",config:"borderColors"},{prop:"borderWidth",config:"borderWidths"}],"rounded-t":{prop:"borderTopRadius",config:"borderRadius"},"rounded-r":{prop:"borderRightRadius",config:"borderRadius"},"rounded-b":{prop:"borderBottomRadius",config:"borderRadius"},"rounded-l":{prop:"borderLeftRadius",config:"borderRadius"},"rounded-tl":{prop:"borderTopLeftRadius",config:"borderRadius"},"rounded-tr":{prop:"borderTopRightRadius",config:"borderRadius"},"rounded-br":{prop:"borderBottomRightRadius",config:"borderRadius"},"rounded-bl":{prop:"borderBottomLeftRadius",config:"borderRadius"},rounded:{prop:"borderRadius",config:"borderRadius"},opacity:{prop:"opacity",config:"opacity"},shadow:{prop:"boxShadow",config:"shadows"},w:{prop:"width",config:"width"},"min-w":{prop:"minWidth",config:"minWidth"},"max-w":{prop:"maxWidth",config:"maxWidth"},h:{prop:"height",config:"height"},"min-h":{prop:"minHeight",config:"minHeight"},"max-h":{prop:"maxHeight",config:"maxHeight"},pt:{prop:"paddingTop",config:"padding"},pr:{prop:"paddingRight",config:"padding"},pb:{prop:"paddingBottom",config:"padding"},pl:{prop:"paddingLeft",config:"padding"},px:{prop:["paddingLeft","paddingRight"],config:"padding"},py:{prop:["paddingTop","paddingBottom"],config:"padding"},p:{prop:"padding",config:"padding"},mt:{prop:"marginTop",config:"margin"},mr:{prop:"marginRight",config:"margin"},mb:{prop:"marginBottom",config:"margin"},ml:{prop:"marginLeft",config:"margin"},mx:{prop:["marginLeft","marginRight"],config:"margin"},my:{prop:["marginTop","marginBottom"],config:"margin"},m:{prop:"margin",config:"margin"},"-mt":{prop:"marginTop",config:"negativeMargin",pre:"-"},"-mr":{prop:"marginRight",config:"negativeMargin",pre:"-"},"-mb":{prop:"marginBottom",config:"negativeMargin",pre:"-"},"-ml":{prop:"marginLeft",config:"negativeMargin",pre:"-"},"-mx":{prop:["marginLeft","marginRight"],config:"negativeMargin",pre:"-"},"-my":{prop:["marginTop","marginBottom"],config:"negativeMargin",pre:"-"},"-m":{prop:"margin",config:"negativeMargin",pre:"-"},fill:{prop:"fill",config:"svgFill"},stroke:{prop:"stroke",config:"svgStroke"},font:[{prop:"fontWeight",config:"fontWeights"},{prop:"fontFamily",config:"fonts",preDev:"(",postDev:" || []).map(x => '\"' + x + '\"').join(', ')",format:function(e){return e.map(function(e){return'"'+e+'"'}).join(", ")}}],text:[{prop:"color",config:"textColors"},{prop:"fontSize",config:"textSizes"}],leading:{prop:"lineHeight",config:"leading"},tracking:{prop:"letterSpacing",config:"tracking"},z:{prop:"zIndex",config:"zIndex"}},t=Object.assign||function(e){for(var r=arguments,t=1;t<arguments.length;t++){var o=r[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},o=require("babylon"),n=require("babel-generator").default;require("path");function i(i){var s,d,c,g,f=i.path,u=i.t,b=i.configPath,m="production"===process.env.NODE_ENV,h=!m,x=i.outputFormat;if(!x||"auto"===x){var v=f.findParent(function(e){return e.isJSXElement()});x=v&&"style"===v.node.openingElement.name.name?"string":"object"}var w,y,k=f.node.quasi.quasis[0].value.cooked.match(/[a-z0-9-_:]+/gi)||[];if("production"===process.env.NODE_ENV)w=require(b);else{var S=f.find(function(e){return e.isProgram()});y=S.scope.generateUidIdentifier("tailwind"),S.unshiftContainer("body",u.importDeclaration([u.importDefaultSpecifier(y)],u.stringLiteral(b)))}var R=k.reduce(function(o,n,i){var f,u=n.match(/^([a-z-_]+):/i);if(u&&(n=n.substr(u[0].length),u="hover"===u[1]||"focus"===u[1]?":"+u[1]:m?"@media (min-width: "+w.screens[u[1]]+")":"`@media (min-width: ${"+y.name+'.screens["'+u[1]+'"]})`'),e[n])return l(o,u?((s={})[u]=l(o[u]||{},e[n]),s):e[n]);if(Object.keys(r).some(function(e){if(n.startsWith(e+"-")||n===e)return f=e,!0}),f){var b,v=n.substr(f.length+1);if(""===v&&(v="default"),Array.isArray(r[f])){var k=r[f].map(function(e){var r=p(e,h),t=r.pre,o=r.post;if(!m||void 0!==w[e.config][v]){var n=e.format?e.format:function(e){return e};return m?((d={})[e.prop]=t||o?t+n(w[e.config][v])+o:n(w[e.config][v]),d):"string"===x?"['"+a(e.prop)+"', "+t+y.name+"."+e.config+'["'+v+'"]'+o+"]":"{"+e.prop+":"+t+y.name+"."+e.config+'["'+v+'"]'+o+"}"}});m?b=k.filter(function(e){return void 0!==e})[0]:"string"===x?(k="["+k.join(",")+"].filter(x => typeof x[1] !== 'undefined' && x[1] !== '')[0].join(':')",(b={})["__spread__"+i]=k):(k="["+k.join(",")+'].filter(x => typeof x[Object.keys(x)[0]] !== "undefined" && x[Object.keys(x)[0]] !== "")[0]',(b={})["__spread__"+i]=k)}else{b=Array.isArray(r[f].prop)?r[f].prop:[r[f].prop];var S=p(r[f],h),R=S.pre,j=S.post,W=r[f].format?r[f].format:function(e){return e};b=b.reduce(function(e,o){return t({},e,((c={})[o]=m?R+W(w[r[f].config][v])+j:"$"+R+y.name+"."+r[f].config+'["'+v+'"]'+j,c))},{})}return l(o,u?((g={})[u]=l(o[u]||{},b),g):b)}return o},{}),j=function e(r,t){if(null===r)return t.nullLiteral();switch(typeof r){case"function":var n=o.parse(r.toString(),{allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0});return traverse.removeProperties(n);case"number":return t.numericLiteral(r);case"string":return r.startsWith("$")?o.parseExpression(r.substr(1)):t.stringLiteral(r);case"boolean":return t.booleanLiteral(r);case"undefined":return t.unaryExpression("void",t.numericLiteral(0),!0);default:return Array.isArray(r)?t.arrayExpression(r.map(function(r){return e(r,t)})):t.objectExpression(Object.keys(r).filter(function(e){return void 0!==r[e]}).map(function(n){if(n.startsWith("__spread__"))return t.spreadProperty(o.parseExpression(r[n]));var i=n.startsWith("`"),a=i?o.parseExpression(n):t.stringLiteral(n);return t.objectProperty(a,e(r[n],t),i)}))}}(R,u);if("string"===x){var W=function e(r,t){void 0===t&&(t=!1);var o=t?"/**/":"";return Object.keys(r).reduce(function(t,n){var i=r[n];if(n.startsWith("__spread__"))return t+"${"+i+"};"+o;if("string"==typeof i)return"$"===i[0]&&(i="${"+i.substr(1)+"}"),t+a(n)+":"+i+";"+o;i=e(i);var p=":"===n[0]?"&"+n:n;return p="`"===p[0]?p.substr(1,p.length-2):p,t+a(p)+"{"+i+"};"+o},"")}(R,h),z=f.parentPath;if(z.isTemplateLiteral()){var A=z.get("expressions").indexOf(f),_=z.get("quasis")[A],L=z.get("quasis")[A+1];L.node.value.raw=_.node.value.raw+W+L.node.value.raw,L.node.value.cooked=_.node.value.cooked+W+L.node.value.cooked,_.remove(),f.remove();var O=o.parseExpression(n(z.node).code);z.replaceWith(O)}else{f.replaceWith(o.parseExpression("`"+W+"`"))}}else f.replaceWith(j)}function a(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase().replace(/^(ms|o|moz|webkit)-/,"-$1-")}function p(e,r){var t="",o="";return r&&e.preDev?t=e.preDev:e.pre&&(t=e.pre),r&&e.postDev?o=e.postDev:e.post&&(o=e.post),{pre:t,post:o}}function l(e,r){return Object.assign({},e,r)}require("babylon");var s=require("path");module.exports=function(e){var r=e.types;return{visitor:{TaggedTemplateExpression:function(e,t){"tw"===e.node.tag.name&&i({path:e,configPath:s.resolve(t.file.opts.sourceRoot||".",t.opts.config||"./tailwind.js"),t:r,outputFormat:t.opts.format})}}}}; | ||
var e={"bg-bottom":{backgroundPosition:"bottom"},"bg-center":{backgroundPosition:"center"},"bg-left":{backgroundPosition:"left"},"bg-left-bottom":{backgroundPosition:"left bottom"},"bg-left-top":{backgroundPosition:"left top"},"bg-right":{backgroundPosition:"right"},"bg-right-bottom":{backgroundPosition:"right bottom"},"bg-right-top":{backgroundPosition:"right-top"},"bg-top":{backgroundPosition:"top"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-no-repeat":{backgroundRepeat:"no-repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-cover":{backgroundSize:"cover"},"bg-contain":{backgroundSize:"contain"},"bg-fixed":{backgroundAttachment:"fixed"},"bg-local":{backgroundAttachment:"local"},"bg-scroll":{backgroundAttachment:"scroll"},"border-solid":{borderStyle:"solid"},"border-dashed":{borderStyle:"dashed"},"border-dotted":{borderStyle:"dotted"},"border-none":{borderStyle:"none"},block:{display:"block"},"inline-block":{display:"inline-block"},inline:{display:"inline"},table:{display:"table"},"table-row":{display:"table-row"},"table-cell":{display:"table-cell"},hidden:{display:"none"},flex:{display:"flex"},"inline-flex":{display:"inline-flex"},"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"},"flex-no-wrap":{flexWrap:"nowrap"},"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"justify-start":{justifyContent:"flex-start"},"justify-center":{justifyContent:"center"},"justify-end":{justifyContent:"flex-end"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"items-stretch":{alignItems:"flex-stretch"},"items-start":{alignItems:"flex-start"},"items-center":{alignItems:"center"},"items-end":{alignItems:"flex-end"},"items-baseline":{alignItems:"baseline"},"content-start":{alignContent:"flex-start"},"content-center":{alignContent:"center"},"content-end":{alignContent:"flex-end"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-center":{alignSelf:"center"},"self-end":{alignSelf:"flex-end"},"self-stretch":{alignSelf:"stretch"},"flex-initial":{flex:"initial"},"flex-1":{flex:1},"flex-auto":{flex:"auto"},"flex-none":{flex:"none"},"flex-grow":{flexGrow:1},"flex-shrink":{flexShrink:1},"flex-no-grow":{flexGrow:0},"flex-no-shrink":{flexShrink:0},"float-right":{float:"right"},"float-left":{float:"left"},"float-none":{float:"none"},clearfix:{"::after":{content:'""',display:"table",clear:"both"}},"appearance-none":{appearance:"none"},"cursor-auto":{cursor:"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-not-allowed":{cursor:"not-allowed"},"resize-none":{resize:"none"},resize:{resize:"both"},"resize-y":{resize:"vertical"},"resize-x":{resize:"horizontal"},"pointer-events-none":{pointerEvents:"none"},"pointer-events-auto":{pointerEvents:"auto"},"select-none":{userSelect:"none"},"select-text":{userSelect:"text"},"list-reset":{listStyle:"none",padding:0},"overflow-visible":{overflow:"visible"},"overflow-auto":{overflow:"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-scroll":{overflowX:"auto"},"overflow-y-scroll":{overflowY:"auto"},"overflow-scroll":{overflow:"scroll"},"scrolling-touch":{webkitOverflowScrolling:"touch"},"scrolling-auto":{webkitOverflowScrolling:"auto"},static:{position:"static"},fixed:{position:"fixed"},absolute:{position:"absolute"},relative:{position:"relative"},"pin-t":{top:0},"pin-r":{right:0},"pin-b":{bottom:0},"pin-l":{left:0},"pin-y":{top:0,bottom:0},"pin-x":{right:0,left:0},pin:{top:0,right:0,bottom:0,left:0},"pin-none":{top:"auto",right:"auto",bottom:"auto",left:"auto"},"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"},italic:{fontStyle:"italic"},roman:{fontStyle:"normal"},uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"},underline:{textDecoration:"underline"},"line-through":{textDecoration:"line-through"},"no-underline":{textDecoration:"none"},antialiased:{webkitFontSmoothing:"antialiased",mozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{webkitFontSmoothing:"auto",mozOsxFontSmoothing:"auto"},"whitespace-normal":{whiteSpace:"normal"},"whitespace-no-wrap":{whiteSpace:"nowrap"},"whitespace-pre":{whiteSpace:"pre"},"whitespace-pre-line":{whiteSpace:"pre-line"},"whitespace-pre-wrap":{whiteSpace:"pre-wrap"},"break-words":{wordWrap:"break-word"},"break-normal":{wordWrap:"normal"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"align-baseline":{verticalAlign:"baseline"},"align-top":{verticalAlign:"top"},"align-middle":{verticalAlign:"middle"},"align-bottom":{verticalAlign:"bottom"},"align-text-top":{verticalAlign:"text-top"},"align-text-bottom":{verticalAlign:"text-bottom"},visible:{visibility:"visible"},invisible:{visibility:"hidden"}},r={bg:{prop:"backgroundColor",config:"backgroundColors"},"border-t":{prop:"borderTopWidth",config:"borderWidths"},"border-b":{prop:"borderBottomWidth",config:"borderWidths"},"border-l":{prop:"borderLeftWidth",config:"borderWidths"},"border-r":{prop:"borderRightWidth",config:"borderWidths"},border:[{prop:"borderColor",config:"borderColors"},{prop:"borderWidth",config:"borderWidths"}],"rounded-t":{prop:"borderTopRadius",config:"borderRadius"},"rounded-r":{prop:"borderRightRadius",config:"borderRadius"},"rounded-b":{prop:"borderBottomRadius",config:"borderRadius"},"rounded-l":{prop:"borderLeftRadius",config:"borderRadius"},"rounded-tl":{prop:"borderTopLeftRadius",config:"borderRadius"},"rounded-tr":{prop:"borderTopRightRadius",config:"borderRadius"},"rounded-br":{prop:"borderBottomRightRadius",config:"borderRadius"},"rounded-bl":{prop:"borderBottomLeftRadius",config:"borderRadius"},rounded:{prop:"borderRadius",config:"borderRadius"},opacity:{prop:"opacity",config:"opacity"},shadow:{prop:"boxShadow",config:"shadows"},w:{prop:"width",config:"width"},"min-w":{prop:"minWidth",config:"minWidth"},"max-w":{prop:"maxWidth",config:"maxWidth"},h:{prop:"height",config:"height"},"min-h":{prop:"minHeight",config:"minHeight"},"max-h":{prop:"maxHeight",config:"maxHeight"},pt:{prop:"paddingTop",config:"padding"},pr:{prop:"paddingRight",config:"padding"},pb:{prop:"paddingBottom",config:"padding"},pl:{prop:"paddingLeft",config:"padding"},px:{prop:["paddingLeft","paddingRight"],config:"padding"},py:{prop:["paddingTop","paddingBottom"],config:"padding"},p:{prop:"padding",config:"padding"},mt:{prop:"marginTop",config:"margin"},mr:{prop:"marginRight",config:"margin"},mb:{prop:"marginBottom",config:"margin"},ml:{prop:"marginLeft",config:"margin"},mx:{prop:["marginLeft","marginRight"],config:"margin"},my:{prop:["marginTop","marginBottom"],config:"margin"},m:{prop:"margin",config:"margin"},"-mt":{prop:"marginTop",config:"negativeMargin",pre:"-"},"-mr":{prop:"marginRight",config:"negativeMargin",pre:"-"},"-mb":{prop:"marginBottom",config:"negativeMargin",pre:"-"},"-ml":{prop:"marginLeft",config:"negativeMargin",pre:"-"},"-mx":{prop:["marginLeft","marginRight"],config:"negativeMargin",pre:"-"},"-my":{prop:["marginTop","marginBottom"],config:"negativeMargin",pre:"-"},"-m":{prop:"margin",config:"negativeMargin",pre:"-"},fill:{prop:"fill",config:"svgFill"},stroke:{prop:"stroke",config:"svgStroke"},font:[{prop:"fontWeight",config:"fontWeights"},{prop:"fontFamily",config:"fonts",preDev:"(",postDev:" || []).map(x => '\"' + x + '\"').join(', ')",format:function(e){return e.map(function(e){return'"'+e+'"'}).join(", ")}}],text:[{prop:"color",config:"textColors"},{prop:"fontSize",config:"textSizes"}],leading:{prop:"lineHeight",config:"leading"},tracking:{prop:"letterSpacing",config:"tracking"},z:{prop:"zIndex",config:"zIndex"}};function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var o=require("@babel/parser"),n=require("@babel/generator").default;function i(i){var c,d,f,g,u=i.path,b=i.t,m=i.configPath,h="production"===process.env.NODE_ENV,x=!h,v=i.outputFormat;if(!v||"auto"===v){var w=u.findParent(function(e){return e.isJSXElement()});v=w&&"style"===w.node.openingElement.name.name?"string":"object"}var y,k,S=u.node.quasi.quasis[0].value.cooked.match(/[a-z0-9-_:]+/gi)||[];if("production"===process.env.NODE_ENV)y=require(m);else{var R=u.find(function(e){return e.isProgram()});k=R.scope.generateUidIdentifier("tailwind"),R.unshiftContainer("body",b.importDeclaration([b.importDefaultSpecifier(k)],b.stringLiteral(m)))}var j=S.reduce(function(o,n,i){var s,u=n.match(/^([a-z-_]+):/i);if(u&&(n=n.substr(u[0].length),u="hover"===u[1]||"focus"===u[1]?":"+u[1]:h?"@media (min-width: "+y.screens[u[1]]+")":"`@media (min-width: ${"+k.name+'.screens["'+u[1]+'"]})`'),e[n])return l(o,u?((c={})[u]=l(o[u]||{},e[n]),c):e[n]);if(Object.keys(r).some(function(e){if(n.startsWith(e+"-")||n===e)return s=e,!0}),s){var b,m=n.substr(s.length+1);if(""===m&&(m="default"),Array.isArray(r[s])){var w=r[s].map(function(e){var r=p(e,x),t=r.pre,o=r.post;if(!h||void 0!==y[e.config][m]){var n=e.format?e.format:function(e){return e};return h?((d={})[e.prop]=t||o?t+n(y[e.config][m])+o:n(y[e.config][m]),d):"string"===v?"['"+a(e.prop)+"', "+t+k.name+"."+e.config+'["'+m+'"]'+o+"]":"{"+e.prop+":"+t+k.name+"."+e.config+'["'+m+'"]'+o+"}"}});h?b=w.filter(function(e){return void 0!==e})[0]:"string"===v?(w="["+w.join(",")+"].filter(x => typeof x[1] !== 'undefined' && x[1] !== '')[0].join(':')",(b={})["__spread__"+i]=w):(w="["+w.join(",")+'].filter(x => typeof x[Object.keys(x)[0]] !== "undefined" && x[Object.keys(x)[0]] !== "")[0]',(b={})["__spread__"+i]=w)}else{b=Array.isArray(r[s].prop)?r[s].prop:[r[s].prop];var S=p(r[s],x),R=S.pre,j=S.post,W=r[s].format?r[s].format:function(e){return e};b=b.reduce(function(e,o){return function(e){for(var r=arguments,o=1;o<arguments.length;o++){var n=null!=r[o]?r[o]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(r){t(e,r,n[r])})}return e}({},e,((f={})[o]=h?R+W(y[r[s].config][m])+j:"$"+R+k.name+"."+r[s].config+'["'+m+'"]'+j,f))},{})}return l(o,u?((g={})[u]=l(o[u]||{},b),g):b)}return o},{}),W=s(j,b);if("string"===v){var O=function e(r,t){void 0===t&&(t=!1);var o=t?"/**/":"";return Object.keys(r).reduce(function(t,n){var i=r[n];if(n.startsWith("__spread__"))return t+"${"+i+"};"+o;if("string"==typeof i)return"$"===i[0]&&(i="${"+i.substr(1)+"}"),t+a(n)+":"+i+";"+o;i=e(i);var p=":"===n[0]?"&"+n:n;return p="`"===p[0]?p.substr(1,p.length-2):p,t+a(p)+"{"+i+"};"+o},"")}(j,x),z=u.parentPath;if(z.isTemplateLiteral()){var P=z.get("expressions").indexOf(u),A=z.get("quasis")[P],E=z.get("quasis")[P+1];E.node.value.raw=A.node.value.raw+O+E.node.value.raw,E.node.value.cooked=A.node.value.cooked+O+E.node.value.cooked,A.remove(),u.remove();var _=o.parseExpression(n(z.node).code);z.replaceWith(_)}else{u.replaceWith(o.parseExpression("`"+O+"`"))}}else u.replaceWith(W)}function a(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase().replace(/^(ms|o|moz|webkit)-/,"-$1-")}function p(e,r){var t="",o="";return r&&e.preDev?t=e.preDev:e.pre&&(t=e.pre),r&&e.postDev?o=e.postDev:e.post&&(o=e.post),{pre:t,post:o}}function l(e,r){return Object.assign({},e,r)}function s(e,r){if(null===e)return r.nullLiteral();switch(typeof e){case"function":var t=o.parse(e.toString(),{allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0});return traverse.removeProperties(t);case"number":return r.numericLiteral(e);case"string":return e.startsWith("$")?o.parseExpression(e.substr(1)):r.stringLiteral(e);case"boolean":return r.booleanLiteral(e);case"undefined":return r.unaryExpression("void",r.numericLiteral(0),!0);default:if(Array.isArray(e))return r.arrayExpression(e.map(function(e){return s(e,r)}));try{return r.objectExpression(c(e,r,"spreadElement"))}catch(t){return r.objectExpression(c(e,r,"spreadProperty"))}}}function c(e,r,t){return Object.keys(e).filter(function(r){return void 0!==e[r]}).map(function(n){if(n.startsWith("__spread__"))return r[t](o.parseExpression(e[n]));var i=n.startsWith("`"),a=i?o.parseExpression(n):r.stringLiteral(n);return r.objectProperty(a,s(e[n],r),i)})}var d=require("path");module.exports=function(e){var r=e.types;return{visitor:{TaggedTemplateExpression:function(e,t){"tw"===e.node.tag.name&&i({path:e,configPath:d.resolve(t.file.opts.sourceRoot||".",t.opts.config||"./tailwind.js"),t:r,outputFormat:t.opts.format})}}}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var e={"bg-bottom":{backgroundPosition:"bottom"},"bg-center":{backgroundPosition:"center"},"bg-left":{backgroundPosition:"left"},"bg-left-bottom":{backgroundPosition:"left bottom"},"bg-left-top":{backgroundPosition:"left top"},"bg-right":{backgroundPosition:"right"},"bg-right-bottom":{backgroundPosition:"right bottom"},"bg-right-top":{backgroundPosition:"right-top"},"bg-top":{backgroundPosition:"top"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-no-repeat":{backgroundRepeat:"no-repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-cover":{backgroundSize:"cover"},"bg-contain":{backgroundSize:"contain"},"bg-fixed":{backgroundAttachment:"fixed"},"bg-local":{backgroundAttachment:"local"},"bg-scroll":{backgroundAttachment:"scroll"},"border-solid":{borderStyle:"solid"},"border-dashed":{borderStyle:"dashed"},"border-dotted":{borderStyle:"dotted"},"border-none":{borderStyle:"none"},block:{display:"block"},"inline-block":{display:"inline-block"},inline:{display:"inline"},table:{display:"table"},"table-row":{display:"table-row"},"table-cell":{display:"table-cell"},hidden:{display:"none"},flex:{display:"flex"},"inline-flex":{display:"inline-flex"},"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"},"flex-no-wrap":{flexWrap:"nowrap"},"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"justify-start":{justifyContent:"flex-start"},"justify-center":{justifyContent:"center"},"justify-end":{justifyContent:"flex-end"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"items-stretch":{alignItems:"flex-stretch"},"items-start":{alignItems:"flex-start"},"items-center":{alignItems:"center"},"items-end":{alignItems:"flex-end"},"items-baseline":{alignItems:"baseline"},"content-start":{alignContent:"flex-start"},"content-center":{alignContent:"center"},"content-end":{alignContent:"flex-end"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-center":{alignSelf:"center"},"self-end":{alignSelf:"flex-end"},"self-stretch":{alignSelf:"stretch"},"flex-initial":{flex:"initial"},"flex-1":{flex:1},"flex-auto":{flex:"auto"},"flex-none":{flex:"none"},"flex-grow":{flexGrow:1},"flex-shrink":{flexShrink:1},"flex-no-grow":{flexGrow:0},"flex-no-shrink":{flexShrink:0},"float-right":{float:"right"},"float-left":{float:"left"},"float-none":{float:"none"},clearfix:{"::after":{content:'""',display:"table",clear:"both"}},"appearance-none":{appearance:"none"},"cursor-auto":{cursor:"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-not-allowed":{cursor:"not-allowed"},"resize-none":{resize:"none"},resize:{resize:"both"},"resize-y":{resize:"vertical"},"resize-x":{resize:"horizontal"},"pointer-events-none":{pointerEvents:"none"},"pointer-events-auto":{pointerEvents:"auto"},"select-none":{userSelect:"none"},"select-text":{userSelect:"text"},"list-reset":{listStyle:"none",padding:0},"overflow-visible":{overflow:"visible"},"overflow-auto":{overflow:"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-scroll":{overflowX:"auto"},"overflow-y-scroll":{overflowY:"auto"},"overflow-scroll":{overflow:"scroll"},"scrolling-touch":{webkitOverflowScrolling:"touch"},"scrolling-auto":{webkitOverflowScrolling:"auto"},static:{position:"static"},fixed:{position:"fixed"},absolute:{position:"absolute"},relative:{position:"relative"},"pin-t":{top:0},"pin-r":{right:0},"pin-b":{bottom:0},"pin-l":{left:0},"pin-y":{top:0,bottom:0},"pin-x":{right:0,left:0},pin:{top:0,right:0,bottom:0,left:0},"pin-none":{top:"auto",right:"auto",bottom:"auto",left:"auto"},"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"},italic:{fontStyle:"italic"},roman:{fontStyle:"normal"},uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"},underline:{textDecoration:"underline"},"line-through":{textDecoration:"line-through"},"no-underline":{textDecoration:"none"},antialiased:{webkitFontSmoothing:"antialiased",mozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{webkitFontSmoothing:"auto",mozOsxFontSmoothing:"auto"},"whitespace-normal":{whiteSpace:"normal"},"whitespace-no-wrap":{whiteSpace:"nowrap"},"whitespace-pre":{whiteSpace:"pre"},"whitespace-pre-line":{whiteSpace:"pre-line"},"whitespace-pre-wrap":{whiteSpace:"pre-wrap"},"break-words":{wordWrap:"break-word"},"break-normal":{wordWrap:"normal"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"align-baseline":{verticalAlign:"baseline"},"align-top":{verticalAlign:"top"},"align-middle":{verticalAlign:"middle"},"align-bottom":{verticalAlign:"bottom"},"align-text-top":{verticalAlign:"text-top"},"align-text-bottom":{verticalAlign:"text-bottom"},visible:{visibility:"visible"},invisible:{visibility:"hidden"}},r={bg:{prop:"backgroundColor",config:"backgroundColors"},"border-t":{prop:"borderTopWidth",config:"borderWidths"},"border-b":{prop:"borderBottomWidth",config:"borderWidths"},"border-l":{prop:"borderLeftWidth",config:"borderWidths"},"border-r":{prop:"borderRightWidth",config:"borderWidths"},border:[{prop:"borderColor",config:"borderColors"},{prop:"borderWidth",config:"borderWidths"}],"rounded-t":{prop:"borderTopRadius",config:"borderRadius"},"rounded-r":{prop:"borderRightRadius",config:"borderRadius"},"rounded-b":{prop:"borderBottomRadius",config:"borderRadius"},"rounded-l":{prop:"borderLeftRadius",config:"borderRadius"},"rounded-tl":{prop:"borderTopLeftRadius",config:"borderRadius"},"rounded-tr":{prop:"borderTopRightRadius",config:"borderRadius"},"rounded-br":{prop:"borderBottomRightRadius",config:"borderRadius"},"rounded-bl":{prop:"borderBottomLeftRadius",config:"borderRadius"},rounded:{prop:"borderRadius",config:"borderRadius"},opacity:{prop:"opacity",config:"opacity"},shadow:{prop:"boxShadow",config:"shadows"},w:{prop:"width",config:"width"},"min-w":{prop:"minWidth",config:"minWidth"},"max-w":{prop:"maxWidth",config:"maxWidth"},h:{prop:"height",config:"height"},"min-h":{prop:"minHeight",config:"minHeight"},"max-h":{prop:"maxHeight",config:"maxHeight"},pt:{prop:"paddingTop",config:"padding"},pr:{prop:"paddingRight",config:"padding"},pb:{prop:"paddingBottom",config:"padding"},pl:{prop:"paddingLeft",config:"padding"},px:{prop:["paddingLeft","paddingRight"],config:"padding"},py:{prop:["paddingTop","paddingBottom"],config:"padding"},p:{prop:"padding",config:"padding"},mt:{prop:"marginTop",config:"margin"},mr:{prop:"marginRight",config:"margin"},mb:{prop:"marginBottom",config:"margin"},ml:{prop:"marginLeft",config:"margin"},mx:{prop:["marginLeft","marginRight"],config:"margin"},my:{prop:["marginTop","marginBottom"],config:"margin"},m:{prop:"margin",config:"margin"},"-mt":{prop:"marginTop",config:"negativeMargin",pre:"-"},"-mr":{prop:"marginRight",config:"negativeMargin",pre:"-"},"-mb":{prop:"marginBottom",config:"negativeMargin",pre:"-"},"-ml":{prop:"marginLeft",config:"negativeMargin",pre:"-"},"-mx":{prop:["marginLeft","marginRight"],config:"negativeMargin",pre:"-"},"-my":{prop:["marginTop","marginBottom"],config:"negativeMargin",pre:"-"},"-m":{prop:"margin",config:"negativeMargin",pre:"-"},fill:{prop:"fill",config:"svgFill"},stroke:{prop:"stroke",config:"svgStroke"},font:[{prop:"fontWeight",config:"fontWeights"},{prop:"fontFamily",config:"fonts",preDev:"(",postDev:" || []).map(x => '\"' + x + '\"').join(', ')",format:function(e){return e.map(function(e){return'"'+e+'"'}).join(", ")}}],text:[{prop:"color",config:"textColors"},{prop:"fontSize",config:"textSizes"}],leading:{prop:"lineHeight",config:"leading"},tracking:{prop:"letterSpacing",config:"tracking"},z:{prop:"zIndex",config:"zIndex"}},t=Object.assign||function(e){for(var r=arguments,t=1;t<arguments.length;t++){var o=r[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},o=require("babylon"),n=require("babel-generator").default;require("path");function i(i){var s,c,d,g,f=i.path,u=i.t,b=i.configPath,m="production"===process.env.NODE_ENV,h=!m,x=i.outputFormat;if(!x||"auto"===x){var v=f.findParent(function(e){return e.isJSXElement()});x=v&&"style"===v.node.openingElement.name.name?"string":"object"}var w,y,k=f.node.quasi.quasis[0].value.cooked.match(/[a-z0-9-_:]+/gi)||[];if("production"===process.env.NODE_ENV)w=require(b);else{var S=f.find(function(e){return e.isProgram()});y=S.scope.generateUidIdentifier("tailwind"),S.unshiftContainer("body",u.importDeclaration([u.importDefaultSpecifier(y)],u.stringLiteral(b)))}var R=k.reduce(function(o,n,i){var f,u=n.match(/^([a-z-_]+):/i);if(u&&(n=n.substr(u[0].length),u="hover"===u[1]||"focus"===u[1]?":"+u[1]:m?"@media (min-width: "+w.screens[u[1]]+")":"`@media (min-width: ${"+y.name+'.screens["'+u[1]+'"]})`'),e[n])return l(o,u?((s={})[u]=l(o[u]||{},e[n]),s):e[n]);if(Object.keys(r).some(function(e){if(n.startsWith(e+"-")||n===e)return f=e,!0}),f){var b,v=n.substr(f.length+1);if(""===v&&(v="default"),Array.isArray(r[f])){var k=r[f].map(function(e){var r=p(e,h),t=r.pre,o=r.post;if(!m||void 0!==w[e.config][v]){var n=e.format?e.format:function(e){return e};return m?((c={})[e.prop]=t||o?t+n(w[e.config][v])+o:n(w[e.config][v]),c):"string"===x?"['"+a(e.prop)+"', "+t+y.name+"."+e.config+'["'+v+'"]'+o+"]":"{"+e.prop+":"+t+y.name+"."+e.config+'["'+v+'"]'+o+"}"}});m?b=k.filter(function(e){return void 0!==e})[0]:"string"===x?(k="["+k.join(",")+"].filter(x => typeof x[1] !== 'undefined' && x[1] !== '')[0].join(':')",(b={})["__spread__"+i]=k):(k="["+k.join(",")+'].filter(x => typeof x[Object.keys(x)[0]] !== "undefined" && x[Object.keys(x)[0]] !== "")[0]',(b={})["__spread__"+i]=k)}else{b=Array.isArray(r[f].prop)?r[f].prop:[r[f].prop];var S=p(r[f],h),R=S.pre,j=S.post,W=r[f].format?r[f].format:function(e){return e};b=b.reduce(function(e,o){return t({},e,((d={})[o]=m?R+W(w[r[f].config][v])+j:"$"+R+y.name+"."+r[f].config+'["'+v+'"]'+j,d))},{})}return l(o,u?((g={})[u]=l(o[u]||{},b),g):b)}return o},{}),j=function e(r,t){if(null===r)return t.nullLiteral();switch(typeof r){case"function":var n=o.parse(r.toString(),{allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0});return traverse.removeProperties(n);case"number":return t.numericLiteral(r);case"string":return r.startsWith("$")?o.parseExpression(r.substr(1)):t.stringLiteral(r);case"boolean":return t.booleanLiteral(r);case"undefined":return t.unaryExpression("void",t.numericLiteral(0),!0);default:return Array.isArray(r)?t.arrayExpression(r.map(function(r){return e(r,t)})):t.objectExpression(Object.keys(r).filter(function(e){return void 0!==r[e]}).map(function(n){if(n.startsWith("__spread__"))return t.spreadProperty(o.parseExpression(r[n]));var i=n.startsWith("`"),a=i?o.parseExpression(n):t.stringLiteral(n);return t.objectProperty(a,e(r[n],t),i)}))}}(R,u);if("string"===x){var W=function e(r,t){void 0===t&&(t=!1);var o=t?"/**/":"";return Object.keys(r).reduce(function(t,n){var i=r[n];if(n.startsWith("__spread__"))return t+"${"+i+"};"+o;if("string"==typeof i)return"$"===i[0]&&(i="${"+i.substr(1)+"}"),t+a(n)+":"+i+";"+o;i=e(i);var p=":"===n[0]?"&"+n:n;return p="`"===p[0]?p.substr(1,p.length-2):p,t+a(p)+"{"+i+"};"+o},"")}(R,h),z=f.parentPath;if(z.isTemplateLiteral()){var A=z.get("expressions").indexOf(f),_=z.get("quasis")[A],L=z.get("quasis")[A+1];L.node.value.raw=_.node.value.raw+W+L.node.value.raw,L.node.value.cooked=_.node.value.cooked+W+L.node.value.cooked,_.remove(),f.remove();var O=o.parseExpression(n(z.node).code);z.replaceWith(O)}else{f.replaceWith(o.parseExpression("`"+W+"`"))}}else f.replaceWith(j)}function a(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase().replace(/^(ms|o|moz|webkit)-/,"-$1-")}function p(e,r){var t="",o="";return r&&e.preDev?t=e.preDev:e.pre&&(t=e.pre),r&&e.postDev?o=e.postDev:e.post&&(o=e.post),{pre:t,post:o}}function l(e,r){return Object.assign({},e,r)}var s=require("babel-plugin-macros").createMacro,c=require("path"),d=s(function(e){var r=e.babel.types,t=e.references,o=e.config,n=c.resolve(e.state.file.opts.sourceRoot||".",o&&o.config||"./tailwind.js");t.default.forEach(function(e){i({path:e.parentPath,t:r,configPath:n,outputFormat:o&&o.format})})},{configName:"tailwind"});module.exports=d; | ||
var e={"bg-bottom":{backgroundPosition:"bottom"},"bg-center":{backgroundPosition:"center"},"bg-left":{backgroundPosition:"left"},"bg-left-bottom":{backgroundPosition:"left bottom"},"bg-left-top":{backgroundPosition:"left top"},"bg-right":{backgroundPosition:"right"},"bg-right-bottom":{backgroundPosition:"right bottom"},"bg-right-top":{backgroundPosition:"right-top"},"bg-top":{backgroundPosition:"top"},"bg-repeat":{backgroundRepeat:"repeat"},"bg-no-repeat":{backgroundRepeat:"no-repeat"},"bg-repeat-x":{backgroundRepeat:"repeat-x"},"bg-repeat-y":{backgroundRepeat:"repeat-y"},"bg-cover":{backgroundSize:"cover"},"bg-contain":{backgroundSize:"contain"},"bg-fixed":{backgroundAttachment:"fixed"},"bg-local":{backgroundAttachment:"local"},"bg-scroll":{backgroundAttachment:"scroll"},"border-solid":{borderStyle:"solid"},"border-dashed":{borderStyle:"dashed"},"border-dotted":{borderStyle:"dotted"},"border-none":{borderStyle:"none"},block:{display:"block"},"inline-block":{display:"inline-block"},inline:{display:"inline"},table:{display:"table"},"table-row":{display:"table-row"},"table-cell":{display:"table-cell"},hidden:{display:"none"},flex:{display:"flex"},"inline-flex":{display:"inline-flex"},"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"},"flex-no-wrap":{flexWrap:"nowrap"},"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"justify-start":{justifyContent:"flex-start"},"justify-center":{justifyContent:"center"},"justify-end":{justifyContent:"flex-end"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"items-stretch":{alignItems:"flex-stretch"},"items-start":{alignItems:"flex-start"},"items-center":{alignItems:"center"},"items-end":{alignItems:"flex-end"},"items-baseline":{alignItems:"baseline"},"content-start":{alignContent:"flex-start"},"content-center":{alignContent:"center"},"content-end":{alignContent:"flex-end"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-center":{alignSelf:"center"},"self-end":{alignSelf:"flex-end"},"self-stretch":{alignSelf:"stretch"},"flex-initial":{flex:"initial"},"flex-1":{flex:1},"flex-auto":{flex:"auto"},"flex-none":{flex:"none"},"flex-grow":{flexGrow:1},"flex-shrink":{flexShrink:1},"flex-no-grow":{flexGrow:0},"flex-no-shrink":{flexShrink:0},"float-right":{float:"right"},"float-left":{float:"left"},"float-none":{float:"none"},clearfix:{"::after":{content:'""',display:"table",clear:"both"}},"appearance-none":{appearance:"none"},"cursor-auto":{cursor:"auto"},"cursor-pointer":{cursor:"pointer"},"cursor-not-allowed":{cursor:"not-allowed"},"resize-none":{resize:"none"},resize:{resize:"both"},"resize-y":{resize:"vertical"},"resize-x":{resize:"horizontal"},"pointer-events-none":{pointerEvents:"none"},"pointer-events-auto":{pointerEvents:"auto"},"select-none":{userSelect:"none"},"select-text":{userSelect:"text"},"list-reset":{listStyle:"none",padding:0},"overflow-visible":{overflow:"visible"},"overflow-auto":{overflow:"auto"},"overflow-hidden":{overflow:"hidden"},"overflow-x-scroll":{overflowX:"auto"},"overflow-y-scroll":{overflowY:"auto"},"overflow-scroll":{overflow:"scroll"},"scrolling-touch":{webkitOverflowScrolling:"touch"},"scrolling-auto":{webkitOverflowScrolling:"auto"},static:{position:"static"},fixed:{position:"fixed"},absolute:{position:"absolute"},relative:{position:"relative"},"pin-t":{top:0},"pin-r":{right:0},"pin-b":{bottom:0},"pin-l":{left:0},"pin-y":{top:0,bottom:0},"pin-x":{right:0,left:0},pin:{top:0,right:0,bottom:0,left:0},"pin-none":{top:"auto",right:"auto",bottom:"auto",left:"auto"},"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"},italic:{fontStyle:"italic"},roman:{fontStyle:"normal"},uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"},underline:{textDecoration:"underline"},"line-through":{textDecoration:"line-through"},"no-underline":{textDecoration:"none"},antialiased:{webkitFontSmoothing:"antialiased",mozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{webkitFontSmoothing:"auto",mozOsxFontSmoothing:"auto"},"whitespace-normal":{whiteSpace:"normal"},"whitespace-no-wrap":{whiteSpace:"nowrap"},"whitespace-pre":{whiteSpace:"pre"},"whitespace-pre-line":{whiteSpace:"pre-line"},"whitespace-pre-wrap":{whiteSpace:"pre-wrap"},"break-words":{wordWrap:"break-word"},"break-normal":{wordWrap:"normal"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"align-baseline":{verticalAlign:"baseline"},"align-top":{verticalAlign:"top"},"align-middle":{verticalAlign:"middle"},"align-bottom":{verticalAlign:"bottom"},"align-text-top":{verticalAlign:"text-top"},"align-text-bottom":{verticalAlign:"text-bottom"},visible:{visibility:"visible"},invisible:{visibility:"hidden"}},r={bg:{prop:"backgroundColor",config:"backgroundColors"},"border-t":{prop:"borderTopWidth",config:"borderWidths"},"border-b":{prop:"borderBottomWidth",config:"borderWidths"},"border-l":{prop:"borderLeftWidth",config:"borderWidths"},"border-r":{prop:"borderRightWidth",config:"borderWidths"},border:[{prop:"borderColor",config:"borderColors"},{prop:"borderWidth",config:"borderWidths"}],"rounded-t":{prop:"borderTopRadius",config:"borderRadius"},"rounded-r":{prop:"borderRightRadius",config:"borderRadius"},"rounded-b":{prop:"borderBottomRadius",config:"borderRadius"},"rounded-l":{prop:"borderLeftRadius",config:"borderRadius"},"rounded-tl":{prop:"borderTopLeftRadius",config:"borderRadius"},"rounded-tr":{prop:"borderTopRightRadius",config:"borderRadius"},"rounded-br":{prop:"borderBottomRightRadius",config:"borderRadius"},"rounded-bl":{prop:"borderBottomLeftRadius",config:"borderRadius"},rounded:{prop:"borderRadius",config:"borderRadius"},opacity:{prop:"opacity",config:"opacity"},shadow:{prop:"boxShadow",config:"shadows"},w:{prop:"width",config:"width"},"min-w":{prop:"minWidth",config:"minWidth"},"max-w":{prop:"maxWidth",config:"maxWidth"},h:{prop:"height",config:"height"},"min-h":{prop:"minHeight",config:"minHeight"},"max-h":{prop:"maxHeight",config:"maxHeight"},pt:{prop:"paddingTop",config:"padding"},pr:{prop:"paddingRight",config:"padding"},pb:{prop:"paddingBottom",config:"padding"},pl:{prop:"paddingLeft",config:"padding"},px:{prop:["paddingLeft","paddingRight"],config:"padding"},py:{prop:["paddingTop","paddingBottom"],config:"padding"},p:{prop:"padding",config:"padding"},mt:{prop:"marginTop",config:"margin"},mr:{prop:"marginRight",config:"margin"},mb:{prop:"marginBottom",config:"margin"},ml:{prop:"marginLeft",config:"margin"},mx:{prop:["marginLeft","marginRight"],config:"margin"},my:{prop:["marginTop","marginBottom"],config:"margin"},m:{prop:"margin",config:"margin"},"-mt":{prop:"marginTop",config:"negativeMargin",pre:"-"},"-mr":{prop:"marginRight",config:"negativeMargin",pre:"-"},"-mb":{prop:"marginBottom",config:"negativeMargin",pre:"-"},"-ml":{prop:"marginLeft",config:"negativeMargin",pre:"-"},"-mx":{prop:["marginLeft","marginRight"],config:"negativeMargin",pre:"-"},"-my":{prop:["marginTop","marginBottom"],config:"negativeMargin",pre:"-"},"-m":{prop:"margin",config:"negativeMargin",pre:"-"},fill:{prop:"fill",config:"svgFill"},stroke:{prop:"stroke",config:"svgStroke"},font:[{prop:"fontWeight",config:"fontWeights"},{prop:"fontFamily",config:"fonts",preDev:"(",postDev:" || []).map(x => '\"' + x + '\"').join(', ')",format:function(e){return e.map(function(e){return'"'+e+'"'}).join(", ")}}],text:[{prop:"color",config:"textColors"},{prop:"fontSize",config:"textSizes"}],leading:{prop:"lineHeight",config:"leading"},tracking:{prop:"letterSpacing",config:"tracking"},z:{prop:"zIndex",config:"zIndex"}};function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var o=require("@babel/parser"),n=require("@babel/generator").default;function i(i){var c,f,d,g,u=i.path,b=i.t,m=i.configPath,h="production"===process.env.NODE_ENV,x=!h,v=i.outputFormat;if(!v||"auto"===v){var w=u.findParent(function(e){return e.isJSXElement()});v=w&&"style"===w.node.openingElement.name.name?"string":"object"}var y,k,S=u.node.quasi.quasis[0].value.cooked.match(/[a-z0-9-_:]+/gi)||[];if("production"===process.env.NODE_ENV)y=require(m);else{var R=u.find(function(e){return e.isProgram()});k=R.scope.generateUidIdentifier("tailwind"),R.unshiftContainer("body",b.importDeclaration([b.importDefaultSpecifier(k)],b.stringLiteral(m)))}var j=S.reduce(function(o,n,i){var s,u=n.match(/^([a-z-_]+):/i);if(u&&(n=n.substr(u[0].length),u="hover"===u[1]||"focus"===u[1]?":"+u[1]:h?"@media (min-width: "+y.screens[u[1]]+")":"`@media (min-width: ${"+k.name+'.screens["'+u[1]+'"]})`'),e[n])return p(o,u?((c={})[u]=p(o[u]||{},e[n]),c):e[n]);if(Object.keys(r).some(function(e){if(n.startsWith(e+"-")||n===e)return s=e,!0}),s){var b,m=n.substr(s.length+1);if(""===m&&(m="default"),Array.isArray(r[s])){var w=r[s].map(function(e){var r=l(e,x),t=r.pre,o=r.post;if(!h||void 0!==y[e.config][m]){var n=e.format?e.format:function(e){return e};return h?((f={})[e.prop]=t||o?t+n(y[e.config][m])+o:n(y[e.config][m]),f):"string"===v?"['"+a(e.prop)+"', "+t+k.name+"."+e.config+'["'+m+'"]'+o+"]":"{"+e.prop+":"+t+k.name+"."+e.config+'["'+m+'"]'+o+"}"}});h?b=w.filter(function(e){return void 0!==e})[0]:"string"===v?(w="["+w.join(",")+"].filter(x => typeof x[1] !== 'undefined' && x[1] !== '')[0].join(':')",(b={})["__spread__"+i]=w):(w="["+w.join(",")+'].filter(x => typeof x[Object.keys(x)[0]] !== "undefined" && x[Object.keys(x)[0]] !== "")[0]',(b={})["__spread__"+i]=w)}else{b=Array.isArray(r[s].prop)?r[s].prop:[r[s].prop];var S=l(r[s],x),R=S.pre,j=S.post,W=r[s].format?r[s].format:function(e){return e};b=b.reduce(function(e,o){return function(e){for(var r=arguments,o=1;o<arguments.length;o++){var n=null!=r[o]?r[o]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(r){t(e,r,n[r])})}return e}({},e,((d={})[o]=h?R+W(y[r[s].config][m])+j:"$"+R+k.name+"."+r[s].config+'["'+m+'"]'+j,d))},{})}return p(o,u?((g={})[u]=p(o[u]||{},b),g):b)}return o},{}),W=s(j,b);if("string"===v){var O=function e(r,t){void 0===t&&(t=!1);var o=t?"/**/":"";return Object.keys(r).reduce(function(t,n){var i=r[n];if(n.startsWith("__spread__"))return t+"${"+i+"};"+o;if("string"==typeof i)return"$"===i[0]&&(i="${"+i.substr(1)+"}"),t+a(n)+":"+i+";"+o;i=e(i);var l=":"===n[0]?"&"+n:n;return l="`"===l[0]?l.substr(1,l.length-2):l,t+a(l)+"{"+i+"};"+o},"")}(j,x),z=u.parentPath;if(z.isTemplateLiteral()){var P=z.get("expressions").indexOf(u),A=z.get("quasis")[P],E=z.get("quasis")[P+1];E.node.value.raw=A.node.value.raw+O+E.node.value.raw,E.node.value.cooked=A.node.value.cooked+O+E.node.value.cooked,A.remove(),u.remove();var _=o.parseExpression(n(z.node).code);z.replaceWith(_)}else{u.replaceWith(o.parseExpression("`"+O+"`"))}}else u.replaceWith(W)}function a(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase().replace(/^(ms|o|moz|webkit)-/,"-$1-")}function l(e,r){var t="",o="";return r&&e.preDev?t=e.preDev:e.pre&&(t=e.pre),r&&e.postDev?o=e.postDev:e.post&&(o=e.post),{pre:t,post:o}}function p(e,r){return Object.assign({},e,r)}function s(e,r){if(null===e)return r.nullLiteral();switch(typeof e){case"function":var t=o.parse(e.toString(),{allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0});return traverse.removeProperties(t);case"number":return r.numericLiteral(e);case"string":return e.startsWith("$")?o.parseExpression(e.substr(1)):r.stringLiteral(e);case"boolean":return r.booleanLiteral(e);case"undefined":return r.unaryExpression("void",r.numericLiteral(0),!0);default:if(Array.isArray(e))return r.arrayExpression(e.map(function(e){return s(e,r)}));try{return r.objectExpression(c(e,r,"spreadElement"))}catch(t){return r.objectExpression(c(e,r,"spreadProperty"))}}}function c(e,r,t){return Object.keys(e).filter(function(r){return void 0!==e[r]}).map(function(n){if(n.startsWith("__spread__"))return r[t](o.parseExpression(e[n]));var i=n.startsWith("`"),a=i?o.parseExpression(n):r.stringLiteral(n);return r.objectProperty(a,s(e[n],r),i)})}var f=require("babel-plugin-macros").createMacro,d=require("path"),g=f(function(e){var r=e.babel.types,t=e.references,o=e.config,n=d.resolve(e.state.file.opts.sourceRoot||".",o&&o.config||"./tailwind.js");t.default.forEach(function(e){i({path:e.parentPath,t:r,configPath:n,outputFormat:o&&o.format})})},{configName:"tailwind"});module.exports=g; | ||
//# sourceMappingURL=macro.js.map |
{ | ||
"name": "babel-plugin-tailwind-components", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Use Tailwind with any CSS-in-JS library", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"babel": | ||
"babel --plugins=transform-object-rest-spread --no-babelrc -d build src", | ||
"build": | ||
"npm run -s babel && microbundle -i build/index.js -f cjs && microbundle -i build/macro.js -f cjs -o ./macro.js", | ||
"babel": "babel --plugins=@babel/plugin-proposal-object-rest-spread --no-babelrc -d build src", | ||
"build": "npm run -s babel && microbundle -i build/index.js -f cjs && microbundle -i build/macro.js -f cjs -o ./macro.js", | ||
"prepublish": "npm run build" | ||
@@ -24,3 +22,6 @@ }, | ||
], | ||
"files": ["dist", "macro.js"], | ||
"files": [ | ||
"dist", | ||
"macro.js" | ||
], | ||
"author": "Brad Cornes <bradlc41@gmail.com>", | ||
@@ -31,15 +32,14 @@ "license": "MIT", | ||
}, | ||
"homepage": | ||
"https://github.com/bradlc/babel-plugin-tailwind-components#readme", | ||
"homepage": "https://github.com/bradlc/babel-plugin-tailwind-components#readme", | ||
"dependencies": { | ||
"babel-generator": "^6.26.1", | ||
"babel-plugin-macros": "^2.1.0", | ||
"babylon": "^6.18.0" | ||
"@babel/generator": "^7.0.0-rc.1", | ||
"@babel/parser": "^7.0.0-rc.1", | ||
"babel-plugin-macros": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"babel": "^6.23.0", | ||
"babel-cli": "^6.26.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"@babel/cli": "^7.0.0-rc.1", | ||
"@babel/core": "^7.0.0-rc.1", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-rc.1", | ||
"microbundle": "^0.4.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
72445
102
1
+ Added@babel/generator@^7.0.0-rc.1
+ Added@babel/parser@^7.0.0-rc.1
+ Added@babel/generator@7.26.2(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedjsesc@3.0.2(transitive)
- Removedbabel-generator@^6.26.1
- Removedbabylon@^6.18.0
- Removedbabel-generator@6.26.1(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddetect-indent@4.0.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedjsesc@1.3.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedto-fast-properties@1.0.3(transitive)
- Removedtrim-right@1.0.1(transitive)