import type { PerseusWidgetsMap } from "../data-schema"; /** * Add a widget placeholder using the widget ID. * ex. addWidget("radio 1") => "[[☃ radio 1]]" * * @param {string} id * @returns {string} */ export declare function addWidget(id: string): string; /** * Regex for widget placeholders in a string. * * First capture group is the widget ID (ex. 'radio 1') * Second capture group is the widget type (ex. "radio) * exec return will look like: ['[[☃ radio 1]]', 'radio 1', 'radio'] */ export declare function getWidgetRegex(): RegExp; /** * Extract all widget IDs, which includes the widget type and instance number. * example output: ['radio 1', 'categorizer 1', 'categorizor 2'] * * Content should contain Perseus widget placeholders, * which look like: '[[☃ radio 1]]'. * * @param {string} content * @returns {ReadonlyArray} widgetIds */ export declare function getWidgetIdsFromContent(content: string): ReadonlyArray; /** * Get a list of widget IDs from content, * but only for specific widget types * * @param {string} type the type of widget (ie "radio") * @param {string} content the string to parse * @param {PerseusWidgetsMap} widgetMap widget ID to widget map * @returns {ReadonlyArray} the widget type (ie "radio") */ export declare function getWidgetIdsFromContentByType(type: string, content: string, widgetMap: PerseusWidgetsMap): ReadonlyArray;