@remotion/promo-pages 4.0.484 → 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 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.484";
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 readValuesFromProps = (props, keys) => {
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
- deleteNestedKey(merged, propsToDelete);
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((k) => getNestedValue(props, k));
5260
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
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 * playbackRate, mediaDuration);
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: "40px"
29496
+ width: "32px"
29467
29497
  }),
29468
29498
  /* @__PURE__ */ jsx57(StatItemContent, {
29469
29499
  content: "1000",
29470
- width: "85px",
29471
- maxWidth: "100px",
29500
+ width: "112px",
29472
29501
  fontSize: "2.5rem",
29473
29502
  fontWeight: "bold"
29474
29503
  })
@@ -35834,13 +35863,13 @@ var getTimeInSeconds = ({
35834
35863
  if (mediaDurationInSeconds === null && loop && ifNoMediaDuration === "fail") {
35835
35864
  throw new Error(`Could not determine duration of ${src}, but "loop" was set.`);
35836
35865
  }
35837
- const loopDuration = loop ? Internals.calculateMediaDuration({
35866
+ const loopDurationInFrames = loop ? Internals.calculateMediaDuration({
35838
35867
  trimAfter,
35839
35868
  mediaDurationInFrames: mediaDurationInSeconds ? mediaDurationInSeconds * fps : Infinity,
35840
35869
  playbackRate: 1,
35841
35870
  trimBefore
35842
- }) / fps : Infinity;
35843
- const timeInSeconds = unloopedTimeInSeconds * playbackRate % loopDuration;
35871
+ }) : Infinity;
35872
+ const timeInSeconds = loop ? unloopedTimeInSeconds * playbackRate * fps % loopDurationInFrames / fps : unloopedTimeInSeconds * playbackRate;
35844
35873
  if ((trimAfter ?? null) !== null && !loop) {
35845
35874
  const time = (trimAfter - (trimBefore ?? 0)) / fps;
35846
35875
  if (timeInSeconds >= time) {
@@ -36736,6 +36765,43 @@ var roundTo4Digits = (timestamp) => {
36736
36765
  return Math.round(timestamp * 1000) / 1000;
36737
36766
  };
36738
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
+ };
36739
36805
  var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36740
36806
  const iterator = videoSink.canvases(startTimestamp);
36741
36807
  const buffer = [];
@@ -36743,8 +36809,9 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36743
36809
  let reachedEnd = false;
36744
36810
  let closed = false;
36745
36811
  let inFlight = null;
36746
- const closeFrame = (frame) => {
36747
- frame.close?.();
36812
+ const stableFramePool = makeStableFramePool();
36813
+ const takeFrame = (frame) => {
36814
+ return stableFramePool.makeStableFrame(frame);
36748
36815
  };
36749
36816
  const fillNext = () => {
36750
36817
  if (chaining || reachedEnd || closed)
@@ -36755,17 +36822,18 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36755
36822
  const slot = { promise: iterator.next(), resolved: null };
36756
36823
  buffer.push(slot);
36757
36824
  inFlight = slot.promise.then((result) => {
36758
- slot.resolved = result;
36759
36825
  chaining = false;
36760
36826
  inFlight = null;
36761
36827
  if (result.done) {
36828
+ slot.resolved = result;
36762
36829
  reachedEnd = true;
36763
36830
  return;
36764
36831
  }
36765
36832
  if (closed) {
36766
- closeFrame(result.value);
36833
+ slot.resolved = { done: true, value: undefined };
36767
36834
  return;
36768
36835
  }
36836
+ slot.resolved = { ...result, value: takeFrame(result.value) };
36769
36837
  fillNext();
36770
36838
  }, () => {
36771
36839
  chaining = false;
@@ -36793,7 +36861,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36793
36861
  return next2.resolved.done ? null : next2.resolved.value;
36794
36862
  }
36795
36863
  const result = await next2.promise;
36796
- return result.done ? null : result.value;
36864
+ return result.done ? null : takeFrame(result.value);
36797
36865
  }
36798
36866
  };
36799
36867
  }
@@ -36807,7 +36875,10 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36807
36875
  type: "pending",
36808
36876
  wait: async () => {
36809
36877
  const result = await slot.promise;
36810
- return result.done ? null : result.value;
36878
+ if (slot.resolved) {
36879
+ return slot.resolved.done ? null : slot.resolved.value;
36880
+ }
36881
+ return result.done ? null : takeFrame(result.value);
36811
36882
  }
36812
36883
  };
36813
36884
  };
@@ -36815,7 +36886,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
36815
36886
  closed = true;
36816
36887
  for (const slot of buffer) {
36817
36888
  if (slot.resolved && !slot.resolved.done) {
36818
- closeFrame(slot.resolved.value);
36889
+ releaseStableFrame(slot.resolved.value);
36819
36890
  }
36820
36891
  }
36821
36892
  buffer.length = 0;
@@ -36858,6 +36929,12 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36858
36929
  const initialFrame = firstAwait && firstAwait.type === "ready" ? firstAwait.frame : await firstAwait.wait();
36859
36930
  let lastReturnedFrame = initialFrame;
36860
36931
  let peekedFrame = null;
36932
+ const setLastReturnedFrame = (frame) => {
36933
+ if (lastReturnedFrame !== frame) {
36934
+ releaseStableFrame(lastReturnedFrame);
36935
+ }
36936
+ lastReturnedFrame = frame;
36937
+ };
36861
36938
  const peek = async () => {
36862
36939
  if (peekedFrame) {
36863
36940
  return peekedFrame;
@@ -36873,7 +36950,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36873
36950
  const getNextOrNullIfNotAvailable = () => {
36874
36951
  if (peekedFrame) {
36875
36952
  const frame = peekedFrame;
36876
- lastReturnedFrame = frame;
36953
+ setLastReturnedFrame(frame);
36877
36954
  const retValue = {
36878
36955
  type: "got-frame-or-end",
36879
36956
  frame
@@ -36888,7 +36965,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36888
36965
  waitPromise: async () => {
36889
36966
  const res = await next.wait();
36890
36967
  if (res) {
36891
- lastReturnedFrame = res;
36968
+ setLastReturnedFrame(res);
36892
36969
  } else {
36893
36970
  iteratorEnded = true;
36894
36971
  }
@@ -36897,7 +36974,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36897
36974
  };
36898
36975
  }
36899
36976
  if (next.frame) {
36900
- lastReturnedFrame = next.frame;
36977
+ setLastReturnedFrame(next.frame);
36901
36978
  } else {
36902
36979
  iteratorEnded = true;
36903
36980
  }
@@ -36908,15 +36985,21 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36908
36985
  };
36909
36986
  const destroy = () => {
36910
36987
  destroyed = true;
36988
+ releaseStableFrame(lastReturnedFrame);
36989
+ if (peekedFrame !== lastReturnedFrame) {
36990
+ releaseStableFrame(peekedFrame);
36991
+ }
36911
36992
  lastReturnedFrame = null;
36993
+ peekedFrame = null;
36912
36994
  iterator.closeIterator().catch(() => {
36913
36995
  return;
36914
36996
  });
36915
36997
  };
36916
36998
  const tryToSatisfySeek = async (time) => {
36999
+ const timestamp = roundTo4Digits(time);
36917
37000
  if (lastReturnedFrame) {
36918
37001
  const frameTimestamp = roundTo4Digits(lastReturnedFrame.timestamp);
36919
- if (roundTo4Digits(time) < frameTimestamp) {
37002
+ if (timestamp < frameTimestamp) {
36920
37003
  const lastFrameWasInitialFrame = lastReturnedFrame === initialFrame;
36921
37004
  const firstFrameDoesSatisfy = lastFrameWasInitialFrame && roundTo4Digits(time) >= roundTo4Digits(timeToSeek);
36922
37005
  if (firstFrameDoesSatisfy) {
@@ -36938,7 +37021,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36938
37021
  }
36939
37022
  }
36940
37023
  const frameEndTimestamp = roundTo4Digits(lastReturnedFrame.timestamp + lastFrameDuration);
36941
- const timestamp = roundTo4Digits(time);
36942
37024
  if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
36943
37025
  return {
36944
37026
  type: "satisfied",
@@ -36982,7 +37064,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
36982
37064
  }
36983
37065
  const frameTimestamp = roundTo4Digits(frame.frame.timestamp);
36984
37066
  const frameEndTimestamp = roundTo4Digits(frame.frame.timestamp + frame.frame.duration);
36985
- const timestamp = roundTo4Digits(time);
36986
37067
  if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
36987
37068
  return {
36988
37069
  type: "satisfied",
@@ -37036,7 +37117,7 @@ var videoIteratorManager = async ({
37036
37117
  }
37037
37118
  }
37038
37119
  const canvasSink = new CanvasSink(videoTrack, {
37039
- poolSize: 2,
37120
+ poolSize: 3,
37040
37121
  fit: "contain",
37041
37122
  alpha: true
37042
37123
  });
@@ -40449,6 +40530,8 @@ var VideoForPreviewAssertedShowing = ({
40449
40530
  const effectChainState = useEffectChainState2();
40450
40531
  const effectsRef = useRef213(effects);
40451
40532
  effectsRef.current = effects;
40533
+ const onErrorRef = useRef213(onError);
40534
+ onErrorRef.current = onError;
40452
40535
  const effectChainStateRef = useRef213(effectChainState);
40453
40536
  effectChainStateRef.current = effectChainState;
40454
40537
  const parentSequence = useContext49(SequenceContext22);
@@ -40553,7 +40636,7 @@ var VideoForPreviewAssertedShowing = ({
40553
40636
  }
40554
40637
  const handleError = (error2, fallbackMessage) => {
40555
40638
  const [action, errorToUse] = callOnErrorAndResolve({
40556
- onError,
40639
+ onError: onErrorRef.current,
40557
40640
  error: error2,
40558
40641
  disallowFallback: disallowFallbackToOffthreadVideo,
40559
40642
  isClientSideRendering: false,
@@ -40588,7 +40671,7 @@ var VideoForPreviewAssertedShowing = ({
40588
40671
  }
40589
40672
  }).catch((error2) => {
40590
40673
  const [action, errorToUse] = callOnErrorAndResolve({
40591
- onError,
40674
+ onError: onErrorRef.current,
40592
40675
  error: error2,
40593
40676
  disallowFallback: disallowFallbackToOffthreadVideo,
40594
40677
  isClientSideRendering: false,
@@ -40603,7 +40686,7 @@ var VideoForPreviewAssertedShowing = ({
40603
40686
  } catch (error2) {
40604
40687
  const [action, errorToUse] = callOnErrorAndResolve({
40605
40688
  error: error2,
40606
- onError,
40689
+ onError: onErrorRef.current,
40607
40690
  disallowFallback: disallowFallbackToOffthreadVideo,
40608
40691
  isClientSideRendering: false,
40609
40692
  clientSideError: error2
@@ -40634,7 +40717,6 @@ var VideoForPreviewAssertedShowing = ({
40634
40717
  preloadedSrc,
40635
40718
  sharedAudioContext,
40636
40719
  videoConfig.fps,
40637
- onError,
40638
40720
  credentials,
40639
40721
  initialRequestInit,
40640
40722
  setMediaDurationInSeconds
@@ -42662,7 +42744,7 @@ import {
42662
42744
  import { BufferTarget, StreamTarget } from "mediabunny";
42663
42745
 
42664
42746
  // ../core/dist/esm/version.mjs
42665
- var VERSION2 = "4.0.484";
42747
+ var VERSION2 = "4.0.485";
42666
42748
 
42667
42749
  // ../web-renderer/dist/esm/index.mjs
42668
42750
  import { AudioSample, VideoSample } from "mediabunny";
@@ -46157,12 +46239,12 @@ var getPrecomposeRectForMask = (element) => {
46157
46239
  };
46158
46240
  var handleMask = ({
46159
46241
  gradientInfo,
46160
- rect,
46242
+ maskRect,
46161
46243
  precomposeRect,
46162
46244
  tempContext,
46163
46245
  scale
46164
46246
  }) => {
46165
- const rectToFill = new DOMRect((rect.left - precomposeRect.left) * scale, (rect.top - precomposeRect.top) * scale, rect.width * scale, rect.height * scale);
46247
+ const rectToFill = new DOMRect((maskRect.left - precomposeRect.left) * scale, (maskRect.top - precomposeRect.top) * scale, maskRect.width * scale, maskRect.height * scale);
46166
46248
  const gradient = createCanvasGradient({
46167
46249
  ctx: tempContext,
46168
46250
  rect: rectToFill,
@@ -46283,7 +46365,7 @@ var processNode = async ({
46283
46365
  if (precompositing.needsMaskImage) {
46284
46366
  handleMask({
46285
46367
  gradientInfo: precompositing.needsMaskImage,
46286
- rect,
46368
+ maskRect: dimensions,
46287
46369
  precomposeRect,
46288
46370
  tempContext,
46289
46371
  scale
@@ -46405,12 +46487,21 @@ var currentColorValues = new Set(["currentcolor", "currentColor"]);
46405
46487
  var getDefaultTextDecorationThickness = (fontSizePx) => {
46406
46488
  return Math.max(1, Number.isFinite(fontSizePx) ? fontSizePx / 16 : 1);
46407
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
+ };
46408
46499
  var parseTextDecoration = ({
46409
46500
  onlyBackgroundClipText,
46410
46501
  style: style2
46411
46502
  }) => {
46412
- const textDecorationStyle = style2.getPropertyValue("text-decoration-style");
46413
- if (textDecorationStyle && textDecorationStyle !== "solid") {
46503
+ const textDecorationStyle = getTextDecorationStyle(style2.getPropertyValue("text-decoration-style").trim());
46504
+ if (textDecorationStyle === null) {
46414
46505
  return null;
46415
46506
  }
46416
46507
  const textDecorationLine = style2.getPropertyValue("text-decoration-line");
@@ -46429,7 +46520,8 @@ var parseTextDecoration = ({
46429
46520
  return {
46430
46521
  lines: lines2,
46431
46522
  color: onlyBackgroundClipText || !textDecorationColor || currentColorValues.has(textDecorationColor) ? onlyBackgroundClipText ? "black" : style2.color : textDecorationColor,
46432
- thickness
46523
+ thickness,
46524
+ style: textDecorationStyle
46433
46525
  };
46434
46526
  };
46435
46527
  var getTextDecorations = ({
@@ -46476,6 +46568,26 @@ var getTextDecorationY = ({
46476
46568
  }
46477
46569
  return y - actualAscent * 0.35;
46478
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
+ };
46479
46591
  var drawTextDecoration = ({
46480
46592
  contextToDraw,
46481
46593
  fontSizePx,
@@ -46506,10 +46618,31 @@ var drawTextDecoration = ({
46506
46618
  thickness: textDecoration.thickness,
46507
46619
  fontSizePx
46508
46620
  });
46509
- contextToDraw.beginPath();
46510
- contextToDraw.moveTo(startX, lineY);
46511
- contextToDraw.lineTo(endX, lineY);
46512
- contextToDraw.stroke();
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([]);
46513
46646
  }
46514
46647
  }
46515
46648
  contextToDraw.restore();
package/dist/design.js CHANGED
@@ -5565,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5565
5565
  var addSequenceStackTraces = (component) => {
5566
5566
  componentsToAddStacksTo.push(component);
5567
5567
  };
5568
- var VERSION = "4.0.484";
5568
+ var VERSION = "4.0.485";
5569
5569
  var checkMultipleRemotionVersions = () => {
5570
5570
  if (typeof globalThis === "undefined") {
5571
5571
  return;
@@ -6036,6 +6036,14 @@ var textSchema = {
6036
6036
  hiddenFromList: false
6037
6037
  }
6038
6038
  };
6039
+ var textContentSchema = {
6040
+ children: {
6041
+ type: "text-content",
6042
+ default: "",
6043
+ description: "Text",
6044
+ keyframable: false
6045
+ }
6046
+ };
6039
6047
  var premountSchema = {
6040
6048
  premountFor: {
6041
6049
  type: "number",
@@ -8403,10 +8411,21 @@ var getNestedValue = (obj, key) => {
8403
8411
  }
8404
8412
  return current;
8405
8413
  };
8406
- var readValuesFromProps = (props, keys) => {
8414
+ var getRuntimeValueForSchemaKey = ({
8415
+ flatSchema,
8416
+ key,
8417
+ props
8418
+ }) => {
8419
+ const value = getNestedValue(props, key);
8420
+ if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
8421
+ return;
8422
+ }
8423
+ return value;
8424
+ };
8425
+ var readValuesFromProps = (props, keys, flatSchema) => {
8407
8426
  const out = {};
8408
8427
  for (const key of keys) {
8409
- out[key] = getNestedValue(props, key);
8428
+ out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
8410
8429
  }
8411
8430
  return out;
8412
8431
  };
@@ -8414,6 +8433,7 @@ var selectActiveKeys = (schema, values) => {
8414
8433
  return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
8415
8434
  };
8416
8435
  var mergeValues = ({
8436
+ flatSchema,
8417
8437
  props,
8418
8438
  valuesDotNotation,
8419
8439
  schemaKeys,
@@ -8422,6 +8442,9 @@ var mergeValues = ({
8422
8442
  const merged = { ...props };
8423
8443
  for (const key of schemaKeys) {
8424
8444
  const value = valuesDotNotation[key];
8445
+ if (flatSchema[key]?.type === "text-content" && value === undefined) {
8446
+ continue;
8447
+ }
8425
8448
  const parts = key.split(".");
8426
8449
  if (parts.length === 1) {
8427
8450
  merged[key] = value;
@@ -8439,7 +8462,8 @@ var mergeValues = ({
8439
8462
  }
8440
8463
  current[parts[parts.length - 1]] = value;
8441
8464
  }
8442
- deleteNestedKey(merged, propsToDelete);
8465
+ const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
8466
+ deleteNestedKey(merged, propsToDeleteWithoutTextContent);
8443
8467
  return merged;
8444
8468
  };
8445
8469
  var stackToOverrideMap = {};
@@ -8486,8 +8510,12 @@ var withInteractivitySchema = ({
8486
8510
  return newOverrideId;
8487
8511
  });
8488
8512
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
8489
- const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
8490
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
8513
+ const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
8514
+ flatSchema,
8515
+ key,
8516
+ props
8517
+ }));
8518
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
8491
8519
  const controls = useMemo13(() => {
8492
8520
  return {
8493
8521
  schema: schemaWithSequenceName,
@@ -8515,6 +8543,7 @@ var withInteractivitySchema = ({
8515
8543
  ]);
8516
8544
  const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
8517
8545
  const mergedProps = mergeValues({
8546
+ flatSchema,
8518
8547
  props,
8519
8548
  valuesDotNotation,
8520
8549
  schemaKeys: activeKeys,
@@ -11138,7 +11167,7 @@ var getTimelineDuration = ({
11138
11167
  trimAfter
11139
11168
  });
11140
11169
  if (parentSequenceDurationInFrames !== null) {
11141
- const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
11170
+ const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
11142
11171
  return Number(cappedDuration.toFixed(10));
11143
11172
  }
11144
11173
  return mediaDuration;
@@ -13936,7 +13965,8 @@ addSequenceStackTraces(Img);
13936
13965
  var interactiveElementSchema = {
13937
13966
  ...baseSchema,
13938
13967
  ...transformSchema,
13939
- ...textSchema
13968
+ ...textSchema,
13969
+ ...textContentSchema
13940
13970
  };
13941
13971
  var setRef = (ref, value) => {
13942
13972
  if (typeof ref === "function") {