tailwindcss-patch 9.0.0-alpha.3 → 9.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-D6ICWMM4.mjs → chunk-4BA7N3QJ.mjs} +17 -10
- package/dist/{chunk-77GHKSKG.js → chunk-A7IKQTXK.js} +19 -12
- package/dist/{chunk-A67ABH3M.mjs → chunk-OSH52QWA.mjs} +1 -1
- package/dist/{chunk-PMN7HS4Y.js → chunk-QQXAOMUH.js} +2 -2
- package/dist/{chunk-5CWNAWKP.js → chunk-ZPLR2UEW.js} +1 -1
- package/dist/cli.js +6 -6
- package/dist/cli.mjs +2 -2
- package/dist/commands/cli-runtime.js +307 -337
- package/dist/commands/cli-runtime.mjs +241 -271
- package/dist/{dist-7O2232CU.js → dist-22YCNIJW.js} +1 -1
- package/dist/{dist-7UDSGIWH.mjs → dist-7W73GIRD.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
- package/src/runtime/class-collector.ts +10 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__dirname
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OSH52QWA.mjs";
|
|
4
4
|
|
|
5
5
|
// src/logger.ts
|
|
6
6
|
import { createConsola } from "consola";
|
|
@@ -20,7 +20,7 @@ import path from "pathe";
|
|
|
20
20
|
// package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "tailwindcss-patch",
|
|
23
|
-
version: "9.0.0-alpha.
|
|
23
|
+
version: "9.0.0-alpha.5",
|
|
24
24
|
description: "patch tailwindcss for exposing context and extract classes",
|
|
25
25
|
author: "ice breaker <1324318532@qq.com>",
|
|
26
26
|
license: "MIT",
|
|
@@ -110,12 +110,12 @@ var package_default = {
|
|
|
110
110
|
},
|
|
111
111
|
dependencies: {
|
|
112
112
|
"@babel/generator": "^7.29.1",
|
|
113
|
-
"@babel/parser": "^7.29.
|
|
113
|
+
"@babel/parser": "^7.29.2",
|
|
114
114
|
"@babel/traverse": "^7.29.0",
|
|
115
115
|
"@babel/types": "^7.29.0",
|
|
116
116
|
"@tailwindcss-mangle/config": "workspace:*",
|
|
117
|
-
"@tailwindcss/node": "^4.2.
|
|
118
|
-
cac: "
|
|
117
|
+
"@tailwindcss/node": "^4.2.2",
|
|
118
|
+
cac: "6.7.14",
|
|
119
119
|
consola: "^3.4.2",
|
|
120
120
|
"fs-extra": "^11.3.4",
|
|
121
121
|
"local-pkg": "^1.1.2",
|
|
@@ -125,9 +125,9 @@ var package_default = {
|
|
|
125
125
|
"tailwindcss-config": "^1.1.4"
|
|
126
126
|
},
|
|
127
127
|
devDependencies: {
|
|
128
|
-
"@tailwindcss/oxide": "^4.2.
|
|
129
|
-
"@tailwindcss/postcss": "^4.2.
|
|
130
|
-
"@tailwindcss/vite": "^4.2.
|
|
128
|
+
"@tailwindcss/oxide": "^4.2.2",
|
|
129
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
130
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
131
131
|
tailwindcss: "catalog:tailwindcss4",
|
|
132
132
|
"tailwindcss-3": "catalog:tailwindcss3",
|
|
133
133
|
"tailwindcss-4": "catalog:tailwindcss4"
|
|
@@ -1824,7 +1824,7 @@ async function loadWorkspaceConfigModule() {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
async function loadWorkspaceDefu() {
|
|
1826
1826
|
if (!defuPromise) {
|
|
1827
|
-
defuPromise = import("./dist-
|
|
1827
|
+
defuPromise = import("./dist-7W73GIRD.mjs").then((mod) => mod.defu).catch(async (error) => {
|
|
1828
1828
|
if (!isMissingSharedModuleError(error)) {
|
|
1829
1829
|
throw error;
|
|
1830
1830
|
}
|
|
@@ -2152,13 +2152,20 @@ function spliceChangesIntoString(str, changes) {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
|
|
2154
2154
|
// src/runtime/class-collector.ts
|
|
2155
|
+
function collectRuntimeCandidateKeys(context) {
|
|
2156
|
+
const candidateRuleCache = context.candidateRuleCache;
|
|
2157
|
+
if (candidateRuleCache instanceof Map && candidateRuleCache.size > 0) {
|
|
2158
|
+
return candidateRuleCache.keys();
|
|
2159
|
+
}
|
|
2160
|
+
return context.classCache.keys();
|
|
2161
|
+
}
|
|
2155
2162
|
function collectClassesFromContexts(contexts, filter) {
|
|
2156
2163
|
const set = /* @__PURE__ */ new Set();
|
|
2157
2164
|
for (const context of contexts) {
|
|
2158
2165
|
if (!isObject(context) || !context.classCache) {
|
|
2159
2166
|
continue;
|
|
2160
2167
|
}
|
|
2161
|
-
for (const key of context
|
|
2168
|
+
for (const key of collectRuntimeCandidateKeys(context)) {
|
|
2162
2169
|
const className = key.toString();
|
|
2163
2170
|
if (filter(className)) {
|
|
2164
2171
|
set.add(className);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZPLR2UEWjs = require('./chunk-ZPLR2UEW.js');
|
|
4
4
|
|
|
5
5
|
// src/logger.ts
|
|
6
6
|
var _consola = require('consola');
|
|
@@ -20,7 +20,7 @@ var _pathe = require('pathe'); var _pathe2 = _interopRequireDefault(_pathe);
|
|
|
20
20
|
// package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "tailwindcss-patch",
|
|
23
|
-
version: "9.0.0-alpha.
|
|
23
|
+
version: "9.0.0-alpha.5",
|
|
24
24
|
description: "patch tailwindcss for exposing context and extract classes",
|
|
25
25
|
author: "ice breaker <1324318532@qq.com>",
|
|
26
26
|
license: "MIT",
|
|
@@ -110,12 +110,12 @@ var package_default = {
|
|
|
110
110
|
},
|
|
111
111
|
dependencies: {
|
|
112
112
|
"@babel/generator": "^7.29.1",
|
|
113
|
-
"@babel/parser": "^7.29.
|
|
113
|
+
"@babel/parser": "^7.29.2",
|
|
114
114
|
"@babel/traverse": "^7.29.0",
|
|
115
115
|
"@babel/types": "^7.29.0",
|
|
116
116
|
"@tailwindcss-mangle/config": "workspace:*",
|
|
117
|
-
"@tailwindcss/node": "^4.2.
|
|
118
|
-
cac: "
|
|
117
|
+
"@tailwindcss/node": "^4.2.2",
|
|
118
|
+
cac: "6.7.14",
|
|
119
119
|
consola: "^3.4.2",
|
|
120
120
|
"fs-extra": "^11.3.4",
|
|
121
121
|
"local-pkg": "^1.1.2",
|
|
@@ -125,9 +125,9 @@ var package_default = {
|
|
|
125
125
|
"tailwindcss-config": "^1.1.4"
|
|
126
126
|
},
|
|
127
127
|
devDependencies: {
|
|
128
|
-
"@tailwindcss/oxide": "^4.2.
|
|
129
|
-
"@tailwindcss/postcss": "^4.2.
|
|
130
|
-
"@tailwindcss/vite": "^4.2.
|
|
128
|
+
"@tailwindcss/oxide": "^4.2.2",
|
|
129
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
130
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
131
131
|
tailwindcss: "catalog:tailwindcss4",
|
|
132
132
|
"tailwindcss-3": "catalog:tailwindcss3",
|
|
133
133
|
"tailwindcss-4": "catalog:tailwindcss4"
|
|
@@ -1824,7 +1824,7 @@ async function loadWorkspaceConfigModule() {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
async function loadWorkspaceDefu() {
|
|
1826
1826
|
if (!defuPromise) {
|
|
1827
|
-
defuPromise = Promise.resolve().then(() => _interopRequireWildcard(require("./dist-
|
|
1827
|
+
defuPromise = Promise.resolve().then(() => _interopRequireWildcard(require("./dist-22YCNIJW.js"))).then((mod) => mod.defu).catch(async (error) => {
|
|
1828
1828
|
if (!isMissingSharedModuleError(error)) {
|
|
1829
1829
|
throw error;
|
|
1830
1830
|
}
|
|
@@ -2152,13 +2152,20 @@ function spliceChangesIntoString(str, changes) {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
|
|
2154
2154
|
// src/runtime/class-collector.ts
|
|
2155
|
+
function collectRuntimeCandidateKeys(context) {
|
|
2156
|
+
const candidateRuleCache = context.candidateRuleCache;
|
|
2157
|
+
if (candidateRuleCache instanceof Map && candidateRuleCache.size > 0) {
|
|
2158
|
+
return candidateRuleCache.keys();
|
|
2159
|
+
}
|
|
2160
|
+
return context.classCache.keys();
|
|
2161
|
+
}
|
|
2155
2162
|
function collectClassesFromContexts(contexts, filter) {
|
|
2156
2163
|
const set = /* @__PURE__ */ new Set();
|
|
2157
2164
|
for (const context of contexts) {
|
|
2158
2165
|
if (!isObject(context) || !context.classCache) {
|
|
2159
2166
|
continue;
|
|
2160
2167
|
}
|
|
2161
|
-
for (const key of context
|
|
2168
|
+
for (const key of collectRuntimeCandidateKeys(context)) {
|
|
2162
2169
|
const className = key.toString();
|
|
2163
2170
|
if (filter(className)) {
|
|
2164
2171
|
set.add(className);
|
|
@@ -2240,7 +2247,7 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2240
2247
|
var _module = require('module');
|
|
2241
2248
|
|
|
2242
2249
|
|
|
2243
|
-
var require2 = _module.createRequire.call(void 0,
|
|
2250
|
+
var require2 = _module.createRequire.call(void 0, _chunkZPLR2UEWjs.importMetaUrl);
|
|
2244
2251
|
function resolveRuntimeEntry(packageInfo, majorVersion) {
|
|
2245
2252
|
const root = packageInfo.rootPath;
|
|
2246
2253
|
if (majorVersion === 2) {
|
|
@@ -2291,7 +2298,7 @@ function loadRuntimeContexts(packageInfo, majorVersion, refProperty) {
|
|
|
2291
2298
|
|
|
2292
2299
|
var _postcss = require('postcss'); var _postcss2 = _interopRequireDefault(_postcss);
|
|
2293
2300
|
var _tailwindcssconfig = require('tailwindcss-config');
|
|
2294
|
-
var require3 = _module.createRequire.call(void 0,
|
|
2301
|
+
var require3 = _module.createRequire.call(void 0, _chunkZPLR2UEWjs.importMetaUrl);
|
|
2295
2302
|
function resolveModuleEntry(id) {
|
|
2296
2303
|
return _pathe2.default.isAbsolute(id) ? id : require3.resolve(id);
|
|
2297
2304
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.
|
|
1
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.3/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZPLR2UEWjs = require('./chunk-ZPLR2UEW.js');
|
|
4
4
|
|
|
5
5
|
// src/index.bundle.ts
|
|
6
6
|
var _module = require('module');
|
|
7
|
-
var require2 = _module.createRequire.call(void 0,
|
|
7
|
+
var require2 = _module.createRequire.call(void 0, _chunkZPLR2UEWjs.importMetaUrl);
|
|
8
8
|
function loadCliModule() {
|
|
9
9
|
return require2("./commands/cli-runtime.js");
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
2
2
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
3
3
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
4
4
|
|
package/dist/cli.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQQXAOMUHjs = require('./chunk-QQXAOMUH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkA7IKQTXKjs = require('./chunk-A7IKQTXK.js');
|
|
8
|
+
require('./chunk-ZPLR2UEW.js');
|
|
9
9
|
|
|
10
10
|
// src/cli.bundle.ts
|
|
11
11
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
12
12
|
async function main() {
|
|
13
|
-
const cli =
|
|
13
|
+
const cli = _chunkQQXAOMUHjs.createTailwindcssPatchCli.call(void 0, );
|
|
14
14
|
cli.help();
|
|
15
15
|
cli.parse(_process2.default.argv, { run: false });
|
|
16
16
|
await cli.runMatchedCommand();
|
|
17
17
|
}
|
|
18
18
|
main().catch((error) => {
|
|
19
|
-
if (error instanceof
|
|
19
|
+
if (error instanceof _chunkA7IKQTXKjs.ValidateCommandError) {
|
|
20
20
|
_process2.default.exitCode = error.exitCode;
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
const message = error instanceof Error ? error.message : String(error);
|
|
24
|
-
|
|
24
|
+
_chunkA7IKQTXKjs.logger_default.error(message);
|
|
25
25
|
_process2.default.exitCode = 1;
|
|
26
26
|
});
|
package/dist/cli.mjs
CHANGED