@yandex/ymaps3-hint
Advanced tools
Comparing version 0.0.7 to 0.0.8
export { YMapHint, YMapHintContext } from './YMapHint'; | ||
export * from './types'; |
@@ -1,1 +0,1 @@ | ||
(()=>{"use strict";var t={530:(t,e,n)=>{n.d(e,{Z:()=>s});var o=n(81),i=n.n(o),r=n(645),a=n.n(r)()(i());a.push([t.id,".ymaps3x0--ymaphint__container {\n position: absolute;\n z-index: 200;\n top: 0;\n left: 0;\n\n display: block;\n\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n}\n\n.ymaps3x0--ymaphint__hint {\n position: absolute;\n\n display: none;\n}\n\n.ymaps3x0--ymaphint__hint_is-visible {\n position: absolute;\n\n display: block;\n}\n",""]);const s=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var p=[].concat(t[l]);o&&a[p[0]]||(void 0!==r&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=r),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),i&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=i):p[4]="".concat(i)),e.push(p))}},e}},81:t=>{t.exports=function(t){return t[1]}},809:(t,e,n)=>{n.r(e),n.d(e,{default:()=>y});var o=n(379),i=n.n(o),r=n(795),a=n.n(r),s=n(569),c=n.n(s),l=n(565),p=n.n(l),u=n(216),d=n.n(u),h=n(589),m=n.n(h),f=n(530),v={};v.styleTagTransform=m(),v.setAttributes=p(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),i()(f.Z,v);const y=f.Z&&f.Z.locals?f.Z.locals:void 0},379:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var r={},a=[],s=0;s<t.length;s++){var c=t[s],l=o.base?c[0]+o.base:c[0],p=r[l]||0,u="".concat(l," ").concat(p);r[l]=p+1;var d=n(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var m=i(h,o);o.byIndex=s,e.splice(s,0,{identifier:u,updater:m,references:1})}a.push(u)}return a}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var r=o(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<r.length;a++){var s=n(r[a]);e[s].references--}for(var c=o(t,i),l=0;l<r.length;l++){var p=n(r[l]);0===e[p].references&&(e[p].updater(),e.splice(p,1))}r=c}}},569:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},699:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.YMapHintContext=e.YMapHint=void 0,n(809);const o=new ymaps3.YMapContext("YMapHint");e.YMapHintContext=o;class i extends ymaps3.YMapGroupEntity{constructor(t){super(t,{container:!0}),this._addDirectChild(new ymaps3.YMapListener({layer:"any",onMouseMove:(t,{screenCoordinates:e})=>{this._hintElement.classList.contains("ymaps3x0--ymaphint__hint_is-visible")&&this._positionHintElement(e)},onMouseEnter:(t,{screenCoordinates:e})=>{const n=this._props.hint(null==t?void 0:t.entity);n?(this._positionHintElement(e),this._toggleHint(!0),this._provideContext(o,{hint:n})):(this._toggleHint(!1),this._provideContext(o,null))},onMouseLeave:()=>{this._provideContext(o,null),this._toggleHint(!1)},onUpdate:()=>{this._provideContext(o,null),this._toggleHint(!1)}}))}_positionHintElement(t){const{left:e,top:n}=this.root.container.getBoundingClientRect(),o=(t[0]-e).toFixed(0),i=(t[1]-n).toFixed(0);this._hintElement.style.transform=`translate(${o}px, ${i}px)`}_toggleHint(t){this._hintElement.classList.toggle("ymaps3x0--ymaphint__hint_is-visible",t)}_onAttach(){this._element=document.createElement("YMaps"),this._element.className="ymaps3x0--ymaphint__container",this._hintElement=this._element.appendChild(document.createElement("YMaps")),this._hintElement.className="ymaps3x0--ymaphint__hint",this._detachDom=ymaps3.useDomContext(this,this._element,this._hintElement),this._provideContext(o,null)}_onDetach(){this._detachDom(),this._element=null}}e.YMapHint=i,i[ymaps3.overrideKeyReactify]=(t,{reactify:e,React:n})=>{const i=e.entity(t),{YMapReactContainer:r}=e.module(ymaps3);return({children:t,...e})=>n.createElement(i,e,n.createElement(r,{context:o},t))}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var o={};(()=>{var t=o;Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0;var e=n(699);Object.defineProperty(t,"YMapHint",{enumerable:!0,get:function(){return e.YMapHint}}),Object.defineProperty(t,"YMapHintContext",{enumerable:!0,get:function(){return e.YMapHintContext}})})(),self["@yandex/ymaps3-hint"]=o})(); | ||
(()=>{"use strict";var e={123:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(81),i=n.n(o),r=n(645),a=n.n(r)()(i());a.push([e.id,".ymaps3x0--ymaphint__container {\n position: absolute;\n z-index: 200;\n top: 0;\n left: 0;\n\n display: block;\n\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n}\n\n.ymaps3x0--ymaphint__hint {\n position: absolute;\n\n display: none;\n}\n\n.ymaps3x0--ymaphint__hint_is-visible {\n position: absolute;\n\n display: block;\n}\n",""]);const s=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var p=[].concat(e[l]);o&&a[p[0]]||(void 0!==r&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=r),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),i&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=i):p[4]="".concat(i)),t.push(p))}},t}},81:e=>{e.exports=function(e){return e[1]}},483:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var o=n(379),i=n.n(o),r=n(795),a=n.n(r),s=n(569),c=n.n(s),l=n(565),p=n.n(l),u=n(216),d=n.n(u),h=n(589),f=n.n(h),m=n(123),v={};v.styleTagTransform=f(),v.setAttributes=p(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),i()(m.Z,v);const y=m.Z&&m.Z.locals?m.Z.locals:void 0},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var c=e[s],l=o.base?c[0]+o.base:c[0],p=r[l]||0,u="".concat(l," ").concat(p);r[l]=p+1;var d=n(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(h);else{var f=i(h,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:f,references:1})}a.push(u)}return a}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=n(r[a]);t[s].references--}for(var c=o(e,i),l=0;l<r.length;l++){var p=n(r[l]);0===t[p].references&&(t[p].updater(),t.splice(p,1))}r=c}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0,n(483);const o=new ymaps3.YMapContext("YMapHint");t.YMapHintContext=o;class i extends ymaps3.YMapGroupEntity{constructor(e){super(e,{container:!0}),this._addDirectChild(new ymaps3.YMapListener({layer:"any",onMouseMove:(e,{screenCoordinates:t})=>{this._hintElement.classList.contains("ymaps3x0--ymaphint__hint_is-visible")&&this._positionHintElement(t)},onMouseEnter:(e,{screenCoordinates:t})=>{const n=this._props.hint(null==e?void 0:e.entity);n?(this._positionHintElement(t),this._toggleHint(!0),this._provideContext(o,{hint:n})):(this._toggleHint(!1),this._provideContext(o,null))},onMouseLeave:()=>{this._provideContext(o,null),this._toggleHint(!1)},onUpdate:()=>{this._provideContext(o,null),this._toggleHint(!1)}}))}_positionHintElement(e){const{left:t,top:n}=this.root.container.getBoundingClientRect(),o=(e[0]-t).toFixed(0),i=(e[1]-n).toFixed(0);this._hintElement.style.transform=`translate(${o}px, ${i}px)`}_toggleHint(e){this._hintElement.classList.toggle("ymaps3x0--ymaphint__hint_is-visible",e)}_onAttach(){this._element=document.createElement("YMaps"),this._element.className="ymaps3x0--ymaphint__container",this._hintElement=this._element.appendChild(document.createElement("YMaps")),this._hintElement.className="ymaps3x0--ymaphint__hint",this._detachDom=ymaps3.useDomContext(this,this._element,this._hintElement),this._provideContext(o,null)}_onDetach(){this._detachDom(),this._element=null}}t.YMapHint=i,i[ymaps3.overrideKeyReactify]=(e,{reactify:t,React:n})=>{const i=t.entity(e),{YMapReactContainer:r}=t.module(ymaps3);return({children:e,...t})=>n.createElement(i,t,n.createElement(r,{context:o},e))}},341:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0;var r=n(699);Object.defineProperty(t,"YMapHint",{enumerable:!0,get:function(){return r.YMapHint}}),Object.defineProperty(t,"YMapHintContext",{enumerable:!0,get:function(){return r.YMapHintContext}}),i(n(683),t)},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o=n(341);self["@yandex/ymaps3-hint"]=o})(); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@yandex/ymaps3-hint"]=t():e["@yandex/ymaps3-hint"]=t()}(self,(()=>(()=>{"use strict";var e={530:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(81),i=n.n(o),r=n(645),a=n.n(r)()(i());a.push([e.id,".ymaps3x0--ymaphint__container {\n position: absolute;\n z-index: 200;\n top: 0;\n left: 0;\n\n display: block;\n\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n}\n\n.ymaps3x0--ymaphint__hint {\n position: absolute;\n\n display: none;\n}\n\n.ymaps3x0--ymaphint__hint_is-visible {\n position: absolute;\n\n display: block;\n}\n",""]);const s=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var p=0;p<e.length;p++){var l=[].concat(e[p]);o&&a[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},81:e=>{e.exports=function(e){return e[1]}},809:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var o=n(379),i=n.n(o),r=n(795),a=n.n(r),s=n(569),c=n.n(s),p=n(565),l=n.n(p),u=n(216),d=n.n(u),h=n(589),m=n.n(h),f=n(530),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),i()(f.Z,y);const v=f.Z&&f.Z.locals?f.Z.locals:void 0},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var c=e[s],p=o.base?c[0]+o.base:c[0],l=r[p]||0,u="".concat(p," ").concat(l);r[p]=l+1;var d=n(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(h);else{var m=i(h,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:m,references:1})}a.push(u)}return a}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=n(r[a]);t[s].references--}for(var c=o(e,i),p=0;p<r.length;p++){var l=n(r[p]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}r=c}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0,n(809);const o=new ymaps3.YMapContext("YMapHint");t.YMapHintContext=o;class i extends ymaps3.YMapGroupEntity{constructor(e){super(e,{container:!0}),this._addDirectChild(new ymaps3.YMapListener({layer:"any",onMouseMove:(e,{screenCoordinates:t})=>{this._hintElement.classList.contains("ymaps3x0--ymaphint__hint_is-visible")&&this._positionHintElement(t)},onMouseEnter:(e,{screenCoordinates:t})=>{const n=this._props.hint(null==e?void 0:e.entity);n?(this._positionHintElement(t),this._toggleHint(!0),this._provideContext(o,{hint:n})):(this._toggleHint(!1),this._provideContext(o,null))},onMouseLeave:()=>{this._provideContext(o,null),this._toggleHint(!1)},onUpdate:()=>{this._provideContext(o,null),this._toggleHint(!1)}}))}_positionHintElement(e){const{left:t,top:n}=this.root.container.getBoundingClientRect(),o=(e[0]-t).toFixed(0),i=(e[1]-n).toFixed(0);this._hintElement.style.transform=`translate(${o}px, ${i}px)`}_toggleHint(e){this._hintElement.classList.toggle("ymaps3x0--ymaphint__hint_is-visible",e)}_onAttach(){this._element=document.createElement("YMaps"),this._element.className="ymaps3x0--ymaphint__container",this._hintElement=this._element.appendChild(document.createElement("YMaps")),this._hintElement.className="ymaps3x0--ymaphint__hint",this._detachDom=ymaps3.useDomContext(this,this._element,this._hintElement),this._provideContext(o,null)}_onDetach(){this._detachDom(),this._element=null}}t.YMapHint=i,i[ymaps3.overrideKeyReactify]=(e,{reactify:t,React:n})=>{const i=t.entity(e),{YMapReactContainer:r}=t.module(ymaps3);return({children:e,...t})=>n.createElement(i,t,n.createElement(r,{context:o},e))}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};return(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.YMapHintContext=e.YMapHint=void 0;var t=n(699);Object.defineProperty(e,"YMapHint",{enumerable:!0,get:function(){return t.YMapHint}}),Object.defineProperty(e,"YMapHintContext",{enumerable:!0,get:function(){return t.YMapHintContext}})})(),o})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@yandex/ymaps3-hint"]=t():e["@yandex/ymaps3-hint"]=t()}(self,(()=>(()=>{"use strict";var e={123:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(81),i=n.n(o),r=n(645),a=n.n(r)()(i());a.push([e.id,".ymaps3x0--ymaphint__container {\n position: absolute;\n z-index: 200;\n top: 0;\n left: 0;\n\n display: block;\n\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n}\n\n.ymaps3x0--ymaphint__hint {\n position: absolute;\n\n display: none;\n}\n\n.ymaps3x0--ymaphint__hint_is-visible {\n position: absolute;\n\n display: block;\n}\n",""]);const s=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var p=0;p<e.length;p++){var l=[].concat(e[p]);o&&a[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},81:e=>{e.exports=function(e){return e[1]}},483:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var o=n(379),i=n.n(o),r=n(795),a=n.n(r),s=n(569),c=n.n(s),p=n(565),l=n.n(p),u=n(216),d=n.n(u),f=n(589),h=n.n(f),m=n(123),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),i()(m.Z,y);const v=m.Z&&m.Z.locals?m.Z.locals:void 0},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var c=e[s],p=o.base?c[0]+o.base:c[0],l=r[p]||0,u="".concat(p," ").concat(l);r[p]=l+1;var d=n(u),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var h=i(f,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=n(r[a]);t[s].references--}for(var c=o(e,i),p=0;p<r.length;p++){var l=n(r[p]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}r=c}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0,n(483);const o=new ymaps3.YMapContext("YMapHint");t.YMapHintContext=o;class i extends ymaps3.YMapGroupEntity{constructor(e){super(e,{container:!0}),this._addDirectChild(new ymaps3.YMapListener({layer:"any",onMouseMove:(e,{screenCoordinates:t})=>{this._hintElement.classList.contains("ymaps3x0--ymaphint__hint_is-visible")&&this._positionHintElement(t)},onMouseEnter:(e,{screenCoordinates:t})=>{const n=this._props.hint(null==e?void 0:e.entity);n?(this._positionHintElement(t),this._toggleHint(!0),this._provideContext(o,{hint:n})):(this._toggleHint(!1),this._provideContext(o,null))},onMouseLeave:()=>{this._provideContext(o,null),this._toggleHint(!1)},onUpdate:()=>{this._provideContext(o,null),this._toggleHint(!1)}}))}_positionHintElement(e){const{left:t,top:n}=this.root.container.getBoundingClientRect(),o=(e[0]-t).toFixed(0),i=(e[1]-n).toFixed(0);this._hintElement.style.transform=`translate(${o}px, ${i}px)`}_toggleHint(e){this._hintElement.classList.toggle("ymaps3x0--ymaphint__hint_is-visible",e)}_onAttach(){this._element=document.createElement("YMaps"),this._element.className="ymaps3x0--ymaphint__container",this._hintElement=this._element.appendChild(document.createElement("YMaps")),this._hintElement.className="ymaps3x0--ymaphint__hint",this._detachDom=ymaps3.useDomContext(this,this._element,this._hintElement),this._provideContext(o,null)}_onDetach(){this._detachDom(),this._element=null}}t.YMapHint=i,i[ymaps3.overrideKeyReactify]=(e,{reactify:t,React:n})=>{const i=t.entity(e),{YMapReactContainer:r}=t.module(ymaps3);return({children:e,...t})=>n.createElement(i,t,n.createElement(r,{context:o},e))}},341:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.YMapHintContext=t.YMapHint=void 0;var r=n(699);Object.defineProperty(t,"YMapHint",{enumerable:!0,get:function(){return r.YMapHint}}),Object.defineProperty(t,"YMapHintContext",{enumerable:!0,get:function(){return r.YMapHintContext}}),i(n(683),t)},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0,n(341)})())); |
export { YMapHint, YMapHintContext } from './YMapHint'; | ||
export * from './types'; |
{ | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"name": "@yandex/ymaps3-hint", | ||
@@ -26,3 +26,2 @@ "description": "Hints for Yandex Maps JS API 3.0", | ||
"devDependencies": { | ||
"@yandex/ymaps3-cli": "^0.0.8", | ||
"@types/got": "9.6.12", | ||
@@ -35,3 +34,4 @@ "@types/jest": "^29.5.3", | ||
"@typescript-eslint/parser": "6.0.0", | ||
"@yandex/ymaps3-types": "^0.0.14", | ||
"@yandex/ymaps3-cli": "^0.0.15", | ||
"@yandex/ymaps3-types": "^0.0.27", | ||
"cross-fetch": "4.0.0", | ||
@@ -48,2 +48,3 @@ "css-loader": "6.8.1", | ||
"jsdom": "22.1.0", | ||
"postcss-loader": "^8.1.1", | ||
"prettier": "3.0.0", | ||
@@ -55,2 +56,3 @@ "style-loader": "3.3.3", | ||
"typescript": "5.1.6", | ||
"vue": "^3.4.38", | ||
"webpack": "5.88.1", | ||
@@ -57,0 +59,0 @@ "webpack-cli": "5.1.4", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39889
17
245
31