import type { Plan } from "../../types/bim"; import type { Building, DbFile } from '../../types/dbTypes'; import type { ActionMap } from "../ActionMap"; import type * as OBC from "@thatopen/components"; interface BimTypes { bimComponents: OBC.Components | null; world: OBC.World | null; fragments: OBC.FragmentsManager | null; modelId: string | null; /** * Every loaded model, mirrored out of `FragmentsManager.list` so React can * read it. `ModelsSync` is the only thing that dispatches SET_MODEL_IDS. */ modelIds: string[]; floorplans: Plan[]; grid: OBC.SimpleGrid | null; /** Gates the point cloud, splat, model and DXF loaders so the BIM model gets the first bytes. */ fragmentsStarted: boolean; buildingModel: { bimFile: DbFile | null; building: Building | null; }; bimModelsAddedToMap: { "bimFile": DbFile; building?: Building | null; }[]; editingBimModel: string | null; bimModelName: string | null; /** Mirror of the Highlighter's selection; only SelectionSync dispatches SET_BIM_SELECTION. */ selection: OBC.ModelIdMap; /** The selected file-backed object, when the last click hit one. Only SelectionSync dispatches it. */ sceneSelection: { kind: 'object' | 'splat'; fileId: string; } | null; bcfTopic: OBC.Topic | Partial | null; bcfTopics: OBC.Topic[] | Partial[]; bcfTopicId: string | null; modelUIState: Record; /** * File ids the user has switched on for the BIM scene. The desired set; * `BimPointCloudSync` reconciles `BimPointClouds` against it. */ pointCloudIds: string[]; /** The cloud the alignment tools act on. */ activePointCloudId: string | null; /** * File ids the user has switched on for the BIM scene. The desired set; * `BimSplatSync` reconciles `BimSplats` against it. */ splatIds: string[]; } export type BimState = BimTypes; export type BimPayload = { ["SET_COMPONENTS"]: Pick; ["SET_WORLD"]: Pick; ["SET_MODEL"]: Pick; ["SET_FLOORPLANS"]: Pick; ["SET_GRID"]: Pick; ["SET_FRAGMENTS_STARTED"]: Pick; ["DISPOSE-BIM"]: void; ["TOGGLE_BIM_TO_MAP"]: Pick; ["REMOVE_BIM_FROM_MAP"]: Pick; ["REMOVE_ALL_BIM_FROM_MAP"]: void; ["EDIT_BIM_MODEL_BY_NAME"]: Pick; ["ADD_BCF_TOPIC"]: Pick; ["REMOVE_BCF_TOPIC"]: Pick; ['EDIT_BCF_TOPIC']: Pick; ["SET_MODEL_UI_STATE"]: { fileId: number; isVisible?: boolean; isGhost?: boolean; }; ["SET_POINT_CLOUD_IDS"]: { pointCloudIds: string[]; }; ["SET_BIM_SELECTION"]: Pick; ["SET_SCENE_SELECTION"]: Pick; ["SET_MODEL_IDS"]: Pick; ["TOGGLE_POINT_CLOUD"]: { pointCloudId: string; }; ["SET_ACTIVE_POINT_CLOUD"]: Pick; ["SET_SPLAT_IDS"]: { splatIds: string[]; }; ["TOGGLE_SPLAT"]: { splatId: string; }; }; export type BimActions = ActionMap[keyof ActionMap]; export declare const BimReducer: (state: BimState, action: BimActions) => { bcfTopics: any[]; bimComponents: OBC.Components | null; world: OBC.World | null; fragments: OBC.FragmentsManager | null; modelId: string | null; /** * Every loaded model, mirrored out of `FragmentsManager.list` so React can * read it. `ModelsSync` is the only thing that dispatches SET_MODEL_IDS. */ modelIds: string[]; floorplans: Plan[]; grid: OBC.SimpleGrid | null; /** Gates the point cloud, splat, model and DXF loaders so the BIM model gets the first bytes. */ fragmentsStarted: boolean; buildingModel: { bimFile: DbFile | null; building: Building | null; }; bimModelsAddedToMap: { "bimFile": DbFile; building?: Building | null; }[]; editingBimModel: string | null; bimModelName: string | null; /** Mirror of the Highlighter's selection; only SelectionSync dispatches SET_BIM_SELECTION. */ selection: OBC.ModelIdMap; /** The selected file-backed object, when the last click hit one. Only SelectionSync dispatches it. */ sceneSelection: { kind: "object" | "splat"; fileId: string; } | null; bcfTopic: OBC.Topic | Partial | null; bcfTopicId: string | null; modelUIState: Record; /** * File ids the user has switched on for the BIM scene. The desired set; * `BimPointCloudSync` reconciles `BimPointClouds` against it. */ pointCloudIds: string[]; /** The cloud the alignment tools act on. */ activePointCloudId: string | null; /** * File ids the user has switched on for the BIM scene. The desired set; * `BimSplatSync` reconciles `BimSplats` against it. */ splatIds: string[]; }; export {}; //# sourceMappingURL=reducer.d.ts.map