react-native-maplibre-gl-js 1.0.3 → 1.1.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/README.md +74 -23
- package/lib/module/index.js +9 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/react-native/components/Map/Map.js +30 -1
- package/lib/module/react-native/components/Map/Map.js.map +1 -1
- package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js +1 -1
- package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js.map +1 -1
- package/lib/module/react-native/components/MapProvider/MapProvider.js +15 -3
- package/lib/module/react-native/components/MapProvider/MapProvider.js.map +1 -1
- package/lib/module/react-native/components/Marker/Marker.js +51 -1
- package/lib/module/react-native/components/Marker/Marker.js.map +1 -1
- package/lib/module/react-native/components/Popup/Popup.js +27 -1
- package/lib/module/react-native/components/Popup/Popup.js.map +1 -1
- package/lib/module/react-native/hooks/atoms/useMapAtoms.js +1 -1
- package/lib/module/typedoc.js +0 -2
- package/lib/module/web/maplibre-gl-js/MapController.js +1 -1
- package/lib/typescript/src/index.d.ts +10 -14
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Map/Map.d.ts +30 -1
- package/lib/typescript/src/react-native/components/Map/Map.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Map/Map.types.d.ts +70 -58
- package/lib/typescript/src/react-native/components/Map/Map.types.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts +12 -2
- package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/MapProvider/MapProvider.hooks.d.ts +1 -1
- package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts +11 -1
- package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Marker/Marker.d.ts +51 -1
- package/lib/typescript/src/react-native/components/Marker/Marker.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts +25 -12
- package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Popup/Popup.d.ts +27 -1
- package/lib/typescript/src/react-native/components/Popup/Popup.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts +24 -11
- package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts +18 -16
- package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/typedoc.d.ts +5 -2
- package/lib/typescript/src/typedoc.d.ts.map +1 -1
- package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts +1 -1
- package/package.json +47 -57
|
@@ -1,70 +1,82 @@
|
|
|
1
1
|
import { type Map as MapLibreMap, type MapContextEvent, type MapLayerMouseEvent, type MapLayerTouchEvent, type MapLibreEvent, type MapLibreZoomEvent, type MapOptions as MapLibreMapOptions, MapTouchEvent, MapWheelEvent, ErrorEvent, type MapDataEvent, type MapStyleDataEvent, type MapSourceDataEvent, type MapStyleImageMissingEvent } from 'maplibre-gl';
|
|
2
2
|
import type { WebObjectMethodsInferred, WebObjectOptionsInferred, WebObjectListenerOnMapLayer, WebObjectListenerOnObject, WebObjectListenerOnRN, WebObjectProps, WebObjectRef } from '../../components-factory/createWebObjectAsComponent.types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Map component ref.
|
|
5
|
+
* @interface
|
|
5
6
|
* @group Types
|
|
6
7
|
*/
|
|
7
8
|
export type MapRef = WebObjectRef<MapMethods>;
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Map component props.
|
|
10
11
|
* @group Types
|
|
11
12
|
*/
|
|
12
13
|
export type MapProps = WebObjectProps<MapOptions, MapListeners>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @interface
|
|
16
|
+
* @group Map types
|
|
17
|
+
*/
|
|
18
|
+
export type MapMethods = WebObjectMethodsInferred<MapLibreMap>;
|
|
19
|
+
/**
|
|
20
|
+
* @interface
|
|
21
|
+
* @group Map types
|
|
22
|
+
*/
|
|
23
|
+
export type MapOptions = WebObjectOptionsInferred<MapLibreMapOptions, {}, 'container'>;
|
|
24
|
+
/**
|
|
25
|
+
* @interface
|
|
26
|
+
* @group Map types
|
|
27
|
+
*/
|
|
28
|
+
export type MapListeners = {
|
|
29
|
+
mount?: WebObjectListenerOnRN<void>;
|
|
30
|
+
unmount?: WebObjectListenerOnRN<void>;
|
|
31
|
+
mousedown?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
32
|
+
mouseup?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
33
|
+
mouseover?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
34
|
+
mouseout?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
35
|
+
mousemove?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
36
|
+
mouseenter?: WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
37
|
+
mouseleave?: WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
38
|
+
click?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
39
|
+
dblclick?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
40
|
+
contextmenu?: WebObjectListenerOnObject<MapLayerMouseEvent> | WebObjectListenerOnMapLayer<MapLayerMouseEvent>;
|
|
41
|
+
touchstart?: WebObjectListenerOnObject<MapLayerTouchEvent> | WebObjectListenerOnMapLayer<MapLayerTouchEvent>;
|
|
42
|
+
touchend?: WebObjectListenerOnObject<MapLayerTouchEvent> | WebObjectListenerOnMapLayer<MapLayerTouchEvent>;
|
|
43
|
+
touchcancel?: WebObjectListenerOnObject<MapLayerTouchEvent> | WebObjectListenerOnMapLayer<MapLayerTouchEvent>;
|
|
44
|
+
wheel?: WebObjectListenerOnObject<MapWheelEvent>;
|
|
45
|
+
resize?: WebObjectListenerOnObject<MapLibreEvent>;
|
|
46
|
+
remove?: WebObjectListenerOnObject<MapLibreEvent>;
|
|
47
|
+
touchmove?: WebObjectListenerOnObject<MapTouchEvent>;
|
|
48
|
+
movestart?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
49
|
+
move?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
50
|
+
moveend?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
51
|
+
dragstart?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
52
|
+
drag?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
53
|
+
dragend?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
54
|
+
zoomstart?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
55
|
+
zoom?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
56
|
+
zoomend?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>>;
|
|
57
|
+
rotatestart?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
58
|
+
rotate?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
59
|
+
rotateend?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
60
|
+
pitchstart?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
61
|
+
pitch?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
62
|
+
pitchend?: WebObjectListenerOnObject<MapLibreEvent<MouseEvent | TouchEvent | undefined>>;
|
|
63
|
+
boxzoomstart?: WebObjectListenerOnObject<MapLibreZoomEvent>;
|
|
64
|
+
boxzoomend?: WebObjectListenerOnObject<MapLibreZoomEvent>;
|
|
65
|
+
boxzoomcancel?: WebObjectListenerOnObject<MapLibreZoomEvent>;
|
|
66
|
+
webglcontextlost?: WebObjectListenerOnObject<MapContextEvent>;
|
|
67
|
+
webglcontextrestored?: WebObjectListenerOnObject<MapContextEvent>;
|
|
68
|
+
load?: WebObjectListenerOnObject<MapLibreEvent>;
|
|
69
|
+
render?: WebObjectListenerOnObject<MapLibreEvent>;
|
|
70
|
+
idle?: WebObjectListenerOnObject<MapLibreEvent>;
|
|
71
|
+
error?: WebObjectListenerOnObject<ErrorEvent>;
|
|
72
|
+
data?: WebObjectListenerOnObject<MapDataEvent>;
|
|
73
|
+
styledata?: WebObjectListenerOnObject<MapStyleDataEvent>;
|
|
74
|
+
sourcedata?: WebObjectListenerOnObject<MapSourceDataEvent>;
|
|
75
|
+
dataloading?: WebObjectListenerOnObject<MapDataEvent>;
|
|
76
|
+
styledataloading?: WebObjectListenerOnObject<MapStyleDataEvent>;
|
|
77
|
+
sourcedataloading?: WebObjectListenerOnObject<MapSourceDataEvent>;
|
|
78
|
+
styleimagemissing?: WebObjectListenerOnObject<MapStyleImageMissingEvent>;
|
|
79
|
+
dataabort?: WebObjectListenerOnObject<MapDataEvent>;
|
|
80
|
+
sourcedataabort?: WebObjectListenerOnObject<MapSourceDataEvent>;
|
|
68
81
|
};
|
|
69
|
-
export {};
|
|
70
82
|
//# sourceMappingURL=Map.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Map/Map.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,IAAI,WAAW,EACvB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,IAAI,kBAAkB,EACrC,aAAa,EACb,aAAa,EACb,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"Map.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Map/Map.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,IAAI,WAAW,EACvB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,IAAI,kBAAkB,EACrC,aAAa,EACb,aAAa,EACb,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAElE;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,UAAU,EAAE,YAAY,CAAC,CAAA;AAE/D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAA;AAC9D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAC/C,kBAAkB,EAClB,EAAE,EACF,WAAW,CACZ,CAAA;AACD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IAEzB,KAAK,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAErC,SAAS,CAAC,EACN,yBAAyB,CAAC,kBAAkB,CAAC,GAC7C,2BAA2B,CAAC,kBAAkB,CAAC,CAAA;IACnD,OAAO,CAAC,EACJ,yBAAyB,CAAC,kBAAkB,CAAC,GAC7C,2BAA2B,CAAC,kBAAk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IACxE,SAAS,CAAC,EAAE,yBAAyB,CAAC,YAAY,CAAC,CAAA;IACnD,eAAe,CAAC,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,CAAA;CAChE,CAAA"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { MapProviderProps } from './MapProvider.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Must be used as a parent component to allow instantiation of map elements.
|
|
4
|
+
* Every child must be a direct component.
|
|
5
|
+
* This is the bridge to the web world / the `MapLibre GL JS` library.
|
|
4
6
|
* @param props -
|
|
5
7
|
* @group Components
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <MapProvider>
|
|
11
|
+
* <Map/>
|
|
12
|
+
* <Marker/>
|
|
13
|
+
* ...
|
|
14
|
+
* </MapProvider>
|
|
15
|
+
* ```
|
|
6
16
|
*/
|
|
7
|
-
declare const MapProvider: ({ children }: MapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const MapProvider: ({ style, webViewStyle, children }: MapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
18
|
export default MapProvider;
|
|
9
19
|
//# sourceMappingURL=MapProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/MapProvider/MapProvider.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D
|
|
1
|
+
{"version":3,"file":"MapProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/MapProvider/MapProvider.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,WAAW,GAAI,mCAAmC,gBAAgB,4CA6GvE,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* MapProvider component props.
|
|
5
|
+
* @interface
|
|
4
6
|
* @group Types
|
|
5
7
|
*/
|
|
6
8
|
export type MapProviderProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Style of the view.
|
|
11
|
+
*/
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
/**
|
|
14
|
+
* Style of the inner WebView.
|
|
15
|
+
*/
|
|
16
|
+
webViewStyle?: StyleProp<ViewStyle>;
|
|
7
17
|
/**
|
|
8
18
|
* The map elements (e.g., Map) as direct children.
|
|
9
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapProvider.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/MapProvider/MapProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"MapProvider.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/MapProvider/MapProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA"}
|
|
@@ -1,7 +1,57 @@
|
|
|
1
1
|
import type { MarkerProps, MarkerRef } from './Marker.types';
|
|
2
2
|
/**
|
|
3
3
|
* MapLibre Marker view.
|
|
4
|
-
* @
|
|
4
|
+
* @props {@link MarkerProps}
|
|
5
|
+
* @ref {@link MarkerRef}
|
|
6
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Marker/ `MapLibre GL JS` docs}
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Marker
|
|
10
|
+
* ref={markerRef}
|
|
11
|
+
* options={{
|
|
12
|
+
* draggable: true,
|
|
13
|
+
* // The element to be used as the marker (a descriptor of an HTMLElement).
|
|
14
|
+
* element: {
|
|
15
|
+
* tagName: 'div',
|
|
16
|
+
* innerHTML: `
|
|
17
|
+
* <style>
|
|
18
|
+
* .no-margin * {
|
|
19
|
+
* margin: 0;
|
|
20
|
+
* }
|
|
21
|
+
* </style>
|
|
22
|
+
* <div
|
|
23
|
+
* class="no-margin"
|
|
24
|
+
* style="
|
|
25
|
+
* display: flex;
|
|
26
|
+
* align-items: center;
|
|
27
|
+
* justify-content: center;
|
|
28
|
+
* aspect-ratio: 1;
|
|
29
|
+
* padding: 4px;
|
|
30
|
+
* border-radius: 50%;
|
|
31
|
+
* background-color: #FFF;
|
|
32
|
+
* box-shadow: 0 0 10px #000A;
|
|
33
|
+
* "
|
|
34
|
+
* >
|
|
35
|
+
* <h1>📍</h1>
|
|
36
|
+
* </div>`,
|
|
37
|
+
* },
|
|
38
|
+
* }}
|
|
39
|
+
* listeners={{
|
|
40
|
+
* mount: {
|
|
41
|
+
* rnListener: () => {
|
|
42
|
+
* // The marker coordinate must be set on mount.
|
|
43
|
+
* markerRef.current?.setLngLat([2.32, 48.86])
|
|
44
|
+
* },
|
|
45
|
+
* },
|
|
46
|
+
* click: {
|
|
47
|
+
* elementListener: async (_: MouseEvent) => {
|
|
48
|
+
* const lngLat = await markerRef.current?.getLngLat()
|
|
49
|
+
* console.log('Marker clicked at', lngLat)
|
|
50
|
+
* },
|
|
51
|
+
* },
|
|
52
|
+
* }}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
5
55
|
* @group Components
|
|
6
56
|
*/
|
|
7
57
|
declare const Marker: import("../../components-factory/createWebObjectAsComponent.types").WebObjectComponent<MarkerRef, MarkerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Marker/Marker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE5D
|
|
1
|
+
{"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Marker/Marker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,QAAA,MAAM,MAAM,gHAA+D,CAAA;AAE3E,eAAe,MAAM,CAAA"}
|
|
@@ -2,30 +2,43 @@ import { type Event, type Marker as MapLibreMarker, type MarkerOptions as MapLib
|
|
|
2
2
|
import type { WebObjectListenerOnHTMLElement, WebObjectListenerOnObject, WebObjectListenerOnRN, WebObjectMethodsInferred, WebObjectOptionsInferred, WebObjectProps, WebObjectRef } from '../../components-factory/createWebObjectAsComponent.types';
|
|
3
3
|
import type { HTMLElementDescriptor } from '../../../communication/messages.types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Marker component ref.
|
|
6
|
+
* @interface
|
|
6
7
|
* @group Types
|
|
7
8
|
*/
|
|
8
9
|
export type MarkerRef = WebObjectRef<MarkerMethods>;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Marker component props.
|
|
12
|
+
* @interface
|
|
11
13
|
* @group Types
|
|
12
14
|
*/
|
|
13
15
|
export type MarkerProps = WebObjectProps<MarkerOptions, MarkerListeners>;
|
|
14
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @interface
|
|
18
|
+
* @group Marker types
|
|
19
|
+
*/
|
|
20
|
+
export type MarkerMethods = WebObjectMethodsInferred<MapLibreMarker, {
|
|
15
21
|
addTo: () => Promise<void>;
|
|
16
22
|
setEventedParent: (parentId: string) => Promise<void>;
|
|
17
23
|
setPopup: (popupId: string) => Promise<void>;
|
|
18
24
|
}>;
|
|
19
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @interface
|
|
27
|
+
* @group Marker types
|
|
28
|
+
*/
|
|
29
|
+
export type MarkerOptions = WebObjectOptionsInferred<MapLibreMarkerOptions, {
|
|
20
30
|
element?: HTMLElementDescriptor;
|
|
21
31
|
}>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @interface
|
|
34
|
+
* @group Marker types
|
|
35
|
+
*/
|
|
36
|
+
export type MarkerListeners = {
|
|
37
|
+
mount?: WebObjectListenerOnRN<void>;
|
|
38
|
+
unmount?: WebObjectListenerOnRN<void>;
|
|
39
|
+
dragstart?: WebObjectListenerOnObject<Event>;
|
|
40
|
+
drag?: WebObjectListenerOnObject<Event>;
|
|
41
|
+
dragend?: WebObjectListenerOnObject<Event>;
|
|
42
|
+
click?: WebObjectListenerOnHTMLElement<MouseEvent>;
|
|
29
43
|
};
|
|
30
|
-
export {};
|
|
31
44
|
//# sourceMappingURL=Marker.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marker.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Marker/Marker.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,IAAI,cAAc,EAC7B,KAAK,aAAa,IAAI,qBAAqB,EAC5C,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAElF
|
|
1
|
+
{"version":3,"file":"Marker.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Marker/Marker.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,IAAI,cAAc,EAC7B,KAAK,aAAa,IAAI,qBAAqB,EAC5C,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAElF;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;AAEnD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,aAAa,EAAE,eAAe,CAAC,CAAA;AAExE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAClD,cAAc,EACd;IACE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7C,CACF,CAAA;AACD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAClD,qBAAqB,EACrB;IACE,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAChC,CACF,CAAA;AACD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAE5B,KAAK,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAErC,SAAS,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IAC5C,IAAI,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IACvC,OAAO,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IAE1C,KAAK,CAAC,EAAE,8BAA8B,CAAC,UAAU,CAAC,CAAA;CACnD,CAAA"}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import type { PopupProps, PopupRef } from './Popup.types';
|
|
2
2
|
/**
|
|
3
3
|
* MapLibre Popup view.
|
|
4
|
-
* @
|
|
4
|
+
* @props {@link PopupProps}
|
|
5
|
+
* @ref {@link PopupRef}
|
|
6
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Popup/ `MapLibre GL JS` docs}
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Popup
|
|
10
|
+
* ref={popupRef}
|
|
11
|
+
* options={{
|
|
12
|
+
* closeButton: true,
|
|
13
|
+
* }}
|
|
14
|
+
* listeners={{
|
|
15
|
+
* mount: {
|
|
16
|
+
* rnListener: () => {
|
|
17
|
+
* // The popup is opened once the coordinates are set.
|
|
18
|
+
* popupRef.current?.setLngLat([2.32, 48.86])
|
|
19
|
+
* popupRef.current?.setText('This is a popup')
|
|
20
|
+
* },
|
|
21
|
+
* },
|
|
22
|
+
* open: {
|
|
23
|
+
* objectListener: () => console.log('Popup opened'),
|
|
24
|
+
* },
|
|
25
|
+
* close: {
|
|
26
|
+
* objectListener: () => console.log('Popup closed'),
|
|
27
|
+
* },
|
|
28
|
+
* }}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
5
31
|
* @group Components
|
|
6
32
|
*/
|
|
7
33
|
declare const Popup: import("../../components-factory/createWebObjectAsComponent.types").WebObjectComponent<PopupRef, PopupProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Popup/Popup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEzD
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Popup/Popup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,QAAA,MAAM,KAAK,8GAA4D,CAAA;AAEvE,eAAe,KAAK,CAAA"}
|
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
import { type Event, type Popup as MapLibrePopup, type PopupOptions as MapLibrePopupOptions } from 'maplibre-gl';
|
|
2
2
|
import type { WebObjectListenerOnObject, WebObjectListenerOnRN, WebObjectMethodsInferred, WebObjectOptionsInferred, WebObjectProps, WebObjectRef } from '../../components-factory/createWebObjectAsComponent.types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Popup component ref.
|
|
5
|
+
* @interface
|
|
5
6
|
* @group Types
|
|
6
7
|
*/
|
|
7
8
|
export type PopupRef = WebObjectRef<PopupMethods>;
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Popup component props.
|
|
11
|
+
* @interface
|
|
10
12
|
* @group Types
|
|
11
13
|
*/
|
|
12
|
-
export type PopupProps = WebObjectProps<
|
|
13
|
-
|
|
14
|
+
export type PopupProps = WebObjectProps<PopupOptions, PopupListeners>;
|
|
15
|
+
/**
|
|
16
|
+
* @interface
|
|
17
|
+
* @group Popup types
|
|
18
|
+
*/
|
|
19
|
+
export type PopupMethods = WebObjectMethodsInferred<MapLibrePopup, {
|
|
14
20
|
addTo: () => Promise<void>;
|
|
15
21
|
setEventedParent: (parentId: string) => Promise<void>;
|
|
16
22
|
}>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @interface
|
|
25
|
+
* @group Popup types
|
|
26
|
+
*/
|
|
27
|
+
export type PopupOptions = WebObjectOptionsInferred<MapLibrePopupOptions>;
|
|
28
|
+
/**
|
|
29
|
+
* @interface
|
|
30
|
+
* @group Popup types
|
|
31
|
+
*/
|
|
32
|
+
export type PopupListeners = {
|
|
33
|
+
mount?: WebObjectListenerOnRN<void>;
|
|
34
|
+
unmount?: WebObjectListenerOnRN<void>;
|
|
35
|
+
open?: WebObjectListenerOnObject<Event>;
|
|
36
|
+
close?: WebObjectListenerOnObject<Event>;
|
|
23
37
|
};
|
|
24
|
-
export {};
|
|
25
38
|
//# sourceMappingURL=Popup.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Popup/Popup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,KAAK,IAAI,aAAa,EAC3B,KAAK,YAAY,IAAI,oBAAoB,EAC1C,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAElE
|
|
1
|
+
{"version":3,"file":"Popup.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Popup/Popup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,KAAK,IAAI,aAAa,EAC3B,KAAK,YAAY,IAAI,oBAAoB,EAC1C,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,cAAc,EACd,YAAY,EACb,MAAM,2DAA2D,CAAA;AAElE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,CAAA;AAErE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,wBAAwB,CACjD,aAAa,EACb;IACE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD,CACF,CAAA;AACD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,wBAAwB,CAAC,oBAAoB,CAAC,CAAA;AACzE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAE3B,KAAK,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAErC,IAAI,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;IACvC,KAAK,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAA;CACzC,CAAA"}
|
package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts
CHANGED
|
@@ -2,29 +2,30 @@ import { type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttribute
|
|
|
2
2
|
/**
|
|
3
3
|
* React Native component that corresponds and perform actions with a web object
|
|
4
4
|
* in the web world.
|
|
5
|
-
* @group
|
|
5
|
+
* @group Web object abstraction types
|
|
6
6
|
*/
|
|
7
7
|
export type WebObjectComponent<Ref extends WebObjectRef<any>, Props extends WebObjectProps<any, any>> = ForwardRefExoticComponent<PropsWithoutRef<Props> & RefAttributes<Ref>>;
|
|
8
8
|
/**
|
|
9
9
|
* React Native ref of a component (corresponds to the web object methods in the
|
|
10
10
|
* web world).
|
|
11
|
-
* @group
|
|
11
|
+
* @group Web object abstraction types
|
|
12
12
|
*/
|
|
13
13
|
export type WebObjectRef<Methods extends WebObjectMethodsInferred<object>> = Omit<Methods, 0>;
|
|
14
14
|
/**
|
|
15
15
|
* React Native props of a component (used to instantiate the web object in the
|
|
16
16
|
* web world).
|
|
17
|
-
* @
|
|
17
|
+
* @interface
|
|
18
|
+
* @group Web object abstraction types
|
|
18
19
|
*/
|
|
19
20
|
export type WebObjectProps<Options extends WebObjectOptionsInferred<any>, Listeners extends WebObjectListeners> = {
|
|
20
21
|
/**
|
|
21
22
|
* The MapLibreGL JS options used to mount the web object.
|
|
22
23
|
*/
|
|
23
|
-
options?:
|
|
24
|
+
options?: Options;
|
|
24
25
|
/**
|
|
25
26
|
* The listeners to be set on the web object events.
|
|
26
27
|
*/
|
|
27
|
-
listeners?:
|
|
28
|
+
listeners?: Listeners;
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* Listeners that can be set by a component on the corresponding web object
|
|
@@ -32,26 +33,27 @@ export type WebObjectProps<Options extends WebObjectOptionsInferred<any>, Listen
|
|
|
32
33
|
* Event can be emitted by the web object itself, its HTML element, or be
|
|
33
34
|
* specific to a map layer (if the object is the map).
|
|
34
35
|
* By default, the mount/unmount events are available (they are custom, added
|
|
35
|
-
* on top of the MapLibre GL JS events).
|
|
36
|
+
* on top of the `MapLibre GL JS` events).
|
|
36
37
|
*
|
|
37
38
|
* Note: sadly, listeners cannot be inferred as Methods and Options, therefore,
|
|
38
39
|
* when adding a new listener, one must ensure that the listeners correspond to
|
|
39
40
|
* the real web object events.
|
|
40
|
-
* @group
|
|
41
|
+
* @group Web object abstraction types
|
|
41
42
|
*/
|
|
42
43
|
export type WebObjectListeners = WebObjectListenersDefault & WebObjectListenersWeb;
|
|
43
44
|
/**
|
|
44
45
|
* Custom events introduced by this library, executed once the web object is
|
|
45
46
|
* (un)mounted to the map.
|
|
46
|
-
* @group
|
|
47
|
+
* @group Web object abstraction types
|
|
47
48
|
*/
|
|
48
49
|
export type WebObjectListenersDefault = {
|
|
49
50
|
mount?: WebObjectListenerOnRN<void>;
|
|
50
51
|
unmount?: WebObjectListenerOnRN<void>;
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
53
|
-
* MapLibre GL JS events as defined in the official documentation of the
|
|
54
|
-
*
|
|
54
|
+
* `MapLibre GL JS` events as defined in the official documentation of the
|
|
55
|
+
* object.
|
|
56
|
+
* @group Web object abstraction types
|
|
55
57
|
*/
|
|
56
58
|
export type WebObjectListenersWeb = {
|
|
57
59
|
[eventName: string]: WebObjectListenerOnRN<void> | WebObjectListenerOnObject<any> | WebObjectListenerOnMapLayer<any> | WebObjectListenerOnHTMLElement<any>;
|
|
@@ -59,14 +61,14 @@ export type WebObjectListenersWeb = {
|
|
|
59
61
|
export type Listener<Event> = (event: Event) => void;
|
|
60
62
|
/**
|
|
61
63
|
* A listener on an event introduced by the React Native usage.
|
|
62
|
-
* @group
|
|
64
|
+
* @group Web object abstraction types
|
|
63
65
|
*/
|
|
64
66
|
export type WebObjectListenerOnRN<Event> = {
|
|
65
67
|
rnListener: Listener<Event>;
|
|
66
68
|
};
|
|
67
69
|
/**
|
|
68
70
|
* A listener to be set on an event emitted by the web object.
|
|
69
|
-
* @group
|
|
71
|
+
* @group Web object abstraction types
|
|
70
72
|
*/
|
|
71
73
|
export type WebObjectListenerOnObject<Event> = {
|
|
72
74
|
objectListener: Listener<Event>;
|
|
@@ -74,7 +76,7 @@ export type WebObjectListenerOnObject<Event> = {
|
|
|
74
76
|
/**
|
|
75
77
|
* A listener to be set on an event emitted by the web object, but specific to
|
|
76
78
|
* a map layer.
|
|
77
|
-
* @group
|
|
79
|
+
* @group Web object abstraction types
|
|
78
80
|
*/
|
|
79
81
|
export type WebObjectListenerOnMapLayer<Event> = {
|
|
80
82
|
layerListener: Listener<Event>;
|
|
@@ -83,7 +85,7 @@ export type WebObjectListenerOnMapLayer<Event> = {
|
|
|
83
85
|
/**
|
|
84
86
|
* A listener to be set on an event emitted by the HTMLElement associated with
|
|
85
87
|
* the web object.
|
|
86
|
-
* @group
|
|
88
|
+
* @group Web object abstraction types
|
|
87
89
|
*/
|
|
88
90
|
export type WebObjectListenerOnHTMLElement<Event> = {
|
|
89
91
|
elementListener: Listener<Event>;
|
|
@@ -94,7 +96,7 @@ export type WebObjectListenerOnHTMLElement<Event> = {
|
|
|
94
96
|
* them with the given replacements (e.g., HTMLElement that cannot be
|
|
95
97
|
* instantiated in RN is replaced by HTMLElementDescriptor). Also, remove the
|
|
96
98
|
* ones that should not be specified and used.
|
|
97
|
-
* @group
|
|
99
|
+
* @group Web object abstraction types
|
|
98
100
|
*/
|
|
99
101
|
export type WebObjectOptionsInferred<WebObjectOptions, ReplacedOptions extends Partial<Record<keyof WebObjectOptions, any>> = {}, RemovedOptions extends Partial<keyof WebObjectOptions> = never> = Omit<Omit<WebObjectOptions, keyof ReplacedOptions> & ReplacedOptions, RemovedOptions>;
|
|
100
102
|
/**
|
|
@@ -109,7 +111,7 @@ export type WebObjectOptionsInferred<WebObjectOptions, ReplacedOptions extends P
|
|
|
109
111
|
* original return type.
|
|
110
112
|
* To be used with the associated proxy to make the call to the methods
|
|
111
113
|
* effective.
|
|
112
|
-
* @group
|
|
114
|
+
* @group Web object abstraction types
|
|
113
115
|
*/
|
|
114
116
|
export type WebObjectMethodsInferred<WebObject, ReplacedMethods extends {
|
|
115
117
|
[K in keyof OnlyMethods<WebObject>]?: (...args: any[]) => any;
|
package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWebObjectAsComponent.types.d.ts","sourceRoot":"","sources":["../../../../../src/react-native/components-factory/createWebObjectAsComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAA;AAEd;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAC5B,GAAG,SAAS,YAAY,CAAC,GAAG,CAAC,EAC7B,KAAK,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,IACpC,yBAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE1E;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,wBAAwB,CAAC,MAAM,CAAC,IACvE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AAElB
|
|
1
|
+
{"version":3,"file":"createWebObjectAsComponent.types.d.ts","sourceRoot":"","sources":["../../../../../src/react-native/components-factory/createWebObjectAsComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAA;AAEd;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAC5B,GAAG,SAAS,YAAY,CAAC,GAAG,CAAC,EAC7B,KAAK,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,IACpC,yBAAyB,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE1E;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,wBAAwB,CAAC,MAAM,CAAC,IACvE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AAElB;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CACxB,OAAO,SAAS,wBAAwB,CAAC,GAAG,CAAC,EAC7C,SAAS,SAAS,kBAAkB,IAClC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,GACxD,qBAAqB,CAAA;AAEvB;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAA;I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AM,MAAM,wBAAwB,CAClC,SAAS,EACT,eAAe,SAAS;KACrB,CAAC,IAAI,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;CAC9D,GAAG,EAAE,IACJ,KAAK,CACP,wBAAwB,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC,EACxE;IAAE,KAAK,EAAE,MAAM,MAAM,CAAA;CAAE,CACxB,CAAA;AAED,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;CACzE,CAAA;AAED,KAAK,wBAAwB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GACtD,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAC1B,KAAK;CACV,CAAA;AAED,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI;KAChB,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC,GACJ,CAAC,SAAS,MAAM,CAAC,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK;CACZ,CAAA"}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* Internal types exposed for the documentation, but not by the public API.
|
|
3
3
|
* @module Internal types
|
|
4
4
|
* @packageDocumentation
|
|
5
|
+
* @sortStrategy sort-order
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
export type {
|
|
7
|
+
export type { MapMethods, MapOptions, MapListeners, } from './react-native/components/Map/Map.types';
|
|
8
|
+
export type { MarkerMethods, MarkerOptions, MarkerListeners, } from './react-native/components/Marker/Marker.types';
|
|
9
|
+
export type { PopupMethods, PopupOptions, PopupListeners, } from './react-native/components/Popup/Popup.types';
|
|
10
|
+
export type { WebObjectComponent, WebObjectRef, WebObjectProps, WebObjectListeners, WebObjectListenersDefault, WebObjectListenersWeb, WebObjectListenerOnRN, WebObjectListenerOnObject, WebObjectListenerOnMapLayer, WebObjectListenerOnHTMLElement, WebObjectOptionsInferred, WebObjectMethodsInferred, } from './react-native/components-factory/createWebObjectAsComponent.types';
|
|
8
11
|
//# sourceMappingURL=typedoc.d.ts.map
|