@pixldocs/canvas-renderer 0.5.471 → 0.5.473
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-wRgUBq43.js → index-DI9QBo4-.js} +10 -9
- package/dist/index-DI9QBo4-.js.map +1 -0
- package/dist/{index-Bj897CTu.cjs → index-ruS86aJe.cjs} +10 -9
- package/dist/index-ruS86aJe.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CAlKABzs.js → vectorPdfExport-CJgFbOQ5.js} +4 -4
- package/dist/{vectorPdfExport-CAlKABzs.js.map → vectorPdfExport-CJgFbOQ5.js.map} +1 -1
- package/dist/{vectorPdfExport-CWW54LRg.cjs → vectorPdfExport-DMy-gCf7.cjs} +4 -4
- package/dist/{vectorPdfExport-CWW54LRg.cjs.map → vectorPdfExport-DMy-gCf7.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-Bj897CTu.cjs.map +0 -1
- package/dist/index-wRgUBq43.js.map +0 -1
|
@@ -9608,8 +9608,9 @@ function gradientToFabric(gradient, width, height) {
|
|
|
9608
9608
|
});
|
|
9609
9609
|
}
|
|
9610
9610
|
function applyInitialGradients(obj, element) {
|
|
9611
|
-
const
|
|
9612
|
-
const
|
|
9611
|
+
const isLine = element.type === "line";
|
|
9612
|
+
const w = typeof obj.width === "number" && obj.width > 0 ? obj.width : (Number(element.width) || 0) * (isLine ? Number(element.scaleX) || 1 : 1);
|
|
9613
|
+
const h = typeof obj.height === "number" && obj.height > 0 ? obj.height : isLine ? Math.max(Number(element.strokeWidth) || 0, 1) : Number(element.height) || 0;
|
|
9613
9614
|
if (w <= 0 || h <= 0) return;
|
|
9614
9615
|
const fg = element.fillGradient;
|
|
9615
9616
|
if (fg && isGradientConfig(fg)) {
|
|
@@ -19273,7 +19274,7 @@ const PageCanvas = forwardRef(
|
|
|
19273
19274
|
}
|
|
19274
19275
|
if (element.fillGradient && isGradientConfig(element.fillGradient)) {
|
|
19275
19276
|
const objWidth = typeof obj.width === "number" ? obj.width : rW;
|
|
19276
|
-
const objHeight = typeof obj.height === "number" ? obj.height : rH;
|
|
19277
|
+
const objHeight = isLine ? Math.max(typeof obj.height === "number" ? obj.height : 0, typeof element.strokeWidth === "number" ? element.strokeWidth : 0, 1) : typeof obj.height === "number" ? obj.height : rH;
|
|
19277
19278
|
if (objWidth > 0 && objHeight > 0) {
|
|
19278
19279
|
obj.set({
|
|
19279
19280
|
fill: gradientToFabric(element.fillGradient, objWidth, objHeight),
|
|
@@ -19289,7 +19290,7 @@ const PageCanvas = forwardRef(
|
|
|
19289
19290
|
}
|
|
19290
19291
|
if (element.strokeGradient && isGradientConfig(element.strokeGradient)) {
|
|
19291
19292
|
const objWidth = typeof obj.width === "number" ? obj.width : rW;
|
|
19292
|
-
const objHeight = typeof obj.height === "number" ? obj.height : rH;
|
|
19293
|
+
const objHeight = isLine ? Math.max(typeof obj.height === "number" ? obj.height : 0, typeof element.strokeWidth === "number" ? element.strokeWidth : 0, 1) : typeof obj.height === "number" ? obj.height : rH;
|
|
19293
19294
|
if (objWidth > 0 && objHeight > 0) {
|
|
19294
19295
|
obj.set({
|
|
19295
19296
|
stroke: gradientToFabric(element.strokeGradient, objWidth, objHeight),
|
|
@@ -26308,9 +26309,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26308
26309
|
}
|
|
26309
26310
|
return svgString;
|
|
26310
26311
|
}
|
|
26311
|
-
const resolvedPackageVersion = "0.5.
|
|
26312
|
+
const resolvedPackageVersion = "0.5.473";
|
|
26312
26313
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26313
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26314
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.473";
|
|
26314
26315
|
const roundParityValue = (value) => {
|
|
26315
26316
|
if (typeof value !== "number") return value;
|
|
26316
26317
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27124,7 +27125,7 @@ class PixldocsRenderer {
|
|
|
27124
27125
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27125
27126
|
}
|
|
27126
27127
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27127
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
27128
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CJgFbOQ5.js");
|
|
27128
27129
|
const prepared = preparePagesForExport(
|
|
27129
27130
|
cloned.pages,
|
|
27130
27131
|
canvasWidth,
|
|
@@ -29444,7 +29445,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29444
29445
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29445
29446
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29446
29447
|
try {
|
|
29447
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
29448
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CJgFbOQ5.js");
|
|
29448
29449
|
try {
|
|
29449
29450
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29450
29451
|
} catch {
|
|
@@ -29761,4 +29762,4 @@ export {
|
|
|
29761
29762
|
buildTeaserBlurFlatKeys as y,
|
|
29762
29763
|
collectFontDescriptorsFromConfig as z
|
|
29763
29764
|
};
|
|
29764
|
-
//# sourceMappingURL=index-
|
|
29765
|
+
//# sourceMappingURL=index-DI9QBo4-.js.map
|