@twinmatrix/spatialverse-sdk-rn 0.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/package.json ADDED
@@ -0,0 +1,127 @@
1
+ {
2
+ "name": "@twinmatrix/spatialverse-sdk-rn",
3
+ "version": "0.1.0",
4
+ "description": "Spatialverse SDK for React Native",
5
+ "main": "lib/cjs/index.js",
6
+ "module": "lib/esm/index.js",
7
+ "types": "typings/index.d.ts",
8
+ "react-native": "lib/cjs/index.js",
9
+ "files": [
10
+ "lib",
11
+ "typings",
12
+ "README.md"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./typings/index.d.ts",
17
+ "react-native": "./lib/cjs/index.js",
18
+ "import": "./lib/esm/index.js",
19
+ "require": "./lib/cjs/index.js",
20
+ "default": "./lib/cjs/index.js"
21
+ }
22
+ },
23
+ "scripts": {
24
+ "clean": "rimraf lib",
25
+ "declarations": "node -e \"require('fs').accessSync('typings/index.d.ts')\"",
26
+ "build:esm": "cross-env FORMAT=esm rollup -c rollup.config.js",
27
+ "build:cjs": "cross-env FORMAT=cjs rollup -c rollup.config.js",
28
+ "build:bundles": "rollup -c rollup.config.umd.js",
29
+ "build": "npm-run-all -l clean -p build:esm build:cjs declarations",
30
+ "build:all": "npm-run-all -l clean -p build:esm build:cjs build:bundles declarations",
31
+ "prepublishOnly": "npm run build",
32
+ "test": "jest"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://gitlab.digitwin.com.cn/vst/ste/meta-atlas-sdk"
37
+ },
38
+ "keywords": [
39
+ "node"
40
+ ],
41
+ "author": {
42
+ "name": "Mike Hall",
43
+ "email": "mike.hall@virspatial.com",
44
+ "url": "https://www.virspatial.com"
45
+ },
46
+ "bugs": {
47
+ "url": "https://gitlab.digitwin.com.cn/vst/ste/meta-atlas-sdk.issues"
48
+ },
49
+ "homepage": "https://gitlab.digitwin.com.cn/vst/ste/meta-atlas-sdk#readme",
50
+ "devDependencies": {
51
+ "@babel/cli": "^7.12.10",
52
+ "@babel/core": "^7.12.10",
53
+ "@babel/preset-env": "^7.12.11",
54
+ "@babel/preset-react": "^7.18.6",
55
+ "@babel/preset-typescript": "^7.12.7",
56
+ "@rollup/plugin-babel": "^5.2.3",
57
+ "@rollup/plugin-commonjs": "^23.0.7",
58
+ "@rollup/plugin-image": "^3.0.2",
59
+ "@rollup/plugin-json": "^6.0.0",
60
+ "@rollup/plugin-node-resolve": "^15.0.1",
61
+ "@rollup/plugin-typescript": "^11.0.0",
62
+ "@tsconfig/react-native": "^2.0.3",
63
+ "@types/jest": "^27.4.1",
64
+ "cross-env": "^7.0.3",
65
+ "jest": "^27.5.1",
66
+ "npm-run-all": "^4.1.5",
67
+ "prettier": "^2.2.1",
68
+ "rimraf": "^3.0.2",
69
+ "rollup": "^2.79.1",
70
+ "rollup-obfuscator": "^3.0.1",
71
+ "rollup-plugin-peer-deps-external": "^2.2.4",
72
+ "rollup-plugin-polyfill-node": "^0.12.0",
73
+ "rollup-plugin-postcss": "^4.0.2",
74
+ "rollup-plugin-replace": "^2.2.0",
75
+ "rollup-plugin-terser": "^7.0.2",
76
+ "typescript": "^4.1.3"
77
+ },
78
+ "dependencies": {
79
+ "@dagrejs/graphlib": "^2.2.4",
80
+ "@turf/area": "6.5.0",
81
+ "@turf/bearing": "6.5.0",
82
+ "@turf/boolean-point-in-polygon": "6.5.0",
83
+ "@turf/center": "6.5.0",
84
+ "@turf/distance": "6.5.0",
85
+ "@turf/helpers": "6.5.0",
86
+ "@turf/invariant": "6.5.0",
87
+ "@turf/length": "6.5.0",
88
+ "@turf/line-slice-along": "6.5.0",
89
+ "@turf/meta": "6.5.0",
90
+ "@turf/nearest-point-on-line": "6.5.0",
91
+ "@turf/rhumb-bearing": "6.5.0",
92
+ "@turf/transform-translate": "6.5.0",
93
+ "@turf/boolean-disjoint": "6.5.0",
94
+ "@turf/line-slice": "6.5.0",
95
+ "@turf/line-intersect": "6.5.0",
96
+ "@turf/bbox": "6.5.0",
97
+ "@types/mapbox__mapbox-gl-draw": "^1.3.3",
98
+ "base-64": "^1.0.0",
99
+ "geojson": "^0.5.0",
100
+ "geojson-path-finder": "^2.0.1",
101
+ "lodash": "git+https://github.com/TwinMatrixOrg/lodash.git#4cf78bf2e3c982a3ad6f4236bf45a958210bb6ee",
102
+ "ngraph.graph": "^20.0.1",
103
+ "ngraph.path": "^1.3.1",
104
+ "react-native-crypto-js": "^1.0.0",
105
+ "react-native-uuid": "^2.0.2",
106
+ "to-smooth": "^2.2.0",
107
+ "zustand": "^4.5.2"
108
+ },
109
+ "peerDependencies": {
110
+ "@maplibre/maplibre-react-native": "11.0.0-alpha.25",
111
+ "axios": "1.13.2",
112
+ "react": "19.1.0",
113
+ "react-native": "0.81.5",
114
+ "react-native-mmkv": "3.3.3",
115
+ "react-native-fs": "2.20.0",
116
+ "react-native-zip-archive": "7.0.1",
117
+ "react-native-aes-crypto": "3.2.1",
118
+ "@react-native-community/netinfo": "11.4.1",
119
+ "react-native-geolocation-service": "5.3.1",
120
+ "react-native-gesture-handler": "2.28.0"
121
+ },
122
+ "overrides": {
123
+ "chalk@2": {
124
+ "ansi-styles": "3.2.1"
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Public TypeScript surface for `@twinmatrix/spatialverse-sdk-rn` package consumers (e.g. UI SDK).
3
+ * Runtime entry is the built `lib/` output; types ship from this file.
4
+ */
5
+ import type { ReactNode, Ref } from 'react';
6
+
7
+ export type StatusUpdateCallbackType = (loaded: boolean) => void;
8
+ export type NetworkModeUpdateCallbackType = (mode: string) => void;
9
+
10
+ export type FocusNode = {
11
+ name: string;
12
+ taxonomyPath: string;
13
+ depth?: number;
14
+ cameraConfigs?: unknown;
15
+ bounds?: unknown;
16
+ defaultFloorPath?: string;
17
+ children?: FocusNode[];
18
+ [key: string]: unknown;
19
+ };
20
+
21
+ export type FocusTree = Record<string, FocusNode>;
22
+
23
+ export type MetaAtlasSDKProps = {
24
+ ref?: Ref<any>;
25
+ onPress?: (data: any) => void;
26
+ onMoveStart?: (data: any) => void;
27
+ onMove?: (data: any) => void;
28
+ onMoveEnd?: (data: any) => void;
29
+ onLoad?: () => void;
30
+ onLoadFail?: (errorMessage: string) => void;
31
+ onRoutingStatusUpdate?: StatusUpdateCallbackType;
32
+ onSearchStatusUpdate?: StatusUpdateCallbackType;
33
+ onNetworkModeUpdate?: NetworkModeUpdateCallbackType;
34
+ onOfflineMapsStatusUpdate?: StatusUpdateCallbackType;
35
+ tileserverRoleName: string;
36
+ accessToken: string;
37
+ secretKey: string;
38
+ maxMapHeight?: number | string;
39
+ isFullHeight?: boolean;
40
+ children?: ReactNode;
41
+ };
42
+
43
+ /** Function component; return typed as `any` to avoid React 18/19 JSX element mismatches across peers. */
44
+ export declare function MetaAtlasSDK(props: MetaAtlasSDKProps): any;
45
+
46
+ export type MetaFeatureUiProperties = {
47
+ imageUrl?: string;
48
+ priceLabel?: string;
49
+ badgeLabel?: string;
50
+ address?: string;
51
+ hoursLabel?: string;
52
+ distanceLabel?: string;
53
+ subtitle?: string;
54
+ areaName?: string;
55
+ [key: string]: unknown;
56
+ };
57
+
58
+ export type metaFeature = {
59
+ mapObjectId?: string | number | null;
60
+ name?: string | null;
61
+ coordinates?: number[] | null;
62
+ whereDimension?: string | null;
63
+ whatDimension?: string | null;
64
+ geometry?: { type?: string; coordinates?: unknown };
65
+ properties?: MetaFeatureUiProperties & Record<string, unknown>;
66
+ };
67
+
68
+ export type MetaFeature = metaFeature;