There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore: bump blocksuite (#8230)
fundonf397815ad1f7
diff --git a/packages/common/env/package.json b/packages/common/env/package.jsonindex fe0b829f46..856b95e82c 100644--- a/packages/common/env/package.json+++ b/packages/common/env/package.json@@ -3,8 +3,8 @@"private": true,"type": "module","devDependencies": {- "@blocksuite/global": "0.17.10",- "@blocksuite/store": "0.17.10",+ "@blocksuite/global": "0.17.11",+ "@blocksuite/store": "0.17.11","vitest": "2.1.0"},"exports": {diff --git a/packages/common/infra/package.json b/packages/common/infra/package.jsonindex 71adf0ee20..21a3890917 100644--- a/packages/common/infra/package.json+++ b/packages/common/infra/package.json@@ -14,10 +14,10 @@"@affine/debug": "workspace:*","@affine/env": "workspace:*","@affine/templates": "workspace:*",- "@blocksuite/blocks": "0.17.10",- "@blocksuite/global": "0.17.10",- "@blocksuite/presets": "0.17.10",- "@blocksuite/store": "0.17.10",+ "@blocksuite/blocks": "0.17.11",+ "@blocksuite/global": "0.17.11",+ "@blocksuite/presets": "0.17.11",+ "@blocksuite/store": "0.17.11","@datastructures-js/binary-search-tree": "^5.3.2","foxact": "^0.2.33","fuse.js": "^7.0.0",@@ -34,7 +34,7 @@"devDependencies": {"@affine-test/fixtures": "workspace:*","@affine/templates": "workspace:*",- "@blocksuite/presets": "0.17.10",+ "@blocksuite/presets": "0.17.11","@testing-library/react": "^16.0.0","fake-indexeddb": "^6.0.0","react": "^18.2.0",diff --git a/packages/frontend/apps/electron/package.json b/packages/frontend/apps/electron/package.jsonindex ddc305d73a..e658148ca9 100644--- a/packages/frontend/apps/electron/package.json+++ b/packages/frontend/apps/electron/package.json@@ -28,7 +28,7 @@"@affine/core": "workspace:*","@affine/i18n": "workspace:*","@affine/native": "workspace:*",- "@blocksuite/global": "0.17.10",+ "@blocksuite/global": "0.17.11","@electron-forge/cli": "^7.3.0","@electron-forge/core": "^7.3.0","@electron-forge/core-utils": "^7.3.0",diff --git a/packages/frontend/apps/mobile/package.json b/packages/frontend/apps/mobile/package.jsonindex 44bc14a1f3..9c32648c69 100644--- a/packages/frontend/apps/mobile/package.json+++ b/packages/frontend/apps/mobile/package.json@@ -13,7 +13,7 @@"@affine/component": "workspace:*","@affine/core": "workspace:*","@affine/i18n": "workspace:*",- "@blocksuite/blocks": "0.17.10",+ "@blocksuite/blocks": "0.17.11","@blocksuite/icons": "^2.1.67","@sentry/react": "^8.0.0","react": "^18.2.0",diff --git a/packages/frontend/component/package.json b/packages/frontend/component/package.jsonindex e370e32953..55bcbf7fa8 100644--- a/packages/frontend/component/package.json+++ b/packages/frontend/component/package.json@@ -63,7 +63,7 @@"zod": "^3.22.4"},"devDependencies": {- "@blocksuite/global": "0.17.10",+ "@blocksuite/global": "0.17.11","@blocksuite/icons": "2.1.67","@chromatic-com/storybook": "^2.0.0","@storybook/addon-essentials": "^8.2.9",diff --git a/packages/frontend/core/package.json b/packages/frontend/core/package.jsonindex 1d1cab4af2..c493ba68a9 100644--- a/packages/frontend/core/package.json+++ b/packages/frontend/core/package.json@@ -16,13 +16,13 @@"@affine/i18n": "workspace:*","@affine/templates": "workspace:*","@affine/track": "workspace:*",- "@blocksuite/block-std": "0.17.10",- "@blocksuite/blocks": "0.17.10",- "@blocksuite/global": "0.17.10",+ "@blocksuite/block-std": "0.17.11",+ "@blocksuite/blocks": "0.17.11",+ "@blocksuite/global": "0.17.11","@blocksuite/icons": "2.1.67",- "@blocksuite/inline": "0.17.10",- "@blocksuite/presets": "0.17.10",- "@blocksuite/store": "0.17.10",+ "@blocksuite/inline": "0.17.11",+ "@blocksuite/presets": "0.17.11",+ "@blocksuite/store": "0.17.11","@dnd-kit/core": "^6.1.0","@dnd-kit/modifiers": "^7.0.0","@dnd-kit/sortable": "^8.0.0",diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsxindex 06932655e2..2d8ffbe559 100644--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx@@ -34,7 +34,6 @@ import type {DocMode,DocModeProvider,QuickSearchResult,- ReferenceParams,RootService,} from '@blocksuite/blocks';import {@@ -42,12 +41,10 @@ import {DocModeExtension,EdgelessRootBlockComponent,EmbedLinkedDocBlockComponent,- EmbedOptionProvider,NotificationExtension,ParseDocUrlExtension,PeekViewExtension,QuickSearchExtension,- QuickSearchProvider,ReferenceNodeConfigExtension,} from '@blocksuite/blocks';import { AIChatBlockSchema } from '@blocksuite/presets';@@ -62,6 +59,7 @@ import {import { type TemplateResult } from 'lit';import { customElement } from 'lit/decorators.js';import { literal } from 'lit/static-html.js';+import { pick } from 'lodash-es';export type ReferenceReactRenderer = (reference: AffineReference@@ -318,14 +316,13 @@ export function patchQuickSearchService(framework: FrameworkProvider) {}if (result.source === 'link') {- const { docId, blockIds, elementIds, mode } = result.payload;resolve({- docId,- params: {- blockIds,- elementIds,- mode,- },+ docId: result.payload.docId,+ params: pick(result.payload, [+ 'mode',+ 'blockIds',+ 'elementIds',+ ]),});return;}@@ -349,13 +346,8 @@ export function patchQuickSearchService(framework: FrameworkProvider) {primaryMode: mode,docProps,});- track.doc.editor.quickSearch.createDoc({- mode,- });- resolve({- docId: newDoc.id,- });+ resolve({ docId: newDoc.id });return;}},@@ -373,6 +365,7 @@ export function patchQuickSearchService(framework: FrameworkProvider) {return searchResult;},});+const SlashMenuQuickSearchExtension = patchSpecService<RootService>('affine:page',() => {},@@ -383,51 +376,38 @@ export function patchQuickSearchService(framework: FrameworkProvider) {'action' in item &&(item.name === 'Linked Doc' || item.name === 'Link')) {- const oldAction = item.action;- item.action = async ({ model, rootComponent }) => {- const { host, std } = rootComponent;- const quickSearchService =- component.std.getOptional(QuickSearchProvider);-- if (!quickSearchService)- return oldAction({ model, rootComponent });-- const result = await quickSearchService.openQuickSearch();- if (result === null) return;-- if ('docId' in result) {- const linkedDoc = std.collection.getDoc(result.docId);- if (!linkedDoc) return;-- const props: {- flavour: string;- pageId: string;- params?: ReferenceParams;- } = {- flavour: 'affine:embed-linked-doc',- pageId: linkedDoc.id,- };-- if (result.params) {- props.params = result.params;- }-- host.doc.addSiblingBlocks(model, [props]);-- track.doc.editor.slashMenu.linkDoc({ control: 'linkDoc' });- } else if (result.externalUrl) {- const embedOptions = std- .get(EmbedOptionProvider)- .getEmbedBlockOptions(result.externalUrl);- if (!embedOptions) return;-- host.doc.addSiblingBlocks(model, [- {- flavour: embedOptions.flavour,- url: result.externalUrl,- },- ]);- }+ item.action = async ({ rootComponent }) => {+ // TODO(@Mirone): fix the type+ // @ts-expect-error fixme+ const { success, insertedLinkType } =+ // @ts-expect-error fixme+ rootComponent.std.command.exec('insertLinkByQuickSearch');++ if (!success) return;++ // TODO(@Mirone): fix the type+ insertedLinkType+ ?.then(+ (type: {+ flavour?: 'affine:embed-linked-doc' | 'affine:bookmark';+ }) => {+ const flavour = type?.flavour;+ if (!flavour) return;++ if (flavour === 'affine:embed-linked-doc') {+ track.doc.editor.slashMenu.linkDoc({+ control: 'linkDoc',+ });+ return;+ }++ if (flavour === 'affine:bookmark') {+ track.doc.editor.slashMenu.bookmark();+ return;+ }+ }+ )+ .catch(console.error);};}});diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/widgets/linked.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/widgets/linked.tsindex 5c0ff70570..fd4c8ea163 100644--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/widgets/linked.ts+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/widgets/linked.ts@@ -16,7 +16,10 @@ import {WorkspaceService,} from '@toeverything/infra';-export function createLinkedWidgetConfig(framework: FrameworkProvider) {+// TODO: fix the type+export function createLinkedWidgetConfig(+ framework: FrameworkProvider+): Partial<Record<string, unknown>> {return {getMenus: (query: string,diff --git a/packages/frontend/core/src/components/hooks/affine/use-share-url.ts b/packages/frontend/core/src/components/hooks/affine/use-share-url.tsindex 16d2970108..597d636310 100644--- a/packages/frontend/core/src/components/hooks/affine/use-share-url.ts+++ b/packages/frontend/core/src/components/hooks/affine/use-share-url.ts@@ -1,5 +1,6 @@import { notify } from '@affine/component';import { getAffineCloudBaseUrl } from '@affine/core/modules/cloud/services/fetch';+import { toURLSearchParams } from '@affine/core/utils';import { useI18n } from '@affine/i18n';import { track } from '@affine/track';import { type EditorHost } from '@blocksuite/block-std';@@ -34,20 +35,14 @@ export const generateUrl = ({if (!baseUrl) return null;try {- const url = new URL(`${baseUrl}/workspace/${workspaceId}/${pageId}`);- const search = url.searchParams;- if (shareMode) {- search.append('mode', shareMode);- }- if (blockIds && blockIds.length > 0) {- search.append('blockIds', blockIds.join(','));- }- if (elementIds && elementIds.length > 0) {- search.append('elementIds', elementIds.join(','));- }- if (xywh) {- search.append('xywh', xywh);- }+ const url = new URL(`/workspace/${workspaceId}/${pageId}`, baseUrl);+ const search = toURLSearchParams({+ mode: shareMode,+ blockIds,+ elementIds,+ xywh,+ });+ if (search) url.search = search.toString();return url.toString();} catch {return null;diff --git a/packages/frontend/core/src/mobile/components/search-input/index.tsx b/packages/frontend/core/src/mobile/components/search-input/index.tsxindex 968f0bbf50..31612bfe07 100644--- a/packages/frontend/core/src/mobile/components/search-input/index.tsx+++ b/packages/frontend/core/src/mobile/components/search-input/index.tsx@@ -1,5 +1,5 @@import { useAutoFocus } from '@affine/component';-import { getSvgPath } from '@blocksuite/global/utils';+import { getFigmaSquircleSvgPath } from '@blocksuite/global/utils';import { SearchIcon } from '@blocksuite/icons/rc';import clsx from 'clsx';import { debounce } from 'lodash-es';@@ -49,7 +49,13 @@ export const SearchInput = forwardRef<HTMLInputElement, SearchInputProps>(const [inputValue, setInputValue] = useState(value);const clipPath = useMemo(- () => getSvgPath({ width, height, cornerRadius, cornerSmoothing }),+ () =>+ getFigmaSquircleSvgPath({+ width,+ height,+ cornerRadius,+ cornerSmoothing,+ }),[cornerRadius, cornerSmoothing, height, width]);diff --git a/packages/frontend/core/src/modules/editor/entities/editor.ts b/packages/frontend/core/src/modules/editor/entities/editor.tsindex eddb4dc8d8..eaeb96391f 100644--- a/packages/frontend/core/src/modules/editor/entities/editor.ts+++ b/packages/frontend/core/src/modules/editor/entities/editor.ts@@ -1,10 +1,15 @@-import type { DocMode, EdgelessRootService } from '@blocksuite/blocks';+import type {+ DocMode,+ EdgelessRootService,+ ReferenceParams,+} from '@blocksuite/blocks';import type { InlineEditor } from '@blocksuite/inline';import type { AffineEditorContainer, DocTitle } from '@blocksuite/presets';import type { DocService, WorkspaceService } from '@toeverything/infra';import { Entity, LiveData } from '@toeverything/infra';import { isEqual } from 'lodash-es';+import { paramsParseOptions, preprocessParams } from '../../navigation/utils';import type { WorkbenchView } from '../../workbench';import { EditorScope } from '../scopes/editor';import type { EditorSelector } from '../types';@@ -58,22 +63,11 @@ export class Editor extends Entity {*/bindWorkbenchView(view: WorkbenchView) {// eslint-disable-next-line rxjs/finnish- const viewParams$ = view.queryString$<{- mode?: DocMode;- blockIds?: string[];- elementIds?: string[];- refreshKey?: string;- }>({- // Cannot handle single id situation correctly: `blockIds=xxx`- arrayFormat: 'none',- types: {- mode: value =>- value === 'page' || value === 'edgeless' ? value : undefined,- blockIds: value => (value.length ? value.split(',') : []),- elementIds: value => (value.length ? value.split(',') : []),- refreshKey: 'string',- },- });+ const viewParams$ = view+ .queryString$<+ ReferenceParams & { refreshKey?: string }+ >(paramsParseOptions)+ .map(preprocessParams);const stablePrimaryMode = this.doc.getPrimaryMode();diff --git a/packages/frontend/core/src/modules/editor/utils/scroll-anchoring.ts b/packages/frontend/core/src/modules/editor/utils/scroll-anchoring.tsindex 25c10cec2b..3471fa3a5b 100644--- a/packages/frontend/core/src/modules/editor/utils/scroll-anchoring.ts+++ b/packages/frontend/core/src/modules/editor/utils/scroll-anchoring.ts@@ -6,7 +6,6 @@ import type {EdgelessRootService,PageRootService,} from '@blocksuite/blocks';-import { ZOOM_MAX } from '@blocksuite/blocks';import { Bound, deserializeXYWH } from '@blocksuite/global/utils';function scrollAnchoringInEdgelessMode(@@ -47,8 +46,7 @@ function scrollAnchoringInEdgelessMode(const { zoom, centerX, centerY } = service.getFitToScreenData([20, 20, 100, 20],- [bounds],- ZOOM_MAX+ [bounds]);service.viewport.setCenter(centerX, centerY);diff --git a/packages/frontend/core/src/modules/navigation/__tests__/utils.spec.ts b/packages/frontend/core/src/modules/navigation/__tests__/utils.spec.tsindex 489f15ef9e..787d082495 100644--- a/packages/frontend/core/src/modules/navigation/__tests__/utils.spec.ts+++ b/packages/frontend/core/src/modules/navigation/__tests__/utils.spec.ts@@ -53,13 +53,37 @@ const testCases: [string, ReturnType<typeof resolveLinkToDoc>][] = [},],[- 'http//localhost:8000/workspace/48__RTCSwASvWZxyAk3Jw/-Uge-K6SYcAbcNYfQ5U-j?blockIds=xxxx',+ 'http//localhost:8000/workspace/48__RTCSwASvWZxyAk3Jw/-Uge-K6SYcAbcNYfQ5U-j?mode=page&blockIds=xxxx',{workspaceId: '48__RTCSwASvWZxyAk3Jw',docId: '-Uge-K6SYcAbcNYfQ5U-j',+ mode: 'page',blockIds: ['xxxx'],},],+ [+ 'http//localhost:8000/workspace/48__RTCSwASvWZxyAk3Jw/-Uge-K6SYcAbcNYfQ5U-j?mode=&blockIds=',+ {+ workspaceId: '48__RTCSwASvWZxyAk3Jw',+ docId: '-Uge-K6SYcAbcNYfQ5U-j',+ },+ ],+ [+ 'http//localhost:8000/workspace/48__RTCSwASvWZxyAk3Jw/-Uge-K6SYcAbcNYfQ5U-j?mode=edgeless&elementIds=yyyy',+ {+ workspaceId: '48__RTCSwASvWZxyAk3Jw',+ docId: '-Uge-K6SYcAbcNYfQ5U-j',+ mode: 'edgeless',+ elementIds: ['yyyy'],+ },+ ],+ [+ 'http//localhost:8000/workspace/48__RTCSwASvWZxyAk3Jw/-Uge-K6SYcAbcNYfQ5U-j?mode=edgeles&elementId=yyyy',+ {+ workspaceId: '48__RTCSwASvWZxyAk3Jw',+ docId: '-Uge-K6SYcAbcNYfQ5U-j',+ },+ ],];for (const [input, expected] of testCases) {diff --git a/packages/frontend/core/src/modules/navigation/utils.ts b/packages/frontend/core/src/modules/navigation/utils.tsindex 3d6119dad0..6944ecf42e 100644--- a/packages/frontend/core/src/modules/navigation/utils.ts+++ b/packages/frontend/core/src/modules/navigation/utils.ts@@ -1,4 +1,6 @@-import type { DocMode } from '@blocksuite/blocks';+import type { ReferenceParams } from '@blocksuite/blocks';+import { isNil, pick, pickBy } from 'lodash-es';+import type { ParsedQuery, ParseOptions } from 'query-string';import queryString from 'query-string';function maybeAffineOrigin(origin: string) {@@ -61,6 +63,23 @@ export const resolveRouteLinkMeta = (href: string) => {}};+export const isLink = (href: string) => {+ try {+ const hasScheme = href.match(/^https?:\/\//);++ if (!hasScheme) {+ const dotIdx = href.indexOf('.');+ if (dotIdx > 0 && dotIdx < href.length - 1) {+ href = `https://${href}`;+ }+ }++ return Boolean(URL.canParse?.(href) ?? new URL(href));+ } catch {+ return null;+ }+};+/*** @see /packages/frontend/core/src/router.tsx*/@@ -76,22 +95,49 @@ export const resolveLinkToDoc = (href: string) => {const meta = resolveRouteLinkMeta(href);if (!meta || meta.moduleName !== 'doc') return null;- const params: {- mode?: DocMode;- blockIds?: string[];- elementIds?: string[];- } = queryString.parse(meta.location.search, {- arrayFormat: 'none',- types: {- mode: value => (value === 'edgeless' ? 'edgeless' : 'page') as DocMode,- blockIds: value => value.split(','),- elementIds: value => value.split(','),- },- });+ const params = preprocessParams(+ queryString.parse(meta.location.search, paramsParseOptions)+ );return {- workspaceId: meta.workspaceId,- docId: meta.docId,+ ...pick(meta, ['workspaceId', 'docId']),...params,};};++export const preprocessParams = (+ params: ParsedQuery<string>+): ReferenceParams & { refreshKey?: string } => {+ const result: ReferenceParams & { refreshKey?: string } = pickBy(+ params,+ value => {+ if (isNil(value)) return false;+ if (typeof value === 'string' && value.length === 0) return false;+ if (Array.isArray(value) && value.length === 0) return false;+ return true;+ }+ );++ if (result.blockIds?.length) {+ result.blockIds = result.blockIds.filter(v => v.length);+ }+ if (result.elementIds?.length) {+ result.elementIds = result.elementIds.filter(v => v.length);+ }++ return pick(result, ['mode', 'blockIds', 'elementIds', 'refreshKey']);+};++export const paramsParseOptions: ParseOptions = {+ // Cannot handle single id situation correctly: `blockIds=xxx`+ arrayFormat: 'none',+ types: {+ mode: value =>+ value === 'page' || value === 'edgeless' ? value : undefined,+ blockIds: value =>+ value.length ? value.split(',').filter(v => v.length) : [],+ elementIds: value =>+ value.length ? value.split(',').filter(v => v.length) : [],+ refreshKey: 'string',+ },+};diff --git a/packages/frontend/core/src/modules/quicksearch/impls/external-links.ts b/packages/frontend/core/src/modules/quicksearch/impls/external-links.tsindex 4e843f7ab0..e55fbc12e3 100644--- a/packages/frontend/core/src/modules/quicksearch/impls/external-links.ts+++ b/packages/frontend/core/src/modules/quicksearch/impls/external-links.ts@@ -3,6 +3,7 @@ import type { WorkspaceService } from '@toeverything/infra';import { Entity, LiveData } from '@toeverything/infra';import { resolveLinkToDoc } from '../../navigation';+import { isLink } from '../../navigation/utils';import type { QuickSearchSession } from '../providers/quick-search-provider';import type { QuickSearchItem } from '../types/item';@@ -21,11 +22,10 @@ export class ExternalLinksQuickSearchSessionquery$ = new LiveData('');items$ = LiveData.computed(get => {- const query = get(this.query$);+ const query = get(this.query$).trim();if (!query) return [];- const isLink = query.startsWith('http://') || query.startsWith('https://');- if (!isLink) return [];+ if (!isLink(query)) return [];const resolvedDoc = resolveLinkToDoc(query);if (diff --git a/packages/frontend/core/src/modules/quicksearch/impls/links.ts b/packages/frontend/core/src/modules/quicksearch/impls/links.tsindex 2fb5593759..b914dafccc 100644--- a/packages/frontend/core/src/modules/quicksearch/impls/links.ts+++ b/packages/frontend/core/src/modules/quicksearch/impls/links.ts@@ -1,20 +1,16 @@-import type { DocMode } from '@blocksuite/blocks';+import type { ReferenceParams } from '@blocksuite/blocks';import { BlockLinkIcon, EdgelessIcon, PageIcon } from '@blocksuite/icons/rc';import type { DocsService, WorkspaceService } from '@toeverything/infra';import { Entity, LiveData } from '@toeverything/infra';-import { truncate } from 'lodash-es';+import { omit, truncate } from 'lodash-es';import { resolveLinkToDoc } from '../../navigation';+import { isLink } from '../../navigation/utils';import type { QuickSearchSession } from '../providers/quick-search-provider';import type { DocDisplayMetaService } from '../services/doc-display-meta';import type { QuickSearchItem } from '../types/item';-type LinkPayload = {- docId: string;- blockIds?: string[];- elementIds?: string[];- mode?: DocMode;-};+type LinkPayload = { docId: string } & ReferenceParams;export class LinksQuickSearchSessionextends Entity@@ -31,11 +27,10 @@ export class LinksQuickSearchSessionquery$ = new LiveData('');items$ = LiveData.computed(get => {- const query = get(this.query$);+ const query = get(this.query$).trim();if (!query) return [];- const isLink = query.startsWith('http://') || query.startsWith('https://');- if (!isLink) return [];+ if (!isLink(query)) return [];const resolvedDoc = resolveLinkToDoc(query);if (@@ -53,6 +48,13 @@ export class LinksQuickSearchSessionthis.docDisplayMetaService.getDocDisplayMeta(doc);const linkToNode = resolvedDoc.blockIds || resolvedDoc.elementIds;const score = 100;+ const payload = omit(resolvedDoc, ['workspaceId']);+ const icons = {+ page: PageIcon,+ edgeless: EdgelessIcon,+ node: BlockLinkIcon,+ other: icon,+ };return [{@@ -67,23 +69,12 @@ export class LinksQuickSearchSessionscore: 5,},label: {- title: title,+ title,},score,- icon: linkToNode- ? BlockLinkIcon- : resolvedDoc.mode === 'page'- ? PageIcon- : resolvedDoc.mode === 'edgeless'- ? EdgelessIcon- : icon,+ icon: icons[linkToNode ? 'node' : (resolvedDoc.mode ?? 'other')],timestamp: updatedDate,- payload: {- docId,- blockIds: resolvedDoc.blockIds,- elementIds: resolvedDoc.elementIds,- mode: resolvedDoc.mode,- },+ payload,} as QuickSearchItem<'link', LinkPayload>,];});diff --git a/packages/frontend/core/src/utils/url.ts b/packages/frontend/core/src/utils/url.tsindex 4218519531..0740033af5 100644--- a/packages/frontend/core/src/utils/url.ts+++ b/packages/frontend/core/src/utils/url.ts@@ -1,4 +1,5 @@import { appInfo } from '@affine/electron-api';+import { isNil } from 'lodash-es';interface AppUrlOptions {desktop?: boolean | string;@@ -32,12 +33,24 @@ export function buildAppUrl(path: string, opts: AppUrlOptions = {}) {}}-export function toURLSearchParams(params?: Record<string, string | string[]>) {+export function toURLSearchParams(+ params?: Partial<Record<string, string | string[]>>+) {if (!params) return;++ const items = Object.entries(params)+ .filter(([_, v]) => !isNil(v))+ .filter(([_, v]) => {+ if (typeof v === 'string') {+ return v.length > 0;+ }+ if (Array.isArray(v)) {+ return v.length > 0;+ }+ return false;+ }) as [string, string | string[]][];+return new URLSearchParams(- Object.entries(params).map(([k, v]) => [- k,- Array.isArray(v) ? v.join(',') : v,- ])+ items.map(([k, v]) => [k, Array.isArray(v) ? v.join(',') : v]));}diff --git a/packages/frontend/track/src/events.ts b/packages/frontend/track/src/events.tsindex 4f85f575f7..e7c73ac2d4 100644--- a/packages/frontend/track/src/events.ts+++ b/packages/frontend/track/src/events.ts@@ -45,7 +45,8 @@ type DocEvents =| 'switchPageMode'| 'openDocOptionsMenu'| 'openDocInfo'- | 'copyBlockToLink';+ | 'copyBlockToLink'+ | 'bookmark';type EditorEvents = 'bold' | 'italic' | 'underline' | 'strikeThrough';// END SECTION@@ -262,7 +263,7 @@ const PageEvents = {},doc: {editor: {- slashMenu: ['linkDoc', 'createDoc'],+ slashMenu: ['linkDoc', 'createDoc', 'bookmark'],atMenu: ['linkDoc'],quickSearch: ['createDoc'],formatToolbar: ['bold'],diff --git a/tests/affine-local/e2e/quick-search.spec.ts b/tests/affine-local/e2e/quick-search.spec.tsindex 50ab868d3f..acc45822de 100644--- a/tests/affine-local/e2e/quick-search.spec.ts+++ b/tests/affine-local/e2e/quick-search.spec.ts@@ -572,3 +572,34 @@ test('can use slash menu to insert a newly created doc card', async ({page.locator('.affine-embed-linked-doc-content-title')).toContainText(testTitle);});++test('can use slash menu to insert an external link', async ({ page }) => {+ await openHomePage(page);+ await clickNewPageButton(page);++ // goto main content+ await page.keyboard.press('Enter');++ // open slash menu+ await page.keyboard.type('/link', {+ delay: 50,+ });+ await page.keyboard.press('Enter');+ await expect(page.getByTestId('cmdk-quick-search')).toBeVisible();++ const link = 'affine.pro';+ await page.locator('[cmdk-input]').fill(link);++ const insertLinkBtn = page.locator(+ '[cmdk-item] [data-value="external-link:affine.pro"]'+ );++ await expect(insertLinkBtn).toBeVisible();++ await insertLinkBtn.click();++ await expect(page.locator('affine-bookmark')).toBeVisible();+ await expect(page.locator('.affine-bookmark-content-url')).toContainText(+ link+ );+});diff --git a/tools/cli/package.json b/tools/cli/package.jsonindex 3870742003..2985774a85 100644--- a/tools/cli/package.json+++ b/tools/cli/package.json@@ -6,7 +6,7 @@"@affine/env": "workspace:*","@affine/templates": "workspace:*","@aws-sdk/client-s3": "^3.620.0",- "@blocksuite/presets": "0.17.10",+ "@blocksuite/presets": "0.17.11","@clack/core": "^0.3.4","@clack/prompts": "^0.7.0","@magic-works/i18n-codegen": "^0.6.0",diff --git a/yarn.lock b/yarn.lockindex 4421516351..73a2cb8b5d 100644--- a/yarn.lock+++ b/yarn.lock@@ -237,7 +237,7 @@ __metadata:"@affine/env": "workspace:*""@affine/templates": "workspace:*""@aws-sdk/client-s3": "npm:^3.620.0"- "@blocksuite/presets": "npm:0.17.10"+ "@blocksuite/presets": "npm:0.17.11""@clack/core": "npm:^0.3.4""@clack/prompts": "npm:^0.7.0""@magic-works/i18n-codegen": "npm:^0.6.0"@@ -294,7 +294,7 @@ __metadata:"@affine/i18n": "workspace:*""@atlaskit/pragmatic-drag-and-drop": "npm:^1.2.1""@atlaskit/pragmatic-drag-and-drop-hitbox": "npm:^1.0.3"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11""@blocksuite/icons": "npm:2.1.67""@chromatic-com/storybook": "npm:^2.0.0""@emotion/react": "npm:^11.11.4"@@ -367,13 +367,13 @@ __metadata:"@affine/i18n": "workspace:*""@affine/templates": "workspace:*""@affine/track": "workspace:*"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/blocks": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/blocks": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11""@blocksuite/icons": "npm:2.1.67"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/presets": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/presets": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@dnd-kit/core": "npm:^6.1.0""@dnd-kit/modifiers": "npm:^7.0.0""@dnd-kit/sortable": "npm:^8.0.0"@@ -478,7 +478,7 @@ __metadata:"@affine/core": "workspace:*""@affine/i18n": "workspace:*""@affine/native": "workspace:*"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11""@electron-forge/cli": "npm:^7.3.0""@electron-forge/core": "npm:^7.3.0""@electron-forge/core-utils": "npm:^7.3.0"@@ -530,8 +530,8 @@ __metadata:version: 0.0.0-use.localresolution: "@affine/env@workspace:packages/common/env"dependencies:- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11"vitest: "npm:2.1.0"zod: "npm:^3.22.4"peerDependencies:@@ -583,7 +583,7 @@ __metadata:"@affine/component": "workspace:*""@affine/core": "workspace:*""@affine/i18n": "workspace:*"- "@blocksuite/blocks": "npm:0.17.10"+ "@blocksuite/blocks": "npm:0.17.11""@blocksuite/icons": "npm:^2.1.67""@sentry/react": "npm:^8.0.0""@types/react": "npm:^18.2.75"@@ -2445,17 +2445,19 @@ __metadata:languageName: nodelinkType: hard-"@blocksuite/affine-block-list@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-block-list@npm:0.17.10"+"@blocksuite/affine-block-embed@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-block-embed@npm:0.17.11"dependencies:- "@blocksuite/affine-components": "npm:0.17.10"- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/affine-block-surface": "npm:0.17.11"+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/icons": "npm:^2.1.67"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0"@@ -2463,21 +2465,21 @@ __metadata:lit: "npm:^3.2.0"minimatch: "npm:^10.0.1"zod: "npm:^3.23.8"- checksum: 10/1719b8300c90a48d891e12e638bf5f65d74703015cb384f9b6d5c474a88d0242efabd353f2d16e9aed8fd93521e12e93cd906bc3cf8c6eb6ae6f0b54f488e4c5+ checksum: 10/7eb41ff2330a6281e14b0f986b0358976fe44d91200add2b417090dde44a112222ee87910f826cc66c25a157f8789d878283222d824c82522f884f7092c1ac02languageName: nodelinkType: hard-"@blocksuite/affine-block-paragraph@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-block-paragraph@npm:0.17.10"+"@blocksuite/affine-block-list@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-block-list@npm:0.17.11"dependencies:- "@blocksuite/affine-components": "npm:0.17.10"- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0"@@ -2485,20 +2487,43 @@ __metadata:lit: "npm:^3.2.0"minimatch: "npm:^10.0.1"zod: "npm:^3.23.8"- checksum: 10/0d7f964732a1b1572f0937acd1e75f129202fb9b1053d8e82abdefb6eb0ba0bd276c6dd9c1ba1bf55d3016bf6327b43ad1141144d17641521c5a94eb7142364d+ checksum: 10/c18b602eee8414b31cc72b65cfe8097fb7731d3f1006fb6a0fd1e33ff07385f8083204b6f23ba6d8bfd877c63853858c92b10bfca650ee40294fe48a750fd447languageName: nodelinkType: hard-"@blocksuite/affine-block-surface@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-block-surface@npm:0.17.10"+"@blocksuite/affine-block-paragraph@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-block-paragraph@npm:0.17.11"dependencies:- "@blocksuite/affine-components": "npm:0.17.10"- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11"+ "@floating-ui/dom": "npm:^1.6.10"+ "@lit/context": "npm:^1.1.2"+ "@preact/signals-core": "npm:^1.8.0"+ "@toeverything/theme": "npm:^1.0.8"+ lit: "npm:^3.2.0"+ minimatch: "npm:^10.0.1"+ zod: "npm:^3.23.8"+ checksum: 10/ae307dd618faab8ebc5845cde3345039b206a99bd3f22f029cd0839450e942734ad8681f971f303fd758969477f2ed2505556e8267018dbb717c3f2f637b7f25+ languageName: node+ linkType: hard++"@blocksuite/affine-block-surface@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-block-surface@npm:0.17.11"+ dependencies:+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0""@toeverything/theme": "npm:^1.0.8"@@ -2506,21 +2531,21 @@ __metadata:lit: "npm:^3.2.0"nanoid: "npm:^5.0.7"zod: "npm:^3.23.8"- checksum: 10/7f062f917617749e9f8ba2905a64bd8b5a8eefc8ba1f3c4f4cca8d53246a062e9483d492af9e0092cb2460aad5c6e4c938a25c9634992b2d343b4e3e6a74a5b1+ checksum: 10/d8640fae0b87a53da451aadd52f7064d25ebc7558cd82aa8b4bf257a9cd3f6da2f7e013c78109ffbb15a26513e5d620b8b102cf8ea62b004d0745517c0ced08dlanguageName: nodelinkType: hard-"@blocksuite/affine-components@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-components@npm:0.17.10"+"@blocksuite/affine-components@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-components@npm:0.17.11"dependencies:- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11""@blocksuite/icons": "npm:^2.1.67"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@lottiefiles/dotlottie-wc": "npm:^0.2.16"@@ -2531,32 +2556,32 @@ __metadata:lit: "npm:^3.2.0"shiki: "npm:^1.12.0"zod: "npm:^3.23.8"- checksum: 10/33142a4baff7920538ccf966933b4b89c798c17f6835eb4e3aa7adf4547d5219c4ab184707a308b520e7f1152dfcf138ae2b62dd406c2a7b561eeaccc0ab0a7f+ checksum: 10/e6717c3008d7255ddf7618cd57a4b9b987c1ff0cdf9fd3a3c29341e4fd87f23fa3595b52e25ab9f515bf60161f0feb4a7530bd1f1ddbf2e2043939b7aa786e11languageName: nodelinkType: hard-"@blocksuite/affine-model@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-model@npm:0.17.10"+"@blocksuite/affine-model@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-model@npm:0.17.11"dependencies:- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11"zod: "npm:^3.23.8"- checksum: 10/d46edc80e3c1c5791f8e7c2c392b59fc27a226a56264f8b05c61586e83acb9b9bd08f072c5a3406b1c35f6dc8047a2d004102f8529a5062665cd8dd49c336ffa+ checksum: 10/4a4207eca8b978c17d10502c448c149710f8f73714681b997762e635302a2d3fa53ea96d138eac1893cc78b44c4e8affeb8bf8de94d92b30c46aa97304174a80languageName: nodelinkType: hard-"@blocksuite/affine-shared@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/affine-shared@npm:0.17.10"+"@blocksuite/affine-shared@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-shared@npm:0.17.11"dependencies:- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0"@@ -2566,17 +2591,32 @@ __metadata:lodash.mergewith: "npm:^4.6.2"minimatch: "npm:^10.0.1"zod: "npm:^3.23.8"- checksum: 10/2e685acdbbd0f686c2502bac0415c7e394627eeedf1af4e3dfefaf01e4718220f60bf9683b3d1f72a23047e17d13702be964a6c10e7fdbe886dd9a90699b41f3+ checksum: 10/8252f6fe55cfcd6e2d102ea57588c6f9d9b9e4f6dfd9aa2bf1e56b2fca07f679178f5d09f56bfaa341fced6a7f4245f4435a2f6d8d9154c9729f894439f15ff4+ languageName: node+ linkType: hard++"@blocksuite/affine-widget-scroll-anchoring@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/affine-widget-scroll-anchoring@npm:0.17.11"+ dependencies:+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@preact/signals-core": "npm:^1.8.0"+ "@toeverything/theme": "npm:^1.0.8"+ lit: "npm:^3.2.0"+ checksum: 10/a8d5db1033aac80d9a4e1d67ee38d8f62f196dada09af683ccc8cd16caf5fd066422763c361ffd9f2adec22dc0a1ba847721de289afcd15ef0ec83da8735892flanguageName: nodelinkType: hard-"@blocksuite/block-std@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/block-std@npm:0.17.10"+"@blocksuite/block-std@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/block-std@npm:0.17.11"dependencies:- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0""@types/hast": "npm:^3.0.4"@@ -2588,26 +2628,28 @@ __metadata:unified: "npm:^11.0.5"w3c-keyname: "npm:^2.2.8"zod: "npm:^3.23.8"- checksum: 10/8993b917c76569513ee60e89e739a82345fd324fe99b78dabf1263fbfea6237669775577f1bd99624e3188a5235d6057397467910e9c3379330a5269f7222f36+ checksum: 10/e5169b8ea01aea2806e6bbc6b13b3e1c5401e9b9de83381e13a05ad20e0284b98bd1c77e4760720c5e2a85bad4a91713d9db3849139af2fdce0d8c4760b2635clanguageName: nodelinkType: hard-"@blocksuite/blocks@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/blocks@npm:0.17.10"+"@blocksuite/blocks@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/blocks@npm:0.17.11"dependencies:- "@blocksuite/affine-block-list": "npm:0.17.10"- "@blocksuite/affine-block-paragraph": "npm:0.17.10"- "@blocksuite/affine-block-surface": "npm:0.17.10"- "@blocksuite/affine-components": "npm:0.17.10"- "@blocksuite/affine-model": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/data-view": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/affine-block-embed": "npm:0.17.11"+ "@blocksuite/affine-block-list": "npm:0.17.11"+ "@blocksuite/affine-block-paragraph": "npm:0.17.11"+ "@blocksuite/affine-block-surface": "npm:0.17.11"+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-model": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/affine-widget-scroll-anchoring": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/data-view": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11""@blocksuite/icons": "npm:^2.1.67"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0"@@ -2645,20 +2687,20 @@ __metadata:sortablejs: "npm:^1.15.2"unified: "npm:^11.0.5"zod: "npm:^3.23.8"- checksum: 10/d9c5c8d7669b67722991500bb53bb73066f58b2315ca4be33d12d856fc6428151564e8b4daf2f4034f48c925c46c28f6db2ad6f5190f9acc78e7a06ebfde263a+ checksum: 10/e122b2a08a15e38039d72275f18d9ccbcafdff719f9b275d4205754ef24d90f5423ebf7ba7ca61ebc93df3ee4070ffb6718d5b40c6be6a933cdfe1d8fa87495clanguageName: nodelinkType: hard-"@blocksuite/data-view@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/data-view@npm:0.17.10"+"@blocksuite/data-view@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/data-view@npm:0.17.11"dependencies:- "@blocksuite/affine-components": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/affine-components": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11""@blocksuite/icons": "npm:^2.1.67"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lit/context": "npm:^1.1.2""@preact/signals-core": "npm:^1.8.0"@@ -2667,17 +2709,17 @@ __metadata:lit: "npm:^3.2.0"sortablejs: "npm:^1.15.2"zod: "npm:^3.23.8"- checksum: 10/68de55a3a6f48189d3ebc95d27b962258090fa5cab1edd9006e496ca9808c081048811a6e7ee3548eb10af933ffe2ab90cc59fbf994ebb8cbe0ce6190b9817ff+ checksum: 10/bcbd2b0db35c0f61f797fff52bf83a212a5e92389a0a2fd85cde3a4647a42f034c1b0822da0c48d6cba00828b3263c1eea9563d9bcdfb922fb685007c6f9d651languageName: nodelinkType: hard-"@blocksuite/global@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/global@npm:0.17.10"+"@blocksuite/global@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/global@npm:0.17.11"dependencies:lib0: "npm:^0.2.97"zod: "npm:^3.23.8"- checksum: 10/4ccc854b28e7c3dc89ddf93eafefecec8b20c32cce3e3905bc29133265d1e0be4d21d3433bf5124864dfa69dbc81aa9173396d8bac4b6c495ffa3ff52347c52f+ checksum: 10/c23905faf72ff849e3dbdaf683ea0670133f7c4ee08279c645919895f447c453d702d6a91d59be0f93143d9d70078224f6b261e673b54a566ce46414ba72f5e8languageName: nodelinkType: hard@@ -2697,47 +2739,47 @@ __metadata:languageName: nodelinkType: hard-"@blocksuite/inline@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/inline@npm:0.17.10"+"@blocksuite/inline@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/inline@npm:0.17.11"dependencies:- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11"zod: "npm:^3.23.8"peerDependencies:lit: ^3.2.0yjs: ^13.6.18- checksum: 10/9aead8cd942811770e5bdfa7ff2bf7d38cdee05e39f824d4104cba3b0afec2400ae3cf0f94f8484f39d7ce04397af6996bbfe1d6b590042bb8d6bf63806efcf7+ checksum: 10/d3e4d3548ed67b1290ea97ebe61b319801f5ed7d58d57a09e42524eab34175d7a031441894c2c600fa6f35a526382dbeb82ffa0b1e610c9c62f9707f7172b7c8languageName: nodelinkType: hard-"@blocksuite/presets@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/presets@npm:0.17.10"+"@blocksuite/presets@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/presets@npm:0.17.11"dependencies:- "@blocksuite/affine-block-surface": "npm:0.17.10"- "@blocksuite/affine-shared": "npm:0.17.10"- "@blocksuite/block-std": "npm:0.17.10"- "@blocksuite/blocks": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/affine-block-surface": "npm:0.17.11"+ "@blocksuite/affine-shared": "npm:0.17.11"+ "@blocksuite/block-std": "npm:0.17.11"+ "@blocksuite/blocks": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@floating-ui/dom": "npm:^1.6.10""@lottiefiles/dotlottie-wc": "npm:^0.2.16""@preact/signals-core": "npm:^1.8.0""@toeverything/theme": "npm:^1.0.8"lit: "npm:^3.2.0"zod: "npm:^3.23.8"- checksum: 10/316b88b2de2ea749f89bc80813006b2b1af1f1b64c9b1069ee11a84a2c73db3f22a6ff3cd032d524a35a58cb43662f33ac518796ddc4b4e1aff834787f1e239a+ checksum: 10/bf22f353ec70b2eae75037d0fad313444575d3b2a47cc6130655793fd6f7a314c54c2b46edfdde8eaadfabd7e57dc29545b6dc5c912874fabc182d2a1b77f9c0languageName: nodelinkType: hard-"@blocksuite/store@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/store@npm:0.17.10"+"@blocksuite/store@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/store@npm:0.17.11"dependencies:- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/inline": "npm:0.17.10"- "@blocksuite/sync": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/inline": "npm:0.17.11"+ "@blocksuite/sync": "npm:0.17.11""@preact/signals-core": "npm:^1.8.0""@types/flexsearch": "npm:^0.7.6""@types/lodash.ismatch": "npm:^4.4.9"@@ -2752,21 +2794,21 @@ __metadata:zod: "npm:^3.23.8"peerDependencies:yjs: ^13.6.18- checksum: 10/a42d294a1ee68261d39d56302e2c3fce44cdfac13410e0e3e8e01bfdfba106fe919406c3295358a7904dbad842b79aee32ccaaa85b7523b7504ff60708ba7005+ checksum: 10/2e9706df03f70c2b0151d0e5571cfdc23bf2c122bf0eb20b371866b594ddb2ad10227204ec25314e1a7b75fd73c05a23b3f864d00190df0eacc12f54cba5a61alanguageName: nodelinkType: hard-"@blocksuite/sync@npm:0.17.10":- version: 0.17.10- resolution: "@blocksuite/sync@npm:0.17.10"+"@blocksuite/sync@npm:0.17.11":+ version: 0.17.11+ resolution: "@blocksuite/sync@npm:0.17.11"dependencies:- "@blocksuite/global": "npm:0.17.10"+ "@blocksuite/global": "npm:0.17.11"idb: "npm:^8.0.0"idb-keyval: "npm:^6.2.1"y-protocols: "npm:^1.0.6"peerDependencies:yjs: ^13.6.15- checksum: 10/84d463791bac55ea0fd9a0ca9978fe3743c4b12783d7d530cb852998aeb02fa2dcdb9c9b367860138c179d60a6a5cfebc71e3640b53c5e540b758c662dd6dbd5+ checksum: 10/2f0e379cd38fc0a67b4a57cd7970e12c41db4f188c183a5345ae2414e2718dda17c14eb69d162010e26204672ebacceac7e66b727d5637a9742e9bd9b794da45languageName: nodelinkType: hard@@ -12375,10 +12417,10 @@ __metadata:"@affine/debug": "workspace:*""@affine/env": "workspace:*""@affine/templates": "workspace:*"- "@blocksuite/blocks": "npm:0.17.10"- "@blocksuite/global": "npm:0.17.10"- "@blocksuite/presets": "npm:0.17.10"- "@blocksuite/store": "npm:0.17.10"+ "@blocksuite/blocks": "npm:0.17.11"+ "@blocksuite/global": "npm:0.17.11"+ "@blocksuite/presets": "npm:0.17.11"+ "@blocksuite/store": "npm:0.17.11""@datastructures-js/binary-search-tree": "npm:^5.3.2""@testing-library/react": "npm:^16.0.0"fake-indexeddb: "npm:^6.0.0"