feat: render placeholder in edgeless mode (#11387)

Complete [BS-2997](https://linear.app/affine-design/issue/BS-2997/在白板上渲染-inserted-frame-group-时提供占位)
This commit is contained in:
doouding
2025-04-02 06:59:25 +00:00
parent ef76c83184
commit 36b1ca4327
5 changed files with 290 additions and 26 deletions

View File

@@ -52,7 +52,7 @@ export {
GfxCompatibleBlockModel as GfxCompatible,
type GfxCompatibleProps,
} from './model/gfx-block-model.js';
export { type GfxModel } from './model/model.js';
export { type GfxModel, isPrimitiveModel } from './model/model.js';
export {
convert,
convertProps,

View File

@@ -1,7 +1,7 @@
import type { GfxGroupCompatibleInterface } from './base.js';
import type { GfxBlockElementModel } from './gfx-block-model.js';
import type {
GfxGroupLikeElementModel,
import {
type GfxGroupLikeElementModel,
GfxPrimitiveElementModel,
} from './surface/element-model.js';
@@ -10,3 +10,9 @@ export type GfxModel = GfxBlockElementModel | GfxPrimitiveElementModel;
export type GfxGroupModel =
| (GfxGroupCompatibleInterface & GfxBlockElementModel)
| GfxGroupLikeElementModel;
export const isPrimitiveModel = (
model: GfxModel
): model is GfxPrimitiveElementModel => {
return model instanceof GfxPrimitiveElementModel;
};