@yahoo/uds 3.122.1 → 3.123.0-beta.1
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/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/experimental/client/SegmentedControl.d.cts +2 -1
- package/dist/styles/styler.d.cts +42 -42
- package/dist/styles/styler.d.ts +42 -42
- package/dist/tailwind/dist/commands/css.cjs +17 -3
- package/dist/tailwind/dist/commands/css.d.cts.map +1 -1
- package/dist/tailwind/dist/commands/css.d.ts.map +1 -1
- package/dist/tailwind/dist/commands/css.helpers.cjs +2 -1
- package/dist/tailwind/dist/commands/css.helpers.js +2 -1
- package/dist/tailwind/dist/commands/css.helpers.js.map +1 -1
- package/dist/tailwind/dist/commands/css.js +17 -3
- package/dist/tailwind/dist/commands/css.js.map +1 -1
- package/dist/tailwind/dist/css/generate.cjs +3 -0
- package/dist/tailwind/dist/css/generate.helpers.cjs +14 -6
- package/dist/tailwind/dist/css/generate.helpers.js +15 -7
- package/dist/tailwind/dist/css/generate.helpers.js.map +1 -1
- package/dist/tailwind/dist/css/generate.js +3 -0
- package/dist/tailwind/dist/css/generate.js.map +1 -1
- package/dist/tailwind/dist/css/nodeUtils.cjs +91 -20
- package/dist/tailwind/dist/css/nodeUtils.js +90 -21
- package/dist/tailwind/dist/css/nodeUtils.js.map +1 -1
- package/dist/tailwind/dist/css/postcss.cjs +22 -1
- package/dist/tailwind/dist/css/postcss.helpers.cjs +12 -1
- package/dist/tailwind/dist/css/postcss.helpers.js +11 -1
- package/dist/tailwind/dist/css/postcss.helpers.js.map +1 -1
- package/dist/tailwind/dist/css/postcss.js +22 -2
- package/dist/tailwind/dist/css/postcss.js.map +1 -1
- package/dist/tailwind/dist/css/runner.cjs +171 -20
- package/dist/tailwind/dist/css/runner.helpers.cjs +58 -6
- package/dist/tailwind/dist/css/runner.helpers.js +54 -7
- package/dist/tailwind/dist/css/runner.helpers.js.map +1 -1
- package/dist/tailwind/dist/css/runner.js +172 -20
- package/dist/tailwind/dist/css/runner.js.map +1 -1
- package/dist/tailwind/dist/css/theme.d.cts +11 -0
- package/dist/tailwind/dist/css/theme.d.cts.map +1 -1
- package/dist/tailwind/dist/css/theme.d.ts +11 -0
- package/dist/tailwind/dist/css/theme.d.ts.map +1 -1
- package/dist/tailwind/dist/css/theme.js.map +1 -1
- package/dist/tailwind/dist/purger/optimized/ast/expressions.cjs +26 -3
- package/dist/tailwind/dist/purger/optimized/ast/expressions.js +26 -3
- package/dist/tailwind/dist/purger/optimized/ast/expressions.js.map +1 -1
- package/dist/uds/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/properties.d.cts +5 -0
- package/dist/uds/dist/automated-config/dist/types/ComponentConfig.d.cts +3 -0
- package/dist/uds/dist/automated-config/dist/types/ComponentStyles.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/types/ConfigSchema.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/utils/buildConfigSchema.d.cts +7 -0
- package/dist/uds/dist/automated-config/dist/utils/coalesceConfigVariant.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/utils/defaults.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/utils/getConfigVariantComponentStatesMatrix.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +3 -0
- package/dist/uds/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.cts +3 -0
- package/dist/uds/dist/automated-config/dist/utils/getConfigVariants.d.cts +2 -0
- package/dist/uds/dist/automated-config/dist/utils/index.d.cts +12 -0
- package/dist/uds/dist/automated-config/dist/utils/subcomponents.d.cts +2 -0
- package/dist/uds/dist/components/Box.d.cts +4 -0
- package/dist/uds/dist/components/Divider/Divider.d.cts +3 -0
- package/dist/uds/dist/components/Divider/DividerCore.d.cts +5 -0
- package/dist/uds/dist/components/Divider/DividerInternal.d.cts +5 -0
- package/dist/uds/dist/components/Divider/index.d.cts +2 -0
- package/dist/uds/dist/components/FormLabel.d.cts +4 -0
- package/dist/uds/dist/components/HStack.d.cts +5 -0
- package/dist/uds/dist/components/Icon.d.cts +4 -0
- package/dist/uds/dist/components/Image.d.cts +3 -0
- package/dist/uds/dist/components/Link.d.cts +4 -0
- package/dist/uds/dist/components/Scrim.d.cts +3 -0
- package/dist/uds/dist/components/Text.d.cts +4 -0
- package/dist/uds/dist/components/VStack.d.cts +5 -0
- package/dist/uds/dist/components/client/Avatar/Avatar.d.cts +2 -0
- package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.cts +4 -0
- package/dist/uds/dist/components/client/Avatar/AvatarImage.d.cts +6 -0
- package/dist/uds/dist/components/client/Avatar/AvatarText.d.cts +4 -0
- package/dist/uds/dist/components/client/Avatar/index.d.cts +5 -0
- package/dist/uds/dist/components/client/Badge.d.cts +4 -0
- package/dist/uds/dist/components/client/BottomSheet/BottomSheet.d.cts +5 -0
- package/dist/uds/dist/components/client/BottomSheet/BottomSheetContent.d.cts +2 -0
- package/dist/uds/dist/components/client/BottomSheet/BottomSheetHeader.d.cts +2 -0
- package/dist/uds/dist/components/client/BottomSheet/BottomSheetProvider.d.cts +3 -0
- package/dist/uds/dist/components/client/BottomSheet/UDSBottomSheetConfigProvider.d.cts +3 -0
- package/dist/uds/dist/components/client/BottomSheet/index.d.cts +7 -0
- package/dist/uds/dist/components/client/BottomSheet/useBottomSheetStore.d.cts +2 -0
- package/dist/uds/dist/components/client/Button.d.cts +5 -0
- package/dist/uds/dist/components/client/Checkbox.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/Chip.d.cts +5 -0
- package/dist/uds/dist/components/client/Chip/ChipBase.d.cts +6 -0
- package/dist/uds/dist/components/client/Chip/ChipButton.d.cts +5 -0
- package/dist/uds/dist/components/client/Chip/ChipDismissible.d.cts +5 -0
- package/dist/uds/dist/components/client/Chip/ChipLink.d.cts +5 -0
- package/dist/uds/dist/components/client/Chip/ChipToggle.d.cts +5 -0
- package/dist/uds/dist/components/client/Chip/index.d.cts +6 -0
- package/dist/uds/dist/components/client/IconButton.d.cts +5 -0
- package/dist/uds/dist/components/client/Input/Input.d.cts +7 -0
- package/dist/uds/dist/components/client/Input/InputHelpText.d.cts +2 -0
- package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.cts +6 -0
- package/dist/uds/dist/components/client/Input/index.d.cts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Content.d.cts +6 -0
- package/dist/uds/dist/components/client/Menu/Menu.Divider.d.cts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Item.d.cts +6 -0
- package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +6 -0
- package/dist/uds/dist/components/client/Menu/Menu.Provider.d.cts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.cts +5 -0
- package/dist/uds/dist/components/client/Menu/Menu.d.cts +2 -0
- package/dist/uds/dist/components/client/Menu/Menu.index.d.cts +9 -0
- package/dist/uds/dist/components/client/Menu/index.d.cts +9 -0
- package/dist/uds/dist/components/client/Popover/Popover.d.cts +2 -0
- package/dist/uds/dist/components/client/Popover/PopoverContent.d.cts +5 -0
- package/dist/uds/dist/components/client/Popover/PopoverTrigger.d.cts +2 -0
- package/dist/uds/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +4 -0
- package/dist/uds/dist/components/client/Popover/index.d.cts +6 -0
- package/dist/uds/dist/components/client/Pressable.d.cts +4 -0
- package/dist/uds/dist/components/client/Radio/Radio.d.cts +4 -0
- package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.cts +4 -0
- package/dist/uds/dist/components/client/Radio/index.d.cts +3 -0
- package/dist/uds/dist/components/client/SpringMotionConfig.d.cts +5 -0
- package/dist/uds/dist/components/client/Switch.d.cts +4 -0
- package/dist/uds/dist/components/client/Toast/Toast.d.cts +8 -0
- package/dist/uds/dist/components/client/Toast/ToastContainer.d.cts +6 -0
- package/dist/uds/dist/components/client/Toast/ToastPortal.d.cts +3 -0
- package/dist/uds/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -0
- package/dist/uds/dist/components/client/Toast/createToast.d.cts +6 -0
- package/dist/uds/dist/components/client/Toast/index.d.cts +6 -0
- package/dist/uds/dist/components/client/Tooltip/Tooltip.d.cts +2 -0
- package/dist/uds/dist/components/client/Tooltip/TooltipContent.d.cts +3 -0
- package/dist/uds/dist/components/client/Tooltip/TooltipTrigger.d.cts +2 -0
- package/dist/uds/dist/components/client/Tooltip/UDSTooltipConfigProvider.d.cts +5 -0
- package/dist/uds/dist/components/client/Tooltip/index.d.cts +6 -0
- package/dist/uds/dist/components/client/index.d.cts +59 -0
- package/dist/uds/dist/components/client/providers/UDSBreakpointsConfigProvider.d.cts +4 -0
- package/dist/uds/dist/components/client/providers/UDSConfigProvider.d.cts +3 -0
- package/dist/uds/dist/components/index.d.cts +61 -0
- package/dist/uds/dist/config/dist/index.d.cts +4 -0
- package/dist/uds/dist/css-tokens/dist/index.d.cts +2 -0
- package/dist/uds/dist/fixtures/dist/index.d.cts +2 -0
- package/dist/uds/dist/fonts/dist/index.d.cts +2 -0
- package/dist/uds/dist/index.d.cts +93 -0
- package/dist/uds/dist/modes/dist/index.d.cts +2 -0
- package/dist/uds/dist/runtime/bottomSheetConfig.d.cts +3 -0
- package/dist/uds/dist/runtime/breakpointsConfig.d.cts +4 -0
- package/dist/uds/dist/runtime/index.d.cts +7 -0
- package/dist/uds/dist/runtime/popoverConfig.d.cts +5 -0
- package/dist/uds/dist/runtime/toastConfig.d.cts +4 -0
- package/dist/uds/dist/runtime/tooltipConfig.d.cts +5 -0
- package/dist/uds/dist/runtime/udsConfig.d.cts +8 -0
- package/dist/uds/dist/styles/styler.d.cts +2 -0
- package/dist/uds/dist/styles/stylerTypes.d.cts +3 -0
- package/dist/uds/dist/tailwind/dist/config/dist/index.d.cts +2 -0
- package/dist/uds/dist/tailwind/dist/index.d.cts +3 -0
- package/dist/uds/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.cts +2 -0
- package/dist/uds/dist/tailwind/dist/utils/parseTokens.d.cts +2 -0
- package/dist/uds/dist/tokens/automation/index.d.cts +10 -0
- package/dist/uds/dist/tokens/configs/shadow.d.cts +3 -0
- package/dist/uds/dist/tokens/consts/cssTokens.d.cts +2 -0
- package/dist/uds/dist/tokens/consts/defaultModes.d.cts +2 -0
- package/dist/uds/dist/tokens/consts/fontDeclarationsMap.d.cts +2 -0
- package/dist/uds/dist/tokens/index.d.cts +28 -0
- package/dist/uds/dist/tokens/parseButtonVariants.d.cts +3 -0
- package/dist/uds/dist/tokens/types.d.cts +9 -0
- package/dist/uds/dist/tokens/utils/getFontUrls.d.cts +4 -0
- package/dist/uds/dist/tokens/utils/spectrum.d.cts +3 -0
- package/dist/uds/dist/types/dist/index.d.cts +11 -0
- package/dist/uds/dist/types.d.cts +2 -0
- package/dist/uds/generated/componentData.cjs +1427 -1427
- package/dist/uds/generated/componentData.js +1427 -1427
- package/generated/componentData.json +1601 -1601
- package/package.json +1 -1
|
@@ -8,19 +8,60 @@ const require_entryPoints = require('../utils/entryPoints.cjs');
|
|
|
8
8
|
const require_nodeUtils = require('./nodeUtils.cjs');
|
|
9
9
|
const require_index = require('../config/dist/index.cjs');
|
|
10
10
|
const require_safelist = require('../purger/optimized/utils/safelist.cjs');
|
|
11
|
+
const require_runner_helpers = require('./runner.helpers.cjs');
|
|
11
12
|
const require_utils = require('./utils.cjs');
|
|
12
13
|
const require_generate_helpers = require('./generate.helpers.cjs');
|
|
13
14
|
const require_generate = require('./generate.cjs');
|
|
14
|
-
const require_runner_helpers = require('./runner.helpers.cjs');
|
|
15
15
|
let node_fs = require("node:fs");
|
|
16
16
|
node_fs = require_runtime.__toESM(node_fs);
|
|
17
|
-
let node_path = require("node:path");
|
|
18
|
-
node_path = require_runtime.__toESM(node_path);
|
|
19
17
|
|
|
20
18
|
//#region src/css/runner.ts
|
|
19
|
+
const getScopedPackageOutputPath = (packageName, outFile) => {
|
|
20
|
+
if (typeof outFile === "string" && outFile.trim().length > 0) return outFile;
|
|
21
|
+
return `dist/${packageName.split("/").pop() ?? packageName}.css`;
|
|
22
|
+
};
|
|
23
|
+
const normalizeScopedPackageConfig = (scopedPackageValue) => {
|
|
24
|
+
if (typeof scopedPackageValue === "string") return { config: scopedPackageValue };
|
|
25
|
+
return scopedPackageValue;
|
|
26
|
+
};
|
|
27
|
+
const resolveScopedEntryDirs = (packageRoot, packageDir, entry) => {
|
|
28
|
+
if (entry === void 0) return [packageDir];
|
|
29
|
+
return require_entryPoints.resolveEntryPaths(entry, packageRoot).map((resolvedEntry) => resolvedEntry.absolutePath);
|
|
30
|
+
};
|
|
31
|
+
const PATH_SEPARATOR = "/";
|
|
32
|
+
const normalizePath = (value) => value.replace(/\\/g, PATH_SEPARATOR);
|
|
33
|
+
const isAbsolutePath = (value) => {
|
|
34
|
+
const normalizedValue = normalizePath(value);
|
|
35
|
+
return normalizedValue.startsWith(PATH_SEPARATOR) || /^[A-Za-z]:\//.test(normalizedValue);
|
|
36
|
+
};
|
|
37
|
+
const joinPath = (...parts) => {
|
|
38
|
+
const filteredParts = parts.filter((part) => part.length > 0);
|
|
39
|
+
if (filteredParts.length === 0) return "";
|
|
40
|
+
return filteredParts.map((part, index) => {
|
|
41
|
+
const normalizedPart = normalizePath(part);
|
|
42
|
+
if (index === 0) return normalizedPart.replace(/\/+$/g, "");
|
|
43
|
+
return normalizedPart.replace(/^\/+|\/+$/g, "");
|
|
44
|
+
}).join(PATH_SEPARATOR).replace(/\/+/g, PATH_SEPARATOR).replace(/\/\.\//g, PATH_SEPARATOR);
|
|
45
|
+
};
|
|
46
|
+
const dirnamePath = (value) => {
|
|
47
|
+
const normalizedValue = normalizePath(value).replace(/\/+$/g, "");
|
|
48
|
+
const lastSeparatorIndex = normalizedValue.lastIndexOf(PATH_SEPARATOR);
|
|
49
|
+
if (lastSeparatorIndex <= 0) return lastSeparatorIndex === 0 ? PATH_SEPARATOR : ".";
|
|
50
|
+
return normalizedValue.slice(0, lastSeparatorIndex);
|
|
51
|
+
};
|
|
52
|
+
const basenamePath = (value) => {
|
|
53
|
+
const normalizedValue = normalizePath(value).replace(/\/+$/g, "");
|
|
54
|
+
const lastSeparatorIndex = normalizedValue.lastIndexOf(PATH_SEPARATOR);
|
|
55
|
+
return lastSeparatorIndex >= 0 ? normalizedValue.slice(lastSeparatorIndex + 1) : normalizedValue;
|
|
56
|
+
};
|
|
57
|
+
const resolveOutputPath = (workspaceDir, outFile) => isAbsolutePath(outFile) ? outFile : joinPath(workspaceDir, outFile);
|
|
58
|
+
const ensureOutputDirectory = (outputPath) => {
|
|
59
|
+
const outputDir = dirnamePath(outputPath);
|
|
60
|
+
if (!node_fs.default.existsSync(outputDir)) node_fs.default.mkdirSync(outputDir, { recursive: true });
|
|
61
|
+
};
|
|
21
62
|
const SOURCE_FILE_PATTERN = /\.(jsx?|tsx?)$/i;
|
|
22
|
-
const getWatchDirs = (dirs) => [...new Set(dirs.filter((dir) => !dir.split(
|
|
23
|
-
const isCoveredByRecursiveWatch = (watchPath, targetPath) => targetPath === watchPath || targetPath.startsWith(`${watchPath}${
|
|
63
|
+
const getWatchDirs = (dirs) => [...new Set(dirs.filter((dir) => !normalizePath(dir).split(PATH_SEPARATOR).includes("node_modules")))];
|
|
64
|
+
const isCoveredByRecursiveWatch = (watchPath, targetPath) => targetPath === watchPath || targetPath.startsWith(`${watchPath}${PATH_SEPARATOR}`);
|
|
24
65
|
const getEntryWatchTargets = (entries) => {
|
|
25
66
|
const directoryTargets = getWatchDirs(entries.filter((entry) => entry.kind === "directory").map((entry) => entry.absolutePath)).map((watchPath) => ({
|
|
26
67
|
watchPath,
|
|
@@ -44,7 +85,7 @@ const watchSourceFiles = (targets, onFileChange) => {
|
|
|
44
85
|
targets.forEach((target) => {
|
|
45
86
|
node_fs.default.watch(target.watchPath, { recursive: target.recursive }, (_eventType, filename) => {
|
|
46
87
|
if (!filename || !SOURCE_FILE_PATTERN.test(filename)) return;
|
|
47
|
-
if (target.fileNames && !target.fileNames.includes(
|
|
88
|
+
if (target.fileNames && !target.fileNames.includes(basenamePath(String(filename)))) return;
|
|
48
89
|
onFileChange();
|
|
49
90
|
});
|
|
50
91
|
});
|
|
@@ -82,8 +123,13 @@ const createQueuedRegenerator = (options) => {
|
|
|
82
123
|
};
|
|
83
124
|
return regenerate;
|
|
84
125
|
};
|
|
126
|
+
const printVerboseScanFiles = (log, workspaceDir, filePaths) => {
|
|
127
|
+
require_runner_helpers.getVerboseScanFileList(workspaceDir, filePaths).forEach((filePath) => {
|
|
128
|
+
log.listItem(filePath);
|
|
129
|
+
});
|
|
130
|
+
};
|
|
85
131
|
const runCssCommand = async (options, context) => {
|
|
86
|
-
if (!node_fs.default.existsSync(
|
|
132
|
+
if (!node_fs.default.existsSync(joinPath(options.workspaceDir, String(options.themeConfigPath)))) {
|
|
87
133
|
await runSimpleMode(options, context);
|
|
88
134
|
return;
|
|
89
135
|
}
|
|
@@ -104,7 +150,8 @@ const runSimpleMode = async (options, context) => {
|
|
|
104
150
|
scope: options.scope,
|
|
105
151
|
configPath,
|
|
106
152
|
isWatch: options.watch,
|
|
107
|
-
silent: options.silent
|
|
153
|
+
silent: options.silent,
|
|
154
|
+
verbose: options.verbose
|
|
108
155
|
});
|
|
109
156
|
if (options.watch) await runSimpleModeWatch(options, context, entry, configPath, result.packageDirs ?? []);
|
|
110
157
|
} catch (error) {
|
|
@@ -184,7 +231,7 @@ const loadThemeModeSetup = async (options) => {
|
|
|
184
231
|
};
|
|
185
232
|
const runThemeMode = async (options, context) => {
|
|
186
233
|
const workspaceDir = options.workspaceDir;
|
|
187
|
-
const outputPath =
|
|
234
|
+
const outputPath = resolveOutputPath(workspaceDir, String(options.outFile));
|
|
188
235
|
let effectiveSilent = options.silent;
|
|
189
236
|
let log = require_logger.createLogger({ silent: effectiveSilent });
|
|
190
237
|
log.spinStart("Loading theme configuration...");
|
|
@@ -205,12 +252,21 @@ const runThemeMode = async (options, context) => {
|
|
|
205
252
|
const generateThemeModeCSS = async (opts) => {
|
|
206
253
|
const genStartTime = performance.now();
|
|
207
254
|
const genLog = opts?.isWatch ? require_logger.createLogger({ silent: true }) : log;
|
|
255
|
+
const scopedCssOutputs = [];
|
|
208
256
|
genLog.spinStart("Scanning app code...");
|
|
209
257
|
const appScanResult = await require_nodeUtils.scanDirectoriesForSafelist(entryDirs, colorModes, context.variants, context.autoVariants, context.componentData, appVariantDefaults, runtimeConfigValues);
|
|
210
|
-
genLog.spinStop("✅",
|
|
258
|
+
genLog.spinStop("✅", require_runner_helpers.getScanSummaryMessage({
|
|
259
|
+
label: "app",
|
|
260
|
+
filesScanned: appScanResult.filesScanned,
|
|
261
|
+
filesWithComponents: appScanResult.filesWithComponents,
|
|
262
|
+
componentCount: appScanResult.components.length,
|
|
263
|
+
mode: "app"
|
|
264
|
+
}));
|
|
265
|
+
if (options.verbose) printVerboseScanFiles(genLog, workspaceDir, appScanResult.filePaths);
|
|
211
266
|
genLog.spinStart("Generating main CSS...");
|
|
212
267
|
const inheritedClasses = [...appScanResult.safelist];
|
|
213
268
|
const inheritedComponents = new Set(appScanResult.components);
|
|
269
|
+
const scopedPackageTargets = [];
|
|
214
270
|
const processInheritedPackage = async (packageName) => {
|
|
215
271
|
genLog.spinStart(`Processing package: ${packageName}...`);
|
|
216
272
|
const packageDir = require_nodeUtils.findPackageSourceDir(packageName);
|
|
@@ -222,12 +278,50 @@ const runThemeMode = async (options, context) => {
|
|
|
222
278
|
const packageScanResult = await require_nodeUtils.scanDirectoryForSafelist(packageDir, colorModes, context.variants, context.autoVariants, context.componentData, appVariantDefaults, runtimeConfigValues, true);
|
|
223
279
|
inheritedClasses.push(...packageScanResult.safelist);
|
|
224
280
|
packageScanResult.components.forEach((comp) => inheritedComponents.add(comp));
|
|
225
|
-
genLog.spinStop("✅",
|
|
281
|
+
genLog.spinStop("✅", require_runner_helpers.getScanSummaryMessage({
|
|
282
|
+
label: packageName,
|
|
283
|
+
filesScanned: packageScanResult.filesScanned,
|
|
284
|
+
filesWithComponents: packageScanResult.filesWithComponents,
|
|
285
|
+
componentCount: packageScanResult.components.length,
|
|
286
|
+
mode: "inherit"
|
|
287
|
+
}));
|
|
288
|
+
if (options.verbose) printVerboseScanFiles(genLog, workspaceDir, packageScanResult.filePaths);
|
|
289
|
+
};
|
|
290
|
+
const processScopedPackage = async (packageName, scopedPackageValue) => {
|
|
291
|
+
genLog.spinStart(`Processing scoped package: ${packageName}...`);
|
|
292
|
+
const scopedPackageConfig = normalizeScopedPackageConfig(scopedPackageValue);
|
|
293
|
+
const packageRoot = require_nodeUtils.findPackageRoot(packageName);
|
|
294
|
+
const packageDir = require_nodeUtils.findPackageSourceDir(packageName);
|
|
295
|
+
if (!packageRoot || !packageDir) {
|
|
296
|
+
genLog.spinStop("⚠️", `Scoped package not found: ${packageName}`);
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
const scopeClass = require_nodeUtils.getPackageUdsScope(packageName);
|
|
300
|
+
if (!scopeClass) {
|
|
301
|
+
genLog.spinStop("⚠️", `Scoped package missing package.json uds.scope: ${packageName}`);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const entryDirs = resolveScopedEntryDirs(packageRoot, packageDir, scopedPackageConfig.entry);
|
|
305
|
+
entryDirs.forEach((entryDir) => {
|
|
306
|
+
if (!packageDirs.includes(entryDir)) packageDirs.push(entryDir);
|
|
307
|
+
});
|
|
308
|
+
scopedPackageTargets.push({
|
|
309
|
+
packageName,
|
|
310
|
+
packageRoot,
|
|
311
|
+
packageDir,
|
|
312
|
+
entryDirs,
|
|
313
|
+
scopeClass,
|
|
314
|
+
config: scopedPackageConfig
|
|
315
|
+
});
|
|
226
316
|
};
|
|
227
317
|
await (themeConfig.inherit ?? []).reduce(async (promise, packageName) => {
|
|
228
318
|
await promise;
|
|
229
319
|
await processInheritedPackage(packageName);
|
|
230
320
|
}, Promise.resolve());
|
|
321
|
+
await Object.entries(themeConfig.scoped ?? {}).reduce(async (promise, [packageName, scopedPackageConfig]) => {
|
|
322
|
+
await promise;
|
|
323
|
+
await processScopedPackage(packageName, scopedPackageConfig);
|
|
324
|
+
}, Promise.resolve());
|
|
231
325
|
const mainSafelist = require_safelist.deduplicateSafelist([
|
|
232
326
|
...inheritedClasses,
|
|
233
327
|
...require_safelist.getThemeAndScaleClasses(colorModes),
|
|
@@ -244,24 +338,80 @@ const runThemeMode = async (options, context) => {
|
|
|
244
338
|
...require_generate_helpers.getPruneVarSafelist(themeConfig.css)
|
|
245
339
|
]
|
|
246
340
|
});
|
|
247
|
-
|
|
248
|
-
if (!node_fs.default.existsSync(outputDir)) node_fs.default.mkdirSync(outputDir, { recursive: true });
|
|
341
|
+
ensureOutputDirectory(outputPath);
|
|
249
342
|
node_fs.default.writeFileSync(outputPath, mainCssResult.css);
|
|
250
|
-
|
|
343
|
+
for (const scopedPackageTarget of scopedPackageTargets) {
|
|
344
|
+
const packageConfig = await require_nodeUtils.loadConfigFile(isAbsolutePath(scopedPackageTarget.config.config) ? scopedPackageTarget.config.config : joinPath(scopedPackageTarget.packageRoot, scopedPackageTarget.config.config)) ?? require_index.defaultTokensConfig;
|
|
345
|
+
const packageVariantDefaults = require_utils.extractVariantDefaults(packageConfig);
|
|
346
|
+
const packageRuntimeConfigValues = require_utils.extractRuntimeConfigValues(packageConfig);
|
|
347
|
+
const packageScanResult = await require_nodeUtils.scanDirectoriesForSafelist(scopedPackageTarget.entryDirs, colorModes, context.variants, context.autoVariants, context.componentData, packageVariantDefaults, packageRuntimeConfigValues, true);
|
|
348
|
+
genLog.spinStop("✅", require_runner_helpers.getScanSummaryMessage({
|
|
349
|
+
label: scopedPackageTarget.packageName,
|
|
350
|
+
filesScanned: packageScanResult.filesScanned,
|
|
351
|
+
filesWithComponents: packageScanResult.filesWithComponents,
|
|
352
|
+
componentCount: packageScanResult.components.length,
|
|
353
|
+
mode: "scoped"
|
|
354
|
+
}));
|
|
355
|
+
if (options.verbose) printVerboseScanFiles(genLog, workspaceDir, packageScanResult.filePaths);
|
|
356
|
+
const packageSafelist = require_safelist.deduplicateSafelist([
|
|
357
|
+
...packageScanResult.safelist,
|
|
358
|
+
...require_safelist.getThemeAndScaleClasses(colorModes),
|
|
359
|
+
...require_safelist.getInternalSafelistClasses()
|
|
360
|
+
]);
|
|
361
|
+
const scopedCssResult = await require_generate.generateCSS([...themeConfig.css?.safelist ?? [], ...packageSafelist], packageConfig, {
|
|
362
|
+
scope: scopedPackageTarget.scopeClass,
|
|
363
|
+
contentDir: scopedPackageTarget.entryDirs,
|
|
364
|
+
cssOptions: themeConfig.css,
|
|
365
|
+
referenceCss: themeConfig.css?.optimization?.deduplicateScopedCss === false ? void 0 : mainCssResult.css,
|
|
366
|
+
safeVarPrefixes: [
|
|
367
|
+
...require_utils.getMotionVarPrefixes(context.componentData, [...packageScanResult.components]),
|
|
368
|
+
...require_utils.getConfigurableCssVariables(),
|
|
369
|
+
...require_generate_helpers.getPruneVarSafelist(themeConfig.css)
|
|
370
|
+
]
|
|
371
|
+
});
|
|
372
|
+
const scopedOutputPath = resolveOutputPath(workspaceDir, getScopedPackageOutputPath(scopedPackageTarget.packageName, scopedPackageTarget.config.outFile));
|
|
373
|
+
ensureOutputDirectory(scopedOutputPath);
|
|
374
|
+
node_fs.default.writeFileSync(scopedOutputPath, scopedCssResult.css);
|
|
375
|
+
scopedCssOutputs.push({
|
|
376
|
+
label: scopedPackageTarget.packageName,
|
|
377
|
+
outputPath: scopedOutputPath,
|
|
378
|
+
sizeGzipBytes: scopedCssResult.sizeGzipBytes,
|
|
379
|
+
optimizationStats: scopedCssResult.optimizationStats
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
const mainCssSummary = require_runner_helpers.getMainCssSummaryMessage({
|
|
251
383
|
sizeGzipBytes: mainCssResult.sizeGzipBytes,
|
|
252
384
|
optimizationStats: mainCssResult.optimizationStats,
|
|
253
385
|
formatBytes: require_utils.formatBytes
|
|
254
|
-
})
|
|
386
|
+
});
|
|
387
|
+
genLog.spinStop("✅", mainCssSummary.summaryLine);
|
|
388
|
+
mainCssSummary.detailLines.forEach((detailLine) => {
|
|
389
|
+
genLog.print(detailLine);
|
|
390
|
+
});
|
|
391
|
+
scopedCssOutputs.forEach((scopedCssOutput) => {
|
|
392
|
+
const scopedCssSummary = require_runner_helpers.getScopedCssSummaryMessage(scopedCssOutput.label, {
|
|
393
|
+
sizeGzipBytes: scopedCssOutput.sizeGzipBytes,
|
|
394
|
+
optimizationStats: scopedCssOutput.optimizationStats,
|
|
395
|
+
formatBytes: require_utils.formatBytes
|
|
396
|
+
});
|
|
397
|
+
genLog.spinStop("✅", scopedCssSummary.summaryLine);
|
|
398
|
+
scopedCssSummary.detailLines.forEach((detailLine) => {
|
|
399
|
+
genLog.print(detailLine);
|
|
400
|
+
});
|
|
401
|
+
});
|
|
255
402
|
const duration = Math.round(performance.now() - genStartTime);
|
|
403
|
+
const outputFileSection = require_runner_helpers.getOutputFileSection(workspaceDir, [outputPath, ...scopedCssOutputs.map((scopedCssOutput) => scopedCssOutput.outputPath)]);
|
|
256
404
|
genLog.newline();
|
|
257
|
-
genLog.print(
|
|
258
|
-
|
|
259
|
-
|
|
405
|
+
genLog.print(outputFileSection.label);
|
|
406
|
+
outputFileSection.paths.forEach((filePath) => {
|
|
407
|
+
genLog.listItem(filePath);
|
|
408
|
+
});
|
|
260
409
|
genLog.newline();
|
|
261
|
-
genLog.print(`${require_colors.magenta("Total time:")} ${duration}
|
|
410
|
+
genLog.print(`${require_colors.magenta("Total time:")} ${require_runner_helpers.formatCssDuration(duration)}`);
|
|
262
411
|
return {
|
|
263
412
|
duration,
|
|
264
413
|
outputPath,
|
|
414
|
+
outputPaths: outputFileSection.paths,
|
|
265
415
|
packageDirs
|
|
266
416
|
};
|
|
267
417
|
};
|
|
@@ -292,7 +442,8 @@ const runThemeMode = async (options, context) => {
|
|
|
292
442
|
onSuccess: (result) => {
|
|
293
443
|
if (!effectiveSilent) {
|
|
294
444
|
const updatedAt = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
295
|
-
|
|
445
|
+
const updatedMessage = result?.duration == null ? "CSS updated" : `CSS updated (${require_runner_helpers.formatCssDuration(result.duration)})`;
|
|
446
|
+
log.print(`${require_colors.gray(`[${updatedAt}]`)} ${require_colors.green(updatedMessage)}`);
|
|
296
447
|
log.newline();
|
|
297
448
|
}
|
|
298
449
|
},
|
|
@@ -4,13 +4,60 @@ let node_path = require("node:path");
|
|
|
4
4
|
node_path = require_runtime.__toESM(node_path);
|
|
5
5
|
|
|
6
6
|
//#region src/css/runner.helpers.ts
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
7
|
+
const getDisplayPath = (cwd, targetPath) => {
|
|
8
|
+
const relativePath = node_path.default.relative(cwd, targetPath);
|
|
9
|
+
return relativePath.length === 0 ? "." : relativePath;
|
|
10
|
+
};
|
|
11
|
+
const getVerboseScanFileList = (cwd, filePaths) => [...new Set(filePaths.map((filePath) => getDisplayPath(cwd, filePath)))].sort((left, right) => left.localeCompare(right));
|
|
12
|
+
const getOptimizationDetailLines = (optimizationStats) => {
|
|
13
|
+
const detailLines = [];
|
|
14
|
+
if (optimizationStats.fontFacesRemoved > 0) detailLines.push(` • removed ${optimizationStats.fontFacesRemoved} unused @font-face`);
|
|
15
|
+
if (optimizationStats.emptyRulesRemoved > 0) detailLines.push(` • removed ${optimizationStats.emptyRulesRemoved} empty rules`);
|
|
16
|
+
return detailLines;
|
|
17
|
+
};
|
|
18
|
+
const formatCssDuration = (durationMs) => {
|
|
19
|
+
return `${(Math.floor(durationMs / 100) / 10).toFixed(1)}s`;
|
|
20
|
+
};
|
|
21
|
+
const getCssSummaryMessage = (options) => {
|
|
22
|
+
const { label, optimizationStats, sizeGzipBytes, formatBytes } = options;
|
|
23
|
+
const summaryLine = `${label}: ${formatBytes(sizeGzipBytes)} gzip`;
|
|
24
|
+
if (!optimizationStats) return {
|
|
25
|
+
summaryLine,
|
|
26
|
+
detailLines: []
|
|
27
|
+
};
|
|
10
28
|
const { originalSizeGzip, fontFacesRemoved, emptyRulesRemoved } = optimizationStats;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
29
|
+
if (originalSizeGzip - sizeGzipBytes <= 0) return {
|
|
30
|
+
summaryLine,
|
|
31
|
+
detailLines: []
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
summaryLine,
|
|
35
|
+
detailLines: getOptimizationDetailLines({
|
|
36
|
+
originalSizeGzip,
|
|
37
|
+
fontFacesRemoved,
|
|
38
|
+
emptyRulesRemoved
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const getMainCssSummaryMessage = (options) => {
|
|
43
|
+
return getCssSummaryMessage({
|
|
44
|
+
label: "Main CSS",
|
|
45
|
+
...options
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const getScopedCssSummaryMessage = (packageName, options) => getCssSummaryMessage({
|
|
49
|
+
label: `${packageName} CSS`,
|
|
50
|
+
...options
|
|
51
|
+
});
|
|
52
|
+
const getOutputFileSection = (cwd, outputPaths) => ({
|
|
53
|
+
label: "Output files:",
|
|
54
|
+
paths: outputPaths.map((outputPath) => getDisplayPath(cwd, outputPath))
|
|
55
|
+
});
|
|
56
|
+
const getScanSummaryMessage = (options) => {
|
|
57
|
+
const nonComponentFileCount = Math.max(options.filesScanned - options.filesWithComponents, 0);
|
|
58
|
+
const fileLabel = nonComponentFileCount === 1 ? "file" : "files";
|
|
59
|
+
const componentLabel = options.componentCount === 1 ? "component" : "components";
|
|
60
|
+
return `${options.label}: ${nonComponentFileCount} ${fileLabel}, ${options.componentCount} ${componentLabel} (${options.mode})`;
|
|
14
61
|
};
|
|
15
62
|
const getWatchDirectoryGroups = (entryDirs, dirs) => {
|
|
16
63
|
const watchDirs = [...new Set(dirs.filter((dir) => !dir.split(node_path.default.sep).includes("node_modules")))];
|
|
@@ -21,5 +68,10 @@ const getWatchDirectoryGroups = (entryDirs, dirs) => {
|
|
|
21
68
|
};
|
|
22
69
|
|
|
23
70
|
//#endregion
|
|
71
|
+
exports.formatCssDuration = formatCssDuration;
|
|
24
72
|
exports.getMainCssSummaryMessage = getMainCssSummaryMessage;
|
|
73
|
+
exports.getOutputFileSection = getOutputFileSection;
|
|
74
|
+
exports.getScanSummaryMessage = getScanSummaryMessage;
|
|
75
|
+
exports.getScopedCssSummaryMessage = getScopedCssSummaryMessage;
|
|
76
|
+
exports.getVerboseScanFileList = getVerboseScanFileList;
|
|
25
77
|
exports.getWatchDirectoryGroups = getWatchDirectoryGroups;
|
|
@@ -2,13 +2,60 @@
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
//#region src/css/runner.helpers.ts
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
const getDisplayPath = (cwd, targetPath) => {
|
|
6
|
+
const relativePath = path.relative(cwd, targetPath);
|
|
7
|
+
return relativePath.length === 0 ? "." : relativePath;
|
|
8
|
+
};
|
|
9
|
+
const getVerboseScanFileList = (cwd, filePaths) => [...new Set(filePaths.map((filePath) => getDisplayPath(cwd, filePath)))].sort((left, right) => left.localeCompare(right));
|
|
10
|
+
const getOptimizationDetailLines = (optimizationStats) => {
|
|
11
|
+
const detailLines = [];
|
|
12
|
+
if (optimizationStats.fontFacesRemoved > 0) detailLines.push(` • removed ${optimizationStats.fontFacesRemoved} unused @font-face`);
|
|
13
|
+
if (optimizationStats.emptyRulesRemoved > 0) detailLines.push(` • removed ${optimizationStats.emptyRulesRemoved} empty rules`);
|
|
14
|
+
return detailLines;
|
|
15
|
+
};
|
|
16
|
+
const formatCssDuration = (durationMs) => {
|
|
17
|
+
return `${(Math.floor(durationMs / 100) / 10).toFixed(1)}s`;
|
|
18
|
+
};
|
|
19
|
+
const getCssSummaryMessage = (options) => {
|
|
20
|
+
const { label, optimizationStats, sizeGzipBytes, formatBytes } = options;
|
|
21
|
+
const summaryLine = `${label}: ${formatBytes(sizeGzipBytes)} gzip`;
|
|
22
|
+
if (!optimizationStats) return {
|
|
23
|
+
summaryLine,
|
|
24
|
+
detailLines: []
|
|
25
|
+
};
|
|
8
26
|
const { originalSizeGzip, fontFacesRemoved, emptyRulesRemoved } = optimizationStats;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
27
|
+
if (originalSizeGzip - sizeGzipBytes <= 0) return {
|
|
28
|
+
summaryLine,
|
|
29
|
+
detailLines: []
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
summaryLine,
|
|
33
|
+
detailLines: getOptimizationDetailLines({
|
|
34
|
+
originalSizeGzip,
|
|
35
|
+
fontFacesRemoved,
|
|
36
|
+
emptyRulesRemoved
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const getMainCssSummaryMessage = (options) => {
|
|
41
|
+
return getCssSummaryMessage({
|
|
42
|
+
label: "Main CSS",
|
|
43
|
+
...options
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const getScopedCssSummaryMessage = (packageName, options) => getCssSummaryMessage({
|
|
47
|
+
label: `${packageName} CSS`,
|
|
48
|
+
...options
|
|
49
|
+
});
|
|
50
|
+
const getOutputFileSection = (cwd, outputPaths) => ({
|
|
51
|
+
label: "Output files:",
|
|
52
|
+
paths: outputPaths.map((outputPath) => getDisplayPath(cwd, outputPath))
|
|
53
|
+
});
|
|
54
|
+
const getScanSummaryMessage = (options) => {
|
|
55
|
+
const nonComponentFileCount = Math.max(options.filesScanned - options.filesWithComponents, 0);
|
|
56
|
+
const fileLabel = nonComponentFileCount === 1 ? "file" : "files";
|
|
57
|
+
const componentLabel = options.componentCount === 1 ? "component" : "components";
|
|
58
|
+
return `${options.label}: ${nonComponentFileCount} ${fileLabel}, ${options.componentCount} ${componentLabel} (${options.mode})`;
|
|
12
59
|
};
|
|
13
60
|
const getWatchDirectoryGroups = (entryDirs, dirs) => {
|
|
14
61
|
const watchDirs = [...new Set(dirs.filter((dir) => !dir.split(path.sep).includes("node_modules")))];
|
|
@@ -19,5 +66,5 @@ const getWatchDirectoryGroups = (entryDirs, dirs) => {
|
|
|
19
66
|
};
|
|
20
67
|
|
|
21
68
|
//#endregion
|
|
22
|
-
export { getMainCssSummaryMessage, getWatchDirectoryGroups };
|
|
69
|
+
export { formatCssDuration, getMainCssSummaryMessage, getOutputFileSection, getScanSummaryMessage, getScopedCssSummaryMessage, getVerboseScanFileList, getWatchDirectoryGroups };
|
|
23
70
|
//# sourceMappingURL=runner.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.helpers.js","names":[],"sources":["../../src/css/runner.helpers.ts"],"sourcesContent":["import path from 'node:path';\n\ntype OptimizationStats = {\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n};\n\ntype MainCssSummaryOptions = {\n sizeGzipBytes: number;\n optimizationStats?: OptimizationStats;\n formatBytes: (bytes: number) => string;\n};\n\nconst
|
|
1
|
+
{"version":3,"file":"runner.helpers.js","names":[],"sources":["../../src/css/runner.helpers.ts"],"sourcesContent":["import path from 'node:path';\n\ntype OptimizationStats = {\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n};\n\ntype MainCssSummaryOptions = {\n sizeGzipBytes: number;\n optimizationStats?: OptimizationStats;\n formatBytes: (bytes: number) => string;\n};\n\ntype CssSummaryOptions = MainCssSummaryOptions & {\n label: string;\n};\n\ntype CssSummaryMessage = {\n summaryLine: string;\n detailLines: string[];\n};\n\ntype OutputFileSection = {\n label: string;\n paths: string[];\n};\n\ntype ScanSummaryOptions = {\n label: string;\n filesScanned: number;\n filesWithComponents: number;\n componentCount: number;\n mode: 'app' | 'inherit' | 'scoped';\n};\n\nconst getDisplayPath = (cwd: string, targetPath: string): string => {\n const relativePath = path.relative(cwd, targetPath);\n return relativePath.length === 0 ? '.' : relativePath;\n};\n\nconst getVerboseScanFileList = (cwd: string, filePaths: string[]): string[] =>\n [...new Set(filePaths.map((filePath) => getDisplayPath(cwd, filePath)))].sort((left, right) =>\n left.localeCompare(right),\n );\n\nconst getOptimizationDetailLines = (optimizationStats: OptimizationStats): string[] => {\n const detailLines: string[] = [];\n\n if (optimizationStats.fontFacesRemoved > 0) {\n detailLines.push(` • removed ${optimizationStats.fontFacesRemoved} unused @font-face`);\n }\n\n if (optimizationStats.emptyRulesRemoved > 0) {\n detailLines.push(` • removed ${optimizationStats.emptyRulesRemoved} empty rules`);\n }\n\n return detailLines;\n};\n\nconst formatCssDuration = (durationMs: number): string => {\n const seconds = Math.floor(durationMs / 100) / 10;\n return `${seconds.toFixed(1)}s`;\n};\n\nconst getCssSummaryMessage = (options: CssSummaryOptions): CssSummaryMessage => {\n const { label, optimizationStats, sizeGzipBytes, formatBytes } = options;\n const summaryLine = `${label}: ${formatBytes(sizeGzipBytes)} gzip`;\n\n if (!optimizationStats) {\n return {\n summaryLine,\n detailLines: [],\n };\n }\n\n const { originalSizeGzip, fontFacesRemoved, emptyRulesRemoved } = optimizationStats;\n const savedBytesGzip = originalSizeGzip - sizeGzipBytes;\n\n if (savedBytesGzip <= 0) {\n return {\n summaryLine,\n detailLines: [],\n };\n }\n\n return {\n summaryLine,\n detailLines: getOptimizationDetailLines({\n originalSizeGzip,\n fontFacesRemoved,\n emptyRulesRemoved,\n }),\n };\n};\n\nconst getMainCssSummaryMessage = (options: MainCssSummaryOptions): CssSummaryMessage => {\n return getCssSummaryMessage({\n label: 'Main CSS',\n ...options,\n });\n};\n\nconst getScopedCssSummaryMessage = (\n packageName: string,\n options: MainCssSummaryOptions,\n): CssSummaryMessage =>\n getCssSummaryMessage({\n label: `${packageName} CSS`,\n ...options,\n });\n\nconst getOutputFileSection = (cwd: string, outputPaths: string[]): OutputFileSection => ({\n label: 'Output files:',\n paths: outputPaths.map((outputPath) => getDisplayPath(cwd, outputPath)),\n});\n\nconst getScanSummaryMessage = (options: ScanSummaryOptions): string => {\n const nonComponentFileCount = Math.max(options.filesScanned - options.filesWithComponents, 0);\n const fileLabel = nonComponentFileCount === 1 ? 'file' : 'files';\n const componentLabel = options.componentCount === 1 ? 'component' : 'components';\n return `${options.label}: ${nonComponentFileCount} ${fileLabel}, ${options.componentCount} ${componentLabel} (${options.mode})`;\n};\n\nconst getWatchDirectoryGroups = (entryDirs: string[], dirs: string[]) => {\n const watchDirs = [\n ...new Set(dirs.filter((dir) => !dir.split(path.sep).includes('node_modules'))),\n ];\n const filteredPackageDirs = watchDirs.filter((dir) => !entryDirs.includes(dir));\n\n return {\n watchDirs,\n filteredPackageDirs,\n };\n};\n\nexport {\n formatCssDuration,\n getDisplayPath,\n getMainCssSummaryMessage,\n getOutputFileSection,\n getScanSummaryMessage,\n getScopedCssSummaryMessage,\n getVerboseScanFileList,\n getWatchDirectoryGroups,\n};\n"],"mappings":";;;;AAoCA,MAAM,kBAAkB,KAAa,eAA+B;CAClE,MAAM,eAAe,KAAK,SAAS,KAAK,WAAW;AACnD,QAAO,aAAa,WAAW,IAAI,MAAM;;AAG3C,MAAM,0BAA0B,KAAa,cAC3C,CAAC,GAAG,IAAI,IAAI,UAAU,KAAK,aAAa,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,MAAM,UACnF,KAAK,cAAc,MAAM,CAC1B;AAEH,MAAM,8BAA8B,sBAAmD;CACrF,MAAM,cAAwB,EAAE;AAEhC,KAAI,kBAAkB,mBAAmB,EACvC,aAAY,KAAK,mBAAmB,kBAAkB,iBAAiB,oBAAoB;AAG7F,KAAI,kBAAkB,oBAAoB,EACxC,aAAY,KAAK,mBAAmB,kBAAkB,kBAAkB,cAAc;AAGxF,QAAO;;AAGT,MAAM,qBAAqB,eAA+B;AAExD,QAAO,IADS,KAAK,MAAM,aAAa,IAAI,GAAG,IAC7B,QAAQ,EAAE,CAAC;;AAG/B,MAAM,wBAAwB,YAAkD;CAC9E,MAAM,EAAE,OAAO,mBAAmB,eAAe,gBAAgB;CACjE,MAAM,cAAc,GAAG,MAAM,IAAI,YAAY,cAAc,CAAC;AAE5D,KAAI,CAAC,kBACH,QAAO;EACL;EACA,aAAa,EAAE;EAChB;CAGH,MAAM,EAAE,kBAAkB,kBAAkB,sBAAsB;AAGlE,KAFuB,mBAAmB,iBAEpB,EACpB,QAAO;EACL;EACA,aAAa,EAAE;EAChB;AAGH,QAAO;EACL;EACA,aAAa,2BAA2B;GACtC;GACA;GACA;GACD,CAAC;EACH;;AAGH,MAAM,4BAA4B,YAAsD;AACtF,QAAO,qBAAqB;EAC1B,OAAO;EACP,GAAG;EACJ,CAAC;;AAGJ,MAAM,8BACJ,aACA,YAEA,qBAAqB;CACnB,OAAO,GAAG,YAAY;CACtB,GAAG;CACJ,CAAC;AAEJ,MAAM,wBAAwB,KAAa,iBAA8C;CACvF,OAAO;CACP,OAAO,YAAY,KAAK,eAAe,eAAe,KAAK,WAAW,CAAC;CACxE;AAED,MAAM,yBAAyB,YAAwC;CACrE,MAAM,wBAAwB,KAAK,IAAI,QAAQ,eAAe,QAAQ,qBAAqB,EAAE;CAC7F,MAAM,YAAY,0BAA0B,IAAI,SAAS;CACzD,MAAM,iBAAiB,QAAQ,mBAAmB,IAAI,cAAc;AACpE,QAAO,GAAG,QAAQ,MAAM,IAAI,sBAAsB,GAAG,UAAU,IAAI,QAAQ,eAAe,GAAG,eAAe,IAAI,QAAQ,KAAK;;AAG/H,MAAM,2BAA2B,WAAqB,SAAmB;CACvE,MAAM,YAAY,CAChB,GAAG,IAAI,IAAI,KAAK,QAAQ,QAAQ,CAAC,IAAI,MAAM,KAAK,IAAI,CAAC,SAAS,eAAe,CAAC,CAAC,CAChF;AAGD,QAAO;EACL;EACA,qBAJ0B,UAAU,QAAQ,QAAQ,CAAC,UAAU,SAAS,IAAI,CAAC;EAK9E"}
|