import type { EcoComponent } from '../../../types/public-types.js'; type ResolvedLazyScriptGroups = Readonly['_resolvedLazyScripts']>; type TemplateContentShape = { strings: readonly string[]; values?: readonly unknown[]; [key: string]: unknown; }; type MarkupNodeLikeShape = { nodeType: number; outerHTML?: string; childNodes?: readonly unknown[]; textContent?: string; [key: string]: unknown; }; /** * Returns `true` when `value` is a thenable (Promise-like) object. * * Used to transparently handle both synchronous and asynchronous component * render results without requiring every caller to branch on `instanceof Promise`. * * @typeParam T Expected resolved type of the thenable. */ export declare function isThenable(value: unknown): value is PromiseLike; /** Returns whether a value looks like a DOM-like markup node from SSR integrations. */ export declare function isMarkupNodeLike(value: unknown): value is MarkupNodeLikeShape; /** * Returns whether a value is a plain opaque object that string serializers would * coerce via `String(value)` rather than render as markup. * * @remarks * Template results (`strings`/`values`), markup nodes, arrays, and framework * element markers (`$$typeof`) are not opaque. Cross-integration children that * are only plain objects must use EcoEmbed or already-serialized HTML. */ export declare function isOpaqueForeignChildValue(children: unknown): boolean; /** * Throws when foreign-path children would be coerced from an opaque object. */ export declare function assertForeignChildrenNotOpaque(children: unknown, context: string): void; /** * Injects `data-eco-trigger` into the first real HTML element opening tag of * a component's rendered output string. * * The scan skips over leading whitespace, HTML comments (``), CDATA * sections, and doctype declarations so that the attribute is always placed on * the first actual element — not spurious markup that can precede it. * * The insertion point is the end of the element's tag name, before any existing * attributes or the closing `>`, which produces output like: * * ```html * * ``` * * When no eligible opening tag is found the original string is returned * unchanged so callers never receive a broken fragment. * * @remarks * `@ecopages/jsx` beta.8+ keeps attribute names in `parts`, so template * `strings[0]` is often just the opening tag name (`(content: T, triggerId: string): T; export declare function addTriggerAttribute(content: T, triggerId: string): T; export declare function addTriggerAttribute(content: unknown, triggerId: string): string | TemplateContentShape | MarkupNodeLikeShape; /** * Wraps rendered component output in a `` element that * carries an inline injector map for the component's lazy script groups. * * @param content Rendered component HTML. * @param lazyGroups Resolved lazy script groups attached to the component config. */ export declare function wrapWithScriptsInjector(content: string, lazyGroups: ResolvedLazyScriptGroups): string; export declare function wrapWithScriptsInjector(content: T, lazyGroups: ResolvedLazyScriptGroups): T | string; export declare function wrapWithScriptsInjector(content: T, lazyGroups: ResolvedLazyScriptGroups): T; export declare function wrapWithScriptsInjector(content: unknown, lazyGroups: ResolvedLazyScriptGroups): string | TemplateContentShape | MarkupNodeLikeShape; export {};