@atlaskit/editor-core 216.7.16 → 216.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 216.7.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d5b15f4306afb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5b15f4306afb) -
8
+ Remove redundant vanilla codebidi warning experiment
9
+ - Updated dependencies
10
+
11
+ ## 216.7.17
12
+
13
+ ### Patch Changes
14
+
15
+ - [`e98a16b48e245`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e98a16b48e245) -
16
+ Fix a suspected bug where cross-origin selections would throw a dom security error when testing
17
+ whether to set focus
18
+ - Updated dependencies
19
+
3
20
  ## 216.7.16
4
21
 
5
22
  ### Patch Changes
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.handleEditorFocus = handleEditorFocus;
7
7
  var _state = require("@atlaskit/editor-prosemirror/state");
8
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
8
9
  function handleEditorFocus(view) {
9
10
  var _domSelection$getRang;
10
11
  if (view !== null && view !== void 0 && view.hasFocus()) {
@@ -34,9 +35,24 @@ function handleEditorFocus(view) {
34
35
  }
35
36
 
36
37
  // if selection is outside editor focus and exit
37
- if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
38
- view.focus();
39
- return;
38
+ try {
39
+ if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
40
+ view.focus();
41
+ return;
42
+ }
43
+ } catch (error) {
44
+ // If we get a SecurityError-type DOMException here, then we probably just tried to
45
+ // access a cross-origin iframe's contents. In that case, we can ignore the error and
46
+ // just reasonably assume the selection is outside the editor, since we can't access it.
47
+ if (error instanceof DOMException && error.name === 'SecurityError' && (0, _expValEquals.expValEquals)('platform_editor_fix_cross_origin_editor_focus', 'isEnabled', true)) {
48
+ if (view) {
49
+ view.focus();
50
+ return;
51
+ }
52
+ } else {
53
+ // re-throw other unexpected errors
54
+ throw error;
55
+ }
40
56
  }
41
57
 
42
58
  // set cursor/selection and focus
@@ -24,7 +24,6 @@ var _backgroundColorStyles = require("./styles/backgroundColorStyles");
24
24
  var _baseStyles = require("./styles/baseStyles");
25
25
  var _blockMarksStyles = require("./styles/blockMarksStyles");
26
26
  var _blockTypeStyles = require("./styles/blockTypeStyles");
27
- var _codeBidiWarningStyles = require("./styles/codeBidiWarningStyles");
28
27
  var _codeBlockStyles = require("./styles/codeBlockStyles");
29
28
  var _codeMarkStyles = require("./styles/codeMarkStyles");
30
29
  var _commentEditorStyles = require("./styles/commentEditorStyles");
@@ -497,8 +496,6 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
497
496
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
498
497
  _selectionToolbarStyles.selectionToolbarAnimationStyles,
499
498
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
500
- (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarningStyles.codeBidiWarningStyles,
501
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
502
499
  (0, _expVal.expValNoExposure)('platform_editor_block_menu', 'isEnabled', false) && [
503
500
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
504
501
  _blockTypeStyles.blockquoteDangerStyles,
@@ -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 = "0.0.0-development";
8
+ var version = exports.version = "216.7.17";
@@ -1,4 +1,5 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
3
  export function handleEditorFocus(view) {
3
4
  var _domSelection$getRang;
4
5
  if (view !== null && view !== void 0 && view.hasFocus()) {
@@ -28,9 +29,24 @@ export function handleEditorFocus(view) {
28
29
  }
29
30
 
30
31
  // if selection is outside editor focus and exit
31
- if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
32
- view.focus();
33
- return;
32
+ try {
33
+ if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
34
+ view.focus();
35
+ return;
36
+ }
37
+ } catch (error) {
38
+ // If we get a SecurityError-type DOMException here, then we probably just tried to
39
+ // access a cross-origin iframe's contents. In that case, we can ignore the error and
40
+ // just reasonably assume the selection is outside the editor, since we can't access it.
41
+ if (error instanceof DOMException && error.name === 'SecurityError' && expValEquals('platform_editor_fix_cross_origin_editor_focus', 'isEnabled', true)) {
42
+ if (view) {
43
+ view.focus();
44
+ return;
45
+ }
46
+ } else {
47
+ // re-throw other unexpected errors
48
+ throw error;
49
+ }
34
50
  }
35
51
 
36
52
  // set cursor/selection and focus
@@ -23,7 +23,6 @@ import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/back
23
23
  import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles } from './styles/baseStyles';
24
24
  import { blockMarksStyles } from './styles/blockMarksStyles';
25
25
  import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blockquoteZeroPadding, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
26
- import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
27
26
  import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
28
27
  import { codeMarkStyles } from './styles/codeMarkStyles';
29
28
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -493,8 +492,6 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
493
492
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
494
493
  selectionToolbarAnimationStyles,
495
494
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
496
- fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles,
497
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
498
495
  expValNoExposure('platform_editor_block_menu', 'isEnabled', false) && [
499
496
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
500
497
  blockquoteDangerStyles,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "0.0.0-development";
2
+ export const version = "216.7.17";
@@ -1,4 +1,5 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
3
  export function handleEditorFocus(view) {
3
4
  var _domSelection$getRang;
4
5
  if (view !== null && view !== void 0 && view.hasFocus()) {
@@ -28,9 +29,24 @@ export function handleEditorFocus(view) {
28
29
  }
29
30
 
30
31
  // if selection is outside editor focus and exit
31
- if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
32
- view.focus();
33
- return;
32
+ try {
33
+ if (view && range !== null && range !== void 0 && range.startContainer.contains(view.dom)) {
34
+ view.focus();
35
+ return;
36
+ }
37
+ } catch (error) {
38
+ // If we get a SecurityError-type DOMException here, then we probably just tried to
39
+ // access a cross-origin iframe's contents. In that case, we can ignore the error and
40
+ // just reasonably assume the selection is outside the editor, since we can't access it.
41
+ if (error instanceof DOMException && error.name === 'SecurityError' && expValEquals('platform_editor_fix_cross_origin_editor_focus', 'isEnabled', true)) {
42
+ if (view) {
43
+ view.focus();
44
+ return;
45
+ }
46
+ } else {
47
+ // re-throw other unexpected errors
48
+ throw error;
49
+ }
34
50
  }
35
51
 
36
52
  // set cursor/selection and focus
@@ -24,7 +24,6 @@ import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/back
24
24
  import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles } from './styles/baseStyles';
25
25
  import { blockMarksStyles } from './styles/blockMarksStyles';
26
26
  import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blockquoteZeroPadding, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
27
- import { codeBidiWarningStyles } from './styles/codeBidiWarningStyles';
28
27
  import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
29
28
  import { codeMarkStyles } from './styles/codeMarkStyles';
30
29
  import { commentEditorStyles } from './styles/commentEditorStyles';
@@ -489,8 +488,6 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
489
488
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
490
489
  selectionToolbarAnimationStyles,
491
490
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
492
- fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles,
493
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
494
491
  expValNoExposure('platform_editor_block_menu', 'isEnabled', false) && [
495
492
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
496
493
  blockquoteDangerStyles,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "0.0.0-development";
2
+ export var version = "216.7.17";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "216.7.16",
3
+ "version": "216.7.18",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
67
67
  "@atlaskit/react-ufo": "^5.0.0",
68
68
  "@atlaskit/task-decision": "^19.2.0",
69
- "@atlaskit/tmp-editor-statsig": "^17.7.0",
69
+ "@atlaskit/tmp-editor-statsig": "^17.9.0",
70
70
  "@atlaskit/tokens": "^10.1.0",
71
71
  "@atlaskit/tooltip": "^20.14.0",
72
72
  "@atlaskit/width-detector": "^5.0.0",
@@ -96,7 +96,7 @@
96
96
  "@af/visual-regression": "workspace:^",
97
97
  "@atlaskit/adf-utils": "^19.27.0",
98
98
  "@atlaskit/analytics-listeners": "^9.3.0",
99
- "@atlaskit/collab-provider": "^15.2.0",
99
+ "@atlaskit/collab-provider": "^15.3.0",
100
100
  "@atlaskit/editor-plugin-annotation": "^7.1.0",
101
101
  "@atlaskit/editor-plugin-card": "^12.2.0",
102
102
  "@atlaskit/editor-plugin-list": "^9.0.0",
@@ -107,7 +107,7 @@
107
107
  "@atlaskit/media-integration-test-helpers": "workspace:^",
108
108
  "@atlaskit/media-test-helpers": "^39.0.0",
109
109
  "@atlaskit/modal-dialog": "^14.10.0",
110
- "@atlaskit/renderer": "^126.4.0",
110
+ "@atlaskit/renderer": "^126.5.0",
111
111
  "@atlaskit/section-message": "^8.12.0",
112
112
  "@atlaskit/synchrony-test-helpers": "workspace:^",
113
113
  "@atlaskit/toggle": "^15.2.0",
@@ -292,9 +292,6 @@
292
292
  "cc_editor_focus_before_editor_on_load": {
293
293
  "type": "boolean"
294
294
  },
295
- "platform_editor_vanilla_codebidi_warning": {
296
- "type": "boolean"
297
- },
298
295
  "platform_editor_adf_with_localid": {
299
296
  "type": "boolean",
300
297
  "referenceOnly": true
@@ -1,75 +0,0 @@
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 \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
21
- fontStyle: 'normal',
22
- fontFamily: "var(--ds-font-family-code, \"Atlassian Mono\", 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, #9E4C00)",
28
- backgroundColor: "var(--ds-background-warning, #FFF5DB)"
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, #9E4C00)",
33
- backgroundColor: "var(--ds-background-warning-hovered, #FCE4A6)"
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, #292A2E)",
41
- color: "var(--ds-text-inverse, #FFFFFF)",
42
- overflowWrap: 'break-word',
43
- cursor: 'default',
44
- borderRadius: "var(--ds-radius-small, 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 12px/16px \"Atlassian Sans\", 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
- });
@@ -1,68 +0,0 @@
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 \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
- fontStyle: 'normal',
15
- fontFamily: "var(--ds-font-family-code, \"Atlassian Mono\", 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, #9E4C00)",
21
- backgroundColor: "var(--ds-background-warning, #FFF5DB)"
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, #9E4C00)",
26
- backgroundColor: "var(--ds-background-warning-hovered, #FCE4A6)"
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, #292A2E)",
34
- color: "var(--ds-text-inverse, #FFFFFF)",
35
- overflowWrap: 'break-word',
36
- cursor: 'default',
37
- borderRadius: "var(--ds-radius-small, 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 12px/16px \"Atlassian Sans\", 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
- });
@@ -1,68 +0,0 @@
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 \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
14
- fontStyle: 'normal',
15
- fontFamily: "var(--ds-font-family-code, \"Atlassian Mono\", 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, #9E4C00)",
21
- backgroundColor: "var(--ds-background-warning, #FFF5DB)"
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, #9E4C00)",
26
- backgroundColor: "var(--ds-background-warning-hovered, #FCE4A6)"
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, #292A2E)",
34
- color: "var(--ds-text-inverse, #FFFFFF)",
35
- overflowWrap: 'break-word',
36
- cursor: 'default',
37
- borderRadius: "var(--ds-radius-small, 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 12px/16px \"Atlassian Sans\", 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
- });
@@ -1,2 +0,0 @@
1
- import { type SerializedStyles } from '@emotion/react';
2
- export declare const codeBidiWarningStyles: SerializedStyles;
@@ -1,2 +0,0 @@
1
- import { type SerializedStyles } from '@emotion/react';
2
- export declare const codeBidiWarningStyles: SerializedStyles;