@pixldocs/canvas-renderer 0.5.454 → 0.5.456
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-DCWaFt-_.cjs → index-D7XRqqRF.cjs} +14 -7
- package/dist/{index-DCWaFt-_.cjs.map → index-D7XRqqRF.cjs.map} +1 -1
- package/dist/{index-CeVp5eqp.js → index-DbfhlD78.js} +14 -7
- package/dist/{index-CeVp5eqp.js.map → index-DbfhlD78.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-xz20N_5g.js → vectorPdfExport-CAeuEsjr.js} +4 -4
- package/dist/{vectorPdfExport-xz20N_5g.js.map → vectorPdfExport-CAeuEsjr.js.map} +1 -1
- package/dist/{vectorPdfExport-1e96-5qI.cjs → vectorPdfExport-Cyok7Rsu.cjs} +4 -4
- package/dist/{vectorPdfExport-1e96-5qI.cjs.map → vectorPdfExport-Cyok7Rsu.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -21077,6 +21077,9 @@ function applyTextCase(text, textCase) {
|
|
|
21077
21077
|
return text;
|
|
21078
21078
|
}
|
|
21079
21079
|
}
|
|
21080
|
+
function hasInlineFormattingMarkers(value) {
|
|
21081
|
+
return /\*\*[\s\S]+?\*\*|__[\s\S]+?__|~~[\s\S]+?~~|==[\s\S]+?==|\[(?:c|bg)=[^\]]+\][\s\S]+?\[\/(?:c|bg)\]|(^|[^*])\*[^*\n]+?\*/i.test(value);
|
|
21082
|
+
}
|
|
21080
21083
|
function setInTree(nodes, elementId, targetProperty, value) {
|
|
21081
21084
|
for (const node of nodes) {
|
|
21082
21085
|
if (node.id === elementId) {
|
|
@@ -21091,6 +21094,9 @@ function setInTree(nodes, elementId, targetProperty, value) {
|
|
|
21091
21094
|
} else if (targetProperty === "text" && node.type === "text" && typeof value === "string") {
|
|
21092
21095
|
const textVal = value === "" ? " " : value;
|
|
21093
21096
|
node[targetProperty] = applyTextCase(textVal, node.textCase);
|
|
21097
|
+
if (hasInlineFormattingMarkers(textVal)) {
|
|
21098
|
+
node.formattingEnabled = true;
|
|
21099
|
+
}
|
|
21094
21100
|
} else if ((targetProperty === "src" || targetProperty === "imageUrl") && node.type === "image") {
|
|
21095
21101
|
const previousSrc = String(node.src || node.imageUrl || "");
|
|
21096
21102
|
const nextSrc = String(value ?? "");
|
|
@@ -21766,13 +21772,14 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
21766
21772
|
const applyValue = (elementId, targetProperty, value, fieldKey) => {
|
|
21767
21773
|
var _a3;
|
|
21768
21774
|
const isTextLike = targetProperty === "text" || targetProperty === "content";
|
|
21775
|
+
const isImageLike = targetProperty === "src" || targetProperty === "imageUrl";
|
|
21769
21776
|
if (value === void 0 || value === null) {
|
|
21770
21777
|
return false;
|
|
21771
21778
|
}
|
|
21772
|
-
if (value === "" && !isTextLike) {
|
|
21779
|
+
if (value === "" && !isTextLike && !isImageLike) {
|
|
21773
21780
|
return false;
|
|
21774
21781
|
}
|
|
21775
|
-
let effectiveValue =
|
|
21782
|
+
let effectiveValue = value;
|
|
21776
21783
|
if (effectiveValue === void 0) return false;
|
|
21777
21784
|
if (isTextLike && typeof effectiveValue === "string" && effectiveValue !== "") {
|
|
21778
21785
|
const fType = resolveDisplayFormat(fieldKey);
|
|
@@ -26048,9 +26055,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26048
26055
|
}
|
|
26049
26056
|
return svgString;
|
|
26050
26057
|
}
|
|
26051
|
-
const resolvedPackageVersion = "0.5.
|
|
26058
|
+
const resolvedPackageVersion = "0.5.456";
|
|
26052
26059
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26053
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26060
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.456";
|
|
26054
26061
|
const roundParityValue = (value) => {
|
|
26055
26062
|
if (typeof value !== "number") return value;
|
|
26056
26063
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26864,7 +26871,7 @@ class PixldocsRenderer {
|
|
|
26864
26871
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26865
26872
|
}
|
|
26866
26873
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26867
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26874
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cyok7Rsu.cjs"));
|
|
26868
26875
|
const prepared = preparePagesForExport(
|
|
26869
26876
|
cloned.pages,
|
|
26870
26877
|
canvasWidth,
|
|
@@ -29184,7 +29191,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29184
29191
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29185
29192
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29186
29193
|
try {
|
|
29187
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29194
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cyok7Rsu.cjs"));
|
|
29188
29195
|
try {
|
|
29189
29196
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29190
29197
|
} catch {
|
|
@@ -29581,4 +29588,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29581
29588
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29582
29589
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29583
29590
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29584
|
-
//# sourceMappingURL=index-
|
|
29591
|
+
//# sourceMappingURL=index-D7XRqqRF.cjs.map
|