@pixldocs/canvas-renderer 0.5.24 → 0.5.25

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
@@ -9632,10 +9632,6 @@ function PreviewCanvas({
9632
9632
  }
9633
9633
  );
9634
9634
  }
9635
- const PreviewCanvas$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9636
- __proto__: null,
9637
- PreviewCanvas
9638
- }, Symbol.toStringTag, { value: "Module" }));
9639
9635
  function applyThemeToConfig(config, themeOverrides) {
9640
9636
  var _a, _b, _c;
9641
9637
  if (!themeOverrides || Object.keys(themeOverrides).length === 0) return config;
@@ -12068,6 +12064,10 @@ function PixldocsPreview(props) {
12068
12064
  !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..." }) })
12069
12065
  ] });
12070
12066
  }
12067
+ const PixldocsPreview$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12068
+ __proto__: null,
12069
+ PixldocsPreview
12070
+ }, Symbol.toStringTag, { value: "Module" }));
12071
12071
  const inlinedAssetCache = /* @__PURE__ */ new Map();
12072
12072
  function shouldInlineImageUrl(url) {
12073
12073
  if (!url || url.startsWith("data:")) return false;
@@ -12548,7 +12548,7 @@ class PixldocsRenderer {
12548
12548
  }
12549
12549
  }
12550
12550
  async renderPageViaPreviewCanvas(config, pageIndex, pixelRatio, format, quality) {
12551
- const { PreviewCanvas: PreviewCanvas2 } = await Promise.resolve().then(() => PreviewCanvas$1);
12551
+ const { PixldocsPreview: PixldocsPreview2 } = await Promise.resolve().then(() => PixldocsPreview$1);
12552
12552
  const canvasWidth = config.canvas.width;
12553
12553
  const canvasHeight = config.canvas.height;
12554
12554
  return new Promise((resolve, reject) => {
@@ -12615,7 +12615,7 @@ class PixldocsRenderer {
12615
12615
  };
12616
12616
  const root = client.createRoot(container);
12617
12617
  root.render(
12618
- react.createElement(PreviewCanvas2, {
12618
+ react.createElement(PixldocsPreview2, {
12619
12619
  config,
12620
12620
  pageIndex,
12621
12621
  zoom: 1,
@@ -12636,7 +12636,7 @@ class PixldocsRenderer {
12636
12636
  // document space (e.g. 612x792) instead of inflated pixel space.
12637
12637
  captureSvgViaPreviewCanvas(config, pageIndex, canvasWidth, canvasHeight) {
12638
12638
  return new Promise(async (resolve, reject) => {
12639
- const { PreviewCanvas: PreviewCanvas2 } = await Promise.resolve().then(() => PreviewCanvas$1);
12639
+ const { PixldocsPreview: PixldocsPreview2 } = await Promise.resolve().then(() => PixldocsPreview$1);
12640
12640
  const container = document.createElement("div");
12641
12641
  container.style.cssText = `
12642
12642
  position: fixed; left: -99999px; top: -99999px;
@@ -12717,7 +12717,7 @@ class PixldocsRenderer {
12717
12717
  };
12718
12718
  const root = client.createRoot(container);
12719
12719
  root.render(
12720
- react.createElement(PreviewCanvas2, {
12720
+ react.createElement(PixldocsPreview2, {
12721
12721
  config,
12722
12722
  pageIndex,
12723
12723
  zoom: 1,