weapp-tailwindcss 5.1.12 → 5.1.13
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/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const require_framework = require("./framework.js");
|
|
|
3
3
|
const require_generator = require("./generator-CS10c9g1.js");
|
|
4
4
|
const require_gulp = require("./gulp-DNZZvUMq.js");
|
|
5
5
|
const require_postcss = require("./postcss.js");
|
|
6
|
-
const require_vite = require("./vite-
|
|
6
|
+
const require_vite = require("./vite-DnkObu2L.js");
|
|
7
7
|
const require_webpack = require("./webpack-CzXjfvYS.js");
|
|
8
8
|
require("./webpack.js");
|
|
9
9
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMp
|
|
|
2
2
|
import { t as createWeappTailwindcssGenerator } from "./generator-BvPcmqxU.mjs";
|
|
3
3
|
import { t as createPlugins } from "./gulp-BEOzXrbp.mjs";
|
|
4
4
|
import weappTailwindcssPostcssPlugin from "./postcss.mjs";
|
|
5
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-Tpgi77vE.mjs";
|
|
6
6
|
import { n as weappTailwindcssPackageDir } from "./webpack-CTYm19zA.mjs";
|
|
7
7
|
import "./webpack.mjs";
|
|
8
8
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
@@ -7129,7 +7129,8 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7129
7129
|
let pendingHmrCandidateChange;
|
|
7130
7130
|
let pendingHmrCssTargetFiles;
|
|
7131
7131
|
let pendingFullHmrCssRegeneration = false;
|
|
7132
|
-
const
|
|
7132
|
+
const normalizeGeneratedCssCacheFile = (file) => normalizeVitePersistentCacheKey((0, _weapp_tailwindcss_shared.cleanUrl)(file));
|
|
7133
|
+
const normalizeHmrCssTargetFile = normalizeGeneratedCssCacheFile;
|
|
7133
7134
|
const collectPendingHmrCssTargetFiles = (cssModules, fallbackCssIds) => {
|
|
7134
7135
|
const targets = /* @__PURE__ */ new Set();
|
|
7135
7136
|
const addTarget = (file) => {
|
|
@@ -7202,7 +7203,8 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7202
7203
|
return change;
|
|
7203
7204
|
};
|
|
7204
7205
|
const resolvePendingHmrCandidateChange = (generatorCode, file) => {
|
|
7205
|
-
|
|
7206
|
+
const fileKey = normalizeGeneratedCssCacheFile(file);
|
|
7207
|
+
if (resolvedConfig?.command !== "serve" || !pendingHmrCandidateChange || pendingHmrCandidateChange.runtimeAffecting || pendingHmrCandidateChange.addedCandidates.size === 0 || resolveCurrentGeneratorOptions().target === "weapp" && require_generator.hasUserCssLayerBlocks(generatorCode) || !cleanGeneratedCssByFile.has(fileKey) || !generatedClassSetByFile.has(fileKey) || pendingHmrCssTargetFiles !== void 0 && !pendingHmrCssTargetFiles.has(fileKey)) return;
|
|
7206
7208
|
return pendingHmrCandidateChange;
|
|
7207
7209
|
};
|
|
7208
7210
|
const finishPendingHmrCssTargetFile = (file) => {
|
|
@@ -7456,12 +7458,13 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7456
7458
|
const sourceRoot = resolveWeappViteSourceRoot(resolvedConfig, opts.appType);
|
|
7457
7459
|
const outputFile = resolveViteCssPipelineOutputFile(requestFile, opts, rootDir, currentGeneratorBranch.isWeb, shouldPreserveStyleOutputExtension, sourceRoot);
|
|
7458
7460
|
const generatorTransformCode = currentGeneratorBranch.isWeb ? generatorCode : require_hmr_timing.normalizeMiniProgramGeneratorCssSource(generatorCode, outputFile);
|
|
7461
|
+
const fileKey = normalizeGeneratedCssCacheFile(file);
|
|
7459
7462
|
const fullRuntime = getSourceCandidates() ?? getRecordedGeneratorCandidates() ?? await ensureRuntimeClassSet();
|
|
7460
7463
|
const pendingHmrChange = resolvePendingHmrCandidateChange(generatorCode, file);
|
|
7461
7464
|
const forceFullHmrCssRegeneration = pendingFullHmrCssRegeneration || resolvedConfig?.command === "serve" && pendingHmrCandidateChange !== void 0 && pendingHmrChange === void 0;
|
|
7462
7465
|
const runtime = fullRuntime;
|
|
7463
7466
|
if (pendingHmrChange && currentGeneratorOptions.target === "weapp" && require_generator.filterUnsupportedMiniProgramTailwindV4Candidates(pendingHmrChange.addedCandidates).size === 0) {
|
|
7464
|
-
const previousTracedCss = tracedGeneratedCssByFile.get(
|
|
7467
|
+
const previousTracedCss = tracedGeneratedCssByFile.get(fileKey);
|
|
7465
7468
|
if (previousTracedCss !== void 0) {
|
|
7466
7469
|
finishPendingHmrCssTargetFile(file);
|
|
7467
7470
|
return `${require_source_candidate_scan_signature.createBundlerGeneratedCssMarker("vite", normalizeViteProcessedCssFile(file))}\n${previousTracedCss}`;
|
|
@@ -7503,7 +7506,7 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7503
7506
|
}), {
|
|
7504
7507
|
file,
|
|
7505
7508
|
memoryDebug: {
|
|
7506
|
-
cleanCacheHit: cleanGeneratedCssByFile.has(
|
|
7509
|
+
cleanCacheHit: cleanGeneratedCssByFile.has(fileKey),
|
|
7507
7510
|
forceFullHmrCssRegeneration,
|
|
7508
7511
|
pendingAddedCandidates: pendingHmrCandidateChange?.addedCandidates.size ?? 0,
|
|
7509
7512
|
pendingCssTargets: pendingHmrCssTargetFiles?.size ?? 0,
|
|
@@ -7530,9 +7533,9 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7530
7533
|
tokenSources: require_hmr_timing.createCssTokenSourceMap(getSourceCandidateSourcesForEntries(void 0), opts)
|
|
7531
7534
|
});
|
|
7532
7535
|
for (const dependency of generated.dependencies) hookContext?.addWatchFile?.(dependency);
|
|
7533
|
-
cleanGeneratedCssByFile.set(
|
|
7534
|
-
tracedGeneratedCssByFile.set(
|
|
7535
|
-
generatedClassSetByFile.set(
|
|
7536
|
+
cleanGeneratedCssByFile.set(fileKey, outputCss);
|
|
7537
|
+
tracedGeneratedCssByFile.set(fileKey, tracedCss);
|
|
7538
|
+
generatedClassSetByFile.set(fileKey, new Set(generated.classSet));
|
|
7536
7539
|
const shouldInjectGeneratedCssIntoMain = mainCssChunkMatcher(outputFile, opts.appType) || require_generator.hasTailwindRootDirectives(generatorTransformCode, { importFallback: currentGeneratorOptions.importFallback }) && !require_source_candidate_scan_signature.normalizeOutputPathKey(outputFile).includes("/");
|
|
7537
7540
|
recordViteProcessedCssAssetResult(file, tracedCss, {
|
|
7538
7541
|
injectIntoMain: shouldInjectGeneratedCssIntoMain,
|
|
@@ -7123,7 +7123,8 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7123
7123
|
let pendingHmrCandidateChange;
|
|
7124
7124
|
let pendingHmrCssTargetFiles;
|
|
7125
7125
|
let pendingFullHmrCssRegeneration = false;
|
|
7126
|
-
const
|
|
7126
|
+
const normalizeGeneratedCssCacheFile = (file) => normalizeVitePersistentCacheKey(cleanUrl(file));
|
|
7127
|
+
const normalizeHmrCssTargetFile = normalizeGeneratedCssCacheFile;
|
|
7127
7128
|
const collectPendingHmrCssTargetFiles = (cssModules, fallbackCssIds) => {
|
|
7128
7129
|
const targets = /* @__PURE__ */ new Set();
|
|
7129
7130
|
const addTarget = (file) => {
|
|
@@ -7196,7 +7197,8 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7196
7197
|
return change;
|
|
7197
7198
|
};
|
|
7198
7199
|
const resolvePendingHmrCandidateChange = (generatorCode, file) => {
|
|
7199
|
-
|
|
7200
|
+
const fileKey = normalizeGeneratedCssCacheFile(file);
|
|
7201
|
+
if (resolvedConfig?.command !== "serve" || !pendingHmrCandidateChange || pendingHmrCandidateChange.runtimeAffecting || pendingHmrCandidateChange.addedCandidates.size === 0 || resolveCurrentGeneratorOptions().target === "weapp" && hasUserCssLayerBlocks(generatorCode) || !cleanGeneratedCssByFile.has(fileKey) || !generatedClassSetByFile.has(fileKey) || pendingHmrCssTargetFiles !== void 0 && !pendingHmrCssTargetFiles.has(fileKey)) return;
|
|
7200
7202
|
return pendingHmrCandidateChange;
|
|
7201
7203
|
};
|
|
7202
7204
|
const finishPendingHmrCssTargetFile = (file) => {
|
|
@@ -7450,12 +7452,13 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7450
7452
|
const sourceRoot = resolveWeappViteSourceRoot(resolvedConfig, opts.appType);
|
|
7451
7453
|
const outputFile = resolveViteCssPipelineOutputFile(requestFile, opts, rootDir, currentGeneratorBranch.isWeb, shouldPreserveStyleOutputExtension, sourceRoot);
|
|
7452
7454
|
const generatorTransformCode = currentGeneratorBranch.isWeb ? generatorCode : normalizeMiniProgramGeneratorCssSource(generatorCode, outputFile);
|
|
7455
|
+
const fileKey = normalizeGeneratedCssCacheFile(file);
|
|
7453
7456
|
const fullRuntime = getSourceCandidates() ?? getRecordedGeneratorCandidates() ?? await ensureRuntimeClassSet();
|
|
7454
7457
|
const pendingHmrChange = resolvePendingHmrCandidateChange(generatorCode, file);
|
|
7455
7458
|
const forceFullHmrCssRegeneration = pendingFullHmrCssRegeneration || resolvedConfig?.command === "serve" && pendingHmrCandidateChange !== void 0 && pendingHmrChange === void 0;
|
|
7456
7459
|
const runtime = fullRuntime;
|
|
7457
7460
|
if (pendingHmrChange && currentGeneratorOptions.target === "weapp" && filterUnsupportedMiniProgramTailwindV4Candidates(pendingHmrChange.addedCandidates).size === 0) {
|
|
7458
|
-
const previousTracedCss = tracedGeneratedCssByFile.get(
|
|
7461
|
+
const previousTracedCss = tracedGeneratedCssByFile.get(fileKey);
|
|
7459
7462
|
if (previousTracedCss !== void 0) {
|
|
7460
7463
|
finishPendingHmrCssTargetFile(file);
|
|
7461
7464
|
return `${createBundlerGeneratedCssMarker("vite", normalizeViteProcessedCssFile(file))}\n${previousTracedCss}`;
|
|
@@ -7497,7 +7500,7 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7497
7500
|
}), {
|
|
7498
7501
|
file,
|
|
7499
7502
|
memoryDebug: {
|
|
7500
|
-
cleanCacheHit: cleanGeneratedCssByFile.has(
|
|
7503
|
+
cleanCacheHit: cleanGeneratedCssByFile.has(fileKey),
|
|
7501
7504
|
forceFullHmrCssRegeneration,
|
|
7502
7505
|
pendingAddedCandidates: pendingHmrCandidateChange?.addedCandidates.size ?? 0,
|
|
7503
7506
|
pendingCssTargets: pendingHmrCssTargetFiles?.size ?? 0,
|
|
@@ -7524,9 +7527,9 @@ function createViteFrameworkPlugins(options = {}, frameworkBranch) {
|
|
|
7524
7527
|
tokenSources: createCssTokenSourceMap(getSourceCandidateSourcesForEntries(void 0), opts)
|
|
7525
7528
|
});
|
|
7526
7529
|
for (const dependency of generated.dependencies) hookContext?.addWatchFile?.(dependency);
|
|
7527
|
-
cleanGeneratedCssByFile.set(
|
|
7528
|
-
tracedGeneratedCssByFile.set(
|
|
7529
|
-
generatedClassSetByFile.set(
|
|
7530
|
+
cleanGeneratedCssByFile.set(fileKey, outputCss);
|
|
7531
|
+
tracedGeneratedCssByFile.set(fileKey, tracedCss);
|
|
7532
|
+
generatedClassSetByFile.set(fileKey, new Set(generated.classSet));
|
|
7530
7533
|
const shouldInjectGeneratedCssIntoMain = mainCssChunkMatcher(outputFile, opts.appType) || hasTailwindRootDirectives(generatorTransformCode, { importFallback: currentGeneratorOptions.importFallback }) && !normalizeOutputPathKey(outputFile).includes("/");
|
|
7531
7534
|
recordViteProcessedCssAssetResult(file, tracedCss, {
|
|
7532
7535
|
injectIntoMain: shouldInjectGeneratedCssIntoMain,
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_vite = require("./vite-
|
|
2
|
+
const require_vite = require("./vite-DnkObu2L.js");
|
|
3
3
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
1
|
+
import { t as WeappTailwindcss } from "./vite-Tpgi77vE.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.13",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -204,10 +204,10 @@
|
|
|
204
204
|
"semver": "~7.8.5",
|
|
205
205
|
"yaml": "^2.9.0",
|
|
206
206
|
"@weapp-tailwindcss/logger": "2.0.0",
|
|
207
|
-
"@weapp-tailwindcss/shared": "2.0.0",
|
|
208
|
-
"@weapp-tailwindcss/postcss": "3.1.9",
|
|
209
207
|
"@weapp-tailwindcss/reset": "0.1.1",
|
|
208
|
+
"@weapp-tailwindcss/shared": "2.0.0",
|
|
210
209
|
"tailwindcss-config": "2.0.1",
|
|
210
|
+
"@weapp-tailwindcss/postcss": "3.1.9",
|
|
211
211
|
"weapp-style-injector": "1.0.1"
|
|
212
212
|
},
|
|
213
213
|
"devDependencies": {
|