npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

temp_blocksuite

v0.12.7

Published

<p align="center"> <picture style="width: 500px"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/toeverything/blocksuite/master/assets/logo-and-name-h.svg" /> <source media="(prefers-color-scheme: dark)"

Downloads

4

Readme

BlockSuite

Checks Status Issues Closed NPM Latest Release NPM Canary Release Open in StackBlitz Join Discord


Overview

People who are really serious about editor should make their own framework.

BlockSuite is a toolkit for building editors and collaborative applications. It implements a series of content editing infrastructures, UI components and editors independently.

You can consider BlockSuite as a UI component library for building various editors, based on a minimized vanilla framework as their runtime. With BlockSuite, you can:

  • Reuse multiple first-party BlockSuite editors:
    • DocEditor: A comprehensive block-based document editor, offering extensive customization and flexibility.
    • EdgelessEditor: A graphics editor with opt-in canvas rendering support, but also shares the same rich-text capabilities with the DocEditor.
  • Customize, extend and enhance these editors with a rich set of BlockSuite components. All BlockSuite components (including editors) are native web components, making them framework-agnostic and easy to interop with popular frameworks.
  • Or, build new editors from scratch based on the underlying vallina framework.

🚧 BlockSuite is currently in its early stage, with components and extension capabilities still under refinement. Hope you can stay tuned, try it out, or share your feedback!

Motivation

BlockSuite originated from the AFFiNE knowledge base, with design goals including:

  • Support for Multimodal Editable Content: When considering knowledge as a single source of truth, building its various view modes (e.g., text, slides, mind maps, tables) still requires multiple incompatible frameworks. Ideally, no matter how the presentation of content changes, there should be a consistent framework that helps.
  • Organizing and Visualizing Complex Knowledge: Existing editors generally focus on editing single documents, but often fall short in dealing with complex structures involving intertwined references. This requires the framework to natively manage state across multiple documents.
  • Collaboration-Ready: Real-time collaboration is often seen as an optional plugin, but in reality, we could natively use the underlying CRDT technology for editor state management, which helps to build a clearer and more reliable data flow.

During the development of AFFiNE, it became clear that BlockSuite was advancing beyond merely being an in-house editor and evolving into a versatile framework. That's why we chose to open source and maintain BlockSuite independently.

Features

With BlockSuite editors, you can selectively reuse all the editing features in AFFiNE:

affine-demo

And under the hood, the vanilla BlockSuite framework supports:

  • Defining custom blocks and inline embeds.
  • Incremental updates, real-time collaboration, and even decentralized data synchronization based on the document streaming mechanism of the document.
  • Writing type-safe complex editing logic based on the command mechanism, similar to react hooks designed for document editing.
  • Persistence of documents and compatibility with various third-party formats (such as markdown and HTML) based on block snapshot and transformer.
  • State scheduling across multiple documents and reusing one document in multiple editors.

To try out BlockSuite, refer to the quick start example and start with the preset editors in @blocksuite/presets.

Architecture

The relationship between BlockSuite and AFFiNE is similar to that between the Monaco Editor and VSCode, but with one major difference: BlockSuite is not automatically generated based on the AFFiNE codebase, but is maintained independently with a different tech stack — AFFiNE uses React while BlockSuite uses web components.

This difference has led BlockSuite to set clear boundaries based on a component-centric philosophy, ensuring:

  • Both AFFiNE and other projects should equally reuse and extend BlockSuite through components, without any privileges.
  • BlockSuite components can be easily reused regardless of whether you are using React or other frameworks.

To that end, the BlockSuite project is structured around key packages that are categorized into two groups: a headless framework and prebuilt editing components.

This can be illustrated as the diagram below:

package-overview.png

Resources

Building

See BUILDING.md for instructions on how to build and test BlockSuite from source.

Contributing

BlockSuite accepts pull requests on GitHub. Before you start contributing, please make sure you have read and accepted our Contributor License Agreement. To indicate your agreement, simply edit this file and submit a pull request.

License

MPL 2.0