@atlaskit/editor-core 202.2.0 → 202.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 202.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#166206](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166206)
8
+ [`589f49d62238b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/589f49d62238b) -
9
+ [ux] Adds logic to change bodied macro from edit to view mode and vice versa. Also updates some
10
+ styling/interactions based on this new feature.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 202.2.0
4
17
 
5
18
  ### Minor Changes
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _templateObject, _templateObject2; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
13
- var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
13
+ var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Start of bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// In view mode of the bodied macro, we never want to show the extension label\n\t&.danger.", " > span > div > .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
14
14
  var dangerOverlayStyles = (0, _react.css)({
15
15
  opacity: 0.3,
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -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 = "202.2.0";
8
+ var version = exports.version = "202.3.0";
@@ -26,7 +26,7 @@ const extensionLabelStyles = css`
26
26
  display: inline;
27
27
  }
28
28
 
29
- // Bodied extension edit toggle styles
29
+ // Start of bodied extension edit toggle styles
30
30
  &.danger.${akEditorSelectedNodeClassName} > span > .extension-edit-toggle-container {
31
31
  opacity: 1;
32
32
  }
@@ -35,6 +35,18 @@ const extensionLabelStyles = css`
35
35
  opacity: 1;
36
36
  }
37
37
 
38
+ // In view mode of the bodied macro, we never want to show the extension label
39
+ &.danger.${akEditorSelectedNodeClassName} > span > div > .extension-label.always-hide-label {
40
+ opacity: 0;
41
+ }
42
+
43
+ &:not(.danger).${akEditorSelectedNodeClassName}
44
+ > span
45
+ > div
46
+ > .extension-label.always-hide-label {
47
+ opacity: 0;
48
+ }
49
+
38
50
  // .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled
39
51
  &:not(.danger).${akEditorSelectedNodeClassName}
40
52
  > span
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "202.2.0";
2
+ export const version = "202.3.0";
@@ -4,7 +4,7 @@ var _templateObject, _templateObject2;
4
4
  import { css } from '@emotion/react';
5
5
  import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
6
6
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
7
- var extensionLabelStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
7
+ var extensionLabelStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Start of bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// In view mode of the bodied macro, we never want to show the extension label\n\t&.danger.", " > span > div > .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
8
8
  var dangerOverlayStyles = css({
9
9
  opacity: 0.3,
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "202.2.0";
2
+ export var version = "202.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "202.2.0",
3
+ "version": "202.3.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/analytics-next": "^10.1.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.3.0",
46
- "@atlaskit/editor-common": "^95.2.0",
46
+ "@atlaskit/editor-common": "^95.6.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.21.0",
48
48
  "@atlaskit/editor-plugin-quick-insert": "1.7.1",
49
49
  "@atlaskit/editor-plugins": "^5.6.0",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^3.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/link-provider": "^1.16.0",
75
+ "@atlaskit/link-provider": "^1.17.0",
76
76
  "@atlaskit/media-core": "^34.3.0",
77
77
  "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
78
78
  "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
@@ -83,19 +83,19 @@
83
83
  "@af/visual-regression": "*",
84
84
  "@atlaskit/adf-utils": "^19.13.0",
85
85
  "@atlaskit/analytics-listeners": "^8.11.0",
86
- "@atlaskit/collab-provider": "10.0.0",
87
- "@atlaskit/editor-plugin-annotation": "1.24.1",
86
+ "@atlaskit/collab-provider": "10.1.0",
87
+ "@atlaskit/editor-plugin-annotation": "1.25.0",
88
88
  "@atlaskit/editor-plugin-card": "^4.4.0",
89
89
  "@atlaskit/editor-plugin-list": "^3.9.0",
90
90
  "@atlaskit/editor-plugin-paste": "^2.0.0",
91
- "@atlaskit/link-provider": "^1.16.0",
91
+ "@atlaskit/link-provider": "^1.17.0",
92
92
  "@atlaskit/logo": "^14.3.0",
93
93
  "@atlaskit/media-core": "^34.3.0",
94
94
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
95
95
  "@atlaskit/media-test-helpers": "^34.6.0",
96
96
  "@atlaskit/modal-dialog": "^12.17.0",
97
97
  "@atlaskit/primitives": "^13.2.0",
98
- "@atlaskit/renderer": "^112.5.0",
98
+ "@atlaskit/renderer": "^112.6.0",
99
99
  "@atlaskit/smart-card": "^30.3.0",
100
100
  "@atlaskit/synchrony-test-helpers": "^2.5.0",
101
101
  "@atlaskit/toggle": "^13.4.0",
@@ -103,7 +103,7 @@
103
103
  "@atlaskit/visual-regression": "*",
104
104
  "@atlassian/adf-schema-json": "^1.22.0",
105
105
  "@atlassian/feature-flags-test-utils": "*",
106
- "@atlassian/search-provider": "2.4.171",
106
+ "@atlassian/search-provider": "2.4.172",
107
107
  "@emotion/jest": "^11.8.0",
108
108
  "@storybook/addon-knobs": "^6.4.0",
109
109
  "@testing-library/react": "^12.1.5",