@plurid/plurid-data 0.0.0-0 → 0.0.0-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distribution/constants/index.d.ts +1 -0
- package/distribution/constants/internationalization/index.d.ts +10 -10
- package/distribution/constants/pubsub/index.d.ts +32 -0
- package/distribution/enumerations/general/index.d.ts +68 -0
- package/distribution/enumerations/index.d.ts +1 -68
- package/distribution/index.es.js +1416 -1359
- package/distribution/index.es.js.map +1 -1
- package/distribution/index.js +1479 -1353
- package/distribution/index.js.map +1 -1
- package/distribution/interfaces/external/application/index.d.ts +40 -7
- package/distribution/interfaces/external/cluster/index.d.ts +3 -3
- package/distribution/interfaces/external/component/index.d.ts +18 -39
- package/distribution/interfaces/external/configuration/index.d.ts +12 -5
- package/distribution/interfaces/external/configurator/index.d.ts +1 -1
- package/distribution/interfaces/external/index.d.ts +4 -0
- package/distribution/interfaces/external/layout/index.d.ts +1 -2
- package/distribution/interfaces/external/link/index.d.ts +3 -4
- package/distribution/interfaces/external/plane/index.d.ts +32 -15
- package/distribution/interfaces/external/pubsub/index.d.ts +11 -0
- package/distribution/interfaces/external/pubsub/message.d.ts +233 -0
- package/distribution/interfaces/external/registrar/index.d.ts +7 -0
- package/distribution/interfaces/external/router/fragment/index.d.ts +18 -0
- package/distribution/interfaces/external/router/index.d.ts +19 -210
- package/distribution/interfaces/external/router/multispace/index.d.ts +14 -0
- package/distribution/interfaces/external/router/preserve/index.d.ts +70 -0
- package/distribution/interfaces/external/router/route/index.d.ts +163 -0
- package/distribution/interfaces/external/routing/index.d.ts +58 -0
- package/distribution/interfaces/external/universe/index.d.ts +3 -3
- package/distribution/interfaces/external/window/index.d.ts +4 -0
- package/distribution/interfaces/internal/context/index.d.ts +10 -5
- package/distribution/interfaces/internal/plane/index.d.ts +2 -3
- package/distribution/interfaces/internal/state/index.d.ts +9 -11
- package/distribution/interfaces/internal/universe/index.d.ts +4 -4
- package/package.json +15 -11
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PluridState } from '../../internal/state';
|
|
2
2
|
import { PluridPlane, PluridPlaneContext } from '../plane';
|
|
3
|
-
import { PluridComponent } from '../component';
|
|
4
3
|
import { PluridView } from '../view';
|
|
5
4
|
import { PluridPartialConfiguration } from '../configuration';
|
|
6
5
|
import { IndexedPluridPlane } from '../plane';
|
|
7
|
-
|
|
6
|
+
import { PluridPubSub } from '../pubsub';
|
|
7
|
+
import { PluridPlanesRegistrar } from '../registrar';
|
|
8
|
+
import { IsoMatcherRouteResult } from '../routing';
|
|
9
|
+
export interface PluridApplication<C> {
|
|
8
10
|
id?: string;
|
|
9
|
-
indexedPlanes?: Map<string, IndexedPluridPlane
|
|
11
|
+
indexedPlanes?: Map<string, IndexedPluridPlane<C>>;
|
|
10
12
|
planesProperties?: Map<string, any>;
|
|
11
13
|
/**
|
|
12
14
|
* The planes which will be rendered by the `PluridApplication`.
|
|
13
15
|
*/
|
|
14
|
-
planes?: PluridPlane[];
|
|
16
|
+
planes?: PluridPlane<C>[];
|
|
15
17
|
/**
|
|
16
18
|
* Optional context for the plane to have access to.
|
|
17
19
|
*/
|
|
@@ -23,12 +25,20 @@ export interface PluridApplication {
|
|
|
23
25
|
/**
|
|
24
26
|
* Routes of the planes in view on the initial rendering.
|
|
25
27
|
*/
|
|
26
|
-
view
|
|
28
|
+
view: PluridApplicationView;
|
|
27
29
|
/**
|
|
28
30
|
* Show or not the default Plane Not Found component, or pass a custom component.
|
|
31
|
+
*
|
|
29
32
|
* Default `true`.
|
|
30
33
|
*/
|
|
31
|
-
|
|
34
|
+
planeNotFound?: boolean | C;
|
|
35
|
+
/**
|
|
36
|
+
* Use or not Plurid Plane Error Boundary and show the default Plurid Plane Render Error component,
|
|
37
|
+
* or pass a custom component.
|
|
38
|
+
*
|
|
39
|
+
* Default `true`.
|
|
40
|
+
*/
|
|
41
|
+
planeRenderError?: boolean | C;
|
|
32
42
|
/**
|
|
33
43
|
* Application-wide partial configuration.
|
|
34
44
|
*/
|
|
@@ -41,4 +51,27 @@ export interface PluridApplication {
|
|
|
41
51
|
* Render the application statically.
|
|
42
52
|
*/
|
|
43
53
|
static?: boolean;
|
|
54
|
+
precomputedState?: Partial<PluridState>;
|
|
55
|
+
planesRegistrar?: PluridPlanesRegistrar<C>;
|
|
56
|
+
/**
|
|
57
|
+
* Save plurid application state to local storage,
|
|
58
|
+
* and load from local storage at startup.
|
|
59
|
+
*
|
|
60
|
+
* If multiple plurid applications run on the same origin,
|
|
61
|
+
* use the `id` property to differentiate between states.
|
|
62
|
+
*
|
|
63
|
+
* `LocalStorageUsage` differentiates between multiple local storages:
|
|
64
|
+
* for view, for user interface configuration.
|
|
65
|
+
*/
|
|
66
|
+
useLocalStorage?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Replace the internal plurid plane with a custom implementation.
|
|
69
|
+
*/
|
|
70
|
+
customPlane?: C;
|
|
71
|
+
matchedRoute?: IsoMatcherRouteResult<C>;
|
|
72
|
+
}
|
|
73
|
+
export declare type PluridApplicationView = (string | PluridView)[];
|
|
74
|
+
export interface LocalStorageUsage {
|
|
75
|
+
view: boolean;
|
|
76
|
+
ui: boolean;
|
|
44
77
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PluridPlane } from '../plane';
|
|
2
2
|
import { PluridLayout } from '../layout';
|
|
3
|
-
export interface PluridCluster {
|
|
3
|
+
export interface PluridCluster<C> {
|
|
4
4
|
id: string;
|
|
5
5
|
name?: string;
|
|
6
|
-
planes?: PluridPlane[];
|
|
7
|
-
clusters?: PluridCluster[];
|
|
6
|
+
planes?: PluridPlane<C>[];
|
|
7
|
+
clusters?: PluridCluster<C>[];
|
|
8
8
|
layout?: PluridLayout;
|
|
9
9
|
}
|
|
@@ -1,45 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `properties` will be passed to the `element` at runtime.
|
|
7
|
-
*/
|
|
8
|
-
properties?: Record<string, any>;
|
|
1
|
+
import { PluridRouteFragments } from '../router';
|
|
2
|
+
export declare type ComponentWithPlurid<T, W> = T & WithPluridComponentProperty<W>;
|
|
3
|
+
export interface WithPluridComponentProperty<W> {
|
|
4
|
+
plurid: W;
|
|
9
5
|
}
|
|
10
|
-
export declare type
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
export declare type PlaneComponentWithPluridProperty<T> = ComponentWithPlurid<T, PluridPlaneComponentProperty>;
|
|
7
|
+
export declare type RouteComponentWithPluridProperty<T> = ComponentWithPlurid<T, PluridRouteComponentProperty>;
|
|
8
|
+
export interface PluridPlaneComponentProperty {
|
|
9
|
+
route: PluridRouteComponentProperty;
|
|
10
|
+
plane: PluridPlaneComponentPropertyPlane;
|
|
15
11
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
element: React.FC<ReactComponentWithPlurid<any>>;
|
|
23
|
-
}
|
|
24
|
-
export declare type ReactComponentWithPlurid<T> = T & WithPluridComponentProperty;
|
|
25
|
-
export interface WithPluridComponentProperty {
|
|
26
|
-
plurid: PluridComponentProperty;
|
|
27
|
-
}
|
|
28
|
-
export interface PluridComponentProperty {
|
|
29
|
-
metadata: PluridComponentPropertyMetadata;
|
|
30
|
-
route: PluridComponentPropertyRoute;
|
|
31
|
-
}
|
|
32
|
-
export interface PluridComponentPropertyMetadata {
|
|
12
|
+
export interface PluridPlaneComponentPropertyPlane {
|
|
13
|
+
value: string;
|
|
14
|
+
parameters: Record<string, string>;
|
|
15
|
+
query: Record<string, string>;
|
|
16
|
+
fragments: PluridRouteFragments;
|
|
33
17
|
planeID: string;
|
|
34
18
|
parentPlaneID?: string;
|
|
35
19
|
}
|
|
36
|
-
export interface
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
space: RouteDivision;
|
|
41
|
-
universe: RouteDivision;
|
|
42
|
-
cluster: RouteDivision;
|
|
43
|
-
plane: RoutePlaneDivision;
|
|
20
|
+
export interface PluridRouteComponentProperty {
|
|
21
|
+
value: string;
|
|
22
|
+
parameters: Record<string, string>;
|
|
23
|
+
query: Record<string, string>;
|
|
44
24
|
}
|
|
45
|
-
export declare type PluridComponent = PluridComponentElementQL | PluridComponentReact;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Theme, ThemeName } from '@plurid/plurid-themes';
|
|
2
2
|
import { SIZES, TRANSFORM_MODES, TRANSFORM_TOUCHES, TOOLBAR_DRAWERS } from '../../../enumerations';
|
|
3
3
|
import { RecursivePartial } from '../../helpers';
|
|
4
4
|
import { PluridLayout } from '../layout';
|
|
@@ -21,7 +21,7 @@ export interface PluridConfigurationGlobal {
|
|
|
21
21
|
* A theme name based on plurid themes, https://meta.plurid.com/themes,
|
|
22
22
|
* or specific theme names/objects for `general` and for the `interaction` elements.
|
|
23
23
|
*/
|
|
24
|
-
theme:
|
|
24
|
+
theme: ThemeName | PluridConfigurationTheme;
|
|
25
25
|
/**
|
|
26
26
|
* Supported languages:
|
|
27
27
|
*
|
|
@@ -56,8 +56,8 @@ export interface PluridConfigurationGlobal {
|
|
|
56
56
|
render: 'plurid' | 'legacy';
|
|
57
57
|
}
|
|
58
58
|
export interface PluridConfigurationTheme {
|
|
59
|
-
general:
|
|
60
|
-
interaction:
|
|
59
|
+
general: ThemeName | Theme;
|
|
60
|
+
interaction: ThemeName | Theme;
|
|
61
61
|
}
|
|
62
62
|
export interface PluridConfigurationSpace {
|
|
63
63
|
layout: PluridLayout;
|
|
@@ -95,6 +95,12 @@ export interface PluridConfigurationSpace {
|
|
|
95
95
|
transformTouch: keyof typeof TRANSFORM_TOUCHES;
|
|
96
96
|
firstPerson: boolean;
|
|
97
97
|
cullingDistance: number;
|
|
98
|
+
/**
|
|
99
|
+
* Time for the planes to fade in, in milliseconds.
|
|
100
|
+
*
|
|
101
|
+
* Default 1500
|
|
102
|
+
*/
|
|
103
|
+
fadeInTime: number;
|
|
98
104
|
}
|
|
99
105
|
export interface PluridConfigurationSpaceTransformOrigin {
|
|
100
106
|
show: boolean;
|
|
@@ -121,7 +127,8 @@ export interface PluridConfigurationElementsToolbar {
|
|
|
121
127
|
conceal: boolean;
|
|
122
128
|
transformIcons: boolean;
|
|
123
129
|
transformButtons: boolean;
|
|
124
|
-
|
|
130
|
+
drawers: (keyof typeof TOOLBAR_DRAWERS)[];
|
|
131
|
+
toggledDrawers: (keyof typeof TOOLBAR_DRAWERS)[];
|
|
125
132
|
}
|
|
126
133
|
export interface PluridConfigurationElementsViewcube {
|
|
127
134
|
show: boolean;
|
|
@@ -8,6 +8,10 @@ export * from './layout';
|
|
|
8
8
|
export * from './link';
|
|
9
9
|
export * from './metastate';
|
|
10
10
|
export * from './plane';
|
|
11
|
+
export * from './pubsub';
|
|
12
|
+
export * from './registrar';
|
|
11
13
|
export * from './router';
|
|
14
|
+
export * from './routing';
|
|
12
15
|
export * from './universe';
|
|
13
16
|
export * from './view';
|
|
17
|
+
export * from './window';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LAYOUT_TYPES } from '../../../enumerations';
|
|
2
|
-
interface Layout {
|
|
2
|
+
export interface Layout {
|
|
3
3
|
type: keyof typeof LAYOUT_TYPES;
|
|
4
4
|
}
|
|
5
5
|
export interface LayoutMeta extends Layout {
|
|
@@ -157,4 +157,3 @@ export interface LayoutSheaves extends Layout {
|
|
|
157
157
|
offsetY?: number;
|
|
158
158
|
}
|
|
159
159
|
export declare type PluridLayout = LayoutColumns | LayoutRows | LayoutZigZag | LayoutFaceToFace | LayoutSheaves | LayoutMeta;
|
|
160
|
-
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
export interface PluridLink {
|
|
2
|
+
export interface PluridLink<C> {
|
|
4
3
|
/**
|
|
5
4
|
* The route of the plane.
|
|
6
5
|
*
|
|
@@ -121,13 +120,13 @@ export interface PluridLink {
|
|
|
121
120
|
/**
|
|
122
121
|
* Show or not the default Not Found component, or pass a custom component
|
|
123
122
|
*/
|
|
124
|
-
notFound?: boolean |
|
|
123
|
+
notFound?: boolean | C;
|
|
125
124
|
preview?: boolean;
|
|
126
125
|
previewFadeIn?: number;
|
|
127
126
|
previewFadeOut?: number;
|
|
128
127
|
previewOffsetX?: number;
|
|
129
128
|
previewOffsetY?: number;
|
|
130
|
-
previewComponent?:
|
|
129
|
+
previewComponent?: C;
|
|
131
130
|
style?: React.CSSProperties;
|
|
132
131
|
className?: string;
|
|
133
132
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { PluridRouteParameter, PluridRouteFragments } from '../router';
|
|
3
|
+
export interface PluridPlaneOptions {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Constraints for the parameters.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
parameters?: Record<string, PluridRouteParameter>;
|
|
8
|
+
}
|
|
9
|
+
export interface PluridPlaneObject<C> extends PluridPlaneOptions {
|
|
8
10
|
/**
|
|
9
11
|
* Route to the plane, e.g. `/plane-1`. By convention, it starts with an '/'.
|
|
10
12
|
*
|
|
@@ -33,9 +35,28 @@ export interface PluridPlane {
|
|
|
33
35
|
*
|
|
34
36
|
*/
|
|
35
37
|
route: string;
|
|
38
|
+
/**
|
|
39
|
+
* Component to be rendered in the PluridPlane.
|
|
40
|
+
*/
|
|
41
|
+
component: C;
|
|
36
42
|
}
|
|
43
|
+
export declare type PluridPlaneTuple<C> = [
|
|
44
|
+
/**
|
|
45
|
+
* See `PluridPlaneObject<C>.route`.
|
|
46
|
+
*/
|
|
47
|
+
route: string,
|
|
48
|
+
/**
|
|
49
|
+
* See `PluridPlaneObject<C>.component`.
|
|
50
|
+
*/
|
|
51
|
+
component: C,
|
|
52
|
+
/**
|
|
53
|
+
* See `PluridPlaneOptions`.
|
|
54
|
+
*/
|
|
55
|
+
options?: PluridPlaneOptions
|
|
56
|
+
];
|
|
57
|
+
export declare type PluridPlane<C> = PluridPlaneObject<C> | PluridPlaneTuple<C>;
|
|
37
58
|
export declare type PluridPlaneContext<T> = React.Context<T>;
|
|
38
|
-
export interface IndexedPluridPlane {
|
|
59
|
+
export interface IndexedPluridPlane<C> {
|
|
39
60
|
protocol: string;
|
|
40
61
|
host: string;
|
|
41
62
|
path: string;
|
|
@@ -44,21 +65,17 @@ export interface IndexedPluridPlane {
|
|
|
44
65
|
cluster: string;
|
|
45
66
|
plane: string;
|
|
46
67
|
route: string;
|
|
47
|
-
component:
|
|
68
|
+
component: C;
|
|
48
69
|
}
|
|
49
70
|
export interface RouteSegment {
|
|
50
71
|
[key: string]: any;
|
|
51
72
|
}
|
|
52
|
-
export interface RegisteredPluridPlane {
|
|
73
|
+
export interface RegisteredPluridPlane<C> {
|
|
53
74
|
route: {
|
|
54
|
-
protocol: RouteSegment;
|
|
55
|
-
host: RouteSegment;
|
|
56
|
-
path: RouteSegment;
|
|
57
|
-
space: RouteSegment;
|
|
58
|
-
universe: RouteSegment;
|
|
59
|
-
cluster: RouteSegment;
|
|
60
|
-
plane: RouteSegment;
|
|
61
75
|
absolute: string;
|
|
76
|
+
fragments: PluridRouteFragments;
|
|
77
|
+
parameters: Record<string, string>;
|
|
78
|
+
query: Record<string, string>;
|
|
62
79
|
};
|
|
63
|
-
component:
|
|
80
|
+
component: C;
|
|
64
81
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PluridPubSubTopicKeysType } from "../../../constants/pubsub";
|
|
2
|
+
import { PluridPubSubPublishMessage, PluridPubSubSubscribeMessage } from './message';
|
|
3
|
+
export * from './message';
|
|
4
|
+
export interface PluridPubSubOptions {
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface PluridPubSub {
|
|
8
|
+
publish(message: PluridPubSubPublishMessage): void;
|
|
9
|
+
subscribe(message: PluridPubSubSubscribeMessage): number;
|
|
10
|
+
unsubscribe(index: number, topic: PluridPubSubTopicKeysType): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { PLURID_PUBSUB_TOPIC } from "../../../constants/pubsub";
|
|
2
|
+
import { PluridPartialConfiguration } from "../configuration";
|
|
3
|
+
export declare type PluridPubSubCallback<D = any> = (data: D) => void;
|
|
4
|
+
export interface PluridPubSubDataValueNumber {
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PluridPubSubDataValueString {
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PluridPubSubPublishMessageConfiguration {
|
|
11
|
+
topic: typeof PLURID_PUBSUB_TOPIC.CONFIGURATION;
|
|
12
|
+
data: PluridPartialConfiguration;
|
|
13
|
+
}
|
|
14
|
+
export interface PluridPubSubSubscribeMessageConfiguration {
|
|
15
|
+
topic: typeof PLURID_PUBSUB_TOPIC.CONFIGURATION;
|
|
16
|
+
callback: PluridPubSubCallback<PluridPartialConfiguration>;
|
|
17
|
+
}
|
|
18
|
+
export interface PluridPubSubPublishMessageSpaceAnimatedTransform {
|
|
19
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM;
|
|
20
|
+
data: any;
|
|
21
|
+
}
|
|
22
|
+
export interface PluridPubSubSubscribeMessageSpaceAnimatedTransform {
|
|
23
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ANIMATED_TRANSFORM;
|
|
24
|
+
callback: PluridPubSubCallback<any>;
|
|
25
|
+
}
|
|
26
|
+
export interface PluridPubSubPublishMessageSpaceRotateUp {
|
|
27
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_UP;
|
|
28
|
+
data: PluridPubSubDataValueNumber;
|
|
29
|
+
}
|
|
30
|
+
export interface PluridPubSubPublishMessageSpaceRotateDown {
|
|
31
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_DOWN;
|
|
32
|
+
data: PluridPubSubDataValueNumber;
|
|
33
|
+
}
|
|
34
|
+
export interface PluridPubSubPublishMessageSpaceRotateLeft {
|
|
35
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_LEFT;
|
|
36
|
+
data: PluridPubSubDataValueNumber;
|
|
37
|
+
}
|
|
38
|
+
export interface PluridPubSubPublishMessageSpaceRotateRight {
|
|
39
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_RIGHT;
|
|
40
|
+
data: PluridPubSubDataValueNumber;
|
|
41
|
+
}
|
|
42
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateUp {
|
|
43
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_UP;
|
|
44
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
45
|
+
}
|
|
46
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateDown {
|
|
47
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_DOWN;
|
|
48
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
49
|
+
}
|
|
50
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateLeft {
|
|
51
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_LEFT;
|
|
52
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
53
|
+
}
|
|
54
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateRight {
|
|
55
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_RIGHT;
|
|
56
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
57
|
+
}
|
|
58
|
+
export interface PluridPubSubPublishMessageSpaceRotateXWith {
|
|
59
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH;
|
|
60
|
+
data: PluridPubSubDataValueNumber;
|
|
61
|
+
}
|
|
62
|
+
export interface PluridPubSubPublishMessageSpaceRotateYWith {
|
|
63
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH;
|
|
64
|
+
data: PluridPubSubDataValueNumber;
|
|
65
|
+
}
|
|
66
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateXWith {
|
|
67
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_WITH;
|
|
68
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
69
|
+
}
|
|
70
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateYWith {
|
|
71
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_WITH;
|
|
72
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
73
|
+
}
|
|
74
|
+
export interface PluridPubSubPublishMessageSpaceRotateXTo {
|
|
75
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO;
|
|
76
|
+
data: PluridPubSubDataValueNumber;
|
|
77
|
+
}
|
|
78
|
+
export interface PluridPubSubPublishMessageSpaceRotateYTo {
|
|
79
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO;
|
|
80
|
+
data: PluridPubSubDataValueNumber;
|
|
81
|
+
}
|
|
82
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateXTo {
|
|
83
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_X_TO;
|
|
84
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
85
|
+
}
|
|
86
|
+
export interface PluridPubSubSubscribeMessageSpaceRotateYTo {
|
|
87
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_ROTATE_Y_TO;
|
|
88
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
89
|
+
}
|
|
90
|
+
export interface PluridPubSubPublishMessageSpaceTranslateUp {
|
|
91
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_UP;
|
|
92
|
+
data: PluridPubSubDataValueNumber;
|
|
93
|
+
}
|
|
94
|
+
export interface PluridPubSubPublishMessageSpaceTranslateDown {
|
|
95
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_DOWN;
|
|
96
|
+
data: PluridPubSubDataValueNumber;
|
|
97
|
+
}
|
|
98
|
+
export interface PluridPubSubPublishMessageSpaceTranslateLeft {
|
|
99
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_LEFT;
|
|
100
|
+
data: PluridPubSubDataValueNumber;
|
|
101
|
+
}
|
|
102
|
+
export interface PluridPubSubPublishMessageSpaceTranslateRight {
|
|
103
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_RIGHT;
|
|
104
|
+
data: PluridPubSubDataValueNumber;
|
|
105
|
+
}
|
|
106
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateUp {
|
|
107
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_UP;
|
|
108
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
109
|
+
}
|
|
110
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateDown {
|
|
111
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_DOWN;
|
|
112
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
113
|
+
}
|
|
114
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateLeft {
|
|
115
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_LEFT;
|
|
116
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
117
|
+
}
|
|
118
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateRight {
|
|
119
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_RIGHT;
|
|
120
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
121
|
+
}
|
|
122
|
+
export interface PluridPubSubPublishMessageSpaceTranslateXWith {
|
|
123
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH;
|
|
124
|
+
data: PluridPubSubDataValueNumber;
|
|
125
|
+
}
|
|
126
|
+
export interface PluridPubSubPublishMessageSpaceTranslateYWith {
|
|
127
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH;
|
|
128
|
+
data: PluridPubSubDataValueNumber;
|
|
129
|
+
}
|
|
130
|
+
export interface PluridPubSubPublishMessageSpaceTranslateZWith {
|
|
131
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_WITH;
|
|
132
|
+
data: PluridPubSubDataValueNumber;
|
|
133
|
+
}
|
|
134
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateXWith {
|
|
135
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_WITH;
|
|
136
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
137
|
+
}
|
|
138
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateYWith {
|
|
139
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_WITH;
|
|
140
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
141
|
+
}
|
|
142
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateZWith {
|
|
143
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_WITH;
|
|
144
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
145
|
+
}
|
|
146
|
+
export interface PluridPubSubPublishMessageSpaceTranslateXTo {
|
|
147
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_TO;
|
|
148
|
+
data: PluridPubSubDataValueNumber;
|
|
149
|
+
}
|
|
150
|
+
export interface PluridPubSubPublishMessageSpaceTranslateYTo {
|
|
151
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_TO;
|
|
152
|
+
data: PluridPubSubDataValueNumber;
|
|
153
|
+
}
|
|
154
|
+
export interface PluridPubSubPublishMessageSpaceTranslateZTo {
|
|
155
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_TO;
|
|
156
|
+
data: PluridPubSubDataValueNumber;
|
|
157
|
+
}
|
|
158
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateXTo {
|
|
159
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_X_TO;
|
|
160
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
161
|
+
}
|
|
162
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateYTo {
|
|
163
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Y_TO;
|
|
164
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
165
|
+
}
|
|
166
|
+
export interface PluridPubSubSubscribeMessageSpaceTranslateZTo {
|
|
167
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSLATE_Z_TO;
|
|
168
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
169
|
+
}
|
|
170
|
+
export interface PluridPubSubPublishMessageSpaceScaleUp {
|
|
171
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_UP;
|
|
172
|
+
data: PluridPubSubDataValueNumber;
|
|
173
|
+
}
|
|
174
|
+
export interface PluridPubSubPublishMessageSpaceScaleDown {
|
|
175
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_DOWN;
|
|
176
|
+
data: PluridPubSubDataValueNumber;
|
|
177
|
+
}
|
|
178
|
+
export interface PluridPubSubPublishMessageSpaceScaleWith {
|
|
179
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_WITH;
|
|
180
|
+
data: PluridPubSubDataValueNumber;
|
|
181
|
+
}
|
|
182
|
+
export interface PluridPubSubSubscribeMessageSpaceScaleUp {
|
|
183
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_UP;
|
|
184
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
185
|
+
}
|
|
186
|
+
export interface PluridPubSubSubscribeMessageSpaceScaleDown {
|
|
187
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_DOWN;
|
|
188
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
189
|
+
}
|
|
190
|
+
export interface PluridPubSubSubscribeMessageSpaceScaleWith {
|
|
191
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_SCALE_WITH;
|
|
192
|
+
callback: PluridPubSubCallback<PluridPubSubDataValueNumber>;
|
|
193
|
+
}
|
|
194
|
+
export interface PluridPubSubPublishMessageSpaceTransform {
|
|
195
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM;
|
|
196
|
+
data: any;
|
|
197
|
+
}
|
|
198
|
+
export interface PluridPubSubSubscribeMessageSpaceTransform {
|
|
199
|
+
topic: typeof PLURID_PUBSUB_TOPIC.SPACE_TRANSFORM;
|
|
200
|
+
callback: PluridPubSubCallback<any>;
|
|
201
|
+
}
|
|
202
|
+
export interface PluridPubSubMessageViewAddPlaneData {
|
|
203
|
+
plane: string;
|
|
204
|
+
}
|
|
205
|
+
export interface PluridPubSubPublishMessageViewAddPlane {
|
|
206
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE;
|
|
207
|
+
data: PluridPubSubMessageViewAddPlaneData;
|
|
208
|
+
}
|
|
209
|
+
export interface PluridPubSubSubscribeMessageViewAddPlane {
|
|
210
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_ADD_PLANE;
|
|
211
|
+
callback: PluridPubSubCallback<PluridPubSubMessageViewAddPlaneData>;
|
|
212
|
+
}
|
|
213
|
+
export interface PluridPubSubPublishMessageViewSetPlanes {
|
|
214
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES;
|
|
215
|
+
data: any;
|
|
216
|
+
}
|
|
217
|
+
export interface PluridPubSubSubscribeMessageViewSetPlanes {
|
|
218
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_SET_PLANES;
|
|
219
|
+
callback: PluridPubSubCallback<any>;
|
|
220
|
+
}
|
|
221
|
+
export interface PluridPubSubMessageViewRemovePlaneData {
|
|
222
|
+
plane: string;
|
|
223
|
+
}
|
|
224
|
+
export interface PluridPubSubPublishMessageViewRemovePlane {
|
|
225
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE;
|
|
226
|
+
data: PluridPubSubMessageViewRemovePlaneData;
|
|
227
|
+
}
|
|
228
|
+
export interface PluridPubSubSubscribeMessageViewRemovePlane {
|
|
229
|
+
topic: typeof PLURID_PUBSUB_TOPIC.VIEW_REMOVE_PLANE;
|
|
230
|
+
callback: PluridPubSubCallback<PluridPubSubMessageViewRemovePlaneData>;
|
|
231
|
+
}
|
|
232
|
+
export declare type PluridPubSubPublishMessage = PluridPubSubPublishMessageConfiguration | PluridPubSubPublishMessageSpaceAnimatedTransform | PluridPubSubPublishMessageSpaceRotateUp | PluridPubSubPublishMessageSpaceRotateDown | PluridPubSubPublishMessageSpaceRotateLeft | PluridPubSubPublishMessageSpaceRotateRight | PluridPubSubPublishMessageSpaceRotateXWith | PluridPubSubPublishMessageSpaceRotateYWith | PluridPubSubPublishMessageSpaceRotateXTo | PluridPubSubPublishMessageSpaceRotateYTo | PluridPubSubPublishMessageSpaceTranslateUp | PluridPubSubPublishMessageSpaceTranslateDown | PluridPubSubPublishMessageSpaceTranslateLeft | PluridPubSubPublishMessageSpaceTranslateRight | PluridPubSubPublishMessageSpaceTranslateXWith | PluridPubSubPublishMessageSpaceTranslateYWith | PluridPubSubPublishMessageSpaceTranslateZWith | PluridPubSubPublishMessageSpaceTranslateXTo | PluridPubSubPublishMessageSpaceTranslateYTo | PluridPubSubPublishMessageSpaceTranslateZTo | PluridPubSubPublishMessageSpaceScaleUp | PluridPubSubPublishMessageSpaceScaleDown | PluridPubSubPublishMessageSpaceScaleWith | PluridPubSubPublishMessageSpaceTransform | PluridPubSubPublishMessageViewAddPlane | PluridPubSubPublishMessageViewSetPlanes | PluridPubSubPublishMessageViewRemovePlane;
|
|
233
|
+
export declare type PluridPubSubSubscribeMessage = PluridPubSubSubscribeMessageConfiguration | PluridPubSubSubscribeMessageSpaceAnimatedTransform | PluridPubSubSubscribeMessageSpaceRotateUp | PluridPubSubSubscribeMessageSpaceRotateDown | PluridPubSubSubscribeMessageSpaceRotateLeft | PluridPubSubSubscribeMessageSpaceRotateRight | PluridPubSubSubscribeMessageSpaceRotateXWith | PluridPubSubSubscribeMessageSpaceRotateYWith | PluridPubSubSubscribeMessageSpaceRotateXTo | PluridPubSubSubscribeMessageSpaceRotateYTo | PluridPubSubSubscribeMessageSpaceTranslateUp | PluridPubSubSubscribeMessageSpaceTranslateDown | PluridPubSubSubscribeMessageSpaceTranslateLeft | PluridPubSubSubscribeMessageSpaceTranslateRight | PluridPubSubSubscribeMessageSpaceTranslateXWith | PluridPubSubSubscribeMessageSpaceTranslateYWith | PluridPubSubSubscribeMessageSpaceTranslateZWith | PluridPubSubSubscribeMessageSpaceTranslateXTo | PluridPubSubSubscribeMessageSpaceTranslateYTo | PluridPubSubSubscribeMessageSpaceTranslateZTo | PluridPubSubSubscribeMessageSpaceScaleUp | PluridPubSubSubscribeMessageSpaceScaleDown | PluridPubSubSubscribeMessageSpaceScaleWith | PluridPubSubSubscribeMessageSpaceTransform | PluridPubSubSubscribeMessageViewAddPlane | PluridPubSubSubscribeMessageViewSetPlanes | PluridPubSubSubscribeMessageViewRemovePlane;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PluridPlane, RegisteredPluridPlane } from '../plane';
|
|
2
|
+
export interface PluridPlanesRegistrar<C> {
|
|
3
|
+
register(planes: PluridPlane<C>[]): void;
|
|
4
|
+
identify(): string[];
|
|
5
|
+
get(route: string): RegisteredPluridPlane<C> | undefined;
|
|
6
|
+
getAll(): Map<string, RegisteredPluridPlane<C>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PluridRouteFragments {
|
|
2
|
+
texts: PluridRouteFragmentText[];
|
|
3
|
+
elements: PluridRouteFragmentElement[];
|
|
4
|
+
}
|
|
5
|
+
export interface PluridRouteFragment {
|
|
6
|
+
type: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PluridRouteFragmentText extends PluridRouteFragment {
|
|
9
|
+
type: 'text';
|
|
10
|
+
start: string;
|
|
11
|
+
end: string;
|
|
12
|
+
occurence: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PluridRouteFragmentElement extends PluridRouteFragment {
|
|
15
|
+
type: 'element';
|
|
16
|
+
id: string;
|
|
17
|
+
occurence: number;
|
|
18
|
+
}
|