/** * @param {string} d * @param {string} text * @param {number} offset * @param {object} options */ export function getDirectiveTemplate(d: string, text: string, offset: number, options: object): any; /** * @class Texture * A String subclass that is used to render rich text (i.e. text that contains * hyperlinks, images, mentions, styling etc.). * * The "rich" parts of the text is represented by lit TemplateResult * objects which are added via the {@link Texture.addTemplateResult} * method and saved as metadata. * * By default Converse adds TemplateResults to support emojis, hyperlinks, * images, map URIs and mentions. * * 3rd party plugins can listen for the `beforeMessageBodyTransformed` * and/or `afterMessageBodyTransformed` events and then call * `addTemplateResult` on the Texture instance in order to add their own * rich features. */ export class Texture extends String { /** * @typedef {import('@converse/headless/types/utils/types').MediaURLMetadata} MediaURLMetadata */ /** * Create a new {@link Texture} instance. * @param {string} text - The text to be annotated * @param {number} offset - The offset of this particular piece of text * from the start of the original message text. This is necessary because * Texture instances can be nested when templates call directives * which create new Texture instances (as happens with XEP-393 styling directives). * @param {Object} [options] * @param {string} [options.nick] - The current user's nickname (only relevant if the message is in a XEP-0045 MUC) * @param {boolean} [options.render_styling] - Whether XEP-0393 message styling should be applied to the message * @param {boolean} [options.embed_audio] - Whether audio URLs should be rendered as