/** * Shared command logic for palette generation * * Provides functions for generating palettes, displaying results, * and handling export operations. */ import { Effect, Option as O, ParseResult } from "effect"; import { ColorSpace } from "../../../../domain/color/color.schema.js"; import { StopPosition } from "../../../../domain/palette/palette.schema.js"; import { ConsoleService } from "../../../../services/ConsoleService/index.js"; import type { ExportConfig } from "../../../../services/ExportService/export.schema.js"; import { ExportService } from "../../../../services/ExportService/index.js"; import { PaletteService } from "../../../../services/PaletteService/index.js"; import { BatchResult, type PaletteResult } from "../../../../services/PaletteService/palette.schema.js"; import { PromptService } from "../../../../services/PromptService/index.js"; import { CancelledError } from "../../../prompts.js"; type GenerateAndDisplayOptions = { readonly color: string; readonly format: ColorSpace; readonly name: string; readonly pattern: string; readonly stop: StopPosition; }; /** * Generate a palette from color and stop position * * Creates a validated palette request and generates a complete palette * using the configured pattern source. */ export declare const generateAndDisplay: ({ color, format, name, pattern, stop }: GenerateAndDisplayOptions) => Effect.Effect<{ readonly name: string; readonly inputColor: string; readonly anchorStop: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000; readonly outputFormat: "hex" | "rgb" | "oklch" | "oklab"; readonly stops: readonly ({ readonly color: { readonly c: number; readonly l: number; readonly h: number; readonly alpha: number; }; readonly position: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000; } & { readonly value: string; })[]; }, ParseResult.ParseError | import("../../../../services/PaletteService/PaletteService.js").PaletteGenerationError, PaletteService>; /** * Display a single palette result * * Formats and outputs the palette using clack's note display, * showing input color, anchor stop, format, and all generated stops. */ export declare const displayPalette: (result: PaletteResult) => Effect.Effect; /** * Display batch generation results * * Shows summary status, group name, output format, failures (if any), * and each generated palette in the batch. */ export declare const displayBatch: (batch: BatchResult) => Effect.Effect; /** * Build export configuration from CLI options * * Validates the export target and resolves the JSON path if needed. * Returns None if export target is "none", otherwise returns the config. */ export declare const buildExportConfig: (exportOpt: O.Option, exportPath: O.Option) => Effect.Effect) | undefined; }>, ParseResult.ParseError | CancelledError, PromptService | ConsoleService>; /** * Execute export for a single palette * * Exports the palette to the configured target (JSON file or clipboard) * and logs a success message. */ export declare const executePaletteExport: (palette: PaletteResult, config: ExportConfig) => Effect.Effect; /** * Execute export for a batch of palettes * * Exports all palettes in the batch to the configured target * and logs a success message. */ export declare const executeBatchExport: (batch: BatchResult, config: ExportConfig) => Effect.Effect; export {}; //# sourceMappingURL=formatter.d.ts.map