From 2aed4da7cb943eff0757fefa0a064e95bf02b9d1 Mon Sep 17 00:00:00 2001 From: Giorgia Bosello Date: Thu, 22 Aug 2024 17:53:42 +0200 Subject: [PATCH] fix: update overlay projection from transform to style --- .eslintrc.json | 61 ------ dist/index.cjs | 2 +- dist/index.js | 2 +- docs/.eslintrc.json | 3 - docs/eslint.config.js | 5 + docs/src/app/layout.tsx | 2 +- docs/yarn.lock | 435 ++++++++++++++++++++++++++++++++++++++-- eslint.config.js | 82 ++++++++ package.json | 8 +- src/map/overlay.tsx | 6 +- 10 files changed, 521 insertions(+), 85 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 docs/.eslintrc.json create mode 100644 docs/eslint.config.js create mode 100644 eslint.config.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 118157d..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es2021": true, - "es6": true, - "node": true - }, - "extends": ["plugin:react/recommended", "airbnb", "prettier"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["react", "@typescript-eslint", "typescript-sort-keys", "unused-imports", "prettier", "prefer-arrow", "sort-class-members"], - "rules": { - "@typescript-eslint/no-unused-vars": "error", - "import/extensions": "off", - "import/no-extraneous-dependencies": "off", - "import/no-unresolved": "off", - "import/prefer-default-export": "off", - "no-nested-ternary": "off", - "no-plusplus": "off", - "no-unused-vars": "off", - "no-use-before-define": "off", - "prettier/prettier": ["error", { - "endOfLine": "auto" - }], - "react/destructuring-assignment": "off", - "react/function-component-definition": "off", - "react/jsx-filename-extension": "off", - "react/jsx-props-no-spreading": "off", - "react/react-in-jsx-scope": "off", - "react/require-default-props": "off", - "typescript-sort-keys/interface": "error", - "typescript-sort-keys/string-enum": "error", - "unused-imports/no-unused-imports": "error", - "prefer-arrow/prefer-arrow-functions": [ - "error", - { - "disallowPrototype": true, - "singleReturnOnly": true, - "classPropertiesAllowed": false - } - ], - "sort-class-members/sort-class-members": [ - "error", - { - "order": ["[static-properties]", "[properties]", "[conventional-private-properties]", "constructor", "[static-methods]", "[methods]", "[conventional-private-methods]"], - "accessorPairPositioning": "getThenSet" - } - ] - }, - "globals": { - "globalThis": "readonly", - "google": "readonly" - } -} diff --git a/dist/index.cjs b/dist/index.cjs index 289873d..773f62c 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -4,6 +4,6 @@ var react = require('react'); var reactDom = require('react-dom'); var jsxRuntime = require('react/jsx-runtime'); -var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?void 0:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:!1,shouldPreventLoad:!1}){let[l,s]=react.useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return react.useEffect(()=>{var p,n,m;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case"loading":case"ready":(n=t.callbacks)!=null&&n.onLoadCallback&&t.callbacks.onLoadCallback();break;case"error":(m=t.callbacks)!=null&&m.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=!0,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([g,d])=>e==null?void 0:e.setAttribute(g,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=g=>{let d=g.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let o=c=>{var d,M;let g=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(M=t.callbacks)!=null&&M.onErrorCallback&&t.callbacks.onErrorCallback(),s(g),S[t.src]=g;};return e.addEventListener("load",o),e.addEventListener("error",o),()=>{e&&(e.removeEventListener("load",o),e.removeEventListener("error",o)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=!1,status:l="idle",externalApiParams:s,callback:i})=>{var o;typeof window<"u"&&(window.googleMapsCallback=i);let u=(o=new URLSearchParams(s))==null?void 0:o.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:void 0)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return !1;return !0}return !1};var _=(t,r)=>{let a=react.useRef(),l=a.current,s=r(l,t);return react.useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",n=>{var m,c;this.container.style.cursor="grabbing",(m=e.map)==null||m.set("draggable",!1),e.set("origin",n),s.onDragStart(n,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?void 0:c.getDiv().addEventListener("mousemove",g=>{var b,f;let d=e.get("origin");if(!d)return;let M=d.clientX-g.clientX,y=d.clientY-g.clientY,v=(b=e.getProjection())==null?void 0:b.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?void 0:f.fromDivPixelToLatLng(new l.Point(v.x-M,v.y-y));e.set("position",E),e.set("origin",g),e.draw(),s.onDrag(g,{latLng:k(E)});});}),this.container.addEventListener("mouseup",n=>{var m;(m=e.map)==null||m.set("draggable",!0),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",void 0),e.draw(),s.onDragEnd(n,{latLng:k(e.position)});}));let o=(p=this.getPanes())==null?void 0:p[this.pane];o==null||o.classList.add("google-map-markers-overlay"),o==null||o.appendChild(this.container);};draw=()=>{let e=this.getProjection(),o=e==null?void 0:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};o&&(this.container.style.transform=`translate(${o.x-p.x}px, ${o.y-p.y}px)`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,o,p){super(),this.container=e,this.pane=o,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=react.useMemo(()=>{let n=document.createElement("div");return n.style.position="absolute",n},[]),o=react.useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?void 0:i.props,(n,m)=>n&&n.lat===m.lat&&n.lng===m.lng);return react.useEffect(()=>!o.map&&a?(o==null||o.setMap(a),()=>{o==null||o.setMap(null);}):()=>{},[a,p]),react.useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),reactDom.createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=react.useMemo(()=>!r||!a?[]:react.Children.map(t,s=>{if(react.isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=!1,onDragStart:o=P,onDrag:p=P,onDragEnd:n=P}=s.props||{};return s=react.cloneElement(s,{...s.props,onDragStart:void 0,onDrag:void 0,onDragEnd:void 0}),jsxRuntime.jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:o,onDrag:p,onDragEnd:n},children:s})}return null}),[t,r,a]);return jsxRuntime.jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let o=react.useRef(null),p=react.useRef([]),[n,m]=react.useState(),[c,g]=react.useState(),[d,M]=react.useState(!1),y=react.useCallback(()=>{var v,E;try{if(!n)return;let b=n.getZoom()??l,f=n.getBounds(),F=[(v=n.getCenter())==null?void 0:v.lng(),(E=n.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:b,center:F,bounds:f}),p.current=D);}catch(b){console.error(b);}},[n,i]);return react.useEffect(()=>{o.current&&!n&&(m(new google.maps.Map(o.current,{center:a,zoom:l,...u})),g(google.maps));},[a,l,n,o,u]),react.useEffect(()=>{n&&!d&&(typeof s=="function"&&c&&s({map:n,maps:c,ref:o.current}),M(!0),google.maps.event.hasListeners(n,"idle")&&google.maps.event.clearListeners(n,"idle"),google.maps.event.addListener(n,"idle",y));},[d,n,s]),react.useEffect(()=>()=>{n&&google.maps.event.clearListeners(n,"idle");},[n]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:o,style:r,className:"google-map",...e==null?void 0:e.reduce((v,{name:E,handler:b})=>(v[E]=b,v),{})}),t&&n&&c&&jsxRuntime.jsx($,{map:n,maps:c,children:t})]})}var q=le;var ue=react.forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:o=!1,status:p="idle",scriptCallback:n=()=>{},externalApiParams:m={},...c},g)=>{let d={ready:jsxRuntime.jsx(q,{...c,children:a}),loading:l,idle:s,error:i},M=O({apiKey:t,libraries:r,loadScriptExternally:o,status:p,externalApiParams:m,callback:n});return jsxRuntime.jsx("div",{ref:g,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[M]||null})}),B=ue;var qe=B; +var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?void 0:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:!1,shouldPreventLoad:!1}){let[l,s]=react.useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return react.useEffect(()=>{var p,n,m;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case"loading":case"ready":(n=t.callbacks)!=null&&n.onLoadCallback&&t.callbacks.onLoadCallback();break;case"error":(m=t.callbacks)!=null&&m.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=!0,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([g,d])=>e==null?void 0:e.setAttribute(g,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=g=>{let d=g.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let o=c=>{var d,M;let g=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(M=t.callbacks)!=null&&M.onErrorCallback&&t.callbacks.onErrorCallback(),s(g),S[t.src]=g;};return e.addEventListener("load",o),e.addEventListener("error",o),()=>{e&&(e.removeEventListener("load",o),e.removeEventListener("error",o)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=!1,status:l="idle",externalApiParams:s,callback:i})=>{var o;typeof window<"u"&&(window.googleMapsCallback=i);let u=(o=new URLSearchParams(s))==null?void 0:o.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:void 0)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return !1;return !0}return !1};var _=(t,r)=>{let a=react.useRef(),l=a.current,s=r(l,t);return react.useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",n=>{var m,c;this.container.style.cursor="grabbing",(m=e.map)==null||m.set("draggable",!1),e.set("origin",n),s.onDragStart(n,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?void 0:c.getDiv().addEventListener("mousemove",g=>{var b,f;let d=e.get("origin");if(!d)return;let M=d.clientX-g.clientX,y=d.clientY-g.clientY,v=(b=e.getProjection())==null?void 0:b.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?void 0:f.fromDivPixelToLatLng(new l.Point(v.x-M,v.y-y));e.set("position",E),e.set("origin",g),e.draw(),s.onDrag(g,{latLng:k(E)});});}),this.container.addEventListener("mouseup",n=>{var m;(m=e.map)==null||m.set("draggable",!0),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",void 0),e.draw(),s.onDragEnd(n,{latLng:k(e.position)});}));let o=(p=this.getPanes())==null?void 0:p[this.pane];o==null||o.classList.add("google-map-markers-overlay"),o==null||o.appendChild(this.container);};draw=()=>{let e=this.getProjection(),o=e==null?void 0:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};o&&(this.container.style.left=`${o.x-p.x}px`,this.container.style.top=`${o.y-p.y}px`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,o,p){super(),this.container=e,this.pane=o,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=react.useMemo(()=>{let n=document.createElement("div");return n.style.position="absolute",n},[]),o=react.useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?void 0:i.props,(n,m)=>n&&n.lat===m.lat&&n.lng===m.lng);return react.useEffect(()=>!o.map&&a?(o==null||o.setMap(a),()=>{o==null||o.setMap(null);}):()=>{},[a,p]),react.useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),reactDom.createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=react.useMemo(()=>!r||!a?[]:react.Children.map(t,s=>{if(react.isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=!1,onDragStart:o=P,onDrag:p=P,onDragEnd:n=P}=s.props||{};return s=react.cloneElement(s,{...s.props,onDragStart:void 0,onDrag:void 0,onDragEnd:void 0}),jsxRuntime.jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:o,onDrag:p,onDragEnd:n},children:s})}return null}),[t,r,a]);return jsxRuntime.jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let o=react.useRef(null),p=react.useRef([]),[n,m]=react.useState(),[c,g]=react.useState(),[d,M]=react.useState(!1),y=react.useCallback(()=>{var v,E;try{if(!n)return;let b=n.getZoom()??l,f=n.getBounds(),F=[(v=n.getCenter())==null?void 0:v.lng(),(E=n.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:b,center:F,bounds:f}),p.current=D);}catch(b){console.error(b);}},[n,i]);return react.useEffect(()=>{o.current&&!n&&(m(new google.maps.Map(o.current,{center:a,zoom:l,...u})),g(google.maps));},[a,l,n,o,u]),react.useEffect(()=>{n&&!d&&(typeof s=="function"&&c&&s({map:n,maps:c,ref:o.current}),M(!0),google.maps.event.hasListeners(n,"idle")&&google.maps.event.clearListeners(n,"idle"),google.maps.event.addListener(n,"idle",y));},[d,n,s]),react.useEffect(()=>()=>{n&&google.maps.event.clearListeners(n,"idle");},[n]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:o,style:r,className:"google-map",...e==null?void 0:e.reduce((v,{name:E,handler:b})=>(v[E]=b,v),{})}),t&&n&&c&&jsxRuntime.jsx($,{map:n,maps:c,children:t})]})}var q=le;var ue=react.forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:o=!1,status:p="idle",scriptCallback:n=()=>{},externalApiParams:m={},...c},g)=>{let d={ready:jsxRuntime.jsx(q,{...c,children:a}),loading:l,idle:s,error:i},M=O({apiKey:t,libraries:r,loadScriptExternally:o,status:p,externalApiParams:m,callback:n});return jsxRuntime.jsx("div",{ref:g,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[M]||null})}),B=ue;var qe=B; module.exports = qe; diff --git a/dist/index.js b/dist/index.js index 11dfbc0..3a1c51f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2,6 +2,6 @@ import { forwardRef, useRef, useState, useCallback, useEffect, useMemo, Children import { createPortal } from 'react-dom'; import { jsx, jsxs, Fragment } from 'react/jsx-runtime'; -var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?void 0:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:!1,shouldPreventLoad:!1}){let[l,s]=useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return useEffect(()=>{var p,n,m;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case"loading":case"ready":(n=t.callbacks)!=null&&n.onLoadCallback&&t.callbacks.onLoadCallback();break;case"error":(m=t.callbacks)!=null&&m.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=!0,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([g,d])=>e==null?void 0:e.setAttribute(g,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=g=>{let d=g.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let o=c=>{var d,M;let g=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(M=t.callbacks)!=null&&M.onErrorCallback&&t.callbacks.onErrorCallback(),s(g),S[t.src]=g;};return e.addEventListener("load",o),e.addEventListener("error",o),()=>{e&&(e.removeEventListener("load",o),e.removeEventListener("error",o)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=!1,status:l="idle",externalApiParams:s,callback:i})=>{var o;typeof window<"u"&&(window.googleMapsCallback=i);let u=(o=new URLSearchParams(s))==null?void 0:o.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:void 0)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return !1;return !0}return !1};var _=(t,r)=>{let a=useRef(),l=a.current,s=r(l,t);return useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",n=>{var m,c;this.container.style.cursor="grabbing",(m=e.map)==null||m.set("draggable",!1),e.set("origin",n),s.onDragStart(n,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?void 0:c.getDiv().addEventListener("mousemove",g=>{var b,f;let d=e.get("origin");if(!d)return;let M=d.clientX-g.clientX,y=d.clientY-g.clientY,v=(b=e.getProjection())==null?void 0:b.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?void 0:f.fromDivPixelToLatLng(new l.Point(v.x-M,v.y-y));e.set("position",E),e.set("origin",g),e.draw(),s.onDrag(g,{latLng:k(E)});});}),this.container.addEventListener("mouseup",n=>{var m;(m=e.map)==null||m.set("draggable",!0),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",void 0),e.draw(),s.onDragEnd(n,{latLng:k(e.position)});}));let o=(p=this.getPanes())==null?void 0:p[this.pane];o==null||o.classList.add("google-map-markers-overlay"),o==null||o.appendChild(this.container);};draw=()=>{let e=this.getProjection(),o=e==null?void 0:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};o&&(this.container.style.transform=`translate(${o.x-p.x}px, ${o.y-p.y}px)`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,o,p){super(),this.container=e,this.pane=o,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=useMemo(()=>{let n=document.createElement("div");return n.style.position="absolute",n},[]),o=useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?void 0:i.props,(n,m)=>n&&n.lat===m.lat&&n.lng===m.lng);return useEffect(()=>!o.map&&a?(o==null||o.setMap(a),()=>{o==null||o.setMap(null);}):()=>{},[a,p]),useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=useMemo(()=>!r||!a?[]:Children.map(t,s=>{if(isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=!1,onDragStart:o=P,onDrag:p=P,onDragEnd:n=P}=s.props||{};return s=cloneElement(s,{...s.props,onDragStart:void 0,onDrag:void 0,onDragEnd:void 0}),jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:o,onDrag:p,onDragEnd:n},children:s})}return null}),[t,r,a]);return jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let o=useRef(null),p=useRef([]),[n,m]=useState(),[c,g]=useState(),[d,M]=useState(!1),y=useCallback(()=>{var v,E;try{if(!n)return;let b=n.getZoom()??l,f=n.getBounds(),F=[(v=n.getCenter())==null?void 0:v.lng(),(E=n.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:b,center:F,bounds:f}),p.current=D);}catch(b){console.error(b);}},[n,i]);return useEffect(()=>{o.current&&!n&&(m(new google.maps.Map(o.current,{center:a,zoom:l,...u})),g(google.maps));},[a,l,n,o,u]),useEffect(()=>{n&&!d&&(typeof s=="function"&&c&&s({map:n,maps:c,ref:o.current}),M(!0),google.maps.event.hasListeners(n,"idle")&&google.maps.event.clearListeners(n,"idle"),google.maps.event.addListener(n,"idle",y));},[d,n,s]),useEffect(()=>()=>{n&&google.maps.event.clearListeners(n,"idle");},[n]),jsxs(Fragment,{children:[jsx("div",{ref:o,style:r,className:"google-map",...e==null?void 0:e.reduce((v,{name:E,handler:b})=>(v[E]=b,v),{})}),t&&n&&c&&jsx($,{map:n,maps:c,children:t})]})}var q=le;var ue=forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:o=!1,status:p="idle",scriptCallback:n=()=>{},externalApiParams:m={},...c},g)=>{let d={ready:jsx(q,{...c,children:a}),loading:l,idle:s,error:i},M=O({apiKey:t,libraries:r,loadScriptExternally:o,status:p,externalApiParams:m,callback:n});return jsx("div",{ref:g,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[M]||null})}),B=ue;var qe=B; +var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?void 0:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:!1,shouldPreventLoad:!1}){let[l,s]=useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return useEffect(()=>{var p,n,m;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case"loading":case"ready":(n=t.callbacks)!=null&&n.onLoadCallback&&t.callbacks.onLoadCallback();break;case"error":(m=t.callbacks)!=null&&m.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=!0,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([g,d])=>e==null?void 0:e.setAttribute(g,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=g=>{let d=g.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let o=c=>{var d,M;let g=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(M=t.callbacks)!=null&&M.onErrorCallback&&t.callbacks.onErrorCallback(),s(g),S[t.src]=g;};return e.addEventListener("load",o),e.addEventListener("error",o),()=>{e&&(e.removeEventListener("load",o),e.removeEventListener("error",o)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=!1,status:l="idle",externalApiParams:s,callback:i})=>{var o;typeof window<"u"&&(window.googleMapsCallback=i);let u=(o=new URLSearchParams(s))==null?void 0:o.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?void 0:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:void 0)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return !1;return !0}return !1};var _=(t,r)=>{let a=useRef(),l=a.current,s=r(l,t);return useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",n=>{var m,c;this.container.style.cursor="grabbing",(m=e.map)==null||m.set("draggable",!1),e.set("origin",n),s.onDragStart(n,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?void 0:c.getDiv().addEventListener("mousemove",g=>{var b,f;let d=e.get("origin");if(!d)return;let M=d.clientX-g.clientX,y=d.clientY-g.clientY,v=(b=e.getProjection())==null?void 0:b.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?void 0:f.fromDivPixelToLatLng(new l.Point(v.x-M,v.y-y));e.set("position",E),e.set("origin",g),e.draw(),s.onDrag(g,{latLng:k(E)});});}),this.container.addEventListener("mouseup",n=>{var m;(m=e.map)==null||m.set("draggable",!0),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",void 0),e.draw(),s.onDragEnd(n,{latLng:k(e.position)});}));let o=(p=this.getPanes())==null?void 0:p[this.pane];o==null||o.classList.add("google-map-markers-overlay"),o==null||o.appendChild(this.container);};draw=()=>{let e=this.getProjection(),o=e==null?void 0:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};o&&(this.container.style.left=`${o.x-p.x}px`,this.container.style.top=`${o.y-p.y}px`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,o,p){super(),this.container=e,this.pane=o,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=useMemo(()=>{let n=document.createElement("div");return n.style.position="absolute",n},[]),o=useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?void 0:i.props,(n,m)=>n&&n.lat===m.lat&&n.lng===m.lng);return useEffect(()=>!o.map&&a?(o==null||o.setMap(a),()=>{o==null||o.setMap(null);}):()=>{},[a,p]),useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=useMemo(()=>!r||!a?[]:Children.map(t,s=>{if(isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=!1,onDragStart:o=P,onDrag:p=P,onDragEnd:n=P}=s.props||{};return s=cloneElement(s,{...s.props,onDragStart:void 0,onDrag:void 0,onDragEnd:void 0}),jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:o,onDrag:p,onDragEnd:n},children:s})}return null}),[t,r,a]);return jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let o=useRef(null),p=useRef([]),[n,m]=useState(),[c,g]=useState(),[d,M]=useState(!1),y=useCallback(()=>{var v,E;try{if(!n)return;let b=n.getZoom()??l,f=n.getBounds(),F=[(v=n.getCenter())==null?void 0:v.lng(),(E=n.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:b,center:F,bounds:f}),p.current=D);}catch(b){console.error(b);}},[n,i]);return useEffect(()=>{o.current&&!n&&(m(new google.maps.Map(o.current,{center:a,zoom:l,...u})),g(google.maps));},[a,l,n,o,u]),useEffect(()=>{n&&!d&&(typeof s=="function"&&c&&s({map:n,maps:c,ref:o.current}),M(!0),google.maps.event.hasListeners(n,"idle")&&google.maps.event.clearListeners(n,"idle"),google.maps.event.addListener(n,"idle",y));},[d,n,s]),useEffect(()=>()=>{n&&google.maps.event.clearListeners(n,"idle");},[n]),jsxs(Fragment,{children:[jsx("div",{ref:o,style:r,className:"google-map",...e==null?void 0:e.reduce((v,{name:E,handler:b})=>(v[E]=b,v),{})}),t&&n&&c&&jsx($,{map:n,maps:c,children:t})]})}var q=le;var ue=forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:o=!1,status:p="idle",scriptCallback:n=()=>{},externalApiParams:m={},...c},g)=>{let d={ready:jsx(q,{...c,children:a}),loading:l,idle:s,error:i},M=O({apiKey:t,libraries:r,loadScriptExternally:o,status:p,externalApiParams:m,callback:n});return jsx("div",{ref:g,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[M]||null})}),B=ue;var qe=B; export { qe as default }; diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json deleted file mode 100644 index 72cc705..0000000 --- a/docs/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/docs/eslint.config.js b/docs/eslint.config.js new file mode 100644 index 0000000..e651edc --- /dev/null +++ b/docs/eslint.config.js @@ -0,0 +1,5 @@ +export default [ + { + extends: 'next/core-web-vitals', + }, +] diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx index c31ca47..8cc914e 100644 --- a/docs/src/app/layout.tsx +++ b/docs/src/app/layout.tsx @@ -13,7 +13,7 @@ export const metadata: Metadata = { export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - + {children} ) diff --git a/docs/yarn.lock b/docs/yarn.lock index 3f76222..ee26120 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -9,6 +9,62 @@ dependencies: regenerator-runtime "^0.14.0" +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.6.1": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.3.0.tgz#2e8f65c9c55227abc4845b1513c69c32c679d8fe" + integrity sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw== + +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== + dependencies: + "@humanwhocodes/object-schema" "^2.0.3" + debug "^4.3.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== + +"@humanwhocodes/retry@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" + integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -91,7 +147,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -123,12 +179,28 @@ "@types/node@link:../node_modules/@types/node": version "0.0.0" + uid "" + +"@types/prop-types@*": + version "15.7.12" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" + integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== "@types/react-dom@link:../node_modules/@types/react-dom": version "0.0.0" + uid "" + +"@types/react@*": + version "18.3.4" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.4.tgz#dfdd534a1d081307144c00e325c06e00312c93a3" + integrity sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" "@types/react@link:../node_modules/@types/react": version "0.0.0" + uid "" "@typescript-eslint/parser@^5.4.2 || ^6.0.0": version "6.9.0" @@ -175,6 +247,26 @@ "@typescript-eslint/types" "6.9.0" eslint-visitor-keys "^3.4.1" +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.12.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -185,7 +277,7 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -197,6 +289,11 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + aria-query@^5.1.3: version "5.3.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" @@ -355,10 +452,23 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + caniuse-lite@^1.0.30001579: - version "1.0.30001589" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz#7ad6dba4c9bf6561aec8291976402339dc157dfb" - integrity sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg== + version "1.0.30001651" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz" + integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" client-only@0.0.1: version "0.0.1" @@ -382,7 +492,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -391,6 +501,11 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" +csstype@^3.0.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -403,6 +518,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.1, debug@^4.3.2: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -410,6 +532,11 @@ debug@^4.3.4: dependencies: ms "2.1.2" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + define-data-property@^1.0.1, define-data-property@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" @@ -560,6 +687,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + eslint-config-next@14.1.0: version "14.1.0" resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-14.1.0.tgz#7e309d426b8afacaba3b32fdbb02ba220b6d0a97" @@ -676,15 +808,52 @@ eslint-plugin-react@^7.33.2: semver "^6.3.1" string.prototype.matchall "^4.0.8" -eslint-visitor-keys@^3.4.1: +eslint-scope@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" + integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== + "eslint@link:../node_modules/eslint": version "0.0.0" + uid "" + +espree@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" + integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== + dependencies: + acorn "^8.12.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.0.0" -estraverse@^5.3.0: +esquery@^1.4.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -694,6 +863,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + fast-glob@^3.2.9, fast-glob@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" @@ -705,6 +879,16 @@ fast-glob@^3.2.9, fast-glob@^3.3.1: merge2 "^1.3.0" micromatch "^4.0.4" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -712,6 +896,13 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -719,6 +910,27 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -786,6 +998,13 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@10.3.10: version "10.3.10" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" @@ -797,6 +1016,11 @@ glob@10.3.10: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -817,7 +1041,8 @@ globby@^11.1.0: slash "^3.0.0" "google-maps-react-markers@link:..": - version "2.0.10" + version "0.0.0" + uid "" gopd@^1.0.1: version "1.0.1" @@ -836,6 +1061,11 @@ has-bigints@^1.0.1, has-bigints@^1.0.2: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-property-descriptors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" @@ -877,6 +1107,19 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + internal-slot@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" @@ -960,7 +1203,7 @@ is-generator-function@^1.0.10: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.1, is-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -989,6 +1232,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -1085,6 +1333,28 @@ jackspeak@^2.3.5: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -1102,6 +1372,13 @@ json5@^1.0.2: object.assign "^4.1.4" object.values "^1.1.6" +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + language-subtag-registry@~0.3.2: version "0.3.22" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" @@ -1114,7 +1391,27 @@ language-tags@=1.0.5: dependencies: language-subtag-registry "~0.3.2" -loose-envify@^1.4.0: +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -1146,7 +1443,7 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -minimatch@^3.1.2: +minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -1185,6 +1482,11 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + next@14.1.1: version "14.1.1" resolved "https://registry.yarnpkg.com/next/-/next-14.1.1.tgz#92bd603996c050422a738e90362dff758459a171" @@ -1278,6 +1580,44 @@ object.values@^1.1.6, object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -1320,6 +1660,11 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -1329,6 +1674,11 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -1336,6 +1686,7 @@ queue-microtask@^1.2.2: "react-dom@link:../node_modules/react-dom": version "0.0.0" + uid "" react-is@^16.13.1: version "16.13.1" @@ -1344,6 +1695,7 @@ react-is@^16.13.1: "react@link:../node_modules/react": version "0.0.0" + uid "" reflect.getprototypeof@^1.0.4: version "1.0.4" @@ -1371,6 +1723,11 @@ regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-pkg-maps@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" @@ -1425,6 +1782,13 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +scheduler@^0.23.2: + version "0.23.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" + integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== + dependencies: + loose-envify "^1.1.0" + semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -1592,6 +1956,11 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + styled-jsx@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" @@ -1599,6 +1968,13 @@ styled-jsx@5.1.1: dependencies: client-only "0.0.1" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -1609,6 +1985,11 @@ tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -1636,6 +2017,13 @@ tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -1677,6 +2065,7 @@ typed-array-length@^1.0.4: "typescript@link:../node_modules/typescript": version "0.0.0" + uid "" unbox-primitive@^1.0.2: version "1.0.2" @@ -1688,6 +2077,18 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -1745,6 +2146,11 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -1767,3 +2173,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..88e2096 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,82 @@ +export default [ + { + root: true, + env: { + browser: true, + es2021: true, + es6: true, + node: true, + }, + extends: ['plugin:react/recommended', 'airbnb', 'prettier'], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + ecmaVersion: 'latest', + sourceType: 'module', + }, + plugins: [ + 'react', + '@typescript-eslint', + 'typescript-sort-keys', + 'unused-imports', + 'prettier', + 'prefer-arrow', + 'sort-class-members', + ], + rules: { + '@typescript-eslint/no-unused-vars': 'error', + 'import/extensions': 'off', + 'import/no-extraneous-dependencies': 'off', + 'import/no-unresolved': 'off', + 'import/prefer-default-export': 'off', + 'no-nested-ternary': 'off', + 'no-plusplus': 'off', + 'no-unused-vars': 'off', + 'no-use-before-define': 'off', + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', + }, + ], + 'react/destructuring-assignment': 'off', + 'react/function-component-definition': 'off', + 'react/jsx-filename-extension': 'off', + 'react/jsx-props-no-spreading': 'off', + 'react/react-in-jsx-scope': 'off', + 'react/require-default-props': 'off', + 'typescript-sort-keys/interface': 'error', + 'typescript-sort-keys/string-enum': 'error', + 'unused-imports/no-unused-imports': 'error', + 'prefer-arrow/prefer-arrow-functions': [ + 'error', + { + disallowPrototype: true, + singleReturnOnly: true, + classPropertiesAllowed: false, + }, + ], + 'sort-class-members/sort-class-members': [ + 'error', + { + order: [ + '[static-properties]', + '[properties]', + '[conventional-private-properties]', + 'constructor', + '[static-methods]', + '[methods]', + '[conventional-private-methods]', + ], + accessorPairPositioning: 'getThenSet', + }, + ], + }, + globals: { + globalThis: 'readonly', + google: 'readonly', + }, + }, +] diff --git a/package.json b/package.json index c2ebd25..7a3a298 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "google-maps-react-markers", - "version": "2.0.10", + "version": "2.0.11", "description": "Google Maps library that accepts markers as react components, works with React 18+ and it is fully typed.", "author": "Giorgia Bosello", "license": "MIT", @@ -34,9 +34,9 @@ "dev": "concurrently \"yarn build --watch\"", "build": "tsup --onSuccess \"yarn link:self\"", "type-check": "tsc", - "lint": "eslint --ignore-path .gitignore \"{src,docs/src}/**/*.+(ts|js|tsx)\"", + "lint": "eslint --ignore-pattern .gitignore \"{src,docs/src}/**/*.+(ts|js|tsx)\"", "lint:fix": "yarn lint --fix && prettier --write .", - "prepare": "husky install", + "prepare": "husky || true", "commit": "cz", "release": "yarn build && yarn release-it", "link:self": "yarn yalc publish && yarn link", @@ -47,7 +47,7 @@ ], "lint-staged": { "./{src,tests}/**/*.{ts,js,jsx,tsx}": [ - "eslint --ignore-path .gitignore --fix" + "eslint --ignore-pattern .gitignore --fix" ], "*": "prettier --write" }, diff --git a/src/map/overlay.tsx b/src/map/overlay.tsx index d2ee421..25ebf6c 100644 --- a/src/map/overlay.tsx +++ b/src/map/overlay.tsx @@ -73,15 +73,17 @@ const createOverlay = ({ container, pane, position, maps, drag }: createOverlayP const projection = this.getProjection() as google.maps.MapCanvasProjection // Computes the pixel coordinates of the given geographical location in the DOM element that holds the draggable map. const point = projection?.fromLatLngToDivPixel(this.position) as google.maps.Point - + // Manage offset for the overlay, since the overlay is centered on the point // we need to offset the overlay by half of its width and height // to make the overlay appear where the point is const offset = { x: this.container.offsetWidth / 2, y: this.container.offsetHeight / 2 } if (!point) return - this.container.style.transform = `translate(${point.x - offset.x}px, ${point.y - offset.y}px)` + // Set the overlay's position + this.container.style.left = `${point.x - offset.x}px` + this.container.style.top = `${point.y - offset.y}px` } /**