@atlaskit/editor-core 215.1.5 → 215.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -6
- package/dist/cjs/create-editor/ReactEditorView.js +6 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/CommentToolbar.js +8 -2
- package/dist/cjs/ui/ContextPanel/index.js +1 -4
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +8 -2
- package/dist/cjs/ui/EditorContentContainer/styles/extensionStyles.js +4 -5
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +12 -1
- package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +3 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +6 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/es2019/ui/Appearance/Comment/CommentToolbar.js +8 -2
- package/dist/es2019/ui/ContextPanel/index.js +1 -4
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +10 -4
- package/dist/es2019/ui/EditorContentContainer/styles/extensionStyles.js +4 -5
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +14 -0
- package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +6 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +6 -0
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/esm/ui/Appearance/Comment/CommentToolbar.js +8 -2
- package/dist/esm/ui/ContextPanel/index.js +1 -4
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +10 -4
- package/dist/esm/ui/EditorContentContainer/styles/extensionStyles.js +4 -5
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +11 -0
- package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +3 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/Comment/CommentToolbar.d.ts +4 -1
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/Appearance/Comment/CommentToolbar.d.ts +4 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0560b4dfd1361`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0560b4dfd1361) -
|
|
8
|
+
Experiment with disabling prosemirror rendering in SSR
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`e22968790f2b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e22968790f2b5) -
|
|
13
|
+
[ux] [EDITOR-2374] prevent style overrides on codemarks in excerpts
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 215.1.6
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`8a6477def0c7d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a6477def0c7d) -
|
|
21
|
+
[ux] clean up platform_editor_a11y_macro_sidebar_dialog
|
|
22
|
+
- [`1c601de07087b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c601de07087b) -
|
|
23
|
+
Fix for CLS issue in Editor Resizer Component
|
|
24
|
+
- [`5c07f0d4e428f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c07f0d4e428f) -
|
|
25
|
+
[EDITOR-1998] Make media captions follow dense/ compact content mode
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 215.1.5
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -8891,9 +8916,7 @@
|
|
|
8891
8916
|
-
|
|
8892
8917
|
50. Another list item
|
|
8893
8918
|
|
|
8894
|
-
Should NOT auto join to be 1 & 2 in a single list however...
|
|
8895
|
-
49. A list item
|
|
8896
|
-
-
|
|
8919
|
+
## Should NOT auto join to be 1 & 2 in a single list however... 49. A list item
|
|
8897
8920
|
50. Another list item
|
|
8898
8921
|
|
|
8899
8922
|
Should join to be 49 & 50 in a single list.
|
|
@@ -25789,9 +25812,7 @@ Remove applicationCard node and action mark
|
|
|
25789
25812
|
|
|
25790
25813
|
## 112.2.10
|
|
25791
25814
|
|
|
25792
|
-
- [patch][051800806c](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/051800806c):
|
|
25793
|
-
-
|
|
25794
|
-
|
|
25815
|
+
- ## [patch][051800806c](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/051800806c):
|
|
25795
25816
|
- MediaPicker Clipboard component is now a React Component
|
|
25796
25817
|
|
|
25797
25818
|
These changes provide a new React api for Clipboard component. First one to be delivered, coming
|
|
@@ -14,6 +14,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
16
16
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
17
18
|
var _eventDispatcher = require("@atlaskit/editor-common/event-dispatcher");
|
|
18
19
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
19
20
|
var _nodeVisibility = require("@atlaskit/editor-common/node-visibility");
|
|
@@ -30,6 +31,7 @@ var _view = require("@atlaskit/editor-prosemirror/view");
|
|
|
30
31
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
31
32
|
var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
|
|
32
33
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
34
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
33
35
|
var _useProviders = require("../composable-editor/hooks/useProviders");
|
|
34
36
|
var _featureFlagsFromProps = require("../utils/feature-flags-from-props");
|
|
35
37
|
var _getNodesCount = require("../utils/getNodesCount");
|
|
@@ -552,7 +554,11 @@ function ReactEditorView(props) {
|
|
|
552
554
|
};
|
|
553
555
|
}, []);
|
|
554
556
|
var handleEditorViewRef = (0, _react.useCallback)(function (node) {
|
|
557
|
+
if ((0, _coreUtils.isSSR)() && (0, _expVal.expVal)('platform_editor_no_ssr', 'isEnabled', false)) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
555
560
|
if (node) {
|
|
561
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
556
562
|
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
557
563
|
var cleanupListeners = function cleanupListeners() {
|
|
558
564
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -195,7 +195,10 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
195
195
|
editorAPI: editorAPI,
|
|
196
196
|
editorView: editorView,
|
|
197
197
|
editorAppearance: appearance,
|
|
198
|
-
disabled: patch6Enabled ? !!disabled : undefined
|
|
198
|
+
disabled: patch6Enabled ? !!disabled : undefined,
|
|
199
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
200
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
201
|
+
popupsMountPoint: popupsMountPoint
|
|
199
202
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
200
203
|
editorView: editorView,
|
|
201
204
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -17,7 +17,10 @@ var CommentToolbar = exports.CommentToolbar = function CommentToolbar(_ref) {
|
|
|
17
17
|
var editorAPI = _ref.editorAPI,
|
|
18
18
|
editorView = _ref.editorView,
|
|
19
19
|
editorAppearance = _ref.editorAppearance,
|
|
20
|
-
disabled = _ref.disabled
|
|
20
|
+
disabled = _ref.disabled,
|
|
21
|
+
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
22
|
+
popupsMountPoint = _ref.popupsMountPoint,
|
|
23
|
+
popupsScrollableElement = _ref.popupsScrollableElement;
|
|
21
24
|
var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
22
25
|
var toolbar = components === null || components === void 0 ? void 0 : components.find(function (component) {
|
|
23
26
|
return component.key === _toolbar.TOOLBARS.PRIMARY_TOOLBAR;
|
|
@@ -31,6 +34,9 @@ var CommentToolbar = exports.CommentToolbar = function CommentToolbar(_ref) {
|
|
|
31
34
|
editorView: editorView,
|
|
32
35
|
editorAPI: editorAPI,
|
|
33
36
|
editorAppearance: editorAppearance,
|
|
34
|
-
isDisabled: disabled
|
|
37
|
+
isDisabled: disabled,
|
|
38
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
39
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
40
|
+
popupsMountPoint: popupsMountPoint
|
|
35
41
|
});
|
|
36
42
|
};
|
|
@@ -145,8 +145,6 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
145
145
|
width: "".concat(this.props.customWidth, "px"),
|
|
146
146
|
overflowX: 'hidden'
|
|
147
147
|
});
|
|
148
|
-
var ariaModal = (0, _platformFeatureFlags.fg)('platform_editor_a11y_macro_sidebar_dialog') ? 'false' : undefined;
|
|
149
|
-
var ariaLabelledBy = (0, _platformFeatureFlags.fg)('platform_editor_a11y_macro_sidebar_dialog') ? undefined : 'context-panel-title';
|
|
150
148
|
return (0, _react2.jsx)(_contextPanel.ContextPanelConsumer, null, function (_ref) {
|
|
151
149
|
var _this2$props$intl;
|
|
152
150
|
var broadcastWidth = _ref.broadcastWidth;
|
|
@@ -158,8 +156,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
158
156
|
_this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, (0, _platformFeatureFlags.fg)('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
|
|
159
157
|
"data-testid": "context-panel-panel",
|
|
160
158
|
"aria-label": ((_this2$props$intl = _this2.props.intl) === null || _this2$props$intl === void 0 ? void 0 : _this2$props$intl.formatMessage(_messages.contextPanelMessages.panelLabel)) || '',
|
|
161
|
-
"aria-
|
|
162
|
-
"aria-modal": ariaModal,
|
|
159
|
+
"aria-modal": "false",
|
|
163
160
|
role: "dialog"
|
|
164
161
|
}, (0, _react2.jsx)("div", {
|
|
165
162
|
"data-testid": "context-panel-content",
|
|
@@ -140,9 +140,13 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
140
140
|
'--ak-editor--large-gutter-padding': "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px")
|
|
141
141
|
};
|
|
142
142
|
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
143
|
+
var allClassNames = [className];
|
|
144
|
+
if ((0, _expVal.expVal)('platform_editor_resizer_cls_fix', 'isEnabled', false)) {
|
|
145
|
+
allClassNames.push('resizer-hover-zone-cls-fix');
|
|
146
|
+
}
|
|
143
147
|
return (0, _react2.jsx)("div", {
|
|
144
148
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
145
|
-
className:
|
|
149
|
+
className: allClassNames.join(' '),
|
|
146
150
|
ref: ref,
|
|
147
151
|
css: [
|
|
148
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -216,7 +220,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
216
220
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
217
221
|
(0, _platformFeatureFlags.fg)('aifc_create_enabled') && _smartCardStyles.smartCardDiffStyles,
|
|
218
222
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
219
|
-
_mediaStyles.mediaStyles,
|
|
223
|
+
_mediaStyles.mediaStyles, (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') &&
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
225
|
+
_mediaStyles.mediaCaptionStyles,
|
|
220
226
|
// merge firstWrappedMediaStyles with mediaStyles when clean up platform_editor_fix_media_in_renderer
|
|
221
227
|
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles,
|
|
222
228
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -368,13 +368,12 @@ var getExtensionStyles = exports.getExtensionStyles = function getExtensionStyle
|
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
|
|
371
|
-
// Dense content mode
|
|
371
|
+
// Dense content mode extensions styling fix - addresses EDITOR-1992
|
|
372
372
|
// When cleaning up the experiment, move this logic into the baseExtensionStyles above
|
|
373
373
|
var fontSize = (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') ? (0, _editorSharedStyles.relativeFontSizeToBase16)(_editorSharedStyles.akEditorFullPageDenseFontSize) : undefined;
|
|
374
|
-
|
|
375
|
-
var denseContentModeTocStyles = (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? (0, _react.css)({
|
|
374
|
+
var denseExtensionStyles = (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? (0, _react.css)({
|
|
376
375
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
377
|
-
'.extension-container :not([data-inline-card-lozenge]
|
|
376
|
+
'.extension-container :not([data-inline-card-lozenge] *, [data-prosemirror-mark-name="code"])': {
|
|
378
377
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
379
378
|
fontSize: 'var(--ak-editor-base-font-size)'
|
|
380
379
|
}
|
|
@@ -387,5 +386,5 @@ var getExtensionStyles = exports.getExtensionStyles = function getExtensionStyle
|
|
|
387
386
|
}) : (0, _react.css)({});
|
|
388
387
|
|
|
389
388
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
390
|
-
return (0, _react.css)(baseExtensionStyles,
|
|
389
|
+
return (0, _react.css)(baseExtensionStyles, denseExtensionStyles);
|
|
391
390
|
};
|
|
@@ -4,10 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.mediaStyles = exports.mediaGroupStyles = exports.mediaDangerStyles = exports.mediaAlignmentStyles = void 0;
|
|
7
|
+
exports.mediaStyles = exports.mediaGroupStyles = exports.mediaDangerStyles = exports.mediaCaptionStyles = exports.mediaAlignmentStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
11
|
+
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
11
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
14
|
var _mediaCard = require("@atlaskit/media-card");
|
|
@@ -277,4 +278,14 @@ var mediaAlignmentStyles = exports.mediaAlignmentStyles = (0, _react.css)({
|
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
}
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// When cleaning up platform_editor_content_mode_button_mvp, move this style into mediaStyles variable ⬆️
|
|
284
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
285
|
+
var mediaCaptionStyles = exports.mediaCaptionStyles = (0, _react.css)({
|
|
286
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
287
|
+
'.mediaSingleView-content-wrap': (0, _defineProperty2.default)({}, "span#".concat(_mediaSingle.CAPTION_PLACEHOLDER_ID), {
|
|
288
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
289
|
+
fontSize: 'var(--ak-editor-base-font-size)'
|
|
290
|
+
})
|
|
280
291
|
});
|
|
@@ -21,7 +21,7 @@ var resizerHandleThumbWidth = exports.resizerHandleThumbWidth = 3;
|
|
|
21
21
|
var handleWrapperClass = exports.handleWrapperClass = 'resizer-handle-wrapper';
|
|
22
22
|
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
|
|
24
|
-
var resizerStyles = exports.resizerStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(resizerItemClassName), (0, _defineProperty2.default)({
|
|
24
|
+
var resizerStyles = exports.resizerStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(resizerItemClassName), (0, _defineProperty2.default)({
|
|
25
25
|
willChange: 'width',
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
27
27
|
'&:hover, &.display-handle': (0, _defineProperty2.default)({}, "& > .".concat(handleWrapperClass, " > .").concat(resizerHandleClassName), {
|
|
@@ -152,6 +152,8 @@ var resizerStyles = exports.resizerStyles = (0, _react.css)((0, _defineProperty2
|
|
|
152
152
|
background: "var(--ds-border-focused, #388BFF)"
|
|
153
153
|
})), ".ak-editor-no-interaction .ak-editor-selected-node .".concat(resizerHandleClassName, ":not(:hover) .").concat(resizerHandleThumbClassName), {
|
|
154
154
|
background: "var(--ds-border, #091E4224)"
|
|
155
|
+
}), "&.resizer-hover-zone-cls-fix .".concat(resizerHoverZoneClassName), {
|
|
156
|
+
display: 'flow-root'
|
|
155
157
|
}), ".".concat(resizerHoverZoneClassName), (0, _defineProperty2.default)({
|
|
156
158
|
position: 'relative',
|
|
157
159
|
display: 'inline-block',
|
|
@@ -2,6 +2,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from '
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import uuid from 'uuid/v4';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
5
6
|
import { createDispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
7
|
import { useConstructor, usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
7
8
|
import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
@@ -18,6 +19,7 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
18
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
20
21
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
21
23
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
22
24
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
23
25
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -509,7 +511,11 @@ export function ReactEditorView(props) {
|
|
|
509
511
|
};
|
|
510
512
|
}, []);
|
|
511
513
|
const handleEditorViewRef = useCallback(node => {
|
|
514
|
+
if (isSSR() && expVal('platform_editor_no_ssr', 'isEnabled', false)) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
512
517
|
if (node) {
|
|
518
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
513
519
|
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
514
520
|
const cleanupListeners = () => {
|
|
515
521
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -183,7 +183,10 @@ export const CommentEditorWithIntl = props => {
|
|
|
183
183
|
editorAPI: editorAPI,
|
|
184
184
|
editorView: editorView,
|
|
185
185
|
editorAppearance: appearance,
|
|
186
|
-
disabled: patch6Enabled ? !!disabled : undefined
|
|
186
|
+
disabled: patch6Enabled ? !!disabled : undefined,
|
|
187
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
188
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
189
|
+
popupsMountPoint: popupsMountPoint
|
|
187
190
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
188
191
|
editorView: editorView,
|
|
189
192
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -9,7 +9,10 @@ export const CommentToolbar = ({
|
|
|
9
9
|
editorAPI,
|
|
10
10
|
editorView,
|
|
11
11
|
editorAppearance,
|
|
12
|
-
disabled
|
|
12
|
+
disabled,
|
|
13
|
+
popupsBoundariesElement,
|
|
14
|
+
popupsMountPoint,
|
|
15
|
+
popupsScrollableElement
|
|
13
16
|
}) => {
|
|
14
17
|
var _editorAPI$toolbar;
|
|
15
18
|
const components = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
@@ -23,6 +26,9 @@ export const CommentToolbar = ({
|
|
|
23
26
|
editorView: editorView,
|
|
24
27
|
editorAPI: editorAPI,
|
|
25
28
|
editorAppearance: editorAppearance,
|
|
26
|
-
isDisabled: disabled
|
|
29
|
+
isDisabled: disabled,
|
|
30
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
31
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
32
|
+
popupsMountPoint: popupsMountPoint
|
|
27
33
|
});
|
|
28
34
|
};
|
|
@@ -132,8 +132,6 @@ class SwappableContentAreaInner extends React.PureComponent {
|
|
|
132
132
|
width: `${this.props.customWidth}px`,
|
|
133
133
|
overflowX: 'hidden'
|
|
134
134
|
});
|
|
135
|
-
const ariaModal = fg('platform_editor_a11y_macro_sidebar_dialog') ? 'false' : undefined;
|
|
136
|
-
const ariaLabelledBy = fg('platform_editor_a11y_macro_sidebar_dialog') ? undefined : 'context-panel-title';
|
|
137
135
|
return jsx(ContextPanelConsumer, null, ({
|
|
138
136
|
broadcastWidth
|
|
139
137
|
}) => {
|
|
@@ -146,8 +144,7 @@ class SwappableContentAreaInner extends React.PureComponent {
|
|
|
146
144
|
this.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
|
|
147
145
|
"data-testid": "context-panel-panel",
|
|
148
146
|
"aria-label": ((_this$props$intl = this.props.intl) === null || _this$props$intl === void 0 ? void 0 : _this$props$intl.formatMessage(contextPanelMessages.panelLabel)) || '',
|
|
149
|
-
"aria-
|
|
150
|
-
"aria-modal": ariaModal,
|
|
147
|
+
"aria-modal": "false",
|
|
151
148
|
role: "dialog"
|
|
152
149
|
}, jsx("div", {
|
|
153
150
|
"data-testid": "context-panel-content",
|
|
@@ -14,7 +14,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
16
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
|
-
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
17
|
+
import { expVal, expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
18
18
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
19
19
|
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
20
20
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
@@ -45,7 +45,7 @@ import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles'
|
|
|
45
45
|
import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
|
|
46
46
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles } from './styles/link';
|
|
47
47
|
import { listsStyles, listsStylesSafariFix } from './styles/list';
|
|
48
|
-
import { mediaAlignmentStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
48
|
+
import { mediaAlignmentStyles, mediaCaptionStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
49
49
|
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles, mentionsStylesMixin_platform_editor_centre_mention_padding, mentionsSelectionStylesWithSearchMatch, mentionDangerStyles } from './styles/mentions';
|
|
50
50
|
import { panelStyles, panelStylesMixin, nestedPanelBorderStylesMixin, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles, nestedPanelDangerStyles } from './styles/panelStyles';
|
|
51
51
|
import { paragraphStylesOld, paragraphStylesOldWithScaledMargin, paragraphStylesUGCRefreshed, paragraphStylesWithScaledMargin } from './styles/paragraphStyles';
|
|
@@ -136,9 +136,13 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
136
136
|
'--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px`
|
|
137
137
|
};
|
|
138
138
|
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
139
|
+
const allClassNames = [className];
|
|
140
|
+
if (expVal('platform_editor_resizer_cls_fix', 'isEnabled', false)) {
|
|
141
|
+
allClassNames.push('resizer-hover-zone-cls-fix');
|
|
142
|
+
}
|
|
139
143
|
return jsx("div", {
|
|
140
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
141
|
-
className:
|
|
145
|
+
className: allClassNames.join(' '),
|
|
142
146
|
ref: ref,
|
|
143
147
|
css: [
|
|
144
148
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -212,7 +216,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
212
216
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
213
217
|
fg('aifc_create_enabled') && smartCardDiffStyles,
|
|
214
218
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
215
|
-
mediaStyles,
|
|
219
|
+
mediaStyles, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') &&
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
221
|
+
mediaCaptionStyles,
|
|
216
222
|
// merge firstWrappedMediaStyles with mediaStyles when clean up platform_editor_fix_media_in_renderer
|
|
217
223
|
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles,
|
|
218
224
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -362,13 +362,12 @@ export const getExtensionStyles = () => {
|
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
|
|
365
|
-
// Dense content mode
|
|
365
|
+
// Dense content mode extensions styling fix - addresses EDITOR-1992
|
|
366
366
|
// When cleaning up the experiment, move this logic into the baseExtensionStyles above
|
|
367
367
|
const fontSize = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') ? relativeFontSizeToBase16(akEditorFullPageDenseFontSize) : undefined;
|
|
368
|
-
|
|
369
|
-
const denseContentModeTocStyles = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? css({
|
|
368
|
+
const denseExtensionStyles = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? css({
|
|
370
369
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
371
|
-
'.extension-container :not([data-inline-card-lozenge]
|
|
370
|
+
'.extension-container :not([data-inline-card-lozenge] *, [data-prosemirror-mark-name="code"])': {
|
|
372
371
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
373
372
|
fontSize: 'var(--ak-editor-base-font-size)'
|
|
374
373
|
}
|
|
@@ -381,5 +380,5 @@ export const getExtensionStyles = () => {
|
|
|
381
380
|
}) : css({});
|
|
382
381
|
|
|
383
382
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
384
|
-
return css(baseExtensionStyles,
|
|
383
|
+
return css(baseExtensionStyles, denseExtensionStyles);
|
|
385
384
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
4
|
+
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
4
5
|
import { MediaSharedClassNames, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
5
6
|
import { akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName, akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
7
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
@@ -414,4 +415,17 @@ export const mediaAlignmentStyles = css({
|
|
|
414
415
|
}
|
|
415
416
|
}
|
|
416
417
|
}
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
// When cleaning up platform_editor_content_mode_button_mvp, move this style into mediaStyles variable ⬆️
|
|
421
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
422
|
+
export const mediaCaptionStyles = css({
|
|
423
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
424
|
+
'.mediaSingleView-content-wrap': {
|
|
425
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
426
|
+
[`span#${CAPTION_PLACEHOLDER_ID}`]: {
|
|
427
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
428
|
+
fontSize: 'var(--ak-editor-base-font-size)'
|
|
429
|
+
}
|
|
430
|
+
}
|
|
417
431
|
});
|
|
@@ -191,10 +191,16 @@ export const resizerStyles = css({
|
|
|
191
191
|
background: "var(--ds-border, #091E4224)"
|
|
192
192
|
},
|
|
193
193
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
194
|
+
[`&.resizer-hover-zone-cls-fix .${resizerHoverZoneClassName}`]: {
|
|
195
|
+
display: 'flow-root'
|
|
196
|
+
},
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
194
198
|
[`.${resizerHoverZoneClassName}`]: {
|
|
195
199
|
position: 'relative',
|
|
196
200
|
display: 'inline-block',
|
|
197
201
|
width: '100%',
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
203
|
+
|
|
198
204
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
199
205
|
[`&.${resizerExtendedZone}`]: {
|
|
200
206
|
padding: `0 ${"var(--ds-space-150, 12px)"}`,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "215.1.
|
|
2
|
+
export const version = "215.1.6";
|
|
@@ -10,6 +10,7 @@ import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from '
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import uuid from 'uuid/v4';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
13
|
+
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
13
14
|
import { createDispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
14
15
|
import { useConstructor, usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
15
16
|
import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
@@ -26,6 +27,7 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
26
27
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
28
|
import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
28
29
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
29
31
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
30
32
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
31
33
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -542,7 +544,11 @@ export function ReactEditorView(props) {
|
|
|
542
544
|
};
|
|
543
545
|
}, []);
|
|
544
546
|
var handleEditorViewRef = useCallback(function (node) {
|
|
547
|
+
if (isSSR() && expVal('platform_editor_no_ssr', 'isEnabled', false)) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
545
550
|
if (node) {
|
|
551
|
+
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
|
|
546
552
|
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
547
553
|
var cleanupListeners = function cleanupListeners() {
|
|
548
554
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -184,7 +184,10 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
184
184
|
editorAPI: editorAPI,
|
|
185
185
|
editorView: editorView,
|
|
186
186
|
editorAppearance: appearance,
|
|
187
|
-
disabled: patch6Enabled ? !!disabled : undefined
|
|
187
|
+
disabled: patch6Enabled ? !!disabled : undefined,
|
|
188
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
189
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
190
|
+
popupsMountPoint: popupsMountPoint
|
|
188
191
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
189
192
|
editorView: editorView,
|
|
190
193
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -10,7 +10,10 @@ export var CommentToolbar = function CommentToolbar(_ref) {
|
|
|
10
10
|
var editorAPI = _ref.editorAPI,
|
|
11
11
|
editorView = _ref.editorView,
|
|
12
12
|
editorAppearance = _ref.editorAppearance,
|
|
13
|
-
disabled = _ref.disabled
|
|
13
|
+
disabled = _ref.disabled,
|
|
14
|
+
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
15
|
+
popupsMountPoint = _ref.popupsMountPoint,
|
|
16
|
+
popupsScrollableElement = _ref.popupsScrollableElement;
|
|
14
17
|
var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
15
18
|
var toolbar = components === null || components === void 0 ? void 0 : components.find(function (component) {
|
|
16
19
|
return component.key === TOOLBARS.PRIMARY_TOOLBAR;
|
|
@@ -24,6 +27,9 @@ export var CommentToolbar = function CommentToolbar(_ref) {
|
|
|
24
27
|
editorView: editorView,
|
|
25
28
|
editorAPI: editorAPI,
|
|
26
29
|
editorAppearance: editorAppearance,
|
|
27
|
-
isDisabled: disabled
|
|
30
|
+
isDisabled: disabled,
|
|
31
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
32
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
33
|
+
popupsMountPoint: popupsMountPoint
|
|
28
34
|
});
|
|
29
35
|
};
|
|
@@ -140,8 +140,6 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
140
140
|
width: "".concat(this.props.customWidth, "px"),
|
|
141
141
|
overflowX: 'hidden'
|
|
142
142
|
});
|
|
143
|
-
var ariaModal = fg('platform_editor_a11y_macro_sidebar_dialog') ? 'false' : undefined;
|
|
144
|
-
var ariaLabelledBy = fg('platform_editor_a11y_macro_sidebar_dialog') ? undefined : 'context-panel-title';
|
|
145
143
|
return jsx(ContextPanelConsumer, null, function (_ref) {
|
|
146
144
|
var _this2$props$intl;
|
|
147
145
|
var broadcastWidth = _ref.broadcastWidth;
|
|
@@ -153,8 +151,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
153
151
|
_this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
|
|
154
152
|
"data-testid": "context-panel-panel",
|
|
155
153
|
"aria-label": ((_this2$props$intl = _this2.props.intl) === null || _this2$props$intl === void 0 ? void 0 : _this2$props$intl.formatMessage(contextPanelMessages.panelLabel)) || '',
|
|
156
|
-
"aria-
|
|
157
|
-
"aria-modal": ariaModal,
|
|
154
|
+
"aria-modal": "false",
|
|
158
155
|
role: "dialog"
|
|
159
156
|
}, jsx("div", {
|
|
160
157
|
"data-testid": "context-panel-content",
|
|
@@ -15,7 +15,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
|
-
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
18
|
+
import { expVal, expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
19
19
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
20
20
|
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
21
21
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
@@ -46,7 +46,7 @@ import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles'
|
|
|
46
46
|
import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnResponsiveStyles, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutSelectedStylesNotAdvanced, layoutStylesForView } from './styles/layout';
|
|
47
47
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles } from './styles/link';
|
|
48
48
|
import { listsStyles, listsStylesSafariFix } from './styles/list';
|
|
49
|
-
import { mediaAlignmentStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
49
|
+
import { mediaAlignmentStyles, mediaCaptionStyles, mediaDangerStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
50
50
|
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles, mentionsStylesMixin_platform_editor_centre_mention_padding, mentionsSelectionStylesWithSearchMatch, mentionDangerStyles } from './styles/mentions';
|
|
51
51
|
import { panelStyles, panelStylesMixin, nestedPanelBorderStylesMixin, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles, nestedPanelDangerStyles } from './styles/panelStyles';
|
|
52
52
|
import { paragraphStylesOld, paragraphStylesOldWithScaledMargin, paragraphStylesUGCRefreshed, paragraphStylesWithScaledMargin } from './styles/paragraphStyles';
|
|
@@ -132,9 +132,13 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
132
132
|
'--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px")
|
|
133
133
|
};
|
|
134
134
|
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
135
|
+
var allClassNames = [className];
|
|
136
|
+
if (expVal('platform_editor_resizer_cls_fix', 'isEnabled', false)) {
|
|
137
|
+
allClassNames.push('resizer-hover-zone-cls-fix');
|
|
138
|
+
}
|
|
135
139
|
return jsx("div", {
|
|
136
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
137
|
-
className:
|
|
141
|
+
className: allClassNames.join(' '),
|
|
138
142
|
ref: ref,
|
|
139
143
|
css: [
|
|
140
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -208,7 +212,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
208
212
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
209
213
|
fg('aifc_create_enabled') && smartCardDiffStyles,
|
|
210
214
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
211
|
-
mediaStyles,
|
|
215
|
+
mediaStyles, expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') &&
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
217
|
+
mediaCaptionStyles,
|
|
212
218
|
// merge firstWrappedMediaStyles with mediaStyles when clean up platform_editor_fix_media_in_renderer
|
|
213
219
|
fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles,
|
|
214
220
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -362,13 +362,12 @@ export var getExtensionStyles = function getExtensionStyles() {
|
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
|
|
365
|
-
// Dense content mode
|
|
365
|
+
// Dense content mode extensions styling fix - addresses EDITOR-1992
|
|
366
366
|
// When cleaning up the experiment, move this logic into the baseExtensionStyles above
|
|
367
367
|
var fontSize = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') ? relativeFontSizeToBase16(akEditorFullPageDenseFontSize) : undefined;
|
|
368
|
-
|
|
369
|
-
var denseContentModeTocStyles = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? css({
|
|
368
|
+
var denseExtensionStyles = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? css({
|
|
370
369
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
371
|
-
'.extension-container :not([data-inline-card-lozenge]
|
|
370
|
+
'.extension-container :not([data-inline-card-lozenge] *, [data-prosemirror-mark-name="code"])': {
|
|
372
371
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
373
372
|
fontSize: 'var(--ak-editor-base-font-size)'
|
|
374
373
|
}
|
|
@@ -381,5 +380,5 @@ export var getExtensionStyles = function getExtensionStyles() {
|
|
|
381
380
|
}) : css({});
|
|
382
381
|
|
|
383
382
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
384
|
-
return css(baseExtensionStyles,
|
|
383
|
+
return css(baseExtensionStyles, denseExtensionStyles);
|
|
385
384
|
};
|
|
@@ -3,6 +3,7 @@ var _ProseMirror, _css;
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
6
|
+
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
6
7
|
import { MediaSharedClassNames, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
7
8
|
import { akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName, akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
9
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
@@ -271,4 +272,14 @@ export var mediaAlignmentStyles = css({
|
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
274
|
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// When cleaning up platform_editor_content_mode_button_mvp, move this style into mediaStyles variable ⬆️
|
|
278
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
279
|
+
export var mediaCaptionStyles = css({
|
|
280
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
281
|
+
'.mediaSingleView-content-wrap': _defineProperty({}, "span#".concat(CAPTION_PLACEHOLDER_ID), {
|
|
282
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
283
|
+
fontSize: 'var(--ak-editor-base-font-size)'
|
|
284
|
+
})
|
|
274
285
|
});
|
|
@@ -13,7 +13,7 @@ export var resizerHandleThumbWidth = 3;
|
|
|
13
13
|
export var handleWrapperClass = 'resizer-handle-wrapper';
|
|
14
14
|
|
|
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, Seems perfectly safe to autofix, but comments would be lost…
|
|
16
|
-
export var resizerStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(resizerItemClassName), _defineProperty({
|
|
16
|
+
export var resizerStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(resizerItemClassName), _defineProperty({
|
|
17
17
|
willChange: 'width',
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
19
|
'&:hover, &.display-handle': _defineProperty({}, "& > .".concat(handleWrapperClass, " > .").concat(resizerHandleClassName), {
|
|
@@ -144,6 +144,8 @@ export var resizerStyles = css(_defineProperty(_defineProperty(_defineProperty(_
|
|
|
144
144
|
background: "var(--ds-border-focused, #388BFF)"
|
|
145
145
|
})), ".ak-editor-no-interaction .ak-editor-selected-node .".concat(resizerHandleClassName, ":not(:hover) .").concat(resizerHandleThumbClassName), {
|
|
146
146
|
background: "var(--ds-border, #091E4224)"
|
|
147
|
+
}), "&.resizer-hover-zone-cls-fix .".concat(resizerHoverZoneClassName), {
|
|
148
|
+
display: 'flow-root'
|
|
147
149
|
}), ".".concat(resizerHoverZoneClassName), _defineProperty({
|
|
148
150
|
position: 'relative',
|
|
149
151
|
display: 'inline-block',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "215.1.
|
|
2
|
+
export var version = "215.1.6";
|
|
@@ -8,9 +8,12 @@ type CommentToolbarProps = {
|
|
|
8
8
|
editorAPI?: PublicPluginAPI<ToolbarEditorPlugins>;
|
|
9
9
|
editorAppearance: EditorAppearance;
|
|
10
10
|
editorView?: EditorView;
|
|
11
|
+
popupsBoundariesElement?: HTMLElement;
|
|
12
|
+
popupsMountPoint?: HTMLElement;
|
|
13
|
+
popupsScrollableElement?: HTMLElement;
|
|
11
14
|
};
|
|
12
15
|
/**
|
|
13
16
|
* Primary toolbar driven by components registered by `editor-plugin-toolbar`, introduced in `platform_editor_toolbar_aifc`.
|
|
14
17
|
*/
|
|
15
|
-
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
18
|
+
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
16
19
|
export {};
|
|
@@ -3,3 +3,4 @@ export declare const mediaStyles: SerializedStyles;
|
|
|
3
3
|
export declare const mediaDangerStyles: SerializedStyles;
|
|
4
4
|
export declare const mediaGroupStyles: SerializedStyles;
|
|
5
5
|
export declare const mediaAlignmentStyles: SerializedStyles;
|
|
6
|
+
export declare const mediaCaptionStyles: SerializedStyles;
|
|
@@ -10,9 +10,12 @@ type CommentToolbarProps = {
|
|
|
10
10
|
editorAPI?: PublicPluginAPI<ToolbarEditorPlugins>;
|
|
11
11
|
editorAppearance: EditorAppearance;
|
|
12
12
|
editorView?: EditorView;
|
|
13
|
+
popupsBoundariesElement?: HTMLElement;
|
|
14
|
+
popupsMountPoint?: HTMLElement;
|
|
15
|
+
popupsScrollableElement?: HTMLElement;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
15
18
|
* Primary toolbar driven by components registered by `editor-plugin-toolbar`, introduced in `platform_editor_toolbar_aifc`.
|
|
16
19
|
*/
|
|
17
|
-
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
20
|
+
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
18
21
|
export {};
|
|
@@ -3,3 +3,4 @@ export declare const mediaStyles: SerializedStyles;
|
|
|
3
3
|
export declare const mediaDangerStyles: SerializedStyles;
|
|
4
4
|
export declare const mediaGroupStyles: SerializedStyles;
|
|
5
5
|
export declare const mediaAlignmentStyles: SerializedStyles;
|
|
6
|
+
export declare const mediaCaptionStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.
|
|
3
|
+
"version": "215.2.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
65
65
|
"@atlaskit/react-ufo": "^4.12.0",
|
|
66
66
|
"@atlaskit/task-decision": "^19.2.0",
|
|
67
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
68
|
-
"@atlaskit/tokens": "^
|
|
67
|
+
"@atlaskit/tmp-editor-statsig": "^13.13.0",
|
|
68
|
+
"@atlaskit/tokens": "^7.0.0",
|
|
69
69
|
"@atlaskit/tooltip": "^20.5.0",
|
|
70
70
|
"@atlaskit/width-detector": "^5.0.0",
|
|
71
71
|
"@babel/runtime": "^7.0.0",
|
|
@@ -446,9 +446,6 @@
|
|
|
446
446
|
"platform_editor_resolve_hyperlinks_killswitch": {
|
|
447
447
|
"type": "boolean"
|
|
448
448
|
},
|
|
449
|
-
"platform_editor_a11y_macro_sidebar_dialog": {
|
|
450
|
-
"type": "boolean"
|
|
451
|
-
},
|
|
452
449
|
"platform_editor_blocktaskitem_patch_2": {
|
|
453
450
|
"type": "boolean",
|
|
454
451
|
"referenceOnly": true
|