@contentful/structured-text-types
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -9,2 +9,4 @@ "use strict"; | ||
exports.MARKS = marks_1.default; | ||
var containers_1 = require("./containers"); | ||
exports.CONTAINERS = containers_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -8,3 +8,3 @@ 'use strict'; | ||
*/ | ||
var blocks = { | ||
var BLOCKS = { | ||
DOCUMENT: 'document', | ||
@@ -42,5 +42,32 @@ PARAGRAPH: 'paragraph', | ||
exports.BLOCKS = blocks; | ||
var _a; | ||
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, | ||
]; | ||
/** | ||
* 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); | ||
exports.BLOCKS = BLOCKS; | ||
exports.INLINES = inlines; | ||
exports.MARKS = marks; | ||
exports.CONTAINERS = CONTAINERS; | ||
//# sourceMappingURL=structured-text-types.es5.js.map |
export { default as BLOCKS } from './blocks'; | ||
export { default as INLINES } from './inlines'; | ||
export { default as MARKS } from './marks'; | ||
export { default as CONTAINERS } from './containers'; | ||
export * from './types'; |
@@ -20,4 +20,8 @@ import { Block, Inline } from './types'; | ||
} | ||
export interface Paragraph extends Block { | ||
nodeType: 'paragraph'; | ||
} | ||
export interface Quote extends Block { | ||
nodeType: 'quote'; | ||
content: Paragraph[]; | ||
} | ||
@@ -29,5 +33,7 @@ export interface Hr extends Block { | ||
nodeType: 'ordered-list'; | ||
content: ListItem[]; | ||
} | ||
export interface UnorderedList extends Block { | ||
nodeType: 'unordered-list'; | ||
content: ListItem[]; | ||
} | ||
@@ -34,0 +40,0 @@ export interface ListItem extends Block { |
{ | ||
"name": "@contentful/structured-text-types", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -7,4 +7,2 @@ # structured-text-types | ||
## Releases flow (Atomatic Releases) | ||
@@ -17,3 +15,1 @@ | ||
You'll need to use `npm run commit`, to create conventional commits. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23378
29
408
14