tailwindcss-patch 2.2.4 → 3.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.
package/dist/index.cjs CHANGED
@@ -1,606 +1,34 @@
1
1
  'use strict';
2
2
 
3
- const fs$1 = require('node:fs/promises');
4
- const path = require('node:path');
5
- const fs = require('node:fs');
6
- const pkg = require('resolve');
7
- const semver = require('semver');
8
- const t = require('@babel/types');
9
- const _babelGenerate = require('@babel/generator');
10
- const _babelTraverse = require('@babel/traverse');
11
- const parser = require('@babel/parser');
12
- const postcss = require('postcss');
13
- const lilconfig = require('lilconfig');
14
- const createJiti = require('jiti');
3
+ const index = require('./shared/tailwindcss-patch.1e524aba.cjs');
15
4
  const config = require('@tailwindcss-mangle/config');
16
-
17
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
18
-
19
- function _interopNamespaceCompat(e) {
20
- if (e && typeof e === 'object' && 'default' in e) return e;
21
- const n = Object.create(null);
22
- if (e) {
23
- for (const k in e) {
24
- n[k] = e[k];
25
- }
26
- }
27
- n.default = e;
28
- return n;
29
- }
30
-
31
- const fs__default$1 = /*#__PURE__*/_interopDefaultCompat(fs$1);
32
- const path__default = /*#__PURE__*/_interopDefaultCompat(path);
33
- const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
34
- const pkg__default = /*#__PURE__*/_interopDefaultCompat(pkg);
35
- const t__namespace = /*#__PURE__*/_interopNamespaceCompat(t);
36
- const _babelGenerate__default = /*#__PURE__*/_interopDefaultCompat(_babelGenerate);
37
- const _babelTraverse__default = /*#__PURE__*/_interopDefaultCompat(_babelTraverse);
38
- const postcss__default = /*#__PURE__*/_interopDefaultCompat(postcss);
39
- const createJiti__default = /*#__PURE__*/_interopDefaultCompat(createJiti);
40
-
41
- const { sync } = pkg__default;
42
- function ensureFileContent(filepaths) {
43
- if (typeof filepaths === "string") {
44
- filepaths = [filepaths];
45
- }
46
- let content;
47
- for (const filepath of filepaths) {
48
- if (fs__default.existsSync(filepath)) {
49
- content = fs__default.readFileSync(filepath, {
50
- encoding: "utf8"
51
- });
52
- break;
53
- }
54
- }
55
- return content;
56
- }
57
- function requireResolve(id, opts) {
58
- return sync(id, opts);
59
- }
60
- async function ensureDir(p) {
61
- try {
62
- await fs__default$1.access(p);
63
- } catch {
64
- await fs__default$1.mkdir(p, {
65
- recursive: true
66
- });
67
- }
68
- }
69
-
70
- function getTailwindcssEntry(basedir) {
71
- return requireResolve("tailwindcss", {
72
- basedir
73
- });
74
- }
75
- function getContexts(basedir) {
76
- const twPath = getTailwindcssEntry(basedir);
77
- const distPath = path__default.dirname(twPath);
78
- let injectFilePath = path__default.join(distPath, "plugin.js");
79
- if (!fs__default.existsSync(injectFilePath)) {
80
- injectFilePath = path__default.join(distPath, "index.js");
81
- }
82
- const mo = require(injectFilePath);
83
- if (mo.contextRef) {
84
- return mo.contextRef.value;
85
- }
86
- return [];
87
- }
88
- function getClassCaches(basedir) {
89
- const contexts = getContexts(basedir);
90
- return contexts.map((x) => x.classCache);
91
- }
92
- function getClassCacheSet(basedir, options) {
93
- const classCaches = getClassCaches(basedir);
94
- const classSet = /* @__PURE__ */ new Set();
95
- for (const classCacheMap of classCaches) {
96
- const keys = classCacheMap.keys();
97
- for (const key of keys) {
98
- const v = key.toString();
99
- if (options?.removeUniversalSelector && v === "*") {
100
- continue;
101
- }
102
- classSet.add(v);
103
- }
104
- }
105
- return classSet;
106
- }
107
-
108
- const pkgName = "tailwindcss-patch";
109
-
110
- function log(message, ...optionalParams) {
111
- return console.log(`[${pkgName}]:` + message, ...optionalParams);
112
- }
113
-
114
- var __defProp$1 = Object.defineProperty;
115
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
116
- var __publicField$1 = (obj, key, value) => {
117
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
118
- return value;
119
- };
120
- function getCacheOptions(options) {
121
- let cache;
122
- switch (typeof options) {
123
- case "undefined": {
124
- cache = {
125
- enable: false
126
- };
127
- break;
128
- }
129
- case "boolean": {
130
- cache = {
131
- enable: options
132
- };
133
- break;
134
- }
135
- case "object": {
136
- cache = { ...options, enable: true };
137
- break;
138
- }
139
- }
140
- return cache;
141
- }
142
- class CacheManager {
143
- constructor(options = {}) {
144
- __publicField$1(this, "options");
145
- this.options = this.getOptions(options);
146
- }
147
- mkdir(cacheDirectory) {
148
- const exists = fs__default.existsSync(cacheDirectory);
149
- if (!exists) {
150
- fs__default.mkdirSync(cacheDirectory, {
151
- recursive: true
152
- });
153
- }
154
- return cacheDirectory;
155
- }
156
- getOptions(options = {}) {
157
- const cwd = options.cwd ?? process.cwd();
158
- const dir = options.dir ?? path__default.resolve(cwd, "node_modules/.cache", pkgName);
159
- const file = options.file ?? "index.json";
160
- const filename = path__default.resolve(dir, file);
161
- return {
162
- cwd,
163
- dir,
164
- file,
165
- filename,
166
- strategy: "merge"
167
- };
168
- }
169
- write(data) {
170
- try {
171
- const { dir, filename } = this.options;
172
- this.mkdir(dir);
173
- fs__default.writeFileSync(filename, JSON.stringify([...data], void 0, 2), "utf8");
174
- return filename;
175
- } catch {
176
- log("write cache file fail!");
177
- }
178
- }
179
- read() {
180
- const { filename } = this.options;
181
- try {
182
- if (fs__default.existsSync(filename)) {
183
- const data = fs__default.readFileSync(filename, "utf8");
184
- return new Set(JSON.parse(data));
185
- }
186
- } catch {
187
- log("parse cache content fail! path:" + filename);
188
- try {
189
- fs__default.unlinkSync(filename);
190
- } catch {
191
- log("delete cache file fail! path:" + filename);
192
- }
193
- }
194
- }
195
- }
196
-
197
- function isPlainObject(value) {
198
- if (value === null || typeof value !== "object") {
199
- return false;
200
- }
201
- const prototype = Object.getPrototypeOf(value);
202
- if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
203
- return false;
204
- }
205
- if (Symbol.iterator in value) {
206
- return false;
207
- }
208
- if (Symbol.toStringTag in value) {
209
- return Object.prototype.toString.call(value) === "[object Module]";
210
- }
211
- return true;
212
- }
213
-
214
- function _defu(baseObject, defaults, namespace = ".", merger) {
215
- if (!isPlainObject(defaults)) {
216
- return _defu(baseObject, {}, namespace, merger);
217
- }
218
- const object = Object.assign({}, defaults);
219
- for (const key in baseObject) {
220
- if (key === "__proto__" || key === "constructor") {
221
- continue;
222
- }
223
- const value = baseObject[key];
224
- if (value === null || value === void 0) {
225
- continue;
226
- }
227
- if (merger && merger(object, key, value, namespace)) {
228
- continue;
229
- }
230
- if (Array.isArray(value) && Array.isArray(object[key])) {
231
- object[key] = [...value, ...object[key]];
232
- } else if (isPlainObject(value) && isPlainObject(object[key])) {
233
- object[key] = _defu(
234
- value,
235
- object[key],
236
- (namespace ? `${namespace}.` : "") + key.toString(),
237
- merger
238
- );
239
- } else {
240
- object[key] = value;
241
- }
242
- }
243
- return object;
244
- }
245
- function createDefu(merger) {
246
- return (...arguments_) => (
247
- // eslint-disable-next-line unicorn/no-array-reduce
248
- arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
249
- );
250
- }
251
- const defu = createDefu();
252
-
253
- function _interopDefaultCompat$1(e) {
254
- return e && typeof e === "object" && "default" in e ? e.default : e;
255
- }
256
- const generate = _interopDefaultCompat$1(_babelGenerate__default);
257
- const traverse = _interopDefaultCompat$1(_babelTraverse__default);
258
-
259
- function inspectProcessTailwindFeaturesReturnContext(content) {
260
- const ast = parser.parse(content);
261
- let hasPatched = false;
262
- traverse(ast, {
263
- FunctionDeclaration(p) {
264
- const n = p.node;
265
- if (n.id?.name === "processTailwindFeatures" && n.body.body.length === 1 && t__namespace.isReturnStatement(n.body.body[0])) {
266
- const rts = n.body.body[0];
267
- if (t__namespace.isFunctionExpression(rts.argument)) {
268
- const body = rts.argument.body.body;
269
- const lastStatement = body[body.length - 1];
270
- hasPatched = t__namespace.isReturnStatement(lastStatement) && t__namespace.isIdentifier(lastStatement.argument) && lastStatement.argument.name === "context";
271
- if (!hasPatched) {
272
- const rts2 = t__namespace.returnStatement(t__namespace.identifier("context"));
273
- body.push(rts2);
274
- }
275
- }
276
- }
277
- }
278
- });
279
- return {
280
- code: hasPatched ? content : generate(ast).code,
281
- hasPatched
282
- };
283
- }
284
- function inspectPostcssPlugin(content) {
285
- const ast = parser.parse(content);
286
- const exportKey = "contextRef";
287
- const variableName = "contextRef";
288
- const valueKey = "value";
289
- let hasPatched = false;
290
- traverse(ast, {
291
- Program(p) {
292
- const n = p.node;
293
- const idx = n.body.findIndex((x) => {
294
- return t__namespace.isExpressionStatement(x) && t__namespace.isAssignmentExpression(x.expression) && t__namespace.isMemberExpression(x.expression.left) && t__namespace.isFunctionExpression(x.expression.right) && x.expression.right.id?.name === "tailwindcss";
295
- });
296
- if (idx > -1) {
297
- const prevStatement = n.body[idx - 1];
298
- const lastStatement = n.body[n.body.length - 1];
299
- const hasPatchedCondition0 = prevStatement && t__namespace.isVariableDeclaration(prevStatement) && prevStatement.declarations.length === 1 && t__namespace.isIdentifier(prevStatement.declarations[0].id) && prevStatement.declarations[0].id.name === variableName;
300
- const hasPatchedCondition1 = t__namespace.isExpressionStatement(lastStatement) && t__namespace.isAssignmentExpression(lastStatement.expression) && t__namespace.isIdentifier(lastStatement.expression.right) && lastStatement.expression.right.name === variableName;
301
- hasPatched = hasPatchedCondition0 || hasPatchedCondition1;
302
- if (!hasPatched) {
303
- const statement = t__namespace.variableDeclaration("const", [
304
- t__namespace.variableDeclarator(t__namespace.identifier(variableName), t__namespace.objectExpression([t__namespace.objectProperty(t__namespace.identifier(valueKey), t__namespace.arrayExpression())]))
305
- ]);
306
- n.body.splice(idx, 0, statement);
307
- n.body.push(
308
- t__namespace.expressionStatement(
309
- t__namespace.assignmentExpression(
310
- "=",
311
- t__namespace.memberExpression(t__namespace.memberExpression(t__namespace.identifier("module"), t__namespace.identifier("exports")), t__namespace.identifier(exportKey)),
312
- t__namespace.identifier(variableName)
313
- )
314
- )
315
- );
316
- }
317
- }
318
- },
319
- FunctionExpression(p) {
320
- if (hasPatched) {
321
- return;
322
- }
323
- const n = p.node;
324
- if (n.id?.name === "tailwindcss" && n.body.body.length === 1 && t__namespace.isReturnStatement(n.body.body[0])) {
325
- const returnStatement = n.body.body[0];
326
- if (t__namespace.isObjectExpression(returnStatement.argument) && returnStatement.argument.properties.length === 2) {
327
- const properties = returnStatement.argument.properties;
328
- if (t__namespace.isObjectProperty(properties[0]) && t__namespace.isObjectProperty(properties[1])) {
329
- const keyMatched = t__namespace.isIdentifier(properties[0].key) && properties[0].key.name === "postcssPlugin";
330
- const pluginsMatched = t__namespace.isIdentifier(properties[1].key) && properties[1].key.name === "plugins";
331
- if (pluginsMatched && keyMatched && t__namespace.isCallExpression(properties[1].value) && t__namespace.isMemberExpression(properties[1].value.callee) && t__namespace.isArrayExpression(properties[1].value.callee.object)) {
332
- const pluginsCode = properties[1].value.callee.object.elements;
333
- if (pluginsCode[1] && t__namespace.isFunctionExpression(pluginsCode[1])) {
334
- const targetBlockStatement = pluginsCode[1].body;
335
- const lastStatement = targetBlockStatement.body[targetBlockStatement.body.length - 1];
336
- if (t__namespace.isExpressionStatement(lastStatement)) {
337
- const newExpressionStatement = t__namespace.expressionStatement(
338
- t__namespace.callExpression(
339
- t__namespace.memberExpression(
340
- t__namespace.memberExpression(t__namespace.identifier(variableName), t__namespace.identifier("value")),
341
- t__namespace.identifier("push")
342
- ),
343
- [lastStatement.expression]
344
- )
345
- );
346
- targetBlockStatement.body[targetBlockStatement.body.length - 1] = newExpressionStatement;
347
- }
348
- const ifIdx = targetBlockStatement.body.findIndex((x) => t__namespace.isIfStatement(x));
349
- if (ifIdx > -1) {
350
- const ifRoot = targetBlockStatement.body[ifIdx];
351
- if (t__namespace.isBlockStatement(ifRoot.consequent) && ifRoot.consequent.body[1] && t__namespace.isForOfStatement(ifRoot.consequent.body[1])) {
352
- const forOf = ifRoot.consequent.body[1];
353
- if (t__namespace.isBlockStatement(forOf.body) && forOf.body.body.length === 1 && t__namespace.isIfStatement(forOf.body.body[0])) {
354
- const if2 = forOf.body.body[0];
355
- if (t__namespace.isBlockStatement(if2.consequent) && if2.consequent.body.length === 1 && t__namespace.isExpressionStatement(if2.consequent.body[0])) {
356
- const target = if2.consequent.body[0];
357
- const newExpressionStatement = t__namespace.expressionStatement(
358
- t__namespace.callExpression(t__namespace.memberExpression(t__namespace.memberExpression(t__namespace.identifier(variableName), t__namespace.identifier("value")), t__namespace.identifier("push")), [target.expression])
359
- );
360
- if2.consequent.body[0] = newExpressionStatement;
361
- }
362
- }
363
- }
364
- }
365
- targetBlockStatement.body.unshift(
366
- // contentRef.value = []
367
- // t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.identifier(variableName), t.identifier(valueKey)), t.arrayExpression()))
368
- // contentRef.value.length = 0
369
- t__namespace.expressionStatement(
370
- t__namespace.assignmentExpression(
371
- "=",
372
- t__namespace.memberExpression(t__namespace.memberExpression(t__namespace.identifier(variableName), t__namespace.identifier(valueKey)), t__namespace.identifier("length")),
373
- t__namespace.numericLiteral(0)
374
- )
375
- )
376
- );
377
- }
378
- }
379
- }
380
- }
381
- }
382
- }
383
- // BlockStatement(p) {
384
- // const n = p.node
385
- // if (start && p.parent.type === 'FunctionExpression' && !p.parent.id) {
386
- // n.body.unshift(t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.identifier(variableName), t.identifier(valueKey)), t.arrayExpression())))
387
- // }
388
- // }
389
- });
390
- return {
391
- code: hasPatched ? content : generate(ast).code,
392
- hasPatched
393
- };
394
- }
395
-
396
- function getDefaultPatchOptions() {
397
- return {
398
- overwrite: true
399
- };
400
- }
401
-
402
- function getInstalledPkgJsonPath(options = {}) {
403
- try {
404
- const tmpJsonPath = requireResolve(`tailwindcss/package.json`, {
405
- paths: options.paths
406
- });
407
- return tmpJsonPath;
408
- } catch (error) {
409
- if (error.code === "MODULE_NOT_FOUND") {
410
- console.warn("Can't find npm pkg: `tailwindcss`, Please ensure it has been installed!");
411
- }
412
- }
413
- }
414
- function getPatchOptions(options = {}) {
415
- return defu(
416
- options,
417
- {
418
- basedir: process.cwd()
419
- },
420
- getDefaultPatchOptions()
421
- );
422
- }
423
- function createPatch(opt) {
424
- return () => {
425
- try {
426
- const pkgJsonPath = getInstalledPkgJsonPath(opt);
427
- return internalPatch(pkgJsonPath, opt);
428
- } catch (error) {
429
- console.warn(`patch tailwindcss failed:` + error.message);
430
- }
431
- };
432
- }
433
- function monkeyPatchForExposingContext(twDir, opt) {
434
- const processTailwindFeaturesFilePath = path__default.resolve(twDir, "lib/processTailwindFeatures.js");
435
- const processTailwindFeaturesContent = ensureFileContent(processTailwindFeaturesFilePath);
436
- const result = {};
437
- if (processTailwindFeaturesContent) {
438
- const { code, hasPatched } = inspectProcessTailwindFeaturesReturnContext(processTailwindFeaturesContent);
439
- if (!hasPatched && opt.overwrite) {
440
- fs__default.writeFileSync(processTailwindFeaturesFilePath, code, {
441
- encoding: "utf8"
442
- });
443
- console.log("patch tailwindcss processTailwindFeatures for return content successfully!");
444
- }
445
- result.processTailwindFeatures = code;
446
- }
447
- const pluginFilePath = path__default.resolve(twDir, "lib/plugin.js");
448
- const indexFilePath = path__default.resolve(twDir, "lib/index.js");
449
- const pluginContent = ensureFileContent([pluginFilePath, indexFilePath]);
450
- if (pluginContent) {
451
- const { code, hasPatched } = inspectPostcssPlugin(pluginContent);
452
- if (!hasPatched && opt.overwrite) {
453
- fs__default.writeFileSync(pluginFilePath, code, {
454
- encoding: "utf8"
455
- });
456
- console.log("patch tailwindcss for expose runtime content successfully!");
457
- }
458
- result.plugin = code;
459
- }
460
- opt.custom && typeof opt.custom === "function" && opt.custom(twDir, result);
461
- return result;
462
- }
463
- function internalPatch(pkgJsonPath, options) {
464
- if (pkgJsonPath) {
465
- const pkgJson = require(pkgJsonPath);
466
- const twDir = path__default.dirname(pkgJsonPath);
467
- if (semver.gte(pkgJson.version, "3.0.0")) {
468
- options.version = pkgJson.version;
469
- const result = monkeyPatchForExposingContext(twDir, options);
470
- return result;
471
- }
472
- }
473
- }
474
-
475
- const jiti = createJiti__default(__filename);
476
- async function processTailwindcss(options) {
477
- options.cwd = options.cwd ?? process.cwd();
478
- let config = options.config;
479
- if (!(typeof options.config === "string" && path__default.isAbsolute(options.config))) {
480
- const moduleName = "tailwind";
481
- const result = await lilconfig.lilconfig("tailwindcss", {
482
- searchPlaces: [
483
- `${moduleName}.config.js`,
484
- `${moduleName}.config.cjs`,
485
- `${moduleName}.config.mjs`,
486
- `${moduleName}.config.ts`,
487
- `${moduleName}.config.cts`,
488
- `${moduleName}.config.mts`
489
- ],
490
- loaders: {
491
- // 默认支持 js 和 cjs 2种格式
492
- ".js": jiti,
493
- ".cjs": jiti,
494
- ".mjs": jiti,
495
- ".ts": jiti,
496
- ".cts": jiti,
497
- ".mts": jiti
498
- }
499
- }).search(options.cwd);
500
- if (!result) {
501
- throw new Error(`No TailwindCSS Config found in: ${options.cwd}`);
502
- }
503
- config = result.filepath;
504
- }
505
- return await postcss__default([
506
- require("tailwindcss")({
507
- config
508
- })
509
- ]).process("@tailwind base;@tailwind components;@tailwind utilities;", {
510
- from: void 0
511
- });
512
- }
513
-
514
- var __defProp = Object.defineProperty;
515
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
516
- var __publicField = (obj, key, value) => {
517
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
518
- return value;
519
- };
520
- class TailwindcssPatcher {
521
- constructor(options = {}) {
522
- __publicField(this, "rawOptions");
523
- __publicField(this, "cacheOptions");
524
- __publicField(this, "patchOptions");
525
- __publicField(this, "patch");
526
- __publicField(this, "cacheManager");
527
- this.rawOptions = options;
528
- this.cacheOptions = getCacheOptions(options.cache);
529
- this.patchOptions = getPatchOptions(options.patch);
530
- this.patch = createPatch(this.patchOptions);
531
- this.cacheManager = new CacheManager(this.cacheOptions);
532
- }
533
- getPkgEntry(basedir) {
534
- return getTailwindcssEntry(basedir);
535
- }
536
- setCache(set) {
537
- if (this.cacheOptions.enable) {
538
- return this.cacheManager.write(set);
539
- }
540
- }
541
- getCache() {
542
- return this.cacheManager.read();
543
- }
544
- /**
545
- * @description 在多个 tailwindcss 上下文时,这个方法将被执行多次,所以策略上应该使用 append
546
- * 详见 taro weapp-tailwindcss 独立分包
547
- * @param basedir
548
- * @returns
549
- */
550
- getClassSet(options) {
551
- const { basedir, cacheStrategy = this.cacheOptions.strategy ?? "merge", removeUniversalSelector = true } = options ?? {};
552
- const set = getClassCacheSet(basedir, {
553
- removeUniversalSelector
554
- });
555
- if (cacheStrategy === "overwrite") {
556
- set.size > 0 && this.setCache(set);
557
- } else if (cacheStrategy === "merge") {
558
- const cacheSet = this.getCache();
559
- if (cacheSet) {
560
- for (const x of cacheSet) {
561
- set.add(x);
562
- }
563
- }
564
- this.setCache(set);
565
- }
566
- return set;
567
- }
568
- getContexts(basedir) {
569
- return getContexts(basedir);
570
- }
571
- async extract(options) {
572
- const { output, tailwindcss } = options ?? {};
573
- if (output && tailwindcss) {
574
- const { removeUniversalSelector, filename, loose } = output;
575
- await processTailwindcss(tailwindcss);
576
- const set = this.getClassSet({
577
- removeUniversalSelector
578
- });
579
- if (filename) {
580
- await ensureDir(path.dirname(filename));
581
- const classList = [...set];
582
- await fs__default$1.writeFile(filename, JSON.stringify(classList, null, loose ? 2 : void 0), "utf8");
583
- return filename;
584
- }
585
- }
586
- }
587
- }
588
-
5
+ require('node:path');
6
+ require('node:fs');
7
+ require('node:process');
8
+ require('semver');
9
+ require('@babel/types');
10
+ require('@babel/generator');
11
+ require('@babel/traverse');
12
+ require('@babel/parser');
13
+ require('node:fs/promises');
14
+ require('resolve');
15
+ require('postcss');
16
+ require('lilconfig');
17
+ require('jiti');
18
+
19
+
20
+
21
+ exports.CacheManager = index.CacheManager;
22
+ exports.TailwindcssPatcher = index.TailwindcssPatcher;
23
+ exports.ensureDir = index.ensureDir;
24
+ exports.ensureFileContent = index.ensureFileContent;
25
+ exports.getCacheOptions = index.getCacheOptions;
26
+ exports.getPackageInfoSync = index.getPackageInfoSync;
27
+ exports.inspectPostcssPlugin = index.inspectPostcssPlugin;
28
+ exports.inspectProcessTailwindFeaturesReturnContext = index.inspectProcessTailwindFeaturesReturnContext;
29
+ exports.internalPatch = index.internalPatch;
30
+ exports.isObject = index.isObject;
31
+ exports.monkeyPatchForExposingContextV2 = index.monkeyPatchForExposingContextV2;
32
+ exports.monkeyPatchForExposingContextV3 = index.monkeyPatchForExposingContextV3;
33
+ exports.requireResolve = index.requireResolve;
589
34
  exports.defineConfig = config.defineConfig;
590
- exports.CacheManager = CacheManager;
591
- exports.TailwindcssPatcher = TailwindcssPatcher;
592
- exports.createPatch = createPatch;
593
- exports.ensureDir = ensureDir;
594
- exports.ensureFileContent = ensureFileContent;
595
- exports.getCacheOptions = getCacheOptions;
596
- exports.getClassCacheSet = getClassCacheSet;
597
- exports.getClassCaches = getClassCaches;
598
- exports.getContexts = getContexts;
599
- exports.getInstalledPkgJsonPath = getInstalledPkgJsonPath;
600
- exports.getPatchOptions = getPatchOptions;
601
- exports.getTailwindcssEntry = getTailwindcssEntry;
602
- exports.inspectPostcssPlugin = inspectPostcssPlugin;
603
- exports.inspectProcessTailwindFeaturesReturnContext = inspectProcessTailwindFeaturesReturnContext;
604
- exports.internalPatch = internalPatch;
605
- exports.monkeyPatchForExposingContext = monkeyPatchForExposingContext;
606
- exports.requireResolve = requireResolve;