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

@wordpress/element

Package Overview
Dependencies
Maintainers
15
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/element - npm Package Compare versions

Comparing version 2.15.0 to 2.16.0

build-types/platform.android.d.ts

35

build-module/react-platform.native.js

@@ -0,2 +1,37 @@

/**
* External dependencies
*/
import { AppRegistry } from 'react-native';
import { omit } from 'lodash';
/**
* WordPress dependencies
*/
import { applyFilters, doAction } from '@wordpress/hooks';
/**
* Internal dependencies
*/
import { cloneElement } from './react';
var render = function render(element, id) {
return AppRegistry.registerComponent(id, function () {
return function (propsFromParent) {
var parentProps = omit(propsFromParent || {}, ['rootTag']);
doAction('native.pre-render', parentProps);
var filteredProps = applyFilters('native.block_editor_props', parentProps);
doAction('native.render', filteredProps);
return cloneElement(element, filteredProps);
};
});
};
/**
* Render a given element on Native.
* This actually returns a componentProvider that can be registered with `AppRegistry.registerComponent`
*
* @param {WPElement} element Element to render.
*/
export { render };
//# sourceMappingURL=react-platform.native.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.render = void 0;
var _reactNative = require("react-native");
var _lodash = require("lodash");
var _hooks = require("@wordpress/hooks");
var _react = require("./react");
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
var render = function render(element, id) {
return _reactNative.AppRegistry.registerComponent(id, function () {
return function (propsFromParent) {
var parentProps = (0, _lodash.omit)(propsFromParent || {}, ['rootTag']);
(0, _hooks.doAction)('native.pre-render', parentProps);
var filteredProps = (0, _hooks.applyFilters)('native.block_editor_props', parentProps);
(0, _hooks.doAction)('native.render', filteredProps);
return (0, _react.cloneElement)(element, filteredProps);
};
});
};
/**
* Render a given element on Native.
* This actually returns a componentProvider that can be registered with `AppRegistry.registerComponent`
*
* @param {WPElement} element Element to render.
*/
exports.render = render;
//# sourceMappingURL=react-platform.native.js.map

4

package.json
{
"name": "@wordpress/element",
"version": "2.15.0",
"version": "2.16.0",
"description": "Element React module for WordPress.",

@@ -37,3 +37,3 @@ "author": "The WordPress Contributors",

},
"gitHead": "8e06f0d212f89adba9099106497117819adefc5a"
"gitHead": "381a42b62e157d0e7fd6366cc51b0f5725990044"
}

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