{"_id":"@carbonplan/prism","_rev":"12-64e5aabce76b81b3843a0f1e8a7cf630","name":"@carbonplan/prism","dist-tags":{"latest":"2.0.0","develop":"2.0.0-develop.0"},"versions":{"1.0.0":{"name":"@carbonplan/prism","version":"1.0.0","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":"^0.8.4","prism-react-renderer":"^1.2.1","react-live":"^2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":"^0.8.4"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"2.6.3"},"gitHead":"df6643c3b47bf584f6f03907b936031ce8d4d8f1","_id":"@carbonplan/prism@1.0.0","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-ii7YKsIrMkPI57yjMKenUT3iUkLCz9p+l7vXQ+zuI1i+wqy50EX7T3exOistZnCqKNMa2qyGq7ou6dQ7FfVo8g==","shasum":"1c4dc994c327ed17e533e7dea99dd7197a32f814","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.0.0.tgz","fileCount":9,"unpackedSize":86694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgziQfCRA9TVsSAnZWagAApQMP/2256mcPF4skHcAQWqzZ\nFysD+3wONzhp80loJn7XydzbT/cGBs3azUsmNyQIkz+obfIuSW0gK2fFyCX0\nHESAyoiefvfsuNiJF88Kr+850u/agcqSreGBsTmPslDSLILyawEmegZYjO5y\n1jmus+SwHxA06bET80FIGiSCmHylAsqkd9amqm05xvwY/7SRF7d4W0TbsWbO\nwpnFb5YiIQ23jlBd905xmMm80IuLqT0VYh3hMdTPOI8I1rk1GzuJMY4WI2Cn\nPf7kRcJcsZ4W44StRdR15oVC4odlzN3GIodlBcC7GC5vpxBakmf93V8+BDCe\nOlO3EsmIixyudni1mPPzAX4YeQV2CgMi8bgwHrd8cDAZS3OfoM8Vq6of0+wk\nMl97SMTFkVA7aHWtUHgo+hVx6Tv+X5rFLDFEOwN0gOPbsJ/jF4Etgr3AxlrZ\n9o6N7LOc+YHyIdA/tgeBqB92QIlAyXTxwkWRgFpL7zSRk1vs4voBC1J7N/7h\nqdWqYln7A9uOL9NHarDWSVTbGYBwbJfekiGj+5Ue1OwiFhe33nrRs0CrxhtE\nWvtTLH7Z2FoJso7hMYDuQ+kf7IXy3T3yd3cu1vu0iiATPo3F17zFjnHEOFTG\nAFlHB2oT1bieE1/0G0sdVA8oWjkff3eSi+YO+C8tVKGxx5LW7+mBG50hBdys\nBkrJ\r\n=rCfW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHplZHOI9hj2JhZicw9lszGp+LrZT1gfA94F/viKvSUYAiEAiG9stUIrBInFIVt6XnTMDW6PGPm/pPFA5p3LBqzkKBI="}]},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.0.0_1624122398643_0.15054357491539028"},"_hasShrinkwrap":false},"1.0.1":{"name":"@carbonplan/prism","version":"1.0.1","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.10.0","prism-react-renderer":"^1.2.1","react-live":"^2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":">=0.10.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"2.6.3"},"gitHead":"7e7e41ac228a30653c2094a3ab5dd8ea622c43f6","_id":"@carbonplan/prism@1.0.1","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-OPt7m0vkEhYEDHFYCU7VyOxVt9o62Y6absx9BK5UvmRaGlERjc3Lt+q8Eb1FOcMhhqLqwltrONxFU5OtqJSJCQ==","shasum":"a38bdee73c8db1638f1fa805f30b4f697ece55bf","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.0.1.tgz","fileCount":9,"unpackedSize":87000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6xwMCRA9TVsSAnZWagAAdCIP/3o7mk+3/ypDlfbxqGnx\nsyug5+C/7uQfA17JJCtXvIoHjQuXq6ODHXxuPPQq4HbygSzlBJrxMYqXSE38\nWmz/scaGOEFf8hQjjb1N4QAjih5ed4M5n0YK+xBnjbqdY4jKxxg/GsPcAly+\nvryY4cSlI3OUI3AWahaAslHaCYdOQhQkavgW8t8ebfHpa+tlXkuKw9oCVxcT\nbdEEh1bgu9c+bpPKxUU0Wa1fJ2KBgMxxvDN8+mDJX5aShvKQ/X3FGe5Xd0S3\nEf/DQnDd2+c/uFPwt4TjKRbuziS6mj0FXNtHN+lCzHGkSrc/9fyVBPK9jj8L\ncL47IDua6YeWW34jZQTU7AARBR5oGbwNjcqwVH/zmtuQjLHxpOugBdWHeSMD\nSIH5Cm7LRMyRap8fVH/uwBY8mVx+gNYLwMOyUdoLBBeppaXXgepd7S54IjL/\n3iVmZtvCTdPhfF1HmZygr2cMD8rBHAa7RZbJfDyrHCq8nIdLxySboVFwyOcn\n6EVGgyYW/MkNLCn9MuJtVq6QBG5ocaHzpF8Nk3OaDEqnlHXVuJB5OlNs/RqK\nw9nurHncoL3r7YGpbXsskb0tslbFZGmU9O/QZT99tGkZ/bcndlPFYkAMXqpj\nSzYKdJILwwhrUK7kuL9tvxZk4FHFT1i9rsbNEPKNDetnvAxrUZAQWA7K+5l/\nEQ+y\r\n=5zKd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAWCzKIWVFLTY+NJSRn6oGvl9FyMfUfacUytffEgipJAiAXN5K37ESWitIVTKaehPlCen4j2JhaFkZH3YOA1kSVEQ=="}]},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.0.1_1626020876440_0.6479224594644231"},"_hasShrinkwrap":false},"1.0.2":{"name":"@carbonplan/prism","version":"1.0.2","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.10.0","prism-react-renderer":"^1.2.1","react-live":"^2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":">=0.10.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"2.6.3"},"gitHead":"97017e6ab80f3d2548047221a1bb32fca092463a","_id":"@carbonplan/prism@1.0.2","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-FAFHBUbi/feWnBY51tZzRW7QfBxb3GYCkwl2oNlqqGeXSwOKWUKri8C0OGE80yMRFCi91idckD9C/1cnySJxYg==","shasum":"b52e58c55e802ca0e487de067a34afd8b4a12792","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.0.2.tgz","fileCount":9,"unpackedSize":87000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6x1kCRA9TVsSAnZWagAA1WgQAIxEDeYvLrWF35vveyU8\nzVC/olY2le9jaEE5/cPeDkWO61EZ6sDJhJaF6XiFVKt7zCw4SDNYW4Dtz7iw\ntdveUnHyLqQKFvolTzX5w6FgR2UuvD0n2sYv+G2dux579ohiQYR0k0zy/L+i\nc/KbizW0LqCGOPTBv23srpRwqskOiRlhfMtzgWv5hgWqA68wwG1ksZoC6ZTp\nnTNqGiJt8LZhx76IBK9IfpLN6ZBeixxOxQMdQ77ia7g/7qZP49EFbpxmxuzN\nxxzMFP0kcIPJi9Un7OdrGrKfvS5jWT6rPSiK/cddxvTdRTSjCmxWjrIJ8BiM\n4Gs0I1ptLRWWofAK7pNv1MgPhD44PegXEL39ou23bOYVaMzC52IzEFBIyIMp\n3r9GW7MJKpBBQr970Jfk+j2ZDcR5ZVnGeaFDkXY12Z6z1SZCGpHYL4BajymH\n2qQW5HpsANFcBu2zYatl8BwCrqPkJ5ikFoAuGvLFo/XT35D2c0Ko4uZracyi\nzv26NqopGhR16l1OjiQ8qoWa8HG3F2kh9OCxPFox9HsMvPW3ApWCgGmsj78j\nKlKFJhdvbzCdOfzP0z2YHbXnYHNe8tf65VOsI4a44reoLtwCuhTVndZCCJx+\nVzsvIa0/LRhyINalr42qAeKC2dOuxLNLeZOHMHJf+xN0c75GyM6EalVCzGLC\n6c/Q\r\n=6wtE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTzUGtrqBHjLjSCNxC9o1io6lkXGaGRbiu+02t5bvZlgIhAO99MxIDZTp9srCAAAqFM7yZDlQF5p2Jhq1OgTLk7/L0"}]},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.0.2_1626021220358_0.30885183578983866"},"_hasShrinkwrap":false},"1.0.3":{"name":"@carbonplan/prism","version":"1.0.3","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","watch":"microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.10.0","prism-react-renderer":"^1.2.1","react-live":"^2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":">=0.10.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"2.6.3"},"gitHead":"6a0fb3d0693d29f3fa0fc99b5b939911cffadf5e","_id":"@carbonplan/prism@1.0.3","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-drTtJwcRlkntFdsnUwrbLXjudySZUBbXJmxlgSZuDlbXF6078bxR2qGbLQ5o4hRwCfgP4LAiIJhF8JWfWNCTDQ==","shasum":"a33c4d46a6ac972fe107006aa635d7b29c2746a1","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.0.3.tgz","fileCount":9,"unpackedSize":89124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg64wdCRA9TVsSAnZWagAA1fsP/1i43f2XADsQZ2U3f/hY\nWLFkjq/kJbsfEuvi9+tcmPZX+0Y7BIlcNQtydhZ6RAzc+uTqjsjzWt3mSluk\n2rkRkPP9J1ljU8s1K8FpHlkXctAu5TytRQ54DEgB9IcSVZwO+sQTLe/L6h1T\nNWK+Itu0vdJhxCU96ePPJfpi/uc6+/jGFhuJIi6fh6LMAxB6Q3yHx1FxVosy\nO5/NCeFiHKJwMfqgRVRdoox3AeOlKAAVye2sKKN7uGSpkgOpkwqThRc44dol\n0Nzr0BlgDateymDrfTxcsGT2UQ9JBTMFWgwNdKiNePl5p4IUgKFE+jH1pz9k\nSYQDfA+l/6DCcBcnYU9gLtE8mKxPTj/HnY11jHzIVwjGuVm1+ribB+in+U61\n2rwyCKWC1Pdo5uN8w0nIulsjb6uFGurfvD2s8Qpx8hMMxfwFKXTdpQrWRhG2\nmwsOgqHLFU+DplP2W/yBLq5pNjLWWWJn5J7oRTIzFZsj6NM+T8iaDrNp8hoE\n5qeNTS5p6w89Owe5FEWaIqHTOKANYUZBv9MV52oNBtllsrOUIaagOOm+9QZI\n/7EzNfthKyYie1jp7VzYPv1P6nMLp9lACLWigMGiymMIl3Eju3UUp+u3IzWo\nRq+F72pKAUmAfkeo/wsmml0HLP09lKtHPRJyM6uXUx/rWbo5uqgU6zaMyMsK\nbPHm\r\n=iV3T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDx+Dd73IaokN0tUqIrcms6amY7jZPC0U89qWWavP2hKAiAsA+qU/5a4PLNOKi54K866d7mYGjUX4BYftOdAgVmmgA=="}]},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.0.3_1626049564476_0.18793386113770882"},"_hasShrinkwrap":false},"1.0.4":{"name":"@carbonplan/prism","version":"1.0.4","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","watch":"microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.10.0","prism-react-renderer":"^1.2.1","react-live":"2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":">=0.10.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"3.0.2"},"gitHead":"f99f1f38d70218ea0fd2a1fdd77e2cc0cac70934","_id":"@carbonplan/prism@1.0.4","_nodeVersion":"16.11.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-m+2pIU9Ao9Kp9U8kCiKCXREL56+le4RIyl6E5CI1ef4y0s08f4TZ9L/CgCzoPYuQ4HR0u44NEV5l1LxUq4e9Nw==","shasum":"09743395f028b79b0bd4881a0ffda05784dba5b9","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.0.4.tgz","fileCount":9,"unpackedSize":89123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2CM7CRA9TVsSAnZWagAAZgUP/AzQTJjcSJh/cCqiyydN\ne85xLylgFeoWrI0VY3cxFp1Itw5UbG8YkOwAKecOCTcXpQ7OxLu9pFx6vbp3\nS36jzIRhzo/WtEZdFrpsOWZeLBmfcO9TyQBedhJlLPZwXLMz9kwFpC6vbaAo\nnp5BUHXt2yoVzkB2yUKSJqHTyOthNBDCPP/8jPE/cXzO0CYMTklghd3kY03O\nDiaq8dmt+Zy0oUuO4FL45cjEn+zGSdT5vbvV+TAw68fo7QIRJXOxjlfW+V5n\nwFdy/9n86+e2uPun1rfFw24fcMpOQd07FhFbmhpVSsDRZ+z7bwUUVcTfhurH\nHWBwU1noxushhfc/eDMPyTbxZgzNjfxByrwQFI89HP6gfuX4iuSttGu3nKDj\nalXXm/cFuJoSelt5CO66a1sVCxXwTikYS+EXzjMpHnciQXfdeWMmWEf2LIpA\n+E0R836tA2F8ia6mYTHmvg42xIu3lrIbsRNUtPPrgLapQs5WeP2tYaMbtm4Z\nHy5jiYTXhB9VIJNkKYsqrHbsp1L7+MGb+XEtxdOwExkg11UlhnyULJ6bJpWD\nz7kuEu6G4gCQj861NmM0TEVieNXomGD75WTuOnQu0Vzj0FBXXuW8H+VB50PT\n3yMyzlaYOHbiUAPMmiDSFTxEoQ+IIqxwD8EWpfSp3BaAaB9oFOa9yT5MnV23\n0Huy\r\n=kqeo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICV8aD0loWwJRFRyqah1kObTH/UysO7XR3ghoqpdF7qLAiEA2vbzmGGWTV356iHDeXeRjEmlv133eSjbvZLjBKISIhQ="}]},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"},{"name":"katamartin","email":"kata@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.0.4_1633894396118_0.845900848682569"},"_hasShrinkwrap":false},"1.1.0":{"name":"@carbonplan/prism","version":"1.1.0","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","watch":"microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.10.0","prism-react-renderer":"^1.2.1","react-live":"2.2.3"},"peerDependencies":{"react":"^16.14.0 || ^17.0.2","react-dom":"^16.14.0 || ^17.0.2","theme-ui":">=0.10.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"3.0.2"},"gitHead":"ee27cf074888a24243c4b6e2208764073efdea43","_id":"@carbonplan/prism@1.1.0","_nodeVersion":"16.11.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-RMAl3lZC+RTI5MzLBs3+0p1xFKFVRiPrKhhbuSBvStQlcFhJ2HxUVR5QXzThzhTFJT2cdh3WlmEo4/d4S7b1eQ==","shasum":"f9a40cd0405701e741cee6c4985562c6baa5eca3","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-1.1.0.tgz","fileCount":9,"unpackedSize":94930,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBp2FGfo+q1oRjRO5rLYXI8mpE8gf/Lu5AL1s4cr2mZQIgQ1T3fVLheEwH9uKhGMaeNpJOzso9GaLzdQvNoQln5io="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEpVPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmOw/9Fs/6HZzqbnLWEGVGBgpGLHavDN4QySTqCqiqxEvxs2hhFBV4\r\n8SSLATInN08wbbHnh0u4n7ZhAPLmPsgu0n8JDJexQ0I37kEHOM7yg+JyCebg\r\ngYEsNiI3rFfSNMmzG+deleHWdV8UZJE/Qsu8D3OOtfQlbA/7p9zU2QN4WHBg\r\nPKMWZJBzqU+1i7QYGeOsmqKqPVF1lY676LRJWAHYY7cvpUjyOKcmJ8OiPyem\r\nGS65O94cHaDBGrvmNbdBUl4vTrVS9uhN1ev3X1V8nYAkHl+eZf0QXbvgSU20\r\ntMB5oWOkpDHyDy+YS1KQJU5S6eiyfdEUXJ2cQnZ5+6GLC5BixOmbd1NHXHPl\r\nQwzCoNH6VXiOU3/pdpFBJgr1eGhhbTfVAUacbI+e+93NDVDkiWzYXiHBINX+\r\nH7wO0L61geA7qxSHuUc8YFLim9a27aqVn+e5nI7A4qG4qPzBpA1wXTF+d+eb\r\n9a/ZDtZw57xh7Gt68OVWEfBNMFaYh4KgHIYem+4OwFPgCXMzG9+0WNP2biIj\r\ne5ATPfawxarwcd+5gc+R33eGJWtn7pGfygc/6kFGatGEbrKAufZrhpZyuwoY\r\nfXIYFm80FyAITpfhrjIfrN65Jk0xYsPq4YTlU/qvK8nkMEsHIa6pAaRWZVRK\r\na68nOmcNcWe/Lh9zcxrYOI3vP9qPvT8U7+M=\r\n=pJhK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"},{"name":"katamartin","email":"kata@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_1.1.0_1662162254929_0.9093982968624339"},"_hasShrinkwrap":false},"2.0.0-develop.0":{"name":"@carbonplan/prism","version":"2.0.0-develop.0","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","watch":"microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.15.0","prism-react-renderer":"^1.2.1","react-live":"2.2.3"},"peerDependencies":{"react":">=18","react-dom":">=18","theme-ui":">=0.15.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"3.0.2"},"readme":"<img\n  src='https://carbonplan-assets.s3.amazonaws.com/monogram/dark-small.png'\n  height='48'\n/>\n\n# carbonplan / prism\n\n**components for syntax highlighting**\n\n[![GitHub][github-badge]][github]\n[![Build Status]][actions]\n![MIT License][]\n![NPM Version][]\n\n[github]: https://github.com/carbonplan/prism\n[github-badge]: https://badgen.net/badge/-/github?icon=github&label\n[build status]: https://github.com/carbonplan/prism/actions/workflows/main.yml/badge.svg\n[actions]: https://github.com/carbonplan/prism/actions/workflows/main.yml\n[mit license]: https://badgen.net/badge/license/MIT/blue\n[npm version]: https://badgen.net/npm/v/@carbonplan/prism\n\nComponents for syntax highlighting using `prism`. Includes a `Code` component for rendering code and a `LiveCode` component for interactively editing JavaScript and viewing the results. Pairs well with MDX.\n\nSee these components demoed at [design.carbonplan.org](https://design.carbonplan.org).\n\n## basic usage\n\nTo use as a standalone component, just provide the language and pass the code as children.\n\n```jsx\nimport { Code, LiveCode } from '@carbonplan/prism'\n\nexport const Index = () => {\n  return <>\n  \t<Code language='python'>a = 2</Code>\n  \t<LiveCode language='jsx' live>let a = 2</Code>\n  </>\n}\n```\n\nWhen using the `LiveCode` component you must specify the `live` flag to include the live editor. Otherwise it will render using the basic `Code` component as a fallback. We require setting the flag so that you can use the `LiveCode` component with MDX for a mix of both live and static code.\n\n## usage with MDX\n\nIn order to use markdown meta props like `live` and `theme` discussed below, note that you will need to use [`remark-mdx-code-meta`]O(https://github.com/remcohaszing/remark-mdx-code-meta) or [another solution for syntax highlighting with the meta field](https://mdxjs.com/guides/syntax-highlighting/#syntax-highlighting-with-the-meta-field).\n\nOnce enabled, import the component(s) you want and pass to an `MDXProvider`.\n\n```jsx\nimport { MDXProvider } from '@mdx-js/react'\nimport { LiveCode } from '@carbonplan/prism'\n\nconst components = {\n  pre: LiveCode,\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\nSo long as you are using the `LiveCode` component, you can specify a `live` flag on a code fence in MDX and get a live code editor.\n\nThis will be rendered as normal code\n\n````\n```jsx\nconst a = 2\n```\n````\n\nThis will be rendered as a live code editor\n\n````\n```jsx live\nconst a = 2\n```\n````\n\n## color schemes\n\nBoth the `Code` and `LiveCode` components take an optional `theme` property which specifies one of a fixed set of color themes via a string name. Here they are.\n\n`monochrome`\n\n<img width=\"668\" alt=\"CleanShot 2021-06-19 at 10 00 29@2x\" src=\"https://user-images.githubusercontent.com/3387500/122649991-5b226100-d0e5-11eb-96db-29cb9a993e17.png\">\n\n`polychrome`\n\n<img width=\"671\" alt=\"CleanShot 2021-06-19 at 10 00 39@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650005-61184200-d0e5-11eb-8699-a369dc7d6179.png\">\n\n`triadic`\n\n<img width=\"674\" alt=\"CleanShot 2021-06-19 at 10 00 49@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650012-65dcf600-d0e5-11eb-9724-82129ee14c13.png\">\n\n`warm`\n\n<img width=\"665\" alt=\"CleanShot 2021-06-19 at 10 00 59@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650017-68d7e680-d0e5-11eb-9f06-3c1606e680af.png\">\n\n`cool`\n\n<img width=\"669\" alt=\"CleanShot 2021-06-19 at 10 01 08@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650023-6ffef480-d0e5-11eb-9587-f179f711f231.png\">\n\nYou can set the `theme` once when defining the component, like this.\n\n```jsx\nimport { MDXProvider } from '@mdx-js/react'\nimport { Code } from '@carbonplan/prism'\n\nconst components = {\n  pre: ({ ...props }) => <Code theme='polychrome' {...props} />,\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\nThis will then apply to all code rendered via MDX.\n\nYou can also specify a different theme on an individual code fence, which will override the one set on the component.\n\nFor example, this will be rendered in the `monochrome` theme\n\n````\n```jsx theme=monochrome\nconst a = 2\n```\n````\n\nAnd this will be rendered in the `polychrome` theme\n\n````\n```jsx theme=polychrome\nconst a = 2\n```\n````\n\n## live code options\n\nThe `LiveCode` component also takes optional `scope` and `transform` properties. The `scope` specifies the variables you want to be available in the scope of the code editor, and the `transform` is a function to apply to code before execution.\n\nAs an example, the following ensures that all code is interpreted as a React fragment unless it is a function, and adds `useState` to the scope. Note that we set these properties while defining the component passed to the `MDXProvider`.\n\n```jsx\nimport { useState } from 'react'\nimport { MDXProvider } from '@mdx-js/react'\nimport { LiveCode } from '@carbonplan/prism'\n\nconst transform = (src) => {\n  if (!src.startsWith('()')) {\n    return `<>${src}</>`\n  } else {\n    return `${src}`\n  }\n}\n\nconst scope = {\n  useState,\n}\n\nconst components = {\n  pre: ({ ...props }) => (\n    <LiveCode transform={transform} scope={scope} {...props} />\n  ),\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\n## development\n\nTo update a component and publish a new version, first make your changes, then follow these steps\n\n- Increase the version number in `package.json`\n- `npm run build`\n- `npm publish`\n\n## license\n\nAll the code in this repository is [MIT](https://choosealicense.com/licenses/mit/) licensed, but we request that you please provide attribution if reusing any of our digital content (graphics, logo, articles, etc.).\n\n## about us\n\nCarbonPlan is a non-profit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/prism/issues/new) or [sending us an email](mailto:hello@carbonplan.org).\n","readmeFilename":"README.md","gitHead":"e21f6d36f1bef41cc12ead6434fd4939a1fd4840","_id":"@carbonplan/prism@2.0.0-develop.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-eD37Uhf0FJy+Lua/xWWa0WmkeFI1ej9vyKDJAHXM4h7cY1LL9ma4BIJlZQ2rdbAKRhN8pajhipW/1Z/UN4Jdnw==","shasum":"fdc04a7c5e53fe6272d64d6391d3c97d62098e6e","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-2.0.0-develop.0.tgz","fileCount":9,"unpackedSize":104464,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8X3KOoKchWKX9F4ldHzIPjhlbPZO6K5hJvotSnuTEPAIhANo4/CLbvDAYRnjOxuWDH0YwzU5kG7sy8jFDW0miTgnn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYbV2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoc6w//buTsFhuvXSxh2MHAr+dF2Imp4EmnDRDyj35mSisXgGw4/cmZ\r\nADtnq7JtjFSwXRywPSVaPNubr6iS/rulwWXOvDa3Yk1YM1F26uPq5qcJPBIs\r\nw9hP9X1cKizudxn0mZdgPxhYp0ulR64GMQPvzr4fQCmg9kzzgDzd5DPjrfYc\r\n3N/M6bxWhVmd/mM6q7nY3jwsMAcUJ6++/F4qi3vzloqqadafh7N3wyRoqr7L\r\nz2O7D8O52hyHkfpLFh1W/E46CEo2YDxAK21PFruPeoBqo8svxfvfluZY1m2i\r\nbWqSncxNky8SihZ/3C1QGqHUfbGcDyo/p8ZkuBEI+v4XIFfPbXUqtYLa8uKX\r\nIwTJ0aSKp4JCSSZ4VAQwu82V5VbzO7Jd2ce1C2wqA8UC760Q4t2A2Y/fA+Hj\r\nycNWSw6zNf27flUGj6jQfAoEl3YnA3Udl0o8ETdelblVIIU8No0B7jhg21uc\r\nZMVTiiYjl5PTjX9TehOLWF/uCrC3DMjz6DoBzK/Q5HbWLzISUOernD8FbqLG\r\nYCekeK/GFI8SW7/20nPH6FebnF22m24Kg3NGbwGdfaq7NmZJ845urFJUaZxY\r\n316G4K1SDH6Ei+Lq00ERRJf0GBvtCXDknWT2dUze81/Ep81nGVBgE3rQNJOC\r\n+UhO28GSzjaPgtKYHu+0crVfVjyUwlWhreI=\r\n=ev+Z\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"katamartin","email":"kata@carbonplan.org"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"},{"name":"katamartin","email":"kata@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_2.0.0-develop.0_1667347830562_0.5741511388918008"},"_hasShrinkwrap":false},"2.0.0":{"name":"@carbonplan/prism","version":"2.0.0","description":"components for syntax highlighting","main":"dst/index.js","module":"dst/index.esm.js","scripts":{"build":"rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","watch":"microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment","format":"prettier --write 'src/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"keywords":["prism","theme-ui","syntax","react"],"author":{"name":"freeman-lab"},"license":"MIT","bugs":{"url":"https://github.com/carbonplan/prism/issues"},"homepage":"https://github.com/carbonplan/prism#readme","dependencies":{"@theme-ui/color":">=0.15.0","prism-react-renderer":"^1.2.1","react-live":"2.2.3"},"peerDependencies":{"react":">=18","react-dom":">=18","theme-ui":">=0.15.0"},"devDependencies":{"microbundle":"^0.13.0","prettier":"^2.2.1","rimraf":"3.0.2"},"gitHead":"e0cfc63f5afa8001e4ccbd643bccb47eadc9d0c8","_id":"@carbonplan/prism@2.0.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-+KoAO1xychCeBWIEDvIWaxH38vBcwlyPKqzQkG1y4BFccXw1b0nN5tltosugRoeAJxdutxMM8Y0L6yy4OINFvg==","shasum":"65591dff924d5aaae75799007afc86c1806555ca","tarball":"https://registry.npmjs.org/@carbonplan/prism/-/prism-2.0.0.tgz","fileCount":9,"unpackedSize":104454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYLa2QQ7cnYZ0k2jserZtLOjwgt2/E4QwwAAZUZCtjtAIgRoD7PQD0gRuyagTDG0j9lROkJ/hyfTsb0tWPK0C+igo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbEgGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmMw//QU0NOucxL8mdlHX6ImDJbJhrMOzbscZFkopOroJ4QwjeSSNa\r\nbt464ovfK8dcWftlyiWJPAv1ED/9iAqhnW3aCgw8qrFu4/kaWYOh7wgE6ziC\r\nnnVC+AIOki+1h/Jl9Ue2U98RUR9PNDyjERkw9kWCRfhNlmsRV/bJ+fqHdcgn\r\nXqsDdY3VgxtJp6SFIhZstBuSKSBLzzg6ndu/Sjl7PH2d+aWf5IYl9s3A6x8Q\r\nJNISRwtKXolR0OHFAibBXINp8a6sxOGcM09/QZKxHpNwC3YnIacIgk90icIm\r\nawD4m8qgsJmJwPrxvRvGonhwZrV7mohpyNSb+UgyHpNPccWcva1I4toNXhy3\r\nf2A4O2So6UFcjCTuL56GIiF8sAjSNRulOFAzvKgr6KqnJaf8YHdq6FvWjTl2\r\nAIPOLzB04dr8PI5iEZdvNQDWTHFuckK5a1D3IaXPIi2DFsyFYWIn3w9Wa27O\r\n6iKchQ8iAG9hk2g+ejB0b6IS8bMf7m02OlY5rVUSVIXDVbTFz9ZGW1q57Tqx\r\nJZbuz0p3UsiVStrP2uuP8z0VKGsFv6HxbsK4UAX88Def76hZWN3dO3OVaKsf\r\nrWIEEcXuJR0n/UAydKCH4x4TTIggFZURVYwDdDN4NhJIXvUWOe8pfc+jh7Ej\r\ndyTgFCyVjMenqSYdAEFkE2o/GIa9kVyoVCU=\r\n=9UCJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"katamartin","email":"kata@carbonplan.org"},"directories":{},"maintainers":[{"name":"freeman-lab","email":"jeremy.freeman@mac.com"},{"name":"jhamman","email":"joe@carbonplan.org"},{"name":"katamartin","email":"kata@carbonplan.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prism_2.0.0_1668040710549_0.6057260249846568"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-19T17:06:38.318Z","1.0.0":"2021-06-19T17:06:38.765Z","modified":"2023-12-05T17:32:46.269Z","1.0.1":"2021-07-11T16:27:56.593Z","1.0.2":"2021-07-11T16:33:40.491Z","1.0.3":"2021-07-12T00:26:04.668Z","1.0.4":"2021-10-10T19:33:16.295Z","1.1.0":"2022-09-02T23:44:15.154Z","2.0.0-develop.0":"2022-11-02T00:10:30.744Z","2.0.0":"2022-11-10T00:38:30.795Z"},"maintainers":[{"email":"shane98c@gmail.com","name":"shane98c"},{"email":"jeremy.freeman@mac.com","name":"freeman-lab"},{"email":"kata@carbonplan.org","name":"katamartin"}],"description":"components for syntax highlighting","homepage":"https://github.com/carbonplan/prism#readme","keywords":["prism","theme-ui","syntax","react"],"repository":{"type":"git","url":"git+https://github.com/carbonplan/prism.git"},"author":{"name":"freeman-lab"},"bugs":{"url":"https://github.com/carbonplan/prism/issues"},"license":"MIT","readme":"<img\n  src='https://carbonplan-assets.s3.amazonaws.com/monogram/dark-small.png'\n  height='48'\n/>\n\n# carbonplan / prism\n\n**components for syntax highlighting**\n\n[![GitHub][github-badge]][github]\n[![Build Status]][actions]\n![MIT License][]\n![NPM Version][]\n\n[github]: https://github.com/carbonplan/prism\n[github-badge]: https://badgen.net/badge/-/github?icon=github&label\n[build status]: https://github.com/carbonplan/prism/actions/workflows/main.yml/badge.svg\n[actions]: https://github.com/carbonplan/prism/actions/workflows/main.yml\n[mit license]: https://badgen.net/badge/license/MIT/blue\n[npm version]: https://badgen.net/npm/v/@carbonplan/prism\n\nComponents for syntax highlighting using `prism`. Includes a `Code` component for rendering code and a `LiveCode` component for interactively editing JavaScript and viewing the results. Pairs well with MDX.\n\nSee these components demoed at [design.carbonplan.org](https://design.carbonplan.org).\n\n## basic usage\n\nTo use as a standalone component, just provide the language and pass the code as children.\n\n```jsx\nimport { Code, LiveCode } from '@carbonplan/prism'\n\nexport const Index = () => {\n  return <>\n  \t<Code language='python'>a = 2</Code>\n  \t<LiveCode language='jsx' live>let a = 2</Code>\n  </>\n}\n```\n\nWhen using the `LiveCode` component you must specify the `live` flag to include the live editor. Otherwise it will render using the basic `Code` component as a fallback. We require setting the flag so that you can use the `LiveCode` component with MDX for a mix of both live and static code.\n\n## usage with MDX\n\nIn order to use markdown meta props like `live` and `theme` discussed below, note that you will need to use [`remark-mdx-code-meta`]O(https://github.com/remcohaszing/remark-mdx-code-meta) or [another solution for syntax highlighting with the meta field](https://mdxjs.com/guides/syntax-highlighting/#syntax-highlighting-with-the-meta-field).\n\nOnce enabled, import the component(s) you want and pass to an `MDXProvider`.\n\n```jsx\nimport { MDXProvider } from '@mdx-js/react'\nimport { LiveCode } from '@carbonplan/prism'\n\nconst components = {\n  pre: LiveCode,\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\nSo long as you are using the `LiveCode` component, you can specify a `live` flag on a code fence in MDX and get a live code editor.\n\nThis will be rendered as normal code\n\n````\n```jsx\nconst a = 2\n```\n````\n\nThis will be rendered as a live code editor\n\n````\n```jsx live\nconst a = 2\n```\n````\n\n## color schemes\n\nBoth the `Code` and `LiveCode` components take an optional `theme` property which specifies one of a fixed set of color themes via a string name. Here they are.\n\n`monochrome`\n\n<img width=\"668\" alt=\"CleanShot 2021-06-19 at 10 00 29@2x\" src=\"https://user-images.githubusercontent.com/3387500/122649991-5b226100-d0e5-11eb-96db-29cb9a993e17.png\">\n\n`polychrome`\n\n<img width=\"671\" alt=\"CleanShot 2021-06-19 at 10 00 39@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650005-61184200-d0e5-11eb-8699-a369dc7d6179.png\">\n\n`triadic`\n\n<img width=\"674\" alt=\"CleanShot 2021-06-19 at 10 00 49@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650012-65dcf600-d0e5-11eb-9724-82129ee14c13.png\">\n\n`warm`\n\n<img width=\"665\" alt=\"CleanShot 2021-06-19 at 10 00 59@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650017-68d7e680-d0e5-11eb-9f06-3c1606e680af.png\">\n\n`cool`\n\n<img width=\"669\" alt=\"CleanShot 2021-06-19 at 10 01 08@2x\" src=\"https://user-images.githubusercontent.com/3387500/122650023-6ffef480-d0e5-11eb-9587-f179f711f231.png\">\n\nYou can set the `theme` once when defining the component, like this.\n\n```jsx\nimport { MDXProvider } from '@mdx-js/react'\nimport { Code } from '@carbonplan/prism'\n\nconst components = {\n  pre: ({ ...props }) => <Code theme='polychrome' {...props} />,\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\nThis will then apply to all code rendered via MDX.\n\nYou can also specify a different theme on an individual code fence, which will override the one set on the component.\n\nFor example, this will be rendered in the `monochrome` theme\n\n````\n```jsx theme=monochrome\nconst a = 2\n```\n````\n\nAnd this will be rendered in the `polychrome` theme\n\n````\n```jsx theme=polychrome\nconst a = 2\n```\n````\n\n## live code options\n\nThe `LiveCode` component also takes optional `scope` and `transform` properties. The `scope` specifies the variables you want to be available in the scope of the code editor, and the `transform` is a function to apply to code before execution.\n\nAs an example, the following ensures that all code is interpreted as a React fragment unless it is a function, and adds `useState` to the scope. Note that we set these properties while defining the component passed to the `MDXProvider`.\n\n```jsx\nimport { useState } from 'react'\nimport { MDXProvider } from '@mdx-js/react'\nimport { LiveCode } from '@carbonplan/prism'\n\nconst transform = (src) => {\n  if (!src.startsWith('()')) {\n    return `<>${src}</>`\n  } else {\n    return `${src}`\n  }\n}\n\nconst scope = {\n  useState,\n}\n\nconst components = {\n  pre: ({ ...props }) => (\n    <LiveCode transform={transform} scope={scope} {...props} />\n  ),\n}\n\nreturn <MDXProvider components={components}>...</MDXProvider>\n```\n\n## development\n\nTo update a component and publish a new version, first make your changes, then follow these steps\n\n- Increase the version number in `package.json`\n- `npm run build`\n- `npm publish`\n\n## license\n\nAll the code in this repository is [MIT](https://choosealicense.com/licenses/mit/) licensed, but we request that you please provide attribution if reusing any of our digital content (graphics, logo, articles, etc.).\n\n## about us\n\nCarbonPlan is a non-profit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/prism/issues/new) or [sending us an email](mailto:hello@carbonplan.org).\n","readmeFilename":"README.md"}