Socket
Socket
Sign inDemoInstall

@codemirror/language

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/language - npm Package Compare versions

Comparing version 6.6.0 to 6.7.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 6.7.0 (2023-05-19)
### New features
Export `DocInput` class for feeding editor documents to a Lezer parser.
## 6.6.0 (2023-02-13)

@@ -2,0 +8,0 @@

32

dist/index.d.ts

@@ -1,5 +0,5 @@

import { NodeProp, SyntaxNode, Parser, Tree, TreeFragment, NodeType } from '@lezer/common';
import { NodeProp, SyntaxNode, Parser, Tree, Input, TreeFragment, NodeType } from '@lezer/common';
import { LRParser, ParserConfig } from '@lezer/lr';
import * as _codemirror_state from '@codemirror/state';
import { Facet, EditorState, Extension, StateField, Range } from '@codemirror/state';
import { Facet, EditorState, Extension, Text, StateField, Range } from '@codemirror/state';
import { EditorView, DecorationSet, Command, KeyBinding, ViewUpdate, BlockInfo, Decoration } from '@codemirror/view';

@@ -67,3 +67,3 @@ import { Highlighter, Tag } from '@lezer/highlight';

/**
Syntax node prop used to register sublangauges. Should be added to
Syntax node prop used to register sublanguages. Should be added to
the top level node type for the language.

@@ -216,2 +216,22 @@ */

/**
Lezer-style
[`Input`](https://lezer.codemirror.net/docs/ref#common.Input)
object for a [`Text`](https://codemirror.net/6/docs/ref/#state.Text) object.
*/
declare class DocInput implements Input {
readonly doc: Text;
private cursor;
private cursorPos;
private string;
/**
Create an input object for the given document.
*/
constructor(doc: Text);
get length(): number;
private syncTo;
chunk(pos: number): string;
get lineChunks(): boolean;
read(from: number, to: number): string;
}
/**
A parse context provided to parsers working on the editor content.

@@ -669,3 +689,3 @@ */

} | null;
declare type DocRange = {
type DocRange = {
from: number;

@@ -758,3 +778,3 @@ to: number;

declare function codeFolding(config?: FoldConfig): Extension;
declare type Handlers = {
type Handlers = {
[event: string]: (view: EditorView, line: BlockInfo, event: Event) => boolean;

@@ -1164,2 +1184,2 @@ };

export { Config, HighlightStyle, IndentContext, LRLanguage, Language, LanguageDescription, LanguageSupport, MatchResult, ParseContext, StreamLanguage, StreamParser, StringStream, Sublanguage, TagStyle, TreeIndentContext, bracketMatching, bracketMatchingHandle, codeFolding, continuedIndent, defaultHighlightStyle, defineLanguageFacet, delimitedIndent, ensureSyntaxTree, flatIndent, foldAll, foldCode, foldEffect, foldGutter, foldInside, foldKeymap, foldNodeProp, foldService, foldState, foldable, foldedRanges, forceParsing, getIndentUnit, getIndentation, highlightingFor, indentNodeProp, indentOnInput, indentRange, indentService, indentString, indentUnit, language, languageDataProp, matchBrackets, sublanguageProp, syntaxHighlighting, syntaxParserRunning, syntaxTree, syntaxTreeAvailable, toggleFold, unfoldAll, unfoldCode, unfoldEffect };
export { Config, DocInput, HighlightStyle, IndentContext, LRLanguage, Language, LanguageDescription, LanguageSupport, MatchResult, ParseContext, StreamLanguage, StreamParser, StringStream, Sublanguage, TagStyle, TreeIndentContext, bracketMatching, bracketMatchingHandle, codeFolding, continuedIndent, defaultHighlightStyle, defineLanguageFacet, delimitedIndent, ensureSyntaxTree, flatIndent, foldAll, foldCode, foldEffect, foldGutter, foldInside, foldKeymap, foldNodeProp, foldService, foldState, foldable, foldedRanges, forceParsing, getIndentUnit, getIndentation, highlightingFor, indentNodeProp, indentOnInput, indentRange, indentService, indentString, indentUnit, language, languageDataProp, matchBrackets, sublanguageProp, syntaxHighlighting, syntaxParserRunning, syntaxTree, syntaxTreeAvailable, toggleFold, unfoldAll, unfoldCode, unfoldEffect };

2

package.json
{
"name": "@codemirror/language",
"version": "6.6.0",
"version": "6.7.0",
"description": "Language support infrastructure for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc