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

This commit is contained in:
pengx17
2025-03-18 05:41:19 +00:00
parent 83af78d9ee
commit 99370573c8
183 changed files with 10875 additions and 10142 deletions

View File

@@ -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
}