Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextcss/react-native

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextcss/react-native - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

dist/index-cjs.js

@@ -1,1 +0,1 @@

"use strict";const t=[],e={reverseBreakpoint:!1},r=(r,o,n=e)=>{try{r=new RegExp(r)}catch(t){console.error(t)}r&&"function"==typeof o&&n&&"object"==typeof n?t.push({pattern:r,fn:o,options:{...e,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:t,fn:e,options:r},o)=>{const n=o.match(t);return!!n&&e(n)};const n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,d=t=>(t?.match(n)||t?.match(i)||t?.match(a))?.slice(1).map(((t,e)=>{const r=parseInt(t.padStart(2,t),16);return 3===e?Math.round(r/255*100):r})),s=t=>((t,e,r)=>Math.min(Math.max(e,t),r))(Math.round(t),0,255),c=(t,e=0)=>{const r=d(t),o=e/100;return r?.forEach(((t,e,r)=>{e>=3||(r[e]=s(o<0?t+(255-t)*Math.abs(o):t-t*o))})),(t=>{if(Array.isArray(t)&&[3,4].includes(t.length))return"#"+t.map(((t,e)=>(3===e?Math.round(t/100*255):t).toString(16).padStart(2,"0"))).join("")})(r)},l=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],f=t=>{const e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((r=>{const o=(t=>l.reduce(((e,r,o)=>{const n=c(t,r);return e[50*o+50]=n,e}),{}))(t[r]);Object.keys(o).forEach((t=>{e[`${r}-${t}`]=o[t]}))})),e},p={material:f({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:f({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},h={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},b=(t,e=!1)=>{const{palette:r}={...h},o=p[r][t]||"";if(e&&7===o.length){const[t,r,n]=d(o);return`rgba(${t}, ${r}, ${n}, ${e/100})`}return o};var g;r(/^(flex)$/,(([t,e])=>({display:e}))),r(/^(relative|absolute)$/,(([t,e])=>({position:e}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return(!e||"auto"!==o)&&("top"===r?{top:d}:"right"===r?{right:d}:"bottom"===r?{bottom:d}:"left"===r?{left:d}:void 0)})),r(/^(-)?inset-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const i=isNaN(r)?r:e?-r:r,a=o&&n?100*(e?-o:o)/n+"%":i;return(!e||"auto"!==r)&&{top:a,right:a,bottom:a,left:a}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?`calc( ${100*(e?-n:n)}%/${i} )`:a;return(!e||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([t,e,r])=>({zIndex:e?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([t,e,r])=>({aspectRatio:e/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([t,e])=>({resizeMode:e}))),r(/^of-(visible|hidden|scroll)$/,(([t,e])=>({overflow:e}))),r(/^(p[trbl]?)-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const i=o&&n?100*o/n+"%":r;return"p"===e?{padding:i}:"pt"===e?{paddingTop:i}:"pr"===e?{paddingRight:i}:"pb"===e?{paddingBottom:i}:"pl"===e?{paddingLeft:i}:void 0})),r(/^(-)?(m[trbl]?)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return(!e||"auto"!==o)&&("m"===r?{margin:d}:"mt"===r?{marginTop:d}:"mr"===r?{marginRight:d}:"mb"===r?{marginBottom:d}:"ml"===r?{marginLeft:d}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return!(e&&"auto"===o||"auto"===o&&"m"!==r[0])&&("px"===r?{paddingLeft:d,paddingRight:d}:"py"===r?{paddingTop:d,paddingBottom:d}:"mx"===r?{marginLeft:d,marginRight:d}:"my"===r?{marginTop:d,marginBottom:d}:void 0)})),r(/^fs-(\d+)$/,(([t,e])=>({fontSize:e}))),r(/^fw-([1-9]00|normal|bold)$/,(([t,e])=>({fontWeight:e}))),r(/^lh-([\d.]+)$/,(([t,e])=>({lineHeight:e}))),r(/^text-(left|center|right|justify)$/,(([t,e])=>({textAlign:e}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([t,e])=>({textTransform:"no-transform"===e?"none":e}))),r(/^(underline|line-through|no-decoration)$/,(([t,e])=>({textDecorationLine:"no-decoration"===e?"none":e}))),r(/^hide$/,(([t])=>({display:"none"}))),r(/^fit$/,(([t])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([t,e])=>"w"===e?{width:"100%"}:"h"===e?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([t,e,r])=>{const o=(isNaN(r),r);return"w"===e?{width:o}:"h"===e?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([t,e,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===e?{width:n}:"h"===e?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([t,e,r])=>"b"===e?{borderWidth:r}:"bt"===e?{borderTopWidth:r}:"br"===e?{borderRightWidth:r}:"bb"===e?{borderBottomWidth:r}:"bl"===e?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([t,e])=>({borderRadius:e}))),r(/^(b)-(solid|dashed|dotted)$/,(([t,e,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([t,e])=>({flexWrap:e}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([t,e])=>({flexDirection:e.replace("col","column")}))),r(/^flex-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o])=>({flex:r&&o?r/o:e}))),r(/^flex-(grow|shrink)-(\d+)$/,(([t,e,r])=>"grow"==e?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([t,,e,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:e}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([t,,e,r])=>({alignItems:r?"flex-"+r:e}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,r,,,o])=>{const n={w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"";const i=b(r,o);return!(!n||!i)&&("fg"===e?{color:i}:"bg"===e?{backgroundColor:i}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,,,r])=>{const o=b(e,r);return!!o&&{borderColor:o}})),"function"==typeof(g=({pattern:t,fn:e,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),i=n.pop().match(t);if(!i)return!1;let a="";return a=e(i,n),a})&&(o=g),module.exports=function(...e){const r={};return[...e].forEach((e=>{"object"==typeof e&&Object.keys(e).forEach((t=>{r[t]=e[t]})),"string"==typeof e&&(e.split(" ").forEach((e=>{if(!e)return;const{style:n}=(e=>{let r="",n=null;return t.forEach(((t,i)=>{const a=o(t,e);if(a)return r=a,void(n=i)})),{style:r,proc:n}})(e);n&&Object.assign(r,n)})),Object.keys(r).forEach((t=>{const e=Number(r[t]);t.includes(["fontWeight"])||isNaN(e)||(r[t]=e)})))})),r};
"use strict";const t=[],e={reverseBreakpoint:!1},r=(r,o,n=e)=>{try{r=new RegExp(r)}catch(t){console.error(t)}r&&"function"==typeof o&&n&&"object"==typeof n?t.push({pattern:r,fn:o,options:{...e,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:t,fn:e,options:r},o)=>{const n=o.match(t);return!!n&&e(n)};const n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,d=t=>(t?.match(n)||t?.match(i)||t?.match(a))?.slice(1).map(((t,e)=>{const r=parseInt(t.padStart(2,t),16);return 3===e?Math.round(r/255*100):r})),s=t=>((t,e,r)=>Math.min(Math.max(e,t),r))(Math.round(t),0,255),c=(t,e=0)=>{const r=d(t),o=e/100;return r?.forEach(((t,e,r)=>{e>=3||(r[e]=s(o<0?t+(255-t)*Math.abs(o):t-t*o))})),(t=>{if(Array.isArray(t)&&[3,4].includes(t.length))return"#"+t.map(((t,e)=>(3===e?Math.round(t/100*255):t).toString(16).padStart(2,"0"))).join("")})(r)},l=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],f=t=>{const e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((r=>{const o=(t=>l.reduce(((e,r,o)=>{const n=c(t,r);return e[50*o+50]=n,e}),{}))(t[r]);Object.keys(o).forEach((t=>{e[`${r}-${t}`]=o[t]}))})),e},p={material:f({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:f({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},g={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},h=(t,e=!1)=>{const{palette:r}={...g},o=p[r][t]||"";if(e&&7===o.length){const[t,r,n]=d(o);return`rgba(${t}, ${r}, ${n}, ${e/100})`}return o};var b;r(/^(flex)$/,(([t,e])=>({display:e}))),r(/^(relative|absolute)$/,(([t,e])=>({position:e}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return(!e||"auto"!==o)&&("top"===r?{top:d}:"right"===r?{right:d}:"bottom"===r?{bottom:d}:"left"===r?{left:d}:void 0)})),r(/^(-)?inset-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const i=isNaN(r)?r:e?-r:r,a=o&&n?100*(e?-o:o)/n+"%":i;return(!e||"auto"!==r)&&{top:a,right:a,bottom:a,left:a}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?`calc( ${100*(e?-n:n)}%/${i} )`:a;return(!e||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([t,e,r])=>({zIndex:e?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([t,e,r])=>({aspectRatio:e/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([t,e])=>({resizeMode:e}))),r(/^of-(visible|hidden|scroll)$/,(([t,e])=>({overflow:e}))),r(/^(p[trbl]?)-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const i=o&&n?100*o/n+"%":r;return"p"===e?{padding:i}:"pt"===e?{paddingTop:i}:"pr"===e?{paddingRight:i}:"pb"===e?{paddingBottom:i}:"pl"===e?{paddingLeft:i}:void 0})),r(/^(-)?(m[trbl]?)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return(!e||"auto"!==o)&&("m"===r?{margin:d}:"mt"===r?{marginTop:d}:"mr"===r?{marginRight:d}:"mb"===r?{marginBottom:d}:"ml"===r?{marginLeft:d}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,i])=>{const a=isNaN(o)?o:e?-o:o,d=n&&i?100*(e?-n:n)/i+"%":a;return!(e&&"auto"===o||"auto"===o&&"m"!==r[0])&&("px"===r?{paddingLeft:d,paddingRight:d}:"py"===r?{paddingTop:d,paddingBottom:d}:"mx"===r?{marginLeft:d,marginRight:d}:"my"===r?{marginTop:d,marginBottom:d}:void 0)})),r(/^fs-(\d+)$/,(([t,e])=>({fontSize:e}))),r(/^fw-([1-9]00|normal|bold)$/,(([t,e])=>({fontWeight:e}))),r(/^lh-([\d.]+)$/,(([t,e])=>({lineHeight:e}))),r(/^text-(left|center|right|justify)$/,(([t,e])=>({textAlign:e}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([t,e])=>({textTransform:"no-transform"===e?"none":e}))),r(/^(underline|line-through|no-decoration)$/,(([t,e])=>({textDecorationLine:"no-decoration"===e?"none":e}))),r(/^hide$/,(([t])=>({display:"none"}))),r(/^fit$/,(([t])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([t,e])=>"w"===e?{width:"100%"}:"h"===e?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([t,e,r])=>{const o=(isNaN(r),r);return"w"===e?{width:o}:"h"===e?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([t,e,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===e?{width:n}:"h"===e?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([t,e,r])=>"b"===e?{borderWidth:r}:"bt"===e?{borderTopWidth:r}:"br"===e?{borderRightWidth:r}:"bb"===e?{borderBottomWidth:r}:"bl"===e?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([t,e])=>({borderRadius:e}))),r(/^(b)-(solid|dashed|dotted)$/,(([t,e,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([t,e])=>({flexWrap:e}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([t,e])=>({flexDirection:e.replace("col","column")}))),r(/^flex-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o])=>({flex:r&&o?r/o:e}))),r(/^flex-(grow|shrink)-(\d+)$/,(([t,e,r])=>"grow"==e?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([t,,e,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:e}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([t,,e,r])=>({alignItems:r?"flex-"+r:e}))),r(/^align-center-full$/,(([t])=>({alignItems:"center",justifyContent:"center"}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,r,,,o])=>{const n={w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"";const i=h(r,o);return!(!n||!i)&&("fg"===e?{color:i}:"bg"===e?{backgroundColor:i}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,,,r])=>{const o=h(e,r);return!!o&&{borderColor:o}})),"function"==typeof(b=({pattern:t,fn:e,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),i=n.pop().match(t);if(!i)return!1;let a="";return a=e(i,n),a})&&(o=b),module.exports=function(...e){const r={};return[...e].forEach((e=>{"object"==typeof e&&Object.keys(e).forEach((t=>{r[t]=e[t]})),"string"==typeof e&&(e.split(" ").forEach((e=>{if(!e)return;const{style:n}=(e=>{let r="",n=null;return t.forEach(((t,i)=>{const a=o(t,e);if(a)return r=a,void(n=i)})),{style:r,proc:n}})(e);n&&Object.assign(r,n)})),Object.keys(r).forEach((t=>{const e=Number(r[t]);t.includes(["fontWeight"])||isNaN(e)||(r[t]=e)})))})),r};

@@ -1,1 +0,1 @@

const t=[],e={reverseBreakpoint:!1},r=(r,o,n=e)=>{try{r=new RegExp(r)}catch(t){console.error(t)}r&&"function"==typeof o&&n&&"object"==typeof n?t.push({pattern:r,fn:o,options:{...e,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:t,fn:e,options:r},o)=>{const n=o.match(t);return!!n&&e(n)};const n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,d=t=>(t?.match(n)||t?.match(a)||t?.match(i))?.slice(1).map(((t,e)=>{const r=parseInt(t.padStart(2,t),16);return 3===e?Math.round(r/255*100):r})),s=t=>((t,e,r)=>Math.min(Math.max(e,t),r))(Math.round(t),0,255),c=(t,e=0)=>{const r=d(t),o=e/100;return r?.forEach(((t,e,r)=>{e>=3||(r[e]=s(o<0?t+(255-t)*Math.abs(o):t-t*o))})),(t=>{if(Array.isArray(t)&&[3,4].includes(t.length))return"#"+t.map(((t,e)=>(3===e?Math.round(t/100*255):t).toString(16).padStart(2,"0"))).join("")})(r)},l=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],f=t=>{const e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((r=>{const o=(t=>l.reduce(((e,r,o)=>{const n=c(t,r);return e[50*o+50]=n,e}),{}))(t[r]);Object.keys(o).forEach((t=>{e[`${r}-${t}`]=o[t]}))})),e},p={material:f({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:f({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},h={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},b=(t,e=!1)=>{const{palette:r}={...h},o=p[r][t]||"";if(e&&7===o.length){const[t,r,n]=d(o);return`rgba(${t}, ${r}, ${n}, ${e/100})`}return o};var g;function u(...e){const r={};return[...e].forEach((e=>{"object"==typeof e&&Object.keys(e).forEach((t=>{r[t]=e[t]})),"string"==typeof e&&(e.split(" ").forEach((e=>{if(!e)return;const{style:n}=(e=>{let r="",n=null;return t.forEach(((t,a)=>{const i=o(t,e);if(i)return r=i,void(n=a)})),{style:r,proc:n}})(e);n&&Object.assign(r,n)})),Object.keys(r).forEach((t=>{const e=Number(r[t]);t.includes(["fontWeight"])||isNaN(e)||(r[t]=e)})))})),r}r(/^(flex)$/,(([t,e])=>({display:e}))),r(/^(relative|absolute)$/,(([t,e])=>({position:e}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return(!e||"auto"!==o)&&("top"===r?{top:d}:"right"===r?{right:d}:"bottom"===r?{bottom:d}:"left"===r?{left:d}:void 0)})),r(/^(-)?inset-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const a=isNaN(r)?r:e?-r:r,i=o&&n?100*(e?-o:o)/n+"%":a;return(!e||"auto"!==r)&&{top:i,right:i,bottom:i,left:i}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?`calc( ${100*(e?-n:n)}%/${a} )`:i;return(!e||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([t,e,r])=>({zIndex:e?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([t,e,r])=>({aspectRatio:e/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([t,e])=>({resizeMode:e}))),r(/^of-(visible|hidden|scroll)$/,(([t,e])=>({overflow:e}))),r(/^(p[trbl]?)-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const a=o&&n?100*o/n+"%":r;return"p"===e?{padding:a}:"pt"===e?{paddingTop:a}:"pr"===e?{paddingRight:a}:"pb"===e?{paddingBottom:a}:"pl"===e?{paddingLeft:a}:void 0})),r(/^(-)?(m[trbl]?)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return(!e||"auto"!==o)&&("m"===r?{margin:d}:"mt"===r?{marginTop:d}:"mr"===r?{marginRight:d}:"mb"===r?{marginBottom:d}:"ml"===r?{marginLeft:d}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return!(e&&"auto"===o||"auto"===o&&"m"!==r[0])&&("px"===r?{paddingLeft:d,paddingRight:d}:"py"===r?{paddingTop:d,paddingBottom:d}:"mx"===r?{marginLeft:d,marginRight:d}:"my"===r?{marginTop:d,marginBottom:d}:void 0)})),r(/^fs-(\d+)$/,(([t,e])=>({fontSize:e}))),r(/^fw-([1-9]00|normal|bold)$/,(([t,e])=>({fontWeight:e}))),r(/^lh-([\d.]+)$/,(([t,e])=>({lineHeight:e}))),r(/^text-(left|center|right|justify)$/,(([t,e])=>({textAlign:e}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([t,e])=>({textTransform:"no-transform"===e?"none":e}))),r(/^(underline|line-through|no-decoration)$/,(([t,e])=>({textDecorationLine:"no-decoration"===e?"none":e}))),r(/^hide$/,(([t])=>({display:"none"}))),r(/^fit$/,(([t])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([t,e])=>"w"===e?{width:"100%"}:"h"===e?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([t,e,r])=>{const o=(isNaN(r),r);return"w"===e?{width:o}:"h"===e?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([t,e,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===e?{width:n}:"h"===e?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([t,e,r])=>"b"===e?{borderWidth:r}:"bt"===e?{borderTopWidth:r}:"br"===e?{borderRightWidth:r}:"bb"===e?{borderBottomWidth:r}:"bl"===e?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([t,e])=>({borderRadius:e}))),r(/^(b)-(solid|dashed|dotted)$/,(([t,e,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([t,e])=>({flexWrap:e}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([t,e])=>({flexDirection:e.replace("col","column")}))),r(/^flex-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o])=>({flex:r&&o?r/o:e}))),r(/^flex-(grow|shrink)-(\d+)$/,(([t,e,r])=>"grow"==e?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([t,,e,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:e}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([t,,e,r])=>({alignItems:r?"flex-"+r:e}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,r,,,o])=>{const n={w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"";const a=b(r,o);return!(!n||!a)&&("fg"===e?{color:a}:"bg"===e?{backgroundColor:a}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,,,r])=>{const o=b(e,r);return!!o&&{borderColor:o}})),"function"==typeof(g=({pattern:t,fn:e,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),a=n.pop().match(t);if(!a)return!1;let i="";return i=e(a,n),i})&&(o=g);export{u as default};
const t=[],e={reverseBreakpoint:!1},r=(r,o,n=e)=>{try{r=new RegExp(r)}catch(t){console.error(t)}r&&"function"==typeof o&&n&&"object"==typeof n?t.push({pattern:r,fn:o,options:{...e,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:t,fn:e,options:r},o)=>{const n=o.match(t);return!!n&&e(n)};const n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,d=t=>(t?.match(n)||t?.match(a)||t?.match(i))?.slice(1).map(((t,e)=>{const r=parseInt(t.padStart(2,t),16);return 3===e?Math.round(r/255*100):r})),s=t=>((t,e,r)=>Math.min(Math.max(e,t),r))(Math.round(t),0,255),c=(t,e=0)=>{const r=d(t),o=e/100;return r?.forEach(((t,e,r)=>{e>=3||(r[e]=s(o<0?t+(255-t)*Math.abs(o):t-t*o))})),(t=>{if(Array.isArray(t)&&[3,4].includes(t.length))return"#"+t.map(((t,e)=>(3===e?Math.round(t/100*255):t).toString(16).padStart(2,"0"))).join("")})(r)},l=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],f=t=>{const e={black:"#000000",white:"#ffffff"};return Object.keys(t).forEach((r=>{const o=(t=>l.reduce(((e,r,o)=>{const n=c(t,r);return e[50*o+50]=n,e}),{}))(t[r]);Object.keys(o).forEach((t=>{e[`${r}-${t}`]=o[t]}))})),e},p={material:f({red:"#f44336",pink:"#e91e63",purple:"#9c27b0","deep-purple":"#673ab7",indigo:"#3f51b5",blue:"#2196f3","light-blue":"#03a9f4",cyan:"#00bcd4",teal:"#009688",green:"#4caf50","light-green":"#8bc34a",lime:"#cddc39",yellow:"#ffeb3b",amber:"#ffc107",orange:"#ff9800","deep-orange":"#ff5722",brown:"#795548",grey:"#9e9e9e","dark-grey":"#575757","blue-grey":"#607d8b"}),tailwind:f({slate:"#64748b",grey:"#6b7280",zinc:"#71717a",neutral:"#737373",stone:"#78716c",red:"#ef4444",orange:"#f97316",amber:"#f59e0b",yellow:"#eab308",lime:"#84cc16",green:"#22c55e",emerald:"#10b981",teal:"#14b8a6",cyan:"#06b6d4",sky:"#0ea5e9",blue:"#3b82f6",indigo:"#6366f1",violet:"#8b5cf6",purple:"#a855f7",fuchsia:"#d946ef",pink:"#ec4899",rose:"#f43f5e"})},g={merged:!1,debug:!1,useStyleNode:!1,skipResetStyles:!1,skipRemUnits:!1,palette:"material",breakpoints:{sm:390,md:768,lg:1024,xl:1400},conatiners:{xs:480,sm:640,md:768,lg:1024,xl:1280}},h=(t,e=!1)=>{const{palette:r}={...g},o=p[r][t]||"";if(e&&7===o.length){const[t,r,n]=d(o);return`rgba(${t}, ${r}, ${n}, ${e/100})`}return o};var b;function u(...e){const r={};return[...e].forEach((e=>{"object"==typeof e&&Object.keys(e).forEach((t=>{r[t]=e[t]})),"string"==typeof e&&(e.split(" ").forEach((e=>{if(!e)return;const{style:n}=(e=>{let r="",n=null;return t.forEach(((t,a)=>{const i=o(t,e);if(i)return r=i,void(n=a)})),{style:r,proc:n}})(e);n&&Object.assign(r,n)})),Object.keys(r).forEach((t=>{const e=Number(r[t]);t.includes(["fontWeight"])||isNaN(e)||(r[t]=e)})))})),r}r(/^(flex)$/,(([t,e])=>({display:e}))),r(/^(relative|absolute)$/,(([t,e])=>({position:e}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return(!e||"auto"!==o)&&("top"===r?{top:d}:"right"===r?{right:d}:"bottom"===r?{bottom:d}:"left"===r?{left:d}:void 0)})),r(/^(-)?inset-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const a=isNaN(r)?r:e?-r:r,i=o&&n?100*(e?-o:o)/n+"%":a;return(!e||"auto"!==r)&&{top:i,right:i,bottom:i,left:i}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?`calc( ${100*(e?-n:n)}%/${a} )`:i;return(!e||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([t,e,r])=>({zIndex:e?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([t,e,r])=>({aspectRatio:e/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([t,e])=>({resizeMode:e}))),r(/^of-(visible|hidden|scroll)$/,(([t,e])=>({overflow:e}))),r(/^(p[trbl]?)-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n])=>{const a=o&&n?100*o/n+"%":r;return"p"===e?{padding:a}:"pt"===e?{paddingTop:a}:"pr"===e?{paddingRight:a}:"pb"===e?{paddingBottom:a}:"pl"===e?{paddingLeft:a}:void 0})),r(/^(-)?(m[trbl]?)-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return(!e||"auto"!==o)&&("m"===r?{margin:d}:"mt"===r?{marginTop:d}:"mr"===r?{marginRight:d}:"mb"===r?{marginBottom:d}:"ml"===r?{marginLeft:d}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+|(\d+)\/(\d+))$/,(([t,e,r,o,n,a])=>{const i=isNaN(o)?o:e?-o:o,d=n&&a?100*(e?-n:n)/a+"%":i;return!(e&&"auto"===o||"auto"===o&&"m"!==r[0])&&("px"===r?{paddingLeft:d,paddingRight:d}:"py"===r?{paddingTop:d,paddingBottom:d}:"mx"===r?{marginLeft:d,marginRight:d}:"my"===r?{marginTop:d,marginBottom:d}:void 0)})),r(/^fs-(\d+)$/,(([t,e])=>({fontSize:e}))),r(/^fw-([1-9]00|normal|bold)$/,(([t,e])=>({fontWeight:e}))),r(/^lh-([\d.]+)$/,(([t,e])=>({lineHeight:e}))),r(/^text-(left|center|right|justify)$/,(([t,e])=>({textAlign:e}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([t,e])=>({textTransform:"no-transform"===e?"none":e}))),r(/^(underline|line-through|no-decoration)$/,(([t,e])=>({textDecorationLine:"no-decoration"===e?"none":e}))),r(/^hide$/,(([t])=>({display:"none"}))),r(/^fit$/,(([t])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([t,e])=>"w"===e?{width:"100%"}:"h"===e?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([t,e,r])=>{const o=(isNaN(r),r);return"w"===e?{width:o}:"h"===e?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([t,e,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===e?{width:n}:"h"===e?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([t,e,r])=>"b"===e?{borderWidth:r}:"bt"===e?{borderTopWidth:r}:"br"===e?{borderRightWidth:r}:"bb"===e?{borderBottomWidth:r}:"bl"===e?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([t,e])=>({borderRadius:e}))),r(/^(b)-(solid|dashed|dotted)$/,(([t,e,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([t,e])=>({flexWrap:e}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([t,e])=>({flexDirection:e.replace("col","column")}))),r(/^flex-(\d+|(\d+)\/(\d+))$/,(([t,e,r,o])=>({flex:r&&o?r/o:e}))),r(/^flex-(grow|shrink)-(\d+)$/,(([t,e,r])=>"grow"==e?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([t,,e,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:e}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([t,,e,r])=>({alignItems:r?"flex-"+r:e}))),r(/^align-center-full$/,(([t])=>({alignItems:"center",justifyContent:"center"}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,r,,,o])=>{const n={w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"";const a=h(r,o);return!(!n||!a)&&("fg"===e?{color:a}:"bg"===e?{backgroundColor:a}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([t,e,,,r])=>{const o=h(e,r);return!!o&&{borderColor:o}})),"function"==typeof(b=({pattern:t,fn:e,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),a=n.pop().match(t);if(!a)return!1;let i="";return i=e(a,n),i})&&(o=b);export{u as default};
{
"name": "@nextcss/react-native",
"version": "0.1.4",
"version": "0.1.5",
"description": "Testing",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc