/** * Copyright (c) 2021 lingdocs.com * * This source code is licensed under the GPL3 license found in the * LICENSE file in the root directory of this source tree. * */ import { useEffect, useState } from "react"; import ButtonSelect from "./components/src/ButtonSelect"; import { Modal } from "react-bootstrap"; import * as T from "./types"; import defualtTextOptions from "./lib/src/default-text-options"; import useStickyState from "./components/src/useStickyState"; import EPExplorer from "./components/src/ep-explorer/EPExplorer"; import VPBuilderDemo from "./demo-components/VPBuilderDemo"; import { entryFeeder } from "./demo-components/entryFeeder"; import { Hider } from "./components/library"; import InflectionDemo from "./demo-components/InflectionDemo"; import SpellingDemo from "./demo-components/SpellingDemo"; import ParserDemo from "./demo-components/ParserDemo"; function App() { const [showingTextOptions, setShowingTextOptions] = useStickyState( false, "showTextOpts1" ); const [textOptions, setTextOptions] = useStickyState( defualtTextOptions, "textOpts1" ); const [theme, setTheme] = useStickyState<"light" | "dark">("light", "theme1"); const [showing, setShowing] = useState(""); function handleHiderClick(label: string) { setShowing((os) => (os === label ? "" : label)); } useEffect(() => { document.documentElement.setAttribute("data-theme", theme); }, [theme]); return ( <>
setTheme(theme === "light" ? "dark" : "light")} >
setShowingTextOptions(true)} >

Pashto Inflector

An open source TypeScript/React library for Pashto inflection, verb conjugation, phrase generation, text conversion, and more

Used in the{" "} LingDocs Pashto Dictionary {" "} and{" "} LingDocs Pashto Grammar

by Adam Dueck - GPLv3 licensed{" "} Source Code {" "} on GitHub

Demos:

handleHiderClick("verbs")} > handleHiderClick("equatives")} >
handleHiderClick("inflection")} > handleHiderClick("spelling")} > handleHiderClick("parser")} >
setShowingTextOptions(false)} > Settings
Pashto Spelling
{ setTextOptions({ ...textOptions, spelling: p, }); }} />
Diacritics
setTextOptions({ ...textOptions, diacritics: p === "true" }) } />
Pashto Text Size
setTextOptions({ ...textOptions, pTextSize: p }) } />
Phonetics
setTextOptions({ ...textOptions, phonetics: p }) } />
{/* */} ); } export default App;