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

@contentful/rich-text-types

Package Overview
Dependencies
Maintainers
100
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/rich-text-types - npm Package Compare versions

Comparing version 14.1.2 to 15.0.0

dist/lib/schemas/generated/table-cell.json

3

dist/lib/blocks.js

@@ -23,4 +23,7 @@ "use strict";

BLOCKS["EMBEDDED_ASSET"] = "embedded-asset-block";
BLOCKS["TABLE"] = "table";
BLOCKS["TABLE_ROW"] = "table-row";
BLOCKS["TABLE_CELL"] = "table-cell";
})(BLOCKS || (BLOCKS = {}));
exports.default = BLOCKS;
//# sourceMappingURL=blocks.js.map

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

blocks_1.default.EMBEDDED_ASSET,
blocks_1.default.TABLE,
];

@@ -40,3 +41,6 @@ /**

_a[blocks_1.default.QUOTE] = [blocks_1.default.PARAGRAPH],
_a[blocks_1.default.TABLE] = [blocks_1.default.TABLE_ROW],
_a[blocks_1.default.TABLE_ROW] = [blocks_1.default.TABLE_CELL],
_a[blocks_1.default.TABLE_CELL] = [blocks_1.default.PARAGRAPH],
_a);
//# sourceMappingURL=schemaConstraints.js.map

@@ -77,2 +77,3 @@ {

"paragraph",
"table",
"unordered-list"

@@ -132,2 +133,5 @@ ],

"paragraph",
"table",
"table-cell",
"table-row",
"unordered-list"

@@ -134,0 +138,0 @@ ],

@@ -78,2 +78,3 @@ {

"paragraph",
"table",
"unordered-list"

@@ -133,2 +134,5 @@ ],

"paragraph",
"table",
"table-cell",
"table-row",
"unordered-list"

@@ -135,0 +139,0 @@ ],

@@ -105,2 +105,3 @@ {

"paragraph",
"table",
"unordered-list"

@@ -160,2 +161,5 @@ ],

"paragraph",
"table",
"table-cell",
"table-row",
"unordered-list"

@@ -162,0 +166,0 @@ ],

@@ -105,2 +105,3 @@ {

"paragraph",
"table",
"unordered-list"

@@ -160,2 +161,5 @@ ],

"paragraph",
"table",
"table-cell",
"table-row",
"unordered-list"

@@ -162,0 +166,0 @@ ],

199

dist/rich-text-types.es5.js

@@ -17,9 +17,10 @@ 'use strict';

var global_1 =
// eslint-disable-next-line no-undef
// eslint-disable-next-line es/no-global-this -- safe
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
// eslint-disable-next-line no-new-func
Function('return this')();
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();

@@ -34,19 +35,21 @@ var fails = function (exec) {

// Thank's IE8 for his funny defineProperty
// Detect IE8's incomplete defineProperty implementation
var descriptors = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
} : $propertyIsEnumerable;

@@ -77,3 +80,3 @@ var objectPropertyIsEnumerable = {

// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
// eslint-disable-next-line no-prototype-builtins -- safe
return !Object('z').propertyIsEnumerable(0);

@@ -85,3 +88,3 @@ }) ? function (it) {

// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
// https://tc39.es/ecma262/#sec-requireobjectcoercible
var requireObjectCoercible = function (it) {

@@ -105,3 +108,3 @@ if (it == undefined) throw TypeError("Can't call method on " + it);

// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case

@@ -118,6 +121,12 @@ // and the second argument - flag - preferred type is a string

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
var toObject = function (argument) {
return Object(requireObjectCoercible(argument));
};
var hasOwnProperty = {}.hasOwnProperty;
var has = function (it, key) {
return hasOwnProperty.call(it, key);
var has = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty.call(toObject(it), key);
};

@@ -135,2 +144,3 @@

var ie8DomDefine = !descriptors && !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing
return Object.defineProperty(documentCreateElement('div'), 'a', {

@@ -141,11 +151,12 @@ get: function () { return 7; }

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (ie8DomDefine) try {
return nativeGetOwnPropertyDescriptor(O, P);
return $getOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }

@@ -165,7 +176,8 @@ if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);

var nativeDefineProperty = Object.defineProperty;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
// https://tc39.es/ecma262/#sec-object.defineproperty
var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);

@@ -175,3 +187,3 @@ P = toPrimitive(P, true);

if (ie8DomDefine) try {
return nativeDefineProperty(O, P, Attributes);
return $defineProperty(O, P, Attributes);
} catch (error) { /* empty */ }

@@ -209,3 +221,3 @@ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof sharedStore.inspectSource != 'function') {

@@ -227,5 +239,5 @@ sharedStore.inspectSource = function (it) {

})('versions', []).push({
version: '3.6.5',
version: '3.14.0',
mode: 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});

@@ -249,2 +261,3 @@ });

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var WeakMap$1 = global_1.WeakMap;

@@ -266,4 +279,4 @@ var set, get, has$1;

if (nativeWeakMap) {
var store$1 = new WeakMap$1();
if (nativeWeakMap || sharedStore.state) {
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
var wmget = store$1.get;

@@ -273,2 +286,4 @@ var wmhas = store$1.has;

set = function (it, metadata) {
if (wmhas.call(store$1, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
wmset.call(store$1, it, metadata);

@@ -287,2 +302,4 @@ return metadata;

set = function (it, metadata) {
if (has(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);

@@ -316,5 +333,11 @@ return metadata;

var noTargetGet = options ? !!options.noTargetGet : false;
var state;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
if (typeof key == 'string' && !has(value, 'name')) {
createNonEnumerableProperty(value, 'name', key);
}
state = enforceInternalState(value);
if (!state.source) {
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
}

@@ -353,3 +376,3 @@ if (O === global_1) {

// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
// https://tc39.es/ecma262/#sec-tointeger
var toInteger = function (argument) {

@@ -362,3 +385,3 @@ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);

// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
// https://tc39.es/ecma262/#sec-tolength
var toLength = function (argument) {

@@ -387,6 +410,6 @@ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991

// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
// eslint-disable-next-line no-self-compare -- NaN check
if (value != value) return true;

@@ -402,6 +425,6 @@ // Array#indexOf ignores holes, Array#includes - not

// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)

@@ -440,3 +463,4 @@ };

// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {

@@ -450,2 +474,3 @@ return objectKeysInternal(O, hiddenKeys$1);

// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
var f$4 = Object.getOwnPropertySymbols;

@@ -549,3 +574,4 @@

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
var objectKeys = Object.keys || function keys(O) {

@@ -578,6 +604,6 @@ return objectKeysInternal(O, enumBugKeys);

// `Object.entries` method
// https://tc39.github.io/ecma262/#sec-object.entries
// https://tc39.es/ecma262/#sec-object.entries
entries: createMethod$1(true),
// `Object.values` method
// https://tc39.github.io/ecma262/#sec-object.values
// https://tc39.es/ecma262/#sec-object.values
values: createMethod$1(false)

@@ -589,3 +615,3 @@ };

// `Object.values` method
// https://tc39.github.io/ecma262/#sec-object.values
// https://tc39.es/ecma262/#sec-object.values
_export({ target: 'Object', stat: true }, {

@@ -599,12 +625,41 @@ values: function values(O) {

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
// eslint-disable-next-line no-undef
return !String(Symbol());
// `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
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol.iterator == 'symbol';

@@ -617,5 +672,8 @@

var wellKnownSymbol = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + 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];

@@ -625,3 +683,4 @@ };

// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {

@@ -685,3 +744,3 @@ anObject(O);

try {
/* global ActiveXObject */
/* global ActiveXObject -- old IE */
activeXDocument = document.domain && new ActiveXObject('htmlfile');

@@ -698,3 +757,3 @@ } catch (error) { /* ignore */ }

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
// https://tc39.es/ecma262/#sec-object.create
var objectCreate = Object.create || function create(O, Properties) {

@@ -716,3 +775,3 @@ var result;

// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {

@@ -730,35 +789,8 @@ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {

var defineProperty = Object.defineProperty;
var cache = {};
var thrower = function (it) { throw it; };
var arrayMethodUsesToLength = function (METHOD_NAME, options) {
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
if (!options) options = {};
var method = [][METHOD_NAME];
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
var argument0 = has(options, 0) ? options[0] : thrower;
var argument1 = has(options, 1) ? options[1] : undefined;
return cache[METHOD_NAME] = !!method && !fails(function () {
if (ACCESSORS && !descriptors) return true;
var O = { length: -1 };
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
else O[1] = 1;
method.call(O, argument0, argument1);
});
};
var $includes = arrayIncludes.includes;
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {
// https://tc39.es/ecma262/#sec-array.prototype.includes
_export({ target: 'Array', proto: true }, {
includes: function includes(el /* , fromIndex = 0 */) {

@@ -769,3 +801,3 @@ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');

@@ -830,2 +862,5 @@

BLOCKS["EMBEDDED_ASSET"] = "embedded-asset-block";
BLOCKS["TABLE"] = "table";
BLOCKS["TABLE_ROW"] = "table-row";
BLOCKS["TABLE_CELL"] = "table-cell";
})(BLOCKS || (BLOCKS = {}));

@@ -875,2 +910,3 @@ var BLOCKS$1 = BLOCKS;

BLOCKS$1.EMBEDDED_ASSET,
BLOCKS$1.TABLE,
];

@@ -889,2 +925,5 @@ /**

_a[BLOCKS$1.QUOTE] = [BLOCKS$1.PARAGRAPH],
_a[BLOCKS$1.TABLE] = [BLOCKS$1.TABLE_ROW],
_a[BLOCKS$1.TABLE_ROW] = [BLOCKS$1.TABLE_CELL],
_a[BLOCKS$1.TABLE_CELL] = [BLOCKS$1.PARAGRAPH],
_a);

@@ -891,0 +930,0 @@

@@ -19,4 +19,7 @@ /**

EMBEDDED_ENTRY = "embedded-entry-block",
EMBEDDED_ASSET = "embedded-asset-block"
EMBEDDED_ASSET = "embedded-asset-block",
TABLE = "table",
TABLE_ROW = "table-row",
TABLE_CELL = "table-cell"
}
export default BLOCKS;

@@ -130,2 +130,19 @@ import { Block, Inline, Text, TopLevelBlock } from './types';

}
export interface TableCell extends Block {
nodeType: BLOCKS.TABLE_CELL;
data: {
colspan?: number;
};
content: Paragraph[];
}
export interface TableRow extends Block {
nodeType: BLOCKS.TABLE_ROW;
data: EmptyNodeData;
content: TableCell[];
}
export interface Table extends Block {
nodeType: BLOCKS.TABLE;
data: EmptyNodeData;
content: TableRow[];
}
export {};
import BLOCKS from './blocks';
export declare type TopLevelBlockEnum = 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;
export declare type TopLevelBlockEnum = 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.TABLE;
/**

@@ -20,2 +20,5 @@ * Array of all top level block types.

[BLOCKS.QUOTE]: BLOCKS[];
[BLOCKS.TABLE]: BLOCKS[];
[BLOCKS.TABLE_ROW]: BLOCKS[];
[BLOCKS.TABLE_CELL]: BLOCKS[];
};
{
"name": "@contentful/rich-text-types",
"version": "14.1.2",
"version": "15.0.0",
"main": "dist/rich-text-types.es5.js",

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

},
"gitHead": "35fb04f51d386d6b093f289f289de56312cefa82"
"gitHead": "be7ebb0ce035f7646370ac1dab0233cbdac01b1e"
}

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