@plurid/plurid-engine 0.0.0-18 → 0.0.0-19

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 (59) hide show
  1. package/distribution/index.d.mts +744 -0
  2. package/distribution/index.d.ts +744 -2
  3. package/distribution/index.js +3319 -2730
  4. package/distribution/index.js.map +1 -1
  5. package/distribution/index.mjs +3432 -0
  6. package/distribution/index.mjs.map +1 -0
  7. package/package.json +71 -78
  8. package/distribution/functions/index.d.ts +0 -2
  9. package/distribution/functions/navigate/index.d.ts +0 -1
  10. package/distribution/functions/template/index.d.ts +0 -1
  11. package/distribution/index.es.js +0 -2829
  12. package/distribution/index.es.js.map +0 -1
  13. package/distribution/modules/general/configuration/index.d.ts +0 -2
  14. package/distribution/modules/general/index.d.ts +0 -3
  15. package/distribution/modules/general/tree/index.d.ts +0 -5
  16. package/distribution/modules/index.d.ts +0 -9
  17. package/distribution/modules/interaction/direction/index.d.ts +0 -2
  18. package/distribution/modules/interaction/index.d.ts +0 -5
  19. package/distribution/modules/interaction/mathematics/matrix/index.d.ts +0 -31
  20. package/distribution/modules/interaction/mathematics/quaternion/index.d.ts +0 -78
  21. package/distribution/modules/interaction/mathematics/transform/general/index.d.ts +0 -37
  22. package/distribution/modules/interaction/mathematics/transform/index.d.ts +0 -3
  23. package/distribution/modules/interaction/mathematics/transform/matrix3d/index.d.ts +0 -68
  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 -4
  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/Parser/index.d.ts +0 -21
  32. package/distribution/modules/routing/Parser/interfaces.d.ts +0 -31
  33. package/distribution/modules/routing/Parser/logic.d.ts +0 -68
  34. package/distribution/modules/routing/index.d.ts +0 -6
  35. package/distribution/modules/routing/logic/general/index.d.ts +0 -8
  36. package/distribution/modules/routing/logic/index.d.ts +0 -3
  37. package/distribution/modules/routing/logic/utilities/index.d.ts +0 -29
  38. package/distribution/modules/routing/logic/validity/index.d.ts +0 -3
  39. package/distribution/modules/space/index.d.ts +0 -6
  40. package/distribution/modules/space/layout/column.d.ts +0 -3
  41. package/distribution/modules/space/layout/faceToFace.d.ts +0 -3
  42. package/distribution/modules/space/layout/index.d.ts +0 -6
  43. package/distribution/modules/space/layout/row.d.ts +0 -3
  44. package/distribution/modules/space/layout/sheaves.d.ts +0 -3
  45. package/distribution/modules/space/layout/zigZag.d.ts +0 -3
  46. package/distribution/modules/space/location/index.d.ts +0 -2
  47. package/distribution/modules/space/location/logic.d.ts +0 -22
  48. package/distribution/modules/space/tree/index.d.ts +0 -3
  49. package/distribution/modules/space/tree/logic.d.ts +0 -44
  50. package/distribution/modules/space/tree/object.d.ts +0 -16
  51. package/distribution/modules/space/utilities/index.d.ts +0 -16
  52. package/distribution/modules/space/view/index.d.ts +0 -2
  53. package/distribution/modules/space/view/logic.d.ts +0 -13
  54. package/distribution/modules/state/compute/index.d.ts +0 -3
  55. package/distribution/modules/state/compute/space/index.d.ts +0 -3
  56. package/distribution/modules/state/compute/themes/index.d.ts +0 -3
  57. package/distribution/modules/state/index.d.ts +0 -3
  58. package/distribution/modules/state/local/index.d.ts +0 -3
  59. package/distribution/modules/utilities/index.d.ts +0 -1
@@ -1,31 +0,0 @@
1
- /**
2
- *
3
- * @param xAngle
4
- * @param yAngle
5
- * @param zAngle
6
- */
7
- export declare function rotateMatrix(xAngle: number, yAngle: number, zAngle?: number): number[];
8
- /**
9
- *
10
- * @param x
11
- * @param y
12
- * @param z
13
- */
14
- export declare function translateMatrix(x: number, y: number, z: number): number[];
15
- /**
16
- *
17
- * @param s
18
- */
19
- export declare function scaleMatrix(s: number): number[];
20
- /**
21
- *
22
- * @param matrixA
23
- * @param matrixB
24
- */
25
- export declare function multiplyMatrices(matrixA: number[], matrixB: number[]): number[];
26
- /**
27
- *
28
- * @param matrices
29
- */
30
- export declare function multiplyArrayOfMatrices(matrices: number[][]): number[];
31
- export declare function matrixArrayToCSSMatrix(array: number[]): string;
@@ -1,78 +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
- export 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, radians?: boolean): 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: [number, number, number], quaternion: Quaternion): Quaternion;
74
- /**
75
- *
76
- * @param quaternion
77
- */
78
- export declare function makeRotationMatrixFromQuaternion(quaternion: Quaternion): number[];
@@ -1,37 +0,0 @@
1
- import { Quaternion } from '../../quaternion';
2
- export declare type Matrix = number[][];
3
- export declare const getInitialMatrix: () => Matrix;
4
- export declare const multiplyMatrices: (m1: Matrix, m2: Matrix) => Matrix;
5
- /**
6
- * Multiplies multiple `matrices`, must contain at least 2.
7
- *
8
- * @param matrices
9
- * @returns
10
- */
11
- export declare const multiplyMatricesArray: (matrices: Matrix[]) => Matrix;
12
- export declare const arrayToMatrix: (array: number[]) => Matrix;
13
- export declare const matrixToArray: (matrix: Matrix) => number[];
14
- /**
15
- * Parse a `matrix3d` string into a `Matrix`.
16
- *
17
- * @param value
18
- * @returns
19
- */
20
- export declare const matrix3DToMatrix: (value: string) => Matrix;
21
- export declare const printMatrix: (matrix: Matrix, name: string) => void;
22
- export declare const rotateXMatrix: (angle: number) => Matrix;
23
- export declare const rotateYMatrix: (angle: number) => Matrix;
24
- export declare const rotateZMatrix: (angle: number) => Matrix;
25
- export declare const translateMatrix: (x?: number, y?: number, z?: number) => Matrix;
26
- export declare const scaleMatrix: (s: number) => Matrix;
27
- export declare function rotationMatrixFromQuaternion(quaternion: Quaternion): Matrix;
28
- export declare const matrixToCSSMatrix: (matrix: Matrix) => string;
29
- export declare const identityMatrix: () => Matrix;
30
- /**
31
- * Inverse a matrix based on
32
- * https://github.com/josdejong/mathjs/blob/develop/src/function/matrix/inv.js
33
- *
34
- * @param matrix
35
- * @returns
36
- */
37
- export declare const inverseMatrix: (matrix: Matrix) => Matrix;
@@ -1,3 +0,0 @@
1
- import * as general from './general';
2
- import * as matrix3d from './matrix3d';
3
- export { general, matrix3d, };
@@ -1,68 +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
- export interface RotationValues {
51
- rotateX: number;
52
- rotateY: number;
53
- rotateZ: number;
54
- }
55
- export declare function getTransformRotate(matrix3d: string): RotationValues;
56
- export interface TranslationValues {
57
- translateX: number;
58
- translateY: number;
59
- translateZ: number;
60
- }
61
- export declare function getTransformTranslate(matrix3d: string): TranslationValues;
62
- export 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;
@@ -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';
2
- export * from './registrar';
@@ -1,4 +0,0 @@
1
- import { PluridPlane, PluridPlaneObject, PluridRoutePlane, PluridRoutePlaneObject } 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 getPluridPlaneIDByData: (element: HTMLElement | null) => string;
@@ -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>[], origin?: string);
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, origin?: string) => 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 '@plurid/plurid-data';
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,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) => PluridRouteFragments;
67
- export declare const parseFragment: (fragment: string) => PluridRouteFragmentText | PluridRouteFragmentElement | undefined;
68
- export declare const extractOccurence: (occurence: string | undefined) => number;
@@ -1,6 +0,0 @@
1
- import IsoMatcher from './IsoMatcher';
2
- import RouteParser from './Parser';
3
- import { extractQuery } from './Parser/logic';
4
- export * from './Parser/interfaces';
5
- export * from './logic';
6
- export { IsoMatcher, RouteParser, extractQuery, };
@@ -1,8 +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, origin?: string) => string;
5
- export declare const isAbsolutePlane: (value: string) => boolean;
6
- export declare const checkPlaneAddressType: (value: string) => "pttp" | "https" | "http" | "relative";
7
- export declare const removeTrailingSlash: (value: string) => string;
8
- export declare const cleanPathValue: (value: string) => string;
@@ -1,3 +0,0 @@
1
- export * from './general';
2
- export * from './validity';
3
- export * from './utilities';
@@ -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, any>[];
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, host?: string) => {
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) => 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';
2
- import * as location from './location';
3
- import * as tree from './tree';
4
- import * as utilities from './utilities';
5
- import * as view from './view';
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, 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, 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,44 +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, origin?: string, getCount?: () => number) => 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, layout: boolean | undefined, origin: string | undefined, getCount: () => number) => 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) => TreePlane[];
23
- export declare const updateTreePlane: (tree: TreePlane[], updatedPlane: TreePlane) => TreePlane[];
24
- export interface UpdatedTreeWithNewPlane {
25
- pluridPlaneID: string;
26
- updatedTree: TreePlane[];
27
- updatedTreePlane?: TreePlane;
28
- }
29
- export declare const updateTreeWithNewPlane: <C>(planeRoute: string, parentPlaneID: string, linkCoordinates: LinkCoordinates, tree: TreePlane[], planesRegistry: Map<string, RegisteredPluridPlane<C>>, configuration: PluridConfiguration, hostname?: string) => UpdatedTreeWithNewPlane;
30
- export declare const updatePlaneLocation: (tree: TreePlane[], parentPlaneID: string, planeID: string, linkCoordinates: LinkCoordinates) => TreePlane[];
31
- export declare const updateTreeWithNewPage: (tree: TreePlane[], treePageParentPlaneID: string, pagePath: string, pageID: string, linkCoordinates: LinkCoordinates, parameters?: PathParameters) => UpdatedTreeWithNewPlane;
32
- export declare const removePageFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
33
- export declare const toggleChildren: (children: TreePlane[]) => TreePlane[];
34
- export declare const toggleAllChildren: (tree: TreePlane[], show: boolean) => TreePlane[];
35
- export interface TogglePlaneFromTree {
36
- updatedTree: TreePlane[];
37
- updatedPlane: TreePlane | undefined;
38
- }
39
- export declare const togglePlaneFromTree: (tree: TreePlane[], pluridPlaneID: string, forceShow?: boolean) => TogglePlaneFromTree;
40
- export declare const getTreePlaneByID: (stateTree: TreePlane[], id: string | undefined) => TreePlane | undefined;
41
- export declare const removeRootFromTree: (tree: TreePlane[], pluridPlaneID: string) => {
42
- updatedTree: TreePlane[];
43
- };
44
- export declare const removePlaneFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
@@ -1,16 +0,0 @@
1
- import { TreePlane, RegisteredPluridPlane, PluridConfiguration, PluridApplicationView } from '@plurid/plurid-data';
2
- export interface TreeData<C> {
3
- planes: Map<string, RegisteredPluridPlane<C>>;
4
- view: PluridApplicationView;
5
- configuration: PluridConfiguration;
6
- layout?: boolean;
7
- previousTree?: TreePlane[];
8
- }
9
- export default class Tree<C> {
10
- private data;
11
- private origin;
12
- private count;
13
- constructor(data: TreeData<C>, origin?: string);
14
- compute(): TreePlane[];
15
- private getCount;
16
- }
@@ -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, };