/** * Shared command logic for palette generation * * Provides functions for generating palettes, displaying results, * and handling export operations. */ import { FileSystem, Path } from "@effect/platform"; import { Effect, Option as O, ParseResult } from "effect"; import type { ColorSpace } from "../../../domain/color/color.schema.js"; import type { BatchResult, PaletteResult, StopPosition } from "../../../domain/palette/palette.schema.js"; import type { ExportConfig } from "../../../io/io.schema.js"; import { ConsoleService } from "../../../services/ConsoleService/index.js"; import { CancelledError, PromptService } from "../../../services/PromptService/index.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 * * Uses the generatePalette use case with filesystem pattern loader. */ export declare const generateAndDisplay: ({ color, format, name, pattern, stop }: GenerateAndDisplayOptions) => Effect.Effect<{ readonly name: string; readonly stops: readonly ({ readonly position: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000; readonly color: { readonly l: number; readonly c: number; readonly h: number; readonly alpha: number; }; } & { readonly value: string; })[]; readonly inputColor: string; readonly anchorStop: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000; readonly outputFormat: "hex" | "rgb" | "oklch" | "oklab"; }, import("../../../io/patternLoader.js").PatternLoadError | import("../../../usecases/generatePalette.js").GeneratePaletteError, FileSystem.FileSystem>; /** * 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, ConsoleService | PromptService>; /** * 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