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,7 @@ import {
defineBlockSchema,
} from '@blocksuite/store';
import type { EmbedCardStyle } from '../../utils/index.js';
import type { BlockMeta, EmbedCardStyle } from '../../utils/index.js';
import { AttachmentBlockTransformer } from './attachment-transformer.js';
/**
@@ -55,7 +55,8 @@ export type AttachmentBlockProps = {
embed: boolean | BackwardCompatibleUndefined;
style?: (typeof AttachmentBlockStyles)[number];
} & Omit<GfxCommonBlockProps, 'scale'>;
} & Omit<GfxCommonBlockProps, 'scale'> &
BlockMeta;
export const defaultAttachmentProps: AttachmentBlockProps = {
name: '',
@@ -69,6 +70,10 @@ export const defaultAttachmentProps: AttachmentBlockProps = {
xywh: '[0,0,0,0]',
lockedBySelf: false,
rotate: 0,
'meta:createdAt': undefined,
'meta:updatedAt': undefined,
'meta:createdBy': undefined,
'meta:updatedBy': undefined,
};
export const AttachmentBlockSchema = defineBlockSchema({