@unocss/runtime 66.6.6 → 66.6.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/runtime",
3
3
  "type": "module",
4
- "version": "66.6.6",
4
+ "version": "66.6.7",
5
5
  "description": "CSS-in-JS Runtime for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@iconify/utils": "^3.1.0",
39
- "@unocss/preset-attributify": "66.6.6",
40
- "@unocss/preset-uno": "66.6.6",
41
- "@unocss/core": "66.6.6"
39
+ "@unocss/preset-attributify": "66.6.7",
40
+ "@unocss/core": "66.6.7",
41
+ "@unocss/preset-uno": "66.6.7"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsup": "^8.5.1"
@@ -1 +1 @@
1
- "use strict";(()=>{var V="default",j="preflights",P="shortcuts",k="imports",z={[k]:-200,[j]:-100,[P]:-10,[V]:0};var L=/^\[(.+?)~?="(.*)"\]$/;var N=/[\w\u00A0-\uFFFF%-?]/;function w(t){return t.match(L)}function v(t=""){return N.test(t)}var C=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function F(t={}){let d=t.prefix??"un-",f=t.prefixedOnly??!1,g=t.trueToNonValued??!1,a;return{name:"attributify",match(r,{generator:y}){let n=w(r);if(!n)return;let e=n[1];if(e.startsWith(d))e=e.slice(d.length);else if(f)return;let u=n[2],[,h="",s=u]=u.match(C)||[];if(s==="~"||g&&s==="true"||!s)return`${h}${e}`;if(a==null){let o=y?.config?.separators?.join("|");o?a=new RegExp(`^(.*\\](?:${o}))(\\[[^\\]]+?\\])$`):a=!1}if(a){let[,o,c]=u.match(a)||[];if(c)return`${o}${h}${e}-${c}`}if(h&&s.match(/^[\d.]+$/)){let o=h.split(/([^:]*:)/g).filter(Boolean),c=o.pop()+s,l=o.join("");return[{matcher:`${h}${e}-${s}`},{matcher:`${l}${e}-${c}`}]}return`${h}${e}-${s}`}}}var T=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,B=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,M=/[\s'"`;>]+/;function I(t){return{name:"attributify",extract:({content:d,cursor:f})=>{let g=d.matchAll(T),a,r=0;for(let i of g){let[,p,b]=i,$=i.index+p.length;if(f>$&&f<=$+b.length){r=$,a=b;break}}if(!a)return null;let y=a.matchAll(B),n=0,e,u;for(let i of y){let[p,b,$]=i,A=r+i.index;if(f>A&&f<=A+p.length){n=A,e=b,u=$?.slice(1);break}}if(!e||e==="class"||e==="className"||e===":class")return null;let h=!!t?.prefix&&e.startsWith(t.prefix);if(t?.prefixedOnly&&!h)return null;let s=h?e.slice(t.prefix.length):e;if(u===void 0)return{extracted:s,resolveReplacement(i){let p=h?t.prefix.length:0;return{start:n+p,end:n+e.length,replacement:i}}};let o=n+e.length+2,c=M.exec(u),l=0,x;for(;c;){let[i]=c;if(f>o+l&&f<=o+l+c.index){x=u.slice(l,l+c.index);break}l+=c.index+i.length,c=M.exec(u.slice(l))}x===void 0&&(x=u.slice(l));let[,m="",O]=x.match(C)||[];return{extracted:`${m}${s}-${O}`,transformSuggestions(i){return i.filter(p=>p.startsWith(`${m}${s}-`)).map(p=>m+p.slice(m.length+s.length+1))},resolveReplacement(i){return{start:l+o,end:l+o+x.length,replacement:m+i.slice(m.length+s.length+1)}}}}}}var U=["v-bind:",":"],_=/[\s'"`;]+/g,S=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,G=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,E=["placeholder","fill","opacity","stroke-opacity"];function D(t){let d=t?.ignoreAttributes??E,f=t?.nonValuedAttribute??!0,g=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:a}){return Array.from(a.matchAll(S)).flatMap(r=>Array.from((r[1]||"").matchAll(G))).flatMap(([,r,...y])=>{let n=y.filter(Boolean).join("");if(d.includes(r))return[];for(let e of U)if(r.startsWith(e)){r=r.slice(e.length);break}if(!n){if(v(r)&&f!==!1){let e=[`[${r}=""]`];return g&&e.push(`[${r}="true"]`),e}return[]}return["class","className"].includes(r)?n.split(_).filter(v):S.test(n)?(S.lastIndex=0,this.extract({code:n})):t?.prefixedOnly&&t.prefix&&!r.startsWith(t.prefix)?[]:n.split(_).filter(e=>!!e&&e!==":").map(e=>`[${r}~="${e}"]`)})}}}var W=(t={})=>(t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??E,{name:"@unocss/preset-attributify",enforce:"post",variants:[F(t)],extractors:[D(t)],options:t,autocomplete:{extractors:[I(t)]},extractorDefault:t.strict?!1:void 0}),R=W;window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetAttributify:t=>R(t)});})();
1
+ "use strict";(()=>{var V="default",j="preflights",P="shortcuts",k="imports",W={[k]:-200,[j]:-100,[P]:-10,[V]:0};var L=/^\[(.+?)~?="(.*)"\]$/;var N=/[\w\u00A0-\uFFFF%-?]/;function w(t){return t.match(L)}function v(t=""){return N.test(t)}var C=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function F(t={}){let d=t.prefix??"un-",f=t.prefixedOnly??!1,g=t.trueToNonValued??!1,a;return{name:"attributify",match(r,{generator:y}){let n=w(r);if(!n)return;let e=n[1];if(e.startsWith(d))e=e.slice(d.length);else if(f)return;let u=n[2],[,h="",s=u]=u.match(C)||[];if(s==="~"||g&&s==="true"||!s)return`${h}${e}`;if(a==null){let o=y?.config?.separators?.join("|");o?a=new RegExp(`^(.*\\](?:${o}))(\\[[^\\]]+?\\])$`):a=!1}if(a){let[,o,c]=u.match(a)||[];if(c)return`${o}${h}${e}-${c}`}if(h&&s.match(/^[\d.]+$/)){let o=h.split(/([^:]*:)/g).filter(Boolean),c=o.pop()+s,l=o.join("");return[{matcher:`${h}${e}-${s}`},{matcher:`${l}${e}-${c}`}]}return`${h}${e}-${s}`}}}var T=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,B=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,_=/[\s'"`;>]+/;function I(t){return{name:"attributify",extract:({content:d,cursor:f})=>{let g=d.matchAll(T),a,r=0;for(let i of g){let[,p,b]=i,$=i.index+p.length;if(f>$&&f<=$+b.length){r=$,a=b;break}}if(!a)return null;let y=a.matchAll(B),n=0,e,u;for(let i of y){let[p,b,$]=i,A=r+i.index;if(f>A&&f<=A+p.length){n=A,e=b,u=$?.slice(1);break}}if(!e||e==="class"||e==="className"||e===":class")return null;let h=!!t?.prefix&&e.startsWith(t.prefix);if(t?.prefixedOnly&&!h)return null;let s=h?e.slice(t.prefix.length):e;if(u===void 0)return{extracted:s,resolveReplacement(i){let p=h?t.prefix.length:0;return{start:n+p,end:n+e.length,replacement:i}}};let o=n+e.length+2,c=_.exec(u),l=0,x;for(;c;){let[i]=c;if(f>o+l&&f<=o+l+c.index){x=u.slice(l,l+c.index);break}l+=c.index+i.length,c=_.exec(u.slice(l))}x===void 0&&(x=u.slice(l));let[,m="",O]=x.match(C)||[];return{extracted:`${m}${s}-${O}`,transformSuggestions(i){return i.filter(p=>p.startsWith(`${m}${s}-`)).map(p=>m+p.slice(m.length+s.length+1))},resolveReplacement(i){return{start:l+o,end:l+o+x.length,replacement:m+i.slice(m.length+s.length+1)}}}}}}var U=["v-bind:",":"],M=/[\s'"`;]+/g,S=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,G=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,E=["placeholder","fill","opacity","stroke-opacity"];function D(t){let d=t?.ignoreAttributes??E,f=t?.nonValuedAttribute??!0,g=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:a}){return Array.from(a.matchAll(S)).flatMap(r=>Array.from((r[1]||"").matchAll(G))).flatMap(([,r,...y])=>{let n=y.filter(Boolean).join("");if(d.includes(r))return[];for(let e of U)if(r.startsWith(e)){r=r.slice(e.length);break}if(!n){if(v(r)&&f!==!1){let e=[`[${r}=""]`];return g&&e.push(`[${r}="true"]`),e}return[]}return["class","className"].includes(r)?n.split(M).filter(v):S.test(n)?(S.lastIndex=0,this.extract({code:n})):t?.prefixedOnly&&t.prefix&&!r.startsWith(t.prefix)?[]:n.split(M).filter(e=>!!e&&e!==":").map(e=>`[${r}~="${e}"]`)})}}}var R=(t={})=>(t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??E,{name:"@unocss/preset-attributify",enforce:"post",variants:[F(t)],extractors:[D(t)],options:t,autocomplete:{extractors:[I(t)]},extractorDefault:t.strict?!1:void 0});window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},{presetAttributify:t=>R(t)});})();