@remotion/promo-pages 4.0.372 → 4.0.373
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/Homepage.js +1514 -1508
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +1514 -1508
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +896 -889
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +913 -906
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +951 -944
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +918 -911
- package/dist/design.js +896 -889
- package/dist/homepage/Pricing.js +913 -906
- package/dist/template-modal-content.js +951 -944
- package/dist/templates.js +918 -911
- package/package.json +12 -12
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.css +0 -43
- package/dist/templates.css +0 -43
package/dist/design.js
CHANGED
|
@@ -25,22 +25,28 @@ import { createContext as createContext2, useContext } from "react";
|
|
|
25
25
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
26
26
|
import {
|
|
27
27
|
forwardRef as forwardRef2,
|
|
28
|
-
useContext as
|
|
28
|
+
useContext as useContext12,
|
|
29
29
|
useEffect as useEffect3,
|
|
30
|
-
useMemo as
|
|
31
|
-
useState as
|
|
30
|
+
useMemo as useMemo10,
|
|
31
|
+
useState as useState6
|
|
32
32
|
} from "react";
|
|
33
33
|
import { forwardRef, useMemo as useMemo2 } from "react";
|
|
34
34
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
35
35
|
import { createContext as createContext3 } from "react";
|
|
36
36
|
import React3, { useCallback, useMemo as useMemo22, useState } from "react";
|
|
37
37
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
import {
|
|
39
|
+
createContext as createContext9,
|
|
40
|
+
useLayoutEffect,
|
|
41
|
+
useMemo as useMemo7,
|
|
42
|
+
useRef as useRef2,
|
|
43
|
+
useState as useState5
|
|
44
|
+
} from "react";
|
|
45
|
+
import { useContext as useContext6, useMemo as useMemo6 } from "react";
|
|
46
|
+
import { useContext as useContext2, useState as useState2 } from "react";
|
|
41
47
|
import React4 from "react";
|
|
42
48
|
import { useContext as useContext5, useMemo as useMemo5 } from "react";
|
|
43
|
-
import { createContext as
|
|
49
|
+
import { createContext as createContext4 } from "react";
|
|
44
50
|
import {
|
|
45
51
|
createContext as createContext7,
|
|
46
52
|
createRef,
|
|
@@ -52,199 +58,213 @@ import {
|
|
|
52
58
|
useState as useState4
|
|
53
59
|
} from "react";
|
|
54
60
|
import React5, {
|
|
55
|
-
createContext as
|
|
61
|
+
createContext as createContext5,
|
|
56
62
|
useCallback as useCallback2,
|
|
57
63
|
useImperativeHandle,
|
|
58
64
|
useMemo as useMemo3
|
|
59
65
|
} from "react";
|
|
60
66
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
67
|
+
import { createContext as createContext6, useContext as useContext3, useEffect, useRef, useState as useState3 } from "react";
|
|
61
68
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
62
|
-
import { useContext as
|
|
63
|
-
import { createContext as createContext9 } from "react";
|
|
69
|
+
import { createContext as createContext8, useCallback as useCallback4, useContext as useContext7 } from "react";
|
|
64
70
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
65
|
-
import { useContext as useContext7, useMemo as useMemo7 } from "react";
|
|
66
|
-
import { useContext as useContext10, useMemo as useMemo8 } from "react";
|
|
67
71
|
import { useContext as useContext9 } from "react";
|
|
72
|
+
import { createContext as createContext10 } from "react";
|
|
68
73
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
74
|
+
import { useContext as useContext8, useMemo as useMemo8 } from "react";
|
|
75
|
+
import { useContext as useContext11, useMemo as useMemo9 } from "react";
|
|
76
|
+
import { useContext as useContext10 } from "react";
|
|
69
77
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
78
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
70
79
|
import {
|
|
71
80
|
forwardRef as forwardRef3,
|
|
72
81
|
useEffect as useEffect4,
|
|
73
82
|
useImperativeHandle as useImperativeHandle4,
|
|
74
|
-
useLayoutEffect,
|
|
75
|
-
useRef as
|
|
76
|
-
useState as
|
|
83
|
+
useLayoutEffect as useLayoutEffect2,
|
|
84
|
+
useRef as useRef4,
|
|
85
|
+
useState as useState7
|
|
77
86
|
} from "react";
|
|
78
|
-
import { useCallback as
|
|
79
|
-
import React9, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef2 } from "react";
|
|
80
|
-
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
87
|
+
import React10, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef3 } from "react";
|
|
81
88
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
82
|
-
import {
|
|
89
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
90
|
+
import { useContext as useContext13, useEffect as useEffect5, useState as useState9 } from "react";
|
|
83
91
|
import {
|
|
84
|
-
createContext as
|
|
92
|
+
createContext as createContext11,
|
|
85
93
|
useCallback as useCallback6,
|
|
86
|
-
useLayoutEffect as
|
|
87
|
-
useMemo as
|
|
88
|
-
useState as
|
|
94
|
+
useLayoutEffect as useLayoutEffect3,
|
|
95
|
+
useMemo as useMemo11,
|
|
96
|
+
useState as useState8
|
|
89
97
|
} from "react";
|
|
90
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
91
|
-
import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext26 } from "react";
|
|
92
|
-
import React10, { createContext as createContext11, useMemo as useMemo11 } from "react";
|
|
93
98
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
94
|
-
import { useContext as
|
|
95
|
-
import { createContext as createContext12,
|
|
99
|
+
import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext27 } from "react";
|
|
100
|
+
import React11, { createContext as createContext12, useMemo as useMemo12 } from "react";
|
|
96
101
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
97
|
-
import {
|
|
102
|
+
import { useContext as useContext14 } from "react";
|
|
103
|
+
import { createContext as createContext13, useEffect as useEffect6, useState as useState10 } from "react";
|
|
98
104
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
105
|
+
import { createContext as createContext14, useMemo as useMemo13, useReducer } from "react";
|
|
106
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
99
107
|
import {
|
|
100
108
|
forwardRef as forwardRef4,
|
|
101
|
-
useContext as
|
|
109
|
+
useContext as useContext25,
|
|
102
110
|
useEffect as useEffect14,
|
|
103
111
|
useImperativeHandle as useImperativeHandle5,
|
|
104
|
-
useMemo as
|
|
105
|
-
useRef as
|
|
106
|
-
useState as
|
|
112
|
+
useMemo as useMemo21,
|
|
113
|
+
useRef as useRef12,
|
|
114
|
+
useState as useState15
|
|
107
115
|
} from "react";
|
|
108
|
-
import { createContext as
|
|
109
|
-
import * as
|
|
110
|
-
import { useContext as
|
|
111
|
-
import
|
|
112
|
-
createContext as
|
|
116
|
+
import { createContext as createContext15 } from "react";
|
|
117
|
+
import * as React14 from "react";
|
|
118
|
+
import { useContext as useContext17, useLayoutEffect as useLayoutEffect4, useRef as useRef7 } from "react";
|
|
119
|
+
import React15, {
|
|
120
|
+
createContext as createContext16,
|
|
113
121
|
createRef as createRef2,
|
|
114
122
|
useCallback as useCallback7,
|
|
115
|
-
useContext as
|
|
123
|
+
useContext as useContext16,
|
|
116
124
|
useEffect as useEffect7,
|
|
117
|
-
useMemo as
|
|
118
|
-
useRef as
|
|
119
|
-
useState as
|
|
125
|
+
useMemo as useMemo15,
|
|
126
|
+
useRef as useRef5,
|
|
127
|
+
useState as useState11
|
|
120
128
|
} from "react";
|
|
121
|
-
import { useMemo as
|
|
122
|
-
import { jsx as
|
|
123
|
-
import { useRef as
|
|
124
|
-
import { useContext as
|
|
125
|
-
import { useContext as
|
|
129
|
+
import { useMemo as useMemo14 } from "react";
|
|
130
|
+
import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
131
|
+
import { useRef as useRef6 } from "react";
|
|
132
|
+
import { useContext as useContext19, useEffect as useEffect8, useMemo as useMemo16, useState as useState12 } from "react";
|
|
133
|
+
import { useContext as useContext18 } from "react";
|
|
126
134
|
import {
|
|
127
135
|
useCallback as useCallback10,
|
|
128
|
-
useContext as
|
|
136
|
+
useContext as useContext22,
|
|
129
137
|
useEffect as useEffect12,
|
|
130
|
-
useLayoutEffect as
|
|
131
|
-
useRef as
|
|
138
|
+
useLayoutEffect as useLayoutEffect6,
|
|
139
|
+
useRef as useRef11
|
|
132
140
|
} from "react";
|
|
133
|
-
import { useCallback as useCallback9, useMemo as
|
|
134
|
-
import { useContext as
|
|
135
|
-
import
|
|
141
|
+
import { useCallback as useCallback9, useMemo as useMemo19, useRef as useRef9 } from "react";
|
|
142
|
+
import { useContext as useContext21, useMemo as useMemo18 } from "react";
|
|
143
|
+
import React16, {
|
|
136
144
|
useCallback as useCallback8,
|
|
137
|
-
useContext as
|
|
145
|
+
useContext as useContext20,
|
|
138
146
|
useEffect as useEffect9,
|
|
139
|
-
useLayoutEffect as
|
|
140
|
-
useMemo as
|
|
141
|
-
useRef as
|
|
142
|
-
useState as
|
|
147
|
+
useLayoutEffect as useLayoutEffect5,
|
|
148
|
+
useMemo as useMemo17,
|
|
149
|
+
useRef as useRef8,
|
|
150
|
+
useState as useState13
|
|
143
151
|
} from "react";
|
|
144
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
145
|
-
import React16 from "react";
|
|
146
|
-
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
147
|
-
import { useEffect as useEffect11, useRef as useRef9 } from "react";
|
|
148
|
-
import { useContext as useContext22, useEffect as useEffect13 } from "react";
|
|
149
|
-
import { createContext as createContext16, useContext as useContext23, useMemo as useMemo19 } from "react";
|
|
150
152
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
153
|
+
import React17 from "react";
|
|
154
|
+
import { useEffect as useEffect10, useState as useState14 } from "react";
|
|
155
|
+
import { useEffect as useEffect11, useRef as useRef10 } from "react";
|
|
156
|
+
import { useContext as useContext23, useEffect as useEffect13 } from "react";
|
|
157
|
+
import { createContext as createContext17, useContext as useContext24, useMemo as useMemo20 } from "react";
|
|
158
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
151
159
|
import {
|
|
152
160
|
forwardRef as forwardRef5,
|
|
153
|
-
useContext as
|
|
161
|
+
useContext as useContext26,
|
|
154
162
|
useEffect as useEffect15,
|
|
155
163
|
useImperativeHandle as useImperativeHandle6,
|
|
156
|
-
useLayoutEffect as
|
|
157
|
-
useMemo as
|
|
158
|
-
useRef as
|
|
164
|
+
useLayoutEffect as useLayoutEffect7,
|
|
165
|
+
useMemo as useMemo222,
|
|
166
|
+
useRef as useRef13
|
|
159
167
|
} from "react";
|
|
160
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
161
168
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
162
|
-
import { Suspense, useContext as useContext28, useEffect as useEffect17 } from "react";
|
|
163
|
-
import { createPortal } from "react-dom";
|
|
164
|
-
import { createContext as createContext17, useContext as useContext27, useEffect as useEffect16, useMemo as useMemo222 } from "react";
|
|
165
169
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
166
|
-
import {
|
|
167
|
-
import
|
|
168
|
-
import {
|
|
169
|
-
import {
|
|
170
|
+
import { Suspense, useContext as useContext29, useEffect as useEffect17 } from "react";
|
|
171
|
+
import { createPortal } from "react-dom";
|
|
172
|
+
import { createContext as createContext18, useContext as useContext28, useEffect as useEffect16, useMemo as useMemo23 } from "react";
|
|
173
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
174
|
+
import { jsx as jsx222, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
175
|
+
import React21, { useMemo as useMemo24 } from "react";
|
|
170
176
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
177
|
+
import { forwardRef as forwardRef7, useCallback as useCallback12, useState as useState16 } from "react";
|
|
178
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
171
179
|
import {
|
|
172
180
|
forwardRef as forwardRef8,
|
|
173
181
|
useCallback as useCallback13,
|
|
174
|
-
useContext as
|
|
182
|
+
useContext as useContext30,
|
|
175
183
|
useImperativeHandle as useImperativeHandle7,
|
|
176
|
-
useLayoutEffect as
|
|
177
|
-
useRef as
|
|
184
|
+
useLayoutEffect as useLayoutEffect8,
|
|
185
|
+
useRef as useRef14
|
|
178
186
|
} from "react";
|
|
179
|
-
import { jsx as
|
|
187
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
180
188
|
import { createRef as createRef3 } from "react";
|
|
181
|
-
import
|
|
189
|
+
import React25 from "react";
|
|
190
|
+
import {
|
|
182
191
|
useCallback as useCallback14,
|
|
183
192
|
useImperativeHandle as useImperativeHandle8,
|
|
184
|
-
useMemo as
|
|
185
|
-
useRef as useRef14,
|
|
186
|
-
useState as useState16
|
|
187
|
-
} from "react";
|
|
188
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
189
|
-
import {
|
|
190
|
-
useEffect as useEffect18,
|
|
191
|
-
useLayoutEffect as useLayoutEffect8,
|
|
192
|
-
useMemo as useMemo26,
|
|
193
|
+
useMemo as useMemo25,
|
|
193
194
|
useRef as useRef15,
|
|
194
195
|
useState as useState17
|
|
195
196
|
} from "react";
|
|
196
|
-
import { createContext as createContext18, useContext as useContext30, useMemo as useMemo25 } from "react";
|
|
197
197
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
198
|
+
import { useEffect as useEffect18, useMemo as useMemo27, useState as useState18 } from "react";
|
|
199
|
+
import { createContext as createContext19, useContext as useContext31, useMemo as useMemo26 } from "react";
|
|
198
200
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
199
|
-
import
|
|
201
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
202
|
+
import React27, { createContext as createContext20 } from "react";
|
|
200
203
|
import { useCallback as useCallback16 } from "react";
|
|
201
204
|
import {
|
|
202
205
|
useCallback as useCallback15,
|
|
203
|
-
useContext as
|
|
206
|
+
useContext as useContext32,
|
|
204
207
|
useEffect as useEffect19,
|
|
205
208
|
useLayoutEffect as useLayoutEffect9,
|
|
206
|
-
useMemo as
|
|
207
|
-
useState as
|
|
209
|
+
useMemo as useMemo28,
|
|
210
|
+
useState as useState19
|
|
208
211
|
} from "react";
|
|
209
|
-
import { jsx as
|
|
212
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
210
213
|
import {
|
|
211
214
|
forwardRef as forwardRef9,
|
|
212
|
-
useContext as
|
|
215
|
+
useContext as useContext33,
|
|
213
216
|
useEffect as useEffect21,
|
|
214
217
|
useImperativeHandle as useImperativeHandle9,
|
|
215
|
-
useMemo as
|
|
218
|
+
useMemo as useMemo29,
|
|
216
219
|
useRef as useRef16,
|
|
217
|
-
useState as
|
|
220
|
+
useState as useState20
|
|
218
221
|
} from "react";
|
|
219
222
|
import { useEffect as useEffect20 } from "react";
|
|
220
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
221
223
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
222
|
-
import React30, { useMemo as useMemo29 } from "react";
|
|
223
224
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
224
|
-
import
|
|
225
|
-
import React31 from "react";
|
|
226
|
-
import React32, { createContext as createContext20 } from "react";
|
|
225
|
+
import React31, { useMemo as useMemo30 } from "react";
|
|
227
226
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
227
|
+
import { Children, forwardRef as forwardRef10, useMemo as useMemo31 } from "react";
|
|
228
|
+
import React32 from "react";
|
|
229
|
+
import React33, { createContext as createContext21 } from "react";
|
|
228
230
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
229
|
-
import
|
|
230
|
-
import
|
|
231
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
232
|
+
import React35 from "react";
|
|
233
|
+
import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext35 } from "react";
|
|
231
234
|
import {
|
|
232
235
|
forwardRef as forwardRef11,
|
|
233
|
-
useContext as
|
|
236
|
+
useContext as useContext34,
|
|
234
237
|
useEffect as useEffect22,
|
|
235
238
|
useImperativeHandle as useImperativeHandle10,
|
|
236
239
|
useLayoutEffect as useLayoutEffect10,
|
|
237
|
-
useMemo as
|
|
240
|
+
useMemo as useMemo32,
|
|
238
241
|
useRef as useRef17
|
|
239
242
|
} from "react";
|
|
240
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
241
243
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
244
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
242
245
|
function getNodeEnvString() {
|
|
243
246
|
return ["NOD", "E_EN", "V"].join("");
|
|
244
247
|
}
|
|
245
248
|
function truthy2(value) {
|
|
246
249
|
return Boolean(value);
|
|
247
250
|
}
|
|
251
|
+
function mulberry32(a) {
|
|
252
|
+
let t = a + 1831565813;
|
|
253
|
+
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
254
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
255
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
256
|
+
}
|
|
257
|
+
function hashCode(str) {
|
|
258
|
+
let i = 0;
|
|
259
|
+
let chr = 0;
|
|
260
|
+
let hash = 0;
|
|
261
|
+
for (i = 0;i < str.length; i++) {
|
|
262
|
+
chr = str.charCodeAt(i);
|
|
263
|
+
hash = (hash << 5) - hash + chr;
|
|
264
|
+
hash |= 0;
|
|
265
|
+
}
|
|
266
|
+
return hash;
|
|
267
|
+
}
|
|
248
268
|
function validateCodec(defaultCodec, location, name) {
|
|
249
269
|
if (typeof defaultCodec === "undefined") {
|
|
250
270
|
return;
|
|
@@ -323,23 +343,6 @@ function cancelRender(err) {
|
|
|
323
343
|
window.remotion_cancelledError = error.stack;
|
|
324
344
|
throw error;
|
|
325
345
|
}
|
|
326
|
-
function mulberry32(a) {
|
|
327
|
-
let t = a + 1831565813;
|
|
328
|
-
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
329
|
-
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
330
|
-
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
331
|
-
}
|
|
332
|
-
function hashCode(str) {
|
|
333
|
-
let i = 0;
|
|
334
|
-
let chr = 0;
|
|
335
|
-
let hash = 0;
|
|
336
|
-
for (i = 0;i < str.length; i++) {
|
|
337
|
-
chr = str.charCodeAt(i);
|
|
338
|
-
hash = (hash << 5) - hash + chr;
|
|
339
|
-
hash |= 0;
|
|
340
|
-
}
|
|
341
|
-
return hash;
|
|
342
|
-
}
|
|
343
346
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
344
347
|
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
345
348
|
let result = input;
|
|
@@ -443,19 +446,19 @@ function exponentialBackoff(errorCount) {
|
|
|
443
446
|
return 1000 * 2 ** (errorCount - 1);
|
|
444
447
|
}
|
|
445
448
|
function useRemotionContexts() {
|
|
446
|
-
const compositionManagerCtx =
|
|
447
|
-
const timelineContext =
|
|
448
|
-
const setTimelineContext =
|
|
449
|
-
const sequenceContext =
|
|
450
|
-
const nonceContext =
|
|
451
|
-
const canUseRemotionHooksContext =
|
|
452
|
-
const preloadContext =
|
|
453
|
-
const resolveCompositionContext =
|
|
454
|
-
const renderAssetManagerContext =
|
|
455
|
-
const sequenceManagerContext =
|
|
456
|
-
const bufferManagerContext =
|
|
457
|
-
const logLevelContext =
|
|
458
|
-
return
|
|
449
|
+
const compositionManagerCtx = React31.useContext(CompositionManager);
|
|
450
|
+
const timelineContext = React31.useContext(TimelineContext);
|
|
451
|
+
const setTimelineContext = React31.useContext(SetTimelineContext);
|
|
452
|
+
const sequenceContext = React31.useContext(SequenceContext);
|
|
453
|
+
const nonceContext = React31.useContext(NonceContext);
|
|
454
|
+
const canUseRemotionHooksContext = React31.useContext(CanUseRemotionHooks);
|
|
455
|
+
const preloadContext = React31.useContext(PreloadContext);
|
|
456
|
+
const resolveCompositionContext = React31.useContext(ResolveCompositionContext);
|
|
457
|
+
const renderAssetManagerContext = React31.useContext(RenderAssetManager);
|
|
458
|
+
const sequenceManagerContext = React31.useContext(SequenceManager);
|
|
459
|
+
const bufferManagerContext = React31.useContext(BufferingContextReact);
|
|
460
|
+
const logLevelContext = React31.useContext(LogLevelContext);
|
|
461
|
+
return useMemo30(() => ({
|
|
459
462
|
compositionManagerCtx,
|
|
460
463
|
timelineContext,
|
|
461
464
|
setTimelineContext,
|
|
@@ -745,7 +748,7 @@ var __defProp2, __export2 = (target, all) => {
|
|
|
745
748
|
});
|
|
746
749
|
}, useIsPlayer = () => {
|
|
747
750
|
return useContext(IsPlayerContext);
|
|
748
|
-
}, VERSION = "4.0.
|
|
751
|
+
}, VERSION = "4.0.373", checkMultipleRemotionVersions = () => {
|
|
749
752
|
if (typeof globalThis === "undefined") {
|
|
750
753
|
return;
|
|
751
754
|
}
|
|
@@ -891,21 +894,23 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
891
894
|
children
|
|
892
895
|
})
|
|
893
896
|
});
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
897
|
+
}, random = (seed, dummy) => {
|
|
898
|
+
if (dummy !== undefined) {
|
|
899
|
+
throw new TypeError("random() takes only one argument");
|
|
900
|
+
}
|
|
901
|
+
if (seed === null) {
|
|
902
|
+
return Math.random();
|
|
903
|
+
}
|
|
904
|
+
if (typeof seed === "string") {
|
|
905
|
+
return mulberry32(hashCode(seed));
|
|
906
|
+
}
|
|
907
|
+
if (typeof seed === "number") {
|
|
908
|
+
return mulberry32(seed * 10000000000);
|
|
909
|
+
}
|
|
910
|
+
throw new Error("random() argument must be a number or a string");
|
|
906
911
|
}, exports_timeline_position_state, RemotionEnvironmentContext, useRemotionEnvironment = () => {
|
|
907
|
-
const context =
|
|
908
|
-
const [env] =
|
|
912
|
+
const context = useContext2(RemotionEnvironmentContext);
|
|
913
|
+
const [env] = useState2(() => getRemotionEnvironment());
|
|
909
914
|
return context ?? env;
|
|
910
915
|
}, CompositionManager, CompositionSetters, EditorPropsContext, editorPropsProviderRef, timeValueRef, EditorPropsProvider = ({ children }) => {
|
|
911
916
|
const [props, setProps] = React5.useState({});
|
|
@@ -1042,6 +1047,18 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1042
1047
|
}
|
|
1043
1048
|
const parsed = deserializeJSONWithSpecialTypes(param);
|
|
1044
1049
|
return parsed;
|
|
1050
|
+
}, NonceContext, SetNonceContext, useNonce = () => {
|
|
1051
|
+
const context = useContext3(NonceContext);
|
|
1052
|
+
const [nonce, setNonce] = useState3(() => context.getNonce());
|
|
1053
|
+
const lastContext = useRef(context);
|
|
1054
|
+
useEffect(() => {
|
|
1055
|
+
if (lastContext.current === context) {
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
lastContext.current = context;
|
|
1059
|
+
setNonce(context.getNonce);
|
|
1060
|
+
}, [context]);
|
|
1061
|
+
return nonce;
|
|
1045
1062
|
}, validCodecs, validateCalculated = ({
|
|
1046
1063
|
calculated,
|
|
1047
1064
|
compositionId,
|
|
@@ -1525,7 +1542,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1525
1542
|
component: selected.component
|
|
1526
1543
|
};
|
|
1527
1544
|
}, [currentCompositionMetadata, resolved, selected]);
|
|
1528
|
-
},
|
|
1545
|
+
}, makeKey = () => {
|
|
1529
1546
|
return `remotion.time-all`;
|
|
1530
1547
|
}, persistCurrentFrame = (time) => {
|
|
1531
1548
|
localStorage.setItem(makeKey(), JSON.stringify(time));
|
|
@@ -1559,18 +1576,208 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1559
1576
|
const { playing, imperativePlaying } = useContext6(TimelineContext);
|
|
1560
1577
|
const { setPlaying } = useContext6(SetTimelineContext);
|
|
1561
1578
|
return useMemo6(() => [playing, setPlaying, imperativePlaying], [imperativePlaying, playing, setPlaying]);
|
|
1579
|
+
}, isErrorLike = (err) => {
|
|
1580
|
+
if (err instanceof Error) {
|
|
1581
|
+
return true;
|
|
1582
|
+
}
|
|
1583
|
+
if (err === null) {
|
|
1584
|
+
return false;
|
|
1585
|
+
}
|
|
1586
|
+
if (typeof err !== "object") {
|
|
1587
|
+
return false;
|
|
1588
|
+
}
|
|
1589
|
+
if (!("stack" in err)) {
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
if (typeof err.stack !== "string") {
|
|
1593
|
+
return false;
|
|
1594
|
+
}
|
|
1595
|
+
if (!("message" in err)) {
|
|
1596
|
+
return false;
|
|
1597
|
+
}
|
|
1598
|
+
if (typeof err.message !== "string") {
|
|
1599
|
+
return false;
|
|
1600
|
+
}
|
|
1601
|
+
return true;
|
|
1602
|
+
}, logLevels, getNumberForLogLevel = (level) => {
|
|
1603
|
+
return logLevels.indexOf(level);
|
|
1604
|
+
}, isEqualOrBelowLogLevel = (currentLevel, level) => {
|
|
1605
|
+
return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
|
|
1606
|
+
}, transformArgs = ({
|
|
1607
|
+
args,
|
|
1608
|
+
logLevel,
|
|
1609
|
+
tag
|
|
1610
|
+
}) => {
|
|
1611
|
+
const arr = [...args];
|
|
1612
|
+
if (getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
|
|
1613
|
+
arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
|
|
1614
|
+
}
|
|
1615
|
+
if (tag && getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
|
|
1616
|
+
arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
|
|
1617
|
+
}
|
|
1618
|
+
return arr;
|
|
1619
|
+
}, verbose = (options, ...args) => {
|
|
1620
|
+
if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
|
|
1621
|
+
return console.debug(...transformArgs({ args, logLevel: "verbose", tag: options.tag }));
|
|
1622
|
+
}
|
|
1623
|
+
}, trace = (options, ...args) => {
|
|
1624
|
+
if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
|
|
1625
|
+
return console.debug(...transformArgs({ args, logLevel: "trace", tag: options.tag }));
|
|
1626
|
+
}
|
|
1627
|
+
}, info = (options, ...args) => {
|
|
1628
|
+
if (isEqualOrBelowLogLevel(options.logLevel, "info")) {
|
|
1629
|
+
return console.log(...transformArgs({ args, logLevel: "info", tag: options.tag }));
|
|
1630
|
+
}
|
|
1631
|
+
}, warn = (options, ...args) => {
|
|
1632
|
+
if (isEqualOrBelowLogLevel(options.logLevel, "warn")) {
|
|
1633
|
+
return console.warn(...transformArgs({ args, logLevel: "warn", tag: options.tag }));
|
|
1634
|
+
}
|
|
1635
|
+
}, error = (options, ...args) => {
|
|
1636
|
+
return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
|
|
1637
|
+
}, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = (scope, environment, label, options) => {
|
|
1638
|
+
if (typeof label !== "string" && typeof label !== "undefined") {
|
|
1639
|
+
throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
|
|
1640
|
+
}
|
|
1641
|
+
const handle = Math.random();
|
|
1642
|
+
handles.push(handle);
|
|
1643
|
+
const called = Error().stack?.replace(/^Error/g, "") ?? "";
|
|
1644
|
+
if (environment.isRendering) {
|
|
1645
|
+
const timeoutToUse = (options?.timeoutInMilliseconds ?? (typeof scope === "undefined" ? defaultTimeout : scope.remotion_puppeteerTimeout ?? defaultTimeout)) - 2000;
|
|
1646
|
+
if (typeof scope !== "undefined") {
|
|
1647
|
+
const retriesLeft = (options?.retries ?? 0) - (scope.remotion_attempt - 1);
|
|
1648
|
+
scope.remotion_delayRenderTimeouts[handle] = {
|
|
1649
|
+
label: label ?? null,
|
|
1650
|
+
startTime: Date.now(),
|
|
1651
|
+
timeout: setTimeout(() => {
|
|
1652
|
+
const message = [
|
|
1653
|
+
`A delayRender()`,
|
|
1654
|
+
label ? `"${label}"` : null,
|
|
1655
|
+
`was called but not cleared after ${timeoutToUse}ms. See https://remotion.dev/docs/timeout for help.`,
|
|
1656
|
+
retriesLeft > 0 ? DELAY_RENDER_RETRIES_LEFT + retriesLeft : null,
|
|
1657
|
+
retriesLeft > 0 ? DELAY_RENDER_RETRY_TOKEN : null,
|
|
1658
|
+
DELAY_RENDER_CALLSTACK_TOKEN,
|
|
1659
|
+
called
|
|
1660
|
+
].filter(truthy2).join(" ");
|
|
1661
|
+
cancelRender(Error(message));
|
|
1662
|
+
}, timeoutToUse)
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
if (typeof scope !== "undefined") {
|
|
1667
|
+
scope.remotion_renderReady = false;
|
|
1668
|
+
}
|
|
1669
|
+
return handle;
|
|
1670
|
+
}, continueRenderInternal = (scope, handle, environment) => {
|
|
1671
|
+
if (typeof handle === "undefined") {
|
|
1672
|
+
throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");
|
|
1673
|
+
}
|
|
1674
|
+
if (typeof handle !== "number") {
|
|
1675
|
+
throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
|
|
1676
|
+
}
|
|
1677
|
+
handles = handles.filter((h) => {
|
|
1678
|
+
if (h === handle) {
|
|
1679
|
+
if (environment.isRendering && scope !== undefined) {
|
|
1680
|
+
if (!scope.remotion_delayRenderTimeouts[handle]) {
|
|
1681
|
+
return false;
|
|
1682
|
+
}
|
|
1683
|
+
const { label, startTime, timeout } = scope.remotion_delayRenderTimeouts[handle];
|
|
1684
|
+
clearTimeout(timeout);
|
|
1685
|
+
const message = [
|
|
1686
|
+
label ? `"${label}"` : "A handle",
|
|
1687
|
+
DELAY_RENDER_CLEAR_TOKEN,
|
|
1688
|
+
`${Date.now() - startTime}ms`
|
|
1689
|
+
].filter(truthy2).join(" ");
|
|
1690
|
+
Log.verbose({ logLevel: window.remotion_logLevel, tag: "delayRender()" }, message);
|
|
1691
|
+
delete scope.remotion_delayRenderTimeouts[handle];
|
|
1692
|
+
}
|
|
1693
|
+
return false;
|
|
1694
|
+
}
|
|
1695
|
+
return true;
|
|
1696
|
+
});
|
|
1697
|
+
if (handles.length === 0 && typeof scope !== "undefined") {
|
|
1698
|
+
scope.remotion_renderReady = true;
|
|
1699
|
+
}
|
|
1700
|
+
}, DelayRenderContextType, useDelayRender = () => {
|
|
1701
|
+
const environment = useRemotionEnvironment();
|
|
1702
|
+
const scope = useContext7(DelayRenderContextType);
|
|
1703
|
+
const delayRender2 = useCallback4((label, options) => {
|
|
1704
|
+
return delayRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), environment, label, options);
|
|
1705
|
+
}, [environment, scope]);
|
|
1706
|
+
const continueRender2 = useCallback4((handle) => {
|
|
1707
|
+
continueRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), handle, environment);
|
|
1708
|
+
}, [environment, scope]);
|
|
1709
|
+
return { delayRender: delayRender2, continueRender: continueRender2 };
|
|
1710
|
+
}, SetTimelineContext, TimelineContext, TimelineContextProvider = ({ children, frameState }) => {
|
|
1711
|
+
const [playing, setPlaying] = useState5(false);
|
|
1712
|
+
const imperativePlaying = useRef2(false);
|
|
1713
|
+
const [playbackRate, setPlaybackRate] = useState5(1);
|
|
1714
|
+
const audioAndVideoTags = useRef2([]);
|
|
1715
|
+
const [remotionRootId] = useState5(() => String(random(null)));
|
|
1716
|
+
const [_frame, setFrame] = useState5(() => getInitialFrameState());
|
|
1717
|
+
const frame = frameState ?? _frame;
|
|
1718
|
+
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
1719
|
+
if (typeof window !== "undefined") {
|
|
1720
|
+
useLayoutEffect(() => {
|
|
1721
|
+
window.remotion_setFrame = (f, composition, attempt) => {
|
|
1722
|
+
window.remotion_attempt = attempt;
|
|
1723
|
+
const id = delayRender2(`Setting the current frame to ${f}`);
|
|
1724
|
+
let asyncUpdate = true;
|
|
1725
|
+
setFrame((s) => {
|
|
1726
|
+
const currentFrame = s[composition] ?? window.remotion_initialFrame;
|
|
1727
|
+
if (currentFrame === f) {
|
|
1728
|
+
asyncUpdate = false;
|
|
1729
|
+
return s;
|
|
1730
|
+
}
|
|
1731
|
+
return {
|
|
1732
|
+
...s,
|
|
1733
|
+
[composition]: f
|
|
1734
|
+
};
|
|
1735
|
+
});
|
|
1736
|
+
if (asyncUpdate) {
|
|
1737
|
+
requestAnimationFrame(() => continueRender2(id));
|
|
1738
|
+
} else {
|
|
1739
|
+
continueRender2(id);
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
window.remotion_isPlayer = false;
|
|
1743
|
+
}, [continueRender2, delayRender2]);
|
|
1744
|
+
}
|
|
1745
|
+
const timelineContextValue = useMemo7(() => {
|
|
1746
|
+
return {
|
|
1747
|
+
frame,
|
|
1748
|
+
playing,
|
|
1749
|
+
imperativePlaying,
|
|
1750
|
+
rootId: remotionRootId,
|
|
1751
|
+
playbackRate,
|
|
1752
|
+
setPlaybackRate,
|
|
1753
|
+
audioAndVideoTags
|
|
1754
|
+
};
|
|
1755
|
+
}, [frame, playbackRate, playing, remotionRootId]);
|
|
1756
|
+
const setTimelineContextValue = useMemo7(() => {
|
|
1757
|
+
return {
|
|
1758
|
+
setFrame,
|
|
1759
|
+
setPlaying
|
|
1760
|
+
};
|
|
1761
|
+
}, []);
|
|
1762
|
+
return /* @__PURE__ */ jsx62(TimelineContext.Provider, {
|
|
1763
|
+
value: timelineContextValue,
|
|
1764
|
+
children: /* @__PURE__ */ jsx62(SetTimelineContext.Provider, {
|
|
1765
|
+
value: setTimelineContextValue,
|
|
1766
|
+
children
|
|
1767
|
+
})
|
|
1768
|
+
});
|
|
1562
1769
|
}, CanUseRemotionHooks, CanUseRemotionHooksProvider = ({ children }) => {
|
|
1563
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx72(CanUseRemotionHooks.Provider, {
|
|
1564
1771
|
value: true,
|
|
1565
1772
|
children
|
|
1566
1773
|
});
|
|
1567
1774
|
}, useUnsafeVideoConfig = () => {
|
|
1568
|
-
const context =
|
|
1775
|
+
const context = useContext8(SequenceContext);
|
|
1569
1776
|
const ctxWidth = context?.width ?? null;
|
|
1570
1777
|
const ctxHeight = context?.height ?? null;
|
|
1571
1778
|
const ctxDuration = context?.durationInFrames ?? null;
|
|
1572
1779
|
const video = useVideo();
|
|
1573
|
-
return
|
|
1780
|
+
return useMemo8(() => {
|
|
1574
1781
|
if (!video) {
|
|
1575
1782
|
return null;
|
|
1576
1783
|
}
|
|
@@ -1605,7 +1812,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1605
1812
|
}, [ctxDuration, ctxHeight, ctxWidth, video]);
|
|
1606
1813
|
}, useVideoConfig = () => {
|
|
1607
1814
|
const videoConfig = useUnsafeVideoConfig();
|
|
1608
|
-
const context =
|
|
1815
|
+
const context = useContext9(CanUseRemotionHooks);
|
|
1609
1816
|
const isPlayer = useIsPlayer();
|
|
1610
1817
|
if (!videoConfig) {
|
|
1611
1818
|
if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
|
|
@@ -1622,7 +1829,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1622
1829
|
}
|
|
1623
1830
|
return videoConfig;
|
|
1624
1831
|
}, useCurrentFrame = () => {
|
|
1625
|
-
const canUseRemotionHooks =
|
|
1832
|
+
const canUseRemotionHooks = useContext10(CanUseRemotionHooks);
|
|
1626
1833
|
const env = useRemotionEnvironment();
|
|
1627
1834
|
if (!canUseRemotionHooks) {
|
|
1628
1835
|
if (env.isPlayer) {
|
|
@@ -1631,7 +1838,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1631
1838
|
throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
|
|
1632
1839
|
}
|
|
1633
1840
|
const frame = useTimelinePosition();
|
|
1634
|
-
const context =
|
|
1841
|
+
const context = useContext10(SequenceContext);
|
|
1635
1842
|
const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
|
|
1636
1843
|
return frame - contextOffset;
|
|
1637
1844
|
}, Freeze = ({
|
|
@@ -1653,7 +1860,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1653
1860
|
if (!Number.isFinite(frameToFreeze)) {
|
|
1654
1861
|
throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
|
|
1655
1862
|
}
|
|
1656
|
-
const isActive =
|
|
1863
|
+
const isActive = useMemo9(() => {
|
|
1657
1864
|
if (typeof active === "boolean") {
|
|
1658
1865
|
return active;
|
|
1659
1866
|
}
|
|
@@ -1661,10 +1868,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1661
1868
|
return active(frame);
|
|
1662
1869
|
}
|
|
1663
1870
|
}, [active, frame]);
|
|
1664
|
-
const timelineContext =
|
|
1665
|
-
const sequenceContext =
|
|
1871
|
+
const timelineContext = useContext11(TimelineContext);
|
|
1872
|
+
const sequenceContext = useContext11(SequenceContext);
|
|
1666
1873
|
const relativeFrom = sequenceContext?.relativeFrom ?? 0;
|
|
1667
|
-
const timelineValue =
|
|
1874
|
+
const timelineValue = useMemo9(() => {
|
|
1668
1875
|
if (!isActive) {
|
|
1669
1876
|
return timelineContext;
|
|
1670
1877
|
}
|
|
@@ -1679,7 +1886,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1679
1886
|
}
|
|
1680
1887
|
};
|
|
1681
1888
|
}, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
|
|
1682
|
-
const newSequenceContext =
|
|
1889
|
+
const newSequenceContext = useMemo9(() => {
|
|
1683
1890
|
if (!sequenceContext) {
|
|
1684
1891
|
return null;
|
|
1685
1892
|
}
|
|
@@ -1692,9 +1899,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1692
1899
|
cumulatedFrom: 0
|
|
1693
1900
|
};
|
|
1694
1901
|
}, [sequenceContext, isActive]);
|
|
1695
|
-
return /* @__PURE__ */
|
|
1902
|
+
return /* @__PURE__ */ jsx82(TimelineContext.Provider, {
|
|
1696
1903
|
value: timelineValue,
|
|
1697
|
-
children: /* @__PURE__ */
|
|
1904
|
+
children: /* @__PURE__ */ jsx82(SequenceContext.Provider, {
|
|
1698
1905
|
value: newSequenceContext,
|
|
1699
1906
|
children
|
|
1700
1907
|
})
|
|
@@ -1714,9 +1921,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1714
1921
|
...other
|
|
1715
1922
|
}, ref) => {
|
|
1716
1923
|
const { layout = "absolute-fill" } = other;
|
|
1717
|
-
const [id] =
|
|
1718
|
-
const parentSequence =
|
|
1719
|
-
const { rootId } =
|
|
1924
|
+
const [id] = useState6(() => String(Math.random()));
|
|
1925
|
+
const parentSequence = useContext12(SequenceContext);
|
|
1926
|
+
const { rootId } = useContext12(TimelineContext);
|
|
1720
1927
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
1721
1928
|
const nonce = useNonce();
|
|
1722
1929
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
@@ -1741,15 +1948,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1741
1948
|
const videoConfig = useVideoConfig();
|
|
1742
1949
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
1743
1950
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
1744
|
-
const { registerSequence, unregisterSequence } =
|
|
1745
|
-
const { hidden } =
|
|
1746
|
-
const premounting =
|
|
1951
|
+
const { registerSequence, unregisterSequence } = useContext12(SequenceManager);
|
|
1952
|
+
const { hidden } = useContext12(SequenceVisibilityToggleContext);
|
|
1953
|
+
const premounting = useMemo10(() => {
|
|
1747
1954
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
1748
1955
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
1749
|
-
const postmounting =
|
|
1956
|
+
const postmounting = useMemo10(() => {
|
|
1750
1957
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
1751
1958
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
1752
|
-
const contextValue =
|
|
1959
|
+
const contextValue = useMemo10(() => {
|
|
1753
1960
|
return {
|
|
1754
1961
|
cumulatedFrom,
|
|
1755
1962
|
relativeFrom: from,
|
|
@@ -1776,7 +1983,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1776
1983
|
premountDisplay,
|
|
1777
1984
|
postmountDisplay
|
|
1778
1985
|
]);
|
|
1779
|
-
const timelineClipName =
|
|
1986
|
+
const timelineClipName = useMemo10(() => {
|
|
1780
1987
|
return name ?? "";
|
|
1781
1988
|
}, [name]);
|
|
1782
1989
|
const env = useRemotionEnvironment();
|
|
@@ -1824,225 +2031,95 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1824
2031
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
1825
2032
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
1826
2033
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
1827
|
-
const defaultStyle =
|
|
2034
|
+
const defaultStyle = useMemo10(() => {
|
|
1828
2035
|
return {
|
|
1829
2036
|
flexDirection: undefined,
|
|
1830
|
-
...width ? { width } : {},
|
|
1831
|
-
...height ? { height } : {},
|
|
1832
|
-
...styleIfThere ?? {}
|
|
1833
|
-
};
|
|
1834
|
-
}, [height, styleIfThere, width]);
|
|
1835
|
-
if (ref !== null && layout === "none") {
|
|
1836
|
-
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
1837
|
-
}
|
|
1838
|
-
const isSequenceHidden = hidden[id] ?? false;
|
|
1839
|
-
if (isSequenceHidden) {
|
|
1840
|
-
return null;
|
|
1841
|
-
}
|
|
1842
|
-
return /* @__PURE__ */ jsx82(SequenceContext.Provider, {
|
|
1843
|
-
value: contextValue,
|
|
1844
|
-
children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx82(AbsoluteFill, {
|
|
1845
|
-
ref,
|
|
1846
|
-
style: defaultStyle,
|
|
1847
|
-
className: other.className,
|
|
1848
|
-
children: content
|
|
1849
|
-
})
|
|
1850
|
-
});
|
|
1851
|
-
}, RegularSequence, PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
1852
|
-
const frame = useCurrentFrame();
|
|
1853
|
-
if (props.layout === "none") {
|
|
1854
|
-
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
1855
|
-
}
|
|
1856
|
-
const {
|
|
1857
|
-
style: passedStyle,
|
|
1858
|
-
from = 0,
|
|
1859
|
-
durationInFrames = Infinity,
|
|
1860
|
-
premountFor = 0,
|
|
1861
|
-
postmountFor = 0,
|
|
1862
|
-
styleWhilePremounted,
|
|
1863
|
-
styleWhilePostmounted,
|
|
1864
|
-
...otherProps
|
|
1865
|
-
} = props;
|
|
1866
|
-
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
1867
|
-
const premountingActive = frame < from && frame >= from - premountFor;
|
|
1868
|
-
const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
|
|
1869
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
1870
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
1871
|
-
const style = useMemo9(() => {
|
|
1872
|
-
return {
|
|
1873
|
-
...passedStyle,
|
|
1874
|
-
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
1875
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
1876
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
1877
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
1878
|
-
};
|
|
1879
|
-
}, [
|
|
1880
|
-
passedStyle,
|
|
1881
|
-
premountingActive,
|
|
1882
|
-
postmountingActive,
|
|
1883
|
-
styleWhilePremounted,
|
|
1884
|
-
styleWhilePostmounted
|
|
1885
|
-
]);
|
|
1886
|
-
return /* @__PURE__ */ jsx82(Freeze, {
|
|
1887
|
-
frame: freezeFrame,
|
|
1888
|
-
active: isFreezingActive,
|
|
1889
|
-
children: /* @__PURE__ */ jsx82(Sequence, {
|
|
1890
|
-
ref,
|
|
1891
|
-
from,
|
|
1892
|
-
durationInFrames,
|
|
1893
|
-
style,
|
|
1894
|
-
_remotionInternalPremountDisplay: premountFor,
|
|
1895
|
-
_remotionInternalPostmountDisplay: postmountFor,
|
|
1896
|
-
_remotionInternalIsPremounting: premountingActive,
|
|
1897
|
-
_remotionInternalIsPostmounting: postmountingActive,
|
|
1898
|
-
...otherProps
|
|
1899
|
-
})
|
|
1900
|
-
});
|
|
1901
|
-
}, PremountedPostmountedSequence, SequenceRefForwardingFunction = (props, ref) => {
|
|
1902
|
-
const env = useRemotionEnvironment();
|
|
1903
|
-
if (props.layout !== "none" && !env.isRendering) {
|
|
1904
|
-
if (props.premountFor || props.postmountFor) {
|
|
1905
|
-
return /* @__PURE__ */ jsx82(PremountedPostmountedSequence, {
|
|
1906
|
-
...props,
|
|
1907
|
-
ref
|
|
1908
|
-
});
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
return /* @__PURE__ */ jsx82(RegularSequence, {
|
|
1912
|
-
...props,
|
|
1913
|
-
ref
|
|
1914
|
-
});
|
|
1915
|
-
}, Sequence, isErrorLike = (err) => {
|
|
1916
|
-
if (err instanceof Error) {
|
|
1917
|
-
return true;
|
|
1918
|
-
}
|
|
1919
|
-
if (err === null) {
|
|
1920
|
-
return false;
|
|
1921
|
-
}
|
|
1922
|
-
if (typeof err !== "object") {
|
|
1923
|
-
return false;
|
|
1924
|
-
}
|
|
1925
|
-
if (!("stack" in err)) {
|
|
1926
|
-
return false;
|
|
1927
|
-
}
|
|
1928
|
-
if (typeof err.stack !== "string") {
|
|
1929
|
-
return false;
|
|
1930
|
-
}
|
|
1931
|
-
if (!("message" in err)) {
|
|
1932
|
-
return false;
|
|
1933
|
-
}
|
|
1934
|
-
if (typeof err.message !== "string") {
|
|
1935
|
-
return false;
|
|
1936
|
-
}
|
|
1937
|
-
return true;
|
|
1938
|
-
}, logLevels, getNumberForLogLevel = (level) => {
|
|
1939
|
-
return logLevels.indexOf(level);
|
|
1940
|
-
}, isEqualOrBelowLogLevel = (currentLevel, level) => {
|
|
1941
|
-
return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
|
|
1942
|
-
}, transformArgs = ({
|
|
1943
|
-
args,
|
|
1944
|
-
logLevel,
|
|
1945
|
-
tag
|
|
1946
|
-
}) => {
|
|
1947
|
-
const arr = [...args];
|
|
1948
|
-
if (getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
|
|
1949
|
-
arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
|
|
1950
|
-
}
|
|
1951
|
-
if (tag && getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
|
|
1952
|
-
arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
|
|
1953
|
-
}
|
|
1954
|
-
return arr;
|
|
1955
|
-
}, verbose = (options, ...args) => {
|
|
1956
|
-
if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
|
|
1957
|
-
return console.debug(...transformArgs({ args, logLevel: "verbose", tag: options.tag }));
|
|
1958
|
-
}
|
|
1959
|
-
}, trace = (options, ...args) => {
|
|
1960
|
-
if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
|
|
1961
|
-
return console.debug(...transformArgs({ args, logLevel: "trace", tag: options.tag }));
|
|
1962
|
-
}
|
|
1963
|
-
}, info = (options, ...args) => {
|
|
1964
|
-
if (isEqualOrBelowLogLevel(options.logLevel, "info")) {
|
|
1965
|
-
return console.log(...transformArgs({ args, logLevel: "info", tag: options.tag }));
|
|
1966
|
-
}
|
|
1967
|
-
}, warn = (options, ...args) => {
|
|
1968
|
-
if (isEqualOrBelowLogLevel(options.logLevel, "warn")) {
|
|
1969
|
-
return console.warn(...transformArgs({ args, logLevel: "warn", tag: options.tag }));
|
|
1970
|
-
}
|
|
1971
|
-
}, error = (options, ...args) => {
|
|
1972
|
-
return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
|
|
1973
|
-
}, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = (environment, label, options) => {
|
|
1974
|
-
if (typeof label !== "string" && typeof label !== "undefined") {
|
|
1975
|
-
throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
|
|
1976
|
-
}
|
|
1977
|
-
const handle = Math.random();
|
|
1978
|
-
handles.push(handle);
|
|
1979
|
-
const called = Error().stack?.replace(/^Error/g, "") ?? "";
|
|
1980
|
-
if (environment.isRendering) {
|
|
1981
|
-
const timeoutToUse = (options?.timeoutInMilliseconds ?? (typeof window === "undefined" ? defaultTimeout : window.remotion_puppeteerTimeout ?? defaultTimeout)) - 2000;
|
|
1982
|
-
if (typeof window !== "undefined") {
|
|
1983
|
-
const retriesLeft = (options?.retries ?? 0) - (window.remotion_attempt - 1);
|
|
1984
|
-
window.remotion_delayRenderTimeouts[handle] = {
|
|
1985
|
-
label: label ?? null,
|
|
1986
|
-
startTime: Date.now(),
|
|
1987
|
-
timeout: setTimeout(() => {
|
|
1988
|
-
const message = [
|
|
1989
|
-
`A delayRender()`,
|
|
1990
|
-
label ? `"${label}"` : null,
|
|
1991
|
-
`was called but not cleared after ${timeoutToUse}ms. See https://remotion.dev/docs/timeout for help.`,
|
|
1992
|
-
retriesLeft > 0 ? DELAY_RENDER_RETRIES_LEFT + retriesLeft : null,
|
|
1993
|
-
retriesLeft > 0 ? DELAY_RENDER_RETRY_TOKEN : null,
|
|
1994
|
-
DELAY_RENDER_CALLSTACK_TOKEN,
|
|
1995
|
-
called
|
|
1996
|
-
].filter(truthy2).join(" ");
|
|
1997
|
-
cancelRender(Error(message));
|
|
1998
|
-
}, timeoutToUse)
|
|
1999
|
-
};
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
if (typeof window !== "undefined") {
|
|
2003
|
-
window.remotion_renderReady = false;
|
|
2037
|
+
...width ? { width } : {},
|
|
2038
|
+
...height ? { height } : {},
|
|
2039
|
+
...styleIfThere ?? {}
|
|
2040
|
+
};
|
|
2041
|
+
}, [height, styleIfThere, width]);
|
|
2042
|
+
if (ref !== null && layout === "none") {
|
|
2043
|
+
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
2004
2044
|
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");
|
|
2045
|
+
const isSequenceHidden = hidden[id] ?? false;
|
|
2046
|
+
if (isSequenceHidden) {
|
|
2047
|
+
return null;
|
|
2009
2048
|
}
|
|
2010
|
-
|
|
2011
|
-
|
|
2049
|
+
return /* @__PURE__ */ jsx92(SequenceContext.Provider, {
|
|
2050
|
+
value: contextValue,
|
|
2051
|
+
children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx92(AbsoluteFill, {
|
|
2052
|
+
ref,
|
|
2053
|
+
style: defaultStyle,
|
|
2054
|
+
className: other.className,
|
|
2055
|
+
children: content
|
|
2056
|
+
})
|
|
2057
|
+
});
|
|
2058
|
+
}, RegularSequence, PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
2059
|
+
const frame = useCurrentFrame();
|
|
2060
|
+
if (props.layout === "none") {
|
|
2061
|
+
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
2012
2062
|
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2063
|
+
const {
|
|
2064
|
+
style: passedStyle,
|
|
2065
|
+
from = 0,
|
|
2066
|
+
durationInFrames = Infinity,
|
|
2067
|
+
premountFor = 0,
|
|
2068
|
+
postmountFor = 0,
|
|
2069
|
+
styleWhilePremounted,
|
|
2070
|
+
styleWhilePostmounted,
|
|
2071
|
+
...otherProps
|
|
2072
|
+
} = props;
|
|
2073
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
2074
|
+
const premountingActive = frame < from && frame >= from - premountFor;
|
|
2075
|
+
const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
|
|
2076
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
2077
|
+
const isFreezingActive = premountingActive || postmountingActive;
|
|
2078
|
+
const style = useMemo10(() => {
|
|
2079
|
+
return {
|
|
2080
|
+
...passedStyle,
|
|
2081
|
+
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
2082
|
+
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
2083
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
2084
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
2085
|
+
};
|
|
2086
|
+
}, [
|
|
2087
|
+
passedStyle,
|
|
2088
|
+
premountingActive,
|
|
2089
|
+
postmountingActive,
|
|
2090
|
+
styleWhilePremounted,
|
|
2091
|
+
styleWhilePostmounted
|
|
2092
|
+
]);
|
|
2093
|
+
return /* @__PURE__ */ jsx92(Freeze, {
|
|
2094
|
+
frame: freezeFrame,
|
|
2095
|
+
active: isFreezingActive,
|
|
2096
|
+
children: /* @__PURE__ */ jsx92(Sequence, {
|
|
2097
|
+
ref,
|
|
2098
|
+
from,
|
|
2099
|
+
durationInFrames,
|
|
2100
|
+
style,
|
|
2101
|
+
_remotionInternalPremountDisplay: premountFor,
|
|
2102
|
+
_remotionInternalPostmountDisplay: postmountFor,
|
|
2103
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
2104
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
2105
|
+
...otherProps
|
|
2106
|
+
})
|
|
2032
2107
|
});
|
|
2033
|
-
|
|
2034
|
-
|
|
2108
|
+
}, PremountedPostmountedSequence, SequenceRefForwardingFunction = (props, ref) => {
|
|
2109
|
+
const env = useRemotionEnvironment();
|
|
2110
|
+
if (props.layout !== "none" && !env.isRendering) {
|
|
2111
|
+
if (props.premountFor || props.postmountFor) {
|
|
2112
|
+
return /* @__PURE__ */ jsx92(PremountedPostmountedSequence, {
|
|
2113
|
+
...props,
|
|
2114
|
+
ref
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2035
2117
|
}
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
const continueRender2 = useCallback4((handle) => {
|
|
2042
|
-
continueRenderInternal(handle, environment);
|
|
2043
|
-
}, [environment]);
|
|
2044
|
-
return { delayRender: delayRender2, continueRender: continueRender2 };
|
|
2045
|
-
}, calcArgs = (fit, frameSize, canvasSize) => {
|
|
2118
|
+
return /* @__PURE__ */ jsx92(RegularSequence, {
|
|
2119
|
+
...props,
|
|
2120
|
+
ref
|
|
2121
|
+
});
|
|
2122
|
+
}, Sequence, calcArgs = (fit, frameSize, canvasSize) => {
|
|
2046
2123
|
switch (fit) {
|
|
2047
2124
|
case "fill": {
|
|
2048
2125
|
return [
|
|
@@ -2090,7 +2167,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2090
2167
|
throw new Error("Unknown fit: " + fit);
|
|
2091
2168
|
}
|
|
2092
2169
|
}, CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
|
|
2093
|
-
const canvasRef =
|
|
2170
|
+
const canvasRef = useRef3(null);
|
|
2094
2171
|
const draw = useCallback5((imageData) => {
|
|
2095
2172
|
const canvas = canvasRef.current;
|
|
2096
2173
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
@@ -2130,7 +2207,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2130
2207
|
}
|
|
2131
2208
|
};
|
|
2132
2209
|
}, [draw]);
|
|
2133
|
-
return /* @__PURE__ */
|
|
2210
|
+
return /* @__PURE__ */ jsx102("canvas", {
|
|
2134
2211
|
ref: canvasRef,
|
|
2135
2212
|
className,
|
|
2136
2213
|
style
|
|
@@ -2304,7 +2381,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2304
2381
|
}
|
|
2305
2382
|
validateContent(artifact.content);
|
|
2306
2383
|
}, RenderAssetManager, RenderAssetManagerProvider = ({ children }) => {
|
|
2307
|
-
const [renderAssets, setRenderAssets] =
|
|
2384
|
+
const [renderAssets, setRenderAssets] = useState8([]);
|
|
2308
2385
|
const registerRenderAsset = useCallback6((renderAsset) => {
|
|
2309
2386
|
validateRenderAsset(renderAsset);
|
|
2310
2387
|
setRenderAssets((assets) => {
|
|
@@ -2316,7 +2393,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2316
2393
|
return assts.filter((a) => a.id !== id);
|
|
2317
2394
|
});
|
|
2318
2395
|
}, []);
|
|
2319
|
-
|
|
2396
|
+
useLayoutEffect3(() => {
|
|
2320
2397
|
if (typeof window !== "undefined") {
|
|
2321
2398
|
window.remotion_collectAssets = () => {
|
|
2322
2399
|
setRenderAssets([]);
|
|
@@ -2324,22 +2401,22 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2324
2401
|
};
|
|
2325
2402
|
}
|
|
2326
2403
|
}, [renderAssets]);
|
|
2327
|
-
const contextValue =
|
|
2404
|
+
const contextValue = useMemo11(() => {
|
|
2328
2405
|
return {
|
|
2329
2406
|
registerRenderAsset,
|
|
2330
2407
|
unregisterRenderAsset,
|
|
2331
2408
|
renderAssets
|
|
2332
2409
|
};
|
|
2333
2410
|
}, [renderAssets, registerRenderAsset, unregisterRenderAsset]);
|
|
2334
|
-
return /* @__PURE__ */
|
|
2411
|
+
return /* @__PURE__ */ jsx12(RenderAssetManager.Provider, {
|
|
2335
2412
|
value: contextValue,
|
|
2336
2413
|
children
|
|
2337
2414
|
});
|
|
2338
2415
|
}, ArtifactThumbnail, Artifact = ({ filename, content, downloadBehavior }) => {
|
|
2339
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
2416
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext13(RenderAssetManager);
|
|
2340
2417
|
const env = useRemotionEnvironment();
|
|
2341
2418
|
const frame = useCurrentFrame();
|
|
2342
|
-
const [id] =
|
|
2419
|
+
const [id] = useState9(() => {
|
|
2343
2420
|
return String(Math.random());
|
|
2344
2421
|
});
|
|
2345
2422
|
useEffect5(() => {
|
|
@@ -2414,7 +2491,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2414
2491
|
const actualDuration = duration / playbackRate;
|
|
2415
2492
|
return Math.floor(actualDuration);
|
|
2416
2493
|
}, LoopContext, useLoop = () => {
|
|
2417
|
-
return
|
|
2494
|
+
return React11.useContext(LoopContext);
|
|
2418
2495
|
}, Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
|
|
2419
2496
|
const currentFrame = useCurrentFrame();
|
|
2420
2497
|
const { durationInFrames: compDuration } = useVideoConfig();
|
|
@@ -2438,22 +2515,22 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2438
2515
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
2439
2516
|
const start = iteration * durationInFrames;
|
|
2440
2517
|
const from = Math.min(start, maxFrame);
|
|
2441
|
-
const loopDisplay =
|
|
2518
|
+
const loopDisplay = useMemo12(() => {
|
|
2442
2519
|
return {
|
|
2443
2520
|
numberOfTimes: actualTimes,
|
|
2444
2521
|
startOffset: -from,
|
|
2445
2522
|
durationInFrames
|
|
2446
2523
|
};
|
|
2447
2524
|
}, [actualTimes, durationInFrames, from]);
|
|
2448
|
-
const loopContext =
|
|
2525
|
+
const loopContext = useMemo12(() => {
|
|
2449
2526
|
return {
|
|
2450
2527
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
2451
2528
|
durationInFrames
|
|
2452
2529
|
};
|
|
2453
2530
|
}, [currentFrame, durationInFrames]);
|
|
2454
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ jsx13(LoopContext.Provider, {
|
|
2455
2532
|
value: loopContext,
|
|
2456
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ jsx13(Sequence, {
|
|
2457
2534
|
durationInFrames,
|
|
2458
2535
|
from,
|
|
2459
2536
|
name: name ?? "<Loop>",
|
|
@@ -2475,7 +2552,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2475
2552
|
preloads = updater(preloads);
|
|
2476
2553
|
updaters.forEach((u) => u());
|
|
2477
2554
|
}, PrefetchProvider = ({ children }) => {
|
|
2478
|
-
const [_preloads, _setPreloads] =
|
|
2555
|
+
const [_preloads, _setPreloads] = useState10(() => preloads);
|
|
2479
2556
|
useEffect6(() => {
|
|
2480
2557
|
const updaterFunction = () => {
|
|
2481
2558
|
_setPreloads(preloads);
|
|
@@ -2485,7 +2562,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2485
2562
|
updaters = updaters.filter((u) => u !== updaterFunction);
|
|
2486
2563
|
};
|
|
2487
2564
|
}, []);
|
|
2488
|
-
return /* @__PURE__ */
|
|
2565
|
+
return /* @__PURE__ */ jsx14(PreloadContext.Provider, {
|
|
2489
2566
|
value: _preloads,
|
|
2490
2567
|
children
|
|
2491
2568
|
});
|
|
@@ -2502,7 +2579,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2502
2579
|
}
|
|
2503
2580
|
return src.slice(0, hashIndex);
|
|
2504
2581
|
}, usePreload = (src) => {
|
|
2505
|
-
const preloads2 =
|
|
2582
|
+
const preloads2 = useContext14(PreloadContext);
|
|
2506
2583
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
2507
2584
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
2508
2585
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -2777,13 +2854,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2777
2854
|
}
|
|
2778
2855
|
}, DurationsContext, DurationsContextProvider = ({ children }) => {
|
|
2779
2856
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
2780
|
-
const value =
|
|
2857
|
+
const value = useMemo13(() => {
|
|
2781
2858
|
return {
|
|
2782
2859
|
durations,
|
|
2783
2860
|
setDurations
|
|
2784
2861
|
};
|
|
2785
2862
|
}, [durations]);
|
|
2786
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ jsx15(DurationsContext.Provider, {
|
|
2787
2864
|
value,
|
|
2788
2865
|
children
|
|
2789
2866
|
});
|
|
@@ -2799,31 +2876,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2799
2876
|
}
|
|
2800
2877
|
return;
|
|
2801
2878
|
}, LogLevelContext, useLogLevel = () => {
|
|
2802
|
-
const { logLevel } =
|
|
2879
|
+
const { logLevel } = React14.useContext(LogLevelContext);
|
|
2803
2880
|
if (logLevel === null) {
|
|
2804
2881
|
throw new Error("useLogLevel must be used within a LogLevelProvider");
|
|
2805
2882
|
}
|
|
2806
2883
|
return logLevel;
|
|
2807
2884
|
}, useMountTime = () => {
|
|
2808
|
-
const { mountTime } =
|
|
2885
|
+
const { mountTime } = React14.useContext(LogLevelContext);
|
|
2809
2886
|
if (mountTime === null) {
|
|
2810
2887
|
throw new Error("useMountTime must be used within a LogLevelProvider");
|
|
2811
2888
|
}
|
|
2812
2889
|
return mountTime;
|
|
2813
|
-
}, random = (seed, dummy) => {
|
|
2814
|
-
if (dummy !== undefined) {
|
|
2815
|
-
throw new TypeError("random() takes only one argument");
|
|
2816
|
-
}
|
|
2817
|
-
if (seed === null) {
|
|
2818
|
-
return Math.random();
|
|
2819
|
-
}
|
|
2820
|
-
if (typeof seed === "string") {
|
|
2821
|
-
return mulberry32(hashCode(seed));
|
|
2822
|
-
}
|
|
2823
|
-
if (typeof seed === "number") {
|
|
2824
|
-
return mulberry32(seed * 10000000000);
|
|
2825
|
-
}
|
|
2826
|
-
throw new Error("random() argument must be a number or a string");
|
|
2827
2890
|
}, playAndHandleNotAllowedError = ({
|
|
2828
2891
|
mediaRef,
|
|
2829
2892
|
mediaType,
|
|
@@ -2911,7 +2974,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2911
2974
|
Log.warn({ logLevel, tag: null }, "AudioContext is not supported in this browser");
|
|
2912
2975
|
}
|
|
2913
2976
|
}, useSingletonAudioContext = (logLevel, latencyHint) => {
|
|
2914
|
-
const audioContext =
|
|
2977
|
+
const audioContext = useMemo14(() => {
|
|
2915
2978
|
if (typeof AudioContext === "undefined") {
|
|
2916
2979
|
warnOnce(logLevel);
|
|
2917
2980
|
return null;
|
|
@@ -2944,15 +3007,17 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2944
3007
|
return false;
|
|
2945
3008
|
}
|
|
2946
3009
|
return true;
|
|
2947
|
-
}, SharedAudioContext, SharedAudioContextProvider = ({ children, numberOfAudioTags,
|
|
2948
|
-
const audios =
|
|
2949
|
-
const [initialNumberOfAudioTags] =
|
|
3010
|
+
}, SharedAudioContext, SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHint }) => {
|
|
3011
|
+
const audios = useRef5([]);
|
|
3012
|
+
const [initialNumberOfAudioTags] = useState11(numberOfAudioTags);
|
|
2950
3013
|
if (numberOfAudioTags !== initialNumberOfAudioTags) {
|
|
2951
3014
|
throw new Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");
|
|
2952
3015
|
}
|
|
3016
|
+
const compositionManager = useContext16(CompositionManager);
|
|
3017
|
+
const component = compositionManager.compositions.find((c) => compositionManager.canvasContent?.type === "composition" ? c.id === compositionManager.canvasContent.compositionId : null);
|
|
2953
3018
|
const logLevel = useLogLevel();
|
|
2954
3019
|
const audioContext = useSingletonAudioContext(logLevel, audioLatencyHint);
|
|
2955
|
-
const refs =
|
|
3020
|
+
const refs = useMemo15(() => {
|
|
2956
3021
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
2957
3022
|
const ref = createRef2();
|
|
2958
3023
|
return {
|
|
@@ -2965,7 +3030,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2965
3030
|
};
|
|
2966
3031
|
});
|
|
2967
3032
|
}, [audioContext, numberOfAudioTags]);
|
|
2968
|
-
const takenAudios =
|
|
3033
|
+
const takenAudios = useRef5(new Array(numberOfAudioTags).fill(false));
|
|
2969
3034
|
const rerenderAudios = useCallback7(() => {
|
|
2970
3035
|
refs.forEach(({ ref, id }) => {
|
|
2971
3036
|
const data = audios.current?.find((a) => a.id === id);
|
|
@@ -3071,7 +3136,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3071
3136
|
});
|
|
3072
3137
|
audioContext?.resume();
|
|
3073
3138
|
}, [audioContext, logLevel, mountTime, refs, env.isPlayer]);
|
|
3074
|
-
const value =
|
|
3139
|
+
const value = useMemo15(() => {
|
|
3075
3140
|
return {
|
|
3076
3141
|
registerAudio,
|
|
3077
3142
|
unregisterAudio,
|
|
@@ -3102,7 +3167,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3102
3167
|
value,
|
|
3103
3168
|
children: [
|
|
3104
3169
|
refs.map(({ id, ref }) => {
|
|
3105
|
-
return /* @__PURE__ */
|
|
3170
|
+
return /* @__PURE__ */ jsx16("audio", {
|
|
3106
3171
|
ref,
|
|
3107
3172
|
preload: "metadata",
|
|
3108
3173
|
src: EMPTY_AUDIO
|
|
@@ -3116,12 +3181,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3116
3181
|
audioId,
|
|
3117
3182
|
premounting
|
|
3118
3183
|
}) => {
|
|
3119
|
-
const ctx =
|
|
3120
|
-
const [elem] =
|
|
3184
|
+
const ctx = useContext16(SharedAudioContext);
|
|
3185
|
+
const [elem] = useState11(() => {
|
|
3121
3186
|
if (ctx && ctx.numberOfAudioTags > 0) {
|
|
3122
3187
|
return ctx.registerAudio({ aud, audioId, premounting });
|
|
3123
3188
|
}
|
|
3124
|
-
const el =
|
|
3189
|
+
const el = React15.createRef();
|
|
3125
3190
|
const mediaElementSourceNode = ctx?.audioContext ? makeSharedElementSourceNode({
|
|
3126
3191
|
audioContext: ctx.audioContext,
|
|
3127
3192
|
ref: el
|
|
@@ -3135,7 +3200,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3135
3200
|
premounting
|
|
3136
3201
|
};
|
|
3137
3202
|
});
|
|
3138
|
-
const effectToUse =
|
|
3203
|
+
const effectToUse = React15.useInsertionEffect ?? React15.useLayoutEffect;
|
|
3139
3204
|
if (typeof document !== "undefined") {
|
|
3140
3205
|
effectToUse(() => {
|
|
3141
3206
|
if (ctx && ctx.numberOfAudioTags > 0) {
|
|
@@ -3231,9 +3296,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3231
3296
|
duration: initialDuration,
|
|
3232
3297
|
fps
|
|
3233
3298
|
}) => {
|
|
3234
|
-
const actualFromRef =
|
|
3235
|
-
const actualDuration =
|
|
3236
|
-
const actualSrc =
|
|
3299
|
+
const actualFromRef = useRef6(initialActualFrom);
|
|
3300
|
+
const actualDuration = useRef6(initialDuration);
|
|
3301
|
+
const actualSrc = useRef6(initialActualSrc);
|
|
3237
3302
|
if (!isSubsetOfDuration({
|
|
3238
3303
|
prevStartFrom: actualFromRef.current,
|
|
3239
3304
|
newStartFrom: initialActualFrom,
|
|
@@ -3267,16 +3332,16 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3267
3332
|
source,
|
|
3268
3333
|
shouldUseWebAudioApi
|
|
3269
3334
|
}) => {
|
|
3270
|
-
const audioStuffRef =
|
|
3271
|
-
const currentVolumeRef =
|
|
3335
|
+
const audioStuffRef = useRef7(null);
|
|
3336
|
+
const currentVolumeRef = useRef7(volume);
|
|
3272
3337
|
currentVolumeRef.current = volume;
|
|
3273
|
-
const sharedAudioContext =
|
|
3338
|
+
const sharedAudioContext = useContext17(SharedAudioContext);
|
|
3274
3339
|
if (!sharedAudioContext) {
|
|
3275
3340
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
3276
3341
|
}
|
|
3277
3342
|
const { audioContext } = sharedAudioContext;
|
|
3278
3343
|
if (typeof window !== "undefined") {
|
|
3279
|
-
|
|
3344
|
+
useLayoutEffect4(() => {
|
|
3280
3345
|
if (!audioContext) {
|
|
3281
3346
|
return;
|
|
3282
3347
|
}
|
|
@@ -3324,7 +3389,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3324
3389
|
}
|
|
3325
3390
|
return audioStuffRef;
|
|
3326
3391
|
}, useMediaStartsAt = () => {
|
|
3327
|
-
const parentSequence =
|
|
3392
|
+
const parentSequence = useContext18(SequenceContext);
|
|
3328
3393
|
const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
|
|
3329
3394
|
return startsAt;
|
|
3330
3395
|
}, useFrameForVolumeProp = (behavior) => {
|
|
@@ -3383,9 +3448,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3383
3448
|
throw new Error("No src passed");
|
|
3384
3449
|
}
|
|
3385
3450
|
const startsAt = useMediaStartsAt();
|
|
3386
|
-
const parentSequence =
|
|
3451
|
+
const parentSequence = useContext19(SequenceContext);
|
|
3387
3452
|
const videoConfig = useVideoConfig();
|
|
3388
|
-
const [initialVolume] =
|
|
3453
|
+
const [initialVolume] = useState12(() => volume);
|
|
3389
3454
|
const mediaDuration = calculateMediaDuration({
|
|
3390
3455
|
mediaDurationInFrames: videoConfig.durationInFrames,
|
|
3391
3456
|
playbackRate,
|
|
@@ -3393,7 +3458,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3393
3458
|
trimAfter
|
|
3394
3459
|
});
|
|
3395
3460
|
const duration = parentSequence ? Math.min(parentSequence.durationInFrames, mediaDuration) : mediaDuration;
|
|
3396
|
-
const volumes =
|
|
3461
|
+
const volumes = useMemo16(() => {
|
|
3397
3462
|
if (typeof volume === "number") {
|
|
3398
3463
|
return volume;
|
|
3399
3464
|
}
|
|
@@ -3412,7 +3477,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3412
3477
|
}, [initialVolume, mediaType, src, volume]);
|
|
3413
3478
|
const doesVolumeChange = typeof volume === "function";
|
|
3414
3479
|
const nonce = useNonce();
|
|
3415
|
-
const { rootId } =
|
|
3480
|
+
const { rootId } = useContext19(TimelineContext);
|
|
3416
3481
|
const env = useRemotionEnvironment();
|
|
3417
3482
|
return {
|
|
3418
3483
|
volumes,
|
|
@@ -3437,9 +3502,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3437
3502
|
postmountDisplay,
|
|
3438
3503
|
loopDisplay
|
|
3439
3504
|
}) => {
|
|
3440
|
-
const parentSequence =
|
|
3505
|
+
const parentSequence = useContext19(SequenceContext);
|
|
3441
3506
|
const startsAt = useMediaStartsAt();
|
|
3442
|
-
const { registerSequence, unregisterSequence } =
|
|
3507
|
+
const { registerSequence, unregisterSequence } = useContext19(SequenceManager);
|
|
3443
3508
|
const {
|
|
3444
3509
|
volumes,
|
|
3445
3510
|
duration,
|
|
@@ -3514,10 +3579,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3514
3579
|
finalDisplayName
|
|
3515
3580
|
]);
|
|
3516
3581
|
}, useBufferManager = (logLevel, mountTime) => {
|
|
3517
|
-
const [blocks, setBlocks] =
|
|
3518
|
-
const [onBufferingCallbacks, setOnBufferingCallbacks] =
|
|
3519
|
-
const [onResumeCallbacks, setOnResumeCallbacks] =
|
|
3520
|
-
const buffering =
|
|
3582
|
+
const [blocks, setBlocks] = useState13([]);
|
|
3583
|
+
const [onBufferingCallbacks, setOnBufferingCallbacks] = useState13([]);
|
|
3584
|
+
const [onResumeCallbacks, setOnResumeCallbacks] = useState13([]);
|
|
3585
|
+
const buffering = useRef8(false);
|
|
3521
3586
|
const addBlock = useCallback8((block) => {
|
|
3522
3587
|
setBlocks((b) => [...b, block]);
|
|
3523
3588
|
return {
|
|
@@ -3560,7 +3625,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3560
3625
|
}
|
|
3561
3626
|
}, [blocks]);
|
|
3562
3627
|
if (typeof window !== "undefined") {
|
|
3563
|
-
|
|
3628
|
+
useLayoutEffect5(() => {
|
|
3564
3629
|
if (blocks.length === 0) {
|
|
3565
3630
|
onResumeCallbacks.forEach((c) => c());
|
|
3566
3631
|
playbackLogging({
|
|
@@ -3572,18 +3637,18 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3572
3637
|
}
|
|
3573
3638
|
}, [blocks]);
|
|
3574
3639
|
}
|
|
3575
|
-
return
|
|
3640
|
+
return useMemo17(() => {
|
|
3576
3641
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
3577
3642
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
3578
3643
|
}, BufferingContextReact, BufferingProvider = ({ children }) => {
|
|
3579
|
-
const { logLevel, mountTime } =
|
|
3644
|
+
const { logLevel, mountTime } = useContext20(LogLevelContext);
|
|
3580
3645
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
3581
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ jsx17(BufferingContextReact.Provider, {
|
|
3582
3647
|
value: bufferManager,
|
|
3583
3648
|
children
|
|
3584
3649
|
});
|
|
3585
3650
|
}, useIsPlayerBuffering = (bufferManager) => {
|
|
3586
|
-
const [isBuffering, setIsBuffering] =
|
|
3651
|
+
const [isBuffering, setIsBuffering] = useState13(bufferManager.buffering.current);
|
|
3587
3652
|
useEffect9(() => {
|
|
3588
3653
|
const onBuffer = () => {
|
|
3589
3654
|
setIsBuffering(true);
|
|
@@ -3604,9 +3669,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3604
3669
|
}, [bufferManager]);
|
|
3605
3670
|
return isBuffering;
|
|
3606
3671
|
}, useBufferState = () => {
|
|
3607
|
-
const buffer =
|
|
3672
|
+
const buffer = useContext21(BufferingContextReact);
|
|
3608
3673
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
3609
|
-
return
|
|
3674
|
+
return useMemo18(() => ({
|
|
3610
3675
|
delayPlayback: () => {
|
|
3611
3676
|
if (!addBlock) {
|
|
3612
3677
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -3628,7 +3693,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3628
3693
|
logLevel,
|
|
3629
3694
|
mountTime
|
|
3630
3695
|
}) => {
|
|
3631
|
-
const bufferingRef =
|
|
3696
|
+
const bufferingRef = useRef9(false);
|
|
3632
3697
|
const { delayPlayback } = useBufferState();
|
|
3633
3698
|
const bufferUntilFirstFrame = useCallback9((requestedTime) => {
|
|
3634
3699
|
if (mediaType !== "video") {
|
|
@@ -3701,14 +3766,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3701
3766
|
onVariableFpsVideoDetected,
|
|
3702
3767
|
pauseWhenBuffering
|
|
3703
3768
|
]);
|
|
3704
|
-
return
|
|
3769
|
+
return useMemo19(() => {
|
|
3705
3770
|
return {
|
|
3706
3771
|
isBuffering: () => bufferingRef.current,
|
|
3707
3772
|
bufferUntilFirstFrame
|
|
3708
3773
|
};
|
|
3709
3774
|
}, [bufferUntilFirstFrame]);
|
|
3710
3775
|
}, useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
3711
|
-
const lastUpdate =
|
|
3776
|
+
const lastUpdate = React17.useRef({
|
|
3712
3777
|
time: mediaRef.current?.currentTime ?? 0,
|
|
3713
3778
|
lastUpdate: performance.now()
|
|
3714
3779
|
});
|
|
@@ -3746,7 +3811,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3746
3811
|
src
|
|
3747
3812
|
}) => {
|
|
3748
3813
|
const buffer = useBufferState();
|
|
3749
|
-
const [isBuffering, setIsBuffering] =
|
|
3814
|
+
const [isBuffering, setIsBuffering] = useState14(false);
|
|
3750
3815
|
useEffect10(() => {
|
|
3751
3816
|
let cleanupFns = [];
|
|
3752
3817
|
const { current } = element;
|
|
@@ -3878,7 +3943,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3878
3943
|
lastSeek,
|
|
3879
3944
|
onVariableFpsVideoDetected
|
|
3880
3945
|
}) => {
|
|
3881
|
-
const currentTime =
|
|
3946
|
+
const currentTime = useRef10(null);
|
|
3882
3947
|
useEffect11(() => {
|
|
3883
3948
|
const { current } = mediaRef;
|
|
3884
3949
|
if (current) {
|
|
@@ -3995,21 +4060,21 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3995
4060
|
isPostmounting,
|
|
3996
4061
|
onAutoPlayError
|
|
3997
4062
|
}) => {
|
|
3998
|
-
const { playbackRate: globalPlaybackRate } =
|
|
4063
|
+
const { playbackRate: globalPlaybackRate } = useContext22(TimelineContext);
|
|
3999
4064
|
const frame = useCurrentFrame();
|
|
4000
4065
|
const absoluteFrame = useTimelinePosition();
|
|
4001
4066
|
const [playing] = usePlayingState();
|
|
4002
|
-
const buffering =
|
|
4067
|
+
const buffering = useContext22(BufferingContextReact);
|
|
4003
4068
|
const { fps } = useVideoConfig();
|
|
4004
4069
|
const mediaStartsAt = useMediaStartsAt();
|
|
4005
|
-
const lastSeekDueToShift =
|
|
4006
|
-
const lastSeek =
|
|
4070
|
+
const lastSeekDueToShift = useRef11(null);
|
|
4071
|
+
const lastSeek = useRef11(null);
|
|
4007
4072
|
const logLevel = useLogLevel();
|
|
4008
4073
|
const mountTime = useMountTime();
|
|
4009
4074
|
if (!buffering) {
|
|
4010
4075
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
4011
4076
|
}
|
|
4012
|
-
const isVariableFpsVideoMap =
|
|
4077
|
+
const isVariableFpsVideoMap = useRef11({});
|
|
4013
4078
|
const onVariableFpsVideoDetected = useCallback10(() => {
|
|
4014
4079
|
if (!src) {
|
|
4015
4080
|
return;
|
|
@@ -4100,7 +4165,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4100
4165
|
isPostmounting
|
|
4101
4166
|
]);
|
|
4102
4167
|
const env = useRemotionEnvironment();
|
|
4103
|
-
|
|
4168
|
+
useLayoutEffect6(() => {
|
|
4104
4169
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
4105
4170
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
4106
4171
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
@@ -4230,7 +4295,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4230
4295
|
isPremounting,
|
|
4231
4296
|
isPostmounting
|
|
4232
4297
|
}) => {
|
|
4233
|
-
const { audioAndVideoTags, imperativePlaying } =
|
|
4298
|
+
const { audioAndVideoTags, imperativePlaying } = useContext23(TimelineContext);
|
|
4234
4299
|
const logLevel = useLogLevel();
|
|
4235
4300
|
const mountTime = useMountTime();
|
|
4236
4301
|
const env = useRemotionEnvironment();
|
|
@@ -4273,15 +4338,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4273
4338
|
env.isPlayer
|
|
4274
4339
|
]);
|
|
4275
4340
|
}, MediaVolumeContext, SetMediaVolumeContext, useMediaVolumeState = () => {
|
|
4276
|
-
const { mediaVolume } =
|
|
4277
|
-
const { setMediaVolume } =
|
|
4278
|
-
return
|
|
4341
|
+
const { mediaVolume } = useContext24(MediaVolumeContext);
|
|
4342
|
+
const { setMediaVolume } = useContext24(SetMediaVolumeContext);
|
|
4343
|
+
return useMemo20(() => {
|
|
4279
4344
|
return [mediaVolume, setMediaVolume];
|
|
4280
4345
|
}, [mediaVolume, setMediaVolume]);
|
|
4281
4346
|
}, useMediaMutedState = () => {
|
|
4282
|
-
const { mediaMuted } =
|
|
4283
|
-
const { setMediaMuted } =
|
|
4284
|
-
return
|
|
4347
|
+
const { mediaMuted } = useContext24(MediaVolumeContext);
|
|
4348
|
+
const { setMediaMuted } = useContext24(SetMediaVolumeContext);
|
|
4349
|
+
return useMemo20(() => {
|
|
4285
4350
|
return [mediaMuted, setMediaMuted];
|
|
4286
4351
|
}, [mediaMuted, setMediaMuted]);
|
|
4287
4352
|
}, warnAboutTooHighVolume = (volume) => {
|
|
@@ -4289,7 +4354,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4289
4354
|
throw new Error(`Volume was set to ${volume}, but regular volume is 1, not 100. Did you forget to divide by 100? Set a volume of less than 100 to dismiss this error.`);
|
|
4290
4355
|
}
|
|
4291
4356
|
}, AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
4292
|
-
const [initialShouldPreMountAudioElements] =
|
|
4357
|
+
const [initialShouldPreMountAudioElements] = useState15(props.shouldPreMountAudioTags);
|
|
4293
4358
|
if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {
|
|
4294
4359
|
throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");
|
|
4295
4360
|
}
|
|
@@ -4328,13 +4393,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4328
4393
|
const [mediaVolume] = useMediaVolumeState();
|
|
4329
4394
|
const [mediaMuted] = useMediaMutedState();
|
|
4330
4395
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
4331
|
-
const { hidden } =
|
|
4396
|
+
const { hidden } = useContext25(SequenceVisibilityToggleContext);
|
|
4332
4397
|
if (!src) {
|
|
4333
4398
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
4334
4399
|
}
|
|
4335
4400
|
const preloadedSrc = usePreload(src);
|
|
4336
|
-
const sequenceContext =
|
|
4337
|
-
const [timelineId] =
|
|
4401
|
+
const sequenceContext = useContext25(SequenceContext);
|
|
4402
|
+
const [timelineId] = useState15(() => String(Math.random()));
|
|
4338
4403
|
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
4339
4404
|
const userPreferredVolume = evaluateVolume({
|
|
4340
4405
|
frame: volumePropFrame,
|
|
@@ -4346,7 +4411,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4346
4411
|
crossOrigin,
|
|
4347
4412
|
requestsVideoFrame: false
|
|
4348
4413
|
});
|
|
4349
|
-
const propsToPass =
|
|
4414
|
+
const propsToPass = useMemo21(() => {
|
|
4350
4415
|
return {
|
|
4351
4416
|
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
4352
4417
|
src: preloadedSrc,
|
|
@@ -4364,7 +4429,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4364
4429
|
userPreferredVolume,
|
|
4365
4430
|
crossOriginValue
|
|
4366
4431
|
]);
|
|
4367
|
-
const id =
|
|
4432
|
+
const id = useMemo21(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
4368
4433
|
src,
|
|
4369
4434
|
sequenceContext?.relativeFrom,
|
|
4370
4435
|
sequenceContext?.cumulatedFrom,
|
|
@@ -4372,7 +4437,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4372
4437
|
props.muted,
|
|
4373
4438
|
props.loop
|
|
4374
4439
|
]);
|
|
4375
|
-
const context =
|
|
4440
|
+
const context = useContext25(SharedAudioContext);
|
|
4376
4441
|
if (!context) {
|
|
4377
4442
|
throw new Error("SharedAudioContext not found");
|
|
4378
4443
|
}
|
|
@@ -4425,7 +4490,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4425
4490
|
useImperativeHandle5(ref, () => {
|
|
4426
4491
|
return audioRef.current;
|
|
4427
4492
|
}, [audioRef]);
|
|
4428
|
-
const currentOnDurationCallback =
|
|
4493
|
+
const currentOnDurationCallback = useRef12(onDuration);
|
|
4429
4494
|
currentOnDurationCallback.current = onDuration;
|
|
4430
4495
|
useEffect14(() => {
|
|
4431
4496
|
const { current } = audioRef;
|
|
@@ -4447,14 +4512,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4447
4512
|
if (initialShouldPreMountAudioElements) {
|
|
4448
4513
|
return null;
|
|
4449
4514
|
}
|
|
4450
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ jsx18("audio", {
|
|
4451
4516
|
ref: audioRef,
|
|
4452
4517
|
preload: "metadata",
|
|
4453
4518
|
crossOrigin: crossOriginValue,
|
|
4454
4519
|
...propsToPass
|
|
4455
4520
|
});
|
|
4456
4521
|
}, AudioForPreview, AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
4457
|
-
const audioRef =
|
|
4522
|
+
const audioRef = useRef13(null);
|
|
4458
4523
|
const {
|
|
4459
4524
|
volume: volumeProp,
|
|
4460
4525
|
playbackRate,
|
|
@@ -4476,10 +4541,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4476
4541
|
const absoluteFrame = useTimelinePosition();
|
|
4477
4542
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
4478
4543
|
const frame = useCurrentFrame();
|
|
4479
|
-
const sequenceContext =
|
|
4480
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
4544
|
+
const sequenceContext = useContext26(SequenceContext);
|
|
4545
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext26(RenderAssetManager);
|
|
4481
4546
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
4482
|
-
const id =
|
|
4547
|
+
const id = useMemo222(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
4483
4548
|
props.src,
|
|
4484
4549
|
sequenceContext?.relativeFrom,
|
|
4485
4550
|
sequenceContext?.cumulatedFrom,
|
|
@@ -4538,7 +4603,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4538
4603
|
]);
|
|
4539
4604
|
const { src } = props;
|
|
4540
4605
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
4541
|
-
|
|
4606
|
+
useLayoutEffect7(() => {
|
|
4542
4607
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
4543
4608
|
return;
|
|
4544
4609
|
}
|
|
@@ -4578,13 +4643,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4578
4643
|
if (!needsToRenderAudioTag) {
|
|
4579
4644
|
return null;
|
|
4580
4645
|
}
|
|
4581
|
-
return /* @__PURE__ */
|
|
4646
|
+
return /* @__PURE__ */ jsx19("audio", {
|
|
4582
4647
|
ref: audioRef,
|
|
4583
4648
|
...nativeProps,
|
|
4584
4649
|
onError: onNativeError
|
|
4585
4650
|
});
|
|
4586
4651
|
}, AudioForRendering, AudioRefForwardingFunction = (props, ref) => {
|
|
4587
|
-
const audioContext =
|
|
4652
|
+
const audioContext = useContext27(SharedAudioContext);
|
|
4588
4653
|
const {
|
|
4589
4654
|
startFrom,
|
|
4590
4655
|
endAt,
|
|
@@ -4600,7 +4665,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4600
4665
|
const { loop, ...propsOtherThanLoop } = props;
|
|
4601
4666
|
const { fps } = useVideoConfig();
|
|
4602
4667
|
const environment = useRemotionEnvironment();
|
|
4603
|
-
const { durations, setDurations } =
|
|
4668
|
+
const { durations, setDurations } = useContext27(DurationsContext);
|
|
4604
4669
|
if (typeof props.src !== "string") {
|
|
4605
4670
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
4606
4671
|
}
|
|
@@ -4632,14 +4697,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4632
4697
|
});
|
|
4633
4698
|
if (loop && durationFetched !== undefined) {
|
|
4634
4699
|
if (!Number.isFinite(durationFetched)) {
|
|
4635
|
-
return /* @__PURE__ */
|
|
4700
|
+
return /* @__PURE__ */ jsx20(Html5Audio, {
|
|
4636
4701
|
...propsOtherThanLoop,
|
|
4637
4702
|
ref,
|
|
4638
4703
|
_remotionInternalNativeLoopPassed: true
|
|
4639
4704
|
});
|
|
4640
4705
|
}
|
|
4641
4706
|
const duration = durationFetched * fps;
|
|
4642
|
-
return /* @__PURE__ */
|
|
4707
|
+
return /* @__PURE__ */ jsx20(Loop, {
|
|
4643
4708
|
layout: "none",
|
|
4644
4709
|
durationInFrames: calculateMediaDuration({
|
|
4645
4710
|
trimAfter: trimAfterValue,
|
|
@@ -4647,7 +4712,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4647
4712
|
playbackRate: props.playbackRate ?? 1,
|
|
4648
4713
|
trimBefore: trimBeforeValue
|
|
4649
4714
|
}),
|
|
4650
|
-
children: /* @__PURE__ */
|
|
4715
|
+
children: /* @__PURE__ */ jsx20(Html5Audio, {
|
|
4651
4716
|
...propsOtherThanLoop,
|
|
4652
4717
|
ref,
|
|
4653
4718
|
_remotionInternalNativeLoopPassed: true
|
|
@@ -4655,13 +4720,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4655
4720
|
});
|
|
4656
4721
|
}
|
|
4657
4722
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
4658
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsx20(Sequence, {
|
|
4659
4724
|
layout: "none",
|
|
4660
4725
|
from: 0 - (trimBeforeValue ?? 0),
|
|
4661
4726
|
showInTimeline: false,
|
|
4662
4727
|
durationInFrames: trimAfterValue,
|
|
4663
4728
|
name,
|
|
4664
|
-
children: /* @__PURE__ */
|
|
4729
|
+
children: /* @__PURE__ */ jsx20(Html5Audio, {
|
|
4665
4730
|
_remotionInternalNeedsDurationCalculation: Boolean(loop),
|
|
4666
4731
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
4667
4732
|
...otherProps,
|
|
@@ -4671,7 +4736,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4671
4736
|
}
|
|
4672
4737
|
validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Html5Audio");
|
|
4673
4738
|
if (environment.isRendering) {
|
|
4674
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsx20(AudioForRendering, {
|
|
4675
4740
|
onDuration,
|
|
4676
4741
|
...props,
|
|
4677
4742
|
ref,
|
|
@@ -4679,7 +4744,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4679
4744
|
_remotionInternalNeedsDurationCalculation: Boolean(loop)
|
|
4680
4745
|
});
|
|
4681
4746
|
}
|
|
4682
|
-
return /* @__PURE__ */
|
|
4747
|
+
return /* @__PURE__ */ jsx20(AudioForPreview, {
|
|
4683
4748
|
_remotionInternalNativeLoopPassed: props._remotionInternalNativeLoopPassed ?? false,
|
|
4684
4749
|
_remotionInternalStack: stack ?? null,
|
|
4685
4750
|
shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0,
|
|
@@ -4696,7 +4761,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4696
4761
|
style: container,
|
|
4697
4762
|
id: "remotion-comp-loading",
|
|
4698
4763
|
children: [
|
|
4699
|
-
/* @__PURE__ */
|
|
4764
|
+
/* @__PURE__ */ jsx222("style", {
|
|
4700
4765
|
type: "text/css",
|
|
4701
4766
|
children: `
|
|
4702
4767
|
@keyframes anim {
|
|
@@ -4713,12 +4778,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4713
4778
|
}
|
|
4714
4779
|
`
|
|
4715
4780
|
}),
|
|
4716
|
-
/* @__PURE__ */
|
|
4781
|
+
/* @__PURE__ */ jsx222("svg", {
|
|
4717
4782
|
width: ICON_SIZE,
|
|
4718
4783
|
height: ICON_SIZE,
|
|
4719
4784
|
viewBox: "-100 -100 400 400",
|
|
4720
4785
|
style: rotate,
|
|
4721
|
-
children: /* @__PURE__ */
|
|
4786
|
+
children: /* @__PURE__ */ jsx222("path", {
|
|
4722
4787
|
fill: "#555",
|
|
4723
4788
|
stroke: "#555",
|
|
4724
4789
|
strokeWidth: "100",
|
|
@@ -4763,7 +4828,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4763
4828
|
componentName,
|
|
4764
4829
|
noSuspense
|
|
4765
4830
|
}) => {
|
|
4766
|
-
const lazy =
|
|
4831
|
+
const lazy = useMemo24(() => {
|
|
4767
4832
|
if ("component" in compProps) {
|
|
4768
4833
|
if (typeof document === "undefined" || noSuspense) {
|
|
4769
4834
|
return compProps.component;
|
|
@@ -4777,7 +4842,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4777
4842
|
if (typeof compProps.lazyComponent === "undefined") {
|
|
4778
4843
|
throw new Error(`A value of \`undefined\` was passed to the \`lazyComponent\` prop. Check the value you are passing to the <${componentName}/> component.`);
|
|
4779
4844
|
}
|
|
4780
|
-
return
|
|
4845
|
+
return React21.lazy(compProps.lazyComponent);
|
|
4781
4846
|
}
|
|
4782
4847
|
throw new Error("You must pass either 'component' or 'lazyComponent'");
|
|
4783
4848
|
}, [compProps.component, compProps.lazyComponent]);
|
|
@@ -4813,7 +4878,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4813
4878
|
schema,
|
|
4814
4879
|
...compProps
|
|
4815
4880
|
}) => {
|
|
4816
|
-
const compManager =
|
|
4881
|
+
const compManager = useContext29(CompositionSetters);
|
|
4817
4882
|
const { registerComposition, unregisterComposition } = compManager;
|
|
4818
4883
|
const video = useVideo();
|
|
4819
4884
|
const lazy = useLazyComponent({
|
|
@@ -4824,7 +4889,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4824
4889
|
const nonce = useNonce();
|
|
4825
4890
|
const isPlayer = useIsPlayer();
|
|
4826
4891
|
const environment = useRemotionEnvironment();
|
|
4827
|
-
const canUseComposition =
|
|
4892
|
+
const canUseComposition = useContext29(CanUseRemotionHooks);
|
|
4828
4893
|
if (typeof window !== "undefined") {
|
|
4829
4894
|
window.remotion_seenCompositionIds = Array.from(new Set([...window.remotion_seenCompositionIds ?? [], id]));
|
|
4830
4895
|
}
|
|
@@ -4834,7 +4899,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4834
4899
|
}
|
|
4835
4900
|
throw new Error("<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.");
|
|
4836
4901
|
}
|
|
4837
|
-
const { folderName, parentName } =
|
|
4902
|
+
const { folderName, parentName } = useContext29(FolderContext);
|
|
4838
4903
|
useEffect17(() => {
|
|
4839
4904
|
if (!id) {
|
|
4840
4905
|
throw new Error("No id for composition passed.");
|
|
@@ -4887,10 +4952,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4887
4952
|
if (resolved === null || resolved.type !== "success" && resolved.type !== "success-and-refreshing") {
|
|
4888
4953
|
return null;
|
|
4889
4954
|
}
|
|
4890
|
-
return createPortal(/* @__PURE__ */
|
|
4891
|
-
children: /* @__PURE__ */
|
|
4892
|
-
fallback: /* @__PURE__ */
|
|
4893
|
-
children: /* @__PURE__ */
|
|
4955
|
+
return createPortal(/* @__PURE__ */ jsx23(CanUseRemotionHooksProvider, {
|
|
4956
|
+
children: /* @__PURE__ */ jsx23(Suspense, {
|
|
4957
|
+
fallback: /* @__PURE__ */ jsx23(Loading, {}),
|
|
4958
|
+
children: /* @__PURE__ */ jsx23(Comp, {
|
|
4894
4959
|
...resolved.result.props ?? {}
|
|
4895
4960
|
})
|
|
4896
4961
|
})
|
|
@@ -4901,10 +4966,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4901
4966
|
if (resolved === null || resolved.type !== "success" && resolved.type !== "success-and-refreshing") {
|
|
4902
4967
|
return null;
|
|
4903
4968
|
}
|
|
4904
|
-
return createPortal(/* @__PURE__ */
|
|
4905
|
-
children: /* @__PURE__ */
|
|
4906
|
-
fallback: /* @__PURE__ */
|
|
4907
|
-
children: /* @__PURE__ */
|
|
4969
|
+
return createPortal(/* @__PURE__ */ jsx23(CanUseRemotionHooksProvider, {
|
|
4970
|
+
children: /* @__PURE__ */ jsx23(Suspense, {
|
|
4971
|
+
fallback: /* @__PURE__ */ jsx23(Fallback, {}),
|
|
4972
|
+
children: /* @__PURE__ */ jsx23(Comp, {
|
|
4908
4973
|
...resolved.result.props ?? {}
|
|
4909
4974
|
})
|
|
4910
4975
|
})
|
|
@@ -4912,11 +4977,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4912
4977
|
}
|
|
4913
4978
|
return null;
|
|
4914
4979
|
}, Composition = (props2) => {
|
|
4915
|
-
const { onlyRenderComposition } =
|
|
4980
|
+
const { onlyRenderComposition } = useContext29(CompositionSetters);
|
|
4916
4981
|
if (onlyRenderComposition && onlyRenderComposition !== props2.id) {
|
|
4917
4982
|
return null;
|
|
4918
4983
|
}
|
|
4919
|
-
return /* @__PURE__ */
|
|
4984
|
+
return /* @__PURE__ */ jsx23(InnerComposition, {
|
|
4920
4985
|
...props2
|
|
4921
4986
|
});
|
|
4922
4987
|
}, kSplineTableSize = 11, kSampleStepSize, ENABLE_V5_BREAKING_CHANGES = false, IFrameRefForwarding = ({
|
|
@@ -4927,7 +4992,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4927
4992
|
...props2
|
|
4928
4993
|
}, ref) => {
|
|
4929
4994
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
4930
|
-
const [handle] =
|
|
4995
|
+
const [handle] = useState16(() => delayRender2(`Loading <IFrame> with source ${props2.src}`, {
|
|
4931
4996
|
retries: delayRenderRetries ?? undefined,
|
|
4932
4997
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
4933
4998
|
}));
|
|
@@ -4943,7 +5008,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4943
5008
|
console.error("Error loading iframe:", e, "Handle the event using the onError() prop to make this message disappear.");
|
|
4944
5009
|
}
|
|
4945
5010
|
}, [handle, onError, continueRender2]);
|
|
4946
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ jsx24("iframe", {
|
|
4947
5012
|
referrerPolicy: "strict-origin-when-cross-origin",
|
|
4948
5013
|
...props2,
|
|
4949
5014
|
ref,
|
|
@@ -4961,10 +5026,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4961
5026
|
crossOrigin,
|
|
4962
5027
|
...props2
|
|
4963
5028
|
}, ref) => {
|
|
4964
|
-
const imageRef =
|
|
4965
|
-
const errors =
|
|
5029
|
+
const imageRef = useRef14(null);
|
|
5030
|
+
const errors = useRef14({});
|
|
4966
5031
|
const { delayPlayback } = useBufferState();
|
|
4967
|
-
const sequenceContext =
|
|
5032
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
4968
5033
|
if (!src) {
|
|
4969
5034
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
4970
5035
|
}
|
|
@@ -5014,7 +5079,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5014
5079
|
if (typeof window !== "undefined") {
|
|
5015
5080
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
5016
5081
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
5017
|
-
|
|
5082
|
+
useLayoutEffect8(() => {
|
|
5018
5083
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
5019
5084
|
if (imageRef.current) {
|
|
5020
5085
|
imageRef.current.src = actualSrc;
|
|
@@ -5084,7 +5149,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5084
5149
|
crossOrigin,
|
|
5085
5150
|
requestsVideoFrame: false
|
|
5086
5151
|
});
|
|
5087
|
-
return /* @__PURE__ */
|
|
5152
|
+
return /* @__PURE__ */ jsx25("img", {
|
|
5088
5153
|
...props2,
|
|
5089
5154
|
ref: imageRef,
|
|
5090
5155
|
crossOrigin: crossOriginValue,
|
|
@@ -5093,15 +5158,15 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5093
5158
|
});
|
|
5094
5159
|
}, Img, compositionsRef, CompositionManagerProvider = ({
|
|
5095
5160
|
children,
|
|
5096
|
-
numberOfAudioTags,
|
|
5097
5161
|
onlyRenderComposition,
|
|
5098
5162
|
currentCompositionMetadata,
|
|
5099
|
-
|
|
5163
|
+
initialCompositions,
|
|
5164
|
+
initialCanvasContent
|
|
5100
5165
|
}) => {
|
|
5101
|
-
const [
|
|
5102
|
-
const
|
|
5103
|
-
const [
|
|
5104
|
-
const
|
|
5166
|
+
const [folders, setFolders] = useState17([]);
|
|
5167
|
+
const [canvasContent, setCanvasContent] = useState17(initialCanvasContent);
|
|
5168
|
+
const [compositions, setCompositions] = useState17(initialCompositions);
|
|
5169
|
+
const currentcompositionsRef = useRef15(compositions);
|
|
5105
5170
|
const updateCompositions = useCallback14((updateComps) => {
|
|
5106
5171
|
setCompositions((comps) => {
|
|
5107
5172
|
const updated = updateComps(comps);
|
|
@@ -5144,7 +5209,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5144
5209
|
getCompositions: () => currentcompositionsRef.current
|
|
5145
5210
|
};
|
|
5146
5211
|
}, []);
|
|
5147
|
-
const composition = compositions.find((c2) => canvasContent?.type === "composition" ? c2.id === canvasContent.compositionId : null);
|
|
5148
5212
|
const updateCompositionDefaultProps = useCallback14((id, newDefaultProps) => {
|
|
5149
5213
|
setCompositions((comps) => {
|
|
5150
5214
|
const updated = comps.map((c2) => {
|
|
@@ -5159,15 +5223,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5159
5223
|
return updated;
|
|
5160
5224
|
});
|
|
5161
5225
|
}, []);
|
|
5162
|
-
const
|
|
5163
|
-
return {
|
|
5164
|
-
compositions,
|
|
5165
|
-
folders,
|
|
5166
|
-
currentCompositionMetadata,
|
|
5167
|
-
canvasContent
|
|
5168
|
-
};
|
|
5169
|
-
}, [compositions, folders, currentCompositionMetadata, canvasContent]);
|
|
5170
|
-
const setters = useMemo24(() => {
|
|
5226
|
+
const compositionManagerSetters = useMemo25(() => {
|
|
5171
5227
|
return {
|
|
5172
5228
|
registerComposition,
|
|
5173
5229
|
unregisterComposition,
|
|
@@ -5185,22 +5241,19 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5185
5241
|
updateCompositionDefaultProps,
|
|
5186
5242
|
onlyRenderComposition
|
|
5187
5243
|
]);
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
})
|
|
5202
|
-
})
|
|
5203
|
-
})
|
|
5244
|
+
const compositionManagerContextValue = useMemo25(() => {
|
|
5245
|
+
return {
|
|
5246
|
+
compositions,
|
|
5247
|
+
folders,
|
|
5248
|
+
currentCompositionMetadata,
|
|
5249
|
+
canvasContent
|
|
5250
|
+
};
|
|
5251
|
+
}, [compositions, folders, currentCompositionMetadata, canvasContent]);
|
|
5252
|
+
return /* @__PURE__ */ jsx26(CompositionManager.Provider, {
|
|
5253
|
+
value: compositionManagerContextValue,
|
|
5254
|
+
children: /* @__PURE__ */ jsx26(CompositionSetters.Provider, {
|
|
5255
|
+
value: compositionManagerSetters,
|
|
5256
|
+
children
|
|
5204
5257
|
})
|
|
5205
5258
|
});
|
|
5206
5259
|
}, exports_default_css, injected, injectCSS = (css) => {
|
|
@@ -5258,7 +5311,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5258
5311
|
listeners = listeners.filter((l) => l !== fn);
|
|
5259
5312
|
};
|
|
5260
5313
|
}, MediaEnabledContext, useVideoEnabled = () => {
|
|
5261
|
-
const context =
|
|
5314
|
+
const context = useContext31(MediaEnabledContext);
|
|
5262
5315
|
if (!context) {
|
|
5263
5316
|
return window.remotion_videoEnabled;
|
|
5264
5317
|
}
|
|
@@ -5267,7 +5320,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5267
5320
|
}
|
|
5268
5321
|
return context.videoEnabled;
|
|
5269
5322
|
}, useAudioEnabled = () => {
|
|
5270
|
-
const context =
|
|
5323
|
+
const context = useContext31(MediaEnabledContext);
|
|
5271
5324
|
if (!context) {
|
|
5272
5325
|
return window.remotion_audioEnabled;
|
|
5273
5326
|
}
|
|
@@ -5280,8 +5333,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5280
5333
|
videoEnabled,
|
|
5281
5334
|
audioEnabled
|
|
5282
5335
|
}) => {
|
|
5283
|
-
const value =
|
|
5284
|
-
return /* @__PURE__ */
|
|
5336
|
+
const value = useMemo26(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
5337
|
+
return /* @__PURE__ */ jsx27(MediaEnabledContext.Provider, {
|
|
5285
5338
|
value,
|
|
5286
5339
|
children
|
|
5287
5340
|
});
|
|
@@ -5289,65 +5342,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5289
5342
|
children,
|
|
5290
5343
|
numberOfAudioTags,
|
|
5291
5344
|
logLevel,
|
|
5292
|
-
onlyRenderComposition,
|
|
5293
|
-
currentCompositionMetadata,
|
|
5294
5345
|
audioLatencyHint,
|
|
5295
5346
|
videoEnabled,
|
|
5296
|
-
audioEnabled
|
|
5347
|
+
audioEnabled,
|
|
5348
|
+
frameState
|
|
5297
5349
|
}) => {
|
|
5298
|
-
const [
|
|
5299
|
-
const [
|
|
5300
|
-
const
|
|
5301
|
-
const imperativePlaying = useRef15(false);
|
|
5302
|
-
const [fastRefreshes, setFastRefreshes] = useState17(0);
|
|
5303
|
-
const [manualRefreshes, setManualRefreshes] = useState17(0);
|
|
5304
|
-
const [playbackRate, setPlaybackRate] = useState17(1);
|
|
5305
|
-
const audioAndVideoTags = useRef15([]);
|
|
5306
|
-
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
5307
|
-
if (typeof window !== "undefined") {
|
|
5308
|
-
useLayoutEffect8(() => {
|
|
5309
|
-
window.remotion_setFrame = (f, composition, attempt) => {
|
|
5310
|
-
window.remotion_attempt = attempt;
|
|
5311
|
-
const id = delayRender2(`Setting the current frame to ${f}`);
|
|
5312
|
-
let asyncUpdate = true;
|
|
5313
|
-
setFrame((s) => {
|
|
5314
|
-
const currentFrame = s[composition] ?? window.remotion_initialFrame;
|
|
5315
|
-
if (currentFrame === f) {
|
|
5316
|
-
asyncUpdate = false;
|
|
5317
|
-
return s;
|
|
5318
|
-
}
|
|
5319
|
-
return {
|
|
5320
|
-
...s,
|
|
5321
|
-
[composition]: f
|
|
5322
|
-
};
|
|
5323
|
-
});
|
|
5324
|
-
if (asyncUpdate) {
|
|
5325
|
-
requestAnimationFrame(() => continueRender2(id));
|
|
5326
|
-
} else {
|
|
5327
|
-
continueRender2(id);
|
|
5328
|
-
}
|
|
5329
|
-
};
|
|
5330
|
-
window.remotion_isPlayer = false;
|
|
5331
|
-
}, [continueRender2, delayRender2]);
|
|
5332
|
-
}
|
|
5333
|
-
const timelineContextValue = useMemo26(() => {
|
|
5334
|
-
return {
|
|
5335
|
-
frame,
|
|
5336
|
-
playing,
|
|
5337
|
-
imperativePlaying,
|
|
5338
|
-
rootId: remotionRootId,
|
|
5339
|
-
playbackRate,
|
|
5340
|
-
setPlaybackRate,
|
|
5341
|
-
audioAndVideoTags
|
|
5342
|
-
};
|
|
5343
|
-
}, [frame, playbackRate, playing, remotionRootId]);
|
|
5344
|
-
const setTimelineContextValue = useMemo26(() => {
|
|
5345
|
-
return {
|
|
5346
|
-
setFrame,
|
|
5347
|
-
setPlaying
|
|
5348
|
-
};
|
|
5349
|
-
}, []);
|
|
5350
|
-
const nonceContext = useMemo26(() => {
|
|
5350
|
+
const [fastRefreshes, setFastRefreshes] = useState18(0);
|
|
5351
|
+
const [manualRefreshes, setManualRefreshes] = useState18(0);
|
|
5352
|
+
const nonceContext = useMemo27(() => {
|
|
5351
5353
|
let counter = 0;
|
|
5352
5354
|
return {
|
|
5353
5355
|
getNonce: () => counter++,
|
|
@@ -5355,7 +5357,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5355
5357
|
manualRefreshes
|
|
5356
5358
|
};
|
|
5357
5359
|
}, [fastRefreshes, manualRefreshes]);
|
|
5358
|
-
const setNonceContext =
|
|
5360
|
+
const setNonceContext = useMemo27(() => {
|
|
5359
5361
|
return {
|
|
5360
5362
|
increaseManualRefreshes: () => {
|
|
5361
5363
|
setManualRefreshes((i) => i + 1);
|
|
@@ -5373,32 +5375,33 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5373
5375
|
}
|
|
5374
5376
|
}
|
|
5375
5377
|
}, []);
|
|
5376
|
-
const logging =
|
|
5378
|
+
const logging = useMemo27(() => {
|
|
5377
5379
|
return { logLevel, mountTime: Date.now() };
|
|
5378
5380
|
}, [logLevel]);
|
|
5379
|
-
return /* @__PURE__ */
|
|
5381
|
+
return /* @__PURE__ */ jsx28(LogLevelContext.Provider, {
|
|
5380
5382
|
value: logging,
|
|
5381
|
-
children: /* @__PURE__ */
|
|
5383
|
+
children: /* @__PURE__ */ jsx28(NonceContext.Provider, {
|
|
5382
5384
|
value: nonceContext,
|
|
5383
|
-
children: /* @__PURE__ */
|
|
5385
|
+
children: /* @__PURE__ */ jsx28(SetNonceContext.Provider, {
|
|
5384
5386
|
value: setNonceContext,
|
|
5385
|
-
children: /* @__PURE__ */
|
|
5386
|
-
|
|
5387
|
-
children: /* @__PURE__ */
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5387
|
+
children: /* @__PURE__ */ jsx28(TimelineContextProvider, {
|
|
5388
|
+
frameState,
|
|
5389
|
+
children: /* @__PURE__ */ jsx28(MediaEnabledProvider, {
|
|
5390
|
+
videoEnabled,
|
|
5391
|
+
audioEnabled,
|
|
5392
|
+
children: /* @__PURE__ */ jsx28(EditorPropsProvider, {
|
|
5393
|
+
children: /* @__PURE__ */ jsx28(PrefetchProvider, {
|
|
5394
|
+
children: /* @__PURE__ */ jsx28(SequenceManagerProvider, {
|
|
5395
|
+
children: /* @__PURE__ */ jsx28(RenderAssetManagerProvider, {
|
|
5396
|
+
children: /* @__PURE__ */ jsx28(ResolveCompositionConfig, {
|
|
5397
|
+
children: /* @__PURE__ */ jsx28(SharedAudioContextProvider, {
|
|
5398
|
+
numberOfAudioTags,
|
|
5399
|
+
audioLatencyHint,
|
|
5400
|
+
children: /* @__PURE__ */ jsx28(DurationsContextProvider, {
|
|
5401
|
+
children: /* @__PURE__ */ jsx28(BufferingProvider, {
|
|
5402
|
+
children
|
|
5403
|
+
})
|
|
5404
|
+
})
|
|
5402
5405
|
})
|
|
5403
5406
|
})
|
|
5404
5407
|
})
|
|
@@ -5479,13 +5482,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5479
5482
|
const frame = useCurrentFrame();
|
|
5480
5483
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
5481
5484
|
const videoConfig = useUnsafeVideoConfig();
|
|
5482
|
-
const sequenceContext =
|
|
5485
|
+
const sequenceContext = useContext32(SequenceContext);
|
|
5483
5486
|
const mediaStartsAt = useMediaStartsAt();
|
|
5484
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
5487
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext32(RenderAssetManager);
|
|
5485
5488
|
if (!src) {
|
|
5486
5489
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
5487
5490
|
}
|
|
5488
|
-
const id =
|
|
5491
|
+
const id = useMemo28(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
5489
5492
|
src,
|
|
5490
5493
|
sequenceContext?.cumulatedFrom,
|
|
5491
5494
|
sequenceContext?.relativeFrom,
|
|
@@ -5540,14 +5543,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5540
5543
|
sequenceContext?.relativeFrom,
|
|
5541
5544
|
audioStreamIndex
|
|
5542
5545
|
]);
|
|
5543
|
-
const currentTime =
|
|
5546
|
+
const currentTime = useMemo28(() => {
|
|
5544
5547
|
return getExpectedMediaFrameUncorrected({
|
|
5545
5548
|
frame,
|
|
5546
5549
|
playbackRate: playbackRate || 1,
|
|
5547
5550
|
startFrom: -mediaStartsAt
|
|
5548
5551
|
}) / videoConfig.fps;
|
|
5549
5552
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
5550
|
-
const actualSrc =
|
|
5553
|
+
const actualSrc = useMemo28(() => {
|
|
5551
5554
|
return getOffthreadVideoSource({
|
|
5552
5555
|
src,
|
|
5553
5556
|
currentTime,
|
|
@@ -5555,7 +5558,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5555
5558
|
toneMapped
|
|
5556
5559
|
});
|
|
5557
5560
|
}, [toneMapped, currentTime, src, transparent]);
|
|
5558
|
-
const [imageSrc, setImageSrc] =
|
|
5561
|
+
const [imageSrc, setImageSrc] = useState19(null);
|
|
5559
5562
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
5560
5563
|
useLayoutEffect9(() => {
|
|
5561
5564
|
if (!window.remotion_videoEnabled) {
|
|
@@ -5635,7 +5638,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5635
5638
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
5636
5639
|
}
|
|
5637
5640
|
}, [imageSrc, onError]);
|
|
5638
|
-
const className =
|
|
5641
|
+
const className = useMemo28(() => {
|
|
5639
5642
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
5640
5643
|
}, [props2.className]);
|
|
5641
5644
|
const onImageFrame = useCallback15((img) => {
|
|
@@ -5647,7 +5650,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5647
5650
|
return null;
|
|
5648
5651
|
}
|
|
5649
5652
|
continueRender2(imageSrc.handle);
|
|
5650
|
-
return /* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ jsx29(Img, {
|
|
5651
5654
|
src: imageSrc.src,
|
|
5652
5655
|
delayRenderRetries,
|
|
5653
5656
|
delayRenderTimeoutInMilliseconds,
|
|
@@ -5682,12 +5685,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5682
5685
|
};
|
|
5683
5686
|
}, [onVideoFrame, ref]);
|
|
5684
5687
|
}, VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
5685
|
-
const context =
|
|
5688
|
+
const context = useContext33(SharedAudioContext);
|
|
5686
5689
|
if (!context) {
|
|
5687
5690
|
throw new Error("SharedAudioContext not found");
|
|
5688
5691
|
}
|
|
5689
5692
|
const videoRef = useRef16(null);
|
|
5690
|
-
const sharedSource =
|
|
5693
|
+
const sharedSource = useMemo29(() => {
|
|
5691
5694
|
if (!context.audioContext) {
|
|
5692
5695
|
return null;
|
|
5693
5696
|
}
|
|
@@ -5730,11 +5733,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5730
5733
|
}
|
|
5731
5734
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
5732
5735
|
const { fps, durationInFrames } = useVideoConfig();
|
|
5733
|
-
const parentSequence =
|
|
5734
|
-
const { hidden } =
|
|
5736
|
+
const parentSequence = useContext33(SequenceContext);
|
|
5737
|
+
const { hidden } = useContext33(SequenceVisibilityToggleContext);
|
|
5735
5738
|
const logLevel = useLogLevel();
|
|
5736
5739
|
const mountTime = useMountTime();
|
|
5737
|
-
const [timelineId] =
|
|
5740
|
+
const [timelineId] = useState20(() => String(Math.random()));
|
|
5738
5741
|
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
5739
5742
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
5740
5743
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
@@ -5800,7 +5803,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5800
5803
|
useImperativeHandle9(ref, () => {
|
|
5801
5804
|
return videoRef.current;
|
|
5802
5805
|
}, []);
|
|
5803
|
-
|
|
5806
|
+
useState20(() => playbackLogging({
|
|
5804
5807
|
logLevel,
|
|
5805
5808
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
5806
5809
|
tag: "video",
|
|
@@ -5865,7 +5868,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5865
5868
|
current.preload = "auto";
|
|
5866
5869
|
}
|
|
5867
5870
|
}, []);
|
|
5868
|
-
const actualStyle =
|
|
5871
|
+
const actualStyle = useMemo29(() => {
|
|
5869
5872
|
return {
|
|
5870
5873
|
...style,
|
|
5871
5874
|
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
@@ -5875,7 +5878,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5875
5878
|
crossOrigin,
|
|
5876
5879
|
requestsVideoFrame: Boolean(onVideoFrame)
|
|
5877
5880
|
});
|
|
5878
|
-
return /* @__PURE__ */
|
|
5881
|
+
return /* @__PURE__ */ jsx30("video", {
|
|
5879
5882
|
ref: videoRef,
|
|
5880
5883
|
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
5881
5884
|
playsInline: true,
|
|
@@ -5913,13 +5916,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5913
5916
|
trimAfter
|
|
5914
5917
|
});
|
|
5915
5918
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
5916
|
-
return /* @__PURE__ */
|
|
5919
|
+
return /* @__PURE__ */ jsx31(Sequence, {
|
|
5917
5920
|
layout: "none",
|
|
5918
5921
|
from: 0 - (trimBeforeValue ?? 0),
|
|
5919
5922
|
showInTimeline: false,
|
|
5920
5923
|
durationInFrames: trimAfterValue,
|
|
5921
5924
|
name,
|
|
5922
|
-
children: /* @__PURE__ */
|
|
5925
|
+
children: /* @__PURE__ */ jsx31(InnerOffthreadVideo, {
|
|
5923
5926
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
5924
5927
|
...otherProps,
|
|
5925
5928
|
trimAfter: undefined,
|
|
@@ -5934,7 +5937,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5934
5937
|
}
|
|
5935
5938
|
validateMediaProps(props2, "Video");
|
|
5936
5939
|
if (environment.isRendering) {
|
|
5937
|
-
return /* @__PURE__ */
|
|
5940
|
+
return /* @__PURE__ */ jsx31(OffthreadVideoForRendering, {
|
|
5938
5941
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
5939
5942
|
...otherProps,
|
|
5940
5943
|
trimAfter: undefined,
|
|
@@ -5956,7 +5959,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5956
5959
|
delayRenderTimeoutInMilliseconds,
|
|
5957
5960
|
...propsForPreview
|
|
5958
5961
|
} = otherProps;
|
|
5959
|
-
return /* @__PURE__ */
|
|
5962
|
+
return /* @__PURE__ */ jsx31(VideoForPreview, {
|
|
5960
5963
|
_remotionInternalStack: stack ?? null,
|
|
5961
5964
|
onDuration,
|
|
5962
5965
|
onlyWarnForMediaSeekingError: true,
|
|
@@ -6004,7 +6007,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6004
6007
|
if (imageFormat) {
|
|
6005
6008
|
throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
|
|
6006
6009
|
}
|
|
6007
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ jsx31(InnerOffthreadVideo, {
|
|
6008
6011
|
acceptableTimeShiftInSeconds,
|
|
6009
6012
|
allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
|
|
6010
6013
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -6038,29 +6041,29 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6038
6041
|
});
|
|
6039
6042
|
}, WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged", RemotionContextProvider = (props2) => {
|
|
6040
6043
|
const { children, contexts } = props2;
|
|
6041
|
-
return /* @__PURE__ */
|
|
6044
|
+
return /* @__PURE__ */ jsx322(LogLevelContext.Provider, {
|
|
6042
6045
|
value: contexts.logLevelContext,
|
|
6043
|
-
children: /* @__PURE__ */
|
|
6046
|
+
children: /* @__PURE__ */ jsx322(CanUseRemotionHooks.Provider, {
|
|
6044
6047
|
value: contexts.canUseRemotionHooksContext,
|
|
6045
|
-
children: /* @__PURE__ */
|
|
6048
|
+
children: /* @__PURE__ */ jsx322(NonceContext.Provider, {
|
|
6046
6049
|
value: contexts.nonceContext,
|
|
6047
|
-
children: /* @__PURE__ */
|
|
6050
|
+
children: /* @__PURE__ */ jsx322(PreloadContext.Provider, {
|
|
6048
6051
|
value: contexts.preloadContext,
|
|
6049
|
-
children: /* @__PURE__ */
|
|
6052
|
+
children: /* @__PURE__ */ jsx322(CompositionManager.Provider, {
|
|
6050
6053
|
value: contexts.compositionManagerCtx,
|
|
6051
|
-
children: /* @__PURE__ */
|
|
6054
|
+
children: /* @__PURE__ */ jsx322(SequenceManager.Provider, {
|
|
6052
6055
|
value: contexts.sequenceManagerContext,
|
|
6053
|
-
children: /* @__PURE__ */
|
|
6056
|
+
children: /* @__PURE__ */ jsx322(RenderAssetManager.Provider, {
|
|
6054
6057
|
value: contexts.renderAssetManagerContext,
|
|
6055
|
-
children: /* @__PURE__ */
|
|
6058
|
+
children: /* @__PURE__ */ jsx322(ResolveCompositionContext.Provider, {
|
|
6056
6059
|
value: contexts.resolveCompositionContext,
|
|
6057
|
-
children: /* @__PURE__ */
|
|
6060
|
+
children: /* @__PURE__ */ jsx322(TimelineContext.Provider, {
|
|
6058
6061
|
value: contexts.timelineContext,
|
|
6059
|
-
children: /* @__PURE__ */
|
|
6062
|
+
children: /* @__PURE__ */ jsx322(SetTimelineContext.Provider, {
|
|
6060
6063
|
value: contexts.setTimelineContext,
|
|
6061
|
-
children: /* @__PURE__ */
|
|
6064
|
+
children: /* @__PURE__ */ jsx322(SequenceContext.Provider, {
|
|
6062
6065
|
value: contexts.sequenceContext,
|
|
6063
|
-
children: /* @__PURE__ */
|
|
6066
|
+
children: /* @__PURE__ */ jsx322(BufferingContextReact.Provider, {
|
|
6064
6067
|
value: contexts.bufferManagerContext,
|
|
6065
6068
|
children
|
|
6066
6069
|
})
|
|
@@ -6099,36 +6102,36 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6099
6102
|
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
6100
6103
|
}
|
|
6101
6104
|
}, flattenChildren = (children) => {
|
|
6102
|
-
const childrenArray =
|
|
6105
|
+
const childrenArray = React32.Children.toArray(children);
|
|
6103
6106
|
return childrenArray.reduce((flatChildren, child) => {
|
|
6104
|
-
if (child.type ===
|
|
6107
|
+
if (child.type === React32.Fragment) {
|
|
6105
6108
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
6106
6109
|
}
|
|
6107
6110
|
flatChildren.push(child);
|
|
6108
6111
|
return flatChildren;
|
|
6109
6112
|
}, []);
|
|
6110
6113
|
}, IsInsideSeriesContext, IsInsideSeriesContainer = ({ children }) => {
|
|
6111
|
-
return /* @__PURE__ */
|
|
6114
|
+
return /* @__PURE__ */ jsx33(IsInsideSeriesContext.Provider, {
|
|
6112
6115
|
value: true,
|
|
6113
6116
|
children
|
|
6114
6117
|
});
|
|
6115
6118
|
}, IsNotInsideSeriesProvider = ({ children }) => {
|
|
6116
|
-
return /* @__PURE__ */
|
|
6119
|
+
return /* @__PURE__ */ jsx33(IsInsideSeriesContext.Provider, {
|
|
6117
6120
|
value: false,
|
|
6118
6121
|
children
|
|
6119
6122
|
});
|
|
6120
6123
|
}, useRequireToBeInsideSeries = () => {
|
|
6121
|
-
const isInsideSeries =
|
|
6124
|
+
const isInsideSeries = React33.useContext(IsInsideSeriesContext);
|
|
6122
6125
|
if (!isInsideSeries) {
|
|
6123
6126
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6124
6127
|
}
|
|
6125
6128
|
}, SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
6126
6129
|
useRequireToBeInsideSeries();
|
|
6127
|
-
return /* @__PURE__ */
|
|
6130
|
+
return /* @__PURE__ */ jsx34(IsNotInsideSeriesProvider, {
|
|
6128
6131
|
children
|
|
6129
6132
|
});
|
|
6130
6133
|
}, SeriesSequence, Series = (props2) => {
|
|
6131
|
-
const childrenValue =
|
|
6134
|
+
const childrenValue = useMemo31(() => {
|
|
6132
6135
|
let startFrame = 0;
|
|
6133
6136
|
const flattenedChildren = flattenChildren(props2.children);
|
|
6134
6137
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -6172,7 +6175,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6172
6175
|
}
|
|
6173
6176
|
const currentStartFrame = startFrame + offset;
|
|
6174
6177
|
startFrame += durationInFramesProp + offset;
|
|
6175
|
-
return /* @__PURE__ */
|
|
6178
|
+
return /* @__PURE__ */ jsx34(Sequence, {
|
|
6176
6179
|
name: name || "<Series.Sequence>",
|
|
6177
6180
|
from: currentStartFrame,
|
|
6178
6181
|
durationInFrames: durationInFramesProp,
|
|
@@ -6183,14 +6186,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6183
6186
|
});
|
|
6184
6187
|
}, [props2.children]);
|
|
6185
6188
|
if (ENABLE_V5_BREAKING_CHANGES) {
|
|
6186
|
-
return /* @__PURE__ */
|
|
6187
|
-
children: /* @__PURE__ */
|
|
6189
|
+
return /* @__PURE__ */ jsx34(IsInsideSeriesContainer, {
|
|
6190
|
+
children: /* @__PURE__ */ jsx34(Sequence, {
|
|
6188
6191
|
...props2,
|
|
6189
6192
|
children: childrenValue
|
|
6190
6193
|
})
|
|
6191
6194
|
});
|
|
6192
6195
|
}
|
|
6193
|
-
return /* @__PURE__ */
|
|
6196
|
+
return /* @__PURE__ */ jsx34(IsInsideSeriesContainer, {
|
|
6194
6197
|
children: childrenValue
|
|
6195
6198
|
});
|
|
6196
6199
|
}, validateSpringDuration = (dur) => {
|
|
@@ -6410,14 +6413,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6410
6413
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
6411
6414
|
const videoConfig = useUnsafeVideoConfig();
|
|
6412
6415
|
const videoRef = useRef17(null);
|
|
6413
|
-
const sequenceContext =
|
|
6416
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
6414
6417
|
const mediaStartsAt = useMediaStartsAt();
|
|
6415
6418
|
const environment = useRemotionEnvironment();
|
|
6416
6419
|
const logLevel = useLogLevel();
|
|
6417
6420
|
const mountTime = useMountTime();
|
|
6418
6421
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
6419
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
6420
|
-
const id =
|
|
6422
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
|
|
6423
|
+
const id = useMemo32(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
6421
6424
|
props2.src,
|
|
6422
6425
|
sequenceContext?.cumulatedFrom,
|
|
6423
6426
|
sequenceContext?.relativeFrom,
|
|
@@ -6593,7 +6596,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6593
6596
|
delayRender2
|
|
6594
6597
|
]);
|
|
6595
6598
|
}
|
|
6596
|
-
return /* @__PURE__ */
|
|
6599
|
+
return /* @__PURE__ */ jsx35("video", {
|
|
6597
6600
|
ref: videoRef,
|
|
6598
6601
|
disableRemotePlayback: true,
|
|
6599
6602
|
...props2
|
|
@@ -6615,7 +6618,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6615
6618
|
const { loop, ...propsOtherThanLoop } = props2;
|
|
6616
6619
|
const { fps } = useVideoConfig();
|
|
6617
6620
|
const environment = useRemotionEnvironment();
|
|
6618
|
-
const { durations, setDurations } =
|
|
6621
|
+
const { durations, setDurations } = useContext35(DurationsContext);
|
|
6619
6622
|
if (typeof ref === "string") {
|
|
6620
6623
|
throw new Error("string refs are not supported");
|
|
6621
6624
|
}
|
|
@@ -6637,14 +6640,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6637
6640
|
});
|
|
6638
6641
|
if (loop && durationFetched !== undefined) {
|
|
6639
6642
|
if (!Number.isFinite(durationFetched)) {
|
|
6640
|
-
return /* @__PURE__ */
|
|
6643
|
+
return /* @__PURE__ */ jsx36(Html5Video, {
|
|
6641
6644
|
...propsOtherThanLoop,
|
|
6642
6645
|
ref,
|
|
6643
6646
|
_remotionInternalNativeLoopPassed: true
|
|
6644
6647
|
});
|
|
6645
6648
|
}
|
|
6646
6649
|
const mediaDuration = durationFetched * fps;
|
|
6647
|
-
return /* @__PURE__ */
|
|
6650
|
+
return /* @__PURE__ */ jsx36(Loop, {
|
|
6648
6651
|
durationInFrames: calculateMediaDuration({
|
|
6649
6652
|
trimAfter: trimAfterValue,
|
|
6650
6653
|
mediaDurationInFrames: mediaDuration,
|
|
@@ -6653,7 +6656,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6653
6656
|
}),
|
|
6654
6657
|
layout: "none",
|
|
6655
6658
|
name,
|
|
6656
|
-
children: /* @__PURE__ */
|
|
6659
|
+
children: /* @__PURE__ */ jsx36(Html5Video, {
|
|
6657
6660
|
...propsOtherThanLoop,
|
|
6658
6661
|
ref,
|
|
6659
6662
|
_remotionInternalNativeLoopPassed: true
|
|
@@ -6661,13 +6664,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6661
6664
|
});
|
|
6662
6665
|
}
|
|
6663
6666
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
6664
|
-
return /* @__PURE__ */
|
|
6667
|
+
return /* @__PURE__ */ jsx36(Sequence, {
|
|
6665
6668
|
layout: "none",
|
|
6666
6669
|
from: 0 - (trimBeforeValue ?? 0),
|
|
6667
6670
|
showInTimeline: false,
|
|
6668
6671
|
durationInFrames: trimAfterValue,
|
|
6669
6672
|
name,
|
|
6670
|
-
children: /* @__PURE__ */
|
|
6673
|
+
children: /* @__PURE__ */ jsx36(Html5Video, {
|
|
6671
6674
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
6672
6675
|
...otherProps,
|
|
6673
6676
|
ref
|
|
@@ -6676,14 +6679,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6676
6679
|
}
|
|
6677
6680
|
validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
|
|
6678
6681
|
if (environment.isRendering) {
|
|
6679
|
-
return /* @__PURE__ */
|
|
6682
|
+
return /* @__PURE__ */ jsx36(VideoForRendering, {
|
|
6680
6683
|
onDuration,
|
|
6681
6684
|
onVideoFrame: onVideoFrame ?? null,
|
|
6682
6685
|
...otherProps,
|
|
6683
6686
|
ref
|
|
6684
6687
|
});
|
|
6685
6688
|
}
|
|
6686
|
-
return /* @__PURE__ */
|
|
6689
|
+
return /* @__PURE__ */ jsx36(VideoForPreview, {
|
|
6687
6690
|
onlyWarnForMediaSeekingError: false,
|
|
6688
6691
|
...otherProps,
|
|
6689
6692
|
ref,
|
|
@@ -6734,14 +6737,6 @@ var init_esm = __esm(() => {
|
|
|
6734
6737
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
6735
6738
|
}
|
|
6736
6739
|
});
|
|
6737
|
-
NonceContext = createContext4({
|
|
6738
|
-
getNonce: () => 0,
|
|
6739
|
-
fastRefreshes: 0,
|
|
6740
|
-
manualRefreshes: 0
|
|
6741
|
-
});
|
|
6742
|
-
SetNonceContext = createContext4({
|
|
6743
|
-
increaseManualRefreshes: () => {}
|
|
6744
|
-
});
|
|
6745
6740
|
exports_timeline_position_state = {};
|
|
6746
6741
|
__export2(exports_timeline_position_state, {
|
|
6747
6742
|
useTimelineSetFrame: () => useTimelineSetFrame,
|
|
@@ -6749,18 +6744,16 @@ var init_esm = __esm(() => {
|
|
|
6749
6744
|
usePlayingState: () => usePlayingState,
|
|
6750
6745
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
6751
6746
|
getInitialFrameState: () => getInitialFrameState,
|
|
6752
|
-
getFrameForComposition: () => getFrameForComposition
|
|
6753
|
-
TimelineContext: () => TimelineContext,
|
|
6754
|
-
SetTimelineContext: () => SetTimelineContext
|
|
6747
|
+
getFrameForComposition: () => getFrameForComposition
|
|
6755
6748
|
});
|
|
6756
6749
|
RemotionEnvironmentContext = React4.createContext(null);
|
|
6757
|
-
CompositionManager =
|
|
6750
|
+
CompositionManager = createContext4({
|
|
6758
6751
|
compositions: [],
|
|
6759
6752
|
folders: [],
|
|
6760
6753
|
currentCompositionMetadata: null,
|
|
6761
6754
|
canvasContent: null
|
|
6762
6755
|
});
|
|
6763
|
-
CompositionSetters =
|
|
6756
|
+
CompositionSetters = createContext4({
|
|
6764
6757
|
registerComposition: () => {
|
|
6765
6758
|
return;
|
|
6766
6759
|
},
|
|
@@ -6781,7 +6774,7 @@ var init_esm = __esm(() => {
|
|
|
6781
6774
|
},
|
|
6782
6775
|
onlyRenderComposition: null
|
|
6783
6776
|
});
|
|
6784
|
-
EditorPropsContext =
|
|
6777
|
+
EditorPropsContext = createContext5({
|
|
6785
6778
|
props: {},
|
|
6786
6779
|
updateProps: () => {
|
|
6787
6780
|
throw new Error("Not implemented");
|
|
@@ -6792,6 +6785,14 @@ var init_esm = __esm(() => {
|
|
|
6792
6785
|
});
|
|
6793
6786
|
editorPropsProviderRef = React5.createRef();
|
|
6794
6787
|
timeValueRef = React5.createRef();
|
|
6788
|
+
NonceContext = createContext6({
|
|
6789
|
+
getNonce: () => 0,
|
|
6790
|
+
fastRefreshes: 0,
|
|
6791
|
+
manualRefreshes: 0
|
|
6792
|
+
});
|
|
6793
|
+
SetNonceContext = createContext6({
|
|
6794
|
+
increaseManualRefreshes: () => {}
|
|
6795
|
+
});
|
|
6795
6796
|
validCodecs = [
|
|
6796
6797
|
"h264",
|
|
6797
6798
|
"h265",
|
|
@@ -6807,31 +6808,6 @@ var init_esm = __esm(() => {
|
|
|
6807
6808
|
];
|
|
6808
6809
|
ResolveCompositionContext = createContext7(null);
|
|
6809
6810
|
resolveCompositionsRef = createRef();
|
|
6810
|
-
TimelineContext = createContext8({
|
|
6811
|
-
frame: {},
|
|
6812
|
-
playing: false,
|
|
6813
|
-
playbackRate: 1,
|
|
6814
|
-
rootId: "",
|
|
6815
|
-
imperativePlaying: {
|
|
6816
|
-
current: false
|
|
6817
|
-
},
|
|
6818
|
-
setPlaybackRate: () => {
|
|
6819
|
-
throw new Error("default");
|
|
6820
|
-
},
|
|
6821
|
-
audioAndVideoTags: { current: [] }
|
|
6822
|
-
});
|
|
6823
|
-
SetTimelineContext = createContext8({
|
|
6824
|
-
setFrame: () => {
|
|
6825
|
-
throw new Error("default");
|
|
6826
|
-
},
|
|
6827
|
-
setPlaying: () => {
|
|
6828
|
-
throw new Error("default");
|
|
6829
|
-
}
|
|
6830
|
-
});
|
|
6831
|
-
CanUseRemotionHooks = createContext9(false);
|
|
6832
|
-
RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
|
|
6833
|
-
PremountedPostmountedSequence = forwardRef2(PremountedPostmountedSequenceRefForwardingFunction);
|
|
6834
|
-
Sequence = forwardRef2(SequenceRefForwardingFunction);
|
|
6835
6811
|
logLevels = ["trace", "verbose", "info", "warn", "error"];
|
|
6836
6812
|
Log = {
|
|
6837
6813
|
trace,
|
|
@@ -6847,7 +6823,33 @@ var init_esm = __esm(() => {
|
|
|
6847
6823
|
window.remotion_delayRenderTimeouts = {};
|
|
6848
6824
|
}
|
|
6849
6825
|
}
|
|
6850
|
-
|
|
6826
|
+
DelayRenderContextType = createContext8(null);
|
|
6827
|
+
SetTimelineContext = createContext9({
|
|
6828
|
+
setFrame: () => {
|
|
6829
|
+
throw new Error("default");
|
|
6830
|
+
},
|
|
6831
|
+
setPlaying: () => {
|
|
6832
|
+
throw new Error("default");
|
|
6833
|
+
}
|
|
6834
|
+
});
|
|
6835
|
+
TimelineContext = createContext9({
|
|
6836
|
+
frame: {},
|
|
6837
|
+
playing: false,
|
|
6838
|
+
playbackRate: 1,
|
|
6839
|
+
rootId: "",
|
|
6840
|
+
imperativePlaying: {
|
|
6841
|
+
current: false
|
|
6842
|
+
},
|
|
6843
|
+
setPlaybackRate: () => {
|
|
6844
|
+
throw new Error("default");
|
|
6845
|
+
},
|
|
6846
|
+
audioAndVideoTags: { current: [] }
|
|
6847
|
+
});
|
|
6848
|
+
CanUseRemotionHooks = createContext10(false);
|
|
6849
|
+
RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
|
|
6850
|
+
PremountedPostmountedSequence = forwardRef2(PremountedPostmountedSequenceRefForwardingFunction);
|
|
6851
|
+
Sequence = forwardRef2(SequenceRefForwardingFunction);
|
|
6852
|
+
Canvas = React10.forwardRef(CanvasRefForwardingFunction);
|
|
6851
6853
|
AnimatedImage = forwardRef3(({
|
|
6852
6854
|
src,
|
|
6853
6855
|
width,
|
|
@@ -6858,7 +6860,7 @@ var init_esm = __esm(() => {
|
|
|
6858
6860
|
fit = "fill",
|
|
6859
6861
|
...props
|
|
6860
6862
|
}, canvasRef) => {
|
|
6861
|
-
const mountState =
|
|
6863
|
+
const mountState = useRef4({ isMounted: true });
|
|
6862
6864
|
useEffect4(() => {
|
|
6863
6865
|
const { current } = mountState;
|
|
6864
6866
|
current.isMounted = true;
|
|
@@ -6867,15 +6869,15 @@ var init_esm = __esm(() => {
|
|
|
6867
6869
|
};
|
|
6868
6870
|
}, []);
|
|
6869
6871
|
const resolvedSrc = resolveAnimatedImageSource(src);
|
|
6870
|
-
const [imageDecoder, setImageDecoder] =
|
|
6872
|
+
const [imageDecoder, setImageDecoder] = useState7(null);
|
|
6871
6873
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
6872
|
-
const [decodeHandle] =
|
|
6874
|
+
const [decodeHandle] = useState7(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
6873
6875
|
const frame = useCurrentFrame();
|
|
6874
6876
|
const { fps } = useVideoConfig();
|
|
6875
6877
|
const currentTime = frame / playbackRate / fps;
|
|
6876
|
-
const currentTimeRef =
|
|
6878
|
+
const currentTimeRef = useRef4(currentTime);
|
|
6877
6879
|
currentTimeRef.current = currentTime;
|
|
6878
|
-
const ref =
|
|
6880
|
+
const ref = useRef4(null);
|
|
6879
6881
|
useImperativeHandle4(canvasRef, () => {
|
|
6880
6882
|
const c = ref.current?.getCanvas();
|
|
6881
6883
|
if (!c) {
|
|
@@ -6883,7 +6885,7 @@ var init_esm = __esm(() => {
|
|
|
6883
6885
|
}
|
|
6884
6886
|
return c;
|
|
6885
6887
|
}, []);
|
|
6886
|
-
const [initialLoopBehavior] =
|
|
6888
|
+
const [initialLoopBehavior] = useState7(() => loopBehavior);
|
|
6887
6889
|
useEffect4(() => {
|
|
6888
6890
|
const controller = new AbortController;
|
|
6889
6891
|
decodeImage({
|
|
@@ -6916,7 +6918,7 @@ var init_esm = __esm(() => {
|
|
|
6916
6918
|
initialLoopBehavior,
|
|
6917
6919
|
continueRender2
|
|
6918
6920
|
]);
|
|
6919
|
-
|
|
6921
|
+
useLayoutEffect2(() => {
|
|
6920
6922
|
if (!imageDecoder) {
|
|
6921
6923
|
return;
|
|
6922
6924
|
}
|
|
@@ -6947,7 +6949,7 @@ var init_esm = __esm(() => {
|
|
|
6947
6949
|
continueRender2,
|
|
6948
6950
|
delayRender2
|
|
6949
6951
|
]);
|
|
6950
|
-
return /* @__PURE__ */
|
|
6952
|
+
return /* @__PURE__ */ jsx11(Canvas, {
|
|
6951
6953
|
ref,
|
|
6952
6954
|
width,
|
|
6953
6955
|
height,
|
|
@@ -6955,7 +6957,7 @@ var init_esm = __esm(() => {
|
|
|
6955
6957
|
...props
|
|
6956
6958
|
});
|
|
6957
6959
|
});
|
|
6958
|
-
RenderAssetManager =
|
|
6960
|
+
RenderAssetManager = createContext11({
|
|
6959
6961
|
registerRenderAsset: () => {
|
|
6960
6962
|
return;
|
|
6961
6963
|
},
|
|
@@ -6966,30 +6968,30 @@ var init_esm = __esm(() => {
|
|
|
6966
6968
|
});
|
|
6967
6969
|
ArtifactThumbnail = Symbol("Thumbnail");
|
|
6968
6970
|
Artifact.Thumbnail = ArtifactThumbnail;
|
|
6969
|
-
LoopContext =
|
|
6971
|
+
LoopContext = createContext12(null);
|
|
6970
6972
|
Loop.useLoop = useLoop;
|
|
6971
|
-
PreloadContext =
|
|
6973
|
+
PreloadContext = createContext13({});
|
|
6972
6974
|
preloads = {};
|
|
6973
6975
|
updaters = [];
|
|
6974
|
-
DurationsContext =
|
|
6976
|
+
DurationsContext = createContext14({
|
|
6975
6977
|
durations: {},
|
|
6976
6978
|
setDurations: () => {
|
|
6977
6979
|
throw new Error("context missing");
|
|
6978
6980
|
}
|
|
6979
6981
|
});
|
|
6980
|
-
LogLevelContext =
|
|
6982
|
+
LogLevelContext = createContext15({
|
|
6981
6983
|
logLevel: "info",
|
|
6982
6984
|
mountTime: 0
|
|
6983
6985
|
});
|
|
6984
|
-
SharedAudioContext =
|
|
6986
|
+
SharedAudioContext = createContext16(null);
|
|
6985
6987
|
didWarn = {};
|
|
6986
|
-
BufferingContextReact =
|
|
6988
|
+
BufferingContextReact = React16.createContext(null);
|
|
6987
6989
|
alreadyWarned = {};
|
|
6988
|
-
MediaVolumeContext =
|
|
6990
|
+
MediaVolumeContext = createContext17({
|
|
6989
6991
|
mediaMuted: false,
|
|
6990
6992
|
mediaVolume: 1
|
|
6991
6993
|
});
|
|
6992
|
-
SetMediaVolumeContext =
|
|
6994
|
+
SetMediaVolumeContext = createContext17({
|
|
6993
6995
|
setMediaMuted: () => {
|
|
6994
6996
|
throw new Error("default");
|
|
6995
6997
|
},
|
|
@@ -7002,7 +7004,7 @@ var init_esm = __esm(() => {
|
|
|
7002
7004
|
Html5Audio = forwardRef6(AudioRefForwardingFunction);
|
|
7003
7005
|
addSequenceStackTraces(Html5Audio);
|
|
7004
7006
|
invalidFolderNameErrorMessage = `Folder name must match ${String(getRegex())}`;
|
|
7005
|
-
FolderContext =
|
|
7007
|
+
FolderContext = createContext18({
|
|
7006
7008
|
folderName: null,
|
|
7007
7009
|
parentName: null
|
|
7008
7010
|
});
|
|
@@ -7022,7 +7024,7 @@ var init_esm = __esm(() => {
|
|
|
7022
7024
|
kSampleStepSize = 1 / (kSplineTableSize - 1);
|
|
7023
7025
|
IFrame = forwardRef7(IFrameRefForwarding);
|
|
7024
7026
|
Img = forwardRef8(ImgRefForwarding);
|
|
7025
|
-
compositionsRef =
|
|
7027
|
+
compositionsRef = React25.createRef();
|
|
7026
7028
|
exports_default_css = {};
|
|
7027
7029
|
__export2(exports_default_css, {
|
|
7028
7030
|
makeDefaultPreviewCSS: () => makeDefaultPreviewCSS,
|
|
@@ -7031,9 +7033,9 @@ var init_esm = __esm(() => {
|
|
|
7031
7033
|
});
|
|
7032
7034
|
injected = {};
|
|
7033
7035
|
listeners = [];
|
|
7034
|
-
MediaEnabledContext =
|
|
7035
|
-
CurrentScaleContext =
|
|
7036
|
-
PreviewSizeContext =
|
|
7036
|
+
MediaEnabledContext = createContext19(null);
|
|
7037
|
+
CurrentScaleContext = React27.createContext(null);
|
|
7038
|
+
PreviewSizeContext = createContext20({
|
|
7037
7039
|
setSize: () => {
|
|
7038
7040
|
return;
|
|
7039
7041
|
},
|
|
@@ -7058,6 +7060,7 @@ var init_esm = __esm(() => {
|
|
|
7058
7060
|
SequenceManager,
|
|
7059
7061
|
SequenceVisibilityToggleContext,
|
|
7060
7062
|
RemotionRoot,
|
|
7063
|
+
CompositionManagerProvider,
|
|
7061
7064
|
useVideo,
|
|
7062
7065
|
getRoot,
|
|
7063
7066
|
useMediaVolumeState,
|
|
@@ -7082,6 +7085,7 @@ var init_esm = __esm(() => {
|
|
|
7082
7085
|
compositionsRef,
|
|
7083
7086
|
portalNode,
|
|
7084
7087
|
waitForRoot,
|
|
7088
|
+
SetTimelineContext,
|
|
7085
7089
|
CanUseRemotionHooksProvider,
|
|
7086
7090
|
CanUseRemotionHooks,
|
|
7087
7091
|
PrefetchProvider,
|
|
@@ -7130,10 +7134,13 @@ var init_esm = __esm(() => {
|
|
|
7130
7134
|
setInputPropsOverride,
|
|
7131
7135
|
useVideoEnabled,
|
|
7132
7136
|
useAudioEnabled,
|
|
7133
|
-
useIsPlayerBuffering
|
|
7137
|
+
useIsPlayerBuffering,
|
|
7138
|
+
TimelinePosition: exports_timeline_position_state,
|
|
7139
|
+
DelayRenderContextType,
|
|
7140
|
+
TimelineContext
|
|
7134
7141
|
};
|
|
7135
7142
|
PERCENTAGE = NUMBER + "%";
|
|
7136
|
-
IsInsideSeriesContext =
|
|
7143
|
+
IsInsideSeriesContext = createContext21(false);
|
|
7137
7144
|
SeriesSequence = forwardRef10(SeriesSequenceRefForwardingFunction);
|
|
7138
7145
|
Series.Sequence = SeriesSequence;
|
|
7139
7146
|
addSequenceStackTraces(SeriesSequence);
|
|
@@ -8535,7 +8542,7 @@ var getDefaultConfig = () => {
|
|
|
8535
8542
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
8536
8543
|
|
|
8537
8544
|
// ../design/dist/esm/index.mjs
|
|
8538
|
-
import React6, { useEffect as useEffect23, useMemo as
|
|
8545
|
+
import React6, { useEffect as useEffect23, useMemo as useMemo33, useState as useState21 } from "react";
|
|
8539
8546
|
|
|
8540
8547
|
// ../paths/dist/esm/index.mjs
|
|
8541
8548
|
var cutLInstruction = ({
|
|
@@ -12674,10 +12681,10 @@ var extrudeAndTransformElement = (options) => {
|
|
|
12674
12681
|
|
|
12675
12682
|
// ../design/dist/esm/index.mjs
|
|
12676
12683
|
init_esm();
|
|
12677
|
-
import { jsx as
|
|
12684
|
+
import { jsx as jsx37, Fragment } from "react/jsx-runtime";
|
|
12678
12685
|
import { jsx as jsx210, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
12679
|
-
import { jsx as
|
|
12680
|
-
import
|
|
12686
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
12687
|
+
import React34 from "react";
|
|
12681
12688
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
12682
12689
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
12683
12690
|
import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
@@ -12694,38 +12701,38 @@ import { jsx as jsx103 } from "react/jsx-runtime";
|
|
|
12694
12701
|
import * as React8 from "react";
|
|
12695
12702
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
12696
12703
|
import * as React12 from "react";
|
|
12697
|
-
import * as
|
|
12704
|
+
import * as React9 from "react";
|
|
12698
12705
|
import * as ReactDOM from "react-dom";
|
|
12699
12706
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
12700
12707
|
import * as React102 from "react";
|
|
12701
|
-
import * as
|
|
12708
|
+
import * as React112 from "react";
|
|
12702
12709
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
12703
|
-
import * as
|
|
12710
|
+
import * as React13 from "react";
|
|
12704
12711
|
import * as React142 from "react";
|
|
12705
12712
|
import { jsx as jsx142 } from "react/jsx-runtime";
|
|
12706
12713
|
import * as React162 from "react";
|
|
12707
12714
|
import * as React152 from "react";
|
|
12708
|
-
import * as
|
|
12709
|
-
import * as
|
|
12715
|
+
import * as React20 from "react";
|
|
12716
|
+
import * as React172 from "react";
|
|
12710
12717
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect72 } from "react";
|
|
12711
12718
|
import * as ReactDOM2 from "react-dom";
|
|
12712
12719
|
import * as React18 from "react";
|
|
12713
12720
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
12714
12721
|
import * as React19 from "react";
|
|
12715
12722
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
12716
|
-
import * as
|
|
12723
|
+
import * as React212 from "react";
|
|
12717
12724
|
import ReactDOM3 from "react-dom";
|
|
12718
12725
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
12719
12726
|
import * as React22 from "react";
|
|
12720
12727
|
import * as React23 from "react";
|
|
12721
|
-
import * as
|
|
12728
|
+
import * as React24 from "react";
|
|
12722
12729
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
12723
12730
|
import * as React312 from "react";
|
|
12724
|
-
import * as
|
|
12731
|
+
import * as React272 from "react";
|
|
12725
12732
|
import { useState as useState112 } from "react";
|
|
12726
|
-
import * as
|
|
12727
|
-
import * as
|
|
12728
|
-
import * as
|
|
12733
|
+
import * as React252 from "react";
|
|
12734
|
+
import * as React26 from "react";
|
|
12735
|
+
import * as React30 from "react";
|
|
12729
12736
|
import * as React29 from "react";
|
|
12730
12737
|
import * as React28 from "react";
|
|
12731
12738
|
import { Fragment as Fragment52, jsx as jsx192, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
@@ -12757,7 +12764,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
12757
12764
|
progress: 0,
|
|
12758
12765
|
isActive: false
|
|
12759
12766
|
});
|
|
12760
|
-
const eventTarget =
|
|
12767
|
+
const eventTarget = useMemo33(() => new EventTarget, []);
|
|
12761
12768
|
useEffect23(() => {
|
|
12762
12769
|
if (disabled) {
|
|
12763
12770
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -12904,7 +12911,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
12904
12911
|
};
|
|
12905
12912
|
var lastCoordinates = null;
|
|
12906
12913
|
var useMousePosition = (ref) => {
|
|
12907
|
-
const [angle, setAngle] =
|
|
12914
|
+
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
12908
12915
|
useEffect23(() => {
|
|
12909
12916
|
const element = ref.current;
|
|
12910
12917
|
if (!element) {
|
|
@@ -12926,9 +12933,9 @@ var useMousePosition = (ref) => {
|
|
|
12926
12933
|
return angle;
|
|
12927
12934
|
};
|
|
12928
12935
|
var Faces = ({ elements, ...svgProps }) => {
|
|
12929
|
-
return /* @__PURE__ */
|
|
12936
|
+
return /* @__PURE__ */ jsx37(Fragment, {
|
|
12930
12937
|
children: elements.map(({ points, color, crispEdges }, idx) => {
|
|
12931
|
-
return /* @__PURE__ */
|
|
12938
|
+
return /* @__PURE__ */ jsx37("path", {
|
|
12932
12939
|
d: threeDIntoSvgPath(points),
|
|
12933
12940
|
fill: color,
|
|
12934
12941
|
shapeRendering: crispEdges ? "crispEdges" : undefined,
|
|
@@ -13052,18 +13059,18 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
|
|
|
13052
13059
|
};
|
|
13053
13060
|
});
|
|
13054
13061
|
}, []);
|
|
13055
|
-
const content = /* @__PURE__ */
|
|
13062
|
+
const content = /* @__PURE__ */ jsx38("button", {
|
|
13056
13063
|
type: "button",
|
|
13057
13064
|
disabled,
|
|
13058
13065
|
className: cn("text-text", "flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex", "flex-row", "items-center", "disabled:cursor-default", "disabled:border-gray-500", "disabled:text-gray-500", className),
|
|
13059
13066
|
...buttonProps,
|
|
13060
13067
|
children
|
|
13061
13068
|
});
|
|
13062
|
-
return /* @__PURE__ */
|
|
13069
|
+
return /* @__PURE__ */ jsx38("div", {
|
|
13063
13070
|
ref,
|
|
13064
13071
|
className: "contents",
|
|
13065
13072
|
onPointerEnter,
|
|
13066
|
-
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */
|
|
13073
|
+
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */ jsx38(Outer, {
|
|
13067
13074
|
parentRef: ref,
|
|
13068
13075
|
width: dimensions.width,
|
|
13069
13076
|
height: dimensions.height,
|
|
@@ -13074,7 +13081,7 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
|
|
|
13074
13081
|
}) : content
|
|
13075
13082
|
});
|
|
13076
13083
|
};
|
|
13077
|
-
var Card =
|
|
13084
|
+
var Card = React34.forwardRef(({ children, className, ...rest }, ref) => {
|
|
13078
13085
|
return /* @__PURE__ */ jsx43("div", {
|
|
13079
13086
|
ref,
|
|
13080
13087
|
className: cn("rounded-lg border-2 border-black bg-card-bg text-text border-b-4", className),
|
|
@@ -13435,7 +13442,7 @@ var NODES = [
|
|
|
13435
13442
|
"ul"
|
|
13436
13443
|
];
|
|
13437
13444
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
13438
|
-
const Node2 =
|
|
13445
|
+
const Node2 = React9.forwardRef((props, forwardedRef) => {
|
|
13439
13446
|
const { asChild, ...primitiveProps } = props;
|
|
13440
13447
|
const Comp = asChild ? Slot : node;
|
|
13441
13448
|
if (typeof window !== "undefined") {
|
|
@@ -13459,7 +13466,7 @@ function useCallbackRef(callback) {
|
|
|
13459
13466
|
}
|
|
13460
13467
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
13461
13468
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
13462
|
-
|
|
13469
|
+
React112.useEffect(() => {
|
|
13463
13470
|
const handleKeyDown = (event) => {
|
|
13464
13471
|
if (event.key === "Escape") {
|
|
13465
13472
|
onEscapeKeyDown(event);
|
|
@@ -13666,7 +13673,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
13666
13673
|
}
|
|
13667
13674
|
var count = 0;
|
|
13668
13675
|
function useFocusGuards() {
|
|
13669
|
-
|
|
13676
|
+
React13.useEffect(() => {
|
|
13670
13677
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
13671
13678
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
13672
13679
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -15486,7 +15493,7 @@ function roundByDPR(element, value) {
|
|
|
15486
15493
|
return Math.round(value * dpr) / dpr;
|
|
15487
15494
|
}
|
|
15488
15495
|
function useLatestRef(value) {
|
|
15489
|
-
const ref =
|
|
15496
|
+
const ref = React172.useRef(value);
|
|
15490
15497
|
index(() => {
|
|
15491
15498
|
ref.current = value;
|
|
15492
15499
|
});
|
|
@@ -15509,7 +15516,7 @@ function useFloating(options) {
|
|
|
15509
15516
|
whileElementsMounted,
|
|
15510
15517
|
open
|
|
15511
15518
|
} = options;
|
|
15512
|
-
const [data, setData] =
|
|
15519
|
+
const [data, setData] = React172.useState({
|
|
15513
15520
|
x: 0,
|
|
15514
15521
|
y: 0,
|
|
15515
15522
|
strategy,
|
|
@@ -15517,19 +15524,19 @@ function useFloating(options) {
|
|
|
15517
15524
|
middlewareData: {},
|
|
15518
15525
|
isPositioned: false
|
|
15519
15526
|
});
|
|
15520
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
15527
|
+
const [latestMiddleware, setLatestMiddleware] = React172.useState(middleware);
|
|
15521
15528
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
15522
15529
|
setLatestMiddleware(middleware);
|
|
15523
15530
|
}
|
|
15524
|
-
const [_reference, _setReference] =
|
|
15525
|
-
const [_floating, _setFloating] =
|
|
15526
|
-
const setReference =
|
|
15531
|
+
const [_reference, _setReference] = React172.useState(null);
|
|
15532
|
+
const [_floating, _setFloating] = React172.useState(null);
|
|
15533
|
+
const setReference = React172.useCallback((node) => {
|
|
15527
15534
|
if (node !== referenceRef.current) {
|
|
15528
15535
|
referenceRef.current = node;
|
|
15529
15536
|
_setReference(node);
|
|
15530
15537
|
}
|
|
15531
15538
|
}, []);
|
|
15532
|
-
const setFloating =
|
|
15539
|
+
const setFloating = React172.useCallback((node) => {
|
|
15533
15540
|
if (node !== floatingRef.current) {
|
|
15534
15541
|
floatingRef.current = node;
|
|
15535
15542
|
_setFloating(node);
|
|
@@ -15537,13 +15544,13 @@ function useFloating(options) {
|
|
|
15537
15544
|
}, []);
|
|
15538
15545
|
const referenceEl = externalReference || _reference;
|
|
15539
15546
|
const floatingEl = externalFloating || _floating;
|
|
15540
|
-
const referenceRef =
|
|
15541
|
-
const floatingRef =
|
|
15542
|
-
const dataRef =
|
|
15547
|
+
const referenceRef = React172.useRef(null);
|
|
15548
|
+
const floatingRef = React172.useRef(null);
|
|
15549
|
+
const dataRef = React172.useRef(data);
|
|
15543
15550
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
15544
15551
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
15545
15552
|
const platformRef = useLatestRef(platform2);
|
|
15546
|
-
const update =
|
|
15553
|
+
const update = React172.useCallback(() => {
|
|
15547
15554
|
if (!referenceRef.current || !floatingRef.current) {
|
|
15548
15555
|
return;
|
|
15549
15556
|
}
|
|
@@ -15577,7 +15584,7 @@ function useFloating(options) {
|
|
|
15577
15584
|
}));
|
|
15578
15585
|
}
|
|
15579
15586
|
}, [open]);
|
|
15580
|
-
const isMountedRef =
|
|
15587
|
+
const isMountedRef = React172.useRef(false);
|
|
15581
15588
|
index(() => {
|
|
15582
15589
|
isMountedRef.current = true;
|
|
15583
15590
|
return () => {
|
|
@@ -15596,17 +15603,17 @@ function useFloating(options) {
|
|
|
15596
15603
|
update();
|
|
15597
15604
|
}
|
|
15598
15605
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
15599
|
-
const refs =
|
|
15606
|
+
const refs = React172.useMemo(() => ({
|
|
15600
15607
|
reference: referenceRef,
|
|
15601
15608
|
floating: floatingRef,
|
|
15602
15609
|
setReference,
|
|
15603
15610
|
setFloating
|
|
15604
15611
|
}), [setReference, setFloating]);
|
|
15605
|
-
const elements =
|
|
15612
|
+
const elements = React172.useMemo(() => ({
|
|
15606
15613
|
reference: referenceEl,
|
|
15607
15614
|
floating: floatingEl
|
|
15608
15615
|
}), [referenceEl, floatingEl]);
|
|
15609
|
-
const floatingStyles =
|
|
15616
|
+
const floatingStyles = React172.useMemo(() => {
|
|
15610
15617
|
const initialStyles = {
|
|
15611
15618
|
position: strategy,
|
|
15612
15619
|
left: 0,
|
|
@@ -15632,7 +15639,7 @@ function useFloating(options) {
|
|
|
15632
15639
|
top: y
|
|
15633
15640
|
};
|
|
15634
15641
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
15635
|
-
return
|
|
15642
|
+
return React172.useMemo(() => ({
|
|
15636
15643
|
...data,
|
|
15637
15644
|
update,
|
|
15638
15645
|
refs,
|
|
@@ -15753,17 +15760,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
15753
15760
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
15754
15761
|
var Popper = (props) => {
|
|
15755
15762
|
const { __scopePopper, children } = props;
|
|
15756
|
-
const [anchor, setAnchor] =
|
|
15763
|
+
const [anchor, setAnchor] = React20.useState(null);
|
|
15757
15764
|
return /* @__PURE__ */ jsx162(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
15758
15765
|
};
|
|
15759
15766
|
Popper.displayName = POPPER_NAME;
|
|
15760
15767
|
var ANCHOR_NAME = "PopperAnchor";
|
|
15761
|
-
var PopperAnchor =
|
|
15768
|
+
var PopperAnchor = React20.forwardRef((props, forwardedRef) => {
|
|
15762
15769
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
15763
15770
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
15764
|
-
const ref =
|
|
15771
|
+
const ref = React20.useRef(null);
|
|
15765
15772
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
15766
|
-
|
|
15773
|
+
React20.useEffect(() => {
|
|
15767
15774
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
15768
15775
|
});
|
|
15769
15776
|
return virtualRef ? null : /* @__PURE__ */ jsx162(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -15771,7 +15778,7 @@ var PopperAnchor = React202.forwardRef((props, forwardedRef) => {
|
|
|
15771
15778
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
15772
15779
|
var CONTENT_NAME = "PopperContent";
|
|
15773
15780
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
15774
|
-
var PopperContent =
|
|
15781
|
+
var PopperContent = React20.forwardRef((props, forwardedRef) => {
|
|
15775
15782
|
const {
|
|
15776
15783
|
__scopePopper,
|
|
15777
15784
|
side = "bottom",
|
|
@@ -15789,9 +15796,9 @@ var PopperContent = React202.forwardRef((props, forwardedRef) => {
|
|
|
15789
15796
|
...contentProps
|
|
15790
15797
|
} = props;
|
|
15791
15798
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
15792
|
-
const [content, setContent] =
|
|
15799
|
+
const [content, setContent] = React20.useState(null);
|
|
15793
15800
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
15794
|
-
const [arrow4, setArrow] =
|
|
15801
|
+
const [arrow4, setArrow] = React20.useState(null);
|
|
15795
15802
|
const arrowSize = useSize(arrow4);
|
|
15796
15803
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
15797
15804
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -15851,7 +15858,7 @@ var PopperContent = React202.forwardRef((props, forwardedRef) => {
|
|
|
15851
15858
|
const arrowX = middlewareData.arrow?.x;
|
|
15852
15859
|
const arrowY = middlewareData.arrow?.y;
|
|
15853
15860
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
15854
|
-
const [contentZIndex, setContentZIndex] =
|
|
15861
|
+
const [contentZIndex, setContentZIndex] = React20.useState();
|
|
15855
15862
|
useLayoutEffect22(() => {
|
|
15856
15863
|
if (content)
|
|
15857
15864
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -15902,7 +15909,7 @@ var OPPOSITE_SIDE = {
|
|
|
15902
15909
|
bottom: "top",
|
|
15903
15910
|
left: "right"
|
|
15904
15911
|
};
|
|
15905
|
-
var PopperArrow =
|
|
15912
|
+
var PopperArrow = React20.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
15906
15913
|
const { __scopePopper, ...arrowProps } = props;
|
|
15907
15914
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
15908
15915
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -15981,9 +15988,9 @@ var Anchor = PopperAnchor;
|
|
|
15981
15988
|
var Content = PopperContent;
|
|
15982
15989
|
var Arrow2 = PopperArrow;
|
|
15983
15990
|
var PORTAL_NAME = "Portal";
|
|
15984
|
-
var Portal =
|
|
15991
|
+
var Portal = React212.forwardRef((props, forwardedRef) => {
|
|
15985
15992
|
const { container: containerProp, ...portalProps } = props;
|
|
15986
|
-
const [mounted, setMounted] =
|
|
15993
|
+
const [mounted, setMounted] = React212.useState(false);
|
|
15987
15994
|
useLayoutEffect22(() => setMounted(true), []);
|
|
15988
15995
|
const container22 = containerProp || mounted && globalThis?.document?.body;
|
|
15989
15996
|
return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx172(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
|
|
@@ -16037,7 +16044,7 @@ function usePrevious(value) {
|
|
|
16037
16044
|
}, [value]);
|
|
16038
16045
|
}
|
|
16039
16046
|
var NAME2 = "VisuallyHidden";
|
|
16040
|
-
var VisuallyHidden =
|
|
16047
|
+
var VisuallyHidden = React24.forwardRef((props, forwardedRef) => {
|
|
16041
16048
|
return /* @__PURE__ */ jsx182(Primitive.span, {
|
|
16042
16049
|
...props,
|
|
16043
16050
|
ref: forwardedRef,
|
|
@@ -16245,7 +16252,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
16245
16252
|
ref.callback = callback;
|
|
16246
16253
|
return ref.facade;
|
|
16247
16254
|
}
|
|
16248
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
16255
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React252.useLayoutEffect : React252.useEffect;
|
|
16249
16256
|
var currentValues = new WeakMap;
|
|
16250
16257
|
function useMergeRefs(refs, defaultValue) {
|
|
16251
16258
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -16367,7 +16374,7 @@ var SideCar = function(_a) {
|
|
|
16367
16374
|
if (!Target) {
|
|
16368
16375
|
throw new Error("Sidecar medium not found");
|
|
16369
16376
|
}
|
|
16370
|
-
return
|
|
16377
|
+
return React26.createElement(Target, __assign({}, rest));
|
|
16371
16378
|
};
|
|
16372
16379
|
SideCar.isSideCarExport = true;
|
|
16373
16380
|
function exportSidecar(medium, exported) {
|
|
@@ -16378,9 +16385,9 @@ var effectCar = createSidecarMedium();
|
|
|
16378
16385
|
var nothing = function() {
|
|
16379
16386
|
return;
|
|
16380
16387
|
};
|
|
16381
|
-
var RemoveScroll =
|
|
16382
|
-
var ref =
|
|
16383
|
-
var _a =
|
|
16388
|
+
var RemoveScroll = React272.forwardRef(function(props, parentRef) {
|
|
16389
|
+
var ref = React272.useRef(null);
|
|
16390
|
+
var _a = React272.useState({
|
|
16384
16391
|
onScrollCapture: nothing,
|
|
16385
16392
|
onWheelCapture: nothing,
|
|
16386
16393
|
onTouchMoveCapture: nothing
|
|
@@ -16389,7 +16396,7 @@ var RemoveScroll = React27.forwardRef(function(props, parentRef) {
|
|
|
16389
16396
|
var SideCar2 = sideCar;
|
|
16390
16397
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
16391
16398
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
16392
|
-
return
|
|
16399
|
+
return React272.createElement(React272.Fragment, null, enabled && React272.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React272.cloneElement(React272.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React272.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
|
|
16393
16400
|
});
|
|
16394
16401
|
RemoveScroll.defaultProps = {
|
|
16395
16402
|
enabled: true,
|
|
@@ -16707,16 +16714,16 @@ var generateStyle = function(id) {
|
|
|
16707
16714
|
var idCounter = 0;
|
|
16708
16715
|
var lockStack = [];
|
|
16709
16716
|
function RemoveScrollSideCar(props) {
|
|
16710
|
-
var shouldPreventQueue =
|
|
16711
|
-
var touchStartRef =
|
|
16712
|
-
var activeAxis =
|
|
16713
|
-
var id =
|
|
16714
|
-
var Style2 =
|
|
16715
|
-
var lastProps =
|
|
16716
|
-
|
|
16717
|
+
var shouldPreventQueue = React30.useRef([]);
|
|
16718
|
+
var touchStartRef = React30.useRef([0, 0]);
|
|
16719
|
+
var activeAxis = React30.useRef();
|
|
16720
|
+
var id = React30.useState(idCounter++)[0];
|
|
16721
|
+
var Style2 = React30.useState(styleSingleton)[0];
|
|
16722
|
+
var lastProps = React30.useRef(props);
|
|
16723
|
+
React30.useEffect(function() {
|
|
16717
16724
|
lastProps.current = props;
|
|
16718
16725
|
}, [props]);
|
|
16719
|
-
|
|
16726
|
+
React30.useEffect(function() {
|
|
16720
16727
|
if (props.inert) {
|
|
16721
16728
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
16722
16729
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -16732,7 +16739,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16732
16739
|
}
|
|
16733
16740
|
return;
|
|
16734
16741
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
16735
|
-
var shouldCancelEvent =
|
|
16742
|
+
var shouldCancelEvent = React30.useCallback(function(event, parent) {
|
|
16736
16743
|
if ("touches" in event && event.touches.length === 2) {
|
|
16737
16744
|
return !lastProps.current.allowPinchZoom;
|
|
16738
16745
|
}
|
|
@@ -16768,7 +16775,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16768
16775
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
16769
16776
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
16770
16777
|
}, []);
|
|
16771
|
-
var shouldPrevent =
|
|
16778
|
+
var shouldPrevent = React30.useCallback(function(_event) {
|
|
16772
16779
|
var event = _event;
|
|
16773
16780
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
16774
16781
|
return;
|
|
@@ -16795,7 +16802,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16795
16802
|
}
|
|
16796
16803
|
}
|
|
16797
16804
|
}, []);
|
|
16798
|
-
var shouldCancel =
|
|
16805
|
+
var shouldCancel = React30.useCallback(function(name, delta, target, should) {
|
|
16799
16806
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
16800
16807
|
shouldPreventQueue.current.push(event);
|
|
16801
16808
|
setTimeout(function() {
|
|
@@ -16804,17 +16811,17 @@ function RemoveScrollSideCar(props) {
|
|
|
16804
16811
|
});
|
|
16805
16812
|
}, 1);
|
|
16806
16813
|
}, []);
|
|
16807
|
-
var scrollTouchStart =
|
|
16814
|
+
var scrollTouchStart = React30.useCallback(function(event) {
|
|
16808
16815
|
touchStartRef.current = getTouchXY(event);
|
|
16809
16816
|
activeAxis.current = undefined;
|
|
16810
16817
|
}, []);
|
|
16811
|
-
var scrollWheel =
|
|
16818
|
+
var scrollWheel = React30.useCallback(function(event) {
|
|
16812
16819
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
16813
16820
|
}, []);
|
|
16814
|
-
var scrollTouchMove =
|
|
16821
|
+
var scrollTouchMove = React30.useCallback(function(event) {
|
|
16815
16822
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
16816
16823
|
}, []);
|
|
16817
|
-
|
|
16824
|
+
React30.useEffect(function() {
|
|
16818
16825
|
lockStack.push(Style2);
|
|
16819
16826
|
props.setCallbacks({
|
|
16820
16827
|
onScrollCapture: scrollWheel,
|
|
@@ -16834,7 +16841,7 @@ function RemoveScrollSideCar(props) {
|
|
|
16834
16841
|
};
|
|
16835
16842
|
}, []);
|
|
16836
16843
|
var { removeScrollBar, inert } = props;
|
|
16837
|
-
return
|
|
16844
|
+
return React30.createElement(React30.Fragment, null, inert ? React30.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React30.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
|
|
16838
16845
|
}
|
|
16839
16846
|
function getOutermostShadowParent(node) {
|
|
16840
16847
|
var shadowParent = null;
|
|
@@ -17960,54 +17967,54 @@ var Triangle2 = (props) => {
|
|
|
17960
17967
|
};
|
|
17961
17968
|
|
|
17962
17969
|
// src/components/design.tsx
|
|
17963
|
-
import { useCallback as useCallback26, useState as
|
|
17964
|
-
import { jsx as
|
|
17970
|
+
import { useCallback as useCallback26, useState as useState34 } from "react";
|
|
17971
|
+
import { jsx as jsx39, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
17965
17972
|
var Explainer = ({ children }) => {
|
|
17966
|
-
return /* @__PURE__ */
|
|
17967
|
-
children: /* @__PURE__ */
|
|
17973
|
+
return /* @__PURE__ */ jsx39("div", {
|
|
17974
|
+
children: /* @__PURE__ */ jsx39("div", {
|
|
17968
17975
|
className: "text-gray-500 font-brand text-sm mb-2",
|
|
17969
17976
|
children
|
|
17970
17977
|
})
|
|
17971
17978
|
});
|
|
17972
17979
|
};
|
|
17973
17980
|
var DesignPage = () => {
|
|
17974
|
-
const [count3, setCount] =
|
|
17975
|
-
const [active, setActive] =
|
|
17976
|
-
const [submitButtonActive, setSubmitButtonActive] =
|
|
17981
|
+
const [count3, setCount] = useState34(10);
|
|
17982
|
+
const [active, setActive] = useState34(false);
|
|
17983
|
+
const [submitButtonActive, setSubmitButtonActive] = useState34(true);
|
|
17977
17984
|
const onClick = useCallback26(() => {
|
|
17978
17985
|
setSubmitButtonActive(false);
|
|
17979
17986
|
setTimeout(() => {
|
|
17980
17987
|
setSubmitButtonActive(true);
|
|
17981
17988
|
}, 1000);
|
|
17982
17989
|
}, []);
|
|
17983
|
-
return /* @__PURE__ */
|
|
17990
|
+
return /* @__PURE__ */ jsx39("div", {
|
|
17984
17991
|
className: "bg-[var(--background)] relative",
|
|
17985
17992
|
children: /* @__PURE__ */ jsxs5("div", {
|
|
17986
17993
|
className: "max-w-[800px] mx-auto pt-10 pb-10 px-4",
|
|
17987
17994
|
children: [
|
|
17988
|
-
/* @__PURE__ */
|
|
17995
|
+
/* @__PURE__ */ jsx39("h1", {
|
|
17989
17996
|
children: "@remotion/design"
|
|
17990
17997
|
}),
|
|
17991
|
-
/* @__PURE__ */
|
|
17998
|
+
/* @__PURE__ */ jsx39("a", {
|
|
17992
17999
|
href: "https://github.com/remotion-dev/remotion/blob/main/packages/promo-pages/src/components/design.tsx",
|
|
17993
18000
|
className: "font-brand text-brand",
|
|
17994
18001
|
target: "_blank",
|
|
17995
18002
|
children: "View source"
|
|
17996
18003
|
}),
|
|
17997
|
-
/* @__PURE__ */
|
|
17998
|
-
/* @__PURE__ */
|
|
17999
|
-
/* @__PURE__ */
|
|
18004
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18005
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18006
|
+
/* @__PURE__ */ jsx39("h2", {
|
|
18000
18007
|
className: "text-brand",
|
|
18001
18008
|
children: "<Button />"
|
|
18002
18009
|
}),
|
|
18003
|
-
/* @__PURE__ */
|
|
18010
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18004
18011
|
children: "Button with label"
|
|
18005
18012
|
}),
|
|
18006
|
-
/* @__PURE__ */
|
|
18013
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18007
18014
|
children: "Click me"
|
|
18008
18015
|
}),
|
|
18009
|
-
/* @__PURE__ */
|
|
18010
|
-
/* @__PURE__ */
|
|
18016
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18017
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18011
18018
|
children: "Disabled"
|
|
18012
18019
|
}),
|
|
18013
18020
|
/* @__PURE__ */ jsxs5(Button, {
|
|
@@ -18017,123 +18024,123 @@ var DesignPage = () => {
|
|
|
18017
18024
|
" click me"
|
|
18018
18025
|
]
|
|
18019
18026
|
}),
|
|
18020
|
-
/* @__PURE__ */
|
|
18021
|
-
/* @__PURE__ */
|
|
18027
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18028
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18022
18029
|
children: "Primary"
|
|
18023
18030
|
}),
|
|
18024
|
-
/* @__PURE__ */
|
|
18031
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18025
18032
|
className: "bg-brand text-white",
|
|
18026
18033
|
children: "Primary"
|
|
18027
18034
|
}),
|
|
18028
|
-
/* @__PURE__ */
|
|
18029
|
-
/* @__PURE__ */
|
|
18035
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18036
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18030
18037
|
children: "Click to disable"
|
|
18031
18038
|
}),
|
|
18032
|
-
/* @__PURE__ */
|
|
18039
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18033
18040
|
onClick,
|
|
18034
18041
|
disabled: !submitButtonActive,
|
|
18035
18042
|
children: "Submit"
|
|
18036
18043
|
}),
|
|
18037
|
-
/* @__PURE__ */
|
|
18038
|
-
/* @__PURE__ */
|
|
18044
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18045
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18039
18046
|
children: "Rounded"
|
|
18040
18047
|
}),
|
|
18041
|
-
/* @__PURE__ */
|
|
18048
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18042
18049
|
className: "rounded-full",
|
|
18043
18050
|
children: "Rounded"
|
|
18044
18051
|
}),
|
|
18045
|
-
/* @__PURE__ */
|
|
18046
|
-
/* @__PURE__ */
|
|
18052
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18053
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18047
18054
|
children: "Full width"
|
|
18048
18055
|
}),
|
|
18049
|
-
/* @__PURE__ */
|
|
18056
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18050
18057
|
className: "w-full",
|
|
18051
18058
|
children: "Choose a template"
|
|
18052
18059
|
}),
|
|
18053
|
-
/* @__PURE__ */
|
|
18054
|
-
/* @__PURE__ */
|
|
18060
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18061
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18055
18062
|
children: "Full width rounded"
|
|
18056
18063
|
}),
|
|
18057
|
-
/* @__PURE__ */
|
|
18064
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18058
18065
|
className: "w-full rounded-full",
|
|
18059
18066
|
children: "Fully rounded"
|
|
18060
18067
|
}),
|
|
18061
|
-
/* @__PURE__ */
|
|
18068
|
+
/* @__PURE__ */ jsx39("div", {
|
|
18062
18069
|
className: "h-8"
|
|
18063
18070
|
}),
|
|
18064
|
-
/* @__PURE__ */
|
|
18071
|
+
/* @__PURE__ */ jsx39(Explainer, {
|
|
18065
18072
|
children: "Circular"
|
|
18066
18073
|
}),
|
|
18067
|
-
/* @__PURE__ */
|
|
18074
|
+
/* @__PURE__ */ jsx39(Button, {
|
|
18068
18075
|
className: "rounded-full bg-brand w-12 h-12"
|
|
18069
18076
|
}),
|
|
18070
|
-
/* @__PURE__ */
|
|
18077
|
+
/* @__PURE__ */ jsx39("div", {
|
|
18071
18078
|
className: "h-8"
|
|
18072
18079
|
}),
|
|
18073
|
-
/* @__PURE__ */
|
|
18080
|
+
/* @__PURE__ */ jsx39("h2", {
|
|
18074
18081
|
className: "text-brand",
|
|
18075
18082
|
children: "<Counter />"
|
|
18076
18083
|
}),
|
|
18077
|
-
/* @__PURE__ */
|
|
18084
|
+
/* @__PURE__ */ jsx39(Counter, {
|
|
18078
18085
|
count: count3,
|
|
18079
18086
|
setCount,
|
|
18080
18087
|
minCount: 1,
|
|
18081
18088
|
step: 1
|
|
18082
18089
|
}),
|
|
18083
|
-
/* @__PURE__ */
|
|
18090
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18084
18091
|
" ",
|
|
18085
|
-
/* @__PURE__ */
|
|
18092
|
+
/* @__PURE__ */ jsx39("h2", {
|
|
18086
18093
|
className: "text-brand",
|
|
18087
18094
|
children: "<Switch />"
|
|
18088
18095
|
}),
|
|
18089
|
-
/* @__PURE__ */
|
|
18096
|
+
/* @__PURE__ */ jsx39(Switch, {
|
|
18090
18097
|
active,
|
|
18091
18098
|
onToggle: () => setActive((e) => !e)
|
|
18092
18099
|
}),
|
|
18093
|
-
/* @__PURE__ */
|
|
18100
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18094
18101
|
" ",
|
|
18095
|
-
/* @__PURE__ */
|
|
18102
|
+
/* @__PURE__ */ jsx39("h2", {
|
|
18096
18103
|
className: "text-brand",
|
|
18097
18104
|
children: "<Card />"
|
|
18098
18105
|
}),
|
|
18099
18106
|
/* @__PURE__ */ jsxs5(Card, {
|
|
18100
18107
|
className: "px-4 py-4",
|
|
18101
18108
|
children: [
|
|
18102
|
-
/* @__PURE__ */
|
|
18109
|
+
/* @__PURE__ */ jsx39("h3", {
|
|
18103
18110
|
className: "text-text",
|
|
18104
18111
|
children: "Card"
|
|
18105
18112
|
}),
|
|
18106
|
-
/* @__PURE__ */
|
|
18113
|
+
/* @__PURE__ */ jsx39("div", {
|
|
18107
18114
|
className: "text-gray-500",
|
|
18108
18115
|
children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
18109
18116
|
})
|
|
18110
18117
|
]
|
|
18111
18118
|
}),
|
|
18112
|
-
/* @__PURE__ */
|
|
18113
|
-
/* @__PURE__ */
|
|
18119
|
+
/* @__PURE__ */ jsx39("br", {}),
|
|
18120
|
+
/* @__PURE__ */ jsx39("h2", {
|
|
18114
18121
|
className: "text-brand",
|
|
18115
18122
|
children: "<Select />"
|
|
18116
18123
|
}),
|
|
18117
18124
|
/* @__PURE__ */ jsxs5(Select2, {
|
|
18118
18125
|
defaultValue: "option1",
|
|
18119
18126
|
children: [
|
|
18120
|
-
/* @__PURE__ */
|
|
18127
|
+
/* @__PURE__ */ jsx39(SelectTrigger2, {
|
|
18121
18128
|
style: { width: "200px" },
|
|
18122
|
-
children: /* @__PURE__ */
|
|
18129
|
+
children: /* @__PURE__ */ jsx39(SelectValue2, {
|
|
18123
18130
|
placeholder: "Select an option"
|
|
18124
18131
|
})
|
|
18125
18132
|
}),
|
|
18126
18133
|
/* @__PURE__ */ jsxs5(SelectContent2, {
|
|
18127
18134
|
children: [
|
|
18128
|
-
/* @__PURE__ */
|
|
18135
|
+
/* @__PURE__ */ jsx39(SelectItem2, {
|
|
18129
18136
|
value: "option1",
|
|
18130
18137
|
children: "Option 1"
|
|
18131
18138
|
}),
|
|
18132
|
-
/* @__PURE__ */
|
|
18139
|
+
/* @__PURE__ */ jsx39(SelectItem2, {
|
|
18133
18140
|
value: "option2",
|
|
18134
18141
|
children: "Option 2"
|
|
18135
18142
|
}),
|
|
18136
|
-
/* @__PURE__ */
|
|
18143
|
+
/* @__PURE__ */ jsx39(SelectItem2, {
|
|
18137
18144
|
value: "option3",
|
|
18138
18145
|
children: "Option 3"
|
|
18139
18146
|
})
|