mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
9321ce94a7
Closes: [BS-2554](https://linear.app/affine-design/issue/BS-2554/remove-global-types-in-block-config)
20 lines
474 B
TypeScript
20 lines
474 B
TypeScript
import { ConfigExtensionFactory } from '@blocksuite/block-std';
|
|
import type { BundledLanguageInfo, ThemeInput } from 'shiki';
|
|
|
|
export interface CodeBlockConfig {
|
|
theme?: {
|
|
dark?: ThemeInput;
|
|
light?: ThemeInput;
|
|
};
|
|
langs?: BundledLanguageInfo[];
|
|
|
|
/**
|
|
* Whether to show line numbers in the code block.
|
|
* @default true
|
|
*/
|
|
showLineNumbers?: boolean;
|
|
}
|
|
|
|
export const CodeBlockConfigExtension =
|
|
ConfigExtensionFactory<CodeBlockConfig>('affine:code');
|