/** * Schema Fragment System * * Allows users to create reusable Liquid schema fragments that can be injected * into Shopify section schemas using FRAGMENT.name syntax. * * @example * ```liquid * {% schema %} * { * "settings": [ * FRAGMENT.color-scheme, * FRAGMENT.section-spacing * ] * } * {% endschema %} * ``` */ export interface SchemaFragment { name: string; content: string; /** File path where fragment was defined */ source: string; } export interface FragmentRegistry { fragments: Map; } /** * Default schema fragments provided by Preliquify * These are commonly used Shopify theme settings */ export declare const DEFAULT_FRAGMENTS: Record; /** * Scans a directory for custom fragment files (.liquid or .json) */ export declare function scanForFragments(fragmentsDir: string): Promise>; /** * Creates a fragment registry with default and custom fragments */ export declare function createFragmentRegistry(customFragmentsDir?: string): Promise; /** * Processes Liquid content and replaces FRAGMENT.name references with actual fragment content * * @param content - The Liquid template content * @param registry - Fragment registry to use * @returns Content with fragments injected */ export declare function injectFragments(content: string, registry: FragmentRegistry): string; /** * Extracts {% schema %} block from Liquid content */ export declare function extractSchemaBlock(content: string): { before: string; schema: string; after: string; } | null; /** * Processes a Liquid file and injects fragments into its schema */ export declare function processLiquidWithFragments(content: string, registry: FragmentRegistry): string; /** * Lists all available fragments */ export declare function listFragments(registry: FragmentRegistry): string[]; /** * Gets a single fragment by name */ export declare function getFragment(registry: FragmentRegistry, name: string): SchemaFragment | undefined;