@plurid/plurid-data 0.0.0-20 → 0.0.0-22

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.
Files changed (71) hide show
  1. package/distribution/index.d.mts +2702 -0
  2. package/distribution/index.d.ts +2702 -3
  3. package/distribution/index.js +1699 -1681
  4. package/distribution/index.js.map +1 -1
  5. package/distribution/index.mjs +1762 -0
  6. package/distribution/index.mjs.map +1 -0
  7. package/package.json +64 -62
  8. package/distribution/constants/compare/index.d.ts +0 -2
  9. package/distribution/constants/configuration/index.d.ts +0 -15
  10. package/distribution/constants/defaults/index.d.ts +0 -22
  11. package/distribution/constants/entities/index.d.ts +0 -18
  12. package/distribution/constants/events/index.d.ts +0 -2
  13. package/distribution/constants/general/index.d.ts +0 -6
  14. package/distribution/constants/index.d.ts +0 -13
  15. package/distribution/constants/internationalization/chinese/index.d.ts +0 -3
  16. package/distribution/constants/internationalization/english/index.d.ts +0 -3
  17. package/distribution/constants/internationalization/fields.d.ts +0 -83
  18. package/distribution/constants/internationalization/french/index.d.ts +0 -3
  19. package/distribution/constants/internationalization/german/index.d.ts +0 -3
  20. package/distribution/constants/internationalization/hindi/index.d.ts +0 -3
  21. package/distribution/constants/internationalization/index.d.ts +0 -95
  22. package/distribution/constants/internationalization/italian/index.d.ts +0 -3
  23. package/distribution/constants/internationalization/japanese/index.d.ts +0 -3
  24. package/distribution/constants/internationalization/languages.d.ts +0 -3
  25. package/distribution/constants/internationalization/romanian/index.d.ts +0 -3
  26. package/distribution/constants/internationalization/russian/index.d.ts +0 -3
  27. package/distribution/constants/internationalization/spanish/index.d.ts +0 -3
  28. package/distribution/constants/keys/index.d.ts +0 -2
  29. package/distribution/constants/protocols/index.d.ts +0 -9
  30. package/distribution/constants/pubsub/index.d.ts +0 -40
  31. package/distribution/constants/shortcuts/index.d.ts +0 -16
  32. package/distribution/constants/space/index.d.ts +0 -8
  33. package/distribution/constants/tree/index.d.ts +0 -2
  34. package/distribution/enumerations/general/index.d.ts +0 -77
  35. package/distribution/enumerations/index.d.ts +0 -1
  36. package/distribution/index.es.js +0 -1680
  37. package/distribution/index.es.js.map +0 -1
  38. package/distribution/interfaces/external/animation/index.d.ts +0 -18
  39. package/distribution/interfaces/external/application/index.d.ts +0 -95
  40. package/distribution/interfaces/external/compare/index.d.ts +0 -13
  41. package/distribution/interfaces/external/component/index.d.ts +0 -26
  42. package/distribution/interfaces/external/configuration/index.d.ts +0 -217
  43. package/distribution/interfaces/external/configurator/index.d.ts +0 -11
  44. package/distribution/interfaces/external/index.d.ts +0 -17
  45. package/distribution/interfaces/external/internationalization/index.d.ts +0 -15
  46. package/distribution/interfaces/external/keys/index.d.ts +0 -1
  47. package/distribution/interfaces/external/layout/index.d.ts +0 -159
  48. package/distribution/interfaces/external/link/index.d.ts +0 -131
  49. package/distribution/interfaces/external/metastate/index.d.ts +0 -5
  50. package/distribution/interfaces/external/plane/index.d.ts +0 -69
  51. package/distribution/interfaces/external/pubsub/index.d.ts +0 -10
  52. package/distribution/interfaces/external/pubsub/message.d.ts +0 -326
  53. package/distribution/interfaces/external/registrar/index.d.ts +0 -7
  54. package/distribution/interfaces/external/router/fragment/index.d.ts +0 -18
  55. package/distribution/interfaces/external/router/index.d.ts +0 -83
  56. package/distribution/interfaces/external/router/multispace/index.d.ts +0 -14
  57. package/distribution/interfaces/external/router/preserve/index.d.ts +0 -70
  58. package/distribution/interfaces/external/router/route/index.d.ts +0 -171
  59. package/distribution/interfaces/external/routing/index.d.ts +0 -58
  60. package/distribution/interfaces/external/universe/index.d.ts +0 -20
  61. package/distribution/interfaces/external/view/index.d.ts +0 -18
  62. package/distribution/interfaces/external/window/index.d.ts +0 -4
  63. package/distribution/interfaces/helpers/index.d.ts +0 -10
  64. package/distribution/interfaces/index.d.ts +0 -3
  65. package/distribution/interfaces/internal/context/index.d.ts +0 -16
  66. package/distribution/interfaces/internal/index.d.ts +0 -5
  67. package/distribution/interfaces/internal/shortcuts/index.d.ts +0 -10
  68. package/distribution/interfaces/internal/state/index.d.ts +0 -45
  69. package/distribution/interfaces/internal/transform/index.d.ts +0 -9
  70. package/distribution/interfaces/internal/tree/index.d.ts +0 -106
  71. package/distribution/interfaces/internal/utilities/index.d.ts +0 -19
@@ -1,217 +0,0 @@
1
- import { Theme, ThemeName } from '@plurid/plurid-themes';
2
- import { SIZES, TRANSFORM_MODES, TRANSFORM_TOUCHES, TOOLBAR_DRAWERS } from "../../../enumerations/index";
3
- import { RecursivePartial } from "../../helpers";
4
- import { PluridLayout } from '../layout';
5
- import { InternationalizationLanguageType } from '../internationalization';
6
- export declare type PluridPartialConfiguration = RecursivePartial<PluridConfiguration>;
7
- export interface PluridConfiguration {
8
- global: PluridConfigurationGlobal;
9
- elements: PluridConfigurationElements;
10
- space: PluridConfigurationSpace;
11
- network: PluridConfigurationNetwork;
12
- development: PluridConfigurationDevelopment;
13
- }
14
- export interface PluridConfigurationGlobal {
15
- /**
16
- * Renders the application without any elements
17
- * (toolbar, viewcube, plane controls, switch, etc.).
18
- */
19
- micro: boolean;
20
- /**
21
- * A theme name based on plurid themes, https://meta.plurid.com/themes,
22
- * or specific theme names/objects for `general` and for the `interaction` elements.
23
- */
24
- theme: ThemeName | PluridConfigurationTheme;
25
- /**
26
- * Supported languages:
27
- *
28
- * + `chinese`
29
- * + `english`
30
- * + `french`
31
- * + `german`
32
- * + `hindi`
33
- * + `italian`
34
- * + `japanese`
35
- * + `romanian`
36
- * + `russian`
37
- * + `spanish`
38
- *
39
- */
40
- language: InternationalizationLanguageType;
41
- /**
42
- * Render the elements transparent.
43
- *
44
- * Default: `false`.
45
- */
46
- transparentUI: boolean;
47
- /**
48
- * Render the view as a `plurid` space, or as a `legacy` web page.
49
- *
50
- * When setting to `legacy`, the `switch` configuration element (`elements.switch.show`)
51
- * should also be set to `true`, allowing the user to switch from rendering types
52
- * through the interface.
53
- *
54
- * Default: `plurid`.
55
- */
56
- render: 'plurid' | 'legacy';
57
- }
58
- export interface PluridConfigurationTheme {
59
- general: ThemeName | Theme;
60
- interaction: ThemeName | Theme;
61
- }
62
- export interface PluridConfigurationSpace {
63
- layout: PluridLayout;
64
- /**
65
- * Perspective value. Recommended between 1300 and 2000.
66
- *
67
- * Default `2000`.
68
- */
69
- perspective: number;
70
- /**
71
- * Make the background of the `Plurid Space` opaque.
72
- *
73
- * Default `true`.
74
- */
75
- opaque: boolean;
76
- /**
77
- * ID of the `Plurid Root` on which to point the camera at.
78
- */
79
- camera?: string;
80
- /**
81
- * Centers the camera on the first `Plurid Root Page`,
82
- * or, if camera is set, on the Root indicated by the camera.
83
- */
84
- center: boolean;
85
- transformOrigin: PluridConfigurationSpaceTransformOrigin;
86
- transformLocks: PluridConfigurationSpaceTransformLocks;
87
- /**
88
- * Allow only one type of transformation, or all of them.
89
- */
90
- transformMode: keyof typeof TRANSFORM_MODES;
91
- /**
92
- * Allow multiple types of transformations.
93
- */
94
- transformMultimode: boolean;
95
- transformTouch: keyof typeof TRANSFORM_TOUCHES;
96
- firstPerson: boolean;
97
- cullingDistance: number;
98
- /**
99
- * Time for the planes to fade in, in milliseconds.
100
- *
101
- * Default 1500
102
- */
103
- fadeInTime: number;
104
- }
105
- export interface PluridConfigurationSpaceTransformOrigin {
106
- show: boolean;
107
- size: keyof typeof SIZES;
108
- }
109
- export interface PluridConfigurationSpaceTransformLocks {
110
- rotationX: boolean;
111
- rotationY: boolean;
112
- translationY: boolean;
113
- translationX: boolean;
114
- translationZ: boolean;
115
- scale: boolean;
116
- }
117
- export interface PluridConfigurationElements {
118
- toolbar: PluridConfigurationElementsToolbar;
119
- viewcube: PluridConfigurationElementsViewcube;
120
- plane: PluridConfigurationElementsPlane;
121
- link: PluridConfigurationElementsLink;
122
- switch: PluridConfigurationElementsSwitch;
123
- }
124
- export interface PluridConfigurationElementsToolbar {
125
- show: boolean;
126
- opaque: boolean;
127
- conceal: boolean;
128
- transformIcons: boolean;
129
- transformButtons: boolean;
130
- drawers: (keyof typeof TOOLBAR_DRAWERS)[];
131
- toggledDrawers: (keyof typeof TOOLBAR_DRAWERS)[];
132
- }
133
- export interface PluridConfigurationElementsViewcube {
134
- show: boolean;
135
- opaque: boolean;
136
- conceal: boolean;
137
- /**
138
- * Show the rotation arrow buttons, and the other buttons for translation, scale, and fit view.
139
- */
140
- buttons: boolean;
141
- }
142
- export interface PluridConfigurationElementsPlane {
143
- /**
144
- * Value between `0.00` and `x.00` (floating numbers) or between `0` and `x00` (integers).
145
- *
146
- * The value is based on the current width of the screen and cannot be negative.
147
- *
148
- * `1` and `1.00` are based on screen width.
149
- */
150
- width: number;
151
- /**
152
- * Value between `0.00` and `1.00` (floating numbers).
153
- *
154
- * Default `1.00`.
155
- */
156
- opacity: number;
157
- controls: PluridConfigurationElementsPlaneControls;
158
- }
159
- export interface PluridConfigurationElementsPlaneControls {
160
- show: boolean;
161
- /**
162
- * Show plane title.
163
- */
164
- title: boolean;
165
- pathbar: PluridConfigurationElementsPlaneControlsPathbar;
166
- }
167
- export interface PluridConfigurationElementsPlaneControlsPathbar {
168
- /**
169
- * If true, renders the page path in the controls as a domain URL.
170
- */
171
- domainURL: boolean;
172
- /**
173
- * Executed when the pathbar from the controls has an `change` event.
174
- */
175
- onChange?: (event: any, pageID: string) => void;
176
- /**
177
- * Executed when the pathbar from the controls has an `keyDown` event.
178
- */
179
- onKeyDown?: (event: any, pageID: string) => void;
180
- }
181
- export interface PluridConfigurationElementsLink {
182
- suffix: string;
183
- preview: {
184
- show: boolean;
185
- fadeIn: number;
186
- fadeOut: number;
187
- offsetX: number;
188
- offsetY: number;
189
- };
190
- }
191
- export interface PluridConfigurationElementsSwitch {
192
- /**
193
- * Default: `false`.
194
- */
195
- show: boolean;
196
- }
197
- export interface PluridConfigurationNetwork {
198
- /**
199
- * Default `'https'`.
200
- */
201
- protocol: 'http' | 'https';
202
- /**
203
- * Defaults to the host serving the application (`window.location.host`)
204
- * for the browser environment, and to `'originhost'` for server environments.
205
- */
206
- host: string;
207
- }
208
- export interface PluridConfigurationDevelopment {
209
- /**
210
- * Show debugging information for each plane.
211
- */
212
- planeDebugger: boolean;
213
- /**
214
- * Show debugging information for the space.
215
- */
216
- spaceDebugger: boolean;
217
- }
@@ -1,11 +0,0 @@
1
- import { PluridPubSub } from '../pubsub';
2
- export interface PluridApplicationConfiguratorProperties {
3
- /**
4
- * Publish/Subscribe bus based on `@plurid/plurid-pubsub`.
5
- */
6
- pubsub?: PluridPubSub;
7
- }
8
- export interface PluridPlaneConfiguratorProperties<S> {
9
- theme: string;
10
- style: S;
11
- }
@@ -1,17 +0,0 @@
1
- export * from './application';
2
- export * from './compare';
3
- export * from './component';
4
- export * from './configuration';
5
- export * from './internationalization';
6
- export * from './keys';
7
- export * from './layout';
8
- export * from './link';
9
- export * from './metastate';
10
- export * from './plane';
11
- export * from './pubsub';
12
- export * from './registrar';
13
- export * from './router';
14
- export * from './routing';
15
- export * from './universe';
16
- export * from './view';
17
- export * from './window';
@@ -1,15 +0,0 @@
1
- import internationalizationFields from "../../../constants/internationalization/fields";
2
- export declare type InternationalizationChinese = 'chinese';
3
- export declare type InternationalizationEnglish = 'english';
4
- export declare type InternationalizationFrench = 'french';
5
- export declare type InternationalizationGerman = 'german';
6
- export declare type InternationalizationHindi = 'hindi';
7
- export declare type InternationalizationItalian = 'italian';
8
- export declare type InternationalizationJapanese = 'japanese';
9
- export declare type InternationalizationRomanian = 'romanian';
10
- export declare type InternationalizationRussian = 'russian';
11
- export declare type InternationalizationSpanish = 'spanish';
12
- export declare type InternationalizationLanguageType = InternationalizationChinese | InternationalizationEnglish | InternationalizationFrench | InternationalizationGerman | InternationalizationHindi | InternationalizationItalian | InternationalizationJapanese | InternationalizationRomanian | InternationalizationRussian | InternationalizationSpanish;
13
- export declare type InternationalizationFields = typeof internationalizationFields;
14
- export declare type InternationalizationFieldType = keyof InternationalizationFields;
15
- export declare type Internationalization = Record<InternationalizationFieldType, string>;
@@ -1 +0,0 @@
1
- export declare type KeyModifiers = 'SHIFT' | 'ALT' | 'CTRL' | 'META' | 'CTRLMETA';
@@ -1,159 +0,0 @@
1
- import { LAYOUT_TYPES } from "../../../enumerations/index";
2
- export interface Layout {
3
- type: keyof typeof LAYOUT_TYPES;
4
- }
5
- export interface LayoutMeta extends Layout {
6
- type: LAYOUT_TYPES.META;
7
- layouts: LayoutMetaLayout[];
8
- }
9
- export interface LayoutMetaLayout {
10
- size?: number;
11
- pages?: string[];
12
- layout: LayoutColumns | LayoutRows | LayoutFaceToFace | LayoutZigZag | LayoutSheaves;
13
- }
14
- export interface LayoutColumns extends Layout {
15
- /**
16
- * Layout Top View
17
- *
18
- * ‾1‾ ‾4‾
19
- * ‾2‾ ‾5‾
20
- * ‾3‾
21
- *
22
- */
23
- type: LAYOUT_TYPES.COLUMNS;
24
- /**
25
- * Integer value indicating the number of columns.
26
- *
27
- * If the number of pages is greater than the number of columns,
28
- * the pages will overflow onto the next row.
29
- */
30
- columns?: number;
31
- /**
32
- * Number of planes per column.
33
- */
34
- columnLength?: number;
35
- /**
36
- * Distance between columns.
37
- *
38
- * Value between `0.00` and `x.00` (floating numbers) indicating percent of view width
39
- * or between `0` and `x0...0` (integers) indicating pixel values.
40
- *
41
- * For example:
42
- * `0.5` is 50% of view width,
43
- * `5` is five pixels,
44
- * `1.00` is 100% of view width,
45
- * `1` is one pixels,
46
- * `1.35` is 135% of view width,
47
- * `135` is 135 pixels.
48
- */
49
- gap?: number;
50
- }
51
- export interface LayoutRows extends Layout {
52
- /**
53
- * Layout Top View
54
- *
55
- * ‾1‾ ‾2‾
56
- * ‾3‾ ‾4‾
57
- * ‾5‾
58
- *
59
- */
60
- type: LAYOUT_TYPES.ROWS;
61
- /**
62
- * Integer value indicating the number of rows.
63
- *
64
- * If the number of pages is greater than the number of rows,
65
- * the pages will overflow onto the next column.
66
- */
67
- rows?: number;
68
- /**
69
- * Number of planes per row.
70
- */
71
- rowLength?: number;
72
- /**
73
- * Distance between rows.
74
- *
75
- * Value between `0.00` and `x.00` (floating numbers) indicating percent of view width
76
- * or between `0` and `x0...0` (integers) indicating pixel values.
77
- *
78
- * For example:
79
- * `0.5` is 50% of view width,
80
- * `5` is five pixels,
81
- * `1.00` is 100% of view width,
82
- * `1` is one pixels,
83
- * `1.35` is 135% of view width,
84
- * `135` is 135 pixels.
85
- */
86
- gap?: number;
87
- }
88
- export interface LayoutFaceToFace extends Layout {
89
- /**
90
- * Layout Top View
91
- *
92
- * ╱ ‾‾ ╲
93
- *
94
- * ╱ first plane
95
- *
96
- * — (optional) middle plane(s)
97
- *
98
- * ╲ last plane
99
- */
100
- type: LAYOUT_TYPES.FACE_TO_FACE;
101
- /**
102
- * Angle between the first plane and the last plane of a row.
103
- *
104
- * Value between `0.00` and `360.00`. Recommended between `0` and `180`.
105
- *
106
- * Default is `90`.
107
- */
108
- angle?: number;
109
- /**
110
- * Distance between columns.
111
- *
112
- * Value between `0.00` and `x.00` (floating numbers) indicating percent of view width
113
- * or between `0` and `x0...0` (integers) indicating pixel values.
114
- *
115
- * For example:
116
- * `0.5` is 50% of view width,
117
- * `5` is five pixels,
118
- * `1.00` is 100% of view width,
119
- * `1` is one pixels,
120
- * `1.35` is 135% of view width,
121
- * `135` is 135 pixels.
122
- */
123
- gap?: number;
124
- /**
125
- * Integer value indicating the number of planes (columns) to be inserted in the middle.
126
- *
127
- * Default is `0`.
128
- */
129
- middle?: number;
130
- }
131
- export interface LayoutZigZag extends Layout {
132
- type: LAYOUT_TYPES.ZIG_ZAG;
133
- /**
134
- * Value between `0.00` and `360.00` and can be negative.
135
- */
136
- angle?: number;
137
- }
138
- export interface LayoutSheaves extends Layout {
139
- type: LAYOUT_TYPES.SHEAVES;
140
- /**
141
- * Value between `0.00` and `x.00` (floating numbers) or between `0` and `x00` (integers).
142
- *
143
- * The value is based on the current width of the screen and can be negative.
144
- */
145
- depth?: number;
146
- /**
147
- * Value between `0.00` and `x.00` (floating numbers) or between `0` and `x00` (integers).
148
- *
149
- * The value is based on the current width of the screen and can be negative.
150
- */
151
- offsetX?: number;
152
- /**
153
- * Value between `0.00` and `x.00` (floating numbers) or between `0` and `x00` (integers).
154
- *
155
- * The value is based on the current height of the screen and can be negative.
156
- */
157
- offsetY?: number;
158
- }
159
- export declare type PluridLayout = LayoutColumns | LayoutRows | LayoutZigZag | LayoutFaceToFace | LayoutSheaves | LayoutMeta;
@@ -1,131 +0,0 @@
1
- export interface PluridLink<C, S, M> {
2
- /**
3
- * The route of the plane.
4
- *
5
- * If IDs are provided to the planes, the id of the plane.
6
- *
7
- * The route path can:
8
- *
9
- * * be a simple string,
10
- * e.g. `'/route/to/plane'` or `'/d71b21673037485a'`,
11
- * where `d71b21673037485a` is a generated plane ID;
12
- *
13
- * * be a parametric route,
14
- * e.g. `'/route/to/:plane'`, where `:plane` is the parameter value
15
- * for the parameter defined in the `PluridPage[]`;
16
- *
17
- * * receive query `key=value` pairs,
18
- * e.g. `'/route/to/plane?id=1&show=true'`, where `id=1` and `show=true` are `key=value` pairs
19
- *
20
- * * specify a text fragment,
21
- * e.g. `'/route/to/plane#:~:text=A%20door,is%20opened.,[0]'`,
22
- * where the fragment `#:~:text=A%20door,is%20opened.,[0]`
23
- * is loosely based on the https://github.com/WICG/ScrollToTextFragment specification,
24
- * and indicates the link to bring into view the first occurence `[0]`, if any,
25
- * of the text fragment starting with `A door` and ending with `is opened.`.
26
- *
27
- * * specify a page element,
28
- * e.g. `'/route/to/plane#:~:element=123,[1]'`,
29
- * where the fragment `#:~:element=123,[1]`
30
- * indicates the link to bring into view the second occurence `[1]`, if any,
31
- * of the element with the attribute `data-plurid-element=123`.
32
- *
33
- *
34
- * ### Larger Syntax Structure
35
- *
36
- * The syntax `/plane` is used to reference only the plurid planes within the same plurid space.
37
- *
38
- * In order to reference
39
- *
40
- * + planes within other clusters,
41
- * + planes within other universes,
42
- * + planes within other spaces of the same route,
43
- * + planes within other spaces of a different route,
44
- * + planes within other spaces of a different, controlled origin,
45
- * + planes within other spaces of a different, foreign origins,
46
- *
47
- * the syntax `://` has to be used.
48
- *
49
- *
50
- * A plurid link in the same space, same universe, same cluster.
51
- *
52
- * `://plane`
53
- *
54
- * example: `://dashboard`
55
- *
56
- *
57
- * A plurid link to another cluster in the same universe, in the same space.
58
- *
59
- * `://cluster://plane`
60
- *
61
- * example: `://two://dashboard`
62
- *
63
- *
64
- * A plurid link to another universe in the same space.
65
- *
66
- * `://universe://cluster://page`
67
- *
68
- * example: `://one://two://dashboard`
69
- *
70
- *
71
- * A plurid link to a different space within the same route
72
- *
73
- * `://space://universe://cluster://plane`
74
- *
75
- * example: `://user123://dashboard`
76
- *
77
- *
78
- * A plurid link to a different space within an another route.
79
- *
80
- * `://route://space://universe://cluster://plane`
81
- *
82
- * example: `://payment://user123://dashboard`
83
- *
84
- *
85
- * A plurid link to a different space within a controlled origin.
86
- *
87
- * `https://controlled-origin://route://space://universe://cluster://plane`
88
- *
89
- * example: `https://example-c.com://payment://user123://dashboard`
90
- *
91
- *
92
- * A plurid link to a different space within a foreign origin.
93
- *
94
- * `https://foreign-origin://route://space://universe://cluster://plane`
95
- *
96
- * example: `https://example-f.com://payment://user123://dashboard`
97
- *
98
- *
99
- * To handle clusters of clusters use the `|>` syntax, which shows a nesting of clusters,
100
- * e.g. `://clusterC|>clusterB|>clusterA`,
101
- * denotes that Cluster C includes Cluster B which includes Cluster A.
102
- *
103
- */
104
- route: string;
105
- /**
106
- * Format the link as a simple anchor element. Default `false`.
107
- */
108
- devisible?: boolean;
109
- /**
110
- * String character to be added inline after the PluridLink content. The default is `'`.
111
- *
112
- * If `devisible` the suffix is disabled.
113
- */
114
- suffix?: string;
115
- /**
116
- * Execute function at click (onClick Event).
117
- */
118
- atClick?: (event?: MouseEvent | M) => void;
119
- /**
120
- * Show or not the default Not Found component, or pass a custom component
121
- */
122
- notFound?: boolean | C;
123
- preview?: boolean;
124
- previewFadeIn?: number;
125
- previewFadeOut?: number;
126
- previewOffsetX?: number;
127
- previewOffsetY?: number;
128
- previewComponent?: C;
129
- style?: S;
130
- className?: string;
131
- }
@@ -1,5 +0,0 @@
1
- import { PluridState } from '../../internal/state';
2
- export declare type PluridMetastateState = Pick<PluridState, 'configuration' | 'space' | 'ui'>;
3
- export interface PluridMetastate {
4
- states: Record<string, PluridMetastateState>;
5
- }
@@ -1,69 +0,0 @@
1
- import { PluridRouteParameter, PluridRouteFragments } from '../router';
2
- export interface PluridPlaneOptions {
3
- /**
4
- * Constraints for the parameters.
5
- */
6
- parameters?: Record<string, PluridRouteParameter>;
7
- }
8
- export interface PluridPlaneObject<C> extends PluridPlaneOptions {
9
- /**
10
- * Route to the plane, e.g. `/plane-1`. By convention, it starts with an '/'.
11
- *
12
- * The `route` can be
13
- * + unassigned,
14
- * + assigned,
15
- * + absolute.
16
- *
17
- * The unassigned route respects the format
18
- * `/plane` and will be automatically assigned
19
- * to the `default` space, `default` universe, `default` cluster.
20
- *
21
- * The assigned path respects the format
22
- * `/path://space://universe://cluster://plane`
23
- * and it presupposes the given `protocol` and `host`.
24
- *
25
- * The absolute path respects the format
26
- * `protocol://host://path://space://universe://cluster://plane`
27
- * and is useful for cross-origins requests.
28
- *
29
- * The route can have parameters, e.g. `/plane/:id`.
30
- *
31
- * The parameter, in the example `id`,
32
- * will be passed in the property `plurid.parameters` to the component,
33
- * e.g. `componentProperties.plurid.route.plane.parameters.id`.
34
- *
35
- */
36
- route: string;
37
- /**
38
- * Component to be rendered in the PluridPlane.
39
- */
40
- component: C;
41
- }
42
- export declare type PluridPlaneTuple<C> = [
43
- /**
44
- * See `PluridPlaneObject<C>.route`.
45
- */
46
- route: string,
47
- /**
48
- * See `PluridPlaneObject<C>.component`.
49
- */
50
- component: C,
51
- /**
52
- * See `PluridPlaneOptions`.
53
- */
54
- options?: PluridPlaneOptions
55
- ];
56
- export declare type PluridPlane<C> = PluridPlaneObject<C> | PluridPlaneTuple<C>;
57
- export declare type PluridPlaneContext<T> = any;
58
- export interface RouteSegment {
59
- [key: string]: any;
60
- }
61
- export interface RegisteredPluridPlane<C> {
62
- route: {
63
- absolute: string;
64
- fragments: PluridRouteFragments;
65
- parameters: Record<string, string>;
66
- query: Record<string, string>;
67
- };
68
- component: C;
69
- }
@@ -1,10 +0,0 @@
1
- import { PluridPubSubPublishMessage, PluridPubSubSubscribeMessage } from './message';
2
- export * from './message';
3
- export interface PluridPubSubOptions {
4
- debug?: boolean;
5
- }
6
- export interface PluridPubSub {
7
- publish(message: PluridPubSubPublishMessage): void;
8
- subscribe(message: PluridPubSubSubscribeMessage): string;
9
- unsubscribe(selector: string): boolean;
10
- }