@remotion/mac-cursors 4.0.527 → 4.0.529
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/MacOSCursor.d.ts +2 -2
- package/dist/esm/index.mjs +73 -33
- package/package.json +3 -3
package/dist/MacOSCursor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { InteractiveBaseProps, InteractivitySchema } from 'remotion';
|
|
4
|
-
export type MacOSCursorProps = InteractiveBaseProps & {
|
|
3
|
+
import type { InteractiveBaseProps, InteractivePremountProps, InteractivitySchema } from 'remotion';
|
|
4
|
+
export type MacOSCursorProps = InteractiveBaseProps & InteractivePremountProps & {
|
|
5
5
|
readonly cursor?: string;
|
|
6
6
|
readonly customCursor?: string;
|
|
7
7
|
readonly className?: string;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// src/MacOSCursor.tsx
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Freeze,
|
|
5
|
+
Sequence,
|
|
6
|
+
Interactive,
|
|
7
|
+
Internals,
|
|
8
|
+
useCurrentScale
|
|
9
|
+
} from "remotion";
|
|
4
10
|
|
|
5
11
|
// src/cursor-assets.ts
|
|
6
12
|
var cursorAssets = {
|
|
@@ -215,6 +221,7 @@ var resolveCursor = (cursor) => {
|
|
|
215
221
|
import { jsx } from "react/jsx-runtime";
|
|
216
222
|
var macOSCursorSchema = {
|
|
217
223
|
...Interactive.baseSchema,
|
|
224
|
+
...Interactive.premountSchema,
|
|
218
225
|
cursor: {
|
|
219
226
|
type: "enum",
|
|
220
227
|
default: "default",
|
|
@@ -240,7 +247,12 @@ var MacOSCursorInner = ({
|
|
|
240
247
|
style,
|
|
241
248
|
durationInFrames,
|
|
242
249
|
from,
|
|
250
|
+
premountFor,
|
|
251
|
+
postmountFor,
|
|
252
|
+
styleWhilePremounted,
|
|
253
|
+
styleWhilePostmounted,
|
|
243
254
|
trimBefore,
|
|
255
|
+
playbackRate,
|
|
244
256
|
freeze,
|
|
245
257
|
hidden,
|
|
246
258
|
name,
|
|
@@ -251,42 +263,70 @@ var MacOSCursorInner = ({
|
|
|
251
263
|
const refForOutline = React.useRef(null);
|
|
252
264
|
const width = resolved?.width ?? undefined;
|
|
253
265
|
const height = resolved?.height ?? undefined;
|
|
254
|
-
|
|
255
|
-
|
|
266
|
+
const currentScale = useCurrentScale({ dontThrowIfOutsideOfRemotion: true });
|
|
267
|
+
const {
|
|
268
|
+
effectivePremountFor,
|
|
269
|
+
effectivePostmountFor,
|
|
270
|
+
freezeFrame,
|
|
271
|
+
isPremountingOrPostmounting,
|
|
272
|
+
premountingActive,
|
|
273
|
+
postmountingActive,
|
|
274
|
+
premountingStyle
|
|
275
|
+
} = Internals.usePremounting({
|
|
256
276
|
from: from ?? 0,
|
|
257
|
-
trimBefore,
|
|
258
277
|
durationInFrames: durationInFrames ?? Infinity,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
278
|
+
premountFor: premountFor ?? null,
|
|
279
|
+
postmountFor: postmountFor ?? null,
|
|
280
|
+
style: style ?? null,
|
|
281
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
282
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
283
|
+
hideWhilePremounted: "opacity"
|
|
284
|
+
});
|
|
285
|
+
return /* @__PURE__ */ jsx(Freeze, {
|
|
286
|
+
frame: freezeFrame,
|
|
287
|
+
active: isPremountingOrPostmounting,
|
|
288
|
+
children: /* @__PURE__ */ jsx(Sequence, {
|
|
289
|
+
layout: "none",
|
|
290
|
+
from: from ?? 0,
|
|
291
|
+
trimBefore,
|
|
292
|
+
playbackRate,
|
|
293
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
294
|
+
freeze,
|
|
295
|
+
hidden,
|
|
296
|
+
name: name ?? "<MacOSCursor>",
|
|
297
|
+
showInTimeline: showInTimeline ?? true,
|
|
298
|
+
controls,
|
|
299
|
+
outlineRef: refForOutline,
|
|
300
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
301
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
302
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
303
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
304
|
+
children: resolved ? /* @__PURE__ */ jsx("svg", {
|
|
305
|
+
ref: refForOutline,
|
|
306
|
+
className,
|
|
285
307
|
width,
|
|
286
308
|
height,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
309
|
+
viewBox: width && height ? `0 0 ${width} ${height}` : undefined,
|
|
310
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
311
|
+
style: {
|
|
312
|
+
display: "block",
|
|
313
|
+
position: "absolute",
|
|
314
|
+
width,
|
|
315
|
+
height,
|
|
316
|
+
overflow: "visible",
|
|
317
|
+
marginLeft: -resolved.hotspot.x,
|
|
318
|
+
marginTop: -resolved.hotspot.y,
|
|
319
|
+
transformOrigin: `${resolved.hotspot.x}px ${resolved.hotspot.y}px`,
|
|
320
|
+
...premountingStyle
|
|
321
|
+
},
|
|
322
|
+
children: /* @__PURE__ */ jsx("image", {
|
|
323
|
+
href: resolved.src,
|
|
324
|
+
width,
|
|
325
|
+
height,
|
|
326
|
+
preserveAspectRatio: "xMinYMin meet"
|
|
327
|
+
}, cursor === "custom" ? currentScale : undefined)
|
|
328
|
+
}) : null
|
|
329
|
+
})
|
|
290
330
|
});
|
|
291
331
|
};
|
|
292
332
|
var MacOSCursor = Interactive.withSchema({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/mac-cursors",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.529",
|
|
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.
|
|
27
|
+
"remotion": "4.0.529"
|
|
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.
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.529",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
47
47
|
},
|