@particle-academy/fancy-slides 0.6.0 → 0.6.1

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
@@ -1658,6 +1658,11 @@ function SlideThumbnail({
1658
1658
  className,
1659
1659
  style
1660
1660
  }) {
1661
+ const resolved = resolveTheme(theme);
1662
+ const ratio = resolved.aspectRatio ?? 16 / 9;
1663
+ const designWidth = resolved.slideWidth ?? 1280;
1664
+ const scale = width / designWidth;
1665
+ const height = width / ratio;
1661
1666
  return /* @__PURE__ */ jsxRuntime.jsx(
1662
1667
  "div",
1663
1668
  {
@@ -1670,12 +1675,27 @@ function SlideThumbnail({
1670
1675
  boxShadow: active ? "0 0 0 3px rgba(139, 92, 246, 0.2)" : "0 1px 2px rgba(0,0,0,0.05)",
1671
1676
  background: "#ffffff",
1672
1677
  width,
1678
+ height,
1673
1679
  ...style
1674
1680
  },
1675
1681
  onClick,
1676
1682
  onContextMenu,
1677
1683
  "data-fancy-slides-thumbnail": slide.id,
1678
- children: /* @__PURE__ */ jsxRuntime.jsx(Slide, { slide, theme, width, renderElement })
1684
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1685
+ "div",
1686
+ {
1687
+ style: {
1688
+ width: designWidth,
1689
+ height: designWidth / ratio,
1690
+ transform: `scale(${scale})`,
1691
+ transformOrigin: "top left",
1692
+ // The thumb owns interaction — charts/code/iframes inside the
1693
+ // scaled slide shouldn't capture clicks.
1694
+ pointerEvents: "none"
1695
+ },
1696
+ children: /* @__PURE__ */ jsxRuntime.jsx(Slide, { slide, theme, width: designWidth, renderElement })
1697
+ }
1698
+ )
1679
1699
  }
1680
1700
  );
1681
1701
  }