@atlaskit/editor-core 193.12.0 → 193.12.2

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,12 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 193.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#94901](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94901) [`da964fcdc828`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da964fcdc828) - [ED-23097] Bump ADF schema to version 35.12.1
8
+ - [#95163](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95163) [`a6a28c6b3ff9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a6a28c6b3ff9) - [ux] [EDF-555] Add prism border to ai panels in editor view and renderer view, add beta footer to the renderer view
9
+
3
10
  ## 193.12.0
4
11
 
5
12
  ### Minor Changes
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.aiPanelStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _react = require("@emotion/react");
11
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
+ var _colors = require("@atlaskit/theme/colors");
13
+ var _aiPrismColor, _templateObject;
14
+ var rotationAnimation = (0, _react.keyframes)({
15
+ '0%': {
16
+ '--panel-gradient-angle': '0deg'
17
+ },
18
+ '100%': {
19
+ '--panel-gradient-angle': '360deg'
20
+ }
21
+ });
22
+ var aiPrismColor = (_aiPrismColor = {}, (0, _defineProperty2.default)(_aiPrismColor, 'prism.border.step.1', {
23
+ light: '#0065FF',
24
+ dark: '#0065FF80'
25
+ }), (0, _defineProperty2.default)(_aiPrismColor, 'prism.border.step.2', {
26
+ light: '#0469FF',
27
+ dark: '#0469FF80'
28
+ }), (0, _defineProperty2.default)(_aiPrismColor, 'prism.border.step.3', {
29
+ light: '#BF63F3',
30
+ dark: '#BF63F380'
31
+ }), (0, _defineProperty2.default)(_aiPrismColor, 'prism.border.step.4', {
32
+ light: '#FFA900',
33
+ dark: '#FFA90080'
34
+ }), _aiPrismColor);
35
+ var prismBorderAnimationStyles = (0, _react.css)({
36
+ '&::before, &::after': {
37
+ animation: "".concat(rotationAnimation, " linear 2s infinite"),
38
+ '@media (prefers-reduced-motion)': {
39
+ animation: 'none'
40
+ }
41
+ }
42
+ });
43
+ var prismBorderStyles = function prismBorderStyles(colorMode, wide) {
44
+ return (0, _react.css)({
45
+ content: "''",
46
+ position: "absolute",
47
+ background: "conic-gradient( from var(--panel-gradient-angle, 180deg) at 50% 50%, ".concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " -52.2deg, ").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 89.76deg, ").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 145.8deg, ").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 262.8deg, ").concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 307.8deg, ").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 449.76deg )"),
48
+ zIndex: -1
49
+ }, !wide ? "\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units\n // and Safari has a bug where rem is incorrectly calculated when there are\n // animations involved\n top: -2px;\n left: -2px;\n border-radius: ".concat("var(--ds-border-radius-200, 5px)", ";\n ") : "\n width: calc(100% - 14px);\n height: calc(100% - 14px);\n // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units\n // and Safari has a bug where rem is incorrectly calculated when there are\n // animations involved\n top: 7px;\n left: 7px;\n border-radius: ".concat("var(--ds-border-radius-200, 4px)", ";\n "), {
50
+ transform: "translate3d(0, 0, 0)"
51
+ });
52
+ };
53
+ var aiPanelStyles = exports.aiPanelStyles = function aiPanelStyles(colorMode) {
54
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n @property --panel-gradient-angle {\n syntax: '<angle>';\n initial-value: 180deg;\n inherits: false;\n }\n\n // The .with-border style is only present when the new macro styles are applied\n // TODO: Remove this once new macro styles have been adopted\n div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n &.", ":has(.streaming) {\n & .extension-container {\n box-shadow: none !important;\n ", "\n }\n }\n .extension-container {\n overflow: visible;\n background-color: ", ";\n position: relative;\n border-radius: 4px;\n &::before,\n &::after {\n ", "\n }\n &.wider-layout {\n &::after,\n &::before {\n ", "\n }\n }\n &.with-border {\n border: 1px solid ", ";\n }\n &.with-hover-border {\n border: 1px solid ", ";\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), prismBorderStyles(colorMode), prismBorderStyles(colorMode, true), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"));
55
+ };
@@ -22,7 +22,9 @@ var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
22
22
  var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
23
23
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
24
24
  var _colors = require("@atlaskit/theme/colors");
25
+ var _tokens = require("@atlaskit/tokens");
25
26
  var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
27
+ var _aiPanels = require("./ai-panels");
26
28
  var _codeBlock = require("./code-block");
27
29
  var _date = require("./date");
28
30
  var _expand = require("./expand");
@@ -64,9 +66,9 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
64
66
  }
65
67
  });
66
68
  var contentStyles = function contentStyles(props) {
67
- return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n .pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n clear: both;\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
69
+ return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n .pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n clear: both;\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
68
70
  theme: props.theme
69
- }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, listsStyles, ruleStyles(), _media.mediaStyles, _layout.layoutStyles, _collab.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
71
+ }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, listsStyles, ruleStyles(), _media.mediaStyles, _layout.layoutStyles, _collab.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
70
72
  };
71
73
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
72
74
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
@@ -74,12 +76,15 @@ var createEditorContentStyle = exports.createEditorContentStyle = function creat
74
76
  children = props.children,
75
77
  featureFlags = props.featureFlags;
76
78
  var theme = (0, _react2.useTheme)();
79
+ var _useThemeObserver = (0, _tokens.useThemeObserver)(),
80
+ colorMode = _useThemeObserver.colorMode;
77
81
  var memoizedStyle = (0, _react.useMemo)(function () {
78
82
  return contentStyles({
79
83
  theme: theme,
84
+ colorMode: colorMode,
80
85
  featureFlags: featureFlags
81
86
  });
82
- }, [theme, featureFlags]);
87
+ }, [theme, colorMode, featureFlags]);
83
88
  return (0, _react2.jsx)("div", {
84
89
  className: className,
85
90
  ref: ref,
@@ -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 = "193.12.0";
8
+ var version = exports.version = "193.12.2";
@@ -0,0 +1,103 @@
1
+ import { css, keyframes } from '@emotion/react';
2
+ import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
3
+ import { N0 } from '@atlaskit/theme/colors';
4
+ const rotationAnimation = keyframes({
5
+ '0%': {
6
+ '--panel-gradient-angle': '0deg'
7
+ },
8
+ '100%': {
9
+ '--panel-gradient-angle': '360deg'
10
+ }
11
+ });
12
+ const aiPrismColor = {
13
+ ['prism.border.step.1']: {
14
+ light: '#0065FF',
15
+ dark: '#0065FF80'
16
+ },
17
+ ['prism.border.step.2']: {
18
+ light: '#0469FF',
19
+ dark: '#0469FF80'
20
+ },
21
+ ['prism.border.step.3']: {
22
+ light: '#BF63F3',
23
+ dark: '#BF63F380'
24
+ },
25
+ ['prism.border.step.4']: {
26
+ light: '#FFA900',
27
+ dark: '#FFA90080'
28
+ }
29
+ };
30
+ const prismBorderAnimationStyles = css({
31
+ '&::before, &::after': {
32
+ animation: `${rotationAnimation} linear 2s infinite`,
33
+ '@media (prefers-reduced-motion)': {
34
+ animation: 'none'
35
+ }
36
+ }
37
+ });
38
+ const prismBorderStyles = (colorMode, wide) => css({
39
+ content: "''",
40
+ position: "absolute",
41
+ background: `conic-gradient( from var(--panel-gradient-angle, 180deg) at 50% 50%, ${aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} -52.2deg, ${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 89.76deg, ${aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 145.8deg, ${aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 262.8deg, ${aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 307.8deg, ${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 449.76deg )`,
42
+ zIndex: -1
43
+ }, !wide ? `
44
+ width: calc(100% + 4px);
45
+ height: calc(100% + 4px);
46
+ // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units
47
+ // and Safari has a bug where rem is incorrectly calculated when there are
48
+ // animations involved
49
+ top: -2px;
50
+ left: -2px;
51
+ border-radius: ${"var(--ds-border-radius-200, 5px)"};
52
+ ` : `
53
+ width: calc(100% - 14px);
54
+ height: calc(100% - 14px);
55
+ // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units
56
+ // and Safari has a bug where rem is incorrectly calculated when there are
57
+ // animations involved
58
+ top: 7px;
59
+ left: 7px;
60
+ border-radius: ${"var(--ds-border-radius-200, 4px)"};
61
+ `, {
62
+ transform: "translate3d(0, 0, 0)"
63
+ });
64
+ export const aiPanelStyles = colorMode => css`
65
+ @property --panel-gradient-angle {
66
+ syntax: '<angle>';
67
+ initial-value: 180deg;
68
+ inherits: false;
69
+ }
70
+
71
+ // The .with-border style is only present when the new macro styles are applied
72
+ // TODO: Remove this once new macro styles have been adopted
73
+ div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {
74
+ &.${akEditorSelectedNodeClassName}:has(.streaming) {
75
+ & .extension-container {
76
+ box-shadow: none !important;
77
+ ${prismBorderAnimationStyles}
78
+ }
79
+ }
80
+ .extension-container {
81
+ overflow: visible;
82
+ background-color: ${`var(--ds-surface-overlay, ${N0})`};
83
+ position: relative;
84
+ border-radius: 4px;
85
+ &::before,
86
+ &::after {
87
+ ${prismBorderStyles(colorMode)}
88
+ }
89
+ &.wider-layout {
90
+ &::after,
91
+ &::before {
92
+ ${prismBorderStyles(colorMode, true)}
93
+ }
94
+ }
95
+ &.with-border {
96
+ border: 1px solid ${`var(--ds-surface-overlay, ${N0})`};
97
+ }
98
+ &.with-hover-border {
99
+ border: 1px solid ${`var(--ds-surface-overlay, ${N0})`};
100
+ }
101
+ }
102
+ }
103
+ `;
@@ -17,7 +17,9 @@ import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text
17
17
  import { tableStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
18
18
  import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
19
19
  import { N200, N30A, N500 } from '@atlaskit/theme/colors';
20
+ import { useThemeObserver } from '@atlaskit/tokens';
20
21
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
22
+ import { aiPanelStyles } from './ai-panels';
21
23
  import { codeBlockStyles } from './code-block';
22
24
  import { dateStyles } from './date';
23
25
  import { expandStyles } from './expand';
@@ -208,6 +210,7 @@ const contentStyles = props => css`
208
210
  ${embedCardStyles}
209
211
  ${unsupportedStyles}
210
212
  ${resizerStyles}
213
+ ${aiPanelStyles(props.colorMode)}
211
214
 
212
215
  .panelView-content-wrap {
213
216
  box-sizing: border-box;
@@ -275,10 +278,14 @@ export const createEditorContentStyle = styles => {
275
278
  featureFlags
276
279
  } = props;
277
280
  const theme = useTheme();
281
+ const {
282
+ colorMode
283
+ } = useThemeObserver();
278
284
  const memoizedStyle = useMemo(() => contentStyles({
279
285
  theme,
286
+ colorMode,
280
287
  featureFlags
281
- }), [theme, featureFlags]);
288
+ }), [theme, colorMode, featureFlags]);
282
289
  return jsx("div", {
283
290
  className: className,
284
291
  ref: ref,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "193.12.0";
2
+ export const version = "193.12.2";
@@ -0,0 +1,48 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ var _aiPrismColor, _templateObject;
4
+ import { css, keyframes } from '@emotion/react';
5
+ import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
+ import { N0 } from '@atlaskit/theme/colors';
7
+ var rotationAnimation = keyframes({
8
+ '0%': {
9
+ '--panel-gradient-angle': '0deg'
10
+ },
11
+ '100%': {
12
+ '--panel-gradient-angle': '360deg'
13
+ }
14
+ });
15
+ var aiPrismColor = (_aiPrismColor = {}, _defineProperty(_aiPrismColor, 'prism.border.step.1', {
16
+ light: '#0065FF',
17
+ dark: '#0065FF80'
18
+ }), _defineProperty(_aiPrismColor, 'prism.border.step.2', {
19
+ light: '#0469FF',
20
+ dark: '#0469FF80'
21
+ }), _defineProperty(_aiPrismColor, 'prism.border.step.3', {
22
+ light: '#BF63F3',
23
+ dark: '#BF63F380'
24
+ }), _defineProperty(_aiPrismColor, 'prism.border.step.4', {
25
+ light: '#FFA900',
26
+ dark: '#FFA90080'
27
+ }), _aiPrismColor);
28
+ var prismBorderAnimationStyles = css({
29
+ '&::before, &::after': {
30
+ animation: "".concat(rotationAnimation, " linear 2s infinite"),
31
+ '@media (prefers-reduced-motion)': {
32
+ animation: 'none'
33
+ }
34
+ }
35
+ });
36
+ var prismBorderStyles = function prismBorderStyles(colorMode, wide) {
37
+ return css({
38
+ content: "''",
39
+ position: "absolute",
40
+ background: "conic-gradient( from var(--panel-gradient-angle, 180deg) at 50% 50%, ".concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " -52.2deg, ").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 89.76deg, ").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 145.8deg, ").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 262.8deg, ").concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 307.8deg, ").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 449.76deg )"),
41
+ zIndex: -1
42
+ }, !wide ? "\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units\n // and Safari has a bug where rem is incorrectly calculated when there are\n // animations involved\n top: -2px;\n left: -2px;\n border-radius: ".concat("var(--ds-border-radius-200, 5px)", ";\n ") : "\n width: calc(100% - 14px);\n height: calc(100% - 14px);\n // ED-20633, DSP-14045: Avoid space tokens for now as space tokens are currently using rem units\n // and Safari has a bug where rem is incorrectly calculated when there are\n // animations involved\n top: 7px;\n left: 7px;\n border-radius: ".concat("var(--ds-border-radius-200, 4px)", ";\n "), {
43
+ transform: "translate3d(0, 0, 0)"
44
+ });
45
+ };
46
+ export var aiPanelStyles = function aiPanelStyles(colorMode) {
47
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @property --panel-gradient-angle {\n syntax: '<angle>';\n initial-value: 180deg;\n inherits: false;\n }\n\n // The .with-border style is only present when the new macro styles are applied\n // TODO: Remove this once new macro styles have been adopted\n div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n &.", ":has(.streaming) {\n & .extension-container {\n box-shadow: none !important;\n ", "\n }\n }\n .extension-container {\n overflow: visible;\n background-color: ", ";\n position: relative;\n border-radius: 4px;\n &::before,\n &::after {\n ", "\n }\n &.wider-layout {\n &::after,\n &::before {\n ", "\n }\n }\n &.with-border {\n border: 1px solid ", ";\n }\n &.with-hover-border {\n border: 1px solid ", ";\n }\n }\n }\n"])), akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-surface-overlay, ".concat(N0, ")"), prismBorderStyles(colorMode), prismBorderStyles(colorMode, true), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"));
48
+ };
@@ -19,7 +19,9 @@ import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text
19
19
  import { tableStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
20
20
  import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
21
21
  import { N200, N30A, N500 } from '@atlaskit/theme/colors';
22
+ import { useThemeObserver } from '@atlaskit/tokens';
22
23
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
24
+ import { aiPanelStyles } from './ai-panels';
23
25
  import { codeBlockStyles } from './code-block';
24
26
  import { dateStyles } from './date';
25
27
  import { expandStyles } from './expand';
@@ -55,9 +57,9 @@ export var placeholderStyles = css({
55
57
  }
56
58
  });
57
59
  var contentStyles = function contentStyles(props) {
58
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n .pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n clear: both;\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
60
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n .pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n clear: both;\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
59
61
  theme: props.theme
60
- }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, listsStyles, ruleStyles(), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
62
+ }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, listsStyles, ruleStyles(), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, aiPanelStyles(props.colorMode), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
61
63
  };
62
64
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
63
65
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -65,12 +67,15 @@ export var createEditorContentStyle = function createEditorContentStyle(styles)
65
67
  children = props.children,
66
68
  featureFlags = props.featureFlags;
67
69
  var theme = useTheme();
70
+ var _useThemeObserver = useThemeObserver(),
71
+ colorMode = _useThemeObserver.colorMode;
68
72
  var memoizedStyle = useMemo(function () {
69
73
  return contentStyles({
70
74
  theme: theme,
75
+ colorMode: colorMode,
71
76
  featureFlags: featureFlags
72
77
  });
73
- }, [theme, featureFlags]);
78
+ }, [theme, colorMode, featureFlags]);
74
79
  return jsx("div", {
75
80
  className: className,
76
81
  ref: ref,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "193.12.0";
2
+ export var version = "193.12.2";