@minmaps-dev/mm-web-sdk 1.0.0-rc.4 → 1.0.0-rc.40
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 +23 -15
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1873 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +307 -3
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +35 -17
- package/src/themes/alt3-hybrid-style.json +2074 -812
- package/src/themes/high-contrast-style.json +0 -383
package/README.md
CHANGED
|
@@ -35,15 +35,19 @@ await sdk.init()
|
|
|
35
35
|
|
|
36
36
|
## Status
|
|
37
37
|
|
|
38
|
-
This SDK is on a pre-1.0 release candidate (`1.0.0-rc.
|
|
38
|
+
This SDK is on a pre-1.0 release candidate (`1.0.0-rc.24`). A few capabilities remain **dormant pending backend support** — they are not yet functional in the published build:
|
|
39
39
|
|
|
40
40
|
| Area | Status | Notes |
|
|
41
41
|
| --- | --- | --- |
|
|
42
42
|
| Floors, POIs, amenities, destinations | ✅ Shipped | Loads via JACS `building/full` + `venue/full`. |
|
|
43
43
|
| Camera + view modes (3D/2D/flat) | ✅ Shipped | Style toggles work against the bundled `alt3-hybrid-style.json`. |
|
|
44
|
+
| Wayfinding | ✅ Shipped | Built-in JACS path-graph routing (rc.18). `JacsWayfindingProvider` is wired by default; route computation runs inside the SDK (`src/data/wayfinding/`). No provider injection needed. |
|
|
45
|
+
| Contextual map APIs | ✅ Shipped | `highlightPOI`/`highlightAmenity`/`clearHighlight`, `setPOIFilter`/`clearPOIFilter`, `setDestinationCirclesVisible`/`setDestinationLabelsVisible`, `amenities.getDistinct`, `findClosestWaypoint`, `searchAllPOIs`, `navigateFromKioskToPOI`, `refit`. See `docs/API.md#contextual-map`. |
|
|
46
|
+
| Opening hours | ✅ Shipped | `getPOIDetails(poi).openHours` parses the CMS's `mm_open_hours` extensor; `getOpenStatus()` derives open/closed, "closing soon", and the next opening. See `docs/API.md#opening-hours`. |
|
|
47
|
+
| Destination detail fields | ✅ Shipped | `getPOIDetails(poi)` also surfaces `phone`, `imageAlt`, `buildingName` and `roomNumber` — the CMS's `mm_`-prefixed stand-in extensors, plus the real `unitNumber` column. See `docs/API.md#reserved-extensors`. |
|
|
48
|
+
| Restroom icon grouping | ✅ Shipped | Restroom pins too close together to draw individually collapse into one Material `wc` badge and expand back as the camera zooms in — fixing men's/women's pairs where MapLibre silently dropped one icon. Tapping the badge emits `poiSelected` with every restroom it stands for. Opt out with `options.groupRestroomIcons: false`. |
|
|
44
49
|
| Venue-served stylesheets | 🚧 Roadmap | SDK currently uses its bundled style; `loadAndPatchVenueStyle()` is bypassed. |
|
|
45
50
|
| Polygon layers + 3D map templates | 🚧 Roadmap | `buildPolygonLayers` / `applyMapTemplate3d` imports are commented in `src/sdk.ts`. |
|
|
46
|
-
| Wayfinding | 🚧 Roadmap | Route renderer is fully built, but the runtime provider is a stub that throws *"Wayfinding is not yet implemented in the SDK"*. |
|
|
47
51
|
|
|
48
52
|
Track re-enable points by grepping `// TODO: Re-enable` in `src/sdk.ts` and `src/data/jacsDataProvider.ts`.
|
|
49
53
|
|
|
@@ -67,6 +71,7 @@ The lean root README intentionally stops here. For depth, see:
|
|
|
67
71
|
- [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) — module map, init flow, JACS data path, style patching, dormant 3D notes.
|
|
68
72
|
- [`docs/API.md`](./docs/API.md) — full public API surface grouped by lifecycle, floors, POIs, amenities, wayfinding, camera, events.
|
|
69
73
|
- [`docs/KIOSK.md`](./docs/KIOSK.md) — kiosk integration patterns (You-Are-Here, kiosk-to-destination wayfinding once enabled, view-mode UX, sprite hosting, idle reset).
|
|
74
|
+
- [`docs/ICONS.md`](./docs/ICONS.md) — the curated icon registry, how amenity/connector icons resolve and render, why destinations render none, the CMS upload flow, and the release coupling between the icon-set and SDK packages.
|
|
70
75
|
|
|
71
76
|
External integrators will usually only need the [API](./docs/API.md) and [Kiosk](./docs/KIOSK.md) docs. Internal MTS engineers should also read [Architecture](./docs/ARCHITECTURE.md) before touching `src/sdk.ts` or the JACS provider.
|
|
72
77
|
|
|
@@ -160,7 +165,7 @@ Browser apps should use `mode: 'proxy'` and forward requests through your own se
|
|
|
160
165
|
2. Exchange the password grant for a bearer token (cache until expiry).
|
|
161
166
|
3. Forward `GET /api/jacs/<path>` to `${JACS_HOST}/JACS/api/<path>` with the token attached.
|
|
162
167
|
|
|
163
|
-
A reference Next.js route handler ships in the example app at `
|
|
168
|
+
A reference Next.js route handler ships in the example app at `apps/example/app/api/jacs/[...path]/route.ts`. Copy it into your own backend or adapt it to your framework, then point `jacs.proxyBaseUrl` at it.
|
|
164
169
|
|
|
165
170
|
### JACS direct mode
|
|
166
171
|
|
|
@@ -180,32 +185,35 @@ jacs: {
|
|
|
180
185
|
|
|
181
186
|
## Sprites
|
|
182
187
|
|
|
183
|
-
`options.customSprite` is a sprite URL **prefix without extension** — MapLibre appends `.json` and `.png` (and `@2x` variants) automatically. The example app serves its sprite from `
|
|
188
|
+
`options.customSprite` is a sprite URL **prefix without extension** — MapLibre appends `.json` and `.png` (and `@2x` variants) automatically. The example app serves its sprite from `apps/example/public/sprites/`.
|
|
184
189
|
|
|
185
190
|
---
|
|
186
191
|
|
|
187
192
|
## Development
|
|
188
193
|
|
|
194
|
+
Run commands from the **monorepo root** through pnpm/turbo (install pnpm via npm, not corepack):
|
|
195
|
+
|
|
189
196
|
```bash
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
npm run test:watch # vitest in watch mode
|
|
196
|
-
npm run test:coverage # vitest run --coverage (v8 provider)
|
|
197
|
+
pnpm install # once, at the root — one lockfile for the whole monorepo
|
|
198
|
+
pnpm dev # turbo: SDK rollup --watch + example next dev together
|
|
199
|
+
pnpm build # turbo: production build of all packages
|
|
200
|
+
pnpm typecheck # turbo: tsc --noEmit
|
|
201
|
+
pnpm test # turbo: vitest run
|
|
197
202
|
```
|
|
198
203
|
|
|
204
|
+
SDK-only build: `pnpm --filter @minmaps-dev/mm-web-sdk build`. Per-package scripts (`dev:sdk`, `test:watch`, `test:coverage`) still exist and can be run with `pnpm --filter @minmaps-dev/mm-web-sdk <script>`.
|
|
205
|
+
|
|
199
206
|
The build emits ESM, CJS, and types under `dist/` for both the root entry and the `/react` entry. Tests live in `tests/` and target the three highest-leverage modules: `JacsProvider`, `WayfindingManager`, and `ViewModeController`. Coverage thresholds are gated in `vitest.config.ts` (currently 60% lines/funcs/stmts, 50% branches).
|
|
200
207
|
|
|
201
208
|
### Continuous integration
|
|
202
209
|
|
|
203
|
-
|
|
210
|
+
CI lives at the **monorepo root** in `.github/workflows/`:
|
|
204
211
|
|
|
205
|
-
- **`ci.yml`** — runs typecheck, vitest with coverage, and the production build on every push and pull request to `main` / `dev`.
|
|
206
|
-
- **`
|
|
212
|
+
- **`ci.yml`** — runs typecheck, vitest with coverage, and the production build on every push and pull request to `main` / `dev`.
|
|
213
|
+
- **`release.yml`** — Changesets-driven releases. Write a changeset, merge to `main`, and a "Version Packages" PR is opened; merging it runs `changeset publish` to npm (access `public`). There is no tag-based publish workflow and no provenance flag.
|
|
214
|
+
- **`deploy-example.yml`** — deploys the example app.
|
|
207
215
|
|
|
208
|
-
> **Internal note:** future Claude sessions get oriented from [`CLAUDE.md`](./CLAUDE.md).
|
|
216
|
+
> **Internal note:** future Claude sessions get oriented from [`CLAUDE.md`](./CLAUDE.md). Subagents at the monorepo-root `.claude/agents/` cover API doc sync, release notes, and style/template edits.
|
|
209
217
|
|
|
210
218
|
---
|
|
211
219
|
|