@unocss/runtime 0.60.4 → 0.61.0

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