@uiw/react-amap-map
Advanced tools
Comparing version 3.0.4 to 4.0.0
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
import React from 'react'; | ||
@@ -3,0 +11,0 @@ declare type InitialState = { |
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="react" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
import { FC, PropsWithChildren } from 'react'; | ||
export * from './useMap'; | ||
@@ -10,3 +18,3 @@ export * from './context'; | ||
container?: HTMLDivElement | null; | ||
}) => void; | ||
}) => undefined; | ||
} | { | ||
@@ -19,6 +27,7 @@ children?: React.ReactNode; | ||
container?: HTMLDivElement | null; | ||
children?: JSX.Element & RenderProps['children']; | ||
} | ||
export declare function Provider(props: RenderProps): JSX.Element; | ||
export declare const Provider: FC<PropsWithChildren<RenderProps>>; | ||
export declare const Map: import("react").ForwardRefExoticComponent<(MapProps & RenderProps) & import("react").RefAttributes<MapProps & { | ||
map?: AMap.Map | undefined; | ||
}>>; |
@@ -12,4 +12,3 @@ "use strict"; | ||
}; | ||
exports.Map = void 0; | ||
exports.Provider = Provider; | ||
exports.Provider = exports.Map = void 0; | ||
@@ -56,3 +55,3 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
function Provider(props) { | ||
var Provider = function Provider(props) { | ||
var _useReducer = (0, _react.useReducer)(_context.reducer, _context.initialState), | ||
@@ -70,4 +69,5 @@ _useReducer2 = (0, _slicedToArray2["default"])(_useReducer, 2), | ||
}); | ||
} | ||
}; | ||
exports.Provider = Provider; | ||
var Map = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) { | ||
@@ -74,0 +74,0 @@ var className = _ref.className, |
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="react" /> | ||
@@ -3,0 +11,0 @@ import { MapProps } from '.'; |
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
import React from 'react'; | ||
@@ -3,0 +11,0 @@ declare type InitialState = { |
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="react" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
import { FC, PropsWithChildren } from 'react'; | ||
export * from './useMap'; | ||
@@ -10,3 +18,3 @@ export * from './context'; | ||
container?: HTMLDivElement | null; | ||
}) => void; | ||
}) => undefined; | ||
} | { | ||
@@ -19,6 +27,7 @@ children?: React.ReactNode; | ||
container?: HTMLDivElement | null; | ||
children?: JSX.Element & RenderProps['children']; | ||
} | ||
export declare function Provider(props: RenderProps): JSX.Element; | ||
export declare const Provider: FC<PropsWithChildren<RenderProps>>; | ||
export declare const Map: import("react").ForwardRefExoticComponent<(MapProps & RenderProps) & import("react").RefAttributes<MapProps & { | ||
map?: AMap.Map | undefined; | ||
}>>; |
@@ -12,3 +12,3 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
export * from './context'; | ||
export function Provider(props) { | ||
export var Provider = props => { | ||
var [state, dispatch] = useReducer(reducer, initialState); | ||
@@ -22,3 +22,3 @@ return /*#__PURE__*/_jsx(Context.Provider, { | ||
}); | ||
} | ||
}; | ||
export var Map = /*#__PURE__*/forwardRef((_ref, ref) => { | ||
@@ -25,0 +25,0 @@ var { |
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="@uiw/react-amap-types" /> | ||
/// <reference types="react" /> | ||
@@ -3,0 +11,0 @@ import { MapProps } from '.'; |
{ | ||
"name": "@uiw/react-amap-map", | ||
"version": "3.0.4", | ||
"version": "4.0.0", | ||
"description": "基于 React 封装的高德地图组件。AMap Component Based On React.", | ||
@@ -34,9 +34,9 @@ "homepage": "https://uiwjs.github.io/react-amap/#/map", | ||
"dependencies": { | ||
"@uiw/react-amap-types": "3.0.4", | ||
"@uiw/react-amap-utils": "3.0.4" | ||
"@uiw/react-amap-types": "4.0.0", | ||
"@uiw/react-amap-utils": "4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "~17.0.39", | ||
"@types/react-dom": "~17.0.11" | ||
"@types/react": "~18.0.0", | ||
"@types/react-dom": "~18.0.0" | ||
} | ||
} |
@@ -21,4 +21,3 @@ Map 组件 | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import React from 'react'; | ||
@@ -35,3 +34,4 @@ import ReactDOM from 'react-dom'; | ||
); | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -43,4 +43,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import React, { useRef, useEffect } from 'react'; | ||
@@ -84,3 +83,3 @@ import ReactDOM from 'react-dom'; | ||
return <div ref={warpper} />; | ||
return <div ref={warpper} style={{ height: 300 }} />; | ||
} | ||
@@ -91,9 +90,8 @@ | ||
<Provider> | ||
<div style={{ height: 300 }}> | ||
<Marker /> | ||
</div> | ||
<Marker /> | ||
</Provider> | ||
</APILoader> | ||
); | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -112,4 +110,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import ReactDOM from 'react-dom'; | ||
@@ -150,7 +147,9 @@ import React, { Fragment, useState } from 'react'; | ||
ReactDOM.render(( | ||
const Mount = () => ( | ||
<APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129"> | ||
<Demo /> | ||
</APILoader> | ||
), _mount_); | ||
); | ||
export default Mount; | ||
``` | ||
@@ -162,4 +161,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import ReactDOM from 'react-dom'; | ||
@@ -193,7 +191,9 @@ import React, { useEffect, useRef, Fragment } from 'react'; | ||
ReactDOM.render(( | ||
const Mount = () => ( | ||
<APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129"> | ||
<Demo /> | ||
</APILoader> | ||
), _mount_); | ||
); | ||
export default Mount; | ||
``` | ||
@@ -203,4 +203,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import ReactDOM from 'react-dom'; | ||
@@ -224,3 +223,4 @@ import React from 'react'; | ||
); | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo | ||
``` | ||
@@ -232,4 +232,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import ReactDOM from 'react-dom'; | ||
@@ -261,7 +260,9 @@ import React, { useEffect, useRef, Fragment } from 'react'; | ||
ReactDOM.render(( | ||
const Mount = () => ( | ||
<APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129"> | ||
<Demo /> | ||
</APILoader> | ||
), _mount_); | ||
); | ||
export default Mount; | ||
``` | ||
@@ -271,4 +272,3 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true--> | ||
```jsx | ||
```jsx mdx:preview | ||
import ReactDOM from 'react-dom'; | ||
@@ -290,3 +290,3 @@ import React, { useState, useRef } from 'react'; | ||
const Example = () => { | ||
const Demo = () => { | ||
const [show, setShow] = useState(true); | ||
@@ -304,7 +304,9 @@ return ( | ||
ReactDOM.render(( | ||
const Mount = () => ( | ||
<APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129"> | ||
<Example /> | ||
<Demo /> | ||
</APILoader> | ||
), _mount_); | ||
); | ||
export default Mount; | ||
``` | ||
@@ -311,0 +313,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70234
893
339
+ Added@uiw/react-amap-types@4.0.0(transitive)
+ Added@uiw/react-amap-utils@4.0.0(transitive)
- Removed@uiw/react-amap-types@3.0.4(transitive)
- Removed@uiw/react-amap-utils@3.0.4(transitive)
Updated@uiw/react-amap-types@4.0.0
Updated@uiw/react-amap-utils@4.0.0