UNPKG

1.37 kBJavaScriptView Raw
1"use strict";
2
3var _module$exports;
4
5function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
7function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
8
9var objectValues = require("object-values");
10var BLOCKS = require("./blocks");
11var ALL_BLOCKS = objectValues(BLOCKS);
12
13/**
14 * Map of all block nodes that contains only blocks as children.
15 * The value is the default block type.
16 *
17 * @type {Map<String:Array>}
18 */
19
20module.exports = (_module$exports = {}, _defineProperty(_module$exports, BLOCKS.DOCUMENT, [BLOCKS.PARAGRAPH].concat(_toConsumableArray(ALL_BLOCKS))), _defineProperty(_module$exports, BLOCKS.BLOCKQUOTE, [BLOCKS.TEXT].concat(_toConsumableArray(ALL_BLOCKS))), _defineProperty(_module$exports, BLOCKS.TABLE, [BLOCKS.TABLE_ROW]), _defineProperty(_module$exports, BLOCKS.TABLE_ROW, [BLOCKS.TABLE_CELL]), _defineProperty(_module$exports, BLOCKS.LIST_ITEM, [BLOCKS.TEXT].concat(_toConsumableArray(ALL_BLOCKS))), _defineProperty(_module$exports, BLOCKS.OL_LIST, [BLOCKS.LIST_ITEM]), _defineProperty(_module$exports, BLOCKS.UL_LIST, [BLOCKS.LIST_ITEM]), _module$exports);
\No newline at end of file