blocksuite

🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.

MPL-2.0 License

Downloads
503.9K
Stars
3.8K
Committers
151

Bot releases are visible (Hide)

blocksuite - v0.13.0 - API Overhaul and Rich Examples Latest Release

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.

BlockSuite Examples

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!

Framework Features and API Overhaul

  • Text Style Commands Enhancement (#6406, #6416): Added commands to facilitate operations on selected text content, including toggleBold, toggleItalic, toggleUnderline, toggleStrike, toggleCode, toggleLink, getTextStyle, and isTextStyleActive. These commands support chainable combination calls, simplifying common rich text style operations.
  • Format Bar Config API (#6433): Introduced a new format bar widget configuration API, allowing for the customization of format bar menu items. This supports the configuration of existing menu items and the registration of custom menu items, including paragraph dropdowns, style toggles (e.g., bold, italic), highlighter dropdowns, and block type switches with custom icons.
// 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,
    })
}
  • Standard Error Types and Handler (#6340): Introduced BlockSuiteError to facilitate application-level exception categorization.
  • Renaming page to doc (#6290): We now refer to BlockSuite documents as docs, aligning API concepts with this terminology change (e.g., page.addBlock -> doc.addBlock). This clarifies the document-centric nature of the API.
  • Renaming 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).
  • Command API Simplification (#6428, #6421, #6277): Streamlined command usage by eliminating the need for .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();
  • Schema Entry Renaming (#6312, #6319): Removed deprecated __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';
  • Typed getService (#6284): The getService API is now strongly typed with different service specific to block flavours.

Product Features

  • Batch Import (#6360): Enabled batch importing of multiple markdown or HTML files through the file picker.
  • Pressure Sensitivity for Brush Mode (#6348): Added pressure sensitivity support for the brush tool, offering more natural drawing experience on tablets.
  • Comment Feature POC (#6302): Introduced a preliminary support for a commenting feature, setting the stage for enhanced collaboration capabilities that will be further refined in future updates.
  • fix: view in edgeless mode @doouding (#6269)
  • fix: handle drag and drop outside nested editor gracefully @AyushAgrawal-A2 (#6282)
  • fix: console error when pressing delete key in the paragraph before a database @ununian (#6285)
  • fix: change bidirectional link divider color @regischen (#6331)
  • fix: should enter edit status when focus in embed doc block @donteatfriedrice (#6349)
  • fix: bi-directional panel container size @pengx17 (#6358)
  • fix: remove static slot and controling state @doouding (#6359)
  • fix: use editorModeSwitch slot to change mode @donteatfriedrice (#6380)
  • fix: binary expression logic errors @Brooooooklyn (#6381)
  • fix: add no-useless-spread and fixes related codes @Brooooooklyn (#6383)
  • fix: add ask ai in format-bar @regischen (#6447)
  • fix: bi-directional panel check id @regischen (#6460)
  • fix: remote cursor shouldn't display on other docs @Saul-Mirone (#6462)
  • fix: select all in page mode @Saul-Mirone (#6465)
  • fix: update edgeless embed synced doc block style @donteatfriedrice (#6474)
  • fix: remove wrong disposables @regischen (#6475)
  • fix: add missing slot in edgeless service @doouding (#6478)
  • fix: format bar should not display on linked page @Saul-Mirone (#6480)
  • fix: check disposable if exists @regischen (#6485)
  • fix: only display hostname in bookmark @donteatfriedrice (#6495)
  • fix(blocks): heading style should not influence children @Flrande (#6407)
  • fix(blocks): use requestAnimationFrame to update selection @fundon (#6422)
  • fix(blocks): type character after link should not extend the link attributes @Flrande (#6443)
  • fix(blocks): inconsistent space between nested blocks @Flrande (#6466)
  • fix(blocks): drag area not handle viewport position correctly @Flrande (#6482)
  • fix(database): drop row in place and it'll disappear @zzj3720 (#6276)
  • fix(edgeless): fix wrong algorithm @regischen (#6278)
  • fix(edgeless): switching to hand tool while right clicking affine#5664 @golok727 (#6279)
  • fix(edgeless): shift panel-wrapper to keep it in view @fundon (#6288)
  • fix(edgeless): no need to adjust position of component-toolbar when more-actions-container is opened @fundon (#6292)
  • fix(edgeless): cannot add text in hollow shape @donteatfriedrice (#6297)
  • fix(edgeless): add default text color of shape-element @fundon (#6300)
  • fix(edgeless): github icon size on note-menu @fundon (#6309)
  • fix(edgeless): redo for reordering @doouding (#6315)
  • fix(edgeless): auto-complete displays incorrect shape @lawvs (#6334)
  • fix(edgeless): width or height should not be negative @fundon (#6338)
  • fix(edgeless): menu-container scrolling in safari @fundon (#6351)
  • fix(edgeless): fix laggy selection & legacy template rendering @doouding (#6341)
  • fix(edgeless): fonts load and render in firefox @fundon (#6353)
  • fix(edgeless): position should be calculated after the update is complete @fundon (#6367)
  • fix(edgeless): last selection was recovered unexpected after panning from default tool @congzhou09 (#6343)
  • fix(edgeless): update path after mode change @regischen (#6374)
  • fix(edgeless): snapshot with connector elements importing @doouding (#6377)
  • fix(edgeless): use custom scrollbar for template panel @doouding (#6446)
  • fix(edgeless): add ask ai in edgeless format-bar @regischen (#6456)
  • fix(edgeless): add paragraph block when clicking at empty note block @donteatfriedrice (#6457)
  • fix(edgeless): paste group with same relative index @regischen (#6415)
  • fix(edgeless): drag note to merge after a list item @doouding (#6461)
  • fix(edgeless): dropout embed synced doc block should fit height @donteatfriedrice (#6463)
  • fix(edgeless): size panel width @fundon (#6473)
  • fix(edgeless): group element to image @doouding (#6472)
  • fix(edgeless): bebas-neue light url @fundon (#6395)
  • fix(edgeless): optimize edgeless note focus logic @donteatfriedrice (#6476)
  • fix(edgeless): make sure some components invisible when readonly @donteatfriedrice (#6483)
  • fix(inline): failed to delete embed node using backspace @Flrande (#6347)
  • fix(inline): v-line is not fully adapted for horizontal scrolling @Flrande (#6467)
  • fix(page): popup menu should not close, when on top of hoverable block @AyushAgrawal-A2 (#6281)
  • fix(page): allow block cards to expand horizontally on note resize @AyushAgrawal-A2 (#6273)
  • fix(page): change toolbar position for all block cards to top-left @AyushAgrawal-A2 (#6271)
  • fix(page): the style of editor-host does not take effect @wumo1016 (#6305)
  • fix(page): link card image should not be scaled @donteatfriedrice (#6362)
  • fix(page): update code theme by page theme @JunIce (#6365)
  • fix(page): handle delete or backspace align with embed block @donteatfriedrice (#6364)
  • fix(page): skip adding reference node when importing notion zip @fourdim (#6376)
  • fix(page): image not found after import notion file @zkwolf (#6419)
  • fix(page): flat blockSelections to return consistent flat mode SelectedBlocks @fourdim (#6445)
  • fix(page): wrap disable media print in a finally wrapper @fourdim (#6479)
  • fix(playground): content of theme toggle button @fundon (#6308)
  • fix(presets): editor should can be selected in readonly mode @Flrande (#6397)
  • fix(presets): editor should await host update complete @Flrande (#6470)
  • fix(std): improve the timing of event dispatcher deactivate @Flrande (#6345)
  • fix(std): pointer event state conflict with activate state @Saul-Mirone (#6488)
  • fix(store): use lib0 sha256 when api not available @EYHN (#6454)

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.12.0...v0.13.0

blocksuite - v0.12.0 - Embeds, Sync Engine, and Cross-Browser Support!

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.

Notable Framework Enhancements

  • Support for Safari and Firefox by moving to single contenteditable (#5850)
  • New @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)
  • Reorganized edgeless API exposed on service (#5972 #6108 #6165 #6180)
  • Refactored editor initializing flow that allows for simpler code setup for creating editor with existing content (#6167)
  • New setup function in block spec for passing in custom configs (#6122)
  • Move to per-block version that allow co-existing of multiple block versions in same doc (#6065)
  • Improved API for pulling out 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!

Notable Product Features

  • The card view and embed view of documents that allow experience like Synced Block in Notion (#6193 #5955)
  • The embed view of Figma, GitHub, Loom and attachment (#5927 #5988 #5955 #6224 #6069)
  • New note slicer that splits note blocks in an easier way (#6029)
  • New bi-directional link panel for inbound and outbound bi-directional links (#6010)
  • Better note visibility between doc and edgeless editors (#5994)
  • fix: import use .js postfix @regischen (#5965)
  • fix: change video embed card dimensions @AyushAgrawal-A2 (#5967)
  • fix: change title/tooltip/description of entry points for adding link @AyushAgrawal-A2 (#5971)
  • fix: title & description on generic link card when fetch failed @AyushAgrawal-A2 (#5974)
  • fix: cursor pointer on hover over card url @AyushAgrawal-A2 (#5975)
  • fix: unexpected spaces in the inline node @Flrande (#5982)
  • fix: embed-card-create-portal - remove block specific url validation @AyushAgrawal-A2 (#5981)
  • fix: treat embed-* blocks without iframe as card view @AyushAgrawal-A2 (#5984)
  • fix: dragPreview / dropIndicator / dragEndPos viewport offsets @AyushAgrawal-A2 (#5980)
  • fix: add hover/select status of links in all card view and embed view @AyushAgrawal-A2 (#6003)
  • fix: input overflow menu @nawbc (#6005)
  • fix: reference-node sometimes failed to get inline-editor @Flrande (#6021)
  • fix: proportional scaling for linked card horizontal style @AyushAgrawal-A2 (#6023)
  • fix: add .js postfix @regischen (#6025)
  • fix: add .js postfix @AyushAgrawal-A2 (#6026)
  • fix: remove empty banner placeholder in linked doc card @AyushAgrawal-A2 (#6024)
  • fix: remove link panel from affine-doc-editor @regischen (#6031)
  • fix: on hover logic and css selector on icon @AyushAgrawal-A2 (#6050)
  • fix: don't delete image when deleting in caption @zqran (#6059)
  • fix: attachment block should not contenteditable @Flrande (#6064)
  • fix: should not show placeholder when composing @Flrande (#6076)
  • fix: event scope source type @Saul-Mirone (#6074)
  • fix: card-view linked page display in backlink @regischen (#6081)
  • fix: unexpected cursor position after clicking page outside @Flrande (#6087)
  • fix: line number container in code-block should not contenteditable @Flrande (#6085)
  • fix: bookmark and image block should not contenteditable @Flrande (#6089)
  • fix: embed-* blocks should not be contentEditable @AyushAgrawal-A2 (#6100)
  • fix: show github status on update @AyushAgrawal-A2 (#6097)
  • fix: card banner images should not be draggable @AyushAgrawal-A2 (#6098)
  • fix: resolve loading state after queryUrlData fails @AyushAgrawal-A2 (#6102)
  • fix: list number should not be contenteditable @Flrande (#6113)
  • fix: bidirectional link panel bug @regischen (#6116)
  • fix: group paste bug @regischen (#6118)
  • fix: bookmark should show caption @AyushAgrawal-A2 (#6119)
  • fix: surface ref should not contenteditable @Flrande (#6126)
  • fix: image-block error/loading state & captions in edgeless @AyushAgrawal-A2 (#6139)
  • fix: drag-handle note-scale in page mode @AyushAgrawal-A2 (#6140)
  • fix: support export scaled images in html @lawvs (#6142)
  • fix: export png incorrectly when svg without width and height @donteatfriedrice (#6146)
  • fix: remove duplicated title when exporting markdown @lawvs (#6152)
  • fix: optimize note display status @donteatfriedrice (#6154)
  • fix: untitled name fallback for bi-directional link panel @regischen (#6164)
  • fix: hide format-bar / component-toolbar while dragging @AyushAgrawal-A2 (#6185)
  • fix: can not render link node with bold style @Flrande (#6188)
  • fix: link-popup input background color in dark mode @Flrande (#6189)
  • fix: linked & synced starter examples should work @AyushAgrawal-A2 (#6191)
  • fix: should not extend attributes when composing @Flrande (#6190)
  • fix: disable two fingers back/forward swipe in chrome @fundon (#6208)
  • fix: format bar popup disappears on edgeless @lawvs (#6216)
  • fix: sync package configs @doodlewind (#6229)
  • fix: tooltip flickers when the mouse is moved slightly @lawvs (#6240)
  • fix: improve code block performance @Flrande (#6236)
  • fix: cursor cannot be moved as expected in firefox @Flrande (#6249)
  • fix: arrow buttons are disabled when kanban exists in page @ununian (#6248)
  • fix: failed to select from empty line and unexpected format result in empty line @Flrande (#6259)
  • fix: resolve this error in LinkPreviewer @AyushAgrawal-A2 (#6260)
  • fix: synced doc toolbar & caption bug @AyushAgrawal-A2 (#6262)
  • fix: unexpected format result when in block selection and empty line @Flrande (#6261)
  • fix(database): drag a row out of the database block @zzj3720 (#6263)
  • fix(database): select column Popup position @zqran (#6266)
  • fix(edgeless): incorrect dragStart in surface @AyushAgrawal-A2 (#5985)
  • fix(edgeless): embed-card toolbar incorrect card styles @AyushAgrawal-A2 (#5987)
  • fix(edgeless): wrong transparent shape overlay @donteatfriedrice (#5990)
  • fix(edgeless): enable double click on cards in surface @AyushAgrawal-A2 (#6009)
  • fix(edgeless): edgeless only index label position shift @donteatfriedrice (#6022)
  • fix(edgeless): should update index label when note order changed @donteatfriedrice (#6060)
  • fix(edgeless): should generate connectors' path once when loading connector middleware @doouding (#6084)
  • fix(edgeless): should focus at note after creating it @donteatfriedrice (#6091)
  • fix(edgeless): bugs of connector and block @doouding (#6088)
  • fix(edgeless): drag to add note should support collapse @donteatfriedrice (#6093)
  • fix(edgeless): show curve icon on resize handle hover before scaling starts @AyushAgrawal-A2 (#6095)
  • fix(edgeless): prevent file drop indicator on block elements in surface @AyushAgrawal-A2 (#6099)
  • fix(edgeless): remove redundant menu divider @donteatfriedrice (#6114)
  • fix(edgeless): prevent native selection on drag select in edgeless @AyushAgrawal-A2 (#6117)
  • fix(edgeless): don't record last props in session @regischen (#6128)
  • fix(edgeless): should rerender when new element was added or removed @doouding (#6130)
  • fix(edgeless): remove single connector selected rect and multi select… @regischen (#6150)
  • fix(edgeless): frame title disappear after reordering frames @AyushAgrawal-A2 (#6157)
  • fix(edgeless): should be able to change embed card style @AyushAgrawal-A2 (#6159)
  • fix(edgeless): template and surface-ref bug @doouding (#6161)
  • fix(edgeless): insert frame/group into page @donteatfriedrice (#6163)
  • fix(edgeless): should not select last docOnly note @donteatfriedrice (#6226)
  • fix(edgeless): change connector toolbar tip @regischen (#6233)
  • fix(edgeless): more button copy not work @regischen (#6235)
  • fix(edgeless): active eventDispatcher when edgeless tool updated @donteatfriedrice (#6234)
  • fix(edgeless): cannot click more button in AFFiNE @donteatfriedrice (#6250)
  • fix(edgeless): inner frame hittest @regischen (#6255)
  • fix(edgeless): slide menu content height @fundon (#6253)
  • fix(edgeless): modify connector tip @regischen (#6267)
  • fix(inline): event source should not contenteditable when in readonly @Flrande (#6127)
  • fix(inline): line break issue @golok727 (#6212)
  • fix(lit): textSelectionToRange result incorrect when selection is reversed @Flrande (#6227)
  • fix(page): enter in title move cursor @regischen (#5962)
  • fix(page): merge delta when exporting code @fourdim (#5964)
  • fix(page): export long page to png @donteatfriedrice (#5973)
  • fix(page): change text attribute on converting inline-link to card @AyushAgrawal-A2 (#5968)
  • fix(page): dragStart for bookmark / embed / image block @AyushAgrawal-A2 (#5979)
  • fix(page): show backlink for affine:embed-linked-doc @AyushAgrawal-A2 (#5986)
  • fix(page): empty clipboard because of transient activation @fourdim (#6000)
  • fix(page): linked page should show new title @AyushAgrawal-A2 (#6008)
  • fix(page): show only one toolbar at a time @AyushAgrawal-A2 (#6037)
  • fix(page): export png position shift @donteatfriedrice (#6075)
  • fix(page): should not remove empty lines when canceling an action @lawvs (#6104)
  • fix(page): add attachment transformer @fourdim (#6109)
  • fix(page): snapshot export assets rename @fourdim (#6132)
  • fix(page): link disapper when paste @regischen (#6135)
  • fix(page): linked page/web toolbar should not be displayed when the page is in read-only mode @AyushAgrawal-A2 (#6141)
  • fix(page): bullet list style update @AyushAgrawal-A2 (#6144)
  • fix(page): export embed as link @fourdim (#6148)
  • fix(page): markdown export list early closing issue @fourdim (#6151)
  • fix(page): add support for all top level blocks in surface ref portal @AyushAgrawal-A2 (#6160)
  • fix(page): delete block when deleting the last database view @lawvs (#6174)
  • fix(page): should be able to convert embed image card to image block @AyushAgrawal-A2 (#6179)
  • fix(page): flat p and div nodes inside list @fourdim (#6195)
  • fix(page): clipboard payload does not have assets @fourdim (#6194)
  • fix(page): default to plain text when parsing markdown code @fourdim (#6201)
  • fix(page): normalize newline characters @fourdim (#6211)
  • fix(page): synced block placeholder should not appear after adding content @AyushAgrawal-A2 (#6223)
  • fix(page): correct image fetch via proxy with response.ok check @AyushAgrawal-A2 (#6251)
  • fix(page): should not convert block when prefix text presents in the second line of the block @fourdim (#6270)
  • fix(page): toast when importing markdown using notion option @fourdim (#6274)
  • fix(playground): bring snapshot import back @fourdim (#6111)
  • fix(playground): starter default mode should be page @Flrande (#6187)
  • fix(playground): default page idb and collaboration not work @Flrande (#6192)
  • fix(playground): default page init when idb data exist @Flrande (#6225)
  • fix(playground): /starter/?init&room=1 not works @Flrande (#6230)
  • fix(playground): missing root model after refresh page @zkwolf (#6256)
  • fix(presets): no frame preview in sidebar @donteatfriedrice (#6124)
  • fix(store): extension name @fourdim (#6110)

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.11.0...v0.12.0

blocksuite - v0.11.0 - The Editor Framework!

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:

  • The new @blocksuite/presets package, which splits the independently usable DocEditor and EdgelessEditor, among others.
  • Distinct structuring of the BlockSuite framework layer, including atomic concepts like Editor, Block, Fragment, Widget, and definitive guides on how they combine. The current DocEditor and EdgelessEditor are based on this headless framework layer.
  • Based on BlockSuite headless, the accompanying front-end framework has been switched from lit to atomico for the experimental editor abed. This proves the feasibility of using the BlockSuite framework independently of specific front-end frameworks. We're also embracing React, Vue, and more diverse front-end frameworks, and there's more to come in terms of framework adaptation!
  • Completely rewritten BlockSuite framework tutorial and architectural exploration documentation, also available in Chinese for convenience.

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!

Notable Product Features in 0.11

  • Support for Linked Page Previews (#5813): Added the basic functionality to support linked page previews in the Table of Contents (TOC), enhancing user navigation experience.
  • Enhanced Bookmark Functionality (#5636): Improved the bookmark block to appear directly at the top level of the edgeless canvas, simplifying the process of pasting elements into the whiteboard.
  • Consistent Dragging Behavior (#5613): Improved the consistency of dragging behavior, support dragging paragraphs and images outside of the note block.
  • Frame Sidebar Support (#5584): Added support for frame sidebars fragment, which brings more intuitive control in edgeless editor.
  • Frame Navigator Optimization (#5498): Optimized the frame navigator, enhancing user navigation efficiency and experience.
  • New Table of Contents (TOC) (#5539): Introduced a new TOC fragment, enhancing document organization and navigation capabilities.
  • Embed View for Certain Attachment Types (#5475): Added embed view support for certain attachment types, enhancing the presentation and interactivity of multimedia content.

Notable Framework Enhancements in 0.11

  • Canvas Content Interleaving Based on LayerManager (#5347): Enabled canvas content interleaving with DOM based on LayerManager, enhancing the editor's visual representation and flexibility.
  • Support for Multiple Editor Instances (#5878): Implemented support for multiple editor instances, increasing the flexibility and scalability of the editing environment.
  • Vitest Browser Test Runner (#5536): Added the DOM-based Vitest browser test runner, making easier for writing integration tests.
  • Support for Custom Inline Nodes (#5909): Introduced the custom InlineSpec feature, enhancing flexibility in text editing, especially for advanced content editing like inline LaTeX.
  • Surface Elements API (#5874): Introduced a new surface elements API, avoid raw Y.Map manipulations.
  • Replaced Export Manager (#5934): Fully removed the last part of legacy ContentParser and introduced a new export manager based on snapshot and adapter mechanisms, greatly enhancing support for third-party formats and scalability.
  • Persisting Editing Session State (#5804): Implemented the temporary storage of user toolbar options and other temporary states through SessionStorage, enhancing usability in frequent switching scenarios.
  • Multi-Instance Selection Enhancement (#5852): Refactored the surface selection mechanism to support multiple instances, making the SurfaceSelection in EdgelessEditor more aligned with DocEditor.
  • Optimized Zoom In/Out Performance (#5791): Performance optimization for zoom in and out functionalities, improving response speed and smoothness.
  • Inline Editor Renaming (#5671): Renamed VirgoEditor to InlineEditor to more accurately reflect its functionality.
  • Stash and Pop for Reactive Proxy (#5627): Introduced stash and pop functionalities for reactive proxies, making state management of local non-collaborative fields easier.
  • Splitting Editor Container into Sub-Editors (#5612): Divided the EditorContainer into multiple sub-editors, improving manageability and modularization.
  • Editor and Presets Package Reorg (#5570): Renamed @blocksuite/editor to @blocksuite/presets to more accurately reflect its function and purpose.
  • Embed Block Helper (#5518): Added an 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)

New Contributors

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.10.0...v0.11.0

blocksuite - v0.10.0 - Almost Beta!

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:

  • For first-party editors based on BlockSuite, their stability is now sufficient for production environment usage, and common functionalities are covered by E2E tests. Notably, about 20% of the BlockSuite codebase are test cases, ensuring a robust and reliable experience. Except for a few edge cases, interactions like selection and shortcuts should mostly align with intuition during typical operations.
  • The architecture of the block-editing framework is now established, with best practices for operation data flow and event stream determined. Some legacy logic will be gradually refactored and removed, such as the _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.
  • Subsequent releases may still feature API breaking changes, but data will continue to be forward compatible.

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:

Framework Refinements

  • Enhanced Documentation (#5263): Added comprehensive API documentation for key packages and updated getting started guides to align with new API designs. The BlockSuite documentation site has also been vastly updated.
  • Page Load Callback Functionality (#5325): The new page.load API distinguishes between creating and loading documents, offering more precise control. Details are provided in the BlockSuite Data Persistence Tutorial.
  • Partial Update Support in Store (#5396): Refactored the store event stream to support incremental updates to nested object structures, removing events that could lead to leakage of underlying Yjs abstractions.
  • Optimized Batch Drag Update Size (#5272): Optimized the batch drag update size to reduce redundant ydoc writes, minimizing the update patch sizes in collaborative edits.
  • Recursive Deletion in deleteBlock (#5224): Modified deleteBlock to allow recursive deletion of child nodes by default, with configurable behavior.
  • Garbage Collection in Blob Manager (#5196): The BlobManager now actively removes unlinked resources, enhancing efficiency in resource management.
  • Configurable Block-Level Config (#5158): Support for dynamic configuration (e.g., maximum file size for attachment block) via service config.

Editor Features

  • Surface Reference Block (#5013): The new affine:surface-ref block enables embedding whiteboard frames or groups into the document mode.
  • Grouping Capability in Edgeless (#5069): Enhanced ability to group edgeless elements, with support for nested groupings.
  • New Style Collapsible Note in Edgeless (#5337): Edgeless now supports note blocks with various shadow, corner, and border styles, including preset effects for visually rich notes.
  • Per-Element Selected Box in Edgeless (#5322): Multi-selection now shows individual selection boxes for each selected element, enhancing clarity in grouped selections.
  • Auto-Connect Indicator and Index Label (#5136): Automatically connects and indexes content visible in document mode, enhancing navigational clarity.
  • New Connector Addition Method (#5161): Introduces a new way to add connectors by dragging with an auto-complete button, along with widgets for easy connector shape selection.
  • Optimized Double Click for Canvas Text Edit in Hollow Shapes (#5043): Enhanced click detection for text-filled shapes, preserving transparency effects for easier selection of elements beneath hollow shapes.
  • Extended Font Support in Canvas Text (#5339): Introduced new preset fonts like Satoshi, Lora, and Bebas Nene, alongside an updated toolbar UI for easier font adjustments.
  • Revamped Text Highlighting (#5434): Enhanced text highlighting now allows setting the text color itself, not just the background color.
  • Expanded Connector Arrow Styles (#5064): Added new connector endpoint styles including Triangle, Circle, and Diamond.
  • Linked Page Creation from Selected Text (#5171): Quickly create and link new pages from selected text using a simple keystroke.
  • Refined Indent Behavior (#5072): Improved indent behavior for maintaining child node hierarchy more intuitively.

Bugfixes

  • fix: new clipboard will auto merge type for empty paragraph @Saul-Mirone (#5124)
  • fix: update test cases links @fourdim (#5142)
  • fix: surface-ref interaction && failed test in AFFiNE @doouding (#5242)
  • fix: aligning lit version @doouding (#5251)
  • fix: allow unbound variable in publish @fourdim (#5266)
  • fix: unset eux for publish.sh @fourdim (#5268)
  • fix: unset eu on nightly version script @fourdim (#5277)
  • fix: failed to format text with color in database @Flrande (#5288)
  • fix: sync PageMeta.title with PageBlockModel.title while importing markdown files @hyf0 (#5297)
  • fix: triple click issue @pengx17 (#5363)
  • fix: delete should happen after copy when cut in new clipboard @Saul-Mirone (#5365)
  • fix: backwards compatible with remote selection @lawvs (#5364)
  • fix: size report workflow @Rachit1313 (#5412)
  • fix: blockUpdated flavour error @regischen (#5435)
  • fix: fix note data compatibility @regischen (#5437)
  • fix: flaky test on image import @fourdim (#5467)
  • fix(database): kanban add button hover animation where :has is not supported @AyushAgrawal-A2 (#5350)
  • fix(database): incorrect tag modal position @mingjuu (#5452)
  • fix(edgeless): improper handler removement @fourdim (#5054)
  • fix(edgeless): fix copyAsPng not work @zqran (#5062)
  • fix(edgeless): register services @regischen (#5071)
  • fix(edgeless): frame to image @doouding (#5073)
  • fix(edgeless): can't click frame in affine @regischen (#5084)
  • fix(edgeless): style frame @regischen (#5074)
  • fix(edgeless): incomplete content export @fourdim (#5093)
  • fix(edgeless): collaborators unable to view images after upload @Flrande (#5098)
  • fix(edgeless): frame ui style @regischen (#5102)
  • fix(edgeless): connector not follow image @regischen (#5099)
  • fix(edgeless): unselect database cell when click blank area @donteatfriedrice (#5104)
  • fix(edgeless): position of dragged shape @lzlme (#5106)
  • fix(edgeless): frame container zindex @regischen (#5110)
  • fix(edgeless): group hotkey and show title at init @regischen (#5121)
  • fix(edgeless): edgeless toolbar submenu tooltip position @donteatfriedrice (#5123)
  • fix(edgeless): label flickering when switching shape style @lawvs (#5125)
  • fix(edgeless): limit initial zoom ratio @donteatfriedrice (#5130)
  • fix(edgeless): keep component toolbar in viewport @donteatfriedrice (#5141)
  • fix(edgeless): should not zoom on pressing enter during editing @regischen (#5173)
  • fix(edgeless): group can't be connected @regischen (#5192)
  • fix(edgeless): shape text init font family should be consistent with shape style @donteatfriedrice (#5207)
  • fix(edgeless): ellipse nearest point and relative point location @regischen (#5182)
  • fix(edgeless): text editor should not have minWidth without adjusting width @donteatfriedrice (#5212)
  • fix(edgeless): export pdf incomplete @EYHN (#5216)
  • fix(edgeless): fix screen ratio not right after presentation @regischen (#5222)
  • fix(edgeless): fix frame not update in collaboration @regischen (#5232)
  • fix(edgeless): optimize shape text color when shape is transparent @donteatfriedrice (#5244)
  • fix(edgeless): group copy & paste @regischen (#5250)
  • fix(edgeless): remove shape overlay when element disconnect @lawvs (#5275)
  • fix(edgeless): auto connect for ref block @regischen (#5233)
  • fix(edgeless): layout shift when switching editor mode @doouding (#5287)
  • fix(edgeless): frames update in navigation @regischen (#5304)
  • fix(edgeless): local xywh update slots @regischen (#5308)
  • fix(edgeless): set default shape style as general type and text font-family as sans-serif @donteatfriedrice (#5314)
  • fix(edgeless): fix group copy as png @regischen (#5320)
  • fix(edgeless): local record issue @doouding (#5311)
  • fix(edgeless): group load order @regischen (#5340)
  • fix(edgeless): reset cursor when the selection changes @lawvs (#5378)
  • fix(edgeless): for group element, apply local record update recursively @AyushAgrawal-A2 (#5393)
  • fix(edgeless): prevent duplicate font faces @Flrande (#5398)
  • fix(edgeless): add font isolation on canvas text @Flrande (#5403)
  • fix(edgeless): remove fractional digits part of font size @Flrande (#5406)
  • fix(edgeless): hand mode in share page @regischen (#5401)
  • fix(edgeless): note component toolbar update @regischen (#5413)
  • fix(edgeless): duplicated remote cursor @doouding (#5410)
  • fix(edgeless): change navigator icon @regischen (#5414)
  • fix(edgeless): toolbar right-side clipping position @alpakaka0o0 (#5453)
  • fix(edgeless): undo not work for note style change @regischen (#5473)
  • fix(page): incorrect cursor position when click slowly @lawvs (#5045)
  • fix(page): enter key should as expected after setting heading by shortkey @lzlme (#5002)
  • fix(page): user should be able to expand toggle list in readonly mode @lawvs (#5066)
  • fix(page): copy multiple times in list when no text selection @fourdim (#5114)
  • fix(page): getPreviousBlock not works as expected when there are several notes @Flrande (#5131)
  • fix(page): lang list in code block covered by database @lawvs (#5148)
  • fix(page): format bar styling and simplify button property @lawvs (#5160)
  • fix(page): failed to insert image as a child of other content block @Flrande (#5163)
  • fix(page): questionmark with IME should not trigger slash menu @lawvs (#5213)
  • fix(page): sometimes page tags disappear @zzj3720 (#5215)
  • fix(page): mock selection of multiline text on create/edit link @AyushAgrawal-A2 (#5241)
  • fix(page): multiple link elements when part of selection has attributes @AyushAgrawal-A2 (#5245)
  • fix(page): keep content after converted to code block @Flrande (#5257)
  • fix(page): fix missing pink background @fourdim (#5270)
  • fix(page): markdown to quote block @donteatfriedrice (#5279)
  • fix(page): unexpected placeholder @zqran (#5295)
  • fix(page): arrow up/down navigation @AyushAgrawal-A2 (#5282)
  • fix(page): unexpected scroll in long text @Flrande (#5301)
  • fix(page): unable to open link page entry from slash menu @Flrande (#5310)
  • fix(page): optimize default dropdown placement @doodlewind (#5331)
  • fix(page): stale number list index state @zqran (#5326)
  • fix(page): shift + arrow text selection @AyushAgrawal-A2 (#5315)
  • fix(page): arrow up/down navigation in code block @AyushAgrawal-A2 (#5341)
  • fix(page): delay when inserting attachments via dnd @lawvs (#5332)
  • fix(page): support setting index of ordered list @AliceLanniste (#5349)
  • fix(page): paste not work when trying to create a link in edgeless @zqran (#5355)
  • fix(page): tweak attachment styles @lawvs (#5357)
  • fix(page): link popup unexpectedly disappear when hovering from bottom @zqran (#5369)
  • fix(page): divider selection and deletion @AyushAgrawal-A2 (#5368)
  • fix(page): incorrect cursor position on pasting text @AyushAgrawal-A2 (#5382)
  • fix(page): console error on deleting at the start of first paragraph @AyushAgrawal-A2 (#5391)
  • fix(page): prevent scrolling to bottom of page when clicking on sides of document @zqran (#5405)
  • fix(page): autoIdentityLink behavior @AyushAgrawal-A2 (#5370)
  • fix(page): disable database action in readonly @lawvs (#5416)
  • fix(page): attachment download @AyushAgrawal-A2 (#5426)
  • fix(page): extra space between dot and ordinals @AliceLanniste (#5409)
  • fix(page): make sure closest note inside same editor page when there are multiple editors @donteatfriedrice (#5438)
  • fix(std): should not re-execute previous commands in the chain before try @Flrande (#5278)
  • fix(std): commands in tryAll should share same context @Flrande (#5293)
  • fix(store): add fallbacks for checking assets mime type @fourdim (#5164)
  • fix(store): missing newline when there are images involved @fourdim (#5247)
  • fix(store): deleteBlock should delete children recursively by default @Flrande (#5224)
  • fix(store): revert gc @Flrande (#5344)
  • fix(store): block should add default value to props if not exist @Saul-Mirone (#5470)

New Contributors

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.9.0...v0.10.0

blocksuite - v0.9.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.

Editor Infrastructure

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.
  • The new 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.
  • The new 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).
  • The Virgo-based 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).
  • Existing workspace methods have been segregated based on the addon concept (#4492).

Edgeless Editing Features

  • Direct insertion of image blocks at the top level of surface blocks without the need for encapsulation within note blocks is now supported (#4894).
  • Frame blocks can be inserted at the surface block top level, serving as a substitute for the previous frame element (#4711).
  • Elements can now be connected using curved connectors (#4516).
  • A new note can be swiftly created on a selected note (#4881).
  • Multi-selection alignment of elements is now available (#4456).
  • Transitioned to a transformer-based clipboard (#5023).

Document Editing Features

  • Display of YouTube-style embed bookmark block types is now available (#4523).
  • Popups featuring secure triangle areas and transitions have been introduced (#4965 #4958).

Database Editing Features

  • Group view is now supported (#4727).
  • A new filter-usable UI has been introduced (#4339).
  • There's support for an independent preview modal (#4628).

Other Notable Updates

  • Rendering performance for edgeless has been optimized (#4746 #4939).
  • The original phasor package has been integrated into the edgeless editor (#4518).

Detailed Bug Fixes

  • fix: remove block by slash menu should remove children @lawvs (#4465)
  • fix: some text is missing when exporting to png @zuoxiaodong0815 (#4477)
  • fix: format bar flash @lawvs (#4490)
  • fix: icon button active styles @lawvs (#4496)
  • fix: try add new block first when transform block @lawvs (#4505)
  • fix: native wrapper @Saul-Mirone (#4510)
  • fix: playground migration @Saul-Mirone (#4513)
  • fix: surface data should be shallow y map @Saul-Mirone (#4519)
  • fix: attachment extension parsing error @lawvs (#4536)
  • fix: hide format bar when non text block selected @lawvs (#4539)
  • fix: update import path in tests @fourdim (#4548)
  • fix: lost content with duplicate note action in edgeless @zuoxiaodong0815 (#4552)
  • fix: keymap should only be triggered without composition @Saul-Mirone (#4554)
  • fix: cursor after undo of a block markdown convert should after space @Saul-Mirone (#4555)
  • fix: global select all behavior @Saul-Mirone (#4557)
  • fix: error button color @lawvs (#4574)
  • fix: import notion embed block @zuoxiaodong0815 (#4514)
  • fix: import notion embed block @zuoxiaodong0815 (#4587)
  • fix: database selection is not registered in edgeless mode @Flrande (#4598)
  • fix: consistent font family variable @lzlme (#4606)
  • fix: revoke object url after export @Saul-Mirone (#4647)
  • fix: image filename in card view @adityash1 (#4583)
  • fix: release only generated files @himself65 (#4654)
  • fix: flaky edgeless test @Saul-Mirone (#4662)
  • fix: copy image in image selection @lawvs (#4669)
  • fix: read-only ux @doouding (#4635)
  • fix: container keymap vrange can be null @Saul-Mirone (#4679)
  • fix: add selection test for markdown inline @Flrande (#4688)
  • fix: playground edgeless bug @regischen (#4718)
  • fix: hide toolbar on read-only mode @lawvs (#4719)
  • fix: auto scroll into view @Flrande (#4715)
  • fix: modal-widget style @doouding (#4713)
  • fix: edgeless slide menu horizontal scroll @lzlme (#4733)
  • fix: playground error log @lawvs (#4760)
  • fix: remove unused padding @himself65 (#4766)
  • fix: each image should be resizable @donteatfriedrice (#4767)
  • fix: input element not works in edgeless mode @Flrande (#4790)
  • fix: error when drag image @lawvs (#4791)
  • fix: add page bottom drop area for block hub @zqran (#4789)
  • fix: wrong behavior in option + delete @Flrande (#4804)
  • fix: v-range incorrect when select child block @Flrande (#4822)
  • fix: database cell wrong id after import from snapshot @Saul-Mirone (#4828)
  • fix: doc remote selection should be updated when resize @Flrande (#4833)
  • fix: image flashing when resizing in edgeless @lawvs (#4849)
  • fix: change portal z-index @WBbug (#4882)
  • fix: update attachment after theme change @lawvs (#4889)
  • fix: disable prettier for ledit template @doouding (#4891)
  • fix: fix errors in next.js @yunnian (#4709)
  • fix: asyncGetRichTextByModel may fail @Flrande (#4885)
  • fix: improve embed related style @Flrande (#4909)
  • fix: block hub z-index @lzlme (#4934)
  • fix: useless update data sent when new client joining @Flrande (#4995)
  • fix: improve bracket auto complete @lzlme (#4997)
  • fix: unexpected bridge display @lawvs (#5044)
  • fix: edgeless font family @lzlme (#5049)
  • fix: fix and refactor page-level migration associated with surface block @Flrande (#5050)
  • fix(database): database can not scroll in edgeless mode @zzj3720 (#4599)
  • fix(database): some database drags trigger doc selection @zzj3720 (#4740)
  • fix(database): case sensitive for menu labels @zzj3720 (#4744)
  • fix(database): structuredClone unable to clone Proxy @zzj3720 (#4756)
  • fix(database): moving to ungrouped logic is wrong when group by multi-select @zzj3720 (#4776)
  • fix(database): replace selected text content when pasting @zqran (#4817)
  • fix(database): dragging from the menu to modal mask should not close the menu @zzj3720 (#4855)
  • fix(database): can not edit in detail panel @Flrande (#4856)
  • fix(database): don't use variables outside of class @Flrande (#4862)
  • fix(database): detail panel close button covered by the top bar @zzj3720 (#4876)
  • fix(database): wrong behavior when paste empty string to select column @zzj3720 (#4900)
  • fix(database): drag preview style wrong @zzj3720 (#4902)
  • fix(database): menu input triggers 1password @zzj3720 (#4910)
  • fix(database): drag-handle of column blink when mouse enter right @CatsJuice (#4920)
  • fix(database): zoom bug, date format bug and can't open detail panel in edgeless mode @zzj3720 (#5038)
  • fix(edgeless): fix connector xywh updates @regischen (#4462)
  • fix(edgeless): make tooltip with shortcut conform to design @CatsJuice (#4484)
  • fix(edgeless): round the triangle of tooltip @CatsJuice (#4481)
  • fix(edgeless): fix frame related bugs @regischen (#4491)
  • fix(edgeless): align connector component toolbar ui with design @donteatfriedrice (#4493)
  • fix(edgeless): fix elbow connector path @regischen (#4520)
  • fix(edgeless): fix connector migration @regischen (#4528)
  • fix(edgeless): lost content with duplicate note action in edgeless #4521 @BangKk (#4529)
  • fix(edgeless): canvas text editor rotation @LittleSound (#4556)
  • fix(edgeless): slicer should be put into affine-edgeless-layer @doouding (#4581)
  • fix(edgeless): edgeless toolbar left part icon activation state @donteatfriedrice (#4600)
  • fix(edgeless): press backspace should not delete text or shape element when changing text font size @donteatfriedrice (#4704)
  • fix(edgeless): set borderRadius when select single note @WBbug (#4714)
  • fix(edgeless): isolate the impact of widgets on the layout @doouding (#4738)
  • fix(edgeless): toolbar z-index @doouding (#4749)
  • fix(edgeless): double click to add text should use color last selected @donteatfriedrice (#4780)
  • fix(edgeless): duplicate remote selection @doouding (#4803)
  • fix(edgeless): note does not update when other peers modified note @doouding (#4808)
  • fix(edgeless): fix alt drag test @regischen (#4814)
  • fix(edgeless): optimize connector enter tangent @regischen (#4908)
  • fix(edgeless): unexpected text resize behaviour @doouding (#4912)
  • fix(edgeless): close zoom bar when click blank area @donteatfriedrice (#4929)
  • fix(edgeless): fix frame add bug @regischen (#5016)
  • fix(edgeless): remote selection mispositioning @doouding (#5028)
  • fix(edgeless): content shifts when mounting shape text editor @donteatfriedrice (#5029)
  • fix(edgeless): viewport move when pen @regischen (#5037)
  • fix(edgeless): fix frame title when inputting Chinese use Enter key @luke358 (#5048)
  • fix(page): remove children when selecting list and delete @lawvs (#4457)
  • fix(page): disable action in image when readonly @lawvs (#4458)
  • fix(page): hide drag handle when viewport element resize @donteatfriedrice (#4466)
  • fix(page): incorrect top position when in and out drag handle quickly @donteatfriedrice (#4502)
  • fix(page): viewport jilter when drag to left-bottom and cannot insert to page bottom from block-hub @donteatfriedrice (#4509)
  • fix(page): keyboard move block @lzlme (#4467)
  • fix(page): potential prototype-polluting assignment in cells @fourdim (#4562)
  • fix(page): dragging area should not select parent and children at the same time @donteatfriedrice (#4572)
  • fix(page): optimize dragging area to select blocks @donteatfriedrice (#4582)
  • fix(page): drag handle's animation is strange when multi-selected @CatsJuice (#4566)
  • fix(page): drag handle blinks when selecting text @donteatfriedrice (#4601)
  • fix(page): frame lost during automatic scrolling @donteatfriedrice (#4673)
  • fix(page): copy and paste issues #4545 #4619 #4620 @BangKk (#4633)
  • fix(page): autoscroll should activate when adding blank lines or bloc… @water-in-stone (#4693)
  • fix(page): should consider container offset when updating drop indicator @donteatfriedrice (#4754)
  • fix(page): add tail paragraph for blocks with rich text @zqran (#4788)
  • fix(page): remove redundant entry in image popup @lawvs (#4783)
  • fix(page): prevent dragging the block hub when exceeding the note area @zqran (#4806)
  • fix(page): cannot find model by element when moving paragraph with AffineReference @donteatfriedrice (#4831)
  • fix(page): ArrowUp in the edge of two lines @Flrande (#4836)
  • fix(page): lang select panel too short @lawvs (#4878)
  • fix(page): should not delete children when parent following custom blocks @donteatfriedrice (#4906)
  • fix(page): keeping list toggle state @lawvs (#4865)
  • fix(page): don't trigger enter actions when using IME @Flrande (#4911)
  • fix(page): unexpected behaviour when sync range and text selection @Flrande (#4915)
  • fix(page): display of toggle icon of list-block @zqran (#4913)
  • fix(page): delete nested item in the middle should not change the hierarchy of its siblings below @Flrande (#4933)
  • fix(page): updated color of the "+ Add" @RajeevDash007 (#4942)
  • fix(page): inconsistent behavior when hard enter in the end of line @Flrande (#4953)
  • fix(page): should not display bookmark button in link popup when it not supports @Flrande (#4954)
  • fix(page): surface element break path calculate in page mode @Flrande (#4948)
  • fix(page): inline format should be extended when range is not collapsed @Flrande (#4964)
  • fix(page): add enableMarkdownShortcut and enableFormat in rich-text @Flrande (#4966)
  • fix(page): clipboard selection missing @Saul-Mirone (#4973)
  • fix(page): stop propagation on pasting to the title editor @fourdim (#4975)
  • fix(page): press Backspace in the start of first line @Flrande (#4985)
  • fix(page): performance issue from v-range-provider @Flrande (#5004)
  • fix(page): unexpected hover style on slash menu @lawvs (#5015)
  • fix(page): remote-selection make other users can not select text by mouse click @Flrande (#5019)
  • fix(page): failed to delete text spanning three levels @Flrande (#5022)
  • fix(virgo): add vRangeUpdatedSlot in v-range provider @Flrande (#4812)

New Contributors

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.8.0...v0.9.0

blocksuite - v0.8.0

Published by doodlewind about 1 year ago

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 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:

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.

  1. The blocks can subscribe to the changes of the selection models and render them as what they want.
  2. Every time users select something else on the page, the selection model will be updated first.
  3. 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 in localhost:5173/starter/.
  • The circular dependencies in the project has been fully cleared (4214).

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 @Saul-Mirone (#3722)
  • fix(blocks): html clipboard data containing code element should be parsed as html @youhua (#3561)
  • fix(database): title column cannot trigger row selection @zqran (#3769)
  • fix(database): title columns selection wrong @zzj3720 (#3778)
  • fix(database): can not enter editing mode after reconnect component @zzj3720 (#3857)
  • fix(database): cannot find view when closing select popup @zqran (#3864)
  • fix(database): wrong selection height when editing @zqran (#3892)
  • fix(database): donot throw error when no cell is selected @zqran (#3929)
  • fix(database): dragging from outside cannot select database block @zqran (#3938)
  • fix(database): rich-text error when importing snapshot @zqran (#3992)
  • fix(database): kanban card dragging preview position wrong after page scrolling @zzj3720 (#4016)
  • fix(database): detail panel selection not work @zzj3720 (#4017)
  • fix(database): delete view error @zzj3720 (#4030)
  • fix(database): block selected style @zzj3720 (#4035)
  • fix(database): some database UI issues @zzj3720 (#4041)
  • fix(database): delete view button not work @zzj3720 (#4051)
  • fix(database): New Record UI @zqran (#4067)
  • fix(database): wrong scroll behavior when add new column @zzj3720 (#4106)
  • fix(database): IME input overlaps with database title placeholder @zzj3720 (#4107)
  • fix(database): execute the browser default behavior when the title column is copied or pasted @zqran (#4109)
  • fix(database): new record style @doodlewind (#4112)
  • fix(database): typo in popup @doodlewind (#4148)
  • fix(database): adjust icon style of the title cell @zzj3720 (#4199)
  • fix(database): ui issues when editing database row properties @zqran (#4208)
  • fix(database): auto identify reference @fourdim (#4210)
  • fix(database): table view data structure @zzj3720 (#4212)
  • fix(database): preserve column order when copying @zqran (#4240)
  • fix(database): backspace deletes the contents outside the block @zzj3720 (#4242)
  • fix(database): selection styles are not updated in a timely manner @zzj3720 (#4241)
  • fix(database): title column should not be able to change column type @zzj3720 (#4243)
  • fix(database): vscode lit plugin typecheck error @zzj3720 (#4252)
  • fix(database): style of convert into database modal @zzj3720 (#4290)
  • fix(database): link text overflow @zzj3720 (#4306)
  • fix(database): virgo is not unmounted when disconnecting component of title cell and rich-text cell @zzj3720 (#4277)
  • fix(database): exit the editing state when copying @zqran (#4322)
  • fix(database): transform page link in title cell @zzj3720 (#4353)
  • fix(edgeless): the newly created block should retain its formatting @doouding (#3599)
  • fix(edgeless): correctly display shape resizing cursor @Yukiniro (#3657)
  • fix(edgeless): resize incorrectly after rotating multiple shapes @zhengjitf (#3665)
  • fix(edgeless): add checking when transforming to canvas @zuoxiaodong0815 (#3690)
  • fix(edgeless): fix incorrect selected rects for multi-selection @Yukiniro (#3698)
  • fix(edgeless): fix test 'frame' -> 'note' @regischen (#3711)
  • fix(edgeless): ensure presence of note block @doouding (#3736)
  • fix(edgeless): undo not work after resizing note block width @zhengjitf (#3754)
  • fix(edgeless): default entry playground should use multi-user compatible generator @doouding (#3776)
  • fix(edgeless): fix incorrect note size @Yukiniro (#3805)
  • fix(edgeless): frame title blur unmount @regischen (#3812)
  • fix(edgeless): fix alt drag element not work @regischen (#3819)
  • fix(edgeless): rotate text incorrectly after resizing @zhengjitf (#3784)
  • fix(edgeless): tweak toolbar ui @DiamondThree (#3863)
  • fix(edgeless): add some missing key binding @Flrande (#3888)
  • fix(edgeless): fix wrong connector handle position @regischen (#3937)
  • fix(edgeless): fix toolbar style @regischen (#3979)
  • fix(edgeless): note index doesn't move with viewport @tomoyukiy (#3982)
  • fix(edgeless): presentation ui @regischen (#4027)
  • fix(edgeless): toc style & affine intergration support @doouding (#3987)
  • fix(edgeless): after delete auto complete overlay still exists @regischen (#4064)
  • fix(edgeless): fix wrong drag auto complete connector position @regischen (#4066)
  • fix(edgeless): fix presentation tooltip @regischen (#4091)
  • fix(edgeless): fix short cut adding frame when editing @regischen (#4097)
  • fix(edgeless): should make sure drag handle is not null @donteatfriedrice (#4133)
  • fix(edgeless): content shifts when move window to different screen @doouding (#4099)
  • fix(edgeless): align shape component toolbar with UI design @donteatfriedrice (#4139)
  • fix(edgeless): remote selection does not follow new position @doouding (#4155)
  • fix(edgeless): fix cononector not show after refresh on playground @regischen (#4175)
  • fix(edgeless): fix auto complete text inheritance @regischen (#4177)
  • fix(edgeless): make note submenu consistent with other submenu @donteatfriedrice (#4194)
  • fix(edgeless): use correct icon @regischen (#4226)
  • fix(edgeless): fix font @regischen (#4229)
  • fix(edgeless): slicer position @doouding (#4220)
  • fix(edgeless): _edgelessLayerWillChange should be decorated with @state @doouding (#4224)
  • fix(edgeless): image jitters on resizing in edgeless mode @zhengjitf (#4014)
  • fix(edgeless): toc reordering bug && custom padding support @doouding (#4232)
  • fix(edgeless): height of note collapse @doouding (#4244)
  • fix(edgeless): failed to execute 'exitFullscreen' on 'Document' @dengquan (#4259)
  • fix(edgeless): toast message when trying to use the presentation feat… @regischen (#4270)
  • fix(edgeless): fix a bug where the _shiftKey field wasn't being update correctly @regischen (#4272)
  • fix(edgeless): fix typo in EdgelessToolbar tooltip on presentation button @regischen (#4275)
  • fix(edgeless): canvas text layout shifts when panning to viewport edge @LittleSound (#4281)
  • fix(edgeless): add condition to prevent moving elements when in editng mode @regischen (#4303)
  • fix(edgeless): fix connector stroke color assignment @regischen (#4310)
  • fix(edgeless): rebuild connector path and relation after paste or undo operation @doouding (#4320)
  • fix(edgeless): refactor yContainer events handling for SurfaceManager @regischen (#4324)
  • fix(edgeless): correctly display hover style on moving with arrow key @luke358 (#4330)
  • fix(edgeless): change icon @regischen (#4341)
  • fix(edgeless): image menu state on canvas text editing @BangKk (#4346)
  • fix(edgeless): refactor change note button and component toolbar @regischen (#4349)
  • fix(edgeless): fix edgeless page block component and add zoom clamping @regischen (#4350)
  • fix(edgeless): style update hover effects in EdgelessAutoComplete @regischen (#4359)
  • fix(edgeless): typo in component naming @lawvs (#4362)
  • fix(edgeless): edgeless selection update error after undo @doouding (#4363)
  • fix(edgeless): draw rectangle should not with radius @donteatfriedrice (#4367)
  • fix(edgeless): note slicer ux/ui problem @doouding (#4411)
  • fix(edgeless): note overlay should show border and text color correctly @donteatfriedrice (#4414)
  • fix(edgeless): hide overlay when pointer move on toolbar @donteatfriedrice (#4416)
  • fix(page): possible redos on mime type @fourdim (#3593)
  • fix(page): fix the typo and the branch logic @fourdim (#3603)
  • fix(page): paste in image caption @youhua (#3617)
  • fix(page): keep the figcaption when pasting @youhua (#3621)
  • fix(page): fix copy and paste on parent blocks @fourdim (#3610)
  • fix(page): missing space and new line in the code block pasting @fourdim (#3623)
  • fix(page): insert block to page and select it make page not scroll properly @zhengjitf (#3660)
  • fix(page): maintain the children block structure when pasting @fourdim (#3679)
  • fix(page): cursor & selection after pasting image @youhua (#3655)
  • fix(page): paste using the code block option @fourdim (#3712)
  • fix(page): clear selection state in exported PDF @zuoxiaodong0815 (#3732)
  • fix(page): add selection indicator for embed block @lawvs (#3741)
  • fix(page): getSelectedBlocks not work in one block @Flrande (#3761)
  • fix(page): image selection spacing @lawvs (#3765)
  • fix(page): code block lang will lost on paste @zhengjitf (#3773)
  • fix(page): remove the newline charactor when importing from markdown @fourdim (#3785)
  • fix(page): code wrap issue on plain text @fourdim (#3796)
  • fix(page): update search icon style @DiamondThree (#3814)
  • fix(page): disabled button not work @lawvs (#3831)
  • fix(page): click on block should focus on text @donteatfriedrice (#3834)
  • fix(page): import dialog style @DiamondThree (#3835)
  • fix(page): importing notion db to version 3 database block @fourdim (#3848)
  • fix(page): base code font size @fourdim (#3890)
  • fix(page): drag handle incorrect position @donteatfriedrice (#3899)
  • fix(page): enable and fix some tests @Flrande (#3897)
  • fix(page): format bar render error when switch to other page @Flrande (#3909)
  • fix(page): database-convert can not be closed @Flrande (#3914)
  • fix(page): reduce the validation strength of pointToRange @Flrande (#3927)
  • fix(page): style under edit mode and exported HTML are different… @water-in-stone (#3893)
  • fix(page): should autoscroll when drag blocks @donteatfriedrice (#3928)
  • fix(page): format-bar should be automatically updated in edgeless mode @Flrande (#3970)
  • fix(page): list convert using format-bar @Flrande (#4011)
  • fix(page): drag handle is off-screen for database @donteatfriedrice (#4082)
  • fix(page): add fallback to bookmark icon and image @QiShaoXuan (#4081)
  • fix(page): text background not work in block selection @Flrande (#4118)
  • fix(page): range should not be changed by remote-selection @Flrande (#4126)
  • fix(page): incorrect drag handle position with list @donteatfriedrice (#4153)
  • fix(page): error using drag handle over database @donteatfriedrice (#4178)
  • fix(page): remove border of image @doouding (#4176)
  • fix(page): strict check when identity link @lawvs (#4202)
  • fix(page): click at blank area should not change note sequence @donteatfriedrice (#4261)
  • fix(page): updated UI of tooltips @RajeevDash007 (#4209)
  • fix(page): added delete-item hover color @RajeevDash007 (#4299)
  • fix(page): right click may trigger native selection @Saul-Mirone (#4336)
  • fix(page): keep status between converted images and attachments @LittleSound (#4282)
  • fix(page): image format bar overlaps import modal @RajeevDash007 (#4260)
  • fix(page): remove portal when reference element removed @lawvs (#4368)
  • fix(page): update popover styles @lawvs (#4375)
  • fix(page): icon color @lawvs (#4406)
  • fix(phasor): text element rendered not as expected when changed align @Flrande (#3632)
  • fix(phasor): fix typo in surface @WBbug (#4300)
  • fix(playground): undefined function indexedDB.databases in firefox @fourdim (#3738)
  • fix(playground): add Intl.Segmenter polyfill for starter @fourdim (#3813)
  • fix(playground): make edgeless menu ease of use @fourdim (#3825)
  • fix(playground): custom navigation panel layer index @doodlewind (#4117)
  • fix(store): add origin when setPageMeta @himself65 (#3640)
  • fix(store): issue on removing non-loaded page @pengx17 (#3672)
  • fix(store): paste image twice @fourdim (#3739)
  • fix(store): force cast blocks to YMap @himself65 (#4296)
  • fix(store): should not use get method on doc @Saul-Mirone (#4412)
  • fix(virgo): unexpected range when press arrow in the edge of embed @Flrande (#3636)
  • fix(virgo): editor break because of embed and ime @Flrande (#3651)
  • fix(virgo): fix the style map which is not applied to span element but the parent v-text @fourdim (#3787)
  • fix(virgo): code font size in headings @fourdim (#3877)

New Contributors

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.7.0...v0.8.0

blocksuite - v0.7.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:

  • 📑 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 (sorted by commit type):

  • 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/PDF in playground @zuoxiaodong0815 (#3205)
  • fix: the incorrect import path @fourdim (#3234)
  • fix: image resize after switch page mode @lawvs (#3238)
  • fix: remove generic in js @lawvs (#3239)
  • fix: bookmark toolbar hidden by the frame in edgeless mode @QiShaoXuan (#3267)
  • fix: drag handle indicator z index @himself65 (#3270)
  • fix: bookmark block z index @himself65 (#3272)
  • fix: typo @lzlme (#3274)
  • fix: prepend "https" if url without protocol when bookmark click to open @QiShaoXuan (#3277)
  • fix: missing title when exporting markdown @zuoxiaodong0815 (#3273)
  • fix: link confirm should change color when link legal @lawvs (#3276)
  • fix: missing blob mime types in IndexedDB @fourdim (#3280)
  • fix: notion import error on bookmark @fourdim (#3302)
  • fix: show widgets in edgeless @lawvs (#3307)
  • fix: dark mode export PNG is not consistent with dark mode appearance and hard to read @zuoxiaodong0815 (#3298)
  • fix: edgeless toolbar overflow @donteatfriedrice (#3309)
  • fix: page tag ui styling @zqran (#3317)
  • fix: ignore import blobId for non http url @himself65 (#3325)
  • fix: switch to popover z index variable @lawvs (#3328)
  • fix: console error when copying as image @fundon (#3331)
  • fix: can not insert bookmark in correct position from block hub @QiShaoXuan (#3333)
  • fix: todo block display error after importing notion @zuoxiaodong0815 (#3322)
  • fix: backlink jump does not work @zzj3720 (#3342)
  • fix: toast unstable @lawvs (#3349)
  • fix: text before the link incorrectly automatically recognized as part of the link @QiShaoXuan (#3357)
  • fix: cursor jump when pasting text @Flrande (#3361)
  • fix: hide turn card btn when the link inside database @lawvs (#3397)
  • fix: can not paste url to create bookmark @QiShaoXuan (#3399)
  • fix: multiple database block selection conflict @zzj3720 (#3414)
  • fix: after exporting bookmark, the image is empty @zuoxiaodong0815 (#3417)
  • fix: adaptation vertical edgeless-zoom-toolbar @Yukiniro (#3431)
  • fix: default language option unmatched @AliceLanniste (#3419)
  • fix: display current lang first @lawvs (#3442)
  • fix: incorrect highlight for page info and bookmark after exporting @zuoxiaodong0815 (#3443)
  • fix: circular import @himself65 (#3451)
  • fix: paste multi lines in windows @fourdim (#3455)
  • fix: remove windows html format clipboard fragment @fourdim (#3458)
  • fix: code block lagging @lawvs (#3462)
  • fix: brush icon color should be consistent with selected color @donteatfriedrice (#3464)
  • fix: format bar break caretRangeFromPoint @lawvs (#3479)
  • fix: lang list z-index in code block @lawvs (#3484)
  • fix: redundant editing button on the exported file @zuoxiaodong0815 (#3478)
  • fix: style error casused by prettier formatting @QiShaoXuan (#3493)
  • fix: cursor position on changing block types @smallnine9 (#3158)
  • fix: copy as png @zuoxiaodong0815 (#3502)
  • fix: fail to inteligent identify link string @QiShaoXuan (#3519)
  • fix: add default image proxy url @zuoxiaodong0815 (#3523)
  • fix: don't forcefully change list type @smallnine9 (#3526)
  • fix: simple editor error on Hub/Content must have parent @fourdim (#3531)
  • fix: inaccurate markdown convert patterns @zhengjitf (#3530)
  • fix: copy as PNG paste location is impacted by zoom @donteatfriedrice (#3534)
  • fix: bookmark modal style error @QiShaoXuan (#3548)
  • fix: the image in the page mode can not be copied and downloaded @zuoxiaodong0815 (#3555)
  • fix: file type @himself65 (#3562)
  • fix: filter connectors when rotating with multiselect @Yukiniro (#3557)
  • fix: register database in simple affine editor @joshirakesh (#3563)
  • fix: the image in the page mode can not be copied and downloaded @zuoxiaodong0815 (#3575)
  • fix: incorrect icon color in dark mode @JimmFly (#3580)
  • fix: ad-hoc the process key with ime @lawvs (#3582)
  • fix(block-hub): delete redundant DragIndicator @fundon (#3105)
  • fix(block-std): use the host as keyboard control root @lawvs (#3297)
  • fix(database): dragging to the number column cannot trigger row selecion @zqran (#3077)
  • fix(database): select option icon color @zqran (#3096)
  • fix(database): wrong "+ new record" button position @zqran (#3100)
  • fix(database): accidentally triggered row selection @zqran (#3129)
  • fix(database): scrollbar is missing @zzj3720 (#3265)
  • fix(database): save data when number column is out of focus @zqran (#3260)
  • fix(database): width adjust preview has wrong position @zzj3720 (#3321)
  • fix(database): prevent tag from being selected when compsing @zqran (#3336)
  • fix(database): hotkeys do not work @zzj3720 (#3356)
  • fix(database): normalize url of link column @zqran (#3373)
  • fix(database): enter row level selection on click drag handle @zqran (#3363)
  • fix(database): search is too strict @zzj3720 (#3522)
  • fix(database): selection will flash when selecting text in title column @zzj3720 (#3524)
  • fix(database): unable to blur from cell of title column @zzj3720 (#3528)
  • fix(database): incomplete display of the color list @zzj3720 (#3527)
  • fix(database): support pasting code block content @zqran (#3535)
  • fix(edgeless): fix intersects method @regischen (#3023)
  • fix(edgeless): correct the connecotor's handle behavior @blurname (#3030)
  • fix(edgeless): fix delete and select-all when active @regischen (#3027)
  • fix(edgeless): fit to screen not working @regischen (#3070)
  • fix(edgeless): connectors cannot be activated using letter shortcuts @donteatfriedrice (#3099)
  • fix(edgeless): click not remove database @regischen (#3116)
  • fix(edgeless): add a new note if all notes are hidden @Flrande (#3215)
  • fix(edgeless): note toolbar position @Flrande (#3241)
  • fix(edgeless): note index should only appear when selecting a note @Flrande (#3248)
  • fix(edgeless): make cursor visible in empty text @Flrande (#3259)
  • fix(edgeless): click in page mode will add a new note automatically when no visible note @Flrande (#3263)
  • fix(edgeless): edgeless toolbar position not updated when viewport changed @Flrande (#3296)
  • fix(edgeless): update toolbar position when selected rect updated @Flrande (#3308)
  • fix(edgeless): optimize elbow connector path structure @regischen (#3285)
  • fix(edgeless): the selected rect follow snap @regischen (#3312)
  • fix(edgeless): fix connector paste bugs @regischen (#3313)
  • fix(edgeless): adjust note toolbar width @Flrande (#3341)
  • fix(edgeless): multi-selection of shape elements @doouding (#3358)
  • fix(edgeless): dragging a block from the middle of a note should not separate t… @doouding (#3360)
  • fix(edgeless): note overlay padding issue @donteatfriedrice (#3380)
  • fix(edgeless): add z-index in canvas text editor @Flrande (#3386)
  • fix(edgeless): edgeless toolbar note-menu rounded border @donteatfriedrice (#3388)
  • fix(edgeless): fix incorrect connector color state @regischen (#3390)
  • fix(edgeless): optimize note toolbar ui styling @Flrande (#3387)
  • fix(edgeless): reset selected blocks after clipping note @doouding (#3396)
  • fix(edgeless): fix incorrect connector handle position on zooming @regischen (#3403)
  • fix(edgeless): note menu scroll too fast @donteatfriedrice (#3410)
  • fix(edgeless): cursor when resizing @fundon (#3411)
  • fix(edgeless): lower the note height updating threshold @doouding (#3412)
  • fix(edgeless): add size limit for grid gap @Yukiniro (#3425)
  • fix(edgeless): connector toolbar stroke border @regischen (#3441)
  • fix(edgeless): unexpected history record added when updating note height @doouding (#3424)
  • fix(edgeless): missing images when copying as png @fundon (#3450)
  • fix(edgeless): incorrect overlay position on panning edgeless viewport @donteatfriedrice (#3422)
  • fix(edgeless): scissors z-index bug after bump into AFFiNE @doouding (#3460)
  • fix(edgeless): change image caption background to transparent @donteatfriedrice (#3475)
  • fix(edgeless): change shape stroke style to none does not work @donteatfriedrice (#3474)
  • fix(edgeless): convert surface element to Y data structure only on first level @doouding (#3480)
  • fix(edgeless): copy-as-png at different zoom levels @fundon (#3494)
  • fix(edgeless): inserted image size should be consistent in different viewport zoom level @donteatfriedrice (#3500)
  • fix(edgeless): connector tooltips inconsistency @donteatfriedrice (#3517)
  • fix(edgeless): text align in canvas text @Flrande (#3521)
  • fix(edgeless): z-index of shape text editor @Flrande (#3554)
  • fix(edgeless): text rect should be updated after changed font @Flrande (#3573)
  • fix(editor): unable to insert blocks in new page @donteatfriedrice (#3020)
  • fix(phasor): bound should be calculated using expand @fundon (#3220)
  • fix(phasor): curveFitting should be enabled on ellipse @fundon (#3224)
  • fix(phasor): align the text rendered on the canvas with the text in the DOM @Flrande (#3552)
  • fix(playground): press cmd+z loss content when first time enter playground @donteatfriedrice (#3017)
  • fix(store): ytext in a ymap throws error when cloned by proxy @Saul-Mirone (#3062)
  • fix(store): waitForLoaded timeout if doc loaded @Saul-Mirone (#3176)
  • fix(store): provider awareness @himself65 (#3186)
  • fix(store): broadcast channel @himself65 (#3200)
  • fix(store): workspace search @himself65 (#3201)
  • fix(store): enable database by default @himself65 (#3219)
  • fix(store): bring back remove page for subdoc @Saul-Mirone (#3221)
  • fix(store): broadcast channel not defined @himself65 (#3222)
  • fix(store): snapshot import and export @Saul-Mirone (#3223)
  • fix(store): handle resource load error when importing snapshot @Saul-Mirone (#3227)
  • fix(virgo): handle the deletion of selected text @Flrande (#3155)
  • refactor: replace @popperjs/core with @floating-ui/dom @zqran (#3021)
  • refactor: move font @import to playground @Flrande (#3026)
  • refactor: clean selection state @lawvs (#3080)
  • refactor: decouple cell render from model @zzj3720 (#3086)
  • refactor: move image options inside image block @lawvs (#3111)
  • refactor: use transform instead of position on selected-blocks @fundon (#3166)
  • refactor: refact toast @lawvs (#3183)
  • refactor: switch to block level image selection @lawvs (#3178)
  • refactor: remove focused from BlockElement @lawvs (#3214)
  • refactor: migrate image resize manager to block level @lawvs (#3218)
  • refactor: image upload API @lawvs (#3237)
  • refactor: replacing whitespace with   @zzj3720 (#3279)
  • refactor: migrate slash menu to widget component @lawvs (#3128)
  • refactor: remove unused clipboard module @doodlewind (#3300)
  • refactor: add import tests for tables and bookmarks @fourdim (#3353)
  • refactor: remove deprecated format bar buttom component @lawvs (#3420)
  • refactor: migrate linked page to widget @lawvs (#3449)
  • refactor: remove active color from icon @lawvs (#3477)
  • refactor: support customize linked page @lawvs (#3565)
  • refactor(blocks): frame -> note @Flrande (#3144)
  • refactor(blocks): embed -> image @Saul-Mirone (#3147)
  • refactor(blocks): make elements as prop of surface block @Saul-Mirone (#3156)
  • refactor(blocks): split code @Flrande (#3228)
  • refactor(database): set the cell height after selecting select @zqran (#3037)
  • refactor(database): use hover to show modify select color popup & test @zqran (#3036)
  • refactor(database): make the cell editing mode consistent @zzj3720 (#3109)
  • refactor(database): decouple table render from model @zzj3720 (#3151)
  • refactor(edgeless): clean code about color in edgeless @Flrande (#3024)
  • refactor(edgeless): switch to Bound.deserialize @regischen (#3131)
  • refactor(edgeless): mode -> tool @doodlewind (#3181)
  • refactor(edgeless): empty note @Flrande (#3210)
  • refactor(edgeless): rename children container @Flrande (#3231)
  • refactor(edgeless): surface-text-editor -> edgeless-text-editor @Flrande (#3389)
  • refactor(edgeless): remove redundant callback param @fundon (#3439)
  • refactor(phasor): close vitest browser mode @Flrande (#3016)
  • refactor(phasor): remove unnecessary fields @Flrande (#3050)
  • refactor(phasor): manage roughness using constants @Flrande (#3051)
  • refactor(phasor): prevent SurfaceElement export @Flrande (#3150)
  • refactor(phasor): copy roughjs @Flrande (#3245)
  • refactor(store): remove deprecated tag in schema @Saul-Mirone (#3098)
  • refactor(store): remove shim logic for providers @Saul-Mirone (#3182)
  • refactor(store): abstract provider implementation @himself65 (#3193)
  • refactor(store): optimization and bug fix for proxy @Saul-Mirone (#3209)
  • refactor(store): use prefixedId as subdoc's guid @thorseraq (#3359)
  • refactor(virgo): rewrite embed support @Flrande (#3504)
  • refactor(virgo): isVRangeEqual should not accept null values @Flrande (#3560)
  • revert: circular deps @doodlewind (#3004)
  • style: adjust checkbox style @JimmFly (#3240)
  • style: adjust link page style and add padding for title @JimmFly (#3290)
  • test: add coverage on yjs applyUpdate @himself65 (#3188)
  • test(database): add tests for row selection @zqran (#3079)

New Contributors

Full Changelog: https://github.com/toeverything/blocksuite/compare/v0.6.0...v0.7.0

blocksuite - v0.6.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:

  • 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)
  • 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 and exportMarkdown @doodlewind (#2493)
    • Rename transformPropertyValue to computedValue @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 @Himself65 (#2664)
    • Remove string index on PageMeta @Himself65 (#2382)
    • Remove redundant as const used for matchFlavours @blurname (#2695)
    • Fix playwright VSCode Extension not work @zzj3720 (#2510)
    • Fix typing @Himself65 (#2824 #2840 #2826)
    • Fix SHORT_KEY reference @boomyao (#2286)
    • CI updates @Himself65 @doodlewind @Brooooooklyn @Flrande (#2333 #2353 #2686 #2979)

🙌 New Contributors

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]

blocksuite - 0.5.0

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:

  • 🔮 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 and BacklinkIndexer.
  • 🎨 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)
    • Array proxy (#2088), Y.Map deep proxy (#2111), and support for deep proxied values (#2145).
    • Support DisposableGroup.addFromEvent (#1527).
    • Support role in block schema (#2023).
    • Support Slots on model for blocks (#2067).
    • Indexer (#2091) and normalization of subpage in meta (#2167).
  • 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)
    • Addition of subPageIds in pageMeta and related events (#1716).
    • Unification of subpage and slot naming (#1782).
    • Addition of subpage test case (#1832).
    • Refactoring to check subpage reference (#2022).
    • Normalization of subpage in meta (#2167).
    • Subpage meta synchronization (#2190).
  • 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)
    • Dynamic attribute schema and renderer (#1462).
    • Handler to take over Virgo input (#1495).
    • Support VEditor.requestUpdate and v-text update (#1523).
    • Support setMarks (#1711).
    • VEditor support for string parameter (#1895).
    • Support setText (#2107).
  • Selection (@fundon)
    • ExtendBlockRange API (#1684) and dragged content preview (#1872).
    • Dragging blocks under block-level selection (#1946) and scroll wheel support to move dragging blocks (#1977).
    • Highlight selected blocks in edgeless (#2024) and triple-click to select all text of block (#2037).

🙌 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 to BlockRange (#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 and parentIndex from BaseBlockModel (#1372)
  • refactor: reorganize range structure (#1366)
  • refactor: detect elements with Node.compareDocumentPosition in block selection (#1356)
  • refactor: simplify test (#1379)
  • refactor: migrate BlockSuiteModelProps to BlockModelProps (#1408)
  • refactor: clearly distinguish lit's state and property (#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 with getVirgoByModel (#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 with ResizeObserver (#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 and property (#1919)
  • refactor(database): add DatabaseManager and page.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 and updateBlockById (#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 (#1455)
  • refactor(virgo): setTimeout -> requestAnimationFrame (#1461)
  • refactor(virgo): update and refactor some API (#1483)
  • refactor(virgo): rename and make virgo support decoration (#1499)
  • refactor(virgo): extract events into event service (#1729)
  • refactor(virgo): improve virgo render performance (#1890)
  • refactor(virgo): expose event service (#1896)
  • refactor(virgo): support range services and CI testing (#1912)
  • refactor(virgo): rename some utils files (#2113)
  • refactor(virgo): support forged v-text node (#2254)
  • fix: edgeless selection rect doesn't follow viewport update (#1273)
  • fix: align title and content (#1240)
  • fix: extra characters when paste (#1280)
  • fix: link icon should not wrap (#1286)
  • fix: tab should not indent code block (#1295)
  • fix: popup menu should follow position of image (#1300)
  • fix: copy button of code block menu doesn't work (#1144)
  • fix: sub selected blocks should not be drawn when pressing tab key (#1325)
  • fix: fineTuneHmr sourcemap (#1329)
  • fix: text overflow when font-family fallback fails until "Hiragino Sans GB" (#1336)
  • fix: enhance drag handle styles (#1322)
  • fix: tweak slash menu edge (#1349)
  • fix: format bar should follow selection block (#1358)
  • fix: use merge deep clone (#1359)
  • fix: inline code break when pressing Enter followed by Backspace twice (#1353)
  • fix: make embed test stable (#1362)
  • fix: update selection state (#1367)
  • fix: composing enter at title should not wrap (#1374)
  • fix: remove redundant scrollbars (#1381)
  • fix: format bar should follow selection convert (#1388)
  • fix: unfocus rich-text on starting block selection (#1400)
  • fix: cut for multi-block selection (#1389)
  • fix: selection container should be on top of blocks (#1403)
  • fix: paste in block-level selection (#1396)
  • fix: typo (#1419)
  • fix: slash menu icon size (#1446)
  • fix: missing title migration on multipe pages (#1452)
  • fix: should render nothing when no page model (#1451)
  • fix: unsafe type cast in getStartModelBySelection (#1457)
  • fix: title with ime (#1465)
  • fix: skip image block when show format bar (#1464)
  • fix: filter hotkey on title (#1466)
  • fix: should ignore page/frame in selected models (#1473)
  • fix: error when tab (#1475)
  • fix: error when drag in edgeless (#1476)
  • fix: should throw error when page error (#1376)
  • fix: cursor doesn't go to the end of the line for line-breaks (#1448)
  • fix: should cancel when select selected point outside the selected element (#1484)
  • fix: remove valueInitializer in workspace meta (#1490)
  • fix: commonFieldsUpdated won't be triggered (#1491)
  • fix: some typos (#1510)
  • fix: hide code block horizontal scrollbar (#1497)
  • fix: download image (#1515)
  • fix: tooltip not appeat due to overflow (#1522)
  • fix: code option follow scroll (#1524)
  • fix: readonly should not edit (#1535)
  • fix: drawing content should not cover the brush menu (#1545)
  • fix: affine-text style (#1549)
  • fix: fix css bug in code block (#1554)
  • fix: placeholder with IME (#1559)
  • fix: invalid regex error of slash menu (#1584)
  • fix: not activate format button when only partial selected text has style (#1573)
  • fix: remove redundant scrollIntoViewIfNeeded (#1582)
  • fix: long duration of drag handle transition (#1598)
  • fix: fix selection sync error (#1602)
  • fix: fix the console error when dragging the dividing line (#1587)
  • fix: allow scroll to view as needed (#1604)
  • fix: update the calculation method of format (#1585)
  • fix: hide drag handle when mouse hovering over title (#1615)
  • fix: mouse hovering flickering on blockhub (#1618)
  • fix: cursor position on click in code block (#1622)
  • fix: date & time string can not be inserted using the slash menu (#1625)
  • fix: link not work in editableable content (#1637)
  • fix: text styles when using CJK IME (#1636)
  • fix: compatible with old data (#1646)
  • fix: inconsistent input states between using and not using IME (#1647)
  • fix: edgeless panning with zoom (#1649)
  • fix: cursor hidden in code block empty line (#1654)
  • fix: press enter twice at end of code block with content can jump out (#1624)
  • fix: code block wrap not work (#1657)
  • fix: code block cannot enter spaces (#1668)
  • fix: open two tabs in readonly (#1670)
  • fix: cursor lost in title when undo/redo (#1695)
  • fix: code option covered by header (#1718)
  • fix: dbclick format bar should not hide (#1715)
  • fix: clear selection when selecting one block (#1734)
  • fix: code block caret position (#1698)
  • fix: update column name (#1735)
  • fix: contentParser update logic (#1741)
  • fix: unneeded focus title in edgeless mode (#1747)
  • fix: zoom in/out shortcut key on mac should be metakey (#1727)
  • fix: sync title meta when add page block (#1789)
  • fix: button-text-color (#1799)
  • fix: lang-button without line break (#1825)
  • fix: do not allow text in button to be selected (#1804)
  • fix: paste into list error (#1863)
  • fix: optimize page padding for drag-handle and mobile (#1867)
  • fix: remove extra whitespace after reference node (#1889)
  • fix: indent correctly when deleting list item (#1907)
  • fix: add paragraph when insert divider (#1927)
  • fix: tooltip should be hidden when the submenu list is opened (#1924)
  • fix: button disable style (#1975)
  • fix: throw error when switching mode under block-level selection (#1979)
  • fix: position of creating frame when using block-hub (#1986)
  • fix: reverse dark mode icon and add tooltip (#1995)
  • fix: connector-controller's position not scaled by zoom (#1981)
  • fix: check import package itself (#2030)
  • fix: do not assumed that the page block must appear before the surface block in ymap (#2058)
  • fix: hide hover rect on active frame (#2059)
  • fix: avoid clicking on the icon to close (#2066)
  • fix: unable to scroll to bottom (#2041)
  • fix: retain line break for pasting into code block (#2076)
  • fix: dispose editor wrapper (#2079)
  • fix: callback control for event removal (#2078)
  • fix: use onPress rather than deprecated onClick for nextui components (#2101)
  • fix: onShowSearch alter the searchState (#2098)
  • fix: enabel database flag (#2104)
  • fix: date incorrect (#2137)
  • fix: affine-link shouldn't leak style (#2150)
  • fix: delete emoji completely (#2153)
  • fix: delete emoji in the middle of text (#2165)
  • fix: indexeddb blob storage (#2200)
  • fix: remove unused logic in provider (#2201)
  • fix: small cleanup related to clipboard (#2197)
  • fix: the vRange is wrong in some cases (#2198)
  • fix: incorrect behavior when paste code from GitHub (#2185)
  • fix: test flaky (#2217)
  • fix: compareDocumentPosition usage (#2202)
  • fix: delete emoji forward (#2227)
  • fix: exported html content color (#2237)
  • fix: code block scroll back (#2240)
  • fix: selection wrong when type many times in one frame (#2238)
  • fix: reference node ime compatibility (#2232)
  • fix: return new model after delete selection (#2266)
  • fix: error text style in edgeless mode (#2189)
  • fix: pasting content displays excess content (#2276)
  • fix(blocks): fix click handler in page container (#1301)
  • fix(blocks): move h1-h6 paragraph children into parent (#1338)
  • fix(blocks): prevent propagation when pressing Enter in title (#1444)
  • fix(blocks): missing target when mouse fall into between two blocks and Y axis wrongly calculated (#1471)
  • fix(blocks): update placeholder precisely (#1546)
  • fix(blocks): placeholder in title still displayed when using IME (#1556)
  • fix(blocks): fix remote-selection offset (#1561)
  • fix(blocks): line number in code-block not updated in time (#1566)
  • fix(blocks): fix link mock selection offset (#1572)
  • fix(blocks): set attribute to be null when un-format (#1562)
  • fix(blocks): update paragraph type with new vRange (#1583)
  • fix(blocks): pointer lost when formatting with backticks (#1588)
  • fix(blocks): click copy option in code block (#1610)
  • fix(blocks): add placeholder for heading (#1608)
  • fix(blocks): autofocus code block (#1609)
  • fix(blocks): workaround for cursor hidden (#1627)
  • fix(blocks): fix keyboard handler when in edgeless mode (#1632)
  • fix(blocks): paste not work in title (#1656)
  • fix(blocks): cursor in codeblock moves to start (#1672)
  • fix(blocks): numbered list prefix won't update when previous sibling changed (#1679)
  • fix(blocks): code block indent incorrectly (#1681)
  • fix(blocks): resize observer not work as expected (#1723)
  • fix(blocks): code-block should support dark mode (#1726)
  • fix(blocks): inherit behaviour about inline format (#1822)
  • fix(blocks): placeholder kept when inputting with IME in empty line (#1846)
  • fix(blocks): drop-down arrow for code language switching should not be displayed (#1871)
  • fix(blocks): remote selection should be updated when switch to default mode from edgeless mode (#1894)
  • fix(blocks): prevent link bar appeared when range is collapsed (#1898)
  • fix(blocks): copy behavior (#1969)
  • fix(blocks): pre-wrap -> break-spaces (#1984)
  • fix(blocks): import reference error (#2029)
  • fix(blocks): overwrite the default behavior when consecutive spaces (#2141)
  • fix(blocks): prevent default browser behavior for undo/redo (#2229)
  • fix(blocks,react,next-example): next.js cannot read window during SSR (#1407)
  • fix(database): sync state after cell input blur (#1754)
  • fix(database): undo should work in database title and rich-text (#1838)
  • fix(database): hide text that exceeds column width (#1877)
  • fix(database): remove property from columns data structure (#1951)
  • fix(database): show the add column button on the right side of database correctly (#1955)
  • fix(database): missing import custom lit component path (#2021)
  • fix(database): shortcut keys to convert to database (#2032)
  • fix(database): should the indicator display correctly when resize the window (#2090)
  • fix(database): show or hide column popup (#2094)
  • fix(database): select instead of add when select option is exsit (#2114)
  • fix(database): viewportElement does not exsit (#2121)
  • fix(database): registerColumnHeader follows database block life cycle (#2157)
  • fix(database): drag database error (#2221)
  • fix(database): text in database cannot be selected (#2259)
  • fix(docs): multiple editors in doc (#1859)
  • fix(docs): dark mode (#1874)
  • fix(docs): add missing that-clause (#2095)
  • fix(drag-handle): height of drag handle line when zooming in/out in edgeless mode (#1790)
  • fix(drag-handle): improve indicator offset in edgeless mode (#1797)
  • fix(drag-handle): display only in the currently activated frame (#1837)
  • fix(drag-handle): selected block cant be reached (#1994)
  • fix(drag-handle): should be hidden when moving canvas in edgeless (#2142)
  • fix(edgeless): enable shape hover rect & add test actions (#1412)
  • fix(edgeless): frame active state on click (#1415)
  • fix(edgeless): brush menu cannot be closed after switch editor mode (#1537)
  • fix(edgeless): sync selection box for panned canvas on switching mouse mode (#1539)
  • fix(edgeless): redundant side effect on clicking edgeless toolbar (#1547)
  • fix(edgeless): update brush color (#1612)
  • fix(edgeless): cursor in different mouse mode (#1619)
  • fix(edgeless): selection resize (#1651)
  • fix(edgeless): background linear-gradient -> radial-gradient (#1721)
  • fix(edgeless): merge view control toolbar into mouse mode toolbar (#1720)
  • fix(edgeless): adjust frame min width (#1738)
  • fix(edgeless): hide redundant edgeless menu entry (#1815)
  • fix(edgeless): the edgeless toolbar should not be able to display two submenus (#1813)
  • fix(edgeless): drag handle should only appear in actived frame block (#1820)
  • fix(edgeless): pinch event compatible (#1821)
  • fix(edgeless): when zooming with the mouse, the behavior is not as expected (#1869)
  • fix(edgeless): brush offset when drawing (#1935)
  • fix(edgeless): add text frame mask z-index (#2080)
  • fix(edgeless): using color codes instead of using actual color values (#2086)
  • fix(edgeless): storage of corrected connector attached points (#2158)
  • fix(edgeless): resize-Manager not consider zoom (#2135)
  • fix(edgeless): when editing text, should hidden component toolbar (#2160)
  • fix(edgeless): auto remove empty text frame (#2164)
  • fix(edgeless): offset when resizing connector (#2210)
  • fix(edgeless): should not add text when double click toolbar button (#2216)
  • fix(edgeless): new frame is constructed using a relative coordinate (#2220)
  • fix(edgeless): default frame background (#2258)
  • fix(edgeless): popover color (#2255)
  • fix(editor): should hide drag handle when target model props changed (#1638)
  • fix(editor): some safari compatibility issues (#1688)
  • fix(embed): don't show image option menu on selecting (#1404)
  • fix(format-bar): safari compatibility (#1678)
  • fix(format-bar): update state on change in keyboard selection (#2100)
  • fix(link): consecutive identical reference nodes should not be merged (#2231)
  • fix(phasor): adapt to resized canvas (#1299)
  • fix(phasor): use consistent rounded rect radius (#1603)
  • fix(phasor): add test:unit:coverage (#2061)
  • fix(playground): edgeless blank (#1470)
  • fix(playground): clear selection on clicking undo/redo buttons (#1752)
  • fix(playground): dark mode style for images (#1982)
  • fix(selection): select text by double-clicking in edgeless mode (#1906)
  • fix(selection): drag handle should cover all selected blocks (#1944)
  • fix(selection): dragging blocks scale in edgeless mode (#1978)
  • fix(selection): improve position of indicator in nested list (#2099)
  • fix(selection): should add offset to selected blocks in edgeless (#2139)
  • fix(selection): should clean selected blocks when dropping blocks in edgeless (#2132)
  • fix(selection): embed width should not exceed maximum width (#2171)
  • fix(selection): should be cleared when dragging block card from the BlockHub (#2168)
  • fix(selection): should be cleared when activing shape or frame in edgeless (#2186)
  • fix(store): lazy initialize yjs models (#1536)
  • fix(store): y array should clear old index when proxied (#2215)
  • fix(store): fix data of rich text cells in store (#2218)
  • fix(virgo): fix css in virgo (#1311)
  • fix(virgo): fix toVRange (#1426)
  • fix(virgo): getLine not work in the end of line (#1460)
  • fix(virgo): handle some edge cases in nativePointToTextPoint (#1489)
  • fix(virgo): container should be non-editable when in read-only mode (#1501)
  • fix(virgo): support deleteWordBackward input type (#1538)
  • fix(virgo): cursor offset when using IME (#1543)
  • fix(virgo): support deleteContentForward input type (#1641)
  • fix(virgo): cursor may sometimes shift within a code block (#1642)
  • fix(virgo): synchronizing selection can potentially result in an infinite loop (#1644)
  • fix(virgo): fix dbclick in first word (#1661)
  • fix(virgo): auto scroll to the focus text (#1683)
  • fix(virgo): render error in title when first charaster is space (#1692)
  • fix(virgo): arrow up and down will lose focus (#1710)
  • fix(virgo): soft keyboard closed when inputting in mobile (#1779)
  • fix(virgo): remove autofocus (#1882)
  • fix(virgo): unexpected cursor position when inputting Chinese in mobild phone (#1893)
  • fix(virgo): timing problem of selection synchronization (#1999)
  • fix(virgo): ime inserts text in unexpected position (#2031)
  • fix(virgo): static styles -> styleMap (#2083)
  • fix(virgo): no-wrap style for code block (#2118)
  • fix(virgo): auto scroll to cursor when inputting (#2119)
  • fix(virgo): the cursor may jump to the beginning when quickly typing (#2219)
  • fix(virgo): getTextPoint offset calculation (#2223)

Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]

blocksuite - 0.4.0

Published by doodlewind over 1 year ago

Announcing BlockSuite 0.4.0

💠 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.

📦 Blocks & UI Components

  • The DragHandle component is supported (#543 #572 #592 #593 #742 #698) by @Himself65 @fundon. This allows for convenient reordering of blocks.
  • The BlockHub component is supported (#731 #773 #915 #1092 #1108 #1112 #1173) by @thorseraq. This makes it easy to insert blocks from a visible positioned popup.
  • The SlashMenu component is supported (#571 #791 #917 #1072 #1202 #1191) by @lawvs. This provides Notion-like quick menu when pressing the / key.
  • The new 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.
  • The new ShapeElement is supported (#790 #808 #1104) by @doodlewind @alt1o. This is a supported element type inside the phasor surface renderer.
  • The new affine:database block flavour (#770 #831 #909 #913 #920 #959 #960 #961) is added by @Himself65 (experimental). This is the foundation of view transforming.
  • The indenting of multiple blocks is supported (#1093) by @Innei.
  • The bracket autocomplete for native range selected text is supported (#630) by @lawvs.
  • The block level selection can be kept during scroll (#1003), supported by @fundon.
  • The new EdgelessToolbar component is supported (#923) by @thorseraq. This ships with the default edgeless UI container.

🏗️ Architecture & Editor Infra

  • The class-based block model is replaced by zod-based schema (#859 #868) by @Himself65. This allows for more declarative and block definition.
  • The block-specific methods are abstracted into BlockService (#856 #857) by @Himself65. This provides composable ways defining block methods.
  • The new addBlockByFlavour API is supported (#628) by @Himself65. This allows for adding blocks in a type-safe way.
  • The feature flag mechanism is supported (#658 #690 #695) This allows for enabling or disabling feature at runtime, and also makes the single-master development possible by merging immature features into master but opt-out by default.
  • The BlockTag entity is supported (#734) by @Himself65. This enables attaching group-able tags onto blocks.
  • The new 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.
  • The new phasor package is added (#546 #552 #806 #890 #891) by @doodlewind. This is a canvas-based renderer designed for optimized whiteboard content rendering.
  • The new global package is added (#618) by @Himself65. This allows for better cross-package typing and reusability of common utils.

📚 Misc

  • Image blob uploading support (#735 #786 #918 #1188).
  • HMR support in playground (#621 #1050).
  • URL-based markdown import in playground (#825).
  • Adaptive height support for QuickFormatBar (#777).
  • YDoc binary exporting support in playground (#509).
  • Mode switch support in edgeless mode (#514).
  • Markdown import support for image and code block (#544).
  • Markdown export support for del and underline format (#651).
  • Ctrl-enter hotkey support (#821).
  • CSS debug menu support (#901).
  • Debug log support (#710 #928).
  • New SimpleAffineEditor pre-configured editor component (#811).
  • Use random room by-default in playground (#594).
  • New BlockSuite logo (#966 #1119).

🧹 Refactoring

  • The affine:group block flavour is renamed to affine:frame (#520).
  • The SelectionController is replaced by MouseModeController (#745).
  • The AwarenessAdapter is replaced by AwarenessStore (#780).
  • The Signal.fromEvent is replaced by Signal.disposableListener (#1114).
  • The IndexedDBBlobProvider is replaced by DuplexBlobProvider (#866).
  • The affine:shape block flavour is removed (#804).
  • The disposable callbacks are replaced by DisposableGroup (#760).
  • The PrelimText type is removed (#1146).
  • The page field in Text is removed (#1146).

🙌 New Contributors

🐛 Detailed Bugfixes

  • fix: incorrect code block short ligatures (#511)
  • fix: add a minimum limit on the drag-and-drop width of images (#513)
  • fix: unexpected behaviour of markdown shortcut when creating code block and inline code (#512)
  • fix: code block language does not keep after refreshing page (#516)
  • fix: when image size too large, option operation should show inside (#515)
  • fix: remove css files (#523)
  • fix: keep image meta fields in clipboard (#519)
  • fix: remove css import (#524)
  • fix: indent operation in rich text (#528)
  • fix: select all with hot key at the start of the line (#537)
  • fix: paste at the start of line (#540)
  • fix: use animationend event (#541)
  • fix: toast dom not removed (#542)
  • fix: update block cache when mouse move (#549)
  • fix: phasor ts config (#550)
  • fix: indent should not work under some block (#553)
  • fix: cursor lose outside container (#555)
  • fix: export HTML or Markdown format lost (#547)
  • fix: drag handle appear in edgeless mode (#557)
  • fix: delete selected content on cut (#548)
  • fix: drag position in list block (#563)
  • fix(playground): split room in different version (#568)
  • fix: block shouldn't highlighted when not dragging (#578)
  • fix: cleanup drag handle (#579)
  • fix: multi-line title size after undo/redo (#584)
  • fix: use flex in children container (#586)
  • fix: native selection (#588)
  • fix: move drag handle outside blocks (#598)
  • fix: keep cursor to title when deleting at the start of the first block (#580)
  • fix: hide drag handle on wheel (#604)
  • fix: image rect (#606)
  • fix: remove unused detection (#614)
  • fix: captureSync on creating code block & filter hotkey listener (#597)
  • fix: move drag handle when resize window (#622)
  • fix: code block unexpectedly get focus (#631)
  • fix: keep code block option popup open on hover (#634)
  • fix: use manual shallow copy on DOMRect (#643)
  • fix: optimize isForward detection in SelectionManager (#640)
  • fix: delete code block when selected (#637)
  • fix: return the correct delta result in sliceToDelta (#635)
  • fix: import @blocksuite/blocks cause ts error in other monorepos (#654)
  • fix: drag handle behavior in Firefox browser (#656)
  • fix: parse inline html into single paragraph (#659)
  • fix(blocks): set supressWarning to true of quill-cursors (#661)
  • fix: query code block container when loading (#666)
  • fix: global types unreachable in downstream package (#668)
  • fix: blot types (#665)
  • fix: type SurfaceBlockModel (#672)
  • fix: peer cursor updates sometimes does not emit "change" event (#673)
  • fix: blob import with cors header (#678)
  • fix: cant reach the last block in nesting (#677)
  • fix: collect wrong BaseBlockModel[] at _block() (#681)
  • fix: line number for wrapped lines (#680)
  • fix: adapting parent index of blocks to binarySearchBlockEditingState (#685)
  • fix: should check that parentIndex is not undefined (#688)
  • fix: use Partial in defaultFlags (#691)
  • fix: disable hotkey format and redo/undo in readonly mode (#693)
  • fix: undo/redo is unavailable in title (#701)
  • fix: revert .nvmrc (#705)
  • fix: bring children to father model (#707)
  • fix: handle children when delete a block (#708)
  • fix: delete selected text on enter (#712)
  • fix: hide mock line element properly (#713)
  • fix: should keep first line format when pasted into a new line (#715)
  • fix: should not create link in readonly mode (#719)
  • fix: incorrect comparison in assertEquals (#725)
  • fix: uniform event handler outside of rich text (#724)
  • fix: click bottom should add a new paragraph block (#727)
  • fix: flaky test case with raw enter press (#730)
  • fix: surface history with transact origin (#746)
  • fix: indicator lifecycle on direct opening edgeless mode (#748)
  • fix: use requestAnimationFrame (#751)
  • fix: replace text when paste to a block (#718)
  • fix(global): compatibility with cjs (#767)
  • fix: block hub subscribe (#769)
  • fix: edgeless selection rect index over block hub (#781)
  • fix: reuse comparePoint to decide dragging direction during native selection (#783)
  • fix: add font family for blockHub & fix menu padding (#787)
  • fix: embed component lifecycle warning (#788)
  • fix: drop throw error when using drag handle (#789)
  • fix: try to re-attach the quill when connected (#792)
  • fix: parse partially select text in sliceToDelta (#798)
  • fix: slash menu position at line start (#805)
  • fix: avoid irrelevant global style mutation (#817)
  • fix: browser compatibility issues (#819)
  • fix(global): exports in package.json (#820)
  • fix(editor): move themes to top level (#822)
  • fix(blocks): use isPageTitleElement (#828)
  • fix(playground): type on env.d.ts (#832)
  • fix(edgeless): surface structure with ?init=empty (#836)
  • fix(global): improve test case on isEqual (#842)
  • fix: handle None selection in format quick bar (#830)
  • fix: update append behavior (#848)
  • fix: enable slash menu on playground (#849)
  • fix(blocks): forbid user to delete a block inside database block (#850)
  • fix(blocks): add readonly restriction in DefaultSelectionManager (#852)
  • fix: keep native range on cross-block dragging (#845)
  • fix(next-example): remove ts-ignore (#871)
  • fix: update code type (#867)
  • fix: keep native range on cross-frame dragging (#876)
  • fix: should select full text of the first block in edgeless mode (#883)
  • fix: should select text in title after selecting text in frame (#887)
  • fix: delete children by default (#895)
  • fix: database settings sidebar position (#898)
  • fix: typing on the end of code (#905)
  • fix: block hub card list hover state & hovertip style (#911)
  • fix: keep blank-area-click cursor in edgeless mode (#878)
  • fix: wrap update using transact (#921)
  • fix: redundant parents are selected during drag selection (#904)
  • fix: block hub z-index (#940)
  • fix(blocks): disable database when not enabled (#950)
  • fix: format bar position is unstable (#951)
  • fix(blocks): rich text type on database block (#953)
  • fix(blocks): editing state in database block (#954)
  • fix: drag handle can not escape database block when moving mouse (#957)
  • fix(blocks): enable database flag in block hub (#964)
  • fix(virgo): fix unexpected space (#973)
  • fix: sync selected blocks to selection-manager when clicking draghandle (#975)
  • fix: add event to quill keyboard context (#979)
  • fix: add version to cancel workflow (#981)
  • fix: handle native range on dragging out of frame (#886)
  • fix(blocks): select cell in database block (#984)
  • fix: return Disposable in Signal.once() (#986)
  • fix(playground): use logo.svg (#987)
  • fix: isAtLineEdge with format (#947)
  • fix(virgo): fix getDeltasByVRange (#991)
  • fix: format bar position at line edge (#980)
  • fix: render selectedRects based on viewport scroll (#988)
  • fix: should set overflow to hidden on body (#997)
  • fix(blocks): frame selection rect (#998)
  • fix(virgo): fix toVRange (#1001)
  • fix: clear selection when press esc keydown (#993)
  • fix: click title when divider block on the first (#1006)
  • fix(blocks): press enter on title (#1008)
  • fix: prohibit creating divider within quote (#1013)
  • fix: remove event listener with options (#1025)
  • fix: unable to select embed block #994 (#1028)
  • fix: keydown position in line edge and empty line (#1021)
  • fix(store): support remote update signal (#1035)
  • fix: build exports (#1038)
  • fix: replacing keyboard module (#1039)
  • fix: local dev sourcemap issue (#1047)
  • fix: refresh drag handle state when hovering on code block and image block (#1051)
  • fix(blocks): paragraph font weight on children (#1060)
  • fix: unstable text selection in edgeless mode (#1065)
  • fix: edgeless-toolbar style (#1068)
  • fix: keydown at line edge (#1043)
  • fix: abort format bar when popstate (#1048)
  • fix: try register code block service (#1080)
  • fix(editor): do not parse redundant divs in HtmlParser (#1082)
  • fix(blocks): correct rect positions (#1083)
  • fix: ensure change code block language can work (#1086)
  • fix: drag block selection area is mismatch when page scroll down (#1095)
  • fix(blocks): image block resize border (#1102)
  • fix(editor): emoji font-family (#1113)
  • fix: arrow up and down in edgeless page (#1122)
  • fix: should use clientX/clientY to create startRange in edgeless mode (#1138)
  • fix(virgo): unit text not render spaces (#1148)
  • fix: unable to close popup widget on code block (#1149)
  • fix: update slash menu (#1130)
  • fix(global): namespace BlockSuiteInternal (#1155)
  • fix(playground): database example (#1156)
  • fix: move drag handle to the same level with editor-container (#1161)
  • fix: hide link popup when scroll (#1165)
  • fix: focus temp element during copy (#1167)
  • fix: update slash menu styles (#1169)
  • fix: enhance error message in SSR mode (#1174)
  • fix: uppercase in words (#1177)
  • fix: fix cors fetch in chrome (#1196)
  • fix: keep native range selection when scrolling with scroll wheel (#1195)
  • fix: format bar action status (#1199)
  • fix: ignore fetch cache by Image element (#1206)
  • fix(playground): load function from map (#1209)
  • fix(blocks): drag handle position (#1211)
  • fix: hide editing popup in readonly mode (#1212)
  • fix: quote font style (#1217)
  • fix: disable shortcut "h" to shown/hidden dat.gui css debug menu (#1226)
  • fix(phasor): dpr offset (#1239)
  • fix: incorrect mergeCodeBlocks text operation (#1237)
  • fix: when screen height is low, place the last tooltip on top of card (#1238)
  • fix: revert cursor flag (#1252)
  • fix: fast drag sync selection box (#1251)
  • fix: update format bar action status when node mution (#1254)
  • fix: keep code-block from retrieving hover state when affine-default-page hasn't been renderer (#1255)
  • fix: image selection offset (#1223)
  • fix: locate insert position from block hub in scrollable page (#1256)
  • fix: clean slash menu after soft enter (#1257)
  • fix: enter ime should not confirm link (#1263)
  • fix: update the default value of @blocksuite/react (#1262)
  • fix(virgo): select from the start of line using shift+arrow (#1266)
  • fix: slash with shift key (#1267)

Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]...@blocksuite/[email protected]

blocksuite - 0.3.1

Published by doodlewind almost 2 years ago

What's Changed

Full Changelog: https://github.com/toeverything/blocksuite/compare/@blocksuite/[email protected]...@blocksuite/[email protected]

blocksuite - 0.3.0

Published by doodlewind almost 2 years ago

Announcing BlockSuite 0.3.0

💠 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:

🌈 APIs & Data Persistence

  • New Workspace, Page, and Space entities support by @doodlewind
  • New BlobStorage binary persistence support by @darkskygit @doodlewind @Austaras
  • IndexedDB-based doc persistence support by @doodlewind @colelawrence
  • New WorkspaceMeta support by @doodlewind
  • Async BlockService support by @Himself65 @doodlewind
  • Block version validation by @doodlewind
  • Proxy-based Yjs binding (experimental) by @Himself65

📦 New Blocks & UI Components

  • Image block - The affine:embed block type, created by @DiamondThree
  • Code block - The affine:code block type, created by @thorseraq
  • Divider block - The affine:divider block type, created by @JimmFly
  • Shape block (experimental) - The affine:shape block type, created by @Himself65
  • Inline text style popup component - The FormatQuickBar component, created by @lawvs
  • Read-only mode support by @QiShaoXuan

🛠️ Integration & DX

  • The @blocksuite/react hooks package and Next integration example by @Himself65
  • Base64-based playground URL sharing support by @Himself65
  • ESM support by @doodlewind @Himself65 @lawvs
  • Next SSR support for @blocksuite/store by @Himself65 @doodlewind
  • Side-by-side debugging support by @Himself65 @doodlewind
  • New playground UI based on Shoelace by @doodlewind
  • Vercel and Cloudflare Page support by @doodlewind @darkskygit
  • Automated nightly release and CodeQL checks by @Himself65
  • E2E test trace support by @lawvs
  • README about basic APIs by @doodlewind

🙌 New Contributors

Thank @Himself65 @Austaras @linonetwo @LuciNyan @Flrande @donaldxdonald @septs for their contributions!

blocksuite - @blocksuite/[email protected]

Published by github-actions[bot] about 2 years ago

@blocksuite/store

0.2.9

Patch Changes

  • 1b720cf: add changesets
Package Rankings
Top 1.55% on Npmjs.org
Top 6.75% on Proxy.golang.org
Badges
Extracted from project README
Checks Status Issues Closed NPM Latest Release NPM Canary Release Open in StackBlitz Join Discord affine-demo