@csszyx/unplugin 0.10.7 → 0.10.9
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 +4 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/next-prebuild.cjs +3 -3
- package/dist/next-prebuild.mjs +3 -3
- package/dist/next-turbo-loader.cjs +6 -6
- package/dist/next-turbo-loader.mjs +6 -6
- package/dist/next-watcher.cjs +2 -2
- package/dist/next-watcher.mjs +2 -2
- package/dist/shared/unplugin.B1mblcm-.mjs +9 -0
- package/dist/shared/{unplugin.D_GIYc2p.mjs → unplugin.BAOVOPKJ.mjs} +138 -38
- package/dist/shared/{unplugin.DoBHTRra.cjs → unplugin.BCwRIUs_.cjs} +5 -0
- package/dist/shared/{unplugin.Cwe-dz1f.cjs → unplugin.BFN_Ueyx.cjs} +7 -7
- package/dist/shared/{unplugin.DWtXPCGo.cjs → unplugin.BImj9Vcx.cjs} +6 -5
- package/dist/shared/{unplugin.DjIGzbic.d.cts → unplugin.CK6U5gAP.d.cts} +38 -2
- package/dist/shared/{unplugin.DjIGzbic.d.mts → unplugin.CK6U5gAP.d.mts} +38 -2
- package/dist/shared/{unplugin.CLjhn81z.mjs → unplugin.ChwZMl_w.mjs} +7 -7
- package/dist/shared/{unplugin.CaH_X1dP.cjs → unplugin.CyZkpgQK.cjs} +140 -38
- package/dist/shared/{unplugin.C1N5i6Eg.mjs → unplugin.uLmLkr10.mjs} +6 -5
- package/dist/vite.cjs +2 -2
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +2 -2
- package/package.json +8 -8
- package/dist/shared/unplugin.3UumZ5gn.mjs +0 -5
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.CyZkpgQK.cjs');
|
|
7
7
|
const types = require('@csszyx/types');
|
|
8
8
|
require('postcss');
|
|
9
9
|
require('postcss-selector-parser');
|
|
@@ -18,7 +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.
|
|
21
|
+
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
22
22
|
require('node:crypto');
|
|
23
23
|
require('./shared/unplugin.pmTknYLy.cjs');
|
|
24
24
|
require('postcss-value-parser');
|
|
@@ -33,6 +33,7 @@ exports.unescapeTailwindClass = cssMangler.unescapeTailwindClass;
|
|
|
33
33
|
exports.appendTailwindSourceDirective = unplugin.appendTailwindSourceDirective;
|
|
34
34
|
exports.assertNoRSCBoundaryViolation = unplugin.assertNoRSCBoundaryViolation;
|
|
35
35
|
exports.assertNoRSCGraphViolation = unplugin.assertNoRSCGraphViolation;
|
|
36
|
+
exports.collectMangleHybridHazards = unplugin.collectMangleHybridHazards;
|
|
36
37
|
exports.computeSafelistRelPath = unplugin.computeSafelistRelPath;
|
|
37
38
|
exports.createGlobalVarAliasValidationOptions = unplugin.createGlobalVarAliasValidationOptions;
|
|
38
39
|
exports.createGlobalVarMapAssetSource = unplugin.createGlobalVarMapAssetSource;
|
|
@@ -58,6 +59,7 @@ exports.isPackagesSkippedSource = unplugin.isPackagesSkippedSource;
|
|
|
58
59
|
exports.isRSCServerModule = unplugin.isRSCServerModule;
|
|
59
60
|
exports.isTailwindReservedGlobalVar = unplugin.isTailwindReservedGlobalVar;
|
|
60
61
|
exports.mangleCodeClassesSync = unplugin.mangleCodeClassesSync;
|
|
62
|
+
exports.mangleHybridHazardMessage = unplugin.mangleHybridHazardMessage;
|
|
61
63
|
exports.mergeThemes = unplugin.mergeThemes;
|
|
62
64
|
exports.missingTailwindEntryMessage = unplugin.missingTailwindEntryMessage;
|
|
63
65
|
exports.normalizeGlobalVarAliasesForCache = unplugin.normalizeGlobalVarAliasesForCache;
|
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.CK6U5gAP.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 appendTailwindSourceDirective, p 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, M as MangleHybridHazards, o as appendTailwindSourceDirective, p as collectMangleHybridHazards, q as computeSafelistRelPath, r as createGlobalVarMapAssetSource, s as cssHasContentScope, t as cssImportsTailwind, v as esbuildPlugin, w as extractGlobalVarAliasesForManifest, x as fileMayContainSafelistableSz, y as hasInjectableTailwindCandidate, z as isCompileSourceOptedIn, A as isHardIgnoredPath, B as isMonorepoPackage, D as isPackagesSkippedSource, E as mangleCodeClassesSync, F as mangleHybridHazardMessage, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as resolveCompileSourceDirs, K as resolveNativeCacheIdentity, L as rollupPlugin, N as shouldEmitWarning, O as shouldWarnMissingTailwindEntry, Q as shouldWarnUnscopedMonorepo, T as skippedSzFilesMessage, u as unplugin, U as unscopedMonorepoMessage, W as vitePlugin, X as webpackPlugin } from './shared/unplugin.CK6U5gAP.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.
|
|
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
|
|
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.CK6U5gAP.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 appendTailwindSourceDirective, p as collectMangleHybridHazards, q as computeSafelistRelPath, r as createGlobalVarMapAssetSource, s as cssHasContentScope, t as cssImportsTailwind, u as default, v as esbuildPlugin, w as extractGlobalVarAliasesForManifest, x as fileMayContainSafelistableSz, y as hasInjectableTailwindCandidate, z as isCompileSourceOptedIn, A as isHardIgnoredPath, B as isMonorepoPackage, D as isPackagesSkippedSource, E as mangleCodeClassesSync, F as mangleHybridHazardMessage, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as resolveCompileSourceDirs, K as resolveNativeCacheIdentity, L as rollupPlugin, N as shouldEmitWarning, O as shouldWarnMissingTailwindEntry, Q as shouldWarnUnscopedMonorepo, T as skippedSzFilesMessage, u as unplugin, U as unscopedMonorepoMessage, W as vitePlugin, X as webpackPlugin } from './shared/unplugin.CK6U5gAP.mjs';
|
|
5
5
|
import 'postcss';
|
|
6
6
|
import '@csszyx/compiler';
|
|
7
7
|
import 'esbuild';
|
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 appendTailwindSourceDirective, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as
|
|
2
|
+
export { a as appendTailwindSourceDirective, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as collectMangleHybridHazards, e as computeSafelistRelPath, f as createGlobalVarAliasValidationOptions, g as createGlobalVarMapAssetSource, h as createGlobalVarScanCacheKey, i as createRSCModuleRecord, j as cssHasContentScope, k as cssImportsTailwind, u as default, l as deleteRSCModuleRecord, m as esbuildPlugin, n as extractGlobalVarAliasesForManifest, o as fileMayContainSafelistableSz, p as findRSCBoundaryViolation, q as findRSCGraphViolation, r as hasInjectableTailwindCandidate, s as hasTokens, t as hasUseClientDirective, v as hasUseServerDirective, w as isCompileSourceOptedIn, x as isHardIgnoredPath, y as isMonorepoPackage, z as isPackagesSkippedSource, A as isRSCServerModule, B as isTailwindReservedGlobalVar, C as mangleCodeClassesSync, D as mangleHybridHazardMessage, E as mergeThemes, F as missingTailwindEntryMessage, G as normalizeGlobalVarAliasesForCache, H as parseThemeBlocks, I as planGlobalVarAliases, J as readGlobalVarScanCache, K as resolveCompileSourceDirs, L as resolveGlobalVarScanCacheDir, M as resolveNativeCacheIdentity, N as rewriteGlobalVarCssAliases, O as rollupPlugin, P as scanGlobalVarCss, Q as shouldEmitWarning, R as shouldWarnMissingTailwindEntry, S as shouldWarnUnscopedMonorepo, T as skippedSzFilesMessage, u as unplugin, U as unscopedMonorepoMessage, V as validateGlobalVarAliasInputs, W as vitePlugin, X as webpackPlugin, Y as writeGlobalVarScanCache } from './shared/unplugin.BAOVOPKJ.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,7 +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.
|
|
17
|
+
import './shared/unplugin.B1mblcm-.mjs';
|
|
18
18
|
import 'node:crypto';
|
|
19
19
|
import './shared/unplugin.BpWUtI9U.mjs';
|
|
20
20
|
import 'postcss-value-parser';
|
package/dist/next-prebuild.cjs
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
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.
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
6
|
+
const nextTransformMetadata = require('./shared/unplugin.BImj9Vcx.cjs');
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.BFN_Ueyx.cjs');
|
|
8
8
|
const transformCache = require('./shared/unplugin.pmTknYLy.cjs');
|
|
9
9
|
require('@csszyx/compiler');
|
|
10
|
+
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
10
11
|
require('node:os');
|
|
11
12
|
require('proper-lockfile');
|
|
12
|
-
require('./shared/unplugin.DoBHTRra.cjs');
|
|
13
13
|
|
|
14
14
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
15
15
|
function _interopNamespaceCompat(e) {
|
package/dist/next-prebuild.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
5
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.uLmLkr10.mjs';
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.ChwZMl_w.mjs';
|
|
6
6
|
import { r as resolveTransformCacheDir } from './shared/unplugin.BpWUtI9U.mjs';
|
|
7
7
|
import '@csszyx/compiler';
|
|
8
|
+
import './shared/unplugin.B1mblcm-.mjs';
|
|
8
9
|
import 'node:os';
|
|
9
10
|
import 'proper-lockfile';
|
|
10
|
-
import './shared/unplugin.3UumZ5gn.mjs';
|
|
11
11
|
|
|
12
12
|
function runNextPrebuild(options) {
|
|
13
13
|
assertProductionManglingBoundary(options);
|
|
@@ -4,13 +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.
|
|
8
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.BFN_Ueyx.cjs');
|
|
8
|
+
const nextTransformMetadata = require('./shared/unplugin.BImj9Vcx.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.
|
|
13
|
+
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
14
14
|
require('@csszyx/compiler');
|
|
15
15
|
|
|
16
16
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -30,9 +30,9 @@ const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
|
30
30
|
|
|
31
31
|
const DIRECTIVE_PROLOGUE_PREFIX_RE = /^((?:\s|\/\/[^\n]*\n|\/\*(?:[^*]|\*(?!\/))*\*\/)*)(['"]use (?:client|server)['"];?\s*)/;
|
|
32
32
|
const RUNTIME_HELPER_IMPORT_RE = {
|
|
33
|
-
_sz:
|
|
34
|
-
_szMerge:
|
|
35
|
-
__szColorVar:
|
|
33
|
+
_sz: /(?:import|export)\s+\{[^{}]*\b_sz\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
34
|
+
_szMerge: /(?:import|export)\s+\{[^{}]*\b_szMerge\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
35
|
+
__szColorVar: /(?:import|export)\s+\{[^{}]*\b__szColorVar\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/
|
|
36
36
|
};
|
|
37
37
|
function injectNextRuntimeImports(code, usage) {
|
|
38
38
|
const helpers = runtimeHelpersFromUsage(usage);
|
|
@@ -1,19 +1,19 @@
|
|
|
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.
|
|
4
|
-
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
3
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.ChwZMl_w.mjs';
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.uLmLkr10.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.
|
|
9
|
+
import './shared/unplugin.B1mblcm-.mjs';
|
|
10
10
|
import '@csszyx/compiler';
|
|
11
11
|
|
|
12
12
|
const DIRECTIVE_PROLOGUE_PREFIX_RE = /^((?:\s|\/\/[^\n]*\n|\/\*(?:[^*]|\*(?!\/))*\*\/)*)(['"]use (?:client|server)['"];?\s*)/;
|
|
13
13
|
const RUNTIME_HELPER_IMPORT_RE = {
|
|
14
|
-
_sz:
|
|
15
|
-
_szMerge:
|
|
16
|
-
__szColorVar:
|
|
14
|
+
_sz: /(?:import|export)\s+\{[^{}]*\b_sz\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
15
|
+
_szMerge: /(?:import|export)\s+\{[^{}]*\b_szMerge\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
16
|
+
__szColorVar: /(?:import|export)\s+\{[^{}]*\b__szColorVar\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/
|
|
17
17
|
};
|
|
18
18
|
function injectNextRuntimeImports(code, usage) {
|
|
19
19
|
const helpers = runtimeHelpersFromUsage(usage);
|
package/dist/next-watcher.cjs
CHANGED
|
@@ -1,12 +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.BFN_Ueyx.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.
|
|
9
|
+
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceCompat(e) {
|
|
12
12
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
package/dist/next-watcher.mjs
CHANGED
|
@@ -1,10 +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.ChwZMl_w.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.
|
|
7
|
+
import './shared/unplugin.B1mblcm-.mjs';
|
|
8
8
|
|
|
9
9
|
class NextWatcherLoop {
|
|
10
10
|
context;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function sortStrings(values) {
|
|
2
|
+
return [...values].sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function escapeHtmlAttribute(value) {
|
|
6
|
+
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { escapeHtmlAttribute as e, sortStrings as s };
|
|
@@ -5,7 +5,7 @@ import * as path from 'node:path';
|
|
|
5
5
|
import { dirname } from 'node:path';
|
|
6
6
|
import { performance } from 'node:perf_hooks';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
-
import { scanGlobalVarUsages, ensureRustTransformAvailable, transformSourceCode, transformRust, transformOxc, transformRustBatch, transform, isRustTransformAvailable } from '@csszyx/compiler';
|
|
8
|
+
import { scanGlobalVarUsages, sortStrings as sortStrings$1, ensureRustTransformAvailable, transformSourceCode, transformRust, transformOxc, transformRustBatch, transform, isRustTransformAvailable } from '@csszyx/compiler';
|
|
9
9
|
import { encode, compute_mangle_checksum } from '@csszyx/core';
|
|
10
10
|
import { getNativePackageName } from '@csszyx/core/native';
|
|
11
11
|
import { preprocess as preprocess$1 } from '@csszyx/svelte-adapter';
|
|
@@ -13,7 +13,7 @@ import { isTailwindReservedCustomProperty, CSSZYX_GLOBAL_ALIAS_PREFIX, isCsszyxG
|
|
|
13
13
|
import { preprocess } from '@csszyx/vue-adapter';
|
|
14
14
|
import { createUnplugin } from 'unplugin';
|
|
15
15
|
import { mangleCSSSync } from '../css-mangler.mjs';
|
|
16
|
-
import { e as escapeHtmlAttribute } from './unplugin.
|
|
16
|
+
import { s as sortStrings, e as escapeHtmlAttribute } from './unplugin.B1mblcm-.mjs';
|
|
17
17
|
import { createHash } from 'node:crypto';
|
|
18
18
|
import { r as resolveTransformCacheDir, c as createTransformCacheKey, a as readTransformCache, w as writeTransformCache, e as evictOldTransformCacheEntries } from './unplugin.BpWUtI9U.mjs';
|
|
19
19
|
import postcss from 'postcss';
|
|
@@ -145,7 +145,7 @@ function scanGlobalVarCss(css, options = {}) {
|
|
|
145
145
|
filePath,
|
|
146
146
|
definitions,
|
|
147
147
|
references,
|
|
148
|
-
registered:
|
|
148
|
+
registered: sortStrings(registered),
|
|
149
149
|
thirdParty: isThirdPartyCssPath(filePath)
|
|
150
150
|
};
|
|
151
151
|
}
|
|
@@ -164,7 +164,7 @@ function extractVarReferences(value) {
|
|
|
164
164
|
for (const match of value.matchAll(VAR_REFERENCE_RE)) {
|
|
165
165
|
references.add(match[1]);
|
|
166
166
|
}
|
|
167
|
-
return
|
|
167
|
+
return sortStrings(references);
|
|
168
168
|
}
|
|
169
169
|
function isThirdPartyCssPath(filePath) {
|
|
170
170
|
return filePath.split(/[\\/]/).includes("node_modules");
|
|
@@ -205,9 +205,9 @@ function planGlobalVarAliases(input) {
|
|
|
205
205
|
entries.push({
|
|
206
206
|
original,
|
|
207
207
|
alias,
|
|
208
|
-
scopes:
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
scopes: sortStrings(
|
|
209
|
+
new Set((definitions.get(original) ?? []).map((definition) => definition.scopeId))
|
|
210
|
+
)
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
return {
|
|
@@ -240,7 +240,7 @@ function collectCandidates(input, definitions) {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
return
|
|
243
|
+
return sortStrings(candidates);
|
|
244
244
|
}
|
|
245
245
|
function validateCandidates(candidates, definitions, reserved, aliasPrefix) {
|
|
246
246
|
const diagnostics = [];
|
|
@@ -893,7 +893,7 @@ function readImportedSymbols(clause) {
|
|
|
893
893
|
if (!trimmed || trimmed.startsWith("type ")) {
|
|
894
894
|
continue;
|
|
895
895
|
}
|
|
896
|
-
const sourceName = trimmed.replace(/^type[ \t]+/, "").split(/[ \t]+as[ \t]+/)[0]?.trim();
|
|
896
|
+
const sourceName = trimmed.replace(/^type[ \t]+/, "").split(/(?<![ \t])[ \t]+as[ \t]+/)[0]?.trim();
|
|
897
897
|
if (sourceName) {
|
|
898
898
|
symbols.push(sourceName);
|
|
899
899
|
}
|
|
@@ -1114,12 +1114,12 @@ function parseThemeBlocks(cssContent) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
return {
|
|
1117
|
-
colors:
|
|
1118
|
-
spacings:
|
|
1119
|
-
fonts:
|
|
1120
|
-
radii:
|
|
1121
|
-
shadows:
|
|
1122
|
-
breakpoints:
|
|
1117
|
+
colors: sortStrings(result.colors),
|
|
1118
|
+
spacings: sortStrings(result.spacings),
|
|
1119
|
+
fonts: sortStrings(result.fonts),
|
|
1120
|
+
radii: sortStrings(result.radii),
|
|
1121
|
+
shadows: sortStrings(result.shadows),
|
|
1122
|
+
breakpoints: sortStrings(result.breakpoints)
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
function mergeThemes(themes) {
|
|
@@ -1142,12 +1142,12 @@ function mergeThemes(themes) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
return {
|
|
1145
|
-
colors:
|
|
1146
|
-
spacings:
|
|
1147
|
-
fonts:
|
|
1148
|
-
radii:
|
|
1149
|
-
shadows:
|
|
1150
|
-
breakpoints:
|
|
1145
|
+
colors: sortStrings(merged.colors),
|
|
1146
|
+
spacings: sortStrings(merged.spacings),
|
|
1147
|
+
fonts: sortStrings(merged.fonts),
|
|
1148
|
+
radii: sortStrings(merged.radii),
|
|
1149
|
+
shadows: sortStrings(merged.shadows),
|
|
1150
|
+
breakpoints: sortStrings(merged.breakpoints)
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
1153
|
function hasTokens(theme) {
|
|
@@ -1267,7 +1267,7 @@ function expandFilePatterns(rootDir, patterns) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
return
|
|
1270
|
+
return sortStrings(files);
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
1273
|
function safeJsonForScriptTag(value, prettyPrint = false) {
|
|
@@ -1361,7 +1361,7 @@ function buildRecoveryManifest(tokens, options) {
|
|
|
1361
1361
|
const stripped = options.production === true;
|
|
1362
1362
|
const strippedDevOnlyPaths = [];
|
|
1363
1363
|
const sorted = {};
|
|
1364
|
-
const sortedKeys =
|
|
1364
|
+
const sortedKeys = sortStrings(tokens.keys());
|
|
1365
1365
|
for (const key of sortedKeys) {
|
|
1366
1366
|
const data = tokens.get(key);
|
|
1367
1367
|
if (!data) {
|
|
@@ -1582,13 +1582,15 @@ const DEFAULT_VAR_MANGLE_MAP_MAX_BYTES = 100 * 1024;
|
|
|
1582
1582
|
const GLOBAL_VAR_ALIAS_MAP_OWNER = "\0csszyx:global-var-aliases";
|
|
1583
1583
|
const DIRECTIVE_PROLOGUE_PREFIX_RE = /^((?:\s|\/\/[^\n]*\n|\/\*(?:[^*]|\*(?!\/))*\*\/)*)(['"]use (?:client|server)['"];?\s*)/;
|
|
1584
1584
|
const RUNTIME_HELPER_IMPORT_RE = {
|
|
1585
|
-
_sz:
|
|
1586
|
-
_szMerge:
|
|
1587
|
-
__szColorVar:
|
|
1585
|
+
_sz: /(?:import|export)\s+\{[^{}]*\b_sz\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
1586
|
+
_szMerge: /(?:import|export)\s+\{[^{}]*\b_szMerge\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/,
|
|
1587
|
+
__szColorVar: /(?:import|export)\s+\{[^{}]*\b__szColorVar\b[^{}]*\}\s*from\s*['"]@csszyx\/runtime['"]/
|
|
1588
1588
|
};
|
|
1589
1589
|
let _hasWarnedTsConfig = false;
|
|
1590
1590
|
let _hasWarnedTransformCacheVersion = false;
|
|
1591
1591
|
let _hasWarnedNativeFallback = false;
|
|
1592
|
+
let _hasLoggedActiveParser = false;
|
|
1593
|
+
const _babelFallbackFiles = /* @__PURE__ */ new Set();
|
|
1592
1594
|
const requireFromHere = createRequire(import.meta.url);
|
|
1593
1595
|
const PLUGIN_VERSION = findPackageVersionFromFile(
|
|
1594
1596
|
fileURLToPath(import.meta.url),
|
|
@@ -1668,6 +1670,43 @@ function shouldWarnMissingTailwindEntry(ownedClassCount, sawTailwindEntry, sawAn
|
|
|
1668
1670
|
function missingTailwindEntryMessage(ownedClassCount) {
|
|
1669
1671
|
return `[csszyx] generated ${ownedClassCount} sz class(es) but found no CSS entry importing "tailwindcss" \u2014 those classes will produce no CSS. Import "tailwindcss" in a CSS file (csszyx auto-injects @source for the generated classes) so Tailwind emits their styles.`;
|
|
1670
1672
|
}
|
|
1673
|
+
function collectMangleHybridHazards(mangleMap, mangledSources, externalClasses) {
|
|
1674
|
+
const tokenValues = new Set(Object.values(mangleMap));
|
|
1675
|
+
const collisions = sortStrings$1([...tokenValues].filter((token) => externalClasses.has(token)));
|
|
1676
|
+
const orphans = sortStrings$1(
|
|
1677
|
+
Object.keys(mangleMap).filter((source) => !mangledSources.has(source))
|
|
1678
|
+
);
|
|
1679
|
+
return { collisions, orphans };
|
|
1680
|
+
}
|
|
1681
|
+
function mangleHybridHazardMessage(hazards) {
|
|
1682
|
+
const { collisions, orphans } = hazards;
|
|
1683
|
+
if (collisions.length === 0 && orphans.length === 0) {
|
|
1684
|
+
return null;
|
|
1685
|
+
}
|
|
1686
|
+
const parts = ["[csszyx] production mangle found hybrid hazards:"];
|
|
1687
|
+
if (collisions.length > 0) {
|
|
1688
|
+
const sample = collisions.slice(0, 8).join(", ");
|
|
1689
|
+
parts.push(
|
|
1690
|
+
` ${collisions.length} mangled token(s) collide with class names in non-csszyx CSS (e.g. ${sample}) \u2014 those tokens will cross-contaminate external ".${collisions[0]}" elements.`
|
|
1691
|
+
);
|
|
1692
|
+
}
|
|
1693
|
+
if (orphans.length > 0) {
|
|
1694
|
+
const sample = orphans.slice(0, 8).join(", ");
|
|
1695
|
+
parts.push(
|
|
1696
|
+
` ${orphans.length} mangled class(es) have no emitted CSS rule (e.g. ${sample}) \u2014 those elements lose styling.`
|
|
1697
|
+
);
|
|
1698
|
+
}
|
|
1699
|
+
if (collisions.length > 0) {
|
|
1700
|
+
parts.push(
|
|
1701
|
+
" HOTFIX: pass `production: { mangle: false }` to the csszyx plugin to ship now. THEN fix it: if these short names are in your OWN CSS, rename them to something specific (e.g. `.x` \u2192 `.resize-handle-x`) \u2014 short/common names also clash on specificity with other libraries. Only for names in a third-party stylesheet you cannot edit, list them in `production.mangleExclude` instead. Run `npx @csszyx/cli scan-collisions` to find every offending name."
|
|
1702
|
+
);
|
|
1703
|
+
} else {
|
|
1704
|
+
parts.push(
|
|
1705
|
+
" Those classes are csszyx-owned but no CSS was emitted for them (e.g. a separate Tailwind plugin owns the utility CSS, or the class is not a real utility). Ensure that CSS is generated, or pass `production: { mangle: false }` to the csszyx plugin until the pipelines are reconciled."
|
|
1706
|
+
);
|
|
1707
|
+
}
|
|
1708
|
+
return parts.join("");
|
|
1709
|
+
}
|
|
1671
1710
|
function cssHasContentScope(code) {
|
|
1672
1711
|
const s = stripCssBlockComments(code);
|
|
1673
1712
|
return /@import\s+["']tailwindcss(?:\/[^"']*)?["']\s+source\(/.test(s) || /@source\s+not\b/.test(s);
|
|
@@ -1916,7 +1955,7 @@ CSS alias plan ${actualJson} does not match source-transform alias table ${expec
|
|
|
1916
1955
|
}
|
|
1917
1956
|
function buildVarMangleMap(entriesByFile) {
|
|
1918
1957
|
const next = {};
|
|
1919
|
-
const files =
|
|
1958
|
+
const files = sortStrings$1(entriesByFile.keys());
|
|
1920
1959
|
for (const file of files) {
|
|
1921
1960
|
for (const [original, mangled] of entriesByFile.get(file) ?? []) {
|
|
1922
1961
|
addVarMangleMapping(next, original, mangled);
|
|
@@ -1965,7 +2004,7 @@ function createEarlyGlobalVarAliasEntries(config, aliasPrefix) {
|
|
|
1965
2004
|
if (config?.enabled !== true || !config.tokens || config.tokens.length === 0) {
|
|
1966
2005
|
return [];
|
|
1967
2006
|
}
|
|
1968
|
-
const tokens =
|
|
2007
|
+
const tokens = sortStrings$1(new Set(config.tokens));
|
|
1969
2008
|
return tokens.map((original, index) => [original, `${aliasPrefix}${encode(index)}`]);
|
|
1970
2009
|
}
|
|
1971
2010
|
function shouldEmitGlobalVarMapAsset(config) {
|
|
@@ -2052,7 +2091,7 @@ function collectCSSVariableMetrics(code) {
|
|
|
2052
2091
|
}
|
|
2053
2092
|
function buildCSSVariableMetrics(metricsByFile) {
|
|
2054
2093
|
const total = emptyCSSVariableMetrics();
|
|
2055
|
-
for (const file of
|
|
2094
|
+
for (const file of sortStrings$1(metricsByFile.keys())) {
|
|
2056
2095
|
const metrics = metricsByFile.get(file);
|
|
2057
2096
|
if (!metrics) {
|
|
2058
2097
|
continue;
|
|
@@ -2344,7 +2383,7 @@ function mangleCodeClassesSync(code, mangleMap) {
|
|
|
2344
2383
|
result = out + result.slice(copiedTo);
|
|
2345
2384
|
}
|
|
2346
2385
|
}
|
|
2347
|
-
result = result.replace(/(
|
|
2386
|
+
result = result.replace(/([,(]|&&)(\s*)"([^"]+)"/g, (match, sep, ws, inner) => {
|
|
2348
2387
|
const tokens = inner.split(/\s+/).filter(Boolean);
|
|
2349
2388
|
if (tokens.length === 0) {
|
|
2350
2389
|
return match;
|
|
@@ -2364,7 +2403,7 @@ function mangleCodeClassesSync(code, mangleMap) {
|
|
|
2364
2403
|
if (!changed) {
|
|
2365
2404
|
return match;
|
|
2366
2405
|
}
|
|
2367
|
-
return
|
|
2406
|
+
return `${sep}${ws}"${mangled.join(" ")}"`;
|
|
2368
2407
|
});
|
|
2369
2408
|
return result;
|
|
2370
2409
|
}
|
|
@@ -2393,6 +2432,7 @@ ${errors.join("\n")}`
|
|
|
2393
2432
|
function createCsszyxPlugins(options = {}) {
|
|
2394
2433
|
assertGlobalVarMangleConfig(options);
|
|
2395
2434
|
let manglingEnabled = options.production?.mangle !== false;
|
|
2435
|
+
const mangleReserved = new Set(options.production?.mangleExclude ?? []);
|
|
2396
2436
|
const astBudgetOverride = options.build?.astBudgetLimit;
|
|
2397
2437
|
const cacheRequested = (options.build?.cache ?? DEFAULT_BUILD_CONFIG.cache) !== false;
|
|
2398
2438
|
const cacheVersionsKnown = PLUGIN_VERSION !== UNKNOWN_PACKAGE_VERSION && COMPILER_VERSION !== UNKNOWN_PACKAGE_VERSION;
|
|
@@ -2430,6 +2470,11 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2430
2470
|
"[csszyx] No prebuilt native binary (@csszyx/core-*) is available for this platform, so the default `rust` parser fell back to `oxc`. Output classes are identical (parity-tested); only parse speed differs. To use the native engine, install the matching @csszyx/core-<platform> package (or do not omit optional dependencies). Set `build.parser` explicitly to silence this."
|
|
2431
2471
|
);
|
|
2432
2472
|
}
|
|
2473
|
+
if (!_hasLoggedActiveParser) {
|
|
2474
|
+
_hasLoggedActiveParser = true;
|
|
2475
|
+
const detail = parserDegraded ? "oxc (degraded from default `rust`: no native binary for this platform)" : parserMode === "rust" ? "rust (native engine)" : parserMode;
|
|
2476
|
+
console.warn(`[csszyx] active parser: ${detail}`);
|
|
2477
|
+
}
|
|
2433
2478
|
let evictedCacheRoot = null;
|
|
2434
2479
|
const transformMemoryCache = /* @__PURE__ */ new Map();
|
|
2435
2480
|
const state = {
|
|
@@ -2571,6 +2616,12 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2571
2616
|
result.diagnostics.push(
|
|
2572
2617
|
`[csszyx] oxc parser fell back to Babel for ${effectiveFilename}: ${reason}`
|
|
2573
2618
|
);
|
|
2619
|
+
if (!_babelFallbackFiles.has(effectiveFilename)) {
|
|
2620
|
+
_babelFallbackFiles.add(effectiveFilename);
|
|
2621
|
+
console.warn(
|
|
2622
|
+
`[csszyx] oxc parser fell back to Babel for ${effectiveFilename}: ${reason} (${_babelFallbackFiles.size} file(s) so far). Output is still correct; this usually means the file uses a syntax the oxc lane does not yet handle.`
|
|
2623
|
+
);
|
|
2624
|
+
}
|
|
2574
2625
|
return result;
|
|
2575
2626
|
}
|
|
2576
2627
|
}
|
|
@@ -2870,7 +2921,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2870
2921
|
}
|
|
2871
2922
|
}
|
|
2872
2923
|
function collectRuntimeStringClasses(objStr, discoveredClasses) {
|
|
2873
|
-
const strKv =
|
|
2924
|
+
const strKv = /\b(\w+)\s*:\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
2874
2925
|
for (const kv of objStr.matchAll(strKv)) {
|
|
2875
2926
|
try {
|
|
2876
2927
|
const val = kv[2] ?? kv[3];
|
|
@@ -2880,7 +2931,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2880
2931
|
}
|
|
2881
2932
|
}
|
|
2882
2933
|
function collectRuntimeNumberClasses(objStr, discoveredClasses) {
|
|
2883
|
-
const numKv =
|
|
2934
|
+
const numKv = /\b(\w+)\s*:\s*(-?\d+(?:\.\d+)?)\s*(?=[,}\n])/g;
|
|
2884
2935
|
for (const kv of objStr.matchAll(numKv)) {
|
|
2885
2936
|
try {
|
|
2886
2937
|
collectTransformClasses(
|
|
@@ -2892,7 +2943,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2892
2943
|
}
|
|
2893
2944
|
}
|
|
2894
2945
|
function collectRuntimeBooleanClasses(objStr, discoveredClasses) {
|
|
2895
|
-
const boolKv =
|
|
2946
|
+
const boolKv = /\b(\w+)\s*:\s*(true|false)\s*(?=[,}\n])/g;
|
|
2896
2947
|
for (const kv of objStr.matchAll(boolKv)) {
|
|
2897
2948
|
try {
|
|
2898
2949
|
collectTransformClasses(
|
|
@@ -2945,8 +2996,15 @@ function createCsszyxPlugins(options = {}) {
|
|
|
2945
2996
|
function finalizeMangleMap() {
|
|
2946
2997
|
const sortedClasses = Array.from(state.ownedClasses);
|
|
2947
2998
|
const newMap = {};
|
|
2999
|
+
let tokenIndex = 0;
|
|
2948
3000
|
for (let i = 0; i < sortedClasses.length; i++) {
|
|
2949
|
-
|
|
3001
|
+
let token = encode(tokenIndex);
|
|
3002
|
+
while (mangleReserved.has(token)) {
|
|
3003
|
+
tokenIndex++;
|
|
3004
|
+
token = encode(tokenIndex);
|
|
3005
|
+
}
|
|
3006
|
+
newMap[sortedClasses[i]] = token;
|
|
3007
|
+
tokenIndex++;
|
|
2950
3008
|
}
|
|
2951
3009
|
state.mangleMap = newMap;
|
|
2952
3010
|
assertVarMangleMapSize(state.varMangleMap, varMangleMapMaxBytes);
|
|
@@ -3225,7 +3283,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3225
3283
|
}
|
|
3226
3284
|
if (!state.skipWarningEmitted && state.skippedSzFiles.size > 0) {
|
|
3227
3285
|
state.skipWarningEmitted = true;
|
|
3228
|
-
emitWarning(skippedSzFilesMessage(
|
|
3286
|
+
emitWarning(skippedSzFilesMessage(sortStrings$1(state.skippedSzFiles)), {
|
|
3229
3287
|
devOnly: true
|
|
3230
3288
|
});
|
|
3231
3289
|
}
|
|
@@ -3366,7 +3424,9 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3366
3424
|
finalizeMangleMap();
|
|
3367
3425
|
const injectedMangleMap = manglingEnabled ? state.mangleMap : {};
|
|
3368
3426
|
let result = transformIndexHtml(html, injectedMangleMap, state.checksum, {
|
|
3369
|
-
|
|
3427
|
+
// Always 'script'; the checksum itself is injected by
|
|
3428
|
+
// injectHydrationData regardless of this mode.
|
|
3429
|
+
mode: "script",
|
|
3370
3430
|
minify: process.env.NODE_ENV === "production",
|
|
3371
3431
|
varMangleMap: state.varMangleMap,
|
|
3372
3432
|
globalVarAliasPrefix
|
|
@@ -3456,6 +3516,8 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3456
3516
|
);
|
|
3457
3517
|
}
|
|
3458
3518
|
}
|
|
3519
|
+
const mangledSources = /* @__PURE__ */ new Set();
|
|
3520
|
+
const externalClasses = /* @__PURE__ */ new Set();
|
|
3459
3521
|
for (const file in assets) {
|
|
3460
3522
|
const asset = assets[file];
|
|
3461
3523
|
const source = asset.source().toString();
|
|
@@ -3471,6 +3533,12 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3471
3533
|
debug: options.development?.debug,
|
|
3472
3534
|
from: file
|
|
3473
3535
|
});
|
|
3536
|
+
for (const c of result.mangledClasses) {
|
|
3537
|
+
mangledSources.add(c);
|
|
3538
|
+
}
|
|
3539
|
+
for (const c of result.unmangledClasses) {
|
|
3540
|
+
externalClasses.add(c);
|
|
3541
|
+
}
|
|
3474
3542
|
if (result.transformedCount > 0) {
|
|
3475
3543
|
css = result.css;
|
|
3476
3544
|
}
|
|
@@ -3532,6 +3600,18 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3532
3600
|
}
|
|
3533
3601
|
}
|
|
3534
3602
|
}
|
|
3603
|
+
if (manglingEnabled && !isWebpackDevMode && Object.keys(state.mangleMap).length > 0) {
|
|
3604
|
+
const hazardMessage = mangleHybridHazardMessage(
|
|
3605
|
+
collectMangleHybridHazards(
|
|
3606
|
+
state.mangleMap,
|
|
3607
|
+
mangledSources,
|
|
3608
|
+
externalClasses
|
|
3609
|
+
)
|
|
3610
|
+
);
|
|
3611
|
+
if (hazardMessage) {
|
|
3612
|
+
console.warn(hazardMessage);
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3535
3615
|
}
|
|
3536
3616
|
);
|
|
3537
3617
|
});
|
|
@@ -3588,6 +3668,8 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3588
3668
|
});
|
|
3589
3669
|
}
|
|
3590
3670
|
}
|
|
3671
|
+
const mangledSources = /* @__PURE__ */ new Set();
|
|
3672
|
+
const externalClasses = /* @__PURE__ */ new Set();
|
|
3591
3673
|
for (const file in bundle) {
|
|
3592
3674
|
const chunk = bundle[file];
|
|
3593
3675
|
if (chunk.type === "asset" && chunk.fileName.endsWith(".css")) {
|
|
@@ -3603,6 +3685,12 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3603
3685
|
debug: options.development?.debug,
|
|
3604
3686
|
from: file
|
|
3605
3687
|
});
|
|
3688
|
+
for (const c of result.mangledClasses) {
|
|
3689
|
+
mangledSources.add(c);
|
|
3690
|
+
}
|
|
3691
|
+
for (const c of result.unmangledClasses) {
|
|
3692
|
+
externalClasses.add(c);
|
|
3693
|
+
}
|
|
3606
3694
|
if (result.transformedCount > 0) {
|
|
3607
3695
|
css = result.css;
|
|
3608
3696
|
}
|
|
@@ -3634,6 +3722,18 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3634
3722
|
}
|
|
3635
3723
|
}
|
|
3636
3724
|
}
|
|
3725
|
+
if (manglingEnabled && Object.keys(state.mangleMap).length > 0) {
|
|
3726
|
+
const hazardMessage = mangleHybridHazardMessage(
|
|
3727
|
+
collectMangleHybridHazards(
|
|
3728
|
+
state.mangleMap,
|
|
3729
|
+
mangledSources,
|
|
3730
|
+
externalClasses
|
|
3731
|
+
)
|
|
3732
|
+
);
|
|
3733
|
+
if (hazardMessage) {
|
|
3734
|
+
console.warn(hazardMessage);
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3637
3737
|
}
|
|
3638
3738
|
}
|
|
3639
3739
|
}));
|
|
@@ -3681,4 +3781,4 @@ const esbuildPlugin = (options = {}) => {
|
|
|
3681
3781
|
};
|
|
3682
3782
|
};
|
|
3683
3783
|
|
|
3684
|
-
export {
|
|
3784
|
+
export { isRSCServerModule as A, isTailwindReservedGlobalVar as B, mangleCodeClassesSync as C, mangleHybridHazardMessage as D, mergeThemes as E, missingTailwindEntryMessage as F, normalizeGlobalVarAliasesForCache as G, parseThemeBlocks as H, planGlobalVarAliases as I, readGlobalVarScanCache as J, resolveCompileSourceDirs as K, resolveGlobalVarScanCacheDir as L, resolveNativeCacheIdentity as M, rewriteGlobalVarCssAliases as N, rollupPlugin as O, scanGlobalVarCss as P, shouldEmitWarning as Q, shouldWarnMissingTailwindEntry as R, shouldWarnUnscopedMonorepo as S, skippedSzFilesMessage as T, unscopedMonorepoMessage as U, validateGlobalVarAliasInputs as V, vitePlugin as W, webpackPlugin as X, writeGlobalVarScanCache as Y, appendTailwindSourceDirective as a, assertNoRSCBoundaryViolation as b, assertNoRSCGraphViolation as c, collectMangleHybridHazards as d, computeSafelistRelPath as e, createGlobalVarAliasValidationOptions as f, createGlobalVarMapAssetSource as g, createGlobalVarScanCacheKey as h, createRSCModuleRecord as i, cssHasContentScope as j, cssImportsTailwind as k, deleteRSCModuleRecord as l, esbuildPlugin as m, extractGlobalVarAliasesForManifest as n, fileMayContainSafelistableSz as o, findRSCBoundaryViolation as p, findRSCGraphViolation as q, hasInjectableTailwindCandidate as r, hasTokens as s, hasUseClientDirective as t, unplugin as u, hasUseServerDirective as v, isCompileSourceOptedIn as w, isHardIgnoredPath as x, isMonorepoPackage as y, isPackagesSkippedSource as z };
|