{"_id":"@axel669/cm-svelte","name":"@axel669/cm-svelte","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@axel669/cm-svelte","version":"0.1.0","description":"Simple binding for CodeMirror 5 (I'm not a fan of the API for 6) so that editors can be dropped into a page quickly and easily.","main":"main.mjs","type":"module","scripts":{"build/dev":"rollup -c config/dev.config.mjs"},"keywords":[],"author":{"name":"Axel"},"license":"MIT","devDependencies":{"@axel669/rollup-copy-static":"^0.1.2","@axel669/rollup-dollar-path":"^0.1.0","@axel669/rollup-html-input":"^0.1.2","@axel669/zephyr":"^*","@rollup/plugin-commonjs":"^24.1.0","@rollup/plugin-node-resolve":"^15.0.2","rollup":"^3.21.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-import-css":"^3.2.1","rollup-plugin-svelte":"^7.1.4","svelte":"^3.58.0"},"dependencies":{"codemirror":"^5.65.13"},"gitHead":"8e47907eb9b5ca163f0c292f57207181782d9bda","_id":"@axel669/cm-svelte@0.1.0","_nodeVersion":"18.12.1","_npmVersion":"8.5.3","dist":{"integrity":"sha512-GV9Qji525xsHf3JOoKOrHLf58+ZMtRMhV9vGVLVh9vmvgICt72IzT640qJ0PUFxDUm0gpNioA+tgu4s5IbSZBA==","shasum":"a9c03c11305db8481258456f77b5e10de392a9e9","tarball":"https://registry.npmjs.org/@axel669/cm-svelte/-/cm-svelte-0.1.0.tgz","fileCount":4,"unpackedSize":3498,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvVk6eBcKFzrH5fp0zuWyHwOWEcyzpRl2N/xeAinGBKQIhAMqirOWW65QoGVij/P3J9WDKS0tIraMJmtWpi1ja3Cyo"}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cm-svelte_0.1.0_1686115171880_0.583255480350005"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-07T05:19:31.793Z","0.1.0":"2023-06-07T05:19:32.035Z","modified":"2023-06-07T05:19:32.184Z"},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"description":"Simple binding for CodeMirror 5 (I'm not a fan of the API for 6) so that editors can be dropped into a page quickly and easily.","keywords":[],"author":{"name":"Axel"},"license":"MIT","readme":"# Svelte CodeMirror (cm-svelte)\n\nSimple binding for CodeMirror 5 (I'm not a fan of the API for 6) so that\neditors can be dropped into a page quickly and easily.\n\n## Usage\n```svelte\n<script>\n    import CodeMirror from \"@axel668/cm-svelte\"\n</script>\n\n<CodeMirror bind:value {options} />\n```\n> Your Svelte build configuration will need to support importing css files\n> (something like rollup-plugin-import-css) in order to use this component.\n\n### Props\n- #### value\n    The text in the editor. Supports binding and reactivity.\n- #### options\n    The CodeMirror [options](https://codemirror.net/5/doc/manual.html#config).\n    Changes to the options object will be applied to the editor even after\n    initial setup.\n- #### $$restProps\n    Any props passed to the component other than `options` and `value` are\n    passed to the container element as is, so styling can be done in any way.\n\n### Keybindings, Themes, Modes\nCodemirror 5 is a dependency of this library, so it will always be installed\nalong side it. In order to use keybinds, themes, or modes other than the\ndefault, they need to be imported into the project so that only what is listed\nis included in the build, instead of dozens of themes and language modes that\nare not in use. The imports do not need to do anything with the imported value;\neverything should work with plain script imports.\n\n```js\nimport \"codemirror/mode/javascript/javascript.js\"\nimport \"codemirror/keymap/sublime.js\"\nimport \"codemirror/theme/the-matrix.css\"\n```\n","readmeFilename":"readme.md"}