@atlaskit/editor-core 215.24.0 → 215.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/create-editor/ReactEditorView/handleEditorFocus.js +45 -54
- package/dist/cjs/create-editor/ReactEditorView.js +4 -32
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +5 -1
- package/dist/cjs/ui/EditorContentContainer/styles/blockTypeStyles.js +38 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView/handleEditorFocus.js +45 -49
- package/dist/es2019/create-editor/ReactEditorView.js +4 -30
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +18 -14
- package/dist/es2019/ui/EditorContentContainer/styles/blockTypeStyles.js +37 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView/handleEditorFocus.js +45 -53
- package/dist/esm/create-editor/ReactEditorView.js +4 -32
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +18 -14
- package/dist/esm/ui/EditorContentContainer/styles/blockTypeStyles.js +37 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +1 -0
- package/dist/types/presets/universal.d.ts +1 -0
- package/dist/types/presets/useUniversalPreset.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/blockTypeStyles.d.ts +2 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -0
- package/dist/types-ts4.5/presets/universal.d.ts +1 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/blockTypeStyles.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`4d73a0f30526b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d73a0f30526b) -
|
|
8
|
+
Cleanup platform_editor_react_18_autofocus_fix
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`b10f0252621b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b10f0252621b0) -
|
|
13
|
+
Set padding top and bottom on blockquote to avoid batch.css overrides
|
|
14
|
+
- [`342bed74cf6e9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/342bed74cf6e9) -
|
|
15
|
+
EDITOR-4037 Block menu selection extension click handling
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 215.24.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [`d5e222a3c15bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5e222a3c15bc) -
|
|
23
|
+
[ux] EDITOR-3945 Blockquote NodeSelection support
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 215.24.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -1,68 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.handleEditorFocus = handleEditorFocus;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
7
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
8
|
function handleEditorFocus(view) {
|
|
9
|
+
var _domSelection$getRang;
|
|
12
10
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
13
11
|
return;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (!window.getSelection) {
|
|
38
|
-
view === null || view === void 0 || view.focus();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
var domSelection = window.getSelection();
|
|
42
|
-
if (!domSelection || domSelection.rangeCount === 0) {
|
|
43
|
-
view === null || view === void 0 || view.focus();
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
var range = domSelection.getRangeAt(0);
|
|
47
|
-
// if selection is outside editor focus and exit
|
|
48
|
-
if (view && range.startContainer.contains(view.dom)) {
|
|
49
|
-
view.focus();
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
14
|
+
// Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
|
|
15
|
+
// where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
|
|
16
|
+
// Bail out in that scenario to prevent operating on an unmounted view.
|
|
17
|
+
if (view !== null && view !== void 0 && view.isDestroyed) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (!window.getSelection) {
|
|
24
|
+
view === null || view === void 0 || view.focus();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
var domSelection = window.getSelection();
|
|
28
|
+
if (!domSelection || domSelection.rangeCount === 0) {
|
|
29
|
+
view === null || view === void 0 || view.focus();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
52
32
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
// If not mocked properly in tests, getRangeAt may not exist.
|
|
34
|
+
var range = (_domSelection$getRang = domSelection.getRangeAt) === null || _domSelection$getRang === void 0 ? void 0 : _domSelection$getRang.call(domSelection, 0);
|
|
35
|
+
if (!range) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// if selection is outside editor focus and exit
|
|
40
|
+
if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
|
|
41
|
+
view.focus();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// set cursor/selection and focus
|
|
46
|
+
var anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
|
|
47
|
+
var head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
|
|
48
|
+
// if anchor or head < 0 focus and exit
|
|
49
|
+
if (anchor && anchor < 0 || head && head < 0) {
|
|
50
|
+
view === null || view === void 0 || view.focus();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (view && anchor) {
|
|
54
|
+
var selection = _state.TextSelection.create(view.state.doc, anchor, head);
|
|
55
|
+
var tr = view.state.tr.setSelection(selection);
|
|
56
|
+
view.dispatch(tr);
|
|
57
|
+
view.focus();
|
|
58
|
+
}
|
|
68
59
|
}
|
|
@@ -546,7 +546,7 @@ function ReactEditorView(props) {
|
|
|
546
546
|
// We don't need to focus anything in SSR.
|
|
547
547
|
return;
|
|
548
548
|
}
|
|
549
|
-
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)
|
|
549
|
+
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)) {
|
|
550
550
|
if (!mitigateScrollJump) {
|
|
551
551
|
var liveDocWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(editorView.state.doc);
|
|
552
552
|
if (!liveDocWithContent) {
|
|
@@ -648,38 +648,10 @@ function ReactEditorView(props) {
|
|
|
648
648
|
eventDispatcher: eventDispatcher,
|
|
649
649
|
transformer: contentTransformer.current
|
|
650
650
|
});
|
|
651
|
-
|
|
652
|
-
var _startTransition;
|
|
653
|
-
/**
|
|
654
|
-
* Defer using startTransition when it is available (in React 18) to fix
|
|
655
|
-
* autofocus bug where React 18's concurrent rendering mode interferes with
|
|
656
|
-
* setTimeout used in handleEditorFocus, causing autofocus to break.
|
|
657
|
-
*/
|
|
658
|
-
var react18OnlyStartTransition = (_startTransition = _react.default === null || _react.default === void 0 ? void 0 : _react.default.startTransition) !== null && _startTransition !== void 0 ? _startTransition : function (fn) {
|
|
659
|
-
return fn();
|
|
660
|
-
};
|
|
661
|
-
react18OnlyStartTransition(function () {
|
|
662
|
-
// Force React to re-render so consumers get a reference to the editor view
|
|
663
|
-
setEditorView(view);
|
|
664
|
-
});
|
|
665
|
-
} else {
|
|
666
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
667
|
-
if (!mitigateScrollJump) {
|
|
668
|
-
var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc);
|
|
669
|
-
if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
670
|
-
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(view);
|
|
671
|
-
}
|
|
672
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('cc_editor_focus_before_editor_on_load')) {
|
|
673
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state) && !(0, _document.isEmptyDocument)(view.state.doc)) {
|
|
674
|
-
(0, _focusEditorElement.focusEditorElement)(editorId.current);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
|
|
651
|
+
_react.default.startTransition(function () {
|
|
680
652
|
// Force React to re-render so consumers get a reference to the editor view
|
|
681
653
|
setEditorView(view);
|
|
682
|
-
}
|
|
654
|
+
});
|
|
683
655
|
} else if (viewRef.current && !node) {
|
|
684
656
|
// When the appearance is changed, React will call handleEditorViewRef with node === null
|
|
685
657
|
// to destroy the old EditorView, before calling this method again with node === div to
|
|
@@ -703,7 +675,7 @@ function ReactEditorView(props) {
|
|
|
703
675
|
(0, _nodeVisibility.nodeVisibilityManager)(viewRef.current.dom).disconnect();
|
|
704
676
|
viewRef.current = undefined;
|
|
705
677
|
}
|
|
706
|
-
}, [createEditorView, onEditorCreated, eventDispatcher,
|
|
678
|
+
}, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|
|
707
679
|
var createEditor = (0, _react.useCallback)(function (assistiveLabel, assistiveDescribedBy) {
|
|
708
680
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/_react.default.createElement("div", {
|
|
709
681
|
tabIndex: -1,
|
|
@@ -198,7 +198,11 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
198
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
199
199
|
_editorUGCTokenStyles.editorUGCTokensRefreshed,
|
|
200
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
201
|
-
_blockTypeStyles.blocktypeStyles,
|
|
201
|
+
_blockTypeStyles.blocktypeStyles, (0, _expValEquals.expValEquals)('platform_editor_block_menu', 'isEnabled', true) &&
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
203
|
+
_blockTypeStyles.blockquoteSelectedNodeStyles, (0, _expVal.expVal)('platform_editor_blockquote_zero_padding', 'isEnabled', false) ?
|
|
204
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
205
|
+
_blockTypeStyles.blockquoteZeroPadding : null,
|
|
202
206
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
203
207
|
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ?
|
|
204
208
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -3,10 +3,23 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.blocktypeStyles_without_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes = exports.blocktypeStyles = void 0;
|
|
6
|
+
exports.blocktypeStyles_without_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes = exports.blocktypeStyles = exports.blockquoteZeroPadding = exports.blockquoteSelectedNodeStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
9
|
|
|
10
|
+
// This style is needed to avoid Confluence's batch.css overrides that expand blockquote with extra padding after SSR.
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
12
|
+
var blockquoteZeroPadding = exports.blockquoteZeroPadding = (0, _react.css)({
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
|
+
'.ProseMirror': {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
16
|
+
'& blockquote': {
|
|
17
|
+
paddingTop: 0,
|
|
18
|
+
paddingBottom: 0
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
10
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
24
|
var blocktypeStyles = exports.blocktypeStyles = (0, _react.css)({
|
|
12
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -104,6 +117,30 @@ var blocktypeStyles = exports.blocktypeStyles = (0, _react.css)({
|
|
|
104
117
|
}
|
|
105
118
|
});
|
|
106
119
|
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
121
|
+
var blockquoteSelectedNodeStyles = exports.blockquoteSelectedNodeStyles = (0, _react.css)({
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
123
|
+
'.ProseMirror': {
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'& blockquote': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
127
|
+
'&.ak-editor-selected-node': {
|
|
128
|
+
background: "var(--ds-blanket-selected, #388BFF14)",
|
|
129
|
+
borderLeftColor: "var(--ds-border-selected, #1868DB)",
|
|
130
|
+
WebkitUserSelect: 'text',
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
132
|
+
'&::selection, *::selection': {
|
|
133
|
+
backgroundColor: 'transparent'
|
|
134
|
+
},
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
136
|
+
'&::-moz-selection, *::-moz-selection': {
|
|
137
|
+
backgroundColor: 'transparent'
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
107
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
108
145
|
var blocktypeStyles_fg_platform_editor_typography_ugc = exports.blocktypeStyles_fg_platform_editor_typography_ugc = (0, _react.css)({
|
|
109
146
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,57 +1,53 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
export function handleEditorFocus(view) {
|
|
3
|
+
var _domSelection$getRang;
|
|
5
4
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
6
5
|
return;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
view === null || view === void 0 ? void 0 : view.focus();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const domSelection = window.getSelection();
|
|
31
|
-
if (!domSelection || domSelection.rangeCount === 0) {
|
|
32
|
-
view === null || view === void 0 ? void 0 : view.focus();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const range = domSelection.getRangeAt(0);
|
|
36
|
-
// if selection is outside editor focus and exit
|
|
37
|
-
if (view && range.startContainer.contains(view.dom)) {
|
|
38
|
-
view.focus();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
8
|
+
// Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
|
|
9
|
+
// where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
|
|
10
|
+
// Bail out in that scenario to prevent operating on an unmounted view.
|
|
11
|
+
if (view !== null && view !== void 0 && view.isDestroyed) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!window.getSelection) {
|
|
18
|
+
view === null || view === void 0 ? void 0 : view.focus();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const domSelection = window.getSelection();
|
|
22
|
+
if (!domSelection || domSelection.rangeCount === 0) {
|
|
23
|
+
view === null || view === void 0 ? void 0 : view.focus();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
27
|
+
// If not mocked properly in tests, getRangeAt may not exist.
|
|
28
|
+
const range = (_domSelection$getRang = domSelection.getRangeAt) === null || _domSelection$getRang === void 0 ? void 0 : _domSelection$getRang.call(domSelection, 0);
|
|
29
|
+
if (!range) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// if selection is outside editor focus and exit
|
|
34
|
+
if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
|
|
35
|
+
view.focus();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// set cursor/selection and focus
|
|
40
|
+
const anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
|
|
41
|
+
const head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
|
|
42
|
+
// if anchor or head < 0 focus and exit
|
|
43
|
+
if (anchor && anchor < 0 || head && head < 0) {
|
|
44
|
+
view === null || view === void 0 ? void 0 : view.focus();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (view && anchor) {
|
|
48
|
+
const selection = TextSelection.create(view.state.doc, anchor, head);
|
|
49
|
+
const tr = view.state.tr.setSelection(selection);
|
|
50
|
+
view.dispatch(tr);
|
|
51
|
+
view.focus();
|
|
52
|
+
}
|
|
57
53
|
}
|
|
@@ -515,7 +515,7 @@ export function ReactEditorView(props) {
|
|
|
515
515
|
// We don't need to focus anything in SSR.
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)
|
|
518
|
+
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)) {
|
|
519
519
|
if (!mitigateScrollJump) {
|
|
520
520
|
const liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
|
|
521
521
|
if (!liveDocWithContent) {
|
|
@@ -599,36 +599,10 @@ export function ReactEditorView(props) {
|
|
|
599
599
|
eventDispatcher: eventDispatcher,
|
|
600
600
|
transformer: contentTransformer.current
|
|
601
601
|
});
|
|
602
|
-
|
|
603
|
-
var _startTransition;
|
|
604
|
-
/**
|
|
605
|
-
* Defer using startTransition when it is available (in React 18) to fix
|
|
606
|
-
* autofocus bug where React 18's concurrent rendering mode interferes with
|
|
607
|
-
* setTimeout used in handleEditorFocus, causing autofocus to break.
|
|
608
|
-
*/
|
|
609
|
-
const react18OnlyStartTransition = (_startTransition = React === null || React === void 0 ? void 0 : React.startTransition) !== null && _startTransition !== void 0 ? _startTransition : fn => fn();
|
|
610
|
-
react18OnlyStartTransition(() => {
|
|
611
|
-
// Force React to re-render so consumers get a reference to the editor view
|
|
612
|
-
setEditorView(view);
|
|
613
|
-
});
|
|
614
|
-
} else {
|
|
615
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
616
|
-
if (!mitigateScrollJump) {
|
|
617
|
-
const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
|
|
618
|
-
if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
619
|
-
focusTimeoutId.current = handleEditorFocus(view);
|
|
620
|
-
}
|
|
621
|
-
if (expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && fg('cc_editor_focus_before_editor_on_load')) {
|
|
622
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state) && !isEmptyDocument(view.state.doc)) {
|
|
623
|
-
focusEditorElement(editorId.current);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
602
|
+
React.startTransition(() => {
|
|
629
603
|
// Force React to re-render so consumers get a reference to the editor view
|
|
630
604
|
setEditorView(view);
|
|
631
|
-
}
|
|
605
|
+
});
|
|
632
606
|
} else if (viewRef.current && !node) {
|
|
633
607
|
// When the appearance is changed, React will call handleEditorViewRef with node === null
|
|
634
608
|
// to destroy the old EditorView, before calling this method again with node === div to
|
|
@@ -652,7 +626,7 @@ export function ReactEditorView(props) {
|
|
|
652
626
|
nodeVisibilityManager(viewRef.current.dom).disconnect();
|
|
653
627
|
viewRef.current = undefined;
|
|
654
628
|
}
|
|
655
|
-
}, [createEditorView, onEditorCreated, eventDispatcher,
|
|
629
|
+
}, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|
|
656
630
|
const createEditor = useCallback((assistiveLabel, assistiveDescribedBy) => {
|
|
657
631
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/React.createElement("div", {
|
|
658
632
|
tabIndex: -1,
|
|
@@ -14,7 +14,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
16
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
|
-
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
17
|
+
import { expVal, expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
18
18
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
19
19
|
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
20
20
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
@@ -22,19 +22,19 @@ import { annotationStyles } from './styles/annotationStyles';
|
|
|
22
22
|
import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/backgroundColorStyles';
|
|
23
23
|
import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles } from './styles/baseStyles';
|
|
24
24
|
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
25
|
-
import { blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
|
|
25
|
+
import { blockquoteSelectedNodeStyles, blocktypeStyles, blockquoteZeroPadding, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
|
|
26
26
|
import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
|
|
27
|
-
import { codeBlockStyles, codeBlockStylesWithEmUnits,
|
|
27
|
+
import { codeBgColorStyles, codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
28
28
|
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
29
29
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
30
30
|
import { cursorStyles } from './styles/cursorStyles';
|
|
31
31
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
32
32
|
import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
33
33
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
34
|
-
import { emojiDangerStyles, emojiStyles,
|
|
35
|
-
import { expandStyles,
|
|
36
|
-
import {
|
|
37
|
-
import { findReplaceStyles,
|
|
34
|
+
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
|
|
35
|
+
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
36
|
+
import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
|
|
37
|
+
import { findReplaceStyles, findReplaceStylesNew, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix } from './styles/findReplaceStyles';
|
|
38
38
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
39
39
|
import { firstFloatingToolbarButtonStyles } from './styles/floatingToolbarStyles';
|
|
40
40
|
import { fullPageEditorStyles } from './styles/fullPageEditorStyles';
|
|
@@ -44,23 +44,23 @@ import { indentationStyles } from './styles/indentationStyles';
|
|
|
44
44
|
import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles';
|
|
45
45
|
import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
|
|
46
46
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles } from './styles/link';
|
|
47
|
-
import { getDenseListStyles, listsStyles,
|
|
47
|
+
import { diffListStyles, getDenseListStyles, listsStyles, listsStylesMarginLayoutShiftFix, listsStylesSafariFix } from './styles/list';
|
|
48
48
|
import { mediaAlignmentStyles, mediaCaptionStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
49
|
-
import {
|
|
50
|
-
import { panelStyles, panelStylesMixin,
|
|
49
|
+
import { mentionDangerStyles, mentionNodeStyles, mentionsSelectionStyles, mentionsSelectionStylesWithSearchMatch, mentionsStyles } from './styles/mentions';
|
|
50
|
+
import { nestedPanelBorderStylesMixin, nestedPanelDangerStyles, panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
|
|
51
51
|
import { paragraphStylesOld, paragraphStylesOldWithScaledMargin, paragraphStylesUGCRefreshed, paragraphStylesWithScaledMargin } from './styles/paragraphStyles';
|
|
52
52
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
53
|
-
import { pragmaticResizerStyles,
|
|
53
|
+
import { pragmaticResizerStyles, pragmaticResizerStylesForTooltip, pragmaticResizerStylesSyncedBlock, pragmaticResizerStylesWithReducedEditorGutter, pragmaticStylesLayoutFirstNodeResizeHandleFix, resizerStyles } from './styles/resizerStyles';
|
|
54
54
|
import { dangerRuleStyles, ruleStyles } from './styles/rule';
|
|
55
55
|
import { scrollbarStyles } from './styles/scrollbarStyles';
|
|
56
56
|
import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
|
|
57
57
|
import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles';
|
|
58
58
|
import { shadowStyles } from './styles/shadowStyles';
|
|
59
|
-
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles
|
|
59
|
+
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
|
|
60
60
|
import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match } from './styles/statusStyles';
|
|
61
61
|
import { syncBlockStyles } from './styles/syncBlockStyles';
|
|
62
62
|
import { tableCommentEditorStyles, tableContainerOverflowY, tableContainerStyles, tableLayoutFixes } from './styles/tableStyles';
|
|
63
|
-
import {
|
|
63
|
+
import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionIconWithoutVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
64
64
|
import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
|
|
65
65
|
import { textColorStyles } from './styles/textColorStyles';
|
|
66
66
|
import { textHighlightStyle } from './styles/textHighlightStyles';
|
|
@@ -194,7 +194,11 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
194
194
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
195
195
|
editorUGCTokensRefreshed,
|
|
196
196
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
197
|
-
blocktypeStyles,
|
|
197
|
+
blocktypeStyles, expValEquals('platform_editor_block_menu', 'isEnabled', true) &&
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
199
|
+
blockquoteSelectedNodeStyles, expVal('platform_editor_blockquote_zero_padding', 'isEnabled', false) ?
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
201
|
+
blockquoteZeroPadding : null,
|
|
198
202
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
199
203
|
fg('platform_editor_typography_ugc') ?
|
|
200
204
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
+
// This style is needed to avoid Confluence's batch.css overrides that expand blockquote with extra padding after SSR.
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
export const blockquoteZeroPadding = css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
|
+
'.ProseMirror': {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
9
|
+
'& blockquote': {
|
|
10
|
+
paddingTop: 0,
|
|
11
|
+
paddingBottom: 0
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
3
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
17
|
export const blocktypeStyles = css({
|
|
5
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -97,6 +110,30 @@ export const blocktypeStyles = css({
|
|
|
97
110
|
}
|
|
98
111
|
});
|
|
99
112
|
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
114
|
+
export const blockquoteSelectedNodeStyles = css({
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
116
|
+
'.ProseMirror': {
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
118
|
+
'& blockquote': {
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'&.ak-editor-selected-node': {
|
|
121
|
+
background: "var(--ds-blanket-selected, #388BFF14)",
|
|
122
|
+
borderLeftColor: "var(--ds-border-selected, #1868DB)",
|
|
123
|
+
WebkitUserSelect: 'text',
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'&::selection, *::selection': {
|
|
126
|
+
backgroundColor: 'transparent'
|
|
127
|
+
},
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
129
|
+
'&::-moz-selection, *::-moz-selection': {
|
|
130
|
+
backgroundColor: 'transparent'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
100
137
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
101
138
|
export const blocktypeStyles_fg_platform_editor_typography_ugc = css({
|
|
102
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "215.
|
|
2
|
+
export const version = "215.24.1";
|
|
@@ -1,61 +1,53 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
export function handleEditorFocus(view) {
|
|
3
|
+
var _domSelection$getRang;
|
|
5
4
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
6
5
|
return;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (!window.getSelection) {
|
|
31
|
-
view === null || view === void 0 || view.focus();
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
var domSelection = window.getSelection();
|
|
35
|
-
if (!domSelection || domSelection.rangeCount === 0) {
|
|
36
|
-
view === null || view === void 0 || view.focus();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
var range = domSelection.getRangeAt(0);
|
|
40
|
-
// if selection is outside editor focus and exit
|
|
41
|
-
if (view && range.startContainer.contains(view.dom)) {
|
|
42
|
-
view.focus();
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
8
|
+
// Due to race conditions during editor lifecycle transitions (e.g. SPA route changes during opening or closing)
|
|
9
|
+
// where the view (and its internal docView) may have been destroyed, the timeout callback may fire on a stale view.
|
|
10
|
+
// Bail out in that scenario to prevent operating on an unmounted view.
|
|
11
|
+
if (view !== null && view !== void 0 && view.isDestroyed) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!window.getSelection) {
|
|
18
|
+
view === null || view === void 0 || view.focus();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var domSelection = window.getSelection();
|
|
22
|
+
if (!domSelection || domSelection.rangeCount === 0) {
|
|
23
|
+
view === null || view === void 0 || view.focus();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
45
26
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
// If not mocked properly in tests, getRangeAt may not exist.
|
|
28
|
+
var range = (_domSelection$getRang = domSelection.getRangeAt) === null || _domSelection$getRang === void 0 ? void 0 : _domSelection$getRang.call(domSelection, 0);
|
|
29
|
+
if (!range) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// if selection is outside editor focus and exit
|
|
34
|
+
if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
|
|
35
|
+
view.focus();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// set cursor/selection and focus
|
|
40
|
+
var anchor = view === null || view === void 0 ? void 0 : view.posAtDOM(range.startContainer, range.startOffset);
|
|
41
|
+
var head = view === null || view === void 0 ? void 0 : view.posAtDOM(range.endContainer, range.endOffset);
|
|
42
|
+
// if anchor or head < 0 focus and exit
|
|
43
|
+
if (anchor && anchor < 0 || head && head < 0) {
|
|
44
|
+
view === null || view === void 0 || view.focus();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (view && anchor) {
|
|
48
|
+
var selection = TextSelection.create(view.state.doc, anchor, head);
|
|
49
|
+
var tr = view.state.tr.setSelection(selection);
|
|
50
|
+
view.dispatch(tr);
|
|
51
|
+
view.focus();
|
|
52
|
+
}
|
|
61
53
|
}
|
|
@@ -537,7 +537,7 @@ export function ReactEditorView(props) {
|
|
|
537
537
|
// We don't need to focus anything in SSR.
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)
|
|
540
|
+
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state)) {
|
|
541
541
|
if (!mitigateScrollJump) {
|
|
542
542
|
var liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
|
|
543
543
|
if (!liveDocWithContent) {
|
|
@@ -639,38 +639,10 @@ export function ReactEditorView(props) {
|
|
|
639
639
|
eventDispatcher: eventDispatcher,
|
|
640
640
|
transformer: contentTransformer.current
|
|
641
641
|
});
|
|
642
|
-
|
|
643
|
-
var _startTransition;
|
|
644
|
-
/**
|
|
645
|
-
* Defer using startTransition when it is available (in React 18) to fix
|
|
646
|
-
* autofocus bug where React 18's concurrent rendering mode interferes with
|
|
647
|
-
* setTimeout used in handleEditorFocus, causing autofocus to break.
|
|
648
|
-
*/
|
|
649
|
-
var react18OnlyStartTransition = (_startTransition = React === null || React === void 0 ? void 0 : React.startTransition) !== null && _startTransition !== void 0 ? _startTransition : function (fn) {
|
|
650
|
-
return fn();
|
|
651
|
-
};
|
|
652
|
-
react18OnlyStartTransition(function () {
|
|
653
|
-
// Force React to re-render so consumers get a reference to the editor view
|
|
654
|
-
setEditorView(view);
|
|
655
|
-
});
|
|
656
|
-
} else {
|
|
657
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
658
|
-
if (!mitigateScrollJump) {
|
|
659
|
-
var isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
|
|
660
|
-
if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
661
|
-
focusTimeoutId.current = handleEditorFocus(view);
|
|
662
|
-
}
|
|
663
|
-
if (expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && fg('cc_editor_focus_before_editor_on_load')) {
|
|
664
|
-
if (shouldFocus && view.props.editable && view.props.editable(view.state) && !isEmptyDocument(view.state.doc)) {
|
|
665
|
-
focusEditorElement(editorId.current);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
642
|
+
React.startTransition(function () {
|
|
671
643
|
// Force React to re-render so consumers get a reference to the editor view
|
|
672
644
|
setEditorView(view);
|
|
673
|
-
}
|
|
645
|
+
});
|
|
674
646
|
} else if (viewRef.current && !node) {
|
|
675
647
|
// When the appearance is changed, React will call handleEditorViewRef with node === null
|
|
676
648
|
// to destroy the old EditorView, before calling this method again with node === div to
|
|
@@ -694,7 +666,7 @@ export function ReactEditorView(props) {
|
|
|
694
666
|
nodeVisibilityManager(viewRef.current.dom).disconnect();
|
|
695
667
|
viewRef.current = undefined;
|
|
696
668
|
}
|
|
697
|
-
}, [createEditorView, onEditorCreated, eventDispatcher,
|
|
669
|
+
}, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|
|
698
670
|
var createEditor = useCallback(function (assistiveLabel, assistiveDescribedBy) {
|
|
699
671
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/React.createElement("div", {
|
|
700
672
|
tabIndex: -1,
|
|
@@ -15,7 +15,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
|
-
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
18
|
+
import { expVal, expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
19
19
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
20
20
|
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
21
21
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
@@ -23,19 +23,19 @@ import { annotationStyles } from './styles/annotationStyles';
|
|
|
23
23
|
import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/backgroundColorStyles';
|
|
24
24
|
import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles } from './styles/baseStyles';
|
|
25
25
|
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
26
|
-
import { blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
|
|
26
|
+
import { blockquoteSelectedNodeStyles, blocktypeStyles, blockquoteZeroPadding, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
|
|
27
27
|
import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
|
|
28
|
-
import { codeBlockStyles, codeBlockStylesWithEmUnits,
|
|
28
|
+
import { codeBgColorStyles, codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
29
29
|
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
30
30
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
31
31
|
import { cursorStyles } from './styles/cursorStyles';
|
|
32
32
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
33
33
|
import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
34
34
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
35
|
-
import { emojiDangerStyles, emojiStyles,
|
|
36
|
-
import { expandStyles,
|
|
37
|
-
import {
|
|
38
|
-
import { findReplaceStyles,
|
|
35
|
+
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
|
|
36
|
+
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
37
|
+
import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
|
|
38
|
+
import { findReplaceStyles, findReplaceStylesNew, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix } from './styles/findReplaceStyles';
|
|
39
39
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
40
40
|
import { firstFloatingToolbarButtonStyles } from './styles/floatingToolbarStyles';
|
|
41
41
|
import { fullPageEditorStyles } from './styles/fullPageEditorStyles';
|
|
@@ -45,23 +45,23 @@ import { indentationStyles } from './styles/indentationStyles';
|
|
|
45
45
|
import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles';
|
|
46
46
|
import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
|
|
47
47
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles } from './styles/link';
|
|
48
|
-
import { getDenseListStyles, listsStyles,
|
|
48
|
+
import { diffListStyles, getDenseListStyles, listsStyles, listsStylesMarginLayoutShiftFix, listsStylesSafariFix } from './styles/list';
|
|
49
49
|
import { mediaAlignmentStyles, mediaCaptionStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
50
|
-
import {
|
|
51
|
-
import { panelStyles, panelStylesMixin,
|
|
50
|
+
import { mentionDangerStyles, mentionNodeStyles, mentionsSelectionStyles, mentionsSelectionStylesWithSearchMatch, mentionsStyles } from './styles/mentions';
|
|
51
|
+
import { nestedPanelBorderStylesMixin, nestedPanelDangerStyles, panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
|
|
52
52
|
import { paragraphStylesOld, paragraphStylesOldWithScaledMargin, paragraphStylesUGCRefreshed, paragraphStylesWithScaledMargin } from './styles/paragraphStyles';
|
|
53
53
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
54
|
-
import { pragmaticResizerStyles,
|
|
54
|
+
import { pragmaticResizerStyles, pragmaticResizerStylesForTooltip, pragmaticResizerStylesSyncedBlock, pragmaticResizerStylesWithReducedEditorGutter, pragmaticStylesLayoutFirstNodeResizeHandleFix, resizerStyles } from './styles/resizerStyles';
|
|
55
55
|
import { dangerRuleStyles, ruleStyles } from './styles/rule';
|
|
56
56
|
import { scrollbarStyles } from './styles/scrollbarStyles';
|
|
57
57
|
import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
|
|
58
58
|
import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles';
|
|
59
59
|
import { shadowStyles } from './styles/shadowStyles';
|
|
60
|
-
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles
|
|
60
|
+
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
|
|
61
61
|
import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match } from './styles/statusStyles';
|
|
62
62
|
import { syncBlockStyles } from './styles/syncBlockStyles';
|
|
63
63
|
import { tableCommentEditorStyles, tableContainerOverflowY, tableContainerStyles, tableLayoutFixes } from './styles/tableStyles';
|
|
64
|
-
import {
|
|
64
|
+
import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionIconWithoutVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
65
65
|
import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
|
|
66
66
|
import { textColorStyles } from './styles/textColorStyles';
|
|
67
67
|
import { textHighlightStyle } from './styles/textHighlightStyles';
|
|
@@ -190,7 +190,11 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
190
190
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
191
191
|
editorUGCTokensRefreshed,
|
|
192
192
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
193
|
-
blocktypeStyles,
|
|
193
|
+
blocktypeStyles, expValEquals('platform_editor_block_menu', 'isEnabled', true) &&
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
195
|
+
blockquoteSelectedNodeStyles, expVal('platform_editor_blockquote_zero_padding', 'isEnabled', false) ?
|
|
196
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
197
|
+
blockquoteZeroPadding : null,
|
|
194
198
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
195
199
|
fg('platform_editor_typography_ugc') ?
|
|
196
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
+
// This style is needed to avoid Confluence's batch.css overrides that expand blockquote with extra padding after SSR.
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
export var blockquoteZeroPadding = css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
|
+
'.ProseMirror': {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
9
|
+
'& blockquote': {
|
|
10
|
+
paddingTop: 0,
|
|
11
|
+
paddingBottom: 0
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
3
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
17
|
export var blocktypeStyles = css({
|
|
5
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -97,6 +110,30 @@ export var blocktypeStyles = css({
|
|
|
97
110
|
}
|
|
98
111
|
});
|
|
99
112
|
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
114
|
+
export var blockquoteSelectedNodeStyles = css({
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
116
|
+
'.ProseMirror': {
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
118
|
+
'& blockquote': {
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'&.ak-editor-selected-node': {
|
|
121
|
+
background: "var(--ds-blanket-selected, #388BFF14)",
|
|
122
|
+
borderLeftColor: "var(--ds-border-selected, #1868DB)",
|
|
123
|
+
WebkitUserSelect: 'text',
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'&::selection, *::selection': {
|
|
126
|
+
backgroundColor: 'transparent'
|
|
127
|
+
},
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
129
|
+
'&::-moz-selection, *::-moz-selection': {
|
|
130
|
+
backgroundColor: 'transparent'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
100
137
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
101
138
|
export var blocktypeStyles_fg_platform_editor_typography_ugc = css({
|
|
102
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "215.
|
|
2
|
+
export var version = "215.24.1";
|
|
@@ -399,6 +399,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
399
399
|
}, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
400
400
|
actions: {
|
|
401
401
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
402
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
402
403
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
403
404
|
};
|
|
404
405
|
commands: {
|
|
@@ -472,6 +472,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
472
472
|
}, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
473
473
|
actions: {
|
|
474
474
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
475
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
475
476
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
476
477
|
};
|
|
477
478
|
commands: {
|
|
@@ -399,6 +399,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
399
399
|
}, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
400
400
|
actions: {
|
|
401
401
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
402
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
402
403
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
403
404
|
};
|
|
404
405
|
commands: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const blockquoteZeroPadding: SerializedStyles;
|
|
2
3
|
export declare const blocktypeStyles: SerializedStyles;
|
|
4
|
+
export declare const blockquoteSelectedNodeStyles: SerializedStyles;
|
|
3
5
|
export declare const blocktypeStyles_fg_platform_editor_typography_ugc: SerializedStyles;
|
|
4
6
|
export declare const blocktypeStyles_without_fg_platform_editor_typography_ugc: SerializedStyles;
|
|
5
7
|
export declare const blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes: SerializedStyles;
|
|
@@ -564,6 +564,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
564
564
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
565
565
|
actions: {
|
|
566
566
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
567
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
567
568
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
568
569
|
};
|
|
569
570
|
commands: {
|
|
@@ -637,6 +637,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
637
637
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
638
638
|
actions: {
|
|
639
639
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
640
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
640
641
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
641
642
|
};
|
|
642
643
|
commands: {
|
|
@@ -564,6 +564,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
564
564
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"blockMenu", {
|
|
565
565
|
actions: {
|
|
566
566
|
getBlockMenuComponents: () => Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>;
|
|
567
|
+
isTransformOptionDisabled: (optionNodeTypeName: string, optionNodeTypeAttrs?: Record<string, unknown>) => boolean;
|
|
567
568
|
registerBlockMenuComponents: (blockMenuComponents: Array<import("@atlaskit/editor-plugins/block-menu").RegisterBlockMenuComponent>) => void;
|
|
568
569
|
};
|
|
569
570
|
commands: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const blockquoteZeroPadding: SerializedStyles;
|
|
2
3
|
export declare const blocktypeStyles: SerializedStyles;
|
|
4
|
+
export declare const blockquoteSelectedNodeStyles: SerializedStyles;
|
|
3
5
|
export declare const blocktypeStyles_fg_platform_editor_typography_ugc: SerializedStyles;
|
|
4
6
|
export declare const blocktypeStyles_without_fg_platform_editor_typography_ugc: SerializedStyles;
|
|
5
7
|
export declare const blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.
|
|
3
|
+
"version": "215.25.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^4.16.0",
|
|
68
68
|
"@atlaskit/task-decision": "^19.2.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^16.2.0",
|
|
70
70
|
"@atlaskit/tokens": "^9.0.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.11.0",
|
|
72
72
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"uuid": "^3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@atlaskit/editor-common": "^110.
|
|
86
|
+
"@atlaskit/editor-common": "^110.48.0",
|
|
87
87
|
"@atlaskit/link-provider": "^4.0.0",
|
|
88
88
|
"@atlaskit/media-core": "^37.0.0",
|
|
89
89
|
"react": "^18.2.0",
|