UNPKG

@plurid/plurid-react

Version:

React implementation of Plurid to explore the web in three dimensions

203 lines (202 loc) 16.3 kB
/// <reference types="react" /> import { Theme } from '@plurid/plurid-themes'; import { PLURID_PUBSUB_TOPIC, PluridPlane, PluridView, PluridUniverse, PluridConfiguration, PluridPartialConfiguration, PluridRouterProperties, RecursivePartial, PluridRoute, PluridRouteSpace, PluridRouteUniverse, PluridRoutePlane, ComponentWithPlurid, PluridPlaneComponentProperty, PluridRouteComponentProperty, PluridPreserve, PluridPreserveTransmission, PluridPubSubPublishMessage, PluridPubSubSubscribeMessage, LAYOUT_TYPES as SPACE_LAYOUT, SIZES, TRANSFORM_MODES, TRANSFORM_TOUCHES, PLURID_ROUTER_LOCATION_CHANGED, PLURID_ROUTER_LOCATION_STORED } from '@plurid/plurid-data'; import { routing, pluridRouterNavigate } from '@plurid/plurid-engine'; import PluridPubSub from '@plurid/plurid-pubsub'; import { PluridReactComponent, PluridReactPlaneComponent, PluridReactRouteComponent, PluridReactPlane, PluridReactRoute, PluridReactRoutePlane, PluridRouteMatch } from './data/interfaces'; import PluridApplication from './containers/Application'; import PluridRouterBrowser from './containers/RouterBrowser'; import PluridRouterStatic from './containers/RouterStatic'; import PluridProvider from './containers/Provider'; import PluridLink from './components/links/Link'; import PluridRouterLink from './components/links/RouterLink'; import PluridApplicationConfigurator from './components/utilities/ApplicationConfigurator'; import PluridPlaneConfigurator from './components/utilities/PlaneConfigurator'; import PluridExternalPlane from './components/planes/ExternalPlane'; import PluridIframePlane from './components/planes/IframePlane'; import PluridVirtualList from './components/virtuals/List'; import pluridStateModules from './services/state/modules'; import { serverComputeMetastate } from './services/logic/server'; import { getDirectPlaneMatch } from './services/logic/router'; import { usePluridRouter } from './services/hooks'; declare const PluridIsoMatcher: typeof routing.IsoMatcher, PluridRouteParser: typeof routing.RouteParser; declare const internals: { PluridPlaneBridge: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneBridge").PluridPlaneBridgeProperties>, { mouseOver: boolean; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridPlaneContent: import("react").FC<import("./components/structural/Plane/components/PlaneContent").PluridPlaneContentOwnProperties>; PluridPlaneControls: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneControls").PluridPlaneControlsProperties>, { isolatePlane: () => void; plane: import("@plurid/plurid-data").RegisteredPluridPlane<PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty>>; mouseOver: boolean; refreshing: boolean; refreshPlane: () => void; treePlane: import("@plurid/plurid-data").TreePlane; parentTreePlane: import("@plurid/plurid-data").TreePlane | undefined; closePlane: () => void; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridPlaneDebugger: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerOwnProperties & import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerStateProperties & import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerDispatchProperties>, { context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridSpaceDebugger: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Space/components/SpaceDebugger").PluridSpaceDebuggerProperties>, { context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; }; /** * Components and utilities. */ declare const Plurid: { Application: typeof PluridApplication; RouterStatic: (properties: import("./containers/RouterStatic").PluridRouterStaticOwnProperties) => import("react").JSX.Element; RouterBrowser: (properties: PluridRouterProperties<PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty>>) => import("react").JSX.Element; Provider: typeof PluridProvider; Link: import("react-redux").ConnectedComponent<import("react").FC<import("react").PropsWithChildren<import("./components/links/Link").PluridLinkProperties>>, { route: string; children?: import("react").ReactNode; style?: import("react").CSSProperties | undefined; suffix?: string | undefined; preview?: boolean | undefined; className?: string | undefined; atClick?: ((event?: MouseEvent | import("react").MouseEvent<Element, MouseEvent> | undefined) => void) | undefined; previewOffsetX?: number | undefined; previewOffsetY?: number | undefined; previewComponent?: PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty> | undefined; devisible?: boolean | undefined; notFound?: boolean | PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty> | undefined; previewFadeIn?: number | undefined; previewFadeOut?: number | undefined; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; RouterLink: import("react").FC<import("./components/links/RouterLink").PluridRouterLinkOwnProperties>; ApplicationConfigurator: import("react-redux").ConnectedComponent<import("react").FC<import("react").PropsWithChildren<import("./components/utilities/ApplicationConfigurator").PluridApplicationConfiguratorProperties>>, { configuration?: RecursivePartial<PluridConfiguration> | undefined; children?: import("react").ReactNode; pubsub?: PluridPubSub | undefined; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PlaneConfigurator: import("react-redux").ConnectedComponent<import("react").FC<import("react").PropsWithChildren<import("./components/utilities/PlaneConfigurator").PluridPlaneConfiguratorProperties>>, { children?: import("react").ReactNode; theme: "night" | "dusk" | "dawn" | "light" | "ponton" | "jaune" | "furor" | "deback" | "decode" | "defile" | "deform" | "delook" | "deloss" | "demail" | "demand" | "denote" | "depack" | "depict" | "deself" | "desite" | "detime" | "detour" | "detune" | "deturn" | "deveil" | "devert" | "deview" | "dewiki" | "plurid"; style: import("react").CSSProperties; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; ExternalPlane: import("react-redux").ConnectedComponent<import("./data/interfaces").PluridReactFunctionalComponent<import("./components/planes/ExternalPlane").ExternalPlaneProperties, PluridRouteComponentProperty>, { plurid: PluridRouteComponentProperty; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; IframePlane: import("react-redux").ConnectedComponent<import("./data/interfaces").PluridReactFunctionalComponent<import("./components/planes/IframePlane").IframePlaneProperties, PluridRouteComponentProperty>, { plurid: PluridRouteComponentProperty; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; VirtualList: import("react-redux").ConnectedComponent<import("react").FC<import("./components/virtuals/List").PluridVirtualListProperties>, { items: JSX.Element[]; generalHeight?: number | undefined; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; /** Enumerations */ SPACE_LAYOUT: typeof SPACE_LAYOUT; SIZES: typeof SIZES; TRANSFORM_MODES: typeof TRANSFORM_MODES; TRANSFORM_TOUCHES: typeof TRANSFORM_TOUCHES; /** PubSub */ PubSub: typeof PluridPubSub; PUBSUB_TOPIC: { readonly CONFIGURATION: "configuration"; readonly SPACE_ANIMATED_TRANSFORM: "space.animatedTransform"; readonly SPACE_ROTATE_UP: "space.rotateUp"; readonly SPACE_ROTATE_DOWN: "space.rotateDown"; readonly SPACE_ROTATE_LEFT: "space.rotateLeft"; readonly SPACE_ROTATE_RIGHT: "space.rotateRight"; readonly SPACE_ROTATE_X_WITH: "space.rotateXWith"; readonly SPACE_ROTATE_Y_WITH: "space.rotateYWith"; readonly SPACE_ROTATE_X_TO: "space.rotateXTo"; readonly SPACE_ROTATE_Y_TO: "space.rotateYTo"; readonly SPACE_TRANSLATE_UP: "space.translateUp"; readonly SPACE_TRANSLATE_DOWN: "space.translateDown"; readonly SPACE_TRANSLATE_LEFT: "space.translateLeft"; readonly SPACE_TRANSLATE_RIGHT: "space.translateRight"; readonly SPACE_TRANSLATE_X_WITH: "space.translateXWith"; readonly SPACE_TRANSLATE_Y_WITH: "space.translateYWith"; readonly SPACE_TRANSLATE_Z_WITH: "space.translateZWith"; readonly SPACE_TRANSLATE_X_TO: "space.translateXTo"; readonly SPACE_TRANSLATE_Y_TO: "space.translateYTo"; readonly SPACE_TRANSLATE_Z_TO: "space.translateZTo"; readonly SPACE_SCALE_UP: "space.scaleUp"; readonly SPACE_SCALE_DOWN: "space.scaleDown"; readonly SPACE_SCALE_WITH: "space.scaleWith"; readonly SPACE_TRANSFORM: "space.transform"; readonly VIEW_ADD_PLANE: "view.addPlane"; readonly VIEW_SET_PLANES: "view.setPlanes"; readonly VIEW_REMOVE_PLANE: "view.removePlane"; readonly NAVIGATE_TO_PLANE: "space.navigateToPlane"; readonly REFRESH_PLANE: "space.refreshPlane"; readonly ISOLATE_PLANE: "space.isolatePlane"; readonly OPEN_CLOSED_PLANE: "space.openClosedPlane"; readonly CLOSE_PLANE: "space.closePlane"; readonly PREVIOUS_ROOT: "space.previousRoot"; readonly NEXT_ROOT: "space.nextRoot"; readonly NAVIGATE_TO_ROOT: "space.navigateToRoot"; }; /** Server */ serverComputeMetastate: (isoMatch: PluridRouteMatch, paths: PluridRoute<PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty>, any>[], globals: Record<string, string> | undefined, hostname?: string) => Promise<import("@plurid/plurid-data").PluridMetastate>; /** Router */ IsoMatcher: typeof routing.IsoMatcher; routerNavigate: (path: string) => void; internals: { PluridPlaneBridge: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneBridge").PluridPlaneBridgeProperties>, { mouseOver: boolean; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridPlaneContent: import("react").FC<import("./components/structural/Plane/components/PlaneContent").PluridPlaneContentOwnProperties>; PluridPlaneControls: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneControls").PluridPlaneControlsProperties>, { isolatePlane: () => void; plane: import("@plurid/plurid-data").RegisteredPluridPlane<PluridReactComponent<any, PluridPlaneComponentProperty | PluridRouteComponentProperty>>; mouseOver: boolean; refreshing: boolean; refreshPlane: () => void; treePlane: import("@plurid/plurid-data").TreePlane; parentTreePlane: import("@plurid/plurid-data").TreePlane | undefined; closePlane: () => void; context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridPlaneDebugger: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerOwnProperties & import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerStateProperties & import("./components/structural/Plane/components/PlaneDebugger").PluridPlaneDebuggerDispatchProperties>, { context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; PluridSpaceDebugger: import("react-redux").ConnectedComponent<import("react").FC<import("./components/structural/Space/components/SpaceDebugger").PluridSpaceDebuggerProperties>, { context?: import("react").Context<import("react-redux").ReactReduxContextValue<any, import("@reduxjs/toolkit").AnyAction>> | undefined; store?: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").AnyAction> | undefined; }>; }; }; declare type PluridRouterPartialProperties = Partial<PluridRouterProperties<PluridReactComponent>>; export { PluridApplication, PluridRouterBrowser, PluridRouterStatic, PluridProvider, PluridLink, PluridRouterLink, PluridApplicationConfigurator, PluridPlaneConfigurator, PluridExternalPlane, PluridIframePlane, PluridVirtualList, /** Interfaces */ Theme, PluridPlane, PluridView, PluridUniverse, PluridRouterProperties, PluridRouterPartialProperties, PluridRoute, PluridRouteSpace, PluridRouteUniverse, PluridRoutePlane, ComponentWithPlurid, PluridPlaneComponentProperty, PluridRouteComponentProperty, PluridReactComponent, PluridReactPlane, PluridReactPlaneComponent, PluridReactRouteComponent, PluridReactRoute, PluridReactRoutePlane, PluridRouteMatch, PluridPreserve, PluridPreserveTransmission, PluridPubSubPublishMessage, PluridPubSubSubscribeMessage, PluridConfiguration, PluridPartialConfiguration, RecursivePartial, /** Enumerations */ SPACE_LAYOUT, SIZES, TRANSFORM_MODES, TRANSFORM_TOUCHES, PLURID_ROUTER_LOCATION_CHANGED, PLURID_ROUTER_LOCATION_STORED, /** Engine */ PluridIsoMatcher, PluridRouteParser, /** PubSub */ PluridPubSub, PLURID_PUBSUB_TOPIC, /** Server */ serverComputeMetastate, /** Router */ pluridRouterNavigate, usePluridRouter, getDirectPlaneMatch, /** state */ pluridStateModules, internals, }; export default Plurid;