@remotion/mac-cursors 4.0.528 → 4.0.530

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 (2) hide show
  1. package/dist/esm/index.mjs +16 -7
  2. package/package.json +3 -3
@@ -1,6 +1,11 @@
1
1
  // src/MacOSCursor.tsx
2
- import React from "react";
3
- import { Freeze, Sequence, Interactive, Internals } from "remotion";
2
+ import {
3
+ Freeze,
4
+ Sequence,
5
+ Interactive,
6
+ Internals,
7
+ useCurrentScale
8
+ } from "remotion";
4
9
 
5
10
  // src/cursor-assets.ts
6
11
  var cursorAssets = {
@@ -247,6 +252,7 @@ var MacOSCursorInner = ({
247
252
  styleWhilePostmounted,
248
253
  trimBefore,
249
254
  playbackRate,
255
+ loop,
250
256
  freeze,
251
257
  hidden,
252
258
  name,
@@ -254,9 +260,9 @@ var MacOSCursorInner = ({
254
260
  controls
255
261
  }) => {
256
262
  const resolved = cursor === "custom" ? customCursor ? resolveCursor(customCursor) : null : resolveCursor(cursor);
257
- const refForOutline = React.useRef(null);
258
263
  const width = resolved?.width ?? undefined;
259
264
  const height = resolved?.height ?? undefined;
265
+ const currentScale = useCurrentScale({ dontThrowIfOutsideOfRemotion: true });
260
266
  const {
261
267
  effectivePremountFor,
262
268
  effectivePostmountFor,
@@ -267,7 +273,11 @@ var MacOSCursorInner = ({
267
273
  premountingStyle
268
274
  } = Internals.usePremounting({
269
275
  from: from ?? 0,
270
- durationInFrames: durationInFrames ?? Infinity,
276
+ durationInFrames: Internals.resolveSequenceDuration({
277
+ durationInFrames,
278
+ playbackRate,
279
+ loop
280
+ }),
271
281
  premountFor: premountFor ?? null,
272
282
  postmountFor: postmountFor ?? null,
273
283
  style: style ?? null,
@@ -283,19 +293,18 @@ var MacOSCursorInner = ({
283
293
  from: from ?? 0,
284
294
  trimBefore,
285
295
  playbackRate,
296
+ loop,
286
297
  durationInFrames: durationInFrames ?? Infinity,
287
298
  freeze,
288
299
  hidden,
289
300
  name: name ?? "<MacOSCursor>",
290
301
  showInTimeline: showInTimeline ?? true,
291
302
  controls,
292
- outlineRef: refForOutline,
293
303
  _remotionInternalPremountDisplay: effectivePremountFor || null,
294
304
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
295
305
  _remotionInternalIsPremounting: premountingActive,
296
306
  _remotionInternalIsPostmounting: postmountingActive,
297
307
  children: resolved ? /* @__PURE__ */ jsx("svg", {
298
- ref: refForOutline,
299
308
  className,
300
309
  width,
301
310
  height,
@@ -317,7 +326,7 @@ var MacOSCursorInner = ({
317
326
  width,
318
327
  height,
319
328
  preserveAspectRatio: "xMinYMin meet"
320
- })
329
+ }, cursor === "custom" ? currentScale : undefined)
321
330
  }) : null
322
331
  })
323
332
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/mac-cursors",
3
- "version": "4.0.528",
3
+ "version": "4.0.530",
4
4
  "description": "macOS cursor components for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "url": "https://github.com/remotion-dev/remotion/issues"
25
25
  },
26
26
  "dependencies": {
27
- "remotion": "4.0.528"
27
+ "remotion": "4.0.530"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.8.0",
@@ -41,7 +41,7 @@
41
41
  "devDependencies": {
42
42
  "react": "19.2.3",
43
43
  "react-dom": "19.2.3",
44
- "@remotion/eslint-config-internal": "4.0.528",
44
+ "@remotion/eslint-config-internal": "4.0.530",
45
45
  "eslint": "9.19.0",
46
46
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
47
47
  },