refactor: add docsService for blocksuite to change and observe doc mode (#7200)

This PR provide `DocModeService` to manage document mode, which is used by blocksuite.

### What Changed?
- Add document mode apis from `DocService` and `DocsService`
- Remove useless `pageService.getEditorMode` and `pageService.slots.editorModeSwitch` api

[Related PR in blocksuite](https://github.com/toeverything/blocksuite/pull/7288)

[Bump Blocksuite](https://github.com/toeverything/AFFiNE/pull/7209)
> ## Features
> * [feat(presets): support different tracker control for actions blocksuite#7285](https://github.com/toeverything/blocksuite/pull/7285) @donteatfriedrice
> * [feat(edgeless): add default color and editing border for edgeless text blocksuite#7278](https://github.com/toeverything/blocksuite/pull/7278) @Flrande
> * [feat(blocks): center peek entries blocksuite#7275](https://github.com/toeverything/blocksuite/pull/7275) @pengx17
>
> ## Bugfix
> * [fix(blocks): affine-embed-synced-doc-block peek on dblclick blocksuite#7284](https://github.com/toeverything/blocksuite/pull/7284) @pengx17
> * [fix(edgeless): edgeless text rect should automatically update when changing font blocksuite#7292](https://github.com/toeverything/blocksuite/pull/7292) @Flrande
> * [fix(edgeless): align panel not work blocksuite#7293](https://github.com/toeverything/blocksuite/pull/7293) @Flrande
> * [fix(blocks): filterable list unexpected hover style blocksuite#7291](https://github.com/toeverything/blocksuite/pull/7291) @golok727
> * [fix(blocks): slash menu unexpected hover style blocksuite#7290](https://github.com/toeverything/blocksuite/pull/7290) @golok727
> * [fix(blocks): bookmark block error on undo or delete while loading blocksuite#7276](https://github.com/toeverything/blocksuite/pull/7276) @golok727
> * [fix(presets): chat input max-height blocksuite#7283](https://github.com/toeverything/blocksuite/pull/7283) @fundon
> * [fix(presets): get image blob from selection blocksuite#7286](https://github.com/toeverything/blocksuite/pull/7286) @donteatfriedrice
> * [fix(blocks): connectors resize and rotate blocksuite#7256](https://github.com/toeverything/blocksuite/pull/7256) @fundon
>
> ## Refactor
> * [refactor: add DocModeService for doc mode get, set, toogle and observe change blocksuite#7288](https://github.com/toeverything/blocksuite/pull/7288) @akumatus
> * [refactor(edgeless): rewrite auto-connect component as a widget blocksuite#7287](https://github.com/toeverything/blocksuite/pull/7287) @doouding
>
> ## Misc
> * [test: fix flaky blocksuite#7295](https://github.com/toeverything/blocksuite/pull/7295) @L-Sun
> * [style(page): adjust heading font-weight and letter-spacing blocksuite#7277](https://github.com/toeverything/blocksuite/pull/7277) @CatsJuice
> * [chore: apply member ordering rule blocksuite#7279](https://github.com/toeverything/blocksuite/pull/7279) @Saul-Mirone

---
This commit is contained in:
akumatus
2024-06-13 08:45:31 +00:00
committed by Yue Wu
parent a3ca41fd6a
commit 24cb0d3757
16 changed files with 220 additions and 117 deletions

View File

@@ -3,8 +3,8 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/store": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/global": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/store": "0.15.0-canary-202406121423-a4241b5",
"react": "18.3.1",
"react-dom": "18.3.1",
"vitest": "1.6.0"

View File

@@ -13,9 +13,9 @@
"@affine/debug": "workspace:*",
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/blocks": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/global": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/store": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/blocks": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/global": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/store": "0.15.0-canary-202406121423-a4241b5",
"@datastructures-js/binary-search-tree": "^5.3.2",
"foxact": "^0.2.33",
"jotai": "^2.8.0",
@@ -29,8 +29,8 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/block-std": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/presets": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/block-std": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/presets": "0.15.0-canary-202406121423-a4241b5",
"@testing-library/react": "^16.0.0",
"async-call-rpc": "^6.4.0",
"react": "^18.2.0",

View File

@@ -19,10 +19,18 @@ export class Doc extends Entity {
readonly title$ = this.record.title$;
setMode(mode: DocMode) {
this.record.setMode(mode);
return this.record.setMode(mode);
}
getMode() {
return this.record.getMode();
}
toggleMode() {
this.record.toggleMode();
return this.record.toggleMode();
}
observeMode() {
return this.record.observeMode();
}
}

View File

@@ -3,7 +3,7 @@ import { map } from 'rxjs';
import { Entity } from '../../../framework';
import { LiveData } from '../../../livedata';
import type { DocsStore } from '../stores/docs';
import { DocRecord } from './record';
import { type DocMode, DocRecord } from './record';
export class DocRecordList extends Entity {
constructor(private readonly store: DocsStore) {
@@ -37,4 +37,22 @@ export class DocRecordList extends Entity {
public doc$(id: string) {
return this.docs$.map(record => record.find(record => record.id === id));
}
public setMode(id: string, mode: DocMode) {
return this.store.setDocModeSetting(id, mode);
}
public getMode(id: string) {
return this.store.getDocModeSetting(id);
}
public toggleMode(id: string) {
const mode = this.getMode(id) === 'edgeless' ? 'page' : 'edgeless';
this.setMode(id, mode);
return this.getMode(id);
}
public observeMode(id: string) {
return this.store.watchDocModeSetting(id);
}
}

View File

@@ -33,12 +33,21 @@ export class DocRecord extends Entity<{ id: string }> {
).map(mode => (mode === 'edgeless' ? 'edgeless' : 'page'));
setMode(mode: DocMode) {
this.docsStore.setDocModeSetting(this.id, mode);
return this.docsStore.setDocModeSetting(this.id, mode);
}
getMode() {
return this.docsStore.getDocModeSetting(this.id);
}
toggleMode() {
this.setMode(this.mode$.value === 'edgeless' ? 'page' : 'edgeless');
return this.mode$.value;
const mode = this.getMode() === 'edgeless' ? 'page' : 'edgeless';
this.setMode(mode);
return this.getMode();
}
observeMode() {
return this.docsStore.watchDocModeSetting(this.id);
}
title$ = this.meta$.map(meta => meta.title ?? '');

View File

@@ -76,7 +76,11 @@ export class DocsStore extends Store {
}
setDocModeSetting(id: string, mode: DocMode) {
this.localState.set(`page:${id}:mode`, mode);
return this.localState.set(`page:${id}:mode`, mode);
}
getDocModeSetting(id: string) {
return this.localState.get<DocMode>(`page:${id}:mode`);
}
watchDocModeSetting(id: string) {

View File

@@ -75,12 +75,12 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@blocksuite/block-std": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/blocks": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/global": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/block-std": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/blocks": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/global": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/icons": "2.1.55",
"@blocksuite/presets": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/store": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/presets": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/store": "0.15.0-canary-202406121423-a4241b5",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",

View File

@@ -18,13 +18,13 @@
"@affine/graphql": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/block-std": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/blocks": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/global": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/block-std": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/blocks": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/global": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/icons": "2.1.55",
"@blocksuite/inline": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/presets": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/store": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/inline": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/presets": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/store": "0.15.0-canary-202406121423-a4241b5",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",

View File

@@ -15,7 +15,13 @@ import {
PageEditor,
} from '@blocksuite/presets';
import type { Doc } from '@blocksuite/store';
import { type DocMode, useLiveData, useService } from '@toeverything/infra';
import {
type DocMode,
DocService,
DocsService,
useLiveData,
useService,
} from '@toeverything/infra';
import React, {
forwardRef,
Fragment,
@@ -30,6 +36,7 @@ import { PagePropertiesTable } from '../../affine/page-properties';
import { AffinePageReference } from '../../affine/reference-link';
import { BlocksuiteEditorJournalDocTitle } from './journal-doc-title';
import {
patchDocModeService,
patchForSharedPage,
patchNotificationService,
patchPeekViewService,
@@ -73,6 +80,8 @@ const usePatchSpecs = (page: Doc, shared: boolean, mode: DocMode) => {
const [reactToLit, portals] = useLitPortalFactory();
const peekViewService = useService(PeekViewService);
const quickSearchService = useService(QuickSearchService);
const docService = useService(DocService);
const docsService = useService(DocsService);
const referenceRenderer: ReferenceReactRenderer = useMemo(() => {
return function customReference(reference) {
const pageId = reference.delta.attributes?.reference?.pageId;
@@ -101,9 +110,14 @@ const usePatchSpecs = (page: Doc, shared: boolean, mode: DocMode) => {
if (shared) {
patched = patchForSharedPage(patched);
}
if (!page.readonly) {
patched = patchDocModeService(patched, docService, docsService);
}
return patched;
}, [
confirmModal,
docService,
docsService,
page.readonly,
peekViewService,
quickSearchService,

View File

@@ -25,6 +25,7 @@ import {
ReferenceNodeConfig,
type RootService,
} from '@blocksuite/blocks';
import type { DocMode, DocService, DocsService } from '@toeverything/infra';
import { html, LitElement, type TemplateResult } from 'lit';
import { customElement } from 'lit/decorators.js';
import { literal } from 'lit/static-html.js';
@@ -281,6 +282,57 @@ export function patchPeekViewService(
return specs;
}
export function patchDocModeService(
specs: BlockSpec[],
docService: DocService,
docsService: DocsService
) {
const rootSpec = specs.find(
spec => spec.schema.model.flavour === 'affine:page'
) as BlockSpec<string, RootService>;
if (!rootSpec) {
return specs;
}
patchSpecService(rootSpec, pageService => {
const DEFAULT_MODE = 'page';
pageService.docModeService = {
setMode: (mode: DocMode, id?: string) => {
if (id) {
docsService.list.setMode(id, mode);
} else {
docService.doc.setMode(mode);
}
},
getMode: (id?: string) => {
const mode = id
? docsService.list.getMode(id)
: docService.doc.getMode();
return mode || DEFAULT_MODE;
},
toggleMode: (id?: string) => {
const mode = id
? docsService.list.toggleMode(id)
: docService.doc.toggleMode();
return mode || DEFAULT_MODE;
},
onModeChange: (handler: (mode: DocMode) => void, id?: string) => {
// eslint-disable-next-line rxjs/finnish
const mode$ = id
? docsService.list.observeMode(id)
: docService.doc.observeMode();
const sub = mode$.subscribe(m => handler(m || DEFAULT_MODE));
return {
dispose: sub.unsubscribe,
};
},
};
});
return specs;
}
export function patchQuickSearchService(
specs: BlockSpec[],
service: QuickSearchService

View File

@@ -21,12 +21,17 @@ const EditorChatPanel = ({ editor }: SidebarTabProps) => {
if (!editor) return;
const pageService = editor.host.spec.getService('affine:page');
pageService.slots.docLinkClicked.on(() => {
(chatPanelRef.current as ChatPanel).doc = editor.doc;
});
pageService.slots.editorModeSwitch.on(() => {
(chatPanelRef.current as ChatPanel).host = editor.host;
});
const disposable = [
pageService.slots.docLinkClicked.on(() => {
(chatPanelRef.current as ChatPanel).doc = editor.doc;
}),
pageService.docModeService.onModeChange(() => {
if (!editor.host) return;
(chatPanelRef.current as ChatPanel).host = editor.host;
}),
];
return () => disposable.forEach(d => d.dispose());
}, [editor]);
if (!editor) {

View File

@@ -186,8 +186,6 @@ const DetailPageImpl = memo(function DetailPageImpl() {
editorHost.std.spec.getService<PageRootService>('affine:page');
const disposable = new DisposableGroup();
pageService.getEditorMode = (pageId: string) =>
docRecordList.doc$(pageId).value?.mode$.value ?? 'page';
pageService.getDocUpdatedAt = (pageId: string) => {
const linkedPage = docRecordList.doc$(pageId).value;
if (!linkedPage) return new Date();
@@ -210,11 +208,6 @@ const DetailPageImpl = memo(function DetailPageImpl() {
jumpToTag(workspace.id, tagId);
})
);
disposable.add(
pageService.slots.editorModeSwitch.on(mode => {
doc.setMode(mode);
})
);
setEditor(editor);

View File

@@ -29,10 +29,10 @@
"@affine/env": "workspace:*",
"@affine/i18n": "workspace:*",
"@affine/native": "workspace:*",
"@blocksuite/block-std": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/blocks": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/presets": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/store": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/block-std": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/blocks": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/presets": "0.15.0-canary-202406121423-a4241b5",
"@blocksuite/store": "0.15.0-canary-202406121423-a4241b5",
"@electron-forge/cli": "^7.3.0",
"@electron-forge/core": "^7.3.0",
"@electron-forge/core-utils": "^7.3.0",

View File

@@ -27,11 +27,11 @@ test('can open peek view via link popover', async ({ page }) => {
).toBeVisible();
// click more button
await page
.locator('.affine-reference-popover-container')
.locator('icon-button')
.last()
.click();
// await page
// .locator('.affine-reference-popover-container')
// .locator('icon-button')
// .last()
// .click();
await page.locator('icon-button:has-text("center peek")').click();
// verify peek view is opened

View File

@@ -6,7 +6,7 @@
"@affine/env": "workspace:*",
"@affine/templates": "workspace:*",
"@aws-sdk/client-s3": "3.592.0",
"@blocksuite/presets": "0.15.0-canary-202406111431-81a6bee",
"@blocksuite/presets": "0.15.0-canary-202406121423-a4241b5",
"@clack/core": "^0.3.4",
"@clack/prompts": "^0.7.0",
"@magic-works/i18n-codegen": "^0.6.0",

136
yarn.lock
View File

@@ -166,7 +166,7 @@ __metadata:
"@affine/env": "workspace:*"
"@affine/templates": "workspace:*"
"@aws-sdk/client-s3": "npm:3.592.0"
"@blocksuite/presets": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets": "npm:0.15.0-canary-202406121423-a4241b5"
"@clack/core": "npm:^0.3.4"
"@clack/prompts": "npm:^0.7.0"
"@magic-works/i18n-codegen": "npm:^0.6.0"
@@ -219,12 +219,12 @@ __metadata:
"@affine/electron-api": "workspace:*"
"@affine/graphql": "workspace:*"
"@affine/i18n": "workspace:*"
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/blocks": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/icons": "npm:2.1.55"
"@blocksuite/presets": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@dnd-kit/core": "npm:^6.1.0"
"@dnd-kit/modifiers": "npm:^7.0.0"
"@dnd-kit/sortable": "npm:^8.0.0"
@@ -320,13 +320,13 @@ __metadata:
"@affine/graphql": "workspace:*"
"@affine/i18n": "workspace:*"
"@affine/templates": "workspace:*"
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/blocks": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/icons": "npm:2.1.55"
"@blocksuite/inline": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/inline": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/presets": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@dnd-kit/core": "npm:^6.1.0"
"@dnd-kit/modifiers": "npm:^7.0.0"
"@dnd-kit/sortable": "npm:^8.0.0"
@@ -449,10 +449,10 @@ __metadata:
"@affine/env": "workspace:*"
"@affine/i18n": "workspace:*"
"@affine/native": "workspace:*"
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/blocks": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/presets": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@electron-forge/cli": "npm:^7.3.0"
"@electron-forge/core": "npm:^7.3.0"
"@electron-forge/core-utils": "npm:^7.3.0"
@@ -508,8 +508,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/env@workspace:packages/common/env"
dependencies:
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
lit: "npm:^3.1.2"
react: "npm:18.3.1"
react-dom: "npm:18.3.1"
@@ -3564,30 +3564,30 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/block-std@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/block-std@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/block-std@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
lit: "npm:^3.1.3"
lz-string: "npm:^1.5.0"
w3c-keyname: "npm:^2.2.8"
zod: "npm:^3.23.8"
peerDependencies:
"@blocksuite/inline": 0.15.0-canary-202406111431-81a6bee
"@blocksuite/store": 0.15.0-canary-202406111431-81a6bee
checksum: 10/cd10b4098c8b08daea7d99460059bb5f632c6241aad8dc5e9aa40f7ce46cf1dded1b3ee4d23030a58401567ea7db58a7711c4e846c44850861ccc10c73f8998f
"@blocksuite/inline": 0.15.0-canary-202406121423-a4241b5
"@blocksuite/store": 0.15.0-canary-202406121423-a4241b5
checksum: 10/67212f6164e7cf993283fca9e7a0089897cb6849c28781e171a2d27e42c3cbd4a2525bf6ef4db8cabab9006006bd69e11c06730de8c1d759e6f6ef905619f916
languageName: node
linkType: hard
"@blocksuite/blocks@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/blocks@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/blocks@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/inline": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/inline": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@dotlottie/player-component": "npm:^2.7.12"
"@floating-ui/dom": "npm:^1.6.5"
"@lit/context": "npm:^1.1.1"
@@ -3624,17 +3624,17 @@ __metadata:
sortablejs: "npm:^1.15.2"
unified: "npm:^11.0.4"
zod: "npm:^3.23.8"
checksum: 10/d7e6d246bff5a543ed0cc787990d5d5b8d5b8df4a293d16978d17419ab114156eacc18bd9a01703c9ad29373d3fdab2a094eef0ba5e739d87bcbeec4110f8333
checksum: 10/7435048506ee0a17b774bdfe67d4a8e95322d2eaee8be1e4aa8f0c875ad4fccd2111163b2baac697e3c86a6a0eef7100a8e19382ea3798465b3e521a64a0e9dc
languageName: node
linkType: hard
"@blocksuite/global@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/global@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/global@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
lib0: "npm:^0.2.94"
zod: "npm:^3.23.8"
checksum: 10/118af0136d3e912c071c0c9826a009f0df778e5a8d296001dc6cbe53b341bf6dbdda91097489d3999655cfd6c7e37be77796c78d0c2651f0bb47d667135e5762
checksum: 10/d32736c147eb4370b2754b8f05efecf0e036dd460c0e39e8b4beb244ffdd6bf4aa07c65418bdf4a51ad1d368b7da5d34e650b21c10bfc143dabf55591a68eb8d
languageName: node
linkType: hard
@@ -3648,45 +3648,45 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/inline@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/inline@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/inline@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/inline@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
zod: "npm:^3.23.8"
peerDependencies:
lit: ^3.1.1
yjs: ^13.6.15
checksum: 10/704f8dcebff549b9fca29a77ce44a5f2beecffbcdca3ee9bd51b8fcab17c707576c8a3cb8859f942a8e91cc2196709fbf6265d0e5529625ee1a405fd7f69f839
checksum: 10/fcd9156c180d8a6c4491b2e539fc38597ea7ac1993f066c94b326874b713aa85d3e9a8125e49498006452e6c4ba2956d51cf5e94a10fc2be041b1584119d2268
languageName: node
linkType: hard
"@blocksuite/presets@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/presets@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/presets@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/inline": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/blocks": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/inline": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@dotlottie/player-component": "npm:^2.7.12"
"@fal-ai/serverless-client": "npm:^0.10.0"
"@floating-ui/dom": "npm:^1.6.5"
"@toeverything/theme": "npm:^0.7.32"
lit: "npm:^3.1.3"
openai: "npm:^4.47.2"
checksum: 10/3e75f6988bbc2d349141b267e82fb2014de5a459d0e269f5dfd5ef76134b8e2301e1d13557c5d2d0b0701144c436175e919071e80d8b90a473d43637eb1aa6f3
checksum: 10/c17841dfc3728e94799d434fe9e37bdbe8c117ad465542ae84cc7a199a54e958bd3c4de83023990311a7f29c7637b7e8a55ea667a3ffbf7a3eea42f54b5e090c
languageName: node
linkType: hard
"@blocksuite/store@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/store@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/store@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/inline": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/sync": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/inline": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/sync": "npm:0.15.0-canary-202406121423-a4241b5"
"@types/flexsearch": "npm:^0.7.6"
flexsearch: "npm:0.7.43"
lib0: "npm:^0.2.94"
@@ -3697,21 +3697,21 @@ __metadata:
zod: "npm:^3.23.8"
peerDependencies:
yjs: ^13.6.15
checksum: 10/f22007006495417db53368bd3f37750549bbcf5f9f968c549829cc34c0dcff26f92e5019576cf1eaf416fdf9ea4fc8d313652b3d3f4e4a990ec9f3305d6425df
checksum: 10/562ef6d44ef3da4c669dc88f7635918a188e2d0a10ea2f6cb3ed20155728a888d4c559e746c92be199ae481b1924aa1afa08d17a1f57570f3776b3d7d2c888df
languageName: node
linkType: hard
"@blocksuite/sync@npm:0.15.0-canary-202406111431-81a6bee":
version: 0.15.0-canary-202406111431-81a6bee
resolution: "@blocksuite/sync@npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/sync@npm:0.15.0-canary-202406121423-a4241b5":
version: 0.15.0-canary-202406121423-a4241b5
resolution: "@blocksuite/sync@npm:0.15.0-canary-202406121423-a4241b5"
dependencies:
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
idb: "npm:^8.0.0"
idb-keyval: "npm:^6.2.1"
y-protocols: "npm:^1.0.6"
peerDependencies:
yjs: ^13.6.15
checksum: 10/75c8c2d88cd2e22d32b7e75901fee99f2a1cf43c43a9a193424cb4ddf098cf086726e64ac8f312eba8fb2a0b212932070b1410c6b5a77c2726a2d4e8f6558634
checksum: 10/de90f48a5fdf788235592f30bd69a6ca31f3de0860e6d54a08f3d2eb84616a09344eb6b74eac3f2a22a80be3b891210512149aaa9f262a426b001b7eae314011
languageName: node
linkType: hard
@@ -14254,11 +14254,11 @@ __metadata:
"@affine/debug": "workspace:*"
"@affine/env": "workspace:*"
"@affine/templates": "workspace:*"
"@blocksuite/block-std": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/blocks": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/global": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/presets": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/store": "npm:0.15.0-canary-202406111431-81a6bee"
"@blocksuite/block-std": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/blocks": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/global": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/presets": "npm:0.15.0-canary-202406121423-a4241b5"
"@blocksuite/store": "npm:0.15.0-canary-202406121423-a4241b5"
"@datastructures-js/binary-search-tree": "npm:^5.3.2"
"@testing-library/react": "npm:^16.0.0"
async-call-rpc: "npm:^6.4.0"