import type { LoaderContext } from "astro/loaders"; import { z } from "astro/zod"; import { type LilypondScore } from "./index.js"; export interface GenerateIdOptions { /** The path to the entry file, relative to `base`. */ entry: string; /** The base directory URL entries are resolved from. */ base: URL; /** The entry's parsed `\header` fields (see `parseLyHeaderFields`). */ header: Record; } export interface LilypondLoaderOptions { /** * Glob pattern(s) matching score files, relative to `base`. * @default "**\/*.{ly,ily,lilypond}" */ pattern?: string | string[]; /** * Base directory the pattern resolves from — relative to the project * root, or an absolute file URL. */ base: string | URL; /** * Generates an entry's collection id. * @default the file's path relative to `base`, POSIX-separated, with its extension stripped. */ generateId?: (options: GenerateIdOptions) => string; } export type LilypondCollectionEntry = LilypondScore; export declare const lilypondEntrySchema: z.ZodObject<{ source: z.ZodString; alt: z.ZodString; sourceName: z.ZodOptional; includePaths: z.ZodArray; assetTitle: z.ZodString; meta: z.ZodObject<{ arranger: z.ZodOptional; composer: z.ZodOptional; copyright: z.ZodOptional; dedication: z.ZodOptional; instrument: z.ZodOptional; meter: z.ZodOptional; opus: z.ZodOptional; piece: z.ZodOptional; poet: z.ZodOptional; subsubtitle: z.ZodOptional; subtitle: z.ZodOptional; tagline: z.ZodOptional; title: z.ZodOptional; }, z.core.$catchall>; }, z.core.$strip>; /** * Content Loader to turn a directory of `.ly` files into a content collection. */ export declare function lilypondLoader({ pattern, base, generateId, }: LilypondLoaderOptions): { name: string; schema: z.ZodObject<{ source: z.ZodString; alt: z.ZodString; sourceName: z.ZodOptional; includePaths: z.ZodArray; assetTitle: z.ZodString; meta: z.ZodObject<{ arranger: z.ZodOptional; composer: z.ZodOptional; copyright: z.ZodOptional; dedication: z.ZodOptional; instrument: z.ZodOptional; meter: z.ZodOptional; opus: z.ZodOptional; piece: z.ZodOptional; poet: z.ZodOptional; subsubtitle: z.ZodOptional; subtitle: z.ZodOptional; tagline: z.ZodOptional; title: z.ZodOptional; }, z.core.$catchall>; }, z.core.$strip>; load(context: LoaderContext): Promise; };