@pie-element/ebsr 6.6.3-next.400 → 6.6.3-next.411
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/configure/node_modules/immutable/LICENSE +0 -21
- package/configure/node_modules/immutable/README.md +0 -657
- package/configure/node_modules/immutable/dist/immutable-nonambient.d.ts +0 -5607
- package/configure/node_modules/immutable/dist/immutable.d.ts +0 -5611
- package/configure/node_modules/immutable/dist/immutable.es.js +0 -5893
- package/configure/node_modules/immutable/dist/immutable.js +0 -5948
- package/configure/node_modules/immutable/dist/immutable.js.flow +0 -2340
- package/configure/node_modules/immutable/dist/immutable.min.js +0 -55
- package/configure/node_modules/immutable/package.json +0 -41
- package/configure/node_modules/slate-edit-list/CHANGELOG.md +0 -124
- package/configure/node_modules/slate-edit-list/LICENSE +0 -201
- package/configure/node_modules/slate-edit-list/README.md +0 -159
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js +0 -73
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js.flow +0 -88
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js +0 -70
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js.flow +0 -77
- package/configure/node_modules/slate-edit-list/dist/changes/index.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/changes/index.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js +0 -27
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js +0 -52
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js.flow +0 -46
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js +0 -67
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js.flow +0 -67
- package/configure/node_modules/slate-edit-list/dist/core.js +0 -80
- package/configure/node_modules/slate-edit-list/dist/core.js.flow +0 -76
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js.flow +0 -5
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js +0 -45
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js.flow +0 -44
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js.flow +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js.flow +0 -34
- package/configure/node_modules/slate-edit-list/dist/index.js +0 -58
- package/configure/node_modules/slate-edit-list/dist/index.js.flow +0 -45
- package/configure/node_modules/slate-edit-list/dist/options.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/options.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js.flow +0 -20
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js +0 -31
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js.flow +0 -21
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js.flow +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js +0 -60
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js.flow +0 -51
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js +0 -25
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js.flow +0 -16
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js.flow +0 -29
- package/configure/node_modules/slate-edit-list/dist/utils/index.js +0 -49
- package/configure/node_modules/slate-edit-list/dist/utils/index.js.flow +0 -19
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js +0 -15
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js +0 -22
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js.flow +0 -14
- package/configure/node_modules/slate-edit-list/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-list/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js +0 -83
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js.flow +0 -81
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js +0 -61
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js.flow +0 -61
- package/configure/node_modules/slate-edit-list/package.json +0 -67
- package/configure/node_modules/slate-edit-table/CHANGELOG.md +0 -192
- package/configure/node_modules/slate-edit-table/LICENSE +0 -201
- package/configure/node_modules/slate-edit-table/README.md +0 -269
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/index.js +0 -69
- package/configure/node_modules/slate-edit-table/dist/changes/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js +0 -43
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js.flow +0 -46
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js.flow +0 -35
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js +0 -32
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js.flow +0 -31
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js +0 -84
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js.flow +0 -80
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js +0 -52
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js.flow +0 -40
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js +0 -41
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js.flow +0 -30
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js.flow +0 -17
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js.flow +0 -54
- package/configure/node_modules/slate-edit-table/dist/core.js +0 -88
- package/configure/node_modules/slate-edit-table/dist/core.js.flow +0 -94
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js +0 -39
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js.flow +0 -8
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js +0 -82
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js.flow +0 -87
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js.flow +0 -37
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js +0 -71
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js.flow +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js +0 -35
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js.flow +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js.flow +0 -51
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js.flow +0 -41
- package/configure/node_modules/slate-edit-table/dist/index.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/options.js +0 -61
- package/configure/node_modules/slate-edit-table/dist/options.js.flow +0 -42
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js +0 -306
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js.flow +0 -211
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js.flow +0 -33
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js.flow +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js +0 -20
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js.flow +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/index.js +0 -64
- package/configure/node_modules/slate-edit-table/dist/utils/index.js.flow +0 -25
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js.flow +0 -23
- package/configure/node_modules/slate-edit-table/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-table/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js +0 -101
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js.flow +0 -98
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js.flow +0 -49
- package/configure/node_modules/slate-edit-table/package.json +0 -69
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import { Block, type Change } from 'slate';
|
|
4
|
-
import {
|
|
5
|
-
CHILD_OBJECT_INVALID,
|
|
6
|
-
CHILD_TYPE_INVALID,
|
|
7
|
-
PARENT_TYPE_INVALID
|
|
8
|
-
} from 'slate-schema-violations';
|
|
9
|
-
import { createCell } from '../utils';
|
|
10
|
-
import type Options from '../options';
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
* Returns a schema definition for the plugin
|
|
14
|
-
*/
|
|
15
|
-
function schema(opts: Options): Object {
|
|
16
|
-
return {
|
|
17
|
-
blocks: {
|
|
18
|
-
[opts.typeTable]: {
|
|
19
|
-
nodes: [{ types: [opts.typeRow] }]
|
|
20
|
-
},
|
|
21
|
-
[opts.typeRow]: {
|
|
22
|
-
nodes: [{ types: [opts.typeCell] }],
|
|
23
|
-
parent: { types: [opts.typeTable] },
|
|
24
|
-
normalize(change: Change, violation: string, context: Object) {
|
|
25
|
-
switch (violation) {
|
|
26
|
-
case CHILD_TYPE_INVALID:
|
|
27
|
-
return onlyCellsInRow(opts, change, context);
|
|
28
|
-
case PARENT_TYPE_INVALID:
|
|
29
|
-
return rowOnlyInTable(opts, change, context);
|
|
30
|
-
default:
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
[opts.typeCell]: {
|
|
36
|
-
nodes: [{ objects: ['block'] }],
|
|
37
|
-
parent: { types: [opts.typeRow] },
|
|
38
|
-
normalize(change: Change, violation: string, context: Object) {
|
|
39
|
-
switch (violation) {
|
|
40
|
-
case CHILD_OBJECT_INVALID:
|
|
41
|
-
return onlyBlocksInCell(opts, change, context);
|
|
42
|
-
case PARENT_TYPE_INVALID:
|
|
43
|
-
return cellOnlyInRow(opts, change, context);
|
|
44
|
-
default:
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
* A row's children must be cells.
|
|
55
|
-
* If they're not then we wrap them within a cell.
|
|
56
|
-
*/
|
|
57
|
-
function onlyCellsInRow(opts: Options, change: Change, context: Object) {
|
|
58
|
-
const cell = createCell(opts, []);
|
|
59
|
-
const index = context.node.nodes.findIndex(
|
|
60
|
-
child => child.key === context.child.key
|
|
61
|
-
);
|
|
62
|
-
change.insertNodeByKey(context.node.key, index, cell, { normalize: false });
|
|
63
|
-
change.moveNodeByKey(context.child.key, cell.key, 0, { normalize: false });
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/*
|
|
67
|
-
* Rows can't live outside a table, if one is found then we wrap it within a table.
|
|
68
|
-
*/
|
|
69
|
-
function rowOnlyInTable(opts: Options, change: Change, context: Object) {
|
|
70
|
-
return change.wrapBlockByKey(context.node.key, opts.typeTable);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/*
|
|
74
|
-
* A cell's children must be "block"s.
|
|
75
|
-
* If they're not then we wrap them within a block with a type of opts.typeContent
|
|
76
|
-
*/
|
|
77
|
-
function onlyBlocksInCell(opts: Options, change: Change, context: Object) {
|
|
78
|
-
const block = Block.create({
|
|
79
|
-
type: opts.typeContent
|
|
80
|
-
});
|
|
81
|
-
change.insertNodeByKey(context.node.key, 0, block, { normalize: false });
|
|
82
|
-
|
|
83
|
-
const inlines = context.node.nodes.filter(node => node.object !== 'block');
|
|
84
|
-
inlines.forEach((inline, index) => {
|
|
85
|
-
change.moveNodeByKey(inline.key, block.key, index, {
|
|
86
|
-
normalize: false
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/*
|
|
92
|
-
* Cells can't live outside a row, if one is found then we wrap it within a row.
|
|
93
|
-
*/
|
|
94
|
-
function cellOnlyInRow(opts: Options, change: Change, context: Object) {
|
|
95
|
-
return change.wrapBlockByKey(context.node.key, opts.typeRow);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export default schema;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _utils = require('../utils');
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Ensure each row has the same number of columns.
|
|
11
|
-
*/
|
|
12
|
-
function validateNode(opts) {
|
|
13
|
-
var isRow = function isRow(node) {
|
|
14
|
-
return node.type === opts.typeRow;
|
|
15
|
-
};
|
|
16
|
-
var isCell = function isCell(node) {
|
|
17
|
-
return node.type === opts.typeCell;
|
|
18
|
-
};
|
|
19
|
-
var countCells = function countCells(row) {
|
|
20
|
-
return row.nodes.count(isCell);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return function (node) {
|
|
24
|
-
if (node.type !== opts.typeTable) {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var rows = node.nodes.filter(isRow);
|
|
29
|
-
var maxColumns = Math.max(
|
|
30
|
-
// Minimum 1 column
|
|
31
|
-
1, rows.map(countCells).max());
|
|
32
|
-
var rowsMissingColumns = rows.filter(function (row) {
|
|
33
|
-
return countCells(row) < maxColumns;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
if (rowsMissingColumns.isEmpty()) {
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return function (change) {
|
|
41
|
-
rowsMissingColumns.forEach(function (row) {
|
|
42
|
-
var numberOfCellsToAdd = maxColumns - row.nodes.size;
|
|
43
|
-
var cells = Array.from({ length: numberOfCellsToAdd }).map(function () {
|
|
44
|
-
return (0, _utils.createCell)(opts);
|
|
45
|
-
});
|
|
46
|
-
cells.forEach(function (cell) {
|
|
47
|
-
return change.insertNodeByKey(row.key, row.nodes.size, cell, {
|
|
48
|
-
normalize: false
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
exports.default = validateNode;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import type Options from '../options';
|
|
4
|
-
import { createCell } from '../utils';
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* Ensure each row has the same number of columns.
|
|
8
|
-
*/
|
|
9
|
-
function validateNode(opts: Options) {
|
|
10
|
-
const isRow = node => node.type === opts.typeRow;
|
|
11
|
-
const isCell = node => node.type === opts.typeCell;
|
|
12
|
-
const countCells = row => row.nodes.count(isCell);
|
|
13
|
-
|
|
14
|
-
return node => {
|
|
15
|
-
if (node.type !== opts.typeTable) {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const rows = node.nodes.filter(isRow);
|
|
20
|
-
const maxColumns = Math.max(
|
|
21
|
-
// Minimum 1 column
|
|
22
|
-
1,
|
|
23
|
-
rows.map(countCells).max()
|
|
24
|
-
);
|
|
25
|
-
const rowsMissingColumns = rows.filter(
|
|
26
|
-
row => countCells(row) < maxColumns
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
if (rowsMissingColumns.isEmpty()) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return change => {
|
|
34
|
-
rowsMissingColumns.forEach(row => {
|
|
35
|
-
const numberOfCellsToAdd = maxColumns - row.nodes.size;
|
|
36
|
-
const cells = Array.from({ length: numberOfCellsToAdd }).map(
|
|
37
|
-
() => createCell(opts)
|
|
38
|
-
);
|
|
39
|
-
cells.forEach(cell =>
|
|
40
|
-
change.insertNodeByKey(row.key, row.nodes.size, cell, {
|
|
41
|
-
normalize: false
|
|
42
|
-
})
|
|
43
|
-
);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default validateNode;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "slate-edit-table",
|
|
3
|
-
"description": "A Slate plugin to handle keyboard events in tables.",
|
|
4
|
-
"version": "0.17.0",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"repository": "git://github.com/GitbookIO/slate-edit-table.git",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"*.md"
|
|
11
|
-
],
|
|
12
|
-
"peerDependencies": {
|
|
13
|
-
"immutable": "^3.8.1",
|
|
14
|
-
"slate": "^0.34.5",
|
|
15
|
-
"slate-schema-violations": "^0.1.18"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"babel-cli": "^6.26.0",
|
|
19
|
-
"babel-core": "^6.26.0",
|
|
20
|
-
"babel-eslint": "^8.0.2",
|
|
21
|
-
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
|
22
|
-
"babel-plugin-transform-runtime": "^6.23.0",
|
|
23
|
-
"babel-preset-env": "^1.6.1",
|
|
24
|
-
"babel-preset-flow": "^6.23.0",
|
|
25
|
-
"babel-preset-react": "^6.24.1",
|
|
26
|
-
"babel-preset-stage-0": "^6.24.1",
|
|
27
|
-
"babelify": "^8.0.0",
|
|
28
|
-
"browserify": "^13.3.0",
|
|
29
|
-
"eslint": "^4.15.0",
|
|
30
|
-
"eslint-config-gitbook": "^3.0.0",
|
|
31
|
-
"eslint-plugin-flowtype": "^2.41.0",
|
|
32
|
-
"eslint-plugin-import": "^2.8.0",
|
|
33
|
-
"eslint-plugin-jsx-a11y": "^5.1.1",
|
|
34
|
-
"eslint-plugin-prettier": "^2.4.0",
|
|
35
|
-
"eslint-plugin-react": "^7.5.1",
|
|
36
|
-
"expect": "^1.20.2",
|
|
37
|
-
"flow-bin": "^0.57.3",
|
|
38
|
-
"flow-copy-source": "^1.2.1",
|
|
39
|
-
"gh-pages": "^0.11.0",
|
|
40
|
-
"http-server": "^0.9.0",
|
|
41
|
-
"immutable": "^3.8.2",
|
|
42
|
-
"mocha": "^3.0.1",
|
|
43
|
-
"prettier": "^1.9.2",
|
|
44
|
-
"react": "^16.0.0",
|
|
45
|
-
"react-dom": "^16.0.0",
|
|
46
|
-
"slate": "^0.34.5",
|
|
47
|
-
"slate-hyperprint": "^2.2.0",
|
|
48
|
-
"slate-hyperscript": "^0.5.20",
|
|
49
|
-
"slate-react": "^0.13.2",
|
|
50
|
-
"slate-schema-violations": "^0.1.18",
|
|
51
|
-
"watchify": "^3.7.0"
|
|
52
|
-
},
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build:dist": "rm -r ./dist; babel ./lib --out-dir ./dist",
|
|
55
|
-
"build:flow": "flow-copy-source -v ./lib/ ./dist/",
|
|
56
|
-
"prepublish": "npm run build:dist && npm run build:flow",
|
|
57
|
-
"postpublish": "npm run deploy-example",
|
|
58
|
-
"lint": "eslint ./",
|
|
59
|
-
"build-example": "browserify ./example/main.js -o ./example/bundle.js -t [ babelify --presets [ env react stage-0 ] ]",
|
|
60
|
-
"watch-example": "watchify ./example/main.js -o ./example/bundle.js -t [ babelify --presets [ env react stage-0 ] ] -v",
|
|
61
|
-
"serve-example": "http-server ./example/ -p 8080",
|
|
62
|
-
"start": "npm run build-example; npm run serve-example",
|
|
63
|
-
"deploy-example": "npm run build-example; gh-pages -d ./example",
|
|
64
|
-
"test": "./node_modules/.bin/mocha ./tests/all.js --compilers js:babel-register --reporter=list"
|
|
65
|
-
},
|
|
66
|
-
"keywords": [
|
|
67
|
-
"slate"
|
|
68
|
-
]
|
|
69
|
-
}
|