mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-21 20:11:43 +08:00
feat(editor): add block meta for more blocks (#11034)
This commit is contained in:
@@ -9,7 +9,11 @@ import {
|
||||
defineBlockSchema,
|
||||
} from '@blocksuite/store';
|
||||
|
||||
import type { EmbedCardStyle, LinkPreviewData } from '../../utils/index.js';
|
||||
import type {
|
||||
BlockMeta,
|
||||
EmbedCardStyle,
|
||||
LinkPreviewData,
|
||||
} from '../../utils/index.js';
|
||||
|
||||
export const BookmarkStyles: EmbedCardStyle[] = [
|
||||
'vertical',
|
||||
@@ -23,7 +27,8 @@ export type BookmarkBlockProps = {
|
||||
url: string;
|
||||
caption: string | null;
|
||||
} & LinkPreviewData &
|
||||
Omit<GfxCommonBlockProps, 'scale'>;
|
||||
Omit<GfxCommonBlockProps, 'scale'> &
|
||||
BlockMeta;
|
||||
|
||||
const defaultBookmarkProps: BookmarkBlockProps = {
|
||||
style: BookmarkStyles[1],
|
||||
@@ -39,6 +44,10 @@ const defaultBookmarkProps: BookmarkBlockProps = {
|
||||
xywh: '[0,0,0,0]',
|
||||
lockedBySelf: false,
|
||||
rotate: 0,
|
||||
'meta:createdAt': undefined,
|
||||
'meta:updatedAt': undefined,
|
||||
'meta:createdBy': undefined,
|
||||
'meta:updatedBy': undefined,
|
||||
};
|
||||
|
||||
export const BookmarkBlockSchema = defineBlockSchema({
|
||||
|
||||
Reference in New Issue
Block a user