Site / foldkit-site

SitePage

interface · packages/site/src/index.ts:137

interface SitePage<Parent, ParentMessage, R, P> {
  readonly node: SiteNode<any>
  readonly placed: P
  readonly inform: (
    model: Parent,
    route: {
      readonly _tag: string
    },
  ) => Option.Option<Update.Return<Parent, ParentMessage, R>>
}

One routed page: its node, its Bundle placement, and how a route arrival reaches the child. The placement drives both folds from one declaration — placed.update for Messages, placed.view for drawing — and inform tells the child when its route arrives, through its own Message. The placement's full type rides along, so assemblies keep inferring services.

Members

SitePage.node

property · packages/site/src/index.ts:138

readonly node: SiteNode<any>

SitePage.placed

property · packages/site/src/index.ts:139

readonly placed: P

SitePage.inform

property · packages/site/src/index.ts:144

readonly inform: (
  model: Parent,
  route: {
    readonly _tag: string
  },
) => Option.Option<Update.Return<Parent, ParentMessage, R>>

The child told of a route arrival: None for another node's route, for a page with nothing to say, or when the child says nothing is needed.