Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mapbox/search-js-web

Package Overview
Dependencies
Maintainers
28
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/search-js-web - npm Package Compare versions

Comparing version 1.0.0-beta.19 to 1.0.0-beta.20

dist/components/MapboxGeocoder.d.ts

1

dist/constants.d.ts

@@ -7,1 +7,2 @@ export declare const STATIC_BASE_URL_SATELLITE: string;

export declare const SEARCHBOX_TEMPLATE: HTMLTemplateElement;
export declare const GEOCODER_TEMPLATE: HTMLTemplateElement;

@@ -9,2 +9,3 @@ /// <reference path="../src/types/custom_elements.d.ts" />

export { MapboxSearchBox } from './components/MapboxSearchBox';
export { MapboxGeocoder } from './components/MapboxGeocoder';
export { MapboxAddressMinimap } from './components/MapboxAddressMinimap';

@@ -11,0 +12,0 @@ export { MapboxHTMLEvent } from './MapboxHTMLEvent';

2

dist/utils/map.d.ts

@@ -17,3 +17,3 @@ import mapboxgl from 'mapbox-gl';

* Gets the maximum zoom level for a [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/)
* or [Mapbox Geocoding API](https://docs.mapbox.com/api/search/geocoding/) place type.
* or [Mapbox Geocoding API](https://docs.mapbox.com/api/search/geocoding-v6/) place type.
*

@@ -20,0 +20,0 @@ * @returns The maximum zoom level for the given place type, `16` if the type is not supported.

export declare enum SEARCH_SERVICE {
AddressAutofill = 0,
GeocodingV5 = 1,
GeocodingV6 = 2,
SearchBox = 3
Geocoding = 1,
SearchBox = 2
}
{
"name": "@mapbox/search-js-web",
"version": "1.0.0-beta.19",
"version": "1.0.0-beta.20",
"description": "Search web component with form autocomplete.",

@@ -23,3 +23,3 @@ "main": "dist/index.js",

"@floating-ui/dom": "^0.5.2",
"@mapbox/search-js-core": "^1.0.0-beta.19",
"@mapbox/search-js-core": "^1.0.0-beta.20",
"@mapbox/sphericalmercator": "^1.2.0",

@@ -78,5 +78,5 @@ "focus-trap": "^6.7.3",

"path": "dist/mapboxsearch.js",
"limit": "36 kB"
"limit": "37 kB"
}
]
}

@@ -5,2 +5,3 @@ import mapboxgl from 'mapbox-gl';

MapboxSearchBox,
MapboxGeocoder,
MapboxAddressMinimap,

@@ -122,5 +123,7 @@ Theme,

const element = (document.querySelector('mapbox-address-autofill') ??
document.querySelector('mapbox-search-box')) as
document.querySelector('mapbox-search-box') ??
document.querySelector('mapbox-geocoder')) as
| MapboxAddressAutofill
| MapboxSearchBox;
| MapboxSearchBox
| MapboxGeocoder;

@@ -214,7 +217,39 @@ if (element) {

// clonedElement.search('99 green st');
// const searchbox = new MapboxSearchBox();
// searchbox.accessToken = ACCESS_TOKEN;
// map.addControl(searchbox);
}
// const searchbox = new MapboxSearchBox();
// searchbox.accessToken = ACCESS_TOKEN;
// map.addControl(searchbox);
if (element instanceof MapboxGeocoder) {
element.bindMap(map);
element.mapboxgl = mapboxgl;
element.addEventListener('input', (e) => {
if (e.target !== e.currentTarget) return;
console.log('input', e);
});
element.addEventListener('suggest', (res) => console.log('suggest', res));
element.addEventListener('suggesterror', (err) =>
console.log('error', err)
);
element.addEventListener('retrieve', (res) => console.log('retrieve', res));
const clonedElement = element.cloneNode(true) as MapboxGeocoder;
clonedElement.accessToken = ACCESS_TOKEN;
clonedElement.options.language = 'pt';
clonedElement.mapboxgl = mapboxgl;
clonedElement.marker = { color: 'red' };
map.addControl(clonedElement);
selectEl.addEventListener('change', () => {
clonedElement.theme = THEMES[selectEl.value];
});
// clonedElement.search('99 green st');
// const searchbox = new MapboxSearchBox();
// searchbox.accessToken = ACCESS_TOKEN;
// map.addControl(searchbox);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc