@atlaskit/editor-core 207.0.5 → 207.0.7
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 +17 -0
- package/dist/cjs/composable-editor/core-editor.js +9 -2
- package/dist/cjs/create-editor/ReactEditorView.js +3 -2
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
- package/dist/cjs/ui/ContentStyles/layout.js +1 -1
- package/dist/cjs/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +9 -2
- package/dist/es2019/create-editor/ReactEditorView.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
- package/dist/es2019/ui/ContentStyles/layout.js +1 -2
- package/dist/es2019/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +59 -12
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +9 -2
- package/dist/esm/create-editor/ReactEditorView.js +3 -2
- package/dist/esm/ui/Appearance/Chromeless.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
- package/dist/esm/ui/ContentStyles/layout.js +1 -1
- package/dist/esm/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js} +10 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/core-editor.d.ts +5 -0
- package/dist/types/create-editor/create-universal-preset.d.ts +23 -3
- package/dist/types/presets/universal.d.ts +23 -3
- package/dist/types/presets/useUniversalPreset.d.ts +23 -3
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/core-editor.d.ts +5 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +24 -3
- package/dist/types-ts4.5/presets/universal.d.ts +24 -3
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +24 -3
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/package.json +12 -19
- package/dist/cjs/composable-editor/core-performance-metrics.js +0 -109
- package/dist/es2019/composable-editor/core-performance-metrics.js +0 -92
- package/dist/esm/composable-editor/core-performance-metrics.js +0 -101
- package/dist/types/composable-editor/core-performance-metrics.d.ts +0 -4
- package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +0 -4
- /package/dist/types/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
- /package/dist/types-ts4.5/ui/{EditorContentContainer.d.ts → EditorContentContainer/EditorContentContainer.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#158563](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158563)
|
|
8
|
+
[`6b110fbea6e0e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b110fbea6e0e) -
|
|
9
|
+
Disable all render tracking on Jira
|
|
10
|
+
|
|
11
|
+
## 207.0.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#155774](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/155774)
|
|
16
|
+
[`763f7a1fe5157`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/763f7a1fe5157) -
|
|
17
|
+
[ED-27991] Clean up: platform_editor_fe--ufo-bridge
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 207.0.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -24,7 +24,6 @@ var _EditorContext = require("../ui/EditorContext");
|
|
|
24
24
|
var _featureFlagsFromProps = require("../utils/feature-flags-from-props");
|
|
25
25
|
var _measureEnum = _interopRequireDefault(require("../utils/performance/measure-enum"));
|
|
26
26
|
var _versionWrapper = require("../version-wrapper");
|
|
27
|
-
var _corePerformanceMetrics = require("./core-performance-metrics");
|
|
28
27
|
var _editorInpMetrics = require("./editor-inp-metrics");
|
|
29
28
|
var _editorInternal = require("./editor-internal");
|
|
30
29
|
var _useMeasureEditorMountTime = _interopRequireDefault(require("./hooks/useMeasureEditorMountTime"));
|
|
@@ -40,6 +39,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
40
39
|
// eslint-disable-next-line import/no-named-as-default
|
|
41
40
|
/**
|
|
42
41
|
* Editor wrapper that deals with the lifecycle logic of the editor
|
|
42
|
+
* @param passedProps
|
|
43
|
+
* @example
|
|
43
44
|
*/
|
|
44
45
|
function Editor(passedProps) {
|
|
45
46
|
var propsRef = (0, _react.useRef)(passedProps);
|
|
@@ -94,7 +95,7 @@ function Editor(passedProps) {
|
|
|
94
95
|
}
|
|
95
96
|
}, [onSaveFromProps]);
|
|
96
97
|
var isFullPageApperance = Boolean(props.appearance && ['full-page', 'full-width'].includes(props.appearance));
|
|
97
|
-
return (0, _react2.jsx)(_react.Fragment, null, isFullPageApperance && (0, _platformFeatureFlags.fg)('platform_editor_fe--
|
|
98
|
+
return (0, _react2.jsx)(_react.Fragment, null, isFullPageApperance && (0, _platformFeatureFlags.fg)('platform_editor_fe--inp-metrics') ? (0, _react2.jsx)(_editorInpMetrics.EditorINPMetrics, null) : null, (0, _react2.jsx)(_editorInternal.EditorInternal, {
|
|
98
99
|
props: props,
|
|
99
100
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
100
101
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -114,6 +115,12 @@ var useMemoEditorFeatureFlags = function useMemoEditorFeatureFlags(featureFlags)
|
|
|
114
115
|
}
|
|
115
116
|
return ffRef.current;
|
|
116
117
|
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @param props
|
|
122
|
+
* @example
|
|
123
|
+
*/
|
|
117
124
|
function CoreEditor(props) {
|
|
118
125
|
var editorSessionId = (0, _react.useRef)((0, _v.default)());
|
|
119
126
|
var data = (0, _react.useMemo)(function () {
|
|
@@ -615,8 +615,9 @@ function ReactEditorView(props) {
|
|
|
615
615
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
616
616
|
[props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
|
|
617
617
|
|
|
618
|
-
// Render tracking firing too many events
|
|
619
|
-
|
|
618
|
+
// Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
|
|
619
|
+
// Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
|
|
620
|
+
var renderTrackingEnabled = !(0, _platformFeatureFlags.fg)('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking;
|
|
620
621
|
return /*#__PURE__*/_react.default.createElement(_uiReact.ReactEditorViewContext.Provider, {
|
|
621
622
|
value: {
|
|
622
623
|
editorRef: editorRef,
|
|
@@ -19,7 +19,7 @@ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
|
19
19
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
20
20
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
21
21
|
var _ContentStyles = require("../ContentStyles");
|
|
22
|
-
var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer"));
|
|
22
|
+
var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer/EditorContentContainer"));
|
|
23
23
|
var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
|
|
24
24
|
var _WithFlash = _interopRequireDefault(require("../WithFlash"));
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -25,7 +25,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
25
25
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
26
26
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
27
27
|
var _ContentStyles = require("../../ContentStyles");
|
|
28
|
-
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer"));
|
|
28
|
+
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
29
29
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
30
30
|
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
31
31
|
var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
|
|
@@ -79,6 +79,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
79
79
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState,
|
|
80
80
|
interactionState = _useSharedPluginState.interactionState;
|
|
81
81
|
var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
|
|
82
|
+
var hasHadInteraction = (0, _platformFeatureFlags.fg)('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
|
|
82
83
|
var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
83
84
|
if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
|
|
84
85
|
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
@@ -221,7 +222,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
221
222
|
featureFlags: props.featureFlags,
|
|
222
223
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
223
224
|
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
224
|
-
hasHadInteraction:
|
|
225
|
+
hasHadInteraction: hasHadInteraction
|
|
225
226
|
})));
|
|
226
227
|
};
|
|
227
228
|
var hiddenStyle = (0, _react2.css)({
|
|
@@ -20,7 +20,7 @@ var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock
|
|
|
20
20
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
21
21
|
var _ContentStyles = require("../../ContentStyles");
|
|
22
22
|
var _ContextPanel = require("../../ContextPanel");
|
|
23
|
-
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer"));
|
|
23
|
+
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
24
24
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
25
25
|
var _StyledComponents = require("./StyledComponents");
|
|
26
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -78,7 +78,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
78
78
|
};
|
|
79
79
|
}, []);
|
|
80
80
|
var interactionClassName;
|
|
81
|
-
if (props.hasHadInteraction
|
|
81
|
+
if (props.hasHadInteraction && (0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction')) {
|
|
82
82
|
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
83
83
|
}
|
|
84
84
|
return (0, _react2.jsx)("div", {
|
|
@@ -77,5 +77,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
|
77
77
|
|
|
78
78
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
79
79
|
var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
|
|
80
|
-
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px
|
|
80
|
+
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? akNestedDndGutterOffset : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
81
81
|
};
|
package/dist/cjs/ui/{EditorContentContainer.js → EditorContentContainer/EditorContentContainer.js}
RENAMED
|
@@ -28,15 +28,15 @@ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
|
28
28
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
29
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
30
30
|
var _tokens = require("@atlaskit/tokens");
|
|
31
|
-
var _getInlineNodeViewProducer = require("
|
|
32
|
-
var _codeBlock = require("
|
|
33
|
-
var _date = require("
|
|
34
|
-
var _expand = require("
|
|
35
|
-
var _extension = require("
|
|
36
|
-
var _media = require("
|
|
37
|
-
var _panel2 = require("
|
|
38
|
-
var _status = require("
|
|
39
|
-
var _tasksAndDecisions = require("
|
|
31
|
+
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
32
|
+
var _codeBlock = require("../ContentStyles/code-block");
|
|
33
|
+
var _date = require("../ContentStyles/date");
|
|
34
|
+
var _expand = require("../ContentStyles/expand");
|
|
35
|
+
var _extension = require("../ContentStyles/extension");
|
|
36
|
+
var _media = require("../ContentStyles/media");
|
|
37
|
+
var _panel2 = require("../ContentStyles/panel");
|
|
38
|
+
var _status = require("../ContentStyles/status");
|
|
39
|
+
var _tasksAndDecisions = require("../ContentStyles/tasks-and-decisions");
|
|
40
40
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36;
|
|
41
41
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
42
42
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
@@ -351,7 +351,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
351
351
|
|
|
352
352
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
353
353
|
var contentStyles = function contentStyles() {
|
|
354
|
-
return (0, _react2.css)(_templateObject32 || (_templateObject32 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\
|
|
354
|
+
return (0, _react2.css)(_templateObject32 || (_templateObject32 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject33 || (_templateObject33 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject34 || (_templateObject34 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject35 || (_templateObject35 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
355
355
|
exposure: false
|
|
356
356
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
357
357
|
exposure: false
|
|
@@ -21,7 +21,6 @@ import { useEditorContext } from '../ui/EditorContext';
|
|
|
21
21
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
22
22
|
import measurements from '../utils/performance/measure-enum';
|
|
23
23
|
import { name, version } from '../version-wrapper';
|
|
24
|
-
import { EditorUFOBridge, EditorPerformanceMetrics } from './core-performance-metrics';
|
|
25
24
|
import { EditorINPMetrics } from './editor-inp-metrics';
|
|
26
25
|
import { EditorInternal } from './editor-internal';
|
|
27
26
|
import useMeasureEditorMountTime from './hooks/useMeasureEditorMountTime';
|
|
@@ -33,6 +32,8 @@ import sendDurationAnalytics from './utils/sendDurationAnalytics';
|
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Editor wrapper that deals with the lifecycle logic of the editor
|
|
35
|
+
* @param passedProps
|
|
36
|
+
* @example
|
|
36
37
|
*/
|
|
37
38
|
function Editor(passedProps) {
|
|
38
39
|
const propsRef = useRef(passedProps);
|
|
@@ -92,7 +93,7 @@ function Editor(passedProps) {
|
|
|
92
93
|
}
|
|
93
94
|
}, [onSaveFromProps]);
|
|
94
95
|
const isFullPageApperance = Boolean(props.appearance && ['full-page', 'full-width'].includes(props.appearance));
|
|
95
|
-
return jsx(Fragment, null, isFullPageApperance && fg('platform_editor_fe--
|
|
96
|
+
return jsx(Fragment, null, isFullPageApperance && fg('platform_editor_fe--inp-metrics') ? jsx(EditorINPMetrics, null) : null, jsx(EditorInternal, {
|
|
96
97
|
props: props,
|
|
97
98
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
98
99
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -112,6 +113,12 @@ const useMemoEditorFeatureFlags = featureFlags => {
|
|
|
112
113
|
}
|
|
113
114
|
return ffRef.current;
|
|
114
115
|
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @param props
|
|
120
|
+
* @example
|
|
121
|
+
*/
|
|
115
122
|
export function CoreEditor(props) {
|
|
116
123
|
const editorSessionId = useRef(uuid());
|
|
117
124
|
const data = useMemo(() => {
|
|
@@ -579,8 +579,9 @@ export function ReactEditorView(props) {
|
|
|
579
579
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
580
580
|
[props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
|
|
581
581
|
|
|
582
|
-
// Render tracking firing too many events
|
|
583
|
-
|
|
582
|
+
// Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
|
|
583
|
+
// Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
|
|
584
|
+
const renderTrackingEnabled = !fg('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking;
|
|
584
585
|
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
|
|
585
586
|
value: {
|
|
586
587
|
editorRef: editorRef,
|
|
@@ -12,7 +12,7 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
12
12
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
13
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
14
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
15
|
-
import EditorContentContainer from '../EditorContentContainer';
|
|
15
|
+
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
16
16
|
import PluginSlot from '../PluginSlot';
|
|
17
17
|
import WithFlash from '../WithFlash';
|
|
18
18
|
const chromelessEditorStyles = css({
|
|
@@ -24,7 +24,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
24
24
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
25
25
|
import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
|
|
26
26
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
27
|
-
import EditorContentContainer from '../../EditorContentContainer';
|
|
27
|
+
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
28
28
|
import PluginSlot from '../../PluginSlot';
|
|
29
29
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
30
30
|
import WithFlash from '../../WithFlash';
|
|
@@ -61,6 +61,7 @@ export const FullPageEditor = props => {
|
|
|
61
61
|
interactionState
|
|
62
62
|
} = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']);
|
|
63
63
|
const viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
64
|
+
const hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
|
|
64
65
|
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
65
66
|
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
66
67
|
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
@@ -205,7 +206,7 @@ export const FullPageEditor = props => {
|
|
|
205
206
|
featureFlags: props.featureFlags,
|
|
206
207
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
207
208
|
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
208
|
-
hasHadInteraction:
|
|
209
|
+
hasHadInteraction: hasHadInteraction
|
|
209
210
|
})));
|
|
210
211
|
};
|
|
211
212
|
const hiddenStyle = css({
|
|
@@ -20,7 +20,7 @@ import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
|
20
20
|
import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
|
|
21
21
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
22
22
|
import { ContextPanel } from '../../ContextPanel';
|
|
23
|
-
import EditorContentContainer from '../../EditorContentContainer';
|
|
23
|
+
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
24
24
|
import PluginSlot from '../../PluginSlot';
|
|
25
25
|
import { contentArea, contentAreaHeightNoToolbar, contentAreaWrapper, editorContentAreaStyle, editorContentGutterStyle, sidebarArea } from './StyledComponents';
|
|
26
26
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
@@ -62,7 +62,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
62
62
|
}
|
|
63
63
|
}), []);
|
|
64
64
|
let interactionClassName;
|
|
65
|
-
if (props.hasHadInteraction
|
|
65
|
+
if (props.hasHadInteraction && fg('platform_editor_no_selection_until_interaction')) {
|
|
66
66
|
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
67
67
|
}
|
|
68
68
|
return jsx("div", {
|
|
@@ -283,8 +283,7 @@ export const layoutStyles = viewMode => css`
|
|
|
283
283
|
/* Ignored via go/ees007
|
|
284
284
|
TODO: Migrate away from gridSize
|
|
285
285
|
Recommendation: Replace directly with 7px */
|
|
286
|
-
margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? akNestedDndGutterOffset : 0)}px
|
|
287
|
-
0;
|
|
286
|
+
margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? akNestedDndGutterOffset : 0)}px 0;
|
|
288
287
|
transition: border-color 0.3s ${akEditorSwoopCubicBezier};
|
|
289
288
|
cursor: ${viewMode === 'view' ? 'default' : 'pointer'};
|
|
290
289
|
|
|
@@ -28,15 +28,15 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
28
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
30
30
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
31
|
-
import { InlineNodeViewSharedStyles } from '
|
|
32
|
-
import { codeBlockStyles } from '
|
|
33
|
-
import { dateStyles, dateVanillaStyles } from '
|
|
34
|
-
import { expandStyles } from '
|
|
35
|
-
import { extensionStyles } from '
|
|
36
|
-
import { mediaStyles } from '
|
|
37
|
-
import { panelStyles } from '
|
|
38
|
-
import { statusStyles, vanillaStatusStyles } from '
|
|
39
|
-
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '
|
|
31
|
+
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
32
|
+
import { codeBlockStyles } from '../ContentStyles/code-block';
|
|
33
|
+
import { dateStyles, dateVanillaStyles } from '../ContentStyles/date';
|
|
34
|
+
import { expandStyles } from '../ContentStyles/expand';
|
|
35
|
+
import { extensionStyles } from '../ContentStyles/extension';
|
|
36
|
+
import { mediaStyles } from '../ContentStyles/media';
|
|
37
|
+
import { panelStyles } from '../ContentStyles/panel';
|
|
38
|
+
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
39
|
+
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
|
|
40
40
|
|
|
41
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
42
42
|
export const linkStyles = css`
|
|
@@ -1068,11 +1068,17 @@ const contentStyles = () => css`
|
|
|
1068
1068
|
.ProseMirror {
|
|
1069
1069
|
outline: none;
|
|
1070
1070
|
font-size: var(--ak-editor-base-font-size);
|
|
1071
|
+
|
|
1071
1072
|
${whitespaceSharedStyles};
|
|
1073
|
+
|
|
1072
1074
|
${paragraphSharedStyles()};
|
|
1075
|
+
|
|
1073
1076
|
${listsSharedStyles};
|
|
1077
|
+
|
|
1074
1078
|
${indentationSharedStyles};
|
|
1079
|
+
|
|
1075
1080
|
${shadowSharedStyle};
|
|
1081
|
+
|
|
1076
1082
|
${InlineNodeViewSharedStyles};
|
|
1077
1083
|
}
|
|
1078
1084
|
|
|
@@ -1127,66 +1133,107 @@ const contentStyles = () => css`
|
|
|
1127
1133
|
}
|
|
1128
1134
|
|
|
1129
1135
|
${placeholderTextStyles}
|
|
1136
|
+
|
|
1130
1137
|
${placeholderStyles}
|
|
1138
|
+
|
|
1131
1139
|
${editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null}
|
|
1140
|
+
|
|
1132
1141
|
${editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null}
|
|
1133
1142
|
|
|
1134
1143
|
${codeBlockStyles()}
|
|
1135
1144
|
|
|
1136
1145
|
${blocktypeStyles()}
|
|
1146
|
+
|
|
1137
1147
|
${codeMarkSharedStyles()}
|
|
1148
|
+
|
|
1138
1149
|
${textColorStyles}
|
|
1150
|
+
|
|
1139
1151
|
${backgroundColorStyles()}
|
|
1152
|
+
|
|
1140
1153
|
${listsStyles}
|
|
1154
|
+
|
|
1141
1155
|
${ruleStyles()}
|
|
1156
|
+
|
|
1142
1157
|
${mediaStyles()}
|
|
1158
|
+
|
|
1143
1159
|
${fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly}
|
|
1144
1160
|
${gapCursorStyles};
|
|
1161
|
+
|
|
1145
1162
|
${panelStyles()}
|
|
1163
|
+
|
|
1146
1164
|
${mentionsStyles}
|
|
1147
|
-
|
|
1165
|
+
|
|
1166
|
+
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1148
1167
|
exposure: false
|
|
1149
1168
|
}) && vanillaMentionsStyles}
|
|
1150
|
-
|
|
1169
|
+
|
|
1170
|
+
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1151
1171
|
exposure: false
|
|
1152
1172
|
}) && vanillaSelectionStyles}
|
|
1153
|
-
|
|
1173
|
+
|
|
1174
|
+
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1154
1175
|
exposure: false
|
|
1155
1176
|
}) ? emojiStyles : reactEmojiStyles}
|
|
1177
|
+
|
|
1156
1178
|
${emojiStyles}
|
|
1179
|
+
|
|
1157
1180
|
${tasksAndDecisionsStyles}
|
|
1181
|
+
|
|
1158
1182
|
${gridStyles}
|
|
1183
|
+
|
|
1159
1184
|
${linkStyles}
|
|
1185
|
+
|
|
1160
1186
|
${blockMarksSharedStyles}
|
|
1187
|
+
|
|
1161
1188
|
${dateSharedStyle}
|
|
1189
|
+
|
|
1162
1190
|
${extensionStyles}
|
|
1191
|
+
|
|
1163
1192
|
${expandStyles()}
|
|
1193
|
+
|
|
1164
1194
|
${findReplaceStyles}
|
|
1195
|
+
|
|
1165
1196
|
${textHighlightStyle}
|
|
1197
|
+
|
|
1166
1198
|
${taskDecisionStyles}
|
|
1199
|
+
|
|
1167
1200
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1168
1201
|
exposure: false
|
|
1169
1202
|
}) && vanillaTaskItemStyles}
|
|
1203
|
+
|
|
1170
1204
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1171
1205
|
exposure: false
|
|
1172
1206
|
}) && vanillaDecisionStyles}
|
|
1207
|
+
|
|
1173
1208
|
// Switch between the two icons based on the visual refresh feature gate
|
|
1174
1209
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1175
1210
|
exposure: false
|
|
1176
1211
|
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh}
|
|
1212
|
+
|
|
1177
1213
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
1178
1214
|
exposure: false
|
|
1179
1215
|
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh}
|
|
1216
|
+
|
|
1180
1217
|
${statusStyles}
|
|
1218
|
+
|
|
1181
1219
|
${editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null}
|
|
1220
|
+
|
|
1182
1221
|
${annotationSharedStyles()}
|
|
1222
|
+
|
|
1183
1223
|
${smartCardStyles()}
|
|
1224
|
+
|
|
1184
1225
|
${fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles}
|
|
1226
|
+
|
|
1185
1227
|
${editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null}
|
|
1228
|
+
|
|
1186
1229
|
${dateStyles}
|
|
1230
|
+
|
|
1187
1231
|
${embedCardStyles()}
|
|
1232
|
+
|
|
1188
1233
|
${unsupportedStyles}
|
|
1234
|
+
|
|
1189
1235
|
${resizerStyles}
|
|
1236
|
+
|
|
1190
1237
|
${fixBlockControlStylesSSR()}
|
|
1191
1238
|
|
|
1192
1239
|
.panelView-content-wrap {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "207.0.
|
|
2
|
+
export const version = "207.0.7";
|
|
@@ -24,7 +24,6 @@ import { useEditorContext } from '../ui/EditorContext';
|
|
|
24
24
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
25
25
|
import measurements from '../utils/performance/measure-enum';
|
|
26
26
|
import { name, version } from '../version-wrapper';
|
|
27
|
-
import { EditorUFOBridge, EditorPerformanceMetrics } from './core-performance-metrics';
|
|
28
27
|
import { EditorINPMetrics } from './editor-inp-metrics';
|
|
29
28
|
import { EditorInternal } from './editor-internal';
|
|
30
29
|
import useMeasureEditorMountTime from './hooks/useMeasureEditorMountTime';
|
|
@@ -36,6 +35,8 @@ import sendDurationAnalytics from './utils/sendDurationAnalytics';
|
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
37
|
* Editor wrapper that deals with the lifecycle logic of the editor
|
|
38
|
+
* @param passedProps
|
|
39
|
+
* @example
|
|
39
40
|
*/
|
|
40
41
|
function Editor(passedProps) {
|
|
41
42
|
var propsRef = useRef(passedProps);
|
|
@@ -90,7 +91,7 @@ function Editor(passedProps) {
|
|
|
90
91
|
}
|
|
91
92
|
}, [onSaveFromProps]);
|
|
92
93
|
var isFullPageApperance = Boolean(props.appearance && ['full-page', 'full-width'].includes(props.appearance));
|
|
93
|
-
return jsx(Fragment, null, isFullPageApperance && fg('platform_editor_fe--
|
|
94
|
+
return jsx(Fragment, null, isFullPageApperance && fg('platform_editor_fe--inp-metrics') ? jsx(EditorINPMetrics, null) : null, jsx(EditorInternal, {
|
|
94
95
|
props: props,
|
|
95
96
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
96
97
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -110,6 +111,12 @@ var useMemoEditorFeatureFlags = function useMemoEditorFeatureFlags(featureFlags)
|
|
|
110
111
|
}
|
|
111
112
|
return ffRef.current;
|
|
112
113
|
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @param props
|
|
118
|
+
* @example
|
|
119
|
+
*/
|
|
113
120
|
export function CoreEditor(props) {
|
|
114
121
|
var editorSessionId = useRef(uuid());
|
|
115
122
|
var data = useMemo(function () {
|
|
@@ -604,8 +604,9 @@ export function ReactEditorView(props) {
|
|
|
604
604
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
605
605
|
[props.editorProps.assistiveLabel, props.editorProps.assistiveDescribedBy]);
|
|
606
606
|
|
|
607
|
-
// Render tracking firing too many events
|
|
608
|
-
|
|
607
|
+
// Render tracking is firing too many events in Jira so we are disabling them for now. See - https://product-fabric.atlassian.net/browse/ED-25616
|
|
608
|
+
// Also firing too many events for the legacy content macro, so disabling for now. See - https://product-fabric.atlassian.net/browse/ED-26650
|
|
609
|
+
var renderTrackingEnabled = !fg('platform_editor_disable_rerender_tracking_jira') && !featureFlags.lcmPreventRenderTracking;
|
|
609
610
|
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Provider, {
|
|
610
611
|
value: {
|
|
611
612
|
editorRef: editorRef,
|
|
@@ -19,7 +19,7 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
19
19
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
20
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
21
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
22
|
-
import EditorContentContainer from '../EditorContentContainer';
|
|
22
|
+
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
23
23
|
import PluginSlot from '../PluginSlot';
|
|
24
24
|
import WithFlash from '../WithFlash';
|
|
25
25
|
var chromelessEditorStyles = css({
|
|
@@ -25,7 +25,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
25
25
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
26
26
|
import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
|
|
27
27
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
28
|
-
import EditorContentContainer from '../../EditorContentContainer';
|
|
28
|
+
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
29
29
|
import PluginSlot from '../../PluginSlot';
|
|
30
30
|
import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
|
|
31
31
|
import WithFlash from '../../WithFlash';
|
|
@@ -68,6 +68,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
68
68
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState,
|
|
69
69
|
interactionState = _useSharedPluginState.interactionState;
|
|
70
70
|
var viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
71
|
+
var hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
|
|
71
72
|
var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
72
73
|
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
73
74
|
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
@@ -210,7 +211,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
210
211
|
featureFlags: props.featureFlags,
|
|
211
212
|
isEditorToolbarHidden: isEditorToolbarHidden,
|
|
212
213
|
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
213
|
-
hasHadInteraction:
|
|
214
|
+
hasHadInteraction: hasHadInteraction
|
|
214
215
|
})));
|
|
215
216
|
};
|
|
216
217
|
var hiddenStyle = css({
|