mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
## Features - https://github.com/toeverything/BlockSuite/pull/6544 @golok727 - https://github.com/toeverything/BlockSuite/pull/6543 @golok727 - https://github.com/toeverything/BlockSuite/pull/6536 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6497 @doouding - https://github.com/toeverything/BlockSuite/pull/6514 @regischen - https://github.com/toeverything/BlockSuite/pull/6523 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6530 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6526 @fourdim - https://github.com/toeverything/BlockSuite/pull/6532 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6493 @golok727 - https://github.com/toeverything/BlockSuite/pull/6529 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6528 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6509 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6525 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6502 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6489 @Flrande ## Bugfix - https://github.com/toeverything/BlockSuite/pull/6558 @fourdim - https://github.com/toeverything/BlockSuite/pull/6556 @fourdim - https://github.com/toeverything/BlockSuite/pull/6547 @fundon - https://github.com/toeverything/BlockSuite/pull/6537 @golok727 - https://github.com/toeverything/BlockSuite/pull/6531 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6524 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6519 @regischen - https://github.com/toeverything/BlockSuite/pull/6517 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6516 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6510 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6511 @congzhou09 - https://github.com/toeverything/BlockSuite/pull/6507 @doouding - https://github.com/toeverything/BlockSuite/pull/6500 @fourdim - https://github.com/toeverything/BlockSuite/pull/6486 @congzhou09 - https://github.com/toeverything/BlockSuite/pull/6495 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6488 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6482 @Flrande - https://github.com/toeverything/BlockSuite/pull/6558 @fourdim ## Refactor - https://github.com/toeverything/BlockSuite/pull/6548 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6522 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6518 @regischen - https://github.com/toeverything/BlockSuite/pull/6521 @Saul-Mirone ## Misc - https://github.com/toeverything/BlockSuite/pull/6557 @fourdim - https://github.com/toeverything/BlockSuite/pull/6546 @Flrande - docs: update package desc - https://github.com/toeverything/BlockSuite/pull/6527 @fourdim - https://github.com/toeverything/BlockSuite/pull/6505 @Brooooooklyn - https://github.com/toeverything/BlockSuite/pull/6503 @fourdim - v0.13.0 - https://github.com/toeverything/BlockSuite/pull/6496 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6562 @donteatfriedrice
@toeverything/y-indexeddb
Features
- persistence data in indexeddb
- sub-documents support
- fully TypeScript
Usage
import { createIndexedDBProvider, downloadBinary } from '@toeverything/y-indexeddb';
import * as Y from 'yjs';
const yDoc = new Y.Doc({
// we use `guid` as unique key
guid: 'my-doc',
});
// sync yDoc with indexedDB
const provider = createIndexedDBProvider(yDoc);
provider.connect();
await provider.whenSynced.then(() => {
console.log('synced');
provider.disconnect();
});
// dowload binary data from indexedDB for once
downloadBinary(yDoc.guid).then(blob => {
if (blob !== false) {
Y.applyUpdate(yDoc, blob);
}
});