react-native-maplibre-gl-js 1.2.1 → 1.3.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.
Files changed (95) hide show
  1. package/lib/module/react-native/components/Map/{Map.test.js → Map.test.unit.js} +1 -1
  2. package/lib/module/react-native/components/Map/Map.test.unit.js.map +1 -0
  3. package/lib/module/react-native/components/MapProvider/{MapProvider.test.js → MapProvider.test.unit.js} +3 -1
  4. package/lib/module/react-native/components/MapProvider/MapProvider.test.unit.js.map +1 -0
  5. package/lib/module/react-native/components/Marker/{Marker.test.js → Marker.test.unit.js} +2 -1
  6. package/lib/module/react-native/components/Marker/Marker.test.unit.js.map +1 -0
  7. package/lib/module/react-native/components/Popup/{Popup.test.js → Popup.test.unit.js} +1 -1
  8. package/lib/module/react-native/components/Popup/Popup.test.unit.js.map +1 -0
  9. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js +5 -7
  10. package/lib/module/react-native/components-factory/createWebObjectAsComponent.js.map +1 -1
  11. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.integration.js +85 -0
  12. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.integration.js.map +1 -0
  13. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.unit.js +30 -0
  14. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.unit.js.map +1 -0
  15. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.js +79 -0
  16. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.js.map +1 -0
  17. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.mock.js +10 -0
  18. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.mock.js.map +1 -0
  19. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.types.js +2 -0
  20. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.types.js.map +1 -0
  21. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.js +57 -0
  22. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.js.map +1 -0
  23. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.mock.js +5 -0
  24. package/lib/module/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.mock.js.map +1 -0
  25. package/lib/module/react-native/hooks/atoms/useMapAtoms.mock.js +5 -0
  26. package/lib/module/react-native/hooks/atoms/useMapAtoms.mock.js.map +1 -1
  27. package/lib/module/react-native/hooks/atoms/useMapAtoms.utils.js +17 -3
  28. package/lib/module/react-native/hooks/atoms/useMapAtoms.utils.js.map +1 -1
  29. package/lib/module/web/generated/webview_static_html.js +5 -2
  30. package/lib/module/web/generated/webview_static_html.js.map +1 -1
  31. package/lib/module/web/maplibre-gl-js/MapController.js +7 -0
  32. package/lib/module/web/maplibre-gl-js/MapController.js.map +1 -1
  33. package/lib/typescript/src/react-native/components/Map/Map.test.unit.d.ts +2 -0
  34. package/lib/typescript/src/react-native/components/Map/Map.test.unit.d.ts.map +1 -0
  35. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.unit.d.ts +2 -0
  36. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.unit.d.ts.map +1 -0
  37. package/lib/typescript/src/react-native/components/Marker/Marker.test.unit.d.ts +2 -0
  38. package/lib/typescript/src/react-native/components/Marker/Marker.test.unit.d.ts.map +1 -0
  39. package/lib/typescript/src/react-native/components/Popup/Popup.test.unit.d.ts +2 -0
  40. package/lib/typescript/src/react-native/components/Popup/Popup.test.unit.d.ts.map +1 -0
  41. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.d.ts.map +1 -1
  42. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.integration.d.ts +2 -0
  43. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.integration.d.ts.map +1 -0
  44. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.unit.d.ts +2 -0
  45. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.unit.d.ts.map +1 -0
  46. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.d.ts +19 -0
  47. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.d.ts.map +1 -0
  48. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.mock.d.ts +9 -0
  49. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.mock.d.ts.map +1 -0
  50. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.types.d.ts +8 -0
  51. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountCallbacks.types.d.ts.map +1 -0
  52. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.d.ts +14 -0
  53. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.d.ts.map +1 -0
  54. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.mock.d.ts +3 -0
  55. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountUnmountWithProps.mock.d.ts.map +1 -0
  56. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.mock.d.ts +2 -0
  57. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.mock.d.ts.map +1 -1
  58. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.utils.d.ts +2 -1
  59. package/lib/typescript/src/react-native/hooks/atoms/useMapAtoms.utils.d.ts.map +1 -1
  60. package/lib/typescript/src/web/generated/webview_static_html.d.ts +1 -1
  61. package/lib/typescript/src/web/generated/webview_static_html.d.ts.map +1 -1
  62. package/lib/typescript/src/web/maplibre-gl-js/MapController.d.ts.map +1 -1
  63. package/package.json +1 -1
  64. package/lib/module/react-native/components/Map/Map.test.js.map +0 -1
  65. package/lib/module/react-native/components/MapProvider/MapProvider.test.js.map +0 -1
  66. package/lib/module/react-native/components/Marker/Marker.test.js.map +0 -1
  67. package/lib/module/react-native/components/Popup/Popup.test.js.map +0 -1
  68. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.js +0 -28
  69. package/lib/module/react-native/components-factory/createWebObjectAsComponent.test.js.map +0 -1
  70. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.js +0 -69
  71. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.js.map +0 -1
  72. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.js +0 -5
  73. package/lib/module/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.js.map +0 -1
  74. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.js +0 -14
  75. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.js.map +0 -1
  76. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.js +0 -5
  77. package/lib/module/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.js.map +0 -1
  78. package/lib/typescript/src/react-native/components/Map/Map.test.d.ts +0 -2
  79. package/lib/typescript/src/react-native/components/Map/Map.test.d.ts.map +0 -1
  80. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.d.ts +0 -2
  81. package/lib/typescript/src/react-native/components/MapProvider/MapProvider.test.d.ts.map +0 -1
  82. package/lib/typescript/src/react-native/components/Marker/Marker.test.d.ts +0 -2
  83. package/lib/typescript/src/react-native/components/Marker/Marker.test.d.ts.map +0 -1
  84. package/lib/typescript/src/react-native/components/Popup/Popup.test.d.ts +0 -2
  85. package/lib/typescript/src/react-native/components/Popup/Popup.test.d.ts.map +0 -1
  86. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.d.ts +0 -2
  87. package/lib/typescript/src/react-native/components-factory/createWebObjectAsComponent.test.d.ts.map +0 -1
  88. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.d.ts +0 -12
  89. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.d.ts.map +0 -1
  90. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.d.ts +0 -3
  91. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.d.ts.map +0 -1
  92. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.d.ts +0 -4
  93. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.d.ts.map +0 -1
  94. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.d.ts +0 -3
  95. package/lib/typescript/src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"webview_static_html.d.ts","sourceRoot":"","sources":["../../../../../src/web/generated/webview_static_html.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,8k8lDAoiuB/B,CAAA"}
1
+ {"version":3,"file":"webview_static_html.d.ts","sourceRoot":"","sources":["../../../../../src/web/generated/webview_static_html.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,ws8lDAuiuB/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapController.d.ts","sourceRoot":"","sources":["../../../../../src/web/maplibre-gl-js/MapController.ts"],"names":[],"mappings":"AAAA,OAAO,UAAsC,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,oCAAoC,CAAA;AAY3C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;;IAKhC,IAAI,iBAAiB,IAAI,iBAAiB,CAKzC;IAED,IAAI,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,EAE9C;IAED,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,CAMxB;IAED,aAAa,GAAI,SAAS,kBAAkB,UAiB3C;CA4PF"}
1
+ {"version":3,"file":"MapController.d.ts","sourceRoot":"","sources":["../../../../../src/web/maplibre-gl-js/MapController.ts"],"names":[],"mappings":"AAAA,OAAO,UAAsC,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,oCAAoC,CAAA;AAY3C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;;IAKhC,IAAI,iBAAiB,IAAI,iBAAiB,CAKzC;IAED,IAAI,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,EAE9C;IAED,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,CAMxB;IAED,aAAa,GAAI,SAAS,kBAAkB,UAiB3C;CAmQF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-maplibre-gl-js",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "description": "MapLibre GL JS for React Native",
5
5
  "author": "Emilien Aufauvre <emilien.aufauvre@live.fr> (https://github.com/emilienaufauvre)",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"names":["render","Map","jsx","_jsx","describe","beforeEach","jest","clearAllMocks","test"],"sourceRoot":"../../../../../src","sources":["react-native/components/Map/Map.test.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,GAAG,MAAM,UAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEvBC,QAAQ,CAAC,KAAK,EAAE,MAAM;EACpBC,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,GAAG,IAAE,CAAC,CAAC;IACjB,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":[]}
@@ -1 +0,0 @@
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,CAAC,aAAa,EAAE,MAAM;EAC5BC,UAAU,CAAC,MAAM;IACfC,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFH,QAAQ,CAAC,+CAA+C,EAAE,MAAM;IAC9DC,UAAU,CAAC,MAAM;MACfjB,MAAM,cACJU,IAAA,CAACP,WAAW;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IAAIwB,UAAqB;MACzB,IAAIC,YAA2B;MAC/BxB,UAAU,CAAC,MAAM;QACfuB,UAAU,GAAGtB,IAAI,CAACwB,EAAE,CAAC,CAAC;QACtBD,YAAY,GAAG;UAAEE,CAAC,EAAEC,IAAI,CAACC,MAAM,CAAC;QAAE,CAAC;QACnCvC,yBAAyB,CAACwC,eAAe,CAAC;UACxCC,KAAK,EAAE;YACLP;UACF;QACF,CAAC,CAAC;QACFZ,OAAO,CACLjB,WAAW,CAAC;UACVqB,IAAI,EAAE,wBAAwB;UAC9BG,OAAO,EAAE;YACPa,QAAQ,EAAE,UAAU;YACpBC,SAAS,EAAE,OAAO;YAClBC,KAAK,EAAET;UACT;QACF,CAAC,CACH,CAAC;MACH,CAAC,CAAC;MAEFnB,IAAI,CAAC,yDAAyD,EAAE,MAAM;QACpEG,MAAM,CAACe,UAAU,CAAC,CAACD,oBAAoB,CAACE,YAAY,CAAC;MACvD,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFzB,QAAQ,CAAC,2DAA2D,EAAE,MAAM;MAC1EC,UAAU,CAAC,MAAM;QACfW,OAAO,CACLjB,WAAW,CAAC;UACVqB,IAAI,EAAE,yBAAyB;UAC/BG,OAAO,EAAE;YACPgB,SAAS,EAAE,SAAS;YACpBtB,MAAM,EAAE;cAAEuB,EAAE,EAAE;YAAK;UACrB;QACF,CAAC,CACH,CAAC;MACH,CAAC,CAAC;MAEF9B,IAAI,CAAC,8CAA8C,EAAE,MAAM;QACzDG,MAAM,CAAClB,yCAAyC,CAAC,CAACgC,oBAAoB,CAAC;UACrEY,SAAS,EAAE,SAAS;UACpBtB,MAAM,EAAE;YAAEuB,EAAE,EAAE;UAAK;QACrB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1,28 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,69 +0,0 @@
1
- "use strict";
2
-
3
- import { useCallback, useEffect, useRef } from 'react';
4
- import useMapAtoms from "../../hooks/atoms/useMapAtoms.js";
5
-
6
- /**
7
- * Mount the web object once the React Native one is mounted.
8
- * @param props - The RN object props.
9
- * @param objectId - The ID of the web object that owns the method.
10
- * @param objectType - The type of the associated web object.
11
- */
12
- const useWebObjectMountOnLaunch = (props, objectId, objectType) => {
13
- // Refs.
14
- const isMounted = useRef(false);
15
- // States.
16
- // - Global.
17
- const {
18
- isWebWorldReady,
19
- dispatchMessage,
20
- setWebObjectListeners,
21
- deleteWebObjectListeners
22
- } = useMapAtoms();
23
- const mount = useCallback(() => {
24
- // Mount the component as a web object on the web world.
25
- dispatchMessage({
26
- type: `webObjectMount`,
27
- payload: {
28
- objectId: objectId,
29
- objectType,
30
- options: props.options ?? {},
31
- listeners: props.listeners ?? {}
32
- }
33
- });
34
- // Register listeners on event from the web world.
35
- setWebObjectListeners({
36
- objectId: objectId,
37
- listeners: props.listeners ?? {}
38
- });
39
- isMounted.current = true;
40
- }, [objectId, objectType, props.options, props.listeners, dispatchMessage, setWebObjectListeners]);
41
- const unmount = useCallback(() => {
42
- dispatchMessage({
43
- type: `webObjectUnmount`,
44
- payload: {
45
- objectId
46
- }
47
- });
48
- deleteWebObjectListeners({
49
- objectId
50
- });
51
- isMounted.current = false;
52
- }, [objectId, dispatchMessage, deleteWebObjectListeners]);
53
-
54
- // On mount/unmount update the web object.
55
- useEffect(() => {
56
- if (!isWebWorldReady) {
57
- return;
58
- }
59
- if (!isMounted.current) {
60
- mount();
61
- }
62
- // TODO verify if we unmount here? it sure that it must not be in this
63
- // use effect, otherwise on start if mount then unmount then mount, but
64
- // we may have to unmount in another effect
65
- //return unmount
66
- }, [objectId, isWebWorldReady, dispatchMessage, props, unmount, mount]);
67
- };
68
- export default useWebObjectMountOnLaunch;
69
- //# sourceMappingURL=useWebObjectMountOnLaunch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useEffect","useRef","useMapAtoms","useWebObjectMountOnLaunch","props","objectId","objectType","isMounted","isWebWorldReady","dispatchMessage","setWebObjectListeners","deleteWebObjectListeners","mount","type","payload","options","listeners","current","unmount"],"sourceRoot":"../../../../../src","sources":["react-native/components-factory/hooks/useWebObjectMountOnLaunch.ts"],"mappings":";;AAAA,SAA+BA,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAG5E,OAAOC,WAAW,MAAM,kCAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,yBAAyB,GAAGA,CAChCC,KAA6B,EAC7BC,QAAgB,EAChBC,UAAyB,KACtB;EACH;EACA,MAAMC,SAAS,GAAGN,MAAM,CAAU,KAAK,CAAC;EACxC;EACA;EACA,MAAM;IACJO,eAAe;IACfC,eAAe;IACfC,qBAAqB;IACrBC;EACF,CAAC,GAAGT,WAAW,CAAC,CAAC;EAEjB,MAAMU,KAAK,GAAGb,WAAW,CAAC,MAAM;IAC9B;IACAU,eAAe,CAAC;MACdI,IAAI,EAAE,gBAAgB;MACtBC,OAAO,EAAE;QACPT,QAAQ,EAAEA,QAAQ;QAClBC,UAAU;QACVS,OAAO,EAAEX,KAAK,CAACW,OAAO,IAAI,CAAC,CAAC;QAC5BC,SAAS,EAAEZ,KAAK,CAACY,SAAS,IAAI,CAAC;MACjC;IACF,CAAC,CAAC;IACF;IACAN,qBAAqB,CAAC;MACpBL,QAAQ,EAAEA,QAAQ;MAClBW,SAAS,EAAEZ,KAAK,CAACY,SAAS,IAAI,CAAC;IACjC,CAAC,CAAC;IACFT,SAAS,CAACU,OAAO,GAAG,IAAI;EAC1B,CAAC,EAAE,CACDZ,QAAQ,EACRC,UAAU,EACVF,KAAK,CAACW,OAAO,EACbX,KAAK,CAACY,SAAS,EACfP,eAAe,EACfC,qBAAqB,CACtB,CAAC;EAEF,MAAMQ,OAAO,GAAGnB,WAAW,CAAC,MAAM;IAChCU,eAAe,CAAC;MACdI,IAAI,EAAE,kBAAkB;MACxBC,OAAO,EAAE;QAAET;MAAS;IACtB,CAAC,CAAC;IACFM,wBAAwB,CAAC;MAAEN;IAAS,CAAC,CAAC;IACtCE,SAAS,CAACU,OAAO,GAAG,KAAK;EAC3B,CAAC,EAAE,CAACZ,QAAQ,EAAEI,eAAe,EAAEE,wBAAwB,CAAC,CAAC;;EAEzD;EACAX,SAAS,CAAC,MAAM;IACd,IAAI,CAACQ,eAAe,EAAE;MACpB;IACF;IAEA,IAAI,CAACD,SAAS,CAACU,OAAO,EAAE;MACtBL,KAAK,CAAC,CAAC;IACT;IACA;IACA;IACA;IACA;EACF,CAAC,EAAE,CAACP,QAAQ,EAAEG,eAAe,EAAEC,eAAe,EAAEL,KAAK,EAAEc,OAAO,EAAEN,KAAK,CAAC,CAAC;AACzE,CAAC;AAED,eAAeT,yBAAyB","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- const useWebObjectMountOnLaunchMock = jest.fn();
4
- export default useWebObjectMountOnLaunchMock;
5
- //# sourceMappingURL=useWebObjectMountOnLaunch.mock.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- const useWebObjectPropertiesUpdaterMock = jest.fn();
4
- export default useWebObjectPropertiesUpdaterMock;
5
- //# sourceMappingURL=useWebObjectPropertiesUpdater.mock.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Map.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Map.test.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Map/Map.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=MapProvider.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MapProvider.test.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/MapProvider/MapProvider.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Marker.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Marker.test.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Marker/Marker.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Popup.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popup.test.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components/Popup/Popup.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=createWebObjectAsComponent.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createWebObjectAsComponent.test.d.ts","sourceRoot":"","sources":["../../../../../src/react-native/components-factory/createWebObjectAsComponent.test.tsx"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { type PropsWithoutRef } from 'react';
2
- import type { WebObjectProps } from '../createWebObjectAsComponent.types';
3
- import type { WebObjectType } from '../../../communication/messages.types';
4
- /**
5
- * Mount the web object once the React Native one is mounted.
6
- * @param props - The RN object props.
7
- * @param objectId - The ID of the web object that owns the method.
8
- * @param objectType - The type of the associated web object.
9
- */
10
- declare const useWebObjectMountOnLaunch: <Props extends WebObjectProps<any, any>>(props: PropsWithoutRef<Props>, objectId: string, objectType: WebObjectType) => void;
11
- export default useWebObjectMountOnLaunch;
12
- //# sourceMappingURL=useWebObjectMountOnLaunch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWebObjectMountOnLaunch.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAkC,MAAM,OAAO,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAG1E;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,GAAI,KAAK,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EACvE,OAAO,eAAe,CAAC,KAAK,CAAC,EAC7B,UAAU,MAAM,EAChB,YAAY,aAAa,SA8D1B,CAAA;AAED,eAAe,yBAAyB,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const useWebObjectMountOnLaunchMock: jest.Mock<any, any, any>;
2
- export default useWebObjectMountOnLaunchMock;
3
- //# sourceMappingURL=useWebObjectMountOnLaunch.mock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWebObjectMountOnLaunch.mock.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factory/hooks/useWebObjectMountOnLaunch.mock.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,6BAA6B,0BAAY,CAAA;AAE/C,eAAe,6BAA6B,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { WebObjectProps } from '../createWebObjectAsComponent.types';
2
- export declare const useWebObjectPropertiesUpdater: <Props extends WebObjectProps<any, any>>(props: Props, id: string) => void;
3
- export default useWebObjectPropertiesUpdater;
4
- //# sourceMappingURL=useWebObjectPropertiesUpdater.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWebObjectPropertiesUpdater.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGzE,eAAO,MAAM,6BAA6B,GACxC,KAAK,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAEtC,OAAO,KAAK,EACZ,IAAI,MAAM,SASX,CAAA;AAED,eAAe,6BAA6B,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const useWebObjectPropertiesUpdaterMock: jest.Mock<any, any, any>;
2
- export default useWebObjectPropertiesUpdaterMock;
3
- //# sourceMappingURL=useWebObjectPropertiesUpdater.mock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWebObjectPropertiesUpdater.mock.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factory/hooks/useWebObjectPropertiesUpdater.mock.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iCAAiC,0BAAY,CAAA;AAEnD,eAAe,iCAAiC,CAAA"}