DictDisplays
Presentational components for dictionary data (JMdict / JMnedict / KANJIDIC entries, examples), shared by the WordDialog lookup and the Dictionary page. Example sentences are tokenized into clickable furigana.
Functions¶
ComprehensiveEntryCard()¶
Defined in: src/shared/components/DictDisplays.tsx:196
A comprehensive, tabbed card showing JMdict / JMnedict / Kanji / Examples for a looked-up word.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ examples: string[]; jmdictEntries: JMEntry[]; jmnedictEntries: JMNEntry[]; kanjiInfo: KanjiInfo[]; onWordSelect?: (word) => void; word: string; } |
The lookup result split into its lists + the word. |
props.examples |
string[] |
- |
props.jmdictEntries |
JMEntry[] |
- |
props.jmnedictEntries |
JMNEntry[] |
- |
props.kanjiInfo |
KanjiInfo[] |
- |
props.onWordSelect? |
(word) => void |
- |
props.word |
string |
- |
Returns¶
Element
The rendered card.
JmdictEntryDisplay()¶
Defined in: src/shared/components/DictDisplays.tsx:23
Displays a standard JMdict entry: the written/read forms + numbered senses, each tagged with its part of speech.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ entry: JMEntry; isLast: boolean; } |
The entry + last-row flag. |
props.entry |
JMEntry |
- |
props.isLast |
boolean |
- |
Returns¶
Element
The rendered entry.
JMEntryRow()¶
Defined in: src/shared/components/DictDisplays.tsx:364
A clickable JMdict result row.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ entry: JMEntry; onSelect: (word) => void; } |
The entry + callback. |
props.entry |
JMEntry |
- |
props.onSelect |
(word) => void |
- |
Returns¶
Element
The row.
JmnedictEntryDisplay()¶
Defined in: src/shared/components/DictDisplays.tsx:58
Displays a JMnedict (proper noun) entry.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ entry: JMNEntry; isLast: boolean; } |
The entry + last-row flag. |
props.entry |
JMNEntry |
- |
props.isLast |
boolean |
- |
Returns¶
Element
The rendered entry.
KanjiInfoDisplay()¶
Defined in: src/shared/components/DictDisplays.tsx:87
Displays detailed info for a single Kanji: the glyph alongside its stats (strokes / grade / JLPT), meanings, and on/kun readings.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ isLast: boolean; kanjiInfo: KanjiInfo; } |
The kanji + last-row flag. |
props.isLast |
boolean |
- |
props.kanjiInfo |
KanjiInfo |
- |
Returns¶
Element
The rendered kanji info.
KanjiRow()¶
Defined in: src/shared/components/DictDisplays.tsx:412
A clickable Kanji result row.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ kanji: KanjiInfo; onSelect: (word) => void; } |
The kanji + callback. |
props.kanji |
KanjiInfo |
- |
props.onSelect |
(word) => void |
- |
Returns¶
Element
The row.
TokenizedExamples()¶
Defined in: src/shared/components/DictDisplays.tsx:141
Renders example sentences as clickable, furigana-annotated tokens (batch-tokenized on the server). Falls back to plain text while loading.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ examples: string[]; onWordClick: (sentence, word) => void; } |
The examples + a per-word click handler. |
props.examples |
string[] |
- |
props.onWordClick |
(sentence, word) => void |
- |
Returns¶
Element
The rendered examples.
WildcardResults()¶
Defined in: src/shared/components/DictDisplays.tsx:297
Tabbed results for a wildcard search, with clickable rows.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
props |
{ onWordSelect: (word) => void; results: KotobaseData; } |
The wildcard results + a selection callback. |
props.onWordSelect |
(word) => void |
- |
props.results |
KotobaseData |
- |
Returns¶
Element
The rendered results.