waygraph / NavBlockOptions
Type Alias: NavBlockOptions<Out>
NavBlockOptions<
Out> =object& ({click?:never;url:string| ((mem) =>string); } | {click:string| ((mem) =>string);url?:never; })
Defined in: src/engine/block/kinds/nav.ts:55
defineNavBlock's own options - exactly one of url/click required, enforced at compile time (giving both, or neither, is a type error - see typecheck/nav-block.types.ts). checkpoint is the tag this NavBlock resolves to once navigation completes - a NavBlock never branches on observed evidence the way a regular Block can, so there's no resolve logic to author; it always just declares "arrived."
Type Parameters
Out
Out extends Checkpoint<string>
Type Declaration
checkpoint
checkpoint:
Out
The Checkpoint this Nav lands on: its value (Home).
description?
optionaldescription?:string
expect?
optionalexpect?:ExpectList<Out>
What this Block promises wherever it's used, checked after its verify: Expect Blocks, Traits, Key.is(...). A Block that can land in several places lists them per outcome. Read-only and run together; a step can drop them ({ expect: false }) or add its own.
Example
expect: [ExpectArchivedToastBlock] · expect: { EquipmentDetail: [ExpectSavedBlock], EquipmentAdd: [ExpectNameRequiredBlock] }from?
optionalfrom?: readonlyCheckpoint<string>[]
Checkpoint tags this Nav can run from. Omit (the default) = reachable from anywhere. Set it for a page that only exists after something else - e.g. every in-app page after sign-in - so route finding (auto --blocks, pilot reach, traverse) goes through the sign-in steps instead of jumping straight there from the login page.
Example
const SIGNED_IN = [Dashboard, CommandCenter] as const; // src/states/
defineNavBlock({ ..., from: SIGNED_IN })instanceOptions?
optionalinstanceOptions?:Block<Checkpoint<string>,Out>["instanceOptions"]
Live per-instance menu rows for waygraph auto (see Block.instanceOptions). When set, the explore menu lists one row per option instead of a single generic nav edge - used by defineMemNavBlock.
name
name:
string
requires?
optionalrequires?: readonlyMemKey<unknown>[]
screenshot?
optionalscreenshot?:StepScreenshot
A screenshot of the page once the step is done (true, or { fullPage: true }): Waygraph Studio shows it on the map.