Skip to content

BlockSuite API Documentation / @blocksuite/store / Generator

Enumeration: Generator

Enumeration Members

AutoIncrement

AutoIncrement: "autoIncrement"

Warning: This generator mode will crash the collaborative feature if multiple clients are adding new blocks. Use this mode only if you know what you're doing.

Source

packages/framework/store/src/store/store.ts:48


AutoIncrementByClientId

AutoIncrementByClientId: "autoIncrementByClientId"

This generator is trying to fix the real-time collaboration on debug mode. This will make generator predictable and won't make conflict

https://docs.yjs.dev/api/faq#i-get-a-new-clientid-for-every-session-is-there-a-way-to-make-it-static-for-a-peer-accessing-the-doc

Source

packages/framework/store/src/store/store.ts:42


NanoID

NanoID: "nanoID"

Default mode, generator for the unpredictable id

Source

packages/framework/store/src/store/store.ts:34


UUIDv4

UUIDv4: "uuidV4"

Source

packages/framework/store/src/store/store.ts:36