@csszyx/unplugin 0.10.12 → 0.11.0
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 +6 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/dist/next-prebuild.cjs +2 -2
- package/dist/next-prebuild.mjs +2 -2
- package/dist/next-turbo-loader.cjs +10 -8
- package/dist/next-turbo-loader.mjs +10 -8
- package/dist/shared/unplugin.B3RHYokB.mjs +29 -0
- package/dist/shared/{unplugin.B45ZkNXD.mjs → unplugin.B3cvNxnk.mjs} +1 -1
- package/dist/shared/{unplugin.DO7Y2Y-X.mjs → unplugin.BS60onPk.mjs} +325 -74
- package/dist/shared/{unplugin.CGqFVGlB.mjs → unplugin.ByzV6iZE.mjs} +5 -1
- package/dist/shared/{unplugin.Bh2aAL4a.cjs → unplugin.CBKZoxQ1.cjs} +1 -1
- package/dist/shared/{unplugin.CoiN0OSE.cjs → unplugin.CP2cz9bA.cjs} +327 -74
- package/dist/shared/{unplugin.D32Rb29j.cjs → unplugin.D0N9bprz.cjs} +5 -1
- package/dist/shared/{unplugin.D3qsS8Pe.d.cts → unplugin.PhOFTQpB.d.cts} +31 -1
- package/dist/shared/{unplugin.D3qsS8Pe.d.mts → unplugin.PhOFTQpB.d.mts} +31 -1
- package/dist/shared/unplugin.Rov-j_Wm.cjs +32 -0
- package/dist/vite.cjs +4 -3
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +4 -3
- package/dist/webpack.cjs +4 -3
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +4 -3
- package/package.json +8 -7
|
@@ -310,6 +310,21 @@ declare function assertNoRSCGraphViolation(records: Map<string, RSCModuleRecord>
|
|
|
310
310
|
* @param id module ID/path
|
|
311
311
|
*/
|
|
312
312
|
declare function assertNoRSCBoundaryViolation(code: string, id: string): void;
|
|
313
|
+
/**
|
|
314
|
+
* Finds relative static, re-export, and dynamic imports.
|
|
315
|
+
*
|
|
316
|
+
* @param code module source
|
|
317
|
+
* @returns local import specifiers
|
|
318
|
+
*/
|
|
319
|
+
/**
|
|
320
|
+
* Extract relative/absolute local module specifiers from `code`. Exported for
|
|
321
|
+
* the linear-scan equivalence test; the module graph consumes it via
|
|
322
|
+
* {@link createRSCModuleRecord}.
|
|
323
|
+
*
|
|
324
|
+
* @param code - Module source.
|
|
325
|
+
* @returns Local (`.`/`/`) import specifiers, in the legacy pass order.
|
|
326
|
+
*/
|
|
327
|
+
declare function findLocalImportSources(code: string): string[];
|
|
313
328
|
|
|
314
329
|
/**
|
|
315
330
|
* Theme Scanner — parses Tailwind v4 @theme blocks from CSS files.
|
|
@@ -364,6 +379,21 @@ declare function mergeThemes(themes: ParsedTheme[]): ParsedTheme;
|
|
|
364
379
|
* @returns True if at least one category has tokens
|
|
365
380
|
*/
|
|
366
381
|
declare function hasTokens(theme: ParsedTheme): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Yield the NAME of every `--name: value;` / `--name;` custom-property
|
|
384
|
+
* declaration in `block`, exactly as `/--([a-z][a-z0-9-]*)(?:\s*:[^;]+)?;/g`
|
|
385
|
+
* captured group 1 — including its terminator rules (a value, when present,
|
|
386
|
+
* must be non-empty and end at a `;`; otherwise the `;` follows the name
|
|
387
|
+
* directly). Linear: each `--` is examined once, with a single forward scan to
|
|
388
|
+
* the terminating `;`, so a `;`-less block can no longer drive the quadratic
|
|
389
|
+
* `[^;]+` re-scan.
|
|
390
|
+
*
|
|
391
|
+
* Exported for the equivalence test.
|
|
392
|
+
*
|
|
393
|
+
* @param block - The inside of a `@theme { … }` block.
|
|
394
|
+
* @returns The declared custom-property names, in source order.
|
|
395
|
+
*/
|
|
396
|
+
declare function scanCustomPropertyNames(block: string): string[];
|
|
367
397
|
|
|
368
398
|
/**
|
|
369
399
|
* Plugin state for mangle map management.
|
|
@@ -806,5 +836,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
806
836
|
*/
|
|
807
837
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
808
838
|
|
|
809
|
-
export {
|
|
839
|
+
export { missingTailwindEntryMessage as $, unplugin as A, deleteRSCModuleRecord as B, esbuildPlugin as D, extractGlobalVarAliasesForManifest as E, fileMayContainSafelistableSz as F, findLocalImportSources as H, findRSCBoundaryViolation as I, findRSCGraphViolation as J, hasInjectableTailwindCandidate as K, hasTokens as L, hasUseClientDirective as N, hasUseServerDirective as O, isCompileSourceOptedIn as Q, isHardIgnoredPath as T, isMonorepoPackage as U, isPackagesSkippedSource as W, isRSCServerModule as X, mangleCodeClassesSync as Y, mangleHybridHazardMessage as Z, mergeThemes as _, normalizeGlobalVarAliasesForCache as a0, parseThemeBlocks as a1, recordGlobalVarSourceFile as a2, resolveCompileSourceDirs as a3, resolveNativeCacheIdentity as a4, rollupPlugin as a5, scanCustomPropertyNames as a6, shouldEmitWarning as a7, shouldTrackGlobalVarSources as a8, shouldWarnMissingTailwindEntry as a9, shouldWarnUnscopedMonorepo as aa, skippedSzFilesMessage as ab, unscopedMonorepoMessage as ac, vitePlugin as ad, webpackPlugin as ae, appendTailwindSourceDirective as r, assertNoRSCBoundaryViolation as s, assertNoRSCGraphViolation as t, collectMangleHybridHazards as u, computeSafelistRelPath as v, createGlobalVarMapAssetSource as w, createRSCModuleRecord as x, cssHasContentScope as y, cssImportsTailwind as z };
|
|
810
840
|
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 };
|
|
@@ -310,6 +310,21 @@ declare function assertNoRSCGraphViolation(records: Map<string, RSCModuleRecord>
|
|
|
310
310
|
* @param id module ID/path
|
|
311
311
|
*/
|
|
312
312
|
declare function assertNoRSCBoundaryViolation(code: string, id: string): void;
|
|
313
|
+
/**
|
|
314
|
+
* Finds relative static, re-export, and dynamic imports.
|
|
315
|
+
*
|
|
316
|
+
* @param code module source
|
|
317
|
+
* @returns local import specifiers
|
|
318
|
+
*/
|
|
319
|
+
/**
|
|
320
|
+
* Extract relative/absolute local module specifiers from `code`. Exported for
|
|
321
|
+
* the linear-scan equivalence test; the module graph consumes it via
|
|
322
|
+
* {@link createRSCModuleRecord}.
|
|
323
|
+
*
|
|
324
|
+
* @param code - Module source.
|
|
325
|
+
* @returns Local (`.`/`/`) import specifiers, in the legacy pass order.
|
|
326
|
+
*/
|
|
327
|
+
declare function findLocalImportSources(code: string): string[];
|
|
313
328
|
|
|
314
329
|
/**
|
|
315
330
|
* Theme Scanner — parses Tailwind v4 @theme blocks from CSS files.
|
|
@@ -364,6 +379,21 @@ declare function mergeThemes(themes: ParsedTheme[]): ParsedTheme;
|
|
|
364
379
|
* @returns True if at least one category has tokens
|
|
365
380
|
*/
|
|
366
381
|
declare function hasTokens(theme: ParsedTheme): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Yield the NAME of every `--name: value;` / `--name;` custom-property
|
|
384
|
+
* declaration in `block`, exactly as `/--([a-z][a-z0-9-]*)(?:\s*:[^;]+)?;/g`
|
|
385
|
+
* captured group 1 — including its terminator rules (a value, when present,
|
|
386
|
+
* must be non-empty and end at a `;`; otherwise the `;` follows the name
|
|
387
|
+
* directly). Linear: each `--` is examined once, with a single forward scan to
|
|
388
|
+
* the terminating `;`, so a `;`-less block can no longer drive the quadratic
|
|
389
|
+
* `[^;]+` re-scan.
|
|
390
|
+
*
|
|
391
|
+
* Exported for the equivalence test.
|
|
392
|
+
*
|
|
393
|
+
* @param block - The inside of a `@theme { … }` block.
|
|
394
|
+
* @returns The declared custom-property names, in source order.
|
|
395
|
+
*/
|
|
396
|
+
declare function scanCustomPropertyNames(block: string): string[];
|
|
367
397
|
|
|
368
398
|
/**
|
|
369
399
|
* Plugin state for mangle map management.
|
|
@@ -806,5 +836,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
806
836
|
*/
|
|
807
837
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
808
838
|
|
|
809
|
-
export {
|
|
839
|
+
export { missingTailwindEntryMessage as $, unplugin as A, deleteRSCModuleRecord as B, esbuildPlugin as D, extractGlobalVarAliasesForManifest as E, fileMayContainSafelistableSz as F, findLocalImportSources as H, findRSCBoundaryViolation as I, findRSCGraphViolation as J, hasInjectableTailwindCandidate as K, hasTokens as L, hasUseClientDirective as N, hasUseServerDirective as O, isCompileSourceOptedIn as Q, isHardIgnoredPath as T, isMonorepoPackage as U, isPackagesSkippedSource as W, isRSCServerModule as X, mangleCodeClassesSync as Y, mangleHybridHazardMessage as Z, mergeThemes as _, normalizeGlobalVarAliasesForCache as a0, parseThemeBlocks as a1, recordGlobalVarSourceFile as a2, resolveCompileSourceDirs as a3, resolveNativeCacheIdentity as a4, rollupPlugin as a5, scanCustomPropertyNames as a6, shouldEmitWarning as a7, shouldTrackGlobalVarSources as a8, shouldWarnMissingTailwindEntry as a9, shouldWarnUnscopedMonorepo as aa, skippedSzFilesMessage as ab, unscopedMonorepoMessage as ac, vitePlugin as ad, webpackPlugin as ae, appendTailwindSourceDirective as r, assertNoRSCBoundaryViolation as s, assertNoRSCGraphViolation as t, collectMangleHybridHazards as u, computeSafelistRelPath as v, createGlobalVarMapAssetSource as w, createRSCModuleRecord as x, cssHasContentScope as y, cssImportsTailwind as z };
|
|
810
840
|
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 };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const RUNTIME_IMPORT_CLAUSE_RE = /(?:import|export)\s+\{([^{}]*)\}\s*from\s*['"]@csszyx\/runtime['"]/g;
|
|
4
|
+
function clauseNames(clauseBody) {
|
|
5
|
+
const names = [];
|
|
6
|
+
for (const part of clauseBody.split(",")) {
|
|
7
|
+
const trimmed = part.trim();
|
|
8
|
+
if (!trimmed) {
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
const spaceAt = trimmed.search(/\s/);
|
|
12
|
+
names.push(spaceAt === -1 ? trimmed : trimmed.slice(0, spaceAt));
|
|
13
|
+
}
|
|
14
|
+
return names;
|
|
15
|
+
}
|
|
16
|
+
function importsRuntimeHelper(code, helper) {
|
|
17
|
+
RUNTIME_IMPORT_CLAUSE_RE.lastIndex = 0;
|
|
18
|
+
for (let match = RUNTIME_IMPORT_CLAUSE_RE.exec(code); match; match = RUNTIME_IMPORT_CLAUSE_RE.exec(code)) {
|
|
19
|
+
if (clauseNames(match[1]).includes(helper)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const RUNTIME_IMPORT_APPEND_RE = /(import\s+\{[^{}]*)\}\s*from\s*['"]@csszyx\/runtime['"]/;
|
|
26
|
+
function findRuntimeImportClause(code) {
|
|
27
|
+
const match = RUNTIME_IMPORT_APPEND_RE.exec(code);
|
|
28
|
+
return match ? { statement: match[0], prefixWithBody: match[1] } : null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.findRuntimeImportClause = findRuntimeImportClause;
|
|
32
|
+
exports.importsRuntimeHelper = importsRuntimeHelper;
|
package/dist/vite.cjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const unplugin = require('./shared/unplugin.
|
|
5
|
+
const unplugin = require('./shared/unplugin.CP2cz9bA.cjs');
|
|
6
|
+
require('node:crypto');
|
|
6
7
|
require('node:fs');
|
|
7
8
|
require('node:module');
|
|
8
9
|
require('node:path');
|
|
@@ -19,8 +20,8 @@ require('./css-mangler.cjs');
|
|
|
19
20
|
require('postcss');
|
|
20
21
|
require('postcss-selector-parser');
|
|
21
22
|
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
22
|
-
require('
|
|
23
|
-
require('./shared/unplugin.
|
|
23
|
+
require('./shared/unplugin.Rov-j_Wm.cjs');
|
|
24
|
+
require('./shared/unplugin.D0N9bprz.cjs');
|
|
24
25
|
require('postcss-value-parser');
|
|
25
26
|
|
|
26
27
|
|
package/dist/vite.d.cts
CHANGED
package/dist/vite.d.mts
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as vitePlugin } from './shared/unplugin.BS60onPk.mjs';
|
|
2
|
+
import 'node:crypto';
|
|
2
3
|
import 'node:fs';
|
|
3
4
|
import 'node:module';
|
|
4
5
|
import 'node:path';
|
|
@@ -15,8 +16,8 @@ import './css-mangler.mjs';
|
|
|
15
16
|
import 'postcss';
|
|
16
17
|
import 'postcss-selector-parser';
|
|
17
18
|
import './shared/unplugin.B1mblcm-.mjs';
|
|
18
|
-
import '
|
|
19
|
-
import './shared/unplugin.
|
|
19
|
+
import './shared/unplugin.B3RHYokB.mjs';
|
|
20
|
+
import './shared/unplugin.ByzV6iZE.mjs';
|
|
20
21
|
import 'postcss-value-parser';
|
|
21
22
|
|
|
22
23
|
|
package/dist/webpack.cjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const unplugin = require('./shared/unplugin.
|
|
5
|
+
const unplugin = require('./shared/unplugin.CP2cz9bA.cjs');
|
|
6
|
+
require('node:crypto');
|
|
6
7
|
require('node:fs');
|
|
7
8
|
require('node:module');
|
|
8
9
|
require('node:path');
|
|
@@ -19,8 +20,8 @@ require('./css-mangler.cjs');
|
|
|
19
20
|
require('postcss');
|
|
20
21
|
require('postcss-selector-parser');
|
|
21
22
|
require('./shared/unplugin.BCwRIUs_.cjs');
|
|
22
|
-
require('
|
|
23
|
-
require('./shared/unplugin.
|
|
23
|
+
require('./shared/unplugin.Rov-j_Wm.cjs');
|
|
24
|
+
require('./shared/unplugin.D0N9bprz.cjs');
|
|
24
25
|
require('postcss-value-parser');
|
|
25
26
|
|
|
26
27
|
|
package/dist/webpack.d.cts
CHANGED
package/dist/webpack.d.mts
CHANGED
package/dist/webpack.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as webpackPlugin } from './shared/unplugin.BS60onPk.mjs';
|
|
2
|
+
import 'node:crypto';
|
|
2
3
|
import 'node:fs';
|
|
3
4
|
import 'node:module';
|
|
4
5
|
import 'node:path';
|
|
@@ -15,8 +16,8 @@ import './css-mangler.mjs';
|
|
|
15
16
|
import 'postcss';
|
|
16
17
|
import 'postcss-selector-parser';
|
|
17
18
|
import './shared/unplugin.B1mblcm-.mjs';
|
|
18
|
-
import '
|
|
19
|
-
import './shared/unplugin.
|
|
19
|
+
import './shared/unplugin.B3RHYokB.mjs';
|
|
20
|
+
import './shared/unplugin.ByzV6iZE.mjs';
|
|
20
21
|
import 'postcss-value-parser';
|
|
21
22
|
|
|
22
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/unplugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Vite and Webpack integration for csszyx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"csszyx",
|
|
@@ -117,16 +117,17 @@
|
|
|
117
117
|
"postcss-value-parser": "^4.2.0",
|
|
118
118
|
"proper-lockfile": "^4.1.2",
|
|
119
119
|
"unplugin": "^1.10.1",
|
|
120
|
-
"@csszyx/
|
|
121
|
-
"@csszyx/core": "0.
|
|
122
|
-
"@csszyx/
|
|
123
|
-
"@csszyx/
|
|
124
|
-
"@csszyx/
|
|
120
|
+
"@csszyx/svelte-adapter": "0.11.0",
|
|
121
|
+
"@csszyx/core": "0.11.0",
|
|
122
|
+
"@csszyx/types": "0.11.0",
|
|
123
|
+
"@csszyx/vue-adapter": "0.11.0",
|
|
124
|
+
"@csszyx/compiler": "0.11.0"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
|
-
"@csszyx/runtime": "^0.
|
|
127
|
+
"@csszyx/runtime": "^0.11.0"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
|
+
"@tailwindcss/node": "4.3.2",
|
|
130
131
|
"@types/node": "^20.11.0",
|
|
131
132
|
"@types/proper-lockfile": "^4.1.4",
|
|
132
133
|
"esbuild": "^0.28.1",
|