@types/prosemirror-view
Advanced tools
Comparing version 1.19.0 to 1.19.1
@@ -51,7 +51,7 @@ // Type definitions for prosemirror-view 1.19 | ||
*/ | ||
side?: number | null; | ||
side?: number | null | undefined; | ||
/** | ||
* The precise set of marks to draw around the widget. | ||
*/ | ||
marks?: Mark[] | null; | ||
marks?: Mark[] | null | undefined; | ||
/** | ||
@@ -61,3 +61,3 @@ * Can be used to control which DOM events, when they bubble out | ||
*/ | ||
stopEvent?: ((event: Event) => boolean) | null; | ||
stopEvent?: ((event: Event) => boolean) | null | undefined; | ||
/** | ||
@@ -80,3 +80,3 @@ * When set (defaults to false), selection changes inside the | ||
*/ | ||
key?: string | null; | ||
key?: string | null | undefined; | ||
} | ||
@@ -94,7 +94,7 @@ /** | ||
*/ | ||
inclusiveStart?: boolean | null; | ||
inclusiveStart?: boolean | null | undefined; | ||
/** | ||
* Determines how the right side of the decoration is mapped. | ||
*/ | ||
inclusiveEnd?: boolean | null; | ||
inclusiveEnd?: boolean | null | undefined; | ||
} | ||
@@ -166,7 +166,7 @@ /** | ||
*/ | ||
class?: string | null; | ||
class?: string | null | undefined; | ||
/** | ||
* A string of CSS to be _added_ to the node's existing `style` property. | ||
*/ | ||
style?: string | null; | ||
style?: string | null | undefined; | ||
/** | ||
@@ -176,3 +176,3 @@ * When non-null, the target node is wrapped in a DOM element of | ||
*/ | ||
nodeName?: string | null; | ||
nodeName?: string | null | undefined; | ||
/** | ||
@@ -207,3 +207,3 @@ * Specify additional attrs that will be mapped directly to the | ||
doc: ProsemirrorNode<S>, | ||
options?: { onRemove?: ((decorationSpec: { [key: string]: any }) => void) | null }, | ||
options?: { onRemove?: ((decorationSpec: { [key: string]: any }) => void) | null | undefined }, | ||
): DecorationSet<S>; | ||
@@ -263,3 +263,3 @@ /** | ||
*/ | ||
dragging?: { slice: Slice<S>; move: boolean } | null; | ||
dragging?: { slice: Slice<S>; move: boolean } | null | undefined; | ||
/** | ||
@@ -414,11 +414,11 @@ * Holds true when a composition is active. | ||
*/ | ||
handleDOMEvents?: HandleDOMEventsProp<ThisT, S> | null; | ||
handleDOMEvents?: HandleDOMEventsProp<ThisT, S> | null | undefined; | ||
/** | ||
* Called when the editor receives a `keydown` event. | ||
*/ | ||
handleKeyDown?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null; | ||
handleKeyDown?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null | undefined; | ||
/** | ||
* Handler for `keypress` events. | ||
*/ | ||
handleKeyPress?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null; | ||
handleKeyPress?: ((this: ThisT, view: EditorView<S>, event: KeyboardEvent) => boolean) | null | undefined; | ||
/** | ||
@@ -429,3 +429,6 @@ * Whenever the user directly input text, this handler is called | ||
*/ | ||
handleTextInput?: ((this: ThisT, view: EditorView<S>, from: number, to: number, text: string) => boolean) | null; | ||
handleTextInput?: | ||
| ((this: ThisT, view: EditorView<S>, from: number, to: number, text: string) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -445,3 +448,4 @@ * Called for each node around a click, from the inside out. The | ||
) => boolean) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
@@ -451,3 +455,3 @@ * Called when the editor is clicked, after `handleClickOn` handlers | ||
*/ | ||
handleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null; | ||
handleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null | undefined; | ||
/** | ||
@@ -466,7 +470,11 @@ * Called for each node around a double click. | ||
) => boolean) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
* Called when the editor is double-clicked, after `handleDoubleClickOn`. | ||
*/ | ||
handleDoubleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null; | ||
handleDoubleClick?: | ||
| ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -485,7 +493,11 @@ * Called for each node around a triple click. | ||
) => boolean) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
* Called when the editor is triple-clicked, after `handleTripleClickOn`. | ||
*/ | ||
handleTripleClick?: ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | null; | ||
handleTripleClick?: | ||
| ((this: ThisT, view: EditorView<S>, pos: number, event: MouseEvent) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -496,3 +508,6 @@ * 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; | ||
handlePaste?: | ||
| ((this: ThisT, view: EditorView<S>, event: ClipboardEvent, slice: Slice<S>) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -503,3 +518,6 @@ * 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; | ||
handleDrop?: | ||
| ((this: ThisT, view: EditorView<S>, event: Event, slice: Slice<S>, moved: boolean) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -511,3 +529,3 @@ * Called when the view, after updating its state, tries to scroll | ||
*/ | ||
handleScrollToSelection?: ((this: ThisT, view: EditorView<S>) => boolean) | null; | ||
handleScrollToSelection?: ((this: ThisT, view: EditorView<S>) => boolean) | null | undefined; | ||
/** | ||
@@ -524,3 +542,4 @@ * Can be used to override the way a selection is created when | ||
) => Selection<S> | null | undefined) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
@@ -532,3 +551,3 @@ * The [parser](#model.DOMParser) to use when reading editor changes | ||
*/ | ||
domParser?: DOMParser<S> | null; | ||
domParser?: DOMParser<S> | null | undefined; | ||
/** | ||
@@ -538,3 +557,3 @@ * Can be used to transform pasted HTML text, _before_ it is parsed, | ||
*/ | ||
transformPastedHTML?: ((this: ThisT, html: string) => string) | null; | ||
transformPastedHTML?: ((this: ThisT, html: string) => string) | null | undefined; | ||
/** | ||
@@ -545,3 +564,3 @@ * The [parser](#model.DOMParser) to use when reading content from | ||
*/ | ||
clipboardParser?: DOMParser<S> | null; | ||
clipboardParser?: DOMParser<S> | null | undefined; | ||
/** | ||
@@ -551,3 +570,3 @@ * Transform pasted plain text. The `plain` flag will be true when | ||
*/ | ||
transformPastedText?: ((this: ThisT, text: string, plain: boolean) => string) | null; | ||
transformPastedText?: ((this: ThisT, text: string, plain: boolean) => string) | null | undefined; | ||
/** | ||
@@ -563,3 +582,6 @@ * A function to parse text from the clipboard into a document | ||
*/ | ||
clipboardTextParser?: ((this: ThisT, text: string, $context: ResolvedPos<S>, plain: boolean) => Slice<S>) | null; | ||
clipboardTextParser?: | ||
| ((this: ThisT, text: string, $context: ResolvedPos<S>, plain: boolean) => Slice<S>) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -569,3 +591,3 @@ * Can be used to transform pasted content before it is applied to | ||
*/ | ||
transformPasted?: ((this: ThisT, p: Slice<S>) => Slice<S>) | null; | ||
transformPasted?: ((this: ThisT, p: Slice<S>) => Slice<S>) | null | undefined; | ||
/** | ||
@@ -587,10 +609,13 @@ * Allows you to pass custom rendering and behavior logic for nodes | ||
*/ | ||
nodeViews?: { | ||
[name: string]: ( | ||
node: ProsemirrorNode<S>, | ||
view: EditorView<S>, | ||
getPos: (() => number) | boolean, | ||
decorations: Decoration[], | ||
) => NodeView<S>; | ||
} | null; | ||
nodeViews?: | ||
| { | ||
[name: string]: ( | ||
node: ProsemirrorNode<S>, | ||
view: EditorView<S>, | ||
getPos: (() => number) | boolean, | ||
decorations: Decoration[], | ||
) => NodeView<S>; | ||
} | ||
| null | ||
| undefined; | ||
/** | ||
@@ -602,3 +627,3 @@ * The DOM serializer to use when putting content onto the | ||
*/ | ||
clipboardSerializer?: DOMSerializer<S> | null; | ||
clipboardSerializer?: DOMSerializer<S> | null | undefined; | ||
/** | ||
@@ -610,3 +635,3 @@ * A function that will be called to get the text for the current | ||
*/ | ||
clipboardTextSerializer?: ((this: ThisT, p: Slice<S>) => string) | null; | ||
clipboardTextSerializer?: ((this: ThisT, p: Slice<S>) => string) | null | undefined; | ||
/** | ||
@@ -616,3 +641,3 @@ * A set of [document decorations](#view.Decoration) to show in the | ||
*/ | ||
decorations?: ((this: ThisT, state: EditorState<S>) => DecorationSet<S> | null | undefined) | null; | ||
decorations?: ((this: ThisT, state: EditorState<S>) => DecorationSet<S> | null | undefined) | null | undefined; | ||
/** | ||
@@ -622,3 +647,3 @@ * When this returns false, the content of the view is not directly | ||
*/ | ||
editable?: ((this: ThisT, state: EditorState<S>) => boolean) | null; | ||
editable?: ((this: ThisT, state: EditorState<S>) => boolean) | null | undefined; | ||
/** | ||
@@ -637,3 +662,4 @@ * Control the DOM attributes of the editable element. May be either | ||
| ((this: ThisT, p: EditorState<S>) => { [name: string]: string } | null | undefined | void) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
@@ -644,3 +670,3 @@ * Determines the distance (in pixels) between the cursor and the | ||
*/ | ||
scrollThreshold?: number | { top: number; right: number; bottom: number; left: number } | null; | ||
scrollThreshold?: number | { top: number; right: number; bottom: number; left: number } | null | undefined; | ||
/** | ||
@@ -650,3 +676,3 @@ * Determines the extra space (in pixels) that is left above or | ||
*/ | ||
scrollMargin?: number | { top: number; right: number; bottom: number; left: number } | null; | ||
scrollMargin?: number | { top: number; right: number; bottom: number; left: number } | null | undefined; | ||
} | ||
@@ -681,3 +707,3 @@ /** | ||
*/ | ||
dispatchTransaction?: ((this: EditorView<S>, tr: Transaction<S>) => void) | null; | ||
dispatchTransaction?: ((this: EditorView<S>, tr: Transaction<S>) => void) | null | undefined; | ||
} | ||
@@ -699,3 +725,3 @@ /** | ||
*/ | ||
dom?: Node | null; | ||
dom?: Node | null | undefined; | ||
/** | ||
@@ -709,3 +735,3 @@ * The DOM node that should hold the node's content. Only meaningful | ||
*/ | ||
contentDOM?: Node | null; | ||
contentDOM?: Node | null | undefined; | ||
/** | ||
@@ -721,3 +747,6 @@ * When given, this will be called when the view is updating itself. | ||
*/ | ||
update?: ((node: ProsemirrorNode<S>, decorations: Decoration[], innerDecorations: DecorationSet) => boolean) | null; | ||
update?: | ||
| ((node: ProsemirrorNode<S>, decorations: Decoration[], innerDecorations: DecorationSet) => boolean) | ||
| null | ||
| undefined; | ||
/** | ||
@@ -727,3 +756,3 @@ * Can be used to override the way the node's selected status (as a | ||
*/ | ||
selectNode?: (() => void) | null; | ||
selectNode?: (() => void) | null | undefined; | ||
/** | ||
@@ -733,3 +762,3 @@ * When defining a `selectNode` method, you should also provide a | ||
*/ | ||
deselectNode?: (() => void) | null; | ||
deselectNode?: (() => void) | null | undefined; | ||
/** | ||
@@ -742,3 +771,3 @@ * This will be called to handle setting the selection inside the | ||
*/ | ||
setSelection?: ((anchor: number, head: number, root: Document) => void) | null; | ||
setSelection?: ((anchor: number, head: number, root: Document) => void) | null | undefined; | ||
/** | ||
@@ -749,3 +778,3 @@ * Can be used to prevent the editor view from trying to handle some | ||
*/ | ||
stopEvent?: ((event: Event) => boolean) | null; | ||
stopEvent?: ((event: Event) => boolean) | null | undefined; | ||
/** | ||
@@ -770,3 +799,4 @@ * Called when a DOM | ||
) => boolean) | ||
| null; | ||
| null | ||
| undefined; | ||
/** | ||
@@ -776,3 +806,3 @@ * Called when the node view is removed from the editor or the whole | ||
*/ | ||
destroy?: (() => void) | null; | ||
destroy?: (() => void) | null | undefined; | ||
} |
{ | ||
"name": "@types/prosemirror-view", | ||
"version": "1.19.0", | ||
"version": "1.19.1", | ||
"description": "TypeScript definitions for prosemirror-view", | ||
@@ -52,4 +52,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prosemirror-view", | ||
}, | ||
"typesPublisherContentHash": "31c47b83fb79fe7e959ef2f4bc0f411651cf50dca238eb42f0aa317f99b529f7", | ||
"typesPublisherContentHash": "bc48e8eb44516e93c3e336dc4badaa61e46263cd2f6528c32503b9f9d9574461", | ||
"typeScriptVersion": "3.7" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 06 Sep 2021 20:32:10 GMT | ||
* Last updated: Mon, 13 Sep 2021 22:01:22 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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35293
763