@plurid/plurid-engine 0.0.0-2 → 0.0.0-20

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 (60) hide show
  1. package/distribution/index.d.mts +734 -0
  2. package/distribution/index.d.ts +734 -3
  3. package/distribution/index.js +3317 -2495
  4. package/distribution/index.js.map +1 -1
  5. package/distribution/index.mjs +3426 -0
  6. package/distribution/index.mjs.map +1 -0
  7. package/package.json +71 -79
  8. package/distribution/data/constants/index.d.ts +0 -1
  9. package/distribution/data/interfaces/index.d.ts +0 -4
  10. package/distribution/functions/index.d.ts +0 -2
  11. package/distribution/functions/navigate/index.d.ts +0 -1
  12. package/distribution/functions/template/index.d.ts +0 -1
  13. package/distribution/index.es.js +0 -2590
  14. package/distribution/index.es.js.map +0 -1
  15. package/distribution/modules/general/configuration/index.d.ts +0 -2
  16. package/distribution/modules/general/index.d.ts +0 -3
  17. package/distribution/modules/general/tree/index.d.ts +0 -6
  18. package/distribution/modules/index.d.ts +0 -9
  19. package/distribution/modules/interaction/direction/index.d.ts +0 -2
  20. package/distribution/modules/interaction/index.d.ts +0 -5
  21. package/distribution/modules/interaction/mathematics/matrix/index.d.ts +0 -31
  22. package/distribution/modules/interaction/mathematics/quaternion/index.d.ts +0 -79
  23. package/distribution/modules/interaction/mathematics/transform/index.d.ts +0 -69
  24. package/distribution/modules/internationalization/index.d.ts +0 -3
  25. package/distribution/modules/planes/index.d.ts +0 -2
  26. package/distribution/modules/planes/logic/index.d.ts +0 -6
  27. package/distribution/modules/planes/registrar/index.d.ts +0 -3
  28. package/distribution/modules/planes/registrar/object.d.ts +0 -14
  29. package/distribution/modules/planes/registrar/utilities.d.ts +0 -6
  30. package/distribution/modules/routing/IsoMatcher/index.d.ts +0 -44
  31. package/distribution/modules/routing/IsoMatcher/interfaces.d.ts +0 -57
  32. package/distribution/modules/routing/Parser/index.d.ts +0 -21
  33. package/distribution/modules/routing/Parser/interfaces.d.ts +0 -31
  34. package/distribution/modules/routing/Parser/logic.d.ts +0 -68
  35. package/distribution/modules/routing/index.d.ts +0 -7
  36. package/distribution/modules/routing/logic/general/index.d.ts +0 -6
  37. package/distribution/modules/routing/logic/index.d.ts +0 -3
  38. package/distribution/modules/routing/logic/utilities/index.d.ts +0 -29
  39. package/distribution/modules/routing/logic/validity/index.d.ts +0 -3
  40. package/distribution/modules/space/index.d.ts +0 -6
  41. package/distribution/modules/space/layout/column.d.ts +0 -3
  42. package/distribution/modules/space/layout/faceToFace.d.ts +0 -3
  43. package/distribution/modules/space/layout/index.d.ts +0 -6
  44. package/distribution/modules/space/layout/row.d.ts +0 -3
  45. package/distribution/modules/space/layout/sheaves.d.ts +0 -3
  46. package/distribution/modules/space/layout/zigZag.d.ts +0 -3
  47. package/distribution/modules/space/location/index.d.ts +0 -2
  48. package/distribution/modules/space/location/logic.d.ts +0 -22
  49. package/distribution/modules/space/tree/index.d.ts +0 -3
  50. package/distribution/modules/space/tree/logic.d.ts +0 -32
  51. package/distribution/modules/space/tree/object.d.ts +0 -13
  52. package/distribution/modules/space/utilities/index.d.ts +0 -16
  53. package/distribution/modules/space/view/index.d.ts +0 -2
  54. package/distribution/modules/space/view/logic.d.ts +0 -13
  55. package/distribution/modules/state/compute/index.d.ts +0 -3
  56. package/distribution/modules/state/compute/space/index.d.ts +0 -3
  57. package/distribution/modules/state/compute/themes/index.d.ts +0 -3
  58. package/distribution/modules/state/index.d.ts +0 -3
  59. package/distribution/modules/state/local/index.d.ts +0 -3
  60. package/distribution/modules/utilities/index.d.ts +0 -1
@@ -1,79 +0,0 @@
1
- /**
2
- * Converts degrees to radians.
3
- *
4
- * @param deg
5
- * @returns radians
6
- */
7
- export declare const degToRad: (deg: number) => number;
8
- /**
9
- * Converts radians to degrees.
10
- *
11
- * @param deg
12
- * @returns degrees
13
- */
14
- export declare const radToDeg: (rad: number) => number;
15
- interface Quaternion {
16
- x: number;
17
- y: number;
18
- z: number;
19
- w: number;
20
- }
21
- /**
22
- *
23
- * @param x
24
- * @param y
25
- * @param z
26
- * @param w
27
- * @returns {Quaternion}
28
- */
29
- export declare const makeQuaternion: (x: number, y: number, z: number, w: number) => Quaternion;
30
- /**
31
- * Returns all-fields 0-ed quaternion.
32
- *
33
- * @returns {Quaternion}
34
- */
35
- export declare const zeroQuaternion: () => Quaternion;
36
- /**
37
- *
38
- * @param quaternion
39
- */
40
- export declare function inverseQuaternion(quaternion: Quaternion): Quaternion;
41
- /**
42
- *
43
- * @param quaternion
44
- */
45
- export declare function conjugateQuaternion(quaternion: Quaternion): Quaternion;
46
- /**
47
- * Generates quaternion based on Euler angles (in radians).
48
- *
49
- * @param alpha around Z axis
50
- * @param beta around X axis
51
- * @param gamma around Y axis
52
- * @returns {Quaternion}
53
- */
54
- export declare function computeQuaternionFromEulers(alpha: number, beta: number, gamma: number): Quaternion;
55
- /**
56
- *
57
- * @param x
58
- * @param y
59
- * @param z
60
- * @param angle
61
- */
62
- export declare function quaternionFromAxisAngle(x: number, y: number, z: number, angle: number): Quaternion;
63
- /**
64
- *
65
- * @param quaternionArray
66
- */
67
- export declare function quaternionMultiply(quaternionArray: Quaternion[]): Quaternion;
68
- /**
69
- *
70
- * @param pointRotate
71
- * @param quaternion
72
- */
73
- export declare function rotatePointViaQuaternion(pointRotate: any, quaternion: Quaternion): Quaternion;
74
- /**
75
- *
76
- * @param quaternion
77
- */
78
- export declare function makeRotationMatrixFromQuaternion(quaternion: Quaternion): number[];
79
- export {};
@@ -1,69 +0,0 @@
1
- /**
2
- * Converts the CSS string matrix3d into an array of numbers.
3
- *
4
- * @param matrix3d CSS string obtained from
5
- * window
6
- * .getComputedStyle(element)
7
- * .getPropertyValue('transform').
8
- * @returns Numbers array.
9
- */
10
- export declare function getMatrixValues(matrix3d: string): number[];
11
- /**
12
- * Extracts the rotation matrix from the matrix3d CSS string.
13
- *
14
- * @param matrix3d CSS string obtained from
15
- * window
16
- * .getComputedStyle(element)
17
- * .getPropertyValue("transform").
18
- * @returns Rotation matrix.
19
- */
20
- export declare function getRotationMatrix(matrix3d: string): number[];
21
- /**
22
- * Extracts the translation matrix from the matrix3d CSS string.
23
- *
24
- * @param matrix3d CSS string obtained from
25
- * window
26
- * .getComputedStyle(element)
27
- * .getPropertyValue("transform").
28
- * @returns Translation matrix.
29
- */
30
- export declare function getTranslationMatrix(matrix3d: string): number[];
31
- /**
32
- * Extracts the scalation value from the matrix3d CSS string.
33
- *
34
- * @param matrix3d CSS string obtained from
35
- * window
36
- * .getComputedStyle(element)
37
- * .getPropertyValue("transform").
38
- * @returns Scalation value.
39
- */
40
- export declare function getScalationValue(matrix3d: string): number;
41
- /**
42
- * Returns a a matrix3d CSS string.
43
- *
44
- * @param rotationMatrix
45
- * @param translationMatrix
46
- * @param scalationMatrix
47
- * @returns matrix3d CSS string.
48
- */
49
- export declare function setTransform(rotationMatrix: number[], translationMatrix: number[], scalationMatrix: number[]): string;
50
- interface RotationValues {
51
- rotateX: number;
52
- rotateY: number;
53
- rotateZ: number;
54
- }
55
- export declare function getTransformRotate(matrix3d: string): RotationValues;
56
- interface TranslationValues {
57
- translateX: number;
58
- translateY: number;
59
- translateZ: number;
60
- }
61
- export declare function getTransformTranslate(matrix3d: string): TranslationValues;
62
- interface ScalationValue {
63
- scale: number;
64
- }
65
- export declare function getTransformScale(matrix3d: string): ScalationValue;
66
- export declare function rotatePlurid(matrix3d: string, direction?: string, angleIncrement?: number): string;
67
- export declare function translatePlurid(matrix3d: string, direction?: string, linearIncrement?: number): string;
68
- export declare function scalePlurid(matrix3d: string, direction?: string, scaleIncrement?: number): string;
69
- export {};
@@ -1,3 +0,0 @@
1
- import { InternationalizationLanguageType, InternationalizationFieldType } from '@plurid/plurid-data';
2
- declare const internatiolate: (lamguage: InternationalizationLanguageType, field: InternationalizationFieldType) => string;
3
- export default internatiolate;
@@ -1,2 +0,0 @@
1
- export * from "./logic/index";
2
- export * from "./registrar/index";
@@ -1,6 +0,0 @@
1
- import { PluridPlane, PluridPlaneObject, PluridRoutePlane, PluridRoutePlaneObject, PluridInternalStatePlane, PluridInternalContextPlane } from '@plurid/plurid-data';
2
- export declare const resolvePluridPlaneData: <C>(plane: PluridPlane<C>) => PluridPlaneObject<C>;
3
- export declare const resolvePluridRoutePlaneData: <C>(plane: PluridRoutePlane<C>) => PluridRoutePlaneObject<C>;
4
- export declare const createInternalStatePlane: <C>(plane: PluridPlane<C>) => PluridInternalStatePlane;
5
- export declare const createInternalContextPlane: <C>(plane: PluridPlane<C>) => PluridInternalContextPlane<C>;
6
- export declare const getPluridPlaneIDByData: (element: HTMLElement | null) => any;
@@ -1,3 +0,0 @@
1
- import Registrar from "./object";
2
- export * from "./utilities";
3
- export { Registrar, };
@@ -1,14 +0,0 @@
1
- import { PluridPlane, RegisteredPluridPlane, PluridPlanesRegistrar as IPluridPlanesRegistrar } from '@plurid/plurid-data';
2
- /**
3
- * The planes registrar can be stored in-memory (server-side)
4
- * or on the `window.__pluridPlanesRegistrar__` object (browser-side).
5
- */
6
- declare class PluridPlanesRegistrar<C> implements IPluridPlanesRegistrar<C> {
7
- private isoMatcher;
8
- constructor(planes?: PluridPlane<C>[]);
9
- register(planes: PluridPlane<C>[]): void;
10
- identify(): string[];
11
- get(route: string): RegisteredPluridPlane<C> | undefined;
12
- getAll(): Map<any, any>;
13
- }
14
- export default PluridPlanesRegistrar;
@@ -1,6 +0,0 @@
1
- import { PluridPlane, PluridPlanesRegistrar as IPluridPlanesRegistrar } from '@plurid/plurid-data';
2
- declare const registerPlanes: <C>(planes?: PluridPlane<C>[] | undefined, planesRegistrar?: IPluridPlanesRegistrar<C> | undefined) => void;
3
- declare const getPlanesRegistrar: <C>(planesRegistrar: IPluridPlanesRegistrar<C> | undefined) => IPluridPlanesRegistrar<C> | undefined;
4
- declare const getRegisteredPlanes: <C>(planesRegistrar: IPluridPlanesRegistrar<C> | undefined) => Map<any, any>;
5
- declare const getRegisteredPlane: <C>(route: string, planesRegistrar: IPluridPlanesRegistrar<C> | undefined) => import("@plurid/plurid-data").RegisteredPluridPlane<C> | undefined;
6
- export { registerPlanes, getPlanesRegistrar, getRegisteredPlanes, getRegisteredPlane, };
@@ -1,44 +0,0 @@
1
- import { IsoMatcherData, IsoMatcherIndexedPlane, IsoMatcherPlaneResult, IsoMatcherRouteResult } from "./interfaces";
2
- /**
3
- * The `IsoMatcher` gathers all the known information about `routes` and `planes`
4
- * and matches client-side or server-side, in-browser or in-plurid.
5
- */
6
- declare class IsoMatcher<C> {
7
- private origin;
8
- private routesIndex;
9
- private planesIndex;
10
- private routesKeys;
11
- private planesKeys;
12
- constructor(data: IsoMatcherData<C>, origin?: string);
13
- /**
14
- * Matches a `path` with a known `route` or `plane`,
15
- * based on the strategy imposed by the `context`.
16
- *
17
- * @param path
18
- * @param context
19
- */
20
- match(path: string, context: 'route'): IsoMatcherRouteResult<C> | undefined;
21
- match(path: string): IsoMatcherPlaneResult<C> | undefined;
22
- match(path: string, context: 'plane'): IsoMatcherPlaneResult<C> | undefined;
23
- /**
24
- * Dynammically update the planes and routes indexes.
25
- *
26
- * @param data
27
- */
28
- index(data: IsoMatcherData<C>): void;
29
- /**
30
- * Clear all data.
31
- *
32
- */
33
- clear(): void;
34
- getPlanesIndex(): Map<string, IsoMatcherIndexedPlane<C>>;
35
- /**
36
- * Creates a common data structure able to match and route accordingly.
37
- *
38
- */
39
- private updateIndexes;
40
- private indexPlanes;
41
- private matchPlane;
42
- private matchRoute;
43
- }
44
- export default IsoMatcher;
@@ -1,57 +0,0 @@
1
- import { PluridRoute, PluridRoutePlane, PluridRoutePlaneObject, PluridPlane, PluridPlaneObject, PluridRouteFragments } from '@plurid/plurid-data';
2
- export interface IsoMatcherData<C> {
3
- routes?: PluridRoute<C>[];
4
- routePlanes?: PluridRoutePlane<C>[];
5
- planes?: PluridPlane<C>[];
6
- }
7
- export declare type IsoMatcherContext = 'route' | 'plane';
8
- export interface IsoMatcherResultBase {
9
- value: string;
10
- parameters: Record<string, string>;
11
- query: Record<string, string>;
12
- }
13
- export interface IsoMatcherRouteResultBase {
14
- match: IsoMatcherResultBase;
15
- }
16
- export interface IsoMatcherRouteResultRoute<C> extends IsoMatcherRouteResultBase {
17
- kind: 'Route';
18
- data: PluridRoute<C>;
19
- }
20
- export interface IsoMatcherRouteResultRoutePlane<C> extends IsoMatcherRouteResultBase {
21
- kind: 'RoutePlane';
22
- data: PluridRoutePlaneObject<C>;
23
- }
24
- export declare type IsoMatcherRouteResult<C> = IsoMatcherRouteResultRoute<C> | IsoMatcherRouteResultRoutePlane<C>;
25
- export interface IsoMatcherIndexedRoute<C> {
26
- data: PluridRoute<C>;
27
- }
28
- export declare type IsoMatcherPlaneType = 'Plane' | 'RoutePlane';
29
- export interface IsoMatcherPlaneResultMatch extends IsoMatcherResultBase {
30
- fragments: PluridRouteFragments;
31
- }
32
- export interface IsoMatcherPlaneResultBase<C> {
33
- parent?: string;
34
- match: IsoMatcherPlaneResultMatch;
35
- }
36
- export interface IsoMatcherPlaneResultPlane<C> extends IsoMatcherPlaneResultBase<C> {
37
- kind: 'Plane';
38
- data: PluridPlaneObject<C>;
39
- }
40
- export interface IsoMatcherPlaneResultRoutePlane<C> extends IsoMatcherPlaneResultBase<C> {
41
- kind: 'RoutePlane';
42
- data: PluridRoutePlaneObject<C>;
43
- }
44
- export declare type IsoMatcherPlaneResult<C> = IsoMatcherPlaneResultPlane<C> | IsoMatcherPlaneResultRoutePlane<C>;
45
- export declare type IsoMatcherResult<C> = IsoMatcherRouteResult<C> | IsoMatcherPlaneResult<C>;
46
- export interface IsoMatcherIndexedPlaneBase<C> {
47
- parent?: string;
48
- }
49
- export interface IsoMatcherIndexedPlanePlane<C> extends IsoMatcherIndexedPlaneBase<C> {
50
- kind: 'Plane';
51
- data: PluridPlaneObject<C>;
52
- }
53
- export interface IsoMatcherIndexedPlaneRoutePlane<C> extends IsoMatcherIndexedPlaneBase<C> {
54
- kind: 'RoutePlane';
55
- data: PluridRoutePlaneObject<C>;
56
- }
57
- export declare type IsoMatcherIndexedPlane<C> = IsoMatcherIndexedPlanePlane<C> | IsoMatcherIndexedPlaneRoutePlane<C>;
@@ -1,21 +0,0 @@
1
- import { PluridRoute } from '@plurid/plurid-data';
2
- import { ParserPartialOptions, ParserResponse } from "./interfaces";
3
- export default class Parser<C> {
4
- /** properties */
5
- private location;
6
- private path;
7
- private options;
8
- /** constructor */
9
- constructor(location: string, path: PluridRoute<C>, options?: ParserPartialOptions);
10
- /** private */
11
- private handleOptions;
12
- private extractPathname;
13
- private extractParametersAndMatch;
14
- private extractQuery;
15
- private extractFragments;
16
- /** public */
17
- /**
18
- * Extract pathname, parameters, query, and fragment, if available.
19
- */
20
- extract(): ParserResponse<C>;
21
- }
@@ -1,31 +0,0 @@
1
- import { Indexed, PluridRoute, PluridRouteFragments } from '@plurid/plurid-data';
2
- export declare type ParserPartialOptions = Partial<ParserOptions>;
3
- export interface ParserOptions {
4
- /**
5
- * Allow the parsing of fragments. Default `true`.
6
- */
7
- fragment: boolean;
8
- }
9
- export interface ParserResponse<C> {
10
- path: PluridRoute<C>;
11
- pathname: string;
12
- elements: string[];
13
- match: boolean;
14
- parameters: Indexed<string>;
15
- query: Indexed<string>;
16
- fragments: PluridRouteFragments;
17
- route: string;
18
- }
19
- export interface MatcherResponse<C> {
20
- path: PluridRoute<C>;
21
- pathname: string;
22
- parameters: Record<string, string>;
23
- query: Record<string, string>;
24
- fragments: PluridRouteFragments;
25
- route: string;
26
- }
27
- export interface ParserParametersAndMatch {
28
- match: boolean;
29
- parameters: Indexed<string>;
30
- elements: string[];
31
- }
@@ -1,68 +0,0 @@
1
- import { Indexed, PluridRouteFragments, PluridRouteFragmentElement, PluridRouteFragmentText } from '@plurid/plurid-data';
2
- import { ParserParametersAndMatch } from "./interfaces";
3
- export declare const extractPathname: (location: string) => string;
4
- /**
5
- * Extracts the parameters names from a `route`.
6
- *
7
- * e.g.
8
- *
9
- * `'/:foo/:boo'` -> `[':foo', 'boo']`
10
- *
11
- * `'/foo/:boo'` -> `['', 'boo']`
12
- *
13
- * `'/foo/boo'` -> `[]`
14
- *
15
- * If there are no parameters returns an empty array.
16
- * Non-parametric route elements have an empty string as placeholder.
17
- *
18
- * @param route
19
- */
20
- export declare const extractParametersAndMatch: (location: string, route: string) => ParserParametersAndMatch;
21
- /**
22
- * Extract the parameters values.
23
- *
24
- * e.g.
25
- *
26
- * `parameters = ['', ':list']`
27
- *
28
- * `pathElements = ['list', 'foo']`
29
- *
30
- * `parametersValues = { list: 'foo' }`
31
- *
32
- * @param parameters
33
- * @param pathElements
34
- */
35
- export declare const extractParametersValues: (parameters: string[], pathElements: string[]) => Record<string, string>;
36
- /**
37
- * Based on the `path` and the `parameters` computes a match for comparison.
38
- *
39
- * @param path
40
- * @param parameters
41
- */
42
- export declare const computeComparingPath: (path: string, parameters: string[]) => {
43
- locationElements: string[];
44
- comparingPath: string;
45
- };
46
- /**
47
- * Splits `path` into elements.
48
- *
49
- * e.g. `'/foo/boo'` -> `['foo', 'boo']`
50
- *
51
- * @param path
52
- */
53
- export declare const splitPath: (path: string) => string[];
54
- /**
55
- * Extract the query values.
56
- *
57
- * e.g.
58
- *
59
- * `path = '/foo?id=1&asd=asd'`
60
- *
61
- * `query = { id: 1, asd: 'asd' }`
62
- *
63
- * @param path
64
- */
65
- export declare const extractQuery: (path: string) => Indexed<string>;
66
- export declare const extractFragments: (location?: string | undefined) => PluridRouteFragments;
67
- export declare const parseFragment: (fragment: string) => PluridRouteFragmentText | PluridRouteFragmentElement | undefined;
68
- export declare const extractOccurence: (occurence: string | undefined) => number;
@@ -1,7 +0,0 @@
1
- import IsoMatcher from "./IsoMatcher/index";
2
- import RouteParser from "./Parser/index";
3
- import { extractQuery } from "./Parser/logic";
4
- export * from "./IsoMatcher/interfaces";
5
- export * from "./Parser/interfaces";
6
- export * from "./logic/index";
7
- export { IsoMatcher, RouteParser, extractQuery, };
@@ -1,6 +0,0 @@
1
- export declare const stringInsertInitial: (value: string, insert: string) => string;
2
- export declare const stringRemoveTrailing: (value: string, trail: string) => string;
3
- export declare const cleanupPath: (value: string) => string;
4
- export declare const computePlaneAddress: (plane: string, route?: string | undefined, origin?: string) => string;
5
- export declare const isAbsolutePlane: (value: string) => boolean;
6
- export declare const checkPlaneAddressType: (value: string) => "pttp" | "https" | "http" | "relative";
@@ -1,3 +0,0 @@
1
- export * from "./general/index";
2
- export * from "./validity/index";
3
- export * from "./utilities/index";
@@ -1,29 +0,0 @@
1
- import { Indexed, PluridRoute, RouteDivisions } from '@plurid/plurid-data';
2
- export declare const mapPathsToRoutes: <C, V>(paths: Indexed<string>, view: V) => PluridRoute<C>[];
3
- export declare const pluridLinkPathDivider: (route: string) => RouteDivisions;
4
- /**
5
- * Given a partial `route`, e.g. `/route`, or `://cluster://route`,
6
- * it resolves it to the absolute form
7
- * `protocol://origin://route://space://universe://cluster://plane`.
8
- *
9
- * @param path
10
- */
11
- export declare const resolveRoute: (route: string, protocol?: string | undefined, host?: string | undefined) => {
12
- protocol: string;
13
- host: import("@plurid/plurid-data").RouteHostDivision;
14
- path: import("@plurid/plurid-data").RoutePathDivision;
15
- space: import("@plurid/plurid-data").RouteSpaceDivision;
16
- universe: import("@plurid/plurid-data").RouteUniverseDivision;
17
- cluster: import("@plurid/plurid-data").RouteClusterDivision;
18
- plane: import("@plurid/plurid-data").RoutePlaneDivision;
19
- route: string;
20
- } | {
21
- protocol: string;
22
- host: string;
23
- path: import("@plurid/plurid-data").RoutePathDivision;
24
- space: string;
25
- universe: string;
26
- cluster: string;
27
- plane: string;
28
- route: string;
29
- };
@@ -1,3 +0,0 @@
1
- import { CompareType, Indexed, PluridRouteParameter } from '@plurid/plurid-data';
2
- export declare const checkParameterLength: (parameter: string, length: number, compareType?: CompareType | undefined) => boolean;
3
- export declare const checkValidPath: <C>(validationParameters: Record<string, PluridRouteParameter> | undefined, parameters: Indexed<string>) => boolean;
@@ -1,6 +0,0 @@
1
- import * as layout from "./layout/index";
2
- import * as location from "./location/index";
3
- import * as tree from "./tree/index";
4
- import * as utilities from "./utilities/index";
5
- import * as view from "./view/index";
6
- export { layout, location, tree, utilities, view, };
@@ -1,3 +0,0 @@
1
- import { PluridConfiguration, TreePlane } from '@plurid/plurid-data';
2
- declare const computeColumnLayout: (roots: TreePlane[], columns?: number, columnLength?: number | undefined, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
3
- export default computeColumnLayout;
@@ -1,3 +0,0 @@
1
- import { TreePlane, PluridConfiguration } from '@plurid/plurid-data';
2
- declare const computeFaceToFaceLayout: (roots: TreePlane[], angle?: number, gap?: number, middle?: number, configuration?: PluridConfiguration) => TreePlane[];
3
- export default computeFaceToFaceLayout;
@@ -1,6 +0,0 @@
1
- import computeColumnLayout from "./column";
2
- import computeRowLayout from "./row";
3
- import computeFaceToFaceLayout from "./faceToFace";
4
- import computeSheavesLayout from "./sheaves";
5
- import computeZigZagLayout from "./zigZag";
6
- export { computeColumnLayout, computeRowLayout, computeFaceToFaceLayout, computeSheavesLayout, computeZigZagLayout, };
@@ -1,3 +0,0 @@
1
- import { PluridConfiguration, TreePlane } from '@plurid/plurid-data';
2
- declare const computeRowLayout: (roots: TreePlane[], rows?: number, rowLength?: number | undefined, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
3
- export default computeRowLayout;
@@ -1,3 +0,0 @@
1
- import { TreePlane, PluridConfiguration } from '@plurid/plurid-data';
2
- declare const computeSheavesLayout: (roots: TreePlane[], depth?: number, offsetX?: number, offsetY?: number, configuration?: PluridConfiguration) => TreePlane[];
3
- export default computeSheavesLayout;
@@ -1,3 +0,0 @@
1
- import { TreePlane, PluridConfiguration } from '@plurid/plurid-data';
2
- declare const computeZigZagLayout: (pages: TreePlane[], angle?: number, configuration?: PluridConfiguration) => TreePlane[];
3
- export default computeZigZagLayout;
@@ -1,2 +0,0 @@
1
- import { computePath, computePluridPlaneLocation, recomputeChildrenLocation } from "./logic";
2
- export { computePath, computePluridPlaneLocation, recomputeChildrenLocation, };
@@ -1,22 +0,0 @@
1
- import {
2
- /** interfaces */
3
- PluridPlane, PluridConfiguration, TreePlane, SpaceLocation, LocationCoordinates, LinkCoordinates } from '@plurid/plurid-data';
4
- export declare const computePath: (tree: TreePlane[], planeID: string) => TreePlane[];
5
- export declare const computePluridPlaneLocation: (linkCoordinates: LinkCoordinates, treePageParent: TreePlane, bridgeLength?: number, linkPlaneAngle?: number) => LocationCoordinates;
6
- export declare const recomputeChildrenLocation: (page: TreePlane) => TreePlane[];
7
- /**
8
- * Compute translateX based on configuration layout if it exists
9
- * or based on the index of the root.
10
- *
11
- * @param configuration
12
- * @param root
13
- * @param index
14
- */
15
- export declare const computeRootLocationX: <C>(configuration: PluridConfiguration | undefined, root: PluridPlane<C>, index: number) => number;
16
- export declare const computeSpaceLocation: (configuration: PluridConfiguration) => SpaceLocation;
17
- /**
18
- * Based on the specified camera, compute the X translation
19
- *
20
- * @param configuration
21
- */
22
- export declare const computeCameraLocationX: (configuration: PluridConfiguration) => number;
@@ -1,3 +0,0 @@
1
- import Tree from "./object";
2
- import * as logic from "./logic";
3
- export { Tree, logic, };
@@ -1,32 +0,0 @@
1
- import {
2
- /** interfaces */
3
- PluridView, PluridApplicationView, PluridConfiguration, RegisteredPluridPlane, TreePlane, LinkCoordinates, PathParameters } from '@plurid/plurid-data';
4
- /**
5
- * Given a view resolve it to an absolute view
6
- * and compute a TreePlane if there is a RegisteredPluridPlane
7
- * for that absolute view.
8
- *
9
- * @param view
10
- */
11
- export declare const resolveViewItem: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: string | PluridView, configuration: PluridConfiguration) => TreePlane | undefined;
12
- /**
13
- * Compute the space based on the layout.
14
- * If there is no configuration.space.layout, it uses the default '2 COLUMNS' layout.
15
- *
16
- * @param planes
17
- * @param configuration
18
- */
19
- export declare const computeSpaceTree: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: PluridApplicationView, configuration: PluridConfiguration) => TreePlane[];
20
- export declare const isParametric: (viewRoute: string, planeRoute: string) => boolean;
21
- export declare const matchForParameters: (viewRoute: string, planeRoute: string) => void;
22
- export declare const assignPagesFromView: (planes: TreePlane[], view?: PluridApplicationView | undefined) => TreePlane[];
23
- export declare const updateTreePlane: (tree: TreePlane[], updatedPage: TreePlane) => TreePlane[];
24
- export declare const updateTreeWithNewPlane: <C>(planeRoute: string, parentPlaneID: string, linkCoordinates: LinkCoordinates, tree: TreePlane[], planesRegistry: Map<string, RegisteredPluridPlane<C>>, configuration: PluridConfiguration) => UpdatedTreeWithNewPlane;
25
- export interface UpdatedTreeWithNewPlane {
26
- pluridPlaneID: string;
27
- updatedTree: TreePlane[];
28
- }
29
- export declare const updateTreeWithNewPage: (tree: TreePlane[], treePageParentPlaneID: string, pagePath: string, pageID: string, linkCoordinates: LinkCoordinates, parameters?: PathParameters | undefined) => UpdatedTreeWithNewPlane;
30
- export declare const removePageFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
31
- export declare const toggleChildren: (children: TreePlane[]) => TreePlane[];
32
- export declare const togglePlaneFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
@@ -1,13 +0,0 @@
1
- import { TreePlane, RegisteredPluridPlane, PluridConfiguration, PluridApplicationView, PluridCluster } from '@plurid/plurid-data';
2
- export interface TreeData<C> {
3
- planes: Map<string, RegisteredPluridPlane<C>>;
4
- view: PluridApplicationView;
5
- configuration: PluridConfiguration;
6
- clusters?: PluridCluster<C>[];
7
- previousTree?: TreePlane[];
8
- }
9
- export default class Tree<C> {
10
- private data;
11
- constructor(data: TreeData<C>);
12
- compute(): TreePlane[];
13
- }
@@ -1,16 +0,0 @@
1
- import {
2
- /** interfaces */
3
- TreePlane } from '@plurid/plurid-data';
4
- export declare const computeSpaceSize: (tree: TreePlane[]) => {
5
- width: number;
6
- height: number;
7
- depth: number;
8
- topCorner: {
9
- x: number;
10
- y: number;
11
- z: number;
12
- };
13
- };
14
- export declare const findPage: (view: string, pages: TreePlane[]) => TreePlane | undefined;
15
- export declare const splitIntoGroups: <T>(data: T[], length: number) => T[][];
16
- export declare const getTreePlaneByPlaneID: (tree: TreePlane[], planeID: string) => TreePlane | null;
@@ -1,2 +0,0 @@
1
- import { computeViewTree, computeCulledView, checkPageInView } from "./logic";
2
- export { computeViewTree, computeCulledView, checkPageInView, };
@@ -1,13 +0,0 @@
1
- import {
2
- /** interfaces */
3
- PluridView, TreePlane, SpaceLocation } from '@plurid/plurid-data';
4
- export declare const computeViewTree: (pages: TreePlane[], view: string[] | PluridView[]) => TreePlane[];
5
- /**
6
- * Compute only the view within a given radius around the user.
7
- *
8
- * @param pages
9
- * @param view
10
- * @param location
11
- */
12
- export declare const computeCulledView: (pages: TreePlane[], view: string[] | PluridView[], location: SpaceLocation, radius?: number) => string[] | undefined;
13
- export declare const checkPageInView: (page: TreePlane, location: SpaceLocation, radius: number) => boolean;
@@ -1,3 +0,0 @@
1
- import { PluridApplicationView, PluridConfiguration, PluridPlanesRegistrar as IPluridPlanesRegistrar, PluridState, PluridMetastateState, RecursivePartial } from '@plurid/plurid-data';
2
- declare const compute: <C>(view: PluridApplicationView, configuration: RecursivePartial<PluridConfiguration> | undefined, planesRegistrar: IPluridPlanesRegistrar<C> | undefined, currentState: PluridState | undefined, localState: PluridState | undefined, precomputedState: Partial<PluridState> | undefined, contextState: PluridMetastateState | undefined) => PluridState;
3
- export default compute;
@@ -1,3 +0,0 @@
1
- import { PluridApplicationView, PluridConfiguration, PluridPlanesRegistrar as IPluridPlanesRegistrar, PluridState, PluridMetastateState, PluridStateSpace } from '@plurid/plurid-data';
2
- declare const resolveSpace: <C>(view: PluridApplicationView, configuration: PluridConfiguration, planesRegistrar: IPluridPlanesRegistrar<C> | undefined, currentState: PluridState | undefined, localState: PluridState | undefined, precomputedState: Partial<PluridState> | undefined, contextState: PluridMetastateState | undefined) => PluridStateSpace;
3
- export { resolveSpace, };