@pixldocs/canvas-renderer 0.5.454 → 0.5.455
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-CeVp5eqp.js → index-Bs4oHgQ2.js} +11 -5
- package/dist/{index-CeVp5eqp.js.map → index-Bs4oHgQ2.js.map} +1 -1
- package/dist/{index-DCWaFt-_.cjs → index-CoBJQqYp.cjs} +11 -5
- package/dist/{index-DCWaFt-_.cjs.map → index-CoBJQqYp.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-1e96-5qI.cjs → vectorPdfExport-CErInEKs.cjs} +4 -4
- package/dist/{vectorPdfExport-1e96-5qI.cjs.map → vectorPdfExport-CErInEKs.cjs.map} +1 -1
- package/dist/{vectorPdfExport-xz20N_5g.js → vectorPdfExport-Dl1_fD7e.js} +4 -4
- package/dist/{vectorPdfExport-xz20N_5g.js.map → vectorPdfExport-Dl1_fD7e.js.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 ?? "");
|
|
@@ -26048,9 +26054,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26048
26054
|
}
|
|
26049
26055
|
return svgString;
|
|
26050
26056
|
}
|
|
26051
|
-
const resolvedPackageVersion = "0.5.
|
|
26057
|
+
const resolvedPackageVersion = "0.5.455";
|
|
26052
26058
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26053
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26059
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.455";
|
|
26054
26060
|
const roundParityValue = (value) => {
|
|
26055
26061
|
if (typeof value !== "number") return value;
|
|
26056
26062
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26864,7 +26870,7 @@ class PixldocsRenderer {
|
|
|
26864
26870
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26865
26871
|
}
|
|
26866
26872
|
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-
|
|
26873
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CErInEKs.cjs"));
|
|
26868
26874
|
const prepared = preparePagesForExport(
|
|
26869
26875
|
cloned.pages,
|
|
26870
26876
|
canvasWidth,
|
|
@@ -29184,7 +29190,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29184
29190
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29185
29191
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29186
29192
|
try {
|
|
29187
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29193
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CErInEKs.cjs"));
|
|
29188
29194
|
try {
|
|
29189
29195
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29190
29196
|
} catch {
|
|
@@ -29581,4 +29587,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29581
29587
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29582
29588
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29583
29589
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29584
|
-
//# sourceMappingURL=index-
|
|
29590
|
+
//# sourceMappingURL=index-CoBJQqYp.cjs.map
|