@yahoo/uds 3.115.0-beta.1 → 3.115.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.
Files changed (45) hide show
  1. package/dist/cli/commands/sync.cjs +2 -2
  2. package/dist/cli/commands/sync.js +2 -2
  3. package/dist/cli/dist/cli.cjs +1 -1
  4. package/dist/cli/dist/cli.js +1 -1
  5. package/dist/cli/dist/commands/editor-rules.cjs +3 -3
  6. package/dist/cli/dist/commands/editor-rules.js +3 -3
  7. package/dist/cli/dist/utils/rules/config.cjs +1 -1
  8. package/dist/cli/dist/utils/rules/config.js +1 -1
  9. package/dist/cli/runner.cjs +2 -2
  10. package/dist/cli/runner.js +2 -2
  11. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  12. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  13. package/dist/styles/styler.d.cts +1 -1
  14. package/dist/styles/styler.d.ts +1 -1
  15. package/dist/tailwind/dist/commands/css.cjs +2 -2
  16. package/dist/tailwind/dist/commands/css.js +1 -1
  17. package/dist/tailwind/dist/css/generate.cjs +6 -5
  18. package/dist/tailwind/dist/css/generate.js +3 -2
  19. package/dist/tailwind/dist/css/nodeUtils.cjs +156 -0
  20. package/dist/tailwind/dist/css/nodeUtils.js +149 -0
  21. package/dist/tailwind/dist/css/runner.cjs +9 -8
  22. package/dist/tailwind/dist/css/runner.js +3 -2
  23. package/dist/tailwind/dist/css/utils.cjs +1 -163
  24. package/dist/tailwind/dist/css/utils.js +1 -155
  25. package/dist/tailwind/dist/index.d.ts +0 -4
  26. package/dist/tailwind/dist/purger/legacy/purgeCSS.cjs +2 -2
  27. package/dist/tailwind/dist/purger/legacy/purgeCSS.js +2 -2
  28. package/dist/tailwind/dist/purger/optimized/purge.cjs +2 -2
  29. package/dist/tailwind/dist/purger/optimized/purge.js +1 -1
  30. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +2 -2
  31. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +2 -2
  32. package/dist/tailwind/dist/purger/optimized/utils/safelist.cjs +1 -1
  33. package/dist/tailwind/dist/purger/optimized/utils/safelist.js +1 -1
  34. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.cjs +1 -1
  35. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.js +1 -1
  36. package/dist/tailwind/dist/tailwind/plugins/breakpoints.cjs +1 -1
  37. package/dist/tailwind/dist/tailwind/plugins/breakpoints.js +1 -1
  38. package/dist/uds/generated/componentData.cjs +107 -107
  39. package/dist/uds/generated/componentData.js +107 -107
  40. package/generated/componentData.json +142 -142
  41. package/package.json +1 -1
  42. package/dist/tailwind/dist/commands/css.d.ts +0 -3
  43. package/dist/tailwind/dist/commands/generatePurgeCSSData.d.ts +0 -3
  44. package/dist/tailwind/dist/commands/purge.d.ts +0 -4
  45. package/dist/tailwind/dist/purger/legacy/purgeCSS.d.ts +0 -2
@@ -6,14 +6,14 @@ const require_runtime_bottomSheetConfig = require('../../runtime/bottomSheetConf
6
6
  const require_runtime_breakpointsConfig = require('../../runtime/breakpointsConfig.cjs');
7
7
  const require_runtime_toastConfig = require('../../runtime/toastConfig.cjs');
8
8
  const require_runtime_tooltipConfig = require('../../runtime/tooltipConfig.cjs');
9
+ const require_config = require('../dist/utils/rules/config.cjs');
9
10
  const require_colors = require('../dist/lib/colors.cjs');
10
11
  const require_print = require('../dist/lib/print.cjs');
11
12
  const require_box = require('../dist/lib/box.cjs');
12
- const require_config = require('../dist/utils/rules/config.cjs');
13
13
  const require_cli_commands_utils_sortKeys = require('./utils/sortKeys.cjs');
14
- let node_fs = require("node:fs");
15
14
  let node_path = require("node:path");
16
15
  node_path = require_runtime.__toESM(node_path);
16
+ let node_fs = require("node:fs");
17
17
 
18
18
  //#region src/cli/commands/sync.ts
19
19
  const PRODUCTION_ENDPOINT = "https://config.uds.build/api/config";
@@ -4,13 +4,13 @@ import { configToBottomSheetConfigContext } from "../../runtime/bottomSheetConfi
4
4
  import { configToBreakpointsConfigContext } from "../../runtime/breakpointsConfig.js";
5
5
  import { configToToastConfigContext } from "../../runtime/toastConfig.js";
6
6
  import { configToTooltipConfigContext } from "../../runtime/tooltipConfig.js";
7
+ import { getEditorsWithStaleRules } from "../dist/utils/rules/config.js";
7
8
  import { bold, cyan, green, magenta, red, yellow } from "../dist/lib/colors.js";
8
9
  import { print } from "../dist/lib/print.js";
9
10
  import { printBox } from "../dist/lib/box.js";
10
- import { getEditorsWithStaleRules } from "../dist/utils/rules/config.js";
11
11
  import { sortKeys } from "./utils/sortKeys.js";
12
- import { writeFileSync } from "node:fs";
13
12
  import path from "node:path";
13
+ import { writeFileSync } from "node:fs";
14
14
 
15
15
  //#region src/cli/commands/sync.ts
16
16
  const PRODUCTION_ENDPOINT = "https://config.uds.build/api/config";
@@ -1,8 +1,8 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ const require_analytics = require('./utils/analytics.cjs');
2
3
  const require_args = require('./lib/args.cjs');
3
4
  const require_colors = require('./lib/colors.cjs');
4
5
  const require_print = require('./lib/print.cjs');
5
- const require_analytics = require('./utils/analytics.cjs');
6
6
  const require_getCommandHelp = require('./utils/getCommandHelp.cjs');
7
7
  const require_codemod = require('./commands/codemod/codemod.cjs');
8
8
  const require_editor_rules = require('./commands/editor-rules.cjs');
@@ -1,8 +1,8 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { trackEvent } from "./utils/analytics.js";
2
3
  import { parseArgs } from "./lib/args.js";
3
4
  import { cyan, gray, green, magenta, red, white } from "./lib/colors.js";
4
5
  import { print } from "./lib/print.js";
5
- import { trackEvent } from "./utils/analytics.js";
6
6
  import { CODEMOD_SUBCOMMANDS } from "./utils/getCommandHelp.js";
7
7
  import { codemod_default } from "./commands/codemod/codemod.js";
8
8
  import { editor_rules_default } from "./commands/editor-rules.js";
@@ -1,11 +1,11 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
3
- const require_colors = require('../lib/colors.cjs');
4
- const require_print = require('../lib/print.cjs');
5
3
  const require_analytics = require('../utils/analytics.cjs');
6
4
  const require_config = require('../utils/rules/config.cjs');
7
- let node_fs = require("node:fs");
5
+ const require_colors = require('../lib/colors.cjs');
6
+ const require_print = require('../lib/print.cjs');
8
7
  let node_path = require("node:path");
8
+ let node_fs = require("node:fs");
9
9
 
10
10
  //#region ../cli/dist/commands/editor-rules.mjs
11
11
  /*! © 2026 Yahoo, Inc. UDS CLI v0.0.0-development */
@@ -1,10 +1,10 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { blue, green, red, yellow } from "../lib/colors.js";
3
- import { print } from "../lib/print.js";
4
2
  import { trackEvent } from "../utils/analytics.js";
5
3
  import { getAvailableEditors, getEditorConfig, getRuleContent } from "../utils/rules/config.js";
6
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
+ import { blue, green, red, yellow } from "../lib/colors.js";
5
+ import { print } from "../lib/print.js";
7
6
  import { join } from "node:path";
7
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
8
 
9
9
  //#region ../cli/dist/commands/editor-rules.mjs
10
10
  /*! © 2026 Yahoo, Inc. UDS CLI v0.0.0-development */
@@ -1,7 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  const require_runtime = require('../../../../_virtual/_rolldown/runtime.cjs');
3
- let node_fs = require("node:fs");
4
3
  let node_path = require("node:path");
4
+ let node_fs = require("node:fs");
5
5
  let node_url = require("node:url");
6
6
 
7
7
  //#region ../cli/dist/utils/rules/config.mjs
@@ -1,6 +1,6 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { existsSync, readFileSync } from "node:fs";
3
2
  import { dirname, join } from "node:path";
3
+ import { existsSync, readFileSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
6
6
  //#region ../cli/dist/utils/rules/config.mjs
@@ -2,17 +2,17 @@
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_styles_variants = require('../styles/variants.cjs');
4
4
  const require_components_index = require('../components/index.cjs');
5
+ const require_cli = require('./dist/cli.cjs');
5
6
  const require_css = require('../tailwind/dist/commands/css.cjs');
6
7
  const require_generateComponentData = require('../tailwind/dist/commands/generateComponentData.cjs');
7
8
  const require_generatePurgeCSSData = require('../tailwind/dist/commands/generatePurgeCSSData.cjs');
8
9
  const require_purge = require('../tailwind/dist/commands/purge.cjs');
9
- const require_cli = require('./dist/cli.cjs');
10
10
  const require_package = require('../uds/package.cjs');
11
11
  const require_components_experimental_index = require('../components/experimental/index.cjs');
12
12
  const require_cli_commands_sync = require('./commands/sync.cjs');
13
13
  const require_cli_commands_version = require('./commands/version.cjs');
14
- let ts_morph = require("ts-morph");
15
14
  let node_path = require("node:path");
15
+ let ts_morph = require("ts-morph");
16
16
 
17
17
  //#region src/cli/runner.ts
18
18
  require_cli.run([
@@ -1,17 +1,17 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  import { variants } from "../styles/variants.js";
3
3
  import { components_exports } from "../components/index.js";
4
+ import { run } from "./dist/cli.js";
4
5
  import { makeCSSCommand } from "../tailwind/dist/commands/css.js";
5
6
  import { makeGenerateComponentDataCommand } from "../tailwind/dist/commands/generateComponentData.js";
6
7
  import { makeGeneratePurgeCSSDataCommand } from "../tailwind/dist/commands/generatePurgeCSSData.js";
7
8
  import { makePurgeCommand } from "../tailwind/dist/commands/purge.js";
8
- import { run } from "./dist/cli.js";
9
9
  import package_default from "../uds/package.js";
10
10
  import { experimental_exports } from "../components/experimental/index.js";
11
11
  import { syncCommand } from "./commands/sync.js";
12
12
  import { versionCommand } from "./commands/version.js";
13
- import { Project } from "ts-morph";
14
13
  import { join } from "node:path";
14
+ import { Project } from "ts-morph";
15
15
 
16
16
  //#region src/cli/runner.ts
17
17
  run([
@@ -88,6 +88,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
88
88
  *
89
89
  * @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
90
90
  **/
91
- declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "hideEndIcon" | "rootProps" | "active"> & react.RefAttributes<HTMLDivElement>>;
91
+ declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "rootProps" | "hideEndIcon"> & react.RefAttributes<HTMLDivElement>>;
92
92
  //#endregion
93
93
  export { MenuItemCheckbox, type MenuItemCheckboxProps };
@@ -88,6 +88,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
88
88
  *
89
89
  * @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
90
90
  **/
91
- declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "hideEndIcon" | "rootProps" | "active"> & react.RefAttributes<HTMLDivElement>>;
91
+ declare const MenuItemCheckbox: react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "rootProps" | "hideEndIcon"> & react.RefAttributes<HTMLDivElement>>;
92
92
  //#endregion
93
93
  export { MenuItemCheckbox, type MenuItemCheckboxProps };
@@ -150,7 +150,7 @@ declare const getStylesInternal: (props?: ({
150
150
  fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "bold" | "extralight" | "light" | "regular" | "semibold" | "extrabold" | undefined;
151
151
  lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
152
152
  letterSpacing?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
153
- textAlign?: "center" | "justify" | "start" | "end" | undefined;
153
+ textAlign?: "start" | "end" | "center" | "justify" | undefined;
154
154
  textTransform?: "none" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "uppercase" | "lowercase" | "capitalize" | undefined;
155
155
  spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
156
156
  spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
@@ -150,7 +150,7 @@ declare const getStylesInternal: (props?: ({
150
150
  fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "bold" | "extralight" | "light" | "regular" | "semibold" | "extrabold" | undefined;
151
151
  lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
152
152
  letterSpacing?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
153
- textAlign?: "center" | "justify" | "start" | "end" | undefined;
153
+ textAlign?: "start" | "end" | "center" | "justify" | undefined;
154
154
  textTransform?: "none" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "uppercase" | "lowercase" | "capitalize" | undefined;
155
155
  spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
156
156
  spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
@@ -1,7 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  const require_colors = require('../../../cli/dist/lib/colors.cjs');
3
3
  const require_print = require('../../../cli/dist/lib/print.cjs');
4
- const require_utils = require('../css/utils.cjs');
4
+ const require_nodeUtils = require('../css/nodeUtils.cjs');
5
5
  const require_runner = require('../css/runner.cjs');
6
6
  const require_css_helpers = require('./css.helpers.cjs');
7
7
 
@@ -64,7 +64,7 @@ const makeCSSCommand = (getContext) => ({
64
64
  return;
65
65
  }
66
66
  if (require_css_helpers.isInitCommand(props.first)) {
67
- await require_utils.scaffoldThemeConfig(require_css_helpers.getCssInitOptions(props.options));
67
+ await require_nodeUtils.scaffoldThemeConfig(require_css_helpers.getCssInitOptions(props.options));
68
68
  return;
69
69
  }
70
70
  await require_runner.runCssCommand(require_css_helpers.getCssRunOptions(process.cwd(), props.options), {
@@ -1,7 +1,7 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  import { cyan, gray, green, magenta } from "../../../cli/dist/lib/colors.js";
3
3
  import { print } from "../../../cli/dist/lib/print.js";
4
- import { scaffoldThemeConfig } from "../css/utils.js";
4
+ import { scaffoldThemeConfig } from "../css/nodeUtils.js";
5
5
  import { runCssCommand } from "../css/runner.js";
6
6
  import { getCssInitOptions, getCssRunOptions, isInitCommand, shouldShowHelp } from "./css.helpers.js";
7
7
 
@@ -4,13 +4,14 @@ const require_index = require('../../../config/dist/index.cjs');
4
4
  const require_colors = require('../../../cli/dist/lib/colors.cjs');
5
5
  const require_print = require('../../../cli/dist/lib/print.cjs');
6
6
  const require_spinner = require('../../../cli/dist/lib/spinner.cjs');
7
- const require_utils = require('./utils.cjs');
7
+ const require_nodeUtils = require('./nodeUtils.cjs');
8
8
  const require_safelist = require('../purger/optimized/utils/safelist.cjs');
9
+ const require_utils = require('./utils.cjs');
9
10
  const require_generate_helpers = require('./generate.helpers.cjs');
10
- let node_fs = require("node:fs");
11
- node_fs = require_runtime.__toESM(node_fs);
12
11
  let node_path = require("node:path");
13
12
  node_path = require_runtime.__toESM(node_path);
13
+ let node_fs = require("node:fs");
14
+ node_fs = require_runtime.__toESM(node_fs);
14
15
  let node_zlib = require("node:zlib");
15
16
  let postcss = require("postcss");
16
17
  postcss = require_runtime.__toESM(postcss);
@@ -73,13 +74,13 @@ const generateSimpleModeCSS = async (options) => {
73
74
  const colorModes = ["dark"];
74
75
  let tokensConfig = require_index.defaultTokensConfig;
75
76
  if (options.configPath) {
76
- const loadedConfig = await require_utils.loadConfigFile(options.configPath);
77
+ const loadedConfig = await require_nodeUtils.loadConfigFile(options.configPath);
77
78
  if (loadedConfig) tokensConfig = loadedConfig;
78
79
  else if (shouldLogStats) require_spinner.spinStop("⚠️", `Config file not found: ${options.configPath}, using defaults`);
79
80
  }
80
81
  const variantDefaults = require_utils.extractVariantDefaults(tokensConfig);
81
82
  const entryDir = node_path.default.join(options.workspaceDir, options.entry);
82
- const scanResult = await require_utils.scanDirectoryForSafelist(entryDir, colorModes, options.variants, options.autoVariants, options.componentData, variantDefaults);
83
+ const scanResult = await require_nodeUtils.scanDirectoryForSafelist(entryDir, colorModes, options.variants, options.autoVariants, options.componentData, variantDefaults);
83
84
  const totalFilesScanned = scanResult.filesScanned;
84
85
  const allClasses = [...scanResult.safelist];
85
86
  const allComponents = new Set(scanResult.components);
@@ -3,11 +3,12 @@ import { defaultTokensConfig } from "../../../config/dist/index.js";
3
3
  import { cyan, magenta, yellow } from "../../../cli/dist/lib/colors.js";
4
4
  import { print } from "../../../cli/dist/lib/print.js";
5
5
  import { spinStop } from "../../../cli/dist/lib/spinner.js";
6
- import { extractVariantDefaults, getConfigurableCssVariables, getMotionVarPrefixes, loadConfigFile, scanDirectoryForSafelist } from "./utils.js";
6
+ import { loadConfigFile, scanDirectoryForSafelist } from "./nodeUtils.js";
7
7
  import { deduplicateSafelist, getThemeAndScaleClasses } from "../purger/optimized/utils/safelist.js";
8
+ import { extractVariantDefaults, getConfigurableCssVariables, getMotionVarPrefixes } from "./utils.js";
8
9
  import { applyScopedColorModeFix, buildPostcssPlugins, createTailwindPlugin, getCssFeatureFlags, optimizeGeneratedCss, printSimpleModeStats } from "./generate.helpers.js";
9
- import fs from "node:fs";
10
10
  import path from "node:path";
11
+ import fs from "node:fs";
11
12
  import { gzipSync } from "node:zlib";
12
13
  import postcss from "postcss";
13
14
 
@@ -0,0 +1,156 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
3
+ const require_colors = require('../../../cli/dist/lib/colors.cjs');
4
+ const require_print = require('../../../cli/dist/lib/print.cjs');
5
+ const require_purgeFromCode = require('../purger/optimized/purgeFromCode.cjs');
6
+ let node_path = require("node:path");
7
+ node_path = require_runtime.__toESM(node_path);
8
+ let node_fs = require("node:fs");
9
+ node_fs = require_runtime.__toESM(node_fs);
10
+ let node_module = require("node:module");
11
+ let fast_glob = require("fast-glob");
12
+ fast_glob = require_runtime.__toESM(fast_glob);
13
+
14
+ //#region ../tailwind/dist/css/nodeUtils.js
15
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
16
+ const loadConfigFile = async (configPath) => {
17
+ const absolutePath = node_path.default.isAbsolute(configPath) ? configPath : node_path.default.join(process.cwd(), configPath);
18
+ if (!node_fs.default.existsSync(absolutePath)) return null;
19
+ try {
20
+ const module = await import(absolutePath);
21
+ return module.default ?? module.config ?? module;
22
+ } catch (error) {
23
+ throw new Error(`Failed to load config file: ${absolutePath}\n${error instanceof Error ? error.message : "Unknown error"}`);
24
+ }
25
+ };
26
+ const scanDirectoryForSafelist = async (dir, colorModes, variants, autoVariants, componentData, variantDefaults, includeAllClassNamePrimitives = false) => {
27
+ const files = await (0, fast_glob.default)("**/*.{js,jsx,ts,tsx}", {
28
+ cwd: dir,
29
+ absolute: true,
30
+ ignore: ["**/node_modules/**"]
31
+ });
32
+ const results = await Promise.all(files.map(async (filePath) => {
33
+ return require_purgeFromCode.purgeFromCodeOptimized(node_fs.default.readFileSync(filePath, "utf-8"), {
34
+ colorModes,
35
+ variantDefaults,
36
+ variants,
37
+ autoVariants,
38
+ componentData,
39
+ includeAllClassNamePrimitives
40
+ });
41
+ }));
42
+ return {
43
+ safelist: results.flatMap((result) => result.safelist),
44
+ components: [...new Set(results.flatMap((result) => result.components))],
45
+ filesScanned: files.length
46
+ };
47
+ };
48
+ const findMonorepoRoot = (startDir) => {
49
+ const findUp = (currentDir) => {
50
+ if (node_fs.default.existsSync(node_path.default.join(currentDir, "packages"))) return currentDir;
51
+ const parentDir = node_path.default.dirname(currentDir);
52
+ return parentDir === currentDir ? null : findUp(parentDir);
53
+ };
54
+ return findUp(startDir);
55
+ };
56
+ const resolvePackageRoot = (workspaceDir, packageName) => {
57
+ const require = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
58
+ try {
59
+ const resolvedPackageJson = require.resolve(node_path.default.join(packageName, "package.json"), { paths: [workspaceDir] });
60
+ return node_path.default.dirname(resolvedPackageJson);
61
+ } catch {
62
+ return null;
63
+ }
64
+ };
65
+ const findPackageRootInMonorepo = (monorepoRoot, packageName) => {
66
+ const matchingPath = fast_glob.default.sync("packages/**/package.json", {
67
+ cwd: monorepoRoot,
68
+ absolute: true,
69
+ ignore: ["**/node_modules/**", "**/dist/**"]
70
+ }).find((pkgJsonPath) => {
71
+ try {
72
+ return JSON.parse(node_fs.default.readFileSync(pkgJsonPath, "utf8")).name === packageName;
73
+ } catch {
74
+ return false;
75
+ }
76
+ });
77
+ return matchingPath ? node_path.default.dirname(matchingPath) : null;
78
+ };
79
+ const buildPackageSourceCandidates = (workspaceDir, packageName, packageRoot) => {
80
+ return [
81
+ packageRoot ? node_path.default.join(packageRoot, "src") : null,
82
+ packageRoot ? node_path.default.join(packageRoot, "lib") : null,
83
+ packageRoot ? node_path.default.join(packageRoot, "dist") : null,
84
+ packageRoot,
85
+ node_path.default.join(workspaceDir, "node_modules", packageName, "src"),
86
+ node_path.default.join(workspaceDir, "node_modules", packageName, "lib"),
87
+ node_path.default.join(workspaceDir, "node_modules", packageName, "dist"),
88
+ node_path.default.join(workspaceDir, "node_modules", packageName)
89
+ ].filter(Boolean);
90
+ };
91
+ const getFirstExistingPath = (candidates) => candidates.find((candidate) => node_fs.default.existsSync(candidate)) ?? null;
92
+ const findPackageSourceDir = (packageName) => {
93
+ const workspaceDir = process.cwd();
94
+ const monorepoRoot = findMonorepoRoot(workspaceDir);
95
+ let packageRoot = resolvePackageRoot(workspaceDir, packageName);
96
+ if (!packageRoot && monorepoRoot) packageRoot = findPackageRootInMonorepo(monorepoRoot, packageName);
97
+ return getFirstExistingPath(buildPackageSourceCandidates(workspaceDir, packageName, packageRoot));
98
+ };
99
+ const scaffoldThemeConfig = async (options) => {
100
+ const workspaceDir = process.cwd();
101
+ const outputPath = options.outputPath ?? "uds.theme.ts";
102
+ const absoluteOutputPath = node_path.default.isAbsolute(outputPath) ? outputPath : node_path.default.join(workspaceDir, outputPath);
103
+ if (node_fs.default.existsSync(absoluteOutputPath) && !options.force) {
104
+ require_print.print(require_colors.red(`Error: ${outputPath} already exists. Use --force to overwrite.`));
105
+ process.exitCode = 1;
106
+ return;
107
+ }
108
+ const template = `import { defineTheme } from '@yahoo/uds';
109
+
110
+ /**
111
+ * UDS Theme Configuration
112
+ *
113
+ * This file configures CSS generation for your app and shared packages.
114
+ * Run \`uds css\` to generate optimized CSS.
115
+ */
116
+ export default defineTheme({
117
+ // Path to your uds.config.ts file
118
+ config: '${options.configPath ?? "./uds.config.ts"}',
119
+
120
+ // Entry directory for scanning your app code
121
+ entry: '${options.entry ?? "./src"}',
122
+
123
+ // Color modes to include (light mode is always in :root)
124
+ colorModes: ['dark'],
125
+
126
+ // Packages that inherit your app's theme (merged into main uds.css)
127
+ // inherit: ['@your-org/shared-ui'],
128
+
129
+ // CSS generation options (all optional)
130
+ // css: {
131
+ // safelist: [],
132
+ // preflight: true,
133
+ // fontFaceDeclarations: true,
134
+ // optimization: {
135
+ // removeUnusedFonts: false,
136
+ // removeEmptyRules: true,
137
+ // deduplicateScopedCss: true
138
+ // }
139
+ // }
140
+ });
141
+ `;
142
+ node_fs.default.writeFileSync(absoluteOutputPath, template);
143
+ require_print.print("");
144
+ require_print.print(require_colors.green("✅ Created uds.theme.ts"));
145
+ require_print.print("");
146
+ require_print.print(`${require_colors.magenta("Next steps:")}`);
147
+ require_print.print(` 1. Review and customize ${require_colors.cyan(outputPath)}`);
148
+ require_print.print(` 2. Run ${require_colors.cyan("uds css")} to generate CSS`);
149
+ require_print.print("");
150
+ };
151
+
152
+ //#endregion
153
+ exports.findPackageSourceDir = findPackageSourceDir;
154
+ exports.loadConfigFile = loadConfigFile;
155
+ exports.scaffoldThemeConfig = scaffoldThemeConfig;
156
+ exports.scanDirectoryForSafelist = scanDirectoryForSafelist;
@@ -0,0 +1,149 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ import { cyan, green, magenta, red } from "../../../cli/dist/lib/colors.js";
3
+ import { print } from "../../../cli/dist/lib/print.js";
4
+ import { purgeFromCodeOptimized } from "../purger/optimized/purgeFromCode.js";
5
+ import path from "node:path";
6
+ import fs from "node:fs";
7
+ import { createRequire } from "node:module";
8
+ import fg from "fast-glob";
9
+
10
+ //#region ../tailwind/dist/css/nodeUtils.js
11
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
12
+ const loadConfigFile = async (configPath) => {
13
+ const absolutePath = path.isAbsolute(configPath) ? configPath : path.join(process.cwd(), configPath);
14
+ if (!fs.existsSync(absolutePath)) return null;
15
+ try {
16
+ const module = await import(absolutePath);
17
+ return module.default ?? module.config ?? module;
18
+ } catch (error) {
19
+ throw new Error(`Failed to load config file: ${absolutePath}\n${error instanceof Error ? error.message : "Unknown error"}`);
20
+ }
21
+ };
22
+ const scanDirectoryForSafelist = async (dir, colorModes, variants, autoVariants, componentData, variantDefaults, includeAllClassNamePrimitives = false) => {
23
+ const files = await fg("**/*.{js,jsx,ts,tsx}", {
24
+ cwd: dir,
25
+ absolute: true,
26
+ ignore: ["**/node_modules/**"]
27
+ });
28
+ const results = await Promise.all(files.map(async (filePath) => {
29
+ return purgeFromCodeOptimized(fs.readFileSync(filePath, "utf-8"), {
30
+ colorModes,
31
+ variantDefaults,
32
+ variants,
33
+ autoVariants,
34
+ componentData,
35
+ includeAllClassNamePrimitives
36
+ });
37
+ }));
38
+ return {
39
+ safelist: results.flatMap((result) => result.safelist),
40
+ components: [...new Set(results.flatMap((result) => result.components))],
41
+ filesScanned: files.length
42
+ };
43
+ };
44
+ const findMonorepoRoot = (startDir) => {
45
+ const findUp = (currentDir) => {
46
+ if (fs.existsSync(path.join(currentDir, "packages"))) return currentDir;
47
+ const parentDir = path.dirname(currentDir);
48
+ return parentDir === currentDir ? null : findUp(parentDir);
49
+ };
50
+ return findUp(startDir);
51
+ };
52
+ const resolvePackageRoot = (workspaceDir, packageName) => {
53
+ const require = createRequire(import.meta.url);
54
+ try {
55
+ const resolvedPackageJson = require.resolve(path.join(packageName, "package.json"), { paths: [workspaceDir] });
56
+ return path.dirname(resolvedPackageJson);
57
+ } catch {
58
+ return null;
59
+ }
60
+ };
61
+ const findPackageRootInMonorepo = (monorepoRoot, packageName) => {
62
+ const matchingPath = fg.sync("packages/**/package.json", {
63
+ cwd: monorepoRoot,
64
+ absolute: true,
65
+ ignore: ["**/node_modules/**", "**/dist/**"]
66
+ }).find((pkgJsonPath) => {
67
+ try {
68
+ return JSON.parse(fs.readFileSync(pkgJsonPath, "utf8")).name === packageName;
69
+ } catch {
70
+ return false;
71
+ }
72
+ });
73
+ return matchingPath ? path.dirname(matchingPath) : null;
74
+ };
75
+ const buildPackageSourceCandidates = (workspaceDir, packageName, packageRoot) => {
76
+ return [
77
+ packageRoot ? path.join(packageRoot, "src") : null,
78
+ packageRoot ? path.join(packageRoot, "lib") : null,
79
+ packageRoot ? path.join(packageRoot, "dist") : null,
80
+ packageRoot,
81
+ path.join(workspaceDir, "node_modules", packageName, "src"),
82
+ path.join(workspaceDir, "node_modules", packageName, "lib"),
83
+ path.join(workspaceDir, "node_modules", packageName, "dist"),
84
+ path.join(workspaceDir, "node_modules", packageName)
85
+ ].filter(Boolean);
86
+ };
87
+ const getFirstExistingPath = (candidates) => candidates.find((candidate) => fs.existsSync(candidate)) ?? null;
88
+ const findPackageSourceDir = (packageName) => {
89
+ const workspaceDir = process.cwd();
90
+ const monorepoRoot = findMonorepoRoot(workspaceDir);
91
+ let packageRoot = resolvePackageRoot(workspaceDir, packageName);
92
+ if (!packageRoot && monorepoRoot) packageRoot = findPackageRootInMonorepo(monorepoRoot, packageName);
93
+ return getFirstExistingPath(buildPackageSourceCandidates(workspaceDir, packageName, packageRoot));
94
+ };
95
+ const scaffoldThemeConfig = async (options) => {
96
+ const workspaceDir = process.cwd();
97
+ const outputPath = options.outputPath ?? "uds.theme.ts";
98
+ const absoluteOutputPath = path.isAbsolute(outputPath) ? outputPath : path.join(workspaceDir, outputPath);
99
+ if (fs.existsSync(absoluteOutputPath) && !options.force) {
100
+ print(red(`Error: ${outputPath} already exists. Use --force to overwrite.`));
101
+ process.exitCode = 1;
102
+ return;
103
+ }
104
+ const template = `import { defineTheme } from '@yahoo/uds';
105
+
106
+ /**
107
+ * UDS Theme Configuration
108
+ *
109
+ * This file configures CSS generation for your app and shared packages.
110
+ * Run \`uds css\` to generate optimized CSS.
111
+ */
112
+ export default defineTheme({
113
+ // Path to your uds.config.ts file
114
+ config: '${options.configPath ?? "./uds.config.ts"}',
115
+
116
+ // Entry directory for scanning your app code
117
+ entry: '${options.entry ?? "./src"}',
118
+
119
+ // Color modes to include (light mode is always in :root)
120
+ colorModes: ['dark'],
121
+
122
+ // Packages that inherit your app's theme (merged into main uds.css)
123
+ // inherit: ['@your-org/shared-ui'],
124
+
125
+ // CSS generation options (all optional)
126
+ // css: {
127
+ // safelist: [],
128
+ // preflight: true,
129
+ // fontFaceDeclarations: true,
130
+ // optimization: {
131
+ // removeUnusedFonts: false,
132
+ // removeEmptyRules: true,
133
+ // deduplicateScopedCss: true
134
+ // }
135
+ // }
136
+ });
137
+ `;
138
+ fs.writeFileSync(absoluteOutputPath, template);
139
+ print("");
140
+ print(green("✅ Created uds.theme.ts"));
141
+ print("");
142
+ print(`${magenta("Next steps:")}`);
143
+ print(` 1. Review and customize ${cyan(outputPath)}`);
144
+ print(` 2. Run ${cyan("uds css")} to generate CSS`);
145
+ print("");
146
+ };
147
+
148
+ //#endregion
149
+ export { findPackageSourceDir, loadConfigFile, scaffoldThemeConfig, scanDirectoryForSafelist };