tailwindcss-patch 9.2.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/commands/cli-runtime.js +1 -1
- package/dist/commands/cli-runtime.mjs +1 -1
- package/dist/{index.bundle-BQ_yKkd8.js → index.bundle-BkqJb7rw.js} +1 -1
- package/dist/{index.bundle-dp_pw5fq.mjs → index.bundle-Dnh0a6WS.mjs} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{validate-749MHvAC.js → validate-Bo-Ua7Kg.js} +16 -2
- package/dist/{validate-D5elFZMj.mjs → validate-CceFRP7h.mjs} +16 -2
- package/package.json +2 -2
- package/src/extraction/candidate-extractor.ts +20 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_validate = require("./validate-
|
|
3
|
-
const require_index_bundle = require("./index.bundle-
|
|
2
|
+
const require_validate = require("./validate-Bo-Ua7Kg.js");
|
|
3
|
+
const require_index_bundle = require("./index.bundle-BkqJb7rw.js");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
6
6
|
//#region src/cli.bundle.ts
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as logger, r as ValidateCommandError } from "./validate-
|
|
2
|
-
import { t as createTailwindcssPatchCli } from "./index.bundle-
|
|
1
|
+
import { k as logger, r as ValidateCommandError } from "./validate-CceFRP7h.mjs";
|
|
2
|
+
import { t as createTailwindcssPatchCli } from "./index.bundle-Dnh0a6WS.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
//#region src/cli.bundle.ts
|
|
5
5
|
async function main() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../chunk-8l464Juk.js");
|
|
3
|
-
const require_validate = require("../validate-
|
|
3
|
+
const require_validate = require("../validate-Bo-Ua7Kg.js");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
6
6
|
let fs_extra = require("fs-extra");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as loadWorkspaceConfigModule, T as loadPatchOptionsForWorkspace, a as tailwindcssPatchCommands, b as groupTokensByFile, i as classifyValidateError, k as logger, n as VALIDATE_FAILURE_REASONS, o as migrateConfigFiles, r as ValidateCommandError, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher } from "../validate-
|
|
1
|
+
import { E as loadWorkspaceConfigModule, T as loadPatchOptionsForWorkspace, a as tailwindcssPatchCommands, b as groupTokensByFile, i as classifyValidateError, k as logger, n as VALIDATE_FAILURE_REASONS, o as migrateConfigFiles, r as ValidateCommandError, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher } from "../validate-CceFRP7h.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import path from "pathe";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_validate = require("./validate-
|
|
2
|
+
const require_validate = require("./validate-Bo-Ua7Kg.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as extractTailwindV4InlineSourceCandidates, D as normalizeOptions, S as loadTailwindV4DesignSystem, _ as extractRawCandidates, v as extractRawCandidatesWithPositions, w as resolveValidTailwindV4Candidates, x as compileTailwindV4Source } from "./validate-
|
|
1
|
+
import { C as extractTailwindV4InlineSourceCandidates, D as normalizeOptions, S as loadTailwindV4DesignSystem, _ as extractRawCandidates, v as extractRawCandidatesWithPositions, w as resolveValidTailwindV4Candidates, x as compileTailwindV4Source } from "./validate-CceFRP7h.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "pathe";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_validate = require("./validate-
|
|
3
|
-
const require_index_bundle = require("./index.bundle-
|
|
2
|
+
const require_validate = require("./validate-Bo-Ua7Kg.js");
|
|
3
|
+
const require_index_bundle = require("./index.bundle-BkqJb7rw.js");
|
|
4
4
|
exports.CacheStore = require_validate.CacheStore;
|
|
5
5
|
exports.MIGRATION_REPORT_KIND = require_validate.MIGRATION_REPORT_KIND;
|
|
6
6
|
exports.MIGRATION_REPORT_SCHEMA_VERSION = require_validate.MIGRATION_REPORT_SCHEMA_VERSION;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { D as normalizeOptions, O as CacheStore, S as loadTailwindV4DesignSystem, _ 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, k as logger, 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 resolveValidTailwindV4Candidates, y as extractValidCandidates } from "./validate-
|
|
2
|
-
import { a as resolveTailwindV4SourceFromPatchOptions, i as resolveTailwindV4Source, n as defineConfig, o as createTailwindV4Engine, r as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "./index.bundle-
|
|
1
|
+
import { D as normalizeOptions, O as CacheStore, S as loadTailwindV4DesignSystem, _ 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, k as logger, 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 resolveValidTailwindV4Candidates, y as extractValidCandidates } from "./validate-CceFRP7h.mjs";
|
|
2
|
+
import { a as resolveTailwindV4SourceFromPatchOptions, i as resolveTailwindV4Source, n as defineConfig, o as createTailwindV4Engine, r as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "./index.bundle-Dnh0a6WS.mjs";
|
|
3
3
|
export { CacheStore, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, TailwindcssPatcher, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindV4Engine, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|
|
@@ -23,7 +23,7 @@ _babel_traverse = require_chunk.__toESM(_babel_traverse);
|
|
|
23
23
|
let _babel_parser = require("@babel/parser");
|
|
24
24
|
let tailwindcss_config = require("tailwindcss-config");
|
|
25
25
|
//#region package.json
|
|
26
|
-
var version = "9.2.
|
|
26
|
+
var version = "9.2.1";
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/constants.ts
|
|
29
29
|
const pkgName = "tailwindcss-patch";
|
|
@@ -1709,11 +1709,25 @@ async function compileTailwindV4Source(source) {
|
|
|
1709
1709
|
//#region src/extraction/candidate-extractor.ts
|
|
1710
1710
|
let oxideImportPromise;
|
|
1711
1711
|
const designSystemCandidateCache = /* @__PURE__ */ new Map();
|
|
1712
|
+
function createOxideRuntimeDependencyError(cause) {
|
|
1713
|
+
return new Error([
|
|
1714
|
+
"tailwindcss-patch could not load @tailwindcss/oxide, which is required for source candidate scanning.",
|
|
1715
|
+
"This dependency should be installed automatically by tailwindcss-patch.",
|
|
1716
|
+
"Reinstall dependencies without disabling optional dependencies, or install @tailwindcss/oxide@^4.2.4 manually if your package manager omitted it."
|
|
1717
|
+
].join(" "), { cause });
|
|
1718
|
+
}
|
|
1712
1719
|
async function importOxide() {
|
|
1713
|
-
|
|
1720
|
+
try {
|
|
1721
|
+
return await import("@tailwindcss/oxide");
|
|
1722
|
+
} catch (error) {
|
|
1723
|
+
throw createOxideRuntimeDependencyError(error);
|
|
1724
|
+
}
|
|
1714
1725
|
}
|
|
1715
1726
|
function getOxideModule() {
|
|
1716
1727
|
oxideImportPromise ??= importOxide();
|
|
1728
|
+
oxideImportPromise.catch(() => {
|
|
1729
|
+
oxideImportPromise = void 0;
|
|
1730
|
+
});
|
|
1717
1731
|
return oxideImportPromise;
|
|
1718
1732
|
}
|
|
1719
1733
|
async function extractRawCandidatesWithPositions(content, extension = "html") {
|
|
@@ -16,7 +16,7 @@ import _babelTraverse from "@babel/traverse";
|
|
|
16
16
|
import { parse, parse as parse$1 } from "@babel/parser";
|
|
17
17
|
import { loadConfig } from "tailwindcss-config";
|
|
18
18
|
//#region package.json
|
|
19
|
-
var version = "9.2.
|
|
19
|
+
var version = "9.2.1";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/constants.ts
|
|
22
22
|
const pkgName = "tailwindcss-patch";
|
|
@@ -1707,11 +1707,25 @@ async function compileTailwindV4Source(source) {
|
|
|
1707
1707
|
//#region src/extraction/candidate-extractor.ts
|
|
1708
1708
|
let oxideImportPromise;
|
|
1709
1709
|
const designSystemCandidateCache = /* @__PURE__ */ new Map();
|
|
1710
|
+
function createOxideRuntimeDependencyError(cause) {
|
|
1711
|
+
return new Error([
|
|
1712
|
+
"tailwindcss-patch could not load @tailwindcss/oxide, which is required for source candidate scanning.",
|
|
1713
|
+
"This dependency should be installed automatically by tailwindcss-patch.",
|
|
1714
|
+
"Reinstall dependencies without disabling optional dependencies, or install @tailwindcss/oxide@^4.2.4 manually if your package manager omitted it."
|
|
1715
|
+
].join(" "), { cause });
|
|
1716
|
+
}
|
|
1710
1717
|
async function importOxide() {
|
|
1711
|
-
|
|
1718
|
+
try {
|
|
1719
|
+
return await import("@tailwindcss/oxide");
|
|
1720
|
+
} catch (error) {
|
|
1721
|
+
throw createOxideRuntimeDependencyError(error);
|
|
1722
|
+
}
|
|
1712
1723
|
}
|
|
1713
1724
|
function getOxideModule() {
|
|
1714
1725
|
oxideImportPromise ??= importOxide();
|
|
1726
|
+
oxideImportPromise.catch(() => {
|
|
1727
|
+
oxideImportPromise = void 0;
|
|
1728
|
+
});
|
|
1715
1729
|
return oxideImportPromise;
|
|
1716
1730
|
}
|
|
1717
1731
|
async function extractRawCandidatesWithPositions(content, extension = "html") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"@babel/traverse": "^7.29.0",
|
|
67
67
|
"@babel/types": "^7.29.0",
|
|
68
68
|
"@tailwindcss/node": "^4.2.4",
|
|
69
|
+
"@tailwindcss/oxide": "^4.2.4",
|
|
69
70
|
"cac": "6.7.14",
|
|
70
71
|
"consola": "^3.4.2",
|
|
71
72
|
"fs-extra": "^11.3.4",
|
|
@@ -77,7 +78,6 @@
|
|
|
77
78
|
"@tailwindcss-mangle/config": "7.0.1"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@tailwindcss/oxide": "^4.2.4",
|
|
81
81
|
"@tailwindcss/postcss": "^4.2.4",
|
|
82
82
|
"@tailwindcss/vite": "^4.2.4",
|
|
83
83
|
"tailwindcss": "^4.1.18",
|
|
@@ -14,12 +14,31 @@ import { getTailwindV4DesignSystemCacheKey, loadTailwindV4DesignSystem } from '.
|
|
|
14
14
|
let oxideImportPromise: ReturnType<typeof importOxide> | undefined
|
|
15
15
|
const designSystemCandidateCache = new Map<string, Map<string, boolean>>()
|
|
16
16
|
|
|
17
|
+
function createOxideRuntimeDependencyError(cause: unknown) {
|
|
18
|
+
return new Error(
|
|
19
|
+
[
|
|
20
|
+
'tailwindcss-patch could not load @tailwindcss/oxide, which is required for source candidate scanning.',
|
|
21
|
+
'This dependency should be installed automatically by tailwindcss-patch.',
|
|
22
|
+
'Reinstall dependencies without disabling optional dependencies, or install @tailwindcss/oxide@^4.2.4 manually if your package manager omitted it.',
|
|
23
|
+
].join(' '),
|
|
24
|
+
{ cause },
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
17
28
|
async function importOxide() {
|
|
18
|
-
|
|
29
|
+
try {
|
|
30
|
+
return await import('@tailwindcss/oxide')
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
throw createOxideRuntimeDependencyError(error)
|
|
34
|
+
}
|
|
19
35
|
}
|
|
20
36
|
|
|
21
37
|
function getOxideModule() {
|
|
22
38
|
oxideImportPromise ??= importOxide()
|
|
39
|
+
oxideImportPromise.catch(() => {
|
|
40
|
+
oxideImportPromise = undefined
|
|
41
|
+
})
|
|
23
42
|
return oxideImportPromise
|
|
24
43
|
}
|
|
25
44
|
|