@plurid/plurid-engine 0.0.0-11 → 0.0.0-12

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.
@@ -1,2 +1,2 @@
1
- import { PluridConfiguration, RecursivePartial } from '@plurid/plurid-data';
2
- export declare const merge: (configuration?: RecursivePartial<PluridConfiguration> | undefined, target?: PluridConfiguration | undefined) => PluridConfiguration;
1
+ import { PluridPartialConfiguration, PluridConfiguration } from '@plurid/plurid-data';
2
+ export declare const merge: (configuration?: PluridPartialConfiguration, target?: PluridConfiguration) => PluridConfiguration;
@@ -3,4 +3,4 @@ export declare const resolvePluridPlaneData: <C>(plane: PluridPlane<C>) => Pluri
3
3
  export declare const resolvePluridRoutePlaneData: <C>(plane: PluridRoutePlane<C>) => PluridRoutePlaneObject<C>;
4
4
  export declare const createInternalStatePlane: <C>(plane: PluridPlane<C>) => PluridInternalStatePlane;
5
5
  export declare const createInternalContextPlane: <C>(plane: PluridPlane<C>) => PluridInternalContextPlane<C>;
6
- export declare const getPluridPlaneIDByData: (element: HTMLElement | null) => any;
6
+ export declare const getPluridPlaneIDByData: (element: HTMLElement | null) => string;
@@ -63,6 +63,6 @@ export declare const splitPath: (path: string) => string[];
63
63
  * @param path
64
64
  */
65
65
  export declare const extractQuery: (path: string) => Indexed<string>;
66
- export declare const extractFragments: (location?: string | undefined) => PluridRouteFragments;
66
+ export declare const extractFragments: (location?: string) => PluridRouteFragments;
67
67
  export declare const parseFragment: (fragment: string) => PluridRouteFragmentText | PluridRouteFragmentElement | undefined;
68
68
  export declare const extractOccurence: (occurence: string | undefined) => number;
@@ -1,7 +1,7 @@
1
1
  export declare const stringInsertInitial: (value: string, insert: string) => string;
2
2
  export declare const stringRemoveTrailing: (value: string, trail: string) => string;
3
3
  export declare const cleanupPath: (value: string) => string;
4
- export declare const computePlaneAddress: (plane: string, route?: string | undefined, origin?: string) => string;
4
+ export declare const computePlaneAddress: (plane: string, route?: string, origin?: string) => string;
5
5
  export declare const isAbsolutePlane: (value: string) => boolean;
6
6
  export declare const checkPlaneAddressType: (value: string) => "pttp" | "https" | "http" | "relative";
7
7
  export declare const removeTrailingSlash: (value: string) => string;
@@ -1,5 +1,5 @@
1
1
  import { Indexed, PluridRoute, RouteDivisions } from '@plurid/plurid-data';
2
- export declare const mapPathsToRoutes: <C, V>(paths: Indexed<string>, view: V) => PluridRoute<C>[];
2
+ export declare const mapPathsToRoutes: <C, V>(paths: Indexed<string>, view: V) => PluridRoute<C, any>[];
3
3
  export declare const pluridLinkPathDivider: (route: string) => RouteDivisions;
4
4
  /**
5
5
  * Given a partial `route`, e.g. `/route`, or `://cluster://route`,
@@ -8,7 +8,7 @@ export declare const pluridLinkPathDivider: (route: string) => RouteDivisions;
8
8
  *
9
9
  * @param path
10
10
  */
11
- export declare const resolveRoute: (route: string, protocol?: string | undefined, host?: string | undefined) => {
11
+ export declare const resolveRoute: (route: string, protocol?: string, host?: string) => {
12
12
  protocol: string;
13
13
  host: import("@plurid/plurid-data").RouteHostDivision;
14
14
  path: import("@plurid/plurid-data").RoutePathDivision;
@@ -1,3 +1,3 @@
1
1
  import { CompareType, Indexed, PluridRouteParameter } from '@plurid/plurid-data';
2
- export declare const checkParameterLength: (parameter: string, length: number, compareType?: CompareType | undefined) => boolean;
2
+ export declare const checkParameterLength: (parameter: string, length: number, compareType?: CompareType) => boolean;
3
3
  export declare const checkValidPath: <C>(validationParameters: Record<string, PluridRouteParameter> | undefined, parameters: Indexed<string>) => boolean;
@@ -1,3 +1,3 @@
1
1
  import { PluridConfiguration, TreePlane } from '@plurid/plurid-data';
2
- declare const computeColumnLayout: (roots: TreePlane[], columns?: number, columnLength?: number | undefined, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
2
+ declare const computeColumnLayout: (roots: TreePlane[], columns?: number, columnLength?: number, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
3
3
  export default computeColumnLayout;
@@ -1,3 +1,3 @@
1
1
  import { PluridConfiguration, TreePlane } from '@plurid/plurid-data';
2
- declare const computeRowLayout: (roots: TreePlane[], rows?: number, rowLength?: number | undefined, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
2
+ declare const computeRowLayout: (roots: TreePlane[], rows?: number, rowLength?: number, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
3
3
  export default computeRowLayout;
@@ -8,7 +8,7 @@ PluridView, PluridApplicationView, PluridConfiguration, RegisteredPluridPlane, T
8
8
  *
9
9
  * @param view
10
10
  */
11
- export declare const resolveViewItem: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: string | PluridView, configuration: PluridConfiguration) => TreePlane | undefined;
11
+ export declare const resolveViewItem: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: string | PluridView, configuration: PluridConfiguration, origin?: string) => TreePlane | undefined;
12
12
  /**
13
13
  * Compute the space based on the layout.
14
14
  * If there is no configuration.space.layout, it uses the default '2 COLUMNS' layout.
@@ -16,10 +16,10 @@ export declare const resolveViewItem: <C>(planes: Map<string, RegisteredPluridPl
16
16
  * @param planes
17
17
  * @param configuration
18
18
  */
19
- export declare const computeSpaceTree: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: PluridApplicationView, configuration: PluridConfiguration) => TreePlane[];
19
+ export declare const computeSpaceTree: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: PluridApplicationView, configuration: PluridConfiguration, origin?: string) => TreePlane[];
20
20
  export declare const isParametric: (viewRoute: string, planeRoute: string) => boolean;
21
21
  export declare const matchForParameters: (viewRoute: string, planeRoute: string) => void;
22
- export declare const assignPagesFromView: (planes: TreePlane[], view?: PluridApplicationView | undefined) => TreePlane[];
22
+ export declare const assignPagesFromView: (planes: TreePlane[], view?: PluridApplicationView) => TreePlane[];
23
23
  export declare const updateTreePlane: (tree: TreePlane[], updatedPage: TreePlane) => TreePlane[];
24
24
  export interface UpdatedTreeWithNewPlane {
25
25
  pluridPlaneID: string;
@@ -27,7 +27,7 @@ export interface UpdatedTreeWithNewPlane {
27
27
  updatedTreePlane?: TreePlane;
28
28
  }
29
29
  export declare const updateTreeWithNewPlane: <C>(planeRoute: string, parentPlaneID: string, linkCoordinates: LinkCoordinates, tree: TreePlane[], planesRegistry: Map<string, RegisteredPluridPlane<C>>, configuration: PluridConfiguration) => UpdatedTreeWithNewPlane;
30
- export declare const updateTreeWithNewPage: (tree: TreePlane[], treePageParentPlaneID: string, pagePath: string, pageID: string, linkCoordinates: LinkCoordinates, parameters?: PathParameters | undefined) => UpdatedTreeWithNewPlane;
30
+ export declare const updateTreeWithNewPage: (tree: TreePlane[], treePageParentPlaneID: string, pagePath: string, pageID: string, linkCoordinates: LinkCoordinates, parameters?: PathParameters) => UpdatedTreeWithNewPlane;
31
31
  export declare const removePageFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
32
32
  export declare const toggleChildren: (children: TreePlane[]) => TreePlane[];
33
33
  export interface TogglePlaneFromTree {
@@ -8,6 +8,7 @@ export interface TreeData<C> {
8
8
  }
9
9
  export default class Tree<C> {
10
10
  private data;
11
- constructor(data: TreeData<C>);
11
+ private origin;
12
+ constructor(data: TreeData<C>, origin?: string);
12
13
  compute(): TreePlane[];
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurid/plurid-engine",
3
- "version": "0.0.0-11",
3
+ "version": "0.0.0-12",
4
4
  "description": "Plurid Engine and Utility Functions",
5
5
  "keywords": [
6
6
  "plurid",
@@ -51,29 +51,30 @@
51
51
  "@plurid/plurid-themes": "*"
52
52
  },
53
53
  "devDependencies": {
54
- "@plurid/plurid-data": "0.0.0-12",
55
- "@plurid/plurid-functions": "0.0.0-22",
54
+ "@plurid/plurid-data": "0.0.0-14",
55
+ "@plurid/plurid-functions": "0.0.0-25",
56
56
  "@plurid/plurid-pubsub": "0.0.0-6",
57
57
  "@plurid/plurid-themes": "0.0.0-2",
58
- "@rollup/plugin-commonjs": "^21.1.0",
59
- "@types/jest": "^27.4.1",
60
- "@types/node": "^17.0.24",
61
- "@typescript-eslint/eslint-plugin": "^5.19.0",
62
- "@typescript-eslint/parser": "^5.19.0",
58
+ "@rollup/plugin-commonjs": "^22.0.1",
59
+ "@types/jest": "^28.1.6",
60
+ "@types/node": "^18.0.5",
61
+ "@typescript-eslint/eslint-plugin": "^5.30.6",
62
+ "@typescript-eslint/parser": "^5.30.6",
63
63
  "@zerollup/ts-transform-paths": "^1.7.18",
64
64
  "coveralls": "^3.1.1",
65
- "eslint": "^8.13.0",
66
- "jest": "^27.5.1",
67
- "jest-config": "^27.5.1",
65
+ "eslint": "^8.19.0",
66
+ "jest": "^28.1.3",
67
+ "jest-config": "^28.1.3",
68
+ "jest-environment-jsdom": "^28.1.3",
68
69
  "rimraf": "^3.0.2",
69
- "rollup": "^2.70.2",
70
+ "rollup": "^2.77.0",
70
71
  "rollup-plugin-sourcemaps": "^0.6.3",
71
72
  "rollup-plugin-terser": "^7.0.2",
72
- "rollup-plugin-typescript2": "^0.31.2",
73
- "ts-jest": "^27.1.4",
74
- "ts-node": "^10.7.0",
73
+ "rollup-plugin-typescript2": "^0.32.1",
74
+ "ts-jest": "^28.0.6",
75
+ "ts-node": "^10.9.1",
75
76
  "ttypescript": "^1.5.13",
76
- "typescript": "^4.6.3",
77
+ "typescript": "^4.7.4",
77
78
  "typescript-transform-paths": "^3.3.1"
78
79
  }
79
80
  }