@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.cjs CHANGED
@@ -12240,7 +12240,20 @@ function PixldocsPreview(props) {
12240
12240
  onDynamicFieldClick,
12241
12241
  onReady,
12242
12242
  onError,
12243
- skipFontReadyWait = true
12243
+ // Default `false` so PageCanvas blocks textbox creation until the host
12244
+ // browser actually has the @font-face rules registered. This matters for
12245
+ // `overflowPolicy: 'auto-shrink'` text — `createText` runs the shrink
12246
+ // loop synchronously at mount time using whatever font metrics Fabric
12247
+ // can measure right then. If the real font hasn't loaded yet, Fabric
12248
+ // falls back to the system font (typically narrower), the shrink loop
12249
+ // decides "fits, no shrink needed", and when the real font finally
12250
+ // loads the text overflows the box.
12251
+ //
12252
+ // The renderer's imperative PNG/PDF paths (`renderPageViaPreviewCanvas`,
12253
+ // `captureSvgViaPreviewCanvas`) already pass `skipFontReadyWait: false`
12254
+ // for this exact reason — that's why the downloaded PDF was correct
12255
+ // while the on-screen preview wasn't.
12256
+ skipFontReadyWait = false
12244
12257
  } = props;
12245
12258
  react.useEffect(() => {
12246
12259
  setPackageApiUrl(imageProxyUrl);
@@ -12409,7 +12422,7 @@ function PixldocsPreview(props) {
12409
12422
  !canvasSettled && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
12410
12423
  ] });
12411
12424
  }
12412
- const PACKAGE_VERSION = "0.5.52";
12425
+ const PACKAGE_VERSION = "0.5.54";
12413
12426
  let __underlineFixInstalled = false;
12414
12427
  function installUnderlineFix(fab) {
12415
12428
  var _a;