import { WidgetVariants } from './types.js'; /** * Options for updating a home screen widget */ export type UpdateWidgetOptions = { /** * URL to open when the widget is tapped. * Can be a full URL (e.g., "myapp://screen/details") * or a path that will be prefixed with your app's URL scheme. */ deepLinkUrl?: string; }; /** * Update a home screen widget with new content. * * The content will be stored in App Group storage and the widget timeline * will be reloaded to display the new content. * * @param widgetId - The widget identifier (as defined in your config plugin) * @param variants - An object mapping widget families to specific content. * Each key corresponds to a widget size family. * @param options - Optional settings like deep link URL * * @example Different content per size * ```tsx * import { updateWidget, Voltra } from 'voltra' * * await updateWidget('weather', { * systemSmall: 72°F, * systemMedium: ( * * 72°F * * Sunny * High: 78° Low: 65° * * * ), * }, { deepLinkUrl: '/weather' }) * ``` */ export declare const updateWidget: (widgetId: string, variants: WidgetVariants, options?: UpdateWidgetOptions) => Promise; /** * Reload widget timelines to refresh their content. * * Use this after updating data that widgets depend on (e.g., after preloading * new images) to force them to re-render. * * @param widgetIds - Optional array of widget IDs to reload. If omitted, reloads all widgets. * * @example * ```typescript * // Reload specific widgets * await reloadWidgets(['weather', 'calendar']) * * // Reload all widgets * await reloadWidgets() * ``` */ export declare const reloadWidgets: (widgetIds?: string[]) => Promise; /** * Clear a widget's stored data. * * This removes the JSON content and deep link URL for the specified widget, * causing it to show its placeholder state. * * @param widgetId - The widget identifier to clear * * @example * ```typescript * await clearWidget('weather') * ``` */ export declare const clearWidget: (widgetId: string) => Promise; /** * Clear all widgets' stored data. * * This removes the JSON content and deep link URLs for all configured widgets, * causing them to show their placeholder states. * * @example * ```typescript * await clearAllWidgets() * ``` */ export declare const clearAllWidgets: () => Promise; //# sourceMappingURL=widget-api.d.ts.map