feat(editor): add feature flag service (#9592)

This commit is contained in:
Saul-Mirone
2025-01-08 15:46:31 +00:00
parent fd26b72255
commit 3683297ccf
55 changed files with 283 additions and 188 deletions
@@ -4,6 +4,7 @@ import type {
TextAlign,
TextVerticalAlign,
} from '@blocksuite/affine-model';
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
import type { Bound, SerializedXYWH } from '@blocksuite/global/utils';
import { deltaInsertsToChunks } from '@blocksuite/inline';
@@ -68,9 +69,9 @@ export function drawGeneralShape(
const { blur, offsetX, offsetY, color } = shapeModel.shadow;
const scale = ctx.getTransform().a;
const enableShadowBlur = shapeModel.surface.doc.awarenessStore.getFlag(
'enable_shape_shadow_blur'
);
const enableShadowBlur = shapeModel.surface.doc
.get(FeatureFlagService)
.getFlag('enable_shape_shadow_blur');
// hard shadow, or soft shadow if `enable_shape_shadow_blur` is true
// see comment of `shape.shadow` in `ShapeElementModel`