
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@zenobius/ink-mouse
Advanced tools
Provides mouse support for Ink components.
https://github.com/zenobi-us/ink-mouse/assets/61225/658ad469-6438-4bff-8695-e2fe9325f816
import React, { useMemo, useRef, useState } from 'react';
import type { ComponentProps } from 'react';
import { Box, DOMElement, Text, render } from 'ink';
import {
MouseProvider,
useOnMouseHover,
useMousePosition,
useElementPosition,
useOnMouseClick,
} from '@zenobius/ink-mouse';
function App() {
return (
<MouseProvider>
<MyComponent />
</MouseProvider>
);
}
function MyComponent() {
const mouse = useMousePosition();
return (
<Box>
<Button label="Button 1" />
<Text>
{mouse.x}, {mouse.y}
</Text>
</Box>
);
}
function Button({ label, onClick }: { label: string; onClick?: () => void }) {
const ref = useRef<DOMElement>(null);
const [hovering, setHovering] = useState(false);
const [clicking, setClicking] = useState(false);
useOnMouseClick(ref, (event) => {
setClicking(event);
if (event && typeof onClick === 'function') {
onClick();
}
});
useOnMouseHover(ref, setHovering);
const border = useMemo((): ComponentProps<typeof Box>['borderStyle'] => {
if (clicking) {
return 'double';
}
if (hovering) {
return 'singleDouble';
}
return 'single';
}, [clicking, hovering]);
return (
<Box
gap={1}
paddingX={1}
ref={ref}
borderStyle={border}
>
<Text>{label}</Text>
</Box>
);
}
render(<App />);
This project uses ASDF and Yarn.
git checkout [fix|feat|docs|chore]/blah-blah (see Conventional Commits./tools.shjust setupjust demojust unittestjust lintFAQs
Unknown package
We found that @zenobius/ink-mouse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.