@focusbc/bbs-lib 0.0.3 → 0.0.5
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 +18 -3
- package/dist/browser/bbs-lib.js +78977 -0
- package/dist/browser/bbs-lib.js.map +7 -0
- package/dist/overlay/map-overlay.d.ts +10 -2
- package/dist/overlay/map-overlay.d.ts.map +1 -1
- package/dist/overlay/map-overlay.js +42 -1
- package/dist/overlay/map-overlay.js.map +1 -1
- package/dist/types/events.d.ts +4 -1
- package/dist/types/events.d.ts.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -37,6 +37,18 @@ const context: MapContext = {
|
|
|
37
37
|
|
|
38
38
|
const overlay = MapOverlay.initialize(document.getElementById('map-overlay')!, context)
|
|
39
39
|
|
|
40
|
+
overlay.click().subscribe(({ shape, lat, lng }) => {
|
|
41
|
+
console.log('left click', { shape, lat, lng })
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
overlay.doubleClick().subscribe(({ shape, lat, lng }) => {
|
|
45
|
+
console.log('double click', { shape, lat, lng })
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
overlay.rightClick().subscribe(({ shape, lat, lng }) => {
|
|
49
|
+
console.log('right click', { shape, lat, lng })
|
|
50
|
+
})
|
|
51
|
+
|
|
40
52
|
// Later, when the event/site changes:
|
|
41
53
|
overlay.setContext(newContext)
|
|
42
54
|
```
|
|
@@ -93,7 +105,7 @@ Open `http://localhost:5173`, select an event, then a site. The overlay calls `M
|
|
|
93
105
|
|
|
94
106
|
## Client demo
|
|
95
107
|
|
|
96
|
-
The client-facing reference implementation lives in [`demo/`](demo/). It
|
|
108
|
+
The client-facing reference implementation lives in [`demo/`](demo/). It is a static site (`index.html` + `main.js`) with no build step. See [`demo/README.md`](demo/README.md).
|
|
97
109
|
|
|
98
110
|
From this directory:
|
|
99
111
|
|
|
@@ -107,6 +119,8 @@ Or from the repository root:
|
|
|
107
119
|
yarn bbs-demo:serve
|
|
108
120
|
```
|
|
109
121
|
|
|
122
|
+
To run the demo folder on its own, serve it statically — for example `npx --yes serve . -p 5174` from `demo/`.
|
|
123
|
+
|
|
110
124
|
---
|
|
111
125
|
|
|
112
126
|
## Releasing the library
|
|
@@ -148,7 +162,8 @@ When you run `yarn release:lib`, the script:
|
|
|
148
162
|
2. Bumps `package.json` using `npm version <patch|minor|major> --no-git-tag-version`.
|
|
149
163
|
3. Builds the package with `npm run build`.
|
|
150
164
|
4. Publishes the package to `https://registry.npmjs.org/` with `npm publish --access public`.
|
|
151
|
-
5.
|
|
152
|
-
6.
|
|
165
|
+
5. Uploads `dist/browser/bbs-lib.js` to Cloud Storage at `gs://bbs-lib-bucket/bbs-lib` (override with `BBS_LIB_BUCKET_URI` or `BBS_LIB_BUCKET`).
|
|
166
|
+
6. Re-encrypts the temporary `.npmrc` back into `.npmrc.enc`.
|
|
167
|
+
7. Removes the plaintext `.npmrc` from disk.
|
|
153
168
|
|
|
154
169
|
If the release fails after the version bump, review `package.json` before retrying because the version may already have been changed locally.
|