@contentful/rich-text-plain-text-renderer
Advanced tools
Comparing version 10.0.5 to 10.1.0
@@ -8,3 +8,3 @@ "use strict"; | ||
var document = { | ||
nodeType: 'document', | ||
nodeType: rich_text_types_1.BLOCKS.DOCUMENT, | ||
data: {}, | ||
@@ -17,3 +17,3 @@ content: [], | ||
var document = { | ||
nodeType: 'document', | ||
nodeType: rich_text_types_1.BLOCKS.DOCUMENT, | ||
data: {}, | ||
@@ -51,7 +51,7 @@ content: [ | ||
var document = { | ||
nodeType: 'document', | ||
nodeType: rich_text_types_1.BLOCKS.DOCUMENT, | ||
data: {}, | ||
content: [ | ||
{ | ||
nodeType: 'paragraph', | ||
nodeType: rich_text_types_1.BLOCKS.PARAGRAPH, | ||
data: {}, | ||
@@ -84,3 +84,3 @@ content: [ | ||
{ | ||
nodeType: 'hyperlink', | ||
nodeType: rich_text_types_1.INLINES.HYPERLINK, | ||
content: [ | ||
@@ -102,11 +102,11 @@ { | ||
{ | ||
nodeType: 'unordered-list', | ||
nodeType: rich_text_types_1.BLOCKS.UL_LIST, | ||
data: {}, | ||
content: [ | ||
{ | ||
nodeType: 'list-item', | ||
nodeType: rich_text_types_1.BLOCKS.LIST_ITEM, | ||
data: {}, | ||
content: [ | ||
{ | ||
nodeType: 'paragraph', | ||
nodeType: rich_text_types_1.BLOCKS.PARAGRAPH, | ||
data: {}, | ||
@@ -121,3 +121,3 @@ content: [ | ||
{ | ||
nodeType: 'hyperlink', | ||
nodeType: rich_text_types_1.INLINES.HYPERLINK, | ||
content: [ | ||
@@ -141,7 +141,7 @@ { | ||
{ | ||
nodeType: 'list-item', | ||
nodeType: rich_text_types_1.BLOCKS.LIST_ITEM, | ||
data: {}, | ||
content: [ | ||
{ | ||
nodeType: 'paragraph', | ||
nodeType: rich_text_types_1.BLOCKS.PARAGRAPH, | ||
data: {}, | ||
@@ -148,0 +148,0 @@ content: [ |
@@ -20,19 +20,21 @@ 'use strict'; | ||
*/ | ||
var BLOCKS = { | ||
DOCUMENT: 'document', | ||
PARAGRAPH: 'paragraph', | ||
HEADING_1: 'heading-1', | ||
HEADING_2: 'heading-2', | ||
HEADING_3: 'heading-3', | ||
HEADING_4: 'heading-4', | ||
HEADING_5: 'heading-5', | ||
HEADING_6: 'heading-6', | ||
OL_LIST: 'ordered-list', | ||
UL_LIST: 'unordered-list', | ||
LIST_ITEM: 'list-item', | ||
HR: 'hr', | ||
QUOTE: 'blockquote', | ||
EMBEDDED_ENTRY: 'embedded-entry-block', | ||
EMBEDDED_ASSET: 'embedded-asset-block', | ||
}; | ||
var BLOCKS; | ||
(function (BLOCKS) { | ||
BLOCKS["DOCUMENT"] = "document"; | ||
BLOCKS["PARAGRAPH"] = "paragraph"; | ||
BLOCKS["HEADING_1"] = "heading-1"; | ||
BLOCKS["HEADING_2"] = "heading-2"; | ||
BLOCKS["HEADING_3"] = "heading-3"; | ||
BLOCKS["HEADING_4"] = "heading-4"; | ||
BLOCKS["HEADING_5"] = "heading-5"; | ||
BLOCKS["HEADING_6"] = "heading-6"; | ||
BLOCKS["OL_LIST"] = "ordered-list"; | ||
BLOCKS["UL_LIST"] = "unordered-list"; | ||
BLOCKS["LIST_ITEM"] = "list-item"; | ||
BLOCKS["HR"] = "hr"; | ||
BLOCKS["QUOTE"] = "blockquote"; | ||
BLOCKS["EMBEDDED_ENTRY"] = "embedded-entry-block"; | ||
BLOCKS["EMBEDDED_ASSET"] = "embedded-asset-block"; | ||
})(BLOCKS || (BLOCKS = {})); | ||
var BLOCKS$1 = BLOCKS; | ||
@@ -42,8 +44,10 @@ /** | ||
*/ | ||
var INLINES = { | ||
HYPERLINK: 'hyperlink', | ||
ENTRY_HYPERLINK: 'entry-hyperlink', | ||
ASSET_HYPERLINK: 'asset-hyperlink', | ||
EMBEDDED_ENTRY: 'embedded-entry-inline', | ||
}; | ||
var INLINES; | ||
(function (INLINES) { | ||
INLINES["HYPERLINK"] = "hyperlink"; | ||
INLINES["ENTRY_HYPERLINK"] = "entry-hyperlink"; | ||
INLINES["ASSET_HYPERLINK"] = "asset-hyperlink"; | ||
INLINES["EMBEDDED_ENTRY"] = "embedded-entry-inline"; | ||
})(INLINES || (INLINES = {})); | ||
var INLINES$1 = INLINES; | ||
@@ -66,15 +70,15 @@ /** | ||
var TOP_LEVEL_BLOCKS = [ | ||
BLOCKS.PARAGRAPH, | ||
BLOCKS.HEADING_1, | ||
BLOCKS.HEADING_2, | ||
BLOCKS.HEADING_3, | ||
BLOCKS.HEADING_4, | ||
BLOCKS.HEADING_5, | ||
BLOCKS.HEADING_6, | ||
BLOCKS.OL_LIST, | ||
BLOCKS.UL_LIST, | ||
BLOCKS.HR, | ||
BLOCKS.QUOTE, | ||
BLOCKS.EMBEDDED_ENTRY, | ||
BLOCKS.EMBEDDED_ASSET, | ||
BLOCKS$1.PARAGRAPH, | ||
BLOCKS$1.HEADING_1, | ||
BLOCKS$1.HEADING_2, | ||
BLOCKS$1.HEADING_3, | ||
BLOCKS$1.HEADING_4, | ||
BLOCKS$1.HEADING_5, | ||
BLOCKS$1.HEADING_6, | ||
BLOCKS$1.OL_LIST, | ||
BLOCKS$1.UL_LIST, | ||
BLOCKS$1.HR, | ||
BLOCKS$1.QUOTE, | ||
BLOCKS$1.EMBEDDED_ENTRY, | ||
BLOCKS$1.EMBEDDED_ASSET, | ||
]; | ||
@@ -84,3 +88,3 @@ /** | ||
*/ | ||
var VOID_BLOCKS = [BLOCKS.HR, BLOCKS.EMBEDDED_ENTRY, BLOCKS.EMBEDDED_ASSET]; | ||
var VOID_BLOCKS = [BLOCKS$1.HR, BLOCKS$1.EMBEDDED_ENTRY, BLOCKS$1.EMBEDDED_ASSET]; | ||
/** | ||
@@ -90,6 +94,6 @@ * Dictionary of all container block types, and the set block types they accept as children. | ||
var CONTAINERS = (_a = {}, | ||
_a[BLOCKS.OL_LIST] = [BLOCKS.LIST_ITEM], | ||
_a[BLOCKS.UL_LIST] = [BLOCKS.LIST_ITEM], | ||
_a[BLOCKS.LIST_ITEM] = TOP_LEVEL_BLOCKS.slice(), | ||
_a[BLOCKS.QUOTE] = [BLOCKS.PARAGRAPH], | ||
_a[BLOCKS$1.OL_LIST] = [BLOCKS$1.LIST_ITEM], | ||
_a[BLOCKS$1.UL_LIST] = [BLOCKS$1.LIST_ITEM], | ||
_a[BLOCKS$1.LIST_ITEM] = TOP_LEVEL_BLOCKS.slice(), | ||
_a[BLOCKS$1.QUOTE] = [BLOCKS$1.PARAGRAPH], | ||
_a); | ||
@@ -101,3 +105,3 @@ | ||
function isInline(node) { | ||
return Object.values(INLINES).includes(node.nodeType); | ||
return Object.values(INLINES$1).includes(node.nodeType); | ||
} | ||
@@ -108,3 +112,3 @@ /** | ||
function isBlock(node) { | ||
return Object.values(BLOCKS).includes(node.nodeType); | ||
return Object.values(BLOCKS$1).includes(node.nodeType); | ||
} | ||
@@ -125,4 +129,4 @@ /** | ||
exports.helpers = helpers; | ||
exports.BLOCKS = BLOCKS; | ||
exports.INLINES = INLINES; | ||
exports.BLOCKS = BLOCKS$1; | ||
exports.INLINES = INLINES$1; | ||
exports.MARKS = marks; | ||
@@ -129,0 +133,0 @@ exports.TOP_LEVEL_BLOCKS = TOP_LEVEL_BLOCKS; |
{ | ||
"name": "@contentful/rich-text-plain-text-renderer", | ||
"version": "10.0.5", | ||
"version": "10.1.0", | ||
"main": "dist/rich-text-plain-text-renderer.es5.js", | ||
@@ -26,3 +26,3 @@ "typings": "dist/types/rich-text-plain-text-renderer.d.ts", | ||
"dependencies": { | ||
"@contentful/rich-text-types": "^10.0.1" | ||
"@contentful/rich-text-types": "^10.1.0" | ||
}, | ||
@@ -41,3 +41,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "915bd02ecc6af23b2d598a07ee4f1054fd392de0" | ||
"gitHead": "f76372fc2a5fec772e124e174d50d5b2b560710c" | ||
} |
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
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
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
36258
508