@magic-marker/prosemirror-suggest-changes 0.3.3-wrap-unwrap.17 → 0.3.3-wrap-unwrap.18

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.
@@ -37,4 +37,9 @@ export type MaterializedPaths = Map<string, {
37
37
  }>;
38
38
  export declare function guardDocParent(parent: Parent | undefined): parent is DocParent;
39
39
  export declare function guardStructureMarkAttrs(attrs: Attrs): attrs is StructureMarkAttrs;
40
+ export interface StructureMark {
41
+ type: "structure";
42
+ attrs: StructureMarkAttrs;
43
+ }
44
+ export declare function isStructureMark(mark: unknown): mark is StructureMark;
40
45
  export {};
@@ -9,3 +9,9 @@ export function guardStructureMarkAttrs(attrs) {
9
9
  if (!("op" in data)) return false;
10
10
  return true;
11
11
  }
12
+ export function isStructureMark(mark) {
13
+ if (mark === null || typeof mark !== "object") return false;
14
+ if (!("type" in mark) || mark.type !== "structure") return false;
15
+ if (!("attrs" in mark)) return false;
16
+ return guardStructureMarkAttrs(mark.attrs);
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-marker/prosemirror-suggest-changes",
3
- "version": "0.3.3-wrap-unwrap.17",
3
+ "version": "0.3.3-wrap-unwrap.18",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",