@moneko/core 3.26.5 → 3.26.6

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.
@@ -1 +1 @@
1
- "use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return u}});const t=require("lightningcss"),r=(e=require("../../commom/log.mjs"))&&e.__esModule?e:{default:e},s=require("./codegen.cjs"),i=require("./utils.cjs");function o(e,t){return JSON.stringify(e.utils.contextify(e.context||e.rootContext,t))}const l=new TextEncoder,n={Declaration:{custom(e){if("content"===e.name&&1===e.value.length){let t=e.value[0];if("token"===t.type&&"string"===t.value.type)return[{property:e.name,raw:JSON.stringify(t.value.value.replace(/[\u4e00-\u9faF]/g,function(e){return`\\${e.charCodeAt(0).toString(16)}`}))}]}}}};async function u(e,u){let _=this.async();this.cacheable&&this.cacheable();let{implementation:a,visitor:p,rem:c,...f}=this.getOptions(),m=!!f.modules?.auto?.(this.resourcePath);if(m&&void 0===f.modules.namedExport&&(f.modules.namedExport=!0),a&&"function"!=typeof a.transform){_(TypeError(`[lightning-loader]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof a.transform}`));return}let d=[],h=[],R=[],S=[],g=[];f.modules?.exportOnlyLocals!==!0&&h.unshift({type:"api_import",importName:"___CSS_LOADER_API_IMPORT___",url:o(this,require.resolve("./runtime/api.cjs"))});let y=a?.transform?a.transform:t.transform,L=new Map,O=new Map,E=new Map,v=function(e,t,r,s,o,l){let n=new Map,u=!1,_=new Map,a=new Map,p=-1,c=-1;return{Rule:{import(s){let o;if(e.importFilter&&!e.importFilter(s.value.url,s.value.media))return s;let u=s.value.url;c++,l.set(c,u),u=`__MO_LIGHTNINGCSS_LOADER_IMPORT_URL_REPLACE_${c}__`;let _=s.value.media.mediaQueries.length?JSON.stringify(s.value.media.mediaQueries):void 0,a=(0,i.isUrlRequestable)(u);if(a){let e=u.split("!");e.length>1&&(u=e.pop(),o=e.join("!"))}if(!a)return t.push({url:u,media:_}),{type:"ignored",value:""};let p=o?`${o}!${u}`:u,f=n.get(p);if(!f){f=`___CSS_LOADER_AT_RULE_IMPORT_${n.size}___`,n.set(p,f);let t=e.urlHandler(p);r.push({type:"rule_import",importName:f,url:t})}return t.push({importName:f,media:_}),{type:"ignored",value:""}}},Url:t=>(function(t){let l,n=t.url;if(!e.urlFilter(n)||(0,i.isDataUrl)(n))return t;p++,o.set(p,n);let[,c,f]=(n=`__MO_LIGHTNINGCSS_LOADER_URL_REPLACE_${p}__`).split(/(\?)?#/,3),m=n.split("!");m.length>1&&(n=m.pop(),l=m.join("!"));let d=c?"?":"";d+=f?`#${f}`:"",u||(r.push({type:"get_url_import",importName:"___CSS_LOADER_GET_URL_IMPORT___",url:JSON.stringify(require.resolve("./runtime/get-url.cjs")),index:-1}),u=!0);let h=l?`${l}!${n}`:n,R=_.get(h);R||(R=`___CSS_LOADER_URL_IMPORT_${_.size}___`,_.set(h,R),r.push({type:"url",importName:R,url:JSON.stringify(h),index:p}));let S=JSON.stringify({newUrl:h,hash:d,needQuotes:!1}),g=a.get(S);return g||(g=`___CSS_LOADER_URL_REPLACEMENT_${a.size}___`,a.set(S,g),s.push({replacementName:g,importName:R,hash:d,needQuotes:!1})),{loc:t.loc,url:g}})(t)}}({urlHandler:e=>o(this,(0,i.getPreRequester)(this)(f.importLoaders??0)+e),urlFilter:(0,i.getFilter)(f.url,this.resourcePath),importFilter:(0,i.getFilter)(f.import,this.resourcePath),context:this.context},S,h,g,L,E),C=function({apis:e,imports:t,replacements:r,replacedUrls:s,urlHandler:i}){let o=-1,l=-1;return{Declaration:{composes(n){if("unparsed"===n.property)return;let u=n.value.from;if(u?.type!=="file")return;let _=u.value;if(!_)return;o++,s.set(o,_),_=`__MO_LIGHTNINGCSS_LOADER_ICSS_URL_REPLACE_${o}__`;let a=`___CSS_LOADER_ICSS_IMPORT_${t.length}___`;t.push({type:"icss_import",importName:a,icss:!0,url:i(_),index:o}),e.push({importName:a,dedupe:!0,index:o});let p=[];for(let e of n.value.names){l++;let t=`___CSS_LOADER_ICSS_IMPORT_${o}_REPLACEMENT_${l}___`;r.push({replacementName:t,importName:a,localName:e}),p.push(t)}return{property:"composes",value:{loc:n.value.loc,names:p,from:u}}}}}}({apis:S,imports:R,replacements:g,replacedUrls:O,urlHandler:e=>o(this,(0,i.getPreRequester)(this)(f.importLoaders)+e)});try{c&&!n.Length&&(n.Length=function(e){if("px"===e.unit)return{unit:"rem",value:e.value/16}});let{code:t,map:r,exports:o}=y({filename:this.resourcePath,code:l.encode(e),minify:!0,visitor:{...n,...v,...C,...p},cssModules:!!m&&{pattern:f.modules.localIdentName},sourceMap:this.sourceMap,inputSourceMap:this.sourceMap&&u?JSON.stringify(u):void 0,analyzeDependencies:!1,drafts:{customMedia:!0},include:1,errorRecovery:!1,unusedSymbols:[],...f}),a=t.toString();if(o){for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=o[e],r=t.name;for(let e of t.composes)r+=` ${e.name}`;d.push({name:e,value:r})}f.modules.getJSON?.({resourcePath:this.resourcePath,exports:d})}if(0!==L.size){let e=this.getResolve({conditionNames:["asset"],mainFields:["asset"],mainFiles:[],extensions:[]});for(let[t,r]of L.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext),l=await (0,i.resolveRequests)(e,this.context,[...new Set([o,r])]);for(let e of h)e.url=e.url.replace(`__MO_LIGHTNINGCSS_LOADER_URL_REPLACE_${t}__`,l??r)}}if(0!==E.size){let e=this.getResolve({conditionNames:["style"],extensions:[".css"],mainFields:["css","style","main","..."],mainFiles:["index","..."],restrictions:[/\.css$/i]});for(let[t,r]of E.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext),l=await (0,i.resolveRequests)(e,this.context,[...new Set([o,r])]);for(let e of h)e.url=e.url.replace(`__MO_LIGHTNINGCSS_LOADER_IMPORT_URL_REPLACE_${t}__`,l??r)}}if(0!==O.size){let e=this.getResolve({conditionNames:["style"],extensions:[],mainFields:["css","style","main","..."],mainFiles:["index","..."]});for(let[t,r]of O.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext),l=await (0,i.resolveRequests)(e,this.context,[...new Set([r,o])]);for(let e of R)e.url=e.url.replace(`__MO_LIGHTNINGCSS_LOADER_ICSS_URL_REPLACE_${t}__`,l??r)}}h.push(...R);let M=(0,s.getImportCode)(h,f),N=(0,s.getModuleCode)({css:a,map:r},S,g,f,this),x=(0,s.getExportCode)(d,g,f),P=`${M}${N}${x}`;_(null,P,r&&JSON.parse(r.toString()))}catch(e){_(e),(0,r.default)(e)}}
1
+ "use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return u}});const t=require("lightningcss"),r=(e=require("../../commom/log.mjs"))&&e.__esModule?e:{default:e},s=require("./codegen.cjs"),i=require("./utils.cjs");function o(e,t){return JSON.stringify(e.utils.contextify(e.context||e.rootContext,t))}const l=new TextEncoder,n={Declaration:{custom(e){if("content"===e.name&&1===e.value.length){let t=e.value[0];if("token"===t.type&&"string"===t.value.type)return[{property:e.name,raw:JSON.stringify(t.value.value.replace(/[\u4e00-\u9faF]/g,function(e){return`\\${e.charCodeAt(0).toString(16)}`}))}]}}}};async function u(e,u){let _=this.async();this.cacheable&&this.cacheable();let{implementation:a,visitor:p,rem:c,...f}=this.getOptions(),m=!!f.modules?.auto?.(this.resourcePath);if(m&&void 0===f.modules.namedExport&&(f.modules.namedExport=!0),a&&"function"!=typeof a.transform){_(TypeError(`[lightning-loader]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof a.transform}`));return}let d=[],h=[],R=[],S=[],g=[];f.modules?.exportOnlyLocals!==!0&&h.unshift({type:"api_import",importName:"___CSS_LOADER_API_IMPORT___",url:o(this,require.resolve("./runtime/api.cjs"))});let y=a?.transform?a.transform:t.transform,L=new Map,O=new Map,E=new Map,v=function(e,t,r,s,o,l){let n=new Map,u=!1,_=new Map,a=new Map,p=-1,c=-1;return{Rule:{import(s){let o;if(e.importFilter&&!e.importFilter(s.value.url,s.value.media))return s;let u=s.value.url;c++,l.set(c,u),u=`__MO_LIGHTNINGCSS_LOADER_IMPORT_URL_REPLACE_${c}__`;let _=s.value.media.mediaQueries.length?JSON.stringify(s.value.media.mediaQueries):void 0,a=(0,i.isUrlRequestable)(u);if(a){let e=u.split("!");e.length>1&&(u=e.pop(),o=e.join("!"))}if(!a)return t.push({url:u,media:_}),{type:"ignored",value:""};let p=o?`${o}!${u}`:u,f=n.get(p);if(!f){f=`___CSS_LOADER_AT_RULE_IMPORT_${n.size}___`,n.set(p,f);let t=e.urlHandler(p);r.push({type:"rule_import",importName:f,url:t})}return t.push({importName:f,media:_}),{type:"ignored",value:""}}},Url:t=>(function(t){let l,n=t.url;if(!e.urlFilter(n)||(0,i.isDataUrl)(n))return t;p++,o.set(p,n);let[,c,f]=(n=`__MO_LIGHTNINGCSS_LOADER_URL_REPLACE_${p}__`).split(/(\?)?#/,3),m=n.split("!");m.length>1&&(n=m.pop(),l=m.join("!"));let d=c?"?":"";d+=f?`#${f}`:"",u||(r.push({type:"get_url_import",importName:"___CSS_LOADER_GET_URL_IMPORT___",url:JSON.stringify(require.resolve("./runtime/get-url.cjs")),index:-1}),u=!0);let h=l?`${l}!${n}`:n,R=_.get(h);R||(R=`___CSS_LOADER_URL_IMPORT_${_.size}___`,_.set(h,R),r.push({type:"url",importName:R,url:JSON.stringify(h),index:p}));let S=JSON.stringify({newUrl:h,hash:d,needQuotes:!1}),g=a.get(S);return g||(g=`___CSS_LOADER_URL_REPLACEMENT_${a.size}___`,a.set(S,g),s.push({replacementName:g,importName:R,hash:d,needQuotes:!1})),{loc:t.loc,url:g}})(t)}}({urlHandler:e=>o(this,(0,i.getPreRequester)(this)(f.importLoaders??0)+e),urlFilter:(0,i.getFilter)(f.url,this.resourcePath),importFilter:(0,i.getFilter)(f.import,this.resourcePath),context:this.context},S,h,g,L,E),C=function({apis:e,imports:t,replacements:r,replacedUrls:s,urlHandler:i}){let o=-1,l=-1;return{Declaration:{composes(n){if("unparsed"===n.property)return;let u=n.value.from;if(u?.type!=="file")return;let _=u.value;if(!_)return;o++,s.set(o,_),_=`__MO_LIGHTNINGCSS_LOADER_ICSS_URL_REPLACE_${o}__`;let a=`___CSS_LOADER_ICSS_IMPORT_${t.length}___`;t.push({type:"icss_import",importName:a,icss:!0,url:i(_),index:o}),e.push({importName:a,dedupe:!0,index:o});let p=[];for(let e of n.value.names){l++;let t=`___CSS_LOADER_ICSS_IMPORT_${o}_REPLACEMENT_${l}___`;r.push({replacementName:t,importName:a,localName:e}),p.push(t)}return{property:"composes",value:{loc:n.value.loc,names:p,from:u}}}}}}({apis:S,imports:R,replacements:g,replacedUrls:O,urlHandler:e=>o(this,(0,i.getPreRequester)(this)(f.importLoaders)+e)});try{c&&!n.Length&&(n.Length=function(e){if("px"===e.unit)return{unit:"rem",value:e.value/16}});let{code:t,map:r,exports:o}=y({filename:this.resourcePath,code:l.encode(e),minify:!0,visitor:{...n,...v,...C,...p},cssModules:!!m&&{pattern:f.modules.localIdentName},sourceMap:this.sourceMap,inputSourceMap:this.sourceMap&&u?JSON.stringify(u):void 0,analyzeDependencies:!1,drafts:{customMedia:!0},include:1,errorRecovery:!1,unusedSymbols:[],...f}),a=t.toString();if(o){for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=o[e],r=t.name;for(let e of t.composes)r+=` ${e.name}`;d.push({name:e,value:r})}f.modules.getJSON?.({resourcePath:this.resourcePath,exports:d})}if(0!==L.size){let e=this.getResolve({conditionNames:["asset"],mainFields:["asset"],mainFiles:[],extensions:[]});for(let[t,r]of L.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext),l=await (0,i.resolveRequests)(e,this.context,[...new Set([o,r])]);for(let e of h)e.url=e.url.replace(`__MO_LIGHTNINGCSS_LOADER_URL_REPLACE_${t}__`,l??r)}}if(0!==E.size){let e=this.getResolve({conditionNames:["style"],extensions:[".css"],mainFields:["css","style","main","..."],mainFiles:["index","..."],restrictions:[/\.css$/i]});for(let[t,r]of E.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext),l=await (0,i.resolveRequests)(e,this.context,[...new Set([o,r])]);for(let e of h)e.url=e.url.replace(`__MO_LIGHTNINGCSS_LOADER_IMPORT_URL_REPLACE_${t}__`,l??r)}}if(0!==O.size){let e=this.getResolve({conditionNames:["style"],extensions:[],mainFields:["css","style","main","..."],mainFiles:["index","..."]});for(let[t,r]of O.entries()){let[s]=r.split(/(\?)?#/,3),o=(0,i.requestify)(s,this.rootContext);for(let s of(await (0,i.resolveRequests)(e,this.context,[...new Set([r,o])]),R))s.url=s.url.replace(`__MO_LIGHTNINGCSS_LOADER_ICSS_URL_REPLACE_${t}__`,r)}}h.push(...R);let M=(0,s.getImportCode)(h,f),N=(0,s.getModuleCode)({css:a,map:r},S,g,f,this),x=(0,s.getExportCode)(d,g,f),P=`${M}${N}${x}`;_(null,P,r&&JSON.parse(r.toString()))}catch(e){_(e),(0,r.default)(e)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.26.5",
3
+ "version": "3.26.6",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",