@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
|
@@ -17580,10 +17580,11 @@ async function resolveTemplateData(options) {
|
|
|
17580
17580
|
async function resolveFromForm(options) {
|
|
17581
17581
|
var _a, _b, _c;
|
|
17582
17582
|
const { templateId, formSchemaId, sectionState, flatFormData: directFlatFormData, themeId, supabaseUrl, supabaseAnonKey, prefetched } = options;
|
|
17583
|
-
|
|
17583
|
+
const hasSectionStateInput = !!sectionState && Object.keys(sectionState).length > 0;
|
|
17584
|
+
if (!formSchemaId && !hasSectionStateInput) {
|
|
17584
17585
|
return resolveTemplateData({
|
|
17585
17586
|
templateId,
|
|
17586
|
-
formData: directFlatFormData ??
|
|
17587
|
+
formData: directFlatFormData ?? {},
|
|
17587
17588
|
supabaseUrl,
|
|
17588
17589
|
supabaseAnonKey,
|
|
17589
17590
|
prefetched: (prefetched == null ? void 0 : prefetched.templateRow) ? { templateRow: prefetched.templateRow } : void 0
|
|
@@ -17591,12 +17592,12 @@ async function resolveFromForm(options) {
|
|
|
17591
17592
|
}
|
|
17592
17593
|
const [templateRow, formSchemaRow, defaultForm] = await Promise.all([
|
|
17593
17594
|
(prefetched == null ? void 0 : prefetched.templateRow) ? Promise.resolve(prefetched.templateRow) : fetchRow(supabaseUrl, supabaseAnonKey, "templates", templateId),
|
|
17594
|
-
(prefetched == null ? void 0 : prefetched.formSchemaRow) !== void 0 ? Promise.resolve(prefetched.formSchemaRow) : fetchRow(supabaseUrl, supabaseAnonKey, "form_schemas", formSchemaId),
|
|
17595
|
-
(prefetched == null ? void 0 : prefetched.defaultForm) !== void 0 ? Promise.resolve(prefetched.defaultForm) : fetchDefaultForm(supabaseUrl, supabaseAnonKey, formSchemaId)
|
|
17595
|
+
(prefetched == null ? void 0 : prefetched.formSchemaRow) !== void 0 ? Promise.resolve(prefetched.formSchemaRow) : formSchemaId ? fetchRow(supabaseUrl, supabaseAnonKey, "form_schemas", formSchemaId).catch(() => null) : Promise.resolve(null),
|
|
17596
|
+
(prefetched == null ? void 0 : prefetched.defaultForm) !== void 0 ? Promise.resolve(prefetched.defaultForm) : formSchemaId ? fetchDefaultForm(supabaseUrl, supabaseAnonKey, formSchemaId) : Promise.resolve(null)
|
|
17596
17597
|
]);
|
|
17597
17598
|
const templateConfig = templateRow.config;
|
|
17598
17599
|
const templateFormSchema = templateRow.form_schema;
|
|
17599
|
-
const formSchema = formSchemaRow.schema;
|
|
17600
|
+
const formSchema = (formSchemaRow == null ? void 0 : formSchemaRow.schema) ?? void 0;
|
|
17600
17601
|
if (templateFormSchema) {
|
|
17601
17602
|
if (!Array.isArray(templateConfig.dynamicFields) && Array.isArray(templateFormSchema.dynamicFields)) {
|
|
17602
17603
|
templateConfig.dynamicFields = templateFormSchema.dynamicFields;
|
|
@@ -19092,9 +19093,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
19092
19093
|
}
|
|
19093
19094
|
return svgString;
|
|
19094
19095
|
}
|
|
19095
|
-
const resolvedPackageVersion = "0.5.
|
|
19096
|
+
const resolvedPackageVersion = "0.5.221";
|
|
19096
19097
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
19097
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
19098
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.221";
|
|
19098
19099
|
const roundParityValue = (value) => {
|
|
19099
19100
|
if (typeof value !== "number") return value;
|
|
19100
19101
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19838,7 +19839,7 @@ class PixldocsRenderer {
|
|
|
19838
19839
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19839
19840
|
}
|
|
19840
19841
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19841
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19842
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CZjhPHZh.cjs"));
|
|
19842
19843
|
const prepared = preparePagesForExport(
|
|
19843
19844
|
cloned.pages,
|
|
19844
19845
|
canvasWidth,
|
|
@@ -22028,7 +22029,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
22028
22029
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
22029
22030
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
22030
22031
|
try {
|
|
22031
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
22032
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CZjhPHZh.cjs"));
|
|
22032
22033
|
try {
|
|
22033
22034
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
22034
22035
|
} catch {
|
|
@@ -22425,4 +22426,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
22425
22426
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
22426
22427
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
22427
22428
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
22428
|
-
//# sourceMappingURL=index-
|
|
22429
|
+
//# sourceMappingURL=index-DIokvyoP.cjs.map
|