From 3a0aeea6e48d9d84f424d22e5c19d9fde92aecf3 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 23 Aug 2022 16:11:32 +0400 Subject: [PATCH] more --- package.json | 2 +- src/lib/phrase-building/render-np.ts | 1 + src/library.ts | 2 ++ src/types.ts | 6 +++++- 4 files changed, 9 insertions(+), 2 deletions(-) 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,