API / @aionbuilders/nabu

RegionMessages

Type Stability: stable

Related guide: Regions →

Definition

TypeScript
import type { RegionMessages } from '@aionbuilders/nabu';
TypeScript
interface RegionMessages {
  backTo?: string | ((p: RegionNameParams) => string);
  chooser?: string | ((p: { count: number }) => string);
  chooserFooter?: string | (() => string);
  closeChooser?: string | ((p: { count: number }) => string);
  closeCommand?: string | (() => string);
  closeFooter?: string | (() => string);
  closeOption?: string | ((p: RegionNameParams & { typeName: string }) => string);
  create?: string | (() => string);
  createNext?: string | ((p: RegionTypeParams) => string);
  createOption?: string | ((p: RegionTypeParams) => string);
  demote?: string | (() => string);
  dissolve?: string | ((p: RegionMessageParams) => string);
  endOf?: string | ((p: RegionNameParams) => string);
  exit?: string | (() => string);
  groupHere?: string | (() => string);
  groupNext?: string | (() => string);
  hold?: string | ((p: { keys: string; label: string }) => string);
  insert?: string | ((p: { type: string }) => string);
  mergeNext?: string | ((p: RegionMessageParams) => string);
  mergeNextGeneric?: string | (() => string);
  mergePrevious?: string | ((p: RegionMessageParams) => string);
  mergePreviousGeneric?: string | (() => string);
  move?: string | (() => string);
  moveDown?: string | (() => string);
  moveUp?: string | (() => string);
  next?: string | (() => string);
  outside?: string | (() => string);
  parent?: string | (() => string);
  prev?: string | (() => string);
  promote?: string | (() => string);
  slash?: string | ((p: RegionTypeParams) => string);
  split?: string | (() => string);
  untitled?: string | (() => string);
  unwrap?: string | (() => string);
}

Properties

Properties of RegionMessages
PropertyTypeDescription
backTooptionalstring | ((p: RegionNameParams) => string)

second half of the end marker when the parent is a region ("back to 1. The ferryman"); p describes the PARENT region (p.name is its label)

chooseroptionalstring | ((p: { count: number }) => string)

prompt of the ::: chooser (announced to screen readers; count entries)

chooserFooteroptionalstring | (() => string)

hint under the chooser ("↑↓ choose · ↵ create · Esc cancel")

closeChooseroptionalstring | ((p: { count: number }) => string)

prompt of the ::: + Enter chooser (announced to screen readers)

closeCommandoptionalstring | (() => string)

label of region:close

closeFooteroptionalstring | (() => string)

hint under the ::: + Enter chooser ("↑↓ choose · ↵ close · Esc cancel")

closeOptionoptionalstring | ((p: RegionNameParams & { typeName: string }) => string)

entry of the ::: + Enter chooser ("Close Scene 2.2 — The ferryman"). p.typeName is the readable name of the type, p.prefix its numbering prefix, p.title its plain-text title (all may be empty but the type name)

createoptionalstring | (() => string)

label of region:create

createNextoptionalstring | ((p: RegionTypeParams) => string)

entry for a type created as a SIBLING after the current region ("Next section")

createOptionoptionalstring | ((p: RegionTypeParams) => string)

entry of the chooser for a type that fits here ("Section")

demoteoptionalstring | (() => string)n/a
dissolveoptionalstring | ((p: RegionMessageParams) => string)

label of a protected merge that has no region to join: the region p is dissolved in place (its body stays where it is, its title goes away)

endOfoptionalstring | ((p: RegionNameParams) => string)

first half of the end marker, drawn after a region that is followed by text of its parent ("End of 1.2"). p.name is the prefix, else the title, else the type name.

exitoptionalstring | (() => string)

label of region:exit

groupHereoptionalstring | (() => string)

header of the chooser group of the types created INSIDE the current region (or at the root) ("Here")

groupNextoptionalstring | (() => string)

header of the chooser group of the sibling entries ("Next")

holdoptionalstring | ((p: { keys: string; label: string }) => string)

the prompt of a protected merge ("Hold ⌫ to merge with “…”"): shown above the seam and announced to screen readers

insertoptionalstring | ((p: { type: string }) => string)

label of region:insert

mergeNextoptionalstring | ((p: RegionMessageParams) => string)

label of region:merge-next when the next region (p, the one that disappears) joins the previous region

mergeNextGenericoptionalstring | (() => string)

label of region:merge-next when no region is known (commands.list() without a caret)

mergePreviousoptionalstring | ((p: RegionMessageParams) => string)

label of region:merge-previous, "the previous region" being p

mergePreviousGenericoptionalstring | (() => string)

label of region:merge-previous when no region is known (commands.list() without a caret): "Merge with the previous region"

moveoptionalstring | (() => string)n/a
moveDownoptionalstring | (() => string)n/a
moveUpoptionalstring | (() => string)n/a
nextoptionalstring | (() => string)n/a
outsideoptionalstring | (() => string)

second half of the end marker when the parent is the root ("outside regions")

parentoptionalstring | (() => string)n/a
prevoptionalstring | (() => string)n/a
promoteoptionalstring | (() => string)n/a
slashoptionalstring | ((p: RegionTypeParams) => string)

title of the slash-menu entry of a type ("Section")

splitoptionalstring | (() => string)

label of region:split

untitledoptionalstring | (() => string)

placeholder of an empty title (ADR 018)

unwrapoptionalstring | (() => string)

label of region:unwrap

Source: src/lib/blocks/region/messages.js:30