@wovvmap/host-protocol 1.2.0 → 1.2.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 (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @wovvmap/host-protocol
2
+
3
+ ## Package reference and installation
4
+
5
+ Versioned iframe, WebView, and native host protocol for WovVMap.
6
+
7
+ [Published package](https://www.npmjs.com/package/@wovvmap/host-protocol) · [Integration guide](https://sdk-doc.wovvtech.com/docs/architecture/overview) · [Public API reference](https://sdk-doc.wovvtech.com/api/host-protocol/index.html)
8
+
9
+ Install version `1.2.0` in your application with one package manager.
10
+
11
+ ```sh
12
+ npm install @wovvmap/host-protocol
13
+ # or
14
+ yarn add @wovvmap/host-protocol
15
+ # or
16
+ pnpm add @wovvmap/host-protocol
17
+ ```
18
+
19
+ This release declares no peer dependencies.
20
+
21
+ ## Round-trip a host command
22
+
23
+ Use the helper in a custom transport. The public React and Native viewers handle these messages for an ordinary app.
24
+
25
+ ```ts
26
+ import {
27
+ createCommandEnvelope,
28
+ serializeEnvelope,
29
+ deserializeEnvelope,
30
+ } from '@wovvmap/host-protocol'
31
+
32
+ const request = createCommandEnvelope('setFloor', [0, false])
33
+ const received = deserializeEnvelope(serializeEnvelope(request))
34
+ console.log(received?.action) // setFloor
35
+ ```
36
+
37
+ Repository: [WovVMap platform](https://git.wovvtech.com/Wovvtech/wovvmap-platform). Package license field: `UNLICENSED`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wovvmap/host-protocol",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Versioned iframe, WebView, and native host protocol for WovVMap.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@wovvmap/contracts": "1.2.0"
26
+ "@wovvmap/contracts": "1.2.1"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsc -p tsconfig.build.json",