@yahoo/uds-create-config 5.25.2 → 5.27.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 (58) hide show
  1. package/dist/configs/react-native-system.d.ts +22 -4
  2. package/dist/configs/system.js +4 -0
  3. package/dist/entities/native/NativeToken.d.ts +22 -4
  4. package/dist/entities/native/NativeToken.js +2 -1
  5. package/dist/entities/system/Component.d.ts +35 -2
  6. package/dist/entities/system/Component.js +224 -9
  7. package/dist/entities/system/LinkedSystem.js +3 -2
  8. package/dist/entities/system/Settings.js +1 -1
  9. package/dist/entities/system/StyleProperty.js +1 -1
  10. package/dist/entities/system/Token.d.ts +22 -4
  11. package/dist/entities/system/Token.js +4 -3
  12. package/dist/entities/system/component-module.d.ts +17 -1
  13. package/dist/entities/system/component-module.js +54 -2
  14. package/dist/entities/system/defineComponent.d.ts +53 -13
  15. package/dist/entities/system/defineComponent.js +1 -0
  16. package/dist/entities/system/forward-route-invariants.js +1 -1
  17. package/dist/entities/system/icon-domain-invariants.js +1 -1
  18. package/dist/entities/system/root-layer-invariants.js +1 -1
  19. package/dist/entities/system/token-values.js +1 -1
  20. package/dist/framework/Config.d.ts +1 -1
  21. package/dist/framework/Config.js +33 -2
  22. package/dist/framework/class-names.d.ts +27 -1
  23. package/dist/framework/class-names.js +56 -3
  24. package/dist/framework/component-states.d.ts +40 -0
  25. package/dist/framework/component-states.js +53 -0
  26. package/dist/framework/config-ops.d.ts +1 -1
  27. package/dist/framework/config-ops.js +25 -4
  28. package/dist/framework/defineSubEntity.d.ts +7 -0
  29. package/dist/framework/defineSubEntity.js +9 -0
  30. package/dist/framework/interaction-conditions.d.ts +48 -0
  31. package/dist/framework/interaction-conditions.js +104 -0
  32. package/dist/framework/layer-styles.d.ts +5 -1
  33. package/dist/framework/layer-styles.js +18 -4
  34. package/dist/framework/projections.js +44 -2
  35. package/dist/framework/render-spec.js +14 -4
  36. package/dist/framework/schema-version.d.ts +1 -1
  37. package/dist/framework/schema-version.js +5 -5
  38. package/dist/framework/utils/deprecated.d.ts +18 -0
  39. package/dist/framework/utils/deprecated.js +12 -0
  40. package/dist/framework/validate-spec.js +14 -0
  41. package/dist/index.d.ts +5 -3
  42. package/dist/index.js +6 -4
  43. package/dist/migrations/20261013154037_component_states.d.ts +19 -0
  44. package/dist/migrations/20261013154037_component_states.js +74 -0
  45. package/dist/migrations/20261013164300_token_overrides_list.d.ts +7 -0
  46. package/dist/migrations/20261013164300_token_overrides_list.js +10 -0
  47. package/dist/renderer/componentEntry.d.ts +7 -1
  48. package/dist/renderer/componentEntry.js +30 -1
  49. package/dist/renderer/forced-stamp.d.ts +26 -0
  50. package/dist/renderer/forced-stamp.js +50 -0
  51. package/dist/renderer/index.d.ts +3 -1
  52. package/dist/renderer/index.js +3 -1
  53. package/dist/renderer/use-forced-stamp.d.ts +11 -0
  54. package/dist/renderer/use-forced-stamp.js +50 -0
  55. package/dist/spec/specToJsx.d.ts +6 -0
  56. package/dist/spec/specToJsx.js +5 -0
  57. package/dist/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +2 -2
@@ -1,3 +1,5 @@
1
+ import { UDS_FORCE_STATES } from "../framework/component-states.js";
2
+ import "../framework/class-names.js";
1
3
  import { glyphJsxForm, glyphMemberOf, jsxIdentifier, parseGlyphType } from "./glyph-jsx.js";
2
4
  import { serializeProps } from "@json-render/codegen";
3
5
  //#region src/spec/specToJsx.ts
@@ -108,6 +110,8 @@ function renderElement(key, spec, depth, ctx, ancestors) {
108
110
  if (ancestors.has(key)) return `${indent}{/* cyclic reference to "${key}" omitted */}`;
109
111
  const withSelf = new Set(ancestors).add(key);
110
112
  const { children: _children, ...propsWithoutSlots } = element.props ?? {};
113
+ delete propsWithoutSlots[UDS_FORCE_STATES];
114
+ for (const state of ctx.states?.[element.type] ?? []) delete propsWithoutSlots[state];
111
115
  const slotKeys = collectSlotKeys(element.slots);
112
116
  const slotAttrs = [];
113
117
  for (const [propName, fills] of Object.entries(element.slots ?? {})) if (fills.length === 1) {
@@ -207,6 +211,7 @@ function specToJsx(spec, options) {
207
211
  glyphModules: options?.glyphModules,
208
212
  glyphProps: options?.glyphProps,
209
213
  glyphMembers: options?.glyphMembers,
214
+ states: options?.states,
210
215
  members: /* @__PURE__ */ new Map()
211
216
  };
212
217
  const jsxTree = renderElement(spec.root, spec, 0, ctx, /* @__PURE__ */ new Set());