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

@uiw/react-textarea-code-editor

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-textarea-code-editor - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

lib/cjs/index.d.ts

@@ -13,4 +13,8 @@ import React from 'react';

padding?: number;
/**
* The minimum height of the editor. Default: `16`.
*/
minHeight?: number;
}
declare const _default: React.ForwardRefExoticComponent<TextareaCodeEditorProps & React.RefAttributes<HTMLTextAreaElement>>;
export default _default;

20

lib/cjs/index.js

@@ -26,3 +26,3 @@ "use strict";

var _excluded = ["prefixCls", "value", "padding", "language", "className", "style", "onChange"];
var _excluded = ["prefixCls", "value", "padding", "minHeight", "placeholder", "language", "className", "style", "onChange"];

@@ -35,2 +35,5 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {

padding = _props$padding === void 0 ? 10 : _props$padding,
_props$minHeight = props.minHeight,
minHeight = _props$minHeight === void 0 ? 16 : _props$minHeight,
placeholder = props.placeholder,
language = props.language,

@@ -57,7 +60,9 @@ className = props.className,

var htmlStr = (0, _react.useMemo)(function () {
return (0, _utils.processHtml)("<pre aria-hidden=true><code ".concat(language ? "class=\"language-".concat(language, "\"") : '', " >").concat((0, _utils.htmlEncode)(String(value || '')), "</code></pre>"));
return (0, _utils.processHtml)("<pre aria-hidden=true><code ".concat(language ? "class=\"language-".concat(language, "\"") : '', " >").concat((0, _utils.htmlEncode)(String(value || '')), "</code><br /></pre>"));
}, [value, language]);
var preView = (0, _react.useMemo)(function () {
return /*#__PURE__*/_react.default.createElement("div", {
style: (0, _objectSpread2.default)({}, contentStyle),
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles.editor), contentStyle), {}, {
minHeight: minHeight
}),
className: "".concat(prefixCls, "-preview ").concat(language ? "language-".concat(language) : ''),

@@ -79,3 +84,8 @@ dangerouslySetInnerHTML: {

}, other, {
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles.editor), styles.textarea), contentStyle),
placeholder: placeholder,
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles.editor), styles.textarea), contentStyle), {}, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: ref,

@@ -93,2 +103,2 @@ onChange: function onChange(evn) {

module.exports = exports.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOlsiUmVhY3QiLCJmb3J3YXJkUmVmIiwicHJvcHMiLCJyZWYiLCJwcmVmaXhDbHMiLCJfIiwidmFsdWUiLCJwYWRkaW5nIiwibGFuZ3VhZ2UiLCJjbGFzc05hbWUiLCJzdHlsZSIsIm9uQ2hhbmdlIiwib3RoZXIiLCJzZXRWYWx1ZSIsImNvbnRlbnRTdHlsZSIsInBhZGRpbmdUb3AiLCJwYWRkaW5nUmlnaHQiLCJwYWRkaW5nQm90dG9tIiwicGFkZGluZ0xlZnQiLCJodG1sU3RyIiwiU3RyaW5nIiwicHJlVmlldyIsIl9faHRtbCIsInN0eWxlcyIsImNvbnRhaW5lciIsImVkaXRvciIsInRleHRhcmVhIiwiZXZuIiwidGFyZ2V0Il0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7Ozs7NEJBZWVBLGVBQU1DLFVBQU4sQ0FBK0QsVUFBQ0MsS0FBRCxFQUFRQyxHQUFSLEVBQWdCO0FBQzVGLHlCQUE4R0QsS0FBOUcsQ0FBUUUsU0FBUjtBQUFBLE1BQVFBLFNBQVIsaUNBQW9CLGFBQXBCO0FBQUEsTUFBMENDLENBQTFDLEd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ICAgfX1cbiAgICAgIC8+XG4gICAgKSxcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcmVhY3QtaG9va3MvZXhoYXVzdGl2ZS1kZXBzXG4gICAgW3ByZWZpeENscywgbGFuZ3VhZ2UsIGh0bWxTdHJdLFxuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGRpdiBzdHlsZT17eyAuLi5zdHlsZXMuY29udGFpbmVyLCAuLi5zdHlsZSB9fSBjbGFzc05hbWU9e2Ake3ByZWZpeENsc30gJHtjbGFzc05hbWUgfHwgJyd9YH0+XG4gICAgICA8dGV4dGFyZWFcbiAgICAgICAgYXV0b0NvbXBsZXRlPVwib2ZmXCJcbiAgICAgICAgYXV0b0NvcnJlY3Q9XCJvZmZcIlxuICAgICAgICBzcGVsbENoZWNrPVwiZmFsc2VcIlxuICAgICAgICBhdXRvQ2FwaXRhbGl6ZT1cIm9mZlwiXG4gICAgICAgIHsuLi5vdGhlcn1cbiAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAuLi5zdHlsZXMuZWRpdG9yLFxuICAgICAgICAgIC4uLnN0eWxlcy50ZXh0YXJlYSxcbiAgICAgICAgICAuLi5jb250ZW50U3R5bGUsXG4gICAgICAgIH19XG4gICAgICAgIHJlZj17cmVmfVxuICAgICAgICBvbkNoYW5nZT17KGV2bikgPT4ge1xuICAgICAgICAgIHNldFZhbHVlKGV2bi50YXJnZXQudmFsdWUpO1xuICAgICAgICAgIG9uQ2hhbmdlICYmIG9uQ2hhbmdlKGV2bik7XG4gICAgICAgIH19XG4gICAgICAgIGNsYXNzTmFtZT17YCR7cHJlZml4Q2xzfS10ZXh0YH1cbiAgICAgICAgdmFsdWU9e3ZhbHVlfVxuICAgICAgLz5cbiAgICAgIHtwcmVWaWV3fVxuICAgIDwvZGl2PlxuICApO1xufSk7XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4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FRleHRGaWxsQ29sb3I6ICdpbmhlcml0JyB9IDoge30pLFxuICAgICAgICB9fVxuICAgICAgICByZWY9e3JlZn1cbiAgICAgICAgb25DaGFuZ2U9eyhldm4pID0+IHtcbiAgICAgICAgICBzZXRWYWx1ZShldm4udGFyZ2V0LnZhbHVlKTtcbiAgICAgICAgICBvbkNoYW5nZSAmJiBvbkNoYW5nZShldm4pO1xuICAgICAgICB9fVxuICAgICAgICBjbGFzc05hbWU9e2Ake3ByZWZpeENsc30tdGV4dGB9XG4gICAgICAgIHZhbHVlPXt2YWx1ZX1cbiAgICAgIC8+XG4gICAgICB7cHJlVmlld31cbiAgICA8L2Rpdj5cbiAgKTtcbn0pO1xuIl19

@@ -13,4 +13,8 @@ import React from 'react';

padding?: number;
/**
* The minimum height of the editor. Default: `16`.
*/
minHeight?: number;
}
declare const _default: React.ForwardRefExoticComponent<TextareaCodeEditorProps & React.RefAttributes<HTMLTextAreaElement>>;
export default _default;

@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/extends";

import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["prefixCls", "value", "padding", "language", "className", "style", "onChange"];
var _excluded = ["prefixCls", "value", "padding", "minHeight", "placeholder", "language", "className", "style", "onChange"];
import React, { useEffect, useMemo, useState } from 'react';

@@ -17,2 +17,5 @@ import { processHtml, htmlEncode } from './utils';

padding = _props$padding === void 0 ? 10 : _props$padding,
_props$minHeight = props.minHeight,
minHeight = _props$minHeight === void 0 ? 16 : _props$minHeight,
placeholder = props.placeholder,
language = props.language,

@@ -39,7 +42,9 @@ className = props.className,

var htmlStr = useMemo(function () {
return processHtml("<pre aria-hidden=true><code ".concat(language ? "class=\"language-".concat(language, "\"") : '', " >").concat(htmlEncode(String(value || '')), "</code></pre>"));
return processHtml("<pre aria-hidden=true><code ".concat(language ? "class=\"language-".concat(language, "\"") : '', " >").concat(htmlEncode(String(value || '')), "</code><br /></pre>"));
}, [value, language]);
var preView = useMemo(function () {
return /*#__PURE__*/React.createElement("div", {
style: _objectSpread({}, contentStyle),
style: _objectSpread(_objectSpread(_objectSpread({}, styles.editor), contentStyle), {}, {
minHeight: minHeight
}),
className: "".concat(prefixCls, "-preview ").concat(language ? "language-".concat(language) : ''),

@@ -61,3 +66,8 @@ dangerouslySetInnerHTML: {

}, other, {
style: _objectSpread(_objectSpread(_objectSpread({}, styles.editor), styles.textarea), contentStyle),
placeholder: placeholder,
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, styles.editor), styles.textarea), contentStyle), {}, {
minHeight: minHeight
}, placeholder && !value ? {
WebkitTextFillColor: 'inherit'
} : {}),
ref: ref,

@@ -72,2 +82,2 @@ onChange: function onChange(evn) {

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOlsiUmVhY3QiLCJ1c2VFZmZlY3QiLCJ1c2VNZW1vIiwidXNlU3RhdGUiLCJwcm9jZXNzSHRtbCIsImh0bWxFbmNvZGUiLCJzdHlsZXMiLCJmb3J3YXJkUmVmIiwicHJvcHMiLCJyZWYiLCJwcmVmaXhDbHMiLCJfIiwidmFsdWUiLCJwYWRkaW5nIiwibGFuZ3VhZ2UiLCJjbGFzc05hbWUiLCJzdHlsZSIsIm9uQ2hhbmdlIiwib3RoZXIiLCJzZXRWYWx1ZSIsImNvbnRlbnRTdHlsZSIsInBhZGRpbmdUb3AiLCJwYWRkaW5nUmlnaHQiLCJwYWRkaW5nQm90dG9tIiwicGFkZGluZ0xlZnQiLCJodG1sU3RyIiwiU3RyaW5nIiwicHJlVmlldyIsIl9faHRtbCIsImNvbnRhaW5lciIsImVkaXRvciIsInRleHRhcmVhIiwiZXZuIiwidGFyZ2V0Il0sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU9BLEtBQVAsSUFBZ0JDLFNBQWhCLEVBQTJCQyxPQUEzQixFQUFvQ0MsUUF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fVxuICAgIDwvZGl2PlxuICApO1xufSk7XG4iXX0=
{
"name": "@uiw/react-textarea-code-editor",
"version": "1.0.6",
"version": "1.0.7",
"description": "A simple code editor with syntax highlighting.",

@@ -5,0 +5,0 @@ "homepage": "https://uiwjs.github.io/react-textarea-code-editor/",

@@ -56,2 +56,6 @@ React Textarea Code Editor

padding?: number;
/**
* The minimum height of the editor. Default: `16`.
*/
minHeight?: number;
}

@@ -58,0 +62,0 @@ ```

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

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