@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.
- package/dist/configs/react-native-system.d.ts +22 -4
- package/dist/configs/system.js +4 -0
- package/dist/entities/native/NativeToken.d.ts +22 -4
- package/dist/entities/native/NativeToken.js +2 -1
- package/dist/entities/system/Component.d.ts +35 -2
- package/dist/entities/system/Component.js +224 -9
- package/dist/entities/system/LinkedSystem.js +3 -2
- package/dist/entities/system/Settings.js +1 -1
- package/dist/entities/system/StyleProperty.js +1 -1
- package/dist/entities/system/Token.d.ts +22 -4
- package/dist/entities/system/Token.js +4 -3
- package/dist/entities/system/component-module.d.ts +17 -1
- package/dist/entities/system/component-module.js +54 -2
- package/dist/entities/system/defineComponent.d.ts +53 -13
- package/dist/entities/system/defineComponent.js +1 -0
- package/dist/entities/system/forward-route-invariants.js +1 -1
- package/dist/entities/system/icon-domain-invariants.js +1 -1
- package/dist/entities/system/root-layer-invariants.js +1 -1
- package/dist/entities/system/token-values.js +1 -1
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +33 -2
- package/dist/framework/class-names.d.ts +27 -1
- package/dist/framework/class-names.js +56 -3
- package/dist/framework/component-states.d.ts +40 -0
- package/dist/framework/component-states.js +53 -0
- package/dist/framework/config-ops.d.ts +1 -1
- package/dist/framework/config-ops.js +25 -4
- package/dist/framework/defineSubEntity.d.ts +7 -0
- package/dist/framework/defineSubEntity.js +9 -0
- package/dist/framework/interaction-conditions.d.ts +48 -0
- package/dist/framework/interaction-conditions.js +104 -0
- package/dist/framework/layer-styles.d.ts +5 -1
- package/dist/framework/layer-styles.js +18 -4
- package/dist/framework/projections.js +44 -2
- package/dist/framework/render-spec.js +14 -4
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/deprecated.d.ts +18 -0
- package/dist/framework/utils/deprecated.js +12 -0
- package/dist/framework/validate-spec.js +14 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +6 -4
- package/dist/migrations/20261013154037_component_states.d.ts +19 -0
- package/dist/migrations/20261013154037_component_states.js +74 -0
- package/dist/migrations/20261013164300_token_overrides_list.d.ts +7 -0
- package/dist/migrations/20261013164300_token_overrides_list.js +10 -0
- package/dist/renderer/componentEntry.d.ts +7 -1
- package/dist/renderer/componentEntry.js +30 -1
- package/dist/renderer/forced-stamp.d.ts +26 -0
- package/dist/renderer/forced-stamp.js +50 -0
- package/dist/renderer/index.d.ts +3 -1
- package/dist/renderer/index.js +3 -1
- package/dist/renderer/use-forced-stamp.d.ts +11 -0
- package/dist/renderer/use-forced-stamp.js +50 -0
- package/dist/spec/specToJsx.d.ts +6 -0
- package/dist/spec/specToJsx.js +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/spec/specToJsx.js
CHANGED
|
@@ -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());
|