import React from 'react'; import * as _plurid_plurid_data from '@plurid/plurid-data'; import { Vec2, CameraState, PluridTourControls, PluridPubSubMessageTour, TreePlane, PluridPlanePinnable, PluridConfiguration, InternationalizationLanguageType, SIZES, TRANSFORM_MODES, TOOLBAR_DRAWERS, PluridRenderSlot, PluridPlaneComponentProperty, PluridRouteComponentProperty, ComponentWithPlurid, PluridApplication, PluridPlane, PluridRoute, PluridRoutePlane, IsoMatcherRouteResult, PluridBookmarkAction, CameraDelta, PluridPlaneAnchor, PluridAnchorResolution, PluridApi, CameraMotion, PluridNamedViewpoint, PluridStateHistory, PluridApplicationView, LinkCoordinates, PluridPinnedRect, PluridPlaceOptions, PluridPlaceResult, PluridPinnedPlane, PluridStackOptions, PluridStack, PluridOccluded } from '@plurid/plurid-data'; import * as _reduxjs_toolkit from '@reduxjs/toolkit'; import { PayloadAction, Reducer, UnknownAction, ThunkDispatch, AnyAction } from '@reduxjs/toolkit'; import { Theme } from '@plurid/plurid-themes'; type EasingName = 'linear' | 'out-cubic' | 'out-quint' | 'in-out-cubic' | 'spring'; type FlingKind = 'orbit' | 'pan'; interface TweenOptions { /** ms. Default `navigation.motion.duration` (380). */ duration?: number; easing?: EasingName; /** * Called once the camera has LANDED on the target — at once when the controller jumps (reduced * motion, a zero duration, already there), at the tween's last frame otherwise; never when an * input interrupts it. When another caller's tween replaces a non-exclusive tween, this RIDES the * replacing tween and is called when the camera lands (2026-10-30: it was dropped whenever the * replacing caller brought an `onSettle` of its own); an exclusive tween's is not carried. */ onSettle?: () => void; /** * AN EXCLUSIVE TWEEN (2026-10-30): its callbacks belong to its caller, so the caller learns * whether the camera landed where it asked (`onSettle`) or did not (`onInterrupt`). Called once, * when the tween stops without landing: an input, a jump, another caller's tween, after the * motion that replaced it is in place. Its `onSettle` is never carried to another caller's * tween, which would tell a tour it arrived at a stop the camera never reached; only a retarget * that `continues` it keeps both. A caller asking for the very pose a tween is going to JOINS * it, whichever kind either is: every caller's `onSettle` is called when it lands, and every * `onInterrupt` if it does not. */ onInterrupt?: () => void; /** * This retarget re-aims the running tween at the place it was going, moved (the docked page * followed through a relayout, a plane framed again once it is measured): an exclusive tween * keeps its callbacks through it, and is not interrupted. */ continues?: boolean; /** * The page the camera docks on: a controller that jumps commits with it named, as a jump does, so * a page pitched past the orbit's limit is reached face-on (the commit clamped it, 2026-10-22). */ docking?: string; } /** * The View's one rAF motion loop, as seen by the rest of the adapter: thunks reach it through the * store's thunk extra argument (`PluridThunkExtra.motion`) so every programmatic camera move — * frame, fit, home, presets, bookmarks, `space.frame`, an animated `space.cameraDelta` — is an * interruptible tween, and every input cancels it. */ interface CameraMotionController { /** Stop whatever is driving the camera (a tween or a fling). Any input calls this first. */ cancel: () => void; /** Start a decaying fling from a pointer velocity (px/ms). */ fling: (velocity: Vec2, kind: FlingKind) => void; /** * A pointer drag or pinch drives the camera from `gesture(true)` to `gesture(false)`, and the * motion reads `gesture` in between (2026-10-19: nothing set it before), so what waits for a still * camera — a re-frame, the detach tier, the measured relayout, an agent's settle — waits for the * drag too, and `data-plurid-motion` styles it. Starting one stops a tween or a fling where it is; * a fling started from the release takes the motion over, which ending the gesture then leaves. */ gesture: (active: boolean) => void; /** Animate to a camera (interruptible; instant under reduced motion). `true` when a tween started, `false` for a jump. */ tweenTo: (target: CameraState, options?: TweenOptions) => boolean; isActive: () => boolean; /** Whether the viewer prefers reduced motion (and the configuration respects it). */ reducedMotion: () => boolean; } interface PlaneMeasurer { /** Watch a plane's element under its id; the returned function stops watching it. */ observe: (element: HTMLElement, planeID: string) => () => void; /** Stop watching everything. */ disconnect: () => void; } /** The application's player: the controls, the bus's `space.tour`, and the end of its life. */ interface PluridTourPlayer extends PluridTourControls { command: (message: PluridPubSubMessageTour | undefined) => void; dispose: () => void; } /** * The store's thunk extra argument: one mutable holder per `PluridApplication`, created with the * store and filled in by the View once it mounts. Thunks receive it as their third parameter and * read it LIVE (never capture `extra.motion` — the View may remount). */ interface PluridThunkExtra { /** The View's motion controller, while a View is mounted. */ motion?: CameraMotionController; /** The View's root element, while mounted (the shortcuts' focus target). */ view?: HTMLElement | null; /** * A plane to frame again once its FIRST measurement after (re)opening lands (`reportPlaneSize`): * a plane that was closed is unmounted, so the tree keeps the size it had when it closed — the * frame at reopen targets the best-known geometry, the measured one retargets the tween. */ pendingFrame?: { planeID: string; animate: boolean; /** the frame is a pair: the plane and the plane it came from */ pair?: boolean; }; /** The application's one plane measurer (`observePlaneSize`), created on the first plane's mount. */ measurer?: PlaneMeasurer; /** * MAKE A PLANE OF THIS SPACE for a path, exactly as opening it would (`resolveViewItem` against * this application's registrar and hostname): `undefined` for a path it does not register. A * paste from another space asks this before it can hold what it was given — the planes it makes * are the target's own, on the target's host, with the target's declared sizes * (`materializeFragment`). The store never depends on the engine's registrar class. */ resolvePlane?: (path: string) => TreePlane | undefined; /** The application's tour player (`handle.tour`), which the `space.tour` topic drives too. */ tour?: PluridTourPlayer; /** The registered plane a tree node renders (its `sourceID`): what a pin reads `pinnable` from. */ registeredPlane?: (sourceID: string) => { pinnable?: PluridPlanePinnable; head?: unknown; } | undefined; /** * Where a plane was drawn when it was pinned, by id: the pinned frame flies from there to its rect * when it mounts, and takes it (a plane opened pinned has no such flight). */ pinFlights?: Map; } interface MarqueeRect { left: number; top: number; right: number; bottom: number; } interface UIState { toolbarScrollPosition: number; /** Ephemeral content-wheel owner under `gestures.wheel: 'click-to-scroll'`; never persisted. */ scrollPlaneID: string; /** Grab / navigate mode toggled with G: a left drag orbits everywhere, the wheel zooms. */ grabMode: boolean; /** Grab mode while Space is held. */ grabHold: boolean; /** The keyboard-shortcuts help overlay. */ shortcutsOverlayVisible: boolean; /** The command palette (⌘/Ctrl+K). */ paletteVisible: boolean; /** The rubber-band selection rectangle in view px while a ⌘/Ctrl-drag on empty space is in progress. */ marquee: MarqueeRect | null; } declare const ui: _reduxjs_toolkit.Slice, action: PayloadAction) => void; setMarquee: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setUIToolbarScrollPosition: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setUIGrabMode: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleUIGrabMode: (state: _reduxjs_toolkit.WritableDraft) => void; setUIGrabHold: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setShortcutsOverlayVisible: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleShortcutsOverlay: (state: _reduxjs_toolkit.WritableDraft) => void; setPaletteVisible: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; togglePalette: (state: _reduxjs_toolkit.WritableDraft) => void; }, "ui", "ui", _reduxjs_toolkit.SliceSelectors>; declare const actions$3: _reduxjs_toolkit.CaseReducerActions<{ setScrollPlaneID: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setMarquee: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setUIToolbarScrollPosition: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setUIGrabMode: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleUIGrabMode: (state: _reduxjs_toolkit.WritableDraft) => void; setUIGrabHold: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setShortcutsOverlayVisible: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleShortcutsOverlay: (state: _reduxjs_toolkit.WritableDraft) => void; setPaletteVisible: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; togglePalette: (state: _reduxjs_toolkit.WritableDraft) => void; }, "ui">; declare const getToolbarScrollPosition: (state: AppState) => number; /** Effective grab mode: toggled with G or held with Space. */ declare const getGrabMode: (state: AppState) => boolean; declare const getGrabToggled: (state: AppState) => boolean; declare const getShortcutsOverlayVisible: (state: AppState) => boolean; declare const getPaletteVisible: (state: AppState) => boolean; declare const selectors$3: { getToolbarScrollPosition: (state: AppState) => number; getGrabMode: (state: AppState) => boolean; getGrabToggled: (state: AppState) => boolean; getShortcutsOverlayVisible: (state: AppState) => boolean; getPaletteVisible: (state: AppState) => boolean; }; declare const reducer$3: _reduxjs_toolkit.Reducer; type ui$1_MarqueeRect = MarqueeRect; type ui$1_UIState = UIState; declare const ui$1_getGrabMode: typeof getGrabMode; declare const ui$1_getGrabToggled: typeof getGrabToggled; declare const ui$1_getPaletteVisible: typeof getPaletteVisible; declare const ui$1_getShortcutsOverlayVisible: typeof getShortcutsOverlayVisible; declare const ui$1_getToolbarScrollPosition: typeof getToolbarScrollPosition; declare const ui$1_ui: typeof ui; declare namespace ui$1 { export { type ui$1_MarqueeRect as MarqueeRect, type ui$1_UIState as UIState, actions$3 as actions, ui$1_getGrabMode as getGrabMode, ui$1_getGrabToggled as getGrabToggled, ui$1_getPaletteVisible as getPaletteVisible, ui$1_getShortcutsOverlayVisible as getShortcutsOverlayVisible, ui$1_getToolbarScrollPosition as getToolbarScrollPosition, reducer$3 as reducer, selectors$3 as selectors, ui$1_ui as ui }; } interface ThemesState { general: Theme; interaction: Theme; } declare const themes: _reduxjs_toolkit.Slice, action: PayloadAction) => void; setInteractionTheme: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; }, "themes", "themes", _reduxjs_toolkit.SliceSelectors>; declare const actions$2: _reduxjs_toolkit.CaseReducerActions<{ setGeneralTheme: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setInteractionTheme: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; }, "themes">; declare const getGeneralTheme: (state: AppState) => Theme; declare const getInteractionTheme: (state: AppState) => Theme; declare const selectors$2: { getGeneralTheme: (state: AppState) => Theme; getInteractionTheme: (state: AppState) => Theme; }; declare const reducer$2: _reduxjs_toolkit.Reducer; type themes$1_ThemesState = ThemesState; declare const themes$1_getGeneralTheme: typeof getGeneralTheme; declare const themes$1_getInteractionTheme: typeof getInteractionTheme; declare const themes$1_themes: typeof themes; declare namespace themes$1 { export { type themes$1_ThemesState as ThemesState, actions$2 as actions, themes$1_getGeneralTheme as getGeneralTheme, themes$1_getInteractionTheme as getInteractionTheme, reducer$2 as reducer, selectors$2 as selectors, themes$1_themes as themes }; } interface ShortcutsState { global: boolean; } declare const shortcuts: _reduxjs_toolkit.Slice, action: PayloadAction) => void; }, "shortcuts", "shortcuts", _reduxjs_toolkit.SliceSelectors>; declare const actions$1: _reduxjs_toolkit.CaseReducerActions<{ setGlobalShortcuts: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; }, "shortcuts">; declare const getGlobal: (state: AppState) => boolean; declare const selectors$1: { getGlobal: (state: AppState) => boolean; }; declare const reducer$1: _reduxjs_toolkit.Reducer; type shortcuts$1_ShortcutsState = ShortcutsState; declare const shortcuts$1_getGlobal: typeof getGlobal; declare const shortcuts$1_shortcuts: typeof shortcuts; declare namespace shortcuts$1 { export { type shortcuts$1_ShortcutsState as ShortcutsState, actions$1 as actions, shortcuts$1_getGlobal as getGlobal, reducer$1 as reducer, selectors$1 as selectors, shortcuts$1_shortcuts as shortcuts }; } interface ConfigurationState extends PluridConfiguration { } declare const configuration: _reduxjs_toolkit.Slice, action: PayloadAction) => { global: _plurid_plurid_data.PluridConfigurationGlobal; elements: _plurid_plurid_data.PluridConfigurationElements; space: _plurid_plurid_data.PluridConfigurationSpace; network: _plurid_plurid_data.PluridConfigurationNetwork; development: _plurid_plurid_data.PluridConfigurationDevelopment; }; setConfigurationPlaneControls: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationPlaneOpacity: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationThemeGeneral: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationThemeInteraction: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; /** The look, taken whole (a name, a base, or a preset with tokens), as the merge takes it. */ setConfigurationLook: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationLanguage: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeHide: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeButtons: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeOpaque: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeConceal: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationMinimapHide: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationMinimapTransparent: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationToolbarConceal: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarTransformIcons: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarTransformButtons: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationShowTransformOrigin: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarOpaque: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationSpaceTransparentUI: (state: _reduxjs_toolkit.WritableDraft) => void; setConfigurationSpaceTransformOriginSize: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceTransformMode: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationSpaceFirstPerson: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarToggleDrawer: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceTransformLocks: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceLayout: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceCullingDistance: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; }, "configuration", "configuration", _reduxjs_toolkit.SliceSelectors>; declare const actions: _reduxjs_toolkit.CaseReducerActions<{ setConfiguration: (_state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => { global: _plurid_plurid_data.PluridConfigurationGlobal; elements: _plurid_plurid_data.PluridConfigurationElements; space: _plurid_plurid_data.PluridConfigurationSpace; network: _plurid_plurid_data.PluridConfigurationNetwork; development: _plurid_plurid_data.PluridConfigurationDevelopment; }; setConfigurationPlaneControls: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationPlaneOpacity: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationThemeGeneral: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationThemeInteraction: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; /** The look, taken whole (a name, a base, or a preset with tokens), as the merge takes it. */ setConfigurationLook: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationLanguage: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeHide: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeButtons: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeOpaque: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationViewcubeConceal: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationMinimapHide: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationMinimapTransparent: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationToolbarConceal: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarTransformIcons: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarTransformButtons: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationShowTransformOrigin: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarOpaque: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationSpaceTransparentUI: (state: _reduxjs_toolkit.WritableDraft) => void; setConfigurationSpaceTransformOriginSize: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceTransformMode: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; toggleConfigurationSpaceFirstPerson: (state: _reduxjs_toolkit.WritableDraft) => void; toggleConfigurationToolbarToggleDrawer: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceTransformLocks: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceLayout: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; setConfigurationSpaceCullingDistance: (state: _reduxjs_toolkit.WritableDraft, action: PayloadAction) => void; }, "configuration">; declare const getConfiguration: (state: AppState) => ConfigurationState; declare const selectors: { getConfiguration: (state: AppState) => ConfigurationState; }; declare const reducer: _reduxjs_toolkit.Reducer; type configuration$1_ConfigurationState = ConfigurationState; declare const configuration$1_actions: typeof actions; declare const configuration$1_configuration: typeof configuration; declare const configuration$1_getConfiguration: typeof getConfiguration; declare const configuration$1_reducer: typeof reducer; declare const configuration$1_selectors: typeof selectors; declare namespace configuration$1 { export { type configuration$1_ConfigurationState as ConfigurationState, configuration$1_actions as actions, configuration$1_configuration as configuration, configuration$1_getConfiguration as getConfiguration, configuration$1_reducer as reducer, configuration$1_selectors as selectors }; } declare const combined: Reducer<{ configuration: ConfigurationState; shortcuts: ShortcutsState; space: _plurid_plurid_data.PluridStateSpace; themes: ThemesState; ui: UIState; }, UnknownAction, Partial<{ configuration: ConfigurationState | undefined; shortcuts: ShortcutsState | undefined; space: _plurid_plurid_data.PluridStateSpace | undefined; themes: ThemesState | undefined; ui: UIState | undefined; }>>; type AppState = ReturnType; interface ElementQLComponent { name: ElementQLComponentName; url?: string; } type ElementQLComponentName = string; type PluridReactFunctionalComponent = React.FC>; /** * What a plane, a route, a shell or an exterior renders. Only the React component is rendered: an * ElementQL name or `{ name, url }` is not a component, and a plane given one shows its error card * (with a development warning) instead of rendering a stray `` element or nothing * (2026-09-29). An exterior or a shell given one is skipped. */ type PluridReactComponent = PluridReactFunctionalComponent | ElementQLComponent | ElementQLComponentName; type PluridReactPlaneComponent = PluridReactFunctionalComponent; type PluridReactRouteComponent = PluridReactFunctionalComponent; type PluridReactPlane = PluridPlane; type PluridReactRoute = PluridRoute; type PluridReactRoutePlane = PluridRoutePlane; /** * A render slot as React calls it: given its context, it returns what React renders. The data * package types a slot's result as `unknown` to stay framework-free, so a slot returning an object * (`renderMinimap={() => ({ not: 'a node' })}`) compiled and then took the whole application down * with "Objects are not valid as a React child" (2026-09-29). */ type PluridReactRenderSlot = (context: Context) => React.ReactNode; /** `Properties` with every `render*` slot returning a React node, its context kept. */ type PluridReactSlots = { [Key in keyof Properties]: Key extends `render${string}` ? (NonNullable extends PluridRenderSlot ? PluridReactRenderSlot : Properties[Key]) : Properties[Key]; }; /** The props of ``: the data package's, with React's render slots. */ type PluridReactApplicationProperties = PluridReactSlots>; type PluridRouteMatch = IsoMatcherRouteResult; type Dispatch = ThunkDispatch<{}, {}, AnyAction>; type GetState = () => AppState; type CameraThunk = (dispatch: Dispatch, getState: GetState, extra?: PluridThunkExtra) => void; interface CameraMotionOptions { /** Tween through the motion controller (default `true`); `false` jumps. */ animate?: boolean; /** ms; default `navigation.motion.duration`. */ duration?: number; easing?: EasingName; /** Called once the camera has landed (at once for a jump; never for an interrupted tween). */ onSettle?: () => void; /** * Called when the tween stops without landing (an input, a jump, another caller's move). Giving * it makes the tween EXCLUSIVE: its `onSettle` is never handed to another caller's tween * (`TweenOptions.onInterrupt`). */ onInterrupt?: () => void; /** This move re-aims a running tween at the place it was going (the engine's own retargets). */ continues?: boolean; /** * `'none'`: the planes in front of the plane this move comes to rest on are not faded * (`space.occlusion`, 2026-10-31). Default: the configuration's. */ occlusion?: 'fade' | 'none'; } /** * WHERE AN ANCHOR IS NOW (2026-10-30): the plane at its path (the `occurrence`-th in tree order) and * the camera of its pose against that plane's geometry as the store holds it this moment, or why * not: no plane at the path (`absent`), or the plane or a plane it hangs from is closed * (`hidden`). Pure, and read at the moment of the move, so a stop lands where its plane is when the * stop is reached, not where it was when the tour was made. */ declare const resolveAnchor: (state: AppState, anchor: PluridPlaneAnchor) => PluridAnchorResolution; /** * The plane a camera target LANDS DOCKED on, `''` when it lands elsewhere (both presentations). */ declare const landingDockPlaneID: (state: AppState, target: CameraState) => string; type CameraCommand = { kind: 'frame'; planeID?: string; selection?: boolean; } /** Frame a plane AND the plane it came from, from the yaw at which both read. */ | { kind: 'pair'; planeID: string; } /** Frame these planes (else the selection) by their real corners from a yaw (`best`: where the narrowest reads). */ | { kind: 'planes'; planeIDs?: string[]; yaw?: number | 'best'; } | { kind: 'fit'; faceOn?: boolean; } | { kind: 'reset'; } | { kind: 'home'; } | { kind: 'preset'; name: string; } | { kind: 'bookmark'; name: string; action?: PluridBookmarkAction; to?: string; } | { kind: 'viewpoint'; viewpoint: string; } | { kind: 'delta'; delta: CameraDelta; } /** Dock on a page (the page presentation): this plane, else the docked one, else the nearest. */ | { kind: 'dock'; planeID?: string; } /** Reveal the space from a docked page: pull back and tilt (the page presentation). */ | { kind: 'reveal'; } /** Go to a camera named by a plane: its path, which plane at it, the pose in its frame (`resolveAnchor`). */ | { kind: 'anchor'; anchor: PluridPlaneAnchor; }; /** The camera a command resolves to (pure), or `undefined` when there is nothing to go to. */ declare const resolveCameraTarget: (command: CameraCommand, state: AppState) => CameraState | undefined; /** Dock the camera on a page (`space.dock`). */ declare const dockCommand: (planeID?: string, animate?: boolean) => CameraThunk; /** Reveal the space from a docked page (`space.reveal`). */ declare const revealCommand: (animate?: boolean) => CameraThunk; interface ClosePlaneOptions { /** * Where the camera goes when the closed plane is the one IN VIEW: to its parent (`'parent'`, * the default — a child closed from within returns to where it was opened from) or nowhere * (`'stay'`). Roots always stay. Defaults to `space.navigation.onClose`. */ navigate?: 'parent' | 'stay'; } /** What the waiting reads of the engine's state: the camera, its motion, and a relayout's glide. */ interface PluridRestSource { getState: () => unknown; } interface PluridRestOptions { /** Give up after this many ms, and resolve `false`. Default 4000; one that is not a number from 0 is the default. */ timeout?: number; /** How many frames in a row the space must be still: a whole number from 1. Default 3; anything else is the default. */ frames?: number; } /** `waitForRest` with its options named, as the handle takes them. */ declare const whenAtRest: (store: PluridRestSource, options?: PluridRestOptions) => Promise; /** * The imperative handle of a `PluridApplication` (`ref`): the `onReady` api plus typed camera, * selection, history and tree commands — the same thunks the gestures, shortcuts and topics use. */ interface PluridApplicationHandle extends PluridApi { camera: { get: () => CameraState; motion: () => CameraMotion; /** Move by a delta: a jump by default; `animate` tweens (with `duration`, `easing`); `onSettle` either way. */ moveBy: (delta: CameraDelta, options?: CameraMotionOptions) => void; moveTo: (viewpoint: string, options?: CameraMotionOptions) => void; frame: (target?: { planeID?: string; selection?: boolean; }, options?: CameraMotionOptions) => void; fit: (options?: CameraMotionOptions) => void; reset: (options?: CameraMotionOptions) => void; home: (options?: CameraMotionOptions) => void; setHome: (viewpoint?: string) => void; preset: (name: string, options?: CameraMotionOptions) => void; bookmark: (name: string, action?: PluridBookmarkAction, options?: CameraMotionOptions) => void; /** The page presentation: the docked page's id (`''` when the camera is off every page). */ docked: () => string; /** Dock on a page: the named one, else the docked one, else the page nearest the view center. */ dock: (planeID?: string, options?: CameraMotionOptions) => void; /** Reveal the space from the docked page. */ reveal: (options?: CameraMotionOptions) => void; /** * Go to a camera named by a plane (2026-10-30): its path, which plane at that path, and the * pose in its frame, resolved against the space as it is now. The answer says where it went * (the plane, the camera), or why it did not move (`absent`, `hidden`). */ anchor: (anchor: PluridPlaneAnchor, options?: CameraMotionOptions) => PluridAnchorResolution; /** Stop whatever moves the camera (a tween, a fling) where it is. An exclusive tween is told (`onInterrupt`). */ cancel: () => void; /** Whether camera moves jump: the reader prefers reduced motion and `navigation.motion.reducedMotion` respects it. */ reducedMotion: () => boolean; }; /** * TOURS (2026-10-30): play a sequence of anchored stops, pause, resume, step, seek, stop, observe * every event, and record a tour from where the reader comes to rest. */ tour: PluridTourControls; /** * Resolve `true` once the camera is still and no relayout glides, for `frames` frames in a row * (3), or `false` after `timeout` ms (4000): the moment a host draws over what the camera came to. */ whenAtRest: (options?: PluridRestOptions) => Promise; selection: { get: () => string[]; set: (planeIDs: string[]) => void; toggle: (planeID: string) => void; clear: () => void; all: () => void; invert: () => void; align: (edge: 'left' | 'right' | 'top' | 'bottom' | 'centerX' | 'centerY') => void; distribute: (axis: 'x' | 'y') => void; duplicate: (offset?: number) => void; /** The selection as an arrangement fragment, on the clipboard (`cut` closes it afterwards). */ copy: (options?: { cut?: boolean; }) => void; cut: () => void; /** Paste a fragment: the given text, else what this document last copied. */ paste: (text?: string) => void; }; /** * THE NAMED VIEWPOINTS: the reader's bookmarks, the host's presets and home — one shape for the * three (`PluridNamedViewpoint`), each with the camera it decodes to. */ bookmarks: { get: () => PluridNamedViewpoint[]; /** Save the current camera under `name` (an existing name is overwritten). */ save: (name: string) => void; /** Travel to one: a bookmark by default, a preset or home by `source`. */ go: (entry: string | Pick, options?: CameraMotionOptions) => void; remove: (name: string) => void; /** Rename a bookmark, keeping its place in the list. */ rename: (from: string, to: string) => void; }; history: { get: () => PluridStateHistory; undo: () => void; redo: () => void; /** * Run `work` as ONE undo step: every arrangement change it makes (spawns, closes, a whole * `tree.set`) undoes and redoes together. Nested transactions join the outer one. */ transaction: (work: () => void) => void; /** Jump `index` steps as one restore: negative undoes, positive redoes (`history.get().past / .future` list them). */ goTo: (index: number) => void; }; tree: { get: () => TreePlane[]; /** The culling pass's counts: hidden, frozen, detached (`culling.detach`) planes. */ culling: () => { hidden: number; frozen: number; detached: number; }; /** Replace the roots (relayout with the planes gliding). */ setView: (view: PluridApplicationView) => void; /** * Replace the whole tree, children and placements included, as the `space.setTree` topic * does: a product that arranges its own space restores a saved arrangement with it. The tree * is set exactly (its locations, pins and sizes over the live ones), the view follows its * roots, and a malformed tree leaves the tree as it was, with a development warning. */ set: (tree: TreePlane[]) => void; /** * Open a registered route as a child of `parentPlaneID`, as `space.spawnPlane` does: a route * already open there is gone to, never put away; the bridge leaves at `linkCoordinates`, else * the parent's middle height. Returns the plane's id, `undefined` when nothing could open * (an unregistered route, a parent that is not there). */ spawn: (route: string, parentPlaneID: string, linkCoordinates?: LinkCoordinates) => string | undefined; /** Hide a plane; the one in view hands the camera to its parent (`space.navigation.onClose`). */ close: (planeID: string, options?: ClosePlaneOptions) => void; open: (planeID: string) => void; /** Remove a plane and its subtree; the selection, the active plane and the isolation forget them. */ remove: (planeID: string) => void; }; /** * PINNED AND STACKED PLANES (2026-10-31). A pinned plane is a plane of the space lifted onto the * screen at a fixed rect, above the space, unmoved by the camera: the same route, id and * content, which neither a pin nor a place remounts. A stack sets 2 to 12 planes one behind * another, facing the camera. */ planes: { /** * Open a registered route as a NEW pinned plane (a root), at `rect`, else at a free slot on * the right edge; no other root moves. Its id, `undefined` for an unregistered or pin-ineligible route. */ open: (route: string, options?: { rect?: PluridPinnedRect; collapsed?: boolean; }) => string | undefined; /** * Pin a plane of the space to the screen, at `rect`, else at a free slot on the right edge; * a pinned plane takes the new rect and comes to the front. `false` for a plane not in the * shown tree, or one whose registration/predicate refuses pinning. */ pin: (planeID: string, rect?: PluridPinnedRect) => boolean; /** * Put a pinned plane into the space where its frame is, face-on, at the frame's size: it * becomes a regular plane, a root (free: no other root moves) or a child of the plane it * hangs from, or of `parentPlaneID`. A camera turned both ways is levelled first, a tween * through the motion controller; `interrupted` when an input takes the camera first. */ place: (planeID: string, options?: PluridPlaceOptions) => Promise; /** Collapse a pinned plane to its title bar, or expand it (`false`); toggles without `collapsed`. */ collapse: (planeID: string, collapsed?: boolean) => boolean; /** Bring a pinned plane to the front of the pinned planes. */ raise: (planeID: string) => boolean; /** The pinned planes, back first, each with its frame in view px. */ pinned: () => PluridPinnedPlane[]; /** Whether a shown plane may be pinned according to its registration/predicate. */ pinnable: (planeID: string) => boolean; /** * Stack 2 to 12 planes, the first in front: each a step down-right of and nearer than the * one behind it, facing the camera, the stack's middle on the view's centre. The stack's id, * `undefined` when the planes cannot stack (too few or many, absent, closed, pinned). */ stack: (planeIDs: string[], options?: PluridStackOptions) => string | undefined; /** Put each plane of a stack (its id), or the planes named, back exactly where it was. */ unstack: (reference: string | string[], options?: { animate?: boolean; }) => boolean; stacks: () => PluridStack[]; /** * The planes faded in front of the plane the camera rests on (`space.occlusion`): the target * and the faded planes, the most covering first; empty while the camera moves. */ occluded: () => PluridOccluded; }; /** The persisted state (`useLocalStorage`, a `storageAdapter`). */ persist: { /** * Write a pending save now, synchronously, as hiding the page does. A host that saves its * own document alongside the space calls it first, instead of dispatching `pagehide`. * With nothing pending, nothing is written. */ flush: () => void; }; /** Move keyboard focus to the space (so the shortcuts apply). */ focus: () => void; } export { type AppState as A, type PluridThunkExtra as B, type ConfigurationState as C, type TweenOptions as D, type MarqueeRect as M, type PluridReactFunctionalComponent as P, type ShortcutsState as S, type ThemesState as T, type UIState as U, type PluridReactComponent as a, type PluridReactApplicationProperties as b, type PluridReactSlots as c, type PluridApplicationHandle as d, configuration$1 as e, type PluridRouteMatch as f, type ClosePlaneOptions as g, type CameraMotionOptions as h, type CameraThunk as i, type CameraCommand as j, type PluridReactPlane as k, type PluridReactPlaneComponent as l, type PluridReactRenderSlot as m, type PluridReactRoute as n, type PluridReactRouteComponent as o, type PluridReactRoutePlane as p, type PluridRestOptions as q, dockCommand as r, shortcuts$1 as s, themes$1 as t, ui$1 as u, landingDockPlaneID as v, resolveAnchor as w, resolveCameraTarget as x, revealCommand as y, whenAtRest as z };