@chessviewer-org/chess-viewer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/LICENSE +661 -0
- package/README.md +494 -0
- package/dist/index.cjs +1196 -0
- package/dist/index.d.cts +369 -0
- package/dist/index.d.ts +369 -0
- package/dist/index.js +1091 -0
- package/package.json +83 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
type PieceSymbol = 'P' | 'N' | 'B' | 'R' | 'Q' | 'K' | 'p' | 'n' | 'b' | 'r' | 'q' | 'k' | '';
|
|
2
|
+
type BoardMatrix = PieceSymbol[][];
|
|
3
|
+
interface ValidationResult {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
errorMessage: string | null;
|
|
6
|
+
}
|
|
7
|
+
declare const MAX_FEN_LENGTH = 93;
|
|
8
|
+
declare class FENParseError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
declare function parseFEN(fenString: string): BoardMatrix;
|
|
12
|
+
declare function validateFEN(fen: string): boolean;
|
|
13
|
+
declare function getFENValidationError(fen: string): string;
|
|
14
|
+
declare function validateFENDetailed(fen: string): ValidationResult;
|
|
15
|
+
declare function createEmptyBoard(): BoardMatrix;
|
|
16
|
+
declare function boardToFEN(board: BoardMatrix): string;
|
|
17
|
+
declare function isBoardEmpty(board: BoardMatrix): boolean;
|
|
18
|
+
declare function pieceToName(piece: string): string;
|
|
19
|
+
declare function describeBoardPosition(board: BoardMatrix, flipped?: boolean): string;
|
|
20
|
+
|
|
21
|
+
/** Side to move in a chess position. */
|
|
22
|
+
type ActiveColor = 'w' | 'b';
|
|
23
|
+
/**
|
|
24
|
+
* A fully parsed FEN record — all six fields of a standard FEN string.
|
|
25
|
+
*
|
|
26
|
+
* @see https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation
|
|
27
|
+
*/
|
|
28
|
+
interface FENRecord {
|
|
29
|
+
/** Piece placement as an 8×8 matrix (rank 8 first). */
|
|
30
|
+
board: BoardMatrix;
|
|
31
|
+
/** Side to move. */
|
|
32
|
+
activeColor: ActiveColor;
|
|
33
|
+
/** Castling availability, e.g. `'KQkq'`, or `'-'` if none. */
|
|
34
|
+
castling: string;
|
|
35
|
+
/** En passant target square, e.g. `'e3'`, or `'-'` if none. */
|
|
36
|
+
enPassant: string;
|
|
37
|
+
/** Halfmove clock (moves since last capture or pawn advance). */
|
|
38
|
+
halfmove: number;
|
|
39
|
+
/** Fullmove number (starts at 1, increments after Black's move). */
|
|
40
|
+
fullmove: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Parses a complete FEN string into its six structured fields.
|
|
44
|
+
*
|
|
45
|
+
* Unlike {@link parseFEN}, which returns only the board, this parses the full
|
|
46
|
+
* record including side to move, castling rights, en passant target, and clocks.
|
|
47
|
+
* Missing trailing fields are filled with standard defaults
|
|
48
|
+
* (`w`, `-`, `-`, `0`, `1`) so that piece-placement-only strings parse too.
|
|
49
|
+
*
|
|
50
|
+
* @param fen - Full or partial FEN string.
|
|
51
|
+
* @returns The parsed {@link FENRecord}.
|
|
52
|
+
* @throws {FENParseError} If any present field is malformed.
|
|
53
|
+
*/
|
|
54
|
+
declare function parseFENRecord(fen: string): FENRecord;
|
|
55
|
+
/**
|
|
56
|
+
* Serializes a {@link FENRecord} back into a canonical six-field FEN string.
|
|
57
|
+
*
|
|
58
|
+
* @param record - The record to serialize. Any subset of metadata fields may be
|
|
59
|
+
* omitted; standard defaults are applied for those left out.
|
|
60
|
+
* @returns A full FEN string.
|
|
61
|
+
*/
|
|
62
|
+
declare function buildFENRecord(record: Partial<FENRecord> & {
|
|
63
|
+
board: BoardMatrix;
|
|
64
|
+
}): string;
|
|
65
|
+
/**
|
|
66
|
+
* Returns a new FEN record with the side to move toggled.
|
|
67
|
+
* Pure — does not mutate the input.
|
|
68
|
+
*/
|
|
69
|
+
declare function toggleActiveColor(record: FENRecord): FENRecord;
|
|
70
|
+
/**
|
|
71
|
+
* Extracts only the piece-placement field from a full FEN string.
|
|
72
|
+
* Returns the input trimmed if it has no whitespace.
|
|
73
|
+
*/
|
|
74
|
+
declare function fenPlacementField(fen: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* Normalizes a FEN string to its canonical six-field form, filling defaults
|
|
77
|
+
* for any missing metadata. Throws if the placement field is invalid.
|
|
78
|
+
*/
|
|
79
|
+
declare function normalizeFEN(fen: string): string;
|
|
80
|
+
|
|
81
|
+
/** A square reference: either algebraic (`'e4'`) or `[row, col]` matrix indices. */
|
|
82
|
+
type SquareRef = string | readonly [number, number];
|
|
83
|
+
/** Returns a deep copy of a board matrix. Safe to mutate the result. */
|
|
84
|
+
declare function cloneBoard(board: BoardMatrix): BoardMatrix;
|
|
85
|
+
/**
|
|
86
|
+
* Returns the piece on a square, or `''` for an empty square and `null` for an
|
|
87
|
+
* out-of-range reference.
|
|
88
|
+
*/
|
|
89
|
+
declare function getPieceAt(board: BoardMatrix, square: SquareRef): PieceSymbol | null;
|
|
90
|
+
/**
|
|
91
|
+
* Returns a new board with `piece` placed on `square`. Pure — the input board
|
|
92
|
+
* is not mutated. An out-of-range square returns the board unchanged.
|
|
93
|
+
*/
|
|
94
|
+
declare function setPieceAt(board: BoardMatrix, square: SquareRef, piece: PieceSymbol): BoardMatrix;
|
|
95
|
+
/** Returns a new board with `square` cleared. Pure. */
|
|
96
|
+
declare function removePieceAt(board: BoardMatrix, square: SquareRef): BoardMatrix;
|
|
97
|
+
/**
|
|
98
|
+
* Returns a new board with the piece moved from `from` to `to`, overwriting any
|
|
99
|
+
* piece on the destination. Pure. No-ops if `from` is empty or either ref is
|
|
100
|
+
* out of range.
|
|
101
|
+
*/
|
|
102
|
+
declare function movePiece(board: BoardMatrix, from: SquareRef, to: SquareRef): BoardMatrix;
|
|
103
|
+
/**
|
|
104
|
+
* Returns a new board rotated 180° (equivalent to viewing it from the other
|
|
105
|
+
* side). Pure.
|
|
106
|
+
*/
|
|
107
|
+
declare function flipBoard(board: BoardMatrix): BoardMatrix;
|
|
108
|
+
/** A piece on a specific square. */
|
|
109
|
+
interface PiecePlacement {
|
|
110
|
+
square: string;
|
|
111
|
+
piece: PieceSymbol;
|
|
112
|
+
}
|
|
113
|
+
/** Lists every occupied square with its piece, in reading order (a8 → h1). */
|
|
114
|
+
declare function listPieces(board: BoardMatrix): PiecePlacement[];
|
|
115
|
+
/** Counts how many pieces of each symbol are on the board. */
|
|
116
|
+
declare function countPieces(board: BoardMatrix): Record<string, number>;
|
|
117
|
+
/** Material balance from White's perspective (positive = White ahead). */
|
|
118
|
+
declare function materialBalance(board: BoardMatrix): number;
|
|
119
|
+
/** Finds the square of the king of the given color, or `null` if absent. */
|
|
120
|
+
declare function findKing(board: BoardMatrix, color: 'w' | 'b'): string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Checks that the board has exactly one king of each color — the minimum
|
|
123
|
+
* legality requirement for a renderable position.
|
|
124
|
+
*/
|
|
125
|
+
declare function hasBothKings(board: BoardMatrix): boolean;
|
|
126
|
+
|
|
127
|
+
interface DiagramOptions {
|
|
128
|
+
/** FEN string (piece placement only or full FEN) */
|
|
129
|
+
fen: string;
|
|
130
|
+
/** Light square color (hex, default '#f0d9b5') */
|
|
131
|
+
lightSquare?: string;
|
|
132
|
+
/** Dark square color (hex, default '#b58863') */
|
|
133
|
+
darkSquare?: string;
|
|
134
|
+
/** Board size in pixels (default 400) */
|
|
135
|
+
size?: number;
|
|
136
|
+
/** Whether to show rank/file coordinates (default false) */
|
|
137
|
+
showCoords?: boolean;
|
|
138
|
+
/** Whether to flip the board (black at bottom, default false) */
|
|
139
|
+
flipped?: boolean;
|
|
140
|
+
/** Whether to show a thin outer frame (default false) */
|
|
141
|
+
showFrame?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Color of the rank/file coordinate labels. Accepts a hex string or the
|
|
144
|
+
* names `'white'` / `'black'` (e.g. the result of `themeCoordinateColor`).
|
|
145
|
+
* Default '#000000'.
|
|
146
|
+
*/
|
|
147
|
+
coordColor?: string;
|
|
148
|
+
/** Accessible label for the SVG (default 'Chess position') */
|
|
149
|
+
label?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Generates a self-contained SVG chess diagram from a FEN string.
|
|
153
|
+
* Works in Node.js and browsers — no DOM required.
|
|
154
|
+
*
|
|
155
|
+
* @param options - Diagram configuration
|
|
156
|
+
* @returns SVG markup string
|
|
157
|
+
* @throws If the FEN string is invalid
|
|
158
|
+
*/
|
|
159
|
+
declare function generateDiagram(options: DiagramOptions): string;
|
|
160
|
+
|
|
161
|
+
declare const PIECES: Record<string, string>;
|
|
162
|
+
declare function getPieceSVG(fenChar: string): string | null;
|
|
163
|
+
|
|
164
|
+
declare function hexToRgb(hex: string): {
|
|
165
|
+
r: number;
|
|
166
|
+
g: number;
|
|
167
|
+
b: number;
|
|
168
|
+
};
|
|
169
|
+
declare function rgbToHex(r: number, g: number, b: number): string;
|
|
170
|
+
declare function rgbToHsv(r: number, g: number, b: number): {
|
|
171
|
+
h: number;
|
|
172
|
+
s: number;
|
|
173
|
+
v: number;
|
|
174
|
+
};
|
|
175
|
+
declare function hsvToRgb(h: number, s: number, v: number): {
|
|
176
|
+
r: number;
|
|
177
|
+
g: number;
|
|
178
|
+
b: number;
|
|
179
|
+
};
|
|
180
|
+
declare function hexToHsv(hex: string): {
|
|
181
|
+
h: number;
|
|
182
|
+
s: number;
|
|
183
|
+
v: number;
|
|
184
|
+
};
|
|
185
|
+
declare function hsvToHex(h: number, s: number, v: number): string;
|
|
186
|
+
/**
|
|
187
|
+
* Returns relative luminance of a hex color (WCAG 2.1 formula).
|
|
188
|
+
*/
|
|
189
|
+
declare function relativeLuminance(hex: string): number;
|
|
190
|
+
/**
|
|
191
|
+
* Returns WCAG 2.1 contrast ratio between two hex colors.
|
|
192
|
+
* Range: 1 (no contrast) to 21 (black on white).
|
|
193
|
+
*/
|
|
194
|
+
declare function contrastRatio(hex1: string, hex2: string): number;
|
|
195
|
+
/**
|
|
196
|
+
* Returns 'white' or 'black' — whichever has higher contrast against the given background.
|
|
197
|
+
*/
|
|
198
|
+
declare function bestTextColor(backgroundHex: string): 'white' | 'black';
|
|
199
|
+
|
|
200
|
+
declare function safeJSONParse<T>(jsonString: string | null | undefined, fallback: T): T;
|
|
201
|
+
declare function sanitizeFileName(fileName?: string | null): string;
|
|
202
|
+
declare function isValidHexColor(color: unknown): color is string;
|
|
203
|
+
declare function sanitizeHexColor(color: unknown, fallback?: string): string;
|
|
204
|
+
declare function sanitizeInput(input: unknown, maxLength?: number): string;
|
|
205
|
+
declare function isRecord(val: unknown): val is Record<string, unknown>;
|
|
206
|
+
|
|
207
|
+
declare const DEFAULT_LIGHT_SQUARE = "#f0d9b5";
|
|
208
|
+
declare const DEFAULT_DARK_SQUARE = "#b58863";
|
|
209
|
+
declare const STARTING_FEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
|
210
|
+
declare const EMPTY_FEN = "8/8/8/8/8/8/8/8 w - - 0 1";
|
|
211
|
+
interface PieceSet {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
}
|
|
215
|
+
declare const PIECE_SETS: PieceSet[];
|
|
216
|
+
declare const PIECE_SET_POPULARITY: readonly string[];
|
|
217
|
+
interface BoardTheme {
|
|
218
|
+
name: string;
|
|
219
|
+
light: string;
|
|
220
|
+
dark: string;
|
|
221
|
+
}
|
|
222
|
+
declare const BOARD_THEMES: Record<string, BoardTheme>;
|
|
223
|
+
interface QualityPreset {
|
|
224
|
+
value: number;
|
|
225
|
+
label: string;
|
|
226
|
+
description: string;
|
|
227
|
+
mode: 'print' | 'social';
|
|
228
|
+
forceCoordinateBorder: boolean;
|
|
229
|
+
estimatedSize: string;
|
|
230
|
+
}
|
|
231
|
+
declare const QUALITY_PRESETS: QualityPreset[];
|
|
232
|
+
declare const PIECE_MAP: Record<string, string>;
|
|
233
|
+
|
|
234
|
+
type HistorySource = 'manual' | 'export' | 'drag';
|
|
235
|
+
type ArchiveSource = 'auto' | 'manual';
|
|
236
|
+
type FreshnessStatus = 'green' | 'yellow' | 'red';
|
|
237
|
+
interface BaseHistoryEntry {
|
|
238
|
+
id: number;
|
|
239
|
+
fen: string;
|
|
240
|
+
createdAt: number;
|
|
241
|
+
lastActiveAt: number;
|
|
242
|
+
source: HistorySource;
|
|
243
|
+
isFavorite: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface ActiveHistoryEntry extends BaseHistoryEntry {
|
|
246
|
+
dragSessionId?: string;
|
|
247
|
+
}
|
|
248
|
+
interface ArchivedHistoryEntry extends BaseHistoryEntry {
|
|
249
|
+
archivedAt: number;
|
|
250
|
+
archiveSource: ArchiveSource;
|
|
251
|
+
}
|
|
252
|
+
interface HistoryFilters {
|
|
253
|
+
fenSearch?: string;
|
|
254
|
+
dateFrom?: number;
|
|
255
|
+
dateTo?: number;
|
|
256
|
+
status?: FreshnessStatus;
|
|
257
|
+
source?: HistorySource;
|
|
258
|
+
favoritesOnly?: boolean;
|
|
259
|
+
}
|
|
260
|
+
declare function calculateStatus(lastActiveAt: number): FreshnessStatus;
|
|
261
|
+
declare function createHistoryEntry(fen: string, source: HistorySource, dragSessionId?: string | null): ActiveHistoryEntry;
|
|
262
|
+
declare function touchEntry<T extends BaseHistoryEntry>(entry: T): T;
|
|
263
|
+
declare function sortByMostRecent<T extends {
|
|
264
|
+
lastActiveAt: number;
|
|
265
|
+
}>(entries: T[]): T[];
|
|
266
|
+
declare function sortArchivedByArchiveDate(entries: ArchivedHistoryEntry[]): ArchivedHistoryEntry[];
|
|
267
|
+
declare function mergeById<T extends {
|
|
268
|
+
id: number;
|
|
269
|
+
}>(primary: T[], secondary: T[]): T[];
|
|
270
|
+
declare function applyFilters<T extends BaseHistoryEntry>(entries: T[], filters: HistoryFilters): T[];
|
|
271
|
+
interface PartitionResult {
|
|
272
|
+
active: ActiveHistoryEntry[];
|
|
273
|
+
toArchive: ActiveHistoryEntry[];
|
|
274
|
+
}
|
|
275
|
+
declare function partitionByArchiveStatus(entries: ActiveHistoryEntry[]): PartitionResult;
|
|
276
|
+
declare function convertToArchivedEntry(entry: ActiveHistoryEntry, archiveSource?: ArchiveSource): ArchivedHistoryEntry;
|
|
277
|
+
|
|
278
|
+
interface CoordinateParams {
|
|
279
|
+
fontSize: number;
|
|
280
|
+
borderSize: number;
|
|
281
|
+
fontWeight: number;
|
|
282
|
+
offset: number;
|
|
283
|
+
}
|
|
284
|
+
interface SquareBounds {
|
|
285
|
+
x: number;
|
|
286
|
+
y: number;
|
|
287
|
+
width: number;
|
|
288
|
+
height: number;
|
|
289
|
+
centerX: number;
|
|
290
|
+
centerY: number;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Calculates coordinate label display parameters based on board pixel size.
|
|
294
|
+
*/
|
|
295
|
+
declare function getCoordinateParams(boardSize: number): CoordinateParams;
|
|
296
|
+
/**
|
|
297
|
+
* Calculates the bounding box and center coordinates for a board square.
|
|
298
|
+
*/
|
|
299
|
+
declare function getSquareBounds(rowIndex: number, colIndex: number, squareSize: number, offsetX?: number, offsetY?: number): SquareBounds;
|
|
300
|
+
declare function isLightSquare(row: number, col: number): boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Returns actual [row, col] accounting for board flip.
|
|
303
|
+
*/
|
|
304
|
+
declare function getDisplayCoordinates(row: number, col: number, flipped: boolean): [number, number];
|
|
305
|
+
/**
|
|
306
|
+
* Converts a square name (e.g. 'e4') to [row, col] matrix indices (row 0 = rank 8).
|
|
307
|
+
*/
|
|
308
|
+
declare function squareToIndices(square: string): [number, number] | null;
|
|
309
|
+
/**
|
|
310
|
+
* Converts matrix [row, col] indices to algebraic square name (e.g. 'e4').
|
|
311
|
+
*/
|
|
312
|
+
declare function indicesToSquare(row: number, col: number): string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Rewrites the DPI metadata of a PNG or JPEG blob.
|
|
316
|
+
* Works in both browser and Node.js (uses ArrayBuffer/Uint8Array, no DOM needed).
|
|
317
|
+
*/
|
|
318
|
+
declare function changeDPI(blob: Blob, dpi: number, format: 'png' | 'jpeg'): Promise<Blob>;
|
|
319
|
+
|
|
320
|
+
/** Looks up a board theme by id, or `null` if no such theme exists. */
|
|
321
|
+
declare function getBoardTheme(id: string): BoardTheme | null;
|
|
322
|
+
/** All board theme ids. */
|
|
323
|
+
declare function listThemeIds(): string[];
|
|
324
|
+
/** Looks up a piece set by id, or `null` if not found. */
|
|
325
|
+
declare function getPieceSet(id: string): PieceSet | null;
|
|
326
|
+
/**
|
|
327
|
+
* Returns the piece sets ordered by curated popularity. Any sets not listed in
|
|
328
|
+
* {@link PIECE_SET_POPULARITY} are appended in their original order.
|
|
329
|
+
*/
|
|
330
|
+
declare function pieceSetsByPopularity(): PieceSet[];
|
|
331
|
+
/** Looks up a quality preset by its multiplier value, or `null`. */
|
|
332
|
+
declare function getQualityPreset(value: number): QualityPreset | null;
|
|
333
|
+
/** Contrast ratio between a theme's light and dark squares (WCAG 2.1). */
|
|
334
|
+
declare function themeContrast(theme: BoardTheme): number;
|
|
335
|
+
/**
|
|
336
|
+
* Picks the coordinate-label text color (`'white'` | `'black'`) that reads best
|
|
337
|
+
* against a theme's dark squares — useful when drawing coordinates inside the
|
|
338
|
+
* board rather than in a border.
|
|
339
|
+
*/
|
|
340
|
+
declare function themeCoordinateColor(theme: BoardTheme): 'white' | 'black';
|
|
341
|
+
|
|
342
|
+
/** Pixel dimensions of a raster image. */
|
|
343
|
+
interface ImageDimensions {
|
|
344
|
+
width: number;
|
|
345
|
+
height: number;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Reads the pixel dimensions of a PNG or JPEG from its raw bytes, without
|
|
349
|
+
* decoding the image. Works in Node.js and browsers (operates on
|
|
350
|
+
* `Uint8Array` / `ArrayBuffer`, no DOM required).
|
|
351
|
+
*
|
|
352
|
+
* @param data - The image bytes.
|
|
353
|
+
* @returns The image dimensions, or `null` if the format is unrecognized or the
|
|
354
|
+
* header is truncated.
|
|
355
|
+
*/
|
|
356
|
+
declare function readImageDimensions(data: Uint8Array | ArrayBuffer): ImageDimensions | null;
|
|
357
|
+
/**
|
|
358
|
+
* Computes the physical print size of an image at a given DPI.
|
|
359
|
+
*
|
|
360
|
+
* @param pixels - Dimension in pixels.
|
|
361
|
+
* @param dpi - Target dots-per-inch.
|
|
362
|
+
* @returns Size in inches and millimetres.
|
|
363
|
+
*/
|
|
364
|
+
declare function physicalSize(pixels: number, dpi: number): {
|
|
365
|
+
inches: number;
|
|
366
|
+
mm: number;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
export { type ActiveColor, type ActiveHistoryEntry, type ArchiveSource, type ArchivedHistoryEntry, BOARD_THEMES, type BaseHistoryEntry, type BoardMatrix, type BoardTheme, type CoordinateParams, DEFAULT_DARK_SQUARE, DEFAULT_LIGHT_SQUARE, type DiagramOptions, EMPTY_FEN, FENParseError, type FENRecord, type FreshnessStatus, type HistoryFilters, type HistorySource, type ImageDimensions, MAX_FEN_LENGTH, PIECES, PIECE_MAP, PIECE_SETS, PIECE_SET_POPULARITY, type PartitionResult, type PiecePlacement, type PieceSet, type PieceSymbol, QUALITY_PRESETS, type QualityPreset, STARTING_FEN, type SquareBounds, type SquareRef, type ValidationResult, applyFilters, bestTextColor, boardToFEN, buildFENRecord, calculateStatus, changeDPI, cloneBoard, contrastRatio, convertToArchivedEntry, countPieces, createEmptyBoard, createHistoryEntry, describeBoardPosition, fenPlacementField, findKing, flipBoard, generateDiagram, getBoardTheme, getCoordinateParams, getDisplayCoordinates, getFENValidationError, getPieceAt, getPieceSVG, getPieceSet, getQualityPreset, getSquareBounds, hasBothKings, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, indicesToSquare, isBoardEmpty, isLightSquare, isRecord, isValidHexColor, listPieces, listThemeIds, materialBalance, mergeById, movePiece, normalizeFEN, parseFEN, parseFENRecord, partitionByArchiveStatus, physicalSize, pieceSetsByPopularity, pieceToName, readImageDimensions, relativeLuminance, removePieceAt, rgbToHex, rgbToHsv, safeJSONParse, sanitizeFileName, sanitizeHexColor, sanitizeInput, setPieceAt, sortArchivedByArchiveDate, sortByMostRecent, squareToIndices, themeContrast, themeCoordinateColor, toggleActiveColor, touchEntry, validateFEN, validateFENDetailed };
|