@yahoo/uds-v5-wip 1.24.0 → 1.26.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 (57) hide show
  1. package/dist/config/dist/component-resolution.d.ts +1 -1
  2. package/dist/config/dist/consts/defaultColors.d.ts +2 -1
  3. package/dist/config/dist/createConfig.d.ts +55 -31
  4. package/dist/config/dist/createConfig.js +44 -22
  5. package/dist/config/dist/preset-merge.js +5 -3
  6. package/dist/config/dist/propertyGroups.d.ts +5 -0
  7. package/dist/config/dist/serialize.d.ts +9 -1
  8. package/dist/config/dist/serialize.js +17 -2
  9. package/dist/config/dist/types.d.ts +2 -1
  10. package/dist/config.d.ts +197 -197
  11. package/dist/config.js +1 -1
  12. package/dist/core/dist/compositeStyles.d.ts +22 -0
  13. package/dist/core/dist/compositeStyles.js +51 -0
  14. package/dist/core/dist/createComponent.d.ts +2 -1
  15. package/dist/core/dist/createComponentExample.d.ts +2 -1
  16. package/dist/core/dist/createProvider.d.ts +2 -1
  17. package/dist/core/dist/generated/stylePropsTwMap.d.ts +2 -1
  18. package/dist/core/dist/getComponentStyles.d.ts +2 -1
  19. package/dist/core/dist/getStyles.d.ts +2 -1
  20. package/dist/core/dist/getStyles.js +9 -9
  21. package/dist/core/dist/index.d.ts +1 -1
  22. package/dist/core/dist/index.js +1 -1
  23. package/dist/core/dist/propMappings.d.ts +2 -1
  24. package/dist/core/dist/resolveMotionState.d.ts +2 -1
  25. package/dist/core/dist/transformPreset.d.ts +2 -1
  26. package/dist/core/dist/withDefaultStyleProps.d.ts +2 -1
  27. package/dist/core.d.ts +2 -2
  28. package/dist/core.js +2 -2
  29. package/dist/foundational-presets/dist/boldVibrant.d.ts +198 -197
  30. package/dist/foundational-presets/dist/brutalist.d.ts +198 -197
  31. package/dist/foundational-presets/dist/candy.d.ts +198 -197
  32. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +198 -197
  33. package/dist/foundational-presets/dist/corporate.d.ts +198 -197
  34. package/dist/foundational-presets/dist/darkMoody.d.ts +198 -197
  35. package/dist/foundational-presets/dist/defaultPreset.d.ts +198 -197
  36. package/dist/foundational-presets/dist/forest.d.ts +198 -197
  37. package/dist/foundational-presets/dist/highContrast.d.ts +198 -197
  38. package/dist/foundational-presets/dist/lavender.d.ts +198 -197
  39. package/dist/foundational-presets/dist/luxury.d.ts +198 -197
  40. package/dist/foundational-presets/dist/monochrome.d.ts +198 -197
  41. package/dist/foundational-presets/dist/motion.d.ts +2 -1
  42. package/dist/foundational-presets/dist/neonCyber.d.ts +198 -197
  43. package/dist/foundational-presets/dist/newspaper.d.ts +198 -197
  44. package/dist/foundational-presets/dist/ocean.d.ts +198 -197
  45. package/dist/foundational-presets/dist/slate.d.ts +198 -197
  46. package/dist/foundational-presets/dist/sunset.d.ts +198 -197
  47. package/dist/foundational-presets/dist/terminal.d.ts +198 -197
  48. package/dist/foundational-presets/dist/warmOrganic.d.ts +198 -197
  49. package/dist/loader/dist/loader/style-transform.js +8 -8
  50. package/dist/loader/dist/packages/core/dist/compositeStyles.js +43 -0
  51. package/dist/loader/dist/packages/core/dist/getStyles.js +1 -1
  52. package/dist/loader/dist/packages/core/dist/index.js +1 -1
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/package.json +3 -3
  55. package/dist/core/dist/macros.d.ts +0 -21
  56. package/dist/core/dist/macros.js +0 -49
  57. package/dist/loader/dist/packages/core/dist/macros.js +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yahoo/uds-v5-wip",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "description": "Universal Design System",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -119,8 +119,8 @@
119
119
  "@babel/traverse": "^7.29.0",
120
120
  "@babel/types": "^7.29.0",
121
121
  "@modelcontextprotocol/sdk": "^1.27.1",
122
- "@uds/cli": "npm:@yahoo/uds-v5-wip-cli@1.24.0",
123
- "@uds/types": "npm:@yahoo/uds-v5-wip-types@1.24.0",
122
+ "@uds/cli": "npm:@yahoo/uds-v5-wip-cli@1.26.0",
123
+ "@uds/types": "npm:@yahoo/uds-v5-wip-types@1.26.0",
124
124
  "clsx": "^2.1.1",
125
125
  "react-day-picker": "^9.14.0",
126
126
  "unplugin": "^3.0.0",
@@ -1,21 +0,0 @@
1
- import { MacroConfig } from "@uds/types";
2
-
3
- //#region ../core/dist/macros.d.ts
4
- /** Set the macro config (called by loader at build time) */
5
- declare function setMacroConfig(config: MacroConfig): void;
6
- /** Get the current macro config */
7
- declare function getMacroConfig(): MacroConfig;
8
- /**
9
- * Expand macro props into their constituent style props + marker classes.
10
- *
11
- * - Macros are lowest priority: explicit props always win
12
- * - Nested macros are supported (a macro value can reference another macro)
13
- * - Circular references are detected and throw
14
- * - Marker classes (e.g. "elevation-elevation_1") are returned for modifier targeting
15
- */
16
- declare function expandMacros(props: Record<string, unknown>, config?: MacroConfig): {
17
- expanded: Record<string, unknown>;
18
- markerClasses: string[];
19
- };
20
- //#endregion
21
- export { expandMacros, getMacroConfig, setMacroConfig };
@@ -1,49 +0,0 @@
1
- import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
2
- import "../../utils/dist/index.js";
3
- //#region ../core/dist/macros.js
4
- /**
5
- * Runtime macro config — set by the loader/codegen at build time.
6
- * Maps macro prop names to their value → style-bag definitions.
7
- */
8
- let macroConfig = {};
9
- /** Set the macro config (called by loader at build time) */
10
- function setMacroConfig(config) {
11
- macroConfig = config;
12
- }
13
- /** Get the current macro config */
14
- function getMacroConfig() {
15
- return macroConfig;
16
- }
17
- /**
18
- * Expand macro props into their constituent style props + marker classes.
19
- *
20
- * - Macros are lowest priority: explicit props always win
21
- * - Nested macros are supported (a macro value can reference another macro)
22
- * - Circular references are detected and throw
23
- * - Marker classes (e.g. "elevation-elevation_1") are returned for modifier targeting
24
- */
25
- function expandMacros(props, config = macroConfig) {
26
- const expanded = {};
27
- const markers = [];
28
- const seen = /* @__PURE__ */ new Set();
29
- function expand(key, value) {
30
- if (key in config && typeof value === "string") {
31
- if (seen.has(key)) throw new Error(`Circular macro: ${[...seen, key].join(" → ")}`);
32
- seen.add(key);
33
- markers.push(`${key}-${safeTokenName(value)}`);
34
- const bag = config[key][value];
35
- if (bag) {
36
- for (const [k, v] of Object.entries(bag)) if (!(k in expanded)) expand(k, v);
37
- }
38
- seen.delete(key);
39
- } else if (!(key in expanded)) expanded[key] = value;
40
- }
41
- for (const [key, value] of Object.entries(props)) if (key in config) expand(key, value);
42
- for (const [key, value] of Object.entries(props)) if (!(key in config)) expanded[key] = value;
43
- return {
44
- expanded,
45
- markerClasses: markers
46
- };
47
- }
48
- //#endregion
49
- export { expandMacros, getMacroConfig, setMacroConfig };
@@ -1,41 +0,0 @@
1
- import { safeTokenName } from "../../../../../utils/dist/string-utils/cssVar.js";
2
- import "../../../../../utils/dist/index.js";
3
- //#region ../loader/dist/packages/core/dist/macros.js
4
- /**
5
- * Runtime macro config — set by the loader/codegen at build time.
6
- * Maps macro prop names to their value → style-bag definitions.
7
- */
8
- let macroConfig = {};
9
- /**
10
- * Expand macro props into their constituent style props + marker classes.
11
- *
12
- * - Macros are lowest priority: explicit props always win
13
- * - Nested macros are supported (a macro value can reference another macro)
14
- * - Circular references are detected and throw
15
- * - Marker classes (e.g. "elevation-elevation_1") are returned for modifier targeting
16
- */
17
- function expandMacros(props, config = macroConfig) {
18
- const expanded = {};
19
- const markers = [];
20
- const seen = /* @__PURE__ */ new Set();
21
- function expand(key, value) {
22
- if (key in config && typeof value === "string") {
23
- if (seen.has(key)) throw new Error(`Circular macro: ${[...seen, key].join(" → ")}`);
24
- seen.add(key);
25
- markers.push(`${key}-${safeTokenName(value)}`);
26
- const bag = config[key][value];
27
- if (bag) {
28
- for (const [k, v] of Object.entries(bag)) if (!(k in expanded)) expand(k, v);
29
- }
30
- seen.delete(key);
31
- } else if (!(key in expanded)) expanded[key] = value;
32
- }
33
- for (const [key, value] of Object.entries(props)) if (key in config) expand(key, value);
34
- for (const [key, value] of Object.entries(props)) if (!(key in config)) expanded[key] = value;
35
- return {
36
- expanded,
37
- markerClasses: markers
38
- };
39
- }
40
- //#endregion
41
- export { expandMacros };