
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
A powerful, lightweight React component library for image annotation and markup. Built with TypeScript, PixMark provides an intuitive interface for displaying images with interactive bounding box annotations.
rc-virtual-list
# Using npm
npm install pixmark
# Using yarn
yarn add pixmark
# Using pnpm
pnpm add pixmark
Make sure you have React and React DOM installed:
npm install react react-dom
import React from 'react';
import { PixMark } from 'pixmark';
const MyComponent = () => {
const annotations = [
{
id: '1',
text: 'Person',
boundingBox: { x0: 100, y0: 50, x1: 200, y1: 150 },
color: '#00ff00'
},
{
id: '2',
text: 'Car',
boundingBox: { x0: 300, y0: 200, x1: 450, y1: 280 },
color: '#ff0000'
}
];
return (
<PixMark
src="https://example.com/image.jpg"
annotations={annotations}
/>
);
};
export default MyComponent;
import React, { useState } from 'react';
import { PixMark } from 'pixmark';
import type { IAnnotation } from 'pixmark';
const AdvancedExample = () => {
const [selectedAnnotations, setSelectedAnnotations] = useState<IAnnotation[]>([]);
const annotations: IAnnotation[] = [
{
id: 'person-1',
text: 'John Doe',
boundingBox: { x0: 120, y0: 80, x1: 220, y1: 180 },
color: '#00ff00'
},
{
id: 'object-1',
text: 'Laptop',
boundingBox: { x0: 250, y0: 150, x1: 350, y1: 200 },
color: '#0000ff'
}
];
const handleSelectionChange = (annotations: IAnnotation[]) => {
setSelectedAnnotations(annotations);
console.log('Selected annotations:', annotations);
};
return (
<div style={{ width: '100%', height: '600px' }}>
<PixMark
src="https://example.com/my-image.jpg"
annotations={annotations}
onSelectionChange={handleSelectionChange}
/>
</div>
);
};
The main component that combines the image viewer and annotation list.
Prop | Type | Required | Description |
---|---|---|---|
src | string | ✅ | URL of the image to display |
annotations | IAnnotation[] | ✅ | Array of annotations to display |
interface IAnnotation {
id: string; // Unique identifier for the annotation
text: string; // Display text for the annotation
boundingBox: {
x0: number; // Top-left x coordinate
y0: number; // Top-left y coordinate
x1: number; // Bottom-right x coordinate
y1: number; // Bottom-right y coordinate
};
color?: string; // Optional color for the bounding box (hex or named color)
}
interface IPixMark {
src: string; // Image URL
annotations: IAnnotation[]; // Array of annotations
}
Displays the image with annotation bounding boxes as SVG overlays.
Features:
Displays a scrollable list of annotations using virtual scrolling.
Features:
Individual annotation item in the list.
Features:
PixMark uses inline styles by default but can be customized by wrapping components or using CSS-in-JS solutions.
color
propconst CustomPixMark = () => (
<div className="custom-pixmark-container">
<PixMark
src="image.jpg"
annotations={annotations}
/>
<style jsx>{`
.custom-pixmark-container :global(.image-large) {
border-radius: 8px;
}
.custom-pixmark-container :global(rect) {
stroke-width: 2;
}
`}</style>
</div>
);
# Clone the repository
git clone https://github.com/maifeeulasad/pixmark.git
cd pixmark
# Install dependencies
pnpm install
# Start development
pnpm run build
# Run linting
pnpm run lint
# Format code
pnpm run format
Script | Description |
---|---|
pnpm run build | Build the library using tsup (ESM + CJS + DTS) |
pnpm run lint | Run ESLint on source files |
pnpm run lint:fix | Run ESLint with auto-fix |
pnpm run format | Format code with Prettier |
src/
├── index.ts # Main exports
├── components/
│ ├── PixMark.tsx # Main component
│ ├── PixMarkViewer.tsx # Image viewer with annotations
│ ├── PixMarkList.tsx # Annotation list
│ └── types.ts # TypeScript definitions
We welcome contributions! Please follow these steps:
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
If you have any questions or need help:
Made with ❤️ by Maifee Ul Asad
FAQs
An annotation marking tool with React and TypeScript
We found that pixmark demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.