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

@contentful/rich-text-react-renderer

Package Overview
Dependencies
Maintainers
104
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/rich-text-react-renderer - npm Package Compare versions

Comparing version 15.3.0 to 15.3.1

78

CHANGELOG.md

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

## [15.3.1](https://github.com/contentful/rich-text/compare/v15.3.0...v15.3.1) (2021-09-07)
**Note:** Version bump only for package @contentful/rich-text-react-renderer
# [15.2.0](https://github.com/contentful/rich-text/compare/v15.1.0...v15.2.0) (2021-08-16)
### Bug Fixes
* audit fix aiming mixing-deep vulnerability ([2b98cbd](https://github.com/contentful/rich-text/commit/2b98cbd8e85435305378dd91d70d55db5e9c0832))
# [15.1.0](https://github.com/contentful/rich-text/compare/v15.0.0...v15.1.0) (2021-08-02)
### Features
* 🎸 add RT react renderer tables support ([fddfb8a](https://github.com/contentful/rich-text/commit/fddfb8a943b9807efe92b749d7ffdeb1308e42bd))
# [15.0.0](https://github.com/contentful/rich-text/compare/v14.2.0...v15.0.0) (2021-06-15)
# [15.3.0](https://github.com/contentful/rich-text/compare/v15.2.0...v15.3.0) (2021-09-06)

@@ -17,2 +47,48 @@

**Note:** Version bump only for package @contentful/rich-text-react-renderer
## [14.1.2](https://github.com/contentful/rich-text/compare/v14.0.1...v14.1.2) (2020-11-02)
## [14.0.1](https://github.com/contentful/rich-text/compare/v14.0.0...v14.0.1) (2020-01-30)
# [14.0.0](https://github.com/contentful/rich-text/compare/v13.4.0...v14.0.0) (2020-01-28)
# [13.4.0](https://github.com/contentful/rich-text/compare/v13.3.0...v13.4.0) (2019-08-01)
### Features
* 🎸 Adds BLOCKS.DOCUMENT renderer support to react-renderer ([57c922c](https://github.com/contentful/rich-text/commit/57c922cb638c47729f2189815a647ba68859394e)), closes [#104](https://github.com/contentful/rich-text/issues/104)
# [13.2.0](https://github.com/contentful/rich-text/compare/v13.1.0...v13.2.0) (2019-03-18)
### Features
* 🎸 renderText option to alter all text ([f684a6e](https://github.com/contentful/rich-text/commit/f684a6e91d81ab0c66c286adaa923bd2edf0f4f1))
# [13.1.0](https://github.com/contentful/rich-text/compare/v13.0.1...v13.1.0) (2019-03-04)
## [13.0.1](https://github.com/contentful/rich-text/compare/v13.0.0...v13.0.1) (2019-02-11)
### Bug Fixes
* 🐛 Fix wrong import in tests ([bead583](https://github.com/contentful/rich-text/commit/bead583e6e9bb71638694e466980b90e599fa47b))
### Features
* 🎸 Initial rich-text-react-renderer implementation ([06dad9b](https://github.com/contentful/rich-text/commit/06dad9b0359325d8fa433438dac997fc9656d13f))

32

dist/lib/__test__/documents/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.tableDoc = exports.quoteDoc = exports.ulDoc = exports.olDoc = exports.inlineEntityDoc = exports.embeddedEntryDoc = exports.multiMarkDoc = exports.marksDoc = exports.headingDoc = exports.paragraphDoc = exports.invalidTypeDoc = exports.invalidMarksDoc = exports.hyperlinkDoc = exports.hrDoc = void 0;
var hr_1 = require("./hr");
exports.hrDoc = hr_1.default;
Object.defineProperty(exports, "hrDoc", { enumerable: true, get: function () { return __importDefault(hr_1).default; } });
var hyperlink_1 = require("./hyperlink");
exports.hyperlinkDoc = hyperlink_1.default;
Object.defineProperty(exports, "hyperlinkDoc", { enumerable: true, get: function () { return __importDefault(hyperlink_1).default; } });
var invalid_marks_1 = require("./invalid-marks");
exports.invalidMarksDoc = invalid_marks_1.default;
Object.defineProperty(exports, "invalidMarksDoc", { enumerable: true, get: function () { return __importDefault(invalid_marks_1).default; } });
var invalid_type_1 = require("./invalid-type");
exports.invalidTypeDoc = invalid_type_1.default;
Object.defineProperty(exports, "invalidTypeDoc", { enumerable: true, get: function () { return __importDefault(invalid_type_1).default; } });
var paragraph_1 = require("./paragraph");
exports.paragraphDoc = paragraph_1.default;
Object.defineProperty(exports, "paragraphDoc", { enumerable: true, get: function () { return __importDefault(paragraph_1).default; } });
var heading_1 = require("./heading");
exports.headingDoc = heading_1.default;
Object.defineProperty(exports, "headingDoc", { enumerable: true, get: function () { return __importDefault(heading_1).default; } });
var mark_1 = require("./mark");
exports.marksDoc = mark_1.default;
Object.defineProperty(exports, "marksDoc", { enumerable: true, get: function () { return __importDefault(mark_1).default; } });
var multi_mark_1 = require("./multi-mark");
exports.multiMarkDoc = multi_mark_1.default;
Object.defineProperty(exports, "multiMarkDoc", { enumerable: true, get: function () { return __importDefault(multi_mark_1).default; } });
var embedded_entry_1 = require("./embedded-entry");
exports.embeddedEntryDoc = embedded_entry_1.default;
Object.defineProperty(exports, "embeddedEntryDoc", { enumerable: true, get: function () { return __importDefault(embedded_entry_1).default; } });
var inline_entity_1 = require("./inline-entity");
exports.inlineEntityDoc = inline_entity_1.default;
Object.defineProperty(exports, "inlineEntityDoc", { enumerable: true, get: function () { return __importDefault(inline_entity_1).default; } });
var ol_1 = require("./ol");
exports.olDoc = ol_1.default;
Object.defineProperty(exports, "olDoc", { enumerable: true, get: function () { return __importDefault(ol_1).default; } });
var ul_1 = require("./ul");
exports.ulDoc = ul_1.default;
Object.defineProperty(exports, "ulDoc", { enumerable: true, get: function () { return __importDefault(ul_1).default; } });
var quote_1 = require("./quote");
exports.quoteDoc = quote_1.default;
Object.defineProperty(exports, "quoteDoc", { enumerable: true, get: function () { return __importDefault(quote_1).default; } });
var table_1 = require("./table");
exports.tableDoc = table_1.default;
Object.defineProperty(exports, "tableDoc", { enumerable: true, get: function () { return __importDefault(table_1).default; } });
//# sourceMappingURL=index.js.map

@@ -13,2 +13,11 @@ "use strict";

};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -34,8 +43,8 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

};
expect(__1.documentToReactComponents(document)).toEqual([]);
expect((0, __1.documentToReactComponents)(document)).toEqual([]);
});
it('returns an array of elements when given a populated document', function () {
var document = documents_1.hrDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect(__1.documentToReactComponents(document)).toBeInstanceOf(Array);
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toBeInstanceOf(Array);
});

@@ -45,7 +54,7 @@ it('renders nodes with default node renderer', function () {

documents_1.paragraphDoc,
documents_1.headingDoc(rich_text_types_1.BLOCKS.HEADING_1),
documents_1.headingDoc(rich_text_types_1.BLOCKS.HEADING_2),
(0, documents_1.headingDoc)(rich_text_types_1.BLOCKS.HEADING_1),
(0, documents_1.headingDoc)(rich_text_types_1.BLOCKS.HEADING_2),
];
docs.forEach(function (doc) {
expect(__1.documentToReactComponents(doc)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(doc)).toMatchSnapshot();
});

@@ -55,9 +64,9 @@ });

var docs = [
documents_1.marksDoc(rich_text_types_1.MARKS.ITALIC),
documents_1.marksDoc(rich_text_types_1.MARKS.BOLD),
documents_1.marksDoc(rich_text_types_1.MARKS.UNDERLINE),
documents_1.marksDoc(rich_text_types_1.MARKS.CODE),
(0, documents_1.marksDoc)(rich_text_types_1.MARKS.ITALIC),
(0, documents_1.marksDoc)(rich_text_types_1.MARKS.BOLD),
(0, documents_1.marksDoc)(rich_text_types_1.MARKS.UNDERLINE),
(0, documents_1.marksDoc)(rich_text_types_1.MARKS.CODE),
];
docs.forEach(function (doc) {
expect(__1.documentToReactComponents(doc)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(doc)).toMatchSnapshot();
});

@@ -67,7 +76,7 @@ });

var document = documents_1.paragraphDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders multiple marks with default mark renderer', function () {
var doc = documents_1.multiMarkDoc();
expect(__1.documentToReactComponents(doc)).toMatchSnapshot();
var doc = (0, documents_1.multiMarkDoc)();
expect((0, __1.documentToReactComponents)(doc)).toMatchSnapshot();
});

@@ -83,3 +92,3 @@ it('renders nodes with passed custom node renderer', function () {

var document = documents_1.quoteDoc;
expect(__1.documentToReactComponents(document, options)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document, options)).toMatchSnapshot();
});

@@ -93,4 +102,4 @@ it('renders marks with the passed custom mark renderer', function () {

};
var document = documents_1.multiMarkDoc();
expect(__1.documentToReactComponents(document, options)).toMatchSnapshot();
var document = (0, documents_1.multiMarkDoc)();
expect((0, __1.documentToReactComponents)(document, options)).toMatchSnapshot();
});

@@ -102,11 +111,11 @@ it('renders text with the passed custom text renderer', function () {

var document = documents_1.paragraphDoc;
expect(__1.documentToReactComponents(document, options)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document, options)).toMatchSnapshot();
});
it('does not render unrecognized marks', function () {
var document = documents_1.invalidMarksDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders empty node if type is not recognized', function () {
var document = documents_1.invalidTypeDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});

@@ -121,32 +130,32 @@ it('renders default entry link block', function () {

};
var document = documents_1.embeddedEntryDoc(entrySys);
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
var document = (0, documents_1.embeddedEntryDoc)(entrySys);
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders ordered lists', function () {
var document = documents_1.olDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders unordered lists', function () {
var document = documents_1.ulDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders blockquotes', function () {
var document = documents_1.quoteDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders horizontal rule', function () {
var document = documents_1.hrDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('renders tables', function () {
var document = documents_1.tableDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});
it('does not crash with inline elements (e.g. hyperlink)', function () {
var document = documents_1.hyperlinkDoc;
expect(__1.documentToReactComponents(document)).toBeTruthy();
expect((0, __1.documentToReactComponents)(document)).toBeTruthy();
});
it('renders hyperlink', function () {
var document = documents_1.hyperlinkDoc;
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});

@@ -163,4 +172,4 @@ it('renders asset hyperlink', function () {

};
var document = documents_1.inlineEntityDoc(asset, rich_text_types_1.INLINES.ASSET_HYPERLINK);
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
var document = (0, documents_1.inlineEntityDoc)(asset, rich_text_types_1.INLINES.ASSET_HYPERLINK);
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});

@@ -177,4 +186,4 @@ it('renders entry hyperlink', function () {

};
var document = documents_1.inlineEntityDoc(entry, rich_text_types_1.INLINES.ENTRY_HYPERLINK);
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
var document = (0, documents_1.inlineEntityDoc)(entry, rich_text_types_1.INLINES.ENTRY_HYPERLINK);
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});

@@ -191,4 +200,4 @@ it('renders embedded entry', function () {

};
var document = documents_1.inlineEntityDoc(entry, rich_text_types_1.INLINES.EMBEDDED_ENTRY);
expect(__1.documentToReactComponents(document)).toMatchSnapshot();
var document = (0, documents_1.inlineEntityDoc)(entry, rich_text_types_1.INLINES.EMBEDDED_ENTRY);
expect((0, __1.documentToReactComponents)(document)).toMatchSnapshot();
});

@@ -198,18 +207,18 @@ });

it('appends keys to default React components', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement(react_1.default.createElement("div", null), 0)).toHaveProperty('key', '0');
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)(react_1.default.createElement("div", null), 0)).toHaveProperty('key', '0');
});
it('appends keys to custom React components', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement(react_1.default.createElement(Paragraph_1.default, null, "hello world"), 0)).toHaveProperty('key', '0');
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)(react_1.default.createElement(Paragraph_1.default, null, "hello world"), 0)).toHaveProperty('key', '0');
});
it('does not overwrite user specified keys', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement(react_1.default.createElement("div", { key: 'xyz' }), 0)).toHaveProperty('key', 'xyz');
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)(react_1.default.createElement("div", { key: 'xyz' }), 0)).toHaveProperty('key', 'xyz');
});
it('does not add keys to text nodes', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement('hello world', 0)).not.toHaveProperty('key');
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)('hello world', 0)).not.toHaveProperty('key');
});
it('does not add keys to node arrays', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement([react_1.default.createElement("div", { key: 0 }), react_1.default.createElement("div", { key: 1 })], 0)).not.toHaveProperty('key');
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)([react_1.default.createElement("div", { key: 0 }), react_1.default.createElement("div", { key: 1 })], 0)).not.toHaveProperty('key');
});
it('does not add keys to null', function () {
expect(appendKeyToValidElement_1.appendKeyToValidElement(null, 0)).toBeNull();
expect((0, appendKeyToValidElement_1.appendKeyToValidElement)(null, 0)).toBeNull();
});

@@ -246,12 +255,12 @@ });

it('renders valid nodes', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(createBlockNode(rich_text_types_1.BLOCKS.PARAGRAPH), options)).toMatchSnapshot();
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(createBlockNode(rich_text_types_1.BLOCKS.PARAGRAPH), options)).toMatchSnapshot();
});
it('renders invalid node types in React fragments', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(createBlockNode(rich_text_types_1.BLOCKS.HEADING_1), options)).toMatchSnapshot();
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(createBlockNode(rich_text_types_1.BLOCKS.HEADING_1), options)).toMatchSnapshot();
});
it('renders valid marks', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(createTextNode(rich_text_types_1.MARKS.BOLD), options)).toMatchSnapshot();
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(createTextNode(rich_text_types_1.MARKS.BOLD), options)).toMatchSnapshot();
});
it('does not add additional tags on invalid marks', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(createTextNode(rich_text_types_1.MARKS.ITALIC), options)).toMatchSnapshot();
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(createTextNode(rich_text_types_1.MARKS.ITALIC), options)).toMatchSnapshot();
});

@@ -271,8 +280,8 @@ var customTextNode = {

it('does not render altered text with default text renderer', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(customTextNode, options)).toMatchSnapshot();
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(customTextNode, options)).toMatchSnapshot();
});
it('renders altered text with custom text renderer', function () {
expect(nodeListToReactComponents_1.nodeToReactComponent(customTextNode, __assign({}, options, { renderText: function (text) {
expect((0, nodeListToReactComponents_1.nodeToReactComponent)(customTextNode, __assign(__assign({}, options), { renderText: function (text) {
return text.split('\n').reduce(function (children, textSegment, index) {
return children.concat([index > 0 && react_1.default.createElement("br", { key: index }), textSegment]);
return __spreadArray(__spreadArray([], children, true), [index > 0 && react_1.default.createElement("br", { key: index }), textSegment], false);
}, []);

@@ -325,3 +334,3 @@ } }))).toMatchSnapshot();

it('renders children as an array with keys from its index', function () {
var renderedNodes = nodeListToReactComponents_1.nodeListToReactComponents(nodes, options);
var renderedNodes = (0, nodeListToReactComponents_1.nodeListToReactComponents)(nodes, options);
expect(renderedNodes[0]).toHaveProperty('key', '0');

@@ -328,0 +337,0 @@ expect(renderedNodes[1]).not.toHaveProperty('key');

@@ -16,4 +16,5 @@ "use strict";

};
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
var _a, _b;
exports.documentToReactComponents = void 0;
var react_1 = __importDefault(require("react"));

@@ -67,5 +68,5 @@ var rich_text_types_1 = require("@contentful/rich-text-types");

}
return nodeListToReactComponents_1.nodeToReactComponent(richTextDocument, {
renderNode: __assign({}, defaultNodeRenderers, options.renderNode),
renderMark: __assign({}, defaultMarkRenderers, options.renderMark),
return (0, nodeListToReactComponents_1.nodeToReactComponent)(richTextDocument, {
renderNode: __assign(__assign({}, defaultNodeRenderers), options.renderNode),
renderMark: __assign(__assign({}, defaultMarkRenderers), options.renderMark),
renderText: options.renderText,

@@ -72,0 +73,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.appendKeyToValidElement = void 0;
var react_1 = require("react");
function appendKeyToValidElement(element, key) {
if (react_1.isValidElement(element) && element.key === null) {
return react_1.cloneElement(element, { key: key });
if ((0, react_1.isValidElement)(element) && element.key === null) {
return (0, react_1.cloneElement)(element, { key: key });
}

@@ -8,0 +9,0 @@ return element;

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.nodeToReactComponent = exports.nodeListToReactComponents = void 0;
var react_1 = __importDefault(require("react"));

@@ -12,3 +13,3 @@ var rich_text_types_1 = require("@contentful/rich-text-types");

return nodes.map(function (node, index) {
return appendKeyToValidElement_1.appendKeyToValidElement(nodeToReactComponent(node, options), index);
return (0, appendKeyToValidElement_1.appendKeyToValidElement)(nodeToReactComponent(node, options), index);
});

@@ -15,0 +16,0 @@ }

@@ -11,14 +11,14 @@ 'use strict';

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -235,3 +235,3 @@

version: '3.17.2',
mode: 'global',
mode: 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'

@@ -948,2 +948,23 @@ });

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}
var _a;

@@ -980,3 +1001,3 @@ /**

_a[BLOCKS$1.UL_LIST] = [BLOCKS$1.LIST_ITEM],
_a[BLOCKS$1.LIST_ITEM] = TOP_LEVEL_BLOCKS.slice(),
_a[BLOCKS$1.LIST_ITEM] = __spreadArray([], TOP_LEVEL_BLOCKS),
_a[BLOCKS$1.QUOTE] = [BLOCKS$1.PARAGRAPH],

@@ -1032,2 +1053,3 @@ _a[BLOCKS$1.TABLE] = [BLOCKS$1.TABLE_ROW],

var helpers = /*#__PURE__*/Object.freeze({
__proto__: null,
isInline: isInline,

@@ -1137,4 +1159,4 @@ isBlock: isBlock,

return nodeToReactComponent(richTextDocument, {
renderNode: __assign({}, defaultNodeRenderers, options.renderNode),
renderMark: __assign({}, defaultMarkRenderers, options.renderMark),
renderNode: __assign(__assign({}, defaultNodeRenderers), options.renderNode),
renderMark: __assign(__assign({}, defaultMarkRenderers), options.renderMark),
renderText: options.renderText,

@@ -1141,0 +1163,0 @@ });

{
"name": "@contentful/rich-text-react-renderer",
"version": "15.3.0",
"version": "15.3.1",
"main": "dist/rich-text-react-renderer.es5.js",

@@ -27,3 +27,3 @@ "typings": "dist/types/index.d.ts",

"dependencies": {
"@contentful/rich-text-types": "^15.3.0"
"@contentful/rich-text-types": "^15.3.1"
},

@@ -37,17 +37,17 @@ "peerDependencies": {

"@types/react-dom": "^16.8.4",
"jest": "^24.7.1",
"jest": "^27.1.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"rimraf": "^2.6.3",
"rollup": "^1.11.0",
"rollup": "^1.32.1",
"rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-typescript2": "^0.21.0",
"ts-jest": "^24.0.2",
"tslint": "^5.16.0",
"typescript": "^3.4.5"
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^27.0.5",
"tslint": "^6.1.3",
"typescript": "^4.4.2"
},
"gitHead": "8744fa8300f14a0ee224152fa8da3bbc6f085c69"
"gitHead": "264c16cef58794e31d1f7c11dd98d627147b2e9d"
}

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

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