@bendyline/squisq-react 2.12.4 → 2.12.5

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.
@@ -5,7 +5,7 @@ import {
5
5
  InlineVideoPlayer,
6
6
  MarkdownRenderer,
7
7
  VideoEmbedFrame
8
- } from "./chunk-YVQ7KEYI.js";
8
+ } from "./chunk-IERUAQFK.js";
9
9
  import {
10
10
  BlockRenderer
11
11
  } from "./chunk-PFKYO6C2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LinearDocView
3
- } from "./chunk-MGFMKGZY.js";
3
+ } from "./chunk-5KK6I55U.js";
4
4
 
5
5
  // src/PaginatedDocView.tsx
6
6
  import {
@@ -536,7 +536,17 @@ function renderInline(nodes, keyPrefix = "", ctx = DEFAULT_CTX) {
536
536
  const label = node.alt || node.title || void 0;
537
537
  return kind === "video" ? /* @__PURE__ */ jsx6(InlineVideoPlayer, { src, basePath: ".", label }, key) : /* @__PURE__ */ jsx6(InlineAudioPlayer, { src, basePath: ".", label }, key);
538
538
  }
539
- return /* @__PURE__ */ jsx6(MdImage, { src: node.url, alt: node.alt ?? "", title: node.title ?? void 0 }, key);
539
+ return /* @__PURE__ */ jsx6(
540
+ MdImage,
541
+ {
542
+ src: node.url,
543
+ alt: node.alt ?? "",
544
+ title: node.title ?? void 0,
545
+ width: node.width,
546
+ height: node.height
547
+ },
548
+ key
549
+ );
540
550
  }
541
551
  case "break":
542
552
  return /* @__PURE__ */ jsx6("br", {}, key);
@@ -732,14 +742,30 @@ function renderTable(rows, align, key, ctx = DEFAULT_CTX) {
732
742
  function renderBlocks(nodes, keyPrefix = "", ctx = DEFAULT_CTX) {
733
743
  return nodes.map((node, i) => renderBlock(node, `${keyPrefix}b${i}`, ctx));
734
744
  }
735
- function MdImage({ src, alt, title }) {
745
+ function MdImage({
746
+ src,
747
+ alt,
748
+ title,
749
+ width,
750
+ height
751
+ }) {
736
752
  const safeSrc = sanitizeUrl(src, "media") ?? svgDataImageSrc(src);
737
753
  const resolved = useMediaUrl(safeSrc ?? "", ".");
738
754
  const imageRef = useRef4(null);
739
755
  const playback = useAnimatedImage(safeSrc ?? "", resolved);
740
756
  if (!safeSrc) return null;
741
757
  if (!mayBeAnimatedImage2(safeSrc)) {
742
- return /* @__PURE__ */ jsx6("img", { className: "squisq-md-image", src: resolved, alt, title });
758
+ return /* @__PURE__ */ jsx6(
759
+ "img",
760
+ {
761
+ className: "squisq-md-image",
762
+ src: resolved,
763
+ alt,
764
+ title,
765
+ width,
766
+ height
767
+ }
768
+ );
743
769
  }
744
770
  return /* @__PURE__ */ jsxs4(
745
771
  "span",
@@ -756,6 +782,8 @@ function MdImage({ src, alt, title }) {
756
782
  src: playback.displaySrc,
757
783
  alt,
758
784
  title,
785
+ width,
786
+ height,
759
787
  style: { display: "block", maxWidth: "100%" }
760
788
  }
761
789
  ),
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-TT6ENR6T.js";
4
4
  import {
5
5
  MarkdownRenderer
6
- } from "./chunk-YVQ7KEYI.js";
6
+ } from "./chunk-IERUAQFK.js";
7
7
 
8
8
  // src/jsonView/useJsonViewTokens.ts
9
9
  import { useMemo } from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LinearDocView
3
- } from "./chunk-MGFMKGZY.js";
3
+ } from "./chunk-5KK6I55U.js";
4
4
  import {
5
5
  useAudioSync,
6
6
  useDocPlayback,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-TT6ENR6T.js";
13
13
  import {
14
14
  MarkdownRenderer
15
- } from "./chunk-YVQ7KEYI.js";
15
+ } from "./chunk-IERUAQFK.js";
16
16
  import {
17
17
  BlockRenderer
18
18
  } from "./chunk-PFKYO6C2.js";
package/dist/index.js CHANGED
@@ -17,17 +17,17 @@ import {
17
17
  resolveDocPlayerAppearance,
18
18
  useBuildNavigation,
19
19
  useMediaClipDurations
20
- } from "./chunk-F4YKXLEH.js";
20
+ } from "./chunk-RYLHJNQX.js";
21
21
  import {
22
22
  PaginatedDocView
23
- } from "./chunk-BJQCVANW.js";
23
+ } from "./chunk-FI7UATA5.js";
24
24
  import {
25
25
  CanvasSection,
26
26
  LinearDocView,
27
27
  PageSectionView,
28
28
  PageViewContext,
29
29
  usePageView
30
- } from "./chunk-MGFMKGZY.js";
30
+ } from "./chunk-5KK6I55U.js";
31
31
  import {
32
32
  useModalDialog
33
33
  } from "./chunk-JP457U6N.js";
@@ -40,7 +40,7 @@ import {
40
40
  import {
41
41
  JsonView,
42
42
  createJsonFormFenceRenderer
43
- } from "./chunk-O2ZISYT3.js";
43
+ } from "./chunk-OSTSRQD3.js";
44
44
  import {
45
45
  useAutoSurface
46
46
  } from "./chunk-TT6ENR6T.js";
@@ -54,7 +54,7 @@ import {
54
54
  VideoEmbedFrame,
55
55
  useAnimatedImage,
56
56
  useFenceRenderers
57
- } from "./chunk-YVQ7KEYI.js";
57
+ } from "./chunk-IERUAQFK.js";
58
58
  import {
59
59
  BlockRenderer
60
60
  } from "./chunk-PFKYO6C2.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  JsonView,
3
3
  createJsonFormFenceRenderer
4
- } from "../chunk-O2ZISYT3.js";
4
+ } from "../chunk-OSTSRQD3.js";
5
5
  import "../chunk-TT6ENR6T.js";
6
- import "../chunk-YVQ7KEYI.js";
6
+ import "../chunk-IERUAQFK.js";
7
7
  import "../chunk-EY3DUCK7.js";
8
8
  import "../chunk-JP2VHB5H.js";
9
9
  export {
@@ -3,7 +3,7 @@ import {
3
3
  MarkdownRenderer,
4
4
  VideoEmbedFrame,
5
5
  useFenceRenderers
6
- } from "../chunk-YVQ7KEYI.js";
6
+ } from "../chunk-IERUAQFK.js";
7
7
  import {
8
8
  MermaidDiagram
9
9
  } from "../chunk-EY3DUCK7.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  PaginatedDocView
3
- } from "../chunk-BJQCVANW.js";
3
+ } from "../chunk-FI7UATA5.js";
4
4
  import {
5
5
  CanvasSection,
6
6
  LinearDocView,
7
7
  PageSectionView,
8
8
  PageViewContext,
9
9
  usePageView
10
- } from "../chunk-MGFMKGZY.js";
10
+ } from "../chunk-5KK6I55U.js";
11
11
  import "../chunk-TT6ENR6T.js";
12
- import "../chunk-YVQ7KEYI.js";
12
+ import "../chunk-IERUAQFK.js";
13
13
  import "../chunk-PFKYO6C2.js";
14
14
  import "../chunk-4ILJDBJ7.js";
15
15
  import "../chunk-EY3DUCK7.js";
@@ -12,14 +12,14 @@ import {
12
12
  MediaClipLayer,
13
13
  SocialCaptionOverlay,
14
14
  formatTime
15
- } from "../chunk-F4YKXLEH.js";
16
- import "../chunk-MGFMKGZY.js";
15
+ } from "../chunk-RYLHJNQX.js";
16
+ import "../chunk-5KK6I55U.js";
17
17
  import "../chunk-3H6QBEYX.js";
18
18
  import "../chunk-TT6ENR6T.js";
19
19
  import {
20
20
  InlineAudioPlayer,
21
21
  InlineVideoPlayer
22
- } from "../chunk-YVQ7KEYI.js";
22
+ } from "../chunk-IERUAQFK.js";
23
23
  import {
24
24
  BlockRenderer
25
25
  } from "../chunk-PFKYO6C2.js";