{"_id":"@brief-jetzt/wasm-typst","_rev":"8-6ba180f645686340a9f1ebbc04490357","name":"@brief-jetzt/wasm-typst","dist-tags":{"latest":"0.17.2"},"versions":{"0.1.0":{"name":"@brief-jetzt/wasm-typst","version":"0.1.0","_id":"@brief-jetzt/wasm-typst@0.1.0","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"}],"dist":{"shasum":"856327d3f8b1bd254f282051017bf3f8cb3bc6cc","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.1.0.tgz","fileCount":6,"integrity":"sha512-yECkL+9YjWMi2o+aLeuqntf81B4AtTFm32VcH/N+i0VAmyZHUdIo3uvCDxKsp0jMDPVxEFErQ4lYG4OoQPSd3w==","signatures":[{"sig":"MEUCIQDcxeeBxnVchLb9Bc4IS7inUaKpxvsqQVdUUHk1T9KE3gIgNDMnCBxI+JSndyJov6MsCgbcJFVWFLcu+JZCvBZhlJo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4489},"types":"wasm_typst.d.ts","module":"wasm_typst.js","gitHead":"b6004ef16651cf6993e5133db44775d47f378e30","_npmUser":{"name":"soerface","email":"wegener92@gmail.com"},"_npmVersion":"10.5.0","description":"<div align=\"center\">","directories":{},"sideEffects":["./wasm_typst.js","./snippets/*"],"_nodeVersion":"20.12.2","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.1.0_1714321508747_0.944841494646232","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@brief-jetzt/wasm-typst","version":"0.1.1","_id":"@brief-jetzt/wasm-typst@0.1.1","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"}],"dist":{"shasum":"563bcc8bf335f5e46d8abcdb8590db09a36f4b51","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.1.1.tgz","fileCount":1,"integrity":"sha512-PsixvQNsMnT1VVmHZODFjPgM0EyoYyPufe9I2q85qiPfUYPiyLwCFD86HkoCKiMWARtHDKvxKt5iGNvv+7lQQA==","signatures":[{"sig":"MEQCIFuhLza6a8XIMHJy+/mF4BOOlwoVRRfVJbjoefdJeT1IAiBAxXm679cDBm3Z9cY83vAVUE4YyJZn8aySx4zdhnWBbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259},"type":"module","gitHead":"9efef52762d44d86ac2e340bceaa1ea94d0474d9","_npmUser":{"name":"soerface","email":"wegener92@gmail.com"},"_npmVersion":"10.5.0","directories":{},"_nodeVersion":"20.12.2","dependencies":{"wasm-typst":"file:wasm-pkg"},"collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.1.1_1714331654093_0.5503799950080395","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@brief-jetzt/wasm-typst","version":"0.1.2","_id":"@brief-jetzt/wasm-typst@0.1.2","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"}],"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"dist":{"shasum":"2177e86d886c70838c1190fcff16bd88b6650a70","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.1.2.tgz","fileCount":6,"integrity":"sha512-jmHiWeRqbngAr0+BkSXlFoIZkfbHCnwKwMOcfhIH/wBw2VhDv/yT88q6RVEvAZrOh/0mSGjNS/VpxsWbljdaYg==","signatures":[{"sig":"MEYCIQDrKnkX/2IZ61m8cay1enFUwC9ZoLw8U7FLemR3CqgG/QIhAKkwRI+0LsNiv2Mnr1uMCotlEC1iylZptaFg4uPpOaLw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brief-jetzt%2fwasm-typst@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15593076},"types":"wasm_typst.d.ts","module":"wasm_typst.js","gitHead":"10c39f912f8c40f5a10cfff6ff9c1c7e86f2aed9","_npmUser":{"name":"soerface","email":"wegener92@gmail.com"},"repository":{"url":"git+https://github.com/brief-jetzt/wasm-typst.git","type":"git"},"_npmVersion":"10.5.0","description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","directories":{},"sideEffects":["./wasm_typst.js","./snippets/*"],"_nodeVersion":"20.12.2","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.1.2_1714519126744_0.2352099660565079","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@brief-jetzt/wasm-typst","version":"0.1.3","_id":"@brief-jetzt/wasm-typst@0.1.3","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"}],"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"dist":{"shasum":"af0fba2214bc3b3e06faa67e60b3a044094a365b","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.1.3.tgz","fileCount":6,"integrity":"sha512-WqN4pMAWpxDDxFbnqpy5c7vDX2IAjV1PBR/cJ1hKLis17Geqs5BVE9Gwq0vzWnH6F2PoEgYLpH9shJ3MTpz/tg==","signatures":[{"sig":"MEYCIQDMaYCf6bfS07ai1/OobtKKc9AK1vcmKPMwm4gQ4jUBFQIhAPmTIPoLadJFFz5ILGNvfBcC9yd0KoNU6xchiTzs92fc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brief-jetzt%2fwasm-typst@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15577289},"types":"wasm_typst.d.ts","module":"wasm_typst.js","gitHead":"4cffaa4ad245e873bcb2c02289419ea5267d8246","_npmUser":{"name":"soerface","email":"wegener92@gmail.com"},"repository":{"url":"git+https://github.com/brief-jetzt/wasm-typst.git","type":"git"},"_npmVersion":"10.5.2","description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","directories":{},"sideEffects":["./wasm_typst.js","./snippets/*"],"_nodeVersion":"20.13.1","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.1.3_1717100449259_0.8962131512841285","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@brief-jetzt/wasm-typst","version":"0.13.1","_id":"@brief-jetzt/wasm-typst@0.13.1","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"}],"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"dist":{"shasum":"d5d8f45a0dfa5166e1430010f559198c30f0fe04","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.13.1.tgz","fileCount":6,"integrity":"sha512-TYO7JSWk6sYnfvH9jvwiikygv+lIJK9nsgg+8ovGyKNN+HuCHNSn3sVKHzWCd/Sxmr57lYRYR1l7A7unaLSzCw==","signatures":[{"sig":"MEQCIFLesb5LEALmXpd3CiBXdURfwPBBqmiI5sdHRrxeRuOnAiAuBCqnv0/KermOsukbwT2bjYJL8fl4lVEK2Y3jkt8rew==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brief-jetzt%2fwasm-typst@0.13.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17523381},"main":"wasm_typst.js","type":"module","types":"wasm_typst.d.ts","gitHead":"fe840de6d78f9fe884d40d49051743e20c11ff56","_npmUser":{"name":"soerface","email":"wegener92@gmail.com"},"repository":{"url":"git+https://github.com/brief-jetzt/wasm-typst.git","type":"git"},"_npmVersion":"10.8.2","description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","directories":{},"sideEffects":["./wasm_typst.js","./snippets/*"],"_nodeVersion":"20.19.0","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.13.1_1743193614070_0.5664670165885362","host":"s3://npm-registry-packages-npm-production"}},"0.17.1":{"name":"@brief-jetzt/wasm-typst","version":"0.17.1","_id":"@brief-jetzt/wasm-typst@0.17.1","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"},{"name":"nikeee","email":"nikeee@outlook.com"}],"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"dist":{"shasum":"6f73dd3c99a661cb502c014262cb43ed82316176","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.17.1.tgz","fileCount":8,"integrity":"sha512-pVewymhSZKJUJP1m5RSVQB27TifuLoTxlkVMYx8r1M/goTVyaf9QrYpcSK7oOIQlJuFsnRTVUk8u9eqjn7nNnw==","signatures":[{"sig":"MEUCIQCaX7CxVnJhfnwV7Eg85tLYca+h8WubmgJxEUmocNAC6gIgQ72SoBV6/uS09XJ++d+NS03m8vcD+hBCI/8bf/2k1vI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brief-jetzt%2fwasm-typst@0.17.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24126148},"main":"typst.mjs","type":"module","types":"typst.d.mts","gitHead":"7f27aad93cb41bd6fce7fcbb086bdbd8ea944095","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:50d83502-c1e2-44cc-9067-be4a4009906b"}},"repository":{"url":"git+https://github.com/brief-jetzt/wasm-typst.git","type":"git"},"_npmVersion":"11.17.0","description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","directories":{},"sideEffects":["./wasm_typst.js","./snippets/*","./typst.mjs"],"_nodeVersion":"26.5.0","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm-typst_0.17.1_1784159629213_0.30272550932274056","host":"s3://npm-registry-packages-npm-production"}},"0.17.2":{"name":"@brief-jetzt/wasm-typst","type":"module","collaborators":["Soeren Wegener <wegener92@gmail.com>"],"version":"0.17.2","main":"typst.mjs","types":"typst.d.mts","sideEffects":["./wasm_typst.js","./snippets/*","./typst.mjs"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/brief-jetzt/wasm-typst.git"},"gitHead":"ed3e7999a347ec6cebdbf4e244a49d3f748f5a0d","_id":"@brief-jetzt/wasm-typst@0.17.2","description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-/eBOv1skkrTGy1slxvuDreckohXOBXZrXIPO2hdu/jUWJ7Ev1hTw8GZz9lAhStaEtlGVNvQEEOSiPl7NRjQCGw==","shasum":"5db104e17bcbb211188c11c8bf9ea5a21836595e","tarball":"https://registry.npmjs.org/@brief-jetzt/wasm-typst/-/wasm-typst-0.17.2.tgz","fileCount":8,"unpackedSize":25309190,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@brief-jetzt%2fwasm-typst@0.17.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDaFOHjQzLCxRJvsVxTtivLMKxAXqEwWRW8Wt0lLIViSwIgfU1pdSUJ0P9CNLDsX7emAg4Up27mcW/9KnafDZMThrc="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:50d83502-c1e2-44cc-9067-be4a4009906b"}},"directories":{},"maintainers":[{"name":"soerface","email":"wegener92@gmail.com"},{"name":"nikeee","email":"nikeee@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wasm-typst_0.17.2_1784167666532_0.053202455237602475"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-28T16:25:08.638Z","modified":"2026-07-16T02:07:47.150Z","0.1.0":"2024-04-28T16:25:08.909Z","0.1.1":"2024-04-28T19:14:14.275Z","0.1.2":"2024-04-30T23:18:47.002Z","0.1.3":"2024-05-30T20:20:49.603Z","0.13.1":"2025-03-28T20:26:54.349Z","0.17.1":"2026-07-15T23:53:49.493Z","0.17.2":"2026-07-16T02:07:46.821Z"},"bugs":{"url":"https://github.com/brief-jetzt/wasm-typst/issues"},"homepage":"https://github.com/brief-jetzt/wasm-typst#readme","repository":{"type":"git","url":"git+https://github.com/brief-jetzt/wasm-typst.git"},"description":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.","maintainers":[{"name":"soerface","email":"wegener92@gmail.com"},{"name":"nikeee","email":"nikeee@outlook.com"}],"readme":"[![CI](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CI.yml) [![CD](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml/badge.svg)](https://github.com/brief-jetzt/wasm-typst/actions/workflows/CD.yml) ![version](https://img.shields.io/npm/v/%40brief-jetzt/wasm-typst) ![downloads](https://img.shields.io/npm/dm/%40brief-jetzt/wasm-typst) ![License](https://img.shields.io/npm/l/%40brief-jetzt%2Fwasm-typst)\n\n# wasm bindings for typst\nThis package allows you to use the [typst](https://github.com/typst/typst) library in the browser.\n\n## Usage\nThe package ships an ergonomic wrapper. Each renderer owns its own wasm instance, so you can create as many as you need:\n\n```sh\nnpm install @brief-jetzt/wasm-typst\n```\n\n```ts\nimport { createTypstRenderer } from \"@brief-jetzt/wasm-typst\";\n\nconst renderer = createTypstRenderer({\n  fonts: [{ path: \"MyFont.ttf\", data: fontBytes }], // Uint8Array; optional\n  sources: {\n    \"main.typ\": \"#set text(font: \\\"My Font\\\")\\nHello #sys.inputs.name\",\n  },\n  // files: { \"logo.png\": pngBytes },  // optional binary assets\n});\n\nconst { output, diagnostics } = renderer.render({\n  type: \"pdf\", // or \"svg\" | \"svg-pages\" | \"png-pages\"\n  input: { name: \"world\" }, // typst sys.inputs\n  // now: Temporal.Instant | Date | epoch millis — feeds datetime.today() and\n  // the PDF timestamp; defaults to Date.now(). Fix it for reproducible output.\n});\n// output: Uint8Array (pdf) or string (svg); one entry per page for the -pages types\n// diagnostics: Diagnostic[] ([] when clean), errors first:\n//   { severity: \"error\" | \"warning\", message, path?, start?, end?, line?, column?, hints }\n\nrenderer.updateSource(\"main.typ\", \"Changed\");\nrenderer.update({ sources: { \"main.typ\": \"...\" } }); // shallow-merge\n\n// Single-page PNG (thumbnails etc.), 2 pixels per typographic point:\nconst png = renderer.renderPng(0, 2);\n\n// Editor/IDE helpers (byte offsets into the given source):\nrenderer.autocomplete(\"main.typ\", 3, true); // { from, completions: [{ kind, label, apply?, detail? }] }?\nrenderer.tooltip(\"main.typ\", 13); // { kind: \"text\" | \"code\", text }?\nrenderer.goToDefinition(0, 35, 27); // click (page, xMm, yMm) -> { path, cursor }?\nrenderer.jumpFromCursor(\"main.typ\", 3); // cursor -> [{ page, x, y }] in mm\n\nrenderer.dispose(); // frees the wasm instance (or `using renderer = ...`)\n```\n\n## Development\nRunning tests:\n```sh\nnpm test\n```\n\nBuilding the package (runs `wasm-pack build`, then bundles the TS glue into `pkg/`):\n```sh\nnpm ci\nnpm run build\n```\n\nYou can then install the package in another npm project:\n```sh\ncd <your-npm-project>\nnpm install <path-to-this-repo>/pkg\n```\n\nIf you are installing it in a project that already has `@brief-jetzt/wasm-typst` installed, you may want to\nmodify it's `package.json`: Make sure that the local dependency has the prefix `@brief-jetzt` set, so that\nyour import statements keep working:\n\n```json\n  \"dependencies\": {\n    \"@brief-jetzt/wasm-typst\": \"file:../../wasm-typst/pkg\",\n  }\n```\n\nRun `npm i`.\n","readmeFilename":"README.md"}