{"_id":"@blcklab/pxlrei","_rev":"2-7227546eeb0f5208a0c91e8f2491e578","name":"@blcklab/pxlrei","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@blcklab/pxlrei","version":"1.0.0","keywords":["pixel","pixel-art","text-to-pixel","pixel-font","unicode","canvas","svg","html","terminal","ascii","typescript","browser"],"author":{"name":"Black Lab"},"license":"MIT","_id":"@blcklab/pxlrei@1.0.0","maintainers":[{"name":"okarin_lab","email":"avelurs.billy@gmail.com"}],"homepage":"https://github.com/blcklab/pxlrei#readme","bugs":{"url":"https://github.com/blcklab/pxlrei/issues"},"dist":{"shasum":"1215e748ebfb2dd0059900f5699203e343ed9e49","tarball":"https://registry.npmjs.org/@blcklab/pxlrei/-/pxlrei-1.0.0.tgz","fileCount":108,"integrity":"sha512-tV6tErnnjRJLgY6vYgHRHHZebJxbCPnWPcjMuDVPomNUmt2YPLiN/K8Vi27jfHIT2fX3dgyNLIjGzNS5cPM/8Q==","signatures":[{"sig":"MEUCIQCwpLu0vGkm9a5GrZvOrL9bENdADoMDyI+9RfBquAdHFgIgDNBlENwF748RT2BRHAKahG2Yom5GfSw2FsIxlChqh1Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blcklab%2fpxlrei@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":148625},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"default":"./dist/index.js","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./glyphs":{"import":{"types":"./dist/glyphs/index.d.ts","default":"./dist/glyphs/index.js"},"default":"./dist/glyphs/index.js","require":{"types":"./dist/glyphs/index.d.cts","default":"./dist/glyphs/index.cjs"}},"./raster":{"import":{"types":"./dist/raster/index.d.ts","default":"./dist/raster/index.js"},"default":"./dist/raster/index.js","require":{"types":"./dist/raster/index.d.cts","default":"./dist/raster/index.cjs"}},"./unicode":{"import":{"types":"./dist/unicode/index.d.ts","default":"./dist/unicode/index.js"},"default":"./dist/unicode/index.js","require":{"types":"./dist/unicode/index.d.cts","default":"./dist/unicode/index.cjs"}},"./providers":{"import":{"types":"./dist/providers/index.d.ts","default":"./dist/providers/index.js"},"default":"./dist/providers/index.js","require":{"types":"./dist/providers/index.d.cts","default":"./dist/providers/index.cjs"}},"./renderers":{"import":{"types":"./dist/renderers/index.d.ts","default":"./dist/renderers/index.js"},"default":"./dist/renderers/index.js","require":{"types":"./dist/renderers/index.d.cts","default":"./dist/renderers/index.cjs"}},"./package.json":"./package.json"},"gitHead":"a72511fdf373e1389c3b62af578bd2d32550a8bc","scripts":{"lint":"eslint .","test":"vitest run","build":"node scripts/build.mjs","check":"npm run check:source && npm run check:dist && npm run check:playground","clean":"node scripts/clean.mjs","smoke":"node scripts/smoke.mjs","format":"prettier --write .","typecheck":"tsc --noEmit","check:dist":"node scripts/build.mjs && node scripts/check-exports.mjs && node scripts/smoke.mjs && node scripts/check-package.mjs","test:watch":"vitest","check:source":"eslint . && tsc --noEmit && vitest run","format:check":"prettier --check .","check:exports":"node scripts/check-exports.mjs","check:package":"node scripts/check-package.mjs","prepublishOnly":"npm run check","check:playground":"node scripts/check-playground.mjs"},"_npmUser":{"name":"okarin_lab","email":"avelurs.billy@gmail.com"},"repository":{"url":"git+https://github.com/blcklab/pxlrei.git","type":"git"},"_npmVersion":"10.8.2","description":"A dependency-free text-to-pixel engine with glyph providers, Unicode segmentation, renderers, and browser font rasterization.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.31.0","vitest":"^3.2.4","publint":"^0.3.12","prettier":"^3.6.2","@eslint/js":"^9.31.0","typescript":"^5.8.3","@types/node":"^22.15.30","typescript-eslint":"^8.38.0","@arethetypeswrong/cli":"^0.18.2"},"_npmOperationalInternal":{"tmp":"tmp/pxlrei_1.0.0_1787726995705_0.5956697475143862","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@blcklab/pxlrei","version":"1.0.1","description":"A dependency-free text-to-pixel engine with glyph providers, Unicode segmentation, renderers, and browser font rasterization.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":"./dist/index.js"},"./glyphs":{"import":{"types":"./dist/glyphs/index.d.ts","default":"./dist/glyphs/index.js"},"require":{"types":"./dist/glyphs/index.d.cts","default":"./dist/glyphs/index.cjs"},"default":"./dist/glyphs/index.js"},"./providers":{"import":{"types":"./dist/providers/index.d.ts","default":"./dist/providers/index.js"},"require":{"types":"./dist/providers/index.d.cts","default":"./dist/providers/index.cjs"},"default":"./dist/providers/index.js"},"./unicode":{"import":{"types":"./dist/unicode/index.d.ts","default":"./dist/unicode/index.js"},"require":{"types":"./dist/unicode/index.d.cts","default":"./dist/unicode/index.cjs"},"default":"./dist/unicode/index.js"},"./raster":{"import":{"types":"./dist/raster/index.d.ts","default":"./dist/raster/index.js"},"require":{"types":"./dist/raster/index.d.cts","default":"./dist/raster/index.cjs"},"default":"./dist/raster/index.js"},"./renderers":{"import":{"types":"./dist/renderers/index.d.ts","default":"./dist/renderers/index.js"},"require":{"types":"./dist/renderers/index.d.cts","default":"./dist/renderers/index.cjs"},"default":"./dist/renderers/index.js"},"./package.json":"./package.json"},"sideEffects":false,"engines":{"node":">=20"},"keywords":["pixel","pixel-art","text-to-pixel","pixel-font","unicode","canvas","svg","html","terminal","ascii","typescript","browser"],"author":{"name":"Black Lab"},"repository":{"type":"git","url":"git+https://github.com/blcklab/pxlrei.git"},"bugs":{"url":"https://github.com/blcklab/pxlrei/issues"},"homepage":"https://github.com/blcklab/pxlrei#readme","license":"MIT","publishConfig":{"access":"public","provenance":true},"scripts":{"clean":"node scripts/clean.mjs","format":"prettier --write .","format:check":"prettier --check .","lint":"eslint .","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","build":"node scripts/build.mjs","check:exports":"node scripts/check-exports.mjs","check:package":"node scripts/check-package.mjs","check:source":"eslint . && tsc --noEmit && vitest run","check:dist":"node scripts/build.mjs && node scripts/check-exports.mjs && node scripts/smoke.mjs && node scripts/check-package.mjs","check":"npm run check:source && npm run check:dist && npm run check:playground","prepublishOnly":"npm run check","smoke":"node scripts/smoke.mjs","check:playground":"node scripts/check-playground.mjs"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.2","@eslint/js":"^9.31.0","@types/node":"^22.15.30","eslint":"^9.31.0","prettier":"^3.6.2","publint":"^0.3.12","typescript":"^5.8.3","typescript-eslint":"^8.38.0","vitest":"^3.2.4"},"_id":"@blcklab/pxlrei@1.0.1","gitHead":"c373e149cf40e9d7d0b7bd1ce070076160dd577e","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ryOfE0skZVpVT2JjU1Rq+xY4ju0pEA7zwbqRPva/b3x+Tu+2AUAOn49QKPTcys+Zk9n/En3+xB9xGo8hID1qMw==","shasum":"67ac827c370ec7c35d574901fe7568960cb8d433","tarball":"https://registry.npmjs.org/@blcklab/pxlrei/-/pxlrei-1.0.1.tgz","fileCount":108,"unpackedSize":149351,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blcklab%2fpxlrei@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIESi32w/05GSNUU8eJ2eTKXOvokbxPNKTDnMLBmVWtetAiEAsze5swhVMDL57lruUjJt80u40nnPvbgixvPU7GCW58Y="}]},"_npmUser":{"name":"okarin_lab","email":"avelurs.billy@gmail.com"},"directories":{},"maintainers":[{"name":"okarin_lab","email":"avelurs.billy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pxlrei_1.0.1_1787731142070_0.9509513784690717"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T06:49:55.450Z","modified":"2026-08-26T07:59:02.554Z","1.0.0":"2026-08-26T06:49:55.828Z","1.0.1":"2026-08-26T07:59:02.205Z"},"bugs":{"url":"https://github.com/blcklab/pxlrei/issues"},"author":{"name":"Black Lab"},"license":"MIT","homepage":"https://github.com/blcklab/pxlrei#readme","keywords":["pixel","pixel-art","text-to-pixel","pixel-font","unicode","canvas","svg","html","terminal","ascii","typescript","browser"],"repository":{"type":"git","url":"git+https://github.com/blcklab/pxlrei.git"},"description":"A dependency-free text-to-pixel engine with glyph providers, Unicode segmentation, renderers, and browser font rasterization.","maintainers":[{"name":"okarin_lab","email":"avelurs.billy@gmail.com"}],"readme":"# Pxlrei\n\nA dependency-free text-to-pixel engine for JavaScript and TypeScript\n\nPxlrei turns text into a reusable boolean pixel matrix, then lets you render it as text, SVG, HTML, Canvas, or your own output format.\n\n```bash\nnpm install @blcklab/pxlrei\n```\n\n```ts\nimport { pixelize } from '@blcklab/pxlrei'\n\nconsole.log(pixelize('Pxlrei'))\n```\n\n## Any text, one API\n\nPxlrei has two rendering paths behind the same API:\n\n- **Glyph mode** for deterministic built-in/custom pixel fonts.\n- **Raster mode** for real font text through Canvas.\n\nIn a browser, unsupported built-in text can automatically fall back to font rasterization:\n\n```ts\npixelize('Hello')\npixelize('こんにちは')\npixelize('日本語')\npixelize('Привет')\npixelize('مرحبا')\npixelize('Hello 世界')\n```\n\nThe active browser font must support the requested characters. Pxlrei does not bundle fonts.\n\n## Get the matrix\n\n```ts\nimport { renderAnyText } from '@blcklab/pxlrei'\n\nconst result = renderAnyText('Hello')\n\nresult.matrix\nresult.width\nresult.height\nresult.source // 'glyph' or 'raster'\n```\n\n## Deterministic pixel font\n\n```ts\nimport { pixelText } from '@blcklab/pxlrei'\n\nconsole.log(\n  pixelText('Hello', {\n    pixel: '■',\n    empty: ' ',\n    scale: 1,\n  }),\n)\n```\n\nThe built-in `latin5x5` font includes `A-Z`, true `a-z`, `0-9`, and common punctuation.\n\n## Render anywhere\n\n```ts\nimport {\n  drawToCanvas,\n  renderAnyText,\n  renderHtml,\n  renderSvg,\n} from '@blcklab/pxlrei'\n\nconst result = renderAnyText('PX')\n\nconst svg = renderSvg(result, { pixelSize: 8, gap: 1 })\nconst html = renderHtml(result)\n\ndrawToCanvas(result, document.querySelector('canvas')!, {\n  pixelSize: 8,\n  gap: 1,\n})\n```\n\n## Node.js\n\nBuilt-in and custom glyph rendering works in Node.js 20+ with zero runtime dependencies.\n\nFor arbitrary real-font rasterization in Node, provide a `TextRasterizer` backed by your chosen font/Canvas engine. Pxlrei intentionally does not force a native Canvas dependency on every user.\n\n## Documentation\n\nStart with the [documentation index](./docs/README.md).\n\n- [Getting started](./docs/getting-started.md)\n- [Core concepts](./docs/core-concepts.md)\n- [Unicode and languages](./docs/guides/unicode-and-languages.md)\n- [Browser rasterization](./docs/guides/browser-rasterization.md)\n- [Node.js rasterization](./docs/guides/node-rasterization.md)\n- [Custom glyphs](./docs/guides/custom-glyphs.md)\n- [Output renderers](./docs/guides/renderers.md)\n- [API reference](./docs/reference/api.md)\n- [Options reference](./docs/reference/options.md)\n- [Interactive Playground](./docs/playground.md)\n- [Troubleshooting](./docs/troubleshooting.md)\n\n## Runtime\n\n- Node.js 20+\n- Modern browsers for Canvas rasterization\n- Zero runtime dependencies\n- ESM + CommonJS + TypeScript declarations\n\n## License\n\nMIT\n","readmeFilename":"README.md"}