@atlaskit/editor-core 207.9.0 → 207.11.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 (65) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/cjs/composable-editor/core-editor.js +1 -2
  3. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +14 -2
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +32 -12
  5. package/dist/cjs/ui/EditorContentContainer/styles/aiPanel.js +203 -0
  6. package/dist/cjs/ui/EditorContentContainer/styles/dateStyles.js +51 -0
  7. package/dist/cjs/ui/EditorContentContainer/styles/list.js +49 -0
  8. package/dist/cjs/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
  9. package/dist/cjs/ui/EditorContentContainer/styles/shadowStyles.js +52 -0
  10. package/dist/cjs/ui/EditorContentContainer/styles/smartCardStyles.js +155 -0
  11. package/dist/cjs/ui/EditorContentContainer/styles/textColorStyles.js +20 -0
  12. package/dist/cjs/ui/EditorContentContainer/styles/unsupportedStyles.js +35 -0
  13. package/dist/cjs/version-wrapper.js +1 -1
  14. package/dist/es2019/composable-editor/core-editor.js +1 -2
  15. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -3
  16. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +30 -33
  17. package/dist/es2019/ui/EditorContentContainer/styles/aiPanel.js +199 -0
  18. package/dist/es2019/ui/EditorContentContainer/styles/dateStyles.js +69 -0
  19. package/dist/es2019/ui/EditorContentContainer/styles/list.js +45 -0
  20. package/dist/es2019/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
  21. package/dist/es2019/ui/EditorContentContainer/styles/shadowStyles.js +56 -0
  22. package/dist/es2019/ui/EditorContentContainer/styles/smartCardStyles.js +219 -0
  23. package/dist/es2019/ui/EditorContentContainer/styles/textColorStyles.js +13 -0
  24. package/dist/es2019/ui/EditorContentContainer/styles/unsupportedStyles.js +39 -0
  25. package/dist/es2019/version-wrapper.js +1 -1
  26. package/dist/esm/composable-editor/core-editor.js +1 -2
  27. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -3
  28. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +33 -13
  29. package/dist/esm/ui/EditorContentContainer/styles/aiPanel.js +195 -0
  30. package/dist/esm/ui/EditorContentContainer/styles/dateStyles.js +43 -0
  31. package/dist/esm/ui/EditorContentContainer/styles/list.js +41 -0
  32. package/dist/esm/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
  33. package/dist/esm/ui/EditorContentContainer/styles/shadowStyles.js +44 -0
  34. package/dist/esm/ui/EditorContentContainer/styles/smartCardStyles.js +147 -0
  35. package/dist/esm/ui/EditorContentContainer/styles/textColorStyles.js +13 -0
  36. package/dist/esm/ui/EditorContentContainer/styles/unsupportedStyles.js +27 -0
  37. package/dist/esm/version-wrapper.js +1 -1
  38. package/dist/types/create-editor/create-universal-preset.d.ts +2 -2
  39. package/dist/types/presets/universal.d.ts +2 -2
  40. package/dist/types/presets/useUniversalPreset.d.ts +2 -2
  41. package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +1 -0
  42. package/dist/types/ui/EditorContentContainer/styles/aiPanel.d.ts +4 -0
  43. package/dist/types/ui/EditorContentContainer/styles/dateStyles.d.ts +6 -0
  44. package/dist/types/ui/EditorContentContainer/styles/list.d.ts +2 -0
  45. package/dist/types/ui/EditorContentContainer/styles/shadowStyles.d.ts +10 -0
  46. package/dist/types/ui/EditorContentContainer/styles/smartCardStyles.d.ts +13 -0
  47. package/dist/types/ui/EditorContentContainer/styles/textColorStyles.d.ts +1 -0
  48. package/dist/types/ui/EditorContentContainer/styles/unsupportedStyles.d.ts +5 -0
  49. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +2 -2
  50. package/dist/types-ts4.5/presets/universal.d.ts +2 -2
  51. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2 -2
  52. package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +1 -0
  53. package/dist/types-ts4.5/ui/EditorContentContainer/styles/aiPanel.d.ts +4 -0
  54. package/dist/types-ts4.5/ui/EditorContentContainer/styles/dateStyles.d.ts +6 -0
  55. package/dist/types-ts4.5/ui/EditorContentContainer/styles/list.d.ts +2 -0
  56. package/dist/types-ts4.5/ui/EditorContentContainer/styles/shadowStyles.d.ts +10 -0
  57. package/dist/types-ts4.5/ui/EditorContentContainer/styles/smartCardStyles.d.ts +13 -0
  58. package/dist/types-ts4.5/ui/EditorContentContainer/styles/textColorStyles.d.ts +1 -0
  59. package/dist/types-ts4.5/ui/EditorContentContainer/styles/unsupportedStyles.d.ts +5 -0
  60. package/package.json +11 -11
  61. package/dist/cjs/ui/EditorContentContainer/styles/ai-panel.js +0 -97
  62. package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +0 -213
  63. package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +0 -91
  64. package/dist/types/ui/EditorContentContainer/styles/ai-panel.d.ts +0 -2
  65. package/dist/types-ts4.5/ui/EditorContentContainer/styles/ai-panel.d.ts +0 -2
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.shadowStyles = exports.shadowObserverClassNames = exports.shadowClassNames = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = require("@emotion/react");
10
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
11
+
12
+ var shadowClassNames = exports.shadowClassNames = {
13
+ RIGHT_SHADOW: 'right-shadow',
14
+ LEFT_SHADOW: 'left-shadow'
15
+ };
16
+ var shadowObserverClassNames = exports.shadowObserverClassNames = {
17
+ SENTINEL_LEFT: 'sentinel-left',
18
+ SENTINEL_RIGHT: 'sentinel-right',
19
+ SHADOW_CONTAINER: 'with-shadow-observer'
20
+ };
21
+
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
23
+ var shadowStyles = exports.shadowStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "& .".concat(shadowClassNames.RIGHT_SHADOW, "::before, .").concat(shadowClassNames.RIGHT_SHADOW, "::after, .").concat(shadowClassNames.LEFT_SHADOW, "::before, .").concat(shadowClassNames.LEFT_SHADOW, "::after"), {
24
+ display: 'none',
25
+ position: 'absolute',
26
+ pointerEvents: 'none',
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
+ zIndex: 2,
29
+ width: 8,
30
+ content: "''",
31
+ height: 'calc(100%)'
32
+ }), "& .".concat(shadowClassNames.RIGHT_SHADOW, ", .").concat(shadowClassNames.LEFT_SHADOW), {
33
+ position: 'relative'
34
+ }), "& .".concat(shadowClassNames.LEFT_SHADOW, "::before"), {
35
+ background: "linear-gradient(to left, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to right, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px)"),
36
+ top: 0,
37
+ left: 0,
38
+ display: 'block'
39
+ }), "& .".concat(shadowClassNames.RIGHT_SHADOW, "::after"), {
40
+ background: "linear-gradient(to right, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to left, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px)"),
41
+ right: 0,
42
+ top: 0,
43
+ display: 'block'
44
+ }), "& .".concat(shadowObserverClassNames.SENTINEL_LEFT), {
45
+ height: '100%',
46
+ width: 0,
47
+ minWidth: 0
48
+ }), "& .".concat(shadowObserverClassNames.SENTINEL_RIGHT), {
49
+ height: '100%',
50
+ width: 0,
51
+ minWidth: 0
52
+ }));
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.smartLinksInLivePagesStylesOld = exports.smartLinksInLivePagesStyles = exports.smartCardStyles = exports.linkingVisualRefreshV1Styles = exports.SmartCardSharedCssClassName = exports.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = exports.DATASOURCE_INNER_CONTAINER_CLASSNAME = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = require("@emotion/react");
10
+ var _selectionStyles = require("./selectionStyles");
11
+ // eslint-disable-line
12
+
13
+ var DATASOURCE_INNER_CONTAINER_CLASSNAME = exports.DATASOURCE_INNER_CONTAINER_CLASSNAME = 'datasourceView-content-inner-wrap';
14
+ var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = exports.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
15
+ var SmartCardSharedCssClassName = exports.SmartCardSharedCssClassName = {
16
+ INLINE_CARD_CONTAINER: 'inlineCardView-content-wrap',
17
+ BLOCK_CARD_CONTAINER: 'blockCardView-content-wrap',
18
+ EMBED_CARD_CONTAINER: 'embedCardView-content-wrap',
19
+ DATASOURCE_CONTAINER: 'datasourceView-content-wrap',
20
+ LOADER_WRAPPER: 'loader-wrapper'
21
+ };
22
+
23
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
24
+ var smartCardStyles = exports.smartCardStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.INLINE_CARD_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
25
+ maxWidth: 'calc(100% - 20px)',
26
+ verticalAlign: 'top',
27
+ wordBreak: 'break-all',
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
29
+ '.card-with-comment': {
30
+ background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
31
+ borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, #B38600)"),
32
+ boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
33
+ },
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
35
+ '.card': (0, _defineProperty2.default)({
36
+ paddingLeft: "var(--ds-space-025, 2px)",
37
+ paddingRight: "var(--ds-space-025, 2px)",
38
+ paddingTop: "var(--ds-space-100, 0.5em)",
39
+ paddingBottom: "var(--ds-space-100, 0.5em)",
40
+ marginBottom: "var(--ds-space-negative-100, -0.5em)"
41
+ }, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a:focus"), [
42
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
43
+ _selectionStyles.boxShadowSelectionStyles,
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
45
+ _selectionStyles.hideNativeBrowserTextSelectionStyles])
46
+ }, "&.ak-editor-selected-node .".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a"), [
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
48
+ _selectionStyles.boxShadowSelectionStyles,
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
50
+ _selectionStyles.hideNativeBrowserTextSelectionStyles]), ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a"), {
51
+ // EDM-1717: box-shadow Safari fix start
52
+ zIndex: 1,
53
+ position: 'relative'
54
+ }), '&.danger', (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > a"), {
55
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)"),
56
+ // EDM-1717: box-shadow Safari fix start
57
+ zIndex: 2
58
+ // EDM-1717: box-shadow Safari fix end
59
+ }))), ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)({
60
+ display: 'block',
61
+ margin: '0.75rem 0 0',
62
+ maxWidth: "".concat(8 * 95, "px")
63
+ }, "&.ak-editor-selected-node .".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), [
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
65
+ _selectionStyles.boxShadowSelectionStyles,
66
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
67
+ _selectionStyles.hideNativeBrowserTextSelectionStyles, {
68
+ borderRadius: "var(--ds-border-radius-200, 8px)"
69
+ }]), '&.danger', (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
71
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)", " !important")
72
+ }))), ".".concat(SmartCardSharedCssClassName.DATASOURCE_CONTAINER, ".").concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
73
+ maxWidth: '100%',
74
+ display: 'flex',
75
+ justifyContent: 'center'
76
+ }, ".".concat(DATASOURCE_INNER_CONTAINER_CLASSNAME), {
77
+ cursor: 'pointer',
78
+ backgroundColor: "var(--ds-background-neutral-subtle, #00000000)",
79
+ borderRadius: "var(--ds-border-radius-200, 8px)",
80
+ border: "1px solid ".concat("var(--ds-border, #091E4224)"),
81
+ overflow: 'hidden'
82
+ }), '&.ak-editor-selected-node', (0, _defineProperty2.default)({}, ".".concat(DATASOURCE_INNER_CONTAINER_CLASSNAME), [
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
84
+ _selectionStyles.boxShadowSelectionStyles,
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
86
+ _selectionStyles.hideNativeBrowserTextSelectionStyles, {
87
+ 'input::selection': {
88
+ backgroundColor: "var(--ds-background-selected-hovered, #CCE0FF)"
89
+ },
90
+ 'input::-moz-selection': {
91
+ backgroundColor: "var(--ds-background-selected-hovered, #CCE0FF)"
92
+ }
93
+ }])), '&.danger', (0, _defineProperty2.default)({}, ".".concat(DATASOURCE_INNER_CONTAINER_CLASSNAME), {
94
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)")
95
+ }))), ".".concat(SmartCardSharedCssClassName.EMBED_CARD_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
96
+ cursor: 'pointer',
97
+ '&::after': {
98
+ transition: 'box-shadow 0s'
99
+ }
100
+ }), "&.ak-editor-selected-node .".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div::after"), [
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
102
+ _selectionStyles.boxShadowSelectionStyles,
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
104
+ _selectionStyles.hideNativeBrowserTextSelectionStyles]), '&.danger', {
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
106
+ '.media-card-frame::after': {
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
108
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)", " !important"),
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
110
+ background: "var(--ds-background-danger, #FFECEB)".concat(" !important")
111
+ },
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
113
+ '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after': {
114
+ background: "var(--ds-border-danger, #E2483D)"
115
+ }
116
+ })), ".".concat(FLOATING_TOOLBAR_LINKPICKER_CLASSNAME), {
117
+ padding: 0
118
+ }));
119
+
120
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
121
+ var smartLinksInLivePagesStyles = exports.smartLinksInLivePagesStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
122
+ cursor: 'text',
123
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
124
+ a: {
125
+ cursor: 'pointer'
126
+ }
127
+ })), ".".concat(SmartCardSharedCssClassName.EMBED_CARD_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
128
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
129
+ a: {
130
+ cursor: 'pointer'
131
+ }
132
+ })));
133
+
134
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
135
+ var smartLinksInLivePagesStylesOld = exports.smartLinksInLivePagesStylesOld = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
136
+ cursor: 'pointer',
137
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
138
+ a: {
139
+ cursor: 'auto'
140
+ }
141
+ })), ".".concat(SmartCardSharedCssClassName.EMBED_CARD_CONTAINER), (0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.LOADER_WRAPPER, " > div"), {
142
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
143
+ a: {
144
+ cursor: 'auto'
145
+ }
146
+ })));
147
+
148
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
149
+ var linkingVisualRefreshV1Styles = exports.linkingVisualRefreshV1Styles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
150
+ // EDM-11991: Fix list plugin adding padding to ADS AvatarGroup
151
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
152
+ 'ul, ol': {
153
+ paddingLeft: 'inherit'
154
+ }
155
+ }));
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.textColorStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
9
+
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
11
+ var textColorStyles = exports.textColorStyles = (0, _react.css)({
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
13
+ '.fabric-text-color-mark': {
14
+ color: 'var(--custom-palette-color, inherit)'
15
+ },
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
17
+ 'a .fabric-text-color-mark': {
18
+ color: 'unset'
19
+ }
20
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.unsupportedStyles = exports.UnsupportedSharedCssClassName = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _react = require("@emotion/react");
10
+ var _selectionStyles = require("./selectionStyles");
11
+ // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
12
+
13
+ var UnsupportedSharedCssClassName = exports.UnsupportedSharedCssClassName = {
14
+ BLOCK_CONTAINER: 'unsupportedBlockView-content-wrap',
15
+ INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
16
+ };
17
+
18
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
+ var unsupportedStyles = exports.unsupportedStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, .").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"), {
20
+ cursor: 'pointer'
21
+ }), '.ak-editor-selected-node', (0, _defineProperty2.default)({}, "&.".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, &.").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"),
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
23
+ [
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
25
+ _selectionStyles.backgroundSelectionStyles,
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
27
+ _selectionStyles.borderSelectionStyles,
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
29
+ _selectionStyles.hideNativeBrowserTextSelectionStyles])), '.danger', {
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
+ '.ak-editor-selected-node': (0, _defineProperty2.default)({}, "&.".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, &.").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"), {
32
+ border: "1px solid ".concat("var(--ds-border-danger, #E2483D)"),
33
+ backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
34
+ })
35
+ }));
@@ -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 = "207.9.0";
8
+ var version = exports.version = "207.11.0";
@@ -14,7 +14,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents'
14
14
  import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
15
15
  import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
16
16
  import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils/analytics';
17
- import { fg } from '@atlaskit/platform-feature-flags';
18
17
  import EditorActions from '../actions';
19
18
  import { useEditorContext } from '../ui/EditorContext';
20
19
  import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
@@ -92,7 +91,7 @@ function Editor(passedProps) {
92
91
  }
93
92
  }, [onSaveFromProps]);
94
93
  const isFullPageApperance = Boolean(props.appearance && ['full-page', 'full-width'].includes(props.appearance));
95
- return jsx(Fragment, null, isFullPageApperance && fg('platform_editor_fe--inp-metrics') ? jsx(EditorINPMetrics, null) : null, jsx(EditorInternal, {
94
+ return jsx(Fragment, null, isFullPageApperance ? jsx(EditorINPMetrics, null) : null, jsx(EditorInternal, {
96
95
  props: props,
97
96
  handleAnalyticsEvent: handleAnalyticsEvent,
98
97
  createAnalyticsEvent: createAnalyticsEvent,
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- import React, { useEffect, useState } from 'react';
6
+ import React, { useEffect, useCallback, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
@@ -86,11 +86,13 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
86
86
  return () => window.removeEventListener('resize', updateOnResize);
87
87
  }
88
88
  });
89
- const isShortcutToFocusToolbar = event => {
89
+ const isShortcutToFocusToolbarRaw = event => {
90
90
  //Alt + F9 to reach first element in this main toolbar
91
91
  return event.altKey && (event.key === 'F9' || event.keyCode === 120);
92
92
  };
93
- const handleEscape = event => {
93
+ const isShortcutToFocusToolbarMemoized = useCallback(isShortcutToFocusToolbarRaw, []);
94
+ const isShortcutToFocusToolbar = fg('platform_editor_toolbar_rerender_optimization') ? isShortcutToFocusToolbarMemoized : isShortcutToFocusToolbarRaw;
95
+ const handleEscapeRaw = event => {
94
96
  var _props$editorView;
95
97
  if (!((_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.hasFocus())) {
96
98
  var _props$editorView2;
@@ -99,6 +101,16 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
99
101
  event.preventDefault();
100
102
  event.stopPropagation();
101
103
  };
104
+ const handleEscapeMemoized = useCallback(event => {
105
+ var _props$editorView3;
106
+ if (!((_props$editorView3 = props.editorView) !== null && _props$editorView3 !== void 0 && _props$editorView3.hasFocus())) {
107
+ var _props$editorView4;
108
+ (_props$editorView4 = props.editorView) === null || _props$editorView4 === void 0 ? void 0 : _props$editorView4.focus();
109
+ }
110
+ event.preventDefault();
111
+ event.stopPropagation();
112
+ }, [props.editorView]);
113
+ const handleEscape = fg('platform_editor_toolbar_rerender_optimization') ? handleEscapeMemoized : handleEscapeRaw;
102
114
  return jsx(ContextPanelConsumer, null, ({
103
115
  width: contextPanelWidth
104
116
  }) => jsx(ToolbarArrowKeyNavigationProvider, {
@@ -9,46 +9,53 @@ import React from 'react';
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx, useTheme } from '@emotion/react';
12
+ import { browser } from '@atlaskit/editor-common/browser';
12
13
  import { telepointerStyle, telepointerStyleWithInitialOnly } from '@atlaskit/editor-common/collab';
13
14
  import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-common/emoji';
14
15
  import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
15
16
  import { gapCursorStyles } from '@atlaskit/editor-common/selection';
16
- import { GRID_GUTTER, dateSharedStyle, getSmartCardSharedStyles, listsSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, textColorStyles, unsupportedStyles } from '@atlaskit/editor-common/styles';
17
+ import { GRID_GUTTER, listsSharedStyles } from '@atlaskit/editor-common/styles';
17
18
  import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
18
19
  import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
19
20
  import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
20
21
  import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text/styles';
21
22
  import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
22
- import { SelectionStyle, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles } from '@atlaskit/editor-shared-styles';
23
+ import { SelectionStyle, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, editorFontSize, getSelectionStyles } from '@atlaskit/editor-shared-styles';
23
24
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
24
25
  import { fg } from '@atlaskit/platform-feature-flags';
25
26
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
26
27
  import { useThemeObserver } from '@atlaskit/tokens';
27
28
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
28
- import { dateStyles, dateVanillaStyles } from '../ContentStyles/date';
29
29
  import { expandStyles } from '../ContentStyles/expand';
30
30
  import { extensionStyles } from '../ContentStyles/extension';
31
31
  import { panelStyles } from '../ContentStyles/panel';
32
32
  import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
33
33
  import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
34
- import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
34
+ import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
35
35
  import { annotationStyles } from './styles/annotationStyles';
36
36
  import { backgroundColorStyles } from './styles/backgroundColorStyles';
37
37
  import { blockMarksStyles } from './styles/blockMarksStyles';
38
38
  import { codeBlockStyles, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
39
39
  import { codeMarkStyles } from './styles/codeMarkStyles';
40
+ import { dateStyles, dateVanillaStyles } from './styles/dateStyles';
40
41
  import { embedCardStyles } from './styles/embedCardStyles';
41
42
  import { firstBlockNodeStyles, firstBlockNodeStylesOld } from './styles/firstBlockNodeStyles';
42
43
  import { gridStyles } from './styles/gridStyles';
43
44
  import { indentationStyles } from './styles/indentationStyles';
44
45
  import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
45
46
  import { linkStyles, linkStylesOld } from './styles/link';
47
+ import { listsStyles, listsStylesSafariFix } from './styles/list';
46
48
  import { mediaStyles } from './styles/mediaStyles';
47
49
  import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
48
50
  import { resizerStyles, pragmaticResizerStyles } from './styles/resizerStyles';
49
51
  import { ruleStyles } from './styles/rule';
52
+ import { shadowStyles } from './styles/shadowStyles';
53
+ import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
50
54
  import { tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
55
+ import { textColorStyles } from './styles/textColorStyles';
56
+ import { unsupportedStyles } from './styles/unsupportedStyles';
51
57
  import { whitespaceStyles } from './styles/whitespaceStyles';
58
+ export const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
52
59
  const vanillaMentionsStyles = css({
53
60
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
54
61
  '.editor-mention-primitive': {
@@ -135,24 +142,6 @@ const mentionsStyles = css`
135
142
  }
136
143
  }
137
144
  `;
138
- const listsStyles = css`
139
- .ProseMirror {
140
- li {
141
- position: relative;
142
-
143
- > p:not(:first-child) {
144
- margin: ${"var(--ds-space-050, 4px)"} 0 0 0;
145
- }
146
-
147
- // In SSR the above rule will apply to all p tags because first-child would be a style tag.
148
- // The following rule resets the first p tag back to its original margin
149
- // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts
150
- > style:first-child + p {
151
- margin-top: ${blockNodesVerticalMargin};
152
- }
153
- }
154
- }
155
- `;
156
145
  const reactEmojiStyles = css`
157
146
  .${EmojiSharedCssClassName.EMOJI_CONTAINER} {
158
147
  display: inline-block;
@@ -286,7 +275,7 @@ const contentStyles = () => css`
286
275
 
287
276
  ${indentationStyles};
288
277
 
289
- ${shadowSharedStyle};
278
+ ${shadowStyles};
290
279
 
291
280
  ${InlineNodeViewSharedStyles};
292
281
  }
@@ -392,7 +381,7 @@ const contentStyles = () => css`
392
381
 
393
382
  ${blockMarksStyles}
394
383
 
395
- ${dateSharedStyle}
384
+ ${dateStyles}
396
385
 
397
386
  ${extensionStyles}
398
387
 
@@ -427,13 +416,7 @@ const contentStyles = () => css`
427
416
 
428
417
  ${annotationStyles}
429
418
 
430
- ${smartCardStyles()}
431
-
432
- ${fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles}
433
-
434
- ${editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null}
435
-
436
- ${dateStyles}
419
+ ${smartCardStyles}
437
420
 
438
421
  ${embedCardStyles}
439
422
 
@@ -578,7 +561,15 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
578
561
  ref: ref,
579
562
  css: [contentStyles(),
580
563
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
581
- layoutBaseStyles(), fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
564
+ layoutBaseStyles(), fg('linking_platform_smart_links_in_live_pages') ?
565
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
566
+ smartLinksInLivePagesStyles :
567
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
568
+ smartLinksInLivePagesStylesOld, fg('platform-linking-visual-refresh-v1') &&
569
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
570
+ linkingVisualRefreshV1Styles, editorExperiment('platform_editor_vanilla_dom', true) &&
571
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
572
+ dateVanillaStyles, fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
582
573
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
583
574
  paragraphStylesUGCRefreshed :
584
575
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -586,14 +577,20 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
586
577
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
587
578
  paragraphStylesOld,
588
579
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
589
- fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld, editorExperiment('platform_editor_breakout_resizing', true) &&
580
+ fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld,
581
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
582
+ browser.safari && listsStylesSafariFix, editorExperiment('platform_editor_breakout_resizing', true) &&
590
583
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
591
584
  pragmaticResizerStyles,
592
585
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
593
586
  aiPanelBaseStyles,
594
587
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
588
+ isFirefox && aiPanelBaseFirefoxStyles,
589
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
595
590
  colorMode === 'dark' && aiPanelDarkStyles,
596
591
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
592
+ colorMode === 'dark' && isFirefox && aiPanelDarkFirefoxStyles,
593
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
597
594
  viewMode === 'view' && layoutViewStyles, isComment && commentEditorStyles, isFullPage && fullPageEditorStyles, fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix, fg('platform_editor_nested_dnd_styles_changes') ?
598
595
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
599
596
  firstCodeBlockWithNoMargin :