feat(editor): add block meta for more blocks (#11034)

This commit is contained in:
Saul-Mirone
2025-03-20 10:08:01 +00:00
parent 27a8afa33f
commit c1ec17ccba
4 changed files with 40 additions and 14 deletions
@@ -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({