weapp-tailwindcss 5.0.0-next.24 → 5.0.0-next.26
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/auto-CqyEtds4.js +115 -0
- package/dist/auto-CsWz6lsU.mjs +78 -0
- package/dist/{bundle-state-CP_BWXfx.mjs → bundle-state-CWcrb3mH.mjs} +1 -2
- package/dist/{bundle-state-DXFq2nEo.js → bundle-state-uCtqRm0p.js} +2 -3
- package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
- package/dist/cli.js +167 -6
- package/dist/cli.mjs +166 -5
- package/dist/context/runtime-package-replacements.d.ts +2 -0
- package/dist/context/style-options.d.ts +3 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +10 -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 -47
- package/dist/css-macro/postcss.mjs +2 -47
- package/dist/css-macro.js +15 -6
- package/dist/css-macro.mjs +15 -6
- package/dist/{defaults-C6sIKXgC.mjs → defaults-B-1EEhdL.mjs} +2 -1
- package/dist/{defaults-D3cFX6Cq.js → defaults-C10hYUch.js} +2 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-BcH28HU-.js → generator-BH6a0xuB.js} +1 -1
- package/dist/{generator-DdEgn8nG.mjs → generator-iI_265gt.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +5 -5
- package/dist/gulp.mjs +5 -5
- package/dist/{incremental-runtime-class-set-Bux7viee.mjs → incremental-runtime-class-set-ECHyKwUL.mjs} +4 -16
- package/dist/{incremental-runtime-class-set-CWdfLHON.js → incremental-runtime-class-set-mY0v1k-Y.js} +4 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -4
- package/dist/index.mjs +6 -5
- package/dist/postcss-BwW8zO24.js +192 -0
- package/dist/postcss-BzaRjBL0.mjs +169 -0
- package/dist/{postcss-cD5PXmMU.js → postcss-DEEAZ8J5.js} +2 -2
- package/dist/{postcss-nk5bhdoV.mjs → postcss-DJoU--Z-.mjs} +2 -2
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/precheck-BI8oBeUg.mjs +4692 -0
- package/dist/{precheck-DtYqujIx.js → precheck-DLJg0_pu.js} +2070 -34
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/uni-app-x.d.ts +1 -0
- package/dist/presets.js +19 -5
- package/dist/presets.mjs +18 -6
- package/dist/{source-candidates-B7wmEa-G.mjs → source-candidates-DkScNh9A.mjs} +1 -1
- package/dist/{source-candidates-lHtAHLQq.js → source-candidates-mfvC9gMc.js} +1 -1
- package/dist/{tailwindcss-BtUBeOes.js → tailwindcss-Cm93idme.js} +17 -26
- package/dist/{tailwindcss-DO-VVR5k.mjs → tailwindcss-DFa5Yes8.mjs} +17 -26
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/user-defined-options/general.d.ts +2 -1
- package/dist/types/user-defined-options/important.d.ts +3 -1
- package/dist/unocss/index.d.ts +2 -0
- package/dist/utils/options.d.ts +2 -0
- package/dist/utils/regex.d.ts +1 -0
- package/dist/{v3-engine-vHlppqaZ.js → v3-engine-CGsbY81C.js} +67 -19
- package/dist/{v3-engine-CXqgQZUc.mjs → v3-engine-CPJ9uGyr.mjs} +56 -20
- package/dist/{vite-BkNDGBZ2.js → vite-BM_ksf1q.js} +140 -21
- package/dist/{vite-BthAm8kt.mjs → vite-CqEF-Wx5.mjs} +140 -21
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +327 -73
- package/dist/weapp-tw-runtime-classset-loader.js +1 -4
- package/dist/{webpack-prCus5xn.js → webpack-CfcuDhQ8.js} +10 -7
- package/dist/{webpack-hPc8wUAi.mjs → webpack-D--XZMBB.mjs} +11 -8
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +14 -14
- package/dist/constants-BG12WAKw.mjs +0 -44
- package/dist/constants-BeeyfJ9k.js +0 -73
- package/dist/precheck-DreRGvYH.mjs +0 -2668
- /package/dist/{logger-EVNB9z7i.js → logger-Cdzl3p8j.js} +0 -0
- /package/dist/{logger-CZUxvJJD.mjs → logger-Dr7IvyH2.mjs} +0 -0
- /package/dist/{utils-CGBVVNm6.mjs → utils-B2SJgA1L.mjs} +0 -0
- /package/dist/{utils-4ODFyoqD.js → utils-CSA174-I.js} +0 -0
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-BI8oBeUg.mjs";
|
|
2
2
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
3
3
|
//#region src/core.ts
|
|
4
4
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
export declare const CSS_MACRO_PLUGIN_MARKER = "__weappTailwindcssCssMacro";
|
|
3
|
+
export declare const CSS_MACRO_STYLE_OPTIONS_MARKER = "__weappTailwindcssCssMacroEnabled";
|
|
4
|
+
export declare function markCssMacroPlugin<T extends object>(value: T): T;
|
|
5
|
+
export declare function isCssMacroTailwindPlugin(value: unknown): boolean;
|
|
6
|
+
export declare function hasCssMacroTailwindPlugin(plugins: unknown): boolean;
|
|
7
|
+
export declare function hasCssMacroTailwindV4Directive(css: string | undefined): boolean;
|
|
8
|
+
export declare function withCssMacroStyleOptions(options: Partial<IStyleHandlerOptions> | undefined): Partial<IStyleHandlerOptions>;
|
|
9
|
+
export declare function hasCssMacroStyleOptions(options: Partial<IStyleHandlerOptions> | undefined): boolean;
|
|
10
|
+
export declare function transformCssMacroCss(css: string): Promise<string>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const uniAppPlatform: string[];
|
|
2
2
|
export declare const queryKey = "weapp-tw-platform";
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
3
|
+
export declare const ifdefAtRule = "weapp-tw-ifdef";
|
|
4
|
+
export declare const ifndefAtRule = "weapp-tw-ifndef";
|
|
5
|
+
export declare function createConditionalAtRule(value: string): string;
|
|
6
|
+
export declare function createNegativeConditionalAtRule(value: string): string;
|
|
5
7
|
export declare function normalComment(text: string): string;
|
|
6
8
|
export declare function ifdef(text: string): {
|
|
7
9
|
start: string;
|
|
@@ -12,3 +14,4 @@ export declare function ifndef(text: string): {
|
|
|
12
14
|
end: string;
|
|
13
15
|
};
|
|
14
16
|
export declare function matchCustomPropertyFromValue(str: string, cb: (arr: RegExpExecArray, index: number) => void): void;
|
|
17
|
+
export declare function parseConditionalAtRuleParam(params: string): string;
|
|
@@ -1,47 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
AtRule(atRule, helper) {
|
|
10
|
-
if (atRule.name === "media") {
|
|
11
|
-
const values = [];
|
|
12
|
-
require_constants.matchCustomPropertyFromValue(atRule.params, (arr) => {
|
|
13
|
-
const value = arr[1];
|
|
14
|
-
if (value) values.push(value);
|
|
15
|
-
});
|
|
16
|
-
if (values.length > 0) {
|
|
17
|
-
const isNegative = atRule.params.includes("not");
|
|
18
|
-
const text = values.join(" ");
|
|
19
|
-
const comment = isNegative ? require_constants.ifndef(text) : require_constants.ifdef(text);
|
|
20
|
-
const nextNodes = [
|
|
21
|
-
helper.comment({
|
|
22
|
-
raws: { before: "\n" },
|
|
23
|
-
text: comment.start
|
|
24
|
-
}),
|
|
25
|
-
...(atRule.nodes ?? []).map((node) => node.clone()),
|
|
26
|
-
helper.comment({
|
|
27
|
-
raws: { before: "\n" },
|
|
28
|
-
text: comment.end
|
|
29
|
-
})
|
|
30
|
-
];
|
|
31
|
-
atRule.replaceWith(nextNodes);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
CommentExit(comment) {
|
|
36
|
-
if (IFDEF_ENDIF_RE.test(comment.text)) {
|
|
37
|
-
comment.raws.left = " ";
|
|
38
|
-
comment.raws.right = " ";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
creator.postcss = true;
|
|
46
|
-
//#endregion
|
|
47
|
-
module.exports = creator;
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_postcss = require("../postcss-BwW8zO24.js");
|
|
6
|
+
exports.CSS_MACRO_POSTCSS_PLUGIN_NAME = require_postcss.CSS_MACRO_POSTCSS_PLUGIN_NAME;
|
|
7
|
+
exports.default = require_postcss.creator;
|
|
@@ -1,47 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const IFDEF_ENDIF_RE = /#(?:ifn?def|endif)/;
|
|
4
|
-
const creator = () => {
|
|
5
|
-
return {
|
|
6
|
-
postcssPlugin: "postcss-weapp-tw-css-macro-plugin",
|
|
7
|
-
prepare() {
|
|
8
|
-
return {
|
|
9
|
-
AtRule(atRule, helper) {
|
|
10
|
-
if (atRule.name === "media") {
|
|
11
|
-
const values = [];
|
|
12
|
-
matchCustomPropertyFromValue(atRule.params, (arr) => {
|
|
13
|
-
const value = arr[1];
|
|
14
|
-
if (value) values.push(value);
|
|
15
|
-
});
|
|
16
|
-
if (values.length > 0) {
|
|
17
|
-
const isNegative = atRule.params.includes("not");
|
|
18
|
-
const text = values.join(" ");
|
|
19
|
-
const comment = isNegative ? ifndef(text) : ifdef(text);
|
|
20
|
-
const nextNodes = [
|
|
21
|
-
helper.comment({
|
|
22
|
-
raws: { before: "\n" },
|
|
23
|
-
text: comment.start
|
|
24
|
-
}),
|
|
25
|
-
...(atRule.nodes ?? []).map((node) => node.clone()),
|
|
26
|
-
helper.comment({
|
|
27
|
-
raws: { before: "\n" },
|
|
28
|
-
text: comment.end
|
|
29
|
-
})
|
|
30
|
-
];
|
|
31
|
-
atRule.replaceWith(nextNodes);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
CommentExit(comment) {
|
|
36
|
-
if (IFDEF_ENDIF_RE.test(comment.text)) {
|
|
37
|
-
comment.raws.left = " ";
|
|
38
|
-
comment.raws.right = " ";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
creator.postcss = true;
|
|
46
|
-
//#endregion
|
|
47
|
-
export { creator as default };
|
|
1
|
+
import { n as creator, t as CSS_MACRO_POSTCSS_PLUGIN_NAME } from "../postcss-BzaRjBL0.mjs";
|
|
2
|
+
export { CSS_MACRO_POSTCSS_PLUGIN_NAME, creator as default };
|
package/dist/css-macro.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
require("./
|
|
3
|
-
const
|
|
2
|
+
const require_postcss = require("./postcss-BwW8zO24.js");
|
|
3
|
+
const require_auto = require("./auto-CqyEtds4.js");
|
|
4
|
+
require("./utils-CSA174-I.js");
|
|
4
5
|
let tailwindcss_plugin = require("tailwindcss/plugin");
|
|
5
6
|
tailwindcss_plugin = require_chunk.__toESM(tailwindcss_plugin);
|
|
6
7
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
@@ -9,7 +10,7 @@ const defaultOptions = {
|
|
|
9
10
|
dynamic: true,
|
|
10
11
|
variantsMap: {}
|
|
11
12
|
};
|
|
12
|
-
const
|
|
13
|
+
const cssMacroFactory = tailwindcss_plugin.default.withOptions((options) => {
|
|
13
14
|
const { dynamic, variantsMap } = (0, _weapp_tailwindcss_shared.defu)(options ?? {}, defaultOptions);
|
|
14
15
|
const staticVariants = Object.entries(variantsMap).map(([name, config]) => {
|
|
15
16
|
if (typeof config === "string") return {
|
|
@@ -26,14 +27,22 @@ const cssMacro = tailwindcss_plugin.default.withOptions((options) => {
|
|
|
26
27
|
return (api) => {
|
|
27
28
|
const { matchVariant, addVariant } = api;
|
|
28
29
|
if (dynamic && typeof matchVariant === "function") {
|
|
29
|
-
matchVariant("ifdef", (value) =>
|
|
30
|
-
matchVariant("ifndef", (value) =>
|
|
30
|
+
matchVariant("ifdef", (value) => require_postcss.createConditionalAtRule(value));
|
|
31
|
+
matchVariant("ifndef", (value) => require_postcss.createNegativeConditionalAtRule(value));
|
|
31
32
|
}
|
|
32
33
|
if (typeof addVariant === "function") for (const variant of staticVariants) {
|
|
33
|
-
const query = variant.negative ?
|
|
34
|
+
const query = variant.negative ? require_postcss.createNegativeConditionalAtRule(variant.value) : require_postcss.createConditionalAtRule(variant.value);
|
|
34
35
|
addVariant(variant.name, query);
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
});
|
|
39
|
+
const cssMacro = require_auto.markCssMacroPlugin(((options) => {
|
|
40
|
+
return require_auto.markCssMacroPlugin(cssMacroFactory(options));
|
|
41
|
+
}));
|
|
42
|
+
const cssMacroOptionsFunction = cssMacro;
|
|
43
|
+
const cssMacroFactoryOptionsFunction = cssMacroFactory;
|
|
44
|
+
cssMacroOptionsFunction.__isOptionsFunction = cssMacroFactoryOptionsFunction.__isOptionsFunction;
|
|
45
|
+
cssMacroOptionsFunction.__pluginFunction = cssMacroFactoryOptionsFunction.__pluginFunction;
|
|
46
|
+
cssMacroOptionsFunction.__configFunction = cssMacroFactoryOptionsFunction.__configFunction;
|
|
38
47
|
//#endregion
|
|
39
48
|
module.exports = cssMacro;
|
package/dist/css-macro.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as createNegativeConditionalAtRule, r as createConditionalAtRule } from "./postcss-BzaRjBL0.mjs";
|
|
2
|
+
import { i as markCssMacroPlugin } from "./auto-CsWz6lsU.mjs";
|
|
3
|
+
import { t as defu } from "./utils-B2SJgA1L.mjs";
|
|
3
4
|
import plugin from "tailwindcss/plugin";
|
|
4
5
|
//#region src/css-macro/index.ts
|
|
5
6
|
const defaultOptions = {
|
|
6
7
|
dynamic: true,
|
|
7
8
|
variantsMap: {}
|
|
8
9
|
};
|
|
9
|
-
const
|
|
10
|
+
const cssMacroFactory = plugin.withOptions((options) => {
|
|
10
11
|
const { dynamic, variantsMap } = defu(options ?? {}, defaultOptions);
|
|
11
12
|
const staticVariants = Object.entries(variantsMap).map(([name, config]) => {
|
|
12
13
|
if (typeof config === "string") return {
|
|
@@ -23,14 +24,22 @@ const cssMacro = plugin.withOptions((options) => {
|
|
|
23
24
|
return (api) => {
|
|
24
25
|
const { matchVariant, addVariant } = api;
|
|
25
26
|
if (dynamic && typeof matchVariant === "function") {
|
|
26
|
-
matchVariant("ifdef", (value) =>
|
|
27
|
-
matchVariant("ifndef", (value) =>
|
|
27
|
+
matchVariant("ifdef", (value) => createConditionalAtRule(value));
|
|
28
|
+
matchVariant("ifndef", (value) => createNegativeConditionalAtRule(value));
|
|
28
29
|
}
|
|
29
30
|
if (typeof addVariant === "function") for (const variant of staticVariants) {
|
|
30
|
-
const query = variant.negative ?
|
|
31
|
+
const query = variant.negative ? createNegativeConditionalAtRule(variant.value) : createConditionalAtRule(variant.value);
|
|
31
32
|
addVariant(variant.name, query);
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
});
|
|
36
|
+
const cssMacro = markCssMacroPlugin(((options) => {
|
|
37
|
+
return markCssMacroPlugin(cssMacroFactory(options));
|
|
38
|
+
}));
|
|
39
|
+
const cssMacroOptionsFunction = cssMacro;
|
|
40
|
+
const cssMacroFactoryOptionsFunction = cssMacroFactory;
|
|
41
|
+
cssMacroOptionsFunction.__isOptionsFunction = cssMacroFactoryOptionsFunction.__isOptionsFunction;
|
|
42
|
+
cssMacroOptionsFunction.__pluginFunction = cssMacroFactoryOptionsFunction.__pluginFunction;
|
|
43
|
+
cssMacroOptionsFunction.__configFunction = cssMacroFactoryOptionsFunction.__configFunction;
|
|
35
44
|
//#endregion
|
|
36
45
|
export { cssMacro as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as noop } from "./utils-
|
|
1
|
+
import { a as noop } from "./utils-B2SJgA1L.mjs";
|
|
2
2
|
import { MappingChars2String, isAllowedClassName } from "@weapp-core/escape";
|
|
3
3
|
//#region src/js/babel/cache-options.ts
|
|
4
4
|
const DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH = 5e4;
|
|
@@ -107,6 +107,7 @@ function getDefaultOptions() {
|
|
|
107
107
|
allowDoubleQuotes: false,
|
|
108
108
|
bareArbitraryValues: false
|
|
109
109
|
},
|
|
110
|
+
unocss: false,
|
|
110
111
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
111
112
|
inlineWxs: false,
|
|
112
113
|
injectAdditionalCssVarScope: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-8l464Juk.js");
|
|
2
|
-
require("./utils-
|
|
2
|
+
require("./utils-CSA174-I.js");
|
|
3
3
|
let _weapp_core_escape = require("@weapp-core/escape");
|
|
4
4
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
5
5
|
//#region src/js/babel/cache-options.ts
|
|
@@ -109,6 +109,7 @@ function getDefaultOptions() {
|
|
|
109
109
|
allowDoubleQuotes: false,
|
|
110
110
|
bareArbitraryValues: false
|
|
111
111
|
},
|
|
112
|
+
unocss: false,
|
|
112
113
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
113
114
|
inlineWxs: false,
|
|
114
115
|
injectAdditionalCssVarScope: false,
|
package/dist/defaults.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_defaults = require("./defaults-
|
|
2
|
+
const require_defaults = require("./defaults-C10hYUch.js");
|
|
3
3
|
exports.TAILWIND_V3_CSS_PREFLIGHT = require_defaults.TAILWIND_V3_CSS_PREFLIGHT;
|
|
4
4
|
exports.TAILWIND_V4_CSS_PREFLIGHT = require_defaults.TAILWIND_V4_CSS_PREFLIGHT;
|
|
5
5
|
exports.getDefaultCssPreflight = require_defaults.getDefaultCssPreflight;
|
package/dist/defaults.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, n as TAILWIND_V4_CSS_PREFLIGHT, r as getDefaultCssPreflight, t as TAILWIND_V3_CSS_PREFLIGHT } from "./defaults-
|
|
1
|
+
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, n as TAILWIND_V4_CSS_PREFLIGHT, r as getDefaultCssPreflight, t as TAILWIND_V3_CSS_PREFLIGHT } from "./defaults-B-1EEhdL.mjs";
|
|
2
2
|
export { TAILWIND_V3_CSS_PREFLIGHT, TAILWIND_V4_CSS_PREFLIGHT, getDefaultCssPreflight, getDefaultOptions, resolveDefaultCssPreflight };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CGsbY81C.js");
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_chunk.__toESM(node_process);
|
|
5
5
|
//#region src/generator/options.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-
|
|
1
|
+
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-CPJ9uGyr.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
//#region src/generator/options.ts
|
|
4
4
|
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
package/dist/generator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
4
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CGsbY81C.js");
|
|
4
|
+
const require_generator = require("./generator-BH6a0xuB.js");
|
|
5
5
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
6
6
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
7
7
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { S as resolveTailwindV4SourceOptionsFromPatcher, T as transformTailwindV4CssToWeapp, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, w as transformTailwindV4CssByTarget, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-CPJ9uGyr.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-iI_265gt.mjs";
|
|
3
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
5
|
-
const require_precheck = require("./precheck-
|
|
6
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
7
|
-
const require_source_candidates = require("./source-candidates-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CGsbY81C.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-mY0v1k-Y.js");
|
|
5
|
+
const require_precheck = require("./precheck-DLJg0_pu.js");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-Cm93idme.js");
|
|
7
|
+
const require_source_candidates = require("./source-candidates-mfvC9gMc.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_path = require("node:path");
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-
|
|
2
|
-
import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
3
|
-
import {
|
|
4
|
-
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
5
|
-
import { t as createSourceCandidateCollector } from "./source-candidates-
|
|
1
|
+
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-CPJ9uGyr.mjs";
|
|
2
|
+
import { i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, o as processCachedTask, r as emitHmrTiming, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-ECHyKwUL.mjs";
|
|
3
|
+
import { n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-BI8oBeUg.mjs";
|
|
4
|
+
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-DFa5Yes8.mjs";
|
|
5
|
+
import { t as createSourceCandidateCollector } from "./source-candidates-DkScNh9A.mjs";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates,
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
3
|
-
import {
|
|
4
|
-
import { i as resolveUniAppXOptions } from "./tailwindcss-DO-VVR5k.mjs";
|
|
1
|
+
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, q as omitUndefined, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-CPJ9uGyr.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-iI_265gt.mjs";
|
|
3
|
+
import { p as replaceWxml, r as resolveStyleOptionsFromContext } from "./precheck-BI8oBeUg.mjs";
|
|
5
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
5
|
import postcss from "postcss";
|
|
7
6
|
import path from "node:path";
|
|
@@ -1314,20 +1313,9 @@ function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOpt
|
|
|
1314
1313
|
cssPreflight: opts.cssPreflight,
|
|
1315
1314
|
cssPreflightRange: opts.cssPreflightRange
|
|
1316
1315
|
};
|
|
1317
|
-
const resolvedUniAppXOptions = resolveUniAppXOptions(opts.uniAppX);
|
|
1318
1316
|
return {
|
|
1319
|
-
|
|
1320
|
-
cssSelectorReplacement: opts.cssSelectorReplacement,
|
|
1321
|
-
rem2rpx: opts.rem2rpx,
|
|
1322
|
-
px2rpx: opts.px2rpx,
|
|
1323
|
-
unitsToPx: opts.unitsToPx,
|
|
1324
|
-
cssRemoveProperty: opts.cssRemoveProperty,
|
|
1325
|
-
cssRemoveHoverPseudoClass: opts.cssRemoveHoverPseudoClass,
|
|
1326
|
-
cssPresetEnv: opts.cssPresetEnv,
|
|
1327
|
-
autoprefixer: opts.autoprefixer,
|
|
1328
|
-
cssCalc: opts.cssCalc,
|
|
1317
|
+
...resolveStyleOptionsFromContext(opts),
|
|
1329
1318
|
atRules: opts.atRules,
|
|
1330
|
-
uniAppX: resolvedUniAppXOptions.enabled,
|
|
1331
1319
|
uniAppXCssTarget: opts.uniAppXCssTarget,
|
|
1332
1320
|
uniAppXUnsupported: opts.uniAppXUnsupported,
|
|
1333
1321
|
...cssHandlerOptions,
|
package/dist/{incremental-runtime-class-set-CWdfLHON.js → incremental-runtime-class-set-mY0v1k-Y.js}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_precheck = require("./precheck-
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-BtUBeOes.js");
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CGsbY81C.js");
|
|
3
|
+
const require_generator = require("./generator-BH6a0xuB.js");
|
|
4
|
+
const require_precheck = require("./precheck-DLJg0_pu.js");
|
|
6
5
|
let node_fs = require("node:fs");
|
|
7
6
|
let postcss = require("postcss");
|
|
8
7
|
postcss = require_chunk.__toESM(postcss);
|
|
@@ -1318,20 +1317,9 @@ function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOpt
|
|
|
1318
1317
|
cssPreflight: opts.cssPreflight,
|
|
1319
1318
|
cssPreflightRange: opts.cssPreflightRange
|
|
1320
1319
|
};
|
|
1321
|
-
const resolvedUniAppXOptions = require_tailwindcss.resolveUniAppXOptions(opts.uniAppX);
|
|
1322
1320
|
return {
|
|
1323
|
-
|
|
1324
|
-
cssSelectorReplacement: opts.cssSelectorReplacement,
|
|
1325
|
-
rem2rpx: opts.rem2rpx,
|
|
1326
|
-
px2rpx: opts.px2rpx,
|
|
1327
|
-
unitsToPx: opts.unitsToPx,
|
|
1328
|
-
cssRemoveProperty: opts.cssRemoveProperty,
|
|
1329
|
-
cssRemoveHoverPseudoClass: opts.cssRemoveHoverPseudoClass,
|
|
1330
|
-
cssPresetEnv: opts.cssPresetEnv,
|
|
1331
|
-
autoprefixer: opts.autoprefixer,
|
|
1332
|
-
cssCalc: opts.cssCalc,
|
|
1321
|
+
...require_precheck.resolveStyleOptionsFromContext(opts),
|
|
1333
1322
|
atRules: opts.atRules,
|
|
1334
|
-
uniAppX: resolvedUniAppXOptions.enabled,
|
|
1335
1323
|
uniAppXCssTarget: opts.uniAppXCssTarget,
|
|
1336
1324
|
uniAppXUnsupported: opts.uniAppXUnsupported,
|
|
1337
1325
|
...cssHandlerOptions,
|
package/dist/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export type { WeappTailwindcssPostcssPluginOptions } from './postcss';
|
|
|
6
6
|
export type * from './types';
|
|
7
7
|
export { WeappTailwindcss } from './vite';
|
|
8
8
|
export { UnifiedWebpackPluginV5, weappTailwindcssPackageDir } from './webpack';
|
|
9
|
+
export { unitConversionComposeRules, unitConversionPresets, } from '@weapp-tailwindcss/postcss';
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
require("./chunk-8l464Juk.js");
|
|
3
|
+
const require_generator = require("./generator-BH6a0xuB.js");
|
|
3
4
|
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
5
|
+
const require_postcss = require("./postcss-DEEAZ8J5.js");
|
|
6
|
+
const require_vite = require("./vite-BM_ksf1q.js");
|
|
7
|
+
const require_webpack = require("./webpack-CfcuDhQ8.js");
|
|
8
|
+
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
7
9
|
exports.UnifiedWebpackPluginV5 = require_webpack.UnifiedWebpackPluginV5;
|
|
8
10
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
11
|
exports.createPlugins = require_gulp.createPlugins;
|
|
10
12
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
13
|
+
Object.defineProperty(exports, "unitConversionComposeRules", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function() {
|
|
16
|
+
return _weapp_tailwindcss_postcss.unitConversionComposeRules;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "unitConversionPresets", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function() {
|
|
22
|
+
return _weapp_tailwindcss_postcss.unitConversionPresets;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
11
25
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
|
12
26
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-iI_265gt.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-
|
|
6
|
-
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-DJoU--Z-.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-CqEF-Wx5.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir, t as UnifiedWebpackPluginV5 } from "./webpack-D--XZMBB.mjs";
|
|
6
|
+
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
|
+
export { UnifiedWebpackPluginV5, WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|