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
105
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 15.3.5 to 15.3.6

11

CHANGELOG.md

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

## [15.3.6](https://github.com/contentful/rich-text/compare/v15.3.5...v15.3.6) (2021-09-15)
### Bug Fixes
* allow table-row type to have both cells ([#267](https://github.com/contentful/rich-text/issues/267)) ([ec40598](https://github.com/contentful/rich-text/commit/ec405982109cb1c16e7adf71a541a98270d7f45b))
## [15.3.5](https://github.com/contentful/rich-text/compare/v15.3.4...v15.3.5) (2021-09-13)

@@ -8,0 +19,0 @@

10

dist/lib/schemaConstraints.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.CONTAINERS = exports.VOID_BLOCKS = exports.LIST_ITEM_BLOCKS = exports.TOP_LEVEL_BLOCKS = void 0;
exports.CONTAINERS = exports.VOID_BLOCKS = exports.TABLE_BLOCKS = exports.LIST_ITEM_BLOCKS = exports.TOP_LEVEL_BLOCKS = void 0;
var blocks_1 = __importDefault(require("./blocks"));

@@ -48,2 +48,8 @@ /**

];
exports.TABLE_BLOCKS = [
blocks_1.default.TABLE,
blocks_1.default.TABLE_ROW,
blocks_1.default.TABLE_CELL,
blocks_1.default.TABLE_HEADER_CELL,
];
/**

@@ -62,3 +68,3 @@ * Array of all void block types

_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_ROW] = [blocks_1.default.TABLE_CELL, blocks_1.default.TABLE_HEADER_CELL],
_a[blocks_1.default.TABLE_CELL] = [blocks_1.default.PARAGRAPH],

@@ -65,0 +71,0 @@ _a[blocks_1.default.TABLE_HEADER_CELL] = [blocks_1.default.PARAGRAPH],

7

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

@@ -8,6 +8,7 @@ {

"nodeType": {
"type": "string",
"enum": [
"table-cell"
]
"table-cell",
"table-header-cell"
],
"type": "string"
},

@@ -14,0 +15,0 @@ "data": {

@@ -35,6 +35,7 @@ {

"nodeType": {
"type": "string",
"enum": [
"table-cell"
]
"table-cell",
"table-header-cell"
],
"type": "string"
},

@@ -41,0 +42,0 @@ "data": {

@@ -18,22 +18,6 @@ {

"content": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/TableRow"
}
},
{
"type": "array",
"items": [
{
"$ref": "#/definitions/TableHeaderRow"
}
],
"minItems": 1,
"additionalItems": {
"$ref": "#/definitions/TableRow"
}
}
]
"type": "array",
"items": {
"$ref": "#/definitions/TableRow"
}
}

@@ -79,6 +63,7 @@ },

"nodeType": {
"type": "string",
"enum": [
"table-cell"
]
"table-cell",
"table-header-cell"
],
"type": "string"
},

@@ -230,64 +215,2 @@ "data": {

"type": "object"
},
"TableHeaderRow": {
"type": "object",
"properties": {
"nodeType": {
"type": "string",
"enum": [
"table-row"
]
},
"data": {
"type": "object",
"properties": {}
},
"content": {
"type": "array",
"items": {
"$ref": "#/definitions/TableHeaderCell"
}
}
},
"additionalProperties": false,
"required": [
"content",
"data",
"nodeType"
]
},
"TableHeaderCell": {
"type": "object",
"properties": {
"nodeType": {
"type": "string",
"enum": [
"table-header-cell"
]
},
"data": {
"type": "object",
"properties": {
"colspan": {
"type": "number"
},
"rowspan": {
"type": "number"
}
},
"additionalProperties": false
},
"content": {
"type": "array",
"items": {
"$ref": "#/definitions/Paragraph"
}
}
},
"additionalProperties": false,
"required": [
"content",
"data",
"nodeType"
]
}

@@ -294,0 +217,0 @@ },

@@ -940,2 +940,8 @@ 'use strict';

];
var TABLE_BLOCKS = [
BLOCKS$1.TABLE,
BLOCKS$1.TABLE_ROW,
BLOCKS$1.TABLE_CELL,
BLOCKS$1.TABLE_HEADER_CELL,
];
/**

@@ -954,3 +960,3 @@ * Array of all void block types

_a[BLOCKS$1.TABLE] = [BLOCKS$1.TABLE_ROW],
_a[BLOCKS$1.TABLE_ROW] = [BLOCKS$1.TABLE_CELL],
_a[BLOCKS$1.TABLE_ROW] = [BLOCKS$1.TABLE_CELL, BLOCKS$1.TABLE_HEADER_CELL],
_a[BLOCKS$1.TABLE_CELL] = [BLOCKS$1.PARAGRAPH],

@@ -1015,2 +1021,3 @@ _a[BLOCKS$1.TABLE_HEADER_CELL] = [BLOCKS$1.PARAGRAPH],

exports.MARKS = MARKS$1;
exports.TABLE_BLOCKS = TABLE_BLOCKS;
exports.TOP_LEVEL_BLOCKS = TOP_LEVEL_BLOCKS;

@@ -1017,0 +1024,0 @@ exports.VOID_BLOCKS = VOID_BLOCKS;

@@ -131,3 +131,3 @@ import BLOCKS from './blocks';

export interface TableCell extends Block {
nodeType: BLOCKS.TABLE_CELL;
nodeType: BLOCKS.TABLE_HEADER_CELL | BLOCKS.TABLE_CELL;
data: {

@@ -139,9 +139,4 @@ colspan?: number;

}
export interface TableHeaderCell extends Block {
export interface TableHeaderCell extends TableCell {
nodeType: BLOCKS.TABLE_HEADER_CELL;
data: {
colspan?: number;
rowspan?: number;
};
content: Paragraph[];
}

@@ -153,12 +148,7 @@ export interface TableRow extends Block {

}
interface TableHeaderRow extends Block {
nodeType: BLOCKS.TABLE_ROW;
data: EmptyNodeData;
content: TableHeaderCell[];
}
export interface Table extends Block {
nodeType: BLOCKS.TABLE;
data: EmptyNodeData;
content: TableRow[] | [TableHeaderRow, ...Array<TableRow>];
content: TableRow[];
}
export {};

@@ -13,2 +13,3 @@ import BLOCKS from './blocks';

export declare const LIST_ITEM_BLOCKS: TopLevelBlockEnum[];
export declare const TABLE_BLOCKS: BLOCKS[];
/**

@@ -15,0 +16,0 @@ * Array of all void block types

{
"name": "@contentful/rich-text-types",
"version": "15.3.5",
"version": "15.3.6",
"main": "dist/rich-text-types.es5.js",

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

},
"gitHead": "3800ad52efd72a20b03c133c6f35c6343adb6565"
"gitHead": "d40174e072d5d7e66534bab98a3121138cba2527"
}

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