{"version":3,"file":"node.mjs","names":[],"sources":["../../src/node/define_storybook_vis.ts","../../src/node/define_storybook_vis_options.ts"],"sourcesContent":["import { dirname } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport type { StorybookVisOptions } from '../server/types.ts'\n\n/**\n * Defines the Storybook Visual Testing addon configuration.\n *\n * When called without options, returns the package directory name as a string.\n * When called with options, returns an object containing both the package name and the provided options.\n *\n * @returns When called without options, returns the package directory path as a filesystem path string (e.g., `/path/to/storybook-addon-vis`).\n *\n * @example\n * ```ts\n * // Without options - returns just the package directory path\n * const addonName = defineStorybookVis()\n * // Returns: string (absolute filesystem path to package directory)\n * ```\n *\n * @example\n * ```ts\n * // With options - returns object with name and options\n * const addonConfig = defineStorybookVis({\n *   visProjects: [\n *     {\n *       snapshotRootDir: '__vis__/linux',\n *     },\n *   ],\n * })\n * // Returns: { name: string, options: StorybookVisOptions }\n * ```\n */\nexport function defineStorybookVis(): string\n/**\n * Defines the Storybook Visual Testing addon configuration with options.\n *\n * @param options - Configuration options for visual testing suites in Storybook.\n * @param options.visProjects - Array of visual testing project configurations.\n * @param options.visProjects[].snapshotRootDir - Root directory for storing snapshots. Can be a string path or a function that returns a path based on CI and platform context.\n * @param options.visProjects[].snapshotSubpath - Optional function to customize the snapshot subdirectory path.\n *\n * @returns An object containing the package name and the provided options.\n *\n * @example\n * ```ts\n * // In .storybook/main.ts\n * import { defineStorybookVis } from 'storybook-addon-vis/node'\n *\n * export default {\n *   addons: [\n *     defineStorybookVis({\n *       visProjects: [\n *         {\n *           snapshotRootDir: '__vis__/linux',\n *         },\n *         {\n *           snapshotRootDir: '__vis__/local',\n *         },\n *       ],\n *     }),\n *   ],\n * }\n * ```\n */\nexport function defineStorybookVis(options: StorybookVisOptions): { name: string; options: StorybookVisOptions }\nexport function defineStorybookVis(options?: StorybookVisOptions | undefined) {\n\tconst name = dirname(fileURLToPath(import.meta.resolve('storybook-addon-vis/package.json')))\n\treturn !options ? name : { name, options }\n}\n","import type { StorybookVisOptions } from '../server/types.ts'\n\n/**\n * Define options for Storybook Visual Testing addon.\n */\nexport function defineStorybookVisOptions(options: StorybookVisOptions) {\n\treturn options\n}\n"],"mappings":";;;;AAiEA,SAAgB,mBAAmB,SAA2C;CAC7E,MAAM,OAAO,QAAQ,cAAc,OAAO,KAAK,QAAQ,mCAAmC,CAAC,CAAC;AAC5F,QAAO,CAAC,UAAU,OAAO;EAAE;EAAM;EAAS;;;;;;;;AC9D3C,SAAgB,0BAA0B,SAA8B;AACvE,QAAO"}