{"id":18562482,"url":"https://github.com/replit/codemirror-minimap","last_synced_at":"2025-10-03T14:22:58.921Z","repository":{"id":167386694,"uuid":"618137067","full_name":"replit/codemirror-minimap","owner":"replit","description":"Minimap extension for Codemirror 6","archived":false,"fork":false,"pushed_at":"2024-05-14T16:46:26.000Z","size":602,"stargazers_count":53,"open_issues_count":9,"forks_count":7,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-06-30T23:43:15.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@replit/codemirror-minimap","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-23T20:38:22.000Z","updated_at":"2025-06-19T19:36:47.000Z","dependencies_parsed_at":"2023-09-09T00:21:16.122Z","dependency_job_id":"459b3c2d-a9d5-4bb3-aadf-75ce69ad1fbd","html_url":"https://github.com/replit/codemirror-minimap","commit_stats":null,"previous_names":["replit/codemirror-minimap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/replit/codemirror-minimap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fcodemirror-minimap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fcodemirror-minimap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fcodemirror-minimap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fcodemirror-minimap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replit","download_url":"https://codeload.github.com/replit/codemirror-minimap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fcodemirror-minimap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264952222,"owners_count":23688038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T22:09:52.787Z","updated_at":"2025-10-03T14:22:53.859Z","avatar_url":"https://github.com/replit.png","language":"TypeScript","readme":"# Minimap for Codemirror 6\n\n\u003cdiv style=\"display:flex\"\u003e\n    \u003cspan style=\"margin-right:4px\"\u003e\n        \u003ca href=\"https://replit.com/github/replit/codemirror-minimap\" title=\"Run on Replit badge\"\u003e\u003cimg src=\"https://replit.com/badge/github/replit/codemirror-minimap\" alt=\"Run on Replit badge\" /\u003e\u003c/a\u003e\n    \u003c/span\u003e\n    \u003cspan\u003e\n        \u003ca href=\"https://www.npmjs.com/package/@replit/codemirror-minimap\" title=\"NPM version badge\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@replit/codemirror-minimap?style=flat\u0026color=orange\" height=\"32\" alt=\"NPM version badge\" /\u003e\u003c/a\u003e\n    \u003c/span\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv style=\"display:flex\"\u003e\n    \u003cimg height=\"275\" alt=\"image\" src=\"https://github.com/replit/codemirror-minimap/assets/16962017/cb2f33a2-726f-4395-a8bd-8d219a74b1e6\"\u003e\n    \u003cimg height=\"275\" alt=\"image\" src=\"https://github.com/replit/codemirror-minimap/assets/16962017/3b148589-0883-4eb0-8b26-584909cb0900\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\n\n## Installation\n\n```\nbun i @replit/codemirror-minimap\n```\n\n## Usage\n\n```typescript\nimport { basicSetup, EditorView } from 'codemirror';\nimport { showMinimap } from \"@replit/codemirror-minimap\"\n\nlet create = (v: EditorView) =\u003e {\n  const dom = document.createElement('div');\n  return { dom }\n}\n\nlet view = new EditorView({\n  doc: \"\",\n  extensions: [\n    basicSetup,\n    showMinimap.compute(['doc'], (state) =\u003e {\n      return {\n        create,\n        /* optional */\n        displayText: 'blocks',\n        showOverlay: 'always',\n        gutters: [ { 1: '#00FF00', 2: '#00FF00' } ],\n      }\n    }),\n  ],\n  parent: document.querySelector('#editor'),\n})\n```\n\n## Configuration Options\n\nThe minimap extension exposes a few configuration options:\n\n**`displayText`**: customize how the editor text is displayed:\n\n```typescript\n/**\n * displayText?: \"blocks\" | \"characters\";\n * Defaults to \"characters\"\n */\n{\n  displayText: 'blocks'\n}\n```\n\n**`eventHandlers`**: attach event handlers to the minimap container element\n\n```typescript\n/**\n * eventHandlers?: {[event in keyof DOMEventMap]?: EventHandler\u003cevent\u003e}\n */\n{\n  eventHandlers: {\n    'contextmenu': (e) =\u003e onContextMenu(e)\n  }\n}\n```\n\n**`showOverlay`**: customize when the overlay showing the current viewport is visible\n\n```typescript\n/**\n * showOverlay?: \"always\" | \"mouse-over\";\n * Defaults to \"always\"\n */\n{\n  showOverlay: 'mouse-over'\n}\n```\n\n**`gutters`**: display a gutter on the left side of the minimap at specific lines\n\n```typescript\n/**\n * gutters?: Array\u003cRecord\u003cnumber, string\u003e\u003e\n * Where `number` is line number, and `string` is a color\n */\n{\n  gutters: [ { 1: '#00FF00', 2: 'green', 3: 'rgb(0, 100, 50)' } ]\n}\n```\n\n## Build and Publish\n\nTo build from source:\n\n```\nbun build\n```\n\nTo publish a new version to NPM registry:\n\n```\nnpm publish\n```\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fcodemirror-minimap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplit%2Fcodemirror-minimap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fcodemirror-minimap/lists"}