@carto/ps-react-maps 0.0.1-alpha.3 → 0.0.1-alpha.5
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24,4 +24,4 @@ Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){v
|
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var Te={};function ur(e){{var r=Se();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 Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==Q.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),D(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),D(null)}}function we(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var n=e[t];re(n)&&Ce(n,r)}else if(re(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;)re(i.value)&&Ce(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&&!ee){ee=!0;var s=w(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("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"){D(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}e.ref!==null&&(D(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Pe(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 E=sr(s);E?o+=E:o+=Se();var d;e===null?d="null":H(e)?d="array":e!==void 0&&e.$$typeof===b?(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)}var v=ir(e,r,t,s,c);if(v==null)return v;if(i){var T=r.children;if(T!==void 0)if(n)if(H(T)){for(var A=0;A<T.length;A++)we(T[A],e);Object.freeze&&Object.freeze(T)}else R("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 we(T,e)}return e===C?lr(v):cr(v),v}}function fr(e,r,t){return Pe(e,r,t,!0)}function dr(e,r,t){return Pe(e,r,t,!1)}var vr=dr,pr=fr;W.Fragment=C,W.jsx=vr,W.jsxs=pr}()),W}process.env.NODE_ENV==="production"?te.exports=Rr():te.exports=Er();var ke=te.exports;const hr=(a,b)=>(...u)=>{clearTimeout(0),setTimeout(()=>a(...u),b)},_r=["transitionDuration","transitionEasing","transitionInterpolator","transitionInterruption"],Sr=(a,b)=>{a({type:"carto/setViewState",payload:b}),a({type:"carto/setViewPort"})},Tr=hr(Sr,
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==Q.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),D(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),D(null)}}function we(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var n=e[t];re(n)&&Ce(n,r)}else if(re(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;)re(i.value)&&Ce(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&&!ee){ee=!0;var s=w(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("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"){D(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}e.ref!==null&&(D(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Pe(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 E=sr(s);E?o+=E:o+=Se();var d;e===null?d="null":H(e)?d="array":e!==void 0&&e.$$typeof===b?(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)}var v=ir(e,r,t,s,c);if(v==null)return v;if(i){var T=r.children;if(T!==void 0)if(n)if(H(T)){for(var A=0;A<T.length;A++)we(T[A],e);Object.freeze&&Object.freeze(T)}else R("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 we(T,e)}return e===C?lr(v):cr(v),v}}function fr(e,r,t){return Pe(e,r,t,!0)}function dr(e,r,t){return Pe(e,r,t,!1)}var vr=dr,pr=fr;W.Fragment=C,W.jsx=vr,W.jsxs=pr}()),W}process.env.NODE_ENV==="production"?te.exports=Rr():te.exports=Er();var ke=te.exports;const hr=(a,b)=>(...u)=>{clearTimeout(0),setTimeout(()=>a(...u),b)},_r=["transitionDuration","transitionEasing","transitionInterpolator","transitionInterruption"],Sr=(a,b)=>{a({type:"carto/setViewState",payload:b}),a({type:"carto/setViewPort"})},Tr=hr(Sr,0);function Cr({children:a,maps:b}){const _=mr.useDispatch(),[C,u]=h.useReducer(Fe,{...L.state,maps:b.reduce((l,f)=>(l[f.id]=f,l),L.state.maps)}),m=h.useCallback((l,f)=>{if(b[0].id===l){const F={...f};for(const J of _r)delete F[J];Tr(_,F)}},[_,b]),p=h.useCallback((l,f)=>{u({type:$.SetViewState,payload:{id:l,viewState:f}}),m(l,f)},[u,m]),S=h.useCallback((l,{height:f,width:x})=>{u({type:$.SetResize,payload:{id:l,height:f,width:x}}),m(l,{height:f,width:x})},[u,m]),y=h.useCallback((l,f)=>{u({type:$.SetBasemap,payload:{id:l,basemap:f}})},[u]),O=h.useCallback((l,f)=>{u({type:$.SetZoom,payload:{id:l,zoom:f}})},[u]),g=h.useRef({setViewState:p,setBasemap:y,setResize:S,setZoom:O});return ke.jsx(ae.Provider,{value:g.current,children:ke.jsx(ne.Provider,{value:C,children:a})})}exports.CartoBasemapURL=yr;exports.CartoBasemapsNames=Ae;exports.GMapsBasemap=De;exports.INITIAL_STATE=L;exports.MapActionsContext=ae;exports.MapContext=ne;exports.MapProvider=Cr;exports.reducer=Fe;exports.useMap=br;exports.useMapActions=gr;
|
package/dist/index.js
CHANGED
|
@@ -721,7 +721,7 @@ const Sr = (a, g) => (...u) => {
|
|
|
721
721
|
type: "carto/setViewState",
|
|
722
722
|
payload: g
|
|
723
723
|
}), a({ type: "carto/setViewPort" });
|
|
724
|
-
}, Cr = Sr(wr,
|
|
724
|
+
}, Cr = Sr(wr, 0);
|
|
725
725
|
function Dr({ children: a, maps: g }) {
|
|
726
726
|
const E = gr(), [T, u] = mr(hr, {
|
|
727
727
|
...q.state,
|