@atlaskit/editor-core 164.0.4 → 166.0.1
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/CHANGELOG.md +43 -0
- package/dist/cjs/actions/index.js +9 -0
- package/dist/cjs/create-editor/ReactEditorView.js +14 -6
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +13 -0
- package/dist/cjs/event-dispatcher/index.js +9 -0
- package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/nodeviews/getPerformanceOptions.js +1 -1
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
- package/dist/cjs/plugins/card/styles.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -4
- package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
- package/dist/cjs/plugins/date/styles.js +3 -1
- package/dist/cjs/plugins/emoji/index.js +30 -34
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
- package/dist/cjs/plugins/emoji/styles.js +3 -17
- package/dist/cjs/plugins/expand/ui/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
- package/dist/cjs/plugins/layout/styles.js +3 -1
- package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
- package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
- package/dist/cjs/plugins/list/transforms.js +11 -3
- package/dist/cjs/plugins/media/styles.js +3 -1
- package/dist/cjs/plugins/mentions/index.js +10 -14
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
- package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/cjs/plugins/panel/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/cjs/plugins/rule/styles.js +3 -1
- package/dist/cjs/plugins/selection/utils.js +39 -23
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +6 -4
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
- package/dist/cjs/plugins/type-ahead/index.js +6 -2
- package/dist/cjs/plugins/unsupported-content/index.js +22 -10
- package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
- package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +12 -1
- package/dist/es2019/create-editor/ReactEditorView.js +14 -6
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +14 -0
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
- package/dist/es2019/plugins/card/styles.js +9 -5
- package/dist/es2019/plugins/code-block/styles.js +11 -8
- package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
- package/dist/es2019/plugins/date/styles.js +3 -1
- package/dist/es2019/plugins/emoji/index.js +16 -21
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
- package/dist/es2019/plugins/emoji/styles.js +1 -82
- package/dist/es2019/plugins/expand/ui/styles.js +2 -2
- package/dist/es2019/plugins/extension/ui/styles.js +4 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/es2019/plugins/layout/styles.js +3 -2
- package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
- package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
- package/dist/es2019/plugins/list/transforms.js +9 -4
- package/dist/es2019/plugins/media/styles.js +9 -7
- package/dist/es2019/plugins/mentions/index.js +1 -6
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/es2019/plugins/panel/styles.js +5 -4
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/es2019/plugins/rule/styles.js +2 -1
- package/dist/es2019/plugins/selection/utils.js +35 -20
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
- package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
- package/dist/es2019/plugins/table/ui/consts.js +5 -4
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
- package/dist/es2019/plugins/type-ahead/index.js +5 -1
- package/dist/es2019/plugins/unsupported-content/index.js +23 -12
- package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
- package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
- package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +8 -0
- package/dist/esm/create-editor/ReactEditorView.js +14 -6
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +14 -0
- package/dist/esm/event-dispatcher/index.js +9 -0
- package/dist/esm/nodeviews/ReactNodeView.js +1 -10
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +5 -4
- package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
- package/dist/esm/plugins/date/styles.js +2 -1
- package/dist/esm/plugins/emoji/index.js +26 -29
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
- package/dist/esm/plugins/emoji/styles.js +3 -14
- package/dist/esm/plugins/expand/ui/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/esm/plugins/layout/styles.js +2 -1
- package/dist/esm/plugins/list/commands/indent-list.js +4 -1
- package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
- package/dist/esm/plugins/list/transforms.js +9 -4
- package/dist/esm/plugins/media/styles.js +2 -1
- package/dist/esm/plugins/mentions/index.js +10 -14
- package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
- package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/esm/plugins/panel/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/esm/plugins/rule/styles.js +2 -1
- package/dist/esm/plugins/selection/utils.js +35 -20
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +5 -4
- package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
- package/dist/esm/plugins/type-ahead/index.js +6 -2
- package/dist/esm/plugins/unsupported-content/index.js +21 -11
- package/dist/esm/plugins/unsupported-content/styles.js +3 -2
- package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/esm/ui/Appearance/Chromeless.js +6 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +3 -1
- package/dist/types/editor.d.ts +3 -0
- package/dist/types/event-dispatcher/index.d.ts +1 -0
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +2 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
- package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
- package/dist/types/plugins/emoji/index.d.ts +2 -6
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
- package/dist/types/plugins/emoji/styles.d.ts +0 -1
- package/dist/types/plugins/emoji/types.d.ts +0 -1
- package/dist/types/plugins/list/transforms.d.ts +10 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
- package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
- package/dist/types/plugins/selection/utils.d.ts +7 -15
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
- package/dist/types/plugins/table/ui/consts.d.ts +2 -2
- package/dist/types/plugins/type-ahead/types.d.ts +1 -0
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/editor-props.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +0 -14
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +23 -23
- package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
- package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
- package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
- package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
|
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
9
9
|
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
11
|
|
|
12
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
13
|
|
|
@@ -39,7 +39,7 @@ import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle
|
|
|
39
39
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
40
40
|
var CommentEditorMargin = 14;
|
|
41
41
|
var CommentEditorSmallerMargin = 8;
|
|
42
|
-
var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n
|
|
42
|
+
var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: white;\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, N40, borderRadius());
|
|
43
43
|
var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for tables controlls. Otherwise marging collapse and controlls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
|
|
44
44
|
ContentArea.displayName = 'ContentArea';
|
|
45
45
|
var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
|
|
@@ -94,6 +94,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
94
94
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
95
95
|
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
96
96
|
maxHeight = _this$props.maxHeight,
|
|
97
|
+
_this$props$minHeight = _this$props.minHeight,
|
|
98
|
+
minHeight = _this$props$minHeight === void 0 ? 150 : _this$props$minHeight,
|
|
97
99
|
onSave = _this$props.onSave,
|
|
98
100
|
onCancel = _this$props.onCancel,
|
|
99
101
|
disabled = _this$props.disabled,
|
|
@@ -105,7 +107,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
105
107
|
return jsx(WithFlash, {
|
|
106
108
|
animate: maxContentSizeReached
|
|
107
109
|
}, jsx("div", {
|
|
108
|
-
css: commentEditorStyle,
|
|
110
|
+
css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
109
111
|
className: "akEditor"
|
|
110
112
|
}, jsx(MainToolbar, {
|
|
111
113
|
useStickyToolbar: useStickyToolbar
|
|
@@ -132,7 +134,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
132
134
|
ref: function ref(_ref3) {
|
|
133
135
|
return _this.containerElement = _ref3;
|
|
134
136
|
},
|
|
135
|
-
css: maxHeight ? css(
|
|
137
|
+
css: maxHeight ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight) : null,
|
|
136
138
|
className: classnames('ak-editor-content-area', {
|
|
137
139
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
138
140
|
})
|
|
@@ -6,4 +6,5 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
9
|
-
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
10
|
+
export var inputStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: white;\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: 20px;\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n border-color: ", ";\n cursor: text;\n }\n }\n"])), token('color.border.input', akEditorSubtleAccent), borderRadius(), relativeFontSizeToBase16(14), N300, N50);
|
|
@@ -21,7 +21,7 @@ import { layoutStyles } from '../../plugins/layout/styles';
|
|
|
21
21
|
import { panelStyles } from '../../plugins/panel/styles';
|
|
22
22
|
import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
|
|
23
23
|
import { mentionsStyles } from '../../plugins/mentions/styles';
|
|
24
|
-
import { emojiStyles
|
|
24
|
+
import { emojiStyles } from '../../plugins/emoji/styles';
|
|
25
25
|
import { textFormattingStyles } from '../../plugins/text-formatting/styles';
|
|
26
26
|
import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
|
|
27
27
|
import { gridStyles } from '../../plugins/grid/styles';
|
|
@@ -39,11 +39,11 @@ import { useFeatureFlags } from '../../plugins/feature-flags-context';
|
|
|
39
39
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
40
40
|
|
|
41
41
|
var contentStyles = function contentStyles(props) {
|
|
42
|
-
var _props$featureFlags
|
|
42
|
+
var _props$featureFlags;
|
|
43
43
|
|
|
44
44
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid #8cf;\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-child {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
45
45
|
theme: props.theme
|
|
46
|
-
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, placeholderTextStyles, placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles(props) : codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles,
|
|
46
|
+
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, placeholderTextStyles, placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles(props) : codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
export var createEditorContentStyle = function createEditorContentStyle(styles) {
|
package/dist/esm/version.json
CHANGED
|
@@ -38,7 +38,9 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
38
38
|
getValue(): Promise<JSONDocNode | T | undefined>;
|
|
39
39
|
getNodeByLocalId(id: string): Node | undefined;
|
|
40
40
|
isDocumentEmpty(): boolean;
|
|
41
|
-
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
41
|
+
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
42
|
+
/** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
|
|
43
|
+
shouldAddToHistory?: boolean): boolean;
|
|
42
44
|
replaceSelection(rawValue: Node | Object | string, tryToReplace?: boolean): boolean;
|
|
43
45
|
appendText(text: string): boolean;
|
|
44
46
|
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -22,6 +22,9 @@ declare type State = {
|
|
|
22
22
|
};
|
|
23
23
|
export default class Editor extends React.Component<EditorProps, State> {
|
|
24
24
|
static defaultProps: EditorProps;
|
|
25
|
+
static propTypes: {
|
|
26
|
+
minHeight: ({ appearance, minHeight }: EditorProps) => Error | null;
|
|
27
|
+
};
|
|
25
28
|
static contextTypes: {
|
|
26
29
|
editorActions: PropTypes.Requireable<object>;
|
|
27
30
|
};
|
|
@@ -7,6 +7,7 @@ export declare type Dispatch<T = any> = (eventName: PluginKey | string, data: T)
|
|
|
7
7
|
export declare class EventDispatcher<T = any> {
|
|
8
8
|
private listeners;
|
|
9
9
|
on(event: string, cb: Listener<T>): void;
|
|
10
|
+
has(event: string, cb: Listener<T>): boolean;
|
|
10
11
|
off(event: string, cb: Listener<T>): void;
|
|
11
12
|
emit(event: string, data: T): void;
|
|
12
13
|
destroy(): void;
|
|
@@ -4,9 +4,6 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
4
4
|
import { PortalProviderAPI } from '../ui/PortalProvider';
|
|
5
5
|
import { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
import { ReactComponentProps, shouldUpdate, getPosHandler, ForwardRef } from './types';
|
|
7
|
-
interface CreateDomRefOptions {
|
|
8
|
-
displayInlineBlockForInlineNodes: boolean;
|
|
9
|
-
}
|
|
10
7
|
export default class ReactNodeView<P = ReactComponentProps> implements NodeView {
|
|
11
8
|
private domRef?;
|
|
12
9
|
private contentDOMWrapper?;
|
|
@@ -33,7 +30,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
|
|
|
33
30
|
*/
|
|
34
31
|
init(): this;
|
|
35
32
|
private renderReactComponent;
|
|
36
|
-
createDomRef(
|
|
33
|
+
createDomRef(): HTMLElement;
|
|
37
34
|
getContentDOM(): {
|
|
38
35
|
dom: Node;
|
|
39
36
|
contentDOM?: Node | null | undefined;
|
|
@@ -53,4 +50,3 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
|
|
|
53
50
|
private dispatchAnalyticsEvent;
|
|
54
51
|
static fromComponent(component: React.ComponentType<any>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, props?: ReactComponentProps, viewShouldUpdate?: (nextNode: PMNode) => boolean, hasIntlContext?: boolean): (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<ReactComponentProps>;
|
|
55
52
|
}
|
|
56
|
-
export {};
|
|
@@ -50,6 +50,7 @@ export declare enum ACTION {
|
|
|
50
50
|
INDENTED = "indented",
|
|
51
51
|
INITIALISED = "initialised",
|
|
52
52
|
INPUT_PERF_SAMPLING = "inputPerfSampling",
|
|
53
|
+
INPUT_PERF_SAMPLING_AVG = "inputPerfSamplingAvg",
|
|
53
54
|
INSERTED = "inserted",
|
|
54
55
|
INVALID_DOCUMENT_ENCOUNTERED = "invalidDocumentEncountered",
|
|
55
56
|
INVOKED = "invoked",
|
|
@@ -22,10 +22,10 @@ import { DateEventPayload } from './date-events';
|
|
|
22
22
|
import { SelectionEventPayload } from './selection-events';
|
|
23
23
|
import { CreateLinkInlineDialogEventPayload, UnlinkToolbarAEP, EditLinkToolbarAEP } from './link-tool-bar-events';
|
|
24
24
|
import { ExtensionEventPayload } from './extension-events';
|
|
25
|
-
import type { UnsupportedContentPayload, UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
|
|
25
|
+
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
|
|
26
26
|
import { AvatarEventPayload } from './avatar';
|
|
27
27
|
import { NewCollabSyncUpErrorAttributes } from '@atlaskit/editor-common/types';
|
|
28
|
-
export declare type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP;
|
|
28
|
+
export declare type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload;
|
|
29
29
|
declare type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
30
30
|
previousColor: string;
|
|
31
31
|
newColor: string;
|
|
@@ -82,6 +82,15 @@ declare type InputPerfSamlingAEP = OperationalAEPWithObjectId<ACTION.INPUT_PERF_
|
|
|
82
82
|
nodeCount?: Record<string, number>;
|
|
83
83
|
severity?: SEVERITY;
|
|
84
84
|
}, undefined>;
|
|
85
|
+
declare type InputPerfSamplingAvgAEP = OperationalAEPWithObjectId<ACTION.INPUT_PERF_SAMPLING_AVG, ACTION_SUBJECT.EDITOR, undefined, {
|
|
86
|
+
mean: number;
|
|
87
|
+
median: number;
|
|
88
|
+
sampleSize: number;
|
|
89
|
+
participants: number;
|
|
90
|
+
nodeCount?: Record<string, number>;
|
|
91
|
+
nodeSize: number;
|
|
92
|
+
severity?: SEVERITY;
|
|
93
|
+
}, undefined>;
|
|
85
94
|
declare type DispatchedTransactionAEP = OperationalAEP<ACTION.TRANSACTION_DISPATCHED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
86
95
|
report: PluginPerformanceReportData;
|
|
87
96
|
participants: number;
|
|
@@ -159,5 +168,5 @@ declare type CodeBlockLanguageSelectedAEP = TrackAEP<ACTION.LANGUAGE_SELECTED, A
|
|
|
159
168
|
}, undefined>;
|
|
160
169
|
declare type MediaLinkTransformedAEP = OperationalAEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
161
170
|
declare type TextLinkCodeMarkTransformedAEP = OperationalAEP<ACTION.TEXT_LINK_MARK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
162
|
-
export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP;
|
|
171
|
+
export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP;
|
|
163
172
|
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
2
|
+
interface Opts {
|
|
3
|
+
dispatchAverage?: (data: {
|
|
4
|
+
mean: number;
|
|
5
|
+
median: number;
|
|
6
|
+
sampleSize: number;
|
|
7
|
+
}, severity: SEVERITY) => void;
|
|
8
|
+
dispatchSample?: (sample: number, severity: SEVERITY) => void;
|
|
9
|
+
onSampleStart?: () => void;
|
|
10
|
+
onSampleEnd?: (time: number, info: {
|
|
11
|
+
isSlow: boolean;
|
|
12
|
+
severity: SEVERITY;
|
|
13
|
+
}) => void;
|
|
14
|
+
onSlowInput?: (time: number) => void;
|
|
15
|
+
samplingRate: number;
|
|
16
|
+
slowThreshold: number;
|
|
17
|
+
normalThreshold: number;
|
|
18
|
+
degradedThreshold: number;
|
|
19
|
+
}
|
|
20
|
+
export default class InputLatencyTracker {
|
|
21
|
+
private samples;
|
|
22
|
+
private total;
|
|
23
|
+
private currentStart;
|
|
24
|
+
private samplingRate;
|
|
25
|
+
private slowThreshold;
|
|
26
|
+
private normalThreshold;
|
|
27
|
+
private degradedThreshold;
|
|
28
|
+
private dispatchAverage;
|
|
29
|
+
private dispatchSample;
|
|
30
|
+
private onSampleStart;
|
|
31
|
+
private onSampleEnd;
|
|
32
|
+
private onSlowInput;
|
|
33
|
+
constructor({ samplingRate, slowThreshold, normalThreshold, degradedThreshold, dispatchAverage, dispatchSample, onSampleStart, onSampleEnd, onSlowInput, }: Opts);
|
|
34
|
+
start(): void;
|
|
35
|
+
end(): void;
|
|
36
|
+
flush(): void;
|
|
37
|
+
private dispatch;
|
|
38
|
+
private push;
|
|
39
|
+
private severity;
|
|
40
|
+
private getLast;
|
|
41
|
+
private getMean;
|
|
42
|
+
private getMedian;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -2,6 +2,10 @@ import { ReadonlyTransaction } from 'prosemirror-state';
|
|
|
2
2
|
import { DecorationSet } from 'prosemirror-view';
|
|
3
3
|
import { Participants, ReadOnlyParticipants } from './participants';
|
|
4
4
|
export declare const TELEPOINTER_DIM_CLASS = "telepointer-dim";
|
|
5
|
+
/**
|
|
6
|
+
* Returns position where it's possible to place a decoration.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getValidPos: (tr: ReadonlyTransaction, pos: number) => number;
|
|
5
9
|
export declare class PluginState {
|
|
6
10
|
private decorationSet;
|
|
7
11
|
private participants;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { EditorState, PluginKey } from 'prosemirror-state';
|
|
3
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
3
|
import { EmojiDescription, EmojiProvider } from '@atlaskit/emoji';
|
|
5
|
-
import { Command, EditorPlugin } from '../../types';
|
|
6
|
-
import { Dispatch } from '../../event-dispatcher';
|
|
7
|
-
import { PortalProviderAPI } from '../../ui/PortalProvider';
|
|
4
|
+
import type { Command, EditorPlugin, PMPluginFactoryParams } from '../../types';
|
|
8
5
|
import { TypeAheadItem } from '../type-ahead/types';
|
|
9
6
|
import { EmojiPluginOptions, EmojiPluginState } from './types';
|
|
10
|
-
import { EventDispatcher } from '../../event-dispatcher';
|
|
11
7
|
export declare const emojiToTypeaheadItem: (emoji: EmojiDescription, emojiProvider?: EmojiProvider | undefined) => TypeAheadItem;
|
|
12
8
|
export declare function memoize<ResultFn extends (emoji: EmojiDescription, emojiProvider?: EmojiProvider) => TypeAheadItem>(fn: ResultFn): {
|
|
13
9
|
call: ResultFn;
|
|
@@ -27,4 +23,4 @@ export declare const ACTIONS: {
|
|
|
27
23
|
export declare const setProvider: (provider?: EmojiProvider | undefined) => Command;
|
|
28
24
|
export declare const emojiPluginKey: PluginKey<EmojiPluginState, any>;
|
|
29
25
|
export declare function getEmojiPluginState(state: EditorState): EmojiPluginState;
|
|
30
|
-
export declare function
|
|
26
|
+
export declare function createEmojiPlugin(pmPluginFactoryParams: PMPluginFactoryParams): SafePlugin<EmojiPluginState, any>;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
3
|
-
import { EditorView, NodeView } from 'prosemirror-view';
|
|
4
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { EmojiPluginOptions } from '../types';
|
|
8
|
-
import { EventDispatcher } from '../../../event-dispatcher';
|
|
9
|
-
export interface Props {
|
|
3
|
+
import type { InlineNodeViewComponentProps } from '../../../nodeviews/getInlineNodeViewProducer';
|
|
4
|
+
export declare type Props = InlineNodeViewComponentProps & {
|
|
10
5
|
providerFactory: ProviderFactory;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare class EmojiNodeView extends ReactNodeView<Props> {
|
|
14
|
-
createDomRef(): HTMLElement;
|
|
15
|
-
render(props: Props): JSX.Element;
|
|
16
|
-
}
|
|
17
|
-
export default function emojiNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options?: EmojiPluginOptions): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
6
|
+
};
|
|
7
|
+
export declare function EmojiNodeView(props: Props): JSX.Element;
|
|
@@ -2,7 +2,6 @@ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import { EmojiProvider, EmojiDescription } from '@atlaskit/emoji';
|
|
3
3
|
export interface EmojiPluginOptions {
|
|
4
4
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
5
|
-
allowZeroWidthSpaceAfter?: boolean;
|
|
6
5
|
headless?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare type EmojiPluginState = {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { Slice, Schema } from 'prosemirror-model';
|
|
1
|
+
import { Fragment, Slice, Schema, Mark } from 'prosemirror-model';
|
|
2
2
|
import { Transaction, Selection } from 'prosemirror-state';
|
|
3
3
|
export declare function liftFollowingList(from: number, to: number, rootListDepth: number, tr: Transaction): Transaction;
|
|
4
4
|
export declare function liftSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
5
|
+
/**
|
|
6
|
+
* Walks the slice, creating paragraphs that were previously separated by hardbreaks.
|
|
7
|
+
* Returns the original paragraph node (as a fragment), or a fragment containing multiple nodes.
|
|
8
|
+
*/
|
|
9
|
+
export declare const splitIntoParagraphs: ({ fragment, blockMarks, schema, }: {
|
|
10
|
+
fragment: Fragment;
|
|
11
|
+
blockMarks?: Mark<any>[] | undefined;
|
|
12
|
+
schema: Schema;
|
|
13
|
+
}) => Fragment;
|
|
5
14
|
export declare const splitParagraphs: (slice: Slice, schema: Schema) => Slice;
|
|
6
15
|
export declare const upgradeTextToLists: (slice: Slice, schema: Schema) => Slice;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
3
|
-
import { EditorView, NodeView } from 'prosemirror-view';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import { ReactNodeView, getPosHandler } from '../../../nodeviews';
|
|
6
|
-
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
7
3
|
import { MentionPluginOptions } from '../types';
|
|
8
|
-
import {
|
|
9
|
-
export
|
|
4
|
+
import { InlineNodeViewComponentProps } from '../../../nodeviews/getInlineNodeViewProducer';
|
|
5
|
+
export declare type Props = InlineNodeViewComponentProps & {
|
|
6
|
+
options: MentionPluginOptions | undefined;
|
|
10
7
|
providerFactory: ProviderFactory;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare class MentionNodeView extends ReactNodeView<Props> {
|
|
14
|
-
createDomRef(): HTMLElement;
|
|
15
|
-
render(props: Props): JSX.Element;
|
|
16
|
-
}
|
|
17
|
-
export default function mentionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options?: MentionPluginOptions): (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
8
|
+
};
|
|
9
|
+
export declare const MentionNodeView: React.FC<Props>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import {
|
|
5
|
-
import { PortalProviderAPI } from '../../../ui/PortalProvider';
|
|
6
|
-
import type { Command } from '../../../types';
|
|
3
|
+
import type { Command, PMPluginFactoryParams } from '../../../types';
|
|
7
4
|
import type { MentionPluginOptions, MentionPluginState } from '../types';
|
|
8
5
|
export declare const setContext: (context: ContextIdentifierProvider | undefined) => Command;
|
|
9
|
-
export declare function createMentionPlugin(
|
|
6
|
+
export declare function createMentionPlugin(pmPluginFactoryParams: PMPluginFactoryParams, fireEvent: (payload: any) => void, options?: MentionPluginOptions): SafePlugin<MentionPluginState, import("prosemirror-model").Schema<any, any>>;
|
|
@@ -12,22 +12,14 @@ export declare function getNodeSelectionAnalyticsPayload(selection: Selection):
|
|
|
12
12
|
export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
|
|
13
13
|
export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined;
|
|
14
14
|
/**
|
|
15
|
-
* Use `
|
|
16
|
-
* a list of
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* For example, using the following document:
|
|
22
|
-
* ```
|
|
23
|
-
* doc(p('{<}one'), blockquote(p('hello')), p(expand({ title: 'two' })(p('three'))), p('four{>}'))))
|
|
24
|
-
* ```
|
|
25
|
-
* we would expect `getTopLevelNodesFromSelection` to return:
|
|
26
|
-
* ```
|
|
27
|
-
* [blockquote(p('hello')), expand({ title: 'two' })(p('three')))]
|
|
28
|
-
* ```
|
|
15
|
+
* Use `getNodesToDecorateFromSelection` to collect and return
|
|
16
|
+
* a list of nodes within the Selection that should have Selection
|
|
17
|
+
* decorations applied. This allows selection styles to be added to
|
|
18
|
+
* nested nodes. It will ignore text nodes as decorations are
|
|
19
|
+
* applied natively and also ignore nodes that don't completely
|
|
20
|
+
* sit within the given `Selection`.
|
|
29
21
|
*/
|
|
30
|
-
export declare const
|
|
22
|
+
export declare const getNodesToDecorateFromSelection: (selection: Selection, doc: PmNode) => {
|
|
31
23
|
node: PmNode;
|
|
32
24
|
pos: number;
|
|
33
25
|
}[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { Node as PmNode } from 'prosemirror-model';
|
|
2
3
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
4
|
import { EventDispatcher } from '../../../../../event-dispatcher';
|
|
@@ -27,6 +28,8 @@ export declare class TableRowNodeView implements NodeView {
|
|
|
27
28
|
get tree(): TableDOMElements | null | undefined;
|
|
28
29
|
constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher);
|
|
29
30
|
listening: boolean;
|
|
31
|
+
headerRowMouseScrollEnd: (() => void) & import("lodash").Cancelable;
|
|
32
|
+
headerRowMouseScroll: (() => void) & import("lodash").Cancelable;
|
|
30
33
|
subscribe(): void;
|
|
31
34
|
unsubscribe(): void;
|
|
32
35
|
private initObservers;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Basic colors added to prevent content overflow in table cells.
|
|
3
3
|
*/
|
|
4
4
|
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<string>;
|
|
5
|
-
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<
|
|
5
|
+
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral)">;
|
|
6
6
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<string>;
|
|
7
|
-
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<
|
|
7
|
+
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border)">;
|
|
8
8
|
export declare const tableFloatingControlsColor = "#F4F5F7";
|
|
9
9
|
export declare const tableCellSelectedColor = "#B3D4FF";
|
|
10
10
|
export declare const tableToolbarSelectedColor = "#2684FF";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
4
|
+
import { UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
5
|
+
import { InlineNodeViewComponentProps } from '../../nodeviews/getInlineNodeViewProducer';
|
|
6
|
+
export declare type Props = InlineNodeViewComponentProps & {
|
|
7
|
+
node?: PMNode;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
dispatchAnalyticsEvent?: (payload: UnsupportedContentTooltipPayload) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const UnsupportedInlineNodeView: React.FC<Props>;
|
|
@@ -24,6 +24,7 @@ export interface EditorAppearanceComponentProps {
|
|
|
24
24
|
eventDispatcher?: EventDispatcher;
|
|
25
25
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
26
26
|
maxHeight?: number;
|
|
27
|
+
minHeight?: number;
|
|
27
28
|
contentComponents?: UIComponentFactory[];
|
|
28
29
|
primaryToolbarComponents?: ToolbarUIComponentFactory[];
|
|
29
30
|
primaryToolbarIconBefore?: ReactElement;
|
|
@@ -130,14 +130,6 @@ export declare type FeatureFlags = {
|
|
|
130
130
|
* @default false
|
|
131
131
|
*/
|
|
132
132
|
catchAllTracking?: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* @description
|
|
135
|
-
* Switch to a performance optimised NodeView for Emoji
|
|
136
|
-
*
|
|
137
|
-
* @see https://product-fabric.atlassian.net/browse/ED-10585
|
|
138
|
-
* @default false
|
|
139
|
-
*/
|
|
140
|
-
nextEmojiNodeView?: boolean;
|
|
141
133
|
/**
|
|
142
134
|
* @description
|
|
143
135
|
* Enables performance optimization for sticky headers in tables
|
|
@@ -209,12 +201,6 @@ export declare type FeatureFlags = {
|
|
|
209
201
|
* @default false
|
|
210
202
|
*/
|
|
211
203
|
extendFloatingToolbar?: boolean;
|
|
212
|
-
/**
|
|
213
|
-
* Set display inline-block; CSS to any inline node
|
|
214
|
-
* @see https://product-fabric.atlassian.net/browse/ED-12361
|
|
215
|
-
* @default true
|
|
216
|
-
*/
|
|
217
|
-
displayInlineBlockForInlineNodes?: boolean;
|
|
218
204
|
/**
|
|
219
205
|
* Set editor to use the input rule with unpredictable undo results
|
|
220
206
|
* @see https://product-fabric.atlassian.net/browse/ED-12676
|
|
@@ -5,6 +5,7 @@ import { EditorAppearanceComponentProps } from '../../types';
|
|
|
5
5
|
export interface ChromelessEditorProps {
|
|
6
6
|
isMaxContentSizeReached?: boolean;
|
|
7
7
|
maxHeight?: number;
|
|
8
|
+
minHeight?: number;
|
|
8
9
|
}
|
|
9
10
|
export default class Editor extends React.Component<EditorAppearanceComponentProps, any> {
|
|
10
11
|
static displayName: string;
|
|
@@ -24,6 +24,8 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
24
24
|
value?: string | number | string[] | undefined;
|
|
25
25
|
type?: string | undefined;
|
|
26
26
|
width?: string | number | undefined;
|
|
27
|
+
color?: string | undefined;
|
|
28
|
+
height?: string | number | undefined;
|
|
27
29
|
accessKey?: string | undefined;
|
|
28
30
|
draggable?: boolean | undefined;
|
|
29
31
|
hidden?: boolean | undefined;
|
|
@@ -43,12 +45,11 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
43
45
|
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
44
46
|
placeholder?: string | undefined;
|
|
45
47
|
autoFocus?: boolean | undefined;
|
|
46
|
-
color?: string | undefined;
|
|
47
48
|
name?: string | undefined;
|
|
48
49
|
key?: import("react").Key | undefined;
|
|
49
50
|
action?: string | undefined;
|
|
50
51
|
disabled?: boolean | undefined;
|
|
51
|
-
|
|
52
|
+
property?: string | undefined;
|
|
52
53
|
target?: string | undefined;
|
|
53
54
|
start?: number | undefined;
|
|
54
55
|
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
@@ -147,7 +148,6 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
147
148
|
about?: string | undefined;
|
|
148
149
|
datatype?: string | undefined;
|
|
149
150
|
inlist?: any;
|
|
150
|
-
property?: string | undefined;
|
|
151
151
|
resource?: string | undefined;
|
|
152
152
|
typeof?: string | undefined;
|
|
153
153
|
vocab?: string | undefined;
|
|
@@ -365,7 +365,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
365
365
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
366
366
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
367
367
|
css?: import("@emotion/core").InterpolationWithTheme<any>;
|
|
368
|
-
}, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "theme" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "
|
|
368
|
+
}, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "theme" | "pattern" | "value" | "type" | "width" | "color" | "height" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "name" | "key" | "action" | "disabled" | "property" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
369
369
|
export declare const positionedOverEditorStyle: import("@emotion/react").SerializedStyles;
|
|
370
370
|
export declare const contentArea: import("@emotion/react").SerializedStyles;
|
|
371
371
|
export declare const sidebarArea: import("@emotion/react").SerializedStyles;
|