feat(editor): make height of edgeless embed doc to fit content (#12089)

Close [BS-3388](https://linear.app/affine-design/issue/BS-3388/embed-doc-拖入后的初始高度不要超过800,不要限制用户随后的调整空间)

This PR impl a extension which initialize the height of added `affine-embed-edgeless-synced-doc-block` to fit its content

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Improved handling of embedded synced document block height to better fit content within edgeless mode.
- **Tests**
  - Added an end-to-end test to verify correct height adjustment for embedded synced documents in edgeless mode.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
L-Sun
2025-04-30 18:48:54 +00:00
parent 83e55fad1e
commit e0308c5815
5 changed files with 151 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ import {
export const SYNCED_MIN_WIDTH = 370;
export const SYNCED_MIN_HEIGHT = 64;
// the default max height of embed doc, user can adjust height by selected rect over this value
export const SYNCED_DEFAULT_MAX_HEIGHT = 800;
export const defaultEmbedSyncedDocBlockProps: EmbedSyncedDocBlockProps = {
pageId: '',