2021-03-09 12:39:13 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2021 lingdocs.com
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-04-08 10:04:16 +00:00
|
|
|
import {
|
2021-03-09 12:39:13 +00:00
|
|
|
conjugateVerb,
|
|
|
|
} from "./lib/verb-conjugation";
|
|
|
|
import {
|
|
|
|
inflectWord,
|
|
|
|
} from "./lib/pashto-inflector";
|
|
|
|
import {
|
|
|
|
getVerbInfo,
|
|
|
|
} from "./lib/verb-info";
|
|
|
|
import ConjugationViewer from "./components/ConjugationViewer";
|
|
|
|
import InflectionsTable from "./components/InflectionsTable";
|
|
|
|
import Pashto from "./components/Pashto";
|
|
|
|
import Phonetics from "./components/Phonetics";
|
|
|
|
import InlinePs from "./components/InlinePs";
|
|
|
|
import ButtonSelect from "./components/ButtonSelect";
|
|
|
|
import VerbFormDisplay from "./components/VerbFormDisplay";
|
|
|
|
import VerbTable from "./components/VerbTable";
|
2022-06-11 15:57:59 +00:00
|
|
|
import EPDisplay from "./components/ep-explorer/EPDisplay";
|
2021-03-09 12:39:13 +00:00
|
|
|
import Examples from "./components/Examples";
|
2022-04-08 10:04:16 +00:00
|
|
|
import Hider from "./components/Hider";
|
|
|
|
import EntrySelect from "./components/EntrySelect";
|
2021-03-09 12:39:13 +00:00
|
|
|
import VerbInfo, { RootsAndStems } from "./components/verb-info/VerbInfo";
|
2022-04-08 10:04:16 +00:00
|
|
|
import VPExplorer from "./components/vp-explorer/VPExplorer";
|
|
|
|
import useStickyState from "./lib/useStickyState";
|
2022-06-04 23:19:24 +00:00
|
|
|
import Block, { NPBlock, APBlock } from "./components/blocks/Block";
|
2021-03-09 12:39:13 +00:00
|
|
|
import {
|
|
|
|
makePsString,
|
2021-09-14 15:04:45 +00:00
|
|
|
removeFVarients,
|
2022-04-08 10:04:16 +00:00
|
|
|
} from "./lib/accent-and-ps-utils";
|
|
|
|
import {
|
|
|
|
addToForm,
|
|
|
|
concatPsString,
|
2021-07-15 09:57:04 +00:00
|
|
|
isVerbBlock,
|
|
|
|
isImperativeBlock,
|
2021-09-15 00:55:47 +00:00
|
|
|
isPluralInflectionSet,
|
|
|
|
isUnisexSet,
|
2021-07-15 09:57:04 +00:00
|
|
|
isInflectionSet,
|
2021-10-06 01:31:45 +00:00
|
|
|
addEnglish,
|
2021-10-16 01:58:56 +00:00
|
|
|
endsWith,
|
2022-03-18 21:32:01 +00:00
|
|
|
hasBaParticle,
|
2022-03-20 12:45:47 +00:00
|
|
|
psRemove,
|
2022-04-08 10:04:16 +00:00
|
|
|
firstVariation,
|
|
|
|
psStringFromEntry,
|
|
|
|
getLong,
|
|
|
|
capitalizeFirstLetter,
|
2021-03-09 12:39:13 +00:00
|
|
|
} from "./lib/p-text-helpers";
|
2021-10-05 01:15:13 +00:00
|
|
|
import {
|
|
|
|
getEnglishWord,
|
|
|
|
} from "./lib/get-english-word";
|
2021-09-16 17:52:52 +00:00
|
|
|
import {
|
|
|
|
standardizePashto,
|
|
|
|
standardizePhonetics,
|
|
|
|
} from "./lib/standardize-pashto";
|
2021-03-18 12:01:52 +00:00
|
|
|
import { phoneticsToDiacritics } from "./lib/phonetics-to-diacritics";
|
2022-04-08 10:04:16 +00:00
|
|
|
import {
|
|
|
|
randomPerson,
|
|
|
|
isInvalidSubjObjCombo,
|
|
|
|
randomSubjObj,
|
|
|
|
} from "./lib/np-tools";
|
2022-05-14 21:55:52 +00:00
|
|
|
import {
|
|
|
|
getEnglishFromRendered,
|
|
|
|
getPashtoFromRendered,
|
|
|
|
} from "./lib/phrase-building/np-tools"; // TODO should be one np-tools file?
|
2021-03-09 12:39:13 +00:00
|
|
|
import {
|
2021-07-24 15:43:53 +00:00
|
|
|
convertSpelling,
|
|
|
|
revertSpelling,
|
2021-03-09 12:39:13 +00:00
|
|
|
} from "./lib/convert-spelling";
|
|
|
|
import {
|
|
|
|
dictionaryEntryBooleanFields,
|
|
|
|
dictionaryEntryNumberFields,
|
|
|
|
dictionaryEntryTextFields,
|
|
|
|
} from "./lib/fields";
|
|
|
|
import {
|
2021-09-16 17:52:52 +00:00
|
|
|
validateEntry,
|
|
|
|
standardizeEntry,
|
2021-03-09 12:39:13 +00:00
|
|
|
} from "./lib/validate-entry";
|
2022-05-09 16:02:19 +00:00
|
|
|
import {
|
|
|
|
psJSXMap,
|
|
|
|
} from "./lib/jsx-map";
|
2021-03-10 11:37:35 +00:00
|
|
|
import {
|
|
|
|
readDictionary,
|
|
|
|
writeDictionary,
|
|
|
|
readDictionaryInfo,
|
|
|
|
writeDictionaryInfo,
|
|
|
|
} from "./lib/protobuf";
|
2021-03-10 16:51:40 +00:00
|
|
|
import {
|
|
|
|
pashtoConsonants,
|
|
|
|
} from "./lib/pashto-consonants";
|
|
|
|
import {
|
|
|
|
isNounAdjOrVerb,
|
2021-07-14 00:44:27 +00:00
|
|
|
getEnglishPersonInfo,
|
|
|
|
getPersonFromVerbForm,
|
|
|
|
getPersonNumber,
|
2021-07-15 09:57:04 +00:00
|
|
|
personFromVerbBlockPos,
|
2021-10-05 03:27:26 +00:00
|
|
|
getVerbBlockPosFromPerson,
|
2021-10-06 00:52:54 +00:00
|
|
|
personIsPlural,
|
2021-10-06 01:13:47 +00:00
|
|
|
personGender,
|
2021-10-07 17:17:04 +00:00
|
|
|
parseEc,
|
2022-04-26 07:11:46 +00:00
|
|
|
personNumber,
|
2022-05-06 20:33:00 +00:00
|
|
|
randFromArray,
|
2022-05-06 20:54:15 +00:00
|
|
|
chooseLength,
|
2022-05-07 05:52:56 +00:00
|
|
|
isFirstPerson,
|
|
|
|
isSecondPerson,
|
|
|
|
isThirdPerson,
|
2021-03-10 16:51:40 +00:00
|
|
|
} from "./lib/misc-helpers";
|
2022-05-06 20:54:15 +00:00
|
|
|
import {
|
|
|
|
flattenLengths,
|
|
|
|
} from "./lib/phrase-building/segment";
|
2021-03-16 13:35:41 +00:00
|
|
|
import {
|
|
|
|
simplifyPhonetics,
|
|
|
|
} from "./lib/simplify-phonetics";
|
2021-03-18 12:05:49 +00:00
|
|
|
import {
|
|
|
|
translatePhonetics,
|
|
|
|
} from "./lib/translate-phonetics";
|
2021-06-05 16:29:35 +00:00
|
|
|
import {
|
|
|
|
addDiacritics,
|
|
|
|
} from "./lib/diacritics";
|
2021-09-02 12:37:45 +00:00
|
|
|
import {
|
|
|
|
removeAccents,
|
2021-09-03 11:27:02 +00:00
|
|
|
hasAccents,
|
2021-10-18 00:58:50 +00:00
|
|
|
splitUpSyllables,
|
|
|
|
countSyllables,
|
2021-09-02 12:37:45 +00:00
|
|
|
} from "./lib/accent-helpers";
|
2022-05-06 19:57:39 +00:00
|
|
|
import {
|
|
|
|
makeNounSelection,
|
|
|
|
} from "./components/np-picker/picker-tools";
|
2022-05-06 20:33:00 +00:00
|
|
|
import {
|
|
|
|
renderEP,
|
|
|
|
} from "./lib/phrase-building/render-ep";
|
|
|
|
import {
|
|
|
|
renderVP,
|
|
|
|
} from "./lib/phrase-building/render-vp";
|
2022-05-14 21:28:25 +00:00
|
|
|
import {
|
|
|
|
renderNPSelection,
|
|
|
|
} from "./lib/phrase-building/render-np";
|
2022-05-06 20:33:00 +00:00
|
|
|
import {
|
|
|
|
compileEP,
|
|
|
|
compileVP,
|
|
|
|
} from "./lib/phrase-building/compile";
|
2022-05-26 20:01:25 +00:00
|
|
|
import {
|
2022-05-26 20:05:38 +00:00
|
|
|
renderAPSelection,
|
2022-05-26 20:01:25 +00:00
|
|
|
} from "./lib/phrase-building/render-ap";
|
2022-04-14 17:11:45 +00:00
|
|
|
import NPPicker from "./components/np-picker/NPPicker";
|
2022-04-26 08:02:18 +00:00
|
|
|
import EPExplorer from "./components/ep-explorer/EPExplorer";
|
2022-04-12 08:39:03 +00:00
|
|
|
import shuffleArray from "./lib/shuffle-array";
|
2021-03-09 12:39:13 +00:00
|
|
|
import defaultTextOptions from "./lib/default-text-options";
|
|
|
|
import * as grammarUnits from "./lib/grammar-units";
|
2021-11-03 00:33:39 +00:00
|
|
|
import genderColors from "./lib/gender-colors";
|
2021-03-09 12:39:13 +00:00
|
|
|
import * as Types from "./types";
|
2022-04-08 10:04:16 +00:00
|
|
|
import * as typePredicates from "./lib/type-predicates";
|
2022-05-26 20:13:59 +00:00
|
|
|
import APPicker from "./components/ap-picker/APPicker";
|
2021-03-09 12:39:13 +00:00
|
|
|
|
|
|
|
export {
|
|
|
|
// FUNCTIONS
|
|
|
|
conjugateVerb,
|
|
|
|
getVerbInfo,
|
|
|
|
inflectWord,
|
|
|
|
addToForm,
|
|
|
|
concatPsString,
|
|
|
|
makePsString,
|
2021-09-14 15:04:45 +00:00
|
|
|
removeFVarients,
|
2021-03-09 12:39:13 +00:00
|
|
|
standardizePashto,
|
2021-09-16 17:52:52 +00:00
|
|
|
standardizePhonetics,
|
2021-07-24 15:43:53 +00:00
|
|
|
convertSpelling,
|
|
|
|
revertSpelling,
|
2021-03-09 12:39:13 +00:00
|
|
|
validateEntry,
|
2021-09-16 17:52:52 +00:00
|
|
|
standardizeEntry,
|
2021-03-10 16:51:40 +00:00
|
|
|
isNounAdjOrVerb,
|
2021-03-16 13:35:41 +00:00
|
|
|
simplifyPhonetics,
|
2021-03-18 12:01:52 +00:00
|
|
|
phoneticsToDiacritics,
|
2021-06-05 16:29:35 +00:00
|
|
|
addDiacritics,
|
2021-03-18 12:05:49 +00:00
|
|
|
translatePhonetics,
|
2021-07-14 00:44:27 +00:00
|
|
|
getEnglishPersonInfo,
|
|
|
|
getPersonFromVerbForm,
|
|
|
|
getPersonNumber,
|
2021-07-15 09:57:04 +00:00
|
|
|
isVerbBlock,
|
|
|
|
isImperativeBlock,
|
|
|
|
isInflectionSet,
|
2021-09-15 00:55:47 +00:00
|
|
|
isPluralInflectionSet,
|
|
|
|
isUnisexSet,
|
2021-07-15 09:57:04 +00:00
|
|
|
personFromVerbBlockPos,
|
2021-09-02 12:37:45 +00:00
|
|
|
removeAccents,
|
2021-09-03 11:27:02 +00:00
|
|
|
hasAccents,
|
2021-10-05 01:15:13 +00:00
|
|
|
getEnglishWord,
|
2021-10-05 03:27:26 +00:00
|
|
|
getVerbBlockPosFromPerson,
|
2021-10-06 00:52:54 +00:00
|
|
|
personIsPlural,
|
2021-10-06 01:13:47 +00:00
|
|
|
personGender,
|
2021-10-06 01:31:45 +00:00
|
|
|
addEnglish,
|
2021-10-07 17:17:04 +00:00
|
|
|
parseEc,
|
2021-10-16 01:58:56 +00:00
|
|
|
endsWith,
|
2021-10-18 00:58:50 +00:00
|
|
|
splitUpSyllables,
|
|
|
|
countSyllables,
|
2022-03-18 21:32:01 +00:00
|
|
|
hasBaParticle,
|
2022-03-20 12:45:47 +00:00
|
|
|
psRemove,
|
2022-04-08 10:04:16 +00:00
|
|
|
firstVariation,
|
|
|
|
capitalizeFirstLetter,
|
|
|
|
psStringFromEntry,
|
|
|
|
getLong,
|
|
|
|
useStickyState,
|
|
|
|
randomPerson,
|
|
|
|
isInvalidSubjObjCombo,
|
|
|
|
randomSubjObj,
|
2022-04-12 08:39:03 +00:00
|
|
|
shuffleArray,
|
2022-04-26 07:11:46 +00:00
|
|
|
personNumber,
|
2022-05-06 19:57:39 +00:00
|
|
|
makeNounSelection,
|
2022-05-06 20:33:00 +00:00
|
|
|
randFromArray,
|
|
|
|
renderEP,
|
|
|
|
renderVP,
|
|
|
|
compileEP,
|
|
|
|
compileVP,
|
2022-05-06 20:54:15 +00:00
|
|
|
chooseLength,
|
|
|
|
flattenLengths,
|
2022-05-07 05:52:56 +00:00
|
|
|
isFirstPerson,
|
|
|
|
isSecondPerson,
|
|
|
|
isThirdPerson,
|
2022-05-09 16:02:19 +00:00
|
|
|
psJSXMap,
|
2022-05-14 21:28:25 +00:00
|
|
|
renderNPSelection,
|
2022-05-14 21:55:52 +00:00
|
|
|
getEnglishFromRendered,
|
|
|
|
getPashtoFromRendered,
|
2022-05-26 20:05:38 +00:00
|
|
|
renderAPSelection,
|
2021-03-10 11:37:35 +00:00
|
|
|
// protobuf helpers
|
|
|
|
readDictionary,
|
|
|
|
writeDictionary,
|
|
|
|
readDictionaryInfo,
|
|
|
|
writeDictionaryInfo,
|
2021-03-09 12:39:13 +00:00
|
|
|
// COMPONENTS
|
2022-04-26 08:02:18 +00:00
|
|
|
EPExplorer,
|
2022-04-08 10:04:16 +00:00
|
|
|
VPExplorer,
|
|
|
|
ConjugationViewer, // TODO: Deprecated - remove
|
2021-03-09 12:39:13 +00:00
|
|
|
Examples,
|
|
|
|
VerbFormDisplay,
|
|
|
|
VerbTable,
|
|
|
|
VerbInfo,
|
|
|
|
RootsAndStems,
|
|
|
|
InflectionsTable,
|
|
|
|
Pashto,
|
|
|
|
Phonetics,
|
|
|
|
InlinePs,
|
|
|
|
ButtonSelect,
|
2022-04-08 10:04:16 +00:00
|
|
|
Hider,
|
|
|
|
EntrySelect,
|
2022-04-14 17:11:45 +00:00
|
|
|
NPPicker,
|
2022-05-26 20:13:59 +00:00
|
|
|
APPicker,
|
2022-06-04 23:19:24 +00:00
|
|
|
NPBlock,
|
|
|
|
APBlock,
|
|
|
|
Block,
|
2022-06-11 15:57:59 +00:00
|
|
|
EPDisplay,
|
2021-03-09 12:39:13 +00:00
|
|
|
// OTHER
|
2022-04-08 10:04:16 +00:00
|
|
|
typePredicates,
|
2021-03-09 12:39:13 +00:00
|
|
|
grammarUnits,
|
2021-03-10 16:51:40 +00:00
|
|
|
pashtoConsonants,
|
2021-03-09 12:39:13 +00:00
|
|
|
defaultTextOptions,
|
|
|
|
dictionaryEntryTextFields,
|
|
|
|
dictionaryEntryNumberFields,
|
|
|
|
dictionaryEntryBooleanFields,
|
2021-11-03 00:33:39 +00:00
|
|
|
genderColors,
|
2021-03-09 12:39:13 +00:00
|
|
|
// TYPES
|
|
|
|
Types,
|
|
|
|
}
|