{"_id":"@beoe/rehype-penrose","_rev":"3-1a8d63d81977db309f4ebc5f72e85f6a","name":"@beoe/rehype-penrose","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@beoe/rehype-penrose","version":"0.1.0","keywords":["rehype","penrose"],"author":{"name":"stereobooster"},"license":"MIT","_id":"@beoe/rehype-penrose@0.1.0","maintainers":[{"name":"stereobooster","email":"stereobooster@gmail.com"}],"homepage":"https://beoe.stereobooster.com/diagrams/penrose/","bugs":{"url":"https://github.com/stereobooster/beoe/issues"},"dist":{"shasum":"3e4879154ad3f141da7a4918938fd71f81bc0c5f","tarball":"https://registry.npmjs.org/@beoe/rehype-penrose/-/rehype-penrose-0.1.0.tgz","fileCount":7,"integrity":"sha512-rMG7ABUDavnWDFYXU5QfqdhankBN5vrpEUSw4Ywm/dZOyFGSS00+2upyBYfIpjMOyFZ6QB4HIwUJPT95Nnq6Lw==","signatures":[{"sig":"MEQCIE+mSpz9nzyLHATA+dmh1kGUicdtItMUdrZ7u6LHgbpNAiBR8wO3mX4ke+YDfikBpX52nMqfaG7xvoknDvIujvwpwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6995},"main":"./dist/index.js","type":"module","_from":"file:beoe-rehype-penrose-0.1.0.tgz","types":"./dist/index.d.js","module":"./dist/index.js","exports":{"types":"./dist/index.d.js","default":"./dist/index.js"},"scripts":{"dev":"tsc --watch","test":"vitest","build":"rm -rf dist && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"stereobooster","email":"stereobooster@gmail.com"},"_resolved":"/private/var/folders/vv/fk4322kj49bcxmxz9kbnwjv00000gp/T/2441f9e9e3ce1e4de377b727d2fabc14/beoe-rehype-penrose-0.1.0.tgz","_integrity":"sha512-rMG7ABUDavnWDFYXU5QfqdhankBN5vrpEUSw4Ywm/dZOyFGSS00+2upyBYfIpjMOyFZ6QB4HIwUJPT95Nnq6Lw==","repository":{"url":"git+https://github.com/stereobooster/beoe.git","type":"git","directory":"packages/rehype-penrose"},"_npmVersion":"10.8.2","description":"rehype penrose plugin","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"global-jsdom":"^26.0.0","@penrose/core":"3.2.0","@beoe/rehype-code-hook-img":"0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"unified":"^11.0.5","@types/hast":"^3.0.4","remark-parse":"^11.0.0","remark-rehype":"^11.1.1","rehype-stringify":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/rehype-penrose_0.1.0_1737681526332_0.08479924008162576","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@beoe/rehype-penrose","version":"0.2.0","keywords":["rehype","penrose"],"author":{"name":"stereobooster"},"license":"MIT","_id":"@beoe/rehype-penrose@0.2.0","maintainers":[{"name":"stereobooster","email":"stereobooster@gmail.com"}],"homepage":"https://beoe.stereobooster.com/diagrams/penrose/","bugs":{"url":"https://github.com/stereobooster/beoe/issues"},"dist":{"shasum":"b073fc743e06f4cab393bd06fb1dcb6e8e9b2847","tarball":"https://registry.npmjs.org/@beoe/rehype-penrose/-/rehype-penrose-0.2.0.tgz","fileCount":7,"integrity":"sha512-g0Wfh/1OsdaQyadplWMX6DX9YwAogbjayg+buWTiMUKTg/coJrGGSQbSNtsG9pYFshZ3a0rurF+ERVYSrh6BOw==","signatures":[{"sig":"MEQCIE44FJbTtmc2FnYgjN46OryfDRfdaBATlS/A2YirOTJRAiBYjkl8UdcIo1YrOEX5sLZe4HmpaL0tvS1cai27zQd6Qg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7004},"main":"./dist/index.js","type":"module","types":"./dist/index.d.js","module":"./dist/index.js","exports":{"types":"./dist/index.d.js","default":"./dist/index.js"},"gitHead":"0cc8b3c2d7aa4ec5a6c4ad4f2b210e7c310f9075","scripts":{"dev":"tsc --watch","test":"vitest","build":"rm -rf dist && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"stereobooster","email":"stereobooster@gmail.com"},"repository":{"url":"git+https://github.com/stereobooster/beoe.git","type":"git","directory":"packages/rehype-penrose"},"_npmVersion":"10.8.2","description":"rehype penrose plugin","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"global-jsdom":"^26.0.0","@penrose/core":"^3.2.0","@beoe/rehype-code-hook-img":"^workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"unified":"^11.0.5","@types/hast":"^3.0.4","remark-parse":"^11.0.0","remark-rehype":"^11.1.1","rehype-stringify":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/rehype-penrose_0.2.0_1740692197992_0.9203205187589589","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@beoe/rehype-penrose","version":"0.2.1","keywords":["rehype","penrose"],"author":{"name":"stereobooster"},"license":"MIT","_id":"@beoe/rehype-penrose@0.2.1","maintainers":[{"name":"stereobooster","email":"stereobooster@gmail.com"}],"homepage":"https://beoe.stereobooster.com/diagrams/penrose/","bugs":{"url":"https://github.com/stereobooster/beoe/issues"},"dist":{"shasum":"a5401466344ca5d6c0b46b1ddde934977f02f332","tarball":"https://registry.npmjs.org/@beoe/rehype-penrose/-/rehype-penrose-0.2.1.tgz","fileCount":7,"integrity":"sha512-3vPr8Ie43Q6GVAGRWCfWHcR/lupMR2aGnfWTx67BThbdfoFyNGWRehxBq6OIQAv/qxxsE0KpKeUuvqqj+zc1bA==","signatures":[{"sig":"MEQCIGnANmYggBnIeIUI06wwpG+iDBqMfb0DqEr3wYQnhGByAiAMLDeSn9/J9QVelpiyD4+1lSiaht/z03cgDk3FtI5C0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7004},"main":"./dist/index.js","type":"module","types":"./dist/index.d.js","module":"./dist/index.js","exports":{"types":"./dist/index.d.js","default":"./dist/index.js"},"gitHead":"e2933dd1636ccd8871456e0a807374c33937df24","scripts":{"dev":"tsc --watch","test":"vitest","build":"rm -rf dist && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"stereobooster","email":"stereobooster@gmail.com"},"repository":{"url":"git+https://github.com/stereobooster/beoe.git","type":"git","directory":"packages/rehype-penrose"},"_npmVersion":"10.8.2","description":"rehype penrose plugin","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"global-jsdom":"^26.0.0","@penrose/core":"^3.2.0","@beoe/rehype-code-hook-img":"workspace:^*"},"_hasShrinkwrap":false,"devDependencies":{"unified":"^11.0.5","@types/hast":"^3.0.4","remark-parse":"^11.0.0","remark-rehype":"^11.1.1","rehype-stringify":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/rehype-penrose_0.2.1_1740692715565_0.1979659394092852","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@beoe/rehype-penrose","type":"module","version":"0.2.2","description":"rehype penrose plugin","keywords":["rehype","penrose"],"author":{"name":"stereobooster"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stereobooster/beoe.git","directory":"packages/rehype-penrose"},"homepage":"https://beoe.stereobooster.com/diagrams/penrose/","sideEffects":false,"exports":{"types":"./dist/index.d.js","default":"./dist/index.js"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.js","dependencies":{"@penrose/core":"^3.2.0","global-jsdom":"^26.0.0","@beoe/rehype-code-hook-img":"^0.4.0"},"devDependencies":{"@types/hast":"^3.0.4","rehype-stringify":"^10.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.1","unified":"^11.0.5"},"scripts":{"test":"vitest","build":"rm -rf dist && tsc","dev":"tsc --watch","clean":"rm -rf dist"},"_id":"@beoe/rehype-penrose@0.2.2","bugs":{"url":"https://github.com/stereobooster/beoe/issues"},"_integrity":"sha512-KQcFlKYtxBS0x1cWz/YtngAniC685+93hiIiRNxa8MlcMKGBAH2vZLU04MTCaO7n9SHaomTXwulujLZI72Ej6Q==","_resolved":"/private/var/folders/vv/fk4322kj49bcxmxz9kbnwjv00000gp/T/a067fa29db5fe3ff185e6d13a4ddccd5/beoe-rehype-penrose-0.2.2.tgz","_from":"file:beoe-rehype-penrose-0.2.2.tgz","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-KQcFlKYtxBS0x1cWz/YtngAniC685+93hiIiRNxa8MlcMKGBAH2vZLU04MTCaO7n9SHaomTXwulujLZI72Ej6Q==","shasum":"254eb406d6ab5e3f43a79a0fba8e883648f6ac9d","tarball":"https://registry.npmjs.org/@beoe/rehype-penrose/-/rehype-penrose-0.2.2.tgz","fileCount":7,"unpackedSize":6997,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCoZi+6NfkBC3wUjUmuaPDd2e60xfq8/ltJ/mWVT0EHegIgdicbHiFEESvrCEh48FEI+dPHYO1L5CS2d0QTAq4pZVA="}]},"_npmUser":{"name":"stereobooster","email":"stereobooster@gmail.com"},"directories":{},"maintainers":[{"name":"stereobooster","email":"stereobooster@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rehype-penrose_0.2.2_1740694902864_0.774831412196036"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-24T01:18:46.206Z","modified":"2025-02-27T22:21:43.239Z","0.1.0":"2025-01-24T01:18:46.540Z","0.2.0":"2025-02-27T21:36:38.194Z","0.2.1":"2025-02-27T21:45:15.727Z","0.2.2":"2025-02-27T22:21:43.069Z"},"bugs":{"url":"https://github.com/stereobooster/beoe/issues"},"author":{"name":"stereobooster"},"license":"MIT","homepage":"https://beoe.stereobooster.com/diagrams/penrose/","keywords":["rehype","penrose"],"repository":{"type":"git","url":"git+https://github.com/stereobooster/beoe.git","directory":"packages/rehype-penrose"},"description":"rehype penrose plugin","maintainers":[{"name":"stereobooster","email":"stereobooster@gmail.com"}],"readme":"# @beoe/rehype-penrose\n\nRehype plugin to generate [penrose](https://penrose.cs.cmu.edu/) diagrams in place of code fences. This\n\n````md\n```penrose style=\"euclidean.style\" domain=\"euclidean.domain\" width=800 height=800\nPlane P\nPoint p, q, r, s\nIn(p, P)\nIn(q, P)\nIn(r, P)\nIn(s, P)\nLet a := Segment(p, q)\nLet b := Segment(p, r)\nPoint m := Midpoint(a)\nIn(m, P)\nAngle theta := InteriorAngle(q, p, r)\nLet t := Triangle(p, r, s)\nRay w := Bisector(theta)\nSegment h := PerpendicularBisector(a, m)\nAutoLabel p, q, r, s, m\nLabel P $E^2$\n```\n````\n\nwill be converted to\n\n```html\n<figure class=\"beoe penrose\">\n  <svg>...</svg>\n</figure>\n```\n\nwhich looks like this:\n\n![example of how generated graph looks](./example.svg)\n\n**Note**:\n\nYou need to add **domain** and **style** files to `shared` folder, for example:\n\n- [`euclidean.domain`](./test/shared/euclidean.domain)\n- [`euclidean.style`](./test/shared/euclidean.style)\n\n## Usage\n\n```js\nimport rehypePenrose from \"@beoe/rehype-penrose\";\n\nconst html = await unified()\n  .use(remarkParse)\n  .use(remarkRehype)\n  .use(rehypePenrose, { shared: \"shared\" })\n  .use(rehypeStringify)\n  .process(`markdown`);\n```\n\n[Online documentation](https://beoe.stereobooster.com/diagrams/penrose/) provides more details.\n\n## TODO\n\n- [ ] fix SVGO issue\n","readmeFilename":"README.md"}