@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 +8 -0
- package/dist/cjs/ui/ContentStyles/ai-panels.js +10 -6
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ContentStyles/ai-panels.js +59 -33
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ContentStyles/ai-panels.js +12 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +1 -1
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,
|
|
43
|
+
var prismBorderStyles = function prismBorderStyles(colorMode, sizeOffset, positionOffset) {
|
|
44
44
|
return (0, _react.css)({
|
|
45
45
|
content: "''",
|
|
46
|
-
position:
|
|
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
|
-
|
|
50
|
-
|
|
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']
|
|
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
|
};
|
|
@@ -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,
|
|
38
|
+
const prismBorderStyles = (colorMode, sizeOffset, positionOffset) => css({
|
|
39
39
|
content: "''",
|
|
40
|
-
position:
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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']
|
|
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-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
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,
|
|
36
|
+
var prismBorderStyles = function prismBorderStyles(colorMode, sizeOffset, positionOffset) {
|
|
37
37
|
return css({
|
|
38
38
|
content: "''",
|
|
39
|
-
position:
|
|
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
|
-
|
|
43
|
-
|
|
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']
|
|
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.
|
|
2
|
+
export var version = "193.14.1";
|