rocket-cursor-component 2.1.1 → 2.2.0

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/index.cjs ADDED
@@ -0,0 +1,452 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ CursorFollower: () => cursorFollower_default,
24
+ RocketCursor: () => rocket_Cursor_default,
25
+ default: () => rocket_Cursor_default
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+
29
+ // src/rocket.Cursor.tsx
30
+ var import_react2 = require("react");
31
+
32
+ // src/cursorFollower.tsx
33
+ var import_react = require("react");
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ var getMediaQueryMatch = (query) => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false;
36
+ var subscribeToMediaQuery = (mediaQueryList, listener) => {
37
+ if (typeof mediaQueryList.addEventListener === "function") {
38
+ mediaQueryList.addEventListener("change", listener);
39
+ return () => mediaQueryList.removeEventListener("change", listener);
40
+ }
41
+ mediaQueryList.addListener(listener);
42
+ return () => mediaQueryList.removeListener(listener);
43
+ };
44
+ var useMediaQueryMatch = (query) => {
45
+ const [matches, setMatches] = (0, import_react.useState)(() => getMediaQueryMatch(query));
46
+ (0, import_react.useEffect)(() => {
47
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
48
+ return;
49
+ }
50
+ const mediaQueryList = window.matchMedia(query);
51
+ const updateMatch = () => {
52
+ setMatches(mediaQueryList.matches);
53
+ };
54
+ updateMatch();
55
+ return subscribeToMediaQuery(mediaQueryList, updateMatch);
56
+ }, [query]);
57
+ return matches;
58
+ };
59
+ var rotatePoint = (x, y, angleInDegrees) => {
60
+ const angleInRadians = angleInDegrees * (Math.PI / 180);
61
+ const cos = Math.cos(angleInRadians);
62
+ const sin = Math.sin(angleInRadians);
63
+ return {
64
+ x: x * cos - y * sin,
65
+ y: x * sin + y * cos
66
+ };
67
+ };
68
+ var resolveClassName = (className, wrapperClassName) => [className, wrapperClassName].filter(Boolean).join(" ") || void 0;
69
+ var CursorFollower = ({
70
+ anchorOffset = { x: 0, y: 0 },
71
+ children,
72
+ className,
73
+ disabled = false,
74
+ disableOnCoarsePointer = true,
75
+ excludeSelector = ".no-rocket-cursor",
76
+ followSpeed = 0.18,
77
+ height = 48,
78
+ hideCursor = false,
79
+ isVisible = true,
80
+ movingTimeout = 300,
81
+ respectReducedMotion = true,
82
+ rotateWithMovement = true,
83
+ rotationOffset = 0,
84
+ threshold = 10,
85
+ width = 48,
86
+ wrapperProps,
87
+ zIndex = 9999
88
+ }) => {
89
+ const wrapperRef = (0, import_react.useRef)(null);
90
+ const contentRef = (0, import_react.useRef)(null);
91
+ const target = (0, import_react.useRef)({
92
+ x: typeof window !== "undefined" ? window.innerWidth / 2 : 0,
93
+ y: typeof window !== "undefined" ? window.innerHeight / 2 : 0
94
+ });
95
+ const current = (0, import_react.useRef)({ ...target.current });
96
+ const angleRef = (0, import_react.useRef)(0);
97
+ const lastSignificantPosition = (0, import_react.useRef)({ ...target.current });
98
+ const rafRef = (0, import_react.useRef)(null);
99
+ const hideTimeoutRef = (0, import_react.useRef)(null);
100
+ const isMovingRef = (0, import_react.useRef)(false);
101
+ const [isMoving, setIsMoving] = (0, import_react.useState)(false);
102
+ const prefersReducedMotion = useMediaQueryMatch("(prefers-reduced-motion: reduce)");
103
+ const hasCoarsePointer = useMediaQueryMatch("(pointer: coarse)");
104
+ const isInteractionDisabled = disabled || disableOnCoarsePointer && hasCoarsePointer || respectReducedMotion && prefersReducedMotion;
105
+ const [visible, setVisible] = (0, import_react.useState)(isVisible && !isInteractionDisabled);
106
+ (0, import_react.useEffect)(() => {
107
+ setVisible(isVisible && !isInteractionDisabled);
108
+ }, [isInteractionDisabled, isVisible]);
109
+ (0, import_react.useEffect)(() => {
110
+ if (!hideCursor || isInteractionDisabled) {
111
+ return;
112
+ }
113
+ const previousCursor = document.body.style.cursor;
114
+ document.body.style.cursor = "none";
115
+ return () => {
116
+ document.body.style.cursor = previousCursor;
117
+ };
118
+ }, [hideCursor, isInteractionDisabled]);
119
+ const stopMoving = (0, import_react.useCallback)(() => {
120
+ if (!isMovingRef.current) {
121
+ return;
122
+ }
123
+ isMovingRef.current = false;
124
+ setIsMoving(false);
125
+ }, []);
126
+ const handleMouseMove = (0, import_react.useCallback)(
127
+ (event) => {
128
+ const targetElement = event.target instanceof Element ? event.target : null;
129
+ const exclude = excludeSelector ? targetElement?.closest(excludeSelector) : null;
130
+ const shouldShow = !exclude && isVisible && !isInteractionDisabled;
131
+ setVisible(
132
+ (currentVisible) => currentVisible === shouldShow ? currentVisible : shouldShow
133
+ );
134
+ if (!shouldShow) {
135
+ stopMoving();
136
+ return;
137
+ }
138
+ target.current.x = event.clientX;
139
+ target.current.y = event.clientY;
140
+ const dx = target.current.x - lastSignificantPosition.current.x;
141
+ const dy = target.current.y - lastSignificantPosition.current.y;
142
+ const distance = Math.hypot(dx, dy);
143
+ if (distance > threshold) {
144
+ angleRef.current = Math.atan2(dy, dx) * (180 / Math.PI);
145
+ lastSignificantPosition.current = {
146
+ x: target.current.x,
147
+ y: target.current.y
148
+ };
149
+ }
150
+ if (!isMovingRef.current) {
151
+ isMovingRef.current = true;
152
+ setIsMoving(true);
153
+ }
154
+ if (hideTimeoutRef.current) {
155
+ window.clearTimeout(hideTimeoutRef.current);
156
+ }
157
+ hideTimeoutRef.current = window.setTimeout(stopMoving, movingTimeout);
158
+ },
159
+ [excludeSelector, isInteractionDisabled, isVisible, movingTimeout, stopMoving, threshold]
160
+ );
161
+ const handleMouseOut = (0, import_react.useCallback)(
162
+ (event) => {
163
+ const relatedTarget = event.relatedTarget instanceof Element ? event.relatedTarget : null;
164
+ if (!relatedTarget || relatedTarget.nodeName === "HTML") {
165
+ setVisible(false);
166
+ stopMoving();
167
+ }
168
+ },
169
+ [stopMoving]
170
+ );
171
+ const handleVisibilityChange = (0, import_react.useCallback)(() => {
172
+ if (document.visibilityState === "visible") {
173
+ setVisible(isVisible && !isInteractionDisabled);
174
+ return;
175
+ }
176
+ setVisible(false);
177
+ stopMoving();
178
+ }, [isInteractionDisabled, isVisible, stopMoving]);
179
+ (0, import_react.useEffect)(() => {
180
+ if (isInteractionDisabled) {
181
+ setVisible(false);
182
+ stopMoving();
183
+ return;
184
+ }
185
+ window.addEventListener("mousemove", handleMouseMove, { passive: true });
186
+ document.addEventListener("mouseout", handleMouseOut);
187
+ document.addEventListener("visibilitychange", handleVisibilityChange);
188
+ const step = () => {
189
+ const lerp = Math.min(Math.max(followSpeed, 0), 1);
190
+ const dx = target.current.x - current.current.x;
191
+ const dy = target.current.y - current.current.y;
192
+ const distanceToTarget = Math.hypot(dx, dy);
193
+ if (distanceToTarget < 0.5) {
194
+ current.current.x = target.current.x;
195
+ current.current.y = target.current.y;
196
+ } else {
197
+ current.current.x += dx * lerp;
198
+ current.current.y += dy * lerp;
199
+ }
200
+ const totalAngle = (rotateWithMovement ? angleRef.current : 0) + rotationOffset;
201
+ const rotatedAnchorOffset = rotatePoint(
202
+ anchorOffset.x,
203
+ anchorOffset.y,
204
+ totalAngle
205
+ );
206
+ const wrapper = wrapperRef.current;
207
+ const content = contentRef.current;
208
+ if (wrapper) {
209
+ wrapper.style.transform = `translate3d(${current.current.x - rotatedAnchorOffset.x}px, ${current.current.y - rotatedAnchorOffset.y}px, 0) translate(-50%, -50%)`;
210
+ }
211
+ if (content) {
212
+ content.style.transform = `rotate(${totalAngle}deg)`;
213
+ }
214
+ rafRef.current = requestAnimationFrame(step);
215
+ };
216
+ rafRef.current = requestAnimationFrame(step);
217
+ return () => {
218
+ window.removeEventListener("mousemove", handleMouseMove);
219
+ document.removeEventListener("mouseout", handleMouseOut);
220
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
221
+ if (rafRef.current) {
222
+ cancelAnimationFrame(rafRef.current);
223
+ }
224
+ if (hideTimeoutRef.current) {
225
+ window.clearTimeout(hideTimeoutRef.current);
226
+ }
227
+ };
228
+ }, [
229
+ anchorOffset.x,
230
+ anchorOffset.y,
231
+ followSpeed,
232
+ handleMouseMove,
233
+ handleMouseOut,
234
+ handleVisibilityChange,
235
+ isInteractionDisabled,
236
+ rotateWithMovement,
237
+ rotationOffset,
238
+ stopMoving
239
+ ]);
240
+ const wrapperStyle = (0, import_react.useMemo)(
241
+ () => ({
242
+ display: visible ? "block" : "none",
243
+ height: `${height}px`,
244
+ left: 0,
245
+ pointerEvents: "none",
246
+ position: "fixed",
247
+ top: 0,
248
+ width: `${width}px`,
249
+ willChange: "transform",
250
+ zIndex
251
+ }),
252
+ [height, visible, width, zIndex]
253
+ );
254
+ const contentStyle = (0, import_react.useMemo)(
255
+ () => ({
256
+ display: "block",
257
+ height: "100%",
258
+ transformOrigin: "center center",
259
+ width: "100%",
260
+ willChange: "transform"
261
+ }),
262
+ []
263
+ );
264
+ if (!visible) {
265
+ return null;
266
+ }
267
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
268
+ "div",
269
+ {
270
+ "aria-hidden": "true",
271
+ ...wrapperProps,
272
+ className: resolveClassName(className, wrapperProps?.className),
273
+ ref: wrapperRef,
274
+ style: wrapperStyle,
275
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: contentRef, style: contentStyle, children: typeof children === "function" ? children({ isMoving, visible }) : children })
276
+ }
277
+ );
278
+ };
279
+ var cursorFollower_default = CursorFollower;
280
+
281
+ // src/rocket.Cursor.tsx
282
+ var import_jsx_runtime2 = require("react/jsx-runtime");
283
+ var FlameSvg = ({ gradientId }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { transform: "translate(1.2245, 350.449) rotate(45) scale(0.5, -0.5)", children: [
284
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
285
+ "linearGradient",
286
+ {
287
+ id: gradientId,
288
+ gradientUnits: "userSpaceOnUse",
289
+ x1: "94.141",
290
+ y1: "255",
291
+ x2: "94.141",
292
+ y2: "0.188",
293
+ children: [
294
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "0", stopColor: "#ff4c0d" }),
295
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "1", stopColor: "#fc9502" })
296
+ ]
297
+ }
298
+ ) }),
299
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
300
+ "path",
301
+ {
302
+ d: "M187.899,164.809 C185.803,214.868 144.574,254.812 94.000,254.812 C42.085,254.812 -0.000,211.312 -0.000,160.812 C-0.000,154.062 -0.121,140.572 10.000,117.812 C16.057,104.191 19.856,95.634 22.000,87.812 C23.178,83.513 25.469,76.683 32.000,87.812 C35.851,94.374 36.000,103.812 36.000,103.812 C36.000,103.812 50.328,92.817 60.000,71.812 C74.179,41.019 62.866,22.612 59.000,9.812 C57.662,5.384 56.822,-2.574 66.000,0.812 C75.352,4.263 100.076,21.570 113.000,39.812 C131.445,65.847 138.000,90.812 138.000,90.812 C138.000,90.812 143.906,83.482 146.000,75.812 C148.365,67.151 148.400,58.573 155.999,67.813 C163.226,76.600 173.959,93.113 180.000,108.812 C190.969,137.321 187.899,164.809 187.899,164.809 Z",
303
+ fill: `url(#${gradientId})`,
304
+ fillRule: "evenodd"
305
+ }
306
+ ),
307
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
308
+ "path",
309
+ {
310
+ d: "M94.000,254.812 C58.101,254.812 29.000,225.711 29.000,189.812 C29.000,168.151 37.729,155.000 55.896,137.166 C67.528,125.747 78.415,111.722 83.042,102.172 C83.953,100.292 86.026,90.495 94.019,101.966 C98.212,107.982 104.785,118.681 109.000,127.812 C116.266,143.555 118.000,158.812 118.000,158.812 C118.000,158.812 125.121,154.616 130.000,143.812 C131.573,140.330 134.753,127.148 143.643,140.328 C150.166,150.000 159.127,167.390 159.000,189.812 C159.000,225.711 129.898,254.812 94.000,254.812 Z",
311
+ fill: "#fc9502",
312
+ fillRule: "evenodd"
313
+ }
314
+ ),
315
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
316
+ "path",
317
+ {
318
+ d: "M95.000,183.812 C104.250,183.812 104.250,200.941 116.000,223.812 C123.824,239.041 112.121,254.812 95.000,254.812 C77.879,254.812 69.000,240.933 69.000,223.812 C69.000,206.692 85.750,183.812 95.000,183.812 Z",
319
+ fill: "#fce202",
320
+ fillRule: "evenodd"
321
+ }
322
+ )
323
+ ] });
324
+ var RocketSvg = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { transform: "translate(0, 0)", children: [
325
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
326
+ "path",
327
+ {
328
+ style: { fill: "#FF7124" },
329
+ d: "M399.76,16.699c10.12,37.84,8.67,78.13-4.34,115.28h-0.01L284.48,21.049v-0.01 C321.63,8.029,361.92,6.579,399.76,16.699z"
330
+ }
331
+ ),
332
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
333
+ "path",
334
+ {
335
+ style: { fill: "#F2D59F" },
336
+ d: "M90.21,207.929l87.14-101.42h0.01l33.71-39.24c21.43-21.43,46.6-36.84,73.41-46.23v0.01 l110.93,110.93h0.01c-9.39,26.81-24.8,51.98-46.23,73.41l-39.24,33.71l-101.43,87.14l-29.57-29.57l-29.58-29.58l-29.58-29.58 L90.21,207.929z M296.11,193.399c20.18-20.17,20.18-52.89,0-73.06c-20.17-20.18-52.89-20.18-73.06,0 c-20.18,20.17-20.18,52.89,0,73.06C243.22,213.579,275.94,213.579,296.11,193.399z"
337
+ }
338
+ ),
339
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
340
+ "path",
341
+ {
342
+ style: { fill: "#F2D59F" },
343
+ d: "M309.95,239.099c1.74,45.6-14.8,91.78-49.61,126.59c-10.69,10.68-22.44,19.65-34.93,26.89 l-16.89-66.34L309.95,239.099z"
344
+ }
345
+ ),
346
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
347
+ "path",
348
+ {
349
+ style: { fill: "#8ECAC1" },
350
+ d: "M296.11,120.339c20.18,20.17,20.18,52.89,0,73.06c-20.17,20.18-52.89,20.18-73.06,0 c-20.18-20.17-20.18-52.89,0-73.06C243.22,100.159,275.94,100.159,296.11,120.339z"
351
+ }
352
+ ),
353
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
354
+ "path",
355
+ {
356
+ style: { fill: "#E6B263" },
357
+ d: "M208.52,326.239l-39.94,14.71c-10.98,4.05-23.31,1.34-31.58-6.94l-6.85-6.85l48.8-30.49 L208.52,326.239z"
358
+ }
359
+ ),
360
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
361
+ "polygon",
362
+ {
363
+ style: { fill: "#E6B263" },
364
+ points: "178.95,296.669 130.15,327.159 130.14,327.159 109.72,306.739 149.37,267.089"
365
+ }
366
+ ),
367
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
368
+ "path",
369
+ {
370
+ style: { fill: "#F2D59F" },
371
+ d: "M177.35,106.509l-87.14,101.42l-66.33-16.88c7.24-12.49,16.21-24.24,26.89-34.93 C85.58,121.309,131.74,104.769,177.35,106.509z"
372
+ }
373
+ ),
374
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
375
+ "polygon",
376
+ {
377
+ style: { fill: "#E6B263" },
378
+ points: "149.37,267.089 109.72,306.739 89.3,286.309 119.79,237.509"
379
+ }
380
+ ),
381
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
382
+ "path",
383
+ {
384
+ style: { fill: "#E6B263" },
385
+ d: "M119.79,237.509l-30.49,48.8l-6.86-6.85c-8.27-8.28-10.98-20.6-6.94-31.58l14.71-39.95 L119.79,237.509z"
386
+ }
387
+ )
388
+ ] });
389
+ var RocketCursor = ({
390
+ className,
391
+ disabled = false,
392
+ disableOnCoarsePointer = true,
393
+ excludeSelector = ".no-rocket-cursor",
394
+ respectReducedMotion = true,
395
+ flameHideTimeout = 300,
396
+ size = 50,
397
+ isVisible = true,
398
+ hideCursor = false,
399
+ followSpeed = 0.18,
400
+ threshold = 10,
401
+ zIndex = 9999
402
+ }) => {
403
+ const gradientId = (0, import_react2.useId)();
404
+ const svgStyle = {
405
+ display: "block",
406
+ height: "100%",
407
+ width: "100%"
408
+ };
409
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
410
+ cursorFollower_default,
411
+ {
412
+ anchorOffset: {
413
+ x: size * 0.35 / Math.SQRT2,
414
+ y: -size * 0.35 / Math.SQRT2
415
+ },
416
+ className,
417
+ disabled,
418
+ disableOnCoarsePointer,
419
+ excludeSelector,
420
+ followSpeed,
421
+ height: size * 1.5,
422
+ hideCursor,
423
+ isVisible,
424
+ movingTimeout: flameHideTimeout,
425
+ respectReducedMotion,
426
+ rotationOffset: 45,
427
+ threshold,
428
+ width: size,
429
+ wrapperProps: { "data-rocket-cursor": "" },
430
+ zIndex,
431
+ children: ({ isMoving }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
432
+ "svg",
433
+ {
434
+ xmlns: "http://www.w3.org/2000/svg",
435
+ viewBox: "0 0 416.449 516.449",
436
+ style: svgStyle,
437
+ children: [
438
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { style: { opacity: isMoving ? 1 : 0, transition: "opacity 0.1s" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FlameSvg, { gradientId }) }),
439
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RocketSvg, {})
440
+ ]
441
+ }
442
+ )
443
+ }
444
+ );
445
+ };
446
+ var rocket_Cursor_default = RocketCursor;
447
+ // Annotate the CommonJS export names for ESM import in node:
448
+ 0 && (module.exports = {
449
+ CursorFollower,
450
+ RocketCursor
451
+ });
452
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/rocket.Cursor.tsx","../src/cursorFollower.tsx"],"sourcesContent":["export { default, default as RocketCursor } from \"./rocket.Cursor\";\nexport type { RocketCursorProps } from \"./rocket.Cursor\";\nexport { default as CursorFollower } from \"./cursorFollower\";\nexport type {\n CursorFollowerBaseProps,\n CursorFollowerProps,\n CursorFollowerRenderState,\n} from \"./cursorFollower\";\n","import { useId } from \"react\";\nimport CursorFollower, { type CursorFollowerBaseProps } from \"./cursorFollower\";\n\nexport type RocketCursorProps = CursorFollowerBaseProps & {\n flameHideTimeout?: number;\n size?: number;\n};\n\n// SVG components for flame and rocket visuals\nconst FlameSvg = ({ gradientId }: { gradientId: string }) => (\n <g transform=\"translate(1.2245, 350.449) rotate(45) scale(0.5, -0.5)\">\n <defs>\n <linearGradient\n id={gradientId}\n gradientUnits=\"userSpaceOnUse\"\n x1=\"94.141\"\n y1=\"255\"\n x2=\"94.141\"\n y2=\"0.188\"\n >\n <stop offset=\"0\" stopColor=\"#ff4c0d\" />\n <stop offset=\"1\" stopColor=\"#fc9502\" />\n </linearGradient>\n </defs>\n <path\n d=\"M187.899,164.809 C185.803,214.868 144.574,254.812 94.000,254.812 C42.085,254.812 -0.000,211.312 -0.000,160.812 C-0.000,154.062 -0.121,140.572 10.000,117.812 C16.057,104.191 19.856,95.634 22.000,87.812 C23.178,83.513 25.469,76.683 32.000,87.812 C35.851,94.374 36.000,103.812 36.000,103.812 C36.000,103.812 50.328,92.817 60.000,71.812 C74.179,41.019 62.866,22.612 59.000,9.812 C57.662,5.384 56.822,-2.574 66.000,0.812 C75.352,4.263 100.076,21.570 113.000,39.812 C131.445,65.847 138.000,90.812 138.000,90.812 C138.000,90.812 143.906,83.482 146.000,75.812 C148.365,67.151 148.400,58.573 155.999,67.813 C163.226,76.600 173.959,93.113 180.000,108.812 C190.969,137.321 187.899,164.809 187.899,164.809 Z\"\n fill={`url(#${gradientId})`}\n fillRule=\"evenodd\"\n />\n <path\n d=\"M94.000,254.812 C58.101,254.812 29.000,225.711 29.000,189.812 C29.000,168.151 37.729,155.000 55.896,137.166 C67.528,125.747 78.415,111.722 83.042,102.172 C83.953,100.292 86.026,90.495 94.019,101.966 C98.212,107.982 104.785,118.681 109.000,127.812 C116.266,143.555 118.000,158.812 118.000,158.812 C118.000,158.812 125.121,154.616 130.000,143.812 C131.573,140.330 134.753,127.148 143.643,140.328 C150.166,150.000 159.127,167.390 159.000,189.812 C159.000,225.711 129.898,254.812 94.000,254.812 Z\"\n fill=\"#fc9502\"\n fillRule=\"evenodd\"\n />\n <path\n d=\"M95.000,183.812 C104.250,183.812 104.250,200.941 116.000,223.812 C123.824,239.041 112.121,254.812 95.000,254.812 C77.879,254.812 69.000,240.933 69.000,223.812 C69.000,206.692 85.750,183.812 95.000,183.812 Z\"\n fill=\"#fce202\"\n fillRule=\"evenodd\"\n />\n </g>\n);\n\nconst RocketSvg = () => (\n <g transform=\"translate(0, 0)\">\n <path\n style={{ fill: \"#FF7124\" }}\n d=\"M399.76,16.699c10.12,37.84,8.67,78.13-4.34,115.28h-0.01L284.48,21.049v-0.01 C321.63,8.029,361.92,6.579,399.76,16.699z\"\n />\n <path\n style={{ fill: \"#F2D59F\" }}\n d=\"M90.21,207.929l87.14-101.42h0.01l33.71-39.24c21.43-21.43,46.6-36.84,73.41-46.23v0.01 l110.93,110.93h0.01c-9.39,26.81-24.8,51.98-46.23,73.41l-39.24,33.71l-101.43,87.14l-29.57-29.57l-29.58-29.58l-29.58-29.58 L90.21,207.929z M296.11,193.399c20.18-20.17,20.18-52.89,0-73.06c-20.17-20.18-52.89-20.18-73.06,0 c-20.18,20.17-20.18,52.89,0,73.06C243.22,213.579,275.94,213.579,296.11,193.399z\"\n />\n <path\n style={{ fill: \"#F2D59F\" }}\n d=\"M309.95,239.099c1.74,45.6-14.8,91.78-49.61,126.59c-10.69,10.68-22.44,19.65-34.93,26.89 l-16.89-66.34L309.95,239.099z\"\n />\n <path\n style={{ fill: \"#8ECAC1\" }}\n d=\"M296.11,120.339c20.18,20.17,20.18,52.89,0,73.06c-20.17,20.18-52.89,20.18-73.06,0 c-20.18-20.17-20.18-52.89,0-73.06C243.22,100.159,275.94,100.159,296.11,120.339z\"\n />\n <path\n style={{ fill: \"#E6B263\" }}\n d=\"M208.52,326.239l-39.94,14.71c-10.98,4.05-23.31,1.34-31.58-6.94l-6.85-6.85l48.8-30.49 L208.52,326.239z\"\n />\n <polygon\n style={{ fill: \"#E6B263\" }}\n points=\"178.95,296.669 130.15,327.159 130.14,327.159 109.72,306.739 149.37,267.089\"\n />\n <path\n style={{ fill: \"#F2D59F\" }}\n d=\"M177.35,106.509l-87.14,101.42l-66.33-16.88c7.24-12.49,16.21-24.24,26.89-34.93 C85.58,121.309,131.74,104.769,177.35,106.509z\"\n />\n <polygon\n style={{ fill: \"#E6B263\" }}\n points=\"149.37,267.089 109.72,306.739 89.3,286.309 119.79,237.509\"\n />\n <path\n style={{ fill: \"#E6B263\" }}\n d=\"M119.79,237.509l-30.49,48.8l-6.86-6.85c-8.27-8.28-10.98-20.6-6.94-31.58l14.71-39.95 L119.79,237.509z\"\n />\n </g>\n);\n\nconst RocketCursor = ({\n className,\n disabled = false,\n disableOnCoarsePointer = true,\n excludeSelector = \".no-rocket-cursor\",\n respectReducedMotion = true,\n flameHideTimeout = 300,\n size = 50,\n isVisible = true,\n hideCursor = false,\n followSpeed = 0.18,\n threshold = 10,\n zIndex = 9999,\n}: RocketCursorProps) => {\n const gradientId = useId();\n const svgStyle = {\n display: \"block\",\n height: \"100%\",\n width: \"100%\",\n };\n\n return (\n <CursorFollower\n anchorOffset={{\n x: (size * 0.35) / Math.SQRT2,\n y: (-size * 0.35) / Math.SQRT2,\n }}\n className={className}\n disabled={disabled}\n disableOnCoarsePointer={disableOnCoarsePointer}\n excludeSelector={excludeSelector}\n followSpeed={followSpeed}\n height={size * 1.5}\n hideCursor={hideCursor}\n isVisible={isVisible}\n movingTimeout={flameHideTimeout}\n respectReducedMotion={respectReducedMotion}\n rotationOffset={45}\n threshold={threshold}\n width={size}\n wrapperProps={{ \"data-rocket-cursor\": \"\" }}\n zIndex={zIndex}\n >\n {({ isMoving }) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 416.449 516.449\"\n style={svgStyle}\n >\n <g style={{ opacity: isMoving ? 1 : 0, transition: \"opacity 0.1s\" }}>\n <FlameSvg gradientId={gradientId} />\n </g>\n <RocketSvg />\n </svg>\n )}\n </CursorFollower>\n );\n};\n\nexport default RocketCursor;\n","import {\n type HTMLAttributes,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nexport type CursorFollowerRenderState = {\n isMoving: boolean;\n visible: boolean;\n};\n\nexport type CursorFollowerBaseProps = {\n className?: string;\n disabled?: boolean;\n disableOnCoarsePointer?: boolean;\n excludeSelector?: string;\n followSpeed?: number;\n hideCursor?: boolean;\n isVisible?: boolean;\n respectReducedMotion?: boolean;\n threshold?: number;\n zIndex?: number;\n};\n\ntype CursorFollowerDataAttributes = {\n [key: `data-${string}`]: string | number | boolean | undefined;\n};\n\nexport type CursorFollowerProps = CursorFollowerBaseProps & {\n anchorOffset?: {\n x: number;\n y: number;\n };\n children: ReactNode | ((state: CursorFollowerRenderState) => ReactNode);\n movingTimeout?: number;\n rotateWithMovement?: boolean;\n rotationOffset?: number;\n height?: number;\n width?: number;\n wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, \"children\" | \"style\"> &\n CursorFollowerDataAttributes;\n};\n\nconst getMediaQueryMatch = (query: string) =>\n typeof window !== \"undefined\" && typeof window.matchMedia === \"function\"\n ? window.matchMedia(query).matches\n : false;\n\nconst subscribeToMediaQuery = (\n mediaQueryList: MediaQueryList,\n listener: () => void\n) => {\n if (typeof mediaQueryList.addEventListener === \"function\") {\n mediaQueryList.addEventListener(\"change\", listener);\n\n return () => mediaQueryList.removeEventListener(\"change\", listener);\n }\n\n mediaQueryList.addListener(listener);\n\n return () => mediaQueryList.removeListener(listener);\n};\n\nconst useMediaQueryMatch = (query: string) => {\n const [matches, setMatches] = useState(() => getMediaQueryMatch(query));\n\n useEffect(() => {\n if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") {\n return;\n }\n\n const mediaQueryList = window.matchMedia(query);\n const updateMatch = () => {\n setMatches(mediaQueryList.matches);\n };\n\n updateMatch();\n\n return subscribeToMediaQuery(mediaQueryList, updateMatch);\n }, [query]);\n\n return matches;\n};\n\nconst rotatePoint = (x: number, y: number, angleInDegrees: number) => {\n const angleInRadians = angleInDegrees * (Math.PI / 180);\n const cos = Math.cos(angleInRadians);\n const sin = Math.sin(angleInRadians);\n\n return {\n x: x * cos - y * sin,\n y: x * sin + y * cos,\n };\n};\n\nconst resolveClassName = (\n className?: string,\n wrapperClassName?: string\n) => [className, wrapperClassName].filter(Boolean).join(\" \") || undefined;\n\nconst CursorFollower = ({\n anchorOffset = { x: 0, y: 0 },\n children,\n className,\n disabled = false,\n disableOnCoarsePointer = true,\n excludeSelector = \".no-rocket-cursor\",\n followSpeed = 0.18,\n height = 48,\n hideCursor = false,\n isVisible = true,\n movingTimeout = 300,\n respectReducedMotion = true,\n rotateWithMovement = true,\n rotationOffset = 0,\n threshold = 10,\n width = 48,\n wrapperProps,\n zIndex = 9999,\n}: CursorFollowerProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const target = useRef({\n x: typeof window !== \"undefined\" ? window.innerWidth / 2 : 0,\n y: typeof window !== \"undefined\" ? window.innerHeight / 2 : 0,\n });\n const current = useRef({ ...target.current });\n const angleRef = useRef(0);\n const lastSignificantPosition = useRef({ ...target.current });\n const rafRef = useRef<number | null>(null);\n const hideTimeoutRef = useRef<number | null>(null);\n const isMovingRef = useRef(false);\n const [isMoving, setIsMoving] = useState(false);\n const prefersReducedMotion = useMediaQueryMatch(\"(prefers-reduced-motion: reduce)\");\n const hasCoarsePointer = useMediaQueryMatch(\"(pointer: coarse)\");\n const isInteractionDisabled =\n disabled ||\n (disableOnCoarsePointer && hasCoarsePointer) ||\n (respectReducedMotion && prefersReducedMotion);\n const [visible, setVisible] = useState(isVisible && !isInteractionDisabled);\n\n useEffect(() => {\n setVisible(isVisible && !isInteractionDisabled);\n }, [isInteractionDisabled, isVisible]);\n\n useEffect(() => {\n if (!hideCursor || isInteractionDisabled) {\n return;\n }\n\n const previousCursor = document.body.style.cursor;\n document.body.style.cursor = \"none\";\n\n return () => {\n document.body.style.cursor = previousCursor;\n };\n }, [hideCursor, isInteractionDisabled]);\n\n const stopMoving = useCallback(() => {\n if (!isMovingRef.current) {\n return;\n }\n\n isMovingRef.current = false;\n setIsMoving(false);\n }, []);\n\n const handleMouseMove = useCallback(\n (event: MouseEvent) => {\n const targetElement = event.target instanceof Element ? event.target : null;\n const exclude = excludeSelector ? targetElement?.closest(excludeSelector) : null;\n const shouldShow = !exclude && isVisible && !isInteractionDisabled;\n\n setVisible((currentVisible) =>\n currentVisible === shouldShow ? currentVisible : shouldShow\n );\n\n if (!shouldShow) {\n stopMoving();\n return;\n }\n\n target.current.x = event.clientX;\n target.current.y = event.clientY;\n\n const dx = target.current.x - lastSignificantPosition.current.x;\n const dy = target.current.y - lastSignificantPosition.current.y;\n const distance = Math.hypot(dx, dy);\n\n if (distance > threshold) {\n angleRef.current = Math.atan2(dy, dx) * (180 / Math.PI);\n lastSignificantPosition.current = {\n x: target.current.x,\n y: target.current.y,\n };\n }\n\n if (!isMovingRef.current) {\n isMovingRef.current = true;\n setIsMoving(true);\n }\n\n if (hideTimeoutRef.current) {\n window.clearTimeout(hideTimeoutRef.current);\n }\n\n hideTimeoutRef.current = window.setTimeout(stopMoving, movingTimeout);\n },\n [excludeSelector, isInteractionDisabled, isVisible, movingTimeout, stopMoving, threshold]\n );\n\n const handleMouseOut = useCallback(\n (event: MouseEvent) => {\n const relatedTarget = event.relatedTarget instanceof Element ? event.relatedTarget : null;\n\n if (!relatedTarget || relatedTarget.nodeName === \"HTML\") {\n setVisible(false);\n stopMoving();\n }\n },\n [stopMoving]\n );\n\n const handleVisibilityChange = useCallback(() => {\n if (document.visibilityState === \"visible\") {\n setVisible(isVisible && !isInteractionDisabled);\n return;\n }\n\n setVisible(false);\n stopMoving();\n }, [isInteractionDisabled, isVisible, stopMoving]);\n\n useEffect(() => {\n if (isInteractionDisabled) {\n setVisible(false);\n stopMoving();\n return;\n }\n\n window.addEventListener(\"mousemove\", handleMouseMove, { passive: true });\n document.addEventListener(\"mouseout\", handleMouseOut);\n document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n\n const step = () => {\n const lerp = Math.min(Math.max(followSpeed, 0), 1);\n const dx = target.current.x - current.current.x;\n const dy = target.current.y - current.current.y;\n const distanceToTarget = Math.hypot(dx, dy);\n\n if (distanceToTarget < 0.5) {\n current.current.x = target.current.x;\n current.current.y = target.current.y;\n } else {\n current.current.x += dx * lerp;\n current.current.y += dy * lerp;\n }\n\n const totalAngle =\n (rotateWithMovement ? angleRef.current : 0) + rotationOffset;\n const rotatedAnchorOffset = rotatePoint(\n anchorOffset.x,\n anchorOffset.y,\n totalAngle\n );\n const wrapper = wrapperRef.current;\n const content = contentRef.current;\n\n if (wrapper) {\n wrapper.style.transform = `translate3d(${current.current.x - rotatedAnchorOffset.x}px, ${\n current.current.y - rotatedAnchorOffset.y\n }px, 0) translate(-50%, -50%)`;\n }\n\n if (content) {\n content.style.transform = `rotate(${totalAngle}deg)`;\n }\n\n rafRef.current = requestAnimationFrame(step);\n };\n\n rafRef.current = requestAnimationFrame(step);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseout\", handleMouseOut);\n document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n\n if (rafRef.current) {\n cancelAnimationFrame(rafRef.current);\n }\n\n if (hideTimeoutRef.current) {\n window.clearTimeout(hideTimeoutRef.current);\n }\n };\n }, [\n anchorOffset.x,\n anchorOffset.y,\n followSpeed,\n handleMouseMove,\n handleMouseOut,\n handleVisibilityChange,\n isInteractionDisabled,\n rotateWithMovement,\n rotationOffset,\n stopMoving,\n ]);\n\n const wrapperStyle = useMemo(\n () => ({\n display: visible ? \"block\" : \"none\",\n height: `${height}px`,\n left: 0,\n pointerEvents: \"none\" as const,\n position: \"fixed\" as const,\n top: 0,\n width: `${width}px`,\n willChange: \"transform\",\n zIndex,\n }),\n [height, visible, width, zIndex]\n );\n\n const contentStyle = useMemo(\n () => ({\n display: \"block\",\n height: \"100%\",\n transformOrigin: \"center center\",\n width: \"100%\",\n willChange: \"transform\",\n }),\n []\n );\n\n if (!visible) {\n return null;\n }\n\n return (\n <div\n aria-hidden=\"true\"\n {...wrapperProps}\n className={resolveClassName(className, wrapperProps?.className)}\n ref={wrapperRef}\n style={wrapperStyle}\n >\n <div ref={contentRef} style={contentStyle}>\n {typeof children === \"function\" ? children({ isMoving, visible }) : children}\n </div>\n </div>\n );\n};\n\nexport default CursorFollower;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAsB;;;ACAtB,mBAQO;AAuVD;AAhTN,IAAM,qBAAqB,CAAC,UAC1B,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,aAC1D,OAAO,WAAW,KAAK,EAAE,UACzB;AAEN,IAAM,wBAAwB,CAC5B,gBACA,aACG;AACH,MAAI,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BAAsB,GAAG;AAAA,MACzC;AAAA,MAEC,WAAC,EAAE,SAAS,MACX;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,OAAO;AAAA,UAEP;AAAA,yDAAC,OAAE,OAAO,EAAE,SAAS,WAAW,IAAI,GAAG,YAAY,eAAe,GAChE,uDAAC,YAAS,YAAwB,GACpC;AAAA,YACA,6CAAC,aAAU;AAAA;AAAA;AAAA,MACb;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,wBAAQ;","names":["import_react","import_jsx_runtime"]}
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode, HTMLAttributes } from 'react';
3
+
4
+ type CursorFollowerRenderState = {
5
+ isMoving: boolean;
6
+ visible: boolean;
7
+ };
8
+ type CursorFollowerBaseProps = {
9
+ className?: string;
10
+ disabled?: boolean;
11
+ disableOnCoarsePointer?: boolean;
12
+ excludeSelector?: string;
13
+ followSpeed?: number;
14
+ hideCursor?: boolean;
15
+ isVisible?: boolean;
16
+ respectReducedMotion?: boolean;
17
+ threshold?: number;
18
+ zIndex?: number;
19
+ };
20
+ type CursorFollowerDataAttributes = {
21
+ [key: `data-${string}`]: string | number | boolean | undefined;
22
+ };
23
+ type CursorFollowerProps = CursorFollowerBaseProps & {
24
+ anchorOffset?: {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ children: ReactNode | ((state: CursorFollowerRenderState) => ReactNode);
29
+ movingTimeout?: number;
30
+ rotateWithMovement?: boolean;
31
+ rotationOffset?: number;
32
+ height?: number;
33
+ width?: number;
34
+ wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, "children" | "style"> & CursorFollowerDataAttributes;
35
+ };
36
+ declare const CursorFollower: ({ anchorOffset, children, className, disabled, disableOnCoarsePointer, excludeSelector, followSpeed, height, hideCursor, isVisible, movingTimeout, respectReducedMotion, rotateWithMovement, rotationOffset, threshold, width, wrapperProps, zIndex, }: CursorFollowerProps) => react_jsx_runtime.JSX.Element | null;
37
+
38
+ type RocketCursorProps = CursorFollowerBaseProps & {
39
+ flameHideTimeout?: number;
40
+ size?: number;
41
+ };
42
+ declare const RocketCursor: ({ className, disabled, disableOnCoarsePointer, excludeSelector, respectReducedMotion, flameHideTimeout, size, isVisible, hideCursor, followSpeed, threshold, zIndex, }: RocketCursorProps) => react_jsx_runtime.JSX.Element;
43
+
44
+ export { CursorFollower, type CursorFollowerBaseProps, type CursorFollowerProps, type CursorFollowerRenderState, RocketCursor, type RocketCursorProps, RocketCursor as default };
@@ -0,0 +1,44 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode, HTMLAttributes } from 'react';
3
+
4
+ type CursorFollowerRenderState = {
5
+ isMoving: boolean;
6
+ visible: boolean;
7
+ };
8
+ type CursorFollowerBaseProps = {
9
+ className?: string;
10
+ disabled?: boolean;
11
+ disableOnCoarsePointer?: boolean;
12
+ excludeSelector?: string;
13
+ followSpeed?: number;
14
+ hideCursor?: boolean;
15
+ isVisible?: boolean;
16
+ respectReducedMotion?: boolean;
17
+ threshold?: number;
18
+ zIndex?: number;
19
+ };
20
+ type CursorFollowerDataAttributes = {
21
+ [key: `data-${string}`]: string | number | boolean | undefined;
22
+ };
23
+ type CursorFollowerProps = CursorFollowerBaseProps & {
24
+ anchorOffset?: {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ children: ReactNode | ((state: CursorFollowerRenderState) => ReactNode);
29
+ movingTimeout?: number;
30
+ rotateWithMovement?: boolean;
31
+ rotationOffset?: number;
32
+ height?: number;
33
+ width?: number;
34
+ wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, "children" | "style"> & CursorFollowerDataAttributes;
35
+ };
36
+ declare const CursorFollower: ({ anchorOffset, children, className, disabled, disableOnCoarsePointer, excludeSelector, followSpeed, height, hideCursor, isVisible, movingTimeout, respectReducedMotion, rotateWithMovement, rotationOffset, threshold, width, wrapperProps, zIndex, }: CursorFollowerProps) => react_jsx_runtime.JSX.Element | null;
37
+
38
+ type RocketCursorProps = CursorFollowerBaseProps & {
39
+ flameHideTimeout?: number;
40
+ size?: number;
41
+ };
42
+ declare const RocketCursor: ({ className, disabled, disableOnCoarsePointer, excludeSelector, respectReducedMotion, flameHideTimeout, size, isVisible, hideCursor, followSpeed, threshold, zIndex, }: RocketCursorProps) => react_jsx_runtime.JSX.Element;
43
+
44
+ export { CursorFollower, type CursorFollowerBaseProps, type CursorFollowerProps, type CursorFollowerRenderState, RocketCursor, type RocketCursorProps, RocketCursor as default };