@exterio/react-native-yamap-lite 1.0.1
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/LICENSE +20 -0
- package/README.md +510 -0
- package/YamapLite.podspec +21 -0
- package/android/build.gradle +101 -0
- package/android/gradle.properties +14 -0
- package/android/settings.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/yamaplite/ClusteredYamapLiteViewManager.kt +181 -0
- package/android/src/main/java/com/yamaplite/Components/ClusteredYamapLiteView.kt +169 -0
- package/android/src/main/java/com/yamaplite/Components/YamapLiteCircleView.kt +145 -0
- package/android/src/main/java/com/yamaplite/Components/YamapLiteMarkerView.kt +214 -0
- package/android/src/main/java/com/yamaplite/Components/YamapLitePolygon.kt +149 -0
- package/android/src/main/java/com/yamaplite/Components/YamapLitePolyline.kt +171 -0
- package/android/src/main/java/com/yamaplite/Components/YamapLiteView.kt +678 -0
- package/android/src/main/java/com/yamaplite/Events/CameraPositionChangeEvent.kt +38 -0
- package/android/src/main/java/com/yamaplite/Events/MapLoadEvent.kt +34 -0
- package/android/src/main/java/com/yamaplite/Events/PressEvent.kt +24 -0
- package/android/src/main/java/com/yamaplite/Utils/ImageCache.kt +45 -0
- package/android/src/main/java/com/yamaplite/Utils/PointParser.kt +39 -0
- package/android/src/main/java/com/yamaplite/Utils/ResolveImageHelper.kt +122 -0
- package/android/src/main/java/com/yamaplite/Utils/YamapUtils.kt +169 -0
- package/android/src/main/java/com/yamaplite/YamapLiteCircleViewManager.kt +67 -0
- package/android/src/main/java/com/yamaplite/YamapLiteMarkerViewManager.kt +82 -0
- package/android/src/main/java/com/yamaplite/YamapLitePackage.kt +41 -0
- package/android/src/main/java/com/yamaplite/YamapLitePolygonViewManager.kt +61 -0
- package/android/src/main/java/com/yamaplite/YamapLitePolylineViewManager.kt +75 -0
- package/android/src/main/java/com/yamaplite/YamapLiteViewManager.kt +176 -0
- package/ios/ClusteredYamapLiteView.h +15 -0
- package/ios/ClusteredYamapLiteView.mm +325 -0
- package/ios/ClusteredYamapLiteViewManager.mm +17 -0
- package/ios/Components/Circle.swift +108 -0
- package/ios/Components/ClusteredYamap.swift +190 -0
- package/ios/Components/Marker.swift +187 -0
- package/ios/Components/Polygon.swift +108 -0
- package/ios/Components/Polyline.swift +125 -0
- package/ios/Components/Yamap.swift +585 -0
- package/ios/Listeners/CameraListener.swift +54 -0
- package/ios/Listeners/ClusterListener.swift +38 -0
- package/ios/Listeners/MapInputListener.swift +35 -0
- package/ios/Listeners/MapLoadListener.swift +35 -0
- package/ios/Listeners/MapObjectTap.swift +12 -0
- package/ios/Listeners/UserLocationObjectListener.swift +29 -0
- package/ios/Models/YamapModels.swift +77 -0
- package/ios/Utils/ImageCache.swift +20 -0
- package/ios/Utils/PointsEqual.h +45 -0
- package/ios/Utils/ResolveImageHelper.swift +142 -0
- package/ios/YamapLiteCircleView.h +15 -0
- package/ios/YamapLiteCircleView.mm +102 -0
- package/ios/YamapLiteMarkerView.h +15 -0
- package/ios/YamapLiteMarkerView.mm +102 -0
- package/ios/YamapLitePolygonView.h +15 -0
- package/ios/YamapLitePolygonView.mm +120 -0
- package/ios/YamapLitePolylineView.h +15 -0
- package/ios/YamapLitePolylineView.mm +115 -0
- package/ios/YamapLiteView.h +15 -0
- package/ios/YamapLiteView.mm +361 -0
- package/ios/YamapLiteViewManager.mm +17 -0
- package/ios/YamapUtils.h +5 -0
- package/ios/YamapUtils.mm +205 -0
- package/lib/module/@types/index.js +8 -0
- package/lib/module/@types/index.js.map +1 -0
- package/lib/module/ClusteredYamapLiteViewNativeComponent.ts +98 -0
- package/lib/module/Components/Circle.js +20 -0
- package/lib/module/Components/Circle.js.map +1 -0
- package/lib/module/Components/ClusteredYamap.js +133 -0
- package/lib/module/Components/ClusteredYamap.js.map +1 -0
- package/lib/module/Components/Marker.js +40 -0
- package/lib/module/Components/Marker.js.map +1 -0
- package/lib/module/Components/Polygon.js +25 -0
- package/lib/module/Components/Polygon.js.map +1 -0
- package/lib/module/Components/Polyline.js +25 -0
- package/lib/module/Components/Polyline.js.map +1 -0
- package/lib/module/Components/Yamap.js +124 -0
- package/lib/module/Components/Yamap.js.map +1 -0
- package/lib/module/Components/index.js +9 -0
- package/lib/module/Components/index.js.map +1 -0
- package/lib/module/NativeYamapUtils.js +5 -0
- package/lib/module/NativeYamapUtils.js.map +1 -0
- package/lib/module/Utils/YamapUtils.js +14 -0
- package/lib/module/Utils/YamapUtils.js.map +1 -0
- package/lib/module/YamapCircleViewNativeComponent.ts +28 -0
- package/lib/module/YamapLiteViewNativeComponent.ts +93 -0
- package/lib/module/YamapMarkerViewNativeComponent.ts +32 -0
- package/lib/module/YamapPolygonViewNativeComponent.ts +28 -0
- package/lib/module/YamapPolylineViewNativeComponent.ts +31 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/@types/index.d.ts +257 -0
- package/lib/typescript/src/@types/index.d.ts.map +1 -0
- package/lib/typescript/src/ClusteredYamapLiteViewNativeComponent.d.ts +82 -0
- package/lib/typescript/src/ClusteredYamapLiteViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/Components/Circle.d.ts +4 -0
- package/lib/typescript/src/Components/Circle.d.ts.map +1 -0
- package/lib/typescript/src/Components/ClusteredYamap.d.ts +3 -0
- package/lib/typescript/src/Components/ClusteredYamap.d.ts.map +1 -0
- package/lib/typescript/src/Components/Marker.d.ts +3 -0
- package/lib/typescript/src/Components/Marker.d.ts.map +1 -0
- package/lib/typescript/src/Components/Polygon.d.ts +4 -0
- package/lib/typescript/src/Components/Polygon.d.ts.map +1 -0
- package/lib/typescript/src/Components/Polyline.d.ts +4 -0
- package/lib/typescript/src/Components/Polyline.d.ts.map +1 -0
- package/lib/typescript/src/Components/Yamap.d.ts +3 -0
- package/lib/typescript/src/Components/Yamap.d.ts.map +1 -0
- package/lib/typescript/src/Components/index.d.ts +7 -0
- package/lib/typescript/src/Components/index.d.ts.map +1 -0
- package/lib/typescript/src/NativeYamapUtils.d.ts +30 -0
- package/lib/typescript/src/NativeYamapUtils.d.ts.map +1 -0
- package/lib/typescript/src/Utils/YamapUtils.d.ts +27 -0
- package/lib/typescript/src/Utils/YamapUtils.d.ts.map +1 -0
- package/lib/typescript/src/YamapCircleViewNativeComponent.d.ts +20 -0
- package/lib/typescript/src/YamapCircleViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/YamapLiteViewNativeComponent.d.ts +80 -0
- package/lib/typescript/src/YamapLiteViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/YamapMarkerViewNativeComponent.d.ts +25 -0
- package/lib/typescript/src/YamapMarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/YamapPolygonViewNativeComponent.d.ts +20 -0
- package/lib/typescript/src/YamapPolygonViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/YamapPolylineViewNativeComponent.d.ts +23 -0
- package/lib/typescript/src/YamapPolylineViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +189 -0
- package/src/@types/index.ts +314 -0
- package/src/ClusteredYamapLiteViewNativeComponent.ts +98 -0
- package/src/Components/Circle.tsx +22 -0
- package/src/Components/ClusteredYamap.tsx +194 -0
- package/src/Components/Marker.tsx +50 -0
- package/src/Components/Polygon.tsx +27 -0
- package/src/Components/Polyline.tsx +27 -0
- package/src/Components/Yamap.tsx +176 -0
- package/src/Components/index.ts +6 -0
- package/src/NativeYamapUtils.ts +47 -0
- package/src/Utils/YamapUtils.ts +63 -0
- package/src/YamapCircleViewNativeComponent.ts +28 -0
- package/src/YamapLiteViewNativeComponent.ts +93 -0
- package/src/YamapMarkerViewNativeComponent.ts +32 -0
- package/src/YamapPolygonViewNativeComponent.ts +28 -0
- package/src/YamapPolylineViewNativeComponent.ts +31 -0
- package/src/index.tsx +5 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
4
|
+
import { findNodeHandle, Image } from 'react-native';
|
|
5
|
+
import YamapLiteView from '../YamapLiteViewNativeComponent';
|
|
6
|
+
import { YamapUtils } from "../Utils/YamapUtils.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const YaMap = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
+
const nativeRef = useRef(null);
|
|
10
|
+
// Always holds the latest props without closing over stale values in imperative handle
|
|
11
|
+
const latestProps = useRef(props);
|
|
12
|
+
latestProps.current = props;
|
|
13
|
+
const {
|
|
14
|
+
userLocationIcon,
|
|
15
|
+
interactive = true,
|
|
16
|
+
zoomGesturesEnabled = true,
|
|
17
|
+
scrollGesturesEnabled = true,
|
|
18
|
+
tiltGesturesEnabled = true,
|
|
19
|
+
rotateGesturesEnabled = true,
|
|
20
|
+
fastTapEnabled = true,
|
|
21
|
+
nightMode = false,
|
|
22
|
+
showUserPosition = false,
|
|
23
|
+
userLocationAccuracyFillColor = '#00FF00',
|
|
24
|
+
userLocationAccuracyStrokeColor = '#000000',
|
|
25
|
+
userLocationAccuracyStrokeWidth = 2,
|
|
26
|
+
userLocationIconScale = 1,
|
|
27
|
+
onMapPress,
|
|
28
|
+
onMapLongPress,
|
|
29
|
+
// Destructure backward-compat callbacks so they don't leak into otherProps
|
|
30
|
+
onCameraPositionReceived: _onCameraPositionReceived,
|
|
31
|
+
onVisibleRegionReceived: _onVisibleRegionReceived,
|
|
32
|
+
onWorldToScreenPointsReceived: _onWorldToScreenPointsReceived,
|
|
33
|
+
onScreenToWorldPointsReceived: _onScreenToWorldPointsReceived,
|
|
34
|
+
...otherProps
|
|
35
|
+
} = props;
|
|
36
|
+
useImperativeHandle(ref, () => ({
|
|
37
|
+
getCameraPosition: async () => {
|
|
38
|
+
const result = await YamapUtils.getCameraPosition(findNodeHandle(nativeRef.current));
|
|
39
|
+
latestProps.current.onCameraPositionReceived?.({
|
|
40
|
+
nativeEvent: result
|
|
41
|
+
});
|
|
42
|
+
return result;
|
|
43
|
+
},
|
|
44
|
+
getVisibleRegion: async () => {
|
|
45
|
+
const result = await YamapUtils.getVisibleRegion(findNodeHandle(nativeRef.current));
|
|
46
|
+
latestProps.current.onVisibleRegionReceived?.({
|
|
47
|
+
nativeEvent: result
|
|
48
|
+
});
|
|
49
|
+
return result;
|
|
50
|
+
},
|
|
51
|
+
getScreenPoints: async points => {
|
|
52
|
+
const result = await YamapUtils.getScreenPoints(findNodeHandle(nativeRef.current), points);
|
|
53
|
+
latestProps.current.onWorldToScreenPointsReceived?.({
|
|
54
|
+
nativeEvent: {
|
|
55
|
+
points: result.points
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return result.points;
|
|
59
|
+
},
|
|
60
|
+
getWorldPoints: async points => {
|
|
61
|
+
const result = await YamapUtils.getWorldPoints(findNodeHandle(nativeRef.current), points);
|
|
62
|
+
latestProps.current.onScreenToWorldPointsReceived?.({
|
|
63
|
+
nativeEvent: {
|
|
64
|
+
points: result.points
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return result.points;
|
|
68
|
+
},
|
|
69
|
+
setZoom: async (zoom, duration, animation) => {
|
|
70
|
+
await YamapUtils.setZoom(findNodeHandle(nativeRef.current), zoom, duration ?? 500, animation ?? 'SMOOTH');
|
|
71
|
+
},
|
|
72
|
+
setCenter: async (center, zoom, azimuth, tilt, duration, animation) => {
|
|
73
|
+
await YamapUtils.setCenter(findNodeHandle(nativeRef.current), center.lat, center.lon, zoom ?? 10, azimuth ?? 0, tilt ?? 0, duration ?? 500, animation ?? 'SMOOTH');
|
|
74
|
+
},
|
|
75
|
+
fitAllMarkers: async () => {
|
|
76
|
+
await YamapUtils.fitAllMarkers(findNodeHandle(nativeRef.current));
|
|
77
|
+
},
|
|
78
|
+
fitMarkers: async _markers => {
|
|
79
|
+
await YamapUtils.fitAllMarkers(findNodeHandle(nativeRef.current));
|
|
80
|
+
},
|
|
81
|
+
getMapObjectCount: async () => {
|
|
82
|
+
return YamapUtils.getMapObjectCount(findNodeHandle(nativeRef.current));
|
|
83
|
+
},
|
|
84
|
+
setTrafficVisible: _visible => {
|
|
85
|
+
// Traffic layer is not available in lite SDK
|
|
86
|
+
}
|
|
87
|
+
}), []);
|
|
88
|
+
const userLocationIconUri = userLocationIcon ? Image.resolveAssetSource(userLocationIcon).uri : '';
|
|
89
|
+
const handleMapPress = event => {
|
|
90
|
+
if (onMapPress) {
|
|
91
|
+
onMapPress({
|
|
92
|
+
lat: event.nativeEvent.lat,
|
|
93
|
+
lon: event.nativeEvent.lon
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const handleMapLongPress = event => {
|
|
98
|
+
if (onMapLongPress) {
|
|
99
|
+
onMapLongPress({
|
|
100
|
+
lat: event.nativeEvent.lat,
|
|
101
|
+
lon: event.nativeEvent.lon
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return /*#__PURE__*/_jsx(YamapLiteView, {
|
|
106
|
+
ref: nativeRef,
|
|
107
|
+
userLocationIcon: userLocationIconUri,
|
|
108
|
+
zoomGesturesEnabled: interactive ? zoomGesturesEnabled : false,
|
|
109
|
+
scrollGesturesEnabled: interactive ? scrollGesturesEnabled : false,
|
|
110
|
+
tiltGesturesEnabled: interactive ? tiltGesturesEnabled : false,
|
|
111
|
+
rotateGesturesEnabled: interactive ? rotateGesturesEnabled : false,
|
|
112
|
+
fastTapEnabled: interactive ? fastTapEnabled : false,
|
|
113
|
+
nightMode: nightMode,
|
|
114
|
+
showUserPosition: showUserPosition,
|
|
115
|
+
userLocationAccuracyFillColor: userLocationAccuracyFillColor,
|
|
116
|
+
userLocationAccuracyStrokeColor: userLocationAccuracyStrokeColor,
|
|
117
|
+
userLocationAccuracyStrokeWidth: userLocationAccuracyStrokeWidth,
|
|
118
|
+
userLocationIconScale: userLocationIconScale,
|
|
119
|
+
onMapPress: handleMapPress,
|
|
120
|
+
onMapLongPress: handleMapLongPress,
|
|
121
|
+
...otherProps
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=Yamap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useImperativeHandle","useRef","findNodeHandle","Image","YamapLiteView","YamapUtils","jsx","_jsx","YaMap","props","ref","nativeRef","latestProps","current","userLocationIcon","interactive","zoomGesturesEnabled","scrollGesturesEnabled","tiltGesturesEnabled","rotateGesturesEnabled","fastTapEnabled","nightMode","showUserPosition","userLocationAccuracyFillColor","userLocationAccuracyStrokeColor","userLocationAccuracyStrokeWidth","userLocationIconScale","onMapPress","onMapLongPress","onCameraPositionReceived","_onCameraPositionReceived","onVisibleRegionReceived","_onVisibleRegionReceived","onWorldToScreenPointsReceived","_onWorldToScreenPointsReceived","onScreenToWorldPointsReceived","_onScreenToWorldPointsReceived","otherProps","getCameraPosition","result","nativeEvent","getVisibleRegion","getScreenPoints","points","getWorldPoints","setZoom","zoom","duration","animation","setCenter","center","azimuth","tilt","lat","lon","fitAllMarkers","fitMarkers","_markers","getMapObjectCount","setTrafficVisible","_visible","userLocationIconUri","resolveAssetSource","uri","handleMapPress","event","handleMapLongPress"],"sourceRoot":"../../../src","sources":["Components/Yamap.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,mBAAmB,EACnBC,MAAM,QAED,OAAO;AACd,SAASC,cAAc,EAAEC,KAAK,QAAmC,cAAc;AAE/E,OAAOC,aAAa,MAAM,iCAAiC;AAC3D,SAASC,UAAU,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjD,OAAO,MAAMC,KAAK,gBAAGT,UAAU,CAC7B,CAACU,KAAiB,EAAEC,GAA2B,KAAK;EAClD,MAAMC,SAAS,GAAGV,MAAM,CAAC,IAAI,CAAC;EAC9B;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,KAAM;IACnEC,mBAAmB,EAAEH,WAAW,GAAGG,mBAAmB,GAAG,KAAM;IAC/DC,qBAAqB,EAAEJ,WAAW,GAAGI,qBAAqB,GAAG,KAAM;IACnEC,cAAc,EAAEL,WAAW,GAAGK,cAAc,GAAG,KAAM;IACrDC,SAAS,EAAEA,SAAU;IACrBC,gBAAgB,EAAEA,gBAAiB;IACnCC,6BAA6B,EAAEA,6BAA8B;IAC7DC,+BAA+B,EAAEA,+BAAgC;IACjEC,+BAA+B,EAAEA,+BAAgC;IACjEC,qBAAqB,EAAEA,qBAAsB;IAC7CC,UAAU,EAAEqC,cAAe;IAC3BpC,cAAc,EAAEsC,kBAAmB;IAAA,GAC/B7B;EAAU,CACf,CAAC;AAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["Components/index.ts"],"mappings":";;AAAA,cAAc,aAAU;AACxB,cAAc,aAAU;AACxB,cAAc,cAAW;AACzB,cAAc,eAAY;AAC1B,cAAc,YAAS;AACvB,cAAc,qBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeYamapUtils.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,cAAc;AA8CpE,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform, NativeModules } from 'react-native';
|
|
4
|
+
const LINKING_ERROR = `The package '@exterio/react-native-yamap-lite' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
5
|
+
ios: "- You have run 'pod install'\n",
|
|
6
|
+
default: ''
|
|
7
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
|
|
8
|
+
const YamapUtilsModule = true ? require('../NativeYamapUtils').default : NativeModules.TurboExample;
|
|
9
|
+
export const YamapUtils = YamapUtilsModule ? YamapUtilsModule : new Proxy({}, {
|
|
10
|
+
get() {
|
|
11
|
+
throw new Error(LINKING_ERROR);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=YamapUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","NativeModules","LINKING_ERROR","select","ios","default","YamapUtilsModule","require","TurboExample","YamapUtils","Proxy","get","Error"],"sourceRoot":"../../../src","sources":["Utils/YamapUtils.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,aAAa,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,2FAA2F,GAC3FF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AA2C/C,MAAMC,gBAAgB,GAAG,IAAI,GACzBC,OAAO,CAAC,qBAAqB,CAAC,CAACF,OAAO,GACtCJ,aAAa,CAACO,YAAY;AAE9B,OAAO,MAAMC,UAA6B,GAAGH,gBAAgB,GACzDA,gBAAgB,GAChB,IAAII,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACV,aAAa,CAAC;EAChC;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { HostComponent, ViewProps, ColorValue } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DirectEventHandler,
|
|
5
|
+
Double,
|
|
6
|
+
Float,
|
|
7
|
+
Int32,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
|
|
10
|
+
interface Point {
|
|
11
|
+
lat: Double;
|
|
12
|
+
lon: Double;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
fillColor?: ColorValue;
|
|
17
|
+
strokeColor?: ColorValue;
|
|
18
|
+
strokeWidth?: Float;
|
|
19
|
+
zInd?: Int32;
|
|
20
|
+
onCirclePress?: DirectEventHandler<Readonly<Point>>;
|
|
21
|
+
center: Point;
|
|
22
|
+
radius: Float;
|
|
23
|
+
handled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type YamapLiteCircleViewComponent = HostComponent<NativeProps>;
|
|
27
|
+
|
|
28
|
+
export default codegenNativeComponent<NativeProps>('YamapLiteCircleView');
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DirectEventHandler,
|
|
5
|
+
Double,
|
|
6
|
+
Float,
|
|
7
|
+
WithDefault,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
|
|
10
|
+
interface Point {
|
|
11
|
+
lat: Double;
|
|
12
|
+
lon: Double;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface YandexLogoPosition {
|
|
16
|
+
vertical?: WithDefault<'top' | 'bottom', 'bottom'>;
|
|
17
|
+
horizontal?: WithDefault<'left' | 'center' | 'right', 'left'>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface YandexLogoPadding {
|
|
21
|
+
vertical?: Double;
|
|
22
|
+
horizontal?: Double;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface MapLoad {
|
|
26
|
+
renderObjectCount: Double;
|
|
27
|
+
curZoomModelsLoaded: Double;
|
|
28
|
+
curZoomPlacemarksLoaded: Double;
|
|
29
|
+
curZoomLabelsLoaded: Double;
|
|
30
|
+
curZoomGeometryLoaded: Double;
|
|
31
|
+
tileMemoryUsage: Double;
|
|
32
|
+
delayedGeometryLoaded: Double;
|
|
33
|
+
fullyAppeared: Double;
|
|
34
|
+
fullyLoaded: Double;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface InitialRegion {
|
|
38
|
+
lat: Double;
|
|
39
|
+
lon: Double;
|
|
40
|
+
zoom?: Double;
|
|
41
|
+
azimuth?: Double;
|
|
42
|
+
tilt?: Double;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CameraPosition {
|
|
46
|
+
finished: boolean;
|
|
47
|
+
point: {
|
|
48
|
+
lat: Double;
|
|
49
|
+
lon: Double;
|
|
50
|
+
};
|
|
51
|
+
zoom: Double;
|
|
52
|
+
azimuth: Double;
|
|
53
|
+
tilt: Double;
|
|
54
|
+
target: Double;
|
|
55
|
+
reason: 'GESTURES' | 'APPLICATION';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface NativeProps extends ViewProps {
|
|
59
|
+
userLocationIcon?: string;
|
|
60
|
+
userLocationIconScale?: Float;
|
|
61
|
+
/** @default false */
|
|
62
|
+
showUserPosition?: boolean;
|
|
63
|
+
/** @default false */
|
|
64
|
+
nightMode?: boolean;
|
|
65
|
+
mapStyle?: string;
|
|
66
|
+
onCameraPositionChange?: DirectEventHandler<Readonly<CameraPosition>>;
|
|
67
|
+
onCameraPositionChangeEnd?: DirectEventHandler<Readonly<CameraPosition>>;
|
|
68
|
+
onMapPress?: DirectEventHandler<Readonly<Point>>;
|
|
69
|
+
onMapLongPress?: DirectEventHandler<Readonly<Point>>;
|
|
70
|
+
onMapLoaded?: DirectEventHandler<Readonly<MapLoad>>;
|
|
71
|
+
/** @default #00FF00 */
|
|
72
|
+
userLocationAccuracyFillColor?: string;
|
|
73
|
+
/** @default #000000 */
|
|
74
|
+
userLocationAccuracyStrokeColor?: string;
|
|
75
|
+
/** @default 2 */
|
|
76
|
+
userLocationAccuracyStrokeWidth?: Float;
|
|
77
|
+
scrollGesturesEnabled?: WithDefault<boolean, true>;
|
|
78
|
+
zoomGesturesEnabled?: WithDefault<boolean, true>;
|
|
79
|
+
tiltGesturesEnabled?: WithDefault<boolean, true>;
|
|
80
|
+
rotateGesturesEnabled?: WithDefault<boolean, true>;
|
|
81
|
+
fastTapEnabled?: WithDefault<boolean, true>;
|
|
82
|
+
initialRegion?: InitialRegion;
|
|
83
|
+
maxFps?: Float;
|
|
84
|
+
mapType?: WithDefault<'map' | 'satellite' | 'hybrid', 'map'>;
|
|
85
|
+
/** @default false */
|
|
86
|
+
followUser?: boolean;
|
|
87
|
+
logoPosition?: YandexLogoPosition;
|
|
88
|
+
logoPadding?: YandexLogoPadding;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type YamapViewComponent = HostComponent<NativeProps>;
|
|
92
|
+
|
|
93
|
+
export default codegenNativeComponent<NativeProps>('YamapLiteView');
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DirectEventHandler,
|
|
5
|
+
Double,
|
|
6
|
+
Int32,
|
|
7
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
|
|
9
|
+
interface Point {
|
|
10
|
+
lat: Double;
|
|
11
|
+
lon: Double;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface NativeProps extends ViewProps {
|
|
15
|
+
point: Point;
|
|
16
|
+
zInd?: Int32;
|
|
17
|
+
scale?: Double;
|
|
18
|
+
rotated?: boolean;
|
|
19
|
+
onMarkerPress?: DirectEventHandler<Readonly<Point>>;
|
|
20
|
+
source?: string;
|
|
21
|
+
anchor?: {
|
|
22
|
+
x: Double;
|
|
23
|
+
y: Double;
|
|
24
|
+
};
|
|
25
|
+
visible?: boolean;
|
|
26
|
+
handled?: boolean;
|
|
27
|
+
size?: Int32;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type YamapLiteMarkerViewComponent = HostComponent<NativeProps>;
|
|
31
|
+
|
|
32
|
+
export default codegenNativeComponent<NativeProps>('YamapLiteMarkerView');
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { HostComponent, ViewProps, ColorValue } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DirectEventHandler,
|
|
5
|
+
Double,
|
|
6
|
+
Float,
|
|
7
|
+
Int32,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
|
|
10
|
+
interface Point {
|
|
11
|
+
lat: Double;
|
|
12
|
+
lon: Double;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
fillColor?: ColorValue;
|
|
17
|
+
strokeColor?: ColorValue;
|
|
18
|
+
strokeWidth?: Float;
|
|
19
|
+
zInd?: Int32;
|
|
20
|
+
onPolygonPress?: DirectEventHandler<Readonly<Point>>;
|
|
21
|
+
points: Point[];
|
|
22
|
+
innerRings?: Point[][];
|
|
23
|
+
handled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type YamapLitePolygonViewComponent = HostComponent<NativeProps>;
|
|
27
|
+
|
|
28
|
+
export default codegenNativeComponent<NativeProps>('YamapLitePolygonView');
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { HostComponent, ViewProps, ColorValue } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DirectEventHandler,
|
|
5
|
+
Double,
|
|
6
|
+
Float,
|
|
7
|
+
Int32,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
|
|
10
|
+
interface Point {
|
|
11
|
+
lat: Double;
|
|
12
|
+
lon: Double;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
strokeColor?: ColorValue;
|
|
17
|
+
strokeWidth?: Float;
|
|
18
|
+
outlineColor?: ColorValue;
|
|
19
|
+
zInd?: Int32;
|
|
20
|
+
dashLength?: Float;
|
|
21
|
+
gapLength?: Float;
|
|
22
|
+
outlineWidth?: Float;
|
|
23
|
+
dashOffset?: Float;
|
|
24
|
+
onPolylinePress?: DirectEventHandler<Readonly<Point>>;
|
|
25
|
+
points: Point[];
|
|
26
|
+
handled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type YamapLitePolylineViewComponent = HostComponent<NativeProps>;
|
|
30
|
+
|
|
31
|
+
export default codegenNativeComponent<NativeProps>('YamapLitePolylineView');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["YaMap","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,cAAc,uBAAc;AAC5B,cAAc,uBAAoB;AAClC,cAAc,mBAAU;AAExB,SAASA,KAAK,IAAIC,OAAO,QAAQ,uBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import type { ImageSourcePropType, ViewProps } from 'react-native';
|
|
2
|
+
export type CameraPositionResult = {
|
|
3
|
+
lat: number;
|
|
4
|
+
lon: number;
|
|
5
|
+
zoom: number;
|
|
6
|
+
azimuth: number;
|
|
7
|
+
tilt: number;
|
|
8
|
+
};
|
|
9
|
+
export type YaMapRef = {
|
|
10
|
+
getCameraPosition: () => Promise<CameraPositionResult>;
|
|
11
|
+
getVisibleRegion: () => Promise<VisibleRegion>;
|
|
12
|
+
getScreenPoints: (points: Point[]) => Promise<ScreenPoint[]>;
|
|
13
|
+
getWorldPoints: (points: ScreenPoint[]) => Promise<Point[]>;
|
|
14
|
+
setZoom: (zoom: number, duration?: number, animation?: 'LINEAR' | 'SMOOTH') => Promise<void>;
|
|
15
|
+
setCenter: (center: {
|
|
16
|
+
lat: number;
|
|
17
|
+
lon: number;
|
|
18
|
+
}, zoom?: number, azimuth?: number, tilt?: number, duration?: number, animation?: 'LINEAR' | 'SMOOTH') => Promise<void>;
|
|
19
|
+
fitAllMarkers: () => Promise<void>;
|
|
20
|
+
/** Alias for fitAllMarkers — lite SDK does not support targeting specific markers */
|
|
21
|
+
fitMarkers: (markers: any[]) => Promise<void>;
|
|
22
|
+
/** No-op — traffic layer is not available in lite SDK */
|
|
23
|
+
setTrafficVisible: (visible: boolean) => void;
|
|
24
|
+
getMapObjectCount: () => Promise<number>;
|
|
25
|
+
};
|
|
26
|
+
export type MarkerRef = {
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Not supported in lite SDK. Update the `point` prop instead
|
|
29
|
+
*/
|
|
30
|
+
animatedMoveTo: (point: Point, duration: number) => void;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Not supported in lite SDK
|
|
33
|
+
*/
|
|
34
|
+
animatedRotateTo: (angle: number, duration: number) => void;
|
|
35
|
+
};
|
|
36
|
+
export interface MarkerProps extends ViewProps {
|
|
37
|
+
point: Point;
|
|
38
|
+
zIndex?: number;
|
|
39
|
+
scale?: number;
|
|
40
|
+
rotated?: boolean;
|
|
41
|
+
onPress?: (event: Point) => void;
|
|
42
|
+
source?: ImageSourcePropType;
|
|
43
|
+
anchor?: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
};
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
handled?: boolean;
|
|
49
|
+
size?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface CircleProps extends ViewProps {
|
|
52
|
+
fillColor?: string;
|
|
53
|
+
strokeColor?: string;
|
|
54
|
+
strokeWidth?: number;
|
|
55
|
+
zIndex?: number;
|
|
56
|
+
onPress?: (event: Point) => void;
|
|
57
|
+
center: Point;
|
|
58
|
+
radius: number;
|
|
59
|
+
handled?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface PolygonProps extends ViewProps {
|
|
62
|
+
fillColor?: string;
|
|
63
|
+
strokeColor?: string;
|
|
64
|
+
strokeWidth?: number;
|
|
65
|
+
zIndex?: number;
|
|
66
|
+
onPress?: (event: Point) => void;
|
|
67
|
+
points: Point[];
|
|
68
|
+
innerRings?: Point[][];
|
|
69
|
+
handled?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface PolylineProps extends ViewProps {
|
|
72
|
+
strokeColor?: string;
|
|
73
|
+
strokeWidth?: number;
|
|
74
|
+
outlineColor?: string;
|
|
75
|
+
outlineWidth?: number;
|
|
76
|
+
zIndex?: number;
|
|
77
|
+
dashLength?: number;
|
|
78
|
+
gapLength?: number;
|
|
79
|
+
dashOffset?: number;
|
|
80
|
+
onPress?: (event: Point) => void;
|
|
81
|
+
points: Point[];
|
|
82
|
+
handled?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface YaMapProps extends ViewProps {
|
|
85
|
+
userLocationIcon?: ImageSourcePropType;
|
|
86
|
+
/** @default 1 */
|
|
87
|
+
userLocationIconScale?: number;
|
|
88
|
+
/** @default false */
|
|
89
|
+
showUserPosition?: boolean;
|
|
90
|
+
/** @default false */
|
|
91
|
+
nightMode?: boolean;
|
|
92
|
+
mapStyle?: string;
|
|
93
|
+
onCameraPositionChange?: (event: CameraPosition) => void;
|
|
94
|
+
onCameraPositionChangeEnd?: (event: CameraPosition) => void;
|
|
95
|
+
onMapPress?: (event: Point) => void;
|
|
96
|
+
onMapLongPress?: (event: Point) => void;
|
|
97
|
+
onMapLoaded?: (event: MapLoaded) => void;
|
|
98
|
+
/** @default #00FF00 */
|
|
99
|
+
userLocationAccuracyFillColor?: string;
|
|
100
|
+
/** @default #000000 */
|
|
101
|
+
userLocationAccuracyStrokeColor?: string;
|
|
102
|
+
/** @default 2 */
|
|
103
|
+
userLocationAccuracyStrokeWidth?: number;
|
|
104
|
+
/** @default true */
|
|
105
|
+
scrollGesturesEnabled?: boolean;
|
|
106
|
+
/** @default true */
|
|
107
|
+
zoomGesturesEnabled?: boolean;
|
|
108
|
+
/** @default true */
|
|
109
|
+
tiltGesturesEnabled?: boolean;
|
|
110
|
+
/** @default true */
|
|
111
|
+
rotateGesturesEnabled?: boolean;
|
|
112
|
+
/** @default true */
|
|
113
|
+
fastTapEnabled?: boolean;
|
|
114
|
+
initialRegion?: InitialRegion;
|
|
115
|
+
/** @default 60 */
|
|
116
|
+
maxFps?: number;
|
|
117
|
+
/** @default 'map' */
|
|
118
|
+
mapType?: 'map' | 'satellite' | 'hybrid';
|
|
119
|
+
/** @default false */
|
|
120
|
+
followUser?: boolean;
|
|
121
|
+
logoPosition?: YandexLogoPosition;
|
|
122
|
+
logoPadding?: YandexLogoPadding;
|
|
123
|
+
/**
|
|
124
|
+
* Disables all map gestures when false.
|
|
125
|
+
* @default true
|
|
126
|
+
*/
|
|
127
|
+
interactive?: boolean;
|
|
128
|
+
/** Fired after getCameraPosition() resolves — for backward compatibility with react-native-yamap */
|
|
129
|
+
onCameraPositionReceived?: (event: {
|
|
130
|
+
nativeEvent: CameraPositionResult;
|
|
131
|
+
}) => void;
|
|
132
|
+
/** Fired after getVisibleRegion() resolves — for backward compatibility with react-native-yamap */
|
|
133
|
+
onVisibleRegionReceived?: (event: {
|
|
134
|
+
nativeEvent: VisibleRegion;
|
|
135
|
+
}) => void;
|
|
136
|
+
/** Fired after getScreenPoints() resolves — for backward compatibility with react-native-yamap */
|
|
137
|
+
onWorldToScreenPointsReceived?: (event: {
|
|
138
|
+
nativeEvent: {
|
|
139
|
+
points: ScreenPoint[];
|
|
140
|
+
};
|
|
141
|
+
}) => void;
|
|
142
|
+
/** Fired after getWorldPoints() resolves — for backward compatibility with react-native-yamap */
|
|
143
|
+
onScreenToWorldPointsReceived?: (event: {
|
|
144
|
+
nativeEvent: {
|
|
145
|
+
points: Point[];
|
|
146
|
+
};
|
|
147
|
+
}) => void;
|
|
148
|
+
}
|
|
149
|
+
export interface ClusteredYamapProps<T = any> extends YaMapProps {
|
|
150
|
+
clusteredMarkers: ReadonlyArray<{
|
|
151
|
+
point: Point;
|
|
152
|
+
data: T;
|
|
153
|
+
}>;
|
|
154
|
+
renderMarker: (info: {
|
|
155
|
+
point: Point;
|
|
156
|
+
data: T;
|
|
157
|
+
}, index: number) => React.ReactElement;
|
|
158
|
+
/** @default #FF0000 */
|
|
159
|
+
clusterColor?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface Point {
|
|
162
|
+
lat: number;
|
|
163
|
+
lon: number;
|
|
164
|
+
}
|
|
165
|
+
export interface BoundingBox {
|
|
166
|
+
southWest: Point;
|
|
167
|
+
northEast: Point;
|
|
168
|
+
}
|
|
169
|
+
export interface ScreenPoint {
|
|
170
|
+
x: number;
|
|
171
|
+
y: number;
|
|
172
|
+
}
|
|
173
|
+
export interface MapLoaded {
|
|
174
|
+
nativeEvent: {
|
|
175
|
+
renderObjectCount: number;
|
|
176
|
+
curZoomModelsLoaded: number;
|
|
177
|
+
curZoomPlacemarksLoaded: number;
|
|
178
|
+
curZoomLabelsLoaded: number;
|
|
179
|
+
curZoomGeometryLoaded: number;
|
|
180
|
+
tileMemoryUsage: number;
|
|
181
|
+
delayedGeometryLoaded: number;
|
|
182
|
+
fullyAppeared: number;
|
|
183
|
+
fullyLoaded: number;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export interface InitialRegion {
|
|
187
|
+
lat: number;
|
|
188
|
+
lon: number;
|
|
189
|
+
zoom?: number;
|
|
190
|
+
azimuth?: number;
|
|
191
|
+
tilt?: number;
|
|
192
|
+
}
|
|
193
|
+
export type MasstransitVehicles = 'bus' | 'trolleybus' | 'tramway' | 'minibus' | 'suburban' | 'underground' | 'ferry' | 'cable' | 'funicular';
|
|
194
|
+
export type Vehicles = MasstransitVehicles | 'walk' | 'car';
|
|
195
|
+
export interface DrivingInfo {
|
|
196
|
+
time: string;
|
|
197
|
+
timeWithTraffic: string;
|
|
198
|
+
distance: number;
|
|
199
|
+
}
|
|
200
|
+
export interface MasstransitInfo {
|
|
201
|
+
time: string;
|
|
202
|
+
transferCount: number;
|
|
203
|
+
walkingDistance: number;
|
|
204
|
+
}
|
|
205
|
+
export interface RouteInfo<T extends DrivingInfo | MasstransitInfo> {
|
|
206
|
+
id: string;
|
|
207
|
+
sections: {
|
|
208
|
+
points: Point[];
|
|
209
|
+
sectionInfo: T;
|
|
210
|
+
routeInfo: T;
|
|
211
|
+
routeIndex: number;
|
|
212
|
+
stops: any[];
|
|
213
|
+
type: string;
|
|
214
|
+
transports?: any;
|
|
215
|
+
sectionColor?: string;
|
|
216
|
+
}[];
|
|
217
|
+
}
|
|
218
|
+
export interface RoutesFoundEvent<T extends DrivingInfo | MasstransitInfo> {
|
|
219
|
+
nativeEvent: {
|
|
220
|
+
status: 'success' | 'error';
|
|
221
|
+
id: string;
|
|
222
|
+
routes: RouteInfo<T>[];
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
export interface CameraPosition {
|
|
226
|
+
nativeEvent: {
|
|
227
|
+
zoom: number;
|
|
228
|
+
tilt: number;
|
|
229
|
+
azimuth: number;
|
|
230
|
+
point: {
|
|
231
|
+
lat: number;
|
|
232
|
+
lon: number;
|
|
233
|
+
};
|
|
234
|
+
finished: boolean;
|
|
235
|
+
target: number;
|
|
236
|
+
reason: 'GESTURES' | 'APPLICATION';
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
export type VisibleRegion = {
|
|
240
|
+
bottomLeft: Point;
|
|
241
|
+
bottomRight: Point;
|
|
242
|
+
topLeft: Point;
|
|
243
|
+
topRight: Point;
|
|
244
|
+
};
|
|
245
|
+
export declare enum Animation {
|
|
246
|
+
SMOOTH = 0,
|
|
247
|
+
LINEAR = 1
|
|
248
|
+
}
|
|
249
|
+
export type YandexLogoPosition = {
|
|
250
|
+
horizontal?: 'left' | 'center' | 'right';
|
|
251
|
+
vertical?: 'top' | 'bottom';
|
|
252
|
+
};
|
|
253
|
+
export type YandexLogoPadding = {
|
|
254
|
+
horizontal?: number;
|
|
255
|
+
vertical?: number;
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=index.d.ts.map
|