weapp-tailwindcss 5.2.10 → 5.2.12
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/bundlers/shared/generator-css/user-css/source-fragments.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -1
- package/dist/cli.cjs +372 -293
- package/dist/cli.js +20 -11
- package/dist/{context-DbL0d-zB.js → context-DW4ukjx4.js} +19 -8
- package/dist/{context-C3TryIjF.cjs → context-zWINV_E2.cjs} +17 -11
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-imports-DfNC3e6a.cjs → css-imports-BFMU7Hpd.cjs} +1 -1
- package/dist/css-macro/postcss.cjs +1 -1
- package/dist/css-macro.cjs +1 -1
- package/dist/defaults.cjs +2 -0
- package/dist/defaults.js +2 -0
- package/dist/framework.cjs +1 -1
- package/dist/{generator-BLpOsd5O.js → generator-C2UFjlZ1.js} +36 -11
- package/dist/{generator-B0dCFlP1.cjs → generator-CwMI20jy.cjs} +37 -12
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-G6af_vyo.cjs → gulp-CWFxs2lE.cjs} +16 -13
- package/dist/{gulp-CB_GZky7.js → gulp-CltYkglj.js} +12 -9
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-gbPzjYTj.cjs → hmr-timing-BjOxhci8.cjs} +5 -5
- package/dist/{hmr-timing-CZu2ITV8.js → hmr-timing-D6JKLBCD.js} +35 -20
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{object-Bvy6-w9r.js → object-B-8IHefx.js} +4 -4
- package/dist/{object-C_Vr6_S5.cjs → object-DbHtAXRk.cjs} +4 -4
- package/dist/{options-zpZez7qe.cjs → options-CSqLm6U2.cjs} +2 -2
- package/dist/{pipeline-helpers-CtIXw85G.cjs → pipeline-helpers-Cj9ZzHaY.cjs} +25 -10
- package/dist/postcss-html-transform.cjs +1 -1
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +6 -5
- package/dist/presets.js +4 -3
- package/dist/reset.cjs +1 -1
- package/dist/{rolldown-runtime-CVvi-lCc.cjs → rolldown-runtime-Ctb5zv51.cjs} +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +1 -1
- package/dist/{source-candidate-scan-signature-DFZlYd3t.js → source-candidate-scan-signature-DQZ_DkgW.js} +5 -4
- package/dist/{source-candidate-scan-signature-CTX7eBJX.cjs → source-candidate-scan-signature-uRHl5Ne9.cjs} +6 -5
- package/dist/{style-options-COpQc8fr.cjs → style-options-D0NukP02.cjs} +9 -4
- package/dist/{tailwindcss-LtnGCxF0.cjs → tailwindcss-B3lqgbln.cjs} +17 -13
- package/dist/{tailwindcss-2zdmASlM.js → tailwindcss-vbApajUH.js} +13 -10
- package/dist/{transform-BlsDWgjt.js → transform-52FLRu-0.js} +2 -2
- package/dist/{transform-9wbmvHcC.cjs → transform-BiHG42Rp.cjs} +2 -2
- package/dist/types/user-defined-options/general.d.ts +2 -0
- package/dist/{v4-generation-core-BVd_4348.cjs → v4-generation-core-2AuNMweK.cjs} +36 -21
- package/dist/{vite-DjU_5LY6.cjs → vite-BLB7vjKQ.cjs} +99 -46
- package/dist/{vite-cIvaBul_.js → vite-q3ilYV7x.js} +94 -41
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-BZGubvuJ.cjs → watch-dependencies-DLZDrWdH.cjs} +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +10 -9
- package/dist/weapp-tw-runtime-classset-loader.cjs +4 -3
- package/dist/{webpack-CvKV7U7L.js → webpack-DExB8tzB.js} +36 -18
- package/dist/{webpack-B9lRT1no.cjs → webpack-Jn4FJT6y.cjs} +40 -31
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/{wxml-CWJc0yY-.js → wxml-B7OAVpXJ.js} +10 -6
- package/dist/{wxml-DUIdXCVa.cjs → wxml-CQmBCjOR.cjs} +386 -311
- package/package.json +6 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_object = require("./object-
|
|
4
|
-
const require_options = require("./options-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
+
const require_generator = require("./generator-CwMI20jy.cjs");
|
|
3
|
+
const require_object = require("./object-DbHtAXRk.cjs");
|
|
4
|
+
const require_options = require("./options-CSqLm6U2.cjs");
|
|
5
5
|
const require_utils = require("./utils-CuKLf1Zv.cjs");
|
|
6
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
7
|
-
const require_wxml = require("./wxml-
|
|
8
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
9
|
-
const require_context = require("./context-
|
|
10
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
11
|
-
const require_style_options = require("./style-options-
|
|
12
|
-
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-
|
|
13
|
-
const require_pipeline_helpers = require("./pipeline-helpers-
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-2AuNMweK.cjs");
|
|
7
|
+
const require_wxml = require("./wxml-CQmBCjOR.cjs");
|
|
8
|
+
const require_hmr_timing = require("./hmr-timing-BjOxhci8.cjs");
|
|
9
|
+
const require_context = require("./context-zWINV_E2.cjs");
|
|
10
|
+
const require_tailwindcss = require("./tailwindcss-B3lqgbln.cjs");
|
|
11
|
+
const require_style_options = require("./style-options-D0NukP02.cjs");
|
|
12
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-uRHl5Ne9.cjs");
|
|
13
|
+
const require_pipeline_helpers = require("./pipeline-helpers-Cj9ZzHaY.cjs");
|
|
14
14
|
const require_css_loader_runtime = require("./css-loader-runtime-CSv0lKqV.cjs");
|
|
15
15
|
const require_runtime_registry = require("./runtime-registry-Y7NrD2WH.cjs");
|
|
16
16
|
let node_fs = require("node:fs");
|
|
@@ -710,18 +710,19 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
710
710
|
const shouldPreserveGeneratedWebAssetUserCss = isWebGeneratorTarget && currentAssetLooksGenerated && !currentAssetHasBundlerGeneratedMarker && !currentAssetHasAdditionalUserCss;
|
|
711
711
|
const hasExplicitSourceCssForCurrentAsset = sourceCss !== void 0 && (require_generator.hasTailwindRootDirectives(sourceCss, { importFallback: true }) || require_generator.hasTailwindSourceDirectives(sourceCss, { importFallback: true }) || require_generator.hasTailwindApplyDirective(sourceCss));
|
|
712
712
|
const currentAssetHasUserCss = (sourceCssProcessed || hasExplicitSourceCssForCurrentAsset) && currentAssetLooksGenerated && !shouldPreserveGeneratedWebAssetUserCss ? currentAssetHasAdditionalUserCss : require_pipeline_helpers.shouldUseWebpackAssetAsGeneratorUserCss(currentAssetUserCssSource, generatorRawSource, { processed: sourceCssProcessed || shouldPreserveGeneratedWebAssetUserCss });
|
|
713
|
+
const shouldAppendCurrentAssetUserCss = shouldAppendCurrentWebpackAssetUserCss({
|
|
714
|
+
currentAssetHasBundlerGeneratedMarker,
|
|
715
|
+
currentAssetHasUserCss,
|
|
716
|
+
currentAssetLooksGenerated,
|
|
717
|
+
registeredUserRawSource,
|
|
718
|
+
shouldPreserveGeneratedWebAssetUserCss,
|
|
719
|
+
sourceCssProcessed
|
|
720
|
+
});
|
|
713
721
|
const userRawSource = require_pipeline_helpers.createWebpackGeneratorUserCssSourceAppend(createWebpackCurrentAssetUserRawSource({
|
|
714
722
|
currentAssetHasUserCss,
|
|
715
723
|
currentAssetLooksGenerated,
|
|
716
724
|
currentAssetUserCssSource,
|
|
717
|
-
shouldAppendCurrentAssetUserCss
|
|
718
|
-
currentAssetHasBundlerGeneratedMarker,
|
|
719
|
-
currentAssetHasUserCss,
|
|
720
|
-
currentAssetLooksGenerated,
|
|
721
|
-
registeredUserRawSource,
|
|
722
|
-
shouldPreserveGeneratedWebAssetUserCss,
|
|
723
|
-
sourceCssProcessed
|
|
724
|
-
}),
|
|
725
|
+
shouldAppendCurrentAssetUserCss,
|
|
725
726
|
sourceCssProcessed
|
|
726
727
|
}), registeredUserRawSource);
|
|
727
728
|
if ((0, _weapp_tailwindcss_postcss.isPureLocalCssImportWrapper)(currentRawSource)) return { result: new ConcatSource(require_generator.removeTailwindSourceDirectives(require_v4_generation_core.stripBundlerGeneratedCssMarkers(currentRawSource), { importFallback: true })) };
|
|
@@ -1325,12 +1326,13 @@ function createWebpackSourceCandidateScanCache() {
|
|
|
1325
1326
|
async function resolve({ changedFiles, collector, outDir, root, sourceScan, watchMode }) {
|
|
1326
1327
|
const explicit = sourceScan?.explicit ?? false;
|
|
1327
1328
|
const roots = collectWebpackSourceCandidateScanRoots(root, sourceScan?.entries, explicit);
|
|
1328
|
-
const
|
|
1329
|
+
const nextSignature = require_source_candidate_scan_signature.createSourceCandidateScanSignature({
|
|
1329
1330
|
inlineCandidates: sourceScan?.inlineCandidates,
|
|
1330
1331
|
outDir,
|
|
1331
1332
|
roots,
|
|
1332
1333
|
scanAllSources: !explicit
|
|
1333
|
-
})
|
|
1334
|
+
});
|
|
1335
|
+
const nextSignatureHash = (0, _weapp_tailwindcss_shared_node.md5)(nextSignature);
|
|
1334
1336
|
const scanFiles = await resolveScanFiles(roots, outDir);
|
|
1335
1337
|
const cachedScan = watchMode ? scans.get(nextSignatureHash) : void 0;
|
|
1336
1338
|
if (cachedScan) {
|
|
@@ -1742,7 +1744,11 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1742
1744
|
onUpdate: compilerOptions.onUpdate,
|
|
1743
1745
|
debug
|
|
1744
1746
|
});
|
|
1745
|
-
for (const [file, asset] of groupedEntries.css)
|
|
1747
|
+
for (const [file, asset] of groupedEntries.css) {
|
|
1748
|
+
const rawSource = compilation.getAsset(file)?.source.source() ?? asset.source();
|
|
1749
|
+
const source = require_pipeline_helpers.stringifyWebpackSourceLike(rawSource);
|
|
1750
|
+
updateAssetIfChanged(file, require_pipeline_helpers.finalizeWebpackCssAssetOutputSource(source, compilerOptions, isWebGeneratorTarget));
|
|
1751
|
+
}
|
|
1746
1752
|
});
|
|
1747
1753
|
});
|
|
1748
1754
|
}
|
|
@@ -2165,13 +2171,14 @@ function setupWebpackV5Loaders(options) {
|
|
|
2165
2171
|
...markWebpackProcessedCssSource === void 0 ? {} : { markGeneratedCssSource: markWebpackProcessedCssSource },
|
|
2166
2172
|
...registerWebpackGeneratedCss === void 0 ? {} : { registerGeneratedCss: registerWebpackGeneratedCss }
|
|
2167
2173
|
} : void 0;
|
|
2174
|
+
const classSetLoaderOptions = {
|
|
2175
|
+
getClassSet: getClassSetInLoader,
|
|
2176
|
+
getWatchDependencies: getRuntimeWatchDependencies,
|
|
2177
|
+
...registerWebpackCssSourceFile === void 0 ? {} : { registerCssSourceFile: registerWebpackCssSourceFile },
|
|
2178
|
+
...updateWebpackGeneratedCss === void 0 ? {} : { updateGeneratedCss: updateWebpackGeneratedCss }
|
|
2179
|
+
};
|
|
2168
2180
|
require_runtime_registry.setWebpackLoaderRuntime(runtimeRegistryKey, {
|
|
2169
|
-
classSet:
|
|
2170
|
-
getClassSet: getClassSetInLoader,
|
|
2171
|
-
getWatchDependencies: getRuntimeWatchDependencies,
|
|
2172
|
-
...registerWebpackCssSourceFile === void 0 ? {} : { registerCssSourceFile: registerWebpackCssSourceFile },
|
|
2173
|
-
...updateWebpackGeneratedCss === void 0 ? {} : { updateGeneratedCss: updateWebpackGeneratedCss }
|
|
2174
|
-
},
|
|
2181
|
+
classSet: classSetLoaderOptions,
|
|
2175
2182
|
...runtimeLoaderRewriteOptions === void 0 ? {} : { cssImportRewrite: runtimeLoaderRewriteOptions }
|
|
2176
2183
|
});
|
|
2177
2184
|
const cleanupWebpackLoaderRuntime = () => {
|
|
@@ -2244,8 +2251,10 @@ function setupWebpackV5Loaders(options) {
|
|
|
2244
2251
|
if (cssGenerationLoaderOptions && runtimeCssGenerationLoaderExists && runtimeCssGenerationLoader && isCssModule && !hasLoaderEntry(loaderEntries, runtimeCssGenerationLoader)) {
|
|
2245
2252
|
const generationLoaderEntry = createCssGenerationLoaderEntry();
|
|
2246
2253
|
const anchorIndex = findRewriteAnchor(loaderEntries);
|
|
2247
|
-
if (generationLoaderEntry)
|
|
2248
|
-
|
|
2254
|
+
if (generationLoaderEntry) {
|
|
2255
|
+
if (anchorIndex === -1) anchorlessInsert(generationLoaderEntry, "after");
|
|
2256
|
+
else loaderEntries.splice(anchorIndex + 1, 0, generationLoaderEntry);
|
|
2257
|
+
}
|
|
2249
2258
|
}
|
|
2250
2259
|
if (cssImportRewriteLoaderOptions && runtimeCssImportRewriteLoaderExists && runtimeCssImportRewriteLoader && isCssModule) {
|
|
2251
2260
|
const existingIndex = loaderEntries.findIndex((entry) => entry.loader?.includes?.(runtimeCssImportRewriteLoader));
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-Jn4FJT6y.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-DExB8tzB.js";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as _defineProperty, t as omitUndefined } from "./object-
|
|
1
|
+
import { n as _defineProperty, t as omitUndefined } from "./object-B-8IHefx.js";
|
|
2
2
|
import { n as HARD_PARSE_CACHE_MAX_ENTRIES, t as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH } from "./cache-options-DwBtLwQe.js";
|
|
3
3
|
import { splitCandidateTokens } from "@tailwindcss-mangle/engine";
|
|
4
4
|
import { LRUCache } from "lru-cache";
|
|
@@ -46,9 +46,10 @@ function createNameMatcher(list, { exact = false } = {}) {
|
|
|
46
46
|
const exactStrings = exact ? /* @__PURE__ */ new Set() : void 0;
|
|
47
47
|
const fuzzyStrings = [];
|
|
48
48
|
const regexList = [];
|
|
49
|
-
for (const item of list) if (typeof item === "string")
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
for (const item of list) if (typeof item === "string") {
|
|
50
|
+
if (exact) exactStrings.add(item);
|
|
51
|
+
else fuzzyStrings.push(item);
|
|
52
|
+
} else regexList.push(normaliseRegex(item));
|
|
52
53
|
if (exact) {
|
|
53
54
|
const exactStringCount = exactStrings?.size ?? 0;
|
|
54
55
|
if (exactStringCount === 1 && regexList.length === 0) {
|
|
@@ -1332,7 +1333,7 @@ function analyzeSource(ast, options, handler, collectModuleMetadata = true) {
|
|
|
1332
1333
|
const exportDeclarations = collectModuleMetadata ? /* @__PURE__ */ new Set() : EMPTY_EXPORT_DECLARATIONS;
|
|
1333
1334
|
const requireCallPaths = collectModuleMetadata ? [] : EMPTY_REQUIRE_CALL_PATHS;
|
|
1334
1335
|
const evalHandler = handler ?? getDefaultEvalHandler();
|
|
1335
|
-
|
|
1336
|
+
const traverseOptions = {
|
|
1336
1337
|
StringLiteral: { enter(p) {
|
|
1337
1338
|
if (isEvalPath(p.parentPath)) return;
|
|
1338
1339
|
targetPaths.push(p);
|
|
@@ -1380,7 +1381,10 @@ function analyzeSource(ast, options, handler, collectModuleMetadata = true) {
|
|
|
1380
1381
|
ExportDeclaration: { enter(p) {
|
|
1381
1382
|
exportDeclarations.add(p);
|
|
1382
1383
|
} }
|
|
1383
|
-
} : {}
|
|
1384
|
+
} : {}
|
|
1385
|
+
};
|
|
1386
|
+
traverse(ast, {
|
|
1387
|
+
...traverseOptions,
|
|
1384
1388
|
noScope: !needScope
|
|
1385
1389
|
});
|
|
1386
1390
|
return {
|