wovvmap-webview-bridge 1.0.8 → 1.0.10

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 CHANGED
@@ -1,213 +1,210 @@
1
-
2
- # React Native WebView Bridge
3
-
4
- A tiny bridge layer to communicate between a React Native app (using `react-native-webview`) and a web page. It provides:
5
-
6
- - A ready-to-use `<WebViewScreen />` wrapper
7
- - A simple `sendToWeb(...)` API for posting messages to the webview
8
- - Typed event handling for messages coming **from** the web page
9
- - Lightweight in-app state storage (via `koshin`) to keep UI in sync with bridge events
10
-
11
- > **Demo idea:** Your message referenced a Snack example. You can adapt this package to the same flow as in your Snack: https://snack.expo.dev/@krushnkant/react-native-webview
12
-
13
- ---
14
-
15
- ## Installation
16
-
17
- ```bash
18
- # with npm
19
- npm i react-native-webview
20
-
21
- # or with yarn
22
- yarn add react-native-webview
23
-
24
- # or with pnpm
25
- pnpm add react-native-webview
26
- ```
27
-
28
- ---
29
-
30
- ## Quick Start
31
-
32
- 1) **Render the WebView and hook the bridge handler**
33
-
34
- ```tsx
35
- import React from "react";
36
- import { WebViewScreen } from "<your-package-name>";
37
- // If you want to register custom event callbacks:
38
- import { registerBridgeHandler } from "<your-package-name>";
39
-
40
- export default function App() {
41
- React.useEffect(() => {
42
- // Optional handlers for clicks coming from the web scene
43
- registerBridgeHandler("isSceneClick", (evt) => {
44
- console.log("Scene clicked:", evt);
45
- });
46
- registerBridgeHandler("isShapClick", (evt) => {
47
- console.log("Shape clicked:", evt.value);
48
- });
49
- }, []);
50
-
51
- return <WebViewScreen url={"https://your-web-app.example.com"} />;
52
- }
53
- ```
54
-
55
- Under the hood, `<WebViewScreen />` wires `onMessage` to the bridge message handler so any `postMessage(...)` coming from your web page is typed and routed correctly. fileciteturn1file6
56
-
57
- 2) **Send commands *to* the web app**
58
-
59
- ```ts
60
- import {
61
- sendActiveFloorToBridge,
62
- sendEndPointToBridge,
63
- sendPathFinishBtnClick,
64
- sendPathNextBtnClick,
65
- sendPathPreBtnClick,
66
- sendStartPointToBridge,
67
- } from "<your-package-name>";
68
-
69
- // examples:
70
- sendStartPointToBridge("node_123");
71
- sendEndPointToBridge("node_999");
72
- sendActiveFloorToBridge(2);
73
- sendPathNextBtnClick();
74
- sendPathPreBtnClick();
75
- sendPathFinishBtnClick();
76
- ```
77
-
78
- These helpers call the shared `sendToWeb(...)` which posts a JSON-serialized message to the underlying `WebView` instance. fileciteturn1file1 fileciteturn1file7
79
-
80
- 3) **Keep UI in sync with bridge state (optional)**
81
-
82
- ```ts
83
- import { bridgeStorage } from "<your-package-name>";
84
-
85
- bridgeStorage.subscribe((state) => {
86
- // state includes: isBridgeLoaded, isMapLoaded, searchablePoints, activeFloor, etc.
87
- console.log(state);
88
- });
89
- ```
90
-
91
- Internally this uses a small `koshin` store with fields like `isBridgeLoaded`, `isMapLoaded`, `searchablePoints`, `activeFloor`, `floorImages`, `stapByStapList`, and `nextPreState`. fileciteturn1file0
92
-
93
- ---
94
-
95
- ## What the Web Page Should Send
96
-
97
- Your web page (inside the WebView) should `postMessage(JSON.stringify(...))` with the following **Incoming** event shapes:
98
-
99
- ```ts
100
- type IncomingMessage =
101
- | { type: "event"; key: "isConnection"; value: boolean; file: string }
102
- | { type: "event"; key: "mapLoaded"; value: boolean; file: string }
103
- | { type: "event"; key: "_searchablePoints"; value: NodePoint[]; file: string }
104
- | { type: "event"; key: "Category"; value: Category[]; file: string }
105
- | { type: "event"; key: "_activeFloor"; value: number; file: string }
106
- | { type: "event"; key: "FloorImg"; value: FloorImage[]; file: string }
107
- | { type: "event"; key: "isSceneClick"; file: string }
108
- | { type: "event"; key: "isShapClick"; value: NodePoint; file: string }
109
- | { type: "event"; key: "stapByStapList"; value: StepInstruction[]; file: string }
110
- | { type: "event"; key: "pathNextPreState"; value: NavState; file: string };
111
- ```
112
- The built-in handler parses the message, updates store fields, and triggers any registered callbacks for `isSceneClick` / `isShapClick`. fileciteturn1file3 fileciteturn1file2
113
-
114
- ---
115
-
116
- ## What the App Sends to the Web Page
117
-
118
- Outgoing commands you can dispatch from React Native:
119
-
120
- ```ts
121
- type OutgoingMessage =
122
- | { type: "applyCSS"; selector: string; style: Partial<Record<string, string | number>> }
123
- | { type: "event"; key: "ping"; value: boolean; file: string }
124
- | { type: "event"; key: "setEndPoint"; value: string; file: string }
125
- | { type: "event"; key: "setStartPoint"; value: string; file: string }
126
- | { type: "event"; key: "setActiveFloor"; value: number; file: string }
127
- | { type: "event"; key: "pathNextBtnClick"; file: string }
128
- | { type: "event"; key: "pathPreBtnClick"; file: string }
129
- | { type: "event"; key: "pathFinishBtnClick"; file: string };
130
- ```
131
- These go through `sendToWeb(...)` which uses a shared `webviewRef` to `postMessage(...)`. fileciteturn1file7
132
-
133
- ---
134
-
135
- ## API Reference
136
-
137
- ### Components
138
-
139
- #### `<WebViewScreen />`
140
- A thin wrapper around `react-native-webview` that plugs in the bridge message handler.
141
-
142
- **Props**
143
- - `url: string` the URL to load inside the WebView.
144
-
145
- fileciteturn1file6
146
-
147
- ### Functions
148
-
149
- - `registerBridgeHandler(type, handler)` — Register a callback for `"isSceneClick"` or `"isShapClick"` events. fileciteturn1file3
150
- - `sendStartPointToBridge(pointId)` Ask web map to set the start point. fileciteturn1file1
151
- - `sendEndPointToBridge(pointId)` Ask web map to set the end point. fileciteturn1file1
152
- - `sendActiveFloorToBridge(floorIndex)` — Switch active floor on the web map. fileciteturn1file1
153
- - `sendPathNextBtnClick()` / `sendPathPreBtnClick()` / `sendPathFinishBtnClick()` — Control path stepper on the web map. fileciteturn1file1
154
- - `bridgeStorage` Reactive store with connection and navigation-related state. fileciteturn1file0
155
-
156
- ### Types (partial)
157
- - `NodePoint`, `Category`, `FloorImage`, `StepInstruction`, `NavState`, `IncomingMessage`, `OutgoingMessage` TypeScript contracts shared across the bridge. fileciteturn1file5
158
-
159
- ---
160
-
161
- ## Minimal Web Side (Example)
162
-
163
- Your web app should listen for messages and respond via `window.ReactNativeWebView.postMessage(...)`:
164
-
165
- ```js
166
- // inside the web page
167
- window.addEventListener("message", (e) => {
168
- try {
169
- const msg = JSON.parse(e.data);
170
- if (msg.type === "event" && msg.key === "setActiveFloor") {
171
- // do something in the web app
172
- console.log("Active floor requested:", msg.value);
173
- // notify RN app that web is connected
174
- window.ReactNativeWebView?.postMessage(JSON.stringify({
175
- type: "event",
176
- key: "isConnection",
177
- value: true,
178
- file: "web-app",
179
- }));
180
- }
181
- } catch {}
182
- });
183
- ```
184
-
185
- ---
186
-
187
- ## Project Structure (Library)
188
-
189
- ```
190
- src/
191
- ├─ index.ts # package exports fileciteturn1file4
192
- ├─ handlers/WebBridgeHandlers # incoming event router & registration fileciteturn1file3
193
- ├─ webviewBridge/WebViewBridgeRef.ts # shared ref + sendToWeb fileciteturn1file7
194
- ├─ webviewBridge/BridgeService.ts # convenience sending helpers fileciteturn1file1
195
- ├─ webviewBridge/BridgeStorage.ts # tiny state store (koshin) fileciteturn1file0
196
- ├─ webviewBridge/WebViewScreen.tsx # ready-to-use WebView wrapper fileciteturn1file6
197
- ├─ types/types.ts # shared TS contracts fileciteturn1file5
198
- ```
199
-
200
- ---
201
-
202
- ## Requirements
203
-
204
- - React Native
205
- - [`react-native-webview`](https://github.com/react-native-webview/react-native-webview)
206
- - [`koshin`](https://www.npmjs.com/package/koshin)
207
- - TypeScript recommended
208
-
209
- ---
210
-
211
- ## License
212
-
213
- MIT © Your Name
1
+ # React Native WebView Bridge
2
+
3
+ A lightweight and strongly typed bridge for **React Native + WebView** communication.
4
+ It provides an out-of-the-box `<WebViewScreen />`, helpers for sending events, a global store with Zustand, and strongly typed message contracts.
5
+
6
+ ---
7
+
8
+ ## Features
9
+
10
+ - 📱 **WebView wrapper**: `<WebViewScreen />` ready to use.
11
+ - 🔄 **Bridge service actions** for all map/direction operations.
12
+ - 🗂 **Typed handlers** for Web → React Native communication.
13
+ - 📦 **State management** using Zustand (`BridgeStorage`).
14
+ - 🧩 **TypeScript auto-imports** for events, node data, and navigation state.
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
21
+ npm install react-native-webview zustand
22
+ # or
23
+ yarn add react-native-webview zustand
24
+ ```
25
+
26
+ ---
27
+
28
+ ## 🚀 Usage
29
+
30
+ ### 1. Render the WebView
31
+
32
+ ```tsx
33
+ import React from "react";
34
+ import { WebViewScreen } from "your-bridge-package";
35
+
36
+ export default function App() {
37
+ return <WebViewScreen url="https://your-map-app-url.com" />;
38
+ }
39
+ ```
40
+
41
+ ---
42
+
43
+ ### 2. Sending Messages (React Native → Web)
44
+
45
+ All helper methods are provided via `BridgeService.ts`.
46
+ They wrap `sendToWeb(...)` and ensure correct **OutgoingMessage** format.
47
+
48
+ ```tsx
49
+ import {
50
+ sendStartPointToBridge,
51
+ sendEndPointToBridge,
52
+ sendActiveFloorToBridge,
53
+ sendPathNextBtnClick,
54
+ sendPathPreBtnClick,
55
+ sendPathFinishBtnClick,
56
+ sendSelectCategory,
57
+ sendZoomIn,
58
+ sendZoomOut,
59
+ sendClearStartAndEndPoint,
60
+ sendPathFilter,
61
+ sendGetDirectionToBridge,
62
+ } from "your-bridge-package";
63
+
64
+ // Example usage
65
+ sendStartPointToBridge("A1"); // Set start node
66
+ sendEndPointToBridge("B5"); // Set end node
67
+ sendActiveFloorToBridge(2); // Switch active floor
68
+ sendPathNextBtnClick(); // Go to next step in navigation
69
+ sendPathPreBtnClick(); // Go to previous step
70
+ sendPathFinishBtnClick(); // End navigation
71
+ sendSelectCategory("Food"); // Highlight category
72
+ sendZoomIn(); // Zoom in on map
73
+ sendZoomOut(); // Zoom out
74
+ sendClearStartAndEndPoint(); // Reset start/end
75
+ sendPathFilter(); // Apply path filters (lift/escalator)
76
+ sendGetDirectionToBridge(); // Request navigation directions
77
+ ```
78
+
79
+ ---
80
+
81
+ ### 3. Handling Messages (Web → React Native)
82
+
83
+ The bridge supports typed incoming messages.
84
+ You can register handlers for specific events using `registerBridgeHandler`.
85
+
86
+ ```tsx
87
+ import { registerBridgeHandler } from "your-bridge-package";
88
+
89
+ registerBridgeHandler("isSceneClick", (payload) => {
90
+ console.log("Scene clicked:", payload);
91
+ });
92
+
93
+ registerBridgeHandler("isShapClick", (payload) => {
94
+ console.log("Shape clicked:", payload.value);
95
+ });
96
+ ```
97
+
98
+ Internally, all other events are stored inside the **Zustand store**.
99
+
100
+ ---
101
+
102
+ ### 4. Accessing State
103
+
104
+ The `BridgeStorage` Zustand store automatically syncs WebView state.
105
+
106
+ ```tsx
107
+ import { bridgeStorage } from "your-bridge-package";
108
+
109
+ const state = bridgeStorage((s) => ({
110
+ isMapLoaded: s.isMapLoaded,
111
+ activeFloor: s.activeFloor,
112
+ searchablePoints: s.searchablePoints,
113
+ stapByStapList: s.stapByStapList,
114
+ }));
115
+
116
+ console.log(state);
117
+ ```
118
+
119
+ Available fields:
120
+ - `isBridgeLoaded`
121
+ - `isMapLoaded`
122
+ - `searchablePoints`
123
+ - `activeFloor`
124
+ - `elevator`, `escalator`
125
+ - `floorImages`
126
+ - `stapByStapList`
127
+ - `nextPreState`
128
+ - `pointsByKey`
129
+ - `categoryList`
130
+ - `allCategoryNodes`
131
+
132
+ ---
133
+
134
+ ## 🧩 Types
135
+
136
+ Types are exported for safer development and auto-import convenience.
137
+
138
+ ### `IncomingMessage` (Web → RN)
139
+ ```ts
140
+ type IncomingMessage =
141
+ | { type: "event"; key: "mapLoaded"; value: boolean; file: string }
142
+ | { type: "event"; key: "isConnection"; value: boolean; file: string }
143
+ | { type: "event"; key: "_searchablePoints"; value: NodePoint[]; file: string }
144
+ | { type: "event"; key: "Category"; value: Category[]; file: string }
145
+ | { type: "event"; key: "_allCategory"; value: Record<string, NodePoint[]>; file: string }
146
+ | { type: "event"; key: "_activeFloor"; value: number; file: string }
147
+ | { type: "event"; key: "FloorImg"; value: FloorImage[]; file: string }
148
+ | { type: "event"; key: "isSceneClick"; file: string }
149
+ | { type: "event"; key: "isShapClick"; value: NodePoint; file: string }
150
+ | { type: "event"; key: "stapByStapList"; value: StepInstruction[]; file: string }
151
+ | { type: "event"; key: "pathNextPreState"; value: NavState; file: string };
152
+ ```
153
+
154
+ ### `OutgoingMessage` (RN Web)
155
+ ```ts
156
+ type OutgoingMessage =
157
+ | { type: "event"; key: "setStartPoint"; value: string; file: string }
158
+ | { type: "event"; key: "setEndPoint"; value: string; file: string }
159
+ | { type: "event"; key: "setActiveFloor"; value: number; file: string }
160
+ | { type: "event"; key: "pathNextBtnClick"; file: string }
161
+ | { type: "event"; key: "pathPreBtnClick"; file: string }
162
+ | { type: "event"; key: "pathFinishBtnClick"; file: string }
163
+ | { type: "event"; key: "setSelectCatedory"; value: string | null; file: string }
164
+ | { type: "event"; key: "zoomIn"; file: string }
165
+ | { type: "event"; key: "zoomOut"; file: string }
166
+ | { type: "event"; key: "clearStartAndEndPoint"; file: string }
167
+ | { type: "event"; key: "setPathFilter"; value: filterPath; file: string }
168
+ | { type: "event"; key: "getDirection"; file: string }
169
+ | { type: "event"; key: "setMapTheme"; value: Theme | null; file: string }
170
+ | { type: "event"; key: "navigateTo"; value: string; file: string };
171
+ ```
172
+
173
+ ### `NodePoint`
174
+ Represents a searchable location on the map, with properties like `LocationName`, `Category`, `shape[]`, `logo`, etc.
175
+
176
+ ### `Category`
177
+ Represents a category with `name`, `Description`, and `color`.
178
+
179
+ ### `FloorImage`
180
+ Holds metadata about floors (name, url, index, etc).
181
+
182
+ ### `StepInstruction`
183
+ Represents a step in navigation (`instruction`, `distance`, `icon`).
184
+
185
+ ### `NavState`
186
+ Navigation state info (current floor index, step index, prev/next availability).
187
+
188
+ ---
189
+
190
+ ## 📖 File Structure
191
+
192
+ ```
193
+ src/
194
+ ├── index.ts # Entry exports
195
+ ├── webviewBridge/
196
+ │ ├── WebViewScreen.tsx # <WebView /> wrapper
197
+ │ ├── BridgeService.ts # Actions (sendToWeb wrappers)
198
+ │ ├── BridgeStorage.ts # Zustand store
199
+ │ ├── WebViewBridgeRef.ts # WebView ref manager
200
+ ├── handlers/
201
+ │ └── WebBridgeHandlers.ts
202
+ ├── types/
203
+ │ └── types.ts # Strongly typed contracts
204
+ ```
205
+
206
+ ---
207
+
208
+ ## 🛡 License
209
+
210
+ MIT © 2025
@@ -1 +1 @@
1
- {"version":3,"file":"WebBridgeHandlers.d.ts","sourceRoot":"","sources":["../../src/handlers/WebBridgeHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAmB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI5D,MAAM,MAAM,eAAe,GAAG;IAC7B,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1F,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,aAAa,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzG,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,eAAe,CAAM,CAAC;AAK1D,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,eAAe,EACnE,MAAM,CAAC,EACP,SAAS,eAAe,CAAC,CAAC,CAAC,SAG5B,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,mBAAmB,SA2B3B,CAAC"}
1
+ {"version":3,"file":"WebBridgeHandlers.d.ts","sourceRoot":"","sources":["../../src/handlers/WebBridgeHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAmB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI5D,MAAM,MAAM,eAAe,GAAG;IAC7B,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1F,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,aAAa,CAAC;QAAC,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzG,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,eAAe,CAAM,CAAC;AAK1D,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,eAAe,EACnE,MAAM,CAAC,EACP,SAAS,eAAe,CAAC,CAAC,CAAC,SAG5B,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,mBAAmB,SA8C3B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { bridgeStorage } from "../webviewBridge/BridgeStorage";
1
+ import { BridgeStorage } from "../webviewBridge/BridgeStorage";
2
2
  // ✅ 2. Global handler storage
3
3
  export const eventHandlers = {};
4
4
  // ✅ 4. Register handler function
@@ -7,27 +7,42 @@ export const registerBridgeHandler = (type, handler) => {
7
7
  };
8
8
  // ✅ 5. Main bridge handler
9
9
  export const handleBridgeMessage = (event) => {
10
- var _a, _b;
11
10
  try {
12
11
  const message = JSON.parse(event.nativeEvent.data);
12
+ const state = BridgeStorage.getState();
13
13
  if (message.key === "mapLoaded")
14
- bridgeStorage.set("isMapLoaded", message.value);
14
+ state.setIsMapLoaded(message.value);
15
15
  if (message.key === "isConnection")
16
- bridgeStorage.set("isBridgeLoaded", message.value);
17
- if (message.key === "_searchablePoints")
18
- bridgeStorage.set("searchablePoints", message.value);
16
+ state.setIsBridgeLoaded(message.value);
17
+ if (message.key === "_searchablePoints") {
18
+ const points = [...message.value];
19
+ points.sort((a, b) => {
20
+ var _a, _b, _c, _d;
21
+ const nameA = ((_b = (_a = a.LocationName) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.trim().toLowerCase()) || "";
22
+ const nameB = ((_d = (_c = b.LocationName) === null || _c === void 0 ? void 0 : _c.text) === null || _d === void 0 ? void 0 : _d.trim().toLowerCase()) || "";
23
+ return nameA.localeCompare(nameB);
24
+ });
25
+ state.setSearchablePoints(points);
26
+ const map = new Map();
27
+ message.value.forEach(obj => {
28
+ if (obj.key) {
29
+ map.set(obj.key, obj);
30
+ }
31
+ });
32
+ state.setPointsByKey(map);
33
+ }
19
34
  if (message.key === "_activeFloor")
20
- bridgeStorage.set("activeFloor", message.value);
35
+ state.setActiveFloor(message.value);
21
36
  if (message.key === "FloorImg")
22
- bridgeStorage.set("floorImages", message.value);
23
- if (message.key === "isSceneClick")
24
- (_a = eventHandlers[message.key]) === null || _a === void 0 ? void 0 : _a.call(eventHandlers, message);
25
- if (message.key === "isShapClick")
26
- (_b = eventHandlers[message.key]) === null || _b === void 0 ? void 0 : _b.call(eventHandlers, message);
37
+ state.setFloorImages(message.value);
27
38
  if (message.key === "stapByStapList")
28
- bridgeStorage.set("stapByStapList", message.value);
39
+ state.setStapByStapList(message.value);
29
40
  if (message.key === "pathNextPreState")
30
- bridgeStorage.set("nextPreState", message.value);
41
+ state.setNextPreState(message.value);
42
+ if (message.key === "Category")
43
+ state.setCategoryList(message.value);
44
+ if (message.key === "_allCategory")
45
+ state.setAllCategoryNodes(message.value);
31
46
  }
32
47
  catch (e) {
33
48
  console.error("WebView message error:", e);
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { WebViewScreen } from "./webviewBridge/WebViewScreen";
2
2
  export { sendStartPointToBridge, sendEndPointToBridge, sendActiveFloorToBridge, sendPathNextBtnClick, sendPathPreBtnClick, sendPathFinishBtnClick, } from "./webviewBridge/BridgeService";
3
- export { bridgeStorage } from "./webviewBridge/BridgeStorage";
3
+ export { BridgeStorage } from "./webviewBridge/BridgeStorage";
4
4
  export { registerBridgeHandler } from "./handlers/WebBridgeHandlers";
5
5
  export type { IncomingMessage, OutgoingMessage, NodePoint, Category, FloorImage, StepInstruction, NavState, } from "./types/types";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,YAAY,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,GACT,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAGvC,OAAQ,EAAC,aAAa,EAAC,MAAO,+BAA+B,CAAC;AAG9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,YAAY,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,GACT,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,6 @@ export { WebViewScreen } from "./webviewBridge/WebViewScreen";
3
3
  // Bridge helpers (named exports)
4
4
  export { sendStartPointToBridge, sendEndPointToBridge, sendActiveFloorToBridge, sendPathNextBtnClick, sendPathPreBtnClick, sendPathFinishBtnClick, } from "./webviewBridge/BridgeService";
5
5
  // State/store
6
- export { bridgeStorage } from "./webviewBridge/BridgeStorage";
6
+ export { BridgeStorage } from "./webviewBridge/BridgeStorage";
7
7
  // Handlers
8
8
  export { registerBridgeHandler } from "./handlers/WebBridgeHandlers";
@@ -0,0 +1,102 @@
1
+ import { SerializableNodePoint as NodePoint, SerializablePoint2D as Point2D } from "./NodePoint";
2
+ import { PathFindingResult } from "./PathFindingResult";
3
+ export interface NodePointOuterFiled {
4
+ point: NodePoint;
5
+ name: string;
6
+ x: number;
7
+ y: number;
8
+ z: number;
9
+ }
10
+ export interface Point3D extends Point2D {
11
+ z: number;
12
+ }
13
+ export interface NodeLineOuterFiled {
14
+ a: Point3D;
15
+ b: Point3D;
16
+ distance: number;
17
+ pointA: NodePoint;
18
+ pointB: NodePoint;
19
+ }
20
+ export type BridgeMessage = {
21
+ type: "event";
22
+ key: "floor";
23
+ value: number;
24
+ } | {
25
+ type: "event";
26
+ key: "pathData";
27
+ value: NodePoint[];
28
+ } | {
29
+ type: "event";
30
+ key: "PathFindingResult";
31
+ value: PathFindingResult;
32
+ } | {
33
+ type: "event";
34
+ key: "searchTextResult";
35
+ value: NodePoint[];
36
+ } | {
37
+ type: "event";
38
+ key: "shapeZoomAndSelect";
39
+ value: NodePoint | undefined;
40
+ } | {
41
+ type: "event";
42
+ key: "searchablePoints";
43
+ value: NodePoint[];
44
+ } | {
45
+ type: "event";
46
+ key: "nodePoint";
47
+ value: {
48
+ [key: string]: NodePointOuterFiled;
49
+ };
50
+ } | {
51
+ type: "event";
52
+ key: "nodeline";
53
+ value: {
54
+ [key: string]: NodeLineOuterFiled;
55
+ };
56
+ } | {
57
+ type: "event";
58
+ key: "categoryList";
59
+ value: {
60
+ [key: string]: NodePoint;
61
+ };
62
+ } | {
63
+ type: "event";
64
+ key: "floorInfo";
65
+ value: {
66
+ floors: {
67
+ index: number;
68
+ shortName: string;
69
+ fullName: string;
70
+ floorNumber: number;
71
+ }[];
72
+ defaultFloorIndex: number;
73
+ };
74
+ } | {
75
+ type: "event";
76
+ key: "to";
77
+ value: string;
78
+ } | {
79
+ type: "event";
80
+ key: "from";
81
+ value: string;
82
+ } | {
83
+ type: "event";
84
+ key: "elevator";
85
+ value: "true" | "false";
86
+ } | {
87
+ type: "event";
88
+ key: "escalator";
89
+ value: "true" | "false";
90
+ };
91
+ export type SendToWebMessage = {
92
+ type: "setNavigationData";
93
+ payload: {
94
+ from?: string;
95
+ to?: string;
96
+ elevator?: boolean;
97
+ escalator?: boolean;
98
+ floor?: number;
99
+ };
100
+ } | {
101
+ type: "condtiotion";
102
+ };
@@ -0,0 +1,2 @@
1
+ // Shared types
2
+ export {};
@@ -0,0 +1,36 @@
1
+ export type NavigationInstruction = "left" | "right" | "startPoint" | "endPoint" | "Take Elevator" | "Take Escalator" | "Exit Elevator" | "Exit Escalator" | null;
2
+ export type SerializablePoint2D = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export type SerializableNodePoint = {
7
+ x?: number;
8
+ y?: number;
9
+ z?: number;
10
+ targetDist?: number;
11
+ close?: boolean;
12
+ elementTag?: string;
13
+ type?: string;
14
+ LeaseType?: string;
15
+ Category?: string;
16
+ color?: string;
17
+ Description?: string;
18
+ shape?: SerializablePoint2D[];
19
+ key?: string;
20
+ myAngle?: number;
21
+ NavigationInstruction?: NavigationInstruction;
22
+ distanceToNextPoint: number;
23
+ stepsToNextPoint: number;
24
+ floorBash?: boolean;
25
+ brand_Id?: string | null;
26
+ LocationName?: {
27
+ text?: string;
28
+ textColor?: string;
29
+ textSize?: string;
30
+ rotate?: number;
31
+ };
32
+ colleague?: {
33
+ name: string;
34
+ role?: string;
35
+ }[];
36
+ };
@@ -0,0 +1,2 @@
1
+ // src/types/NodePoint.ts
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import { SerializableNodePoint } from "./NodePoint";
2
+ export type PathFindingResult = {
3
+ path: SerializableNodePoint[];
4
+ totalCost: number;
5
+ floor: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ // src/types/PathFindingResult.ts
2
+ export {};
@@ -85,6 +85,20 @@ export type NavState = {
85
85
  isLastStep: boolean;
86
86
  hasPath: boolean;
87
87
  };
88
+ export type filterPath = {
89
+ elevator: boolean;
90
+ escalator: boolean;
91
+ stair: boolean;
92
+ };
93
+ export type Theme = {
94
+ "theme-path-color"?: string;
95
+ "theme-path-highlight-color"?: string;
96
+ "theme-anchor-store-color"?: string[];
97
+ "theme-platform-color"?: string;
98
+ "theme-endpoint-shape-color"?: string[];
99
+ "theme-startpoint-shape-color"?: string[];
100
+ "theme-shape-theme-color"?: string[];
101
+ };
88
102
  export type IncomingMessage = {
89
103
  type: "event";
90
104
  key: "pong";
@@ -109,6 +123,11 @@ export type IncomingMessage = {
109
123
  key: "Category";
110
124
  value: Category[];
111
125
  file: string;
126
+ } | {
127
+ type: "event";
128
+ key: "_allCategory";
129
+ value: Record<string, NodePoint[]>;
130
+ file: string;
112
131
  } | {
113
132
  type: "event";
114
133
  key: "_activeFloor";
@@ -142,7 +161,7 @@ export type IncomingMessage = {
142
161
  export type OutgoingMessage = {
143
162
  type: "applyCSS";
144
163
  selector: string;
145
- style: Partial<Record<string, string | number>>;
164
+ style: Partial<CSSStyleDeclaration>;
146
165
  } | {
147
166
  type: "event";
148
167
  key: "ping";
@@ -175,5 +194,41 @@ export type OutgoingMessage = {
175
194
  type: "event";
176
195
  key: "pathFinishBtnClick";
177
196
  file: string;
197
+ } | {
198
+ type: "event";
199
+ key: "setSelectCatedory";
200
+ value: string | null;
201
+ file: string;
202
+ } | {
203
+ type: "event";
204
+ key: "zoomIn";
205
+ file: string;
206
+ } | {
207
+ type: "event";
208
+ key: "zoomOut";
209
+ file: string;
210
+ } | {
211
+ type: "event";
212
+ key: "clearStartAndEndPoint";
213
+ file: string;
214
+ } | {
215
+ type: "event";
216
+ key: "setPathFilter";
217
+ value: filterPath;
218
+ file: string;
219
+ } | {
220
+ type: "event";
221
+ key: "getDirection";
222
+ file: string;
223
+ } | {
224
+ type: "event";
225
+ key: "setMapTheme";
226
+ file: string;
227
+ value: Theme | null;
228
+ } | {
229
+ type: "event";
230
+ key: "navigateTo";
231
+ value: string;
232
+ file: string;
178
233
  };
179
234
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,UAAU,EAAE,M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AO,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,uBAAuB,CAAC;IAAG,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,eAAe,CAAC;IAAC,KAAK,EAAC,UAAU,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GACxE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,cAAc,CAAC;IAAG,IAAI,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,aAAa,CAAC;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -4,4 +4,10 @@ export declare const sendActiveFloorToBridge: (floorId: number) => void;
4
4
  export declare const sendPathNextBtnClick: () => void;
5
5
  export declare const sendPathPreBtnClick: () => void;
6
6
  export declare const sendPathFinishBtnClick: () => void;
7
+ export declare const sendSelectCategory: (categgory: string | null) => void;
8
+ export declare const sendZoomIn: () => void;
9
+ export declare const sendZoomOut: () => void;
10
+ export declare const sendClearStartAndEndPoint: () => void;
11
+ export declare const sendPathFilter: () => void;
12
+ export declare const sendGetDirectionToBridge: () => void;
7
13
  //# sourceMappingURL=BridgeService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeService.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/BridgeService.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,GAAK,YAAW,MAAM,SAEtD,CAAA;AAGD,eAAO,MAAM,sBAAsB,GAAK,cAAa,MAAM,SAE1D,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,SAAQ,MAAM,SAErD,CAAA;AAED,eAAO,MAAM,oBAAoB,YAEhC,CAAA;AACD,eAAO,MAAM,mBAAmB,YAE/B,CAAA;AAED,eAAO,MAAM,sBAAsB,YAElC,CAAA"}
1
+ {"version":3,"file":"BridgeService.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/BridgeService.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,YAAY,MAAM,SAEtD,CAAA;AAGD,eAAO,MAAM,sBAAsB,GAAI,cAAc,MAAM,SAE1D,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,SAEtD,CAAA;AAED,eAAO,MAAM,oBAAoB,YAEhC,CAAA;AACD,eAAO,MAAM,mBAAmB,YAE/B,CAAA;AAED,eAAO,MAAM,sBAAsB,YAElC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,GAAG,IAAI,SAE1D,CAAA;AAGD,eAAO,MAAM,UAAU,YAEtB,CAAA;AAED,eAAO,MAAM,WAAW,YAEvB,CAAA;AAED,eAAO,MAAM,yBAAyB,YAErC,CAAA;AAED,eAAO,MAAM,cAAc,YAG1B,CAAA;AAGD,eAAO,MAAM,wBAAwB,YAEpC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { BridgeStorage } from "./BridgeStorage";
1
2
  import { sendToWeb } from "./WebViewBridgeRef";
2
3
  export const sendEndPointToBridge = (endPointId) => {
3
4
  sendToWeb({ type: "event", key: "setEndPoint", value: endPointId, file: "BridgeService.ts" });
@@ -17,3 +18,22 @@ export const sendPathPreBtnClick = () => {
17
18
  export const sendPathFinishBtnClick = () => {
18
19
  sendToWeb({ type: "event", key: "pathFinishBtnClick", file: "BridgeService.ts" });
19
20
  };
21
+ export const sendSelectCategory = (categgory) => {
22
+ sendToWeb({ type: "event", key: "setSelectCatedory", value: categgory, file: "BridgeService.ts" });
23
+ };
24
+ export const sendZoomIn = () => {
25
+ sendToWeb({ type: "event", key: "zoomIn", file: "BridgeService.ts" });
26
+ };
27
+ export const sendZoomOut = () => {
28
+ sendToWeb({ type: "event", key: "zoomOut", file: "BridgeService.ts" });
29
+ };
30
+ export const sendClearStartAndEndPoint = () => {
31
+ sendToWeb({ type: "event", key: "clearStartAndEndPoint", file: "BridgeService.ts" });
32
+ };
33
+ export const sendPathFilter = () => {
34
+ const { elevator, escalator } = BridgeStorage.getState();
35
+ sendToWeb({ type: "event", key: "setPathFilter", value: { elevator: elevator === "true", escalator: escalator === "true", stair: false }, file: "BridgeService.ts" });
36
+ };
37
+ export const sendGetDirectionToBridge = () => {
38
+ sendToWeb({ type: "event", key: "getDirection", file: "BridgeService.ts" });
39
+ };
@@ -1,4 +1,4 @@
1
- import type { FloorImage, NavState, NodePoint, StepInstruction } from "../types/types";
1
+ import type { Category, FloorImage, NavState, NodePoint, StepInstruction } from "../types/types";
2
2
  type BridgeStorage = {
3
3
  isBridgeLoaded: boolean;
4
4
  isMapLoaded: boolean;
@@ -9,11 +9,22 @@ type BridgeStorage = {
9
9
  floorImages: FloorImage[];
10
10
  stapByStapList: StepInstruction[];
11
11
  nextPreState: NavState | null;
12
+ pointsByKey: Map<string, NodePoint>;
13
+ categoryList: Category[];
14
+ allCategoryNodes: Record<string, NodePoint[]>;
15
+ setIsBridgeLoaded: (val: boolean) => void;
16
+ setIsMapLoaded: (val: boolean) => void;
17
+ setSearchablePoints: (points: NodePoint[]) => void;
18
+ setActiveFloor: (floor: number) => void;
19
+ setElevator: (val: "true" | "false") => void;
20
+ setEscalator: (val: "true" | "false") => void;
21
+ setFloorImages: (imgs: FloorImage[]) => void;
22
+ setStapByStapList: (steps: StepInstruction[]) => void;
23
+ setNextPreState: (state: NavState | null) => void;
24
+ setPointsByKey: (map: Map<string, NodePoint>) => void;
25
+ setCategoryList: (list: Category[]) => void;
26
+ setAllCategoryNodes: (data: Record<string, NodePoint[]>) => void;
12
27
  };
13
- export declare let bridgeStorage: BridgeStorage & {
14
- set<K extends keyof BridgeStorage>(key: K, value: BridgeStorage[K]): void;
15
- onChange(callback: <K extends keyof BridgeStorage>(key: K, newValue: BridgeStorage[K], oldValue: BridgeStorage[K]) => void): () => void;
16
- signal<K extends keyof BridgeStorage>(key: K): [BridgeStorage[K], (value: BridgeStorage[K]) => void];
17
- };
28
+ export declare const BridgeStorage: import("zustand").UseBoundStore<import("zustand").StoreApi<BridgeStorage>>;
18
29
  export {};
19
30
  //# sourceMappingURL=BridgeStorage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeStorage.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/BridgeStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGvF,KAAK,aAAa,GAAG;IACjB,cAAc,EAAG,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAC;IAC9B,WAAW,EAAG,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,cAAc,EAAG,eAAe,EAAE,CAAC;IACnC,YAAY,EAAG,QAAQ,GAAG,IAAI,CAAA;CACjC,CAAA;AAGD,eAAO,IAAI,aAAa;;;;CAUtB,CAAA"}
1
+ {"version":3,"file":"BridgeStorage.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/BridgeStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,e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CAAC,KAAK,IAAI,CAAA;IACrD,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAA;IAC3C,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,CAAA;CACjE,CAAA;AAED,eAAO,MAAM,aAAa,4EA0BvB,CAAA"}
@@ -1,5 +1,5 @@
1
- import { createStore } from "koshin";
2
- export let bridgeStorage = createStore({
1
+ import { create } from 'zustand';
2
+ export const BridgeStorage = create((set) => ({
3
3
  isBridgeLoaded: false,
4
4
  isMapLoaded: false,
5
5
  searchablePoints: [],
@@ -8,5 +8,20 @@ export let bridgeStorage = createStore({
8
8
  escalator: "false",
9
9
  floorImages: [],
10
10
  stapByStapList: [],
11
- nextPreState: null
12
- });
11
+ nextPreState: null,
12
+ pointsByKey: new Map(),
13
+ categoryList: [],
14
+ allCategoryNodes: {},
15
+ setIsBridgeLoaded: (val) => set({ isBridgeLoaded: val }),
16
+ setIsMapLoaded: (val) => set({ isMapLoaded: val }),
17
+ setSearchablePoints: (points) => set({ searchablePoints: points }),
18
+ setActiveFloor: (floor) => set({ activeFloor: floor }),
19
+ setElevator: (val) => set({ elevator: val }),
20
+ setEscalator: (val) => set({ escalator: val }),
21
+ setFloorImages: (imgs) => set({ floorImages: imgs }),
22
+ setStapByStapList: (steps) => set({ stapByStapList: steps }),
23
+ setNextPreState: (state) => set({ nextPreState: state }),
24
+ setPointsByKey: (map) => set({ pointsByKey: map }),
25
+ setCategoryList: (list) => set({ categoryList: list }),
26
+ setAllCategoryNodes: (data) => set({ allCategoryNodes: data }),
27
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"WebViewScreen.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/WebViewScreen.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,SAAS,KAAK,4CAwB3C,CAAC"}
1
+ {"version":3,"file":"WebViewScreen.d.ts","sourceRoot":"","sources":["../../src/webviewBridge/WebViewScreen.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,SAAS,KAAK,4CAuB3C,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { handleBridgeMessage } from "../handlers/WebBridgeHandlers";
3
- import { webviewRef } from "./WebViewBridgeRef";
4
3
  import { WebView } from 'react-native-webview';
5
4
  export const WebViewScreen = ({ url }) => {
6
5
  const onMessage = (event) => {
7
6
  console.log("on message event", event);
8
7
  handleBridgeMessage(event);
9
8
  };
10
- return (_jsx(WebView, { ref: webviewRef, source: { uri: url }, onMessage: onMessage, onLoadStart: () => console.log("WebView: load start", url), onLoadEnd: () => console.log("WebView: load end"), onLoadProgress: ({ nativeEvent }) => console.log("WebView: progress", nativeEvent.progress), onError: (e) => console.warn("WebView error:", e.nativeEvent), style: { flex: 1, width: "100%" } }));
9
+ return (_jsx(WebView, { source: { uri: url }, onMessage: onMessage, onLoadStart: () => console.log("WebView: load start", url), onLoadEnd: () => console.log("WebView: load end"), onLoadProgress: ({ nativeEvent }) => console.log("WebView: progress", nativeEvent.progress), onError: (e) => console.warn("WebView error:", e.nativeEvent), style: { flex: 1 } }));
11
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wovvmap-webview-bridge",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -9,19 +9,19 @@
9
9
  "default": "./dist/index.js"
10
10
  }
11
11
  },
12
- "files": ["dist"],
12
+ "files": [
13
+ "dist"
14
+ ],
13
15
  "sideEffects": false,
14
16
  "scripts": {
15
- "build": "tsc -p tsconfig.json"
17
+ "build": "tsc -p tsconfig.json"
16
18
  },
17
19
  "peerDependencies": {
18
- "react": "^19.1.0",
19
- "react-native": "^0.80.1",
20
20
  "react-native-webview": "^13.15.0",
21
- "koshin": "^1.0.5"
21
+ "zustand": "^5.0.8"
22
22
  },
23
23
  "devDependencies": {
24
- "typescript": "^5.5.0",
25
- "@types/react": "^19.1.8"
24
+ "@types/react": "^19.1.8",
25
+ "typescript": "^5.5.0"
26
26
  }
27
27
  }