@rnmapbox/maps 10.1.40 → 10.1.41-rc.3

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 (114) hide show
  1. package/android/build.gradle +134 -5
  2. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerView.kt +1 -1
  3. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt +11 -1
  4. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.kt +7 -1
  5. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt +25 -4
  6. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXViewport.kt +4 -4
  7. package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +30 -4
  8. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXCustomLocationProviderManager.kt +4 -0
  9. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocation.kt +1 -1
  10. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt +8 -2
  11. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +59 -10
  12. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImportManager.kt +6 -1
  13. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt +9 -5
  14. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayer.kt +5 -1
  15. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayerManager.kt +1 -0
  16. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +3 -2
  17. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +19 -4
  18. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt +8 -3
  19. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt +7 -1
  20. package/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt +27 -3
  21. package/android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Annotation.kt +5 -1
  22. package/ios/RNMBX/RNMBXLocationModuleV11.swift +4 -4
  23. package/ios/RNMBX/RNMBXMarkerViewComponentView.mm +11 -16
  24. package/ios/RNMBX/RNMBXShapeSource.swift +2 -4
  25. package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +1 -1
  26. package/ios/RNMBX/RNMBXShapeSourceViewManager.m +1 -1
  27. package/ios/RNMBX/RNMBXVectorSourceComponentView.mm +1 -1
  28. package/lib/commonjs/components/NativeBridgeComponent.js +41 -0
  29. package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -0
  30. package/lib/commonjs/specs/NativeMapViewModule.js +10 -0
  31. package/lib/commonjs/specs/NativeMapViewModule.js.map +1 -0
  32. package/lib/commonjs/specs/NativeRNMBXCameraModule.js +10 -0
  33. package/lib/commonjs/specs/NativeRNMBXCameraModule.js.map +1 -0
  34. package/lib/commonjs/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js +10 -0
  35. package/lib/commonjs/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js.map +1 -0
  36. package/lib/commonjs/specs/NativeRNMBXImageModule.js +10 -0
  37. package/lib/commonjs/specs/NativeRNMBXImageModule.js.map +1 -0
  38. package/lib/commonjs/specs/NativeRNMBXLocationModule.js +9 -0
  39. package/lib/commonjs/specs/NativeRNMBXLocationModule.js.map +1 -0
  40. package/lib/commonjs/specs/NativeRNMBXMovePointShapeAnimatorModule.js +10 -0
  41. package/lib/commonjs/specs/NativeRNMBXMovePointShapeAnimatorModule.js.map +1 -0
  42. package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js +10 -0
  43. package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js.map +1 -0
  44. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js +10 -0
  45. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
  46. package/lib/commonjs/specs/NativeRNMBXTileStoreModule.js +11 -0
  47. package/lib/commonjs/specs/NativeRNMBXTileStoreModule.js.map +1 -0
  48. package/lib/commonjs/specs/NativeRNMBXViewportModule.js +10 -0
  49. package/lib/commonjs/specs/NativeRNMBXViewportModule.js.map +1 -0
  50. package/lib/commonjs/utils/NativeCommands.js +50 -0
  51. package/lib/commonjs/utils/NativeCommands.js.map +1 -0
  52. package/lib/commonjs/utils/index.js +12 -1
  53. package/lib/commonjs/utils/index.js.map +1 -1
  54. package/lib/{module/utils/nativeRef.ts → commonjs/utils/nativeRef.js} +8 -9
  55. package/lib/commonjs/utils/nativeRef.js.map +1 -0
  56. package/lib/module/components/NativeBridgeComponent.js +37 -0
  57. package/lib/module/components/NativeBridgeComponent.js.map +1 -0
  58. package/lib/module/specs/NativeMapViewModule.js +7 -0
  59. package/lib/module/specs/NativeMapViewModule.js.map +1 -0
  60. package/lib/module/specs/NativeRNMBXCameraModule.js +8 -0
  61. package/lib/module/specs/NativeRNMBXCameraModule.js.map +1 -0
  62. package/lib/module/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js +8 -0
  63. package/lib/module/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js.map +1 -0
  64. package/lib/module/specs/NativeRNMBXImageModule.js +7 -0
  65. package/lib/module/specs/NativeRNMBXImageModule.js.map +1 -0
  66. package/lib/module/specs/NativeRNMBXLocationModule.js +5 -0
  67. package/lib/module/specs/NativeRNMBXLocationModule.js.map +1 -0
  68. package/lib/module/specs/NativeRNMBXMovePointShapeAnimatorModule.js +8 -0
  69. package/lib/module/specs/NativeRNMBXMovePointShapeAnimatorModule.js.map +1 -0
  70. package/lib/module/specs/NativeRNMBXPointAnnotationModule.js +7 -0
  71. package/lib/module/specs/NativeRNMBXPointAnnotationModule.js.map +1 -0
  72. package/lib/module/specs/NativeRNMBXShapeSourceModule.js +7 -0
  73. package/lib/module/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
  74. package/lib/module/specs/NativeRNMBXTileStoreModule.js +10 -0
  75. package/lib/module/specs/NativeRNMBXTileStoreModule.js.map +1 -0
  76. package/lib/module/specs/NativeRNMBXViewportModule.js +8 -0
  77. package/lib/module/specs/NativeRNMBXViewportModule.js.map +1 -0
  78. package/lib/module/utils/NativeCommands.js +45 -0
  79. package/lib/module/utils/NativeCommands.js.map +1 -0
  80. package/lib/module/utils/index.js +12 -1
  81. package/lib/module/utils/index.js.map +1 -1
  82. package/lib/{commonjs/utils/nativeRef.ts → module/utils/nativeRef.js} +4 -9
  83. package/lib/module/utils/nativeRef.js.map +1 -0
  84. package/lib/typescript/src/utils/index.d.ts +3 -3
  85. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  86. package/package.json +3 -3
  87. package/src/utils/index.ts +16 -6
  88. package/CHANGELOG.md +0 -390
  89. package/android/.gitignore +0 -9
  90. package/android/.npmignore +0 -9
  91. package/lib/commonjs/components/NativeBridgeComponent.tsx +0 -67
  92. package/lib/commonjs/specs/NativeMapViewModule.ts +0 -54
  93. package/lib/commonjs/specs/NativeRNMBXCameraModule.ts +0 -49
  94. package/lib/commonjs/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.ts +0 -37
  95. package/lib/commonjs/specs/NativeRNMBXImageModule.ts +0 -10
  96. package/lib/commonjs/specs/NativeRNMBXLocationModule.ts +0 -32
  97. package/lib/commonjs/specs/NativeRNMBXMovePointShapeAnimatorModule.ts +0 -20
  98. package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.ts +0 -12
  99. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.ts +0 -23
  100. package/lib/commonjs/specs/NativeRNMBXTileStoreModule.ts +0 -27
  101. package/lib/commonjs/specs/NativeRNMBXViewportModule.ts +0 -41
  102. package/lib/commonjs/utils/NativeCommands.ts +0 -89
  103. package/lib/module/components/NativeBridgeComponent.tsx +0 -67
  104. package/lib/module/specs/NativeMapViewModule.ts +0 -54
  105. package/lib/module/specs/NativeRNMBXCameraModule.ts +0 -49
  106. package/lib/module/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.ts +0 -37
  107. package/lib/module/specs/NativeRNMBXImageModule.ts +0 -10
  108. package/lib/module/specs/NativeRNMBXLocationModule.ts +0 -32
  109. package/lib/module/specs/NativeRNMBXMovePointShapeAnimatorModule.ts +0 -20
  110. package/lib/module/specs/NativeRNMBXPointAnnotationModule.ts +0 -12
  111. package/lib/module/specs/NativeRNMBXShapeSourceModule.ts +0 -23
  112. package/lib/module/specs/NativeRNMBXTileStoreModule.ts +0 -27
  113. package/lib/module/specs/NativeRNMBXViewportModule.ts +0 -41
  114. package/lib/module/utils/NativeCommands.ts +0 -89
@@ -1,20 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32, Double } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- //import type { UnsafeMixed } from './codegenUtils';
6
-
7
- type AnimatorTag = Int32;
8
-
9
- export interface Spec extends TurboModule {
10
- create(tag: AnimatorTag, coordinate: ReadonlyArray<Double>): Promise<void>;
11
- moveTo(
12
- tag: AnimatorTag,
13
- coordinate: ReadonlyArray<Double>,
14
- duration: Double,
15
- ): Promise<void>;
16
- }
17
-
18
- export default TurboModuleRegistry.getEnforcing<Spec>(
19
- 'RNMBXMovePointShapeAnimatorModule',
20
- );
@@ -1,12 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- refresh: (viewRef: Int32 | null) => Promise<Object>;
8
- }
9
-
10
- export default TurboModuleRegistry.getEnforcing<Spec>(
11
- 'RNMBXPointAnnotationModule',
12
- );
@@ -1,23 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- getClusterExpansionZoom: (
8
- viewRef: Int32 | null,
9
- featureJSON: string,
10
- ) => Promise<Object>;
11
- getClusterLeaves: (
12
- viewRef: Int32 | null,
13
- featureJSON: string,
14
- number: Int32,
15
- offset: Int32,
16
- ) => Promise<Object>;
17
- getClusterChildren: (
18
- viewRef: Int32 | null,
19
- featureJSON: string,
20
- ) => Promise<Object>;
21
- }
22
-
23
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXShapeSourceModule');
@@ -1,27 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars
6
- type ObjectOr<T> = Object;
7
-
8
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
- type StringOr<_T> = string;
10
-
11
- type Domain = 'Maps' | 'Navigation' | 'Search' | 'ADAS';
12
-
13
- type Tag = Int32;
14
-
15
- type Value = { value: string | number };
16
-
17
- export interface Spec extends TurboModule {
18
- shared(path?: string): Promise<Tag>;
19
- setOption(
20
- tag: Tag,
21
- key: string,
22
- domain: StringOr<Domain>,
23
- value: ObjectOr<Value>,
24
- ): Promise<void>;
25
- }
26
-
27
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXTileStoreModule');
@@ -1,41 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- type StateInfo =
6
- | {
7
- kind: 'idle';
8
- }
9
- | {
10
- kind: 'state';
11
- status: string;
12
- }
13
- | {
14
- kind: 'transition';
15
- toState: string;
16
- transition: string;
17
- };
18
-
19
- // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars
20
- type ObjectOr<T> = Object;
21
-
22
- type StateReal = { kind: 'followPuck' } /* | { kind: 'overview' } */;
23
- type State = ObjectOr<StateReal>;
24
- type TransitionReal =
25
- | { kind: 'immediate' }
26
- | { kind: 'default'; options: { maxDurationMs?: number } };
27
- type Transition = ObjectOr<TransitionReal>;
28
-
29
- type ViewRef = Int32 | null;
30
-
31
- export interface Spec extends TurboModule {
32
- getState(viewRef: ViewRef): Promise<StateInfo>;
33
- transitionTo(
34
- viewRef: ViewRef,
35
- state: State,
36
- transition: Transition,
37
- ): Promise<void>;
38
- idle(viewRef: ViewRef): Promise<void>;
39
- }
40
-
41
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXViewportModule');
@@ -1,89 +0,0 @@
1
- import { NodeHandle, findNodeHandle } from 'react-native';
2
-
3
- export type NativeArg =
4
- | string
5
- | number
6
- | boolean
7
- | null
8
- | { [k: string]: NativeArg }
9
- | NativeArg[]
10
- // eslint-disable-next-line @typescript-eslint/ban-types
11
- | Function
12
- | GeoJSON.Geometry
13
- | undefined;
14
-
15
- type FunctionKeys<T> = keyof {
16
- // eslint-disable-next-line @typescript-eslint/ban-types
17
- [K in keyof T as T[K] extends Function ? K : never]: T[K];
18
- };
19
-
20
- type RefType = React.Component;
21
-
22
- export class NativeCommands<Spec extends object> {
23
- module: Spec;
24
-
25
- preRefMethodQueue: Array<{
26
- method: { name: FunctionKeys<Spec>; args: NativeArg[] };
27
- resolver: (value: unknown) => void;
28
- }>;
29
-
30
- nativeRef: RefType | undefined;
31
-
32
- constructor(module: Spec) {
33
- this.module = module;
34
- this.preRefMethodQueue = [];
35
- }
36
-
37
- async setNativeRef(nativeRef: RefType) {
38
- if (nativeRef) {
39
- this.nativeRef = nativeRef;
40
- while (this.preRefMethodQueue.length > 0) {
41
- const item = this.preRefMethodQueue.pop();
42
-
43
- if (item && item.method && item.resolver) {
44
- const res = await this._call(
45
- item.method.name,
46
- nativeRef,
47
- item.method.args,
48
- );
49
- item.resolver(res);
50
- }
51
- }
52
- }
53
- }
54
-
55
- call<T>(name: FunctionKeys<Spec>, args: NativeArg[]): Promise<T> {
56
- if (this.nativeRef) {
57
- return this._call(name, this.nativeRef, args);
58
- } else {
59
- return new Promise((resolve) => {
60
- this.preRefMethodQueue.push({
61
- method: { name, args },
62
- resolver: resolve as (args: unknown) => void,
63
- });
64
- });
65
- }
66
- }
67
-
68
- _call<T>(
69
- name: FunctionKeys<Spec>,
70
- nativeRef: RefType,
71
- args: NativeArg[],
72
- ): Promise<T> {
73
- const handle = findNodeHandle(nativeRef);
74
- if (handle) {
75
- return (
76
- this.module[name] as (
77
- arg0: NodeHandle,
78
- ...args: NativeArg[]
79
- ) => Promise<T>
80
- )(handle, ...args);
81
- } else {
82
- throw new Error(
83
- `Could not find handle for native ref ${module} when trying to invoke ${String(
84
- name,
85
- )}`,
86
- );
87
- }
88
- }
89
- }
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import { TurboModule } from 'react-native';
3
-
4
- import { type NativeArg, runNativeMethod } from '../utils';
5
-
6
- export type RNMBEvent<PayloadType = { [key: string]: string }> = {
7
- payload: PayloadType;
8
- type: string;
9
- };
10
-
11
- const NativeBridgeComponent = <
12
- Props extends object,
13
- BaseComponent extends new (...ags: any[]) => React.Component<Props>,
14
- >(
15
- Base: BaseComponent,
16
- turboModule: TurboModule,
17
- ) =>
18
- class extends Base {
19
- _turboModule: TurboModule;
20
- _preRefMapMethodQueue: Array<{
21
- method: { name: string; args: NativeArg[] };
22
- resolver: (value: NativeArg) => void;
23
- }>;
24
-
25
- constructor(...args: any[]) {
26
- super(...args);
27
-
28
- this._turboModule = turboModule;
29
- this._preRefMapMethodQueue = [];
30
- }
31
-
32
- async _runPendingNativeMethods<RefType>(nativeRef: RefType) {
33
- if (nativeRef) {
34
- while (this._preRefMapMethodQueue.length > 0) {
35
- const item = this._preRefMapMethodQueue.pop();
36
-
37
- if (item && item.method && item.resolver) {
38
- const res = await this._runNativeMethod(
39
- item.method.name,
40
- nativeRef,
41
- item.method.args,
42
- );
43
- item.resolver(res);
44
- }
45
- }
46
- }
47
- }
48
-
49
- _runNativeMethod<RefType, ReturnType = NativeArg>(
50
- methodName: string,
51
- nativeRef: RefType | undefined,
52
- args: NativeArg[] = [],
53
- ): Promise<ReturnType> {
54
- if (!nativeRef) {
55
- return new Promise<ReturnType>((resolve) => {
56
- this._preRefMapMethodQueue.push({
57
- method: { name: methodName, args },
58
- resolver: resolve as (args: NativeArg) => void,
59
- });
60
- });
61
- }
62
-
63
- return runNativeMethod(this._turboModule, methodName, nativeRef, args);
64
- }
65
- };
66
-
67
- export default NativeBridgeComponent;
@@ -1,54 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- takeSnap: (viewRef: Int32 | null, writeToDisk: boolean) => Promise<Object>;
8
- queryTerrainElevation: (
9
- viewRef: Int32 | null,
10
- coordinates: ReadonlyArray<number>,
11
- ) => Promise<Object>;
12
- setSourceVisibility: (
13
- viewRef: Int32 | null,
14
- visible: boolean,
15
- sourceId: string,
16
- sourceLayerId: string,
17
- ) => Promise<Object>;
18
- getCenter: (viewRef: Int32 | null) => Promise<Object>;
19
- getCoordinateFromView: (
20
- viewRef: Int32 | null,
21
- atPoint: ReadonlyArray<number>,
22
- ) => Promise<Object>;
23
- getPointInView: (
24
- viewRef: Int32 | null,
25
- atCoordinate: ReadonlyArray<number>,
26
- ) => Promise<Object>;
27
- getZoom: (viewRef: Int32 | null) => Promise<Object>;
28
- getVisibleBounds: (viewRef: Int32 | null) => Promise<Object>;
29
- queryRenderedFeaturesAtPoint: (
30
- viewRef: Int32 | null,
31
- atPoint: ReadonlyArray<number>,
32
- withFilter: ReadonlyArray<Object>,
33
- withLayerIDs: ReadonlyArray<string>,
34
- ) => Promise<Object>;
35
- queryRenderedFeaturesInRect: (
36
- viewRef: Int32 | null,
37
- withBBox: ReadonlyArray<number>,
38
- withFilter: ReadonlyArray<Object>,
39
- withLayerIDs: ReadonlyArray<string>,
40
- ) => Promise<Object>;
41
- setHandledMapChangedEvents: (
42
- viewRef: Int32 | null,
43
- events: ReadonlyArray<string>,
44
- ) => Promise<Object>;
45
- clearData: (viewRef: Int32 | null) => Promise<Object>;
46
- querySourceFeatures: (
47
- viewRef: Int32 | null,
48
- sourceId: string,
49
- withFilter: ReadonlyArray<Object>,
50
- withSourceLayerIDs: ReadonlyArray<string>,
51
- ) => Promise<Object>;
52
- }
53
-
54
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXMapViewModule');
@@ -1,49 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- type ViewRef = Int32 | null;
6
-
7
- interface NativeCameraStop {
8
- centerCoordinate?: string;
9
- bounds?: string;
10
- heading?: number;
11
- pitch?: number;
12
- zoom?: number;
13
- paddingLeft?: number;
14
- paddingRight?: number;
15
- paddingTop?: number;
16
- paddingBottom?: number;
17
- duration?: number;
18
- mode?: number;
19
- }
20
-
21
- type Stop =
22
- | {
23
- stops: NativeCameraStop[];
24
- }
25
- | NativeCameraStop;
26
-
27
- // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars
28
- type ObjectOr<T> = Object;
29
-
30
- export interface Spec extends TurboModule {
31
- updateCameraStop(viewRef: ViewRef, stop: ObjectOr<Stop>): Promise<void>;
32
- moveBy: (
33
- viewRef: ViewRef,
34
- x: number,
35
- y: number,
36
- animationMode: number,
37
- animationDuration: number,
38
- ) => Promise<void>;
39
- scaleBy: (
40
- viewRef: ViewRef,
41
- x: number,
42
- y: number,
43
- animationMode: number,
44
- animationDuration: number,
45
- scaleFactor: number,
46
- ) => Promise<void>;
47
- }
48
-
49
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXCameraModule');
@@ -1,37 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32, Double } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
- import { Position } from '@turf/helpers';
5
-
6
- //import type { UnsafeMixed } from './codegenUtils';
7
-
8
- type AnimatorTag = Int32;
9
-
10
- export interface Spec extends TurboModule {
11
- create(
12
- tag: AnimatorTag,
13
- coordinates: Position[],
14
- startOffset: Double,
15
- endOffset: Double,
16
- ): Promise<void>;
17
- setLineString(
18
- tag: AnimatorTag,
19
- coordinates: Position[],
20
- startOffset: number,
21
- endOffset: number,
22
- ): Promise<void>;
23
- setStartOffset(
24
- tag: AnimatorTag,
25
- offset: Double,
26
- duration: Double,
27
- ): Promise<void>;
28
- setEndOffset(
29
- tag: AnimatorTag,
30
- offset: Double,
31
- duration: Double,
32
- ): Promise<void>;
33
- }
34
-
35
- export default TurboModuleRegistry.getEnforcing<Spec>(
36
- 'RNMBXChangeLineOffsetsShapeAnimatorModule',
37
- );
@@ -1,10 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- refresh: (viewRef: Int32 | null) => Promise<Object>;
8
- }
9
-
10
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXImageModule');
@@ -1,32 +0,0 @@
1
- import { TurboModule, TurboModuleRegistry} from "react-native";
2
- import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
3
-
4
- type LocationEvent = {
5
- type: string //"userlocationdupdated"
6
- payload: {
7
- coords: {
8
- latitude: number
9
- longitude: number
10
- altitude: number
11
- accuracy: number
12
- speed: number
13
- heading: number
14
- }
15
- timestamp: number
16
- }
17
- }
18
-
19
- export interface Spec extends TurboModule {
20
- start(minDisplacement: number): void
21
- stop(): void
22
- setRequestsAlwaysUse(requestsAlwaysUse: boolean): void
23
- setMinDisplacement(minDisplacement: number): void
24
- getLastKnownLocation(): Promise<LocationEvent['payload']>
25
- simulateHeading(changesPerSecond: number, increment: number): void
26
- setLocationEventThrottle(throttle: number): void
27
-
28
- readonly onLocationUpdate: EventEmitter<LocationEvent>
29
- }
30
-
31
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXLocationModule');
32
-
@@ -1,20 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32, Double } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- //import type { UnsafeMixed } from './codegenUtils';
6
-
7
- type AnimatorTag = Int32;
8
-
9
- export interface Spec extends TurboModule {
10
- create(tag: AnimatorTag, coordinate: ReadonlyArray<Double>): Promise<void>;
11
- moveTo(
12
- tag: AnimatorTag,
13
- coordinate: ReadonlyArray<Double>,
14
- duration: Double,
15
- ): Promise<void>;
16
- }
17
-
18
- export default TurboModuleRegistry.getEnforcing<Spec>(
19
- 'RNMBXMovePointShapeAnimatorModule',
20
- );
@@ -1,12 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- refresh: (viewRef: Int32 | null) => Promise<Object>;
8
- }
9
-
10
- export default TurboModuleRegistry.getEnforcing<Spec>(
11
- 'RNMBXPointAnnotationModule',
12
- );
@@ -1,23 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
- import { TurboModuleRegistry } from 'react-native';
5
-
6
- export interface Spec extends TurboModule {
7
- getClusterExpansionZoom: (
8
- viewRef: Int32 | null,
9
- featureJSON: string,
10
- ) => Promise<Object>;
11
- getClusterLeaves: (
12
- viewRef: Int32 | null,
13
- featureJSON: string,
14
- number: Int32,
15
- offset: Int32,
16
- ) => Promise<Object>;
17
- getClusterChildren: (
18
- viewRef: Int32 | null,
19
- featureJSON: string,
20
- ) => Promise<Object>;
21
- }
22
-
23
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXShapeSourceModule');
@@ -1,27 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars
6
- type ObjectOr<T> = Object;
7
-
8
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
- type StringOr<_T> = string;
10
-
11
- type Domain = 'Maps' | 'Navigation' | 'Search' | 'ADAS';
12
-
13
- type Tag = Int32;
14
-
15
- type Value = { value: string | number };
16
-
17
- export interface Spec extends TurboModule {
18
- shared(path?: string): Promise<Tag>;
19
- setOption(
20
- tag: Tag,
21
- key: string,
22
- domain: StringOr<Domain>,
23
- value: ObjectOr<Value>,
24
- ): Promise<void>;
25
- }
26
-
27
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXTileStoreModule');
@@ -1,41 +0,0 @@
1
- import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
2
- import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- type StateInfo =
6
- | {
7
- kind: 'idle';
8
- }
9
- | {
10
- kind: 'state';
11
- status: string;
12
- }
13
- | {
14
- kind: 'transition';
15
- toState: string;
16
- transition: string;
17
- };
18
-
19
- // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unused-vars
20
- type ObjectOr<T> = Object;
21
-
22
- type StateReal = { kind: 'followPuck' } /* | { kind: 'overview' } */;
23
- type State = ObjectOr<StateReal>;
24
- type TransitionReal =
25
- | { kind: 'immediate' }
26
- | { kind: 'default'; options: { maxDurationMs?: number } };
27
- type Transition = ObjectOr<TransitionReal>;
28
-
29
- type ViewRef = Int32 | null;
30
-
31
- export interface Spec extends TurboModule {
32
- getState(viewRef: ViewRef): Promise<StateInfo>;
33
- transitionTo(
34
- viewRef: ViewRef,
35
- state: State,
36
- transition: Transition,
37
- ): Promise<void>;
38
- idle(viewRef: ViewRef): Promise<void>;
39
- }
40
-
41
- export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXViewportModule');