@visulima/packem 1.19.0 → 1.19.2
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/CHANGELOG.md +37 -0
- package/README.md +116 -107
- package/dist/builder/typedoc/index.cjs +3 -3
- package/dist/builder/typedoc/index.mjs +3 -3
- package/dist/cli/commands/build.d.mts +1 -4
- package/dist/cli/index.mjs +106 -103
- package/dist/config/index.d.cts +2 -8
- package/dist/config/index.d.mts +2 -8
- package/dist/config/index.d.ts +2 -8
- package/dist/config/preset/utils/infer-entries.d.mts +4 -5
- package/dist/config/utils/load-packem-config.d.mts +1 -1
- package/dist/constants.d.cts +5 -19
- package/dist/constants.d.mts +5 -19
- package/dist/constants.d.ts +5 -19
- package/dist/index.cjs +84 -81
- package/dist/index.d.cts +4 -10
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.mjs +85 -82
- package/dist/packem/build.d.cts +2 -5
- package/dist/packem/build.d.mts +2 -5
- package/dist/packem/build.d.ts +2 -5
- package/dist/packem/index.d.cts +5 -8
- package/dist/packem/index.d.mts +5 -8
- package/dist/packem/index.d.ts +5 -8
- package/dist/packem/utils/group-by-keys.d.cts +1 -1
- package/dist/packem/utils/group-by-keys.d.mts +1 -1
- package/dist/packem/utils/group-by-keys.d.ts +1 -1
- package/dist/packem_shared/Mime-BEcV1ESr.mjs +3 -0
- package/dist/packem_shared/Mime-UGY_zUAS.cjs +1 -0
- package/dist/packem_shared/{constants-CR0qfKZx.cjs → constants-DIrGIX0w.cjs} +1 -1
- package/dist/packem_shared/{constants-CwJdgxph.mjs → constants-Eq2rMfX-.mjs} +1 -1
- package/dist/packem_shared/{create-or-update-key-storage-Bm-Xu0uJ.mjs → create-or-update-key-storage-BATQud1F.mjs} +1 -1
- package/dist/packem_shared/create-or-update-key-storage-DKcZnYd5.cjs +3 -0
- package/dist/packem_shared/{url-I6Jx3crl.mjs → url-BJXna-1T.mjs} +1 -1
- package/dist/packem_shared/{url-DFE8cAA0.cjs → url-C84CQz1g.cjs} +1 -1
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.cts +12 -12
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.mts +12 -12
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.ts +12 -12
- package/dist/rollup/plugins/cjs-interop.d.cts +2 -2
- package/dist/rollup/plugins/cjs-interop.d.mts +2 -2
- package/dist/rollup/plugins/cjs-interop.d.ts +2 -2
- package/dist/rollup/plugins/copy.d.cts +6 -8
- package/dist/rollup/plugins/copy.d.mts +6 -8
- package/dist/rollup/plugins/copy.d.ts +6 -8
- package/dist/rollup/plugins/css/loaders/less/index.cjs +1 -1
- package/dist/rollup/plugins/css/loaders/less/index.mjs +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.cjs +2 -2
- package/dist/rollup/plugins/css/loaders/lightningcss.mjs +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.cts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.mts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.ts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/index.cjs +3 -3
- package/dist/rollup/plugins/css/loaders/postcss/index.mjs +3 -3
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/index.cjs +6 -6
- package/dist/rollup/plugins/css/loaders/sass/index.mjs +7 -7
- package/dist/rollup/plugins/css/loaders/sass/types.d.cts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/types.d.mts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/types.d.ts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.cts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.mts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.ts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.cts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.mts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.ts +4 -4
- package/dist/rollup/plugins/css/loaders/types.d.cts +15 -15
- package/dist/rollup/plugins/css/loaders/types.d.mts +15 -15
- package/dist/rollup/plugins/css/loaders/types.d.ts +15 -15
- package/dist/rollup/plugins/css/minifiers/lightningcss.cjs +2 -2
- package/dist/rollup/plugins/css/minifiers/lightningcss.mjs +2 -2
- package/dist/rollup/plugins/css/minifiers/types.d.cts +4 -4
- package/dist/rollup/plugins/css/minifiers/types.d.mts +4 -4
- package/dist/rollup/plugins/css/minifiers/types.d.ts +4 -4
- package/dist/rollup/plugins/css/runtime/inject-css.cjs +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.cts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.mts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.ts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.mjs +1 -1
- package/dist/rollup/plugins/css/types.d.cts +75 -75
- package/dist/rollup/plugins/css/types.d.mts +75 -75
- package/dist/rollup/plugins/css/types.d.ts +75 -75
- package/dist/rollup/plugins/css/utils/load-module.d.cts +2 -2
- package/dist/rollup/plugins/css/utils/load-module.d.mts +2 -2
- package/dist/rollup/plugins/css/utils/load-module.d.ts +2 -2
- package/dist/rollup/plugins/css/utils/url.d.cts +2 -3
- package/dist/rollup/plugins/css/utils/url.d.mts +2 -3
- package/dist/rollup/plugins/css/utils/url.d.ts +2 -3
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.cts +2 -2
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.mts +2 -2
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.ts +2 -2
- package/dist/rollup/plugins/esbuild/index.cjs +1 -1
- package/dist/rollup/plugins/esbuild/index.mjs +2 -2
- package/dist/rollup/plugins/esbuild/types.d.cts +18 -18
- package/dist/rollup/plugins/esbuild/types.d.mts +18 -18
- package/dist/rollup/plugins/esbuild/types.d.ts +18 -18
- package/dist/rollup/plugins/jsx-remove-attributes.d.cts +2 -2
- package/dist/rollup/plugins/jsx-remove-attributes.d.mts +2 -2
- package/dist/rollup/plugins/jsx-remove-attributes.d.ts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.cts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.mts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.ts +2 -2
- package/dist/rollup/plugins/oxc/oxc-transformer.cjs +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.mjs +1 -1
- package/dist/rollup/plugins/oxc/types.d.cts +5 -5
- package/dist/rollup/plugins/oxc/types.d.mts +5 -5
- package/dist/rollup/plugins/oxc/types.d.ts +5 -5
- package/dist/rollup/plugins/plugin-cache.d.cts +4 -5
- package/dist/rollup/plugins/plugin-cache.d.mts +4 -5
- package/dist/rollup/plugins/plugin-cache.d.ts +4 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.cts +3 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.mts +3 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.ts +3 -5
- package/dist/rollup/plugins/sucrase/index.cjs +1 -1
- package/dist/rollup/plugins/sucrase/index.mjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.cjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
- package/dist/rollup/plugins/swc/types.d.cts +2 -2
- package/dist/rollup/plugins/swc/types.d.mts +2 -2
- package/dist/rollup/plugins/swc/types.d.ts +2 -2
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.cts +0 -1
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.mts +0 -1
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.ts +0 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.cts +1 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.mts +1 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.ts +1 -1
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.cts +2 -2
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.mts +2 -2
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.ts +2 -2
- package/dist/rollup/plugins/url.d.cts +4 -13
- package/dist/rollup/plugins/url.d.mts +4 -13
- package/dist/rollup/plugins/url.d.ts +4 -13
- package/dist/rollup/utils/chunks/create-split-chunks.d.cts +1 -1
- package/dist/rollup/utils/chunks/create-split-chunks.d.mts +1 -1
- package/dist/rollup/utils/chunks/create-split-chunks.d.ts +1 -1
- package/dist/rollup/utils/get-hash.d.cts +1 -1
- package/dist/rollup/utils/get-hash.d.mts +1 -1
- package/dist/rollup/utils/get-hash.d.ts +1 -1
- package/dist/rollup/utils/svg-encoder.d.cts +4 -0
- package/dist/rollup/utils/svg-encoder.d.mts +2 -0
- package/dist/rollup/utils/svg-encoder.d.ts +4 -0
- package/dist/types.d.cts +213 -215
- package/dist/types.d.mts +213 -215
- package/dist/types.d.ts +213 -215
- package/dist/utils/extract-export-filenames.d.cts +2 -2
- package/dist/utils/extract-export-filenames.d.mts +2 -2
- package/dist/utils/extract-export-filenames.d.ts +2 -2
- package/dist/utils/file-cache.d.cts +2 -1
- package/dist/utils/file-cache.d.mts +2 -1
- package/dist/utils/file-cache.d.ts +2 -1
- package/dist/utils/get-package-side-effect.d.cts +1 -1
- package/dist/utils/get-package-side-effect.d.mts +1 -1
- package/dist/utils/get-package-side-effect.d.ts +1 -1
- package/dist/utils/kill-process.d.cts +4 -5
- package/dist/utils/kill-process.d.mts +4 -5
- package/dist/utils/kill-process.d.ts +4 -5
- package/dist/utils/replace-content-within-marker.d.cts +2 -2
- package/dist/utils/replace-content-within-marker.d.mts +2 -2
- package/dist/utils/replace-content-within-marker.d.ts +2 -2
- package/files.d.ts +40 -0
- package/package.json +28 -28
- package/dist/packem_shared/Mime-DDqfACcK.cjs +0 -1
- package/dist/packem_shared/Mime-DfuxWtpt.mjs +0 -3
- package/dist/packem_shared/create-or-update-key-storage-mzqiq3Nk.cjs +0 -3
- /package/dist/utils/{levenstein.d.cts → find-alternatives.d.cts} +0 -0
- /package/dist/utils/{levenstein.d.mts → find-alternatives.d.mts} +0 -0
- /package/dist/utils/{levenstein.d.ts → find-alternatives.d.ts} +0 -0
- /package/dist/utils/{memoize.d.cts → memoize-by-key.d.cts} +0 -0
- /package/dist/utils/{memoize.d.mts → memoize-by-key.d.mts} +0 -0
- /package/dist/utils/{memoize.d.ts → memoize-by-key.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var ke=Object.defineProperty;var d=(e,t)=>ke(e,"name",{value:t,configurable:!0});import{fileURLToPath as Re}from"node:url";import Ee from"@csstools/postcss-slow-plugins";import{makeLegalIdentifier as q}from"@rollup/pluginutils";import{dirname as S,normalize as x,parse as Z,resolve as Ne,basename as I,isAbsolute as Ie,join as pe,relative as Ce}from"@visulima/path";import Ue from"postcss";import{r as F}from"../../../../../packem_shared/resolve-C7N_MxXM.mjs";import{f as K,d as De,e as A,p as Le,g as _e}from"../../../../../packem_shared/Mime-
|
|
2
|
-
`)})},"applyRaws");var Rt=Object.defineProperty,Et=d((e,t)=>Rt(e,"name",{value:t,configurable:!0}),"t$1");const Nt=Et((e,t)=>{t.nodes=[],e.charset&&(e.charset.parent=void 0,t.append(e.charset)),e.statements.forEach(s=>{_(s)?(s.node.parent=void 0,t.append(s.node)):Q(s)&&s.nodes.forEach(n=>{n.parent=void 0,t.append(n)})})},"applyStyles");var It=Object.defineProperty,Ct=d((e,t)=>It(e,"name",{value:t,configurable:!0}),"o$3");const Ut=Ct((e,t,s)=>{const n={baseDirs:[t],caller:"@import resolver",extensions:s},o=new URL(e,"file://").pathname,r=[o];return(Be(o)||o.startsWith("/"))&&r.push(
|
|
1
|
+
var ke=Object.defineProperty;var d=(e,t)=>ke(e,"name",{value:t,configurable:!0});import{fileURLToPath as Re}from"node:url";import Ee from"@csstools/postcss-slow-plugins";import{makeLegalIdentifier as q}from"@rollup/pluginutils";import{dirname as S,normalize as x,parse as Z,resolve as Ne,basename as I,isAbsolute as Ie,join as pe,relative as Ce}from"@visulima/path";import Ue from"postcss";import{r as F}from"../../../../../packem_shared/resolve-C7N_MxXM.mjs";import{f as K,d as De,e as A,p as Le,g as _e}from"../../../../../packem_shared/Mime-BEcV1ESr.mjs";import{H as L,m as D,D as Fe,F as se}from"../../../../../packem_shared/sourcemap-Crbje9In.mjs";import{n as re}from"../../../../../packem_shared/ensure-auto-modules-BU3xWEjl.mjs";import{extractICSS as Te,replaceSymbols as We,replaceValueSymbols as Ae}from"icss-utils";import{readFile as Me,readFileSync as le}from"@visulima/fs";import{isRelative as Be}from"@visulima/path/utils";import{isWhiteSpaceOrCommentNode as H,isSimpleBlockNode as Xe,SimpleBlockNode as Ge,parseListOfComponentValues as Je,isTokenNode as M,isFunctionNode as U,stringify as E}from"@csstools/css-parser-algorithms";import{isTokenOpenParen as He,TokenType as oe,tokenize as ze,isTokenString as B,isTokenURL as ne,isTokenIdent as Ve}from"@csstools/css-tokenizer";import{findMonorepoRoot as Qe,findPackageRoot as Ye}from"@visulima/package";import qe from"postcss-load-config";import Ze from"postcss-modules-extract-imports";import Ke from"postcss-modules-local-by-default";import et from"postcss-modules-scope";import tt from"postcss-modules-values";import z from"postcss-value-parser";var st=Object.defineProperty,rt=d((e,t)=>st(e,"name",{value:t,configurable:!0}),"e$3");const ot=rt((e,...t)=>{const s=K([e,"0iOXBLSx",...t].join(":")).slice(0,8);return q(`${e}_${s}`)},"default");var nt=Object.defineProperty,it=d((e,t)=>nt(e,"name",{value:t,configurable:!0}),"i$4");const at=it(async(e,t,s,n,o)=>{const r=F([e,`./${e}`],{baseDirs:[S(t)],caller:"ICSS loader",extensions:s}),i=await Me(r),{messages:p}=await n.process(i,{...o,from:r}),l={};for(const c of p)c.type==="icss"&&Object.assign(l,c.export);return l},"load");var ct=Object.defineProperty,pt=d((e,t)=>ct(e,"name",{value:t,configurable:!0}),"t$3");const lt=pt(async(e,t,s,n,o,r)=>{const i={};for await(const[p,l]of Object.entries(e)){const c=await t(p,s,n,o,r);for(const[a,f]of Object.entries(l))i[a]=c[f]}return i},"resolve");var ut=Object.defineProperty,ft=d((e,t)=>ut(e,"name",{value:t,configurable:!0}),"c$4");const X="styles-icss",mt=[".css",".pcss",".postcss",".sss"],ue=ft(e=>{const t=e?.load??at,s=e?.extensions??mt;return{async OnceExit(n,{result:o}){if(!n.source?.input.file)return;const r={...o.opts,map:void 0},{icssExports:i,icssImports:p}=Te(n),l=await lt(p,t,n.source.input.file,s,o.processor,r);We(n,l);for(const[c,a]of Object.entries(i))o.messages.push({export:{[c]:Ae(a,l)},plugin:X,type:"icss"});for(const c of Object.keys(p))o.messages.push({import:c,plugin:X,type:"icss-dependency"})},postcssPlugin:X}},"plugin");ue.postcss=!0;var dt=Object.defineProperty,ht=d((e,t)=>dt(e,"name",{value:t,configurable:!0}),"t$2");const V=ht((e,t,s,n)=>{const o=[];if(e!==void 0){let r="layer";e&&(r=`layer(${e})`),o.push(r)}return s!==void 0&&o.push(`supports(${s})`),n!==void 0&&o.push(`scope(${n})`),t!==void 0&&o.push(t),o.join(" ")},"formatImportPrelude");var gt=Object.defineProperty,vt=d((e,t)=>gt(e,"name",{value:t,configurable:!0}),"p$4");const yt=vt((e,t)=>{t.reverse();const s=t.pop();if(!s)return e;let n=`${e} ${V(s.layer,s.media,s.supports,s.scope)}`;for(const o of t)n=`'data:text/css;base64,${Buffer.from(`@import ${n}`).toString("base64")}' ${V(o.layer,o.media,o.supports,o.scope)}`;return n},"base64EncodedConditionalImport");var $t=Object.defineProperty,T=d((e,t)=>$t(e,"name",{value:t,configurable:!0}),"e$2");const bt=T(e=>e.type==="warning","isWarning"),Q=T(e=>e.type==="nodes","isNodesStatement"),_=T(e=>e.type==="import","isImportStatement"),wt=T(e=>e.type==="pre-import","isPreImportStatement");var St=Object.defineProperty,jt=d((e,t)=>St(e,"name",{value:t,configurable:!0}),"u$1");const Ot=jt((e,t)=>{e.statements.forEach((s,n)=>{if(bt(s)||wt(s)||s.conditions.length===0)return;if(_(s)){s.node.params=yt(s.fullUri,s.conditions);return}const{nodes:o}=s;if(o.length===0)return;const{parent:r}=o[0];if(!r)return;const i=[];for(const c of s.conditions){if(c.media!==void 0){const a=t({name:"media",params:c.media,source:s.importingNode?.source??r.source});i.push(a)}if(c.scope!==void 0){const a=t({name:"scope",params:c.scope,source:s.importingNode?.source??r.source});i.push(a)}if(c.supports!==void 0){const a=t({name:"supports",params:`(${c.supports})`,source:s.importingNode?.source??r.source});i.push(a)}if(c.layer!==void 0){const a=t({name:"layer",params:c.layer,source:s.importingNode?.source??r.source});i.push(a)}}const p=i[0];if(!p)return;for(let c=0;c<i.length-1;c++)i[c].append(i[c+1]);const l=i.at(-1);r.insertBefore(o[0],p),o.forEach(c=>{c.parent=void 0}),l.append(o),e.statements[n]={conditions:s.conditions,from:s.from,importingNode:s.importingNode,nodes:[p],type:"nodes"}})},"applyConditions");var Pt=Object.defineProperty,xt=d((e,t)=>Pt(e,"name",{value:t,configurable:!0}),"r$4");const kt=xt(e=>{e.statements.forEach((t,s)=>{if(s!==0)if(t.parent!==void 0){const{before:n}=t.parent.node.raws;Q(t)?t.nodes[0].raws.before=n:t.node.raws.before=n}else Q(t)&&(t.nodes[0].raws.before=t.nodes[0].raws.before??`
|
|
2
|
+
`)})},"applyRaws");var Rt=Object.defineProperty,Et=d((e,t)=>Rt(e,"name",{value:t,configurable:!0}),"t$1");const Nt=Et((e,t)=>{t.nodes=[],e.charset&&(e.charset.parent=void 0,t.append(e.charset)),e.statements.forEach(s=>{_(s)?(s.node.parent=void 0,t.append(s.node)):Q(s)&&s.nodes.forEach(n=>{n.parent=void 0,t.append(n)})})},"applyStyles");var It=Object.defineProperty,Ct=d((e,t)=>It(e,"name",{value:t,configurable:!0}),"o$3");const Ut=Ct((e,t,s)=>{const n={baseDirs:[t],caller:"@import resolver",extensions:s},o=new URL(e,"file://").pathname,r=[o];return(Be(o)||o.startsWith("/"))&&r.push(`.${o}`),o.startsWith("/")&&r.push(o.slice(1)),F(r,n)},"importResolve");var Dt=Object.defineProperty,fe=d((e,t)=>Dt(e,"name",{value:t,configurable:!0}),"e$1");const Lt=/^data:text\/css(?:;(?:base64|plain))?,/i,_t=/^data:text\/css;base64,/i,Ft=/^data:text\/css;plain,/i,Y=fe(e=>e!==void 0&&Lt.test(e),"isValidDataURL"),Tt=fe(e=>_t.test(e)?Buffer.from(e.slice(21),"base64").toString():Ft.test(e)?decodeURIComponent(e.slice(20)):decodeURIComponent(e.slice(14)),"dataURLContents");var Wt=Object.defineProperty,At=d((e,t)=>Wt(e,"name",{value:t,configurable:!0}),"o$1");const Mt="css-noop",ee=At(()=>({postcssPlugin:Mt}),"noopPlugin");ee.postcss=!0;var Bt=Object.defineProperty,me=d((e,t)=>Bt(e,"name",{value:t,configurable:!0}),"a$3");const de=me(async(e,t,s,n,o,r)=>(r===void 0&&(r=0),n.length===0&&n.push(ee()),await e(n).process(t,{from:s,parser:o[r]}).catch(async i=>{if(r++,r===o.length)throw i;return await de(e,t,s,n,o,r)})),"runPostcss"),Xt=me(async(e,t,s,n,o)=>{const{plugins:r}=n,i=[];return e.opts.syntax?.parse&&i.push(e.opts.syntax.parse),e.opts.parser&&i.push(e.opts.parser),i.push(void 0),await de(o,t,s,r,i)},"processContent"),Gt=/^charset$/i,he=/^import$/i,Jt=/^url$/i,C=/^layer$/i,Ht=/^supports$/i,zt=/^scope$/i;var Vt=Object.defineProperty,te=d((e,t)=>Vt(e,"name",{value:t,configurable:!0}),"a$2");const Qt=te(e=>{for(let t=0;t<e.length;t++){const s=e[t];if(!H(s)&&Xe(s)&&He(s.startToken))return e}return[new Ge([oe.OpenParen,"(",-1,-1,void 0],[oe.CloseParen,")",-1,-1,void 0],e)]},"wrapInParenthesisIfNeeded"),ie=te(e=>{if(e.startsWith("#"))return"";if(!e.includes("#"))return e;try{const t=new URL(e,"http://example.com");return t.hash?e.slice(0,e.length-t.hash.length):e}catch{return e}},"stripHash"),Yt=te(e=>{const t=ze({css:e});if(t.length===2&&(B(t[0])||ne(t[0]))){let c=t[0][4].value;return c=ie(c),c?{fullUri:t[0][1],uri:c}:!1}const s=Je(t);let n="",o="",r,i,p,l;for(let c=0;c<s.length;c++){const a=s[c];if(!H(a)){if(M(a)&&(B(a.value)||ne(a.value))){if(n)return!1;n=a.value[4].value,o=a.value[1];continue}if(U(a)&&Jt.test(a.getName())){if(n)return!1;for(let f=0;f<a.value.length;f++){const u=a.value[f];if(!H(u)){if(!n&&M(u)&&B(u.value)){n=u.value[4].value,o=E([[a]]);continue}return!1}}continue}if(!n)return!1;if(M(a)&&Ve(a.value)&&C.test(a.value[4].value)){if(r!==void 0||p!==void 0)return!1;r="";continue}if(U(a)&&C.test(a.getName())){if(r!==void 0||p!==void 0)return!1;r=E([a.value]);continue}if(U(a)&&Ht.test(a.getName())){if(p!==void 0)return!1;p=E([a.value]);continue}if(U(a)&&zt.test(a.getName())){if(l!==void 0)return!1;l=E([Qt(a.value)]);continue}i=E([s.slice(c)]);break}}return n=ie(n),n?{fullUri:o,layer:r,media:i,scope:l,supports:p,uri:n}:!1},"parseAtImport");var qt=Object.defineProperty,k=d((e,t)=>qt(e,"name",{value:t,configurable:!0}),"l");const ge=k((e,t,s,n)=>{const o=[];let r=t;const i=e.length;for(r;r<i;r++){const p=e[r];if(o.push(p),e[r+1]?.type!=="comment")break}return[r,{conditions:[],from:n,importingNode:s,nodes:o,type:"nodes"}]},"consumeComments"),Zt=k((e,t,s,n,o)=>{const r=Yt(t.params);if(!r)return e.warn(`Invalid @import statement in '${t.toString()}'`,{node:t});const i={conditions:[...n],from:o,fullUri:r.fullUri,importingNode:s,node:t,type:"import",uri:r.uri};return(r.layer!==void 0||r.media!==void 0||r.supports!==void 0||r.scope!==void 0)&&i.conditions.push({layer:r.layer,media:r.media,scope:r.scope,supports:r.supports}),i},"parseImport"),Kt=k((e,t,s,n,o,r)=>{const i=[];let p=n;const l=t.length;for(p;p<l;p++){const c=t[p];if(c.type==="comment"){const[a,f]=ge(t,p,o,r);i.push(f),p=a;continue}if(c.type==="atrule"&&he.test(c.name)){i.push(Zt(e,c,o,s,r));continue}break}return[p-1,i]},"consumeImports"),es=k((e,t,s,n,o)=>{const r=[];let i=s;const p=e.length;for(i;i<p;i++){const l=e[i];r.push(l);const c=e[i+1];if(!(c&&c.type==="atrule"&&C.test(c.name)&&!c.nodes))break}return[i,{conditions:[...t],from:o,importingNode:n,nodes:r,type:"nodes"}]},"consumeLayers"),ts=k((e,t,s,n,o)=>{const r=[];let i=s;const p=e.length;for(i;i<p;i++){const l=e[i];if(l.type==="comment"){const[c,a]=ge(e,i,n,o);r.push(a),i=c;continue}if(l.type==="atrule"&&C.test(l.name)&&!l.nodes)if(t.length>0){r.push({conditions:[...t],from:o,importingNode:n,node:l,type:"pre-import"});continue}else{const[c,a]=es(e,t,i,n,o);r.push(a),i=c;continue}break}return[i-1,r]},"consumeBeforeImports"),ve=k((e,t,s,n,o)=>{const r={statements:[]};if(t.type==="document")return t.each(f=>{const u=ve(e,f,s,n,o);if(r.charset&&u.charset&&r.charset.params.toLowerCase()!==u.charset.params.toLowerCase())throw u.charset.error(`Incompatible @charset statements:
|
|
3
3
|
${u.charset.params} specified in ${u.charset.source?.input.file}
|
|
4
4
|
${r.charset.params} specified in ${r.charset.source?.input.file}`);!r.charset&&u.charset&&(r.charset=u.charset),r.statements.push(...u.statements)}),r;let i,p=[],l=[],c;for(let f=0;f<t.nodes.length;f++){const u=t.nodes[f];if(f===0&&u.type==="atrule"&&Gt.test(u.name)){i=u;continue}if(l.length===0&&(u.type==="comment"||u.type==="atrule"&&C.test(u.name)&&!u.nodes)){[f,p]=ts(t.nodes,n,f,s,o);continue}if(l.length===0&&u.type==="atrule"&&he.test(u.name)){[f,l]=Kt(e,t.nodes,n,f,s,o);continue}c={conditions:[...n],from:o,importingNode:s,nodes:t.nodes.slice(f),type:"nodes"};break}const a=[];return p.length>0&&a.push(...p),l.length>0&&a.push(...l),c&&a.push(c),{charset:i,statements:a}},"parseStylesheet");var ss=Object.defineProperty,W=d((e,t)=>ss(e,"name",{value:t,configurable:!0}),"h");const rs=/^(?:[a-z]+:)?\/\//i,os=W(e=>{if(rs.test(e))return!1;try{if(new URL(e,"https://example.com").search)return!1}catch{}return!0},"isProcessableURL"),ae=W(async(e,t,s,n,o,r)=>{const{conditions:i,from:p,node:l}=t,c=i.map(h=>V(h.layer,h.media,h.supports,h.scope)).join(":");if(n.skipDuplicates){if(o.importedFiles[s]?.[c])return{statements:[]};o.importedFiles[s]||(o.importedFiles[s]={}),o.importedFiles[s][c]=!0}if(p.includes(s))return{statements:[]};const a=await n.load(s,n);if(a.trim()===""&&n.warnOnEmpty)return e.warn(`${s} is empty`,{node:l}),{statements:[]};if(n.skipDuplicates&&o.hashFiles[a]?.[c])return{statements:[]};const f=await Xt(e,a,s,n,r),u=f.root;return n.debug&&u.append({text:s}),e.messages=[...e.messages,...f.messages],n.skipDuplicates&&(u.some(h=>h.type==="atrule"&&h.name==="import")||(o.hashFiles[a]||(o.hashFiles[a]={}),o.hashFiles[a][c]=!0)),await ye(n,e,u,o,l,i,[...p,s],r)},"loadImportContent"),ns=W(async(e,t,s,n,o)=>{if(Y(s.uri)){s.stylesheet=await ae(t,s,s.uri,e,n,o);return}if(Y(s.from.at(-1))){s.stylesheet={statements:[]},t.warn(`Unable to import '${s.uri}' from a stylesheet that is embedded in a data url`,{node:s.node});return}const r=s.node;let i;r.source?.input.file&&(i=r.source.input.file);const p=i?S(i):e.root;for(const[c,a]of Object.entries(e.alias))s.uri!==c&&!s.uri.startsWith(`${c}/`)||(s.uri=x(a)+s.uri.slice(c.length));let l;try{l=await e.resolve(s.uri,p,e.extensions,r)}catch{s.node.warn(t,`Unable to resolve "${s.uri}" from "${p}"`);return}t.messages.push({file:l,parent:i,plugin:"packem-postcss-import",type:"dependency"}),s.stylesheet=await ae(t,s,l,e,n,o)},"resolveImportId"),ye=W(async(e,t,s,n,o,r,i,p)=>{let{charset:l,statements:c}=ve(t,s,o,r,i);{const a=[];for await(const f of c)!_(f)||!os(f.uri)||e.filter&&!e.filter(f.uri)||a.push(ns(e,t,f,n,p));a.length>0&&await Promise.all(a)}for(let a=0;a<c.length;a++){const f=c[a];if(_(f)&&f.stylesheet){if(l&&f.stylesheet.charset&&l.params.toLowerCase()!==f.stylesheet.charset.params.toLowerCase())throw f.stylesheet.charset.error(`Incompatible @charset statements:
|
|
5
5
|
${f.stylesheet.charset.params} specified in ${f.stylesheet.charset.source?.input.file}
|
|
6
|
-
${l.params} specified in ${l.source?.input.file}`);!l&&f.stylesheet.charset&&(l=f.stylesheet.charset),c.splice(a,1,...f.stylesheet.statements),a--}}return{charset:l,statements:c}},"parseStyles");var is=Object.defineProperty,as=d((e,t)=>is(e,"name",{value:t,configurable:!0}),"r$2");const cs=as(e=>Y(e)?Tt(e):le(e),"loadContent");var ps=Object.defineProperty,ls=d((e,t)=>ps(e,"name",{value:t,configurable:!0}),"i");const us="css-import",fs=[".css",".pcss",".postcss",".sss"],$e=ls(e=>{const t={alias:e?.alias??{},extensions:e?.extensions??fs,load:cs,plugins:[],resolve:e?.resolve??Ut,skipDuplicates:!1,...e};return{async Once(s,{atRule:n,postcss:o,result:r}){const i={hashFiles:{},importedFiles:{}};if(s.source?.input.file&&(i.importedFiles[s.source.input.file]={}),!Array.isArray(t.plugins))throw new TypeError("plugins option must be an array");const p=await ye(t,r,s,i,
|
|
6
|
+
${l.params} specified in ${l.source?.input.file}`);!l&&f.stylesheet.charset&&(l=f.stylesheet.charset),c.splice(a,1,...f.stylesheet.statements),a--}}return{charset:l,statements:c}},"parseStyles");var is=Object.defineProperty,as=d((e,t)=>is(e,"name",{value:t,configurable:!0}),"r$2");const cs=as(e=>Y(e)?Tt(e):le(e),"loadContent");var ps=Object.defineProperty,ls=d((e,t)=>ps(e,"name",{value:t,configurable:!0}),"i");const us="css-import",fs=[".css",".pcss",".postcss",".sss"],$e=ls(e=>{const t={alias:e?.alias??{},extensions:e?.extensions??fs,load:cs,plugins:[],resolve:e?.resolve??Ut,skipDuplicates:!1,...e};return{async Once(s,{atRule:n,postcss:o,result:r}){const i={hashFiles:{},importedFiles:{}};if(s.source?.input.file&&(i.importedFiles[s.source.input.file]={}),!Array.isArray(t.plugins))throw new TypeError("plugins option must be an array");const p=await ye(t,r,s,i,void 0,[],[],o);kt(p),Ot(p,n),Nt(p,s)},postcssPlugin:us}},"plugin");$e.postcss=!0;var ms=Object.defineProperty,ds=d((e,t)=>ms(e,"name",{value:t,configurable:!0}),"p$1");let G;const hs=ds(async(e,t,s,n)=>{if(!n)return{file:"",options:{},plugins:[]};const{dir:o}=Z(e),r=n.path?Ne(n.path):o;let i;try{i=(await Qe(t)).path}catch{try{i=await Ye(t)}catch{}}try{let p;G?p=G:(p=await qe({cwd:t,env:s,...n.ctx},r,{stopDir:i}),G=p);const l={file:p.file,options:p.options,plugins:await De(p.plugins,t)};return l.options.parser&&(l.options.parser=await A(l.options.parser,"parser",t)),l.options.syntax&&(l.options.syntax=await A(l.options.syntax,"syntax",t)),l.options.stringifier&&(l.options.stringifier=await A(l.options.stringifier,"stringifier",t)),l}catch(p){if(p.message.includes("No PostCSS Config found in"))return{file:"",options:{},plugins:[]};throw p}},"loadConfig");var gs=Object.defineProperty,vs=d((e,t)=>gs(e,"name",{value:t,configurable:!0}),"n$2");const ys=vs((e="[name]_[local]_[hash:8]")=>(t,s,n)=>{const{base:o,dir:r,name:i}=Z(s),p=K(`${o}:${n}`),l=L.exec(e),c=l&&Number.parseInt(l[1],10);return q(e.replace("[dir]",I(r)).replace("[name]",i.replace(/\.module$/,"")).replace("[local]",t).replace(L,c?p.slice(0,c):p))},"generate");var $s=Object.defineProperty,bs=d((e,t)=>$s(e,"name",{value:t,configurable:!0}),"r$1");const ws=bs(e=>{const t={mode:"local",...e,generateScopedName:typeof e.generateScopedName=="function"?e.generateScopedName:ys(e.generateScopedName)};return[tt(),Ke({mode:t.mode}),Ze({failOnWrongOrder:t.failOnWrongOrder}),et({exportGlobals:t.exportGlobals,generateScopedName:t.generateScopedName})]},"default");var Ss=Object.defineProperty,js=d((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"c$2");const Os=js((e,t,s)=>{const{base:n,dir:o,ext:r,name:i}=Z(t),p=K(`${n}:${Buffer.from(s).toString()}`),l=L.exec(e),c=l&&Number.parseInt(l[1],10);return e.replace("[dir]",I(o)).replace("[name]",i).replace("[extname]",r).replace(".[ext]",r).replace("[ext]",r.slice(1)).replace(L,c?p.slice(0,c):p.slice(0,8))},"default"),Ps=new Le(_e)._freeze();var xs=Object.defineProperty,ks=d((e,t)=>xs(e,"name",{value:t,configurable:!0}),"r");const Rs=ks((e,t)=>{const s=Ps.getType(e)??"application/octet-stream",n=Buffer.from(t).toString("base64");return`data:${s};base64,${n}`},"default");var Es=Object.defineProperty,Ns=d((e,t)=>Es(e,"name",{value:t,configurable:!0}),"a");const Is=Ns(async(e,t)=>{const s=new URL(e,"file://"),n=s.hash?s.hash.slice(1):"",o=e.split("?")[0]??"",r=[o];o.startsWith("/")&&r.push(`.${o}`),!o.startsWith("/")&&!o.startsWith(".")&&r.push(`./${o}`);const i=F(r,{baseDirs:t,caller:"URL resolver"}),p=new URLSearchParams(s.search).toString();return{from:i,source:le(i,{buffer:!0}),urlQuery:(p?`?${p}`:"")+(n?`#${n}`:"")}},"urlResolve");var Cs=Object.defineProperty,be=d((e,t)=>Cs(e,"name",{value:t,configurable:!0}),"n");const ce=/^url$/i,Us=/^(?:-webkit-)?image-set$/i,Ds=be(e=>/(?:url|(?:-webkit-)?image-set)\(/i.test(e.value),"isDeclWithUrl"),Ls=be((e,t)=>{e.walk(s=>{if(s.type==="function"){if(ce.test(s.value)){const{nodes:n}=s,[o]=n,r=o?.type==="string"?o.value:z.stringify(n);t(r.replaceAll(/^\s+|\s+$/g,""),o);return}if(Us.test(s.value))for(const n of s.nodes){if(n.type==="string"){t(n.value.replaceAll(/^\s+|\s+$/g,""),n);continue}if(n.type==="function"&&ce.test(n.value)){const{nodes:o}=n,[r]=o,i=r?.type==="string"?r.value:z.stringify(o);t(i.replaceAll(/^\s+|\s+$/g,""),r)}}}})},"walkUrls");var _s=Object.defineProperty,Fs=d((e,t)=>_s(e,"name",{value:t,configurable:!0}),"$");const J="packem-css-url",Ts="assets/[name]-[hash][extname]",Ws="assets/[name][extname]",As="./assets/",Ms=".",we=Fs(e=>{const t={alias:{},assetDir:Ms,inline:!1,resolve:Is,...e},s=t.hash??!0?typeof t.hash=="string"?t.hash:Ts:Ws;return{async Once(n,{result:o}){if(!n.source?.input.file)return;const{file:r}=n.source.input,i=D(n.source.input.map?.text??void 0).resolve(S(r)).toConsumer(),p=[],l=new Set(o.messages.filter(a=>a.type==="dependency").map(a=>a.file));n.walkDecls(a=>{if(!Ds(a))return;const f=z(a.value);Ls(f,(u,h)=>{for(const[y,v]of Object.entries(t.alias))u!==y&&!u.startsWith(`${y}/`)||(u=x(v)+u.slice(y.length));if(!h||u.length===0){a.warn(o,`Empty URL in \`${a.toString()}\``);return}if(Fe.test(u))return;if(!Ie(u))try{new URL(u);return}catch{}const b=new Set;if(a.source?.input.file&&l.has(a.source.input.file)&&b.add(S(a.source.input.file)),a.source?.start){const y=a.source.start,v=i?.originalPositionFor(y),w=v?.source&&S(v.source);w&&b.add(x(w))}b.add(S(r)),p.push({baseDirs:b,decl:a,node:h,parsed:f,url:u})})});const c=new Map;for await(const{baseDirs:a,decl:f,node:u,parsed:h,url:b}of p){let y;try{y||(y=await t.resolve(b,[...a]))}catch{}if(!y){f.warn(o,`Unresolved URL \`${b}\` in \`${f.toString()}\``);continue}const{from:v,source:w,urlQuery:m}=y;if(!(w instanceof Uint8Array)||typeof v!="string"){f.warn(o,`Incorrectly resolved URL \`${b}\` in \`${f.toString()}\``);continue}if(o.messages.push({file:v,plugin:J,type:"dependency"}),t.inline)u.type="string",u.value=Rs(v,w);else{const $=x(Os(s,v,w));let g=$;const j=se.test($);for(let O=1;c.has(g)&&c.get(g)!==v;O++)g=j?$.replace(se,`${String(O)}$1`):`${$}${String(O)}`;c.set(g,v);const R=typeof t.publicPath=="string"?t.publicPath+(/[/\\]$/.test(t.publicPath)?"":"/")+I(g):`${As}${I(g)}`;u.type="string",u.value=typeof t.publicPath=="function"?t.publicPath(u.value,R,r):R,m&&(u.value+=m),typeof t.assetDir=="string"?g=pe(t.assetDir,g):typeof t.assetDir=="function"&&(g=t.assetDir(v,g,r)),o.messages.push({plugin:J,source:w,to:g,type:"asset"})}f.value=h.toString()}},postcssPlugin:J}},"plugin");we.postcss=!0;var Bs=Object.defineProperty,Se=d((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"j");const Xs=S(Re(import.meta.url));let N;const P="css",Gs=new Set([P]),Js=Se(e=>{const t=q(e);return Gs.has(t)?`_${t}`:t},"getClassNameDefault"),dr={alwaysProcess:!0,name:"postcss",async process({code:e,extracted:t,map:s}){const n=await hs(this.id,this.cwd,this.environment,this.options.config),o=[];let r=!1;typeof this.options.modules=="boolean"?r=this.options.modules:typeof this.options.modules=="object"&&(r=re(this.options.modules.include,this.id)),this.autoModules&&this.options.modules===void 0&&(r=re(this.autoModules,this.id));const i={},p=[],l={...n.options,...this.options,from:this.id,map:{annotation:!1,inline:!1,prev:D(s).relative(S(this.id)).toObject(),sourcesContent:this.sourceMap?this.sourceMap.content:!0},plugins:[],to:this.options.to??this.id};if(this.options.import&&o.push($e({debug:this.debug,extensions:this.extensions,plugins:[],root:this.cwd,warnOnEmpty:!0,...this.options.import})),this.options.url&&o.push(we({inline:!!this.inject,...this.options.url})),this.options.plugins&&o.push(...this.options.plugins),o.push(...n.plugins),r){const m=typeof this.options.modules=="object"?this.options.modules:{};o.push(...ws({failOnWrongOrder:!0,...m}),ue({extensions:this.extensions}))}o.length===0&&o.push(ee),this.debug&&o.push(Ee({ignore:["css-noop"]}));const c=await Ue(o).process(e,l);for(const m of c.messages)switch(m.type){case"asset":{this.assets.set(m.to,m.source);break}case"dependency":{this.deps.add(x(m.file));break}case"icss":{Object.assign(i,m.export);break}case"icss-dependency":{p.push(m.import);break}case"warning":{this.warn({message:m.text,plugin:m.plugin});break}}if(s=D(c.map.toJSON()).resolve(S(l.to)).toString(),!this.extract&&this.sourceMap){const m=D(s).modify($=>{$.file=void 0}).relative();this.sourceMap.transform&&m.modify(this.sourceMap.transform),s=m.toString(),c.css+=m.toCommentData()}const a=Se(m=>ot(m,I(this.id)),"saferId"),f=a("modules"),u=[`var ${P} = ${JSON.stringify(c.css)};`],h=[],b=[P];if(this.namedExports){this.dts&&h.push(`declare const ${P}: string;`);const m=typeof this.namedExports=="function"?this.namedExports:Js;for(const $ in i){const g=m($);$!==g&&this.warn(`Exported \`${$}\` as \`${g}\` in ${Ce(this.cwd,this.id)}`);const j=JSON.stringify(i[$]);u.push(`var ${g} = ${j};`),this.dts&&h.push(`declare const ${g}: ${j};`),b.push(g)}}if(this.extract&&(t={css:c.css,id:this.id,map:s}),this.inject)if(typeof this.inject=="function")u.push(this.inject(P,this.id,u),`var ${f} = ${JSON.stringify(i)};`);else{const{treeshakeable:m,...$}=typeof this.inject=="object"?this.inject:{},g=a("injector"),j=`${g}(${P},${JSON.stringify($)});`;if(N||(N=F(["./runtime/inject-css"],{baseDirs:[pe(Xs,"..","..")]}),N=`"${x(N)}"`),u.unshift(`import ${g} from ${N};`),m||u.push(`var ${f} = ${JSON.stringify(i)};`,j),m){u.push("var injected = false;");const R=`if (!injected) { injected = true; ${j} }`;if(i.inject)throw new Error("`inject` keyword is reserved when using `inject.treeshakeable` option");let O="";for(const[je,Oe]of Object.entries(i)){const Pe=JSON.stringify(je),xe=JSON.stringify(Oe);O+=`get ${Pe}() { ${R} return ${xe}; },
|
|
7
7
|
`}O+=`inject: function inject() { ${R} },`,u.push(`var ${f} = {${O}};`)}}!this.inject&&Object.keys(i).length>0&&u.push(`var ${f} = ${JSON.stringify(i)};`);const y=`
|
|
8
8
|
export default ${r?f:P};
|
|
9
9
|
`;if(u.push(y),this.dts&&(r&&h.push(`
|
|
@@ -13,7 +13,7 @@ export interface ModulesOptions {
|
|
|
13
13
|
* - `[dir]`: The directory name of the asset.
|
|
14
14
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
15
15
|
* - `[local]`: The original value of the selector.
|
|
16
|
-
* - `[hash(
|
|
16
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
17
17
|
* @default "[name]_[local]__[hash:8]"
|
|
18
18
|
*/
|
|
19
19
|
generateScopedName?: string | ((name: string, file: string, css: string) => string);
|
|
@@ -13,7 +13,7 @@ export interface ModulesOptions {
|
|
|
13
13
|
* - `[dir]`: The directory name of the asset.
|
|
14
14
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
15
15
|
* - `[local]`: The original value of the selector.
|
|
16
|
-
* - `[hash(
|
|
16
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
17
17
|
* @default "[name]_[local]__[hash:8]"
|
|
18
18
|
*/
|
|
19
19
|
generateScopedName?: string | ((name: string, file: string, css: string) => string);
|
|
@@ -13,7 +13,7 @@ export interface ModulesOptions {
|
|
|
13
13
|
* - `[dir]`: The directory name of the asset.
|
|
14
14
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
15
15
|
* - `[local]`: The original value of the selector.
|
|
16
|
-
* - `[hash(
|
|
16
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
17
17
|
* @default "[name]_[local]__[hash:8]"
|
|
18
18
|
*/
|
|
19
19
|
generateScopedName?: string | ((name: string, file: string, css: string) => string);
|
|
@@ -20,7 +20,7 @@ export interface UrlOptions {
|
|
|
20
20
|
* or provide your own placeholder with the following blocks:
|
|
21
21
|
* - `[extname]`: The file extension of the asset including a leading dot, e.g. `.png`.
|
|
22
22
|
* - `[ext]`: The file extension without a leading dot, e.g. `png`.
|
|
23
|
-
* - `[hash(
|
|
23
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
24
24
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
25
25
|
*
|
|
26
26
|
* Forward slashes / can be used to place files in sub-directories.
|
|
@@ -20,7 +20,7 @@ export interface UrlOptions {
|
|
|
20
20
|
* or provide your own placeholder with the following blocks:
|
|
21
21
|
* - `[extname]`: The file extension of the asset including a leading dot, e.g. `.png`.
|
|
22
22
|
* - `[ext]`: The file extension without a leading dot, e.g. `png`.
|
|
23
|
-
* - `[hash(
|
|
23
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
24
24
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
25
25
|
*
|
|
26
26
|
* Forward slashes / can be used to place files in sub-directories.
|
|
@@ -20,7 +20,7 @@ export interface UrlOptions {
|
|
|
20
20
|
* or provide your own placeholder with the following blocks:
|
|
21
21
|
* - `[extname]`: The file extension of the asset including a leading dot, e.g. `.png`.
|
|
22
22
|
* - `[ext]`: The file extension without a leading dot, e.g. `png`.
|
|
23
|
-
* - `[hash(
|
|
23
|
+
* - `[hash(:<num>)]`: A hash based on the name and content of the asset (with optional length).
|
|
24
24
|
* - `[name]`: The file name of the asset excluding any extension.
|
|
25
25
|
*
|
|
26
26
|
* Forward slashes / can be used to place files in sub-directories.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";var T=Object.defineProperty;var
|
|
2
|
-
|
|
3
|
-
${n}`:n};if(!s.logger){const m=S!==!1,y
|
|
4
|
-
`,"formatSpan"),O
|
|
1
|
+
"use strict";var T=Object.defineProperty;var g=(e,t)=>T(e,"name",{value:t,configurable:!0});const w=require("node:url"),i=require("@visulima/path"),j=require("@visulima/path/utils"),x=require("../../../../../packem_shared/resolve-DSG4Zlek.cjs"),v=require("../../../../../packem_shared/url-C84CQz1g.cjs"),D=require("@visulima/fs"),U=require("mlly"),q=require("../../../../../packem_shared/index-C5qgsR90.cjs");var F=Object.defineProperty,A=g((e,t)=>F(e,"name",{value:t,configurable:!0}),"s");const I=[".scss",".sass",".css"],M=["sass","style"],C=A((e,t,a)=>{const r=[],n=v.n(e);if(r.push(v.g(n),n),!v.h(e)&&!i.isAbsolute(e)&&!j.isRelative(e)){const o=v.n(`~${e}`);r.push(v.g(o),o)}const l={baseDirs:[i.dirname(t)],caller:"Sass importer",extensions:I,mainFields:M};return a(r,l)},"importerImpl"),z=A(e=>({file:e.replace(/\.css$/i,"")}),"finalize"),_=A((e,t)=>{try{return z(C(e,t,x.r))}catch{return null}},"importer");var k=Object.defineProperty,H=g((e,t)=>k(e,"name",{value:t,configurable:!0}),"e$1");const L=H(e=>{switch(e.toLowerCase()){case".css":return"css";case".sass":return"indented";case".scss":return"scss";default:return}},"resolveSyntax");var N=Object.defineProperty,W=g((e,t)=>N(e,"name",{value:t,configurable:!0}),"i$1");const J=[".scss",".sass",".css"],Z=["sass","style"],B=W((e,t)=>({canonicalize(a,r){const n=r.containingUrl?w.fileURLToPath(r.containingUrl.toString()):e;let l;const o=v.n(a),S=v.g(o);try{l=x.r([S,o],{baseDirs:[i.dirname(n)],caller:"Sass modern importer",extensions:J,mainFields:Z})}catch{return null}return new URL(U.pathToFileURL(l))},load(a){const r=i.extname(a.pathname),n=r?L(r.toLowerCase())??"scss":"scss";try{let l=D.readFileSync(a);return t&&(l=`/* ${a.pathname} */
|
|
2
|
+
${l}`),{contents:l,sourceMapUrl:a,syntax:n}}catch{return null}}}),"importer");var V=Object.defineProperty,G=g((e,t)=>V(e,"name",{value:t,configurable:!0}),"d$1");let $;const K=G(async(e,t)=>{if(e.compileString!==void 0)return t==="modern"?a=>{const{data:r,...n}=a;return e.compileString(r,n)}:t==="modern-compiler"?a=>{const{data:r,...n}=a;return e.compileString(r,n)}:a=>e.renderSync(a);if(t==="modern"||t==="modern-compiler")throw new Error("Modern API is not supported for 'node-sass'");if(!$){const a=Number(process.env.UV_THREADPOOL_SIZE??4);$=new q.d({concurrency:a-1})}return async a=>await $.add(async()=>await new Promise((r,n)=>{e.render.bind(e)(a,(l,o)=>{if(l){n(l);return}r(o)})}))},"getCompileFunction");var Q=Object.defineProperty,R=g((e,t)=>Q(e,"name",{value:t,configurable:!0}),"o");const X=R(()=>{const e=["sass-embedded","sass","node-sass"];for(const t of e)try{return require.resolve(t),t}catch{}throw new Error("No supported Sass implementation found. Please install 'sass-embedded', 'sass', or 'node-sass'.")},"getDefaultSassImplementation"),Y=R(e=>{let t=e;typeof t=="string"&&(t=require(t));const{info:a=void 0}=t;if(!a)throw new Error(`Sass implementation is missing 'info' property. Implementation: ${JSON.stringify(t)}`);const r=a.split(" ");if(r.length<2)throw new Error(`Invalid Sass implementation info format. Expected at least 2 parts, got: "${a}".`);const[n]=r;if(n==="dart-sass"||n==="node-sass"||n==="sass-embedded")return t;throw new Error(`Unsupported Sass implementation: "${n}". Supported implementations are: dart-sass, node-sass, sass-embedded.`)},"getSassImplementation");var ee=Object.defineProperty,P=g((e,t)=>ee(e,"name",{value:t,configurable:!0}),"d");const te=P(async(e,t,a,r,n,l,o)=>{const{warnRuleAsWarning:S,...u}=r,s={...u,data:r.additionalData?typeof r.additionalData=="function"?await r.additionalData(n,e):`${r.additionalData}
|
|
3
|
+
${n}`:n};if(!s.logger){const m=S!==!1,y=P(p=>`Warning on line ${p.start.line}, column ${p.start.column} of ${p.url??"-"}:${p.start.line}:${p.start.column}:
|
|
4
|
+
`,"formatSpan"),O=P(p=>`[debug:${p.start.line}:${p.start.column}] `,"formatDebugSpan");s.logger={debug(p,d){let f="";d.span&&(f=O(d.span)),f+=p,t.debug(f)},warn(p,d){let f="";if(d.deprecation&&(f+="Deprecation "),d.span&&(f+=y(d.span)),f+=p,d.span?.context&&(f+=`
|
|
5
5
|
|
|
6
|
-
${d.span.start.line} | ${d.span.context}`),d.stack&&d.stack!=="
|
|
6
|
+
${d.span.start.line} | ${d.span.context}`),d.stack&&d.stack!=="undefined"&&(f+=`
|
|
7
7
|
|
|
8
|
-
${d.stack}`),m){const b=new Error(f);b.name="SassWarning",b.stack=void 0,a(b)}else t.warn(f)}}}const c=o==="modern"||o==="modern-compiler",{resourcePath:h}=e;if(c){if(s.url=new URL(U.pathToFileURL(h)),l&&(s.sourceMap=!0),s.syntax===void 0){const m=i.extname(h);m&&(s.syntax=L(m.toLowerCase()))}s.loadPaths=[...(s.loadPaths?[...s.loadPaths]:[]).map(m=>i.isAbsolute(m)?m:i.join(process.cwd(),m)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],s.importers=s.importers?Array.isArray(s.importers)?[...s.importers]:s.importers:[]}else{s.file=h,l&&(s.sourceMap=!0,s.outFile=i.join(e.rootContext,"style.css.map"),s.sourceMapContents=!0,s.omitSourceMapUrl=!0,s.sourceMapEmbed=!1);const m=i.extname(h);s.indentedSyntax=m&&m.toLowerCase()===".sass"&&s.indentedSyntax===void 0?!0:!!s.indentedSyntax,s.importer=s.importer?Array.isArray(s.importer)?[...s.importer]:[s.importer]:[],s.importer.length===0&&(s.importer=void 0),s.includePaths=[...[process.cwd()].flat(),...(s.includePaths?[...s.includePaths]:[]).map(y=>i.isAbsolute(y)?y:i.join(process.cwd(),y)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],s.charset===void 0&&(s.charset=!0)}return s},"getSassOptions");var se=Object.defineProperty,E=
|
|
8
|
+
${d.stack}`),m){const b=new Error(f);b.name="SassWarning",b.stack=void 0,a(b)}else t.warn(f)}}}const c=o==="modern"||o==="modern-compiler",{resourcePath:h}=e;if(c){if(s.url=new URL(U.pathToFileURL(h)),l&&(s.sourceMap=!0),s.syntax===void 0){const m=i.extname(h);m&&(s.syntax=L(m.toLowerCase()))}s.loadPaths=[...(s.loadPaths?[...s.loadPaths]:[]).map(m=>i.isAbsolute(m)?m:i.join(process.cwd(),m)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],s.importers=s.importers?Array.isArray(s.importers)?[...s.importers]:s.importers:[]}else{s.file=h,l&&(s.sourceMap=!0,s.outFile=i.join(e.rootContext,"style.css.map"),s.sourceMapContents=!0,s.omitSourceMapUrl=!0,s.sourceMapEmbed=!1);const m=i.extname(h);s.indentedSyntax=m&&m.toLowerCase()===".sass"&&s.indentedSyntax===void 0?!0:!!s.indentedSyntax,s.importer=s.importer?Array.isArray(s.importer)?[...s.importer]:[s.importer]:[],s.importer.length===0&&(s.importer=void 0),s.includePaths=[...[process.cwd()].flat(),...(s.includePaths?[...s.includePaths]:[]).map(y=>i.isAbsolute(y)?y:i.join(process.cwd(),y)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],s.charset===void 0&&(s.charset=!0)}return s},"getSassOptions");var se=Object.defineProperty,E=g((e,t)=>se(e,"name",{value:t,configurable:!0}),"i");const re=/^[a-z]:[/\\]|^\\\\/i,ae=/^[A-Z0-9+\-.]+:/i,ne=E(e=>e.startsWith("/")?e.length>1&&e[1]==="/"?"scheme-relative":"path-absolute":re.test(e)?"path-absolute":ae.test(e)?"absolute":"path-relative","getURLType"),oe=E((e,t)=>{const a=e;return a.file!==void 0&&delete a.file,a.sourceRoot="",a.sources=a.sources.map(r=>{const n=ne(r);return n==="absolute"&&/^file:/i.test(r)?w.fileURLToPath(r):n==="path-relative"?i.resolve(t,i.normalize(r)):r}),a},"normalizeSourceMap");var ie=Object.defineProperty,le=g((e,t)=>ie(e,"name",{value:t,configurable:!0}),"r");const ce=le((e,t)=>{const a=(e.formatted??e.message??String(e)).replace(/^.*?Error:\s*/i,""),r=new Error(a,{cause:e});return r.name=e.name,r.stack=void 0,r.id=t,e.span?.start&&(r.line=e.span.start.line+1,r.column=e.span.start.column+1),r},"errorFactory"),pe={name:"sass",async process({code:e,map:t}){let a="modern-compiler";const r=this.options.implementation??X();r==="sass"?a="modern":r==="node-sass"&&(a="legacy");const n=a==="modern"||a==="modern-compiler",l=Y(r),o=await te({environment:this.environment,resourcePath:this.id,rootContext:this.cwd},this.logger,this.warn,this.options,e,this.useSourcemap,a);n?o.importers.push(B(this.id,this.debug??!1)):(o.importer&&!Array.isArray(o.importer)&&(o.importer=[o.importer]),o.importer=[...o.importer??[],_]);const S=await K(l,a);let u;try{u=await S(o)}catch(c){throw c.span&&c.span.url!==void 0?this.deps.add(w.fileURLToPath(c.span.url)):c.file&&this.deps.add(i.normalize(c.file)),ce(c,this.id)}let s=u.sourceMap??(u.map?JSON.parse(u.map.toString()):void 0);return s&&this.useSourcemap&&(s=oe(s,this.cwd)),u.loadedUrls?u.loadedUrls.filter(c=>c.protocol==="file:").forEach(c=>{const h=w.fileURLToPath(c);i.isAbsolute(h)&&this.deps.add(h)}):u.stats.includedFiles&&u.stats.includedFiles.forEach(c=>{const h=i.normalize(c);i.isAbsolute(h)&&this.deps.add(h)}),{code:Buffer.from(u.css).toString(),map:s?JSON.stringify(s):t}},test:/\.(sass|scss)$/i};module.exports=pe;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var T=Object.defineProperty;var h=(e,
|
|
1
|
+
var T=Object.defineProperty;var h=(e,t)=>T(e,"name",{value:t,configurable:!0});import{fileURLToPath as y}from"node:url";import{isAbsolute as g,dirname as L,extname as A,join as b,resolve as C,normalize as x}from"@visulima/path";import{isRelative as z}from"@visulima/path/utils";import{r as D}from"../../../../../packem_shared/resolve-C7N_MxXM.mjs";import{n as O,g as U,h as _}from"../../../../../packem_shared/url-BJXna-1T.mjs";import{readFileSync as k}from"@visulima/fs";import{pathToFileURL as R}from"mlly";import{d as H}from"../../../../../packem_shared/index-0ofbypRE.mjs";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
2
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
-
var N=Object.defineProperty,E=h((e,
|
|
4
|
-
|
|
5
|
-
${o}`:o};if(!
|
|
6
|
-
`,"formatSpan"),F=P(l=>`[debug:${l.start.line}:${l.start.column}] `,"formatDebugSpan");
|
|
3
|
+
var N=Object.defineProperty,E=h((e,t)=>N(e,"name",{value:t,configurable:!0}),"s");const W=[".scss",".sass",".css"],J=["sass","style"],q=E((e,t,a)=>{const s=[],o=O(e);if(s.push(U(o),o),!_(e)&&!g(e)&&!z(e)){const n=O(`~${e}`);s.push(U(n),n)}const i={baseDirs:[L(t)],caller:"Sass importer",extensions:W,mainFields:J};return a(s,i)},"importerImpl"),Z=E(e=>({file:e.replace(/\.css$/i,"")}),"finalize"),B=E((e,t)=>{try{return Z(q(e,t,D))}catch{return null}},"importer");var V=Object.defineProperty,G=h((e,t)=>V(e,"name",{value:t,configurable:!0}),"e$1");const I=G(e=>{switch(e.toLowerCase()){case".css":return"css";case".sass":return"indented";case".scss":return"scss";default:return}},"resolveSyntax");var K=Object.defineProperty,Q=h((e,t)=>K(e,"name",{value:t,configurable:!0}),"i$1");const X=[".scss",".sass",".css"],Y=["sass","style"],ee=Q((e,t)=>({canonicalize(a,s){const o=s.containingUrl?y(s.containingUrl.toString()):e;let i;const n=O(a),v=U(n);try{i=D([v,n],{baseDirs:[L(o)],caller:"Sass modern importer",extensions:X,mainFields:Y})}catch{return null}return new URL(R(i))},load(a){const s=A(a.pathname),o=s?I(s.toLowerCase())??"scss":"scss";try{let i=k(a);return t&&(i=`/* ${a.pathname} */
|
|
4
|
+
${i}`),{contents:i,sourceMapUrl:a,syntax:o}}catch{return null}}}),"importer");var te=Object.defineProperty,re=h((e,t)=>te(e,"name",{value:t,configurable:!0}),"d$1");let $;const se=re(async(e,t)=>{if(e.compileString!==void 0)return t==="modern"?a=>{const{data:s,...o}=a;return e.compileString(s,o)}:t==="modern-compiler"?a=>{const{data:s,...o}=a;return e.compileString(s,o)}:a=>e.renderSync(a);if(t==="modern"||t==="modern-compiler")throw new Error("Modern API is not supported for 'node-sass'");if(!$){const a=Number(process.env.UV_THREADPOOL_SIZE??4);$=new H({concurrency:a-1})}return async a=>await $.add(async()=>await new Promise((s,o)=>{e.render.bind(e)(a,(i,n)=>{if(i){o(i);return}s(n)})}))},"getCompileFunction");var ae=Object.defineProperty,M=h((e,t)=>ae(e,"name",{value:t,configurable:!0}),"o");const oe=M(()=>{const e=["sass-embedded","sass","node-sass"];for(const t of e)try{return require.resolve(t),t}catch{}throw new Error("No supported Sass implementation found. Please install 'sass-embedded', 'sass', or 'node-sass'.")},"getDefaultSassImplementation"),ne=M(e=>{let t=e;typeof t=="string"&&(t=require(t));const{info:a=void 0}=t;if(!a)throw new Error(`Sass implementation is missing 'info' property. Implementation: ${JSON.stringify(t)}`);const s=a.split(" ");if(s.length<2)throw new Error(`Invalid Sass implementation info format. Expected at least 2 parts, got: "${a}".`);const[o]=s;if(o==="dart-sass"||o==="node-sass"||o==="sass-embedded")return t;throw new Error(`Unsupported Sass implementation: "${o}". Supported implementations are: dart-sass, node-sass, sass-embedded.`)},"getSassImplementation");var ie=Object.defineProperty,P=h((e,t)=>ie(e,"name",{value:t,configurable:!0}),"d");const ce=P(async(e,t,a,s,o,i,n)=>{const{warnRuleAsWarning:v,...m}=s,r={...m,data:s.additionalData?typeof s.additionalData=="function"?await s.additionalData(o,e):`${s.additionalData}
|
|
5
|
+
${o}`:o};if(!r.logger){const d=v!==!1,S=P(l=>`Warning on line ${l.start.line}, column ${l.start.column} of ${l.url??"-"}:${l.start.line}:${l.start.column}:
|
|
6
|
+
`,"formatSpan"),F=P(l=>`[debug:${l.start.line}:${l.start.column}] `,"formatDebugSpan");r.logger={debug(l,p){let u="";p.span&&(u=F(p.span)),u+=l,t.debug(u)},warn(l,p){let u="";if(p.deprecation&&(u+="Deprecation "),p.span&&(u+=S(p.span)),u+=l,p.span?.context&&(u+=`
|
|
7
7
|
|
|
8
|
-
${p.span.start.line} | ${p.span.context}`),p.stack&&p.stack!=="
|
|
8
|
+
${p.span.start.line} | ${p.span.context}`),p.stack&&p.stack!=="undefined"&&(u+=`
|
|
9
9
|
|
|
10
|
-
${p.stack}`),d){const w=new Error(u);w.name="SassWarning",w.stack=void 0,a(w)}else
|
|
10
|
+
${p.stack}`),d){const w=new Error(u);w.name="SassWarning",w.stack=void 0,a(w)}else t.warn(u)}}}const c=n==="modern"||n==="modern-compiler",{resourcePath:f}=e;if(c){if(r.url=new URL(R(f)),i&&(r.sourceMap=!0),r.syntax===void 0){const d=A(f);d&&(r.syntax=I(d.toLowerCase()))}r.loadPaths=[...(r.loadPaths?[...r.loadPaths]:[]).map(d=>g(d)?d:b(process.cwd(),d)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],r.importers=r.importers?Array.isArray(r.importers)?[...r.importers]:r.importers:[]}else{r.file=f,i&&(r.sourceMap=!0,r.outFile=b(e.rootContext,"style.css.map"),r.sourceMapContents=!0,r.omitSourceMapUrl=!0,r.sourceMapEmbed=!1);const d=A(f);r.indentedSyntax=d&&d.toLowerCase()===".sass"&&r.indentedSyntax===void 0?!0:!!r.indentedSyntax,r.importer=r.importer?Array.isArray(r.importer)?[...r.importer]:[r.importer]:[],r.importer.length===0&&(r.importer=void 0),r.includePaths=[...[process.cwd()].flat(),...(r.includePaths?[...r.includePaths]:[]).map(S=>g(S)?S:b(process.cwd(),S)),...process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]],r.charset===void 0&&(r.charset=!0)}return r},"getSassOptions");var le=Object.defineProperty,j=h((e,t)=>le(e,"name",{value:t,configurable:!0}),"i");const pe=/^[a-z]:[/\\]|^\\\\/i,me=/^[A-Z0-9+\-.]+:/i,de=j(e=>e.startsWith("/")?e.length>1&&e[1]==="/"?"scheme-relative":"path-absolute":pe.test(e)?"path-absolute":me.test(e)?"absolute":"path-relative","getURLType"),ue=j((e,t)=>{const a=e;return a.file!==void 0&&delete a.file,a.sourceRoot="",a.sources=a.sources.map(s=>{const o=de(s);return o==="absolute"&&/^file:/i.test(s)?y(s):o==="path-relative"?C(t,x(s)):s}),a},"normalizeSourceMap");var fe=Object.defineProperty,he=h((e,t)=>fe(e,"name",{value:t,configurable:!0}),"r");const ve=he((e,t)=>{const a=(e.formatted??e.message??String(e)).replace(/^.*?Error:\s*/i,""),s=new Error(a,{cause:e});return s.name=e.name,s.stack=void 0,s.id=t,e.span?.start&&(s.line=e.span.start.line+1,s.column=e.span.start.column+1),s},"errorFactory"),Oe={name:"sass",async process({code:e,map:t}){let a="modern-compiler";const s=this.options.implementation??oe();s==="sass"?a="modern":s==="node-sass"&&(a="legacy");const o=a==="modern"||a==="modern-compiler",i=ne(s),n=await ce({environment:this.environment,resourcePath:this.id,rootContext:this.cwd},this.logger,this.warn,this.options,e,this.useSourcemap,a);o?n.importers.push(ee(this.id,this.debug??!1)):(n.importer&&!Array.isArray(n.importer)&&(n.importer=[n.importer]),n.importer=[...n.importer??[],B]);const v=await se(i,a);let m;try{m=await v(n)}catch(c){throw c.span&&c.span.url!==void 0?this.deps.add(y(c.span.url)):c.file&&this.deps.add(x(c.file)),ve(c,this.id)}let r=m.sourceMap??(m.map?JSON.parse(m.map.toString()):void 0);return r&&this.useSourcemap&&(r=ue(r,this.cwd)),m.loadedUrls?m.loadedUrls.filter(c=>c.protocol==="file:").forEach(c=>{const f=y(c);g(f)&&this.deps.add(f)}):m.stats.includedFiles&&m.stats.includedFiles.forEach(c=>{const f=x(c);g(f)&&this.deps.add(f)}),{code:Buffer.from(m.css).toString(),map:r?JSON.stringify(r):t}},test:/\.(sass|scss)$/i};export{Oe as default};
|
|
@@ -9,14 +9,14 @@ import type { SyncOptions as NodeSassSyncOptions } from "node-sass";
|
|
|
9
9
|
import type { StringOptions as SassStringOptions } from "sass";
|
|
10
10
|
import type { StringOptions as SassEmbeddedStringOptions } from "sass-embedded";
|
|
11
11
|
import type { Environment } from "../../../../../types.d.cts";
|
|
12
|
-
export type SassApiType = "legacy" | "modern" | "modern
|
|
12
|
+
export type SassApiType = "legacy" | "modern-compiler" | "modern";
|
|
13
13
|
export type SassLoaderContext = {
|
|
14
14
|
environment: Environment;
|
|
15
15
|
resourcePath: string;
|
|
16
16
|
rootContext: string;
|
|
17
17
|
};
|
|
18
18
|
export type SassLoaderOptions = {
|
|
19
|
-
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => string) | ((content: string | Buffer, loaderContext: SassLoaderContext) =>
|
|
20
|
-
implementation?: "sass
|
|
19
|
+
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => Promise<string>) | ((content: string | Buffer, loaderContext: SassLoaderContext) => string);
|
|
20
|
+
implementation?: "node-sass" | "sass-embedded" | "sass";
|
|
21
21
|
warnRuleAsWarning?: boolean;
|
|
22
|
-
} & (Omit<
|
|
22
|
+
} & (Omit<NodeSassSyncOptions, "data" | "sourceMapContents" | "sourceMapEmbed" | "sourceMapRoot" | "outFile"> | Omit<SassEmbeddedStringOptions<"sync">, "charset" | "indentedSyntax"> | Omit<SassStringOptions<"sync">, "charset" | "indentedSyntax">);
|
|
@@ -9,14 +9,14 @@ import type { SyncOptions as NodeSassSyncOptions } from "node-sass";
|
|
|
9
9
|
import type { StringOptions as SassStringOptions } from "sass";
|
|
10
10
|
import type { StringOptions as SassEmbeddedStringOptions } from "sass-embedded";
|
|
11
11
|
import type { Environment } from "../../../../../types.d.mts";
|
|
12
|
-
export type SassApiType = "legacy" | "modern" | "modern
|
|
12
|
+
export type SassApiType = "legacy" | "modern-compiler" | "modern";
|
|
13
13
|
export type SassLoaderContext = {
|
|
14
14
|
environment: Environment;
|
|
15
15
|
resourcePath: string;
|
|
16
16
|
rootContext: string;
|
|
17
17
|
};
|
|
18
18
|
export type SassLoaderOptions = {
|
|
19
|
-
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => string) | ((content: string | Buffer, loaderContext: SassLoaderContext) =>
|
|
20
|
-
implementation?: "sass
|
|
19
|
+
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => Promise<string>) | ((content: string | Buffer, loaderContext: SassLoaderContext) => string);
|
|
20
|
+
implementation?: "node-sass" | "sass-embedded" | "sass";
|
|
21
21
|
warnRuleAsWarning?: boolean;
|
|
22
|
-
} & (Omit<
|
|
22
|
+
} & (Omit<NodeSassSyncOptions, "data" | "sourceMapContents" | "sourceMapEmbed" | "sourceMapRoot" | "outFile"> | Omit<SassEmbeddedStringOptions<"sync">, "charset" | "indentedSyntax"> | Omit<SassStringOptions<"sync">, "charset" | "indentedSyntax">);
|
|
@@ -9,14 +9,14 @@ import type { SyncOptions as NodeSassSyncOptions } from "node-sass";
|
|
|
9
9
|
import type { StringOptions as SassStringOptions } from "sass";
|
|
10
10
|
import type { StringOptions as SassEmbeddedStringOptions } from "sass-embedded";
|
|
11
11
|
import type { Environment } from "../../../../../types.d.ts";
|
|
12
|
-
export type SassApiType = "legacy" | "modern" | "modern
|
|
12
|
+
export type SassApiType = "legacy" | "modern-compiler" | "modern";
|
|
13
13
|
export type SassLoaderContext = {
|
|
14
14
|
environment: Environment;
|
|
15
15
|
resourcePath: string;
|
|
16
16
|
rootContext: string;
|
|
17
17
|
};
|
|
18
18
|
export type SassLoaderOptions = {
|
|
19
|
-
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => string) | ((content: string | Buffer, loaderContext: SassLoaderContext) =>
|
|
20
|
-
implementation?: "sass
|
|
19
|
+
additionalData: string | ((content: string | Buffer, loaderContext: SassLoaderContext) => Promise<string>) | ((content: string | Buffer, loaderContext: SassLoaderContext) => string);
|
|
20
|
+
implementation?: "node-sass" | "sass-embedded" | "sass";
|
|
21
21
|
warnRuleAsWarning?: boolean;
|
|
22
|
-
} & (Omit<
|
|
22
|
+
} & (Omit<NodeSassSyncOptions, "data" | "sourceMapContents" | "sourceMapEmbed" | "sourceMapRoot" | "outFile"> | Omit<SassEmbeddedStringOptions<"sync">, "charset" | "indentedSyntax"> | Omit<SassStringOptions<"sync">, "charset" | "indentedSyntax">);
|
|
@@ -5,11 +5,11 @@ import type { SassApiType } from "../types.d.cts";
|
|
|
5
5
|
/**
|
|
6
6
|
* Verifies that the implementation and version of Sass is supported by this loader.
|
|
7
7
|
*/
|
|
8
|
-
declare const getCompileFunction: (implementation: typeof
|
|
8
|
+
declare const getCompileFunction: (implementation: typeof nodeSass | typeof sass | typeof sassEmbedded, apiType: SassApiType) => Promise<((sassOptions: nodeSass.SyncOptions) => nodeSass.Result) | ((sassOptions: nodeSass.SyncOptions) => Promise<nodeSass.Result | void>) | ((sassOptions: sass.StringOptions<"sync"> & {
|
|
9
9
|
data: string;
|
|
10
|
-
}
|
|
10
|
+
}) => sass.CompileResult) | ((sassOptions: sassEmbedded.StringOptions<"sync"> & {
|
|
11
11
|
data: string;
|
|
12
|
-
}
|
|
12
|
+
}) => sassEmbedded.CompileResult)>;
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
export = getCompileFunction;
|
|
@@ -5,9 +5,9 @@ import type { SassApiType } from "../types.d.mts";
|
|
|
5
5
|
/**
|
|
6
6
|
* Verifies that the implementation and version of Sass is supported by this loader.
|
|
7
7
|
*/
|
|
8
|
-
declare const getCompileFunction: (implementation: typeof
|
|
8
|
+
declare const getCompileFunction: (implementation: typeof nodeSass | typeof sass | typeof sassEmbedded, apiType: SassApiType) => Promise<((sassOptions: nodeSass.SyncOptions) => nodeSass.Result) | ((sassOptions: nodeSass.SyncOptions) => Promise<nodeSass.Result | void>) | ((sassOptions: sass.StringOptions<"sync"> & {
|
|
9
9
|
data: string;
|
|
10
|
-
}
|
|
10
|
+
}) => sass.CompileResult) | ((sassOptions: sassEmbedded.StringOptions<"sync"> & {
|
|
11
11
|
data: string;
|
|
12
|
-
}
|
|
12
|
+
}) => sassEmbedded.CompileResult)>;
|
|
13
13
|
export default getCompileFunction;
|
|
@@ -5,11 +5,11 @@ import type { SassApiType } from "../types.d.ts";
|
|
|
5
5
|
/**
|
|
6
6
|
* Verifies that the implementation and version of Sass is supported by this loader.
|
|
7
7
|
*/
|
|
8
|
-
declare const getCompileFunction: (implementation: typeof
|
|
8
|
+
declare const getCompileFunction: (implementation: typeof nodeSass | typeof sass | typeof sassEmbedded, apiType: SassApiType) => Promise<((sassOptions: nodeSass.SyncOptions) => nodeSass.Result) | ((sassOptions: nodeSass.SyncOptions) => Promise<nodeSass.Result | void>) | ((sassOptions: sass.StringOptions<"sync"> & {
|
|
9
9
|
data: string;
|
|
10
|
-
}
|
|
10
|
+
}) => sass.CompileResult) | ((sassOptions: sassEmbedded.StringOptions<"sync"> & {
|
|
11
11
|
data: string;
|
|
12
|
-
}
|
|
12
|
+
}) => sassEmbedded.CompileResult)>;
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
export = getCompileFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as nodeSass from "node-sass";
|
|
2
2
|
import type * as sass from "sass";
|
|
3
3
|
import type * as sassEmbedded from "sass-embedded";
|
|
4
|
-
export declare const getDefaultSassImplementation: () => "sass
|
|
5
|
-
export declare const getSassImplementation: (implementation: string | typeof
|
|
4
|
+
export declare const getDefaultSassImplementation: () => "node-sass" | "sass-embedded" | "sass";
|
|
5
|
+
export declare const getSassImplementation: (implementation: string | typeof nodeSass | typeof sass | typeof sassEmbedded) => typeof nodeSass | typeof sass | typeof sassEmbedded;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as nodeSass from "node-sass";
|
|
2
2
|
import type * as sass from "sass";
|
|
3
3
|
import type * as sassEmbedded from "sass-embedded";
|
|
4
|
-
export declare const getDefaultSassImplementation: () => "sass
|
|
5
|
-
export declare const getSassImplementation: (implementation: string | typeof
|
|
4
|
+
export declare const getDefaultSassImplementation: () => "node-sass" | "sass-embedded" | "sass";
|
|
5
|
+
export declare const getSassImplementation: (implementation: string | typeof nodeSass | typeof sass | typeof sassEmbedded) => typeof nodeSass | typeof sass | typeof sassEmbedded;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as nodeSass from "node-sass";
|
|
2
2
|
import type * as sass from "sass";
|
|
3
3
|
import type * as sassEmbedded from "sass-embedded";
|
|
4
|
-
export declare const getDefaultSassImplementation: () => "sass
|
|
5
|
-
export declare const getSassImplementation: (implementation: string | typeof
|
|
4
|
+
export declare const getDefaultSassImplementation: () => "node-sass" | "sass-embedded" | "sass";
|
|
5
|
+
export declare const getSassImplementation: (implementation: string | typeof nodeSass | typeof sass | typeof sassEmbedded) => typeof nodeSass | typeof sass | typeof sassEmbedded;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const resolveSyntax: (extension: string) => "
|
|
1
|
+
declare const resolveSyntax: (extension: string) => "css" | "indented" | "scss" | undefined;
|
|
2
2
|
export default resolveSyntax;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type SassError = {
|
|
1
|
+
type SassError = Error & {
|
|
2
2
|
column?: number;
|
|
3
3
|
id: string;
|
|
4
4
|
line?: number;
|
|
5
|
-
}
|
|
6
|
-
declare const errorFactory: (error: {
|
|
5
|
+
};
|
|
6
|
+
declare const errorFactory: (error: Error & {
|
|
7
7
|
formatted?: string;
|
|
8
8
|
span?: {
|
|
9
9
|
start: {
|
|
@@ -11,7 +11,7 @@ declare const errorFactory: (error: {
|
|
|
11
11
|
line: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
}
|
|
14
|
+
}, file: string) => SassError;
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
export = errorFactory;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type SassError = {
|
|
1
|
+
type SassError = Error & {
|
|
2
2
|
column?: number;
|
|
3
3
|
id: string;
|
|
4
4
|
line?: number;
|
|
5
|
-
}
|
|
6
|
-
declare const errorFactory: (error: {
|
|
5
|
+
};
|
|
6
|
+
declare const errorFactory: (error: Error & {
|
|
7
7
|
formatted?: string;
|
|
8
8
|
span?: {
|
|
9
9
|
start: {
|
|
@@ -11,5 +11,5 @@ declare const errorFactory: (error: {
|
|
|
11
11
|
line: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
}
|
|
14
|
+
}, file: string) => SassError;
|
|
15
15
|
export default errorFactory;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type SassError = {
|
|
1
|
+
type SassError = Error & {
|
|
2
2
|
column?: number;
|
|
3
3
|
id: string;
|
|
4
4
|
line?: number;
|
|
5
|
-
}
|
|
6
|
-
declare const errorFactory: (error: {
|
|
5
|
+
};
|
|
6
|
+
declare const errorFactory: (error: Error & {
|
|
7
7
|
formatted?: string;
|
|
8
8
|
span?: {
|
|
9
9
|
start: {
|
|
@@ -11,7 +11,7 @@ declare const errorFactory: (error: {
|
|
|
11
11
|
line: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
}
|
|
14
|
+
}, file: string) => SassError;
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
export = errorFactory;
|
|
@@ -3,11 +3,14 @@ import type { CustomPluginOptions, PluginContext } from "rollup";
|
|
|
3
3
|
import type { RawSourceMap } from "source-map-js";
|
|
4
4
|
import type { Environment } from "../../../../types.d.cts";
|
|
5
5
|
import type { InternalStyleOptions } from "../types.d.cts";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export interface Extracted {
|
|
7
|
+
/** CSS */
|
|
8
|
+
css: string;
|
|
9
|
+
/** Source file path */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Sourcemap */
|
|
12
|
+
map?: string;
|
|
13
|
+
}
|
|
11
14
|
/**
|
|
12
15
|
* @param T type of loader's options
|
|
13
16
|
*/
|
|
@@ -64,21 +67,13 @@ export interface LoaderContext<T = Record<string, unknown>> {
|
|
|
64
67
|
readonly plugin: PluginContext;
|
|
65
68
|
readonly sourceDir?: string;
|
|
66
69
|
/** @see {@link InternalStyleOptions.sourceMap} */
|
|
67
|
-
readonly sourceMap: false | ({
|
|
70
|
+
readonly sourceMap: false | (SourceMapOptions & {
|
|
68
71
|
inline: boolean;
|
|
69
|
-
}
|
|
72
|
+
});
|
|
70
73
|
readonly useSourcemap: boolean;
|
|
71
74
|
/** [Function for emitting a warning](https://rollupjs.org/guide/en/#thiswarnwarning-string--rollupwarning-position-number---column-number-line-number---void) */
|
|
72
75
|
readonly warn: PluginContext["warn"];
|
|
73
76
|
}
|
|
74
|
-
export interface Extracted {
|
|
75
|
-
/** CSS */
|
|
76
|
-
css: string;
|
|
77
|
-
/** Source file path */
|
|
78
|
-
id: string;
|
|
79
|
-
/** Sourcemap */
|
|
80
|
-
map?: string;
|
|
81
|
-
}
|
|
82
77
|
export interface Payload {
|
|
83
78
|
/** File content */
|
|
84
79
|
code: string;
|
|
@@ -90,6 +85,11 @@ export interface Payload {
|
|
|
90
85
|
/** Additional metadata exposed to other Rollup plugins */
|
|
91
86
|
meta?: CustomPluginOptions;
|
|
92
87
|
}
|
|
88
|
+
export type PostCSSMeta = {
|
|
89
|
+
icssDependencies: string[];
|
|
90
|
+
moduleContents: string;
|
|
91
|
+
types: string;
|
|
92
|
+
};
|
|
93
93
|
export interface SourceMapOptions {
|
|
94
94
|
/**
|
|
95
95
|
* Include sources content
|