@pixldocs/canvas-renderer 0.5.88 → 0.5.90

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/index.cjs CHANGED
@@ -12472,8 +12472,9 @@ async function resolveFromForm(options) {
12472
12472
  const repeatableNodeMap = /* @__PURE__ */ new Map();
12473
12473
  if (repeatableFromSchema) {
12474
12474
  for (const r of repeatableFromSchema) {
12475
- repeatableNodeMap.set(r.label, r.nodeId);
12476
- repeatableNodeMap.set(r.label.trim().toLowerCase(), r.nodeId);
12475
+ if (!repeatableNodeMap.has(r.label)) repeatableNodeMap.set(r.label, r.nodeId);
12476
+ const labelKey = r.label.trim().toLowerCase();
12477
+ if (!repeatableNodeMap.has(labelKey)) repeatableNodeMap.set(labelKey, r.nodeId);
12477
12478
  }
12478
12479
  }
12479
12480
  let inferredSections;
@@ -12530,18 +12531,21 @@ async function resolveFromForm(options) {
12530
12531
  const nodeId = s.treeNodeId ?? s.id;
12531
12532
  const schemaRepeatable = repeatableFromSchemaByBase.get(baseId(nodeId));
12532
12533
  const parentId = s.parentId;
12534
+ const parentSection = inferredSections.find((ps) => ps.id === parentId);
12535
+ const parentNodeId = parentSection ? parentSection.treeNodeId ?? parentSection.id : parentId;
12533
12536
  const parentEntries = mergedSectionState[parentId] ?? [];
12537
+ const nestedEntryMeta = {};
12534
12538
  const merged = [];
12535
12539
  for (let pi = 0; pi < parentEntries.length; pi++) {
12536
12540
  const childEntries = mergedSectionState[`${parentId}_${pi}_${s.id}`] ?? [];
12537
- for (const e of childEntries) {
12538
- merged.push({
12539
- id: typeof (e == null ? void 0 : e.__entryId) === "string" ? e.__entryId : void 0,
12540
- name: typeof (e == null ? void 0 : e.__entryName) === "string" ? e.__entryName : void 0
12541
- });
12542
- }
12541
+ const meta = childEntries.map((e) => ({
12542
+ id: typeof (e == null ? void 0 : e.__entryId) === "string" ? e.__entryId : void 0,
12543
+ name: typeof (e == null ? void 0 : e.__entryName) === "string" ? e.__entryName : void 0
12544
+ }));
12545
+ nestedEntryMeta[`${baseId(parentNodeId)}_${pi + 1}_${baseId(nodeId)}`] = meta;
12546
+ merged.push(...meta);
12543
12547
  }
12544
- return { nodeId, label: s.label, entryFilter: schemaRepeatable == null ? void 0 : schemaRepeatable.entryFilter, entryMeta: merged };
12548
+ return { nodeId, label: s.label, entryFilter: schemaRepeatable == null ? void 0 : schemaRepeatable.entryFilter, entryMeta: merged, nestedEntryMeta };
12545
12549
  });
12546
12550
  const inferredRepeatableList = [...topLevelRepeatables, ...nestedRepeatables];
12547
12551
  const entryCountForLabel = (label) => {