import type { PublicWidgetOptionsFunction, WidgetLogic } from "./logic-export.types"; import type { PerseusWidgetOptions, PerseusWidget, Alignment } from "../data-schema"; export declare function registerWidget(type: string, logic: WidgetLogic): void; export declare function isWidgetRegistered(type: string): boolean; export declare function getCurrentVersion(type: string): import("..").Version; export declare const getPublicWidgetOptionsFunction: (type: string) => PublicWidgetOptionsFunction; export declare function getDefaultWidgetOptions(type: string): any; export declare function isAccessible(type: string, widgetOptions: PerseusWidgetOptions): boolean; export declare const traverseChildWidgets: (widgetInfo: PerseusWidget, traverseRenderer: any) => PerseusWidget; /** * Handling for the optional alignments for widgets * See widget-container.jsx for details on how alignments are implemented. */ /** * Returns the list of supported alignments for the given (string) widget * type. This is used primarily at editing time to display the choices * for the user. * * Supported alignments are given as an array of strings in the exports of * a widget's module. */ export declare const getSupportedAlignments: (type: string) => ReadonlyArray; /** * For the given (string) widget type, determine the default alignment for * the widget. This is used at rendering time to go from "default" alignment * to the actual alignment displayed on the screen. * * The default alignment is given either as a string (called * `defaultAlignment`) or a function (called `getDefaultAlignment`) on * the exports of a widget's module. */ export declare const getDefaultAlignment: (type: string) => Alignment; /** * Returns the CSS class name corresponding to the specified widget alignment. * Uses explicit mapping to make it easy to locate related CSS style definitions. */ export declare const getAlignmentClassName: (type: string, alignment: Alignment) => string; /** * We use a function here rather than registering widgets * at the top-level of the file to avoid circular dependencies. * Logic that needs core widget functionality * (like a prod or in tests) * need to call this function before trying to use that logic. */ export declare function registerCoreWidgets(): void;