@mappedin/react-native-sdk 5.30.5 → 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> = {
|
|
@@ -1135,7 +1136,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1135
1136
|
* Requires `multiBufferRendering` to be enabled.
|
|
1136
1137
|
* @experimental
|
|
1137
1138
|
*/
|
|
1138
|
-
outdoorView?:
|
|
1139
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
1139
1140
|
enabled?: boolean;
|
|
1140
1141
|
};
|
|
1141
1142
|
/**
|
|
@@ -1333,7 +1334,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1333
1334
|
* @experimental
|
|
1334
1335
|
* Enable outdoor view. Requires multi-buffer rendering to be enabled
|
|
1335
1336
|
*/
|
|
1336
|
-
outdoorView?:
|
|
1337
|
+
outdoorView?: TOutdoorViewOptions & {
|
|
1337
1338
|
enabled?: boolean;
|
|
1338
1339
|
};
|
|
1339
1340
|
/**
|
|
@@ -1838,12 +1839,13 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView
|
|
|
1838
1839
|
*/
|
|
1839
1840
|
[E_CAMERA_EVENT.TILT_CHANGED]: number;
|
|
1840
1841
|
};
|
|
1842
|
+
export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL };
|
|
1841
1843
|
export type { default as BlueDotController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BlueDotController';
|
|
1842
1844
|
export type { default as Journey } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Journey';
|
|
1843
1845
|
}
|
|
1844
1846
|
|
|
1845
1847
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
1846
|
-
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';
|
|
1847
1849
|
import { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin';
|
|
1848
1850
|
import { defaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things';
|
|
1849
1851
|
import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
@@ -1890,7 +1892,10 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
|
1890
1892
|
import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types';
|
|
1891
1893
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
1892
1894
|
export { MAP_RENDER_MODE, GET_VENUE_EVENT };
|
|
1893
|
-
|
|
1895
|
+
/**
|
|
1896
|
+
* @internal
|
|
1897
|
+
*/
|
|
1898
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
1894
1899
|
/**
|
|
1895
1900
|
* @internal
|
|
1896
1901
|
*/
|
|
@@ -1992,7 +1997,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' {
|
|
|
1992
1997
|
* Download a bundle and return a Mappedin instance
|
|
1993
1998
|
* @internal
|
|
1994
1999
|
*/
|
|
1995
|
-
export function downloadBundle(userOptions:
|
|
2000
|
+
export function downloadBundle(userOptions: TGetVenueBundleOptions, { url, updated_at }: {
|
|
1996
2001
|
url: any;
|
|
1997
2002
|
updated_at: any;
|
|
1998
2003
|
}): Promise<Mappedin>;
|
|
@@ -2896,6 +2901,9 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2896
2901
|
import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate, TSerializedMap, TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon, TFloatingLabelClickEventPayloadSerialized, TColliderClickEventPayloadSerialized } from '@mappedin/react-native-sdk/wrappers/common/types';
|
|
2897
2902
|
import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
|
|
2898
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
|
+
};
|
|
2899
2907
|
export type BRIDGE_EVENT_PAYLOADS = {
|
|
2900
2908
|
[BRIDGE_EVENT.REJECT]: any;
|
|
2901
2909
|
[BRIDGE_EVENT.RESOLVE]: any;
|
|
@@ -2984,9 +2992,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
|
|
|
2984
2992
|
};
|
|
2985
2993
|
};
|
|
2986
2994
|
[EVENT.LOAD_VENUE]: {
|
|
2987
|
-
options:
|
|
2988
|
-
useBundle?: boolean;
|
|
2989
|
-
};
|
|
2995
|
+
options: TBridgeGetVenueOptions;
|
|
2990
2996
|
showVenueOptions: TShowVenueOptions & {
|
|
2991
2997
|
/**
|
|
2992
2998
|
* Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
|
|
@@ -3374,6 +3380,16 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
|
|
|
3374
3380
|
};
|
|
3375
3381
|
}
|
|
3376
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
|
+
|
|
3377
3393
|
declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
|
|
3378
3394
|
export class PubSub<EVENT_PAYLOAD> {
|
|
3379
3395
|
_subscribers: any;
|
|
@@ -3717,6 +3733,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3717
3733
|
LOAD_MINIMAP: {
|
|
3718
3734
|
msgID?: string;
|
|
3719
3735
|
data: {
|
|
3736
|
+
/**
|
|
3737
|
+
* Handle resolution from the other side, with a value if one was expected
|
|
3738
|
+
* @hidden
|
|
3739
|
+
*/
|
|
3720
3740
|
options: import("../react-native-sdk/src").TGetVenueOptions | import("../react-native-sdk/src").TGetVenueMakerOptions;
|
|
3721
3741
|
};
|
|
3722
3742
|
};
|
|
@@ -3847,9 +3867,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
|
|
|
3847
3867
|
LOAD_VENUE: {
|
|
3848
3868
|
msgID?: string;
|
|
3849
3869
|
data: {
|
|
3850
|
-
options:
|
|
3851
|
-
useBundle?: boolean;
|
|
3852
|
-
};
|
|
3870
|
+
options: import("./payloads").TBridgeGetVenueOptions;
|
|
3853
3871
|
showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
|
|
3854
3872
|
prepareSearch?: boolean;
|
|
3855
3873
|
searchOptions?: Partial<import("../react-native-sdk/src").TMappedinOfflineSearchAllOptions>;
|
|
@@ -4955,45 +4973,97 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
4955
4973
|
import './OutdoorViewController.scss';
|
|
4956
4974
|
import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
4957
4975
|
import { XOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types';
|
|
4976
|
+
/**
|
|
4977
|
+
* Represents the possible positions for map attribution.
|
|
4978
|
+
*/
|
|
4958
4979
|
export type TAttributionPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
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
|
+
};
|
|
4966
5004
|
};
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
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';
|
|
4972
5027
|
};
|
|
4973
|
-
|
|
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>;
|
|
4974
5044
|
class OutdoorViewController {
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
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;
|
|
4997
5067
|
}
|
|
4998
5068
|
export default OutdoorViewController;
|
|
4999
5069
|
}
|
|
@@ -5120,6 +5190,14 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/
|
|
|
5120
5190
|
}
|
|
5121
5191
|
|
|
5122
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>;
|
|
5123
5201
|
export type TGetVenueOptions = {
|
|
5124
5202
|
accessToken?: string;
|
|
5125
5203
|
clientId?: string;
|
|
@@ -5133,22 +5211,44 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
|
|
|
5133
5211
|
[key in string]: string;
|
|
5134
5212
|
};
|
|
5135
5213
|
venue: string;
|
|
5136
|
-
|
|
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;
|
|
5137
5227
|
useDraftData?: boolean;
|
|
5138
5228
|
platformString?: string;
|
|
5139
5229
|
emitAnalyticsEvents?: boolean;
|
|
5140
5230
|
secure?: boolean;
|
|
5141
5231
|
preloadMapGeometry?: boolean;
|
|
5142
5232
|
};
|
|
5143
|
-
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 & {
|
|
5144
5243
|
baseUrl?: string;
|
|
5145
5244
|
supplementaryUrl?: string;
|
|
5146
5245
|
noAuth?: boolean;
|
|
5147
5246
|
includeHidden?: boolean;
|
|
5148
5247
|
apiGateway?: string;
|
|
5149
5248
|
authorization?: string;
|
|
5150
|
-
things?: any;
|
|
5151
5249
|
headers?: any;
|
|
5250
|
+
}, 'things'> & {
|
|
5251
|
+
things?: MergedThings;
|
|
5152
5252
|
};
|
|
5153
5253
|
export type TVenueMetadata = {
|
|
5154
5254
|
languages: {
|
|
@@ -5171,14 +5271,14 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.type
|
|
|
5171
5271
|
|
|
5172
5272
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin' {
|
|
5173
5273
|
import { Navigator } from '@mappedin/react-native-sdk/sdks/packages/navigator';
|
|
5174
|
-
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';
|
|
5175
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';
|
|
5176
5276
|
import { TAccessors, GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
5177
5277
|
import { IAnalytics } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.CustomerAnalytics';
|
|
5178
5278
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
5179
5279
|
import { ParsedMVFv1 } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.MVF.types';
|
|
5180
5280
|
import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed';
|
|
5181
|
-
export const defaultOptions: TGetVenueOptionsInternal
|
|
5281
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
5182
5282
|
export class Mappedin extends PubSub<GET_VENUE_PAYLOAD, GET_VENUE_EVENT> {
|
|
5183
5283
|
#private;
|
|
5184
5284
|
perspective: any;
|
|
@@ -5410,7 +5510,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin' {
|
|
|
5410
5510
|
/**
|
|
5411
5511
|
* @deprecated Use {@link hydrateVenue} instead
|
|
5412
5512
|
*/
|
|
5413
|
-
constructor(options: TGetVenueOptionsInternal
|
|
5513
|
+
constructor(options: TGetVenueOptionsInternal<TAllGetVenueOptions>);
|
|
5414
5514
|
analytics: IAnalytics;
|
|
5415
5515
|
/**
|
|
5416
5516
|
* @hidden
|
|
@@ -5440,6 +5540,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/default-thing
|
|
|
5440
5540
|
themes: string[];
|
|
5441
5541
|
rankings: string[];
|
|
5442
5542
|
};
|
|
5543
|
+
export type DefaultThings = typeof defaultThings;
|
|
5443
5544
|
}
|
|
5444
5545
|
|
|
5445
5546
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/internal' {
|
|
@@ -5771,6 +5872,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocat
|
|
|
5771
5872
|
siblingGroups?: TSiblingGroup[] | undefined;
|
|
5772
5873
|
gallery?: TGalleryImage[] | undefined;
|
|
5773
5874
|
amenity?: string | undefined;
|
|
5875
|
+
filterFlags?: string[];
|
|
5774
5876
|
constructor(mappedin: Mappedin, data: any);
|
|
5775
5877
|
/**
|
|
5776
5878
|
* Polygons this Location is attached to.
|
|
@@ -6968,7 +7070,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
6968
7070
|
}
|
|
6969
7071
|
|
|
6970
7072
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/shave-text' {
|
|
6971
|
-
export type TDrawFn = (ctx: CanvasRenderingContext2D, x: number, y: number) => void;
|
|
7073
|
+
export type TDrawFn = (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number) => void;
|
|
6972
7074
|
type TShave = (str: string, size: number, maxWidth: number, maxLines?: number, lineHeight?: number, options?: {
|
|
6973
7075
|
strokeText: boolean;
|
|
6974
7076
|
}) => {
|
|
@@ -7918,6 +8020,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVorte
|
|
|
7918
8020
|
weight?: number;
|
|
7919
8021
|
multiplier?: number;
|
|
7920
8022
|
nodes?: string[];
|
|
8023
|
+
filterFlags?: string[];
|
|
7921
8024
|
constructor(data: any);
|
|
7922
8025
|
static hydrate(vortexes: any): MappedinVortex[];
|
|
7923
8026
|
static fetch(mappedin: Mappedin): Promise<MappedinVortex[]>;
|
|
@@ -8250,12 +8353,12 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMapGr
|
|
|
8250
8353
|
}
|
|
8251
8354
|
|
|
8252
8355
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
8253
|
-
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';
|
|
8254
8357
|
import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
8255
8358
|
import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal';
|
|
8256
8359
|
export function isGatewayKey(key: string): boolean;
|
|
8257
8360
|
export function stringifyQuery(query: any, gateway?: boolean): string;
|
|
8258
|
-
export function buildUrl(options: TGetVenueOptionsInternal
|
|
8361
|
+
export function buildUrl(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): string;
|
|
8259
8362
|
/**
|
|
8260
8363
|
* Make a network request to the Mappedin API to fetch an array of objects.
|
|
8261
8364
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -8264,7 +8367,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8264
8367
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
8265
8368
|
* @returns the result json
|
|
8266
8369
|
*/
|
|
8267
|
-
export function getArray(options: TGetVenueOptionsInternal
|
|
8370
|
+
export function getArray(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean): Promise<any>;
|
|
8268
8371
|
/**
|
|
8269
8372
|
* Make a network request to the Mappedin API to fetch an object.
|
|
8270
8373
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
@@ -8274,21 +8377,21 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8274
8377
|
* @param isExpectingArray whether the endpoint returns an array
|
|
8275
8378
|
* @returns the result json
|
|
8276
8379
|
*/
|
|
8277
|
-
export function getObject(options: TGetVenueOptionsInternal
|
|
8380
|
+
export function getObject(options: TGetVenueOptionsInternal<TGetVenueOptions>, pathname: string, query: any, supplementary?: boolean, isExpectingArray?: boolean): Promise<any>;
|
|
8278
8381
|
/**
|
|
8279
8382
|
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
8280
8383
|
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
8281
8384
|
* @param url string describing the url corresponding to the client's request
|
|
8282
8385
|
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
8283
8386
|
*/
|
|
8284
|
-
export function constructParamsForRequest(options: TGetVenueOptionsInternal
|
|
8387
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
8285
8388
|
req: {
|
|
8286
8389
|
method: string;
|
|
8287
8390
|
headers: any;
|
|
8288
8391
|
};
|
|
8289
8392
|
url: string;
|
|
8290
8393
|
};
|
|
8291
|
-
export function generateAPIRequest(options: TGetVenueOptionsInternal
|
|
8394
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
8292
8395
|
export function addToSet(array: any, value: any): void;
|
|
8293
8396
|
export function getDistanceBetweenLatLon([lat1, lon1]: [number, number], [lat2, lon2]: [number, number]): any;
|
|
8294
8397
|
export function getMapScale(map: MappedinMap): any;
|
|
@@ -8322,6 +8425,7 @@ declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' {
|
|
|
8322
8425
|
* @return {MappedinLocation}
|
|
8323
8426
|
*/
|
|
8324
8427
|
export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null;
|
|
8428
|
+
export function mergeThings(thingsOption: ThingsOption | undefined): MergedThings;
|
|
8325
8429
|
}
|
|
8326
8430
|
|
|
8327
8431
|
declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.cache' {
|
|
@@ -9839,6 +9943,17 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9839
9943
|
assetManager: AssetManager;
|
|
9840
9944
|
imageVisible: boolean;
|
|
9841
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;
|
|
9842
9957
|
boundingBox: {
|
|
9843
9958
|
min: {
|
|
9844
9959
|
x: number;
|
|
@@ -9851,13 +9966,6 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9851
9966
|
z: number;
|
|
9852
9967
|
};
|
|
9853
9968
|
};
|
|
9854
|
-
polygonHeight: number;
|
|
9855
|
-
geometry: ExtrudeGeometry;
|
|
9856
|
-
mesh: Mesh;
|
|
9857
|
-
material: MeshLambertMaterial | MeshLambertMaterial[];
|
|
9858
|
-
labelMesh?: Mesh;
|
|
9859
|
-
imageMesh?: Mesh;
|
|
9860
|
-
sortScore: number | null;
|
|
9861
9969
|
static materials: {
|
|
9862
9970
|
[key in string]: MeshLambertMaterial | MeshLambertMaterial[];
|
|
9863
9971
|
};
|
|
@@ -9873,7 +9981,8 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
9873
9981
|
x: number;
|
|
9874
9982
|
y: number;
|
|
9875
9983
|
};
|
|
9876
|
-
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;
|
|
9877
9986
|
static _setPolygonDefaults(poly: any): any;
|
|
9878
9987
|
constructor(poly: MappedinPolygon, mapClass: MappedinMap, container: Group, assetManager: any, mapLoadingStrategy?: MAP_RENDER_MODE);
|
|
9879
9988
|
getBoundingBox(): {
|
|
@@ -10484,158 +10593,9 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/interna
|
|
|
10484
10593
|
}
|
|
10485
10594
|
|
|
10486
10595
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils' {
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
/**
|
|
10491
|
-
* Utils function listing
|
|
10492
|
-
*
|
|
10493
|
-
* - scrubMaterial
|
|
10494
|
-
* - getObjectID
|
|
10495
|
-
* - getObject
|
|
10496
|
-
* - getBoundingBox
|
|
10497
|
-
* - getBiggestBoundingBox
|
|
10498
|
-
* - upackBoundingBox
|
|
10499
|
-
* - getMapScale
|
|
10500
|
-
* - throttle -> taken from lodash.js
|
|
10501
|
-
* - getProjectionScaleFactor
|
|
10502
|
-
* - getZoom
|
|
10503
|
-
*/
|
|
10504
|
-
export function isGatewayKey(key: string): boolean;
|
|
10505
|
-
export function getCombinedBoundingBox(objects: Object3D[]): Box3;
|
|
10506
|
-
export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3;
|
|
10507
|
-
export function scrubMaterial(material: Material): void;
|
|
10508
|
-
/**
|
|
10509
|
-
* Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight
|
|
10510
|
-
* @template T extends string | {id: string}
|
|
10511
|
-
* @param {T} object - input can be object containing id or the id itself
|
|
10512
|
-
* @return {string}
|
|
10513
|
-
*/
|
|
10514
|
-
export function getObjectId(object: any): string;
|
|
10515
|
-
/**
|
|
10516
|
-
* Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both
|
|
10517
|
-
*/
|
|
10518
|
-
export function getObject<K extends {
|
|
10519
|
-
id: string;
|
|
10520
|
-
}, T extends K | string>(obj: T, array: K[] | undefined): K | undefined;
|
|
10521
|
-
export function getBoundingBox(object: Object3D): Box3;
|
|
10522
|
-
/**
|
|
10523
|
-
* Function pushes the items of the second array onto the first array (inplace).
|
|
10524
|
-
* @template T
|
|
10525
|
-
* @param {Array.<T>} arr1 - base array
|
|
10526
|
-
* @param {Array.<T>} arr2 - array which items will be pushed to arr1
|
|
10527
|
-
*/
|
|
10528
|
-
export function appendItems<T>(arr1: T[], arr2: T[]): void;
|
|
10529
|
-
export function getBiggestBoundingBox(objects: Object3D[]): {
|
|
10530
|
-
min: any;
|
|
10531
|
-
max: any;
|
|
10532
|
-
};
|
|
10533
|
-
export function unpackBoundingBox(boundingBox: Box3): Vector3[];
|
|
10534
|
-
export function getMapScale(map: MappedinMap): number;
|
|
10535
|
-
export function getNorth(map: MappedinMap): number;
|
|
10536
|
-
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
10537
|
-
export function debounce<T>(func: () => void, wait: number, immediate?: boolean): () => void;
|
|
10538
|
-
export function flatten(list: any[]): any[];
|
|
10539
|
-
export function uniq(arr: any[]): any[];
|
|
10540
|
-
export function toStyleString(styles: Record<string, string>): string;
|
|
10541
|
-
/**
|
|
10542
|
-
/* getProjectionScaleFactor()
|
|
10543
|
-
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
10544
|
-
/*
|
|
10545
|
-
* R
|
|
10546
|
-
* /|
|
|
10547
|
-
* C : Camera / |
|
|
10548
|
-
* PQ : Projection Plane / |
|
|
10549
|
-
* OR : Origin / |
|
|
10550
|
-
* F : FOV / |
|
|
10551
|
-
* Q / |
|
|
10552
|
-
* /| |
|
|
10553
|
-
* / | |
|
|
10554
|
-
* / | |
|
|
10555
|
-
* / | |
|
|
10556
|
-
* / | |
|
|
10557
|
-
* / F/2 | |
|
|
10558
|
-
* C ------------P------------ O
|
|
10559
|
-
*
|
|
10560
|
-
*
|
|
10561
|
-
* ProjectionScaleFactor = ( OR / PQ )
|
|
10562
|
-
* PQ = canvasHeight / 2
|
|
10563
|
-
* CQ = zoom
|
|
10564
|
-
*
|
|
10565
|
-
* OR / C0 = tan(F/2)
|
|
10566
|
-
* so OR = CO * tan(F/2)
|
|
10567
|
-
*/
|
|
10568
|
-
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
10569
|
-
/** getZoom
|
|
10570
|
-
*
|
|
10571
|
-
* C - Camera, OP -- picture plane (canvas), S - origin,
|
|
10572
|
-
* QR - front side of maps Bounding Box, F: FOV
|
|
10573
|
-
*
|
|
10574
|
-
* Z-axis
|
|
10575
|
-
* R_____|______
|
|
10576
|
-
* /| | |
|
|
10577
|
-
* / | | |
|
|
10578
|
-
* P/ | | | maps BB
|
|
10579
|
-
* /| | | |
|
|
10580
|
-
* / | | | |
|
|
10581
|
-
* / | | | |
|
|
10582
|
-
* / F |E |T |S |
|
|
10583
|
-
* C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps
|
|
10584
|
-
* \ | | | |
|
|
10585
|
-
* \ | | | |
|
|
10586
|
-
* \ | | | |
|
|
10587
|
-
* \ | | | |
|
|
10588
|
-
* \| | | |
|
|
10589
|
-
* O\ | | |
|
|
10590
|
-
* \ | | |
|
|
10591
|
-
* \|_____|_____|
|
|
10592
|
-
* Q
|
|
10593
|
-
*
|
|
10594
|
-
*
|
|
10595
|
-
* We want to get CS, which is the camera zoom
|
|
10596
|
-
*
|
|
10597
|
-
*/
|
|
10598
|
-
export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number;
|
|
10599
|
-
interface CalculateTwoDProjectionsParams {
|
|
10600
|
-
maps: MapObject[];
|
|
10601
|
-
width: number;
|
|
10602
|
-
height: number;
|
|
10603
|
-
camera: Camera;
|
|
10604
|
-
}
|
|
10605
|
-
export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): {
|
|
10606
|
-
min: {
|
|
10607
|
-
x: number;
|
|
10608
|
-
y: number;
|
|
10609
|
-
};
|
|
10610
|
-
max: {
|
|
10611
|
-
x: number;
|
|
10612
|
-
y: number;
|
|
10613
|
-
};
|
|
10614
|
-
}[];
|
|
10615
|
-
export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[];
|
|
10616
|
-
export function isObject(item: any): boolean;
|
|
10617
|
-
export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap;
|
|
10618
|
-
export function cyrb53(str: string, seed?: number): number;
|
|
10619
|
-
export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3;
|
|
10620
|
-
export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: {
|
|
10621
|
-
from: any;
|
|
10622
|
-
to: any;
|
|
10623
|
-
duration?: number;
|
|
10624
|
-
easing?: any;
|
|
10625
|
-
delay?: number;
|
|
10626
|
-
onUpdate?: (_: any) => void;
|
|
10627
|
-
onStart?: () => void;
|
|
10628
|
-
onComplete?: () => void;
|
|
10629
|
-
}): {
|
|
10630
|
-
start(core: any): Promise<void>;
|
|
10631
|
-
};
|
|
10632
|
-
export const linearEase: (t: number) => number;
|
|
10633
|
-
export const quadEaseIn: (t: number) => number;
|
|
10634
|
-
export const quadEaseOut: (t: number) => number;
|
|
10635
|
-
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number;
|
|
10636
|
-
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number;
|
|
10637
|
-
export function checkWritableBeforeWrite(obj: any, key: string, value: any): void;
|
|
10638
|
-
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';
|
|
10639
10599
|
}
|
|
10640
10600
|
|
|
10641
10601
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView' {
|
|
@@ -12317,6 +12277,203 @@ declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private
|
|
|
12317
12277
|
};
|
|
12318
12278
|
}
|
|
12319
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
|
+
|
|
12320
12477
|
declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Exporter' {
|
|
12321
12478
|
import { ExportController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal';
|
|
12322
12479
|
/**
|