weapp-tailwindcss 5.3.6 → 5.4.1
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/README.md +3 -3
- package/README.zh-CN.md +4 -4
- package/dist/bundlers/shared/framework-postcss.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +3 -1
- package/dist/bundlers/shared/source-candidates/snapshot.d.ts +19 -0
- package/dist/bundlers/shared/source-candidates/source-priority.d.ts +1 -0
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -0
- package/dist/bundlers/shared/source-candidates/views.d.ts +12 -0
- package/dist/bundlers/shared/style-requests.d.ts +1 -0
- package/dist/bundlers/vite/bundle-state.d.ts +9 -1
- package/dist/bundlers/vite/capability-profile.d.ts +18 -0
- package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +12 -0
- package/dist/bundlers/vite/hot-css-modules.d.ts +2 -2
- package/dist/bundlers/vite/shared/configured-css-entry-observer.d.ts +29 -0
- package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +8 -0
- package/dist/bundlers/vite/shared/framework-css-generation-queue.d.ts +1 -0
- package/dist/bundlers/vite/shared/framework-hmr-module-version.d.ts +9 -0
- package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +5 -0
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +12 -2
- package/dist/compiler/compilation-session-pool.d.ts +1 -0
- package/dist/compiler/framework-compiler-session.d.ts +21 -0
- package/dist/compiler/index.d.ts +1 -0
- package/dist/{context-DTLRADfE.cjs → compiler-CDAz4SwJ.cjs} +907 -11
- package/dist/{context-4ittVpgt.js → compiler-DWcUgi3A.js} +813 -6
- package/dist/context/handlers.d.ts +1 -1
- package/dist/core/compiler/compiler.d.ts +2 -0
- package/dist/core/compiler/generation-cache.d.ts +30 -0
- package/dist/core/compiler/generation-state.d.ts +17 -0
- package/dist/core/compiler/index.d.ts +2 -0
- package/dist/core/compiler/root-store.d.ts +41 -0
- package/dist/core/compiler/snapshot.d.ts +35 -0
- package/dist/core/compiler/source-fingerprint.d.ts +3 -0
- package/dist/core/compiler/transforms.d.ts +15 -0
- package/dist/core/compiler/types.d.ts +75 -0
- package/dist/core.cjs +34 -8
- package/dist/core.d.ts +4 -1
- package/dist/core.js +3 -2
- package/dist/framework/index.d.ts +3 -1
- package/dist/framework.cjs +6 -1
- package/dist/framework.js +6 -1
- package/dist/{generator-EnTXLBlK.js → generator-BjK5PRR-.js} +28 -10
- package/dist/{generator-DKiYbTFR.cjs → generator-WlhrtNa3.cjs} +26 -8
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-DwtrU4V1.js → gulp-BbMMp7vY.js} +7 -7
- package/dist/{gulp-CUysZjW3.cjs → gulp-CBu_waef.cjs} +14 -16
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-utmOgn6p.js → hmr-timing-B_4sAvsk.js} +369 -291
- package/dist/{hmr-timing-Cvh5UgnM.cjs → hmr-timing-CYhNto2U.cjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{pipeline-helpers-CyVXL3h6.cjs → pipeline-helpers-Du8eAtMG.cjs} +6 -6
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -3
- package/dist/presets.js +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{source-candidate-scan-signature-BNt7NrrI.cjs → source-candidate-scan-signature-ZOm0O17V.cjs} +5 -5
- package/dist/{source-candidate-scan-signature-CDrLxVKu.js → source-candidate-scan-signature-wieibgE7.js} +3 -3
- package/dist/{tailwindcss-ChnpCv25.js → tailwindcss-9xmoCkaR.js} +1 -1
- package/dist/{tailwindcss-CexDJBhx.cjs → tailwindcss-D3jltF7M.cjs} +763 -5
- package/dist/{transform-CL-UZW1U.cjs → transform-C6k9zTQR.cjs} +12 -4
- package/dist/{transform-Bfi1_VgN.js → transform-DQhgAarN.js} +12 -4
- package/dist/typedoc.export.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/uni-app-x/component-local-style.d.ts +2 -0
- package/dist/uni-app-x/transform.d.ts +1 -0
- package/dist/uni-app-x/vite/asset-task.d.ts +21 -0
- package/dist/uni-app-x/vite/plugin-options.d.ts +8 -0
- package/dist/uni-app-x/vite/web-local-style.d.ts +2 -1
- package/dist/uni-app-x/vite.d.ts +1 -21
- package/dist/{v4-generation-core-Dhsu9Deu.cjs → v4-generation-core-BhYkeoZ4.cjs} +378 -300
- package/dist/{vite-DMX5zoID.cjs → vite-B0cvyfSY.cjs} +807 -200
- package/dist/{vite-DJkhb8n1.js → vite-Fu6GTjIY.js} +774 -165
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +7 -7
- package/dist/{webpack-Cpy_yggg.cjs → webpack-Amn5lmnx.cjs} +33 -35
- package/dist/{webpack-CzhrD9p3.js → webpack-BKHO-WSM.js} +10 -10
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/wxml/utils.d.ts +1 -1
- package/dist/{wxml-B7OAVpXJ.js → wxml-CvKyV69S.js} +10 -2
- package/dist/{wxml-PrK-8ARX.cjs → wxml-o-CUulAM.cjs} +40 -32
- package/package.json +12 -11
- package/dist/options-BJrtIQbH.cjs +0 -768
- package/dist/style-options-DW30H5PV.cjs +0 -82
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const
|
|
4
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
-
const require_wxml = require("./wxml-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const require_tailwindcss = require("./tailwindcss-CexDJBhx.cjs");
|
|
9
|
-
const require_style_options = require("./style-options-DW30H5PV.cjs");
|
|
2
|
+
const require_generator = require("./generator-WlhrtNa3.cjs");
|
|
3
|
+
const require_tailwindcss = require("./tailwindcss-D3jltF7M.cjs");
|
|
4
|
+
const require_v4_generation_core = require("./v4-generation-core-BhYkeoZ4.cjs");
|
|
5
|
+
const require_wxml = require("./wxml-o-CUulAM.cjs");
|
|
6
|
+
const require_compiler = require("./compiler-CDAz4SwJ.cjs");
|
|
7
|
+
const require_hmr_timing = require("./hmr-timing-CYhNto2U.cjs");
|
|
10
8
|
let node_fs = require("node:fs");
|
|
11
9
|
node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
|
|
12
10
|
let node_path = require("node:path");
|
|
@@ -320,7 +318,7 @@ function createGulpFileTransforms(context) {
|
|
|
320
318
|
async transform() {
|
|
321
319
|
await runtimeState.readyPromise;
|
|
322
320
|
const currentSource = file.contents?.toString() ?? rawSource;
|
|
323
|
-
if (
|
|
321
|
+
if (require_compiler.shouldSkipJsTransform(currentSource, {
|
|
324
322
|
...handlerOptions,
|
|
325
323
|
classNameSet: getRuntimeSet()
|
|
326
324
|
})) return { result: currentSource };
|
|
@@ -372,18 +370,18 @@ const GULP_COMPILATION_SCOPE_CACHE_MAX = 512;
|
|
|
372
370
|
/**
|
|
373
371
|
* @name weapp-tw-gulp
|
|
374
372
|
* @description native framework 的插件组合实现
|
|
375
|
-
* @link https://tw.
|
|
373
|
+
* @link https://tw.weapp.dev/docs/quick-start/frameworks/native
|
|
376
374
|
*/
|
|
377
375
|
function createNativeGulpPlugins(options = {}) {
|
|
378
376
|
const hasInitialTailwindCssRoots = require_generator.hasConfiguredTailwindV4CssRoots(options);
|
|
379
|
-
const opts =
|
|
377
|
+
const opts = require_compiler.getCompilerContext({
|
|
380
378
|
...options,
|
|
381
379
|
__internalDeferMissingCssEntriesWarning: true
|
|
382
380
|
});
|
|
383
381
|
const { cache } = opts;
|
|
384
382
|
const initialTailwindRuntime = opts.tailwindRuntime;
|
|
385
383
|
const refreshTailwindcssRuntime = opts.refreshTailwindcssRuntime;
|
|
386
|
-
const readyPromise =
|
|
384
|
+
const readyPromise = require_compiler.createTailwindRuntimeReadyPromise(initialTailwindRuntime);
|
|
387
385
|
let runtimeSet = /* @__PURE__ */ new Set();
|
|
388
386
|
const runtimeState = {
|
|
389
387
|
tailwindRuntime: initialTailwindRuntime,
|
|
@@ -420,7 +418,7 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
420
418
|
const shouldForceCollect = normalizedOptions.forceCollect === true || runtimeSetDirty;
|
|
421
419
|
const clearCache = normalizedOptions.clearCache === true || runtimeSetDirty;
|
|
422
420
|
if (!forceRefresh && !shouldForceCollect && runtimeSetInitialized) return runtimeSet;
|
|
423
|
-
runtimeSet = await
|
|
421
|
+
runtimeSet = await require_compiler.ensureRuntimeClassSet(runtimeState, {
|
|
424
422
|
forceRefresh,
|
|
425
423
|
forceCollect: shouldForceCollect,
|
|
426
424
|
clearCache,
|
|
@@ -454,7 +452,7 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
454
452
|
}
|
|
455
453
|
async function refreshGulpV4SourceCandidates(forceRefresh = false) {
|
|
456
454
|
const root = opts.tailwindcssBasedir ?? node_process.default.cwd();
|
|
457
|
-
const sourceScan = await
|
|
455
|
+
const sourceScan = await require_tailwindcss.resolveSourceScanEntries(opts, runtimeState.tailwindRuntime, { root });
|
|
458
456
|
const nextSignature = cache.computeHash(JSON.stringify({
|
|
459
457
|
root,
|
|
460
458
|
entries: sourceScan?.entries,
|
|
@@ -515,7 +513,7 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
515
513
|
return cachedDefaultModuleGraphOptions;
|
|
516
514
|
}
|
|
517
515
|
function resolveWxssHandlerOptions(options) {
|
|
518
|
-
const styleHandlerMajorVersion =
|
|
516
|
+
const styleHandlerMajorVersion = require_compiler.normalizeStyleHandlerMajorVersion(runtimeState.tailwindRuntime.majorVersion);
|
|
519
517
|
const majorVersion = styleHandlerMajorVersion ?? "unknown";
|
|
520
518
|
if (!options || Object.keys(options).length === 0) {
|
|
521
519
|
let cached = defaultStyleHandlerOptionsCache.get(majorVersion);
|
|
@@ -678,7 +676,7 @@ function createNativeGulpFrameworkPlugins(options = {}) {
|
|
|
678
676
|
/**
|
|
679
677
|
* @name weapp-tw-gulp
|
|
680
678
|
* @description Gulp 入口直接创建 native framework,具体 stream 组合由 frameworks/native 拥有。
|
|
681
|
-
* @link https://tw.
|
|
679
|
+
* @link https://tw.weapp.dev/docs/quick-start/frameworks/native
|
|
682
680
|
*/
|
|
683
681
|
function createPlugins(options = {}) {
|
|
684
682
|
return createNativeGulpFrameworkPlugins(options);
|
package/dist/gulp.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_gulp = require("./gulp-
|
|
2
|
+
const require_gulp = require("./gulp-CBu_waef.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
4
|
exports.createPlugins = require_gulp.createPlugins;
|
|
5
5
|
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPlugins } from "./gulp-
|
|
1
|
+
import { t as createPlugins } from "./gulp-BbMMp7vY.js";
|
|
2
2
|
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|