@pixldocs/canvas-renderer 0.5.201 → 0.5.203
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-CABGgEg5.js → index-C2gJ23dU.js} +18 -8
- package/dist/{index-CABGgEg5.js.map → index-C2gJ23dU.js.map} +1 -1
- package/dist/{index-RcI43b-V.cjs → index-CZ28FLrz.cjs} +18 -8
- package/dist/{index-RcI43b-V.cjs.map → index-CZ28FLrz.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CVpaZO9N.js → vectorPdfExport-B8tazQjy.js} +4 -4
- package/dist/{vectorPdfExport-CVpaZO9N.js.map → vectorPdfExport-B8tazQjy.js.map} +1 -1
- package/dist/{vectorPdfExport-DQjvPb1v.cjs → vectorPdfExport-xsu5ahea.cjs} +4 -4
- package/dist/{vectorPdfExport-DQjvPb1v.cjs.map → vectorPdfExport-xsu5ahea.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -15563,6 +15563,8 @@ function buildRepeatablePagesInputForApply(schema, sectionState) {
|
|
|
15563
15563
|
let entryCount;
|
|
15564
15564
|
if (Array.isArray(entries)) {
|
|
15565
15565
|
entryCount = minEntries === 0 ? entries.length : Math.max(1, entries.length);
|
|
15566
|
+
} else {
|
|
15567
|
+
entryCount = minEntries === 0 ? 0 : minEntries;
|
|
15566
15568
|
}
|
|
15567
15569
|
return {
|
|
15568
15570
|
pageId: page.id,
|
|
@@ -15607,7 +15609,7 @@ function deriveRepeatablePagesFromTemplate(config, inlineFormSchema, formData) {
|
|
|
15607
15609
|
};
|
|
15608
15610
|
const inferEntryCount = (prefix, minEntries) => {
|
|
15609
15611
|
const normalizedPrefix = normalizeTemplateKeyPrefix(prefix);
|
|
15610
|
-
if (!normalizedPrefix) return minEntries === 0 ? 0 : void 0;
|
|
15612
|
+
if (!normalizedPrefix) return minEntries === 0 ? 0 : minEntries ?? void 0;
|
|
15611
15613
|
let maxIndex = 0;
|
|
15612
15614
|
const keyPrefix = `field_${normalizedPrefix}_`;
|
|
15613
15615
|
for (const key of Object.keys(formData ?? {})) {
|
|
@@ -15617,7 +15619,7 @@ function deriveRepeatablePagesFromTemplate(config, inlineFormSchema, formData) {
|
|
|
15617
15619
|
if (match) maxIndex = Math.max(maxIndex, parseInt(match[1], 10));
|
|
15618
15620
|
}
|
|
15619
15621
|
if (maxIndex > 0) return maxIndex;
|
|
15620
|
-
return minEntries
|
|
15622
|
+
return minEntries ?? 0;
|
|
15621
15623
|
};
|
|
15622
15624
|
const collectIds = (nodes, out2) => {
|
|
15623
15625
|
for (const n of nodes ?? []) {
|
|
@@ -15632,9 +15634,11 @@ function deriveRepeatablePagesFromTemplate(config, inlineFormSchema, formData) {
|
|
|
15632
15634
|
if (!boundId) continue;
|
|
15633
15635
|
let templateKeyPrefix;
|
|
15634
15636
|
let entryCount;
|
|
15637
|
+
let foundMinEntries;
|
|
15635
15638
|
if (Array.isArray(schemaPages)) {
|
|
15636
15639
|
const found = schemaPages.find((rp) => (rp == null ? void 0 : rp.id) === boundId || (rp == null ? void 0 : rp.id) === page.id);
|
|
15637
15640
|
templateKeyPrefix = normalizeTemplateKeyPrefix(found == null ? void 0 : found.templateKeyPrefix);
|
|
15641
|
+
foundMinEntries = found == null ? void 0 : found.minEntries;
|
|
15638
15642
|
entryCount = inferEntryCount(templateKeyPrefix ?? (found == null ? void 0 : found.templateKeyPrefix) ?? "", found == null ? void 0 : found.minEntries);
|
|
15639
15643
|
}
|
|
15640
15644
|
if (!templateKeyPrefix && Array.isArray(dynamicFields) && dynamicFields.length > 0) {
|
|
@@ -15666,7 +15670,7 @@ function deriveRepeatablePagesFromTemplate(config, inlineFormSchema, formData) {
|
|
|
15666
15670
|
out.push({
|
|
15667
15671
|
pageId: boundId,
|
|
15668
15672
|
templateKeyPrefix,
|
|
15669
|
-
entryCount: entryCount ?? inferEntryCount(templateKeyPrefix)
|
|
15673
|
+
entryCount: entryCount ?? inferEntryCount(templateKeyPrefix, foundMinEntries)
|
|
15670
15674
|
});
|
|
15671
15675
|
}
|
|
15672
15676
|
}
|
|
@@ -16074,6 +16078,12 @@ function paintRepeatableSections(config, repeatableSections) {
|
|
|
16074
16078
|
function setRepeatable(nodes, nodeId, payload) {
|
|
16075
16079
|
for (const node of nodes) {
|
|
16076
16080
|
const id = node.id;
|
|
16081
|
+
if (node.repeatableSection) {
|
|
16082
|
+
if (Array.isArray(node.children) && setRepeatable(node.children, nodeId, payload)) {
|
|
16083
|
+
return true;
|
|
16084
|
+
}
|
|
16085
|
+
continue;
|
|
16086
|
+
}
|
|
16077
16087
|
if (id && (id === nodeId || baseId(id) === baseId(nodeId))) {
|
|
16078
16088
|
node.repeatableSection = payload;
|
|
16079
16089
|
return true;
|
|
@@ -16921,9 +16931,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16921
16931
|
}
|
|
16922
16932
|
return svgString;
|
|
16923
16933
|
}
|
|
16924
|
-
const resolvedPackageVersion = "0.5.
|
|
16934
|
+
const resolvedPackageVersion = "0.5.203";
|
|
16925
16935
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16926
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16936
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.203";
|
|
16927
16937
|
const roundParityValue = (value) => {
|
|
16928
16938
|
if (typeof value !== "number") return value;
|
|
16929
16939
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -17602,7 +17612,7 @@ class PixldocsRenderer {
|
|
|
17602
17612
|
await this.waitForCanvasScene(container, cloned, i);
|
|
17603
17613
|
}
|
|
17604
17614
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
17605
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
17615
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-B8tazQjy.js");
|
|
17606
17616
|
const prepared = preparePagesForExport(
|
|
17607
17617
|
cloned.pages,
|
|
17608
17618
|
canvasWidth,
|
|
@@ -19786,7 +19796,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
19786
19796
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
19787
19797
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
19788
19798
|
try {
|
|
19789
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
19799
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-B8tazQjy.js");
|
|
19790
19800
|
try {
|
|
19791
19801
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
19792
19802
|
} catch {
|
|
@@ -20186,4 +20196,4 @@ export {
|
|
|
20186
20196
|
buildTeaserBlurFlatKeys as y,
|
|
20187
20197
|
collectFontDescriptorsFromConfig as z
|
|
20188
20198
|
};
|
|
20189
|
-
//# sourceMappingURL=index-
|
|
20199
|
+
//# sourceMappingURL=index-C2gJ23dU.js.map
|