@pixldocs/canvas-renderer 0.5.219 → 0.5.220
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-CBB2UdwF.cjs → index-DRHaeOxK.cjs} +21 -14
- package/dist/{index-CBB2UdwF.cjs.map → index-DRHaeOxK.cjs.map} +1 -1
- package/dist/{index-DbUPI6zs.js → index-KtRZhEPi.js} +21 -14
- package/dist/{index-DbUPI6zs.js.map → index-KtRZhEPi.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Dejgf_PM.js → vectorPdfExport-D5bhT-57.js} +4 -4
- package/dist/{vectorPdfExport-Dejgf_PM.js.map → vectorPdfExport-D5bhT-57.js.map} +1 -1
- package/dist/{vectorPdfExport-CwyiHDGD.cjs → vectorPdfExport-UBFTDrVt.cjs} +4 -4
- package/dist/{vectorPdfExport-CwyiHDGD.cjs.map → vectorPdfExport-UBFTDrVt.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -13626,7 +13626,9 @@ function formDefSectionsToInferred(schemaSections, repeatableNodeMap) {
|
|
|
13626
13626
|
function convert(defs, parentId) {
|
|
13627
13627
|
var _a, _b;
|
|
13628
13628
|
for (const def of defs) {
|
|
13629
|
-
|
|
13629
|
+
const isRepeatable = def.repeatable === true || def.type === "repeatable";
|
|
13630
|
+
const defFields = def.fields ?? def.entryFields ?? [];
|
|
13631
|
+
if (isRepeatable) {
|
|
13630
13632
|
const rawPrefix = def.templateKeyPrefix || def.label.toLowerCase().replace(/\s+/g, "_");
|
|
13631
13633
|
const labelPrefix = rawPrefix.startsWith("field_") ? rawPrefix : `field_${rawPrefix}`;
|
|
13632
13634
|
const treeNodeId = repeatableNodeMap == null ? void 0 : repeatableNodeMap.get(def.label.trim().toLowerCase());
|
|
@@ -13640,7 +13642,7 @@ function formDefSectionsToInferred(schemaSections, repeatableNodeMap) {
|
|
|
13640
13642
|
templateKeyPrefix: prefix,
|
|
13641
13643
|
minEntries,
|
|
13642
13644
|
maxEntries: def.maxEntries,
|
|
13643
|
-
entryFields:
|
|
13645
|
+
entryFields: defFields.map((f, i) => ({
|
|
13644
13646
|
key: f.key,
|
|
13645
13647
|
label: f.label,
|
|
13646
13648
|
type: mapFormDefFieldType(f.type),
|
|
@@ -13665,7 +13667,7 @@ function formDefSectionsToInferred(schemaSections, repeatableNodeMap) {
|
|
|
13665
13667
|
label: def.label,
|
|
13666
13668
|
order: def.order ?? 0,
|
|
13667
13669
|
type: "single",
|
|
13668
|
-
fields:
|
|
13670
|
+
fields: defFields.map((f, i) => ({
|
|
13669
13671
|
key: f.key,
|
|
13670
13672
|
label: f.label,
|
|
13671
13673
|
type: mapFormDefFieldType(f.type),
|
|
@@ -17276,7 +17278,7 @@ function repeatablePageToSection(page) {
|
|
|
17276
17278
|
label: page.label,
|
|
17277
17279
|
description: page.description,
|
|
17278
17280
|
order: typeof page.order === "number" ? page.order + 1e4 : 1e4,
|
|
17279
|
-
fields: page.fields,
|
|
17281
|
+
fields: page.fields ?? page.entryFields ?? [],
|
|
17280
17282
|
repeatable: true,
|
|
17281
17283
|
minEntries: page.minEntries,
|
|
17282
17284
|
maxEntries: page.maxEntries,
|
|
@@ -17646,7 +17648,8 @@ async function resolveFromForm(options) {
|
|
|
17646
17648
|
(repeatableFromSchema ?? []).map((r) => [baseId(r.nodeId), r])
|
|
17647
17649
|
);
|
|
17648
17650
|
const topLevelRepeatables = inferredSections.filter((s) => s.type === "repeatable" && !s.parentId).map((s) => {
|
|
17649
|
-
const
|
|
17651
|
+
const rawEntries = mergedSectionState[s.id];
|
|
17652
|
+
const entries = Array.isArray(rawEntries) ? rawEntries : [];
|
|
17650
17653
|
const nodeId = s.treeNodeId ?? s.id;
|
|
17651
17654
|
const schemaRepeatable = repeatableFromSchemaByBase.get(baseId(nodeId));
|
|
17652
17655
|
const entryMeta = entries.map((e) => getRepeatableEntryMeta(e, s));
|
|
@@ -17658,11 +17661,13 @@ async function resolveFromForm(options) {
|
|
|
17658
17661
|
const parentId = s.parentId;
|
|
17659
17662
|
const parentSection = inferredSections.find((ps) => ps.id === parentId);
|
|
17660
17663
|
const parentNodeId = parentSection ? parentSection.treeNodeId ?? parentSection.id : parentId;
|
|
17661
|
-
const
|
|
17664
|
+
const rawParentEntries = mergedSectionState[parentId];
|
|
17665
|
+
const parentEntries = Array.isArray(rawParentEntries) ? rawParentEntries : [];
|
|
17662
17666
|
const nestedEntryMeta = {};
|
|
17663
17667
|
const merged = [];
|
|
17664
17668
|
for (let pi = 0; pi < parentEntries.length; pi++) {
|
|
17665
|
-
const
|
|
17669
|
+
const rawChildEntries = mergedSectionState[`${parentId}_${pi}_${s.id}`];
|
|
17670
|
+
const childEntries = Array.isArray(rawChildEntries) ? rawChildEntries : [];
|
|
17666
17671
|
const meta = childEntries.map((e) => getRepeatableEntryMeta(e, s));
|
|
17667
17672
|
nestedEntryMeta[`${baseId(parentNodeId)}_${pi + 1}_${baseId(nodeId)}`] = meta;
|
|
17668
17673
|
merged.push(...meta);
|
|
@@ -17702,13 +17707,15 @@ async function resolveFromForm(options) {
|
|
|
17702
17707
|
if (s.type !== "repeatable") continue;
|
|
17703
17708
|
const parentId = s.parentId;
|
|
17704
17709
|
if (parentId == null) continue;
|
|
17705
|
-
const
|
|
17710
|
+
const rawParentEntries2 = mergedSectionState[parentId];
|
|
17711
|
+
const parentEntries = Array.isArray(rawParentEntries2) ? rawParentEntries2 : [];
|
|
17706
17712
|
const parentSection = inferredSections.find((ps) => ps.id === parentId);
|
|
17707
17713
|
const parentTreeNodeId = parentSection ? parentSection.treeNodeId ?? parentSection.id : parentId;
|
|
17708
17714
|
const childTreeNodeId = s.treeNodeId ?? s.id;
|
|
17709
17715
|
for (let pi = 0; pi < parentEntries.length; pi++) {
|
|
17710
17716
|
const compositeKey = `${parentId}_${pi}_${s.id}`;
|
|
17711
|
-
const
|
|
17717
|
+
const rawEntries2 = mergedSectionState[compositeKey];
|
|
17718
|
+
const entries = Array.isArray(rawEntries2) ? rawEntries2 : [];
|
|
17712
17719
|
const nestedKey = `${baseId(parentTreeNodeId)}_${pi + 1}_${baseId(childTreeNodeId)}`;
|
|
17713
17720
|
repeatableNestedEntryCounts[nestedKey] = Math.max(1, entries.length);
|
|
17714
17721
|
}
|
|
@@ -19067,9 +19074,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
19067
19074
|
}
|
|
19068
19075
|
return svgString;
|
|
19069
19076
|
}
|
|
19070
|
-
const resolvedPackageVersion = "0.5.
|
|
19077
|
+
const resolvedPackageVersion = "0.5.220";
|
|
19071
19078
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
19072
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
19079
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.220";
|
|
19073
19080
|
const roundParityValue = (value) => {
|
|
19074
19081
|
if (typeof value !== "number") return value;
|
|
19075
19082
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19813,7 +19820,7 @@ class PixldocsRenderer {
|
|
|
19813
19820
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19814
19821
|
}
|
|
19815
19822
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19816
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
19823
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D5bhT-57.js");
|
|
19817
19824
|
const prepared = preparePagesForExport(
|
|
19818
19825
|
cloned.pages,
|
|
19819
19826
|
canvasWidth,
|
|
@@ -22003,7 +22010,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
22003
22010
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
22004
22011
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
22005
22012
|
try {
|
|
22006
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
22013
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D5bhT-57.js");
|
|
22007
22014
|
try {
|
|
22008
22015
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
22009
22016
|
} catch {
|
|
@@ -22403,4 +22410,4 @@ export {
|
|
|
22403
22410
|
buildTeaserBlurFlatKeys as y,
|
|
22404
22411
|
collectFontDescriptorsFromConfig as z
|
|
22405
22412
|
};
|
|
22406
|
-
//# sourceMappingURL=index-
|
|
22413
|
+
//# sourceMappingURL=index-KtRZhEPi.js.map
|