import { VNode, InsertHook } from 'snabbdom'; import * as cg from 'chessgroundx/types'; import { MaterialDiff } from './material'; export declare const ranksUCI: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; export declare type UCIRank = typeof ranksUCI[number]; export declare type UCIKey = 'a0' | `${cg.File}${UCIRank}`; export declare type UCIOrig = UCIKey | cg.DropOrig; export declare type PromotionSuffix = cg.PieceLetter | "+" | "-" | ""; export declare type UCIMove = `${UCIOrig}${UCIKey}`; export declare type CGMove = `${cg.Orig}${cg.Key}`; export declare type ColorName = "White" | "Black" | "Red" | "Blue" | "Gold" | "Pink" | "Green"; export declare type PromotionType = "regular" | "shogi" | "kyoto"; export interface BoardFamily { geometry: cg.Geometry; cg: string; boardCSS: string[]; } export interface PieceFamily { pieceCSS: string[]; } export declare const BOARD_FAMILIES: { [key: string]: BoardFamily; }; export declare const PIECE_FAMILIES: { [key: string]: PieceFamily; }; declare type MandatoryPromotionPredicate = (role: cg.Role, orig: cg.Key, dest: cg.Key, color: cg.Color) => boolean; export declare class Variant { readonly name: string; private readonly _displayName; displayName(chess960?: boolean): string; private readonly _tooltip; tooltip(): string; readonly startFen: string; readonly board: keyof typeof BOARD_FAMILIES; private readonly boardFamily; get geometry(): cg.Geometry; get boardDimensions(): cg.BoardDimensions; get boardWidth(): number; get boardHeight(): number; get cg(): string; get boardCSS(): string[]; readonly piece: keyof typeof PIECE_FAMILIES; private readonly pieceFamily; get pieceCSS(): string[]; readonly firstColor: ColorName; readonly secondColor: ColorName; private readonly _pieceRoles; pieceRoles(color: cg.Color): ("Q" | "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "I" | "P" | "S" | "U" | "G" | "C" | "D" | "E" | "F" | "H" | "J" | "K" | "L" | "M" | "N" | "O" | "R" | "T" | "V" | "W" | "X" | "Y" | "Z" | "+Q" | "+a" | "+b" | "+i" | "+p" | "+q" | "+s" | "+u" | "+g" | "+c" | "+d" | "+e" | "+f" | "+h" | "+j" | "+k" | "+l" | "+m" | "+n" | "+o" | "+r" | "+t" | "+v" | "+w" | "+x" | "+y" | "+z" | "+A" | "+B" | "+I" | "+P" | "+S" | "+U" | "+G" | "+C" | "+D" | "+E" | "+F" | "+H" | "+J" | "+K" | "+L" | "+M" | "+N" | "+O" | "+R" | "+T" | "+V" | "+W" | "+X" | "+Y" | "+Z")[]; readonly pocket: boolean; private readonly _pocketRoles; pocketRoles(color: cg.Color): ("Q" | "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "I" | "P" | "S" | "U" | "G" | "C" | "D" | "E" | "F" | "H" | "J" | "K" | "L" | "M" | "N" | "O" | "R" | "T" | "V" | "W" | "X" | "Y" | "Z" | "+Q" | "+a" | "+b" | "+i" | "+p" | "+q" | "+s" | "+u" | "+g" | "+c" | "+d" | "+e" | "+f" | "+h" | "+j" | "+k" | "+l" | "+m" | "+n" | "+o" | "+r" | "+t" | "+v" | "+w" | "+x" | "+y" | "+z" | "+A" | "+B" | "+I" | "+P" | "+S" | "+U" | "+G" | "+C" | "+D" | "+E" | "+F" | "+H" | "+J" | "+K" | "+L" | "+M" | "+N" | "+O" | "+R" | "+T" | "+V" | "+W" | "+X" | "+Y" | "+Z")[] | undefined; readonly promotion: PromotionType; readonly promotionOrder: PromotionSuffix[]; readonly promoteablePieces: cg.PieceLetter[]; readonly isMandatoryPromotion: MandatoryPromotionPredicate; readonly timeControl: string; readonly counting?: string; readonly materialPoint?: string; readonly enPassant: boolean; readonly autoPromoteable: boolean; readonly drop: boolean; readonly gate: boolean; readonly pass: boolean; readonly boardMark: 'campmate' | 'none'; readonly showPromoted: boolean; readonly materialDiff: boolean; readonly initialMaterialImbalance: MaterialDiff; readonly alternateStart?: { [name: string]: string; }; readonly chess960: boolean; private readonly _icon; private readonly _icon960; icon(chess960?: boolean): string; readonly pieceSound: string; constructor(data: VariantConfig); } interface VariantConfig { name: string; displayName?: string; tooltip: () => string; startFen: string; board: keyof typeof BOARD_FAMILIES; piece: keyof typeof PIECE_FAMILIES; firstColor?: ColorName; secondColor?: ColorName; pieceRoles: cg.PieceLetter[]; pieceRoles2?: cg.PieceLetter[]; pocketRoles?: cg.PieceLetter[]; pocketRoles2?: cg.PieceLetter[]; promotion?: PromotionType; promotionOrder?: PromotionSuffix[]; promoteablePieces?: cg.PieceLetter[]; isMandatoryPromotion?: MandatoryPromotionPredicate; timeControl?: string; counting?: string; materialPoint?: string; drop?: boolean; gate?: boolean; pass?: boolean; boardMark?: 'campmate' | 'none'; materialDifference?: boolean; pieceSound?: string; showPromoted?: boolean; enPassant?: boolean; alternateStart?: { [key: string]: string; }; chess960?: boolean; icon: string; icon960?: string; } export declare const VARIANTS: { [name: string]: Variant; }; export declare const variants: string[]; export declare const enabledVariants: string[]; export declare function selectVariant(id: string, selected: string, onChange: EventListener, hookInsert: InsertHook): VNode; export declare function isHandicap(name: string): boolean; export declare function hasCastling(variant: Variant, color: cg.Color): boolean; export declare function uci2cg(move: string): string; export declare function uci2LastMove(move: string | undefined): cg.Key[]; export declare function cg2uci(move: string): string; export declare function validFen(variant: Variant, fen: string): boolean; export declare function getPockets(fen: string): string; export declare function getCounting(fen: string): [number, number, string, string]; export declare function getJanggiPoints(board: string): number[]; export declare function unpromotedRole(variant: Variant, piece: cg.Piece): cg.Role; export declare function promotedRole(variant: Variant, piece: cg.Piece): cg.Role; export declare function moveDests(legalMoves: UCIMove[]): cg.Dests; export declare function lc(str: string, letter: string, uppercase: boolean): number; export declare function colorCase(color: cg.Color, str: string): string; export declare function notation(variant: Variant): cg.Notation; export {};