@minmaps-dev/mm-web-sdk 1.0.0-rc.3 → 1.0.0-rc.30
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 +108 -115
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +614 -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 +132 -2
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +35 -13
- package/src/themes/alt3-hybrid-style.json +550 -236
- package/src/themes/high-contrast-style.json +0 -383
package/dist/react.d.ts
CHANGED
|
@@ -1,14 +1,137 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Padding kept clear inside the viewport when the SDK frames bounds —
|
|
5
|
+
* the initial venue/floor fit and the wayfinding route fit. A plain
|
|
6
|
+
* number pads all sides equally; the object form lets a kiosk reserve
|
|
7
|
+
* space for fixed UI overlays (header, dock, side rails) so framed
|
|
8
|
+
* content is never hidden behind them.
|
|
9
|
+
*/
|
|
10
|
+
type BoundsPadding = number | {
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
left: number;
|
|
14
|
+
right: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Built-in theme names accepted by `MinuteMaps.setTheme()` and the
|
|
18
|
+
* `options.theme` init option. Pass a `StyleSpecification` directly for
|
|
19
|
+
* custom themes.
|
|
20
|
+
*/
|
|
21
|
+
type ThemeName = 'default' | 'high-contrast';
|
|
22
|
+
/**
|
|
23
|
+
* Style of the disc + ring rendered behind each amenity icon. The SDK
|
|
24
|
+
* composites this into the icon bitmap at registration time, so badge +
|
|
25
|
+
* icon participate in symbol collision as one unit.
|
|
26
|
+
*/
|
|
27
|
+
type AmenityBadgeStyle = {
|
|
28
|
+
/** Fill colour of the badge disc. Default `'#fdb81e'`. */
|
|
29
|
+
color?: string;
|
|
30
|
+
/** Stroke colour of the ring around the disc. Default `'#FFFFFF'`. */
|
|
31
|
+
ringColor?: string;
|
|
32
|
+
/** Ring width in logical px. Default `2`. */
|
|
33
|
+
ringWidth?: number;
|
|
34
|
+
};
|
|
35
|
+
type DestinationChipStyle = {
|
|
36
|
+
/** Chip fill colour. Default `'#FFFFFF'`. */
|
|
37
|
+
color?: string;
|
|
38
|
+
/** Chip border colour. Default navy `'#162e51'`. */
|
|
39
|
+
borderColor?: string;
|
|
40
|
+
/** Chip border width in logical px. Default `2`. */
|
|
41
|
+
borderWidth?: number;
|
|
42
|
+
};
|
|
3
43
|
interface SDKOptions {
|
|
4
44
|
debug?: boolean;
|
|
5
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Initial theme. `'default'` uses the bundled hybrid 3D theme.
|
|
47
|
+
* `'high-contrast'` uses the WCAG-AA tuned theme. Pass a
|
|
48
|
+
* `StyleSpecification` for fully custom styling.
|
|
49
|
+
*/
|
|
50
|
+
theme?: ThemeName | any;
|
|
51
|
+
/**
|
|
52
|
+
* When true, the SDK skips animations on imperative camera calls
|
|
53
|
+
* (wayfinding fits, `setView`, idle re-frames). Consumers should
|
|
54
|
+
* mirror their app's `prefers-reduced-motion` state into this.
|
|
55
|
+
*/
|
|
56
|
+
reducedMotion?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether a freshly computed route auto-highlights its first step's
|
|
59
|
+
* segment (the brighter `route-line-active` overlay). Defaults to
|
|
60
|
+
* `true`, preserving the turn-by-turn segment highlight that
|
|
61
|
+
* `setActiveStep` drives.
|
|
62
|
+
*
|
|
63
|
+
* Set `false` for kiosk-style "show the whole route at once" UIs:
|
|
64
|
+
* the entire route line is shown without singling out one segment,
|
|
65
|
+
* which reads more clearly at a glance and avoids implying the visitor
|
|
66
|
+
* must step through the route. `setActiveStep` still works when called
|
|
67
|
+
* explicitly (e.g. a paginated QR-handoff / mobile flow) — this only
|
|
68
|
+
* controls the automatic highlight on `routeReady`.
|
|
69
|
+
*/
|
|
70
|
+
routeStepHighlight?: boolean;
|
|
6
71
|
initialFloor?: string | number;
|
|
7
72
|
enableInteractions?: boolean;
|
|
8
73
|
customSprite?: string;
|
|
9
74
|
minIndoorZoom?: number;
|
|
10
75
|
wallThickness?: number;
|
|
11
|
-
boundsPadding?:
|
|
76
|
+
boundsPadding?: BoundsPadding;
|
|
77
|
+
/**
|
|
78
|
+
* Pitch (deg) for the opening view, applied centred on the kiosk ("You
|
|
79
|
+
* are here"). Omit for top-down.
|
|
80
|
+
*/
|
|
81
|
+
initialPitch?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Zoom for the opening view, centred on the kiosk. Set this above the
|
|
84
|
+
* theme's unit-walls breakpoint (~16.5 in the bundled hybrid theme) so the
|
|
85
|
+
* kiosk opens on the building's interior floor plan (its contents) rather
|
|
86
|
+
* than a zoomed-out 3D massing outline. Omit to keep the post-floor-fit
|
|
87
|
+
* zoom.
|
|
88
|
+
*/
|
|
89
|
+
initialZoom?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Clamp zoom-out relative to the opening view. When set, the map's
|
|
92
|
+
* `minZoom` becomes `(initialZoom − this)`, so visitors can nudge out by
|
|
93
|
+
* this many zoom levels but never pull back below the interior into the
|
|
94
|
+
* massing/region. `0` locks zoom-out exactly to the opening view.
|
|
95
|
+
*/
|
|
96
|
+
minZoomBelowInitialFit?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Override the colour the SDK recolours every amenity SVG to before it
|
|
99
|
+
* composites the badge. `none` / `transparent` fills are preserved so
|
|
100
|
+
* cut-outs stay. When the badge is enabled (the default), this defaults
|
|
101
|
+
* to navy (`#162e51`) so icons read on gold. Set explicitly for a
|
|
102
|
+
* different look, or set `amenityBadge: false` to disable recolouring
|
|
103
|
+
* altogether and keep the CMS-uploaded colours.
|
|
104
|
+
*/
|
|
105
|
+
amenityIconColor?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Badge composited behind each amenity icon. Pass `false` to render the
|
|
108
|
+
* icon alone (no badge — useful for high-contrast or 2D themes where the
|
|
109
|
+
* gold disc would compete with the floor). Pass an object to tune the
|
|
110
|
+
* disc / ring style. Defaults to a VA-gold disc with a 2px white ring.
|
|
111
|
+
*
|
|
112
|
+
* The badge is baked into the icon bitmap (canvas composite) rather than
|
|
113
|
+
* drawn as a separate circle layer, so badge + icon participate in symbol
|
|
114
|
+
* collision together — overlapping amenities hide as one unit instead of
|
|
115
|
+
* the icon hiding while the disc stays painted.
|
|
116
|
+
*/
|
|
117
|
+
amenityBadge?: AmenityBadgeStyle | false;
|
|
118
|
+
/**
|
|
119
|
+
* Badge for vertical-circulation connectors (elevator / stairs / escalator).
|
|
120
|
+
* These render as their own visual class — a navy disc with a white glyph —
|
|
121
|
+
* so circulation reads distinct from the gold service amenities. Pass `false`
|
|
122
|
+
* to fall them back into the regular gold badge, or an object to tune the
|
|
123
|
+
* disc / ring. When `amenityBadge` is `false`, connectors are badge-less too
|
|
124
|
+
* unless this is set explicitly.
|
|
125
|
+
*/
|
|
126
|
+
connectorBadge?: AmenityBadgeStyle | false;
|
|
127
|
+
/**
|
|
128
|
+
* Chip composited behind each destination's uploaded logo. Destinations are
|
|
129
|
+
* full-colour brand images (not recoloured), so they get a neutral white
|
|
130
|
+
* rounded chip for legibility instead of the amenity gold badge. Pass `false`
|
|
131
|
+
* to render the logo bare, or an object to tune the chip fill / border.
|
|
132
|
+
* Defaults to a white chip with a 2px navy border.
|
|
133
|
+
*/
|
|
134
|
+
destinationChip?: DestinationChipStyle | false;
|
|
12
135
|
styleMode?: 'venueStyleUrl' | 'sdkTemplate';
|
|
13
136
|
templateOverrideMode?: 'colorsOnly' | 'colorsAndConstants' | 'all';
|
|
14
137
|
}
|
|
@@ -24,6 +147,13 @@ type SDKConfig = {
|
|
|
24
147
|
venueId: number;
|
|
25
148
|
locale?: string;
|
|
26
149
|
auth?: JMapAuth;
|
|
150
|
+
/**
|
|
151
|
+
* Identifies which physical kiosk this instance is, so the SDK can pin
|
|
152
|
+
* the "You are here" marker. Matched against either the numeric device
|
|
153
|
+
* `id` or the device `uuid` from the venue's `devices`. The device's
|
|
154
|
+
* attached waypoint (`waypoint.deviceIds`) is the kiosk's location.
|
|
155
|
+
*/
|
|
156
|
+
deviceId?: string | number;
|
|
27
157
|
};
|
|
28
158
|
jacs: {
|
|
29
159
|
mode: 'proxy' | 'direct';
|