@prashantgosai11/bisag-sidebar 1.1.0 → 1.1.2
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 +5 -3
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,8 +27,6 @@ The easiest way to use Bisag Sidebar is with the `BisagSidebarWithMap` component
|
|
|
27
27
|
|
|
28
28
|
```tsx
|
|
29
29
|
import { BisagSidebarWithMap } from '@prashantgosai11/bisag-sidebar';
|
|
30
|
-
import '@prashantgosai11/bisag-sidebar/dist/bisag-sidebar.css';
|
|
31
|
-
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
32
30
|
|
|
33
31
|
function App() {
|
|
34
32
|
return (
|
|
@@ -43,6 +41,10 @@ function App() {
|
|
|
43
41
|
}
|
|
44
42
|
```
|
|
45
43
|
|
|
44
|
+
> **Note:**
|
|
45
|
+
> - `maplibre-gl` is automatically installed when you install `@prashantgosai11/bisag-sidebar`
|
|
46
|
+
> - **CSS is automatically imported** - no need to manually import CSS files! The styles are included automatically when you import the component.
|
|
47
|
+
|
|
46
48
|
### Advanced Usage (Custom Map)
|
|
47
49
|
|
|
48
50
|
If you want to use your own MapLibre GL map instance:
|
|
@@ -52,7 +54,7 @@ import { useRef, useEffect } from 'react';
|
|
|
52
54
|
import maplibregl from 'maplibre-gl';
|
|
53
55
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
54
56
|
import { BisagSidebar, DeckGlOverlayManager, useMapStore } from '@prashantgosai11/bisag-sidebar';
|
|
55
|
-
import
|
|
57
|
+
// CSS is automatically imported - no need to manually import bisag-sidebar.css!
|
|
56
58
|
|
|
57
59
|
function App() {
|
|
58
60
|
const mapContainer = useRef<HTMLDivElement>(null);
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@prashantgosai11/bisag-sidebar/dist/bisag-sidebar.css';
|
|
2
|
+
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
1
3
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),s=require("@mantine/core"),Kn=require("@mantine/hooks"),Ni=require("zustand"),Ws=require("@turf/turf"),Go=require("@terraformer/wkt"),Gs=require("jszip");require("@loaders.gl/core");require("@loaders.gl/shapefile");const $s=require("shpjs"),Vt=require("export-to-csv"),Hs=require("@deck.gl/mapbox"),Oi=require("jspdf"),Dt=require("maplibre-gl"),So=require("@deck.gl/geo-layers"),bo=require("h3-js"),st=require("@deck.gl/layers"),Wi=require("@deck.gl/extensions"),$o=require("@deck.gl/aggregation-layers"),Gi=require("@deck.gl/mesh-layers"),Vs=require("@loaders.gl/obj"),_s=require("write-excel-file"),Us=require("html2canvas");function Js(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const et=Js(Ws);var $i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qn=g.createContext&&g.createContext($i),qs=["attr","size","title"];function Ys(e,n){if(e==null)return{};var o=Zs(e,n),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Zs(e,n){if(e==null)return{};var o={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;o[r]=e[r]}return o}function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},Co.apply(this,arguments)}function ei(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function vo(e){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ei(Object(o),!0).forEach(function(r){Xs(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ei(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function Xs(e,n,o){return n=Ks(n),n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function Ks(e){var n=Qs(e,"string");return typeof n=="symbol"?n:n+""}function Qs(e,n){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Hi(e){return e&&e.map((n,o)=>g.createElement(n.tag,vo({key:o},n.attr),Hi(n.child)))}function ze(e){return n=>g.createElement(ea,Co({attr:vo({},e.attr)},n),Hi(e.child))}function ea(e){var n=o=>{var{attr:r,size:i,title:a}=e,l=Ys(e,qs),m=i||o.size||"1em",d;return o.className&&(d=o.className),e.className&&(d=(d?d+" ":"")+e.className),g.createElement("svg",Co({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,r,l,{className:d,style:vo(vo({color:e.color||o.color},o.style),e.style),height:m,width:m,xmlns:"http://www.w3.org/2000/svg"}),a&&g.createElement("title",null,a),e.children)};return Qn!==void 0?g.createElement(Qn.Consumer,null,o=>n(o)):n($i)}function ta(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(e)}function oa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 268 144 144 144-144M256 392V100"},child:[]}]})(e)}function ra(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 496H48a32 32 0 0 1-32-32V32a16 16 0 0 1 32 0v432h432a16 16 0 0 1 0 32z"},child:[]},{tag:"path",attr:{d:"M156 432h-40a36 36 0 0 1-36-36V244a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v152a36 36 0 0 1-36 36zm144 0h-40a36 36 0 0 1-36-36V196a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v200a36 36 0 0 1-36 36zm143.64 0h-40a36 36 0 0 1-36-36V132a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v264a36 36 0 0 1-36 36z"},child:[]}]})(e)}function na(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 80a48.05 48.05 0 0 0-48-48H144a48.05 48.05 0 0 0-48 48v352a48.05 48.05 0 0 0 48 48h224a48.05 48.05 0 0 0 48-48zM168 432a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm0-80a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm0-80a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm88 160a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm0-80a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm0-80a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm112 136a24 24 0 0 1-48 0v-80a24 24 0 0 1 48 0zm-24-136a24 24 0 1 1 24-24 24 24 0 0 1-24 24zm19.31-100.69A16 16 0 0 1 352 176H160a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16v64a16 16 0 0 1-4.69 11.31z"},child:[]}]})(e)}function so(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128 192 384l-96-96"},child:[]}]})(e)}function ia(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}function Gt(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 184 144 144 144-144"},child:[]}]})(e)}function sa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(e)}function Vi(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 328 144-144 144 144"},child:[]}]})(e)}function Do(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function aa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0 1 40 40v208a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V216a40 40 0 0 1 40-40h40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m176 272 80 80 80-80M256 48v288"},child:[]}]})(e)}function la(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M376 160H272v153.37l52.69-52.68a16 16 0 0 1 22.62 22.62l-80 80a16 16 0 0 1-22.62 0l-80-80a16 16 0 0 1 22.62-22.62L240 313.37V160H136a56.06 56.06 0 0 0-56 56v208a56.06 56.06 0 0 0 56 56h240a56.06 56.06 0 0 0 56-56V216a56.06 56.06 0 0 0-56-56zM272 48a16 16 0 0 0-32 0v112h32z"},child:[]}]})(e)}function Jt(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"48"},child:[]},{tag:"circle",attr:{cx:"256",cy:"416",r:"48"},child:[]},{tag:"circle",attr:{cx:"256",cy:"96",r:"48"},child:[]}]})(e)}function Ho(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448zM248 315.85l-51.79-51.79a2 2 0 0 0-3.39 1.69 64.11 64.11 0 0 0 53.49 53.49 2 2 0 0 0 1.69-3.39zm16-119.7L315.87 248a2 2 0 0 0 3.4-1.69 64.13 64.13 0 0 0-53.55-53.55 2 2 0 0 0-1.72 3.39z"},child:[]},{tag:"path",attr:{d:"M491 273.36a32.2 32.2 0 0 0-.1-34.76c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.68 96a226.54 226.54 0 0 0-71.82 11.79 4 4 0 0 0-1.56 6.63l47.24 47.24a4 4 0 0 0 3.82 1.05 96 96 0 0 1 116 116 4 4 0 0 0 1.05 3.81l67.95 68a4 4 0 0 0 5.4.24 343.81 343.81 0 0 0 67.24-77.4zM256 352a96 96 0 0 1-93.3-118.63 4 4 0 0 0-1.05-3.81l-66.84-66.87a4 4 0 0 0-5.41-.23c-24.39 20.81-47 46.13-67.67 75.72a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.39 76.14 98.28 100.65C162.06 402 207.92 416 255.68 416a238.22 238.22 0 0 0 72.64-11.55 4 4 0 0 0 1.61-6.64l-47.47-47.46a4 4 0 0 0-3.81-1.05A96 96 0 0 1 256 352z"},child:[]}]})(e)}function Vo(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"64"},child:[]},{tag:"path",attr:{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96c-42.52 0-84.33 12.15-124.27 36.11-40.73 24.43-77.63 60.12-109.68 106.07a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416c46.71 0 93.81-14.43 136.2-41.72 38.46-24.77 72.72-59.66 99.08-100.92a32.2 32.2 0 0 0-.1-34.76zM256 352a96 96 0 1 1 96-96 96.11 96.11 0 0 1-96 96z"},child:[]}]})(e)}function ca(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M472 168H40a24 24 0 0 1 0-48h432a24 24 0 0 1 0 48zm-80 112H120a24 24 0 0 1 0-48h272a24 24 0 0 1 0 48zm-96 112h-80a24 24 0 0 1 0-48h80a24 24 0 0 1 0 48z"},child:[]}]})(e)}function da(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"176",height:"176",x:"48",y:"48",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]},{tag:"rect",attr:{width:"176",height:"176",x:"288",y:"48",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]},{tag:"rect",attr:{width:"176",height:"176",x:"48",y:"288",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]},{tag:"rect",attr:{width:"176",height:"176",x:"288",y:"288",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]}]})(e)}function ua(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204 240H68a36 36 0 0 1-36-36V68a36 36 0 0 1 36-36h136a36 36 0 0 1 36 36v136a36 36 0 0 1-36 36zm240 0H308a36 36 0 0 1-36-36V68a36 36 0 0 1 36-36h136a36 36 0 0 1 36 36v136a36 36 0 0 1-36 36zM204 480H68a36 36 0 0 1-36-36V308a36 36 0 0 1 36-36h136a36 36 0 0 1 36 36v136a36 36 0 0 1-36 36zm240 0H308a36 36 0 0 1-36-36V308a36 36 0 0 1 36-36h136a36 36 0 0 1 36 36v136a36 36 0 0 1-36 36z"},child:[]}]})(e)}function pa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 256c-13.47 0-26.94-2.39-37.44-7.17l-148-67.49C63.79 178.26 48 169.25 48 152.24s15.79-26 22.58-29.12l149.28-68.07c20.57-9.4 51.61-9.4 72.19 0l149.37 68.07c6.79 3.09 22.58 12.1 22.58 29.12s-15.79 26-22.58 29.11l-148 67.48C282.94 253.61 269.47 256 256 256zm176.76-100.86z"},child:[]},{tag:"path",attr:{d:"M441.36 226.81 426.27 220l-38.77 17.74-94 43c-10.5 4.8-24 7.19-37.44 7.19s-26.93-2.39-37.42-7.19l-94.07-43L85.79 220l-15.22 6.84C63.79 229.93 48 239 48 256s15.79 26.08 22.56 29.17l148 67.63C229 357.6 242.49 360 256 360s26.94-2.4 37.44-7.19l147.87-67.61c6.81-3.09 22.69-12.11 22.69-29.2s-15.77-26.07-22.64-29.19z"},child:[]},{tag:"path",attr:{d:"m441.36 330.8-15.09-6.8-38.77 17.73-94 42.95c-10.5 4.78-24 7.18-37.44 7.18s-26.93-2.39-37.42-7.18l-94.07-43L85.79 324l-15.22 6.84C63.79 333.93 48 343 48 360s15.79 26.07 22.56 29.15l148 67.59C229 461.52 242.54 464 256 464s26.88-2.48 37.38-7.27l147.92-67.57c6.82-3.08 22.7-12.1 22.7-29.16s-15.77-26.07-22.64-29.2z"},child:[]}]})(e)}function fa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M160 144h288M160 256h288M160 368h288"},child:[]},{tag:"circle",attr:{cx:"80",cy:"144",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"256",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"80",cy:"368",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]}]})(e)}function ga(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48.17 113.34A32 32 0 0 0 32 141.24V438a32 32 0 0 0 47 28.37c.43-.23.85-.47 1.26-.74l84.14-55.05a8 8 0 0 0 3.63-6.72V46.45a8 8 0 0 0-12.51-6.63zm164.19-74.03A8 8 0 0 0 200 46v357.56a8 8 0 0 0 3.63 6.72l96 62.42A8 8 0 0 0 312 466V108.67a8 8 0 0 0-3.64-6.73zm252.17 7.16a31.64 31.64 0 0 0-31.5-.88 12.07 12.07 0 0 0-1.25.74l-84.15 55a8 8 0 0 0-3.63 6.72v357.46a8 8 0 0 0 12.52 6.63l107.07-73.46a32 32 0 0 0 16.41-28v-296a32.76 32.76 0 0 0-15.47-28.21z"},child:[]}]})(e)}function ha(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16zm144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16z"},child:[]}]})(e)}function ma(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M66.1 357a16 16 0 0 1-14.61-9.46A224 224 0 0 1 256 32a16 16 0 0 1 16 16v208a16 16 0 0 1-9.47 14.61l-189.9 84.95A15.93 15.93 0 0 1 66.1 357z"},child:[]},{tag:"path",attr:{d:"M313.59 68.18A8 8 0 0 0 304 76v180a48.07 48.07 0 0 1-28.4 43.82L103.13 377a8 8 0 0 0-3.35 11.81 208.42 208.42 0 0 0 48.46 50.41A206.32 206.32 0 0 0 272 480c114.69 0 208-93.31 208-208 0-100.45-71.58-184.5-166.41-203.82z"},child:[]}]})(e)}function xa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M133 440a35.37 35.37 0 0 1-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0 1 35.77.45l247.85 148.36a36 36 0 0 1 0 61l-247.89 148.4A35.5 35.5 0 0 1 133 440z"},child:[]}]})(e)}function ya(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M456.69 421.39 362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8 124.95 124.95 0 0 1-124.8-124.8z"},child:[]}]})(e)}function ba(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 464H96a48.05 48.05 0 0 1-48-48V96a48.05 48.05 0 0 1 48-48h320a48.05 48.05 0 0 1 48 48v320a48.05 48.05 0 0 1-48 48z"},child:[]}]})(e)}function Ca(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48zm96 240h-96a16 16 0 0 1-16-16V128a16 16 0 0 1 32 0v128h80a16 16 0 0 1 0 32z"},child:[]}]})(e)}function _i(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M296 64h-80a7.91 7.91 0 0 0-8 8v24h96V72a7.91 7.91 0 0 0-8-8z"},child:[]},{tag:"path",attr:{d:"M432 96h-96V72a40 40 0 0 0-40-40h-80a40 40 0 0 0-40 40v24H80a16 16 0 0 0 0 32h17l19 304.92c1.42 26.85 22 47.08 48 47.08h184c26.13 0 46.3-19.78 48-47l19-305h17a16 16 0 0 0 0-32zM192.57 416H192a16 16 0 0 1-16-15.43l-8-224a16 16 0 1 1 32-1.14l8 224A16 16 0 0 1 192.57 416zM272 400a16 16 0 0 1-32 0V176a16 16 0 0 1 32 0zm32-304h-96V72a7.91 7.91 0 0 1 8-8h80a7.91 7.91 0 0 1 8 8zm32 304.57A16 16 0 0 1 320 416h-.58A16 16 0 0 1 304 399.43l8-224a16 16 0 1 1 32 1.14z"},child:[]}]})(e)}function va(e){return ze({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(e)}function wo(e){return ze({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function ti(e){return ze({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}const wa="_container_1dl6q_1",ja="_collapsedContainer_1dl6q_18",Sa="_collapsedRightSidebarContainer_1dl6q_32",ka="_expandRightSidebarButton_1dl6q_46",La="_header_1dl6q_79",Ta="_logoContainer_1dl6q_85",Pa="_diamondLeft_1dl6q_94",Ma="_diamondRight_1dl6q_103",Fa="_utilityIcons_1dl6q_125",Ia="_utilityIcon_1dl6q_125",za="_collapseButton_1dl6q_140",Ea="_expandButton_1dl6q_155",Ra="_datasetsScrollArea_1dl6q_169",Da="_datasetsList_1dl6q_189",Aa="_datasetsTitle_1dl6q_193",Ba="_datasetItem_1dl6q_199",Na="_datasetColorIndicator_1dl6q_207",Oa="_datasetName_1dl6q_214",Wa="_datasetRows_1dl6q_220",Ga="_datasetActionIcon_1dl6q_226",$a="_navIcons_1dl6q_251",Ha="_navIconContainer_1dl6q_262",Va="_navIcon_1dl6q_251",_a="_activeNavIcon_1dl6q_281",Ua="_activeIndicator_1dl6q_285",Ja="_addDataButtonSmall_1dl6q_304",qa="_layersList_1dl6q_320",Ya="_rightSidebarWidgets_1dl6q_339",Za="_rightSidebarHeader_1dl6q_353",Xa="_rightSidebarTitle_1dl6q_358",Ka="_rightSidebarCollapse_1dl6q_379",ve={container:wa,collapsedContainer:ja,collapsedRightSidebarContainer:Sa,expandRightSidebarButton:ka,header:La,logoContainer:Ta,diamondLeft:Pa,diamondRight:Ma,utilityIcons:Fa,utilityIcon:Ia,collapseButton:za,expandButton:Ea,datasetsScrollArea:Ra,datasetsList:Da,datasetsTitle:Aa,datasetItem:Ba,datasetColorIndicator:Na,datasetName:Oa,datasetRows:Wa,datasetActionIcon:Ga,navIcons:$a,navIconContainer:Ha,navIcon:Va,activeNavIcon:_a,activeIndicator:Ua,addDataButtonSmall:Ja,layersList:qa,rightSidebarWidgets:Ya,rightSidebarHeader:Za,rightSidebarTitle:Xa,rightSidebarCollapse:Ka};function Yt(e){return ze({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"},child:[]}]})(e)}function Qa(e){return ze({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"},child:[]}]})(e)}function el(e){return ze({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"},child:[]}]})(e)}const Ui=e=>{let n=e;n.use={};for(let o of Object.keys(n.getState()))n.use[o]=()=>n(r=>r[o]);return n},Ao=new Map,ao=e=>Ao.get(e),tl=(e,n)=>{!Ao.has(e)&&n&&Ao.set(e,JSON.parse(JSON.stringify(n)))},ol=Ni.create()((e,n)=>({map:null,setMap:o=>e({map:o}),drawControl:null,setDrawControl:o=>e({drawControl:o}),groups:[],setGroups:o=>e({groups:o}),visibleLayers:[],setVisibleLayers:o=>e({visibleLayers:o}),visibleLayers2:{},setVisibleLayers2:o=>e({visibleLayers2:o}),isMapLoading:!0,setIsMapLoading:o=>e({isMapLoading:o}),mapLoadingProgress:0,setMapLoadingProgress:o=>e({mapLoadingProgress:o}),selectedLayersForTool:[],setSelectedLayersForTool:o=>e({selectedLayersForTool:o}),sourceMarker:null,setSourceMarker:o=>e({sourceMarker:o}),destMarker:null,setDestMarker:o=>e({destMarker:o}),addLocationMarker:null,setAddLocationMarker:o=>e({addLocationMarker:o}),animateMarker:null,setAnimateMarker:o=>e({animateMarker:o}),isLayersSidebarOpened:!1,setIsLayersSidebarOpened:o=>e({isLayersSidebarOpened:o}),uploadedDatasets:[],setUploadedDatasets:o=>e({uploadedDatasets:o}),addUploadedDataset:o=>{o.geojson&&tl(o.id,o.geojson),e(r=>({uploadedDatasets:[...r.uploadedDatasets,o]}))},removeUploadedDataset:o=>e(r=>({uploadedDatasets:r.uploadedDatasets.filter(i=>i.id!==o)})),tilesets:[],setTilesets:o=>e({tilesets:o}),addTileset:o=>e(r=>({tilesets:[...r.tilesets,o]})),removeTileset:o=>e(r=>({tilesets:r.tilesets.filter(i=>i.id!==o)})),tooltipEnabled:!1,setTooltipEnabled:o=>e({tooltipEnabled:o}),tooltipDatasets:[],setTooltipDatasets:o=>e({tooltipDatasets:o}),tooltipFields:[],setTooltipFields:o=>e({tooltipFields:o}),datasetTooltipEnabled:{},setDatasetTooltipEnabled:(o,r)=>e(i=>({datasetTooltipEnabled:{...i.datasetTooltipEnabled,[o]:r}})),datasetTooltipFields:{},setDatasetTooltipFields:(o,r)=>e(i=>({datasetTooltipFields:{...i.datasetTooltipFields,[o]:r}})),selectedLayerFortool:[],setSelectedLayerFortool:o=>e({selectedLayerFortool:o}),navigationCropFilter:null,setNavigationCropFilter:o=>e({navigationCropFilter:o}),tree:{},setTree:o=>e({tree:o}),layersAddedFromCatalogue:[],setLayersAddedFromCatalogue:o=>e({layersAddedFromCatalogue:o}),drawnCoordinates:[],setDrawnCoordinates:o=>e({drawnCoordinates:o}),attributeTableFilteredFeatures:{},setAttributeTableFilteredFeatures:(o,r)=>e(i=>({attributeTableFilteredFeatures:{...i.attributeTableFilteredFeatures,[o]:r}})),attributeTableOpen:!1,setAttributeTableOpen:o=>e({attributeTableOpen:o}),attributeTableSelectedLayerId:null,setAttributeTableSelectedLayerId:o=>e({attributeTableSelectedLayerId:o})})),ce=Ui(ol),Ji=g.createContext(void 0),qi=({children:e})=>{const[n,o]=g.useState({}),r=g.useCallback((h,y)=>{o(c=>({...c,[h]:y}))},[]),i=g.useCallback(h=>n[h]||{visualizationType:"geojson",visible:!0},[n]),a=g.useCallback((h,y)=>{o(c=>({...c,[h]:{...c[h]||{visualizationType:"geojson",visible:!0},visible:y}}))},[]),l=g.useCallback((h,y)=>{o(c=>({...c,[h]:{...c[h]||{visible:!0},visualizationType:y}}))},[]),m=g.useCallback((h,y)=>{o(c=>({...c,[h]:{...c[h]||{visualizationType:"geojson",visible:!0},colorConfig:y}}))},[]),d=g.useCallback((h,y)=>{o(c=>({...c,[h]:{...c[h]||{visualizationType:"geojson",visible:!0},styleConfig:y}}))},[]);return t.jsx(Ji.Provider,{value:{layerConfigs:n,setLayerConfig:r,getLayerConfig:i,setLayerVisibility:a,setVisualizationType:l,setColorConfig:m,setStyleConfig:d},children:e})},oo=()=>{const e=g.useContext(Ji);if(!e)throw new Error("useLayerConfig must be used within LayerConfigProvider");return e};function rl(e){return ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function lo(e){return ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Pt(e){return ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function oi(e){return ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Zt(e){return ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function co(e){return ze({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},child:[]}]})(e)}const Yi=e=>t.jsxs("svg",{viewBox:"0 0 64 64",width:"32",height:"32",...e,children:[t.jsx("circle",{cx:"29.4",cy:"31.6",r:"8.4",className:"cr1",fill:"#43bcd6"}),t.jsx("circle",{cx:"48.5",cy:"15.7",r:"6.5",className:"cr2",fill:"#43bcd6"}),t.jsx("circle",{cx:"11",cy:"44.2",r:"3",className:"cr3",fill:"#43bcd6"}),t.jsx("circle",{cx:"50",cy:"44.2",r:"5",className:"cr4",fill:"#43bcd6"}),t.jsx("circle",{cx:"34",cy:"54.2",r:"3",className:"cr5",fill:"#43bcd6"}),t.jsx("circle",{cx:"14",cy:"16.2",r:"4",className:"cr6",fill:"#43bcd6"})]}),Zi=e=>t.jsxs("svg",{viewBox:"0 0 64 64",width:"32",height:"32",...e,children:[t.jsx("path",{d:`M34.5,34.4c-0.6,0-1.2-0.4-1.4-1c-2.7-9.9-8.8-21.7-16.8-22.3c-3.1-0.2-5.6,1.5-7,4.8c-0.3,0.7-1.1,1.1-1.9,0.7
|
|
2
4
|
c-0.7-0.3-1.1-1.1-0.7-1.9c1.9-4.3,5.6-6.8,9.8-6.5c9.5,0.7,16.3,13,19.4,24.4c0.2,0.8-0.2,1.5-1,1.7C34.8,34.3,34.6,34.4,34.5,34.4
|
|
3
5
|
z`,fill:"#43bcd6"}),t.jsx("path",{d:`M6.7,57c0,0-0.1,0-0.1,0c-0.5-0.1-0.9-0.6-0.8-1.1c2.4-17.3,9.6-30.3,17.5-31.8c3.1-0.6,7.8,0.4,12.1,8.3
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bisag Sidebar - npm package entry point
|
|
3
3
|
* Use this when consuming as a package: import { BisagSidebar } from '@prashantgosai11/bisag-sidebar'
|
|
4
|
+
*
|
|
5
|
+
* CSS is automatically imported via post-build script - no need to manually import CSS files!
|
|
4
6
|
*/
|
|
5
7
|
export { default as BisagSidebar } from './BisagSidebar';
|
|
6
8
|
export { default as BisagSidebarWithMap } from './BisagSidebarWithMap';
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@prashantgosai11/bisag-sidebar/dist/bisag-sidebar.css';
|
|
2
|
+
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
1
3
|
import { jsx as o, jsxs as P, Fragment as ut } from "react/jsx-runtime";
|
|
2
4
|
import cr, { createContext as dl, useState as X, useCallback as Xe, useContext as ul, useMemo as ie, useRef as le, useEffect as te } from "react";
|
|
3
5
|
import { Stack as Pe, TextInput as ft, SimpleGrid as pl, Box as G, Text as $, Group as Q, ActionIcon as He, Collapse as vr, Menu as we, UnstyledButton as Yt, Badge as Zt, Button as ot, NumberInput as gr, Switch as Xt, ColorInput as Fr, Slider as Vt, Select as At, Tooltip as gt, Modal as la, Tabs as Et, Anchor as fl, Checkbox as hl, LoadingOverlay as Ci, Textarea as gl, Divider as Ur, Progress as ml, ScrollArea as sa, Table as ir, Pagination as yl } from "@mantine/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prashantgosai11/bisag-sidebar",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Bisag-style sidebar for geospatial data visualization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"dev": "vite",
|
|
32
|
-
"build": "vite build && tsc -p tsconfig.build.json || true",
|
|
32
|
+
"build": "vite build && tsc -p tsconfig.build.json || true && node scripts/inject-css.js",
|
|
33
33
|
"preview": "vite preview",
|
|
34
34
|
"prepublishOnly": "npm run build"
|
|
35
35
|
},
|