{"_id":"@calor/highlighter","_rev":"4-07657b9f8717790f43a49b8818e50c0d","name":"@calor/highlighter","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@calor/highlighter","version":"0.0.1","main":"dist/index.cjs","module":"dist/index.js","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./themes/*":"./dist/themes/*"},"keywords":[],"author":"","license":"ISC","devDependencies":{"tsup":"^6.7.0","typescript":"^5.0.2","@calor/core":"^0.0.1","eslint-config-calor":"0.0.0"},"peerDependencies":{"@calor/core":"^0.0.1"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","pre-commit":"lint-staged","typecheck":"tsc --noEmit --project .","dry:eslint":"eslint --ext .ts,.tsx ./src","dry:prettier":"prettier --check ./src","lint":"pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"},"types":"./dist/index.d.ts","description":"@calor/highlighter is a syntax highlighter.","_id":"@calor/highlighter@0.0.1","_integrity":"sha512-KuyNJqPv5LvgPmfS+d+qqyuJTyuv4kf6fDwzwrGHaEGbGWer9ODRlFupu5mh4gNdr8C54DUnzVCRBedCreVs1A==","_resolved":"/private/var/folders/v5/k5dsc92d6tzg97w6b63p_4sh0000gn/T/eece154eef3cbc57dcad23875534a1da/calor-highlighter-0.0.1.tgz","_from":"file:calor-highlighter-0.0.1.tgz","_nodeVersion":"18.3.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-KuyNJqPv5LvgPmfS+d+qqyuJTyuv4kf6fDwzwrGHaEGbGWer9ODRlFupu5mh4gNdr8C54DUnzVCRBedCreVs1A==","shasum":"4c9c70b913a76d09b2931042aa1cbc417d01195d","tarball":"https://registry.npmjs.org/@calor/highlighter/-/highlighter-0.0.1.tgz","fileCount":17,"unpackedSize":6818,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFVEEteNsKQu/OCrsvtdY8gASjLhrplCgAZWcJ0zLSCAIgEESafy17at7Medq4QiON8myfeIps7gZRauEWPtNW9Q4="}]},"_npmUser":{"name":"blurfx","email":"iam@xo.dev"},"directories":{},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlighter_0.0.1_1691329494503_0.4368593346016951"},"_hasShrinkwrap":false},"0.0.2":{"name":"@calor/highlighter","version":"0.0.2","main":"dist/index.cjs","module":"dist/index.js","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./themes/*":"./dist/themes/*"},"keywords":[],"author":"","license":"ISC","devDependencies":{"tsup":"^6.7.0","typescript":"^5.0.2","@calor/core":"^0.0.2","eslint-config-calor":"0.0.0"},"peerDependencies":{"@calor/core":"^0.0.2"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","pre-commit":"lint-staged","typecheck":"tsc --noEmit --project .","dry:eslint":"eslint --ext .ts,.tsx ./src","dry:prettier":"prettier --check ./src","lint":"pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"},"types":"./dist/index.d.ts","description":"@calor/highlighter is a syntax highlighter.","_id":"@calor/highlighter@0.0.2","_integrity":"sha512-4nzq2lI0/XhCpq8LdDX/m/mOuDh3wgMdIwXRSmevzDtbdTMdRqfC+oBo6WC+c9dBJmSCR0/Bfzkl7Osi9n3DZg==","_resolved":"/tmp/336fb710e20cfd4201cb7327bd9c49ac/calor-highlighter-0.0.2.tgz","_from":"file:calor-highlighter-0.0.2.tgz","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-4nzq2lI0/XhCpq8LdDX/m/mOuDh3wgMdIwXRSmevzDtbdTMdRqfC+oBo6WC+c9dBJmSCR0/Bfzkl7Osi9n3DZg==","shasum":"8f25d515f2cb620d0279478727ff40f40cbffc65","tarball":"https://registry.npmjs.org/@calor/highlighter/-/highlighter-0.0.2.tgz","fileCount":18,"unpackedSize":6977,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOw2XN+9Ev5GAF6l1KCVp2UmRZPMVPIDnJ2k9dn+F56AiEA51v/0bvsT3ZQmTS9tL7/M1euTKou4jaIxx4HzTsBTrk="}]},"_npmUser":{"name":"blurfx","email":"iam@xo.dev"},"directories":{},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlighter_0.0.2_1691382216552_0.3737044914044232"},"_hasShrinkwrap":false},"0.0.3":{"name":"@calor/highlighter","version":"0.0.3","main":"dist/index.cjs","module":"dist/index.js","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./themes/*":"./dist/themes/*"},"keywords":[],"author":"","license":"ISC","devDependencies":{"tsup":"^8.0.0","typescript":"^5.2.2","@calor/core":"^0.0.3","eslint-config-calor":"0.0.0"},"peerDependencies":{"@calor/core":"^0.0.3"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","pre-commit":"lint-staged","typecheck":"tsc --noEmit --project .","dry:eslint":"eslint --ext .ts,.tsx ./src","dry:prettier":"prettier --check ./src","lint":"pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"},"types":"./dist/index.d.ts","description":"@calor/highlighter is a syntax highlighter.","_id":"@calor/highlighter@0.0.3","_integrity":"sha512-sjPIYCxG2z5lePFYJ0Qb1zKN49MiFoUOwqmezTyHZ6rwon6Lwg/jahAszFg7CopIP9tk9/NiTyA9dYTi96hMwQ==","_resolved":"/tmp/657f99371dfd48552e309798a2f3d6d7/calor-highlighter-0.0.3.tgz","_from":"file:calor-highlighter-0.0.3.tgz","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-sjPIYCxG2z5lePFYJ0Qb1zKN49MiFoUOwqmezTyHZ6rwon6Lwg/jahAszFg7CopIP9tk9/NiTyA9dYTi96hMwQ==","shasum":"1c6febaa6015b79aa74b826a53988fc698809cc2","tarball":"https://registry.npmjs.org/@calor/highlighter/-/highlighter-0.0.3.tgz","fileCount":21,"unpackedSize":7232,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEfIDgzIrJKoyBn32j+vntpQXRiJMK7jrwXJgC+oQqJQAiEA+JpGxP5W/j6+lEhBPvTYYsVWE7rk7iDTctzOrUK2hpc="}]},"_npmUser":{"name":"blurfx","email":"iam@xo.dev"},"directories":{},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlighter_0.0.3_1700937297729_0.9389903927121015"},"_hasShrinkwrap":false},"0.0.4":{"name":"@calor/highlighter","version":"0.0.4","main":"dist/index.cjs","module":"dist/index.js","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./themes/*":"./dist/themes/*"},"keywords":[],"author":"","license":"ISC","devDependencies":{"tsup":"^8.0.0","typescript":"^5.2.2","@calor/core":"^0.0.4","eslint-config-calor":"0.0.0"},"peerDependencies":{"@calor/core":"^0.0.4"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","pre-commit":"lint-staged","typecheck":"tsc --noEmit --project .","dry:eslint":"eslint --ext .ts,.tsx ./src","dry:prettier":"prettier --check ./src","lint":"pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"},"types":"./dist/index.d.ts","description":"@calor/highlighter is a syntax highlighter.","_id":"@calor/highlighter@0.0.4","_integrity":"sha512-tMpHxqVBlFplZQFY8p3pDqdgWp/ge2/CXYVxGkFZst4z0cdNfLQCQjGYixqBhRVWqlPdbqcfVbquX68kQX1l0Q==","_resolved":"/tmp/c18b9d9f6d2b4076cd34663ae85bcccb/calor-highlighter-0.0.4.tgz","_from":"file:calor-highlighter-0.0.4.tgz","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-tMpHxqVBlFplZQFY8p3pDqdgWp/ge2/CXYVxGkFZst4z0cdNfLQCQjGYixqBhRVWqlPdbqcfVbquX68kQX1l0Q==","shasum":"b32078dc1edba92f18bc6987ca0acadb25faa19f","tarball":"https://registry.npmjs.org/@calor/highlighter/-/highlighter-0.0.4.tgz","fileCount":21,"unpackedSize":7380,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTDNgDq/42G7MgawP/H3H/LHkrb81NatQMQgmxAaw82AiEA809zsxQLmXhHrcNDJLYdAFDi4iIynUhPACKRymUvotA="}]},"_npmUser":{"name":"blurfx","email":"iam@xo.dev"},"directories":{},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlighter_0.0.4_1700941530946_0.1938522115754977"},"_hasShrinkwrap":false},"0.0.5":{"name":"@calor/highlighter","version":"0.0.5","main":"dist/index.cjs","module":"dist/index.js","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"},"./themes/*":"./dist/themes/*"},"keywords":[],"author":"","license":"ISC","devDependencies":{"tsup":"^8.0.0","typescript":"^5.2.2","@calor/core":"^0.0.5","eslint-config-calor":"0.0.0"},"peerDependencies":{"@calor/core":"^0.0.5"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsup --watch","pre-commit":"lint-staged","typecheck":"tsc --noEmit --project .","dry:eslint":"eslint --ext .ts,.tsx ./src","dry:prettier":"prettier --check ./src","lint":"pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"},"types":"./dist/index.d.ts","description":"@calor/highlighter is a syntax highlighter.","_id":"@calor/highlighter@0.0.5","_integrity":"sha512-Tp84T09fybtgQaF06kXtsGWVxPIBl5euRf1Du0zDop+kJLGCcPlmwUpcV+IWOlJ0aLy8L1Ykia5dF2PiZnNv1w==","_resolved":"/tmp/987cacf6671b30db494f242c93553c3f/calor-highlighter-0.0.5.tgz","_from":"file:calor-highlighter-0.0.5.tgz","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-Tp84T09fybtgQaF06kXtsGWVxPIBl5euRf1Du0zDop+kJLGCcPlmwUpcV+IWOlJ0aLy8L1Ykia5dF2PiZnNv1w==","shasum":"e91ed1a844e20fdc80b3a9b654fff24910eb6ca5","tarball":"https://registry.npmjs.org/@calor/highlighter/-/highlighter-0.0.5.tgz","fileCount":21,"unpackedSize":7541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNQD8RdjOGBf0+Ua0BRdGzIJH9a/fJ7oe8razrCuJoxAiEA7FNVwZdyRrIhX2Zx8Ga0nvgyb+b+Hljtcy4uLJ8Kd5g="}]},"_npmUser":{"name":"blurfx","email":"iam@xo.dev"},"directories":{},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highlighter_0.0.5_1700978262592_0.6140108368494321"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-06T13:44:54.428Z","0.0.1":"2023-08-06T13:44:54.693Z","modified":"2023-11-26T05:57:42.998Z","0.0.2":"2023-08-07T04:23:36.721Z","0.0.3":"2023-11-25T18:34:57.897Z","0.0.4":"2023-11-25T19:45:31.137Z","0.0.5":"2023-11-26T05:57:42.795Z"},"maintainers":[{"name":"blurfx","email":"iam@xo.dev"}],"description":"@calor/highlighter is a syntax highlighter.","keywords":[],"license":"ISC","readme":"# 🔥 @calor/highlighter\n\n@calor/highlighter is a syntax highlighter.\n\n## Installation\n\n```bash\n<package manager> install @calor/core @calor/highlighter\n```\n## Usage\n\nHighlight code when you don't know what language is\n```typescript\nimport { highlight } from '@calor/highlighter';\n\nconst html = highlight('console.log(\"Hello, World!\");');\n// html = <pre class=\"calor-wrapper\">...</pre>\n```\n\nHighlight code when you know what language it is.\n```typescript\nimport { Language } from '@calor/core';\nimport { highlight } from '@calor/highlighter';\nconst html = highlight('console.log(\"Hello, World!\");', Language.JavaScript);\n```\n\nInfer what language the code is written in\n```typescript\nimport { detectLanguage } from '@calor/core';\n\nconst language = detectLanguage('console.log(\"Hello, World!\");');\n// language = 'javascript'\n```\n\n## Theming\n\nThe `highlight` function returns only the HTML for highlighting without CSS or inline style.\nIf you want to apply a theme, you can define your own or use a predefined theme.\n\nYou can import predefined themes that are located under `@calor/core/themes`.\n\nFor example, in React, you can use it like this\n\n```typescript jsx\nimport { highlight } from '@calor/core';\nimport '@calor/core/themes/github-light.css';\n\nfunction App() {\n  const html = highlight(`\nconst hello = \"world!\";\nconst simpleMath = 1 + 2;\n  `)\n  return (\n    <div dangerouslySetInnerHTML={{ __html: html }}></div>\n  )\n}\n```\n\n## Language support\n\ncalor is still in development, it doesn't support all languages.\nYou can check the [issues](https://github.com/blurfx/calor/issues?q=is%3Aissue+label%3A%22language+support%22) for languages that are in development or planned.\n\n- [x] JavaScript\n- [x] TypeScript\n- [x] Go\n- [ ] Python\n- [ ] C\n- [ ] C++\n- [ ] Java\n","readmeFilename":"README.md"}