@mappedin/react-native-sdk 6.0.0-alpha.10 → 6.0.0-alpha.11

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.
@@ -0,0 +1,50 @@
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
3
+ import type { TStateChangedInternalPayload, TShow3DMapOptions, TGetMapDataOptions } from '@mappedin/mappedin-js';
4
+ export interface MapViewProps {
5
+ /**
6
+ * Optional style overrides
7
+ */
8
+ style?: any;
9
+ /**
10
+ * Options for the 3D map from mappedin-js
11
+ */
12
+ options?: TShow3DMapOptions;
13
+ /**
14
+ * Options for getting map data from mappedin-js
15
+ */
16
+ mapData?: TGetMapDataOptions;
17
+ /**
18
+ * Child components that will have access to mapData and mapView through useMap hook
19
+ */
20
+ children?: ReactNode;
21
+ /**
22
+ * Fallback component to show while map is loading or on error
23
+ */
24
+ fallback?: React.ReactNode;
25
+ /**
26
+ * Called when the map is ready
27
+ */
28
+ onMapReady?: () => void;
29
+ /**
30
+ * Called when there is an error loading the map
31
+ */
32
+ onError?: (error: Error) => void;
33
+ /**
34
+ * initial state to sync on start
35
+ * @remarks
36
+ * This is useful for testing.
37
+ *
38
+ * @internal
39
+ */
40
+ __startInitialState?: TStateChangedInternalPayload;
41
+ }
42
+ /**
43
+ * MapView - A React Native component for displaying Mappedin maps
44
+ *
45
+ * This component wraps a WebView and provides MappedinContext to child components.
46
+ * Children are only rendered when both mapData and mapView are ready.
47
+ */
48
+ export declare const MapView: React.FC<MapViewProps>;
49
+ export default MapView;
50
+ //# sourceMappingURL=map-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-view.d.ts","sourceRoot":"","sources":["../src/map-view.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AASjH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;CACnD;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAgO1C,CAAC;AA+BF,eAAe,OAAO,CAAC"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type * as Mappedin from '@mappedin/mappedin-js';
2
+ export type { Mappedin };
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,CAAC"}
package/lib/utils.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { E_SDK_LOG_LEVEL } from '../../packages/common/Mappedin.Logger';
2
+ export declare const Logger: {
3
+ logState: E_SDK_LOG_LEVEL;
4
+ log(...args: any[]): void;
5
+ warn(...args: any[]): void;
6
+ error(...args: any[]): void;
7
+ assert(...args: any[]): void;
8
+ time(label: string): void;
9
+ timeEnd(label: string): void;
10
+ setLevel(level: E_SDK_LOG_LEVEL): void;
11
+ };
12
+ export declare function setLoggerLevel(level: 'log' | 'warn' | 'error' | 'silent'): void;
13
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAEtF,eAAO,MAAM,MAAM;;;;;;;;;CAA0C,CAAC;AAC9D,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,QAexE"}
package/package.json CHANGED
@@ -1,39 +1,61 @@
1
1
  {
2
2
  "name": "@mappedin/react-native-sdk",
3
- "version": "6.0.0-alpha.10",
4
- "main": "dist/commonjs/index.js",
5
- "module": "dist/module/index.js",
6
- "types": "dist/index.d.ts",
7
- "license": "UNLICENSED",
3
+ "version": "6.0.0-alpha.11",
4
+ "homepage": "https://developer.mappedin.com/",
5
+ "private": false,
6
+ "main": "lib/index.js",
7
+ "module": "lib/index.js",
8
+ "types": "lib/index.d.ts",
9
+ "type": "module",
10
+ "files": [
11
+ "lib",
12
+ "README.md",
13
+ "LICENSE.txt",
14
+ "THIRD_PARTY_LICENSES.txt"
15
+ ],
16
+ "license": "SEE LICENSE IN LICENSE.txt",
8
17
  "repository": {
9
18
  "type": "git",
10
- "url": "git+https://github.com/MappedIn/mappedin-core-sdk.git"
19
+ "url": "git+https://github.com/MappedIn/sdk.git"
11
20
  },
12
- "devDependencies": {
13
- "@types/react": "*",
14
- "@types/react-native": "*",
21
+ "peerDependencies": {
15
22
  "react": "*",
16
23
  "react-native": "*",
17
- "typescript": "4.4.2"
24
+ "react-native-webview": "*"
18
25
  },
19
- "peerDependencies": {
20
- "react": "*",
21
- "react-native": "*"
26
+ "devDependencies": {
27
+ "@babel/preset-flow": "^7.27.1",
28
+ "@babel/preset-typescript": "^7.27.1",
29
+ "@react-native/babel-preset": "^0.79.3",
30
+ "@testing-library/react-native": "^13.2.0",
31
+ "@types/react": "~19.0.10",
32
+ "babel-jest": "30.0.0-beta.3",
33
+ "jest": "^29.7.0",
34
+ "jest-environment-node": "^29.7.0",
35
+ "react": "19.0.0",
36
+ "react-native": "0.79.2",
37
+ "react-test-renderer": "19.0.0",
38
+ "typescript": "~5.8.3",
39
+ "@mappedin/mappedin-js": "6.0.1-beta.51",
40
+ "@mappedin/webview-bridge": "6.0.1-beta.51"
22
41
  },
23
- "files": [
24
- "dist",
25
- "README.md"
26
- ],
27
- "scripts": {
28
- "clean": "rm -rf dist",
29
- "build": "rm -rf dist/ && yarn types && node scripts/build.mjs",
30
- "types": "tsc -b .",
31
- "lint": "eslint .",
32
- "test": "echo \"No tests yet\"",
33
- "docs": "yarn build && typedoc --categorizeByGroup --disableSources --includeVersion --hideGenerator --excludePrivate --tsconfig tsconfig.json --out docs src/index.ts"
42
+ "volta": {
43
+ "extends": "../../package.json"
34
44
  },
35
45
  "dependencies": {
36
- "react-native-webview": "^11.13.0"
46
+ "react-native-webview": "13.13.5"
37
47
  },
38
- "gitHead": "f47dd8b5f9e4a4c7634890f670a0bd70aef91240"
39
- }
48
+ "scripts": {
49
+ "build": "node scripts/build.mjs",
50
+ "build:prod": "NODE_ENV=production pnpm build",
51
+ "types": "tsc --emitDeclarationOnly --declaration --declarationMap",
52
+ "start": "pnpm -w start:rn",
53
+ "docs": "typedoc",
54
+ "serve:docs": "npx serve ./docs",
55
+ "test": "jest",
56
+ "clean": "rm -rf lib/**",
57
+ "version": "node scripts/version.mjs",
58
+ "publish:internal": "node scripts/version.mjs publish-internal",
59
+ "publish:npm": "node scripts/version.mjs mark-public && pnpm publish --tag alpha --registry=\"https://registry.npmjs.org/\" --no-git-checks"
60
+ }
61
+ }