chore: bump bs with new extension api (#8042)

This commit is contained in:
Saul-Mirone
2024-09-02 10:32:22 +00:00
parent 61e37d8873
commit 56f4634c1f
90 changed files with 1300 additions and 988 deletions

View File

@@ -130,14 +130,23 @@ const DetailPageImpl = () => {
// provide page mode and updated date to blocksuite
const pageService =
editorHost?.std.spec.getService<PageRootService>('affine:page');
editorHost?.std.getService<PageRootService>('affine:page');
const disposable = new DisposableGroup();
if (pageService) {
disposable.add(
pageService.slots.docLinkClicked.on(({ docId, blockId }) => {
return blockId
? jumpToPageBlock(docCollection.id, docId, blockId)
: openPage(docCollection.id, docId);
pageService.slots.docLinkClicked.on(({ pageId, params }) => {
if (params) {
const { mode, blockIds, elementIds } = params;
return jumpToPageBlock(
docCollection.id,
pageId,
mode,
blockIds,
elementIds
);
}
return openPage(docCollection.id, pageId);
})
);
disposable.add(