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

@contentful/rich-text-html-renderer

Package Overview
Dependencies
Maintainers
103
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 15.0.0 to 15.1.0

dist/lib/rich-text-html-renderer/src/__test__/documents/embedded-entry.js

298

dist/rich-text-html-renderer.es5.js

@@ -220,15 +220,93 @@ 'use strict';

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
var toPrimitive = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
var getBuiltIn = function (namespace, method) {
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
};
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
var process = global_1.process;
var Deno = global_1.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
version = match[0] < 4 ? 1 : match[0] + match[1];
} else if (engineUserAgent) {
match = engineUserAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = engineUserAgent.match(/Chrome\/(\d+)/);
if (match) version = match[1];
}
}
var engineV8Version = version && +version;
/* eslint-disable es/no-symbol -- required for testing */
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && engineV8Version && engineV8Version < 41;
});
/* eslint-disable es/no-symbol -- required for testing */
var useSymbolAsUid = nativeSymbol
&& !Symbol.sham
&& typeof Symbol.iterator == 'symbol';
var isSymbol = useSymbolAsUid ? function (it) {
return typeof it == 'symbol';
} : function (it) {
var $Symbol = getBuiltIn('Symbol');
return typeof $Symbol == 'function' && Object(it) instanceof $Symbol;
};
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
var ordinaryToPrimitive = function (input, pref) {
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
var setGlobal = function (key, value) {
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
} catch (error) {
global_1[key] = value;
} return value;
};
var SHARED = '__core-js_shared__';
var store = global_1[SHARED] || setGlobal(SHARED, {});
var sharedStore = store;
var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.16.0',
mode: 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});
});
// `ToObject` abstract operation

@@ -246,2 +324,48 @@ // https://tc39.es/ecma262/#sec-toobject

var id = 0;
var postfix = Math.random();
var uid = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
var WellKnownSymbolsStore = shared('wks');
var Symbol$1 = global_1.Symbol;
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
var wellKnownSymbol = function (name) {
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
if (nativeSymbol && has(Symbol$1, name)) {
WellKnownSymbolsStore[name] = Symbol$1[name];
} else {
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
}
} return WellKnownSymbolsStore[name];
};
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
var toPrimitive = function (input, pref) {
if (!isObject(input) || isSymbol(input)) return input;
var exoticToPrim = input[TO_PRIMITIVE];
var result;
if (exoticToPrim !== undefined) {
if (pref === undefined) pref = 'default';
result = exoticToPrim.call(input, pref);
if (!isObject(result) || isSymbol(result)) return result;
throw TypeError("Can't convert object to primitive value");
}
if (pref === undefined) pref = 'number';
return ordinaryToPrimitive(input, pref);
};
// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
var toPropertyKey = function (argument) {
var key = toPrimitive(argument, 'string');
return isSymbol(key) ? key : String(key);
};
var document$1 = global_1.document;

@@ -270,3 +394,3 @@ // typeof document.createElement is 'object' in old IE

O = toIndexedObject(O);
P = toPrimitive(P, true);
P = toPropertyKey(P);
if (ie8DomDefine) try {

@@ -295,3 +419,3 @@ return $getOwnPropertyDescriptor(O, P);

anObject(O);
P = toPrimitive(P, true);
P = toPropertyKey(P);
anObject(Attributes);

@@ -317,15 +441,2 @@ if (ie8DomDefine) try {

var setGlobal = function (key, value) {
try {
createNonEnumerableProperty(global_1, key, value);
} catch (error) {
global_1[key] = value;
} return value;
};
var SHARED = '__core-js_shared__';
var store = global_1[SHARED] || setGlobal(SHARED, {});
var sharedStore = store;
var functionToString = Function.toString;

@@ -346,19 +457,2 @@

var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.14.0',
mode: 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});
});
var id = 0;
var postfix = Math.random();
var uid = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
var keys = shared('keys');

@@ -467,13 +561,2 @@

var path = global_1;
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
var getBuiltIn = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
};
var ceil = Math.ceil;

@@ -721,59 +804,6 @@ var floor = Math.floor;

var path = global_1;
var values = path.Object.values;
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
var process = global_1.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
version = match[0] < 4 ? 1 : match[0] + match[1];
} else if (engineUserAgent) {
match = engineUserAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = engineUserAgent.match(/Chrome\/(\d+)/);
if (match) version = match[1];
}
}
var engineV8Version = version && +version;
/* eslint-disable es/no-symbol -- required for testing */
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && engineV8Version && engineV8Version < 41;
});
/* eslint-disable es/no-symbol -- required for testing */
var useSymbolAsUid = nativeSymbol
&& !Symbol.sham
&& typeof Symbol.iterator == 'symbol';
var WellKnownSymbolsStore = shared('wks');
var Symbol$1 = global_1.Symbol;
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
var wellKnownSymbol = function (name) {
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
if (nativeSymbol && has(Symbol$1, name)) {
WellKnownSymbolsStore[name] = Symbol$1[name];
} else {
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
}
} return WellKnownSymbolsStore[name];
};
// `Object.defineProperties` method

@@ -794,2 +824,11 @@ // https://tc39.es/ecma262/#sec-object.defineproperties

/* global ActiveXObject -- old IE, WSH */
var GT = '>';

@@ -822,11 +861,13 @@ var LT = '<';

var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
if (iframe.style) {
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
}
};

@@ -842,6 +883,8 @@

try {
/* global ActiveXObject -- old IE */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
NullProtoObject = document.domain && activeXDocument ?
NullProtoObjectViaActiveX(activeXDocument) : // old IE
NullProtoObjectViaIFrame() ||
NullProtoObjectViaActiveX(activeXDocument); // WSH
var length = enumBugKeys.length;

@@ -977,8 +1020,10 @@ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];

*/
var marks = {
BOLD: 'bold',
ITALIC: 'italic',
UNDERLINE: 'underline',
CODE: 'code',
};
var MARKS;
(function (MARKS) {
MARKS["BOLD"] = "bold";
MARKS["ITALIC"] = "italic";
MARKS["UNDERLINE"] = "underline";
MARKS["CODE"] = "code";
})(MARKS || (MARKS = {}));
var MARKS$1 = MARKS;

@@ -1075,3 +1120,3 @@ var _a;

exports.INLINES = INLINES$1;
exports.MARKS = marks;
exports.MARKS = MARKS$1;
exports.TOP_LEVEL_BLOCKS = TOP_LEVEL_BLOCKS;

@@ -1108,2 +1153,5 @@ exports.VOID_BLOCKS = VOID_BLOCKS;

_a[richTextTypes_es5_1.HR] = function () { return '<hr/>'; },
_a[richTextTypes_es5_1.TABLE] = function (node, next) { return "<table><tbody>" + next(node.content) + "</tbody></table>"; },
_a[richTextTypes_es5_1.TABLE_ROW] = function (node, next) { return "<tr>" + next(node.content) + "</tr>"; },
_a[richTextTypes_es5_1.TABLE_CELL] = function (node, next) { return "<td>" + next(node.content) + "</td>"; },
_a[richTextTypes_es5_4.ASSET_HYPERLINK] = function (node) { return defaultInline(richTextTypes_es5_4.ASSET_HYPERLINK, node); },

@@ -1110,0 +1158,0 @@ _a[richTextTypes_es5_4.ENTRY_HYPERLINK] = function (node) { return defaultInline(richTextTypes_es5_4.ENTRY_HYPERLINK, node); },

{
"name": "@contentful/rich-text-html-renderer",
"version": "15.0.0",
"version": "15.1.0",
"main": "dist/rich-text-html-renderer.es5.js",

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

"dependencies": {
"@contentful/rich-text-types": "^15.0.0",
"@contentful/rich-text-types": "^15.1.0",
"escape-html": "^1.0.3"

@@ -45,3 +45,3 @@ },

},
"gitHead": "be7ebb0ce035f7646370ac1dab0233cbdac01b1e"
"gitHead": "9cbd4f6888ee8c94f970923afdfadd91d7f049cb"
}

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