tailwindcss-patch 9.5.1 → 10.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/bin/tw-patch.js +1 -1
- package/dist/{validate-CgrG4aAY.d.mts → cli-BF06JrJm.d.ts} +6 -2
- package/dist/{validate-Cu1G06lO.mjs → cli-BvMS3VVq.js} +676 -33
- package/dist/cli.js +9 -10
- package/dist/commands/cli-runtime.d.ts +1 -7
- package/dist/commands/cli-runtime.js +2 -9
- package/dist/index.d.ts +5 -6
- package/dist/index.js +14 -329
- package/package.json +24 -20
- package/src/babel/index.ts +3 -10
- package/src/commands/migration-source.ts +1 -1
- package/src/index.bundle.ts +5 -14
- package/src/patching/operations/export-context/postcss-v2.ts +1 -1
- package/src/patching/operations/export-context/postcss-v3.ts +1 -1
- package/dist/cli-Bv15iTiT.mjs +0 -655
- package/dist/cli-Db2YAbkN.js +0 -671
- package/dist/cli.d.mts +0 -1
- package/dist/cli.mjs +0 -21
- package/dist/commands/cli-runtime.d.mts +0 -8
- package/dist/commands/cli-runtime.mjs +0 -3
- package/dist/dist-wp0o36Ns.js +0 -21
- package/dist/index.d.mts +0 -93
- package/dist/index.mjs +0 -66
- package/dist/validate-B5-08lrU.d.ts +0 -599
- package/dist/validate-C8oLv32F.js +0 -3282
- /package/dist/{dist-CxmNpfyy.mjs → dist-CxmNpfyy.js} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let node_process = require("node:process");
|
|
4
|
-
node_process = require_validate.__toESM(node_process);
|
|
1
|
+
import { D as logger, o as ValidateCommandError, t as createTailwindcssPatchCli } from "./cli-BvMS3VVq.js";
|
|
2
|
+
import process from "node:process";
|
|
5
3
|
//#region src/cli.ts
|
|
6
4
|
async function main() {
|
|
7
|
-
const cli =
|
|
5
|
+
const cli = createTailwindcssPatchCli();
|
|
8
6
|
cli.help();
|
|
9
|
-
cli.parse(
|
|
7
|
+
cli.parse(process.argv, { run: false });
|
|
10
8
|
await cli.runMatchedCommand();
|
|
11
9
|
}
|
|
12
10
|
main().catch((error) => {
|
|
13
|
-
if (error instanceof
|
|
14
|
-
|
|
11
|
+
if (error instanceof ValidateCommandError) {
|
|
12
|
+
process.exitCode = error.exitCode;
|
|
15
13
|
return;
|
|
16
14
|
}
|
|
17
15
|
const message = error instanceof Error ? error.message : String(error);
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
logger.error(message);
|
|
17
|
+
process.exitCode = 1;
|
|
20
18
|
});
|
|
21
19
|
//#endregion
|
|
20
|
+
export {};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { CAC } from "cac";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/cli.d.ts
|
|
5
|
-
declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
|
|
6
|
-
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
7
|
-
//#endregion
|
|
1
|
+
import { _ as TailwindcssPatchCommandOptions, a as ValidateCommandError, c as ValidateJsonFailurePayload, d as TailwindcssPatchCliOptions, f as TailwindcssPatchCommand, g as TailwindcssPatchCommandOptionDefinition, h as TailwindcssPatchCommandHandlerMap, i as VALIDATE_FAILURE_REASONS, l as ValidateJsonSuccessPayload, m as TailwindcssPatchCommandHandler, n as mountTailwindcssPatchCommands, o as ValidateFailureReason, p as TailwindcssPatchCommandContext, r as VALIDATE_EXIT_CODES, s as ValidateFailureSummary, t as createTailwindcssPatchCli, u as TailwindcssPatchCliMountOptions, v as tailwindcssPatchCommands } from "../cli-BF06JrJm.js";
|
|
8
2
|
export { type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, createTailwindcssPatchCli, mountTailwindcssPatchCommands, tailwindcssPatchCommands };
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const require_cli = require("../cli-Db2YAbkN.js");
|
|
4
|
-
exports.VALIDATE_EXIT_CODES = require_validate.VALIDATE_EXIT_CODES;
|
|
5
|
-
exports.VALIDATE_FAILURE_REASONS = require_validate.VALIDATE_FAILURE_REASONS;
|
|
6
|
-
exports.ValidateCommandError = require_validate.ValidateCommandError;
|
|
7
|
-
exports.createTailwindcssPatchCli = require_cli.createTailwindcssPatchCli;
|
|
8
|
-
exports.mountTailwindcssPatchCommands = require_cli.mountTailwindcssPatchCommands;
|
|
9
|
-
exports.tailwindcssPatchCommands = require_validate.tailwindcssPatchCommands;
|
|
1
|
+
import { a as VALIDATE_FAILURE_REASONS, i as VALIDATE_EXIT_CODES, n as mountTailwindcssPatchCommands, o as ValidateCommandError, r as tailwindcssPatchCommands, t as createTailwindcssPatchCli } from "../cli-BvMS3VVq.js";
|
|
2
|
+
export { VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, createTailwindcssPatchCli, mountTailwindcssPatchCommands, tailwindcssPatchCommands };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { CAC } from "cac";
|
|
1
|
+
import { $ as PatchCheckStatus, A as extractRawCandidates, B as CacheStrategy, C as RestoreConfigFilesResult, D as TailwindcssPatcher, E as logger, F as groupTokensByFile, G as NormalizedTailwindCssPatchOptions, H as ExtendLengthUnitsOptions, I as resolveProjectSourceFiles, J as TailwindV2Options, K as TailwindCssOptions, L as normalizeOptions, M as extractSourceCandidates, N as extractSourceCandidatesWithPositions, O as ExtractSourceCandidate, P as extractValidCandidates, Q as ILengthUnitsPatchOptions, R as ApplyOptions, S as RestoreConfigFilesOptions, T as MIGRATION_REPORT_SCHEMA_VERSION, U as ExtractOptions, V as ExposeContextOptions, W as NormalizedCacheOptions, X as TailwindV4Options, Y as TailwindV3Options, Z as ExtractResult, _ as TailwindcssPatchCommandOptions, _t as CacheReadResult, a as ValidateCommandError, at as TailwindTokenFileKey, b as ConfigFileMigrationReport, c as ValidateJsonFailurePayload, ct as TailwindcssClassCache, d as TailwindcssPatchCliOptions, dt as CacheClearResult, et as PatchName, f as TailwindcssPatchCommand, ft as CacheClearScope, g as TailwindcssPatchCommandOptionDefinition, gt as CacheReadMeta, h as TailwindcssPatchCommandHandlerMap, ht as CacheIndexFileV2, i as VALIDATE_FAILURE_REASONS, it as TailwindTokenByFileMap, j as extractRawCandidatesWithPositions, k as extractProjectCandidatesWithPositions, l as ValidateJsonSuccessPayload, lt as TailwindcssRuntimeContext, m as TailwindcssPatchCommandHandler, mt as CacheContextMetadata, n as mountTailwindcssPatchCommands$1, nt as PatchStatusReport, o as ValidateFailureReason, ot as TailwindTokenLocation, p as TailwindcssPatchCommandContext, pt as CacheContextDescriptor, q as TailwindCssPatchOptions, r as VALIDATE_EXIT_CODES, rt as TailwindPatchRuntime, s as ValidateFailureSummary, st as TailwindTokenReport, tt as PatchStatusEntry, u as TailwindcssPatchCliMountOptions, ut as CacheClearOptions, v as tailwindcssPatchCommands, w as MIGRATION_REPORT_KIND, x as MigrateConfigFilesOptions, y as ConfigFileMigrationEntry, z as CacheOptions } from "./cli-BF06JrJm.js";
|
|
3
2
|
import { PackageInfo } from "local-pkg";
|
|
4
|
-
import { TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, TAILWIND_V4_IGNORED_CONTENT_DIRS, TAILWIND_V4_IGNORED_EXTENSIONS, TAILWIND_V4_IGNORED_FILES, TailwindV4CandidateSource, TailwindV4CompiledSourceRoot, TailwindV4CssSource, TailwindV4DesignSystem, TailwindV4Engine, TailwindV4GenerateOptions, TailwindV4GenerateResult, TailwindV4ResolvedSource, TailwindV4ResolvedSource as TailwindV4ResolvedSource$1, TailwindV4SourceOptions, TailwindV4SourcePattern, TailwindV4StyleGenerateOptions, TailwindV4StyleGenerateResult, TailwindV4StyleSource, canonicalizeBareArbitraryValueCandidates, collectTailwindV4StyleCandidates, createTailwindV4CompiledSourceEntries, createTailwindV4DefaultIgnoreSources, createTailwindV4Engine, createTailwindV4RootSources, createTailwindV4SourceEntryMatcher, createTailwindV4SourceExclusionMatcher, escapeCssClassName, expandTailwindV4SourceEntries, expandTailwindV4SourceEntryBraces, extractBareArbitraryValueSourceCandidates, extractBareArbitraryValueSourceCandidatesWithPositions, generateTailwindV4Style, isBareArbitraryValuesEnabled, isFileExcludedByTailwindV4SourceEntries, isFileMatchedByTailwindV4SourceEntries, loadTailwindV4DesignSystem, mergeTailwindV4SourceEntries, normalizeTailwindV4ScannerSources, normalizeTailwindV4SourceEntries, replaceBareArbitraryValueSelectors, resolveBareArbitraryValueCandidate, resolveSourceScanPath, resolveTailwindV4Source, resolveTailwindV4SourceBaseCandidates, resolveTailwindV4SourceEntry, resolveValidTailwindV4Candidates } from "@tailwindcss-mangle/engine/v4";
|
|
5
3
|
import { CustomTailwindStyleGenerateContext, CustomTailwindStyleGenerateOptions, CustomTailwindStyleGenerateResult, TailwindStyleCandidateOptions, TailwindStyleGenerateOptions, TailwindStyleGenerateResult, TailwindStyleSource, collectTailwindStyleCandidates, generateCustomStyle, generateTailwindStyle, isValidCandidateToken, splitCandidateTokens, validateCandidateTokenRE } from "@tailwindcss-mangle/engine";
|
|
6
|
-
import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
|
|
7
4
|
import postcss from "postcss";
|
|
8
5
|
import { TailwindV3RawStyleGenerateOptions, TailwindV3RawStyleGenerateResult, TailwindV3StyleGenerateOptions, TailwindV3StyleGenerateResult, TailwindV3StyleLayer, generateTailwindV3RawStyle, generateTailwindV3Style } from "@tailwindcss-mangle/engine/v3";
|
|
6
|
+
import { TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, TAILWIND_V4_IGNORED_CONTENT_DIRS, TAILWIND_V4_IGNORED_EXTENSIONS, TAILWIND_V4_IGNORED_FILES, TailwindV4CandidateSource, TailwindV4CompiledSourceRoot, TailwindV4CssSource, TailwindV4DesignSystem, TailwindV4Engine, TailwindV4GenerateOptions, TailwindV4GenerateResult, TailwindV4ResolvedSource, TailwindV4ResolvedSource as TailwindV4ResolvedSource$1, TailwindV4SourceOptions, TailwindV4SourcePattern, TailwindV4StyleGenerateOptions, TailwindV4StyleGenerateResult, TailwindV4StyleSource, canonicalizeBareArbitraryValueCandidates, collectTailwindV4StyleCandidates, createTailwindV4CompiledSourceEntries, createTailwindV4DefaultIgnoreSources, createTailwindV4Engine, createTailwindV4RootSources, createTailwindV4SourceEntryMatcher, createTailwindV4SourceExclusionMatcher, escapeCssClassName, expandTailwindV4SourceEntries, expandTailwindV4SourceEntryBraces, extractBareArbitraryValueSourceCandidates, extractBareArbitraryValueSourceCandidatesWithPositions, generateTailwindV4Style, isBareArbitraryValuesEnabled, isFileExcludedByTailwindV4SourceEntries, isFileMatchedByTailwindV4SourceEntries, loadTailwindV4DesignSystem, mergeTailwindV4SourceEntries, normalizeTailwindV4ScannerSources, normalizeTailwindV4SourceEntries, replaceBareArbitraryValueSelectors, resolveBareArbitraryValueCandidate, resolveSourceScanPath, resolveTailwindV4Source, resolveTailwindV4SourceBaseCandidates, resolveTailwindV4SourceEntry, resolveValidTailwindV4Candidates } from "@tailwindcss-mangle/engine/v4";
|
|
7
|
+
import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
|
|
9
8
|
|
|
10
9
|
//#region src/cache/store.d.ts
|
|
11
10
|
declare class CacheStore {
|
|
@@ -87,7 +86,7 @@ declare function resolveTailwindV4SourceFromPatchOptions(options: TailwindCssPat
|
|
|
87
86
|
declare function defineConfig<T extends TailwindcssMangleConfig>(config: T): T;
|
|
88
87
|
//#endregion
|
|
89
88
|
//#region src/index.bundle.d.ts
|
|
90
|
-
declare function mountTailwindcssPatchCommands(
|
|
91
|
-
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
89
|
+
declare function mountTailwindcssPatchCommands(...args: Parameters<typeof mountTailwindcssPatchCommands$1>): import("cac").CAC;
|
|
90
|
+
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): import("cac").CAC;
|
|
92
91
|
//#endregion
|
|
93
92
|
export { type ApplyOptions, type CacheClearOptions, type CacheClearResult, type CacheClearScope, type CacheContextMetadata, type CacheOptions, type CacheReadMeta, CacheStore, type CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, type CustomTailwindStyleGenerateContext, type CustomTailwindStyleGenerateOptions, type CustomTailwindStyleGenerateResult, type ExposeContextOptions, type ExtendLengthUnitsOptions, type ExtractOptions, type ExtractResult, type ExtractSourceCandidate, ILengthUnitsPatchOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, type NormalizedTailwindCssPatchOptions, PatchCheckStatus, PatchName, PatchStatusEntry, PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, TAILWIND_V4_IGNORED_CONTENT_DIRS, TAILWIND_V4_IGNORED_EXTENSIONS, TAILWIND_V4_IGNORED_FILES, type TailwindCssOptions, type TailwindCssPatchOptions, TailwindPatchRuntime, type TailwindStyleCandidateOptions, type TailwindStyleGenerateOptions, type TailwindStyleGenerateResult, type TailwindStyleSource, type TailwindTokenByFileMap, type TailwindTokenFileKey, type TailwindTokenLocation, type TailwindTokenReport, type TailwindV2Options, type TailwindV3Options, type TailwindV3RawStyleGenerateOptions, type TailwindV3RawStyleGenerateResult, type TailwindV3StyleGenerateOptions, type TailwindV3StyleGenerateResult, type TailwindV3StyleLayer, type TailwindV4CandidateSource, type TailwindV4CompiledSourceRoot, type TailwindV4CssSource, type TailwindV4DesignSystem, type TailwindV4Engine, type TailwindV4GenerateOptions, type TailwindV4GenerateResult, type TailwindV4Options, type TailwindV4ResolvedSource, type TailwindV4SourceOptions, type TailwindV4SourcePattern, type TailwindV4StyleGenerateOptions, type TailwindV4StyleGenerateResult, type TailwindV4StyleSource, type TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, TailwindcssPatcher, type TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, canonicalizeBareArbitraryValueCandidates, collectClassesFromContexts, collectClassesFromTailwindV4, collectTailwindStyleCandidates, collectTailwindV4StyleCandidates, createTailwindV4CompiledSourceEntries, createTailwindV4DefaultIgnoreSources, createTailwindV4Engine, createTailwindV4RootSources, createTailwindV4SourceEntryMatcher, createTailwindV4SourceExclusionMatcher, createTailwindcssPatchCli, defineConfig, escapeCssClassName, expandTailwindV4SourceEntries, expandTailwindV4SourceEntryBraces, extractBareArbitraryValueSourceCandidates, extractBareArbitraryValueSourceCandidatesWithPositions, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractSourceCandidates, extractSourceCandidatesWithPositions, extractValidCandidates, generateCustomStyle, generateTailwindStyle, generateTailwindV3RawStyle, generateTailwindV3Style, generateTailwindV4Style, getPatchStatusReport, groupTokensByFile, isBareArbitraryValuesEnabled, isFileExcludedByTailwindV4SourceEntries, isFileMatchedByTailwindV4SourceEntries, isValidCandidateToken, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, mergeTailwindV4SourceEntries, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, normalizeTailwindV4ScannerSources, normalizeTailwindV4SourceEntries, replaceBareArbitraryValueSelectors, resolveBareArbitraryValueCandidate, resolveProjectSourceFiles, resolveSourceScanPath, resolveTailwindV4Source, resolveTailwindV4SourceBaseCandidates, resolveTailwindV4SourceEntry, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, splitCandidateTokens, tailwindcssPatchCommands, validateCandidateTokenRE };
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
7
|
-
let _tailwindcss_mangle_engine_v3 = require("@tailwindcss-mangle/engine/v3");
|
|
8
|
-
let _tailwindcss_mangle_engine_v4 = require("@tailwindcss-mangle/engine/v4");
|
|
1
|
+
import { C as groupTokensByFile, D as logger, E as CacheStore, S as extractValidCandidates, T as normalizeOptions, _ as extractProjectCandidatesWithPositions, a as VALIDATE_FAILURE_REASONS, b as extractSourceCandidates, c as restoreConfigFiles, d as TailwindcssPatcher, f as getPatchStatusReport, g as collectClassesFromTailwindV4, h as collectClassesFromContexts, i as VALIDATE_EXIT_CODES, l as MIGRATION_REPORT_KIND, m as loadRuntimeContexts, n as mountTailwindcssPatchCommands$1, o as ValidateCommandError, p as runTailwindBuild, r as tailwindcssPatchCommands, s as migrateConfigFiles, t as createTailwindcssPatchCli$1, u as MIGRATION_REPORT_SCHEMA_VERSION, v as extractRawCandidates, w as resolveProjectSourceFiles, x as extractSourceCandidatesWithPositions, y as extractRawCandidatesWithPositions } from "./cli-BvMS3VVq.js";
|
|
2
|
+
import path from "pathe";
|
|
3
|
+
import { collectTailwindStyleCandidates, generateCustomStyle, generateTailwindStyle, isValidCandidateToken, splitCandidateTokens, validateCandidateTokenRE } from "@tailwindcss-mangle/engine";
|
|
4
|
+
import { generateTailwindV3RawStyle, generateTailwindV3Style } from "@tailwindcss-mangle/engine/v3";
|
|
5
|
+
import { TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, TAILWIND_V4_IGNORED_CONTENT_DIRS, TAILWIND_V4_IGNORED_EXTENSIONS, TAILWIND_V4_IGNORED_FILES, canonicalizeBareArbitraryValueCandidates, collectTailwindV4StyleCandidates, createTailwindV4CompiledSourceEntries, createTailwindV4DefaultIgnoreSources, createTailwindV4Engine, createTailwindV4RootSources, createTailwindV4SourceEntryMatcher, createTailwindV4SourceExclusionMatcher, escapeCssClassName, expandTailwindV4SourceEntries, expandTailwindV4SourceEntryBraces, extractBareArbitraryValueSourceCandidates, extractBareArbitraryValueSourceCandidatesWithPositions, generateTailwindV4Style, isBareArbitraryValuesEnabled, isFileExcludedByTailwindV4SourceEntries, isFileMatchedByTailwindV4SourceEntries, loadTailwindV4DesignSystem, mergeTailwindV4SourceEntries, normalizeTailwindV4ScannerSources, normalizeTailwindV4SourceEntries, replaceBareArbitraryValueSelectors, resolveBareArbitraryValueCandidate, resolveSourceScanPath, resolveTailwindV4Source, resolveTailwindV4Source as resolveTailwindV4Source$1, resolveTailwindV4SourceBaseCandidates, resolveTailwindV4SourceEntry, resolveValidTailwindV4Candidates } from "@tailwindcss-mangle/engine/v4";
|
|
9
6
|
//#region src/v4/index.ts
|
|
10
7
|
function uniquePaths(values) {
|
|
11
8
|
const result = [];
|
|
12
9
|
for (const value of values) {
|
|
13
10
|
if (!value) continue;
|
|
14
|
-
const resolved =
|
|
11
|
+
const resolved = path.resolve(value);
|
|
15
12
|
if (!result.includes(resolved)) result.push(resolved);
|
|
16
13
|
}
|
|
17
14
|
return result;
|
|
18
15
|
}
|
|
19
16
|
function resolveConfigDir(config, projectRoot) {
|
|
20
17
|
if (!config) return;
|
|
21
|
-
const configPath =
|
|
22
|
-
return
|
|
18
|
+
const configPath = path.isAbsolute(config) ? config : path.resolve(projectRoot, config);
|
|
19
|
+
return path.dirname(configPath);
|
|
23
20
|
}
|
|
24
21
|
function createSourceOptionsFromNormalizedPatchOptions(options) {
|
|
25
22
|
const v4 = options.tailwind.v4;
|
|
@@ -42,10 +39,10 @@ function createSourceOptionsFromNormalizedPatchOptions(options) {
|
|
|
42
39
|
};
|
|
43
40
|
}
|
|
44
41
|
function tailwindV4SourceOptionsFromPatchOptions(options) {
|
|
45
|
-
return createSourceOptionsFromNormalizedPatchOptions(
|
|
42
|
+
return createSourceOptionsFromNormalizedPatchOptions(normalizeOptions(options));
|
|
46
43
|
}
|
|
47
44
|
async function resolveTailwindV4SourceFromPatchOptions(options) {
|
|
48
|
-
return
|
|
45
|
+
return resolveTailwindV4Source$1(tailwindV4SourceOptionsFromPatchOptions(options));
|
|
49
46
|
}
|
|
50
47
|
//#endregion
|
|
51
48
|
//#region src/public-api.ts
|
|
@@ -54,323 +51,11 @@ function defineConfig(config) {
|
|
|
54
51
|
}
|
|
55
52
|
//#endregion
|
|
56
53
|
//#region src/index.bundle.ts
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return require$1("./commands/cli-runtime.js");
|
|
60
|
-
}
|
|
61
|
-
function mountTailwindcssPatchCommands(cli, options = {}) {
|
|
62
|
-
return loadCliModule().mountTailwindcssPatchCommands(cli, options);
|
|
54
|
+
function mountTailwindcssPatchCommands(...args) {
|
|
55
|
+
return mountTailwindcssPatchCommands$1(...args);
|
|
63
56
|
}
|
|
64
57
|
function createTailwindcssPatchCli(options = {}) {
|
|
65
|
-
return
|
|
58
|
+
return createTailwindcssPatchCli$1(options);
|
|
66
59
|
}
|
|
67
60
|
//#endregion
|
|
68
|
-
|
|
69
|
-
exports.MIGRATION_REPORT_KIND = require_validate.MIGRATION_REPORT_KIND;
|
|
70
|
-
exports.MIGRATION_REPORT_SCHEMA_VERSION = require_validate.MIGRATION_REPORT_SCHEMA_VERSION;
|
|
71
|
-
Object.defineProperty(exports, "TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN", {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
get: function() {
|
|
74
|
-
return _tailwindcss_mangle_engine_v4.TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
Object.defineProperty(exports, "TAILWIND_V4_IGNORED_CONTENT_DIRS", {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: function() {
|
|
80
|
-
return _tailwindcss_mangle_engine_v4.TAILWIND_V4_IGNORED_CONTENT_DIRS;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
Object.defineProperty(exports, "TAILWIND_V4_IGNORED_EXTENSIONS", {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function() {
|
|
86
|
-
return _tailwindcss_mangle_engine_v4.TAILWIND_V4_IGNORED_EXTENSIONS;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(exports, "TAILWIND_V4_IGNORED_FILES", {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
get: function() {
|
|
92
|
-
return _tailwindcss_mangle_engine_v4.TAILWIND_V4_IGNORED_FILES;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
exports.TailwindcssPatcher = require_validate.TailwindcssPatcher;
|
|
96
|
-
exports.VALIDATE_EXIT_CODES = require_validate.VALIDATE_EXIT_CODES;
|
|
97
|
-
exports.VALIDATE_FAILURE_REASONS = require_validate.VALIDATE_FAILURE_REASONS;
|
|
98
|
-
exports.ValidateCommandError = require_validate.ValidateCommandError;
|
|
99
|
-
Object.defineProperty(exports, "canonicalizeBareArbitraryValueCandidates", {
|
|
100
|
-
enumerable: true,
|
|
101
|
-
get: function() {
|
|
102
|
-
return _tailwindcss_mangle_engine_v4.canonicalizeBareArbitraryValueCandidates;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
exports.collectClassesFromContexts = require_validate.collectClassesFromContexts;
|
|
106
|
-
exports.collectClassesFromTailwindV4 = require_validate.collectClassesFromTailwindV4;
|
|
107
|
-
Object.defineProperty(exports, "collectTailwindStyleCandidates", {
|
|
108
|
-
enumerable: true,
|
|
109
|
-
get: function() {
|
|
110
|
-
return _tailwindcss_mangle_engine.collectTailwindStyleCandidates;
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
Object.defineProperty(exports, "collectTailwindV4StyleCandidates", {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
get: function() {
|
|
116
|
-
return _tailwindcss_mangle_engine_v4.collectTailwindV4StyleCandidates;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
Object.defineProperty(exports, "createTailwindV4CompiledSourceEntries", {
|
|
120
|
-
enumerable: true,
|
|
121
|
-
get: function() {
|
|
122
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4CompiledSourceEntries;
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
Object.defineProperty(exports, "createTailwindV4DefaultIgnoreSources", {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
get: function() {
|
|
128
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4DefaultIgnoreSources;
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
Object.defineProperty(exports, "createTailwindV4Engine", {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
get: function() {
|
|
134
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4Engine;
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(exports, "createTailwindV4RootSources", {
|
|
138
|
-
enumerable: true,
|
|
139
|
-
get: function() {
|
|
140
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4RootSources;
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
Object.defineProperty(exports, "createTailwindV4SourceEntryMatcher", {
|
|
144
|
-
enumerable: true,
|
|
145
|
-
get: function() {
|
|
146
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4SourceEntryMatcher;
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
Object.defineProperty(exports, "createTailwindV4SourceExclusionMatcher", {
|
|
150
|
-
enumerable: true,
|
|
151
|
-
get: function() {
|
|
152
|
-
return _tailwindcss_mangle_engine_v4.createTailwindV4SourceExclusionMatcher;
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
exports.createTailwindcssPatchCli = createTailwindcssPatchCli;
|
|
156
|
-
exports.defineConfig = defineConfig;
|
|
157
|
-
Object.defineProperty(exports, "escapeCssClassName", {
|
|
158
|
-
enumerable: true,
|
|
159
|
-
get: function() {
|
|
160
|
-
return _tailwindcss_mangle_engine_v4.escapeCssClassName;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
Object.defineProperty(exports, "expandTailwindV4SourceEntries", {
|
|
164
|
-
enumerable: true,
|
|
165
|
-
get: function() {
|
|
166
|
-
return _tailwindcss_mangle_engine_v4.expandTailwindV4SourceEntries;
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
Object.defineProperty(exports, "expandTailwindV4SourceEntryBraces", {
|
|
170
|
-
enumerable: true,
|
|
171
|
-
get: function() {
|
|
172
|
-
return _tailwindcss_mangle_engine_v4.expandTailwindV4SourceEntryBraces;
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
Object.defineProperty(exports, "extractBareArbitraryValueSourceCandidates", {
|
|
176
|
-
enumerable: true,
|
|
177
|
-
get: function() {
|
|
178
|
-
return _tailwindcss_mangle_engine_v4.extractBareArbitraryValueSourceCandidates;
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
Object.defineProperty(exports, "extractBareArbitraryValueSourceCandidatesWithPositions", {
|
|
182
|
-
enumerable: true,
|
|
183
|
-
get: function() {
|
|
184
|
-
return _tailwindcss_mangle_engine_v4.extractBareArbitraryValueSourceCandidatesWithPositions;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
Object.defineProperty(exports, "extractProjectCandidatesWithPositions", {
|
|
188
|
-
enumerable: true,
|
|
189
|
-
get: function() {
|
|
190
|
-
return _tailwindcss_mangle_engine.extractProjectCandidatesWithPositions;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
Object.defineProperty(exports, "extractRawCandidates", {
|
|
194
|
-
enumerable: true,
|
|
195
|
-
get: function() {
|
|
196
|
-
return _tailwindcss_mangle_engine.extractRawCandidates;
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
Object.defineProperty(exports, "extractRawCandidatesWithPositions", {
|
|
200
|
-
enumerable: true,
|
|
201
|
-
get: function() {
|
|
202
|
-
return _tailwindcss_mangle_engine.extractRawCandidatesWithPositions;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
Object.defineProperty(exports, "extractSourceCandidates", {
|
|
206
|
-
enumerable: true,
|
|
207
|
-
get: function() {
|
|
208
|
-
return _tailwindcss_mangle_engine.extractSourceCandidates;
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
Object.defineProperty(exports, "extractSourceCandidatesWithPositions", {
|
|
212
|
-
enumerable: true,
|
|
213
|
-
get: function() {
|
|
214
|
-
return _tailwindcss_mangle_engine.extractSourceCandidatesWithPositions;
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
Object.defineProperty(exports, "extractValidCandidates", {
|
|
218
|
-
enumerable: true,
|
|
219
|
-
get: function() {
|
|
220
|
-
return _tailwindcss_mangle_engine.extractValidCandidates;
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
Object.defineProperty(exports, "generateCustomStyle", {
|
|
224
|
-
enumerable: true,
|
|
225
|
-
get: function() {
|
|
226
|
-
return _tailwindcss_mangle_engine.generateCustomStyle;
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
Object.defineProperty(exports, "generateTailwindStyle", {
|
|
230
|
-
enumerable: true,
|
|
231
|
-
get: function() {
|
|
232
|
-
return _tailwindcss_mangle_engine.generateTailwindStyle;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
Object.defineProperty(exports, "generateTailwindV3RawStyle", {
|
|
236
|
-
enumerable: true,
|
|
237
|
-
get: function() {
|
|
238
|
-
return _tailwindcss_mangle_engine_v3.generateTailwindV3RawStyle;
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
Object.defineProperty(exports, "generateTailwindV3Style", {
|
|
242
|
-
enumerable: true,
|
|
243
|
-
get: function() {
|
|
244
|
-
return _tailwindcss_mangle_engine_v3.generateTailwindV3Style;
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
Object.defineProperty(exports, "generateTailwindV4Style", {
|
|
248
|
-
enumerable: true,
|
|
249
|
-
get: function() {
|
|
250
|
-
return _tailwindcss_mangle_engine_v4.generateTailwindV4Style;
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
exports.getPatchStatusReport = require_validate.getPatchStatusReport;
|
|
254
|
-
Object.defineProperty(exports, "groupTokensByFile", {
|
|
255
|
-
enumerable: true,
|
|
256
|
-
get: function() {
|
|
257
|
-
return _tailwindcss_mangle_engine.groupTokensByFile;
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
Object.defineProperty(exports, "isBareArbitraryValuesEnabled", {
|
|
261
|
-
enumerable: true,
|
|
262
|
-
get: function() {
|
|
263
|
-
return _tailwindcss_mangle_engine_v4.isBareArbitraryValuesEnabled;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
Object.defineProperty(exports, "isFileExcludedByTailwindV4SourceEntries", {
|
|
267
|
-
enumerable: true,
|
|
268
|
-
get: function() {
|
|
269
|
-
return _tailwindcss_mangle_engine_v4.isFileExcludedByTailwindV4SourceEntries;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "isFileMatchedByTailwindV4SourceEntries", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function() {
|
|
275
|
-
return _tailwindcss_mangle_engine_v4.isFileMatchedByTailwindV4SourceEntries;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
Object.defineProperty(exports, "isValidCandidateToken", {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
get: function() {
|
|
281
|
-
return _tailwindcss_mangle_engine.isValidCandidateToken;
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
exports.loadRuntimeContexts = require_validate.loadRuntimeContexts;
|
|
285
|
-
Object.defineProperty(exports, "loadTailwindV4DesignSystem", {
|
|
286
|
-
enumerable: true,
|
|
287
|
-
get: function() {
|
|
288
|
-
return _tailwindcss_mangle_engine_v4.loadTailwindV4DesignSystem;
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
exports.logger = require_validate.logger;
|
|
292
|
-
Object.defineProperty(exports, "mergeTailwindV4SourceEntries", {
|
|
293
|
-
enumerable: true,
|
|
294
|
-
get: function() {
|
|
295
|
-
return _tailwindcss_mangle_engine_v4.mergeTailwindV4SourceEntries;
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
exports.migrateConfigFiles = require_validate.migrateConfigFiles;
|
|
299
|
-
exports.mountTailwindcssPatchCommands = mountTailwindcssPatchCommands;
|
|
300
|
-
exports.normalizeOptions = require_validate.normalizeOptions;
|
|
301
|
-
Object.defineProperty(exports, "normalizeTailwindV4ScannerSources", {
|
|
302
|
-
enumerable: true,
|
|
303
|
-
get: function() {
|
|
304
|
-
return _tailwindcss_mangle_engine_v4.normalizeTailwindV4ScannerSources;
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
Object.defineProperty(exports, "normalizeTailwindV4SourceEntries", {
|
|
308
|
-
enumerable: true,
|
|
309
|
-
get: function() {
|
|
310
|
-
return _tailwindcss_mangle_engine_v4.normalizeTailwindV4SourceEntries;
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
Object.defineProperty(exports, "replaceBareArbitraryValueSelectors", {
|
|
314
|
-
enumerable: true,
|
|
315
|
-
get: function() {
|
|
316
|
-
return _tailwindcss_mangle_engine_v4.replaceBareArbitraryValueSelectors;
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
Object.defineProperty(exports, "resolveBareArbitraryValueCandidate", {
|
|
320
|
-
enumerable: true,
|
|
321
|
-
get: function() {
|
|
322
|
-
return _tailwindcss_mangle_engine_v4.resolveBareArbitraryValueCandidate;
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
Object.defineProperty(exports, "resolveProjectSourceFiles", {
|
|
326
|
-
enumerable: true,
|
|
327
|
-
get: function() {
|
|
328
|
-
return _tailwindcss_mangle_engine.resolveProjectSourceFiles;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
Object.defineProperty(exports, "resolveSourceScanPath", {
|
|
332
|
-
enumerable: true,
|
|
333
|
-
get: function() {
|
|
334
|
-
return _tailwindcss_mangle_engine_v4.resolveSourceScanPath;
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
Object.defineProperty(exports, "resolveTailwindV4Source", {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
get: function() {
|
|
340
|
-
return _tailwindcss_mangle_engine_v4.resolveTailwindV4Source;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
Object.defineProperty(exports, "resolveTailwindV4SourceBaseCandidates", {
|
|
344
|
-
enumerable: true,
|
|
345
|
-
get: function() {
|
|
346
|
-
return _tailwindcss_mangle_engine_v4.resolveTailwindV4SourceBaseCandidates;
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
Object.defineProperty(exports, "resolveTailwindV4SourceEntry", {
|
|
350
|
-
enumerable: true,
|
|
351
|
-
get: function() {
|
|
352
|
-
return _tailwindcss_mangle_engine_v4.resolveTailwindV4SourceEntry;
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
exports.resolveTailwindV4SourceFromPatchOptions = resolveTailwindV4SourceFromPatchOptions;
|
|
356
|
-
Object.defineProperty(exports, "resolveValidTailwindV4Candidates", {
|
|
357
|
-
enumerable: true,
|
|
358
|
-
get: function() {
|
|
359
|
-
return _tailwindcss_mangle_engine_v4.resolveValidTailwindV4Candidates;
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
exports.restoreConfigFiles = require_validate.restoreConfigFiles;
|
|
363
|
-
exports.runTailwindBuild = require_validate.runTailwindBuild;
|
|
364
|
-
Object.defineProperty(exports, "splitCandidateTokens", {
|
|
365
|
-
enumerable: true,
|
|
366
|
-
get: function() {
|
|
367
|
-
return _tailwindcss_mangle_engine.splitCandidateTokens;
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
exports.tailwindcssPatchCommands = require_validate.tailwindcssPatchCommands;
|
|
371
|
-
Object.defineProperty(exports, "validateCandidateTokenRE", {
|
|
372
|
-
enumerable: true,
|
|
373
|
-
get: function() {
|
|
374
|
-
return _tailwindcss_mangle_engine.validateCandidateTokenRE;
|
|
375
|
-
}
|
|
376
|
-
});
|
|
61
|
+
export { CacheStore, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, TAILWIND_V4_AUTO_SOURCE_SCAN_PATTERN, TAILWIND_V4_IGNORED_CONTENT_DIRS, TAILWIND_V4_IGNORED_EXTENSIONS, TAILWIND_V4_IGNORED_FILES, TailwindcssPatcher, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, canonicalizeBareArbitraryValueCandidates, collectClassesFromContexts, collectClassesFromTailwindV4, collectTailwindStyleCandidates, collectTailwindV4StyleCandidates, createTailwindV4CompiledSourceEntries, createTailwindV4DefaultIgnoreSources, createTailwindV4Engine, createTailwindV4RootSources, createTailwindV4SourceEntryMatcher, createTailwindV4SourceExclusionMatcher, createTailwindcssPatchCli, defineConfig, escapeCssClassName, expandTailwindV4SourceEntries, expandTailwindV4SourceEntryBraces, extractBareArbitraryValueSourceCandidates, extractBareArbitraryValueSourceCandidatesWithPositions, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractSourceCandidates, extractSourceCandidatesWithPositions, extractValidCandidates, generateCustomStyle, generateTailwindStyle, generateTailwindV3RawStyle, generateTailwindV3Style, generateTailwindV4Style, getPatchStatusReport, groupTokensByFile, isBareArbitraryValuesEnabled, isFileExcludedByTailwindV4SourceEntries, isFileMatchedByTailwindV4SourceEntries, isValidCandidateToken, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, mergeTailwindV4SourceEntries, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, normalizeTailwindV4ScannerSources, normalizeTailwindV4SourceEntries, replaceBareArbitraryValueSelectors, resolveBareArbitraryValueCandidate, resolveProjectSourceFiles, resolveSourceScanPath, resolveTailwindV4Source, resolveTailwindV4SourceBaseCandidates, resolveTailwindV4SourceEntry, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, splitCandidateTokens, tailwindcssPatchCommands, validateCandidateTokenRE };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=22.
|
|
8
|
+
"node": ">=22.18.0"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://mangle.icebreaker.top/",
|
|
11
11
|
"repository": {
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
|
-
"import": "./dist/index.
|
|
29
|
-
"
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
30
|
},
|
|
31
31
|
"./migration-report.schema.json": "./schema/migration-report.schema.json",
|
|
32
32
|
"./restore-result.schema.json": "./schema/restore-result.schema.json",
|
|
33
33
|
"./validate-result.schema.json": "./schema/validate-result.schema.json"
|
|
34
34
|
},
|
|
35
35
|
"main": "./dist/index.js",
|
|
36
|
-
"module": "./dist/index.
|
|
36
|
+
"module": "./dist/index.js",
|
|
37
37
|
"types": "./dist/index.d.ts",
|
|
38
38
|
"bin": {
|
|
39
39
|
"tw-patch": "bin/tw-patch.js",
|
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
"src"
|
|
47
47
|
],
|
|
48
48
|
"tsd": {
|
|
49
|
-
"directory": "test-d"
|
|
49
|
+
"directory": "test-d",
|
|
50
|
+
"compilerOptions": {
|
|
51
|
+
"module": "NodeNext"
|
|
52
|
+
}
|
|
50
53
|
},
|
|
51
54
|
"publishConfig": {
|
|
52
55
|
"access": "public",
|
|
@@ -61,33 +64,34 @@
|
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
66
|
"dependencies": {
|
|
64
|
-
"@babel/generator": "^
|
|
65
|
-
"@babel/parser": "^
|
|
66
|
-
"@babel/traverse": "^
|
|
67
|
-
"@babel/types": "^
|
|
67
|
+
"@babel/generator": "^8.0.0",
|
|
68
|
+
"@babel/parser": "^8.0.0",
|
|
69
|
+
"@babel/traverse": "^8.0.0",
|
|
70
|
+
"@babel/types": "^8.0.0",
|
|
68
71
|
"cac": "6.7.14",
|
|
69
72
|
"consola": "^3.4.2",
|
|
70
|
-
"fs-extra": "^11.3.
|
|
73
|
+
"fs-extra": "^11.3.6",
|
|
71
74
|
"local-pkg": "^1.2.1",
|
|
72
75
|
"pathe": "^2.0.3",
|
|
73
|
-
"postcss": "^8.5.
|
|
76
|
+
"postcss": "^8.5.16",
|
|
74
77
|
"semver": "^7.8.5",
|
|
75
|
-
"tailwindcss-config": "^2.0.
|
|
76
|
-
"@tailwindcss-mangle/config": "
|
|
77
|
-
"@tailwindcss-mangle/engine": "0.1.
|
|
78
|
+
"tailwindcss-config": "^2.0.1",
|
|
79
|
+
"@tailwindcss-mangle/config": "8.0.0",
|
|
80
|
+
"@tailwindcss-mangle/engine": "0.1.2"
|
|
78
81
|
},
|
|
79
82
|
"devDependencies": {
|
|
80
|
-
"@tailwindcss/postcss": "^4.3.
|
|
81
|
-
"@tailwindcss/vite": "^4.3.
|
|
82
|
-
"tailwindcss": "^4.3.
|
|
83
|
+
"@tailwindcss/postcss": "^4.3.2",
|
|
84
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
85
|
+
"tailwindcss": "^4.3.2",
|
|
83
86
|
"tailwindcss-3": "npm:tailwindcss@^3.4.19",
|
|
84
|
-
"tailwindcss-4": "npm:tailwindcss@^4.3.
|
|
87
|
+
"tailwindcss-4": "npm:tailwindcss@^4.3.2"
|
|
85
88
|
},
|
|
89
|
+
"type": "module",
|
|
86
90
|
"scripts": {
|
|
87
91
|
"dev": "tsdown --watch --sourcemap",
|
|
88
92
|
"build": "tsdown",
|
|
89
93
|
"test": "vitest run",
|
|
90
|
-
"test:types": "pnpm build && tsd --typings dist/index.d.
|
|
94
|
+
"test:types": "pnpm build && tsd --typings dist/index.d.ts --files test-d/**/*.test-d.ts",
|
|
91
95
|
"test:dev": "vitest",
|
|
92
96
|
"bench:cold-start": "node --import tsx bench/cold-start.ts",
|
|
93
97
|
"patch": "tsx dev/bin.ts install",
|
package/src/babel/index.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import generate from '@babel/generator'
|
|
2
|
+
import traverse from '@babel/traverse'
|
|
3
3
|
|
|
4
4
|
export { parse, parseExpression } from '@babel/parser'
|
|
5
|
-
|
|
6
|
-
export function _interopDefaultCompat(e: any) {
|
|
7
|
-
return e && typeof e === 'object' && 'default' in e ? e.default : e
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const generate = _interopDefaultCompat(_babelGenerate) as typeof _babelGenerate
|
|
11
|
-
|
|
12
|
-
export const traverse = _interopDefaultCompat(_babelTraverse) as typeof _babelTraverse
|
|
5
|
+
export { generate, traverse }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ObjectExpression, ObjectMethod, ObjectProperty } from '@babel/types'
|
|
2
2
|
|
|
3
|
-
import generate from '@babel/generator'
|
|
4
3
|
import { parse } from '@babel/parser'
|
|
5
4
|
import * as t from '@babel/types'
|
|
5
|
+
import { generate } from '../babel'
|
|
6
6
|
|
|
7
7
|
const ROOT_LEGACY_KEYS = ['cwd', 'overwrite', 'tailwind', 'features', 'output', 'applyPatches'] as const
|
|
8
8
|
|
package/src/index.bundle.ts
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TailwindcssPatchCliMountOptions, TailwindcssPatchCliOptions } from './commands/types'
|
|
1
|
+
import type { TailwindcssPatchCliOptions } from './commands/types'
|
|
3
2
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const require = createRequire(import.meta.url)
|
|
7
|
-
|
|
8
|
-
type CliModule = typeof import('./commands/cli')
|
|
9
|
-
|
|
10
|
-
function loadCliModule(): CliModule {
|
|
11
|
-
return require('./commands/cli-runtime.js') as CliModule
|
|
12
|
-
}
|
|
3
|
+
import { createTailwindcssPatchCli as createCli, mountTailwindcssPatchCommands as mountCommands } from './commands/cli'
|
|
13
4
|
|
|
14
5
|
export * from './public-api'
|
|
15
6
|
|
|
16
|
-
export function mountTailwindcssPatchCommands(
|
|
17
|
-
return
|
|
7
|
+
export function mountTailwindcssPatchCommands(...args: Parameters<typeof mountCommands>) {
|
|
8
|
+
return mountCommands(...args)
|
|
18
9
|
}
|
|
19
10
|
|
|
20
11
|
export function createTailwindcssPatchCli(options: TailwindcssPatchCliOptions = {}) {
|
|
21
|
-
return
|
|
12
|
+
return createCli(options)
|
|
22
13
|
}
|
|
@@ -121,7 +121,7 @@ export function transformPostcssPluginV2(content: string, options: ExposeContext
|
|
|
121
121
|
t.variableDeclarator(
|
|
122
122
|
refIdentifier,
|
|
123
123
|
t.objectExpression([
|
|
124
|
-
t.objectProperty(t.identifier('value'), t.arrayExpression()),
|
|
124
|
+
t.objectProperty(t.identifier('value'), t.arrayExpression([])),
|
|
125
125
|
]),
|
|
126
126
|
),
|
|
127
127
|
]),
|
|
@@ -130,7 +130,7 @@ export function transformPostcssPlugin(content: string, { refProperty }: ExposeC
|
|
|
130
130
|
t.variableDeclarator(
|
|
131
131
|
refIdentifier,
|
|
132
132
|
t.objectExpression([
|
|
133
|
-
t.objectProperty(t.identifier('value'), t.arrayExpression()),
|
|
133
|
+
t.objectProperty(t.identifier('value'), t.arrayExpression([])),
|
|
134
134
|
]),
|
|
135
135
|
),
|
|
136
136
|
]),
|