tailwindcss 4.0.0-alpha.3 → 4.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-AZANAYY2.mjs +1 -0
- package/dist/chunk-YMSQGVYX.mjs +1 -0
- package/dist/colors-b_6i0Oi7.d.ts +295 -0
- package/dist/colors.d.mts +295 -0
- package/dist/colors.d.ts +5 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +1147 -0
- package/dist/default-theme.d.ts +1147 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/lib.d.mts +156 -255
- package/dist/lib.d.ts +2 -323
- package/dist/lib.js +24 -11
- package/dist/lib.mjs +24 -11
- package/dist/plugin.d.mts +10 -0
- package/dist/plugin.d.ts +98 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
- package/dist/resolve-config-CCprQPpk.d.mts +186 -0
- package/dist/types-DxVE_W4f.d.mts +92 -0
- package/index.css +847 -3
- package/package.json +43 -8
- package/preflight.css +24 -53
- package/theme.css +281 -253
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var v=["anchor-size"],T=new RegExp(`(${v.join("|")})\\(`,"g");var m=new Uint8Array(256);function d(e,a){let t=0,g=[],k=0,u=e.length,E=a.charCodeAt(0);for(let n=0;n<u;n++){let h=e.charCodeAt(n);if(t===0&&h===E){g.push(e.slice(k,n)),k=n+1;continue}switch(h){case 92:n+=1;break;case 39:case 34:for(;++n<u;){let x=e.charCodeAt(n);if(x===92){n+=1;continue}if(x===h)break}break;case 40:m[t]=41,t++;break;case 91:m[t]=93,t++;break;case 123:m[t]=125,t++;break;case 93:case 125:case 41:t>0&&h===m[t-1]&&t--;break}}return g.push(e.slice(k)),g}var c=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,F=new RegExp(`^${c.source}$`);var I=new RegExp(`^${c.source}%$`);var C=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],H=new RegExp(`^${c.source}(${C.join("|")})$`);var S=["deg","rad","grad","turn"],$=new RegExp(`^${c.source}(${S.join("|")})$`);var P=new RegExp(`^${c.source} +${c.source} +${c.source}$`);function l(e){let a=Number(e);return Number.isInteger(a)&&a>=0&&String(a)===String(e)}var f={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(0.984 0.003 247.858)",100:"oklch(0.968 0.007 247.896)",200:"oklch(0.929 0.013 255.508)",300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",800:"oklch(0.279 0.041 260.031)",900:"oklch(0.208 0.042 265.755)",950:"oklch(0.129 0.042 264.695)"},gray:{50:"oklch(0.985 0.002 247.839)",100:"oklch(0.967 0.003 264.542)",200:"oklch(0.928 0.006 264.531)",300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",800:"oklch(0.278 0.033 256.848)",900:"oklch(0.21 0.034 264.665)",950:"oklch(0.13 0.028 261.692)"},zinc:{50:"oklch(0.985 0 0)",100:"oklch(0.967 0.001 286.375)",200:"oklch(0.92 0.004 286.32)",300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",800:"oklch(0.274 0.006 286.033)",900:"oklch(0.21 0.006 285.885)",950:"oklch(0.141 0.005 285.823)"},neutral:{50:"oklch(0.985 0 0)",100:"oklch(0.97 0 0)",200:"oklch(0.922 0 0)",300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",800:"oklch(0.269 0 0)",900:"oklch(0.205 0 0)",950:"oklch(0.145 0 0)"},stone:{50:"oklch(0.985 0.001 106.423)",100:"oklch(0.97 0.001 106.424)",200:"oklch(0.923 0.003 48.717)",300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",800:"oklch(0.268 0.007 34.298)",900:"oklch(0.216 0.006 56.043)",950:"oklch(0.147 0.004 49.25)"},red:{50:"oklch(0.971 0.013 17.38)",100:"oklch(0.936 0.032 17.717)",200:"oklch(0.885 0.062 18.334)",300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)",800:"oklch(0.444 0.177 26.899)",900:"oklch(0.396 0.141 25.723)",950:"oklch(0.258 0.092 26.042)"},orange:{50:"oklch(0.98 0.016 73.684)",100:"oklch(0.954 0.038 75.164)",200:"oklch(0.901 0.076 70.697)",300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)",800:"oklch(0.47 0.157 37.304)",900:"oklch(0.408 0.123 38.172)",950:"oklch(0.266 0.079 36.259)"},amber:{50:"oklch(0.987 0.022 95.277)",100:"oklch(0.962 0.059 95.617)",200:"oklch(0.924 0.12 95.746)",300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",800:"oklch(0.473 0.137 46.201)",900:"oklch(0.414 0.112 45.904)",950:"oklch(0.279 0.077 45.635)"},yellow:{50:"oklch(0.987 0.026 102.212)",100:"oklch(0.973 0.071 103.193)",200:"oklch(0.945 0.129 101.54)",300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",800:"oklch(0.476 0.114 61.907)",900:"oklch(0.421 0.095 57.708)",950:"oklch(0.286 0.066 53.813)"},lime:{50:"oklch(0.986 0.031 120.757)",100:"oklch(0.967 0.067 122.328)",200:"oklch(0.938 0.127 124.321)",300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",800:"oklch(0.453 0.124 130.933)",900:"oklch(0.405 0.101 131.063)",950:"oklch(0.274 0.072 132.109)"},green:{50:"oklch(0.982 0.018 155.826)",100:"oklch(0.962 0.044 156.743)",200:"oklch(0.925 0.084 155.995)",300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)",800:"oklch(0.448 0.119 151.328)",900:"oklch(0.393 0.095 152.535)",950:"oklch(0.266 0.065 152.934)"},emerald:{50:"oklch(0.979 0.021 166.113)",100:"oklch(0.95 0.052 163.051)",200:"oklch(0.905 0.093 164.15)",300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)",800:"oklch(0.432 0.095 166.913)",900:"oklch(0.378 0.077 168.94)",950:"oklch(0.262 0.051 172.552)"},teal:{50:"oklch(0.984 0.014 180.72)",100:"oklch(0.953 0.051 180.801)",200:"oklch(0.91 0.096 180.426)",300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)",800:"oklch(0.437 0.078 188.216)",900:"oklch(0.386 0.063 188.416)",950:"oklch(0.277 0.046 192.524)"},cyan:{50:"oklch(0.984 0.019 200.873)",100:"oklch(0.956 0.045 203.388)",200:"oklch(0.917 0.08 205.041)",300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)",800:"oklch(0.45 0.085 224.283)",900:"oklch(0.398 0.07 227.392)",950:"oklch(0.302 0.056 229.695)"},sky:{50:"oklch(0.977 0.013 236.62)",100:"oklch(0.951 0.026 236.824)",200:"oklch(0.901 0.058 230.902)",300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)",800:"oklch(0.443 0.11 240.79)",900:"oklch(0.391 0.09 240.876)",950:"oklch(0.293 0.066 243.157)"},blue:{50:"oklch(0.97 0.014 254.604)",100:"oklch(0.932 0.032 255.585)",200:"oklch(0.882 0.059 254.128)",300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)",800:"oklch(0.424 0.199 265.638)",900:"oklch(0.379 0.146 265.522)",950:"oklch(0.282 0.091 267.935)"},indigo:{50:"oklch(0.962 0.018 272.314)",100:"oklch(0.93 0.034 272.788)",200:"oklch(0.87 0.065 274.039)",300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)",800:"oklch(0.398 0.195 277.366)",900:"oklch(0.359 0.144 278.697)",950:"oklch(0.257 0.09 281.288)"},violet:{50:"oklch(0.969 0.016 293.756)",100:"oklch(0.943 0.029 294.588)",200:"oklch(0.894 0.057 293.283)",300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)",800:"oklch(0.432 0.232 292.759)",900:"oklch(0.38 0.189 293.745)",950:"oklch(0.283 0.141 291.089)"},purple:{50:"oklch(0.977 0.014 308.299)",100:"oklch(0.946 0.033 307.174)",200:"oklch(0.902 0.063 306.703)",300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)",800:"oklch(0.438 0.218 303.724)",900:"oklch(0.381 0.176 304.987)",950:"oklch(0.291 0.149 302.717)"},fuchsia:{50:"oklch(0.977 0.017 320.058)",100:"oklch(0.952 0.037 318.852)",200:"oklch(0.903 0.076 319.62)",300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)",800:"oklch(0.452 0.211 324.591)",900:"oklch(0.401 0.17 325.612)",950:"oklch(0.293 0.136 325.661)"},pink:{50:"oklch(0.971 0.014 343.198)",100:"oklch(0.948 0.028 342.258)",200:"oklch(0.899 0.061 343.231)",300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)",800:"oklch(0.459 0.187 3.815)",900:"oklch(0.408 0.153 2.432)",950:"oklch(0.284 0.109 3.907)"},rose:{50:"oklch(0.969 0.015 12.422)",100:"oklch(0.941 0.03 12.58)",200:"oklch(0.892 0.058 10.001)",300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)",800:"oklch(0.455 0.188 13.697)",900:"oklch(0.41 0.159 10.272)",950:"oklch(0.271 0.105 12.094)"}};function s(e){return{__BARE_VALUE__:e}}var r=s(e=>{if(l(e.value))return e.value}),o=s(e=>{if(l(e.value))return`${e.value}%`}),i=s(e=>{if(l(e.value))return`${e.value}px`}),b=s(e=>{if(l(e.value))return`${e.value}ms`}),p=s(e=>{if(l(e.value))return`${e.value}deg`}),A=s(e=>{if(e.fraction===null)return;let[a,t]=d(e.fraction,"/");if(!(!l(a)||!l(t)))return e.fraction}),y=s(e=>{if(l(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),w={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...A},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...o}),backdropContrast:({theme:e})=>({...e("contrast"),...o}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...o}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...p}),backdropInvert:({theme:e})=>({...e("invert"),...o}),backdropOpacity:({theme:e})=>({...e("opacity"),...o}),backdropSaturate:({theme:e})=>({...e("saturate"),...o}),backdropSepia:({theme:e})=>({...e("sepia"),...o}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentColor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...i},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...o},caretColor:({theme:e})=>e("colors"),colors:()=>({...f}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...r},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...o},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...i}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...r},flexShrink:{0:"0",DEFAULT:"1",...r},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...o},grayscale:{0:"0",DEFAULT:"100%",...o},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...y},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...y},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...p},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...o},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...r},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...o},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...r},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentColor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...p},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...o},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...o},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...o},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...p},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...r},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...i},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...r}};module.exports=w;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{e as a}from"./chunk-YMSQGVYX.mjs";import"./chunk-AZANAYY2.mjs";export{a as default};
|
package/dist/lib.d.mts
CHANGED
@@ -1,33 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
type ClassEntry = [string, ClassMetadata];
|
5
|
-
interface SelectorOptions {
|
6
|
-
modifier?: string;
|
7
|
-
value?: string;
|
8
|
-
}
|
9
|
-
interface VariantEntry {
|
10
|
-
name: string;
|
11
|
-
isArbitrary: boolean;
|
12
|
-
values: string[];
|
13
|
-
hasDash: boolean;
|
14
|
-
selectors: (options: SelectorOptions) => string[];
|
15
|
-
}
|
16
|
-
|
17
|
-
declare class Theme {
|
18
|
-
private values;
|
19
|
-
constructor(values?: Map<string, string>);
|
20
|
-
add(key: string, value: string): void;
|
21
|
-
keysInNamespaces(themeKeys: ThemeKey[]): string[];
|
22
|
-
get(themeKeys: ThemeKey[]): string | null;
|
23
|
-
entries(): IterableIterator<[string, string]>;
|
24
|
-
clearNamespace(namespace: string): void;
|
25
|
-
resolveKey(candidateValue: string, themeKeys: ThemeKey[]): string | null;
|
26
|
-
resolve(candidateValue: string, themeKeys: ThemeKey[]): string | null;
|
27
|
-
resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record<string, string>] | null;
|
28
|
-
namespace(namespace: string): Map<string | null, string>;
|
29
|
-
}
|
30
|
-
type ThemeKey = '--accent-color' | '--animate' | '--aspect-ratio' | '--backdrop-blur' | '--backdrop-brightness' | '--backdrop-contrast' | '--backdrop-grayscale' | '--backdrop-hue-rotate' | '--backdrop-invert' | '--backdrop-opacity' | '--backdrop-saturate' | '--backdrop-sepia' | '--background-color' | '--background-image' | '--blur' | '--border-color' | '--border-spacing' | '--border-width' | '--box-shadow-color' | '--breakpoint' | '--brightness' | '--caret-color' | '--color' | '--columns' | '--contrast' | '--cursor' | '--default-border-width' | '--default-ring-color' | '--default-ring-width' | '--divide-width' | '--divide-color' | '--drop-shadow' | '--fill' | '--flex-basis' | '--font-family' | '--font-size' | '--font-weight' | '--gap' | '--gradient-color-stop-positions' | '--grayscale' | '--grid-auto-columns' | '--grid-auto-rows' | '--grid-column' | '--grid-column-end' | '--grid-column-start' | '--grid-row' | '--grid-row-end' | '--grid-row-start' | '--grid-template-columns' | '--grid-template-rows' | '--height' | '--hue-rotate' | '--inset' | '--inset-shadow' | '--invert' | '--letter-spacing' | '--line-height' | '--line-clamp' | '--list-style-image' | '--list-style-type' | '--margin' | '--max-height' | '--max-width' | '--min-height' | '--min-width' | '--object-position' | '--opacity' | '--order' | '--outline-color' | '--outline-width' | '--outline-offset' | '--padding' | '--placeholder-color' | '--radius' | '--ring-color' | '--ring-offset-color' | '--ring-offset-width' | '--ring-width' | '--rotate' | '--saturate' | '--scale' | '--scroll-margin' | '--scroll-padding' | '--sepia' | '--shadow' | '--size' | '--skew' | '--space' | '--spacing' | '--stroke' | '--stroke-width' | '--text-color' | '--text-decoration-color' | '--text-decoration-thickness' | '--text-indent' | '--text-underline-offset' | '--transform-origin' | '--transition-delay' | '--transition-duration' | '--transition-property' | '--transition-timing-function' | '--translate' | '--width' | '--z-index';
|
1
|
+
import { U as UserConfig, P as Plugin } from './types-DxVE_W4f.mjs';
|
2
|
+
import { V as Variant, C as Candidate } from './resolve-config-CCprQPpk.mjs';
|
3
|
+
import './colors.mjs';
|
31
4
|
|
32
5
|
type Rule = {
|
33
6
|
kind: 'rule';
|
@@ -37,228 +10,79 @@ type Rule = {
|
|
37
10
|
type Declaration = {
|
38
11
|
kind: 'declaration';
|
39
12
|
property: string;
|
40
|
-
value: string;
|
13
|
+
value: string | undefined;
|
41
14
|
important: boolean;
|
42
15
|
};
|
43
16
|
type Comment = {
|
44
17
|
kind: 'comment';
|
45
18
|
value: string;
|
46
19
|
};
|
47
|
-
type
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
/**
|
52
|
-
* bg-[color:--my-color]
|
53
|
-
* ^^^^^
|
54
|
-
*/
|
55
|
-
dataType: string | null;
|
56
|
-
/**
|
57
|
-
* bg-[#0088cc]
|
58
|
-
* ^^^^^^^
|
59
|
-
* bg-[--my_variable]
|
60
|
-
* var(^^^^^^^^^^^^^)
|
61
|
-
*/
|
62
|
-
value: string;
|
63
|
-
/**
|
64
|
-
* bg-[--my_variable]
|
65
|
-
* ^^^^^^^^^^^^^
|
66
|
-
*/
|
67
|
-
dashedIdent: string | null;
|
68
|
-
};
|
69
|
-
type NamedUtilityValue = {
|
70
|
-
kind: 'named';
|
71
|
-
/**
|
72
|
-
* bg-red-500
|
73
|
-
* ^^^^^^^
|
74
|
-
*
|
75
|
-
* w-1/2
|
76
|
-
* ^
|
77
|
-
*/
|
78
|
-
value: string;
|
79
|
-
/**
|
80
|
-
* w-1/2
|
81
|
-
* ^^^
|
82
|
-
*/
|
83
|
-
fraction: string | null;
|
84
|
-
};
|
85
|
-
type ArbitraryModifier = {
|
86
|
-
kind: 'arbitrary';
|
87
|
-
/**
|
88
|
-
* bg-red-500/[50%]
|
89
|
-
* ^^^
|
90
|
-
*/
|
91
|
-
value: string;
|
92
|
-
/**
|
93
|
-
* bg-red-500/[--my_variable]
|
94
|
-
* ^^^^^^^^^^^^^
|
95
|
-
*/
|
96
|
-
dashedIdent: string | null;
|
97
|
-
};
|
98
|
-
type NamedModifier = {
|
99
|
-
kind: 'named';
|
100
|
-
/**
|
101
|
-
* bg-red-500/50
|
102
|
-
* ^^
|
103
|
-
*/
|
104
|
-
value: string;
|
105
|
-
};
|
106
|
-
type ArbitraryVariantValue = {
|
107
|
-
kind: 'arbitrary';
|
108
|
-
value: string;
|
109
|
-
};
|
110
|
-
type NamedVariantValue = {
|
111
|
-
kind: 'named';
|
112
|
-
value: string;
|
113
|
-
};
|
114
|
-
type Variant =
|
115
|
-
/**
|
116
|
-
* Arbitrary variants are variants that take a selector and generate a variant
|
117
|
-
* on the fly.
|
118
|
-
*
|
119
|
-
* E.g.: `[&_p]`
|
120
|
-
*/
|
121
|
-
{
|
122
|
-
kind: 'arbitrary';
|
123
|
-
selector: string;
|
124
|
-
compounds: boolean;
|
125
|
-
}
|
126
|
-
/**
|
127
|
-
* Static variants are variants that don't take any arguments.
|
128
|
-
*
|
129
|
-
* E.g.: `hover`
|
130
|
-
*/
|
131
|
-
| {
|
132
|
-
kind: 'static';
|
133
|
-
root: string;
|
134
|
-
compounds: boolean;
|
135
|
-
}
|
136
|
-
/**
|
137
|
-
* Functional variants are variants that can take an argument. The argument is
|
138
|
-
* either a named variant value or an arbitrary variant value.
|
139
|
-
*
|
140
|
-
* E.g.:
|
141
|
-
*
|
142
|
-
* - `aria-disabled`
|
143
|
-
* - `aria-[disabled]`
|
144
|
-
* - `@container-size` -> @container, with named value `size`
|
145
|
-
* - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size`
|
146
|
-
* - `@container` -> @container, with no value
|
147
|
-
*/
|
148
|
-
| {
|
149
|
-
kind: 'functional';
|
150
|
-
root: string;
|
151
|
-
value: ArbitraryVariantValue | NamedVariantValue | null;
|
152
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
153
|
-
compounds: boolean;
|
154
|
-
}
|
155
|
-
/**
|
156
|
-
* Compound variants are variants that take another variant as an argument.
|
157
|
-
*
|
158
|
-
* E.g.:
|
159
|
-
*
|
160
|
-
* - `has-[&_p]`
|
161
|
-
* - `group-*`
|
162
|
-
* - `peer-*`
|
163
|
-
*/
|
164
|
-
| {
|
165
|
-
kind: 'compound';
|
166
|
-
root: string;
|
167
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
168
|
-
variant: Variant;
|
169
|
-
compounds: boolean;
|
20
|
+
type Context = {
|
21
|
+
kind: 'context';
|
22
|
+
context: Record<string, string>;
|
23
|
+
nodes: AstNode[];
|
170
24
|
};
|
171
|
-
type
|
172
|
-
|
173
|
-
|
174
|
-
* a property and a value.
|
175
|
-
*
|
176
|
-
* E.g.:
|
177
|
-
*
|
178
|
-
* - `[color:red]`
|
179
|
-
* - `[color:red]/50`
|
180
|
-
* - `[color:red]/50!`
|
181
|
-
*/
|
182
|
-
{
|
183
|
-
kind: 'arbitrary';
|
184
|
-
property: string;
|
185
|
-
value: string;
|
186
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
187
|
-
variants: Variant[];
|
188
|
-
important: boolean;
|
189
|
-
}
|
190
|
-
/**
|
191
|
-
* Static candidates are candidates that don't take any arguments.
|
192
|
-
*
|
193
|
-
* E.g.:
|
194
|
-
*
|
195
|
-
* - `underline`
|
196
|
-
* - `flex`
|
197
|
-
*/
|
198
|
-
| {
|
199
|
-
kind: 'static';
|
200
|
-
root: string;
|
201
|
-
variants: Variant[];
|
202
|
-
negative: boolean;
|
203
|
-
important: boolean;
|
204
|
-
}
|
205
|
-
/**
|
206
|
-
* Functional candidates are candidates that can take an argument.
|
207
|
-
*
|
208
|
-
* E.g.:
|
209
|
-
*
|
210
|
-
* - `bg-red-500`
|
211
|
-
* - `bg-[#0088cc]`
|
212
|
-
* - `w-1/2`
|
213
|
-
*/
|
214
|
-
| {
|
215
|
-
kind: 'functional';
|
216
|
-
root: string;
|
217
|
-
value: ArbitraryUtilityValue | NamedUtilityValue | null;
|
218
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
219
|
-
variants: Variant[];
|
220
|
-
negative: boolean;
|
221
|
-
important: boolean;
|
25
|
+
type AtRoot = {
|
26
|
+
kind: 'at-root';
|
27
|
+
nodes: AstNode[];
|
222
28
|
};
|
29
|
+
type AstNode = Rule | Declaration | Comment | Context | AtRoot;
|
223
30
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
values: (string | null)[];
|
230
|
-
modifiers: string[];
|
31
|
+
declare const enum ThemeOptions {
|
32
|
+
NONE = 0,
|
33
|
+
INLINE = 1,
|
34
|
+
REFERENCE = 2,
|
35
|
+
DEFAULT = 4
|
231
36
|
}
|
232
|
-
declare class
|
233
|
-
private
|
234
|
-
private
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
37
|
+
declare class Theme {
|
38
|
+
#private;
|
39
|
+
private values;
|
40
|
+
private keyframes;
|
41
|
+
prefix: string | null;
|
42
|
+
constructor(values?: Map<string, {
|
43
|
+
value: string;
|
44
|
+
options: ThemeOptions;
|
45
|
+
}>, keyframes?: Set<Rule>);
|
46
|
+
add(key: string, value: string, options?: ThemeOptions): void;
|
47
|
+
keysInNamespaces(themeKeys: ThemeKey[]): string[];
|
48
|
+
get(themeKeys: ThemeKey[]): string | null;
|
49
|
+
hasDefault(key: string): boolean;
|
50
|
+
getOptions(key: string): ThemeOptions;
|
51
|
+
entries(): IterableIterator<[string, {
|
52
|
+
value: string;
|
53
|
+
options: ThemeOptions;
|
54
|
+
}]> | [string, {
|
55
|
+
value: string;
|
56
|
+
options: ThemeOptions;
|
57
|
+
}][];
|
58
|
+
clearNamespace(namespace: string, clearOptions: ThemeOptions): void;
|
59
|
+
resolve(candidateValue: string | null, themeKeys: ThemeKey[]): string | null;
|
60
|
+
resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null;
|
61
|
+
resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record<string, string>] | null;
|
62
|
+
namespace(namespace: string): Map<string | null, string>;
|
63
|
+
addKeyframes(value: Rule): void;
|
64
|
+
getKeyframes(): Rule[];
|
253
65
|
}
|
66
|
+
type ThemeKey = `--${string}`;
|
254
67
|
|
255
68
|
type VariantFn<T extends Variant['kind']> = (rule: Rule, variant: Extract<Variant, {
|
256
69
|
kind: T;
|
257
70
|
}>) => null | void;
|
258
71
|
type CompareFn = (a: Variant, z: Variant) => number;
|
72
|
+
declare const enum Compounds {
|
73
|
+
Never = 0,
|
74
|
+
AtRules = 1,
|
75
|
+
StyleRules = 2
|
76
|
+
}
|
259
77
|
declare class Variants {
|
260
|
-
|
261
|
-
|
78
|
+
compareFns: Map<number, CompareFn>;
|
79
|
+
variants: Map<string, {
|
80
|
+
kind: Variant["kind"];
|
81
|
+
order: number;
|
82
|
+
applyFn: VariantFn<any>;
|
83
|
+
compoundsWith: Compounds;
|
84
|
+
compounds: Compounds;
|
85
|
+
}>;
|
262
86
|
private completions;
|
263
87
|
/**
|
264
88
|
* Registering a group of variants should result in the same sort number for
|
@@ -271,54 +95,131 @@ declare class Variants {
|
|
271
95
|
* avoid unnecessarily skipping order numbers.
|
272
96
|
*/
|
273
97
|
private lastOrder;
|
274
|
-
static(name: string, applyFn: VariantFn<'static'>, { compounds }?: {
|
275
|
-
compounds?:
|
98
|
+
static(name: string, applyFn: VariantFn<'static'>, { compounds, order }?: {
|
99
|
+
compounds?: Compounds;
|
100
|
+
order?: number;
|
276
101
|
}): void;
|
277
|
-
|
278
|
-
|
102
|
+
fromAst(name: string, ast: AstNode[]): void;
|
103
|
+
functional(name: string, applyFn: VariantFn<'functional'>, { compounds, order }?: {
|
104
|
+
compounds?: Compounds;
|
105
|
+
order?: number;
|
279
106
|
}): void;
|
280
|
-
compound(name: string, applyFn: VariantFn<'compound'>, { compounds }?: {
|
281
|
-
compounds?:
|
107
|
+
compound(name: string, compoundsWith: Compounds, applyFn: VariantFn<'compound'>, { compounds, order }?: {
|
108
|
+
compounds?: Compounds;
|
109
|
+
order?: number;
|
282
110
|
}): void;
|
283
111
|
group(fn: () => void, compareFn?: CompareFn): void;
|
284
112
|
has(name: string): boolean;
|
285
113
|
get(name: string): {
|
286
|
-
kind: "
|
114
|
+
kind: Variant["kind"];
|
287
115
|
order: number;
|
288
116
|
applyFn: VariantFn<any>;
|
289
|
-
|
117
|
+
compoundsWith: Compounds;
|
118
|
+
compounds: Compounds;
|
290
119
|
} | undefined;
|
291
|
-
kind(name: string): "
|
292
|
-
|
120
|
+
kind(name: string): "static" | "functional" | "arbitrary" | "compound";
|
121
|
+
compoundsWith(parent: string, child: string | Variant): boolean;
|
293
122
|
suggest(name: string, suggestions: () => string[]): void;
|
294
123
|
getCompletions(name: string): string[];
|
295
124
|
compare(a: Variant | null, z: Variant | null): number;
|
296
125
|
keys(): IterableIterator<string>;
|
297
126
|
entries(): IterableIterator<[string, {
|
298
|
-
kind: "
|
127
|
+
kind: Variant["kind"];
|
299
128
|
order: number;
|
300
129
|
applyFn: VariantFn<any>;
|
301
|
-
|
130
|
+
compoundsWith: Compounds;
|
131
|
+
compounds: Compounds;
|
302
132
|
}]>;
|
303
133
|
private set;
|
304
134
|
private nextOrder;
|
305
135
|
}
|
306
136
|
|
137
|
+
declare function compileAstNodes(candidate: Candidate, designSystem: DesignSystem): {
|
138
|
+
node: AstNode;
|
139
|
+
propertySort: number[];
|
140
|
+
}[];
|
141
|
+
|
142
|
+
interface ClassMetadata {
|
143
|
+
modifiers: string[];
|
144
|
+
}
|
145
|
+
type ClassEntry = [string, ClassMetadata];
|
146
|
+
interface SelectorOptions {
|
147
|
+
modifier?: string;
|
148
|
+
value?: string;
|
149
|
+
}
|
150
|
+
interface VariantEntry {
|
151
|
+
name: string;
|
152
|
+
isArbitrary: boolean;
|
153
|
+
values: string[];
|
154
|
+
hasDash: boolean;
|
155
|
+
selectors: (options: SelectorOptions) => string[];
|
156
|
+
}
|
157
|
+
|
158
|
+
type CompileFn<T extends Candidate['kind']> = (value: Extract<Candidate, {
|
159
|
+
kind: T;
|
160
|
+
}>) => AstNode[] | undefined | null;
|
161
|
+
interface SuggestionGroup {
|
162
|
+
supportsNegative?: boolean;
|
163
|
+
values: (string | null)[];
|
164
|
+
modifiers: string[];
|
165
|
+
}
|
166
|
+
type UtilityOptions = {
|
167
|
+
types: string[];
|
168
|
+
};
|
169
|
+
type Utility = {
|
170
|
+
kind: 'static' | 'functional';
|
171
|
+
compileFn: CompileFn<any>;
|
172
|
+
options?: UtilityOptions;
|
173
|
+
};
|
174
|
+
declare class Utilities {
|
175
|
+
private utilities;
|
176
|
+
private completions;
|
177
|
+
static(name: string, compileFn: CompileFn<'static'>): void;
|
178
|
+
functional(name: string, compileFn: CompileFn<'functional'>, options?: UtilityOptions): void;
|
179
|
+
has(name: string, kind: 'static' | 'functional'): boolean;
|
180
|
+
get(name: string): Utility[];
|
181
|
+
getCompletions(name: string): SuggestionGroup[];
|
182
|
+
suggest(name: string, groups: () => SuggestionGroup[]): void;
|
183
|
+
keys(kind: 'static' | 'functional'): string[];
|
184
|
+
}
|
185
|
+
|
307
186
|
type DesignSystem = {
|
308
187
|
theme: Theme;
|
309
188
|
utilities: Utilities;
|
310
189
|
variants: Variants;
|
311
|
-
|
190
|
+
invalidCandidates: Set<string>;
|
191
|
+
important: boolean;
|
312
192
|
getClassOrder(classes: string[]): [string, bigint | null][];
|
313
193
|
getClassList(): ClassEntry[];
|
314
194
|
getVariants(): VariantEntry[];
|
195
|
+
parseCandidate(candidate: string): Readonly<Candidate>[];
|
196
|
+
parseVariant(variant: string): Readonly<Variant> | null;
|
197
|
+
compileAstNodes(candidate: Candidate): ReturnType<typeof compileAstNodes>;
|
198
|
+
getVariantOrder(): Map<Variant, number>;
|
199
|
+
resolveThemeValue(path: string): string | undefined;
|
200
|
+
candidatesToCss(classes: string[]): (string | null)[];
|
315
201
|
};
|
316
202
|
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
203
|
+
type Config = UserConfig;
|
204
|
+
type CompileOptions = {
|
205
|
+
base?: string;
|
206
|
+
loadModule?: (id: string, base: string, resourceHint: 'plugin' | 'config') => Promise<{
|
207
|
+
module: Plugin | Config;
|
208
|
+
base: string;
|
209
|
+
}>;
|
210
|
+
loadStylesheet?: (id: string, base: string) => Promise<{
|
211
|
+
content: string;
|
212
|
+
base: string;
|
213
|
+
}>;
|
214
|
+
};
|
215
|
+
declare function compile(css: string, opts?: CompileOptions): Promise<{
|
216
|
+
globs: {
|
217
|
+
base: string;
|
218
|
+
pattern: string;
|
219
|
+
}[];
|
220
|
+
build(candidates: string[]): string;
|
221
|
+
}>;
|
222
|
+
declare function __unstable__loadDesignSystem(css: string, opts?: CompileOptions): Promise<DesignSystem>;
|
223
|
+
declare function postcssPluginWarning(): void;
|
323
224
|
|
324
|
-
export { __unstable__loadDesignSystem, compile,
|
225
|
+
export { type Config, __unstable__loadDesignSystem, compile, postcssPluginWarning as default };
|