@csszyx/unplugin 0.14.1 → 0.14.2

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
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const cssMangler = require('./css-mangler.cjs');
6
- const unplugin = require('./shared/unplugin.ZMa9YE1H.cjs');
7
- const themeGroupsFile = require('./shared/unplugin.CkNQjA4G.cjs');
6
+ const unplugin = require('./shared/unplugin.RGzhYt-D.cjs');
7
+ const themeGroupsFile = require('./shared/unplugin.D8BxOOkA.cjs');
8
8
  const types = require('@csszyx/types');
9
9
  require('postcss');
10
10
  require('postcss-selector-parser');
@@ -20,7 +20,7 @@ require('@csszyx/core/native');
20
20
  require('@csszyx/svelte-adapter');
21
21
  require('@csszyx/vue-adapter');
22
22
  require('unplugin');
23
- require('./shared/unplugin.BKGCkMgM.cjs');
23
+ require('./shared/unplugin.VtXstzEh.cjs');
24
24
  require('./shared/unplugin.BkRah5Ot.cjs');
25
25
  require('node:zlib');
26
26
  require('postcss-value-parser');
@@ -98,6 +98,7 @@ exports.writeGlobalVarScanCache = unplugin.writeGlobalVarScanCache;
98
98
  exports.hasTokens = themeGroupsFile.hasTokens;
99
99
  exports.mergeThemes = themeGroupsFile.mergeThemes;
100
100
  exports.parseThemeBlocks = themeGroupsFile.parseThemeBlocks;
101
+ exports.parseUtilityBlocks = themeGroupsFile.parseUtilityBlocks;
101
102
  exports.scanCustomPropertyNames = themeGroupsFile.scanCustomPropertyNames;
102
103
  exports.CSSZYX_GLOBAL_ALIAS_PREFIX = types.CSSZYX_GLOBAL_ALIAS_PREFIX;
103
104
  exports.TAILWIND_RESERVED_PREFIXES = types.TAILWIND_RESERVED_PREFIXES;
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.BsjD3mtb.cjs';
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.BXYakiXt.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, M as MangleHybridHazards, o as ParsedTheme, Q as QuietMode, p as RSCBoundaryViolation, q as RSCModuleRecord, r as allocateMangleTokens, s as appendTailwindSourceDirective, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as computeSafelistRelPath, x as createGlobalVarMapAssetSource, y as createRSCModuleRecord, z as cssHasContentScope, A as cssImportsTailwind, D as deleteRSCModuleRecord, E as emitMissingCssFallback, F as esbuildPlugin, H as extractGlobalVarAliasesForManifest, I as fileMayContainSafelistableSz, J as findLocalImportSources, K as findRSCBoundaryViolation, L as findRSCGraphViolation, N as hasInjectableTailwindCandidate, O as hasTokens, T as hasUseClientDirective, U as hasUseServerDirective, W as isAdvisoryDiagnostic, X as isCompileSourceOptedIn, Y as isHardIgnoredPath, Z as isMangleableCssId, _ as isMonorepoPackage, $ as isPackagesSkippedSource, a0 as isRSCServerModule, a1 as lateMangleCensusMessage, a2 as mangleCodeClassesSync, a3 as mangleEligibleClasses, a4 as mangleHybridHazardMessage, a5 as mergeThemes, a6 as missingTailwindEntryMessage, a7 as normalizeGlobalVarAliasesForCache, a8 as parseThemeBlocks, a9 as realContentHashDisabledMessage, aa as recordGlobalVarSourceFile, ab as resolveCompileSourceDirs, ac as resolveNativeCacheIdentity, ad as resolveQuietMode, ae as rollupPlugin, af as scanCustomPropertyNames, ag as shouldEmitMissingCssFallback, ah as shouldEmitWarning, ai as shouldTrackGlobalVarSources, aj as shouldWarnMissingTailwindEntry, ak as shouldWarnUnscopedMonorepo, al as skippedSzFilesMessage, am as suppressedAdvisoryMessage, B as unplugin, an as unscopedMonorepoMessage, ao as vitePlugin, ap as watchModeMangleMessage, aq as webpackPlugin } from './shared/unplugin.BsjD3mtb.cjs';
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, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as appendTailwindSourceDirective, u as assertNoRSCBoundaryViolation, v as assertNoRSCGraphViolation, w as collectMangleHybridHazards, x as computeSafelistRelPath, y as createGlobalVarMapAssetSource, z as createRSCModuleRecord, A as cssHasContentScope, B as cssImportsTailwind, E as deleteRSCModuleRecord, F as emitMissingCssFallback, H as esbuildPlugin, I as extractGlobalVarAliasesForManifest, J as fileMayContainSafelistableSz, K as findLocalImportSources, L as findRSCBoundaryViolation, N as findRSCGraphViolation, O as hasInjectableTailwindCandidate, T as hasTokens, U as hasUseClientDirective, W as hasUseServerDirective, X as isAdvisoryDiagnostic, Y as isCompileSourceOptedIn, Z as isHardIgnoredPath, _ as isMangleableCssId, $ as isMonorepoPackage, a0 as isPackagesSkippedSource, a1 as isRSCServerModule, a2 as lateMangleCensusMessage, a3 as mangleCodeClassesSync, a4 as mangleEligibleClasses, a5 as mangleHybridHazardMessage, a6 as mergeThemes, a7 as missingTailwindEntryMessage, a8 as normalizeGlobalVarAliasesForCache, a9 as parseThemeBlocks, aa as parseUtilityBlocks, ab as realContentHashDisabledMessage, ac as recordGlobalVarSourceFile, ad as resolveCompileSourceDirs, ae as resolveNativeCacheIdentity, af as resolveQuietMode, ag as rollupPlugin, ah as scanCustomPropertyNames, ai as shouldEmitMissingCssFallback, aj as shouldEmitWarning, ak as shouldTrackGlobalVarSources, al as shouldWarnMissingTailwindEntry, am as shouldWarnUnscopedMonorepo, an as skippedSzFilesMessage, ao as suppressedAdvisoryMessage, D as unplugin, ap as unscopedMonorepoMessage, aq as vitePlugin, ar as watchModeMangleMessage, as as webpackPlugin } from './shared/unplugin.BXYakiXt.cjs';
7
7
  import 'postcss';
8
8
  import '@csszyx/compiler';
9
9
  import 'esbuild';
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.BsjD3mtb.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, M as MangleHybridHazards, o as ParsedTheme, Q as QuietMode, p as RSCBoundaryViolation, q as RSCModuleRecord, r as allocateMangleTokens, s as appendTailwindSourceDirective, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as computeSafelistRelPath, x as createGlobalVarMapAssetSource, y as createRSCModuleRecord, z as cssHasContentScope, A as cssImportsTailwind, B as default, D as deleteRSCModuleRecord, E as emitMissingCssFallback, F as esbuildPlugin, H as extractGlobalVarAliasesForManifest, I as fileMayContainSafelistableSz, J as findLocalImportSources, K as findRSCBoundaryViolation, L as findRSCGraphViolation, N as hasInjectableTailwindCandidate, O as hasTokens, T as hasUseClientDirective, U as hasUseServerDirective, W as isAdvisoryDiagnostic, X as isCompileSourceOptedIn, Y as isHardIgnoredPath, Z as isMangleableCssId, _ as isMonorepoPackage, $ as isPackagesSkippedSource, a0 as isRSCServerModule, a1 as lateMangleCensusMessage, a2 as mangleCodeClassesSync, a3 as mangleEligibleClasses, a4 as mangleHybridHazardMessage, a5 as mergeThemes, a6 as missingTailwindEntryMessage, a7 as normalizeGlobalVarAliasesForCache, a8 as parseThemeBlocks, a9 as realContentHashDisabledMessage, aa as recordGlobalVarSourceFile, ab as resolveCompileSourceDirs, ac as resolveNativeCacheIdentity, ad as resolveQuietMode, ae as rollupPlugin, af as scanCustomPropertyNames, ag as shouldEmitMissingCssFallback, ah as shouldEmitWarning, ai as shouldTrackGlobalVarSources, aj as shouldWarnMissingTailwindEntry, ak as shouldWarnUnscopedMonorepo, al as skippedSzFilesMessage, am as suppressedAdvisoryMessage, B as unplugin, an as unscopedMonorepoMessage, ao as vitePlugin, ap as watchModeMangleMessage, aq as webpackPlugin } from './shared/unplugin.BsjD3mtb.mjs';
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.BXYakiXt.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, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as appendTailwindSourceDirective, u as assertNoRSCBoundaryViolation, v as assertNoRSCGraphViolation, w as collectMangleHybridHazards, x as computeSafelistRelPath, y as createGlobalVarMapAssetSource, z as createRSCModuleRecord, A as cssHasContentScope, B as cssImportsTailwind, D as default, E as deleteRSCModuleRecord, F as emitMissingCssFallback, H as esbuildPlugin, I as extractGlobalVarAliasesForManifest, J as fileMayContainSafelistableSz, K as findLocalImportSources, L as findRSCBoundaryViolation, N as findRSCGraphViolation, O as hasInjectableTailwindCandidate, T as hasTokens, U as hasUseClientDirective, W as hasUseServerDirective, X as isAdvisoryDiagnostic, Y as isCompileSourceOptedIn, Z as isHardIgnoredPath, _ as isMangleableCssId, $ as isMonorepoPackage, a0 as isPackagesSkippedSource, a1 as isRSCServerModule, a2 as lateMangleCensusMessage, a3 as mangleCodeClassesSync, a4 as mangleEligibleClasses, a5 as mangleHybridHazardMessage, a6 as mergeThemes, a7 as missingTailwindEntryMessage, a8 as normalizeGlobalVarAliasesForCache, a9 as parseThemeBlocks, aa as parseUtilityBlocks, ab as realContentHashDisabledMessage, ac as recordGlobalVarSourceFile, ad as resolveCompileSourceDirs, ae as resolveNativeCacheIdentity, af as resolveQuietMode, ag as rollupPlugin, ah as scanCustomPropertyNames, ai as shouldEmitMissingCssFallback, aj as shouldEmitWarning, ak as shouldTrackGlobalVarSources, al as shouldWarnMissingTailwindEntry, am as shouldWarnUnscopedMonorepo, an as skippedSzFilesMessage, ao as suppressedAdvisoryMessage, D as unplugin, ap as unscopedMonorepoMessage, aq as vitePlugin, ar as watchModeMangleMessage, as as webpackPlugin } from './shared/unplugin.BXYakiXt.mjs';
5
5
  import 'postcss';
6
6
  import '@csszyx/compiler';
7
7
  import 'esbuild';
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
2
- export { a as allocateMangleTokens, b as appendTailwindSourceDirective, c as assertNoRSCBoundaryViolation, d as assertNoRSCGraphViolation, e as collectMangleHybridHazards, f as computeSafelistRelPath, g as createGlobalVarAliasValidationOptions, h as createGlobalVarMapAssetSource, i as createGlobalVarScanCacheKey, j as createRSCModuleRecord, k as cssHasContentScope, l as cssImportsTailwind, u as default, m as deleteRSCModuleRecord, n as emitMissingCssFallback, o as esbuildPlugin, p as extractGlobalVarAliasesForManifest, q as fileMayContainSafelistableSz, r as findLocalImportSources, s as findRSCBoundaryViolation, t as findRSCGraphViolation, v as hasInjectableTailwindCandidate, w as hasUseClientDirective, x as hasUseServerDirective, y as isAdvisoryDiagnostic, z as isCompileSourceOptedIn, A as isHardIgnoredPath, B as isMangleableCssId, C as isMonorepoPackage, D as isPackagesSkippedSource, E as isRSCServerModule, F as isTailwindReservedGlobalVar, G as lateMangleCensusMessage, H as mangleCodeClassesSync, I as mangleEligibleClasses, J as mangleHybridHazardMessage, K as missingTailwindEntryMessage, L as normalizeGlobalVarAliasesForCache, M as planGlobalVarAliases, N as readGlobalVarScanCache, O as realContentHashDisabledMessage, P as recordGlobalVarSourceFile, Q as resolveCompileSourceDirs, R as resolveGlobalVarScanCacheDir, S as resolveNativeCacheIdentity, T as resolveQuietMode, U as rewriteGlobalVarCssAliases, V as rollupPlugin, W as scanGlobalVarCss, X as shouldEmitMissingCssFallback, Y as shouldEmitWarning, Z as shouldTrackGlobalVarSources, _ as shouldWarnMissingTailwindEntry, $ as shouldWarnUnscopedMonorepo, a0 as skippedSzFilesMessage, a1 as suppressedAdvisoryMessage, u as unplugin, a2 as unscopedMonorepoMessage, a3 as validateGlobalVarAliasInputs, a4 as vitePlugin, a5 as watchModeMangleMessage, a6 as webpackPlugin, a7 as writeGlobalVarScanCache } from './shared/unplugin.gR_h2DVG.mjs';
3
- export { h as hasTokens, m as mergeThemes, p as parseThemeBlocks, s as scanCustomPropertyNames } from './shared/unplugin.BcsvXjIV.mjs';
2
+ export { a as allocateMangleTokens, b as appendTailwindSourceDirective, c as assertNoRSCBoundaryViolation, d as assertNoRSCGraphViolation, e as collectMangleHybridHazards, f as computeSafelistRelPath, g as createGlobalVarAliasValidationOptions, h as createGlobalVarMapAssetSource, i as createGlobalVarScanCacheKey, j as createRSCModuleRecord, k as cssHasContentScope, l as cssImportsTailwind, u as default, m as deleteRSCModuleRecord, n as emitMissingCssFallback, o as esbuildPlugin, p as extractGlobalVarAliasesForManifest, q as fileMayContainSafelistableSz, r as findLocalImportSources, s as findRSCBoundaryViolation, t as findRSCGraphViolation, v as hasInjectableTailwindCandidate, w as hasUseClientDirective, x as hasUseServerDirective, y as isAdvisoryDiagnostic, z as isCompileSourceOptedIn, A as isHardIgnoredPath, B as isMangleableCssId, C as isMonorepoPackage, D as isPackagesSkippedSource, E as isRSCServerModule, F as isTailwindReservedGlobalVar, G as lateMangleCensusMessage, H as mangleCodeClassesSync, I as mangleEligibleClasses, J as mangleHybridHazardMessage, K as missingTailwindEntryMessage, L as normalizeGlobalVarAliasesForCache, M as planGlobalVarAliases, N as readGlobalVarScanCache, O as realContentHashDisabledMessage, P as recordGlobalVarSourceFile, Q as resolveCompileSourceDirs, R as resolveGlobalVarScanCacheDir, S as resolveNativeCacheIdentity, T as resolveQuietMode, U as rewriteGlobalVarCssAliases, V as rollupPlugin, W as scanGlobalVarCss, X as shouldEmitMissingCssFallback, Y as shouldEmitWarning, Z as shouldTrackGlobalVarSources, _ as shouldWarnMissingTailwindEntry, $ as shouldWarnUnscopedMonorepo, a0 as skippedSzFilesMessage, a1 as suppressedAdvisoryMessage, u as unplugin, a2 as unscopedMonorepoMessage, a3 as validateGlobalVarAliasInputs, a4 as vitePlugin, a5 as watchModeMangleMessage, a6 as webpackPlugin, a7 as writeGlobalVarScanCache } from './shared/unplugin.BnRf0Tvd.mjs';
3
+ export { h as hasTokens, m as mergeThemes, p as parseThemeBlocks, a as parseUtilityBlocks, s as scanCustomPropertyNames } from './shared/unplugin.BZPdvVcj.mjs';
4
4
  export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
5
5
  import 'postcss';
6
6
  import 'postcss-selector-parser';
@@ -16,7 +16,7 @@ import '@csszyx/core/native';
16
16
  import '@csszyx/svelte-adapter';
17
17
  import '@csszyx/vue-adapter';
18
18
  import 'unplugin';
19
- import './shared/unplugin.DKcwO8O4.mjs';
19
+ import './shared/unplugin.NlPvn5P4.mjs';
20
20
  import './shared/unplugin.B3XoSRB8.mjs';
21
21
  import 'node:zlib';
22
22
  import 'postcss-value-parser';
@@ -3,9 +3,9 @@
3
3
  const node_crypto = require('node:crypto');
4
4
  const fs = require('node:fs');
5
5
  const path = require('node:path');
6
- const nextTransformMetadata = require('./shared/unplugin.BJiWWF6w.cjs');
6
+ const nextTransformMetadata = require('./shared/unplugin.DVbPNK3W.cjs');
7
7
  const nextWatcherCycle = require('./shared/unplugin.Cji6O5jv.cjs');
8
- const transformCache = require('./shared/unplugin.BKGCkMgM.cjs');
8
+ const transformCache = require('./shared/unplugin.VtXstzEh.cjs');
9
9
  require('@csszyx/compiler');
10
10
  require('@csszyx/types');
11
11
  require('./shared/unplugin.BkRah5Ot.cjs');
@@ -1,9 +1,9 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import * as path from 'node:path';
4
- import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DjRylBC_.mjs';
4
+ import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DN95k991.mjs';
5
5
  import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.BU0O4IkX.mjs';
6
- import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.DKcwO8O4.mjs';
6
+ import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.NlPvn5P4.mjs';
7
7
  import '@csszyx/compiler';
8
8
  import '@csszyx/types';
9
9
  import './shared/unplugin.B3XoSRB8.mjs';
@@ -4,10 +4,10 @@ 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 themeGroupsFile = require('./shared/unplugin.CkNQjA4G.cjs');
8
- const nextTransformMetadata = require('./shared/unplugin.BJiWWF6w.cjs');
7
+ const themeGroupsFile = require('./shared/unplugin.D8BxOOkA.cjs');
8
+ const nextTransformMetadata = require('./shared/unplugin.DVbPNK3W.cjs');
9
9
  const nextWatcherCycle = require('./shared/unplugin.Cji6O5jv.cjs');
10
- const transformCache = require('./shared/unplugin.BKGCkMgM.cjs');
10
+ const transformCache = require('./shared/unplugin.VtXstzEh.cjs');
11
11
  require('node:fs');
12
12
  require('./shared/unplugin.BkRah5Ot.cjs');
13
13
  require('@csszyx/compiler');
@@ -1,9 +1,9 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import * as path from 'node:path';
3
- import { i as injectNextRuntimeImports, e as ensureThemeGroupsFile, a as insertAfterUseDirective, t as themeGroupsSpecifier } from './shared/unplugin.BcsvXjIV.mjs';
4
- import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, n as normalizeProviderPaths, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DjRylBC_.mjs';
3
+ import { i as injectNextRuntimeImports, e as ensureThemeGroupsFile, b as insertAfterUseDirective, t as themeGroupsSpecifier } from './shared/unplugin.BZPdvVcj.mjs';
4
+ import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, n as normalizeProviderPaths, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DN95k991.mjs';
5
5
  import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.BU0O4IkX.mjs';
6
- import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.DKcwO8O4.mjs';
6
+ import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.NlPvn5P4.mjs';
7
7
  import 'node:fs';
8
8
  import './shared/unplugin.B3XoSRB8.mjs';
9
9
  import '@csszyx/compiler';
@@ -358,6 +358,32 @@ interface ParsedTheme {
358
358
  /** Custom responsive breakpoints (from --breakpoint-*): e.g. ['tablet', '3xl'] */
359
359
  breakpoints: string[];
360
360
  }
361
+ /** The class names and namespaces a stylesheet claims with `@utility`. */
362
+ interface ParsedUtilities {
363
+ /** Static declarations, each claiming one class name: `panel-flat`. */
364
+ statics: string[];
365
+ /** Functional declarations, each claiming a namespace: `pad` for `pad-*`. */
366
+ functionals: string[];
367
+ }
368
+ /**
369
+ * Read the `@utility` declarations out of one stylesheet.
370
+ *
371
+ * A project claims class names two ways, and only one of them was ever read.
372
+ * A `@theme` token claims them indirectly — `--color-brand` makes `text-brand`
373
+ * and fourteen others — while `@utility` claims one outright. Tailwind MERGES
374
+ * when the name is already taken rather than refusing it, and says nothing, so
375
+ * `@utility text-balance { letter-spacing: … }` quietly ships a class that also
376
+ * sets `text-wrap`. Reporting that needs this list first.
377
+ *
378
+ * Static and functional forms are kept apart because they answer different
379
+ * questions. `panel-flat` is a class name and can be compared to one. `pad-*`
380
+ * is a namespace whose members depend on the theme, so comparing its literal
381
+ * text to a class list would ask something meaningless.
382
+ *
383
+ * @param cssContent Stylesheet source.
384
+ * @returns The claimed names, both forms.
385
+ */
386
+ declare function parseUtilityBlocks(cssContent: string): ParsedUtilities;
361
387
  /**
362
388
  * Parse all @theme blocks in a CSS file and extract design tokens.
363
389
  *
@@ -1018,5 +1044,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
1018
1044
  */
1019
1045
  declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
1020
1046
 
1021
- export { isPackagesSkippedSource as $, cssImportsTailwind as A, unplugin as B, deleteRSCModuleRecord as D, emitMissingCssFallback as E, esbuildPlugin as F, extractGlobalVarAliasesForManifest as H, fileMayContainSafelistableSz as I, findLocalImportSources as J, findRSCBoundaryViolation as K, findRSCGraphViolation as L, hasInjectableTailwindCandidate as N, hasTokens as O, hasUseClientDirective as T, hasUseServerDirective as U, isAdvisoryDiagnostic as W, isCompileSourceOptedIn as X, isHardIgnoredPath as Y, isMangleableCssId as Z, isMonorepoPackage as _, isRSCServerModule as a0, lateMangleCensusMessage as a1, mangleCodeClassesSync as a2, mangleEligibleClasses as a3, mangleHybridHazardMessage as a4, mergeThemes as a5, missingTailwindEntryMessage as a6, normalizeGlobalVarAliasesForCache as a7, parseThemeBlocks as a8, realContentHashDisabledMessage as a9, recordGlobalVarSourceFile as aa, resolveCompileSourceDirs as ab, resolveNativeCacheIdentity as ac, resolveQuietMode as ad, rollupPlugin as ae, scanCustomPropertyNames as af, shouldEmitMissingCssFallback as ag, shouldEmitWarning as ah, shouldTrackGlobalVarSources as ai, shouldWarnMissingTailwindEntry as aj, shouldWarnUnscopedMonorepo as ak, skippedSzFilesMessage as al, suppressedAdvisoryMessage as am, unscopedMonorepoMessage as an, vitePlugin as ao, watchModeMangleMessage as ap, webpackPlugin as aq, allocateMangleTokens as r, appendTailwindSourceDirective as s, assertNoRSCBoundaryViolation as t, assertNoRSCGraphViolation as u, collectMangleHybridHazards as v, computeSafelistRelPath as w, createGlobalVarMapAssetSource as x, createRSCModuleRecord as y, cssHasContentScope as z };
1022
- export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, QuietMode as Q, 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, ParsedTheme as o, RSCBoundaryViolation as p, RSCModuleRecord as q };
1047
+ export { isMonorepoPackage as $, cssHasContentScope as A, cssImportsTailwind as B, unplugin as D, deleteRSCModuleRecord as E, emitMissingCssFallback as F, esbuildPlugin as H, extractGlobalVarAliasesForManifest as I, fileMayContainSafelistableSz as J, findLocalImportSources as K, findRSCBoundaryViolation as L, findRSCGraphViolation as N, hasInjectableTailwindCandidate as O, hasTokens as T, hasUseClientDirective as U, hasUseServerDirective as W, isAdvisoryDiagnostic as X, isCompileSourceOptedIn as Y, isHardIgnoredPath as Z, isMangleableCssId as _, isPackagesSkippedSource as a0, isRSCServerModule as a1, lateMangleCensusMessage as a2, mangleCodeClassesSync as a3, mangleEligibleClasses as a4, mangleHybridHazardMessage as a5, mergeThemes as a6, missingTailwindEntryMessage as a7, normalizeGlobalVarAliasesForCache as a8, parseThemeBlocks as a9, parseUtilityBlocks as aa, realContentHashDisabledMessage as ab, recordGlobalVarSourceFile as ac, resolveCompileSourceDirs as ad, resolveNativeCacheIdentity as ae, resolveQuietMode as af, rollupPlugin as ag, scanCustomPropertyNames as ah, shouldEmitMissingCssFallback as ai, shouldEmitWarning as aj, shouldTrackGlobalVarSources as ak, shouldWarnMissingTailwindEntry as al, shouldWarnUnscopedMonorepo as am, skippedSzFilesMessage as an, suppressedAdvisoryMessage as ao, unscopedMonorepoMessage as ap, vitePlugin as aq, watchModeMangleMessage as ar, webpackPlugin as as, allocateMangleTokens as s, appendTailwindSourceDirective as t, assertNoRSCBoundaryViolation as u, assertNoRSCGraphViolation as v, collectMangleHybridHazards as w, computeSafelistRelPath as x, createGlobalVarMapAssetSource as y, createRSCModuleRecord as z };
1048
+ export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, QuietMode as Q, 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, ParsedTheme as o, ParsedUtilities as p, RSCBoundaryViolation as q, RSCModuleRecord as r };
@@ -358,6 +358,32 @@ interface ParsedTheme {
358
358
  /** Custom responsive breakpoints (from --breakpoint-*): e.g. ['tablet', '3xl'] */
359
359
  breakpoints: string[];
360
360
  }
361
+ /** The class names and namespaces a stylesheet claims with `@utility`. */
362
+ interface ParsedUtilities {
363
+ /** Static declarations, each claiming one class name: `panel-flat`. */
364
+ statics: string[];
365
+ /** Functional declarations, each claiming a namespace: `pad` for `pad-*`. */
366
+ functionals: string[];
367
+ }
368
+ /**
369
+ * Read the `@utility` declarations out of one stylesheet.
370
+ *
371
+ * A project claims class names two ways, and only one of them was ever read.
372
+ * A `@theme` token claims them indirectly — `--color-brand` makes `text-brand`
373
+ * and fourteen others — while `@utility` claims one outright. Tailwind MERGES
374
+ * when the name is already taken rather than refusing it, and says nothing, so
375
+ * `@utility text-balance { letter-spacing: … }` quietly ships a class that also
376
+ * sets `text-wrap`. Reporting that needs this list first.
377
+ *
378
+ * Static and functional forms are kept apart because they answer different
379
+ * questions. `panel-flat` is a class name and can be compared to one. `pad-*`
380
+ * is a namespace whose members depend on the theme, so comparing its literal
381
+ * text to a class list would ask something meaningless.
382
+ *
383
+ * @param cssContent Stylesheet source.
384
+ * @returns The claimed names, both forms.
385
+ */
386
+ declare function parseUtilityBlocks(cssContent: string): ParsedUtilities;
361
387
  /**
362
388
  * Parse all @theme blocks in a CSS file and extract design tokens.
363
389
  *
@@ -1018,5 +1044,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
1018
1044
  */
1019
1045
  declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
1020
1046
 
1021
- export { isPackagesSkippedSource as $, cssImportsTailwind as A, unplugin as B, deleteRSCModuleRecord as D, emitMissingCssFallback as E, esbuildPlugin as F, extractGlobalVarAliasesForManifest as H, fileMayContainSafelistableSz as I, findLocalImportSources as J, findRSCBoundaryViolation as K, findRSCGraphViolation as L, hasInjectableTailwindCandidate as N, hasTokens as O, hasUseClientDirective as T, hasUseServerDirective as U, isAdvisoryDiagnostic as W, isCompileSourceOptedIn as X, isHardIgnoredPath as Y, isMangleableCssId as Z, isMonorepoPackage as _, isRSCServerModule as a0, lateMangleCensusMessage as a1, mangleCodeClassesSync as a2, mangleEligibleClasses as a3, mangleHybridHazardMessage as a4, mergeThemes as a5, missingTailwindEntryMessage as a6, normalizeGlobalVarAliasesForCache as a7, parseThemeBlocks as a8, realContentHashDisabledMessage as a9, recordGlobalVarSourceFile as aa, resolveCompileSourceDirs as ab, resolveNativeCacheIdentity as ac, resolveQuietMode as ad, rollupPlugin as ae, scanCustomPropertyNames as af, shouldEmitMissingCssFallback as ag, shouldEmitWarning as ah, shouldTrackGlobalVarSources as ai, shouldWarnMissingTailwindEntry as aj, shouldWarnUnscopedMonorepo as ak, skippedSzFilesMessage as al, suppressedAdvisoryMessage as am, unscopedMonorepoMessage as an, vitePlugin as ao, watchModeMangleMessage as ap, webpackPlugin as aq, allocateMangleTokens as r, appendTailwindSourceDirective as s, assertNoRSCBoundaryViolation as t, assertNoRSCGraphViolation as u, collectMangleHybridHazards as v, computeSafelistRelPath as w, createGlobalVarMapAssetSource as x, createRSCModuleRecord as y, cssHasContentScope as z };
1022
- export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, QuietMode as Q, 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, ParsedTheme as o, RSCBoundaryViolation as p, RSCModuleRecord as q };
1047
+ export { isMonorepoPackage as $, cssHasContentScope as A, cssImportsTailwind as B, unplugin as D, deleteRSCModuleRecord as E, emitMissingCssFallback as F, esbuildPlugin as H, extractGlobalVarAliasesForManifest as I, fileMayContainSafelistableSz as J, findLocalImportSources as K, findRSCBoundaryViolation as L, findRSCGraphViolation as N, hasInjectableTailwindCandidate as O, hasTokens as T, hasUseClientDirective as U, hasUseServerDirective as W, isAdvisoryDiagnostic as X, isCompileSourceOptedIn as Y, isHardIgnoredPath as Z, isMangleableCssId as _, isPackagesSkippedSource as a0, isRSCServerModule as a1, lateMangleCensusMessage as a2, mangleCodeClassesSync as a3, mangleEligibleClasses as a4, mangleHybridHazardMessage as a5, mergeThemes as a6, missingTailwindEntryMessage as a7, normalizeGlobalVarAliasesForCache as a8, parseThemeBlocks as a9, parseUtilityBlocks as aa, realContentHashDisabledMessage as ab, recordGlobalVarSourceFile as ac, resolveCompileSourceDirs as ad, resolveNativeCacheIdentity as ae, resolveQuietMode as af, rollupPlugin as ag, scanCustomPropertyNames as ah, shouldEmitMissingCssFallback as ai, shouldEmitWarning as aj, shouldTrackGlobalVarSources as ak, shouldWarnMissingTailwindEntry as al, shouldWarnUnscopedMonorepo as am, skippedSzFilesMessage as an, suppressedAdvisoryMessage as ao, unscopedMonorepoMessage as ap, vitePlugin as aq, watchModeMangleMessage as ar, webpackPlugin as as, allocateMangleTokens as s, appendTailwindSourceDirective as t, assertNoRSCBoundaryViolation as u, assertNoRSCGraphViolation as v, collectMangleHybridHazards as w, computeSafelistRelPath as x, createGlobalVarMapAssetSource as y, createRSCModuleRecord as z };
1048
+ export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, QuietMode as Q, 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, ParsedTheme as o, ParsedUtilities as p, RSCBoundaryViolation as q, RSCModuleRecord as r };
@@ -12,6 +12,39 @@ const EMPTY_THEME = {
12
12
  shadows: [],
13
13
  breakpoints: []
14
14
  };
15
+ function stripBlockComments(css) {
16
+ let out = "";
17
+ let from = 0;
18
+ for (; ; ) {
19
+ const open = css.indexOf("/*", from);
20
+ if (open === -1) break;
21
+ const close = css.indexOf("*/", open + 2);
22
+ if (close === -1) break;
23
+ out += css.slice(from, open);
24
+ from = close + 2;
25
+ }
26
+ return from === 0 ? css : out + css.slice(from);
27
+ }
28
+ function parseUtilityBlocks(cssContent) {
29
+ const source = stripBlockComments(cssContent);
30
+ const statics = [];
31
+ const functionals = [];
32
+ const pattern = /@utility\s+([^\s{]+)\s*\{/g;
33
+ let match = pattern.exec(source);
34
+ while (match !== null) {
35
+ const name = match[1];
36
+ if (name.endsWith("-*")) {
37
+ functionals.push(name.slice(0, -2));
38
+ } else {
39
+ statics.push(name);
40
+ }
41
+ const open = source.indexOf("{", match.index);
42
+ const close = findMatchingBrace(source, open);
43
+ pattern.lastIndex = close === -1 ? source.length : close + 1;
44
+ match = pattern.exec(source);
45
+ }
46
+ return { statics, functionals };
47
+ }
15
48
  function findMatchingBrace(source, openBrace) {
16
49
  let depth = 0;
17
50
  for (let index = openBrace; index < source.length; index++) {
@@ -576,4 +609,4 @@ function themeGroupsSpecifier(fromFile, themeGroupsFile) {
576
609
  return relative.startsWith("./") || relative.startsWith("../") ? relative : `./${relative}`;
577
610
  }
578
611
 
579
- export { CHECKSUM_PLACEHOLDER as C, MANGLE_MAP_PLACEHOLDER as M, RESOLVED_VIRTUAL_MODULE_ID as R, THEME_GROUPS_VIRTUAL_ID as T, VAR_MANGLE_MAP_PLACEHOLDER as V, insertAfterUseDirective as a, createMangleMapModule as b, createThemeGroupsModule as c, RESOLVED_VIRTUAL_CHECKSUM_ID as d, ensureThemeGroupsFile as e, createChecksumModule as f, RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID as g, hasTokens as h, injectNextRuntimeImports as i, createMangleRuntimeModule as j, RESOLVED_THEME_GROUPS_VIRTUAL_ID as k, isVirtualModule as l, mergeThemes as m, discoverProjectTheme as n, importsRuntimeHelper as o, parseThemeBlocks as p, findRuntimeImportClause as q, resolveVirtualModule as r, scanCustomPropertyNames as s, themeGroupsSpecifier as t, THEME_GROUPS_FILE_MARKER as u, MANGLE_RUNTIME_VIRTUAL_ID as v, runtimeHelperGroupsFromUsage as w };
612
+ export { CHECKSUM_PLACEHOLDER as C, MANGLE_MAP_PLACEHOLDER as M, RESOLVED_VIRTUAL_MODULE_ID as R, THEME_GROUPS_VIRTUAL_ID as T, VAR_MANGLE_MAP_PLACEHOLDER as V, parseUtilityBlocks as a, insertAfterUseDirective as b, createThemeGroupsModule as c, createMangleMapModule as d, ensureThemeGroupsFile as e, RESOLVED_VIRTUAL_CHECKSUM_ID as f, createChecksumModule as g, hasTokens as h, injectNextRuntimeImports as i, RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID as j, createMangleRuntimeModule as k, RESOLVED_THEME_GROUPS_VIRTUAL_ID as l, mergeThemes as m, isVirtualModule as n, discoverProjectTheme as o, parseThemeBlocks as p, importsRuntimeHelper as q, resolveVirtualModule as r, scanCustomPropertyNames as s, themeGroupsSpecifier as t, findRuntimeImportClause as u, THEME_GROUPS_FILE_MARKER as v, MANGLE_RUNTIME_VIRTUAL_ID as w, runtimeHelperGroupsFromUsage as x };
@@ -13,9 +13,9 @@ import { preprocess as preprocess$1 } from '@csszyx/svelte-adapter';
13
13
  import { isTailwindReservedCustomProperty, CSSZYX_GLOBAL_ALIAS_PREFIX, isCsszyxGlobalAliasCustomProperty, DEFAULT_IMPORTED_STATIC_SZ, DEFAULT_BUILD_CONFIG, validateGlobalVarMangleConfig } from '@csszyx/types';
14
14
  import { preprocess } from '@csszyx/vue-adapter';
15
15
  import { createUnplugin } from 'unplugin';
16
- import { n as normalizePathSeparators, c as collectSpecifierAliases, g as recordSzvRegistryFile, h as recordSzObjectRegistryFile, j as resolveCrossModuleStaticsFor, r as resolveTransformCacheDir, e as createTransformCacheKey, w as writeTransformCache, k as evictOldTransformCacheEntries, m as mayExportSzvFactories, i as importedSpecifiersIn, s as specifierBases, a as resolveProviderPathWith, f as readTransformCache, l as evictMemoryCacheToBudget, o as resolveProviderPath, d as isReadableProviderFile } from './unplugin.DKcwO8O4.mjs';
16
+ import { n as normalizePathSeparators, c as collectSpecifierAliases, h as recordSzvRegistryFile, j as recordCrossModuleForwards, k as recordSzObjectRegistryFile, l as resolveCrossModuleStaticsFor, r as resolveTransformCacheDir, e as createTransformCacheKey, w as writeTransformCache, m as evictOldTransformCacheEntries, o as mayExportSzvFactories, i as importedSpecifiersIn, s as specifierBases, a as resolveProviderPathWith, g as readTransformCache, p as evictMemoryCacheToBudget, q as resolveProviderPath, d as isReadableProviderFile } from './unplugin.NlPvn5P4.mjs';
17
17
  import { mangleCSSSync } from '../css-mangler.mjs';
18
- import { c as createThemeGroupsModule, e as ensureThemeGroupsFile, R as RESOLVED_VIRTUAL_MODULE_ID, b as createMangleMapModule, d as RESOLVED_VIRTUAL_CHECKSUM_ID, f as createChecksumModule, g as RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID, j as createMangleRuntimeModule, k as RESOLVED_THEME_GROUPS_VIRTUAL_ID, l as isVirtualModule, r as resolveVirtualModule, p as parseThemeBlocks, m as mergeThemes, n as discoverProjectTheme, C as CHECKSUM_PLACEHOLDER, M as MANGLE_MAP_PLACEHOLDER, V as VAR_MANGLE_MAP_PLACEHOLDER, o as importsRuntimeHelper, q as findRuntimeImportClause, T as THEME_GROUPS_VIRTUAL_ID, u as THEME_GROUPS_FILE_MARKER, t as themeGroupsSpecifier, v as MANGLE_RUNTIME_VIRTUAL_ID, w as runtimeHelperGroupsFromUsage, a as insertAfterUseDirective } from './unplugin.BcsvXjIV.mjs';
18
+ import { c as createThemeGroupsModule, e as ensureThemeGroupsFile, R as RESOLVED_VIRTUAL_MODULE_ID, d as createMangleMapModule, f as RESOLVED_VIRTUAL_CHECKSUM_ID, g as createChecksumModule, j as RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID, k as createMangleRuntimeModule, l as RESOLVED_THEME_GROUPS_VIRTUAL_ID, n as isVirtualModule, r as resolveVirtualModule, p as parseThemeBlocks, m as mergeThemes, o as discoverProjectTheme, C as CHECKSUM_PLACEHOLDER, M as MANGLE_MAP_PLACEHOLDER, V as VAR_MANGLE_MAP_PLACEHOLDER, q as importsRuntimeHelper, u as findRuntimeImportClause, T as THEME_GROUPS_VIRTUAL_ID, v as THEME_GROUPS_FILE_MARKER, t as themeGroupsSpecifier, w as MANGLE_RUNTIME_VIRTUAL_ID, a as parseUtilityBlocks, x as runtimeHelperGroupsFromUsage, b as insertAfterUseDirective } from './unplugin.BZPdvVcj.mjs';
19
19
  import { s as sortStrings, a as replaceEveryLiteral, u as unicodeEscape, b as escapeDoubleQuotedString, c as escapeSingleQuotedString, e as escapeHtmlAttribute, r as renderTailwindScannerCandidates } from './unplugin.B3XoSRB8.mjs';
20
20
  import { gzipSync } from 'node:zlib';
21
21
  import postcss from 'postcss';
@@ -1481,6 +1481,49 @@ function collectAuthoredClassNames(source) {
1481
1481
  return classes;
1482
1482
  }
1483
1483
 
1484
+ const COLOR_CLASS_PREFIXES = [
1485
+ "text",
1486
+ "bg",
1487
+ "border",
1488
+ "decoration",
1489
+ "shadow",
1490
+ "outline",
1491
+ "ring",
1492
+ "fill",
1493
+ "stroke",
1494
+ "divide",
1495
+ "accent",
1496
+ "caret",
1497
+ "from",
1498
+ "via",
1499
+ "to",
1500
+ "inset-shadow",
1501
+ "inset-ring",
1502
+ "placeholder"
1503
+ ];
1504
+ function findClassNameAuthorConflicts(declared) {
1505
+ const generatedByTheme = new Set(
1506
+ declared.themeColors.flatMap(
1507
+ (name) => COLOR_CLASS_PREFIXES.map((prefix) => `${prefix}-${name}`)
1508
+ )
1509
+ );
1510
+ const conflicts = [];
1511
+ const seen = /* @__PURE__ */ new Set();
1512
+ for (const cls of declared.utilityStatics) {
1513
+ const declaredTwice = seen.has(cls);
1514
+ seen.add(cls);
1515
+ if (conflicts.some((existing) => existing.name === cls)) continue;
1516
+ if (declaredTwice) {
1517
+ conflicts.push({ name: cls, reason: "declared twice" });
1518
+ continue;
1519
+ }
1520
+ if (generatedByTheme.has(cls)) {
1521
+ conflicts.push({ name: cls, reason: "a theme token already generates it" });
1522
+ }
1523
+ }
1524
+ return conflicts;
1525
+ }
1526
+
1484
1527
  const KNOWN_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
1485
1528
  "include",
1486
1529
  "exclude",
@@ -2035,6 +2078,7 @@ function findOpeningTag(source, tag) {
2035
2078
  from = start + marker.length;
2036
2079
  }
2037
2080
  }
2081
+ const _warnedClassNameAuthors = /* @__PURE__ */ new Set();
2038
2082
  let _hasWarnedTsConfig = false;
2039
2083
  let _hasWarnedTransformCacheVersion = false;
2040
2084
  let _hasWarnedNativeFallback = false;
@@ -2684,6 +2728,29 @@ function runThemeScan(rootDir, scanCss) {
2684
2728
  if (!scanCss) {
2685
2729
  return null;
2686
2730
  }
2731
+ function reportClassNameAuthorConflicts(rootDir2, sourceFiles2, theme) {
2732
+ const utilityStatics = [];
2733
+ for (const file of sourceFiles2) {
2734
+ try {
2735
+ utilityStatics.push(
2736
+ ...parseUtilityBlocks(readStableTextFileSnapshotSync(file).source).statics
2737
+ );
2738
+ } catch {
2739
+ }
2740
+ }
2741
+ const conflicts = findClassNameAuthorConflicts({
2742
+ themeColors: theme.colors,
2743
+ utilityStatics
2744
+ });
2745
+ for (const conflict of conflicts) {
2746
+ const key = `${rootDir2}\0${conflict.name}`;
2747
+ if (_warnedClassNameAuthors.has(key)) continue;
2748
+ _warnedClassNameAuthors.add(key);
2749
+ console.warn(
2750
+ `[csszyx] "@utility ${conflict.name}" collides \u2014 ${conflict.reason}. Tailwind merges both declarations into one rule and reports nothing, so the class carries styles no single place in your CSS shows. Every use is affected, including sz props that spell it correctly. Rename it; if a multi-property class is the point, declare it under a name nothing else claims.`
2751
+ );
2752
+ }
2753
+ }
2687
2754
  const sourceFiles = expandFilePatterns(rootDir, scanCss).filter((file) => file.endsWith(".css"));
2688
2755
  if (sourceFiles.length === 0) {
2689
2756
  return null;
@@ -2696,6 +2763,7 @@ function runThemeScan(rootDir, scanCss) {
2696
2763
  }
2697
2764
  }).filter((t) => t !== null);
2698
2765
  const merged = mergeThemes(themes);
2766
+ reportClassNameAuthorConflicts(rootDir, sourceFiles, merged);
2699
2767
  const outputPath = path.join(rootDir, ".csszyx", "theme.d.ts");
2700
2768
  writeThemeDts({ outputPath, theme: merged, sourceFiles });
2701
2769
  if (!_hasWarnedTsConfig) {
@@ -3022,6 +3090,7 @@ function createCsszyxPlugins(options = {}) {
3022
3090
  let manglingEnabled = options.production?.mangle === true;
3023
3091
  const importedStaticSzEnabled = options.build?.importedStaticSz ?? DEFAULT_IMPORTED_STATIC_SZ;
3024
3092
  const szvCrossModuleRegistry = /* @__PURE__ */ new Map();
3093
+ const szvCrossModuleForwards = /* @__PURE__ */ new Map();
3025
3094
  const szObjectProvidersExamined = /* @__PURE__ */ new Set();
3026
3095
  let specifierAliases = [];
3027
3096
  const mangleReserved = new Set(options.production?.mangleExclude ?? []);
@@ -3260,7 +3329,8 @@ function createCsszyxPlugins(options = {}) {
3260
3329
  szvCrossModuleRegistry,
3261
3330
  filename,
3262
3331
  source,
3263
- specifierAliases
3332
+ specifierAliases,
3333
+ szvCrossModuleForwards
3264
3334
  );
3265
3335
  if (crossModuleStatics.szvConfigs !== void 0) {
3266
3336
  compilerOptions.crossModuleStatics = crossModuleStatics.szvConfigs;
@@ -3391,7 +3461,8 @@ function createCsszyxPlugins(options = {}) {
3391
3461
  szvCrossModuleRegistry,
3392
3462
  file.filePath,
3393
3463
  file.content,
3394
- specifierAliases
3464
+ specifierAliases,
3465
+ szvCrossModuleForwards
3395
3466
  );
3396
3467
  return resolved.szvConfigs !== void 0 || resolved.szObjects !== void 0;
3397
3468
  }
@@ -3590,9 +3661,11 @@ function createCsszyxPlugins(options = {}) {
3590
3661
  if (!shouldProcessSource(filePath)) return;
3591
3662
  if (content === null) {
3592
3663
  szvCrossModuleRegistry.delete(normalizePathSeparators(filePath));
3664
+ szvCrossModuleForwards.delete(normalizePathSeparators(filePath));
3593
3665
  return;
3594
3666
  }
3595
3667
  recordSzvRegistryFile(szvCrossModuleRegistry, filePath, content);
3668
+ recordCrossModuleForwards(szvCrossModuleForwards, filePath, content);
3596
3669
  if (importedStaticSzEnabled) {
3597
3670
  recordSzObjectRegistryFile(szvCrossModuleRegistry, filePath, content);
3598
3671
  szObjectProvidersExamined.add(normalizePathSeparators(filePath));
@@ -3601,19 +3674,30 @@ function createCsszyxPlugins(options = {}) {
3601
3674
  }
3602
3675
  function recordProvidersDemandedBy(filePath, content) {
3603
3676
  if (!fileMayContainSafelistableSz(content)) return;
3604
- const directory = path.dirname(filePath);
3677
+ const queue = [];
3678
+ const queued = /* @__PURE__ */ new Set();
3605
3679
  for (const specifier of importedSpecifiersIn(content)) {
3606
- for (const base of specifierBases(specifier, directory, specifierAliases)) {
3607
- const providerPath = resolveProviderPathWith(base, isReadableProviderFile);
3608
- if (providerPath === void 0) continue;
3609
- const key = normalizePathSeparators(providerPath);
3610
- if (!szObjectProvidersExamined.has(key)) {
3611
- szObjectProvidersExamined.add(key);
3612
- readAndRecordSzObjectProvider(providerPath);
3680
+ for (const base of specifierBases(
3681
+ specifier,
3682
+ path.dirname(filePath),
3683
+ specifierAliases
3684
+ )) {
3685
+ if (!queued.has(base)) {
3686
+ queued.add(base);
3687
+ queue.push(base);
3613
3688
  }
3614
- break;
3615
3689
  }
3616
3690
  }
3691
+ for (const specifier of queue) {
3692
+ const providerPath = resolveProviderPathWith(specifier, isReadableProviderFile);
3693
+ if (providerPath === void 0) continue;
3694
+ const key = normalizePathSeparators(providerPath);
3695
+ if (!szObjectProvidersExamined.has(key)) {
3696
+ szObjectProvidersExamined.add(key);
3697
+ readAndRecordSzObjectProvider(providerPath);
3698
+ }
3699
+ enqueueForwardedProviders(providerPath, queue, queued);
3700
+ }
3617
3701
  }
3618
3702
  function readAndRecordSzObjectProvider(providerPath) {
3619
3703
  let content;
@@ -3623,13 +3707,27 @@ function createCsszyxPlugins(options = {}) {
3623
3707
  return;
3624
3708
  }
3625
3709
  recordSzObjectRegistryFile(szvCrossModuleRegistry, providerPath, content);
3710
+ recordCrossModuleForwards(szvCrossModuleForwards, providerPath, content);
3626
3711
  }
3627
3712
  function recordDemandedSzObjectProviders(seenSourcePaths, demand) {
3628
- for (const base of demand) {
3629
- const providerPath = resolveProviderPath(seenSourcePaths, base);
3713
+ const queue = [...demand];
3714
+ const queued = new Set(queue);
3715
+ for (const specifier of queue) {
3716
+ const providerPath = resolveProviderPath(seenSourcePaths, specifier);
3630
3717
  if (providerPath === void 0) continue;
3631
3718
  szObjectProvidersExamined.add(normalizePathSeparators(providerPath));
3632
3719
  readAndRecordSzObjectProvider(providerPath);
3720
+ enqueueForwardedProviders(providerPath, queue, queued);
3721
+ }
3722
+ }
3723
+ function enqueueForwardedProviders(providerPath, queue, queued) {
3724
+ const directory = path.dirname(providerPath);
3725
+ for (const forward of szvCrossModuleForwards.get(normalizePathSeparators(providerPath)) ?? []) {
3726
+ for (const base of specifierBases(forward.specifier, directory, specifierAliases)) {
3727
+ if (queued.has(base)) continue;
3728
+ queued.add(base);
3729
+ queue.push(base);
3730
+ }
3633
3731
  }
3634
3732
  }
3635
3733
  function refreshSzvRegistryEntryFromDisk(filePath) {
@@ -3646,6 +3744,7 @@ function createCsszyxPlugins(options = {}) {
3646
3744
  function prescanAndWriteClasses() {
3647
3745
  refreshCompileSourceDirs();
3648
3746
  szvCrossModuleRegistry.clear();
3747
+ szvCrossModuleForwards.clear();
3649
3748
  szObjectProvidersExamined.clear();
3650
3749
  const prescanStarted = performance.now();
3651
3750
  const discoveredClasses = /* @__PURE__ */ new Set();
@@ -3666,6 +3765,7 @@ function createCsszyxPlugins(options = {}) {
3666
3765
  }
3667
3766
  recordAuthoredClasses(content);
3668
3767
  recordSzvRegistryEntries(filePath, content);
3768
+ recordCrossModuleForwards(szvCrossModuleForwards, filePath, content);
3669
3769
  seenSourcePaths.add(normalizePathSeparators(filePath));
3670
3770
  if (fileMayContainSafelistableSz(content)) {
3671
3771
  prescanSources.push({ filePath, content });
@@ -19,6 +19,39 @@ const EMPTY_THEME = {
19
19
  shadows: [],
20
20
  breakpoints: []
21
21
  };
22
+ function stripBlockComments(css) {
23
+ let out = "";
24
+ let from = 0;
25
+ for (; ; ) {
26
+ const open = css.indexOf("/*", from);
27
+ if (open === -1) break;
28
+ const close = css.indexOf("*/", open + 2);
29
+ if (close === -1) break;
30
+ out += css.slice(from, open);
31
+ from = close + 2;
32
+ }
33
+ return from === 0 ? css : out + css.slice(from);
34
+ }
35
+ function parseUtilityBlocks(cssContent) {
36
+ const source = stripBlockComments(cssContent);
37
+ const statics = [];
38
+ const functionals = [];
39
+ const pattern = /@utility\s+([^\s{]+)\s*\{/g;
40
+ let match = pattern.exec(source);
41
+ while (match !== null) {
42
+ const name = match[1];
43
+ if (name.endsWith("-*")) {
44
+ functionals.push(name.slice(0, -2));
45
+ } else {
46
+ statics.push(name);
47
+ }
48
+ const open = source.indexOf("{", match.index);
49
+ const close = findMatchingBrace(source, open);
50
+ pattern.lastIndex = close === -1 ? source.length : close + 1;
51
+ match = pattern.exec(source);
52
+ }
53
+ return { statics, functionals };
54
+ }
22
55
  function findMatchingBrace(source, openBrace) {
23
56
  let depth = 0;
24
57
  for (let index = openBrace; index < source.length; index++) {
@@ -607,6 +640,7 @@ exports.insertAfterUseDirective = insertAfterUseDirective;
607
640
  exports.isVirtualModule = isVirtualModule;
608
641
  exports.mergeThemes = mergeThemes;
609
642
  exports.parseThemeBlocks = parseThemeBlocks;
643
+ exports.parseUtilityBlocks = parseUtilityBlocks;
610
644
  exports.resolveVirtualModule = resolveVirtualModule;
611
645
  exports.runtimeHelperGroupsFromUsage = runtimeHelperGroupsFromUsage;
612
646
  exports.scanCustomPropertyNames = scanCustomPropertyNames;