@equinor/videx-map 1.14.7 → 1.14.9

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 (70) hide show
  1. package/README.md +1 -0
  2. package/package.json +5 -11
  3. package/dist/EventHandler.d.ts +0 -21
  4. package/dist/ExplorationLayer.d.ts +0 -38
  5. package/dist/FaultlineModule.d.ts +0 -51
  6. package/dist/FieldModule.d.ts +0 -113
  7. package/dist/GeoJSONModule/GeoJSONModule.d.ts +0 -47
  8. package/dist/GeoJSONModule/constants.d.ts +0 -13
  9. package/dist/GeoJSONModule/index.d.ts +0 -6
  10. package/dist/GeoJSONModule/interfaces.d.ts +0 -15
  11. package/dist/GeoJSONModule/labels.d.ts +0 -46
  12. package/dist/GeoJSONModule/linestring.d.ts +0 -55
  13. package/dist/GeoJSONModule/multipolygon.d.ts +0 -94
  14. package/dist/GeoJSONModule/point.d.ts +0 -26
  15. package/dist/GeoJSONModule/polygon.d.ts +0 -96
  16. package/dist/GeoJSONModule/shader.d.ts +0 -10
  17. package/dist/ModuleInterface.d.ts +0 -26
  18. package/dist/OutlineModule.d.ts +0 -81
  19. package/dist/ResizeConfigInterface.d.ts +0 -14
  20. package/dist/WellboreModule.d.ts +0 -126
  21. package/dist/index.d.ts +0 -8
  22. package/dist/index.esm.js +0 -1
  23. package/dist/index.js +0 -1
  24. package/dist/index.umd.js +0 -1
  25. package/dist/pixiOverlayInterfaces.d.ts +0 -16
  26. package/dist/utils/ComparableArray.d.ts +0 -60
  27. package/dist/utils/LineDictionary.d.ts +0 -89
  28. package/dist/utils/LineInterpolator.d.ts +0 -84
  29. package/dist/utils/Log.d.ts +0 -1
  30. package/dist/utils/Mesh.d.ts +0 -46
  31. package/dist/utils/PointDictionary.d.ts +0 -58
  32. package/dist/utils/Radius.d.ts +0 -2
  33. package/dist/utils/Rect.d.ts +0 -27
  34. package/dist/utils/TriangleDictionary.d.ts +0 -21
  35. package/dist/utils/WellboreMesh.d.ts +0 -51
  36. package/dist/utils/centerOfMass.d.ts +0 -8
  37. package/dist/utils/fields/Highlighter.d.ts +0 -33
  38. package/dist/utils/fields/LabelManager.d.ts +0 -62
  39. package/dist/utils/fields/groupLabels.d.ts +0 -5
  40. package/dist/utils/fields/preprocessFields.d.ts +0 -29
  41. package/dist/utils/generateCircle.d.ts +0 -10
  42. package/dist/utils/linePoint.d.ts +0 -27
  43. package/dist/utils/lineReducer.d.ts +0 -9
  44. package/dist/utils/wellbores/AsyncLoop.d.ts +0 -35
  45. package/dist/utils/wellbores/Colors.d.ts +0 -40
  46. package/dist/utils/wellbores/Config.d.ts +0 -80
  47. package/dist/utils/wellbores/DataManager.d.ts +0 -15
  48. package/dist/utils/wellbores/Highlight.d.ts +0 -18
  49. package/dist/utils/wellbores/LabelType.d.ts +0 -9
  50. package/dist/utils/wellbores/Projector.d.ts +0 -20
  51. package/dist/utils/wellbores/RealtimeWellbore.d.ts +0 -21
  52. package/dist/utils/wellbores/Shader.d.ts +0 -41
  53. package/dist/utils/wellbores/data/Group.d.ts +0 -48
  54. package/dist/utils/wellbores/data/RootData.d.ts +0 -29
  55. package/dist/utils/wellbores/data/SourceData.d.ts +0 -25
  56. package/dist/utils/wellbores/data/WellboreData.d.ts +0 -76
  57. package/dist/utils/wellbores/data/WellboreEventData.d.ts +0 -16
  58. package/dist/utils/wellbores/data/details/Detail.d.ts +0 -20
  59. package/dist/utils/wellbores/data/details/DetailOptions.d.ts +0 -7
  60. package/dist/utils/wellbores/data/details/ShoeDetail.d.ts +0 -14
  61. package/dist/utils/wellbores/data/details/index.d.ts +0 -11
  62. package/dist/utils/wellbores/data/index.d.ts +0 -6
  63. package/dist/utils/wellbores/highlight-helper.d.ts +0 -6
  64. package/dist/utils/wellbores/intervals.d.ts +0 -15
  65. package/dist/utils/wellbores/labels/Label.d.ts +0 -39
  66. package/dist/utils/wellbores/labels/index.d.ts +0 -2
  67. package/dist/utils/wellbores/labels/label-helper.d.ts +0 -3
  68. package/dist/utils/wellbores/registries/CallbackRegistry.d.ts +0 -23
  69. package/dist/utils/wellbores/registries/ColorRegistry.d.ts +0 -22
  70. package/dist/utils/wellbores/registries/index.d.ts +0 -2
@@ -1,18 +0,0 @@
1
- import { WellboreData, RootData } from './data';
2
- export declare class Highlight {
3
- active: boolean;
4
- root: RootData;
5
- wellbores: WellboreData[];
6
- /** Return true of highlight is single. */
7
- get single(): boolean;
8
- /** Get first wellbore. */
9
- get first(): WellboreData;
10
- /** Set highlight */
11
- set(root: RootData, wellbores: WellboreData[]): void;
12
- private highlightRoot;
13
- private highlightWellbores;
14
- clear(): void;
15
- private clearRoot;
16
- private clearWellbores;
17
- equals(root: RootData, wellbores: WellboreData[]): boolean;
18
- }
@@ -1,9 +0,0 @@
1
- /** Enum for dividing labels into three groups. */
2
- export declare enum LabelType {
3
- /** Labels attached to wellbores. */
4
- Wellbore = 0,
5
- /** Multiple wellbore-labels or under root. */
6
- Multi = 1,
7
- /** Single label under root. */
8
- Single = 2
9
- }
@@ -1,20 +0,0 @@
1
- import Vector2 from '@equinor/videx-vector2';
2
- type projectFunction = (coord: [number, number], zoom?: number) => {
3
- x: number;
4
- y: number;
5
- };
6
- export default class Projector {
7
- project: projectFunction;
8
- constructor(project: projectFunction);
9
- get(coord: [number, number], zoom?: number): {
10
- x: number;
11
- y: number;
12
- };
13
- getVector2(coord: [number, number], zoom?: number): Vector2;
14
- batch(coords: [number, number][], zoom?: number): {
15
- x: number;
16
- y: number;
17
- }[];
18
- batchVector2(coords: [number, number][], zoom?: number): Vector2[];
19
- }
20
- export {};
@@ -1,21 +0,0 @@
1
- import { WellboreData } from './data/WellboreData';
2
- import { pixiOverlayBase } from '../../pixiOverlayInterfaces';
3
- type vec2 = [number, number];
4
- /** Class for handling realtime position of wellbore. */
5
- export default class RealtimeWellbore {
6
- private map;
7
- private root;
8
- private prevCoords;
9
- constructor(pixiOverlay: pixiOverlayBase, wellbore: WellboreData);
10
- constructor(map: L.Map, wellbore: WellboreData);
11
- /** Get pixel coordinates of wellbore within map. */
12
- get pixelCoordinates(): vec2;
13
- /** Get pixel coordinates and check if value have changed since last call */
14
- getPixelCoordinates(): {
15
- coords: vec2;
16
- changed: boolean;
17
- };
18
- /** Returns true, if coordinates are equal with delta precision */
19
- private coordinatesEqual;
20
- }
21
- export {};
@@ -1,41 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- import { Color } from './Colors';
3
- type vec3 = [number, number, number];
4
- /** Uniforms used by the shader. */
5
- export interface WellboreUniforms {
6
- /** Color of lighted wellbore on the format: [R, G, B]. */
7
- wellboreColor1: vec3;
8
- /** Color of shaded wellbore on the format: [R, G, B]. */
9
- wellboreColor2: vec3;
10
- /** True if completion and ticks should be visible. */
11
- completionVisible: boolean;
12
- /** True if wellbore should be visible. */
13
- wellboreVisible: boolean;
14
- status: number;
15
- }
16
- export declare class WellboreShader {
17
- private static program;
18
- /**
19
- * Get shader for wellbore.
20
- * @param color Color used for wellbore
21
- * @param wellboreWidth Width of wellbore
22
- * @return PIXI shader
23
- */
24
- static get(color: Color, completionVisible: boolean, wellboreVisible: boolean): PIXI.Shader;
25
- /** Build wellbore shader with assigned variables. */
26
- static build(maxScale: number, wellboreDash: number): void;
27
- }
28
- export interface RootUniforms {
29
- active: boolean;
30
- circleColor1: [number, number, number];
31
- circleColor2: [number, number, number];
32
- rootRadius: number;
33
- }
34
- export declare class RootShader {
35
- private static program;
36
- /** Get root shader */
37
- static get(): PIXI.Shader;
38
- /** Build vertex shader from given resize configs */
39
- static build(maxScale: number): void;
40
- }
41
- export {};
@@ -1,48 +0,0 @@
1
- import { Colors, InputColors } from '../Colors';
2
- import { WellboreData } from './WellboreData';
3
- import { SourceData } from './SourceData';
4
- import { Detail, DetailOptions } from './details';
5
- export interface GroupOptions {
6
- order?: number;
7
- mirrorLabels?: boolean;
8
- colors?: InputColors;
9
- }
10
- interface WellboreState {
11
- completionVisible: boolean;
12
- wellboreVisible: boolean;
13
- }
14
- type Filter = (data: SourceData) => boolean;
15
- export declare class Group {
16
- key: string;
17
- colors: Colors;
18
- order: number;
19
- mirrorLabels: boolean;
20
- wellbores: WellboreData[];
21
- details: {
22
- [key: string]: Detail;
23
- };
24
- active: boolean;
25
- activeFilter: Filter;
26
- /** Is active filter soft or hard (Ghost) */
27
- isHardFilter: boolean;
28
- /** State of wellbores attached to group */
29
- state: WellboreState;
30
- constructor(key: string, options?: GroupOptions);
31
- registerDetail(key: string, detail: DetailOptions): void;
32
- setDetailVisibility(key: string, visible: boolean): void;
33
- resetDetails(): void;
34
- append(wellbore: WellboreData): void;
35
- /**
36
- * Iterate over all wellbores and unique roots.
37
- * @param wellboreFunc Function to call on wellbores
38
- * @param rootFunc Function to call on roots
39
- */
40
- private forAll;
41
- setActive(active: boolean): void;
42
- softFilter(filter: Filter): void;
43
- hardFilter(filter: Filter): void;
44
- clearFilter(): void;
45
- setCompletionVisibility(visible: boolean): void;
46
- setWellboreVisibility(visible: boolean): void;
47
- }
48
- export {};
@@ -1,29 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- import Vector2 from '@equinor/videx-vector2';
3
- import { WellboreData } from './WellboreData';
4
- export declare class RootData {
5
- static state: {
6
- rootRadius: number;
7
- maxScale: number;
8
- };
9
- mesh: PIXI.Mesh;
10
- wellbores: WellboreData[];
11
- position: Vector2;
12
- labelIndex: number;
13
- rootLabelsBBox: PIXI.Rectangle;
14
- /** Target wellbore data for color */
15
- target: WellboreData;
16
- constructor(position: Vector2);
17
- /** Active if */
18
- get active(): boolean;
19
- private updateLabelsBBox;
20
- /** Position wellbore label along wellbore. Should never be called if labels are disabled. */
21
- private positionLabel;
22
- append(wellbore: WellboreData): void;
23
- /** Recalculate target and update uniforms */
24
- recalculate(labelUpdate?: boolean): void;
25
- private updateTarget;
26
- private updateUniforms;
27
- updateLabels(): void;
28
- setLabelVisibility(visible: boolean): void;
29
- }
@@ -1,25 +0,0 @@
1
- /** Date for each interval. */
2
- export interface Interval {
3
- /** Type of interval [Screen, Perforation]. */
4
- type: string;
5
- /** Start of interval as distance along wellbore. */
6
- start: number;
7
- /** End of interval as distance along wellbore. */
8
- end: number;
9
- /** Start of interval along wellbore as a value between 0 and 1. */
10
- l1: number;
11
- /** End of interval along wellbore as a value between 0 and 1. */
12
- l2: number;
13
- }
14
- /** Wellbore data. */
15
- export interface SourceData {
16
- [key: string]: any;
17
- /** Collection of intervals. */
18
- intervals: Interval[];
19
- /** Full label of wellbore. */
20
- label: string;
21
- /** Short label of wellbore, ie. no country code. */
22
- labelShort: string;
23
- /** Path along wellbore on lat/long format. */
24
- path: [number, number][];
25
- }
@@ -1,76 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- import Vector2 from '@equinor/videx-vector2';
3
- import { SourceData } from './SourceData';
4
- import { RootData } from './RootData';
5
- import { Group } from './Group';
6
- import { LineInterpolator } from '../../LineInterpolator';
7
- import { WellboreUniforms } from '../Shader';
8
- import { Label } from '../labels/Label';
9
- import { Colors, Color } from '../Colors';
10
- import { TickConfig } from '../Config';
11
- import { Detail } from './details';
12
- export interface WellboreDataInput {
13
- data: SourceData;
14
- group: Group;
15
- root: RootData;
16
- /** Projected coordinates. */
17
- coords: Vector2[];
18
- /** Threshold for radius considered to be single point. */
19
- pointThreshold: number;
20
- wellboreWidth: number;
21
- tick: TickConfig;
22
- }
23
- export declare enum WellboreStatus {
24
- normal = 0,
25
- highlighted = 1,
26
- multiHighlighted = 2,
27
- selected = 3
28
- }
29
- /** Current filter status. Soft leaves gray wellbores, while hard leaves "ghost"-lines */
30
- export declare enum FilterStatus {
31
- none = 0,
32
- soft = 1,
33
- hard = 2
34
- }
35
- export declare class WellboreData {
36
- static state: {
37
- wellboreRadius: number;
38
- rootRadius: number;
39
- };
40
- data: SourceData;
41
- group: Group;
42
- wellboreWidth: number;
43
- interpolator: LineInterpolator;
44
- container: PIXI.Container;
45
- label: Label;
46
- private _zIndex;
47
- private details;
48
- private detailsDict;
49
- private mesh;
50
- root: RootData;
51
- status: WellboreStatus;
52
- private filter;
53
- constructor(input: WellboreDataInput);
54
- set zIndex(val: number);
55
- get colors(): Colors;
56
- get color(): Color;
57
- get active(): boolean;
58
- /**
59
- * Render wellbore details if data is available.
60
- * @param key - Unique identifier for the detail to render
61
- * @param detail - Object containing information to draw
62
- */
63
- tryDrawDetail(key: string, detail: Detail): void;
64
- setFilter(filter: FilterStatus): void;
65
- get selected(): boolean;
66
- get highlighted(): boolean;
67
- get order(): number;
68
- get uniforms(): WellboreUniforms;
69
- private createWellboreMesh;
70
- setCompletionVisibility(visible: boolean): void;
71
- setWellboreVisibility(visible: boolean): void;
72
- setDetailsVisibility(key: string, visible: boolean): void;
73
- setHighlight(isHighlighted: boolean, multiple?: boolean): void;
74
- setSelected(isSelected: boolean): void;
75
- update(): void;
76
- }
@@ -1,16 +0,0 @@
1
- import { SourceData } from './SourceData';
2
- import { WellboreData } from './WellboreData';
3
- export declare class WellboreEventData {
4
- group: string;
5
- data: SourceData;
6
- constructor(group: string, data: SourceData);
7
- static from(wellbore: WellboreData): WellboreEventData;
8
- }
9
- export declare class HighlightEvent {
10
- changed: boolean;
11
- originalEvent?: any;
12
- eventData: WellboreEventData[];
13
- constructor(eventData: WellboreEventData[], changed: boolean, originalEvent: any);
14
- static from(wellbores: WellboreData[], changed: boolean, originalEvent: any): HighlightEvent;
15
- get count(): number;
16
- }
@@ -1,20 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- import { SourceData } from '../SourceData';
3
- import { LineInterpolator } from '../../../LineInterpolator';
4
- import { DetailOptions, RelativePosition } from './DetailOptions';
5
- /** Detail represents graphics displayed along the wellbore, such as casing. */
6
- export declare abstract class Detail {
7
- initialized: boolean;
8
- visible: boolean;
9
- protected getData: (wellbore: SourceData, group: string) => RelativePosition[];
10
- protected color: PIXI.Color;
11
- protected group: string;
12
- constructor(options: DetailOptions, group?: string);
13
- /**
14
- * Obtain the relative position along the wellbore required for rendering graphics.
15
- * @param wellbore - Source data for the wellbore
16
- * @returns Relative position along the wellbore needed for drawing graphics
17
- */
18
- getRelative(wellbore: SourceData): RelativePosition[];
19
- abstract getGraphics(relative: RelativePosition, interpolator: LineInterpolator): PIXI.Graphics;
20
- }
@@ -1,7 +0,0 @@
1
- import { SourceData } from '../SourceData';
2
- export type RelativePosition = (number | [number, number]);
3
- export interface DetailOptions {
4
- getData: (wellbore: SourceData, group: string) => RelativePosition[];
5
- shape?: string;
6
- color?: [number, number, number];
7
- }
@@ -1,14 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- import { LineInterpolator } from '../../../LineInterpolator';
3
- import { DetailOptions } from './DetailOptions';
4
- import { Detail } from './Detail';
5
- export interface ShoeOptions extends DetailOptions {
6
- widthTop: number;
7
- widthBottom: number;
8
- }
9
- export declare class ShoeDetail extends Detail {
10
- private widthTop;
11
- private widthBottom;
12
- constructor(options: ShoeOptions, group?: string);
13
- getGraphics([top, bottom]: [number, number], interpolator: LineInterpolator): PIXI.Graphics;
14
- }
@@ -1,11 +0,0 @@
1
- export { Detail } from './Detail';
2
- export { DetailOptions } from './DetailOptions';
3
- import { DetailOptions } from './DetailOptions';
4
- import { ShoeDetail } from './ShoeDetail';
5
- /**
6
- * Retrieve the appropriate detail based on the shape specified in the options.
7
- * @param options - Detail configuration parameters
8
- * @param group - Group to which the detail belongs
9
- * @returns The correct detail based on the provided shape
10
- */
11
- export declare const getDetail: (options: DetailOptions, group?: string) => ShoeDetail;
@@ -1,6 +0,0 @@
1
- export { RootData } from './RootData';
2
- export { WellboreData } from './WellboreData';
3
- export { SourceData, Interval } from './SourceData';
4
- export { Group, GroupOptions } from './Group';
5
- export { Detail, DetailOptions } from './details';
6
- export { WellboreEventData, HighlightEvent } from './WellboreEventData';
@@ -1,6 +0,0 @@
1
- import Vector2 from '@equinor/videx-vector2';
2
- import { WellboreData, HighlightEvent } from './data';
3
- import WellboreModule from '../../WellboreModule';
4
- export declare function updateHighlighted(module: WellboreModule, pos: Vector2, onHighlightOn?: (event: HighlightEvent) => void, onHighlightOff?: () => void, originalEvent?: any): void;
5
- export declare function forceHighlight(module: WellboreModule, wellbore: WellboreData): void;
6
- export declare function clearHighlight(module: WellboreModule, onHighlightOff?: () => void): void;
@@ -1,15 +0,0 @@
1
- import { Interval } from './data';
2
- /**
3
- * Combines overlapping intervals.
4
- * @param intervals A collection of intervals on the format: [start, stop]
5
- * @returns Array with compressed intervals
6
- *
7
- * @example compressInterval([ [1, 5], [4, 7] ]); // Returns: [[1, 7]]
8
- */
9
- export declare function compressIntervals(intervals: [number, number][]): [number, number][];
10
- /**
11
- * Sorts intervals by length and compresses.
12
- * @param intervals Intervals to process
13
- * @returns Processed intervals
14
- */
15
- export declare function processIntervals(intervals: Interval[]): [number, number][];
@@ -1,39 +0,0 @@
1
- import * as PIXI from 'pixi.js';
2
- interface State {
3
- zoom: number;
4
- scale: number;
5
- visible: boolean;
6
- /** Displacement from root. */
7
- rootDisplacement: number;
8
- }
9
- /** Common configurations. */
10
- interface Common {
11
- backgroundOpacity: number;
12
- }
13
- export declare class Label {
14
- static state: State;
15
- private static style;
16
- static config: Common;
17
- static height: number;
18
- container: PIXI.Container;
19
- private text;
20
- background: PIXI.Graphics;
21
- metrics: PIXI.TextMetrics;
22
- private _attachToRoot;
23
- static setStyle(fontSize: number): void;
24
- static setCommon(config: Common): void;
25
- /**
26
- * Create a new label
27
- * @param label Content of label
28
- * @param fontColor Color of font
29
- * @param bgColor Color of background
30
- */
31
- constructor(label: string, fontColor: number, bgColor: number);
32
- get visible(): boolean;
33
- set visible(flag: boolean);
34
- set fontColor(color: number);
35
- get attachToRoot(): boolean;
36
- set attachToRoot(val: boolean);
37
- getBoundingBox(): PIXI.Rectangle;
38
- }
39
- export {};
@@ -1,2 +0,0 @@
1
- export { Label } from './Label';
2
- export * from './label-helper';
@@ -1,3 +0,0 @@
1
- import { WellboreData } from '../data';
2
- export declare function positionAtRoot(wellbore: WellboreData, position: number): void;
3
- export declare function positionAlongWellbore(wellbore: WellboreData): void;
@@ -1,23 +0,0 @@
1
- type Callback = (wellboreId: number) => void;
2
- export declare class CallbackRegistry {
3
- /** Internal callback register. */
4
- registry: {
5
- [key: string]: Callback;
6
- };
7
- /** Can map multiple strings to same callback. */
8
- map: {
9
- [key: string]: Callback;
10
- };
11
- constructor();
12
- /** Register callback */
13
- register(key: string, callback: Callback): void;
14
- /**
15
- * Used to map key given as first parameter in 'WellboreModule' with a callback in internal registy.
16
- * If key is blank, will try to retrieve 'setKey' from registry. Else key will map to default callback.
17
- * @param setKey Key to map to registry.
18
- * @param key Key in registry.
19
- */
20
- mapKey(setKey: string, key?: string): void;
21
- get(setKey?: string): Callback;
22
- }
23
- export {};
@@ -1,22 +0,0 @@
1
- import { Colors } from '../Colors';
2
- export declare class ColorRegistry {
3
- /** Internal color register. */
4
- registry: {
5
- [key: string]: Colors;
6
- };
7
- /** Can map multiple strings to same instance in registry. */
8
- map: {
9
- [key: string]: Colors;
10
- };
11
- constructor();
12
- /** Color collection */
13
- register(key: string, colors: Colors): void;
14
- /**
15
- * Used to map key given as first parameter in 'WellboreModule' with a color collection in internal registy.
16
- * If key is blank, will try to retrieve 'setKey' from registry. Else key will map to default color configurations.
17
- * @param setKey Key to map to registry.
18
- * @param key Key in registry.
19
- */
20
- mapKey(setKey: string, key?: string): void;
21
- get(setKey?: string): Colors;
22
- }
@@ -1,2 +0,0 @@
1
- export { ColorRegistry } from './ColorRegistry';
2
- export { CallbackRegistry } from './CallbackRegistry';