import { type ParagraphBlockModel } from '@cbi-blocksuite/blocks'; import type { TemplateResult } from 'lit'; import { BlockPreviewIcon, SmallAttachmentIcon, SmallBookmarkIcon, SmallBulletListIcon, SmallCodeBlockIcon, SmallDatabaseKanbanIcon, SmallDatabaseTableIcon, SmallHeading1Icon, SmallHeading2Icon, SmallHeading3Icon, SmallHeading4Icon, SmallHeading5Icon, SmallHeading6Icon, SmallImageIcon, SmallNumberListIcon, SmallQuoteBlockIcon, SmallTextIcon, SmallTodoIcon, } from '../_common/icons.js'; const paragraphIconMap: { [key in ParagraphBlockModel['type']]: TemplateResult<1>; } = { quote: SmallQuoteBlockIcon, text: SmallTextIcon, h1: SmallHeading1Icon, h2: SmallHeading2Icon, h3: SmallHeading3Icon, h4: SmallHeading4Icon, h5: SmallHeading5Icon, h6: SmallHeading6Icon, tag_Narrator: SmallQuoteBlockIcon, tag_Scene: SmallQuoteBlockIcon, tag_Character: SmallQuoteBlockIcon, tag_Place: SmallQuoteBlockIcon, tag_Actor: SmallQuoteBlockIcon, tag_BGM: SmallQuoteBlockIcon, }; export const previewIconMap = { ...paragraphIconMap, code: SmallCodeBlockIcon, numbered: SmallNumberListIcon, bulleted: SmallBulletListIcon, todo: SmallTodoIcon, toggle: BlockPreviewIcon, bookmark: SmallBookmarkIcon, image: SmallImageIcon, table: SmallDatabaseTableIcon, kanban: SmallDatabaseKanbanIcon, attachment: SmallAttachmentIcon, }; const paragraphPlaceholderMap: { [key in ParagraphBlockModel['type']]: string; } = { quote: 'Quote', text: 'Text Block', h1: 'Heading 1', h2: 'Heading 2', h3: 'Heading 3', h4: 'Heading 4', h5: 'Heading 5', h6: 'Heading 6', tag_Narrator: 'Narrator', tag_Scene: 'Scene', tag_Character: 'Character', tag_Place: 'Place', tag_Actor: 'Actor', tag_BGM: 'BGM', }; export const placeholderMap = { code: 'Code Block', bulleted: 'Bulleted List', numbered: 'Numbered List', toggle: 'Toggle List', todo: 'Todo', bookmark: 'Bookmark', image: 'Image', database: 'Database', attachment: 'Attachment', ...paragraphPlaceholderMap, }; export const headingKeys = new Set( Object.keys(paragraphPlaceholderMap).filter(key => key.startsWith('h')) ); export const outlineSettingsKey = 'outlinePanelSettings'; export type OutlineSettingsDataType = { showIcons: boolean; enableSorting: boolean; };