+import { projectSignature } from '~~/shared/row.ts'
import { REGIONS, type CharRow } from '~~/shared/types.ts'
const props = defineProps<{ row: CharRow }>()
const { t, list } = useT()
-const { regionLabel, labelClass, outlineOn } = usePrefs()
+const { regionLabel, labelClass, outlineOn, visibleRegions, regionIndices } =
+ usePrefs()
const split = ref(false)
-/** One persistent node per region. CSS moves these same four nodes between the
+/**
+ * Groups over the regions on show, so the opening claim counts what the reader
+ * is actually being shown rather than the four this row happens to carry.
+ */
+const groups = computed(() =>
+ projectSignature(props.row.glyph, regionIndices.value),
+)
+
+/** One persistent node per region. CSS moves these same nodes between the
* overprint and the separated row, so toggling never needs a DOM swap. */
const forms = computed(() =>
- REGIONS.map((region, index) => ({
+ visibleRegions.value.map((region, position) => ({
region,
- char: props.row.chars[index]!,
- group: Number(props.row.glyph[index]),
+ char: props.row.chars[REGIONS.indexOf(region)]!,
+ group: Number(groups.value[position]),
/** Shared forms only draw once while stacked, then duplicate when split. */
- lead: props.row.glyph.indexOf(props.row.glyph[index]!) === index,
+ lead: groups.value.indexOf(groups.value[position]!) === position,
})),
)
@@ -33,6 +43,14 @@ const label = computed(() =>
),
)
+/** The places on show, named in full: what the standfirst enumerates. */
+const places = computed(() =>
+ list(
+ visibleRegions.value.map((region) => t(`region.${region}.full`)),
+ 'narrow',
+ ),
+)
+
function toggle() {
split.value = !split.value
}
@@ -42,6 +60,7 @@ function toggle() {
@@ -51,6 +70,7 @@ function toggle() {
class="hero-form"
:class="{ duplicate: !form.lead }"
:style="{
+ '--i': index,
'--layer-color': colorOf(form.group),
'--arrival-delay': `${index * 90}ms`,
}"
@@ -67,12 +87,16 @@ function toggle() {
-
{{ t('hero.title') }}
+
+ {{ t('hero.title', { n: hanNumber(groupCount) }) }}
+
- {{ t('hero.body') }}
+ {{ t('hero.body', { regions: places }) }}
+
import { localeName, type Locale } from '~/locales/index.ts'
const { t } = useT()
-const { emojiFlags, outline } = usePrefs()
+const {
+ emojiFlags,
+ outline,
+ regionLabel,
+ labelClass,
+ COLUMNS,
+ columnShown,
+ columnLocked,
+ toggleColumn,
+} = usePrefs()
const { locale, choose, locales } = useLocaleChoice()
const languages = locales.map((code) => ({ code, label: localeName(code) }))
@@ -77,6 +86,49 @@ onKeyStroke('Escape', () => (open.value = false))
}}
+
+
+
+
{{
+ t('options.columns')
+ }}
+
{{
+ t('options.columnsHint')
+ }}
+
+
+ {{
+ regionLabel(column === 'old' ? 'jp' : column)
+ }}
+ {{ t('region.old.short') }}
+
+
+
diff --git a/app/components/OverprintChar.vue b/app/components/OverprintChar.vue
index c7bcf6f..cbe5a38 100644
--- a/app/components/OverprintChar.vue
+++ b/app/components/OverprintChar.vue
@@ -1,6 +1,16 @@