@atlaskit/editor-core 203.16.5 → 203.17.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/CHANGELOG.md +26 -0
- package/afm-cc/tsconfig.json +6 -0
- package/afm-jira/tsconfig.json +6 -0
- package/afm-post-office/tsconfig.json +6 -0
- package/dist/cjs/composable-editor/core-editor.js +5 -2
- package/dist/cjs/composable-editor/core-performance-metrics.js +109 -0
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +22 -0
- package/dist/cjs/ui/Addon/click-area-helper.js +5 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +28 -4
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +11 -1
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
- package/dist/cjs/ui/Toolbar/ToolbarPortal.js +48 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +6 -3
- package/dist/es2019/composable-editor/core-performance-metrics.js +92 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
- package/dist/es2019/ui/Addon/click-area-helper.js +5 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +27 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +11 -1
- package/dist/es2019/ui/ContentStyles/extension.js +5 -0
- package/dist/es2019/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
- package/dist/es2019/ui/Toolbar/ToolbarPortal.js +40 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +6 -3
- package/dist/esm/composable-editor/core-performance-metrics.js +101 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
- package/dist/esm/ui/Addon/click-area-helper.js +5 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +28 -4
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +11 -1
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
- package/dist/esm/ui/Toolbar/ToolbarPortal.js +41 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/core-performance-metrics.d.ts +4 -0
- package/dist/types/create-editor/create-universal-preset.d.ts +52 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/presets/universal.d.ts +52 -6
- package/dist/types/presets/useUniversalPreset.d.ts +52 -6
- package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
- package/dist/types/ui/Addon/click-area-helper.d.ts +1 -0
- package/dist/types/ui/Toolbar/ToolbarPortal.d.ts +21 -0
- package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +4 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +56 -6
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/presets/universal.d.ts +56 -6
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +56 -6
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
- package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +1 -0
- package/dist/types-ts4.5/ui/Toolbar/ToolbarPortal.d.ts +21 -0
- package/package.json +33 -11
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +0 -41
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +0 -105
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +0 -34
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +0 -85
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +0 -33
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +0 -103
- package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +0 -13
- package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
- package/dist/types-ts4.5/ui/Addon/ClickAreaInline/index.d.ts +0 -13
- package/dist/types-ts4.5/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { createParagraphAtEnd } from '@atlaskit/editor-common/commands';
|
|
10
|
-
const clickArea = css({
|
|
11
|
-
flexGrow: 1
|
|
12
|
-
});
|
|
13
|
-
export const ClickAreaInline = ({
|
|
14
|
-
editorView,
|
|
15
|
-
children
|
|
16
|
-
}) => {
|
|
17
|
-
const handleMouseDown = React.useCallback(event => {
|
|
18
|
-
if (!editorView) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (createParagraphAtEnd()(editorView.state, editorView.dispatch)) {
|
|
22
|
-
editorView.focus();
|
|
23
|
-
event.stopPropagation();
|
|
24
|
-
}
|
|
25
|
-
}, [editorView]);
|
|
26
|
-
|
|
27
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
28
|
-
return jsx("div", {
|
|
29
|
-
"data-testid": "click-wrapper",
|
|
30
|
-
css: clickArea,
|
|
31
|
-
onMouseDown: handleMouseDown
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
export default ClickAreaInline;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { clickAreaClickHandler } from '../click-area-helper';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Fills the visible viewport height so that it can filter
|
|
14
|
-
* clicks/taps within or below the content (e.g. if the content
|
|
15
|
-
* doesn't exceed the viewport, or whether it overflows it).
|
|
16
|
-
*/
|
|
17
|
-
const clickWrapper = ({
|
|
18
|
-
isExpanded,
|
|
19
|
-
minHeight
|
|
20
|
-
}) => css({
|
|
21
|
-
height: '100%'
|
|
22
|
-
},
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
|
-
isExpanded && minHeight ? `min-height: ${minHeight}px` : '');
|
|
25
|
-
/**
|
|
26
|
-
* Click Area is responsible for improving UX by ensuring the user
|
|
27
|
-
* can always tap beneath the content area, to insert more content.
|
|
28
|
-
*
|
|
29
|
-
* This is achieved by inserting a new empty paragraph at the end of
|
|
30
|
-
* the document (if one doesn't already exist).
|
|
31
|
-
*
|
|
32
|
-
* This is particularly important when the content exceeds the visible
|
|
33
|
-
* viewport height, and if the last content node captures text selection
|
|
34
|
-
* e.g. table, layouts, codeblock, etc.
|
|
35
|
-
*
|
|
36
|
-
* This relies on the Scroll Gutter plugin which inserts additional
|
|
37
|
-
* whitespace at the end of the document when it overflows the viewport.
|
|
38
|
-
*/
|
|
39
|
-
// Ignored via go/ees005
|
|
40
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
41
|
-
export default class ClickAreaMobile extends React.Component {
|
|
42
|
-
constructor(...args) {
|
|
43
|
-
super(...args);
|
|
44
|
-
_defineProperty(this, "clickElementRef", /*#__PURE__*/React.createRef());
|
|
45
|
-
_defineProperty(this, "handleClick", event => {
|
|
46
|
-
const {
|
|
47
|
-
editorView: view,
|
|
48
|
-
editorDisabled
|
|
49
|
-
} = this.props;
|
|
50
|
-
if (!view) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (!editorDisabled) {
|
|
54
|
-
// if the editor is disabled -- we don't want to intercept any click events
|
|
55
|
-
clickAreaClickHandler(view, event);
|
|
56
|
-
}
|
|
57
|
-
const scrollGutterClicked = event.clientY > view.dom.getBoundingClientRect().bottom;
|
|
58
|
-
// Reset the default prosemirror scrollIntoView logic by
|
|
59
|
-
// clamping the scroll position to the bottom of the viewport.
|
|
60
|
-
if (scrollGutterClicked) {
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
if (this.clickElementRef.current) {
|
|
63
|
-
this.clickElementRef.current.scrollIntoView(false);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
render() {
|
|
69
|
-
return (
|
|
70
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
71
|
-
jsx("div", {
|
|
72
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
73
|
-
css: clickWrapper({
|
|
74
|
-
isExpanded: this.props.isExpanded,
|
|
75
|
-
minHeight: this.props.minHeight
|
|
76
|
-
})
|
|
77
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
78
|
-
,
|
|
79
|
-
className: "editor-click-wrapper",
|
|
80
|
-
onClick: this.handleClick,
|
|
81
|
-
ref: this.clickElementRef
|
|
82
|
-
}, this.props.children)
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { createParagraphAtEnd } from '@atlaskit/editor-common/commands';
|
|
10
|
-
var clickArea = css({
|
|
11
|
-
flexGrow: 1
|
|
12
|
-
});
|
|
13
|
-
export var ClickAreaInline = function ClickAreaInline(_ref) {
|
|
14
|
-
var editorView = _ref.editorView,
|
|
15
|
-
children = _ref.children;
|
|
16
|
-
var handleMouseDown = React.useCallback(function (event) {
|
|
17
|
-
if (!editorView) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (createParagraphAtEnd()(editorView.state, editorView.dispatch)) {
|
|
21
|
-
editorView.focus();
|
|
22
|
-
event.stopPropagation();
|
|
23
|
-
}
|
|
24
|
-
}, [editorView]);
|
|
25
|
-
|
|
26
|
-
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
27
|
-
return jsx("div", {
|
|
28
|
-
"data-testid": "click-wrapper",
|
|
29
|
-
css: clickArea,
|
|
30
|
-
onMouseDown: handleMouseDown
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
export default ClickAreaInline;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
/**
|
|
10
|
-
* @jsxRuntime classic
|
|
11
|
-
* @jsx jsx
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
import { css, jsx } from '@emotion/react';
|
|
17
|
-
import { clickAreaClickHandler } from '../click-area-helper';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Fills the visible viewport height so that it can filter
|
|
21
|
-
* clicks/taps within or below the content (e.g. if the content
|
|
22
|
-
* doesn't exceed the viewport, or whether it overflows it).
|
|
23
|
-
*/
|
|
24
|
-
var clickWrapper = function clickWrapper(_ref) {
|
|
25
|
-
var isExpanded = _ref.isExpanded,
|
|
26
|
-
minHeight = _ref.minHeight;
|
|
27
|
-
return css({
|
|
28
|
-
height: '100%'
|
|
29
|
-
},
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
|
-
isExpanded && minHeight ? "min-height: ".concat(minHeight, "px") : '');
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Click Area is responsible for improving UX by ensuring the user
|
|
35
|
-
* can always tap beneath the content area, to insert more content.
|
|
36
|
-
*
|
|
37
|
-
* This is achieved by inserting a new empty paragraph at the end of
|
|
38
|
-
* the document (if one doesn't already exist).
|
|
39
|
-
*
|
|
40
|
-
* This is particularly important when the content exceeds the visible
|
|
41
|
-
* viewport height, and if the last content node captures text selection
|
|
42
|
-
* e.g. table, layouts, codeblock, etc.
|
|
43
|
-
*
|
|
44
|
-
* This relies on the Scroll Gutter plugin which inserts additional
|
|
45
|
-
* whitespace at the end of the document when it overflows the viewport.
|
|
46
|
-
*/
|
|
47
|
-
// Ignored via go/ees005
|
|
48
|
-
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
49
|
-
var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
50
|
-
function ClickAreaMobile() {
|
|
51
|
-
var _this;
|
|
52
|
-
_classCallCheck(this, ClickAreaMobile);
|
|
53
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
|
-
args[_key] = arguments[_key];
|
|
55
|
-
}
|
|
56
|
-
_this = _callSuper(this, ClickAreaMobile, [].concat(args));
|
|
57
|
-
_defineProperty(_this, "clickElementRef", /*#__PURE__*/React.createRef());
|
|
58
|
-
_defineProperty(_this, "handleClick", function (event) {
|
|
59
|
-
var _this$props = _this.props,
|
|
60
|
-
view = _this$props.editorView,
|
|
61
|
-
editorDisabled = _this$props.editorDisabled;
|
|
62
|
-
if (!view) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (!editorDisabled) {
|
|
66
|
-
// if the editor is disabled -- we don't want to intercept any click events
|
|
67
|
-
clickAreaClickHandler(view, event);
|
|
68
|
-
}
|
|
69
|
-
var scrollGutterClicked = event.clientY > view.dom.getBoundingClientRect().bottom;
|
|
70
|
-
// Reset the default prosemirror scrollIntoView logic by
|
|
71
|
-
// clamping the scroll position to the bottom of the viewport.
|
|
72
|
-
if (scrollGutterClicked) {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
if (_this.clickElementRef.current) {
|
|
75
|
-
_this.clickElementRef.current.scrollIntoView(false);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return _this;
|
|
80
|
-
}
|
|
81
|
-
_inherits(ClickAreaMobile, _React$Component);
|
|
82
|
-
return _createClass(ClickAreaMobile, [{
|
|
83
|
-
key: "render",
|
|
84
|
-
value: function render() {
|
|
85
|
-
return (
|
|
86
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
87
|
-
jsx("div", {
|
|
88
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
89
|
-
css: clickWrapper({
|
|
90
|
-
isExpanded: this.props.isExpanded,
|
|
91
|
-
minHeight: this.props.minHeight
|
|
92
|
-
})
|
|
93
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
94
|
-
,
|
|
95
|
-
className: "editor-click-wrapper",
|
|
96
|
-
onClick: this.handleClick,
|
|
97
|
-
ref: this.clickElementRef
|
|
98
|
-
}, this.props.children)
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
}]);
|
|
102
|
-
}(React.Component);
|
|
103
|
-
export { ClickAreaMobile as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
export interface Props {
|
|
9
|
-
editorView?: EditorView;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const ClickAreaInline: ({ editorView, children }: Props) => jsx.JSX.Element;
|
|
13
|
-
export default ClickAreaInline;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
export interface Props {
|
|
9
|
-
editorView?: EditorView;
|
|
10
|
-
minHeight: number;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
persistScrollGutter?: boolean;
|
|
13
|
-
isExpanded?: boolean;
|
|
14
|
-
editorDisabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Click Area is responsible for improving UX by ensuring the user
|
|
18
|
-
* can always tap beneath the content area, to insert more content.
|
|
19
|
-
*
|
|
20
|
-
* This is achieved by inserting a new empty paragraph at the end of
|
|
21
|
-
* the document (if one doesn't already exist).
|
|
22
|
-
*
|
|
23
|
-
* This is particularly important when the content exceeds the visible
|
|
24
|
-
* viewport height, and if the last content node captures text selection
|
|
25
|
-
* e.g. table, layouts, codeblock, etc.
|
|
26
|
-
*
|
|
27
|
-
* This relies on the Scroll Gutter plugin which inserts additional
|
|
28
|
-
* whitespace at the end of the document when it overflows the viewport.
|
|
29
|
-
*/
|
|
30
|
-
export default class ClickAreaMobile extends React.Component<Props> {
|
|
31
|
-
private clickElementRef;
|
|
32
|
-
private handleClick;
|
|
33
|
-
render(): jsx.JSX.Element;
|
|
34
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
export interface Props {
|
|
9
|
-
editorView?: EditorView;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const ClickAreaInline: ({ editorView, children }: Props) => jsx.JSX.Element;
|
|
13
|
-
export default ClickAreaInline;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
export interface Props {
|
|
9
|
-
editorView?: EditorView;
|
|
10
|
-
minHeight: number;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
persistScrollGutter?: boolean;
|
|
13
|
-
isExpanded?: boolean;
|
|
14
|
-
editorDisabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Click Area is responsible for improving UX by ensuring the user
|
|
18
|
-
* can always tap beneath the content area, to insert more content.
|
|
19
|
-
*
|
|
20
|
-
* This is achieved by inserting a new empty paragraph at the end of
|
|
21
|
-
* the document (if one doesn't already exist).
|
|
22
|
-
*
|
|
23
|
-
* This is particularly important when the content exceeds the visible
|
|
24
|
-
* viewport height, and if the last content node captures text selection
|
|
25
|
-
* e.g. table, layouts, codeblock, etc.
|
|
26
|
-
*
|
|
27
|
-
* This relies on the Scroll Gutter plugin which inserts additional
|
|
28
|
-
* whitespace at the end of the document when it overflows the viewport.
|
|
29
|
-
*/
|
|
30
|
-
export default class ClickAreaMobile extends React.Component<Props> {
|
|
31
|
-
private clickElementRef;
|
|
32
|
-
private handleClick;
|
|
33
|
-
render(): jsx.JSX.Element;
|
|
34
|
-
}
|