UNPKG

@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.

78 lines (77 loc) 2.86 kB
import { type Affiliation } from "./affiliation.js"; import { type Configuration } from "./configuration.js"; import { type Essence } from "./essence.js"; import { type Extension } from "./extension.js"; import { type Perspective } from "./perspective.js"; export * from "./affiliation.js"; export * from "./configuration.js"; export * from "./essence.js"; export * from "./extension.js"; export * from "./geminate.js"; export * from "./perspective-and-essence.js"; export * from "./perspective.js"; /** A Ca affix complex. */ export type CA = { /** The affiliation of the Ca form. */ readonly affiliation: Affiliation; /** The configuration of the Ca form. */ readonly configuration: Configuration; /** The extension of the Ca form. */ readonly extension: Extension; /** The perspective of the Ca form. */ readonly perspective: Perspective; /** The essence of the Ca form. */ readonly essence: Essence; }; /** A partially filled Ca affix complex. */ export type PartialCA = { /** The affiliation of the Ca form. */ readonly affiliation?: Affiliation | undefined; /** The configuration of the Ca form. */ readonly configuration?: Configuration | undefined; /** The extension of the Ca form. */ readonly extension?: Extension | undefined; /** The perspective of the Ca form. */ readonly perspective?: Perspective | undefined; /** The essence of the Ca form. */ readonly essence?: Essence | undefined; }; /** * Makes allomorphic substitutions within Ca forms to make the pronounceble and * conform to Ithkuil's phonotactic rules. * * @param ca The Ca form which will have substitutions made in it. * @returns Romanized Ithkuilic text representing the finalized Ca form. */ export declare function makeCAAllomorphicSubstitutions(ca: string): string; /** * Converts a Ca form into Ithkuil. * * @param ca The Ca form to be converted. * @returns Romanized Ithkuilic text representing the Ca form. */ export declare function caToIthkuil(ca: PartialCA): string; /** * Geminates an ungeminated Ca form. * * @param ca The Ca form to be geminated. * @returns Romanized Ithkuilic text representing the geminated Ca form. */ export declare function geminateCa(ca: string): string; /** * Converts a Ca form into Ithkuil, geminating the form throughout the process. * * @param ca The Ca form to be converted. * @returns Romanized Ithkuilic text representing the geminated Ca form. */ export declare function geminatedCAToIthkuil(ca: PartialCA): string; /** The default Ca form. */ export declare const DEFAULT_CA: CA; /** * Fills a Ca form with default values (CSL, UPX, DEL, M, and NRM) in its empty * slots. * * @param ca The Ca form to be filled. * @returns A completed Ca form with no empty slots. */ export declare function fillInDefaultCAValues(ca: PartialCA): CA;