From 742a1acf61d87f726fab9ff1e3123bf7dbb93ce7 Mon Sep 17 00:00:00 2001 From: adueck Date: Thu, 27 Jul 2023 21:39:06 +0400 Subject: [PATCH] combineIntoText exposed --- package-lock.json | 4 +- package.json | 2 +- src/components/package-lock.json | 4 +- src/components/package.json | 2 +- src/lib/library.ts | 428 ++++++++++++++----------------- src/lib/package.json | 2 +- 6 files changed, 202 insertions(+), 240 deletions(-) diff --git a/package-lock.json b/package-lock.json index f036ecd..f13f058 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pashto-inflector", - "version": "6.0.1", + "version": "6.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pashto-inflector", - "version": "6.0.1", + "version": "6.0.2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 9c43d4e..b8efe62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pashto-inflector", - "version": "6.0.1", + "version": "6.0.2", "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/components/package-lock.json b/src/components/package-lock.json index c8e4c0f..4989511 100644 --- a/src/components/package-lock.json +++ b/src/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lingdocs/ps-react", - "version": "6.0.1", + "version": "6.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lingdocs/ps-react", - "version": "6.0.1", + "version": "6.0.2", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^1.0.0-beta.3", diff --git a/src/components/package.json b/src/components/package.json index adc5791..03779f7 100644 --- a/src/components/package.json +++ b/src/components/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/ps-react", - "version": "6.0.1", + "version": "6.0.2", "description": "Pashto inflector library module with React components", "main": "dist/components/library.js", "module": "dist/components/library.js", diff --git a/src/lib/library.ts b/src/lib/library.ts index 11a78f8..9421c9b 100644 --- a/src/lib/library.ts +++ b/src/lib/library.ts @@ -6,162 +6,123 @@ * */ - import { - conjugateVerb, -} from "./src/verb-conjugation"; +import { conjugateVerb } from "./src/verb-conjugation"; +import { inflectWord } from "./src/pashto-inflector"; import { - inflectWord, -} from "./src/pashto-inflector"; -import { - getVerbInfo, - getPassiveRootsAndStems, - getAbilityRootsAndStems, + getVerbInfo, + getPassiveRootsAndStems, + getAbilityRootsAndStems, } from "./src/verb-info"; import { makeVPSelectionState } from "./src/phrase-building/verb-selection"; import { vpsReducer } from "./src/phrase-building/vps-reducer"; import { isPastTense } from "./src/phrase-building/vp-tools"; +import { getInflectionPattern } from "./src/inflection-pattern"; +import { makePsString, removeFVarients } from "./src/accent-and-ps-utils"; + import { - getInflectionPattern, -} from "./src/inflection-pattern"; -import { - makePsString, - removeFVarients, -} from "./src/accent-and-ps-utils"; -import { - addToForm, - concatPsString, - isVerbBlock, - isImperativeBlock, - isPluralInflectionSet, - isUnisexSet, - isInflectionSet, - addEnglish, - endsWith, - hasBaParticle, - psRemove, - firstVariation, - psStringFromEntry, - getLong, - capitalizeFirstLetter, - getLength, - psStringEquals, + addToForm, + concatPsString, + isVerbBlock, + isImperativeBlock, + isPluralInflectionSet, + isUnisexSet, + isInflectionSet, + addEnglish, + endsWith, + hasBaParticle, + psRemove, + firstVariation, + psStringFromEntry, + getLong, + capitalizeFirstLetter, + getLength, + psStringEquals, } from "./src/p-text-helpers"; +import { joiningTails } from "./src/misc-text"; +import { getEnglishWord } from "./src/get-english-word"; import { - joiningTails, -} from "./src/misc-text"; -import { - getEnglishWord, -} from "./src/get-english-word"; -import { - standardizePashto, - standardizePhonetics, + standardizePashto, + standardizePhonetics, } from "./src/standardize-pashto"; import { phoneticsToDiacritics } from "./src/phonetics-to-diacritics"; import { - randomPerson, - isInvalidSubjObjCombo, - randomSubjObj, - getEnglishVerb, + randomPerson, + isInvalidSubjObjCombo, + randomSubjObj, + getEnglishVerb, } from "./src/np-tools"; import { - getEnglishFromRendered, - getPashtoFromRendered, + getEnglishFromRendered, + getPashtoFromRendered, } from "./src/phrase-building/np-tools"; // TODO should be one np-tools file? +import { convertSpelling, revertSpelling } from "./src/convert-spelling"; import { - convertSpelling, - revertSpelling, -} from "./src/convert-spelling"; -import { - dictionaryEntryBooleanFields, - dictionaryEntryNumberFields, - dictionaryEntryTextFields, + dictionaryEntryBooleanFields, + dictionaryEntryNumberFields, + dictionaryEntryTextFields, } from "../types"; +import { validateEntry, standardizeEntry } from "./src/validate-entry"; import { - validateEntry, - standardizeEntry, -} from "./src/validate-entry"; -import { - readDictionary, - writeDictionary, - readDictionaryInfo, - writeDictionaryInfo, + readDictionary, + writeDictionary, + readDictionaryInfo, + writeDictionaryInfo, } from "./src/protobuf"; +import { pashtoConsonants } from "./src/pashto-consonants"; import { - pashtoConsonants, -} from "./src/pashto-consonants"; -import { - isNounAdjOrVerb, - getEnglishPersonInfo, - getPersonFromVerbForm, - getPersonNumber, - personFromVerbBlockPos, - getVerbBlockPosFromPerson, - personIsPlural, - personGender, - parseEc, - personNumber, - randFromArray, - chooseLength, - isFirstPerson, - isSecondPerson, - isThirdPerson, - blank, - kidsBlank, - ensureNonComboVerbInfo, - entryOfFull, + isNounAdjOrVerb, + getEnglishPersonInfo, + getPersonFromVerbForm, + getPersonNumber, + personFromVerbBlockPos, + getVerbBlockPosFromPerson, + personIsPlural, + personGender, + parseEc, + personNumber, + randFromArray, + chooseLength, + isFirstPerson, + isSecondPerson, + isThirdPerson, + blank, + kidsBlank, + ensureNonComboVerbInfo, + entryOfFull, } from "./src/misc-helpers"; +import { simplifyPhonetics } from "./src/simplify-phonetics"; +import { translatePhonetics } from "./src/translate-phonetics"; +import { addDiacritics } from "./src/diacritics"; import { - simplifyPhonetics, -} from "./src/simplify-phonetics"; -import { - translatePhonetics, -} from "./src/translate-phonetics"; -import { - addDiacritics, -} from "./src/diacritics"; -import { - removeAccents, - hasAccents, - splitUpSyllables, - countSyllables, + removeAccents, + hasAccents, + splitUpSyllables, + countSyllables, } from "./src/accent-helpers"; import { - makeNounSelection, - makeAdjectiveSelection, - makeAdverbSelection, - makeLocativeAdverbSelection, - makeParticipleSelection, + makeNounSelection, + makeAdjectiveSelection, + makeAdverbSelection, + makeLocativeAdverbSelection, + makeParticipleSelection, } from "./src/phrase-building/make-selections"; +import { renderEP } from "./src/phrase-building/render-ep"; +import { renderVP } from "./src/phrase-building/render-vp"; +import { renderNPSelection } from "./src/phrase-building/render-np"; import { - renderEP, -} from "./src/phrase-building/render-ep"; -import { - renderVP, -} from "./src/phrase-building/render-vp"; -import { - renderNPSelection, -} from "./src/phrase-building/render-np"; -import { - compileEP, - compileVP, - flattenLengths, + compileEP, + compileVP, + flattenLengths, + combineIntoText, } from "./src/phrase-building/compile"; +import { isPashtoScript } from "./src/is-pashto"; +import { renderAPSelection } from "./src/phrase-building/render-ap"; +import { renderSandwich } from "./src/phrase-building/render-sandwich"; import { - isPashtoScript, -} from "./src/is-pashto"; -import { - renderAPSelection, -} from "./src/phrase-building/render-ap"; -import { - renderSandwich, -} from "./src/phrase-building/render-sandwich"; -import { - humanReadableVerbForm, - humanReadableEquativeTense, + humanReadableVerbForm, + humanReadableEquativeTense, } from "./src/human-readable"; -import { - splitPsString, -} from "./src/splitPsString"; +import { splitPsString } from "./src/splitPsString"; import shuffleArray from "./src/shuffle-array"; import defaultTextOptions from "./src/default-text-options"; import * as grammarUnits from "./src/grammar-units"; @@ -170,108 +131,109 @@ import * as typePredicates from "./src/type-predicates"; import * as blockUtils from "./src/phrase-building/blocks-utils"; export { - // FUNCTIONS - conjugateVerb, - getVerbInfo, - getPassiveRootsAndStems, - getAbilityRootsAndStems, - inflectWord, - addToForm, - concatPsString, - makePsString, - removeFVarients, - standardizePashto, - standardizePhonetics, - convertSpelling, - revertSpelling, - validateEntry, - standardizeEntry, - isNounAdjOrVerb, - simplifyPhonetics, - phoneticsToDiacritics, - addDiacritics, - translatePhonetics, - getEnglishPersonInfo, - getPersonFromVerbForm, - getPersonNumber, - isVerbBlock, - isImperativeBlock, - isInflectionSet, - isPluralInflectionSet, - isUnisexSet, - personFromVerbBlockPos, - removeAccents, - hasAccents, - getEnglishWord, - getVerbBlockPosFromPerson, - personIsPlural, - personGender, - splitPsString, - addEnglish, - parseEc, - endsWith, - splitUpSyllables, - countSyllables, - hasBaParticle, - psRemove, - firstVariation, - capitalizeFirstLetter, - psStringFromEntry, - getLong, - randomPerson, - isInvalidSubjObjCombo, - randomSubjObj, - shuffleArray, - personNumber, - makeNounSelection, - makeAdjectiveSelection, - makeAdverbSelection, - makeLocativeAdverbSelection, - makeParticipleSelection, - randFromArray, - renderSandwich, - renderEP, - renderVP, - compileEP, - compileVP, - chooseLength, - flattenLengths, - isFirstPerson, - isSecondPerson, - isThirdPerson, - isPastTense, - renderNPSelection, - getEnglishFromRendered, - getPashtoFromRendered, - renderAPSelection, - getEnglishVerb, - humanReadableVerbForm, - humanReadableEquativeTense, - ensureNonComboVerbInfo, - vpsReducer, - makeVPSelectionState, - getLength, - psStringEquals, - joiningTails, - blockUtils, - blank, - kidsBlank, - isPashtoScript, - getInflectionPattern, - entryOfFull, - // protobuf helpers - readDictionary, - writeDictionary, - readDictionaryInfo, - writeDictionaryInfo, - // OTHER - typePredicates, - grammarUnits, - pashtoConsonants, - defaultTextOptions, - dictionaryEntryTextFields, - dictionaryEntryNumberFields, - dictionaryEntryBooleanFields, - // TYPES - Types, -} + // FUNCTIONS + conjugateVerb, + getVerbInfo, + getPassiveRootsAndStems, + getAbilityRootsAndStems, + inflectWord, + addToForm, + concatPsString, + makePsString, + removeFVarients, + standardizePashto, + standardizePhonetics, + convertSpelling, + revertSpelling, + validateEntry, + standardizeEntry, + isNounAdjOrVerb, + simplifyPhonetics, + phoneticsToDiacritics, + addDiacritics, + translatePhonetics, + getEnglishPersonInfo, + getPersonFromVerbForm, + getPersonNumber, + isVerbBlock, + isImperativeBlock, + isInflectionSet, + isPluralInflectionSet, + isUnisexSet, + personFromVerbBlockPos, + removeAccents, + hasAccents, + getEnglishWord, + getVerbBlockPosFromPerson, + personIsPlural, + personGender, + splitPsString, + addEnglish, + parseEc, + endsWith, + splitUpSyllables, + countSyllables, + hasBaParticle, + psRemove, + firstVariation, + capitalizeFirstLetter, + psStringFromEntry, + getLong, + randomPerson, + isInvalidSubjObjCombo, + randomSubjObj, + shuffleArray, + personNumber, + makeNounSelection, + makeAdjectiveSelection, + makeAdverbSelection, + makeLocativeAdverbSelection, + makeParticipleSelection, + randFromArray, + renderSandwich, + renderEP, + renderVP, + compileEP, + compileVP, + chooseLength, + flattenLengths, + isFirstPerson, + isSecondPerson, + isThirdPerson, + isPastTense, + renderNPSelection, + getEnglishFromRendered, + getPashtoFromRendered, + renderAPSelection, + getEnglishVerb, + humanReadableVerbForm, + humanReadableEquativeTense, + ensureNonComboVerbInfo, + vpsReducer, + makeVPSelectionState, + getLength, + psStringEquals, + combineIntoText, + joiningTails, + blockUtils, + blank, + kidsBlank, + isPashtoScript, + getInflectionPattern, + entryOfFull, + // protobuf helpers + readDictionary, + writeDictionary, + readDictionaryInfo, + writeDictionaryInfo, + // OTHER + typePredicates, + grammarUnits, + pashtoConsonants, + defaultTextOptions, + dictionaryEntryTextFields, + dictionaryEntryNumberFields, + dictionaryEntryBooleanFields, + // TYPES + Types, +}; diff --git a/src/lib/package.json b/src/lib/package.json index 01761ae..1fc9680 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/inflect", - "version": "6.0.1", + "version": "6.0.2", "description": "Pashto inflector library", "main": "dist/index.js", "types": "dist/lib/library.d.ts",