@csszyx/unplugin 0.16.0 → 0.17.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/README.md +1 -1
- package/dist/index.cjs +7 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +6 -4
- package/dist/jest-transform.cjs +186 -0
- package/dist/jest-transform.d.cts +112 -0
- package/dist/jest-transform.d.mts +110 -0
- package/dist/jest-transform.mjs +175 -0
- package/dist/next-prebuild.cjs +6 -5
- package/dist/next-prebuild.mjs +5 -4
- package/dist/next-turbo-loader.cjs +10 -8
- package/dist/next-turbo-loader.mjs +7 -5
- package/dist/next-watcher.cjs +3 -2
- package/dist/next-watcher.mjs +3 -2
- package/dist/shared/{unplugin.J6ue_lRJ.cjs → unplugin.2qOISpzl.cjs} +1 -114
- package/dist/shared/{unplugin.C-oQU1jl.mjs → unplugin.2uf-U76p.mjs} +1 -1
- package/dist/shared/{unplugin.Ceq-N4jI.mjs → unplugin.995yC_cN.mjs} +2 -110
- package/dist/shared/{unplugin.D3yBoTHP.cjs → unplugin.9zs6T4Gf.cjs} +75 -66
- package/dist/shared/{unplugin.PKo7wFzu.d.cts → unplugin.BO2_hyS3.d.cts} +38 -5
- package/dist/shared/{unplugin.DH_ij6cf.mjs → unplugin.Ba3O1r8M.mjs} +2 -6
- package/dist/shared/unplugin.BqKLlo1h.cjs +8 -0
- package/dist/shared/{unplugin.Vn9x8SBP.mjs → unplugin.C3bgc29e.mjs} +3 -2
- package/dist/shared/{unplugin.Dx0ngYWw.mjs → unplugin.Cs4H9z9v.mjs} +48 -40
- package/dist/shared/{unplugin.BLptVbUe.mjs → unplugin.DPSQP5XG.mjs} +1 -1
- package/dist/shared/{unplugin.DDSWQJYX.cjs → unplugin.DS6CFjim.cjs} +3 -8
- package/dist/shared/{unplugin.gksolKh2.cjs → unplugin.DXzIP7lP.cjs} +5 -4
- package/dist/shared/unplugin.DcXM9sq5.mjs +109 -0
- package/dist/shared/unplugin.Defu9wGh.cjs +115 -0
- package/dist/shared/{unplugin.Bu2rzRtv.d.mts → unplugin.DptK3pl4.d.mts} +38 -5
- package/dist/shared/{unplugin.BzF0V2kw.cjs → unplugin.YcnV3Izb.cjs} +6 -6
- package/dist/shared/{unplugin.BWnmKv07.cjs → unplugin.alhYXymJ.cjs} +1 -1
- package/dist/shared/unplugin.wMeicb6E.mjs +6 -0
- package/dist/vite.cjs +6 -4
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +6 -4
- package/dist/webpack.cjs +6 -4
- package/dist/webpack.d.cts +1 -2
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +6 -4
- package/package.json +19 -9
|
@@ -13,10 +13,12 @@ const svelteAdapter = require('@csszyx/svelte-adapter');
|
|
|
13
13
|
const types = require('@csszyx/types');
|
|
14
14
|
const vueAdapter = require('@csszyx/vue-adapter');
|
|
15
15
|
const unplugin$1 = require('unplugin');
|
|
16
|
-
const safelistSource = require('./unplugin.
|
|
17
|
-
const transformCache = require('./unplugin.
|
|
16
|
+
const safelistSource = require('./unplugin.DS6CFjim.cjs');
|
|
17
|
+
const transformCache = require('./unplugin.YcnV3Izb.cjs');
|
|
18
18
|
const cssMangler = require('../css-mangler.cjs');
|
|
19
|
-
const
|
|
19
|
+
const nextRuntimeInjection = require('./unplugin.Defu9wGh.cjs');
|
|
20
|
+
const pathNormalization = require('./unplugin.BqKLlo1h.cjs');
|
|
21
|
+
const themeGroupsFile = require('./unplugin.2qOISpzl.cjs');
|
|
20
22
|
const node_zlib = require('node:zlib');
|
|
21
23
|
const postcss = require('postcss');
|
|
22
24
|
const valueParser = require('postcss-value-parser');
|
|
@@ -543,8 +545,8 @@ function createRSCModuleRecord(code, id) {
|
|
|
543
545
|
}
|
|
544
546
|
function deleteRSCModuleRecord(records, id) {
|
|
545
547
|
const normalized = normalizeModuleId(id);
|
|
546
|
-
const clean =
|
|
547
|
-
const resolved =
|
|
548
|
+
const clean = pathNormalization.normalizePathSeparators(id.split("?")[0] ?? id);
|
|
549
|
+
const resolved = pathNormalization.normalizePathSeparators(path__namespace.resolve(clean));
|
|
548
550
|
pruneRSCModulePathCaches(/* @__PURE__ */ new Set([normalized, resolved, clean]));
|
|
549
551
|
let deleted = records.delete(normalized);
|
|
550
552
|
if (resolved !== normalized) {
|
|
@@ -590,7 +592,7 @@ const APP_ROUTER_ENTRIES = /* @__PURE__ */ new Set([
|
|
|
590
592
|
"route"
|
|
591
593
|
]);
|
|
592
594
|
function isNextAppRouterEntry(id) {
|
|
593
|
-
const clean =
|
|
595
|
+
const clean = pathNormalization.normalizePathSeparators(id.split("?")[0] ?? id);
|
|
594
596
|
if (!clean.includes("/app/") && !clean.startsWith("app/")) return false;
|
|
595
597
|
const basename = clean.split("/").pop() ?? "";
|
|
596
598
|
const dotIdx = basename.indexOf(".");
|
|
@@ -945,9 +947,9 @@ function normalizeModuleId(id) {
|
|
|
945
947
|
}
|
|
946
948
|
let normalized;
|
|
947
949
|
try {
|
|
948
|
-
normalized =
|
|
950
|
+
normalized = pathNormalization.normalizePathSeparators(fs__namespace.realpathSync.native(clean));
|
|
949
951
|
} catch {
|
|
950
|
-
normalized =
|
|
952
|
+
normalized = pathNormalization.normalizePathSeparators(path__namespace.resolve(clean));
|
|
951
953
|
}
|
|
952
954
|
normalizedModuleIdCache.set(clean, normalized);
|
|
953
955
|
return normalized;
|
|
@@ -993,7 +995,7 @@ function resolveLocalModule(importer, source) {
|
|
|
993
995
|
}
|
|
994
996
|
function pruneRSCModulePathCaches(moduleIds) {
|
|
995
997
|
for (const [key, value] of normalizedModuleIdCache) {
|
|
996
|
-
const normalizedKey =
|
|
998
|
+
const normalizedKey = pathNormalization.normalizePathSeparators(key);
|
|
997
999
|
if (moduleIds.has(value) || moduleIds.has(normalizedKey)) {
|
|
998
1000
|
normalizedModuleIdCache.delete(key);
|
|
999
1001
|
}
|
|
@@ -1621,10 +1623,10 @@ An unread option is silent, so whatever you configured it for is not happening.`
|
|
|
1621
1623
|
const GLOB_MAGIC_RE = /[*?[\]{}]/;
|
|
1622
1624
|
const DEFAULT_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", ".next", ".turbo", "dist", "build"]);
|
|
1623
1625
|
function normalizeFileId(id) {
|
|
1624
|
-
return
|
|
1626
|
+
return pathNormalization.normalizePathSeparators(id.split(/[?#]/, 1)[0]);
|
|
1625
1627
|
}
|
|
1626
1628
|
function normalizeRoot(rootDir) {
|
|
1627
|
-
return
|
|
1629
|
+
return pathNormalization.normalizePathSeparators(path__namespace.resolve(rootDir));
|
|
1628
1630
|
}
|
|
1629
1631
|
function hasGlobMagic(pattern) {
|
|
1630
1632
|
return GLOB_MAGIC_RE.test(pattern);
|
|
@@ -1633,7 +1635,7 @@ function escapeRegExp(ch) {
|
|
|
1633
1635
|
return /[|\\{}()[\]^$+?.]/.test(ch) ? `\\${ch}` : ch;
|
|
1634
1636
|
}
|
|
1635
1637
|
function globToRegExp(pattern) {
|
|
1636
|
-
const normalized =
|
|
1638
|
+
const normalized = pathNormalization.normalizePathSeparators(pattern);
|
|
1637
1639
|
let out = "^";
|
|
1638
1640
|
for (let i = 0; i < normalized.length; i++) {
|
|
1639
1641
|
const ch = normalized[i];
|
|
@@ -1656,7 +1658,7 @@ function globToRegExp(pattern) {
|
|
|
1656
1658
|
function relativeToRoot(file, rootDir) {
|
|
1657
1659
|
const root = normalizeRoot(rootDir);
|
|
1658
1660
|
const normalizedFile = normalizeFileId(file);
|
|
1659
|
-
return
|
|
1661
|
+
return pathNormalization.normalizePathSeparators(path__namespace.posix.relative(root, normalizedFile));
|
|
1660
1662
|
}
|
|
1661
1663
|
function matchesPattern(id, pattern, rootDir) {
|
|
1662
1664
|
const file = normalizeFileId(id);
|
|
@@ -1665,7 +1667,7 @@ function matchesPattern(id, pattern, rootDir) {
|
|
|
1665
1667
|
pattern.lastIndex = 0;
|
|
1666
1668
|
return pattern.test(file) || pattern.test(relative);
|
|
1667
1669
|
}
|
|
1668
|
-
const normalizedPattern =
|
|
1670
|
+
const normalizedPattern = pathNormalization.normalizePathSeparators(pattern);
|
|
1669
1671
|
if (hasGlobMagic(normalizedPattern)) {
|
|
1670
1672
|
const re = globToRegExp(normalizedPattern);
|
|
1671
1673
|
return re.test(file) || re.test(relative);
|
|
@@ -1801,24 +1803,10 @@ function injectMangleMapScript(html, mangleMap, options = {}) {
|
|
|
1801
1803
|
const scriptTag = `<script id="__CSSZYX_MANGLE_MAP__" type="application/json">${safeJsonForScriptTag(checksumMap, prettyPrint)}<\/script>`;
|
|
1802
1804
|
return withScriptTag(html, scriptTag);
|
|
1803
1805
|
}
|
|
1804
|
-
function injectMangleMapAttribute(html, mangleMap, minify = false, varMangleMap = {}) {
|
|
1805
|
-
const attrName = minify ? "data-sz-m" : "data-sz-map";
|
|
1806
|
-
const jsonContent = JSON.stringify(createHydrationMangleMap(mangleMap, varMangleMap));
|
|
1807
|
-
return injectHtmlOpeningAttr(html, ` ${attrName}='${jsonContent}'`);
|
|
1808
|
-
}
|
|
1809
1806
|
function injectHydrationData(html, mangleMap, checksum, options = {}) {
|
|
1810
|
-
const {
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
if (mode === "inline") {
|
|
1814
|
-
result = injectMangleMapAttribute(result, mangleMap, minify, options.varMangleMap);
|
|
1815
|
-
} else if (mode === "script") {
|
|
1816
|
-
result = injectMangleMapScript(result, mangleMap, options);
|
|
1817
|
-
} else if (mode === "both") {
|
|
1818
|
-
result = injectMangleMapAttribute(result, mangleMap, minify, options.varMangleMap);
|
|
1819
|
-
result = injectMangleMapScript(result, mangleMap, options);
|
|
1820
|
-
}
|
|
1821
|
-
return result;
|
|
1807
|
+
const { minify = false, census = true } = options;
|
|
1808
|
+
const result = injectChecksum(html, checksum, minify);
|
|
1809
|
+
return census ? injectMangleMapScript(result, mangleMap, options) : result;
|
|
1822
1810
|
}
|
|
1823
1811
|
function transformIndexHtml(html, mangleMap, checksum, options = {}) {
|
|
1824
1812
|
return injectHydrationData(html, mangleMap, checksum, options);
|
|
@@ -1932,6 +1920,9 @@ function needsRuntimeMangleRegistration(manglingEnabled, mangleMap) {
|
|
|
1932
1920
|
if (!manglingEnabled) return false;
|
|
1933
1921
|
return Object.keys(mangleMap).length > 0;
|
|
1934
1922
|
}
|
|
1923
|
+
function removedInjectChecksumMessage() {
|
|
1924
|
+
return "[csszyx] production.injectChecksum has been removed and was never read. The hydration checksum and the inert census ship on every production build, and no option turned them off \u2014 a build that set this to false still carried both. Delete the option. The census carries no class entries when production.mangle is off, and both tags are data, not script: see https://csszyx.com/docs/security/";
|
|
1925
|
+
}
|
|
1935
1926
|
function removedMangleMapDeliveryMessage() {
|
|
1936
1927
|
return "[csszyx] production.mangleMapDelivery has been removed and is ignored. The runtime mangle map is always registered from inside the JS bundle now, on every lane, so the built HTML never carries an executable inline <script> and a strict script-src 'self' policy needs no exception. Delete the option. (`window.__csszyx` is now opt-in through `production.mangleDebugGlobal`.)";
|
|
1937
1928
|
}
|
|
@@ -2260,9 +2251,9 @@ let _hasWarnedTsConfig = false;
|
|
|
2260
2251
|
let _hasWarnedTransformCacheVersion = false;
|
|
2261
2252
|
let _hasWarnedNativeFallback = false;
|
|
2262
2253
|
const _loggedActiveParsers = /* @__PURE__ */ new Set();
|
|
2263
|
-
const requireFromHere = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.
|
|
2254
|
+
const requireFromHere = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.9zs6T4Gf.cjs', document.baseURI).href)));
|
|
2264
2255
|
const PLUGIN_VERSION = findPackageVersionFromFile(
|
|
2265
|
-
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.
|
|
2256
|
+
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/unplugin.9zs6T4Gf.cjs', document.baseURI).href))),
|
|
2266
2257
|
UNKNOWN_PACKAGE_VERSION
|
|
2267
2258
|
);
|
|
2268
2259
|
const COMPILER_VERSION = findPackageVersionFromModule("@csszyx/compiler", UNKNOWN_PACKAGE_VERSION);
|
|
@@ -2394,8 +2385,9 @@ function quoteForConfig(entry) {
|
|
|
2394
2385
|
function preserveEntriesFor(hazard) {
|
|
2395
2386
|
const quote = quoteForConfig;
|
|
2396
2387
|
const { value } = hazard;
|
|
2397
|
-
|
|
2398
|
-
if (
|
|
2388
|
+
const utilities = hazard.renamed.map((name) => name.slice(utilityStart(name)));
|
|
2389
|
+
if (utilities.every((name) => name === value)) return [quote(value)];
|
|
2390
|
+
if (utilities.every((name) => name.startsWith(value))) return [quote(`${value}*`)];
|
|
2399
2391
|
return hazard.renamed.map(quote);
|
|
2400
2392
|
}
|
|
2401
2393
|
function mangleHybridHazardMessage(hazards) {
|
|
@@ -2409,34 +2401,34 @@ function mangleHybridHazardMessage(hazards) {
|
|
|
2409
2401
|
if (collisions.length > 0) {
|
|
2410
2402
|
const sample = collisions.slice(0, 8).join(", ");
|
|
2411
2403
|
parts.push(
|
|
2412
|
-
|
|
2413
|
-
"
|
|
2404
|
+
`${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.`,
|
|
2405
|
+
"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."
|
|
2414
2406
|
);
|
|
2415
2407
|
}
|
|
2416
2408
|
if (orphans.length > 0) {
|
|
2417
2409
|
const sample = orphans.slice(0, 8).join(", ");
|
|
2418
2410
|
parts.push(
|
|
2419
|
-
|
|
2420
|
-
"
|
|
2411
|
+
`${orphans.length} mangled class(es) have no emitted CSS rule (e.g. ${sample}) \u2014 those elements lose styling.`,
|
|
2412
|
+
"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."
|
|
2421
2413
|
);
|
|
2422
2414
|
}
|
|
2423
2415
|
if (broken.length > 0) {
|
|
2424
2416
|
const sample = broken.slice(0, 3).map((hazard) => `${hazard.selector} \u2192 ${hazard.renamed.slice(0, 4).join(", ")}`).join("; ");
|
|
2425
2417
|
const entries = [...new Set(broken.flatMap(preserveEntriesFor))].join(", ");
|
|
2426
2418
|
parts.push(
|
|
2427
|
-
|
|
2428
|
-
`
|
|
2419
|
+
`${broken.length} attribute selector(s) match class names by text (e.g. ${sample}) \u2014 those rules stop matching once the classes are renamed, so the elements lose those styles.`,
|
|
2420
|
+
`Keep those classes readable with production.manglePreserve: [${entries}] (paste-ready), or key the rule off a data attribute, which mangling never touches. production.mangleExclude cannot help here: it reserves token names and does not keep a class from being renamed.`
|
|
2429
2421
|
);
|
|
2430
2422
|
}
|
|
2431
2423
|
if (newlyMatched.length > 0) {
|
|
2432
2424
|
const sample = newlyMatched.slice(0, 3).map((hazard) => `${hazard.selector} \u2192 ${hazard.matchedTokens.slice(0, 4).join(", ")}`).join("; ");
|
|
2433
2425
|
const tokens = [...new Set(newlyMatched.flatMap((hazard) => hazard.matchedTokens))].map(quoteForConfig).join(", ");
|
|
2434
2426
|
parts.push(
|
|
2435
|
-
|
|
2436
|
-
`
|
|
2427
|
+
`${newlyMatched.length} attribute selector(s) would start matching mangled tokens instead (e.g. ${sample}).`,
|
|
2428
|
+
`Reserve those token names with production.mangleExclude: [${tokens}] (paste-ready) so no class is renamed to one of them, or key the rule off a data attribute, which mangling never touches; a prefix or substring selector goes on matching other tokens, so the data attribute is the durable fix.`
|
|
2437
2429
|
);
|
|
2438
2430
|
}
|
|
2439
|
-
return parts.join("");
|
|
2431
|
+
return parts.join("\n");
|
|
2440
2432
|
}
|
|
2441
2433
|
const TAILWIND_IMPORT_SPECIFIER = /@import\s+["']tailwindcss(?:\/[^"']*)?["']/g;
|
|
2442
2434
|
const SOURCE_MODIFIER = /\bsource\(/;
|
|
@@ -2479,13 +2471,15 @@ function shouldWarnUnscopedMonorepo(sawTailwindEntry, tailwindEntryScoped, inMon
|
|
|
2479
2471
|
function unscopedMonorepoMessage() {
|
|
2480
2472
|
return '[csszyx] Tailwind content detection is UNSCOPED in a monorepo. Tailwind v4 scans every file under its detection base \u2014 .md/.mdx/.txt included \u2014 so a doc or fixture holding class-shaped strings becomes CSS, which can generate phantom or broken url() classes and fail the build. That base is as wide as the build makes it: a Vite build roots it at the Vite root, other setups at the workspace root. Scope it in your Tailwind CSS entry:\n @import "tailwindcss" source(none);\n @source ".";\nThat @source is your package, relative to the CSS file; csszyx auto-injects one for the classes it generates, so only your own templates need listing. Guide: https://csszyx.com/docs/monorepo-content-scope/\nSilence (if a broad scan is intentional): csszyx({ contentScopeCheck: false }).';
|
|
2481
2473
|
}
|
|
2474
|
+
const CLASS_NAME_PRECEDENCE_MARKER = 'takes precedence over the runtime "className"';
|
|
2475
|
+
const MANGLE_VARS_HOIST_SKIP_MARKER = "mangleVars skipped component CSS variable hoist";
|
|
2482
2476
|
function isAdvisoryDiagnostic(message) {
|
|
2483
|
-
return
|
|
2477
|
+
return compiler.szFallbackConsequenceOf(message) === "nudge" || message.includes(CLASS_NAME_PRECEDENCE_MARKER) || message.includes(MANGLE_VARS_HOIST_SKIP_MARKER);
|
|
2484
2478
|
}
|
|
2485
2479
|
function suppressedAdvisoryMessage(count) {
|
|
2486
2480
|
if (count <= 0) return null;
|
|
2487
|
-
const held = count === 1 ? "1 advisory
|
|
2488
|
-
return `[csszyx] ${held} not listed above.
|
|
2481
|
+
const held = count === 1 ? "1 advisory note" : `${count} advisory notes`;
|
|
2482
|
+
return `[csszyx] ${held} not listed above. An advisory reports something csszyx handled \u2014 a fallback at an sz prop, a className whose precedence over sz is unstated, or a variable hoist the planner declined \u2014 so the styles are there and a production build keeps the list short. A development build prints each one with its file and position.`;
|
|
2489
2483
|
}
|
|
2490
2484
|
function resolveQuietMode(quiet) {
|
|
2491
2485
|
if (quiet === true || quiet === "all") return "all";
|
|
@@ -2502,6 +2496,13 @@ function shouldEmitWarning(quiet, devOnly, isProduction) {
|
|
|
2502
2496
|
}
|
|
2503
2497
|
return true;
|
|
2504
2498
|
}
|
|
2499
|
+
function emitKeyValueDiagnostic(quiet, message, id, emit) {
|
|
2500
|
+
if (resolveQuietMode(quiet) === "all" || compiler.szFallbackConsequenceOf(message) !== void 0 || isAdvisoryDiagnostic(message)) {
|
|
2501
|
+
return;
|
|
2502
|
+
}
|
|
2503
|
+
emit(`[csszyx] ${id}
|
|
2504
|
+
${message}`);
|
|
2505
|
+
}
|
|
2505
2506
|
function shouldEmitMissingCssFallback(quiet, message) {
|
|
2506
2507
|
return resolveQuietMode(quiet) !== "all" && compiler.szFallbackConsequenceOf(message) === "missing-css";
|
|
2507
2508
|
}
|
|
@@ -2513,7 +2514,7 @@ function emitMissingCssFallback(quiet, message, id, emit) {
|
|
|
2513
2514
|
${message}`);
|
|
2514
2515
|
}
|
|
2515
2516
|
function normalizeForMatch(p) {
|
|
2516
|
-
const n =
|
|
2517
|
+
const n = pathNormalization.normalizePathSeparators(p);
|
|
2517
2518
|
return n.length > 1 && n.endsWith("/") ? n.slice(0, -1) : n;
|
|
2518
2519
|
}
|
|
2519
2520
|
function findJsxExpressionEnd(code, bodyStart) {
|
|
@@ -3054,7 +3055,7 @@ function findPackageVersionFromFile(file, fallback) {
|
|
|
3054
3055
|
}
|
|
3055
3056
|
}
|
|
3056
3057
|
function normalizeSourceFilename(filename) {
|
|
3057
|
-
return
|
|
3058
|
+
return pathNormalization.normalizePathSeparators(filename);
|
|
3058
3059
|
}
|
|
3059
3060
|
const SCRIPT_ID_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx"];
|
|
3060
3061
|
const STYLESHEET_FILE_EXTENSIONS = [
|
|
@@ -3073,7 +3074,7 @@ function matchesScriptExtension(id, extensions) {
|
|
|
3073
3074
|
return extensions.some((ext) => id.endsWith(ext) || id.includes(`${ext}?`));
|
|
3074
3075
|
}
|
|
3075
3076
|
function insertRuntimeImport(code, importStmt) {
|
|
3076
|
-
return
|
|
3077
|
+
return nextRuntimeInjection.insertAfterUseDirective(code, importStmt);
|
|
3077
3078
|
}
|
|
3078
3079
|
function scanClassExpression(source, from) {
|
|
3079
3080
|
let depth = 0;
|
|
@@ -3337,6 +3338,8 @@ ${errors.join("\n")}`
|
|
|
3337
3338
|
function createCsszyxPlugins(options = {}) {
|
|
3338
3339
|
assertGlobalVarMangleConfig(options);
|
|
3339
3340
|
let manglingEnabled = options.production?.mangle === true;
|
|
3341
|
+
const censusRequested = options.production?.hydrationCensus !== false;
|
|
3342
|
+
const censusHasContent = () => manglingEnabled && Object.keys(state.mangleMap).length > 0 || Object.keys(state.varMangleMap).length > 0;
|
|
3340
3343
|
let serving = false;
|
|
3341
3344
|
const importedStaticSzEnabled = options.build?.importedStaticSz ?? types.DEFAULT_IMPORTED_STATIC_SZ;
|
|
3342
3345
|
const szvCrossModuleRegistry = /* @__PURE__ */ new Map();
|
|
@@ -3360,6 +3363,9 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3360
3363
|
if (options.production?.mangleMapDelivery !== void 0) {
|
|
3361
3364
|
console.warn(removedMangleMapDeliveryMessage());
|
|
3362
3365
|
}
|
|
3366
|
+
if (options.production?.injectChecksum !== void 0) {
|
|
3367
|
+
console.warn(removedInjectChecksumMessage());
|
|
3368
|
+
}
|
|
3363
3369
|
const sizeAccount = createMangleSizeAccount();
|
|
3364
3370
|
const astBudgetOverride = options.build?.astBudgetLimit;
|
|
3365
3371
|
const prescanAstBudget = astBudgetOverride ?? 5e5;
|
|
@@ -3454,6 +3460,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3454
3460
|
skipWarningEmitted: false,
|
|
3455
3461
|
classesCapped: false,
|
|
3456
3462
|
ownedClasses: /* @__PURE__ */ new Set(),
|
|
3463
|
+
mangleEligible: [],
|
|
3457
3464
|
authoredClasses: /* @__PURE__ */ new Set(),
|
|
3458
3465
|
mangleMap: {},
|
|
3459
3466
|
varMangleEntriesByFile: varMangleEntries,
|
|
@@ -3933,15 +3940,15 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3933
3940
|
function refreshSzvRegistryEntry(filePath, content) {
|
|
3934
3941
|
if (!shouldProcessSource(filePath)) return;
|
|
3935
3942
|
if (content === null) {
|
|
3936
|
-
szvCrossModuleRegistry.delete(
|
|
3937
|
-
szvCrossModuleForwards.delete(
|
|
3943
|
+
szvCrossModuleRegistry.delete(pathNormalization.normalizePathSeparators(filePath));
|
|
3944
|
+
szvCrossModuleForwards.delete(pathNormalization.normalizePathSeparators(filePath));
|
|
3938
3945
|
return;
|
|
3939
3946
|
}
|
|
3940
3947
|
transformCache.recordSzvRegistryFile(szvCrossModuleRegistry, filePath, content);
|
|
3941
3948
|
transformCache.recordCrossModuleForwards(szvCrossModuleForwards, filePath, content);
|
|
3942
3949
|
if (importedStaticSzEnabled) {
|
|
3943
3950
|
transformCache.recordSzObjectRegistryFile(szvCrossModuleRegistry, filePath, content);
|
|
3944
|
-
szObjectProvidersExamined.add(
|
|
3951
|
+
szObjectProvidersExamined.add(pathNormalization.normalizePathSeparators(filePath));
|
|
3945
3952
|
recordProvidersDemandedBy(filePath, content);
|
|
3946
3953
|
}
|
|
3947
3954
|
}
|
|
@@ -3964,7 +3971,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3964
3971
|
for (const specifier of queue) {
|
|
3965
3972
|
const providerPath = transformCache.resolveProviderPathWith(specifier, transformCache.isReadableProviderFile);
|
|
3966
3973
|
if (providerPath === void 0) continue;
|
|
3967
|
-
const key =
|
|
3974
|
+
const key = pathNormalization.normalizePathSeparators(providerPath);
|
|
3968
3975
|
if (!szObjectProvidersExamined.has(key)) {
|
|
3969
3976
|
szObjectProvidersExamined.add(key);
|
|
3970
3977
|
readAndRecordSzObjectProvider(providerPath);
|
|
@@ -3988,14 +3995,14 @@ function createCsszyxPlugins(options = {}) {
|
|
|
3988
3995
|
for (const specifier of queue) {
|
|
3989
3996
|
const providerPath = transformCache.resolveProviderPath(seenSourcePaths, specifier);
|
|
3990
3997
|
if (providerPath === void 0) continue;
|
|
3991
|
-
szObjectProvidersExamined.add(
|
|
3998
|
+
szObjectProvidersExamined.add(pathNormalization.normalizePathSeparators(providerPath));
|
|
3992
3999
|
readAndRecordSzObjectProvider(providerPath);
|
|
3993
4000
|
enqueueForwardedProviders(providerPath, queue, queued);
|
|
3994
4001
|
}
|
|
3995
4002
|
}
|
|
3996
4003
|
function enqueueForwardedProviders(providerPath, queue, queued) {
|
|
3997
4004
|
const directory = path__namespace.dirname(providerPath);
|
|
3998
|
-
for (const forward of szvCrossModuleForwards.get(
|
|
4005
|
+
for (const forward of szvCrossModuleForwards.get(pathNormalization.normalizePathSeparators(providerPath)) ?? []) {
|
|
3999
4006
|
for (const base of transformCache.specifierBases(forward.specifier, directory, specifierAliases)) {
|
|
4000
4007
|
if (queued.has(base)) continue;
|
|
4001
4008
|
queued.add(base);
|
|
@@ -4043,7 +4050,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4043
4050
|
}
|
|
4044
4051
|
recordSzvRegistryEntries(filePath, content);
|
|
4045
4052
|
transformCache.recordCrossModuleForwards(szvCrossModuleForwards, filePath, content);
|
|
4046
|
-
seenSourcePaths.add(
|
|
4053
|
+
seenSourcePaths.add(pathNormalization.normalizePathSeparators(filePath));
|
|
4047
4054
|
if (fileMayContainSafelistableSz(content)) {
|
|
4048
4055
|
prescanSources.push({ filePath, content });
|
|
4049
4056
|
recordSzObjectDemand(filePath, content);
|
|
@@ -4258,6 +4265,8 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4258
4265
|
const unmatched = manglePreserve.unmatched(state.ownedClasses);
|
|
4259
4266
|
if (unmatched.length > 0) emitWarning(manglePreserveNoMatchMessage(unmatched));
|
|
4260
4267
|
}
|
|
4268
|
+
state.mangleEligible = eligible;
|
|
4269
|
+
if (!manglingEnabled) return {};
|
|
4261
4270
|
return allocateMangleTokens(eligible, forbiddenTokens);
|
|
4262
4271
|
}
|
|
4263
4272
|
function freezeMangleMap() {
|
|
@@ -4437,7 +4446,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4437
4446
|
ctx.server.ws.send({ type: "full-reload" });
|
|
4438
4447
|
}
|
|
4439
4448
|
}
|
|
4440
|
-
if (
|
|
4449
|
+
if (pathNormalization.normalizePathSeparators(ctx.file) === pathNormalization.normalizePathSeparators(path__namespace.join(state.rootDir, SAFELIST_FILENAME))) {
|
|
4441
4450
|
return tailwindEntryModules(pass.moduleGraph());
|
|
4442
4451
|
}
|
|
4443
4452
|
if (isClientPass) discoverHotFileClasses(ctx.file, ctx.server.watcher);
|
|
@@ -4475,6 +4484,7 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4475
4484
|
continue;
|
|
4476
4485
|
}
|
|
4477
4486
|
emitMissingCssFallback(quiet, message, id, console.warn);
|
|
4487
|
+
emitKeyValueDiagnostic(quiet, message, id, console.warn);
|
|
4478
4488
|
}
|
|
4479
4489
|
const advisories = result.diagnostics.filter(isAdvisoryDiagnostic);
|
|
4480
4490
|
if (advisories.length === 0) return;
|
|
@@ -4534,14 +4544,14 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4534
4544
|
}
|
|
4535
4545
|
let transformedCode = `${code.slice(0, htmlTag.close)} ${attrName}="${themeGroupsFile.CHECKSUM_PLACEHOLDER}"${code.slice(htmlTag.close)}`;
|
|
4536
4546
|
const censusTag = `<script id="__CSSZYX_MANGLE_MAP__" type="application/json" dangerouslySetInnerHTML={{__html: \`${themeGroupsFile.CENSUS_PLACEHOLDER}\`}} />`;
|
|
4537
|
-
const bodyTag = findOpeningTag(transformedCode, "body");
|
|
4547
|
+
const bodyTag = censusRequested && censusHasContent() ? findOpeningTag(transformedCode, "body") : null;
|
|
4538
4548
|
if (bodyTag) {
|
|
4539
4549
|
transformedCode = `${transformedCode.slice(0, bodyTag.close + 1)}${censusTag}${transformedCode.slice(bodyTag.close + 1)}`;
|
|
4540
4550
|
}
|
|
4541
4551
|
return transformedCode;
|
|
4542
4552
|
}
|
|
4543
4553
|
function requiredRuntimeHelpers(output) {
|
|
4544
|
-
return
|
|
4554
|
+
return nextRuntimeInjection.runtimeHelperGroupsFromUsage(output);
|
|
4545
4555
|
}
|
|
4546
4556
|
function injectRuntimeHelpers(code, output) {
|
|
4547
4557
|
const groups = requiredRuntimeHelpers(output);
|
|
@@ -4557,9 +4567,9 @@ function createCsszyxPlugins(options = {}) {
|
|
|
4557
4567
|
}
|
|
4558
4568
|
const imports = groups.barrel;
|
|
4559
4569
|
const hasRuntimeImport = imports.length > 0 && current.includes("@csszyx/runtime");
|
|
4560
|
-
const needed = hasRuntimeImport ? imports.filter((name) => !
|
|
4570
|
+
const needed = hasRuntimeImport ? imports.filter((name) => !nextRuntimeInjection.importsRuntimeHelper(current, name)) : imports;
|
|
4561
4571
|
if (needed.length === 0) return result;
|
|
4562
|
-
const existingImport =
|
|
4572
|
+
const existingImport = nextRuntimeInjection.findRuntimeImportClause(current);
|
|
4563
4573
|
if (existingImport) {
|
|
4564
4574
|
return current.replace(
|
|
4565
4575
|
existingImport.statement,
|
|
@@ -4991,9 +5001,7 @@ ${transformedCode}`;
|
|
|
4991
5001
|
finalizeMangleMap();
|
|
4992
5002
|
const injectedMangleMap = manglingEnabled ? state.mangleMap : {};
|
|
4993
5003
|
let result = transformIndexHtml(html, injectedMangleMap, state.checksum, {
|
|
4994
|
-
|
|
4995
|
-
// checksum attribute is injected regardless.
|
|
4996
|
-
mode: "script",
|
|
5004
|
+
census: censusRequested && censusHasContent(),
|
|
4997
5005
|
minify: process.env.NODE_ENV === "production",
|
|
4998
5006
|
varMangleMap: state.varMangleMap
|
|
4999
5007
|
});
|
|
@@ -5038,7 +5046,7 @@ ${transformedCode}`;
|
|
|
5038
5046
|
const manifest = {
|
|
5039
5047
|
version: "0.4.0",
|
|
5040
5048
|
buildId: state.checksum,
|
|
5041
|
-
classes:
|
|
5049
|
+
classes: [...state.mangleEligible]
|
|
5042
5050
|
};
|
|
5043
5051
|
if (includeMangleMap && Object.keys(state.mangleMap).length > 0) {
|
|
5044
5052
|
manifest.mangleMap = state.mangleMap;
|
|
@@ -5410,6 +5418,7 @@ exports.createGlobalVarScanCacheKey = createGlobalVarScanCacheKey;
|
|
|
5410
5418
|
exports.createRSCModuleRecord = createRSCModuleRecord;
|
|
5411
5419
|
exports.cssHasContentScope = cssHasContentScope;
|
|
5412
5420
|
exports.deleteRSCModuleRecord = deleteRSCModuleRecord;
|
|
5421
|
+
exports.emitKeyValueDiagnostic = emitKeyValueDiagnostic;
|
|
5413
5422
|
exports.emitMissingCssFallback = emitMissingCssFallback;
|
|
5414
5423
|
exports.esbuildPlugin = esbuildPlugin;
|
|
5415
5424
|
exports.extractGlobalVarAliasesForManifest = extractGlobalVarAliasesForManifest;
|
|
@@ -523,6 +523,14 @@ interface PluginState {
|
|
|
523
523
|
* by a raw selector consumer.
|
|
524
524
|
*/
|
|
525
525
|
ownedClasses: Set<string>;
|
|
526
|
+
/**
|
|
527
|
+
* Owned classes that a mangle map WOULD carry: `ownedClasses` minus the
|
|
528
|
+
* authored ones and minus `manglePreserve`. Recorded whether or not
|
|
529
|
+
* mangling runs, because the bundle manifest lists them either way and used
|
|
530
|
+
* to read them off the map's keys — which is why the map had to be
|
|
531
|
+
* allocated on a build that never mangles.
|
|
532
|
+
*/
|
|
533
|
+
mangleEligible: string[];
|
|
526
534
|
/**
|
|
527
535
|
* Classes written through author-facing class/className attributes. Any
|
|
528
536
|
* overlap with ownedClasses must keep its original name because bundled
|
|
@@ -751,9 +759,18 @@ declare function unscopedMonorepoMessage(): string;
|
|
|
751
759
|
/**
|
|
752
760
|
* Whether a diagnostic is an advisory one — the class a build may hold back.
|
|
753
761
|
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
762
|
+
* Advisory means one thing: the styles are THERE, and the note is about how
|
|
763
|
+
* they got there. An `sz`-site nudge fallback took the runtime path where a
|
|
764
|
+
* compiled one was possible; the precedence advisory says which of two sources
|
|
765
|
+
* won. Everything else describes output that is absent or dead, and a
|
|
766
|
+
* production build has to print it.
|
|
767
|
+
*
|
|
768
|
+
* Asked positively on purpose. The predicate used to be "not one of three known
|
|
769
|
+
* kinds", which quietly made every key and value diagnostic advisory: a
|
|
770
|
+
* production build of a file with five typo'd keys printed nothing but a census
|
|
771
|
+
* calling them fallbacks, while `csszyx check` on the same tree named all six.
|
|
772
|
+
* A classifier written by exclusion cannot stay right as diagnostics are added,
|
|
773
|
+
* because a new one joins the silent side by default.
|
|
757
774
|
*
|
|
758
775
|
* @param message - One raw diagnostic line as an engine emitted it.
|
|
759
776
|
* @returns True when the diagnostic is advisory rather than a build result.
|
|
@@ -772,7 +789,7 @@ declare function isAdvisoryDiagnostic(message: string): boolean;
|
|
|
772
789
|
* Suppression is the right default; implying zero is not. One line costs
|
|
773
790
|
* nothing and keeps the difference visible.
|
|
774
791
|
*
|
|
775
|
-
* @param count - Advisory
|
|
792
|
+
* @param count - Advisory notes the build declined to list.
|
|
776
793
|
* @returns The disclosure, or null when nothing was held back.
|
|
777
794
|
*/
|
|
778
795
|
declare function suppressedAdvisoryMessage(count: number): string | null;
|
|
@@ -807,6 +824,22 @@ declare function resolveQuietMode(quiet: boolean | 'nudges' | QuietMode | undefi
|
|
|
807
824
|
* @returns true when the warning should be printed.
|
|
808
825
|
*/
|
|
809
826
|
declare function shouldEmitWarning(quiet: QuietMode, devOnly: boolean, isProduction: boolean): boolean;
|
|
827
|
+
/**
|
|
828
|
+
* Emit one key or value diagnostic — the family that says a class is dead.
|
|
829
|
+
*
|
|
830
|
+
* Its own channel because the two that existed both answer a different
|
|
831
|
+
* question: `emitMissingCssFallback` handles fallback sites, and the advisory
|
|
832
|
+
* channel handles notes about styles that ARE present. A typo'd key matched
|
|
833
|
+
* neither, so a production build dropped it on the floor while `csszyx check`
|
|
834
|
+
* on the same tree exited 1 and named it. Muted only by `quiet: true`, on the
|
|
835
|
+
* same reasoning as the missing-css channel: wrong output is not a usage nudge.
|
|
836
|
+
*
|
|
837
|
+
* @param quiet - Resolved quiet mode.
|
|
838
|
+
* @param message - Compiler diagnostic to classify and emit.
|
|
839
|
+
* @param id - Bundler module identifier included in the warning.
|
|
840
|
+
* @param emit - Warning output channel.
|
|
841
|
+
*/
|
|
842
|
+
declare function emitKeyValueDiagnostic(quiet: QuietMode, message: string, id: string, emit: (message: string) => void): void;
|
|
810
843
|
/**
|
|
811
844
|
* Whether a transform diagnostic describes missing CSS and may be printed.
|
|
812
845
|
*
|
|
@@ -1079,5 +1112,5 @@ declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption
|
|
|
1079
1112
|
*/
|
|
1080
1113
|
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
1081
1114
|
|
|
1082
|
-
export {
|
|
1115
|
+
export { isPackagesSkippedSource as $, unplugin as A, deleteRSCModuleRecord as B, emitKeyValueDiagnostic as D, emitMissingCssFallback as E, esbuildPlugin as F, extractGlobalVarAliasesForManifest as H, fileMayContainSafelistableSz as I, findLocalImportSources as J, findRSCBoundaryViolation as K, findRSCGraphViolation as L, hasInjectableTailwindCandidate as N, hasTokens as O, hasUseClientDirective as T, hasUseServerDirective as U, isAdvisoryDiagnostic as W, isCompileSourceOptedIn as X, isHardIgnoredPath as Y, isMangleableCssId as Z, isMonorepoPackage as _, isRSCServerModule as a0, lateMangleCensusMessage as a1, mangleCodeClassesSync as a2, mangleEligibleClasses as a3, mangleHybridHazardMessage as a4, mergeThemes as a5, missingTailwindEntryMessage as a6, normalizeGlobalVarAliasesForCache as a7, parseThemeBlocks as a8, parseUtilityBlocks as a9, realContentHashDisabledMessage as aa, recordGlobalVarSourceFile as ab, resolveCompileSourceDirs as ac, resolveNativeCacheIdentity as ad, resolveQuietMode as ae, rollupPlugin as af, scanCustomPropertyNames as ag, shouldEmitMissingCssFallback as ah, shouldEmitWarning as ai, shouldHoldAdvisories as aj, shouldTrackGlobalVarSources as ak, shouldWarnMissingTailwindEntry as al, shouldWarnUnscopedMonorepo as am, skippedSzFilesMessage as an, suppressedAdvisoryMessage as ao, unscopedMonorepoMessage as ap, vitePlugin as aq, watchModeMangleMessage as ar, webpackPlugin as as, allocateMangleTokens as t, assertNoRSCBoundaryViolation as u, assertNoRSCGraphViolation as v, collectMangleHybridHazards as w, createGlobalVarMapAssetSource as x, createRSCModuleRecord as y, cssHasContentScope as z };
|
|
1083
1116
|
export type { CssVarScanResult as C, GlobalVarScanCacheKeyInput as G, MangleHybridHazards as M, PlanGlobalVarAliasesInput as P, QuietMode as Q, RewriteGlobalVarCssAliasesOptions as R, ScanGlobalVarCssOptions as S, ValidateGlobalVarAliasInputsOptions as V, GlobalVarAliasPlan as a, GlobalVarCssAliasRewriteResult as b, CreateGlobalVarAliasValidationOptionsInput as c, GlobalVarAliasValidationResult as d, CssVarDefinition as e, CssVarLocation as f, CssVarReference as g, GlobalVarAliasDiagnostic as h, GlobalVarAliasDiagnosticSeverity as i, GlobalVarAliasEntry as j, GlobalVarCodeSource as k, GlobalVarCssAssetSource as l, GlobalVarCssSource as m, GlobalVarScanCacheEntry as n, MangleSelectorHazard as o, ParsedTheme as p, ParsedUtilities as q, RSCBoundaryViolation as r, RSCModuleRecord as s };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
|
+
import { n as normalizePathSeparators } from './unplugin.wMeicb6E.mjs';
|
|
4
5
|
|
|
5
6
|
function sortStrings(values) {
|
|
6
7
|
return [...values].sort((a, b) => {
|
|
@@ -10,11 +11,6 @@ function sortStrings(values) {
|
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const WINDOWS_PATH_SEPARATOR = String.fromCodePoint(92);
|
|
14
|
-
function normalizePathSeparators(value) {
|
|
15
|
-
return value.split(WINDOWS_PATH_SEPARATOR).join("/");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
14
|
const DEFAULT_RENAME_RETRIES = 5;
|
|
19
15
|
const DEFAULT_RENAME_RETRY_DELAY_MS = 10;
|
|
20
16
|
function isRetryableRenameError(error) {
|
|
@@ -255,4 +251,4 @@ function cssImportsTailwind(code) {
|
|
|
255
251
|
return TAILWIND_IMPORT.test(stripCssBlockComments(code));
|
|
256
252
|
}
|
|
257
253
|
|
|
258
|
-
export { SAFELIST_FILE as S, appendTailwindSourceDirective as a, cssImportsTailwind as b, computeSafelistRelPath as c, atomicWriteFileSync as d, removeLegacySafelists as e, findPostcssConfigWithoutCsszyx as f, assertNoLegacySourceStylesheet as g, stripCssBlockComments as h, findLegacySourceDirective as i, legacySourceMessage as l, missingPostcssPluginMessage as m,
|
|
254
|
+
export { SAFELIST_FILE as S, appendTailwindSourceDirective as a, cssImportsTailwind as b, computeSafelistRelPath as c, atomicWriteFileSync as d, removeLegacySafelists as e, findPostcssConfigWithoutCsszyx as f, assertNoLegacySourceStylesheet as g, stripCssBlockComments as h, findLegacySourceDirective as i, legacySourceMessage as l, missingPostcssPluginMessage as m, renderSafelistFile as r, sortStrings as s };
|
|
@@ -2,9 +2,10 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import { extractCrossModuleForwards, extractCrossModuleRegistryEntries, ensureRustTransformAvailable, transformRust, transformWasm, transform } from '@csszyx/compiler';
|
|
4
4
|
import { DEFAULT_IMPORTED_STATIC_SZ } from '@csszyx/types';
|
|
5
|
-
import { c as collectSpecifierAliases, i as importedSpecifiersIn, s as specifierBases, a as resolveProviderPathWith, b as recordResolvedEntry, f as forwardVisitKey, M as MAX_FORWARD_HOPS, d as isReadableProviderFile, e as createTransformCacheKey, g as readTransformCache, w as writeTransformCache } from './unplugin.
|
|
6
|
-
import { n as normalizePathSeparators
|
|
5
|
+
import { c as collectSpecifierAliases, i as importedSpecifiersIn, s as specifierBases, a as resolveProviderPathWith, b as recordResolvedEntry, f as forwardVisitKey, M as MAX_FORWARD_HOPS, d as isReadableProviderFile, e as createTransformCacheKey, g as readTransformCache, w as writeTransformCache } from './unplugin.2uf-U76p.mjs';
|
|
6
|
+
import { n as normalizePathSeparators } from './unplugin.wMeicb6E.mjs';
|
|
7
7
|
import { createHash } from 'node:crypto';
|
|
8
|
+
import { s as sortStrings } from './unplugin.Ba3O1r8M.mjs';
|
|
8
9
|
|
|
9
10
|
function resolveImportedStaticSz(value) {
|
|
10
11
|
return value ?? DEFAULT_IMPORTED_STATIC_SZ;
|