weapp-tailwindcss 5.0.0-next.2 → 5.0.0-next.21
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 +6 -7
- package/bin/weapp-tailwindcss.js +1 -21
- package/dist/bundle-state-BnV8o2Yn.js +530 -0
- package/dist/bundle-state-CLnuf2CW.mjs +414 -0
- package/dist/bundlers/shared/cache.d.ts +6 -6
- package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -4
- package/dist/bundlers/shared/css-imports.d.ts +3 -3
- package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +20 -0
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/markers.d.ts +28 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +14 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +24 -0
- package/dist/bundlers/shared/generator-css.d.ts +16 -22
- package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
- package/dist/bundlers/shared/style-requests.d.ts +2 -0
- package/dist/bundlers/vite/bundle-state.d.ts +1 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +7 -1
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +24 -0
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
- package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +14 -2
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
- package/dist/bundlers/vite/index.d.ts +1 -1
- package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
- package/dist/bundlers/vite/postcss-config.d.ts +6 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -3
- package/dist/bundlers/vite/runtime-class-set.d.ts +25 -0
- package/dist/bundlers/vite/source-candidates.d.ts +16 -1
- package/dist/bundlers/vite/source-scan.d.ts +26 -0
- package/dist/bundlers/vite/static-config-content.d.ts +5 -0
- package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +6 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +6 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +9 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -0
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
- package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -6
- package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
- package/dist/cache/index.d.ts +6 -6
- package/dist/cli/context.d.ts +1 -14
- package/dist/cli/doctor/types.d.ts +11 -11
- package/dist/cli/helpers.d.ts +1 -2
- package/dist/cli/mount-options.d.ts +2 -0
- package/dist/cli/types.d.ts +0 -2
- package/dist/cli/vscode-entry.d.ts +3 -3
- package/dist/cli.js +605 -611
- package/dist/cli.mjs +614 -620
- package/dist/constants.d.ts +1 -2
- package/dist/core.js +13 -20
- package/dist/core.mjs +8 -14
- package/dist/css-macro/postcss.js +3 -2
- package/dist/css-macro/postcss.mjs +3 -2
- package/dist/css-macro.d.ts +1 -0
- package/dist/css-macro.js +2 -2
- package/dist/css-macro.mjs +2 -2
- package/dist/defaults-B1igPF_e.mjs +150 -0
- package/dist/defaults-IHhYxNeU.js +193 -0
- package/dist/defaults.d.ts +15 -1
- package/dist/defaults.js +6 -131
- package/dist/defaults.mjs +2 -129
- package/dist/escape.js +10 -2
- package/dist/escape.mjs +10 -2
- package/dist/generator/index.d.ts +1 -1
- package/dist/generator/options.d.ts +9 -8
- package/dist/generator/types.d.ts +3 -3
- package/dist/generator-B4RNgMLx.js +55 -0
- package/dist/generator-DvyhmC76.mjs +32 -0
- package/dist/generator.js +12 -11
- package/dist/generator.mjs +2 -1
- package/dist/gulp.js +185 -47
- package/dist/gulp.mjs +179 -41
- package/dist/incremental-runtime-class-set-C7Q7fC5u.mjs +1863 -0
- package/dist/incremental-runtime-class-set-DZsbM0-a.js +1926 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +5 -5
- package/dist/js/babel/cache-options.d.ts +3 -0
- package/dist/js/babel/parse.d.ts +7 -4
- package/dist/js/index.d.ts +1 -0
- package/dist/js/literal-transform.d.ts +2 -0
- package/dist/js/precheck.d.ts +2 -2
- package/dist/logger-CZUxvJJD.mjs +2 -0
- package/dist/logger-EVNB9z7i.js +1 -0
- package/dist/postcss/config-directive.d.ts +1 -0
- package/dist/postcss/context.d.ts +9 -0
- package/dist/postcss/source-files.d.ts +8 -0
- package/dist/postcss/tailwind-version.d.ts +3 -0
- package/dist/postcss-CFa6-qO9.js +237 -0
- package/dist/postcss-Drpy7j-g.mjs +228 -0
- package/dist/postcss.d.ts +2 -2
- package/dist/postcss.js +3 -276
- package/dist/postcss.mjs +1 -269
- package/dist/{recorder-gYSNLfOP.js → precheck-8pQbjqpq.js} +218 -314
- package/dist/{recorder-zsgatmkB.mjs → precheck-D1O5AWzy.mjs} +186 -281
- package/dist/presets.js +13 -11
- package/dist/presets.mjs +11 -9
- package/dist/reset.d.ts +1 -0
- package/dist/runtime-registry-CdCV3Opt.js +5496 -0
- package/dist/shared/mpx.d.ts +1 -0
- package/dist/source-candidates-CUTNdsiz.js +222 -0
- package/dist/source-candidates-CnD4vyic.mjs +209 -0
- package/dist/tailwindcss/miniprogram.d.ts +1 -1
- package/dist/tailwindcss/patcher-options.d.ts +3 -51
- package/dist/tailwindcss/patcher.d.ts +1 -2
- package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
- package/dist/tailwindcss/runtime/cache.d.ts +4 -3
- package/dist/tailwindcss/runtime-patch.d.ts +5 -0
- package/dist/tailwindcss/runtime.d.ts +11 -12
- package/dist/tailwindcss/source-scan.d.ts +35 -0
- package/dist/tailwindcss/targets.d.ts +1 -5
- package/dist/tailwindcss/v3-engine/types.d.ts +17 -14
- package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
- package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
- package/dist/tailwindcss/v4/patcher-options.d.ts +1 -23
- package/dist/tailwindcss/v4/patcher.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/types.d.ts +17 -5
- package/dist/tailwindcss/version.d.ts +4 -0
- package/dist/tailwindcss-B_JAdOQf.mjs +600 -0
- package/dist/tailwindcss-whZE3HpL.js +651 -0
- package/dist/typedoc.export.d.ts +0 -2
- package/dist/types/index.d.ts +51 -48
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/user-defined-options/general.d.ts +23 -23
- package/dist/types/user-defined-options/important.d.ts +31 -28
- package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
- package/dist/types/user-defined-options/matcher.d.ts +6 -6
- package/dist/uni-app-x/vite.d.ts +1 -1
- package/dist/utils/disabled.d.ts +2 -3
- package/dist/utils/object.d.ts +9 -0
- package/dist/{utils-DmC9_In3.js → utils-4ODFyoqD.js} +1 -1
- package/dist/{utils-7DUGTFED.mjs → utils-CGBVVNm6.mjs} +1 -1
- package/dist/v3-engine-CCwvhRrQ.js +3473 -0
- package/dist/v3-engine-DyIcbpZm.mjs +3190 -0
- package/dist/{vite-CrlzCNqz.mjs → vite-B8IiXgVD.mjs} +1256 -1088
- package/dist/vite-BcnwgJMt.js +2368 -0
- package/dist/vite.d.ts +1 -2
- package/dist/vite.js +3 -4
- package/dist/vite.mjs +2 -2
- package/dist/weapp-tw-css-import-rewrite-loader.js +4533 -16
- package/dist/weapp-tw-runtime-classset-loader.js +33 -7
- package/dist/webpack-C4zI624R.js +846 -0
- package/dist/webpack-DTkshAtp.mjs +836 -0
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +27 -37
- package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-assets.d.ts +0 -14
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-loaders.d.ts +0 -15
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -9
- package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
- package/dist/cli/config.d.ts +0 -5
- package/dist/cli/helpers/patch-cwd.d.ts +0 -1
- package/dist/cli/mount-options/patch-status.d.ts +0 -2
- package/dist/cli/patch-options.d.ts +0 -6
- package/dist/cli/tokens.d.ts +0 -4
- package/dist/cli/workspace/package-dirs.d.ts +0 -3
- package/dist/cli/workspace/patch-package.d.ts +0 -3
- package/dist/cli/workspace/patch-utils.d.ts +0 -3
- package/dist/cli/workspace/types.d.ts +0 -11
- package/dist/cli/workspace/workspace-globs.d.ts +0 -2
- package/dist/cli/workspace/workspace-io.d.ts +0 -1
- package/dist/cli/workspace/workspace-lock.d.ts +0 -1
- package/dist/cli/workspace.d.ts +0 -2
- package/dist/css-imports-BbrbluP9.js +0 -177
- package/dist/css-imports-CSdPq_Sc.mjs +0 -128
- package/dist/experimental/index.d.ts +0 -2
- package/dist/experimental/oxc/ast-utils.d.ts +0 -30
- package/dist/experimental/oxc/index.d.ts +0 -2
- package/dist/experimental/oxc/module-specifiers.d.ts +0 -2
- package/dist/experimental/shared/cache.d.ts +0 -3
- package/dist/experimental/shared/transform.d.ts +0 -3
- package/dist/experimental/shared.d.ts +0 -8
- package/dist/experimental/swc/ast-utils.d.ts +0 -30
- package/dist/experimental/swc/index.d.ts +0 -2
- package/dist/experimental/swc/module-specifiers.d.ts +0 -2
- package/dist/generator-Y-Ikv4Fu.mjs +0 -1177
- package/dist/generator-css-B5ejWUMv.mjs +0 -1098
- package/dist/generator-css-D3OdPRiS.js +0 -1125
- package/dist/generator-mmhXzZnv.js +0 -1276
- package/dist/js/syntax.d.ts +0 -10
- package/dist/lightningcss/index.d.ts +0 -8
- package/dist/lightningcss/style-handler/options.d.ts +0 -3
- package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
- package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
- package/dist/lightningcss/style-handler.d.ts +0 -17
- package/dist/loader-anchors-CNkWT8hx.js +0 -273
- package/dist/loader-anchors-TrU7EUr7.mjs +0 -205
- package/dist/logger-BZ45DZJT.js +0 -1003
- package/dist/logger-BoVx1Dbt.mjs +0 -935
- package/dist/patcher-options-6gJN2EXy.js +0 -115
- package/dist/patcher-options-DQfR5xxT.mjs +0 -92
- package/dist/tailwindcss/recorder.d.ts +0 -13
- package/dist/tailwindcss/targets/paths.d.ts +0 -13
- package/dist/tailwindcss/targets/record-io.d.ts +0 -5
- package/dist/tailwindcss/targets/recorder.d.ts +0 -3
- package/dist/tailwindcss/targets/types.d.ts +0 -35
- package/dist/types/disabled-options.d.ts +0 -4
- package/dist/vite-BC9U7ahn.js +0 -2199
- package/dist/webpack-Bu6M-Hbw.mjs +0 -441
- package/dist/webpack-DD7A6V0u.js +0 -456
- package/dist/webpack4.d.ts +0 -4
- package/dist/webpack4.js +0 -387
- package/dist/webpack4.mjs +0 -379
- package/scripts/postinstall.mjs +0 -59
- /package/dist/{constants-B-_T5UnW.mjs → constants-BG12WAKw.mjs} +0 -0
- /package/dist/{constants-p1dyh1x1.js → constants-BeeyfJ9k.js} +0 -0
package/dist/presets.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CCwvhRrQ.js");
|
|
4
|
+
const require_utils = require("./utils-4ODFyoqD.js");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-whZE3HpL.js");
|
|
6
|
+
require("./logger-EVNB9z7i.js");
|
|
5
7
|
let node_process = require("node:process");
|
|
6
8
|
node_process = require_chunk.__toESM(node_process);
|
|
7
9
|
let local_pkg = require("local-pkg");
|
|
@@ -15,15 +17,15 @@ function normalizeCssEntries(entries) {
|
|
|
15
17
|
}
|
|
16
18
|
function createBasePreset(options = {}) {
|
|
17
19
|
const { base, cssEntries, resolve, rawOptions, ...userOptions } = options;
|
|
18
|
-
const baseDir =
|
|
20
|
+
const baseDir = require_tailwindcss.resolveTailwindcssBasedir(base);
|
|
19
21
|
const normalizedCssEntries = normalizeCssEntries(cssEntries);
|
|
20
22
|
const tailwindConfig = {
|
|
21
23
|
v2: { cwd: baseDir },
|
|
22
24
|
v3: { cwd: baseDir },
|
|
23
|
-
v4: {
|
|
25
|
+
v4: require_v3_engine.omitUndefined({
|
|
24
26
|
base: baseDir,
|
|
25
27
|
cssEntries: normalizedCssEntries
|
|
26
|
-
}
|
|
28
|
+
})
|
|
27
29
|
};
|
|
28
30
|
if (normalizedCssEntries && normalizedCssEntries.length > 0) tailwindConfig.version = 4;
|
|
29
31
|
const preset = {
|
|
@@ -42,7 +44,7 @@ function createBasePreset(options = {}) {
|
|
|
42
44
|
//#endregion
|
|
43
45
|
//#region src/presets/uni-app.ts
|
|
44
46
|
function uniApp(options = {}) {
|
|
45
|
-
const uniPlatform = node_process.default.env
|
|
47
|
+
const uniPlatform = node_process.default.env["UNI_PLATFORM"];
|
|
46
48
|
return createBasePreset({
|
|
47
49
|
disabled: uniPlatform === "h5" || uniPlatform === "app" || uniPlatform === "app-plus" ? true : void 0,
|
|
48
50
|
...options
|
|
@@ -79,15 +81,15 @@ function resolveInstalledTailwindDefaults(resolve) {
|
|
|
79
81
|
};
|
|
80
82
|
}
|
|
81
83
|
function uniAppX(options) {
|
|
82
|
-
_weapp_tailwindcss_logger.logger.info(`UNI_PLATFORM: ${node_process.default.env
|
|
84
|
+
_weapp_tailwindcss_logger.logger.info(`UNI_PLATFORM: ${node_process.default.env["UNI_PLATFORM"]}`);
|
|
83
85
|
const utsPlatform = require_utils.resolveUniUtsPlatform();
|
|
84
|
-
const uniPlatform = require_utils.resolveUniUtsPlatform(node_process.default.env
|
|
86
|
+
const uniPlatform = require_utils.resolveUniUtsPlatform(node_process.default.env["UNI_PLATFORM"]);
|
|
85
87
|
_weapp_tailwindcss_logger.logger.info(`UNI_UTS_PLATFORM: ${utsPlatform.raw ?? "undefined"}`);
|
|
86
88
|
const isApp = utsPlatform.isApp || uniPlatform.isApp;
|
|
87
89
|
const cssEntries = normalizeCssEntries(options.cssEntries);
|
|
88
90
|
const resolvedResolve = resolveTailwindResolveOptions(options.base, options.resolve);
|
|
89
91
|
const installedTailwindDefaults = resolveInstalledTailwindDefaults(resolvedResolve);
|
|
90
|
-
const resolvedUniAppX =
|
|
92
|
+
const resolvedUniAppX = require_tailwindcss.resolveUniAppXOptions({
|
|
91
93
|
enabled: isApp,
|
|
92
94
|
componentLocalStyles: options.componentLocalStyles ?? true,
|
|
93
95
|
uvueUnsupported: options.uvueUnsupported,
|
|
@@ -107,10 +109,10 @@ function uniAppX(options) {
|
|
|
107
109
|
cwd: options.base,
|
|
108
110
|
resolve: resolvedResolve,
|
|
109
111
|
v3: { cwd: options.base },
|
|
110
|
-
v4: {
|
|
112
|
+
v4: require_v3_engine.omitUndefined({
|
|
111
113
|
base: options.base,
|
|
112
114
|
cssEntries
|
|
113
|
-
}
|
|
115
|
+
})
|
|
114
116
|
}
|
|
115
117
|
},
|
|
116
118
|
tailwindcss: {
|
package/dist/presets.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { G as omitUndefined } from "./v3-engine-DyIcbpZm.mjs";
|
|
2
|
+
import { n as defuOverrideArray, o as resolveUniUtsPlatform } from "./utils-CGBVVNm6.mjs";
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-B_JAdOQf.mjs";
|
|
4
|
+
import { t as logger } from "./logger-CZUxvJJD.mjs";
|
|
3
5
|
import process from "node:process";
|
|
4
6
|
import { getPackageInfoSync } from "local-pkg";
|
|
5
7
|
//#region src/presets/shared.ts
|
|
@@ -15,10 +17,10 @@ function createBasePreset(options = {}) {
|
|
|
15
17
|
const tailwindConfig = {
|
|
16
18
|
v2: { cwd: baseDir },
|
|
17
19
|
v3: { cwd: baseDir },
|
|
18
|
-
v4: {
|
|
20
|
+
v4: omitUndefined({
|
|
19
21
|
base: baseDir,
|
|
20
22
|
cssEntries: normalizedCssEntries
|
|
21
|
-
}
|
|
23
|
+
})
|
|
22
24
|
};
|
|
23
25
|
if (normalizedCssEntries && normalizedCssEntries.length > 0) tailwindConfig.version = 4;
|
|
24
26
|
const preset = {
|
|
@@ -37,7 +39,7 @@ function createBasePreset(options = {}) {
|
|
|
37
39
|
//#endregion
|
|
38
40
|
//#region src/presets/uni-app.ts
|
|
39
41
|
function uniApp(options = {}) {
|
|
40
|
-
const uniPlatform = process.env
|
|
42
|
+
const uniPlatform = process.env["UNI_PLATFORM"];
|
|
41
43
|
return createBasePreset({
|
|
42
44
|
disabled: uniPlatform === "h5" || uniPlatform === "app" || uniPlatform === "app-plus" ? true : void 0,
|
|
43
45
|
...options
|
|
@@ -74,9 +76,9 @@ function resolveInstalledTailwindDefaults(resolve) {
|
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
78
|
function uniAppX(options) {
|
|
77
|
-
logger.info(`UNI_PLATFORM: ${process.env
|
|
79
|
+
logger.info(`UNI_PLATFORM: ${process.env["UNI_PLATFORM"]}`);
|
|
78
80
|
const utsPlatform = resolveUniUtsPlatform();
|
|
79
|
-
const uniPlatform = resolveUniUtsPlatform(process.env
|
|
81
|
+
const uniPlatform = resolveUniUtsPlatform(process.env["UNI_PLATFORM"]);
|
|
80
82
|
logger.info(`UNI_UTS_PLATFORM: ${utsPlatform.raw ?? "undefined"}`);
|
|
81
83
|
const isApp = utsPlatform.isApp || uniPlatform.isApp;
|
|
82
84
|
const cssEntries = normalizeCssEntries(options.cssEntries);
|
|
@@ -102,10 +104,10 @@ function uniAppX(options) {
|
|
|
102
104
|
cwd: options.base,
|
|
103
105
|
resolve: resolvedResolve,
|
|
104
106
|
v3: { cwd: options.base },
|
|
105
|
-
v4: {
|
|
107
|
+
v4: omitUndefined({
|
|
106
108
|
base: options.base,
|
|
107
109
|
cssEntries
|
|
108
|
-
}
|
|
110
|
+
})
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
113
|
tailwindcss: {
|
package/dist/reset.d.ts
CHANGED