@pixldocs/canvas-renderer 0.5.203 → 0.5.204
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-C2gJ23dU.js → index-BfLA9Iqt.js} +44 -25
- package/dist/{index-C2gJ23dU.js.map → index-BfLA9Iqt.js.map} +1 -1
- package/dist/{index-CZ28FLrz.cjs → index-pfkM2NbI.cjs} +44 -25
- package/dist/{index-CZ28FLrz.cjs.map → index-pfkM2NbI.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-xsu5ahea.cjs → vectorPdfExport-BzQh8tO6.cjs} +4 -4
- package/dist/{vectorPdfExport-xsu5ahea.cjs.map → vectorPdfExport-BzQh8tO6.cjs.map} +1 -1
- package/dist/{vectorPdfExport-B8tazQjy.js → vectorPdfExport-NpBdL1eb.js} +4 -4
- package/dist/{vectorPdfExport-B8tazQjy.js.map → vectorPdfExport-NpBdL1eb.js.map} +1 -1
- package/package.json +1 -1
|
@@ -13143,22 +13143,35 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
13143
13143
|
}
|
|
13144
13144
|
return false;
|
|
13145
13145
|
};
|
|
13146
|
-
const
|
|
13147
|
-
if (!(dynamicFields == null ? void 0 : dynamicFields.length)) return
|
|
13146
|
+
const getFieldsForRepeatableKey = (fieldId, fullKey) => {
|
|
13147
|
+
if (!(dynamicFields == null ? void 0 : dynamicFields.length)) return [];
|
|
13148
|
+
const matches = [];
|
|
13149
|
+
const add = (field) => {
|
|
13150
|
+
if (field && !matches.some((existing) => existing.id === field.id)) matches.push(field);
|
|
13151
|
+
};
|
|
13148
13152
|
if (fullKey) {
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13153
|
+
add(dynamicFields.find((f) => f.id === fullKey));
|
|
13154
|
+
const nestedMatch = fullKey.match(NESTED_REPEATABLE_KEY_REGEX);
|
|
13155
|
+
if (nestedMatch) {
|
|
13156
|
+
const [, parentId, , childId, , suffix] = nestedMatch;
|
|
13157
|
+
add(dynamicFields.find((f) => f.id === `field_${parentId}_N_field_${childId}_N_${suffix}`));
|
|
13158
|
+
} else {
|
|
13159
|
+
const match = fullKey.match(REPEATABLE_KEY_REGEX);
|
|
13160
|
+
if (match) {
|
|
13161
|
+
const [, nodeId, , suffix] = match;
|
|
13162
|
+
add(dynamicFields.find((f) => f.id === `field_${nodeId}_N_${suffix}`));
|
|
13163
|
+
}
|
|
13164
|
+
}
|
|
13165
|
+
}
|
|
13166
|
+
add(dynamicFields.find((f) => f.id === fieldId));
|
|
13167
|
+
for (const f of dynamicFields) {
|
|
13168
|
+
if ((f.mappings ?? []).some((m) => (m == null ? void 0 : m.elementId) === fieldId)) add(f);
|
|
13169
|
+
}
|
|
13170
|
+
for (const f of dynamicFields) {
|
|
13171
|
+
if (f.id.endsWith(`_N_${fieldId}`)) add(f);
|
|
13172
|
+
else if (f.id.endsWith(`_${fieldId}`) && f.id.includes("_N_")) add(f);
|
|
13173
|
+
}
|
|
13174
|
+
return matches;
|
|
13162
13175
|
};
|
|
13163
13176
|
if (dynamicFields == null ? void 0 : dynamicFields.length) {
|
|
13164
13177
|
for (const key of Object.keys(formValues)) {
|
|
@@ -13166,8 +13179,8 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
13166
13179
|
if (nestedMatch) {
|
|
13167
13180
|
const [, parentId, parentIndexStr, childId, childIndexStr, fieldId] = nestedMatch;
|
|
13168
13181
|
const value = formValues[key];
|
|
13169
|
-
const
|
|
13170
|
-
for (const
|
|
13182
|
+
const fields = getFieldsForRepeatableKey(fieldId, key);
|
|
13183
|
+
for (const field of fields) for (const mapping of field.mappings ?? []) {
|
|
13171
13184
|
const oldElementId = mapping.elementId;
|
|
13172
13185
|
const mapKeyByElement = `${baseId(parentId)}_${parentIndexStr}_${baseId(childId)}_${childIndexStr}_${oldElementId}`;
|
|
13173
13186
|
let elementIds = resolvedIdMap.get(mapKeyByElement);
|
|
@@ -13218,8 +13231,8 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
13218
13231
|
if (!match) continue;
|
|
13219
13232
|
const [, nodeId, indexStr, fieldId] = match;
|
|
13220
13233
|
const value = formValues[key];
|
|
13221
|
-
const
|
|
13222
|
-
for (const
|
|
13234
|
+
const fields = getFieldsForRepeatableKey(fieldId, key);
|
|
13235
|
+
for (const field of fields) for (const mapping of field.mappings ?? []) {
|
|
13223
13236
|
const oldElementId = mapping.elementId;
|
|
13224
13237
|
const elementIds = /* @__PURE__ */ new Set();
|
|
13225
13238
|
for (const candidateBaseId of getRepeatableBaseIdsForToken(nodeId)) {
|
|
@@ -15863,11 +15876,17 @@ async function resolveFromForm(options) {
|
|
|
15863
15876
|
}
|
|
15864
15877
|
return void 0;
|
|
15865
15878
|
};
|
|
15879
|
+
const entryMetaForLabel = (label) => {
|
|
15880
|
+
const normalized = label.trim().toLowerCase();
|
|
15881
|
+
const item = inferredRepeatableList.find((candidate) => candidate.label.trim().toLowerCase() === normalized);
|
|
15882
|
+
return { entryMeta: item == null ? void 0 : item.entryMeta, nestedEntryMeta: item == null ? void 0 : item.nestedEntryMeta };
|
|
15883
|
+
};
|
|
15866
15884
|
const fallbackRepeatableList = (repeatableFromSchema ?? []).map((r) => ({
|
|
15867
15885
|
nodeId: r.nodeId,
|
|
15868
15886
|
label: r.label,
|
|
15869
15887
|
entryFilter: r.entryFilter,
|
|
15870
|
-
entryCount: entryCountForLabel(r.label)
|
|
15888
|
+
entryCount: entryCountForLabel(r.label),
|
|
15889
|
+
...entryMetaForLabel(r.label)
|
|
15871
15890
|
}));
|
|
15872
15891
|
const repeatableList = inferredRepeatableList.length > 0 ? [
|
|
15873
15892
|
...inferredRepeatableList,
|
|
@@ -16931,9 +16950,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16931
16950
|
}
|
|
16932
16951
|
return svgString;
|
|
16933
16952
|
}
|
|
16934
|
-
const resolvedPackageVersion = "0.5.
|
|
16953
|
+
const resolvedPackageVersion = "0.5.204";
|
|
16935
16954
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16936
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16955
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.204";
|
|
16937
16956
|
const roundParityValue = (value) => {
|
|
16938
16957
|
if (typeof value !== "number") return value;
|
|
16939
16958
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17612,7 +17631,7 @@ class PixldocsRenderer {
|
|
|
17612
17631
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17613
17632
|
}
|
|
17614
17633
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17615
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
17634
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-NpBdL1eb.js");
|
|
17616
17635
|
const prepared = preparePagesForExport(
|
|
17617
17636
|
cloned.pages,
|
|
17618
17637
|
canvasWidth,
|
|
@@ -19796,7 +19815,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19796
19815
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19797
19816
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19798
19817
|
try {
|
|
19799
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
19818
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-NpBdL1eb.js");
|
|
19800
19819
|
try {
|
|
19801
19820
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19802
19821
|
} catch {
|
|
@@ -20196,4 +20215,4 @@ export {
|
|
|
20196
20215
|
buildTeaserBlurFlatKeys as y,
|
|
20197
20216
|
collectFontDescriptorsFromConfig as z
|
|
20198
20217
|
};
|
|
20199
|
-
//# sourceMappingURL=index-
|
|
20218
|
+
//# sourceMappingURL=index-BfLA9Iqt.js.map
|