/** * A story that jumps from one chapter file into a page fence of a later one * (#943, DESIGN ยง5.17). The sending chapter cannot lay the rest out: the * page lives in another `buildDocument` call. It hands the rest back * ({@link StoryJump}, `VDTDocument.pendingJumps`) and the host gives it to * the chapter that has the page (`LayoutContinuation.jumps`), which sets it * in the frames its page leaves free, as it would a story of its own. * * A jump carries the story as the sender had it ready to lay: the box and * its children (parsed, with numbers, tables and citations in place), the * cut where the sender stopped, and the little the children's layout reads * by their place in the sender's block list (heading numbers, the width of * ordered-list markers, footnote numbers). The receiver appends the blocks * past its own, shifts their source offsets so that `offset + bodyOffset` * is still the offset in the sender's file (`VDTBlock.sourceChapter` says * whose), gives their containers ids of their own and lays them through a * pass that answers every lookup for them. * * Pure helpers; `build.ts` exports the jump and `composedLayout.ts` lays * the imported story. */ import type { ContentBlock } from '../parse/types.js'; import type { CarriedNumber, StoryJump, CarriedNote } from './carryTypes.js'; export type { CarriedNumber, StoryJump, CarriedNote } from './carryTypes.js'; import type { ComposedContinuation } from './continuation.js'; /** The stories carried into a chapter, laid past its own blocks. */ export interface ImportedJumps { /** The carried blocks, to append to the chapter's content blocks. */ blocks: ContentBlock[]; /** The continuations, with their stories at the positions they will have * once appended, by the page id they jump to, in source order. */ byTarget: Map; /** Per story, by the position of its opening marker once appended. */ stories: Map; startIdx: number; endIdx: number; }>; /** The notes the stories cite, under the ids they have here. */ footnotes: (CarriedNote & { chapter: number; })[]; /** The position of `blocks[0]` among the chapter's content blocks. */ baseLength: number; } /** * The jumps `jumps` as this chapter lays them: appended after * `baseLength` content blocks, source offsets as this chapter's body reads * them (`bodyOffset`), containers renamed. A jump with no blocks is * skipped. */ export declare function importJumps(jumps: readonly StoryJump[], baseLength: number, bodyOffset: number): ImportedJumps; //# sourceMappingURL=carry.d.ts.map