diff --git a/package.json b/package.json index 759376c..b0c8b57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.0.6", + "version": "3.0.7", "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/ep-explorer/EPDisplay.tsx b/src/components/ep-explorer/EPDisplay.tsx index 3b06c66..5b180ac 100644 --- a/src/components/ep-explorer/EPDisplay.tsx +++ b/src/components/ep-explorer/EPDisplay.tsx @@ -14,7 +14,7 @@ function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne }: { opts: T.TextOptions, setOmitSubject: ((value: "true" | "false") => void) | false justify?: "left" | "right" | "center", - onlyOne?: boolean, + onlyOne?: boolean | "concat", }) { const [mode, setMode] = useState("text"); const [script, setScript] = useStickyState<"p" | "f">("f", "blockScriptChoice"); @@ -54,10 +54,14 @@ function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne }: {
{mode === "text" - ? + ? : } {result.e &&
- {(onlyOne ? [result.e[0]] : result.e).map((e, i) =>
{e}
)} + {onlyOne === "concat" + ? result.e.join(" • ") + : onlyOne + ? [result.e[0]] + : result.e.map((e, i) =>
{e}
)}
} {EP.predicate.selection.selection.type === "participle" &&

⚠️ NOTE: This means that the subject {renderedSubject.selection.e ? `(${renderedSubject.selection.e})` : ""} is the action/idea of diff --git a/src/components/vp-explorer/VPDisplay.tsx b/src/components/vp-explorer/VPDisplay.tsx index 5a34e77..966a9a7 100644 --- a/src/components/vp-explorer/VPDisplay.tsx +++ b/src/components/vp-explorer/VPDisplay.tsx @@ -13,9 +13,9 @@ import useStickyState from "../../lib/useStickyState"; function VPDisplay({ VPS, opts, setForm, justify, onlyOne }: { VPS: T.VPSelectionState, opts: T.TextOptions, - setForm: (form: T.FormVersion) => void, + setForm: "disable" | ((form: T.FormVersion) => void), justify?: "left" | "right" | "center", - onlyOne?: boolean, + onlyOne?: boolean | "concat", }) { const [mode, setMode] = useState("text"); const [script, setScript] = useStickyState<"p" | "f">("f", "blockScriptChoice"); @@ -35,20 +35,24 @@ function VPDisplay({ VPS, opts, setForm, justify, onlyOne }: { const rendered = renderVP(VP); const result = compileVP(rendered, rendered.form); return

- + />}
{mode === "blocks" && }
{mode === "text" - ? + ? : } - {result.e &&
- {result.e.map((e, i) =>
{e}
)} + {result.e &&
+ {onlyOne === "concat" + ? result.e.join(" • ") + : onlyOne + ? [result.e[0]] + : result.e.map((e, i) =>
{e}
)}
}
}