weapp-tailwindcss 4.10.0-beta.2 → 4.10.0-beta.4
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-7ATL22KK.mjs → chunk-3A7VW4BZ.mjs} +3 -3
- package/dist/{chunk-EGOFMIDI.mjs → chunk-3WUHHFLF.mjs} +1 -0
- package/dist/{chunk-3RGU475C.js → chunk-5APD2MNV.js} +163 -77
- package/dist/{chunk-LBZCKOMT.js → chunk-5U24PLVV.js} +1 -0
- package/dist/{chunk-UCDOKKRH.js → chunk-BFZDZRA5.js} +28 -16
- package/dist/{chunk-QOWSZHYT.js → chunk-GQVBN7UT.js} +3 -3
- package/dist/{chunk-Q7TIBSU2.mjs → chunk-JP45MK3F.mjs} +1 -1
- package/dist/{chunk-AGF55OIE.mjs → chunk-KAK3XMAW.mjs} +2 -2
- package/dist/{chunk-GFJYJ6WV.js → chunk-OCV5QLZM.js} +27 -27
- package/dist/{chunk-D3I6GQUV.mjs → chunk-OYR4XWM4.mjs} +16 -4
- package/dist/{chunk-YS2V3XY2.js → chunk-PLI5CO4U.js} +50 -25
- package/dist/{chunk-7D27E7TU.mjs → chunk-QOTLDKI4.mjs} +131 -45
- package/dist/{chunk-2KAM7AAG.mjs → chunk-UELU5NFH.mjs} +33 -8
- package/dist/{chunk-F7FBGRWS.js → chunk-WQPYYMRL.js} +7 -7
- package/dist/{chunk-FIJF6OL7.mjs → chunk-XCKQ4YQM.mjs} +2 -2
- package/dist/{chunk-FLJBD5TW.js → chunk-Y6OZDS7V.js} +5 -5
- package/dist/cli.js +46 -46
- package/dist/cli.mjs +10 -10
- package/dist/core.d.mts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +9 -9
- package/dist/core.mjs +4 -4
- package/dist/defaults.d.mts +1 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +1 -1
- package/dist/gulp.d.mts +1 -1
- package/dist/gulp.d.ts +1 -1
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/{index-vGuAfNvT.d.mts → index-B6U7MoOM.d.mts} +13 -1
- package/dist/{index-vGuAfNvT.d.ts → index-B6U7MoOM.d.ts} +13 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/presets.d.mts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +8 -8
- package/dist/presets.mjs +5 -5
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +6 -6
- package/dist/vite.mjs +5 -5
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +7 -7
- package/dist/webpack.mjs +6 -6
- package/dist/webpack4.d.mts +1 -1
- package/dist/webpack4.d.ts +1 -1
- package/dist/webpack4.js +28 -28
- package/dist/webpack4.mjs +5 -5
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBFZDZRA5js = require('./chunk-BFZDZRA5.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
require('./chunk-
|
|
10
|
+
var _chunk5APD2MNVjs = require('./chunk-5APD2MNV.js');
|
|
11
|
+
require('./chunk-5U24PLVV.js');
|
|
12
12
|
require('./chunk-DYLQ6UOI.js');
|
|
13
13
|
require('./chunk-DBAAU4LK.js');
|
|
14
14
|
|
|
@@ -134,7 +134,7 @@ function resolvePatchDefaultCwd(currentCwd = _process2.default.cwd()) {
|
|
|
134
134
|
if (explicitCwd) {
|
|
135
135
|
return explicitCwd;
|
|
136
136
|
}
|
|
137
|
-
const workspaceRoot =
|
|
137
|
+
const workspaceRoot = _chunk5APD2MNVjs.findWorkspaceRoot.call(void 0, baseDir);
|
|
138
138
|
const initCwd = normalizeCandidatePath(baseDir, _process2.default.env.INIT_CWD);
|
|
139
139
|
const localPrefix = normalizeCandidatePath(baseDir, _process2.default.env.npm_config_local_prefix);
|
|
140
140
|
const candidates = [
|
|
@@ -156,12 +156,12 @@ async function ensureDir(dir) {
|
|
|
156
156
|
}
|
|
157
157
|
function handleCliError(error) {
|
|
158
158
|
if (error instanceof Error) {
|
|
159
|
-
|
|
159
|
+
_chunk5APD2MNVjs.logger.error(error.message);
|
|
160
160
|
if (error.stack && _process2.default.env.WEAPP_TW_DEBUG === "1") {
|
|
161
|
-
|
|
161
|
+
_chunk5APD2MNVjs.logger.error(error.stack);
|
|
162
162
|
}
|
|
163
163
|
} else {
|
|
164
|
-
|
|
164
|
+
_chunk5APD2MNVjs.logger.error(String(error));
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function commandAction(handler) {
|
|
@@ -192,27 +192,27 @@ function logPatchStatusReport(report) {
|
|
|
192
192
|
(entry) => entry.status === "skipped" || entry.status === "unsupported"
|
|
193
193
|
);
|
|
194
194
|
const packageLabel = `${_nullishCoalesce(report.package.name, () => ( "tailwindcss"))}@${_nullishCoalesce(report.package.version, () => ( "unknown"))}`;
|
|
195
|
-
|
|
195
|
+
_chunk5APD2MNVjs.logger.info(`Patch status for ${packageLabel} (v${report.majorVersion})`);
|
|
196
196
|
if (applied.length) {
|
|
197
|
-
|
|
197
|
+
_chunk5APD2MNVjs.logger.success("Applied:");
|
|
198
198
|
applied.forEach((entry) => {
|
|
199
|
-
|
|
199
|
+
_chunk5APD2MNVjs.logger.success(` - ${entry.name}${formatStatusFilesHint(entry.files)}`);
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
if (pending.length) {
|
|
203
|
-
|
|
203
|
+
_chunk5APD2MNVjs.logger.warn("Needs attention:");
|
|
204
204
|
pending.forEach((entry) => {
|
|
205
205
|
const details = entry.reason ? ` - ${entry.reason}` : "";
|
|
206
|
-
|
|
206
|
+
_chunk5APD2MNVjs.logger.warn(` - ${entry.name}${formatStatusFilesHint(entry.files)}${details}`);
|
|
207
207
|
});
|
|
208
208
|
} else {
|
|
209
|
-
|
|
209
|
+
_chunk5APD2MNVjs.logger.success("All applicable patches are applied.");
|
|
210
210
|
}
|
|
211
211
|
if (skipped.length) {
|
|
212
|
-
|
|
212
|
+
_chunk5APD2MNVjs.logger.info("Skipped:");
|
|
213
213
|
skipped.forEach((entry) => {
|
|
214
214
|
const details = entry.reason ? ` - ${entry.reason}` : "";
|
|
215
|
-
|
|
215
|
+
_chunk5APD2MNVjs.logger.info(` - ${entry.name}${details}`);
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -225,12 +225,12 @@ var DEFAULT_EXTEND_LENGTH_UNITS_FEATURE = {
|
|
|
225
225
|
};
|
|
226
226
|
function withDefaultExtendLengthUnits(options) {
|
|
227
227
|
const normalized = _nullishCoalesce(options, () => ( {}));
|
|
228
|
-
const extendLengthUnits = _optionalChain([normalized, 'access', _3 => _3.
|
|
228
|
+
const extendLengthUnits = _optionalChain([normalized, 'access', _3 => _3.apply, 'optionalAccess', _4 => _4.extendLengthUnits]);
|
|
229
229
|
if (extendLengthUnits == null) {
|
|
230
230
|
return {
|
|
231
231
|
...normalized,
|
|
232
|
-
|
|
233
|
-
..._nullishCoalesce(normalized.
|
|
232
|
+
apply: {
|
|
233
|
+
..._nullishCoalesce(normalized.apply, () => ( {})),
|
|
234
234
|
extendLengthUnits: DEFAULT_EXTEND_LENGTH_UNITS_FEATURE
|
|
235
235
|
}
|
|
236
236
|
};
|
|
@@ -238,11 +238,11 @@ function withDefaultExtendLengthUnits(options) {
|
|
|
238
238
|
return normalized;
|
|
239
239
|
}
|
|
240
240
|
function buildExtendLengthUnitsOverride(options) {
|
|
241
|
-
const extendLengthUnits = _optionalChain([options, 'optionalAccess', _5 => _5.
|
|
241
|
+
const extendLengthUnits = _optionalChain([options, 'optionalAccess', _5 => _5.apply, 'optionalAccess', _6 => _6.extendLengthUnits]);
|
|
242
242
|
if (extendLengthUnits == null) {
|
|
243
243
|
return {
|
|
244
|
-
|
|
245
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _7 => _7.
|
|
244
|
+
apply: {
|
|
245
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _7 => _7.apply]), () => ( {})),
|
|
246
246
|
extendLengthUnits: DEFAULT_EXTEND_LENGTH_UNITS_FEATURE
|
|
247
247
|
}
|
|
248
248
|
};
|
|
@@ -377,14 +377,14 @@ function summarizeWorkspaceResults(results) {
|
|
|
377
377
|
const patched = results.filter((result) => result.status === "patched").length;
|
|
378
378
|
const skipped = results.filter((result) => result.status === "skipped").length;
|
|
379
379
|
const failed = results.filter((result) => result.status === "failed").length;
|
|
380
|
-
|
|
380
|
+
_chunk5APD2MNVjs.logger.info("[workspace] \u6C47\u603B\uFF1A\u5DF2\u8865\u4E01 %d\uFF0C\u8DF3\u8FC7 %d\uFF0C\u5931\u8D25 %d", patched, skipped, failed);
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
// src/cli/workspace/patch-package.ts
|
|
384
384
|
function createWorkspacePatcher(cwd) {
|
|
385
385
|
const normalized = _tailwindcsspatch.normalizeOptions.call(void 0,
|
|
386
386
|
withDefaultExtendLengthUnits({
|
|
387
|
-
cwd
|
|
387
|
+
projectRoot: cwd
|
|
388
388
|
})
|
|
389
389
|
);
|
|
390
390
|
return new (0, _tailwindcsspatch.TailwindcssPatcher)(normalized);
|
|
@@ -393,7 +393,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
|
|
|
393
393
|
const displayName = formatDisplayName(workspaceRoot, dir, pkgName);
|
|
394
394
|
const tailwindInfo = getTailwindcssPackageInfo({ paths: [dir] });
|
|
395
395
|
if (!_optionalChain([tailwindInfo, 'optionalAccess', _11 => _11.rootPath])) {
|
|
396
|
-
|
|
396
|
+
_chunk5APD2MNVjs.logger.info("[workspace] \u8DF3\u8FC7 %s\uFF08tailwindcss \u672A\u5B89\u88C5\uFF09\u3002", displayName);
|
|
397
397
|
return {
|
|
398
398
|
dir,
|
|
399
399
|
name: pkgName,
|
|
@@ -404,23 +404,23 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
|
|
|
404
404
|
try {
|
|
405
405
|
const patcher = createWorkspacePatcher(dir);
|
|
406
406
|
if (options.clearCache) {
|
|
407
|
-
await
|
|
407
|
+
await _chunkBFZDZRA5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
|
|
408
408
|
}
|
|
409
|
-
const recorder =
|
|
409
|
+
const recorder = _chunkBFZDZRA5js.createPatchTargetRecorder.call(void 0, dir, patcher, {
|
|
410
410
|
source: "cli",
|
|
411
411
|
cwd: dir,
|
|
412
412
|
recordTarget: options.recordTarget !== false,
|
|
413
413
|
alwaysRecord: true
|
|
414
414
|
});
|
|
415
415
|
if (_optionalChain([recorder, 'optionalAccess', _12 => _12.message])) {
|
|
416
|
-
|
|
416
|
+
_chunk5APD2MNVjs.logger.info("[workspace] %s %s", displayName, recorder.message);
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
_chunkBFZDZRA5js.logTailwindcssTarget.call(void 0, "cli", patcher, dir);
|
|
419
419
|
await patcher.patch();
|
|
420
420
|
if (_optionalChain([recorder, 'optionalAccess', _13 => _13.onPatched])) {
|
|
421
421
|
await recorder.onPatched();
|
|
422
422
|
}
|
|
423
|
-
|
|
423
|
+
_chunk5APD2MNVjs.logger.success("[workspace] \u5DF2\u8865\u4E01 %s", displayName);
|
|
424
424
|
return {
|
|
425
425
|
dir,
|
|
426
426
|
name: pkgName,
|
|
@@ -431,7 +431,7 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
|
|
|
431
431
|
const reason = error instanceof Error ? error.message : String(error);
|
|
432
432
|
const suggestion = `\u8BF7\u5728 ${dir} \u8FD0\u884C "weapp-tw patch --cwd ${dir}".`;
|
|
433
433
|
const message = `${reason}\uFF0C${suggestion}`;
|
|
434
|
-
|
|
434
|
+
_chunk5APD2MNVjs.logger.error("[workspace] \u8865\u4E01\u5931\u8D25 %s\uFF1A%s", displayName, message);
|
|
435
435
|
return {
|
|
436
436
|
dir,
|
|
437
437
|
name: pkgName,
|
|
@@ -444,10 +444,10 @@ async function patchWorkspacePackage(workspaceRoot, dir, pkgName, options) {
|
|
|
444
444
|
// src/cli/workspace.ts
|
|
445
445
|
async function patchWorkspace(options) {
|
|
446
446
|
const cwd = _nullishCoalesce(options.cwd, () => ( _process2.default.cwd()));
|
|
447
|
-
const workspaceRoot = _nullishCoalesce(
|
|
447
|
+
const workspaceRoot = _nullishCoalesce(_chunk5APD2MNVjs.findWorkspaceRoot.call(void 0, cwd), () => ( cwd));
|
|
448
448
|
const packageDirs = await resolveWorkspacePackageDirs(workspaceRoot);
|
|
449
449
|
if (packageDirs.length === 0) {
|
|
450
|
-
|
|
450
|
+
_chunk5APD2MNVjs.logger.warn("\u672A\u5728 %s \u68C0\u6D4B\u5230 workspace \u5305\uFF0C\u5DF2\u8DF3\u8FC7\u6279\u91CF patch\u3002", workspaceRoot);
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
453
|
const results = [];
|
|
@@ -462,12 +462,12 @@ async function patchWorkspace(options) {
|
|
|
462
462
|
// src/cli/mount-options.ts
|
|
463
463
|
function handleCliError2(error) {
|
|
464
464
|
if (error instanceof Error) {
|
|
465
|
-
|
|
465
|
+
_chunk5APD2MNVjs.logger.error(error.message);
|
|
466
466
|
if (error.stack && _process2.default.env.WEAPP_TW_DEBUG === "1") {
|
|
467
|
-
|
|
467
|
+
_chunk5APD2MNVjs.logger.error(error.stack);
|
|
468
468
|
}
|
|
469
469
|
} else {
|
|
470
|
-
|
|
470
|
+
_chunk5APD2MNVjs.logger.error(String(error));
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
function withCommandErrorHandling(handler) {
|
|
@@ -546,26 +546,26 @@ var mountOptions = {
|
|
|
546
546
|
}
|
|
547
547
|
const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
|
|
548
548
|
if (shouldClearCache) {
|
|
549
|
-
await
|
|
549
|
+
await _chunkBFZDZRA5js.clearTailwindcssPatcherCache.call(void 0, patcher, { removeDirectory: true });
|
|
550
550
|
}
|
|
551
|
-
const recorder =
|
|
551
|
+
const recorder = _chunkBFZDZRA5js.createPatchTargetRecorder.call(void 0, ctx.cwd, patcher, {
|
|
552
552
|
source: "cli",
|
|
553
553
|
cwd: ctx.cwd,
|
|
554
554
|
recordTarget: shouldRecordTarget,
|
|
555
555
|
alwaysRecord: true
|
|
556
556
|
});
|
|
557
557
|
if (_optionalChain([recorder, 'optionalAccess', _15 => _15.message])) {
|
|
558
|
-
|
|
558
|
+
_chunk5APD2MNVjs.logger.info(recorder.message);
|
|
559
559
|
}
|
|
560
|
-
|
|
560
|
+
_chunkBFZDZRA5js.logTailwindcssTarget.call(void 0, "cli", patcher, ctx.cwd);
|
|
561
561
|
await patcher.patch();
|
|
562
562
|
if (_optionalChain([recorder, 'optionalAccess', _16 => _16.onPatched])) {
|
|
563
563
|
const recordPath = await recorder.onPatched();
|
|
564
564
|
if (recordPath) {
|
|
565
|
-
|
|
565
|
+
_chunk5APD2MNVjs.logger.info(`\u8BB0\u5F55 weapp-tw patch \u76EE\u6807 -> ${formatOutputPath(recordPath, ctx.cwd)}`);
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
|
|
568
|
+
_chunk5APD2MNVjs.logger.success("Tailwind CSS \u8FD0\u884C\u65F6\u8865\u4E01\u5DF2\u5B8C\u6210\u3002");
|
|
569
569
|
}),
|
|
570
570
|
extract: withCommandErrorHandling(async (_ctx, next) => next()),
|
|
571
571
|
tokens: withCommandErrorHandling(async (_ctx, next) => next()),
|
|
@@ -574,7 +574,7 @@ var mountOptions = {
|
|
|
574
574
|
const patcher = await createPatcherWithDefaultExtendLengthUnits(ctx);
|
|
575
575
|
const report = await patcher.getPatchStatus();
|
|
576
576
|
if (ctx.args.json) {
|
|
577
|
-
|
|
577
|
+
_chunk5APD2MNVjs.logger.log(JSON.stringify(report, null, 2));
|
|
578
578
|
return report;
|
|
579
579
|
}
|
|
580
580
|
logPatchStatusReport(report);
|
|
@@ -705,9 +705,9 @@ async function generateVscodeIntellisenseEntry(options) {
|
|
|
705
705
|
|
|
706
706
|
// src/cli.ts
|
|
707
707
|
_process2.default.title = "node (weapp-tailwindcss)";
|
|
708
|
-
if (_semver2.default.lt(_process2.default.versions.node,
|
|
709
|
-
|
|
710
|
-
`You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${
|
|
708
|
+
if (_semver2.default.lt(_process2.default.versions.node, _chunkBFZDZRA5js.WEAPP_TW_REQUIRED_NODE_VERSION)) {
|
|
709
|
+
_chunk5APD2MNVjs.logger.warn(
|
|
710
|
+
`You are using Node.js ${_process2.default.versions.node}. For weapp-tailwindcss, Node.js version >= v${_chunkBFZDZRA5js.WEAPP_TW_REQUIRED_NODE_VERSION} is required.`
|
|
711
711
|
);
|
|
712
712
|
}
|
|
713
713
|
var cli = _tailwindcsspatch.createTailwindcssPatchCli.call(void 0, {
|
|
@@ -732,7 +732,7 @@ cli.command("vscode-entry", "Generate a VS Code helper CSS for Tailwind IntelliS
|
|
|
732
732
|
sources,
|
|
733
733
|
force
|
|
734
734
|
});
|
|
735
|
-
|
|
735
|
+
_chunk5APD2MNVjs.logger.success(
|
|
736
736
|
`VS Code helper generated -> ${formatOutputPath(result.outputPath, resolvedCwd)}`
|
|
737
737
|
);
|
|
738
738
|
})
|
package/dist/cli.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
clearTailwindcssPatcherCache,
|
|
4
4
|
createPatchTargetRecorder,
|
|
5
5
|
logTailwindcssTarget
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OYR4XWM4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
findWorkspaceRoot,
|
|
9
9
|
logger
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QOTLDKI4.mjs";
|
|
11
|
+
import "./chunk-3WUHHFLF.mjs";
|
|
12
12
|
import "./chunk-OOHJLO5M.mjs";
|
|
13
13
|
import "./chunk-HT76VHOV.mjs";
|
|
14
14
|
|
|
@@ -225,12 +225,12 @@ var DEFAULT_EXTEND_LENGTH_UNITS_FEATURE = {
|
|
|
225
225
|
};
|
|
226
226
|
function withDefaultExtendLengthUnits(options) {
|
|
227
227
|
const normalized = options ?? {};
|
|
228
|
-
const extendLengthUnits = normalized.
|
|
228
|
+
const extendLengthUnits = normalized.apply?.extendLengthUnits;
|
|
229
229
|
if (extendLengthUnits == null) {
|
|
230
230
|
return {
|
|
231
231
|
...normalized,
|
|
232
|
-
|
|
233
|
-
...normalized.
|
|
232
|
+
apply: {
|
|
233
|
+
...normalized.apply ?? {},
|
|
234
234
|
extendLengthUnits: DEFAULT_EXTEND_LENGTH_UNITS_FEATURE
|
|
235
235
|
}
|
|
236
236
|
};
|
|
@@ -238,11 +238,11 @@ function withDefaultExtendLengthUnits(options) {
|
|
|
238
238
|
return normalized;
|
|
239
239
|
}
|
|
240
240
|
function buildExtendLengthUnitsOverride(options) {
|
|
241
|
-
const extendLengthUnits = options?.
|
|
241
|
+
const extendLengthUnits = options?.apply?.extendLengthUnits;
|
|
242
242
|
if (extendLengthUnits == null) {
|
|
243
243
|
return {
|
|
244
|
-
|
|
245
|
-
...options?.
|
|
244
|
+
apply: {
|
|
245
|
+
...options?.apply ?? {},
|
|
246
246
|
extendLengthUnits: DEFAULT_EXTEND_LENGTH_UNITS_FEATURE
|
|
247
247
|
}
|
|
248
248
|
};
|
|
@@ -384,7 +384,7 @@ function summarizeWorkspaceResults(results) {
|
|
|
384
384
|
function createWorkspacePatcher(cwd) {
|
|
385
385
|
const normalized = normalizeOptions(
|
|
386
386
|
withDefaultExtendLengthUnits({
|
|
387
|
-
cwd
|
|
387
|
+
projectRoot: cwd
|
|
388
388
|
})
|
|
389
389
|
);
|
|
390
390
|
return new TailwindcssPatcher(normalized);
|
package/dist/core.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.mjs';
|
|
2
2
|
import * as postcss from 'postcss';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-B6U7MoOM.mjs';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions, JsHandlerResult } from './types.js';
|
|
2
2
|
import * as postcss from 'postcss';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-B6U7MoOM.js';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/core.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
|
-
var
|
|
3
|
+
var _chunkY6OZDS7Vjs = require('./chunk-Y6OZDS7V.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunkBFZDZRA5js = require('./chunk-BFZDZRA5.js');
|
|
8
|
+
require('./chunk-5APD2MNV.js');
|
|
9
|
+
require('./chunk-5U24PLVV.js');
|
|
10
10
|
require('./chunk-DYLQ6UOI.js');
|
|
11
11
|
require('./chunk-DBAAU4LK.js');
|
|
12
12
|
|
|
@@ -14,9 +14,9 @@ require('./chunk-DBAAU4LK.js');
|
|
|
14
14
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
15
15
|
var _shared = require('@weapp-tailwindcss/shared');
|
|
16
16
|
function createContext(options = {}) {
|
|
17
|
-
const opts =
|
|
17
|
+
const opts = _chunkBFZDZRA5js.getCompilerContext.call(void 0, options);
|
|
18
18
|
const { templateHandler, styleHandler, jsHandler, twPatcher: initialTwPatcher, refreshTailwindcssPatcher } = opts;
|
|
19
|
-
const patchRecorderState =
|
|
19
|
+
const patchRecorderState = _chunkY6OZDS7Vjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
|
|
20
20
|
source: "runtime",
|
|
21
21
|
cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
|
|
22
22
|
});
|
|
@@ -32,7 +32,7 @@ function createContext(options = {}) {
|
|
|
32
32
|
const result = await styleHandler(rawCss, _shared.defuOverrideArray.call(void 0, options2, {
|
|
33
33
|
isMainChunk: true
|
|
34
34
|
}));
|
|
35
|
-
runtimeSet = await
|
|
35
|
+
runtimeSet = await _chunkBFZDZRA5js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
36
36
|
forceRefresh: true,
|
|
37
37
|
forceCollect: true
|
|
38
38
|
});
|
|
@@ -43,7 +43,7 @@ function createContext(options = {}) {
|
|
|
43
43
|
if (_optionalChain([options2, 'optionalAccess', _ => _.runtimeSet])) {
|
|
44
44
|
runtimeSet = options2.runtimeSet;
|
|
45
45
|
} else if (runtimeSet.size === 0) {
|
|
46
|
-
runtimeSet = await
|
|
46
|
+
runtimeSet = await _chunkBFZDZRA5js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
47
47
|
forceCollect: true
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -55,7 +55,7 @@ function createContext(options = {}) {
|
|
|
55
55
|
async function transformWxml(rawWxml, options2) {
|
|
56
56
|
await runtimeState.patchPromise;
|
|
57
57
|
if (!_optionalChain([options2, 'optionalAccess', _2 => _2.runtimeSet]) && runtimeSet.size === 0) {
|
|
58
|
-
runtimeSet = await
|
|
58
|
+
runtimeSet = await _chunkBFZDZRA5js.ensureRuntimeClassSet.call(void 0, runtimeState, {
|
|
59
59
|
forceCollect: true
|
|
60
60
|
});
|
|
61
61
|
}
|
package/dist/core.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setupPatchRecorder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KAK3XMAW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ensureRuntimeClassSet,
|
|
6
6
|
getCompilerContext
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-OYR4XWM4.mjs";
|
|
8
|
+
import "./chunk-QOTLDKI4.mjs";
|
|
9
|
+
import "./chunk-3WUHHFLF.mjs";
|
|
10
10
|
import "./chunk-OOHJLO5M.mjs";
|
|
11
11
|
import "./chunk-HT76VHOV.mjs";
|
|
12
12
|
|
package/dist/defaults.d.mts
CHANGED
package/dist/defaults.d.ts
CHANGED
package/dist/defaults.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5U24PLVVjs = require('./chunk-5U24PLVV.js');
|
|
4
4
|
require('./chunk-DYLQ6UOI.js');
|
|
5
5
|
require('./chunk-DBAAU4LK.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.getDefaultOptions =
|
|
8
|
+
exports.getDefaultOptions = _chunk5U24PLVVjs.getDefaultOptions;
|
package/dist/defaults.mjs
CHANGED
package/dist/gulp.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-B6U7MoOM.mjs';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/gulp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITemplateHandlerOptions, CreateJsHandlerOptions } from './types.js';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
|
-
import { U as UserDefinedOptions } from './index-
|
|
3
|
+
import { U as UserDefinedOptions } from './index-B6U7MoOM.js';
|
|
4
4
|
import { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
5
5
|
import '@babel/parser';
|
|
6
6
|
import 'magic-string';
|
package/dist/gulp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkWQPYYMRLjs = require('./chunk-WQPYYMRL.js');
|
|
4
4
|
require('./chunk-LTJQUORK.js');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-Y6OZDS7V.js');
|
|
6
|
+
require('./chunk-BFZDZRA5.js');
|
|
7
|
+
require('./chunk-5APD2MNV.js');
|
|
8
|
+
require('./chunk-5U24PLVV.js');
|
|
9
9
|
require('./chunk-DYLQ6UOI.js');
|
|
10
10
|
require('./chunk-DBAAU4LK.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.createPlugins =
|
|
13
|
+
exports.createPlugins = _chunkWQPYYMRLjs.createPlugins;
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPlugins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XCKQ4YQM.mjs";
|
|
4
4
|
import "./chunk-RRHPTTCP.mjs";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-KAK3XMAW.mjs";
|
|
6
|
+
import "./chunk-OYR4XWM4.mjs";
|
|
7
|
+
import "./chunk-QOTLDKI4.mjs";
|
|
8
|
+
import "./chunk-3WUHHFLF.mjs";
|
|
9
9
|
import "./chunk-OOHJLO5M.mjs";
|
|
10
10
|
import "./chunk-HT76VHOV.mjs";
|
|
11
11
|
export {
|
|
@@ -122,6 +122,18 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
122
122
|
* 当 Tailwind 与 JS 字面量冲突时,可通过回调返回 `true` 保留当前值,返回 `false` 或 `undefined` 则继续转义。默认保留所有带 `*` 的字符串字面量。
|
|
123
123
|
*/
|
|
124
124
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* 运行时类集合可能滞后时,是否对未命中 `classNameSet` 的候选类名执行保守兜底转义。
|
|
127
|
+
*
|
|
128
|
+
* @group 3.一般配置
|
|
129
|
+
* @remarks
|
|
130
|
+
* 适用于 Vite HMR / watch 增量场景中 class 集合暂时过期的情况。
|
|
131
|
+
*
|
|
132
|
+
* - `true`: 始终启用兜底转义(正确性优先,建议配合 `jsPreserveClass` 避免误伤)
|
|
133
|
+
* - `false`: 仅转换命中 `classNameSet` 的候选类名
|
|
134
|
+
* - 未配置:Vite `serve` / `build --watch` 默认启用,其它模式默认关闭
|
|
135
|
+
*/
|
|
136
|
+
staleClassNameFallback?: boolean;
|
|
125
137
|
/**
|
|
126
138
|
* 是否替换运行时依赖包名。
|
|
127
139
|
*
|
|
@@ -483,7 +495,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
483
495
|
* @since ^4.0.0
|
|
484
496
|
* @group 0.重要配置
|
|
485
497
|
*/
|
|
486
|
-
tailwindcss?: TailwindcssPatchOptions['
|
|
498
|
+
tailwindcss?: TailwindcssPatchOptions['tailwindcss'];
|
|
487
499
|
/**
|
|
488
500
|
* 指定 tailwindcss@4 的入口 CSS。
|
|
489
501
|
*
|
|
@@ -122,6 +122,18 @@ interface UserDefinedOptionsGeneralPart {
|
|
|
122
122
|
* 当 Tailwind 与 JS 字面量冲突时,可通过回调返回 `true` 保留当前值,返回 `false` 或 `undefined` 则继续转义。默认保留所有带 `*` 的字符串字面量。
|
|
123
123
|
*/
|
|
124
124
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* 运行时类集合可能滞后时,是否对未命中 `classNameSet` 的候选类名执行保守兜底转义。
|
|
127
|
+
*
|
|
128
|
+
* @group 3.一般配置
|
|
129
|
+
* @remarks
|
|
130
|
+
* 适用于 Vite HMR / watch 增量场景中 class 集合暂时过期的情况。
|
|
131
|
+
*
|
|
132
|
+
* - `true`: 始终启用兜底转义(正确性优先,建议配合 `jsPreserveClass` 避免误伤)
|
|
133
|
+
* - `false`: 仅转换命中 `classNameSet` 的候选类名
|
|
134
|
+
* - 未配置:Vite `serve` / `build --watch` 默认启用,其它模式默认关闭
|
|
135
|
+
*/
|
|
136
|
+
staleClassNameFallback?: boolean;
|
|
125
137
|
/**
|
|
126
138
|
* 是否替换运行时依赖包名。
|
|
127
139
|
*
|
|
@@ -483,7 +495,7 @@ interface UserDefinedOptionsImportantPart {
|
|
|
483
495
|
* @since ^4.0.0
|
|
484
496
|
* @group 0.重要配置
|
|
485
497
|
*/
|
|
486
|
-
tailwindcss?: TailwindcssPatchOptions['
|
|
498
|
+
tailwindcss?: TailwindcssPatchOptions['tailwindcss'];
|
|
487
499
|
/**
|
|
488
500
|
* 指定 tailwindcss@4 的入口 CSS。
|
|
489
501
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ export { createPlugins } from './gulp.mjs';
|
|
|
2
2
|
export { CreateJsHandlerOptions, IBaseWebpackPlugin, ICommonReplaceOptions, IJsHandlerOptions, ITemplateHandlerOptions, InternalPatchResult, InternalPostcssOptions, InternalUserDefinedOptions, JsHandler, JsHandlerResult, JsModuleGraphOptions, LinkedJsModuleResult, RefreshTailwindcssPatcherOptions, TailwindcssPatcherLike } from './types.mjs';
|
|
3
3
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
|
|
4
4
|
export { UnifiedWebpackPluginV5, weappTailwindcssPackageDir } from './webpack.mjs';
|
|
5
|
-
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-
|
|
5
|
+
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-B6U7MoOM.mjs';
|
|
6
6
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createPlugins } from './gulp.js';
|
|
|
2
2
|
export { CreateJsHandlerOptions, IBaseWebpackPlugin, ICommonReplaceOptions, IJsHandlerOptions, ITemplateHandlerOptions, InternalPatchResult, InternalPostcssOptions, InternalUserDefinedOptions, JsHandler, JsHandlerResult, JsModuleGraphOptions, LinkedJsModuleResult, RefreshTailwindcssPatcherOptions, TailwindcssPatcherLike } from './types.js';
|
|
3
3
|
export { UnifiedViteWeappTailwindcssPlugin } from './vite.js';
|
|
4
4
|
export { UnifiedWebpackPluginV5, weappTailwindcssPackageDir } from './webpack.js';
|
|
5
|
-
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-
|
|
5
|
+
export { A as AppType, D as DisabledOptions, I as IArbitraryValues, a as ICustomAttributes, b as ICustomAttributesEntities, c as ItemOrItemArray, U as UserDefinedOptions } from './index-B6U7MoOM.js';
|
|
6
6
|
export { CssPreflightOptions, IStyleHandlerOptions } from '@weapp-tailwindcss/postcss';
|
|
7
7
|
import 'node:stream';
|
|
8
8
|
import '@babel/parser';
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkOCV5QLZMjs = require('./chunk-OCV5QLZM.js');
|
|
5
|
+
require('./chunk-GQVBN7UT.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkWQPYYMRLjs = require('./chunk-WQPYYMRL.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkPLI5CO4Ujs = require('./chunk-PLI5CO4U.js');
|
|
12
12
|
require('./chunk-IIDSY4XZ.js');
|
|
13
13
|
require('./chunk-LTJQUORK.js');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-Y6OZDS7V.js');
|
|
15
|
+
require('./chunk-BFZDZRA5.js');
|
|
16
|
+
require('./chunk-5APD2MNV.js');
|
|
17
|
+
require('./chunk-5U24PLVV.js');
|
|
18
18
|
require('./chunk-DYLQ6UOI.js');
|
|
19
19
|
require('./chunk-DBAAU4LK.js');
|
|
20
20
|
|
|
@@ -22,4 +22,4 @@ require('./chunk-DBAAU4LK.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
25
|
+
exports.UnifiedViteWeappTailwindcssPlugin = _chunkPLI5CO4Ujs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkOCV5QLZMjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkWQPYYMRLjs.createPlugins; exports.weappTailwindcssPackageDir = _chunkOCV5QLZMjs.weappTailwindcssPackageDir;
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedWebpackPluginV5,
|
|
3
3
|
weappTailwindcssPackageDir
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3A7VW4BZ.mjs";
|
|
5
|
+
import "./chunk-JP45MK3F.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createPlugins
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XCKQ4YQM.mjs";
|
|
9
9
|
import {
|
|
10
10
|
UnifiedViteWeappTailwindcssPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UELU5NFH.mjs";
|
|
12
12
|
import "./chunk-F2CKKG6Q.mjs";
|
|
13
13
|
import "./chunk-RRHPTTCP.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KAK3XMAW.mjs";
|
|
15
|
+
import "./chunk-OYR4XWM4.mjs";
|
|
16
|
+
import "./chunk-QOTLDKI4.mjs";
|
|
17
|
+
import "./chunk-3WUHHFLF.mjs";
|
|
18
18
|
import "./chunk-OOHJLO5M.mjs";
|
|
19
19
|
import "./chunk-HT76VHOV.mjs";
|
|
20
20
|
export {
|