Socket
Socket
Sign inDemoInstall

@codemirror/state

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/state - npm Package Compare versions

Comparing version 0.17.2 to 0.18.0

6

CHANGELOG.md

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

## 0.18.0 (2021-03-03)
### Breaking changes
`tagExtension` and the `reconfigure` transaction spec property have been replaced with the concept of configuration compartments and reconfiguration effects (see `Compartment`, `StateEffect.reconfigure`, and `StateEffect.appendConfig`).
## 0.17.2 (2021-02-19)

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

27

dist/index.d.ts

@@ -120,3 +120,6 @@ import { Text } from '@codemirror/text';

};
declare function tagExtension(tag: string | symbol, extension: Extension): Extension;
declare class Compartment {
of(ext: Extension): Extension;
reconfigure(content: Extension): StateEffect<unknown>;
}

@@ -135,2 +138,6 @@ declare class Annotation<T> {

}
declare class StateEffectType<Value> {
readonly map: (value: any, mapping: ChangeDesc) => any | undefined;
of(value: Value): StateEffect<Value>;
}
declare class StateEffect<Value> {

@@ -142,7 +149,5 @@ readonly value: Value;

static mapEffects(effects: readonly StateEffect<any>[], mapping: ChangeDesc): readonly StateEffect<any>[];
static reconfigure: StateEffectType<Extension>;
static appendConfig: StateEffectType<Extension>;
}
declare class StateEffectType<Value> {
readonly map: (value: any, mapping: ChangeDesc) => any | undefined;
of(value: Value): StateEffect<Value>;
}
interface TransactionSpec {

@@ -157,11 +162,5 @@ changes?: ChangeSpec;

scrollIntoView?: boolean;
reconfigure?: ReconfigurationSpec;
filter?: boolean;
sequential?: boolean;
}
interface ReconfigurationSpec {
full?: Extension;
append?: Extension;
[tag: string]: Extension | undefined;
}
declare class Transaction {

@@ -172,3 +171,2 @@ readonly startState: EditorState;

readonly effects: readonly StateEffect<any>[];
readonly reconfigure: ReconfigurationSpec | undefined;
readonly scrollIntoView: boolean;

@@ -180,2 +178,3 @@ get newDoc(): Text;

get docChanged(): boolean;
get reconfigured(): boolean;
static time: AnnotationType<number>;

@@ -251,3 +250,3 @@ static userEvent: AnnotationType<string>;

static transactionFilter: Facet<(tr: Transaction) => TransactionSpec | readonly TransactionSpec[], readonly ((tr: Transaction) => TransactionSpec | readonly TransactionSpec[])[]>;
static transactionExtender: Facet<(tr: Transaction) => Pick<TransactionSpec, "effects" | "annotations" | "reconfigure"> | null, readonly ((tr: Transaction) => Pick<TransactionSpec, "effects" | "annotations" | "reconfigure"> | null)[]>;
static transactionExtender: Facet<(tr: Transaction) => Pick<TransactionSpec, "effects" | "annotations"> | null, readonly ((tr: Transaction) => Pick<TransactionSpec, "effects" | "annotations"> | null)[]>;
}

@@ -265,2 +264,2 @@

export { Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, CharCategory, EditorSelection, EditorState, EditorStateConfig, Extension, Facet, MapMode, Prec, ReconfigurationSpec, SelectionRange, StateCommand, StateEffect, StateEffectType, StateField, Transaction, TransactionSpec, combineConfig, tagExtension };
export { Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, CharCategory, Compartment, EditorSelection, EditorState, EditorStateConfig, Extension, Facet, MapMode, Prec, SelectionRange, StateCommand, StateEffect, StateEffectType, StateField, Transaction, TransactionSpec, combineConfig };
{
"name": "@codemirror/state",
"version": "0.17.2",
"version": "0.18.0",
"description": "Editor state data structures for the CodeMirror code editor",

@@ -29,3 +29,3 @@ "scripts": {

"dependencies": {
"@codemirror/text": "^0.17.0"
"@codemirror/text": "^0.18.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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