@atlaskit/editor-core 211.2.2 → 211.2.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 +14 -0
- package/dist/cjs/presets/default.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +6 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +4 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +6 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +4 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -2
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +6 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 211.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
|
|
8
|
+
replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 211.2.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 211.2.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -42,6 +42,7 @@ var _unsupportedContent = require("@atlaskit/editor-plugins/unsupported-content"
|
|
|
42
42
|
var _width = require("@atlaskit/editor-plugins/width");
|
|
43
43
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
44
44
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
45
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
45
46
|
var _isFullPage = require("../utils/is-full-page");
|
|
46
47
|
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; }
|
|
47
48
|
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
|
|
@@ -69,7 +70,9 @@ function createDefaultPreset(options) {
|
|
|
69
70
|
return (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin');
|
|
70
71
|
}).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
71
72
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
72
|
-
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([_toolbar.toolbarPlugin, options.toolbar || {}], (0,
|
|
73
|
+
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([_toolbar.toolbarPlugin, options.toolbar || {}], (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
74
|
+
exposure: true
|
|
75
|
+
})).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
73
76
|
contextualFormattingEnabled: isFullPage
|
|
74
77
|
}]).maybeAdd(_undoRedo.undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([_blockType.blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
75
78
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -226,7 +226,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
226
226
|
}, (0, _react2.jsx)(_Toolbar.MainToolbar, {
|
|
227
227
|
useStickyToolbar: useStickyToolbar,
|
|
228
228
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
229
|
-
}, (0,
|
|
229
|
+
}, (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
230
230
|
editorAPI: editorAPI,
|
|
231
231
|
editorView: editorView,
|
|
232
232
|
editorAppearance: appearance
|
|
@@ -15,6 +15,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
19
|
var _templateObject, _templateObject2;
|
|
19
20
|
/**
|
|
20
21
|
* @jsxRuntime classic
|
|
@@ -112,11 +113,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
112
113
|
return (
|
|
113
114
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
114
115
|
(0, _react2.jsx)("div", {
|
|
115
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, (0,
|
|
116
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] : [
|
|
116
117
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
117
118
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
118
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
119
|
-
(0,
|
|
120
|
+
(0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)), stickyToolbarWrapperStyle]
|
|
120
121
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
121
122
|
,
|
|
122
123
|
style: {
|
|
@@ -133,11 +134,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
133
134
|
return (
|
|
134
135
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
135
136
|
(0, _react2.jsx)("div", {
|
|
136
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, (0,
|
|
137
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] :
|
|
137
138
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
138
139
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
139
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
140
|
-
(0,
|
|
141
|
+
(0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)),
|
|
141
142
|
"data-testid": "ak-editor-main-toolbar"
|
|
142
143
|
}, props.children)
|
|
143
144
|
);
|
|
@@ -16,7 +16,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
16
16
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
20
|
var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
|
|
22
21
|
var _FullPageContentArea = require("./FullPageContentArea");
|
|
@@ -154,7 +153,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
154
153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
155
154
|
'--ak-editor-fullpage-toolbar-height': (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)()
|
|
156
155
|
}
|
|
157
|
-
}, !isEditorToolbarHidden && ((0,
|
|
156
|
+
}, !isEditorToolbarHidden && ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? (0, _react2.jsx)(_reactIntlNext.IntlProvider, {
|
|
158
157
|
locale: "en"
|
|
159
158
|
}, (0, _react2.jsx)(_FullPageToolbarNext.FullPageToolbarNext, {
|
|
160
159
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
@@ -69,7 +69,8 @@ var DynamicStyleToolbarWithSizeDetector = function DynamicStyleToolbarWithSizeDe
|
|
|
69
69
|
var toolbarStyle = (0, _react.useMemo)(function () {
|
|
70
70
|
var toolbarWidth = (0, _isFullPage.isFullPage)(props.appearance) && props.twoLineEditorToolbar ? _types.ToolbarSize.S : _types.ToolbarSize.M;
|
|
71
71
|
var toolbarMinWidth = (0, _toolbarSize.toolbarSizeToWidth)(toolbarWidth, props.appearance);
|
|
72
|
-
var
|
|
72
|
+
var isPreviewPanelResponsivenessEnabled = (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
73
|
+
var minWidth = "min-width: ".concat(props.hasMinWidth ? "".concat(toolbarMinWidth, "px") : isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px');
|
|
73
74
|
return [toolbar, minWidth];
|
|
74
75
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
75
76
|
return (
|
|
@@ -105,15 +106,16 @@ var StaticStyleToolbarWithSizeDetector = function StaticStyleToolbarWithSizeDete
|
|
|
105
106
|
var minWidthValue = (0, _react.useMemo)(function () {
|
|
106
107
|
if (props.hasMinWidth) {
|
|
107
108
|
var toolbarWidth = (0, _isFullPage.isFullPage)(props.appearance) && props.twoLineEditorToolbar ? _types.ToolbarSize.S : _types.ToolbarSize.M;
|
|
108
|
-
return (0, _toolbarSize.toolbarSizeToWidth)(toolbarWidth, props.appearance);
|
|
109
|
+
return "".concat((0, _toolbarSize.toolbarSizeToWidth)(toolbarWidth, props.appearance), "px");
|
|
109
110
|
} else {
|
|
110
|
-
|
|
111
|
+
var isPreviewPanelResponsivenessEnabled = (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
112
|
+
return isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px';
|
|
111
113
|
}
|
|
112
114
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
113
115
|
return (0, _react2.jsx)("div", {
|
|
114
116
|
css: staticToolbar,
|
|
115
117
|
style: {
|
|
116
|
-
minWidth:
|
|
118
|
+
minWidth: minWidthValue
|
|
117
119
|
}
|
|
118
120
|
}, (0, _react2.jsx)(_widthDetector.WidthObserver, {
|
|
119
121
|
setWidth: setWidth
|
|
@@ -35,6 +35,7 @@ import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-c
|
|
|
35
35
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
36
36
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
37
37
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
38
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
38
39
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
39
40
|
|
|
40
41
|
// #endregion
|
|
@@ -60,7 +61,9 @@ export function createDefaultPreset(options) {
|
|
|
60
61
|
}
|
|
61
62
|
}], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
62
63
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
63
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
64
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}], editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
65
|
+
exposure: true
|
|
66
|
+
})).add([primaryToolbarPlugin, {
|
|
64
67
|
contextualFormattingEnabled: isFullPage
|
|
65
68
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, {
|
|
66
69
|
...options.blockType,
|
|
@@ -227,7 +227,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
227
227
|
}, jsx(MainToolbar, {
|
|
228
228
|
useStickyToolbar: useStickyToolbar,
|
|
229
229
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
230
|
-
},
|
|
230
|
+
}, editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
231
231
|
editorAPI: editorAPI,
|
|
232
232
|
editorView: editorView,
|
|
233
233
|
editorAppearance: appearance
|
|
@@ -10,6 +10,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
14
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
15
|
const akEditorMenuZIndex = 500;
|
|
15
16
|
const akEditorToolbarKeylineHeight = 2;
|
|
@@ -157,11 +158,11 @@ const StickyToolbar = props => {
|
|
|
157
158
|
return (
|
|
158
159
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
159
160
|
jsx("div", {
|
|
160
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew,
|
|
161
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, editorExperiment('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] : [
|
|
161
162
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
162
163
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
163
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
164
|
-
|
|
165
|
+
editorExperiment('platform_editor_toolbar_aifc', true)), stickyToolbarWrapperStyle]
|
|
165
166
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
166
167
|
,
|
|
167
168
|
style: {
|
|
@@ -177,11 +178,11 @@ const StickyToolbar = props => {
|
|
|
177
178
|
const FixedToolbar = props =>
|
|
178
179
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
179
180
|
jsx("div", {
|
|
180
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh,
|
|
181
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, editorExperiment('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] :
|
|
181
182
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
182
183
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
183
184
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
184
|
-
|
|
185
|
+
editorExperiment('platform_editor_toolbar_aifc', true)),
|
|
185
186
|
"data-testid": "ak-editor-main-toolbar"
|
|
186
187
|
}, props.children);
|
|
187
188
|
|
|
@@ -13,7 +13,6 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
14
14
|
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
19
18
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -139,7 +138,7 @@ export const FullPageEditor = props => {
|
|
|
139
138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
140
139
|
'--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
|
|
141
140
|
}
|
|
142
|
-
}, !isEditorToolbarHidden && (
|
|
141
|
+
}, !isEditorToolbarHidden && (editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
143
142
|
locale: "en"
|
|
144
143
|
}, jsx(FullPageToolbarNext, {
|
|
145
144
|
toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
|
|
@@ -56,7 +56,8 @@ const DynamicStyleToolbarWithSizeDetector = props => {
|
|
|
56
56
|
const toolbarStyle = useMemo(() => {
|
|
57
57
|
const toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
58
58
|
const toolbarMinWidth = toolbarSizeToWidth(toolbarWidth, props.appearance);
|
|
59
|
-
const
|
|
59
|
+
const isPreviewPanelResponsivenessEnabled = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
60
|
+
const minWidth = `min-width: ${props.hasMinWidth ? `${toolbarMinWidth}px` : isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px'}`;
|
|
60
61
|
return [toolbar, minWidth];
|
|
61
62
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
62
63
|
return (
|
|
@@ -89,15 +90,16 @@ const StaticStyleToolbarWithSizeDetector = props => {
|
|
|
89
90
|
const minWidthValue = useMemo(() => {
|
|
90
91
|
if (props.hasMinWidth) {
|
|
91
92
|
const toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
92
|
-
return toolbarSizeToWidth(toolbarWidth, props.appearance)
|
|
93
|
+
return `${toolbarSizeToWidth(toolbarWidth, props.appearance)}px`;
|
|
93
94
|
} else {
|
|
94
|
-
|
|
95
|
+
const isPreviewPanelResponsivenessEnabled = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
96
|
+
return isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px';
|
|
95
97
|
}
|
|
96
98
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
97
99
|
return jsx("div", {
|
|
98
100
|
css: staticToolbar,
|
|
99
101
|
style: {
|
|
100
|
-
minWidth:
|
|
102
|
+
minWidth: minWidthValue
|
|
101
103
|
}
|
|
102
104
|
}, jsx(WidthObserver, {
|
|
103
105
|
setWidth: setWidth
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "211.2.
|
|
2
|
+
export const version = "211.2.3";
|
|
@@ -38,6 +38,7 @@ import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-c
|
|
|
38
38
|
import { widthPlugin } from '@atlaskit/editor-plugins/width';
|
|
39
39
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
40
40
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
41
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
41
42
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
42
43
|
|
|
43
44
|
// #endregion
|
|
@@ -64,7 +65,9 @@ export function createDefaultPreset(options) {
|
|
|
64
65
|
return fg('platform_editor_use_preferences_plugin');
|
|
65
66
|
}).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
66
67
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
67
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
68
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}], editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
69
|
+
exposure: true
|
|
70
|
+
})).add([primaryToolbarPlugin, {
|
|
68
71
|
contextualFormattingEnabled: isFullPage
|
|
69
72
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
70
73
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -218,7 +218,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
218
218
|
}, jsx(MainToolbar, {
|
|
219
219
|
useStickyToolbar: useStickyToolbar,
|
|
220
220
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
221
|
-
},
|
|
221
|
+
}, editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
222
222
|
editorAPI: editorAPI,
|
|
223
223
|
editorView: editorView,
|
|
224
224
|
editorAppearance: appearance
|
|
@@ -15,6 +15,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
19
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
19
20
|
var akEditorMenuZIndex = 500;
|
|
20
21
|
var akEditorToolbarKeylineHeight = 2;
|
|
@@ -105,11 +106,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
105
106
|
return (
|
|
106
107
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
107
108
|
jsx("div", {
|
|
108
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew,
|
|
109
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, editorExperiment('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] : [
|
|
109
110
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
110
111
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
111
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
112
|
-
|
|
113
|
+
editorExperiment('platform_editor_toolbar_aifc', true)), stickyToolbarWrapperStyle]
|
|
113
114
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
114
115
|
,
|
|
115
116
|
style: {
|
|
@@ -126,11 +127,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
126
127
|
return (
|
|
127
128
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
128
129
|
jsx("div", {
|
|
129
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh,
|
|
130
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, editorExperiment('platform_editor_toolbar_aifc', true) && mainToolbarWithoutLeftPadding] :
|
|
130
131
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
131
132
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
132
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
|
-
|
|
134
|
+
editorExperiment('platform_editor_toolbar_aifc', true)),
|
|
134
135
|
"data-testid": "ak-editor-main-toolbar"
|
|
135
136
|
}, props.children)
|
|
136
137
|
);
|
|
@@ -14,7 +14,6 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
|
|
20
19
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -144,7 +143,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
144
143
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
145
144
|
'--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
|
|
146
145
|
}
|
|
147
|
-
}, !isEditorToolbarHidden && (
|
|
146
|
+
}, !isEditorToolbarHidden && (editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
148
147
|
locale: "en"
|
|
149
148
|
}, jsx(FullPageToolbarNext, {
|
|
150
149
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
@@ -59,7 +59,8 @@ var DynamicStyleToolbarWithSizeDetector = function DynamicStyleToolbarWithSizeDe
|
|
|
59
59
|
var toolbarStyle = useMemo(function () {
|
|
60
60
|
var toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
61
61
|
var toolbarMinWidth = toolbarSizeToWidth(toolbarWidth, props.appearance);
|
|
62
|
-
var
|
|
62
|
+
var isPreviewPanelResponsivenessEnabled = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
63
|
+
var minWidth = "min-width: ".concat(props.hasMinWidth ? "".concat(toolbarMinWidth, "px") : isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px');
|
|
63
64
|
return [toolbar, minWidth];
|
|
64
65
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
65
66
|
return (
|
|
@@ -95,15 +96,16 @@ var StaticStyleToolbarWithSizeDetector = function StaticStyleToolbarWithSizeDete
|
|
|
95
96
|
var minWidthValue = useMemo(function () {
|
|
96
97
|
if (props.hasMinWidth) {
|
|
97
98
|
var toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
98
|
-
return toolbarSizeToWidth(toolbarWidth, props.appearance);
|
|
99
|
+
return "".concat(toolbarSizeToWidth(toolbarWidth, props.appearance), "px");
|
|
99
100
|
} else {
|
|
100
|
-
|
|
101
|
+
var isPreviewPanelResponsivenessEnabled = expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true);
|
|
102
|
+
return isPreviewPanelResponsivenessEnabled ? 'fit-content' : '254px';
|
|
101
103
|
}
|
|
102
104
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
103
105
|
return jsx("div", {
|
|
104
106
|
css: staticToolbar,
|
|
105
107
|
style: {
|
|
106
|
-
minWidth:
|
|
108
|
+
minWidth: minWidthValue
|
|
107
109
|
}
|
|
108
110
|
}, jsx(WidthObserver, {
|
|
109
111
|
setWidth: setWidth
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "211.2.
|
|
2
|
+
export var version = "211.2.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "211.2.
|
|
3
|
+
"version": "211.2.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
45
45
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
46
46
|
"@atlaskit/button": "^23.4.0",
|
|
47
|
-
"@atlaskit/css": "^0.
|
|
47
|
+
"@atlaskit/css": "^0.13.0",
|
|
48
48
|
"@atlaskit/editor-json-transformer": "^8.27.0",
|
|
49
49
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
50
50
|
"@atlaskit/editor-plugin-quick-insert": "^4.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/editor-plugins": "^10.3.0",
|
|
53
53
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
54
54
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
55
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
55
|
+
"@atlaskit/editor-toolbar": "^0.8.0",
|
|
56
56
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
57
57
|
"@atlaskit/emoji": "^69.5.0",
|
|
58
58
|
"@atlaskit/icon": "^28.1.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^4.5.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
67
|
-
"@atlaskit/tokens": "^6.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
67
|
+
"@atlaskit/tokens": "^6.2.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.4.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
70
70
|
"@babel/runtime": "^7.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"uuid": "^3.1.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@atlaskit/editor-common": "^108.
|
|
83
|
+
"@atlaskit/editor-common": "^108.3.0",
|
|
84
84
|
"@atlaskit/link-provider": "^3.7.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
104
104
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
105
105
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
106
|
-
"@atlaskit/primitives": "^14.
|
|
106
|
+
"@atlaskit/primitives": "^14.13.0",
|
|
107
107
|
"@atlaskit/renderer": "^121.1.0",
|
|
108
108
|
"@atlaskit/section-message": "^8.7.0",
|
|
109
|
-
"@atlaskit/smart-card": "^40.
|
|
109
|
+
"@atlaskit/smart-card": "^40.19.0",
|
|
110
110
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
111
111
|
"@atlaskit/toggle": "^15.1.0",
|
|
112
112
|
"@atlaskit/util-data-test": "^18.1.0",
|