import type { AnnotationPlacement, Chapter, ChapterAdvance, ChapterModel, ChapterDrawingAnnotation } from "../core/types/story"; import type { ViewBox } from "../core/types/viewer"; import type { ModelPoseOptions } from "../core/types/model"; export declare const IIIF_PRESENTATION_3_CONTEXT: "http://iiif.io/api/presentation/3/context.json"; export declare const W3C_WEB_ANNOTATION_CONTEXT: "http://www.w3.org/ns/anno.jsonld"; export declare const MANGO_STORY_NAMESPACE: "https://mangoviewer.dev/schema/story#"; /** * The context that defines Mango's terms, and the only place the profile * version is stated. * * Major version in the path, following IIIF's own `/3/`: this URL changes on * a breaking change, while additive terms go into the same document because * a reader that does not know a term ignores it. Carrying the version here * rather than in a property means it is declared once instead of restated on * the page and again inside every chapter's state. */ export declare const MANGO_STORY_CONTEXT_URL: "https://mangoviewer.dev/schema/story/1/context.json"; /** @deprecated Superseded by the context URL. Read for migration only. */ export declare const MANGO_STORY_VERSION: "1.0"; export declare const MANGO_VIEWER_STATE_TYPE: "mango:ViewerState"; export declare const MANGO_VIEWER_STATE_FORMAT: "application/vnd.mango.story-state+json"; export type MangoStoryPlayback = { advance?: ChapterAdvance["mode"]; delayMs?: number; entryTransition?: Chapter["entryTransition"]; presentationDurationMs?: number; /** @deprecated Mango story profile v1 compatibility. */ transitionMs?: number; }; export type MangoViewerState = { chapterId?: string; canvasIndex?: number; /** @deprecated Inferred from exported chapter frames; read for migration only. */ presentationAspect?: number; canvasId?: string; /** * @deprecated Superseded by the chapter target's `xywh` fragment. Read so * stories written before the move keep their exact framing; never written. */ viewBox?: ViewBox; modelPose?: ChapterModel; modelOptions?: ModelPoseOptions; layerOpacities?: Record; annotationPlacement?: AnnotationPlacement; playback?: MangoStoryPlayback; cameraTrack?: Chapter["cameraTrack"]; /** * @deprecated Superseded by the standalone overlay annotations in `items`. * Read for stories written before the move; never written. */ drawingAnnotations?: ChapterDrawingAnnotation[]; }; export type MangoViewerStateBody = { id?: string; type: typeof MANGO_VIEWER_STATE_TYPE; format: typeof MANGO_VIEWER_STATE_FORMAT; mangoState: MangoViewerState; }; /** * The state body's own id, derived from the annotation that carries it. * * IIIF requires every annotation body that is not a `TextualBody` to have an * http(s) id, so the body cannot stay anonymous the way a W3C-only reading * would allow. */ export declare const buildViewerStateBodyId: (annotationId: string) => string; export declare const createMangoViewerStateBody: (chapter: Chapter, annotationId?: string) => MangoViewerStateBody; export declare const mangoViewerStateVersion: (value: unknown) => string | undefined; export declare const parseMangoViewerStateBody: (value: unknown) => MangoViewerState | undefined;