@yahoo/uds-create-config 5.95.2 → 5.96.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.
@@ -56,6 +56,11 @@ function convertLinkedTokenValue({ path, value, sourcePlatform, destinationPlatf
56
56
  if (LENGTH_GROUPS.has(group)) {
57
57
  if (typeof value === "number") return value;
58
58
  if (group === "size" && typeof value === "string" && (value === "auto" || /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(value))) return value;
59
+ if (group === "size" && typeof value === "string" && [
60
+ "min-content",
61
+ "max-content",
62
+ "fit-content"
63
+ ].includes(value)) throw new Error(`[uds] Linked native size token "${path}" has unsupported CSS intrinsic sizing value ${JSON.stringify(value)}. Use an explicit native layout: replacing it with auto alone can stretch a component in a column parent. Account for parent direction, label shrink, and caller width/minWidth/maxWidth.`);
59
64
  const match = typeof value === "string" ? LENGTH.exec(value) : null;
60
65
  if (!match) throw unsupported("native", path, value, "a px or rem length");
61
66
  if (match[2] === "rem" && remBase === void 0) throw new Error(`[uds] Linked native token "${path}" has value ${JSON.stringify(value)}, but its source has no fixed root font size for rem conversion.`);
@@ -4772,7 +4772,12 @@ var Config = class Config {
4772
4772
  continue;
4773
4773
  }
4774
4774
  for (const nested of collectRefs(includeExtensionBases ? entity.toJSON() : source.dependencyBody(kindOf(target), entity.toJSON()))) {
4775
- if (sourceOf(nested) !== void 0) continue;
4775
+ if (sourceOf(nested) !== void 0) {
4776
+ if (!source.entityOf(kindOf(nested))?.answeredHere) continue;
4777
+ const local = source.resolve(kindOf(nested), pathOf(nested));
4778
+ if (local) queue.push(`${kindOf(nested)}:${local.path}`);
4779
+ continue;
4780
+ }
4776
4781
  queue.push(`${kindOf(nested)}:${pathOf(nested)}`);
4777
4782
  }
4778
4783
  const names = source.entityOf(kindOf(target))?.nameEdges?.(entity.toJSON()) ?? [];
@@ -1,4 +1,4 @@
1
- import { isRef, kindOf, memberOf, pathOf, refLeaf } from "./utils/refs.js";
1
+ import { isRef, kindOf, memberOf, pathOf, qualifyRefs, refLeaf, sourceOf } from "./utils/refs.js";
2
2
  import { forwardsOf, rootLayerOf } from "../entities/system/element.js";
3
3
  import { booleanValuesIn } from "./utils/enumerated.js";
4
4
  import { propValueDomain, refListOf, resolveComponentProps, takenByForward } from "./projections.js";
@@ -157,9 +157,17 @@ function forwardRoutes(decl) {
157
157
  function routedPropIn(config, layers, decl) {
158
158
  const layerKey = refPath(decl.target);
159
159
  if (!layerKey) return void 0;
160
- const target = refPath(layers?.[layerKey]);
161
- if (!target) return void 0;
162
- return resolveComponentProps(config, target)[intoName(decl.into)];
160
+ const element = layers?.[layerKey];
161
+ if (!isRef(element) || kindOf(element) !== "component") return void 0;
162
+ const owner = config.configFor(element);
163
+ if (!owner) return void 0;
164
+ const landed = resolveComponentProps(owner, pathOf(element))[intoName(decl.into)];
165
+ const source = sourceOf(element);
166
+ return source === void 0 ? landed : qualifyRefs({
167
+ value: landed,
168
+ source,
169
+ owns: (kind) => owner.ownedKinds().includes(kind)
170
+ });
163
171
  }
164
172
  /** {@link routedPropIn} for a component the config already holds. The layers are what the resolution
165
173
  * needs; a path is the convenience for a caller that has one instead. */
@@ -694,7 +694,7 @@ function unstatableConditions(config) {
694
694
  });
695
695
  continue;
696
696
  }
697
- const sourceCategory = modifierCategory(source, splitRef(ref).qualifiedPath) ?? "plain";
697
+ const sourceCategory = modifierCategory(source, modifier) ?? "plain";
698
698
  const consumerCategory = modifierCategory(config, modifier) ?? "plain";
699
699
  if (sourceCategory !== consumerCategory) found.push({
700
700
  slug,