{"version":3,"sources":["../src/index.ts","../src/types/core.ts","../src/constants.ts"],"sourcesContent":["/**\n * @fileoverview Protocol types and interfaces for Visnap visual testing framework\n *\n * This module defines the core protocol that all adapters and packages must implement.\n * It includes types for browsers, viewports, screenshots, test cases, adapters, storage,\n * configuration, and test results.\n *\n * @module @visnap/protocol\n */\n\n// Re-export all types from domain-specific modules\nexport * from \"./types/core\";\nexport * from \"./types/interactions\";\nexport * from \"./types/comparison\";\nexport * from \"./types/test-results\";\nexport * from \"./types/test-cases\";\nexport * from \"./types/adapters\";\nexport * from \"./types/storage\";\nexport * from \"./types/config\";\nexport * from \"./types/screenshots\";\nexport * from \"./constants\";\n","/**\n * @fileoverview Core types for Visnap visual testing framework\n *\n * This module defines the fundamental types used across the framework.\n */\n\n/**\n * Browser name type supporting chromium, firefox, webkit, or custom browser names\n * @example \"chromium\" | \"firefox\" | \"webkit\" | \"chrome-beta\"\n */\nexport type BrowserName = \"chromium\" | \"firefox\" | \"webkit\" | (string & {});\n\n/**\n * Viewport configuration for screenshot capture\n * @property width - Viewport width in pixels\n * @property height - Viewport height in pixels\n * @property deviceScaleFactor - Device pixel ratio (default: 1)\n */\nexport interface Viewport {\n  width: number;\n  height: number;\n  deviceScaleFactor?: number;\n}\n\n/**\n * Map of viewport names to viewport configurations\n * @example { \"desktop\": { width: 1920, height: 1080 }, \"mobile\": { width: 375, height: 667 } }\n */\nexport type ViewportMap = Record<string, Viewport>;\n\n/**\n * Default viewport configuration\n * @example { width: 1920, height: 1080 }\n */\nexport const DEFAULT_VIEWPORT = { width: 1920, height: 1080 };\n\n/**\n * Error thrown when storage operations fail\n * @property code - Error code for programmatic error handling\n */\nexport class StorageError extends Error {\n  public readonly code: string;\n  constructor(message: string) {\n    super(message);\n    this.name = \"StorageError\";\n    this.code = \"STORAGE_ERROR\";\n  }\n}\n","export const SNAPSHOT_EXTENSION = \".png\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACkCO,IAAM,mBAAmB,EAAE,OAAO,MAAM,QAAQ,KAAK;AAMrD,IAAM,eAAN,cAA2B,MAAM;AAAA,EAEtC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AAAA,EACd;AACF;;;AC/CO,IAAM,qBAAqB;","names":[]}