import AttributedString from "@smartface/native/ui/attributedstring"; import propFactory from "@smartface/contx/lib/smartface/sfCorePropFactory"; declare type ArgumentTypes = F extends (...args: infer A) => any ? A : never; /** * This method automatically maps necessary attributedstring variables. Use this if you don't have Dark theme support or you want the attributedstrings as is. * Consider reading this documentation before passing an html: https://github.com/smartface/@smartface/extension-utils/blob/master/doc/html-to-text.md * @example * ``` import TextView from '@smartface/native/ui/textview'; import { createAttributedStrings } from "sf-extenstion-utils/lib/html-to-text"); import AttributedString from "@smartface/native/ui/attributedstring"; import propFactory from "@smartface/contx/lib/smartface/sfCorePropFactory"; const textView = new TextView(); const htmlSource = "Your attributed Strings
second
Third
"; const attributedStrings = createAttributedTexts(htmlSource); textView.attributedText = attributedStrings; ``` * @param {string} htmlSource - Your html content to work with. The limitations and rules are specified in the document of this module. * @returns {Array.} */ export declare function createAttributedTexts(htmlSource: string): AttributedString[]; /** * This method returns half-baked attributedstring value. Use this method if you support dark theme to change foregroundColor or if you want to tweak other properties. * Consider reading this documentation before passing an html: https://github.com/smartface/@smartface/extension-utils/blob/master/doc/html-to-text.md * @example * ``` import TextView from '@smartface/native/ui/textview'; import { createAttributedStrings } from "sf-extenstion-utils/lib/html-to-text"); const textView = new TextView(); const htmlSource = "Your attributed Strings
second
Third
"; textView.attributedText = attributedStrings.map(s => new AttributedString(propFactory(s))); ``` * @param {string} htmlSource - Your html content to work with. The limitations and rules are specified in the document of this module. * @returns {Array.} */ export declare function createAttributedStrings(htmlSource: string): ArgumentTypes[0]; export {};