diff --git a/package.json b/package.json index a063d63..47743db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.7.3", + "version": "3.7.4", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/lib/phrase-building/render-np.ts b/src/lib/phrase-building/render-np.ts index ea9a70f..1ac1774 100644 --- a/src/lib/phrase-building/render-np.ts +++ b/src/lib/phrase-building/render-np.ts @@ -57,6 +57,7 @@ export function renderNounSelection(n: T.NounSelection, inflected: boolean, role return [ ...plural, ...getInf(infs, "arabicPlural", n.gender, true, inflected), + // TODO: if it's an INANIMATE NOUN and it inflects allow the inflected form too? ...!plural.length ? getInf(infs, "inflections", n.gender, true, inflected) : [], ]; })(); diff --git a/src/library.ts b/src/library.ts index 041260c..0608ce2 100644 --- a/src/library.ts +++ b/src/library.ts @@ -30,6 +30,7 @@ import Hider from "./components/Hider"; import EntrySelect from "./components/EntrySelect"; import VerbInfo, { RootsAndStems } from "./components/verb-info/VerbInfo"; import VPExplorer from "./components/vp-explorer/VPExplorer"; +import { makeVPSelectionState } from "./components/vp-explorer/verb-selection"; import { vpsReducer } from "./components/vp-explorer/vps-reducer"; import type { VpsReducerAction as VpsA } from "./components/vp-explorer/vps-reducer"; import useStickyState from "./lib/useStickyState"; @@ -243,6 +244,7 @@ export { getEnglishVerb, roleIcon, vpsReducer, + makeVPSelectionState, // protobuf helpers readDictionary, writeDictionary, diff --git a/src/types.ts b/src/types.ts index 9ba826f..59e37de 100644 --- a/src/types.ts +++ b/src/types.ts @@ -28,7 +28,9 @@ export type Dictionary = { entries: DictionaryEntry[]; } -// TODO: BETTER TYPING OF THIS WITH RECORD TO MAKE SURE THAT THE FIELDS LINE UP +// TODO: MAKE THIS A RECORD TYPE +// Record && Record && +// Partial> && Partial> export type DictionaryEntry = { // BASE REQUIRED INFO /** timestamp - used for word id */ @@ -123,6 +125,8 @@ export type DictionaryEntryBooleanField = "noInf" | "shortIntrans" | "noOo" | "s export type DictionaryEntryNumberField = "ts" | "i" | "l" | "separationAtP" | "separationAtF"; export type DictionaryEntryField = DictionaryEntryTextField | DictionaryEntryBooleanField | DictionaryEntryNumberField; +// TODO: make + export type DictionaryEntryError = { errors: string[], p: string,