@yahoo/uds-v5-wip 1.61.0 → 1.62.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 (117) hide show
  1. package/dist/config/dist/AssetGroup.d.ts +75 -0
  2. package/dist/config/dist/AssetGroup.js +114 -0
  3. package/dist/config/dist/Component.d.ts +309 -0
  4. package/dist/config/dist/Component.js +897 -0
  5. package/dist/config/dist/ComponentGroup.d.ts +21 -0
  6. package/dist/config/dist/ComponentGroup.js +46 -0
  7. package/dist/config/dist/CompositeStyle.d.ts +28 -0
  8. package/dist/config/dist/CompositeStyle.js +52 -0
  9. package/dist/config/dist/Config.d.ts +422 -0
  10. package/dist/config/dist/Config.js +1426 -0
  11. package/dist/config/dist/Mode.d.ts +42 -0
  12. package/dist/config/dist/Mode.js +81 -0
  13. package/dist/config/dist/Modifier.d.ts +52 -0
  14. package/dist/config/dist/Modifier.js +97 -0
  15. package/dist/config/dist/MotionDef.d.ts +50 -0
  16. package/dist/config/dist/MotionDef.js +97 -0
  17. package/dist/config/dist/Props.d.ts +235 -126
  18. package/dist/config/dist/Provider.d.ts +21 -0
  19. package/dist/config/dist/Provider.js +14 -0
  20. package/dist/config/dist/StyleProp.d.ts +113 -0
  21. package/dist/config/dist/StyleProp.js +197 -0
  22. package/dist/config/dist/Token.d.ts +56 -0
  23. package/dist/config/dist/Token.js +112 -0
  24. package/dist/config/dist/TokenGroup.d.ts +33 -0
  25. package/dist/config/dist/TokenGroup.js +68 -0
  26. package/dist/config/dist/asset-kind.d.ts +56 -0
  27. package/dist/config/dist/asset-kind.js +29 -0
  28. package/dist/config/dist/brands.d.ts +31 -0
  29. package/dist/config/dist/brands.js +20 -0
  30. package/dist/config/dist/captureCallerPath.d.ts +49 -0
  31. package/dist/config/dist/captureCallerPath.js +95 -0
  32. package/dist/config/dist/colorExpressions.d.ts +132 -0
  33. package/dist/config/dist/colorExpressions.js +148 -0
  34. package/dist/config/dist/defineAssetGroup.d.ts +158 -0
  35. package/dist/config/dist/defineAssetGroup.js +263 -0
  36. package/dist/config/dist/defineProvider.d.ts +30 -0
  37. package/dist/config/dist/defineProvider.js +60 -0
  38. package/dist/config/dist/element-marker.d.ts +55 -0
  39. package/dist/config/dist/element-marker.js +113 -0
  40. package/dist/config/dist/entity-utils.d.ts +27 -0
  41. package/dist/config/dist/entity-utils.js +105 -0
  42. package/dist/config/dist/factories.d.ts +707 -0
  43. package/dist/config/dist/factories.js +393 -0
  44. package/dist/config/dist/foreign-component-name.js +42 -0
  45. package/dist/config/dist/index.d.ts +30 -21
  46. package/dist/config/dist/index.js +26 -14
  47. package/dist/config/dist/interpolate.d.ts +21 -0
  48. package/dist/config/dist/interpolate.js +10 -0
  49. package/dist/config/dist/markers.d.ts +218 -0
  50. package/dist/config/dist/markers.js +67 -0
  51. package/dist/config/dist/refs.d.ts +143 -69
  52. package/dist/config/dist/refs.js +95 -113
  53. package/dist/config/dist/token-override-rows.d.ts +67 -0
  54. package/dist/config/dist/token-override-rows.js +223 -0
  55. package/dist/config/dist/tokenValueType.js +138 -0
  56. package/dist/config/dist/types/css-properties.d.ts +132 -122
  57. package/dist/config/dist/types/css-property-keywords.d.ts +157 -0
  58. package/dist/config/dist/types/css-property-keywords.js +616 -0
  59. package/dist/config/dist/types/css-values.d.ts +18 -16
  60. package/dist/config/dist/types.d.ts +688 -66
  61. package/dist/config/dist/units.d.ts +15 -0
  62. package/dist/config/dist/units.js +16 -0
  63. package/dist/config.d.ts +31 -22
  64. package/dist/config.js +28 -16
  65. package/dist/loader/dist/loader/artifacts.js +26 -9
  66. package/dist/loader/dist/loader.d.ts +11 -23
  67. package/dist/loader/dist/loader.js +54 -99
  68. package/dist/loader/dist/next.js +3 -3
  69. package/dist/loader/dist/transform-runner.js +1 -8
  70. package/dist/loader/dist/unplugin.d.ts +2 -2
  71. package/dist/loader/dist/unplugin.js +2 -2
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/dist/utils/dist/index.js +1 -0
  74. package/dist/utils/dist/motion-utils/resolveMotionState.d.ts +35 -0
  75. package/dist/utils/dist/motion-utils/resolveMotionState.js +33 -0
  76. package/dist/utils/dist/string-utils/componentClassName.d.ts +41 -8
  77. package/dist/utils/dist/string-utils/componentClassName.js +48 -11
  78. package/dist/utils.d.ts +3 -2
  79. package/dist/utils.js +3 -2
  80. package/package.json +3 -3
  81. package/dist/codegen/dist/loader/getLoaderArtifacts.js +0 -2
  82. package/dist/config/dist/bindRender.d.ts +0 -16
  83. package/dist/config/dist/bindRender.js +0 -310
  84. package/dist/config/dist/className.d.ts +0 -54
  85. package/dist/config/dist/className.js +0 -77
  86. package/dist/config/dist/component-config.d.ts +0 -862
  87. package/dist/config/dist/component-config.js +0 -163
  88. package/dist/config/dist/component-refs.d.ts +0 -121
  89. package/dist/config/dist/createConfig.d.ts +0 -456
  90. package/dist/config/dist/createConfig.js +0 -503
  91. package/dist/config/dist/createStyler.d.ts +0 -35
  92. package/dist/config/dist/createStyler.js +0 -93
  93. package/dist/config/dist/defineComponent.d.ts +0 -317
  94. package/dist/config/dist/defineComponent.js +0 -264
  95. package/dist/config/dist/defineCompositeStyle.d.ts +0 -93
  96. package/dist/config/dist/defineCompositeStyle.js +0 -18
  97. package/dist/config/dist/defineMotionConfig.d.ts +0 -152
  98. package/dist/config/dist/definePreview.d.ts +0 -45
  99. package/dist/config/dist/definePreview.js +0 -35
  100. package/dist/config/dist/defineStyleProp.d.ts +0 -289
  101. package/dist/config/dist/defineStyleProp.js +0 -61
  102. package/dist/config/dist/merge-utils.js +0 -51
  103. package/dist/config/dist/propertyAcceptedTypes.d.ts +0 -19
  104. package/dist/config/dist/propertyAcceptedTypes.js +0 -220
  105. package/dist/config/dist/resolveCompoundProps.d.ts +0 -65
  106. package/dist/config/dist/resolveCompoundProps.js +0 -120
  107. package/dist/config/dist/resolveStyleProp.d.ts +0 -157
  108. package/dist/config/dist/resolveStyleProp.js +0 -260
  109. package/dist/config/dist/runtime-registry.js +0 -37
  110. package/dist/config/dist/serialize.d.ts +0 -47
  111. package/dist/config/dist/serialize.js +0 -111
  112. package/dist/config/dist/sniffTokenType.d.ts +0 -7
  113. package/dist/config/dist/sniffTokenType.js +0 -67
  114. package/dist/config/dist/style-prop-runtime.d.ts +0 -75
  115. package/dist/config/dist/style-prop-runtime.js +0 -390
  116. package/dist/loader/dist/loader/internal-meta.js +0 -59
  117. package/dist/loader/dist/loader/lower-new-api-primitive.js +0 -252
@@ -1,54 +0,0 @@
1
- //#region ../config/dist/className.d.ts
2
- //#region src/className.d.ts
3
- /**
4
- * **NEW-API ONLY** — shared utility-class derivation for
5
- * `defineComponent`-authored components.
6
- *
7
- * Single source of truth for `(prop, value, styleProp) → class`.
8
- * Consumed by:
9
- *
10
- * - `bindRender.ts` (runtime) — emits the per-layer className
11
- * bundle as JSX renders.
12
- * - `getStylesForConfig.ts` (build-time) — derives the same
13
- * className list for the CSS scanner's safelist so the purger
14
- * keeps every class the runtime can produce.
15
- *
16
- * Both paths MUST agree on the className shape. Centralising the
17
- * derivation here is the contract: any change to the convention
18
- * (e.g. boolean-alias handling) updates one place and both paths
19
- * stay in lockstep.
20
- *
21
- * Does NOT touch the legacy `@uds/core`'s `getStyles` /
22
- * `propMappings` — that's the legacy `createComponent` factory's
23
- * world and lives in a different package.
24
- */
25
- /**
26
- * Build the utility-class name a style prop emits for a given
27
- * JSX-level value. Mirrors the codegen convention in
28
- * `prepareCss.ts`'s @utility emission:
29
- *
30
- * - `classPrefix === ''` — the value IS the class (e.g.
31
- * `<Box display="block">` → `.block`).
32
- * - Boolean `true` — the class IS the bare `classPrefix`
33
- * (`<Box border>` / `<Box border={true}>` → `.border`, never
34
- * `.border-true`). Falsy (`undefined` / `null` / `false`) →
35
- * `undefined`, so the caller omits the class entirely. The "no
36
- * border" state is the default; adding a class to undo one that
37
- * was never applied is pointless.
38
- * - Bracketed arbitrary values (`'[#abc]'`, `'[100px]'`) keep
39
- * their brackets verbatim: `bg-[#abc]`, `w-[100px]`.
40
- * - Otherwise: `${classPrefix}-${safeTokenName(value)}`. Authors
41
- * write the original token name (`'1.5'`); the @utility block
42
- * is keyed by the class-name-safe form (`'1_5'`), so apply the
43
- * conversion at emit time. Bracketed arbitrary values are left
44
- * alone — Tailwind's wildcard utility expansion expects them
45
- * verbatim.
46
- *
47
- * Returns `undefined` when no class should be emitted — callers
48
- * skip the contribution rather than push a malformed token.
49
- */
50
- declare function buildStylePropClassName(styleProp: {
51
- classPrefix: string;
52
- }, value: unknown): string | undefined; //#endregion
53
- //#endregion
54
- export { buildStylePropClassName };
@@ -1,77 +0,0 @@
1
- //#region ../config/dist/className.js
2
- /**
3
- * **NEW-API ONLY** — shared utility-class derivation for
4
- * `defineComponent`-authored components.
5
- *
6
- * Single source of truth for `(prop, value, styleProp) → class`.
7
- * Consumed by:
8
- *
9
- * - `bindRender.ts` (runtime) — emits the per-layer className
10
- * bundle as JSX renders.
11
- * - `getStylesForConfig.ts` (build-time) — derives the same
12
- * className list for the CSS scanner's safelist so the purger
13
- * keeps every class the runtime can produce.
14
- *
15
- * Both paths MUST agree on the className shape. Centralising the
16
- * derivation here is the contract: any change to the convention
17
- * (e.g. boolean-alias handling) updates one place and both paths
18
- * stay in lockstep.
19
- *
20
- * Does NOT touch the legacy `@uds/core`'s `getStyles` /
21
- * `propMappings` — that's the legacy `createComponent` factory's
22
- * world and lives in a different package.
23
- */
24
- /**
25
- * Convert a token name to its class-name-safe form. Mirrors
26
- * `safeTokenName` from `@uds/utils`: `.` → `_`, `/` → `-`. Inlined
27
- * to keep `@uds/config` free of a cross-package import for a one-line
28
- * transform.
29
- *
30
- * toSafeTokenName('1.5') // → '1_5'
31
- * toSafeTokenName('always/black') // → 'always-black'
32
- * toSafeTokenName('brand') // → 'brand'
33
- */
34
- function toSafeTokenName(value) {
35
- return value.replace(/\./g, "_").replace(/\//g, "-");
36
- }
37
- /**
38
- * Build the utility-class name a style prop emits for a given
39
- * JSX-level value. Mirrors the codegen convention in
40
- * `prepareCss.ts`'s @utility emission:
41
- *
42
- * - `classPrefix === ''` — the value IS the class (e.g.
43
- * `<Box display="block">` → `.block`).
44
- * - Boolean `true` — the class IS the bare `classPrefix`
45
- * (`<Box border>` / `<Box border={true}>` → `.border`, never
46
- * `.border-true`). Falsy (`undefined` / `null` / `false`) →
47
- * `undefined`, so the caller omits the class entirely. The "no
48
- * border" state is the default; adding a class to undo one that
49
- * was never applied is pointless.
50
- * - Bracketed arbitrary values (`'[#abc]'`, `'[100px]'`) keep
51
- * their brackets verbatim: `bg-[#abc]`, `w-[100px]`.
52
- * - Otherwise: `${classPrefix}-${safeTokenName(value)}`. Authors
53
- * write the original token name (`'1.5'`); the @utility block
54
- * is keyed by the class-name-safe form (`'1_5'`), so apply the
55
- * conversion at emit time. Bracketed arbitrary values are left
56
- * alone — Tailwind's wildcard utility expansion expects them
57
- * verbatim.
58
- *
59
- * Returns `undefined` when no class should be emitted — callers
60
- * skip the contribution rather than push a malformed token.
61
- */
62
- function buildStylePropClassName(styleProp, value) {
63
- if (value === void 0 || value === null || value === false) return void 0;
64
- if (value === true) return styleProp.classPrefix || void 0;
65
- let stringValue = String(value);
66
- if (stringValue.startsWith("{") && stringValue.endsWith("}")) {
67
- const inner = stringValue.slice(1, -1);
68
- const slash = inner.lastIndexOf("/");
69
- stringValue = slash >= 0 ? inner.slice(slash + 1) : inner;
70
- }
71
- const isNoPrefix = styleProp.classPrefix === "";
72
- const safeValue = stringValue.startsWith("[") && stringValue.endsWith("]") ? stringValue : toSafeTokenName(stringValue);
73
- if (isNoPrefix) return safeValue;
74
- return `${styleProp.classPrefix}-${safeValue}`;
75
- }
76
- //#endregion
77
- export { buildStylePropClassName };