/**
 * A custom DataView with embroidery reader-specific helper methods.
 * @typedef {DataView & {
 *   tell: () => number;
 *   seek: (pos: number) => void;
 *   getUint8: () => number;
 *   getInt8: () => number;
 *   getInt32: (pos: number, littleEndian: boolean) => number;
 * }} EmbroideryFileView
 */

/**
 * A Pattern extended with optional embroidery reader methods.
 * @typedef {import('$lib/file-renderer/pattern').Pattern & {
 *   addColor?: (color: import('$lib/file-renderer/pattern').Color) => void;
 *   addStitchRel: (dx: number, dy: number, stitchType: string, autoAdvance?: boolean) => void;
 *   invertPatternVertical?: () => void;
 * }} EmbroideryPattern
 */

/**
 * Represents a reader for a specific embroidery file format.
 * @typedef {Object} FormatReader
 * @property {string} ext - File extension (e.g., '.pes', '.dst').
 * @property {(view: EmbroideryFileView, pattern: EmbroideryPattern) => void} read - Function to parse the embroidery format and populate the pattern.
 */

/**
 * A map of supported embroidery file formats keyed by format name (e.g., "pes", "dst").
 * @typedef {Object.<string, FormatReader>} SupportedFormats
 */
