import { EdgelessClipboardConfig } from '@blocksuite/affine-block-surface'; import { type BlockSnapshot } from '@blocksuite/store'; export class EdgelessClipboardEmbedGithubConfig extends EdgelessClipboardConfig { static override readonly key = 'affine:embed-github'; override createBlock(githubEmbed: BlockSnapshot): string | null { if (!this.surface) return null; const { xywh, style, owner, repo, githubType, githubId, url, caption, image, status, statusReason, title, description, createdAt, assignees, } = githubEmbed.props; const embedGithubId = this.crud.addBlock( 'affine:embed-github', { xywh, style, owner, repo, githubType, githubId, url, caption, image, status, statusReason, title, description, createdAt, assignees, }, this.surface.model.id ); return embedGithubId; } }