@remotion/promo-pages 4.0.488 → 4.0.490

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.
Files changed (32) hide show
  1. package/dist/Homepage.js +291 -153
  2. package/dist/components/Homepage.js +5 -21
  3. package/dist/components/homepage/CommunityStatsItems.js +2 -2
  4. package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
  5. package/dist/components/homepage/Demo/DisplayedEmoji.js +5 -3
  6. package/dist/components/homepage/Demo/math.d.ts +1 -1
  7. package/dist/components/homepage/GitHubButton.js +1 -1
  8. package/dist/components/homepage/MakeVideosAgentically.d.ts +1 -0
  9. package/dist/components/homepage/MakeVideosAgentically.js +4 -6
  10. package/dist/components/homepage/MakeVideosInteractively.d.ts +2 -0
  11. package/dist/components/homepage/MakeVideosInteractively.js +3 -6
  12. package/dist/components/homepage/MakeVideosLinks.js +1 -1
  13. package/dist/components/homepage/MakeVideosProgrammatically.d.ts +2 -0
  14. package/dist/components/homepage/MakeVideosProgrammatically.js +2 -5
  15. package/dist/components/homepage/Pricing.d.ts +3 -1
  16. package/dist/components/homepage/Pricing.js +6 -2
  17. package/dist/components/homepage/WriteInReact.js +2 -1
  18. package/dist/components/team/TrustSection.js +1 -1
  19. package/dist/design.js +94 -48
  20. package/dist/experts.js +94 -37
  21. package/dist/homepage/Pricing.js +94 -48
  22. package/dist/prompts/PromptsGallery.js +94 -48
  23. package/dist/prompts/PromptsShow.js +94 -48
  24. package/dist/prompts/PromptsSubmit.js +94 -48
  25. package/dist/team.js +94 -48
  26. package/dist/template-modal-content.js +94 -48
  27. package/dist/templates.js +95 -48
  28. package/package.json +13 -13
  29. package/dist/components/homepage/CanvasSectionTitle.d.ts +0 -4
  30. package/dist/components/homepage/CanvasSectionTitle.js +0 -14
  31. package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
  32. package/dist/components/homepage/EditorStarterSection.js +0 -8
@@ -5279,26 +5279,20 @@ var continueRenderInternal = ({
5279
5279
  if (typeof handle !== "number") {
5280
5280
  throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
5281
5281
  }
5282
- scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => {
5283
- if (h === handle) {
5284
- if (environment.isRendering && scope !== undefined) {
5285
- if (!scope.remotion_delayRenderTimeouts[handle]) {
5286
- return false;
5287
- }
5288
- const { label: label2, startTime, timeout } = scope.remotion_delayRenderTimeouts[handle];
5289
- clearTimeout(timeout);
5290
- const message = [
5291
- label2 ? `"${label2}"` : "A handle",
5292
- DELAY_RENDER_CLEAR_TOKEN,
5293
- `${Date.now() - startTime}ms`
5294
- ].filter(truthy).join(" ");
5295
- Log.verbose({ logLevel, tag: "delayRender()" }, message);
5296
- delete scope.remotion_delayRenderTimeouts[handle];
5297
- }
5298
- return false;
5299
- }
5300
- return true;
5301
- });
5282
+ const handleExists = scope.remotion_delayRenderHandles.includes(handle);
5283
+ const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
5284
+ if (handleExists && environment.isRendering && timeoutEntry) {
5285
+ const { label: label2, startTime, timeout } = timeoutEntry;
5286
+ clearTimeout(timeout);
5287
+ const message = [
5288
+ label2 ? `"${label2}"` : "A handle",
5289
+ DELAY_RENDER_CLEAR_TOKEN,
5290
+ `${Date.now() - startTime}ms`
5291
+ ].filter(truthy).join(" ");
5292
+ Log.verbose({ logLevel, tag: "delayRender()" }, message);
5293
+ delete scope.remotion_delayRenderTimeouts[handle];
5294
+ }
5295
+ scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => h !== handle);
5302
5296
  if (scope.remotion_delayRenderHandles.length === 0) {
5303
5297
  scope.remotion_renderReady = true;
5304
5298
  }
@@ -5571,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5571
5565
  var addSequenceStackTraces = (component) => {
5572
5566
  componentsToAddStacksTo.push(component);
5573
5567
  };
5574
- var VERSION = "4.0.488";
5568
+ var VERSION = "4.0.490";
5575
5569
  var checkMultipleRemotionVersions = () => {
5576
5570
  if (typeof globalThis === "undefined") {
5577
5571
  return;
@@ -5952,7 +5946,8 @@ var transformSchema = {
5952
5946
  max: 100,
5953
5947
  step: 0.01,
5954
5948
  default: 1,
5955
- description: "Scale"
5949
+ description: "Scale",
5950
+ defaultKeyframeOutput: "perceptual-scale"
5956
5951
  },
5957
5952
  "style.rotate": {
5958
5953
  type: "rotation-css",
@@ -6756,8 +6751,20 @@ var serializeStringInterpolationValue = ({
6756
6751
  }
6757
6752
  return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
6758
6753
  };
6754
+ var toSignedArea = (scale) => {
6755
+ if (scale === 0) {
6756
+ return 0;
6757
+ }
6758
+ return Math.sign(scale) * scale * scale;
6759
+ };
6760
+ var fromSignedArea = (area) => {
6761
+ if (area === 0) {
6762
+ return 0;
6763
+ }
6764
+ return Math.sign(area) * Math.sqrt(Math.abs(area));
6765
+ };
6759
6766
  function interpolateFunction(input, inputRange, outputRange, options) {
6760
- const { extrapolateLeft, extrapolateRight, easing } = options;
6767
+ const { extrapolateLeft, extrapolateRight, easing, output } = options;
6761
6768
  let result = input;
6762
6769
  const [inputMin, inputMax] = inputRange;
6763
6770
  const [outputMin, outputMax] = outputRange;
@@ -6788,7 +6795,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
6788
6795
  }
6789
6796
  result = (result - inputMin) / (inputMax - inputMin);
6790
6797
  result = easing(result);
6791
- result = result * (outputMax - outputMin) + outputMin;
6798
+ if (output === "perceptual-scale") {
6799
+ const signedAreaMin = toSignedArea(outputMin);
6800
+ const signedAreaMax = toSignedArea(outputMax);
6801
+ result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
6802
+ } else {
6803
+ result = result * (outputMax - outputMin) + outputMin;
6804
+ }
6792
6805
  return result;
6793
6806
  }
6794
6807
  function findRange(input, inputRange) {
@@ -6801,6 +6814,9 @@ function findRange(input, inputRange) {
6801
6814
  return i - 1;
6802
6815
  }
6803
6816
  var defaultEasing = (num) => num;
6817
+ var resolveOutputOption = (output) => {
6818
+ return output ?? "linear";
6819
+ };
6804
6820
  var shouldExtendRightForEasing = (easing) => {
6805
6821
  return easing.remotionShouldExtendRight === true;
6806
6822
  };
@@ -6822,12 +6838,14 @@ var interpolateSegment = ({
6822
6838
  outputRange,
6823
6839
  easing,
6824
6840
  extrapolateLeft,
6825
- extrapolateRight
6841
+ extrapolateRight,
6842
+ output
6826
6843
  }) => {
6827
6844
  return interpolateFunction(input, inputRange, outputRange, {
6828
6845
  easing,
6829
6846
  extrapolateLeft,
6830
- extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
6847
+ extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
6848
+ output
6831
6849
  });
6832
6850
  };
6833
6851
  var interpolateNumber = ({
@@ -6836,6 +6854,7 @@ var interpolateNumber = ({
6836
6854
  outputRange,
6837
6855
  options
6838
6856
  }) => {
6857
+ const output = resolveOutputOption(options?.output);
6839
6858
  if (inputRange.length === 1) {
6840
6859
  return outputRange[0];
6841
6860
  }
@@ -6860,7 +6879,8 @@ var interpolateNumber = ({
6860
6879
  outputRange: [outputRange[range], outputRange[range + 1]],
6861
6880
  easing,
6862
6881
  extrapolateLeft,
6863
- extrapolateRight
6882
+ extrapolateRight,
6883
+ output
6864
6884
  });
6865
6885
  for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
6866
6886
  const previousEasing = resolveEasingForSegment({
@@ -6880,7 +6900,8 @@ var interpolateNumber = ({
6880
6900
  outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
6881
6901
  easing: previousEasing,
6882
6902
  extrapolateLeft,
6883
- extrapolateRight: "extend"
6903
+ extrapolateRight: "extend",
6904
+ output
6884
6905
  });
6885
6906
  result += continuedSegmentValue - outputRange[segmentIndex + 1];
6886
6907
  }
@@ -6928,14 +6949,18 @@ var interpolateString = ({
6928
6949
  }
6929
6950
  }
6930
6951
  }
6931
- return serializeStringInterpolationValue({
6932
- kind,
6933
- values: [0, 0, 0].map((_, axis) => interpolateNumber({
6952
+ const values = [0, 0, 0];
6953
+ for (let axis = 0;axis < dimensions; axis++) {
6954
+ values[axis] = interpolateNumber({
6934
6955
  input,
6935
6956
  inputRange,
6936
6957
  outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
6937
6958
  options
6938
- })),
6959
+ });
6960
+ }
6961
+ return serializeStringInterpolationValue({
6962
+ kind,
6963
+ values,
6939
6964
  units,
6940
6965
  dimensions
6941
6966
  });
@@ -7019,6 +7044,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
7019
7044
  throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
7020
7045
  }
7021
7046
  }
7047
+ function assertValidInterpolateOutputOption(output) {
7048
+ if (output === undefined || output === "linear" || output === "perceptual-scale") {
7049
+ return;
7050
+ }
7051
+ throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
7052
+ }
7022
7053
  function interpolate(input, inputRange, outputRange, options) {
7023
7054
  if (typeof input === "undefined") {
7024
7055
  throw new Error("input can not be undefined");
@@ -7036,6 +7067,7 @@ function interpolate(input, inputRange, outputRange, options) {
7036
7067
  checkValidInputRange(inputRange);
7037
7068
  assertValidInterpolateEasingOption(options?.easing, inputRange.length);
7038
7069
  assertValidInterpolatePosterizeOption(options?.posterize);
7070
+ assertValidInterpolateOutputOption(options?.output);
7039
7071
  if (typeof input !== "number") {
7040
7072
  throw new TypeError("Cannot interpolate an input which is not a number");
7041
7073
  }
@@ -7980,6 +8012,7 @@ var interpolateKeyframedStatus = ({
7980
8012
  easing: easing.map((e) => easingToFn({ easing: e, forceSpringAllowTail })),
7981
8013
  extrapolateLeft: clamping.left,
7982
8014
  extrapolateRight: clamping.right,
8015
+ output: status.output,
7983
8016
  posterize: status.posterize
7984
8017
  });
7985
8018
  } catch {
@@ -8220,7 +8253,7 @@ var getFlatSchemaWithAllKeys = (schema) => {
8220
8253
  const out = {};
8221
8254
  const addKey = (key, field) => {
8222
8255
  if (key in out) {
8223
- throw new Error(`Duplicate key "${key}" in schema: discriminated union variants must not share keys`);
8256
+ return;
8224
8257
  }
8225
8258
  out[key] = field;
8226
8259
  };
@@ -14099,6 +14132,22 @@ var Img = withInteractivitySchema({
14099
14132
  supportsEffects: true
14100
14133
  });
14101
14134
  addSequenceStackTraces(Img);
14135
+ var sourcePathToIdentityPrefix = (packageName) => {
14136
+ if (packageName === "remotion") {
14137
+ return "dev.remotion.remotion";
14138
+ }
14139
+ if (packageName.startsWith("@remotion/")) {
14140
+ const normalizedPackageName = packageName.slice("@remotion/".length).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
14141
+ return `dev.remotion.${normalizedPackageName}`;
14142
+ }
14143
+ throw new Error(`Unsupported Remotion package name: ${packageName}`);
14144
+ };
14145
+ var makeRemotionComponentIdentity = ({
14146
+ packageName,
14147
+ componentName
14148
+ }) => {
14149
+ return `${sourcePathToIdentityPrefix(packageName)}.${componentName}`;
14150
+ };
14102
14151
  var interactiveElementSchema = {
14103
14152
  ...baseSchema,
14104
14153
  ...transformSchema,
@@ -14112,6 +14161,11 @@ var setRef = (ref, value) => {
14112
14161
  ref.current = value;
14113
14162
  }
14114
14163
  };
14164
+ var withSchema = (options) => {
14165
+ const Wrapped = withInteractivitySchema(options);
14166
+ addSequenceStackTraces(Wrapped);
14167
+ return Wrapped;
14168
+ };
14115
14169
  var makeInteractiveElement = (tag, displayName) => {
14116
14170
  const Inner = forwardRef12((propsWithControls, ref) => {
14117
14171
  const {
@@ -14151,15 +14205,17 @@ var makeInteractiveElement = (tag, displayName) => {
14151
14205
  });
14152
14206
  });
14153
14207
  Inner.displayName = displayName;
14154
- const Wrapped = withInteractivitySchema({
14208
+ const Wrapped = withSchema({
14155
14209
  Component: Inner,
14156
14210
  componentName: displayName,
14157
- componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
14211
+ componentIdentity: makeRemotionComponentIdentity({
14212
+ packageName: "remotion",
14213
+ componentName: displayName.slice(1, -1)
14214
+ }),
14158
14215
  schema: interactiveElementSchema,
14159
14216
  supportsEffects: false
14160
14217
  });
14161
14218
  Wrapped.displayName = displayName;
14162
- addSequenceStackTraces(Wrapped);
14163
14219
  return Wrapped;
14164
14220
  };
14165
14221
  var Interactive = {
@@ -14168,7 +14224,8 @@ var Interactive = {
14168
14224
  textSchema,
14169
14225
  premountSchema,
14170
14226
  sequenceSchema,
14171
- withSchema: withInteractivitySchema,
14227
+ withSchema,
14228
+ _internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
14172
14229
  A: makeInteractiveElement("a", "<Interactive.A>"),
14173
14230
  Article: makeInteractiveElement("article", "<Interactive.Article>"),
14174
14231
  Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
@@ -16651,7 +16708,6 @@ var Arrow = Interactive.withSchema({
16651
16708
  schema: arrowSchema,
16652
16709
  supportsEffects: true
16653
16710
  });
16654
- Internals.addSequenceStackTraces(Arrow);
16655
16711
  var shortenVector = (vector, radius) => {
16656
16712
  const [x, y] = vector;
16657
16713
  const currentLength = Math.sqrt(x * x + y * y);
@@ -17076,7 +17132,6 @@ var Callout = Interactive.withSchema({
17076
17132
  schema: calloutSchema,
17077
17133
  supportsEffects: true
17078
17134
  });
17079
- Internals.addSequenceStackTraces(Callout);
17080
17135
  var makeCircle = ({ radius }) => {
17081
17136
  const instructions = [
17082
17137
  {
@@ -17139,7 +17194,6 @@ var Circle = Interactive.withSchema({
17139
17194
  schema: circleSchema,
17140
17195
  supportsEffects: true
17141
17196
  });
17142
- Internals.addSequenceStackTraces(Circle);
17143
17197
  var makeEllipse = ({ rx, ry }) => {
17144
17198
  const instructions = [
17145
17199
  {
@@ -17197,7 +17251,6 @@ var Ellipse = Interactive.withSchema({
17197
17251
  schema: ellipseSchema,
17198
17252
  supportsEffects: true
17199
17253
  });
17200
- Internals.addSequenceStackTraces(Ellipse);
17201
17254
  var makeHeart = ({
17202
17255
  height,
17203
17256
  aspectRatio = 1.1,
@@ -17336,7 +17389,6 @@ var Heart = Interactive.withSchema({
17336
17389
  schema: heartSchema,
17337
17390
  supportsEffects: true
17338
17391
  });
17339
- Internals.addSequenceStackTraces(Heart);
17340
17392
  var getCoord = ({
17341
17393
  counterClockwise,
17342
17394
  actualProgress,
@@ -17491,7 +17543,6 @@ var Pie = Interactive.withSchema({
17491
17543
  schema: pieSchema,
17492
17544
  supportsEffects: true
17493
17545
  });
17494
- Internals.addSequenceStackTraces(Pie);
17495
17546
  function polygon({
17496
17547
  points,
17497
17548
  radius,
@@ -17591,7 +17642,6 @@ var Polygon = Interactive.withSchema({
17591
17642
  schema: polygonSchema,
17592
17643
  supportsEffects: true
17593
17644
  });
17594
- Internals.addSequenceStackTraces(Polygon);
17595
17645
  var makeRect = ({
17596
17646
  width,
17597
17647
  height,
@@ -17658,7 +17708,6 @@ var Rect = Interactive.withSchema({
17658
17708
  schema: rectSchema,
17659
17709
  supportsEffects: true
17660
17710
  });
17661
- Internals.addSequenceStackTraces(Rect);
17662
17711
  var KAPPA = 0.5522847498307936;
17663
17712
  var CAP_HANDLE = 4 / 3;
17664
17713
  var curve = ({
@@ -17870,7 +17919,6 @@ var Spark = Interactive.withSchema({
17870
17919
  schema: sparkSchema,
17871
17920
  supportsEffects: true
17872
17921
  });
17873
- Internals.addSequenceStackTraces(Spark);
17874
17922
  var star = ({
17875
17923
  centerX,
17876
17924
  centerY,
@@ -17981,7 +18029,6 @@ var Star = Interactive.withSchema({
17981
18029
  schema: starSchema,
17982
18030
  supportsEffects: true
17983
18031
  });
17984
- Internals.addSequenceStackTraces(Star);
17985
18032
  var makeTriangle = ({
17986
18033
  length: length2,
17987
18034
  direction = "right",
@@ -18088,7 +18135,6 @@ var Triangle = Interactive.withSchema({
18088
18135
  schema: triangleSchema,
18089
18136
  supportsEffects: true
18090
18137
  });
18091
- Internals.addSequenceStackTraces(Triangle);
18092
18138
 
18093
18139
  // ../svg-3d-engine/dist/esm/index.mjs
18094
18140
  function truthy2(value) {