/** * Pattern service for loading and processing color transformation patterns * * Provides: * - Loading patterns from JSON files * - Loading example palettes * - Pattern extraction and smoothing * * Uses Effect's FileSystem service instead of Node.js fs for better testing and abstraction. */ import { FileSystem, Path } from "@effect/platform"; import { Effect } from "effect"; import type { AnalyzedPalette, TransformationPattern } from "../domain/learning/pattern.js"; declare const PatternLoadError_base: new = {}>(args: import("effect/Types").Equals extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "PatternLoadError"; } & Readonly; /** * Error type for pattern loading failures */ export declare class PatternLoadError extends PatternLoadError_base<{ readonly message: string; readonly cause?: unknown; }> { } declare const PatternService_base: Effect.Service.Class Effect.Effect; loadPalette: (filePath: string) => Effect.Effect; loadPatternsFromDirectory: (directoryPath: string) => Effect.Effect<{ readonly palettes: ReadonlyArray; readonly pattern: TransformationPattern; }, PatternLoadError>; }, never, FileSystem.FileSystem | Path.Path>; readonly dependencies: readonly [import("effect/Layer").Layer, import("effect/Layer").Layer]; }>; /** * Pattern service using Effect.Service pattern * * @example * ```typescript * Effect.gen(function*() { * const service = yield* PatternService * const pattern = yield* service.loadPattern("test/fixtures/valid-palettes/example-orange.json") * console.log(pattern.referenceStop) // 500 * }).pipe(Effect.provide(PatternService.Default)) * ``` */ export declare class PatternService extends PatternService_base { /** * Test layer - same as Default since PatternService has no environment-specific behavior */ static readonly Test: import("effect/Layer").Layer; } export {}; //# sourceMappingURL=PatternService.d.ts.map