component-playground
Advanced tools
Comparing version 3.1.2 to 3.2.0
# Component Playground Changelog | ||
## 3.2.0 (2018-06-11) | ||
* Update to `react-codemirror2@^5.0.0` | ||
## 3.1.2 (2018-05-01) | ||
@@ -4,0 +8,0 @@ |
@@ -12,5 +12,5 @@ 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; }; }(); | ||
import PropTypes from "prop-types"; | ||
import Codemirror from "react-codemirror2"; | ||
import { UnControlled as Codemirror } from "react-codemirror2"; | ||
if (typeof window !== "undefined") { | ||
if (typeof window !== "undefined" && typeof window.navigator !== "undefined") { | ||
require("codemirror/mode/jsx/jsx"); | ||
@@ -17,0 +17,0 @@ } |
@@ -18,2 +18,5 @@ 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; }; }(); | ||
// TODO: refactor to remove componentWillReceiveProps | ||
// eslint-disable-next-line react/no-deprecated | ||
var ReactPlayground = function (_Component) { | ||
@@ -62,2 +65,3 @@ _inherits(ReactPlayground, _Component); | ||
var _props = this.props, | ||
codeText = _props.codeText, | ||
collapsableCode = _props.collapsableCode, | ||
@@ -87,3 +91,3 @@ context = _props.context, | ||
className: "playgroundStage", | ||
codeText: code, | ||
codeText: codeText, | ||
external: external, | ||
@@ -90,0 +94,0 @@ onChange: this._handleCodeChange, |
@@ -19,4 +19,2 @@ "use strict"; | ||
var _reactCodemirror2 = _interopRequireDefault(_reactCodemirror); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -31,3 +29,3 @@ | ||
if (typeof window !== "undefined") { | ||
if (typeof window !== "undefined" && typeof window.navigator !== "undefined") { | ||
require("codemirror/mode/jsx/jsx"); | ||
@@ -90,3 +88,3 @@ } | ||
return _react2.default.createElement(_reactCodemirror2.default, { | ||
return _react2.default.createElement(_reactCodemirror.UnControlled, { | ||
ref: function ref(c) { | ||
@@ -93,0 +91,0 @@ _this2.editor = c; |
@@ -44,2 +44,4 @@ "use strict"; | ||
// TODO: refactor to remove componentWillReceiveProps | ||
// eslint-disable-next-line react/no-deprecated | ||
var ReactPlayground = function (_Component) { | ||
@@ -88,2 +90,3 @@ _inherits(ReactPlayground, _Component); | ||
var _props = this.props, | ||
codeText = _props.codeText, | ||
collapsableCode = _props.collapsableCode, | ||
@@ -113,3 +116,3 @@ context = _props.context, | ||
className: "playgroundStage", | ||
codeText: code, | ||
codeText: codeText, | ||
external: external, | ||
@@ -116,0 +119,0 @@ onChange: this._handleCodeChange, |
{ | ||
"name": "component-playground", | ||
"version": "3.1.2", | ||
"version": "3.2.0", | ||
"description": "A component for rendering React components with editable source and live preview", | ||
@@ -69,3 +69,3 @@ "keywords": [ | ||
"prop-types": "^15.6.0", | ||
"react-codemirror2": "^2.0.2" | ||
"react-codemirror2": "^5.0.0" | ||
}, | ||
@@ -72,0 +72,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
4134881
80793
7
+ Addedreact-codemirror2@5.1.0(transitive)
- Removedreact-codemirror2@2.0.2(transitive)
Updatedreact-codemirror2@^5.0.0