{"name":"@replit/codemirror-indentation-markers","description":"Render indentation markers in CodeMirror","version":"6.5.3","author":{"name":"Sergei Chestakov","email":"me@sergei.com"},"type":"module","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"license":"MIT","scripts":{"dev":"vite ./dev","build":"cm-buildhelper src/index.ts","test":"cm-runtests","prepare":"npm run build"},"peerDependencies":{"@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0"},"devDependencies":{"@codemirror/buildhelper":"^0.1.16","@codemirror/commands":"^6.0.0","@codemirror/lang-css":"^6.0.0","@codemirror/lang-python":"^6.1.1","@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","codemirror":"^6.0.0","vite":"^2.3.8"},"repository":{"type":"git","url":"git+https://github.com/replit/codemirror-indentation-markers.git"},"_id":"@replit/codemirror-indentation-markers@6.5.3","gitHead":"14fb6c0d2c7136c60a02fa5e6ba3cbcdbbe3eacf","bugs":{"url":"https://github.com/replit/codemirror-indentation-markers/issues"},"homepage":"https://github.com/replit/codemirror-indentation-markers#readme","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-hL5Sfvw3C1vgg7GolLe/uxX5T3tmgOA3ZzqlMv47zjU1ON51pzNWiVbS22oh6crYhtVhv8b3gdXwoYp++2ilHw==","shasum":"1cfe5c557c45dd7f2988cbee278f17607010591b","tarball":"http://registry-npm.ywwl.com/@replit/codemirror-indentation-markers/download/@replit/codemirror-indentation-markers-6.5.3.tgz","fileCount":17,"unpackedSize":135739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrww1+YmwPKV1zlNKFfzjDDmlNTgmwPQ9dajrlmBt4lAiAGPw938jTilzWUbv7d9ZZBR56ZHCMXbOVa5DxHM6OhLQ=="}],"size":87618,"noattachment":false,"key":"/@replit/codemirror-indentation-markers/-/@replit/codemirror-indentation-markers-6.5.3.tgz"},"_npmUser":{"name":"brianpool","email":"brian@repl.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-indentation-markers_6.5.3_1721079789551_0.5399455414500276"},"_hasShrinkwrap":false,"readme":"# CodeMirror Indentation Markers\n\n<span><a href=\"https://replit.com/@util/codemirror-indentation-markers\" title=\"Run on Replit badge\"><img src=\"https://replit.com/badge/github/replit/codemirror-indentation-markers\" alt=\"Run on Replit badge\" /></a></span>\n<span><a href=\"https://www.npmjs.com/package/@replit/codemirror-indentation-markers\" title=\"NPM version badge\"><img src=\"https://img.shields.io/npm/v/@replit/codemirror-indentation-markers?color=blue\" alt=\"NPM version badge\" /></a></span>\n\nA CodeMirror extension that renders indentation markers using a\nheuristic similar to what other popular editors, like Ace and Monaco, use.\n\n![Example](public/cm-indentation-markers.png)\n\n### Usage\n\n```ts\nimport { basicSetup } from 'codemirror';\nimport { EditorState } from '@codemirror/state';\nimport { EditorView } from '@codemirror/view';\nimport { indentationMarkers } from '@replit/codemirror-indentation-markers';\n\nconst doc = `\ndef max(a, b):\n  if a > b:\n    return a\n  else:\n    return b\n`\n\nnew EditorView({\n  state: EditorState.create({\n    doc,\n    extensions: [basicSetup, indentationMarkers()],\n  }),\n  parent: document.querySelector('#editor'),\n});\n\n```\n\n### Options\n\nYou can provide an options object to `indentationMarkers()` with the following\noptional properties:\n\n- `highlightActiveBlock`\n    \n    Boolean that determines whether the active block marker is styled\n    differently. Setting this to `false` provides a significant performance\n    enhancement because it means that markers do not need to be regenerated\n    when the selection changes. Defaults to `true`.\n \n- `hideFirstIndent`\n\n    Boolean that determines whether markers in the first column are omitted.\n    Defaults to `false`.\n  \n- `markerType`\n  \n    String that determines how far the indentation markers extend. `\"fullScope\"` indicates that the markers extend down the full height of a scope. With the `\"codeOnly\"` option, indentation markers terminate at the last nonempty line in a scope. Defaults to `\"fullScope\"`.\n\n- `thickness`\n\n    Integer that determines the thickness in pixels of the indentation markers. Defaults to `1`.\n\n- `activeThickness`\n\n    Integer that determines the thickness in pixels of the active indentation markers. If `undefined` or `null` then `thickness` will be used. Defaults to `undefined`.\n\n- `colors`\n\n    Object that determines the colors of the indentation markers.\n\n    - `light`\n\n        String that determines the color of the markers when the editor has a light theme. Defaults to `#F0F1F2`.\n\n    - `dark`\n\n        String that determines the color of the markers when the editor has a dark theme. Defaults to `#2B3245`.\n\n    - `activeLight`\n\n        String that determines the color of the active block marker when the editor has a light theme. Only applies if `highlightActiveBlock` is `true`. Defaults to `#E4E5E6`.\n\n    - `activeDark`\n\n        String that determines the color of the active block marker when the editor has a dark theme. Only applies if `highlightActiveBlock` is `true`. Defaults to `#3C445C`.\n\n#### Example\n\n```ts\nnew EditorView({\n  state: EditorState.create({\n    doc,\n    extensions: [\n      basicSetup,\n      indentationMarkers({\n        highlightActiveBlock: false,\n        hideFirstIndent: true,\n        markerType: \"codeOnly\",\n        thickness: 2,\n        colors: {\n          light: 'LightBlue',\n          dark: 'DarkBlue',\n          activeLight: 'LightGreen',\n          activeDark: 'DarkGreen',\n        }\n      })\n    ],\n  }),\n  parent: document.querySelector('#editor'),\n});\n```\n","publish_time":1721079789810,"maintainers":[{"name":"sareini","email":"mhsareini@gmail.com"},{"name":"krishatreplit","email":"krish@repl.it"},{"name":"mikewesthad","email":"michaelwesthadley@gmail.com"},{"name":"motzyball","email":"motzyball@gmail.com"},{"name":"replitdstewart","email":"devon.stewart@repl.it"},{"name":"ryanweingast","email":"ryanweingast@repl.it"},{"name":"theflowingsky","email":"devin@devinhalladay.com"},{"name":"jonesit-replit","email":"jonesit@repl.it"},{"name":"szymon_k","email":"hi@szymonkaliski.com"},{"name":"cdmistman","email":"donnelly.colton@gmail.com"},{"name":"jackyzha0","email":"j.zhao2k19@gmail.com"},{"name":"jamesaustinreplit","email":"james@replit.com"},{"name":"lopezhoracio","email":"horacio@repl.it"},{"name":"bradymaddenreplit","email":"brady@repl.it"},{"name":"ryantm","email":"ryan@repl.it"},{"name":"alexisreplit","email":"alexis@repl.it"},{"name":"ink404","email":"kirkpatrickian6@gmail.com"},{"name":"brianpool","email":"brian@repl.it"},{"name":"tobyho","email":"toby@repl.it"},{"name":"brenoafb","email":"breno.afb@gmail.com"},{"name":"masad-frost","email":"farismasad@gmail.com"},{"name":"lincolnreplit","email":"lincoln@replit.com"},{"name":"stkenned","email":"stkenned@gmail.com"},{"name":"replitmatt","email":"matthew@repl.it"},{"name":"cbrewster","email":"cbrewster@hey.com"},{"name":"ltazmin_replit","email":"laima@repl.it"},{"name":"moudy","email":"moudy.elkammash@gmail.com"},{"name":"lhchavez","email":"lhchavez@lhchavez.com"}],"_cnpm_publish_time":1721079789810,"dist-tags":{"latest":"6.5.3"}}