weapp-tailwindcss 5.0.0-next.8 → 5.0.0
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-CnaJxkFY.mjs +413 -0
- package/dist/bundle-state-DgGEhk_z.js +529 -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 +12 -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--0-ekuVO.js +92 -0
- package/dist/generator-B76ovqsv.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-CN6K_97P.js +2366 -0
- package/dist/incremental-runtime-class-set-x10M9bn_.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-C7BMYpEF.mjs +169 -0
- package/dist/{postcss-w48mGIhe.mjs → postcss-CR9UCaIK.mjs} +54 -114
- package/dist/postcss-CiYLsqZn.js +192 -0
- package/dist/{postcss-QIXwT40c.js → postcss-hYimKoN_.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-BrNwLG2e.mjs +4716 -0
- package/dist/precheck-DPtJjZmV.js +4842 -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-DN1mihlU.mjs +322 -0
- package/dist/source-candidates-DSxme_O2.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-DWtPieNE.mjs} +72 -60
- package/dist/{tailwindcss-Bu-RWIHx.js → tailwindcss-glCm_d3H.js} +81 -69
- 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-D3BMLVAN.js +3712 -0
- package/dist/v3-engine-DCxNPBVs.mjs +3417 -0
- package/dist/vite-DOprpdH-.mjs +24493 -0
- package/dist/vite-Ec0uX6kF.js +24507 -0
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +5444 -22
- package/dist/weapp-tw-runtime-classset-loader.js +32 -9
- package/dist/{webpack-CNV2dx3Q.js → webpack-Ccohlg3A.js} +341 -96
- package/dist/{webpack-CT6EEENx.mjs → webpack-DFlZcqAU.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-BIapP56i.mjs +0 -1323
- package/dist/generator-css-Mksw8PgB.js +0 -1362
- 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-BwgRVgxH.mjs +0 -2405
- package/dist/vite-DyZuiyap.js +0 -2418
- /package/dist/{logger-Bub1jggA.mjs → logger-BNzxZbZj.mjs} +0 -0
- /package/dist/{logger-BRy6XPQ2.js → logger-TlKT3xmR.js} +0 -0
package/dist/defaults.js
CHANGED
|
@@ -1,151 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
|
|
9
|
-
const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
|
|
10
|
-
const BACKSLASH_RE = /\\/g;
|
|
11
|
-
function normalizePath(p) {
|
|
12
|
-
return p.replace(BACKSLASH_RE, "/");
|
|
13
|
-
}
|
|
14
|
-
const MPX_STYLES_DIR_PATTERN = /(?:^|\/)styles\/.*\.(?:wx|ac|jx|tt|q|c|ty)ss$/i;
|
|
15
|
-
const KBONE_MAIN_CSS_RE = /^(?:common\/)?miniprogram-app/;
|
|
16
|
-
const IMPLICIT_MAIN_CSS_RE = /^(?:app|common\/main|bundle)(?:\.|\/|$)/;
|
|
17
|
-
const MAIN_CSS_CHUNK_MATCHERS = {
|
|
18
|
-
"uni-app": (file) => file.startsWith("common/main") || file.startsWith("app"),
|
|
19
|
-
"uni-app-vite": (file) => file.startsWith("app") || file.startsWith("common/main"),
|
|
20
|
-
"uni-app-x": (file) => file.startsWith("app") || file.startsWith("common/main"),
|
|
21
|
-
"mpx": (file) => {
|
|
22
|
-
const normalized = normalizePath(file);
|
|
23
|
-
if (normalized.startsWith("app")) return true;
|
|
24
|
-
return MPX_STYLES_DIR_PATTERN.test(normalized);
|
|
25
|
-
},
|
|
26
|
-
"taro": (file) => file.startsWith("app"),
|
|
27
|
-
"remax": (file) => file.startsWith("app"),
|
|
28
|
-
"rax": (file) => file.startsWith("bundle"),
|
|
29
|
-
"native": (file) => file.startsWith("app"),
|
|
30
|
-
"weapp-vite": (file) => file.startsWith("app"),
|
|
31
|
-
"kbone": (file) => KBONE_MAIN_CSS_RE.test(file)
|
|
32
|
-
};
|
|
33
|
-
const alwaysFalse = () => false;
|
|
34
|
-
const TAILWIND_V3_CSS_PREFLIGHT = {
|
|
35
|
-
"box-sizing": "border-box",
|
|
36
|
-
"border-width": "0",
|
|
37
|
-
"border-style": "solid",
|
|
38
|
-
"border-color": "currentColor"
|
|
39
|
-
};
|
|
40
|
-
const TAILWIND_V4_CSS_PREFLIGHT = {
|
|
41
|
-
"box-sizing": "border-box",
|
|
42
|
-
"margin": "0",
|
|
43
|
-
"padding": "0",
|
|
44
|
-
"border": "0 solid"
|
|
45
|
-
};
|
|
46
|
-
function getDefaultCssPreflight(tailwindcssMajorVersion) {
|
|
47
|
-
return { ...tailwindcssMajorVersion === 4 ? TAILWIND_V4_CSS_PREFLIGHT : TAILWIND_V3_CSS_PREFLIGHT };
|
|
48
|
-
}
|
|
49
|
-
function resolveDefaultCssPreflight(cssPreflight, tailwindcssMajorVersion) {
|
|
50
|
-
if (cssPreflight === false) return false;
|
|
51
|
-
return {
|
|
52
|
-
...getDefaultCssPreflight(tailwindcssMajorVersion),
|
|
53
|
-
...cssPreflight ?? {}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function createMainCssChunkMatcher() {
|
|
57
|
-
return (file, appType) => {
|
|
58
|
-
if (!appType) {
|
|
59
|
-
const normalized = normalizePath(file);
|
|
60
|
-
return IMPLICIT_MAIN_CSS_RE.test(normalized) || MPX_STYLES_DIR_PATTERN.test(normalized) || KBONE_MAIN_CSS_RE.test(normalized);
|
|
61
|
-
}
|
|
62
|
-
const matcher = MAIN_CSS_CHUNK_MATCHERS[appType];
|
|
63
|
-
return matcher ? matcher(file) : true;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function getDefaultOptions() {
|
|
67
|
-
return {
|
|
68
|
-
/**
|
|
69
|
-
* wxss 微信小程序
|
|
70
|
-
* acss 支付宝小程序
|
|
71
|
-
* jxss 京东小程序
|
|
72
|
-
* ttss 头条小程序
|
|
73
|
-
* qss QQ小程序
|
|
74
|
-
* css 最正常的样式文件
|
|
75
|
-
* tyss 涂鸦小程序
|
|
76
|
-
*/
|
|
77
|
-
cssMatcher: (file) => CSS_FILE_PATTERN.test(file),
|
|
78
|
-
/**
|
|
79
|
-
* wxml 微信小程序
|
|
80
|
-
* axml 支付宝小程序
|
|
81
|
-
* jxml 京东小程序
|
|
82
|
-
* ksml 快手小程序
|
|
83
|
-
* ttml 头条小程序
|
|
84
|
-
* qml QQ小程序
|
|
85
|
-
* tyml 涂鸦小程序
|
|
86
|
-
* xhsml 小红书小程序
|
|
87
|
-
* swan 百度小程序
|
|
88
|
-
*/
|
|
89
|
-
htmlMatcher: (file) => HTML_FILE_PATTERN.test(file),
|
|
90
|
-
jsMatcher: (file) => {
|
|
91
|
-
if (file.includes("node_modules")) return false;
|
|
92
|
-
return JS_FILE_PATTERN.test(file);
|
|
93
|
-
},
|
|
94
|
-
mainCssChunkMatcher: createMainCssChunkMatcher(),
|
|
95
|
-
wxsMatcher: alwaysFalse,
|
|
96
|
-
cssPreflight: getDefaultCssPreflight(3),
|
|
97
|
-
disabled: false,
|
|
98
|
-
onLoad: _weapp_tailwindcss_shared.noop,
|
|
99
|
-
onStart: _weapp_tailwindcss_shared.noop,
|
|
100
|
-
onEnd: _weapp_tailwindcss_shared.noop,
|
|
101
|
-
onUpdate: _weapp_tailwindcss_shared.noop,
|
|
102
|
-
customAttributes: {},
|
|
103
|
-
customReplaceDictionary: _weapp_core_escape.MappingChars2String,
|
|
104
|
-
appType: void 0,
|
|
105
|
-
arbitraryValues: {
|
|
106
|
-
allowDoubleQuotes: false,
|
|
107
|
-
bareArbitraryValues: false
|
|
108
|
-
},
|
|
109
|
-
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
110
|
-
inlineWxs: false,
|
|
111
|
-
injectAdditionalCssVarScope: false,
|
|
112
|
-
jsPreserveClass: (keyword) => {
|
|
113
|
-
/**
|
|
114
|
-
* 默认保留 keyword
|
|
115
|
-
*/
|
|
116
|
-
if (keyword === "*") return true;
|
|
117
|
-
return false;
|
|
118
|
-
},
|
|
119
|
-
disabledDefaultTemplateHandler: false,
|
|
120
|
-
cssSelectorReplacement: {
|
|
121
|
-
root: [
|
|
122
|
-
"page",
|
|
123
|
-
".tw-root",
|
|
124
|
-
"wx-root-portal-content"
|
|
125
|
-
],
|
|
126
|
-
universal: ["view", "text"]
|
|
127
|
-
},
|
|
128
|
-
babelParserOptions: {
|
|
129
|
-
sourceType: "unambiguous",
|
|
130
|
-
cache: true,
|
|
131
|
-
cacheKey: "st:unambiguous"
|
|
132
|
-
},
|
|
133
|
-
postcssOptions: {},
|
|
134
|
-
cssRemoveProperty: true,
|
|
135
|
-
cssRemoveHoverPseudoClass: true,
|
|
136
|
-
ignoreCallExpressionIdentifiers: [],
|
|
137
|
-
ignoreTaggedTemplateExpressionIdentifiers: ["weappTwIgnore"],
|
|
138
|
-
replaceRuntimePackages: false,
|
|
139
|
-
generator: { target: "weapp" },
|
|
140
|
-
tailwindcssPatcherOptions: { filter(className) {
|
|
141
|
-
return !(0, _weapp_core_escape.isAllowedClassName)(className);
|
|
142
|
-
} },
|
|
143
|
-
logLevel: "info"
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
exports.TAILWIND_V3_CSS_PREFLIGHT = TAILWIND_V3_CSS_PREFLIGHT;
|
|
148
|
-
exports.TAILWIND_V4_CSS_PREFLIGHT = TAILWIND_V4_CSS_PREFLIGHT;
|
|
149
|
-
exports.getDefaultCssPreflight = getDefaultCssPreflight;
|
|
150
|
-
exports.getDefaultOptions = getDefaultOptions;
|
|
151
|
-
exports.resolveDefaultCssPreflight = resolveDefaultCssPreflight;
|
|
2
|
+
const require_defaults = require("./defaults-zKUH2mDe.js");
|
|
3
|
+
exports.TAILWIND_V3_CSS_PREFLIGHT = require_defaults.TAILWIND_V3_CSS_PREFLIGHT;
|
|
4
|
+
exports.TAILWIND_V4_CSS_PREFLIGHT = require_defaults.TAILWIND_V4_CSS_PREFLIGHT;
|
|
5
|
+
exports.getDefaultCssPreflight = require_defaults.getDefaultCssPreflight;
|
|
6
|
+
exports.getDefaultOptions = require_defaults.getDefaultOptions;
|
|
7
|
+
exports.resolveDefaultCssPreflight = require_defaults.resolveDefaultCssPreflight;
|
package/dist/defaults.mjs
CHANGED
|
@@ -1,144 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { MappingChars2String, isAllowedClassName } from "@weapp-core/escape";
|
|
3
|
-
//#region src/defaults.ts
|
|
4
|
-
const CSS_FILE_PATTERN = /.+\.(?:wx|ac|jx|tt|q|c|ty)ss$/;
|
|
5
|
-
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
|
|
6
|
-
const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
|
|
7
|
-
const BACKSLASH_RE = /\\/g;
|
|
8
|
-
function normalizePath(p) {
|
|
9
|
-
return p.replace(BACKSLASH_RE, "/");
|
|
10
|
-
}
|
|
11
|
-
const MPX_STYLES_DIR_PATTERN = /(?:^|\/)styles\/.*\.(?:wx|ac|jx|tt|q|c|ty)ss$/i;
|
|
12
|
-
const KBONE_MAIN_CSS_RE = /^(?:common\/)?miniprogram-app/;
|
|
13
|
-
const IMPLICIT_MAIN_CSS_RE = /^(?:app|common\/main|bundle)(?:\.|\/|$)/;
|
|
14
|
-
const MAIN_CSS_CHUNK_MATCHERS = {
|
|
15
|
-
"uni-app": (file) => file.startsWith("common/main") || file.startsWith("app"),
|
|
16
|
-
"uni-app-vite": (file) => file.startsWith("app") || file.startsWith("common/main"),
|
|
17
|
-
"uni-app-x": (file) => file.startsWith("app") || file.startsWith("common/main"),
|
|
18
|
-
"mpx": (file) => {
|
|
19
|
-
const normalized = normalizePath(file);
|
|
20
|
-
if (normalized.startsWith("app")) return true;
|
|
21
|
-
return MPX_STYLES_DIR_PATTERN.test(normalized);
|
|
22
|
-
},
|
|
23
|
-
"taro": (file) => file.startsWith("app"),
|
|
24
|
-
"remax": (file) => file.startsWith("app"),
|
|
25
|
-
"rax": (file) => file.startsWith("bundle"),
|
|
26
|
-
"native": (file) => file.startsWith("app"),
|
|
27
|
-
"weapp-vite": (file) => file.startsWith("app"),
|
|
28
|
-
"kbone": (file) => KBONE_MAIN_CSS_RE.test(file)
|
|
29
|
-
};
|
|
30
|
-
const alwaysFalse = () => false;
|
|
31
|
-
const TAILWIND_V3_CSS_PREFLIGHT = {
|
|
32
|
-
"box-sizing": "border-box",
|
|
33
|
-
"border-width": "0",
|
|
34
|
-
"border-style": "solid",
|
|
35
|
-
"border-color": "currentColor"
|
|
36
|
-
};
|
|
37
|
-
const TAILWIND_V4_CSS_PREFLIGHT = {
|
|
38
|
-
"box-sizing": "border-box",
|
|
39
|
-
"margin": "0",
|
|
40
|
-
"padding": "0",
|
|
41
|
-
"border": "0 solid"
|
|
42
|
-
};
|
|
43
|
-
function getDefaultCssPreflight(tailwindcssMajorVersion) {
|
|
44
|
-
return { ...tailwindcssMajorVersion === 4 ? TAILWIND_V4_CSS_PREFLIGHT : TAILWIND_V3_CSS_PREFLIGHT };
|
|
45
|
-
}
|
|
46
|
-
function resolveDefaultCssPreflight(cssPreflight, tailwindcssMajorVersion) {
|
|
47
|
-
if (cssPreflight === false) return false;
|
|
48
|
-
return {
|
|
49
|
-
...getDefaultCssPreflight(tailwindcssMajorVersion),
|
|
50
|
-
...cssPreflight ?? {}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function createMainCssChunkMatcher() {
|
|
54
|
-
return (file, appType) => {
|
|
55
|
-
if (!appType) {
|
|
56
|
-
const normalized = normalizePath(file);
|
|
57
|
-
return IMPLICIT_MAIN_CSS_RE.test(normalized) || MPX_STYLES_DIR_PATTERN.test(normalized) || KBONE_MAIN_CSS_RE.test(normalized);
|
|
58
|
-
}
|
|
59
|
-
const matcher = MAIN_CSS_CHUNK_MATCHERS[appType];
|
|
60
|
-
return matcher ? matcher(file) : true;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function getDefaultOptions() {
|
|
64
|
-
return {
|
|
65
|
-
/**
|
|
66
|
-
* wxss 微信小程序
|
|
67
|
-
* acss 支付宝小程序
|
|
68
|
-
* jxss 京东小程序
|
|
69
|
-
* ttss 头条小程序
|
|
70
|
-
* qss QQ小程序
|
|
71
|
-
* css 最正常的样式文件
|
|
72
|
-
* tyss 涂鸦小程序
|
|
73
|
-
*/
|
|
74
|
-
cssMatcher: (file) => CSS_FILE_PATTERN.test(file),
|
|
75
|
-
/**
|
|
76
|
-
* wxml 微信小程序
|
|
77
|
-
* axml 支付宝小程序
|
|
78
|
-
* jxml 京东小程序
|
|
79
|
-
* ksml 快手小程序
|
|
80
|
-
* ttml 头条小程序
|
|
81
|
-
* qml QQ小程序
|
|
82
|
-
* tyml 涂鸦小程序
|
|
83
|
-
* xhsml 小红书小程序
|
|
84
|
-
* swan 百度小程序
|
|
85
|
-
*/
|
|
86
|
-
htmlMatcher: (file) => HTML_FILE_PATTERN.test(file),
|
|
87
|
-
jsMatcher: (file) => {
|
|
88
|
-
if (file.includes("node_modules")) return false;
|
|
89
|
-
return JS_FILE_PATTERN.test(file);
|
|
90
|
-
},
|
|
91
|
-
mainCssChunkMatcher: createMainCssChunkMatcher(),
|
|
92
|
-
wxsMatcher: alwaysFalse,
|
|
93
|
-
cssPreflight: getDefaultCssPreflight(3),
|
|
94
|
-
disabled: false,
|
|
95
|
-
onLoad: noop,
|
|
96
|
-
onStart: noop,
|
|
97
|
-
onEnd: noop,
|
|
98
|
-
onUpdate: noop,
|
|
99
|
-
customAttributes: {},
|
|
100
|
-
customReplaceDictionary: MappingChars2String,
|
|
101
|
-
appType: void 0,
|
|
102
|
-
arbitraryValues: {
|
|
103
|
-
allowDoubleQuotes: false,
|
|
104
|
-
bareArbitraryValues: false
|
|
105
|
-
},
|
|
106
|
-
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
107
|
-
inlineWxs: false,
|
|
108
|
-
injectAdditionalCssVarScope: false,
|
|
109
|
-
jsPreserveClass: (keyword) => {
|
|
110
|
-
/**
|
|
111
|
-
* 默认保留 keyword
|
|
112
|
-
*/
|
|
113
|
-
if (keyword === "*") return true;
|
|
114
|
-
return false;
|
|
115
|
-
},
|
|
116
|
-
disabledDefaultTemplateHandler: false,
|
|
117
|
-
cssSelectorReplacement: {
|
|
118
|
-
root: [
|
|
119
|
-
"page",
|
|
120
|
-
".tw-root",
|
|
121
|
-
"wx-root-portal-content"
|
|
122
|
-
],
|
|
123
|
-
universal: ["view", "text"]
|
|
124
|
-
},
|
|
125
|
-
babelParserOptions: {
|
|
126
|
-
sourceType: "unambiguous",
|
|
127
|
-
cache: true,
|
|
128
|
-
cacheKey: "st:unambiguous"
|
|
129
|
-
},
|
|
130
|
-
postcssOptions: {},
|
|
131
|
-
cssRemoveProperty: true,
|
|
132
|
-
cssRemoveHoverPseudoClass: true,
|
|
133
|
-
ignoreCallExpressionIdentifiers: [],
|
|
134
|
-
ignoreTaggedTemplateExpressionIdentifiers: ["weappTwIgnore"],
|
|
135
|
-
replaceRuntimePackages: false,
|
|
136
|
-
generator: { target: "weapp" },
|
|
137
|
-
tailwindcssPatcherOptions: { filter(className) {
|
|
138
|
-
return !isAllowedClassName(className);
|
|
139
|
-
} },
|
|
140
|
-
logLevel: "info"
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
//#endregion
|
|
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-8xrgzxFY.mjs";
|
|
144
2
|
export { TAILWIND_V3_CSS_PREFLIGHT, TAILWIND_V4_CSS_PREFLIGHT, getDefaultCssPreflight, getDefaultOptions, resolveDefaultCssPreflight };
|
package/dist/escape.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let _weapp_core_escape = require("@weapp-core/escape");
|
|
3
|
+
//#region src/utils/object.ts
|
|
4
|
+
function definedEntries(value) {
|
|
5
|
+
return Object.entries(value).filter(([, item]) => item !== void 0);
|
|
6
|
+
}
|
|
7
|
+
function omitUndefined(value) {
|
|
8
|
+
return Object.fromEntries(definedEntries(value));
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
3
11
|
//#region src/wxml/shared.ts
|
|
4
12
|
const NEWLINE_RE = /[\n\r]+/g;
|
|
5
13
|
function replaceWxml(original, options = {
|
|
@@ -9,10 +17,10 @@ function replaceWxml(original, options = {
|
|
|
9
17
|
const { keepEOL, escapeMap, ignoreHead } = options;
|
|
10
18
|
let res = original;
|
|
11
19
|
if (!keepEOL) res = res.replaceAll(NEWLINE_RE, "");
|
|
12
|
-
res = (0, _weapp_core_escape.escape)(res, {
|
|
20
|
+
res = (0, _weapp_core_escape.escape)(res, omitUndefined({
|
|
13
21
|
map: escapeMap,
|
|
14
22
|
ignoreHead
|
|
15
|
-
});
|
|
23
|
+
}));
|
|
16
24
|
return res;
|
|
17
25
|
}
|
|
18
26
|
//#endregion
|
package/dist/escape.mjs
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { MappingChars2String, escape, isAllowedClassName, unescape } from "@weapp-core/escape";
|
|
2
|
+
//#region src/utils/object.ts
|
|
3
|
+
function definedEntries(value) {
|
|
4
|
+
return Object.entries(value).filter(([, item]) => item !== void 0);
|
|
5
|
+
}
|
|
6
|
+
function omitUndefined(value) {
|
|
7
|
+
return Object.fromEntries(definedEntries(value));
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
2
10
|
//#region src/wxml/shared.ts
|
|
3
11
|
const NEWLINE_RE = /[\n\r]+/g;
|
|
4
12
|
function replaceWxml(original, options = {
|
|
@@ -8,10 +16,10 @@ function replaceWxml(original, options = {
|
|
|
8
16
|
const { keepEOL, escapeMap, ignoreHead } = options;
|
|
9
17
|
let res = original;
|
|
10
18
|
if (!keepEOL) res = res.replaceAll(NEWLINE_RE, "");
|
|
11
|
-
res = escape(res, {
|
|
19
|
+
res = escape(res, omitUndefined({
|
|
12
20
|
map: escapeMap,
|
|
13
21
|
ignoreHead
|
|
14
|
-
});
|
|
22
|
+
}));
|
|
15
23
|
return res;
|
|
16
24
|
}
|
|
17
25
|
//#endregion
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { WeappTailwindcssGeneratorTarget } from './types';
|
|
3
|
+
import type { IArbitraryValues } from '../types/shared';
|
|
3
4
|
export interface WeappTailwindcssGeneratorOptions {
|
|
4
|
-
target?: WeappTailwindcssGeneratorTarget;
|
|
5
|
-
config?: string;
|
|
6
|
-
styleOptions?: Partial<IStyleHandlerOptions
|
|
7
|
-
|
|
5
|
+
target?: WeappTailwindcssGeneratorTarget | undefined;
|
|
6
|
+
config?: string | undefined;
|
|
7
|
+
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
8
|
+
importFallback?: boolean | undefined;
|
|
9
|
+
tailwindcssV3Compatibility?: boolean | undefined;
|
|
10
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
8
11
|
}
|
|
9
12
|
export type WeappTailwindcssGeneratorUserOptions = WeappTailwindcssGeneratorOptions;
|
|
10
13
|
export interface NormalizedWeappTailwindcssGeneratorOptions {
|
|
11
14
|
target: WeappTailwindcssGeneratorTarget;
|
|
12
|
-
config?: string;
|
|
13
|
-
styleOptions?: Partial<IStyleHandlerOptions
|
|
15
|
+
config?: string | undefined;
|
|
16
|
+
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
17
|
+
importFallback: boolean;
|
|
14
18
|
tailwindcssV3Compatibility: boolean;
|
|
19
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
15
20
|
}
|
|
16
21
|
export declare function normalizeWeappTailwindcssGeneratorOptions(options: WeappTailwindcssGeneratorUserOptions | undefined): NormalizedWeappTailwindcssGeneratorOptions;
|
|
@@ -6,9 +6,9 @@ export type TailwindGeneratorVersion = 3 | 4;
|
|
|
6
6
|
export type TailwindCandidateSource = TailwindV3CandidateSource | TailwindV4CandidateSource;
|
|
7
7
|
export type TailwindResolvedSource = TailwindV3ResolvedSource | TailwindV4ResolvedSource;
|
|
8
8
|
export interface WeappTailwindcssGenerateOptions extends Omit<TailwindV3GenerateOptions & TailwindV4GenerateOptions, 'target'> {
|
|
9
|
-
target?: WeappTailwindcssGeneratorTarget;
|
|
10
|
-
styleOptions?: Partial<IStyleHandlerOptions
|
|
11
|
-
tailwindcssV3Compatibility?: boolean;
|
|
9
|
+
target?: WeappTailwindcssGeneratorTarget | undefined;
|
|
10
|
+
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
11
|
+
tailwindcssV3Compatibility?: boolean | undefined;
|
|
12
12
|
}
|
|
13
13
|
export type WeappTailwindcssGenerateResult = (TailwindV3GenerateResult | TailwindV4GenerateResult) & {
|
|
14
14
|
target: WeappTailwindcssGeneratorTarget;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
|
+
let node_process = require("node:process");
|
|
4
|
+
node_process = require_chunk.__toESM(node_process);
|
|
5
|
+
//#region src/generator/options.ts
|
|
6
|
+
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
7
|
+
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
8
|
+
const mpxWebPlatformEnvKeys = ["MPX_CLI_MODE", "MPX_CURRENT_TARGET_MODE"];
|
|
9
|
+
function getEnvValue(key) {
|
|
10
|
+
return typeof node_process.default === "undefined" ? void 0 : node_process.default.env[key];
|
|
11
|
+
}
|
|
12
|
+
function normalizeGeneratorTargetValue(value) {
|
|
13
|
+
return value === "weapp" || value === "web" || value === "tailwind" ? value : void 0;
|
|
14
|
+
}
|
|
15
|
+
function isUniWebPlatform(value) {
|
|
16
|
+
const normalized = value?.trim().toLowerCase();
|
|
17
|
+
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
18
|
+
}
|
|
19
|
+
function isUniAppWebViewPlatform(value) {
|
|
20
|
+
const normalized = value?.trim().toLowerCase();
|
|
21
|
+
return normalized === "app" || normalized === "app-plus";
|
|
22
|
+
}
|
|
23
|
+
function isUniNativeAppPlatform(value) {
|
|
24
|
+
return (value?.trim().toLowerCase())?.startsWith("app-") === true;
|
|
25
|
+
}
|
|
26
|
+
function isMpxWebPlatform(value) {
|
|
27
|
+
return value?.trim().toLowerCase() === "web";
|
|
28
|
+
}
|
|
29
|
+
function inferGeneratorTargetFromEnv() {
|
|
30
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
31
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
32
|
+
if (target !== void 0) return target;
|
|
33
|
+
}
|
|
34
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || isUniAppWebViewPlatform(getEnvValue("UNI_PLATFORM")) && !isUniNativeAppPlatform(getEnvValue("UNI_UTS_PLATFORM")) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
35
|
+
return "weapp";
|
|
36
|
+
}
|
|
37
|
+
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
38
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
39
|
+
if (options == null) return {
|
|
40
|
+
target,
|
|
41
|
+
importFallback: true,
|
|
42
|
+
tailwindcssV3Compatibility: target === "weapp",
|
|
43
|
+
bareArbitraryValues: void 0
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
target,
|
|
47
|
+
config: options.config,
|
|
48
|
+
styleOptions: options.styleOptions,
|
|
49
|
+
importFallback: options.importFallback ?? true,
|
|
50
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp",
|
|
51
|
+
bareArbitraryValues: options.bareArbitraryValues
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/generator/index.ts
|
|
56
|
+
function isTailwindV3Source(source) {
|
|
57
|
+
return "version" in source && source.version === 3;
|
|
58
|
+
}
|
|
59
|
+
function createWeappTailwindcssGenerator(source) {
|
|
60
|
+
return isTailwindV3Source(source) ? require_v3_engine.createTailwindV3Engine(source) : require_v3_engine.createTailwindV4Engine(source);
|
|
61
|
+
}
|
|
62
|
+
async function resolveTailwindSourceFromPatcher(patcher) {
|
|
63
|
+
return patcher.majorVersion === 3 ? require_v3_engine.resolveTailwindV3SourceFromPatcher(patcher) : require_v3_engine.resolveTailwindV4SourceFromPatcher(patcher);
|
|
64
|
+
}
|
|
65
|
+
async function createWeappTailwindcssGeneratorFromPatcher(patcher) {
|
|
66
|
+
return createWeappTailwindcssGenerator(await resolveTailwindSourceFromPatcher(patcher));
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
Object.defineProperty(exports, "createWeappTailwindcssGenerator", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function() {
|
|
72
|
+
return createWeappTailwindcssGenerator;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "createWeappTailwindcssGeneratorFromPatcher", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function() {
|
|
78
|
+
return createWeappTailwindcssGeneratorFromPatcher;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "normalizeWeappTailwindcssGeneratorOptions", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function() {
|
|
84
|
+
return normalizeWeappTailwindcssGeneratorOptions;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "resolveTailwindSourceFromPatcher", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function() {
|
|
90
|
+
return resolveTailwindSourceFromPatcher;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { C as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-DCxNPBVs.mjs";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
//#region src/generator/options.ts
|
|
4
|
+
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
5
|
+
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
6
|
+
const mpxWebPlatformEnvKeys = ["MPX_CLI_MODE", "MPX_CURRENT_TARGET_MODE"];
|
|
7
|
+
function getEnvValue(key) {
|
|
8
|
+
return typeof process === "undefined" ? void 0 : process.env[key];
|
|
9
|
+
}
|
|
10
|
+
function normalizeGeneratorTargetValue(value) {
|
|
11
|
+
return value === "weapp" || value === "web" || value === "tailwind" ? value : void 0;
|
|
12
|
+
}
|
|
13
|
+
function isUniWebPlatform(value) {
|
|
14
|
+
const normalized = value?.trim().toLowerCase();
|
|
15
|
+
return normalized === "h5" || normalized?.startsWith("web") === true;
|
|
16
|
+
}
|
|
17
|
+
function isUniAppWebViewPlatform(value) {
|
|
18
|
+
const normalized = value?.trim().toLowerCase();
|
|
19
|
+
return normalized === "app" || normalized === "app-plus";
|
|
20
|
+
}
|
|
21
|
+
function isUniNativeAppPlatform(value) {
|
|
22
|
+
return (value?.trim().toLowerCase())?.startsWith("app-") === true;
|
|
23
|
+
}
|
|
24
|
+
function isMpxWebPlatform(value) {
|
|
25
|
+
return value?.trim().toLowerCase() === "web";
|
|
26
|
+
}
|
|
27
|
+
function inferGeneratorTargetFromEnv() {
|
|
28
|
+
for (const key of explicitGeneratorTargetEnvKeys) {
|
|
29
|
+
const target = normalizeGeneratorTargetValue(getEnvValue(key));
|
|
30
|
+
if (target !== void 0) return target;
|
|
31
|
+
}
|
|
32
|
+
if (uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || isUniAppWebViewPlatform(getEnvValue("UNI_PLATFORM")) && !isUniNativeAppPlatform(getEnvValue("UNI_UTS_PLATFORM")) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5") return "web";
|
|
33
|
+
return "weapp";
|
|
34
|
+
}
|
|
35
|
+
function normalizeWeappTailwindcssGeneratorOptions(options) {
|
|
36
|
+
const target = options?.target ?? inferGeneratorTargetFromEnv();
|
|
37
|
+
if (options == null) return {
|
|
38
|
+
target,
|
|
39
|
+
importFallback: true,
|
|
40
|
+
tailwindcssV3Compatibility: target === "weapp",
|
|
41
|
+
bareArbitraryValues: void 0
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
target,
|
|
45
|
+
config: options.config,
|
|
46
|
+
styleOptions: options.styleOptions,
|
|
47
|
+
importFallback: options.importFallback ?? true,
|
|
48
|
+
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility ?? target === "weapp",
|
|
49
|
+
bareArbitraryValues: options.bareArbitraryValues
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/generator/index.ts
|
|
54
|
+
function isTailwindV3Source(source) {
|
|
55
|
+
return "version" in source && source.version === 3;
|
|
56
|
+
}
|
|
57
|
+
function createWeappTailwindcssGenerator(source) {
|
|
58
|
+
return isTailwindV3Source(source) ? createTailwindV3Engine(source) : createTailwindV4Engine(source);
|
|
59
|
+
}
|
|
60
|
+
async function resolveTailwindSourceFromPatcher(patcher) {
|
|
61
|
+
return patcher.majorVersion === 3 ? resolveTailwindV3SourceFromPatcher(patcher) : resolveTailwindV4SourceFromPatcher(patcher);
|
|
62
|
+
}
|
|
63
|
+
async function createWeappTailwindcssGeneratorFromPatcher(patcher) {
|
|
64
|
+
return createWeappTailwindcssGenerator(await resolveTailwindSourceFromPatcher(patcher));
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { normalizeWeappTailwindcssGeneratorOptions as i, createWeappTailwindcssGeneratorFromPatcher as n, resolveTailwindSourceFromPatcher as r, createWeappTailwindcssGenerator as t };
|
package/dist/generator.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./
|
|
3
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-D3BMLVAN.js");
|
|
3
|
+
const require_generator = require("./generator--0-ekuVO.js");
|
|
4
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
5
5
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
6
6
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
|
7
7
|
exports.normalizeWeappTailwindcssGeneratorOptions = require_generator.normalizeWeappTailwindcssGeneratorOptions;
|
|
8
8
|
exports.resolveTailwindSourceFromPatcher = require_generator.resolveTailwindSourceFromPatcher;
|
|
9
|
-
exports.resolveTailwindV3Source =
|
|
10
|
-
exports.resolveTailwindV3SourceFromPatcher =
|
|
11
|
-
exports.resolveTailwindV3SourceOptionsFromPatcher =
|
|
12
|
-
exports.resolveTailwindV4Source =
|
|
9
|
+
exports.resolveTailwindV3Source = require_v3_engine.resolveTailwindV3Source;
|
|
10
|
+
exports.resolveTailwindV3SourceFromPatcher = require_v3_engine.resolveTailwindV3SourceFromPatcher;
|
|
11
|
+
exports.resolveTailwindV3SourceOptionsFromPatcher = require_v3_engine.resolveTailwindV3SourceOptionsFromPatcher;
|
|
12
|
+
exports.resolveTailwindV4Source = require_v3_engine.resolveTailwindV4Source;
|
|
13
13
|
exports.resolveTailwindV4SourceFromPatchOptions = tailwindcss_patch.resolveTailwindV4SourceFromPatchOptions;
|
|
14
|
-
exports.resolveTailwindV4SourceFromPatcher =
|
|
15
|
-
exports.resolveTailwindV4SourceOptionsFromPatcher =
|
|
16
|
-
exports.transformTailwindV3CssByTarget =
|
|
17
|
-
exports.transformTailwindV3CssToWeapp =
|
|
18
|
-
exports.transformTailwindV4CssByTarget =
|
|
19
|
-
exports.transformTailwindV4CssToWeapp =
|
|
14
|
+
exports.resolveTailwindV4SourceFromPatcher = require_v3_engine.resolveTailwindV4SourceFromPatcher;
|
|
15
|
+
exports.resolveTailwindV4SourceOptionsFromPatcher = require_v3_engine.resolveTailwindV4SourceOptionsFromPatcher;
|
|
16
|
+
exports.transformTailwindV3CssByTarget = require_v3_engine.transformTailwindV3CssByTarget;
|
|
17
|
+
exports.transformTailwindV3CssToWeapp = require_v3_engine.transformTailwindV3CssToWeapp;
|
|
18
|
+
exports.transformTailwindV4CssByTarget = require_v3_engine.transformTailwindV4CssByTarget;
|
|
19
|
+
exports.transformTailwindV4CssToWeapp = require_v3_engine.transformTailwindV4CssToWeapp;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
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-DCxNPBVs.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-B76ovqsv.mjs";
|
|
2
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|