weapp-tailwindcss 4.9.0 → 4.9.2-alpha.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/dist/{chunk-IGTIMGCP.js → chunk-2QR4UOHA.js} +5 -5
- package/dist/{chunk-SZOXLSNK.mjs → chunk-3LRQLHOG.mjs} +25 -9
- package/dist/{chunk-A2OSQ5CV.js → chunk-D2ZOXBOU.js} +14 -14
- package/dist/chunk-DYLQ6UOI.js +71 -0
- package/dist/{chunk-QZJTOS3U.js → chunk-EOCBETCN.js} +3 -3
- package/dist/{chunk-YJ4NK2AE.mjs → chunk-FAUL26KB.mjs} +4 -4
- package/dist/{chunk-6R4BK6D6.js → chunk-FYYBY3VK.js} +5 -5
- package/dist/{chunk-GIUNRP65.mjs → chunk-GKFJPK5V.mjs} +2 -2
- package/dist/{chunk-RMTGZQHJ.js → chunk-HNNJH4ZX.js} +7 -7
- package/dist/{chunk-TFOTUR4L.mjs → chunk-HWF5U4CI.mjs} +1 -1
- package/dist/{chunk-4FB4YO6F.js → chunk-IC2XBOKV.js} +80 -57
- package/dist/{chunk-4Z6MHSEO.mjs → chunk-IK5SFZ6A.mjs} +4 -4
- package/dist/{chunk-NNYRZ4FL.js → chunk-O2XZFBRS.js} +24 -24
- package/dist/{chunk-RR5HCKVQ.mjs → chunk-OOHJLO5M.mjs} +26 -0
- package/dist/{chunk-6OOJ46QK.mjs → chunk-OU6P3233.mjs} +60 -37
- package/dist/{chunk-QJTJC5UT.mjs → chunk-VZLUWOGQ.mjs} +1 -1
- package/dist/{chunk-3M464H7S.mjs → chunk-W3Z55EVM.mjs} +2 -2
- package/dist/{chunk-PT4IJT3Q.js → chunk-Y4A76SWP.js} +27 -11
- package/dist/cli.js +40 -40
- package/dist/cli.mjs +4 -4
- package/dist/core.js +11 -11
- package/dist/core.mjs +5 -5
- package/dist/css-macro.js +2 -2
- package/dist/css-macro.mjs +1 -1
- package/dist/defaults.js +3 -3
- package/dist/defaults.mjs +2 -2
- package/dist/gulp.js +7 -7
- package/dist/gulp.mjs +6 -6
- package/dist/index.js +10 -10
- package/dist/index.mjs +9 -9
- package/dist/presets.js +12 -8
- package/dist/presets.mjs +8 -4
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +6 -6
- package/dist/webpack.js +8 -8
- package/dist/webpack.mjs +7 -7
- package/dist/webpack4.js +27 -27
- package/dist/webpack4.mjs +6 -6
- package/package.json +1 -1
- package/dist/chunk-FMBPNII7.js +0 -45
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkD2ZOXBOUjs = require('./chunk-D2ZOXBOU.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkY4A76SWPjs = require('./chunk-Y4A76SWP.js');
|
|
8
8
|
|
|
9
9
|
// src/tailwindcss/recorder.ts
|
|
10
10
|
function setupPatchRecorder(patcher, baseDir, options) {
|
|
11
|
-
const recorder =
|
|
11
|
+
const recorder = _chunkD2ZOXBOUjs.createPatchTargetRecorder.call(void 0, baseDir, patcher, options);
|
|
12
12
|
if (_optionalChain([recorder, 'optionalAccess', _ => _.message]) && _optionalChain([options, 'optionalAccess', _2 => _2.logMessage]) !== false) {
|
|
13
13
|
const prefix = _optionalChain([options, 'optionalAccess', _3 => _3.messagePrefix]) ? `${options.messagePrefix} ` : "";
|
|
14
|
-
|
|
14
|
+
_chunkY4A76SWPjs.logger.info("%s%s", prefix, recorder.message);
|
|
15
15
|
}
|
|
16
16
|
const onPatchCompleted = _optionalChain([recorder, 'optionalAccess', _4 => _4.onPatched]) ? async () => {
|
|
17
17
|
await recorder.onPatched();
|
|
18
18
|
} : void 0;
|
|
19
|
-
const patchPromise = patcher ?
|
|
19
|
+
const patchPromise = patcher ? _chunkD2ZOXBOUjs.createTailwindPatchPromise.call(void 0, patcher, onPatchCompleted) : Promise.resolve();
|
|
20
20
|
return {
|
|
21
21
|
recorder,
|
|
22
22
|
patchPromise,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defuOverrideArray
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OOHJLO5M.mjs";
|
|
4
4
|
|
|
5
5
|
// src/logger/index.ts
|
|
6
6
|
import { logger } from "@weapp-tailwindcss/logger";
|
|
@@ -689,6 +689,7 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
689
689
|
tailwindcssPatcherOptions,
|
|
690
690
|
supportCustomLengthUnitsPatch
|
|
691
691
|
} = options;
|
|
692
|
+
const hasCssEntries = Boolean(cssEntries?.length);
|
|
692
693
|
const defaultTailwindcssConfig = {
|
|
693
694
|
cwd: baseDir,
|
|
694
695
|
v2: {
|
|
@@ -697,12 +698,12 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
697
698
|
v3: {
|
|
698
699
|
cwd: baseDir
|
|
699
700
|
},
|
|
700
|
-
v4: {
|
|
701
|
+
v4: hasCssEntries ? { cssEntries } : {
|
|
701
702
|
base: baseDir,
|
|
702
703
|
cssEntries
|
|
703
704
|
}
|
|
704
705
|
};
|
|
705
|
-
if (
|
|
706
|
+
if (hasCssEntries && (tailwindcss == null || tailwindcss.version == null)) {
|
|
706
707
|
defaultTailwindcssConfig.version = 4;
|
|
707
708
|
}
|
|
708
709
|
const mergedTailwindOptions = defuOverrideArray(
|
|
@@ -710,16 +711,22 @@ function createPatcherForBase(baseDir, cssEntries, options) {
|
|
|
710
711
|
defaultTailwindcssConfig
|
|
711
712
|
);
|
|
712
713
|
if (!mergedTailwindOptions.v4) {
|
|
713
|
-
mergedTailwindOptions.v4 = {
|
|
714
|
+
mergedTailwindOptions.v4 = hasCssEntries ? { cssEntries: cssEntries ?? [] } : {
|
|
714
715
|
base: baseDir,
|
|
715
716
|
cssEntries: cssEntries ?? []
|
|
716
717
|
};
|
|
717
718
|
} else {
|
|
718
|
-
mergedTailwindOptions.v4.base
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
if (!hasCssEntries && !mergedTailwindOptions.v4.base) {
|
|
720
|
+
mergedTailwindOptions.v4.base = baseDir;
|
|
721
|
+
}
|
|
722
|
+
if (hasCssEntries) {
|
|
723
|
+
if (cssEntries?.length) {
|
|
724
|
+
mergedTailwindOptions.v4.cssEntries = cssEntries;
|
|
725
|
+
} else if (!mergedTailwindOptions.v4.cssEntries) {
|
|
726
|
+
mergedTailwindOptions.v4.cssEntries = [];
|
|
727
|
+
}
|
|
721
728
|
} else if (!mergedTailwindOptions.v4.cssEntries) {
|
|
722
|
-
mergedTailwindOptions.v4.cssEntries = [];
|
|
729
|
+
mergedTailwindOptions.v4.cssEntries = cssEntries ?? [];
|
|
723
730
|
}
|
|
724
731
|
}
|
|
725
732
|
const patchedOptions = overrideTailwindcssPatcherOptionsForBase(
|
|
@@ -762,6 +769,7 @@ function createMultiTailwindcssPatcher(patchers) {
|
|
|
762
769
|
}
|
|
763
770
|
const [first] = patchers;
|
|
764
771
|
const multiPatcher = {
|
|
772
|
+
...first,
|
|
765
773
|
packageInfo: first?.packageInfo,
|
|
766
774
|
majorVersion: first?.majorVersion,
|
|
767
775
|
options: first?.options,
|
|
@@ -1087,8 +1095,16 @@ function createTailwindcssPatcherFromContext(ctx) {
|
|
|
1087
1095
|
if (normalizedCssEntries) {
|
|
1088
1096
|
ctx.cssEntries = normalizedCssEntries;
|
|
1089
1097
|
}
|
|
1098
|
+
const shouldAttachBase = Boolean(ctx.tailwindcssBasedir && normalizedCssEntries?.length);
|
|
1099
|
+
const tailwindcssWithBase = shouldAttachBase && tailwindcss?.v4 !== null ? {
|
|
1100
|
+
...tailwindcss ?? {},
|
|
1101
|
+
v4: {
|
|
1102
|
+
...tailwindcss?.v4 ?? {},
|
|
1103
|
+
base: tailwindcss?.v4?.base ?? resolvedTailwindcssBasedir
|
|
1104
|
+
}
|
|
1105
|
+
} : tailwindcss;
|
|
1090
1106
|
const patcherOptions = {
|
|
1091
|
-
tailwindcss,
|
|
1107
|
+
tailwindcss: tailwindcssWithBase,
|
|
1092
1108
|
tailwindcssPatcherOptions,
|
|
1093
1109
|
supportCustomLengthUnitsPatch,
|
|
1094
1110
|
appType
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkY4A76SWPjs = require('./chunk-Y4A76SWP.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkFYYBY3VKjs = require('./chunk-FYYBY3VK.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
14
14
|
|
|
15
15
|
// src/tailwindcss/runtime.ts
|
|
16
16
|
var _fs = require('fs');
|
|
@@ -187,7 +187,7 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
|
187
187
|
// package.json
|
|
188
188
|
var package_default = {
|
|
189
189
|
name: "weapp-tailwindcss",
|
|
190
|
-
version: "4.9.
|
|
190
|
+
version: "4.9.2-alpha.1",
|
|
191
191
|
description: "\u628A tailwindcss \u539F\u5B50\u5316\u6837\u5F0F\u601D\u60F3\uFF0C\u5E26\u7ED9\u5C0F\u7A0B\u5E8F\u5F00\u53D1\u8005\u4EEC! bring tailwindcss to miniprogram developers!",
|
|
192
192
|
author: "ice breaker <1324318532@qq.com>",
|
|
193
193
|
license: "MIT",
|
|
@@ -543,7 +543,7 @@ function formatRelativeToBase(targetPath, baseDir) {
|
|
|
543
543
|
}
|
|
544
544
|
function resolveRecordLocation(baseDir) {
|
|
545
545
|
const normalizedBase = _path2.default.normalize(baseDir);
|
|
546
|
-
const packageRoot = _nullishCoalesce(
|
|
546
|
+
const packageRoot = _nullishCoalesce(_chunkY4A76SWPjs.findNearestPackageRoot.call(void 0, normalizedBase), () => ( normalizedBase));
|
|
547
547
|
const packageJsonPath = _path2.default.join(packageRoot, "package.json");
|
|
548
548
|
const hasPackageJson = _fs.existsSync.call(void 0, packageJsonPath);
|
|
549
549
|
const recordKeySource = hasPackageJson ? packageJsonPath : normalizedBase;
|
|
@@ -913,7 +913,7 @@ function toCustomAttributesEntities(customAttributes) {
|
|
|
913
913
|
if (!customAttributes) {
|
|
914
914
|
return [];
|
|
915
915
|
}
|
|
916
|
-
if (
|
|
916
|
+
if (_chunkDYLQ6UOIjs.isMap.call(void 0, customAttributes)) {
|
|
917
917
|
return [
|
|
918
918
|
...customAttributes.entries()
|
|
919
919
|
];
|
|
@@ -2201,7 +2201,7 @@ function createJsHandler(options) {
|
|
|
2201
2201
|
} = options;
|
|
2202
2202
|
function handler(rawSource, classNameSet, options2) {
|
|
2203
2203
|
const overrideOptions = _nullishCoalesce(options2, () => ( {}));
|
|
2204
|
-
const resolvedOptions =
|
|
2204
|
+
const resolvedOptions = _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0,
|
|
2205
2205
|
{
|
|
2206
2206
|
...overrideOptions,
|
|
2207
2207
|
classNameSet
|
|
@@ -2630,7 +2630,7 @@ async function customTemplateHandler(rawSource, options) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
function createTemplateHandler(options = {}) {
|
|
2632
2632
|
return (rawSource, opt = {}) => {
|
|
2633
|
-
return customTemplateHandler(rawSource,
|
|
2633
|
+
return customTemplateHandler(rawSource, _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0, opt, options));
|
|
2634
2634
|
};
|
|
2635
2635
|
}
|
|
2636
2636
|
|
|
@@ -2764,22 +2764,22 @@ async function clearTailwindcssPatcherCache(patcher, options) {
|
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
2766
|
function createInternalCompilerContext(opts) {
|
|
2767
|
-
const ctx =
|
|
2767
|
+
const ctx = _chunkDYLQ6UOIjs.defuOverrideArray.call(void 0,
|
|
2768
2768
|
opts,
|
|
2769
|
-
|
|
2769
|
+
_chunkFYYBY3VKjs.getDefaultOptions.call(void 0, ),
|
|
2770
2770
|
{}
|
|
2771
2771
|
);
|
|
2772
2772
|
ctx.escapeMap = ctx.customReplaceDictionary;
|
|
2773
2773
|
applyLoggerLevel(ctx.logLevel);
|
|
2774
|
-
const twPatcher =
|
|
2774
|
+
const twPatcher = _chunkY4A76SWPjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
|
|
2775
2775
|
logTailwindcssTarget("runtime", twPatcher, ctx.tailwindcssBasedir);
|
|
2776
2776
|
if (_optionalChain([twPatcher, 'access', _95 => _95.packageInfo, 'optionalAccess', _96 => _96.version])) {
|
|
2777
2777
|
_logger.logger.success(`\u5F53\u524D\u4F7F\u7528 ${_logger.pc.cyanBright("Tailwind CSS")} \u7248\u672C\u4E3A: ${_logger.pc.underline(_logger.pc.bold(_logger.pc.green(twPatcher.packageInfo.version)))}`);
|
|
2778
2778
|
} else {
|
|
2779
2779
|
_logger.logger.warn(`${_logger.pc.cyanBright("Tailwind CSS")} \u672A\u5B89\u88C5\uFF0C\u5DF2\u8DF3\u8FC7\u7248\u672C\u68C0\u6D4B\u4E0E\u8865\u4E01\u5E94\u7528\u3002`);
|
|
2780
2780
|
}
|
|
2781
|
-
|
|
2782
|
-
const cssCalcOptions =
|
|
2781
|
+
_chunkY4A76SWPjs.warnMissingCssEntries.call(void 0, ctx, twPatcher);
|
|
2782
|
+
const cssCalcOptions = _chunkY4A76SWPjs.applyV4CssCalcDefaults.call(void 0, ctx.cssCalc, twPatcher);
|
|
2783
2783
|
ctx.cssCalc = cssCalcOptions;
|
|
2784
2784
|
const customAttributesEntities = toCustomAttributesEntities(ctx.customAttributes);
|
|
2785
2785
|
const { styleHandler, jsHandler: jsHandler2, templateHandler } = createHandlersFromContext(
|
|
@@ -2798,7 +2798,7 @@ function createInternalCompilerContext(opts) {
|
|
|
2798
2798
|
await clearTailwindcssPatcherCache(previousPatcher);
|
|
2799
2799
|
}
|
|
2800
2800
|
invalidateRuntimeClassSet(previousPatcher);
|
|
2801
|
-
const nextPatcher =
|
|
2801
|
+
const nextPatcher = _chunkY4A76SWPjs.createTailwindcssPatcherFromContext.call(void 0, ctx);
|
|
2802
2802
|
Object.assign(previousPatcher, nextPatcher);
|
|
2803
2803
|
ctx.twPatcher = previousPatcher;
|
|
2804
2804
|
return previousPatcher;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/utils/index.ts
|
|
2
|
+
var _shared = require('@weapp-tailwindcss/shared');
|
|
3
|
+
|
|
4
|
+
// src/utils/hbuilderx.ts
|
|
5
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
6
|
+
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
7
|
+
|
|
8
|
+
// src/utils/uni-platform.ts
|
|
9
|
+
|
|
10
|
+
function normalizePlatform(value) {
|
|
11
|
+
return _optionalChain([value, 'optionalAccess', _ => _.trim, 'call', _2 => _2(), 'access', _3 => _3.toLowerCase, 'call', _4 => _4()]) || void 0;
|
|
12
|
+
}
|
|
13
|
+
function resolveUniUtsPlatform(value = _process2.default.env.UNI_UTS_PLATFORM) {
|
|
14
|
+
const normalized = normalizePlatform(value);
|
|
15
|
+
const isAppAndroid = normalized === "app-android";
|
|
16
|
+
const isAppIos = normalized === "app-ios";
|
|
17
|
+
const isAppHarmony = normalized === "app-harmony";
|
|
18
|
+
const isApp = _optionalChain([normalized, 'optionalAccess', _5 => _5.startsWith, 'call', _6 => _6("app-")]) === true || normalized === "app" || normalized === "app-plus";
|
|
19
|
+
const isMp = _optionalChain([normalized, 'optionalAccess', _7 => _7.startsWith, 'call', _8 => _8("mp-")]) === true;
|
|
20
|
+
const isWeb = _optionalChain([normalized, 'optionalAccess', _9 => _9.startsWith, 'call', _10 => _10("web")]) === true || normalized === "h5";
|
|
21
|
+
return {
|
|
22
|
+
raw: value,
|
|
23
|
+
normalized,
|
|
24
|
+
isApp,
|
|
25
|
+
isAppAndroid,
|
|
26
|
+
isAppHarmony,
|
|
27
|
+
isAppIos,
|
|
28
|
+
isMp,
|
|
29
|
+
isWeb
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/utils/index.ts
|
|
34
|
+
function classifyEntry(filename, options) {
|
|
35
|
+
if (options.cssMatcher(filename)) {
|
|
36
|
+
return "css";
|
|
37
|
+
}
|
|
38
|
+
if (options.htmlMatcher(filename)) {
|
|
39
|
+
return "html";
|
|
40
|
+
}
|
|
41
|
+
if (options.jsMatcher(filename) || options.wxsMatcher(filename)) {
|
|
42
|
+
return "js";
|
|
43
|
+
}
|
|
44
|
+
return "other";
|
|
45
|
+
}
|
|
46
|
+
function createEmptyGroups() {
|
|
47
|
+
return {
|
|
48
|
+
css: [],
|
|
49
|
+
html: [],
|
|
50
|
+
js: [],
|
|
51
|
+
other: []
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function getGroupedEntries(entries, options) {
|
|
55
|
+
const groups = createEmptyGroups();
|
|
56
|
+
for (const entry of entries) {
|
|
57
|
+
const [filename] = entry;
|
|
58
|
+
const group = classifyEntry(filename, options);
|
|
59
|
+
groups[group].push(entry);
|
|
60
|
+
}
|
|
61
|
+
return groups;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
exports.resolveUniUtsPlatform = resolveUniUtsPlatform; exports.defu = _shared.defu; exports.defuOverrideArray = _shared.defuOverrideArray; exports.isMap = _shared.isMap; exports.noop = _shared.noop; exports.getGroupedEntries = getGroupedEntries;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkORSWL3MIjs = require('./chunk-ORSWL3MI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD2ZOXBOUjs = require('./chunk-D2ZOXBOU.js');
|
|
7
7
|
|
|
8
8
|
// src/shared/mpx.ts
|
|
9
9
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -154,8 +154,8 @@ function applyTailwindcssCssImportRewrite(compiler, options) {
|
|
|
154
154
|
if (!options.enabled) {
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
compiler.hooks.normalModuleFactory.tap(
|
|
158
|
-
factory.hooks.beforeResolve.tap(
|
|
157
|
+
compiler.hooks.normalModuleFactory.tap(_chunkD2ZOXBOUjs.pluginName, (factory) => {
|
|
158
|
+
factory.hooks.beforeResolve.tap(_chunkD2ZOXBOUjs.pluginName, (data) => {
|
|
159
159
|
rewriteTailwindcssRequestForCss(data, options.pkgDir, options.appType);
|
|
160
160
|
});
|
|
161
161
|
});
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isMpx,
|
|
10
10
|
patchMpxLoaderResolve,
|
|
11
11
|
setupMpxTailwindcssRedirect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VZLUWOGQ.mjs";
|
|
13
13
|
import {
|
|
14
14
|
pushConcurrentTaskFactories,
|
|
15
15
|
resolveDisabledOptions,
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
} from "./chunk-RRHPTTCP.mjs";
|
|
23
23
|
import {
|
|
24
24
|
setupPatchRecorder
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GKFJPK5V.mjs";
|
|
26
26
|
import {
|
|
27
27
|
collectRuntimeClassSet,
|
|
28
28
|
createDebug,
|
|
29
29
|
getCompilerContext,
|
|
30
30
|
pluginName,
|
|
31
31
|
refreshTailwindRuntimeState
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-IK5SFZ6A.mjs";
|
|
33
33
|
import {
|
|
34
34
|
getGroupedEntries
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OOHJLO5M.mjs";
|
|
36
36
|
import {
|
|
37
37
|
__dirname
|
|
38
38
|
} from "./chunk-SM5V25IN.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDYLQ6UOIjs = require('./chunk-DYLQ6UOI.js');
|
|
4
4
|
|
|
5
5
|
// src/defaults.ts
|
|
6
6
|
var _escape = require('@weapp-core/escape');
|
|
@@ -77,10 +77,10 @@ function getDefaultOptions() {
|
|
|
77
77
|
"border-color": "currentColor"
|
|
78
78
|
},
|
|
79
79
|
disabled: false,
|
|
80
|
-
onLoad:
|
|
81
|
-
onStart:
|
|
82
|
-
onEnd:
|
|
83
|
-
onUpdate:
|
|
80
|
+
onLoad: _chunkDYLQ6UOIjs.noop,
|
|
81
|
+
onStart: _chunkDYLQ6UOIjs.noop,
|
|
82
|
+
onEnd: _chunkDYLQ6UOIjs.noop,
|
|
83
|
+
onUpdate: _chunkDYLQ6UOIjs.noop,
|
|
84
84
|
customAttributes: {},
|
|
85
85
|
customReplaceDictionary: _escape.MappingChars2String,
|
|
86
86
|
appType: void 0,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPatchTargetRecorder,
|
|
3
3
|
createTailwindPatchPromise
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IK5SFZ6A.mjs";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3LRQLHOG.mjs";
|
|
8
8
|
|
|
9
9
|
// src/tailwindcss/recorder.ts
|
|
10
10
|
function setupPatchRecorder(patcher, baseDir, options) {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _chunkLTJQUORKjs = require('./chunk-LTJQUORK.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2QR4UOHAjs = require('./chunk-2QR4UOHA.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkD2ZOXBOUjs = require('./chunk-D2ZOXBOU.js');
|
|
13
13
|
|
|
14
14
|
// src/bundlers/gulp/index.ts
|
|
15
15
|
var _buffer = require('buffer');
|
|
@@ -17,12 +17,12 @@ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
|
17
17
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
18
18
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
19
19
|
var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
|
|
20
|
-
var debug =
|
|
20
|
+
var debug = _chunkD2ZOXBOUjs.createDebug.call(void 0, );
|
|
21
21
|
var Transform = _stream2.default.Transform;
|
|
22
22
|
function createPlugins(options = {}) {
|
|
23
|
-
const opts =
|
|
23
|
+
const opts = _chunkD2ZOXBOUjs.getCompilerContext.call(void 0, options);
|
|
24
24
|
const { templateHandler, styleHandler, jsHandler, cache, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
25
|
-
const patchRecorderState =
|
|
25
|
+
const patchRecorderState = _chunk2QR4UOHAjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
26
26
|
source: "runtime",
|
|
27
27
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
28
28
|
});
|
|
@@ -36,7 +36,7 @@ function createPlugins(options = {}) {
|
|
|
36
36
|
const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".tsx", ".jsx"];
|
|
37
37
|
let runtimeSetInitialized = false;
|
|
38
38
|
async function refreshRuntimeState(force) {
|
|
39
|
-
await
|
|
39
|
+
await _chunkD2ZOXBOUjs.refreshTailwindRuntimeState.call(void 0, runtimeState, force);
|
|
40
40
|
}
|
|
41
41
|
async function refreshRuntimeSet(force = false) {
|
|
42
42
|
await refreshRuntimeState(force);
|
|
@@ -44,7 +44,7 @@ function createPlugins(options = {}) {
|
|
|
44
44
|
if (!force && runtimeSetInitialized && runtimeSet.size > 0) {
|
|
45
45
|
return runtimeSet;
|
|
46
46
|
}
|
|
47
|
-
runtimeSet = await
|
|
47
|
+
runtimeSet = await _chunkD2ZOXBOUjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, { force, skipRefresh: force });
|
|
48
48
|
runtimeSetInitialized = true;
|
|
49
49
|
return runtimeSet;
|
|
50
50
|
}
|