From 8e2beb0f3e2dd786fc1676f16c08e4e562a1ff9b Mon Sep 17 00:00:00 2001 From: adueck Date: Tue, 11 Jul 2023 15:31:29 +0400 Subject: [PATCH] more --- src/content/verbs/SwitchPlayground.tsx | 85 ---------- src/content/verbs/VerbFormsTruthTable.tsx | 197 ++++++++++++++++++++++ src/content/verbs/master-chart.mdx | 195 ++++++++++----------- 3 files changed, 284 insertions(+), 193 deletions(-) delete mode 100644 src/content/verbs/SwitchPlayground.tsx create mode 100644 src/content/verbs/VerbFormsTruthTable.tsx diff --git a/src/content/verbs/SwitchPlayground.tsx b/src/content/verbs/SwitchPlayground.tsx deleted file mode 100644 index 0fdff80..0000000 --- a/src/content/verbs/SwitchPlayground.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { useState } from "react"; -import { tenseData } from "./tense-data"; -import Media from "react-media"; - -function SwitchPlayground() { - const [state, setState] = useState<[boolean, boolean, boolean]>([false, false, false]); - const makeToggle = (i: 0|1|2) => () => setState(os => { - const ns = [...os] as [boolean, boolean, boolean]; - ns[i] = !ns[i]; - return ns; - }); - const [form] = tenseData.find(([t, ...switches]) => { - return JSON.stringify(state) === JSON.stringify(switches); - }) as ["string"]; - return
-
-
- -
-
- -
-
- -
-
-
{form}
-
; -} - -function Switch({ state, toggle, label }: { label: [string, string], state: boolean, toggle: () => void }) { - const borderRadius = "8px"; - const border = "solid 2px black"; - return
-
{label[0]}
- - {matches => ( -
-
-
-
-
- )} - -
{label[1]}
-
-} - -export default SwitchPlayground; \ No newline at end of file diff --git a/src/content/verbs/VerbFormsTruthTable.tsx b/src/content/verbs/VerbFormsTruthTable.tsx new file mode 100644 index 0000000..4f0b6fa --- /dev/null +++ b/src/content/verbs/VerbFormsTruthTable.tsx @@ -0,0 +1,197 @@ +import { useState } from "react"; +import { tenseData } from "./tense-data"; +import Media from "react-media"; +import { Camera, Video } from "../../components/terms-links"; +import classNames from "classnames"; + +type State = [boolean, boolean, boolean]; + +function VerbFormsTruthTable() { + const [state, setState] = useState([false, false, false]); + const [hitSwitch, setHitSwitch] = useState(false); + const [form] = tenseData.find(([t, ...switches]) => { + return JSON.stringify(state) === JSON.stringify(switches); + }) as ["string"]; + return ( +
+
+ + + + + + + + + + + {tenseData.map((t) => ( + + + + + + + ))} + +
formHas 'ba'Imperfective / PerfectiveStem / Root
{t[0]}{t[1] ? "yes" : "no"} + {t[2] ? ( +
+
+ ) : ( +
+ + {` `}perfective +
+ )} +
{t[3] ? "root" : "stem"}
+
+

Hit the switches to try the combinations yourself!

+ { + if (!hitSwitch) setHitSwitch(true); + }} + state={state} + setState={setState} + /> +
+
{form}
+ +
+
+ ); +} + +function StateInFormula({ + state: [hasBa, perfective, root], +}: { + state: State; +}) { + return ( + + {`${hasBa ? "ba + " : ""}${perfective ? "" : "im"}perfective ${ + root ? "root" : "stem" + } + ${root ? "past" : "present"} ending`} + + ); +} + +function SwitchBar({ + state, + setState, + onHitSwitch, +}: { + state: State; + setState: React.Dispatch>; + onHitSwitch: () => void; +}) { + const makeToggle = (i: 0 | 1 | 2) => () => { + onHitSwitch(); + setState((os) => { + const ns = [...os] as [boolean, boolean, boolean]; + ns[i] = !ns[i]; + return ns; + }); + }; + return ( +
+
+
+ +
+
+ +
+
+ +
+
+
+ ); +} + +function Switch({ + state, + toggle, + label, +}: { + label: [string, string]; + state: boolean; + toggle: () => void; +}) { + const borderRadius = "8px"; + const border = "solid 2px black"; + return ( +
+
{label[0]}
+ + {(matches) => ( +
+
+
+
+
+ )} + +
{label[1]}
+
+ ); +} + +export default VerbFormsTruthTable; diff --git a/src/content/verbs/master-chart.mdx b/src/content/verbs/master-chart.mdx index 0e794fe..3c7201a 100644 --- a/src/content/verbs/master-chart.mdx +++ b/src/content/verbs/master-chart.mdx @@ -2,82 +2,82 @@ title: Verb Forms Master Chart --- -import { - defaultTextOptions as opts, - InlinePs, -} from "@lingdocs/ps-react"; +import { defaultTextOptions as opts, InlinePs } from "@lingdocs/ps-react"; import { Camera, Video } from "../../components/terms-links"; import Link from "../../components/Link"; import Image from "../../components/Image"; import switches from "./switches.jpg"; -import { tenseData } from "./tense-data"; -import SwitchPlayground from "./SwitchPlayground"; +import VerbFormsTruthTable from "./VerbFormsTruthTable"; ## Basic Verb Forms - - + + - - + + - - + + - - + + - - + +
Perfective + + Perfective +
-
Present
-
- imperfective stem + present ending -
-
-
Subjunctive
-
- perfective stem + present ending -
-
+
Present
+
+ imperfective stem + present ending +
+
+
Subjunctive
+
+ perfective stem + present ending +
+
-
Imperfective Future
-
- ba + Present -
-
-
Perfective Future
-
- ba + Subjunctive -
-
+
Imperfective Future
+
+ ba + Present +
+
+
Perfective Future
+
+ ba + Subjunctive +
+
-
Continuous Past
-
- imperfective root + past ending -
-
-
Simple Past
-
- perfective root + past ending -
-
+
Continuous Past
+
+ imperfective root + past ending +
+
+
Simple Past
+
+ perfective root + past ending +
+
-
Habitual Continuous Past
-
- ba + Continuous Past -
-
-
Habitual Simple Past
-
- ba + Simple Past -
-
+
Habitual Continuous Past
+
+ ba + Continuous Past +
+
+
Habitual Simple Past
+
+ ba + Simple Past +
+
@@ -95,74 +95,53 @@ There's another way to look at the possible verb forms. Whenever we make a verb We can use **any possible** combination of these 3 choices, giving us:

- 2 x 2 x 2 = 8 verb forms + 2 x 2 x 2 = 8 verb forms

Here's a chart of every possible combination of these choices, giving us all the basic verb forms: -
- - - - - - - - - - - {tenseData.map((t) => ( - - - - - - - ))} - -
formHas 'ba'Imperfective / PerfectiveStem / Root
{t[0]}{t[1] ? "yes" : "no"}{t[2] ?
:
{` `}perfective
}
{t[3] ? "root" : "stem"}
-
- -Hit the switches to try the combinations yourself! - - + ## Imperative Forms -Imperative forms are slightly different... +Imperative forms are different and use the imperative endings - - - + + + - - - + + + - - + +
Perfective + + Perfective +
Pos. -
Imperfective Imperative
-
- imperfective stem + imperative ending -
-
-
Perfective Imperative
-
- perfective stem + imperative ending -
-
Pos. +
Imperfective Imperative
+
+ imperfective stem + imperative ending +
+
+
Perfective Imperative
+
+ perfective stem + imperative ending +
+
Neg. -
Negative Imperative
-
- مه - mú + imperfective stem + imperative ending -
-
Neg. +
Negative Imperative
+
+ مه - mú + imperfective stem + imperative ending +
+
@@ -172,7 +151,7 @@ Imperative forms are slightly different... Perfect verb forms are built with:
- past participle + equative + past participle + equative
Any of the 8 equatives may be used to form 8 different perfect froms. Equative may be left out with the present perfect form.