@contentful/rich-text-types
Advanced tools
Comparing version 15.1.0 to 15.3.0
@@ -26,4 +26,5 @@ "use strict"; | ||
BLOCKS["TABLE_CELL"] = "table-cell"; | ||
BLOCKS["TABLE_HEADER_CELL"] = "table-header-cell"; | ||
})(BLOCKS || (BLOCKS = {})); | ||
exports.default = BLOCKS; | ||
//# sourceMappingURL=blocks.js.map |
@@ -43,3 +43,4 @@ "use strict"; | ||
_a[blocks_1.default.TABLE_CELL] = [blocks_1.default.PARAGRAPH], | ||
_a[blocks_1.default.TABLE_HEADER_CELL] = [blocks_1.default.PARAGRAPH], | ||
_a); | ||
//# sourceMappingURL=schemaConstraints.js.map |
@@ -134,2 +134,3 @@ { | ||
"table-cell", | ||
"table-header-cell", | ||
"table-row", | ||
@@ -136,0 +137,0 @@ "unordered-list" |
@@ -135,2 +135,3 @@ { | ||
"table-cell", | ||
"table-header-cell", | ||
"table-row", | ||
@@ -137,0 +138,0 @@ "unordered-list" |
@@ -162,2 +162,3 @@ { | ||
"table-cell", | ||
"table-header-cell", | ||
"table-row", | ||
@@ -164,0 +165,0 @@ "unordered-list" |
@@ -18,6 +18,22 @@ { | ||
"content": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TableRow" | ||
} | ||
"anyOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TableRow" | ||
} | ||
}, | ||
{ | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"$ref": "#/definitions/TableHeaderRow" | ||
} | ||
], | ||
"minItems": 1, | ||
"additionalItems": { | ||
"$ref": "#/definitions/TableRow" | ||
} | ||
} | ||
] | ||
} | ||
@@ -213,2 +229,64 @@ }, | ||
"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" | ||
] | ||
} | ||
@@ -215,0 +293,0 @@ }, |
@@ -162,2 +162,3 @@ { | ||
"table-cell", | ||
"table-header-cell", | ||
"table-row", | ||
@@ -164,0 +165,0 @@ "unordered-list" |
@@ -188,3 +188,3 @@ 'use strict'; | ||
})('versions', []).push({ | ||
version: '3.16.0', | ||
version: '3.17.2', | ||
mode: 'global', | ||
@@ -736,13 +736,11 @@ copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
var iframeDocument; | ||
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; | ||
} | ||
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; | ||
}; | ||
@@ -760,6 +758,7 @@ | ||
} catch (error) { /* ignore */ } | ||
NullProtoObject = document.domain && activeXDocument ? | ||
NullProtoObjectViaActiveX(activeXDocument) : // old IE | ||
NullProtoObjectViaIFrame() || | ||
NullProtoObjectViaActiveX(activeXDocument); // WSH | ||
NullProtoObject = typeof document != 'undefined' | ||
? document.domain && activeXDocument | ||
? NullProtoObjectViaActiveX(activeXDocument) // old IE | ||
: NullProtoObjectViaIFrame() | ||
: NullProtoObjectViaActiveX(activeXDocument); // WSH | ||
var length = enumBugKeys.length; | ||
@@ -877,2 +876,3 @@ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; | ||
BLOCKS["TABLE_CELL"] = "table-cell"; | ||
BLOCKS["TABLE_HEADER_CELL"] = "table-header-cell"; | ||
})(BLOCKS || (BLOCKS = {})); | ||
@@ -941,2 +941,3 @@ var BLOCKS$1 = BLOCKS; | ||
_a[BLOCKS$1.TABLE_CELL] = [BLOCKS$1.PARAGRAPH], | ||
_a[BLOCKS$1.TABLE_HEADER_CELL] = [BLOCKS$1.PARAGRAPH], | ||
_a); | ||
@@ -943,0 +944,0 @@ |
@@ -22,4 +22,5 @@ /** | ||
TABLE_ROW = "table-row", | ||
TABLE_CELL = "table-cell" | ||
TABLE_CELL = "table-cell", | ||
TABLE_HEADER_CELL = "table-header-cell" | ||
} | ||
export default BLOCKS; |
@@ -138,2 +138,10 @@ import { Block, Inline, Text, TopLevelBlock } from './types'; | ||
} | ||
export interface TableHeaderCell extends Block { | ||
nodeType: BLOCKS.TABLE_HEADER_CELL; | ||
data: { | ||
colspan?: number; | ||
rowspan?: number; | ||
}; | ||
content: Paragraph[]; | ||
} | ||
export interface TableRow extends Block { | ||
@@ -144,7 +152,12 @@ nodeType: BLOCKS.TABLE_ROW; | ||
} | ||
interface TableHeaderRow extends Block { | ||
nodeType: BLOCKS.TABLE_ROW; | ||
data: EmptyNodeData; | ||
content: TableHeaderCell[]; | ||
} | ||
export interface Table extends Block { | ||
nodeType: BLOCKS.TABLE; | ||
data: EmptyNodeData; | ||
content: TableRow[]; | ||
content: TableRow[] | [TableHeaderRow, ...Array<TableRow>]; | ||
} | ||
export {}; |
@@ -23,2 +23,3 @@ import BLOCKS from './blocks'; | ||
[BLOCKS.TABLE_CELL]: BLOCKS[]; | ||
[BLOCKS.TABLE_HEADER_CELL]: BLOCKS[]; | ||
}; |
{ | ||
"name": "@contentful/rich-text-types", | ||
"version": "15.1.0", | ||
"version": "15.3.0", | ||
"main": "dist/rich-text-types.es5.js", | ||
@@ -47,3 +47,3 @@ "typings": "dist/types/index.d.ts", | ||
}, | ||
"gitHead": "9cbd4f6888ee8c94f970923afdfadd91d7f049cb" | ||
"gitHead": "8744fa8300f14a0ee224152fa8da3bbc6f085c69" | ||
} |
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
209427
66
5271