
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@anaralabs/lector
Advanced tools
Simple primitives to compose powerful PDF viewing experiences.
powered by PDF.js
and React
lector
A composable, headless PDF viewer toolkit for React applications, powered by PDF.js
. Build feature-rich PDF viewing experiences with full control over the UI and functionality.
npm install @anaralabs/lector pdfjs-dist
# or with yarn
yarn add @anaralabs/lector pdfjs-dist
# or with pnpm
pnpm add @anaralabs/lector pdfjs-dist
Here's a simple example of how to create a basic PDF viewer:
import { CanvasLayer, Page, Pages, Root, TextLayer } from "@anaralabs/lector";
import "pdfjs-dist/web/pdf_viewer.css";
export default function PDFViewer() {
return (
<Root
source="/sample.pdf"
className="w-full h-[500px] border overflow-hidden rounded-lg"
loader={<div className="p-4">Loading...</div>}
>
<Pages className="p-4">
<Page>
<CanvasLayer />
<TextLayer />
</Page>
</Pages>
</Root>
);
}
When you are using "pnpm link", you are bound to use pnpm on your consumer project when you are developing locally. With yalc, we are decoupling the need for pnpm and now the package can be tested with any package managers. Any changes should be automatically published to yalc on save, forcing a rebuilt and updating the consumer project.
Install yalc globally:
pnpm i yalc -g
From lector:
# navigate to lector package folder and install dependencies
pnpm i
# when you first start development, make sure you publish the package locally
yalc publish
# and run the project in development mode to start a watcher that rebuilds the project and pushes the changes locally on save
pnpm dev
From consumer project: (It doesn't really matter what package manager you are using)
# add local package to your package.json of the consumer project using yalc
yalc add @anaralabs/lector
# or if you don't want to add the yalc package in your package.json
yalc link @anaralabs/lector
We welcome contributions! Key areas we're focusing on:
Special thanks to these open-source projects that provided inspiration:
MIT © Anara
FAQs
Headless PDF viewer for React
The npm package @anaralabs/lector receives a total of 3,342 weekly downloads. As such, @anaralabs/lector popularity was classified as popular.
We found that @anaralabs/lector demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.