@atlaskit/editor-core 208.7.3 → 208.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +5 -5
  3. package/dist/cjs/presets/default.js +1 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  5. package/dist/cjs/ui/ContentStyles/code-bidi-warning.js +75 -0
  6. package/dist/cjs/ui/ContentStyles/index.js +4 -5
  7. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +4 -1
  8. package/dist/cjs/ui/EditorContentContainer/styles/codeBidiWarningStyles.js +75 -0
  9. package/dist/cjs/ui/EditorContentContainer/styles/emoji.js +1 -1
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/create-editor/ReactEditorView.js +5 -5
  12. package/dist/es2019/presets/default.js +1 -1
  13. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  14. package/dist/es2019/ui/ContentStyles/code-bidi-warning.js +68 -0
  15. package/dist/es2019/ui/ContentStyles/index.js +4 -4
  16. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -1
  17. package/dist/es2019/ui/EditorContentContainer/styles/codeBidiWarningStyles.js +68 -0
  18. package/dist/es2019/ui/EditorContentContainer/styles/emoji.js +1 -1
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/create-editor/ReactEditorView.js +5 -5
  21. package/dist/esm/presets/default.js +1 -1
  22. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  23. package/dist/esm/ui/ContentStyles/code-bidi-warning.js +68 -0
  24. package/dist/esm/ui/ContentStyles/index.js +4 -5
  25. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -1
  26. package/dist/esm/ui/EditorContentContainer/styles/codeBidiWarningStyles.js +68 -0
  27. package/dist/esm/ui/EditorContentContainer/styles/emoji.js +1 -1
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/ui/ContentStyles/code-bidi-warning.d.ts +1 -0
  30. package/dist/types/ui/EditorContentContainer/styles/codeBidiWarningStyles.d.ts +1 -0
  31. package/dist/types-ts4.5/ui/ContentStyles/code-bidi-warning.d.ts +1 -0
  32. package/dist/types-ts4.5/ui/EditorContentContainer/styles/codeBidiWarningStyles.d.ts +1 -0
  33. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 208.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#180500](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180500)
8
+ [`411796e8a55c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/411796e8a55c6) -
9
+ [ux] Move code-bidi-warning plugin widget to be a vanilla-DOM implementation, instead of react, to
10
+ fix memory leaks.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 208.7.4
17
+
18
+ ### Patch Changes
19
+
20
+ - [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
21
+ [`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
22
+ ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
23
+ - Updated dependencies
24
+
3
25
  ## 208.7.3
4
26
 
5
27
  ### Patch Changes
@@ -492,7 +492,7 @@ function ReactEditorView(props) {
492
492
  if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
493
493
  if (!mitigateScrollJump) {
494
494
  var liveDocWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(editorView.state.doc);
495
- if (!liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
495
+ if (!liveDocWithContent) {
496
496
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
497
497
  }
498
498
  if ((0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('cc_editor_focus_before_editor_on_load')) {
@@ -503,7 +503,7 @@ function ReactEditorView(props) {
503
503
  }
504
504
  } else {
505
505
  var _liveDocWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(editorView.state.doc);
506
- if (!_liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
506
+ if (!_liveDocWithContent) {
507
507
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
508
508
  }
509
509
  }
@@ -621,7 +621,7 @@ function ReactEditorView(props) {
621
621
  if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
622
622
  if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
623
623
  if (!mitigateScrollJump) {
624
- var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
624
+ var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc);
625
625
  if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
626
626
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(view);
627
627
  }
@@ -632,7 +632,7 @@ function ReactEditorView(props) {
632
632
  }
633
633
  }
634
634
  } else {
635
- var _isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
635
+ var _isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc);
636
636
  if (!_isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
637
637
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(view);
638
638
  }
@@ -708,7 +708,7 @@ function ReactEditorView(props) {
708
708
  return !disabled;
709
709
  }
710
710
  });
711
- var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(viewRef.current.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
711
+ var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(viewRef.current.state.doc);
712
712
  if (!disabled && shouldFocus && !isLivePageWithContent) {
713
713
  focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(viewRef.current);
714
714
  }
@@ -66,7 +66,7 @@ function createDefaultPreset(options) {
66
66
  }
67
67
  }], function () {
68
68
  return (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin');
69
- }).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') : (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
69
+ }).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
70
70
  contextIdentifierProvider: options.contextIdentifierProvider
71
71
  }]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).add([_primaryToolbar.primaryToolbarPlugin, {
72
72
  contextualFormattingEnabled: isFullPage
@@ -419,9 +419,9 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
419
419
  editorContentGutterStyle()]
420
420
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
421
421
  ,
422
- className: (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') ? (0, _classnames.default)('ak-editor-content-area', 'appearance-full-page', {
422
+ className: (0, _classnames.default)('ak-editor-content-area', 'appearance-full-page', {
423
423
  'fabric-editor--full-width-mode': fullWidthMode
424
- }) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
424
+ }),
425
425
  ref: contentAreaRef
426
426
  }, !!props.customContentComponents && 'before' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
427
427
  editorView: props.editorView,
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.codeBidiWarningStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
11
+ var codeBidiWarningStyles = exports.codeBidiWarningStyles = (0, _react.css)({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
13
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
14
+ display: 'inline-block'
15
+ },
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
17
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
18
+ paddingInlineStart: "var(--ds-space-050, 4px)",
19
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
20
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
21
+ fontStyle: 'normal',
22
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
23
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
24
+ paddingTop: '0.05rem',
25
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
26
+ paddingBottom: '0.05rem',
27
+ color: "var(--ds-text-warning, #A54800)",
28
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
29
+ },
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
32
+ color: "var(--ds-text-warning, #A54800)",
33
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
34
+ },
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
36
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
37
+ visibility: 'hidden',
38
+ boxSizing: 'border-box',
39
+ width: '15pc',
40
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
41
+ color: "var(--ds-text-inverse, #FFFFFF)",
42
+ overflowWrap: 'break-word',
43
+ cursor: 'default',
44
+ borderRadius: "var(--ds-border-radius, 4px)",
45
+ margin: "var(--ds-space-0, 0px)",
46
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
47
+ position: 'fixed',
48
+ // The character label will be ~80px and this is positioned from the end of that label
49
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
50
+ // instead of being positioned relative to the viewport.
51
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
52
+ // and is always visible.
53
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
54
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
55
+ opacity: 0,
56
+ whiteSpace: 'normal',
57
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
58
+ zIndex: 9999,
59
+ // Exit animation timings
60
+ // - Mark invisible after 0.475s
61
+ // - After 0.3s, fade out and move up over 0.175s
62
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
63
+ },
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
65
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
66
+ visibility: 'visible',
67
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
68
+ opacity: 1,
69
+ // Enter animation timings
70
+ // - Mark visible after 0.3s of hovering
71
+ // - After 0.3s, fade in over 0.175s
72
+ // - After 0.3s, move down over 0.35s
73
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
74
+ }
75
+ });
@@ -27,6 +27,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
27
27
  var _tokens = require("@atlaskit/tokens");
28
28
  var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
29
29
  var _aiPanels = require("./ai-panels");
30
+ var _codeBidiWarning = require("./code-bidi-warning");
30
31
  var _codeBlock = require("./code-block");
31
32
  var _date = require("./date");
32
33
  var _expand = require("./expand");
@@ -110,7 +111,7 @@ var mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = (0, _reac
110
111
  padding: '1px 0.3em 1px 0.23em'
111
112
  }
112
113
  });
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)");
114
+ var mentionSelectionStyles = (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)");
114
115
  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)");
115
116
  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 : '');
116
117
  var emojiStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tdisplay: inline-block;\n\t}\n\n\t.", ", .", " {\n\t\tbackground: no-repeat transparent;\n\t\tdisplay: inline-block;\n\t\theight: ", "px;\n\t\tmax-height: ", "px;\n\t\tcursor: pointer;\n\t\tvertical-align: middle;\n\t\tuser-select: all;\n\t}\n\n\t.", " {\n\t\t.", ", .", " {\n\t\t\tborder-radius: 2px;\n\t\t\t", "\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _emoji.defaultEmojiHeight, _emoji.defaultEmojiHeight, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
@@ -166,11 +167,9 @@ var akEditorBreakpointForSmallDevice = "1266px";
166
167
  // Under editor experiment platform_editor_core_static_emotion
167
168
  // If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
168
169
  var legacyContentStyles = function legacyContentStyles(props) {
169
- return (0, _react2.css)(_templateObject8 || (_templateObject8 = (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\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\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)(_templateObject8 || (_templateObject8 = (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\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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
171
  theme: props.theme
171
- }), _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)(_templateObject9 || (_templateObject9 = (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)(_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, "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, {
172
- exposure: false
173
- }) && vanillaSelectionStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_magenta_match') ? _styles3.findReplaceStylesNewMagenta : _styles3.findReplaceStylesNewYellow : _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _tasksAndDecisions.taskItemStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithVisualRefresh, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _status.statusNodeStyles)(), (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, _date.dateStyles, _date.dateNodeStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
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)(_templateObject9 || (_templateObject9 = (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)(_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, "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, mentionSelectionStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_magenta_match') ? _styles3.findReplaceStylesNewMagenta : _styles3.findReplaceStylesNewYellow : _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _tasksAndDecisions.taskItemStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithVisualRefresh, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _status.statusNodeStyles)(), (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, _date.dateStyles, _date.dateNodeStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarning.codeBidiWarningStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
174
173
  };
175
174
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
176
175
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
@@ -20,6 +20,7 @@ var _backgroundColorStyles = require("./styles/backgroundColorStyles");
20
20
  var _baseStyles = require("./styles/baseStyles");
21
21
  var _blockMarksStyles = require("./styles/blockMarksStyles");
22
22
  var _blockTypeStyles = require("./styles/blockTypeStyles");
23
+ var _codeBidiWarningStyles = require("./styles/codeBidiWarningStyles");
23
24
  var _codeBlockStyles = require("./styles/codeBlockStyles");
24
25
  var _codeMarkStyles = require("./styles/codeMarkStyles");
25
26
  var _commentEditorStyles = require("./styles/commentEditorStyles");
@@ -327,7 +328,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
327
328
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
328
329
  !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _link.linkLegacyIconStylesFix,
329
330
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
330
- (0, _platformFeatureFlags.fg)('confluence_floating_toolbar_animation') && _selectionToolbarStyles.selectionToolbarAnimationStyles],
331
+ (0, _platformFeatureFlags.fg)('confluence_floating_toolbar_animation') && _selectionToolbarStyles.selectionToolbarAnimationStyles,
332
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
333
+ (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarningStyles.codeBidiWarningStyles],
331
334
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
332
335
  "data-testid": "editor-content-container",
333
336
  style: {
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.codeBidiWarningStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
11
+ var codeBidiWarningStyles = exports.codeBidiWarningStyles = (0, _react.css)({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
13
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
14
+ display: 'inline-block'
15
+ },
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
17
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
18
+ paddingInlineStart: "var(--ds-space-050, 4px)",
19
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
20
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
21
+ fontStyle: 'normal',
22
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
23
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
24
+ paddingTop: '0.05rem',
25
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
26
+ paddingBottom: '0.05rem',
27
+ color: "var(--ds-text-warning, #A54800)",
28
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
29
+ },
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
32
+ color: "var(--ds-text-warning, #A54800)",
33
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
34
+ },
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
36
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
37
+ visibility: 'hidden',
38
+ boxSizing: 'border-box',
39
+ width: '15pc',
40
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
41
+ color: "var(--ds-text-inverse, #FFFFFF)",
42
+ overflowWrap: 'break-word',
43
+ cursor: 'default',
44
+ borderRadius: "var(--ds-border-radius, 4px)",
45
+ margin: "var(--ds-space-0, 0px)",
46
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
47
+ position: 'fixed',
48
+ // The character label will be ~80px and this is positioned from the end of that label
49
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
50
+ // instead of being positioned relative to the viewport.
51
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
52
+ // and is always visible.
53
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
54
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
55
+ opacity: 0,
56
+ whiteSpace: 'normal',
57
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
58
+ zIndex: 9999,
59
+ // Exit animation timings
60
+ // - Mark invisible after 0.475s
61
+ // - After 0.3s, fade out and move up over 0.175s
62
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
63
+ },
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
65
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
66
+ visibility: 'visible',
67
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
68
+ opacity: 1,
69
+ // Enter animation timings
70
+ // - Mark visible after 0.3s of hovering
71
+ // - After 0.3s, fade in over 0.175s
72
+ // - After 0.3s, move down over 0.35s
73
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
74
+ }
75
+ });
@@ -16,7 +16,7 @@ var emojiSelectionStyles = (0, _react.css)({
16
16
  borderRadius: '2px'
17
17
  });
18
18
 
19
- // Emoji styles from Emoji vanilla node view
19
+ // Emoji node view styles
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
21
21
  var emojiStyles = exports.emojiStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_emoji.EmojiSharedCssClassName.EMOJI_CONTAINER), {
22
22
  display: 'inline-block'
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "208.7.2";
8
+ var version = exports.version = "208.7.4";
@@ -459,7 +459,7 @@ export function ReactEditorView(props) {
459
459
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
460
460
  if (!mitigateScrollJump) {
461
461
  const liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
462
- if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
462
+ if (!liveDocWithContent) {
463
463
  focusTimeoutId.current = handleEditorFocus(editorView);
464
464
  }
465
465
  if (expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && fg('cc_editor_focus_before_editor_on_load')) {
@@ -470,7 +470,7 @@ export function ReactEditorView(props) {
470
470
  }
471
471
  } else {
472
472
  const liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
473
- if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
473
+ if (!liveDocWithContent) {
474
474
  focusTimeoutId.current = handleEditorFocus(editorView);
475
475
  }
476
476
  }
@@ -568,7 +568,7 @@ export function ReactEditorView(props) {
568
568
  if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
569
569
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
570
570
  if (!mitigateScrollJump) {
571
- const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
571
+ const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
572
572
  if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
573
573
  focusTimeoutId.current = handleEditorFocus(view);
574
574
  }
@@ -579,7 +579,7 @@ export function ReactEditorView(props) {
579
579
  }
580
580
  }
581
581
  } else {
582
- const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
582
+ const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
583
583
  if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
584
584
  focusTimeoutId.current = handleEditorFocus(view);
585
585
  }
@@ -653,7 +653,7 @@ export function ReactEditorView(props) {
653
653
  viewRef.current.setProps({
654
654
  editable: _state => !disabled
655
655
  });
656
- const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(viewRef.current.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
656
+ const isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(viewRef.current.state.doc);
657
657
  if (!disabled && shouldFocus && !isLivePageWithContent) {
658
658
  focusTimeoutId.current = handleEditorFocus(viewRef.current);
659
659
  }
@@ -57,7 +57,7 @@ export function createDefaultPreset(options) {
57
57
  initialUserPreferences: {
58
58
  toolbarDockingPosition: isFullPage ? 'none' : 'top'
59
59
  }
60
- }], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? fg('platform_editor_no_cursor_on_live_doc_init') : expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
60
+ }], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
61
61
  contextIdentifierProvider: options.contextIdentifierProvider
62
62
  }]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
63
63
  contextualFormattingEnabled: isFullPage
@@ -400,9 +400,9 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
400
400
  editorContentGutterStyle()]
401
401
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
402
402
  ,
403
- className: fg('platform_editor_no_cursor_on_live_doc_init') ? classnames('ak-editor-content-area', 'appearance-full-page', {
403
+ className: classnames('ak-editor-content-area', 'appearance-full-page', {
404
404
  'fabric-editor--full-width-mode': fullWidthMode
405
- }) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
405
+ }),
406
406
  ref: contentAreaRef
407
407
  }, !!props.customContentComponents && 'before' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.before) : contentComponentClickWrapper(props.customContentComponents), jsx(PluginSlot, {
408
408
  editorView: props.editorView,
@@ -0,0 +1,68 @@
1
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
2
+ import { css } from '@emotion/react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
4
+ export const codeBidiWarningStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
6
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
7
+ display: 'inline-block'
8
+ },
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
10
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
11
+ paddingInlineStart: "var(--ds-space-050, 4px)",
12
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
13
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
+ fontStyle: 'normal',
15
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
17
+ paddingTop: '0.05rem',
18
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
19
+ paddingBottom: '0.05rem',
20
+ color: "var(--ds-text-warning, #A54800)",
21
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
22
+ },
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
25
+ color: "var(--ds-text-warning, #A54800)",
26
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
27
+ },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
29
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
30
+ visibility: 'hidden',
31
+ boxSizing: 'border-box',
32
+ width: '15pc',
33
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
34
+ color: "var(--ds-text-inverse, #FFFFFF)",
35
+ overflowWrap: 'break-word',
36
+ cursor: 'default',
37
+ borderRadius: "var(--ds-border-radius, 4px)",
38
+ margin: "var(--ds-space-0, 0px)",
39
+ padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`,
40
+ position: 'fixed',
41
+ // The character label will be ~80px and this is positioned from the end of that label
42
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
43
+ // instead of being positioned relative to the viewport.
44
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
45
+ // and is always visible.
46
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
47
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
48
+ opacity: 0,
49
+ whiteSpace: 'normal',
50
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
51
+ zIndex: 9999,
52
+ // Exit animation timings
53
+ // - Mark invisible after 0.475s
54
+ // - After 0.3s, fade out and move up over 0.175s
55
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
56
+ },
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
58
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
59
+ visibility: 'visible',
60
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
61
+ opacity: 1,
62
+ // Enter animation timings
63
+ // - Mark visible after 0.3s of hovering
64
+ // - After 0.3s, fade in over 0.175s
65
+ // - After 0.3s, move down over 0.35s
66
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
67
+ }
68
+ });
@@ -29,6 +29,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
29
29
  import { useThemeObserver } from '@atlaskit/tokens';
30
30
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
31
31
  import { aiPanelStyles } from './ai-panels';
32
+ import { codeBidiWarningStyles } from './code-bidi-warning';
32
33
  import { codeBlockStyles } from './code-block';
33
34
  import { dateStyles, dateNodeStyles } from './date';
34
35
  import { expandStyles } from './expand';
@@ -120,7 +121,7 @@ const mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = css({
120
121
  padding: '1px 0.3em 1px 0.23em'
121
122
  }
122
123
  });
123
- const vanillaSelectionStyles = css`
124
+ const mentionSelectionStyles = css`
124
125
  .danger {
125
126
  .editor-mention-primitive {
126
127
  box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
@@ -402,9 +403,7 @@ const legacyContentStyles = props => css`
402
403
  ${mentionsStyles}
403
404
  ${mentionNodeStyles}
404
405
  ${fg('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding}
405
- ${editorExperiment('platform_editor_vanilla_dom', true, {
406
- exposure: false
407
- }) && vanillaSelectionStyles}
406
+ ${mentionSelectionStyles}
408
407
  ${emojiStyles}
409
408
  ${tasksAndDecisionsStyles}
410
409
  ${gridStyles}
@@ -435,6 +434,7 @@ const legacyContentStyles = props => css`
435
434
  ${pragmaticResizerStylesForTooltip()}
436
435
  ${aiPanelStyles(props.colorMode)}
437
436
  ${firstBlockNodeStylesNew}
437
+ ${fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles}
438
438
 
439
439
  .panelView-content-wrap {
440
440
  box-sizing: border-box;
@@ -21,6 +21,7 @@ import { backgroundColorStyles } from './styles/backgroundColorStyles';
21
21
  import { baseStyles } from './styles/baseStyles';
22
22
  import { blockMarksStyles } from './styles/blockMarksStyles';
23
23
  import { blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
24
+ import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
24
25
  import { codeBlockStyles, codeBgColorStyles, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
25
26
  import { codeMarkStyles } from './styles/codeMarkStyles';
26
27
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -322,7 +323,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
322
323
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
323
324
  !fg('platform-visual-refresh-icons') && linkLegacyIconStylesFix,
324
325
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
325
- fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles],
326
+ fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles,
327
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
328
+ fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles],
326
329
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
327
330
  "data-testid": "editor-content-container",
328
331
  style: {
@@ -0,0 +1,68 @@
1
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
2
+ import { css } from '@emotion/react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
4
+ export const codeBidiWarningStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
6
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
7
+ display: 'inline-block'
8
+ },
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
10
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
11
+ paddingInlineStart: "var(--ds-space-050, 4px)",
12
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
13
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
+ fontStyle: 'normal',
15
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
17
+ paddingTop: '0.05rem',
18
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
19
+ paddingBottom: '0.05rem',
20
+ color: "var(--ds-text-warning, #A54800)",
21
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
22
+ },
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
25
+ color: "var(--ds-text-warning, #A54800)",
26
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
27
+ },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
29
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
30
+ visibility: 'hidden',
31
+ boxSizing: 'border-box',
32
+ width: '15pc',
33
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
34
+ color: "var(--ds-text-inverse, #FFFFFF)",
35
+ overflowWrap: 'break-word',
36
+ cursor: 'default',
37
+ borderRadius: "var(--ds-border-radius, 4px)",
38
+ margin: "var(--ds-space-0, 0px)",
39
+ padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`,
40
+ position: 'fixed',
41
+ // The character label will be ~80px and this is positioned from the end of that label
42
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
43
+ // instead of being positioned relative to the viewport.
44
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
45
+ // and is always visible.
46
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
47
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
48
+ opacity: 0,
49
+ whiteSpace: 'normal',
50
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
51
+ zIndex: 9999,
52
+ // Exit animation timings
53
+ // - Mark invisible after 0.475s
54
+ // - After 0.3s, fade out and move up over 0.175s
55
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
56
+ },
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
58
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
59
+ visibility: 'visible',
60
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
61
+ opacity: 1,
62
+ // Enter animation timings
63
+ // - Mark visible after 0.3s of hovering
64
+ // - After 0.3s, fade in over 0.175s
65
+ // - After 0.3s, move down over 0.35s
66
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
67
+ }
68
+ });
@@ -7,7 +7,7 @@ const emojiSelectionStyles = css({
7
7
  borderRadius: '2px'
8
8
  });
9
9
 
10
- // Emoji styles from Emoji vanilla node view
10
+ // Emoji node view styles
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
12
12
  export const emojiStyles = css({
13
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "208.7.2";
2
+ export const version = "208.7.4";
@@ -482,7 +482,7 @@ export function ReactEditorView(props) {
482
482
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
483
483
  if (!mitigateScrollJump) {
484
484
  var liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
485
- if (!liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
485
+ if (!liveDocWithContent) {
486
486
  focusTimeoutId.current = handleEditorFocus(editorView);
487
487
  }
488
488
  if (expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true) && fg('cc_editor_focus_before_editor_on_load')) {
@@ -493,7 +493,7 @@ export function ReactEditorView(props) {
493
493
  }
494
494
  } else {
495
495
  var _liveDocWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(editorView.state.doc);
496
- if (!_liveDocWithContent || !fg('platform_editor_no_cursor_on_live_doc_init')) {
496
+ if (!_liveDocWithContent) {
497
497
  focusTimeoutId.current = handleEditorFocus(editorView);
498
498
  }
499
499
  }
@@ -611,7 +611,7 @@ export function ReactEditorView(props) {
611
611
  if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
612
612
  if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
613
613
  if (!mitigateScrollJump) {
614
- var isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
614
+ var isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
615
615
  if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
616
616
  focusTimeoutId.current = handleEditorFocus(view);
617
617
  }
@@ -622,7 +622,7 @@ export function ReactEditorView(props) {
622
622
  }
623
623
  }
624
624
  } else {
625
- var _isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
625
+ var _isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(view.state.doc);
626
626
  if (!_isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
627
627
  focusTimeoutId.current = handleEditorFocus(view);
628
628
  }
@@ -698,7 +698,7 @@ export function ReactEditorView(props) {
698
698
  return !disabled;
699
699
  }
700
700
  });
701
- var isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(viewRef.current.state.doc) && fg('platform_editor_no_cursor_on_live_doc_init');
701
+ var isLivePageWithContent = (__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !isEmptyDocument(viewRef.current.state.doc);
702
702
  if (!disabled && shouldFocus && !isLivePageWithContent) {
703
703
  focusTimeoutId.current = handleEditorFocus(viewRef.current);
704
704
  }
@@ -61,7 +61,7 @@ export function createDefaultPreset(options) {
61
61
  }
62
62
  }], function () {
63
63
  return fg('platform_editor_use_preferences_plugin');
64
- }).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? fg('platform_editor_no_cursor_on_live_doc_init') : expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
64
+ }).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
65
65
  contextIdentifierProvider: options.contextIdentifierProvider
66
66
  }]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add([primaryToolbarPlugin, {
67
67
  contextualFormattingEnabled: isFullPage
@@ -409,9 +409,9 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
409
409
  editorContentGutterStyle()]
410
410
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
411
411
  ,
412
- className: fg('platform_editor_no_cursor_on_live_doc_init') ? classnames('ak-editor-content-area', 'appearance-full-page', {
412
+ className: classnames('ak-editor-content-area', 'appearance-full-page', {
413
413
  'fabric-editor--full-width-mode': fullWidthMode
414
- }) : ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
414
+ }),
415
415
  ref: contentAreaRef
416
416
  }, !!props.customContentComponents && 'before' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.before) : contentComponentClickWrapper(props.customContentComponents), jsx(PluginSlot, {
417
417
  editorView: props.editorView,
@@ -0,0 +1,68 @@
1
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
2
+ import { css } from '@emotion/react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
4
+ export var codeBidiWarningStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
6
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
7
+ display: 'inline-block'
8
+ },
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
10
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
11
+ paddingInlineStart: "var(--ds-space-050, 4px)",
12
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
13
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
+ fontStyle: 'normal',
15
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
17
+ paddingTop: '0.05rem',
18
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
19
+ paddingBottom: '0.05rem',
20
+ color: "var(--ds-text-warning, #A54800)",
21
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
22
+ },
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
25
+ color: "var(--ds-text-warning, #A54800)",
26
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
27
+ },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
29
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
30
+ visibility: 'hidden',
31
+ boxSizing: 'border-box',
32
+ width: '15pc',
33
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
34
+ color: "var(--ds-text-inverse, #FFFFFF)",
35
+ overflowWrap: 'break-word',
36
+ cursor: 'default',
37
+ borderRadius: "var(--ds-border-radius, 4px)",
38
+ margin: "var(--ds-space-0, 0px)",
39
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
40
+ position: 'fixed',
41
+ // The character label will be ~80px and this is positioned from the end of that label
42
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
43
+ // instead of being positioned relative to the viewport.
44
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
45
+ // and is always visible.
46
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
47
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
48
+ opacity: 0,
49
+ whiteSpace: 'normal',
50
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
51
+ zIndex: 9999,
52
+ // Exit animation timings
53
+ // - Mark invisible after 0.475s
54
+ // - After 0.3s, fade out and move up over 0.175s
55
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
56
+ },
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
58
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
59
+ visibility: 'visible',
60
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
61
+ opacity: 1,
62
+ // Enter animation timings
63
+ // - Mark visible after 0.3s of hovering
64
+ // - After 0.3s, fade in over 0.175s
65
+ // - After 0.3s, move down over 0.35s
66
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
67
+ }
68
+ });
@@ -31,6 +31,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
31
31
  import { useThemeObserver } from '@atlaskit/tokens';
32
32
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
33
33
  import { aiPanelStyles } from './ai-panels';
34
+ import { codeBidiWarningStyles } from './code-bidi-warning';
34
35
  import { codeBlockStyles } from './code-block';
35
36
  import { dateStyles, dateNodeStyles } from './date';
36
37
  import { expandStyles } from './expand';
@@ -104,7 +105,7 @@ var mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = css({
104
105
  padding: '1px 0.3em 1px 0.23em'
105
106
  }
106
107
  });
107
- 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)");
108
+ var mentionSelectionStyles = 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)");
108
109
  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)");
109
110
  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 : '');
110
111
  var emojiStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t.", " {\n\t\tdisplay: inline-block;\n\t}\n\n\t.", ", .", " {\n\t\tbackground: no-repeat transparent;\n\t\tdisplay: inline-block;\n\t\theight: ", "px;\n\t\tmax-height: ", "px;\n\t\tcursor: pointer;\n\t\tvertical-align: middle;\n\t\tuser-select: all;\n\t}\n\n\t.", " {\n\t\t.", ", .", " {\n\t\t\tborder-radius: 2px;\n\t\t\t", "\n\t\t}\n\t}\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, defaultEmojiHeight, defaultEmojiHeight, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
@@ -160,11 +161,9 @@ var akEditorBreakpointForSmallDevice = "1266px";
160
161
  // Under editor experiment platform_editor_core_static_emotion
161
162
  // If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
162
163
  var legacyContentStyles = function legacyContentStyles(props) {
163
- return css(_templateObject8 || (_templateObject8 = _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\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\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({
164
+ return css(_templateObject8 || (_templateObject8 = _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\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\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({
164
165
  theme: props.theme
165
- }), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject9 || (_templateObject9 = _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(_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, "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, {
166
- exposure: false
167
- }) && vanillaSelectionStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_magenta_match') ? findReplaceStylesNewMagenta : findReplaceStylesNewYellow : findReplaceStyles, textHighlightStyle, taskDecisionStyles, taskItemStyles, fg('platform-visual-refresh-icons') && decisionIconWithVisualRefresh, !fg('platform-visual-refresh-icons') && decisionIconWithoutVisualRefresh, statusStyles, statusNodeStyles(), annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, dateStyles, dateNodeStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticStylesLayoutFirstNodeResizeHandleFix(), pragmaticResizerStylesForTooltip(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
166
+ }), whitespaceSharedStyles, paragraphSharedStyles(props.typographyTheme), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject9 || (_templateObject9 = _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(_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, "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, mentionSelectionStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_magenta_match') ? findReplaceStylesNewMagenta : findReplaceStylesNewYellow : findReplaceStyles, textHighlightStyle, taskDecisionStyles, taskItemStyles, fg('platform-visual-refresh-icons') && decisionIconWithVisualRefresh, !fg('platform-visual-refresh-icons') && decisionIconWithoutVisualRefresh, statusStyles, statusNodeStyles(), annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, dateStyles, dateNodeStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), pragmaticStylesLayoutFirstNodeResizeHandleFix(), pragmaticResizerStylesForTooltip(), aiPanelStyles(props.colorMode), firstBlockNodeStylesNew, fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
168
167
  };
169
168
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
170
169
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -21,6 +21,7 @@ import { backgroundColorStyles } from './styles/backgroundColorStyles';
21
21
  import { baseStyles } from './styles/baseStyles';
22
22
  import { blockMarksStyles } from './styles/blockMarksStyles';
23
23
  import { blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
24
+ import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
24
25
  import { codeBlockStyles, codeBgColorStyles, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
25
26
  import { codeMarkStyles } from './styles/codeMarkStyles';
26
27
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -319,7 +320,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
319
320
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
320
321
  !fg('platform-visual-refresh-icons') && linkLegacyIconStylesFix,
321
322
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
322
- fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles],
323
+ fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles,
324
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
325
+ fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles],
323
326
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
324
327
  "data-testid": "editor-content-container",
325
328
  style: {
@@ -0,0 +1,68 @@
1
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
2
+ import { css } from '@emotion/react';
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
4
+ export var codeBidiWarningStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
6
+ '[data-prosemirror-node-name="code-bidi-warning"]': {
7
+ display: 'inline-block'
8
+ },
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
10
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]': {
11
+ paddingInlineStart: "var(--ds-space-050, 4px)",
12
+ paddingInlineEnd: "var(--ds-space-050, 4px)",
13
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
+ fontStyle: 'normal',
15
+ fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
17
+ paddingTop: '0.05rem',
18
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
19
+ paddingBottom: '0.05rem',
20
+ color: "var(--ds-text-warning, #A54800)",
21
+ backgroundColor: "var(--ds-background-warning, #FFF7D6)"
22
+ },
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-decorator"]:hover': {
25
+ color: "var(--ds-text-warning, #A54800)",
26
+ backgroundColor: "var(--ds-background-warning-hovered, #F8E6A0)"
27
+ },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
29
+ '[data-prosemirror-node-name="code-bidi-warning"] [data-bidi-component="code-bidi-warning-tooltip"]': {
30
+ visibility: 'hidden',
31
+ boxSizing: 'border-box',
32
+ width: '15pc',
33
+ backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
34
+ color: "var(--ds-text-inverse, #FFFFFF)",
35
+ overflowWrap: 'break-word',
36
+ cursor: 'default',
37
+ borderRadius: "var(--ds-border-radius, 4px)",
38
+ margin: "var(--ds-space-0, 0px)",
39
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
40
+ position: 'fixed',
41
+ // The character label will be ~80px and this is positioned from the end of that label
42
+ // We also use this instead of top: 24px to make sure the tooltip maintains its initial position
43
+ // instead of being positioned relative to the viewport.
44
+ // We need to use position: fixed so that the tooltip bypasses the overflow settings of the code block
45
+ // and is always visible.
46
+ // We also offset a little extra here to account for the transition behavior (to replicate ADS fade-in-from-top)
47
+ transform: 'translate(calc(-50% - 40px), calc(24px - 4px))',
48
+ opacity: 0,
49
+ whiteSpace: 'normal',
50
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
51
+ zIndex: 9999,
52
+ // Exit animation timings
53
+ // - Mark invisible after 0.475s
54
+ // - After 0.3s, fade out and move up over 0.175s
55
+ transition: 'visibility 0s linear 0.475s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s'
56
+ },
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
58
+ '[data-prosemirror-node-name="code-bidi-warning"]:hover [data-bidi-component="code-bidi-warning-tooltip"]': {
59
+ visibility: 'visible',
60
+ transform: 'translate(calc(-50% - 40px), calc(24px))',
61
+ opacity: 1,
62
+ // Enter animation timings
63
+ // - Mark visible after 0.3s of hovering
64
+ // - After 0.3s, fade in over 0.175s
65
+ // - After 0.3s, move down over 0.35s
66
+ transition: 'visibility 0s linear 0.3s, opacity 0.175s cubic-bezier(0.15,1,0.3,1) 0.3s, transform 0.35s cubic-bezier(0.15,1,0.3,1) 0.3s'
67
+ }
68
+ });
@@ -8,7 +8,7 @@ var emojiSelectionStyles = css({
8
8
  borderRadius: '2px'
9
9
  });
10
10
 
11
- // Emoji styles from Emoji vanilla node view
11
+ // Emoji node view styles
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
13
13
  export var emojiStyles = css(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(EmojiSharedCssClassName.EMOJI_CONTAINER), {
14
14
  display: 'inline-block'
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "208.7.2";
2
+ export var version = "208.7.4";
@@ -0,0 +1 @@
1
+ export declare const codeBidiWarningStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const codeBidiWarningStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const codeBidiWarningStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const codeBidiWarningStyles: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "208.7.3",
3
+ "version": "208.8.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
46
46
  "@atlaskit/button": "^23.2.0",
47
47
  "@atlaskit/css": "^0.12.0",
48
- "@atlaskit/editor-common": "^107.4.0",
48
+ "@atlaskit/editor-common": "^107.5.0",
49
49
  "@atlaskit/editor-json-transformer": "^8.24.0",
50
50
  "@atlaskit/editor-performance-metrics": "^2.1.0",
51
51
  "@atlaskit/editor-plugin-quick-insert": "^2.6.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
63
63
  "@atlaskit/react-ufo": "^3.14.0",
64
64
  "@atlaskit/task-decision": "^19.2.0",
65
- "@atlaskit/tmp-editor-statsig": "^8.6.0",
65
+ "@atlaskit/tmp-editor-statsig": "^8.7.0",
66
66
  "@atlaskit/tokens": "^5.4.0",
67
67
  "@atlaskit/tooltip": "^20.3.0",
68
68
  "@atlaskit/width-detector": "^5.0.0",
@@ -92,7 +92,7 @@
92
92
  "@atlaskit/analytics-listeners": "^9.0.0",
93
93
  "@atlaskit/collab-provider": "^10.21.0",
94
94
  "@atlaskit/editor-plugin-annotation": "^2.9.0",
95
- "@atlaskit/editor-plugin-card": "^6.7.0",
95
+ "@atlaskit/editor-plugin-card": "^6.8.0",
96
96
  "@atlaskit/editor-plugin-list": "^4.2.0",
97
97
  "@atlaskit/editor-plugin-paste": "^3.3.0",
98
98
  "@atlaskit/link-provider": "^3.4.0",
@@ -438,9 +438,6 @@
438
438
  "type": "boolean",
439
439
  "referenceOnly": true
440
440
  },
441
- "platform_editor_no_cursor_on_live_doc_init": {
442
- "type": "boolean"
443
- },
444
441
  "platform_editor_controls_no_toolbar_space": {
445
442
  "type": "boolean",
446
443
  "referenceOnly": true
@@ -577,6 +574,9 @@
577
574
  },
578
575
  "platform_editor_find_and_replace_magenta_match": {
579
576
  "type": "boolean"
577
+ },
578
+ "platform_editor_vanilla_codebidi_warning": {
579
+ "type": "boolean"
580
580
  }
581
581
  },
582
582
  "stricter": {