This commit is contained in:
parent
27f5019bbd
commit
216408f035
|
@ -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",
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue