{"version":3,"sources":["../src/config-types.ts","../src/config.ts"],"names":["join","existsSync","pathToFileURL","resolve"],"mappings":";;;;;;;;;;;;;;AA0DO,SAAS,aAAa,MAAA,EAAoC;AAC/D,EAAA,OAAO,MAAA;AACT;;;ACxCA,eAAsB,UAAA,CAAW,GAAA,GAAc,OAAA,CAAQ,GAAA,EAAI,EAA0D;AACnH,EAAA,MAAM,WAAA,GAAc;AAAA,IAClBA,SAAA,CAAK,KAAK,kBAAkB,CAAA;AAAA,IAC5BA,SAAA,CAAK,KAAK,kBAAkB,CAAA;AAAA,IAC5BA,SAAA,CAAK,KAAK,mBAAmB;AAAA,GAC/B;AAEA,EAAA,KAAA,MAAW,cAAc,WAAA,EAAa;AACpC,IAAA,IAAIC,aAAA,CAAW,UAAU,CAAA,EAAG;AAC1B,MAAA,IAAI;AAEF,QAAA,MAAM,SAAA,GAAYC,iBAAA,CAAcC,YAAA,CAAQ,UAAU,CAAC,CAAA,CAAE,IAAA;AACrD,QAAA,MAAM,YAAA,GAAe,MAAM,OAAO,SAAA,CAAA;AAClC,QAAA,OAAO,YAAA,CAAa,OAAA;AAAA,MACtB,SAAS,KAAA,EAAO;AAEd,QAAA,IAAI;AAEF,UAAA,MAAM,YAAA,GAAe,SAAA,CAAQA,YAAA,CAAQ,UAAU,CAAC,CAAA;AAChD,UAAA,OAAO,aAAa,OAAA,IAAW,YAAA;AAAA,QACjC,CAAA,CAAA,MAAQ;AACN,UAAA,MAAM,IAAI,KAAA,CAAM,CAAA,2BAAA,EAA8B,UAAU,CAAA,EAAA,EAAK,KAAK,CAAA,CAAE,CAAA;AAAA,QACtE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,IAAA;AACT","file":"config.cjs","sourcesContent":["/**\n * Browser-safe configuration types and utilities\n *\n * This module contains only browser-safe code (no fs, path, url imports).\n * For Node.js-specific utilities like loadConfig, import from './config'.\n */\n\n/**\n * Brixon configuration interface\n */\nexport interface BrixonConfig {\n  /** Presentation metadata */\n  presentation: {\n    /** Unique slug for the presentation URL */\n    slug: string\n    /** Display title */\n    title: string\n    /** Optional subtitle */\n    subtitle?: string\n    /** Client name */\n    clientName?: string\n  }\n  /** Build options */\n  build?: {\n    /** Output directory (default: dist) */\n    outDir?: string\n    /** Minify output (default: true) */\n    minify?: boolean\n  }\n  /** Dev server options */\n  dev?: {\n    /** Port number (default: 3000) */\n    port?: number\n  }\n  /** Deploy options */\n  deploy?: {\n    /** API key for authentication */\n    apiKey?: string\n  }\n}\n\n/**\n * Define a type-safe Brixon configuration\n *\n * @example\n * ```typescript\n * // brixon.config.ts\n * import { defineConfig } from '@brixon-group/presentation-sdk'\n *\n * export default defineConfig({\n *   presentation: {\n *     slug: 'acme-pitch',\n *     title: 'ACME Digital Transformation',\n *     clientName: 'ACME Corporation',\n *   },\n * })\n * ```\n */\nexport function defineConfig(config: BrixonConfig): BrixonConfig {\n  return config\n}\n","/**\n * Node.js configuration utilities\n *\n * This module uses Node.js APIs (fs, path) and should only be used\n * in CLI commands, not in browser code.\n */\n\nimport { existsSync } from 'fs'\nimport { resolve, join } from 'path'\nimport { pathToFileURL } from 'url'\n\n// Re-export browser-safe types\nexport { defineConfig, type BrixonConfig } from './config-types'\n\n/**\n * Load configuration from brixon.config.ts\n *\n * @param cwd Working directory to search from\n * @returns Configuration object or null if not found\n */\nexport async function loadConfig(cwd: string = process.cwd()): Promise<import('./config-types').BrixonConfig | null> {\n  const configPaths = [\n    join(cwd, 'brixon.config.ts'),\n    join(cwd, 'brixon.config.js'),\n    join(cwd, 'brixon.config.mjs'),\n  ]\n\n  for (const configPath of configPaths) {\n    if (existsSync(configPath)) {\n      try {\n        // Use dynamic import with file URL for cross-platform compatibility\n        const configUrl = pathToFileURL(resolve(configPath)).href\n        const configModule = await import(configUrl)\n        return configModule.default as import('./config-types').BrixonConfig\n      } catch (error) {\n        // Try require for CJS configs\n        try {\n          // eslint-disable-next-line @typescript-eslint/no-require-imports\n          const configModule = require(resolve(configPath))\n          return configModule.default || configModule\n        } catch {\n          throw new Error(`Failed to load config from ${configPath}: ${error}`)\n        }\n      }\n    }\n  }\n\n  return null\n}\n"]}