New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/view

Package Overview
Dependencies
Maintainers
2
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/view - npm Package Versions

1
1416
20

0.19.26

Diff
marijn
published 0.19.26 •

Changelog

Source

0.19.26 (2021-12-03)

New features

Widgets can now define a destroy method that is called when they are removed from the view.

marijn
published 0.19.25 •

Changelog

Source

0.19.25 (2021-12-02)

Bug fixes

Widgets around replaced ranges are now visible when their side does not point towards the replaced range.

A replaced line with a line decoration no longer creates an extra empty line block in the editor.

The scrollPastEnd extension will now over-reserve space at the bottom of the editor on startup, to prevent restored scroll positions from being clipped.

New features

EditorView.editorAttributes and contentAttributes may now hold functions that produce the attributes.

marijn
published 0.19.24 •

Changelog

Source

0.19.24 (2021-12-01)

Bug fixes

Fix a bug where lineBlockAt, for queries inside the viewport, would always return the first line in the viewport.

marijn
published 0.19.23 •

Changelog

Source

0.19.23 (2021-11-30)

Bug fixes

Fix an issue where after some kinds of changes, EditorView.viewportLineBlocks held an out-of-date set of blocks.

New features

Export EditorView.documentPadding, with information about the vertical padding of the document.

marijn
published 0.19.22 •

Changelog

Source

0.19.22 (2021-11-30)

Bug fixes

Fix an issue where editors with large vertical padding (for example via scrollPastEnd) could sometimes lose their scroll position on Chrome.

Avoid some unnecessary DOM measuring work by more carefully checking whether it is needed.

New features

The new elementAtHeight, lineBlockAtHeight, and lineBlockAt methods provide a simpler and more efficient replacement for the (now deprecated) blockAtHeight, visualLineAtHeight, and visualLineAt methods.

The editor view now exports a documentTop getter that gives you the vertical position of the top of the document. All height info is queried and reported relative to this top.

The editor view's new viewportLineBlocks property provides an array of in-viewport line blocks, and replaces the (now deprecated) viewportLines method.

marijn
published 0.19.21 •

Changelog

Source

0.19.21 (2021-11-26)

Bug fixes

Fix a problem where the DOM update would unnecessarily trigger browser relayouts.

marijn
published 0.19.20 •

Changelog

Source

0.19.20 (2021-11-19)

Bug fixes

Run a measure cycle when the editor's size spontaneously changes.

marijn
published 0.19.19 •

Changelog

Source

0.19.19 (2021-11-17)

Bug fixes

Fix a bug that caused the precedence of editorAttributes and contentAttributes to be inverted, making lower-precedence extensions override higher-precedence ones.

marijn
published 0.19.18 •

Changelog

Source

0.19.18 (2021-11-16)

Bug fixes

Fix an issue where the editor wasn't aware it was line-wrapping with its own lineWrapping extension enabled.

marijn
published 0.19.17 •

Changelog

Source

0.19.17 (2021-11-16)

Bug fixes

Avoid an issue where stretches of whitespace on line wrap points could cause the cursor to be placed outside of the content.