@nagwa-limited/kashida-engine
Version:
An engine to unify array of Arabic strings to the same width using Kashidas
29 lines (28 loc) • 1.38 kB
TypeScript
/**
* Renders all the poem lines after adding kashida to it and unifying all its widths for all the poems available on page.
* If the arguments were not provided they will fallback to the defaults resulting in expecting the following HTML structure in DOM.
* ``` HTML
* <element class="poem">
* <element class="linesGroup">
* <div>
* <div> [The line should exist here] </div>
* </div>
* </element>
* <element class="linesGroup">
* <div>
* <div> [The line should exist here] </div>
* <div> [The line should exist here] </div>
* </div>
* </element>
* </element>
* ```
* @param { String= } [poemSelector =".poem"] The CSS selector used to extract the poems. Default value: `.poem`.
* @param { String= } [lineSelector=".linesGroup div div"] The CSS selector used to extract the lines from the poem element. Default value: `.linesGroup div div`.
*/
export declare function renderKashidaToPoems(poemSelector?: string, lineSelector?: string): void;
/**
* Renders all the poem lines after adding kashida to it and unifying all its widths for all the poems available on page expecting the previously mentioned structure in DOM.
* @param { Event= } e Any Event so that it can be used as an event handler.
*/
export declare function renderKashidaToPoems(e?: Event): void;
export default renderKashidaToPoems;