@unocss/runtime 0.62.2 → 0.62.4
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/attributify.global.js +8 -8
- package/core.global.js +2 -2
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -1
- package/full.global.js +8 -8
- package/mini.global.js +8 -8
- package/package.json +4 -4
- package/preset-icons.global.js +1 -1
- package/preset-mini.global.js +6 -6
- package/preset-uno.global.js +6 -6
- package/preset-web-fonts.global.js +2 -2
- package/preset-wind.global.js +6 -6
- package/uno.global.js +7 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.62.
|
|
4
|
+
"version": "0.62.4",
|
|
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/
|
|
39
|
-
"@unocss/
|
|
40
|
-
"@unocss/preset-attributify": "0.62.
|
|
38
|
+
"@unocss/core": "0.62.4",
|
|
39
|
+
"@unocss/preset-uno": "0.62.4",
|
|
40
|
+
"@unocss/preset-attributify": "0.62.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
|
package/preset-icons.global.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
`).join(`
|
|
3
3
|
`+s),e.push(r+"m+"+X.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=kt()+o+" "+e[0]}function kt(){return w.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Tt(...e){return process.stderr.write(Y.formatWithOptions(w.inspectOpts,...e)+`
|
|
4
4
|
`)}function $t(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Rt(){return process.env.DEBUG}function Lt(e){e.inspectOpts={};let o=Object.keys(w.inspectOpts);for(let t=0;t<o.length;t++)e.inspectOpts[o[t]]=w.inspectOpts[o[t]]}X.exports=se()(w);var{formatters:Ve}=X.exports;Ve.o=function(e){return this.inspectOpts.colors=this.useColors,Y.inspect(e,this.inspectOpts).split(`
|
|
5
|
-
`).map(o=>o.trim()).join(" ")};Ve.O=function(e){return this.inspectOpts.colors=this.useColors,Y.inspect(e,this.inspectOpts)}});var M=T((ho,le)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=ze():le.exports=Ue()});async function ue(e,o,t,n){let r;At(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let s=e[t];r=typeof s=="function"?await s():s}}catch(s){console.warn(`Failed to load custom icon "${t}" in "${o}":`,s);return}if(r){let s=r.indexOf("<svg");s>0&&(r=r.slice(s));let{transform:a}=n?.customizations??{};return r=typeof a=="function"?await a(r,o,t):r,r.startsWith("<svg")?await H(n?.customizations?.trimCustomSvg===!0?Te(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Ge,At,qe=F(()=>{"use strict";Ge=q(M(),1);ie();$e();At=(0,Ge.default)("@iconify-loader:custom")});async function Q(e,o,t,n){let r,{customize:s}=n?.customizations??{};for(let a of t)if(r=Fe(e,a),r){zt(`${o}:${a}`);let f={...W};typeof s=="function"&&(r=Object.assign({},r),f=s(f,r,`${o}:${a}`)??f);let{attributes:{width:m,height:h,...i},body:l}=je(r,f),p=n?.scale;return await H(`<svg >${l}</svg>`,o,a,n,()=>({...i}),x=>{let I=(u,c)=>{let y=x[u],b;if(!D(y)){if(y)return;typeof p=="number"?p&&(b=$(c??"1em",p)):b=c}b?x[u]=b:delete x[u]};I("width",m),I("height",h)})}}var Be,zt,fe=F(()=>{"use strict";re();ve();K();ie();Be=q(M(),1);te();zt=(0,Be.default)("@iconify-loader:icon")});var Eo,V,pe=F(()=>{"use strict";qe();fe();Eo=q(M(),1),V=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(s){console.warn(`Failed to load custom icon "${o}" in "${e}":`,s);return}if(r){if(typeof r=="string")return await ue(()=>r,e,o,t);if("icons"in r){let s=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await Q(r,e,s,t)}}}else return await ue(n,e,o,t)}});function Ee(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ke(e){let o=e.startsWith("<svg>")?e.replace("<svg>","<svg >"):e;return!o.includes(" xmlns:xlink=")&&o.includes(" xlink:")&&(o=o.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),o.includes(" xmlns=")||(o=o.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),Ee(o)}pe();var To=q(M(),1);var We=new Set;function Ke(e){We.has(e)||(console.warn("[unocss]",e),We.add(e))}
|
|
5
|
+
`).map(o=>o.trim()).join(" ")};Ve.O=function(e){return this.inspectOpts.colors=this.useColors,Y.inspect(e,this.inspectOpts)}});var M=T((ho,le)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?le.exports=ze():le.exports=Ue()});async function ue(e,o,t,n){let r;At(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let s=e[t];r=typeof s=="function"?await s():s}}catch(s){console.warn(`Failed to load custom icon "${t}" in "${o}":`,s);return}if(r){let s=r.indexOf("<svg");s>0&&(r=r.slice(s));let{transform:a}=n?.customizations??{};return r=typeof a=="function"?await a(r,o,t):r,r.startsWith("<svg")?await H(n?.customizations?.trimCustomSvg===!0?Te(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Ge,At,qe=F(()=>{"use strict";Ge=q(M(),1);ie();$e();At=(0,Ge.default)("@iconify-loader:custom")});async function Q(e,o,t,n){let r,{customize:s}=n?.customizations??{};for(let a of t)if(r=Fe(e,a),r){zt(`${o}:${a}`);let f={...W};typeof s=="function"&&(r=Object.assign({},r),f=s(f,r,`${o}:${a}`)??f);let{attributes:{width:m,height:h,...i},body:l}=je(r,f),p=n?.scale;return await H(`<svg >${l}</svg>`,o,a,n,()=>({...i}),x=>{let I=(u,c)=>{let y=x[u],b;if(!D(y)){if(y)return;typeof p=="number"?p&&(b=$(c??"1em",p)):b=c}b?x[u]=b:delete x[u]};I("width",m),I("height",h)})}}var Be,zt,fe=F(()=>{"use strict";re();ve();K();ie();Be=q(M(),1);te();zt=(0,Be.default)("@iconify-loader:icon")});var Eo,V,pe=F(()=>{"use strict";qe();fe();Eo=q(M(),1),V=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(s){console.warn(`Failed to load custom icon "${o}" in "${e}":`,s);return}if(r){if(typeof r=="string")return await ue(()=>r,e,o,t);if("icons"in r){let s=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await Q(r,e,s,t)}}}else return await ue(n,e,o,t)}});function Ee(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ke(e){let o=e.startsWith("<svg>")?e.replace("<svg>","<svg >"):e;return!o.includes(" xmlns:xlink=")&&o.includes(" xlink:")&&(o=o.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),o.includes(" xmlns=")||(o=o.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),Ee(o)}pe();var To=q(M(),1);pe();fe();var We=new Set;function Ke(e){We.has(e)||(console.warn("[unocss]",e),We.add(e))}var He=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","f7","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","hugeicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide-lab","lucide","mage","majesticons","maki","map","marketeq","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"];var _t=3;function Je(e){return(o={})=>{let{scale:t=1,mode:n="auto",prefix:r="i-",warn:s=!1,collections:a,extraProperties:f={},customizations:m={},autoInstall:h=!1,collectionsNodeResolvePath:i,layer:l="icons",unit:p,processor:x}=o,I=Nt(),u={addXmlNs:!0,scale:t,customCollections:a,autoInstall:h,cwd:i,warn:void 0,customizations:{...m,additionalProps:{...f},trimCustomSvg:!0,async iconCustomizer(y,b,d){await m.iconCustomizer?.(y,b,d),p&&(d.width||(d.width=`${t}${p}`),d.height||(d.height=`${t}${p}`))}}},c;return{name:"@unocss/preset-icons",enforce:"pre",options:o,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async y=>{let[b,d,g=n]=y,L="",O="",j;c=c||await e(o);let k={};if(d.includes(":"))[L,O]=d.split(":"),j=await c(L,O,{...u,usedProps:k});else{let de=d.split(/-/g);for(let U=_t;U>=1&&(L=de.slice(0,U).join("-"),O=de.slice(U).join("-"),j=await c(L,O,{...u,usedProps:k}),!j);U--);}if(!j){s&&!I.isESLint&&Ke(`failed to load icon "${b}"`);return}let A,me=`url("data:image/svg+xml;utf8,${ke(j)}")`;return g==="auto"&&(g=j.includes("currentColor")?"mask":"bg"),g==="mask"?A={"--un-icon":me,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...k}:A={background:`${me} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...k},x?.(A,{collection:L,icon:O,svg:j,mode:g}),A},{layer:l,prefix:r}]]}}}function Ze(e,o){let t=new Map;function n(r){if(He.includes(r))return t.has(r)||t.set(r,e(`${o}@iconify-json/${r}/icons.json`)),t.get(r)}return async(r,s,a)=>{let f=await V(r,s,a);if(f)return f;let m=await n(r);if(m){let h=[s,s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),s.replace(/([a-z])(\d+)/g,"$1-$2")];f=await Q(m,r,h,a)}return f}}function Nt(){let e=typeof process<"u"&&process.stdout&&!process.versions.deno,o=e&&!!process.env.VSCODE_CWD,t=e&&!!process.env.ESLINT;return{isNode:e,isVSCode:o,isESLint:t}}window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},(()=>{let e=Je(async o=>{let t=o?.customFetch??(r=>fetch(r).then(s=>s.json())),n=o?.cdn;return n?Ze(t,n):V});return{presetIcons:o=>e(o)}})());})();
|