@pixldocs/canvas-renderer 0.5.53 → 0.5.54

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.d.ts CHANGED
@@ -231,7 +231,7 @@ export declare function normalizeFontFamily(fontStack: string): string;
231
231
  * Package version banner. Bump alongside package.json so we can confirm
232
232
  * (via browser:log) that the deployed bundle matches the expected build.
233
233
  */
234
- export declare const PACKAGE_VERSION = "0.5.52";
234
+ export declare const PACKAGE_VERSION = "0.5.54";
235
235
 
236
236
  export declare interface PageSettings {
237
237
  backgroundColor?: string;
package/dist/index.js CHANGED
@@ -12221,7 +12221,20 @@ function PixldocsPreview(props) {
12221
12221
  onDynamicFieldClick,
12222
12222
  onReady,
12223
12223
  onError,
12224
- skipFontReadyWait = true
12224
+ // Default `false` so PageCanvas blocks textbox creation until the host
12225
+ // browser actually has the @font-face rules registered. This matters for
12226
+ // `overflowPolicy: 'auto-shrink'` text — `createText` runs the shrink
12227
+ // loop synchronously at mount time using whatever font metrics Fabric
12228
+ // can measure right then. If the real font hasn't loaded yet, Fabric
12229
+ // falls back to the system font (typically narrower), the shrink loop
12230
+ // decides "fits, no shrink needed", and when the real font finally
12231
+ // loads the text overflows the box.
12232
+ //
12233
+ // The renderer's imperative PNG/PDF paths (`renderPageViaPreviewCanvas`,
12234
+ // `captureSvgViaPreviewCanvas`) already pass `skipFontReadyWait: false`
12235
+ // for this exact reason — that's why the downloaded PDF was correct
12236
+ // while the on-screen preview wasn't.
12237
+ skipFontReadyWait = false
12225
12238
  } = props;
12226
12239
  useEffect(() => {
12227
12240
  setPackageApiUrl(imageProxyUrl);
@@ -12390,7 +12403,7 @@ function PixldocsPreview(props) {
12390
12403
  !canvasSettled && /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
12391
12404
  ] });
12392
12405
  }
12393
- const PACKAGE_VERSION = "0.5.52";
12406
+ const PACKAGE_VERSION = "0.5.54";
12394
12407
  let __underlineFixInstalled = false;
12395
12408
  function installUnderlineFix(fab) {
12396
12409
  var _a;