@zsnout/ithkuil
Version:
A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.
52 lines (51 loc) • 2.51 kB
TypeScript
import type { Perspective } from "../../ca/index.js";
import { type Referent } from "./index.js";
/** A list of referents. */
export type ReferentList = readonly [Referent, ...Referent[]];
/**
* Converts a list of referents into Ithkuil. Does not attempt to change the
* order of the referents to create phonotactically permissible consonant
* clusters. As such, the generated clusters may be phonotactically invalid.
*
* To automatically rearrange the referents to optimize for phonotactically
* correct consonant clusters, use {@link referentListToIthkuil} instead.
*
* @param referents A list of referents.
* @param perspective The perspective to attach to said referents.
* @param isReferentialAffix Whether this is used in a referential affix.
* @param isSecondReferent Whether this is the second referent in a dual
* referential.
* @returns Romanized Ithkuilic text representing the referent list.
*/
export declare function assembleReferentList(referents: ReferentList, perspective: Perspective, isReferentialAffix: boolean, isSecondReferent: boolean): string;
/**
* Converts a list of referents into Ithkuil. Will automatically rearrange the
* order of the referents to create phonotactically permissible consonant
* clusters. As such, the generated clusters will most often be phonotactically
* valid.
*
* To avoid automatically rearranging the referents, use
* {@link assembleReferentList} instead.
*
* @param referents A list of referents.
* @param perspective The perspective to attach to said referents.
* @param isSecondReferent Whether this is the second referent in a dual
* referential.
* @returns Romanized Ithkuilic text representing the referent list.
*/
export declare function referentListToIthkuil(referents: ReferentList, perspective: Perspective, isSecondReferent: boolean): string;
/**
* Converts a `ReferentList` into an Ithkuilic referential affix.
*
* @param referents The `ReferentList` to be converted.
* @param perspective The perspective to be attatched to the referent.
* @returns Romanized Ithkuilic text representing the referent.
*/
export declare function referentialAffixToIthkuil(referents: ReferentList, perspective: "M" | "G" | "N"): string;
/**
* Converts a list of referents to an Ithkuilic personal reference root.
*
* @param list The referents to be converted.
* @returns Romanized Ithkuilic text representing the referent list.
*/
export declare function referentListToPersonalReferenceRoot(list: ReferentList): string;