From 99370573c806c72ebc1a5ec2bc91a18bbb95ab1e Mon Sep 17 00:00:00 2001 From: pengx17 Date: Tue, 18 Mar 2025 05:41:19 +0000 Subject: [PATCH] refactor(editor): use stable stringify for snapshots (#10948) --- tests/blocksuite/e2e/utils/actions/misc.ts | 3 +- tests/blocksuite/package.json | 1 + ...can-insert-attachment-from-slash-menu.json | 80 +++--- .../should-attachment-can-be-deleted.json | 42 ++-- ...ould-turn-attachment-to-image-works-1.json | 78 +++--- ...ould-turn-attachment-to-image-works-2.json | 82 ++++--- ...ould-undo-redo-works-for-attachment-1.json | 80 +++--- ...ould-undo-redo-works-for-attachment-2.json | 82 ++++--- ...ould-undo-redo-works-for-attachment-3.json | 80 +++--- ...-dragging-attachment-block-directly-1.json | 80 +++--- ...-dragging-attachment-block-directly-2.json | 129 +++++----- ...-dragging-attachment-block-directly-3.json | 129 +++++----- .../automatic-identify-url-text-final.json | 98 ++++---- .../basic.spec.ts/basic-test-default.json | 82 ++++--- ...reate-bookmark-in-edgeless-mode-final.json | 115 ++++----- ...to-create-bookmark-in-page-mode-final.json | 101 ++++---- ...ert-bookmark-block-to-link-text-final.json | 86 +++---- .../create-bookmark-by-slash-menu-final.json | 82 ++++--- .../auto-identify-url-final.json | 92 +++---- ...-copy-will-reappear-content-after-cut.json | 77 +++--- ...opy-will-reappear-content-after-paste.json | 158 ++++++------ ...-block-except-type-text-after-paste-1.json | 82 ++++--- ...-block-except-type-text-after-paste-2.json | 119 ++++----- ...opy-menu-copy-whole-code-block-pasted.json | 123 +++++----- ...menu-copy-the-empty-code-block-pasted.json | 109 +++++---- .../code/crud.spec.ts/add-caption-works.json | 107 ++++---- .../change-code-language-can-work-1.json | 75 +++--- .../change-code-language-can-work-2.json | 75 +++--- .../delete-code-block-in-more-menu-final.json | 42 ++-- .../duplicate-code-block-final.json | 123 +++++----- .../format-text-in-code-block-format.json | 136 ++++++----- .../format-text-in-code-block-init.json | 84 +++---- .../format-text-in-code-block-link.json | 158 ++++++------ .../toggle-code-block-wrap-can-work-1.json | 75 +++--- .../toggle-code-block-wrap-can-work-2.json | 75 +++--- .../toggle-code-block-wrap-can-work-3.json | 75 +++--- .../undo-code-block-wrap-can-work-1.json | 75 +++--- .../undo-code-block-wrap-can-work-2.json | 75 +++--- .../undo-code-block-wrap-can-work-3.json | 75 +++--- ...own-syntax-can-create-code-block-init.json | 150 ++++++------ ...can-create-code-block-markdown-syntax.json | 147 +++++------ ...level-in-multi-level-nesting-drag-3-9.json | 230 +++++++++--------- ...level-in-multi-level-nesting-drag-4-3.json | 230 +++++++++--------- ...ach-level-in-multi-level-nesting-init.json | 230 +++++++++--------- ...-limit-for-embed-block-add-linked-doc.json | 147 +++++------ .../min-width-limit-for-embed-block-drag.json | 145 +++++------ .../min-width-limit-for-embed-block-init.json | 144 +++++------ ...or-embed-block-link-to-card-min-width.json | 145 +++++------ ...th-limit-for-embed-block-link-to-card.json | 145 +++++------ ...-line-when-edgeless-text-exist-finial.json | 200 +++++++-------- ...e-when-edgeless-text-exist-note-empty.json | 108 ++++---- ...en-edgeless-text-exist-note-not-empty.json | 139 ++++++----- ...-from-block-selection-with-format-bar.json | 74 +++--- ...change-background-color-default-color.json | 112 +++++---- ...-able-to-change-background-color-init.json | 112 +++++---- ...to-change-background-color-select-all.json | 116 ++++----- ...ge-to-heading-paragraph-type-bulleted.json | 112 +++++---- ...ange-to-heading-paragraph-type-finial.json | 108 ++++---- ...change-to-heading-paragraph-type-init.json | 108 ++++---- ...ick-bar-be-able-to-format-text-finial.json | 116 ++++----- ...quick-bar-be-able-to-format-text-init.json | 118 ++++----- ...text-when-select-multiple-line-finial.json | 108 ++++---- ...t-text-when-select-multiple-line-init.json | 176 +++++++------- ...quick-bar-be-able-to-link-text-finial.json | 108 ++++---- ...t-quick-bar-be-able-to-link-text-init.json | 112 +++++---- ...-bar-show-after-convert-to-code-block.json | 84 +++---- ...on-works-when-update-block-type-final.json | 108 ++++---- ...ion-works-when-update-block-type-init.json | 120 ++++----- ...-bar-work-in-multiple-block-selection.json | 182 +++++++------- ...ck-bar-work-in-single-block-selection.json | 116 ++++----- ...ket-complete-with-backtick-works-undo.json | 82 ++++--- ...-bracket-complete-with-backtick-works.json | 98 ++++---- ...ted-after-setting-heading-by-shortkey.json | 95 ++++---- .../should-cut-work-single-line-init.json | 82 ++++--- .../should-cut-work-single-line-undo.json | 82 ++++--- .../should-hotkey-work-in-paragraph-init.json | 82 ++++--- ...ould-hotkey-work-in-paragraph-press-0.json | 82 ++++--- ...ould-hotkey-work-in-paragraph-press-6.json | 82 ++++--- ...ould-hotkey-work-in-paragraph-press-8.json | 86 +++---- ...ould-hotkey-work-in-paragraph-press-9.json | 86 +++---- ...ould-hotkey-work-in-paragraph-press-d.json | 110 +++++---- ...single-line-format-hotkey-work-finial.json | 82 ++++--- ...d-single-line-format-hotkey-work-init.json | 104 ++++---- .../type-character-jump-out-code-node-1.json | 86 +++---- .../type-character-jump-out-code-node-2.json | 92 +++---- ...cursor-with-hotkey-at-empty-line-bold.json | 86 +++---- ...formatted-cursor-with-hotkey-bold-ggg.json | 136 ++++++----- ...formatted-cursor-with-hotkey-bold-hhh.json | 136 ++++++----- ...use-formatted-cursor-with-hotkey-bold.json | 136 ++++++----- ...use-formatted-cursor-with-hotkey-init.json | 124 +++++----- ...ine-rich-text-inline-code-hotkey-init.json | 188 +++++++------- ...ine-rich-text-inline-code-hotkey-redo.json | 188 +++++++------- ...ine-rich-text-inline-code-hotkey-undo.json | 108 ++++---- .../should-cut-work-multiple-line-init.json | 82 ++++--- .../should-cut-work-multiple-line-undo.json | 108 ++++---- ...ltiple-line-format-hotkey-work-finial.json | 108 ++++---- ...multiple-line-format-hotkey-work-init.json | 206 ++++++++-------- ...g-markdown-shortcut-with-enter-finial.json | 104 ++++---- ...ing-markdown-shortcut-with-enter-init.json | 73 +++--- ...g-markdown-shortcut-with-space-finial.json | 104 ++++---- ...ing-markdown-shortcut-with-space-init.json | 73 +++--- ...d-latex-block-using-slash-menu-finial.json | 72 +++--- ...add-latex-block-using-slash-menu-init.json | 73 +++--- .../snapshots/link.spec.ts/basic-link.json | 86 +++---- .../link.spec.ts/convert-link-to-card.json | 99 ++++---- .../link.spec.ts/convert-link-to-embed.json | 99 ++++---- .../link.spec.ts/create-link-with-paste.json | 86 +++---- .../should-mock-selection-not-stored.json | 82 ++++--- ...should-not-extend-the-link-attributes.json | 121 ++++----- ...in-link-should-not-jump-out-link-node.json | 115 ++++----- ...can-create-linked-page-and-jump-final.json | 115 ++++----- .../can-create-linked-page-and-jump-init.json | 115 ++++----- ...nked-page-should-paste-as-linked-page.json | 143 +++++------ ...c-popover-can-show-and-hide-correctly.json | 82 ++++--- ...nked-page-should-paste-as-linked-page.json | 92 +++---- ...elected-text-converted-to-linked-page.json | 104 ++++---- ...uld-create-and-switch-page-work-final.json | 103 ++++---- ...ould-create-and-switch-page-work-init.json | 103 ++++---- ...reference-node-attributes-correctly-1.json | 92 +++---- ...reference-node-attributes-correctly-2.json | 73 +++--- ...ove-correctly-around-reference-node-1.json | 104 ++++---- ...ove-correctly-around-reference-node-2.json | 82 ++++--- ...e-node-is-in-the-start-or-end-of-line.json | 128 +++++----- ...nodes-should-not-be-extend-attributes.json | 128 +++++----- ...c-indent-and-unindent-after-shift-tab.json | 95 ++++---- .../basic-indent-and-unindent-after-tab.json | 116 ++++----- .../basic-indent-and-unindent-init.json | 95 ++++---- ...ggle-in-readonly-mode-before-readonly.json | 141 +++++------ ...oggle-icon-should-collapsed-list-init.json | 141 +++++------ ...gle-icon-should-collapsed-list-toggle.json | 141 +++++------ ...onvert-nested-paragraph-to-list-final.json | 124 +++++----- ...convert-nested-paragraph-to-list-init.json | 116 ++++----- .../enter-list-block-with-empty-text-1.json | 150 ++++++------ .../enter-list-block-with-empty-text-2.json | 150 ++++++------ .../enter-list-block-with-empty-text-3.json | 146 +++++------ .../enter-list-block-with-empty-text-4.json | 150 ++++++------ .../enter-list-block-with-empty-text-5.json | 146 +++++------ ...enter-list-block-with-empty-text-init.json | 149 ++++++------ ...dent-item-should-expand-toggle-finial.json | 158 ++++++------ ...indent-item-should-expand-toggle-init.json | 158 ++++++------ ...dent-item-should-expand-toggle-toggle.json | 158 ++++++------ .../nested-list-blocks-finial.json | 141 +++++------ .../list.spec.ts/nested-list-blocks-init.json | 162 ++++++------ ...todo-block-preserve-todo-status-final.json | 99 ++++---- ...-todo-block-preserve-todo-status-init.json | 120 ++++----- ...ks-when-following-custom-blocks-final.json | 107 ++++---- ...cks-when-following-custom-blocks-init.json | 141 +++++------ ...in-line-start-after-press-backspace-2.json | 129 +++++----- ...in-line-start-after-press-backspace-3.json | 129 +++++----- ...e-in-line-start-after-press-backspace.json | 142 +++++------ ...-indent-and-delete-in-line-start-init.json | 176 +++++++------- ...hild-block-should-work-at-enter-final.json | 129 +++++----- ...child-block-should-work-at-enter-init.json | 116 ++++----- ...hold-cursor-in-correct-position-final.json | 95 ++++---- ...-hold-cursor-in-correct-position-init.json | 116 ++++----- ...unindent-works-with-children-indent-2.json | 155 ++++++------ ...unindent-works-with-children-indent-3.json | 176 +++++++------- ...unindent-works-with-children-indent-4.json | 195 +++++++-------- ...d-unindent-works-with-children-indent.json | 155 ++++++------ ...and-unindent-works-with-children-init.json | 134 +++++----- ...indent-works-with-children-unindent-1.json | 176 +++++++------- ...indent-works-with-children-unindent-2.json | 160 ++++++------ ...indent-works-with-children-unindent-3.json | 134 +++++----- ...nly-mode-not-be-able-to-modify-text-1.json | 82 ++++--- ...nly-mode-not-be-able-to-modify-text-2.json | 82 ++++--- ...or-should-insert-a-new-editable-block.json | 110 +++++---- .../should-indent-multi-selection-block.json | 129 +++++----- ...selected-blocks-when-entering-tab-key.json | 129 +++++----- ...-unindent-multi-selection-block-final.json | 108 ++++---- ...d-unindent-multi-selection-block-init.json | 129 +++++----- ...multi-selection-block-after-shift-tab.json | 121 ++++----- ...ative-multi-selection-block-after-tab.json | 142 +++++------ ...ge-delete-with-indent-after-backspace.json | 95 ++++---- ...e-range-delete-with-indent-after-redo.json | 95 ++++---- ...e-range-delete-with-indent-after-undo.json | 221 ++++++++--------- .../native-range-delete-with-indent-init.json | 221 ++++++++--------- ...-by-slash-menu-should-remove-children.json | 86 +++---- ...sh-symbol-should-close-the-slash-menu.json | 73 +++--- ...d-clean-slash-string-after-soft-enter.json | 82 ++++--- .../should-style-empty-line-works.json | 86 +++---- .../should-style-text-line-works.json | 86 +++---- ...ash-menu-should-hide-after-click-away.json | 82 ++++--- yarn.lock | 159 ++++++++++++ 183 files changed, 10875 insertions(+), 10142 deletions(-) diff --git a/tests/blocksuite/e2e/utils/actions/misc.ts b/tests/blocksuite/e2e/utils/actions/misc.ts index 16262ca26..21cad179e 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 cc7b6e74e..a233d3a96 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 123e7a07c..71b75acb6 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 e7c7c2e21..c0a852b23 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 0ee882496..ffa6190fd 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 82cb4cf1b..ff5c129dc 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 123e7a07c..71b75acb6 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 35cc21baf..68f3f90ea 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,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,11 +17,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/should-undo-redo-works-for-attachment-3.json b/tests/blocksuite/snapshots/attachment.spec.ts/should-undo-redo-works-for-attachment-3.json index 1db30ca3b..71b75acb6 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 123e7a07c..71b75acb6 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 6201b4b02..3a3423ff5 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 dbc9bf4e4..8be3c0b23 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 b13c64a57..a9aee0ac9 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,29 +1,44 @@ { - "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": "abc " + }, + { + "attributes": { + "link": "https://google.com" + }, + "insert": "https://google.com" + }, + { + "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,38 +47,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": "abc " - }, - { - "insert": "https://google.com", - "attributes": { - "link": "https://google.com" - } - }, - { - "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/basic.spec.ts/basic-test-default.json b/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json index 88deb243a..43346763e 100644 --- a/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.json +++ b/tests/blocksuite/snapshots/basic.spec.ts/basic-test-default.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,11 +17,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/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 8e72ee50b..33c96a66e 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": {} - }, - "children": [] - }, - { - "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" - } + "elements": { } }, + "type": "block", + "version": 5 + }, + { "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 70629dd2f..f0fde12a5 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 6d9d9e11f..db31b024f 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "link": "http://localhost" + }, + "insert": "http://localhost" + } + ] + }, + "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,32 +41,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": "http://localhost", - "attributes": { - "link": "http://localhost" - } - } - ] - }, - "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/create-bookmark-by-slash-menu-final.json b/tests/blocksuite/snapshots/bookmark.spec.ts/create-bookmark-by-slash-menu-final.json index bfef5d3b6..08119762b 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 6c6a8fbbd..f3b3f514e 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,29 +1,41 @@ { - "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": "test " + }, + { + "attributes": { + "link": "https://www.google.com" + }, + "insert": "https://www.google.com" + } + ] + }, + "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,35 +44,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": "test " - }, - { - "insert": "https://www.google.com", - "attributes": { - "link": "https://www.google.com" - } - } - ] - }, - "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/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 fac8595cb..980359be0 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 c0ed3d2da..cfb493e9c 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 2f322f211..bfbd48a21 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,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,11 +17,46 @@ } ] }, - "collapsed": false + "type": "quote" }, - "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-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 2ac573b63..b5269b27e 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,29 +1,55 @@ { - "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 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "123" + } + ] + }, + "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,48 +58,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "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", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "123" - } - ] - }, - "collapsed": false - }, - "children": [] - } + "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 6e25e9394..c56a73fc3 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,29 +1,57 @@ { - "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": "javascript", + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "use" + } + ] + }, + "wrap": false + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:code", + "id": "4", + "props": { + "caption": "", + "language": "javascript", + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "use" + } + ] + }, + "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,50 +60,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "2", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "use" - } - ] - }, - "language": "javascript", - "wrap": false, - "caption": "" - }, - "children": [] }, - { - "type": "block", - "id": "4", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "use" - } - ] - }, - "language": "javascript", - "wrap": false, - "caption": "" - }, - "children": [] - } + "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 b6a56a9b2..eccec462d 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,29 +1,51 @@ { - "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": "javascript", + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "wrap": false + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:code", + "id": "4", + "props": { + "caption": "", + "language": "javascript", + "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,42 +54,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "2", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "language": "javascript", - "wrap": false, - "caption": "" - }, - "children": [] }, - { - "type": "block", - "id": "4", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "language": "javascript", - "wrap": false, - "caption": "" - }, - "children": [] - } + "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 d4177165f..8f7e4c1c8 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,29 +1,50 @@ { - "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": "BlockSuite", + "language": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "wrap": false + }, + "type": "block", + "version": 1 + }, + { + "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": "1", "props": { - "xywh": "[0,0,498,92]", "background": { "dark": "#000000", "light": "#ffffff" }, - "index": "a0", - "lockedBySelf": false, - "hidden": false, "displayMode": "both", "edgeless": { "style": { @@ -32,41 +53,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "2", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "language": null, - "wrap": false, - "caption": "BlockSuite" - }, - "children": [] }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "collapsed": false - }, - "children": [] - } + "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 5a4f767d5..64a5f3bce 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 817823dfc..fb5b2fb7a 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 e7c7c2e21..c0a852b23 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 4bfd573d8..4147826d6 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,29 +1,57 @@ { - "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": "BlockSuite", + "language": "rust", + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "let a: u8 = 7" + } + ] + }, + "wrap": true + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:code", + "id": "4", + "props": { + "caption": "BlockSuite", + "language": "rust", + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "let a: u8 = 7" + } + ] + }, + "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,50 +60,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "2", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "let a: u8 = 7" - } - ] - }, - "language": "rust", - "wrap": true, - "caption": "BlockSuite" - }, - "children": [] }, - { - "type": "block", - "id": "4", - "flavour": "affine:code", - "version": 1, - "props": { - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "let a: u8 = 7" - } - ] - }, - "language": "rust", - "wrap": true, - "caption": "BlockSuite" - }, - "children": [] - } + "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 07bd729db..3b1b229fc 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,29 +1,63 @@ { - "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": "c" + }, + { + "attributes": { + "bold": true + }, + "insert": "o" + }, + { + "insert": "ns" + }, + { + "attributes": { + "bold": true + }, + "insert": "t a" + }, + { + "insert": "a" + }, + { + "attributes": { + "bold": true + }, + "insert": "a = 1000" + }, + { + "insert": ";" + } + ] + }, + "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,57 +66,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": "c" - }, - { - "insert": "o", - "attributes": { - "bold": true - } - }, - { - "insert": "ns" - }, - { - "insert": "t a", - "attributes": { - "bold": true - } - }, - { - "insert": "a" - }, - { - "insert": "a = 1000", - "attributes": { - "bold": true - } - }, - { - "insert": ";" - } - ] - }, - "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-init.json b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-init.json index c6a696c89..a05fba052 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,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": [ @@ -49,13 +18,46 @@ } ] }, - "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-link.json b/tests/blocksuite/snapshots/code/crud.spec.ts/format-text-in-code-block-link.json index 9c05d5a06..6432bdcb0 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,29 +1,74 @@ { - "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": "c" + }, + { + "attributes": { + "bold": true + }, + "insert": "o" + }, + { + "insert": "ns" + }, + { + "attributes": { + "bold": true, + "link": "https://www.baidu.com" + }, + "insert": "t a" + }, + { + "attributes": { + "link": "https://www.baidu.com" + }, + "insert": "a" + }, + { + "attributes": { + "bold": true, + "link": "https://www.baidu.com" + }, + "insert": "a " + }, + { + "attributes": { + "bold": true + }, + "insert": "= 1000" + }, + { + "insert": ";" + } + ] + }, + "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,68 +77,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": "c" - }, - { - "insert": "o", - "attributes": { - "bold": true - } - }, - { - "insert": "ns" - }, - { - "insert": "t a", - "attributes": { - "link": "https://www.baidu.com", - "bold": true - } - }, - { - "insert": "a", - "attributes": { - "link": "https://www.baidu.com" - } - }, - { - "insert": "a ", - "attributes": { - "link": "https://www.baidu.com", - "bold": true - } - }, - { - "insert": "= 1000", - "attributes": { - "bold": true - } - }, - { - "insert": ";" - } - ] - }, - "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/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 817823dfc..fb5b2fb7a 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 4289de99c..3c87bd42a 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 817823dfc..fb5b2fb7a 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 817823dfc..fb5b2fb7a 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 4289de99c..3c87bd42a 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 817823dfc..fb5b2fb7a 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 3d570b9a5..edd4cfa83 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 34e377841..4a48066c8 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,63 +1,32 @@ { - "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": { + "caption": "", + "language": null, "text": { "$blocksuite:internal:text$": true, - "delta": [] + "delta": [ + ] }, - "language": null, - "wrap": false, - "caption": "" + "wrap": false }, - "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": [ @@ -66,35 +35,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": "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": [ @@ -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 41a326536..7d2fa284c 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 36d763f9f..834229451 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 b3e1c2b29..bda464c82 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 49158f263..4c25294e7 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 6bb6517e6..04c67ff07 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", + "children": [ + { + "children": [ + ], + "flavour": "affine:embed-linked-doc", + "id": "11", + "props": { + "caption": null, + "index": "a0", + "lockedBySelf": false, + "pageId": "6", + "rotate": 0, + "style": "horizontal", + "xywh": "[0,0,0,0]" + }, + "type": "block", + "version": 1 + } + ], "flavour": "affine:edgeless-text", - "version": 1, + "id": "4", "props": { - "xywh": "[-25,-25,497,154]", - "index": "a1", - "lockedBySelf": false, "color": "#84cfff", "fontFamily": "blocksuite:surface:Inter", "fontStyle": "normal", "fontWeight": "400", - "textAlign": "left", - "scale": 1, + "hasMaxWidth": true, + "index": "a1", + "lockedBySelf": false, "rotate": 0, - "hasMaxWidth": true + "scale": 1, + "textAlign": "left", + "xywh": "[-25,-25,497,154]" }, - "children": [ - { - "type": "block", - "id": "11", - "flavour": "affine:embed-linked-doc", - "version": 1, - "props": { - "index": "a0", - "xywh": "[0,0,0,0]", - "lockedBySelf": false, - "rotate": 0, - "pageId": "6", - "style": "horizontal", - "caption": null - }, - "children": [] - } - ] + "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 f64fd5487..4b4ae61bd 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", + "children": [ + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "5", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + } + ], "flavour": "affine:edgeless-text", - "version": 1, + "id": "4", "props": { - "xywh": "[-25,-25,220,26]", - "index": "a1", - "lockedBySelf": false, "color": "#84cfff", "fontFamily": "blocksuite:surface:Inter", "fontStyle": "normal", "fontWeight": "400", - "textAlign": "left", - "scale": 1, + "hasMaxWidth": false, + "index": "a1", + "lockedBySelf": false, "rotate": 0, - "hasMaxWidth": false + "scale": 1, + "textAlign": "left", + "xywh": "[-25,-25,220,26]" }, - "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: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 463f5b06b..12d349c19 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", + "children": [ + { + "children": [ + ], + "flavour": "affine:embed-linked-doc", + "id": "11", + "props": { + "caption": null, + "index": "a0", + "lockedBySelf": false, + "pageId": "6", + "rotate": 0, + "style": "horizontal", + "xywh": "[0,0,0,0]" + }, + "type": "block", + "version": 1 + } + ], "flavour": "affine:edgeless-text", - "version": 1, + "id": "4", "props": { - "xywh": "[-25,-25,452,154]", - "index": "a1", - "lockedBySelf": false, "color": "#84cfff", "fontFamily": "blocksuite:surface:Inter", "fontStyle": "normal", "fontWeight": "400", - "textAlign": "left", - "scale": 1, + "hasMaxWidth": true, + "index": "a1", + "lockedBySelf": false, "rotate": 0, - "hasMaxWidth": true + "scale": 1, + "textAlign": "left", + "xywh": "[-25,-25,452,154]" }, - "children": [ - { - "type": "block", - "id": "11", - "flavour": "affine:embed-linked-doc", - "version": 1, - "props": { - "index": "a0", - "xywh": "[0,0,0,0]", - "lockedBySelf": false, - "rotate": 0, - "pageId": "6", - "style": "horizontal", - "caption": null - }, - "children": [] - } - ] + "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 6d07c4f93..df95c1370 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", + "children": [ + { + "children": [ + ], + "flavour": "affine:embed-linked-doc", + "id": "11", + "props": { + "caption": null, + "index": "a0", + "lockedBySelf": false, + "pageId": "6", + "rotate": 0, + "style": "horizontal", + "xywh": "[0,0,0,0]" + }, + "type": "block", + "version": 1 + } + ], "flavour": "affine:edgeless-text", - "version": 1, + "id": "4", "props": { - "xywh": "[-25,-25,452,154]", - "index": "a1", - "lockedBySelf": false, "color": "#84cfff", "fontFamily": "blocksuite:surface:Inter", "fontStyle": "normal", "fontWeight": "400", - "textAlign": "left", - "scale": 1, + "hasMaxWidth": false, + "index": "a1", + "lockedBySelf": false, "rotate": 0, - "hasMaxWidth": false + "scale": 1, + "textAlign": "left", + "xywh": "[-25,-25,452,154]" }, - "children": [ - { - "type": "block", - "id": "11", - "flavour": "affine:embed-linked-doc", - "version": 1, - "props": { - "index": "a0", - "xywh": "[0,0,0,0]", - "lockedBySelf": false, - "rotate": 0, - "pageId": "6", - "style": "horizontal", - "caption": null - }, - "children": [] - } - ] + "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 d9f672dab..1a596823e 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,8 +1,105 @@ { - "type": "block", - "id": "0", + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "aaa" + } + ] + }, + "type": "text" + }, + "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 + }, + { + "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", + "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,48]" + }, + "type": "block", + "version": 1 + } + ], "flavour": "affine:page", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,99 +110,6 @@ ] } }, - "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", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "aaa" - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] - }, - { - "type": "block", - "id": "2", - "flavour": "affine:note", - "version": 1, - "props": { - "xywh": "[0,0,498,48]", - "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:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 d791ddb2d..5fe77a10d 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 43599205e..51684b56c 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 ac7534530..a44193b38 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 ab3ea57fc..c2990c373 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 ab3ea57fc..c2990c373 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 94c309684..4c3bfedb0 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", + "children": [ + ], + "flavour": "affine:paragraph", "id": "2", - "flavour": "affine:paragraph", - "version": 1, "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", + "children": [ + ], + "flavour": "affine:paragraph", "id": "3", - "flavour": "affine:paragraph", - "version": 1, "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 bddf3d6bd..3550ab7e4 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 6f7956de7..9209d0a50 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 4b6a5aecf..2c49d4d57 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 5f91d67a3..b5250bc8e 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 e3c798fb1..6205682d3 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 9c532be4b..1d2babb4d 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 12bf86652..502a60ec0 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,29 +1,84 @@ { - "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": [ + { + "attributes": { + "bold": true + }, + "insert": "123" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true + }, + "insert": "456" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true + }, + "insert": "789" + } + ] + }, + "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,76 +87,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": "123", - "attributes": { - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "456", - "attributes": { - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "789", - "attributes": { - "bold": true - } - } - ] - }, - "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/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 9c532be4b..1d2babb4d 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 0188611aa..3593aca3c 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 6bb07db7f..76d647bef 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,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": "5", + "children": [ + ], "flavour": "affine:code", - "version": 1, + "id": "5", "props": { + "caption": "", + "language": null, "text": { "$blocksuite:internal:text$": true, "delta": [ @@ -49,13 +18,46 @@ } ] }, - "language": null, - "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/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 cf0882a74..cbc597c85 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 d6f87ec2b..1fc9b6d32 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 abff1d216..3cf793663 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,29 +1,87 @@ { - "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": [ + { + "attributes": { + "bold": true, + "underline": true + }, + "insert": "123" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true, + "underline": true + }, + "insert": "456" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true, + "underline": true + }, + "insert": "789" + } + ] + }, + "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,79 +90,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": "123", - "attributes": { - "underline": true, - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "456", - "attributes": { - "underline": true, - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "789", - "attributes": { - "underline": true, - "bold": true - } - } - ] - }, - "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/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 ebf43486b..d77d4db25 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 f558ae99e..4d8f2024a 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,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,11 +17,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.json b/tests/blocksuite/snapshots/hotkey/bracket.spec.ts/should-bracket-complete-with-backtick-works.json index 9bf706be7..f366ea70d 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,29 +1,44 @@ { - "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": "he" + }, + { + "attributes": { + "code": true + }, + "insert": "llo" + }, + { + "insert": " 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,38 +47,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": "he" - }, - { - "insert": "llo", - "attributes": { - "code": true - } - }, - { - "insert": " 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/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 e7171c2a2..9730eb876 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 7646ed57f..7692196ba 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,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,11 +17,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-undo.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-cut-work-single-line-undo.json index 88deb243a..43346763e 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,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,11 +17,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-hotkey-work-in-paragraph-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-init.json index 2e5aae1d8..5ca072cd7 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,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,11 +17,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/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 6185d1e7d..b3df8556f 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,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,11 +17,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-hotkey-work-in-paragraph-press-6.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-6.json index 6913800d2..923bbb7f0 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,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": "h6", + "collapsed": false, "text": { "$blocksuite:internal:text$": true, "delta": [ @@ -50,11 +17,46 @@ } ] }, - "collapsed": false + "type": "h6" }, - "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-hotkey-work-in-paragraph-press-8.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-8.json index 36942fcfc..bf64afff3 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,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,13 +19,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/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 e402ef7ea..7501e680d 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,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": "numbered", + "checked": false, + "collapsed": false, + "order": 1, "text": { "$blocksuite:internal:text$": true, "delta": [ @@ -50,13 +19,46 @@ } ] }, - "checked": false, - "collapsed": false, - "order": 1 + "type": "numbered" }, - "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-hotkey-work-in-paragraph-press-d.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-hotkey-work-in-paragraph-press-d.json index 4754f5ac2..9e73d1b76 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 88deb243a..43346763e 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,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,11 +17,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-single-line-format-hotkey-work-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/should-single-line-format-hotkey-work-init.json index a1d103641..84246a355 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,29 +1,47 @@ { - "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": "h" + }, + { + "attributes": { + "bold": true, + "italic": true, + "strike": true, + "underline": true + }, + "insert": "ell" + }, + { + "insert": "o" + } + ] + }, + "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,41 +50,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": "h" - }, - { - "insert": "ell", - "attributes": { - "strike": true, - "underline": true, - "italic": true, - "bold": true - } - }, - { - "insert": "o" - } - ] - }, - "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/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 4dea51ea6..7c861bbc5 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "code": true + }, + "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,32 +41,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", - "attributes": { - "code": true - } - } - ] - }, - "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/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 262b6d8a4..1683c86b8 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,29 +1,41 @@ { - "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": [ + { + "attributes": { + "code": true + }, + "insert": "Hello" + }, + { + "insert": "block suite" + } + ] + }, + "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,35 +44,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", - "attributes": { - "code": true - } - }, - { - "insert": "block suite" - } - ] - }, - "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/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 47df37eb9..6446c096d 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "bold": true + }, + "insert": "aaa" + } + ] + }, + "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,32 +41,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": "aaa", - "attributes": { - "bold": true - } - } - ] - }, - "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/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 373b7b3c7..b207d026b 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,29 +1,63 @@ { - "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": "aaa" + }, + { + "attributes": { + "italic": true + }, + "insert": "bbb" + }, + { + "attributes": { + "bold": true, + "italic": true + }, + "insert": "ccc" + }, + { + "attributes": { + "bold": true + }, + "insert": "ddd" + }, + { + "insert": "eee" + }, + { + "attributes": { + "bold": true + }, + "insert": "fffggg" + } + ] + }, + "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,57 +66,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": "aaa" - }, - { - "insert": "bbb", - "attributes": { - "italic": true - } - }, - { - "insert": "ccc", - "attributes": { - "italic": true, - "bold": true - } - }, - { - "insert": "ddd", - "attributes": { - "bold": true - } - }, - { - "insert": "eee" - }, - { - "insert": "fffggg", - "attributes": { - "bold": true - } - } - ] - }, - "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/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 a2592907b..4ae6cd985 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,29 +1,63 @@ { - "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": "aaahhh" + }, + { + "attributes": { + "italic": true + }, + "insert": "bbb" + }, + { + "attributes": { + "bold": true, + "italic": true + }, + "insert": "ccc" + }, + { + "attributes": { + "bold": true + }, + "insert": "ddd" + }, + { + "insert": "eee" + }, + { + "attributes": { + "bold": true + }, + "insert": "fffggg" + } + ] + }, + "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,57 +66,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": "aaahhh" - }, - { - "insert": "bbb", - "attributes": { - "italic": true - } - }, - { - "insert": "ccc", - "attributes": { - "italic": true, - "bold": true - } - }, - { - "insert": "ddd", - "attributes": { - "bold": true - } - }, - { - "insert": "eee" - }, - { - "insert": "fffggg", - "attributes": { - "bold": true - } - } - ] - }, - "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/use-formatted-cursor-with-hotkey-bold.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-bold.json index 05d86dcb5..ab7c304c7 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,29 +1,63 @@ { - "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": "aaa" + }, + { + "attributes": { + "italic": true + }, + "insert": "bbb" + }, + { + "attributes": { + "bold": true, + "italic": true + }, + "insert": "ccc" + }, + { + "attributes": { + "bold": true + }, + "insert": "ddd" + }, + { + "insert": "eee" + }, + { + "attributes": { + "bold": true + }, + "insert": "fff" + } + ] + }, + "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,57 +66,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": "aaa" - }, - { - "insert": "bbb", - "attributes": { - "italic": true - } - }, - { - "insert": "ccc", - "attributes": { - "italic": true, - "bold": true - } - }, - { - "insert": "ddd", - "attributes": { - "bold": true - } - }, - { - "insert": "eee" - }, - { - "insert": "fff", - "attributes": { - "bold": true - } - } - ] - }, - "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/use-formatted-cursor-with-hotkey-init.json b/tests/blocksuite/snapshots/hotkey/hotkey.spec.ts/use-formatted-cursor-with-hotkey-init.json index 993e1e1f6..c0bb1ae5d 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,29 +1,57 @@ { - "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": "aaa" + }, + { + "attributes": { + "italic": true + }, + "insert": "bbb" + }, + { + "attributes": { + "bold": true, + "italic": true + }, + "insert": "ccc" + }, + { + "attributes": { + "bold": true + }, + "insert": "ddd" + }, + { + "insert": "eee" + } + ] + }, + "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,51 +60,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": "aaa" - }, - { - "insert": "bbb", - "attributes": { - "italic": true - } - }, - { - "insert": "ccc", - "attributes": { - "italic": true, - "bold": true - } - }, - { - "insert": "ddd", - "attributes": { - "bold": true - } - }, - { - "insert": "eee" - } - ] - }, - "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/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 81cfe186f..8d7c2f41e 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,29 +1,90 @@ { - "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": "1" + }, + { + "attributes": { + "code": true + }, + "insert": "23" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "code": true + }, + "insert": "456" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "code": true + }, + "insert": "78" + }, + { + "insert": "9" + } + ] + }, + "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,82 +93,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": "1" - }, - { - "insert": "23", - "attributes": { - "code": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "456", - "attributes": { - "code": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "78", - "attributes": { - "code": true - } - }, - { - "insert": "9" - } - ] - }, - "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/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 81cfe186f..8d7c2f41e 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,29 +1,90 @@ { - "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": "1" + }, + { + "attributes": { + "code": true + }, + "insert": "23" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "code": true + }, + "insert": "456" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "code": true + }, + "insert": "78" + }, + { + "insert": "9" + } + ] + }, + "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,82 +93,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": "1" - }, - { - "insert": "23", - "attributes": { - "code": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "456", - "attributes": { - "code": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "78", - "attributes": { - "code": true - } - }, - { - "insert": "9" - } - ] - }, - "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/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 9c532be4b..1d2babb4d 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 34fb1214b..5e68733bb 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,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,11 +17,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-undo.json b/tests/blocksuite/snapshots/hotkey/multiline.spec.ts/should-cut-work-multiple-line-undo.json index 9c532be4b..1d2babb4d 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 9c532be4b..1d2babb4d 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 afee46063..18d781f4f 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,29 +1,99 @@ { - "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": "1" + }, + { + "attributes": { + "bold": true, + "italic": true, + "strike": true, + "underline": true + }, + "insert": "23" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "3", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true, + "italic": true, + "strike": true, + "underline": true + }, + "insert": "456" + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "4", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "bold": true, + "italic": true, + "strike": true, + "underline": true + }, + "insert": "78" + }, + { + "insert": "9" + } + ] + }, + "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,91 +102,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": "1" - }, - { - "insert": "23", - "attributes": { - "strike": true, - "underline": true, - "italic": true, - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "456", - "attributes": { - "strike": true, - "underline": true, - "italic": true, - "bold": true - } - } - ] - }, - "collapsed": false - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "78", - "attributes": { - "strike": true, - "underline": true, - "italic": true, - "bold": true - } - }, - { - "insert": "9" - } - ] - }, - "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-enter-finial.json b/tests/blocksuite/snapshots/latex/block.spec.ts/add-latex-block-using-markdown-shortcut-with-enter-finial.json index 954141036..61e284b79 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,29 +1,48 @@ { - "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 + }, + { + "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,40 +51,25 @@ "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": [] - }, - "collapsed": false - }, - "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": [] - } + "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 2d280cd0d..63d1673c4 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 954141036..61e284b79 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,29 +1,48 @@ { - "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 + }, + { + "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,40 +51,25 @@ "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": [] - }, - "collapsed": false - }, - "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": [] - } + "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 2d280cd0d..63d1673c4 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 210553020..511e023da 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 2d280cd0d..63d1673c4 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 0fa872877..3df021a37 100644 --- a/tests/blocksuite/snapshots/link.spec.ts/basic-link.json +++ b/tests/blocksuite/snapshots/link.spec.ts/basic-link.json @@ -1,29 +1,38 @@ { - "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": [ + { + "attributes": { + "link": "https://github.com" + }, + "insert": "link2" + } + ] + }, + "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,32 +41,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": "link2", - "attributes": { - "link": "https://github.com" - } - } - ] - }, - "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/convert-link-to-card.json b/tests/blocksuite/snapshots/link.spec.ts/convert-link-to-card.json index 197ea2515..cec241b7e 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 f9a5b5abe..96886b1e7 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 239dbbb02..e0c0f7e7c 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "link": "http://affine.pro" + }, + "insert": "aaa" + } + ] + }, + "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,32 +41,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": "aaa", - "attributes": { - "link": "http://affine.pro" - } - } - ] - }, - "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/should-mock-selection-not-stored.json b/tests/blocksuite/snapshots/link.spec.ts/should-mock-selection-not-stored.json index d395cf5b1..a46ca84c8 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,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,11 +17,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/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 321e38f06..220c6e99b 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,8 +1,64 @@ { - "type": "block", - "id": "0", + "children": [ + { + "children": [ + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "2", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "Hello" + }, + { + "attributes": { + "link": "http://example.com" + }, + "insert": "link text" + }, + { + "insert": "AFTER_LINK" + } + ] + }, + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,61 +69,6 @@ ] } }, - "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": "Hello" - }, - { - "insert": "link text", - "attributes": { - "link": "http://example.com" - } - }, - { - "insert": "AFTER_LINK" - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 e108d46b3..906378957 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,8 +1,61 @@ { - "type": "block", - "id": "0", + "children": [ + { + "children": [ + { + "children": [ + ], + "flavour": "affine:paragraph", + "id": "2", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "insert": "Hello" + }, + { + "attributes": { + "link": "http://example.com" + }, + "insert": "link texIN_LINKt" + } + ] + }, + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,58 +66,6 @@ ] } }, - "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": "Hello" - }, - { - "insert": "link texIN_LINKt", - "attributes": { - "link": "http://example.com" - } - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 b81b15b30..12cc7b24a 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,8 +1,61 @@ { - "type": "block", - "id": "0", + "children": [ + { + "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", + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,58 +66,6 @@ ] } }, - "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": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 b81b15b30..12cc7b24a 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,8 +1,61 @@ { - "type": "block", - "id": "0", + "children": [ + { + "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", + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,58 +66,6 @@ ] } }, - "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": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 e93ca51d6..1e5bb7723 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,29 +1,67 @@ { - "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": "8", + "props": { + "collapsed": false, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + } + ] + }, + "type": "text" + }, + "type": "block", + "version": 1 + }, + { + "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": { @@ -32,60 +70,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "8", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - } - ] - }, - "collapsed": false - }, - "children": [] }, - { - "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": [] - } + "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 56500e437..b6e1bc8d0 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,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,11 +17,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/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 eb4b6883b..9adc4963d 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,29 +1,41 @@ { - "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": [ + { + "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": { @@ -32,35 +44,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": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - } - ] - }, - "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-Selected-text-converted-to-linked-page.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-Selected-text-converted-to-linked-page.json index 1ce9b5939..11f4ac891 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,29 +1,47 @@ { - "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": "1" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "34" + } + ] + }, + "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,41 +50,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": "1" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "34" - } - ] - }, - "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-create-and-switch-page-work-final.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-create-and-switch-page-work-final.json index d670da8b7..948af6952 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,8 +1,55 @@ { - "type": "block", - "id": "0", + "children": [ + { + "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", + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,52 +60,6 @@ ] } }, - "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": "page0" - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 d670da8b7..948af6952 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,8 +1,55 @@ { - "type": "block", - "id": "0", + "children": [ + { + "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", + "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", - "version": 2, + "id": "0", "props": { "title": { "$blocksuite:internal:text$": true, @@ -13,52 +60,6 @@ ] } }, - "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": "page0" - } - ] - }, - "collapsed": false - }, - "children": [] - } - ] - } - ] + "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 10e0f86b5..88cc86479 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,29 +1,41 @@ { - "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": [ + { + "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": { @@ -32,35 +44,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": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - } - ] - }, - "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-reference-node-attributes-correctly-2.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-reference-node-attributes-correctly-2.json index 2d280cd0d..63d1673c4 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 5836c751d..204862774 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,29 +1,47 @@ { - "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": "14" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "32" + } + ] + }, + "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,41 +50,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": "14" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "32" - } - ] - }, - "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-2.json b/tests/blocksuite/snapshots/linked-page.spec.ts/should-the-cursor-move-correctly-around-reference-node-2.json index 07a9a51ce..747df2b62 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,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,11 +17,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/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 c7b0111e4..b55b7c4ed 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,29 +1,59 @@ { - "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": "1" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "3" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "2" + } + ] + }, + "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,53 +62,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": "1" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "3" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "2" - } - ] - }, - "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-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 c7b0111e4..b55b7c4ed 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,29 +1,59 @@ { - "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": "1" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "3" + }, + { + "attributes": { + "reference": { + "pageId": "3", + "type": "LinkedPage" + } + }, + "insert": " " + }, + { + "insert": "2" + } + ] + }, + "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,53 +62,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": "1" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "3" - }, - { - "insert": " ", - "attributes": { - "reference": { - "type": "LinkedPage", - "pageId": "3" - } - } - }, - { - "insert": "2" - } - ] - }, - "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/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 f7122fa41..269da8024 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 a0b97d96c..5af39a604 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 f7122fa41..269da8024 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 0190bdd5f..30e4fafd1 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 62ffb3c53..8c268578d 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 0190bdd5f..30e4fafd1 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 29d7c6302..a3ee68040 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 e8c0e713a..368f45a26 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 d141470d5..20ef078ab 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,29 +1,72 @@ { - "type": "block", - "id": "0", - "flavour": "affine:page", - "version": 2, - "props": { - "title": { - "$blocksuite:internal:text$": true, - "delta": [] - } - }, "children": [ { - "type": "block", - "id": "1", + "children": [ + { + "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 + }, + { + "children": [ + ], + "flavour": "affine:list", + "id": "4", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "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", - "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,62 +75,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:list", - "version": 1, - "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", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "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/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 ce49df251..301cbed9f 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,29 +1,72 @@ { - "type": "block", - "id": "0", - "flavour": "affine:page", - "version": 2, - "props": { - "title": { - "$blocksuite:internal:text$": true, - "delta": [] - } - }, "children": [ { - "type": "block", - "id": "1", + "children": [ + { + "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:list", + "id": "2", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + ], + "flavour": "affine:list", + "id": "4", + "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,62 +75,25 @@ "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", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - } - ] }, - { - "type": "block", - "id": "4", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - } + "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 a97f6670e..7b0ea344f 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,29 +1,70 @@ { - "type": "block", - "id": "0", - "flavour": "affine:page", - "version": 2, - "props": { - "title": { - "$blocksuite:internal:text$": true, - "delta": [] - } - }, "children": [ { - "type": "block", - "id": "1", + "children": [ + { + "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:list", + "id": "2", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "type": "block", + "version": 1 + }, + { + "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": "1", "props": { - "xywh": "[0,0,498,92]", "background": { "dark": "#000000", "light": "#ffffff" }, - "index": "a0", - "lockedBySelf": false, - "hidden": false, "displayMode": "both", "edgeless": { "style": { @@ -32,60 +73,25 @@ "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", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - } - ] }, - { - "type": "block", - "id": "5", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "collapsed": false - }, - "children": [] - } + "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 02ceafefb..d50972bac 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,29 +1,72 @@ { - "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": "2", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "type": "block", + "version": 1 + }, + { + "children": [ + { + "children": [ + ], + "flavour": "affine:list", + "id": "4", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "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", - "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,62 +75,25 @@ "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", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [ - { - "type": "block", - "id": "4", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - } - ] - } + "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 2855ac10d..1d545457d 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,29 +1,70 @@ { - "type": "block", - "id": "0", - "flavour": "affine:page", - "version": 2, - "props": { - "title": { - "$blocksuite:internal:text$": true, - "delta": [] - } - }, "children": [ { - "type": "block", - "id": "1", + "children": [ + { + "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 + }, + { + "children": [ + ], + "flavour": "affine:list", + "id": "4", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "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", - "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,60 +73,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } + }, + "hidden": false, + "index": "a0", + "lockedBySelf": false, + "xywh": "[0,0,498,92]" }, - "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", - "flavour": "affine:list", - "version": 1, - "props": { - "type": "bulleted", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "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/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 22867899b..b9dd88cba 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,29 +1,72 @@ { - "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": "2", + "props": { + "checked": false, + "collapsed": false, + "order": null, + "text": { + "$blocksuite:internal:text$": true, + "delta": [ + ] + }, + "type": "bulleted" + }, + "type": "block", + "version": 1 + }, + { + "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 + }, + { + "children": [ + ], + "flavour": "affine:list", + "id": "4", + "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,61 +75,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:list", - "version": 1, - "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", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "checked": false, - "collapsed": false, - "order": null - }, - "children": [] - }, - { - "type": "block", - "id": "4", - "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/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 260939465..eb802baf6 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 99002d586..9e8efcb41 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 58771e931..13fd08692 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 8bf1adc88..8202eeff1 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 3207ffb89..254f3f11f 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 a16d6e651..555b1ac76 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 b501041e3..f57f180fd 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 fdf2e1794..28f8af456 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 ee4a992ad..12f26a002 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 838ef87ff..3dd4dd9bc 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 a4e639d7f..5fd47061d 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 f54e8aea2..d9595a65f 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 d693e8bf0..a56131fe8 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 46f4679c4..58f10b453 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 26e9b7982..e06082cf1 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 527f762a8..c87c54c0d 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 ca6d873ef..c59203e18 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 d0ad122bb..5c61943a7 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 a833cbc37..830386f09 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 74bd1728e..08c8d76e5 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 6fbe5828f..2863edc65 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 a105d1c34..0ec138fac 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 98506a0c3..f010a5e71 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 da838ede1..20857e449 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 a105d1c34..0ec138fac 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 88deb243a..43346763e 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,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,11 +17,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-2.json b/tests/blocksuite/snapshots/paragraph.spec.ts/should-readonly-mode-not-be-able-to-modify-text-2.json index 88deb243a..43346763e 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,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,11 +17,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/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 5c0f7563d..56191e9aa 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,29 +1,51 @@ { - "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": "2", + "props": { + "caption": "", + "height": 268.5, + "index": "a0", + "lockedBySelf": false, + "rotate": 0, + "size": -1, + "sourceId": "ejImogf-Tb7AuKY-v94uz1zuOJbClqK-tWBxVr_ksGA=", + "width": 358, + "xywh": "[0,0,0,0]" + }, + "type": "block", + "version": 1 + }, + { + "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": "1", "props": { - "xywh": "[0,0,498,92]", "background": { "dark": "#000000", "light": "#ffffff" }, - "index": "a0", - "lockedBySelf": false, - "hidden": false, "displayMode": "both", "edgeless": { "style": { @@ -32,43 +54,25 @@ "borderStyle": "none", "shadowType": "--affine-note-shadow-box" } - } - }, - "children": [ - { - "type": "block", - "id": "2", - "flavour": "affine:image", - "version": 1, - "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 - }, - "children": [] }, - { - "type": "block", - "id": "3", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [] - }, - "collapsed": false - }, - "children": [] - } + "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 29deae0a4..00e5f651a 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 29deae0a4..00e5f651a 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 9c532be4b..1d2babb4d 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 29deae0a4..00e5f651a 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 d1d626a75..3d57260f5 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 d561e1379..e97855481 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 4dc5a4c37..565e2b76b 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 4dc5a4c37..565e2b76b 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 209d91521..68d40b89d 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 } - ] - } - ] - }, - { - "type": "block", - "id": "5", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "abc" - } - ] - }, - "collapsed": false - }, - "children": [ - { - "type": "block", - "id": "6", + ], "flavour": "affine:paragraph", - "version": 1, + "id": "3", "props": { - "type": "text", + "collapsed": false, "text": { "$blocksuite:internal:text$": true, "delta": [ { - "insert": "def" + "insert": "456" } ] }, - "collapsed": false + "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 + }, + { + "children": [ + { "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 209d91521..68d40b89d 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 } - ] - } - ] - }, - { - "type": "block", - "id": "5", - "flavour": "affine:paragraph", - "version": 1, - "props": { - "type": "text", - "text": { - "$blocksuite:internal:text$": true, - "delta": [ - { - "insert": "abc" - } - ] - }, - "collapsed": false - }, - "children": [ - { - "type": "block", - "id": "6", + ], "flavour": "affine:paragraph", - "version": 1, + "id": "3", "props": { - "type": "text", + "collapsed": false, "text": { "$blocksuite:internal:text$": true, "delta": [ { - "insert": "def" + "insert": "456" } ] }, - "collapsed": false + "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 + }, + { + "children": [ + { "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 a496377e6..71ef71a40 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,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,13 +19,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/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 2d280cd0d..63d1673c4 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 a8c8a3865..fe125df0d 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,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,11 +17,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/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 9f601bf1e..f489a4e74 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "bold": true + }, + "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,32 +41,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", - "attributes": { - "bold": true - } - } - ] - }, - "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-text-line-works.json b/tests/blocksuite/snapshots/slash-menu.spec.ts/should-style-text-line-works.json index 9f601bf1e..f489a4e74 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,29 +1,38 @@ { - "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": [ + { + "attributes": { + "bold": true + }, + "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,32 +41,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", - "attributes": { - "bold": true - } - } - ] - }, - "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/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 35cc21baf..68f3f90ea 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,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,11 +17,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/yarn.lock b/yarn.lock index bad0593fc..a10697591 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"