prosemirror-view 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +9 -1
- package/package.json +1 -1
- package/src/README.md +4 -0
- package/src/index.ts +8 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -536,7 +536,15 @@ declare class EditorView {
|
|
|
536
536
|
*/
|
|
537
537
|
dispatch(tr: Transaction): void;
|
|
538
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
The type of function [provided](https://prosemirror.net/docs/ref/#view.ViewProps.nodeViews) to
|
|
541
|
+
create [node views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
542
|
+
*/
|
|
539
543
|
declare type NodeViewConstructor = (node: Node, view: EditorView, getPos: () => number, decorations: readonly Decoration[], innerDecorations: DecorationSource) => NodeView;
|
|
544
|
+
/**
|
|
545
|
+
The function types [used](https://prosemirror.net/docs/ref/#view.ViewProps.markViews) to create
|
|
546
|
+
mark views.
|
|
547
|
+
*/
|
|
540
548
|
declare type MarkViewConstructor = (mark: Mark, view: EditorView, inline: boolean) => {
|
|
541
549
|
dom: HTMLElement;
|
|
542
550
|
contentDOM?: HTMLElement;
|
|
@@ -812,4 +820,4 @@ interface DirectEditorProps extends EditorProps {
|
|
|
812
820
|
dispatchTransaction?: (tr: Transaction) => void;
|
|
813
821
|
}
|
|
814
822
|
|
|
815
|
-
export { DOMEventMap, Decoration, DecorationAttrs, DecorationSet, DecorationSource, DirectEditorProps, EditorProps, EditorView, NodeView };
|
|
823
|
+
export { DOMEventMap, Decoration, DecorationAttrs, DecorationSet, DecorationSource, DirectEditorProps, EditorProps, EditorView, MarkViewConstructor, NodeView, NodeViewConstructor };
|
package/package.json
CHANGED
package/src/README.md
CHANGED
package/src/index.ts
CHANGED
|
@@ -497,9 +497,14 @@ function checkStateComponent(plugin: Plugin) {
|
|
|
497
497
|
throw new RangeError("Plugins passed directly to the view must not have a state component")
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
type
|
|
501
|
-
|
|
502
|
-
type
|
|
500
|
+
/// The type of function [provided](#view.ViewProps.nodeViews) to
|
|
501
|
+
/// create [node views](#view.NodeView).
|
|
502
|
+
export type NodeViewConstructor = (node: Node, view: EditorView, getPos: () => number,
|
|
503
|
+
decorations: readonly Decoration[], innerDecorations: DecorationSource) => NodeView
|
|
504
|
+
|
|
505
|
+
/// The function types [used](#view.ViewProps.markViews) to create
|
|
506
|
+
/// mark views.
|
|
507
|
+
export type MarkViewConstructor = (mark: Mark, view: EditorView, inline: boolean) => {dom: HTMLElement, contentDOM?: HTMLElement}
|
|
503
508
|
|
|
504
509
|
type NodeViewSet = {[name: string]: NodeViewConstructor | MarkViewConstructor}
|
|
505
510
|
|