New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wordpress/primitives

Package Overview
Dependencies
Maintainers
14
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/primitives - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

12

build-module/block-quotation/index.native.js

@@ -12,2 +12,3 @@ import { createElement } from "@wordpress/element";

import { Children, cloneElement } from '@wordpress/element';
import { withPreferredColorScheme } from '@wordpress/compose';
/**

@@ -18,3 +19,5 @@ * Internal dependencies

import styles from './style.scss';
export var BlockQuotation = function BlockQuotation(props) {
export var BlockQuotation = withPreferredColorScheme(function (props) {
var getStylesFromColorScheme = props.getStylesFromColorScheme;
var blockQuoteStyle = getStylesFromColorScheme(styles.wpBlockQuoteLight, styles.wpBlockQuoteDark);
var newChildren = Children.map(props.children, function (child) {

@@ -29,3 +32,4 @@ if (child && child.props.identifier === 'citation') {

return cloneElement(child, {
tagsToEliminate: ['div']
tagsToEliminate: ['div'],
style: styles.wpBlockQuoteValue
});

@@ -37,5 +41,5 @@ }

return createElement(View, {
style: styles.wpBlockQuote
style: blockQuoteStyle
}, newChildren);
};
});
//# sourceMappingURL=index.native.js.map

@@ -14,2 +14,4 @@ "use strict";

var _compose = require("@wordpress/compose");
var _style = _interopRequireDefault(require("./style.scss"));

@@ -28,3 +30,6 @@

*/
var BlockQuotation = function BlockQuotation(props) {
var BlockQuotation = (0, _compose.withPreferredColorScheme)(function (props) {
var getStylesFromColorScheme = props.getStylesFromColorScheme;
var blockQuoteStyle = getStylesFromColorScheme(_style.default.wpBlockQuoteLight, _style.default.wpBlockQuoteDark);
var newChildren = _element.Children.map(props.children, function (child) {

@@ -39,3 +44,4 @@ if (child && child.props.identifier === 'citation') {

return (0, _element.cloneElement)(child, {
tagsToEliminate: ['div']
tagsToEliminate: ['div'],
style: _style.default.wpBlockQuoteValue
});

@@ -48,7 +54,6 @@ }

return (0, _element.createElement)(_reactNative.View, {
style: _style.default.wpBlockQuote
style: blockQuoteStyle
}, newChildren);
};
});
exports.BlockQuotation = BlockQuotation;
//# sourceMappingURL=index.native.js.map
{
"name": "@wordpress/primitives",
"version": "1.1.0",
"version": "1.2.0",
"description": "WordPress cross-platform primitives.",

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

"@babel/runtime": "^7.8.3",
"@wordpress/element": "^2.11.0",
"@wordpress/element": "^2.12.0",
"classnames": "^2.2.5"

@@ -34,3 +34,3 @@ },

},
"gitHead": "7eb5abd4d6e62e4a8086a4b1d3ba77f0d2e07a91"
"gitHead": "6e2ca778fb69c67188479b491cf2e802011d72e2"
}

@@ -9,2 +9,3 @@ /**

import { Children, cloneElement } from '@wordpress/element';
import { withPreferredColorScheme } from '@wordpress/compose';
/**

@@ -15,3 +16,10 @@ * Internal dependencies

export const BlockQuotation = ( props ) => {
export const BlockQuotation = withPreferredColorScheme( ( props ) => {
const { getStylesFromColorScheme } = props;
const blockQuoteStyle = getStylesFromColorScheme(
styles.wpBlockQuoteLight,
styles.wpBlockQuoteDark
);
const newChildren = Children.map( props.children, ( child ) => {

@@ -24,7 +32,10 @@ if ( child && child.props.identifier === 'citation' ) {

if ( child && child.props.identifier === 'value' ) {
return cloneElement( child, { tagsToEliminate: [ 'div' ] } );
return cloneElement( child, {
tagsToEliminate: [ 'div' ],
style: styles.wpBlockQuoteValue,
} );
}
return child;
} );
return <View style={ styles.wpBlockQuote }>{ newChildren }</View>;
};
return <View style={ blockQuoteStyle }>{ newChildren }</View>;
} );

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