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.

86 lines (85 loc) 3.63 kB
import { type AffixType, type Case, type CaseScope, type Illocution, type Mood, type Validation } from "../../generate/index.js"; /** Information about a case-accessor quaternary character. */ export type CaseAccessorQuaternaryCharacter = { /** Whether this character is handwritten. */ readonly handwritten?: boolean | undefined; /** The case-accessor affix type of this quaternary character. */ readonly type: AffixType; /** The case shown by this quaternary character. */ readonly value: Case; /** Whether this character is an inverse case-accessor. */ readonly isInverse?: boolean | undefined; /** Whether this is a slot VII affix. */ readonly isSlotVIIAffix?: boolean | undefined; }; /** Information about a non-case-accessor quaternary character. */ export type StandardQuaternaryCharacter = { /** Whether this character is handwritten. */ readonly handwritten?: boolean | undefined; /** The mood shown on this quaternary character. */ readonly mood?: Mood | undefined; /** The case or illocution/validation shown on this quaternary character. */ readonly value?: Case | Illocution | Validation | undefined; /** The case-scope shown on this quaternary character. */ readonly caseScope?: CaseScope | undefined; readonly type?: undefined; }; /** Information about a quaternary character. */ export type QuaternaryCharacter = StandardQuaternaryCharacter | CaseAccessorQuaternaryCharacter; /** An object mapping case-scopes to their corresponding diacritics. */ export declare const CASE_SCOPE_TO_DIACRITIC_MAP: { readonly CCN: undefined; readonly CCA: "DOT"; readonly CCS: "DIAG_BAR"; readonly CCQ: "CURVE_TO_TOP"; readonly CCP: "CURVE_TO_BOTTOM"; readonly CCV: "HORIZ_BAR"; }; /** An object mapping moods to their corresponding diacritics. */ export declare const MOOD_TO_DIACRITIC_MAP: { readonly FAC: undefined; readonly SUB: "DOT"; readonly ASM: "DIAG_BAR"; readonly SPC: "CURVE_TO_TOP"; readonly COU: "CURVE_TO_BOTTOM"; readonly HYP: "HORIZ_BAR"; }; /** An array mapping cases to their corresponding Secondary extensions. */ export declare const CASE_TO_SECONDARY_EXTENSION: readonly [undefined, "d", "š", "g", "p", "t", "k", "b", "m"]; /** An array mapping illocutions to their corresponding Secondary extensions. */ export declare const ILLOCUTION_TO_SECONDARY_EXTENSION: { readonly ASR: "s"; readonly DIR: "ḑ"; readonly DEC: "f"; readonly IRG: "ř"; readonly VRF: "v"; readonly ADM: "ţ"; readonly POT: "x"; readonly HOR: "n"; readonly CNJ: "z"; }; /** An array mapping validations to their corresponding Secondary extensions. */ export declare const VALIDATION_TO_SECONDARY_EXTENSION: { readonly OBS: "s"; readonly REC: "ḑ"; readonly PUP: "f"; readonly RPR: "ř"; readonly IMA: "v"; readonly CVN: "ţ"; readonly ITU: "x"; readonly INF: "n"; readonly USP: "z"; }; /** * An array mapping cases, illocutions, and validations to their corresponding * diacritics, which can then be used in Cr roots where no case-scope or mood is * present. */ export declare const QUATERNARY_DIACRITIC_MAP: readonly [undefined, "DOT", "HORIZ_BAR", "CURVE_TO_LEFT", "CURVE_TO_RIGHT", "HORIZ_WITH_BOTTOM_LINE", "HORIZ_WITH_TOP_LINE", "CURVE_TO_TOP", "CURVE_TO_BOTTOM"]; /** * Renders a quaternary character as a group of SVG paths. * * @param quaternary Information about the quaternary character. * @returns The rendered quaternary character. */ export declare function Quaternary(quaternary: QuaternaryCharacter): SVGGElement;