weapp-tailwindcss 5.0.0-next.1 → 5.0.0-next.3
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.d.ts +3 -1
- package/dist/bundlers/vite/css-finalizer.d.ts +3 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +14 -1
- package/dist/bundlers/vite/source-candidates.d.ts +15 -0
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/generator/options.d.ts +2 -0
- package/dist/generator/types.d.ts +1 -0
- package/dist/generator-Y-Ikv4Fu.mjs +1177 -0
- package/dist/{generator-css-DhPFjSzK.mjs → generator-css-Bwy_Uz89.mjs} +72 -32
- package/dist/{generator-css-CnYjiMrD.js → generator-css-CRLrHW4F.js} +72 -32
- package/dist/{generator-CZ-JXw6T.js → generator-mmhXzZnv.js} +797 -13
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/gulp.js +4 -5
- package/dist/gulp.mjs +4 -5
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/{loader-anchors-DvwgIYdA.mjs → loader-anchors-1MumTAtA.mjs} +2 -2
- package/dist/{loader-anchors-cprm4Klq.js → loader-anchors-TrFvT6g1.js} +1 -1
- package/dist/postcss.js +3 -1
- package/dist/postcss.mjs +3 -1
- package/dist/{recorder-rn_2v_nd.js → recorder-GdTJ3QqX.js} +1 -1
- package/dist/{recorder-B_XyZ576.mjs → recorder-XdFvVASS.mjs} +1 -1
- package/dist/tailwindcss/v4-engine/candidates.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/tailwind-v4-default-colors.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +2 -0
- package/dist/{vite-C8JlHiyR.mjs → vite-BDywuCjn.mjs} +409 -163
- package/dist/{vite-BHpAqldo.js → vite-DgRh_GXn.js} +405 -158
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/{webpack-DNIJ0ysE.js → webpack-CAJR4hhP.js} +3 -3
- package/dist/{webpack-CABjKGGQ.mjs → webpack-CiHqVZTg.mjs} +3 -3
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/webpack4.js +3 -3
- package/dist/webpack4.mjs +3 -3
- package/package.json +5 -8
- package/dist/generator-Dwxgra97.mjs +0 -399
package/dist/generator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_generator = require("./generator-mmhXzZnv.js");
|
|
4
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
5
5
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
6
6
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as transformTailwindV3CssToWeapp, a as resolveTailwindV4Source, c as resolveTailwindV4SourceOptionsFromPatcher, g as transformTailwindV3CssByTarget, h as resolveTailwindV3SourceOptionsFromPatcher, i as normalizeWeappTailwindcssGeneratorOptions, l as transformTailwindV4CssByTarget, m as resolveTailwindV3SourceFromPatcher, n as createWeappTailwindcssGeneratorFromPatcher, o as resolveTailwindV4SourceFromPatchOptions, p as resolveTailwindV3Source, r as resolveTailwindSourceFromPatcher, s as resolveTailwindV4SourceFromPatcher, t as createWeappTailwindcssGenerator, u as transformTailwindV4CssToWeapp } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
2
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_recorder = require("./recorder-
|
|
4
|
-
const require_generator_css = require("./generator-css-
|
|
3
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
4
|
+
const require_generator_css = require("./generator-css-CRLrHW4F.js");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
7
7
|
let node_process = require("node:process");
|
|
@@ -21,7 +21,6 @@ const Transform = node_stream.default.Transform;
|
|
|
21
21
|
*/
|
|
22
22
|
function createPlugins(options = {}) {
|
|
23
23
|
const opts = require_recorder.getCompilerContext(options);
|
|
24
|
-
const hasExplicitGeneratorOptions = options.generator !== void 0;
|
|
25
24
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
26
25
|
const patchRecorderState = require_recorder.setupPatchRecorder(initialTwPatcher, opts.tailwindcssBasedir, {
|
|
27
26
|
source: "runtime",
|
|
@@ -183,7 +182,7 @@ function createPlugins(options = {}) {
|
|
|
183
182
|
async transform() {
|
|
184
183
|
await runtimeState.patchPromise;
|
|
185
184
|
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, options);
|
|
186
|
-
const css = (
|
|
185
|
+
const css = (await require_generator_css.generateCssByGenerator({
|
|
187
186
|
opts,
|
|
188
187
|
runtimeState,
|
|
189
188
|
runtime: await refreshRuntimeSet(false),
|
|
@@ -193,7 +192,7 @@ function createPlugins(options = {}) {
|
|
|
193
192
|
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
194
193
|
styleHandler,
|
|
195
194
|
debug
|
|
196
|
-
})
|
|
195
|
+
}))?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
197
196
|
debug("css handle: %s", file.path);
|
|
198
197
|
return { result: css };
|
|
199
198
|
}
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as refreshTailwindRuntimeState, g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-
|
|
2
|
-
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-
|
|
1
|
+
import { _ as refreshTailwindRuntimeState, g as ensureRuntimeClassSet, n as shouldSkipJsTransform, r as getCompilerContext, t as setupPatchRecorder, v as createDebug } from "./recorder-XdFvVASS.mjs";
|
|
2
|
+
import { i as processCachedTask, t as generateCssByGenerator } from "./generator-css-Bwy_Uz89.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { Buffer } from "node:buffer";
|
|
@@ -15,7 +15,6 @@ const Transform = stream.Transform;
|
|
|
15
15
|
*/
|
|
16
16
|
function createPlugins(options = {}) {
|
|
17
17
|
const opts = getCompilerContext(options);
|
|
18
|
-
const hasExplicitGeneratorOptions = options.generator !== void 0;
|
|
19
18
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
20
19
|
const patchRecorderState = setupPatchRecorder(initialTwPatcher, opts.tailwindcssBasedir, {
|
|
21
20
|
source: "runtime",
|
|
@@ -177,7 +176,7 @@ function createPlugins(options = {}) {
|
|
|
177
176
|
async transform() {
|
|
178
177
|
await runtimeState.patchPromise;
|
|
179
178
|
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, options);
|
|
180
|
-
const css = (
|
|
179
|
+
const css = (await generateCssByGenerator({
|
|
181
180
|
opts,
|
|
182
181
|
runtimeState,
|
|
183
182
|
runtime: await refreshRuntimeSet(false),
|
|
@@ -187,7 +186,7 @@ function createPlugins(options = {}) {
|
|
|
187
186
|
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
188
187
|
styleHandler,
|
|
189
188
|
debug
|
|
190
|
-
})
|
|
189
|
+
}))?.css ?? (await styleHandler(rawSource, cssHandlerOptions)).css;
|
|
191
190
|
debug("css handle: %s", file.path);
|
|
192
191
|
return { result: css };
|
|
193
192
|
}
|
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-mmhXzZnv.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
4
|
const require_postcss = require("./postcss.js");
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
5
|
+
const require_vite = require("./vite-DgRh_GXn.js");
|
|
6
|
+
const require_webpack = require("./webpack-CAJR4hhP.js");
|
|
7
7
|
exports.UnifiedViteWeappTailwindcssPlugin = require_vite.UnifiedViteWeappTailwindcssPlugin;
|
|
8
8
|
exports.UnifiedWebpackPluginV5 = require_webpack.UnifiedWebpackPluginV5;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
3
|
import weappTailwindcssPostcssPlugin from "./postcss.mjs";
|
|
4
|
-
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
4
|
+
import { t as UnifiedViteWeappTailwindcssPlugin } from "./vite-BDywuCjn.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-CiHqVZTg.mjs";
|
|
6
6
|
export { UnifiedViteWeappTailwindcssPlugin, UnifiedWebpackPluginV5, createPlugins, createWeappTailwindcssGenerator, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as pluginName } from "./recorder-
|
|
1
|
+
import { p as pluginName } from "./recorder-XdFvVASS.mjs";
|
|
2
2
|
import { t as resolveTailwindcssImport } from "./css-imports-CSdPq_Sc.mjs";
|
|
3
3
|
import Module from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
@@ -169,7 +169,7 @@ function hasWatchChanges(compiler) {
|
|
|
169
169
|
return (compiler.modifiedFiles?.size ?? 0) > 0 || (compiler.removedFiles?.size ?? 0) > 0;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.
|
|
172
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.10_synckit@0.11.12_typescript@5.9.3_vue-tsc@3.2.8_typescript@5.9.3_/node_modules/tsdown/esm-shims.js
|
|
173
173
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
174
174
|
const getDirname = () => path.dirname(getFilename());
|
|
175
175
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_recorder = require("./recorder-
|
|
2
|
+
const require_recorder = require("./recorder-GdTJ3QqX.js");
|
|
3
3
|
const require_css_imports = require("./css-imports-BbrbluP9.js");
|
|
4
4
|
let node_module = require("node:module");
|
|
5
5
|
node_module = require_chunk.__toESM(node_module);
|
package/dist/postcss.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
6
|
-
const require_generator = require("./generator-
|
|
6
|
+
const require_generator = require("./generator-mmhXzZnv.js");
|
|
7
7
|
let node_module = require("node:module");
|
|
8
8
|
let postcss = require("postcss");
|
|
9
9
|
postcss = require_chunk.__toESM(postcss);
|
|
@@ -251,11 +251,13 @@ const weappTailwindcssPostcssPlugin = (options = {}) => {
|
|
|
251
251
|
}));
|
|
252
252
|
const generateOptions = {
|
|
253
253
|
candidates: new Set([...autoCandidates, ...candidates ?? []]),
|
|
254
|
+
scanSources: false,
|
|
254
255
|
sources: [...collectedSources.sources, ...sources ?? []],
|
|
255
256
|
styleOptions: {
|
|
256
257
|
...generatorOptions.styleOptions,
|
|
257
258
|
...styleOptions
|
|
258
259
|
},
|
|
260
|
+
tailwindcssV3Compatibility: generatorOptions.tailwindcssV3Compatibility,
|
|
259
261
|
target: legacyTarget ?? generatorOptions.target
|
|
260
262
|
};
|
|
261
263
|
const generated = await generator.generate(generateOptions);
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveTailwindV4Source$1,
|
|
1
|
+
import { a as resolveTailwindV4Source$1, i as normalizeWeappTailwindcssGeneratorOptions, p as resolveTailwindV3Source, t as createWeappTailwindcssGenerator } from "./generator-Y-Ikv4Fu.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import postcss from "postcss";
|
|
4
4
|
import path from "node:path";
|
|
@@ -242,11 +242,13 @@ const weappTailwindcssPostcssPlugin = (options = {}) => {
|
|
|
242
242
|
}));
|
|
243
243
|
const generateOptions = {
|
|
244
244
|
candidates: new Set([...autoCandidates, ...candidates ?? []]),
|
|
245
|
+
scanSources: false,
|
|
245
246
|
sources: [...collectedSources.sources, ...sources ?? []],
|
|
246
247
|
styleOptions: {
|
|
247
248
|
...generatorOptions.styleOptions,
|
|
248
249
|
...styleOptions
|
|
249
250
|
},
|
|
251
|
+
tailwindcssV3Compatibility: generatorOptions.tailwindcssV3Compatibility,
|
|
250
252
|
target: legacyTarget ?? generatorOptions.target
|
|
251
253
|
};
|
|
252
254
|
const generated = await generator.generate(generateOptions);
|
|
@@ -372,7 +372,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
372
372
|
}
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region package.json
|
|
375
|
-
var version = "5.0.0-next.
|
|
375
|
+
var version = "5.0.0-next.3";
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/constants.ts
|
|
378
378
|
const pluginName = "weapp-tailwindcss-webpack-plugin";
|
|
@@ -364,7 +364,7 @@ function getRecordFileCandidates(baseDir) {
|
|
|
364
364
|
}
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region package.json
|
|
367
|
-
var version = "5.0.0-next.
|
|
367
|
+
var version = "5.0.0-next.3";
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region src/constants.ts
|
|
370
370
|
const pluginName = "weapp-tailwindcss-webpack-plugin";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { TailwindV4GenerateTarget } from './types';
|
|
3
|
+
export declare function normalizeTailwindV4GeneratedUrlValues(css: string): string;
|
|
3
4
|
export declare function transformTailwindV4CssToWeapp(css: string, options?: Partial<IStyleHandlerOptions>): Promise<string>;
|
|
4
5
|
export declare function transformTailwindV4CssByTarget(css: string, target: TailwindV4GenerateTarget, options?: Partial<IStyleHandlerOptions>): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function applyTailwindV3CompatibilityCss(css: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createTailwindV3DefaultColorThemeCss(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createTailwindV4DefaultColorThemeCss(): string;
|
|
@@ -4,6 +4,8 @@ export type TailwindV4GenerateTarget = 'weapp' | 'web' | 'tailwind';
|
|
|
4
4
|
export interface TailwindV4GenerateOptions extends PatchTailwindV4GenerateOptions {
|
|
5
5
|
target?: TailwindV4GenerateTarget;
|
|
6
6
|
styleOptions?: Partial<IStyleHandlerOptions>;
|
|
7
|
+
tailwindcssV3Compatibility?: boolean;
|
|
8
|
+
scanSources?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export interface TailwindV4GenerateResult extends Omit<PatchTailwindV4GenerateResult, 'css'> {
|
|
9
11
|
css: string;
|