@yahoo/uds 3.171.0 → 3.172.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/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/css/dist/css/purgeWorker.js +50 -0
- package/dist/css/dist/css/runner.cjs +3 -1
- package/dist/css/dist/css/runner.js +3 -1
- package/dist/css/dist/css/workerPool.cjs +18 -2
- package/dist/css/dist/css/workerPool.js +16 -1
- package/dist/css/dist/purger/optimized/ast/expressions.cjs +278 -278
- package/dist/css/dist/purger/optimized/ast/expressions.js +278 -278
- package/dist/css/dist/purger/optimized/ast/jsx.cjs +67 -36
- package/dist/css/dist/purger/optimized/ast/jsx.js +67 -35
- package/dist/css/dist/purger/optimized/ast/oxc.cjs +265 -0
- package/dist/css/dist/purger/optimized/ast/oxc.js +253 -0
- package/dist/css/dist/purger/optimized/ast/props.cjs +21 -15
- package/dist/css/dist/purger/optimized/ast/props.js +21 -14
- package/dist/css/dist/purger/optimized/ast/spread.cjs +19 -19
- package/dist/css/dist/purger/optimized/ast/spread.js +19 -18
- package/dist/css/dist/purger/optimized/purgeFromCode.cjs +86 -101
- package/dist/css/dist/purger/optimized/purgeFromCode.js +86 -100
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/tailwind-v3/dist/purger/legacy/purgeCSS.cjs +1 -1
- package/dist/tailwind-v3/dist/purger/legacy/purgeCSS.js +1 -1
- package/dist/uds/generated/componentData.cjs +273 -273
- package/dist/uds/generated/componentData.js +273 -273
- package/dist/uds/package.cjs +2 -0
- package/dist/uds/package.js +2 -0
- package/generated/componentData.json +419 -419
- package/package.json +3 -1
|
@@ -11,8 +11,8 @@ import { VariantConfig } from "../types/ComponentConfig.cjs";
|
|
|
11
11
|
* @returns A Record of layer names to their properties, or null if no properties are found
|
|
12
12
|
*/
|
|
13
13
|
declare function getConfigVariantProperties(variant?: VariantConfig): {
|
|
14
|
-
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"
|
|
15
|
-
root: Readonly<Record<string, SelectedConfigurableProperty<"
|
|
14
|
+
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"color" | "iconSize" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "opacity" | "fillOpacity" | "fontWeight" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
|
|
15
|
+
root: Readonly<Record<string, SelectedConfigurableProperty<"color" | "iconSize" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "opacity" | "fillOpacity" | "fontWeight" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
|
|
16
16
|
} | null; //#endregion
|
|
17
17
|
//#endregion
|
|
18
18
|
export { getConfigVariantProperties };
|
|
@@ -11,8 +11,8 @@ import { VariantConfig } from "../types/ComponentConfig.js";
|
|
|
11
11
|
* @returns A Record of layer names to their properties, or null if no properties are found
|
|
12
12
|
*/
|
|
13
13
|
declare function getConfigVariantProperties(variant?: VariantConfig): {
|
|
14
|
-
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"
|
|
15
|
-
root: Readonly<Record<string, SelectedConfigurableProperty<"
|
|
14
|
+
[x: string]: Readonly<Record<string, SelectedConfigurableProperty<"color" | "iconSize" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "opacity" | "fillOpacity" | "fontWeight" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
|
|
15
|
+
root: Readonly<Record<string, SelectedConfigurableProperty<"color" | "iconSize" | "backgroundColor" | "borderWidth" | "underlineWidth" | "strokeWidth" | "borderRadius" | "borderRadiusVar" | "borderColor" | "underlineColor" | "stroke" | "buttonSize" | "buttonVariant" | "fontFamily" | "fontSize" | "fontVariationSettings" | "lineHeight" | "textTransform" | "letterSpacing" | "gap" | "opacity" | "fillOpacity" | "fontWeight" | "spacing" | "iconVariant" | "horizontalMargin" | "bottomMargin" | "spacingHorizontal" | "spacingVertical" | "spacingTop" | "spacingBottom" | "textVariant" | "textDecorationLine" | "shadow" | "shadowVar" | "insetShadow" | "bannerInnerShadow" | "height" | "width" | "scaleEffect" | "backdropBlur" | "blurBackgroundColor" | "blurBackgroundColorFallback" | "scrimBackgroundColor" | "scrimOpacity" | "paginationWidthVar" | "controlHeight", string, readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases" | "elevationAliases")[] | readonly ("elevationAliases" | "borderWidths" | "spacingAliases")[] | readonly "borderRadii"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "elevationAliases" | "linePaletteColors")[] | readonly "buttonSizes"[] | readonly "buttonVariantsFlat"[] | readonly "textVariants"[] | readonly "spacingAliases"[] | readonly ("spectrumColors" | "alwaysPaletteAliases" | "foregroundPaletteColors")[] | readonly "opacitySteps"[] | readonly "iconSizes"[] | readonly "iconVariants"[] | readonly "textDecorationLines"[] | readonly ("elevationAliases" | "shadowVariants" | "shadowVariantConfig")[] | readonly ("shadowVariantConfig" | "shadowVariantsWithInvert")[] | readonly "bannerInnerShadowOptions"[] | readonly "scaleEffects"[] | readonly "positiveIntegers"[] | readonly ("backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases")[], readonly (readonly unknown[])[]>>>;
|
|
16
16
|
} | null; //#endregion
|
|
17
17
|
//#endregion
|
|
18
18
|
export { getConfigVariantProperties };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
2
|
+
import { purgeFromCodeOptimized } from "../purger/optimized/purgeFromCode.js";
|
|
3
|
+
import { parentPort } from "node:worker_threads";
|
|
4
|
+
//#region src/css/purgeWorker.ts
|
|
5
|
+
let sharedConfig = null;
|
|
6
|
+
parentPort?.on("message", async (msg) => {
|
|
7
|
+
if (msg.type === "init") {
|
|
8
|
+
sharedConfig = msg.config;
|
|
9
|
+
parentPort?.postMessage({ type: "ready" });
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (msg.type === "task") {
|
|
13
|
+
if (!sharedConfig) {
|
|
14
|
+
parentPort?.postMessage({
|
|
15
|
+
type: "error",
|
|
16
|
+
id: msg.id,
|
|
17
|
+
error: "Worker not initialized"
|
|
18
|
+
});
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const result = await purgeFromCodeOptimized(msg.code, {
|
|
23
|
+
...sharedConfig,
|
|
24
|
+
colorModes: msg.colorModes,
|
|
25
|
+
variantDefaults: msg.variantDefaults,
|
|
26
|
+
runtimeConfigValues: msg.runtimeConfigValues,
|
|
27
|
+
includeAllClassNamePrimitives: msg.includeAllClassNamePrimitives,
|
|
28
|
+
deferWrapperSpreadResolution: msg.deferWrapperSpreadResolution,
|
|
29
|
+
filePath: msg.filePath
|
|
30
|
+
});
|
|
31
|
+
parentPort?.postMessage({
|
|
32
|
+
type: "result",
|
|
33
|
+
id: msg.id,
|
|
34
|
+
result
|
|
35
|
+
});
|
|
36
|
+
} catch (error) {
|
|
37
|
+
parentPort?.postMessage({
|
|
38
|
+
type: "error",
|
|
39
|
+
id: msg.id,
|
|
40
|
+
error: error instanceof Error ? error.message : String(error)
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (msg.type === "done") process.exit(0);
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
export {};
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=purgeWorker.mjs.map
|
|
@@ -270,7 +270,9 @@ const runThemeMode = async (options, context) => {
|
|
|
270
270
|
autoVariants: context.autoVariants,
|
|
271
271
|
componentData: context.componentData
|
|
272
272
|
}, options.workers);
|
|
273
|
-
} catch {
|
|
273
|
+
} catch {
|
|
274
|
+
genLog.warn("Worker pool unavailable — scanning single-threaded (slower)");
|
|
275
|
+
}
|
|
274
276
|
try {
|
|
275
277
|
if (pool) genLog.spinStart(`Scanning app and packages... (${pool.workerCount} worker${pool.workerCount === 1 ? "" : "s"})`);
|
|
276
278
|
else genLog.spinStart("Scanning app and packages... (sync mode)");
|
|
@@ -268,7 +268,9 @@ const runThemeMode = async (options, context) => {
|
|
|
268
268
|
autoVariants: context.autoVariants,
|
|
269
269
|
componentData: context.componentData
|
|
270
270
|
}, options.workers);
|
|
271
|
-
} catch {
|
|
271
|
+
} catch {
|
|
272
|
+
genLog.warn("Worker pool unavailable — scanning single-threaded (slower)");
|
|
273
|
+
}
|
|
272
274
|
try {
|
|
273
275
|
if (pool) genLog.spinStart(`Scanning app and packages... (${pool.workerCount} worker${pool.workerCount === 1 ? "" : "s"})`);
|
|
274
276
|
else genLog.spinStart("Scanning app and packages... (sync mode)");
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
5
|
+
let node_url = require("node:url");
|
|
3
6
|
let node_os = require("node:os");
|
|
4
7
|
let node_worker_threads = require("node:worker_threads");
|
|
5
8
|
//#region ../css/dist/css/workerPool.mjs
|
|
6
9
|
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
10
|
+
const resolveWorkerUrl = (baseUrl = require("url").pathToFileURL(__filename).href) => {
|
|
11
|
+
for (const candidate of [
|
|
12
|
+
"./purgeWorker.js",
|
|
13
|
+
"./purgeWorker.mjs",
|
|
14
|
+
"./purgeWorker.cjs",
|
|
15
|
+
"./purgeWorker.ts"
|
|
16
|
+
]) {
|
|
17
|
+
const url = new URL(candidate, baseUrl);
|
|
18
|
+
if (node_fs.default.existsSync((0, node_url.fileURLToPath)(url))) return url;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
};
|
|
7
22
|
const createWorkerPool = async (config, numWorkers) => {
|
|
8
23
|
const workerCount = numWorkers ?? Math.max(1, (0, node_os.cpus)().length - 1);
|
|
9
|
-
const workerUrl =
|
|
24
|
+
const workerUrl = resolveWorkerUrl();
|
|
25
|
+
if (!workerUrl) throw new Error("purgeWorker build output not found next to workerPool");
|
|
10
26
|
const workers = [];
|
|
11
27
|
const available = [];
|
|
12
28
|
const pending = /* @__PURE__ */ new Map();
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
2
4
|
import { cpus } from "node:os";
|
|
3
5
|
import { Worker } from "node:worker_threads";
|
|
4
6
|
//#region ../css/dist/css/workerPool.mjs
|
|
5
7
|
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
8
|
+
const resolveWorkerUrl = (baseUrl = import.meta.url) => {
|
|
9
|
+
for (const candidate of [
|
|
10
|
+
"./purgeWorker.js",
|
|
11
|
+
"./purgeWorker.mjs",
|
|
12
|
+
"./purgeWorker.cjs",
|
|
13
|
+
"./purgeWorker.ts"
|
|
14
|
+
]) {
|
|
15
|
+
const url = new URL(candidate, baseUrl);
|
|
16
|
+
if (fs.existsSync(fileURLToPath(url))) return url;
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
};
|
|
6
20
|
const createWorkerPool = async (config, numWorkers) => {
|
|
7
21
|
const workerCount = numWorkers ?? Math.max(1, cpus().length - 1);
|
|
8
|
-
const workerUrl =
|
|
22
|
+
const workerUrl = resolveWorkerUrl();
|
|
23
|
+
if (!workerUrl) throw new Error("purgeWorker build output not found next to workerPool");
|
|
9
24
|
const workers = [];
|
|
10
25
|
const available = [];
|
|
11
26
|
const pending = /* @__PURE__ */ new Map();
|