{"_id":"@cookshack/codemirror-blank-lines","name":"@cookshack/codemirror-blank-lines","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cookshack/codemirror-blank-lines","version":"0.1.0","description":"CodeMirror 6 extension for styling blank lines","homepage":"https://git.sr.ht/~mattmundell/codemirror-blank-lines","scripts":{"prepare":"rollup -c"},"repository":{"type":"git","url":"git+https://git.sr.ht/~mattmundell/codemirror-blank-lines"},"type":"module","main":"dist/index.cjs","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"sideEffects":false,"license":"MIT","devDependencies":{"rollup":"^4.21.3"},"dependencies":{"@codemirror/state":"^6.4.1","@codemirror/view":"^6.33.0"},"_id":"@cookshack/codemirror-blank-lines@0.1.0","gitHead":"b5f2e155745ac0d78608b5ffdbdb72d55ea765e6","_nodeVersion":"20.14.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-wdO+MGwLANZfRE7MEpFAoDb00X9D+v5PBy9dV4X4V3wRMUoNjugraJQVgHKWE/icirbOcLuJdhHdd3JU3hLt0A==","shasum":"06a0025812b69a0ba179a3e52ba772a736e2c6db","tarball":"https://registry.npmjs.org/@cookshack/codemirror-blank-lines/-/codemirror-blank-lines-0.1.0.tgz","fileCount":8,"unpackedSize":8064,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICMFXyWufRTN6AkHKL18By+CNQwMC+ccc0szYZdBBP9kAiEA+D7SCfh3nsymMsk8XN+fuc8hNtfnziuNILLcdP/tibE="}]},"_npmUser":{"name":"mattmundell","email":"matt@mundell.me"},"directories":{},"maintainers":[{"name":"mattmundell","email":"matt@mundell.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-blank-lines_0.1.0_1727872845570_0.09368623981787128"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-02T12:40:45.432Z","0.1.0":"2024-10-02T12:40:45.778Z","modified":"2024-10-02T12:40:46.171Z"},"maintainers":[{"name":"mattmundell","email":"matt@mundell.me"}],"description":"CodeMirror 6 extension for styling blank lines","homepage":"https://git.sr.ht/~mattmundell/codemirror-blank-lines","repository":{"type":"git","url":"git+https://git.sr.ht/~mattmundell/codemirror-blank-lines"},"license":"MIT","readme":"# @cookshack/codemirror-blank-lines\n\nCodeMirror 6 extension for styling blank lines.\n\nAdds CSS class `cm-blank-line` to zero length lines.\n\n## Options\n\n| Name               | Default |                                              |\n|--------------------|---------|----------------------------------------------|\n| includeActiveLine  |   false | Whether to style the active line.            |\n\n## Use\n\n```javascript\nlet text = []\nfor (let i = 1; i <= 100; i++)\n  text.push((i % 5 == 0) ? \"line \" + i : \"\")\n\nwindow.view = new EditorView({\n  extensions: [ blankLines({ includeActiveLine: true }) ],\n  doc: text.join(\"\\n\"),\n  parent: document.querySelector(\"#editor\")\n})\n```\n\nThen style with CSS.\n```css\ndiv.cm-line.cm-blank-line {\n  background: lightyellow;\n  /* works, but will mess up alignment of gutter line numbers */\n  line-height: 0.9;\n}\n```\n\n## Build from source\n\n```console\n$ npm i # only needed first time\n$ npm run prepare\n```\n","readmeFilename":"README.md"}