@amplifyup/sdk 0.1.18 → 0.1.19

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/react.mjs CHANGED
@@ -2567,6 +2567,31 @@ function AmplifyRenderer({
2567
2567
  pageConfig.layout?.header !== false;
2568
2568
  pageConfig.layout?.footer !== false;
2569
2569
  const renderNode = (node) => {
2570
+ const zoneIdFromProps = node.componentId === "AmplifyZone" ? String(node.props?.zoneId || "") : "";
2571
+ if (node.componentId === "AmplifyZone") {
2572
+ const contentSlot = node.slots?.find((s) => s.slotId === "content") || node.slots?.[0];
2573
+ const children = Array.isArray(contentSlot?.children) ? contentSlot.children : [];
2574
+ return /* @__PURE__ */ jsx(
2575
+ "div",
2576
+ {
2577
+ "data-node-id": node.id,
2578
+ "data-amplifyup-node": "",
2579
+ "data-amplifyup-component": "AmplifyZone",
2580
+ "data-amplifyup-zone": zoneIdFromProps || void 0,
2581
+ "data-zone-id": zoneIdFromProps || void 0,
2582
+ children: /* @__PURE__ */ jsx(
2583
+ "div",
2584
+ {
2585
+ "data-slot-id": "content",
2586
+ "data-amplifyup-slot": "content",
2587
+ "data-parent-node-id": node.id,
2588
+ "data-parent-component-id": "AmplifyZone",
2589
+ children: children.filter(Boolean).map((child) => /* @__PURE__ */ jsx(Fragment$1, { children: renderNode(child) }, child.id))
2590
+ }
2591
+ )
2592
+ }
2593
+ );
2594
+ }
2570
2595
  let slotChildren = {};
2571
2596
  console.log(`[AmplifyRenderer] Rendering node ${node.id} (${node.componentId})`, {
2572
2597
  hasSlots: !!(node.slots && node.slots.length > 0),