
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@replit/codemirror-minimap
Advanced tools
<img src="https://replit.com/badge/github/replit/codemirror-minimap" alt="Run on Replit badge"
bun i @replit/codemirror-minimap
import { basicSetup, EditorView } from 'codemirror';
import { showMinimap } from "@replit/codemirror-minimap"
let create = (v: EditorView) => {
const dom = document.createElement('div');
return { dom }
}
let view = new EditorView({
doc: "",
extensions: [
basicSetup,
showMinimap.compute(['doc'], (state) => {
return {
create,
/* optional */
displayText: 'blocks',
showOverlay: 'always',
gutters: [ { 1: '#00FF00', 2: '#00FF00' } ],
}
}),
],
parent: document.querySelector('#editor'),
})
The minimap extension exposes a few configuration options:
displayText
: customize how the editor text is displayed:
/**
* displayText?: "blocks" | "characters";
* Defaults to "characters"
*/
{
displayText: 'blocks'
}
eventHandlers
: attach event handlers to the minimap container element
/**
* eventHandlers?: {[event in keyof DOMEventMap]?: EventHandler<event>}
*/
{
eventHandlers: {
'contextmenu': (e) => onContextMenu(e)
}
}
showOverlay
: customize when the overlay showing the current viewport is visible
/**
* showOverlay?: "always" | "mouse-over";
* Defaults to "always"
*/
{
showOverlay: 'mouse-over'
}
gutters
: display a gutter on the left side of the minimap at specific lines
/**
* gutters?: Array<Record<number, string>>
* Where `number` is line number, and `string` is a color
*/
{
gutters: [ { 1: '#00FF00', 2: 'green', 3: 'rgb(0, 100, 50)' } ]
}
To build from source:
bun build
To publish a new version to NPM registry:
npm publish
FAQs
<img src="https://replit.com/badge/github/replit/codemirror-minimap" alt="Run on Replit badge"
The npm package @replit/codemirror-minimap receives a total of 2,771 weekly downloads. As such, @replit/codemirror-minimap popularity was classified as popular.
We found that @replit/codemirror-minimap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 30 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.