react-native-maplibre-gl-js 1.0.3 → 1.2.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.
Files changed (105) hide show
  1. package/README.md +89 -29
  2. package/lib/module/index.js +9 -6
  3. package/lib/module/index.js.map +1 -1
  4. package/lib/module/react-native/components/Map/Map.js +30 -1
  5. package/lib/module/react-native/components/Map/Map.js.map +1 -1
  6. package/lib/module/react-native/components/Map/Map.test.js +19 -0
  7. package/lib/module/react-native/components/Map/Map.test.js.map +1 -0
  8. package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js +149 -2
  9. package/lib/module/react-native/components/MapProvider/MapProvider.hooks.js.map +1 -1
  10. package/lib/module/react-native/components/MapProvider/MapProvider.js +33 -87
  11. package/lib/module/react-native/components/MapProvider/MapProvider.js.map +1 -1
  12. package/lib/module/react-native/components/MapProvider/MapProvider.test.js +144 -0
  13. package/lib/module/react-native/components/MapProvider/MapProvider.test.js.map +1 -0
  14. package/lib/module/react-native/components/MapProvider/MapProvider.utils.js +58 -0
  15. package/lib/module/react-native/components/MapProvider/MapProvider.utils.js.map +1 -0
  16. package/lib/module/react-native/components/Marker/Marker.js +47 -1
  17. package/lib/module/react-native/components/Marker/Marker.js.map +1 -1
  18. package/lib/module/react-native/components/Marker/Marker.test.js +19 -0
  19. package/lib/module/react-native/components/Marker/Marker.test.js.map +1 -0
  20. package/lib/module/react-native/components/Popup/Popup.js +29 -1
  21. package/lib/module/react-native/components/Popup/Popup.js.map +1 -1
  22. package/lib/module/react-native/components/Popup/Popup.test.js +19 -0
  23. package/lib/module/react-native/components/Popup/Popup.test.js.map +1 -0
  24. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js +3 -5
  25. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js.map +1 -1
  26. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.js +28 -0
  27. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.js.map +1 -0
  28. package/lib/module/react-native/components-factory/hooks/useWebObjectMethodsProxy.mock.js +5 -0
  29. package/lib/module/react-native/components-factory/hooks/useWebObjectMethodsProxy.mock.js.map +1 -0
  30. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.js +5 -0
  31. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.js.map +1 -0
  32. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.js +14 -0
  33. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.js.map +1 -0
  34. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.js +5 -0
  35. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.js.map +1 -0
  36. package/lib/module/react-native/hooks/atoms/useMapAtoms.js +1 -1
  37. package/lib/module/react-native/hooks/atoms/useMapAtoms.mock.js +12 -0
  38. package/lib/module/react-native/hooks/atoms/useMapAtoms.mock.js.map +1 -0
  39. package/lib/module/react-native/logger/rn-logger.mock.js +10 -0
  40. package/lib/module/react-native/logger/rn-logger.mock.js.map +1 -0
  41. package/lib/module/typedoc.js +0 -2
  42. package/lib/module/web/generated/webview_static_html.js +3329 -3268
  43. package/lib/module/web/generated/webview_static_html.js.map +1 -1
  44. package/lib/module/web/maplibre-gl-js/MapController.js +1 -6
  45. package/lib/module/web/maplibre-gl-js/MapController.js.map +1 -1
  46. package/lib/typescript/jest.setup.d.ts +2 -0
  47. package/lib/typescript/jest.setup.d.ts.map +1 -0
  48. package/lib/typescript/src/index.d.ts +10 -14
  49. package/lib/typescript/src/index.d.ts.map +1 -1
  50. package/lib/typescript/src/react-native/components/Map/Map.d.ts +30 -1
  51. package/lib/typescript/src/react-native/components/Map/Map.d.ts.map +1 -1
  52. package/lib/typescript/src/react-native/components/Map/Map.test.d.ts +2 -0
  53. package/lib/typescript/src/react-native/components/Map/Map.test.d.ts.map +1 -0
  54. package/lib/typescript/src/react-native/components/Map/Map.types.d.ts +70 -58
  55. package/lib/typescript/src/react-native/components/Map/Map.types.d.ts.map +1 -1
  56. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts +12 -2
  57. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.d.ts.map +1 -1
  58. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.hooks.d.ts +27 -1
  59. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.hooks.d.ts.map +1 -1
  60. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.d.ts +2 -0
  61. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.d.ts.map +1 -0
  62. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts +26 -1
  63. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.types.d.ts.map +1 -1
  64. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.utils.d.ts +14 -0
  65. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.utils.d.ts.map +1 -0
  66. package/lib/typescript/src/react-native/components/Marker/Marker.d.ts +47 -1
  67. package/lib/typescript/src/react-native/components/Marker/Marker.d.ts.map +1 -1
  68. package/lib/typescript/src/react-native/components/Marker/Marker.test.d.ts +2 -0
  69. package/lib/typescript/src/react-native/components/Marker/Marker.test.d.ts.map +1 -0
  70. package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts +25 -12
  71. package/lib/typescript/src/react-native/components/Marker/Marker.types.d.ts.map +1 -1
  72. package/lib/typescript/src/react-native/components/Popup/Popup.d.ts +29 -1
  73. package/lib/typescript/src/react-native/components/Popup/Popup.d.ts.map +1 -1
  74. package/lib/typescript/src/react-native/components/Popup/Popup.test.d.ts +2 -0
  75. package/lib/typescript/src/react-native/components/Popup/Popup.test.d.ts.map +1 -0
  76. package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts +24 -11
  77. package/lib/typescript/src/react-native/components/Popup/Popup.types.d.ts.map +1 -1
  78. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.d.ts.map +1 -1
  79. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.d.ts +2 -0
  80. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.d.ts.map +1 -0
  81. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts +18 -16
  82. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.types.d.ts.map +1 -1
  83. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMethodsProxy.mock.d.ts +3 -0
  84. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMethodsProxy.mock.d.ts.map +1 -0
  85. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.d.ts +3 -0
  86. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.d.ts.map +1 -0
  87. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.d.ts +4 -0
  88. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.d.ts.map +1 -0
  89. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.d.ts +3 -0
  90. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.d.ts.map +1 -0
  91. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.mock.d.ts +10 -0
  92. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.mock.d.ts.map +1 -0
  93. package/lib/typescript/src/react-native/logger/rn-logger.mock.d.ts +7 -0
  94. package/lib/typescript/src/react-native/logger/rn-logger.mock.d.ts.map +1 -0
  95. package/lib/typescript/src/typedoc.d.ts +5 -2
  96. package/lib/typescript/src/typedoc.d.ts.map +1 -1
  97. package/lib/typescript/src/web/generated/webview_static_html.d.ts +1 -1
  98. package/lib/typescript/src/web/generated/webview_static_html.d.ts.map +1 -1
  99. package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts +1 -1
  100. package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts.map +1 -1
  101. package/package.json +45 -59
  102. package/lib/module/react-native/components-factory/hooks/useWebObjectOptionsUpdater.js +0 -20
  103. package/lib/module/react-native/components-factory/hooks/useWebObjectOptionsUpdater.js.map +0 -1
  104. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectOptionsUpdater.d.ts +0 -5
  105. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectOptionsUpdater.d.ts.map +0 -1
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ import { View, Text } from 'react-native';
4
+ import { render, renderHook, screen } from '@testing-library/react-native';
5
+ import MapProvider from "./MapProvider.js";
6
+ import { useWebMessageHandler } from "./MapProvider.hooks.js";
7
+ import RNLogger from "../../logger/rn-logger.js";
8
+ import { getWebObjectListenersMock, resolveWebObjectPendingMethodResponseMock, setIsWebWorldReadyMock } from "../../hooks/atoms/useMapAtoms.mock.js";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ const createEvent = data => ({
11
+ nativeEvent: {
12
+ data: typeof data === 'string' ? data : JSON.stringify(data)
13
+ }
14
+ });
15
+ describe('MapProvider', () => {
16
+ beforeEach(() => {
17
+ jest.clearAllMocks();
18
+ });
19
+ describe('Given the component is rendered with children', () => {
20
+ beforeEach(() => {
21
+ render(/*#__PURE__*/_jsx(MapProvider, {
22
+ children: /*#__PURE__*/_jsx(View, {
23
+ children: /*#__PURE__*/_jsx(Text, {
24
+ testID: "child",
25
+ children: "Hello"
26
+ })
27
+ })
28
+ }));
29
+ });
30
+ describe('When nothing', () => {
31
+ test('Then the children are rendered', () => {
32
+ const child = screen.getByTestId('child');
33
+ expect(child).toBeTruthy();
34
+ });
35
+ test('Then the internal WebView is rendered', () => {
36
+ const webView = screen.getByTestId('map-provider-webview');
37
+ expect(webView).toBeTruthy();
38
+ });
39
+ });
40
+ });
41
+ });
42
+ describe('useWebMessageHandler', () => {
43
+ beforeEach(() => {
44
+ jest.clearAllMocks();
45
+ });
46
+ describe('Given the hook is used to get the handler', () => {
47
+ let handler;
48
+ beforeEach(() => {
49
+ const {
50
+ result
51
+ } = renderHook(() => useWebMessageHandler());
52
+ handler = result.current.handler;
53
+ });
54
+ describe('When nothing', () => {
55
+ test('Then the handler is a function', () => {
56
+ expect(typeof handler).toBe('function');
57
+ });
58
+ });
59
+ describe('When handling a message of unknown type', () => {
60
+ test('Then it does not throw', () => {
61
+ expect(() => handler(createEvent({
62
+ type: 'unknown-type'
63
+ }))).not.toThrow();
64
+ });
65
+ });
66
+ describe('When handling something that is not a message', () => {
67
+ test('Then it does not throw', () => {
68
+ expect(() => handler(createEvent('not a message'))).not.toThrow();
69
+ });
70
+ });
71
+ describe('When handling a message of type "console"', () => {
72
+ beforeEach(() => {
73
+ handler(createEvent({
74
+ type: 'console',
75
+ payload: {
76
+ level: 'info',
77
+ args: ['hello', 'world']
78
+ }
79
+ }));
80
+ });
81
+ test('Then logs to the console', () => {
82
+ expect(RNLogger.info).toHaveBeenCalledWith('Web', 'hello', 'world');
83
+ });
84
+ });
85
+ describe('When handling a message of type "ready"', () => {
86
+ beforeEach(() => {
87
+ handler(createEvent({
88
+ type: 'ready'
89
+ }));
90
+ });
91
+ test('Then sets the web world is ready', () => {
92
+ expect(setIsWebWorldReadyMock).toHaveBeenCalledWith(true);
93
+ });
94
+ });
95
+ describe('When handling a message of type "webObjectListenerEvent"', () => {
96
+ let rnListener;
97
+ let eventPayload;
98
+ beforeEach(() => {
99
+ rnListener = jest.fn();
100
+ eventPayload = {
101
+ x: Math.random()
102
+ };
103
+ getWebObjectListenersMock.mockReturnValue({
104
+ click: {
105
+ rnListener
106
+ }
107
+ });
108
+ handler(createEvent({
109
+ type: 'webObjectListenerEvent',
110
+ payload: {
111
+ objectId: 'object-1',
112
+ eventName: 'click',
113
+ event: eventPayload
114
+ }
115
+ }));
116
+ });
117
+ test('Then dispatches the event to the corresponding listener', () => {
118
+ expect(rnListener).toHaveBeenCalledWith(eventPayload);
119
+ });
120
+ });
121
+ describe('When handling a message of type "webObjectMethodResponse"', () => {
122
+ beforeEach(() => {
123
+ handler(createEvent({
124
+ type: 'webObjectMethodResponse',
125
+ payload: {
126
+ requestId: 'req-123',
127
+ result: {
128
+ ok: true
129
+ }
130
+ }
131
+ }));
132
+ });
133
+ test('Then resolves the web object method response', () => {
134
+ expect(resolveWebObjectPendingMethodResponseMock).toHaveBeenCalledWith({
135
+ requestId: 'req-123',
136
+ result: {
137
+ ok: true
138
+ }
139
+ });
140
+ });
141
+ });
142
+ });
143
+ });
144
+ //# sourceMappingURL=MapProvider.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","Text","render","renderHook","screen","MapProvider","useWebMessageHandler","RNLogger","getWebObjectListenersMock","resolveWebObjectPendingMethodResponseMock","setIsWebWorldReadyMock","jsx","_jsx","createEvent","data","nativeEvent","JSON","stringify","describe","beforeEach","jest","clearAllMocks","children","testID","test","child","getByTestId","expect","toBeTruthy","webView","handler","result","current","toBe","type","not","toThrow","payload","level","args","info","toHaveBeenCalledWith","rnListener","eventPayload","fn","x","Math","random","mockReturnValue","click","objectId","eventName","event","requestId","ok"],"sourceRoot":"../../../../../src","sources":["react-native/components/MapProvider/MapProvider.test.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,MAAM,EAAEC,UAAU,EAAEC,MAAM,QAAQ,+BAA+B;AAC1E,OAAOC,WAAW,MAAM,kBAAe;AACvC,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,OAAOC,QAAQ,MAAM,2BAAwB;AAC7C,SACEC,yBAAyB,EACzBC,yCAAyC,EACzCC,sBAAsB,QACjB,uCAAoC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAMC,WAAW,GAAIC,IAAa,KAC/B;EACCC,WAAW,EAAE;IACXD,IAAI,EAAE,OAAOA,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAGE,IAAI,CAACC,SAAS,CAACH,IAAI;EAC7D;AACF,CAAC,CAAQ;AAEXI,QAAQ,C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B,EAAE,EAAE;UAAK;QACrB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * @param css - The CSS to be normalized.
5
+ * @returns A normalized array of non-empty CSS strings or `undefined` if the
6
+ * given CSS is `undefined` or empty.
7
+ */
8
+ export const normalizeCss = css => {
9
+ const normalizedCss = (Array.isArray(css) ? css : css ? [css] : []).map(s => s.trim()).filter(Boolean);
10
+ return normalizedCss.length ? normalizedCss : undefined;
11
+ };
12
+
13
+ /**
14
+ * @param normalizedCss - The CSS to be injected, typically produced by
15
+ * {@link normalizeCss}.
16
+ * @returns A JavaScript snippet that injects CSS into the document and
17
+ * evaluates to `true` once executed.
18
+ */
19
+ export const buildCssInjectionScript = normalizedCss => {
20
+ const INJECTED_STYLE_ID = '__map_provider_injected_css__';
21
+ const css = normalizedCss.join('\n');
22
+ const cssJSON = JSON.stringify(css);
23
+ const idJSON = JSON.stringify(INJECTED_STYLE_ID);
24
+ return `
25
+ (function() {
26
+ try {
27
+ var doc = document;
28
+ var id = ${idJSON};
29
+ var css = ${cssJSON};
30
+
31
+ var styleEl = doc.getElementById(id);
32
+
33
+ if (!styleEl) {
34
+ styleEl = doc.createElement('style');
35
+ styleEl.type = 'text/css';
36
+ styleEl.id = id;
37
+ // If the document head isn't available yet, we append the style to
38
+ // documentElement as a fallback.
39
+ // Note: this script won't automatically move the node later when head
40
+ // becomes available; it will only be moved on a subsequent injection.
41
+ (doc.head || doc.documentElement).appendChild(styleEl);
42
+ }
43
+
44
+ if (styleEl.textContent !== css) {
45
+ styleEl.textContent = css;
46
+ }
47
+
48
+ // If head was not available at the time, bring it up now.
49
+ if (doc.head && styleEl.parentNode !== doc.head) {
50
+ doc.head.appendChild(styleEl);
51
+ }
52
+ } catch (_) {}
53
+
54
+ return true;
55
+ })();
56
+ `;
57
+ };
58
+ //# sourceMappingURL=MapProvider.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["normalizeCss","css","normalizedCss","Array","isArray","map","s","trim","filter","Boolean","length","undefined","buildCssInjectionScript","INJECTED_STYLE_ID","join","cssJSON","JSON","stringify","idJSON"],"sourceRoot":"../../../../../src","sources":["react-native/components/MapProvider/MapProvider.utils.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,GAAIC,GAAuB,IAA2B;EAC7E,MAAMC,aAAa,GAAG,CAACC,KAAK,CAACC,OAAO,CAACH,GAAG,CAAC,GAAGA,GAAG,GAAGA,GAAG,GAAG,CAACA,GAAG,CAAC,GAAG,EAAE,EAC/DI,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CACpBC,MAAM,CAACC,OAAO,CAAC;EAElB,OAAOP,aAAa,CAACQ,MAAM,GAAGR,aAAa,GAAGS,SAAS;AACzD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAIV,aAAuB,IAAa;EAC1E,MAAMW,iBAAiB,GAAG,+BAA+B;EAEzD,MAAMZ,GAAG,GAAGC,aAAa,CAACY,IAAI,CAAC,IAAI,CAAC;EACpC,MAAMC,OAAO,GAAGC,IAAI,CAACC,SAAS,CAAChB,GAAG,CAAC;EACnC,MAAMiB,MAAM,GAAGF,IAAI,CAACC,SAAS,CAACJ,iBAAiB,CAAC;EAEhD,OAAO;AACT;AACA;AACA;AACA,mBAAmBK,MAAM;AACzB,oBAAoBH,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC","ignoreList":[]}
@@ -3,7 +3,53 @@
3
3
  import createWebObjectAsComponent from "../../components-factory/createWebObjectAsComponent.js";
4
4
  /**
5
5
  * MapLibre Marker view.
6
- * @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Marker/ MapLibre GL JS docs}
6
+ * @props {@link MarkerProps}
7
+ * @ref {@link MarkerRef}
8
+ * @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Marker/ `MapLibre GL JS` docs}
9
+ * @example
10
+ * ```tsx
11
+ * <Marker
12
+ * ref={markerRef}
13
+ * options={{
14
+ * draggable: true,
15
+ * // The element to be used as the marker (a descriptor of an HTMLElement).
16
+ * element: {
17
+ * innerHTML: `
18
+ * <style>
19
+ * .pin {
20
+ * display: flex;
21
+ * align-items: center;
22
+ * justify-content: center;
23
+ * width: 32px;
24
+ * height: 32px;
25
+ * margin: 0;
26
+ * padding: 4px;
27
+ * border-radius: 50%;
28
+ * background-color: #FFF;
29
+ * box-shadow: 0 0 10px #000A;
30
+ * }
31
+ * </style>
32
+ * <div class="pin">
33
+ * <h1>📍</h1>
34
+ * </div>`,
35
+ * },
36
+ * }}
37
+ * listeners={{
38
+ * mount: {
39
+ * rnListener: () => {
40
+ * // The marker coordinate must be set on mount.
41
+ * markerRef.current?.setLngLat([2.32, 48.86])
42
+ * },
43
+ * },
44
+ * click: {
45
+ * elementListener: async (_: MouseEvent) => {
46
+ * const lngLat = await markerRef.current?.getLngLat()
47
+ * console.log('Marker clicked at', lngLat)
48
+ * },
49
+ * },
50
+ * }}
51
+ * />
52
+ * ```
7
53
  * @group Components
8
54
  */
9
55
  const Marker = createWebObjectAsComponent('marker');
@@ -1 +1 @@
1
- {"version":3,"names":["createWebObjectAsComponent","Marker"],"sourceRoot":"../../../../../src","sources":["react-native/components/Marker/Marker.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,wDAAqD;AAG5F;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAM,GAAGD,0BAA0B,CAAyB,QAAQ,CAAC;AAE3E,eAAeC,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["createWebObjectAsComponent","Marker"],"sourceRoot":"../../../../../src","sources":["react-native/components/Marker/Marker.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,wDAAqD;AAG5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAM,GAAGD,0BAA0B,CAAyB,QAAQ,CAAC;AAE3E,eAAeC,MAAM","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ import { render } from '@testing-library/react-native';
4
+ import Marker from "./Marker.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ describe('Marker', () => {
7
+ beforeEach(() => {
8
+ jest.clearAllMocks();
9
+ });
10
+ describe('Given the component is rendered', () => {
11
+ beforeEach(() => {
12
+ render(/*#__PURE__*/_jsx(Marker, {}));
13
+ });
14
+ describe('When nothing', () => {
15
+ test('Then it does not crash', () => {});
16
+ });
17
+ });
18
+ });
19
+ //# sourceMappingURL=Marker.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["render","Marker","jsx","_jsx","describe","beforeEach","jest","clearAllMocks","test"],"sourceRoot":"../../../../../src","sources":["react-native/components/Marker/Marker.test.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,MAAM,MAAM,aAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE7BC,QAAQ,CAAC,QAAQ,EAAE,MAAM;EACvBC,UAAU,CAAC,MAAM;IACfC,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFH,QAAQ,CAAC,iCAAiC,EAAE,MAAM;IAChDC,UAAU,CAAC,MAAM;MACfL,MAAM,cAACG,IAAA,CAACF,MAAM,IAAE,CAAC,CAAC;IACpB,CAAC,CAAC;IAEFG,QAAQ,CAAC,cAAc,EAAE,MAAM;MAC7BI,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -3,7 +3,35 @@
3
3
  import createWebObjectAsComponent from "../../components-factory/createWebObjectAsComponent.js";
4
4
  /**
5
5
  * MapLibre Popup view.
6
- * @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Popup/ MapLibre GL JS docs}
6
+ * @props {@link PopupProps}
7
+ * @ref {@link PopupRef}
8
+ * @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/Popup/ `MapLibre GL JS` docs}
9
+ * @example
10
+ * ```tsx
11
+ * <Popup
12
+ * ref={popupRef}
13
+ * options={{
14
+ * closeButton: true,
15
+ * }}
16
+ * listeners={{
17
+ * mount: {
18
+ * rnListener: () => {
19
+ * popupRef.current?.setLngLat([2.32, 48.86])
20
+ * popupRef.current?.setText('This is a popup')
21
+ * // The popup is opened once added to the map (as in the official
22
+ * // MapLibre GL JS docs).
23
+ * popupRef.current?.addTo()
24
+ * },
25
+ * },
26
+ * open: {
27
+ * objectListener: () => console.log('Popup opened'),
28
+ * },
29
+ * close: {
30
+ * objectListener: () => console.log('Popup closed'),
31
+ * },
32
+ * }}
33
+ * />
34
+ * ```
7
35
  * @group Components
8
36
  */
9
37
  const Popup = createWebObjectAsComponent('popup');
@@ -1 +1 @@
1
- {"version":3,"names":["createWebObjectAsComponent","Popup"],"sourceRoot":"../../../../../src","sources":["react-native/components/Popup/Popup.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,wDAAqD;AAG5F;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAGD,0BAA0B,CAAuB,OAAO,CAAC;AAEvE,eAAeC,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["createWebObjectAsComponent","Popup"],"sourceRoot":"../../../../../src","sources":["react-native/components/Popup/Popup.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,wDAAqD;AAG5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAGD,0BAA0B,CAAuB,OAAO,CAAC;AAEvE,eAAeC,KAAK","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ import { render } from '@testing-library/react-native';
4
+ import Popup from "./Popup.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ describe('Popup', () => {
7
+ beforeEach(() => {
8
+ jest.clearAllMocks();
9
+ });
10
+ describe('Given the component is rendered', () => {
11
+ beforeEach(() => {
12
+ render(/*#__PURE__*/_jsx(Popup, {}));
13
+ });
14
+ describe('When nothing', () => {
15
+ test('Then it does not crash', () => {});
16
+ });
17
+ });
18
+ });
19
+ //# sourceMappingURL=Popup.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["render","Popup","jsx","_jsx","describe","beforeEach","jest","clearAllMocks","test"],"sourceRoot":"../../../../../src","sources":["react-native/components/Popup/Popup.test.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,KAAK,MAAM,YAAS;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE3BC,QAAQ,CAAC,OAAO,EAAE,MAAM;EACtBC,UAAU,CAAC,MAAM;IACfC,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFH,QAAQ,CAAC,iCAAiC,EAAE,MAAM;IAChDC,UAAU,CAAC,MAAM;MACfL,MAAM,cAACG,IAAA,CAACF,KAAK,IAAE,CAAC,CAAC;IACnB,CAAC,CAAC;IAEFG,QAAQ,CAAC,cAAc,EAAE,MAAM;MAC7BI,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  import { forwardRef, useId } from 'react';
4
4
  import useWebObjectMountOnLaunch from "./hooks/useWebObjectMountOnLaunch.js";
5
5
  import useWebObjectMethodsProxy from "./hooks/useWebObjectMethodsProxy.js";
6
+ import useWebObjectPropertiesUpdater from "./hooks/useWebObjectPropertiesUpdater.js";
6
7
  const createWebObjectAsComponent = objectType => {
7
8
  return /*#__PURE__*/forwardRef((props, ref) => {
8
9
  // UID of the web object.
@@ -11,11 +12,8 @@ const createWebObjectAsComponent = objectType => {
11
12
  useWebObjectMountOnLaunch(props, id, objectType);
12
13
  // Forward a method call on the RN object to the web object.
13
14
  useWebObjectMethodsProxy(ref, id);
14
- // TODO needed?
15
- //useWebObjectOptionsUpdater<Options, Listener>(
16
- // props, id, dispatchMessage
17
- //)
18
-
15
+ // Update the web object properties when they changed in the component body.
16
+ useWebObjectPropertiesUpdater(props, id);
19
17
  return null;
20
18
  });
21
19
  };
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useId","useWebObjectMountOnLaunch","useWebObjectMethodsProxy","createWebObjectAsComponent","objectType","props","ref","id"],"sourceRoot":"../../../../src","sources":["react-native/components-factory/createWebObjectAsComponent.ts"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,KAAK,QAAQ,OAAO;AAOzC,OAAOC,yBAAyB,MAAM,sCAAmC;AACzE,OAAOC,wBAAwB,MAAM,qCAAkC;AAEvE,MAAMC,0BAA0B,GAI9BC,UAAyB,IACU;EACnC,oBAAOL,UAAU,CAAa,CAACM,KAAK,EAAEC,GAAG,KAAK;IAC5C;IACA,MAAMC,EAAE,GAAGP,KAAK,CAAC,CAAC;IAClB;IACAC,yBAAyB,CAAQI,KAAK,EAAEE,EAAE,EAAEH,UAAU,CAAC;IACvD;IACAF,wBAAwB,CAAMI,GAAG,EAAEC,EAAE,CAAC;IACtC;IACA;IACA;IACA;;IAEA,OAAO,IAAI;EACb,CAAC,CAAC;AACJ,CAAC;AAED,eAAeJ,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","useId","useWebObjectMountOnLaunch","useWebObjectMethodsProxy","useWebObjectPropertiesUpdater","createWebObjectAsComponent","objectType","props","ref","id"],"sourceRoot":"../../../../src","sources":["react-native/components-factory/createWebObjectAsComponent.ts"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,KAAK,QAAQ,OAAO;AAOzC,OAAOC,yBAAyB,MAAM,sCAAmC;AACzE,OAAOC,wBAAwB,MAAM,qCAAkC;AACvE,OAAOC,6BAA6B,MAAM,0CAAuC;AAEjF,MAAMC,0BAA0B,GAI9BC,UAAyB,IACU;EACnC,oBAAON,UAAU,CAAa,CAACO,KAAK,EAAEC,GAAG,KAAK;IAC5C;IACA,MAAMC,EAAE,GAAGR,KAAK,CAAC,CAAC;IAClB;IACAC,yBAAyB,CAAQK,KAAK,EAAEE,EAAE,EAAEH,UAAU,CAAC;IACvD;IACAH,wBAAwB,CAAMK,GAAG,EAAEC,EAAE,CAAC;IACtC;IACAL,6BAA6B,CAAQG,KAAK,EAAWE,EAAE,CAAC;IAExD,OAAO,IAAI;EACb,CAAC,CAAC;AACJ,CAAC;AAED,eAAeJ,0BAA0B","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ import { render } from '@testing-library/react-native';
4
+ import createWebObjectAsComponent from "./createWebObjectAsComponent.js";
5
+ import useWebObjectMountOnLaunch from "./hooks/useWebObjectMountOnLaunch.js";
6
+ import useWebObjectMethodsProxy from "./hooks/useWebObjectMethodsProxy.js";
7
+ import useWebObjectPropertiesUpdater from "./hooks/useWebObjectPropertiesUpdater.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ describe('createWebObjectAsComponent', () => {
10
+ describe('Given a web object', () => {
11
+ beforeEach(() => {
12
+ const Component = createWebObjectAsComponent('map');
13
+ render(/*#__PURE__*/_jsx(Component, {}));
14
+ });
15
+ describe('When nothing', () => {
16
+ test('Then it has been mount on launch', () => {
17
+ expect(useWebObjectMountOnLaunch).toHaveBeenCalled();
18
+ });
19
+ test('Then it has set the methods proxy', () => {
20
+ expect(useWebObjectMethodsProxy).toHaveBeenCalled();
21
+ });
22
+ test('Then it has set the properties updater', () => {
23
+ expect(useWebObjectPropertiesUpdater).toHaveBeenCalled();
24
+ });
25
+ });
26
+ });
27
+ });
28
+ //# sourceMappingURL=createWebObjectAsComponent.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["render","createWebObjectAsComponent","useWebObjectMountOnLaunch","useWebObjectMethodsProxy","useWebObjectPropertiesUpdater","jsx","_jsx","describe","beforeEach","Component","test","expect","toHaveBeenCalled"],"sourceRoot":"../../../../src","sources":["react-native/components-factory/createWebObjectAsComponent.test.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,0BAA0B,MAAM,iCAA8B;AACrE,OAAOC,yBAAyB,MAAM,sCAAmC;AACzE,OAAOC,wBAAwB,MAAM,qCAAkC;AACvE,OAAOC,6BAA6B,MAAM,0CAAuC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEjFC,QAAQ,CAAC,4BAA4B,EAAE,MAAM;EAC3CA,QAAQ,CAAC,oBAAoB,EAAE,MAAM;IACnCC,UAAU,CAAC,MAAM;MACf,MAAMC,SAAS,GAAGR,0BAA0B,CAAC,KAAK,CAAC;MACnDD,MAAM,cAACM,IAAA,CAACG,SAAS,IAAE,CAAC,CAAC;IACvB,CAAC,CAAC;IAEFF,QAAQ,CAAC,cAAc,EAAE,MAAM;MAC7BG,IAAI,CAAC,kCAAkC,EAAE,MAAM;QAC7CC,MAAM,CAACT,yBAAyB,CAAC,CAACU,gBAAgB,CAAC,CAAC;MACtD,CAAC,CAAC;MAEFF,IAAI,CAAC,mCAAmC,EAAE,MAAM;QAC9CC,MAAM,CAACR,wBAAwB,CAAC,CAACS,gBAAgB,CAAC,CAAC;MACrD,CAAC,CAAC;MAEFF,IAAI,CAAC,wCAAwC,EAAE,MAAM;QACnDC,MAAM,CAACP,6BAA6B,CAAC,CAACQ,gBAAgB,CAAC,CAAC;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ const useWebObjectMethodsProxyMock = jest.fn();
4
+ export default useWebObjectMethodsProxyMock;
5
+ //# sourceMappingURL=useWebObjectMethodsProxy.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useWebObjectMethodsProxyMock","jest","fn"],"sourceRoot":"../../../../../src","sources":["react-native/components-factory/hooks/useWebObjectMethodsProxy.mock.ts"],"mappings":";;AAAA,MAAMA,4BAA4B,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;AAE9C,eAAeF,4BAA4B","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ const useWebObjectMountOnLaunchMock = jest.fn();
4
+ export default useWebObjectMountOnLaunchMock;
5
+ //# sourceMappingURL=useWebObjectMountOnLaunch.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useWebObjectMountOnLaunchMock","jest","fn"],"sourceRoot":"../../../../../src","sources":["react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.ts"],"mappings":";;AAAA,MAAMA,6BAA6B,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;AAE/C,eAAeF,6BAA6B","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ import { useEffect } from 'react';
4
+ export const useWebObjectPropertiesUpdater = (props, id) => {
5
+ // Refs.
6
+ //const previousProps = useRef<Record<string, any>>({})
7
+
8
+ useEffect(() => {
9
+ // TODO compare previous and new props and update only if new.
10
+ return;
11
+ }, [id, props]);
12
+ };
13
+ export default useWebObjectPropertiesUpdater;
14
+ //# sourceMappingURL=useWebObjectPropertiesUpdater.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useWebObjectPropertiesUpdater","props","id"],"sourceRoot":"../../../../../src","sources":["react-native/components-factory/hooks/useWebObjectPropertiesUpdater.ts"],"mappings":";;AACA,SAASA,SAAS,QAAQ,OAAO;AAEjC,OAAO,MAAMC,6BAA6B,GAAGA,CAG3CC,KAAY,EACZC,EAAU,KACP;EACH;EACA;;EAEAH,SAAS,CAAC,MAAM;IACd;IACA;EACF,CAAC,EAAE,CAACG,EAAE,EAAED,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,eAAeD,6BAA6B","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ const useWebObjectPropertiesUpdaterMock = jest.fn();
4
+ export default useWebObjectPropertiesUpdaterMock;
5
+ //# sourceMappingURL=useWebObjectPropertiesUpdater.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useWebObjectPropertiesUpdaterMock","jest","fn"],"sourceRoot":"../../../../../src","sources":["react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.ts"],"mappings":";;AAAA,MAAMA,iCAAiC,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;AAEnD,eAAeF,iCAAiC","ignoreList":[]}
@@ -5,7 +5,7 @@ import { useAtom } from 'jotai';
5
5
  import { stableStringify } from "./useMapAtoms.utils.js";
6
6
 
7
7
  /**
8
- * The WebView used to render MapLibre GL JS views (the web world).
8
+ * The WebView used to render `MapLibre GL JS` views (the web world).
9
9
  */
10
10
  const webViewAtom = atom(null);
11
11
 
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ export const setIsWebWorldReadyMock = jest.fn();
4
+ export const getWebObjectListenersMock = jest.fn();
5
+ export const resolveWebObjectPendingMethodResponseMock = jest.fn();
6
+ const useMapAtomsMock = () => ({
7
+ setIsWebWorldReady: setIsWebWorldReadyMock,
8
+ getWebObjectListeners: getWebObjectListenersMock,
9
+ resolveWebObjectPendingMethodResponse: resolveWebObjectPendingMethodResponseMock
10
+ });
11
+ export default useMapAtomsMock;
12
+ //# sourceMappingURL=useMapAtoms.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["setIsWebWorldReadyMock","jest","fn","getWebObjectListenersMock","resolveWebObjectPendingMethodResponseMock","useMapAtomsMock","setIsWebWorldReady","getWebObjectListeners","resolveWebObjectPendingMethodResponse"],"sourceRoot":"../../../../../src","sources":["react-native/hooks/atoms/useMapAtoms.mock.ts"],"mappings":";;AAAA,OAAO,MAAMA,sBAAsB,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;AAC/C,OAAO,MAAMC,yBAAyB,GAAGF,IAAI,CAACC,EAAE,CAAC,CAAC;AAClD,OAAO,MAAME,yCAAyC,GAAGH,IAAI,CAACC,EAAE,CAAC,CAAC;AAElE,MAAMG,eAAe,GAAGA,CAAA,MAAO;EAC7BC,kBAAkB,EAAEN,sBAAsB;EAC1CO,qBAAqB,EAAEJ,yBAAyB;EAChDK,qCAAqC,EACnCJ;AACJ,CAAC,CAAC;AAEF,eAAeC,eAAe","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ import { jest } from '@jest/globals';
4
+ const RNLoggerMock = {
5
+ debug: jest.fn(),
6
+ info: jest.fn(),
7
+ error: jest.fn()
8
+ };
9
+ export default RNLoggerMock;
10
+ //# sourceMappingURL=rn-logger.mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jest","RNLoggerMock","debug","fn","info","error"],"sourceRoot":"../../../../src","sources":["react-native/logger/rn-logger.mock.ts"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,eAAe;AAEpC,MAAMC,YAAY,GAAG;EACnBC,KAAK,EAAEF,IAAI,CAACG,EAAE,CAAC,CAAC;EAChBC,IAAI,EAAEJ,IAAI,CAACG,EAAE,CAAC,CAAC;EACfE,KAAK,EAAEL,IAAI,CAACG,EAAE,CAAC;AACjB,CAAC;AAED,eAAeF,YAAY","ignoreList":[]}
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
-
3
- export {};
4
2
  //# sourceMappingURL=typedoc.js.map