@bendyline/squisq-video-react 2.5.21 → 2.5.23

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFrameCapture
3
- } from "./chunk-AE3TQUC4.js";
3
+ } from "./chunk-ZEA6XJL7.js";
4
4
  import {
5
5
  EXPORT_AUDIO_CHANNELS,
6
6
  EXPORT_AUDIO_SAMPLE_RATE,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useVideoExport
3
- } from "./chunk-MGOHAWFC.js";
3
+ } from "./chunk-6XPYI42H.js";
4
4
 
5
5
  // src/VideoExportModal.tsx
6
6
  import { useState, useCallback, useEffect, useId, useRef } from "react";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-3NJDHK62.js";
8
8
  import {
9
9
  useFrameCapture
10
- } from "./chunk-AE3TQUC4.js";
10
+ } from "./chunk-ZEA6XJL7.js";
11
11
 
12
12
  // src/CoverImageExportModal.tsx
13
13
  import { useCallback, useId, useRef, useState } from "react";
@@ -269,6 +269,7 @@ var CAPTURE_SETUP_TIMEOUT_MS = 6e4;
269
269
  var RENDER_TIME_EPSILON_SECONDS = 1e-6;
270
270
  var POTENTIALLY_ANIMATED_IMAGE_URL = /(?:^data:image\/(?:gif|webp|avif)[;,]|\.(?:gif|webp|avif)(?:[?#]|$))/i;
271
271
  var CAPTURE_SVG_SELECTOR = "svg.block-svg";
272
+ var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
272
273
  var CAPTURE_VIDEO_READINESS_POLL_MS = 16;
273
274
  var CAPTURE_VIDEO_END_PROBE_TIME = 1e101;
274
275
  var SCHEDULED_MEDIA_SELECTOR = ".doc-player__media-clips";
@@ -341,7 +342,12 @@ async function waitForCaptureAssets(captureRoot, decodedImages = /* @__PURE__ */
341
342
  );
342
343
  await Promise.all(
343
344
  pendingImages.map(async (image) => {
344
- await waitForImageDecode(image);
345
+ try {
346
+ await waitForImageDecode(image);
347
+ } catch (error) {
348
+ if (!(error instanceof DOMException) || !image.alt) throw error;
349
+ throw new Error(`Image "${image.alt}" could not be decoded: ${error.message}`);
350
+ }
345
351
  decodedImages.add(image);
346
352
  })
347
353
  );
@@ -535,7 +541,10 @@ function showsUncommittedMediaUrl(root, resolved) {
535
541
  }
536
542
  if (mapped.size === 0) return false;
537
543
  return Array.from(root.querySelectorAll("img[src], video[src], audio[src], source[src]")).some(
538
- (element) => mapped.has(stripRelativePrefix(element.getAttribute("src") ?? ""))
544
+ (element) => {
545
+ const src = element.getAttribute("src") ?? "";
546
+ return src === "" || mapped.has(stripRelativePrefix(src));
547
+ }
539
548
  );
540
549
  }
541
550
  async function waitForCaptureMediaResolutions(tracker, captureRoot) {
@@ -867,11 +876,17 @@ async function rasterizeCaptureSvgClones(originalRoot, clonedRoot, transientCanv
867
876
  if (!element.style) continue;
868
877
  element.style.setProperty("animation", "none", "important");
869
878
  element.style.setProperty("transition", "none", "important");
879
+ if (element.namespaceURI === SVG_NAMESPACE) {
880
+ element.style.removeProperty("-webkit-text-fill-color");
881
+ }
870
882
  }
883
+ const noScrollbars = svg.ownerDocument.createElementNS(SVG_NAMESPACE, "style");
884
+ noScrollbars.textContent = "*{scrollbar-width:none!important}";
885
+ svg.prepend(noScrollbars);
871
886
  const { width, height } = captureSvgRasterSize(svg, originalSvg);
872
887
  const cacheKey = captureSvgRasterCacheKey(originalSvg ?? svg, index);
873
888
  activeCacheKeys.add(cacheKey);
874
- svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
889
+ svg.setAttribute("xmlns", SVG_NAMESPACE);
875
890
  svg.setAttribute("width", String(width));
876
891
  svg.setAttribute("height", String(height));
877
892
  let bitmap = null;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  VideoExportButton,
3
3
  VideoExportModal
4
- } from "../chunk-6BMNXH6K.js";
4
+ } from "../chunk-DR5I6WZQ.js";
5
5
  import {
6
6
  CoverImageExportModal,
7
7
  coverImageFilename,
8
8
  validateCoverImageDimensions
9
- } from "../chunk-JGD6B4E6.js";
9
+ } from "../chunk-XPWYKETM.js";
10
10
  import "../chunk-3NJDHK62.js";
11
- import "../chunk-MGOHAWFC.js";
12
- import "../chunk-AE3TQUC4.js";
11
+ import "../chunk-6XPYI42H.js";
12
+ import "../chunk-ZEA6XJL7.js";
13
13
  import "../chunk-RIXBIX3H.js";
14
14
  import "../chunk-5MFQMJ5Z.js";
15
15
  export {
@@ -2,9 +2,9 @@ import {
2
2
  CoverImageExportModal,
3
3
  coverImageFilename,
4
4
  validateCoverImageDimensions
5
- } from "../chunk-JGD6B4E6.js";
5
+ } from "../chunk-XPWYKETM.js";
6
6
  import "../chunk-3NJDHK62.js";
7
- import "../chunk-AE3TQUC4.js";
7
+ import "../chunk-ZEA6XJL7.js";
8
8
  export {
9
9
  CoverImageExportModal,
10
10
  coverImageFilename,
@@ -7,7 +7,7 @@ import {
7
7
  } from "../chunk-3NJDHK62.js";
8
8
  import {
9
9
  useFrameCapture
10
- } from "../chunk-AE3TQUC4.js";
10
+ } from "../chunk-ZEA6XJL7.js";
11
11
 
12
12
  // src/DashboardImageExportModal.tsx
13
13
  import { useCallback, useId, useMemo, useRef, useState } from "react";
@@ -3,10 +3,10 @@ import {
3
3
  resolveVideoCoverFramePlan,
4
4
  resolveVideoExportCover,
5
5
  useVideoExport
6
- } from "../chunk-MGOHAWFC.js";
6
+ } from "../chunk-6XPYI42H.js";
7
7
  import {
8
8
  useFrameCapture
9
- } from "../chunk-AE3TQUC4.js";
9
+ } from "../chunk-ZEA6XJL7.js";
10
10
  import "../chunk-RIXBIX3H.js";
11
11
  import "../chunk-5MFQMJ5Z.js";
12
12
  export {
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  VideoExportButton,
3
3
  VideoExportModal
4
- } from "./chunk-6BMNXH6K.js";
4
+ } from "./chunk-DR5I6WZQ.js";
5
5
  import {
6
6
  CoverImageExportModal,
7
7
  coverImageFilename,
8
8
  validateCoverImageDimensions
9
- } from "./chunk-JGD6B4E6.js";
9
+ } from "./chunk-XPWYKETM.js";
10
10
  import "./chunk-3NJDHK62.js";
11
11
  import {
12
12
  DEFAULT_VIDEO_COVER_PRE_ROLL_SECONDS,
13
13
  resolveVideoCoverFramePlan,
14
14
  resolveVideoExportCover,
15
15
  useVideoExport
16
- } from "./chunk-MGOHAWFC.js";
16
+ } from "./chunk-6XPYI42H.js";
17
17
  import {
18
18
  useFrameCapture
19
- } from "./chunk-AE3TQUC4.js";
19
+ } from "./chunk-ZEA6XJL7.js";
20
20
  import {
21
21
  createAudioFileEncoder,
22
22
  supportedAudioFileFormats
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq-video-react",
3
- "version": "2.5.21",
3
+ "version": "2.5.23",
4
4
  "description": "React components for browser-based MP4 and animated-GIF export of Squisq documents",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -81,9 +81,9 @@
81
81
  "react-dom": "^18.0.0 || ^19.0.0"
82
82
  },
83
83
  "dependencies": {
84
- "@bendyline/squisq": "2.13.8",
85
- "@bendyline/squisq-video": "2.4.14",
86
- "@bendyline/squisq-react": "2.12.20",
84
+ "@bendyline/squisq": "2.13.10",
85
+ "@bendyline/squisq-video": "2.4.16",
86
+ "@bendyline/squisq-react": "2.12.22",
87
87
  "@ffmpeg/core": "0.12.10",
88
88
  "@ffmpeg/ffmpeg": "0.12.15",
89
89
  "@ffmpeg/util": "0.12.2",