@atlaskit/editor-core 197.5.0 → 197.5.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/code-block.js +6 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ContentStyles/code-block.js +19 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ContentStyles/code-block.js +6 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 197.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139538](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139538)
|
|
8
|
+
[`572cbc5bad5db`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/572cbc5bad5db) -
|
|
9
|
+
ED-24901 fix more flickering issue from DnD
|
|
10
|
+
|
|
3
11
|
## 197.5.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -10,12 +10,16 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
-
var
|
|
13
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
14
15
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
15
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
17
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
17
18
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&::after {\n\t\theight: 100%;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 24px;\n\t\tbackground-color: ", ";\n\t}\n"])), "var(--ds-blanket-danger, none)");
|
|
18
19
|
};
|
|
20
|
+
|
|
21
|
+
/* When code-block is inside the panel */
|
|
22
|
+
var firstCodeBlockWithNoMargin = (0, _experiments.editorExperiment)('nested-dnd', true) ? (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"]))) : (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
|
|
19
23
|
var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles() {
|
|
20
|
-
return (0, _react.css)(
|
|
24
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(_colors.R75, ")"), "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin);
|
|
21
25
|
};
|
|
@@ -4,6 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { R75 } from '@atlaskit/theme/colors';
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
8
|
const GutterDangerOverlay = () => css`
|
|
8
9
|
&::after {
|
|
9
10
|
height: 100%;
|
|
@@ -15,6 +16,23 @@ const GutterDangerOverlay = () => css`
|
|
|
15
16
|
background-color: ${"var(--ds-blanket-danger, none)"};
|
|
16
17
|
}
|
|
17
18
|
`;
|
|
19
|
+
|
|
20
|
+
/* When code-block is inside the panel */
|
|
21
|
+
const firstCodeBlockWithNoMargin = editorExperiment('nested-dnd', true) ? css`
|
|
22
|
+
.ak-editor-panel__content {
|
|
23
|
+
> .code-block:first-child,
|
|
24
|
+
> .ProseMirror-widget:first-child + .code-block,
|
|
25
|
+
> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {
|
|
26
|
+
margin: 0 0 0 0 !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
` : css`
|
|
30
|
+
.ak-editor-panel__content {
|
|
31
|
+
> .code-block:first-child {
|
|
32
|
+
margin: 0 0 0 0 !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
18
36
|
export const codeBlockStyles = () => css`
|
|
19
37
|
.ProseMirror {
|
|
20
38
|
${codeBlockSharedStyles()}
|
|
@@ -68,10 +86,5 @@ export const codeBlockStyles = () => css`
|
|
|
68
86
|
}
|
|
69
87
|
}
|
|
70
88
|
|
|
71
|
-
|
|
72
|
-
.ak-editor-panel__content {
|
|
73
|
-
> .code-block:first-child {
|
|
74
|
-
margin: 0 0 0 0 !important;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
89
|
+
${firstCodeBlockWithNoMargin}
|
|
77
90
|
`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "197.5.
|
|
2
|
+
export const version = "197.5.1";
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { R75 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
10
11
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&::after {\n\t\theight: 100%;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 24px;\n\t\tbackground-color: ", ";\n\t}\n"])), "var(--ds-blanket-danger, none)");
|
|
11
12
|
};
|
|
13
|
+
|
|
14
|
+
/* When code-block is inside the panel */
|
|
15
|
+
var firstCodeBlockWithNoMargin = editorExperiment('nested-dnd', true) ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"]))) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
|
|
12
16
|
export var codeBlockStyles = function codeBlockStyles() {
|
|
13
|
-
return css(
|
|
17
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), codeBlockSharedStyles(), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(R75, ")"), "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackground, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin);
|
|
14
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "197.5.
|
|
2
|
+
export var version = "197.5.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "197.5.
|
|
3
|
+
"version": "197.5.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@atlaskit/logo": "^14.2.0",
|
|
96
96
|
"@atlaskit/media-core": "^34.3.0",
|
|
97
97
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
98
|
-
"@atlaskit/media-test-helpers": "^34.
|
|
98
|
+
"@atlaskit/media-test-helpers": "^34.2.0",
|
|
99
99
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
100
100
|
"@atlaskit/primitives": "^12.1.0",
|
|
101
101
|
"@atlaskit/renderer": "^110.0.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
106
106
|
"@atlaskit/visual-regression": "*",
|
|
107
107
|
"@atlassian/adf-schema-json": "^1.22.0",
|
|
108
|
-
"@atlassian/search-provider": "2.4.
|
|
108
|
+
"@atlassian/search-provider": "2.4.125",
|
|
109
109
|
"@emotion/jest": "^11.8.0",
|
|
110
110
|
"@storybook/addon-knobs": "^5.3.18",
|
|
111
111
|
"@testing-library/react": "^12.1.5",
|