@magic-marker/prosemirror-suggest-changes 0.2.1-block-join.2 → 0.2.1-block-join.3

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.
@@ -0,0 +1,14 @@
1
+ import { type Locator, type Page } from "@playwright/test";
2
+ export declare class EditorPage {
3
+ readonly page: Page;
4
+ private readonly selectors;
5
+ constructor(page: Page);
6
+ get editor(): Locator;
7
+ getParagraphText(index: number): Promise<string>;
8
+ getParagraphCount(): Promise<number>;
9
+ getProseMirrorMarkCount(name: string): Promise<number>;
10
+ getProseMirrorSelection(): Promise<{
11
+ anchor: number;
12
+ head: number;
13
+ }>;
14
+ }
package/dist/schema.js CHANGED
@@ -46,16 +46,23 @@ export const deletion = {
46
46
  export const hiddenDeletion = {
47
47
  ...deletion,
48
48
  toDOM (mark, inline) {
49
+ const isAnchor = mark.attrs["type"] === "anchor";
50
+ const blockStyle = `display: block;`;
51
+ const inlineStyle = `display: inline;`;
52
+ const hiddenStyle = `display: inline; font-size: 1px; line-height: 0px; color: transparent;`;
49
53
  return [
50
54
  "del",
51
55
  {
52
56
  "data-id": JSON.stringify(mark.attrs["id"]),
53
57
  "data-inline": String(inline),
54
58
  ...!inline && {
55
- style: "display: block"
59
+ style: blockStyle
60
+ },
61
+ ...inline && isAnchor && {
62
+ style: inlineStyle
56
63
  },
57
- ...inline && mark.attrs["type"] !== "anchor" && {
58
- style: "font-size: 0px;"
64
+ ...inline && !isAnchor && {
65
+ style: hiddenStyle
59
66
  },
60
67
  "data-type": JSON.stringify(mark.attrs["type"]),
61
68
  "data-data": JSON.stringify(mark.attrs["data"])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-marker/prosemirror-suggest-changes",
3
- "version": "0.2.1-block-join.2",
3
+ "version": "0.2.1-block-join.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",