toeverything/blocksuite
Fork: 255 Star: 3043 (更新于 1970-01-01 00:00:00)
license: MPL-2.0
Language: TypeScript .
🎨 BlockSuite is an open-source project for block-based collaborative editing.
最后发布版本: v0.9.0 ( 2023-10-18 20:24:04)
BlockSuite
Overview
BlockSuite is an open-source project for block-based collaborative editing. This repository contains two essential parts:
- A framework for building block-based structure editors, providing foundational support for editor essentials such as block schema, selection, rich text, real-time collaboration, and UI component definition.
- Multiple first-party editors capable of handling documents, whiteboards, and data grids. These editors are highly interoperable, and are already used by the AFFiNE project.
By using BlockSuite, you can:
- Reuse and extend block-based editors, like document editor and whiteboard editor.
- Define custom blocks that could be shared across these editors.
- Synchronize editor states over different providers (
IndexedDB
,WebSocket
,BroadcastChannel
, etc.) while automatically resolving merge conflicts. - Support document snapshot, clipboard, and interoperability with third-party formats through a universal data transforming model.
- Fully construct your own block-based editor from scratch.
The major packages in BlockSuite include the following:
-
@blocksuite/store
: CRDT-driven block state management, enabling editors to have built-in conflict resolution and time travel capabilities. -
@blocksuite/block-std
: The standard toolkit for working with editable blocks, including selections, events, services, commands and more. -
@blocksuite/lit
: The default view layer for rendering blocks and widgets as web components. It's built on top of lit and the headlessblock-std
, and could be replaced by alternative frameworks. -
@blocksuite/virgo
: Atomic rich text component used in BlockSuite. Every editable block could hold its own virgo instances, leveraging the store to reconcile the block tree. -
@blocksuite/blocks
: Editable first-party blocks under theaffine
scope. The default AFFiNE editors are simply different implementations of theaffine:page
blocks. -
@blocksuite/editor
: The ready-to-use editors composed by blocks. -
@blocksuite/playground
: Default editor playground with local-first data persistence and real-time collaboration support.
Why BlockSuite?
- 🧬 CRDT-Native Collaboration: At the heart of BlockSuite is its native use of CRDTs (Conflict-free Replicated Data Types) as the single source of truth for data flow. This design sets it apart from traditional editors that often graft on real-time collaboration. By integrating CRDTs at its core, BlockSuite inherently supports advanced features like time travel (undo/redo) and automatic conflict resolution. This means smoother, more reliable collaborative editing without the need for additional layers or complex integrations.
- 🧩 Rich Text Orchestration Across Blocks: BlockSuite diverges from the conventional monolithic rich text edit model. It enables each block to support its own atomic rich text component. This allows for granular control and flexibility in editing, which is especially powerful in complex documents where different sections require varied formatting and features.
- 🎨 Reusable Blocks Across Editors: BlockSuite provides great interoperability of custom blocks across different editor types (document, whiteboard, etc.). This allows for a more consistent and efficient use of blocks, simplifying the development process by enabling the same block to function seamlessly in various editing environments.
- 🔌 Plug-and-Play Data Synchronization: BlockSuite simplifies data synchronization with its provider-based approach. Connecting an editor instance to a provider automatically enables data synchronization. It supports incremental data sync, meaning only the changes are transmitted, enhancing efficiency and performance. It eliminates the need for explicit requests or complex synchronization logic, streamlining DX and ensuring data consistency across collaborative environments.
🚧 BlockSuite is currently in beta, with some extension capabilities still under refinement. Hope you can stay tuned, try it out, or share your feedback!
Getting Started
To learn how to start using BlockSuite, visit blocksuite.affine.pro.
Resources
- 🎁 Examples
- 📝 Documentation
- 📍 Good First Issues
- 🎙️ GitHub Discussions
- 💬 Discord Channel
- 🚀 Releases
Building
See BUILDING.md for instructions on how to build BlockSuite from source code.
Contributing
BlockSuite accepts pull requests on GitHub. Before you start contributing, please make sure you have read and accepted our Contributor License Agreement. To indicate your agreement, simply edit this file and submit a pull request.
License
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2023-10-18 20:24:04 v0.9.0
2023-08-29 22:46:56 v0.8.0
2023-07-17 23:56:53 v0.7.0
2023-06-06 21:53:00 v0.6.0
2023-04-26 01:01:12 0.5.0
2023-02-19 09:40:10 @blocksuite/editor@0.4.1
2023-02-18 23:50:15 @blocksuite/editor@0.4.0
2023-01-01 19:54:56 @blocksuite/editor@0.3.1
2022-12-30 22:37:00 @blocksuite/editor@0.3.0
2022-10-19 07:52:26 @blocksuite/store@0.2.10
主题(topics):
block, collaboration, components, components-library, crdt, editor, local-first, notion-editor, rich-text-editor, state-management, webcomponents, wysiwyg, yjs
toeverything/blocksuite同语言 TypeScript最近更新仓库
2024-11-05 17:55:23 langgenius/dify
2024-11-05 16:59:32 laurent22/joplin
2024-11-05 11:52:31 RSSNext/Follow
2024-11-05 07:18:03 microsoft/genaiscript
2024-11-05 05:06:06 getmaxun/maxun
2024-11-04 14:44:09 x-extends/vxe-table