weapp-tailwindcss 5.0.0-next.3 → 5.0.0-next.30

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 (243) hide show
  1. package/README.md +6 -7
  2. package/bin/weapp-tailwindcss.js +1 -21
  3. package/dist/auto-TH1jG2UW.js +115 -0
  4. package/dist/auto-XyKTOP7B.mjs +78 -0
  5. package/dist/bundle-state-Bi-cQua6.mjs +413 -0
  6. package/dist/bundle-state-Ct_8GcSR.js +529 -0
  7. package/dist/bundlers/shared/cache.d.ts +6 -6
  8. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -0
  9. package/dist/bundlers/shared/css-cleanup.d.ts +1 -4
  10. package/dist/bundlers/shared/css-imports.d.ts +3 -3
  11. package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
  12. package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
  13. package/dist/bundlers/shared/generator-css/directives.d.ts +20 -0
  14. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
  15. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
  16. package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
  17. package/dist/bundlers/shared/generator-css/markers.d.ts +28 -0
  18. package/dist/bundlers/shared/generator-css/source-files.d.ts +14 -0
  19. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +24 -0
  20. package/dist/bundlers/shared/generator-css.d.ts +16 -22
  21. package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
  22. package/dist/bundlers/shared/style-requests.d.ts +2 -0
  23. package/dist/bundlers/vite/bundle-state.d.ts +1 -0
  24. package/dist/bundlers/vite/css-finalizer.d.ts +7 -1
  25. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
  26. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +24 -0
  27. package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +4 -0
  28. package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
  29. package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
  30. package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
  31. package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
  32. package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
  33. package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
  34. package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
  35. package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
  36. package/dist/bundlers/vite/generate-bundle.d.ts +14 -2
  37. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
  38. package/dist/bundlers/vite/index.d.ts +5 -2
  39. package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
  40. package/dist/bundlers/vite/postcss-config.d.ts +6 -0
  41. package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
  42. package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -3
  43. package/dist/bundlers/vite/runtime-class-set.d.ts +25 -0
  44. package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
  45. package/dist/bundlers/vite/source-candidates.d.ts +19 -1
  46. package/dist/bundlers/vite/source-scan.d.ts +26 -0
  47. package/dist/bundlers/vite/static-config-content.d.ts +5 -0
  48. package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
  49. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +6 -0
  50. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +6 -2
  51. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +9 -3
  52. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -1
  53. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
  54. package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -6
  55. package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
  56. package/dist/cache/index.d.ts +6 -6
  57. package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
  58. package/dist/cli/context.d.ts +1 -14
  59. package/dist/cli/doctor/types.d.ts +11 -11
  60. package/dist/cli/helpers.d.ts +1 -2
  61. package/dist/cli/mount-options.d.ts +2 -0
  62. package/dist/cli/types.d.ts +0 -2
  63. package/dist/cli/vscode-entry.d.ts +3 -3
  64. package/dist/cli.js +758 -604
  65. package/dist/cli.mjs +766 -612
  66. package/dist/constants.d.ts +1 -2
  67. package/dist/context/runtime-package-replacements.d.ts +2 -0
  68. package/dist/context/style-options.d.ts +3 -0
  69. package/dist/core.js +12 -20
  70. package/dist/core.mjs +8 -14
  71. package/dist/css-macro/auto.d.ts +10 -0
  72. package/dist/css-macro/constants.d.ts +5 -2
  73. package/dist/css-macro/postcss.d.ts +1 -0
  74. package/dist/css-macro/postcss.js +7 -46
  75. package/dist/css-macro/postcss.mjs +2 -46
  76. package/dist/css-macro.d.ts +1 -0
  77. package/dist/css-macro.js +16 -7
  78. package/dist/css-macro.mjs +15 -6
  79. package/dist/defaults-8xrgzxFY.mjs +151 -0
  80. package/dist/defaults-zKUH2mDe.js +193 -0
  81. package/dist/defaults.d.ts +15 -1
  82. package/dist/defaults.js +6 -131
  83. package/dist/defaults.mjs +2 -129
  84. package/dist/escape.js +10 -2
  85. package/dist/escape.mjs +10 -2
  86. package/dist/generator/index.d.ts +1 -1
  87. package/dist/generator/options.d.ts +9 -8
  88. package/dist/generator/types.d.ts +3 -3
  89. package/dist/generator-CrU-Ghc1.js +90 -0
  90. package/dist/generator-Qw-tZ0Z2.mjs +65 -0
  91. package/dist/generator.js +12 -12
  92. package/dist/generator.mjs +2 -1
  93. package/dist/gulp.js +187 -48
  94. package/dist/gulp.mjs +180 -41
  95. package/dist/incremental-runtime-class-set-BdZHkoTs.mjs +1975 -0
  96. package/dist/incremental-runtime-class-set-BxvZONkv.js +2038 -0
  97. package/dist/index.d.ts +3 -2
  98. package/dist/index.js +19 -7
  99. package/dist/index.mjs +6 -5
  100. package/dist/js/babel/cache-options.d.ts +3 -0
  101. package/dist/js/babel/parse.d.ts +7 -4
  102. package/dist/js/index.d.ts +1 -0
  103. package/dist/js/literal-transform.d.ts +2 -0
  104. package/dist/js/precheck.d.ts +2 -2
  105. package/dist/logger-BNzxZbZj.mjs +2 -0
  106. package/dist/logger-TlKT3xmR.js +1 -0
  107. package/dist/postcss/config-directive.d.ts +1 -0
  108. package/dist/postcss/context.d.ts +9 -0
  109. package/dist/postcss/source-files.d.ts +8 -0
  110. package/dist/postcss/tailwind-version.d.ts +3 -0
  111. package/dist/postcss-C6zOQqlL.mjs +228 -0
  112. package/dist/postcss-C7BMYpEF.mjs +169 -0
  113. package/dist/postcss-CiYLsqZn.js +192 -0
  114. package/dist/postcss-DAWf9D3C.js +237 -0
  115. package/dist/postcss-html-transform.js +1 -1
  116. package/dist/postcss.d.ts +2 -2
  117. package/dist/postcss.js +3 -276
  118. package/dist/postcss.mjs +1 -269
  119. package/dist/precheck-D7K12zeX.mjs +4716 -0
  120. package/dist/precheck-D7gJSmJz.js +4842 -0
  121. package/dist/presets/index.d.ts +1 -0
  122. package/dist/presets/uni-app-x.d.ts +1 -0
  123. package/dist/presets.js +29 -13
  124. package/dist/presets.mjs +25 -11
  125. package/dist/reset.d.ts +1 -0
  126. package/dist/reset.js +1 -1
  127. package/dist/runtime-registry-DpcR3IHI.js +5496 -0
  128. package/dist/shared/mpx.d.ts +1 -0
  129. package/dist/source-candidates-CX2ozpKM.mjs +322 -0
  130. package/dist/source-candidates-DNM8iwXW.js +335 -0
  131. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  132. package/dist/tailwindcss/patcher-options.d.ts +3 -51
  133. package/dist/tailwindcss/patcher.d.ts +1 -2
  134. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
  135. package/dist/tailwindcss/runtime/cache.d.ts +4 -3
  136. package/dist/tailwindcss/runtime-patch.d.ts +5 -0
  137. package/dist/tailwindcss/runtime.d.ts +11 -12
  138. package/dist/tailwindcss/source-scan.d.ts +35 -0
  139. package/dist/tailwindcss/targets.d.ts +1 -5
  140. package/dist/tailwindcss/v3-engine/types.d.ts +17 -14
  141. package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
  142. package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
  143. package/dist/tailwindcss/v4/patcher-options.d.ts +1 -23
  144. package/dist/tailwindcss/v4/patcher.d.ts +1 -0
  145. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  146. package/dist/tailwindcss/v4-engine/types.d.ts +17 -5
  147. package/dist/tailwindcss/version.d.ts +4 -0
  148. package/dist/tailwindcss-B-e2RiXr.js +642 -0
  149. package/dist/tailwindcss-C7dJHZ0G.mjs +591 -0
  150. package/dist/typedoc.export.d.ts +0 -2
  151. package/dist/types/index.d.ts +52 -49
  152. package/dist/types/shared.d.ts +6 -0
  153. package/dist/types/user-defined-options/general.d.ts +25 -24
  154. package/dist/types/user-defined-options/important.d.ts +33 -28
  155. package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
  156. package/dist/types/user-defined-options/matcher.d.ts +6 -6
  157. package/dist/uni-app-x/vite.d.ts +1 -1
  158. package/dist/unocss/index.d.ts +2 -0
  159. package/dist/utils/disabled.d.ts +2 -3
  160. package/dist/utils/object.d.ts +9 -0
  161. package/dist/utils/options.d.ts +2 -0
  162. package/dist/utils/regex.d.ts +1 -0
  163. package/dist/{utils-DmC9_In3.js → utils-D7Ygohep.js} +2 -2
  164. package/dist/{utils-7DUGTFED.mjs → utils-DsaS975I.mjs} +1 -1
  165. package/dist/v3-engine-CHItlVq5.js +3616 -0
  166. package/dist/v3-engine-DcvCCHfs.mjs +3321 -0
  167. package/dist/vite-C65DdWEj.js +24439 -0
  168. package/dist/vite-rmL1rsA_.mjs +24425 -0
  169. package/dist/vite.d.ts +1 -2
  170. package/dist/vite.js +3 -4
  171. package/dist/vite.mjs +2 -2
  172. package/dist/weapp-tw-css-import-rewrite-loader.js +5032 -18
  173. package/dist/weapp-tw-runtime-classset-loader.js +32 -9
  174. package/dist/webpack-BU2Er4qg.mjs +841 -0
  175. package/dist/webpack-CqGvjvSQ.js +851 -0
  176. package/dist/webpack.d.ts +1 -3
  177. package/dist/webpack.js +3 -4
  178. package/dist/webpack.mjs +2 -2
  179. package/package.json +38 -48
  180. package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
  181. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-assets.d.ts +0 -14
  182. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-loaders.d.ts +0 -15
  183. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -9
  184. package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
  185. package/dist/cli/config.d.ts +0 -5
  186. package/dist/cli/helpers/patch-cwd.d.ts +0 -1
  187. package/dist/cli/mount-options/patch-status.d.ts +0 -2
  188. package/dist/cli/patch-options.d.ts +0 -6
  189. package/dist/cli/tokens.d.ts +0 -4
  190. package/dist/cli/workspace/package-dirs.d.ts +0 -3
  191. package/dist/cli/workspace/patch-package.d.ts +0 -3
  192. package/dist/cli/workspace/patch-utils.d.ts +0 -3
  193. package/dist/cli/workspace/types.d.ts +0 -11
  194. package/dist/cli/workspace/workspace-globs.d.ts +0 -2
  195. package/dist/cli/workspace/workspace-io.d.ts +0 -1
  196. package/dist/cli/workspace/workspace-lock.d.ts +0 -1
  197. package/dist/cli/workspace.d.ts +0 -2
  198. package/dist/constants-B-_T5UnW.mjs +0 -44
  199. package/dist/constants-p1dyh1x1.js +0 -73
  200. package/dist/css-imports-BbrbluP9.js +0 -177
  201. package/dist/css-imports-CSdPq_Sc.mjs +0 -128
  202. package/dist/experimental/index.d.ts +0 -2
  203. package/dist/experimental/oxc/ast-utils.d.ts +0 -30
  204. package/dist/experimental/oxc/index.d.ts +0 -2
  205. package/dist/experimental/oxc/module-specifiers.d.ts +0 -2
  206. package/dist/experimental/shared/cache.d.ts +0 -3
  207. package/dist/experimental/shared/transform.d.ts +0 -3
  208. package/dist/experimental/shared.d.ts +0 -8
  209. package/dist/experimental/swc/ast-utils.d.ts +0 -30
  210. package/dist/experimental/swc/index.d.ts +0 -2
  211. package/dist/experimental/swc/module-specifiers.d.ts +0 -2
  212. package/dist/generator-Y-Ikv4Fu.mjs +0 -1177
  213. package/dist/generator-css-Bwy_Uz89.mjs +0 -1097
  214. package/dist/generator-css-CRLrHW4F.js +0 -1124
  215. package/dist/generator-mmhXzZnv.js +0 -1276
  216. package/dist/js/syntax.d.ts +0 -10
  217. package/dist/lightningcss/index.d.ts +0 -8
  218. package/dist/lightningcss/style-handler/options.d.ts +0 -3
  219. package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
  220. package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
  221. package/dist/lightningcss/style-handler.d.ts +0 -17
  222. package/dist/loader-anchors-1MumTAtA.mjs +0 -205
  223. package/dist/loader-anchors-TrFvT6g1.js +0 -273
  224. package/dist/logger-BZ45DZJT.js +0 -1003
  225. package/dist/logger-BoVx1Dbt.mjs +0 -935
  226. package/dist/patcher-options-6gJN2EXy.js +0 -115
  227. package/dist/patcher-options-DQfR5xxT.mjs +0 -92
  228. package/dist/recorder-GdTJ3QqX.js +0 -2878
  229. package/dist/recorder-XdFvVASS.mjs +0 -2763
  230. package/dist/tailwindcss/recorder.d.ts +0 -13
  231. package/dist/tailwindcss/targets/paths.d.ts +0 -13
  232. package/dist/tailwindcss/targets/record-io.d.ts +0 -5
  233. package/dist/tailwindcss/targets/recorder.d.ts +0 -3
  234. package/dist/tailwindcss/targets/types.d.ts +0 -35
  235. package/dist/types/disabled-options.d.ts +0 -4
  236. package/dist/vite-BDywuCjn.mjs +0 -2186
  237. package/dist/vite-DgRh_GXn.js +0 -2199
  238. package/dist/webpack-CAJR4hhP.js +0 -456
  239. package/dist/webpack-CiHqVZTg.mjs +0 -441
  240. package/dist/webpack4.d.ts +0 -4
  241. package/dist/webpack4.js +0 -387
  242. package/dist/webpack4.mjs +0 -379
  243. package/scripts/postinstall.mjs +0 -59
@@ -0,0 +1,529 @@
1
+ const require_chunk = require("./chunk-C5U5_Hdc.js");
2
+ const require_precheck = require("./precheck-D7gJSmJz.js");
3
+ let node_module = require("node:module");
4
+ let node_path = require("node:path");
5
+ node_path = require_chunk.__toESM(node_path);
6
+ let node_process = require("node:process");
7
+ node_process = require_chunk.__toESM(node_process);
8
+ let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
9
+ let node_buffer = require("node:buffer");
10
+ //#region src/bundlers/shared/module-graph.ts
11
+ const QUERY_HASH_RE = /[?#].*$/u;
12
+ const PROTOCOL_RE = /^[a-z][a-z+.-]*:/iu;
13
+ const WINDOWS_ABSOLUTE_RE = /^[a-z]:[\\/]/iu;
14
+ const VIRTUAL_PREFIX = "\0";
15
+ const JS_EXTENSIONS = [
16
+ ".js",
17
+ ".mjs",
18
+ ".cjs"
19
+ ];
20
+ function normalizeOutputPathKey(value) {
21
+ return node_path.default.normalize(value).replace(/\\/g, "/");
22
+ }
23
+ function stripQueryAndHash(specifier) {
24
+ return specifier.replace(QUERY_HASH_RE, "");
25
+ }
26
+ function isResolvableSpecifier(specifier) {
27
+ if (!specifier) return false;
28
+ const normalized = stripQueryAndHash(specifier);
29
+ if (normalized.startsWith(VIRTUAL_PREFIX)) return false;
30
+ if (node_path.default.isAbsolute(normalized) || WINDOWS_ABSOLUTE_RE.test(normalized)) return true;
31
+ return !PROTOCOL_RE.test(normalized);
32
+ }
33
+ function toAbsoluteOutputPath(fileName, outDir) {
34
+ if (node_path.default.isAbsolute(fileName) || WINDOWS_ABSOLUTE_RE.test(fileName)) return node_path.default.normalize(fileName);
35
+ return node_path.default.resolve(outDir, fileName);
36
+ }
37
+ function matchWithExtensions(candidate, hasOutput) {
38
+ if (hasOutput(candidate)) return candidate;
39
+ if (!node_path.default.extname(candidate)) for (const ext of JS_EXTENSIONS) {
40
+ const extended = `${candidate}${ext}`;
41
+ if (hasOutput(extended)) return extended;
42
+ }
43
+ }
44
+ function resolveOutputSpecifier(specifier, importer, outDir, hasOutput) {
45
+ if (!isResolvableSpecifier(specifier)) return;
46
+ const normalized = stripQueryAndHash(specifier);
47
+ let candidate;
48
+ if (node_path.default.isAbsolute(normalized) || WINDOWS_ABSOLUTE_RE.test(normalized)) candidate = node_path.default.normalize(normalized);
49
+ else if (normalized.startsWith("/")) candidate = node_path.default.resolve(outDir, normalized.slice(1));
50
+ else candidate = node_path.default.resolve(node_path.default.dirname(importer), normalized);
51
+ return matchWithExtensions(candidate, hasOutput);
52
+ }
53
+ //#endregion
54
+ //#region src/bundlers/shared/style-requests.ts
55
+ const SOURCE_STYLE_EXT_RE = /\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/i;
56
+ const STYLE_QUERY_RE = /(?:^|&)type=styles?(?:&|$)/;
57
+ const STYLE_LANG_QUERY_RE = /(?:^|&)lang(?:[.=](?:css|scss|sass|less|styl|stylus|pcss|postcss))?(?:&|$)/;
58
+ function stripHash(request) {
59
+ const hashIndex = request.indexOf("#");
60
+ return hashIndex === -1 ? request : request.slice(0, hashIndex);
61
+ }
62
+ function stripRequestQuery(request) {
63
+ const normalized = stripHash(request);
64
+ const queryIndex = normalized.indexOf("?");
65
+ return queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
66
+ }
67
+ function isSourceStyleRequest(request) {
68
+ if (typeof request !== "string" || request.length === 0) return false;
69
+ const normalized = stripHash(request);
70
+ const queryIndex = normalized.indexOf("?");
71
+ const pathname = queryIndex === -1 ? normalized : normalized.slice(0, queryIndex);
72
+ if (SOURCE_STYLE_EXT_RE.test(pathname)) return true;
73
+ if (queryIndex === -1) return false;
74
+ const query = normalized.slice(queryIndex + 1);
75
+ return STYLE_QUERY_RE.test(query) || STYLE_LANG_QUERY_RE.test(query);
76
+ }
77
+ //#endregion
78
+ //#region src/bundlers/vite/utils.ts
79
+ function slash(p) {
80
+ return (0, _weapp_tailwindcss_shared.ensurePosix)(p);
81
+ }
82
+ const isWindows = node_process.default.platform === "win32";
83
+ const cssLangRE = new RegExp(`\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)`);
84
+ function isCSSRequest(request) {
85
+ return cssLangRE.test(request) || isSourceStyleRequest(request);
86
+ }
87
+ function normalizePath(id) {
88
+ return node_path.default.posix.normalize(isWindows ? (0, _weapp_tailwindcss_shared.ensurePosix)(id) : id);
89
+ }
90
+ async function formatPostcssSourceMap(rawMap, file) {
91
+ const inputFileDir = node_path.default.dirname(file);
92
+ const sources = rawMap.sources.map((source) => {
93
+ const cleanSource = (0, _weapp_tailwindcss_shared.cleanUrl)(decodeURIComponent(source));
94
+ if (cleanSource[0] === "<" && cleanSource.endsWith(">")) return `\0${cleanSource}`;
95
+ return normalizePath(node_path.default.resolve(inputFileDir, cleanSource));
96
+ });
97
+ return {
98
+ file,
99
+ mappings: rawMap.mappings,
100
+ names: rawMap.names,
101
+ sources,
102
+ sourcesContent: rawMap.sourcesContent,
103
+ version: rawMap.version
104
+ };
105
+ }
106
+ //#endregion
107
+ //#region src/utils/disabled.ts
108
+ function resolvePluginDisabledState(disabled) {
109
+ if (disabled === true) return { plugin: true };
110
+ if (disabled === false || disabled == null) return { plugin: false };
111
+ return { plugin: disabled.plugin ?? false };
112
+ }
113
+ //#endregion
114
+ //#region src/utils/resolve-package.ts
115
+ const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
116
+ function resolvePackageDir(name) {
117
+ const pkgPath = require$1.resolve(`${name}/package.json`);
118
+ return node_path.default.dirname(pkgPath);
119
+ }
120
+ //#endregion
121
+ //#region src/bundlers/shared/generated-css-marker.ts
122
+ const BUNDLER_GENERATED_CSS_MARKER_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/i;
123
+ const BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/gi;
124
+ function createBundlerGeneratedCssMarker(bundler, file) {
125
+ return `/*! weapp-tailwindcss ${bundler}-generated-css:${encodeURIComponent(file)} */`;
126
+ }
127
+ function hasBundlerGeneratedCssMarker(source) {
128
+ return typeof source === "string" && BUNDLER_GENERATED_CSS_MARKER_RE.test(source);
129
+ }
130
+ function stripBundlerGeneratedCssMarkers(source) {
131
+ return source.replace(BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE, "");
132
+ }
133
+ //#endregion
134
+ //#region src/bundlers/shared/run-tasks.ts
135
+ async function runWithConcurrency(factories, limit = Math.min(4, Math.max(1, factories.length))) {
136
+ if (factories.length === 0) return [];
137
+ const results = Array.from({ length: factories.length });
138
+ const executing = /* @__PURE__ */ new Set();
139
+ let cursor = 0;
140
+ const effectiveLimit = Math.max(1, limit);
141
+ const scheduleNext = () => {
142
+ if (cursor >= factories.length) return;
143
+ const currentIndex = cursor++;
144
+ const factory = factories[currentIndex];
145
+ if (!factory) return;
146
+ const wrapped = Promise.resolve(factory()).then((value) => {
147
+ results[currentIndex] = value;
148
+ }).finally(() => {
149
+ executing.delete(wrapped);
150
+ });
151
+ executing.add(wrapped);
152
+ };
153
+ while (cursor < factories.length && executing.size < effectiveLimit) scheduleNext();
154
+ while (cursor < factories.length) {
155
+ await Promise.race(executing);
156
+ scheduleNext();
157
+ }
158
+ await Promise.all(executing);
159
+ return results;
160
+ }
161
+ function pushConcurrentTaskFactories(queue, factories, limit) {
162
+ if (factories.length === 0) return;
163
+ queue.push(runWithConcurrency(factories, limit).then(() => void 0));
164
+ }
165
+ //#endregion
166
+ //#region src/bundlers/vite/bundle-entries.ts
167
+ function readOutputEntry(entry) {
168
+ if (entry.output.type === "chunk") return entry.output.code;
169
+ const source = entry.output.source;
170
+ if (typeof source === "string") return source;
171
+ if (source instanceof Uint8Array) return node_buffer.Buffer.from(source).toString();
172
+ const fallbackSource = source;
173
+ if (fallbackSource == null) return;
174
+ if (typeof fallbackSource.toString === "function") return fallbackSource.toString();
175
+ }
176
+ function isJavaScriptEntry(entry) {
177
+ if (entry.output.type === "chunk") return true;
178
+ return entry.fileName.endsWith(".js");
179
+ }
180
+ function createBundleModuleGraphOptions(outputDir, entries) {
181
+ const normalizedEntries = /* @__PURE__ */ new Map();
182
+ for (const [id, entry] of entries) normalizedEntries.set(normalizeOutputPathKey(id), entry);
183
+ const getEntry = (id) => entries.get(id) ?? normalizedEntries.get(normalizeOutputPathKey(id));
184
+ return {
185
+ resolve(specifier, importer) {
186
+ return resolveOutputSpecifier(specifier, importer, outputDir, (candidate) => Boolean(getEntry(candidate)));
187
+ },
188
+ load(id) {
189
+ const entry = getEntry(id);
190
+ if (!entry) return;
191
+ return readOutputEntry(entry);
192
+ },
193
+ filter(id) {
194
+ return Boolean(getEntry(id));
195
+ }
196
+ };
197
+ }
198
+ function applyLinkedResults(linked, entries, onLinkedUpdate, onApplied) {
199
+ if (!linked) return;
200
+ const normalizedEntries = /* @__PURE__ */ new Map();
201
+ for (const [entryId, entry] of entries) normalizedEntries.set(normalizeOutputPathKey(entryId), entry);
202
+ for (const [id, { code }] of Object.entries(linked)) {
203
+ const entry = entries.get(id) ?? normalizedEntries.get(normalizeOutputPathKey(id));
204
+ if (!entry) continue;
205
+ const previous = readOutputEntry(entry);
206
+ if (previous == null || previous === code) continue;
207
+ if (entry.output.type === "chunk") entry.output.code = code;
208
+ else entry.output.source = code;
209
+ onApplied?.(entry, code);
210
+ onLinkedUpdate(entry.fileName, previous, code);
211
+ }
212
+ }
213
+ //#endregion
214
+ //#region src/bundlers/vite/runtime-affecting-signature.ts
215
+ const CSS_BLOCK_COMMENT_RE = /\/\*[\s\S]*?\*\//g;
216
+ const CSS_AROUND_PUNCTUATION_RE = /\s*([{}:;,>+~()])\s*/g;
217
+ const CSS_TRAILING_DECLARATION_SEMICOLON_RE = /;\}/g;
218
+ const CSS_WHITESPACE_RE = /\s+/g;
219
+ function createHtmlRuntimeAffectingSignature(source) {
220
+ try {
221
+ const parts = [];
222
+ const parser = new require_precheck.Parser({
223
+ onattribute(name, value) {
224
+ parts.push(`a:${name}=${value}`);
225
+ },
226
+ oncomment(data) {
227
+ parts.push(`c:${data}`);
228
+ },
229
+ ontext(data) {
230
+ const value = data.trim();
231
+ if (value.length > 0) parts.push(`t:${value}`);
232
+ }
233
+ }, { xmlMode: true });
234
+ parser.write(source);
235
+ parser.end();
236
+ return parts.join("\n");
237
+ } catch {
238
+ return source;
239
+ }
240
+ }
241
+ function createJsRuntimeAffectingSignature(source) {
242
+ try {
243
+ const ast = require_precheck.babelParse(source, {
244
+ cache: true,
245
+ cacheKey: "vite-runtime-affecting:unambiguous",
246
+ plugins: ["jsx", "typescript"],
247
+ sourceType: "unambiguous"
248
+ });
249
+ const parts = [];
250
+ require_precheck.traverse(ast, {
251
+ noScope: true,
252
+ StringLiteral(path) {
253
+ parts.push(`s:${path.node.value}`);
254
+ },
255
+ TemplateElement(path) {
256
+ parts.push(`t:${path.node.value.raw}`);
257
+ },
258
+ JSXText(path) {
259
+ const value = path.node.value.trim();
260
+ if (value.length > 0) parts.push(`x:${value}`);
261
+ }
262
+ });
263
+ const comments = ast.comments;
264
+ if (Array.isArray(comments)) {
265
+ for (const comment of comments) if (typeof comment?.value === "string" && comment.value.length > 0) parts.push(`c:${comment.value}`);
266
+ }
267
+ return parts.join("\n");
268
+ } catch {
269
+ return source;
270
+ }
271
+ }
272
+ function createCssRuntimeAffectingSignature(source) {
273
+ return source.replace(CSS_BLOCK_COMMENT_RE, "").replace(CSS_AROUND_PUNCTUATION_RE, "$1").replace(CSS_TRAILING_DECLARATION_SEMICOLON_RE, "}").replace(CSS_WHITESPACE_RE, " ").trim();
274
+ }
275
+ function createRuntimeAffectingSourceSignature(source, type) {
276
+ if (type === "html") return createHtmlRuntimeAffectingSignature(source);
277
+ if (type === "js") return createJsRuntimeAffectingSignature(source);
278
+ if (type === "css") return createCssRuntimeAffectingSignature(source);
279
+ return source;
280
+ }
281
+ //#endregion
282
+ //#region src/bundlers/vite/bundle-state.ts
283
+ function createBundleBuildState() {
284
+ return {
285
+ iteration: 0,
286
+ sourceHashByFile: /* @__PURE__ */ new Map(),
287
+ runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
288
+ runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
289
+ linkedByEntry: /* @__PURE__ */ new Map(),
290
+ dependentsByLinkedFile: /* @__PURE__ */ new Map(),
291
+ generatorCandidateSignature: void 0
292
+ };
293
+ }
294
+ function createChangedByType() {
295
+ return {
296
+ html: /* @__PURE__ */ new Set(),
297
+ js: /* @__PURE__ */ new Set(),
298
+ css: /* @__PURE__ */ new Set(),
299
+ other: /* @__PURE__ */ new Set()
300
+ };
301
+ }
302
+ function createProcessFiles() {
303
+ return {
304
+ html: /* @__PURE__ */ new Set(),
305
+ js: /* @__PURE__ */ new Set(),
306
+ css: /* @__PURE__ */ new Set()
307
+ };
308
+ }
309
+ function readEntrySource(output) {
310
+ if (output.type === "chunk") return output.code;
311
+ return output.source.toString();
312
+ }
313
+ function classifyBundleEntry(file, opts) {
314
+ if (opts.cssMatcher(file) || isCSSRequest(file)) return "css";
315
+ if (opts.htmlMatcher(file)) return "html";
316
+ if (opts.jsMatcher(file) || opts.wxsMatcher(file)) return "js";
317
+ return "other";
318
+ }
319
+ function collectJsEntries(fileName, output, outDir, store) {
320
+ const entry = {
321
+ fileName,
322
+ output
323
+ };
324
+ if (!isJavaScriptEntry(entry)) return;
325
+ const absolute = toAbsoluteOutputPath(fileName, outDir);
326
+ store.set(absolute, entry);
327
+ }
328
+ function markProcessFile(type, file, processFiles) {
329
+ if (type === "html" || type === "js" || type === "css") processFiles[type].add(file);
330
+ }
331
+ function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
332
+ const sourceHashByFile = /* @__PURE__ */ new Map();
333
+ const runtimeAffectingSignatureByFile = /* @__PURE__ */ new Map();
334
+ const runtimeAffectingHashByFile = /* @__PURE__ */ new Map();
335
+ const changedByType = createChangedByType();
336
+ const runtimeAffectingChangedByType = createChangedByType();
337
+ const processFiles = createProcessFiles();
338
+ const linkedImpactsByEntry = /* @__PURE__ */ new Map();
339
+ const jsEntries = /* @__PURE__ */ new Map();
340
+ const entries = [];
341
+ const firstRun = state.linkedByEntry.size === 0;
342
+ for (const [file, output] of Object.entries(bundle)) {
343
+ const type = classifyBundleEntry(file, opts);
344
+ const source = readEntrySource(output);
345
+ const hash = opts.cache.computeHash(source);
346
+ sourceHashByFile.set(file, hash);
347
+ const previousHash = state.sourceHashByFile.get(file);
348
+ const changed = previousHash == null || previousHash !== hash;
349
+ const previousRuntimeAffectingSignature = state.runtimeAffectingSignatureByFile.get(file);
350
+ const previousRuntimeAffectingHash = state.runtimeAffectingHashByFile.get(file);
351
+ const canReuseRuntimeAffectingSignature = !changed && previousRuntimeAffectingSignature != null && previousRuntimeAffectingHash != null;
352
+ const runtimeAffectingSignature = canReuseRuntimeAffectingSignature ? previousRuntimeAffectingSignature : createRuntimeAffectingSourceSignature(source, type);
353
+ const runtimeAffectingHash = canReuseRuntimeAffectingSignature ? previousRuntimeAffectingHash : opts.cache.computeHash(runtimeAffectingSignature);
354
+ runtimeAffectingSignatureByFile.set(file, runtimeAffectingSignature);
355
+ runtimeAffectingHashByFile.set(file, runtimeAffectingHash);
356
+ if (changed) changedByType[type].add(file);
357
+ if (previousRuntimeAffectingHash == null || previousRuntimeAffectingHash !== runtimeAffectingHash) runtimeAffectingChangedByType[type].add(file);
358
+ if (forceAll || firstRun) markProcessFile(type, file, processFiles);
359
+ else if (type === "html") processFiles.html.add(file);
360
+ else if (changed && (type === "js" || type === "css")) processFiles[type].add(file);
361
+ collectJsEntries(file, output, outDir, jsEntries);
362
+ entries.push({
363
+ file,
364
+ output,
365
+ source,
366
+ type
367
+ });
368
+ }
369
+ if (!forceAll && !firstRun) for (const changedFile of changedByType.js) {
370
+ const dependents = state.dependentsByLinkedFile.get(changedFile);
371
+ if (!dependents) continue;
372
+ for (const entryFile of dependents) {
373
+ processFiles.js.add(entryFile);
374
+ let impacts = linkedImpactsByEntry.get(entryFile);
375
+ if (!impacts) {
376
+ impacts = /* @__PURE__ */ new Set();
377
+ linkedImpactsByEntry.set(entryFile, impacts);
378
+ }
379
+ impacts.add(changedFile);
380
+ }
381
+ }
382
+ return {
383
+ entries,
384
+ jsEntries,
385
+ sourceHashByFile,
386
+ runtimeAffectingSignatureByFile,
387
+ runtimeAffectingHashByFile,
388
+ changedByType,
389
+ runtimeAffectingChangedByType,
390
+ processFiles,
391
+ linkedImpactsByEntry
392
+ };
393
+ }
394
+ function invertLinkedByEntry(linkedByEntry) {
395
+ const dependentsByLinkedFile = /* @__PURE__ */ new Map();
396
+ for (const [entryFile, linkedFiles] of linkedByEntry.entries()) for (const linkedFile of linkedFiles) {
397
+ let dependents = dependentsByLinkedFile.get(linkedFile);
398
+ if (!dependents) {
399
+ dependents = /* @__PURE__ */ new Set();
400
+ dependentsByLinkedFile.set(linkedFile, dependents);
401
+ }
402
+ dependents.add(entryFile);
403
+ }
404
+ return dependentsByLinkedFile;
405
+ }
406
+ function updateBundleBuildState(state, snapshot, linkedByEntry, options = {}) {
407
+ const incremental = options.incremental === true;
408
+ state.iteration += 1;
409
+ state.sourceHashByFile = incremental ? new Map([...state.sourceHashByFile, ...snapshot.sourceHashByFile]) : snapshot.sourceHashByFile;
410
+ state.runtimeAffectingSignatureByFile = incremental ? new Map([...state.runtimeAffectingSignatureByFile, ...snapshot.runtimeAffectingSignatureByFile]) : snapshot.runtimeAffectingSignatureByFile;
411
+ state.runtimeAffectingHashByFile = incremental ? new Map([...state.runtimeAffectingHashByFile, ...snapshot.runtimeAffectingHashByFile]) : snapshot.runtimeAffectingHashByFile;
412
+ state.linkedByEntry = incremental ? new Map([...state.linkedByEntry, ...linkedByEntry]) : linkedByEntry;
413
+ state.dependentsByLinkedFile = invertLinkedByEntry(state.linkedByEntry);
414
+ }
415
+ //#endregion
416
+ Object.defineProperty(exports, "applyLinkedResults", {
417
+ enumerable: true,
418
+ get: function() {
419
+ return applyLinkedResults;
420
+ }
421
+ });
422
+ Object.defineProperty(exports, "buildBundleSnapshot", {
423
+ enumerable: true,
424
+ get: function() {
425
+ return buildBundleSnapshot;
426
+ }
427
+ });
428
+ Object.defineProperty(exports, "createBundleBuildState", {
429
+ enumerable: true,
430
+ get: function() {
431
+ return createBundleBuildState;
432
+ }
433
+ });
434
+ Object.defineProperty(exports, "createBundleModuleGraphOptions", {
435
+ enumerable: true,
436
+ get: function() {
437
+ return createBundleModuleGraphOptions;
438
+ }
439
+ });
440
+ Object.defineProperty(exports, "createBundlerGeneratedCssMarker", {
441
+ enumerable: true,
442
+ get: function() {
443
+ return createBundlerGeneratedCssMarker;
444
+ }
445
+ });
446
+ Object.defineProperty(exports, "formatPostcssSourceMap", {
447
+ enumerable: true,
448
+ get: function() {
449
+ return formatPostcssSourceMap;
450
+ }
451
+ });
452
+ Object.defineProperty(exports, "hasBundlerGeneratedCssMarker", {
453
+ enumerable: true,
454
+ get: function() {
455
+ return hasBundlerGeneratedCssMarker;
456
+ }
457
+ });
458
+ Object.defineProperty(exports, "isCSSRequest", {
459
+ enumerable: true,
460
+ get: function() {
461
+ return isCSSRequest;
462
+ }
463
+ });
464
+ Object.defineProperty(exports, "isSourceStyleRequest", {
465
+ enumerable: true,
466
+ get: function() {
467
+ return isSourceStyleRequest;
468
+ }
469
+ });
470
+ Object.defineProperty(exports, "normalizeOutputPathKey", {
471
+ enumerable: true,
472
+ get: function() {
473
+ return normalizeOutputPathKey;
474
+ }
475
+ });
476
+ Object.defineProperty(exports, "pushConcurrentTaskFactories", {
477
+ enumerable: true,
478
+ get: function() {
479
+ return pushConcurrentTaskFactories;
480
+ }
481
+ });
482
+ Object.defineProperty(exports, "resolveOutputSpecifier", {
483
+ enumerable: true,
484
+ get: function() {
485
+ return resolveOutputSpecifier;
486
+ }
487
+ });
488
+ Object.defineProperty(exports, "resolvePackageDir", {
489
+ enumerable: true,
490
+ get: function() {
491
+ return resolvePackageDir;
492
+ }
493
+ });
494
+ Object.defineProperty(exports, "resolvePluginDisabledState", {
495
+ enumerable: true,
496
+ get: function() {
497
+ return resolvePluginDisabledState;
498
+ }
499
+ });
500
+ Object.defineProperty(exports, "slash", {
501
+ enumerable: true,
502
+ get: function() {
503
+ return slash;
504
+ }
505
+ });
506
+ Object.defineProperty(exports, "stripBundlerGeneratedCssMarkers", {
507
+ enumerable: true,
508
+ get: function() {
509
+ return stripBundlerGeneratedCssMarkers;
510
+ }
511
+ });
512
+ Object.defineProperty(exports, "stripRequestQuery", {
513
+ enumerable: true,
514
+ get: function() {
515
+ return stripRequestQuery;
516
+ }
517
+ });
518
+ Object.defineProperty(exports, "toAbsoluteOutputPath", {
519
+ enumerable: true,
520
+ get: function() {
521
+ return toAbsoluteOutputPath;
522
+ }
523
+ });
524
+ Object.defineProperty(exports, "updateBundleBuildState", {
525
+ enumerable: true,
526
+ get: function() {
527
+ return updateBundleBuildState;
528
+ }
529
+ });
@@ -2,15 +2,15 @@ import type { CacheValue, HashMapKey, ICreateCacheReturnType } from '../../cache
2
2
  export interface ProcessCachedTaskOptions<TValue extends CacheValue> {
3
3
  cache: ICreateCacheReturnType;
4
4
  cacheKey: string;
5
- hashKey?: HashMapKey;
6
- rawSource?: string;
7
- hash?: string;
8
- readCache?: () => TValue | undefined;
5
+ hashKey?: HashMapKey | undefined;
6
+ rawSource?: string | undefined;
7
+ hash?: string | undefined;
8
+ readCache?: (() => TValue | undefined) | undefined;
9
9
  applyResult: (value: TValue) => void | Promise<void>;
10
10
  transform: () => Promise<{
11
11
  result: TValue;
12
- cacheValue?: CacheValue;
12
+ cacheValue?: CacheValue | undefined;
13
13
  }>;
14
- onCacheHit?: () => void;
14
+ onCacheHit?: (() => void) | undefined;
15
15
  }
16
16
  export declare function processCachedTask<TValue extends CacheValue>({ cache, cacheKey, hashKey, rawSource, hash, readCache, applyResult, transform, onCacheHit, }: ProcessCachedTaskOptions<TValue>): Promise<void>;
@@ -0,0 +1 @@
1
+ export { removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
@@ -1,4 +1 @@
1
- export declare function removeUnsupportedMiniProgramAtRules(css: string): string;
2
- export declare function removeUnsupportedAtSupports(css: string): string;
3
- export declare function hoistTailwindPreflightBase(css: string): string;
4
- export declare function finalizeMiniProgramCss(css: string): string;
1
+ export { finalizeMiniProgramCss, hoistTailwindPreflightBase, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
@@ -1,8 +1,8 @@
1
1
  import type { AppType } from '../../types';
2
2
  export interface ResolveTailwindcssImportOptions {
3
- join?: (base: string, subpath: string) => string;
4
- appType?: AppType;
5
- rootImport?: string;
3
+ join?: ((base: string, subpath: string) => string) | undefined;
4
+ appType?: AppType | undefined;
5
+ rootImport?: string | undefined;
6
6
  }
7
7
  export declare function resolveTailwindcssImport(specifier: string, pkgDir: string, options?: ResolveTailwindcssImportOptions): string | null;
8
8
  export declare function rewriteTailwindcssImportsInCode(code: string, pkgDir: string, options?: ResolveTailwindcssImportOptions): string | undefined;
@@ -0,0 +1,3 @@
1
+ export declare function createBundlerGeneratedCssMarker(bundler: 'vite' | 'webpack', file: string): string;
2
+ export declare function hasBundlerGeneratedCssMarker(source: unknown): boolean;
3
+ export declare function stripBundlerGeneratedCssMarkers(source: string): string;
@@ -0,0 +1,2 @@
1
+ export declare function prependConfigDirective(css: string, config: string | undefined): string;
2
+ export declare function normalizeConfigDirective(css: string, config: string | undefined): string;
@@ -0,0 +1,20 @@
1
+ interface TailwindDirectiveOptions {
2
+ importFallback?: boolean | undefined;
3
+ }
4
+ export declare function parseImportRequest(params: string): string | undefined;
5
+ export declare function normalizeTailwindSourceForGenerator(rawSource: string, options?: TailwindDirectiveOptions): string;
6
+ export declare function normalizeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
7
+ export declare function removeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
8
+ export declare function hasTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
9
+ export declare function hasTailwindRootDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
10
+ export declare function hasTailwindApplyDirective(rawSource: string): boolean;
11
+ export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
12
+ removeConfig?: boolean;
13
+ importFallback?: boolean;
14
+ }): {
15
+ css: string;
16
+ config: string | undefined;
17
+ configRequest: string | undefined;
18
+ base: string;
19
+ } | undefined;
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
2
+ import type { TailwindResolvedSource } from '../../../generator';
3
+ import type { InternalUserDefinedOptions } from '../../../types';
4
+ export declare function removeTailwindApplyRules(rawSource: string): string;
5
+ export declare function hasConfiguredContainerCompatSources(sources: TailwindResolvedSource[]): boolean;
6
+ export declare function appendLegacyCompatCss(css: string, rawSource: string, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Promise<string>;
7
+ export declare function appendLegacyContainerCompatCss(css: string, rawSource: string, file: string, runtime: Set<string>, configuredContainerCompat: boolean, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Promise<string>;
@@ -0,0 +1,5 @@
1
+ export declare function normalizeCompatSelectors(selector: string): string[];
2
+ export declare function collectGeneratedSelectors(css: string): Set<string>;
3
+ export declare function removeGeneratedSelectorCompatCss(css: string, generatedCss: string): string;
4
+ export declare function collectDedupedPostTransformCompatCss(css: string, generatedCss: string): string;
5
+ export declare function removeDuplicatedViteMarkers(css: string, baseCss: string): string;
@@ -0,0 +1 @@
1
+ export declare function inheritLegacyUnitConvertedDeclarations(css: string, legacyCss: string): string;
@@ -0,0 +1,28 @@
1
+ export declare const TAILWIND_V4_BANNER_RE: RegExp;
2
+ export declare const TAILWIND_GENERATED_CSS_MARKER_RE: RegExp;
3
+ export declare const GENERATOR_PLACEHOLDER_MARKER_RE: RegExp;
4
+ export declare const GENERATOR_PLACEHOLDER_MARKER_GLOBAL_RE: RegExp;
5
+ export declare const TAILWIND_BANNER_PREFIX_RE: RegExp;
6
+ export declare const TAILWIND_BANNER_RE: RegExp;
7
+ export declare const TAILWIND_BANNER_GLOBAL_RE: RegExp;
8
+ export declare const VITE_MARKER_RE: RegExp;
9
+ export declare function createCssAppend(base: string, extra: string): string;
10
+ export declare function splitTailwindV4GeneratedCss(rawSource: string, rawTailwindCss: string): string | undefined;
11
+ export declare function splitTailwindV4GeneratedCssBySourceOrder(rawSource: string, rawTailwindCss: string): {
12
+ before: string;
13
+ after: string;
14
+ } | undefined;
15
+ export declare function splitGeneratorPlaceholderCssBySourceOrder(rawSource: string, rawTailwindCss?: string): {
16
+ before: string;
17
+ after: string;
18
+ } | undefined;
19
+ export declare function removeTailwindGeneratedCssByBanner(rawSource: string): string | undefined;
20
+ export declare function splitTailwindGeneratedCssByBanner(rawSource: string, start?: number): {
21
+ before: string;
22
+ after: string;
23
+ } | undefined;
24
+ export declare function stripTailwindBanner(css: string): string;
25
+ export declare function stripTailwindBanners(css: string): string;
26
+ export declare function stripGeneratorPlaceholderMarkers(css: string): string;
27
+ export declare function hasTailwindGeneratedCss(rawSource: string): boolean;
28
+ export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boolean;
@@ -0,0 +1,14 @@
1
+ export interface SourceSideCssEntrySource {
2
+ css: string;
3
+ config?: string | undefined;
4
+ configRequest?: string | undefined;
5
+ base: string;
6
+ file: string;
7
+ }
8
+ export declare function resolveSourceSideCssEntrySource(file: string, sourceOptions: {
9
+ projectRoot?: string;
10
+ cwd?: string;
11
+ outputRoot?: string;
12
+ }, resolveOptions?: {
13
+ removeConfig?: boolean;
14
+ }): SourceSideCssEntrySource | undefined;