@pixldocs/canvas-renderer 0.5.220 → 0.5.221
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-DRHaeOxK.cjs → index-DIokvyoP.cjs} +11 -10
- package/dist/{index-DRHaeOxK.cjs.map → index-DIokvyoP.cjs.map} +1 -1
- package/dist/{index-KtRZhEPi.js → index-mmjF0tPc.js} +11 -10
- package/dist/{index-KtRZhEPi.js.map → index-mmjF0tPc.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-D5bhT-57.js → vectorPdfExport-BR2dJuvJ.js} +4 -4
- package/dist/{vectorPdfExport-D5bhT-57.js.map → vectorPdfExport-BR2dJuvJ.js.map} +1 -1
- package/dist/{vectorPdfExport-UBFTDrVt.cjs → vectorPdfExport-CZjhPHZh.cjs} +4 -4
- package/dist/{vectorPdfExport-UBFTDrVt.cjs.map → vectorPdfExport-CZjhPHZh.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -17562,10 +17562,11 @@ async function resolveTemplateData(options) {
|
|
|
17562
17562
|
async function resolveFromForm(options) {
|
|
17563
17563
|
var _a, _b, _c;
|
|
17564
17564
|
const { templateId, formSchemaId, sectionState, flatFormData: directFlatFormData, themeId, supabaseUrl, supabaseAnonKey, prefetched } = options;
|
|
17565
|
-
|
|
17565
|
+
const hasSectionStateInput = !!sectionState && Object.keys(sectionState).length > 0;
|
|
17566
|
+
if (!formSchemaId && !hasSectionStateInput) {
|
|
17566
17567
|
return resolveTemplateData({
|
|
17567
17568
|
templateId,
|
|
17568
|
-
formData: directFlatFormData ??
|
|
17569
|
+
formData: directFlatFormData ?? {},
|
|
17569
17570
|
supabaseUrl,
|
|
17570
17571
|
supabaseAnonKey,
|
|
17571
17572
|
prefetched: (prefetched == null ? void 0 : prefetched.templateRow) ? { templateRow: prefetched.templateRow } : void 0
|
|
@@ -17573,12 +17574,12 @@ async function resolveFromForm(options) {
|
|
|
17573
17574
|
}
|
|
17574
17575
|
const [templateRow, formSchemaRow, defaultForm] = await Promise.all([
|
|
17575
17576
|
(prefetched == null ? void 0 : prefetched.templateRow) ? Promise.resolve(prefetched.templateRow) : fetchRow(supabaseUrl, supabaseAnonKey, "templates", templateId),
|
|
17576
|
-
(prefetched == null ? void 0 : prefetched.formSchemaRow) !== void 0 ? Promise.resolve(prefetched.formSchemaRow) : fetchRow(supabaseUrl, supabaseAnonKey, "form_schemas", formSchemaId),
|
|
17577
|
-
(prefetched == null ? void 0 : prefetched.defaultForm) !== void 0 ? Promise.resolve(prefetched.defaultForm) : fetchDefaultForm(supabaseUrl, supabaseAnonKey, formSchemaId)
|
|
17577
|
+
(prefetched == null ? void 0 : prefetched.formSchemaRow) !== void 0 ? Promise.resolve(prefetched.formSchemaRow) : formSchemaId ? fetchRow(supabaseUrl, supabaseAnonKey, "form_schemas", formSchemaId).catch(() => null) : Promise.resolve(null),
|
|
17578
|
+
(prefetched == null ? void 0 : prefetched.defaultForm) !== void 0 ? Promise.resolve(prefetched.defaultForm) : formSchemaId ? fetchDefaultForm(supabaseUrl, supabaseAnonKey, formSchemaId) : Promise.resolve(null)
|
|
17578
17579
|
]);
|
|
17579
17580
|
const templateConfig = templateRow.config;
|
|
17580
17581
|
const templateFormSchema = templateRow.form_schema;
|
|
17581
|
-
const formSchema = formSchemaRow.schema;
|
|
17582
|
+
const formSchema = (formSchemaRow == null ? void 0 : formSchemaRow.schema) ?? void 0;
|
|
17582
17583
|
if (templateFormSchema) {
|
|
17583
17584
|
if (!Array.isArray(templateConfig.dynamicFields) && Array.isArray(templateFormSchema.dynamicFields)) {
|
|
17584
17585
|
templateConfig.dynamicFields = templateFormSchema.dynamicFields;
|
|
@@ -19074,9 +19075,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
19074
19075
|
}
|
|
19075
19076
|
return svgString;
|
|
19076
19077
|
}
|
|
19077
|
-
const resolvedPackageVersion = "0.5.
|
|
19078
|
+
const resolvedPackageVersion = "0.5.221";
|
|
19078
19079
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
19079
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
19080
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.221";
|
|
19080
19081
|
const roundParityValue = (value) => {
|
|
19081
19082
|
if (typeof value !== "number") return value;
|
|
19082
19083
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19820,7 +19821,7 @@ class PixldocsRenderer {
|
|
|
19820
19821
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19821
19822
|
}
|
|
19822
19823
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19823
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
19824
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BR2dJuvJ.js");
|
|
19824
19825
|
const prepared = preparePagesForExport(
|
|
19825
19826
|
cloned.pages,
|
|
19826
19827
|
canvasWidth,
|
|
@@ -22010,7 +22011,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
22010
22011
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
22011
22012
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
22012
22013
|
try {
|
|
22013
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
22014
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BR2dJuvJ.js");
|
|
22014
22015
|
try {
|
|
22015
22016
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
22016
22017
|
} catch {
|
|
@@ -22410,4 +22411,4 @@ export {
|
|
|
22410
22411
|
buildTeaserBlurFlatKeys as y,
|
|
22411
22412
|
collectFontDescriptorsFromConfig as z
|
|
22412
22413
|
};
|
|
22413
|
-
//# sourceMappingURL=index-
|
|
22414
|
+
//# sourceMappingURL=index-mmjF0tPc.js.map
|