weapp-tailwindcss 5.0.0 → 5.0.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/dist/{bundle-state-DgGEhk_z.js → bundle-state-Bvj01pW7.js} +35 -3
- package/dist/{bundle-state-CnaJxkFY.mjs → bundle-state-DY3eq4Gz.mjs} +24 -4
- package/dist/bundlers/shared/generated-css-marker.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +11 -5
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +2 -0
- package/dist/bundlers/shared/generator-css.d.ts +1 -0
- package/dist/bundlers/vite/bundle-state.d.ts +5 -1
- package/dist/bundlers/vite/css-finalizer.d.ts +12 -3
- package/dist/bundlers/vite/generate-bundle.d.ts +22 -6
- package/dist/bundlers/vite/processed-css-assets.d.ts +10 -2
- package/dist/bundlers/vite/source-candidates.d.ts +2 -0
- package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +8 -0
- package/dist/cli.js +1 -0
- package/dist/cli.mjs +1 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator--0-ekuVO.js → generator-Bd1LntD3.js} +1 -1
- package/dist/{generator-B76ovqsv.mjs → generator-DRHWC1t-.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +16 -10
- package/dist/gulp.mjs +14 -8
- package/dist/{incremental-runtime-class-set-CN6K_97P.js → incremental-runtime-class-set-Bl18sFqt.js} +540 -694
- package/dist/{incremental-runtime-class-set-x10M9bn_.mjs → incremental-runtime-class-set-CAEuUesH.mjs} +495 -619
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-CR9UCaIK.mjs → postcss-CJrmfXvi.mjs} +4 -4
- package/dist/{postcss-hYimKoN_.js → postcss-DfnqZ4Bm.js} +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-DPtJjZmV.js → precheck-Bj5ReSOU.js} +2 -2
- package/dist/{precheck-BrNwLG2e.mjs → precheck-CUr1DYyy.mjs} +2 -2
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +2 -2
- package/dist/{source-candidates-DN1mihlU.mjs → source-candidates-D7b-Jzsx.mjs} +44 -11
- package/dist/{source-candidates-DSxme_O2.js → source-candidates-DQxvGPSw.js} +49 -10
- package/dist/tailwindcss/source-scan.d.ts +3 -1
- package/dist/{tailwindcss-DWtPieNE.mjs → tailwindcss-D5RogwtV.mjs} +14 -49
- package/dist/{tailwindcss-glCm_d3H.js → tailwindcss-jvoYizzX.js} +19 -48
- package/dist/{v3-engine-DCxNPBVs.mjs → v3-engine-BCUGX3gX.mjs} +644 -36
- package/dist/{v3-engine-D3BMLVAN.js → v3-engine-CmIF_gsq.js} +775 -35
- package/dist/{vite-Ec0uX6kF.js → vite-D1ZdgbWa.js} +533 -290
- package/dist/{vite-DOprpdH-.mjs → vite-jBTi5CwO.mjs} +532 -289
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/{runtime-registry-DpcR3IHI.js → watch-dependencies-zwx4EhBn.js} +39 -0
- package/dist/weapp-tw-css-import-rewrite-loader.js +1953 -1630
- package/dist/weapp-tw-runtime-classset-loader.js +6 -6
- package/dist/{webpack-DFlZcqAU.mjs → webpack-CChDqRrl.mjs} +6 -6
- package/dist/{webpack-Ccohlg3A.js → webpack-vk2uqSnK.js} +7 -7
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator
|
|
2
|
+
const require_generator = require("./generator-Bd1LntD3.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
4
|
+
const require_postcss = require("./postcss-DfnqZ4Bm.js");
|
|
5
|
+
const require_vite = require("./vite-D1ZdgbWa.js");
|
|
6
|
+
const require_webpack = require("./webpack-vk2uqSnK.js");
|
|
7
7
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-DRHWC1t-.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-CJrmfXvi.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-jBTi5CwO.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-CChDqRrl.mjs";
|
|
6
6
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
7
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { $ as createSourceScanPattern, Q as collectCssInlineSourceCandidates, X as DEFAULT_SOURCE_SCAN_EXTENSIONS, et as expandTailwindSourceEntries, it as resolveCssSourceEntries, nt as normalizeLegacyContentEntries, rt as parseConfigParam, t as resolveTailwindV3Source, ut as readInstalledPackageMajorVersion, y as resolveTailwindV4Source$1 } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-DRHWC1t-.mjs";
|
|
3
3
|
import postcss from "postcss";
|
|
4
4
|
import { extractRawCandidatesWithPositions, extractValidCandidates } from "tailwindcss-patch";
|
|
5
5
|
import process from "node:process";
|
|
@@ -83,7 +83,7 @@ async function collectConfigContentFiles(root, base, options) {
|
|
|
83
83
|
const contentEntries = normalizeLegacyContentEntries((await loadConfig({
|
|
84
84
|
config: configPath,
|
|
85
85
|
cwd: path.dirname(configPath)
|
|
86
|
-
}))?.config.content, path.dirname(configPath));
|
|
86
|
+
}))?.config.content, options.version === 3 ? options.projectRoot ?? base : path.dirname(configPath), { relativeBase: path.dirname(configPath) });
|
|
87
87
|
files.push(...await expandTailwindSourceEntries(contentEntries));
|
|
88
88
|
}
|
|
89
89
|
return {
|
|
@@ -98,7 +98,7 @@ async function collectConfiguredContentEntries(root, base, options) {
|
|
|
98
98
|
return normalizeLegacyContentEntries((await loadConfig({
|
|
99
99
|
config: resolvedConfigPath,
|
|
100
100
|
cwd: path.dirname(resolvedConfigPath)
|
|
101
|
-
}))?.config.content, path.dirname(resolvedConfigPath));
|
|
101
|
+
}))?.config.content, options.version === 3 ? options.projectRoot ?? base : path.dirname(resolvedConfigPath), { relativeBase: path.dirname(resolvedConfigPath) });
|
|
102
102
|
}
|
|
103
103
|
async function collectRawCandidatesFromSourceEntries(sourceEntries) {
|
|
104
104
|
const candidates = /* @__PURE__ */ new Set();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
|
+
const require_generator = require("./generator-Bd1LntD3.js");
|
|
4
4
|
let postcss = require("postcss");
|
|
5
5
|
postcss = require_chunk.__toESM(postcss);
|
|
6
6
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
@@ -87,7 +87,7 @@ async function collectConfigContentFiles(root, base, options) {
|
|
|
87
87
|
const contentEntries = require_v3_engine.normalizeLegacyContentEntries((await (0, tailwindcss_config.loadConfig)({
|
|
88
88
|
config: configPath,
|
|
89
89
|
cwd: node_path.default.dirname(configPath)
|
|
90
|
-
}))?.config.content, node_path.default.dirname(configPath));
|
|
90
|
+
}))?.config.content, options.version === 3 ? options.projectRoot ?? base : node_path.default.dirname(configPath), { relativeBase: node_path.default.dirname(configPath) });
|
|
91
91
|
files.push(...await require_v3_engine.expandTailwindSourceEntries(contentEntries));
|
|
92
92
|
}
|
|
93
93
|
return {
|
|
@@ -102,7 +102,7 @@ async function collectConfiguredContentEntries(root, base, options) {
|
|
|
102
102
|
return require_v3_engine.normalizeLegacyContentEntries((await (0, tailwindcss_config.loadConfig)({
|
|
103
103
|
config: resolvedConfigPath,
|
|
104
104
|
cwd: node_path.default.dirname(resolvedConfigPath)
|
|
105
|
-
}))?.config.content, node_path.default.dirname(resolvedConfigPath));
|
|
105
|
+
}))?.config.content, options.version === 3 ? options.projectRoot ?? base : node_path.default.dirname(resolvedConfigPath), { relativeBase: node_path.default.dirname(resolvedConfigPath) });
|
|
106
106
|
}
|
|
107
107
|
async function collectRawCandidatesFromSourceEntries(sourceEntries) {
|
|
108
108
|
const candidates = /* @__PURE__ */ new Set();
|
package/dist/postcss.js
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_postcss = require("./postcss-
|
|
5
|
+
const require_postcss = require("./postcss-DfnqZ4Bm.js");
|
|
6
6
|
exports.default = require_postcss.weappTailwindcssPostcssPlugin;
|
|
7
7
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
1
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-CJrmfXvi.mjs";
|
|
2
2
|
export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
3
|
const require_defaults = require("./defaults-zKUH2mDe.js");
|
|
4
4
|
require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-jvoYizzX.js");
|
|
6
6
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as createTailwindV4Engine$1, c as getRuntimeClassSetCacheEntry, ct as createDebug, d as invalidateRuntimeClassSet, ht as omitUndefined, mt as resolveBooleanObjectOption, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
2
|
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-8xrgzxFY.mjs";
|
|
3
3
|
import { i as isMap, n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-D5RogwtV.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
7
7
|
import process from "node:process";
|
package/dist/presets.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
4
4
|
const require_utils = require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-jvoYizzX.js");
|
|
6
6
|
require("./logger-TlKT3xmR.js");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
package/dist/presets.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ht as omitUndefined } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
2
|
import { n as defuOverrideArray, o as resolveUniUtsPlatform } from "./utils-DsaS975I.mjs";
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-D5RogwtV.mjs";
|
|
4
4
|
import { t as logger } from "./logger-BNzxZbZj.mjs";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as FULL_SOURCE_SCAN_EXTENSION_RE, at as resolveSourceScanPath, st as toPosixPath, tt as isFileMatchedByTailwindSourceEntries } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { extractSourceCandidates, resolveProjectSourceFiles } from "tailwindcss-patch";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -48,6 +49,23 @@ const TAILWIND_V4_IGNORED_FILES = [
|
|
|
48
49
|
".env.*"
|
|
49
50
|
];
|
|
50
51
|
const sourceCandidateContentCache = /* @__PURE__ */ new Map();
|
|
52
|
+
const require = createRequire(import.meta.url);
|
|
53
|
+
const TAILWIND_V3_HTML_TOKEN_CANDIDATES = new Set([
|
|
54
|
+
"/block",
|
|
55
|
+
"/div",
|
|
56
|
+
"/span",
|
|
57
|
+
"/template",
|
|
58
|
+
"/text",
|
|
59
|
+
"/view",
|
|
60
|
+
"class",
|
|
61
|
+
"className",
|
|
62
|
+
"div",
|
|
63
|
+
"hover-class",
|
|
64
|
+
"span",
|
|
65
|
+
"template",
|
|
66
|
+
"text",
|
|
67
|
+
"view"
|
|
68
|
+
]);
|
|
51
69
|
function cleanUrl(id) {
|
|
52
70
|
return resolveSourceScanPath(id.replace(CLEAN_URL_RE, ""));
|
|
53
71
|
}
|
|
@@ -105,8 +123,23 @@ function resolveSourceCandidateExtension(id) {
|
|
|
105
123
|
const normalized = cleanUrl(id);
|
|
106
124
|
return /\.([^.\\/]+)$/.exec(normalized)?.[1] ?? "html";
|
|
107
125
|
}
|
|
108
|
-
function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues) {
|
|
109
|
-
return `${extension}\0${JSON.stringify(bareArbitraryValues ?? false)}\0${source}`;
|
|
126
|
+
function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues, extractor) {
|
|
127
|
+
return `${extension}\0${JSON.stringify(bareArbitraryValues ?? false)}\0${extractor ? "custom" : "default"}\0${source}`;
|
|
128
|
+
}
|
|
129
|
+
async function extractCandidates(source, extension, options) {
|
|
130
|
+
if (options.extractor) return new Set(await options.extractor(source, extension));
|
|
131
|
+
return new Set(await extractSourceCandidates(source, extension, { ...options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: options.bareArbitraryValues } }));
|
|
132
|
+
}
|
|
133
|
+
function createTailwindV3DefaultExtractor() {
|
|
134
|
+
try {
|
|
135
|
+
const defaultExtractorModule = require("tailwindcss/lib/lib/defaultExtractor");
|
|
136
|
+
const resolveConfigModule = require("tailwindcss/resolveConfig");
|
|
137
|
+
const resolveConfig = resolveConfigModule.default ?? resolveConfigModule;
|
|
138
|
+
const extractor = (defaultExtractorModule.defaultExtractor ?? defaultExtractorModule.default ?? defaultExtractorModule)({ tailwindConfig: resolveConfig({ content: [] }) });
|
|
139
|
+
return (source) => new Set(extractor(source).filter((candidate) => !TAILWIND_V3_HTML_TOKEN_CANDIDATES.has(candidate)));
|
|
140
|
+
} catch {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
110
143
|
}
|
|
111
144
|
function isSourceCandidateRequest(id) {
|
|
112
145
|
return FULL_SOURCE_SCAN_EXTENSION_RE.test(cleanUrl(id));
|
|
@@ -136,34 +169,34 @@ function createSourceCandidateCollector(options = {}) {
|
|
|
136
169
|
async function sync(id, source) {
|
|
137
170
|
const normalizedId = cleanUrl(id);
|
|
138
171
|
const extension = resolveSourceCandidateExtension(normalizedId);
|
|
139
|
-
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues);
|
|
172
|
+
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
|
|
140
173
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
141
174
|
if (cachedCandidates) {
|
|
142
175
|
replaceScanLayer(normalizedId, new Set(cachedCandidates));
|
|
143
176
|
return;
|
|
144
177
|
}
|
|
145
|
-
const nextCandidates =
|
|
178
|
+
const nextCandidates = await extractCandidates(source, extension, options);
|
|
146
179
|
sourceCandidateContentCache.set(contentCacheKey, [...nextCandidates]);
|
|
147
180
|
replaceScanLayer(normalizedId, nextCandidates);
|
|
148
181
|
}
|
|
149
182
|
async function syncCss(id, source) {
|
|
150
183
|
const normalizedId = cleanUrl(id);
|
|
151
|
-
const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues);
|
|
184
|
+
const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues, options.extractor);
|
|
152
185
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
153
186
|
if (cachedCandidates) {
|
|
154
187
|
replaceCssLayer(normalizedId, new Set(cachedCandidates));
|
|
155
188
|
return;
|
|
156
189
|
}
|
|
157
|
-
const nextCandidates =
|
|
190
|
+
const nextCandidates = await extractCandidates(source, "css", options);
|
|
158
191
|
sourceCandidateContentCache.set(contentCacheKey, [...nextCandidates]);
|
|
159
192
|
replaceCssLayer(normalizedId, nextCandidates);
|
|
160
193
|
}
|
|
161
194
|
async function merge(id, source) {
|
|
162
195
|
const normalizedId = cleanUrl(id);
|
|
163
196
|
const extension = resolveSourceCandidateExtension(normalizedId);
|
|
164
|
-
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues);
|
|
197
|
+
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
|
|
165
198
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
166
|
-
const extractedCandidates = cachedCandidates ? new Set(cachedCandidates) :
|
|
199
|
+
const extractedCandidates = cachedCandidates ? new Set(cachedCandidates) : await extractCandidates(source, extension, options);
|
|
167
200
|
if (!cachedCandidates) sourceCandidateContentCache.set(contentCacheKey, [...extractedCandidates]);
|
|
168
201
|
replaceTransformLayer(normalizedId, extractedCandidates);
|
|
169
202
|
}
|
|
@@ -187,7 +220,7 @@ function createSourceCandidateCollector(options = {}) {
|
|
|
187
220
|
...ignoredSources.length > 0 ? { ignoredSources } : {},
|
|
188
221
|
filter: isSourceCandidateRequest
|
|
189
222
|
});
|
|
190
|
-
await Promise.all(files.map((file) => syncFile(file)));
|
|
223
|
+
await Promise.all(files.map((file) => syncFile(resolveSourceScanPath(file))));
|
|
191
224
|
}
|
|
192
225
|
function replaceFinal(id, nextCandidates) {
|
|
193
226
|
const normalizedId = cleanUrl(id);
|
|
@@ -319,4 +352,4 @@ function createSourceCandidateCollector(options = {}) {
|
|
|
319
352
|
};
|
|
320
353
|
}
|
|
321
354
|
//#endregion
|
|
322
|
-
export {
|
|
355
|
+
export { createTailwindV3DefaultExtractor as n, isSourceCandidateRequest as r, createSourceCandidateCollector as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
|
+
let node_module = require("node:module");
|
|
3
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
4
5
|
let node_path = require("node:path");
|
|
5
6
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -50,6 +51,23 @@ const TAILWIND_V4_IGNORED_FILES = [
|
|
|
50
51
|
".env.*"
|
|
51
52
|
];
|
|
52
53
|
const sourceCandidateContentCache = /* @__PURE__ */ new Map();
|
|
54
|
+
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
55
|
+
const TAILWIND_V3_HTML_TOKEN_CANDIDATES = new Set([
|
|
56
|
+
"/block",
|
|
57
|
+
"/div",
|
|
58
|
+
"/span",
|
|
59
|
+
"/template",
|
|
60
|
+
"/text",
|
|
61
|
+
"/view",
|
|
62
|
+
"class",
|
|
63
|
+
"className",
|
|
64
|
+
"div",
|
|
65
|
+
"hover-class",
|
|
66
|
+
"span",
|
|
67
|
+
"template",
|
|
68
|
+
"text",
|
|
69
|
+
"view"
|
|
70
|
+
]);
|
|
53
71
|
function cleanUrl(id) {
|
|
54
72
|
return require_v3_engine.resolveSourceScanPath(id.replace(CLEAN_URL_RE, ""));
|
|
55
73
|
}
|
|
@@ -107,8 +125,23 @@ function resolveSourceCandidateExtension(id) {
|
|
|
107
125
|
const normalized = cleanUrl(id);
|
|
108
126
|
return /\.([^.\\/]+)$/.exec(normalized)?.[1] ?? "html";
|
|
109
127
|
}
|
|
110
|
-
function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues) {
|
|
111
|
-
return `${extension}\0${JSON.stringify(bareArbitraryValues ?? false)}\0${source}`;
|
|
128
|
+
function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues, extractor) {
|
|
129
|
+
return `${extension}\0${JSON.stringify(bareArbitraryValues ?? false)}\0${extractor ? "custom" : "default"}\0${source}`;
|
|
130
|
+
}
|
|
131
|
+
async function extractCandidates(source, extension, options) {
|
|
132
|
+
if (options.extractor) return new Set(await options.extractor(source, extension));
|
|
133
|
+
return new Set(await (0, tailwindcss_patch.extractSourceCandidates)(source, extension, { ...options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: options.bareArbitraryValues } }));
|
|
134
|
+
}
|
|
135
|
+
function createTailwindV3DefaultExtractor() {
|
|
136
|
+
try {
|
|
137
|
+
const defaultExtractorModule = require$1("tailwindcss/lib/lib/defaultExtractor");
|
|
138
|
+
const resolveConfigModule = require$1("tailwindcss/resolveConfig");
|
|
139
|
+
const resolveConfig = resolveConfigModule.default ?? resolveConfigModule;
|
|
140
|
+
const extractor = (defaultExtractorModule.defaultExtractor ?? defaultExtractorModule.default ?? defaultExtractorModule)({ tailwindConfig: resolveConfig({ content: [] }) });
|
|
141
|
+
return (source) => new Set(extractor(source).filter((candidate) => !TAILWIND_V3_HTML_TOKEN_CANDIDATES.has(candidate)));
|
|
142
|
+
} catch {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
112
145
|
}
|
|
113
146
|
function isSourceCandidateRequest(id) {
|
|
114
147
|
return require_v3_engine.FULL_SOURCE_SCAN_EXTENSION_RE.test(cleanUrl(id));
|
|
@@ -138,34 +171,34 @@ function createSourceCandidateCollector(options = {}) {
|
|
|
138
171
|
async function sync(id, source) {
|
|
139
172
|
const normalizedId = cleanUrl(id);
|
|
140
173
|
const extension = resolveSourceCandidateExtension(normalizedId);
|
|
141
|
-
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues);
|
|
174
|
+
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
|
|
142
175
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
143
176
|
if (cachedCandidates) {
|
|
144
177
|
replaceScanLayer(normalizedId, new Set(cachedCandidates));
|
|
145
178
|
return;
|
|
146
179
|
}
|
|
147
|
-
const nextCandidates =
|
|
180
|
+
const nextCandidates = await extractCandidates(source, extension, options);
|
|
148
181
|
sourceCandidateContentCache.set(contentCacheKey, [...nextCandidates]);
|
|
149
182
|
replaceScanLayer(normalizedId, nextCandidates);
|
|
150
183
|
}
|
|
151
184
|
async function syncCss(id, source) {
|
|
152
185
|
const normalizedId = cleanUrl(id);
|
|
153
|
-
const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues);
|
|
186
|
+
const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues, options.extractor);
|
|
154
187
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
155
188
|
if (cachedCandidates) {
|
|
156
189
|
replaceCssLayer(normalizedId, new Set(cachedCandidates));
|
|
157
190
|
return;
|
|
158
191
|
}
|
|
159
|
-
const nextCandidates =
|
|
192
|
+
const nextCandidates = await extractCandidates(source, "css", options);
|
|
160
193
|
sourceCandidateContentCache.set(contentCacheKey, [...nextCandidates]);
|
|
161
194
|
replaceCssLayer(normalizedId, nextCandidates);
|
|
162
195
|
}
|
|
163
196
|
async function merge(id, source) {
|
|
164
197
|
const normalizedId = cleanUrl(id);
|
|
165
198
|
const extension = resolveSourceCandidateExtension(normalizedId);
|
|
166
|
-
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues);
|
|
199
|
+
const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
|
|
167
200
|
const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
|
|
168
|
-
const extractedCandidates = cachedCandidates ? new Set(cachedCandidates) :
|
|
201
|
+
const extractedCandidates = cachedCandidates ? new Set(cachedCandidates) : await extractCandidates(source, extension, options);
|
|
169
202
|
if (!cachedCandidates) sourceCandidateContentCache.set(contentCacheKey, [...extractedCandidates]);
|
|
170
203
|
replaceTransformLayer(normalizedId, extractedCandidates);
|
|
171
204
|
}
|
|
@@ -189,7 +222,7 @@ function createSourceCandidateCollector(options = {}) {
|
|
|
189
222
|
...ignoredSources.length > 0 ? { ignoredSources } : {},
|
|
190
223
|
filter: isSourceCandidateRequest
|
|
191
224
|
});
|
|
192
|
-
await Promise.all(files.map((file) => syncFile(file)));
|
|
225
|
+
await Promise.all(files.map((file) => syncFile(require_v3_engine.resolveSourceScanPath(file))));
|
|
193
226
|
}
|
|
194
227
|
function replaceFinal(id, nextCandidates) {
|
|
195
228
|
const normalizedId = cleanUrl(id);
|
|
@@ -327,6 +360,12 @@ Object.defineProperty(exports, "createSourceCandidateCollector", {
|
|
|
327
360
|
return createSourceCandidateCollector;
|
|
328
361
|
}
|
|
329
362
|
});
|
|
363
|
+
Object.defineProperty(exports, "createTailwindV3DefaultExtractor", {
|
|
364
|
+
enumerable: true,
|
|
365
|
+
get: function() {
|
|
366
|
+
return createTailwindV3DefaultExtractor;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
330
369
|
Object.defineProperty(exports, "isSourceCandidateRequest", {
|
|
331
370
|
enumerable: true,
|
|
332
371
|
get: function() {
|
|
@@ -23,7 +23,9 @@ export declare function resolveTailwindV4CssSourceBase(source: Pick<TailwindV4Cs
|
|
|
23
23
|
export declare function parseConfigParam(params: string): string | undefined;
|
|
24
24
|
export declare function expandInlineSourceCandidatePattern(pattern: string): string[];
|
|
25
25
|
export declare function collectCssInlineSourceCandidates(root: Root): TailwindInlineSourceCandidates;
|
|
26
|
-
export declare function normalizeLegacyContentEntries(content: unknown, base: string
|
|
26
|
+
export declare function normalizeLegacyContentEntries(content: unknown, base: string, options?: {
|
|
27
|
+
relativeBase?: string | undefined;
|
|
28
|
+
}): TailwindSourceEntry[];
|
|
27
29
|
export declare function resolveTailwindSourceEntry(sourcePath: string, base: string, negated: boolean, defaultPattern?: string): Promise<TailwindSourceEntry>;
|
|
28
30
|
export declare function parseSourceFileParam(params: string): {
|
|
29
31
|
negated: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _t as findWorkspacePackageDir, f as runtimeSignaturePatchersSymbol, gt as findNearestPackageRoot, ht as omitUndefined, lt as createTailwindcssPatcher, pt as normalizeStringListOption, ut as readInstalledPackageMajorVersion, vt as findWorkspaceRoot } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
2
|
import { n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -265,27 +265,16 @@ function groupCssEntriesByBase(entries, options = {}) {
|
|
|
265
265
|
}
|
|
266
266
|
//#endregion
|
|
267
267
|
//#region src/tailwindcss/v4/patcher.ts
|
|
268
|
-
const CONFIGURED_TAILWIND_VERSION_RE = /Configured tailwindcss\.version=\d+/u;
|
|
269
|
-
const RESOLVED_TAILWIND_VERSION_RE = /resolved package ".+" is version /u;
|
|
270
268
|
function isTailwindcss4Package(packageName) {
|
|
271
269
|
return Boolean(packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4")));
|
|
272
270
|
}
|
|
273
271
|
function resolveExplicitTailwindVersion(configuredVersion, configuredPackageName) {
|
|
274
272
|
if (typeof configuredVersion === "number") return configuredVersion;
|
|
275
|
-
if (configuredPackageName === "tailwindcss") return 3;
|
|
276
273
|
if (isTailwindcss4Package(configuredPackageName)) return 4;
|
|
277
274
|
}
|
|
278
|
-
function hasOwnV4Signal(value) {
|
|
279
|
-
return typeof value === "object" && value !== null && "v4" in value;
|
|
280
|
-
}
|
|
281
|
-
function isTailwindVersionMismatchError(error) {
|
|
282
|
-
return error instanceof Error && CONFIGURED_TAILWIND_VERSION_RE.test(error.message) && RESOLVED_TAILWIND_VERSION_RE.test(error.message);
|
|
283
|
-
}
|
|
284
275
|
function createPatcherForBase(baseDir, cssEntries, options) {
|
|
285
276
|
const { tailwindcss, tailwindcssPatcherOptions, supportCustomLengthUnitsPatch, bareArbitraryValues } = options;
|
|
286
277
|
const hasCssEntries = Boolean(cssEntries?.length);
|
|
287
|
-
const configuredV4Options = tailwindcss?.v4 ?? tailwindcssPatcherOptions?.tailwindcss?.v4;
|
|
288
|
-
const hasCssSources = Boolean(configuredV4Options?.cssSources?.length);
|
|
289
278
|
const defaultTailwindcssConfig = {
|
|
290
279
|
cwd: baseDir,
|
|
291
280
|
v2: { cwd: baseDir },
|
|
@@ -311,43 +300,19 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
311
300
|
const patchedOptions = overrideTailwindcssPatcherOptionsForBase(tailwindcssPatcherOptions, baseDir, cssEntries ?? []);
|
|
312
301
|
const configuredPackageName = tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwindcss?.packageName;
|
|
313
302
|
const explicitTailwindVersion = resolveExplicitTailwindVersion(tailwindcss?.version || tailwindcssPatcherOptions?.tailwindcss?.version || mergedTailwindOptions.version, configuredPackageName);
|
|
314
|
-
const
|
|
315
|
-
const packageNameForVersionDetection = configuredPackageName ?? mergedTailwindOptions.packageName ?? "tailwindcss";
|
|
316
|
-
const installedTailwindVersion = readInstalledPackageMajorVersion(packageNameForVersionDetection, baseDir);
|
|
317
|
-
const resolvedTailwindVersion = installedTailwindVersion ?? explicitTailwindVersion;
|
|
303
|
+
const resolvedTailwindVersion = readInstalledPackageMajorVersion(configuredPackageName ?? mergedTailwindOptions.packageName ?? "tailwindcss", baseDir) ?? explicitTailwindVersion;
|
|
318
304
|
const supportedResolvedTailwindVersion = resolvedTailwindVersion === 2 || resolvedTailwindVersion === 3 || resolvedTailwindVersion === 4 ? resolvedTailwindVersion : void 0;
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
};
|
|
331
|
-
if (supportedResolvedTailwindVersion) tailwindOptionsForPackage.version = supportedResolvedTailwindVersion;
|
|
332
|
-
try {
|
|
333
|
-
patchers.push(createTailwindcssPatcher(omitUndefined({
|
|
334
|
-
basedir: baseDir,
|
|
335
|
-
supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
|
|
336
|
-
tailwindcss: tailwindOptionsForPackage,
|
|
337
|
-
tailwindcssPatcherOptions: patchedOptions
|
|
338
|
-
})));
|
|
339
|
-
} catch (error) {
|
|
340
|
-
if (packageCandidateList.length > 1 && isTailwindVersionMismatchError(error)) {
|
|
341
|
-
firstVersionMismatchError ?? (firstVersionMismatchError = error);
|
|
342
|
-
logger.warn("skip incompatible Tailwind package candidate \"%s\" for v4 patcher: %s", packageName, error.message);
|
|
343
|
-
continue;
|
|
344
|
-
}
|
|
345
|
-
throw error;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
if (patchers.length === 0 && firstVersionMismatchError) throw firstVersionMismatchError;
|
|
349
|
-
const [singlePatcher] = patchers;
|
|
350
|
-
return patchers.length === 1 && singlePatcher ? singlePatcher : createMultiTailwindcssPatcher(patchers);
|
|
305
|
+
const tailwindOptionsForPackage = {
|
|
306
|
+
...mergedTailwindOptions,
|
|
307
|
+
packageName: mergedTailwindOptions.packageName ?? configuredPackageName ?? "tailwindcss"
|
|
308
|
+
};
|
|
309
|
+
if (supportedResolvedTailwindVersion) tailwindOptionsForPackage.version = supportedResolvedTailwindVersion;
|
|
310
|
+
return createTailwindcssPatcher(omitUndefined({
|
|
311
|
+
basedir: baseDir,
|
|
312
|
+
supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
|
|
313
|
+
tailwindcss: tailwindOptionsForPackage,
|
|
314
|
+
tailwindcssPatcherOptions: patchedOptions
|
|
315
|
+
}));
|
|
351
316
|
}
|
|
352
317
|
function tryCreateMultiTailwindcssPatcher(groups, options) {
|
|
353
318
|
if (groups.size <= 1) return;
|
|
@@ -588,4 +553,4 @@ function createTailwindcssPatcherFromContext(ctx) {
|
|
|
588
553
|
return createPatcherForBase(resolvedTailwindcssBasedir, normalizedCssEntries ?? rawCssEntries, patcherOptions);
|
|
589
554
|
}
|
|
590
555
|
//#endregion
|
|
591
|
-
export {
|
|
556
|
+
export { normalizeCssEntries as a, hasConfiguredTailwindV4CssRoots as c, resolveUniAppXOptions as i, upsertTailwindV4CssSource as l, resolveTailwindcssBasedir as n, applyV4CssCalcDefaults as o, isUniAppXEnabled as r, warnMissingCssEntries as s, createTailwindcssPatcherFromContext as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
3
|
require("./utils-D7Ygohep.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_module = require("node:module");
|
|
@@ -269,27 +269,16 @@ function groupCssEntriesByBase(entries, options = {}) {
|
|
|
269
269
|
}
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/tailwindcss/v4/patcher.ts
|
|
272
|
-
const CONFIGURED_TAILWIND_VERSION_RE = /Configured tailwindcss\.version=\d+/u;
|
|
273
|
-
const RESOLVED_TAILWIND_VERSION_RE = /resolved package ".+" is version /u;
|
|
274
272
|
function isTailwindcss4Package(packageName) {
|
|
275
273
|
return Boolean(packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4")));
|
|
276
274
|
}
|
|
277
275
|
function resolveExplicitTailwindVersion(configuredVersion, configuredPackageName) {
|
|
278
276
|
if (typeof configuredVersion === "number") return configuredVersion;
|
|
279
|
-
if (configuredPackageName === "tailwindcss") return 3;
|
|
280
277
|
if (isTailwindcss4Package(configuredPackageName)) return 4;
|
|
281
278
|
}
|
|
282
|
-
function hasOwnV4Signal(value) {
|
|
283
|
-
return typeof value === "object" && value !== null && "v4" in value;
|
|
284
|
-
}
|
|
285
|
-
function isTailwindVersionMismatchError(error) {
|
|
286
|
-
return error instanceof Error && CONFIGURED_TAILWIND_VERSION_RE.test(error.message) && RESOLVED_TAILWIND_VERSION_RE.test(error.message);
|
|
287
|
-
}
|
|
288
279
|
function createPatcherForBase(baseDir, cssEntries, options) {
|
|
289
280
|
const { tailwindcss, tailwindcssPatcherOptions, supportCustomLengthUnitsPatch, bareArbitraryValues } = options;
|
|
290
281
|
const hasCssEntries = Boolean(cssEntries?.length);
|
|
291
|
-
const configuredV4Options = tailwindcss?.v4 ?? tailwindcssPatcherOptions?.tailwindcss?.v4;
|
|
292
|
-
const hasCssSources = Boolean(configuredV4Options?.cssSources?.length);
|
|
293
282
|
const defaultTailwindcssConfig = {
|
|
294
283
|
cwd: baseDir,
|
|
295
284
|
v2: { cwd: baseDir },
|
|
@@ -315,43 +304,19 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
315
304
|
const patchedOptions = overrideTailwindcssPatcherOptionsForBase(tailwindcssPatcherOptions, baseDir, cssEntries ?? []);
|
|
316
305
|
const configuredPackageName = tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwindcss?.packageName;
|
|
317
306
|
const explicitTailwindVersion = resolveExplicitTailwindVersion(tailwindcss?.version || tailwindcssPatcherOptions?.tailwindcss?.version || mergedTailwindOptions.version, configuredPackageName);
|
|
318
|
-
const
|
|
319
|
-
const packageNameForVersionDetection = configuredPackageName ?? mergedTailwindOptions.packageName ?? "tailwindcss";
|
|
320
|
-
const installedTailwindVersion = require_v3_engine.readInstalledPackageMajorVersion(packageNameForVersionDetection, baseDir);
|
|
321
|
-
const resolvedTailwindVersion = installedTailwindVersion ?? explicitTailwindVersion;
|
|
307
|
+
const resolvedTailwindVersion = require_v3_engine.readInstalledPackageMajorVersion(configuredPackageName ?? mergedTailwindOptions.packageName ?? "tailwindcss", baseDir) ?? explicitTailwindVersion;
|
|
322
308
|
const supportedResolvedTailwindVersion = resolvedTailwindVersion === 2 || resolvedTailwindVersion === 3 || resolvedTailwindVersion === 4 ? resolvedTailwindVersion : void 0;
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
};
|
|
335
|
-
if (supportedResolvedTailwindVersion) tailwindOptionsForPackage.version = supportedResolvedTailwindVersion;
|
|
336
|
-
try {
|
|
337
|
-
patchers.push(require_v3_engine.createTailwindcssPatcher(require_v3_engine.omitUndefined({
|
|
338
|
-
basedir: baseDir,
|
|
339
|
-
supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
|
|
340
|
-
tailwindcss: tailwindOptionsForPackage,
|
|
341
|
-
tailwindcssPatcherOptions: patchedOptions
|
|
342
|
-
})));
|
|
343
|
-
} catch (error) {
|
|
344
|
-
if (packageCandidateList.length > 1 && isTailwindVersionMismatchError(error)) {
|
|
345
|
-
firstVersionMismatchError ?? (firstVersionMismatchError = error);
|
|
346
|
-
_weapp_tailwindcss_logger.logger.warn("skip incompatible Tailwind package candidate \"%s\" for v4 patcher: %s", packageName, error.message);
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
throw error;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (patchers.length === 0 && firstVersionMismatchError) throw firstVersionMismatchError;
|
|
353
|
-
const [singlePatcher] = patchers;
|
|
354
|
-
return patchers.length === 1 && singlePatcher ? singlePatcher : createMultiTailwindcssPatcher(patchers);
|
|
309
|
+
const tailwindOptionsForPackage = {
|
|
310
|
+
...mergedTailwindOptions,
|
|
311
|
+
packageName: mergedTailwindOptions.packageName ?? configuredPackageName ?? "tailwindcss"
|
|
312
|
+
};
|
|
313
|
+
if (supportedResolvedTailwindVersion) tailwindOptionsForPackage.version = supportedResolvedTailwindVersion;
|
|
314
|
+
return require_v3_engine.createTailwindcssPatcher(require_v3_engine.omitUndefined({
|
|
315
|
+
basedir: baseDir,
|
|
316
|
+
supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
|
|
317
|
+
tailwindcss: tailwindOptionsForPackage,
|
|
318
|
+
tailwindcssPatcherOptions: patchedOptions
|
|
319
|
+
}));
|
|
355
320
|
}
|
|
356
321
|
function tryCreateMultiTailwindcssPatcher(groups, options) {
|
|
357
322
|
if (groups.size <= 1) return;
|
|
@@ -616,6 +581,12 @@ Object.defineProperty(exports, "isUniAppXEnabled", {
|
|
|
616
581
|
return isUniAppXEnabled;
|
|
617
582
|
}
|
|
618
583
|
});
|
|
584
|
+
Object.defineProperty(exports, "normalizeCssEntries", {
|
|
585
|
+
enumerable: true,
|
|
586
|
+
get: function() {
|
|
587
|
+
return normalizeCssEntries;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
619
590
|
Object.defineProperty(exports, "resolveTailwindcssBasedir", {
|
|
620
591
|
enumerable: true,
|
|
621
592
|
get: function() {
|