This commit is contained in:
lingdocs 2022-07-05 16:44:14 -05:00
parent 27f5019bbd
commit 216408f035
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "3.2.5", "version": "3.2.6",
"author": "lingdocs.com", "author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com", "homepage": "https://verbs.lingdocs.com",

View File

@ -9,16 +9,18 @@ import EPBlocksDisplay from "../RenderedBlocksDisplay";
import ModeSelect, { Mode, ScriptSelect } from "../DisplayModeSelect"; import ModeSelect, { Mode, ScriptSelect } from "../DisplayModeSelect";
import { useStickyState } from "../../library"; import { useStickyState } from "../../library";
function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne, length }: { function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne, length, mode: preferredMode, script: preferredScript }: {
eps: T.EPSelectionState, eps: T.EPSelectionState,
opts: T.TextOptions, opts: T.TextOptions,
setOmitSubject: ((value: "true" | "false") => void) | false setOmitSubject: ((value: "true" | "false") => void) | false
justify?: "left" | "right" | "center", justify?: "left" | "right" | "center",
onlyOne?: boolean | "concat", onlyOne?: boolean | "concat",
length?: "long" | "short", length?: "long" | "short",
mode?: Mode,
script?: "p" | "f",
}) { }) {
const [mode, setMode] = useState<Mode>("text"); const [mode, setMode] = useState<Mode>(preferredMode || "text");
const [script, setScript] = useStickyState<"p" | "f">("f", "blockScriptChoice"); const [script, setScript] = useStickyState<"p" | "f">(preferredScript || "f", "blockScriptChoice");
const EP = completeEPSelection(eps); const EP = completeEPSelection(eps);
const subject = getSubjectSelection(eps.blocks); const subject = getSubjectSelection(eps.blocks);