🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.
MPL-2.0 License
Bot releases are hidden (Show)
Published by doodlewind 7 months ago
BlockSuite v0.13.0 is now released with 153 PRs landed and 4 new contributors. It's currently used in AFFiNE 0.13. This is a transitional version centered on bug fixes and the clearing of technical debt.
From 0.13, BlockSuite maintains multiple framework-specific examples demonstrating editor integration for major frameworks (currently including React, Vue, Angular, Preact, Svelte, Solid). There are also examples about using BlockSuite with Next.js and SQLite. You can checkout these examples in the quick start guide.
These examples are maintained in a standalone workspace. There'll be more examples incoming and feel free to make your own!
toggleBold
, toggleItalic
, toggleUnderline
, toggleStrike
, toggleCode
, toggleLink
, getTextStyle
, and isTextStyleActive
. These commands support chainable combination calls, simplifying common rich text style operations.// In root spec:
const defaultSetup = rootSpec.setup;
const mySpec = {
...rootSpec,
setup: (slots, disposableGroup) => {
defaultSetup(slots, disposableGroup);
const onFormatBarConnected = slots.widgetConnected.on(view => {
if (view.component instanceof AffineFormatBarWidget) {
configureFormatBar(view.component);
}
});
disposableGroup.add(onFormatBarConnected);
},
};
function configureFormatBar(formatBar: AffineFormatBarWidget) {
formatBar
.clearConfig()
.addParagraphDropdown()
.addDivider()
.addTextStyleToggle({
key: 'bold',
action: chain => chain.toggleBold().run(),
icon: BoldIcon,
})
.addTextStyleToggle({
key: 'italic',
action: chain => chain.toggleItalic().run(),
icon: ItalicIcon,
})
.addDivider()
.addHighlighterDropdown()
.addDivider()
.addBlockTypeSwitch({
flavour: 'affine:paragraph',
type: 'h1',
name: 'Heading 1',
icon: Heading1Icon,
})
.addBlockTypeSwitch({
flavour: 'affine:paragraph',
type: 'h2',
name: 'Heading 2',
icon: Heading2Icon,
})
}
BlockSuiteError
to facilitate application-level exception categorization.doc
s, aligning API concepts with this terminology change (e.g., page.addBlock
-> doc.addBlock
). This clarifies the document-centric nature of the API.Workspace
to DocCollection
(#6436): Replaced the Workspace
concept, which was more specific to AFFiNE product features, with DocCollection
. This moves towards a more generalized framework structure (e.g., workspace.createDoc
to collection.createDoc
)..withHost
and .getChainCtx
. The API for initiating command chains has been intuitively changed from .pipe
to .chain
, simplifying command execution syntax.// before
std.command
.pipe()
.withHost()
.getSelectedBlocks()
.run();
// after
std.command
.chain()
.getSelectedBlocks()
.run();
__unstableSchemas
and enhanced consistency when importing default block schemas. This unifies the exposed schema, reinforcing a consistent framework for developers.// Before
import { AffineSchemas, __unstableSchemas } from '@blocksuite/blocks/models';
// After
import { AffineSchemas } from '@blocksuite/blocks/schemas';
getService
(#6284): The getService
API is now strongly typed with different service specific to block flavours.Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.12.0...v0.13.0
Published by doodlewind 8 months ago
The BlockSuite v0.12.0 release comes with 220 landed PRs, which is the version used in AFFiNE 0.12, with many major framework improvements and product features in the editor.
Note that from this version, BlockSuite is released using the version installed in AFFiNE Stable.
contenteditable
(#5850)@blocksuite/sync
package that provides an docSources
option for syncing the overall workspace, which replaces previous providers. The BlockSuite playground apps have migrated to the new sync engine (#6204)setup
function in block spec for passing in custom configs (#6122)context
of a command (#6265)Also, the BlockSuite documentation site now adds the new components and blog entries. We'll keep them updated in the following!
embed-card-create-portal
- remove block specific url validation @AyushAgrawal-A2 (#5981)reference-node
sometimes failed to get inline-editor
@Flrande (#6021)this
error in LinkPreviewer @AyushAgrawal-A2 (#6260)textSelectionToRange
result incorrect when selection is reversed @Flrande (#6227)affine:embed-linked-doc
@AyushAgrawal-A2 (#5986)/starter/?init&room=1
not works @Flrande (#6230)Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.11.0...v0.12.0
Published by doodlewind 10 months ago
The BlockSuite v0.11.0 release is now available! With 317 PRs landed and 6 new contributors, this version marks a milestone in our journey: evolving from a proprietary editor to a general-purpose editing framework.
BlockSuite originated as an editor designed to meet the needs of the AFFiNE knowledge base, which is why, for a long time, it provided a default EditorContainer
that included both document editing and whiteboard functionalities. Early updates also focused heavily on specific features for AFFiNE products.
However, during the development of BlockSuite, we've built a range of front-end infrastructures from the ground up, spanning from rich text editing to whiteboard rendering. This version introduces extensive engineering refactoring and modular layering, resulting in the birth of a new, universal editing framework.
Traditionally, developing a stable rich text editor could take years of challenging work. But the evolution of BlockSuite has far outpaced this. We believe our work stems from embracing a new architectural pattern called document-centric, which simplifies the complex architecture of traditional editors by natively building the data layer in the editor with CRDT, thereby providing a more efficient development experience.
Key changes in BlockSuite 0.11.0 for developers include:
@blocksuite/presets
package, which splits the independently usable DocEditor
and EdgelessEditor
, among others.Editor
, Block
, Fragment
, Widget
, and definitive guides on how they combine. The current DocEditor
and EdgelessEditor
are based on this headless framework layer.We've also switched to the new home page blocksuite.io, welcome to give it a spin!
The establishment of the framework layer is just the first step in BlockSuite's longer-term vision. The current stable framework layer modules and APIs are still akin to the more low-level, headless part of tools like ProseMirror. Plans are already in place for more out-of-the-box preset support. Stay tuned!
LayerManager
(#5347): Enabled canvas content interleaving with DOM based on LayerManager
, enhancing the editor's visual representation and flexibility.InlineSpec
feature, enhancing flexibility in text editing, especially for advanced content editing like inline LaTeX.Y.Map
manipulations.ContentParser
and introduced a new export manager based on snapshot and adapter mechanisms, greatly enhancing support for third-party formats and scalability.SessionStorage
, enhancing usability in frequent switching scenarios.SurfaceSelection
in EdgelessEditor
more aligned with DocEditor
.VirgoEditor
to InlineEditor
to more accurately reflect its functionality.stash
and pop
functionalities for reactive proxies, making state management of local non-collaborative fields easier.EditorContainer
into multiple sub-editors, improving manageability and modularization.@blocksuite/editor
to @blocksuite/presets
to more accurately reflect its function and purpose.createEmbedBlock
helper API in @blocksuite/blocks
, simplifying the creation and management of embedded content.- fix: update fonts cdn @Flrande (#5499)
- fix: flaky test @Saul-Mirone (#5555)
- fix: types for this @lawvs (#5557)
- fix: embed portal regex @Saul-Mirone (#5573)
- fix: format-bar custom elements @doouding (#5254)
- fix: update reference id in group and connector in replaceIdMiddleware @regischen (#5616)
- fix: incorrect page tag popup position on zooming @kimhyeonju (#5457)
- fix: update format bar styles @lawvs (#5651)
- fix: snapshot empty @Saul-Mirone (#5692)
- fix: doc site sandbox config @doodlewind (#5701)
- fix: style configuration of the document’s code-sandbox @zqran (#5706)
- fix: toast font @lawvs (#5711)
- fix: transformer won't work for nested props @Saul-Mirone (#5733)
- fix: style for embed github block @Saul-Mirone (#5737)
- fix: eslint ignore patterns @AyushAgrawal-A2 (#5735)
- fix: markdown table view format workaround @nawbc (#5726)
- fix: flaky test @AyushAgrawal-A2 (#5743)
- fix: model should emit change after setting value @Saul-Mirone (#5768)
- fix: element handling with `getPageByElement` in doc & edgeless @AyushAgrawal-A2 (#5771)
- fix: date-fns import @doodlewind (#5777)
- fix: replace `\r` for windows in clipboard @zqran (#5764)
- fix: forward specs to editor @lawvs (#5809)
- fix: update CFW url for querying url data from bookmarks and make it support external overrides @Flrande (#5811)
- fix: drag handle ui bugs @AyushAgrawal-A2 (#5815)
- fix: drag handle throttle @AyushAgrawal-A2 (#5823)
- fix: bookmark og image size @Flrande (#5827)
- fix: replace id issue for page ref @pengx17 (#5883)
- fix: should not reload bookmark when title is not empty @Flrande (#5882)
- fix: complete draghandle fixme @AyushAgrawal-A2 (#5895)
- fix: store exports @Saul-Mirone (#5902)
- fix: export more types from store @Saul-Mirone (#5903)
- fix: should not relay on business logic in block std @Saul-Mirone (#5913)
- fix: drag handle error on using standalone host @doodlewind (#5914)
- fix: doc dragging area in multiple editors @Saul-Mirone (#5915)
- fix: export png error and rich text format confusion @donteatfriedrice (#5945)
- fix(database): table view progress filtering @sseooh (#5454)
- fix(database): edit view modal position is wrong @zzj3720 (#5522)
- fix(database): column repeated setting to text type causes an error @zzj3720 (#5540)
- fix(database): detail panel position auto update @zzj3720 (#5675)
- fix(database): date cell cannot display date picker again @zqran (#5846)
- fix(edgeless): unable to render image in surface-ref @doouding (#5488)
- fix(edgeless): consider containerOffset when auto-panning @donteatfriedrice (#5492)
- fix(edgeless): reset note observer @regischen (#5494)
- fix(edgeless): copy-as-png not work for nested frame @regischen (#5495)
- fix(edgeless): image keep aspect ratio when resize @regischen (#5505)
- fix(edgeless): export surface-service @regischen (#5509)
- fix(edgeless): incorrect bound size filter @regischen (#5516)
- fix(edgeless): image inside frame cannot be copied as png @donteatfriedrice (#5519)
- fix(edgeless): add edgeless blocks in adapters @fourdim (#5532)
- fix(edgeless): remove redundant template @regischen (#5535)
- fix(edgeless): copy as png for frame and image @regischen (#5546)
- fix(edgeless): no connector after refresh page @devlzl (#5553)
- fix(edgeless): define toggle switch error @donteatfriedrice (#5571)
- fix(edgeless): fix undestroyed note render bug @regischen (#5575)
- fix(edgeless): dom not update after frame update @regischen (#5587)
- fix(edgeless): connector in group copy bug @regischen (#5589)
- fix(edgeless): note duplicate issue & expose service api @regischen (#5591)
- fix(edgeless): delete group without children @regischen (#5595)
- fix(edgeless): move grouped content together on dragging @regischen (#5597)
- fix(edgeless): group element snapshot @regischen (#5594)
- fix(edgeless): partially migrate to new clipboard @regischen (#5606)
- fix(edgeless): group multi alignment @regischen (#5620)
- fix(edgeless): surface canvas resize effect @doouding (#5629)
- fix(edgeless): generate new ids for images and frames in advance @regischen (#5631)
- fix(edgeless): default mode after exiting presentation @regischen (#5643)
- fix(edgeless): update `z-index` style @zqran (#5652)
- fix(edgeless): undo/redo after inserting template @doouding (#5655)
- fix(edgeless): panel lacks border radius @Flrande (#5665)
- fix(edgeless): slicer in offseted container @doouding (#5666)
- fix(edgeless): ui styling issues @regischen (#5667)
- fix(edgeless): ui styling issues @regischen (#5679)
- fix(edgeless): indexed canvas does not render when switch to edgeless mode @doouding (#5686)
- fix(edgeless): sort in layer manager init method @doouding (#5696)
- fix(edgeless): fix blur toolbar @Yukiniro (#5698)
- fix(edgeless): limit getNextBlock/getPrevBlock to same note @AyushAgrawal-A2 (#5417)
- fix(edgeless): copy note with style @regischen (#5714)
- fix(edgeless): title editor with max height @regischen (#5717)
- fix(edgeless): fix the inconsistency between the editing and non-editing rendering @Yukiniro (#5721)
- fix(edgeless): undo/redo on image dragging @AyushAgrawal-A2 (#5750)
- fix(edgeless): wrong display in canvas editor when setting text-align to right @Flrande (#5752)
- fix(edgeless): switch to unified clipboard logic @regischen (#5755)
- fix(edgeless): option drag from the mouse point @regischen (#5762)
- fix(edgeless): wrong size display when dragging after changing the font size @donteatfriedrice (#5759)
- fix(edgeless): wrong connector start endpoint style when rotation @donteatfriedrice (#5773)
- fix(edgeless): insert bookmark in note block in edgeless mode will trigger unexpected error @Flrande (#5769)
- fix(edgeless): expand frame click area @regischen (#5780)
- fix(edgeless): share page should be able to hide remote cursor @doouding (#5785)
- fix(edgeless): top level block drag handle position @donteatfriedrice (#5807)
- fix(edgeless): remove preview in frame order menu @regischen (#5825)
- fix(edgeless): frame title @doouding (#5828)
- fix(edgeless): correct overlay position after #5791 @AyushAgrawal-A2 (#5834)
- fix(edgeless): modify blackground default value @regischen (#5856)
- fix(edgeless): canvas text inconsistency between view and editing state @AyushAgrawal-A2 (#5851)
- fix(edgeless): console error on block delete @AyushAgrawal-A2 (#5898)
- fix(edgeless): note background lost when copy as png @donteatfriedrice (#5907)
- fix(edgeless): inserted template should generate new index @doouding (#5921)
- fix(edgeless): change paragraph block placeholder text color @AyushAgrawal-A2 (#5929)
- fix(edgeless): auto-complete panel position @donteatfriedrice (#5936)
- fix(edgeless): add radius property to shape last props schema @regischen (#5951)
- fix(edgeless): clear selection on pressing esc @water-in-stone (#5958)
- fix(inline): do not render when root element is disconnected @Flrande (#5858)
- fix(page): autoscroll during native selection @AyushAgrawal-A2 (#5460)
- fix(page): error when quickly clicking actions in image block @lawvs (#5500)
- fix(page): update todo tests @fourdim (#5534)
- fix(page): format bar flickering @ddeonseo (#5506)
- fix(page): use modified version of remarkGfm @fourdim (#5541)
- fix(page): missing props on note blocks @fourdim (#5542)
- fix(page): deprecate subpage in affine text attributes @fourdim (#5559)
- fix(page): support `shift` in markdown @AliceLanniste (#5588)
- fix(page): selection should be able to go through iframe @lawvs (#5580)
- fix(page): should not consider block inside surface-ref when using drag handle @donteatfriedrice (#5603)
- fix(page): bookmark caption background style @doodlewind (#5611)
- fix(page): paste pure images from clipboard @fourdim (#5656)
- fix(page): image loading/failed status @AyushAgrawal-A2 (#5648)
- fix(page): reset list index for non-list in between @doodlewind (#5689)
- fix(page): init setup for standalone doc editor @doodlewind (#5695)
- fix(page): trim end when using slice snapshot @fourdim (#5704)
- fix(page): html image pasting @fourdim (#5729)
- fix(page): caption input unexpectedly disappears @lawvs (#5767)
- fix(page): incorrectly delete behavior when trying to delete reference node @Flrande (#5774)
- fix(page): code block copy error @Saul-Mirone (#5786)
- fix(page): limit shift of side panel toolbar @lawvs (#5795)
- fix(page): parse html tag as plain text @fourdim (#5796)
- fix(page): mock timezone in tests @fourdim (#5802)
- fix(page): merge empty pages in notion database @fourdim (#5803)
- fix(page): autoscroll with input inlineRange @AyushAgrawal-A2 (#5830)
- fix(page): attachment file drop position @AyushAgrawal-A2 (#5833)
- fix(page): unable to add trailing paragraph on click in windows @zqran (#5842)
- fix(page): doc-dragging-area and overlay positions after page scroll @AyushAgrawal-A2 (#5853)
- fix(page): reorder priority for images @fourdim (#5854)
- fix(page): support image proxy in transformers @fourdim (#5855)
- fix(page): set language to be merged when pasting @fourdim (#5868)
- fix(page): unexpected line wrap in code block @lawvs (#5891)
- fix(page): tag value retention @umar23faiz (#5892)
- fix(page): onCut should delete blocks between fromElement and toElement @donteatfriedrice (#5930)
- fix(page): show whitespace when wrap code @lawvs (#5932)
- fix(page): add clipboard fallbacks @fourdim (#5944)
- fix(page): update heading font weight @AyushAgrawal-A2 (#5946)
- fix(playground): wait editor updateComplete to query edgeless page @donteatfriedrice (#5630)
- fix(playground): editor host undefined @donteatfriedrice (#5926)
- fix(presets): render frame preview incorrectly when switch between pages @donteatfriedrice (#5672)
- fix(presets): should only reset selection in the same edgeless @donteatfriedrice (#5678)
- fix(presets): update disposables when editor change @donteatfriedrice (#5682)
- fix(presets): frame portal preview improvement @donteatfriedrice (#5730)
- fix(presets): consider viewport offset @donteatfriedrice (#5734)
- fix(presets): should have only one highlight mask @donteatfriedrice (#5784)
- fix(presets): update TOC pointer style @donteatfriedrice (#5821)
- fix(presets): remove console.log @zzj3720 (#5844)
- fix(presets): emit in tsconfig @fourdim (#5869)
- fix(presets): llama2 chat image support @zzj3720 (#5923)
- fix(store): `model.created` not emit @Flrande (#5537)
- fix(store): avoid unstable local transaction @Saul-Mirone (#5556)
- fix(store): await on snapshot slice conversion @fourdim (#5818)
Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.10.0...v0.11.0
Published by doodlewind 11 months ago
The v0.10.0 release of BlockSuite includes a total of 246 PRs and welcomes 10 new contributors. Besides the continuous enhancement of the framework and more product features for the prebuilt AFFiNE editors, with an increased number of bug fixes and broader usage in production environments, we believe BlockSuite has been very close to its beta stage. This signifies:
_legacy
directory in the @blocksuite/blocks
package. Documentation about the relevant API surface is being continuously improved. However, understanding the usage for customizing blocks and extending selections may still require code consultation at this point.We plan to enter the beta phase of BlockSuite in the next upcoming release. Exciting updates are on the way!
Below is a brief overview of the framework improvements and editor features in 0.10.0:
page.load
API distinguishes between creating and loading documents, offering more precise control. Details are provided in the BlockSuite Data Persistence Tutorial.deleteBlock
(#5224): Modified deleteBlock
to allow recursive deletion of child nodes by default, with configurable behavior.BlobManager
now actively removes unlinked resources, enhancing efficiency in resource management.affine:surface-ref
block enables embedding whiteboard frames or groups into the document mode.PageMeta.title
with PageBlockModel.title
while importing markdown files @hyf0 (#5297)copyAsPng
not work @zqran (#5062)getPreviousBlock
not works as expected when there are several notes @Flrande (#5131)try
@Flrande (#5278)tryAll
should share same context @Flrande (#5293)deleteBlock
should delete children recursively by default @Flrande (#5224)Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.9.0...v0.10.0
Published by doodlewind about 1 year ago
🔥 The BlockSuite 0.9.0 release incorporates over 300 PRs and welcomes 5 new contributors. Over the past weeks, we have not only continued to ship the functionalities in AFFiNE, but also landed significant enhancements in editor infra.
Many of the APIs mentioned below have yet to be fully clarified. We'll prioritize updating the documentation in the next release.
BlockTransformer
(#4191) establishes a standardized block structure conversion API. This module is beginning to replace the existing ContentParser
specific to markdown and HTML. It offers more reliable transformations for third-party data structures and isomorphically supports both clipboard actions and data import/export (#4757). Based on the block transformer, the new markdown adapter (#4624 #4797) implements markdown compatibility targeting block snapshots using unified
and mdast
.BlockSnapshot
format (#4609 #4614) allows storing a workspace or page as a JSON block tree. This format, built on the block transformer foundation, serves as an equivalent alternative to CRDT binary and supports packaging it with blob content into a zip-formatted block bundle.CommandManager
facilitates the registration and reuse of a set of block operations, with support for chained calls, better modeling complex updates to the block tree (#4471 #4626).RichText
component offers out-of-the-box controls for undo/redo and clipboard actions, positioning it as a replacement for the more low-level virgo-input component (#4956).option + delete
@Flrande (#4804)asyncGetRichTextByModel
may fail @Flrande (#4885)affine-edgeless-layer
@doouding (#4581)ArrowUp
in the edge of two lines @Flrande (#4836)list-block
@zqran (#4913)enableMarkdownShortcut
and enableFormat
in rich-text
@Flrande (#4966)Backspace
in the start of first line @Flrande (#4985)remote-selection
make other users can not select text by mouse click @Flrande (#5019)vRangeUpdatedSlot
in v-range provider @Flrande (#4812)Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.8.0...v0.9.0
Published by doodlewind about 1 year ago
🎉 Announcing BlockSuite 0.8.0! This version is bundled in AFFiNE 0.8.0, incorporating over 500 new merged pull requests and an 12 new contributors. In the past weeks, we have refactored the selection data flow of the editor, together with multiple new editing functionalities. Highlights:
In 0.8.0, we rewrote the selection manager following the block spec RFC (#3165). All selections could be created, managed and shared by the same data flow now.
The new selection follows the unidirectional data flow. Which means all selections on page will be stored as a piece of selection data called selection model.
An example of selection model:
TextSelection {
type: 'text',
group: 'note',
from: {
path: ['some-block-parent-id', 'some-block-id'],
index: 5,
length: 20,
},
to: {
path: ['some-other-block-parent-id', 'some-other-block-id'],
index: 0,
length: 30
}
}
BlockSelection {
type: 'block',
group: 'note',
path: ['some-block-id'],
}
SurfaceSelection {
type: 'surface',
group: 'edgeless',
path: ['some-block-id'],
elements: ['shape-circle'],
}
In BlockSuite, this piece of data is stored in the Yjs awareness store to make sure it can be shared between clients to support remote selection. This also makes the support of the undo
and redo
features work as expected.
The new block-level migration API is introduced, usage:
import { Schema, Workspace } from '@blocksuite/store';
const schema = new Schema();
schema.register(AffineBlocks);
// Migration can run without workspace
schema.upgradePage(oldBlockVersions, oldYDoc);
// create workspace with schema
const workspace = new Workspace({ schema });
See #3826 for the guide writing migrations.
Also, the model proxy now supports defining plain JSON types using NativeWrapper
, instead of mapping nested array and objects into their Y-alternatives. See #4020 for the detailed usage.
In @blocksuite/blocks
, the new createLitPortal
and createSimplePortal
API can be used to create portals in editor (#3830 #4291). The new computePosition
option is supported, so as to place the tooltips and popups in proper position.
In @blocksuite/virgo
, there are also new APIs:
createVirgoKeyDownHandler
, facilitating the development of logic for the keydown event (#4279).isEmbed
options that allows treating a text node as a unified entity, which can be selected or removed entirety (#3659).affine:attachment
block flavour (#2952).localhost:5173
while the previous entry with different starter templates are located in localhost:5173/starter/
.AffineFormatBarWidget
@himself65 (#3880)getSelectedBlockElementsByRange
@Flrande (#4053)rangeManager.value
should be null when no range @Flrande (#4078)New Record
UI @zqran (#4067)IME
input overlaps with database title placeholder @zzj3720 (#4107)getSelectedBlocks
not work in one block @Flrande (#3761)pointToRange
@Flrande (#3927)Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.7.0...v0.8.0
Published by doodlewind over 1 year ago
🎉 Announcing BlockSuite 0.7.0! This version is bundled in AFFiNE Client 0.7-beta, incorporating 318 new merged pull requests and an addition of 7 contributors. In the past few weeks, we have significantly enhanced data persistence and whiteboard usability. Feature highlights:
page.waitForLoaded()
API and comes with novel provider adaptation support (#3182 #3186 #3193 #3073 #3190 #3200 #3201 #3222 #3213).So far, the primary focus of the BlockSuite project has been on feature-richness. However, with the next major release, we plan to make the editing feature more adaptable with a new API surface. Stay tuned!
Detailed commits (sorted by commit type):
block-std
@himself65 (#3179)Node
@himself65 (#3199)lit-analyzer
@Flrande (#3168)link
column type @zqran (#3187)Move Right
@zqran (#3255)Move Left
of the first normal column @zqran (#3354)blur
from cell of title column @zzj3720 (#3528)@popperjs/core
with @floating-ui/dom
@zqran (#3021)@import
to playground @Flrande (#3026)
@zzj3720 (#3279)frame
-> note
@Flrande (#3144)embed
-> image
@Saul-Mirone (#3147)Bound.deserialize
@regischen (#3131)mode
-> tool
@doodlewind (#3181)surface-text-editor
-> edgeless-text-editor
@Flrande (#3389)SurfaceElement
export @Flrande (#3150)isVRangeEqual
should not accept null values @Flrande (#3560)Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.6.0...v0.7.0
Published by doodlewind over 1 year ago
🍬 We are excited to announce the release of BlockSuite 0.6.0! This version is shipped in AFFiNE Client 0.6.0, including 351 new pull requests merged and 18 more new contributors. In this version, we mainly focused on improving the usability of doc editing and whiteboard editing. Here are the updates:
@blocksuite/lit
package for common UI components @Saul-Mirone (#2509 #2595)checkbox
, progress
support (#2376 #2383 #2533 #2709)Enter
/ Backspace
/ Esc
and other keyboard operation support (#2455 #2458 #2701 #2736 #2768 #2975 #2962)option
to duplicate element @regischen (#2843)shift
+ click to multi-select @regischen (#2860)PointerEvent
with basic mobile compatibility @alt1o (#2269)moveBlocks
@zqran (#2366)calcDropTarget
method out of drag-handle @fundon (#2392)@toeverything/theme
package @Himself65 (#2412)matchFlavours
@Saul-Mirone (#1786)transact
@Flrande (#2885)AbstractEditor
for better typing @lawvs (#2448)pageModeSwitched
slot @lawvs (#2452)exportHtml
and exportMarkdown
@doodlewind (#2493)transformPropertyValue
to computedValue
@Flrande (#2708)importPageSnapshot
@doodlewind @Flrande @zzj3720 (#2359 #2972)PageMeta
@Himself65 (#2382)as const
used for matchFlavours
@blurname (#2695)SHORT_KEY
reference @boomyao (#2286)If you have any questions, feel free to discuss them in the GitHub discussion.
Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]
Published by doodlewind over 1 year ago
🍬 We're thrilled to announce the release of BlockSuite 0.5.0! This version is shipped in the first AFFiNE Client, including 660 pull requests merged from our vibrant community of developers, with 14 more new contributors. Here are some highlights of what you can expect from this release:
DatabaseBlock
is available to use as a table. The data structure has been redesigned and moved to the block level.SearchIndexer
and BacklinkIndexer
.@blocksuite/connector
package that provides pathfinding support for computing shape connectors.DisposableGroup.addFromEvent
(#1527).VEditor.requestUpdate
and v-text update (#1523).setMarks
(#1711).setText
(#2107).text
prop in schema (#1281)SelectedBlock
to BlockRange
(#1334)depth
and parentIndex
from BaseBlockModel
(#1372)BlockSuiteModelProps
to BlockModelProps
(#1408)state
and property
(#1428)handlePageEvent
timer (#1431)Signal
-> Slot
(#1481)DefaultSelectionManager
modules (#1494)SelectionRect
-> DraggingArea
(#1500)setSelectedBlocks
and slot effects (#1502)resetSelectedBlockByRect
(#1503)selection.viewport
(#1506)page.readonly
(#1511)selection.state.draggingArea
(#1512)codeBlockOption
to code block (#1519)Slot.disposableListener
-> Slot.fromEvent
(#1526)addBlock
api (#1613)getRichTextByModel
with getVirgoByModel
(#1626)getPopperPosition
function (#1816)getRichTextBoundingBox
test action (#1819)handleLineStartBackspace
(#1910)@blocksuite/react
package (#2179)@toeverything/y-indexeddb
(#2207)builtInSchemas
-> AffineSchemas
(#1763)setTimeout
with ResizeObserver
(#1680)tag
-> column
(#1739)mode
in crdt model (#1918)internalProperty
and property
(#1919)DatabaseManager
and page.db
entity (#1922)columns
-> cells
(#1925)columnSchema
-> column
(#1934)columnSchema
-> column
(#1960)getElementsBound
(#1445)surface.viewport
(#1477)document.elementsFromPoint
(#1530)createPage
(#1760)addBlockByFlavour
-> addBlock
(#1764)moveBlocksToParent
(#1787)deleteBlockById
and updateBlockById
(#1923)rootElement
(#1454)merge
deep clone (#1359)scrollIntoViewIfNeeded
(#1582)onPress
rather than deprecated onClick
for nextui components (#2101)affine-link
shouldn't leak style (#2150)compareDocumentPosition
usage (#2202)selection
wrong when type many times in one frame (#2238)pre-wrap
-> break-spaces
(#1984)registerColumnHeader
follows database block life cycle (#2157)deleteWordBackward
input type (#1538)deleteContentForward
input type (#1641)Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]
Published by himself65 over 1 year ago
page.root
broken (https://github.com/toeverything/blocksuite/pull/1276)Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]...@blocksuite/[email protected]
Published by doodlewind over 1 year ago
💠 We are excited to announce the release of BlockSuite 0.4.0! This new version is shipped in AFFiNE Alpha "Downhills". With 484 pull requests merged and 15 new contributors involved, BlockSuite has evolved significantly over this period.
/
key.affine:surface
block flavour (#517 #664 #716 #721 #739 #740 #774 #775 #797 #809) is added by @doodlewind @Himself65. This is a singleton block type that contains whiteboard elements and is always displayed at the top-level inside the page.affine:database
block flavour (#770 #831 #909 #913 #920 #959 #960 #961) is added by @Himself65 (experimental). This is the foundation of view transforming.BlockService
(#856 #857) by @Himself65. This provides composable ways defining block methods.addBlockByFlavour
API is supported (#628) by @Himself65. This allows for adding blocks in a type-safe way.BlockTag
entity is supported (#734) by @Himself65. This enables attaching group-able tags onto blocks.virgo
package is added (#912 #932 #943 #944 #948 #974 #1243) by @Flrande. This is a tiny rich-text editing component we designed to replace Quill in the future.phasor
package is added (#546 #552 #806 #890 #891) by @doodlewind. This is a canvas-based renderer designed for optimized whiteboard content rendering.global
package is added (#618) by @Himself65. This allows for better cross-package typing and reusability of common utils.SimpleAffineEditor
pre-configured editor component (#811).affine:group
block flavour is renamed to affine:frame
(#520).SelectionController
is replaced by MouseModeController
(#745).AwarenessAdapter
is replaced by AwarenessStore
(#780).Signal.fromEvent
is replaced by Signal.disposableListener
(#1114).IndexedDBBlobProvider
is replaced by DuplexBlobProvider
(#866).affine:shape
block flavour is removed (#804).DisposableGroup
(#760).PrelimText
type is removed (#1146).page
field in Text
is removed (#1146).animationend
event (#541)captureSync
on creating code block & filter hotkey listener (#597)DOMRect
(#643)isForward
detection in SelectionManager
(#640)sliceToDelta
(#635)@blocksuite/blocks
cause ts error in other monorepos (#654)SurfaceBlockModel
(#672)Partial
in defaultFlags (#691)assertEquals
(#725)requestAnimationFrame
(#751)sliceToDelta
(#798)isPageTitleElement
(#828)env.d.ts
(#832)?init=empty
(#836)isEqual
(#842)DefaultSelectionManager
(#852)Disposable
in Signal.once()
(#986)selectedRects
based on viewport scroll (#988)mergeCodeBlocks
text operation (#1237)@blocksuite/react
(#1262)Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]...@blocksuite/[email protected]
Published by doodlewind almost 2 years ago
Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]...@blocksuite/[email protected]
Published by doodlewind almost 2 years ago
💠 We are excited to announce the release of BlockSuite 0.3.0! This new version is shipped in AFFiNE Alpha "Abbey Wood", and it comes with lots of new features:
Workspace
, Page
, and Space
entities support by @doodlewindBlobStorage
binary persistence support by @darkskygit @doodlewind @AustarasWorkspaceMeta
support by @doodlewindBlockService
support by @Himself65 @doodlewindaffine:embed
block type, created by @DiamondThreeaffine:code
block type, created by @thorseraqaffine:divider
block type, created by @JimmFlyaffine:shape
block type, created by @Himself65FormatQuickBar
component, created by @lawvs@blocksuite/react
hooks package and Next integration example by @Himself65@blocksuite/store
by @Himself65 @doodlewindThank @Himself65 @Austaras @linonetwo @LuciNyan @Flrande @donaldxdonald @septs for their contributions!