@atlaskit/editor-plugin-code-block
Version:
Code block plugin for @atlaskit/editor-core
22 lines (21 loc) • 1.07 kB
TypeScript
import type { IntlShape } from 'react-intl';
import type { GroupType } from '@atlaskit/select';
export declare const NONE_LANGUAGE_VALUE = "none";
export declare const DETECT_LANGUAGE_VALUE = "autodetect";
export declare const PLAIN_TEXT_LANGUAGE_VALUE = "text";
export type LanguagePickerSelectionSource = 'all' | 'pinned' | 'recentlyUsed' | 'search';
export type LanguagePickerOption = {
alias: readonly string[];
label: string;
selectionSource?: LanguagePickerSelectionSource;
value: string;
};
export type LanguagePickerOptionGroup = GroupType<LanguagePickerOption>;
type CreateGroupedLanguageOptionsProps = {
formatMessage: IntlShape['formatMessage'];
languages: LanguagePickerOption[];
recentlyUsedLanguages?: LanguagePickerOption[];
};
export declare const getDetectLanguageOption: (formatMessage: IntlShape["formatMessage"]) => LanguagePickerOption;
export declare const createGroupedLanguageOptions: ({ formatMessage, languages, recentlyUsedLanguages, }: CreateGroupedLanguageOptionsProps) => LanguagePickerOptionGroup[];
export {};