@mappedin/viewer 0.2.0 → 0.4.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/CHANGELOG.md +21 -0
- package/README.md +54 -18
- package/dist/{browser-35S22BS6-60f2b2c3.js → browser-35S22BS6-9f6302af.js} +1 -1
- package/dist/{index-7278efbe.js → index-b7a15c36.js} +44283 -41013
- package/dist/index.js +1 -1
- package/dist/{outdoor-context-XG4VPE4D-26915a8c.js → outdoor-context-XG4VPE4D-15580f83.js} +1 -1
- package/dist/types/src/components/connection-marker/index.d.ts +1 -2
- package/dist/types/src/components/map-controls/index.d.ts +2 -0
- package/dist/types/src/components/open-app-button/index.d.ts +6 -0
- package/dist/types/src/components/open-app-button/open-app-button.stories.d.ts +2 -0
- package/dist/types/src/components/positioner/index.d.ts +1 -1
- package/dist/types/src/components/tilt-controls/utils.d.ts +1 -1
- package/dist/types/src/components/title/index.d.ts +1 -0
- package/dist/types/src/lib/hooks/use-window.d.ts +5 -0
- package/dist/types/src/lib/types/options.d.ts +1 -0
- package/dist/types/src/lib/types/theme.d.ts +6 -0
- package/dist/types/src/states/desktop.d.ts +5 -0
- package/dist/types/src/states/mobile.d.ts +5 -0
- package/dist/types/src/stores/analytics-store/analytics-store.test.d.ts +1 -0
- package/dist/types/src/stores/analytics-store/index.d.ts +9 -0
- package/dist/types/src/stores/root-store/index.d.ts +9 -1
- package/dist/types/src/stores/router-store/index.d.ts +5 -1
- package/dist/types/src/stores/ui-store/index.d.ts +9 -0
- package/dist/types/src/theme.d.ts +1 -0
- package/package.json +5 -3
- package/dist/types/src/states/global.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0](https://github.com/MappedIn/viewer/compare/viewer-v0.3.0...viewer-v0.4.0) (2023-09-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **MKR-299:** mobile MVP ([3bbdf45](https://github.com/MappedIn/viewer/commit/3bbdf4585b858b8e6cce843eb826093633d3d8f0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **MKR-299:** mobile tweaks ([64d1ed4](https://github.com/MappedIn/viewer/commit/64d1ed444af64acc3f609efa804e75a6327c9481))
|
|
14
|
+
* **MKR-299:** reenable zoom controls on desktop ([6d20da5](https://github.com/MappedIn/viewer/commit/6d20da581fd0e8ce063d46fee82d454023fec0d1))
|
|
15
|
+
* **MKR-304:** persist venue ID in url ([#19](https://github.com/MappedIn/viewer/issues/19)) ([fda1725](https://github.com/MappedIn/viewer/commit/fda17256876e38ab827b14cc674c4dd17b78dcf7))
|
|
16
|
+
|
|
17
|
+
## [0.3.0](https://github.com/MappedIn/viewer/compare/viewer-v0.2.0...viewer-v0.3.0) (2023-09-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **MKR-259:** embedded mode for the viewer ([#16](https://github.com/MappedIn/viewer/issues/16)) ([bc75439](https://github.com/MappedIn/viewer/commit/bc75439b5d0096ed028e48c33589186cf63e7b07))
|
|
23
|
+
|
|
3
24
|
## [0.2.0](https://github.com/MappedIn/viewer/compare/viewer-v0.1.0...viewer-v0.2.0) (2023-09-07)
|
|
4
25
|
|
|
5
26
|
|
package/README.md
CHANGED
|
@@ -1,27 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mappedin Viewer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A lightweight indoor map application with first class support for maps made in [Mappedin Maker](https://maker.mappedin.com/editor).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Getting Started
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
7
|
+
### HTML
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Add a `<div>` element to your website with the id `#viewer-app-root`. The map will be rendered into this element.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
```html
|
|
12
|
+
<body>
|
|
13
|
+
<div id="viewer-app-root"></div>
|
|
14
|
+
</body>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then, add the following snippet somewhere in your website.
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script type="module">
|
|
21
|
+
import start from 'https://cdn.jsdelivr.net/npm/@mappedin/viewer@latest/dist/index.js';
|
|
22
|
+
start();
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Package Manager
|
|
27
|
+
|
|
28
|
+
Install the package with the package manager of your choice.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
# npm
|
|
32
|
+
npm install @mappedin/viewer
|
|
33
|
+
|
|
34
|
+
# yarn
|
|
35
|
+
yarn add @mappedin/viewer
|
|
13
36
|
|
|
14
|
-
|
|
37
|
+
#pnpm
|
|
38
|
+
pnpm i @mappedin/viewer
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Pointing at a public Mappedin Maker venue
|
|
42
|
+
|
|
43
|
+
Import and run the default `start` method. The ID of the Maker Venue will be parsed from the URL.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import start from '@mappedin/viewer';
|
|
15
47
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
48
|
+
start({
|
|
49
|
+
root: document.getElementById('my-element')!,
|
|
50
|
+
});
|
|
23
51
|
```
|
|
24
52
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
#### Pointing at local MVF
|
|
54
|
+
|
|
55
|
+
Import and run the `startWithLocalData` method.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { startWithLocalData } from '@mappedin/viewer';
|
|
59
|
+
|
|
60
|
+
startWithLocalData({
|
|
61
|
+
data: myParsedMVF,
|
|
62
|
+
});
|
|
63
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as wr } from "./index-
|
|
1
|
+
import { c as wr } from "./index-b7a15c36.js";
|
|
2
2
|
wr();
|
|
3
3
|
var s = Uint8Array, C = Uint16Array, nr = Uint32Array, fr = new s([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), ir = new s([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), hr = new s([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), ur = function(r, a) {
|
|
4
4
|
for (var e = new C(31), o = 0; o < 31; ++o)
|