@csszyx/unplugin 0.9.10 → 0.10.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 +16 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +2 -1
- package/dist/next-prebuild.cjs +2 -1
- package/dist/next-prebuild.mjs +2 -1
- package/dist/next-turbo-loader.cjs +2 -1
- package/dist/next-turbo-loader.mjs +2 -1
- package/dist/next-watcher.cjs +2 -1
- package/dist/next-watcher.mjs +2 -1
- package/dist/shared/unplugin.3UumZ5gn.mjs +5 -0
- package/dist/shared/{unplugin.CMNZChGZ.d.cts → unplugin.BqLCtc84.d.cts} +164 -2
- package/dist/shared/{unplugin.CMNZChGZ.d.mts → unplugin.BqLCtc84.d.mts} +164 -2
- package/dist/shared/{unplugin.jEasXLFM.mjs → unplugin.CLXpKBe4.mjs} +280 -54
- package/dist/shared/{unplugin.VAel6lI0.mjs → unplugin.CLjhn81z.mjs} +1 -3
- package/dist/shared/{unplugin.Bo6Kx-T6.cjs → unplugin.Cwe-dz1f.cjs} +2 -4
- package/dist/shared/{unplugin.BT-U5kd1.cjs → unplugin.Dk6ddrZX.cjs} +295 -55
- package/dist/shared/unplugin.DoBHTRra.cjs +7 -0
- package/dist/vite.cjs +2 -1
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -1
- package/dist/webpack.cjs +2 -1
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +2 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const cssMangler = require('./css-mangler.cjs');
|
|
6
|
-
const unplugin = require('./shared/unplugin.
|
|
6
|
+
const unplugin = require('./shared/unplugin.Dk6ddrZX.cjs');
|
|
7
7
|
const types = require('@csszyx/types');
|
|
8
8
|
require('postcss');
|
|
9
9
|
require('postcss-selector-parser');
|
|
@@ -18,6 +18,7 @@ require('@csszyx/core/native');
|
|
|
18
18
|
require('@csszyx/svelte-adapter');
|
|
19
19
|
require('@csszyx/vue-adapter');
|
|
20
20
|
require('unplugin');
|
|
21
|
+
require('./shared/unplugin.DoBHTRra.cjs');
|
|
21
22
|
require('node:crypto');
|
|
22
23
|
require('./shared/unplugin.pmTknYLy.cjs');
|
|
23
24
|
require('postcss-value-parser');
|
|
@@ -29,25 +30,35 @@ exports.escapeCSSClassName = cssMangler.escapeCSSClassName;
|
|
|
29
30
|
exports.mangleCSS = cssMangler.mangleCSS;
|
|
30
31
|
exports.mangleCSSSync = cssMangler.mangleCSSSync;
|
|
31
32
|
exports.unescapeTailwindClass = cssMangler.unescapeTailwindClass;
|
|
33
|
+
exports.appendTailwindSourceDirective = unplugin.appendTailwindSourceDirective;
|
|
32
34
|
exports.assertNoRSCBoundaryViolation = unplugin.assertNoRSCBoundaryViolation;
|
|
33
35
|
exports.assertNoRSCGraphViolation = unplugin.assertNoRSCGraphViolation;
|
|
36
|
+
exports.computeSafelistRelPath = unplugin.computeSafelistRelPath;
|
|
34
37
|
exports.createGlobalVarAliasValidationOptions = unplugin.createGlobalVarAliasValidationOptions;
|
|
35
38
|
exports.createGlobalVarMapAssetSource = unplugin.createGlobalVarMapAssetSource;
|
|
36
39
|
exports.createGlobalVarScanCacheKey = unplugin.createGlobalVarScanCacheKey;
|
|
37
40
|
exports.createRSCModuleRecord = unplugin.createRSCModuleRecord;
|
|
41
|
+
exports.cssHasContentScope = unplugin.cssHasContentScope;
|
|
42
|
+
exports.cssImportsTailwind = unplugin.cssImportsTailwind;
|
|
38
43
|
exports.default = unplugin.unplugin;
|
|
39
44
|
exports.deleteRSCModuleRecord = unplugin.deleteRSCModuleRecord;
|
|
40
45
|
exports.esbuildPlugin = unplugin.esbuildPlugin;
|
|
41
46
|
exports.extractGlobalVarAliasesForManifest = unplugin.extractGlobalVarAliasesForManifest;
|
|
42
47
|
exports.findRSCBoundaryViolation = unplugin.findRSCBoundaryViolation;
|
|
43
48
|
exports.findRSCGraphViolation = unplugin.findRSCGraphViolation;
|
|
49
|
+
exports.hasInjectableTailwindCandidate = unplugin.hasInjectableTailwindCandidate;
|
|
44
50
|
exports.hasTokens = unplugin.hasTokens;
|
|
45
51
|
exports.hasUseClientDirective = unplugin.hasUseClientDirective;
|
|
46
52
|
exports.hasUseServerDirective = unplugin.hasUseServerDirective;
|
|
53
|
+
exports.isCompilePackageOptedIn = unplugin.isCompilePackageOptedIn;
|
|
54
|
+
exports.isHardIgnoredPath = unplugin.isHardIgnoredPath;
|
|
55
|
+
exports.isMonorepoPackage = unplugin.isMonorepoPackage;
|
|
56
|
+
exports.isPackagesSkippedSource = unplugin.isPackagesSkippedSource;
|
|
47
57
|
exports.isRSCServerModule = unplugin.isRSCServerModule;
|
|
48
58
|
exports.isTailwindReservedGlobalVar = unplugin.isTailwindReservedGlobalVar;
|
|
49
59
|
exports.mangleCodeClassesSync = unplugin.mangleCodeClassesSync;
|
|
50
60
|
exports.mergeThemes = unplugin.mergeThemes;
|
|
61
|
+
exports.missingTailwindEntryMessage = unplugin.missingTailwindEntryMessage;
|
|
51
62
|
exports.normalizeGlobalVarAliasesForCache = unplugin.normalizeGlobalVarAliasesForCache;
|
|
52
63
|
exports.parseThemeBlocks = unplugin.parseThemeBlocks;
|
|
53
64
|
exports.planGlobalVarAliases = unplugin.planGlobalVarAliases;
|
|
@@ -57,7 +68,11 @@ exports.resolveNativeCacheIdentity = unplugin.resolveNativeCacheIdentity;
|
|
|
57
68
|
exports.rewriteGlobalVarCssAliases = unplugin.rewriteGlobalVarCssAliases;
|
|
58
69
|
exports.rollupPlugin = unplugin.rollupPlugin;
|
|
59
70
|
exports.scanGlobalVarCss = unplugin.scanGlobalVarCss;
|
|
71
|
+
exports.shouldWarnMissingTailwindEntry = unplugin.shouldWarnMissingTailwindEntry;
|
|
72
|
+
exports.shouldWarnUnscopedMonorepo = unplugin.shouldWarnUnscopedMonorepo;
|
|
73
|
+
exports.skippedSzFilesMessage = unplugin.skippedSzFilesMessage;
|
|
60
74
|
exports.unplugin = unplugin.unplugin;
|
|
75
|
+
exports.unscopedMonorepoMessage = unplugin.unscopedMonorepoMessage;
|
|
61
76
|
exports.validateGlobalVarAliasInputs = unplugin.validateGlobalVarAliasInputs;
|
|
62
77
|
exports.vitePlugin = unplugin.vitePlugin;
|
|
63
78
|
exports.webpackPlugin = unplugin.webpackPlugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { CSSManglerOptions, CSSManglerResult, MangleMap, createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.cjs';
|
|
2
2
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
3
|
-
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.
|
|
3
|
+
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.BqLCtc84.cjs';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
export = undefined;
|
|
6
|
-
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, o as
|
|
6
|
+
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, o as appendTailwindSourceDirective, p as computeSafelistRelPath, q as createGlobalVarMapAssetSource, r as cssHasContentScope, s as cssImportsTailwind, t as esbuildPlugin, v as extractGlobalVarAliasesForManifest, w as hasInjectableTailwindCandidate, x as isCompilePackageOptedIn, y as isHardIgnoredPath, z as isMonorepoPackage, A as isPackagesSkippedSource, B as mangleCodeClassesSync, D as missingTailwindEntryMessage, E as normalizeGlobalVarAliasesForCache, F as resolveNativeCacheIdentity, H as rollupPlugin, I as shouldWarnMissingTailwindEntry, J as shouldWarnUnscopedMonorepo, K as skippedSzFilesMessage, u as unplugin, L as unscopedMonorepoMessage, M as vitePlugin, N as webpackPlugin } from './shared/unplugin.BqLCtc84.cjs';
|
|
7
7
|
import 'postcss';
|
|
8
8
|
import '@csszyx/compiler';
|
|
9
9
|
import 'esbuild';
|
|
@@ -225,6 +225,8 @@ interface ParsedTheme {
|
|
|
225
225
|
radii: string[];
|
|
226
226
|
/** Custom shadows (from --shadow-*): e.g. ['card'] */
|
|
227
227
|
shadows: string[];
|
|
228
|
+
/** Custom responsive breakpoints (from --breakpoint-*): e.g. ['tablet', '3xl'] */
|
|
229
|
+
breakpoints: string[];
|
|
228
230
|
}
|
|
229
231
|
/**
|
|
230
232
|
* Parse all @theme blocks in a CSS file and extract design tokens.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CSSManglerOptions, CSSManglerResult, MangleMap, createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
|
|
2
2
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
3
|
-
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.
|
|
4
|
-
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, o as createGlobalVarMapAssetSource, u as default,
|
|
3
|
+
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.BqLCtc84.mjs';
|
|
4
|
+
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, o as appendTailwindSourceDirective, p as computeSafelistRelPath, q as createGlobalVarMapAssetSource, r as cssHasContentScope, s as cssImportsTailwind, u as default, t as esbuildPlugin, v as extractGlobalVarAliasesForManifest, w as hasInjectableTailwindCandidate, x as isCompilePackageOptedIn, y as isHardIgnoredPath, z as isMonorepoPackage, A as isPackagesSkippedSource, B as mangleCodeClassesSync, D as missingTailwindEntryMessage, E as normalizeGlobalVarAliasesForCache, F as resolveNativeCacheIdentity, H as rollupPlugin, I as shouldWarnMissingTailwindEntry, J as shouldWarnUnscopedMonorepo, K as skippedSzFilesMessage, u as unplugin, L as unscopedMonorepoMessage, M as vitePlugin, N as webpackPlugin } from './shared/unplugin.BqLCtc84.mjs';
|
|
5
5
|
import 'postcss';
|
|
6
6
|
import '@csszyx/compiler';
|
|
7
7
|
import 'esbuild';
|
|
@@ -223,6 +223,8 @@ interface ParsedTheme {
|
|
|
223
223
|
radii: string[];
|
|
224
224
|
/** Custom shadows (from --shadow-*): e.g. ['card'] */
|
|
225
225
|
shadows: string[];
|
|
226
|
+
/** Custom responsive breakpoints (from --breakpoint-*): e.g. ['tablet', '3xl'] */
|
|
227
|
+
breakpoints: string[];
|
|
226
228
|
}
|
|
227
229
|
/**
|
|
228
230
|
* Parse all @theme blocks in a CSS file and extract design tokens.
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
|
|
2
|
-
export { a as
|
|
2
|
+
export { a as appendTailwindSourceDirective, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as computeSafelistRelPath, e as createGlobalVarAliasValidationOptions, f as createGlobalVarMapAssetSource, g as createGlobalVarScanCacheKey, h as createRSCModuleRecord, i as cssHasContentScope, j as cssImportsTailwind, u as default, k as deleteRSCModuleRecord, l as esbuildPlugin, m as extractGlobalVarAliasesForManifest, n as findRSCBoundaryViolation, o as findRSCGraphViolation, p as hasInjectableTailwindCandidate, q as hasTokens, r as hasUseClientDirective, s as hasUseServerDirective, t as isCompilePackageOptedIn, v as isHardIgnoredPath, w as isMonorepoPackage, x as isPackagesSkippedSource, y as isRSCServerModule, z as isTailwindReservedGlobalVar, A as mangleCodeClassesSync, B as mergeThemes, C as missingTailwindEntryMessage, D as normalizeGlobalVarAliasesForCache, E as parseThemeBlocks, F as planGlobalVarAliases, G as readGlobalVarScanCache, H as resolveGlobalVarScanCacheDir, I as resolveNativeCacheIdentity, J as rewriteGlobalVarCssAliases, K as rollupPlugin, L as scanGlobalVarCss, M as shouldWarnMissingTailwindEntry, N as shouldWarnUnscopedMonorepo, O as skippedSzFilesMessage, u as unplugin, P as unscopedMonorepoMessage, Q as validateGlobalVarAliasInputs, R as vitePlugin, S as webpackPlugin, T as writeGlobalVarScanCache } from './shared/unplugin.CLXpKBe4.mjs';
|
|
3
3
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
4
4
|
import 'postcss';
|
|
5
5
|
import 'postcss-selector-parser';
|
|
@@ -14,6 +14,7 @@ import '@csszyx/core/native';
|
|
|
14
14
|
import '@csszyx/svelte-adapter';
|
|
15
15
|
import '@csszyx/vue-adapter';
|
|
16
16
|
import 'unplugin';
|
|
17
|
+
import './shared/unplugin.3UumZ5gn.mjs';
|
|
17
18
|
import 'node:crypto';
|
|
18
19
|
import './shared/unplugin.BpWUtI9U.mjs';
|
|
19
20
|
import 'postcss-value-parser';
|
package/dist/next-prebuild.cjs
CHANGED
|
@@ -4,11 +4,12 @@ const node_crypto = require('node:crypto');
|
|
|
4
4
|
const fs = require('node:fs');
|
|
5
5
|
const path = require('node:path');
|
|
6
6
|
const nextTransformMetadata = require('./shared/unplugin.DWtXPCGo.cjs');
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.Cwe-dz1f.cjs');
|
|
8
8
|
const transformCache = require('./shared/unplugin.pmTknYLy.cjs');
|
|
9
9
|
require('@csszyx/compiler');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('proper-lockfile');
|
|
12
|
+
require('./shared/unplugin.DoBHTRra.cjs');
|
|
12
13
|
|
|
13
14
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
14
15
|
function _interopNamespaceCompat(e) {
|
package/dist/next-prebuild.mjs
CHANGED
|
@@ -2,11 +2,12 @@ import { createHash } from 'node:crypto';
|
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.C1N5i6Eg.mjs';
|
|
5
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.CLjhn81z.mjs';
|
|
6
6
|
import { r as resolveTransformCacheDir } from './shared/unplugin.BpWUtI9U.mjs';
|
|
7
7
|
import '@csszyx/compiler';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'proper-lockfile';
|
|
10
|
+
import './shared/unplugin.3UumZ5gn.mjs';
|
|
10
11
|
|
|
11
12
|
function runNextPrebuild(options) {
|
|
12
13
|
assertProductionManglingBoundary(options);
|
|
@@ -4,12 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const node_crypto = require('node:crypto');
|
|
6
6
|
const path = require('node:path');
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.Cwe-dz1f.cjs');
|
|
8
8
|
const nextTransformMetadata = require('./shared/unplugin.DWtXPCGo.cjs');
|
|
9
9
|
const transformCache = require('./shared/unplugin.pmTknYLy.cjs');
|
|
10
10
|
require('node:fs');
|
|
11
11
|
require('node:os');
|
|
12
12
|
require('proper-lockfile');
|
|
13
|
+
require('./shared/unplugin.DoBHTRra.cjs');
|
|
13
14
|
require('@csszyx/compiler');
|
|
14
15
|
|
|
15
16
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.
|
|
3
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.CLjhn81z.mjs';
|
|
4
4
|
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.C1N5i6Eg.mjs';
|
|
5
5
|
import { r as resolveTransformCacheDir } from './shared/unplugin.BpWUtI9U.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'proper-lockfile';
|
|
9
|
+
import './shared/unplugin.3UumZ5gn.mjs';
|
|
9
10
|
import '@csszyx/compiler';
|
|
10
11
|
|
|
11
12
|
const DIRECTIVE_PROLOGUE_PREFIX_RE = /^((?:\s|\/\/[^\n]*\n|\/\*(?:[^*]|\*(?!\/))*\*\/)*)(['"]use (?:client|server)['"];?\s*)/;
|
package/dist/next-watcher.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const path = require('node:path');
|
|
4
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
4
|
+
const nextWatcherCycle = require('./shared/unplugin.Cwe-dz1f.cjs');
|
|
5
5
|
require('node:fs');
|
|
6
6
|
require('node:crypto');
|
|
7
7
|
require('node:os');
|
|
8
8
|
require('proper-lockfile');
|
|
9
|
+
require('./shared/unplugin.DoBHTRra.cjs');
|
|
9
10
|
|
|
10
11
|
function _interopNamespaceCompat(e) {
|
|
11
12
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
package/dist/next-watcher.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
-
import { r as runNextWatcherCycle } from './shared/unplugin.
|
|
2
|
+
import { r as runNextWatcherCycle } from './shared/unplugin.CLjhn81z.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'proper-lockfile';
|
|
7
|
+
import './shared/unplugin.3UumZ5gn.mjs';
|
|
7
8
|
|
|
8
9
|
class NextWatcherLoop {
|
|
9
10
|
context;
|
|
@@ -220,6 +220,168 @@ interface GlobalVarCssAliasRewriteResult {
|
|
|
220
220
|
* @returns A stable identity string, or a sentinel when unresolvable.
|
|
221
221
|
*/
|
|
222
222
|
declare function resolveNativeCacheIdentity(): string;
|
|
223
|
+
/**
|
|
224
|
+
* Appends an `@source "<relPath>";` directive to a CSS module so Tailwind v4
|
|
225
|
+
* scans the csszyx-generated safelist file.
|
|
226
|
+
*
|
|
227
|
+
* `@source` is position-independent in Tailwind v4 — it can appear anywhere in
|
|
228
|
+
* the compiled CSS — so the directive is **appended as its own statement**
|
|
229
|
+
* rather than spliced next to the `@import "tailwindcss…"` line. Matching the
|
|
230
|
+
* import syntax is the source of a real defect: the split / manual Tailwind v4
|
|
231
|
+
* setup (`@import "tailwindcss/utilities.css" layer(…)` or `… source(…)`, or an
|
|
232
|
+
* import without a trailing `;`) does not match an import-anchored regex, so the
|
|
233
|
+
* injection silently no-ops and every csszyx-only class (e.g. the static
|
|
234
|
+
* `bg-primary/50` produced by `sz={{ bg: { color, op } }}`) gets no CSS while a
|
|
235
|
+
* raw `className` still works. Appending is correct for every import form.
|
|
236
|
+
*
|
|
237
|
+
* @param code - CSS module source already known to import tailwindcss.
|
|
238
|
+
* @param relPath - safelist path relative to this CSS file (posix, `./`-prefixed).
|
|
239
|
+
* @returns the code with the directive appended, or `null` if it is already
|
|
240
|
+
* present (idempotent — re-running the transform must not stack directives).
|
|
241
|
+
*/
|
|
242
|
+
declare function appendTailwindSourceDirective(code: string, relPath: string): string | null;
|
|
243
|
+
/**
|
|
244
|
+
* Whether a CSS module actually imports the `tailwindcss` package, so the
|
|
245
|
+
* `@source` directive should be appended.
|
|
246
|
+
*
|
|
247
|
+
* Tighter than a substring check on purpose: block comments are stripped first
|
|
248
|
+
* (a commented-out `@import` must not trigger injection), and the package name
|
|
249
|
+
* must end at a quote or a `/` subpath so a different package whose name merely
|
|
250
|
+
* starts with `tailwindcss` (e.g. `tailwindcss-animate`) does not match. Import
|
|
251
|
+
* options after the closing quote (`layer(…)`, `source(…)`) are irrelevant — the
|
|
252
|
+
* match ends at the quote — so every real Tailwind v4 import form is covered.
|
|
253
|
+
*
|
|
254
|
+
* @param code - CSS module source.
|
|
255
|
+
* @returns true if the module imports tailwindcss (exact or a subpath).
|
|
256
|
+
*/
|
|
257
|
+
declare function cssImportsTailwind(code: string): boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the discovered class set contains at least one real Tailwind
|
|
260
|
+
* candidate worth injecting an `@source` for — at least two characters and
|
|
261
|
+
* starting with a letter, which excludes pure mangled symbols.
|
|
262
|
+
*
|
|
263
|
+
* @param classes - the discovered class set.
|
|
264
|
+
* @returns true if any class is an injectable candidate.
|
|
265
|
+
*/
|
|
266
|
+
declare function hasInjectableTailwindCandidate(classes: Iterable<string>): boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Whether to warn that csszyx generated classes Tailwind will not emit CSS for.
|
|
269
|
+
* Fires only when csszyx owns at least one generated class AND no processed CSS
|
|
270
|
+
* imported tailwindcss — i.e. nothing makes Tailwind scan the generated classes.
|
|
271
|
+
*
|
|
272
|
+
* @param ownedClassCount - number of csszyx-generated classes this build produced.
|
|
273
|
+
* @param sawTailwindEntry - whether any processed CSS imported tailwindcss.
|
|
274
|
+
* @returns true when the missing-entry warning should fire.
|
|
275
|
+
*/
|
|
276
|
+
declare function shouldWarnMissingTailwindEntry(ownedClassCount: number, sawTailwindEntry: boolean): boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Build the missing-Tailwind-entry warning message.
|
|
279
|
+
* @param ownedClassCount - number of csszyx-generated classes this build produced.
|
|
280
|
+
* @returns the warning string.
|
|
281
|
+
*/
|
|
282
|
+
declare function missingTailwindEntryMessage(ownedClassCount: number): string;
|
|
283
|
+
/**
|
|
284
|
+
* Whether a CSS module scopes Tailwind's content detection — `source(none)` or
|
|
285
|
+
* `source("…")` on the `@import "tailwindcss"`, or any `@source not` exclusion.
|
|
286
|
+
* A plain additive `@source "…"` does NOT count: it only adds a path, it does
|
|
287
|
+
* not stop the automatic climb-to-the-workspace-root scan. Block comments are
|
|
288
|
+
* stripped first so a commented-out directive does not count.
|
|
289
|
+
*
|
|
290
|
+
* @param code - CSS module source.
|
|
291
|
+
* @returns true when the entry scopes (or excludes from) content detection.
|
|
292
|
+
*/
|
|
293
|
+
declare function cssHasContentScope(code: string): boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Whether `root` is a package INSIDE a monorepo — an ancestor directory is a
|
|
296
|
+
* workspace root (`pnpm-workspace.yaml`, a `package.json` with a `workspaces`
|
|
297
|
+
* field, or an nx/lerna marker). In that case Tailwind v4 automatic content
|
|
298
|
+
* detection would otherwise climb to the workspace root. Synchronous and cheap
|
|
299
|
+
* (a handful of stat calls up the tree); intended to be memoized per build.
|
|
300
|
+
* Mirrors `isInsideWorkspace` in the CLI's `init` command.
|
|
301
|
+
*
|
|
302
|
+
* @param root - the project/package root directory.
|
|
303
|
+
* @returns true when an ancestor is a workspace root.
|
|
304
|
+
*/
|
|
305
|
+
declare function isMonorepoPackage(root: string): boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether to warn that Tailwind content detection is unscoped in a monorepo.
|
|
308
|
+
* Fires only when a Tailwind entry exists, it is NOT scoped, and this package
|
|
309
|
+
* sits inside a workspace — the exact condition that makes Tailwind scan the
|
|
310
|
+
* whole repo and emit phantom/broken classes.
|
|
311
|
+
*
|
|
312
|
+
* @param sawTailwindEntry - whether any processed CSS imported tailwindcss.
|
|
313
|
+
* @param tailwindEntryScoped - whether a Tailwind entry scoped its detection.
|
|
314
|
+
* @param inMonorepo - whether this package sits inside a workspace.
|
|
315
|
+
* @returns true when the unscoped-monorepo warning should fire.
|
|
316
|
+
*/
|
|
317
|
+
declare function shouldWarnUnscopedMonorepo(sawTailwindEntry: boolean, tailwindEntryScoped: boolean, inMonorepo: boolean): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Build the unscoped-monorepo warning message: what is wrong, why it matters,
|
|
320
|
+
* the exact two-line fix, the guide link, and how to silence it.
|
|
321
|
+
* @returns the warning string.
|
|
322
|
+
*/
|
|
323
|
+
declare function unscopedMonorepoMessage(): string;
|
|
324
|
+
/**
|
|
325
|
+
* Whether a `/packages/` file was opted into compilation via `compilePackages`.
|
|
326
|
+
* Matches the package directory name as a path segment (`/packages/<name>/`).
|
|
327
|
+
* `node_modules` is never opted in — real dependencies must not be compiled even
|
|
328
|
+
* if a dependency happens to share a name with a listed workspace package.
|
|
329
|
+
*
|
|
330
|
+
* @param id - bundler file id or filesystem path (Windows backslashes accepted).
|
|
331
|
+
* @param compilePackages - workspace package directory names to compile.
|
|
332
|
+
* @returns true when the file belongs to a listed workspace package.
|
|
333
|
+
*/
|
|
334
|
+
declare function isCompilePackageOptedIn(id: string, compilePackages: readonly string[]): boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Whether a file lives in a built-in directory csszyx never transforms.
|
|
337
|
+
*
|
|
338
|
+
* `node_modules` and `.next` (non-static) are always ignored. `/packages/` is
|
|
339
|
+
* ignored by default — published libraries ship pre-extracted CSS — but is
|
|
340
|
+
* relaxed for packages listed in `compilePackages`, so a monorepo can author
|
|
341
|
+
* `sz` in workspace source. Pulled out as a pure function so the precedence
|
|
342
|
+
* (node_modules/.next stay hard regardless of `compilePackages`) is unit-tested.
|
|
343
|
+
*
|
|
344
|
+
* @param id - bundler file id or filesystem path.
|
|
345
|
+
* @param compilePackages - workspace package directory names to compile.
|
|
346
|
+
* @returns true when the file should be skipped regardless of user filters.
|
|
347
|
+
*/
|
|
348
|
+
declare function isHardIgnoredPath(id: string, compilePackages?: readonly string[]): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Whether a file is workspace-package source that csszyx skipped only because it
|
|
351
|
+
* lives under `/packages/` and was not opted into `compilePackages`. Used to
|
|
352
|
+
* surface the silent no-op (skipped `sz` produces no CSS). `node_modules` and
|
|
353
|
+
* `.next` are excluded — those are never workspace source the developer authors,
|
|
354
|
+
* and scanning `node_modules` for `sz` would be slow and false-positive-prone.
|
|
355
|
+
*
|
|
356
|
+
* @param id - filesystem path of the skipped file.
|
|
357
|
+
* @param compilePackages - workspace package directory names already opted in.
|
|
358
|
+
* @returns true when the skip is a workspace-package `sz` skip worth warning on.
|
|
359
|
+
*/
|
|
360
|
+
declare function isPackagesSkippedSource(id: string, compilePackages?: readonly string[]): boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Build the workspace-package skip warning. Lists the skipped files that contain
|
|
363
|
+
* `sz` so the developer can opt the package into `compilePackages` instead of
|
|
364
|
+
* silently shipping no CSS for them.
|
|
365
|
+
*
|
|
366
|
+
* @param files - skipped `/packages/` file paths that contain `sz`.
|
|
367
|
+
* @returns the warning string.
|
|
368
|
+
*/
|
|
369
|
+
declare function skippedSzFilesMessage(files: readonly string[]): string;
|
|
370
|
+
/**
|
|
371
|
+
* Computes the `@source` target path for a CSS module: the location of the
|
|
372
|
+
* generated safelist file relative to the CSS file, in posix form and always
|
|
373
|
+
* `./`- or `../`-prefixed so Tailwind treats it as a relative path.
|
|
374
|
+
*
|
|
375
|
+
* This is the real-world failure surface — a wrong relative path makes Tailwind
|
|
376
|
+
* silently scan nothing (no error, no CSS), the same symptom as a missing
|
|
377
|
+
* directive — so it is extracted and unit-tested rather than left inline.
|
|
378
|
+
*
|
|
379
|
+
* @param rootDir - project root where the safelist file is written.
|
|
380
|
+
* @param safelistFilename - the safelist file name (e.g. `csszyx-classes.html`).
|
|
381
|
+
* @param cssId - absolute path of the CSS module receiving the directive.
|
|
382
|
+
* @returns the posix relative path from the CSS file to the safelist file.
|
|
383
|
+
*/
|
|
384
|
+
declare function computeSafelistRelPath(rootDir: string, safelistFilename: string, cssId: string): string;
|
|
223
385
|
/**
|
|
224
386
|
* Extracts Phase H global custom-property aliases for manifest/debug tooling.
|
|
225
387
|
*
|
|
@@ -258,7 +420,7 @@ declare function normalizeGlobalVarAliasesForCache(aliases: TransformSourceCodeO
|
|
|
258
420
|
* Pass 1: Direct `className="..."` / `class="..."` static strings
|
|
259
421
|
* Pass 1.5: Template literal quasi (static) segments in `className:\`...\``
|
|
260
422
|
* Pass 2: `className:EXPR` patterns with ternary operators containing quoted strings
|
|
261
|
-
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge,
|
|
423
|
+
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge, _sz, etc.)
|
|
262
424
|
*
|
|
263
425
|
* @param code bundled source code
|
|
264
426
|
* @param mangleMap class-name → mangled-token mapping
|
|
@@ -291,5 +453,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
291
453
|
*/
|
|
292
454
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
293
455
|
|
|
294
|
-
export {
|
|
456
|
+
export { isPackagesSkippedSource as A, mangleCodeClassesSync as B, missingTailwindEntryMessage as D, normalizeGlobalVarAliasesForCache as E, resolveNativeCacheIdentity as F, rollupPlugin as H, shouldWarnMissingTailwindEntry as I, shouldWarnUnscopedMonorepo as J, skippedSzFilesMessage as K, unscopedMonorepoMessage as L, vitePlugin as M, webpackPlugin as N, appendTailwindSourceDirective as o, computeSafelistRelPath as p, createGlobalVarMapAssetSource as q, cssHasContentScope as r, cssImportsTailwind as s, esbuildPlugin as t, unplugin as u, extractGlobalVarAliasesForManifest as v, hasInjectableTailwindCandidate as w, isCompilePackageOptedIn as x, isHardIgnoredPath as y, isMonorepoPackage as z };
|
|
295
457
|
export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, PlanGlobalVarAliasesInput as P, RewriteGlobalVarCssAliasesOptions as R, ScanGlobalVarCssOptions as S, ValidateGlobalVarAliasInputsOptions as V, GlobalVarAliasPlan as a, GlobalVarCssAliasRewriteResult as b, CreateGlobalVarAliasValidationOptionsInput as c, GlobalVarAliasValidationResult as d, CssVarDefinition as e, CssVarLocation as f, CssVarReference as g, GlobalVarAliasDiagnostic as h, GlobalVarAliasDiagnosticSeverity as i, GlobalVarAliasEntry as j, GlobalVarCodeSource as k, GlobalVarCssAssetSource as l, GlobalVarCssSource as m, GlobalVarScanCacheEntry as n };
|
|
@@ -220,6 +220,168 @@ interface GlobalVarCssAliasRewriteResult {
|
|
|
220
220
|
* @returns A stable identity string, or a sentinel when unresolvable.
|
|
221
221
|
*/
|
|
222
222
|
declare function resolveNativeCacheIdentity(): string;
|
|
223
|
+
/**
|
|
224
|
+
* Appends an `@source "<relPath>";` directive to a CSS module so Tailwind v4
|
|
225
|
+
* scans the csszyx-generated safelist file.
|
|
226
|
+
*
|
|
227
|
+
* `@source` is position-independent in Tailwind v4 — it can appear anywhere in
|
|
228
|
+
* the compiled CSS — so the directive is **appended as its own statement**
|
|
229
|
+
* rather than spliced next to the `@import "tailwindcss…"` line. Matching the
|
|
230
|
+
* import syntax is the source of a real defect: the split / manual Tailwind v4
|
|
231
|
+
* setup (`@import "tailwindcss/utilities.css" layer(…)` or `… source(…)`, or an
|
|
232
|
+
* import without a trailing `;`) does not match an import-anchored regex, so the
|
|
233
|
+
* injection silently no-ops and every csszyx-only class (e.g. the static
|
|
234
|
+
* `bg-primary/50` produced by `sz={{ bg: { color, op } }}`) gets no CSS while a
|
|
235
|
+
* raw `className` still works. Appending is correct for every import form.
|
|
236
|
+
*
|
|
237
|
+
* @param code - CSS module source already known to import tailwindcss.
|
|
238
|
+
* @param relPath - safelist path relative to this CSS file (posix, `./`-prefixed).
|
|
239
|
+
* @returns the code with the directive appended, or `null` if it is already
|
|
240
|
+
* present (idempotent — re-running the transform must not stack directives).
|
|
241
|
+
*/
|
|
242
|
+
declare function appendTailwindSourceDirective(code: string, relPath: string): string | null;
|
|
243
|
+
/**
|
|
244
|
+
* Whether a CSS module actually imports the `tailwindcss` package, so the
|
|
245
|
+
* `@source` directive should be appended.
|
|
246
|
+
*
|
|
247
|
+
* Tighter than a substring check on purpose: block comments are stripped first
|
|
248
|
+
* (a commented-out `@import` must not trigger injection), and the package name
|
|
249
|
+
* must end at a quote or a `/` subpath so a different package whose name merely
|
|
250
|
+
* starts with `tailwindcss` (e.g. `tailwindcss-animate`) does not match. Import
|
|
251
|
+
* options after the closing quote (`layer(…)`, `source(…)`) are irrelevant — the
|
|
252
|
+
* match ends at the quote — so every real Tailwind v4 import form is covered.
|
|
253
|
+
*
|
|
254
|
+
* @param code - CSS module source.
|
|
255
|
+
* @returns true if the module imports tailwindcss (exact or a subpath).
|
|
256
|
+
*/
|
|
257
|
+
declare function cssImportsTailwind(code: string): boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Whether the discovered class set contains at least one real Tailwind
|
|
260
|
+
* candidate worth injecting an `@source` for — at least two characters and
|
|
261
|
+
* starting with a letter, which excludes pure mangled symbols.
|
|
262
|
+
*
|
|
263
|
+
* @param classes - the discovered class set.
|
|
264
|
+
* @returns true if any class is an injectable candidate.
|
|
265
|
+
*/
|
|
266
|
+
declare function hasInjectableTailwindCandidate(classes: Iterable<string>): boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Whether to warn that csszyx generated classes Tailwind will not emit CSS for.
|
|
269
|
+
* Fires only when csszyx owns at least one generated class AND no processed CSS
|
|
270
|
+
* imported tailwindcss — i.e. nothing makes Tailwind scan the generated classes.
|
|
271
|
+
*
|
|
272
|
+
* @param ownedClassCount - number of csszyx-generated classes this build produced.
|
|
273
|
+
* @param sawTailwindEntry - whether any processed CSS imported tailwindcss.
|
|
274
|
+
* @returns true when the missing-entry warning should fire.
|
|
275
|
+
*/
|
|
276
|
+
declare function shouldWarnMissingTailwindEntry(ownedClassCount: number, sawTailwindEntry: boolean): boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Build the missing-Tailwind-entry warning message.
|
|
279
|
+
* @param ownedClassCount - number of csszyx-generated classes this build produced.
|
|
280
|
+
* @returns the warning string.
|
|
281
|
+
*/
|
|
282
|
+
declare function missingTailwindEntryMessage(ownedClassCount: number): string;
|
|
283
|
+
/**
|
|
284
|
+
* Whether a CSS module scopes Tailwind's content detection — `source(none)` or
|
|
285
|
+
* `source("…")` on the `@import "tailwindcss"`, or any `@source not` exclusion.
|
|
286
|
+
* A plain additive `@source "…"` does NOT count: it only adds a path, it does
|
|
287
|
+
* not stop the automatic climb-to-the-workspace-root scan. Block comments are
|
|
288
|
+
* stripped first so a commented-out directive does not count.
|
|
289
|
+
*
|
|
290
|
+
* @param code - CSS module source.
|
|
291
|
+
* @returns true when the entry scopes (or excludes from) content detection.
|
|
292
|
+
*/
|
|
293
|
+
declare function cssHasContentScope(code: string): boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Whether `root` is a package INSIDE a monorepo — an ancestor directory is a
|
|
296
|
+
* workspace root (`pnpm-workspace.yaml`, a `package.json` with a `workspaces`
|
|
297
|
+
* field, or an nx/lerna marker). In that case Tailwind v4 automatic content
|
|
298
|
+
* detection would otherwise climb to the workspace root. Synchronous and cheap
|
|
299
|
+
* (a handful of stat calls up the tree); intended to be memoized per build.
|
|
300
|
+
* Mirrors `isInsideWorkspace` in the CLI's `init` command.
|
|
301
|
+
*
|
|
302
|
+
* @param root - the project/package root directory.
|
|
303
|
+
* @returns true when an ancestor is a workspace root.
|
|
304
|
+
*/
|
|
305
|
+
declare function isMonorepoPackage(root: string): boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether to warn that Tailwind content detection is unscoped in a monorepo.
|
|
308
|
+
* Fires only when a Tailwind entry exists, it is NOT scoped, and this package
|
|
309
|
+
* sits inside a workspace — the exact condition that makes Tailwind scan the
|
|
310
|
+
* whole repo and emit phantom/broken classes.
|
|
311
|
+
*
|
|
312
|
+
* @param sawTailwindEntry - whether any processed CSS imported tailwindcss.
|
|
313
|
+
* @param tailwindEntryScoped - whether a Tailwind entry scoped its detection.
|
|
314
|
+
* @param inMonorepo - whether this package sits inside a workspace.
|
|
315
|
+
* @returns true when the unscoped-monorepo warning should fire.
|
|
316
|
+
*/
|
|
317
|
+
declare function shouldWarnUnscopedMonorepo(sawTailwindEntry: boolean, tailwindEntryScoped: boolean, inMonorepo: boolean): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Build the unscoped-monorepo warning message: what is wrong, why it matters,
|
|
320
|
+
* the exact two-line fix, the guide link, and how to silence it.
|
|
321
|
+
* @returns the warning string.
|
|
322
|
+
*/
|
|
323
|
+
declare function unscopedMonorepoMessage(): string;
|
|
324
|
+
/**
|
|
325
|
+
* Whether a `/packages/` file was opted into compilation via `compilePackages`.
|
|
326
|
+
* Matches the package directory name as a path segment (`/packages/<name>/`).
|
|
327
|
+
* `node_modules` is never opted in — real dependencies must not be compiled even
|
|
328
|
+
* if a dependency happens to share a name with a listed workspace package.
|
|
329
|
+
*
|
|
330
|
+
* @param id - bundler file id or filesystem path (Windows backslashes accepted).
|
|
331
|
+
* @param compilePackages - workspace package directory names to compile.
|
|
332
|
+
* @returns true when the file belongs to a listed workspace package.
|
|
333
|
+
*/
|
|
334
|
+
declare function isCompilePackageOptedIn(id: string, compilePackages: readonly string[]): boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Whether a file lives in a built-in directory csszyx never transforms.
|
|
337
|
+
*
|
|
338
|
+
* `node_modules` and `.next` (non-static) are always ignored. `/packages/` is
|
|
339
|
+
* ignored by default — published libraries ship pre-extracted CSS — but is
|
|
340
|
+
* relaxed for packages listed in `compilePackages`, so a monorepo can author
|
|
341
|
+
* `sz` in workspace source. Pulled out as a pure function so the precedence
|
|
342
|
+
* (node_modules/.next stay hard regardless of `compilePackages`) is unit-tested.
|
|
343
|
+
*
|
|
344
|
+
* @param id - bundler file id or filesystem path.
|
|
345
|
+
* @param compilePackages - workspace package directory names to compile.
|
|
346
|
+
* @returns true when the file should be skipped regardless of user filters.
|
|
347
|
+
*/
|
|
348
|
+
declare function isHardIgnoredPath(id: string, compilePackages?: readonly string[]): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Whether a file is workspace-package source that csszyx skipped only because it
|
|
351
|
+
* lives under `/packages/` and was not opted into `compilePackages`. Used to
|
|
352
|
+
* surface the silent no-op (skipped `sz` produces no CSS). `node_modules` and
|
|
353
|
+
* `.next` are excluded — those are never workspace source the developer authors,
|
|
354
|
+
* and scanning `node_modules` for `sz` would be slow and false-positive-prone.
|
|
355
|
+
*
|
|
356
|
+
* @param id - filesystem path of the skipped file.
|
|
357
|
+
* @param compilePackages - workspace package directory names already opted in.
|
|
358
|
+
* @returns true when the skip is a workspace-package `sz` skip worth warning on.
|
|
359
|
+
*/
|
|
360
|
+
declare function isPackagesSkippedSource(id: string, compilePackages?: readonly string[]): boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Build the workspace-package skip warning. Lists the skipped files that contain
|
|
363
|
+
* `sz` so the developer can opt the package into `compilePackages` instead of
|
|
364
|
+
* silently shipping no CSS for them.
|
|
365
|
+
*
|
|
366
|
+
* @param files - skipped `/packages/` file paths that contain `sz`.
|
|
367
|
+
* @returns the warning string.
|
|
368
|
+
*/
|
|
369
|
+
declare function skippedSzFilesMessage(files: readonly string[]): string;
|
|
370
|
+
/**
|
|
371
|
+
* Computes the `@source` target path for a CSS module: the location of the
|
|
372
|
+
* generated safelist file relative to the CSS file, in posix form and always
|
|
373
|
+
* `./`- or `../`-prefixed so Tailwind treats it as a relative path.
|
|
374
|
+
*
|
|
375
|
+
* This is the real-world failure surface — a wrong relative path makes Tailwind
|
|
376
|
+
* silently scan nothing (no error, no CSS), the same symptom as a missing
|
|
377
|
+
* directive — so it is extracted and unit-tested rather than left inline.
|
|
378
|
+
*
|
|
379
|
+
* @param rootDir - project root where the safelist file is written.
|
|
380
|
+
* @param safelistFilename - the safelist file name (e.g. `csszyx-classes.html`).
|
|
381
|
+
* @param cssId - absolute path of the CSS module receiving the directive.
|
|
382
|
+
* @returns the posix relative path from the CSS file to the safelist file.
|
|
383
|
+
*/
|
|
384
|
+
declare function computeSafelistRelPath(rootDir: string, safelistFilename: string, cssId: string): string;
|
|
223
385
|
/**
|
|
224
386
|
* Extracts Phase H global custom-property aliases for manifest/debug tooling.
|
|
225
387
|
*
|
|
@@ -258,7 +420,7 @@ declare function normalizeGlobalVarAliasesForCache(aliases: TransformSourceCodeO
|
|
|
258
420
|
* Pass 1: Direct `className="..."` / `class="..."` static strings
|
|
259
421
|
* Pass 1.5: Template literal quasi (static) segments in `className:\`...\``
|
|
260
422
|
* Pass 2: `className:EXPR` patterns with ternary operators containing quoted strings
|
|
261
|
-
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge,
|
|
423
|
+
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge, _sz, etc.)
|
|
262
424
|
*
|
|
263
425
|
* @param code bundled source code
|
|
264
426
|
* @param mangleMap class-name → mangled-token mapping
|
|
@@ -291,5 +453,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
291
453
|
*/
|
|
292
454
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
293
455
|
|
|
294
|
-
export {
|
|
456
|
+
export { isPackagesSkippedSource as A, mangleCodeClassesSync as B, missingTailwindEntryMessage as D, normalizeGlobalVarAliasesForCache as E, resolveNativeCacheIdentity as F, rollupPlugin as H, shouldWarnMissingTailwindEntry as I, shouldWarnUnscopedMonorepo as J, skippedSzFilesMessage as K, unscopedMonorepoMessage as L, vitePlugin as M, webpackPlugin as N, appendTailwindSourceDirective as o, computeSafelistRelPath as p, createGlobalVarMapAssetSource as q, cssHasContentScope as r, cssImportsTailwind as s, esbuildPlugin as t, unplugin as u, extractGlobalVarAliasesForManifest as v, hasInjectableTailwindCandidate as w, isCompilePackageOptedIn as x, isHardIgnoredPath as y, isMonorepoPackage as z };
|
|
295
457
|
export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, PlanGlobalVarAliasesInput as P, RewriteGlobalVarCssAliasesOptions as R, ScanGlobalVarCssOptions as S, ValidateGlobalVarAliasInputsOptions as V, GlobalVarAliasPlan as a, GlobalVarCssAliasRewriteResult as b, CreateGlobalVarAliasValidationOptionsInput as c, GlobalVarAliasValidationResult as d, CssVarDefinition as e, CssVarLocation as f, CssVarReference as g, GlobalVarAliasDiagnostic as h, GlobalVarAliasDiagnosticSeverity as i, GlobalVarAliasEntry as j, GlobalVarCodeSource as k, GlobalVarCssAssetSource as l, GlobalVarCssSource as m, GlobalVarScanCacheEntry as n };
|