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.

104 lines (103 loc) 3.57 kB
import { type AffixDegree } from "../../affix/index.js"; import { type Context } from "./context.js"; import { type Function } from "./function.js"; import { type Specification } from "./specification.js"; export * from "./context.js"; export * from "./function.js"; export * from "./specification.js"; /** Information directly pertaining to Slot IV. */ export type SlotIV = { /** The function of the formative. */ readonly function: Function; /** The specification of the formative. */ readonly specification: Specification; /** The context of the formative. */ readonly context: Context; }; /** Additional information relevant to Slot IV. */ export type SlotIVMetadata = { /** The codified contents of Slot III. */ readonly slotIII: string; /** * If the formative has an affixual root, this is the degree of that affix. * Otherwise, it must be `undefined`. */ readonly affixualFormativeDegree?: AffixDegree | undefined; }; /** * An object mapping from contexts, functions, and specifications to their * Ithkuilic translations. */ export declare const SLOT_IV_MAP: { readonly EXS: { readonly STA: { readonly BSC: "a"; readonly CTE: "ä"; readonly CSV: "e"; readonly OBJ: "i"; }; readonly DYN: { readonly BSC: "u"; readonly CTE: "ü"; readonly CSV: "o"; readonly OBJ: "ö"; }; }; readonly FNC: { readonly STA: { readonly BSC: "ai"; readonly CTE: "au"; readonly CSV: "ei"; readonly OBJ: "eu"; }; readonly DYN: { readonly BSC: "ui"; readonly CTE: "iu"; readonly CSV: "oi"; readonly OBJ: "ou"; }; }; readonly RPS: { readonly STA: { readonly BSC: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly CTE: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly CSV: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly OBJ: import("../../helpers/with-wy-alternative.js").WithWYAlternative; }; readonly DYN: { readonly BSC: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly CTE: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly CSV: import("../../helpers/with-wy-alternative.js").WithWYAlternative; readonly OBJ: import("../../helpers/with-wy-alternative.js").WithWYAlternative; }; }; readonly AMG: { readonly STA: { readonly BSC: "ao"; readonly CTE: "aö"; readonly CSV: "eo"; readonly OBJ: "eö"; }; readonly DYN: { readonly BSC: "oa"; readonly CTE: "öa"; readonly CSV: "oe"; readonly OBJ: "öe"; }; }; }; /** An object mapping from contexts to their indices in the standard vowel table. */ export declare const CONTEXT_TO_INDEX_MAP: { readonly EXS: 0; readonly FNC: 1; readonly RPS: 2; readonly AMG: 3; }; /** * Converts Slot IV into Ithkuil. * * @param slot The function, specification, and context of the formative. * @param metadata Additional information relevant to Slot IV. * @returns Romanized Ithkuilic text representing Slot IV. */ export declare function slotIVToIthkuil(slot: SlotIV, metadata: SlotIVMetadata): string;