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.3 to 0.1.4

2

dist/index-cjs.js

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

"use strict";const e=[],t={reverseBreakpoint:!1},r=(r,o,n=t)=>{try{r=new RegExp(r)}catch(e){console.error(e)}r&&"function"==typeof o&&n&&"object"==typeof n?e.push({pattern:r,fn:o,options:{...t,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:e,fn:t,options:r},o)=>{const n=o.match(e);return!!n&&t(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=e=>(e?.match(n)||e?.match(a)||e?.match(i))?.slice(1).map(((e,t)=>{const r=parseInt(e.padStart(2,e),16);return 3===t?Math.round(r/255*100):r})),c=e=>((e,t,r)=>Math.min(Math.max(t,e),r))(Math.round(e),0,255),s=(e,t=0)=>{const r=d(e),o=t/100;return r?.forEach(((e,t,r)=>{t>=3||(r[t]=c(o<0?e+(255-e)*Math.abs(o):e-e*o))})),(e=>{if(Array.isArray(e)&&[3,4].includes(e.length))return"#"+e.map(((e,t)=>(3===t?Math.round(e/100*255):e).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=e=>{const t={black:"#000000",white:"#ffffff"};return Object.keys(e).forEach((r=>{const o=(e=>l.reduce(((t,r,o)=>{const n=s(e,r);return t[50*o+50]=n,t}),{}))(e[r]);Object.keys(o).forEach((e=>{t[`${r}-${e}`]=o[e]}))})),t},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=(e,t=!1)=>{const{palette:r}={...h},o=p[r][e]||"";if(t&&7===o.length){const[e,r,n]=d(o);return`rgba(${e}, ${r}, ${n}, ${t/100})`}return o},g=e=>({w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"");var u;r(/^(flex)$/,(([e,t])=>({display:t}))),r(/^(relative|absolute)$/,(([e,t])=>({position:t}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([e,t,r,o,n,a])=>{const i=isNaN(o)?o:t?-o:o,d=n&&a?`calc( ${100*(t?-n:n)}%/${a} )`:i;return(!t||"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+))$/,(([e,t,r,o,n])=>{const a=isNaN(r)?r:t?-r:r,i=o&&n?`calc( ${100*(t?-o:o)}%/${n} )`:a;return(!t||"auto"!==r)&&{top:i,right:i,bottom:i,left:i}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([e,t,r,o,n,a])=>{const i=isNaN(o)?o:t?-o:o,d=n&&a?`calc( ${100*(t?-n:n)}%/${a} )`:i;return(!t||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([e,t,r])=>({zIndex:t?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([e,t,r])=>({aspectRatio:t/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([e,t])=>({resizeMode:t}))),r(/^of-(visible|hidden|scroll)$/,(([e,t])=>({overflow:t}))),r(/^(p[trbl]?)-(\d+)$/,(([e,t,r])=>"p"===t?{padding:r}:"pt"===t?{paddingTop:r}:"pr"===t?{paddingRight:r}:"pb"===t?{paddingBottom:r}:"pl"===t?{paddingLeft:r}:void 0)),r(/^(-)?(m[trbl]?)-(auto|\d+)$/,(([e,t,r,o])=>{const n=isNaN(o)?o:t?-o:o;return(!t||!isNaN(o))&&("m"===r?{margin:n}:"mt"===r?{marginTop:n}:"mr"===r?{marginRight:n}:"mb"===r?{marginBottom:n}:"ml"===r?{marginLeft:n}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+)$/,(([e,t,r,o])=>{const n=g(r[0]),a=isNaN(o)?o:t?-o:o;return!(t&&"auto"===o||"auto"===o&&"margin"!==n)&&("px"===r?{paddingLeft:a,paddingRight:a}:"py"===r?{paddingTop:a,paddingBottom:a}:"mx"===r?{marginLeft:a,marginRight:a}:"my"===r?{marginTop:a,marginBottom:a}:void 0)})),r(/^fs-(\d+)$/,(([e,t])=>({fontSize:t}))),r(/^fw-([1-9]00|normal|bold)$/,(([e,t])=>({fontWeight:t}))),r(/^lh-([\d.]+)$/,(([e,t])=>({lineHeight:t}))),r(/^text-(left|center|right|justify)$/,(([e,t])=>({textAlign:t}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([e,t])=>({textTransform:"no-transform"===t?"none":t}))),r(/^(underline|line-through|no-decoration)$/,(([e,t])=>({textDecorationLine:"no-decoration"===t?"none":t}))),r(/^hide$/,(([e])=>({display:"none"}))),r(/^fit$/,(([e])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([e,t])=>"w"===t?{width:"100%"}:"h"===t?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([e,t,r])=>{const o=(isNaN(r),r);return"w"===t?{width:o}:"h"===t?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([e,t,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===t?{width:n}:"h"===t?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([e,t,r])=>"b"===t?{borderWidth:r}:"bt"===t?{borderTopWidth:r}:"br"===t?{borderRightWidth:r}:"bb"===t?{borderBottomWidth:r}:"bl"===t?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([e,t])=>({borderRadius:t}))),r(/^(b)-(solid|dashed|dotted)$/,(([e,t,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([e,t])=>({flexWrap:t}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([e,t])=>({flexDirection:t.replace("col","column")}))),r(/^flex-(\d+)$/,(([e,t])=>({flex:t}))),r(/^flex-(grow|shrink)-(\d+)$/,(([e,t,r])=>"grow"==t?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([e,,t,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:t}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([e,,t,r])=>({alignItems:r?"flex-"+r:t}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,t,r,,,o])=>{const n=g(t),a=b(r,o);return!(!n||!a)&&("fg"===t?{color:a}:"bg"===t?{backgroundColor:a}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,t,,,r])=>{const o=b(t,r);return!!o&&{borderColor:o}})),"function"==typeof(u=({pattern:e,fn:t,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),a=n.pop().match(e);if(!a)return!1;let i="";return i=t(a,n),i})&&(o=u),module.exports=function(...t){const r={};return[...t].forEach((t=>{"object"==typeof t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),"string"==typeof t&&(t.split(" ").forEach((t=>{if(!t)return;const{style:n}=(t=>{let r="",n=null;return e.forEach(((e,a)=>{const i=o(e,t);if(i)return r=i,void(n=a)})),{style:r,proc:n}})(t);n&&Object.assign(r,n)})),Object.keys(r).forEach((e=>{const t=Number(r[e]);e.includes(["fontWeight"])||isNaN(t)||(r[e]=t)})))})),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"})},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};

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

const e=[],t={reverseBreakpoint:!1},r=(r,o,n=t)=>{try{r=new RegExp(r)}catch(e){console.error(e)}r&&"function"==typeof o&&n&&"object"==typeof n?e.push({pattern:r,fn:o,options:{...t,...n}}):console.error("Declared register is not correct!",{pattern:r,fn:o,options:n})};let o=({pattern:e,fn:t,options:r},o)=>{const n=o.match(e);return!!n&&t(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=e=>(e?.match(n)||e?.match(a)||e?.match(i))?.slice(1).map(((e,t)=>{const r=parseInt(e.padStart(2,e),16);return 3===t?Math.round(r/255*100):r})),c=e=>((e,t,r)=>Math.min(Math.max(t,e),r))(Math.round(e),0,255),l=(e,t=0)=>{const r=d(e),o=t/100;return r?.forEach(((e,t,r)=>{t>=3||(r[t]=c(o<0?e+(255-e)*Math.abs(o):e-e*o))})),(e=>{if(Array.isArray(e)&&[3,4].includes(e.length))return"#"+e.map(((e,t)=>(3===t?Math.round(e/100*255):e).toString(16).padStart(2,"0"))).join("")})(r)},s=[-90,-85,-74,-62,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,85],f=e=>{const t={black:"#000000",white:"#ffffff"};return Object.keys(e).forEach((r=>{const o=(e=>s.reduce(((t,r,o)=>{const n=l(e,r);return t[50*o+50]=n,t}),{}))(e[r]);Object.keys(o).forEach((e=>{t[`${r}-${e}`]=o[e]}))})),t},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=(e,t=!1)=>{const{palette:r}={...h},o=p[r][e]||"";if(t&&7===o.length){const[e,r,n]=d(o);return`rgba(${e}, ${r}, ${n}, ${t/100})`}return o},g=e=>({w:"width",h:"height",p:"padding",m:"margin",b:"border",r:"border-radius",fg:"color",bg:"background-color"}[e]||"");var u;function m(...t){const r={};return[...t].forEach((t=>{"object"==typeof t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),"string"==typeof t&&(t.split(" ").forEach((t=>{if(!t)return;const{style:n}=(t=>{let r="",n=null;return e.forEach(((e,a)=>{const i=o(e,t);if(i)return r=i,void(n=a)})),{style:r,proc:n}})(t);n&&Object.assign(r,n)})),Object.keys(r).forEach((e=>{const t=Number(r[e]);e.includes(["fontWeight"])||isNaN(t)||(r[e]=t)})))})),r}r(/^(flex)$/,(([e,t])=>({display:t}))),r(/^(relative|absolute)$/,(([e,t])=>({position:t}))),r(/^(-)?(top|right|bottom|left)-(auto|\d+|(\d+)\/(\d+))$/,(([e,t,r,o,n,a])=>{const i=isNaN(o)?o:t?-o:o,d=n&&a?`calc( ${100*(t?-n:n)}%/${a} )`:i;return(!t||"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+))$/,(([e,t,r,o,n])=>{const a=isNaN(r)?r:t?-r:r,i=o&&n?`calc( ${100*(t?-o:o)}%/${n} )`:a;return(!t||"auto"!==r)&&{top:i,right:i,bottom:i,left:i}})),r(/^(-)?inset-([xy])-(auto|\d+|(\d+)\/(\d+))$/,(([e,t,r,o,n,a])=>{const i=isNaN(o)?o:t?-o:o,d=n&&a?`calc( ${100*(t?-n:n)}%/${a} )`:i;return(!t||"auto"!==o)&&("x"===r?{left:d,right:d}:"y"===r?{top:d,bottom:d}:void 0)})),r(/^(-)?z-(\d+)$/,(([e,t,r])=>({zIndex:t?-r:r}))),r(/^ratio-(\d+)\/(\d+)$/,(([e,t,r])=>({aspectRatio:t/r}))),r(/^fit-(contain|cover|stretch|repeat|center)$/,(([e,t])=>({resizeMode:t}))),r(/^of-(visible|hidden|scroll)$/,(([e,t])=>({overflow:t}))),r(/^(p[trbl]?)-(\d+)$/,(([e,t,r])=>"p"===t?{padding:r}:"pt"===t?{paddingTop:r}:"pr"===t?{paddingRight:r}:"pb"===t?{paddingBottom:r}:"pl"===t?{paddingLeft:r}:void 0)),r(/^(-)?(m[trbl]?)-(auto|\d+)$/,(([e,t,r,o])=>{const n=isNaN(o)?o:t?-o:o;return(!t||!isNaN(o))&&("m"===r?{margin:n}:"mt"===r?{marginTop:n}:"mr"===r?{marginRight:n}:"mb"===r?{marginBottom:n}:"ml"===r?{marginLeft:n}:void 0)})),r(/^(-)?([pm][xy])-(auto|\d+)$/,(([e,t,r,o])=>{const n=g(r[0]),a=isNaN(o)?o:t?-o:o;return!(t&&"auto"===o||"auto"===o&&"margin"!==n)&&("px"===r?{paddingLeft:a,paddingRight:a}:"py"===r?{paddingTop:a,paddingBottom:a}:"mx"===r?{marginLeft:a,marginRight:a}:"my"===r?{marginTop:a,marginBottom:a}:void 0)})),r(/^fs-(\d+)$/,(([e,t])=>({fontSize:t}))),r(/^fw-([1-9]00|normal|bold)$/,(([e,t])=>({fontWeight:t}))),r(/^lh-([\d.]+)$/,(([e,t])=>({lineHeight:t}))),r(/^text-(left|center|right|justify)$/,(([e,t])=>({textAlign:t}))),r(/^(uppercase|lowercase|capitalize|no-transform)$/,(([e,t])=>({textTransform:"no-transform"===t?"none":t}))),r(/^(underline|line-through|no-decoration)$/,(([e,t])=>({textDecorationLine:"no-decoration"===t?"none":t}))),r(/^hide$/,(([e])=>({display:"none"}))),r(/^fit$/,(([e])=>({width:"100%",height:"100%"}))),r(/^fit-([wh])$/,(([e,t])=>"w"===t?{width:"100%"}:"h"===t?{height:"100%"}:void 0)),r(/^([wh])-(auto|\d+)$/,(([e,t,r])=>{const o=(isNaN(r),r);return"w"===t?{width:o}:"h"===t?{height:o}:void 0})),r(/^([wh])-(\d+)\/(\d+)$/,(([e,t,r,o])=>{if(parseInt(r)>parseInt(o))return!1;const n=100*r/o+"%";return"w"===t?{width:n}:"h"===t?{height:n}:void 0})),r(/^(b[trbl]?)-(\d+)$/,(([e,t,r])=>"b"===t?{borderWidth:r}:"bt"===t?{borderTopWidth:r}:"br"===t?{borderRightWidth:r}:"bb"===t?{borderBottomWidth:r}:"bl"===t?{borderLeftWidth:r}:void 0)),r(/^r-(\d+)$/,(([e,t])=>({borderRadius:t}))),r(/^(b)-(solid|dashed|dotted)$/,(([e,t,r])=>({borderStyle:r}))),r(/^flex-(wrap|wrap-reverse|nowrap)$/,(([e,t])=>({flexWrap:t}))),r(/^flex-(row|row-reverse|col|col-reverse)$/,(([e,t])=>({flexDirection:t.replace("col","column")}))),r(/^flex-(\d+)$/,(([e,t])=>({flex:t}))),r(/^flex-(grow|shrink)-(\d+)$/,(([e,t,r])=>"grow"==t?{flexGrow:r}:{flexShrink:r})),r(/^justify-((center)|(start|end)|(around|between|evenly))$/,(([e,,t,r,o])=>({justifyContent:o?"space-"+o:r?"flex-"+r:t}))),r(/^align-((center|baseline|stretch)|(start|end))$/,(([e,,t,r])=>({alignItems:r?"flex-"+r:t}))),r(/^([fb]g)-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,t,r,,,o])=>{const n=g(t),a=b(r,o);return!(!n||!a)&&("fg"===t?{color:a}:"bg"===t?{backgroundColor:a}:void 0)})),r(/^b-(black|white|([\w-]+\d+))(\/(\d+))?$/,(([e,t,,,r])=>{const o=b(t,r);return!!o&&{borderColor:o}})),"function"==typeof(u=({pattern:e,fn:t,options:{reverseBreakpoint:r}},o)=>{const n=o.split(":"),a=n.pop().match(e);if(!a)return!1;let i="";return i=t(a,n),i})&&(o=u);export{m 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"})},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};
{
"name": "@nextcss/react-native",
"version": "0.1.3",
"version": "0.1.4",
"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