@visulima/rollup-plugin-css 1.0.0-alpha.6 → 1.0.0-alpha.8

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +1 -0
  4. package/dist/loaders/less/index.d.ts +17 -9
  5. package/dist/loaders/less/index.js +1 -0
  6. package/dist/loaders/lightningcss.d.ts +2 -2
  7. package/dist/loaders/lightningcss.js +3 -0
  8. package/dist/loaders/postcss/index.d.ts +2 -2
  9. package/dist/loaders/postcss/{index.mjs → index.js} +1 -1
  10. package/dist/loaders/sass/index.d.ts +18 -9
  11. package/dist/loaders/sass/{index.mjs → index.js} +1 -1
  12. package/dist/loaders/sourcemap.d.ts +2 -2
  13. package/dist/loaders/sourcemap.js +1 -0
  14. package/dist/loaders/stylus/index.d.ts +17 -9
  15. package/dist/loaders/stylus/index.js +1 -0
  16. package/dist/loaders/tailwindcss-oxide.d.ts +2 -2
  17. package/dist/loaders/tailwindcss-oxide.js +1 -0
  18. package/dist/minifiers/cssnano.d.ts +2 -2
  19. package/dist/minifiers/lightningcss.d.ts +2 -2
  20. package/dist/packem_shared/concat-BnU-BO62.js +3 -0
  21. package/dist/packem_shared/{cssModulesTypesPlugin-B9_bJo_B.mjs → cssModulesTypesPlugin-CjGroK2y.js} +1 -1
  22. package/dist/packem_shared/{generate-js-exports-Dqps7nWG.mjs → generate-js-exports-BhS4eLrN.js} +1 -1
  23. package/dist/packem_shared/getMap-CxaNZNeI.js +1 -0
  24. package/dist/packem_shared/inferModeOption-9h3Eq6JH.js +1 -0
  25. package/dist/packem_shared/loadModule-D20jQQNu.js +1 -0
  26. package/dist/packem_shared/resolve-anj9ucIq.js +1 -0
  27. package/dist/packem_shared/rollupCssPlugin-CChaHsU3.js +3 -0
  28. package/dist/packem_shared/{types-CA9pSumu.d.mts → types-D3VQL1eC.d.ts} +2 -2
  29. package/dist/utils/index.d.ts +1 -1
  30. package/dist/utils/index.js +1 -0
  31. package/package.json +52 -37
  32. package/dist/index.d.mts +0 -20
  33. package/dist/index.mjs +0 -1
  34. package/dist/loaders/less/index.d.mts +0 -17
  35. package/dist/loaders/less/index.mjs +0 -1
  36. package/dist/loaders/lightningcss.d.mts +0 -17
  37. package/dist/loaders/lightningcss.mjs +0 -3
  38. package/dist/loaders/postcss/index.d.mts +0 -17
  39. package/dist/loaders/sass/index.d.mts +0 -18
  40. package/dist/loaders/sourcemap.d.mts +0 -17
  41. package/dist/loaders/sourcemap.mjs +0 -1
  42. package/dist/loaders/stylus/index.d.mts +0 -17
  43. package/dist/loaders/stylus/index.mjs +0 -1
  44. package/dist/loaders/tailwindcss-oxide.d.mts +0 -17
  45. package/dist/loaders/tailwindcss-oxide.mjs +0 -1
  46. package/dist/minifiers/cssnano.d.mts +0 -17
  47. package/dist/minifiers/lightningcss.d.mts +0 -17
  48. package/dist/packem_shared/concat-BbvpVPBg.mjs +0 -3
  49. package/dist/packem_shared/getMap-BL5hKEnR.mjs +0 -1
  50. package/dist/packem_shared/inferModeOption-fAc592HP.mjs +0 -1
  51. package/dist/packem_shared/loadModule-CovDETwT.mjs +0 -1
  52. package/dist/packem_shared/resolve-nqhcPNJ9.mjs +0 -1
  53. package/dist/packem_shared/rollupCssPlugin-CJSS-7Mi.mjs +0 -3
  54. package/dist/packem_shared/types-CA9pSumu.d.ts +0 -189
  55. package/dist/utils/index.d.mts +0 -73
  56. package/dist/utils/index.mjs +0 -1
  57. /package/dist/minifiers/{cssnano.mjs → cssnano.js} +0 -0
  58. /package/dist/minifiers/{lightningcss.mjs → lightningcss.js} +0 -0
  59. /package/dist/packem_shared/{arrayFmt-Dek5cB7m.mjs → arrayFmt-Dek5cB7m.js} +0 -0
  60. /package/dist/packem_shared/{ensure-auto-modules-BU3xWEjl.mjs → ensure-auto-modules-BU3xWEjl.js} +0 -0
  61. /package/dist/packem_shared/{hasModuleSpecifier-DIZeev_W.mjs → hasModuleSpecifier-DIZeev_W.js} +0 -0
  62. /package/dist/packem_shared/{safeId-BN5akJYJ.mjs → safeId-BN5akJYJ.js} +0 -0
  63. /package/dist/packem_shared/{sourcemap-DGfgaUBb.mjs → sourcemap-DGfgaUBb.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/rollup-plugin-css",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "CSS processing plugin for packem",
5
5
  "keywords": [
6
6
  "visulima",
@@ -24,7 +24,7 @@
24
24
  "repository": {
25
25
  "type": "git",
26
26
  "url": "git+https://github.com/visulima/packem.git",
27
- "directory": "packages/packem-css"
27
+ "directory": "packages/rollup-plugin-css"
28
28
  },
29
29
  "funding": [
30
30
  {
@@ -45,48 +45,48 @@
45
45
  "type": "module",
46
46
  "exports": {
47
47
  ".": {
48
- "types": "./dist/index.d.mts",
49
- "default": "./dist/index.mjs"
48
+ "types": "./dist/index.d.ts",
49
+ "default": "./dist/index.js"
50
50
  },
51
51
  "./loader/sourcemap": {
52
- "types": "./dist/loaders/sourcemap.d.mts",
53
- "default": "./dist/loaders/sourcemap.mjs"
52
+ "types": "./dist/loaders/sourcemap.d.ts",
53
+ "default": "./dist/loaders/sourcemap.js"
54
54
  },
55
55
  "./loader/less": {
56
- "types": "./dist/loaders/less/index.d.mts",
57
- "default": "./dist/loaders/less/index.mjs"
56
+ "types": "./dist/loaders/less/index.d.ts",
57
+ "default": "./dist/loaders/less/index.js"
58
58
  },
59
59
  "./loader/postcss": {
60
- "types": "./dist/loaders/postcss/index.d.mts",
61
- "default": "./dist/loaders/postcss/index.mjs"
60
+ "types": "./dist/loaders/postcss/index.d.ts",
61
+ "default": "./dist/loaders/postcss/index.js"
62
62
  },
63
63
  "./loader/sass": {
64
- "types": "./dist/loaders/sass/index.d.mts",
65
- "default": "./dist/loaders/sass/index.mjs"
64
+ "types": "./dist/loaders/sass/index.d.ts",
65
+ "default": "./dist/loaders/sass/index.js"
66
66
  },
67
67
  "./loader/stylus": {
68
- "types": "./dist/loaders/stylus/index.d.mts",
69
- "default": "./dist/loaders/stylus/index.mjs"
68
+ "types": "./dist/loaders/stylus/index.d.ts",
69
+ "default": "./dist/loaders/stylus/index.js"
70
70
  },
71
71
  "./loader/lightningcss": {
72
- "types": "./dist/loaders/lightningcss.d.mts",
73
- "default": "./dist/loaders/lightningcss.mjs"
72
+ "types": "./dist/loaders/lightningcss.d.ts",
73
+ "default": "./dist/loaders/lightningcss.js"
74
74
  },
75
75
  "./loader/tailwindcss": {
76
- "types": "./dist/loaders/tailwindcss-oxide.d.mts",
77
- "default": "./dist/loaders/tailwindcss-oxide.mjs"
76
+ "types": "./dist/loaders/tailwindcss-oxide.d.ts",
77
+ "default": "./dist/loaders/tailwindcss-oxide.js"
78
78
  },
79
79
  "./minifier/cssnano": {
80
- "types": "./dist/minifiers/cssnano.d.mts",
81
- "default": "./dist/minifiers/cssnano.mjs"
80
+ "types": "./dist/minifiers/cssnano.d.ts",
81
+ "default": "./dist/minifiers/cssnano.js"
82
82
  },
83
83
  "./minifier/lightningcss": {
84
- "types": "./dist/minifiers/lightningcss.d.mts",
85
- "default": "./dist/minifiers/lightningcss.mjs"
84
+ "types": "./dist/minifiers/lightningcss.d.ts",
85
+ "default": "./dist/minifiers/lightningcss.js"
86
86
  },
87
87
  "./utils": {
88
- "types": "./dist/utils/index.d.mts",
89
- "default": "./dist/utils/index.mjs"
88
+ "types": "./dist/utils/index.d.ts",
89
+ "default": "./dist/utils/index.js"
90
90
  },
91
91
  "./package.json": "./package.json"
92
92
  },
@@ -97,13 +97,13 @@
97
97
  ],
98
98
  "dependencies": {
99
99
  "@rollup/pluginutils": "5.3.0",
100
- "@visulima/fs": "3.1.8",
101
- "@visulima/package": "3.5.11",
102
- "@visulima/packem-share": "1.0.0-alpha.12",
100
+ "@visulima/fs": "4.0.4",
101
+ "@visulima/package": "4.1.4",
102
+ "@visulima/packem-share": "1.0.0-alpha.14",
103
103
  "@visulima/path": "1.4.0",
104
104
  "mlly": "1.8.0",
105
105
  "oxc-resolver": "11.8.2",
106
- "p-queue": "^8.1.1",
106
+ "p-queue": "^9.0.1",
107
107
  "source-map-js": "^1.2.1"
108
108
  },
109
109
  "peerDependencies": {
@@ -112,7 +112,7 @@
112
112
  "@csstools/postcss-slow-plugins": ">=2.0.0",
113
113
  "@tailwindcss/node": ">=4.1.12",
114
114
  "@tailwindcss/oxide": ">=4.1.12",
115
- "@visulima/css-style-inject": "1.0.0-alpha.9",
115
+ "@visulima/css-style-inject": "1.0.0-alpha.10",
116
116
  "cssnano": ">=7.0.0",
117
117
  "icss-utils": ">=5.1.0",
118
118
  "less": ">=4.0.0",
@@ -130,13 +130,10 @@
130
130
  "stylus": ">=0.60.0"
131
131
  },
132
132
  "peerDependenciesMeta": {
133
- "@csstools/css-parser-algorithms": {
133
+ "@ckeditor/typedoc-plugins": {
134
134
  "optional": true
135
135
  },
136
- "@csstools/css-tokenizer": {
137
- "optional": true
138
- },
139
- "@csstools/postcss-slow-plugins": {
136
+ "@swc/core": {
140
137
  "optional": true
141
138
  },
142
139
  "@tailwindcss/node": {
@@ -145,10 +142,10 @@
145
142
  "@tailwindcss/oxide": {
146
143
  "optional": true
147
144
  },
148
- "@visulima/css-style-inject": {
145
+ "cssnano": {
149
146
  "optional": true
150
147
  },
151
- "cssnano": {
148
+ "esbuild": {
152
149
  "optional": true
153
150
  },
154
151
  "icss-utils": {
@@ -160,6 +157,9 @@
160
157
  "lightningcss": {
161
158
  "optional": true
162
159
  },
160
+ "oxc-transform": {
161
+ "optional": true
162
+ },
163
163
  "postcss": {
164
164
  "optional": true
165
165
  },
@@ -189,10 +189,25 @@
189
189
  },
190
190
  "stylus": {
191
191
  "optional": true
192
+ },
193
+ "sucrase": {
194
+ "optional": true
195
+ },
196
+ "typedoc": {
197
+ "optional": true
198
+ },
199
+ "typedoc-plugin-markdown": {
200
+ "optional": true
201
+ },
202
+ "typedoc-plugin-rename-defaults": {
203
+ "optional": true
204
+ },
205
+ "typescript": {
206
+ "optional": true
192
207
  }
193
208
  },
194
209
  "engines": {
195
- "node": ">=20.* <=24.*"
210
+ "node": ">=20.19 <=25.*"
196
211
  },
197
212
  "publishConfig": {
198
213
  "access": "public",
package/dist/index.d.mts DELETED
@@ -1,20 +0,0 @@
1
- import { Plugin } from 'rollup';
2
- import { S as StyleOptions } from './packem_shared/types-CA9pSumu.mjs';
3
- export { A as AutoModules, E as ExtractedData, I as InjectOptions, a as InternalStyleOptions, L as LightningCSSOptions, P as PostCSSConfigLoaderOptions, b as PostCSSOptions } from './packem_shared/types-CA9pSumu.mjs';
4
- import { Environment } from '@visulima/packem-share/types';
5
- import 'cssnano';
6
- import 'lightningcss';
7
- import 'postcss';
8
- import 'postcss-load-config';
9
- import 'less';
10
- import 'sass';
11
- import 'sass-embedded';
12
- import 'stylus';
13
- import '@visulima/packem-share/utils';
14
- import 'source-map-js';
15
-
16
- declare const cssModulesTypesPlugin: (options: StyleOptions, rootDirectory: string) => Plugin;
17
-
18
- declare const cssPlugin: (options: StyleOptions, browserTargets: string[], cwd: string, sourceDirectory: string, environment: Environment, useSourcemap: boolean, debug: boolean, minify: boolean, alias: Record<string, string>) => Promise<Plugin>;
19
-
20
- export { StyleOptions, cssModulesTypesPlugin, cssPlugin as rollupCssPlugin };
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- import{default as e}from"./packem_shared/cssModulesTypesPlugin-B9_bJo_B.mjs";import{default as u}from"./packem_shared/rollupCssPlugin-CJSS-7Mi.mjs";export{e as cssModulesTypesPlugin,u as rollupCssPlugin};
@@ -1,17 +0,0 @@
1
- import { c as Loader, d as LESSLoaderOptions } from '../../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const loader: Loader<LESSLoaderOptions>;
16
-
17
- export { LESSLoaderOptions, loader as default };
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var l=(s,e)=>c(s,"name",{value:e,configurable:!0});import{dirname as u,normalize as d}from"@visulima/path";import f from"less";import{readFileSync as h}from"@visulima/fs";import{resolveAlias as g}from"@visulima/path/utils";import{resolve as y}from"../../packem_shared/resolve-nqhcPNJ9.mjs";import{normalizeUrl as F,getUrlOfPartial as v}from"../../packem_shared/hasModuleSpecifier-DIZeev_W.mjs";var b=Object.defineProperty,m=l((s,e)=>b(s,"name",{value:e,configurable:!0}),"i");const M=[".less",".css"],x=m((s,e)=>new class extends s.FileManager{supports(){return!0}async loadFile(r,a,t){const i=F(g(r,e)),o=v(i),n={baseDirs:[],caller:"Less importer",extensions:M};Array.isArray(t.paths)&&n.baseDirs.push(...t.paths),n.baseDirs.push(a);const p=y([o,i],n);return{contents:h(p),filename:p}}},"getStylesFileManager"),A=m(s=>({install(e,r){r.addFileManager(x(e,s))}}),"importer"),U={name:"less",async process({code:s,map:e}){const r=[A(this.alias)];this.options.plugins&&r.push(...this.options.plugins);const a=f.render,t=await a(s,{...this.options,filename:this.id,plugins:r,sourceMap:{outputSourceFiles:!0,sourceMapBasepath:u(this.id)}}),i=t.imports;for(const o of i)this.deps.add(d(o));return{code:t.css,map:t.map??e}},test:/\.less$/i};export{U as default};
@@ -1,17 +0,0 @@
1
- import { c as Loader, L as LightningCSSOptions } from '../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const lightningCSSLoader: Loader<LightningCSSOptions>;
16
-
17
- export { lightningCSSLoader as default };
@@ -1,3 +0,0 @@
1
- import{transform as r,browserslistToTargets as a}from"lightningcss";import{n as o}from"../packem_shared/ensure-auto-modules-BU3xWEjl.mjs";const l={name:"lightningCSS",async process({code:t,map:i}){let s=!1;typeof this.options.modules=="boolean"?s=this.options.modules:typeof this.options.modules=="object"&&(s=o(this.options.modules.include,this.id)),this.autoModules&&this.options.modules===void 0&&(s=o(this.autoModules,this.id));const e=r({...this.options,code:Buffer.from(t),cssModules:this.options.modules??s,filename:this.id,inputSourceMap:i,minify:!1,sourceMap:!this.sourceMap,targets:a(this.browserTargets)});return e.warnings.length>0&&this.logger.warn({message:`warnings when transforming css:
2
- ${e.warnings.map(n=>n.message).join(`
3
- `)}`}),{code:e.code.toString(),map:e.map?JSON.parse(Buffer.from(e.map).toString()):void 0,moduleSideEffects:s||typeof this.inject=="object"&&this.inject.treeshakeable?!1:"no-treeshake"}},test:/\.css$/i};export{l as default};
@@ -1,17 +0,0 @@
1
- import { c as Loader, a as InternalStyleOptions } from '../../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const loader: Loader<NonNullable<InternalStyleOptions["postcss"]>>;
16
-
17
- export { loader as default };
@@ -1,18 +0,0 @@
1
- import { c as Loader, e as SassLoaderOptions } from '../../packem_shared/types-CA9pSumu.mjs';
2
- export { f as SassLoaderContext } from '../../packem_shared/types-CA9pSumu.mjs';
3
- import 'cssnano';
4
- import 'lightningcss';
5
- import 'postcss';
6
- import 'postcss-load-config';
7
- import 'less';
8
- import '@visulima/packem-share/types';
9
- import 'sass';
10
- import 'sass-embedded';
11
- import 'stylus';
12
- import '@visulima/packem-share/utils';
13
- import 'rollup';
14
- import 'source-map-js';
15
-
16
- declare const loader: Loader<SassLoaderOptions>;
17
-
18
- export { SassLoaderOptions, loader as default };
@@ -1,17 +0,0 @@
1
- import { c as Loader } from '../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const loader: Loader;
16
-
17
- export { loader as default };
@@ -1 +0,0 @@
1
- import{g as e,s as o}from"../packem_shared/sourcemap-DGfgaUBb.mjs";const p={alwaysProcess:!0,name:"sourcemap",async process({code:a,map:s}){return{code:o(a),map:await e(a,this.id)??s}}};export{p as default};
@@ -1,17 +0,0 @@
1
- import { c as Loader, g as StylusLoaderOptions } from '../../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const loader: Loader<StylusLoaderOptions>;
16
-
17
- export { StylusLoaderOptions, loader as default };
@@ -1 +0,0 @@
1
- var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{existsSync as y}from"node:fs";import{readFileSync as w}from"@visulima/fs";import{normalize as n,dirname as P,join as m}from"@visulima/path";import S from"stylus";import{m as b}from"../../packem_shared/sourcemap-DGfgaUBb.mjs";var v=Object.defineProperty,u=p((e,t)=>v(e,"name",{value:t,configurable:!0}),"a");const C=u(async(e,t)=>{if(!(!e.sources||e.sourcesContent))return await Promise.all(e.sources.map(async r=>{const o=n(m(t,r));if(y(o))return w(o)}).filter(Boolean))},"populateSourcemapContent"),F={name:"stylus",async process({code:e,map:t}){const r={...this.options},o=n(P(this.id)),i=[o,m(o,"node_modules"),m(this.cwd,"node_modules")];r.paths&&i.push(...r.paths);const s=S(e,r).set("filename",this.id).set("paths",i).set("sourcemap",{basePath:o,comment:!1});e=await u(async()=>await new Promise((a,l)=>{s.render((c,f)=>c?l(c):a(f))}),"render")();const d=s.deps();for(const a of d)this.deps.add(n(a));return s.sourcemap&&(s.sourcemap.sourcesContent=await C(s.sourcemap,o)),{code:e,map:b(s.sourcemap).toString()??t}},test:/\.(styl|stylus)$/i};export{F as default};
@@ -1,17 +0,0 @@
1
- import { c as Loader } from '../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const tailwindcssLoader: Loader;
16
-
17
- export { tailwindcssLoader as default };
@@ -1 +0,0 @@
1
- var J=Object.defineProperty;var S=(g,a)=>J(g,"name",{value:a,configurable:!0});import{stat as y}from"node:fs/promises";import{compile as P,Features as i,toSourceMap as x,optimize as z}from"@tailwindcss/node";import{clearRequireCache as M}from"@tailwindcss/node/require-cache";import{Scanner as $}from"@tailwindcss/oxide";import{findPackageJson as R}from"@visulima/package";import{resolve as v,dirname as w,relative as E,join as C,normalize as T}from"@visulima/path";import{resolveAlias as F}from"@visulima/path/utils";import{g as U}from"../packem_shared/generate-js-exports-Dqps7nWG.mjs";import{resolve as A}from"../packem_shared/resolve-nqhcPNJ9.mjs";var k=Object.defineProperty,f=S((g,a)=>k(g,"name",{value:a,configurable:!0}),"p");class B{static{S(this,"U")}constructor(a,r,u,l,s,n){this.id=a,this.base=r,this.enableSourceMaps=u,this.customCssResolver=l,this.customJsResolver=s,this.logger=n}static{f(this,"TailwindRoot")}compiler;scanner;candidates=new Set;buildDependencies=new Map;async generate(a,r){const u=v(this.id.replace(/\?.*$/u,"")),l=f(e=>{e!==u&&(/[#?].*\.svg$/u.test(e)||r(e))},"addWatchFileWrapper"),s=this.requiresBuild(),n=w(v(u));if(!this.compiler||!this.scanner||await s){M([...this.buildDependencies.keys()]),this.buildDependencies.clear(),this.addBuildDependency(u),this.logger.debug({message:"Setup compiler"});const e=[];this.compiler=await P(a,{base:n,customCssResolver:this.customCssResolver,customJsResolver:this.customJsResolver,from:this.enableSourceMaps?this.id:void 0,onDependency:f(m=>{l(m),e.push(this.addBuildDependency(m))},"onDependency"),shouldRewriteUrls:!0}),await Promise.all(e),this.logger.debug({message:"Setup scanner"});const d=[...this.compiler.root==="none"?[]:this.compiler.root===null?[{base:this.base,negated:!1,pattern:"**/*"}]:[{...this.compiler.root,negated:!1}],...this.compiler.sources];this.scanner=new $({sources:d})}else for(const e of this.buildDependencies.keys())l(e);const t=this.compiler.features&(i.AtApply|i.JsPluginCompat|i.ThemeFunction|i.Utilities);if(this.logger.debug({data:{availableFeatures:this.compiler.features,hasAtApply:!!(this.compiler.features&i.AtApply),hasJsPluginCompat:!!(this.compiler.features&i.JsPluginCompat),hasRequiredFeatures:!!t,hasThemeFunction:!!(this.compiler.features&i.ThemeFunction),hasUtilities:!!(this.compiler.features&i.Utilities),requiredFeatures:i.AtApply|i.JsPluginCompat|i.ThemeFunction|i.Utilities},message:"Feature analysis"}),!t)return this.logger.debug({data:{missingFeatures:{AtApply:!(this.compiler.features&i.AtApply),JsPluginCompat:!(this.compiler.features&i.JsPluginCompat),ThemeFunction:!(this.compiler.features&i.ThemeFunction),Utilities:!(this.compiler.features&i.Utilities)}},message:"Missing required features, returning false"}),!1;if(this.compiler.features&i.Utilities)if(this.logger.debug({data:{candidatesCountBefore:this.candidates.size,scannerExists:!!this.scanner,scannerHasScan:!!(this.scanner&&typeof this.scanner.scan=="function")},message:"Scan for candidates - Utilities feature enabled"}),this.scanner){const e=this.scanner.scan();this.logger.debug({data:{scannedCandidates:e.slice(0,10),scannedCandidatesCount:e.length},message:"Scanner results"});for(const d of e)this.candidates.add(d);this.logger.debug({data:{candidatesCountAfter:this.candidates.size,newCandidatesAdded:e.length},message:"Candidates updated"})}else this.logger.debug({data:{hasScanMethod:!!(this.scanner&&typeof this.scanner.scan=="function"),scannerType:typeof this.scanner},message:"Scanner not available or missing scan method"});else this.logger.debug({message:"Utilities feature not enabled, skipping candidate scanning"});if(this.compiler.features&i.Utilities){if(this.scanner&&this.scanner.files){this.logger.debug({data:{files:this.scanner.files.slice(0,5),filesCount:this.scanner.files.length},message:"Watching individual files from scanner"});for(const e of this.scanner.files)l(e)}else this.logger.debug({message:"No individual files to watch from scanner"});if(this.scanner&&this.scanner.globs){this.logger.debug({data:{globs:this.scanner.globs.slice(0,3),globsCount:this.scanner.globs.length},message:"Processing globs from scanner"});for await(const e of this.scanner.globs){if(e.pattern[0]==="!"){this.logger.debug({data:{pattern:e.pattern},message:"Skipping negated glob pattern"});continue}let d=E(this.base,e.base);d[0]!=="."&&(d=`./${d}`);const m=C(d,e.pattern);this.logger.debug({data:{base:e.base,glob:e.pattern,watchPath:m},message:"Adding glob to watch list"}),l(m);const{root:b}=this.compiler;if(b!=="none"&&b!==null){const p=v(b.base,b.pattern);try{const h=await y(p);if(h.isDirectory())this.logger.debug({data:{basePath:p,isDirectory:h.isDirectory()},message:"Valid source directory confirmed"});else{const D=`The path given to \`source(…)\` must be a directory but got \`source(${p})\` instead.`;throw this.logger.debug({data:{basePath:p,error:D,isDirectory:h.isDirectory()},message:"Invalid source path detected"}),new Error(D)}}catch(h){this.logger.debug({data:{basePath:p,error:h instanceof Error?h.message:String(h)},message:"Error checking source directory"})}}}}else this.logger.debug({message:"No globs to process from scanner"})}else this.logger.debug({message:"Utilities feature not enabled, skipping file watching"});this.logger.debug({data:{candidates:[...this.candidates].slice(0,10),candidatesCount:this.candidates.size},message:"Build CSS"});const o=this.compiler.build([...this.candidates]);this.logger.debug({data:{cssLength:o.length,cssPreview:o.slice(0,200)+(o.length>200?"...":"")},message:"CSS build completed"}),this.logger.debug({data:{enableSourceMaps:this.enableSourceMaps},message:"Build Source Map"});const c=(this.enableSourceMaps?x(this.compiler.buildSourceMap()):void 0)?.raw;return c?this.logger.debug({data:{hasMappings:!!c.mappings,mapSize:JSON.stringify(c).length,sourcesCount:c.sources?.length||0},message:"Source map generated"}):this.logger.debug({message:"No source map generated"}),{code:o,map:c}}async addBuildDependency(a){let r;try{r=(await y(a)).mtimeMs}catch{}this.buildDependencies.set(a,r)}async requiresBuild(){for await(const[a,r]of this.buildDependencies){if(r===void 0)return!0;try{if((await y(a)).mtimeMs>r)return!0}catch{return!0}}return!1}}const V={name:"tailwindcss",async process({code:g,map:a}){const r=this.alias,u=f(async(t,o)=>{try{const c=await R(o),e=A([t,F(t,r??{})],{baseDirs:[o,C(w(c.path),"node_modules")],caller:"Tailwind CSS Resolver",conditionNames:["style","development|production"],extensions:[".css"],mainFields:["style"],preferRelative:!0});if(e)return this.logger.debug({message:`Resolved CSS import: ${t} -> ${e}`}),e}catch{}return this.logger.debug({message:`Failed to resolve CSS import: ${t} from ${o}`}),!1},"customCssResolver"),l=f(async(t,o)=>{try{const c=await R(o),e=A([t,F(t,r??{})],{baseDirs:[o,C(w(c.path),"node_modules")],caller:"Tailwind JS Resolver",extensions:[".js",".mjs",".cjs",".ts",".tsx",".jsx"]});if(e)return this.logger.debug({message:`Resolved JS import: ${t} -> ${e}`}),e}catch{}return this.logger.debug({message:`Failed to resolve JS import: ${t} from ${o}`}),!1},"customJsResolver");let s=await new B(this.id,this.sourceDir||process.cwd(),this.useSourcemap,u,l,this.logger).generate(g,t=>this.deps.add(T(t)));if(!s)return this.logger.debug({data:{returningOriginalContent:!0},message:"Tailwind generation returned false - not a Tailwind file or missing features"}),{code:g,map:a};if(this.logger.debug({message:"[@tailwindcss/rollup] Generate CSS"}),this.environment==="production"){this.logger.debug({data:{minify:!0,originalSize:s.code.length},message:"[@tailwindcss/rollup] Optimize CSS"});const t=z(s.code,{file:this.id,map:s.map,minify:!0});this.logger.debug({data:{optimizedSize:t.code.length,originalSize:s.code.length,sizeReduction:s.code.length-t.code.length,sizeReductionPercent:`${((s.code.length-t.code.length)/s.code.length*100).toFixed(2)}%`},message:"CSS optimization completed"}),s=t}else this.logger.debug({data:{environment:this.environment},message:"Development mode - skipping CSS optimization"});if(this.emit)return{...s,meta:{moduleContents:s,types:void 0},moduleSideEffects:!0};const n=U({css:s.code,cwd:this.cwd,dts:this.dts,emit:this.emit,extract:this.extract,icssDependencies:[],id:this.id,inject:this.inject,logger:this.logger,map:s.map,modulesExports:{},namedExports:this.namedExports,supportModules:!1});return this.extract?{code:n.code,extracted:{css:s.code,id:this.id,map:s.map},map:n.map,meta:n.meta,moduleSideEffects:n.moduleSideEffects}:{code:n.code,map:n.map,meta:n.meta,moduleSideEffects:n.moduleSideEffects}},test:/\.css$/i};export{V as default};
@@ -1,17 +0,0 @@
1
- import { Options } from 'cssnano';
2
- import { M as Minifier } from '../packem_shared/types-CA9pSumu.mjs';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const cssnanoMinifier: Minifier<Options>;
16
-
17
- export { cssnanoMinifier as default };
@@ -1,17 +0,0 @@
1
- import { M as Minifier, a as InternalStyleOptions } from '../packem_shared/types-CA9pSumu.mjs';
2
- import 'cssnano';
3
- import 'lightningcss';
4
- import 'postcss';
5
- import 'postcss-load-config';
6
- import 'less';
7
- import '@visulima/packem-share/types';
8
- import 'sass';
9
- import 'sass-embedded';
10
- import 'stylus';
11
- import '@visulima/packem-share/utils';
12
- import 'rollup';
13
- import 'source-map-js';
14
-
15
- declare const lightningcssMinifier: Minifier<NonNullable<InternalStyleOptions["lightningcss"]>>;
16
-
17
- export { lightningcssMinifier as default };
@@ -1,3 +0,0 @@
1
- var l=Object.defineProperty;var u=(o,n)=>l(o,"name",{value:n,configurable:!0});import{SourceMapGenerator as p}from"source-map-js";import{m as f}from"./sourcemap-DGfgaUBb.mjs";var g=Object.defineProperty,d=u((o,n)=>g(o,"name",{value:n,configurable:!0}),"u");const j=d(async o=>{const n=new p({file:""}),a=[];let c=0;for await(const{css:i,map:m}of o){a.push(i);const s=f(m),t=s.toObject();if(!t)continue;const r=s.toConsumer();if(r){if(r.eachMapping(e=>{n.addMapping({generated:{column:e.generatedColumn,line:c+e.generatedLine},name:e.name,original:{column:e.originalColumn,line:e.originalLine},source:e.source})}),t.sourcesContent)for(const e of t.sources)n.setSourceContent(e,r.sourceContentFor(e,!0));c+=i.split(`
2
- `).length}}return{css:a.join(`
3
- `),map:n}},"concat");export{j as default};
@@ -1 +0,0 @@
1
- import"@visulima/fs";import"@visulima/path";import"source-map-js";import{g as o,m as s,s as i}from"./sourcemap-DGfgaUBb.mjs";export{o as getMap,s as mm,i as stripMap};
@@ -1 +0,0 @@
1
- var f=Object.defineProperty;var l=(n,r)=>f(n,"name",{value:r,configurable:!0});import p from"./arrayFmt-Dek5cB7m.mjs";import d from"./loadModule-CovDETwT.mjs";var y=Object.defineProperty,o=l((n,r)=>y(n,"name",{value:r,configurable:!0}),"o");const u=["inject","extract","emit","inline"],S=p(u),P=o(n=>{const r=Array.isArray(n)?n:[n];if(r[0]&&!u.includes(r[0]))throw new Error(`Incorrect mode provided, allowed modes are ${S}`);const t=r[0]??"inject";let e=!1,i=!1;return t==="extract"&&(e=r[1]??!0),t==="inject"&&(i=r[1]??!0),{emit:t==="emit",extract:e,inject:i,inline:t==="inline"}},"inferModeOption"),O=o((n,r)=>typeof n=="boolean"?n&&{}:typeof n=="object"?n:r,"inferOption"),j=o(n=>{const r=Array.isArray(n)?n:[n];return r[0]?{content:!0,...r[1],inline:r[0]==="inline"}:!1},"inferSourceMapOption"),b=o((n,r)=>{const t=O(n,{});return r&&typeof t=="object"&&!t.alias&&(t.alias=r),t},"inferHandlerOption"),a=o(async(n,r,t,e)=>{if(typeof n!="string")return n;const i=await d(n,t,e);if(!i)throw new Error(`Unable to load PostCSS ${r} \`${n}\``);return i},"ensurePCSSOption"),h=o(async(n,r,t)=>{if(n===void 0)return[];if(n.length===0)return[];const e=[];for await(const i of n.filter(Boolean)){if(!Array.isArray(i)){e.push(await a(i,"plugin",r,t));continue}const[s,c]=i;c?e.push((await a(s,"plugin",r,t))(c)):e.push(await a(s,"plugin",r,t))}return e},"ensurePCSSPlugins");export{a as ensurePCSSOption,h as ensurePCSSPlugins,b as inferHandlerOption,P as inferModeOption,O as inferOption,j as inferSourceMapOption};
@@ -1 +0,0 @@
1
- var d=Object.defineProperty;var n=(e,t)=>d(e,"name",{value:t,configurable:!0});import{createRequire as c}from"node:module";import{interopDefault as m,loadModule as f}from"mlly";import{resolve as p}from"./resolve-nqhcPNJ9.mjs";var g=Object.defineProperty,u=n((e,t)=>g(e,"name",{value:t,configurable:!0}),"a");const o={},R=[".js",".mjs",".cjs",".json"],y=u(async(e,t)=>{try{return t(e)}catch(r){const s=r;if(s.code==="ERR_REQUIRE_ESM")return m(await f(e));throw s}},"loadModuleFromPath"),E=u(async(e,t,r)=>{if(o[e])return o[e];if(o[e]===null)return;const s={baseDirs:[t],caller:"Module loader",extensions:R,symlinks:!1},i=c(import.meta.url);try{const a=p([e,`./${e}`],s);if(a.startsWith("data:")){r.warn({message:`Skipping data URL module: ${e}`,module:e,plugin:"css"}),o[e]=null;return}o[e]=await y(a,i)}catch(a){r.warn({message:`Failed to resolve or load module: ${a instanceof Error?a.message:String(a)}`,module:e,plugin:"css"}),o[e]=null;return}const l=o[e];return l?.default??l},"loadModule");export{E as default};
@@ -1 +0,0 @@
1
- var a=Object.defineProperty;var i=(o,e)=>a(o,"name",{value:e,configurable:!0});import{fileURLToPath as m}from"node:url";import{dirname as f}from"@visulima/path";import{ResolverFactory as x}from"oxc-resolver";import d from"./arrayFmt-Dek5cB7m.mjs";var u=Object.defineProperty,v=i((o,e)=>u(o,"name",{value:e,configurable:!0}),"l");const b=f(m(import.meta.url)),k=v((o,e)=>{const s={baseDirs:[b],caller:"Resolver",extensions:[".mjs",".js",".cjs",".json"],symlinks:!0,...e},c=new x({extensions:s.extensions,symlinks:s.symlinks});for(const n of s.baseDirs)for(const t of o)try{const{error:r,path:l}=c.sync(n,t);if(l)return l;r&&console.debug(r,{context:[{basedir:n,caller:e.caller,extensions:e.extensions,id:t}]})}catch(r){console.debug(r.message,{context:[{basedir:n,caller:e.caller,error:r,extensions:e.extensions,id:t}]})}throw new Error(`${s.caller} could not resolve ${d(o)}`)},"resolve");export{k as resolve};
@@ -1,3 +0,0 @@
1
- var Y=Object.defineProperty;var N=(e,t)=>Y(e,"name",{value:t,configurable:!0});import{createFilter as ee}from"@rollup/pluginutils";import{createRollupLogger as se}from"@visulima/packem-share/utils";import{dirname as L,normalize as M,isAbsolute as te,relative as U,resolve as oe,parse as T,join as _,basename as V}from"@visulima/path";import{isRelative as ie}from"@visulima/path/utils";import re from"p-queue";import ne from"./concat-BbvpVPBg.mjs";import{inferSourceMapOption as ae,inferModeOption as ce,inferHandlerOption as W,inferOption as G,ensurePCSSOption as R,ensurePCSSPlugins as le}from"./inferModeOption-fAc592HP.mjs";import{m as q}from"./sourcemap-DGfgaUBb.mjs";var ue=Object.defineProperty,de=N((e,t)=>ue(e,"name",{value:t,configurable:!0}),"r");const J=de((e,t)=>{if(!t)return!1;if(typeof t=="function")return t(e);if(typeof t.test=="function")return t.test(e);throw new Error("Invalid condition type")},"matchFile");var pe=Object.defineProperty,fe=N((e,t)=>pe(e,"name",{value:t,configurable:!0}),"a");const me=4,ge=process.env.UV_THREADPOOL_SIZE?Number.parseInt(process.env.UV_THREADPOOL_SIZE,10):me;class he{static{N(this,"c")}static{fe(this,"LoaderManager")}test;loaders=new Map;options;workQueue;logger;constructor({extensions:t,loaders:c,logger:y,options:O}){this.test=S=>t.some(g=>S.toLowerCase().endsWith(g)),c.length>0&&this.add(...c),this.options=O,this.logger=y}add(...t){for(const c of t)this.loaders.has(c.name)||this.loaders.set(c.name,c)}isSupported(t){if(this.test(t))return!0;for(const[,c]of this.loaders)if(J(t,c.test))return!0;return!1}async process(t,c){this.workQueue||(this.workQueue=new re({concurrency:ge-1}));for await(const[y,O]of this.loaders){const S={...c,options:this.options[y]??{}};if(O.alwaysProcess||J(S.id,O.test)){this.logger.debug({message:`Processing ${y} loader for ${S.id}`,plugin:"css"});try{const g=await this.workQueue.add(O.process.bind(S,t));g&&(t=g,this.logger.debug({message:`Completed ${y} loader for ${S.id}`,outputSize:g.code?.length||0,plugin:"css"}))}catch(g){throw this.logger.error({file:S.id,loader:y,message:`Error in ${y} loader for ${S.id}: ${g instanceof Error?g.message:String(g)}`,plugin:"css"}),g}}}return t}}var xe=Object.defineProperty,z=N((e,t)=>xe(e,"name",{value:t,configurable:!0}),"b");const ye=z(async(e,t)=>e.sort((c,y)=>t.indexOf(c.name)-t.indexOf(y.name)),"sortByNameOrder"),Fe=z(async(e,t,c,y,O,S,g,Z,K)=>{const C={...K,...e.alias},B=ee(e.include,e.exclude),b=ae(e.sourceMap),i={...ce(e.mode),autoModules:e.autoModules??!1,dts:e.dts,extensions:e.extensions,namedExports:e.namedExports};let a,I,H=!1;if(e.loaders)for(const r of e.loaders)r.name==="postcss"&&(H=!0);else e.loaders=[];H&&(i.postcss={...e.postcss,config:G(e.postcss?.config,{}),import:W(e.postcss?.import,C),modules:G(e.postcss?.modules,void 0),to:e.postcss?.to,url:W(e.postcss?.url,C)});let E=[];const F=z((r,u)=>{const m=[];for(const o of Object.keys(r)){const d=new Set;let h=[o];do{const $=[];for(const f of h){if(d.has(f))continue;if(I.isSupported(f)){B(f)&&$.push(f);continue}d.add(f);const P=u(f);P&&$.push(...P.importedIds)}h=$}while(h.some($=>!I.isSupported($)));m.push(...h)}return m},"traverseImportedModules");return{augmentChunkHash(r){if(E.length===0)return;const u=F(r.modules,this.getModuleInfo),m=E.filter(o=>u.includes(o.id)).sort((o,d)=>u.lastIndexOf(o.id)-u.lastIndexOf(d.id)).map(o=>`${V(o.id)}:${o.css}`);if(m.length!==0)return m.join(":")},async buildStart(){a=se(this,"css"),H&&i.postcss&&(e.postcss?.parser&&(i.postcss.parser=await R(e.postcss.parser,"parser",c,a)),e.postcss?.syntax&&(i.postcss.syntax=await R(e.postcss.syntax,"syntax",c,a)),e.postcss?.stringifier&&(i.postcss.stringifier=await R(e.postcss.stringifier,"stringifier",c,a)),e.postcss?.plugins&&(i.postcss.plugins=await le(e.postcss.plugins,c,a))),I=new he({extensions:i.extensions,loaders:await ye(e.loaders||[],["sourcemap","stylus","less","sass","postcss"]),logger:a,options:{...e,...i,alias:C}}),a.info({extract:typeof i.extract=="string"?i.extract:"individual",loaders:e.loaders?.map(r=>r.name)||[],message:"CSS plugin initialized",minify:!!(Z&&e.minifier),namedExports:!!i.namedExports,plugin:"css",sourceMap:!!S}),typeof i.inject=="object"&&i.inject.treeshakeable&&(i.namedExports=!1,a.info({message:"Disabling named exports due to `inject.treeshakeable` option",plugin:"css"}))},async generateBundle(r,u){if(E.length===0||!(r.dir||r.file))return;const m=Object.values(u),o=r.dir??L(r.file),d=m.filter(n=>n.type==="chunk"),h=d.filter(n=>!n.facadeModuleId),$=r.preserveModules?d:d.filter(n=>n.isEntry||n.isDynamicEntry),f=[],P=z(async(n,l)=>{const s=typeof i.extract=="string"?M(i.extract).replace(/^\.[/\\]/,""):M(`${n}.css`);te(s)&&this.error(["Extraction path must be relative to the output directory,",`which is ${U(c,o)}`].join(`
2
- `)),ie(s)&&this.error(["Extraction path must be nested inside output directory,",`which is ${U(c,o)}`].join(`
3
- `));const w=E.filter(x=>l.includes(x.id)).sort((x,v)=>l.lastIndexOf(x.id)-l.lastIndexOf(v.id)),D=await ne(w);return{css:D.css,map:q(D.map.toString()).relative(L(oe(o,s))).toString(),name:s}},"getExtractedData"),A=z(n=>{if(r.file)return T(r.file).name;if(r.preserveModules){const{dir:l,name:s}=T(n.fileName);return l?_(l,s):s}return n.name},"getName"),k=[];if(typeof i.extract=="string"){a.debug({message:`Extracting to ${i.extract}`,prefix:"css"});const n=[];for(const s of h){const w=F(s.modules,this.getModuleInfo);k.push(...w),n.push(...w)}for(const s of $)n.push(...F(s.modules,this.getModuleInfo).filter(w=>!k.includes(w)));const l=A(d[0]);f.push([l,n])}else{a.debug({message:"Extracting to individual files",prefix:"css"});for(const n of h){const l=F(n.modules,this.getModuleInfo);if(l.length===0)continue;k.push(...l);const s=A(n);f.push([s,l])}for(const n of $){const l=F(n.modules,this.getModuleInfo).filter(w=>!k.includes(w));if(l.length===0)continue;const s=A(n);f.push([s,l])}}for await(const[n,l]of f){const s=await P(n,l);if(typeof e.onExtract=="function"&&!e.onExtract(s))continue;if(Z&&e.minifier){a.info({message:`Minifying ${s.name} with ${e.minifier.name}`,prefix:"css"});const{css:x,map:v}=await e.minifier.handler.bind({browserTargets:t,logger:a})(s,b,e[e.minifier.name]??{});s.css=x,s.map=v}const w={fileName:s.name,name:s.name,names:[s.name],originalFileName:s.name,originalFileNames:[s.name],source:s.css,type:"asset"},D=this.emitFile(w);if(a.info({chunkIds:l.length,hasSourceMap:!!(s.map&&b),message:`Emitted CSS file: ${s.name}`,plugin:"css",size:s.css.length}),s.map&&b){const x=this.getFileName(D);let v="assert";typeof r.assetFileNames=="string"?v=M(L(r.assetFileNames)):typeof r.assetFileNames=="function"&&(v=M(L(r.assetFileNames(w))));const j=q(s.map).modify(p=>(p.file=V(x),p)).modifySources(p=>{if(p==="<no source>"||v.length<=1)return p;p=`../${p}`;for(const Q of v)Q==="/"&&(p=`../${p}`);return p});if(b.inline)j.modify(p=>b.transform?.(p,M(_(o,x)))),u[x].source+=j.toCommentData(),a.debug({message:`Generated inline source map for ${x}`,plugin:"css"});else{const p=`${x}.map`;j.modify(X=>b.transform?.(X,M(_(o,p)))),this.emitFile({fileName:p,source:j.toString(),type:"asset"});const{base:Q}=T(p);u[x].source+=j.toCommentFile(Q),a.debug({message:`Generated external source map: ${p}`,plugin:"css"})}}}f.length>0&&a.info({filesEmitted:f.length,message:"CSS processing complete",plugin:"css",totalExtracted:E.length,totalSize:f.reduce((n,[,l])=>n+l.length,0)})},name:"rollup-plugin-css",async transform(r,u){if(!B(u)||!I.isSupported(u))return;if(r.replaceAll(/\s/g,"")===""){a.debug({message:`Skipping empty file: ${u}`,plugin:"css"});return}a.info({message:`Processing CSS file: ${u}`,plugin:"css",size:r.length}),typeof e.onImport=="function"&&e.onImport(r,u);const m={alias:C,assets:new Map,autoModules:i.autoModules,browserTargets:t,cwd:c,debug:g,deps:new Set,dts:i.dts,emit:i.emit,environment:O,extensions:i.extensions,extract:i.extract,id:u,inject:i.inject,inline:i.inline,logger:a,namedExports:i.namedExports,options:{},plugin:this,sourceDir:y,sourceMap:b,useSourcemap:S},o=await I.process({code:r},m);a.info({assets:m.assets.size,dependencies:m.deps.size,hasExtracted:!!o.extracted,message:`Processed ${u}`,outputSize:o.code.length,plugin:"css"});for(const d of m.deps)this.addWatchFile(d);for(const[d,h]of m.assets)this.emitFile({fileName:d,source:h,type:"asset"}),a.debug({message:`Emitted asset: ${d}`,plugin:"css",size:h.length});if(o.extracted){const{id:d}=o.extracted;E=E.filter(h=>h.id!==d),E.push(o.extracted),a.debug({cssSize:o.extracted.css.length,hasSourceMap:!!o.extracted.map,message:`Extracted CSS from ${d}`,plugin:"css"})}return{code:o.code,map:b&&o.map?o.map:{mappings:""},meta:{styles:o.meta},moduleSideEffects:o.extracted?!0:void 0}}}},"cssPlugin");export{Fe as default};