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