@yahoo/uds-create-config 5.107.1 → 5.107.2

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.
@@ -549,17 +549,14 @@ const nodeGestureOps = {
549
549
  input: wrapInput,
550
550
  readOnly: false,
551
551
  label: "Wrap children in a container",
552
- description: "Group or wrap elements (\"wrap these in a stack\", \"group the title and the body\", \"put it in a card\"): some of this node's direct children move into a new container element of the given component type, which takes their place among the node's children. They land in the container's children, or in the slot its `slotProp` names, and a slot that lists what it accepts refuses anything else.",
552
+ description: "Group or wrap elements (\"wrap these in a stack\", \"group the title and the body\", \"put it in a card\"): some of this node's direct children move into a new container element of the given component type, which takes their place among the node's children. Use the full component path as listed by the attached system, including any group prefix. The elements land in the container's children, or in the slot its `slotProp` names, and a slot that lists what it accepts refuses anything else.",
553
553
  scope: "item",
554
554
  title: (entity) => `Wrap children of ${entity}`,
555
555
  example: () => ({
556
556
  path: "card",
557
557
  data: {
558
558
  elements: ["card/title", "card/body"],
559
- container: {
560
- type: "VStack",
561
- props: { gap: "2" }
562
- }
559
+ container: { type: "layout/VStack" }
563
560
  }
564
561
  }),
565
562
  handler: (input, config) => applied(config, wrap(config, wrapInput.parse(input)))
@@ -38,7 +38,11 @@ function placedTypeRef({ type, slug, system, field }) {
38
38
  type,
39
39
  slug
40
40
  });
41
- if (kindOf(placed) === "component" && !system.resolve("component", pathOf(placed))) return rejectData(`The system has no component "${pathOf(placed)}".`, field);
41
+ const path = pathOf(placed);
42
+ if (kindOf(placed) === "component" && !system.resolve("component", path)) {
43
+ const matches = system.list("component").filter((entry) => entry.path.endsWith(`/${path}`));
44
+ return rejectData(`The system has no component "${path}".${matches.length === 1 ? ` Did you mean "${matches[0].path}"?` : ""}`, field);
45
+ }
42
46
  return placed;
43
47
  }
44
48
  /** The content fields of one element as a node row holds them. */