{"_id":"@dwelle/gatsby-embedder-excalidraw","_rev":"2-ad149f50e44a3ea1623dbfed581071fc","name":"@dwelle/gatsby-embedder-excalidraw","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.4":{"name":"@dwelle/gatsby-embedder-excalidraw","publishConfig":{"access":"public"},"version":"1.1.4","description":"Custom transformer to embed Excalidraw diagrams","main":"index.js","keywords":["embedder","excalidraw","remark","gatsby","gatsby-plugin"],"author":{"name":"Trevor Blades","email":"tdblades@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/excalidraw/gatsby-embedder-excalidraw.git"},"eslintConfig":{"extends":"@trevorblades","env":{"browser":true}},"scripts":{"start":"gatsby develop"},"devDependencies":{"@mdx-js/mdx":"^1.6.19","@mdx-js/react":"^1.6.19","@trevorblades/eslint-config":"^7.0.2","eslint":"^7.12.1","gatsby":"^2.24.91","gatsby-plugin-mdx":"^1.2.52","gatsby-remark-embedder":"^4.1.0","react":"^17.0.1","react-dom":"^17.0.1"},"peerDependencies":{"gatsby-remark-embedder":">=2"},"dependencies":{"puppeteer":"^4.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2020 Trevor Blades\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@dwelle/gatsby-embedder-excalidraw@1.1.4","dist":{"shasum":"71661191d676fbbce685dfd5316748689dad70fd","integrity":"sha512-nRRZigZnGPwrtVT/CYYVraXPNIbvtKmlYhT8cocQXxR1ZLLuawqlFXfmGFXCkeyW/bvYTXEl2+/VX4VtP/jOPg==","tarball":"https://registry.npmjs.org/@dwelle/gatsby-embedder-excalidraw/-/gatsby-embedder-excalidraw-1.1.4.tgz","fileCount":7,"unpackedSize":886276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2Ew7CRA9TVsSAnZWagAATm8P/iGthIb+jgGY/IPpcDVf\nlgoyAuKeJK+lOvvg8c/kxBxmOoALRCClX5LgLb4GIEjt3kPz5gU79jjPfGiM\naj1JjK5OoST/wCZHfvnDbhKgaxupUjwPF0H0Gc1gtf0XafjWqyzmHU6kCve/\nNseg+TqZE00rmF2JU98l0fxAUTgpIrWRn3L9BjsMEkUnyEZ3bI7ec+1iCQue\nx8gU7LZJ3wGG5QiXzDHsI+F6HnqONH+YpyvDJQNtfMc1N36ye0CDUC0NxaCT\noyhCwb5vt3IgVjhQVe1evt4YzXRwNHg/UCmfXQPjwP+HB6reN1ANhR319iBZ\nBTRynudKgmU5JKioRRlOWsvsjwfiZw6+/4MK7X54FXlaQXVAxUAxpJ5YgFoI\nmHfphfw4butM/m7TQ+7pdOJ0YNnzBYXyZbBgaEMdYiBmbYnl3TrKQJH3tN0G\nlwdl+9BRrVmv4lZY4UMS9PNoZDqCjs8xD3OTw7L4yYivU/YOQEwLLSixFgWe\nldYnLBMKsH//Bi1EVmmYVtGuaxINISRN6OuU2mQ4CjQEoE3g3mA9oD/r2mEI\nooQu5p/z/Otc7zSMKZV9bruzXQLtJZKE7mPNpl0tf7I1FdwbItEVeQPAeLQt\nMbCA/d2ckCapFl411ppaQ/CxpkLTLdYQwbMHOM/ZAM7ZbXLk9O5ILFgzVJXk\nhMQV\r\n=dZPW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMGaEU4KTU2IrtZH0Hkd0hUgSW3Nnm6I002pO8xiYMTAiEAimn2E7YEQv+jPDtq2WVu89e6uoCASl5E7k/sj8fHFeY="}]},"_npmUser":{"name":"dwelle","email":"luzar.david@gmail.com"},"directories":{},"maintainers":[{"name":"dwelle","email":"luzar.david@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-embedder-excalidraw_1.1.4_1635522792432_0.8079223979821186"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-29T15:53:12.360Z","1.1.4":"2021-10-29T15:53:12.625Z","modified":"2022-04-05T06:11:31.290Z"},"maintainers":[{"name":"dwelle","email":"luzar.david@gmail.com"}],"description":"Custom transformer to embed Excalidraw diagrams","keywords":["embedder","excalidraw","remark","gatsby","gatsby-plugin"],"repository":{"type":"git","url":"https://github.com/excalidraw/gatsby-embedder-excalidraw.git"},"author":{"name":"Trevor Blades","email":"tdblades@gmail.com"},"license":"MIT","readme":"# gatsby-embedder-excalidraw\n\nThis custom transformer for [`gatsby-remark-embedder`](https://github.com/MichaelDeBoey/gatsby-remark-embedder) allows you to embed Excalidraw diagrams in Markdown content simply by pasting an Excalidraw link in the source.\n\nThe code for this library is lifted from [this directory](https://github.com/excalidraw/excalidraw-blog/tree/d3fcdce73277f7b5f123329350309b9ca02f06e5/src/excalidraw-embed) in the [`excalidraw-blog`](https://github.com/excalidraw/excalidraw-blog) Gatsby site. All credit for this transformer goes to those authors. I was inspired to do this when I saw [Alex Luong's tweet](https://twitter.com/alex__luong/status/1257909443112497153) about making this functionality into a `gatsby-remark-excalidraw` plugin.\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Example](#example)\n  - [Install dependencies](#install-dependencies)\n  - [Configure plugins](#configure-plugins)\n  - [Create a drawing](#create-a-drawing)\n  - [Embed your drawing](#embed-your-drawing)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install gatsby-embedder-excalidraw\n```\n\n## Usage\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-transformer-remark',\n      options: {\n        plugins: [\n          {\n            resolve: 'gatsby-remark-embedder',\n            options: {\n              customTransformers: [require('gatsby-embedder-excalidraw')]\n            }\n          }\n        ]\n      }\n    }\n  ]\n};\n```\n\n## Example\n\nThis guide will show you how to get up and running with `gatsby-embedder-excalidraw` in the fewest steps possible. It uses `gatsby-plugin-mdx` to take advantage of its awesome default behaviour of automatically creating pages based on MDX files in `src/pages`.\n\n### Install dependencies\n\nFirst, install `gatsby` and its dependencies:\n\n```bash\nnpm install gatsby react react-dom\n```\n\nNext, install `gatsby-plugin-mdx` and its dependencies:\n\n```bash\nnpm install gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react\n```\n\n### Configure plugins\n\nAdd `gatsby-plugin-mdx` to your Gatsby config:\n\n```js\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-mdx'\n    }\n  ]\n};\n```\n\nInstall the `gatsby-remark-embedder` plugin and this Excalidraw transformer `gatsby-embedder-excalidraw`:\n\n```bash\nnpm install gatsby-remark-embedder gatsby-embedder-excalidraw\n```\n\nAdd `gatsby-remark-embedder` as a Gatsby remark plugin for `gatsby-plugin-mdx`. In your `gatsby-remark-embedder` options, add `gatsby-embedder-excalidraw` as a custom transformer:\n\n```diff\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n-     resolve: 'gatsby-plugin-mdx'\n+     resolve: 'gatsby-plugin-mdx',\n+     options: {\n+       gatsbyRemarkPlugins: [\n+         {\n+           resolve: 'gatsby-remark-embedder',\n+           options: {\n+             customTransformers: [require('gatsby-embedder-excalidraw')]\n+           }\n+         }\n+       ]\n+     }\n    }\n  ]\n};\n```\n\n### Create a drawing\n\nHead over to [Excalidraw](https://excalidraw.com) and draw something! Once you're satisfied, you can find a shareable link to your drawing in the export dialog, accesible from the icon in the top left corner of the page.\n\n![link](link.gif)\n\n### Embed your drawing\n\nCreate an MDX page at `src/pages/index.mdx` and add a link to an Excalidraw diagram:\n\n```markdown\n# Fox grab flowchart\n\nFox's followups after a grab depend on your opponent's DI:\n\nhttps://excalidraw.com/#json=5695519967936512,sLhjTgn1_wB1iVLLquX6Fg\n```\n\nVoila! 🎉 https://excalidraw-embed.trevorblades.com\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}