Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

refactor(editor): use stable stringify for snapshots (#10948)

pengx1799370573c806
diff --git a/tests/blocksuite/e2e/utils/actions/misc.ts b/tests/blocksuite/e2e/utils/actions/misc.ts
index 16262ca265..21cad179e3 100644
--- a/tests/blocksuite/e2e/utils/actions/misc.ts
+++ b/tests/blocksuite/e2e/utils/actions/misc.ts
@@ -8,6 +8,7 @@ import { uuidv4 } from '@blocksuite/affine/store';
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
import type { ConsoleMessage, Locator, Page } from '@playwright/test';
import { expect } from '@playwright/test';
+import stringify from 'json-stable-stringify';
import lz from 'lz-string';
import { currentEditorIndex } from '../multiple-editor.js';
@@ -881,7 +882,7 @@ export async function getPageSnapshot(page: Page, toJSON?: boolean) {
return snapshot.blocks;
});
if (toJSON) {
- return JSON.stringify(json, null, 2);
+ return stringify(json, { space: ' ' });
}
return json;
}
diff --git a/tests/blocksuite/package.json b/tests/blocksuite/package.json
index cc7b6e74e7..a233d3a969 100644
--- a/tests/blocksuite/package.json
+++ b/tests/blocksuite/package.json
@@ -11,6 +11,7 @@
"@blocksuite/integration-test": "workspace:*",
"@playwright/test": "=1.51.0",
"@toeverything/theme": "^1.1.12",
+ "json-stable-stringify": "^1.2.1",
"rxjs": "^7.8.1"
},
"bsImport": {
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/can-insert-attachment-from-slash-menu.json b/tests/blocksuite/snapshots/attachment.spec.ts/can-insert-attachment-from-slash-menu.json
index 123e7a07c0..71b75acb65 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/can-insert-attachment-from-slash-menu.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/can-insert-attachment-from-slash-menu.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:attachment",
+ "id": "3",
+ "props": {
+ "embed": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "name": "test-card-1.png",
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:attachment",
- "version": 1,
- "props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0,
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "embed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-attachment-can-be-deleted.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-attachment-can-be-deleted.json
index e7c7c2e21c..c0a852b23c 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-attachment-can-be-deleted.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-attachment-can-be-deleted.json
@@ -1,29 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,9 +18,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ }
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-1.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-1.json
index 0ee8824968..ffa6190fdb 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-1.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-1.json
@@ -1,29 +1,34 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:image",
+ "id": "4",
+ "props": {
+ "caption": "",
+ "height": 345,
+ "index": "a0",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "width": 460,
+ "xywh": "[0,0,460,345]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,28 +37,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "4",
- "flavour": "affine:image",
- "version": 1,
- "props": {
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "width": 460,
- "height": 345,
- "index": "a0",
- "xywh": "[0,0,460,345]",
- "lockedBySelf": false,
- "rotate": 0,
- "size": 45801,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-2.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-2.json
index 82cb4cf1b5..ff5c129dca 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-2.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-turn-attachment-to-image-works-2.json
@@ -1,29 +1,36 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:attachment",
+ "id": "5",
+ "props": {
+ "caption": "",
+ "embed": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "name": "test-card-1.png",
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,30 +39,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "5",
- "flavour": "affine:attachment",
- "version": 1,
- "props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "caption": "",
- "embed": false,
- "style": "horizontalThin",
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-1.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-1.json
index 123e7a07c0..71b75acb65 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-1.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-1.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:attachment",
+ "id": "3",
+ "props": {
+ "embed": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "name": "test-card-1.png",
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:attachment",
- "version": 1,
- "props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0,
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "embed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-2.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-2.json
index 35cc21baf0..68f3f90eac 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-2.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-2.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "/"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "/"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-3.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-3.json
index 1db30ca3bc..71b75acb65 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-3.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-3.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:attachment",
+ "id": "3",
+ "props": {
+ "embed": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "name": "test-card-1.png",
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:attachment",
- "version": 1,
- "props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0,
- "embed": false,
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA="
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-1.json b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-1.json
index 123e7a07c0..71b75acb65 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-1.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-1.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:attachment",
+ "id": "3",
+ "props": {
+ "embed": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "name": "test-card-1.png",
+ "rotate": 0,
+ "size": 45801,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:attachment",
- "version": 1,
- "props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0,
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "embed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-2.json b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-2.json
index 6201b4b029..3a3423ff58 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-2.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-2.json
@@ -1,66 +1,34 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:attachment",
- "version": 1,
+ "id": "3",
"props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
+ "embed": false,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
+ "name": "test-card-1.png",
"rotate": 0,
+ "size": 45801,
"sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "embed": false
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,17 +57,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,11 +77,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-3.json b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-3.json
index dbc9bf4e49..8be3c0b234 100644
--- a/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-3.json
+++ b/tests/blocksuite/snapshots/attachment.spec.ts/support-dragging-attachment-block-directly-3.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,36 +37,38 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:attachment",
- "version": 1,
+ "id": "3",
"props": {
- "name": "test-card-1.png",
- "size": 45801,
- "type": "image/png",
- "style": "horizontalThin",
+ "embed": false,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
+ "name": "test-card-1.png",
"rotate": 0,
+ "size": 45801,
"sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "embed": false
+ "style": "horizontalThin",
+ "type": "image/png",
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,11 +77,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/basic.spec.ts/automatic-identify-url-text-final.json b/tests/blocksuite/snapshots/basic.spec.ts/automatic-identify-url-text-final.json
index b13c64a570..a9aee0ac98 100644
--- a/tests/blocksuite/snapshots/basic.spec.ts/automatic-identify-url-text-final.json
+++ b/tests/blocksuite/snapshots/basic.spec.ts/automatic-identify-url-text-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,21 +16,56 @@
"insert": "abc "
},
{
- "insert": "https://google.com",
"attributes": {
"link": "https://google.com"
- }
+ },
+ "insert": "https://google.com"
},
{
"insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json b/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json
index 88deb243a5..43346763ed 100644
--- a/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json
+++ b/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-edgeless-mode-final.json b/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-edgeless-mode-final.json
index 8e72ee50be..33c96a66e9 100644
--- a/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-edgeless-mode-final.json
+++ b/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-edgeless-mode-final.json
@@ -1,57 +1,26 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ ],
"flavour": "affine:surface",
- "version": 5,
+ "id": "1",
"props": {
- "elements": {}
+ "elements": {
+ }
},
- "children": []
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,234]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -60,31 +29,67 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:bookmark",
- "version": 1,
+ "id": "4",
"props": {
- "style": "horizontal",
- "url": "http://localhost",
"caption": null,
"description": null,
"icon": null,
"image": null,
- "title": null,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
- "rotate": 0
+ "rotate": 0,
+ "style": "horizontal",
+ "title": null,
+ "url": "http://localhost",
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "2",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,234]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-page-mode-final.json b/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-page-mode-final.json
index 70629dd2fa..f0fde12a51 100644
--- a/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-page-mode-final.json
+++ b/tests/blocksuite/snapshots/bookmark.spec.ts/copy-url-to-create-bookmark-in-page-mode-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,31 +17,67 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:bookmark",
- "version": 1,
+ "id": "3",
"props": {
- "style": "horizontal",
- "url": "http://localhost",
"caption": null,
"description": null,
"icon": null,
"image": null,
- "title": null,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
- "rotate": 0
+ "rotate": 0,
+ "style": "horizontal",
+ "title": null,
+ "url": "http://localhost",
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/bookmark.spec.ts/covert-bookmark-block-to-link-text-final.json b/tests/blocksuite/snapshots/bookmark.spec.ts/covert-bookmark-block-to-link-text-final.json
index 6d9d9e11f5..db31b024f7 100644
--- a/tests/blocksuite/snapshots/bookmark.spec.ts/covert-bookmark-block-to-link-text-final.json
+++ b/tests/blocksuite/snapshots/bookmark.spec.ts/covert-bookmark-block-to-link-text-final.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "http://localhost",
"attributes": {
"link": "http://localhost"
- }
+ },
+ "insert": "http://localhost"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/bookmark.spec.ts/create-bookmark-by-slash-menu-final.json b/tests/blocksuite/snapshots/bookmark.spec.ts/create-bookmark-by-slash-menu-final.json
index bfef5d3b69..08119762bf 100644
--- a/tests/blocksuite/snapshots/bookmark.spec.ts/create-bookmark-by-slash-menu-final.json
+++ b/tests/blocksuite/snapshots/bookmark.spec.ts/create-bookmark-by-slash-menu-final.json
@@ -1,29 +1,36 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:bookmark",
+ "id": "3",
+ "props": {
+ "caption": null,
+ "description": null,
+ "icon": null,
+ "image": null,
+ "index": "a0",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "style": "horizontal",
+ "title": null,
+ "url": "http://localhost",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,30 +39,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:bookmark",
- "version": 1,
- "props": {
- "style": "horizontal",
- "url": "http://localhost",
- "caption": null,
- "description": null,
- "icon": null,
- "image": null,
- "title": null,
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json b/tests/blocksuite/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
index 6c6a8fbbd0..f3b3f514ef 100644
--- a/tests/blocksuite/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
+++ b/tests/blocksuite/snapshots/clipboard/clipboard.spec.ts/auto-identify-url-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,18 +16,53 @@
"insert": "test "
},
{
- "insert": "https://www.google.com",
"attributes": {
"link": "https://www.google.com"
- }
+ },
+ "insert": "https://www.google.com"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json b/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
index fac8595cb1..980359be0e 100644
--- a/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
+++ b/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-cut.json
@@ -1,29 +1,34 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,27 +37,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-paste.json b/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-paste.json
index c0ed3d2daf..cfb493e9c1 100644
--- a/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-paste.json
+++ b/tests/blocksuite/snapshots/clipboard/list.spec.ts/cut-will-delete-all-content-and-copy-will-reappear-content-after-paste.json
@@ -1,67 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "7",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "1"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "8",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -70,19 +21,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "9",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "9",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,21 +43,40 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "7",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "1"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "10",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "10",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -114,13 +85,46 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-1.json b/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-1.json
index 2f322f2111..bfbd48a21e 100644
--- a/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-1.json
+++ b/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-1.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "quote"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "quote",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-2.json b/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-2.json
index 2ac573b63f..b5269b27e8 100644
--- a/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-2.json
+++ b/tests/blocksuite/snapshots/clipboard/list.spec.ts/should-keep-paragraph-block-s-type-when-pasting-at-the-start-of-empty-paragraph-block-except-type-text-after-paste-2.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "quote",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "quote"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-has-content-click-code-block-copy-menu-copy-whole-code-block-pasted.json b/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-has-content-click-code-block-copy-menu-copy-whole-code-block-pasted.json
index 6e25e93945..c56a73fc38 100644
--- a/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-has-content-click-code-block-copy-menu-copy-whole-code-block-pasted.json
+++ b/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-has-content-click-code-block-copy-menu-copy-whole-code-block-pasted.json
@@ -1,46 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "2",
"props": {
+ "caption": "",
+ "language": "javascript",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,18 +18,19 @@
}
]
},
- "language": "javascript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "4",
"props": {
+ "caption": "",
+ "language": "javascript",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,13 +39,46 @@
}
]
},
- "language": "javascript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-is-empty-click-code-block-copy-menu-copy-the-empty-code-block-pasted.json b/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-is-empty-click-code-block-copy-menu-copy-the-empty-code-block-pasted.json
index b6a56a9b23..eccec462d4 100644
--- a/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-is-empty-click-code-block-copy-menu-copy-the-empty-code-block-pasted.json
+++ b/tests/blocksuite/snapshots/code/copy-paste.spec.ts/code-block-is-empty-click-code-block-copy-menu-copy-the-empty-code-block-pasted.json
@@ -1,73 +1,78 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "2",
"props": {
+ "caption": "",
+ "language": "javascript",
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "language": "javascript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "4",
"props": {
+ "caption": "",
+ "language": "javascript",
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "language": "javascript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/add-caption-works.json b/tests/blocksuite/snapshots/code/crud.spec.ts/add-caption-works.json
index d4177165f2..8f7e4c1c85 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/add-caption-works.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/add-caption-works.json
@@ -1,72 +1,77 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "2",
"props": {
+ "caption": "BlockSuite",
+ "language": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "language": null,
- "wrap": false,
- "caption": "BlockSuite"
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-1.json b/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-1.json
index 5a4f767d5c..64a5f3bceb 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-1.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-1.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": "rust",
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": "rust",
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-2.json b/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-2.json
index 817823dfc0..fb5b2fb7af 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-2.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/change-code-language-can-work-2.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/delete-code-block-in-more-menu-final.json b/tests/blocksuite/snapshots/code/crud.spec.ts/delete-code-block-in-more-menu-final.json
index e7c7c2e21c..c0a852b23c 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/delete-code-block-in-more-menu-final.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/delete-code-block-in-more-menu-final.json
@@ -1,29 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,9 +18,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ }
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/duplicate-code-block-final.json b/tests/blocksuite/snapshots/code/crud.spec.ts/duplicate-code-block-final.json
index 4bfd573d8f..4147826d6b 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/duplicate-code-block-final.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/duplicate-code-block-final.json
@@ -1,46 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "2",
"props": {
+ "caption": "BlockSuite",
+ "language": "rust",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,18 +18,19 @@
}
]
},
- "language": "rust",
- "wrap": true,
- "caption": "BlockSuite"
+ "wrap": true
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "4",
"props": {
+ "caption": "BlockSuite",
+ "language": "rust",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,13 +39,46 @@
}
]
},
- "language": "rust",
- "wrap": true,
- "caption": "BlockSuite"
+ "wrap": true
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-format.json b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-format.json
index 07bd729db1..3b1b229fcc 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-format.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-format.json
@@ -1,46 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "3",
"props": {
+ "caption": "",
+ "language": "typescript",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -48,41 +17,74 @@
"insert": "c"
},
{
- "insert": "o",
"attributes": {
"bold": true
- }
+ },
+ "insert": "o"
},
{
"insert": "ns"
},
{
- "insert": "t a",
"attributes": {
"bold": true
- }
+ },
+ "insert": "t a"
},
{
"insert": "a"
},
{
- "insert": "a = 1000",
"attributes": {
"bold": true
- }
+ },
+ "insert": "a = 1000"
},
{
"insert": ";"
}
]
},
- "language": "typescript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-init.json b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-init.json
index c6a696c89d..a05fba052a 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-init.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-init.json
@@ -1,29 +1,36 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "3",
+ "props": {
+ "caption": "",
+ "language": "typescript",
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "const aaa = 1000;"
+ }
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,30 +39,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "const aaa = 1000;"
- }
- ]
- },
- "language": "typescript",
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-link.json b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-link.json
index 9c05d5a060..6432bdcb0c 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-link.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-link.json
@@ -1,46 +1,15 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "3",
"props": {
+ "caption": "",
+ "language": "typescript",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -48,52 +17,85 @@
"insert": "c"
},
{
- "insert": "o",
"attributes": {
"bold": true
- }
+ },
+ "insert": "o"
},
{
"insert": "ns"
},
{
- "insert": "t a",
"attributes": {
- "link": "https://www.baidu.com",
- "bold": true
- }
+ "bold": true,
+ "link": "https://www.baidu.com"
+ },
+ "insert": "t a"
},
{
- "insert": "a",
"attributes": {
"link": "https://www.baidu.com"
- }
+ },
+ "insert": "a"
},
{
- "insert": "a ",
"attributes": {
- "link": "https://www.baidu.com",
- "bold": true
- }
+ "bold": true,
+ "link": "https://www.baidu.com"
+ },
+ "insert": "a "
},
{
- "insert": "= 1000",
"attributes": {
"bold": true
- }
+ },
+ "insert": "= 1000"
},
{
"insert": ";"
}
]
},
- "language": "typescript",
- "wrap": false,
- "caption": ""
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-1.json b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-1.json
index 817823dfc0..fb5b2fb7af 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-1.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-1.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-2.json b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-2.json
index 4289de99ce..3c87bd42ae 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-2.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-2.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": true
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": true,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-3.json b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-3.json
index 817823dfc0..fb5b2fb7af 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-3.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/toggle-code-block-wrap-can-work-3.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-1.json b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-1.json
index 817823dfc0..fb5b2fb7af 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-1.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-1.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-2.json b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-2.json
index 4289de99ce..3c87bd42ae 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-2.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-2.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": true
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": true,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-3.json b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-3.json
index 817823dfc0..fb5b2fb7af 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-3.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/undo-code-block-wrap-can-work-3.json
@@ -1,29 +1,33 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "2",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +36,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-init.json b/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-init.json
index 3d570b9a58..edd4cfa837 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-init.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-init.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "aaa"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "bbb"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,15 +21,82 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "bbb"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "aaa"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-markdown-syntax.json b/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-markdown-syntax.json
index 34e377841f..4a48066c81 100644
--- a/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-markdown-syntax.json
+++ b/tests/blocksuite/snapshots/code/crud.spec.ts/use-markdown-syntax-can-create-code-block-markdown-syntax.json
@@ -1,100 +1,54 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:code",
- "version": 1,
+ "id": "5",
"props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
+ "caption": "",
"language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- },
- {
- "type": "block",
- "id": "6",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
"text": {
"$blocksuite:internal:text$": true,
"delta": [
- {
- "insert": "aaa"
- }
]
},
- "collapsed": false
+ "wrap": false
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "bbb"
+ "insert": "aaa"
}
]
},
- "collapsed": false
+ "type": "text"
},
+ "type": "block",
+ "version": 1
+ },
+ {
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -103,13 +57,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "bbb"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-3-9.json b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-3-9.json
index 41a3265365..7d2fa284c9 100644
--- a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-3-9.json
+++ b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-3-9.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "C"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,39 +43,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "E"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "8",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -132,19 +67,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "9",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "9",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -153,19 +89,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -174,17 +111,86 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "7",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "E"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "5",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "C"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-4-3.json b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-4-3.json
index 36d763f9f8..8342294519 100644
--- a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-4-3.json
+++ b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-drag-4-3.json
@@ -1,67 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "5",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "C"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -70,39 +21,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "E"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "8",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -111,19 +45,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "9",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "9",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -132,19 +67,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -153,19 +89,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -174,17 +111,86 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "7",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "E"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "5",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "C"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-init.json b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-init.json
index b3e1c2b297..bda464c82e 100644
--- a/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-init.json
+++ b/tests/blocksuite/snapshots/drag.spec.ts/move-to-the-last-block-of-each-level-in-multi-level-nesting-init.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,19 +19,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -71,39 +41,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "C"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -112,39 +65,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "E"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "8",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -153,19 +89,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "9",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "9",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -174,17 +111,86 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "7",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "E"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "5",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "C"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-add-linked-doc.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-add-linked-doc.json
index 49158f263a..4c25294e73 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-add-linked-doc.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-add-linked-doc.json
@@ -1,86 +1,91 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,220,26]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": false
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "6"
+ "pageId": "6",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "4",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": false,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,220,26]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -89,25 +94,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-drag.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-drag.json
index 6bb6517e6b..04c67ff074 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-drag.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-drag.json
@@ -1,77 +1,82 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,497,154]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": true
- },
"children": [
{
- "type": "block",
- "id": "11",
+ "children": [
+ ],
"flavour": "affine:embed-linked-doc",
- "version": 1,
+ "id": "11",
"props": {
+ "caption": null,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
- "rotate": 0,
"pageId": "6",
+ "rotate": 0,
"style": "horizontal",
- "caption": null
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "4",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": true,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,497,154]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -80,25 +85,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-init.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-init.json
index f64fd54877..4b4ae61bd4 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-init.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-init.json
@@ -1,76 +1,82 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,220,26]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": false
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "4",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": false,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,220,26]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -79,25 +85,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card-min-width.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card-min-width.json
index 463f5b06bc..12d349c192 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card-min-width.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card-min-width.json
@@ -1,77 +1,82 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,452,154]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": true
- },
"children": [
{
- "type": "block",
- "id": "11",
+ "children": [
+ ],
"flavour": "affine:embed-linked-doc",
- "version": 1,
+ "id": "11",
"props": {
+ "caption": null,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
- "rotate": 0,
"pageId": "6",
+ "rotate": 0,
"style": "horizontal",
- "caption": null
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "4",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": true,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,452,154]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -80,25 +85,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card.json
index 6d07c4f935..df95c1370b 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/min-width-limit-for-embed-block-link-to-card.json
@@ -1,77 +1,82 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,452,154]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": false
- },
"children": [
{
- "type": "block",
- "id": "11",
+ "children": [
+ ],
"flavour": "affine:embed-linked-doc",
- "version": 1,
+ "id": "11",
"props": {
+ "caption": null,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
- "rotate": 0,
"pageId": "6",
+ "rotate": 0,
"style": "horizontal",
- "caption": null
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "4",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": false,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,452,154]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -80,25 +85,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-finial.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-finial.json
index d9f672dabc..1a596823e9 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-finial.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-finial.json
@@ -1,54 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "bbb"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,220,26]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": true
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -57,28 +19,67 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "3",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": true,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,220,26]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,48]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -87,25 +88,28 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,48]"
},
- "children": [
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
{
- "type": "block",
- "id": "5",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
+ "insert": "bbb"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-empty.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-empty.json
index d791ddb2db..5fe77a10dc 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-empty.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-empty.json
@@ -1,50 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,220,26]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": true
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -53,28 +19,50 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "3",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": true,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,220,26]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,48]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -83,9 +71,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,48]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ }
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-not-empty.json b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-not-empty.json
index 43599205e7..51684b56c2 100644
--- a/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-not-empty.json
+++ b/tests/blocksuite/snapshots/edgeless/edgeless-text.spec.ts/press-backspace-at-the-start-of-first-line-when-edgeless-text-exist-note-not-empty.json
@@ -1,50 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:surface",
- "version": 5,
- "props": {
- "elements": {}
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:edgeless-text",
- "version": 1,
- "props": {
- "xywh": "[-25,-25,220,26]",
- "index": "a1",
- "lockedBySelf": false,
- "color": "#84cfff",
- "fontFamily": "blocksuite:surface:Inter",
- "fontStyle": "normal",
- "fontWeight": "400",
- "textAlign": "left",
- "scale": 1,
- "rotate": 0,
- "hasMaxWidth": true
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -53,28 +19,67 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:edgeless-text",
+ "id": "3",
+ "props": {
+ "color": "#84cfff",
+ "fontFamily": "blocksuite:surface:Inter",
+ "fontStyle": "normal",
+ "fontWeight": "400",
+ "hasMaxWidth": true,
+ "index": "a1",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "textAlign": "left",
+ "xywh": "[-25,-25,220,26]"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:surface",
+ "id": "1",
+ "props": {
+ "elements": {
+ }
+ },
+ "type": "block",
+ "version": 5
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "2",
"props": {
- "xywh": "[0,0,498,48]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -83,25 +88,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,48]"
},
- "children": [
- {
- "type": "block",
- "id": "5",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/create-linked-doc-from-block-selection-with-format-bar.json b/tests/blocksuite/snapshots/format-bar.spec.ts/create-linked-doc-from-block-selection-with-format-bar.json
index ac7534530b..a44193b38d 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/create-linked-doc-from-block-selection-with-format-bar.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/create-linked-doc-from-block-selection-with-format-bar.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:embed-linked-doc",
+ "id": "12",
+ "props": {
+ "caption": null,
+ "index": "a0",
+ "lockedBySelf": false,
+ "pageId": "5",
+ "rotate": 0,
+ "style": "horizontal",
+ "xywh": "[0,0,0,0]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,26 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "12",
- "flavour": "affine:embed-linked-doc",
- "version": 1,
- "props": {
- "index": "a0",
- "xywh": "[0,0,0,0]",
- "lockedBySelf": false,
- "rotate": 0,
- "pageId": "5",
- "style": "horizontal",
- "caption": null
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-default-color.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-default-color.json
index ab3ea57fc5..c2990c373e 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-default-color.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-default-color.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +17,41 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"color": "var(--affine-text-highlight-foreground-red)"
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,11 +60,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-init.json
index ab3ea57fc5..c2990c373e 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +17,41 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"color": "var(--affine-text-highlight-foreground-red)"
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,11 +60,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-select-all.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-select-all.json
index 94c309684c..4c3bfedb0f 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-select-all.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-background-color-select-all.json
@@ -1,91 +1,60 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "123",
"attributes": {
"color": "var(--affine-text-highlight-foreground-red)"
- }
+ },
+ "insert": "123"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"color": "var(--affine-text-highlight-foreground-red)"
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -94,11 +63,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-bulleted.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-bulleted.json
index bddf3d6bd3..3550ab7e44 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-bulleted.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-bulleted.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,19 +19,18 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -71,17 +39,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -90,11 +59,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-finial.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-finial.json
index 6f7956de76..9209d0a504 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-finial.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-finial.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-init.json
index 4b6a5aecfc..2c49d4d57a 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-change-to-heading-paragraph-type-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "h1",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "h1"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-finial.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-finial.json
index 5f91d67a36..b5250bc8e7 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-finial.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-finial.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,40 +17,42 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
- "strike": true,
- "italic": true
- }
+ "italic": true,
+ "strike": true
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -92,11 +61,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-init.json
index e3c798fb12..6205682d3e 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,43 +17,45 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
+ "bold": true,
"code": true,
- "strike": true,
- "underline": true,
"italic": true,
- "bold": true
- }
+ "strike": true,
+ "underline": true
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -95,11 +64,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-finial.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-finial.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-finial.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-finial.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-init.json
index 12bf866527..502a60ec0c 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-format-text-when-select-multiple-line-init.json
@@ -1,107 +1,111 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "123",
"attributes": {
"bold": true
- }
+ },
+ "insert": "123"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"bold": true
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "789",
"attributes": {
"bold": true
- }
+ },
+ "insert": "789"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-finial.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-finial.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-finial.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-finial.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-init.json
index 0188611aa8..3593aca3c1 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-be-able-to-link-text-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +17,41 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"link": "https://www.example.com"
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,11 +60,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-show-after-convert-to-code-block.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-show-after-convert-to-code-block.json
index 6bb07db7f7..76d647bef3 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-show-after-convert-to-code-block.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-show-after-convert-to-code-block.json
@@ -1,29 +1,36 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:code",
+ "id": "5",
+ "props": {
+ "caption": "",
+ "language": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123\n456\n789"
+ }
+ ]
+ },
+ "wrap": false
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,30 +39,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "5",
- "flavour": "affine:code",
- "version": 1,
- "props": {
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123\n456\n789"
- }
- ]
- },
- "language": null,
- "wrap": false,
- "caption": ""
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-final.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-final.json
index cf0882a747..cbc597c852 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-final.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "8",
"props": {
- "type": "h1",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "h1"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "9",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "9",
"props": {
- "type": "h1",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "h1"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "10",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "10",
"props": {
- "type": "h1",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "h1"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-init.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-init.json
index d6f87ec2b6..1fc9b6d328 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-init.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-with-block-selection-works-when-update-block-type-init.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,19 +19,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -71,19 +41,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "7",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -92,13 +63,46 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-multiple-block-selection.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-multiple-block-selection.json
index abff1d216a..3cf793663e 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-multiple-block-selection.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-multiple-block-selection.json
@@ -1,110 +1,114 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "123",
"attributes": {
- "underline": true,
- "bold": true
- }
+ "bold": true,
+ "underline": true
+ },
+ "insert": "123"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
- "underline": true,
- "bold": true
- }
+ "bold": true,
+ "underline": true
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "789",
"attributes": {
- "underline": true,
- "bold": true
- }
+ "bold": true,
+ "underline": true
+ },
+ "insert": "789"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-single-block-selection.json b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-single-block-selection.json
index ebf43486b3..d77d4db258 100644
--- a/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-single-block-selection.json
+++ b/tests/blocksuite/snapshots/format-bar.spec.ts/should-format-quick-bar-work-in-single-block-selection.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,41 +17,43 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
- "underline": true,
+ "bold": true,
"italic": true,
- "bold": true
- }
+ "underline": true
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -93,11 +62,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works-undo.json b/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works-undo.json
index f558ae99eb..4d8f2024a6 100644
--- a/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works-undo.json
+++ b/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works-undo.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello world"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello world"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works.json b/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works.json
index 9bf706be7a..f366ea70da 100644
--- a/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works.json
+++ b/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,21 +16,56 @@
"insert": "he"
},
{
- "insert": "llo",
"attributes": {
"code": true
- }
+ },
+ "insert": "llo"
},
{
"insert": " world"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/Enter-key-should-as-expected-after-setting-heading-by-shortkey.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/Enter-key-should-as-expected-after-setting-heading-by-shortkey.json
index e7171c2a23..9730eb876c 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/Enter-key-should-as-expected-after-setting-heading-by-shortkey.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/Enter-key-should-as-expected-after-setting-heading-by-shortkey.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "h1",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "h1"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-init.json
index 7646ed57f0..7692196bac 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-init.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-init.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "ho"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "ho"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-undo.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-undo.json
index 88deb243a5..43346763ed 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-undo.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-undo.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-init.json
index 2e5aae1d84..5ca072cd70 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-init.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-init.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "h1"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "h1",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-0.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-0.json
index 6185d1e7da..b3df8556fb 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-0.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-0.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "4",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "4",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-6.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-6.json
index 6913800d2b..923bbb7f00 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-6.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-6.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "h6"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "h6",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-8.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-8.json
index 36942fcfcb..bf64afff31 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-8.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-8.json
@@ -1,29 +1,37 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,31 +40,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-9.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-9.json
index e402ef7ea3..7501e680df 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-9.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-9.json
@@ -1,29 +1,37 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": 1,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "numbered"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,31 +40,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "numbered",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": 1
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-d.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-d.json
index 4754f5ac25..9e73d1b76e 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-d.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-d.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,34 +17,73 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:divider",
- "version": 1,
- "props": {},
- "children": []
+ "id": "5",
+ "props": {
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-finial.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-finial.json
index 88deb243a5..43346763ed 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-finial.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-finial.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-init.json
index a1d103641a..84246a3550 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-init.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,24 +16,59 @@
"insert": "h"
},
{
- "insert": "ell",
"attributes": {
- "strike": true,
- "underline": true,
+ "bold": true,
"italic": true,
- "bold": true
- }
+ "strike": true,
+ "underline": true
+ },
+ "insert": "ell"
},
{
"insert": "o"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-1.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-1.json
index 4dea51ea60..7c861bbc5b 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-1.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-1.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "Hello",
"attributes": {
"code": true
- }
+ },
+ "insert": "Hello"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-2.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-2.json
index 262b6d8a4e..1683c86b80 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-2.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/type-character-jump-out-code-node-2.json
@@ -1,66 +1,68 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "Hello",
"attributes": {
"code": true
- }
+ },
+ "insert": "Hello"
},
{
"insert": "block suite"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-at-empty-line-bold.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-at-empty-line-bold.json
index 47df37eb92..6446c096d4 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-at-empty-line-bold.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-at-empty-line-bold.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "aaa",
"attributes": {
"bold": true
- }
+ },
+ "insert": "aaa"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-ggg.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-ggg.json
index 373b7b3c7a..b207d026b1 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-ggg.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-ggg.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,40 +16,75 @@
"insert": "aaa"
},
{
- "insert": "bbb",
"attributes": {
"italic": true
- }
+ },
+ "insert": "bbb"
},
{
- "insert": "ccc",
"attributes": {
- "italic": true,
- "bold": true
- }
+ "bold": true,
+ "italic": true
+ },
+ "insert": "ccc"
},
{
- "insert": "ddd",
"attributes": {
"bold": true
- }
+ },
+ "insert": "ddd"
},
{
"insert": "eee"
},
{
- "insert": "fffggg",
"attributes": {
"bold": true
- }
+ },
+ "insert": "fffggg"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-hhh.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-hhh.json
index a2592907b6..4ae6cd9851 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-hhh.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold-hhh.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,40 +16,75 @@
"insert": "aaahhh"
},
{
- "insert": "bbb",
"attributes": {
"italic": true
- }
+ },
+ "insert": "bbb"
},
{
- "insert": "ccc",
"attributes": {
- "italic": true,
- "bold": true
- }
+ "bold": true,
+ "italic": true
+ },
+ "insert": "ccc"
},
{
- "insert": "ddd",
"attributes": {
"bold": true
- }
+ },
+ "insert": "ddd"
},
{
"insert": "eee"
},
{
- "insert": "fffggg",
"attributes": {
"bold": true
- }
+ },
+ "insert": "fffggg"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold.json
index 05d86dcb54..ab7c304c75 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,40 +16,75 @@
"insert": "aaa"
},
{
- "insert": "bbb",
"attributes": {
"italic": true
- }
+ },
+ "insert": "bbb"
},
{
- "insert": "ccc",
"attributes": {
- "italic": true,
- "bold": true
- }
+ "bold": true,
+ "italic": true
+ },
+ "insert": "ccc"
},
{
- "insert": "ddd",
"attributes": {
"bold": true
- }
+ },
+ "insert": "ddd"
},
{
"insert": "eee"
},
{
- "insert": "fff",
"attributes": {
"bold": true
- }
+ },
+ "insert": "fff"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-init.json
index 993e1e1f67..c0bb1ae5dc 100644
--- a/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-init.json
+++ b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,34 +16,69 @@
"insert": "aaa"
},
{
- "insert": "bbb",
"attributes": {
"italic": true
- }
+ },
+ "insert": "bbb"
},
{
- "insert": "ccc",
"attributes": {
- "italic": true,
- "bold": true
- }
+ "bold": true,
+ "italic": true
+ },
+ "insert": "ccc"
},
{
- "insert": "ddd",
"attributes": {
"bold": true
- }
+ },
+ "insert": "ddd"
},
{
"insert": "eee"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-init.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-init.json
index 81cfe186fb..8d7c2f41e3 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-init.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,65 +16,102 @@
"insert": "1"
},
{
- "insert": "23",
"attributes": {
"code": true
- }
+ },
+ "insert": "23"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"code": true
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "78",
"attributes": {
"code": true
- }
+ },
+ "insert": "78"
},
{
"insert": "9"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-redo.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-redo.json
index 81cfe186fb..8d7c2f41e3 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-redo.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-redo.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,65 +16,102 @@
"insert": "1"
},
{
- "insert": "23",
"attributes": {
"code": true
- }
+ },
+ "insert": "23"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
"code": true
- }
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "78",
"attributes": {
"code": true
- }
+ },
+ "insert": "78"
},
{
"insert": "9"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-undo.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-undo.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-undo.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/multi-line-rich-text-inline-code-hotkey-undo.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-init.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-init.json
index 34fb1214b3..5e68733bb0 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-init.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-init.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "19"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "19"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-undo.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-undo.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-undo.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-undo.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-finial.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-finial.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-finial.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-finial.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-init.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-init.json
index afee46063c..18d781f4fd 100644
--- a/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-init.json
+++ b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-multiple-line-format-hotkey-work-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,74 +16,111 @@
"insert": "1"
},
{
- "insert": "23",
"attributes": {
- "strike": true,
- "underline": true,
+ "bold": true,
"italic": true,
- "bold": true
- }
+ "strike": true,
+ "underline": true
+ },
+ "insert": "23"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "456",
"attributes": {
- "strike": true,
- "underline": true,
+ "bold": true,
"italic": true,
- "bold": true
- }
+ "strike": true,
+ "underline": true
+ },
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "78",
"attributes": {
- "strike": true,
- "underline": true,
+ "bold": true,
"italic": true,
- "bold": true
- }
+ "strike": true,
+ "underline": true
+ },
+ "insert": "78"
},
{
"insert": "9"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-finial.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-finial.json
index 9541410365..61e284b795 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-finial.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-finial.json
@@ -1,71 +1,75 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:latex",
- "version": 1,
+ "id": "3",
"props": {
- "xywh": "[0,0,16,16]",
"index": "a0",
+ "latex": "aaa",
"lockedBySelf": false,
- "scale": 1,
"rotate": 0,
- "latex": "aaa"
+ "scale": 1,
+ "xywh": "[0,0,16,16]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-init.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-init.json
index 2d280cd0d1..63d1673c4d 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-init.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-init.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-finial.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-finial.json
index 9541410365..61e284b795 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-finial.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-finial.json
@@ -1,71 +1,75 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:latex",
- "version": 1,
+ "id": "3",
"props": {
- "xywh": "[0,0,16,16]",
"index": "a0",
+ "latex": "aaa",
"lockedBySelf": false,
- "scale": 1,
"rotate": 0,
- "latex": "aaa"
+ "scale": 1,
+ "xywh": "[0,0,16,16]"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-init.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-init.json
index 2d280cd0d1..63d1673c4d 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-init.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-space-init.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-finial.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-finial.json
index 2105530200..511e023da7 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-finial.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-finial.json
@@ -1,29 +1,31 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:latex",
+ "id": "3",
+ "props": {
+ "index": "a0",
+ "latex": "aaa",
+ "lockedBySelf": false,
+ "rotate": 0,
+ "scale": 1,
+ "xywh": "[0,0,16,16]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +34,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:latex",
- "version": 1,
- "props": {
- "xywh": "[0,0,16,16]",
- "index": "a0",
- "lockedBySelf": false,
- "scale": 1,
- "rotate": 0,
- "latex": "aaa"
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-init.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-init.json
index 2d280cd0d1..63d1673c4d 100644
--- a/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-init.json
+++ b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-slash-menu-init.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/basic-link.json b/tests/blocksuite/snapshots/link.spec.ts/basic-link.json
index 0fa872877a..3df021a37e 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/basic-link.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/basic-link.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "link2",
"attributes": {
"link": "https://github.com"
- }
+ },
+ "insert": "link2"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-card.json b/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-card.json
index 197ea25154..cec241b7e5 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-card.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-card.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,21 +36,56 @@
"insert": "a"
},
{
- "insert": "linkText",
"attributes": {
"link": "http://example.com"
- }
+ },
+ "insert": "linkText"
},
{
"insert": "a"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-embed.json b/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-embed.json
index f9a5b5abed..96886b1e78 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-embed.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-embed.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,21 +36,56 @@
"insert": "a"
},
{
- "insert": "linkText",
"attributes": {
"link": "https://www.youtube.com/watch?v=U6s2pdxebSo"
- }
+ },
+ "insert": "linkText"
},
{
"insert": "a"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/create-link-with-paste.json b/tests/blocksuite/snapshots/link.spec.ts/create-link-with-paste.json
index 239dbbb029..e0c0f7e7cb 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/create-link-with-paste.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/create-link-with-paste.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "aaa",
"attributes": {
"link": "http://affine.pro"
- }
+ },
+ "insert": "aaa"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/should-mock-selection-not-stored.json b/tests/blocksuite/snapshots/link.spec.ts/should-mock-selection-not-stored.json
index d395cf5b10..a46ca84c8b 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/should-mock-selection-not-stored.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/should-mock-selection-not-stored.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "linkText"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "linkText"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/type-character-after-link-should-not-extend-the-link-attributes.json b/tests/blocksuite/snapshots/link.spec.ts/type-character-after-link-should-not-extend-the-link-attributes.json
index 321e38f068..220c6e99be 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/type-character-after-link-should-not-extend-the-link-attributes.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/type-character-after-link-should-not-extend-the-link-attributes.json
@@ -1,51 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "title"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -53,21 +16,59 @@
"insert": "Hello"
},
{
- "insert": "link text",
"attributes": {
"link": "http://example.com"
- }
+ },
+ "insert": "link text"
},
{
"insert": "AFTER_LINK"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "title"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/link.spec.ts/type-character-in-link-should-not-jump-out-link-node.json b/tests/blocksuite/snapshots/link.spec.ts/type-character-in-link-should-not-jump-out-link-node.json
index e108d46b3e..906378957f 100644
--- a/tests/blocksuite/snapshots/link.spec.ts/type-character-in-link-should-not-jump-out-link-node.json
+++ b/tests/blocksuite/snapshots/link.spec.ts/type-character-in-link-should-not-jump-out-link-node.json
@@ -1,51 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "title"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -53,18 +16,56 @@
"insert": "Hello"
},
{
- "insert": "link texIN_LINKt",
"attributes": {
"link": "http://example.com"
- }
+ },
+ "insert": "link texIN_LINKt"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "title"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-final.json b/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-final.json
index b81b15b301..12cc7b24a1 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-final.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-final.json
@@ -1,33 +1,41 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "page0"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "attributes": {
+ "reference": {
+ "pageId": "3",
+ "type": "LinkedPage"
+ }
+ },
+ "insert": " "
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -36,35 +44,28 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": " ",
- "attributes": {
- "reference": {
- "type": "LinkedPage",
- "pageId": "3"
- }
- }
- }
- ]
- },
- "collapsed": false
- },
- "children": []
+ "insert": "page0"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-init.json b/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-init.json
index b81b15b301..12cc7b24a1 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-init.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/can-create-linked-page-and-jump-init.json
@@ -1,33 +1,41 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "page0"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "attributes": {
+ "reference": {
+ "pageId": "3",
+ "type": "LinkedPage"
+ }
+ },
+ "insert": " "
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -36,35 +44,28 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": " ",
- "attributes": {
- "reference": {
- "type": "LinkedPage",
- "pageId": "3"
- }
- }
- }
- ]
- },
- "collapsed": false
- },
- "children": []
+ "insert": "page0"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/duplicated-linked-page-should-paste-as-linked-page.json b/tests/blocksuite/snapshots/linked-page.spec.ts/duplicated-linked-page-should-paste-as-linked-page.json
index e93ca51d69..1e5bb77233 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/duplicated-linked-page-should-paste-as-linked-page.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/duplicated-linked-page-should-paste-as-linked-page.json
@@ -1,91 +1,94 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "8",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "8",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/linked-doc-popover-can-show-and-hide-correctly.json b/tests/blocksuite/snapshots/linked-page.spec.ts/linked-doc-popover-can-show-and-hide-correctly.json
index 56500e437e..b6e1bc8d0e 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/linked-doc-popover-can-show-and-hide-correctly.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/linked-doc-popover-can-show-and-hide-correctly.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "@"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "@"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/paste-linked-page-should-paste-as-linked-page.json b/tests/blocksuite/snapshots/linked-page.spec.ts/paste-linked-page-should-paste-as-linked-page.json
index eb4b6883b6..9adc4963dd 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/paste-linked-page-should-paste-as-linked-page.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/paste-linked-page-should-paste-as-linked-page.json
@@ -1,66 +1,68 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-Selected-text-converted-to-linked-page.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-Selected-text-converted-to-linked-page.json
index 1ce9b5939c..11f4ac8910 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-Selected-text-converted-to-linked-page.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-Selected-text-converted-to-linked-page.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,24 +16,59 @@
"insert": "1"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "34"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-final.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-final.json
index d670da8b7e..948af6952f 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-final.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-final.json
@@ -1,33 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "title0"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "page0"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -36,29 +38,28 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "page0"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
+ "insert": "title0"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-init.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-init.json
index d670da8b7e..948af6952f 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-init.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-init.json
@@ -1,33 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "title0"
- }
- ]
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "page0"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -36,29 +38,28 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "page0"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
+ "insert": "title0"
}
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-1.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-1.json
index 10e0f86b58..88cc86479b 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-1.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-1.json
@@ -1,66 +1,68 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-2.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-2.json
index 2d280cd0d1..63d1673c4d 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-2.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-2.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-1.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-1.json
index 5836c751d1..204862774d 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-1.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-1.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,24 +16,59 @@
"insert": "14"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "32"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-2.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-2.json
index 07a9a51ce5..747df2b62d 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-2.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-2.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "1432"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "1432"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/text-can-be-inserted-as-expected-when-reference-node-is-in-the-start-or-end-of-line.json b/tests/blocksuite/snapshots/linked-page.spec.ts/text-can-be-inserted-as-expected-when-reference-node-is-in-the-start-or-end-of-line.json
index c7b0111e42..b55b7c4ed0 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/text-can-be-inserted-as-expected-when-reference-node-is-in-the-start-or-end-of-line.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/text-can-be-inserted-as-expected-when-reference-node-is-in-the-start-or-end-of-line.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,36 +16,71 @@
"insert": "1"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "3"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "2"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/linked-page.spec.ts/text-inserted-in-the-between-of-reference-nodes-should-not-be-extend-attributes.json b/tests/blocksuite/snapshots/linked-page.spec.ts/text-inserted-in-the-between-of-reference-nodes-should-not-be-extend-attributes.json
index c7b0111e42..b55b7c4ed0 100644
--- a/tests/blocksuite/snapshots/linked-page.spec.ts/text-inserted-in-the-between-of-reference-nodes-should-not-be-extend-attributes.json
+++ b/tests/blocksuite/snapshots/linked-page.spec.ts/text-inserted-in-the-between-of-reference-nodes-should-not-be-extend-attributes.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -49,36 +16,71 @@
"insert": "1"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "3"
},
{
- "insert": " ",
"attributes": {
"reference": {
- "type": "LinkedPage",
- "pageId": "3"
+ "pageId": "3",
+ "type": "LinkedPage"
}
- }
+ },
+ "insert": " "
},
{
"insert": "2"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-shift-tab.json b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-shift-tab.json
index f7122fa413..269da8024d 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-shift-tab.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-shift-tab.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-tab.json b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-tab.json
index a0b97d96ca..5af39a604a 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-tab.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-after-tab.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "text1"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,13 +19,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "text1"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-init.json b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-init.json
index f7122fa413..269da8024d 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/basic-indent-and-unindent-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/can-expand-toggle-in-readonly-mode-before-readonly.json b/tests/blocksuite/snapshots/list.spec.ts/can-expand-toggle-in-readonly-mode-before-readonly.json
index 0190bdd5f9..30e4fafd11 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/can-expand-toggle-in-readonly-mode-before-readonly.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/can-expand-toggle-in-readonly-mode-before-readonly.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": true,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,15 +43,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": true,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-init.json b/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-init.json
index 62ffb3c539..8c268578d5 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-init.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,15 +43,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-toggle.json b/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-toggle.json
index 0190bdd5f9..30e4fafd11 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-toggle.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/click-toggle-icon-should-collapsed-list-toggle.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": true,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,15 +43,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": true,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-final.json b/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-final.json
index 29d7c6302a..a3ee680401 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-final.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-final.json
@@ -1,67 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "aaa"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -70,15 +21,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "aaa"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-init.json b/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-init.json
index e8c0e713a0..368f45a26b 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/convert-nested-paragraph-to-list-init.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "aaa"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,13 +19,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "aaa"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-1.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-1.json
index d141470d54..20ef078ab7 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-1.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-1.json
@@ -1,93 +1,99 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "2",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-2.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-2.json
index ce49df2512..301cbed9f0 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-2.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-2.json
@@ -1,93 +1,99 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
- },
- {
- "type": "block",
- "id": "4",
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "2",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
+ },
+ {
+ "children": [
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
"checked": false,
"collapsed": false,
- "order": null
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-3.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-3.json
index a97f6670ed..7b0ea344fe 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-3.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-3.json
@@ -1,91 +1,97 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "2",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-4.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-4.json
index 02ceafefb0..d50972bac8 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-4.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-4.json
@@ -1,93 +1,99 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "2",
"props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
"checked": false,
"collapsed": false,
- "order": null
- },
- "children": []
- },
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
+ "type": "block",
+ "version": 1
+ },
+ {
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-5.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-5.json
index 2855ac10d6..1d545457d3 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-5.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-5.json
@@ -1,91 +1,97 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "6",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "6",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-init.json b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-init.json
index 22867899b8..b9dd88cba3 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/enter-list-block-with-empty-text-init.json
@@ -1,92 +1,99 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "2",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-finial.json b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-finial.json
index 2609394655..eb802baf69 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-finial.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-finial.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": true,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,19 +43,20 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -112,15 +65,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": true,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-init.json b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-init.json
index 99002d586c..9e8efcb41d 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-init.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,21 +43,40 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -114,13 +85,46 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-toggle.json b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-toggle.json
index 58771e931d..13fd086924 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-toggle.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/indent-item-should-expand-toggle-toggle.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "3",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": true,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "5",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,21 +43,40 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "4",
+ "props": {
+ "checked": false,
+ "collapsed": true,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "6",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -114,13 +85,46 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-finial.json b/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-finial.json
index 8bf1adc881..8202eeff11 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-finial.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-finial.json
@@ -1,47 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "2",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,39 +19,22 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -91,15 +43,66 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-init.json b/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-init.json
index 3207ffb890..254f3f11fc 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/nested-list-blocks-init.json
@@ -1,87 +1,20 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "bulleted",
+ "checked": false,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -90,17 +23,86 @@
}
]
},
- "checked": false,
- "collapsed": false,
- "order": null
+ "type": "bulleted"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:list",
+ "id": "2",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-final.json b/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-final.json
index a16d6e6512..555b1ac763 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-final.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "todo",
+ "checked": true,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,13 +39,46 @@
}
]
},
- "checked": true,
- "collapsed": false,
- "order": null
+ "type": "todo"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-init.json b/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-init.json
index b501041e35..f57f180fd0 100644
--- a/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-init.json
+++ b/tests/blocksuite/snapshots/list.spec.ts/should-indent-todo-block-preserve-todo-status-init.json
@@ -1,65 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "text1"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:list",
- "version": 1,
+ "id": "4",
"props": {
- "type": "todo",
+ "checked": true,
+ "collapsed": false,
+ "order": null,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,15 +21,64 @@
}
]
},
- "checked": true,
- "collapsed": false,
- "order": null
+ "type": "todo"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "text1"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-final.json b/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-final.json
index fdf2e17947..28f8af4568 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-final.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-final.json
@@ -1,55 +1,24 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:divider",
- "version": 1,
- "props": {},
- "children": []
+ "id": "3",
+ "props": {
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -58,17 +27,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -77,11 +47,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-init.json b/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-init.json
index ee4a992ad4..12f26a0027 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-init.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/delete-empty-text-paragraph-block-should-keep-children-blocks-when-following-custom-blocks-init.json
@@ -1,55 +1,24 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:divider",
- "version": 1,
- "props": {},
- "children": []
+ "id": "3",
+ "props": {
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -58,35 +27,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -95,13 +49,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "4",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-2.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-2.json
index 838ef87ff6..3dd4dd9bcb 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-2.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-2.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "abcfg"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,13 +39,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abcfg"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-3.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-3.json
index a4e639d7fe..5fd47061d1 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-3.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace-3.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "abcfg"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,19 +19,36 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abcfg"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -89,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace.json
index f54e8aea28..d9595a65fa 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-after-press-backspace.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "abcfg"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,17 +39,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -106,13 +59,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abcfg"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-init.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-init.json
index d693e8bf01..a56131fe85 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-init.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-indent-and-delete-in-line-start-init.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "abc"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "efg"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,19 +21,36 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "efg"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,17 +59,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -126,13 +79,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abc"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-final.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-final.json
index 46f4679c4d..58f10b453b 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-final.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-final.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,13 +39,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-init.json b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-init.json
index 26e9b79823..e06082cf18 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-init.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/paragraph-with-child-block-should-work-at-enter-init.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,13 +19,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-final.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-final.json
index 527f762a88..c87c54c0dd 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-final.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-init.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-init.json
index ca6d873ef6..c59203e189 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-init.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-delete-paragraph-block-child-can-hold-cursor-in-correct-position-init.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,13 +19,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-2.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-2.json
index d0ad122bb3..5c61943a7a 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-2.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-2.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,35 +17,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,17 +39,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -106,19 +59,36 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -127,11 +97,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-3.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-3.json
index a833cbc370..830386f096 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-3.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-3.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,17 +21,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -105,21 +41,54 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -128,11 +97,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-4.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-4.json
index 74bd1728e2..08c8d76e5e 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-4.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent-4.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,35 +21,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "012"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -123,17 +43,100 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "012"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
}
]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
}
]
- }
- ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent.json
index 6fbe5828fd..2863edc65f 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-indent.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,35 +17,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,19 +39,36 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -108,17 +77,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -127,11 +97,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-init.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-init.json
index a105d1c34b..0ec138fac8 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-init.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-init.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,17 +57,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,17 +77,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -126,11 +97,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-1.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-1.json
index 98506a0c36..f010a5e715 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-1.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-1.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,35 +17,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,35 +39,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "012"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -124,15 +61,82 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "012"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-2.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-2.json
index da838ede19..20857e449a 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-2.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-2.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,35 +17,20 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,37 +39,38 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
- },
- {
- "type": "block",
- "id": "5",
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "012"
+ "insert": "456"
}
]
},
- "collapsed": false
+ "type": "text"
},
+ "type": "block",
+ "version": 1
+ },
+ {
"children": [
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -126,13 +79,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "012"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-3.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-3.json
index a105d1c34b..0ec138fac8 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-3.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-indent-and-unindent-works-with-children-unindent-3.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,17 +57,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,17 +77,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "6",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "6",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -126,11 +97,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-1.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-1.json
index 88deb243a5..43346763ed 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-1.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-1.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-2.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-2.json
index 88deb243a5..43346763ed 100644
--- a/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-2.json
+++ b/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-2.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/block.spec.ts/click-bottom-of-page-and-if-the-last-is-embed-block-editor-should-insert-a-new-editable-block.json b/tests/blocksuite/snapshots/selection/block.spec.ts/click-bottom-of-page-and-if-the-last-is-embed-block-editor-should-insert-a-new-editable-block.json
index 5c0f7563d8..56191e9aa3 100644
--- a/tests/blocksuite/snapshots/selection/block.spec.ts/click-bottom-of-page-and-if-the-last-is-embed-block-editor-should-insert-a-new-editable-block.json
+++ b/tests/blocksuite/snapshots/selection/block.spec.ts/click-bottom-of-page-and-if-the-last-is-embed-block-editor-should-insert-a-new-editable-block.json
@@ -1,74 +1,78 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:image",
- "version": 1,
+ "id": "2",
"props": {
"caption": "",
- "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
- "width": 358,
"height": 268.5,
"index": "a0",
- "xywh": "[0,0,0,0]",
"lockedBySelf": false,
"rotate": 0,
- "size": -1
+ "size": -1,
+ "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=",
+ "width": 358,
+ "xywh": "[0,0,0,0]"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
- "delta": []
+ "delta": [
+ ]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/block.spec.ts/should-indent-multi-selection-block.json b/tests/blocksuite/snapshots/selection/block.spec.ts/should-indent-multi-selection-block.json
index 29deae0a49..00e5f651af 100644
--- a/tests/blocksuite/snapshots/selection/block.spec.ts/should-indent-multi-selection-block.json
+++ b/tests/blocksuite/snapshots/selection/block.spec.ts/should-indent-multi-selection-block.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,13 +39,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/block.spec.ts/should-not-draw-rect-for-sub-selected-blocks-when-entering-tab-key.json b/tests/blocksuite/snapshots/selection/block.spec.ts/should-not-draw-rect-for-sub-selected-blocks-when-entering-tab-key.json
index 29deae0a49..00e5f651af 100644
--- a/tests/blocksuite/snapshots/selection/block.spec.ts/should-not-draw-rect-for-sub-selected-blocks-when-entering-tab-key.json
+++ b/tests/blocksuite/snapshots/selection/block.spec.ts/should-not-draw-rect-for-sub-selected-blocks-when-entering-tab-key.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,13 +39,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-final.json b/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-final.json
index 9c532be4bc..1d2babb4d0 100644
--- a/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-final.json
+++ b/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-final.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,11 +57,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-init.json b/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-init.json
index 29deae0a49..00e5f651af 100644
--- a/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-init.json
+++ b/tests/blocksuite/snapshots/selection/block.spec.ts/should-unindent-multi-selection-block-init.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,13 +39,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-shift-tab.json b/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-shift-tab.json
index d1d626a757..3d57260f52 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-shift-tab.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-shift-tab.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,17 +37,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -88,17 +57,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -107,11 +77,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-tab.json b/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-tab.json
index d561e1379e..e978554819 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-tab.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/indent-native-multi-selection-block-after-tab.json
@@ -1,65 +1,16 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "3",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -68,17 +19,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -87,17 +39,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "5",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "5",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -106,13 +59,64 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-backspace.json b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-backspace.json
index 4dc5a4c37b..565e2b76ba 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-backspace.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-backspace.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "7",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-redo.json b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-redo.json
index 4dc5a4c37b..565e2b76ba 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-redo.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-redo.json
@@ -1,47 +1,14 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -50,17 +17,18 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
},
{
- "type": "block",
- "id": "7",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "7",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -69,11 +37,46 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-undo.json b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-undo.json
index 209d91521a..68d40b89db 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-undo.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-after-undo.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,57 +21,58 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
- },
- {
- "type": "block",
- "id": "5",
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "abc"
+ "insert": "123"
}
]
},
- "collapsed": false
+ "type": "text"
},
+ "type": "block",
+ "version": 1
+ },
+ {
"children": [
{
- "type": "block",
- "id": "6",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "def"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "7",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "7",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -145,15 +81,82 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "6",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "def"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abc"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-init.json b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-init.json
index 209d91521a..68d40b89db 100644
--- a/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-init.json
+++ b/tests/blocksuite/snapshots/selection/native.spec.ts/native-range-delete-with-indent-init.json
@@ -1,83 +1,18 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "3",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "456"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "4",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "4",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -86,57 +21,58 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "3",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "456"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
- },
- {
- "type": "block",
- "id": "5",
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "abc"
+ "insert": "123"
}
]
},
- "collapsed": false
+ "type": "text"
},
+ "type": "block",
+ "version": 1
+ },
+ {
"children": [
{
- "type": "block",
- "id": "6",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "def"
- }
- ]
- },
- "collapsed": false
- },
"children": [
{
- "type": "block",
- "id": "7",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "7",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
@@ -145,15 +81,82 @@
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "6",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "def"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
- ]
+ ],
+ "flavour": "affine:paragraph",
+ "id": "5",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "abc"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-block-by-slash-menu-should-remove-children.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-block-by-slash-menu-should-remove-children.json
index a496377e67..71ef71a40c 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-block-by-slash-menu-should-remove-children.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-block-by-slash-menu-should-remove-children.json
@@ -1,29 +1,37 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:list",
+ "id": "3",
+ "props": {
+ "checked": false,
+ "collapsed": false,
+ "order": null,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "123"
+ }
+ ]
+ },
+ "type": "bulleted"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,31 +40,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "3",
- "flavour": "affine:list",
- "version": 1,
- "props": {
- "type": "bulleted",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "123"
- }
- ]
- },
- "checked": false,
- "collapsed": false,
- "order": null
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-the-slash-symbol-should-close-the-slash-menu.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-the-slash-symbol-should-close-the-slash-menu.json
index 2d280cd0d1..63d1673c4d 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-the-slash-symbol-should-close-the-slash-menu.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/delete-the-slash-symbol-should-close-the-slash-menu.json
@@ -1,29 +1,32 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,25 +35,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": []
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-clean-slash-string-after-soft-enter.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-clean-slash-string-after-soft-enter.json
index a8c8a38651..fe125df0d4 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-clean-slash-string-after-soft-enter.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-clean-slash-string-after-soft-enter.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "hello\n"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "hello\n"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-empty-line-works.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-empty-line-works.json
index 9f601bf1ee..f489a4e74c 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-empty-line-works.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-empty-line-works.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "hello",
"attributes": {
"bold": true
- }
+ },
+ "insert": "hello"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-text-line-works.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-text-line-works.json
index 9f601bf1ee..f489a4e74c 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-text-line-works.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-text-line-works.json
@@ -1,63 +1,65 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
- "flavour": "affine:note",
- "version": 1,
- "props": {
- "xywh": "[0,0,498,92]",
- "background": {
- "dark": "#000000",
- "light": "#ffffff"
- },
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
- "displayMode": "both",
- "edgeless": {
- "style": {
- "borderRadius": 8,
- "borderSize": 4,
- "borderStyle": "none",
- "shadowType": "--affine-note-shadow-box"
- }
- }
- },
"children": [
{
- "type": "block",
- "id": "2",
+ "children": [
+ ],
"flavour": "affine:paragraph",
- "version": 1,
+ "id": "2",
"props": {
- "type": "text",
+ "collapsed": false,
"text": {
"$blocksuite:internal:text$": true,
"delta": [
{
- "insert": "hello",
"attributes": {
"bold": true
- }
+ },
+ "insert": "hello"
}
]
},
- "collapsed": false
+ "type": "text"
},
- "children": []
+ "type": "block",
+ "version": 1
}
+ ],
+ "flavour": "affine:note",
+ "id": "1",
+ "props": {
+ "background": {
+ "dark": "#000000",
+ "light": "#ffffff"
+ },
+ "displayMode": "both",
+ "edgeless": {
+ "style": {
+ "borderRadius": 8,
+ "borderSize": 4,
+ "borderStyle": "none",
+ "shadowType": "--affine-note-shadow-box"
+ }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/tests/blocksuite/snapshots/slash-menu.spec.ts/slash-menu-should-hide-after-click-away.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/slash-menu-should-hide-after-click-away.json
index 35cc21baf0..68f3f90eac 100644
--- a/tests/blocksuite/snapshots/slash-menu.spec.ts/slash-menu-should-hide-after-click-away.json
+++ b/tests/blocksuite/snapshots/slash-menu.spec.ts/slash-menu-should-hide-after-click-away.json
@@ -1,29 +1,35 @@
{
- "type": "block",
- "id": "0",
- "flavour": "affine:page",
- "version": 2,
- "props": {
- "title": {
- "$blocksuite:internal:text$": true,
- "delta": []
- }
- },
"children": [
{
- "type": "block",
- "id": "1",
+ "children": [
+ {
+ "children": [
+ ],
+ "flavour": "affine:paragraph",
+ "id": "2",
+ "props": {
+ "collapsed": false,
+ "text": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
+ {
+ "insert": "/"
+ }
+ ]
+ },
+ "type": "text"
+ },
+ "type": "block",
+ "version": 1
+ }
+ ],
"flavour": "affine:note",
- "version": 1,
+ "id": "1",
"props": {
- "xywh": "[0,0,498,92]",
"background": {
"dark": "#000000",
"light": "#ffffff"
},
- "index": "a0",
- "lockedBySelf": false,
- "hidden": false,
"displayMode": "both",
"edgeless": {
"style": {
@@ -32,29 +38,25 @@
"borderStyle": "none",
"shadowType": "--affine-note-shadow-box"
}
- }
+ },
+ "hidden": false,
+ "index": "a0",
+ "lockedBySelf": false,
+ "xywh": "[0,0,498,92]"
},
- "children": [
- {
- "type": "block",
- "id": "2",
- "flavour": "affine:paragraph",
- "version": 1,
- "props": {
- "type": "text",
- "text": {
- "$blocksuite:internal:text$": true,
- "delta": [
- {
- "insert": "/"
- }
- ]
- },
- "collapsed": false
- },
- "children": []
- }
+ "type": "block",
+ "version": 1
+ }
+ ],
+ "flavour": "affine:page",
+ "id": "0",
+ "props": {
+ "title": {
+ "$blocksuite:internal:text$": true,
+ "delta": [
]
}
- ]
+ },
+ "type": "block",
+ "version": 2
}
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index bad0593fc5..a10697591f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -85,6 +85,7 @@ __metadata:
"@blocksuite/integration-test": "workspace:*"
"@playwright/test": "npm:=1.51.0"
"@toeverything/theme": "npm:^1.1.12"
+ json-stable-stringify: "npm:^1.2.1"
rxjs: "npm:^7.8.1"
languageName: unknown
linkType: soft
@@ -17196,6 +17197,38 @@ __metadata:
languageName: node
linkType: hard
+"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "call-bind-apply-helpers@npm:1.0.2"
+ dependencies:
+ es-errors: "npm:^1.3.0"
+ function-bind: "npm:^1.1.2"
+ checksum: 10/00482c1f6aa7cfb30fb1dbeb13873edf81cfac7c29ed67a5957d60635a56b2a4a480f1016ddbdb3395cc37900d46037fb965043a51c5c789ffeab4fc535d18b5
+ languageName: node
+ linkType: hard
+
+"call-bind@npm:^1.0.8":
+ version: 1.0.8
+ resolution: "call-bind@npm:1.0.8"
+ dependencies:
+ call-bind-apply-helpers: "npm:^1.0.0"
+ es-define-property: "npm:^1.0.0"
+ get-intrinsic: "npm:^1.2.4"
+ set-function-length: "npm:^1.2.2"
+ checksum: 10/659b03c79bbfccf0cde3a79e7d52570724d7290209823e1ca5088f94b52192dc1836b82a324d0144612f816abb2f1734447438e38d9dafe0b3f82c2a1b9e3bce
+ languageName: node
+ linkType: hard
+
+"call-bound@npm:^1.0.3":
+ version: 1.0.4
+ resolution: "call-bound@npm:1.0.4"
+ dependencies:
+ call-bind-apply-helpers: "npm:^1.0.2"
+ get-intrinsic: "npm:^1.3.0"
+ checksum: 10/ef2b96e126ec0e58a7ff694db43f4d0d44f80e641370c21549ed911fecbdbc2df3ebc9bddad918d6bbdefeafb60bb3337902006d5176d72bcd2da74820991af7
+ languageName: node
+ linkType: hard
+
"callsites@npm:^3.0.0":
version: 3.1.0
resolution: "callsites@npm:3.1.0"
@@ -19414,6 +19447,17 @@ __metadata:
languageName: node
linkType: hard
+"dunder-proto@npm:^1.0.1":
+ version: 1.0.1
+ resolution: "dunder-proto@npm:1.0.1"
+ dependencies:
+ call-bind-apply-helpers: "npm:^1.0.1"
+ es-errors: "npm:^1.3.0"
+ gopd: "npm:^1.2.0"
+ checksum: 10/5add88a3d68d42d6e6130a0cac450b7c2edbe73364bbd2fc334564418569bea97c6943a8fcd70e27130bf32afc236f30982fc4905039b703f23e9e0433c29934
+ languageName: node
+ linkType: hard
+
"eastasianwidth@npm:^0.2.0":
version: 0.2.0
resolution: "eastasianwidth@npm:0.2.0"
@@ -19868,6 +19912,20 @@ __metadata:
languageName: node
linkType: hard
+"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1":
+ version: 1.0.1
+ resolution: "es-define-property@npm:1.0.1"
+ checksum: 10/f8dc9e660d90919f11084db0a893128f3592b781ce967e4fccfb8f3106cb83e400a4032c559184ec52ee1dbd4b01e7776c7cd0b3327b1961b1a4a7008920fe78
+ languageName: node
+ linkType: hard
+
+"es-errors@npm:^1.3.0":
+ version: 1.3.0
+ resolution: "es-errors@npm:1.3.0"
+ checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5
+ languageName: node
+ linkType: hard
+
"es-iterator-helpers@npm:@nolyfill/es-iterator-helpers@^1":
version: 1.0.21
resolution: "@nolyfill/es-iterator-helpers@npm:1.0.21"
@@ -19884,6 +19942,15 @@ __metadata:
languageName: node
linkType: hard
+"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1":
+ version: 1.1.1
+ resolution: "es-object-atoms@npm:1.1.1"
+ dependencies:
+ es-errors: "npm:^1.3.0"
+ checksum: 10/54fe77de288451dae51c37bfbfe3ec86732dc3778f98f3eb3bdb4bf48063b2c0b8f9c93542656986149d08aa5be3204286e2276053d19582b76753f1a2728867
+ languageName: node
+ linkType: hard
+
"es-set-tostringtag@npm:@nolyfill/es-set-tostringtag@^1":
version: 1.0.44
resolution: "@nolyfill/es-set-tostringtag@npm:1.0.44"
@@ -21472,6 +21539,13 @@ __metadata:
languageName: node
linkType: hard
+"function-bind@npm:@nolyfill/function-bind@^1":
+ version: 1.0.21
+ resolution: "@nolyfill/function-bind@npm:1.0.21"
+ checksum: 10/b132954ab8b0f17360fc85aff853d7fda8ef2d72124a31dc7f8793e2aeb7da2175d4c1491149f818f8126e93ba8cbfed70b77f160991696caa15e8476223da43
+ languageName: node
+ linkType: hard
+
"functional-red-black-tree@npm:1.0.1":
version: 1.0.1
resolution: "functional-red-black-tree@npm:1.0.1"
@@ -21595,6 +21669,24 @@ __metadata:
languageName: node
linkType: hard
+"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.3.0":
+ version: 1.3.0
+ resolution: "get-intrinsic@npm:1.3.0"
+ dependencies:
+ call-bind-apply-helpers: "npm:^1.0.2"
+ es-define-property: "npm:^1.0.1"
+ es-errors: "npm:^1.3.0"
+ es-object-atoms: "npm:^1.1.1"
+ function-bind: "npm:^1.1.2"
+ get-proto: "npm:^1.0.1"
+ gopd: "npm:^1.2.0"
+ has-symbols: "npm:^1.1.0"
+ hasown: "npm:^2.0.2"
+ math-intrinsics: "npm:^1.1.0"
+ checksum: 10/6e9dd920ff054147b6f44cb98104330e87caafae051b6d37b13384a45ba15e71af33c3baeac7cb630a0aaa23142718dcf25b45cfdd86c184c5dcb4e56d953a10
+ languageName: node
+ linkType: hard
+
"get-nonce@npm:^1.0.0":
version: 1.0.1
resolution: "get-nonce@npm:1.0.1"
@@ -21621,6 +21713,16 @@ __metadata:
languageName: node
linkType: hard
+"get-proto@npm:^1.0.1":
+ version: 1.0.1
+ resolution: "get-proto@npm:1.0.1"
+ dependencies:
+ dunder-proto: "npm:^1.0.1"
+ es-object-atoms: "npm:^1.0.0"
+ checksum: 10/4fc96afdb58ced9a67558698b91433e6b037aaa6f1493af77498d7c85b141382cf223c0e5946f334fb328ee85dfe6edd06d218eaf09556f4bc4ec6005d7f5f7b
+ languageName: node
+ linkType: hard
+
"get-stream@npm:^4.0.0":
version: 4.1.0
resolution: "get-stream@npm:4.1.0"
@@ -21978,6 +22080,13 @@ __metadata:
languageName: node
linkType: hard
+"gopd@npm:@nolyfill/gopd@^1":
+ version: 1.0.44
+ resolution: "@nolyfill/gopd@npm:1.0.44"
+ checksum: 10/709da9df577e8b23972df0a3da6f0b520e4ee55e004fa5299865e554113971f33979232a739218b205cb1e5d742fac717e6d3769fb64cb0058e2bcef4cc0eb08
+ languageName: node
+ linkType: hard
+
"got@npm:^11.7.0, got@npm:^11.8.5":
version: 11.8.6
resolution: "got@npm:11.8.6"
@@ -22170,6 +22279,13 @@ __metadata:
languageName: node
linkType: hard
+"has-symbols@npm:@nolyfill/has-symbols@^1":
+ version: 1.0.21
+ resolution: "@nolyfill/has-symbols@npm:1.0.21"
+ checksum: 10/cdeaf1a216842769951331496f1adb4bc89170c9bcf33e3587f32be01cafe0a168dde384f22b78d9e5650acea3f6b09c60323d51c74f3a3b101efbaa216fdb26
+ languageName: node
+ linkType: hard
+
"has-unicode@npm:^2.0.1":
version: 2.0.1
resolution: "has-unicode@npm:2.0.1"
@@ -23951,6 +24067,19 @@ __metadata:
languageName: node
linkType: hard
+"json-stable-stringify@npm:^1.2.1":
+ version: 1.2.1
+ resolution: "json-stable-stringify@npm:1.2.1"
+ dependencies:
+ call-bind: "npm:^1.0.8"
+ call-bound: "npm:^1.0.3"
+ isarray: "npm:^2.0.5"
+ jsonify: "npm:^0.0.1"
+ object-keys: "npm:^1.1.1"
+ checksum: 10/f4600d34605e1da81a615ddf7dc62f021a5a5c822aee38b3c878e9a703bbd72623402944dbd7848140602c9ec54bfa2df65dfe75cc40afcfd79f3f072ca5307b
+ languageName: node
+ linkType: hard
+
"json-stringify-safe@npm:^5.0.1":
version: 5.0.1
resolution: "json-stringify-safe@npm:5.0.1"
@@ -24022,6 +24151,13 @@ __metadata:
languageName: node
linkType: hard
+"jsonify@npm:^0.0.1":
+ version: 0.0.1
+ resolution: "jsonify@npm:0.0.1"
+ checksum: 10/7b86b6f4518582ff1d8b7624ed6c6277affd5246445e864615dbdef843a4057ac58587684faf129ea111eeb80e01c15f0a4d9d03820eb3f3985fa67e81b12398
+ languageName: node
+ linkType: hard
+
"jsonparse@npm:^1.2.0":
version: 1.3.1
resolution: "jsonparse@npm:1.3.1"
@@ -25149,6 +25285,13 @@ __metadata:
languageName: node
linkType: hard
+"math-intrinsics@npm:^1.1.0":
+ version: 1.1.0
+ resolution: "math-intrinsics@npm:1.1.0"
+ checksum: 10/11df2eda46d092a6035479632e1ec865b8134bdfc4bd9e571a656f4191525404f13a283a515938c3a8de934dbfd9c09674d9da9fa831e6eb7e22b50b197d2edd
+ languageName: node
+ linkType: hard
+
"md-to-react-email@npm:5.0.5":
version: 5.0.5
resolution: "md-to-react-email@npm:5.0.5"
@@ -27051,6 +27194,15 @@ __metadata:
languageName: node
linkType: hard
+"object-keys@npm:@nolyfill/object-keys@^1":
+ version: 1.0.44
+ resolution: "@nolyfill/object-keys@npm:1.0.44"
+ dependencies:
+ "@nolyfill/shared": "npm:1.0.44"
+ checksum: 10/83a6c6f80d939ab95a6af7da6b19ba840ef4d6b51347471b5fd428d4b80824c52c57e3bd476282e178bf0bea00e7a28b7ea33299ccaadccd58fc924bb2af5f5e
+ languageName: node
+ linkType: hard
+
"object-path@npm:^0.11.8":
version: 0.11.8
resolution: "object-path@npm:0.11.8"
@@ -30470,6 +30622,13 @@ __metadata:
languageName: node
linkType: hard
+"set-function-length@npm:@nolyfill/set-function-length@^1":
+ version: 1.0.25
+ resolution: "@nolyfill/set-function-length@npm:1.0.25"
+ checksum: 10/530ced403105dd5a923314b5be91fd4ded8de91a2a70fa50dcef2c73b7ff6f9eebd15d1463f23e5d8ff19aeed1c2157613e8a7d7636eb887d6f3c31e22f81f33
+ languageName: node
+ linkType: hard
+
"setimmediate@npm:^1.0.5":
version: 1.0.5
resolution: "setimmediate@npm:1.0.5"