@carto/ps-react-maps 0.0.1-beta.1 → 0.0.1-beta.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/dist/index.cjs +5 -5
- package/dist/index.js +72 -67
- package/dist/types/{src/map-provider → map-provider}/map-provider.context.d.ts +0 -1
- package/dist/types/map-provider/map-provider.provider.d.ts +2 -0
- package/dist/types/{src/map-provider → map-provider}/map-provider.types.d.ts +5 -0
- package/package.json +4 -9
- package/dist/types/src/map-provider/map-provider.hook.test.d.ts +0 -1
- package/dist/types/src/map-provider/map-provider.provider.d.ts +0 -2
- package/dist/types/src/map-provider/map-provider.stories.d.ts +0 -21
- package/dist/types/tests/utils/test-utils.d.ts +0 -10
- /package/dist/types/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/types/{src/map-provider → map-provider}/index.d.ts +0 -0
- /package/dist/types/{src/map-provider → map-provider}/map-provider.const.d.ts +0 -0
- /package/dist/types/{src/map-provider → map-provider}/map-provider.hook.d.ts +0 -0
- /package/dist/types/{src/map-provider → map-provider}/map-provider.reducer.d.ts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react");var ke=(a=>(a.Roadmap="roadmap",a.Satellite="satellite",a.Terrain="terrain",a))(ke||{}),Ae=(a=>(a.DarkMatter="dark-matter",a.Positron="positron",a.Voyager="voyager",a))(Ae||{});const mr={positron:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",voyager:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json","dark-matter":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},z=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},W={state:{maps:{}},actions:{setViewState:z,setBasemap:z,setResize:z,setZoom:z}},re=h.createContext(W.state),te=h.createContext(W.actions);var F=(a=>(a.SetViewState="SetViewState",a.SetBasemap="SetBasemap",a.SetResize="SetResize",a.SetZoom="SetZoom",a))(F||{});function De(a,{type:S,payload:T}){return{SetViewState:()=>{const{id:u,viewState:m}=T,p={...a.maps};return p[u]={...a.maps[u],viewState:m},{...a,maps:p}},SetResize:()=>{const{id:u,width:m,height:p}=T,E={...a.maps};return E[u]={...a.maps[u],viewState:{...a.maps[u].viewState,width:m,height:p}},{...a,maps:E}},SetBasemap:()=>{const{id:u,basemap:m}=T,p={...a.maps};return p[u]={...a.maps[u],basemap:m},{...a,maps:p}},SetZoom:()=>{const{id:u,zoom:m}=T,p={...a.maps};return p[u]={...a.maps[u],viewState:{...a.maps[u].viewState,zoom:m}},{...a,maps:p}}}[S]?.()??a}function yr(){return h.useContext(re)}function gr(){return h.useContext(te)}var ee={exports:{}},V={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Oe;function br(){if(Oe)return V;Oe=1;var a=h,S=Symbol.for("react.element"),T=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,u=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function p(E,y,O){var g,l={},f=null,x=null;O!==void 0&&(f=""+O),y.key!==void 0&&(f=""+y.key),y.ref!==void 0&&(x=y.ref);for(g in y)C.call(y,g)&&!m.hasOwnProperty(g)&&(l[g]=y[g]);if(E&&E.defaultProps)for(g in y=E.defaultProps,y)l[g]===void 0&&(l[g]=y[g]);return{$$typeof:S,type:E,key:f,ref:x,props:l,_owner:u.current}}return V.Fragment=T,V.jsx=p,V.jsxs=p,V}var $={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var xe;function Rr(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){var a=h,S=Symbol.for("react.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),E=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),ne=Symbol.iterator,Fe="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ne&&e[ne]||e[Fe];return typeof r=="function"?r:null}var k=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Me("error",e,t)}}function Me(e,r,t){{var n=k.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var Ve=!1,$e=!1,We=!1,Ye=!1,Le=!1,ae;ae=Symbol.for("react.module.reference");function Ne(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===m||Le||e===u||e===O||e===g||Ye||e===x||Ve||$e||We||typeof e=="object"&&e!==null&&(e.$$typeof===f||e.$$typeof===l||e.$$typeof===p||e.$$typeof===E||e.$$typeof===y||e.$$typeof===ae||e.getModuleId!==void 0))}function Ue(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function oe(e){return e.displayName||"Context"}function w(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case T:return"Portal";case m:return"Profiler";case u:return"StrictMode";case O:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return oe(r)+".Consumer";case p:var t=e;return oe(t._context)+".Provider";case y:return Ue(e,e.render,"ForwardRef");case l:var n=e.displayName||null;return n!==null?n:w(e.type)||"Memo";case f:{var s=e,c=s._payload,i=s._init;try{return w(i(c))}catch{return null}}}return null}var j=Object.assign,I=0,ie,se,ue,ce,le,fe,de;function ve(){}ve.__reactDisabledLog=!0;function Be(){{if(I===0){ie=console.log,se=console.info,ue=console.warn,ce=console.error,le=console.group,fe=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function ze(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:ie}),info:j({},e,{value:se}),warn:j({},e,{value:ue}),error:j({},e,{value:ce}),group:j({},e,{value:le}),groupCollapsed:j({},e,{value:fe}),groupEnd:j({},e,{value:de})})}I<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=k.ReactCurrentDispatcher,J;function Y(e,r,t){{if(J===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
|
|
18
18
|
`+J+e}}var Z=!1,L;{var qe=typeof WeakMap=="function"?WeakMap:Map;L=new qe}function pe(e,r){if(!e||Z)return"";{var t=L.get(e);if(t!==void 0)return t}var n;Z=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=q.current,q.current=null,Be();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(P){n=P}Reflect.construct(e,[],i)}else{try{i.call()}catch(P){n=P}e.call(i.prototype)}}else{try{throw Error()}catch(P){n=P}e()}}catch(P){if(P&&n&&typeof P.stack=="string"){for(var o=P.stack.split(`
|
|
19
19
|
`),R=n.stack.split(`
|
|
20
20
|
`),d=o.length-1,v=R.length-1;d>=1&&v>=0&&o[d]!==R[v];)v--;for(;d>=1&&v>=0;d--,v--)if(o[d]!==R[v]){if(d!==1||v!==1)do if(d--,v--,v<0||o[d]!==R[v]){var _=`
|
|
21
|
-
`+o[d].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,_),_}while(d>=1&&v>=0);break}}}finally{Z=!1,q.current=c,ze(),Error.prepareStackTrace=s}var
|
|
21
|
+
`+o[d].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,_),_}while(d>=1&&v>=0);break}}}finally{Z=!1,q.current=c,ze(),Error.prepareStackTrace=s}var D=e?e.displayName||e.name:"",Pe=D?Y(D):"";return typeof e=="function"&&L.set(e,Pe),Pe}function Je(e,r,t){return pe(e,!1)}function Ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Ze(e));if(typeof e=="string")return Y(e);switch(e){case O:return Y("Suspense");case g:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case y:return Je(e.render);case l:return N(e.type,r,t);case f:{var n=e,s=n._payload,c=n._init;try{return N(c(s),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,me={},ye=k.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Ge(e,r,t,n,s){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var R=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}o=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){o=d}o&&!(o instanceof Error)&&(B(s),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof o),B(null)),o instanceof Error&&!(o.message in me)&&(me[o.message]=!0,B(s),b("Failed %s type: %s",t,o.message),B(null))}}}var Ke=Array.isArray;function G(e){return Ke(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Xe(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function be(e){if(Xe(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),ge(e)}var M=k.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Re,he,K;K={};function er(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=w(M.current.type);K[t]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(M.current.type),e.ref),K[t]=!0)}}function nr(e,r){{var t=function(){Re||(Re=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){he||(he=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var or=function(e,r,t,n,s,c,i){var o={$$typeof:S,type:e,key:r,ref:t,props:i,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ir(e,r,t,n,s){{var c,i={},o=null,R=null;t!==void 0&&(be(t),o=""+t),rr(r)&&(be(r.key),o=""+r.key),er(r)&&(R=r.ref,tr(r,s));for(c in r)U.call(r,c)&&!Qe.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)i[c]===void 0&&(i[c]=d[c])}if(o||R){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&nr(i,v),R&&ar(i,v)}return or(e,o,R,s,n,M.current,i)}}var H=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var X;X=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}function _e(){{if(H.current){var e=w(H.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var Se={};function ur(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function Te(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Se[t])return;Se[t]=!0;var n="";e&&e._owner&&e._owner!==H.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Te(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Se[t])return;Se[t]=!0;var n="";e&&e._owner&&e._owner!==H.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),A(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Te(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var s=Ie(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)Q(i.value)&&Te(i.value,r)}}}function cr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===y||r.$$typeof===l))t=r.propTypes;else return;if(t){var n=w(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!X){X=!0;var s=w(r);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function we(e,r,t,n,s,c){{var i=Ne(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=sr(s);R?o+=R:o+=_e();var d;e===null?d="null":G(e)?d="array":e!==void 0&&e.$$typeof===S?(d="<"+(w(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,o)}var v=ir(e,r,t,s,c);if(v==null)return v;if(i){var _=r.children;if(_!==void 0)if(n)if(G(_)){for(var D=0;D<_.length;D++)Ce(_[D],e);Object.freeze&&Object.freeze(_)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(_,e)}return e===C?lr(v):cr(v),v}}function fr(e,r,t){return we(e,r,t,!0)}function dr(e,r,t){return we(e,r,t,!1)}var vr=dr,pr=fr;$.Fragment=C,$.jsx=vr,$.jsxs=pr}()),$}process.env.NODE_ENV==="production"?ee.exports=br():ee.exports=Rr();var je=ee.exports;function hr({children:a,maps:S,externalSync:T}){const[C,u]=h.useReducer(De,{...W.state,maps:S.reduce((l,f)=>(l[f.id]=f,l),W.state.maps)}),m=h.useCallback((l,f)=>{S[0].id===l&&T?.({type:F.SetViewState,payload:f})},[T,S]),p=h.useCallback((l,f)=>{u({type:F.SetViewState,payload:{id:l,viewState:f}}),m(l,f)},[u,m]),E=h.useCallback((l,{height:f,width:x})=>{u({type:F.SetResize,payload:{id:l,height:f,width:x}}),m(l,{height:f,width:x})},[u,m]),y=h.useCallback((l,f)=>{u({type:F.SetBasemap,payload:{id:l,basemap:f}})},[u]),O=h.useCallback((l,f)=>{u({type:F.SetZoom,payload:{id:l,zoom:f}})},[u]),g=h.useRef({setViewState:p,setBasemap:y,setResize:E,setZoom:O});return je.jsx(te.Provider,{value:g.current,children:je.jsx(re.Provider,{value:C,children:a})})}exports.CartoBasemapURL=mr;exports.CartoBasemapsNames=Ae;exports.GMapsBasemap=ke;exports.INITIAL_STATE=W;exports.MapActionsContext=te;exports.MapContext=re;exports.MapProvider=hr;exports.reducer=De;exports.useMap=yr;exports.useMapActions=gr;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import xe, { createContext as je, useContext as ke, useReducer as mr, useCallback as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var br = /* @__PURE__ */ ((a) => (a.Roadmap = "roadmap", a.Satellite = "satellite", a.Terrain = "terrain", a))(br || {}), hr = /* @__PURE__ */ ((a) => (a.DarkMatter = "dark-matter", a.Positron = "positron", a.Voyager = "voyager", a))(hr || {});
|
|
5
|
-
const Pr = {
|
|
1
|
+
import xe, { createContext as je, useContext as ke, useReducer as mr, useCallback as V, useRef as yr } from "react";
|
|
2
|
+
var gr = /* @__PURE__ */ ((a) => (a.Roadmap = "roadmap", a.Satellite = "satellite", a.Terrain = "terrain", a))(gr || {}), Rr = /* @__PURE__ */ ((a) => (a.DarkMatter = "dark-matter", a.Positron = "positron", a.Voyager = "voyager", a))(Rr || {});
|
|
3
|
+
const Sr = {
|
|
6
4
|
positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
7
5
|
voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
8
6
|
"dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
@@ -25,8 +23,8 @@ const Pr = {
|
|
|
25
23
|
), Fe = je(
|
|
26
24
|
B.actions
|
|
27
25
|
);
|
|
28
|
-
var
|
|
29
|
-
function
|
|
26
|
+
var F = /* @__PURE__ */ ((a) => (a.SetViewState = "SetViewState", a.SetBasemap = "SetBasemap", a.SetResize = "SetResize", a.SetZoom = "SetZoom", a))(F || {});
|
|
27
|
+
function br(a, { type: _, payload: S }) {
|
|
30
28
|
return {
|
|
31
29
|
SetViewState: () => {
|
|
32
30
|
const { id: u, viewState: m } = S, p = { ...a.maps };
|
|
@@ -77,13 +75,13 @@ function Er(a, { type: _, payload: S }) {
|
|
|
77
75
|
}
|
|
78
76
|
}[_]?.() ?? a;
|
|
79
77
|
}
|
|
80
|
-
function
|
|
78
|
+
function Tr() {
|
|
81
79
|
return ke(De);
|
|
82
80
|
}
|
|
83
|
-
function
|
|
81
|
+
function wr() {
|
|
84
82
|
return ke(Fe);
|
|
85
83
|
}
|
|
86
|
-
var ee = { exports: {} },
|
|
84
|
+
var ee = { exports: {} }, $ = {};
|
|
87
85
|
/**
|
|
88
86
|
* @license React
|
|
89
87
|
* react-jsx-runtime.production.min.js
|
|
@@ -94,24 +92,24 @@ var ee = { exports: {} }, V = {};
|
|
|
94
92
|
* LICENSE file in the root directory of this source tree.
|
|
95
93
|
*/
|
|
96
94
|
var Ce;
|
|
97
|
-
function
|
|
95
|
+
function hr() {
|
|
98
96
|
if (Ce)
|
|
99
|
-
return
|
|
97
|
+
return $;
|
|
100
98
|
Ce = 1;
|
|
101
|
-
var a = xe, _ = Symbol.for("react.element"), S = Symbol.for("react.fragment"),
|
|
99
|
+
var a = xe, _ = Symbol.for("react.element"), S = Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
102
100
|
function p(h, y, P) {
|
|
103
101
|
var g, l = {}, f = null, O = null;
|
|
104
102
|
P !== void 0 && (f = "" + P), y.key !== void 0 && (f = "" + y.key), y.ref !== void 0 && (O = y.ref);
|
|
105
103
|
for (g in y)
|
|
106
|
-
|
|
104
|
+
T.call(y, g) && !m.hasOwnProperty(g) && (l[g] = y[g]);
|
|
107
105
|
if (h && h.defaultProps)
|
|
108
106
|
for (g in y = h.defaultProps, y)
|
|
109
107
|
l[g] === void 0 && (l[g] = y[g]);
|
|
110
108
|
return { $$typeof: _, type: h, key: f, ref: O, props: l, _owner: u.current };
|
|
111
109
|
}
|
|
112
|
-
return
|
|
110
|
+
return $.Fragment = S, $.jsx = p, $.jsxs = p, $;
|
|
113
111
|
}
|
|
114
|
-
var
|
|
112
|
+
var W = {};
|
|
115
113
|
/**
|
|
116
114
|
* @license React
|
|
117
115
|
* react-jsx-runtime.development.js
|
|
@@ -122,9 +120,9 @@ var $ = {};
|
|
|
122
120
|
* LICENSE file in the root directory of this source tree.
|
|
123
121
|
*/
|
|
124
122
|
var Pe;
|
|
125
|
-
function
|
|
123
|
+
function Er() {
|
|
126
124
|
return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
127
|
-
var a = xe, _ = Symbol.for("react.element"), S = Symbol.for("react.portal"),
|
|
125
|
+
var a = xe, _ = Symbol.for("react.element"), S = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), h = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), re = Symbol.iterator, Ae = "@@iterator";
|
|
128
126
|
function Ie(e) {
|
|
129
127
|
if (e === null || typeof e != "object")
|
|
130
128
|
return null;
|
|
@@ -152,7 +150,7 @@ function Sr() {
|
|
|
152
150
|
var $e = !1, We = !1, Ye = !1, Me = !1, Le = !1, te;
|
|
153
151
|
te = Symbol.for("react.module.reference");
|
|
154
152
|
function Ne(e) {
|
|
155
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
153
|
+
return !!(typeof e == "string" || typeof e == "function" || e === T || e === m || Le || e === u || e === P || e === g || Me || e === O || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === l || e.$$typeof === p || e.$$typeof === h || e.$$typeof === y || // This needs to include all possible module reference object
|
|
156
154
|
// types supported by any Flight configuration anywhere since
|
|
157
155
|
// we don't know which Flight build this will end up being used
|
|
158
156
|
// with.
|
|
@@ -168,7 +166,7 @@ function Sr() {
|
|
|
168
166
|
function ne(e) {
|
|
169
167
|
return e.displayName || "Context";
|
|
170
168
|
}
|
|
171
|
-
function
|
|
169
|
+
function w(e) {
|
|
172
170
|
if (e == null)
|
|
173
171
|
return null;
|
|
174
172
|
if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -176,7 +174,7 @@ function Sr() {
|
|
|
176
174
|
if (typeof e == "string")
|
|
177
175
|
return e;
|
|
178
176
|
switch (e) {
|
|
179
|
-
case
|
|
177
|
+
case T:
|
|
180
178
|
return "Fragment";
|
|
181
179
|
case S:
|
|
182
180
|
return "Portal";
|
|
@@ -201,11 +199,11 @@ function Sr() {
|
|
|
201
199
|
return Ue(e, e.render, "ForwardRef");
|
|
202
200
|
case l:
|
|
203
201
|
var n = e.displayName || null;
|
|
204
|
-
return n !== null ? n :
|
|
202
|
+
return n !== null ? n : w(e.type) || "Memo";
|
|
205
203
|
case f: {
|
|
206
204
|
var s = e, c = s._payload, i = s._init;
|
|
207
205
|
try {
|
|
208
|
-
return
|
|
206
|
+
return w(i(c));
|
|
209
207
|
} catch {
|
|
210
208
|
return null;
|
|
211
209
|
}
|
|
@@ -213,13 +211,13 @@ function Sr() {
|
|
|
213
211
|
}
|
|
214
212
|
return null;
|
|
215
213
|
}
|
|
216
|
-
var x = Object.assign,
|
|
214
|
+
var x = Object.assign, A = 0, ae, oe, ie, se, ue, ce, le;
|
|
217
215
|
function fe() {
|
|
218
216
|
}
|
|
219
217
|
fe.__reactDisabledLog = !0;
|
|
220
218
|
function ze() {
|
|
221
219
|
{
|
|
222
|
-
if (
|
|
220
|
+
if (A === 0) {
|
|
223
221
|
ae = console.log, oe = console.info, ie = console.warn, se = console.error, ue = console.group, ce = console.groupCollapsed, le = console.groupEnd;
|
|
224
222
|
var e = {
|
|
225
223
|
configurable: !0,
|
|
@@ -237,12 +235,12 @@ function Sr() {
|
|
|
237
235
|
groupEnd: e
|
|
238
236
|
});
|
|
239
237
|
}
|
|
240
|
-
|
|
238
|
+
A++;
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
241
|
function Be() {
|
|
244
242
|
{
|
|
245
|
-
if (
|
|
243
|
+
if (A--, A === 0) {
|
|
246
244
|
var e = {
|
|
247
245
|
configurable: !0,
|
|
248
246
|
enumerable: !0,
|
|
@@ -272,7 +270,7 @@ function Sr() {
|
|
|
272
270
|
})
|
|
273
271
|
});
|
|
274
272
|
}
|
|
275
|
-
|
|
273
|
+
A < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
276
274
|
}
|
|
277
275
|
}
|
|
278
276
|
var q = j.ReactCurrentDispatcher, J;
|
|
@@ -362,8 +360,8 @@ function Sr() {
|
|
|
362
360
|
} finally {
|
|
363
361
|
Z = !1, q.current = c, Be(), Error.prepareStackTrace = s;
|
|
364
362
|
}
|
|
365
|
-
var D = e ? e.displayName || e.name : "",
|
|
366
|
-
return typeof e == "function" && M.set(e,
|
|
363
|
+
var D = e ? e.displayName || e.name : "", we = D ? Y(D) : "";
|
|
364
|
+
return typeof e == "function" && M.set(e, we), we;
|
|
367
365
|
}
|
|
368
366
|
function Je(e, r, t) {
|
|
369
367
|
return de(e, !1);
|
|
@@ -452,7 +450,7 @@ function Sr() {
|
|
|
452
450
|
if (Xe(e))
|
|
453
451
|
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), me(e);
|
|
454
452
|
}
|
|
455
|
-
var
|
|
453
|
+
var I = j.ReactCurrentOwner, Qe = {
|
|
456
454
|
key: !0,
|
|
457
455
|
ref: !0,
|
|
458
456
|
__self: !0,
|
|
@@ -476,9 +474,9 @@ function Sr() {
|
|
|
476
474
|
return e.key !== void 0;
|
|
477
475
|
}
|
|
478
476
|
function tr(e, r) {
|
|
479
|
-
if (typeof e.ref == "string" &&
|
|
480
|
-
var t =
|
|
481
|
-
K[t] || (R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
477
|
+
if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) {
|
|
478
|
+
var t = w(I.current.type);
|
|
479
|
+
K[t] || (R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', w(I.current.type), e.ref), K[t] = !0);
|
|
482
480
|
}
|
|
483
481
|
}
|
|
484
482
|
function nr(e, r) {
|
|
@@ -547,7 +545,7 @@ function Sr() {
|
|
|
547
545
|
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
548
546
|
o && nr(i, v), b && ar(i, v);
|
|
549
547
|
}
|
|
550
|
-
return or(e, o, b, s, n,
|
|
548
|
+
return or(e, o, b, s, n, I.current, i);
|
|
551
549
|
}
|
|
552
550
|
}
|
|
553
551
|
var H = j.ReactCurrentOwner, be = j.ReactDebugCurrentFrame;
|
|
@@ -566,7 +564,7 @@ function Sr() {
|
|
|
566
564
|
function he() {
|
|
567
565
|
{
|
|
568
566
|
if (H.current) {
|
|
569
|
-
var e =
|
|
567
|
+
var e = w(H.current.type);
|
|
570
568
|
if (e)
|
|
571
569
|
return `
|
|
572
570
|
|
|
@@ -609,7 +607,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
609
607
|
return;
|
|
610
608
|
Ee[t] = !0;
|
|
611
609
|
var n = "";
|
|
612
|
-
e && e._owner && e._owner !== H.current && (n = " It was passed a child from " +
|
|
610
|
+
e && e._owner && e._owner !== H.current && (n = " It was passed a child from " + w(e._owner.type) + "."), k(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
|
|
613
611
|
}
|
|
614
612
|
}
|
|
615
613
|
function Se(e, r) {
|
|
@@ -646,11 +644,11 @@ Check the top-level render call using <` + t + ">.");
|
|
|
646
644
|
else
|
|
647
645
|
return;
|
|
648
646
|
if (t) {
|
|
649
|
-
var n =
|
|
647
|
+
var n = w(r);
|
|
650
648
|
Ge(t, e.props, "prop", n, e);
|
|
651
649
|
} else if (r.PropTypes !== void 0 && !X) {
|
|
652
650
|
X = !0;
|
|
653
|
-
var s =
|
|
651
|
+
var s = w(r);
|
|
654
652
|
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
655
653
|
}
|
|
656
654
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -668,7 +666,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
668
666
|
e.ref !== null && (k(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
669
667
|
}
|
|
670
668
|
}
|
|
671
|
-
function
|
|
669
|
+
function Te(e, r, t, n, s, c) {
|
|
672
670
|
{
|
|
673
671
|
var i = Ne(e);
|
|
674
672
|
if (!i) {
|
|
@@ -677,7 +675,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
677
675
|
var b = sr(s);
|
|
678
676
|
b ? o += b : o += he();
|
|
679
677
|
var d;
|
|
680
|
-
e === null ? d = "null" : G(e) ? d = "array" : e !== void 0 && e.$$typeof === _ ? (d = "<" + (
|
|
678
|
+
e === null ? d = "null" : G(e) ? d = "array" : e !== void 0 && e.$$typeof === _ ? (d = "<" + (w(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, o);
|
|
681
679
|
}
|
|
682
680
|
var v = ir(e, r, t, s, c);
|
|
683
681
|
if (v == null)
|
|
@@ -695,34 +693,41 @@ Check the top-level render call using <` + t + ">.");
|
|
|
695
693
|
else
|
|
696
694
|
Se(E, e);
|
|
697
695
|
}
|
|
698
|
-
return e ===
|
|
696
|
+
return e === T ? lr(v) : cr(v), v;
|
|
699
697
|
}
|
|
700
698
|
}
|
|
701
699
|
function fr(e, r, t) {
|
|
702
|
-
return
|
|
700
|
+
return Te(e, r, t, !0);
|
|
703
701
|
}
|
|
704
702
|
function dr(e, r, t) {
|
|
705
|
-
return
|
|
703
|
+
return Te(e, r, t, !1);
|
|
706
704
|
}
|
|
707
705
|
var vr = dr, pr = fr;
|
|
708
|
-
|
|
709
|
-
}()),
|
|
706
|
+
W.Fragment = T, W.jsx = vr, W.jsxs = pr;
|
|
707
|
+
}()), W;
|
|
710
708
|
}
|
|
711
|
-
process.env.NODE_ENV === "production" ? ee.exports =
|
|
709
|
+
process.env.NODE_ENV === "production" ? ee.exports = hr() : ee.exports = Er();
|
|
712
710
|
var Oe = ee.exports;
|
|
713
|
-
function
|
|
714
|
-
|
|
711
|
+
function Cr({
|
|
712
|
+
children: a,
|
|
713
|
+
maps: _,
|
|
714
|
+
externalSync: S
|
|
715
|
+
}) {
|
|
716
|
+
const [T, u] = mr(br, {
|
|
715
717
|
...B.state,
|
|
716
718
|
maps: _.reduce((l, f) => (l[f.id] = f, l), B.state.maps)
|
|
717
|
-
}), m =
|
|
719
|
+
}), m = V(
|
|
718
720
|
(l, f) => {
|
|
719
|
-
_[0].id === l && S(
|
|
721
|
+
_[0].id === l && S?.({
|
|
722
|
+
type: F.SetViewState,
|
|
723
|
+
payload: f
|
|
724
|
+
});
|
|
720
725
|
},
|
|
721
726
|
[S, _]
|
|
722
|
-
), p =
|
|
727
|
+
), p = V(
|
|
723
728
|
(l, f) => {
|
|
724
729
|
u({
|
|
725
|
-
type:
|
|
730
|
+
type: F.SetViewState,
|
|
726
731
|
payload: {
|
|
727
732
|
id: l,
|
|
728
733
|
viewState: f
|
|
@@ -730,10 +735,10 @@ function jr({ children: a, maps: _ }) {
|
|
|
730
735
|
}), m(l, f);
|
|
731
736
|
},
|
|
732
737
|
[u, m]
|
|
733
|
-
), h =
|
|
738
|
+
), h = V(
|
|
734
739
|
(l, { height: f, width: O }) => {
|
|
735
740
|
u({
|
|
736
|
-
type:
|
|
741
|
+
type: F.SetResize,
|
|
737
742
|
payload: {
|
|
738
743
|
id: l,
|
|
739
744
|
height: f,
|
|
@@ -742,10 +747,10 @@ function jr({ children: a, maps: _ }) {
|
|
|
742
747
|
}), m(l, { height: f, width: O });
|
|
743
748
|
},
|
|
744
749
|
[u, m]
|
|
745
|
-
), y =
|
|
750
|
+
), y = V(
|
|
746
751
|
(l, f) => {
|
|
747
752
|
u({
|
|
748
|
-
type:
|
|
753
|
+
type: F.SetBasemap,
|
|
749
754
|
payload: {
|
|
750
755
|
id: l,
|
|
751
756
|
basemap: f
|
|
@@ -753,10 +758,10 @@ function jr({ children: a, maps: _ }) {
|
|
|
753
758
|
});
|
|
754
759
|
},
|
|
755
760
|
[u]
|
|
756
|
-
), P =
|
|
761
|
+
), P = V(
|
|
757
762
|
(l, f) => {
|
|
758
763
|
u({
|
|
759
|
-
type:
|
|
764
|
+
type: F.SetZoom,
|
|
760
765
|
payload: {
|
|
761
766
|
id: l,
|
|
762
767
|
zoom: f
|
|
@@ -770,17 +775,17 @@ function jr({ children: a, maps: _ }) {
|
|
|
770
775
|
setResize: h,
|
|
771
776
|
setZoom: P
|
|
772
777
|
});
|
|
773
|
-
return /* @__PURE__ */ Oe.jsx(Fe.Provider, { value: g.current, children: /* @__PURE__ */ Oe.jsx(De.Provider, { value:
|
|
778
|
+
return /* @__PURE__ */ Oe.jsx(Fe.Provider, { value: g.current, children: /* @__PURE__ */ Oe.jsx(De.Provider, { value: T, children: a }) });
|
|
774
779
|
}
|
|
775
780
|
export {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
781
|
+
Sr as CartoBasemapURL,
|
|
782
|
+
Rr as CartoBasemapsNames,
|
|
783
|
+
gr as GMapsBasemap,
|
|
779
784
|
B as INITIAL_STATE,
|
|
780
785
|
Fe as MapActionsContext,
|
|
781
786
|
De as MapContext,
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
787
|
+
Cr as MapProvider,
|
|
788
|
+
br as reducer,
|
|
789
|
+
Tr as useMap,
|
|
790
|
+
wr as useMapActions
|
|
786
791
|
};
|
|
@@ -7,6 +7,7 @@ import type { Properties } from 'csstype';
|
|
|
7
7
|
import type { MutableRefObject, ReactNode } from 'react';
|
|
8
8
|
import type { MapRef } from 'react-map-gl';
|
|
9
9
|
import { CartoBasemapsNames, GMapsBasemap } from './map-provider.const';
|
|
10
|
+
import type { Actions } from './map-provider.reducer';
|
|
10
11
|
export type MapProviderProps = {
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
maps: {
|
|
@@ -14,6 +15,10 @@ export type MapProviderProps = {
|
|
|
14
15
|
basemap: MapsProps['basemap'];
|
|
15
16
|
viewState: MapsProps['viewState'];
|
|
16
17
|
}[];
|
|
18
|
+
externalSync?: (data: {
|
|
19
|
+
type: Actions;
|
|
20
|
+
payload: any;
|
|
21
|
+
}) => void;
|
|
17
22
|
};
|
|
18
23
|
export type MapState = {
|
|
19
24
|
maps: Record<MapsProps['id'], MapsProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carto/ps-react-maps",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.2",
|
|
4
4
|
"description": "CARTO's Professional Service React Maps library",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"start": "npm run storybook:start",
|
|
21
21
|
"prebuild": "npm exec rimraf dist",
|
|
22
|
-
"build": "tsc && vite build",
|
|
22
|
+
"build": "tsc --build tsconfig.build.json && vite build",
|
|
23
23
|
"lint": "eslint './**/*.{ts,tsx}' --ignore-path ../../.gitignore",
|
|
24
24
|
"format": "prettier --write . --ignore-path ../../.gitignore",
|
|
25
25
|
"test:watch": "vitest",
|
|
@@ -28,10 +28,7 @@
|
|
|
28
28
|
"storybook:start": "storybook dev --no-open -p 6006",
|
|
29
29
|
"storybook:build": "storybook build"
|
|
30
30
|
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@carto/react-redux": "2.2.14",
|
|
33
|
-
"react-redux": "8.1.3"
|
|
34
|
-
},
|
|
31
|
+
"dependencies": {},
|
|
35
32
|
"devDependencies": {
|
|
36
33
|
"@carto/react-basemaps": "2.2.14",
|
|
37
34
|
"@deck.gl/core": "8.9.32",
|
|
@@ -56,9 +53,7 @@
|
|
|
56
53
|
"storybook": "7.5.2"
|
|
57
54
|
},
|
|
58
55
|
"peerDependencies": {
|
|
59
|
-
"@carto/react-redux": "1.x || 2.x",
|
|
60
56
|
"react": "17.x || 18.x",
|
|
61
|
-
"react-dom": "17.x || 18.x"
|
|
62
|
-
"react-redux": "8.x"
|
|
57
|
+
"react-dom": "17.x || 18.x"
|
|
63
58
|
}
|
|
64
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: typeof MapWrapper;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
docs: {
|
|
8
|
-
page: null;
|
|
9
|
-
description: {
|
|
10
|
-
component: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
argTypes: {};
|
|
15
|
-
args: {};
|
|
16
|
-
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
17
|
-
};
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
export declare const Default: Story;
|
|
21
|
-
declare function MapWrapper(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type MapProviderProps } from '../../src/map-provider';
|
|
2
|
-
import { type ReactElement } from 'react';
|
|
3
|
-
export type Wrapper = ({ children }: {
|
|
4
|
-
children: ReactElement;
|
|
5
|
-
}) => JSX.Element;
|
|
6
|
-
export declare const wrapper: ({ maps }: {
|
|
7
|
-
maps: MapProviderProps['maps'];
|
|
8
|
-
}) => Wrapper;
|
|
9
|
-
export * from '@testing-library/react';
|
|
10
|
-
export { default as userEvent } from '@testing-library/user-event';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|