tailwindcss-patch 9.0.0-alpha.5 → 9.0.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.
Files changed (40) hide show
  1. package/dist/chunk-8l464Juk.js +28 -0
  2. package/dist/cli.d.mts +1 -2
  3. package/dist/cli.d.ts +1 -2
  4. package/dist/cli.js +18 -22
  5. package/dist/cli.mjs +17 -22
  6. package/dist/commands/cli-runtime.d.mts +5 -10
  7. package/dist/commands/cli-runtime.d.ts +5 -10
  8. package/dist/commands/cli-runtime.js +582 -1217
  9. package/dist/commands/cli-runtime.mjs +570 -1216
  10. package/dist/dist-B1VBpHtd.js +21 -0
  11. package/dist/dist-BjUV1yEM.mjs +19 -0
  12. package/dist/index.bundle-BGBMTX9A.js +35 -0
  13. package/dist/index.bundle-ByrTqrr3.mjs +18 -0
  14. package/dist/index.d.mts +68 -67
  15. package/dist/index.d.ts +68 -67
  16. package/dist/index.js +28 -57
  17. package/dist/index.mjs +3 -57
  18. package/dist/validate-B8H-8rWO.js +3487 -0
  19. package/dist/validate-BI8356RT.mjs +3336 -0
  20. package/dist/validate-Bu_rkfQF.d.ts +686 -0
  21. package/dist/validate-CIMnzW8O.d.mts +685 -0
  22. package/package.json +11 -11
  23. package/src/api/tailwindcss-patcher.ts +33 -6
  24. package/src/commands/basic-handlers.ts +0 -1
  25. package/src/config/index.ts +1 -1
  26. package/src/config/workspace.ts +1 -1
  27. package/src/options/legacy.ts +2 -2
  28. package/src/options/normalize.ts +10 -5
  29. package/src/runtime/collector.ts +7 -7
  30. package/src/runtime/process-tailwindcss.ts +33 -17
  31. package/dist/chunk-4BA7N3QJ.mjs +0 -4378
  32. package/dist/chunk-A7IKQTXK.js +0 -4378
  33. package/dist/chunk-OSH52QWA.mjs +0 -10
  34. package/dist/chunk-QQXAOMUH.js +0 -25
  35. package/dist/chunk-YYBY7EM5.mjs +0 -21
  36. package/dist/chunk-ZPLR2UEW.js +0 -7
  37. package/dist/dist-22YCNIJW.js +0 -269
  38. package/dist/dist-7W73GIRD.mjs +0 -269
  39. package/dist/validate-nbmOI2w8.d.mts +0 -677
  40. package/dist/validate-nbmOI2w8.d.ts +0 -677
@@ -0,0 +1,21 @@
1
+ const require_chunk = require("./chunk-8l464Juk.js");
2
+ let node_process = require("node:process");
3
+ node_process = require_chunk.__toESM(node_process, 1);
4
+ let defu = require("defu");
5
+ (0, defu.createDefu)((obj, key, value) => {
6
+ if (Array.isArray(obj[key]) && Array.isArray(value)) {
7
+ obj[key] = value;
8
+ return true;
9
+ }
10
+ });
11
+ [
12
+ "ease-out",
13
+ "ease-linear",
14
+ "ease-in",
15
+ "ease-in-out"
16
+ ].reduce((acc, cur) => {
17
+ acc[cur] = true;
18
+ return acc;
19
+ }, {});
20
+ //#endregion
21
+ exports.defu = defu.defu;
@@ -0,0 +1,19 @@
1
+ import "node:process";
2
+ import { createDefu, defu } from "defu";
3
+ createDefu((obj, key, value) => {
4
+ if (Array.isArray(obj[key]) && Array.isArray(value)) {
5
+ obj[key] = value;
6
+ return true;
7
+ }
8
+ });
9
+ [
10
+ "ease-out",
11
+ "ease-linear",
12
+ "ease-in",
13
+ "ease-in-out"
14
+ ].reduce((acc, cur) => {
15
+ acc[cur] = true;
16
+ return acc;
17
+ }, {});
18
+ //#endregion
19
+ export { defu };
@@ -0,0 +1,35 @@
1
+ require("./chunk-8l464Juk.js");
2
+ require("./validate-B8H-8rWO.js");
3
+ //#region src/index.bundle.ts
4
+ const require$1 = (0, require("node:module").createRequire)(require("url").pathToFileURL(__filename).href);
5
+ function loadCliModule() {
6
+ return require$1("./commands/cli-runtime.js");
7
+ }
8
+ function mountTailwindcssPatchCommands(cli, options = {}) {
9
+ return loadCliModule().mountTailwindcssPatchCommands(cli, options);
10
+ }
11
+ function createTailwindcssPatchCli(options = {}) {
12
+ return loadCliModule().createTailwindcssPatchCli(options);
13
+ }
14
+ function defineConfig(config) {
15
+ return config;
16
+ }
17
+ //#endregion
18
+ Object.defineProperty(exports, "createTailwindcssPatchCli", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return createTailwindcssPatchCli;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "defineConfig", {
25
+ enumerable: true,
26
+ get: function() {
27
+ return defineConfig;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "mountTailwindcssPatchCommands", {
31
+ enumerable: true,
32
+ get: function() {
33
+ return mountTailwindcssPatchCommands;
34
+ }
35
+ });
@@ -0,0 +1,18 @@
1
+ import "./validate-BI8356RT.mjs";
2
+ import { createRequire } from "node:module";
3
+ //#region src/index.bundle.ts
4
+ const require = createRequire(import.meta.url);
5
+ function loadCliModule() {
6
+ return require("./commands/cli-runtime.js");
7
+ }
8
+ function mountTailwindcssPatchCommands(cli, options = {}) {
9
+ return loadCliModule().mountTailwindcssPatchCommands(cli, options);
10
+ }
11
+ function createTailwindcssPatchCli(options = {}) {
12
+ return loadCliModule().createTailwindcssPatchCli(options);
13
+ }
14
+ function defineConfig(config) {
15
+ return config;
16
+ }
17
+ //#endregion
18
+ export { defineConfig as n, mountTailwindcssPatchCommands as r, createTailwindcssPatchCli as t };
package/dist/index.d.mts CHANGED
@@ -1,84 +1,85 @@
1
- import { TailwindcssMangleConfig } from '@tailwindcss-mangle/config';
2
- import { CAC } from 'cac';
3
- import { n as TailwindCssPatchOptions, N as NormalizedTailwindCssPatchOptions, o as NormalizedCacheOptions, C as CacheContextDescriptor, p as CacheReadResult, q as CacheReadMeta, r as CacheClearOptions, s as CacheClearResult, u as CacheIndexFileV2, M as MigrateConfigFilesOptions, v as ConfigFileMigrationReport, R as RestoreConfigFilesOptions, w as RestoreConfigFilesResult, x as TailwindcssRuntimeContext, P as PatchStatusReport, T as TailwindcssPatchCliOptions, a as TailwindcssPatchCliMountOptions } from './validate-nbmOI2w8.mjs';
4
- export { A as ApplyOptions, y as CacheClearScope, z as CacheContextMetadata, B as CacheOptions, D as CacheStrategy, E as ConfigFileMigrationEntry, F as ExposeContextOptions, G as ExtendLengthUnitsOptions, H as ExtractOptions, I as ExtractResult, J as ILengthUnitsPatchOptions, K as MIGRATION_REPORT_KIND, L as MIGRATION_REPORT_SCHEMA_VERSION, O as PatchCheckStatus, Q as PatchName, S as PatchStatusEntry, U as TailwindCssOptions, W as TailwindPatchRuntime, X as TailwindTokenByFileMap, Y as TailwindTokenFileKey, Z as TailwindTokenLocation, _ as TailwindTokenReport, $ as TailwindV2Options, a0 as TailwindV3Options, a1 as TailwindV4Options, a2 as TailwindcssClassCache, b as TailwindcssPatchCommand, c as TailwindcssPatchCommandContext, d as TailwindcssPatchCommandHandler, e as TailwindcssPatchCommandHandlerMap, f as TailwindcssPatchCommandOptionDefinition, g as TailwindcssPatchCommandOptions, a3 as TailwindcssPatcher, V as VALIDATE_EXIT_CODES, h as VALIDATE_FAILURE_REASONS, i as ValidateCommandError, j as ValidateFailureReason, k as ValidateFailureSummary, l as ValidateJsonFailurePayload, m as ValidateJsonSuccessPayload, a4 as extractProjectCandidatesWithPositions, a5 as extractRawCandidates, a6 as extractRawCandidatesWithPositions, a7 as extractValidCandidates, a8 as groupTokensByFile, a9 as logger, t as tailwindcssPatchCommands } from './validate-nbmOI2w8.mjs';
5
- import { PackageInfo } from 'local-pkg';
6
- import postcss from 'postcss';
7
- import '@tailwindcss/oxide';
8
- import 'tailwindcss';
9
- import 'consola';
10
-
11
- declare function normalizeOptions(options?: TailwindCssPatchOptions): NormalizedTailwindCssPatchOptions;
1
+ import { $ as TailwindTokenFileKey, A as groupTokensByFile, B as TailwindCssOptions, C as MIGRATION_REPORT_SCHEMA_VERSION, D as extractRawCandidates, E as extractProjectCandidatesWithPositions, F as ExposeContextOptions, G as ExtractResult, H as TailwindV2Options, I as ExtendLengthUnitsOptions, J as PatchName, K as ILengthUnitsPatchOptions, L as ExtractOptions, M as ApplyOptions, N as CacheOptions, O as extractRawCandidatesWithPositions, P as CacheStrategy, Q as TailwindTokenByFileMap, R as NormalizedCacheOptions, S as MIGRATION_REPORT_KIND, T as TailwindcssPatcher, U as TailwindV3Options, V as TailwindCssPatchOptions, W as TailwindV4Options, X as PatchStatusReport, Y as PatchStatusEntry, Z as TailwindPatchRuntime, _ as ConfigFileMigrationEntry, a as ValidateFailureSummary, at as CacheClearResult, b as RestoreConfigFilesOptions, c as TailwindcssPatchCliMountOptions, ct as CacheContextMetadata, d as TailwindcssPatchCommandContext, dt as CacheReadResult, et as TailwindTokenLocation, f as TailwindcssPatchCommandHandler, g as tailwindcssPatchCommands, h as TailwindcssPatchCommandOptions, i as ValidateFailureReason, it as CacheClearOptions, j as normalizeOptions, k as extractValidCandidates, l as TailwindcssPatchCliOptions, lt as CacheIndexFileV2, m as TailwindcssPatchCommandOptionDefinition, n as VALIDATE_FAILURE_REASONS, nt as TailwindcssClassCache, o as ValidateJsonFailurePayload, ot as CacheClearScope, p as TailwindcssPatchCommandHandlerMap, q as PatchCheckStatus, r as ValidateCommandError, rt as TailwindcssRuntimeContext, s as ValidateJsonSuccessPayload, st as CacheContextDescriptor, t as VALIDATE_EXIT_CODES, tt as TailwindTokenReport, u as TailwindcssPatchCommand, ut as CacheReadMeta, v as ConfigFileMigrationReport, w as logger, x as RestoreConfigFilesResult, y as MigrateConfigFilesOptions, z as NormalizedTailwindCssPatchOptions } from "./validate-CIMnzW8O.mjs";
2
+ import { PackageInfo } from "local-pkg";
3
+ import postcss from "postcss";
4
+ import { CAC } from "cac";
5
+ import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
12
6
 
7
+ //#region src/cache/store.d.ts
13
8
  declare class CacheStore {
14
- private readonly options;
15
- private readonly context?;
16
- private readonly driver;
17
- private readonly lockPath;
18
- private memoryCache;
19
- private memoryIndex;
20
- private lastReadMeta;
21
- constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
22
- private isContextAware;
23
- private createEmptyIndex;
24
- private ensureDir;
25
- private ensureDirSync;
26
- private createTempPath;
27
- private replaceCacheFile;
28
- private replaceCacheFileSync;
29
- private cleanupTempFile;
30
- private cleanupTempFileSync;
31
- private delay;
32
- private acquireLock;
33
- private releaseLockSyncOrAsync;
34
- private acquireLockSync;
35
- private withFileLock;
36
- private withFileLockSync;
37
- private normalizeContextEntry;
38
- private normalizeIndexFile;
39
- private readParsedCacheFile;
40
- private readParsedCacheFileSync;
41
- private findProjectMatch;
42
- private writeIndexFile;
43
- private writeIndexFileSync;
44
- write(data: Set<string>): Promise<string | undefined>;
45
- writeSync(data: Set<string>): string | undefined;
46
- readWithMeta(): Promise<CacheReadResult>;
47
- readWithMetaSync(): CacheReadResult;
48
- read(): Promise<Set<string>>;
49
- readSync(): Set<string>;
50
- getLastReadMeta(): CacheReadMeta;
51
- private countEntriesFromParsed;
52
- clear(options?: CacheClearOptions): Promise<CacheClearResult>;
53
- clearSync(options?: CacheClearOptions): CacheClearResult;
54
- readIndexSnapshot(): CacheIndexFileV2 | undefined;
9
+ private readonly options;
10
+ private readonly context?;
11
+ private readonly driver;
12
+ private readonly lockPath;
13
+ private memoryCache;
14
+ private memoryIndex;
15
+ private lastReadMeta;
16
+ constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
17
+ private isContextAware;
18
+ private createEmptyIndex;
19
+ private ensureDir;
20
+ private ensureDirSync;
21
+ private createTempPath;
22
+ private replaceCacheFile;
23
+ private replaceCacheFileSync;
24
+ private cleanupTempFile;
25
+ private cleanupTempFileSync;
26
+ private delay;
27
+ private acquireLock;
28
+ private releaseLockSyncOrAsync;
29
+ private acquireLockSync;
30
+ private withFileLock;
31
+ private withFileLockSync;
32
+ private normalizeContextEntry;
33
+ private normalizeIndexFile;
34
+ private readParsedCacheFile;
35
+ private readParsedCacheFileSync;
36
+ private findProjectMatch;
37
+ private writeIndexFile;
38
+ private writeIndexFileSync;
39
+ write(data: Set<string>): Promise<string | undefined>;
40
+ writeSync(data: Set<string>): string | undefined;
41
+ readWithMeta(): Promise<CacheReadResult>;
42
+ readWithMetaSync(): CacheReadResult;
43
+ read(): Promise<Set<string>>;
44
+ readSync(): Set<string>;
45
+ getLastReadMeta(): CacheReadMeta;
46
+ private countEntriesFromParsed;
47
+ clear(options?: CacheClearOptions): Promise<CacheClearResult>;
48
+ clearSync(options?: CacheClearOptions): CacheClearResult;
49
+ readIndexSnapshot(): CacheIndexFileV2 | undefined;
55
50
  }
56
-
51
+ //#endregion
52
+ //#region src/commands/migrate-config.d.ts
57
53
  declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
58
54
  declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
59
-
55
+ //#endregion
56
+ //#region src/runtime/class-collector.d.ts
60
57
  declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
61
58
  declare function collectClassesFromTailwindV4(options: NormalizedTailwindCssPatchOptions): Promise<Set<string>>;
62
-
59
+ //#endregion
60
+ //#region src/runtime/context-registry.d.ts
63
61
  declare function loadRuntimeContexts(packageInfo: PackageInfo, majorVersion: 2 | 3 | 4, refProperty: string): TailwindcssRuntimeContext[];
64
-
62
+ //#endregion
63
+ //#region src/runtime/process-tailwindcss.d.ts
65
64
  interface TailwindBuildOptions {
66
- cwd: string;
67
- config?: string;
68
- majorVersion: 2 | 3 | 4;
69
- postcssPlugin?: string;
65
+ cwd: string;
66
+ config?: string;
67
+ majorVersion: 2 | 3 | 4;
68
+ postcssPlugin?: string;
70
69
  }
71
70
  declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
72
-
71
+ //#endregion
72
+ //#region src/patching/status.d.ts
73
73
  interface PatchStatusContext {
74
- packageInfo: PackageInfo;
75
- options: NormalizedTailwindCssPatchOptions;
76
- majorVersion: 2 | 3 | 4;
74
+ packageInfo: PackageInfo;
75
+ options: NormalizedTailwindCssPatchOptions;
76
+ majorVersion: 2 | 3 | 4;
77
77
  }
78
78
  declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
79
-
79
+ //#endregion
80
+ //#region src/index.bundle.d.ts
80
81
  declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
81
82
  declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
82
83
  declare function defineConfig<T extends TailwindcssMangleConfig>(config: T): T;
83
-
84
- export { CacheClearOptions, CacheClearResult, CacheReadMeta, CacheStore, ConfigFileMigrationReport, MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchStatusReport, RestoreConfigFilesOptions, RestoreConfigFilesResult, TailwindCssPatchOptions, TailwindcssPatchCliMountOptions, TailwindcssPatchCliOptions, TailwindcssRuntimeContext, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, getPatchStatusReport, loadRuntimeContexts, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild };
84
+ //#endregion
85
+ export { ApplyOptions, CacheClearOptions, CacheClearResult, CacheClearScope, CacheContextMetadata, CacheOptions, CacheReadMeta, CacheStore, CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, ExposeContextOptions, ExtendLengthUnitsOptions, ExtractOptions, ExtractResult, ILengthUnitsPatchOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchCheckStatus, PatchName, PatchStatusEntry, PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, TailwindCssOptions, type TailwindCssPatchOptions, TailwindPatchRuntime, TailwindTokenByFileMap, TailwindTokenFileKey, TailwindTokenLocation, TailwindTokenReport, TailwindV2Options, TailwindV3Options, TailwindV4Options, TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, TailwindcssPatcher, TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
package/dist/index.d.ts CHANGED
@@ -1,84 +1,85 @@
1
- import { TailwindcssMangleConfig } from '@tailwindcss-mangle/config';
2
- import { CAC } from 'cac';
3
- import { n as TailwindCssPatchOptions, N as NormalizedTailwindCssPatchOptions, o as NormalizedCacheOptions, C as CacheContextDescriptor, p as CacheReadResult, q as CacheReadMeta, r as CacheClearOptions, s as CacheClearResult, u as CacheIndexFileV2, M as MigrateConfigFilesOptions, v as ConfigFileMigrationReport, R as RestoreConfigFilesOptions, w as RestoreConfigFilesResult, x as TailwindcssRuntimeContext, P as PatchStatusReport, T as TailwindcssPatchCliOptions, a as TailwindcssPatchCliMountOptions } from './validate-nbmOI2w8.js';
4
- export { A as ApplyOptions, y as CacheClearScope, z as CacheContextMetadata, B as CacheOptions, D as CacheStrategy, E as ConfigFileMigrationEntry, F as ExposeContextOptions, G as ExtendLengthUnitsOptions, H as ExtractOptions, I as ExtractResult, J as ILengthUnitsPatchOptions, K as MIGRATION_REPORT_KIND, L as MIGRATION_REPORT_SCHEMA_VERSION, O as PatchCheckStatus, Q as PatchName, S as PatchStatusEntry, U as TailwindCssOptions, W as TailwindPatchRuntime, X as TailwindTokenByFileMap, Y as TailwindTokenFileKey, Z as TailwindTokenLocation, _ as TailwindTokenReport, $ as TailwindV2Options, a0 as TailwindV3Options, a1 as TailwindV4Options, a2 as TailwindcssClassCache, b as TailwindcssPatchCommand, c as TailwindcssPatchCommandContext, d as TailwindcssPatchCommandHandler, e as TailwindcssPatchCommandHandlerMap, f as TailwindcssPatchCommandOptionDefinition, g as TailwindcssPatchCommandOptions, a3 as TailwindcssPatcher, V as VALIDATE_EXIT_CODES, h as VALIDATE_FAILURE_REASONS, i as ValidateCommandError, j as ValidateFailureReason, k as ValidateFailureSummary, l as ValidateJsonFailurePayload, m as ValidateJsonSuccessPayload, a4 as extractProjectCandidatesWithPositions, a5 as extractRawCandidates, a6 as extractRawCandidatesWithPositions, a7 as extractValidCandidates, a8 as groupTokensByFile, a9 as logger, t as tailwindcssPatchCommands } from './validate-nbmOI2w8.js';
5
- import { PackageInfo } from 'local-pkg';
6
- import postcss from 'postcss';
7
- import '@tailwindcss/oxide';
8
- import 'tailwindcss';
9
- import 'consola';
10
-
11
- declare function normalizeOptions(options?: TailwindCssPatchOptions): NormalizedTailwindCssPatchOptions;
1
+ import { $ as TailwindTokenFileKey, A as groupTokensByFile, B as TailwindCssOptions, C as MIGRATION_REPORT_SCHEMA_VERSION, D as extractRawCandidates, E as extractProjectCandidatesWithPositions, F as ExposeContextOptions, G as ExtractResult, H as TailwindV2Options, I as ExtendLengthUnitsOptions, J as PatchName, K as ILengthUnitsPatchOptions, L as ExtractOptions, M as ApplyOptions, N as CacheOptions, O as extractRawCandidatesWithPositions, P as CacheStrategy, Q as TailwindTokenByFileMap, R as NormalizedCacheOptions, S as MIGRATION_REPORT_KIND, T as TailwindcssPatcher, U as TailwindV3Options, V as TailwindCssPatchOptions, W as TailwindV4Options, X as PatchStatusReport, Y as PatchStatusEntry, Z as TailwindPatchRuntime, _ as ConfigFileMigrationEntry, a as ValidateFailureSummary, at as CacheClearResult, b as RestoreConfigFilesOptions, c as TailwindcssPatchCliMountOptions, ct as CacheContextMetadata, d as TailwindcssPatchCommandContext, dt as CacheReadResult, et as TailwindTokenLocation, f as TailwindcssPatchCommandHandler, g as tailwindcssPatchCommands, h as TailwindcssPatchCommandOptions, i as ValidateFailureReason, it as CacheClearOptions, j as normalizeOptions, k as extractValidCandidates, l as TailwindcssPatchCliOptions, lt as CacheIndexFileV2, m as TailwindcssPatchCommandOptionDefinition, n as VALIDATE_FAILURE_REASONS, nt as TailwindcssClassCache, o as ValidateJsonFailurePayload, ot as CacheClearScope, p as TailwindcssPatchCommandHandlerMap, q as PatchCheckStatus, r as ValidateCommandError, rt as TailwindcssRuntimeContext, s as ValidateJsonSuccessPayload, st as CacheContextDescriptor, t as VALIDATE_EXIT_CODES, tt as TailwindTokenReport, u as TailwindcssPatchCommand, ut as CacheReadMeta, v as ConfigFileMigrationReport, w as logger, x as RestoreConfigFilesResult, y as MigrateConfigFilesOptions, z as NormalizedTailwindCssPatchOptions } from "./validate-Bu_rkfQF.js";
2
+ import { CAC } from "cac";
3
+ import { PackageInfo } from "local-pkg";
4
+ import postcss from "postcss";
5
+ import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
12
6
 
7
+ //#region src/cache/store.d.ts
13
8
  declare class CacheStore {
14
- private readonly options;
15
- private readonly context?;
16
- private readonly driver;
17
- private readonly lockPath;
18
- private memoryCache;
19
- private memoryIndex;
20
- private lastReadMeta;
21
- constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
22
- private isContextAware;
23
- private createEmptyIndex;
24
- private ensureDir;
25
- private ensureDirSync;
26
- private createTempPath;
27
- private replaceCacheFile;
28
- private replaceCacheFileSync;
29
- private cleanupTempFile;
30
- private cleanupTempFileSync;
31
- private delay;
32
- private acquireLock;
33
- private releaseLockSyncOrAsync;
34
- private acquireLockSync;
35
- private withFileLock;
36
- private withFileLockSync;
37
- private normalizeContextEntry;
38
- private normalizeIndexFile;
39
- private readParsedCacheFile;
40
- private readParsedCacheFileSync;
41
- private findProjectMatch;
42
- private writeIndexFile;
43
- private writeIndexFileSync;
44
- write(data: Set<string>): Promise<string | undefined>;
45
- writeSync(data: Set<string>): string | undefined;
46
- readWithMeta(): Promise<CacheReadResult>;
47
- readWithMetaSync(): CacheReadResult;
48
- read(): Promise<Set<string>>;
49
- readSync(): Set<string>;
50
- getLastReadMeta(): CacheReadMeta;
51
- private countEntriesFromParsed;
52
- clear(options?: CacheClearOptions): Promise<CacheClearResult>;
53
- clearSync(options?: CacheClearOptions): CacheClearResult;
54
- readIndexSnapshot(): CacheIndexFileV2 | undefined;
9
+ private readonly options;
10
+ private readonly context?;
11
+ private readonly driver;
12
+ private readonly lockPath;
13
+ private memoryCache;
14
+ private memoryIndex;
15
+ private lastReadMeta;
16
+ constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
17
+ private isContextAware;
18
+ private createEmptyIndex;
19
+ private ensureDir;
20
+ private ensureDirSync;
21
+ private createTempPath;
22
+ private replaceCacheFile;
23
+ private replaceCacheFileSync;
24
+ private cleanupTempFile;
25
+ private cleanupTempFileSync;
26
+ private delay;
27
+ private acquireLock;
28
+ private releaseLockSyncOrAsync;
29
+ private acquireLockSync;
30
+ private withFileLock;
31
+ private withFileLockSync;
32
+ private normalizeContextEntry;
33
+ private normalizeIndexFile;
34
+ private readParsedCacheFile;
35
+ private readParsedCacheFileSync;
36
+ private findProjectMatch;
37
+ private writeIndexFile;
38
+ private writeIndexFileSync;
39
+ write(data: Set<string>): Promise<string | undefined>;
40
+ writeSync(data: Set<string>): string | undefined;
41
+ readWithMeta(): Promise<CacheReadResult>;
42
+ readWithMetaSync(): CacheReadResult;
43
+ read(): Promise<Set<string>>;
44
+ readSync(): Set<string>;
45
+ getLastReadMeta(): CacheReadMeta;
46
+ private countEntriesFromParsed;
47
+ clear(options?: CacheClearOptions): Promise<CacheClearResult>;
48
+ clearSync(options?: CacheClearOptions): CacheClearResult;
49
+ readIndexSnapshot(): CacheIndexFileV2 | undefined;
55
50
  }
56
-
51
+ //#endregion
52
+ //#region src/commands/migrate-config.d.ts
57
53
  declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
58
54
  declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
59
-
55
+ //#endregion
56
+ //#region src/runtime/class-collector.d.ts
60
57
  declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
61
58
  declare function collectClassesFromTailwindV4(options: NormalizedTailwindCssPatchOptions): Promise<Set<string>>;
62
-
59
+ //#endregion
60
+ //#region src/runtime/context-registry.d.ts
63
61
  declare function loadRuntimeContexts(packageInfo: PackageInfo, majorVersion: 2 | 3 | 4, refProperty: string): TailwindcssRuntimeContext[];
64
-
62
+ //#endregion
63
+ //#region src/runtime/process-tailwindcss.d.ts
65
64
  interface TailwindBuildOptions {
66
- cwd: string;
67
- config?: string;
68
- majorVersion: 2 | 3 | 4;
69
- postcssPlugin?: string;
65
+ cwd: string;
66
+ config?: string;
67
+ majorVersion: 2 | 3 | 4;
68
+ postcssPlugin?: string;
70
69
  }
71
70
  declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
72
-
71
+ //#endregion
72
+ //#region src/patching/status.d.ts
73
73
  interface PatchStatusContext {
74
- packageInfo: PackageInfo;
75
- options: NormalizedTailwindCssPatchOptions;
76
- majorVersion: 2 | 3 | 4;
74
+ packageInfo: PackageInfo;
75
+ options: NormalizedTailwindCssPatchOptions;
76
+ majorVersion: 2 | 3 | 4;
77
77
  }
78
78
  declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
79
-
79
+ //#endregion
80
+ //#region src/index.bundle.d.ts
80
81
  declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
81
82
  declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
82
83
  declare function defineConfig<T extends TailwindcssMangleConfig>(config: T): T;
83
-
84
- export { CacheClearOptions, CacheClearResult, CacheReadMeta, CacheStore, ConfigFileMigrationReport, MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchStatusReport, RestoreConfigFilesOptions, RestoreConfigFilesResult, TailwindCssPatchOptions, TailwindcssPatchCliMountOptions, TailwindcssPatchCliOptions, TailwindcssRuntimeContext, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, getPatchStatusReport, loadRuntimeContexts, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild };
84
+ //#endregion
85
+ export { ApplyOptions, CacheClearOptions, CacheClearResult, CacheClearScope, CacheContextMetadata, CacheOptions, CacheReadMeta, CacheStore, CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, ExposeContextOptions, ExtendLengthUnitsOptions, ExtractOptions, ExtractResult, ILengthUnitsPatchOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchCheckStatus, PatchName, PatchStatusEntry, PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, TailwindCssOptions, type TailwindCssPatchOptions, TailwindPatchRuntime, TailwindTokenByFileMap, TailwindTokenFileKey, TailwindTokenLocation, TailwindTokenReport, TailwindV2Options, TailwindV3Options, TailwindV4Options, TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, TailwindcssPatcher, TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
package/dist/index.js CHANGED
@@ -1,57 +1,28 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
- var _chunkQQXAOMUHjs = require('./chunk-QQXAOMUH.js');
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
- var _chunkA7IKQTXKjs = require('./chunk-A7IKQTXK.js');
30
- require('./chunk-ZPLR2UEW.js');
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
- exports.CacheStore = _chunkA7IKQTXKjs.CacheStore; exports.MIGRATION_REPORT_KIND = _chunkA7IKQTXKjs.MIGRATION_REPORT_KIND; exports.MIGRATION_REPORT_SCHEMA_VERSION = _chunkA7IKQTXKjs.MIGRATION_REPORT_SCHEMA_VERSION; exports.TailwindcssPatcher = _chunkA7IKQTXKjs.TailwindcssPatcher; exports.VALIDATE_EXIT_CODES = _chunkA7IKQTXKjs.VALIDATE_EXIT_CODES; exports.VALIDATE_FAILURE_REASONS = _chunkA7IKQTXKjs.VALIDATE_FAILURE_REASONS; exports.ValidateCommandError = _chunkA7IKQTXKjs.ValidateCommandError; exports.collectClassesFromContexts = _chunkA7IKQTXKjs.collectClassesFromContexts; exports.collectClassesFromTailwindV4 = _chunkA7IKQTXKjs.collectClassesFromTailwindV4; exports.createTailwindcssPatchCli = _chunkQQXAOMUHjs.createTailwindcssPatchCli; exports.defineConfig = _chunkQQXAOMUHjs.defineConfig; exports.extractProjectCandidatesWithPositions = _chunkA7IKQTXKjs.extractProjectCandidatesWithPositions; exports.extractRawCandidates = _chunkA7IKQTXKjs.extractRawCandidates; exports.extractRawCandidatesWithPositions = _chunkA7IKQTXKjs.extractRawCandidatesWithPositions; exports.extractValidCandidates = _chunkA7IKQTXKjs.extractValidCandidates; exports.getPatchStatusReport = _chunkA7IKQTXKjs.getPatchStatusReport; exports.groupTokensByFile = _chunkA7IKQTXKjs.groupTokensByFile; exports.loadRuntimeContexts = _chunkA7IKQTXKjs.loadRuntimeContexts; exports.logger = _chunkA7IKQTXKjs.logger_default; exports.migrateConfigFiles = _chunkA7IKQTXKjs.migrateConfigFiles; exports.mountTailwindcssPatchCommands = _chunkQQXAOMUHjs.mountTailwindcssPatchCommands; exports.normalizeOptions = _chunkA7IKQTXKjs.normalizeOptions; exports.restoreConfigFiles = _chunkA7IKQTXKjs.restoreConfigFiles; exports.runTailwindBuild = _chunkA7IKQTXKjs.runTailwindBuild; exports.tailwindcssPatchCommands = _chunkA7IKQTXKjs.tailwindcssPatchCommands;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_validate = require("./validate-B8H-8rWO.js");
3
+ const require_index_bundle = require("./index.bundle-BGBMTX9A.js");
4
+ exports.CacheStore = require_validate.CacheStore;
5
+ exports.MIGRATION_REPORT_KIND = require_validate.MIGRATION_REPORT_KIND;
6
+ exports.MIGRATION_REPORT_SCHEMA_VERSION = require_validate.MIGRATION_REPORT_SCHEMA_VERSION;
7
+ exports.TailwindcssPatcher = require_validate.TailwindcssPatcher;
8
+ exports.VALIDATE_EXIT_CODES = require_validate.VALIDATE_EXIT_CODES;
9
+ exports.VALIDATE_FAILURE_REASONS = require_validate.VALIDATE_FAILURE_REASONS;
10
+ exports.ValidateCommandError = require_validate.ValidateCommandError;
11
+ exports.collectClassesFromContexts = require_validate.collectClassesFromContexts;
12
+ exports.collectClassesFromTailwindV4 = require_validate.collectClassesFromTailwindV4;
13
+ exports.createTailwindcssPatchCli = require_index_bundle.createTailwindcssPatchCli;
14
+ exports.defineConfig = require_index_bundle.defineConfig;
15
+ exports.extractProjectCandidatesWithPositions = require_validate.extractProjectCandidatesWithPositions;
16
+ exports.extractRawCandidates = require_validate.extractRawCandidates;
17
+ exports.extractRawCandidatesWithPositions = require_validate.extractRawCandidatesWithPositions;
18
+ exports.extractValidCandidates = require_validate.extractValidCandidates;
19
+ exports.getPatchStatusReport = require_validate.getPatchStatusReport;
20
+ exports.groupTokensByFile = require_validate.groupTokensByFile;
21
+ exports.loadRuntimeContexts = require_validate.loadRuntimeContexts;
22
+ exports.logger = require_validate.logger;
23
+ exports.migrateConfigFiles = require_validate.migrateConfigFiles;
24
+ exports.mountTailwindcssPatchCommands = require_index_bundle.mountTailwindcssPatchCommands;
25
+ exports.normalizeOptions = require_validate.normalizeOptions;
26
+ exports.restoreConfigFiles = require_validate.restoreConfigFiles;
27
+ exports.runTailwindBuild = require_validate.runTailwindBuild;
28
+ exports.tailwindcssPatchCommands = require_validate.tailwindcssPatchCommands;
package/dist/index.mjs CHANGED
@@ -1,57 +1,3 @@
1
- import {
2
- createTailwindcssPatchCli,
3
- defineConfig,
4
- mountTailwindcssPatchCommands
5
- } from "./chunk-YYBY7EM5.mjs";
6
- import {
7
- CacheStore,
8
- MIGRATION_REPORT_KIND,
9
- MIGRATION_REPORT_SCHEMA_VERSION,
10
- TailwindcssPatcher,
11
- VALIDATE_EXIT_CODES,
12
- VALIDATE_FAILURE_REASONS,
13
- ValidateCommandError,
14
- collectClassesFromContexts,
15
- collectClassesFromTailwindV4,
16
- extractProjectCandidatesWithPositions,
17
- extractRawCandidates,
18
- extractRawCandidatesWithPositions,
19
- extractValidCandidates,
20
- getPatchStatusReport,
21
- groupTokensByFile,
22
- loadRuntimeContexts,
23
- logger_default,
24
- migrateConfigFiles,
25
- normalizeOptions,
26
- restoreConfigFiles,
27
- runTailwindBuild,
28
- tailwindcssPatchCommands
29
- } from "./chunk-4BA7N3QJ.mjs";
30
- import "./chunk-OSH52QWA.mjs";
31
- export {
32
- CacheStore,
33
- MIGRATION_REPORT_KIND,
34
- MIGRATION_REPORT_SCHEMA_VERSION,
35
- TailwindcssPatcher,
36
- VALIDATE_EXIT_CODES,
37
- VALIDATE_FAILURE_REASONS,
38
- ValidateCommandError,
39
- collectClassesFromContexts,
40
- collectClassesFromTailwindV4,
41
- createTailwindcssPatchCli,
42
- defineConfig,
43
- extractProjectCandidatesWithPositions,
44
- extractRawCandidates,
45
- extractRawCandidatesWithPositions,
46
- extractValidCandidates,
47
- getPatchStatusReport,
48
- groupTokensByFile,
49
- loadRuntimeContexts,
50
- logger_default as logger,
51
- migrateConfigFiles,
52
- mountTailwindcssPatchCommands,
53
- normalizeOptions,
54
- restoreConfigFiles,
55
- runTailwindBuild,
56
- tailwindcssPatchCommands
57
- };
1
+ import { C as normalizeOptions, T as logger, _ as extractRawCandidates, a as tailwindcssPatchCommands, b as groupTokensByFile, c as MIGRATION_REPORT_KIND, d as getPatchStatusReport, f as runTailwindBuild, g as extractProjectCandidatesWithPositions, h as collectClassesFromTailwindV4, l as MIGRATION_REPORT_SCHEMA_VERSION, m as collectClassesFromContexts, n as VALIDATE_FAILURE_REASONS, o as migrateConfigFiles, p as loadRuntimeContexts, r as ValidateCommandError, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher, v as extractRawCandidatesWithPositions, w as CacheStore, y as extractValidCandidates } from "./validate-BI8356RT.mjs";
2
+ import { n as defineConfig, r as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "./index.bundle-ByrTqrr3.mjs";
3
+ export { CacheStore, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, TailwindcssPatcher, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };