admesh-ui-sdk
Version:
Beautiful, modern React components for displaying AI-powered product recommendations with citation-based conversation ads, auto-triggered widgets, floating chat, conversational interfaces, persistent sidebar, and built-in tracking. Includes zero-code SDK
37 lines • 1.33 kB
TypeScript
import { default as React } from 'react';
export interface WeaveAdFormatContextType {
/** Whether the fallback UI should be rendered (no AdMesh links detected) */
shouldRenderFallback: boolean;
/** The message ID for this Weave Ad Format container (used for deduplication) */
messageId: string;
/** The session ID for this Weave Ad Format container (used for tracking) */
sessionId?: string;
/** The query for this message (used for fallback API calls) */
query?: string;
}
declare const WeaveAdFormatContext: React.Context<WeaveAdFormatContextType | undefined>;
export declare const WeaveAdFormatProvider: React.FC<{
children: React.ReactNode;
shouldRenderFallback: boolean;
messageId: string;
sessionId?: string;
query?: string;
}>;
/**
* Hook to access WeaveAdFormatContext
*
* Returns the context value if inside a WeaveAdFormatContainer,
* or undefined if not inside one.
*
* @example
* ```tsx
* const weaveContext = useWeaveAdFormatContext();
* if (weaveContext) {
* // Inside a WeaveAdFormatContainer
* const { shouldRenderFallback, messageId } = weaveContext;
* }
* ```
*/
export declare const useWeaveAdFormatContext: () => WeaveAdFormatContextType | undefined;
export default WeaveAdFormatContext;
//# sourceMappingURL=WeaveAdFormatContext.d.ts.map