diff --git a/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.md b/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.md index a263260663..b10017f90e 100644 --- a/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.md +++ b/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.md @@ -642,3 +642,634 @@ Generated by [AVA](https://avajs.dev). summary: 'AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. You own your data, with no compromisesLocal-first & Real-time collaborativeWe love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.Blocks that assemble your next docs, tasks kanban or whiteboardThere is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ', title: 'Write, Draw, Plan all at Once.', } + +## can read all blocks from doc snapshot without workspace snapshot + +> Snapshot 1 + + { + blocks: [ + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blockId: 'TnUgtVg7Eu', + content: 'Write, Draw, Plan all at Once.', + docId: 'doc-0', + flavour: 'affine:page', + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'FoPQcAyV_m', + content: 'AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. ', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'oz48nn_zp8', + content: '', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'g8a-D9-jXS', + content: 'You own your data, with no compromises', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'J8lHN1GR_5', + content: 'Local-first & Real-time collaborative', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'xCuWdM0VLz', + content: 'We love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'zElMi0tViK', + content: 'AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'RX4CG2zsBk', + }, + blockId: 'Z4rK0OF9Wk', + content: '', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'RX4CG2zsBk', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'S1mkc8zUoU', + }, + blockId: 'DQ0Ryb-SpW', + content: 'Blocks that assemble your next docs, tasks kanban or whiteboard', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'S1mkc8zUoU', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'yGlBdshAqN', + }, + blockId: 'HAZC3URZp_', + content: 'There is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'yGlBdshAqN', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'yGlBdshAqN', + }, + blockId: '0H87ypiuv8', + content: 'We are building AFFiNE to be a fundamental open source platform that contains all the building blocks for docs, task management and visual collaboration, hoping you can shape your next workflow with us that can make your life better and also connect others, too.', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'yGlBdshAqN', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'yGlBdshAqN', + }, + blockId: 'Sp4G1KD0Wn', + content: 'If you want to learn more about the product design of AFFiNE, here goes the concepts:', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'yGlBdshAqN', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'yGlBdshAqN', + }, + blockId: 'RsUhDuEqXa', + content: 'To Shape, not to adapt. AFFiNE is built for individuals & teams who care about their data, who refuse vendor lock-in, and who want to have control over their essential tools.', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'yGlBdshAqN', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'Z2HibKzAr-', + content: 'A true canvas for blocks in any form', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'UwvWddamzM', + content: 'Many editor apps claimed to be a canvas for productivity. Since the Mother of All Demos, Douglas Engelbart, a creative and programable digital workspace has been a pursuit and an ultimate mission for generations of tool makers. ', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'g9xKUjhJj1', + content: '', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'wDTn4YJ4pm', + content: '"We shape our tools and thereafter our tools shape us”. A lot of pioneers have inspired us a long the way, e.g.:', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'xFrrdiP3-V', + content: 'Quip & Notion with their great concept of "everything is a block"', + docId: 'doc-0', + flavour: 'affine:list', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'Tp9xyN4Okl', + content: 'Trello with their Kanban', + docId: 'doc-0', + flavour: 'affine:list', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'K_4hUzKZFQ', + content: 'Airtable & Miro with their no-code programable datasheets', + docId: 'doc-0', + flavour: 'affine:list', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'QwMzON2s7x', + content: 'Miro & Whimiscal with their edgeless visual whiteboard', + docId: 'doc-0', + flavour: 'affine:list', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: '6lDiuDqZGL', + }, + blockId: 'FFVmit6u1T', + content: 'Remnote & Capacities with their object-based tag system', + docId: 'doc-0', + flavour: 'affine:list', + parentBlockId: '6lDiuDqZGL', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'cauvaHOQmh', + }, + blockId: 'YqnG5O6AE6', + content: 'For more details, please refer to our RoadMap', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'cauvaHOQmh', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'cauvaHOQmh', + }, + blockId: 'sbDTmZMZcq', + content: 'Self Host', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'cauvaHOQmh', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'cauvaHOQmh', + }, + blockId: 'QVvitesfbj', + content: 'Self host AFFiNE', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'cauvaHOQmh', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'U_GoHFD9At', + content: [ + 'Learning From', + 'Title', + 'Tag', + 'Reference', + 'Developers', + 'AFFiNE', + ], + docId: 'doc-0', + flavour: 'affine:database', + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'tpyOZbPc1P', + content: 'Affine Development', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'VMx9lHw3TR', + content: 'For developers or installations guides, please go to AFFiNE Doc', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'Q6LnVyKoGS', + content: 'Quip & Notion with their great concept of "everything is a block"', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'EkFHpB-mJi', + content: 'Trello with their Kanban', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: '3aMlphe2lp', + content: 'Airtable & Miro with their no-code programable datasheets', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'MiZtUig-fL', + content: 'Miro & Whimiscal with their edgeless visual whiteboard', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: 'Learning From', + displayMode: 'page', + noteBlockId: '2jwCeO8Yot', + }, + blockId: 'erYE2C7cc5', + content: 'Remnote & Capacities with their object-based tag system', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'U_GoHFD9At', + parentFlavour: 'affine:database', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'c9MF_JiRgx', + }, + blockId: 'NyHXrMX3R1', + content: 'Affine Development', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'c9MF_JiRgx', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'c9MF_JiRgx', + }, + blockId: '9-K49otbCv', + content: 'For developer or installation guides, please go to AFFiNE Development', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'c9MF_JiRgx', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + databaseName: undefined, + displayMode: 'page', + noteBlockId: 'c9MF_JiRgx', + }, + blockId: 'faFteK9eG-', + content: '', + docId: 'doc-0', + flavour: 'affine:paragraph', + parentBlockId: 'c9MF_JiRgx', + parentFlavour: 'affine:note', + ref: [], + refDocId: [], + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blockId: '6x7ALjUDjj', + content: [ + 'What is AFFiNE', + 'Related Articles', + ' ', + 'Self-host', + '', + 'AFFiNE ', + 'Development', + 'You can check these URLs to learn about AFFiNE', + 'Database Reference', + ], + docId: 'doc-0', + flavour: 'affine:surface', + parentBlockId: 'TnUgtVg7Eu', + parentFlavour: 'affine:page', + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blockId: 'ECrtbvW6xx', + docId: 'doc-0', + flavour: 'affine:bookmark', + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blockId: '5W--UQLN11', + docId: 'doc-0', + flavour: 'affine:bookmark', + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blob: [ + 'BFZk3c2ERp-sliRvA7MQ_p3NdkdCLt2Ze0DQ9i21dpA=', + ], + blockId: 'lcZphIJe63', + docId: 'doc-0', + flavour: 'affine:image', + parentBlockId: '6x7ALjUDjj', + parentFlavour: 'affine:surface', + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blob: [ + 'HWvCItS78DzPGbwcuaGcfkpVDUvL98IvH5SIK8-AcL8=', + ], + blockId: 'JlgVJdWU12', + docId: 'doc-0', + flavour: 'affine:image', + parentBlockId: '6x7ALjUDjj', + parentFlavour: 'affine:surface', + }, + { + additional: { + displayMode: 'edgeless', + noteBlockId: undefined, + }, + blob: [ + 'ZRKpsBoC88qEMmeiXKXqywfA1rLvWoLa5rpEh9x9Oj0=', + ], + blockId: 'lht7AqBqnF', + docId: 'doc-0', + flavour: 'affine:image', + parentBlockId: '6x7ALjUDjj', + parentFlavour: 'affine:surface', + }, + ], + summary: 'AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. You own your data, with no compromisesLocal-first & Real-time collaborativeWe love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.Blocks that assemble your next docs, tasks kanban or whiteboardThere is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ', + title: 'Write, Draw, Plan all at Once.', + } diff --git a/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.snap b/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.snap index 06ec55a74f..676184bedb 100644 Binary files a/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.snap and b/packages/backend/server/src/core/utils/__tests__/__snapshots__/blocksute.spec.ts.snap differ diff --git a/packages/backend/server/src/core/utils/__tests__/blocksute.spec.ts b/packages/backend/server/src/core/utils/__tests__/blocksute.spec.ts index f760d51acc..d5c56449c7 100644 --- a/packages/backend/server/src/core/utils/__tests__/blocksute.spec.ts +++ b/packages/backend/server/src/core/utils/__tests__/blocksute.spec.ts @@ -45,7 +45,23 @@ test('can read all blocks from doc snapshot', async t => { const result = await readAllBlocksFromDocSnapshot( workspace.id, - rootDoc!.blob, + 'doc-0', + docSnapshot.blob, + rootDoc!.blob + ); + + t.snapshot({ + ...result, + blocks: result!.blocks.map(block => omit(block, ['yblock'])), + }); +}); + +test('can read all blocks from doc snapshot without workspace snapshot', async t => { + const doc = await models.doc.get(workspace.id, docSnapshot.id); + t.truthy(doc); + + const result = await readAllBlocksFromDocSnapshot( + workspace.id, 'doc-0', docSnapshot.blob ); diff --git a/packages/backend/server/src/core/utils/blocksuite.ts b/packages/backend/server/src/core/utils/blocksuite.ts index 22ee899023..82c627d12d 100644 --- a/packages/backend/server/src/core/utils/blocksuite.ts +++ b/packages/backend/server/src/core/utils/blocksuite.ts @@ -173,15 +173,18 @@ export function readAllDocIdsFromWorkspaceSnapshot(snapshot: Uint8Array) { export async function readAllBlocksFromDocSnapshot( workspaceId: string, - workspaceSnapshot: Uint8Array, docId: string, docSnapshot: Uint8Array, + workspaceSnapshot?: Uint8Array, maxSummaryLength?: number ) { - const rootYDoc = new YDoc({ - guid: workspaceId, - }); - applyUpdate(rootYDoc, workspaceSnapshot); + let rootYDoc: YDoc | undefined; + if (workspaceSnapshot) { + rootYDoc = new YDoc({ + guid: workspaceId, + }); + applyUpdate(rootYDoc, workspaceSnapshot); + } const ydoc = new YDoc({ guid: docId, }); diff --git a/packages/backend/server/src/plugins/indexer/service.ts b/packages/backend/server/src/plugins/indexer/service.ts index c231fbffa0..64d5e6e3ce 100644 --- a/packages/backend/server/src/plugins/indexer/service.ts +++ b/packages/backend/server/src/plugins/indexer/service.ts @@ -226,11 +226,14 @@ export class IndexerService { this.logger.debug(`doc ${workspaceId}/${docId} is empty, skip indexing`); return; } + const MAX_WORKSPACE_SNAPSHOT_SIZE = 1024 * 1024 * 10; // 10MB const result = await readAllBlocksFromDocSnapshot( workspaceId, - workspaceSnapshot.blob, docId, - docSnapshot.blob + docSnapshot.blob, + workspaceSnapshot.blob.length < MAX_WORKSPACE_SNAPSHOT_SIZE + ? workspaceSnapshot.blob + : undefined ); if (!result) { this.logger.warn( diff --git a/packages/common/reader/__tests__/__snapshots__/reader.spec.ts.snap b/packages/common/reader/__tests__/__snapshots__/reader.spec.ts.snap index fcea084a15..89c5d6d8b8 100644 --- a/packages/common/reader/__tests__/__snapshots__/reader.spec.ts.snap +++ b/packages/common/reader/__tests__/__snapshots__/reader.spec.ts.snap @@ -1756,3 +1756,1691 @@ exports[`should read doc blocks work 1`] = ` "title": "Write, Draw, Plan all at Once.", } `; + +exports[`should read doc blocks work without root doc 1`] = ` +{ + "blocks": [ + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blockId": "TnUgtVg7Eu", + "content": "Write, Draw, Plan all at Once.", + "docId": "test-doc", + "flavour": "affine:page", + "yblock": { + "prop:title": "Write, Draw, Plan all at Once.", + "sys:children": [ + "RX4CG2zsBk", + "S1mkc8zUoU", + "yGlBdshAqN", + "6lDiuDqZGL", + "cauvaHOQmh", + "2jwCeO8Yot", + "c9MF_JiRgx", + "6x7ALjUDjj", + ], + "sys:flavour": "affine:page", + "sys:id": "TnUgtVg7Eu", + "sys:version": 2, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "FoPQcAyV_m", + "content": "AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. ", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. ", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "FoPQcAyV_m", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "oz48nn_zp8", + "content": "", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "oz48nn_zp8", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "g8a-D9-jXS", + "content": "You own your data, with no compromises", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "You own your data, with no compromises", + "prop:type": "h1", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "g8a-D9-jXS", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "J8lHN1GR_5", + "content": "Local-first & Real-time collaborative", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Local-first & Real-time collaborative", + "prop:type": "h2", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "J8lHN1GR_5", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "xCuWdM0VLz", + "content": "We love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "We love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "xCuWdM0VLz", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "zElMi0tViK", + "content": "AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "zElMi0tViK", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "RX4CG2zsBk", + }, + "blockId": "Z4rK0OF9Wk", + "content": "", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "RX4CG2zsBk", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "Z4rK0OF9Wk", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "S1mkc8zUoU", + }, + "blockId": "DQ0Ryb-SpW", + "content": "Blocks that assemble your next docs, tasks kanban or whiteboard", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "S1mkc8zUoU", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Blocks that assemble your next docs, tasks kanban or whiteboard", + "prop:type": "h3", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "DQ0Ryb-SpW", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "yGlBdshAqN", + }, + "blockId": "HAZC3URZp_", + "content": "There is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "yGlBdshAqN", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "There is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "HAZC3URZp_", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "yGlBdshAqN", + }, + "blockId": "0H87ypiuv8", + "content": "We are building AFFiNE to be a fundamental open source platform that contains all the building blocks for docs, task management and visual collaboration, hoping you can shape your next workflow with us that can make your life better and also connect others, too.", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "yGlBdshAqN", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "We are building AFFiNE to be a fundamental open source platform that contains all the building blocks for docs, task management and visual collaboration, hoping you can shape your next workflow with us that can make your life better and also connect others, too.", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "0H87ypiuv8", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "yGlBdshAqN", + }, + "blockId": "Sp4G1KD0Wn", + "content": "If you want to learn more about the product design of AFFiNE, here goes the concepts:", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "yGlBdshAqN", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "If you want to learn more about the product design of AFFiNE, here goes the concepts:", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "Sp4G1KD0Wn", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "yGlBdshAqN", + }, + "blockId": "RsUhDuEqXa", + "content": "To Shape, not to adapt. AFFiNE is built for individuals & teams who care about their data, who refuse vendor lock-in, and who want to have control over their essential tools.", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "yGlBdshAqN", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "To Shape, not to adapt. AFFiNE is built for individuals & teams who care about their data, who refuse vendor lock-in, and who want to have control over their essential tools.", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "RsUhDuEqXa", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "Z2HibKzAr-", + "content": "A true canvas for blocks in any form", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "A true canvas for blocks in any form", + "prop:type": "h2", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "Z2HibKzAr-", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "UwvWddamzM", + "content": "Many editor apps claimed to be a canvas for productivity. Since the Mother of All Demos, Douglas Engelbart, a creative and programable digital workspace has been a pursuit and an ultimate mission for generations of tool makers. ", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Many editor apps claimed to be a canvas for productivity. Since the Mother of All Demos, Douglas Engelbart, a creative and programable digital workspace has been a pursuit and an ultimate mission for generations of tool makers. ", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "UwvWddamzM", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "g9xKUjhJj1", + "content": "", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "g9xKUjhJj1", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "wDTn4YJ4pm", + "content": ""We shape our tools and thereafter our tools shape us”. A lot of pioneers have inspired us a long the way, e.g.:", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": ""We shape our tools and thereafter our tools shape us”. A lot of pioneers have inspired us a long the way, e.g.:", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "wDTn4YJ4pm", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "xFrrdiP3-V", + "content": "Quip & Notion with their great concept of "everything is a block"", + "docId": "test-doc", + "flavour": "affine:list", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:checked": false, + "prop:collapsed": false, + "prop:order": null, + "prop:text": "Quip & Notion with their great concept of "everything is a block"", + "prop:type": "bulleted", + "sys:children": [], + "sys:flavour": "affine:list", + "sys:id": "xFrrdiP3-V", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "Tp9xyN4Okl", + "content": "Trello with their Kanban", + "docId": "test-doc", + "flavour": "affine:list", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:checked": false, + "prop:collapsed": false, + "prop:order": null, + "prop:text": "Trello with their Kanban", + "prop:type": "bulleted", + "sys:children": [], + "sys:flavour": "affine:list", + "sys:id": "Tp9xyN4Okl", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "K_4hUzKZFQ", + "content": "Airtable & Miro with their no-code programable datasheets", + "docId": "test-doc", + "flavour": "affine:list", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:checked": false, + "prop:collapsed": false, + "prop:order": null, + "prop:text": "Airtable & Miro with their no-code programable datasheets", + "prop:type": "bulleted", + "sys:children": [], + "sys:flavour": "affine:list", + "sys:id": "K_4hUzKZFQ", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "QwMzON2s7x", + "content": "Miro & Whimiscal with their edgeless visual whiteboard", + "docId": "test-doc", + "flavour": "affine:list", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:checked": false, + "prop:collapsed": false, + "prop:order": null, + "prop:text": "Miro & Whimiscal with their edgeless visual whiteboard", + "prop:type": "bulleted", + "sys:children": [], + "sys:flavour": "affine:list", + "sys:id": "QwMzON2s7x", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "6lDiuDqZGL", + }, + "blockId": "FFVmit6u1T", + "content": "Remnote & Capacities with their object-based tag system", + "docId": "test-doc", + "flavour": "affine:list", + "parentBlockId": "6lDiuDqZGL", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:checked": false, + "prop:collapsed": false, + "prop:order": null, + "prop:text": "Remnote & Capacities with their object-based tag system", + "prop:type": "bulleted", + "sys:children": [], + "sys:flavour": "affine:list", + "sys:id": "FFVmit6u1T", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "cauvaHOQmh", + }, + "blockId": "YqnG5O6AE6", + "content": "For more details, please refer to our RoadMap", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "cauvaHOQmh", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "For more details, please refer to our RoadMap", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "YqnG5O6AE6", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "cauvaHOQmh", + }, + "blockId": "sbDTmZMZcq", + "content": "Self Host", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "cauvaHOQmh", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Self Host", + "prop:type": "h2", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "sbDTmZMZcq", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "cauvaHOQmh", + }, + "blockId": "QVvitesfbj", + "content": "Self host AFFiNE", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "cauvaHOQmh", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Self host AFFiNE", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "QVvitesfbj", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "U_GoHFD9At", + "content": [ + "Learning From", + "Title", + "Tag", + "Reference", + "Developers", + "AFFiNE", + ], + "docId": "test-doc", + "flavour": "affine:database", + "yblock": { + "prop:cells": { + "3aMlphe2lp": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "HgHsKOUINZ", + ], + }, + }, + "EkFHpB-mJi": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "HgHsKOUINZ", + ], + }, + }, + "MiZtUig-fL": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "HgHsKOUINZ", + ], + }, + }, + "Q6LnVyKoGS": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "HgHsKOUINZ", + ], + }, + }, + "VMx9lHw3TR": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "0jh9gNw4Yl", + ], + }, + }, + "tpyOZbPc1P": { + "sC99IAB2x_QM0zaPEj2ow": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "value": [ + "AxSe-53xjX", + ], + }, + }, + }, + "prop:columns": [ + { + "data": {}, + "id": "clNriIlPoh", + "type": "title", + }, + { + "data": {}, + "id": "tEvV9x-oBP3m4MwVyFH1Z", + "name": "Title", + "type": "title", + }, + { + "data": { + "options": [ + { + "color": "var(--affine-tag-blue)", + "id": "HgHsKOUINZ", + "value": "Reference", + }, + { + "color": "var(--affine-tag-orange)", + "id": "0jh9gNw4Yl", + "value": "Developers", + }, + { + "color": "var(--affine-tag-pink)", + "id": "AxSe-53xjX", + "value": "AFFiNE", + }, + ], + }, + "id": "sC99IAB2x_QM0zaPEj2ow", + "name": "Tag", + "type": "multi-select", + }, + ], + "prop:title": "Learning From", + "prop:views": [ + { + "columns": [ + { + "id": "clNriIlPoh", + }, + ], + "filter": { + "conditions": [], + "op": "and", + "type": "group", + }, + "header": { + "iconColumn": "type", + "titleColumn": "tEvV9x-oBP3m4MwVyFH1Z", + }, + "id": "Gt8Hbz0vBy33WSl58VH2Y", + "mode": "table", + "name": "Table View", + }, + { + "columns": [ + { + "hide": false, + "id": "tEvV9x-oBP3m4MwVyFH1Z", + }, + { + "hide": false, + "id": "sC99IAB2x_QM0zaPEj2ow", + }, + ], + "filter": { + "conditions": [], + "op": "and", + "type": "group", + }, + "groupBy": { + "columnId": "sC99IAB2x_QM0zaPEj2ow", + "name": "multi-select", + "type": "groupBy", + }, + "groupProperties": [], + "header": { + "iconColumn": "type", + "titleColumn": "tEvV9x-oBP3m4MwVyFH1Z", + }, + "id": "43eIk3skKQWFlamyg8IIn", + "mode": "kanban", + "name": "Kanban View", + }, + ], + "sys:children": [ + "tpyOZbPc1P", + "VMx9lHw3TR", + "Q6LnVyKoGS", + "EkFHpB-mJi", + "3aMlphe2lp", + "MiZtUig-fL", + "erYE2C7cc5", + ], + "sys:flavour": "affine:database", + "sys:id": "U_GoHFD9At", + "sys:version": 3, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "tpyOZbPc1P", + "content": "Affine Development", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Affine Development", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "tpyOZbPc1P", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "VMx9lHw3TR", + "content": "For developers or installations guides, please go to AFFiNE Doc", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "For developers or installations guides, please go to AFFiNE Doc", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "VMx9lHw3TR", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "Q6LnVyKoGS", + "content": "Quip & Notion with their great concept of "everything is a block"", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Quip & Notion with their great concept of "everything is a block"", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "Q6LnVyKoGS", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "EkFHpB-mJi", + "content": "Trello with their Kanban", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Trello with their Kanban", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "EkFHpB-mJi", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "3aMlphe2lp", + "content": "Airtable & Miro with their no-code programable datasheets", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Airtable & Miro with their no-code programable datasheets", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "3aMlphe2lp", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "MiZtUig-fL", + "content": "Miro & Whimiscal with their edgeless visual whiteboard", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Miro & Whimiscal with their edgeless visual whiteboard", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "MiZtUig-fL", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": "Learning From", + "displayMode": "page", + "noteBlockId": "2jwCeO8Yot", + }, + "blockId": "erYE2C7cc5", + "content": "Remnote & Capacities with their object-based tag system", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "U_GoHFD9At", + "parentFlavour": "affine:database", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Remnote & Capacities with their object-based tag system", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "erYE2C7cc5", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "c9MF_JiRgx", + }, + "blockId": "NyHXrMX3R1", + "content": "Affine Development", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "c9MF_JiRgx", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "Affine Development", + "prop:type": "h2", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "NyHXrMX3R1", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "c9MF_JiRgx", + }, + "blockId": "9-K49otbCv", + "content": "For developer or installation guides, please go to AFFiNE Development", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "c9MF_JiRgx", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "For developer or installation guides, please go to AFFiNE Development", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "9-K49otbCv", + "sys:version": 1, + }, + }, + { + "additional": { + "databaseName": undefined, + "displayMode": "page", + "noteBlockId": "c9MF_JiRgx", + }, + "blockId": "faFteK9eG-", + "content": "", + "docId": "test-doc", + "flavour": "affine:paragraph", + "parentBlockId": "c9MF_JiRgx", + "parentFlavour": "affine:note", + "ref": [], + "refDocId": [], + "yblock": { + "prop:collapsed": false, + "prop:text": "", + "prop:type": "text", + "sys:children": [], + "sys:flavour": "affine:paragraph", + "sys:id": "faFteK9eG-", + "sys:version": 1, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blockId": "6x7ALjUDjj", + "content": [ + "What is AFFiNE", + "Related Articles", + " ", + "Self-host", + "", + "AFFiNE ", + "Development", + "You can check these URLs to learn about AFFiNE", + "Database Reference", + ], + "docId": "test-doc", + "flavour": "affine:surface", + "parentBlockId": "TnUgtVg7Eu", + "parentFlavour": "affine:page", + "yblock": { + "prop:elements": { + "type": "$blocksuite:internal:native$", + "value": { + "EkqQL1MU5m": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 120, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": true, + "id": "EkqQL1MU5m", + "index": "aXd", + "rotate": 0, + "seed": 1588752895, + "text": "Self-host", + "textAlign": "left", + "type": "text", + "xywh": "[988.4153663986212,-181.71961053807448,563,168.75]", + }, + "F-GXtb8ubm": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:Lora", + "fontSize": 72, + "fontStyle": "normal", + "fontWeight": "600", + "hasMaxWidth": true, + "id": "F-GXtb8ubm", + "index": "ag", + "rotate": 0, + "seed": 1394803222, + "text": "Database Reference", + "textAlign": "left", + "type": "text", + "xywh": "[-183.35234372014293,-333.83661977719123,744.8157214875225,92]", + }, + "GVPdqrq6T6": { + "children": { + "JlgVJdWU12": true, + "R2MK4ZzUb3": true, + }, + "id": "GVPdqrq6T6", + "index": "a0", + "seed": 771020267, + "title": "Group 6", + "type": "group", + "xywh": "[126.65897893082821,-2338.7483936405356,2375.5289713541665,722.5748697916665]", + }, + "Gwb4ZjdyMJ": { + "children": { + "6lDiuDqZGL": true, + "RX4CG2zsBk": true, + "istDk5DOMO": true, + "saGXC7nPOk": true, + "yGlBdshAqN": true, + }, + "id": "Gwb4ZjdyMJ", + "index": "aN", + "seed": 242073567, + "title": "Group 3", + "type": "group", + }, + "LHh9XjyG9P": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "LHh9XjyG9P", + "index": "ae", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 962796410, + "source": { + "id": "istDk5DOMO", + "position": [ + -6.164088349722365e-17, + 0.5, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "ECrtbvW6xx", + "position": [ + 1, + 0.5000000000000001, + ], + }, + "type": "connector", + }, + "Nb_9OXyIT3": { + "fillColor": "--affine-palette-shape-yellow", + "filled": true, + "id": "Nb_9OXyIT3", + "index": "a0", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 97408177, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-line-yellow", + "strokeStyle": "solid", + "strokeWidth": 4, + "type": "shape", + "xywh": "[2403.9004515323168,57.24116579067933,955.1393577008388,542.1082071559455]", + }, + "R2MK4ZzUb3": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-white", + "filled": true, + "id": "R2MK4ZzUb3", + "index": "a0", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 1558899337, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "shape", + "xywh": "[126.65897893082821,-2338.7483936405356,2375.5289713541665,722.5748697916666]", + }, + "TRRWjtvWJm": { + "children": { + "5W--UQLN11": true, + "lcZphIJe63": true, + }, + "id": "TRRWjtvWJm", + "index": "a4", + "seed": 1624205143, + "title": "Group 1", + "type": "group", + "xywh": "[-1043.6169874048903,-641.7901035486665,622.6248931928226,667.0980998494529]", + }, + "UloPoCxt6P": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 128, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": false, + "id": "UloPoCxt6P", + "index": "aTl", + "rotate": 0, + "seed": 606071663, + "text": " ", + "textAlign": "left", + "type": "text", + "xywh": "[2522.7441912768363,-1310.8328787672467,35,128]", + }, + "XWYKw-kpYn": { + "children": { + "EkqQL1MU5m": true, + "cauvaHOQmh": true, + "qRCk-vrGXw": true, + }, + "id": "XWYKw-kpYn", + "index": "aZ", + "seed": 1740232717, + "title": "Group 4", + "type": "group", + }, + "YWOfr8Pprg": { + "children": { + "2jwCeO8Yot": true, + "F-GXtb8ubm": true, + }, + "id": "YWOfr8Pprg", + "index": "aj", + "seed": 484840749, + "title": "Group 5", + "type": "group", + }, + "Z7D3qrSurD": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 120, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": false, + "id": "Z7D3qrSurD", + "index": "aTV", + "rotate": 0, + "seed": 2100869690, + "text": "Related Articles", + "textAlign": "left", + "type": "text", + "xywh": "[2478.972284676839,-1231.0379248118952,879.4798583984375,168.75]", + }, + "_nC65-wkSP": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 128, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": true, + "id": "_nC65-wkSP", + "index": "aa", + "rotate": 0, + "seed": 994394416, + "text": "AFFiNE ", + "textAlign": "left", + "type": "text", + "xywh": "[2459.953125798208,88.108859492537,779,147]", + }, + "f3x6HbuyUQ": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "f3x6HbuyUQ", + "index": "aY", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 668321843, + "source": { + "id": "uzfdAcEDxu", + "position": [ + 0.4999999999993948, + 1.0000000000000002, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "qRCk-vrGXw", + "position": [ + 1.0000000000000002, + 0.5, + ], + }, + "type": "connector", + }, + "gPvT0nfbcw": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 128, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": true, + "id": "gPvT0nfbcw", + "index": "ab", + "rotate": 0, + "seed": 183687274, + "text": "Development", + "textAlign": "left", + "type": "text", + "xywh": "[2459.953125798208,208.4260321250699,779,147]", + }, + "hLAqby4WpD": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-white", + "filled": true, + "id": "hLAqby4WpD", + "index": "Zz", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 2025695507, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "shape", + "xywh": "[-259.87318248973133,-371.99627945163166,948.0569720935435,876.3267415022492]", + }, + "istDk5DOMO": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-blue", + "filled": true, + "id": "istDk5DOMO", + "index": "aI", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 858601929, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 4, + "type": "shape", + "xywh": "[353.84627540373367,-1532.740227539313,1844.3414706529402,1139.4642574172829]", + }, + "laVEftUZ5b": { + "children": { + "47g7sBvNVTS0tJaSnY3n2": true, + "Nb_9OXyIT3": true, + "_nC65-wkSP": true, + "gPvT0nfbcw": true, + }, + "id": "laVEftUZ5b", + "index": "ac", + "seed": 1549109555, + "title": "Group 5", + "type": "group", + }, + "mK-9EA5g4c": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "mK-9EA5g4c", + "index": "ai", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 1095574431, + "source": { + "id": "qRCk-vrGXw", + "position": [ + 0, + 0.5, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "2jwCeO8Yot", + }, + "type": "connector", + }, + "qRCk-vrGXw": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-magenta", + "filled": true, + "fontFamily": "blocksuite:surface:Inter", + "id": "qRCk-vrGXw", + "index": "aXG", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 2015167989, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 4, + "text": "", + "type": "shape", + "xywh": "[928.4478756397534,-248.78447101666404,943.70584160216,514.081347775151]", + }, + "sNDFCBEYzR": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "sNDFCBEYzR", + "index": "af", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 524593855, + "source": { + "id": "istDk5DOMO", + "position": [ + -6.164088349722365e-17, + 0.5, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "5W--UQLN11", + }, + "type": "connector", + }, + "saGXC7nPOk": { + "color": "--affine-palette-line-black", + "fontFamily": "blocksuite:surface:OrelegaOne", + "fontSize": 128, + "fontStyle": "normal", + "fontWeight": "400", + "hasMaxWidth": false, + "id": "saGXC7nPOk", + "index": "aJ", + "rotate": 0, + "seed": 93054478, + "text": "What is AFFiNE", + "textAlign": "left", + "type": "text", + "xywh": "[438.73809335123497,-1467.165331669401,913.75,128]", + }, + "t3Rt_B2IAr": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "t3Rt_B2IAr", + "index": "ad", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 306364128, + "source": { + "id": "qRCk-vrGXw", + "position": [ + 1, + 0.5, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "Nb_9OXyIT3", + }, + "type": "connector", + }, + "tCpJR12_hu": { + "controllers": [], + "frontEndpointStyle": "None", + "id": "tCpJR12_hu", + "index": "aW", + "mode": 2, + "rearEndpointStyle": "Arrow", + "rough": false, + "roughness": 1.4, + "seed": 1310217918, + "source": { + "id": "istDk5DOMO", + "position": [ + 0.9999999999999999, + 0.5, + ], + }, + "stroke": "--affine-palette-line-grey", + "strokeStyle": "solid", + "strokeWidth": 8, + "target": { + "id": "uzfdAcEDxu", + }, + "type": "connector", + }, + "uzfdAcEDxu": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-purple", + "filled": true, + "id": "uzfdAcEDxu", + "index": "aTG", + "radius": 0, + "rotate": 0.062196392871315495, + "roughness": 1.4, + "seed": 462401908, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 4, + "type": "shape", + "xywh": "[2421.751354148884,-1283.6175127158676,1085.7995880501803,519.0294552479265]", + }, + "w86OKmzMtn": { + "color": "--affine-palette-line-black", + "fillColor": "--affine-palette-shape-tangerine", + "filled": true, + "fontFamily": "blocksuite:surface:Poppins", + "fontSize": 36, + "fontStyle": "normal", + "fontWeight": "600", + "id": "w86OKmzMtn", + "index": "ad", + "radius": 0, + "rotate": 0, + "roughness": 1.4, + "seed": 1298533711, + "shapeStyle": "General", + "shapeType": "rect", + "strokeColor": "--affine-palette-transparent", + "strokeStyle": "solid", + "strokeWidth": 4, + "text": "You can check these URLs to learn about AFFiNE", + "textAlign": "left", + "type": "shape", + "xywh": "[-1055.7017064945487,-981.0008617000956,702.1470991695091,295.7649942194072]", + }, + }, + }, + "sys:children": [ + "ECrtbvW6xx", + "5W--UQLN11", + "lcZphIJe63", + "JlgVJdWU12", + "lht7AqBqnF", + ], + "sys:flavour": "affine:surface", + "sys:id": "6x7ALjUDjj", + "sys:version": 5, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blockId": "ECrtbvW6xx", + "docId": "test-doc", + "flavour": "affine:bookmark", + "yblock": { + "prop:caption": null, + "prop:description": "The universal editor that lets you work, play, present or create just about anything.", + "prop:icon": "/favicon-96.png", + "prop:image": "https://affine.pro/og.png", + "prop:index": "a1", + "prop:lockedBySelf": false, + "prop:rotate": 0, + "prop:style": "vertical", + "prop:title": "AFFiNE - All In One KnowledgeOS", + "prop:url": "https://affine.pro/", + "prop:xywh": "[-605.1053721621553,-1497.696057920688,606.4771127476911,649.7969065153833]", + "sys:children": [], + "sys:flavour": "affine:bookmark", + "sys:id": "ECrtbvW6xx", + "sys:version": 1, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blockId": "5W--UQLN11", + "docId": "test-doc", + "flavour": "affine:bookmark", + "yblock": { + "prop:caption": null, + "prop:description": "AFFiNE is the all-in-one workspace where you can write, draw and plan just about anything - Blend the power of Notion and Miro to enable dynamic note-taking, wikis, tasks, visualized mindmaps and presentations. All you need for productivity and creativity is here! +", + "prop:icon": "https://www.youtube.com/s/desktop/8b6c1f4c/img/favicon_32x32.png", + "prop:image": "https://yt3.googleusercontent.com/H9-Rol_TUq4UmR8cdy-LhxFmWdmz5LIm_KTYoVP2D81I-w9T12ttJHfME6kWUnEresNVo4c8dA=s900-c-k-c0x00ffffff-no-rj", + "prop:index": "a2", + "prop:lockedBySelf": false, + "prop:rotate": 0, + "prop:style": "vertical", + "prop:title": "AFFiNE", + "prop:url": "https://www.youtube.com/@affinepro", + "prop:xywh": "[-1043.6169874048903,-641.7901035486665,622.6248931928226,667.0980998494529]", + "sys:children": [], + "sys:flavour": "affine:bookmark", + "sys:id": "5W--UQLN11", + "sys:version": 1, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blob": [ + "BFZk3c2ERp-sliRvA7MQ_p3NdkdCLt2Ze0DQ9i21dpA=", + ], + "blockId": "lcZphIJe63", + "docId": "test-doc", + "flavour": "affine:image", + "parentBlockId": "6x7ALjUDjj", + "parentFlavour": "affine:surface", + "yblock": { + "prop:caption": "", + "prop:height": 728, + "prop:index": "a3", + "prop:lockedBySelf": false, + "prop:rotate": 0, + "prop:size": 115416, + "prop:sourceId": "BFZk3c2ERp-sliRvA7MQ_p3NdkdCLt2Ze0DQ9i21dpA=", + "prop:width": 1302, + "prop:xywh": "[-991.0766514037751,-616.4591370809392,505.45950210093383,282.62251730374794]", + "sys:children": [], + "sys:flavour": "affine:image", + "sys:id": "lcZphIJe63", + "sys:version": 1, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blob": [ + "HWvCItS78DzPGbwcuaGcfkpVDUvL98IvH5SIK8-AcL8=", + ], + "blockId": "JlgVJdWU12", + "docId": "test-doc", + "flavour": "affine:image", + "parentBlockId": "6x7ALjUDjj", + "parentFlavour": "affine:surface", + "yblock": { + "prop:caption": "", + "prop:height": 374, + "prop:index": "aj", + "prop:lockedBySelf": false, + "prop:rotate": 0, + "prop:size": 50651, + "prop:sourceId": "HWvCItS78DzPGbwcuaGcfkpVDUvL98IvH5SIK8-AcL8=", + "prop:width": 1463, + "prop:xywh": "[281.13294520744034,-2242.095913253297,2001.7110026018645,511.7155946501006]", + "sys:children": [], + "sys:flavour": "affine:image", + "sys:id": "JlgVJdWU12", + "sys:version": 1, + }, + }, + { + "additional": { + "displayMode": "edgeless", + "noteBlockId": undefined, + }, + "blob": [ + "ZRKpsBoC88qEMmeiXKXqywfA1rLvWoLa5rpEh9x9Oj0=", + ], + "blockId": "lht7AqBqnF", + "docId": "test-doc", + "flavour": "affine:image", + "parentBlockId": "6x7ALjUDjj", + "parentFlavour": "affine:surface", + "yblock": { + "prop:caption": "", + "prop:height": 1388, + "prop:index": "acV", + "prop:lockedBySelf": false, + "prop:rotate": 10.938230891828395, + "prop:size": 71614, + "prop:sourceId": "ZRKpsBoC88qEMmeiXKXqywfA1rLvWoLa5rpEh9x9Oj0=", + "prop:width": 862, + "prop:xywh": "[3446.6044934637607,-1339.9783466050073,122.45568062094182,197.1792165914935]", + "sys:children": [], + "sys:flavour": "affine:image", + "sys:id": "lht7AqBqnF", + "sys:version": 1, + }, + }, + ], + "summary": "AFFiNE is an open source all in one workspace, an operating system for all the building blocks of your team wiki, knowledge management and digital assets and a better alternative to Notion and Miro. You own your data, with no compromisesLocal-first & Real-time collaborativeWe love the idea proposed by Ink & Switch in the famous article about you owning your data, despite the cloud. Furthermore, AFFiNE is the first all-in-one workspace that keeps your data ownership with no compromises on real-time collaboration and editing experience.AFFiNE is a local-first application upon CRDTs with real-time collaboration support. Your data is always stored locally while multiple nodes remain synced in real-time.Blocks that assemble your next docs, tasks kanban or whiteboardThere is a large overlap of their atomic "building blocks" between these apps. They are neither open source nor have a plugin system like VS Code for contributors to customize. We want to have something that contains all the features we love and goes one step further. ", + "title": "Write, Draw, Plan all at Once.", +} +`; diff --git a/packages/common/reader/__tests__/reader.spec.ts b/packages/common/reader/__tests__/reader.spec.ts index bdfa56d7f5..7a91ce122a 100644 --- a/packages/common/reader/__tests__/reader.spec.ts +++ b/packages/common/reader/__tests__/reader.spec.ts @@ -35,6 +35,18 @@ test('should read doc blocks work', async () => { expect(result).toMatchSnapshot(); }); +test('should read doc blocks work without root doc', async () => { + const doc = new YDoc({ + guid: 'test-doc', + }); + applyUpdate(doc, docSnapshot); + const result = await readAllBlocksFromDoc({ + ydoc: doc, + spaceId: 'test-space', + }); + expect(result).toMatchSnapshot(); +}); + test('should get all docs from root doc work', async () => { const rootDoc = new YDoc({ guid: 'test-root-doc', diff --git a/packages/common/reader/src/reader.ts b/packages/common/reader/src/reader.ts index 888125289e..dd2973f754 100644 --- a/packages/common/reader/src/reader.ts +++ b/packages/common/reader/src/reader.ts @@ -59,9 +59,9 @@ const bookmarkFlavours = new Set([ ]); function generateMarkdownPreviewBuilder( - yRootDoc: YDoc, workspaceId: string, - blocks: BlockDocumentInfo[] + blocks: BlockDocumentInfo[], + yRootDoc?: YDoc ) { function yblockToDraftModal(yblock: YBlock): DraftModel | null { const flavour = yblock.get('sys:flavour') as string; @@ -91,7 +91,7 @@ function generateMarkdownPreviewBuilder( } const titleMiddleware: TransformerMiddleware = ({ adapterConfigs }) => { - const pages = yRootDoc.getMap('meta').get('pages'); + const pages = yRootDoc?.getMap('meta').get('pages'); if (!(pages instanceof YArray)) { return; } @@ -442,7 +442,7 @@ export async function readAllBlocksFromDoc({ maxSummaryLength, }: { ydoc: YDoc; - rootYDoc: YDoc; + rootYDoc?: YDoc; spaceId: string; maxSummaryLength?: number; }): Promise< @@ -459,9 +459,9 @@ export async function readAllBlocksFromDoc({ const blockDocuments: BlockDocumentInfo[] = []; const generateMarkdownPreview = generateMarkdownPreviewBuilder( - rootYDoc, spaceId, - blockDocuments + blockDocuments, + rootYDoc ); const blocks = ydoc.getMap('blocks');