mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 08:53:27 +03:00
chore: bump blocksuite (#8230)
## 0.17.11
### Patch Changes
- [3c61be5](3c61be5ded
): - Refactor drag handle widget
- Split embed blocks to `@blocksuite/affine-block-embed`
- Fix latex selected state in edgeless mode
- Fix unclear naming
- Fix prototype pollution
- Fix portal interaction in affine modal
- Fix paste linked block on edgeless
- Add scroll anchoring widget
- Add highlight selection
This commit is contained in:
parent
b73d3b3d55
commit
f397815ad1
4
packages/common/env/package.json
vendored
4
packages/common/env/package.json
vendored
@ -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": {
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
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 (!quickSearchService)
|
||||
return oldAction({ model, rootComponent });
|
||||
if (!success) return;
|
||||
|
||||
const result = await quickSearchService.openQuickSearch();
|
||||
if (result === null) return;
|
||||
// TODO(@Mirone): fix the type
|
||||
insertedLinkType
|
||||
?.then(
|
||||
(type: {
|
||||
flavour?: 'affine:embed-linked-doc' | 'affine:bookmark';
|
||||
}) => {
|
||||
const flavour = type?.flavour;
|
||||
if (!flavour) return;
|
||||
|
||||
if ('docId' in result) {
|
||||
const linkedDoc = std.collection.getDoc(result.docId);
|
||||
if (!linkedDoc) return;
|
||||
if (flavour === 'affine:embed-linked-doc') {
|
||||
track.doc.editor.slashMenu.linkDoc({
|
||||
control: 'linkDoc',
|
||||
});
|
||||
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,
|
||||
},
|
||||
]);
|
||||
}
|
||||
if (flavour === 'affine:bookmark') {
|
||||
track.doc.editor.slashMenu.bookmark();
|
||||
return;
|
||||
}
|
||||
}
|
||||
)
|
||||
.catch(console.error);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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]
|
||||
);
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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',
|
||||
},
|
||||
};
|
||||
|
@ -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 ExternalLinksQuickSearchSession
|
||||
query$ = 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 (
|
||||
|
@ -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 LinksQuickSearchSession
|
||||
extends Entity
|
||||
@ -31,11 +27,10 @@ export class LinksQuickSearchSession
|
||||
query$ = 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 LinksQuickSearchSession
|
||||
this.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 LinksQuickSearchSession
|
||||
score: 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>,
|
||||
];
|
||||
});
|
||||
|
@ -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])
|
||||
);
|
||||
}
|
||||
|
@ -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'],
|
||||
|
@ -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
|
||||
);
|
||||
});
|
||||
|
@ -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",
|
||||
|
318
yarn.lock
318
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.local
|
||||
resolution: "@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: node
|
||||
linkType: 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/7eb41ff2330a6281e14b0f986b0358976fe44d91200add2b417090dde44a112222ee87910f826cc66c25a157f8789d878283222d824c82522f884f7092c1ac02
|
||||
languageName: node
|
||||
linkType: 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/c18b602eee8414b31cc72b65cfe8097fb7731d3f1006fb6a0fd1e33ff07385f8083204b6f23ba6d8bfd877c63853858c92b10bfca650ee40294fe48a750fd447
|
||||
languageName: node
|
||||
linkType: 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/d8640fae0b87a53da451aadd52f7064d25ebc7558cd82aa8b4bf257a9cd3f6da2f7e013c78109ffbb15a26513e5d620b8b102cf8ea62b004d0745517c0ced08d
|
||||
languageName: node
|
||||
linkType: 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/e6717c3008d7255ddf7618cd57a4b9b987c1ff0cdf9fd3a3c29341e4fd87f23fa3595b52e25ab9f515bf60161f0feb4a7530bd1f1ddbf2e2043939b7aa786e11
|
||||
languageName: node
|
||||
linkType: 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/4a4207eca8b978c17d10502c448c149710f8f73714681b997762e635302a2d3fa53ea96d138eac1893cc78b44c4e8affeb8bf8de94d92b30c46aa97304174a80
|
||||
languageName: node
|
||||
linkType: 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/block-std@npm:0.17.10":
|
||||
version: 0.17.10
|
||||
resolution: "@blocksuite/block-std@npm:0.17.10"
|
||||
"@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/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/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/a8d5db1033aac80d9a4e1d67ee38d8f62f196dada09af683ccc8cd16caf5fd066422763c361ffd9f2adec22dc0a1ba847721de289afcd15ef0ec83da8735892f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@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.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/e5169b8ea01aea2806e6bbc6b13b3e1c5401e9b9de83381e13a05ad20e0284b98bd1c77e4760720c5e2a85bad4a91713d9db3849139af2fdce0d8c4760b2635c
|
||||
languageName: node
|
||||
linkType: 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/e122b2a08a15e38039d72275f18d9ccbcafdff719f9b275d4205754ef24d90f5423ebf7ba7ca61ebc93df3ee4070ffb6718d5b40c6be6a933cdfe1d8fa87495c
|
||||
languageName: node
|
||||
linkType: 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/bcbd2b0db35c0f61f797fff52bf83a212a5e92389a0a2fd85cde3a4647a42f034c1b0822da0c48d6cba00828b3263c1eea9563d9bcdfb922fb685007c6f9d651
|
||||
languageName: node
|
||||
linkType: 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/c23905faf72ff849e3dbdaf683ea0670133f7c4ee08279c645919895f447c453d702d6a91d59be0f93143d9d70078224f6b261e673b54a566ce46414ba72f5e8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -2697,47 +2739,47 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: 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.0
|
||||
yjs: ^13.6.18
|
||||
checksum: 10/9aead8cd942811770e5bdfa7ff2bf7d38cdee05e39f824d4104cba3b0afec2400ae3cf0f94f8484f39d7ce04397af6996bbfe1d6b590042bb8d6bf63806efcf7
|
||||
checksum: 10/d3e4d3548ed67b1290ea97ebe61b319801f5ed7d58d57a09e42524eab34175d7a031441894c2c600fa6f35a526382dbeb82ffa0b1e610c9c62f9707f7172b7c8
|
||||
languageName: node
|
||||
linkType: 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/bf22f353ec70b2eae75037d0fad313444575d3b2a47cc6130655793fd6f7a314c54c2b46edfdde8eaadfabd7e57dc29545b6dc5c912874fabc182d2a1b77f9c0
|
||||
languageName: node
|
||||
linkType: 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/2e9706df03f70c2b0151d0e5571cfdc23bf2c122bf0eb20b371866b594ddb2ad10227204ec25314e1a7b75fd73c05a23b3f864d00190df0eacc12f54cba5a61a
|
||||
languageName: node
|
||||
linkType: 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/2f0e379cd38fc0a67b4a57cd7970e12c41db4f188c183a5345ae2414e2718dda17c14eb69d162010e26204672ebacceac7e66b727d5637a9742e9bd9b794da45
|
||||
languageName: node
|
||||
linkType: 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"
|
||||
|
Loading…
Reference in New Issue
Block a user