@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.
@@ -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") {
package/dist/templates.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") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.484",
3
+ "version": "4.0.485",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,30 +11,30 @@
11
11
  },
12
12
  "type": "module",
13
13
  "dependencies": {
14
- "@remotion/animated-emoji": "4.0.484",
15
- "@remotion/design": "4.0.484",
16
- "@remotion/web-renderer": "4.0.484",
17
- "@remotion/lottie": "4.0.484",
18
- "@remotion/paths": "4.0.484",
19
- "@remotion/player": "4.0.484",
20
- "@remotion/shapes": "4.0.484",
21
- "@remotion/media": "4.0.484",
22
- "@remotion/svg-3d-engine": "4.0.484",
23
- "create-video": "4.0.484",
14
+ "@remotion/animated-emoji": "4.0.485",
15
+ "@remotion/design": "4.0.485",
16
+ "@remotion/web-renderer": "4.0.485",
17
+ "@remotion/lottie": "4.0.485",
18
+ "@remotion/paths": "4.0.485",
19
+ "@remotion/player": "4.0.485",
20
+ "@remotion/shapes": "4.0.485",
21
+ "@remotion/media": "4.0.485",
22
+ "@remotion/svg-3d-engine": "4.0.485",
23
+ "create-video": "4.0.485",
24
24
  "hls.js": "1.5.19",
25
25
  "polished": "4.3.1",
26
- "remotion": "4.0.484",
26
+ "remotion": "4.0.485",
27
27
  "zod": "4.3.6",
28
28
  "@mux/upchunk": "3.5.0",
29
29
  "@vidstack/react": "1.12.13",
30
30
  "bun-plugin-tailwind": "0.1.2",
31
- "@mediabunny/ac3": "1.47.0",
32
- "@mediabunny/aac-encoder": "1.47.0",
33
- "@mediabunny/flac-encoder": "1.47.0",
34
- "@mediabunny/mp3-encoder": "1.47.0"
31
+ "@mediabunny/ac3": "1.50.3",
32
+ "@mediabunny/aac-encoder": "1.50.3",
33
+ "@mediabunny/flac-encoder": "1.50.3",
34
+ "@mediabunny/mp3-encoder": "1.50.3"
35
35
  },
36
36
  "devDependencies": {
37
- "@remotion/eslint-config-internal": "4.0.484",
37
+ "@remotion/eslint-config-internal": "4.0.485",
38
38
  "@eslint/eslintrc": "3.1.0",
39
39
  "@types/react": "19.2.7",
40
40
  "@types/react-dom": "19.2.3",