npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

velo-text

v1.0.4

Published

Editor documental portable con variables, imágenes y exportación PDF/ODT/DOCX — cero dependencias runtime (beta)

Readme

velo-text

1.0.4 — public beta. APIs and export layout can still change. Install with the beta tag, not as if it were a stable 1.0.

Portable document editor with variables {{name}}, tables, images, LaTeX equations and deterministic export to PDF, ODT, and DOCXzero runtime dependencies, TypeScript strict. LibreOffice/Word CI and full visual parity across Office formats are still open.

Roadmap: roadmap_editor_documental_portable.md — implementation follows Phase 0–12 depth 3.

Install (Node.js)

Requires Node >= 18. Use pnpm.

pnpm add velo-text@beta
# exact prerelease
pnpm add [email protected]

Do not run pnpm add velo-text expecting a stable latest until 1.0.4 is published.

Agent skill (any project)

Copies Cursor / Claude Code skill files into the current repo so an agent can mount mountVanillaEditor and export PDF/ODT/DOCX:

npx velo-text@beta skill
pnpx velo-text@beta skill

Writes .cursor/skills/velo-text/ and .agents/skills/velo-text/. Then add the library (pnpm add velo-text@beta) in the host app.

CSS for the web editor:

import "velo-text/themes/base.css";
import "velo-text/themes/components.css";

Publish / GitHub Actions

Do not put an npm token in the repo. Create GitHub secret NPM_TOKEN, then push tag v1.0.4. CI publishes to npm (beta) and opens a GitHub Release. Details: docs/guide/publish.md.

Quick start

import { createDocument, createIdGenerator, exportDocument } from "velo-text";
import { createBufferSink } from "velo-text/backend";

const doc = createDocument({ idGenerator: createIdGenerator("doc"), clock: { nowIso: () => new Date().toISOString() } });
doc.root.children.push(
  { type: "paragraph", id: "p1", children: [{ type: "text", id: "t1", text: "Hello " }, { type: "variable", id: "v1", path: "name", source: "{{name}}", valueType: "string" }] },
  { type: "equation-block", id: "eq1", latex: "\\frac{a}{b}" },
);

const { sink, getBuffer } = createBufferSink();
await exportDocument({
  document: doc,
  data: { name: "World" },
  format: "pdf",
  sink,
  options: { deterministic: true, strict: false },
});
const pdfBytes = getBuffer(); // Uint8Array

Browser (vanilla)

<link rel="stylesheet" href="node_modules/velo-text/themes/base.css">
<link rel="stylesheet" href="node_modules/velo-text/themes/components.css">
<div id="editor" class="pde-root" data-pde-theme="light-neutral" contenteditable="true"></div>
<script type="module">
  import { createEditor } from "velo-text";
  const editor = createEditor(document.getElementById("editor"), { document: doc, theme: "light-neutral" });
</script>

See examples/ (vanilla, React, Vue, Svelte, Angular, Astro), backend PDF samples, examples/postgres.mjs, examples/s3.mjs. Interactive playground: pnpm docs:dev/playground/.

Features

| Area | Status | |---|---| | Core model, validator, canonical hash, normalize, operations, history | ✅ src/core | | Variables {{path}}, \| format, ?? fallback, repeat rows | ✅ src/template | | LaTeX simple (\frac, \sqrt, ^/_, greek) inline/block | ✅ src/core/equation | | SVG icons with currentColor → recolorable via CSS | ✅ src/assets/icons | | Web editor: createEditor, cell typing/align, image align L/C/R, col/row resize, columns, IME, clipboard allowlist, a11y | ✅ src/editor-web | | Assets: sniff (PNG/JPEG/WebP/SVG), dimensions, SHA-256, store dedupe & GC | ✅ src/assets | | S3 presigned URLs SigV4, PG jsonb + revisions + optimistic concurrency | ✅ src/adapters | | Layout: units (µm/pt/twip/EMU), text line break, pagination widows/orphans | ✅ src/export/layout | | Export: PDF / ODT / DOCX (exportDocument); PDF keep-together for images/rows (PDF: Standard-14 fonts only, no custom TTF yet) | ✅ src/export | | Themes: light-neutral, light-warm, dark-slate, dark-contrast + CSS tokens | ✅ themes/ |

Scripts

pnpm run check:types      # tsc strict
pnpm run check:zero-deps  # 0 runtime deps
pnpm run check:circular   # no circular imports, core isolation
pnpm run check:fixtures   # 33 fixtures validate
pnpm run check:smoke      # PDF/ODT/DOCX magic + deterministic clock
pnpm run soak             # repeated export (SOAK_ITERS)
pnpm run test             # unit + conformance + integration + security
pnpm run test:security    # XSS / prototype / SVG / LaTeX corpus
pnpm run test:visual      # HTML snapshots in tests/visual/snapshots
pnpm run fuzz -- --iterations=5000
pnpm run build            # tsc → dist/
pnpm docs:dev             # VitePress docs + playground at /playground/
pnpm version:set 1.0.4   # bump version (then tag v1.0.4 and push)

Publish is GitHub Actions only (push tag v1.0.4 after setting secret NPM_TOKEN).

Zero dependencies

"dependencies": {}

Verified via scripts/check-zero-deps.js and CI. TypeScript, VitePress, and test tools are devDependencies only.

Themes

All colors/sizes via CSS variables (--pde-*). Override any token:

.pde-root { --pde-color-primary: #ff0000; --pde-icon-color: currentColor; }

Known Limitations

  • PDF fonts: Unmarked text uses Standard-14 Helvetica. Velo Sans / Serif / Mono / Display are the same generated TTF in the editor and in PDF. Other fontFamily values fall back to Helvetica. ODT/DOCX keep the family name.
  • Office interop: ODT/DOCX validated structurally (XML/ZIP) and via LibreOffice headless in CI. Full visual parity with PDF is not yet guaranteed.
  • PostgreSQL / S3: Adapters provide typed contracts with in-memory implementations. Real PG driver and S3 SDK are not bundled (zero-deps policy). See docker-compose.test.yml for local integration testing.

License

MIT — LICENSE.