@crowdin/app-project-module
Version:
Module that generates for you all common endpoints for serving standalone Crowdin App
33 lines (32 loc) • 1.01 kB
TypeScript
import { SignaturePatterns } from '../../types';
export interface ContextContent {
location: ContextOptionsLocations;
type: ContextOptionsTypes;
module: string;
moduleKey?: string;
/**
* Context menu name
*/
name?: string;
/**
* Support fileName pattern only. Contains fileName field regular expressions used to detect the file type. If the file name matches any of the regular expressions, the context menu will be displayed.
*/
signaturePatterns?: ContextSignaturePatterns;
}
export declare enum ContextOptionsLocations {
TM = "tm",
GLOSSARY = "glossary",
LANGUAGE = "language",
SCREENSHOT = "screenshot",
SOURCE_FILE = "source_file",
TRANSLATED_FILE = "translated_file"
}
export declare enum ContextOptionsTypes {
MODAL = "modal",
NEW_TAB = "new_tab",
REDIRECT = "redirect"
}
export type ElementNodeType = 0 | 1 | 2;
export type ContextSignaturePatterns = SignaturePatterns & {
nodeType?: ElementNodeType[];
};