tailwindcss-patch 7.0.1 → 7.1.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.
@@ -813,7 +813,8 @@ async function extractValidCandidates(options) {
813
813
  sources: [
814
814
  {
815
815
  base: cwd,
816
- pattern: "**/*"
816
+ pattern: "**/*",
817
+ negated: false
817
818
  }
818
819
  ]
819
820
  }
@@ -967,7 +968,8 @@ var TailwindcssPatcher = class {
967
968
  sources: v4?.sources?.map((x) => {
968
969
  return {
969
970
  base: x.base ?? v4?.base ?? process5.cwd(),
970
- pattern: x.pattern
971
+ pattern: x.pattern,
972
+ negated: x.negated
971
973
  };
972
974
  })
973
975
  });
@@ -982,7 +984,8 @@ var TailwindcssPatcher = class {
982
984
  sources: v4?.sources?.map((x) => {
983
985
  return {
984
986
  base: x.base ?? v4?.base ?? process5.cwd(),
985
- pattern: x.pattern
987
+ pattern: x.pattern,
988
+ negated: x.negated
986
989
  };
987
990
  })
988
991
  });
@@ -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.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
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.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
2
2
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
3
3
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
4
4
 
@@ -817,7 +817,8 @@ async function extractValidCandidates(options) {
817
817
  sources: [
818
818
  {
819
819
  base: cwd,
820
- pattern: "**/*"
820
+ pattern: "**/*",
821
+ negated: false
821
822
  }
822
823
  ]
823
824
  }
@@ -971,7 +972,8 @@ var TailwindcssPatcher = (_class = class {
971
972
  sources: _optionalChain([v4, 'optionalAccess', _34 => _34.sources, 'optionalAccess', _35 => _35.map, 'call', _36 => _36((x) => {
972
973
  return {
973
974
  base: _nullishCoalesce(_nullishCoalesce(x.base, () => ( _optionalChain([v4, 'optionalAccess', _37 => _37.base]))), () => ( _process2.default.cwd())),
974
- pattern: x.pattern
975
+ pattern: x.pattern,
976
+ negated: x.negated
975
977
  };
976
978
  })])
977
979
  });
@@ -986,7 +988,8 @@ var TailwindcssPatcher = (_class = class {
986
988
  sources: _optionalChain([v4, 'optionalAccess', _42 => _42.sources, 'optionalAccess', _43 => _43.map, 'call', _44 => _44((x) => {
987
989
  return {
988
990
  base: _nullishCoalesce(_nullishCoalesce(x.base, () => ( _optionalChain([v4, 'optionalAccess', _45 => _45.base]))), () => ( _process2.default.cwd())),
989
- pattern: x.pattern
991
+ pattern: x.pattern,
992
+ negated: x.negated
990
993
  };
991
994
  })])
992
995
  });
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunk6CLAFWMVjs = require('./chunk-6CLAFWMV.js');
7
+ var _chunkT7FU63AYjs = require('./chunk-T7FU63AY.js');
8
8
 
9
9
  // src/cli.ts
10
10
  var _process = require('process'); var _process2 = _interopRequireDefault(_process);
@@ -16,26 +16,26 @@ function init() {
16
16
  }
17
17
  var cli = _cac2.default.call(void 0, );
18
18
  cli.command("install", "patch install").action(() => {
19
- const twPatcher = new (0, _chunk6CLAFWMVjs.TailwindcssPatcher)({
20
- patch: _chunk6CLAFWMVjs.getPatchOptions.call(void 0, )
19
+ const twPatcher = new (0, _chunkT7FU63AYjs.TailwindcssPatcher)({
20
+ patch: _chunkT7FU63AYjs.getPatchOptions.call(void 0, )
21
21
  });
22
22
  twPatcher.patch();
23
23
  });
24
24
  cli.command("init").action(async () => {
25
25
  await init();
26
- _chunk6CLAFWMVjs.logger_default.success(`\u2728 ${_config.CONFIG_NAME}.config.ts initialized!`);
26
+ _chunkT7FU63AYjs.logger_default.success(`\u2728 ${_config.CONFIG_NAME}.config.ts initialized!`);
27
27
  });
28
28
  cli.command("extract").option("--css [file]", "css file entries").action(async (options) => {
29
29
  const { config } = await _config.getConfig.call(void 0, );
30
30
  const file = options.css;
31
31
  if (config) {
32
- const twPatcher = new (0, _chunk6CLAFWMVjs.TailwindcssPatcher)(
32
+ const twPatcher = new (0, _chunkT7FU63AYjs.TailwindcssPatcher)(
33
33
  {
34
- patch: _chunk6CLAFWMVjs.defuOverrideArray.call(void 0,
34
+ patch: _chunkT7FU63AYjs.defuOverrideArray.call(void 0,
35
35
  config.patch,
36
36
  {
37
37
  resolve: {
38
- paths: [_chunk6CLAFWMVjs.importMetaUrl]
38
+ paths: [_chunkT7FU63AYjs.importMetaUrl]
39
39
  },
40
40
  tailwindcss: {
41
41
  v4: {
@@ -47,7 +47,7 @@ cli.command("extract").option("--css [file]", "css file entries").action(async (
47
47
  }
48
48
  );
49
49
  const p = await twPatcher.extract();
50
- p && _chunk6CLAFWMVjs.logger_default.success(`\u2728 tailwindcss-patch extract success! file path: ${p.filename}, classList length: ${p.classList.length}`);
50
+ p && _chunkT7FU63AYjs.logger_default.success(`\u2728 tailwindcss-patch extract success! file path: ${p.filename}, classList length: ${p.classList.length}`);
51
51
  }
52
52
  });
53
53
  cli.help();
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  defuOverrideArray,
4
4
  getPatchOptions,
5
5
  logger_default
6
- } from "./chunk-VHUTSBJN.mjs";
6
+ } from "./chunk-MRFFSSEO.mjs";
7
7
 
8
8
  // src/cli.ts
9
9
  import process from "node:process";
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ export { TailwindcssUserConfig, defineConfig } from '@tailwindcss-mangle/config'
3
3
  import { Node, Rule } from 'postcss';
4
4
  import { Config } from 'tailwindcss';
5
5
  import { PackageInfo } from 'local-pkg';
6
- import { GlobEntry } from '@tailwindcss/oxide';
6
+ import { SourceEntry } from '@tailwindcss/oxide';
7
7
  import * as consola from 'consola';
8
8
 
9
9
  type CacheStrategy = 'merge' | 'overwrite';
@@ -102,7 +102,7 @@ declare class CacheManager {
102
102
  }
103
103
 
104
104
  interface ExtractValidCandidatesOption {
105
- sources?: GlobEntry[];
105
+ sources?: SourceEntry[];
106
106
  base?: string;
107
107
  css?: string;
108
108
  }
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { TailwindcssUserConfig, defineConfig } from '@tailwindcss-mangle/config'
3
3
  import { Node, Rule } from 'postcss';
4
4
  import { Config } from 'tailwindcss';
5
5
  import { PackageInfo } from 'local-pkg';
6
- import { GlobEntry } from '@tailwindcss/oxide';
6
+ import { SourceEntry } from '@tailwindcss/oxide';
7
7
  import * as consola from 'consola';
8
8
 
9
9
  type CacheStrategy = 'merge' | 'overwrite';
@@ -102,7 +102,7 @@ declare class CacheManager {
102
102
  }
103
103
 
104
104
  interface ExtractValidCandidatesOption {
105
- sources?: GlobEntry[];
105
+ sources?: SourceEntry[];
106
106
  base?: string;
107
107
  css?: string;
108
108
  }
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunk6CLAFWMVjs = require('./chunk-6CLAFWMV.js');
11
+ var _chunkT7FU63AYjs = require('./chunk-T7FU63AY.js');
12
12
 
13
13
  // src/index.ts
14
14
  var _config = require('@tailwindcss-mangle/config');
@@ -23,4 +23,4 @@ var _config = require('@tailwindcss-mangle/config');
23
23
 
24
24
 
25
25
 
26
- exports.CacheManager = _chunk6CLAFWMVjs.CacheManager; exports.TailwindcssPatcher = _chunk6CLAFWMVjs.TailwindcssPatcher; exports.defineConfig = _config.defineConfig; exports.getCacheOptions = _chunk6CLAFWMVjs.getCacheOptions; exports.internalPatch = _chunk6CLAFWMVjs.internalPatch; exports.logger = _chunk6CLAFWMVjs.logger_default; exports.monkeyPatchForExposingContextV2 = _chunk6CLAFWMVjs.monkeyPatchForExposingContextV2; exports.monkeyPatchForExposingContextV3 = _chunk6CLAFWMVjs.monkeyPatchForExposingContextV3; exports.monkeyPatchForSupportingCustomUnitV3 = _chunk6CLAFWMVjs.monkeyPatchForSupportingCustomUnitV3; exports.monkeyPatchForSupportingCustomUnitV4 = _chunk6CLAFWMVjs.monkeyPatchForSupportingCustomUnitV4;
26
+ exports.CacheManager = _chunkT7FU63AYjs.CacheManager; exports.TailwindcssPatcher = _chunkT7FU63AYjs.TailwindcssPatcher; exports.defineConfig = _config.defineConfig; exports.getCacheOptions = _chunkT7FU63AYjs.getCacheOptions; exports.internalPatch = _chunkT7FU63AYjs.internalPatch; exports.logger = _chunkT7FU63AYjs.logger_default; exports.monkeyPatchForExposingContextV2 = _chunkT7FU63AYjs.monkeyPatchForExposingContextV2; exports.monkeyPatchForExposingContextV3 = _chunkT7FU63AYjs.monkeyPatchForExposingContextV3; exports.monkeyPatchForSupportingCustomUnitV3 = _chunkT7FU63AYjs.monkeyPatchForSupportingCustomUnitV3; exports.monkeyPatchForSupportingCustomUnitV4 = _chunkT7FU63AYjs.monkeyPatchForSupportingCustomUnitV4;
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  monkeyPatchForExposingContextV3,
9
9
  monkeyPatchForSupportingCustomUnitV3,
10
10
  monkeyPatchForSupportingCustomUnitV4
11
- } from "./chunk-VHUTSBJN.mjs";
11
+ } from "./chunk-MRFFSSEO.mjs";
12
12
 
13
13
  // src/index.ts
14
14
  import { defineConfig } from "@tailwindcss-mangle/config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss-patch",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "description": "patch tailwindcss for exposing context and extract classes",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -50,28 +50,28 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@babel/generator": "^7.26.9",
54
- "@babel/parser": "^7.26.9",
55
- "@babel/traverse": "^7.26.9",
56
- "@babel/types": "^7.26.9",
53
+ "@babel/generator": "^7.27.0",
54
+ "@babel/parser": "^7.27.0",
55
+ "@babel/traverse": "^7.27.0",
56
+ "@babel/types": "^7.27.0",
57
57
  "cac": "^6.7.14",
58
- "consola": "^3.4.0",
58
+ "consola": "^3.4.2",
59
59
  "fs-extra": "^11.3.0",
60
- "local-pkg": "^1.1.0",
60
+ "local-pkg": "^1.1.1",
61
61
  "pathe": "^2.0.3",
62
62
  "postcss": "^8.5.3",
63
63
  "semver": "^7.7.1",
64
64
  "tailwindcss-config": "^1.0.0",
65
- "@tailwindcss-mangle/config": "^5.0.5"
65
+ "@tailwindcss-mangle/config": "^5.1.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@tailwindcss/node": "^4.0.9",
69
- "@tailwindcss/oxide": "^4.0.9",
70
- "@tailwindcss/postcss": "^4.0.9",
71
- "@tailwindcss/vite": "^4.0.9",
72
- "tailwindcss": "^4.0.9",
68
+ "@tailwindcss/node": "^4.1.1",
69
+ "@tailwindcss/oxide": "^4.1.1",
70
+ "@tailwindcss/postcss": "^4.1.1",
71
+ "@tailwindcss/vite": "^4.1.1",
72
+ "tailwindcss": "^4.1.1",
73
73
  "tailwindcss-3": "npm:tailwindcss@^3",
74
- "tailwindcss-4": "npm:tailwindcss@^4.0.9"
74
+ "tailwindcss-4": "npm:tailwindcss@^4.1.1"
75
75
  },
76
76
  "scripts": {
77
77
  "dev": "tsup --watch --sourcemap",