Releases: toeverything/blocksuite
v0.8.0
🎉 Announcing BlockSuite 0.8.0! This version is bundled in AFFiNE 0.8.0, incorporating over 500 new merged pull requests and 12 new contributors. In the past weeks, we have refactored the selection data flow of the editor, together with multiple new editing functionalities. Highlights:
Selection Manager Refactoring
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.
- The blocks can subscribe to the changes of the selection models and render them as what they want.
- Every time users select something else on the page, the selection model will be updated first.
- Then, the blocks know the models are updated and they will try to rerender the selections.
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.
Block Schema
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.
Block UI Components
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:
- Introduced
createVirgoKeyDownHandler
, facilitating the development of logic for the keydown event (#4279). - Added hooks support, allowing for the injection of default behavior into Virgo (#4386).
- Introduced
isEmbed
options that allows treating a text node as a unified entity, which can be selected or removed entirety (#3659).
Doc Editing Functionalities
- Supported the new
affine:attachment
block flavour (#2952). - Updated the new drag handle (#3695 #3162 #4314).
- Supported text highlight (#3961).
- Supported image files in exported HTML and markdown (#3791).
Edgeless Editing Functionalities
- Supported the new frame element (#3701).
- Supported full screen presentation mode (#4101).
- Supported ToC panel for notes (#3138).
- Supported flowchart auto-complete creation (#3596).
- Supported moving element using arrow keys (#4143).
- Adapted to the new selection manager (#3693).
- Reduced re-rendering (#4276 #3911 #3823).
- Updated connector and shape toolbar UI (#3714).
Database Editing Functionalities
- Added the new kanban view (#2401).
- Added the new header UI (#3868).
- Supported clipboard operations under custom database selection (#2309).
Playground and Package Infra
- New local-first playground with multi-player collaboration support (#3589 #3776). This entry is
localhost:5173
while the previous entry with different starter templates are located inlocalhost:5173/starter/
. - The circular dependencies in the project has been fully cleared (4214).
Detailed Bugfixes
- fix: missing img inside figure element @fourdim (#3591)
- fix: unable to paste within the codeblock @fourdim (#3624)
- fix: typo @lzlme (#3633)
- fix: cursor position based on triggered location @lzlme (#3638)
- fix: copy as PNG format error on windows @zuoxiaodong0815 (#3667)
- fix: cannot read properties of undefined (reading schema) @zhe-he (#3668)
- fix: remove focus after paste @fourdim (#3762)
- fix: meta should not write to crdt when initializing @Saul-Mirone (#3774)
- fix: surface block version should be 4 @Flrande (#3792)
- fix: add polyfill for Intl.Segmenter @fourdim (#3795)
- fix: import ext @himself65 (#3807)
- fix: playground not working on firefox @pengx17 (#3824)
- fix: range controller regression @Saul-Mirone (#3833)
- fix: edgeless selection won't be cleaned up when switching mode @Saul-Mirone (#3859)
- fix: headings should not match the space hotkey @fourdim (#3875)
- fix: clean custom trigger key in widgets @lawvs (#3878)
- fix: use the set on
AffineFormatBarWidget
@himself65 (#3880) - fix: range sometimes blink when dragging @Saul-Mirone (#3895)
- fix: scrollbar style pollution global @lawvs (#3894)
- fix: use old arrow navigation @Saul-Mirone (#3900)
- fix: container offset cause wrong range @Saul-Mirone (#3901)
- fix: block hub style @Garfield550 (#3919)
- fix: click to select block element @lawvs (#3933)
- fix: align arrow icon in page info @RajeevDash007 (#3905)
- fix: added base UI font family to the Menu of edgeless @RajeevDash007 (#3910)
- fix: typo @Flrande (#3944)
- fix: remain editing state when drag and drop in edgeless mode @donteatfriedrice (#3947)
- fix: remove box-shadow when exporting png @zuoxiaodong0815 (#3951)
- fix: unique guid for crossing workspace @himself65 (#3960)
- fix: clear mock selection when link not confirm @wiirhan (#3956)
- fix: updated font family of toolbar and more button @RajeevDash007 (#3954)
- fix: remove box-shadow when exporting png @zuoxiaodong0815 (#3983)
- fix: cut event for page title @Saul-Mirone (#3985)
- fix: fix bugs and enable tests related to format-bar @Flrande (#3990)
- fix: updated the UI of the buttons of Import Dialog Box @RajeevDash007 (#3995)
- fix: image caption selection issue @Saul-Mirone (#4000)
- fix: backlink icon color @lawvs (#4002)
- fix: no scrollbar for tags when creating many tags @zzj3720 (#4039)
- fix: attachment z index @lawvs (#4049)
- fix: fix
getSelectedBlockElementsByRange
@Flrande (#4053) - fix: select all in cell @Saul-Mirone (#4071)
- fix: selection on db click when container has offset @pengx17 (#4083)
- fix:
rangeManager.value
should be null when no range @Flrande (#4078) - fix: clipboard test cases @zuoxiaodong0815 (#4098)
- fix: can not fully show bookmark menu in tiny screen @QiShaoXuan (#4096)
- fix: docs build @doodlewind (#4110)
- fix: added border radius to page tag selector @RajeevDash007 (#4111)
- fix: shift click range after input @Saul-Mirone (#4122)
- fix: ime in edgeless @Saul-Mirone (#4127)
- fix: unable to copy and paste under multi lines of text selection @zuoxiaodong0815 (#4123)
- fix: format-bar position not follow edgeless viewport @Flrande (#4149)
- fix: aligned arrow icon to the center of the font size container @RajeevDash007 (#4095)
- fix: typography when multiple line in list @lawvs (#4152)
- fix: turn into code block cause error @Saul-Mirone (#4189)
- fix: missing table view after importing database @zuoxiaodong0815 (#4130)
- fix: optimize hasChanged for block element @lawvs (#4187)
- fix: support importing highlighted text from Notion @zuoxiaodong0815 (#4197)
- fix: should open the right page after importing notion @zuoxiaodong0815 (#4203)
- fix: the page should be created when which is needed @zuoxiaodong0815 (#4207)
- fix: node import @Saul-Mirone (#4218)
- fix: typography styles @lawvs (#4231)
- fix: arrow breaks IME input @Saul-Mirone (#4234)
- fix: the missing page reference in the first row @fourdim (#4237)
- fix: can not run blocksuite's toast function when not open a page in affine @zuoxiaodong0815 (#4236)
- fix: title column error when importing notion database @zuoxiaodong0815 (#4246)
- fix: can not import when just only csv file @zuoxiaodong0815 (#4256)
- fix: copy title @fourdim (#4262)
- fix: cannot read properties of undefined (reading 'insert') in yjs @fourdim (#4267)
- fix: correct misspelled words @dengquan (#4274)
- fix: tsconfig 'module' must be set to 'NodeNext' when 'moduleResolution' is set to 'NodeNext @fourdim (#4265)
- fix: search might not work @himself65 (#4295)
- fix: transform database title into doublelink when importing notion markdown @zuoxiaodong0815 (#4283)
- fix: editor doesn't use block presets from property @Vija02 (#4288)
- fix: should not sync range to text-selection when it is out of note @Flrande (#4317)
- fix: pen line width display error @LittleSound (#4319)
- fix: nested list items are lost on pasting @zuoxiaodong0815 (#4316)
- fix: legacy import snapshot for edgeless @Saul-Mirone (#4334)
- fix: the image type is wrong inexported file @zuoxiaodong0815 (#4342)
- fix: use delta instead of text when importing db @fourdim (#4357)
- fix: select all for rich text @Saul-Mirone (#4360)
- fix: remove hardcode element tag name in lit @Saul-Mirone (#4380)
- fix: unchecked todo icon color @lzlme (#4405)
- fix: incorrect type of meta-data for page @zzj3720 (#4415)
- fix(block-std): avoid parent blocks to be called multiple times in dispatcher @s...
v0.7.0
🎉 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:
- 📑 We now support subdocument in data model, facilitating async loading of multiple pages (#2948 #3157 #3221 #3082 #3176). This introduces the
page.waitForLoaded()
API and comes with novel provider adaptation support (#3182 #3186 #3193 #3073 #3190 #3200 #3201 #3222 #3213). - 🧩 We've added block spec support (#3175), which serves as the fundamental layer for forthcoming standardized third-party block definitions. This includes a new block-std package (#3164 #3179 #3261 #3297) and a work-in-progress widget API implementation (#3128 #3449 #3307).
- 🎨 We've enhanced whiteboard functionalities, including element rotation support (#2931 #3394), new connector (#3184 #3557 #3099 #3285 #3313 #3390 #3403 #3441 #3517), eraser tool (#3126), in-shape text functionality (#3423 #3386 #3521 #3554 #3573 #3552), a block slicer (#3314 #3343), and a redesigned toolbar (#3230 #3335 #3382 #3465 #3309 #3464 #3380 #3388 #3410 #3262 #3258).
- 🏷️ We've launched new page-level tag support (#3203), which can operate as a cross-page data source, complete with filtering capabilities (#3065).
- 📤 We've incorporated support for exporting to PDF and PNG (#3047 #3072 #3205 #3502 #3534 #3450 #3494).
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
- build: release package
block-std
@himself65 (#3179) - build: fix module exports @himself65 (#3196)
- build: fix output types @himself65 (#3197)
- build(store): compatibility with moduleResolution
Node
@himself65 (#3199) - chore: modify the size of the importIcon and add a hover effect to it @HydenLiu (#3039)
- chore: fix typo @HydenLiu (#3040)
- chore: upgrade pnpm in ci @Saul-Mirone (#3053)
- chore: update database tooltip content @doodlewind (#3067)
- chore: bump version @himself65 (#3120)
- chore: bump lock file version @fourdim (#3154)
- chore: disable note index by default @Flrande (#3334)
- chore: bump playwright @lawvs (#3409)
- chore: bump version @himself65 (#3452)
- chore: adjust delete item color @JimmFly (#3482)
- chore: spread url methods to common utils @QiShaoXuan (#3520)
- chore(edgeless): optimize tooltip text @doodlewind (#3364)
- ci: ignore coverage upload failed @lawvs (#3142)
- ci: add
lit-analyzer
@Flrande (#3168) - docs: update block desc @doodlewind (#3299)
- docs: update CLA @Yukiniro (#3311)
- docs: update CLA @AliceLanniste (#3438)
- docs: update CLA @youhua (#3547)
- docs: sign CLA @joshirakesh (#3564)
- docs: add release note automation script @doodlewind (#3574)
- feat: refactor to support multi-view and filter for database block @zzj3720 (#3010)
- feat: add block on clicking page bottom when necessary @QiShaoXuan (#3028)
- feat: add support for subdocuments @Saul-Mirone (#2948)
- feat: edgeless mode upload multiple images @donteatfriedrice (#3025)
- feat: export page to pdf file @zuoxiaodong0815 (#3047)
- feat: support pressing esc to select blocks @donteatfriedrice (#3035)
- feat: handling left key press for cursor transition from paragraph to page title @tillkwl (#2973)
- feat: support filter for the database block @zzj3720 (#3065)
- feat: export page to image @zuoxiaodong0815 (#3058)
- feat: support for indenting and unindenting multi-level blocks @donteatfriedrice (#3127)
- feat: the mouse pointer can become a gesture when dragging @zzj3720 (#3174)
- feat: optimizing line width icons in edgeless mode @donteatfriedrice (#3195)
- feat: support for adding tags to pages @zzj3720 (#3203)
- feat: use human-readable name in code block @lawvs (#3225)
- feat: support import notion database @fourdim (#3170)
- feat: show format-bar when click drag handler @lawvs (#2694)
- feat: delete empty subpages from import @fourdim (#3266)
- feat: rename bookmark property title to bookmarkTitle @QiShaoXuan (#3278)
- feat: improve page metadata UI @zzj3720 (#3275)
- feat: update edgeless toolbar ui and zoom bar position @donteatfriedrice (#3281)
- feat: hide toolbar when drag element move(#3271) @Yukiniro (#3310)
- feat: supports copying images and cross app pasting @fundon (#3318)
- feat: supports customizing the slash menu @lawvs (#3407)
- feat: modify style of bookmark and editor @QiShaoXuan (#3486)
- feat: add new css variable to control editor side padding @QiShaoXuan (#3491)
- feat(block-std): init package and move event dispatcher to std @Saul-Mirone (#3164)
- feat(block-std): add block spec @Saul-Mirone (#3175)
- feat(block-std): scaffolding new selection manager @Saul-Mirone (#3261)
- feat(blocks): support delete hotkey @Alkaidcc (#2552)
- feat(blocks): add page block service @Saul-Mirone (#3232)
- feat(database): support select option to modify color @zqran (#3015)
- feat(database): row selection uses pointer event instead of drag event @zqran (#3029)
- feat(database): drag inside the database without selecting the block @zqran (#3052)
- feat(database): save the last title being edited @zqran (#3101)
- feat(database): hide the tooltip of "+ New Record" button in edgeless mode @zqran (#3117)
- feat(database): set default width when dragging to create a database in edgeless mode @zqran (#3133)
- feat(database): save the last title being edited when add new column @zqran (#3134)
- feat(database): support modal display @zqran (#3167)
- feat(database): update the style of column-type arrow icon @zqran (#3211)
- feat(database): support
link
column type @zqran (#3187) - feat(database): title column hide
Move Right
@zqran (#3255) - feat(database): temporarily close the modal popup display @zqran (#3257)
- feat(database): update UI style @zqran (#3269)
- feat(database): hide the
Move Left
of the first normal column @zqran (#3354) - feat(database): optimize row selection @zqran (#3383)
- feat(database): remove the selection when deleting the cell @zqran (#3549)
- feat(edgeless): change text default color between themes @Flrande (#3007)
- feat(edgeless): add common math utils @regischen (#3009)
- feat(edgeless): add some utilies @regischen (#3034)
- feat(edgeless): update note border color @Flrande (#3057)
- feat(edgeless): edgless element drag snap @regischen (#2967)
- feat(edgeless): keep viewport state between mode switch @regischen (#3081)
- feat(edgeless): support drag canvas with middle button of mouse @doouding (#3146)
- feat(edgeless): edgeless earser tool @regischen (#3126)
- feat(edgeless): keep brush state in one session @regischen (#3161)
- feat(edgeless): support manage note index and hidden state @Flrande (#3177)
- feat(edgeless): update note ui @Flrande (#3185)
- feat(edgeless): support select element below the hollow shape @doouding (#3212)
- feat(edgeless): add index for other notes when selecting a note @Flrande (#3235)
- feat(edgeless): update toolbar ui @Flrande (#3262)
- feat(edgeless): improve toolbar ui @Flrande (#3258)
- feat(edgeless): support DnD images from outside into editor @fundon (#3123)
- feat(edgeless): support copy as PNG @fundon (#3072)
- feat(edgeless): connector @regischen (#3184)
- feat(edgeless): new edgeless tool bar @donteatfriedrice (#3230)
- feat(edgeless): support rotating shapes @fundon (#2931)
- feat(edgeless): toast message after copying to clipboard @fundon (#3337)
- feat(edgeless): support note clipping @doouding (#3314)
- feat(edgeless): optimize note cut interaction details @doouding (#3343)
- feat(edgeless): add overlay for note and shape tool @donteatfriedrice (#3335)
- feat(edgeless): click to add shape with shape tool @donteatfriedrice (#3382)
- feat(edgeless): support connecting rotated elements @regischen (#3394)
- feat(edgeless): support adding text in shape @Flrande (#3423)
- feat(edgeless): support pasting image in edgeless mode @zuoxiaodong0815 (#3445)
- feat(edgeless): migrate to lineWidthPanel for shape and connector @donteatfriedrice (#3459)
- feat(edgeless): complete canvas text component toolbar @donteatfriedrice (#3465)
- feat(slash-menu): insert database after the current block @zqran (#3102)
- feat(store): clarify different types of providers @himself65 (#3073)
- feat(store): lazy load spaces only when waitForLoaded is called @Saul-Mirone (#3082)
- feat(store): add workspace version in meta @Saul-Mirone (#3107)
- feat(store): let user control subdoc load timing after page meta added @Saul-Mirone (#3157)
- feat(store): init broadcast channel provider @himself65 (#3190)
- feat(virgo): support embed @Flrande (#3041)
- fix: unable to focus on image caption @lawvs (#3000)
- fix: link page menu active state @lawvs (#3038)
- fix: press enter in the middle of parent also indent children list @donteatfriedrice (#3046)
- fix: link page menu import icon @lawvs (#3054)
- fix: export two adjacent bookmarks produce one invalid url @donteatfriedrice (#3055)
- fix: ignore arrow key when select is composing @lawvs (#3076)
- fix: cannot drag to select the block @zqran (#3088)
- fix: exclude the current page from linked page popover @lawvs (#3114)
- fix: can not drop bookmark with new frame in edgeless from block-hub @QiShaoXuan (#3145)
- fix: notion import error on todo @fourdim (#3110)
- fix: handling backspace key press for cursor transition from paragraph to page title @zhengjitf (#3148)
- fix: text cannot be selected in edit mode @zzj3720 (#3173)
- fix: missing update in provider @himself65 (#3213)
- fix: edgeless text error when importing from snapshot @Saul-Mirone (#3229)
- fix: console error exporting PNG/P...
v0.6.0
🍬 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:
- Architectural Updates
- Add event dispatcher for standardized DOM event handling @Saul-Mirone (#2680 #2691 #2722 #2725 #2754)
- Support schema validator for blocks @Saul-Mirone (#2291 #2317)
- Switch to single root block @Saul-Mirone (#2554 #2607 #2622 #2761)
- Add new
@blocksuite/lit
package for common UI components @Saul-Mirone (#2509 #2595) - Support co-existing of multiple editor instances @zzj3720 @lawvs (#2406 #2456)
- Use yjs-based data flow in phasor @Flrande (#2486)
- Editor Functionalities
- Database block @zqran
- New row-level selection and cell-level selection (#2561 #2612 #2656 #2665 #2705 #2769 #2902)
- New column type
checkbox
,progress
support (#2376 #2383 #2533 #2709) - Auto scroll on dragging support (#2531)
- New UI style improvements (#2330 #2356 #2476 #2487 #2526 #2543 #2562 #2587 #2598 #2613 #2633 #2733 #2894 #2896 #2919)
- Better
Enter
/Backspace
/Esc
and other keyboard operation support (#2455 #2458 #2701 #2736 #2768 #2975 #2962) - Hide clear icon when no search content (#2543)
- Click outside support (#2395)
- Preserve at least 1 blank row and empty state with 0 row (#2488 #2734)
- Support scaling in edgeless mode (#2758)
- Optimize interop with drag handle and format bar (#2773 #2828 #2936)
- Optimize the behavior of changing column types (#2900)
- Many other usability bugfixes (#2414 #2466 #2511 #2329 #2324 #2323 #2321 #2322 #2319 #2338 #2340 #2346 #2354 #2363 #2362 #2367 #2429 #2481 #2541 #2524 #2570 #2597 #2634 #2636 #2640 #2739 #2740 #2770 #2771 #2859 #2839 #2914 #2925 #2959 #2927 #2369)
- Bookmark block flavour that caches preview content of URLs @QiShaoXuan (#2693 #2906 #2940 #2827 #2818 #2871 #2912 #2951 #2980)
- Import and export
- Support Notion import @zuoxiaodong0815 (#2621 #2767 #2778 #2838 #2861 #2903 #2898 #2920 #2932 #2956 #2958)
- Add basic support for pdf and png export @fourdim (#2724 #2813)
- Fix code block export markdown and html @lzlme (#2637)
- Fix redundant list item line breaks on pasting rich content @zuoxiaodong0815 (#2494)
- Fix item in the middle of a unordered list disappears when backspace @zuoxiaodong0815 (#2506)
- Fix wrong format when paste a specify text @zuoxiaodong0815 (#2530)
- Fix part of what is copied in the list block is lost @zuoxiaodong0815 (#2538)
- Edgeless whiteboard improvements
- Optimize rendering perfmance by using page-level layer to replace block-level transform @fundon (#2700)
- Support canvas text rendering @Flrande (#2546 #2977 #2992 #2996 #2755 #2904 #2985 #2719 #2790 #2817 #2753 #2777 #2756 #2780 #2766 #2777 #2819 #2907)
- Support hand-drawn-like shape style @Flrande (#2575 #2584 #2696 #2808 #2721 #2590 #2591 #2565)
- Support switch to pan mode when holding right-key @fundon (#2512)
- Support delete shortcut to delete content @fundon (#2513)
- Support image uploads @fundon (#2610)
- Support support bring forward and send backward elements @fundon (#2527)
- Support smooth zoom and fit @regischen (#2765)
- Support dragging with
option
to duplicate element @regischen (#2843) - Support edge dragging on frame @fundon (#2895)
- Support select all via hotkey @blurname (#2789)
- Support
shift
+ click to multi-select @regischen (#2860) - Support shortcuts for zooming @fundon (#2911)
- Support proportional scaling with shift key @fundon (#2593)
- New connector line style @alt1o (#2310)
- Switch to
PointerEvent
with basic mobile compatibility @alt1o (#2269) - Split original block after drag out a block in edgeless mode @QiShaoXuan (#2477)
- Support max zoom @fundon @doodlewind (#2482 #2747)
- Auto add frame on click when no frame exists @regischen (#2905)
- Fix z-index for toolbar @karti16 (#2404)
- Fix continuous undo redo lost frame @regischen (#2965)
- Other UI improvements and usability bugfixes (#2731 #2675 #2676 #2678 #2717 #2699 #2833 #2857 #2875 #2917 #2571 #2714 #2596 #2626 #2420)
- Misc (common functionalities)
- Support automatic identify and convert link @QiShaoXuan (#2624)
- Add page command to the slash menu @lawvs (#2646)
- Code block supports fuzzy search @lawvs (#2387 #2516)
- Support input under block-level selection @QiShaoXuan (#2558)
- Click to add a paragraph block at the end of the page @rottenpen (#2410)
- Fix double click range error on blank area @donaldxdonald (#2585)
- Fix slash menu if insert "/" before select block @QiShaoXuan (#2999)
- Fix inline code or strikethrough error when hard enter @fourdim (#2642)
- Fix scrollbar not visible for code blocks @hritikchaudhary (#2659)
- Fix linked page popover CJK support @lawvs (#2413)
- Fix multi-line indentation @zzj3720 (#2397)
- Fix linked page keyboard shortcut not working on German keyboards @AlessioGr (#2371)
- Fix incorrect placeholder position for empty list parent @smallnine9 (#2845)
- Fix cursor position when using cmd+z hotkey @smallnine9 (#2881)
- Support shift-click @fundon (#2280)
- Fix code block scroll behavior when enter or backspace @lzlme (#2289)
- Store user can't define own root flavor @zzj3720 (#2292)
- Requires double enter to input a link @Lmmmmmm-bb (#2337)
- Press arrow-right works incorrect with multi-line selection @zzj3720 (#2352)
- Keep paragraph block's type when pasting excerpt text type (quote block) @PerfectPan (#2350)
- Init _cssVariables @donglixiaoche (#2420)
- Enable clipboard test cases in multiple editor @zzj3720 (#2427)
- Cleanup active editor when disconnected @himself65 (#2444)
- Support dragging block to blank @lawvs (#2469)
- Select texts when clicking on blank area @fundon (#2474)
- Ignore input event in code language filter @lawvs (#2501)
- Remove unreliable delimiter @lawvs (#2539)
- Fix wrong cursor position when pressing up/down in zoomed viewport @QiShaoXuan (#2532)
- Hide unregister flavour @lawvs (#2545)
- Fix wrong position in page mode after drag out a block in edgeless mode @QiShaoXuan (#2560)
- Slash menu insert image @lawvs (#2583)
- Press enter on title should add new line @Saul-Mirone (#2605)
- Hide divider in balloon toolbar @lawvs (#2604)
- Linked page trigger should not break bracket completion @lawvs (#2738)
- Fix deleting parent lost nested children @donteatfriedrice (#2969)
- Fix cursor pos when select multiple blocks and input @lawvs (#2983)
- Fix toolbar do not trigger in edgeless mode in some case @QiShaoXuan (#2995)
- Fix pasting code is not as expected @donteatfriedrice (#2993)
- Fix the block-hub toggle @imyuanx (#2655)
- Paste issue causing empty single-line block to not focus @boomyao (#2343)
- Fix input at left side of the bi-directional link will create redundant link @Flrande (#2348)
- Move cursor at the last line of the last block to the end @SevenOutman (#2418)
- Fix undo/redo in virgo-input @Flrande (#2568)
- Fix in title line, press key arrowdown will create a new line @donteatfriedrice (#2812)
- Do not convert markdown in quote block @donteatfriedrice (#2884)
- Database multi-select tab close icon invisible @donteatfriedrice (#2888)
- Fix number mode in virgo-input @Flrande (#2897)
- Shift-click in block level selects redundant blocks @donteatfriedrice (#2989)
- Optimize position of indicator in database @fundon (#2206)
- Fix position when hovering over border of database @fundon (#2674)
- Fix position when database has scrollLeft > 0 @fundon (#2683)
- Should not use native Text @Flrande (#2703)
- Sync debug menu color transition with content area on switching dark mode @Innei (#2825)
- Support responsive image block @fundon (#2224)
- Switch to PointerEvent @fundon (#2341)
- Don't show toolbar on selection @fundon (#2365)
- Schema validator of
moveBlocks
@zqran (#2366) - Support moving blocks in multiple frames @fundon (#2723)
- Fix input in the beginning of line may fail when inputting with IME @Flrande (#2287)
- Fix lit may be crashed by IME @Flrande (#2796)
- Fix arrow down not work well in zero-width character @Flrande (#2866)
- Move
calcDropTarget
method out of drag-handle @fundon (#2392) - UI stying optimization @JimmFly @zqran @Flrande (#2446 #2462 #2496 #2529 #2873 #2876 #2926 #2718 #2588 #2508 #2720)
- Database block @zqran
- Housekeeping
- Fix cyclic dependence in schema @himself65 (#2638)
- Remove duplicate shadowless element in block @Saul-Mirone (#2542)
- Unify editor theme from
@toeverything/theme
package @himself65 (#2412) - New element operation APIs @alt1o (#2347)
- Use typescript@5 const type param for
matchFlavours
@Saul-Mirone (#1786) - Remove redundant
transact
@Flrande (#2885) - Extract
AbstractEditor
for better typing @lawvs (#2448) - Add new
pageModeSwitched
slot @lawvs (#2452) - Refactor on database block code structure @zqran (#2372 #2394)
- Add
exportHtml
andexportMarkdown
@doodlewind (#2493) - Rename
transformPropertyValue
tocomputedValue
@Flrande (#2708) - Support JSON-based
importPageSnapshot
@doodlewind @Flrande @zzj3720 (#2359 #2972) - Add double click event dispatch for embed blocks @himself65 (#2328)
- Restore css debug menu @thorseraq (#2485)
- Add custom formatter for BaseBlockModel @lawvs (#2398)
- Support doc search @sxzz (#2373)
- Add custom elements slot in menu...
0.5.0
🍬 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:
- 🔮 There is now support for nestable block model fields definitions.
- 🗄️ A new
DatabaseBlock
is available to use as a table. The data structure has been redesigned and moved to the block level. - 🔎 Cross-page indexing is possible through the
SearchIndexer
andBacklinkIndexer
. - 🎨 There are many enhanced edgeless and whiteboard editing capabilities, including a new
@blocksuite/connector
package that provides pathfinding support for computing shape connectors. - 📖 The documentation site is available, including onboarding documents and tutorials. The site can be accessed at blocksuite.affine.pro.
🚀 Features
- Store (@Saul-Mirone @lawvs @doodlewind)
- Edgeless (@alt1o @doodlewind)
- Support for various tools and modes, including drag and drop (#1417), view control panel (#1423), brush tool (#1418, #1458), text tool (#1563), and component toolbar (#1703).
- Basic hotkeys support (#1750) and pressing the ESC key to return to the default state (#1833).
- Active state maintenance between clicking frames (#1836) and support for bringToFront and sendToBack (#1945).
- Connectors can be attached to elements at any position (#1963) and copy-paste support in edgeless clipboard (#1965).
- Edgeless frame background (#2027), shape fill and stroke color support (#2042), and background grid optimization (#2047).
- Double-click the blank space to add text (#2163).
- Additional shapes (#1339) and brush support (#1337).
- Connector support (#1793) and shape border style support (#2166).
- Subpage (@lawvs)
- Database block (@zqran)
- Rich-text column soft enter support (#1765).
- Improved handling of placeholders, insertion, and selection (#1785, #1795, #1770).
- Enhanced database styling (#1831, #1855, #1861) and column operations (#1879, #1884, #1887).
- Tag color selection (#1917), renaming and deletion (#1891), and copy-paste support (#1908).
- More actions support (#1916) and drag and drop column width adjustment (#1931).
- Database conversion (#1941) and column operations with shortcuts (#2019).
- Title and tag length limits (#2000) and drag and drop row insertion (#2046).
- Icon and style updates (#2063, #2068) and mobile compatibility (#2187).
- Virgo integration for number input replacement (#2144) and select tag length limit update (#2230).
- Virgo (@Flrande)
- Selection (@fundon)
🙌 New Contributors
- @shengxinjing made their first contribution in #1269
- @qinluhe made their first contribution in #1313
- @PerfectPan made their first contribution in #1325
- @AlessioGr made their first contribution in #1387
- @suica made their first contribution in #1665
- @hanchayi made their first contribution in #1732
- @VictorNanka made their first contribution in #1799
- @adityash1 made their first contribution in #1903
- @yuusheng made their first contribution in #1988
- @blurname made their first contribution in #1990
- @luke358 made their first contribution in #2060
- @SkyeSun made their first contribution in #2087
- @DataDaoDe made their first contribution in #2096
- @zuozijian3720 made their first contribution in #2213
🐛 Detailed Refactoring and Bugfixes
- refactor: add
text
prop in schema (#1281) - refactor: migrate
SelectedBlock
toBlockRange
(#1334) - refactor: remove redundant cachedSelectedBlocks (#1332)
- refactor: add side effect in store (#1340)
- refactor: optimize some code in virgo (#1360)
- refactor: remove code block button (#1365)
- refactor: remove
depth
andparentIndex
fromBaseBlockModel
(#1372) - refactor: reorganize range structure (#1366)
- refactor: detect elements with Node.compareDocumentPosition in block selection (#1356)
- refactor: simplify test (#1379)
- refactor: migrate
BlockSuiteModelProps
toBlockModelProps
(#1408) - refactor: clearly distinguish lit's
state
andproperty
(#1428) - refactor: remove
handlePageEvent
timer (#1431) - refactor: simplify keyboard behavior (#1438)
- refactor:
Signal
->Slot
(#1481) - refactor: simplify code block language list logic (#1486)
- refactor: split basic
DefaultSelectionManager
modules (#1494) - refactor: remove redundant selection manager fields (#1496)
- refactor:
SelectionRect
->DraggingArea
(#1500) - refactor: extract
setSelectedBlocks
and slot effects (#1502) - refactor: remove
resetSelectedBlockByRect
(#1503) - refactor: switch to
selection.viewport
(#1506) - refactor: remove redundant selection manager fields (#1507)
- refactor: switch to
page.readonly
(#1511) - refactor: add
selection.state.draggingArea
(#1512) - refactor: extract block hub templates (#1521)
- refactor: move
codeBlockOption
to code block (#1519) - refactor:
Slot.disposableListener
->Slot.fromEvent
(#1526) - refactor: code option use viewport element (#1565)
- refactor: remove the deprecated
addBlock
api (#1613) - refactor: add async query for dom mutation scenario (#1621)
- refactor: replace
getRichTextByModel
withgetVirgoByModel
(#1626) - refactor: strict text attributes check (#1731)
- refactor: migrate nativeKeydown to hotkey (#1751)
- refactor: replace input tag with VEditor in database block (#1746)
- refactor: extract
getPopperPosition
function (#1816) - refactor: add
getRichTextBoundingBox
test action (#1819) - refactor: improve stability of inline suggestion (#1817)
- refactor: split
handleLineStartBackspace
(#1910) - refactor: check subpage reference (#2022)
- refactor: clean short key (#2051)
- refactor: extract keydown observer (#2062)
- refactor: remove redundant slot (#2140)
- refactor: remove
@blocksuite/react
package (#2179) - refactor: subpage meta sync (#2190)
- refactor: use
@toeverything/y-indexeddb
(#2207) - refactor: use virgo element as the ref node when obtaining the vRange (#2239)
- refactor: subpage update (#2264)
- refactor(blocks): replace textarea in title with virgo (#1168)
- refactor(blocks): replace quill with virgo (#1433)
- refactor(blocks): improve code-block highlight performance (#1682)
- refactor(blocks): add cache for highlight in code-block (#1762)
- refactor(blocks):
builtInSchemas
->AffineSchemas
(#1763) - refactor(blocks): prevent auto scroll in edgeless mode (#1830)
- refactor(code): replace
setTimeout
withResizeObserver
(#1680) - refactor(database):
tag
->column
(#1739) - refactor(database): optimize column related naming (#1913)
- refactor(database): remove
mode
in crdt model (#1918) - refactor(database): flatten
internalProperty
andproperty
(#1919) - refactor(database): add
DatabaseManager
andpage.db
entity (#1922) - refactor(database):
columns
->cells
(#1925) - refactor(database):
columnSchema
->column
(#1934) - refactor(database): split column header component file (#1957)
- refactor(database):
columnSchema
->column
(#1960) - refactor(database): column header (#1987)
- refactor(database): toolbar and row container (#1989)
- refactor(database): separate title (#1997)
- refactor(database): separate select type column (#1998)
- refactor(edgeless): split toolbar modules (#1348)
- refactor(edgeless): hotkeys (#1835)
- refactor(edgeless): add frame and update selection (#1834)
- refactor(editor): move content parser out of editor lifecycle (#1748)
- refactor(global): move global database types into blocks (#2278)
- refactor(phasor): switch to
getElementsBound
(#1445) - refactor(phasor): move edgeless viewport to
surface.viewport
(#1477) - refactor(selection): switch to
document.elementsFromPoint
(#1530) - refactor(selection): keep setSelectedBlocks logic simple (#1706)
- refactor(store): remove redundant type param (#1756)
- refactor(store): support synchronous
createPage
(#1760) - refactor(store):
addBlockByFlavour
->addBlock
(#1764) - refactor(store): remove redundant
moveBlocksToParent
(#1787) - refactor(store): remove
deleteBlockById
andupdateBlockById
(#1923) - refactor(store): set doc.guid to workspace id (#1958)
- refactor(store): init internal props should respect ext in schema (#2025)
- refactor(store): move cell and column to database props and add database model (#2053)
- refactor(store): use map proxy for object props (#2128)
- refactor(virgo): switch to
rootElement
(#1454) - refactor(virgo): use tuple (#...