Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-baidu-map-utils

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-baidu-map-utils - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

6

cjs/hooks.d.ts
/// <reference types="@uiw/react-baidu-map-types" />
import React from 'react';
/**

@@ -77,1 +78,6 @@ * 批量创建多个如下 State,监听并设置值,

export declare function usePrevious<T>(value: T): T | undefined;
export declare function useRenderDom(props: {
children: React.ReactNode;
}): {
container: HTMLDivElement;
};

21

cjs/hooks.js
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;

@@ -12,2 +14,3 @@

exports.useProperties = useProperties;
exports.useRenderDom = useRenderDom;
exports.useVisiable = useVisiable;

@@ -17,4 +20,8 @@

var _react = require("react");
var _reactDom = require("react-dom");
var _react = _interopRequireWildcard(require("react"));
var _jsxRuntime = require("react/jsx-runtime");
/// <reference types="@uiw/react-baidu-map-types" />

@@ -200,2 +207,14 @@

}
function useRenderDom(props) {
var container = (0, _react.useRef)(document.createElement('div'));
(0, _react.useLayoutEffect)(function () {
(0, _reactDom.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
children: props.children
}), container.current);
}, [props.children]);
return {
container: container.current
};
}
//# sourceMappingURL=hooks.js.map

1

cjs/index.d.ts
export * from './noop';
export * from './hooks';
export * from './requireScript';
export * from './useCreatePortal';

@@ -45,15 +45,2 @@ "use strict";

});
var _useCreatePortal = require("./useCreatePortal");
Object.keys(_useCreatePortal).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _useCreatePortal[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _useCreatePortal[key];
}
});
});
//# sourceMappingURL=index.js.map
/// <reference types="@uiw/react-baidu-map-types" />
import React from 'react';
/**

@@ -77,1 +78,6 @@ * 批量创建多个如下 State,监听并设置值,

export declare function usePrevious<T>(value: T): T | undefined;
export declare function useRenderDom(props: {
children: React.ReactNode;
}): {
container: HTMLDivElement;
};
/// <reference types="@uiw/react-baidu-map-types" />
import { useEffect, useState, useRef } from 'react';
import { render } from 'react-dom';
import React, { Fragment, useEffect, useState, useRef, useLayoutEffect } from 'react';
/**

@@ -20,2 +21,3 @@ * 批量创建多个如下 State,监听并设置值,

import { jsx as _jsx } from "react/jsx-runtime";
export function useEnableProperties(instance, props, propsName) {

@@ -188,2 +190,13 @@ if (props === void 0) {

}
export function useRenderDom(props) {
var container = useRef(document.createElement('div'));
useLayoutEffect(() => {
render( /*#__PURE__*/_jsx(Fragment, {
children: props.children
}), container.current);
}, [props.children]);
return {
container: container.current
};
}
//# sourceMappingURL=hooks.js.map
export * from './noop';
export * from './hooks';
export * from './requireScript';
export * from './useCreatePortal';
export * from './noop';
export * from './hooks';
export * from './requireScript';
export * from './useCreatePortal';
//# sourceMappingURL=index.js.map
{
"name": "@uiw/react-baidu-map-utils",
"version": "2.2.0",
"version": "2.3.0",
"description": "Baidu Map utils Components for React.",

@@ -43,4 +43,4 @@ "homepage": "https://uiwjs.github.io/react-baidu-map/",

"@babel/runtime": "~7.17.2",
"@uiw/react-baidu-map-types": "2.2.0"
"@uiw/react-baidu-map-types": "2.3.0"
}
}

@@ -9,3 +9,3 @@ @uiw/react-baidu-map-utils

```jsx
import { noop, requireCss, requireScript } from '@uiw/react-baidu-map-utils';
import { noop, requireCss, requireScript, useRenderDom, usePrevious } from '@uiw/react-baidu-map-utils';
```
export * from './noop';
export * from './hooks';
export * from './requireScript';
export * from './useCreatePortal';

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc