@unocss/runtime 66.5.2 → 66.5.3

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.5.2",
4
+ "version": "66.5.3",
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/core": "66.5.2",
39
- "@unocss/preset-attributify": "66.5.2",
40
- "@unocss/preset-uno": "66.5.2"
38
+ "@unocss/preset-attributify": "66.5.3",
39
+ "@unocss/core": "66.5.3",
40
+ "@unocss/preset-uno": "66.5.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
@@ -2,4 +2,4 @@
2
2
  `).join(`
3
3
  `+i),e.push(r+"m+"+J.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=jt()+o+" "+e[0]}function jt(){return y.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Et(...e){return process.stderr.write(H.formatWithOptions(y.inspectOpts,...e)+`
4
4
  `)}function Tt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Lt(){return process.env.DEBUG}function $t(e){e.inspectOpts={};let o=Object.keys(y.inspectOpts);for(let t=0;t<o.length;t++)e.inspectOpts[o[t]]=y.inspectOpts[o[t]]}J.exports=ne()(y);var{formatters:De}=J.exports;De.o=function(e){return this.inspectOpts.colors=this.useColors,H.inspect(e,this.inspectOpts).split(`
5
- `).map(o=>o.trim()).join(" ")};De.O=function(e){return this.inspectOpts.colors=this.useColors,H.inspect(e,this.inspectOpts)}});var ae=T((mo,ce)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ce.exports=Re():ce.exports=Ue()});async function le(e,o,t,n){let r;Rt(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let i=e[t];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${t}" in "${o}":`,i);return}if(r){let i=r.indexOf("<svg");i>0&&(r=r.slice(i));let{transform:c}=n?.customizations??{};return r=typeof c=="function"?await c(r,o,t):r,r.startsWith("<svg")?await B(n?.customizations?.trimCustomSvg===!0?je(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Me,Rt,Ve=x(()=>{"use strict";Ee();re();Me=de(ae(),1),Rt=(0,Me.default)("@iconify-loader:custom")});async function Z(e,o,t,n){let r,{customize:i}=n?.customizations??{};for(let c of t)if(r=ve(e,c),r){At(`${o}:${c}`);let u={...G};typeof i=="function"&&(r=Object.assign({},r),u=i(u,r,`${o}:${c}`)??u);let{attributes:{width:d,height:g,...s},body:f}=Oe(r,u),m=n?.scale;return await B(`<svg >${f}</svg>`,o,c,n,()=>({...s}),p=>{let C=(a,l)=>{let b=p[a],I;if(!N(b)){if(b)return;typeof m=="number"?m&&(I=L(l??"1em",m)):I=l}I?p[a]=I:delete p[a]};C("width",d),C("height",g)})}}var Ge,At,ue=x(()=>{"use strict";X();xe();q();ee();re();Ge=de(ae(),1),At=(0,Ge.default)("@iconify-loader:icon")});var D,fe=x(()=>{"use strict";Ve();ue();D=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(i){console.warn(`Failed to load custom icon "${o}" in "${e}":`,i);return}if(r){if(typeof r=="string")return await le(()=>r,e,o,t);if("icons"in r){let i=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await Z(r,e,i,t)}}}else return await le(n,e,o,t)}});function ke(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function te(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" ')),ke(o)}fe();function qe(){let e=typeof process<"u"&&process.stdout,o=e&&!!process.env.VSCODE_CWD,t=e&&!!process.env.ESLINT;return{isNode:e,isVSCode:o,isESLint:t}}var Be=new Set;function We(e){Be.has(e)||(console.warn("[unocss]",e),Be.add(e))}fe();ue();var me=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bubbles","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codex","codicon","covid","cryptocurrency-color","cryptocurrency","cuida","dashicons","devicon-line","devicon-original","devicon-plain","devicon","dinkie-icons","duo-icons","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","fa7-brands","fa7-regular","fa7-solid","fad","famicons","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-color","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","garden","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","ix","jam","la","lets-icons","line-md","lineicons","logos","ls","lsicon","lucide-lab","lucide","mage","majesticons","maki","map","marketeq","material-icon-theme","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","meteor-icons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","nrk","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","picon","pixel","pixelarticons","prime","proicons","ps","qlementine-icons","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","si","sidekickicons","simple-icons","simple-line-icons","skill-icons","solar","stash","streamline-block","streamline-color","streamline-cyber-color","streamline-cyber","streamline-emojis","streamline-flex-color","streamline-flex","streamline-freehand-color","streamline-freehand","streamline-guidance","streamline-kameleon-color","streamline-logos","streamline-pixel","streamline-plump-color","streamline-plump","streamline-sharp-color","streamline-sharp","streamline-stickies-color","streamline-ultimate-color","streamline-ultimate","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 Pt=3;function He(e){return(o={})=>{let{scale:t=1,mode:n="auto",prefix:r="i-",warn:i=!1,iconifyCollectionsNames:c,collections:u,extraProperties:d={},customizations:g={},autoInstall:s=!1,collectionsNodeResolvePath:f,layer:m="icons",unit:p,processor:C}=o,a=qe(),l={addXmlNs:!0,scale:t,customCollections:u,autoInstall:s,cwd:f,warn:void 0,customizations:{...g,additionalProps:{...d},trimCustomSvg:!0,async iconCustomizer(I,v,h){await g.iconCustomizer?.(I,v,h),p&&(h.width||(h.width=`${t}${p}`),h.height||(h.height=`${t}${p}`))}}},b;return{name:"@unocss/preset-icons",enforce:"pre",options:o,layers:{icons:-30},api:{encodeSvgForCss:te,parseIconWithLoader:Ke},rules:[[/^([\w:-]+)(?:\?(mask|bg|auto))?$/,async I=>{let[v,h,_=n]=I;b=b||await e(o);let k={},j=await Ke(h,b,{...l,usedProps:k},c);if(!j){i&&!a.isESLint&&We(`failed to load icon "${v}"`);return}let E,U=`url("data:image/svg+xml;utf8,${te(j.svg)}")`;return _==="auto"&&(_=j.svg.includes("currentColor")?"mask":"bg"),_==="mask"?E={"--un-icon":U,"-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}:E={background:`${U} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...k},C?.(E,{...j,icon:j.name,mode:_}),E},{layer:m,prefix:r}]]}}}function Je(e,o,t=new Map){function n(r){if(me.includes(r))return t.has(r)||t.set(r,e(`${o}@iconify-json/${r}/icons.json`)),t.get(r)}return async(r,i,c)=>{let u=await D(r,i,c);if(u)return u;let d=await n(r);if(d){let g=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];u=await Z(d,r,g,c)}return u}}async function Ke(e,o,t={},n=[]){let r="",i="",c,u=new Set([...me,...n,...Object.keys(t.customCollections||{})]);if(e.includes(":")){if([r,i]=e.split(":"),!u.has(r))return;c=await o(r,i,t)}else{let d=e.split(/-/g);for(let g=Pt;g>=1&&(r=d.slice(0,g).join("-"),!(!!u.has(r)&&(i=d.slice(g).join("-"),c=await o(r,i,t),c)));g--);}if(c)return{collection:r,name:i,svg:c}}window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},(()=>{let e=He(async o=>{let t=o?.customFetch??(r=>fetch(r).then(i=>i.json())),n=o?.cdn;return n?Je(t,n):D});return{presetIcons:o=>e(o)}})());})();
5
+ `).map(o=>o.trim()).join(" ")};De.O=function(e){return this.inspectOpts.colors=this.useColors,H.inspect(e,this.inspectOpts)}});var ae=T((mo,ce)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ce.exports=Re():ce.exports=Ue()});async function le(e,o,t,n){let r;Rt(`${o}:${t}`);try{if(typeof e=="function")r=await e(t);else{let i=e[t];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${t}" in "${o}":`,i);return}if(r){let i=r.indexOf("<svg");i>0&&(r=r.slice(i));let{transform:c}=n?.customizations??{};return r=typeof c=="function"?await c(r,o,t):r,r.startsWith("<svg")?await B(n?.customizations?.trimCustomSvg===!0?je(r):r,o,t,n,void 0):(console.warn(`Custom icon "${t}" in "${o}" is not a valid SVG`),r)}}var Me,Rt,Ve=x(()=>{"use strict";Ee();re();Me=de(ae(),1),Rt=(0,Me.default)("@iconify-loader:custom")});async function Z(e,o,t,n){let r,{customize:i}=n?.customizations??{};for(let c of t)if(r=ve(e,c),r){At(`${o}:${c}`);let u={...G};typeof i=="function"&&(r=Object.assign({},r),u=i(u,r,`${o}:${c}`)??u);let{attributes:{width:d,height:g,...s},body:f}=Oe(r,u),m=n?.scale;return await B(`<svg >${f}</svg>`,o,c,n,()=>({...s}),p=>{let C=(a,l)=>{let b=p[a],I;if(!N(b)){if(b)return;typeof m=="number"?m&&(I=L(l??"1em",m)):I=l}I?p[a]=I:delete p[a]};C("width",d),C("height",g)})}}var Ge,At,ue=x(()=>{"use strict";X();xe();q();ee();re();Ge=de(ae(),1),At=(0,Ge.default)("@iconify-loader:icon")});var D,fe=x(()=>{"use strict";Ve();ue();D=async(e,o,t)=>{let n=t?.customCollections?.[e];if(n)if(typeof n=="function"){let r;try{r=await n(o)}catch(i){console.warn(`Failed to load custom icon "${o}" in "${e}":`,i);return}if(r){if(typeof r=="string")return await le(()=>r,e,o,t);if("icons"in r){let i=[o,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.replace(/([a-z])(\d+)/g,"$1-$2")];return await Z(r,e,i,t)}}}else return await le(n,e,o,t)}});function ke(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function te(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" ')),ke(o)}fe();function qe(){let e=typeof process<"u"&&process.stdout,o=e&&!!process.env.VSCODE_CWD,t=e&&!!process.env.ESLINT;return{isNode:e,isVSCode:o,isESLint:t}}var Be=new Set;function We(e){Be.has(e)||(console.warn("[unocss]",e),Be.add(e))}fe();ue();var me=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bubbles","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codex","codicon","covid","cryptocurrency-color","cryptocurrency","cuida","dashicons","devicon-line","devicon-original","devicon-plain","devicon","dinkie-icons","duo-icons","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","fa7-brands","fa7-regular","fa7-solid","fad","famicons","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-color","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","garden","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","ix","jam","la","lets-icons","line-md","lineicons","logos","ls","lsicon","lucide-lab","lucide","mage","majesticons","maki","map","marketeq","material-icon-theme","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","meteor-icons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","nrk","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","picon","pixel","pixelarticons","prime","proicons","ps","qlementine-icons","quill","radix-icons","raphael","ri","rivet-icons","roentgen","si-glyph","si","sidekickicons","simple-icons","simple-line-icons","skill-icons","solar","stash","streamline-block","streamline-color","streamline-cyber-color","streamline-cyber","streamline-emojis","streamline-flex-color","streamline-flex","streamline-freehand-color","streamline-freehand","streamline-guidance","streamline-kameleon-color","streamline-logos","streamline-pixel","streamline-plump-color","streamline-plump","streamline-sharp-color","streamline-sharp","streamline-stickies-color","streamline-ultimate-color","streamline-ultimate","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","temaki","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"];var Pt=3;function He(e){return(o={})=>{let{scale:t=1,mode:n="auto",prefix:r="i-",warn:i=!1,iconifyCollectionsNames:c,collections:u,extraProperties:d={},customizations:g={},autoInstall:s=!1,collectionsNodeResolvePath:f,layer:m="icons",unit:p,processor:C}=o,a=qe(),l={addXmlNs:!0,scale:t,customCollections:u,autoInstall:s,cwd:f,warn:void 0,customizations:{...g,additionalProps:{...d},trimCustomSvg:!0,async iconCustomizer(I,v,h){await g.iconCustomizer?.(I,v,h),p&&(h.width||(h.width=`${t}${p}`),h.height||(h.height=`${t}${p}`))}}},b;return{name:"@unocss/preset-icons",enforce:"pre",options:o,layers:{icons:-30},api:{encodeSvgForCss:te,parseIconWithLoader:Ke},rules:[[/^([\w:-]+)(?:\?(mask|bg|auto))?$/,async I=>{let[v,h,_=n]=I;b=b||await e(o);let k={},j=await Ke(h,b,{...l,usedProps:k},c);if(!j){i&&!a.isESLint&&We(`failed to load icon "${v}"`);return}let E,U=`url("data:image/svg+xml;utf8,${te(j.svg)}")`;return _==="auto"&&(_=j.svg.includes("currentColor")?"mask":"bg"),_==="mask"?E={"--un-icon":U,"-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}:E={background:`${U} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...k},C?.(E,{...j,icon:j.name,mode:_}),E},{layer:m,prefix:r}]]}}}function Je(e,o,t=new Map){function n(r){if(me.includes(r))return t.has(r)||t.set(r,e(`${o}@iconify-json/${r}/icons.json`)),t.get(r)}return async(r,i,c)=>{let u=await D(r,i,c);if(u)return u;let d=await n(r);if(d){let g=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];u=await Z(d,r,g,c)}return u}}async function Ke(e,o,t={},n=[]){let r="",i="",c,u=new Set([...me,...n,...Object.keys(t.customCollections||{})]);if(e.includes(":")){if([r,i]=e.split(":"),!u.has(r))return;c=await o(r,i,t)}else{let d=e.split(/-/g);for(let g=Pt;g>=1&&(r=d.slice(0,g).join("-"),!(!!u.has(r)&&(i=d.slice(g).join("-"),c=await o(r,i,t),c)));g--);}if(c)return{collection:r,name:i,svg:c}}window.__unocss_runtime=window.__unocss_runtime??{};window.__unocss_runtime.presets=Object.assign(window.__unocss_runtime?.presets??{},(()=>{let e=He(async o=>{let t=o?.customFetch??(r=>fetch(r).then(i=>i.json())),n=o?.cdn;return n?Je(t,n):D});return{presetIcons:o=>e(o)}})());})();