weapp-tailwindcss 5.0.0-next.9 → 5.0.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 +2 -2
- package/dist/auto-DEHRmEAx.mjs +200 -0
- package/dist/auto-dPpsm6FB.js +238 -0
- package/dist/bundle-state-CBF5YX1m.js +529 -0
- package/dist/bundle-state-CQmxxx0R.mjs +413 -0
- package/dist/bundlers/shared/cache.d.ts +9 -7
- package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -2
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -3
- 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/directives.d.ts +11 -3
- package/dist/bundlers/shared/generator-css/markers.d.ts +12 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +9 -6
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +16 -2
- package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +10 -0
- package/dist/bundlers/shared/generator-css.d.ts +6 -2
- 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 +6 -0
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +5 -1
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +13 -1
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +10 -2
- package/dist/bundlers/vite/index.d.ts +5 -2
- package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -5
- package/dist/bundlers/vite/runtime-class-set.d.ts +5 -1
- package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
- package/dist/bundlers/vite/source-candidates.d.ts +24 -2
- package/dist/bundlers/vite/source-scan.d.ts +26 -0
- package/dist/bundlers/vite/static-config-content.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +5 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +8 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- 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 -8
- package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
- package/dist/cache/index.d.ts +6 -6
- package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
- package/dist/cli/context.d.ts +1 -11
- package/dist/cli/doctor/types.d.ts +11 -11
- package/dist/cli/vscode-entry.d.ts +3 -3
- package/dist/cli.js +684 -41
- package/dist/cli.mjs +682 -40
- package/dist/context/runtime-package-replacements.d.ts +2 -0
- package/dist/context/style-options.d.ts +3 -0
- package/dist/context/tailwindcss.d.ts +1 -1
- package/dist/core.js +1 -2
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +11 -0
- package/dist/css-macro/constants.d.ts +5 -2
- package/dist/css-macro/postcss.d.ts +1 -0
- package/dist/css-macro/postcss.js +7 -46
- package/dist/css-macro/postcss.mjs +2 -46
- package/dist/css-macro.js +16 -7
- package/dist/css-macro.mjs +15 -6
- package/dist/defaults-8xrgzxFY.mjs +151 -0
- package/dist/defaults-zKUH2mDe.js +193 -0
- package/dist/defaults.js +6 -150
- package/dist/defaults.mjs +1 -143
- package/dist/escape.js +10 -2
- package/dist/escape.mjs +10 -2
- package/dist/generator/options.d.ts +11 -6
- package/dist/generator/types.d.ts +3 -3
- package/dist/generator-CvmsIQFI.js +92 -0
- package/dist/generator-DDtsUvkH.mjs +67 -0
- package/dist/generator.js +12 -12
- package/dist/generator.mjs +2 -1
- package/dist/gulp.js +163 -40
- package/dist/gulp.mjs +155 -32
- package/dist/incremental-runtime-class-set-BffodqHh.js +2366 -0
- package/dist/incremental-runtime-class-set-DArodvWs.mjs +2291 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -5
- package/dist/index.mjs +6 -5
- package/dist/js/babel/cache-options.d.ts +3 -0
- package/dist/js/babel/parse.d.ts +7 -4
- package/dist/js/precheck.d.ts +2 -2
- package/dist/js/replacement-cache.d.ts +5 -0
- package/dist/{postcss-w48mGIhe.mjs → postcss-BzNYQUOH.mjs} +54 -114
- package/dist/postcss-C7BMYpEF.mjs +169 -0
- package/dist/postcss-CiYLsqZn.js +192 -0
- package/dist/{postcss-QIXwT40c.js → postcss-DE0TOtV9.js} +60 -121
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/precheck-BzYPm-EG.js +4842 -0
- package/dist/precheck-jZvTVXXG.mjs +4716 -0
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/uni-app-x.d.ts +1 -0
- package/dist/presets.js +27 -13
- package/dist/presets.mjs +25 -13
- package/dist/reset.js +1 -1
- package/dist/runtime-registry-DpcR3IHI.js +5496 -0
- package/dist/shared/mpx.d.ts +1 -0
- package/dist/source-candidates-BuTlMabx.mjs +322 -0
- package/dist/source-candidates-CxoIaS88.js +335 -0
- package/dist/tailwindcss/miniprogram.d.ts +1 -5
- package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
- package/dist/tailwindcss/runtime/cache.d.ts +4 -3
- package/dist/tailwindcss/runtime.d.ts +9 -9
- package/dist/tailwindcss/source-scan.d.ts +35 -0
- package/dist/tailwindcss/v3-engine/types.d.ts +19 -14
- package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
- package/dist/tailwindcss/v4/patcher.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/types.d.ts +18 -5
- package/dist/{tailwindcss-C5IgPlQ0.mjs → tailwindcss-CCZcu0lr.mjs} +75 -98
- package/dist/{tailwindcss-Bu-RWIHx.js → tailwindcss-DZckITp1.js} +83 -106
- package/dist/typedoc.export.d.ts +1 -1
- package/dist/types/index.d.ts +51 -41
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/typedoc-tailwindcss-patch.d.ts +67 -0
- package/dist/types/user-defined-options/general.d.ts +25 -22
- package/dist/types/user-defined-options/important.d.ts +32 -27
- package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
- package/dist/types/user-defined-options/matcher.d.ts +6 -6
- package/dist/unocss/index.d.ts +2 -0
- package/dist/utils/object.d.ts +9 -0
- package/dist/utils/options.d.ts +2 -0
- package/dist/utils/regex.d.ts +1 -0
- package/dist/{utils-BiShvil9.js → utils-D7Ygohep.js} +2 -2
- package/dist/{utils-Btw1iOVV.mjs → utils-DsaS975I.mjs} +1 -1
- package/dist/v3-engine-DGBhUnjn.mjs +3419 -0
- package/dist/v3-engine-M6Aqru5T.js +3714 -0
- package/dist/vite-BBcQIJpD.mjs +24493 -0
- package/dist/vite-DgRkWVPG.js +24507 -0
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +5456 -22
- package/dist/weapp-tw-runtime-classset-loader.js +32 -9
- package/dist/{webpack-BzN2ly34.js → webpack-D-gb4ZvO.js} +341 -96
- package/dist/{webpack-DJazm5sT.mjs → webpack-D43aMQzO.mjs} +323 -79
- package/dist/webpack.d.ts +1 -3
- package/dist/webpack.js +3 -4
- package/dist/webpack.mjs +2 -2
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -4
- package/package.json +22 -20
- package/dist/bundlers/shared/css-cleanup/color-gamut.d.ts +0 -3
- package/dist/bundlers/shared/css-cleanup/root-cleanups.d.ts +0 -4
- package/dist/bundlers/shared/css-cleanup/selectors.d.ts +0 -8
- package/dist/cache-BVAiJV3J.js +0 -502
- package/dist/cache-CHs4DXui.mjs +0 -434
- package/dist/constants-BoB_6lFw.js +0 -73
- package/dist/constants-E_loJC49.mjs +0 -44
- package/dist/generator-DKkhJbOg.js +0 -1531
- package/dist/generator-UBmfduYg.mjs +0 -1432
- package/dist/generator-css-Bwp3nbrl.js +0 -1381
- package/dist/generator-css-DeLLmp2N.mjs +0 -1342
- 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/precheck-B32p-gLI.js +0 -2736
- package/dist/precheck-B4RH6ZNN.mjs +0 -2622
- package/dist/run-tasks-B50A3pxt.js +0 -128
- package/dist/run-tasks-DdNi-hkk.mjs +0 -91
- package/dist/runtime-patch-CwN5ya72.mjs +0 -71
- package/dist/runtime-patch-D6mBo_KB.js +0 -85
- package/dist/vite-By5KQi9s.js +0 -2419
- package/dist/vite-Cyp42bBf.mjs +0 -2406
- /package/dist/{logger-Bub1jggA.mjs → logger-BNzxZbZj.mjs} +0 -0
- /package/dist/{logger-BRy6XPQ2.js → logger-TlKT3xmR.js} +0 -0
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import type { CssCalcOptions, CssPreflightOptions, PresetEnvOptions, Px2rpxOptions, Rem2rpxOptions, UniAppXUnsupportedMode, UnitsToPxOptions, WeappAutoprefixerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
1
|
+
import type { CssCalcOptions, CssPreflightOptions, IStyleHandlerOptions, PresetEnvOptions, Px2rpxOptions, Rem2rpxOptions, UniAppXUnsupportedMode, UnitConversionOptions, UnitsToPxOptions, WeappAutoprefixerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { TailwindCssPatchOptions } from 'tailwindcss-patch';
|
|
3
3
|
import type { ICustomAttributes } from '../shared';
|
|
4
4
|
export interface UniAppXComponentLocalStylesOptions {
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
onlyWhenStyleIsolationVersion2?: boolean;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
onlyWhenStyleIsolationVersion2?: boolean | undefined;
|
|
7
7
|
}
|
|
8
8
|
export interface UniAppXOptions {
|
|
9
|
-
enabled?: boolean;
|
|
10
|
-
componentLocalStyles?: boolean | UniAppXComponentLocalStylesOptions;
|
|
11
|
-
uvueUnsupported?: UniAppXUnsupportedMode;
|
|
9
|
+
enabled?: boolean | undefined;
|
|
10
|
+
componentLocalStyles?: boolean | UniAppXComponentLocalStylesOptions | undefined;
|
|
11
|
+
uvueUnsupported?: UniAppXUnsupportedMode | undefined;
|
|
12
12
|
}
|
|
13
13
|
export interface UserDefinedOptionsImportantPart {
|
|
14
14
|
disabled?: boolean | {
|
|
15
|
-
plugin?: boolean;
|
|
16
|
-
};
|
|
17
|
-
customAttributes?: ICustomAttributes;
|
|
18
|
-
customReplaceDictionary?: Record<string, string
|
|
19
|
-
ignoreTaggedTemplateExpressionIdentifiers?: (string | RegExp)[];
|
|
20
|
-
ignoreCallExpressionIdentifiers?: (string | RegExp)[];
|
|
21
|
-
cssPreflight?: CssPreflightOptions;
|
|
22
|
-
cssPreflightRange?: 'all';
|
|
23
|
-
cssCalc?: boolean | CssCalcOptions | (string | RegExp)[];
|
|
24
|
-
injectAdditionalCssVarScope?: boolean;
|
|
15
|
+
plugin?: boolean | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
customAttributes?: ICustomAttributes | undefined;
|
|
18
|
+
customReplaceDictionary?: Record<string, string> | undefined;
|
|
19
|
+
ignoreTaggedTemplateExpressionIdentifiers?: (string | RegExp)[] | undefined;
|
|
20
|
+
ignoreCallExpressionIdentifiers?: (string | RegExp)[] | undefined;
|
|
21
|
+
cssPreflight?: CssPreflightOptions | undefined;
|
|
22
|
+
cssPreflightRange?: 'all' | undefined;
|
|
23
|
+
cssCalc?: boolean | CssCalcOptions | (string | RegExp)[] | undefined;
|
|
24
|
+
injectAdditionalCssVarScope?: boolean | undefined;
|
|
25
25
|
cssSelectorReplacement?: {
|
|
26
|
-
root?: string | string[] | false;
|
|
27
|
-
universal?: string | string[] | false;
|
|
28
|
-
};
|
|
29
|
-
rem2rpx?: boolean | Rem2rpxOptions;
|
|
30
|
-
px2rpx?: boolean | Px2rpxOptions;
|
|
31
|
-
unitsToPx?: boolean | UnitsToPxOptions;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
root?: string | string[] | false | undefined;
|
|
27
|
+
universal?: string | string[] | false | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
rem2rpx?: boolean | Rem2rpxOptions | undefined;
|
|
30
|
+
px2rpx?: boolean | Px2rpxOptions | undefined;
|
|
31
|
+
unitsToPx?: boolean | UnitsToPxOptions | undefined;
|
|
32
|
+
platform?: IStyleHandlerOptions['platform'] | undefined;
|
|
33
|
+
unitConversion?: UnitConversionOptions | undefined;
|
|
34
|
+
cssPresetEnv?: PresetEnvOptions | undefined;
|
|
35
|
+
atRules?: IStyleHandlerOptions['atRules'] | undefined;
|
|
36
|
+
autoprefixer?: WeappAutoprefixerOptions | undefined;
|
|
37
|
+
tailwindcss?: TailwindCssPatchOptions['tailwindcss'] | undefined;
|
|
38
|
+
cssEntries?: string[] | undefined;
|
|
39
|
+
uniAppX?: boolean | UniAppXOptions | undefined;
|
|
40
|
+
uniAppXCssTarget?: IStyleHandlerOptions['uniAppXCssTarget'] | undefined;
|
|
41
|
+
uniAppXUnsupported?: IStyleHandlerOptions['uniAppXUnsupported'] | undefined;
|
|
37
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface UserDefinedOptionsLifecyclePart {
|
|
2
|
-
onLoad?: () => void;
|
|
3
|
-
onStart?: () => void;
|
|
4
|
-
onUpdate?: (filename: string, oldVal: string, newVal: string) => void;
|
|
5
|
-
onEnd?: () => void;
|
|
2
|
+
onLoad?: (() => void) | undefined;
|
|
3
|
+
onStart?: (() => void) | undefined;
|
|
4
|
+
onUpdate?: ((filename: string, oldVal: string, newVal: string) => void) | undefined;
|
|
5
|
+
onEnd?: (() => void) | undefined;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AppType } from '../shared';
|
|
2
2
|
export interface UserDefinedOptionsMatcherPart {
|
|
3
|
-
htmlMatcher?: (name: string) => boolean;
|
|
4
|
-
cssMatcher?: (name: string) => boolean;
|
|
5
|
-
jsMatcher?: (name: string) => boolean;
|
|
6
|
-
mainCssChunkMatcher?: (name: string, appType?: AppType) => boolean;
|
|
7
|
-
wxsMatcher?: (name: string) => boolean;
|
|
8
|
-
inlineWxs?: boolean;
|
|
3
|
+
htmlMatcher?: ((name: string) => boolean) | undefined;
|
|
4
|
+
cssMatcher?: ((name: string) => boolean) | undefined;
|
|
5
|
+
jsMatcher?: ((name: string) => boolean) | undefined;
|
|
6
|
+
mainCssChunkMatcher?: ((name: string, appType?: AppType) => boolean) | undefined;
|
|
7
|
+
wxsMatcher?: ((name: string) => boolean) | undefined;
|
|
8
|
+
inlineWxs?: boolean | undefined;
|
|
9
9
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type DefinedEntry<T extends object> = {
|
|
2
|
+
[K in keyof T]: undefined extends T[K] ? [K, Exclude<T[K], undefined>] : [K, T[K]];
|
|
3
|
+
}[keyof T];
|
|
4
|
+
export type UndefinedOptional<T extends object> = {
|
|
5
|
+
[K in keyof T]?: T[K] | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare function definedEntries<T extends object>(value: UndefinedOptional<T>): DefinedEntry<T>[];
|
|
8
|
+
export declare function omitUndefined<T extends object>(value: UndefinedOptional<T>): Partial<T>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function escapeStringRegexp(str: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-
|
|
1
|
+
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
2
|
let node_process = require("node:process");
|
|
3
3
|
node_process = require_chunk.__toESM(node_process);
|
|
4
4
|
require("@weapp-tailwindcss/shared");
|
|
@@ -6,7 +6,7 @@ require("@weapp-tailwindcss/shared");
|
|
|
6
6
|
function normalizePlatform(value) {
|
|
7
7
|
return value?.trim().toLowerCase() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function resolveUniUtsPlatform(value = node_process.default.env
|
|
9
|
+
function resolveUniUtsPlatform(value = node_process.default.env["UNI_UTS_PLATFORM"]) {
|
|
10
10
|
const normalized = normalizePlatform(value);
|
|
11
11
|
const isAppAndroid = normalized === "app-android";
|
|
12
12
|
const isAppIos = normalized === "app-ios";
|
|
@@ -4,7 +4,7 @@ import { defu, defuOverrideArray as defuOverrideArray$1, isMap, noop } from "@we
|
|
|
4
4
|
function normalizePlatform(value) {
|
|
5
5
|
return value?.trim().toLowerCase() || void 0;
|
|
6
6
|
}
|
|
7
|
-
function resolveUniUtsPlatform(value = process.env
|
|
7
|
+
function resolveUniUtsPlatform(value = process.env["UNI_UTS_PLATFORM"]) {
|
|
8
8
|
const normalized = normalizePlatform(value);
|
|
9
9
|
const isAppAndroid = normalized === "app-android";
|
|
10
10
|
const isAppIos = normalized === "app-ios";
|