prosemirror-view 1.32.7 → 1.33.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.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/package.json +1 -1
- package/src/decoration.ts +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -75,8 +75,8 @@ declare class Decoration {
|
|
|
75
75
|
*/
|
|
76
76
|
key?: string;
|
|
77
77
|
/**
|
|
78
|
-
Called when the widget decoration is removed
|
|
79
|
-
|
|
78
|
+
Called when the widget decoration is removed or the editor is
|
|
79
|
+
destroyed.
|
|
80
80
|
*/
|
|
81
81
|
destroy?: (node: DOMNode) => void;
|
|
82
82
|
/**
|
|
@@ -156,6 +156,10 @@ interface DecorationSource {
|
|
|
156
156
|
document.
|
|
157
157
|
*/
|
|
158
158
|
map: (mapping: Mapping, node: Node) => DecorationSource;
|
|
159
|
+
/**
|
|
160
|
+
Extract a DecorationSource containing decorations for the given child node at the given offset.
|
|
161
|
+
*/
|
|
162
|
+
forChild(offset: number, child: Node): DecorationSource;
|
|
159
163
|
}
|
|
160
164
|
/**
|
|
161
165
|
A collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such
|
package/dist/index.d.ts
CHANGED
|
@@ -75,8 +75,8 @@ declare class Decoration {
|
|
|
75
75
|
*/
|
|
76
76
|
key?: string;
|
|
77
77
|
/**
|
|
78
|
-
Called when the widget decoration is removed
|
|
79
|
-
|
|
78
|
+
Called when the widget decoration is removed or the editor is
|
|
79
|
+
destroyed.
|
|
80
80
|
*/
|
|
81
81
|
destroy?: (node: DOMNode) => void;
|
|
82
82
|
/**
|
|
@@ -156,6 +156,10 @@ interface DecorationSource {
|
|
|
156
156
|
document.
|
|
157
157
|
*/
|
|
158
158
|
map: (mapping: Mapping, node: Node) => DecorationSource;
|
|
159
|
+
/**
|
|
160
|
+
Extract a DecorationSource containing decorations for the given child node at the given offset.
|
|
161
|
+
*/
|
|
162
|
+
forChild(offset: number, child: Node): DecorationSource;
|
|
159
163
|
}
|
|
160
164
|
/**
|
|
161
165
|
A collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such
|
package/package.json
CHANGED
package/src/decoration.ts
CHANGED
|
@@ -179,8 +179,8 @@ export class Decoration {
|
|
|
179
179
|
/// different keys.
|
|
180
180
|
key?: string
|
|
181
181
|
|
|
182
|
-
/// Called when the widget decoration is removed
|
|
183
|
-
///
|
|
182
|
+
/// Called when the widget decoration is removed or the editor is
|
|
183
|
+
/// destroyed.
|
|
184
184
|
destroy?: (node: DOMNode) => void
|
|
185
185
|
|
|
186
186
|
/// Specs allow arbitrary additional properties.
|
|
@@ -258,7 +258,7 @@ export interface DecorationSource {
|
|
|
258
258
|
map: (mapping: Mapping, node: Node) => DecorationSource
|
|
259
259
|
/// @internal
|
|
260
260
|
locals(node: Node): readonly Decoration[]
|
|
261
|
-
///
|
|
261
|
+
/// Extract a DecorationSource containing decorations for the given child node at the given offset.
|
|
262
262
|
forChild(offset: number, child: Node): DecorationSource
|
|
263
263
|
/// @internal
|
|
264
264
|
eq(other: DecorationSource): boolean
|