@pixldocs/canvas-renderer 0.5.143 → 0.5.146
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-r5VzSOHa.cjs → index-DoPXmxDJ.cjs} +10 -6
- package/dist/index-DoPXmxDJ.cjs.map +1 -0
- package/dist/{index-CUpy7HO9.js → index-oR6VOGAL.js} +10 -6
- package/dist/index-oR6VOGAL.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-GvaizFte.js → vectorPdfExport-DI7k8pt7.js} +147 -8
- package/dist/vectorPdfExport-DI7k8pt7.js.map +1 -0
- package/dist/{vectorPdfExport-JVEe_tSQ.cjs → vectorPdfExport-SMvSP0el.cjs} +147 -8
- package/dist/vectorPdfExport-SMvSP0el.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-CUpy7HO9.js.map +0 -1
- package/dist/index-r5VzSOHa.cjs.map +0 -1
- package/dist/vectorPdfExport-GvaizFte.js.map +0 -1
- package/dist/vectorPdfExport-JVEe_tSQ.cjs.map +0 -1
|
@@ -2675,7 +2675,7 @@ async function loadFontshareFont(fontFamily, slug, weights) {
|
|
|
2675
2675
|
if (existing) return existing;
|
|
2676
2676
|
const promise = (async () => {
|
|
2677
2677
|
try {
|
|
2678
|
-
const weightStr = (weights || [300, 400, 500, 700]).join(",");
|
|
2678
|
+
const weightStr = (weights || [300, 400, 500, 600, 700]).join(",");
|
|
2679
2679
|
const url = `https://api.fontshare.com/v2/css?f[]=${slug}@${weightStr}&display=swap`;
|
|
2680
2680
|
if (document.querySelector(`link[href="${url}"]`)) return true;
|
|
2681
2681
|
const link = document.createElement("link");
|
|
@@ -14760,7 +14760,7 @@ async function registerRemoteFontFaceViaProxy(family, requestedWeight, styleRaw)
|
|
|
14760
14760
|
try {
|
|
14761
14761
|
const weightsToRegister = /* @__PURE__ */ new Set([actualWeight]);
|
|
14762
14762
|
const requestedNum = Number.isFinite(parsed) ? Math.max(100, Math.min(900, parsed)) : 400;
|
|
14763
|
-
weightsToRegister.add(requestedNum);
|
|
14763
|
+
if (requestedNum === actualWeight) weightsToRegister.add(requestedNum);
|
|
14764
14764
|
for (const w of weightsToRegister) {
|
|
14765
14765
|
const aliasKey = `${family}|${w}|${style}|${source}`;
|
|
14766
14766
|
if (registeredRemoteFontFaces.has(aliasKey)) continue;
|
|
@@ -15974,7 +15974,7 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
15974
15974
|
}
|
|
15975
15975
|
return svgString;
|
|
15976
15976
|
}
|
|
15977
|
-
const PACKAGE_VERSION = "0.5.
|
|
15977
|
+
const PACKAGE_VERSION = "0.5.145";
|
|
15978
15978
|
const roundParityValue = (value) => {
|
|
15979
15979
|
if (typeof value !== "number") return value;
|
|
15980
15980
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16399,7 +16399,7 @@ class PixldocsRenderer {
|
|
|
16399
16399
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16400
16400
|
}
|
|
16401
16401
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16402
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16402
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-SMvSP0el.cjs"));
|
|
16403
16403
|
const prepared = preparePagesForExport(
|
|
16404
16404
|
cloned.pages,
|
|
16405
16405
|
canvasWidth,
|
|
@@ -18501,7 +18501,11 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18501
18501
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18502
18502
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18503
18503
|
try {
|
|
18504
|
-
const { bakeTextAnchorPositionsFromLiveSvg } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18504
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-SMvSP0el.cjs"));
|
|
18505
|
+
try {
|
|
18506
|
+
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18507
|
+
} catch {
|
|
18508
|
+
}
|
|
18505
18509
|
await bakeTextAnchorPositionsFromLiveSvg(svgToDraw);
|
|
18506
18510
|
} catch (e) {
|
|
18507
18511
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
@@ -18843,4 +18847,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
18843
18847
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
18844
18848
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
18845
18849
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
18846
|
-
//# sourceMappingURL=index-
|
|
18850
|
+
//# sourceMappingURL=index-DoPXmxDJ.cjs.map
|