Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/prosemirror-view - npm Package Compare versions

Comparing version 1.17.2 to 1.18.0

106

prosemirror-view/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for prosemirror-view 1.17
// Type definitions for prosemirror-view 1.18
// Project: https://github.com/ProseMirror/prosemirror-view

@@ -51,7 +51,7 @@ // Definitions by: Bradley Ayers <https://github.com/bradleyayers>

*/
side?: number | null | undefined;
side?: number | null;
/**
* The precise set of marks to draw around the widget.
*/
marks?: Mark[] | null | undefined;
marks?: Mark[] | null;
/**

@@ -61,4 +61,10 @@ * Can be used to control which DOM events, when they bubble out

*/
stopEvent?: ((event: Event) => boolean) | null | undefined;
stopEvent?: ((event: Event) => boolean) | null;
/**
* When set (defaults to false), selection changes inside the
* widget are ignored, and don't cause ProseMirror to try and
* re-sync the selection with its selection state.
*/
ignoreSelection?: boolean;
/**
* When comparing decorations of this type (in order to decide

@@ -74,3 +80,3 @@ * whether it needs to be redrawn), ProseMirror will by default

*/
key?: string | null | undefined;
key?: string | null;
}

@@ -88,7 +94,7 @@ /**

*/
inclusiveStart?: boolean | null | undefined;
inclusiveStart?: boolean | null;
/**
* Determines how the right side of the decoration is mapped.
*/
inclusiveEnd?: boolean | null | undefined;
inclusiveEnd?: boolean | null;
}

@@ -160,7 +166,7 @@ /**

*/
class?: string | null | undefined;
class?: string | null;
/**
* A string of CSS to be _added_ to the node's existing `style` property.
*/
style?: string | null | undefined;
style?: string | null;
/**

@@ -170,3 +176,3 @@ * When non-null, the target node is wrapped in a DOM element of

*/
nodeName?: string | null | undefined;
nodeName?: string | null;
/**

@@ -201,3 +207,3 @@ * Specify additional attrs that will be mapped directly to the

doc: ProsemirrorNode<S>,
options?: { onRemove?: ((decorationSpec: { [key: string]: any }) => void) | null | undefined },
options?: { onRemove?: ((decorationSpec: { [key: string]: any }) => void) | null },
): DecorationSet<S>;

@@ -257,3 +263,3 @@ /**

*/
dragging?: { slice: Slice<S>; move: boolean } | null | undefined;
dragging?: { slice: Slice<S>; move: boolean } | null;
/**

@@ -408,11 +414,11 @@ * Holds true when a composition is active.

*/
handleDOMEvents?: HandleDOMEventsProp<ThisT, S> | null | undefined;
handleDOMEvents?: HandleDOMEventsProp<ThisT, S> | null;
/**
* Called when the editor receives a `keydown` event.
*/
handleKeyDown?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null | undefined;
handleKeyDown?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null;
/**
* Handler for `keypress` events.
*/
handleKeyPress?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null | undefined;
handleKeyPress?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null;
/**

@@ -423,3 +429,3 @@ * Whenever the user directly input text, this handler is called

*/
handleTextInput?: ((this: ThisT, view: EditorView<S>, from: number, to: number, text: string) => boolean) | null | undefined;
handleTextInput?: ((this: ThisT, view: EditorView<S>, from: number, to: number, text: string) => boolean) | null;
/**

@@ -439,3 +445,3 @@ * Called for each node around a click, from the inside out. The

) => boolean)
| null | undefined;
| null;
/**

@@ -445,3 +451,3 @@ * Called when the editor is clicked, after `handleClickOn` handlers

*/
handleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null | undefined;
handleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null;
/**

@@ -460,7 +466,7 @@ * Called for each node around a double click.

) => boolean)
| null | undefined;
| null;
/**
* Called when the editor is double-clicked, after `handleDoubleClickOn`.
*/
handleDoubleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null | undefined;
handleDoubleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null;
/**

@@ -479,7 +485,7 @@ * Called for each node around a triple click.

) => boolean)
| null | undefined;
| null;
/**
* Called when the editor is triple-clicked, after `handleTripleClickOn`.
*/
handleTripleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null | undefined;
handleTripleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null;
/**

@@ -490,3 +496,3 @@ * Can be used to override the behavior of pasting. `slice` is the

*/
handlePaste?: ((this: ThisT, view: EditorView<S>, event: ClipboardEvent, slice: Slice<S>) => boolean) | null | undefined;
handlePaste?: ((this: ThisT, view: EditorView<S>, event: ClipboardEvent, slice: Slice<S>) => boolean) | null;
/**

@@ -497,3 +503,3 @@ * Called when something is dropped on the editor. `moved` will be

*/
handleDrop?: ((this: ThisT, view: EditorView<S>, event: Event, slice: Slice<S>, moved: boolean) => boolean) | null | undefined;
handleDrop?: ((this: ThisT, view: EditorView<S>, event: Event, slice: Slice<S>, moved: boolean) => boolean) | null;
/**

@@ -505,3 +511,3 @@ * Called when the view, after updating its state, tries to scroll

*/
handleScrollToSelection?: ((this: ThisT, view: EditorView<S>) => boolean) | null | undefined;
handleScrollToSelection?: ((this: ThisT, view: EditorView<S>) => boolean) | null;
/**

@@ -518,3 +524,3 @@ * Can be used to override the way a selection is created when

) => Selection<S> | null | undefined)
| null | undefined;
| null;
/**

@@ -526,3 +532,3 @@ * The [parser](#model.DOMParser) to use when reading editor changes

*/
domParser?: DOMParser<S> | null | undefined;
domParser?: DOMParser<S> | null;
/**

@@ -532,3 +538,3 @@ * Can be used to transform pasted HTML text, _before_ it is parsed,

*/
transformPastedHTML?: ((this: ThisT, html: string) => string) | null | undefined;
transformPastedHTML?: ((this: ThisT, html: string) => string) | null;
/**

@@ -539,3 +545,3 @@ * The [parser](#model.DOMParser) to use when reading content from

*/
clipboardParser?: DOMParser<S> | null | undefined;
clipboardParser?: DOMParser<S> | null;
/**

@@ -545,3 +551,3 @@ * Transform pasted plain text. The `plain` flag will be true when

*/
transformPastedText?: ((this: ThisT, text: string, plain: boolean) => string) | null | undefined;
transformPastedText?: ((this: ThisT, text: string, plain: boolean) => string) | null;
/**

@@ -557,3 +563,3 @@ * A function to parse text from the clipboard into a document

*/
clipboardTextParser?: ((this: ThisT, text: string, $context: ResolvedPos<S>, plain: boolean) => Slice<S>) | null | undefined;
clipboardTextParser?: ((this: ThisT, text: string, $context: ResolvedPos<S>, plain: boolean) => Slice<S>) | null;
/**

@@ -563,3 +569,3 @@ * Can be used to transform pasted content before it is applied to

*/
transformPasted?: ((this: ThisT, p: Slice<S>) => Slice<S>) | null | undefined;
transformPasted?: ((this: ThisT, p: Slice<S>) => Slice<S>) | null;
/**

@@ -588,3 +594,3 @@ * Allows you to pass custom rendering and behavior logic for nodes

) => NodeView<S>;
} | null | undefined;
} | null;
/**

@@ -596,3 +602,3 @@ * The DOM serializer to use when putting content onto the

*/
clipboardSerializer?: DOMSerializer<S> | null | undefined;
clipboardSerializer?: DOMSerializer<S> | null;
/**

@@ -604,3 +610,3 @@ * A function that will be called to get the text for the current

*/
clipboardTextSerializer?: ((this: ThisT, p: Slice<S>) => string) | null | undefined;
clipboardTextSerializer?: ((this: ThisT, p: Slice<S>) => string) | null;
/**

@@ -610,3 +616,3 @@ * A set of [document decorations](#view.Decoration) to show in the

*/
decorations?: ((this: ThisT, state: EditorState<S>) => DecorationSet<S> | null | undefined) | null | undefined;
decorations?: ((this: ThisT, state: EditorState<S>) => DecorationSet<S> | null | undefined) | null;
/**

@@ -616,3 +622,3 @@ * When this returns false, the content of the view is not directly

*/
editable?: ((this: ThisT, state: EditorState<S>) => boolean) | null | undefined;
editable?: ((this: ThisT, state: EditorState<S>) => boolean) | null;
/**

@@ -631,3 +637,3 @@ * Control the DOM attributes of the editable element. May be either

| ((this: ThisT, p: EditorState<S>) => { [name: string]: string } | null | undefined | void)
| null | undefined;
| null;
/**

@@ -638,3 +644,3 @@ * Determines the distance (in pixels) between the cursor and the

*/
scrollThreshold?: number | { top: number; right: number; bottom: number; left: number } | null | undefined;
scrollThreshold?: number | { top: number; right: number; bottom: number; left: number } | null;
/**

@@ -644,3 +650,3 @@ * Determines the extra space (in pixels) that is left above or

*/
scrollMargin?: number | { top: number; right: number; bottom: number; left: number } | null | undefined;
scrollMargin?: number | { top: number; right: number; bottom: number; left: number } | null;
}

@@ -675,3 +681,3 @@ /**

*/
dispatchTransaction?: ((this: EditorView<S>, tr: Transaction<S>) => void) | null | undefined;
dispatchTransaction?: ((this: EditorView<S>, tr: Transaction<S>) => void) | null;
}

@@ -693,3 +699,3 @@ /**

*/
dom?: Node | null | undefined;
dom?: Node | null;
/**

@@ -703,3 +709,3 @@ * The DOM node that should hold the node's content. Only meaningful

*/
contentDOM?: Node | null | undefined;
contentDOM?: Node | null;
/**

@@ -715,3 +721,3 @@ * When given, this will be called when the view is updating itself.

*/
update?: ((node: ProsemirrorNode<S>, decorations: Decoration[]) => boolean) | null | undefined;
update?: ((node: ProsemirrorNode<S>, decorations: Decoration[]) => boolean) | null;
/**

@@ -721,3 +727,3 @@ * Can be used to override the way the node's selected status (as a

*/
selectNode?: (() => void) | null | undefined;
selectNode?: (() => void) | null;
/**

@@ -727,3 +733,3 @@ * When defining a `selectNode` method, you should also provide a

*/
deselectNode?: (() => void) | null | undefined;
deselectNode?: (() => void) | null;
/**

@@ -736,3 +742,3 @@ * This will be called to handle setting the selection inside the

*/
setSelection?: ((anchor: number, head: number, root: Document) => void) | null | undefined;
setSelection?: ((anchor: number, head: number, root: Document) => void) | null;
/**

@@ -743,3 +749,3 @@ * Can be used to prevent the editor view from trying to handle some

*/
stopEvent?: ((event: Event) => boolean) | null | undefined;
stopEvent?: ((event: Event) => boolean) | null;
/**

@@ -764,3 +770,3 @@ * Called when a DOM

) => boolean)
| null | undefined;
| null;
/**

@@ -770,3 +776,3 @@ * Called when the node view is removed from the editor or the whole

*/
destroy?: (() => void) | null | undefined;
destroy?: (() => void) | null;
}
{
"name": "@types/prosemirror-view",
"version": "1.17.2",
"version": "1.18.0",
"description": "TypeScript definitions for prosemirror-view",

@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prosemirror-view",

},
"typesPublisherContentHash": "a4cd79e0cdfc75ed5017afc6e3a293f013372d91ba9bbdca44a1cbfed466ac53",
"typesPublisherContentHash": "0be09201e863fb6de87e846a8174a169b8a54b2d86701b03e3ceab6e3320c8f2",
"typeScriptVersion": "3.6"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 07 Jul 2021 17:02:39 GMT
* Last updated: Thu, 22 Jul 2021 22:31:13 GMT
* Dependencies: [@types/prosemirror-model](https://npmjs.com/package/@types/prosemirror-model), [@types/prosemirror-state](https://npmjs.com/package/@types/prosemirror-state), [@types/prosemirror-transform](https://npmjs.com/package/@types/prosemirror-transform)

@@ -14,0 +14,0 @@ * Global values: none

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