@modusoperandi/licit 0.13.25 → 0.14.0
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/.eslintrc.js +1 -1
- package/README.md +1 -0
- package/dist/BlockquoteInsertNewLineCommand.js +3 -23
- package/dist/BlockquoteNodeSpec.js +3 -13
- package/dist/BlockquoteToggleCommand.js +3 -16
- package/dist/BookmarkNodeSpec.js +0 -6
- package/dist/BulletListNodeSpec.js +2 -16
- package/dist/CZIProseMirror.js +3 -27
- package/dist/CodeBlockCommand.js +3 -19
- package/dist/CodeBlockNodeSpec.js +3 -4
- package/dist/CodeMarkSpec.js +0 -4
- package/dist/ContentPlaceholderPlugin.js +6 -58
- package/dist/CursorPlaceholderPlugin.js +2 -32
- package/dist/DocLayoutCommand.js +5 -28
- package/dist/DocNodeSpec.js +0 -9
- package/dist/EMMarkSpec.js +0 -4
- package/dist/EditorCommands.js +5 -33
- package/dist/EditorKeyMap.js +4 -18
- package/dist/EditorMarks.js +2 -26
- package/dist/EditorNodes.js +4 -22
- package/dist/EditorPageLayoutPlugin.js +3 -15
- package/dist/EditorPlugins.js +0 -4
- package/dist/EditorSchema.js +0 -5
- package/dist/EditorState.js +0 -2
- package/dist/FontSizeMarkSpec.js +0 -12
- package/dist/FontTypeMarkSpec.js +15 -19
- package/dist/HTMLMutator.js +5 -24
- package/dist/HardBreakNodeSpec.js +0 -2
- package/dist/HeadingNodeSpec.js +6 -15
- package/dist/HistoryRedoCommand.js +3 -11
- package/dist/HistoryUndoCommand.js +3 -11
- package/dist/HorizontalRuleCommand.js +3 -22
- package/dist/HorizontalRuleNodeSpec.js +0 -10
- package/dist/ImageFromURLCommand.js +0 -9
- package/dist/ImageNodeSpec.js +2 -14
- package/dist/ImageSourceCommand.js +3 -39
- package/dist/ImageUploadCommand.js +3 -21
- package/dist/ImageUploadPlaceholderPlugin.js +10 -48
- package/dist/LinkMarkSpec.js +0 -4
- package/dist/LinkSetURLCommand.js +3 -28
- package/dist/LinkTooltipPlugin.js +6 -52
- package/dist/ListItemInsertNewLineCommand.js +3 -23
- package/dist/ListItemMergeCommand.js +15 -66
- package/dist/ListItemNodeSpec.js +0 -11
- package/dist/ListSplitCommand.js +3 -14
- package/dist/ListToggleCommand.js +5 -26
- package/dist/MarksClearCommand.js +6 -17
- package/dist/MathEditCommand.js +3 -38
- package/dist/MathNodeSpec.js +0 -10
- package/dist/OrderedListNodeSpec.js +0 -24
- package/dist/ParagraphNodeSpec.js +5 -26
- package/dist/ParagraphSpacingCommand.js +3 -32
- package/dist/PrintCommand.js +3 -13
- package/dist/SelectionPlaceholderPlugin.js +2 -31
- package/dist/SpacerMarkSpec.js +2 -6
- package/dist/StrikeMarkSpec.js +0 -4
- package/dist/StrongMarkSpec.js +2 -5
- package/dist/StyleView.js +1 -7
- package/dist/TableBackgroundColorCommand.js +3 -24
- package/dist/TableBorderColorCommand.js +3 -24
- package/dist/TableCellColorCommand.js +3 -23
- package/dist/TableCellMenuPlugin.js +9 -45
- package/dist/TableInsertCommand.js +7 -39
- package/dist/TableMergeCellsCommand.js +5 -30
- package/dist/TableNodesSpecs.js +4 -23
- package/dist/TablePlugins.js +0 -5
- package/dist/TableResizePlugin.js +54 -138
- package/dist/TextColorMarkSpec.js +0 -9
- package/dist/TextHighlightMarkSpec.js +0 -8
- package/dist/TextInsertTabSpaceCommand.js +3 -28
- package/dist/TextNoWrapMarkSpec.js +0 -4
- package/dist/TextSelectionMarkSpec.js +0 -5
- package/dist/TextSubMarkSpec.js +0 -4
- package/dist/TextSuperMarkSpec.js +0 -4
- package/dist/TextUnderlineMarkSpec.js +0 -4
- package/dist/Types.js +0 -6
- package/dist/WebFontLoader.js +3 -8
- package/dist/blockQuoteInputRule.js +0 -13
- package/dist/bom.xml +1492 -1645
- package/dist/buildEditorPlugins.js +5 -27
- package/dist/buildInputRules.js +12 -24
- package/dist/client/CollabConnector.js +6 -30
- package/dist/client/EditorConnection.js +23 -69
- package/dist/client/Licit.js +79 -163
- package/dist/client/Licit.js.flow +16 -2
- package/dist/client/Licit.test.js +6 -13
- package/dist/client/Reporter.js +1 -8
- package/dist/client/SimpleConnector.js +6 -26
- package/dist/client/http.js +8 -15
- package/dist/client/throttle.js +0 -2
- package/dist/convertFromDOMElement.js +2 -10
- package/dist/convertFromHTML.js +0 -5
- package/dist/convertFromJSON.js +3 -13
- package/dist/convertToCSSPTValue.js +0 -6
- package/dist/convertToJSON.js +0 -2
- package/dist/createCommand.js +3 -11
- package/dist/createEditorKeyMap.js +0 -13
- package/dist/createEmptyEditorState.js +0 -7
- package/dist/createTableResizingPlugin.js +5 -16
- package/dist/findActionableCell.js +0 -19
- package/dist/findActiveMark.js +0 -11
- package/dist/hyphenize.js +2 -4
- package/dist/index.js +0 -9
- package/dist/insertTable.js +0 -16
- package/dist/isEditorStateEmpty.js +0 -6
- package/dist/isTableNode.js +0 -3
- package/dist/joinDown.js +0 -7
- package/dist/joinListNode.js +0 -15
- package/dist/joinUp.js +0 -9
- package/dist/keymaps.js +0 -15
- package/dist/lookUpElement.js +0 -3
- package/dist/nodeAt.js +0 -3
- package/dist/normalizeHTML.js +9 -25
- package/dist/patchAnchorElements.js +5 -12
- package/dist/patchBreakElements.js +0 -6
- package/dist/patchElementInlineStyles.js +5 -15
- package/dist/patchListElements.js +20 -54
- package/dist/patchMathElements.js +11 -21
- package/dist/patchParagraphElements.js +0 -5
- package/dist/patchStyleElements.js +12 -41
- package/dist/patchTableElements.js +9 -37
- package/dist/rebaseDocWithSteps.js +0 -6
- package/dist/sanitizeURL.js +0 -3
- package/dist/splitListItem.js +12 -43
- package/dist/toClosestFontPtSize.js +1 -5
- package/dist/toSafeHTMLDocument.js +0 -1
- package/dist/toggleBlockquote.js +2 -19
- package/dist/toggleCodeBlock.js +2 -22
- package/dist/ui/AlertInfo.js +6 -22
- package/dist/ui/BookmarkNodeView.js +7 -28
- package/dist/ui/CommandButton.js +3 -19
- package/dist/ui/CommandMenu.js +3 -25
- package/dist/ui/CommandMenuButton.js +3 -36
- package/dist/ui/CustomEditorView.js +3 -16
- package/dist/ui/CustomMenu.js +0 -8
- package/dist/ui/CustomMenuItem.js +4 -18
- package/dist/ui/CustomNodeView.js +21 -67
- package/dist/ui/CustomRadioButton.js +14 -33
- package/dist/ui/DocLayoutEditor.js +5 -27
- package/dist/ui/Editor.js +18 -79
- package/dist/ui/EditorFrameset.js +3 -18
- package/dist/ui/EditorToolbar.js +10 -46
- package/dist/ui/EditorToolbarConfig.js +10 -20
- package/dist/ui/FontSizeCommandMenuButton.js +5 -19
- package/dist/ui/FontTypeCommandMenuButton.js +5 -22
- package/dist/ui/Frag.js +0 -7
- package/dist/ui/Icon.js +5 -25
- package/dist/ui/ImageAlignEditor.js +3 -16
- package/dist/ui/ImageInlineEditor.js +3 -16
- package/dist/ui/ImageNodeView.js +20 -109
- package/dist/ui/ImageResizeBox.js +3 -53
- package/dist/ui/ImageURLEditor.js +3 -28
- package/dist/ui/ImageUploadEditor.js +3 -35
- package/dist/ui/LinkTooltip.js +5 -25
- package/dist/ui/LinkURLEditor.js +3 -29
- package/dist/ui/ListItemNodeView.js +15 -30
- package/dist/ui/ListTypeButton.js +5 -37
- package/dist/ui/ListTypeCommandButton.js +3 -19
- package/dist/ui/ListTypeMenu.js +4 -25
- package/dist/ui/LoadingIndicator.js +0 -7
- package/dist/ui/MathEditor.js +3 -24
- package/dist/ui/MathInlineEditor.js +3 -26
- package/dist/ui/MathNodeView.js +9 -59
- package/dist/ui/PasteMenu.js +4 -20
- package/dist/ui/ResizeObserver.js +0 -18
- package/dist/ui/RichTextEditor.js +5 -27
- package/dist/ui/SelectionObserver.js +3 -29
- package/dist/ui/TableCellMenu.js +3 -18
- package/dist/ui/TableGridSizeEditor.js +5 -51
- package/dist/ui/TableNodeView.js +0 -11
- package/dist/ui/bindScrollHandler.js +2 -9
- package/dist/ui/canUseCSSFont.js +2 -8
- package/dist/ui/czi-icon.css +4 -4
- package/dist/ui/findActiveFontSize.js +2 -18
- package/dist/ui/findActiveFontType.js +0 -12
- package/dist/ui/handleEditorDrop.js +0 -9
- package/dist/ui/handleEditorKeyDown.js +0 -7
- package/dist/ui/handleEditorPaste.js +0 -9
- package/dist/ui/htmlElementToRect.js +0 -4
- package/dist/ui/injectStyleSheet.js +0 -10
- package/dist/ui/isElementFullyVisible.js +2 -8
- package/dist/ui/isOffline.js +0 -2
- package/dist/ui/isReactClass.js +0 -4
- package/dist/ui/mathquill-editor/MathQuillEditor.js +9 -44
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +1 -3
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +3 -16
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js +5 -7
- package/dist/ui/renderLaTeXAsHTML.js +2 -13
- package/dist/ui/resolveImage.js +7 -32
- package/dist/ui/toCSSColor.js +0 -14
- package/dist/ui/toCSSLineSpacing.js +10 -11
- package/dist/ui/toHexColor.js +0 -8
- package/dist/ui/uuid.js +0 -2
- package/dist/uuid.js +0 -2
- package/package-lock.json.old +32889 -0
- package/package.json +45 -69
- package/src/client/Licit.js +16 -2
- package/src/ui/czi-icon.css +4 -4
- package/utils/build_web_server.js +1 -7
- package/webpack.config.js +3 -3
|
@@ -4,68 +4,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _prosemirrorModel = require("prosemirror-model");
|
|
9
|
-
|
|
10
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
11
|
-
|
|
12
9
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
13
|
-
|
|
14
10
|
var _prosemirrorUtils = require("prosemirror-utils");
|
|
15
|
-
|
|
16
11
|
var _prosemirrorView = require("prosemirror-view");
|
|
17
|
-
|
|
18
12
|
var _MarkNames = require("./MarkNames");
|
|
19
|
-
|
|
20
13
|
var _NodeNames = require("./NodeNames");
|
|
21
|
-
|
|
22
14
|
var _SpacerMarkSpec = require("./SpacerMarkSpec");
|
|
23
|
-
|
|
24
15
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
25
|
-
|
|
26
16
|
var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
20
|
function insertTabSpace(state, tr, schema) {
|
|
31
21
|
const {
|
|
32
22
|
selection
|
|
33
23
|
} = tr;
|
|
34
|
-
|
|
35
24
|
if (!selection.empty || !(selection instanceof _prosemirrorState.TextSelection)) {
|
|
36
25
|
return tr;
|
|
37
26
|
}
|
|
38
|
-
|
|
39
27
|
const markType = schema.marks[_MarkNames.MARK_SPACER];
|
|
40
|
-
|
|
41
28
|
if (!markType) {
|
|
42
29
|
return tr;
|
|
43
30
|
}
|
|
44
|
-
|
|
45
31
|
const paragraph = schema.nodes[_NodeNames.PARAGRAPH];
|
|
46
32
|
const heading = schema.nodes[_NodeNames.HEADING];
|
|
47
33
|
const listItem = schema.nodes[_NodeNames.LIST_ITEM];
|
|
48
34
|
const found = listItem && (0, _prosemirrorUtils.findParentNodeOfType)(listItem)(selection) || paragraph && (0, _prosemirrorUtils.findParentNodeOfType)(paragraph)(selection) || heading && (0, _prosemirrorUtils.findParentNodeOfType)(heading)(selection);
|
|
49
|
-
|
|
50
35
|
if (!found) {
|
|
51
36
|
return tr;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
const {
|
|
55
39
|
from,
|
|
56
40
|
to
|
|
57
41
|
} = selection;
|
|
58
|
-
|
|
59
42
|
if (found.node.type === listItem && found.pos === from - 2) {
|
|
60
43
|
// Cursur is at the begin of the list-item, let the default indentation
|
|
61
44
|
// behavior happen.
|
|
62
45
|
return tr;
|
|
63
46
|
}
|
|
64
|
-
|
|
65
47
|
if (found.node.type === paragraph && found.pos === from - 1) {
|
|
66
48
|
return tr;
|
|
67
49
|
}
|
|
68
|
-
|
|
69
50
|
const textNode = schema.text(_SpacerMarkSpec.HAIR_SPACE_CHAR);
|
|
70
51
|
tr = tr.insert(to, _prosemirrorModel.Fragment.from(textNode));
|
|
71
52
|
const attrs = {
|
|
@@ -76,28 +57,22 @@ function insertTabSpace(state, tr, schema) {
|
|
|
76
57
|
tr = tr.setSelection(_prosemirrorState.TextSelection.create(tr.doc, to + 1, to + 1));
|
|
77
58
|
return tr;
|
|
78
59
|
}
|
|
79
|
-
|
|
80
60
|
class TextInsertTabSpaceCommand extends _licitDocAttrsStep.UICommand {
|
|
81
61
|
constructor() {
|
|
82
62
|
super(...arguments);
|
|
83
|
-
|
|
84
63
|
_defineProperty(this, "execute", (state, dispatch, view, event) => {
|
|
85
64
|
const {
|
|
86
65
|
schema,
|
|
87
66
|
tr
|
|
88
67
|
} = state;
|
|
89
68
|
const trNext = insertTabSpace(state, tr, schema);
|
|
90
|
-
|
|
91
69
|
if (trNext.docChanged) {
|
|
92
70
|
dispatch && dispatch(trNext);
|
|
93
71
|
return true;
|
|
94
72
|
}
|
|
95
|
-
|
|
96
73
|
return false;
|
|
97
74
|
});
|
|
98
75
|
}
|
|
99
|
-
|
|
100
76
|
}
|
|
101
|
-
|
|
102
77
|
var _default = TextInsertTabSpaceCommand;
|
|
103
78
|
exports.default = _default;
|
|
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Types = require("./Types");
|
|
9
|
-
|
|
10
8
|
const NO_WRAP_DOM = ['nobr', 0];
|
|
11
9
|
const TextNoWrapMarkSpec = {
|
|
12
10
|
parseDOM: [{
|
|
13
11
|
tag: 'nobr'
|
|
14
12
|
}],
|
|
15
|
-
|
|
16
13
|
toDOM() {
|
|
17
14
|
return NO_WRAP_DOM;
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
};
|
|
21
17
|
var _default = TextNoWrapMarkSpec;
|
|
22
18
|
exports.default = _default;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _prosemirrorModel = require("prosemirror-model");
|
|
9
|
-
|
|
10
8
|
var _Types = require("./Types");
|
|
11
|
-
|
|
12
9
|
const TextSelectionMarkSpec = {
|
|
13
10
|
attrs: {
|
|
14
11
|
id: ''
|
|
@@ -18,13 +15,11 @@ const TextSelectionMarkSpec = {
|
|
|
18
15
|
parseDOM: [{
|
|
19
16
|
tag: 'czi-text-selection'
|
|
20
17
|
}],
|
|
21
|
-
|
|
22
18
|
toDOM(node) {
|
|
23
19
|
return ['czi-text-selection', {
|
|
24
20
|
class: 'czi-text-selection'
|
|
25
21
|
}, 0];
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
};
|
|
29
24
|
var _default = TextSelectionMarkSpec;
|
|
30
25
|
exports.default = _default;
|
package/dist/TextSubMarkSpec.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Types = require("./Types");
|
|
9
|
-
|
|
10
8
|
const TextSubMarkSpec = {
|
|
11
9
|
parseDOM: [{
|
|
12
10
|
tag: 'sub'
|
|
@@ -16,11 +14,9 @@ const TextSubMarkSpec = {
|
|
|
16
14
|
return value === 'sub' && null;
|
|
17
15
|
}
|
|
18
16
|
}],
|
|
19
|
-
|
|
20
17
|
toDOM() {
|
|
21
18
|
return ['sub', 0];
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
};
|
|
25
21
|
var _default = TextSubMarkSpec;
|
|
26
22
|
exports.default = _default;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Types = require("./Types");
|
|
9
|
-
|
|
10
8
|
const TextSuperMarkSpec = {
|
|
11
9
|
parseDOM: [{
|
|
12
10
|
tag: 'sup'
|
|
@@ -16,11 +14,9 @@ const TextSuperMarkSpec = {
|
|
|
16
14
|
return value === 'super' && null;
|
|
17
15
|
}
|
|
18
16
|
}],
|
|
19
|
-
|
|
20
17
|
toDOM() {
|
|
21
18
|
return ['sup', 0];
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
};
|
|
25
21
|
var _default = TextSuperMarkSpec;
|
|
26
22
|
exports.default = _default;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Types = require("./Types");
|
|
9
|
-
|
|
10
8
|
// https://bitbucket.org/atlassian/atlaskit/src/34facee3f461/packages/editor-core/src/schema/nodes/?at=master
|
|
11
9
|
const TextUnderlineMarkSpec = {
|
|
12
10
|
parseDOM: [{
|
|
@@ -22,11 +20,9 @@ const TextUnderlineMarkSpec = {
|
|
|
22
20
|
return value === 'underline' && null;
|
|
23
21
|
}
|
|
24
22
|
}],
|
|
25
|
-
|
|
26
23
|
toDOM() {
|
|
27
24
|
return ['u', 0];
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
};
|
|
31
27
|
var _default = TextUnderlineMarkSpec;
|
|
32
28
|
exports.default = _default;
|
package/dist/Types.js
CHANGED
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.bpfrpt_proptype_RenderCommentProps = exports.bpfrpt_proptype_NodeSpec = exports.bpfrpt_proptype_MarkSpec = exports.bpfrpt_proptype_ImageLike = exports.bpfrpt_proptype_EditorState = exports.bpfrpt_proptype_EditorRuntime = exports.bpfrpt_proptype_EditorProps = exports.bpfrpt_proptype_DirectEditorProps = void 0;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
12
|
var bpfrpt_proptype_NodeSpec = {
|
|
19
13
|
"attrs": _propTypes.default.objectOf((props, propName, componentName) => {
|
|
20
14
|
if (!Object.prototype.hasOwnProperty.call(props, propName)) {
|
package/dist/WebFontLoader.js
CHANGED
|
@@ -4,30 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
10
|
class WebFontLoader {
|
|
11
11
|
constructor() {
|
|
12
12
|
_defineProperty(this, "_implementation", null);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
setImplementation(impl) {
|
|
16
15
|
this._implementation = impl;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
load(params) {
|
|
20
18
|
const impl = this._implementation;
|
|
21
|
-
|
|
22
19
|
if (impl) {
|
|
23
20
|
impl.load(params);
|
|
24
21
|
} else {
|
|
25
22
|
console.warn('Method WebFontLoader.load does not have an implementation');
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
const loader = new WebFontLoader();
|
|
32
27
|
var _default = loader;
|
|
33
28
|
exports.default = _default;
|
|
@@ -4,23 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = blockQuoteInputRule;
|
|
7
|
-
|
|
8
7
|
var _prosemirrorInputrules = require("prosemirror-inputrules");
|
|
9
|
-
|
|
10
8
|
var _prosemirrorState = require("prosemirror-state");
|
|
11
|
-
|
|
12
9
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
13
|
-
|
|
14
10
|
var _NodeNames = require("./NodeNames");
|
|
15
|
-
|
|
16
11
|
var _toggleBlockquote = _interopRequireDefault(require("./toggleBlockquote"));
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
// Given a blockquote node type, returns an input rule that turns `"> "`
|
|
21
14
|
// at the start of a textblock into a blockquote.
|
|
22
15
|
const MACRO_PATTERN = /^\s*>\s$/;
|
|
23
|
-
|
|
24
16
|
function handleBlockQuoteInputRule(state, match, start, end) {
|
|
25
17
|
const {
|
|
26
18
|
schema
|
|
@@ -29,20 +21,15 @@ function handleBlockQuoteInputRule(state, match, start, end) {
|
|
|
29
21
|
tr
|
|
30
22
|
} = state;
|
|
31
23
|
const nodeType = schema.nodes[_NodeNames.BLOCKQUOTE];
|
|
32
|
-
|
|
33
24
|
if (!nodeType) {
|
|
34
25
|
return tr;
|
|
35
26
|
}
|
|
36
|
-
|
|
37
27
|
tr = (0, _toggleBlockquote.default)(tr, schema);
|
|
38
|
-
|
|
39
28
|
if (tr.docChanged) {
|
|
40
29
|
tr = tr.delete(start, end);
|
|
41
30
|
}
|
|
42
|
-
|
|
43
31
|
return tr;
|
|
44
32
|
}
|
|
45
|
-
|
|
46
33
|
function blockQuoteInputRule() {
|
|
47
34
|
return new _prosemirrorInputrules.InputRule(MACRO_PATTERN, handleBlockQuoteInputRule);
|
|
48
35
|
}
|