feat(editor): add callout block (#10563)

- Add `CalloutBlockModel `
- Implement `CalloutBlockComponent `
- Integrate with slash menu (/)
This commit is contained in:
Flrande
2025-03-05 09:28:51 +00:00
parent 1c2a6eac85
commit bd62634a76
35 changed files with 519 additions and 14 deletions

View File

@@ -113,6 +113,16 @@ export const AFFINE_FLAGS = {
configurable: isCanaryBuild,
defaultState: false,
},
enable_callout: {
category: 'blocksuite',
bsFlag: 'enable_callout',
displayName:
'com.affine.settings.workspace.experimental-features.enable-callout.name',
description:
'com.affine.settings.workspace.experimental-features.enable-callout.description',
configurable: isCanaryBuild,
defaultState: false,
},
enable_emoji_folder_icon: {
category: 'affine',
displayName:

View File

@@ -5,7 +5,13 @@
import { JOURNAL_DATE_FORMAT } from '@affine/core/modules/journal';
import { I18n } from '@affine/i18n';
import dayjs from 'dayjs';
import { describe, expect, test } from 'vitest';
import { describe, expect, test, vi } from 'vitest';
vi.mock('emoji-mart', () => {
return {
Picker: vi.fn(),
};
});
import { suggestJournalDate } from '../suggest-journal-date';