@bendyline/squisq-video-react 2.4.25 → 2.4.27
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/captureVideoCodecs-HVCZBBNT.js +18 -0
- package/dist/{chunk-JVGUGMEZ.js → chunk-5EBJNTMH.js} +1 -1
- package/dist/{chunk-NTLNXUMA.js → chunk-6I7OB66K.js} +1 -1
- package/dist/{chunk-IOLZNTKA.js → chunk-FGCFIAGU.js} +1 -1
- package/dist/{chunk-Y5ZQ6M43.js → chunk-J6MJYH2I.js} +1 -1
- package/dist/{chunk-CWLDLWSE.js → chunk-RNMPQWDY.js} +20 -13
- package/dist/{chunk-7RONIAPM.js → chunk-TRCTDIWS.js} +1 -1
- package/dist/{chunk-UVDJINCK.js → chunk-VE3OUBRG.js} +1 -1
- package/dist/components/index.js +4 -5
- package/dist/cover-image/index.js +2 -3
- package/dist/dashboard-image/index.js +1 -2
- package/dist/encoder/index.js +1 -1
- package/dist/hooks/index.js +2 -3
- package/dist/index.js +6 -7
- package/dist/{lossyEncoder-55PXLHLE.js → lossyEncoder-27NI5K4Y.js} +1 -1
- package/dist/media-edit/index.js +1 -1
- package/dist/{mediaEditEngine-OBNK6I2B.js → mediaEditEngine-3WUTBNJN.js} +2 -2
- package/dist/workers/mediaEdit.worker.js +2 -2
- package/package.json +2 -2
- package/dist/{chunk-R4P6O5U6.js → chunk-EJ3DVPFF.js} +17176 -17176
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BlobSource,
|
|
3
|
-
Input,
|
|
4
|
-
MATROSKA,
|
|
5
|
-
MP4,
|
|
6
|
-
QTFF,
|
|
7
|
-
VideoSampleSink,
|
|
8
|
-
WEBM
|
|
9
|
-
} from "./chunk-R4P6O5U6.js";
|
|
10
|
-
|
|
11
1
|
// src/hooks/useFrameCapture.ts
|
|
12
2
|
import { createElement } from "react";
|
|
13
3
|
import { createRoot } from "react-dom/client";
|
|
@@ -15,13 +5,11 @@ import { useRef, useCallback, useMemo } from "react";
|
|
|
15
5
|
import { parseMediaCrop } from "@bendyline/squisq/mediaEdit";
|
|
16
6
|
import { resolveDashboardStyleId } from "@bendyline/squisq/doc";
|
|
17
7
|
import { DocPlayer, MediaContext } from "@bendyline/squisq-react";
|
|
18
|
-
import html2canvas from "html2canvas";
|
|
19
8
|
|
|
20
9
|
// src/hooks/captureVideoFrames.ts
|
|
21
10
|
var FRAME_TIME_EPSILON_SECONDS = 1e-4;
|
|
22
11
|
var MAX_SEQUENTIAL_DECODE_GAP_SECONDS = 3;
|
|
23
12
|
var DECODABLE_SOURCE_URL = /^(?:blob|data):/i;
|
|
24
|
-
var INPUT_FORMATS = [MP4, QTFF, WEBM, MATROSKA];
|
|
25
13
|
var decodedFrames = /* @__PURE__ */ new WeakMap();
|
|
26
14
|
function getDecodedCaptureFrame(video) {
|
|
27
15
|
const frame = decodedFrames.get(video);
|
|
@@ -61,7 +49,14 @@ var DecodedVideoCursor = class _DecodedVideoCursor {
|
|
|
61
49
|
}
|
|
62
50
|
/** Open a local source, or null when it has no decodable video track. */
|
|
63
51
|
static async open(blob, ownerDocument) {
|
|
64
|
-
|
|
52
|
+
let codecs;
|
|
53
|
+
try {
|
|
54
|
+
codecs = await import("./captureVideoCodecs-HVCZBBNT.js");
|
|
55
|
+
} catch {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
const { BlobSource, Input, MATROSKA, MP4, QTFF, VideoSampleSink, WEBM } = codecs;
|
|
59
|
+
const input = new Input({ source: new BlobSource(blob), formats: [MP4, QTFF, WEBM, MATROSKA] });
|
|
65
60
|
try {
|
|
66
61
|
const track = await input.getPrimaryVideoTrack();
|
|
67
62
|
if (!track || !await track.canDecode()) {
|
|
@@ -866,6 +861,11 @@ async function rasterizeCaptureSvgClones(originalRoot, clonedRoot, transientCanv
|
|
|
866
861
|
try {
|
|
867
862
|
for (const [index, svg] of clonedSvgs.entries()) {
|
|
868
863
|
const originalSvg = originalSvgs[index];
|
|
864
|
+
for (const element of [svg, ...Array.from(svg.querySelectorAll("*"))]) {
|
|
865
|
+
if (!element.style) continue;
|
|
866
|
+
element.style.setProperty("animation", "none", "important");
|
|
867
|
+
element.style.setProperty("transition", "none", "important");
|
|
868
|
+
}
|
|
869
869
|
const { width, height } = captureSvgRasterSize(svg, originalSvg);
|
|
870
870
|
const cacheKey = captureSvgRasterCacheKey(originalSvg ?? svg, index);
|
|
871
871
|
activeCacheKeys.add(cacheKey);
|
|
@@ -878,7 +878,12 @@ async function rasterizeCaptureSvgClones(originalRoot, clonedRoot, transientCanv
|
|
|
878
878
|
let rasterCanvas = null;
|
|
879
879
|
try {
|
|
880
880
|
await embedCaptureSvgImages(svg, imageDataUrls);
|
|
881
|
+
const opacity = svg.style.getPropertyValue("opacity");
|
|
882
|
+
const opacityPriority = svg.style.getPropertyPriority("opacity");
|
|
883
|
+
svg.style.setProperty("opacity", "1", "important");
|
|
881
884
|
const serializedSvg = new XMLSerializer().serializeToString(svg);
|
|
885
|
+
if (opacity) svg.style.setProperty("opacity", opacity, opacityPriority);
|
|
886
|
+
else svg.style.removeProperty("opacity");
|
|
882
887
|
let entry = cache.get(cacheKey);
|
|
883
888
|
if (!entry || entry.serializedSvg !== serializedSvg || entry.width !== width || entry.height !== height) {
|
|
884
889
|
const containsForeignObject = svg.querySelector("foreignObject") !== null;
|
|
@@ -1438,6 +1443,8 @@ function useFrameCapture() {
|
|
|
1438
1443
|
if (!root) {
|
|
1439
1444
|
throw new Error("Capture root element not found");
|
|
1440
1445
|
}
|
|
1446
|
+
const { default: html2canvas } = await import("html2canvas");
|
|
1447
|
+
assertActive();
|
|
1441
1448
|
const videoFrames = videoFramesRef.current;
|
|
1442
1449
|
const prepareCaptureVideos = async () => {
|
|
1443
1450
|
const attached = await videoFrames?.attach(root) ?? 0;
|
|
@@ -7,7 +7,7 @@ var inlineDenoiser = createRnnoiseDenoiserFactory(
|
|
|
7
7
|
() => import("@shiguredo/rnnoise-wasm").then(({ Rnnoise }) => Rnnoise.load())
|
|
8
8
|
);
|
|
9
9
|
async function inlineEngine() {
|
|
10
|
-
return import("./mediaEditEngine-
|
|
10
|
+
return import("./mediaEditEngine-3WUTBNJN.js");
|
|
11
11
|
}
|
|
12
12
|
function inlineOptions(options) {
|
|
13
13
|
return { ...options, denoiser: options.denoiser ?? inlineDenoiser };
|
|
@@ -92,7 +92,7 @@ function createWavStreamWriter(sampleRate, channels, options = {}) {
|
|
|
92
92
|
// src/audioFile/audioFileEncoder.ts
|
|
93
93
|
var lossyModule = null;
|
|
94
94
|
function loadLossyModule() {
|
|
95
|
-
lossyModule ?? (lossyModule = import("./lossyEncoder-
|
|
95
|
+
lossyModule ?? (lossyModule = import("./lossyEncoder-27NI5K4Y.js"));
|
|
96
96
|
return lossyModule;
|
|
97
97
|
}
|
|
98
98
|
function validateOptions(options) {
|
package/dist/components/index.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6I7OB66K.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
8
8
|
validateCoverImageDimensions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-5EBJNTMH.js";
|
|
10
10
|
import "../chunk-3NJDHK62.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-R4P6O5U6.js";
|
|
11
|
+
import "../chunk-FGCFIAGU.js";
|
|
12
|
+
import "../chunk-RNMPQWDY.js";
|
|
14
13
|
import "../chunk-RIXBIX3H.js";
|
|
15
14
|
import "../chunk-5MFQMJ5Z.js";
|
|
16
15
|
export {
|
|
@@ -2,10 +2,9 @@ import {
|
|
|
2
2
|
CoverImageExportModal,
|
|
3
3
|
coverImageFilename,
|
|
4
4
|
validateCoverImageDimensions
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-5EBJNTMH.js";
|
|
6
6
|
import "../chunk-3NJDHK62.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-R4P6O5U6.js";
|
|
7
|
+
import "../chunk-RNMPQWDY.js";
|
|
9
8
|
export {
|
|
10
9
|
CoverImageExportModal,
|
|
11
10
|
coverImageFilename,
|
|
@@ -7,8 +7,7 @@ import {
|
|
|
7
7
|
} from "../chunk-3NJDHK62.js";
|
|
8
8
|
import {
|
|
9
9
|
useFrameCapture
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-R4P6O5U6.js";
|
|
10
|
+
} from "../chunk-RNMPQWDY.js";
|
|
12
11
|
|
|
13
12
|
// src/DashboardImageExportModal.tsx
|
|
14
13
|
import { useCallback, useId, useMemo, useRef, useState } from "react";
|
package/dist/encoder/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -3,11 +3,10 @@ import {
|
|
|
3
3
|
resolveVideoCoverFramePlan,
|
|
4
4
|
resolveVideoExportCover,
|
|
5
5
|
useVideoExport
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-FGCFIAGU.js";
|
|
7
7
|
import {
|
|
8
8
|
useFrameCapture
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-R4P6O5U6.js";
|
|
9
|
+
} from "../chunk-RNMPQWDY.js";
|
|
11
10
|
import "../chunk-RIXBIX3H.js";
|
|
12
11
|
import "../chunk-5MFQMJ5Z.js";
|
|
13
12
|
export {
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VideoExportButton,
|
|
3
3
|
VideoExportModal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6I7OB66K.js";
|
|
5
5
|
import {
|
|
6
6
|
CoverImageExportModal,
|
|
7
7
|
coverImageFilename,
|
|
8
8
|
validateCoverImageDimensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5EBJNTMH.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-
|
|
16
|
+
} from "./chunk-FGCFIAGU.js";
|
|
17
17
|
import {
|
|
18
18
|
useFrameCapture
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-R4P6O5U6.js";
|
|
19
|
+
} from "./chunk-RNMPQWDY.js";
|
|
21
20
|
import {
|
|
22
21
|
createAudioFileEncoder,
|
|
23
22
|
supportedAudioFileFormats
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VE3OUBRG.js";
|
|
25
24
|
import "./chunk-2W6JQSIY.js";
|
|
26
25
|
import {
|
|
27
26
|
createEncoder,
|
|
@@ -37,7 +36,7 @@ import {
|
|
|
37
36
|
useMediaEditRenders,
|
|
38
37
|
useMediaEditStatus,
|
|
39
38
|
useProcessedAudio
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TRCTDIWS.js";
|
|
41
40
|
import "./chunk-TL2IMDIZ.js";
|
|
42
41
|
import "./chunk-5MFQMJ5Z.js";
|
|
43
42
|
export {
|
package/dist/media-edit/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
analyzeMediaEditPauses,
|
|
4
4
|
previewMediaEditAudio,
|
|
5
5
|
renderMediaEditAudio
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-J6MJYH2I.js";
|
|
7
|
+
import "./chunk-EJ3DVPFF.js";
|
|
8
8
|
export {
|
|
9
9
|
analyzeMediaEditAudio,
|
|
10
10
|
analyzeMediaEditPauses,
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
analyzeMediaEditPauses,
|
|
4
4
|
previewMediaEditAudio,
|
|
5
5
|
renderMediaEditAudio
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-J6MJYH2I.js";
|
|
7
|
+
import "../chunk-EJ3DVPFF.js";
|
|
8
8
|
import {
|
|
9
9
|
createRnnoiseDenoiserFactory
|
|
10
10
|
} from "../chunk-TL2IMDIZ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-video-react",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.27",
|
|
4
4
|
"description": "React components for browser-based MP4 and animated-GIF export of Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@bendyline/squisq": "2.11.19",
|
|
81
81
|
"@bendyline/squisq-video": "2.3.23",
|
|
82
|
-
"@bendyline/squisq-react": "2.11.
|
|
82
|
+
"@bendyline/squisq-react": "2.11.23",
|
|
83
83
|
"@ffmpeg/core": "0.12.10",
|
|
84
84
|
"@ffmpeg/ffmpeg": "0.12.15",
|
|
85
85
|
"@ffmpeg/util": "0.12.2",
|