diff --git a/%rnd%maplibre-basemaps/chat_history/history.sqlite b/%rnd%maplibre-basemaps/chat_history/history.sqlite
new file mode 100644
index 0000000..cf29fdc
Binary files /dev/null and b/%rnd%maplibre-basemaps/chat_history/history.sqlite differ
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..0aaadd5
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,20 @@
+name: "publish npm"
+
+on: push
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: checkout
+ uses: actions/checkout@v3
+ - name: node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ registry-url: https://registry.npmjs.org
+ - name: publish
+ run: npm install && npm publish --access public
+ working-directory: .
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b2d59d1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/node_modules
+/dist
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..6c46824
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Changelog
+
+## 0.0.1
+
+- initial release
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..08eb1d8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2021, Aditya Kushwaha
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7b87319
--- /dev/null
+++ b/README.md
@@ -0,0 +1,101 @@
+# maplibre-basemaps
+### Maplibre plugin to add basemaps layer switcher
+
+Check the demo here [Link](https://kaditya97.github.io/maplibre-basemaps/)
+
+## Install
+
+```bash
+npm install maplibre-gl maplibre-basemaps
+```
+
+or
+
+```html
+
+
+
+```
+
+## Usage
+```jsx
+import Maplibre from 'maplibre-gl';
+import * as MaplibreBasemaps from 'maplibre-basemaps';
+```
+
+## Example usage
+Check docs/index.html for example implementation.
+```Javascript
+const osm = {
+ name: "Open Street Map",
+ tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],
+ visibility: 'visible',
+ maxzoom: 18,
+ attribution: 'osm'
+}
+const osmHot = {
+ name: "OSM HOT",
+ tiles: ['https://a.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'],
+ visibility: 'none',
+}
+const osmCycle = {
+ name: "OSM Cycle",
+ tiles: ['https://a.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png'],
+ visibility: 'none'
+}
+const esriTerrain = {
+ name: "Esri Terrain",
+ tiles: ['https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}'],
+ visibility: 'none',
+ maxzoom: 13,
+ attribution: 'Tiles © Esri — Source: USGS, Esri, TANA, DeLorme, and NPS',
+}
+const baseLayers = {
+ osm,
+ osmHot,
+ osmCycle,
+ esriTerrain,
+}
+const basemapControl = new MaplibreBasemaps.Basemaps({ basemaps: baseLayers });
+map.addControl(basemapControl, 'top-right');
+```
+
+### Remove
+
+```Javascript
+map.removeControl(basemapControl);
+```
+
+### Options for use
+
+```Typescript
+export interface BaseLayerConfig {
+ name: string;
+ tiles: Array;
+ visibility: 'visible' | 'none';
+ attribution?: string;
+ minZoom?: number;
+ maxZoom?: number;
+}
+
+export interface BasemapsConfig {
+ basemaps: BaseLayerConfig;
+ width?: string;
+ height?: string;
+}
+
+const basemapControl = new new MaplibreBasemaps.Basemaps(config: BasemapsConfig);
+```
+
+- `basemaps` - BaseLayerConfig, base layers objects, **required**
+- `width` - string, width for basemaps layers container, **default: '150px'**
+- `height` - string, height for basemaps layers container, **default: '100px'**
+
+Layer Configuration
+- `name` - string, name to visualize layer in container, **required**
+- `tiles` - string[], urls of basemap layer, **required**
+- `visibility` - 'visible' | 'none', visible to load layer by default else none, **required**
+- `attribution` - string, attribution for basemap layer, **optional**
+- `minZoom` - number, min zoom to display the grid, **default: 0**
+- `maxZoom` - number, max zoom to display the grid , **default: 20**
+
diff --git a/babel.config.json b/babel.config.json
new file mode 100644
index 0000000..5b74257
--- /dev/null
+++ b/babel.config.json
@@ -0,0 +1,8 @@
+{
+ "presets": [
+ "@babel/preset-env"
+ ],
+ "plugins": [
+ "@babel/plugin-transform-runtime"
+ ]
+}
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..471c8fa
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+ Maplibre Basemaps
+
+
+
+
+
+
+
+
+
+
+
+
+
+