@atlaskit/editor-core 205.5.2 → 205.5.4
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 +18 -0
- package/dist/cjs/create-editor/ReactEditorView.js +1 -24
- package/dist/cjs/presets/default.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +8 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -25
- package/dist/es2019/presets/default.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/ui/ContentStyles/media.js +4 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -25
- package/dist/esm/presets/default.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +8 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +4 -2
- package/dist/types/presets/default-preset-type.d.ts +2 -0
- package/dist/types/presets/universal.d.ts +4 -2
- package/dist/types/presets/useUniversalPreset.d.ts +4 -2
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +4 -0
- package/dist/types-ts4.5/presets/default-preset-type.d.ts +2 -0
- package/dist/types-ts4.5/presets/universal.d.ts +4 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +4 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +2 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/package.json +23 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 205.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142352](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142352)
|
|
8
|
+
[`05903fde6d94d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05903fde6d94d) -
|
|
9
|
+
Internal change to use Compiled variant of `@atlaskit/primitives`.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 205.5.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#140969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140969)
|
|
17
|
+
[`b4ac22e73d43c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4ac22e73d43c) -
|
|
18
|
+
[ux] [ED-27253] hide selection states until editor has been interacted with
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 205.5.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -198,29 +198,6 @@ function ReactEditorView(props) {
|
|
|
198
198
|
selection = options.selectionAtStart ? _state2.Selection.atStart(doc) : _state2.Selection.atEnd(doc);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
202
|
-
if (!options.selectionAtStart) {
|
|
203
|
-
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
204
|
-
selection = selection ? _state2.Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// When in live mode, unless the document is empty we do not focus the editor and
|
|
208
|
-
// want to avoid placing the cursor inside any nodes which may show selection states
|
|
209
|
-
// or toolbar based on the cursor being inside them. As such we hard set the
|
|
210
|
-
// selection to the very start of the document regardless of whether that is a
|
|
211
|
-
// gapCursor or not.
|
|
212
|
-
// __livePage necessary because editorViewMode still thinks it is in 'edit' mode
|
|
213
|
-
// when this is called
|
|
214
|
-
if (doc && options.selectionAtStart && __livePage) {
|
|
215
|
-
selection = _state2.NodeSelection.create(doc, 0);
|
|
216
|
-
}
|
|
217
|
-
return _state2.EditorState.create({
|
|
218
|
-
schema: schema,
|
|
219
|
-
plugins: plugins,
|
|
220
|
-
doc: doc,
|
|
221
|
-
selection: selection
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
201
|
|
|
225
202
|
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
226
203
|
var patchedSelection = selection ? _state2.Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
@@ -230,7 +207,7 @@ function ReactEditorView(props) {
|
|
|
230
207
|
doc: doc,
|
|
231
208
|
selection: patchedSelection
|
|
232
209
|
});
|
|
233
|
-
}, [
|
|
210
|
+
}, [errorReporter, featureFlags, props.intl, props.portalProviderAPI, props.nodeViewPortalProviderAPI, props.editorProps, dispatchAnalyticsEvent, eventDispatcher, dispatch]);
|
|
234
211
|
var initialEditorState = (0, _react.useMemo)(function () {
|
|
235
212
|
return createEditorState({
|
|
236
213
|
props: props,
|
|
@@ -25,6 +25,7 @@ var _floatingToolbar = require("@atlaskit/editor-plugins/floating-toolbar");
|
|
|
25
25
|
var _focus = require("@atlaskit/editor-plugins/focus");
|
|
26
26
|
var _history = require("@atlaskit/editor-plugins/history");
|
|
27
27
|
var _hyperlink = require("@atlaskit/editor-plugins/hyperlink");
|
|
28
|
+
var _interaction = require("@atlaskit/editor-plugins/interaction");
|
|
28
29
|
var _paste = require("@atlaskit/editor-plugins/paste");
|
|
29
30
|
var _placeholder = require("@atlaskit/editor-plugins/placeholder");
|
|
30
31
|
var _primaryToolbar = require("@atlaskit/editor-plugins/primary-toolbar");
|
|
@@ -37,6 +38,7 @@ var _typeAhead = require("@atlaskit/editor-plugins/type-ahead");
|
|
|
37
38
|
var _undoRedo = require("@atlaskit/editor-plugins/undo-redo");
|
|
38
39
|
var _unsupportedContent = require("@atlaskit/editor-plugins/unsupported-content");
|
|
39
40
|
var _width = require("@atlaskit/editor-plugins/width");
|
|
41
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
40
42
|
var _isFullPage = require("../utils/is-full-page");
|
|
41
43
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
44
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // #region Imports
|
|
@@ -54,7 +56,7 @@ function createDefaultPreset(options) {
|
|
|
54
56
|
performanceTracking: options.performanceTracking
|
|
55
57
|
}], Boolean(options.allowAnalyticsGASV3)).add(_betterTypeHistory.betterTypeHistoryPlugin).add([_paste.pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
56
58
|
isFullPage: isFullPage
|
|
57
|
-
})]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
59
|
+
})]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) && (0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction')).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
58
60
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
59
61
|
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
60
62
|
contextualFormattingEnabled: isFullPage
|
|
@@ -74,9 +74,10 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
74
74
|
var scrollContentContainerRef = (0, _react.useRef)(null);
|
|
75
75
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
76
76
|
var editorAPI = props.editorAPI;
|
|
77
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['editorViewMode', 'primaryToolbar']),
|
|
77
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']),
|
|
78
78
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
79
|
-
primaryToolbarState = _useSharedPluginState.primaryToolbarState
|
|
79
|
+
primaryToolbarState = _useSharedPluginState.primaryToolbarState,
|
|
80
|
+
interactionState = _useSharedPluginState.interactionState;
|
|
80
81
|
var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
|
|
81
82
|
var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
82
83
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
@@ -202,7 +203,8 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
202
203
|
pluginHooks: props.pluginHooks,
|
|
203
204
|
featureFlags: props.featureFlags,
|
|
204
205
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
205
|
-
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
|
|
206
|
+
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
207
|
+
hasHadInteraction: interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction
|
|
206
208
|
})));
|
|
207
209
|
};
|
|
208
210
|
var hiddenStyle = (0, _react2.css)({
|
|
@@ -9,6 +9,7 @@ exports.FullPageContentArea = exports.EDITOR_CONTAINER = exports.CONTENT_AREA_TE
|
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _reactIntlNext = require("react-intl-next");
|
|
13
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -52,6 +53,10 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
}, []);
|
|
56
|
+
var interactionClassName;
|
|
57
|
+
if (props.hasHadInteraction !== undefined && (0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction')) {
|
|
58
|
+
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
59
|
+
}
|
|
55
60
|
return (0, _react2.jsx)("div", {
|
|
56
61
|
css: [
|
|
57
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -101,7 +106,9 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
101
106
|
css: (0, _StyledComponents.editorContentGutterStyle)()
|
|
102
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
103
108
|
,
|
|
104
|
-
className:
|
|
109
|
+
className: (0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction') ? (0, _classnames.default)('ak-editor-content-area', 'appearance-full-page', interactionClassName, {
|
|
110
|
+
'fabric-editor--full-width-mode': fullWidthMode
|
|
111
|
+
}) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
105
112
|
ref: contentAreaRef
|
|
106
113
|
}, !!props.customContentComponents && 'before' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
|
|
107
114
|
editorView: props.editorView,
|
|
@@ -14,6 +14,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
15
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
|
|
18
19
|
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
19
20
|
var _BeforeWrapper = require("./BeforeWrapper");
|
|
@@ -28,7 +29,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
28
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
30
|
|
|
30
31
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
31
|
-
var _useToolbarPortal, _props$customPrimaryT;
|
|
32
|
+
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
32
33
|
var _useState = (0, _react.useState)(false),
|
|
33
34
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
35
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -36,7 +37,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
36
37
|
var editorAPI = props.editorAPI;
|
|
37
38
|
|
|
38
39
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
39
|
-
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
40
|
+
var twoLineEditorToolbar = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? !!props.customPrimaryToolbarComponents && ((_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.length) !== 0 : !!props.customPrimaryToolbarComponents;
|
|
40
41
|
|
|
41
42
|
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
42
43
|
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
@@ -14,7 +14,7 @@ var _mediaCard = require("@atlaskit/media-card");
|
|
|
14
14
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
16
16
|
var mediaStyles = exports.mediaStyles = function mediaStyles() {
|
|
17
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t.media-filmstrip-list-item {\n\t\tcursor: pointer;\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n"])), _styles.mediaSingleSharedStyleNew, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBoxShadow);
|
|
17
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t.media-filmstrip-list-item {\n\t\tcursor: pointer;\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n\n\t.ak-editor-no-interaction #newFileExperienceWrapper {\n\t\tbox-shadow: none;\n\t}\n"])), _styles.mediaSingleSharedStyleNew, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBoxShadow);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -12,7 +12,7 @@ import { processRawValue, processRawValueWithoutValidation } from '@atlaskit/edi
|
|
|
12
12
|
import { ReactEditorViewContext } from '@atlaskit/editor-common/ui-react';
|
|
13
13
|
import { analyticsEventKey, getAnalyticsEventSeverity } from '@atlaskit/editor-common/utils/analytics';
|
|
14
14
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
15
|
-
import { EditorState,
|
|
15
|
+
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
16
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
@@ -173,29 +173,6 @@ export function ReactEditorView(props) {
|
|
|
173
173
|
selection = options.selectionAtStart ? Selection.atStart(doc) : Selection.atEnd(doc);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
177
|
-
if (!options.selectionAtStart) {
|
|
178
|
-
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
179
|
-
selection = selection ? Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// When in live mode, unless the document is empty we do not focus the editor and
|
|
183
|
-
// want to avoid placing the cursor inside any nodes which may show selection states
|
|
184
|
-
// or toolbar based on the cursor being inside them. As such we hard set the
|
|
185
|
-
// selection to the very start of the document regardless of whether that is a
|
|
186
|
-
// gapCursor or not.
|
|
187
|
-
// __livePage necessary because editorViewMode still thinks it is in 'edit' mode
|
|
188
|
-
// when this is called
|
|
189
|
-
if (doc && options.selectionAtStart && __livePage) {
|
|
190
|
-
selection = NodeSelection.create(doc, 0);
|
|
191
|
-
}
|
|
192
|
-
return EditorState.create({
|
|
193
|
-
schema,
|
|
194
|
-
plugins: plugins,
|
|
195
|
-
doc,
|
|
196
|
-
selection
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
176
|
|
|
200
177
|
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
201
178
|
const patchedSelection = selection ? Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
@@ -205,7 +182,7 @@ export function ReactEditorView(props) {
|
|
|
205
182
|
doc,
|
|
206
183
|
selection: patchedSelection
|
|
207
184
|
});
|
|
208
|
-
}, [
|
|
185
|
+
}, [errorReporter, featureFlags, props.intl, props.portalProviderAPI, props.nodeViewPortalProviderAPI, props.editorProps, dispatchAnalyticsEvent, eventDispatcher, dispatch]);
|
|
209
186
|
const initialEditorState = useMemo(() => createEditorState({
|
|
210
187
|
props,
|
|
211
188
|
doc: defaultValue,
|
|
@@ -18,6 +18,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-toolbar
|
|
|
18
18
|
import { focusPlugin } from '@atlaskit/editor-plugins/focus';
|
|
19
19
|
import { historyPlugin } from '@atlaskit/editor-plugins/history';
|
|
20
20
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
|
|
21
|
+
import { interactionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
21
22
|
import { pastePlugin } from '@atlaskit/editor-plugins/paste';
|
|
22
23
|
import { placeholderPlugin } from '@atlaskit/editor-plugins/placeholder';
|
|
23
24
|
import { primaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -30,6 +31,7 @@ import { typeAheadPlugin } from '@atlaskit/editor-plugins/type-ahead';
|
|
|
30
31
|
import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
|
|
31
32
|
import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
|
|
32
33
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
34
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
33
35
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
34
36
|
|
|
35
37
|
// #endregion
|
|
@@ -47,7 +49,7 @@ export function createDefaultPreset(options) {
|
|
|
47
49
|
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, {
|
|
48
50
|
...(options === null || options === void 0 ? void 0 : options.paste),
|
|
49
51
|
isFullPage
|
|
50
|
-
}]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
52
|
+
}]).add(clipboardPlugin).add(focusPlugin).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) && fg('platform_editor_no_selection_until_interaction')).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
51
53
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
52
54
|
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
|
|
53
55
|
contextualFormattingEnabled: isFullPage
|
|
@@ -57,8 +57,9 @@ export const FullPageEditor = props => {
|
|
|
57
57
|
const editorAPI = props.editorAPI;
|
|
58
58
|
const {
|
|
59
59
|
editorViewModeState,
|
|
60
|
-
primaryToolbarState
|
|
61
|
-
|
|
60
|
+
primaryToolbarState,
|
|
61
|
+
interactionState
|
|
62
|
+
} = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']);
|
|
62
63
|
const viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
63
64
|
const toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
64
65
|
let primaryToolbarComponents = props.primaryToolbarComponents;
|
|
@@ -186,7 +187,8 @@ export const FullPageEditor = props => {
|
|
|
186
187
|
pluginHooks: props.pluginHooks,
|
|
187
188
|
featureFlags: props.featureFlags,
|
|
188
189
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
189
|
-
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
|
|
190
|
+
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
191
|
+
hasHadInteraction: interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction
|
|
190
192
|
})));
|
|
191
193
|
};
|
|
192
194
|
const hiddenStyle = css({
|
|
@@ -7,6 +7,7 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx, useTheme } from '@emotion/react';
|
|
10
|
+
import classnames from 'classnames';
|
|
10
11
|
import { injectIntl } from 'react-intl-next';
|
|
11
12
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -38,6 +39,10 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
38
39
|
return containerRef.current;
|
|
39
40
|
}
|
|
40
41
|
}), []);
|
|
42
|
+
let interactionClassName;
|
|
43
|
+
if (props.hasHadInteraction !== undefined && fg('platform_editor_no_selection_until_interaction')) {
|
|
44
|
+
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
45
|
+
}
|
|
41
46
|
return jsx("div", {
|
|
42
47
|
css: [
|
|
43
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -89,7 +94,9 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
89
94
|
css: editorContentGutterStyle()
|
|
90
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
91
96
|
,
|
|
92
|
-
className:
|
|
97
|
+
className: fg('platform_editor_no_selection_until_interaction') ? classnames('ak-editor-content-area', 'appearance-full-page', interactionClassName, {
|
|
98
|
+
'fabric-editor--full-width-mode': fullWidthMode
|
|
99
|
+
}) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
93
100
|
ref: contentAreaRef
|
|
94
101
|
}, !!props.customContentComponents && 'before' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.before) : contentComponentClickWrapper(props.customContentComponents), jsx(PluginSlot, {
|
|
95
102
|
editorView: props.editorView,
|
|
@@ -12,19 +12,20 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
12
12
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
16
|
import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
16
17
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
17
18
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
18
19
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
19
20
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
20
|
-
var _useToolbarPortal, _props$customPrimaryT;
|
|
21
|
+
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
21
22
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
22
23
|
const {
|
|
23
24
|
editorAPI
|
|
24
25
|
} = props;
|
|
25
26
|
|
|
26
27
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
27
|
-
const twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
28
|
+
const twoLineEditorToolbar = editorExperiment('platform_editor_controls', 'variant1') ? !!props.customPrimaryToolbarComponents && ((_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.length) !== 0 : !!props.customPrimaryToolbarComponents;
|
|
28
29
|
|
|
29
30
|
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
30
31
|
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
@@ -195,6 +195,10 @@ export const mediaStyles = () => css`
|
|
|
195
195
|
.mediaGroupView-content-wrap.${akEditorSelectedNodeClassName} #newFileExperienceWrapper {
|
|
196
196
|
box-shadow: ${akEditorSelectedBoxShadow};
|
|
197
197
|
}
|
|
198
|
+
|
|
199
|
+
.ak-editor-no-interaction #newFileExperienceWrapper {
|
|
200
|
+
box-shadow: none;
|
|
201
|
+
}
|
|
198
202
|
`;
|
|
199
203
|
|
|
200
204
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "205.5.
|
|
2
|
+
export const version = "205.5.4";
|
|
@@ -16,7 +16,7 @@ import { processRawValue, processRawValueWithoutValidation } from '@atlaskit/edi
|
|
|
16
16
|
import { ReactEditorViewContext } from '@atlaskit/editor-common/ui-react';
|
|
17
17
|
import { analyticsEventKey, getAnalyticsEventSeverity } from '@atlaskit/editor-common/utils/analytics';
|
|
18
18
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
19
|
-
import { EditorState,
|
|
19
|
+
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
20
20
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
@@ -187,29 +187,6 @@ export function ReactEditorView(props) {
|
|
|
187
187
|
selection = options.selectionAtStart ? Selection.atStart(doc) : Selection.atEnd(doc);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
if (fg('platform_editor_no_cursor_on_live_doc_init')) {
|
|
191
|
-
if (!options.selectionAtStart) {
|
|
192
|
-
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
193
|
-
selection = selection ? Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// When in live mode, unless the document is empty we do not focus the editor and
|
|
197
|
-
// want to avoid placing the cursor inside any nodes which may show selection states
|
|
198
|
-
// or toolbar based on the cursor being inside them. As such we hard set the
|
|
199
|
-
// selection to the very start of the document regardless of whether that is a
|
|
200
|
-
// gapCursor or not.
|
|
201
|
-
// __livePage necessary because editorViewMode still thinks it is in 'edit' mode
|
|
202
|
-
// when this is called
|
|
203
|
-
if (doc && options.selectionAtStart && __livePage) {
|
|
204
|
-
selection = NodeSelection.create(doc, 0);
|
|
205
|
-
}
|
|
206
|
-
return EditorState.create({
|
|
207
|
-
schema: schema,
|
|
208
|
-
plugins: plugins,
|
|
209
|
-
doc: doc,
|
|
210
|
-
selection: selection
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
190
|
|
|
214
191
|
// Workaround for ED-3507: When media node is the last element, scrollIntoView throws an error
|
|
215
192
|
var patchedSelection = selection ? Selection.findFrom(selection.$head, -1, true) || undefined : undefined;
|
|
@@ -219,7 +196,7 @@ export function ReactEditorView(props) {
|
|
|
219
196
|
doc: doc,
|
|
220
197
|
selection: patchedSelection
|
|
221
198
|
});
|
|
222
|
-
}, [
|
|
199
|
+
}, [errorReporter, featureFlags, props.intl, props.portalProviderAPI, props.nodeViewPortalProviderAPI, props.editorProps, dispatchAnalyticsEvent, eventDispatcher, dispatch]);
|
|
223
200
|
var initialEditorState = useMemo(function () {
|
|
224
201
|
return createEditorState({
|
|
225
202
|
props: props,
|
|
@@ -21,6 +21,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-toolbar
|
|
|
21
21
|
import { focusPlugin } from '@atlaskit/editor-plugins/focus';
|
|
22
22
|
import { historyPlugin } from '@atlaskit/editor-plugins/history';
|
|
23
23
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
|
|
24
|
+
import { interactionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
24
25
|
import { pastePlugin } from '@atlaskit/editor-plugins/paste';
|
|
25
26
|
import { placeholderPlugin } from '@atlaskit/editor-plugins/placeholder';
|
|
26
27
|
import { primaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -33,6 +34,7 @@ import { typeAheadPlugin } from '@atlaskit/editor-plugins/type-ahead';
|
|
|
33
34
|
import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
|
|
34
35
|
import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
|
|
35
36
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
37
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
36
38
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
37
39
|
|
|
38
40
|
// #endregion
|
|
@@ -49,7 +51,7 @@ export function createDefaultPreset(options) {
|
|
|
49
51
|
performanceTracking: options.performanceTracking
|
|
50
52
|
}], Boolean(options.allowAnalyticsGASV3)).add(betterTypeHistoryPlugin).add([pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
51
53
|
isFullPage: isFullPage
|
|
52
|
-
})]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
54
|
+
})]).add(clipboardPlugin).add(focusPlugin).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) && fg('platform_editor_no_selection_until_interaction')).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
53
55
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
54
56
|
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
|
|
55
57
|
contextualFormattingEnabled: isFullPage
|
|
@@ -63,9 +63,10 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
63
63
|
var scrollContentContainerRef = useRef(null);
|
|
64
64
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
65
65
|
var editorAPI = props.editorAPI;
|
|
66
|
-
var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']),
|
|
66
|
+
var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']),
|
|
67
67
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
68
|
-
primaryToolbarState = _useSharedPluginState.primaryToolbarState
|
|
68
|
+
primaryToolbarState = _useSharedPluginState.primaryToolbarState,
|
|
69
|
+
interactionState = _useSharedPluginState.interactionState;
|
|
69
70
|
var viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
70
71
|
var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
71
72
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
@@ -191,7 +192,8 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
191
192
|
pluginHooks: props.pluginHooks,
|
|
192
193
|
featureFlags: props.featureFlags,
|
|
193
194
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
194
|
-
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
|
|
195
|
+
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
196
|
+
hasHadInteraction: interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction
|
|
195
197
|
})));
|
|
196
198
|
};
|
|
197
199
|
var hiddenStyle = css({
|
|
@@ -8,6 +8,7 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { jsx, useTheme } from '@emotion/react';
|
|
11
|
+
import classnames from 'classnames';
|
|
11
12
|
import { injectIntl } from 'react-intl-next';
|
|
12
13
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -41,6 +42,10 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
}, []);
|
|
45
|
+
var interactionClassName;
|
|
46
|
+
if (props.hasHadInteraction !== undefined && fg('platform_editor_no_selection_until_interaction')) {
|
|
47
|
+
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
48
|
+
}
|
|
44
49
|
return jsx("div", {
|
|
45
50
|
css: [
|
|
46
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -90,7 +95,9 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
90
95
|
css: editorContentGutterStyle()
|
|
91
96
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
92
97
|
,
|
|
93
|
-
className:
|
|
98
|
+
className: fg('platform_editor_no_selection_until_interaction') ? classnames('ak-editor-content-area', 'appearance-full-page', interactionClassName, {
|
|
99
|
+
'fabric-editor--full-width-mode': fullWidthMode
|
|
100
|
+
}) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
94
101
|
ref: contentAreaRef
|
|
95
102
|
}, !!props.customContentComponents && 'before' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.before) : contentComponentClickWrapper(props.customContentComponents), jsx(PluginSlot, {
|
|
96
103
|
editorView: props.editorView,
|
|
@@ -13,12 +13,13 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
13
13
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
17
|
import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
17
18
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
18
19
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
19
20
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
20
21
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
21
|
-
var _useToolbarPortal, _props$customPrimaryT;
|
|
22
|
+
var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
|
|
22
23
|
var _useState = useState(false),
|
|
23
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
25
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -26,7 +27,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
26
27
|
var editorAPI = props.editorAPI;
|
|
27
28
|
|
|
28
29
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
29
|
-
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
30
|
+
var twoLineEditorToolbar = editorExperiment('platform_editor_controls', 'variant1') ? !!props.customPrimaryToolbarComponents && ((_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.length) !== 0 : !!props.customPrimaryToolbarComponents;
|
|
30
31
|
|
|
31
32
|
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
32
33
|
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
@@ -8,7 +8,7 @@ import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor
|
|
|
8
8
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
10
|
export var mediaStyles = function mediaStyles() {
|
|
11
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t.media-filmstrip-list-item {\n\t\tcursor: pointer;\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n"])), mediaSingleSharedStyleNew, richMediaClassName, richMediaClassName, richMediaClassName, mediaInlineImageStyles, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, #091E4224)", akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", richMediaClassName, fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", richMediaClassName, inlinePlayerClassName, "var(--ds-border-warning, #E56910)", richMediaClassName, newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", akEditorSelectedNodeClassName, akEditorSelectedBoxShadow);
|
|
11
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t.media-filmstrip-list-item {\n\t\tcursor: pointer;\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n\n\t.ak-editor-no-interaction #newFileExperienceWrapper {\n\t\tbox-shadow: none;\n\t}\n"])), mediaSingleSharedStyleNew, richMediaClassName, richMediaClassName, richMediaClassName, mediaInlineImageStyles, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, #091E4224)", akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", richMediaClassName, fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", richMediaClassName, inlinePlayerClassName, "var(--ds-border-warning, #E56910)", richMediaClassName, newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", akEditorSelectedNodeClassName, akEditorSelectedBoxShadow);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "205.5.
|
|
2
|
+
export var version = "205.5.4";
|
|
@@ -5,7 +5,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
5
5
|
props: EditorProps;
|
|
6
6
|
prevProps?: EditorProps;
|
|
7
7
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
8
|
-
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
8
|
+
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
9
9
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
10
10
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
11
11
|
dependencies: import("packages/editor/editor-plugin-paste-options-toolbar/dist/types/pasteOptionsToolbarPluginType").PasteOptionsToolbarPluginDependencies;
|
|
@@ -1107,7 +1107,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1107
1107
|
};
|
|
1108
1108
|
}, import("@atlaskit/editor-plugins/context-identifier").ContextIdentifierPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1109
1109
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1110
|
-
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
1110
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1111
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1112
|
+
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1111
1113
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1112
1114
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
1113
1115
|
pluginConfiguration: import("@atlaskit/editor-plugins/paste").PastePluginOptions;
|
|
@@ -17,6 +17,7 @@ import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-to
|
|
|
17
17
|
import type { FocusPlugin } from '@atlaskit/editor-plugins/focus';
|
|
18
18
|
import type { HistoryPlugin } from '@atlaskit/editor-plugins/history';
|
|
19
19
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
|
|
20
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
20
21
|
import type { PastePlugin } from '@atlaskit/editor-plugins/paste';
|
|
21
22
|
import type { PlaceholderPlugin } from '@atlaskit/editor-plugins/placeholder';
|
|
22
23
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -54,6 +55,7 @@ export type DefaultPresetPlugins = [
|
|
|
54
55
|
BasePlugin,
|
|
55
56
|
ContextIdentifierPlugin,
|
|
56
57
|
CompositionPlugin,
|
|
58
|
+
InteractionPlugin | undefined,
|
|
57
59
|
FocusPlugin,
|
|
58
60
|
ClipboardPlugin,
|
|
59
61
|
PastePlugin,
|
|
@@ -57,7 +57,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
57
57
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
58
58
|
prevAppearance?: EditorAppearance;
|
|
59
59
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
60
|
-
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
60
|
+
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
61
61
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
62
62
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
63
63
|
dependencies: import("packages/editor/editor-plugin-paste-options-toolbar/dist/types/pasteOptionsToolbarPluginType").PasteOptionsToolbarPluginDependencies;
|
|
@@ -1159,7 +1159,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
1159
1159
|
};
|
|
1160
1160
|
}, import("@atlaskit/editor-plugins/context-identifier").ContextIdentifierPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1161
1161
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1162
|
-
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
1162
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1163
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1164
|
+
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1163
1165
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1164
1166
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
1165
1167
|
pluginConfiguration: import("@atlaskit/editor-plugins/paste").PastePluginOptions;
|
|
@@ -5,7 +5,7 @@ interface PresetProps {
|
|
|
5
5
|
props: EditorProps;
|
|
6
6
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
7
7
|
}
|
|
8
|
-
export default function useUniversalPreset({ props, initialPluginConfiguration }: PresetProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
8
|
+
export default function useUniversalPreset({ props, initialPluginConfiguration }: PresetProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
9
9
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
10
10
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
11
11
|
dependencies: import("packages/editor/editor-plugin-paste-options-toolbar/dist/types/pasteOptionsToolbarPluginType").PasteOptionsToolbarPluginDependencies;
|
|
@@ -1107,7 +1107,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
1107
1107
|
};
|
|
1108
1108
|
}, import("@atlaskit/editor-plugins/context-identifier").ContextIdentifierPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1109
1109
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1110
|
-
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
1110
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1111
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1112
|
+
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1111
1113
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1112
1114
|
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"clipboard", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"paste", {
|
|
1113
1115
|
pluginConfiguration: import("@atlaskit/editor-plugins/paste").PastePluginOptions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
+
import { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
4
5
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
5
6
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
6
7
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
@@ -9,6 +10,7 @@ export type ComponentProps = EditorAppearanceComponentProps<[
|
|
|
9
10
|
OptionalPlugin<EditorViewModePlugin>,
|
|
10
11
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
11
12
|
OptionalPlugin<SelectionToolbarPlugin>,
|
|
13
|
+
OptionalPlugin<InteractionPlugin>,
|
|
12
14
|
...ToolbarEditorPlugins
|
|
13
15
|
]>;
|
|
14
16
|
export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
|
|
@@ -36,6 +36,7 @@ interface FullPageEditorContentAreaProps {
|
|
|
36
36
|
featureFlags?: FeatureFlags;
|
|
37
37
|
viewMode: ViewMode | undefined;
|
|
38
38
|
isEditorToolbarHidden?: boolean;
|
|
39
|
+
hasHadInteraction?: boolean;
|
|
39
40
|
}
|
|
40
41
|
export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
|
|
41
42
|
export declare const EDITOR_CONTAINER = "ak-editor-container";
|
|
@@ -78,6 +78,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
78
78
|
"base",
|
|
79
79
|
"contextIdentifier",
|
|
80
80
|
"composition",
|
|
81
|
+
string,
|
|
81
82
|
"focus",
|
|
82
83
|
"clipboard",
|
|
83
84
|
"paste",
|
|
@@ -1387,6 +1388,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1387
1388
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1388
1389
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1389
1390
|
}, undefined>,
|
|
1391
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1392
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1393
|
+
}, undefined> | undefined,
|
|
1390
1394
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1391
1395
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1392
1396
|
}, undefined>,
|
|
@@ -17,6 +17,7 @@ import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugins/floating-to
|
|
|
17
17
|
import type { FocusPlugin } from '@atlaskit/editor-plugins/focus';
|
|
18
18
|
import type { HistoryPlugin } from '@atlaskit/editor-plugins/history';
|
|
19
19
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugins/hyperlink';
|
|
20
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
20
21
|
import type { PastePlugin } from '@atlaskit/editor-plugins/paste';
|
|
21
22
|
import type { PlaceholderPlugin } from '@atlaskit/editor-plugins/placeholder';
|
|
22
23
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -54,6 +55,7 @@ export type DefaultPresetPlugins = [
|
|
|
54
55
|
BasePlugin,
|
|
55
56
|
ContextIdentifierPlugin,
|
|
56
57
|
CompositionPlugin,
|
|
58
|
+
InteractionPlugin | undefined,
|
|
57
59
|
FocusPlugin,
|
|
58
60
|
ClipboardPlugin,
|
|
59
61
|
PastePlugin,
|
|
@@ -130,6 +130,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
130
130
|
"base",
|
|
131
131
|
"contextIdentifier",
|
|
132
132
|
"composition",
|
|
133
|
+
string,
|
|
133
134
|
"focus",
|
|
134
135
|
"clipboard",
|
|
135
136
|
"paste",
|
|
@@ -1439,6 +1440,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
1439
1440
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1440
1441
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1441
1442
|
}, undefined>,
|
|
1443
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1444
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1445
|
+
}, undefined> | undefined,
|
|
1442
1446
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1443
1447
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1444
1448
|
}, undefined>,
|
|
@@ -78,6 +78,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
78
78
|
"base",
|
|
79
79
|
"contextIdentifier",
|
|
80
80
|
"composition",
|
|
81
|
+
string,
|
|
81
82
|
"focus",
|
|
82
83
|
"clipboard",
|
|
83
84
|
"paste",
|
|
@@ -1387,6 +1388,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
1387
1388
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
|
|
1388
1389
|
sharedState: import("@atlaskit/editor-plugins/composition").CompositionState;
|
|
1389
1390
|
}, undefined>,
|
|
1391
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"interaction", {
|
|
1392
|
+
sharedState: import("@atlaskit/editor-plugins/interaction").InteractionState;
|
|
1393
|
+
}, undefined> | undefined,
|
|
1390
1394
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
|
|
1391
1395
|
sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
|
|
1392
1396
|
}, undefined>,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
+
import { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
4
5
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
5
6
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
6
7
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
@@ -9,6 +10,7 @@ export type ComponentProps = EditorAppearanceComponentProps<[
|
|
|
9
10
|
OptionalPlugin<EditorViewModePlugin>,
|
|
10
11
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
11
12
|
OptionalPlugin<SelectionToolbarPlugin>,
|
|
13
|
+
OptionalPlugin<InteractionPlugin>,
|
|
12
14
|
...ToolbarEditorPlugins
|
|
13
15
|
]>;
|
|
14
16
|
export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
|
|
@@ -38,6 +38,7 @@ interface FullPageEditorContentAreaProps {
|
|
|
38
38
|
featureFlags?: FeatureFlags;
|
|
39
39
|
viewMode: ViewMode | undefined;
|
|
40
40
|
isEditorToolbarHidden?: boolean;
|
|
41
|
+
hasHadInteraction?: boolean;
|
|
41
42
|
}
|
|
42
43
|
export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
|
|
43
44
|
export declare const EDITOR_CONTAINER = "ak-editor-container";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "205.5.
|
|
3
|
+
"version": "205.5.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^23.0.0",
|
|
48
48
|
"@atlaskit/css": "^0.10.0",
|
|
49
|
-
"@atlaskit/editor-common": "^103.
|
|
49
|
+
"@atlaskit/editor-common": "^103.12.0",
|
|
50
50
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
51
51
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^2.4.0",
|
|
53
|
-
"@atlaskit/editor-plugins": "^8.
|
|
53
|
+
"@atlaskit/editor-plugins": "^8.2.0",
|
|
54
54
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
55
55
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
56
56
|
"@atlaskit/emoji": "^69.0.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@atlaskit/adf-utils": "^19.19.0",
|
|
91
91
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
92
92
|
"@atlaskit/collab-provider": "^10.14.0",
|
|
93
|
-
"@atlaskit/editor-plugin-annotation": "^2.
|
|
93
|
+
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
94
94
|
"@atlaskit/editor-plugin-card": "^5.4.0",
|
|
95
95
|
"@atlaskit/editor-plugin-list": "^4.2.0",
|
|
96
96
|
"@atlaskit/editor-plugin-paste": "^3.2.0",
|
|
@@ -327,10 +327,6 @@
|
|
|
327
327
|
"type": "boolean",
|
|
328
328
|
"referenceOnly": true
|
|
329
329
|
},
|
|
330
|
-
"platform_editor_long_node_expand": {
|
|
331
|
-
"type": "boolean",
|
|
332
|
-
"referenceOnly": true
|
|
333
|
-
},
|
|
334
330
|
"editor_a11y_refactor_find_replace_style": {
|
|
335
331
|
"type": "boolean",
|
|
336
332
|
"referenceOnly": true
|
|
@@ -343,6 +339,10 @@
|
|
|
343
339
|
"type": "boolean",
|
|
344
340
|
"referenceOnly": true
|
|
345
341
|
},
|
|
342
|
+
"editor_a11y_tab_does_not_close_menus": {
|
|
343
|
+
"type": "boolean",
|
|
344
|
+
"referenceOnly": true
|
|
345
|
+
},
|
|
346
346
|
"platform_editor_floating_toolbar_padding_fix": {
|
|
347
347
|
"type": "boolean",
|
|
348
348
|
"referenceOnly": true
|
|
@@ -571,6 +571,9 @@
|
|
|
571
571
|
"platform_editor_no_cursor_on_live_doc_init": {
|
|
572
572
|
"type": "boolean"
|
|
573
573
|
},
|
|
574
|
+
"platform_editor_no_selection_until_interaction": {
|
|
575
|
+
"type": "boolean"
|
|
576
|
+
},
|
|
574
577
|
"platform_editor_controls_no_toolbar_space": {
|
|
575
578
|
"type": "boolean",
|
|
576
579
|
"referenceOnly": true
|
|
@@ -658,6 +661,10 @@
|
|
|
658
661
|
"type": "boolean",
|
|
659
662
|
"referenceOnly": true
|
|
660
663
|
},
|
|
664
|
+
"platform_editor_user_intent_plugin": {
|
|
665
|
+
"type": "boolean",
|
|
666
|
+
"referenceOnly": true
|
|
667
|
+
},
|
|
661
668
|
"editor_a11y_aria_label_removal_popup": {
|
|
662
669
|
"type": "boolean",
|
|
663
670
|
"referenceOnly": true
|
|
@@ -665,6 +672,14 @@
|
|
|
665
672
|
"platform_editor_controls_patch_6": {
|
|
666
673
|
"type": "boolean",
|
|
667
674
|
"referenceOnly": true
|
|
675
|
+
},
|
|
676
|
+
"platform_editor_controls_table_picker": {
|
|
677
|
+
"type": "boolean",
|
|
678
|
+
"referenceOnly": true
|
|
679
|
+
},
|
|
680
|
+
"platform_editor_tables_table_selector": {
|
|
681
|
+
"type": "boolean",
|
|
682
|
+
"referenceOnly": true
|
|
668
683
|
}
|
|
669
684
|
},
|
|
670
685
|
"stricter": {
|