Rich text / foldkit-mixins-richtext

The status line

How long the document is, and what the application found wrong with it. It sends nothing.

ts
import * as RichText from 'foldkit-richtext'
import { editorStatus } from 'foldkit-mixins-richtext'

editorStatus<Message>()(
  { document: model.document, diagnostics: RichText.validate(model.document, ArticleKit) },
  h,
)

The counts are RichText.count: words and characters as Intl.Segmenter splits them, kept per document value so a caret move does not count again. The problems are whatever diagnostics holds, one item each; the view does not validate, because which Kit a document answers to is the application's. Leave diagnostics out and none is shown.

SlotCapabilityRenders
rootContainerthe status line's wrapper
countsBase2 words · 11 characters, data-status="counts"
problemsCollectionthe list, data-status="problems"
problemBaseone diagnostic, data-code, and data-node when it has one