@remotion/promo-pages 4.0.322 → 4.0.324

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.
@@ -1,8 +1,8 @@
1
1
 
2
2
  
3
- > @remotion/promo-pages@4.0.322 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.324 make /Users/jonathanburger/remotion/packages/promo-pages
4
4
  > bun --env-file=../.env.bundle bundle.ts
5
5
 
6
6
  ≈ tailwindcss v4.1.1
7
7
 
8
- Done in 108ms
8
+ Done in 109ms
package/dist/Homepage.js CHANGED
@@ -735,7 +735,7 @@ var __defProp2, __export2 = (target, all) => {
735
735
  });
736
736
  }, useIsPlayer = () => {
737
737
  return useContext(IsPlayerContext);
738
- }, VERSION = "4.0.322", checkMultipleRemotionVersions = () => {
738
+ }, VERSION = "4.0.324", checkMultipleRemotionVersions = () => {
739
739
  if (typeof globalThis === "undefined") {
740
740
  return;
741
741
  }
@@ -3127,39 +3127,41 @@ Check that all your Remotion packages are on the same version. If your dependenc
3127
3127
  throw new Error("useAmplification must be used within a SharedAudioContext");
3128
3128
  }
3129
3129
  const { audioContext } = sharedAudioContext;
3130
- useLayoutEffect3(() => {
3131
- if (!audioContext) {
3132
- return;
3133
- }
3134
- if (!mediaRef.current) {
3135
- return;
3136
- }
3137
- if (!shouldUseWebAudioApi) {
3138
- return;
3139
- }
3140
- if (mediaRef.current.playbackRate !== 1 && isSafari()) {
3141
- warnSafariOnce(logLevel);
3142
- return;
3143
- }
3144
- if (!source) {
3145
- return;
3146
- }
3147
- const gainNode = new GainNode(audioContext, {
3148
- gain: currentVolumeRef.current
3149
- });
3150
- source.attemptToConnect();
3151
- source.get().connect(gainNode);
3152
- gainNode.connect(audioContext.destination);
3153
- audioStuffRef.current = {
3154
- gainNode
3155
- };
3156
- Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3157
- return () => {
3158
- audioStuffRef.current = null;
3159
- gainNode.disconnect();
3160
- source.get().disconnect();
3161
- };
3162
- }, [logLevel, mediaRef, audioContext, source, shouldUseWebAudioApi]);
3130
+ if (typeof window !== "undefined") {
3131
+ useLayoutEffect3(() => {
3132
+ if (!audioContext) {
3133
+ return;
3134
+ }
3135
+ if (!mediaRef.current) {
3136
+ return;
3137
+ }
3138
+ if (!shouldUseWebAudioApi) {
3139
+ return;
3140
+ }
3141
+ if (mediaRef.current.playbackRate !== 1 && isSafari()) {
3142
+ warnSafariOnce(logLevel);
3143
+ return;
3144
+ }
3145
+ if (!source) {
3146
+ return;
3147
+ }
3148
+ const gainNode = new GainNode(audioContext, {
3149
+ gain: currentVolumeRef.current
3150
+ });
3151
+ source.attemptToConnect();
3152
+ source.get().connect(gainNode);
3153
+ gainNode.connect(audioContext.destination);
3154
+ audioStuffRef.current = {
3155
+ gainNode
3156
+ };
3157
+ Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3158
+ return () => {
3159
+ audioStuffRef.current = null;
3160
+ gainNode.disconnect();
3161
+ source.get().disconnect();
3162
+ };
3163
+ }, [logLevel, mediaRef, audioContext, source, shouldUseWebAudioApi]);
3164
+ }
3163
3165
  if (audioStuffRef.current) {
3164
3166
  const valueToSet = volume;
3165
3167
  if (!isApproximatelyTheSame(audioStuffRef.current.gainNode.gain.value, valueToSet)) {
@@ -3402,17 +3404,19 @@ Check that all your Remotion packages are on the same version. If your dependenc
3402
3404
  });
3403
3405
  }
3404
3406
  }, [blocks]);
3405
- useLayoutEffect4(() => {
3406
- if (blocks.length === 0) {
3407
- onResumeCallbacks.forEach((c) => c());
3408
- playbackLogging({
3409
- logLevel,
3410
- message: "Player is exiting buffer state",
3411
- mountTime,
3412
- tag: "player"
3413
- });
3414
- }
3415
- }, [blocks]);
3407
+ if (typeof window !== "undefined") {
3408
+ useLayoutEffect4(() => {
3409
+ if (blocks.length === 0) {
3410
+ onResumeCallbacks.forEach((c) => c());
3411
+ playbackLogging({
3412
+ logLevel,
3413
+ message: "Player is exiting buffer state",
3414
+ mountTime,
3415
+ tag: "player"
3416
+ });
3417
+ }
3418
+ }, [blocks]);
3419
+ }
3416
3420
  return useMemo16(() => {
3417
3421
  return { addBlock, listenForBuffering, listenForResume, buffering };
3418
3422
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
@@ -8076,7 +8080,7 @@ var Counter = ({
8076
8080
  children: [
8077
8081
  /* @__PURE__ */ jsx("button", {
8078
8082
  type: "button",
8079
- className: "border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text",
8083
+ className: "border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text border-b-[var(--box-stroke)] border-l-[var(--box-stroke)]",
8080
8084
  style: {
8081
8085
  ...buttonContainer
8082
8086
  },
@@ -8087,7 +8091,7 @@ var Counter = ({
8087
8091
  }),
8088
8092
  /* @__PURE__ */ jsx("button", {
8089
8093
  type: "button",
8090
- className: "border-0 border-l-2 border-l-solid flex-1 border-text",
8094
+ className: "border-0 border-l-2 border-l-solid flex-1 border-text border-l-[var(--box-stroke)]",
8091
8095
  style: {
8092
8096
  ...buttonContainer
8093
8097
  },
@@ -12537,14 +12541,23 @@ var calculateOuterStyle = ({
12537
12541
  };
12538
12542
  var calculateContainerStyle = ({
12539
12543
  config,
12540
- canvasSize,
12541
12544
  layout,
12542
12545
  scale,
12543
12546
  overflowVisible
12544
12547
  }) => {
12545
- if (!config || !canvasSize || !layout) {
12548
+ if (!config) {
12546
12549
  return {};
12547
12550
  }
12551
+ if (!layout) {
12552
+ return {
12553
+ position: "absolute",
12554
+ width: config.width,
12555
+ height: config.height,
12556
+ display: "flex",
12557
+ transform: `scale(${scale})`,
12558
+ overflow: overflowVisible ? "visible" : "hidden"
12559
+ };
12560
+ }
12548
12561
  return {
12549
12562
  position: "absolute",
12550
12563
  width: config.width,
@@ -12562,9 +12575,19 @@ var calculateOuter = ({
12562
12575
  config,
12563
12576
  overflowVisible
12564
12577
  }) => {
12565
- if (!layout || !config) {
12578
+ if (!config) {
12566
12579
  return {};
12567
12580
  }
12581
+ if (!layout) {
12582
+ return {
12583
+ width: config.width * scale,
12584
+ height: config.height * scale,
12585
+ display: "flex",
12586
+ flexDirection: "column",
12587
+ position: "absolute",
12588
+ overflow: overflowVisible ? "visible" : "hidden"
12589
+ };
12590
+ }
12568
12591
  const { centerX, centerY } = layout;
12569
12592
  return {
12570
12593
  width: config.width * scale,
@@ -13255,8 +13278,8 @@ var useElementSize = (ref, options) => {
13255
13278
  setSize(null);
13256
13279
  return;
13257
13280
  }
13258
- const probableCssParentScale = contentRect.width === 0 || contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
13259
- const width = options.shouldApplyCssTransforms ? newSize[0].width : newSize[0].width * (1 / probableCssParentScale);
13281
+ const probableCssParentScale = contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
13282
+ const width = options.shouldApplyCssTransforms && probableCssParentScale > 0 ? newSize[0].width : newSize[0].width * (1 / probableCssParentScale);
13260
13283
  const height = options.shouldApplyCssTransforms ? newSize[0].height : newSize[0].height * (1 / probableCssParentScale);
13261
13284
  setSize((prevState) => {
13262
13285
  const isSame = prevState && prevState.width === width && prevState.height === height && prevState.left === newSize[0].x && prevState.top === newSize[0].y && prevState.windowSize.height === window.innerHeight && prevState.windowSize.width === window.innerWidth;
@@ -14751,13 +14774,12 @@ var PlayerUI = ({
14751
14774
  }, [config, layout, overflowVisible, scale]);
14752
14775
  const containerStyle3 = useMemo122(() => {
14753
14776
  return calculateContainerStyle({
14754
- canvasSize,
14755
14777
  config,
14756
14778
  layout,
14757
14779
  scale,
14758
14780
  overflowVisible
14759
14781
  });
14760
- }, [canvasSize, config, layout, overflowVisible, scale]);
14782
+ }, [config, layout, overflowVisible, scale]);
14761
14783
  const playerPause = player.pause;
14762
14784
  const playerDispatchError = player.emitter.dispatchError;
14763
14785
  const onError = useCallback112((error) => {
@@ -15450,13 +15472,12 @@ var ThumbnailUI = ({
15450
15472
  }, [config, layout, overflowVisible, scale]);
15451
15473
  const containerStyle3 = useMemo162(() => {
15452
15474
  return calculateContainerStyle({
15453
- canvasSize,
15454
15475
  config,
15455
15476
  layout,
15456
15477
  scale,
15457
15478
  overflowVisible
15458
15479
  });
15459
- }, [canvasSize, config, layout, overflowVisible, scale]);
15480
+ }, [config, layout, overflowVisible, scale]);
15460
15481
  const onError = useCallback132((error) => {
15461
15482
  thumbnail.emitter.dispatchError(error);
15462
15483
  }, [thumbnail.emitter]);
@@ -1435,7 +1435,7 @@ var Counter = ({
1435
1435
  children: [
1436
1436
  /* @__PURE__ */ jsx("button", {
1437
1437
  type: "button",
1438
- className: "border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text",
1438
+ className: "border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text border-b-[var(--box-stroke)] border-l-[var(--box-stroke)]",
1439
1439
  style: {
1440
1440
  ...buttonContainer
1441
1441
  },
@@ -1446,7 +1446,7 @@ var Counter = ({
1446
1446
  }),
1447
1447
  /* @__PURE__ */ jsx("button", {
1448
1448
  type: "button",
1449
- className: "border-0 border-l-2 border-l-solid flex-1 border-text",
1449
+ className: "border-0 border-l-2 border-l-solid flex-1 border-text border-l-[var(--box-stroke)]",
1450
1450
  style: {
1451
1451
  ...buttonContainer
1452
1452
  },
package/dist/tailwind.css CHANGED
@@ -523,9 +523,15 @@
523
523
  .border-r-transparent {
524
524
  border-right-color: transparent;
525
525
  }
526
+ .border-b-\[var\(--box-stroke\)\] {
527
+ border-bottom-color: var(--box-stroke);
528
+ }
526
529
  .border-b-transparent {
527
530
  border-bottom-color: transparent;
528
531
  }
532
+ .border-l-\[var\(--box-stroke\)\] {
533
+ border-left-color: var(--box-stroke);
534
+ }
529
535
  .border-l-transparent {
530
536
  border-left-color: transparent;
531
537
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.322",
3
+ "version": "4.0.324",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,14 +10,14 @@
10
10
  "polished": "4.3.1",
11
11
  "zod": "3.22.3",
12
12
  "bun-plugin-tailwind": "0.0.15",
13
- "@remotion/animated-emoji": "4.0.322",
14
- "@remotion/lambda": "4.0.322",
15
- "@remotion/lottie": "4.0.322",
16
- "@remotion/paths": "4.0.322",
17
- "@remotion/player": "4.0.322",
18
- "@remotion/shapes": "4.0.322",
19
- "remotion": "4.0.322",
20
- "create-video": "4.0.322"
13
+ "@remotion/animated-emoji": "4.0.324",
14
+ "@remotion/lottie": "4.0.324",
15
+ "@remotion/shapes": "4.0.324",
16
+ "@remotion/player": "4.0.324",
17
+ "create-video": "4.0.324",
18
+ "remotion": "4.0.324",
19
+ "@remotion/lambda": "4.0.324",
20
+ "@remotion/paths": "4.0.324"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@eslint/eslintrc": "3.1.0",
@@ -34,7 +34,7 @@
34
34
  "tailwind-merge": "2.5.2",
35
35
  "bun-plugin-tailwind": "0.0.13",
36
36
  "clsx": "2.1.1",
37
- "@remotion/eslint-config-internal": "4.0.322"
37
+ "@remotion/eslint-config-internal": "4.0.324"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"
@@ -83,7 +83,7 @@ export const Counter: React.FC<CounterProps> = ({
83
83
 
84
84
  const inputValue = parseInt(e.target.value, 10);
85
85
  const validValue = Math.max(inputValue, minCount);
86
-
86
+
87
87
  // For steps > 1, round to the nearest valid step
88
88
  if (step > 1) {
89
89
  const roundedValue = Math.round(validValue / step) * step;
@@ -96,7 +96,7 @@ export const Counter: React.FC<CounterProps> = ({
96
96
  <div className="flex flex-col ml-3 h-full">
97
97
  <button
98
98
  type="button"
99
- className="border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text"
99
+ className="border-0 border-l-2 border-l-solid border-b-2 flex-1 border-text border-b-[var(--box-stroke)] border-l-[var(--box-stroke)]"
100
100
  style={{
101
101
  ...buttonContainer,
102
102
  }}
@@ -106,7 +106,7 @@ export const Counter: React.FC<CounterProps> = ({
106
106
  </button>
107
107
  <button
108
108
  type="button"
109
- className="border-0 border-l-2 border-l-solid flex-1 border-text"
109
+ className="border-0 border-l-2 border-l-solid flex-1 border-text border-l-[var(--box-stroke)]"
110
110
  style={{
111
111
  ...buttonContainer,
112
112
  }}