tailwindcss-patch 8.4.2 → 8.4.3
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-6WXBENUZ.js → chunk-FLS2Y3CS.js} +11 -10
- package/dist/{chunk-K5JHLM3J.mjs → chunk-LV6YDLJ7.mjs} +10 -9
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
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;// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.
|
|
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;// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/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
|
|
|
@@ -1523,13 +1523,6 @@ var TailwindcssPatcher = (_class = class {
|
|
|
1523
1523
|
const contexts = this.getContexts();
|
|
1524
1524
|
return collectClassesFromContexts(contexts, this.options.filter);
|
|
1525
1525
|
}
|
|
1526
|
-
collectClassSetSync() {
|
|
1527
|
-
if (this.majorVersion === 4) {
|
|
1528
|
-
throw new Error("getClassSetSync is not supported for Tailwind CSS v4 projects. Use getClassSet instead.");
|
|
1529
|
-
}
|
|
1530
|
-
const contexts = this.getContexts();
|
|
1531
|
-
return collectClassesFromContexts(contexts, this.options.filter);
|
|
1532
|
-
}
|
|
1533
1526
|
async mergeWithCache(set) {
|
|
1534
1527
|
if (!this.options.cache.enabled) {
|
|
1535
1528
|
return set;
|
|
@@ -1574,8 +1567,16 @@ var TailwindcssPatcher = (_class = class {
|
|
|
1574
1567
|
return this.mergeWithCache(set);
|
|
1575
1568
|
}
|
|
1576
1569
|
getClassSetSync() {
|
|
1577
|
-
|
|
1578
|
-
|
|
1570
|
+
if (this.majorVersion === 4) {
|
|
1571
|
+
throw new Error("getClassSetSync is not supported for Tailwind CSS v4 projects. Use getClassSet instead.");
|
|
1572
|
+
}
|
|
1573
|
+
const contexts = this.getContexts();
|
|
1574
|
+
const set = collectClassesFromContexts(contexts, this.options.filter);
|
|
1575
|
+
const merged = this.mergeWithCacheSync(set);
|
|
1576
|
+
if (contexts.length === 0 && merged.size === 0) {
|
|
1577
|
+
return void 0;
|
|
1578
|
+
}
|
|
1579
|
+
return merged;
|
|
1579
1580
|
}
|
|
1580
1581
|
async extract(options) {
|
|
1581
1582
|
const shouldWrite = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _68 => _68.write]), () => ( this.options.output.enabled));
|
|
@@ -1519,13 +1519,6 @@ var TailwindcssPatcher = class {
|
|
|
1519
1519
|
const contexts = this.getContexts();
|
|
1520
1520
|
return collectClassesFromContexts(contexts, this.options.filter);
|
|
1521
1521
|
}
|
|
1522
|
-
collectClassSetSync() {
|
|
1523
|
-
if (this.majorVersion === 4) {
|
|
1524
|
-
throw new Error("getClassSetSync is not supported for Tailwind CSS v4 projects. Use getClassSet instead.");
|
|
1525
|
-
}
|
|
1526
|
-
const contexts = this.getContexts();
|
|
1527
|
-
return collectClassesFromContexts(contexts, this.options.filter);
|
|
1528
|
-
}
|
|
1529
1522
|
async mergeWithCache(set) {
|
|
1530
1523
|
if (!this.options.cache.enabled) {
|
|
1531
1524
|
return set;
|
|
@@ -1570,8 +1563,16 @@ var TailwindcssPatcher = class {
|
|
|
1570
1563
|
return this.mergeWithCache(set);
|
|
1571
1564
|
}
|
|
1572
1565
|
getClassSetSync() {
|
|
1573
|
-
|
|
1574
|
-
|
|
1566
|
+
if (this.majorVersion === 4) {
|
|
1567
|
+
throw new Error("getClassSetSync is not supported for Tailwind CSS v4 projects. Use getClassSet instead.");
|
|
1568
|
+
}
|
|
1569
|
+
const contexts = this.getContexts();
|
|
1570
|
+
const set = collectClassesFromContexts(contexts, this.options.filter);
|
|
1571
|
+
const merged = this.mergeWithCacheSync(set);
|
|
1572
|
+
if (contexts.length === 0 && merged.size === 0) {
|
|
1573
|
+
return void 0;
|
|
1574
|
+
}
|
|
1575
|
+
return merged;
|
|
1575
1576
|
}
|
|
1576
1577
|
async extract(options) {
|
|
1577
1578
|
const shouldWrite = options?.write ?? this.options.output.enabled;
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFLS2Y3CSjs = require('./chunk-FLS2Y3CS.js');
|
|
4
4
|
|
|
5
5
|
// src/cli.ts
|
|
6
|
-
var cli =
|
|
6
|
+
var cli = _chunkFLS2Y3CSjs.createTailwindcssPatchCli.call(void 0, );
|
|
7
7
|
cli.help();
|
|
8
8
|
cli.parse();
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -391,11 +391,10 @@ declare class TailwindcssPatcher {
|
|
|
391
391
|
getContexts(): TailwindcssRuntimeContext[];
|
|
392
392
|
private runTailwindBuildIfNeeded;
|
|
393
393
|
private collectClassSet;
|
|
394
|
-
private collectClassSetSync;
|
|
395
394
|
private mergeWithCache;
|
|
396
395
|
private mergeWithCacheSync;
|
|
397
396
|
getClassSet(): Promise<Set<string>>;
|
|
398
|
-
getClassSetSync(): Set<string
|
|
397
|
+
getClassSetSync(): Set<string> | undefined;
|
|
399
398
|
extract(options?: {
|
|
400
399
|
write?: boolean;
|
|
401
400
|
}): Promise<ExtractResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -391,11 +391,10 @@ declare class TailwindcssPatcher {
|
|
|
391
391
|
getContexts(): TailwindcssRuntimeContext[];
|
|
392
392
|
private runTailwindBuildIfNeeded;
|
|
393
393
|
private collectClassSet;
|
|
394
|
-
private collectClassSetSync;
|
|
395
394
|
private mergeWithCache;
|
|
396
395
|
private mergeWithCacheSync;
|
|
397
396
|
getClassSet(): Promise<Set<string>>;
|
|
398
|
-
getClassSetSync(): Set<string
|
|
397
|
+
getClassSetSync(): Set<string> | undefined;
|
|
399
398
|
extract(options?: {
|
|
400
399
|
write?: boolean;
|
|
401
400
|
}): Promise<ExtractResult>;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkFLS2Y3CSjs = require('./chunk-FLS2Y3CS.js');
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var _config = require('@tailwindcss-mangle/config');
|
|
@@ -37,4 +37,4 @@ var _config = require('@tailwindcss-mangle/config');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
exports.CacheStore =
|
|
40
|
+
exports.CacheStore = _chunkFLS2Y3CSjs.CacheStore; exports.TailwindcssPatcher = _chunkFLS2Y3CSjs.TailwindcssPatcher; exports.collectClassesFromContexts = _chunkFLS2Y3CSjs.collectClassesFromContexts; exports.collectClassesFromTailwindV4 = _chunkFLS2Y3CSjs.collectClassesFromTailwindV4; exports.createTailwindcssPatchCli = _chunkFLS2Y3CSjs.createTailwindcssPatchCli; exports.defineConfig = _config.defineConfig; exports.extractProjectCandidatesWithPositions = _chunkFLS2Y3CSjs.extractProjectCandidatesWithPositions; exports.extractRawCandidates = _chunkFLS2Y3CSjs.extractRawCandidates; exports.extractRawCandidatesWithPositions = _chunkFLS2Y3CSjs.extractRawCandidatesWithPositions; exports.extractValidCandidates = _chunkFLS2Y3CSjs.extractValidCandidates; exports.groupTokensByFile = _chunkFLS2Y3CSjs.groupTokensByFile; exports.loadRuntimeContexts = _chunkFLS2Y3CSjs.loadRuntimeContexts; exports.logger = _chunkFLS2Y3CSjs.logger_default; exports.mountTailwindcssPatchCommands = _chunkFLS2Y3CSjs.mountTailwindcssPatchCommands; exports.normalizeOptions = _chunkFLS2Y3CSjs.normalizeOptions; exports.runTailwindBuild = _chunkFLS2Y3CSjs.runTailwindBuild; exports.tailwindcssPatchCommands = _chunkFLS2Y3CSjs.tailwindcssPatchCommands;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.3",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"pathe": "^2.0.3",
|
|
63
63
|
"postcss": "^8.5.6",
|
|
64
64
|
"semver": "^7.7.3",
|
|
65
|
-
"tailwindcss-config": "^1.1.
|
|
65
|
+
"tailwindcss-config": "^1.1.3",
|
|
66
66
|
"@tailwindcss-mangle/config": "6.1.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|