import type { MMapFeature, MMapHotspot, MMapMarker } from "../../../imperative"; import type { CustomVuefyFn, CustomVuefyOptions } from "../../../modules/vuefy"; import type { CustomReactify } from "../../../reactify/reactify"; import type TReact from "react"; import { optionsKeyVuefy, overrideKeyReactify, overrideKeyVuefy } from "../../../imperative/wrappers"; type MMapHintProps = { hint: (object: MMapFeature | MMapMarker | MMapHotspot | undefined) => unknown; }; declare const MMapHintContext: import("../../../imperative/MMapEnities").MMapContext; /** * Display hint on map elements. * @deprecated Package @mappable-world/hint@0.0.1 is deprecated. Please use https://www.npmjs.com/package/@mappable-world/mappable-hint instead. * * @example * ```javascript * const {MMapHint, MMapHintContext} = await mappable.import('@mappable-world/mappable-hint@0.0.1'); * map.addChild(defaultFeatures = new MMapDefaultFeaturesLayer()); * map.addChild(hint = MMapHint({ * layers: [defaultFeatures.layer], * hint: object => object?.properties?.hint * })); * * const {MMapDefaultMarker} = await mappable.import('@mappable-world/mappable-markers@0.0.1'); * map.addChild(new MMapDefaultMarker({coordinates: [37, 55], properties: {hint: 'Hello world!'}})); * * hint.addChild(new class MyHint extends mappable.MMapEntity { * _onAttach() { * this._element = document.createElement('div'); * this._element.className = 'my-hint'; * * this._detachDom = mappable.useDomContext(this, this._element); * this._watchContext(MMapHintContext, () => { * this._element.textContent = this._consumeContext(MMapHintContext)?.hint; * }, {immediate: true}); * } * * _onDetach() { * this._detachDom(); * this._detachDom = undefined; * } * }); * ``` */ declare class MMapHint extends mappable.MMapGroupEntity { static [overrideKeyReactify]: CustomReactify>; static [overrideKeyVuefy]: CustomVuefyFn; static [optionsKeyVuefy]: CustomVuefyOptions; private _detachDom?; private _element; private _hintElement; constructor(props: MMapHintProps); protected _positionHintElement(screenCoordinates: [ number, number ]): void; protected _toggleHint(add: boolean): void; protected _onAttach(): void; protected _onDetach(): void; } export { MMapHint, MMapHintContext };