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

cf-component-code

Package Overview
Dependencies
Maintainers
18
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-code - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

<a name="3.0.4"></a>
## [3.0.4](http://stash.cfops.it:7999/www/cf-ux/compare/cf-component-code@3.0.3...cf-component-code@3.0.4) (2017-10-20)
**Note:** Version bump only for package cf-component-code
<a name="3.0.3"></a>

@@ -8,0 +16,0 @@ ## [3.0.3](http://stash.cfops.it:7999/www/cf-ux/compare/cf-component-code@3.0.2...cf-component-code@3.0.3) (2017-09-27)

68

lib/Code.js
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -19,47 +19,25 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
const styles = ({ theme }) => ({
backgroundColor: theme.backgroundColor,
border: theme.border,
fontFamily: theme.fontFamily,
borderRadius: theme.borderRadius,
display: theme.display,
marginLeft: theme.marginLeft,
marginRight: theme.marginRight,
padding: theme.padding,
verticalAlign: theme.verticalAlign,
color: theme.color
});
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var styles = function styles(_ref) {
var theme = _ref.theme;
return {
backgroundColor: theme.backgroundColor,
border: theme.border,
fontFamily: theme.fontFamily,
borderRadius: theme.borderRadius,
display: theme.display,
marginLeft: theme.marginLeft,
marginRight: theme.marginRight,
padding: theme.padding,
verticalAlign: theme.verticalAlign,
color: theme.color
};
};
var Code = function (_React$Component) {
_inherits(Code, _React$Component);
function Code() {
_classCallCheck(this, Code);
return _possibleConstructorReturn(this, (Code.__proto__ || Object.getPrototypeOf(Code)).apply(this, arguments));
class Code extends _react2.default.Component {
render() {
return _react2.default.createElement(
'code',
{ className: this.props.className },
this.props.children
);
}
}
_createClass(Code, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'code',
{ className: this.props.className },
this.props.children
);
}
}]);
return Code;
}(_react2.default.Component);
Code.propTypes = {

@@ -66,0 +44,0 @@ className: _propTypes2.default.string,

'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -27,62 +27,38 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var styles = function styles(_ref) {
var theme = _ref.theme;
return {
backgroundColor: theme.backgroundColor,
border: theme.border,
fontFamily: theme.fontFamily,
borderRadius: theme.borderRadius,
display: theme.display,
width: theme.width,
margin: theme.margin,
padding: theme.padding,
fontSize: theme.fontSize,
color: theme.color
};
};
var Code = (0, _cfStyleContainer.applyTheme)(_Code2.default, _CodeTheme2.default, function () {
return {
display: 'inherit',
margin: 'auto',
padding: 'auto',
background: 'none',
border: 'none',
color: 'inherit'
};
const styles = ({ theme }) => ({
backgroundColor: theme.backgroundColor,
border: theme.border,
fontFamily: theme.fontFamily,
borderRadius: theme.borderRadius,
display: theme.display,
width: theme.width,
margin: theme.margin,
padding: theme.padding,
fontSize: theme.fontSize,
color: theme.color
});
var CodeBlock = function (_React$Component) {
_inherits(CodeBlock, _React$Component);
const Code = (0, _cfStyleContainer.applyTheme)(_Code2.default, _CodeTheme2.default, () => ({
display: 'inherit',
margin: 'auto',
padding: 'auto',
background: 'none',
border: 'none',
color: 'inherit'
}));
function CodeBlock() {
_classCallCheck(this, CodeBlock);
return _possibleConstructorReturn(this, (CodeBlock.__proto__ || Object.getPrototypeOf(CodeBlock)).apply(this, arguments));
class CodeBlock extends _react2.default.Component {
render() {
return _react2.default.createElement(
'pre',
{ className: this.props.className },
_react2.default.createElement(
Code,
null,
this.props.children
)
);
}
}
_createClass(CodeBlock, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
'pre',
{ className: this.props.className },
_react2.default.createElement(
Code,
null,
this.props.children
)
);
}
}]);
return CodeBlock;
}(_react2.default.Component);
CodeBlock.propTypes = {

@@ -89,0 +65,0 @@ className: _propTypes2.default.string,

'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (baseTheme) {
return {
backgroundColor: baseTheme.color.smoke,
border: '1px solid ' + baseTheme.color.hail,
fontFamily: 'monaco, courier, monospace',
borderRadius: 2,
display: 'block',
width: '100%',
margin: '2rem 0',
padding: '0.5rem',
fontSize: '0.86667rem',
color: baseTheme.color.dusk
};
};
exports.default = baseTheme => ({
backgroundColor: baseTheme.color.smoke,
border: `1px solid ${baseTheme.color.hail}`,
fontFamily: 'monaco, courier, monospace',
borderRadius: 2,
display: 'block',
width: '100%',
margin: '2rem 0',
padding: '0.5rem',
fontSize: '0.86667rem',
color: baseTheme.color.dusk
});
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (baseTheme) {
return {
backgroundColor: baseTheme.color.smoke,
border: '1px solid ' + baseTheme.color.hail,
fontFamily: 'monaco, courier, monospace',
borderRadius: 2,
display: 'inline-block',
marginLeft: '0.13333em',
marginRight: '0.13333em',
padding: '0 0.4em',
verticalAlign: 'baseline',
color: baseTheme.color.apple
};
};
exports.default = baseTheme => ({
backgroundColor: baseTheme.color.smoke,
border: `1px solid ${baseTheme.color.hail}`,
fontFamily: 'monaco, courier, monospace',
borderRadius: 2,
display: 'inline-block',
marginLeft: '0.13333em',
marginRight: '0.13333em',
padding: '0 0.4em',
verticalAlign: 'baseline',
color: baseTheme.color.apple
});
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CodeBlockTheme = exports.CodeBlockUnstyled = exports.CodeBlock = exports.CodeTheme = exports.CodeUnstyled = exports.Code = undefined;

@@ -26,4 +28,4 @@

var Code = (0, _cfStyleContainer.applyTheme)(_Code2.default, _CodeTheme2.default);
var CodeBlock = (0, _cfStyleContainer.applyTheme)(_CodeBlock2.default, _CodeBlockTheme2.default);
const Code = (0, _cfStyleContainer.applyTheme)(_Code2.default, _CodeTheme2.default);
const CodeBlock = (0, _cfStyleContainer.applyTheme)(_CodeBlock2.default, _CodeBlockTheme2.default);

@@ -30,0 +32,0 @@ exports.Code = Code;

{
"name": "cf-component-code",
"description": "Cloudflare Code Component",
"version": "3.0.3",
"version": "3.0.4",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "module": "es/index.js",

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