@modusoperandi/licit 0.1.9 → 0.13.2
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/.github/workflows/build.yml +1 -7
- package/.github/workflows/lint.yml +1 -1
- package/README.md +1 -1
- package/babel.config.json +54 -0
- package/dist/BlockquoteNodeSpec.js +2 -2
- package/dist/CZIProseMirror.js +4 -4
- package/dist/CodeBlockCommand.js +2 -2
- package/dist/CodeBlockCommand.js.flow +1 -1
- package/dist/CursorPlaceholderPlugin.js +2 -2
- package/dist/DocLayoutCommand.js +2 -4
- package/dist/DocLayoutCommand.js.flow +1 -1
- package/dist/DocNodeSpec.js +1 -1
- package/dist/EditorCommands.js +23 -35
- package/dist/EditorCommands.js.flow +7 -7
- package/dist/EditorKeyMap.js +3 -3
- package/dist/FontTypeMarkSpec.js +1 -1
- package/dist/HeadingNodeSpec.js +2 -2
- package/dist/ImageSourceCommand.js +2 -4
- package/dist/ImageSourceCommand.js.flow +1 -1
- package/dist/ImageUploadPlaceholderPlugin.js +1 -1
- package/dist/LinkSetURLCommand.js +4 -8
- package/dist/LinkSetURLCommand.js.flow +3 -3
- package/dist/LinkTooltipPlugin.js +9 -15
- package/dist/LinkTooltipPlugin.js.flow +5 -5
- package/dist/ListToggleCommand.js +5 -11
- package/dist/ListToggleCommand.js.flow +3 -3
- package/dist/MarkNames.js +1 -1
- package/dist/MarksClearCommand.js +3 -3
- package/dist/MarksClearCommand.js.flow +1 -1
- package/dist/MathEditCommand.js +2 -2
- package/dist/MathEditCommand.js.flow +1 -1
- package/dist/ParagraphNodeSpec.js +3 -4
- package/dist/ParagraphNodeSpec.js.flow +2 -6
- package/dist/ParagraphSpacingCommand.js +3 -3
- package/dist/SelectionPlaceholderPlugin.js +2 -2
- package/dist/SpacerMarkSpec.js +1 -1
- package/dist/TableBackgroundColorCommand.js +3 -7
- package/dist/TableBackgroundColorCommand.js.flow +3 -3
- package/dist/TableBorderColorCommand.js +3 -7
- package/dist/TableBorderColorCommand.js.flow +3 -3
- package/dist/TableCellColorCommand.js +3 -7
- package/dist/TableCellColorCommand.js.flow +3 -3
- package/dist/TableCellMenuPlugin.js +4 -6
- package/dist/TableCellMenuPlugin.js.flow +3 -3
- package/dist/TableInsertCommand.js +3 -5
- package/dist/TableInsertCommand.js.flow +2 -2
- package/dist/TableResizePlugin.js +2 -2
- package/dist/TextInsertTabSpaceCommand.js +2 -4
- package/dist/TextInsertTabSpaceCommand.js.flow +1 -1
- package/dist/Types.js +1 -1
- package/dist/bom.xml +4970 -4167
- package/dist/client/CollabConnector.js +17 -2
- package/dist/client/CollabConnector.js.flow +17 -2
- package/dist/client/EditorConnection.js +15 -4
- package/dist/client/EditorConnection.js.flow +14 -3
- package/dist/client/Licit.js +73 -58
- package/dist/client/Licit.js.flow +101 -85
- package/dist/client/Licit.test.js +18 -17
- package/dist/client/Licit.test.js.flow +13 -11
- package/dist/client/SimpleConnector.js +4 -2
- package/dist/client/SimpleConnector.js.flow +3 -1
- package/dist/client/http.js +3 -3
- package/dist/convertToCSSPTValue.js +1 -1
- package/dist/createEmptyEditorState.js +1 -1
- package/dist/index.js +16 -16
- package/dist/joinListNode.js +2 -2
- package/dist/joinListNode.js.flow +1 -1
- package/dist/keymaps.js +2 -2
- package/dist/patchStyleElements.js +3 -3
- package/dist/patchStyleElements.js.flow +1 -1
- package/dist/splitListItem.js +2 -2
- package/dist/styles.css +2 -2
- package/dist/styles0.css +3 -3
- package/dist/toggleBlockquote.js +6 -14
- package/dist/toggleBlockquote.js.flow +4 -4
- package/dist/toggleCodeBlock.js +4 -10
- package/dist/toggleCodeBlock.js.flow +3 -3
- package/dist/ui/AlertInfo.js +2 -2
- package/dist/ui/CommandButton.js +2 -4
- package/dist/ui/CommandButton.js.flow +1 -1
- package/dist/ui/CommandMenuButton.js +5 -7
- package/dist/ui/CommandMenuButton.js.flow +2 -2
- package/dist/ui/CustomMenuItem.js +3 -5
- package/dist/ui/CustomMenuItem.js.flow +1 -1
- package/dist/ui/CustomNodeView.js +3 -3
- package/dist/ui/CustomRadioButton.js +8 -6
- package/dist/ui/CustomRadioButton.js.flow +3 -3
- package/dist/ui/DocLayoutEditor.js +5 -7
- package/dist/ui/DocLayoutEditor.js.flow +2 -2
- package/dist/ui/Editor.js +1 -2
- package/dist/ui/Editor.js.flow +1 -2
- package/dist/ui/EditorFrameset.js +1 -1
- package/dist/ui/EditorToolbar.js +4 -4
- package/dist/ui/EditorToolbar.js.flow +1 -1
- package/dist/ui/EditorToolbarConfig.js +1 -1
- package/dist/ui/FontSizeCommandMenuButton.js +3 -3
- package/dist/ui/FontSizeCommandMenuButton.js.flow +1 -1
- package/dist/ui/FontTypeCommandMenuButton.js +3 -3
- package/dist/ui/FontTypeCommandMenuButton.js.flow +1 -1
- package/dist/ui/ImageAlignEditor.js +5 -5
- package/dist/ui/ImageAlignEditor.js.flow +1 -1
- package/dist/ui/ImageInlineEditor.js +5 -5
- package/dist/ui/ImageInlineEditor.js.flow +1 -1
- package/dist/ui/ImageNodeView.js +5 -7
- package/dist/ui/ImageNodeView.js.flow +2 -2
- package/dist/ui/ImageResizeBox.js +4 -4
- package/dist/ui/ImageResizeBox.js.flow +1 -1
- package/dist/ui/ImageURLEditor.js +6 -8
- package/dist/ui/ImageURLEditor.js.flow +2 -2
- package/dist/ui/ImageUploadEditor.js +3 -5
- package/dist/ui/ImageUploadEditor.js.flow +2 -2
- package/dist/ui/LinkTooltip.js +4 -4
- package/dist/ui/LinkTooltip.js.flow +1 -1
- package/dist/ui/LinkURLEditor.js +4 -6
- package/dist/ui/LinkURLEditor.js.flow +2 -2
- package/dist/ui/ListTypeButton.js +5 -7
- package/dist/ui/ListTypeButton.js.flow +2 -2
- package/dist/ui/MathEditor.js +4 -6
- package/dist/ui/MathEditor.js.flow +2 -2
- package/dist/ui/MathInlineEditor.js +7 -9
- package/dist/ui/MathInlineEditor.js.flow +2 -2
- package/dist/ui/MathNodeView.js +5 -7
- package/dist/ui/MathNodeView.js.flow +2 -2
- package/dist/ui/ResizeObserver.js +1 -1
- package/dist/ui/TableGridSizeEditor.js +7 -9
- package/dist/ui/TableGridSizeEditor.js.flow +2 -2
- package/dist/ui/czi-link-tooltip.css +1 -1
- package/dist/ui/czi-vars.css +1 -45
- package/dist/ui/findActiveFontType.js +1 -1
- package/dist/ui/htmlElementToRect.js +1 -1
- package/dist/ui/isElementFullyVisible.js +2 -2
- package/dist/ui/isElementFullyVisible.js.flow +1 -1
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +1 -1
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +2 -2
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +1 -1
- package/dist/ui/resolveImage.js +3 -3
- package/dist/ui/toCSSColor.js +1 -1
- package/dist/ui/toCSSLineSpacing.js +1 -36
- package/dist/ui/toCSSLineSpacing.js.flow +0 -27
- package/flow-typed/@modusoperandilicit-ui-commands.js +5 -0
- package/jest.config.js +207 -0
- package/lint.sh +0 -0
- package/node_modules/prosemirror-utils/LICENSE +13 -0
- package/{dist/ui/PopUpTypes.js.flow → node_modules/prosemirror-utils/README.md} +0 -0
- package/node_modules/prosemirror-utils/dist/helpers.js +119 -0
- package/node_modules/prosemirror-utils/dist/index.js +17 -0
- package/node_modules/prosemirror-utils/dist/index.js.map +1 -0
- package/node_modules/prosemirror-utils/dist/node.js +106 -0
- package/node_modules/prosemirror-utils/dist/selection.js +168 -0
- package/node_modules/prosemirror-utils/dist/transforms.js +257 -0
- package/node_modules/prosemirror-utils/package.json +81 -0
- package/node_modules/prosemirror-utils/typings.d.ts +79 -0
- package/package.json +14 -8
- package/scripts/build_bin.py +0 -0
- package/scripts/ci_check_dist.sh +0 -0
- package/src/CodeBlockCommand.js +1 -1
- package/src/DocLayoutCommand.js +1 -1
- package/src/EditorCommands.js +7 -7
- package/src/ImageSourceCommand.js +1 -1
- package/src/LinkSetURLCommand.js +3 -3
- package/src/LinkTooltipPlugin.js +5 -5
- package/src/ListToggleCommand.js +3 -3
- package/src/MarksClearCommand.js +1 -1
- package/src/MathEditCommand.js +1 -1
- package/src/ParagraphNodeSpec.js +2 -6
- package/src/TableBackgroundColorCommand.js +3 -3
- package/src/TableBorderColorCommand.js +3 -3
- package/src/TableCellColorCommand.js +3 -3
- package/src/TableCellMenuPlugin.js +3 -3
- package/src/TableInsertCommand.js +2 -2
- package/src/TextInsertTabSpaceCommand.js +1 -1
- package/src/client/CollabConnector.js +17 -2
- package/src/client/EditorConnection.js +14 -3
- package/src/client/Licit.js +101 -85
- package/src/client/Licit.test.js +13 -11
- package/src/client/SimpleConnector.js +3 -1
- package/src/joinListNode.js +1 -1
- package/src/patchStyleElements.js +1 -1
- package/src/styles.css +2 -2
- package/src/styles0.css +3 -3
- package/src/toggleBlockquote.js +4 -4
- package/src/toggleCodeBlock.js +3 -3
- package/src/ui/CommandButton.js +1 -1
- package/src/ui/CommandMenuButton.js +2 -2
- package/src/ui/CustomMenuItem.js +1 -1
- package/src/ui/CustomRadioButton.js +3 -3
- package/src/ui/DocLayoutEditor.js +2 -2
- package/src/ui/Editor.js +1 -2
- package/src/ui/EditorToolbar.js +1 -1
- package/src/ui/FontSizeCommandMenuButton.js +1 -1
- package/src/ui/FontTypeCommandMenuButton.js +1 -1
- package/src/ui/ImageAlignEditor.js +1 -1
- package/src/ui/ImageInlineEditor.js +1 -1
- package/src/ui/ImageNodeView.js +2 -2
- package/src/ui/ImageResizeBox.js +1 -1
- package/src/ui/ImageURLEditor.js +2 -2
- package/src/ui/ImageUploadEditor.js +2 -2
- package/src/ui/LinkTooltip.js +1 -1
- package/src/ui/LinkURLEditor.js +2 -2
- package/src/ui/ListTypeButton.js +2 -2
- package/src/ui/MathEditor.js +2 -2
- package/src/ui/MathInlineEditor.js +2 -2
- package/src/ui/MathNodeView.js +2 -2
- package/src/ui/TableGridSizeEditor.js +2 -2
- package/src/ui/czi-link-tooltip.css +1 -1
- package/src/ui/czi-vars.css +1 -45
- package/src/ui/isElementFullyVisible.js +1 -1
- package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +1 -1
- package/src/ui/toCSSLineSpacing.js +0 -27
- package/build_customstyle_server.py +0 -7
- package/dist/FontSizeCommand.js +0 -80
- package/dist/FontSizeCommand.js.flow +0 -57
- package/dist/FontTypeCommand.js +0 -137
- package/dist/FontTypeCommand.js.flow +0 -100
- package/dist/HeadingCommand.js +0 -65
- package/dist/HeadingCommand.js.flow +0 -51
- package/dist/IndentCommand.js +0 -57
- package/dist/IndentCommand.js.flow +0 -41
- package/dist/MarkToggleCommand.js +0 -90
- package/dist/MarkToggleCommand.js.flow +0 -66
- package/dist/TextAlignCommand.js +0 -151
- package/dist/TextAlignCommand.js.flow +0 -122
- package/dist/TextColorCommand.js +0 -114
- package/dist/TextColorCommand.js.flow +0 -87
- package/dist/TextHighlightCommand.js +0 -118
- package/dist/TextHighlightCommand.js.flow +0 -91
- package/dist/TextLineSpacingCommand.js +0 -177
- package/dist/TextLineSpacingCommand.js.flow +0 -157
- package/dist/applyMark.js +0 -84
- package/dist/applyMark.js.flow +0 -61
- package/dist/clearMarks.js +0 -160
- package/dist/clearMarks.js.flow +0 -128
- package/dist/compareNumber.js +0 -18
- package/dist/compareNumber.js.flow +0 -11
- package/dist/consolidateListNodes.js +0 -291
- package/dist/consolidateListNodes.js.flow +0 -281
- package/dist/coverage/lcov-report/block-navigation.js +0 -77
- package/dist/coverage/lcov-report/block-navigation.js.flow +0 -79
- package/dist/coverage/lcov-report/prettify.js +0 -994
- package/dist/coverage/lcov-report/prettify.js.flow +0 -2
- package/dist/coverage/lcov-report/sorter.js +0 -187
- package/dist/coverage/lcov-report/sorter.js.flow +0 -170
- package/dist/findNodesWithSameMark.js +0 -89
- package/dist/findNodesWithSameMark.js.flow +0 -89
- package/dist/isBulletListNode.js +0 -14
- package/dist/isBulletListNode.js.flow +0 -9
- package/dist/isInsideListItem.js +0 -19
- package/dist/isInsideListItem.js.flow +0 -13
- package/dist/isListNode.js +0 -22
- package/dist/isListNode.js.flow +0 -13
- package/dist/isNodeSelectionForNodeType.js +0 -19
- package/dist/isNodeSelectionForNodeType.js.flow +0 -15
- package/dist/isOrderedListNode.js +0 -14
- package/dist/isOrderedListNode.js.flow +0 -9
- package/dist/isTextStyleMarkCommandEnabled.js +0 -59
- package/dist/isTextStyleMarkCommandEnabled.js.flow +0 -49
- package/dist/noop.js +0 -11
- package/dist/noop.js.flow +0 -5
- package/dist/toggleHeading.js +0 -135
- package/dist/toggleHeading.js.flow +0 -113
- package/dist/toggleList.js +0 -431
- package/dist/toggleList.js.flow +0 -450
- package/dist/transformAndPreserveTextSelection.js +0 -173
- package/dist/transformAndPreserveTextSelection.js.flow +0 -151
- package/dist/ui/ColorEditor.js +0 -118
- package/dist/ui/ColorEditor.js.flow +0 -101
- package/dist/ui/CustomButton.js +0 -62
- package/dist/ui/CustomButton.js.flow +0 -33
- package/dist/ui/PointerSurface.js +0 -173
- package/dist/ui/PointerSurface.js.flow +0 -141
- package/dist/ui/PopUp.js +0 -129
- package/dist/ui/PopUp.js.flow +0 -77
- package/dist/ui/PopUpManager.js +0 -266
- package/dist/ui/PopUpManager.js.flow +0 -213
- package/dist/ui/PopUpPosition.js +0 -156
- package/dist/ui/PopUpPosition.js.flow +0 -104
- package/dist/ui/PopUpTypes.js +0 -1
- package/dist/ui/TooltipSurface.js +0 -99
- package/dist/ui/TooltipSurface.js.flow +0 -76
- package/dist/ui/clamp.js +0 -18
- package/dist/ui/clamp.js.flow +0 -11
- package/dist/ui/createPopUp.js +0 -199
- package/dist/ui/createPopUp.js.flow +0 -205
- package/dist/ui/czi-animations.css +0 -15
- package/dist/ui/czi-color-editor.css +0 -56
- package/dist/ui/czi-custom-button.css +0 -93
- package/dist/ui/czi-pop-up.css +0 -32
- package/dist/ui/czi-tooltip-surface.css +0 -45
- package/dist/ui/preventEventDefault.js +0 -10
- package/dist/ui/preventEventDefault.js.flow +0 -5
- package/dist/ui/rects.js +0 -58
- package/dist/ui/rects.js.flow +0 -47
- package/dist/updateIndentLevel.js +0 -232
- package/dist/updateIndentLevel.js.flow +0 -211
- package/flow-typed/@molicit-citation.js +0 -5
- package/licit/server/customstyles/start.js +0 -184
- package/run_customstyle_server.py +0 -20
- package/src/FontSizeCommand.js +0 -57
- package/src/FontTypeCommand.js +0 -100
- package/src/HeadingCommand.js +0 -51
- package/src/IndentCommand.js +0 -41
- package/src/MarkToggleCommand.js +0 -66
- package/src/TextAlignCommand.js +0 -122
- package/src/TextColorCommand.js +0 -87
- package/src/TextHighlightCommand.js +0 -91
- package/src/TextLineSpacingCommand.js +0 -157
- package/src/applyMark.js +0 -61
- package/src/clearMarks.js +0 -128
- package/src/compareNumber.js +0 -11
- package/src/consolidateListNodes.js +0 -281
- package/src/findNodesWithSameMark.js +0 -89
- package/src/isBulletListNode.js +0 -9
- package/src/isInsideListItem.js +0 -13
- package/src/isListNode.js +0 -13
- package/src/isNodeSelectionForNodeType.js +0 -15
- package/src/isOrderedListNode.js +0 -9
- package/src/isTextStyleMarkCommandEnabled.js +0 -49
- package/src/noop.js +0 -5
- package/src/toggleHeading.js +0 -113
- package/src/toggleList.js +0 -450
- package/src/transformAndPreserveTextSelection.js +0 -151
- package/src/ui/ColorEditor.js +0 -101
- package/src/ui/CustomButton.js +0 -33
- package/src/ui/PointerSurface.js +0 -141
- package/src/ui/PopUp.js +0 -77
- package/src/ui/PopUpManager.js +0 -213
- package/src/ui/PopUpPosition.js +0 -104
- package/src/ui/PopUpTypes.js +0 -0
- package/src/ui/TooltipSurface.js +0 -76
- package/src/ui/clamp.js +0 -11
- package/src/ui/createPopUp.js +0 -205
- package/src/ui/czi-animations.css +0 -15
- package/src/ui/czi-color-editor.css +0 -56
- package/src/ui/czi-custom-button.css +0 -93
- package/src/ui/czi-pop-up.css +0 -32
- package/src/ui/czi-tooltip-surface.css +0 -45
- package/src/ui/preventEventDefault.js +0 -5
- package/src/ui/rects.js +0 -47
- package/src/updateIndentLevel.js +0 -211
- package/utils/build_customstyle_server.js +0 -72
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
strategy:
|
|
18
18
|
matrix:
|
|
19
|
-
node-version: [
|
|
19
|
+
node-version: [16.x]
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v2
|
|
@@ -27,9 +27,3 @@ jobs:
|
|
|
27
27
|
fetch-depth: 2
|
|
28
28
|
- run: npm ci
|
|
29
29
|
- run: npm run build:dist
|
|
30
|
-
- run: npm run test -- --coverage
|
|
31
|
-
|
|
32
|
-
- name: Upload coverage to Codecov
|
|
33
|
-
uses: codecov/codecov-action@v1
|
|
34
|
-
with:
|
|
35
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Python(3.8.2)
|
|
|
59
59
|
|
|
60
60
|
### Install dependencies
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Pack [licit-ui-components](https://github.com/MO-Movia/licit-ui-components/tree/initial) and copy _modusoperandi-licit-ui-commands-0.0.1.tgz_ to the root folder.
|
|
63
63
|
```
|
|
64
64
|
cd licit
|
|
65
65
|
npm install
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
[
|
|
4
|
+
"@babel/preset-env",
|
|
5
|
+
{
|
|
6
|
+
"targets": {
|
|
7
|
+
"node": true
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"@babel/preset-react",
|
|
12
|
+
"@babel/preset-flow"
|
|
13
|
+
],
|
|
14
|
+
"plugins": [
|
|
15
|
+
"@babel/plugin-proposal-class-properties",
|
|
16
|
+
"@babel/plugin-proposal-export-default-from",
|
|
17
|
+
"flow-react-proptypes",
|
|
18
|
+
"transform-react-remove-prop-types",
|
|
19
|
+
"@babel/plugin-transform-flow-strip-types",
|
|
20
|
+
"@babel/plugin-proposal-object-rest-spread",
|
|
21
|
+
"@babel/plugin-transform-parameters",
|
|
22
|
+
[
|
|
23
|
+
"@babel/plugin-transform-runtime",
|
|
24
|
+
{
|
|
25
|
+
"helpers": false,
|
|
26
|
+
"regenerator": true,
|
|
27
|
+
"absoluteRuntime": "babel-runtime"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"@babel/plugin-syntax-dynamic-import",
|
|
31
|
+
"@babel/plugin-syntax-import-meta",
|
|
32
|
+
"@babel/plugin-proposal-json-strings",
|
|
33
|
+
[
|
|
34
|
+
"@babel/plugin-proposal-decorators",
|
|
35
|
+
{
|
|
36
|
+
"legacy": true
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"@babel/plugin-proposal-function-sent",
|
|
40
|
+
"@babel/plugin-proposal-export-namespace-from",
|
|
41
|
+
"@babel/plugin-proposal-numeric-separator",
|
|
42
|
+
"@babel/plugin-proposal-throw-expressions",
|
|
43
|
+
"@babel/plugin-proposal-logical-assignment-operators",
|
|
44
|
+
"@babel/plugin-proposal-optional-chaining",
|
|
45
|
+
[
|
|
46
|
+
"@babel/plugin-proposal-pipeline-operator",
|
|
47
|
+
{
|
|
48
|
+
"proposal": "minimal"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"@babel/plugin-proposal-nullish-coalescing-operator",
|
|
52
|
+
"@babel/plugin-proposal-do-expressions"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -15,9 +15,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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
17
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
19
|
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
21
|
|
|
22
22
|
function _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; }
|
|
23
23
|
|
package/dist/CZIProseMirror.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.executeCommand = executeCommand;
|
|
7
7
|
exports.exportJSON = exportJSON;
|
|
8
|
-
exports.registerEditorView = registerEditorView;
|
|
9
|
-
exports.releaseEditorView = releaseEditorView;
|
|
10
8
|
exports.findEditorView = findEditorView;
|
|
11
|
-
exports.executeCommand = executeCommand;
|
|
12
9
|
exports.registerCommand = registerCommand;
|
|
10
|
+
exports.registerEditorView = registerEditorView;
|
|
11
|
+
exports.registeryKeys = registeryKeys;
|
|
12
|
+
exports.releaseEditorView = releaseEditorView;
|
|
13
13
|
|
|
14
14
|
var _prosemirrorView = require("prosemirror-view");
|
|
15
15
|
|
package/dist/CodeBlockCommand.js
CHANGED
|
@@ -15,7 +15,7 @@ var _prosemirrorView = require("prosemirror-view");
|
|
|
15
15
|
|
|
16
16
|
var _NodeNames = require("./NodeNames");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
19
19
|
|
|
20
20
|
var _toggleCodeBlock = _interopRequireDefault(require("./toggleCodeBlock"));
|
|
21
21
|
|
|
@@ -57,7 +57,7 @@ class CodeBlockCommand extends _licitDocAttrsStep.UICommand {
|
|
|
57
57
|
|
|
58
58
|
_findCodeBlock(state) {
|
|
59
59
|
const codeBlock = state.schema.nodes[_NodeNames.CODE_BLOCK];
|
|
60
|
-
const findCodeBlock = codeBlock ? (0, _prosemirrorUtils.findParentNodeOfType)(codeBlock) :
|
|
60
|
+
const findCodeBlock = codeBlock ? (0, _prosemirrorUtils.findParentNodeOfType)(codeBlock) : _licitUiCommands.noop;
|
|
61
61
|
return findCodeBlock(state.selection);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -6,7 +6,7 @@ import { findParentNodeOfType } from 'prosemirror-utils';
|
|
|
6
6
|
import { EditorView } from 'prosemirror-view';
|
|
7
7
|
|
|
8
8
|
import { CODE_BLOCK } from './NodeNames';
|
|
9
|
-
import noop from '
|
|
9
|
+
import { noop } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
import toggleCodeBlock from './toggleCodeBlock';
|
|
11
11
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
12
12
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.showCursorPlaceholder = showCursorPlaceholder;
|
|
7
|
-
exports.hideCursorPlaceholder = hideCursorPlaceholder;
|
|
8
6
|
exports.default = void 0;
|
|
7
|
+
exports.hideCursorPlaceholder = hideCursorPlaceholder;
|
|
8
|
+
exports.showCursorPlaceholder = showCursorPlaceholder;
|
|
9
9
|
|
|
10
10
|
var _prosemirrorState = require("prosemirror-state");
|
|
11
11
|
|
package/dist/DocLayoutCommand.js
CHANGED
|
@@ -17,9 +17,7 @@ var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
|
17
17
|
|
|
18
18
|
var _DocLayoutEditor = _interopRequireWildcard(require("./ui/DocLayoutEditor"));
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
23
21
|
|
|
24
22
|
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); }
|
|
25
23
|
|
|
@@ -67,7 +65,7 @@ class DocLayoutCommand extends _licitDocAttrsStep.UICommand {
|
|
|
67
65
|
const props = {
|
|
68
66
|
initialValue: doc.attrs
|
|
69
67
|
};
|
|
70
|
-
this._popUp = (0,
|
|
68
|
+
this._popUp = (0, _licitUiCommands.createPopUp)(_DocLayoutEditor.default, props, {
|
|
71
69
|
modal: true,
|
|
72
70
|
onClose: val => {
|
|
73
71
|
if (this._popUp) {
|
|
@@ -8,7 +8,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
8
8
|
import { SetDocAttrStep } from '@modusoperandi/licit-doc-attrs-step';
|
|
9
9
|
import DocLayoutEditor from './ui/DocLayoutEditor';
|
|
10
10
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
11
|
-
import createPopUp from '
|
|
11
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
12
12
|
|
|
13
13
|
import type { DocLayoutEditorValue } from './ui/DocLayoutEditor';
|
|
14
14
|
|
package/dist/DocNodeSpec.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.default = exports.LAYOUT = exports.ATTRIBUTE_LAYOUT = void 0;
|
|
6
7
|
exports.getAttrs = getAttrs;
|
|
7
|
-
exports.default = exports.ATTRIBUTE_LAYOUT = exports.LAYOUT = void 0;
|
|
8
8
|
|
|
9
9
|
var _convertToCSSPTValue = _interopRequireDefault(require("./convertToCSSPTValue"));
|
|
10
10
|
|
package/dist/EditorCommands.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.UNDERLINE = exports.UL = exports.TEXT_LINE_SPACINGS = exports.TEXT_INSERT_TAB_SPACE = exports.TEXT_HIGHLIGHT = exports.TEXT_COLOR = exports.TEXT_ALIGN_RIGHT = exports.TEXT_ALIGN_LEFT = exports.TEXT_ALIGN_JUSTIFY = exports.TEXT_ALIGN_CENTER = exports.TABLE_TOGGLE_HEADER_ROW = exports.TABLE_TOGGLE_HEADER_COLUMN = exports.TABLE_TOGGLE_HEADER_CELL = exports.TABLE_SPLIT_ROW = exports.TABLE_MOVE_TO_PREV_CELL = exports.TABLE_MOVE_TO_NEXT_CELL = exports.TABLE_MERGE_CELLS = exports.TABLE_INSERT_TABLE = exports.TABLE_DELETE_TABLE = exports.TABLE_DELETE_ROW = exports.TABLE_DELETE_COLUMN = exports.TABLE_BORDER_COLOR = exports.TABLE_BACKGROUND_COLOR = exports.TABLE_ADD_ROW_BEFORE = exports.TABLE_ADD_ROW_AFTER = exports.TABLE_ADD_COLUMN_BEFORE = exports.TABLE_ADD_COLUMN_AFTER = exports.
|
|
6
|
+
exports.UNDERLINE = exports.UL = exports.TEXT_LINE_SPACINGS = exports.TEXT_INSERT_TAB_SPACE = exports.TEXT_HIGHLIGHT = exports.TEXT_COLOR = exports.TEXT_ALIGN_RIGHT = exports.TEXT_ALIGN_LEFT = exports.TEXT_ALIGN_JUSTIFY = exports.TEXT_ALIGN_CENTER = exports.TABLE_TOGGLE_HEADER_ROW = exports.TABLE_TOGGLE_HEADER_COLUMN = exports.TABLE_TOGGLE_HEADER_CELL = exports.TABLE_SPLIT_ROW = exports.TABLE_MOVE_TO_PREV_CELL = exports.TABLE_MOVE_TO_NEXT_CELL = exports.TABLE_MERGE_CELLS = exports.TABLE_INSERT_TABLE = exports.TABLE_DELETE_TABLE = exports.TABLE_DELETE_ROW = exports.TABLE_DELETE_COLUMN = exports.TABLE_BORDER_COLOR = exports.TABLE_BACKGROUND_COLOR = exports.TABLE_ADD_ROW_BEFORE = exports.TABLE_ADD_ROW_AFTER = exports.TABLE_ADD_COLUMN_BEFORE = exports.TABLE_ADD_COLUMN_AFTER = exports.SUPER = exports.SUB = exports.STRONG = exports.STRIKE = exports.PRINT = exports.MATH_EDIT = exports.LIST_SPLIT = exports.LIST_ITEM_MERGE_UP = exports.LIST_ITEM_MERGE_DOWN = exports.LIST_ITEM_INSERT_NEW_LINE = exports.LINK_SET_URL = exports.INDENT_MORE = exports.INDENT_LESS = exports.IMAGE_UPLOAD = exports.IMAGE_FROM_URL = exports.HR = exports.HISTORY_UNDO = exports.HISTORY_REDO = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.EM = exports.DOC_LAYOUT = exports.CLEAR_FORMAT = void 0;
|
|
7
7
|
|
|
8
8
|
var ProsemirrorTables = _interopRequireWildcard(require("prosemirror-tables"));
|
|
9
9
|
|
|
10
10
|
var _DocLayoutCommand = _interopRequireDefault(require("./DocLayoutCommand"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
13
13
|
|
|
14
14
|
var _HistoryRedoCommand = _interopRequireDefault(require("./HistoryRedoCommand"));
|
|
15
15
|
|
|
@@ -21,8 +21,6 @@ var _ImageFromURLCommand = _interopRequireDefault(require("./ImageFromURLCommand
|
|
|
21
21
|
|
|
22
22
|
var _ImageUploadCommand = _interopRequireDefault(require("./ImageUploadCommand"));
|
|
23
23
|
|
|
24
|
-
var _IndentCommand = _interopRequireDefault(require("./IndentCommand"));
|
|
25
|
-
|
|
26
24
|
var _LinkSetURLCommand = _interopRequireDefault(require("./LinkSetURLCommand"));
|
|
27
25
|
|
|
28
26
|
var _ListItemInsertNewLineCommand = _interopRequireDefault(require("./ListItemInsertNewLineCommand"));
|
|
@@ -35,8 +33,6 @@ var _ListToggleCommand = require("./ListToggleCommand");
|
|
|
35
33
|
|
|
36
34
|
var MarkNames = _interopRequireWildcard(require("./MarkNames"));
|
|
37
35
|
|
|
38
|
-
var _MarkToggleCommand = _interopRequireDefault(require("./MarkToggleCommand"));
|
|
39
|
-
|
|
40
36
|
var _MarksClearCommand = _interopRequireDefault(require("./MarksClearCommand"));
|
|
41
37
|
|
|
42
38
|
var _MathEditCommand = _interopRequireDefault(require("./MathEditCommand"));
|
|
@@ -51,16 +47,8 @@ var _TableInsertCommand = _interopRequireDefault(require("./TableInsertCommand")
|
|
|
51
47
|
|
|
52
48
|
var _TableMergeCellsCommand = _interopRequireDefault(require("./TableMergeCellsCommand"));
|
|
53
49
|
|
|
54
|
-
var _TextAlignCommand = _interopRequireDefault(require("./TextAlignCommand"));
|
|
55
|
-
|
|
56
|
-
var _TextColorCommand = _interopRequireDefault(require("./TextColorCommand"));
|
|
57
|
-
|
|
58
|
-
var _TextHighlightCommand = _interopRequireDefault(require("./TextHighlightCommand"));
|
|
59
|
-
|
|
60
50
|
var _TextInsertTabSpaceCommand = _interopRequireDefault(require("./TextInsertTabSpaceCommand"));
|
|
61
51
|
|
|
62
|
-
var _TextLineSpacingCommand = _interopRequireDefault(require("./TextLineSpacingCommand"));
|
|
63
|
-
|
|
64
52
|
var _createCommand = _interopRequireDefault(require("./createCommand"));
|
|
65
53
|
|
|
66
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -113,19 +101,19 @@ const CLEAR_FORMAT = new _MarksClearCommand.default();
|
|
|
113
101
|
exports.CLEAR_FORMAT = CLEAR_FORMAT;
|
|
114
102
|
const DOC_LAYOUT = new _DocLayoutCommand.default();
|
|
115
103
|
exports.DOC_LAYOUT = DOC_LAYOUT;
|
|
116
|
-
const EM = new
|
|
104
|
+
const EM = new _licitUiCommands.MarkToggleCommand(MARK_EM);
|
|
117
105
|
exports.EM = EM;
|
|
118
|
-
const H1 = new
|
|
106
|
+
const H1 = new _licitUiCommands.HeadingCommand(1);
|
|
119
107
|
exports.H1 = H1;
|
|
120
|
-
const H2 = new
|
|
108
|
+
const H2 = new _licitUiCommands.HeadingCommand(2);
|
|
121
109
|
exports.H2 = H2;
|
|
122
|
-
const H3 = new
|
|
110
|
+
const H3 = new _licitUiCommands.HeadingCommand(3);
|
|
123
111
|
exports.H3 = H3;
|
|
124
|
-
const H4 = new
|
|
112
|
+
const H4 = new _licitUiCommands.HeadingCommand(4);
|
|
125
113
|
exports.H4 = H4;
|
|
126
|
-
const H5 = new
|
|
114
|
+
const H5 = new _licitUiCommands.HeadingCommand(5);
|
|
127
115
|
exports.H5 = H5;
|
|
128
|
-
const H6 = new
|
|
116
|
+
const H6 = new _licitUiCommands.HeadingCommand(6);
|
|
129
117
|
exports.H6 = H6;
|
|
130
118
|
const HISTORY_REDO = new _HistoryRedoCommand.default();
|
|
131
119
|
exports.HISTORY_REDO = HISTORY_REDO;
|
|
@@ -137,9 +125,9 @@ const IMAGE_FROM_URL = new _ImageFromURLCommand.default();
|
|
|
137
125
|
exports.IMAGE_FROM_URL = IMAGE_FROM_URL;
|
|
138
126
|
const IMAGE_UPLOAD = new _ImageUploadCommand.default();
|
|
139
127
|
exports.IMAGE_UPLOAD = IMAGE_UPLOAD;
|
|
140
|
-
const INDENT_LESS = new
|
|
128
|
+
const INDENT_LESS = new _licitUiCommands.IndentCommand(-1);
|
|
141
129
|
exports.INDENT_LESS = INDENT_LESS;
|
|
142
|
-
const INDENT_MORE = new
|
|
130
|
+
const INDENT_MORE = new _licitUiCommands.IndentCommand(1);
|
|
143
131
|
exports.INDENT_MORE = INDENT_MORE;
|
|
144
132
|
const LINK_SET_URL = new _LinkSetURLCommand.default();
|
|
145
133
|
exports.LINK_SET_URL = LINK_SET_URL;
|
|
@@ -155,13 +143,13 @@ const MATH_EDIT = new _MathEditCommand.default();
|
|
|
155
143
|
exports.MATH_EDIT = MATH_EDIT;
|
|
156
144
|
const PRINT = new _PrintCommand.default();
|
|
157
145
|
exports.PRINT = PRINT;
|
|
158
|
-
const STRIKE = new
|
|
146
|
+
const STRIKE = new _licitUiCommands.MarkToggleCommand(MARK_STRIKE);
|
|
159
147
|
exports.STRIKE = STRIKE;
|
|
160
|
-
const STRONG = new
|
|
148
|
+
const STRONG = new _licitUiCommands.MarkToggleCommand(MARK_STRONG);
|
|
161
149
|
exports.STRONG = STRONG;
|
|
162
|
-
const SUPER = new
|
|
150
|
+
const SUPER = new _licitUiCommands.MarkToggleCommand(MARK_SUPER);
|
|
163
151
|
exports.SUPER = SUPER;
|
|
164
|
-
const SUB = new
|
|
152
|
+
const SUB = new _licitUiCommands.MarkToggleCommand(MARK_SUB);
|
|
165
153
|
exports.SUB = SUB;
|
|
166
154
|
const TABLE_ADD_COLUMN_AFTER = (0, _createCommand.default)(addColumnAfter);
|
|
167
155
|
exports.TABLE_ADD_COLUMN_AFTER = TABLE_ADD_COLUMN_AFTER;
|
|
@@ -197,25 +185,25 @@ const TABLE_TOGGLE_HEADER_COLUMN = (0, _createCommand.default)(toggleHeaderColum
|
|
|
197
185
|
exports.TABLE_TOGGLE_HEADER_COLUMN = TABLE_TOGGLE_HEADER_COLUMN;
|
|
198
186
|
const TABLE_TOGGLE_HEADER_ROW = (0, _createCommand.default)(toggleHeaderRow);
|
|
199
187
|
exports.TABLE_TOGGLE_HEADER_ROW = TABLE_TOGGLE_HEADER_ROW;
|
|
200
|
-
const TEXT_ALIGN_CENTER = new
|
|
188
|
+
const TEXT_ALIGN_CENTER = new _licitUiCommands.TextAlignCommand('center');
|
|
201
189
|
exports.TEXT_ALIGN_CENTER = TEXT_ALIGN_CENTER;
|
|
202
|
-
const TEXT_ALIGN_JUSTIFY = new
|
|
190
|
+
const TEXT_ALIGN_JUSTIFY = new _licitUiCommands.TextAlignCommand('justify');
|
|
203
191
|
exports.TEXT_ALIGN_JUSTIFY = TEXT_ALIGN_JUSTIFY;
|
|
204
|
-
const TEXT_ALIGN_LEFT = new
|
|
192
|
+
const TEXT_ALIGN_LEFT = new _licitUiCommands.TextAlignCommand('left');
|
|
205
193
|
exports.TEXT_ALIGN_LEFT = TEXT_ALIGN_LEFT;
|
|
206
|
-
const TEXT_ALIGN_RIGHT = new
|
|
194
|
+
const TEXT_ALIGN_RIGHT = new _licitUiCommands.TextAlignCommand('right');
|
|
207
195
|
exports.TEXT_ALIGN_RIGHT = TEXT_ALIGN_RIGHT;
|
|
208
|
-
const TEXT_COLOR = new
|
|
196
|
+
const TEXT_COLOR = new _licitUiCommands.TextColorCommand();
|
|
209
197
|
exports.TEXT_COLOR = TEXT_COLOR;
|
|
210
|
-
const TEXT_HIGHLIGHT = new
|
|
198
|
+
const TEXT_HIGHLIGHT = new _licitUiCommands.TextHighlightCommand();
|
|
211
199
|
exports.TEXT_HIGHLIGHT = TEXT_HIGHLIGHT;
|
|
212
200
|
const TEXT_INSERT_TAB_SPACE = new _TextInsertTabSpaceCommand.default();
|
|
213
201
|
exports.TEXT_INSERT_TAB_SPACE = TEXT_INSERT_TAB_SPACE;
|
|
214
202
|
|
|
215
|
-
const TEXT_LINE_SPACINGS =
|
|
203
|
+
const TEXT_LINE_SPACINGS = _licitUiCommands.TextLineSpacingCommand.createGroup();
|
|
216
204
|
|
|
217
205
|
exports.TEXT_LINE_SPACINGS = TEXT_LINE_SPACINGS;
|
|
218
206
|
const UL = new _ListToggleCommand.ListToggleCommand(false, '');
|
|
219
207
|
exports.UL = UL;
|
|
220
|
-
const UNDERLINE = new
|
|
208
|
+
const UNDERLINE = new _licitUiCommands.MarkToggleCommand(MARK_UNDERLINE);
|
|
221
209
|
exports.UNDERLINE = UNDERLINE;
|
|
@@ -5,20 +5,20 @@ import * as ProsemirrorTables from 'prosemirror-tables';
|
|
|
5
5
|
// import BlockquoteInsertNewLineCommand from './BlockquoteInsertNewLineCommand';
|
|
6
6
|
// import BlockquoteToggleCommand from './BlockquoteToggleCommand';
|
|
7
7
|
import DocLayoutCommand from './DocLayoutCommand';
|
|
8
|
-
import HeadingCommand from '
|
|
8
|
+
import { HeadingCommand } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
import HistoryRedoCommand from './HistoryRedoCommand';
|
|
10
10
|
import HistoryUndoCommand from './HistoryUndoCommand';
|
|
11
11
|
import HorizontalRuleCommand from './HorizontalRuleCommand';
|
|
12
12
|
import ImageFromURLCommand from './ImageFromURLCommand';
|
|
13
13
|
import ImageUploadCommand from './ImageUploadCommand';
|
|
14
|
-
import IndentCommand from '
|
|
14
|
+
import { IndentCommand } from '@modusoperandi/licit-ui-commands';
|
|
15
15
|
import LinkSetURLCommand from './LinkSetURLCommand';
|
|
16
16
|
import ListItemInsertNewLineCommand from './ListItemInsertNewLineCommand';
|
|
17
17
|
import ListItemMergeCommand from './ListItemMergeCommand';
|
|
18
18
|
import ListSplitCommand from './ListSplitCommand';
|
|
19
19
|
import { ListToggleCommand } from './ListToggleCommand';
|
|
20
20
|
import * as MarkNames from './MarkNames';
|
|
21
|
-
import MarkToggleCommand from '
|
|
21
|
+
import { MarkToggleCommand } from '@modusoperandi/licit-ui-commands';
|
|
22
22
|
import MarksClearCommand from './MarksClearCommand';
|
|
23
23
|
import MathEditCommand from './MathEditCommand';
|
|
24
24
|
import PrintCommand from './PrintCommand';
|
|
@@ -26,11 +26,11 @@ import TableBackgroundColorCommand from './TableBackgroundColorCommand';
|
|
|
26
26
|
import TableBorderColorCommand from './TableBorderColorCommand';
|
|
27
27
|
import TableInsertCommand from './TableInsertCommand';
|
|
28
28
|
import TableMergeCellsCommand from './TableMergeCellsCommand';
|
|
29
|
-
import TextAlignCommand from '
|
|
30
|
-
import TextColorCommand from '
|
|
31
|
-
import TextHighlightCommand from '
|
|
29
|
+
import { TextAlignCommand } from '@modusoperandi/licit-ui-commands';
|
|
30
|
+
import { TextColorCommand } from '@modusoperandi/licit-ui-commands';
|
|
31
|
+
import { TextHighlightCommand } from '@modusoperandi/licit-ui-commands';
|
|
32
32
|
import TextInsertTabSpaceCommand from './TextInsertTabSpaceCommand';
|
|
33
|
-
import TextLineSpacingCommand from '
|
|
33
|
+
import { TextLineSpacingCommand } from '@modusoperandi/licit-ui-commands';
|
|
34
34
|
import createCommand from './createCommand';
|
|
35
35
|
|
|
36
36
|
const {
|
package/dist/EditorKeyMap.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.findShortcutByKeymap = findShortcutByKeymap;
|
|
6
|
+
exports.KEY_UNDO = exports.KEY_TOGGLE_UNDERLINE = exports.KEY_TOGGLE_STRIKETHROUGH = exports.KEY_TOGGLE_ORDERED_LIST = exports.KEY_TOGGLE_MONOSPACE = exports.KEY_TOGGLE_ITALIC = exports.KEY_TOGGLE_HEADING_6 = exports.KEY_TOGGLE_HEADING_5 = exports.KEY_TOGGLE_HEADING_4 = exports.KEY_TOGGLE_HEADING_3 = exports.KEY_TOGGLE_HEADING_2 = exports.KEY_TOGGLE_HEADING_1 = exports.KEY_TOGGLE_CODE_BLOCK = exports.KEY_TOGGLE_BULLET_LIST = exports.KEY_TOGGLE_BOLD = exports.KEY_TOGGLE_BLOCK_QUOTE = exports.KEY_TAB_SHIFT = exports.KEY_TAB = exports.KEY_SPLIT_LIST_ITEM = exports.KEY_SPLIT_CODEBLOCK = exports.KEY_SHIFT_BACKSPACE = exports.KEY_SET_NORMAL_TEXT = exports.KEY_REDO = exports.KEY_INSERT_NEW_LINE_IN_LIST_ITEM = exports.KEY_INSERT_NEW_LINE = exports.KEY_INSERT_HORIZONTAL_RULE = exports.KEY_FORWARD_DELETE = exports.KEY_BACK_DELETE = exports.ALL_KEYS = void 0;
|
|
8
7
|
exports.findKeymapByDescription = findKeymapByDescription;
|
|
9
8
|
exports.findShortcutByDescription = findShortcutByDescription;
|
|
10
|
-
exports.
|
|
9
|
+
exports.findShortcutByKeymap = findShortcutByKeymap;
|
|
10
|
+
exports.tooltip = tooltip;
|
|
11
11
|
|
|
12
12
|
var _browserkeymap = _interopRequireDefault(require("browserkeymap"));
|
|
13
13
|
|
package/dist/FontTypeMarkSpec.js
CHANGED
package/dist/HeadingNodeSpec.js
CHANGED
|
@@ -15,9 +15,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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
17
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
19
|
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
21
|
|
|
22
22
|
function _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; }
|
|
23
23
|
|
|
@@ -21,12 +21,10 @@ var _NodeNames = require("./NodeNames");
|
|
|
21
21
|
|
|
22
22
|
var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
25
25
|
|
|
26
26
|
var _Types = require("./Types");
|
|
27
27
|
|
|
28
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
28
|
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); }
|
|
31
29
|
|
|
32
30
|
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; }
|
|
@@ -93,7 +91,7 @@ class ImageSourceCommand extends _licitDocAttrsStep.UICommand {
|
|
|
93
91
|
const props = {
|
|
94
92
|
runtime: view ? view.runtime : null
|
|
95
93
|
};
|
|
96
|
-
this._popUp = (0,
|
|
94
|
+
this._popUp = (0, _licitUiCommands.createPopUp)(this.getEditor(), props, {
|
|
97
95
|
modal: true,
|
|
98
96
|
onClose: val => {
|
|
99
97
|
if (this._popUp) {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from './CursorPlaceholderPlugin';
|
|
13
13
|
import { IMAGE } from './NodeNames';
|
|
14
14
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
15
|
-
import createPopUp from '
|
|
15
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
16
16
|
|
|
17
17
|
import type { ImageLike } from './Types';
|
|
18
18
|
|
|
@@ -15,16 +15,12 @@ var _MarkNames = require("./MarkNames");
|
|
|
15
15
|
|
|
16
16
|
var _SelectionPlaceholderPlugin = require("./SelectionPlaceholderPlugin");
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _findNodesWithSameMark = _interopRequireDefault(require("./findNodesWithSameMark"));
|
|
18
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
21
19
|
|
|
22
20
|
var _LinkURLEditor = _interopRequireDefault(require("./ui/LinkURLEditor"));
|
|
23
21
|
|
|
24
22
|
var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
25
23
|
|
|
26
|
-
var _createPopUp = _interopRequireDefault(require("./ui/createPopUp"));
|
|
27
|
-
|
|
28
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
25
|
|
|
30
26
|
function _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; }
|
|
@@ -78,10 +74,10 @@ class LinkSetURLCommand extends _licitDocAttrsStep.UICommand {
|
|
|
78
74
|
from,
|
|
79
75
|
to
|
|
80
76
|
} = selection;
|
|
81
|
-
const result = (0,
|
|
77
|
+
const result = (0, _licitUiCommands.findNodesWithSameMark)(doc, from, to, markType);
|
|
82
78
|
const href = result ? result.mark.attrs.href : null;
|
|
83
79
|
return new Promise(resolve => {
|
|
84
|
-
this._popUp = (0,
|
|
80
|
+
this._popUp = (0, _licitUiCommands.createPopUp)(_LinkURLEditor.default, {
|
|
85
81
|
href
|
|
86
82
|
}, {
|
|
87
83
|
modal: true,
|
|
@@ -112,7 +108,7 @@ class LinkSetURLCommand extends _licitDocAttrsStep.UICommand {
|
|
|
112
108
|
const attrs = href ? {
|
|
113
109
|
href
|
|
114
110
|
} : null;
|
|
115
|
-
tr = (0,
|
|
111
|
+
tr = (0, _licitUiCommands.applyMark)(tr.setSelection(state.selection), schema, markType, attrs);
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
dispatch(tr);
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
hideSelectionPlaceholder,
|
|
11
11
|
showSelectionPlaceholder,
|
|
12
12
|
} from './SelectionPlaceholderPlugin';
|
|
13
|
-
import applyMark from '
|
|
14
|
-
import findNodesWithSameMark from '
|
|
13
|
+
import { applyMark } from '@modusoperandi/licit-ui-commands';
|
|
14
|
+
import { findNodesWithSameMark } from '@modusoperandi/licit-ui-commands';
|
|
15
15
|
import LinkURLEditor from './ui/LinkURLEditor';
|
|
16
16
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
17
|
-
import createPopUp from '
|
|
17
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
18
18
|
|
|
19
19
|
class LinkSetURLCommand extends UICommand {
|
|
20
20
|
_popUp = null;
|
|
@@ -13,9 +13,7 @@ var _MarkNames = require("./MarkNames");
|
|
|
13
13
|
|
|
14
14
|
var _SelectionPlaceholderPlugin = require("./SelectionPlaceholderPlugin");
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _findNodesWithSameMark = _interopRequireDefault(require("./findNodesWithSameMark"));
|
|
16
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
19
17
|
|
|
20
18
|
var _lookUpElement = _interopRequireDefault(require("./lookUpElement"));
|
|
21
19
|
|
|
@@ -23,11 +21,7 @@ var _LinkTooltip = _interopRequireDefault(require("./ui/LinkTooltip"));
|
|
|
23
21
|
|
|
24
22
|
var _LinkURLEditor = _interopRequireDefault(require("./ui/LinkURLEditor"));
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _createPopUp = _interopRequireDefault(require("./ui/createPopUp"));
|
|
29
|
-
|
|
30
|
-
require("./ui/czi-pop-up.css");
|
|
24
|
+
require("@modusoperandi/licit-ui-commands/dist/ui/czi-pop-up.css");
|
|
31
25
|
|
|
32
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
27
|
|
|
@@ -89,7 +83,7 @@ class LinkTooltipView {
|
|
|
89
83
|
to
|
|
90
84
|
} = selection;
|
|
91
85
|
const markType = schema.marks[_MarkNames.MARK_LINK];
|
|
92
|
-
const result = (0,
|
|
86
|
+
const result = (0, _licitUiCommands.findNodesWithSameMark)(doc, from, to, markType);
|
|
93
87
|
|
|
94
88
|
if (!result) {
|
|
95
89
|
return;
|
|
@@ -105,7 +99,7 @@ class LinkTooltipView {
|
|
|
105
99
|
tr = (0, _SelectionPlaceholderPlugin.showSelectionPlaceholder)(state, tr);
|
|
106
100
|
view.dispatch(tr);
|
|
107
101
|
const href = result.mark.attrs.href;
|
|
108
|
-
this._editor = (0,
|
|
102
|
+
this._editor = (0, _licitUiCommands.createPopUp)(_LinkURLEditor.default, {
|
|
109
103
|
href
|
|
110
104
|
}, {
|
|
111
105
|
onClose: value => {
|
|
@@ -134,7 +128,7 @@ class LinkTooltipView {
|
|
|
134
128
|
const markType = schema.marks[_MarkNames.MARK_LINK];
|
|
135
129
|
|
|
136
130
|
if (markType) {
|
|
137
|
-
const result = (0,
|
|
131
|
+
const result = (0, _licitUiCommands.findNodesWithSameMark)(tr.doc, initialSelection.from, initialSelection.to, markType);
|
|
138
132
|
|
|
139
133
|
if (result) {
|
|
140
134
|
const linkSelection = _prosemirrorState.TextSelection.create(tr.doc, result.from.pos, result.to.pos + 1);
|
|
@@ -143,7 +137,7 @@ class LinkTooltipView {
|
|
|
143
137
|
const attrs = href ? {
|
|
144
138
|
href
|
|
145
139
|
} : null;
|
|
146
|
-
tr = (0,
|
|
140
|
+
tr = (0, _licitUiCommands.applyMark)(tr, schema, markType, attrs); // [FS] IRAD-1005 2020-07-09
|
|
147
141
|
// Upgrade outdated packages.
|
|
148
142
|
// reset selection to original using the latest doc.
|
|
149
143
|
|
|
@@ -185,7 +179,7 @@ class LinkTooltipView {
|
|
|
185
179
|
from,
|
|
186
180
|
to
|
|
187
181
|
} = selection;
|
|
188
|
-
const result = (0,
|
|
182
|
+
const result = (0, _licitUiCommands.findNodesWithSameMark)(doc, from, to, markType);
|
|
189
183
|
|
|
190
184
|
if (!result) {
|
|
191
185
|
this.destroy();
|
|
@@ -221,11 +215,11 @@ class LinkTooltipView {
|
|
|
221
215
|
} else {
|
|
222
216
|
popup && popup.close();
|
|
223
217
|
this._anchorEl = anchorEl;
|
|
224
|
-
this._popup = (0,
|
|
218
|
+
this._popup = (0, _licitUiCommands.createPopUp)(_LinkTooltip.default, viewPops, {
|
|
225
219
|
anchor: anchorEl,
|
|
226
220
|
autoDismiss: false,
|
|
227
221
|
onClose: this._onClose,
|
|
228
|
-
position:
|
|
222
|
+
position: _licitUiCommands.atAnchorTopCenter
|
|
229
223
|
});
|
|
230
224
|
}
|
|
231
225
|
}
|