@atlaskit/editor-core 193.14.0 → 193.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 193.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#96125](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96125)
8
+ [`d8acc4e69807`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d8acc4e69807) -
9
+ [ux] EDF-676 Updated old macro design to include AI rainbow border
10
+
3
11
  ## 193.14.0
4
12
 
5
13
  ### Minor Changes
@@ -40,16 +40,20 @@ var prismBorderAnimationStyles = (0, _react.css)({
40
40
  }
41
41
  }
42
42
  });
43
- var prismBorderStyles = function prismBorderStyles(colorMode, wide) {
43
+ var prismBorderStyles = function prismBorderStyles(colorMode, sizeOffset, positionOffset) {
44
44
  return (0, _react.css)({
45
45
  content: "''",
46
- position: "absolute",
46
+ position: 'absolute',
47
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)"
48
+ zIndex: -1,
49
+ width: "calc(100% + ".concat(sizeOffset, "px)"),
50
+ height: "calc(100% + ".concat(sizeOffset, "px)"),
51
+ top: "".concat(positionOffset, "px"),
52
+ left: "".concat(positionOffset, "px"),
53
+ borderRadius: "var(--ds-border-radius-200, 5px)",
54
+ transform: 'translate3d(0, 0, 0)'
51
55
  });
52
56
  };
53
57
  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, ")"));
58
+ 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'] {\n &.", ":has(.streaming) {\n & .extension-container {\n box-shadow: none !important;\n ", "\n }\n }\n\n .danger > .extension-container {\n background-color: ", ";\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 .extension-overflow-wrapper {\n border-radius: inherit;\n box-shadow: inherit;\n background-color: inherit;\n }\n &.with-border {\n border: 1px solid ", ";\n }\n &.with-hover-border {\n border: 1px solid ", ";\n }\n }\n }\n\n div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n .extension-container {\n background-color: ", ";\n .extension-overflow-wrapper {\n box-shadow: none !important;\n }\n }\n\n &:not(.", "),\n &:not(.danger) {\n .extension-container {\n &::before,\n &::after {\n ", "\n }\n &.wider-layout {\n &::after,\n &::before {\n ", "\n }\n }\n }\n }\n\n &.", ", &.danger {\n .extension-container {\n &.wider-layout {\n &::after,\n &::before {\n content: none;\n }\n }\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-background-accent-gray-subtlest, ".concat(_colors.N20, ")"), prismBorderStyles(colorMode, 2, -1), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderStyles(colorMode, 4, -2), prismBorderStyles(colorMode, 2, -1), _editorSharedStyles.akEditorSelectedNodeClassName);
55
59
  };
@@ -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.14.0";
8
+ var version = exports.version = "193.14.1";
@@ -1,6 +1,6 @@
1
1
  import { css, keyframes } from '@emotion/react';
2
- import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
3
- import { N0 } from '@atlaskit/theme/colors';
2
+ import { akEditorDeleteBackground, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
3
+ import { N0, N20 } from '@atlaskit/theme/colors';
4
4
  const rotationAnimation = keyframes({
5
5
  '0%': {
6
6
  '--panel-gradient-angle': '0deg'
@@ -35,31 +35,17 @@ const prismBorderAnimationStyles = css({
35
35
  }
36
36
  }
37
37
  });
38
- const prismBorderStyles = (colorMode, wide) => css({
38
+ const prismBorderStyles = (colorMode, sizeOffset, positionOffset) => css({
39
39
  content: "''",
40
- position: "absolute",
40
+ position: 'absolute',
41
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)"
42
+ zIndex: -1,
43
+ width: `calc(100% + ${sizeOffset}px)`,
44
+ height: `calc(100% + ${sizeOffset}px)`,
45
+ top: `${positionOffset}px`,
46
+ left: `${positionOffset}px`,
47
+ borderRadius: "var(--ds-border-radius-200, 5px)",
48
+ transform: 'translate3d(0, 0, 0)'
63
49
  });
64
50
  export const aiPanelStyles = colorMode => css`
65
51
  @property --panel-gradient-angle {
@@ -70,27 +56,31 @@ export const aiPanelStyles = colorMode => css`
70
56
 
71
57
  // The .with-border style is only present when the new macro styles are applied
72
58
  // TODO: Remove this once new macro styles have been adopted
73
- div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {
59
+ div[extensiontype='com.atlassian.ai-blocks'] {
74
60
  &.${akEditorSelectedNodeClassName}:has(.streaming) {
75
61
  & .extension-container {
76
62
  box-shadow: none !important;
77
63
  ${prismBorderAnimationStyles}
78
64
  }
79
65
  }
66
+
67
+ .danger > .extension-container {
68
+ background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
69
+ }
70
+
80
71
  .extension-container {
81
72
  overflow: visible;
82
- background-color: ${`var(--ds-surface-overlay, ${N0})`};
73
+ background-color: ${`var(--ds-background-accent-gray-subtlest, ${N20})`};
83
74
  position: relative;
84
75
  border-radius: 4px;
85
76
  &::before,
86
77
  &::after {
87
- ${prismBorderStyles(colorMode)}
78
+ ${prismBorderStyles(colorMode, 2, -1)}
88
79
  }
89
- &.wider-layout {
90
- &::after,
91
- &::before {
92
- ${prismBorderStyles(colorMode, true)}
93
- }
80
+ .extension-overflow-wrapper {
81
+ border-radius: inherit;
82
+ box-shadow: inherit;
83
+ background-color: inherit;
94
84
  }
95
85
  &.with-border {
96
86
  border: 1px solid ${`var(--ds-surface-overlay, ${N0})`};
@@ -100,4 +90,40 @@ export const aiPanelStyles = colorMode => css`
100
90
  }
101
91
  }
102
92
  }
93
+
94
+ div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {
95
+ .extension-container {
96
+ background-color: ${`var(--ds-surface-overlay, ${N0})`};
97
+ .extension-overflow-wrapper {
98
+ box-shadow: none !important;
99
+ }
100
+ }
101
+
102
+ &:not(.${akEditorSelectedNodeClassName}),
103
+ &:not(.danger) {
104
+ .extension-container {
105
+ &::before,
106
+ &::after {
107
+ ${prismBorderStyles(colorMode, 4, -2)}
108
+ }
109
+ &.wider-layout {
110
+ &::after,
111
+ &::before {
112
+ ${prismBorderStyles(colorMode, 2, -1)}
113
+ }
114
+ }
115
+ }
116
+ }
117
+
118
+ &.${akEditorSelectedNodeClassName}, &.danger {
119
+ .extension-container {
120
+ &.wider-layout {
121
+ &::after,
122
+ &::before {
123
+ content: none;
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
103
129
  `;
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "193.14.0";
2
+ export const version = "193.14.1";
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  var _aiPrismColor, _templateObject;
4
4
  import { css, keyframes } from '@emotion/react';
5
- import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- import { N0 } from '@atlaskit/theme/colors';
5
+ import { akEditorDeleteBackground, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
+ import { N0, N20 } from '@atlaskit/theme/colors';
7
7
  var rotationAnimation = keyframes({
8
8
  '0%': {
9
9
  '--panel-gradient-angle': '0deg'
@@ -33,16 +33,20 @@ var prismBorderAnimationStyles = css({
33
33
  }
34
34
  }
35
35
  });
36
- var prismBorderStyles = function prismBorderStyles(colorMode, wide) {
36
+ var prismBorderStyles = function prismBorderStyles(colorMode, sizeOffset, positionOffset) {
37
37
  return css({
38
38
  content: "''",
39
- position: "absolute",
39
+ position: 'absolute',
40
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)"
41
+ zIndex: -1,
42
+ width: "calc(100% + ".concat(sizeOffset, "px)"),
43
+ height: "calc(100% + ".concat(sizeOffset, "px)"),
44
+ top: "".concat(positionOffset, "px"),
45
+ left: "".concat(positionOffset, "px"),
46
+ borderRadius: "var(--ds-border-radius-200, 5px)",
47
+ transform: 'translate3d(0, 0, 0)'
44
48
  });
45
49
  };
46
50
  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, ")"));
51
+ 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'] {\n &.", ":has(.streaming) {\n & .extension-container {\n box-shadow: none !important;\n ", "\n }\n }\n\n .danger > .extension-container {\n background-color: ", ";\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 .extension-overflow-wrapper {\n border-radius: inherit;\n box-shadow: inherit;\n background-color: inherit;\n }\n &.with-border {\n border: 1px solid ", ";\n }\n &.with-hover-border {\n border: 1px solid ", ";\n }\n }\n }\n\n div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n .extension-container {\n background-color: ", ";\n .extension-overflow-wrapper {\n box-shadow: none !important;\n }\n }\n\n &:not(.", "),\n &:not(.danger) {\n .extension-container {\n &::before,\n &::after {\n ", "\n }\n &.wider-layout {\n &::after,\n &::before {\n ", "\n }\n }\n }\n }\n\n &.", ", &.danger {\n .extension-container {\n &.wider-layout {\n &::after,\n &::before {\n content: none;\n }\n }\n }\n }\n }\n"])), akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-background-accent-gray-subtlest, ".concat(N20, ")"), prismBorderStyles(colorMode, 2, -1), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"), akEditorSelectedNodeClassName, prismBorderStyles(colorMode, 4, -2), prismBorderStyles(colorMode, 2, -1), akEditorSelectedNodeClassName);
48
52
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "193.14.0";
2
+ export var version = "193.14.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "193.14.0",
3
+ "version": "193.14.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"