@remotion/promo-pages 4.0.483 → 4.0.485
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 +443 -106
- package/dist/design.js +38 -8
- package/dist/experts.js +38 -8
- package/dist/homepage/Pricing.js +38 -8
- package/dist/prompts/PromptsGallery.js +61 -38
- package/dist/prompts/PromptsShow.js +38 -8
- package/dist/prompts/PromptsSubmit.js +24073 -44277
- package/dist/tailwind.css +0 -14
- package/dist/team.js +38 -8
- package/dist/template-modal-content.js +38 -8
- package/dist/templates.js +39 -8
- package/package.json +17 -17
package/dist/Homepage.js
CHANGED
|
@@ -2335,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2335
2335
|
var addSequenceStackTraces = (component) => {
|
|
2336
2336
|
componentsToAddStacksTo.push(component);
|
|
2337
2337
|
};
|
|
2338
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.485";
|
|
2339
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2340
2340
|
if (typeof globalThis === "undefined") {
|
|
2341
2341
|
return;
|
|
@@ -2806,6 +2806,14 @@ var textSchema = {
|
|
|
2806
2806
|
hiddenFromList: false
|
|
2807
2807
|
}
|
|
2808
2808
|
};
|
|
2809
|
+
var textContentSchema = {
|
|
2810
|
+
children: {
|
|
2811
|
+
type: "text-content",
|
|
2812
|
+
default: "",
|
|
2813
|
+
description: "Text",
|
|
2814
|
+
keyframable: false
|
|
2815
|
+
}
|
|
2816
|
+
};
|
|
2809
2817
|
var premountSchema = {
|
|
2810
2818
|
premountFor: {
|
|
2811
2819
|
type: "number",
|
|
@@ -5173,10 +5181,21 @@ var getNestedValue = (obj, key) => {
|
|
|
5173
5181
|
}
|
|
5174
5182
|
return current;
|
|
5175
5183
|
};
|
|
5176
|
-
var
|
|
5184
|
+
var getRuntimeValueForSchemaKey = ({
|
|
5185
|
+
flatSchema,
|
|
5186
|
+
key,
|
|
5187
|
+
props
|
|
5188
|
+
}) => {
|
|
5189
|
+
const value = getNestedValue(props, key);
|
|
5190
|
+
if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
|
|
5191
|
+
return;
|
|
5192
|
+
}
|
|
5193
|
+
return value;
|
|
5194
|
+
};
|
|
5195
|
+
var readValuesFromProps = (props, keys, flatSchema) => {
|
|
5177
5196
|
const out = {};
|
|
5178
5197
|
for (const key of keys) {
|
|
5179
|
-
out[key] = getNestedValue(props, key);
|
|
5198
|
+
out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
|
|
5180
5199
|
}
|
|
5181
5200
|
return out;
|
|
5182
5201
|
};
|
|
@@ -5184,6 +5203,7 @@ var selectActiveKeys = (schema, values) => {
|
|
|
5184
5203
|
return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
|
|
5185
5204
|
};
|
|
5186
5205
|
var mergeValues = ({
|
|
5206
|
+
flatSchema,
|
|
5187
5207
|
props,
|
|
5188
5208
|
valuesDotNotation,
|
|
5189
5209
|
schemaKeys,
|
|
@@ -5192,6 +5212,9 @@ var mergeValues = ({
|
|
|
5192
5212
|
const merged = { ...props };
|
|
5193
5213
|
for (const key of schemaKeys) {
|
|
5194
5214
|
const value = valuesDotNotation[key];
|
|
5215
|
+
if (flatSchema[key]?.type === "text-content" && value === undefined) {
|
|
5216
|
+
continue;
|
|
5217
|
+
}
|
|
5195
5218
|
const parts = key.split(".");
|
|
5196
5219
|
if (parts.length === 1) {
|
|
5197
5220
|
merged[key] = value;
|
|
@@ -5209,7 +5232,8 @@ var mergeValues = ({
|
|
|
5209
5232
|
}
|
|
5210
5233
|
current[parts[parts.length - 1]] = value;
|
|
5211
5234
|
}
|
|
5212
|
-
|
|
5235
|
+
const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
|
|
5236
|
+
deleteNestedKey(merged, propsToDeleteWithoutTextContent);
|
|
5213
5237
|
return merged;
|
|
5214
5238
|
};
|
|
5215
5239
|
var stackToOverrideMap = {};
|
|
@@ -5256,8 +5280,12 @@ var withInteractivitySchema = ({
|
|
|
5256
5280
|
return newOverrideId;
|
|
5257
5281
|
});
|
|
5258
5282
|
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
5259
|
-
const runtimeValues = flatKeys.map((
|
|
5260
|
-
|
|
5283
|
+
const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
|
|
5284
|
+
flatSchema,
|
|
5285
|
+
key,
|
|
5286
|
+
props
|
|
5287
|
+
}));
|
|
5288
|
+
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
5261
5289
|
const controls = useMemo13(() => {
|
|
5262
5290
|
return {
|
|
5263
5291
|
schema: schemaWithSequenceName,
|
|
@@ -5285,6 +5313,7 @@ var withInteractivitySchema = ({
|
|
|
5285
5313
|
]);
|
|
5286
5314
|
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
5287
5315
|
const mergedProps = mergeValues({
|
|
5316
|
+
flatSchema,
|
|
5288
5317
|
props,
|
|
5289
5318
|
valuesDotNotation,
|
|
5290
5319
|
schemaKeys: activeKeys,
|
|
@@ -7908,7 +7937,7 @@ var getTimelineDuration = ({
|
|
|
7908
7937
|
trimAfter
|
|
7909
7938
|
});
|
|
7910
7939
|
if (parentSequenceDurationInFrames !== null) {
|
|
7911
|
-
const cappedDuration = Math.min(parentSequenceDurationInFrames
|
|
7940
|
+
const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
|
|
7912
7941
|
return Number(cappedDuration.toFixed(10));
|
|
7913
7942
|
}
|
|
7914
7943
|
return mediaDuration;
|
|
@@ -10706,7 +10735,8 @@ addSequenceStackTraces(Img);
|
|
|
10706
10735
|
var interactiveElementSchema = {
|
|
10707
10736
|
...baseSchema,
|
|
10708
10737
|
...transformSchema,
|
|
10709
|
-
...textSchema
|
|
10738
|
+
...textSchema,
|
|
10739
|
+
...textContentSchema
|
|
10710
10740
|
};
|
|
10711
10741
|
var setRef = (ref, value) => {
|
|
10712
10742
|
if (typeof ref === "function") {
|
|
@@ -29449,7 +29479,7 @@ var PagesOfDocs = () => {
|
|
|
29449
29479
|
className: "flex-col",
|
|
29450
29480
|
children: [
|
|
29451
29481
|
/* @__PURE__ */ jsxs12("div", {
|
|
29452
|
-
style: { display: "flex", alignItems: "center" },
|
|
29482
|
+
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
29453
29483
|
children: [
|
|
29454
29484
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29455
29485
|
content: /* @__PURE__ */ jsx57("svg", {
|
|
@@ -29463,12 +29493,11 @@ var PagesOfDocs = () => {
|
|
|
29463
29493
|
fill: "var(--text-color)"
|
|
29464
29494
|
})
|
|
29465
29495
|
}),
|
|
29466
|
-
width: "
|
|
29496
|
+
width: "32px"
|
|
29467
29497
|
}),
|
|
29468
29498
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29469
|
-
content: "
|
|
29470
|
-
width: "
|
|
29471
|
-
maxWidth: "100px",
|
|
29499
|
+
content: "1000",
|
|
29500
|
+
width: "112px",
|
|
29472
29501
|
fontSize: "2.5rem",
|
|
29473
29502
|
fontWeight: "bold"
|
|
29474
29503
|
})
|
|
@@ -29698,8 +29727,8 @@ var CommunityStats_default = CommunityStats;
|
|
|
29698
29727
|
|
|
29699
29728
|
// ../player/dist/esm/index.mjs
|
|
29700
29729
|
import { createContext as createContext32 } from "react";
|
|
29701
|
-
import { jsx as jsx59, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
29702
|
-
import { jsx as jsx214, jsxs as jsxs24, Fragment as
|
|
29730
|
+
import { jsx as jsx59, jsxs as jsxs14, Fragment as Fragment12 } from "react/jsx-runtime";
|
|
29731
|
+
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
29703
29732
|
import React56 from "react";
|
|
29704
29733
|
import { useContext as useContext210, useEffect as useEffect42, useState as useState38 } from "react";
|
|
29705
29734
|
import { useContext as useContext46, useLayoutEffect as useLayoutEffect17 } from "react";
|
|
@@ -29749,10 +29778,10 @@ import { jsx as jsx104, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
|
29749
29778
|
import { useMemo as useMemo72 } from "react";
|
|
29750
29779
|
import { jsxs as jsxs72 } from "react/jsx-runtime";
|
|
29751
29780
|
import { useMemo as useMemo82 } from "react";
|
|
29752
|
-
import { jsx as jsx114, jsxs as jsxs82, Fragment as
|
|
29781
|
+
import { jsx as jsx114, jsxs as jsxs82, Fragment as Fragment32 } from "react/jsx-runtime";
|
|
29753
29782
|
import { useCallback as useCallback92, useMemo as useMemo112 } from "react";
|
|
29754
29783
|
import { useCallback as useCallback82, useMemo as useMemo102, useRef as useRef92 } from "react";
|
|
29755
|
-
import { jsx as jsx124, jsxs as jsxs92, Fragment as
|
|
29784
|
+
import { jsx as jsx124, jsxs as jsxs92, Fragment as Fragment42 } from "react/jsx-runtime";
|
|
29756
29785
|
import { useCallback as useCallback112, useMemo as useMemo132, useState as useState122 } from "react";
|
|
29757
29786
|
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
29758
29787
|
|
|
@@ -31245,27 +31274,113 @@ if (typeof createContext32 !== "function") {
|
|
|
31245
31274
|
}
|
|
31246
31275
|
var ICON_SIZE2 = 25;
|
|
31247
31276
|
var fullscreenIconSize = 16;
|
|
31248
|
-
var
|
|
31249
|
-
|
|
31277
|
+
var focusRingFallbackColor = "Highlight";
|
|
31278
|
+
var focusRingColor = "-webkit-focus-ring-color";
|
|
31279
|
+
var focusRingStyle = {
|
|
31280
|
+
stroke: focusRingColor
|
|
31281
|
+
};
|
|
31282
|
+
var playPath = "M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z";
|
|
31283
|
+
var playFocusPath = "M93.4691 0.0367432C84.4873 0.520935 77.2494 1.93634 69.9553 4.69266C66.3176 6.05219 60.3548 9.0134 57.0734 11.062C43.3476 19.6103 32.8846 32.4606 27.428 47.4154C26.3405 50.3766 23.3966 59.8188 21.5027 66.3185C8.88329 109.768 1.7204 157.277 0.182822 207.561C-0.0609408 215.569 -0.0609408 234.639 0.182822 242.517C1.21413 275.854 4.42055 305.949 10.2334 336.641C12.596 349.063 16.3837 365.75 18.5776 373.33C23.059 388.732 32.2095 401.843 45.2227 411.453C53.9419 417.896 63.8425 422.217 74.8118 424.34C80.0996 425.365 87.075 425.83 92.2127 425.495C99.3194 425.029 113.42 423.148 124.877 421.118C176.517 411.974 224.22 395.604 267.478 372.175C294.874 357.332 318.294 341.26 340.888 321.761C363.408 302.355 382.609 281.478 399.504 258.049C403.423 252.63 405.392 249.464 407.361 245.478C412.424 235.198 414.805 224.974 414.786 213.539C414.786 202.886 412.761 193.425 408.392 183.741C406.292 179.066 404.286 175.714 399.785 169.345C383.21 145.898 364.815 125.467 342.389 105.614C307.624 74.8481 266.335 49.613 220.226 30.9334C210.232 26.8921 200.387 23.335 188.537 19.4799C163.448 11.3413 132.396 4.28293 106.126 0.763062C102.001 0.204346 96.3942 -0.112244 93.4691 0.0367432Z";
|
|
31284
|
+
var playIconStrokeWidth = 6.25;
|
|
31285
|
+
var playFocusStrokeWidth = 1.5;
|
|
31286
|
+
var playFocusPadding = 2;
|
|
31287
|
+
var playPathBounds = {
|
|
31288
|
+
x1: 7.006500987565134,
|
|
31289
|
+
y1: 6.375,
|
|
31290
|
+
x2: 18.6088,
|
|
31291
|
+
y2: 18.5625
|
|
31292
|
+
};
|
|
31293
|
+
var playFocusPathBounds = {
|
|
31294
|
+
x1: -0.00000009999999999649709,
|
|
31295
|
+
y1: 0.000013203698169792638,
|
|
31296
|
+
x2: 414.7861127950162,
|
|
31297
|
+
y2: 425.60252460486765
|
|
31298
|
+
};
|
|
31299
|
+
var expandBounds = (bounds, padding) => {
|
|
31300
|
+
return {
|
|
31301
|
+
x1: bounds.x1 - padding,
|
|
31302
|
+
y1: bounds.y1 - padding,
|
|
31303
|
+
x2: bounds.x2 + padding,
|
|
31304
|
+
y2: bounds.y2 + padding
|
|
31305
|
+
};
|
|
31306
|
+
};
|
|
31307
|
+
var getBoundsWidth = (bounds) => bounds.x2 - bounds.x1;
|
|
31308
|
+
var getBoundsHeight = (bounds) => bounds.y2 - bounds.y1;
|
|
31309
|
+
var fitBoundsTransform = ({
|
|
31310
|
+
source,
|
|
31311
|
+
target
|
|
31312
|
+
}) => {
|
|
31313
|
+
const scale = Math.min(getBoundsWidth(target) / getBoundsWidth(source), getBoundsHeight(target) / getBoundsHeight(source));
|
|
31314
|
+
const x = target.x1 + (getBoundsWidth(target) - getBoundsWidth(source) * scale) / 2 - source.x1 * scale;
|
|
31315
|
+
const y = target.y1 + (getBoundsHeight(target) - getBoundsHeight(source) * scale) / 2 - source.y1 * scale;
|
|
31316
|
+
return `translate(${x.toFixed(4)} ${y.toFixed(4)}) scale(${scale.toFixed(5)})`;
|
|
31317
|
+
};
|
|
31318
|
+
var playFocusTransform = fitBoundsTransform({
|
|
31319
|
+
source: playFocusPathBounds,
|
|
31320
|
+
target: expandBounds(expandBounds(playPathBounds, playIconStrokeWidth / 2), playFocusPadding)
|
|
31321
|
+
});
|
|
31322
|
+
var PlayIcon = ({ focused }) => {
|
|
31323
|
+
return /* @__PURE__ */ jsxs14("svg", {
|
|
31250
31324
|
width: ICON_SIZE2,
|
|
31251
31325
|
height: ICON_SIZE2,
|
|
31252
31326
|
viewBox: "0 0 25 25",
|
|
31253
31327
|
fill: "none",
|
|
31254
|
-
children:
|
|
31255
|
-
|
|
31256
|
-
|
|
31257
|
-
|
|
31258
|
-
|
|
31259
|
-
|
|
31260
|
-
|
|
31328
|
+
children: [
|
|
31329
|
+
focused ? /* @__PURE__ */ jsx59("path", {
|
|
31330
|
+
d: playFocusPath,
|
|
31331
|
+
fill: "none",
|
|
31332
|
+
stroke: focusRingFallbackColor,
|
|
31333
|
+
strokeWidth: playFocusStrokeWidth,
|
|
31334
|
+
style: focusRingStyle,
|
|
31335
|
+
transform: playFocusTransform,
|
|
31336
|
+
vectorEffect: "non-scaling-stroke"
|
|
31337
|
+
}) : null,
|
|
31338
|
+
/* @__PURE__ */ jsx59("path", {
|
|
31339
|
+
d: playPath,
|
|
31340
|
+
fill: "white",
|
|
31341
|
+
stroke: "white",
|
|
31342
|
+
strokeWidth: playIconStrokeWidth,
|
|
31343
|
+
strokeLinejoin: "round"
|
|
31344
|
+
})
|
|
31345
|
+
]
|
|
31261
31346
|
});
|
|
31262
31347
|
};
|
|
31263
|
-
var PauseIcon = (
|
|
31348
|
+
var PauseIcon = ({
|
|
31349
|
+
focused
|
|
31350
|
+
}) => {
|
|
31264
31351
|
return /* @__PURE__ */ jsxs14("svg", {
|
|
31265
31352
|
viewBox: "0 0 100 100",
|
|
31266
31353
|
width: ICON_SIZE2,
|
|
31267
31354
|
height: ICON_SIZE2,
|
|
31268
31355
|
children: [
|
|
31356
|
+
focused ? /* @__PURE__ */ jsxs14(Fragment12, {
|
|
31357
|
+
children: [
|
|
31358
|
+
/* @__PURE__ */ jsx59("rect", {
|
|
31359
|
+
x: "21",
|
|
31360
|
+
y: "16",
|
|
31361
|
+
width: "28",
|
|
31362
|
+
height: "68",
|
|
31363
|
+
fill: "none",
|
|
31364
|
+
stroke: focusRingFallbackColor,
|
|
31365
|
+
strokeWidth: "4",
|
|
31366
|
+
ry: "9",
|
|
31367
|
+
rx: "9",
|
|
31368
|
+
style: focusRingStyle
|
|
31369
|
+
}),
|
|
31370
|
+
/* @__PURE__ */ jsx59("rect", {
|
|
31371
|
+
x: "51",
|
|
31372
|
+
y: "16",
|
|
31373
|
+
width: "28",
|
|
31374
|
+
height: "68",
|
|
31375
|
+
fill: "none",
|
|
31376
|
+
stroke: focusRingFallbackColor,
|
|
31377
|
+
strokeWidth: "4",
|
|
31378
|
+
ry: "9",
|
|
31379
|
+
rx: "9",
|
|
31380
|
+
style: focusRingStyle
|
|
31381
|
+
})
|
|
31382
|
+
]
|
|
31383
|
+
}) : null,
|
|
31269
31384
|
/* @__PURE__ */ jsx59("rect", {
|
|
31270
31385
|
x: "25",
|
|
31271
31386
|
y: "20",
|
|
@@ -31383,7 +31498,7 @@ var studioStyle = {
|
|
|
31383
31498
|
};
|
|
31384
31499
|
var BufferingIndicator = ({ type }) => {
|
|
31385
31500
|
const style = type === "player" ? playerStyle : studioStyle;
|
|
31386
|
-
return /* @__PURE__ */ jsxs24(
|
|
31501
|
+
return /* @__PURE__ */ jsxs24(Fragment23, {
|
|
31387
31502
|
children: [
|
|
31388
31503
|
/* @__PURE__ */ jsx214("style", {
|
|
31389
31504
|
type: "text/css",
|
|
@@ -32597,16 +32712,20 @@ var RenderWarningIfBlacklist = () => {
|
|
|
32597
32712
|
})
|
|
32598
32713
|
});
|
|
32599
32714
|
};
|
|
32600
|
-
var DefaultPlayPauseButton = ({ playing, buffering }) => {
|
|
32715
|
+
var DefaultPlayPauseButton = ({ playing, buffering, focused }) => {
|
|
32601
32716
|
if (playing && buffering) {
|
|
32602
32717
|
return /* @__PURE__ */ jsx64(BufferingIndicator, {
|
|
32603
32718
|
type: "player"
|
|
32604
32719
|
});
|
|
32605
32720
|
}
|
|
32606
32721
|
if (playing) {
|
|
32607
|
-
return /* @__PURE__ */ jsx64(PauseIcon, {
|
|
32722
|
+
return /* @__PURE__ */ jsx64(PauseIcon, {
|
|
32723
|
+
focused
|
|
32724
|
+
});
|
|
32608
32725
|
}
|
|
32609
|
-
return /* @__PURE__ */ jsx64(PlayIcon, {
|
|
32726
|
+
return /* @__PURE__ */ jsx64(PlayIcon, {
|
|
32727
|
+
focused
|
|
32728
|
+
});
|
|
32610
32729
|
};
|
|
32611
32730
|
var KNOB_SIZE = 12;
|
|
32612
32731
|
var BAR_HEIGHT = 5;
|
|
@@ -33330,6 +33449,7 @@ var Controls = ({
|
|
|
33330
33449
|
renderCustomControls
|
|
33331
33450
|
}) => {
|
|
33332
33451
|
const playButtonRef = useRef82(null);
|
|
33452
|
+
const [playButtonFocused, setPlayButtonFocused] = useState102(false);
|
|
33333
33453
|
const [supportsFullscreen, setSupportsFullscreen] = useState102(false);
|
|
33334
33454
|
const hovered = useHoverState(containerRef, hideControlsWhenPointerDoesntMove);
|
|
33335
33455
|
const { maxTimeLabelWidth, displayVerticalVolumeSlider } = useVideoControlsResize({
|
|
@@ -33364,6 +33484,15 @@ var Controls = ({
|
|
|
33364
33484
|
opacity: Number(shouldShow)
|
|
33365
33485
|
};
|
|
33366
33486
|
}, [hovered, shouldShowInitially, playing, alwaysShowControls]);
|
|
33487
|
+
const playPauseButtonStyle = useMemo92(() => {
|
|
33488
|
+
if (renderPlayPauseButton !== null || playing && buffering) {
|
|
33489
|
+
return playerButtonStyle;
|
|
33490
|
+
}
|
|
33491
|
+
return {
|
|
33492
|
+
...playerButtonStyle,
|
|
33493
|
+
outline: "none"
|
|
33494
|
+
};
|
|
33495
|
+
}, [buffering, playing, renderPlayPauseButton]);
|
|
33367
33496
|
useEffect112(() => {
|
|
33368
33497
|
if (playButtonRef.current && spaceKeyToPlayOrPause) {
|
|
33369
33498
|
playButtonRef.current.focus({
|
|
@@ -33416,6 +33545,12 @@ var Controls = ({
|
|
|
33416
33545
|
onDoubleClick?.(e);
|
|
33417
33546
|
}
|
|
33418
33547
|
}, [onDoubleClick]);
|
|
33548
|
+
const onPlayButtonFocus = useCallback72(() => {
|
|
33549
|
+
setPlayButtonFocused(true);
|
|
33550
|
+
}, []);
|
|
33551
|
+
const onPlayButtonBlur = useCallback72(() => {
|
|
33552
|
+
setPlayButtonFocused(false);
|
|
33553
|
+
}, []);
|
|
33419
33554
|
return /* @__PURE__ */ jsxs82("div", {
|
|
33420
33555
|
ref,
|
|
33421
33556
|
style: containerCss,
|
|
@@ -33432,22 +33567,26 @@ var Controls = ({
|
|
|
33432
33567
|
/* @__PURE__ */ jsx114("button", {
|
|
33433
33568
|
ref: playButtonRef,
|
|
33434
33569
|
type: "button",
|
|
33435
|
-
style:
|
|
33570
|
+
style: playPauseButtonStyle,
|
|
33436
33571
|
onClick: toggle,
|
|
33572
|
+
onFocus: onPlayButtonFocus,
|
|
33573
|
+
onBlur: onPlayButtonBlur,
|
|
33437
33574
|
"aria-label": playing ? "Pause video" : "Play video",
|
|
33438
33575
|
title: playing ? "Pause video" : "Play video",
|
|
33439
33576
|
children: renderPlayPauseButton === null ? /* @__PURE__ */ jsx114(DefaultPlayPauseButton, {
|
|
33440
33577
|
buffering,
|
|
33578
|
+
focused: playButtonFocused,
|
|
33441
33579
|
playing
|
|
33442
33580
|
}) : renderPlayPauseButton({
|
|
33443
33581
|
playing,
|
|
33444
33582
|
isBuffering: buffering
|
|
33445
33583
|
}) ?? /* @__PURE__ */ jsx114(DefaultPlayPauseButton, {
|
|
33446
33584
|
buffering,
|
|
33585
|
+
focused: false,
|
|
33447
33586
|
playing
|
|
33448
33587
|
})
|
|
33449
33588
|
}),
|
|
33450
|
-
showVolumeControls ? /* @__PURE__ */ jsxs82(
|
|
33589
|
+
showVolumeControls ? /* @__PURE__ */ jsxs82(Fragment32, {
|
|
33451
33590
|
children: [
|
|
33452
33591
|
/* @__PURE__ */ jsx114("div", {
|
|
33453
33592
|
style: xSpacer
|
|
@@ -33984,7 +34123,7 @@ var PlayerUI = ({
|
|
|
33984
34123
|
showPosterWhenBufferingAndPaused && showBufferIndicator && !player.isPlaying()
|
|
33985
34124
|
].some(Boolean);
|
|
33986
34125
|
const { left, top, width, height, ...outerWithoutScale } = outer;
|
|
33987
|
-
const content = /* @__PURE__ */ jsxs92(
|
|
34126
|
+
const content = /* @__PURE__ */ jsxs92(Fragment42, {
|
|
33988
34127
|
children: [
|
|
33989
34128
|
/* @__PURE__ */ jsxs92("div", {
|
|
33990
34129
|
style: outer,
|
|
@@ -35724,13 +35863,13 @@ var getTimeInSeconds = ({
|
|
|
35724
35863
|
if (mediaDurationInSeconds === null && loop && ifNoMediaDuration === "fail") {
|
|
35725
35864
|
throw new Error(`Could not determine duration of ${src}, but "loop" was set.`);
|
|
35726
35865
|
}
|
|
35727
|
-
const
|
|
35866
|
+
const loopDurationInFrames = loop ? Internals.calculateMediaDuration({
|
|
35728
35867
|
trimAfter,
|
|
35729
35868
|
mediaDurationInFrames: mediaDurationInSeconds ? mediaDurationInSeconds * fps : Infinity,
|
|
35730
35869
|
playbackRate: 1,
|
|
35731
35870
|
trimBefore
|
|
35732
|
-
})
|
|
35733
|
-
const timeInSeconds = unloopedTimeInSeconds * playbackRate %
|
|
35871
|
+
}) : Infinity;
|
|
35872
|
+
const timeInSeconds = loop ? unloopedTimeInSeconds * playbackRate * fps % loopDurationInFrames / fps : unloopedTimeInSeconds * playbackRate;
|
|
35734
35873
|
if ((trimAfter ?? null) !== null && !loop) {
|
|
35735
35874
|
const time = (trimAfter - (trimBefore ?? 0)) / fps;
|
|
35736
35875
|
if (timeInSeconds >= time) {
|
|
@@ -36626,6 +36765,43 @@ var roundTo4Digits = (timestamp) => {
|
|
|
36626
36765
|
return Math.round(timestamp * 1000) / 1000;
|
|
36627
36766
|
};
|
|
36628
36767
|
var BUFFER_SIZE = 3;
|
|
36768
|
+
var releaseCanvas = Symbol("releaseCanvas");
|
|
36769
|
+
var releaseStableFrame = (frame) => {
|
|
36770
|
+
frame?.[releaseCanvas]?.();
|
|
36771
|
+
};
|
|
36772
|
+
var makeStableFramePool = () => {
|
|
36773
|
+
const availableCanvases = [];
|
|
36774
|
+
const makeStableFrame = (frame) => {
|
|
36775
|
+
const { canvas } = frame;
|
|
36776
|
+
const stableCanvas = availableCanvases.pop() ?? new OffscreenCanvas(canvas.width, canvas.height);
|
|
36777
|
+
if (stableCanvas.width !== canvas.width) {
|
|
36778
|
+
stableCanvas.width = canvas.width;
|
|
36779
|
+
}
|
|
36780
|
+
if (stableCanvas.height !== canvas.height) {
|
|
36781
|
+
stableCanvas.height = canvas.height;
|
|
36782
|
+
}
|
|
36783
|
+
const context = stableCanvas.getContext("2d");
|
|
36784
|
+
if (!context) {
|
|
36785
|
+
throw new Error("Could not create canvas context");
|
|
36786
|
+
}
|
|
36787
|
+
context.drawImage(canvas, 0, 0);
|
|
36788
|
+
let released = false;
|
|
36789
|
+
const stableFrame = {
|
|
36790
|
+
canvas: stableCanvas,
|
|
36791
|
+
duration: frame.duration,
|
|
36792
|
+
timestamp: frame.timestamp,
|
|
36793
|
+
[releaseCanvas]: () => {
|
|
36794
|
+
if (released) {
|
|
36795
|
+
return;
|
|
36796
|
+
}
|
|
36797
|
+
released = true;
|
|
36798
|
+
availableCanvases.push(stableCanvas);
|
|
36799
|
+
}
|
|
36800
|
+
};
|
|
36801
|
+
return stableFrame;
|
|
36802
|
+
};
|
|
36803
|
+
return { makeStableFrame };
|
|
36804
|
+
};
|
|
36629
36805
|
var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
36630
36806
|
const iterator = videoSink.canvases(startTimestamp);
|
|
36631
36807
|
const buffer = [];
|
|
@@ -36633,8 +36809,9 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36633
36809
|
let reachedEnd = false;
|
|
36634
36810
|
let closed = false;
|
|
36635
36811
|
let inFlight = null;
|
|
36636
|
-
const
|
|
36637
|
-
|
|
36812
|
+
const stableFramePool = makeStableFramePool();
|
|
36813
|
+
const takeFrame = (frame) => {
|
|
36814
|
+
return stableFramePool.makeStableFrame(frame);
|
|
36638
36815
|
};
|
|
36639
36816
|
const fillNext = () => {
|
|
36640
36817
|
if (chaining || reachedEnd || closed)
|
|
@@ -36645,17 +36822,18 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36645
36822
|
const slot = { promise: iterator.next(), resolved: null };
|
|
36646
36823
|
buffer.push(slot);
|
|
36647
36824
|
inFlight = slot.promise.then((result) => {
|
|
36648
|
-
slot.resolved = result;
|
|
36649
36825
|
chaining = false;
|
|
36650
36826
|
inFlight = null;
|
|
36651
36827
|
if (result.done) {
|
|
36828
|
+
slot.resolved = result;
|
|
36652
36829
|
reachedEnd = true;
|
|
36653
36830
|
return;
|
|
36654
36831
|
}
|
|
36655
36832
|
if (closed) {
|
|
36656
|
-
|
|
36833
|
+
slot.resolved = { done: true, value: undefined };
|
|
36657
36834
|
return;
|
|
36658
36835
|
}
|
|
36836
|
+
slot.resolved = { ...result, value: takeFrame(result.value) };
|
|
36659
36837
|
fillNext();
|
|
36660
36838
|
}, () => {
|
|
36661
36839
|
chaining = false;
|
|
@@ -36683,7 +36861,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36683
36861
|
return next2.resolved.done ? null : next2.resolved.value;
|
|
36684
36862
|
}
|
|
36685
36863
|
const result = await next2.promise;
|
|
36686
|
-
return result.done ? null : result.value;
|
|
36864
|
+
return result.done ? null : takeFrame(result.value);
|
|
36687
36865
|
}
|
|
36688
36866
|
};
|
|
36689
36867
|
}
|
|
@@ -36697,7 +36875,10 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36697
36875
|
type: "pending",
|
|
36698
36876
|
wait: async () => {
|
|
36699
36877
|
const result = await slot.promise;
|
|
36700
|
-
|
|
36878
|
+
if (slot.resolved) {
|
|
36879
|
+
return slot.resolved.done ? null : slot.resolved.value;
|
|
36880
|
+
}
|
|
36881
|
+
return result.done ? null : takeFrame(result.value);
|
|
36701
36882
|
}
|
|
36702
36883
|
};
|
|
36703
36884
|
};
|
|
@@ -36705,7 +36886,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36705
36886
|
closed = true;
|
|
36706
36887
|
for (const slot of buffer) {
|
|
36707
36888
|
if (slot.resolved && !slot.resolved.done) {
|
|
36708
|
-
|
|
36889
|
+
releaseStableFrame(slot.resolved.value);
|
|
36709
36890
|
}
|
|
36710
36891
|
}
|
|
36711
36892
|
buffer.length = 0;
|
|
@@ -36748,6 +36929,12 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36748
36929
|
const initialFrame = firstAwait && firstAwait.type === "ready" ? firstAwait.frame : await firstAwait.wait();
|
|
36749
36930
|
let lastReturnedFrame = initialFrame;
|
|
36750
36931
|
let peekedFrame = null;
|
|
36932
|
+
const setLastReturnedFrame = (frame) => {
|
|
36933
|
+
if (lastReturnedFrame !== frame) {
|
|
36934
|
+
releaseStableFrame(lastReturnedFrame);
|
|
36935
|
+
}
|
|
36936
|
+
lastReturnedFrame = frame;
|
|
36937
|
+
};
|
|
36751
36938
|
const peek = async () => {
|
|
36752
36939
|
if (peekedFrame) {
|
|
36753
36940
|
return peekedFrame;
|
|
@@ -36763,7 +36950,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36763
36950
|
const getNextOrNullIfNotAvailable = () => {
|
|
36764
36951
|
if (peekedFrame) {
|
|
36765
36952
|
const frame = peekedFrame;
|
|
36766
|
-
|
|
36953
|
+
setLastReturnedFrame(frame);
|
|
36767
36954
|
const retValue = {
|
|
36768
36955
|
type: "got-frame-or-end",
|
|
36769
36956
|
frame
|
|
@@ -36778,7 +36965,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36778
36965
|
waitPromise: async () => {
|
|
36779
36966
|
const res = await next.wait();
|
|
36780
36967
|
if (res) {
|
|
36781
|
-
|
|
36968
|
+
setLastReturnedFrame(res);
|
|
36782
36969
|
} else {
|
|
36783
36970
|
iteratorEnded = true;
|
|
36784
36971
|
}
|
|
@@ -36787,7 +36974,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36787
36974
|
};
|
|
36788
36975
|
}
|
|
36789
36976
|
if (next.frame) {
|
|
36790
|
-
|
|
36977
|
+
setLastReturnedFrame(next.frame);
|
|
36791
36978
|
} else {
|
|
36792
36979
|
iteratorEnded = true;
|
|
36793
36980
|
}
|
|
@@ -36798,15 +36985,21 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36798
36985
|
};
|
|
36799
36986
|
const destroy = () => {
|
|
36800
36987
|
destroyed = true;
|
|
36988
|
+
releaseStableFrame(lastReturnedFrame);
|
|
36989
|
+
if (peekedFrame !== lastReturnedFrame) {
|
|
36990
|
+
releaseStableFrame(peekedFrame);
|
|
36991
|
+
}
|
|
36801
36992
|
lastReturnedFrame = null;
|
|
36993
|
+
peekedFrame = null;
|
|
36802
36994
|
iterator.closeIterator().catch(() => {
|
|
36803
36995
|
return;
|
|
36804
36996
|
});
|
|
36805
36997
|
};
|
|
36806
36998
|
const tryToSatisfySeek = async (time) => {
|
|
36999
|
+
const timestamp = roundTo4Digits(time);
|
|
36807
37000
|
if (lastReturnedFrame) {
|
|
36808
37001
|
const frameTimestamp = roundTo4Digits(lastReturnedFrame.timestamp);
|
|
36809
|
-
if (
|
|
37002
|
+
if (timestamp < frameTimestamp) {
|
|
36810
37003
|
const lastFrameWasInitialFrame = lastReturnedFrame === initialFrame;
|
|
36811
37004
|
const firstFrameDoesSatisfy = lastFrameWasInitialFrame && roundTo4Digits(time) >= roundTo4Digits(timeToSeek);
|
|
36812
37005
|
if (firstFrameDoesSatisfy) {
|
|
@@ -36828,7 +37021,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36828
37021
|
}
|
|
36829
37022
|
}
|
|
36830
37023
|
const frameEndTimestamp = roundTo4Digits(lastReturnedFrame.timestamp + lastFrameDuration);
|
|
36831
|
-
const timestamp = roundTo4Digits(time);
|
|
36832
37024
|
if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
|
|
36833
37025
|
return {
|
|
36834
37026
|
type: "satisfied",
|
|
@@ -36872,7 +37064,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36872
37064
|
}
|
|
36873
37065
|
const frameTimestamp = roundTo4Digits(frame.frame.timestamp);
|
|
36874
37066
|
const frameEndTimestamp = roundTo4Digits(frame.frame.timestamp + frame.frame.duration);
|
|
36875
|
-
const timestamp = roundTo4Digits(time);
|
|
36876
37067
|
if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
|
|
36877
37068
|
return {
|
|
36878
37069
|
type: "satisfied",
|
|
@@ -36926,7 +37117,7 @@ var videoIteratorManager = async ({
|
|
|
36926
37117
|
}
|
|
36927
37118
|
}
|
|
36928
37119
|
const canvasSink = new CanvasSink(videoTrack, {
|
|
36929
|
-
poolSize:
|
|
37120
|
+
poolSize: 3,
|
|
36930
37121
|
fit: "contain",
|
|
36931
37122
|
alpha: true
|
|
36932
37123
|
});
|
|
@@ -40339,6 +40530,8 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40339
40530
|
const effectChainState = useEffectChainState2();
|
|
40340
40531
|
const effectsRef = useRef213(effects);
|
|
40341
40532
|
effectsRef.current = effects;
|
|
40533
|
+
const onErrorRef = useRef213(onError);
|
|
40534
|
+
onErrorRef.current = onError;
|
|
40342
40535
|
const effectChainStateRef = useRef213(effectChainState);
|
|
40343
40536
|
effectChainStateRef.current = effectChainState;
|
|
40344
40537
|
const parentSequence = useContext49(SequenceContext22);
|
|
@@ -40402,32 +40595,19 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40402
40595
|
};
|
|
40403
40596
|
}, [_experimentalInitiallyDrawCachedFrame, src]);
|
|
40404
40597
|
useEffect212(() => {
|
|
40405
|
-
|
|
40406
|
-
|
|
40407
|
-
|
|
40408
|
-
|
|
40409
|
-
|
|
40410
|
-
|
|
40411
|
-
|
|
40412
|
-
audioSyncAnchor,
|
|
40413
|
-
scheduleAudioNode,
|
|
40414
|
-
unscheduleAudioNode
|
|
40415
|
-
} = sharedAudioContext;
|
|
40416
|
-
if (!gainNode) {
|
|
40417
|
-
return;
|
|
40418
|
-
}
|
|
40598
|
+
const sharedAudioContextForMediaPlayer = sharedAudioContext?.audioContext && sharedAudioContext.gainNode ? {
|
|
40599
|
+
audioContext: sharedAudioContext.audioContext,
|
|
40600
|
+
gainNode: sharedAudioContext.gainNode,
|
|
40601
|
+
audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
|
|
40602
|
+
scheduleAudioNode: sharedAudioContext.scheduleAudioNode,
|
|
40603
|
+
unscheduleAudioNode: sharedAudioContext.unscheduleAudioNode
|
|
40604
|
+
} : null;
|
|
40419
40605
|
try {
|
|
40420
40606
|
const player = new MediaPlayer({
|
|
40421
40607
|
canvas: canvasRef.current,
|
|
40422
40608
|
src: preloadedSrc,
|
|
40423
40609
|
logLevel,
|
|
40424
|
-
sharedAudioContext:
|
|
40425
|
-
audioContext,
|
|
40426
|
-
gainNode,
|
|
40427
|
-
audioSyncAnchor,
|
|
40428
|
-
scheduleAudioNode,
|
|
40429
|
-
unscheduleAudioNode
|
|
40430
|
-
},
|
|
40610
|
+
sharedAudioContext: sharedAudioContextForMediaPlayer,
|
|
40431
40611
|
loop,
|
|
40432
40612
|
trimAfter: initialTrimAfterRef.current,
|
|
40433
40613
|
trimBefore: initialTrimBeforeRef.current,
|
|
@@ -40456,7 +40636,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40456
40636
|
}
|
|
40457
40637
|
const handleError = (error2, fallbackMessage) => {
|
|
40458
40638
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40459
|
-
onError,
|
|
40639
|
+
onError: onErrorRef.current,
|
|
40460
40640
|
error: error2,
|
|
40461
40641
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40462
40642
|
isClientSideRendering: false,
|
|
@@ -40491,7 +40671,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40491
40671
|
}
|
|
40492
40672
|
}).catch((error2) => {
|
|
40493
40673
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40494
|
-
onError,
|
|
40674
|
+
onError: onErrorRef.current,
|
|
40495
40675
|
error: error2,
|
|
40496
40676
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40497
40677
|
isClientSideRendering: false,
|
|
@@ -40506,7 +40686,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40506
40686
|
} catch (error2) {
|
|
40507
40687
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40508
40688
|
error: error2,
|
|
40509
|
-
onError,
|
|
40689
|
+
onError: onErrorRef.current,
|
|
40510
40690
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40511
40691
|
isClientSideRendering: false,
|
|
40512
40692
|
clientSideError: error2
|
|
@@ -40537,7 +40717,6 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40537
40717
|
preloadedSrc,
|
|
40538
40718
|
sharedAudioContext,
|
|
40539
40719
|
videoConfig.fps,
|
|
40540
|
-
onError,
|
|
40541
40720
|
credentials,
|
|
40542
40721
|
initialRequestInit,
|
|
40543
40722
|
setMediaDurationInSeconds
|
|
@@ -42565,7 +42744,7 @@ import {
|
|
|
42565
42744
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
42566
42745
|
|
|
42567
42746
|
// ../core/dist/esm/version.mjs
|
|
42568
|
-
var VERSION2 = "4.0.
|
|
42747
|
+
var VERSION2 = "4.0.485";
|
|
42569
42748
|
|
|
42570
42749
|
// ../web-renderer/dist/esm/index.mjs
|
|
42571
42750
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -46060,12 +46239,12 @@ var getPrecomposeRectForMask = (element) => {
|
|
|
46060
46239
|
};
|
|
46061
46240
|
var handleMask = ({
|
|
46062
46241
|
gradientInfo,
|
|
46063
|
-
|
|
46242
|
+
maskRect,
|
|
46064
46243
|
precomposeRect,
|
|
46065
46244
|
tempContext,
|
|
46066
46245
|
scale
|
|
46067
46246
|
}) => {
|
|
46068
|
-
const rectToFill = new DOMRect((
|
|
46247
|
+
const rectToFill = new DOMRect((maskRect.left - precomposeRect.left) * scale, (maskRect.top - precomposeRect.top) * scale, maskRect.width * scale, maskRect.height * scale);
|
|
46069
46248
|
const gradient = createCanvasGradient({
|
|
46070
46249
|
ctx: tempContext,
|
|
46071
46250
|
rect: rectToFill,
|
|
@@ -46186,7 +46365,7 @@ var processNode = async ({
|
|
|
46186
46365
|
if (precompositing.needsMaskImage) {
|
|
46187
46366
|
handleMask({
|
|
46188
46367
|
gradientInfo: precompositing.needsMaskImage,
|
|
46189
|
-
|
|
46368
|
+
maskRect: dimensions,
|
|
46190
46369
|
precomposeRect,
|
|
46191
46370
|
tempContext,
|
|
46192
46371
|
scale
|
|
@@ -46299,6 +46478,175 @@ var parsePaintOrder = (paintOrder) => {
|
|
|
46299
46478
|
var parseTextShadow = (textShadowValue) => {
|
|
46300
46479
|
return parseShadowValues(textShadowValue);
|
|
46301
46480
|
};
|
|
46481
|
+
var textDecorationLines = [
|
|
46482
|
+
"underline",
|
|
46483
|
+
"overline",
|
|
46484
|
+
"line-through"
|
|
46485
|
+
];
|
|
46486
|
+
var currentColorValues = new Set(["currentcolor", "currentColor"]);
|
|
46487
|
+
var getDefaultTextDecorationThickness = (fontSizePx) => {
|
|
46488
|
+
return Math.max(1, Number.isFinite(fontSizePx) ? fontSizePx / 16 : 1);
|
|
46489
|
+
};
|
|
46490
|
+
var getTextDecorationStyle = (style2) => {
|
|
46491
|
+
if (style2 === "wavy") {
|
|
46492
|
+
return null;
|
|
46493
|
+
}
|
|
46494
|
+
if (style2 === "double" || style2 === "dotted" || style2 === "dashed") {
|
|
46495
|
+
return style2;
|
|
46496
|
+
}
|
|
46497
|
+
return "solid";
|
|
46498
|
+
};
|
|
46499
|
+
var parseTextDecoration = ({
|
|
46500
|
+
onlyBackgroundClipText,
|
|
46501
|
+
style: style2
|
|
46502
|
+
}) => {
|
|
46503
|
+
const textDecorationStyle = getTextDecorationStyle(style2.getPropertyValue("text-decoration-style").trim());
|
|
46504
|
+
if (textDecorationStyle === null) {
|
|
46505
|
+
return null;
|
|
46506
|
+
}
|
|
46507
|
+
const textDecorationLine = style2.getPropertyValue("text-decoration-line");
|
|
46508
|
+
const lineParts = textDecorationLine.split(/\s+/);
|
|
46509
|
+
const lines2 = textDecorationLines.filter((line) => lineParts.includes(line));
|
|
46510
|
+
if (lines2.length === 0) {
|
|
46511
|
+
return null;
|
|
46512
|
+
}
|
|
46513
|
+
const textDecorationThickness = style2.getPropertyValue("text-decoration-thickness");
|
|
46514
|
+
const thicknessValue = parseFloat(textDecorationThickness);
|
|
46515
|
+
const thickness = Number.isFinite(thicknessValue) ? thicknessValue : getDefaultTextDecorationThickness(parseFloat(style2.fontSize));
|
|
46516
|
+
if (thickness <= 0) {
|
|
46517
|
+
return null;
|
|
46518
|
+
}
|
|
46519
|
+
const textDecorationColor = style2.getPropertyValue("text-decoration-color");
|
|
46520
|
+
return {
|
|
46521
|
+
lines: lines2,
|
|
46522
|
+
color: onlyBackgroundClipText || !textDecorationColor || currentColorValues.has(textDecorationColor) ? onlyBackgroundClipText ? "black" : style2.color : textDecorationColor,
|
|
46523
|
+
thickness,
|
|
46524
|
+
style: textDecorationStyle
|
|
46525
|
+
};
|
|
46526
|
+
};
|
|
46527
|
+
var getTextDecorations = ({
|
|
46528
|
+
computedStyle,
|
|
46529
|
+
onlyBackgroundClipText,
|
|
46530
|
+
span
|
|
46531
|
+
}) => {
|
|
46532
|
+
const decorations = [];
|
|
46533
|
+
const spanDecoration = parseTextDecoration({
|
|
46534
|
+
onlyBackgroundClipText,
|
|
46535
|
+
style: computedStyle
|
|
46536
|
+
});
|
|
46537
|
+
if (spanDecoration) {
|
|
46538
|
+
decorations.push(spanDecoration);
|
|
46539
|
+
}
|
|
46540
|
+
let parent = span.parentElement;
|
|
46541
|
+
while (parent) {
|
|
46542
|
+
const parentDecoration = parseTextDecoration({
|
|
46543
|
+
onlyBackgroundClipText,
|
|
46544
|
+
style: getComputedStyle(parent)
|
|
46545
|
+
});
|
|
46546
|
+
if (parentDecoration) {
|
|
46547
|
+
decorations.push(parentDecoration);
|
|
46548
|
+
}
|
|
46549
|
+
parent = parent.parentElement;
|
|
46550
|
+
}
|
|
46551
|
+
return decorations;
|
|
46552
|
+
};
|
|
46553
|
+
var getTextDecorationY = ({
|
|
46554
|
+
line,
|
|
46555
|
+
measurements,
|
|
46556
|
+
y,
|
|
46557
|
+
thickness,
|
|
46558
|
+
fontSizePx
|
|
46559
|
+
}) => {
|
|
46560
|
+
const fontAscent = measurements.fontBoundingBoxAscent || measurements.actualBoundingBoxAscent || fontSizePx;
|
|
46561
|
+
const fontDescent = measurements.fontBoundingBoxDescent || measurements.actualBoundingBoxDescent || fontSizePx * 0.2;
|
|
46562
|
+
const actualAscent = measurements.actualBoundingBoxAscent || fontAscent;
|
|
46563
|
+
if (line === "underline") {
|
|
46564
|
+
return y + Math.max(thickness, fontDescent * 0.4);
|
|
46565
|
+
}
|
|
46566
|
+
if (line === "overline") {
|
|
46567
|
+
return y - fontAscent + thickness / 2;
|
|
46568
|
+
}
|
|
46569
|
+
return y - actualAscent * 0.35;
|
|
46570
|
+
};
|
|
46571
|
+
var getTextDecorationLineDashPattern = (style2, thickness) => {
|
|
46572
|
+
if (style2 === "dashed") {
|
|
46573
|
+
return [thickness * 2, thickness];
|
|
46574
|
+
}
|
|
46575
|
+
if (style2 === "dotted") {
|
|
46576
|
+
return [thickness, thickness];
|
|
46577
|
+
}
|
|
46578
|
+
return [];
|
|
46579
|
+
};
|
|
46580
|
+
var strokeTextDecorationLine = ({
|
|
46581
|
+
contextToDraw,
|
|
46582
|
+
endX,
|
|
46583
|
+
lineY,
|
|
46584
|
+
startX
|
|
46585
|
+
}) => {
|
|
46586
|
+
contextToDraw.beginPath();
|
|
46587
|
+
contextToDraw.moveTo(startX, lineY);
|
|
46588
|
+
contextToDraw.lineTo(endX, lineY);
|
|
46589
|
+
contextToDraw.stroke();
|
|
46590
|
+
};
|
|
46591
|
+
var drawTextDecoration = ({
|
|
46592
|
+
contextToDraw,
|
|
46593
|
+
fontSizePx,
|
|
46594
|
+
measurements,
|
|
46595
|
+
parentRect,
|
|
46596
|
+
textDecorations,
|
|
46597
|
+
token,
|
|
46598
|
+
y
|
|
46599
|
+
}) => {
|
|
46600
|
+
if (textDecorations.length === 0) {
|
|
46601
|
+
return;
|
|
46602
|
+
}
|
|
46603
|
+
const startX = token.rect.left - parentRect.x;
|
|
46604
|
+
const endX = token.rect.right - parentRect.x;
|
|
46605
|
+
if (endX <= startX) {
|
|
46606
|
+
return;
|
|
46607
|
+
}
|
|
46608
|
+
contextToDraw.save();
|
|
46609
|
+
contextToDraw.lineCap = "butt";
|
|
46610
|
+
for (const textDecoration of textDecorations) {
|
|
46611
|
+
contextToDraw.strokeStyle = textDecoration.color;
|
|
46612
|
+
contextToDraw.lineWidth = textDecoration.thickness;
|
|
46613
|
+
for (const line of textDecoration.lines) {
|
|
46614
|
+
const lineY = getTextDecorationY({
|
|
46615
|
+
line,
|
|
46616
|
+
measurements,
|
|
46617
|
+
y,
|
|
46618
|
+
thickness: textDecoration.thickness,
|
|
46619
|
+
fontSizePx
|
|
46620
|
+
});
|
|
46621
|
+
if (textDecoration.style === "double") {
|
|
46622
|
+
contextToDraw.setLineDash([]);
|
|
46623
|
+
strokeTextDecorationLine({
|
|
46624
|
+
contextToDraw,
|
|
46625
|
+
endX,
|
|
46626
|
+
lineY: lineY - textDecoration.thickness,
|
|
46627
|
+
startX
|
|
46628
|
+
});
|
|
46629
|
+
strokeTextDecorationLine({
|
|
46630
|
+
contextToDraw,
|
|
46631
|
+
endX,
|
|
46632
|
+
lineY: lineY + textDecoration.thickness,
|
|
46633
|
+
startX
|
|
46634
|
+
});
|
|
46635
|
+
contextToDraw.setLineDash([]);
|
|
46636
|
+
continue;
|
|
46637
|
+
}
|
|
46638
|
+
contextToDraw.setLineDash(getTextDecorationLineDashPattern(textDecoration.style, textDecoration.thickness));
|
|
46639
|
+
strokeTextDecorationLine({
|
|
46640
|
+
contextToDraw,
|
|
46641
|
+
endX,
|
|
46642
|
+
lineY,
|
|
46643
|
+
startX
|
|
46644
|
+
});
|
|
46645
|
+
contextToDraw.setLineDash([]);
|
|
46646
|
+
}
|
|
46647
|
+
}
|
|
46648
|
+
contextToDraw.restore();
|
|
46649
|
+
};
|
|
46302
46650
|
var drawText = ({
|
|
46303
46651
|
span,
|
|
46304
46652
|
logLevel,
|
|
@@ -46349,6 +46697,11 @@ var drawText = ({
|
|
|
46349
46697
|
contextToDraw.fillStyle = onlyBackgroundClipText ? "black" : webkitTextFillColor;
|
|
46350
46698
|
contextToDraw.letterSpacing = letterSpacing;
|
|
46351
46699
|
contextToDraw.wordSpacing = wordSpacing;
|
|
46700
|
+
const textDecorations = getTextDecorations({
|
|
46701
|
+
computedStyle,
|
|
46702
|
+
onlyBackgroundClipText,
|
|
46703
|
+
span
|
|
46704
|
+
});
|
|
46352
46705
|
const strokeWidth2 = parseFloat(webkitTextStrokeWidth);
|
|
46353
46706
|
const hasStroke = strokeWidth2 > 0;
|
|
46354
46707
|
if (hasStroke) {
|
|
@@ -46399,6 +46752,15 @@ var drawText = ({
|
|
|
46399
46752
|
drawFill();
|
|
46400
46753
|
drawStroke();
|
|
46401
46754
|
}
|
|
46755
|
+
drawTextDecoration({
|
|
46756
|
+
contextToDraw,
|
|
46757
|
+
fontSizePx,
|
|
46758
|
+
measurements,
|
|
46759
|
+
parentRect,
|
|
46760
|
+
textDecorations,
|
|
46761
|
+
token,
|
|
46762
|
+
y
|
|
46763
|
+
});
|
|
46402
46764
|
}
|
|
46403
46765
|
span.textContent = originalText;
|
|
46404
46766
|
finishFilter();
|
|
@@ -49416,6 +49778,7 @@ var listOfRemotionPackages = [
|
|
|
49416
49778
|
"@remotion/bugs",
|
|
49417
49779
|
"@remotion/brand",
|
|
49418
49780
|
"@remotion/bundler",
|
|
49781
|
+
"@remotion/browser-studio",
|
|
49419
49782
|
"@remotion/canvas-capture",
|
|
49420
49783
|
"@remotion/cli",
|
|
49421
49784
|
"@remotion/cloudrun",
|
|
@@ -50830,32 +51193,6 @@ var GetStarted = () => {
|
|
|
50830
51193
|
className: "w-full",
|
|
50831
51194
|
children: /* @__PURE__ */ jsx168(GithubButton, {})
|
|
50832
51195
|
})
|
|
50833
|
-
}),
|
|
50834
|
-
" ",
|
|
50835
|
-
/* @__PURE__ */ jsx168("div", {
|
|
50836
|
-
className: "w-2 h-2"
|
|
50837
|
-
}),
|
|
50838
|
-
/* @__PURE__ */ jsx168("div", {
|
|
50839
|
-
className: "w-full lg:w-auto",
|
|
50840
|
-
children: /* @__PURE__ */ jsxs66(Button, {
|
|
50841
|
-
href: "/prompts",
|
|
50842
|
-
className: "w-full",
|
|
50843
|
-
children: [
|
|
50844
|
-
/* @__PURE__ */ jsx168("svg", {
|
|
50845
|
-
width: "20",
|
|
50846
|
-
height: "20",
|
|
50847
|
-
viewBox: "0 0 149 149",
|
|
50848
|
-
fill: "none",
|
|
50849
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
50850
|
-
style: { marginRight: 8 },
|
|
50851
|
-
children: /* @__PURE__ */ jsx168("path", {
|
|
50852
|
-
d: "M29.05 98.54L58.19 82.19L58.68 80.77L58.19 79.98H56.77L51.9 79.68L35.25 79.23L20.81 78.63L6.82 77.88L3.3 77.13L0 72.78L0.340004 70.61L3.3 68.62L7.54 68.99L16.91 69.63L30.97 70.6L41.17 71.2L56.28 72.77H58.68L59.02 71.8L58.2 71.2L57.56 70.6L43.01 60.74L27.26 50.32L19.01 44.32L14.55 41.28L12.3 38.43L11.33 32.21L15.38 27.75L20.82 28.12L22.21 28.49L27.72 32.73L39.49 41.84L54.86 53.16L57.11 55.03L58.01 54.39L58.12 53.94L57.11 52.25L48.75 37.14L39.83 21.77L35.86 15.4L34.81 11.58C34.44 10.01 34.17 8.69 34.17 7.08L38.78 0.820007L41.33 0L47.48 0.820007L50.07 3.07001L53.89 11.81L60.08 25.57L69.68 44.28L72.49 49.83L73.99 54.97L74.55 56.54H75.52V55.64L76.31 45.1L77.77 32.16L79.19 15.51L79.68 10.82L82 5.2L86.61 2.16L90.21 3.88L93.17 8.12L92.76 10.86L91 22.3L87.55 40.22L85.3 52.22H86.61L88.11 50.72L94.18 42.66L104.38 29.91L108.88 24.85L114.13 19.26L117.5 16.6H123.87L128.56 23.57L126.46 30.77L119.9 39.09L114.46 46.14L106.66 56.64L101.79 65.04L102.24 65.71L103.4 65.6L121.02 61.85L130.54 60.13L141.9 58.18L147.04 60.58L147.6 63.02L145.58 68.01L133.43 71.01L119.18 73.86L97.96 78.88L97.7 79.07L98 79.44L107.56 80.34L111.65 80.56H121.66L140.3 81.95L145.17 85.17L148.09 89.11L147.6 92.11L140.1 95.93L129.98 93.53L106.36 87.91L98.26 85.89H97.14V86.56L103.89 93.16L116.26 104.33L131.75 118.73L132.54 122.29L130.55 125.1L128.45 124.8L114.84 114.56L109.59 109.95L97.7 99.94H96.91V100.99L99.65 105L114.12 126.75L114.87 133.42L113.82 135.59L110.07 136.9L105.95 136.15L97.48 124.26L88.74 110.87L81.69 98.87L80.83 99.36L76.67 144.17L74.72 146.46L70.22 148.18L66.47 145.33L64.48 140.72L66.47 131.61L68.87 119.72L70.82 110.27L72.58 98.53L73.63 94.63L73.56 94.37L72.7 94.48L63.85 106.63L50.39 124.82L39.74 136.22L37.19 137.23L32.77 134.94L33.18 130.85L35.65 127.21L50.39 108.46L59.28 96.84L65.02 90.13L64.98 89.16H64.64L25.49 114.58L18.52 115.48L15.52 112.67L15.89 108.06L17.31 106.56L29.08 98.46L29.04 98.5L29.05 98.54Z",
|
|
50853
|
-
fill: "#D97757"
|
|
50854
|
-
})
|
|
50855
|
-
}),
|
|
50856
|
-
"Prompt a video"
|
|
50857
|
-
]
|
|
50858
|
-
})
|
|
50859
51196
|
})
|
|
50860
51197
|
]
|
|
50861
51198
|
});
|