transform-to-unocss-core 0.0.30 → 0.0.32

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/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
  从[transform-to-unocss](https://github.com/Simon-He95/transformToUnocss)中抽离出核心代码,方便直接在浏览器中调用
3
3
 
4
4
  ## Api
5
- - toUnocss
5
+ - toUnocss
6
6
  - 用于行内属性
7
7
  - 使用:toUnocss('width:100px', isRem) isRem 为true时,会将px转换为rem
8
8
  - transformStyleToUnocss
9
9
  - 用于行内属性
10
10
  - 使用:transformStyleToUnocss("width:100px;height:100px;") isRem 为true时,会将px转换为rem[100px]"
11
- - toUnocssClass
12
- - 用于类名
11
+ - toUnocssClass
12
+ - 用于类名
13
13
  - 使用:toUnocssClass('width:100px', isRem) isRem 为true时,isRem 为true时,会将px转换为rem
14
14
 
15
15
  ## License
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare function toUnocss(css: String, isRem?: boolean): any;
1
+ declare function toUnocss(css: string, isRem?: boolean): any;
2
2
 
3
3
  declare function toUnocssClass(css: string, isRem?: boolean): [string, string[]];
4
4
 
@@ -16,17 +16,17 @@ declare function isPercent(s: string): boolean;
16
16
  declare function isHex(hex: string): boolean;
17
17
  declare function isRgb(s: string): boolean;
18
18
  declare function isHsl(s: string): boolean;
19
- declare function getVal(val: string, transform?: Function, inClass?: boolean, prefix?: string): string;
19
+ declare function getVal(val: string, transform?: (v: string) => string, inClass?: boolean, prefix?: string): string;
20
20
  declare function getHundred(n: string | number): string | number;
21
21
  declare function joinWithLine(s: string): string;
22
22
  declare function joinWithUnderLine(s: string): string;
23
23
  declare const positionMap: string[];
24
- declare type TrimType = 'all' | 'pre' | 'around' | 'post';
24
+ type TrimType = 'all' | 'pre' | 'around' | 'post';
25
25
  /**
26
26
  * 删除空格
27
27
  * @param { string } s 字符串
28
28
  * @param { TrimType } type 所有 | 前置 | 前后 | 后置 'all' | 'pre' | 'around' | 'post'
29
- * @returns
29
+ * @returns string
30
30
  */
31
31
  declare function trim(s: string, type?: TrimType): string;
32
32
  declare function transformImportant(v: string): string[];
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var E=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var Gt=Object.prototype.hasOwnProperty;var Ot=(t,o)=>{for(var r in o)E(t,r,{get:o[r],enumerable:!0})},Dt=(t,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of Et(o))!Gt.call(t,e)&&e!==r&&E(t,e,{get:()=>o[e],enumerable:!(n=Bt(o,e))||n.enumerable});return t};var Kt=t=>Dt(E({},"__esModule",{value:!0}),t);var dr={};Ot(dr,{browserReg:()=>F,cssMathFnRE:()=>O,diffTemplateStyle:()=>Jt,flag:()=>Zt,getFirstName:()=>c,getHundred:()=>w,getLastName:()=>u,getStyleScoped:()=>Xt,getVal:()=>a,isCalc:()=>v,isColor:()=>Yt,isEmptyStyle:()=>Qt,isHex:()=>N,isHsl:()=>L,isNot:()=>qt,isPercent:()=>C,isRgb:()=>b,isSize:()=>K,isUrl:()=>y,isVar:()=>I,joinEmpty:()=>D,joinWithLine:()=>_,joinWithUnderLine:()=>j,numberWithUnitRE:()=>Y,positionMap:()=>k,toUnocss:()=>H,toUnocssClass:()=>Ht,transformImportant:()=>i,transformStyleToUnocss:()=>B,trim:()=>G});module.exports=Kt(dr);var Zt=".__unocss_transfer__",O=/^(?:calc|clamp|min|max)\s*\(.*\)/,Y=/^-?[0-9\.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function qt(t){return/\[&:not\(/.test(t)}function v(t){return O.test(t)}function c(t){return t.split("-")[0]}function u(t){let o=t.split("-");return o[o.length-1]}function y(t){return t.startsWith("url(")}function C(t){return t.endsWith("%")}function N(t){return/^#[0-9A-Fa-f]{2,}$/.test(t)}function b(t){return t.startsWith("rgb")}function L(t){return t.startsWith("hsl")}function a(t,o,r,n=""){return v(t)||y(t)||N(t)||b(t)||L(t)||C(t)||I(t)?r?`-[${n}${G(t,"all").replace(/['"]/g,"")}]`:`="[${n}${G(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${o?o(t):t}]`:`-${o?o(t):t}`}function w(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function _(t){return t.replace(/\s+/," ").split(" ").join("-")}function j(t){return t.replace(/\s+/," ").split(" ").join("_")}var k=["top","right","bottom","left","center"];function G(t,o="around"){return o==="pre"?t.replace(/(^\s*)/g,""):o==="post"?t.replace(/(\s*$)/g,""):o==="all"?t.replace(/\s+/g,""):o==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/var\([^\)]+\)/.test(t)&&(t=t.replace(/var\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*\!important/,"").trim(),"!"]:[t.trim(),""]}function Jt(t,o){let r=t.match(/<style scoped>.*<\/style>/s),n=o.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function Qt(t){return/<style scoped>[\n\s]*<\/style>/.test(t)}function Xt(t){let o=t.match(/<style scoped>(.*)<\/style>/s);return o?o[1]:""}function D(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function I(t){return t.startsWith("var(--")}function K(t){return O.test(t)||Y.test(t)||k.includes(t)}function Yt(t){return N(t)||b(t)||L(t)}var F=/-webkit-|-moz-|-ms-|-o-/g;function T(t,o){let[r,n]=i(o);return`${t[0]}${a(r,c)}${n}`}var yt=["background-color","background-attachment","background-position"],kt=/linear-gradient\(\s*to([\w\s]+),?([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,tr=/linear-gradient\(\s*([^,]*),?([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,rr=/(radial|conic)-gradient\(([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,W="__comma__";function q(t,o){let[r,n]=i(o);if(t==="background-size")return`bg${a(r,R,!1,"length:")}${n}`;if(yt.includes(t))return`bg${a(r,R)}${n}`;if(["background","background-image"].includes(t)){if(K(r))return`bg${a(r,R,!1,"position:")}${n}`;let e=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(e))return`bg="[${ir(r)}]"`;if(/^(linear)-gradient/.test(r)){let m=r.replace(/rgba?\(([^)]+)\)/g,(l,f)=>l.replace(f,f.replace(/\s*,\s*/g,W))),$=m.match(kt);if($){let[l,f,d,z]=$.slice(1);return l=l.split(" ").map(S=>S[0]).join(""),l?`bg-gradient-to-${l}${Z(f,d,z)}`:Z(f,d,z)}let g=m.match(tr);return g?`bg-gradient-linear bg-gradient-[${g[1]},${g[2].replace(/\s+/,"_").replaceAll(W,",")},${g[3].replace(/\s+/,"_").replaceAll(W,",")}]`:void 0}else if(/^(radial|conic)-gradient/.test(r)){let $=r.replace(/rgba?\(([^)]+)\)/g,(z,S)=>z.replace(S,S.replace(/\s*,\s*/g,W))).match(rr);if(!$)return;let g=$[1],[l,f,d]=$.slice(2);return`bg-gradient-${g}${Z(l,f,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let m=s[0];return`bg="${r.replace(m,`[${m}]`)}${n}"`}let p=r.match(/^url\(["'\s\.\-_\w\/@]*\)$/);if(p)return`bg="${r.replace(p[0],`[${p[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let m=r.split(" ").map(l=>q(t,`${l}${n?" !important":""}`)).join(" "),$=/bg-\[position:([^\]]*)\]/g,g=m.match($);if(g&&g.length>1){let l=`bg-[position:${g.map(f=>f.replace($,"$1")).join("_")}]`;m=`${m.replace($,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([l]).join(" ")}`}return m}return`bg${a(r,R)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${nr(t,r)}-${or(r)}${n}`}function nr(t,o){return o.endsWith("repeat")?"bg":t.replace("background","bg")}function or(t){return/(border)|(content)|(padding)-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):R(t)}function R(t){return t.replace(/\s+/," ").replace(" ","-")}function Z(t,o,r){let n="";if(o&&!r&&(r=o,o=""),t){t=t.replaceAll(W,",");let[e,s]=t.split(" ");s?n+=` from="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` from="${b(e)?`[${e}]`:e}"`)}if(o){o=o.replaceAll(W,",");let[e,s]=o.split(" ");s?n+=` via="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` via="${b(e)?`[${e}]`:e}"`)}if(r){r=r.replaceAll(W,",");let[e,s]=r.split(" ");s?n+=` to="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` to="${b(e)?`[${e}]`:e}"`)}return n}var tt="__transform_to_unocss__";function ir(t){let o={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\([\)]*\)/,n=>(o[r++]=n,`${tt}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(o).forEach(n=>{t=t.replace(`${tt}${n}}`,o[n])}),t}function J(t,o){let[r,n]=i(o),e=t.split("-"),s=v(r)||I(r)?a(r):a(c(r));return`${e[0]}-${e[1][0]}${s}${n}`}function rt(t,o){let[r,n]=i(o);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let e=r.match(/ui-(\w{0,4})/);if(!e)return`font-${o}${n}`;let[s,p]=e;return`font-${p}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${er(r)}${n}"`}function er(t){return t.split(" ").map(o=>/^[0-9]/.test(o)?`text-${o}`:o).join(" ")}function nt(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}var sr={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function Q(t,o){let[r,n]=i(o),e=sr[t];if(e)return`${e}${a(r)}${n}`;let s=r.split(" "),p=s.length;return p===1?`${t[0]}${a(s[0])}${n}`:p===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:p===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function ot(t,o){let[r,n]=i(o);return C(o)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function it(t,o){let[r,n]=i(o);return`text${a(r)}${n}`}function et(t,o){let[r,n]=i(o);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function st(t,o){let[r,n]=i(o);return`v-${r}${n}`}var at={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function mt(t,o){let[r,n]=i(o);return r in at?`lh-${at[r]}${n}`:`lh${a(r)}${n}`}var pt=["border-top","border-right","border-bottom","border-left"];function ct(t,o){let[r,n]=i(o);if(t==="border-spacing")return`${t}="[${j(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let e=r.split(" ").length,s=r.split(" ").map(l=>N(l)||b(l)||L(l)?`-[${l}]`:`-${l}`),[p,m,$,g]=s;switch(e){case 2:return`border-y${p}${n} border-x${m}${n}`;case 3:return`border-t${p}${n} border-b${$}${n} border-x${m}${n}`;case 4:return`border-t${p}${n} border-b${$}${n} border-r${m}${n} border-l${g}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?v(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${j(r)}]${n}"`:pt.some(e=>t.startsWith(e))?r.split(" ").map(e=>`border-${t.split("-")[1][0]}${a(e)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((e,s)=>`border-${pt[s].split("-")[1][0]}${a(e)}${n}`).join(" "):/^\d[%|(px)|(rem)]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(e=>r==="currentColor"?`border-current${n}`:`border${a(e)}${n}`).join(" ")}function U(t,o){let[r,n]=i(o);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}function x(t,o){let[r,n]=i(o);return`${t}-${r}${n}`}function V(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}function h(t,o){let[r,n]=i(o);return`${c(t)}${a(r)}${n}`}var ar=["box-shadow","drop-shadow"];function A(t,o){let[r,n]=i(o);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${c(r)}${n}`;if(ar.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var mr=["contrast","brightness","saturate"],pr=["grayscale","invert","sepia"];function M(t,o){let[r,n]=i(o),[e,s,p]=r.match(/([\w-]+)\((.*)\)/);return mr.includes(s)?`${s}-${w(p)}${n}`:s==="drop-shadow"?`drop-${A(s,p)}${n}`:pr.includes(s)?`${s}-${p.endsWith("%")?p.slice(0,-1):w(p)}${n}`:s==="hue-rotate"?`${s}-${p.slice(0,-3)}${n}`:`${s}-${p}${n}`}function ft(t,o){let[r,n]=i(o);return`backdrop-${M(t,r)}${n}`}function lt(t,o){let[r,n]=i(o);return t==="transform-origin"?`origin-${_(r)}${n}`:t==="transform-style"?`transform-${r}`:D(r).split(" ").map(e=>{let s=e.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[p,m,$,g,l]=s;if(g){let f=l.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?`${m}-${g.toLowerCase()}="${f.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):P(d)).join(" ")}${n}"`:`${m}="${g.toLowerCase()}-${I(f[0])?`[${f[0]}]`:m==="scale"?w(f[0]):P(f[0])}${n}"`}else{let f=l.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?m==="translate"?`${m}="[${f.join(",")}]"`:`${m}="${f.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):P(d)).join(" ")}${n}"`:`${m}="${I(f[0])?`[${f[0]}]`:m==="scale"?w(f[0]):P(f[0])}${n}"`}}).filter(Boolean).join(" ")}function P(t){return t.endsWith("deg")?t.slice(0,-3):t}var cr=["transition-delay","transition-duration"];function ut(t,o){let[r,n]=i(o);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${fr(r)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(cr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function fr(t){let o=!1;return t.split(" ").map(r=>/^[0-9]/.test(r)||/^\.[0-9]/.test(r)?o?`delay${a(r,void 0,!0)}`:(o=!0,`duration${a(r,void 0,!0)}`):r==="background-color"?"colors":r).join(" ")}function $t(t,o){let[r,n]=i(o);return t==="justify-content"?`justify-${u(r)}${n}`:`${t}-${u(r)}${n}`}function gt(t,o){let[r,n]=i(o);return`${u(t)}-${u(r)}${n}`}var lr=["flex-basis","flex-grow","flex-shrink"];function dt(t,o){let[r,n]=i(o);if(lr.includes(t))return`${u(t)}-${r}${n}`;if(r==="1")return`flex-1${n}`;let e=r[0];return t==="flex"&&(e==="0"||e==="1")?`flex="[${j(r)}]${n}"`:`${c(t)}-${r.replace("column","col")}${n}`}function bt(t,o){let[r,n]=i(o);return r==="auto"?`${c(t)}-${r}`:`${c(t)}="[${r}]${n}"`}function xt(t,o){let[r,n]=i(o);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function ht(t,o){let[r,n]=i(o);return o==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function wt(t,o){let[r,n]=i(o);return t==="object-position"?`${c(t)}-${_(r)}${n}`:`${c(t)}-${r}${n}`}function It(t,o){let[r,n]=i(o),[e,s,p]=t.split("-");return p?`${e}-${p}-${r}${n}`:`${e}-${r}${n}`}function jt(t,o){let[r,n]=i(o);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*([0-9]+)/);return s?`grid-${u(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${u(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${j(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${_(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${u(t)==="rows"?"rows":"cols"}-${s?"fr":c(r)}${n}`}let e=r.match(/span\s+([0-9])/);return e?`${t.slice(5).replace("column","col")}-span-${e[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function _t(t,o){let[r,n]=i(o);return`gap-y-${r}${n}`}function Wt(t,o){let[r,n]=i(o);return`${t}-${u(r)}${n}`}function vt(t,o){let[r,n]=i(o);return`tracking-${r}${n}`}function Vt(t,o){let[r,n]=i(o);return`whitespace-${r}${n}`}function Nt(t,o){let[r,n]=i(o);return t.startsWith("word-spacing")?`word-spacing${a(o)}`:r==="keep-all"?`break-keep${n}`:`break-${u(r)}${n}`}function Lt(t,o){let[r,n]=i(o);return t==="outline-offset"?`${t}-${r}${n}`:`${c(t)}-${r}${n}`}function Ft(t,o){let[r,n]=i(o);return`mix-blend-${r}${n}`}var ur={vertical:"y",horizontal:"x"};function Rt(t,o){let[r,n]=i(o);return r==="both"?`${t}${n}`:`${t}-${ur[r]||r}${n}`}function zt(t,o){let[r,n]=i(o);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[e,s,p,m]=t.match(/scroll-(margin|padding)-?([\w]+)?-?([\w]+)?/);return p==="inline"&&m?`scroll-${s[0]}${m[0]}-${r}${n}`:p?`scroll-${s[0]}${p[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function St(t,o){let[r,n]=i(o);return`${u(t)}-${r}${n}`}function Ct(t,o){let[r,n]=i(o);return`${t}-${c(r)}${n}`}function Tt(t,o){let[r,n]=i(o);return t==="animation-delay"?`animate${a(r)}${n}`:t==="animation"?`animate-${r.split(" ")[0]}${n}`:`animate-${r}${n}`}function Ut(t,o){let[r,n]=i(o);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}var $r={show:"visible",hide:"hidden"};function At(t,o){var e;let[r,n]=i(o);return`table-empty-cells-${(e=$r[r])!=null?e:r}${n}`}function Mt(t,o){return o==="horizontal-tb"?"write-normal":`write-${o.replace("-rl","-right").replace("-lr","-left")}`}function Pt(t,o){let[r,n]=i(o);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}var X={animation:Tt,aspect:bt,backface:h,caption:h,column:xt,columns:x,break:x,empty:At,box:A,writing:Mt,display:U,float:x,clear:x,isolation:ht,object:wt,overflow:x,overscroll:It,position:U,top:V,left:V,right:V,bottom:V,visibility:U,z:T,flex:dt,order:x,grid:jt,gap:V,justify:$t,align:gt,place:Wt,padding:Q,perspective:x,margin:Q,width:T,min:J,max:J,height:T,font:rt,letter:vt,line:mt,list:h,text:et,vertical:st,white:Vt,word:Nt,content:Ut,background:q,border:ct,outline:Lt,opacity:ot,mix:Ft,filter:M,backdrop:ft,table:h,transition:ut,transform:lt,accent:h,appearance:h,cursor:nt,caret:h,pointer:x,resize:Rt,scroll:zt,inset:Pt,touch:h,user:St,will:Ct,fill:x,stroke:h,color:it,row:_t},gr=/([\w-]+)\s*:\s*([.\w\(\)-\s%+'",#\/!@]+)/;function H(t,o=!1){var $;t=t.replace(F,"");let r=t.match(gr);if(!r)return;let[n,e,s]=r,p=c(e),m=($=X[p])==null?void 0:$.call(X,e,s);return m&&o?m.replace(/-([0-9\.]+)px/,(g,l)=>`-${+l/4}`):m}function B(t,o){let r=[],n=new Set;return[t.split(";").filter(Boolean).reduce((e,s)=>{let p=s.replaceAll(F,"").trim();if(n.has(p))return e;n.add(p);let m=H(s,o)||"";return m||r.push(s),e+=`${m} `},"").trim().replace(/\s+/g," "),r]}function Ht(t,o=!1){let[r,n]=B(t,o);return[r?r.replace(/([^\s\=]+)="([^"]+)"/g,(e,s,p)=>p.split(" ").map(m=>`${s}-${m}`).join(" ")):"",n]}0&&(module.exports={browserReg,cssMathFnRE,diffTemplateStyle,flag,getFirstName,getHundred,getLastName,getStyleScoped,getVal,isCalc,isColor,isEmptyStyle,isHex,isHsl,isNot,isPercent,isRgb,isSize,isUrl,isVar,joinEmpty,joinWithLine,joinWithUnderLine,numberWithUnitRE,positionMap,toUnocss,toUnocssClass,transformImportant,transformStyleToUnocss,trim});
1
+ "use strict";var E=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var Gt=Object.prototype.hasOwnProperty;var Ot=(t,o)=>{for(var r in o)E(t,r,{get:o[r],enumerable:!0})},Dt=(t,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of Et(o))!Gt.call(t,e)&&e!==r&&E(t,e,{get:()=>o[e],enumerable:!(n=Bt(o,e))||n.enumerable});return t};var Kt=t=>Dt(E({},"__esModule",{value:!0}),t);var dr={};Ot(dr,{browserReg:()=>F,cssMathFnRE:()=>O,diffTemplateStyle:()=>Jt,flag:()=>Zt,getFirstName:()=>f,getHundred:()=>w,getLastName:()=>$,getStyleScoped:()=>Xt,getVal:()=>a,isCalc:()=>v,isColor:()=>Yt,isEmptyStyle:()=>Qt,isHex:()=>N,isHsl:()=>L,isNot:()=>qt,isPercent:()=>S,isRgb:()=>b,isSize:()=>K,isUrl:()=>y,isVar:()=>I,joinEmpty:()=>D,joinWithLine:()=>_,joinWithUnderLine:()=>j,numberWithUnitRE:()=>Y,positionMap:()=>k,toUnocss:()=>H,toUnocssClass:()=>Ht,transformImportant:()=>i,transformStyleToUnocss:()=>B,trim:()=>G});module.exports=Kt(dr);var Zt=".__unocss_transfer__",O=/^(?:calc|clamp|min|max)\s*\(.*\)/,Y=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function qt(t){return/\[&:not\(/.test(t)}function v(t){return O.test(t)}function f(t){return t.split("-")[0]}function $(t){let o=t.split("-");return o[o.length-1]}function y(t){return t.startsWith("url(")}function S(t){return t.endsWith("%")}function N(t){return/^#[0-9A-F]{2,}$/i.test(t)}function b(t){return t.startsWith("rgb")}function L(t){return t.startsWith("hsl")}function a(t,o,r,n=""){return v(t)||y(t)||N(t)||b(t)||L(t)||S(t)||I(t)?r?`-[${n}${G(t,"all").replace(/['"]/g,"")}]`:`="[${n}${G(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${o?o(t):t}]`:`-${o?o(t):t}`}function w(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function _(t){return t.replace(/\s+/," ").split(" ").join("-")}function j(t){return t.replace(/\s+/," ").split(" ").join("_")}var k=["top","right","bottom","left","center"];function G(t,o="around"){return o==="pre"?t.replace(/(^\s*)/g,""):o==="post"?t.replace(/(\s*$)/g,""):o==="all"?t.replace(/\s+/g,""):o==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function Jt(t,o){let r=t.match(/<style scoped>.*<\/style>/s),n=o.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function Qt(t){return/<style scoped>\s*<\/style>/.test(t)}function Xt(t){let o=t.match(/<style scoped>(.*)<\/style>/s);return o?o[1]:""}function D(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function I(t){return t.startsWith("var(--")}function K(t){return O.test(t)||Y.test(t)||k.includes(t)}function Yt(t){return N(t)||b(t)||L(t)}var F=/-webkit-|-moz-|-ms-|-o-/g;function T(t,o){let[r,n]=i(o);return`${t[0]}${a(r,f)}${n}`}var yt=["background-color","background-attachment","background-position"],kt=/linear-gradient\(\s*to([\w\s]+),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,tr=/linear-gradient\(\s*([^,]*),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,rr=/(radial|conic)-gradient\(([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,W="__comma__";function q(t,o){let[r,n]=i(o);if(t==="background-size")return`bg${a(r,R,!1,"length:")}${n}`;if(yt.includes(t))return`bg${a(r,R)}${n}`;if(["background","background-image"].includes(t)){if(K(r))return`bg${a(r,R,!1,"position:")}${n}`;let e=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(e))return`bg="[${ir(r)}]"`;if(r.startsWith("linear-gradient")){let m=r.replace(/rgba?\(([^)]+)\)/g,(l,c)=>l.replace(c,c.replace(/\s*,\s*/g,W))),g=m.match(kt);if(g){let[l,c,d,z]=g.slice(1);return l=l.split(" ").map(C=>C[0]).join(""),l?`bg-gradient-to-${l}${Z(c,d,z)}`:Z(c,d,z)}let u=m.match(tr);return u?`bg-gradient-linear bg-gradient-[${u[1]},${u[2].replace(/\s+/,"_").replaceAll(W,",")},${u[3].replace(/\s+/,"_").replaceAll(W,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let g=r.replace(/rgba?\(([^)]+)\)/g,(z,C)=>z.replace(C,C.replace(/\s*,\s*/g,W))).match(rr);if(!g)return;let u=g[1],[l,c,d]=g.slice(2);return`bg-gradient-${u}${Z(l,c,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let m=s[0];return`bg="${r.replace(m,`[${m}]`)}${n}"`}let p=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(p)return`bg="${r.replace(p[0],`[${p[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let m=r.split(" ").map(l=>q(t,`${l}${n?" !important":""}`)).join(" "),g=/bg-\[position:([^\]]*)\]/g,u=m.match(g);if(u&&u.length>1){let l=`bg-[position:${u.map(c=>c.replace(g,"$1")).join("_")}]`;m=`${m.replace(g,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([l]).join(" ")}`}return m}return`bg${a(r,R)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${nr(t,r)}-${or(r)}${n}`}function nr(t,o){return o.endsWith("repeat")?"bg":t.replace("background","bg")}function or(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):R(t)}function R(t){return t.replace(/\s+/," ").replace(" ","-")}function Z(t,o,r){let n="";if(o&&!r&&(r=o,o=""),t){t=t.replaceAll(W,",");let[e,s]=t.split(" ");s?n+=` from="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` from="${b(e)?`[${e}]`:e}"`)}if(o){o=o.replaceAll(W,",");let[e,s]=o.split(" ");s?n+=` via="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` via="${b(e)?`[${e}]`:e}"`)}if(r){r=r.replaceAll(W,",");let[e,s]=r.split(" ");s?n+=` to="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` to="${b(e)?`[${e}]`:e}"`)}return n}var tt="__transform_to_unocss__";function ir(t){let o={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(o[r++]=n,`${tt}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(o).forEach(n=>{t=t.replace(`${tt}${n}}`,o[n])}),t}function J(t,o){let[r,n]=i(o),e=t.split("-"),s=v(r)||I(r)?a(r):a(f(r));return`${e[0]}-${e[1][0]}${s}${n}`}function rt(t,o){let[r,n]=i(o);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let e=r.match(/ui-(\w{0,4})/);if(!e)return`font-${o}${n}`;let[s,p]=e;return`font-${p}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${er(r)}${n}"`}function er(t){return t.split(" ").map(o=>/^\d/.test(o)?`text-${o}`:o).join(" ")}function nt(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}var sr={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function Q(t,o){let[r,n]=i(o),e=sr[t];if(e)return`${e}${a(r)}${n}`;let s=r.split(" "),p=s.length;return p===1?`${t[0]}${a(s[0])}${n}`:p===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:p===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function ot(t,o){let[r,n]=i(o);return S(o)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function it(t,o){let[r,n]=i(o);return`text${a(r)}${n}`}function et(t,o){let[r,n]=i(o);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function st(t,o){let[r,n]=i(o);return`v-${r}${n}`}var at={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function mt(t,o){let[r,n]=i(o);return r in at?`lh-${at[r]}${n}`:`lh${a(r)}${n}`}var pt=["border-top","border-right","border-bottom","border-left"];function ct(t,o){let[r,n]=i(o);if(t==="border-spacing")return`${t}="[${j(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let e=r.split(" ").length,s=r.split(" ").map(l=>N(l)||b(l)||L(l)?`-[${l}]`:`-${l}`),[p,m,g,u]=s;switch(e){case 2:return`border-y${p}${n} border-x${m}${n}`;case 3:return`border-t${p}${n} border-b${g}${n} border-x${m}${n}`;case 4:return`border-t${p}${n} border-b${g}${n} border-r${m}${n} border-l${u}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?v(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${j(r)}]${n}"`:pt.some(e=>t.startsWith(e))?r.split(" ").map(e=>`border-${t.split("-")[1][0]}${a(e)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((e,s)=>`border-${pt[s].split("-")[1][0]}${a(e)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(e=>r==="currentColor"?`border-current${n}`:`border${a(e)}${n}`).join(" ")}function U(t,o){let[r,n]=i(o);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}function x(t,o){let[r,n]=i(o);return`${t}-${r}${n}`}function V(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}function h(t,o){let[r,n]=i(o);return`${f(t)}${a(r)}${n}`}var ar=["box-shadow","drop-shadow"];function A(t,o){let[r,n]=i(o);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${f(r)}${n}`;if(ar.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var mr=["contrast","brightness","saturate"],pr=["grayscale","invert","sepia"];function M(t,o){let[r,n]=i(o),[e,s,p]=r.match(/([\w-]+)\((.*)\)/);return mr.includes(s)?`${s}-${w(p)}${n}`:s==="drop-shadow"?`drop-${A(s,p)}${n}`:pr.includes(s)?`${s}-${p.endsWith("%")?p.slice(0,-1):w(p)}${n}`:s==="hue-rotate"?`${s}-${p.slice(0,-3)}${n}`:`${s}-${p}${n}`}function ft(t,o){let[r,n]=i(o);return`backdrop-${M(t,r)}${n}`}function lt(t,o){let[r,n]=i(o);return t==="transform-origin"?`origin-${_(r)}${n}`:t==="transform-style"?`transform-${r}`:D(r).split(" ").map(e=>{let s=e.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[p,m,g,u,l]=s;if(u){let c=l.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?`${m}-${u.toLowerCase()}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):P(d)).join(" ")}${n}"`:`${m}="${u.toLowerCase()}-${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):P(c[0])}${n}"`}else{let c=l.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?m==="translate"?`${m}="[${c.join(",")}]"`:`${m}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):P(d)).join(" ")}${n}"`:`${m}="${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):P(c[0])}${n}"`}}).filter(Boolean).join(" ")}function P(t){return t.endsWith("deg")?t.slice(0,-3):t}var cr=["transition-delay","transition-duration"];function ut(t,o){let[r,n]=i(o);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${fr(r)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(cr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function fr(t){let o=!1;return t.split(" ").map(r=>/^\d/.test(r)||/^\.\d/.test(r)?o?`delay${a(r,void 0,!0)}`:(o=!0,`duration${a(r,void 0,!0)}`):r==="background-color"?"colors":r).join(" ")}function $t(t,o){let[r,n]=i(o);return t==="justify-content"?`justify-${$(r)}${n}`:`${t}-${$(r)}${n}`}function gt(t,o){let[r,n]=i(o);return`${$(t)}-${$(r)}${n}`}var lr=["flex-basis","flex-grow","flex-shrink"];function dt(t,o){let[r,n]=i(o);if(lr.includes(t))return`${$(t)}-${r}${n}`;if(r==="1")return`flex-1${n}`;let e=r[0];return t==="flex"&&(e==="0"||e==="1")?`flex="[${j(r)}]${n}"`:`${f(t)}-${r.replace("column","col")}${n}`}function bt(t,o){let[r,n]=i(o);return r==="auto"?`${f(t)}-${r}`:`${f(t)}="[${r}]${n}"`}function xt(t,o){let[r,n]=i(o);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function ht(t,o){let[r,n]=i(o);return o==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function wt(t,o){let[r,n]=i(o);return t==="object-position"?`${f(t)}-${_(r)}${n}`:`${f(t)}-${r}${n}`}function It(t,o){let[r,n]=i(o),[e,s,p]=t.split("-");return p?`${e}-${p}-${r}${n}`:`${e}-${r}${n}`}function jt(t,o){let[r,n]=i(o);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*(\d+)/);return s?`grid-${$(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${$(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${j(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${_(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${$(t)==="rows"?"rows":"cols"}-${s?"fr":f(r)}${n}`}let e=r.match(/span\s+(\d)/);return e?`${t.slice(5).replace("column","col")}-span-${e[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function _t(t,o){let[r,n]=i(o);return`gap-y-${r}${n}`}function Wt(t,o){let[r,n]=i(o);return`${t}-${$(r)}${n}`}function vt(t,o){let[r,n]=i(o);return`tracking-${r}${n}`}function Vt(t,o){let[r,n]=i(o);return`whitespace-${r}${n}`}function Nt(t,o){let[r,n]=i(o);return t.startsWith("word-spacing")?`word-spacing${a(o)}`:r==="keep-all"?`break-keep${n}`:`break-${$(r)}${n}`}function Lt(t,o){let[r,n]=i(o);return t==="outline-offset"?`${t}-${r}${n}`:`${f(t)}-${r}${n}`}function Ft(t,o){let[r,n]=i(o);return`mix-blend-${r}${n}`}var ur={vertical:"y",horizontal:"x"};function Rt(t,o){let[r,n]=i(o);return r==="both"?`${t}${n}`:`${t}-${ur[r]||r}${n}`}function zt(t,o){let[r,n]=i(o);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[e,s,p,m]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return p==="inline"&&m?`scroll-${s[0]}${m[0]}-${r}${n}`:p?`scroll-${s[0]}${p[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function Ct(t,o){let[r,n]=i(o);return`${$(t)}-${r}${n}`}function St(t,o){let[r,n]=i(o);return`${t}-${f(r)}${n}`}function Tt(t,o){let[r,n]=i(o);return t==="animation-delay"?`animate${a(r)}${n}`:t==="animation"?`animate-${r.split(" ")[0]}${n}`:`animate-${r}${n}`}function Ut(t,o){let[r,n]=i(o);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}var $r={show:"visible",hide:"hidden"};function At(t,o){var e;let[r,n]=i(o);return`table-empty-cells-${(e=$r[r])!=null?e:r}${n}`}function Mt(t,o){return o==="horizontal-tb"?"write-normal":`write-${o.replace("-rl","-right").replace("-lr","-left")}`}function Pt(t,o){let[r,n]=i(o);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}var X={animation:Tt,aspect:bt,backface:h,caption:h,column:xt,columns:x,break:x,empty:At,box:A,writing:Mt,display:U,float:x,clear:x,isolation:ht,object:wt,overflow:x,overscroll:It,position:U,top:V,left:V,right:V,bottom:V,visibility:U,z:T,flex:dt,order:x,grid:jt,gap:V,justify:$t,align:gt,place:Wt,padding:Q,perspective:x,margin:Q,width:T,min:J,max:J,height:T,font:rt,letter:vt,line:mt,list:h,text:et,vertical:st,white:Vt,word:Nt,content:Ut,background:q,border:ct,outline:Lt,opacity:ot,mix:Ft,filter:M,backdrop:ft,table:h,transition:ut,transform:lt,accent:h,appearance:h,cursor:nt,caret:h,pointer:x,resize:Rt,scroll:zt,inset:Pt,touch:h,user:Ct,will:St,fill:x,stroke:h,color:it,row:_t},gr=/([\w-]+)\s*:\s*([.\w()-\s%+'",#/!@]+)/;function H(t,o=!1){var g;t=t.replace(F,"");let r=t.match(gr);if(!r)return;let[n,e,s]=r,p=f(e),m=(g=X[p])==null?void 0:g.call(X,e,s);return m&&o?m.replace(/-([0-9.]+)px/,(u,l)=>`-${+l/4}`).replace(/\[[^\]]+\]/g,u=>u.replace(/([0-9.]+)px/g,(l,c)=>`${+c/16}rem`)):m}function B(t,o){let r=[],n=new Set;return[t.split(";").filter(Boolean).reduce((e,s)=>{let p=s.replaceAll(F,"").trim();if(n.has(p))return e;n.add(p);let m=H(s,o)||"";return m||r.push(s),e+=`${m} `},"").trim().replace(/\s+/g," "),r]}function Ht(t,o=!1){let[r,n]=B(t,o);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(e,s,p)=>p.split(" ").map(m=>`${s}-${m}`).join(" ")):"",n]}0&&(module.exports={browserReg,cssMathFnRE,diffTemplateStyle,flag,getFirstName,getHundred,getLastName,getStyleScoped,getVal,isCalc,isColor,isEmptyStyle,isHex,isHsl,isNot,isPercent,isRgb,isSize,isUrl,isVar,joinEmpty,joinWithLine,joinWithUnderLine,numberWithUnitRE,positionMap,toUnocss,toUnocssClass,transformImportant,transformStyleToUnocss,trim});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var or=".__unocss_transfer__",q=/^(?:calc|clamp|min|max)\s*\(.*\)/,Ut=/^-?[0-9\.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function ir(t){return/\[&:not\(/.test(t)}function V(t){return q.test(t)}function f(t){return t.split("-")[0]}function u(t){let o=t.split("-");return o[o.length-1]}function At(t){return t.startsWith("url(")}function P(t){return t.endsWith("%")}function R(t){return/^#[0-9A-Fa-f]{2,}$/.test(t)}function b(t){return t.startsWith("rgb")}function z(t){return t.startsWith("hsl")}function a(t,o,r,n=""){return V(t)||At(t)||R(t)||b(t)||z(t)||P(t)||I(t)?r?`-[${n}${Z(t,"all").replace(/['"]/g,"")}]`:`="[${n}${Z(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${o?o(t):t}]`:`-${o?o(t):t}`}function w(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function W(t){return t.replace(/\s+/," ").split(" ").join("-")}function j(t){return t.replace(/\s+/," ").split(" ").join("_")}var Mt=["top","right","bottom","left","center"];function Z(t,o="around"){return o==="pre"?t.replace(/(^\s*)/g,""):o==="post"?t.replace(/(\s*$)/g,""):o==="all"?t.replace(/\s+/g,""):o==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/var\([^\)]+\)/.test(t)&&(t=t.replace(/var\(([^\)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*\!important/,"").trim(),"!"]:[t.trim(),""]}function er(t,o){let r=t.match(/<style scoped>.*<\/style>/s),n=o.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function sr(t){return/<style scoped>[\n\s]*<\/style>/.test(t)}function ar(t){let o=t.match(/<style scoped>(.*)<\/style>/s);return o?o[1]:""}function J(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function I(t){return t.startsWith("var(--")}function Q(t){return q.test(t)||Ut.test(t)||Mt.includes(t)}function mr(t){return R(t)||b(t)||z(t)}var S=/-webkit-|-moz-|-ms-|-o-/g;function C(t,o){let[r,n]=i(o);return`${t[0]}${a(r,f)}${n}`}var Pt=["background-color","background-attachment","background-position"],Ht=/linear-gradient\(\s*to([\w\s]+),?([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,Bt=/linear-gradient\(\s*([^,]*),?([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,Et=/(radial|conic)-gradient\(([\w\(\)#%\s\.]+)?,([\w\(\)#%\s\.]+)?,?([\w#%\s\.]+)?\)$/,_="__comma__";function B(t,o){let[r,n]=i(o);if(t==="background-size")return`bg${a(r,N,!1,"length:")}${n}`;if(Pt.includes(t))return`bg${a(r,N)}${n}`;if(["background","background-image"].includes(t)){if(Q(r))return`bg${a(r,N,!1,"position:")}${n}`;let e=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(e))return`bg="[${Dt(r)}]"`;if(/^(linear)-gradient/.test(r)){let m=r.replace(/rgba?\(([^)]+)\)/g,(l,c)=>l.replace(c,c.replace(/\s*,\s*/g,_))),$=m.match(Ht);if($){let[l,c,d,L]=$.slice(1);return l=l.split(" ").map(F=>F[0]).join(""),l?`bg-gradient-to-${l}${H(c,d,L)}`:H(c,d,L)}let g=m.match(Bt);return g?`bg-gradient-linear bg-gradient-[${g[1]},${g[2].replace(/\s+/,"_").replaceAll(_,",")},${g[3].replace(/\s+/,"_").replaceAll(_,",")}]`:void 0}else if(/^(radial|conic)-gradient/.test(r)){let $=r.replace(/rgba?\(([^)]+)\)/g,(L,F)=>L.replace(F,F.replace(/\s*,\s*/g,_))).match(Et);if(!$)return;let g=$[1],[l,c,d]=$.slice(2);return`bg-gradient-${g}${H(l,c,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let m=s[0];return`bg="${r.replace(m,`[${m}]`)}${n}"`}let p=r.match(/^url\(["'\s\.\-_\w\/@]*\)$/);if(p)return`bg="${r.replace(p[0],`[${p[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let m=r.split(" ").map(l=>B(t,`${l}${n?" !important":""}`)).join(" "),$=/bg-\[position:([^\]]*)\]/g,g=m.match($);if(g&&g.length>1){let l=`bg-[position:${g.map(c=>c.replace($,"$1")).join("_")}]`;m=`${m.replace($,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([l]).join(" ")}`}return m}return`bg${a(r,N)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${Gt(t,r)}-${Ot(r)}${n}`}function Gt(t,o){return o.endsWith("repeat")?"bg":t.replace("background","bg")}function Ot(t){return/(border)|(content)|(padding)-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):N(t)}function N(t){return t.replace(/\s+/," ").replace(" ","-")}function H(t,o,r){let n="";if(o&&!r&&(r=o,o=""),t){t=t.replaceAll(_,",");let[e,s]=t.split(" ");s?n+=` from="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` from="${b(e)?`[${e}]`:e}"`)}if(o){o=o.replaceAll(_,",");let[e,s]=o.split(" ");s?n+=` via="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` via="${b(e)?`[${e}]`:e}"`)}if(r){r=r.replaceAll(_,",");let[e,s]=r.split(" ");s?n+=` to="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` to="${b(e)?`[${e}]`:e}"`)}return n}var X="__transform_to_unocss__";function Dt(t){let o={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\([\)]*\)/,n=>(o[r++]=n,`${X}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(o).forEach(n=>{t=t.replace(`${X}${n}}`,o[n])}),t}function E(t,o){let[r,n]=i(o),e=t.split("-"),s=V(r)||I(r)?a(r):a(f(r));return`${e[0]}-${e[1][0]}${s}${n}`}function Y(t,o){let[r,n]=i(o);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let e=r.match(/ui-(\w{0,4})/);if(!e)return`font-${o}${n}`;let[s,p]=e;return`font-${p}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${Kt(r)}${n}"`}function Kt(t){return t.split(" ").map(o=>/^[0-9]/.test(o)?`text-${o}`:o).join(" ")}function y(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}var Zt={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function G(t,o){let[r,n]=i(o),e=Zt[t];if(e)return`${e}${a(r)}${n}`;let s=r.split(" "),p=s.length;return p===1?`${t[0]}${a(s[0])}${n}`:p===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:p===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function k(t,o){let[r,n]=i(o);return P(o)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function tt(t,o){let[r,n]=i(o);return`text${a(r)}${n}`}function rt(t,o){let[r,n]=i(o);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function nt(t,o){let[r,n]=i(o);return`v-${r}${n}`}var ot={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function it(t,o){let[r,n]=i(o);return r in ot?`lh-${ot[r]}${n}`:`lh${a(r)}${n}`}var et=["border-top","border-right","border-bottom","border-left"];function st(t,o){let[r,n]=i(o);if(t==="border-spacing")return`${t}="[${j(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let e=r.split(" ").length,s=r.split(" ").map(l=>R(l)||b(l)||z(l)?`-[${l}]`:`-${l}`),[p,m,$,g]=s;switch(e){case 2:return`border-y${p}${n} border-x${m}${n}`;case 3:return`border-t${p}${n} border-b${$}${n} border-x${m}${n}`;case 4:return`border-t${p}${n} border-b${$}${n} border-r${m}${n} border-l${g}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?V(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${j(r)}]${n}"`:et.some(e=>t.startsWith(e))?r.split(" ").map(e=>`border-${t.split("-")[1][0]}${a(e)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((e,s)=>`border-${et[s].split("-")[1][0]}${a(e)}${n}`).join(" "):/^\d[%|(px)|(rem)]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(e=>r==="currentColor"?`border-current${n}`:`border${a(e)}${n}`).join(" ")}function T(t,o){let[r,n]=i(o);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}function x(t,o){let[r,n]=i(o);return`${t}-${r}${n}`}function v(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}function h(t,o){let[r,n]=i(o);return`${f(t)}${a(r)}${n}`}var qt=["box-shadow","drop-shadow"];function U(t,o){let[r,n]=i(o);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${f(r)}${n}`;if(qt.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var Jt=["contrast","brightness","saturate"],Qt=["grayscale","invert","sepia"];function A(t,o){let[r,n]=i(o),[e,s,p]=r.match(/([\w-]+)\((.*)\)/);return Jt.includes(s)?`${s}-${w(p)}${n}`:s==="drop-shadow"?`drop-${U(s,p)}${n}`:Qt.includes(s)?`${s}-${p.endsWith("%")?p.slice(0,-1):w(p)}${n}`:s==="hue-rotate"?`${s}-${p.slice(0,-3)}${n}`:`${s}-${p}${n}`}function at(t,o){let[r,n]=i(o);return`backdrop-${A(t,r)}${n}`}function mt(t,o){let[r,n]=i(o);return t==="transform-origin"?`origin-${W(r)}${n}`:t==="transform-style"?`transform-${r}`:J(r).split(" ").map(e=>{let s=e.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[p,m,$,g,l]=s;if(g){let c=l.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?`${m}-${g.toLowerCase()}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):M(d)).join(" ")}${n}"`:`${m}="${g.toLowerCase()}-${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):M(c[0])}${n}"`}else{let c=l.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?m==="translate"?`${m}="[${c.join(",")}]"`:`${m}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):M(d)).join(" ")}${n}"`:`${m}="${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):M(c[0])}${n}"`}}).filter(Boolean).join(" ")}function M(t){return t.endsWith("deg")?t.slice(0,-3):t}var Xt=["transition-delay","transition-duration"];function pt(t,o){let[r,n]=i(o);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${Yt(r)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(Xt.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function Yt(t){let o=!1;return t.split(" ").map(r=>/^[0-9]/.test(r)||/^\.[0-9]/.test(r)?o?`delay${a(r,void 0,!0)}`:(o=!0,`duration${a(r,void 0,!0)}`):r==="background-color"?"colors":r).join(" ")}function ct(t,o){let[r,n]=i(o);return t==="justify-content"?`justify-${u(r)}${n}`:`${t}-${u(r)}${n}`}function ft(t,o){let[r,n]=i(o);return`${u(t)}-${u(r)}${n}`}var yt=["flex-basis","flex-grow","flex-shrink"];function lt(t,o){let[r,n]=i(o);if(yt.includes(t))return`${u(t)}-${r}${n}`;if(r==="1")return`flex-1${n}`;let e=r[0];return t==="flex"&&(e==="0"||e==="1")?`flex="[${j(r)}]${n}"`:`${f(t)}-${r.replace("column","col")}${n}`}function ut(t,o){let[r,n]=i(o);return r==="auto"?`${f(t)}-${r}`:`${f(t)}="[${r}]${n}"`}function $t(t,o){let[r,n]=i(o);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function gt(t,o){let[r,n]=i(o);return o==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function dt(t,o){let[r,n]=i(o);return t==="object-position"?`${f(t)}-${W(r)}${n}`:`${f(t)}-${r}${n}`}function bt(t,o){let[r,n]=i(o),[e,s,p]=t.split("-");return p?`${e}-${p}-${r}${n}`:`${e}-${r}${n}`}function xt(t,o){let[r,n]=i(o);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*([0-9]+)/);return s?`grid-${u(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${u(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${j(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${W(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${u(t)==="rows"?"rows":"cols"}-${s?"fr":f(r)}${n}`}let e=r.match(/span\s+([0-9])/);return e?`${t.slice(5).replace("column","col")}-span-${e[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function ht(t,o){let[r,n]=i(o);return`gap-y-${r}${n}`}function wt(t,o){let[r,n]=i(o);return`${t}-${u(r)}${n}`}function It(t,o){let[r,n]=i(o);return`tracking-${r}${n}`}function jt(t,o){let[r,n]=i(o);return`whitespace-${r}${n}`}function _t(t,o){let[r,n]=i(o);return t.startsWith("word-spacing")?`word-spacing${a(o)}`:r==="keep-all"?`break-keep${n}`:`break-${u(r)}${n}`}function Wt(t,o){let[r,n]=i(o);return t==="outline-offset"?`${t}-${r}${n}`:`${f(t)}-${r}${n}`}function vt(t,o){let[r,n]=i(o);return`mix-blend-${r}${n}`}var kt={vertical:"y",horizontal:"x"};function Vt(t,o){let[r,n]=i(o);return r==="both"?`${t}${n}`:`${t}-${kt[r]||r}${n}`}function Nt(t,o){let[r,n]=i(o);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[e,s,p,m]=t.match(/scroll-(margin|padding)-?([\w]+)?-?([\w]+)?/);return p==="inline"&&m?`scroll-${s[0]}${m[0]}-${r}${n}`:p?`scroll-${s[0]}${p[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function Lt(t,o){let[r,n]=i(o);return`${u(t)}-${r}${n}`}function Ft(t,o){let[r,n]=i(o);return`${t}-${f(r)}${n}`}function Rt(t,o){let[r,n]=i(o);return t==="animation-delay"?`animate${a(r)}${n}`:t==="animation"?`animate-${r.split(" ")[0]}${n}`:`animate-${r}${n}`}function zt(t,o){let[r,n]=i(o);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}var tr={show:"visible",hide:"hidden"};function St(t,o){var e;let[r,n]=i(o);return`table-empty-cells-${(e=tr[r])!=null?e:r}${n}`}function Ct(t,o){return o==="horizontal-tb"?"write-normal":`write-${o.replace("-rl","-right").replace("-lr","-left")}`}function Tt(t,o){let[r,n]=i(o);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}var O={animation:Rt,aspect:ut,backface:h,caption:h,column:$t,columns:x,break:x,empty:St,box:U,writing:Ct,display:T,float:x,clear:x,isolation:gt,object:dt,overflow:x,overscroll:bt,position:T,top:v,left:v,right:v,bottom:v,visibility:T,z:C,flex:lt,order:x,grid:xt,gap:v,justify:ct,align:ft,place:wt,padding:G,perspective:x,margin:G,width:C,min:E,max:E,height:C,font:Y,letter:It,line:it,list:h,text:rt,vertical:nt,white:jt,word:_t,content:zt,background:B,border:st,outline:Wt,opacity:k,mix:vt,filter:A,backdrop:at,table:h,transition:pt,transform:mt,accent:h,appearance:h,cursor:y,caret:h,pointer:x,resize:Vt,scroll:Nt,inset:Tt,touch:h,user:Lt,will:Ft,fill:x,stroke:h,color:tt,row:ht},rr=/([\w-]+)\s*:\s*([.\w\(\)-\s%+'",#\/!@]+)/;function D(t,o=!1){var $;t=t.replace(S,"");let r=t.match(rr);if(!r)return;let[n,e,s]=r,p=f(e),m=($=O[p])==null?void 0:$.call(O,e,s);return m&&o?m.replace(/-([0-9\.]+)px/,(g,l)=>`-${+l/4}`):m}function K(t,o){let r=[],n=new Set;return[t.split(";").filter(Boolean).reduce((e,s)=>{let p=s.replaceAll(S,"").trim();if(n.has(p))return e;n.add(p);let m=D(s,o)||"";return m||r.push(s),e+=`${m} `},"").trim().replace(/\s+/g," "),r]}function nr(t,o=!1){let[r,n]=K(t,o);return[r?r.replace(/([^\s\=]+)="([^"]+)"/g,(e,s,p)=>p.split(" ").map(m=>`${s}-${m}`).join(" ")):"",n]}export{S as browserReg,q as cssMathFnRE,er as diffTemplateStyle,or as flag,f as getFirstName,w as getHundred,u as getLastName,ar as getStyleScoped,a as getVal,V as isCalc,mr as isColor,sr as isEmptyStyle,R as isHex,z as isHsl,ir as isNot,P as isPercent,b as isRgb,Q as isSize,At as isUrl,I as isVar,J as joinEmpty,W as joinWithLine,j as joinWithUnderLine,Ut as numberWithUnitRE,Mt as positionMap,D as toUnocss,nr as toUnocssClass,i as transformImportant,K as transformStyleToUnocss,Z as trim};
1
+ var or=".__unocss_transfer__",q=/^(?:calc|clamp|min|max)\s*\(.*\)/,Ut=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function ir(t){return/\[&:not\(/.test(t)}function V(t){return q.test(t)}function l(t){return t.split("-")[0]}function $(t){let o=t.split("-");return o[o.length-1]}function At(t){return t.startsWith("url(")}function P(t){return t.endsWith("%")}function R(t){return/^#[0-9A-F]{2,}$/i.test(t)}function b(t){return t.startsWith("rgb")}function z(t){return t.startsWith("hsl")}function a(t,o,r,n=""){return V(t)||At(t)||R(t)||b(t)||z(t)||P(t)||I(t)?r?`-[${n}${Z(t,"all").replace(/['"]/g,"")}]`:`="[${n}${Z(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${o?o(t):t}]`:`-${o?o(t):t}`}function w(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function W(t){return t.replace(/\s+/," ").split(" ").join("-")}function j(t){return t.replace(/\s+/," ").split(" ").join("_")}var Mt=["top","right","bottom","left","center"];function Z(t,o="around"){return o==="pre"?t.replace(/(^\s*)/g,""):o==="post"?t.replace(/(\s*$)/g,""):o==="all"?t.replace(/\s+/g,""):o==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(o,r)=>{let n=r.trim().split(" ");return o.replace(r,n.map((e,s)=>e.endsWith(",")?e:e+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function er(t,o){let r=t.match(/<style scoped>.*<\/style>/s),n=o.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function sr(t){return/<style scoped>\s*<\/style>/.test(t)}function ar(t){let o=t.match(/<style scoped>(.*)<\/style>/s);return o?o[1]:""}function J(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function I(t){return t.startsWith("var(--")}function Q(t){return q.test(t)||Ut.test(t)||Mt.includes(t)}function mr(t){return R(t)||b(t)||z(t)}var C=/-webkit-|-moz-|-ms-|-o-/g;function S(t,o){let[r,n]=i(o);return`${t[0]}${a(r,l)}${n}`}var Pt=["background-color","background-attachment","background-position"],Ht=/linear-gradient\(\s*to([\w\s]+),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,Bt=/linear-gradient\(\s*([^,]*),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,Et=/(radial|conic)-gradient\(([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,_="__comma__";function B(t,o){let[r,n]=i(o);if(t==="background-size")return`bg${a(r,N,!1,"length:")}${n}`;if(Pt.includes(t))return`bg${a(r,N)}${n}`;if(["background","background-image"].includes(t)){if(Q(r))return`bg${a(r,N,!1,"position:")}${n}`;let e=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(e))return`bg="[${Dt(r)}]"`;if(r.startsWith("linear-gradient")){let m=r.replace(/rgba?\(([^)]+)\)/g,(f,c)=>f.replace(c,c.replace(/\s*,\s*/g,_))),g=m.match(Ht);if(g){let[f,c,d,L]=g.slice(1);return f=f.split(" ").map(F=>F[0]).join(""),f?`bg-gradient-to-${f}${H(c,d,L)}`:H(c,d,L)}let u=m.match(Bt);return u?`bg-gradient-linear bg-gradient-[${u[1]},${u[2].replace(/\s+/,"_").replaceAll(_,",")},${u[3].replace(/\s+/,"_").replaceAll(_,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let g=r.replace(/rgba?\(([^)]+)\)/g,(L,F)=>L.replace(F,F.replace(/\s*,\s*/g,_))).match(Et);if(!g)return;let u=g[1],[f,c,d]=g.slice(2);return`bg-gradient-${u}${H(f,c,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let m=s[0];return`bg="${r.replace(m,`[${m}]`)}${n}"`}let p=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(p)return`bg="${r.replace(p[0],`[${p[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let m=r.split(" ").map(f=>B(t,`${f}${n?" !important":""}`)).join(" "),g=/bg-\[position:([^\]]*)\]/g,u=m.match(g);if(u&&u.length>1){let f=`bg-[position:${u.map(c=>c.replace(g,"$1")).join("_")}]`;m=`${m.replace(g,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([f]).join(" ")}`}return m}return`bg${a(r,N)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${Gt(t,r)}-${Ot(r)}${n}`}function Gt(t,o){return o.endsWith("repeat")?"bg":t.replace("background","bg")}function Ot(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):N(t)}function N(t){return t.replace(/\s+/," ").replace(" ","-")}function H(t,o,r){let n="";if(o&&!r&&(r=o,o=""),t){t=t.replaceAll(_,",");let[e,s]=t.split(" ");s?n+=` from="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` from="${b(e)?`[${e}]`:e}"`)}if(o){o=o.replaceAll(_,",");let[e,s]=o.split(" ");s?n+=` via="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` via="${b(e)?`[${e}]`:e}"`)}if(r){r=r.replaceAll(_,",");let[e,s]=r.split(" ");s?n+=` to="${b(e)?`[${e}]`:e} ${s}"`:e&&(n+=` to="${b(e)?`[${e}]`:e}"`)}return n}var X="__transform_to_unocss__";function Dt(t){let o={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(o[r++]=n,`${X}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(o).forEach(n=>{t=t.replace(`${X}${n}}`,o[n])}),t}function E(t,o){let[r,n]=i(o),e=t.split("-"),s=V(r)||I(r)?a(r):a(l(r));return`${e[0]}-${e[1][0]}${s}${n}`}function Y(t,o){let[r,n]=i(o);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let e=r.match(/ui-(\w{0,4})/);if(!e)return`font-${o}${n}`;let[s,p]=e;return`font-${p}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${Kt(r)}${n}"`}function Kt(t){return t.split(" ").map(o=>/^\d/.test(o)?`text-${o}`:o).join(" ")}function y(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}var Zt={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function G(t,o){let[r,n]=i(o),e=Zt[t];if(e)return`${e}${a(r)}${n}`;let s=r.split(" "),p=s.length;return p===1?`${t[0]}${a(s[0])}${n}`:p===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:p===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function k(t,o){let[r,n]=i(o);return P(o)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function tt(t,o){let[r,n]=i(o);return`text${a(r)}${n}`}function rt(t,o){let[r,n]=i(o);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function nt(t,o){let[r,n]=i(o);return`v-${r}${n}`}var ot={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function it(t,o){let[r,n]=i(o);return r in ot?`lh-${ot[r]}${n}`:`lh${a(r)}${n}`}var et=["border-top","border-right","border-bottom","border-left"];function st(t,o){let[r,n]=i(o);if(t==="border-spacing")return`${t}="[${j(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let e=r.split(" ").length,s=r.split(" ").map(f=>R(f)||b(f)||z(f)?`-[${f}]`:`-${f}`),[p,m,g,u]=s;switch(e){case 2:return`border-y${p}${n} border-x${m}${n}`;case 3:return`border-t${p}${n} border-b${g}${n} border-x${m}${n}`;case 4:return`border-t${p}${n} border-b${g}${n} border-r${m}${n} border-l${u}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?V(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${j(r)}]${n}"`:et.some(e=>t.startsWith(e))?r.split(" ").map(e=>`border-${t.split("-")[1][0]}${a(e)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((e,s)=>`border-${et[s].split("-")[1][0]}${a(e)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(e=>r==="currentColor"?`border-current${n}`:`border${a(e)}${n}`).join(" ")}function T(t,o){let[r,n]=i(o);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}function x(t,o){let[r,n]=i(o);return`${t}-${r}${n}`}function v(t,o){let[r,n]=i(o);return`${t}${a(r)}${n}`}function h(t,o){let[r,n]=i(o);return`${l(t)}${a(r)}${n}`}var qt=["box-shadow","drop-shadow"];function U(t,o){let[r,n]=i(o);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${l(r)}${n}`;if(qt.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var Jt=["contrast","brightness","saturate"],Qt=["grayscale","invert","sepia"];function A(t,o){let[r,n]=i(o),[e,s,p]=r.match(/([\w-]+)\((.*)\)/);return Jt.includes(s)?`${s}-${w(p)}${n}`:s==="drop-shadow"?`drop-${U(s,p)}${n}`:Qt.includes(s)?`${s}-${p.endsWith("%")?p.slice(0,-1):w(p)}${n}`:s==="hue-rotate"?`${s}-${p.slice(0,-3)}${n}`:`${s}-${p}${n}`}function at(t,o){let[r,n]=i(o);return`backdrop-${A(t,r)}${n}`}function mt(t,o){let[r,n]=i(o);return t==="transform-origin"?`origin-${W(r)}${n}`:t==="transform-style"?`transform-${r}`:J(r).split(" ").map(e=>{let s=e.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[p,m,g,u,f]=s;if(u){let c=f.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?`${m}-${u.toLowerCase()}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):M(d)).join(" ")}${n}"`:`${m}="${u.toLowerCase()}-${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):M(c[0])}${n}"`}else{let c=f.replace(/,(?![^()]*\))/g," ").split(" ");return c.length>1?m==="translate"?`${m}="[${c.join(",")}]"`:`${m}="${c.map(d=>I(d)?`[${d}]`:m==="scale"?w(d):M(d)).join(" ")}${n}"`:`${m}="${I(c[0])?`[${c[0]}]`:m==="scale"?w(c[0]):M(c[0])}${n}"`}}).filter(Boolean).join(" ")}function M(t){return t.endsWith("deg")?t.slice(0,-3):t}var Xt=["transition-delay","transition-duration"];function pt(t,o){let[r,n]=i(o);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${Yt(r)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(Xt.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function Yt(t){let o=!1;return t.split(" ").map(r=>/^\d/.test(r)||/^\.\d/.test(r)?o?`delay${a(r,void 0,!0)}`:(o=!0,`duration${a(r,void 0,!0)}`):r==="background-color"?"colors":r).join(" ")}function ct(t,o){let[r,n]=i(o);return t==="justify-content"?`justify-${$(r)}${n}`:`${t}-${$(r)}${n}`}function ft(t,o){let[r,n]=i(o);return`${$(t)}-${$(r)}${n}`}var yt=["flex-basis","flex-grow","flex-shrink"];function lt(t,o){let[r,n]=i(o);if(yt.includes(t))return`${$(t)}-${r}${n}`;if(r==="1")return`flex-1${n}`;let e=r[0];return t==="flex"&&(e==="0"||e==="1")?`flex="[${j(r)}]${n}"`:`${l(t)}-${r.replace("column","col")}${n}`}function ut(t,o){let[r,n]=i(o);return r==="auto"?`${l(t)}-${r}`:`${l(t)}="[${r}]${n}"`}function $t(t,o){let[r,n]=i(o);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function gt(t,o){let[r,n]=i(o);return o==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function dt(t,o){let[r,n]=i(o);return t==="object-position"?`${l(t)}-${W(r)}${n}`:`${l(t)}-${r}${n}`}function bt(t,o){let[r,n]=i(o),[e,s,p]=t.split("-");return p?`${e}-${p}-${r}${n}`:`${e}-${r}${n}`}function xt(t,o){let[r,n]=i(o);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*(\d+)/);return s?`grid-${$(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${$(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${j(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${W(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${$(t)==="rows"?"rows":"cols"}-${s?"fr":l(r)}${n}`}let e=r.match(/span\s+(\d)/);return e?`${t.slice(5).replace("column","col")}-span-${e[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function ht(t,o){let[r,n]=i(o);return`gap-y-${r}${n}`}function wt(t,o){let[r,n]=i(o);return`${t}-${$(r)}${n}`}function It(t,o){let[r,n]=i(o);return`tracking-${r}${n}`}function jt(t,o){let[r,n]=i(o);return`whitespace-${r}${n}`}function _t(t,o){let[r,n]=i(o);return t.startsWith("word-spacing")?`word-spacing${a(o)}`:r==="keep-all"?`break-keep${n}`:`break-${$(r)}${n}`}function Wt(t,o){let[r,n]=i(o);return t==="outline-offset"?`${t}-${r}${n}`:`${l(t)}-${r}${n}`}function vt(t,o){let[r,n]=i(o);return`mix-blend-${r}${n}`}var kt={vertical:"y",horizontal:"x"};function Vt(t,o){let[r,n]=i(o);return r==="both"?`${t}${n}`:`${t}-${kt[r]||r}${n}`}function Nt(t,o){let[r,n]=i(o);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[e,s,p,m]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return p==="inline"&&m?`scroll-${s[0]}${m[0]}-${r}${n}`:p?`scroll-${s[0]}${p[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function Lt(t,o){let[r,n]=i(o);return`${$(t)}-${r}${n}`}function Ft(t,o){let[r,n]=i(o);return`${t}-${l(r)}${n}`}function Rt(t,o){let[r,n]=i(o);return t==="animation-delay"?`animate${a(r)}${n}`:t==="animation"?`animate-${r.split(" ")[0]}${n}`:`animate-${r}${n}`}function zt(t,o){let[r,n]=i(o);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}var tr={show:"visible",hide:"hidden"};function Ct(t,o){var e;let[r,n]=i(o);return`table-empty-cells-${(e=tr[r])!=null?e:r}${n}`}function St(t,o){return o==="horizontal-tb"?"write-normal":`write-${o.replace("-rl","-right").replace("-lr","-left")}`}function Tt(t,o){let[r,n]=i(o);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}var O={animation:Rt,aspect:ut,backface:h,caption:h,column:$t,columns:x,break:x,empty:Ct,box:U,writing:St,display:T,float:x,clear:x,isolation:gt,object:dt,overflow:x,overscroll:bt,position:T,top:v,left:v,right:v,bottom:v,visibility:T,z:S,flex:lt,order:x,grid:xt,gap:v,justify:ct,align:ft,place:wt,padding:G,perspective:x,margin:G,width:S,min:E,max:E,height:S,font:Y,letter:It,line:it,list:h,text:rt,vertical:nt,white:jt,word:_t,content:zt,background:B,border:st,outline:Wt,opacity:k,mix:vt,filter:A,backdrop:at,table:h,transition:pt,transform:mt,accent:h,appearance:h,cursor:y,caret:h,pointer:x,resize:Vt,scroll:Nt,inset:Tt,touch:h,user:Lt,will:Ft,fill:x,stroke:h,color:tt,row:ht},rr=/([\w-]+)\s*:\s*([.\w()-\s%+'",#/!@]+)/;function D(t,o=!1){var g;t=t.replace(C,"");let r=t.match(rr);if(!r)return;let[n,e,s]=r,p=l(e),m=(g=O[p])==null?void 0:g.call(O,e,s);return m&&o?m.replace(/-([0-9.]+)px/,(u,f)=>`-${+f/4}`).replace(/\[[^\]]+\]/g,u=>u.replace(/([0-9.]+)px/g,(f,c)=>`${+c/16}rem`)):m}function K(t,o){let r=[],n=new Set;return[t.split(";").filter(Boolean).reduce((e,s)=>{let p=s.replaceAll(C,"").trim();if(n.has(p))return e;n.add(p);let m=D(s,o)||"";return m||r.push(s),e+=`${m} `},"").trim().replace(/\s+/g," "),r]}function nr(t,o=!1){let[r,n]=K(t,o);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(e,s,p)=>p.split(" ").map(m=>`${s}-${m}`).join(" ")):"",n]}export{C as browserReg,q as cssMathFnRE,er as diffTemplateStyle,or as flag,l as getFirstName,w as getHundred,$ as getLastName,ar as getStyleScoped,a as getVal,V as isCalc,mr as isColor,sr as isEmptyStyle,R as isHex,z as isHsl,ir as isNot,P as isPercent,b as isRgb,Q as isSize,At as isUrl,I as isVar,J as joinEmpty,W as joinWithLine,j as joinWithUnderLine,Ut as numberWithUnitRE,Mt as positionMap,D as toUnocss,nr as toUnocssClass,i as transformImportant,K as transformStyleToUnocss,Z as trim};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "transform-to-unocss-core",
3
- "version": "0.0.30",
4
- "packageManager": "pnpm@7.2.1",
3
+ "version": "0.0.32",
4
+ "packageManager": "pnpm@7.33.7",
5
5
  "description": "",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",
@@ -17,8 +17,8 @@
17
17
  "exports": {
18
18
  ".": {
19
19
  "types": "./dist/index.d.ts",
20
- "require": "./dist/index.js",
21
- "import": "./dist/index.mjs"
20
+ "import": "./dist/index.mjs",
21
+ "require": "./dist/index.js"
22
22
  }
23
23
  },
24
24
  "main": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "build": "tsup ./src/index.ts --format cjs,esm --dts --clean --minify",
43
43
  "dev": "npm run build -- --watch src",
44
44
  "format": "prettier --write --cache .",
45
- "lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.md,.json --max-warnings 0 --cache",
45
+ "lint": "eslint . --cache",
46
46
  "lint:fix": "pnpm run lint --fix",
47
47
  "prepublishOnly": "nr build",
48
48
  "release": "bumpp && npm publish",
@@ -51,19 +51,16 @@
51
51
  "typecheck": "tsc --noEmit"
52
52
  },
53
53
  "devDependencies": {
54
- "@antfu/eslint-config": "^0.25.1",
55
- "@types/node": "^18.0.0",
54
+ "@antfu/eslint-config": "^3.11.2",
55
+ "@types/node": "^18.19.68",
56
56
  "bumpp": "^8.2.1",
57
- "eslint": "^8.18.0",
57
+ "eslint": "^8.57.1",
58
58
  "esno": "^0.16.3",
59
- "prettier": "^2.8.1",
59
+ "prettier": "^2.8.8",
60
60
  "rimraf": "^3.0.2",
61
- "tsup": "^6.5.0",
62
- "tsx": "^3.12.1",
63
- "typescript": "^4.7.4",
64
- "vitest": "^0.15.1"
65
- },
66
- "eslintConfig": {
67
- "extends": "@antfu"
61
+ "tsup": "^6.7.0",
62
+ "tsx": "^3.14.0",
63
+ "typescript": "^4.9.5",
64
+ "vitest": "^0.15.2"
68
65
  }
69
66
  }