
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@yomo/react-cursor-chat
Advanced tools
A react component for cursor chat
/
to bring up the input boxESC
to close the input box$ npm i --save @yomo/react-cursor-chat
import React from 'react';
import CursorChat from '@yomo/react-cursor-chat';
import '@yomo/react-cursor-chat/dist/cursor-chat.min.css';
// `wss://ws-dev.yomo.run` is YoMo's demo service
<CursorChat
socketURL="wss://ws-dev.yomo.run"
avatar="https://avatars.githubusercontent.com/u/67308985?s=200&v=4"
/>;
presenceURL: string
: to set the WebSocket service address.presenceAuth: { type: 'publickey' | 'token'; publicKey?: string; endpoint?: '/api/auth'; }
: to set presence
service Authavatar?: string
: to set avatar.name?: string
: to set name.theme?: 'light' | 'dark'
: The background color of the chat box, the default value is "dark".Or use hooks and customize the components yourself:
import React, { useMemo } from 'react';
import { useOnlineCursor, useRenderPosition } from '@yomo/react-cursor-chat';
// You can customise the content of your own mouse block
const MeCursor = ({ cursor }) => {
const refContainer = useRenderPosition(cursor);
return useMemo(
() => (
<div className="cursor" ref={refContainer}>
<CursorIcon color={cursor.color} />
{cursor.name && <div>{cursor.name}</div>}
{cursor.avatar && (
<img className="avatar" src={cursor.avatar} alt="avatar" />
)}
</div>
),
[]
);
};
// You can customise what other people's mouse blocks can display
const OthersCursor = ({ cursor }) => {
const refContainer = useRenderPosition(cursor);
return (
<div ref={refContainer} className="cursor">
<CursorIcon color={cursor.color} />
</div>
);
};
// Exporting your custom components
export const YourComponent = ({ presenceURL, presenceAuth, name, avatar }) => {
const { me, others } = useOnlineCursor({
presenceURL,
presenceAuth,
name,
avatar,
});
if (!me) {
return null;
}
return (
<div className="container">
{others.map(item => (
<OthersCursor key={item.id} cursor={item} />
))}
<MeCursor cursor={me} />
</div>
);
};
function CursorIcon({ color }) {
return useMemo(
() => (
<svg
shapeRendering="geometricPrecision"
xmlns="http://www.w3.org/2000/svg"
fill={color}
>
<path
fill="#666"
d="M9.63 6.9a1 1 0 011.27-1.27l11.25 3.75a1 1 0 010 1.9l-4.68 1.56a1 1 0 00-.63.63l-1.56 4.68a1 1 0 01-1.9 0L9.63 6.9z"
/>
<path
stroke="#fff"
strokeWidth="1.5"
d="M11.13 4.92a1.75 1.75 0 00-2.2 2.21l3.74 11.26a1.75 1.75 0 003.32 0l1.56-4.68a.25.25 0 01.16-.16L22.4 12a1.75 1.75 0 000-3.32L11.13 4.92z"
/>
</svg>
),
[color]
);
}
FAQs
Cursor Chat like Figma
We found that @yomo/react-cursor-chat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.