import { type DeepTransformContent as DeepTransformContentCore, type IInterpreterPluginState as IInterpreterPluginStateCore, type Plugins } from '@intlayer/core/interpreter'; import type { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation'; import type { NodeType } from '@intlayer/types/nodeType'; import * as NodeTypes from '@intlayer/types/nodeType'; import type { HTMLComponents } from './html/types'; import { type IntlayerNode } from './renderIntlayerNode'; /** * Interface for Svelte-specific plugin functionality * This interface can be augmented to add more Svelte-specific transformations */ export type IInterpreterPluginState = Omit & { svelteIntlayerNode: true; svelteInsertion: true; svelteMarkdown: true; svelteHtml: true; }; /** * Type that represents the deep transformation of content for Svelte * This applies Svelte-specific transformations recursively to all content */ export type DeepTransformContent = DeepTransformContentCore; /** * Basic Intlayer node plugins for content handling * These handle the core content transformation logic */ export declare const intlayerNodePlugins: Plugins; /** * Svelte-specific node plugins for handling basic content types * These plugins handle strings, numbers, and bigints in Svelte applications */ export declare const svelteNodePlugins: Plugins; /** --------------------------------------------- * INSERTION PLUGIN * --------------------------------------------- */ export type InsertionCond = T extends { nodeType: NodeType | string; [NodeTypes.INSERTION]: infer I; fields: readonly string[]; } ? (values: V) => I extends string ? V[keyof V] extends string | number ? IntlayerNode : IntlayerNode : DeepTransformContent : never; /** Insertion plugin for Svelte. Handles component insertion. */ export declare const insertionPlugin: Plugins; /** * MARKDOWN PLUGIN */ export type MarkdownStringCond = T extends string ? IntlayerNode; use: (components?: HTMLComponents<'permissive', {}>) => any; }> : never; /** Markdown string plugin. Replaces string node with a component that render the markdown. */ export declare const markdownStringPlugin: Plugins; export type MarkdownCond = T extends { nodeType: NodeType | string; [NodeTypes.MARKDOWN]: infer _M; metadata?: infer U; tags?: infer U; } ? { use: (components?: HTMLComponents<'permissive', U>) => any; metadata: DeepTransformContent; } & any : never; export declare const markdownPlugin: Plugins; /** --------------------------------------------- * HTML PLUGIN * --------------------------------------------- */ export type HTMLPluginCond = T extends { nodeType: NodeType | string; [NodeTypes.HTML]: infer I; tags?: infer U; } ? { use: (components?: HTMLComponents<'permissive', U>) => IntlayerNode; } : never; /** HTML plugin. Replaces node with a function that takes components => HTMLElement[]. */ export declare const htmlPlugin: Plugins; export interface IInterpreterPluginSvelte { svelteIntlayerNode: T extends string | number ? IntlayerNode : never; svelteInsertion: InsertionCond; svelteMarkdown: MarkdownCond; svelteHtml: HTMLPluginCond; } /** * Get the plugins array for Svelte content transformation. * This function is used by both getIntlayer and getDictionary to ensure consistent plugin configuration. */ export declare const getPlugins: (locale?: LocalesValues, fallback?: boolean) => Plugins[];