Mixins / foldkit-mixins-ui

TourView

interface · packages/mixins-ui/src/tour.ts:243

interface TourView<ParentMessage> {
  readonly model: Model
  readonly config?: Config | undefined
  readonly onMessage: (message: Message) => NoInfer<ParentMessage>
  readonly content?: ((step: Step, index: number) => Html) | undefined
  readonly advanceOnClick?: AdvanceOnClick | undefined
  readonly padding?: number | undefined
  readonly interactive?: boolean | undefined
  readonly dismissOnOutside?: boolean | undefined
  readonly closeOnEscape?: boolean | undefined
  readonly words?: Partial<TourWords> | undefined
  readonly direction?: 'ltr' | 'rtl' | undefined
  readonly routes?: ReadonlyArray<Route<NoInfer<ParentMessage>>> | undefined
  readonly style?: NamedStyle<typeof TourSlots> | undefined
  readonly mixins?: MixinList<ParentMessage> | undefined
}

Members

TourView.model

property · packages/mixins-ui/src/tour.ts:244

readonly model: Model

TourView.config

property · packages/mixins-ui/src/tour.ts:246

readonly config?: Config | undefined

Steps in place of the Model's, for this drawing; the same as update's.

TourView.onMessage

property · packages/mixins-ui/src/tour.ts:247

readonly onMessage: (message: Message) => NoInfer<ParentMessage>

TourView.content

property · packages/mixins-ui/src/tour.ts:254

readonly content?: ((step: Step, index: number) => Html) | undefined

What a step says, drawn in place of its description text: rich content such as a list, an image or a shortcut. It still describes the step's dialog. The steps stay data in the Model, so content that is Html comes from here.

TourView.advanceOnClick

property · packages/mixins-ui/src/tour.ts:256

readonly advanceOnClick?: AdvanceOnClick | undefined

Tour.advanceOnClick: a press on the step's target moves the tour on.

TourView.padding

property · packages/mixins-ui/src/tour.ts:258

readonly padding?: number | undefined

Pixels the cutout reaches past its target; default 8.

TourView.interactive

property · packages/mixins-ui/src/tour.ts:260

readonly interactive?: boolean | undefined

Whether the target can be used through the cutout; default true.

TourView.dismissOnOutside

property · packages/mixins-ui/src/tour.ts:262

readonly dismissOnOutside?: boolean | undefined

Whether a press on the dim skips the tour; default false, so a stray press keeps it.

TourView.closeOnEscape

property · packages/mixins-ui/src/tour.ts:264

readonly closeOnEscape?: boolean | undefined

Whether Escape skips the tour; default true.

TourView.words

property · packages/mixins-ui/src/tour.ts:266

readonly words?: Partial<TourWords> | undefined

The buttons' words and the step's place; defaults Tour.words.

TourView.direction

property · packages/mixins-ui/src/tour.ts:268

readonly direction?: 'ltr' | 'rtl' | undefined

Default 'ltr'; under 'rtl' ArrowLeft goes on to the next step.

TourView.routes

property · packages/mixins-ui/src/tour.ts:276

readonly routes?: ReadonlyArray<Route<NoInfer<ParentMessage>>> | undefined

Keys the application answers on a step, such as a digit jumping to that step. They share one keydown owner with the step's own: the arrows (ArrowLeft goes to the previous step, swapped right to left) and, unless closeOnEscape is false, Escape; a route on the same gesture is a diagnostic naming both.

TourView.style

property · packages/mixins-ui/src/tour.ts:278

readonly style?: NamedStyle<typeof TourSlots> | undefined

A style of TourSlots, for the look.

TourView.mixins

property · packages/mixins-ui/src/tour.ts:280

readonly mixins?: MixinList<ParentMessage> | undefined

Mixins beside the style: Tour.focusReturn.