@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
|
@@ -9,12 +9,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
13
13
|
|
|
14
14
|
var _LoadingIndicator = _interopRequireDefault(require("./LoadingIndicator"));
|
|
15
15
|
|
|
16
|
-
var _preventEventDefault = _interopRequireDefault(require("./preventEventDefault"));
|
|
17
|
-
|
|
18
16
|
var _uuid = _interopRequireDefault(require("./uuid"));
|
|
19
17
|
|
|
20
18
|
require("./czi-form.css");
|
|
@@ -130,7 +128,7 @@ class ImageUploadEditor extends React.PureComponent {
|
|
|
130
128
|
className: className
|
|
131
129
|
}, /*#__PURE__*/React.createElement("form", {
|
|
132
130
|
className: "czi-form",
|
|
133
|
-
onSubmit:
|
|
131
|
+
onSubmit: _licitUiCommands.preventEventDefault
|
|
134
132
|
}, /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement("legend", null, "Upload Image"), /*#__PURE__*/React.createElement("div", {
|
|
135
133
|
className: "czi-image-upload-editor-body"
|
|
136
134
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -145,7 +143,7 @@ class ImageUploadEditor extends React.PureComponent {
|
|
|
145
143
|
type: "file"
|
|
146
144
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
147
145
|
className: "czi-form-buttons"
|
|
148
|
-
}, /*#__PURE__*/React.createElement(
|
|
146
|
+
}, /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
149
147
|
label: "Cancel",
|
|
150
148
|
onClick: this._cancel
|
|
151
149
|
}))));
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
|
-
import CustomButton from '
|
|
6
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
7
7
|
import LoadingIndicator from './LoadingIndicator';
|
|
8
|
-
import preventEventDefault from '
|
|
8
|
+
import { preventEventDefault } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
import uuid from './uuid';
|
|
10
10
|
|
|
11
11
|
import './czi-form.css';
|
package/dist/ui/LinkTooltip.js
CHANGED
|
@@ -13,7 +13,7 @@ var _smoothScrollIntoViewIfNeeded = _interopRequireDefault(require("smooth-scrol
|
|
|
13
13
|
|
|
14
14
|
var _sanitizeURL = _interopRequireDefault(require("../sanitizeURL"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
17
17
|
|
|
18
18
|
require("./czi-link-tooltip.css");
|
|
19
19
|
|
|
@@ -88,18 +88,18 @@ class LinkTooltip extends React.PureComponent {
|
|
|
88
88
|
className: "czi-link-tooltip-body"
|
|
89
89
|
}, /*#__PURE__*/React.createElement("div", {
|
|
90
90
|
className: "czi-link-tooltip-row"
|
|
91
|
-
}, /*#__PURE__*/React.createElement(
|
|
91
|
+
}, /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
92
92
|
className: "czi-link-tooltip-href",
|
|
93
93
|
label: href,
|
|
94
94
|
onClick: this._openLink,
|
|
95
95
|
target: "new",
|
|
96
96
|
title: href,
|
|
97
97
|
value: href
|
|
98
|
-
}), /*#__PURE__*/React.createElement(
|
|
98
|
+
}), /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
99
99
|
label: "Change",
|
|
100
100
|
onClick: onEdit,
|
|
101
101
|
value: editorView
|
|
102
|
-
}), /*#__PURE__*/React.createElement(
|
|
102
|
+
}), /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
103
103
|
label: "Remove",
|
|
104
104
|
onClick: onRemove,
|
|
105
105
|
value: editorView
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import scrollIntoView from 'smooth-scroll-into-view-if-needed';
|
|
6
6
|
|
|
7
7
|
import sanitizeURL from '../sanitizeURL';
|
|
8
|
-
import CustomButton from '
|
|
8
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
|
|
10
10
|
import './czi-link-tooltip.css';
|
|
11
11
|
|
package/dist/ui/LinkURLEditor.js
CHANGED
|
@@ -11,12 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _sanitizeURL = _interopRequireDefault(require("../sanitizeURL"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
15
15
|
|
|
16
16
|
var _KeyCodes = require("./KeyCodes");
|
|
17
17
|
|
|
18
|
-
var _preventEventDefault = _interopRequireDefault(require("./preventEventDefault"));
|
|
19
|
-
|
|
20
18
|
require("./czi-form.css");
|
|
21
19
|
|
|
22
20
|
require("./czi-image-url-editor.css");
|
|
@@ -91,7 +89,7 @@ class LinkURLEditor extends React.PureComponent {
|
|
|
91
89
|
className: "czi-image-url-editor"
|
|
92
90
|
}, /*#__PURE__*/React.createElement("form", {
|
|
93
91
|
className: "czi-form",
|
|
94
|
-
onSubmit:
|
|
92
|
+
onSubmit: _licitUiCommands.preventEventDefault
|
|
95
93
|
}, /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement("legend", null, "Add a Link"), /*#__PURE__*/React.createElement("input", {
|
|
96
94
|
autoFocus: true,
|
|
97
95
|
onChange: this._onURLChange,
|
|
@@ -102,10 +100,10 @@ class LinkURLEditor extends React.PureComponent {
|
|
|
102
100
|
value: url || ''
|
|
103
101
|
})), /*#__PURE__*/React.createElement("div", {
|
|
104
102
|
className: "czi-form-buttons"
|
|
105
|
-
}, /*#__PURE__*/React.createElement(
|
|
103
|
+
}, /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
106
104
|
label: "Cancel",
|
|
107
105
|
onClick: this._cancel
|
|
108
|
-
}), /*#__PURE__*/React.createElement(
|
|
106
|
+
}), /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
109
107
|
active: true,
|
|
110
108
|
disabled: disabled,
|
|
111
109
|
label: label,
|
|
@@ -4,9 +4,9 @@ import * as React from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
6
|
import sanitizeURL from '../sanitizeURL';
|
|
7
|
-
import CustomButton from '
|
|
7
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
8
8
|
import { ENTER } from './KeyCodes';
|
|
9
|
-
import preventEventDefault from '
|
|
9
|
+
import { preventEventDefault } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
|
|
11
11
|
import './czi-form.css';
|
|
12
12
|
import './czi-image-url-editor.css';
|
|
@@ -15,12 +15,10 @@ var _prosemirrorView = require("prosemirror-view");
|
|
|
15
15
|
|
|
16
16
|
var React = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
19
19
|
|
|
20
20
|
var _licitDocAttrsStep = require("@modusoperandi/licit-doc-attrs-step");
|
|
21
21
|
|
|
22
|
-
var _createPopUp = _interopRequireDefault(require("./createPopUp"));
|
|
23
|
-
|
|
24
22
|
var _uuid = _interopRequireDefault(require("./uuid"));
|
|
25
23
|
|
|
26
24
|
var _ListTypeMenu = _interopRequireDefault(require("./ListTypeMenu"));
|
|
@@ -33,9 +31,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
31
|
|
|
34
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
33
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
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; }
|
|
37
35
|
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
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; }
|
|
39
37
|
|
|
40
38
|
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; }
|
|
41
39
|
|
|
@@ -77,7 +75,7 @@ class ListTypeButton extends React.PureComponent {
|
|
|
77
75
|
if (menu) {
|
|
78
76
|
menu.update(menuProps);
|
|
79
77
|
} else {
|
|
80
|
-
this._menu = (0,
|
|
78
|
+
this._menu = (0, _licitUiCommands.createPopUp)(_ListTypeMenu.default, menuProps, {
|
|
81
79
|
anchor: document.getElementById(this._id),
|
|
82
80
|
onClose: this._onClose
|
|
83
81
|
});
|
|
@@ -134,7 +132,7 @@ class ListTypeButton extends React.PureComponent {
|
|
|
134
132
|
'czi-custom-menu-button': true,
|
|
135
133
|
expanded
|
|
136
134
|
});
|
|
137
|
-
return /*#__PURE__*/React.createElement(
|
|
135
|
+
return /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
138
136
|
className: buttonClassName,
|
|
139
137
|
disabled: !enabled,
|
|
140
138
|
icon: icon,
|
|
@@ -8,9 +8,9 @@ import { EditorState } from 'prosemirror-state';
|
|
|
8
8
|
import { Transform } from 'prosemirror-transform';
|
|
9
9
|
import { EditorView } from 'prosemirror-view';
|
|
10
10
|
import * as React from 'react';
|
|
11
|
-
import CustomButton from '
|
|
11
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
12
12
|
import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
|
|
13
|
-
import createPopUp from '
|
|
13
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
14
14
|
import uuid from './uuid';
|
|
15
15
|
import ListTypeMenu from './ListTypeMenu';
|
|
16
16
|
import './czi-custom-menu-button.css';
|
package/dist/ui/MathEditor.js
CHANGED
|
@@ -9,12 +9,10 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
13
13
|
|
|
14
14
|
var _MathQuillEditor = _interopRequireDefault(require("./mathquill-editor/MathQuillEditor"));
|
|
15
15
|
|
|
16
|
-
var _preventEventDefault = _interopRequireDefault(require("./preventEventDefault"));
|
|
17
|
-
|
|
18
16
|
var _uuid = _interopRequireDefault(require("./uuid"));
|
|
19
17
|
|
|
20
18
|
require("./czi-form.css");
|
|
@@ -64,16 +62,16 @@ class MathEditor extends React.PureComponent {
|
|
|
64
62
|
className: "czi-math-editor"
|
|
65
63
|
}, /*#__PURE__*/React.createElement("form", {
|
|
66
64
|
className: "czi-form",
|
|
67
|
-
onSubmit:
|
|
65
|
+
onSubmit: _licitUiCommands.preventEventDefault
|
|
68
66
|
}, /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement("legend", null, "Insert Math"), /*#__PURE__*/React.createElement(_MathQuillEditor.default, {
|
|
69
67
|
onChange: this._onChange,
|
|
70
68
|
value: value
|
|
71
69
|
})), /*#__PURE__*/React.createElement("div", {
|
|
72
70
|
className: "czi-form-buttons"
|
|
73
|
-
}, /*#__PURE__*/React.createElement(
|
|
71
|
+
}, /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
74
72
|
label: "Cancel",
|
|
75
73
|
onClick: this._cancel
|
|
76
|
-
}), /*#__PURE__*/React.createElement(
|
|
74
|
+
}), /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
77
75
|
active: true,
|
|
78
76
|
disabled: !this.state.value,
|
|
79
77
|
label: initialValue ? 'Update' : 'Insert',
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
|
-
import CustomButton from '
|
|
6
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
7
7
|
import MathQuillEditor from './mathquill-editor/MathQuillEditor';
|
|
8
|
-
import preventEventDefault from '
|
|
8
|
+
import { preventEventDefault } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
import uuid from './uuid';
|
|
10
10
|
|
|
11
11
|
import './czi-form.css';
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.bpfrpt_proptype_MathInlineEditorValue = void 0;
|
|
7
7
|
|
|
8
8
|
require("./czi-inline-editor.css");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
11
11
|
|
|
12
12
|
var _CustomEditorView = _interopRequireDefault(require("./CustomEditorView"));
|
|
13
13
|
|
|
@@ -15,8 +15,6 @@ var _MathEditor = _interopRequireDefault(require("./MathEditor"));
|
|
|
15
15
|
|
|
16
16
|
var React = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var _createPopUp = _interopRequireDefault(require("./createPopUp"));
|
|
19
|
-
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
22
20
|
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,9 +23,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
23
|
|
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
25
|
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
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; }
|
|
29
27
|
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28
|
+
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; }
|
|
31
29
|
|
|
32
30
|
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; }
|
|
33
31
|
|
|
@@ -75,7 +73,7 @@ class MathInlineEditor extends React.PureComponent {
|
|
|
75
73
|
runtime: editorView ? editorView.runtime : null,
|
|
76
74
|
initialValue: value && value.latex || ''
|
|
77
75
|
};
|
|
78
|
-
this._popUp = (0,
|
|
76
|
+
this._popUp = (0, _licitUiCommands.createPopUp)(_MathEditor.default, props, {
|
|
79
77
|
autoDismiss: false,
|
|
80
78
|
modal: true,
|
|
81
79
|
onClose: latex => {
|
|
@@ -112,7 +110,7 @@ class MathInlineEditor extends React.PureComponent {
|
|
|
112
110
|
value,
|
|
113
111
|
text
|
|
114
112
|
} = MathAlignValues[key];
|
|
115
|
-
return /*#__PURE__*/React.createElement(
|
|
113
|
+
return /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
116
114
|
active: align === value,
|
|
117
115
|
key: key,
|
|
118
116
|
label: text,
|
|
@@ -122,7 +120,7 @@ class MathInlineEditor extends React.PureComponent {
|
|
|
122
120
|
});
|
|
123
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
124
122
|
className: "czi-inline-editor"
|
|
125
|
-
}, buttons, /*#__PURE__*/React.createElement(
|
|
123
|
+
}, buttons, /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
126
124
|
key: "edit",
|
|
127
125
|
label: "Edit",
|
|
128
126
|
onClick: this._editLatex,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import './czi-inline-editor.css';
|
|
4
|
-
import CustomButton from '
|
|
4
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
5
5
|
import CustomEditorView from './CustomEditorView';
|
|
6
6
|
import MathEditor from './MathEditor';
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import createPopUp from '
|
|
8
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
9
9
|
|
|
10
10
|
const MathAlignValues = {
|
|
11
11
|
NONE: {
|
package/dist/ui/MathNodeView.js
CHANGED
|
@@ -13,7 +13,7 @@ var _MathInlineEditor = _interopRequireDefault(require("./MathInlineEditor"));
|
|
|
13
13
|
|
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
17
17
|
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
|
|
@@ -27,8 +27,6 @@ var _EditorFrameset = require("./EditorFrameset");
|
|
|
27
27
|
|
|
28
28
|
var _prosemirrorModel = require("prosemirror-model");
|
|
29
29
|
|
|
30
|
-
var _PopUpPosition = require("./PopUpPosition");
|
|
31
|
-
|
|
32
30
|
var _prosemirrorState = require("prosemirror-state");
|
|
33
31
|
|
|
34
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -37,9 +35,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
37
35
|
|
|
38
36
|
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; }
|
|
39
37
|
|
|
40
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
38
|
+
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; }
|
|
41
39
|
|
|
42
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
40
|
+
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; }
|
|
43
41
|
|
|
44
42
|
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; }
|
|
45
43
|
|
|
@@ -184,11 +182,11 @@ class MathViewBody extends React.PureComponent {
|
|
|
184
182
|
if (this._inlineEditor) {
|
|
185
183
|
this._inlineEditor.update(editorProps);
|
|
186
184
|
} else {
|
|
187
|
-
this._inlineEditor = (0,
|
|
185
|
+
this._inlineEditor = (0, _licitUiCommands.createPopUp)(_MathInlineEditor.default, editorProps, {
|
|
188
186
|
anchor: el,
|
|
189
187
|
autoDismiss: false,
|
|
190
188
|
container: el.closest(`.${_EditorFrameset.FRAMESET_BODY_CLASSNAME}`),
|
|
191
|
-
position:
|
|
189
|
+
position: _licitUiCommands.atAnchorBottomCenter,
|
|
192
190
|
onClose: () => {
|
|
193
191
|
this._inlineEditor = null;
|
|
194
192
|
}
|
|
@@ -4,14 +4,14 @@ import './czi-math-view.css';
|
|
|
4
4
|
import CustomNodeView from './CustomNodeView';
|
|
5
5
|
import MathInlineEditor from './MathInlineEditor';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import createPopUp from '
|
|
7
|
+
import { createPopUp } from '@modusoperandi/licit-ui-commands';
|
|
8
8
|
import cx from 'classnames';
|
|
9
9
|
import renderLaTeXAsHTML from './renderLaTeXAsHTML';
|
|
10
10
|
import uuid from './uuid';
|
|
11
11
|
import { Decoration } from 'prosemirror-view';
|
|
12
12
|
import { FRAMESET_BODY_CLASSNAME } from './EditorFrameset';
|
|
13
13
|
import { Node } from 'prosemirror-model';
|
|
14
|
-
import { atAnchorBottomCenter } from '
|
|
14
|
+
import { atAnchorBottomCenter } from '@modusoperandi/licit-ui-commands';
|
|
15
15
|
import { NodeSelection } from 'prosemirror-state';
|
|
16
16
|
|
|
17
17
|
import type { NodeViewProps } from './CustomNodeView';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.default = exports.bpfrpt_proptype_ResizeObserverEntry = void 0;
|
|
6
7
|
exports.observe = observe;
|
|
7
8
|
exports.unobserve = unobserve;
|
|
8
|
-
exports.bpfrpt_proptype_ResizeObserverEntry = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.bpfrpt_proptype_TableGridSizeEditorValue = void 0;
|
|
7
7
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
|
|
@@ -11,12 +11,10 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
15
15
|
|
|
16
16
|
var _htmlElementToRect = _interopRequireDefault(require("./htmlElementToRect"));
|
|
17
17
|
|
|
18
|
-
var _rects = require("./rects");
|
|
19
|
-
|
|
20
18
|
require("./czi-table-grid-size-editor.css");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -97,7 +95,7 @@ class TableGridSizeEditor extends React.PureComponent {
|
|
|
97
95
|
const node = e.currentTarget;
|
|
98
96
|
|
|
99
97
|
if (node instanceof HTMLElement) {
|
|
100
|
-
const rect = (0,
|
|
98
|
+
const rect = (0, _licitUiCommands.fromHTMlElement)(node);
|
|
101
99
|
const mx = Math.round(e.clientX);
|
|
102
100
|
const my = Math.round(e.clientY);
|
|
103
101
|
this._ex = rect.x;
|
|
@@ -116,9 +114,9 @@ class TableGridSizeEditor extends React.PureComponent {
|
|
|
116
114
|
const el = this._ref && _reactDom.default.findDOMNode(this._ref);
|
|
117
115
|
|
|
118
116
|
const elRect = el ? (0, _htmlElementToRect.default)(el) : null;
|
|
119
|
-
const mouseRect = (0,
|
|
117
|
+
const mouseRect = (0, _licitUiCommands.fromXY)(e.screenX, e.screenY, 10);
|
|
120
118
|
|
|
121
|
-
if (elRect && mouseRect && (0,
|
|
119
|
+
if (elRect && mouseRect && (0, _licitUiCommands.isIntersected)(elRect, mouseRect, 50)) {
|
|
122
120
|
// This prevents `PopUpManager` from collapsing the editor.
|
|
123
121
|
e.preventDefault();
|
|
124
122
|
e.stopImmediatePropagation();
|
|
@@ -141,8 +139,8 @@ class TableGridSizeEditor extends React.PureComponent {
|
|
|
141
139
|
const my = this._my;
|
|
142
140
|
const x = mx - this._ex;
|
|
143
141
|
const y = my - this._ey;
|
|
144
|
-
const rr = (0,
|
|
145
|
-
const cc = (0,
|
|
142
|
+
const rr = (0, _licitUiCommands.clamp)(1, Math.ceil(y / (CELL_SIZE + GUTTER_SIZE)), MAX_SIZE);
|
|
143
|
+
const cc = (0, _licitUiCommands.clamp)(1, Math.ceil(x / (CELL_SIZE + GUTTER_SIZE)), MAX_SIZE);
|
|
146
144
|
const {
|
|
147
145
|
rows,
|
|
148
146
|
cols
|
|
@@ -4,9 +4,9 @@ import cx from 'classnames';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
|
|
7
|
-
import clamp from '
|
|
7
|
+
import { clamp } from '@modusoperandi/licit-ui-commands';
|
|
8
8
|
import htmlElementToRect from './htmlElementToRect';
|
|
9
|
-
import { fromHTMlElement, fromXY, isIntersected } from '
|
|
9
|
+
import { fromHTMlElement, fromXY, isIntersected } from '@modusoperandi/licit-ui-commands';
|
|
10
10
|
|
|
11
11
|
import './czi-table-grid-size-editor.css';
|
|
12
12
|
|
package/dist/ui/czi-vars.css
CHANGED
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
--czi-blockquote-background-color: rgba(0, 0, 0, 0.05);
|
|
3
|
-
--czi-blockquote-border: solid 8px rgba(0, 0, 0, 0.6);
|
|
4
|
-
--czi-blockquote-color: #555;
|
|
5
|
-
--czi-blockquote-font-family: 'Open Sans';
|
|
6
|
-
--czi-border-blue: solid 1px #5882eb;
|
|
7
|
-
--czi-border-grey: solid 1px #ccc;
|
|
8
|
-
--czi-border-red: solid 1px #f00;
|
|
9
|
-
--czi-button-hover-background-color: rgba(0, 0, 0, 0.05);
|
|
10
|
-
--czi-button-radius: 5px;
|
|
11
|
-
--czi-button-text-color: #666;
|
|
12
|
-
--czi-color-grey-200: rgba(0, 0, 0, 0.46);
|
|
13
|
-
--czi-font-family: helvetica;
|
|
14
|
-
--czi-font-size-small: 12px;
|
|
15
|
-
--czi-font-size: 13px;
|
|
16
|
-
--czi-link-color: rgb(0, 0, 238);
|
|
17
|
-
--czi-overlay-radius: 3px;
|
|
18
|
-
--czi-overlay-shadow: 0 1px 2px rgba(0, 0, 0, 0.46);
|
|
19
|
-
--czi-page-background-color: #e6e6e6;
|
|
20
|
-
--czi-page-background-color: #e6e6e6;
|
|
21
|
-
--czi-placeholder-text-color: #dedede;
|
|
22
|
-
--czi-selection-highlight-color-dark: rgba(152, 204, 253, 0.8);
|
|
23
|
-
--czi-selection-highlight-color: rgba(152, 204, 253, 0.4);
|
|
24
|
-
--czi-table-header-background-color: rgba(0, 0, 0, 0.05);
|
|
25
|
-
--czi-table-border-color: #000;
|
|
26
|
-
--czi-doc-padding-default: 14.5mm;
|
|
27
|
-
--czi-doc-width-us-letter-portrait: 216mm;
|
|
28
|
-
--czi-doc-width-us-letter-landscape: 279mm;
|
|
29
|
-
--czi-doc-width-a4-portrait: 210mm;
|
|
30
|
-
--czi-doc-width-a4-landscape: 297mm;
|
|
31
|
-
--czi-doc-width-us-desktop-screen-4-3: 120vh;
|
|
32
|
-
--czi-doc-width-us-desktop-screen-16-9: 142vh;
|
|
1
|
+
@import '../../node_modules/@modusoperandi/licit-ui-commands/dist/ui/czi-vars.css';
|
|
33
2
|
|
|
34
|
-
/* content styles */
|
|
35
|
-
--czi-content-body-background-color: #fff;
|
|
36
|
-
--czi-content-font-color: #000;
|
|
37
|
-
--czi-content-font-family: arial;
|
|
38
|
-
--czi-content-font-size-h1: 18px;
|
|
39
|
-
--czi-content-font-size-h2: 16px;
|
|
40
|
-
--czi-content-font-size-h3: 13px;
|
|
41
|
-
--czi-content-font-size: 11pt;
|
|
42
|
-
|
|
43
|
-
/* This maps to the default line spacing value of 1.5 in Google Doc */
|
|
44
|
-
--czi-content-line-height: 138%;
|
|
45
|
-
--czi-content-link-color: rgb(0, 0, 238);
|
|
46
|
-
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = isElementFullyVisible;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
9
9
|
|
|
10
10
|
function isElementFullyVisible(el) {
|
|
11
11
|
const {
|
|
@@ -13,7 +13,7 @@ function isElementFullyVisible(el) {
|
|
|
13
13
|
y,
|
|
14
14
|
w,
|
|
15
15
|
h
|
|
16
|
-
} = (0,
|
|
16
|
+
} = (0, _licitUiCommands.fromHTMlElement)(el); // Only checks the top-left point.
|
|
17
17
|
|
|
18
18
|
const nwEl = w && h ? el.ownerDocument.elementFromPoint(x + 1, y + 1) : null;
|
|
19
19
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.bpfrpt_proptype_SymbolDefination = exports.bpfrpt_proptype_MathQuillEditorSymbol = exports.
|
|
6
|
+
exports.bpfrpt_proptype_SymbolDefination = exports.bpfrpt_proptype_MathQuillEditorSymbol = exports.VERT = exports.VDASH = exports.UNION = exports.UNDERLINE = exports.TRIG = exports.TRIANGLE = exports.TIMES = exports.THETA = exports.TAN = exports.SYMBOLS = exports.SUPERSETEQ = exports.SUPERSET = exports.SUM = exports.SUBSETEQ = exports.SUBSET = exports.SUBSCRIPT = exports.STRUCTURE = exports.SQRT2 = exports.SQRT = exports.SQR = exports.SMALLE = exports.SIN = exports.SIMEQ = exports.SIM = exports.POWER = exports.PM = exports.PLUS = exports.PI = exports.PHI = exports.PERP = exports.PARENS = exports.OVERLINE = exports.OPERATORS = exports.NEQ = exports.MINUS = exports.LTE = exports.LT = exports.LOG_E = exports.INTXY = exports.INTERSECT = exports.INT = exports.INFINITY = exports.IMAGINARY = exports.GTE = exports.GT = exports.FRAC = exports.EQUAL = exports.DOTM = exports.DOLLAR = exports.DIVIDE = exports.DEGREES = exports.CTIMES = exports.COS = exports.CONG = exports.CENT = exports.BRACKETS = exports.ARROWRL = exports.ARROWLLR = exports.ARROWLL = exports.ARCTAN = exports.ARCSIN = exports.ARCCOS = exports.APPROX = exports.ANGLE = exports.ABSOLUTE = void 0;
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
@@ -9,7 +9,7 @@ var _renderLaTeXAsHTML = _interopRequireDefault(require("../renderLaTeXAsHTML"))
|
|
|
9
9
|
|
|
10
10
|
require("./czi-mathquill-editor-symbols-panel.css");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
13
13
|
|
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
@@ -41,7 +41,7 @@ class MathQuillEditorSymbolsPanel extends React.PureComponent {
|
|
|
41
41
|
__html: html
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
return /*#__PURE__*/React.createElement(
|
|
44
|
+
return /*#__PURE__*/React.createElement(_licitUiCommands.CustomButton, {
|
|
45
45
|
className: "czi-mathquill-editor-symbols-panel-button",
|
|
46
46
|
icon: icon,
|
|
47
47
|
key: label + latex,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import renderLaTeXAsHTML from '../renderLaTeXAsHTML';
|
|
4
4
|
import './czi-mathquill-editor-symbols-panel.css';
|
|
5
|
-
import CustomButton from '
|
|
5
|
+
import { CustomButton } from '@modusoperandi/licit-ui-commands';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
import type { MathQuillEditorSymbol } from './MathQuillEditorSymbols';
|