@csszyx/unplugin 0.11.9 → 0.11.11
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 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/next-prebuild.cjs +3 -3
- package/dist/next-prebuild.d.cts +1 -1
- package/dist/next-prebuild.d.mts +1 -1
- package/dist/next-prebuild.mjs +3 -3
- package/dist/next-turbo-loader.cjs +4 -4
- package/dist/next-turbo-loader.d.cts +1 -1
- package/dist/next-turbo-loader.d.mts +1 -1
- package/dist/next-turbo-loader.mjs +4 -4
- package/dist/next-watcher.cjs +1 -1
- package/dist/next-watcher.mjs +1 -1
- package/dist/shared/{unplugin.Bqx2WfBV.mjs → unplugin.-yLpX1Ck.mjs} +2 -2
- package/dist/shared/{unplugin.wx3cvxxX.mjs → unplugin.B2RUVK6Z.mjs} +135 -39
- package/dist/shared/{unplugin.CjCKWnoX.d.cts → unplugin.BK7BIeBn.d.cts} +15 -1
- package/dist/shared/{unplugin.CjCKWnoX.d.mts → unplugin.BK7BIeBn.d.mts} +15 -1
- package/dist/shared/{unplugin.jZsBqx54.cjs → unplugin.BZq6FKn2.cjs} +2 -2
- package/dist/shared/{unplugin.DUI48s3S.cjs → unplugin.CJcFsJcf.cjs} +137 -40
- package/dist/shared/{unplugin.DVCQC5wq.cjs → unplugin.CKIOVNOg.cjs} +9 -0
- package/dist/shared/{unplugin.CScQRdTp.d.cts → unplugin.CXV7fOa2.d.cts} +1 -1
- package/dist/shared/{unplugin.CScQRdTp.d.mts → unplugin.CXV7fOa2.d.mts} +1 -1
- package/dist/shared/{unplugin.DmuOKVS4.cjs → unplugin.Cnxm1DcC.cjs} +2 -2
- package/dist/shared/{unplugin.nnsa7OVW.mjs → unplugin.Lhzkcj-A.mjs} +2 -2
- package/dist/shared/{unplugin.D-K57LNR.mjs → unplugin.fOnGXWgS.mjs} +9 -1
- package/dist/vite.cjs +3 -3
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +3 -3
- package/dist/webpack.cjs +3 -3
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +3 -3
- package/package.json +17 -17
- package/dist/shared/{unplugin.7TELUwsj.mjs → unplugin.DMcbmP01.mjs} +46 -46
- package/dist/shared/{unplugin.WVn08Fln.cjs → unplugin.DblMogcN.cjs} +46 -46
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.CJcFsJcf.cjs');
|
|
7
7
|
const types = require('@csszyx/types');
|
|
8
8
|
require('postcss');
|
|
9
9
|
require('postcss-selector-parser');
|
|
@@ -19,8 +19,8 @@ require('@csszyx/core/native');
|
|
|
19
19
|
require('@csszyx/svelte-adapter');
|
|
20
20
|
require('@csszyx/vue-adapter');
|
|
21
21
|
require('unplugin');
|
|
22
|
-
require('./shared/unplugin.
|
|
23
|
-
require('./shared/unplugin.
|
|
22
|
+
require('./shared/unplugin.CKIOVNOg.cjs');
|
|
23
|
+
require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
24
24
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
25
25
|
require('postcss-value-parser');
|
|
26
26
|
|
|
@@ -31,6 +31,7 @@ exports.escapeCSSClassName = cssMangler.escapeCSSClassName;
|
|
|
31
31
|
exports.mangleCSS = cssMangler.mangleCSS;
|
|
32
32
|
exports.mangleCSSSync = cssMangler.mangleCSSSync;
|
|
33
33
|
exports.unescapeTailwindClass = cssMangler.unescapeTailwindClass;
|
|
34
|
+
exports.allocateMangleTokens = unplugin.allocateMangleTokens;
|
|
34
35
|
exports.appendTailwindSourceDirective = unplugin.appendTailwindSourceDirective;
|
|
35
36
|
exports.assertNoRSCBoundaryViolation = unplugin.assertNoRSCBoundaryViolation;
|
|
36
37
|
exports.assertNoRSCGraphViolation = unplugin.assertNoRSCGraphViolation;
|
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.BK7BIeBn.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, p as RSCBoundaryViolation, q as RSCModuleRecord, r 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 ParsedTheme, 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 esbuildPlugin, F as extractGlobalVarAliasesForManifest, H as fileMayContainSafelistableSz, I as findLocalImportSources, J as findRSCBoundaryViolation, K as findRSCGraphViolation, L as hasInjectableTailwindCandidate, N as hasTokens, O as hasUseClientDirective, Q as hasUseServerDirective, T as isCompileSourceOptedIn, U as isHardIgnoredPath, W as isMonorepoPackage, X as isPackagesSkippedSource, Y as isRSCServerModule, Z as mangleCodeClassesSync, _ as mangleEligibleClasses, $ as mangleHybridHazardMessage, a0 as mergeThemes, a1 as missingTailwindEntryMessage, a2 as normalizeGlobalVarAliasesForCache, a3 as parseThemeBlocks, a4 as recordGlobalVarSourceFile, a5 as resolveCompileSourceDirs, a6 as resolveNativeCacheIdentity, a7 as rollupPlugin, a8 as scanCustomPropertyNames, a9 as shouldEmitWarning, aa as shouldTrackGlobalVarSources, ab as shouldWarnMissingTailwindEntry, ac as shouldWarnUnscopedMonorepo, ad as skippedSzFilesMessage, B as unplugin, ae as unscopedMonorepoMessage, af as vitePlugin, ag as webpackPlugin } from './shared/unplugin.BK7BIeBn.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, M as MangleHybridHazards, o as ParsedTheme, p as RSCBoundaryViolation, q as RSCModuleRecord, r 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.BK7BIeBn.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 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 esbuildPlugin, F as extractGlobalVarAliasesForManifest, H as fileMayContainSafelistableSz, I as findLocalImportSources, J as findRSCBoundaryViolation, K as findRSCGraphViolation, L as hasInjectableTailwindCandidate, N as hasTokens, O as hasUseClientDirective, Q as hasUseServerDirective, T as isCompileSourceOptedIn, U as isHardIgnoredPath, W as isMonorepoPackage, X as isPackagesSkippedSource, Y as isRSCServerModule, Z as mangleCodeClassesSync, _ as mangleEligibleClasses, $ as mangleHybridHazardMessage, a0 as mergeThemes, a1 as missingTailwindEntryMessage, a2 as normalizeGlobalVarAliasesForCache, a3 as parseThemeBlocks, a4 as recordGlobalVarSourceFile, a5 as resolveCompileSourceDirs, a6 as resolveNativeCacheIdentity, a7 as rollupPlugin, a8 as scanCustomPropertyNames, a9 as shouldEmitWarning, aa as shouldTrackGlobalVarSources, ab as shouldWarnMissingTailwindEntry, ac as shouldWarnUnscopedMonorepo, ad as skippedSzFilesMessage, B as unplugin, ae as unscopedMonorepoMessage, af as vitePlugin, ag as webpackPlugin } from './shared/unplugin.BK7BIeBn.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
|
|
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 esbuildPlugin, o as extractGlobalVarAliasesForManifest, p as fileMayContainSafelistableSz, q as findLocalImportSources, r as findRSCBoundaryViolation, s as findRSCGraphViolation, t as hasInjectableTailwindCandidate, v as hasTokens, w as hasUseClientDirective, x as hasUseServerDirective, y as isCompileSourceOptedIn, z as isHardIgnoredPath, A as isMonorepoPackage, B as isPackagesSkippedSource, C as isRSCServerModule, D as isTailwindReservedGlobalVar, E as mangleCodeClassesSync, F as mangleEligibleClasses, G as mangleHybridHazardMessage, H as mergeThemes, I as missingTailwindEntryMessage, J as normalizeGlobalVarAliasesForCache, K as parseThemeBlocks, L as planGlobalVarAliases, M as readGlobalVarScanCache, N as recordGlobalVarSourceFile, O as resolveCompileSourceDirs, P as resolveGlobalVarScanCacheDir, Q as resolveNativeCacheIdentity, R as rewriteGlobalVarCssAliases, S as rollupPlugin, T as scanCustomPropertyNames, U as scanGlobalVarCss, V as shouldEmitWarning, W as shouldTrackGlobalVarSources, X as shouldWarnMissingTailwindEntry, Y as shouldWarnUnscopedMonorepo, Z as skippedSzFilesMessage, u as unplugin, _ as unscopedMonorepoMessage, $ as validateGlobalVarAliasInputs, a0 as vitePlugin, a1 as webpackPlugin, a2 as writeGlobalVarScanCache } from './shared/unplugin.B2RUVK6Z.mjs';
|
|
3
3
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
4
4
|
import 'postcss';
|
|
5
5
|
import 'postcss-selector-parser';
|
|
@@ -15,7 +15,7 @@ import '@csszyx/core/native';
|
|
|
15
15
|
import '@csszyx/svelte-adapter';
|
|
16
16
|
import '@csszyx/vue-adapter';
|
|
17
17
|
import 'unplugin';
|
|
18
|
-
import './shared/unplugin.
|
|
19
|
-
import './shared/unplugin.
|
|
18
|
+
import './shared/unplugin.fOnGXWgS.mjs';
|
|
19
|
+
import './shared/unplugin.Lhzkcj-A.mjs';
|
|
20
20
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
21
21
|
import 'postcss-value-parser';
|
package/dist/next-prebuild.cjs
CHANGED
|
@@ -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.
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
8
|
-
const transformCache = require('./shared/unplugin.
|
|
6
|
+
const nextTransformMetadata = require('./shared/unplugin.BZq6FKn2.cjs');
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.DblMogcN.cjs');
|
|
8
|
+
const transformCache = require('./shared/unplugin.CKIOVNOg.cjs');
|
|
9
9
|
require('@csszyx/compiler');
|
|
10
10
|
require('./shared/unplugin.BkRah5Ot.cjs');
|
|
11
11
|
require('node:os');
|
package/dist/next-prebuild.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.CXV7fOa2.cjs';
|
|
4
4
|
import { N as NextWatcherCycleResult } from './shared/unplugin.xeED_qwh.cjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
package/dist/next-prebuild.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.CXV7fOa2.mjs';
|
|
4
4
|
import { N as NextWatcherCycleResult } from './shared/unplugin.CdZxp0x-.mjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
package/dist/next-prebuild.mjs
CHANGED
|
@@ -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, 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.
|
|
6
|
-
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.-yLpX1Ck.mjs';
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.DMcbmP01.mjs';
|
|
6
|
+
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.fOnGXWgS.mjs';
|
|
7
7
|
import '@csszyx/compiler';
|
|
8
8
|
import './shared/unplugin.B3XoSRB8.mjs';
|
|
9
9
|
import 'node:os';
|
|
@@ -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 nextWatcherCycle = require('./shared/unplugin.
|
|
8
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
9
|
-
const runtimeImportScan = require('./shared/unplugin.
|
|
10
|
-
const transformCache = require('./shared/unplugin.
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.DblMogcN.cjs');
|
|
8
|
+
const nextTransformMetadata = require('./shared/unplugin.BZq6FKn2.cjs');
|
|
9
|
+
const runtimeImportScan = require('./shared/unplugin.Cnxm1DcC.cjs');
|
|
10
|
+
const transformCache = require('./shared/unplugin.CKIOVNOg.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('proper-lockfile');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.CXV7fOa2.cjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
6
6
|
interface NextTurboLoaderOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
2
|
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.CPEWNSA0.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.CXV7fOa2.mjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
6
6
|
interface NextTurboLoaderOptions {
|
|
@@ -1,9 +1,9 @@
|
|
|
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.
|
|
5
|
-
import { i as importsRuntimeHelper, a as insertAfterUseDirective } from './shared/unplugin.
|
|
6
|
-
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.
|
|
3
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, v as validateNextGenerationManifest, a as readNextGenerationManifest } from './shared/unplugin.DMcbmP01.mjs';
|
|
4
|
+
import { r as readPackageVersion, t as transformNextSource, c as collectNextTransformMetadata, a as createNextSafelistShardFromMetadata } from './shared/unplugin.-yLpX1Ck.mjs';
|
|
5
|
+
import { i as importsRuntimeHelper, a as insertAfterUseDirective } from './shared/unplugin.Lhzkcj-A.mjs';
|
|
6
|
+
import { r as resolveTransformCacheDir, n as normalizePathSeparators } from './shared/unplugin.fOnGXWgS.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'proper-lockfile';
|
package/dist/next-watcher.cjs
CHANGED
package/dist/next-watcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { ensureRustTransformAvailable, transformSourceCode, transformRust, transformOxc, transform } from '@csszyx/compiler';
|
|
3
|
-
import { c as createTransformCacheKey, a as readTransformCache, w as writeTransformCache, n as normalizePathSeparators } from './unplugin.
|
|
3
|
+
import { c as createTransformCacheKey, a as readTransformCache, w as writeTransformCache, n as normalizePathSeparators, b as babelFallbackReason } from './unplugin.fOnGXWgS.mjs';
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
5
|
import { s as sortStrings } from './unplugin.B3XoSRB8.mjs';
|
|
6
6
|
|
|
@@ -148,7 +148,7 @@ function runNextSourceTransform(input, filename) {
|
|
|
148
148
|
throw error;
|
|
149
149
|
}
|
|
150
150
|
const result = transformSourceCode(input.source, filename, compilerOptions);
|
|
151
|
-
const reason =
|
|
151
|
+
const reason = babelFallbackReason(error);
|
|
152
152
|
result.diagnostics.push(
|
|
153
153
|
`[csszyx] oxc parser fell back to Babel for ${filename}: ${reason}`
|
|
154
154
|
);
|
|
@@ -13,9 +13,9 @@ import { preprocess as preprocess$1 } from '@csszyx/svelte-adapter';
|
|
|
13
13
|
import { isTailwindReservedCustomProperty, CSSZYX_GLOBAL_ALIAS_PREFIX, isCsszyxGlobalAliasCustomProperty, 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, r as resolveTransformCacheDir, c as createTransformCacheKey, w as writeTransformCache, e as evictOldTransformCacheEntries, a as readTransformCache, d as evictMemoryCacheToBudget, b as babelFallbackReason } from './unplugin.fOnGXWgS.mjs';
|
|
16
17
|
import { mangleCSSSync } from '../css-mangler.mjs';
|
|
17
|
-
import { i as importsRuntimeHelper, f as findRuntimeImportClause, a as insertAfterUseDirective } from './unplugin.
|
|
18
|
-
import { n as normalizePathSeparators, r as resolveTransformCacheDir, c as createTransformCacheKey, w as writeTransformCache, e as evictOldTransformCacheEntries, a as readTransformCache, b as evictMemoryCacheToBudget } from './unplugin.D-K57LNR.mjs';
|
|
18
|
+
import { i as importsRuntimeHelper, f as findRuntimeImportClause, a as insertAfterUseDirective } from './unplugin.Lhzkcj-A.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 postcss from 'postcss';
|
|
21
21
|
import valueParser from 'postcss-value-parser';
|
|
@@ -436,8 +436,8 @@ function scanCssSourceWithOptionalCache(file, cacheDir) {
|
|
|
436
436
|
return result;
|
|
437
437
|
}
|
|
438
438
|
function normalizeBuildAssetPath(rootDir, fileName) {
|
|
439
|
-
return (path.isAbsolute(fileName) ? fileName : path.join(rootDir, fileName)).
|
|
440
|
-
|
|
439
|
+
return (path.isAbsolute(fileName) ? fileName : path.join(rootDir, fileName)).replaceAll(
|
|
440
|
+
"\\",
|
|
441
441
|
"/"
|
|
442
442
|
);
|
|
443
443
|
}
|
|
@@ -2137,7 +2137,7 @@ export default checksum;
|
|
|
2137
2137
|
`;
|
|
2138
2138
|
}
|
|
2139
2139
|
function isVirtualModule(id) {
|
|
2140
|
-
return id === VIRTUAL_MODULE_ID || id === VIRTUAL_CHECKSUM_ID || id === THEME_GROUPS_VIRTUAL_ID;
|
|
2140
|
+
return id === VIRTUAL_MODULE_ID || id === VIRTUAL_CHECKSUM_ID || id === THEME_GROUPS_VIRTUAL_ID || id === MANGLE_RUNTIME_VIRTUAL_ID;
|
|
2141
2141
|
}
|
|
2142
2142
|
function resolveVirtualModule(id) {
|
|
2143
2143
|
if (id === VIRTUAL_MODULE_ID) {
|
|
@@ -2149,8 +2149,56 @@ function resolveVirtualModule(id) {
|
|
|
2149
2149
|
if (id === THEME_GROUPS_VIRTUAL_ID) {
|
|
2150
2150
|
return RESOLVED_THEME_GROUPS_VIRTUAL_ID;
|
|
2151
2151
|
}
|
|
2152
|
+
if (id === MANGLE_RUNTIME_VIRTUAL_ID) {
|
|
2153
|
+
return RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID;
|
|
2154
|
+
}
|
|
2152
2155
|
return void 0;
|
|
2153
2156
|
}
|
|
2157
|
+
const MANGLE_RUNTIME_VIRTUAL_ID = "virtual:csszyx/mangle-runtime";
|
|
2158
|
+
const RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID = `\0${MANGLE_RUNTIME_VIRTUAL_ID}`;
|
|
2159
|
+
const MANGLE_MAP_PLACEHOLDER = "___CSSZYX_MANGLE_MAP___";
|
|
2160
|
+
const VAR_MANGLE_MAP_PLACEHOLDER = "___CSSZYX_VAR_MANGLE_MAP___";
|
|
2161
|
+
const CHECKSUM_PLACEHOLDER = "___CSSZYX_CHECKSUM___";
|
|
2162
|
+
function createMangleRuntimeModule(globalVarAliasPrefix) {
|
|
2163
|
+
return `/**
|
|
2164
|
+
* Auto-generated by csszyx: installs the runtime mangle map from the bundle.
|
|
2165
|
+
*
|
|
2166
|
+
* @generated
|
|
2167
|
+
*/
|
|
2168
|
+
|
|
2169
|
+
const m = ${MANGLE_MAP_PLACEHOLDER};
|
|
2170
|
+
const vm = ${VAR_MANGLE_MAP_PLACEHOLDER};
|
|
2171
|
+
const gp = ${JSON.stringify(globalVarAliasPrefix)};
|
|
2172
|
+
const checksum = "${CHECKSUM_PLACEHOLDER}";
|
|
2173
|
+
|
|
2174
|
+
if (typeof window !== 'undefined' && !window.__csszyx) {
|
|
2175
|
+
const r = {};
|
|
2176
|
+
const vr = {};
|
|
2177
|
+
for (const k in m) r[m[k]] = k;
|
|
2178
|
+
for (const vk in vm) {
|
|
2179
|
+
const vv = vm[vk];
|
|
2180
|
+
const vs = Array.isArray(vv) ? vv : [vv];
|
|
2181
|
+
for (const v of vs) (vr[v] || (vr[v] = [])).push(vk);
|
|
2182
|
+
}
|
|
2183
|
+
window.__csszyx = {
|
|
2184
|
+
mangleMap: m,
|
|
2185
|
+
varMangleMap: vm,
|
|
2186
|
+
checksum,
|
|
2187
|
+
decode: (c) => r[c],
|
|
2188
|
+
encode: (c) => m[c],
|
|
2189
|
+
decodeVar: (v) => vr[v] || [],
|
|
2190
|
+
encodeVar: (v) => vm[v],
|
|
2191
|
+
decodeGlobalVar: (v) => {
|
|
2192
|
+
const a = vr[v] || [];
|
|
2193
|
+
return v.indexOf(gp) === 0 ? a[0] : undefined;
|
|
2194
|
+
},
|
|
2195
|
+
decodeAll: (el) => (el.className || '').split(' ').map((c) => r[c] || c),
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
export {};
|
|
2200
|
+
`;
|
|
2201
|
+
}
|
|
2154
2202
|
function createThemeGroupsModule(tokens) {
|
|
2155
2203
|
const payload = JSON.stringify({
|
|
2156
2204
|
colors: tokens.colors,
|
|
@@ -2175,9 +2223,6 @@ function registerWebpackAssetProcessor(compiler, processAssets) {
|
|
|
2175
2223
|
);
|
|
2176
2224
|
});
|
|
2177
2225
|
}
|
|
2178
|
-
const CHECKSUM_PLACEHOLDER = "___CSSZYX_CHECKSUM___";
|
|
2179
|
-
const MANGLE_MAP_PLACEHOLDER = "___CSSZYX_MANGLE_MAP___";
|
|
2180
|
-
const VAR_MANGLE_MAP_PLACEHOLDER = "___CSSZYX_VAR_MANGLE_MAP___";
|
|
2181
2226
|
const UNKNOWN_PACKAGE_VERSION = "0.0.0";
|
|
2182
2227
|
const TRANSFORM_CACHE_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
2183
2228
|
const TRANSFORM_CACHE_MAX_ENTRIES = 1e4;
|
|
@@ -2433,6 +2478,30 @@ function fileMayContainSafelistableSz(content) {
|
|
|
2433
2478
|
function mangleEligibleClasses(ownedClasses, authoredClasses) {
|
|
2434
2479
|
return sortStrings$1([...ownedClasses].filter((className) => !authoredClasses.has(className)));
|
|
2435
2480
|
}
|
|
2481
|
+
const tokenByIndex = [];
|
|
2482
|
+
function tokenAt(index) {
|
|
2483
|
+
const cached = tokenByIndex[index];
|
|
2484
|
+
if (cached !== void 0) {
|
|
2485
|
+
return cached;
|
|
2486
|
+
}
|
|
2487
|
+
const fresh = encode(index);
|
|
2488
|
+
tokenByIndex[index] = fresh;
|
|
2489
|
+
return fresh;
|
|
2490
|
+
}
|
|
2491
|
+
function allocateMangleTokens(eligibleClasses, forbiddenTokens) {
|
|
2492
|
+
const map = {};
|
|
2493
|
+
let tokenIndex = 0;
|
|
2494
|
+
for (const className of eligibleClasses) {
|
|
2495
|
+
let token = tokenAt(tokenIndex);
|
|
2496
|
+
while (forbiddenTokens.has(token)) {
|
|
2497
|
+
tokenIndex++;
|
|
2498
|
+
token = tokenAt(tokenIndex);
|
|
2499
|
+
}
|
|
2500
|
+
map[className] = token;
|
|
2501
|
+
tokenIndex++;
|
|
2502
|
+
}
|
|
2503
|
+
return map;
|
|
2504
|
+
}
|
|
2436
2505
|
function isPackagesSkippedSource(id, sourceDirs = []) {
|
|
2437
2506
|
const p = normalizeForMatch(id);
|
|
2438
2507
|
if (p.includes("node_modules")) {
|
|
@@ -2576,6 +2645,9 @@ function rewriteCssWithValidatedGlobalVarPlan(css, filePath, result) {
|
|
|
2576
2645
|
});
|
|
2577
2646
|
return rewrite.css;
|
|
2578
2647
|
}
|
|
2648
|
+
function isCssSyntaxError(error) {
|
|
2649
|
+
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
2650
|
+
}
|
|
2579
2651
|
function assertGlobalVarPlanMatchesEarlyAliases(result, expectedEntries) {
|
|
2580
2652
|
const actualEntries = [...result.plan.aliases.entries()].sort(
|
|
2581
2653
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -2865,6 +2937,14 @@ function scanClassExpression(source, from) {
|
|
|
2865
2937
|
}
|
|
2866
2938
|
return index;
|
|
2867
2939
|
}
|
|
2940
|
+
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2941
|
+
let depth = 0;
|
|
2942
|
+
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2943
|
+
if (templateContent[cursor] === "{") depth++;
|
|
2944
|
+
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2945
|
+
}
|
|
2946
|
+
return templateContent.length;
|
|
2947
|
+
}
|
|
2868
2948
|
function mangleCodeClassesSync(code, mangleMap) {
|
|
2869
2949
|
function mangleClassString(classString) {
|
|
2870
2950
|
return classString.split(/\s+/).filter(Boolean).map((cls) => {
|
|
@@ -2903,14 +2983,6 @@ function mangleCodeClassesSync(code, mangleMap) {
|
|
|
2903
2983
|
changed: mangled !== trimmed
|
|
2904
2984
|
};
|
|
2905
2985
|
}
|
|
2906
|
-
function findTemplateInterpolationEnd(templateContent, bodyStart) {
|
|
2907
|
-
let depth = 0;
|
|
2908
|
-
for (let cursor = bodyStart; cursor < templateContent.length; cursor++) {
|
|
2909
|
-
if (templateContent[cursor] === "{") depth++;
|
|
2910
|
-
else if (templateContent[cursor] === "}" && depth-- === 0) return cursor + 1;
|
|
2911
|
-
}
|
|
2912
|
-
return templateContent.length;
|
|
2913
|
-
}
|
|
2914
2986
|
function mangleTemplateInterpolation(inner) {
|
|
2915
2987
|
let changed = false;
|
|
2916
2988
|
const value = inner.replace(/"([^"]*)"/g, (quoted, classString) => {
|
|
@@ -3402,7 +3474,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3402
3474
|
}
|
|
3403
3475
|
function runBabelFallback(source, effectiveFilename, compilerOptions, error) {
|
|
3404
3476
|
const result = transformSourceCode(source, effectiveFilename, compilerOptions);
|
|
3405
|
-
const reason =
|
|
3477
|
+
const reason = babelFallbackReason(error);
|
|
3406
3478
|
result.diagnostics.push(
|
|
3407
3479
|
`[csszyx] oxc parser fell back to Babel for ${effectiveFilename}: ${reason}`
|
|
3408
3480
|
);
|
|
@@ -3827,18 +3899,15 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3827
3899
|
}
|
|
3828
3900
|
}
|
|
3829
3901
|
function finalizeMangleMap() {
|
|
3830
|
-
const
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
tokenIndex++;
|
|
3840
|
-
}
|
|
3841
|
-
state.mangleMap = newMap;
|
|
3902
|
+
const forbiddenTokens = /* @__PURE__ */ new Set([
|
|
3903
|
+
...mangleReserved,
|
|
3904
|
+
...state.authoredClasses,
|
|
3905
|
+
...state.ownedClasses
|
|
3906
|
+
]);
|
|
3907
|
+
state.mangleMap = allocateMangleTokens(
|
|
3908
|
+
mangleEligibleClasses(state.ownedClasses, state.authoredClasses),
|
|
3909
|
+
forbiddenTokens
|
|
3910
|
+
);
|
|
3842
3911
|
assertVarMangleMapSize(state.varMangleMap, varMangleMapMaxBytes);
|
|
3843
3912
|
state.checksum = compute_mangle_checksum(
|
|
3844
3913
|
createHydrationMangleMap(state.mangleMap, state.varMangleMap)
|
|
@@ -3871,14 +3940,15 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3871
3940
|
if (result.includes(CHECKSUM_PLACEHOLDER)) {
|
|
3872
3941
|
result = result.split(CHECKSUM_PLACEHOLDER).join(state.checksum);
|
|
3873
3942
|
}
|
|
3943
|
+
const isEvalWrapped = result.includes("eval(") && result.includes("sourceURL=webpack");
|
|
3874
3944
|
if (result.includes(MANGLE_MAP_PLACEHOLDER)) {
|
|
3875
3945
|
const jsonMap = escapeJsonForInlineScript(JSON.stringify(state.mangleMap));
|
|
3876
|
-
const escapedMap =
|
|
3946
|
+
const escapedMap = isEvalWrapped ? escapeForDoubleQuotedString(jsonMap) : jsonMap;
|
|
3877
3947
|
result = result.split(MANGLE_MAP_PLACEHOLDER).join(escapedMap);
|
|
3878
3948
|
}
|
|
3879
3949
|
if (result.includes(VAR_MANGLE_MAP_PLACEHOLDER)) {
|
|
3880
3950
|
const jsonMap = escapeJsonForInlineScript(JSON.stringify(state.varMangleMap));
|
|
3881
|
-
const escapedMap =
|
|
3951
|
+
const escapedMap = isEvalWrapped ? escapeForDoubleQuotedString(jsonMap) : jsonMap;
|
|
3882
3952
|
result = result.split(VAR_MANGLE_MAP_PLACEHOLDER).join(escapedMap);
|
|
3883
3953
|
}
|
|
3884
3954
|
return result;
|
|
@@ -4009,6 +4079,18 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4009
4079
|
}
|
|
4010
4080
|
return `import '${THEME_GROUPS_VIRTUAL_ID}';
|
|
4011
4081
|
${transformedCode}`;
|
|
4082
|
+
}
|
|
4083
|
+
const MANGLE_RUNTIME_CONSUMER_RE = /from\s*['"](?:csszyx|@csszyx\/runtime)['"]/;
|
|
4084
|
+
let activeFramework;
|
|
4085
|
+
function injectMangleRuntime(transformedCode, id) {
|
|
4086
|
+
if (activeFramework !== "vite" && activeFramework !== "rollup") {
|
|
4087
|
+
return null;
|
|
4088
|
+
}
|
|
4089
|
+
if (!manglingEnabled || !shouldProcessSource(id) || !MANGLE_RUNTIME_CONSUMER_RE.test(transformedCode) || transformedCode.includes(MANGLE_RUNTIME_VIRTUAL_ID)) {
|
|
4090
|
+
return null;
|
|
4091
|
+
}
|
|
4092
|
+
return insertRuntimeImport(transformedCode, `import '${MANGLE_RUNTIME_VIRTUAL_ID}';
|
|
4093
|
+
`);
|
|
4012
4094
|
}
|
|
4013
4095
|
function collectPreTransformClasses(output) {
|
|
4014
4096
|
if (!output.transformed && !output.code.includes("class=") && !output.code.includes("className=")) {
|
|
@@ -4052,7 +4134,7 @@ ${transformedCode}`;
|
|
|
4052
4134
|
* @returns true only for csszyx virtual modules
|
|
4053
4135
|
*/
|
|
4054
4136
|
loadInclude(id) {
|
|
4055
|
-
return id === RESOLVED_VIRTUAL_MODULE_ID || id === RESOLVED_VIRTUAL_CHECKSUM_ID || id === RESOLVED_THEME_GROUPS_VIRTUAL_ID;
|
|
4137
|
+
return id === RESOLVED_VIRTUAL_MODULE_ID || id === RESOLVED_VIRTUAL_CHECKSUM_ID || id === RESOLVED_THEME_GROUPS_VIRTUAL_ID || id === RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID;
|
|
4056
4138
|
},
|
|
4057
4139
|
/**
|
|
4058
4140
|
* Loads virtual module content — generates mangle map or checksum module code.
|
|
@@ -4073,6 +4155,9 @@ ${transformedCode}`;
|
|
|
4073
4155
|
finalizeMangleMap();
|
|
4074
4156
|
return createChecksumModule(state.checksum);
|
|
4075
4157
|
}
|
|
4158
|
+
if (id === RESOLVED_MANGLE_RUNTIME_VIRTUAL_ID) {
|
|
4159
|
+
return createMangleRuntimeModule(globalVarAliasPrefix);
|
|
4160
|
+
}
|
|
4076
4161
|
if (id === RESOLVED_THEME_GROUPS_VIRTUAL_ID) {
|
|
4077
4162
|
const theme = state.parsedTheme;
|
|
4078
4163
|
return createThemeGroupsModule({
|
|
@@ -4139,6 +4224,11 @@ ${transformedCode}`;
|
|
|
4139
4224
|
output.code = themedCode;
|
|
4140
4225
|
output.transformed = true;
|
|
4141
4226
|
}
|
|
4227
|
+
const mangleRuntimeCode = injectMangleRuntime(output.code, id);
|
|
4228
|
+
if (mangleRuntimeCode !== null) {
|
|
4229
|
+
output.code = mangleRuntimeCode;
|
|
4230
|
+
output.transformed = true;
|
|
4231
|
+
}
|
|
4142
4232
|
if (matchesScriptExtension(id, SCRIPT_ID_EXTENSIONS)) {
|
|
4143
4233
|
assertNoRSCBoundaryViolation(output.code, id);
|
|
4144
4234
|
const record = createRSCModuleRecord(output.code, id);
|
|
@@ -4159,9 +4249,7 @@ ${transformedCode}`;
|
|
|
4159
4249
|
emitWarning(missingTailwindEntryMessage(state.ownedClasses.size));
|
|
4160
4250
|
}
|
|
4161
4251
|
if (!state.contentScopeWarningEmitted && options.contentScopeCheck !== false && state.sawTailwindEntry && !state.tailwindEntryScoped) {
|
|
4162
|
-
|
|
4163
|
-
state.inMonorepo = isMonorepoPackage(state.rootDir);
|
|
4164
|
-
}
|
|
4252
|
+
state.inMonorepo ??= isMonorepoPackage(state.rootDir);
|
|
4165
4253
|
if (shouldWarnUnscopedMonorepo(
|
|
4166
4254
|
state.sawTailwindEntry,
|
|
4167
4255
|
state.tailwindEntryScoped,
|
|
@@ -4204,6 +4292,10 @@ ${transformedCode}`;
|
|
|
4204
4292
|
* @param compiler - the Webpack compiler instance
|
|
4205
4293
|
*/
|
|
4206
4294
|
webpack(compiler) {
|
|
4295
|
+
activeFramework = "webpack";
|
|
4296
|
+
if (compiler.options?.mode === "development") {
|
|
4297
|
+
manglingEnabled = false;
|
|
4298
|
+
}
|
|
4207
4299
|
compiler.hooks.beforeCompile.tap("csszyx:prescan", () => {
|
|
4208
4300
|
announceActiveParser();
|
|
4209
4301
|
const root = compiler.context || process.cwd();
|
|
@@ -4224,6 +4316,12 @@ ${transformedCode}`;
|
|
|
4224
4316
|
});
|
|
4225
4317
|
}
|
|
4226
4318
|
},
|
|
4319
|
+
rollup: {
|
|
4320
|
+
/** Records the rollup lane for the mangle-runtime gate. */
|
|
4321
|
+
buildStart() {
|
|
4322
|
+
activeFramework = "rollup";
|
|
4323
|
+
}
|
|
4324
|
+
},
|
|
4227
4325
|
vite: {
|
|
4228
4326
|
/**
|
|
4229
4327
|
* Vite hook: pre-scans source files when config is resolved.
|
|
@@ -4231,6 +4329,7 @@ ${transformedCode}`;
|
|
|
4231
4329
|
* @param config - the resolved Vite configuration object
|
|
4232
4330
|
*/
|
|
4233
4331
|
configResolved(config) {
|
|
4332
|
+
activeFramework = "vite";
|
|
4234
4333
|
announceActiveParser();
|
|
4235
4334
|
const root = config.root || process.cwd();
|
|
4236
4335
|
state.rootDir = root;
|
|
@@ -4386,9 +4485,6 @@ ${transformedCode}`;
|
|
|
4386
4485
|
}
|
|
4387
4486
|
return manifest;
|
|
4388
4487
|
}
|
|
4389
|
-
function isCssSyntaxError(error) {
|
|
4390
|
-
return !!error && typeof error === "object" && "name" in error && error.name === "CssSyntaxError";
|
|
4391
|
-
}
|
|
4392
4488
|
function rewriteOutputCss(source, file, shouldMangle, mangledSources, externalClasses) {
|
|
4393
4489
|
let css = rewriteCssWithValidatedGlobalVarPlan(
|
|
4394
4490
|
source,
|
|
@@ -4600,4 +4696,4 @@ const esbuildPlugin = (options = {}) => {
|
|
|
4600
4696
|
};
|
|
4601
4697
|
};
|
|
4602
4698
|
|
|
4603
|
-
export {
|
|
4699
|
+
export { validateGlobalVarAliasInputs as $, isMonorepoPackage as A, isPackagesSkippedSource as B, isRSCServerModule as C, isTailwindReservedGlobalVar as D, mangleCodeClassesSync as E, mangleEligibleClasses as F, mangleHybridHazardMessage as G, mergeThemes as H, missingTailwindEntryMessage as I, normalizeGlobalVarAliasesForCache as J, parseThemeBlocks as K, planGlobalVarAliases as L, readGlobalVarScanCache as M, recordGlobalVarSourceFile as N, resolveCompileSourceDirs as O, resolveGlobalVarScanCacheDir as P, resolveNativeCacheIdentity as Q, rewriteGlobalVarCssAliases as R, rollupPlugin as S, scanCustomPropertyNames as T, scanGlobalVarCss as U, shouldEmitWarning as V, shouldTrackGlobalVarSources as W, shouldWarnMissingTailwindEntry as X, shouldWarnUnscopedMonorepo as Y, skippedSzFilesMessage as Z, unscopedMonorepoMessage as _, allocateMangleTokens as a, vitePlugin as a0, webpackPlugin as a1, writeGlobalVarScanCache as a2, appendTailwindSourceDirective as b, assertNoRSCBoundaryViolation as c, assertNoRSCGraphViolation as d, collectMangleHybridHazards as e, computeSafelistRelPath as f, createGlobalVarAliasValidationOptions as g, createGlobalVarMapAssetSource as h, createGlobalVarScanCacheKey as i, createRSCModuleRecord as j, cssHasContentScope as k, cssImportsTailwind as l, deleteRSCModuleRecord as m, esbuildPlugin as n, extractGlobalVarAliasesForManifest as o, fileMayContainSafelistableSz as p, findLocalImportSources as q, findRSCBoundaryViolation as r, findRSCGraphViolation as s, hasInjectableTailwindCandidate as t, unplugin as u, hasTokens as v, hasUseClientDirective as w, hasUseServerDirective as x, isCompileSourceOptedIn as y, isHardIgnoredPath as z };
|
|
@@ -725,6 +725,20 @@ declare function fileMayContainSafelistableSz(content: string): boolean;
|
|
|
725
725
|
* @returns Owned classes with hybrid raw consumers removed.
|
|
726
726
|
*/
|
|
727
727
|
declare function mangleEligibleClasses(ownedClasses: ReadonlySet<string>, authoredClasses: ReadonlySet<string>): string[];
|
|
728
|
+
/**
|
|
729
|
+
* Allocate a short token per eligible class, skipping forbidden names.
|
|
730
|
+
*
|
|
731
|
+
* The forbidden set carries `mangleExclude`, every authored class, AND every
|
|
732
|
+
* owned class name. Reserving the owned names keeps the map's key space and
|
|
733
|
+
* token space disjoint, which is what lets a runtime consumer resolve a token
|
|
734
|
+
* with one map lookup: a string that is a map key is always an original class,
|
|
735
|
+
* never a token some other class was mangled to.
|
|
736
|
+
*
|
|
737
|
+
* @param eligibleClasses Classes to mangle, in stable sorted order.
|
|
738
|
+
* @param forbiddenTokens Names the allocator must never emit as a token.
|
|
739
|
+
* @returns The class → token map.
|
|
740
|
+
*/
|
|
741
|
+
declare function allocateMangleTokens(eligibleClasses: readonly string[], forbiddenTokens: ReadonlySet<string>): Record<string, string>;
|
|
728
742
|
/**
|
|
729
743
|
* Whether a file is workspace-package source that csszyx skipped only because it
|
|
730
744
|
* lives under `/packages/` and is not under any opted-in `compileSources`
|
|
@@ -855,5 +869,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
855
869
|
*/
|
|
856
870
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
857
871
|
|
|
858
|
-
export {
|
|
872
|
+
export { mangleHybridHazardMessage as $, cssImportsTailwind as A, unplugin as B, deleteRSCModuleRecord as D, esbuildPlugin as E, extractGlobalVarAliasesForManifest as F, fileMayContainSafelistableSz as H, findLocalImportSources as I, findRSCBoundaryViolation as J, findRSCGraphViolation as K, hasInjectableTailwindCandidate as L, hasTokens as N, hasUseClientDirective as O, hasUseServerDirective as Q, isCompileSourceOptedIn as T, isHardIgnoredPath as U, isMonorepoPackage as W, isPackagesSkippedSource as X, isRSCServerModule as Y, mangleCodeClassesSync as Z, mangleEligibleClasses as _, mergeThemes as a0, missingTailwindEntryMessage as a1, normalizeGlobalVarAliasesForCache as a2, parseThemeBlocks as a3, recordGlobalVarSourceFile as a4, resolveCompileSourceDirs as a5, resolveNativeCacheIdentity as a6, rollupPlugin as a7, scanCustomPropertyNames as a8, shouldEmitWarning as a9, shouldTrackGlobalVarSources as aa, shouldWarnMissingTailwindEntry as ab, shouldWarnUnscopedMonorepo as ac, skippedSzFilesMessage as ad, unscopedMonorepoMessage as ae, vitePlugin as af, webpackPlugin as ag, 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 };
|
|
859
873
|
export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, RewriteGlobalVarCssAliasesOptions as R, ScanGlobalVarCssOptions as S, ValidateGlobalVarAliasInputsOptions as V, GlobalVarAliasPlan as a, GlobalVarCssAliasRewriteResult as b, CreateGlobalVarAliasValidationOptionsInput as c, GlobalVarAliasValidationResult as d, CssVarDefinition as e, CssVarLocation as f, CssVarReference as g, GlobalVarAliasDiagnostic as h, GlobalVarAliasDiagnosticSeverity as i, GlobalVarAliasEntry as j, GlobalVarCodeSource as k, GlobalVarCssAssetSource as l, GlobalVarCssSource as m, GlobalVarScanCacheEntry as n, ParsedTheme as o, RSCBoundaryViolation as p, RSCModuleRecord as q };
|