@mappedin/maplibre-overlay 6.18.0-beta.0 → 6.19.0-beta.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/README.md CHANGED
@@ -103,12 +103,13 @@ initializeMap();
103
103
 
104
104
  ### Notes
105
105
 
106
- Set `centerClampedToGround: false` when using multi-floor view** — MapLibre defaults `centerClampedToGround` to `true`, which resets the camera elevation to 0 every frame. This prevents floor elevation changes from taking effect. You MUST set this option when constructing the MapLibre map if you enable `multiFloorView`:
106
+ Set `centerClampedToGround: false` when using multi-floor view\*\* — MapLibre defaults `centerClampedToGround` to `true`, which resets the camera elevation to 0 every frame. This prevents floor elevation changes from taking effect. You MUST set this option when constructing the MapLibre map if you enable `multiFloorView`:
107
+
107
108
  ```typescript
108
109
  const map = new MapLibreMap({
109
- container: 'map',
110
- centerClampedToGround: false, // required for multi-floor view
111
- // ...other options
110
+ container: 'map',
111
+ centerClampedToGround: false, // required for multi-floor view
112
+ // ...other options
112
113
  });
113
114
  ```
114
115
 
@@ -14,32 +14,6 @@ import { IControl } from "maplibre-gl";
14
14
  * @experimental
15
15
  */
16
16
  declare const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
17
- declare const FLOOR_GAP = 3;
18
- /**
19
- * Default map options used if no custom options are provided.
20
- *
21
- * @internal
22
- */
23
- declare const DEFAULT_MAP_OPTIONS: {
24
- debug: false;
25
- pitch: number;
26
- bearing: number;
27
- antialiasing: {
28
- enabled: true;
29
- };
30
- shadingAndOutlines: true;
31
- outdoorView: {
32
- layersHiddenByGeometry: string[];
33
- };
34
- imagePlacementOptions: {
35
- mode: "default";
36
- };
37
- flipImagesToFaceCamera: true;
38
- multiFloorView: {
39
- enabled: false;
40
- floorGap: number;
41
- };
42
- };
43
17
  type TMappedinMapLibreOverlayEvents = {
44
18
  /**
45
19
  * Event emitted when the MappedinMap is loaded
@@ -202,4 +176,4 @@ declare class MappedinMapLibreOverlay implements IControl {
202
176
  } ? TMappedinMapLibreOverlayEvents[EventName]["data"] : TMappedinMapLibreOverlayEvents[EventName]) => void) => void;
203
177
  }
204
178
  //#endregion
205
- export { DEFAULT_MAP_OPTIONS, FLOOR_GAP, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, createMapLibreOverlay };
179
+ export { MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, createMapLibreOverlay };
package/lib/esm/index.js CHANGED
@@ -1 +1,229 @@
1
- var N=Object.defineProperty,H=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var V=i=>{throw TypeError(i)};var L=(i,t,e)=>t in i?N(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))w.call(t,e)&&L(i,e,t[e]);if(v)for(var e of v(t))S.call(t,e)&&L(i,e,t[e]);return i},M=(i,t)=>H(i,$(t)),s=(i,t)=>N(i,"name",{value:t,configurable:!0});var D=(i,t)=>{var e={};for(var r in i)w.call(i,r)&&t.indexOf(r)<0&&(e[r]=i[r]);if(i!=null&&v)for(var r of v(i))t.indexOf(r)<0&&S.call(i,r)&&(e[r]=i[r]);return e};var l=(i,t,e)=>L(i,typeof t!="symbol"?t+"":t,e),k=(i,t,e)=>t.has(i)||V("Cannot "+e);var o=(i,t,e)=>(k(i,t,"read from private field"),e?e.call(i):t.get(i)),b=(i,t,e)=>t.has(i)?V("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),u=(i,t,e,r)=>(k(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e);var f={env:{NODE_ENV:"production",npm_package_version:"6.18.0-beta.0"}};import{MapView as W}from"@mappedin/mappedin-js";import{__INTERNAL__MapLibreOverlay as J}from"@mappedin/mappedin-js";var T=class T{constructor(){l(this,"_subscribers",{});l(this,"_abortController",new AbortController)}get signal(){return this._abortController.signal}publish(t,e){!this._subscribers||!this._subscribers[t]||this.signal.aborted||this._subscribers[t].forEach(function(r){typeof r=="function"&&r(e)})}onAbort(t){this.signal.addEventListener("abort",()=>t(),{once:!0})}on(t,e,r){let n=r==null?void 0:r.signal;if(n!=null&&n.aborted||this._abortController&&this._abortController.signal.aborted)return()=>{};this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(e);let a=s(()=>{this.off(t,e)},"cleanup");return n&&n.addEventListener("abort",a,{once:!0}),a}off(t,e){if(!this._subscribers||this._subscribers[t]==null||this.signal.aborted)return;let r=this._subscribers[t].indexOf(e);r!==-1&&this._subscribers[t].splice(r,1)}destroy(){this.signal.aborted||(this._subscribers={},this._abortController.abort())}};s(T,"PubSub");var O=T;var C=s((i,{id:t}={})=>{let e=Array.isArray(i)?i:[i];if(!e.every(a=>typeof a=="string"))return;let r=e.join(""),n=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(n=a)}n==null&&(n=document.createElement("style")),t&&t!==""&&(n.id=t),n.textContent=r,document.head.appendChild(n)},"injectCSS");var U="[MappedinJS]";function A(i="",{prefix:t=U}={}){let e="".concat(t).concat(i?"-".concat(i):""),r=s((n,a)=>{if(typeof window<"u"&&window.rnDebug){let _=a.map(h=>h instanceof Error&&h.stack?"".concat(h.message,"\n").concat(h.stack):h);window.rnDebug("".concat(i," ").concat(n,": ").concat(_.join(" ")))}},"rnDebug");return{logState:f.env.NODE_ENV==="test"?3:0,log(...n){this.logState<=0&&(console.log(e,...n),r("log",n))},warn(...n){this.logState<=1&&(console.warn(e,...n),r("warn",n))},error(...n){this.logState<=2&&(console.error(e,...n),r("error",n))},assert(...n){console.assert(...n)},time(n){console.time(n)},timeEnd(n){console.timeEnd(n)},setLevel(n){0<=n&&n<=3&&(this.logState=n)}}}s(A,"createLogger");var pt=A();var R=A("",{prefix:"[MapLibreOverlay]"});var I=".mappedin-marker {\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n font-weight: normal;\n top: 0;\n position: absolute;\n font-weight: bold;\n color: black;\n display: flex;\n flex-direction: row;\n will-change: transform, opacity;\n transition: opacity 150ms ease-in-out;\n justify-content: center;\n opacity: 0;\n}\n\n/* Opt out of CSS opacity transitions when the marker has animated: false.\n * Without this, direct style.opacity assignments (from DOMDrawSystem's snap\n * path and from onStrategySelected) still fade over the CSS transition\n * duration, and during that fade `marker.animation` is null so the transform\n * update path is skipped \u2014 causing markers to drift if the camera is moving.\n */\n.mappedin-marker[data-animated='false'] {\n transition: none;\n}\n\n/* Low priority pin strategy styles */\n\n/* Hide child elements as well */\n.mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {\n visibility: hidden;\n}\n\n/* Create the pin using ::before pseudo-element */\n.mappedin-marker::before {\n content: '';\n display: none;\n border-radius: 50%;\n position: relative;\n /* Default values - will be overridden by inline styles */\n width: var(--mappedin-pin-size, 2px);\n height: var(--mappedin-pin-size, 2px);\n background-color: var(--pin-color, #666);\n}\n\n.mappedin-marker[data-placement='hidden']::before {\n display: block;\n}\n";var P=".mappedin__smart-collision-engine__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n /* Enables colliders to use translate3D */\n transform-style: preserve-3d;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n}\n\n.mappedin__smart-collision-engine-debug__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n will-change: opacity;\n &.interacting {\n opacity: 0.2;\n }\n}\n";var G=".mappedin-map {\n .mappedin-interactive {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n\n &.mappedin-interaction-hover {\n cursor: pointer;\n }\n }\n}\n";var Y=".mappedin-map {\n .mappedin-control-container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n\n .mappedin-ctrl-top-left,\n .mappedin-ctrl-top-right,\n .mappedin-ctrl-bottom-left,\n .mappedin-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n }\n\n .mappedin-ctrl-top-left {\n top: 0;\n left: 0;\n }\n\n .mappedin-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n .mappedin-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n }\n\n .mappedin-ctrl-bottom-right {\n bottom: 0;\n right: 0;\n }\n\n .mappedin-ctrl-attrib {\n display: block;\n position: relative;\n pointer-events: auto;\n font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;\n padding: 3px 5px 1px 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n min-width: 11px;\n min-height: 11px;\n user-select: none;\n\n summary.mappedin-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n summary.mappedin-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n &.mappedin-compact .mappedin-ctrl-attrib-button,\n &.mappedin-compact-show .mappedin-ctrl-attrib-inner {\n display: inline-block;\n }\n\n &.mappedin-compact {\n background-color: transparent;\n }\n\n &.mappedin-compact-show {\n min-width: 15px;\n min-height: 15px;\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 0.5);\n }\n }\n\n .mappedin-ctrl-attrib-top-left {\n float: left;\n border-bottom-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-top-right {\n float: right;\n border-bottom-left-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-left {\n float: left;\n border-top-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-right {\n float: right;\n border-top-left-radius: 4px;\n }\n .mappedin-ctrl-attrib-top-left,\n .mappedin-ctrl-attrib-bottom-left {\n padding: 3px 5px 1px 20px;\n }\n\n .mappedin-ctrl-attrib-inner {\n display: inline-block;\n margin-right: 12px;\n }\n\n .mappedin-ctrl-attrib-inner,\n .mappedin-ctrl-attrib-inner a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n }\n\n .mappedin-ctrl-attrib-inner-bold,\n .mappedin-ctrl-attrib-inner-bold a {\n font-weight: bold;\n }\n\n .mappedin-ctrl-attrib-inner a:hover {\n color: #017ef1;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .mappedin-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 15px;\n height: 15px;\n box-sizing: border-box;\n border-radius: 50%;\n top: 0;\n right: 2px;\n border: 1px;\n }\n .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,\n .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {\n left: 2px;\n }\n }\n}\n";var q=[I,P,G,Y],wt=s((i,t)=>{y.instance!=null&&R.warn("Only a single map venue is supported at this time.");let e=new y([i.mapCenter.longitude,i.mapCenter.latitude],i,t);return y.instance=e,e},"createMapLibreOverlay");function Q(i){var a;if(!i)return;let n=i,{outdoorView:t}=n,e=D(n,["outdoorView"]),r=t!=null&&t.token?{headers:{"x-mappedin-tiles-key":t.token},style:t.style,enabled:(a=t.enabled)!=null?a:!0,lowDpi:t.lowDpi}:void 0;return M(g({},e),{outdoorView:r})}s(Q,"convertToRendererCoreOptions");var X=3,Z={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:X}},d,c,E,p,m,x=class x{constructor(t,e,r){b(this,d);b(this,c);b(this,E);b(this,p);b(this,m);l(this,"on",s((t,e)=>{o(this,d).on(t,e)},"on"));l(this,"off",s((t,e)=>{o(this,d).off(t,e)},"off"));u(this,d,new O),u(this,m,new J(t,Q(r))),u(this,c,e),u(this,E,r)}onAdd(t){var n,a,_;let e=o(this,m).onAdd(t),r=M(g(g({},Z),(n=o(this,E))!=null?n:{}),{outdoorView:g({token:o(this,c).outdoorViewToken},(a=o(this,E))==null?void 0:a.outdoorView)});return u(this,p,new W(o(this,m).core)),((_=r.injectStyles)==null||_)&&C(q,{id:"mappedin__styles"}),o(this,p).addMap(o(this,c),r).then(()=>{o(this,d).publish("loaded",{mapView:o(this,p),mapData:o(this,c)})}),e}onRemove(){o(this,p)&&o(this,p).clear(),x.instance=null,o(this,m).onRemove()}};d=new WeakMap,c=new WeakMap,E=new WeakMap,p=new WeakMap,m=new WeakMap,s(x,"MappedinMapLibreOverlay"),l(x,"instance");var y=x;export{Z as DEFAULT_MAP_OPTIONS,X as FLOOR_GAP,y as MappedinMapLibreOverlay,wt as createMapLibreOverlay};
1
+ var M=Object.defineProperty;var T=i=>{throw TypeError(i)};var C=(i,t,e)=>t in i?M(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t)=>M(i,"name",{value:t,configurable:!0});var y=(i,t,e)=>C(i,typeof t!="symbol"?t+"":t,e),N=(i,t,e)=>t.has(i)||T("Cannot "+e);var o=(i,t,e)=>(N(i,t,"read from private field"),e?e.call(i):t.get(i)),m=(i,t,e)=>t.has(i)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),b=(i,t,e,r)=>(N(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e);var u={env:{NODE_ENV:"production",npm_package_version:"6.19.0-beta.0"}};import{MapView as H}from"@mappedin/mappedin-js";import{__INTERNAL__MapLibreOverlay as $,__INTERNAL__convertToRendererCoreOptions as j}from"@mappedin/mappedin-js";var _=class _{_subscribers={};_abortController=new AbortController;get signal(){return this._abortController.signal}publish(t,e){!this._subscribers||!this._subscribers[t]||this.signal.aborted||this._subscribers[t].forEach(function(r){typeof r=="function"&&r(e)})}onAbort(t){this.signal.addEventListener("abort",()=>t(),{once:!0})}on(t,e,r){let n=r?.signal;if(n?.aborted||this._abortController&&this._abortController.signal.aborted)return()=>{};this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(e);let s=a(()=>{this.off(t,e)},"cleanup");return n&&n.addEventListener("abort",s,{once:!0}),s}off(t,e){if(!this._subscribers||this._subscribers[t]==null||this.signal.aborted)return;let r=this._subscribers[t].indexOf(e);r!==-1&&this._subscribers[t].splice(r,1)}destroy(){this.signal.aborted||(this._subscribers={},this._abortController.abort())}};a(_,"PubSub");var x=_;var O=a((i,{id:t}={})=>{let e=Array.isArray(i)?i:[i];if(!e.every(s=>typeof s=="string"))return;let r=e.join(""),n=null;if(t){let s=document.getElementById(t);s instanceof HTMLStyleElement&&(n=s)}n==null&&(n=document.createElement("style")),t&&t!==""&&(n.id=t),n.textContent=r,document.head.appendChild(n)},"injectCSS");var R="[MappedinJS]";function v(i="",{prefix:t=R}={}){let e=`${t}${i?`-${i}`:""}`,r=a((n,s)=>{if(typeof window<"u"&&window.rnDebug){let k=s.map(E=>E instanceof Error&&E.stack?`${E.message}
2
+ ${E.stack}`:E);window.rnDebug(`${i} ${n}: ${k.join(" ")}`)}},"rnDebug");return{logState:u.env.NODE_ENV==="test"?3:0,log(...n){this.logState<=0&&(console.log(e,...n),r("log",n))},warn(...n){this.logState<=1&&(console.warn(e,...n),r("warn",n))},error(...n){this.logState<=2&&(console.error(e,...n),r("error",n))},assert(...n){console.assert(...n)},time(n){console.time(n)},timeEnd(n){console.timeEnd(n)},setLevel(n){0<=n&&n<=3&&(this.logState=n)}}}a(v,"createLogger");var tt=v();var L=v("",{prefix:"[MapLibreOverlay]"});var A=`.mappedin-marker {
3
+ font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;
4
+ font-weight: normal;
5
+ top: 0;
6
+ position: absolute;
7
+ font-weight: bold;
8
+ color: black;
9
+ display: flex;
10
+ flex-direction: row;
11
+ will-change: transform, opacity;
12
+ transition: opacity 150ms ease-in-out;
13
+ justify-content: center;
14
+ opacity: 0;
15
+ }
16
+
17
+ /* Opt out of CSS opacity transitions when the marker has animated: false.
18
+ * Without this, direct style.opacity assignments (from DOMDrawSystem's snap
19
+ * path and from onStrategySelected) still fade over the CSS transition
20
+ * duration, and during that fade \`marker.animation\` is null so the transform
21
+ * update path is skipped \u2014 causing markers to drift if the camera is moving.
22
+ */
23
+ .mappedin-marker[data-animated='false'] {
24
+ transition: none;
25
+ }
26
+
27
+ /* Low priority pin strategy styles */
28
+
29
+ /* Hide child elements as well */
30
+ .mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {
31
+ visibility: hidden;
32
+ }
33
+
34
+ /* Create the pin using ::before pseudo-element */
35
+ .mappedin-marker::before {
36
+ content: '';
37
+ display: none;
38
+ border-radius: 50%;
39
+ position: relative;
40
+ /* Default values - will be overridden by inline styles */
41
+ width: var(--mappedin-pin-size, 2px);
42
+ height: var(--mappedin-pin-size, 2px);
43
+ background-color: var(--pin-color, #666);
44
+ }
45
+
46
+ .mappedin-marker[data-placement='hidden']::before {
47
+ display: block;
48
+ }
49
+ `;var w=`.mappedin__smart-collision-engine__container {
50
+ position: absolute;
51
+ left: 0px;
52
+ top: 0px;
53
+ bottom: 0px;
54
+ right: 0px;
55
+ pointer-events: none;
56
+ /* Establishes a stacking context so inner z-indexed canvases stay scoped
57
+ * here, and lifts the wrapper above the WebGL canvas (which carries
58
+ * \`z-index: 1\` as a webkit compositing workaround). */
59
+ z-index: 1;
60
+ font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;
61
+ }
62
+
63
+ .mappedin__smart-collision-engine-debug__container {
64
+ position: absolute;
65
+ left: 0px;
66
+ top: 0px;
67
+ bottom: 0px;
68
+ right: 0px;
69
+ transition: opacity 300ms ease-in-out;
70
+ pointer-events: none;
71
+ will-change: opacity;
72
+ &.interacting {
73
+ opacity: 0.2;
74
+ }
75
+ }
76
+ `;var S=`.mappedin-map {
77
+ .mappedin-interactive {
78
+ cursor: grab;
79
+
80
+ &:active {
81
+ cursor: grabbing;
82
+ }
83
+
84
+ &.mappedin-interaction-hover {
85
+ cursor: pointer;
86
+ }
87
+ }
88
+ }
89
+ `;var V=`.mappedin-map {
90
+ .mappedin-control-container {
91
+ position: absolute;
92
+ left: 0px;
93
+ top: 0px;
94
+ bottom: 0px;
95
+ right: 0px;
96
+ pointer-events: none;
97
+ font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;
98
+
99
+ .mappedin-ctrl-top-left,
100
+ .mappedin-ctrl-top-right,
101
+ .mappedin-ctrl-bottom-left,
102
+ .mappedin-ctrl-bottom-right {
103
+ position: absolute;
104
+ pointer-events: none;
105
+ }
106
+
107
+ .mappedin-ctrl-top-left {
108
+ top: 0;
109
+ left: 0;
110
+ }
111
+
112
+ .mappedin-ctrl-top-right {
113
+ top: 0;
114
+ right: 0;
115
+ }
116
+
117
+ .mappedin-ctrl-bottom-left {
118
+ bottom: 0;
119
+ left: 0;
120
+ }
121
+
122
+ .mappedin-ctrl-bottom-right {
123
+ bottom: 0;
124
+ right: 0;
125
+ }
126
+
127
+ .mappedin-ctrl-attrib {
128
+ display: block;
129
+ position: relative;
130
+ pointer-events: auto;
131
+ font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;
132
+ padding: 3px 5px 1px 5px;
133
+ background-color: rgba(255, 255, 255, 0.5);
134
+ margin: 0;
135
+ min-width: 11px;
136
+ min-height: 11px;
137
+ user-select: none;
138
+
139
+ summary.mappedin-ctrl-attrib-button {
140
+ appearance: none;
141
+ list-style: none;
142
+ }
143
+
144
+ summary.mappedin-ctrl-attrib-button::-webkit-details-marker {
145
+ display: none;
146
+ }
147
+
148
+ &.mappedin-compact .mappedin-ctrl-attrib-button,
149
+ &.mappedin-compact-show .mappedin-ctrl-attrib-inner {
150
+ display: inline-block;
151
+ }
152
+
153
+ &.mappedin-compact {
154
+ background-color: transparent;
155
+ }
156
+
157
+ &.mappedin-compact-show {
158
+ min-width: 15px;
159
+ min-height: 15px;
160
+ box-sizing: border-box;
161
+ background-color: rgba(255, 255, 255, 0.5);
162
+ }
163
+ }
164
+
165
+ .mappedin-ctrl-attrib-top-left {
166
+ float: left;
167
+ border-bottom-right-radius: 4px;
168
+ }
169
+
170
+ .mappedin-ctrl-attrib-top-right {
171
+ float: right;
172
+ border-bottom-left-radius: 4px;
173
+ }
174
+
175
+ .mappedin-ctrl-attrib-bottom-left {
176
+ float: left;
177
+ border-top-right-radius: 4px;
178
+ }
179
+
180
+ .mappedin-ctrl-attrib-bottom-right {
181
+ float: right;
182
+ border-top-left-radius: 4px;
183
+ }
184
+ .mappedin-ctrl-attrib-top-left,
185
+ .mappedin-ctrl-attrib-bottom-left {
186
+ padding: 3px 5px 1px 20px;
187
+ }
188
+
189
+ .mappedin-ctrl-attrib-inner {
190
+ display: inline-block;
191
+ margin-right: 12px;
192
+ }
193
+
194
+ .mappedin-ctrl-attrib-inner,
195
+ .mappedin-ctrl-attrib-inner a {
196
+ color: rgba(0, 0, 0, 0.75);
197
+ text-decoration: none;
198
+ }
199
+
200
+ .mappedin-ctrl-attrib-inner-bold,
201
+ .mappedin-ctrl-attrib-inner-bold a {
202
+ font-weight: bold;
203
+ }
204
+
205
+ .mappedin-ctrl-attrib-inner a:hover {
206
+ color: #017ef1;
207
+ text-decoration: underline;
208
+ cursor: pointer;
209
+ }
210
+
211
+ .mappedin-ctrl-attrib-button {
212
+ display: none;
213
+ cursor: pointer;
214
+ position: absolute;
215
+ width: 15px;
216
+ height: 15px;
217
+ box-sizing: border-box;
218
+ border-radius: 50%;
219
+ top: 0;
220
+ right: 2px;
221
+ border: 1px;
222
+ }
223
+ .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,
224
+ .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {
225
+ left: 2px;
226
+ }
227
+ }
228
+ }
229
+ `;var U=3,D={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!1,floorGap:U}},F=[A,w,S,V],_t=a((i,t)=>{f.instance!=null&&L.warn("Only a single map venue is supported at this time.");let e=new f([i.mapCenter.longitude,i.mapCenter.latitude],i,t);return f.instance=e,e},"createMapLibreOverlay"),l,d,h,p,c,g=class g{constructor(t,e,r){m(this,l);m(this,d);m(this,h);m(this,p);m(this,c);y(this,"on",a((t,e)=>{o(this,l).on(t,e)},"on"));y(this,"off",a((t,e)=>{o(this,l).off(t,e)},"off"));b(this,l,new x),b(this,c,new $(t,j(r))),b(this,d,e),b(this,h,r)}onAdd(t){let e=o(this,c).onAdd(t),r={...D,...o(this,h)??{},outdoorView:{...D.outdoorView,token:o(this,d).outdoorViewToken,...o(this,h)?.outdoorView}};return b(this,p,new H(o(this,c).core)),(r.injectStyles??!0)&&O(F,{id:"mappedin__styles"}),o(this,p).addMap(o(this,d),r).then(()=>{o(this,l).publish("loaded",{mapView:o(this,p),mapData:o(this,d)})}).catch(n=>{L.error("Failed to initialize indoor map",n)}),e}onRemove(){o(this,p)&&o(this,p).clear(),g.instance=null,o(this,c).onRemove()}};l=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,c=new WeakMap,a(g,"MappedinMapLibreOverlay"),y(g,"instance");var f=g;export{f as MappedinMapLibreOverlay,_t as createMapLibreOverlay};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/maplibre-overlay",
3
- "version": "6.18.0-beta.0",
3
+ "version": "6.19.0-beta.0",
4
4
  "homepage": "https://developer.mappedin.com/",
5
5
  "private": false,
6
6
  "main": "lib/esm/index.js",
@@ -17,14 +17,13 @@
17
17
  "dependencies": {},
18
18
  "peerDependencies": {
19
19
  "maplibre-gl": "^5.6.0",
20
- "@mappedin/mappedin-js": "^6.18.0"
20
+ "@mappedin/mappedin-js": "^6.19.0"
21
21
  },
22
22
  "devDependencies": {},
23
23
  "volta": {
24
24
  "extends": "../../package.json"
25
25
  },
26
26
  "scripts": {
27
- "start": "pnpm build && concurrently \"node scripts/build.mjs --watchChanges\" \"node scripts/start.mjs\"",
28
27
  "build": "pnpm clean && pnpm types && node scripts/build.mjs",
29
28
  "build:prod": "cross-env NODE_ENV=production pnpm build",
30
29
  "types": "tsc -b tsconfig.build.json",