@atlaskit/editor-core 208.3.6 → 208.4.1
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 +30 -0
- package/dist/cjs/create-editor/ReactEditorView/focusEditorElement.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +5 -46
- package/dist/cjs/ui/ContentStyles/index.js +12 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -1
- package/dist/cjs/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
- package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +12 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView/focusEditorElement.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +7 -48
- package/dist/es2019/ui/ContentStyles/index.js +11 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/es2019/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
- package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +11 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView/focusEditorElement.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +7 -48
- package/dist/esm/ui/ContentStyles/index.js +12 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/esm/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
- package/dist/esm/ui/EditorContentContainer/styles/mentions.js +11 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/mentions.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mentions.d.ts +1 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 208.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#176892](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176892)
|
|
8
|
+
[`7c387af73cfb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c387af73cfb2) -
|
|
9
|
+
[ux] Prevent scroll on focus before editor
|
|
10
|
+
- [#176864](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176864)
|
|
11
|
+
[`980fda095ab20`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/980fda095ab20) -
|
|
12
|
+
[ux] Adjust mention styles to use flex centering instead of fixed padding values
|
|
13
|
+
- [#177647](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177647)
|
|
14
|
+
[`422759e00f33d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/422759e00f33d) -
|
|
15
|
+
ED-28282 Clean up platform_editor_fix_table_width_inline_comment
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 208.4.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#177117](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177117)
|
|
23
|
+
[`49ae44aea25fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/49ae44aea25fc) -
|
|
24
|
+
Add new styles for inline nodes for find and replace, include these in block node checks
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#177523](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177523)
|
|
29
|
+
[`1faed88065ff6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1faed88065ff6) -
|
|
30
|
+
refactor editor fullpage toolbar height in FullPageContentArea
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 208.3.6
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -46,8 +46,6 @@ var tableMarginFullWidthMode = 2;
|
|
|
46
46
|
var akLayoutGutterOffset = 12;
|
|
47
47
|
var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
|
|
48
48
|
var AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
49
|
-
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = "var(--ds-space-500, 40px)";
|
|
50
|
-
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE = '2.188rem';
|
|
51
49
|
var getTotalPadding = function getTotalPadding() {
|
|
52
50
|
return (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2;
|
|
53
51
|
};
|
|
@@ -57,7 +55,7 @@ var editorContentAreaStyle = function editorContentAreaStyle(_ref) {
|
|
|
57
55
|
var layoutMaxWidth = _ref.layoutMaxWidth,
|
|
58
56
|
fullWidthMode = _ref.fullWidthMode,
|
|
59
57
|
isEditorToolbarHidden = _ref.isEditorToolbarHidden;
|
|
60
|
-
return [editorContentArea, editorContentAreaProsemirrorStyle,
|
|
58
|
+
return [editorContentArea, editorContentAreaProsemirrorStyle, fullWidthNonChromelessBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth),
|
|
61
59
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
62
60
|
(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlock() : editorContentAreaContainerStyle()].concat((0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') ? [] : [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') &&
|
|
63
61
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -164,23 +162,6 @@ var editorContentAreaProsemirrorStyle = (0, _react2.css)({
|
|
|
164
162
|
marginBottom: "var(--ds-space-300, 24px)"
|
|
165
163
|
})
|
|
166
164
|
});
|
|
167
|
-
var fullWidthModeBreakoutBlockTableStyle = (0, _react2.css)({
|
|
168
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
169
|
-
'.fabric-editor--full-width-mode': {
|
|
170
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
171
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
172
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
173
|
-
width: '100% !important'
|
|
174
|
-
},
|
|
175
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
176
|
-
'.fabric-editor-breakout-mark': {
|
|
177
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
178
|
-
marginLeft: 'unset !important',
|
|
179
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
180
|
-
transform: 'none !important'
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
165
|
var fullWidthNonChromelessBreakoutBlockTableStyle = (0, _react2.css)({
|
|
185
166
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
186
167
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -220,18 +201,6 @@ var editorContentGutterStyle = function editorContentGutterStyle() {
|
|
|
220
201
|
};
|
|
221
202
|
|
|
222
203
|
// new styles
|
|
223
|
-
var editorContentAreaNoToolbarLivePageJumpMitigation = (0, _react2.css)({
|
|
224
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
225
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
226
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE, " + 1px)")
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
var editorContentAreaNoToolbarControls = (0, _react2.css)({
|
|
230
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
231
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
232
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, " + 1px)")
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
204
|
var editorContentAreaNew = (0, _react2.css)({
|
|
236
205
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
237
206
|
lineHeight: '24px',
|
|
@@ -240,7 +209,7 @@ var editorContentAreaNew = (0, _react2.css)({
|
|
|
240
209
|
'.ak-editor-content-area-no-toolbar &': {
|
|
241
210
|
// When the toolbar is hidden, we don't want content to jump up
|
|
242
211
|
// the extra 1px is to account for the border on the toolbar
|
|
243
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " +
|
|
212
|
+
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + var(--ak-editor-fullpage-toolbar-height) + 1px)")
|
|
244
213
|
},
|
|
245
214
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
246
215
|
height: 'calc( 100% - 105px )',
|
|
@@ -330,7 +299,7 @@ var editorContentGutterStyles = (0, _react2.css)({
|
|
|
330
299
|
var contentAreaNew = (0, _react2.css)({
|
|
331
300
|
display: 'flex',
|
|
332
301
|
flexDirection: 'row',
|
|
333
|
-
height: "calc(100% -
|
|
302
|
+
height: "calc(100% - var(--ak-editor-fullpage-toolbar-height))",
|
|
334
303
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
335
304
|
'&.ak-editor-content-area-no-toolbar': {
|
|
336
305
|
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
@@ -342,12 +311,6 @@ var contentAreaNew = (0, _react2.css)({
|
|
|
342
311
|
padding: 0,
|
|
343
312
|
transition: "padding 0ms ".concat(akEditorSwoopCubicBezier)
|
|
344
313
|
});
|
|
345
|
-
var contentAreaHeightLivePageJumpMitigation = (0, _react2.css)({
|
|
346
|
-
height: "calc(100% - ".concat(FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE, ")")
|
|
347
|
-
});
|
|
348
|
-
var contentAreaHeightControls = (0, _react2.css)({
|
|
349
|
-
height: "calc(100% - ".concat(FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, ")")
|
|
350
|
-
});
|
|
351
314
|
var contentAreaHeightNoToolbar = (0, _react2.css)({
|
|
352
315
|
height: '100%'
|
|
353
316
|
});
|
|
@@ -404,9 +367,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
404
367
|
return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1');
|
|
405
368
|
};
|
|
406
369
|
return (0, _react2.jsx)("div", {
|
|
407
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew,
|
|
408
|
-
exposure: true
|
|
409
|
-
}) && contentAreaHeightControls, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
370
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
410
371
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
411
372
|
_StyledComponents.contentArea,
|
|
412
373
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -432,9 +393,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
432
393
|
editorView: props.editorView,
|
|
433
394
|
editorDisabled: props.disabled
|
|
434
395
|
}, (0, _react2.jsx)("div", {
|
|
435
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew,
|
|
436
|
-
exposure: true
|
|
437
|
-
}) && editorContentAreaNoToolbarControls, (0, _platformFeatureFlags.fg)('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle,
|
|
396
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
438
397
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
439
398
|
(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace] : (0, _toConsumableArray2.default)(editorContentAreaStyle({
|
|
440
399
|
fullWidthMode: fullWidthMode,
|
|
@@ -100,6 +100,16 @@ var mentionNodeStyles = (0, _react2.css)({
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
+
|
|
104
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
105
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
106
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
107
|
+
var mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = (0, _react2.css)({
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
109
|
+
'.editor-mention-primitive': {
|
|
110
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
111
|
+
}
|
|
112
|
+
});
|
|
103
113
|
var vanillaSelectionStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
|
|
104
114
|
var mentionsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
|
|
105
115
|
var listsStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t/* In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\tThe following rule resets the first p tag back to its original margin\n\t\t\tdefined in packages/editor/editor-common/src/styles/shared/paragraph.ts */\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n /* This prevents https://product-fabric.atlassian.net/browse/ED-20924 */\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _browser.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
@@ -157,9 +167,9 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
157
167
|
// Under editor experiment platform_editor_core_static_emotion
|
|
158
168
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
159
169
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
160
|
-
return (0, _react2.css)(_templateObject9 || (_templateObject9 = (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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\n ", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 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, (0, _editorSharedStyles.editorFontSize)({
|
|
170
|
+
return (0, _react2.css)(_templateObject9 || (_templateObject9 = (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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\n ", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 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, (0, _editorSharedStyles.editorFontSize)({
|
|
161
171
|
theme: props.theme
|
|
162
|
-
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (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)(_templateObject1 || (_templateObject1 = (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)", firstFloatingToolbarButtonStyles, _styles5.placeholderTextStyles, (0, _platformFeatureFlags.fg)('platform_editor_system_fake_text_highlight_colour') && _styles5.placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, 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)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, mentionNodeStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
172
|
+
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (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)(_templateObject1 || (_templateObject1 = (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)", firstFloatingToolbarButtonStyles, _styles5.placeholderTextStyles, (0, _platformFeatureFlags.fg)('platform_editor_system_fake_text_highlight_colour') && _styles5.placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, 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)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, mentionNodeStyles, (0, _platformFeatureFlags.fg)('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
163
173
|
exposure: false
|
|
164
174
|
}) && vanillaSelectionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
165
175
|
exposure: false
|
|
@@ -318,7 +318,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
318
318
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
319
319
|
_mentions.mentionNodeStyles,
|
|
320
320
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
321
|
-
_mentions.mentionsSelectionStyles, (0,
|
|
321
|
+
_mentions.mentionsSelectionStyles, (0, _platformFeatureFlags.fg)('platform_editor_centre_mention_padding') &&
|
|
322
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
323
|
+
_mentions.mentionsStylesMixin_platform_editor_centre_mention_padding, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
322
324
|
exposure: false
|
|
323
325
|
}) ?
|
|
324
326
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -44,13 +44,23 @@ var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)({
|
|
|
44
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
45
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
46
46
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", "\n\t\t\t")
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
50
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"),
|
|
51
|
+
borderRadius: '3px'
|
|
47
52
|
}
|
|
48
53
|
},
|
|
49
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
-
'.search-match-
|
|
55
|
+
'.search-match-block.search-match-block-selected': {
|
|
51
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
52
57
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
53
58
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", "\n\t\t\t")
|
|
59
|
+
},
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
61
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
62
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"),
|
|
63
|
+
borderRadius: '3px'
|
|
54
64
|
}
|
|
55
65
|
},
|
|
56
66
|
/** With node selection */
|
|
@@ -59,30 +69,49 @@ var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)({
|
|
|
59
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
70
|
'.loader-wrapper>div::after': {
|
|
61
71
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
72
|
+
},
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
74
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
76
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", " !important")
|
|
62
77
|
}
|
|
63
78
|
},
|
|
64
79
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
-
'.search-match-
|
|
80
|
+
'.search-match-block.search-match-block-selected.ak-editor-selected-node': {
|
|
66
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
67
82
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
68
83
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
84
|
+
},
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
86
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
88
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", " !important")
|
|
69
89
|
}
|
|
70
90
|
},
|
|
71
91
|
/** Dark mode */
|
|
72
|
-
|
|
73
92
|
/** Without node selection */
|
|
74
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
94
|
'.search-match-block.search-match-dark': {
|
|
76
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
96
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
78
97
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", "\n\t\t\t")
|
|
98
|
+
},
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
100
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
101
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)"),
|
|
102
|
+
borderRadius: '3px'
|
|
79
103
|
}
|
|
80
104
|
},
|
|
81
105
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
82
|
-
'.search-match-
|
|
106
|
+
'.search-match-block.search-match-block-selected.search-match-dark': {
|
|
83
107
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
84
108
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
85
109
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", "\n\t\t\t")
|
|
110
|
+
},
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
112
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
113
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)"),
|
|
114
|
+
borderRadius: '3px'
|
|
86
115
|
}
|
|
87
116
|
},
|
|
88
117
|
/** With node selection */
|
|
@@ -91,13 +120,23 @@ var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)({
|
|
|
91
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
92
121
|
'.loader-wrapper>div::after': {
|
|
93
122
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
123
|
+
},
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
127
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)", " !important")
|
|
94
128
|
}
|
|
95
129
|
},
|
|
96
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
97
|
-
'.search-match-
|
|
131
|
+
'.search-match-block.search-match-block-selected.search-match-dark.ak-editor-selected-node': {
|
|
98
132
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
133
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
100
134
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
135
|
+
},
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
137
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
139
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)", " !important")
|
|
101
140
|
}
|
|
102
141
|
}
|
|
103
142
|
});
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.mentionsStyles = exports.mentionsSelectionStyles = exports.mentionNodeStyles = void 0;
|
|
7
|
+
exports.mentionsStylesMixin_platform_editor_centre_mention_padding = exports.mentionsStyles = exports.mentionsSelectionStyles = exports.mentionNodeStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _mention = require("@atlaskit/editor-common/mention");
|
|
@@ -85,6 +85,17 @@ var mentionNodeStyles = exports.mentionNodeStyles = (0, _react.css)({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
89
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
90
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
91
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
92
|
+
var mentionsStylesMixin_platform_editor_centre_mention_padding = exports.mentionsStylesMixin_platform_editor_centre_mention_padding = (0, _react.css)({
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
94
|
+
'.editor-mention-primitive': {
|
|
95
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
88
99
|
// This is mentions styles for mentions selection styles based on the vanilla node view
|
|
89
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
90
101
|
var mentionsSelectionStyles = exports.mentionsSelectionStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
@@ -12,7 +12,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
12
12
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
13
13
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
14
14
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
15
|
-
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT
|
|
15
|
+
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
16
16
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
@@ -34,8 +34,6 @@ const tableMarginFullWidthMode = 2;
|
|
|
34
34
|
const akLayoutGutterOffset = 12;
|
|
35
35
|
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
36
36
|
const AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
37
|
-
const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = "var(--ds-space-500, 40px)";
|
|
38
|
-
const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE = '2.188rem';
|
|
39
37
|
const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
|
|
40
38
|
|
|
41
39
|
// old styles - to be deleted when cleaning up experiment `platform_editor_core_static_emotion_non_central`
|
|
@@ -43,7 +41,7 @@ const editorContentAreaStyle = ({
|
|
|
43
41
|
layoutMaxWidth,
|
|
44
42
|
fullWidthMode,
|
|
45
43
|
isEditorToolbarHidden
|
|
46
|
-
}) => [editorContentArea, editorContentAreaProsemirrorStyle,
|
|
44
|
+
}) => [editorContentArea, editorContentAreaProsemirrorStyle, fullWidthNonChromelessBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth),
|
|
47
45
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
48
46
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlock() : editorContentAreaContainerStyle(), ...(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
49
47
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -114,7 +112,7 @@ const editorContentArea = css({
|
|
|
114
112
|
// When the toolbar is hidden, we don't want content to jump up
|
|
115
113
|
// the extra 1px is to account for the border on the toolbar
|
|
116
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
117
|
-
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${
|
|
115
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()} + 1px)`
|
|
118
116
|
},
|
|
119
117
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
120
118
|
height: 'calc( 100% - 105px )',
|
|
@@ -147,23 +145,6 @@ const editorContentAreaProsemirrorStyle = css({
|
|
|
147
145
|
}
|
|
148
146
|
}
|
|
149
147
|
});
|
|
150
|
-
const fullWidthModeBreakoutBlockTableStyle = css({
|
|
151
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
152
|
-
'.fabric-editor--full-width-mode': {
|
|
153
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
154
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
155
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
156
|
-
width: '100% !important'
|
|
157
|
-
},
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
159
|
-
'.fabric-editor-breakout-mark': {
|
|
160
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
161
|
-
marginLeft: 'unset !important',
|
|
162
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
163
|
-
transform: 'none !important'
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
148
|
const fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
168
149
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
169
150
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -203,18 +184,6 @@ const editorContentGutterStyle = () => {
|
|
|
203
184
|
};
|
|
204
185
|
|
|
205
186
|
// new styles
|
|
206
|
-
const editorContentAreaNoToolbarLivePageJumpMitigation = css({
|
|
207
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
208
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
209
|
-
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE} + 1px)`
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
const editorContentAreaNoToolbarControls = css({
|
|
213
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
214
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
215
|
-
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT} + 1px)`
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
187
|
const editorContentAreaNew = css({
|
|
219
188
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
220
189
|
lineHeight: '24px',
|
|
@@ -223,7 +192,7 @@ const editorContentAreaNew = css({
|
|
|
223
192
|
'.ak-editor-content-area-no-toolbar &': {
|
|
224
193
|
// When the toolbar is hidden, we don't want content to jump up
|
|
225
194
|
// the extra 1px is to account for the border on the toolbar
|
|
226
|
-
paddingTop: `calc(${"var(--ds-space-600, 48px)"} +
|
|
195
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + var(--ak-editor-fullpage-toolbar-height) + 1px)`
|
|
227
196
|
},
|
|
228
197
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
229
198
|
height: 'calc( 100% - 105px )',
|
|
@@ -313,7 +282,7 @@ const editorContentGutterStyles = css({
|
|
|
313
282
|
const contentAreaNew = css({
|
|
314
283
|
display: 'flex',
|
|
315
284
|
flexDirection: 'row',
|
|
316
|
-
height: `calc(100% -
|
|
285
|
+
height: `calc(100% - var(--ak-editor-fullpage-toolbar-height))`,
|
|
317
286
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
318
287
|
'&.ak-editor-content-area-no-toolbar': {
|
|
319
288
|
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
@@ -325,12 +294,6 @@ const contentAreaNew = css({
|
|
|
325
294
|
padding: 0,
|
|
326
295
|
transition: `padding 0ms ${akEditorSwoopCubicBezier}`
|
|
327
296
|
});
|
|
328
|
-
const contentAreaHeightLivePageJumpMitigation = css({
|
|
329
|
-
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE})`
|
|
330
|
-
});
|
|
331
|
-
const contentAreaHeightControls = css({
|
|
332
|
-
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT})`
|
|
333
|
-
});
|
|
334
297
|
const contentAreaHeightNoToolbar = css({
|
|
335
298
|
height: '100%'
|
|
336
299
|
});
|
|
@@ -383,9 +346,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
383
346
|
return editorExperiment('platform_editor_controls', 'variant1');
|
|
384
347
|
};
|
|
385
348
|
return jsx("div", {
|
|
386
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew,
|
|
387
|
-
exposure: true
|
|
388
|
-
}) && contentAreaHeightControls, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
349
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
389
350
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
390
351
|
contentArea,
|
|
391
352
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -411,9 +372,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
411
372
|
editorView: props.editorView,
|
|
412
373
|
editorDisabled: props.disabled
|
|
413
374
|
}, jsx("div", {
|
|
414
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew,
|
|
415
|
-
exposure: true
|
|
416
|
-
}) && editorContentAreaNoToolbarControls, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle,
|
|
375
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
417
376
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
418
377
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace] : [
|
|
419
378
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -109,6 +109,16 @@ const mentionNodeStyles = css({
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
+
|
|
113
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
114
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
115
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
116
|
+
const mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = css({
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
118
|
+
'.editor-mention-primitive': {
|
|
119
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
120
|
+
}
|
|
121
|
+
});
|
|
112
122
|
const vanillaSelectionStyles = css`
|
|
113
123
|
.danger {
|
|
114
124
|
.editor-mention-primitive {
|
|
@@ -413,6 +423,7 @@ const legacyContentStyles = props => css`
|
|
|
413
423
|
${panelStyles()}
|
|
414
424
|
${mentionsStyles}
|
|
415
425
|
${mentionNodeStyles}
|
|
426
|
+
${fg('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding}
|
|
416
427
|
${editorExperiment('platform_editor_vanilla_dom', true, {
|
|
417
428
|
exposure: false
|
|
418
429
|
}) && vanillaSelectionStyles}
|
|
@@ -42,7 +42,7 @@ import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderN
|
|
|
42
42
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles, linkStylesOld } from './styles/link';
|
|
43
43
|
import { listsStyles, listsStylesSafariFix } from './styles/list';
|
|
44
44
|
import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
45
|
-
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles } from './styles/mentions';
|
|
45
|
+
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles, mentionsStylesMixin_platform_editor_centre_mention_padding } from './styles/mentions';
|
|
46
46
|
import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
|
|
47
47
|
import { paragraphStylesOld, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
48
48
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderTextStylesMixin_fg_platform_editor_system_fake_text_highlight_colour, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
@@ -313,7 +313,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
313
313
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
314
314
|
mentionNodeStyles,
|
|
315
315
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
316
|
-
mentionsSelectionStyles,
|
|
316
|
+
mentionsSelectionStyles, fg('platform_editor_centre_mention_padding') &&
|
|
317
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
318
|
+
mentionsStylesMixin_platform_editor_centre_mention_padding, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
317
319
|
exposure: false
|
|
318
320
|
}) ?
|
|
319
321
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -40,16 +40,26 @@ export const findReplaceStylesNew = css({
|
|
|
40
40
|
inset 0 0 0 1px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"},
|
|
41
41
|
inset 0 0 0 5px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}
|
|
42
42
|
`
|
|
43
|
+
},
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
46
|
+
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"}`,
|
|
47
|
+
borderRadius: '3px'
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
46
|
-
'.search-match-
|
|
51
|
+
'.search-match-block.search-match-block-selected': {
|
|
47
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
48
53
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
49
54
|
boxShadow: `
|
|
50
55
|
inset 0 0 0 1px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"},
|
|
51
56
|
inset 0 0 0 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}
|
|
52
57
|
`
|
|
58
|
+
},
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
61
|
+
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"}`,
|
|
62
|
+
borderRadius: '3px'
|
|
53
63
|
}
|
|
54
64
|
},
|
|
55
65
|
/** With node selection */
|
|
@@ -62,10 +72,15 @@ export const findReplaceStylesNew = css({
|
|
|
62
72
|
inset 0 0 0 5px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"},
|
|
63
73
|
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
64
74
|
`
|
|
75
|
+
},
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
79
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"} !important`
|
|
65
80
|
}
|
|
66
81
|
},
|
|
67
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
-
'.search-match-
|
|
83
|
+
'.search-match-block.search-match-block-selected.ak-editor-selected-node': {
|
|
69
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
85
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
71
86
|
boxShadow: `
|
|
@@ -73,10 +88,14 @@ export const findReplaceStylesNew = css({
|
|
|
73
88
|
inset 0 0 0 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"},
|
|
74
89
|
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
75
90
|
`
|
|
91
|
+
},
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
93
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
95
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"} !important`
|
|
76
96
|
}
|
|
77
97
|
},
|
|
78
98
|
/** Dark mode */
|
|
79
|
-
|
|
80
99
|
/** Without node selection */
|
|
81
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
82
101
|
'.search-match-block.search-match-dark': {
|
|
@@ -86,16 +105,26 @@ export const findReplaceStylesNew = css({
|
|
|
86
105
|
inset 0 0 0 1px ${"var(--ds-background-accent-yellow-bolder, #946F00)"},
|
|
87
106
|
inset 0 0 0 5px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}
|
|
88
107
|
`
|
|
108
|
+
},
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
110
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
111
|
+
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"}`,
|
|
112
|
+
borderRadius: '3px'
|
|
89
113
|
}
|
|
90
114
|
},
|
|
91
115
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
92
|
-
'.search-match-
|
|
116
|
+
'.search-match-block.search-match-block-selected.search-match-dark': {
|
|
93
117
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
94
118
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
95
119
|
boxShadow: `
|
|
96
120
|
inset 0 0 0 1px ${"var(--ds-background-accent-yellow-bolder, #946F00)"},
|
|
97
121
|
inset 0 0 0 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}
|
|
98
122
|
`
|
|
123
|
+
},
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
126
|
+
boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"}`,
|
|
127
|
+
borderRadius: '3px'
|
|
99
128
|
}
|
|
100
129
|
},
|
|
101
130
|
/** With node selection */
|
|
@@ -108,10 +137,15 @@ export const findReplaceStylesNew = css({
|
|
|
108
137
|
inset 0 0 0 5px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"},
|
|
109
138
|
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
110
139
|
`
|
|
140
|
+
},
|
|
141
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
142
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
144
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"} !important`
|
|
111
145
|
}
|
|
112
146
|
},
|
|
113
147
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
114
|
-
'.search-match-
|
|
148
|
+
'.search-match-block.search-match-block-selected.search-match-dark.ak-editor-selected-node': {
|
|
115
149
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
116
150
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
117
151
|
boxShadow: `
|
|
@@ -119,6 +153,11 @@ export const findReplaceStylesNew = css({
|
|
|
119
153
|
inset 0 0 0 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"},
|
|
120
154
|
0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
|
|
121
155
|
`
|
|
156
|
+
},
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
160
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"} !important`
|
|
122
161
|
}
|
|
123
162
|
}
|
|
124
163
|
});
|
|
@@ -91,6 +91,17 @@ export const mentionNodeStyles = css({
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
95
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
96
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
98
|
+
export const mentionsStylesMixin_platform_editor_centre_mention_padding = css({
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
100
|
+
'.editor-mention-primitive': {
|
|
101
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
94
105
|
// This is mentions styles for mentions selection styles based on the vanilla node view
|
|
95
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
96
107
|
export const mentionsSelectionStyles = css({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "208.
|
|
2
|
+
export const version = "208.4.0";
|
|
@@ -14,7 +14,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
14
14
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
15
15
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
16
16
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
17
|
-
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT
|
|
17
|
+
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
@@ -36,8 +36,6 @@ var tableMarginFullWidthMode = 2;
|
|
|
36
36
|
var akLayoutGutterOffset = 12;
|
|
37
37
|
var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
|
|
38
38
|
var AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
39
|
-
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = "var(--ds-space-500, 40px)";
|
|
40
|
-
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE = '2.188rem';
|
|
41
39
|
var getTotalPadding = function getTotalPadding() {
|
|
42
40
|
return akEditorGutterPaddingDynamic() * 2;
|
|
43
41
|
};
|
|
@@ -47,7 +45,7 @@ var editorContentAreaStyle = function editorContentAreaStyle(_ref) {
|
|
|
47
45
|
var layoutMaxWidth = _ref.layoutMaxWidth,
|
|
48
46
|
fullWidthMode = _ref.fullWidthMode,
|
|
49
47
|
isEditorToolbarHidden = _ref.isEditorToolbarHidden;
|
|
50
|
-
return [editorContentArea, editorContentAreaProsemirrorStyle,
|
|
48
|
+
return [editorContentArea, editorContentAreaProsemirrorStyle, fullWidthNonChromelessBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth),
|
|
51
49
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
52
50
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlock() : editorContentAreaContainerStyle()].concat(_toConsumableArray(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
53
51
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -125,7 +123,7 @@ var editorContentArea = css({
|
|
|
125
123
|
// When the toolbar is hidden, we don't want content to jump up
|
|
126
124
|
// the extra 1px is to account for the border on the toolbar
|
|
127
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
128
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ",
|
|
126
|
+
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(), " + 1px)")
|
|
129
127
|
},
|
|
130
128
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
131
129
|
height: 'calc( 100% - 105px )',
|
|
@@ -154,23 +152,6 @@ var editorContentAreaProsemirrorStyle = css({
|
|
|
154
152
|
marginBottom: "var(--ds-space-300, 24px)"
|
|
155
153
|
})
|
|
156
154
|
});
|
|
157
|
-
var fullWidthModeBreakoutBlockTableStyle = css({
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
159
|
-
'.fabric-editor--full-width-mode': {
|
|
160
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
161
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
162
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
163
|
-
width: '100% !important'
|
|
164
|
-
},
|
|
165
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
166
|
-
'.fabric-editor-breakout-mark': {
|
|
167
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
168
|
-
marginLeft: 'unset !important',
|
|
169
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
170
|
-
transform: 'none !important'
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
155
|
var fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
175
156
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
176
157
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -210,18 +191,6 @@ var editorContentGutterStyle = function editorContentGutterStyle() {
|
|
|
210
191
|
};
|
|
211
192
|
|
|
212
193
|
// new styles
|
|
213
|
-
var editorContentAreaNoToolbarLivePageJumpMitigation = css({
|
|
214
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
215
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
216
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE, " + 1px)")
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
var editorContentAreaNoToolbarControls = css({
|
|
220
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
221
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
222
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + ", FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, " + 1px)")
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
194
|
var editorContentAreaNew = css({
|
|
226
195
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
227
196
|
lineHeight: '24px',
|
|
@@ -230,7 +199,7 @@ var editorContentAreaNew = css({
|
|
|
230
199
|
'.ak-editor-content-area-no-toolbar &': {
|
|
231
200
|
// When the toolbar is hidden, we don't want content to jump up
|
|
232
201
|
// the extra 1px is to account for the border on the toolbar
|
|
233
|
-
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " +
|
|
202
|
+
paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + var(--ak-editor-fullpage-toolbar-height) + 1px)")
|
|
234
203
|
},
|
|
235
204
|
paddingBottom: "var(--ds-space-600, 48px)",
|
|
236
205
|
height: 'calc( 100% - 105px )',
|
|
@@ -320,7 +289,7 @@ var editorContentGutterStyles = css({
|
|
|
320
289
|
var contentAreaNew = css({
|
|
321
290
|
display: 'flex',
|
|
322
291
|
flexDirection: 'row',
|
|
323
|
-
height: "calc(100% -
|
|
292
|
+
height: "calc(100% - var(--ak-editor-fullpage-toolbar-height))",
|
|
324
293
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
325
294
|
'&.ak-editor-content-area-no-toolbar': {
|
|
326
295
|
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
@@ -332,12 +301,6 @@ var contentAreaNew = css({
|
|
|
332
301
|
padding: 0,
|
|
333
302
|
transition: "padding 0ms ".concat(akEditorSwoopCubicBezier)
|
|
334
303
|
});
|
|
335
|
-
var contentAreaHeightLivePageJumpMitigation = css({
|
|
336
|
-
height: "calc(100% - ".concat(FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE, ")")
|
|
337
|
-
});
|
|
338
|
-
var contentAreaHeightControls = css({
|
|
339
|
-
height: "calc(100% - ".concat(FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, ")")
|
|
340
|
-
});
|
|
341
304
|
var contentAreaHeightNoToolbar = css({
|
|
342
305
|
height: '100%'
|
|
343
306
|
});
|
|
@@ -394,9 +357,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
394
357
|
return editorExperiment('platform_editor_controls', 'variant1');
|
|
395
358
|
};
|
|
396
359
|
return jsx("div", {
|
|
397
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew,
|
|
398
|
-
exposure: true
|
|
399
|
-
}) && contentAreaHeightControls, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
360
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
400
361
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
401
362
|
contentArea,
|
|
402
363
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -422,9 +383,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
422
383
|
editorView: props.editorView,
|
|
423
384
|
editorDisabled: props.disabled
|
|
424
385
|
}, jsx("div", {
|
|
425
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew,
|
|
426
|
-
exposure: true
|
|
427
|
-
}) && editorContentAreaNoToolbarControls, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle,
|
|
386
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
428
387
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
429
388
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace] : _toConsumableArray(editorContentAreaStyle({
|
|
430
389
|
fullWidthMode: fullWidthMode,
|
|
@@ -93,6 +93,16 @@ var mentionNodeStyles = css({
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
+
|
|
97
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
98
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
99
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
100
|
+
var mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = css({
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
102
|
+
'.editor-mention-primitive': {
|
|
103
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
104
|
+
}
|
|
105
|
+
});
|
|
96
106
|
var vanillaSelectionStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
|
|
97
107
|
var mentionsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
|
|
98
108
|
var listsStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t/* In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\tThe following rule resets the first p tag back to its original margin\n\t\t\tdefined in packages/editor/editor-common/src/styles/shared/paragraph.ts */\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n /* This prevents https://product-fabric.atlassian.net/browse/ED-20924 */\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
@@ -150,9 +160,9 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
150
160
|
// Under editor experiment platform_editor_core_static_emotion
|
|
151
161
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
152
162
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
153
|
-
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\n ", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
|
|
163
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\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--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-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\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\n ", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
|
|
154
164
|
theme: props.theme
|
|
155
|
-
}), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\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, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\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)", firstFloatingToolbarButtonStyles, placeholderTextStyles, fg('platform_editor_system_fake_text_highlight_colour') && placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(props.typographyTheme), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles(), layoutStyles(props.viewMode), fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, mentionNodeStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
165
|
+
}), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\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, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\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)", firstFloatingToolbarButtonStyles, placeholderTextStyles, fg('platform_editor_system_fake_text_highlight_colour') && placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(props.typographyTheme), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles(), layoutStyles(props.viewMode), fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, mentionNodeStyles, fg('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
156
166
|
exposure: false
|
|
157
167
|
}) && vanillaSelectionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
158
168
|
exposure: false
|
|
@@ -42,7 +42,7 @@ import { layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderN
|
|
|
42
42
|
import { hyperLinkFloatingToolbarStyles, linkLegacyIconStylesFix, linkStyles, linkStylesOld } from './styles/link';
|
|
43
43
|
import { listsStyles, listsStylesSafariFix } from './styles/list';
|
|
44
44
|
import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
45
|
-
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles } from './styles/mentions';
|
|
45
|
+
import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles, mentionsStylesMixin_platform_editor_centre_mention_padding } from './styles/mentions';
|
|
46
46
|
import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
|
|
47
47
|
import { paragraphStylesOld, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
48
48
|
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderTextStylesMixin_fg_platform_editor_system_fake_text_highlight_colour, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
@@ -310,7 +310,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
310
310
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
311
311
|
mentionNodeStyles,
|
|
312
312
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
313
|
-
mentionsSelectionStyles,
|
|
313
|
+
mentionsSelectionStyles, fg('platform_editor_centre_mention_padding') &&
|
|
314
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
315
|
+
mentionsStylesMixin_platform_editor_centre_mention_padding, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
314
316
|
exposure: false
|
|
315
317
|
}) ?
|
|
316
318
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -37,13 +37,23 @@ export var findReplaceStylesNew = css({
|
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
38
38
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
39
39
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", "\n\t\t\t")
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
42
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
43
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-subtler, #F8E6A0)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"),
|
|
44
|
+
borderRadius: '3px'
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
|
-
'.search-match-
|
|
48
|
+
'.search-match-block.search-match-block-selected': {
|
|
44
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
50
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
46
51
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", "\n\t\t\t")
|
|
52
|
+
},
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
54
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
55
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"),
|
|
56
|
+
borderRadius: '3px'
|
|
47
57
|
}
|
|
48
58
|
},
|
|
49
59
|
/** With node selection */
|
|
@@ -52,30 +62,49 @@ export var findReplaceStylesNew = css({
|
|
|
52
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
53
63
|
'.loader-wrapper>div::after': {
|
|
54
64
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
65
|
+
},
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
67
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
69
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", " !important")
|
|
55
70
|
}
|
|
56
71
|
},
|
|
57
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
-
'.search-match-
|
|
73
|
+
'.search-match-block.search-match-block-selected.ak-editor-selected-node': {
|
|
59
74
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
75
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
61
76
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
77
|
+
},
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
81
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", " !important")
|
|
62
82
|
}
|
|
63
83
|
},
|
|
64
84
|
/** Dark mode */
|
|
65
|
-
|
|
66
85
|
/** Without node selection */
|
|
67
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
87
|
'.search-match-block.search-match-dark': {
|
|
69
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
89
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
71
90
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", "\n\t\t\t")
|
|
91
|
+
},
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
93
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
94
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)"),
|
|
95
|
+
borderRadius: '3px'
|
|
72
96
|
}
|
|
73
97
|
},
|
|
74
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
|
-
'.search-match-
|
|
99
|
+
'.search-match-block.search-match-block-selected.search-match-dark': {
|
|
76
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
101
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
78
102
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", "\n\t\t\t")
|
|
103
|
+
},
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
105
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
|
|
106
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)"),
|
|
107
|
+
borderRadius: '3px'
|
|
79
108
|
}
|
|
80
109
|
},
|
|
81
110
|
/** With node selection */
|
|
@@ -84,13 +113,23 @@ export var findReplaceStylesNew = css({
|
|
|
84
113
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
85
114
|
'.loader-wrapper>div::after': {
|
|
86
115
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
116
|
+
},
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
118
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
120
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-bolder-pressed, #533F04)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)", " !important")
|
|
87
121
|
}
|
|
88
122
|
},
|
|
89
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
90
|
-
'.search-match-
|
|
124
|
+
'.search-match-block.search-match-block-selected.search-match-dark.ak-editor-selected-node': {
|
|
91
125
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
92
126
|
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
93
127
|
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
128
|
+
},
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
130
|
+
'.loader-wrapper>a, .lozenge-wrapper': {
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
132
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-yellow-bolder, #946F00)", " !important")
|
|
94
133
|
}
|
|
95
134
|
}
|
|
96
135
|
});
|
|
@@ -78,6 +78,17 @@ export var mentionNodeStyles = css({
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
// The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
|
|
82
|
+
// This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
|
|
83
|
+
// So it will need to be considered if the typography gates are still in use when this is cleaned up.
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
85
|
+
export var mentionsStylesMixin_platform_editor_centre_mention_padding = css({
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
87
|
+
'.editor-mention-primitive': {
|
|
88
|
+
padding: '1px 0.3em 1px 0.23em'
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
81
92
|
// This is mentions styles for mentions selection styles based on the vanilla node view
|
|
82
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
83
94
|
export var mentionsSelectionStyles = css(_defineProperty({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "208.
|
|
2
|
+
export var version = "208.4.0";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const mentionsStyles: import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const mentionNodeStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const mentionsStylesMixin_platform_editor_centre_mention_padding: import("@emotion/react").SerializedStyles;
|
|
3
4
|
export declare const mentionsSelectionStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const mentionsStyles: import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const mentionNodeStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const mentionsStylesMixin_platform_editor_centre_mention_padding: import("@emotion/react").SerializedStyles;
|
|
3
4
|
export declare const mentionsSelectionStyles: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "208.
|
|
3
|
+
"version": "208.4.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^2.6.0",
|
|
53
53
|
"@atlaskit/editor-plugin-user-preferences": "^0.2.0",
|
|
54
|
-
"@atlaskit/editor-plugins": "^9.
|
|
54
|
+
"@atlaskit/editor-plugins": "^9.3.0",
|
|
55
55
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
56
56
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
57
57
|
"@atlaskit/emoji": "^69.3.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^3.14.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^8.3.0",
|
|
67
67
|
"@atlaskit/tokens": "^5.4.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.3.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@atlaskit/primitives": "^14.9.0",
|
|
106
106
|
"@atlaskit/renderer": "^119.0.0",
|
|
107
107
|
"@atlaskit/section-message": "^8.2.0",
|
|
108
|
-
"@atlaskit/smart-card": "^38.
|
|
108
|
+
"@atlaskit/smart-card": "^38.16.0",
|
|
109
109
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
110
110
|
"@atlaskit/toggle": "^15.0.0",
|
|
111
111
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
@@ -555,9 +555,6 @@
|
|
|
555
555
|
"confluence_team_presence_scroll_to_pointer": {
|
|
556
556
|
"type": "boolean"
|
|
557
557
|
},
|
|
558
|
-
"platform_editor_fix_table_width_inline_comment": {
|
|
559
|
-
"type": "boolean"
|
|
560
|
-
},
|
|
561
558
|
"dst-a11y__replace-anchor-with-link__editor": {
|
|
562
559
|
"type": "boolean"
|
|
563
560
|
},
|
|
@@ -585,6 +582,9 @@
|
|
|
585
582
|
},
|
|
586
583
|
"cc_editor_focus_before_editor_on_load": {
|
|
587
584
|
"type": "boolean"
|
|
585
|
+
},
|
|
586
|
+
"platform_editor_centre_mention_padding": {
|
|
587
|
+
"type": "boolean"
|
|
588
588
|
}
|
|
589
589
|
},
|
|
590
590
|
"stricter": {
|