@mappedin/react-native-sdk 5.30.5-alpha.0 → 5.31.0
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.
package/dist/index.d.ts
CHANGED
|
@@ -463,6 +463,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common' {
|
|
|
463
463
|
export * from '@mappedin/react-native-sdk/wrappers/common/events';
|
|
464
464
|
export * from '@mappedin/react-native-sdk/wrappers/common/payloads';
|
|
465
465
|
export * from '@mappedin/react-native-sdk/wrappers/common/types';
|
|
466
|
+
export { processBridgeOptions } from '@mappedin/react-native-sdk/wrappers/common/options';
|
|
466
467
|
export { PubSub } from '@mappedin/react-native-sdk/wrappers/common/pub-sub';
|
|
467
468
|
}
|
|
468
469
|
|
|
@@ -627,7 +628,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
627
628
|
import type { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController';
|
|
628
629
|
import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip';
|
|
629
630
|
import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums';
|
|
630
|
-
import {
|
|
631
|
+
import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/OutdoorViewController';
|
|
631
632
|
export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
|
|
632
633
|
/** @internal */
|
|
633
634
|
export type Without<T, U> = {
|
|
@@ -1120,6 +1121,13 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1120
1121
|
outdoorGeometryLayers?: string[];
|
|
1121
1122
|
/**
|
|
1122
1123
|
* Use the current polygon objects directly rather than what is stored when rendering the map in CMS.
|
|
1124
|
+
*
|
|
1125
|
+
* Important Considerations:
|
|
1126
|
+
* - When this flag is set to true, the application will use live polygon data, which might not include certain enhancements such as 3D text annotations or automatically generated infill patterns. These features typically depend on the CMS's Render capabilities.
|
|
1127
|
+
* - Opting for live polygons means the system will not utilize the pre-processed optimized polygon data that is available through the CMS's rendering pipeline.
|
|
1128
|
+
* - This option is useful for applications requiring the most up-to-date representation of polygon data but may result in a less detailed visual representation due to the absence of certain rendered features.
|
|
1129
|
+
*
|
|
1130
|
+
* Use this option with caution, understanding the trade-offs between real-time update and visual detail.
|
|
1123
1131
|
*/
|
|
1124
1132
|
useLivePolygons?: boolean;
|
|
1125
1133
|
};
|
|
@@ -1128,7 +1136,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1128
1136
|
* Requires `multiBufferRendering` to be enabled.
|
|
1129
1137
|
* @experimental
|
|
1130
1138
|
*/
|
|
1131
|
-
outdoorView?:
|
|
1139
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
1132
1140
|
enabled?: boolean;
|
|
1133
1141
|
};
|
|
1134
1142
|
/**
|
|
@@ -1265,6 +1273,10 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1265
1273
|
onWebGLRendererError?: () => void;
|
|
1266
1274
|
};
|
|
1267
1275
|
export type TShowVenueOptions = {
|
|
1276
|
+
/**
|
|
1277
|
+
* Enable shading of bottoms of geometry along with outlines to make geometry stand out.
|
|
1278
|
+
*/
|
|
1279
|
+
shadingAndOutlines?: boolean;
|
|
1268
1280
|
/**
|
|
1269
1281
|
* @experimental
|
|
1270
1282
|
*
|
|
@@ -1322,7 +1334,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1322
1334
|
* @experimental
|
|
1323
1335
|
* Enable outdoor view. Requires multi-buffer rendering to be enabled
|
|
1324
1336
|
*/
|
|
1325
|
-
outdoorView?:
|
|
1337
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
1326
1338
|
enabled?: boolean;
|
|
1327
1339
|
};
|
|
1328
1340
|
/**
|
|
@@ -1827,12 +1839,13 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1827
1839
|
*/
|
|
1828
1840
|
[E_CAMERA_EVENT.TILT_CHANGED]: number;
|
|
1829
1841
|
};
|
|
1842
|
+
export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL };
|
|
1830
1843
|
export type { default as BlueDotController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BlueDotController';
|
|
1831
1844
|
export type { default as Journey } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Journey';
|
|
1832
1845
|
}
|
|
1833
1846
|
|
|
1834
1847
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
1835
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
1848
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
1836
1849
|
import { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin';
|
|
1837
1850
|
import { defaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things';
|
|
1838
1851
|
import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
@@ -1879,7 +1892,10 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
|
1879
1892
|
import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
1880
1893
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
1881
1894
|
export { MAP_RENDER_MODE, GET_VENUE_EVENT };
|
|
1882
|
-
|
|
1895
|
+
/**
|
|
1896
|
+
* @internal
|
|
1897
|
+
*/
|
|
1898
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
1883
1899
|
/**
|
|
1884
1900
|
* @internal
|
|
1885
1901
|
*/
|
|
@@ -1981,7 +1997,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
|
1981
1997
|
* Download a bundle and return a Mappedin instance
|
|
1982
1998
|
* @internal
|
|
1983
1999
|
*/
|
|
1984
|
-
export function downloadBundle(userOptions:
|
|
2000
|
+
export function downloadBundle(userOptions: TGetVenueBundleOptions, { url, updated_at }: {
|
|
1985
2001
|
url: any;
|
|
1986
2002
|
updated_at: any;
|
|
1987
2003
|
}): Promise<Mappedin>;
|
|
@@ -2885,6 +2901,9 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2885
2901
|
import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate, TSerializedMap, TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon, TFloatingLabelClickEventPayloadSerialized, TColliderClickEventPayloadSerialized } from '@mappedin/react-native-sdk/wrappers/common/types';
|
|
2886
2902
|
import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
|
|
2887
2903
|
import { TAnimationOptions, TAntialiasConfiguration, TCreateTooltipCommonOptions, TCreateTooltipOptions, TGetVenueMakerOptions, TAOConfiguration } from '@mappedin/react-native-sdk/sdks/cms/src';
|
|
2904
|
+
export type TBridgeGetVenueOptions = (TGetVenueOptions | TGetVenueMakerOptions) & {
|
|
2905
|
+
useBundle?: boolean;
|
|
2906
|
+
};
|
|
2888
2907
|
export type BRIDGE_EVENT_PAYLOADS = {
|
|
2889
2908
|
[BRIDGE_EVENT.REJECT]: any;
|
|
2890
2909
|
[BRIDGE_EVENT.RESOLVE]: any;
|
|
@@ -2973,9 +2992,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2973
2992
|
};
|
|
2974
2993
|
};
|
|
2975
2994
|
[EVENT.LOAD_VENUE]: {
|
|
2976
|
-
options:
|
|
2977
|
-
useBundle?: boolean;
|
|
2978
|
-
};
|
|
2995
|
+
options: TBridgeGetVenueOptions;
|
|
2979
2996
|
showVenueOptions: TShowVenueOptions & {
|
|
2980
2997
|
/**
|
|
2981
2998
|
* Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
|
|
@@ -3363,6 +3380,16 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
|
|
|
3363
3380
|
};
|
|
3364
3381
|
}
|
|
3365
3382
|
|
|
3383
|
+
declare module '@mappedin/react-native-sdk/wrappers/common/options' {
|
|
3384
|
+
import type { TGetVenueOptionsInternal, TAllGetVenueOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
3385
|
+
/**
|
|
3386
|
+
* Covert Bridge Options to get-venue options
|
|
3387
|
+
*/
|
|
3388
|
+
export function processBridgeOptions(bridgeOptions: TGetVenueOptions & {
|
|
3389
|
+
useBundle?: boolean;
|
|
3390
|
+
}): TGetVenueOptionsInternal<TAllGetVenueOptions>;
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3366
3393
|
declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
|
|
3367
3394
|
export class PubSub<EVENT_PAYLOAD> {
|
|
3368
3395
|
_subscribers: any;
|
|
@@ -3706,6 +3733,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3706
3733
|
LOAD_MINIMAP: {
|
|
3707
3734
|
msgID?: string;
|
|
3708
3735
|
data: {
|
|
3736
|
+
/**
|
|
3737
|
+
* Handle resolution from the other side, with a value if one was expected
|
|
3738
|
+
* @hidden
|
|
3739
|
+
*/
|
|
3709
3740
|
options: import("../react-native-sdk/src").TGetVenueOptions | import("../react-native-sdk/src").TGetVenueMakerOptions;
|
|
3710
3741
|
};
|
|
3711
3742
|
};
|
|
@@ -3836,9 +3867,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3836
3867
|
LOAD_VENUE: {
|
|
3837
3868
|
msgID?: string;
|
|
3838
3869
|
data: {
|
|
3839
|
-
options:
|
|
3840
|
-
useBundle?: boolean;
|
|
3841
|
-
};
|
|
3870
|
+
options: import("./payloads").TBridgeGetVenueOptions;
|
|
3842
3871
|
showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
|
|
3843
3872
|
prepareSearch?: boolean;
|
|
3844
3873
|
searchOptions?: Partial<import("../react-native-sdk/src").TMappedinOfflineSearchAllOptions>;
|
|
@@ -4944,45 +4973,97 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
4944
4973
|
import './OutdoorViewController.scss';
|
|
4945
4974
|
import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
4946
4975
|
import { XOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types';
|
|
4976
|
+
/**
|
|
4977
|
+
* Represents the possible positions for map attribution.
|
|
4978
|
+
*/
|
|
4947
4979
|
export type TAttributionPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4980
|
+
/**
|
|
4981
|
+
* Defines the options for an Outdoor View when initialized with headers for authentication.
|
|
4982
|
+
*/
|
|
4983
|
+
export type TOutdoorViewOptionsWithHeaders = {
|
|
4984
|
+
/**
|
|
4985
|
+
* The URL to the map style file.
|
|
4986
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
4987
|
+
*/
|
|
4988
|
+
url?: string;
|
|
4989
|
+
/**
|
|
4990
|
+
* The position on the map where the attribution should be displayed.
|
|
4991
|
+
* @default 'bottom-right'
|
|
4992
|
+
*/
|
|
4993
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4994
|
+
/**
|
|
4995
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
4996
|
+
*/
|
|
4997
|
+
customAttribution?: string | string[];
|
|
4998
|
+
/**
|
|
4999
|
+
* An object containing HTTP headers for authentication purposes.
|
|
5000
|
+
* */
|
|
5001
|
+
headers: {
|
|
5002
|
+
[key: string]: string | null;
|
|
5003
|
+
};
|
|
4955
5004
|
};
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
5005
|
+
/**
|
|
5006
|
+
* Defines the options for an Outdoor View when initialized with a URL for authentication.
|
|
5007
|
+
*/
|
|
5008
|
+
export type TOutdoorViewOptionsWithAuthURL = {
|
|
5009
|
+
/**
|
|
5010
|
+
* The URL to the map style file.
|
|
5011
|
+
* @see https://github.com/maplibre/maplibre-style-spec/
|
|
5012
|
+
*/
|
|
5013
|
+
url?: string;
|
|
5014
|
+
/**
|
|
5015
|
+
* The URL to obtain an authentication token.
|
|
5016
|
+
*/
|
|
5017
|
+
authURL?: string;
|
|
5018
|
+
/**
|
|
5019
|
+
* Custom text or an array of texts to be used for the map attribution.
|
|
5020
|
+
*/
|
|
5021
|
+
customAttribution?: string | string[];
|
|
5022
|
+
/**
|
|
5023
|
+
* The position on the map where the attribution should be displayed.
|
|
5024
|
+
* @default 'bottom-right'
|
|
5025
|
+
*/
|
|
5026
|
+
attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4961
5027
|
};
|
|
4962
|
-
|
|
5028
|
+
/**
|
|
5029
|
+
* Defines the options for initializing an Outdoor View.
|
|
5030
|
+
* This is a union type that requires exclusive or logic,
|
|
5031
|
+
* ensuring that an instance can either have headers or
|
|
5032
|
+
* an authentication URL, but not both.
|
|
5033
|
+
*
|
|
5034
|
+
* Note: It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
5035
|
+
*
|
|
5036
|
+
* @property {string} [url] - The URL to the map style file.
|
|
5037
|
+
* @property {TAttributionPosition} [attributionPosition='bottom-right'] - The position on the map where the attribution should be displayed.
|
|
5038
|
+
* @property {string | string[]} [customAttribution] - Custom text or an array of texts to be used for the map attribution.
|
|
5039
|
+
* @property {Object.<string, string | null>} [headers] - An object containing HTTP headers for authentication purposes. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
5040
|
+
* @property {string} [authURL] - The URL to obtain an authentication token. It isn't permitted to use `.headers` and `.authURL` options simultaneously.
|
|
5041
|
+
* @interface
|
|
5042
|
+
*/
|
|
5043
|
+
export type TOutdoorViewOptions = XOR<TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL>;
|
|
4963
5044
|
class OutdoorViewController {
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
5045
|
+
_attribution: any;
|
|
5046
|
+
core: ICore;
|
|
5047
|
+
map: any;
|
|
5048
|
+
enabled: boolean;
|
|
5049
|
+
hidden: boolean;
|
|
5050
|
+
url: string;
|
|
5051
|
+
authURL: string;
|
|
5052
|
+
headers?: TOutdoorViewOptions['headers'];
|
|
5053
|
+
customAttribution?: string | string[];
|
|
5054
|
+
attributionPosition?: TAttributionPosition;
|
|
5055
|
+
loaded: boolean;
|
|
5056
|
+
constructor(core: ICore, options?: TOutdoorViewOptions);
|
|
5057
|
+
module: any;
|
|
5058
|
+
load(): Promise<void>;
|
|
5059
|
+
get attributions(): any;
|
|
5060
|
+
hide(): void;
|
|
5061
|
+
show(): void;
|
|
5062
|
+
resize(): void;
|
|
5063
|
+
getRequestHeaders: () => Promise<TOutdoorViewOptions['headers']>;
|
|
5064
|
+
render(): void;
|
|
5065
|
+
setStyle(style: any): void;
|
|
5066
|
+
setAttributionPosition(position: TAttributionPosition): void;
|
|
4986
5067
|
}
|
|
4987
5068
|
export default OutdoorViewController;
|
|
4988
5069
|
}
|
|
@@ -5109,6 +5190,14 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
|
|
|
5109
5190
|
}
|
|
5110
5191
|
|
|
5111
5192
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types' {
|
|
5193
|
+
import type { TGetVenueMVFOptions, TGetVenueMakerOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue';
|
|
5194
|
+
import type { DefaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things';
|
|
5195
|
+
export type MergedThings = {
|
|
5196
|
+
[key in keyof DefaultThings]: string[];
|
|
5197
|
+
} & {
|
|
5198
|
+
[k: string]: string[];
|
|
5199
|
+
};
|
|
5200
|
+
export type ThingsOption = Partial<MergedThings>;
|
|
5112
5201
|
export type TGetVenueOptions = {
|
|
5113
5202
|
accessToken?: string;
|
|
5114
5203
|
clientId?: string;
|
|
@@ -5122,22 +5211,44 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
|
|
|
5122
5211
|
[key in string]: string;
|
|
5123
5212
|
};
|
|
5124
5213
|
venue: string;
|
|
5125
|
-
|
|
5214
|
+
/**
|
|
5215
|
+
* An object specifying additional properties to fetch for each data item.
|
|
5216
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
5217
|
+
* @example
|
|
5218
|
+
* For example:
|
|
5219
|
+
* ```
|
|
5220
|
+
* getVenue({
|
|
5221
|
+
* venue: 'some-venue',
|
|
5222
|
+
* things: { vortexes: [ 'material' ]
|
|
5223
|
+
* }})
|
|
5224
|
+
* ```
|
|
5225
|
+
*/
|
|
5226
|
+
things?: ThingsOption;
|
|
5126
5227
|
useDraftData?: boolean;
|
|
5127
5228
|
platformString?: string;
|
|
5128
5229
|
emitAnalyticsEvents?: boolean;
|
|
5129
5230
|
secure?: boolean;
|
|
5130
5231
|
preloadMapGeometry?: boolean;
|
|
5131
5232
|
};
|
|
5132
|
-
export type
|
|
5233
|
+
export type TProcessedMVFOptions = TGetVenueMakerOptions & {
|
|
5234
|
+
emitAnalyticsEvents: boolean;
|
|
5235
|
+
clientId: string;
|
|
5236
|
+
clientSecret: string;
|
|
5237
|
+
venue: string;
|
|
5238
|
+
};
|
|
5239
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
5240
|
+
perspective?: string;
|
|
5241
|
+
});
|
|
5242
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
5133
5243
|
baseUrl?: string;
|
|
5134
5244
|
supplementaryUrl?: string;
|
|
5135
5245
|
noAuth?: boolean;
|
|
5136
5246
|
includeHidden?: boolean;
|
|
5137
5247
|
apiGateway?: string;
|
|
5138
5248
|
authorization?: string;
|
|
5139
|
-
things?: any;
|
|
5140
5249
|
headers?: any;
|
|
5250
|
+
}, 'things'> & {
|
|
5251
|
+
things?: MergedThings;
|
|
5141
5252
|
};
|
|
5142
5253
|
export type TVenueMetadata = {
|
|
5143
5254
|
languages: {
|
|
@@ -5160,14 +5271,14 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
|
|
|
5160
5271
|
|
|
5161
5272
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin' {
|
|
5162
5273
|
import { Navigator } from '@mappedin/react-native-sdk/sdks/packages/navigator';
|
|
5163
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
5274
|
+
import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
5164
5275
|
import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup, GET_VENUE_PAYLOAD } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
5165
5276
|
import { TAccessors, GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
5166
5277
|
import { IAnalytics } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.CustomerAnalytics';
|
|
5167
5278
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
5168
5279
|
import { ParsedMVFv1 } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.MVF.types';
|
|
5169
5280
|
import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed';
|
|
5170
|
-
export const defaultOptions: TGetVenueOptionsInternal
|
|
5281
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
5171
5282
|
export class Mappedin extends PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT> {
|
|
5172
5283
|
#private;
|
|
5173
5284
|
perspective: any;
|
|
@@ -5399,7 +5510,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin' {
|
|
|
5399
5510
|
/**
|
|
5400
5511
|
* @deprecated Use {@link hydrateVenue} instead
|
|
5401
5512
|
*/
|
|
5402
|
-
constructor(options: TGetVenueOptionsInternal
|
|
5513
|
+
constructor(options: TGetVenueOptionsInternal<TAllGetVenueOptions>);
|
|
5403
5514
|
analytics: IAnalytics;
|
|
5404
5515
|
/**
|
|
5405
5516
|
* @hidden
|
|
@@ -5429,6 +5540,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/default-thing
|
|
|
5429
5540
|
themes: string[];
|
|
5430
5541
|
rankings: string[];
|
|
5431
5542
|
};
|
|
5543
|
+
export type DefaultThings = typeof defaultThings;
|
|
5432
5544
|
}
|
|
5433
5545
|
|
|
5434
5546
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/internal' {
|
|
@@ -5760,6 +5872,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocat
|
|
|
5760
5872
|
siblingGroups?: TSiblingGroup[] | undefined;
|
|
5761
5873
|
gallery?: TGalleryImage[] | undefined;
|
|
5762
5874
|
amenity?: string | undefined;
|
|
5875
|
+
filterFlags?: string[];
|
|
5763
5876
|
constructor(mappedin: Mappedin, data: any);
|
|
5764
5877
|
/**
|
|
5765
5878
|
* Polygons this Location is attached to.
|
|
@@ -6322,8 +6435,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.
|
|
|
6322
6435
|
}
|
|
6323
6436
|
|
|
6324
6437
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FlatLabelsController' {
|
|
6325
|
-
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
6326
|
-
import { FlatLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
6438
|
+
import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore, FlatLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
6327
6439
|
import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue';
|
|
6328
6440
|
export const LABEL_ALL_LOCATIONS_WARNING = "Adding or removing individual labels after calling labelAllLocations() may cause unexpected behaviour. We recommend adding all labels individually if more specific control is desired. https://developer.mappedin.com/web-sdk-api/v5/latest/classes/flatlabels#add";
|
|
6329
6441
|
export type FlatLabelRenderObject = TAddFlatLabelOptions & {
|
|
@@ -6958,7 +7070,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
6958
7070
|
}
|
|
6959
7071
|
|
|
6960
7072
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/shave-text' {
|
|
6961
|
-
export type TDrawFn = (ctx: CanvasRenderingContext2D, x: number, y: number) => void;
|
|
7073
|
+
export type TDrawFn = (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number) => void;
|
|
6962
7074
|
type TShave = (str: string, size: number, maxWidth: number, maxLines?: number, lineHeight?: number, options?: {
|
|
6963
7075
|
strokeText: boolean;
|
|
6964
7076
|
}) => {
|
|
@@ -7908,6 +8020,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVorte
|
|
|
7908
8020
|
weight?: number;
|
|
7909
8021
|
multiplier?: number;
|
|
7910
8022
|
nodes?: string[];
|
|
8023
|
+
filterFlags?: string[];
|
|
7911
8024
|
constructor(data: any);
|
|
7912
8025
|
static hydrate(vortexes: any): MappedinVortex[];
|
|
7913
8026
|
static fetch(mappedin: Mappedin): Promise<MappedinVortex[]>;
|
|
@@ -8240,12 +8353,12 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMapGr
|
|
|
8240
8353
|
}
|
|
8241
8354
|
|
|
8242
8355
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
8243
|
-
import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
8356
|
+
import type { MergedThings, TGetVenueOptions, TGetVenueOptionsInternal, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
8244
8357
|
import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
8245
8358
|
import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
8246
8359
|
export function isGatewayKey(key: string): boolean;
|
|
8247
8360
|
export function stringifyQuery(query: any, gateway?: boolean): string;
|
|
8248
|
-
export function buildUrl(options: TGetVenueOptionsInternal
|
|
8361
|
+
export function buildUrl(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): string;
|
|
8249
8362
|
/**
|
|
8250
8363
|
* Make a network request to the Mappedin API to fetch an array of objects.
|
|
8251
8364
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -8254,7 +8367,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8254
8367
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
8255
8368
|
* @returns the result json
|
|
8256
8369
|
*/
|
|
8257
|
-
export function getArray(options: TGetVenueOptionsInternal
|
|
8370
|
+
export function getArray(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): Promise<any>;
|
|
8258
8371
|
/**
|
|
8259
8372
|
* Make a network request to the Mappedin API to fetch an object.
|
|
8260
8373
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -8264,21 +8377,21 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8264
8377
|
* @param isExpectingArray whether the endpoint returns an array
|
|
8265
8378
|
* @returns the result json
|
|
8266
8379
|
*/
|
|
8267
|
-
export function getObject(options: TGetVenueOptionsInternal
|
|
8380
|
+
export function getObject(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean, isExpectingArray?: boolean): Promise<any>;
|
|
8268
8381
|
/**
|
|
8269
8382
|
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
8270
8383
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
8271
8384
|
* @param url string describing the url corresponding to the client's request
|
|
8272
8385
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
8273
8386
|
*/
|
|
8274
|
-
export function constructParamsForRequest(options: TGetVenueOptionsInternal
|
|
8387
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
8275
8388
|
req: {
|
|
8276
8389
|
method: string;
|
|
8277
8390
|
headers: any;
|
|
8278
8391
|
};
|
|
8279
8392
|
url: string;
|
|
8280
8393
|
};
|
|
8281
|
-
export function generateAPIRequest(options: TGetVenueOptionsInternal
|
|
8394
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
8282
8395
|
export function addToSet(array: any, value: any): void;
|
|
8283
8396
|
export function getDistanceBetweenLatLon([lat1, lon1]: [number, number], [lat2, lon2]: [number, number]): any;
|
|
8284
8397
|
export function getMapScale(map: MappedinMap): any;
|
|
@@ -8312,6 +8425,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8312
8425
|
* @return {MappedinLocation}
|
|
8313
8426
|
*/
|
|
8314
8427
|
export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null;
|
|
8428
|
+
export function mergeThings(thingsOption: ThingsOption | undefined): MergedThings;
|
|
8315
8429
|
}
|
|
8316
8430
|
|
|
8317
8431
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.cache' {
|
|
@@ -9829,6 +9943,17 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9829
9943
|
assetManager: AssetManager;
|
|
9830
9944
|
imageVisible: boolean;
|
|
9831
9945
|
labelVisible: boolean;
|
|
9946
|
+
polygonHeight: number;
|
|
9947
|
+
geometry: ExtrudeGeometry;
|
|
9948
|
+
mesh: Mesh;
|
|
9949
|
+
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
9950
|
+
labelMesh?: Mesh;
|
|
9951
|
+
imageMesh?: Mesh;
|
|
9952
|
+
/**
|
|
9953
|
+
* For the time being we indicate inflated walls so they don't add to ray casting. Since these are walls it's a good optimization
|
|
9954
|
+
*/
|
|
9955
|
+
isInflated: boolean;
|
|
9956
|
+
sortScore: number | null;
|
|
9832
9957
|
boundingBox: {
|
|
9833
9958
|
min: {
|
|
9834
9959
|
x: number;
|
|
@@ -9841,13 +9966,6 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9841
9966
|
z: number;
|
|
9842
9967
|
};
|
|
9843
9968
|
};
|
|
9844
|
-
polygonHeight: number;
|
|
9845
|
-
geometry: ExtrudeGeometry;
|
|
9846
|
-
mesh: Mesh;
|
|
9847
|
-
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
9848
|
-
labelMesh?: Mesh;
|
|
9849
|
-
imageMesh?: Mesh;
|
|
9850
|
-
sortScore: number | null;
|
|
9851
9969
|
static materials: {
|
|
9852
9970
|
[key in string]: MeshLambertMaterial | MeshLambertMaterial[];
|
|
9853
9971
|
};
|
|
@@ -9863,7 +9981,8 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9863
9981
|
x: number;
|
|
9864
9982
|
y: number;
|
|
9865
9983
|
};
|
|
9866
|
-
static _makeFromCoords(className: any, coords: any, mapClass: any): any;
|
|
9984
|
+
static _makeFromCoords(className: any, coords: any, mapClass: any, element: any): any;
|
|
9985
|
+
static _inflate(coords: any, width: any): any;
|
|
9867
9986
|
static _setPolygonDefaults(poly: any): any;
|
|
9868
9987
|
constructor(poly: MappedinPolygon, mapClass: MappedinMap, container: Group, assetManager: any, mapLoadingStrategy?: MAP_RENDER_MODE);
|
|
9869
9988
|
getBoundingBox(): {
|
|
@@ -10474,158 +10593,9 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
10474
10593
|
}
|
|
10475
10594
|
|
|
10476
10595
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils' {
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
/**
|
|
10481
|
-
* Utils function listing
|
|
10482
|
-
*
|
|
10483
|
-
* - scrubMaterial
|
|
10484
|
-
* - getObjectID
|
|
10485
|
-
* - getObject
|
|
10486
|
-
* - getBoundingBox
|
|
10487
|
-
* - getBiggestBoundingBox
|
|
10488
|
-
* - upackBoundingBox
|
|
10489
|
-
* - getMapScale
|
|
10490
|
-
* - throttle -> taken from lodash.js
|
|
10491
|
-
* - getProjectionScaleFactor
|
|
10492
|
-
* - getZoom
|
|
10493
|
-
*/
|
|
10494
|
-
export function isGatewayKey(key: string): boolean;
|
|
10495
|
-
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
10496
|
-
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
10497
|
-
export function scrubMaterial(material: Material): void;
|
|
10498
|
-
/**
|
|
10499
|
-
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
10500
|
-
* @template T extends string | {id: string}
|
|
10501
|
-
* @param {T} object - input can be object containing id or the id itself
|
|
10502
|
-
* @return {string}
|
|
10503
|
-
*/
|
|
10504
|
-
export function getObjectId(object: any): string;
|
|
10505
|
-
/**
|
|
10506
|
-
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
10507
|
-
*/
|
|
10508
|
-
export function getObject<K extends {
|
|
10509
|
-
id: string;
|
|
10510
|
-
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
10511
|
-
export function getBoundingBox(object: Object3D): Box3;
|
|
10512
|
-
/**
|
|
10513
|
-
* Function pushes the items of the second array onto the first array (inplace).
|
|
10514
|
-
* @template T
|
|
10515
|
-
* @param {Array.<T>} arr1 - base array
|
|
10516
|
-
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
10517
|
-
*/
|
|
10518
|
-
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
10519
|
-
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
10520
|
-
min: any;
|
|
10521
|
-
max: any;
|
|
10522
|
-
};
|
|
10523
|
-
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
10524
|
-
export function getMapScale(map: MappedinMap): number;
|
|
10525
|
-
export function getNorth(map: MappedinMap): number;
|
|
10526
|
-
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
10527
|
-
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
10528
|
-
export function flatten(list: any[]): any[];
|
|
10529
|
-
export function uniq(arr: any[]): any[];
|
|
10530
|
-
export function toStyleString(styles: Record<string, string>): string;
|
|
10531
|
-
/**
|
|
10532
|
-
/* getProjectionScaleFactor()
|
|
10533
|
-
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
10534
|
-
/*
|
|
10535
|
-
* R
|
|
10536
|
-
* /|
|
|
10537
|
-
* C : Camera / |
|
|
10538
|
-
* PQ : Projection Plane / |
|
|
10539
|
-
* OR : Origin / |
|
|
10540
|
-
* F : FOV / |
|
|
10541
|
-
* Q / |
|
|
10542
|
-
* /| |
|
|
10543
|
-
* / | |
|
|
10544
|
-
* / | |
|
|
10545
|
-
* / | |
|
|
10546
|
-
* / | |
|
|
10547
|
-
* / F/2 | |
|
|
10548
|
-
* C ------------P------------ O
|
|
10549
|
-
*
|
|
10550
|
-
*
|
|
10551
|
-
* ProjectionScaleFactor = ( OR / PQ )
|
|
10552
|
-
* PQ = canvasHeight / 2
|
|
10553
|
-
* CQ = zoom
|
|
10554
|
-
*
|
|
10555
|
-
* OR / C0 = tan(F/2)
|
|
10556
|
-
* so OR = CO * tan(F/2)
|
|
10557
|
-
*/
|
|
10558
|
-
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
10559
|
-
/** getZoom
|
|
10560
|
-
*
|
|
10561
|
-
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
10562
|
-
* QR - front side of maps Bounding Box, F: FOV
|
|
10563
|
-
*
|
|
10564
|
-
* Z-axis
|
|
10565
|
-
* R_____|______
|
|
10566
|
-
* /| | |
|
|
10567
|
-
* / | | |
|
|
10568
|
-
* P/ | | | maps BB
|
|
10569
|
-
* /| | | |
|
|
10570
|
-
* / | | | |
|
|
10571
|
-
* / | | | |
|
|
10572
|
-
* / F |E |T |S |
|
|
10573
|
-
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
10574
|
-
* \ | | | |
|
|
10575
|
-
* \ | | | |
|
|
10576
|
-
* \ | | | |
|
|
10577
|
-
* \ | | | |
|
|
10578
|
-
* \| | | |
|
|
10579
|
-
* O\ | | |
|
|
10580
|
-
* \ | | |
|
|
10581
|
-
* \|_____|_____|
|
|
10582
|
-
* Q
|
|
10583
|
-
*
|
|
10584
|
-
*
|
|
10585
|
-
* We want to get CS, which is the camera zoom
|
|
10586
|
-
*
|
|
10587
|
-
*/
|
|
10588
|
-
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
10589
|
-
interface CalculateTwoDProjectionsParams {
|
|
10590
|
-
maps: MapObject[];
|
|
10591
|
-
width: number;
|
|
10592
|
-
height: number;
|
|
10593
|
-
camera: Camera;
|
|
10594
|
-
}
|
|
10595
|
-
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
10596
|
-
min: {
|
|
10597
|
-
x: number;
|
|
10598
|
-
y: number;
|
|
10599
|
-
};
|
|
10600
|
-
max: {
|
|
10601
|
-
x: number;
|
|
10602
|
-
y: number;
|
|
10603
|
-
};
|
|
10604
|
-
}[];
|
|
10605
|
-
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
10606
|
-
export function isObject(item: any): boolean;
|
|
10607
|
-
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
10608
|
-
export function cyrb53(str: string, seed?: number): number;
|
|
10609
|
-
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
10610
|
-
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
10611
|
-
from: any;
|
|
10612
|
-
to: any;
|
|
10613
|
-
duration?: number;
|
|
10614
|
-
easing?: any;
|
|
10615
|
-
delay?: number;
|
|
10616
|
-
onUpdate?: (_: any) => void;
|
|
10617
|
-
onStart?: () => void;
|
|
10618
|
-
onComplete?: () => void;
|
|
10619
|
-
}): {
|
|
10620
|
-
start(core: any): Promise<void>;
|
|
10621
|
-
};
|
|
10622
|
-
export const linearEase: (t: number) => number;
|
|
10623
|
-
export const quadEaseIn: (t: number) => number;
|
|
10624
|
-
export const quadEaseOut: (t: number) => number;
|
|
10625
|
-
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
10626
|
-
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
10627
|
-
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
10628
|
-
export {};
|
|
10596
|
+
export * from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/utils';
|
|
10597
|
+
export { shouldDisableOffscreenCanvas } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/browser';
|
|
10598
|
+
export { throttle, debounce } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/async';
|
|
10629
10599
|
}
|
|
10630
10600
|
|
|
10631
10601
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView' {
|
|
@@ -12307,6 +12277,203 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
12307
12277
|
};
|
|
12308
12278
|
}
|
|
12309
12279
|
|
|
12280
|
+
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/utils' {
|
|
12281
|
+
import { Box3, Vector3, Object3D, Material } from 'three';
|
|
12282
|
+
import { Mappedin, MapObject, MappedinMap, TMapViewOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
12283
|
+
import { Camera } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Camera';
|
|
12284
|
+
/**
|
|
12285
|
+
* Utils function listing
|
|
12286
|
+
*
|
|
12287
|
+
* - scrubMaterial
|
|
12288
|
+
* - getObjectID
|
|
12289
|
+
* - getObject
|
|
12290
|
+
* - getBoundingBox
|
|
12291
|
+
* - getBiggestBoundingBox
|
|
12292
|
+
* - upackBoundingBox
|
|
12293
|
+
* - getMapScale
|
|
12294
|
+
* - throttle -> taken from lodash.js
|
|
12295
|
+
* - getProjectionScaleFactor
|
|
12296
|
+
* - getZoom
|
|
12297
|
+
*/
|
|
12298
|
+
export function isGatewayKey(key: string): boolean;
|
|
12299
|
+
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
12300
|
+
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
12301
|
+
export function scrubMaterial(material: Material): void;
|
|
12302
|
+
/**
|
|
12303
|
+
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
12304
|
+
* @template T extends string | {id: string}
|
|
12305
|
+
* @param {T} object - input can be object containing id or the id itself
|
|
12306
|
+
* @return {string}
|
|
12307
|
+
*/
|
|
12308
|
+
export function getObjectId(object: any): string;
|
|
12309
|
+
/**
|
|
12310
|
+
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
12311
|
+
*/
|
|
12312
|
+
export function getObject<K extends {
|
|
12313
|
+
id: string;
|
|
12314
|
+
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
12315
|
+
export function getBoundingBox(object: Object3D): Box3;
|
|
12316
|
+
/**
|
|
12317
|
+
* Function pushes the items of the second array onto the first array (inplace).
|
|
12318
|
+
* @template T
|
|
12319
|
+
* @param {Array.<T>} arr1 - base array
|
|
12320
|
+
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
12321
|
+
*/
|
|
12322
|
+
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
12323
|
+
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
12324
|
+
min: any;
|
|
12325
|
+
max: any;
|
|
12326
|
+
};
|
|
12327
|
+
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
12328
|
+
export function getMapScale(map: MappedinMap): number;
|
|
12329
|
+
export function getNorth(map: MappedinMap): number;
|
|
12330
|
+
export function flatten(list: any[]): any[];
|
|
12331
|
+
export function uniq(arr: any[]): any[];
|
|
12332
|
+
export function toStyleString(styles: Record<string, string>): string;
|
|
12333
|
+
/**
|
|
12334
|
+
/* getProjectionScaleFactor()
|
|
12335
|
+
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
12336
|
+
/*
|
|
12337
|
+
* R
|
|
12338
|
+
* /|
|
|
12339
|
+
* C : Camera / |
|
|
12340
|
+
* PQ : Projection Plane / |
|
|
12341
|
+
* OR : Origin / |
|
|
12342
|
+
* F : FOV / |
|
|
12343
|
+
* Q / |
|
|
12344
|
+
* /| |
|
|
12345
|
+
* / | |
|
|
12346
|
+
* / | |
|
|
12347
|
+
* / | |
|
|
12348
|
+
* / | |
|
|
12349
|
+
* / F/2 | |
|
|
12350
|
+
* C ------------P------------ O
|
|
12351
|
+
*
|
|
12352
|
+
*
|
|
12353
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
12354
|
+
* PQ = canvasHeight / 2
|
|
12355
|
+
* CQ = zoom
|
|
12356
|
+
*
|
|
12357
|
+
* OR / C0 = tan(F/2)
|
|
12358
|
+
* so OR = CO * tan(F/2)
|
|
12359
|
+
*/
|
|
12360
|
+
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
12361
|
+
/** getZoom
|
|
12362
|
+
*
|
|
12363
|
+
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
12364
|
+
* QR - front side of maps Bounding Box, F: FOV
|
|
12365
|
+
*
|
|
12366
|
+
* Z-axis
|
|
12367
|
+
* R_____|______
|
|
12368
|
+
* /| | |
|
|
12369
|
+
* / | | |
|
|
12370
|
+
* P/ | | | maps BB
|
|
12371
|
+
* /| | | |
|
|
12372
|
+
* / | | | |
|
|
12373
|
+
* / | | | |
|
|
12374
|
+
* / F |E |T |S |
|
|
12375
|
+
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
12376
|
+
* \ | | | |
|
|
12377
|
+
* \ | | | |
|
|
12378
|
+
* \ | | | |
|
|
12379
|
+
* \ | | | |
|
|
12380
|
+
* \| | | |
|
|
12381
|
+
* O\ | | |
|
|
12382
|
+
* \ | | |
|
|
12383
|
+
* \|_____|_____|
|
|
12384
|
+
* Q
|
|
12385
|
+
*
|
|
12386
|
+
*
|
|
12387
|
+
* We want to get CS, which is the camera zoom
|
|
12388
|
+
*
|
|
12389
|
+
*/
|
|
12390
|
+
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
12391
|
+
interface CalculateTwoDProjectionsParams {
|
|
12392
|
+
maps: MapObject[];
|
|
12393
|
+
width: number;
|
|
12394
|
+
height: number;
|
|
12395
|
+
camera: Camera;
|
|
12396
|
+
}
|
|
12397
|
+
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
12398
|
+
min: {
|
|
12399
|
+
x: number;
|
|
12400
|
+
y: number;
|
|
12401
|
+
};
|
|
12402
|
+
max: {
|
|
12403
|
+
x: number;
|
|
12404
|
+
y: number;
|
|
12405
|
+
};
|
|
12406
|
+
}[];
|
|
12407
|
+
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
12408
|
+
export function isObject(item: any): boolean;
|
|
12409
|
+
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
12410
|
+
export function cyrb53(str: string, seed?: number): number;
|
|
12411
|
+
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
12412
|
+
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
12413
|
+
from: any;
|
|
12414
|
+
to: any;
|
|
12415
|
+
duration?: number;
|
|
12416
|
+
easing?: any;
|
|
12417
|
+
delay?: number;
|
|
12418
|
+
onUpdate?: (_: any) => void;
|
|
12419
|
+
onStart?: () => void;
|
|
12420
|
+
onComplete?: () => void;
|
|
12421
|
+
}): {
|
|
12422
|
+
start(core: any): Promise<void>;
|
|
12423
|
+
};
|
|
12424
|
+
export const linearEase: (t: number) => number;
|
|
12425
|
+
export const quadEaseIn: (t: number) => number;
|
|
12426
|
+
export const quadEaseOut: (t: number) => number;
|
|
12427
|
+
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
12428
|
+
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
12429
|
+
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
12430
|
+
export {};
|
|
12431
|
+
}
|
|
12432
|
+
|
|
12433
|
+
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/browser' {
|
|
12434
|
+
type DeviceType = {
|
|
12435
|
+
isIpad: boolean;
|
|
12436
|
+
isMobile: boolean;
|
|
12437
|
+
isSafari12: boolean;
|
|
12438
|
+
isFirefox: boolean;
|
|
12439
|
+
isWindows: boolean;
|
|
12440
|
+
};
|
|
12441
|
+
/**
|
|
12442
|
+
* Get device OS info
|
|
12443
|
+
* export for testing purpose
|
|
12444
|
+
* @returns DeviceType
|
|
12445
|
+
*/
|
|
12446
|
+
export const _deviceTypeControl: {
|
|
12447
|
+
getDeviceType(): DeviceType;
|
|
12448
|
+
_reset(): void;
|
|
12449
|
+
};
|
|
12450
|
+
export const getDeviceType: () => DeviceType;
|
|
12451
|
+
/**
|
|
12452
|
+
* Creates a closure encapsulating the logic of getting device GPU info.
|
|
12453
|
+
* inspired by https://github.com/pmndrs/detect-gpu
|
|
12454
|
+
* export for testing
|
|
12455
|
+
*/
|
|
12456
|
+
export const _gpuInfoControl: {
|
|
12457
|
+
getInfo: () => string;
|
|
12458
|
+
shouldDisableOffscreenCanvas: () => boolean;
|
|
12459
|
+
_setCanvas(c: HTMLCanvasElement): void;
|
|
12460
|
+
};
|
|
12461
|
+
export const getGPUInfo: () => string;
|
|
12462
|
+
/**
|
|
12463
|
+
* Check if device is certain intel integrated GPU.
|
|
12464
|
+
* This is for implementing workaround - https://issues.chromium.org/issues/40251953
|
|
12465
|
+
* The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF.
|
|
12466
|
+
* In order to ensure the integrated intel GPU render text correctly
|
|
12467
|
+
*/
|
|
12468
|
+
export const shouldDisableOffscreenCanvas: () => boolean;
|
|
12469
|
+
export {};
|
|
12470
|
+
}
|
|
12471
|
+
|
|
12472
|
+
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/async' {
|
|
12473
|
+
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
12474
|
+
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
12475
|
+
}
|
|
12476
|
+
|
|
12310
12477
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Exporter' {
|
|
12311
12478
|
import { ExportController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
12312
12479
|
/**
|