weapp-tailwindcss 5.0.0-next.36 → 5.0.0-next.38
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-Bsr05EFW.mjs → bundle-state-CnaJxkFY.mjs} +1 -1
- package/dist/{bundle-state-8w8DM8Lw.js → bundle-state-DgGEhk_z.js} +1 -1
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
- package/dist/bundlers/vite/source-candidates.d.ts +5 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/generator/options.d.ts +3 -0
- package/dist/{generator-BtpQoQEH.js → generator--0-ekuVO.js} +5 -3
- package/dist/{generator-CmLpVJgw.mjs → generator-B76ovqsv.mjs} +5 -3
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +6 -6
- package/dist/{incremental-runtime-class-set-vqTU-eph.js → incremental-runtime-class-set-CN6K_97P.js} +25 -20
- package/dist/{incremental-runtime-class-set-W61zZU00.mjs → incremental-runtime-class-set-x10M9bn_.mjs} +25 -20
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-DGprmeke.mjs → postcss-CR9UCaIK.mjs} +3 -3
- package/dist/{postcss-DSvNrY0J.js → postcss-hYimKoN_.js} +3 -3
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-nPDKYr8V.mjs → precheck-BrNwLG2e.mjs} +3 -3
- package/dist/{precheck-Bp-V1T_Q.js → precheck-DPtJjZmV.js} +3 -3
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +2 -2
- package/dist/{source-candidates-l12JBkKU.mjs → source-candidates-DN1mihlU.mjs} +11 -11
- package/dist/{source-candidates-BjB4wSga.js → source-candidates-DSxme_O2.js} +11 -11
- package/dist/tailwindcss/v3-engine/types.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +1 -0
- package/dist/{tailwindcss-D6zEhnyE.mjs → tailwindcss-DWtPieNE.mjs} +1 -1
- package/dist/{tailwindcss-bNXguXhC.js → tailwindcss-glCm_d3H.js} +1 -1
- package/dist/typedoc.export.d.ts +1 -1
- package/dist/types/typedoc-tailwindcss-patch.d.ts +67 -0
- package/dist/{v3-engine-KDOfD-6F.js → v3-engine-D3BMLVAN.js} +78 -15
- package/dist/{v3-engine-BYcGCWUY.mjs → v3-engine-DCxNPBVs.mjs} +78 -15
- package/dist/{vite-C8SUICPv.mjs → vite-DOprpdH-.mjs} +11 -11
- package/dist/{vite-CMzi0wR2.js → vite-Ec0uX6kF.js} +11 -11
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +87 -18
- package/dist/{webpack-2v1sQKyZ.js → webpack-Ccohlg3A.js} +48 -17
- package/dist/{webpack-BiTMfrBW.mjs → webpack-DFlZcqAU.mjs} +47 -17
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -4
- package/package.json +6 -6
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, d as _defineProperty, f as init_defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, x as refreshTailwindRuntimeState, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
2
|
-
import { B as createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-
|
|
3
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-
|
|
4
|
-
import { d as removeTailwindSourceDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
1
|
+
import { b as ensureRuntimeClassSet, d as _defineProperty, f as init_defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, x as refreshTailwindRuntimeState, y as createTailwindRuntimeReadyPromise } from "./precheck-BrNwLG2e.mjs";
|
|
2
|
+
import { B as createDebug, W as resolveTailwindcssOptions, l as getRuntimeClassSetSignature } from "./v3-engine-DCxNPBVs.mjs";
|
|
3
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-B76ovqsv.mjs";
|
|
4
|
+
import { d as removeTailwindSourceDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-x10M9bn_.mjs";
|
|
5
5
|
import { r as getGroupedEntries } from "./utils-DsaS975I.mjs";
|
|
6
|
-
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
7
|
-
import { _ as stripRequestQuery, b as toAbsoluteOutputPath, d as resolvePluginDisabledState, g as isSourceStyleRequest, l as stripBundlerGeneratedCssMarkers, n as createBundleBuildState, o as pushConcurrentTaskFactories, r as updateBundleBuildState, t as buildBundleSnapshot, u as resolvePackageDir, y as resolveOutputSpecifier } from "./bundle-state-
|
|
6
|
+
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-DWtPieNE.mjs";
|
|
7
|
+
import { _ as stripRequestQuery, b as toAbsoluteOutputPath, d as resolvePluginDisabledState, g as isSourceStyleRequest, l as stripBundlerGeneratedCssMarkers, n as createBundleBuildState, o as pushConcurrentTaskFactories, r as updateBundleBuildState, t as buildBundleSnapshot, u as resolvePackageDir, y as resolveOutputSpecifier } from "./bundle-state-CnaJxkFY.mjs";
|
|
8
8
|
import Module, { createRequire } from "node:module";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import process from "node:process";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
|
+
import micromatch from "micromatch";
|
|
13
14
|
//#region src/shared/tailwindcss-css-redirect.ts
|
|
14
15
|
const moduleWithMutableResolve = Module;
|
|
15
16
|
const patched = /* @__PURE__ */ new WeakSet();
|
|
@@ -683,27 +684,56 @@ function setupWebpackV5Loaders(options) {
|
|
|
683
684
|
init_defineProperty();
|
|
684
685
|
const debug = createDebug();
|
|
685
686
|
const weappTailwindcssPackageDir = resolvePackageDir("weapp-tailwindcss");
|
|
687
|
+
const outputIgnoredPredicatePath = Symbol("weapp-tailwindcss.outputIgnoredPredicatePath");
|
|
686
688
|
function normalizeIgnoredList(ignored) {
|
|
687
|
-
if (Array.isArray(ignored)) return ignored;
|
|
688
|
-
|
|
689
|
+
if (Array.isArray(ignored)) return ignored.filter((item) => typeof item === "string" || item instanceof RegExp || typeof item === "function");
|
|
690
|
+
if (typeof ignored === "string" || ignored instanceof RegExp || typeof ignored === "function") return [ignored];
|
|
691
|
+
return [];
|
|
692
|
+
}
|
|
693
|
+
function createOutputIgnoredPredicate(ignoredList, ignoredPath) {
|
|
694
|
+
const predicate = (file) => {
|
|
695
|
+
const resolvedFile = path.resolve(file);
|
|
696
|
+
if (resolvedFile === ignoredPath || resolvedFile.startsWith(`${ignoredPath}${path.sep}`)) return true;
|
|
697
|
+
const normalizedFile = file.replace(/\\/g, "/");
|
|
698
|
+
return ignoredList.some((item) => {
|
|
699
|
+
if (typeof item === "string") {
|
|
700
|
+
const resolvedItem = path.resolve(item);
|
|
701
|
+
if (resolvedFile === resolvedItem || resolvedFile.startsWith(`${resolvedItem}${path.sep}`)) return true;
|
|
702
|
+
return micromatch.isMatch(normalizedFile, item);
|
|
703
|
+
}
|
|
704
|
+
if (item instanceof RegExp) return item.test(normalizedFile);
|
|
705
|
+
return item(file);
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
predicate[outputIgnoredPredicatePath] = ignoredPath;
|
|
709
|
+
return predicate;
|
|
689
710
|
}
|
|
690
711
|
function appendIgnoredPath(ignored, ignoredPath) {
|
|
712
|
+
if (typeof ignored === "function" && ignored[outputIgnoredPredicatePath] === ignoredPath) return ignored;
|
|
691
713
|
const ignoredList = normalizeIgnoredList(ignored);
|
|
714
|
+
if (ignoredList.some((item) => typeof item !== "string")) return createOutputIgnoredPredicate(ignoredList, ignoredPath);
|
|
692
715
|
if (ignoredList.some((item) => typeof item === "string" && path.resolve(item) === ignoredPath)) return ignored;
|
|
693
716
|
return [...ignoredList, ignoredPath];
|
|
694
717
|
}
|
|
695
718
|
function setupWebpackWatchOutputIgnore(compiler) {
|
|
696
|
-
const
|
|
697
|
-
if (typeof originalWatch !== "function") return;
|
|
698
|
-
compiler.watch = ((watchOptions, handler) => {
|
|
719
|
+
const appendOutputIgnoredPath = (watchOptions) => {
|
|
699
720
|
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
700
721
|
const outputDir = outputPath ? path.resolve(outputPath) : void 0;
|
|
701
|
-
if (!outputDir) return
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
706
|
-
|
|
722
|
+
if (!outputDir) return watchOptions;
|
|
723
|
+
if (watchOptions && typeof watchOptions === "object") {
|
|
724
|
+
watchOptions.ignored = appendIgnoredPath(watchOptions.ignored, outputDir);
|
|
725
|
+
return watchOptions;
|
|
726
|
+
}
|
|
727
|
+
return { ignored: appendIgnoredPath(void 0, outputDir) };
|
|
728
|
+
};
|
|
729
|
+
compiler.options.watchOptions = appendOutputIgnoredPath(compiler.options.watchOptions);
|
|
730
|
+
const syncOutputIgnoredPath = () => {
|
|
731
|
+
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
732
|
+
if (!(outputPath ? path.resolve(outputPath) : void 0)) return;
|
|
733
|
+
const watchOptions = compiler.watching?.watchOptions;
|
|
734
|
+
if (watchOptions) appendOutputIgnoredPath(watchOptions);
|
|
735
|
+
};
|
|
736
|
+
compiler.hooks.watchRun?.tap(pluginName, syncOutputIgnoredPath);
|
|
707
737
|
}
|
|
708
738
|
/**
|
|
709
739
|
* @name WeappTailwindcss
|
package/dist/webpack.js
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-Ccohlg3A.js");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
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-DFlZcqAU.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TraverseOptions } from '@babel/traverse';
|
|
2
2
|
import type { JsTokenUpdater } from '../../../js/JsTokenUpdater';
|
|
3
3
|
import type { ITemplateHandlerOptions } from '../../../types';
|
|
4
|
-
|
|
5
|
-
export declare function createLegacyTraverseOptions(options: ITemplateHandlerOptions, jsTokenUpdater: JsTokenUpdater): {
|
|
6
|
-
StringLiteral(this: t.Node, path: import("@babel/traverse").NodePath<StringLiteral>): void;
|
|
4
|
+
export declare function createLegacyTraverseOptions(options: ITemplateHandlerOptions, jsTokenUpdater: JsTokenUpdater): TraverseOptions & {
|
|
7
5
|
noScope: true;
|
|
8
6
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.38",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -182,13 +182,13 @@
|
|
|
182
182
|
"micromatch": "^4.0.8",
|
|
183
183
|
"postcss-load-config": "^6.0.1",
|
|
184
184
|
"semver": "~7.8.1",
|
|
185
|
-
"tailwindcss-patch": "9.4.
|
|
185
|
+
"tailwindcss-patch": "9.4.2",
|
|
186
186
|
"yaml": "^2.9.0",
|
|
187
|
-
"@weapp-tailwindcss/postcss": "3.0.0-next.10",
|
|
188
|
-
"@weapp-tailwindcss/shared": "2.0.0-next.1",
|
|
189
|
-
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
190
187
|
"@weapp-tailwindcss/logger": "2.0.0-next.0",
|
|
191
|
-
"tailwindcss-config": "2.0.0-next.3"
|
|
188
|
+
"tailwindcss-config": "2.0.0-next.3",
|
|
189
|
+
"@weapp-tailwindcss/reset": "0.1.1-next.1",
|
|
190
|
+
"@weapp-tailwindcss/postcss": "3.0.0-next.10",
|
|
191
|
+
"@weapp-tailwindcss/shared": "2.0.0-next.1"
|
|
192
192
|
},
|
|
193
193
|
"devDependencies": {
|
|
194
194
|
"@vue/compiler-dom": "^3.5.35",
|