@atlaskit/editor-core 197.13.0 → 197.13.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,22 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 197.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#145765](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145765)
8
+ [`eded181672815`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eded181672815) -
9
+ [ED-23481] Clean up `platform.editor.mentions-in-editor-popup-on-click`
10
+ - Updated dependencies
11
+
12
+ ## 197.13.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#145587](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145587)
17
+ [`fc390fa3a6b2a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fc390fa3a6b2a) -
18
+ [ux] Fix Editor toolbar overflow issue for new icons on small screen
19
+
3
20
  ## 197.13.0
4
21
 
5
22
  ### Minor Changes
@@ -13,6 +13,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _react2 = require("@emotion/react");
15
15
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _templateObject, _templateObject2, _templateObject3;
17
18
  /**
18
19
  * @jsxRuntime classic
@@ -23,11 +24,13 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
23
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
25
  var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
25
26
 
27
+ /* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
26
28
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
27
29
  var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
28
30
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
29
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
31
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n\n\t", "\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "), (0, _platformFeatureFlags.fg)('platform.design-system-team.enable-new-icons') && 'span svg { max-width: 100%; }');
30
32
  };
33
+ /* eslint-enable @atlaskit/platform/ensure-feature-flag-registration */
31
34
 
32
35
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
33
36
  var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t/* stylelint-disable declaration-block-no-duplicate-properties */\n\tposition: relative;\n\tposition: sticky;\n\t/* stylelint-enable declaration-block-no-duplicate-properties */\n\tpadding-bottom: ", ";\n\tz-index: ", ";\n\ttransition: box-shadow ease-in-out 0.2s;\n\t&.show-keyline {\n\t\tbox-shadow: 0 ", "px 0 0\n\t\t\t", ";\n\t}\n"])), "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorMenuZIndex, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
@@ -27,6 +27,12 @@ var mainToolbarTwoLineStyle = function mainToolbarTwoLineStyle() {
27
27
  height: "calc(".concat(editorToolbarHeight, " * 2)")
28
28
  }));
29
29
  };
30
+ var flexibleIconSize = (0, _react.css)({
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
32
+ '& span svg': {
33
+ maxWidth: '100%'
34
+ }
35
+ });
30
36
  var mainToolbar = function mainToolbar() {
31
37
  var editorToolbarHeight = (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)();
32
38
  return (0, _react.css)((0, _defineProperty2.default)({
@@ -53,7 +59,9 @@ var mainToolbar = function mainToolbar() {
53
59
  display: 'grid',
54
60
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
55
61
  height: "calc(".concat(editorToolbarHeight, " * 2)")
56
- }));
62
+ }),
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/ui-styling-standard/no-unsafe-values
64
+ (0, _platformFeatureFlags.fg)('platform.design-system-team.enable-new-icons') && flexibleIconSize);
57
65
  };
58
66
  var mainToolbarStyle = exports.mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
59
67
  return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
@@ -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 = "197.13.0";
8
+ var version = exports.version = "197.13.2";
@@ -9,8 +9,10 @@ import React, { useEffect, useState } from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
13
14
 
15
+ /* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
14
16
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
15
17
  const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false) => css`
16
18
  position: relative;
@@ -50,7 +52,10 @@ const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false) => css`
50
52
  .block-type-btn {
51
53
  padding-left: 0;
52
54
  }
55
+
56
+ ${fg('platform.design-system-team.enable-new-icons') && 'span svg { max-width: 100%; }'}
53
57
  `;
58
+ /* eslint-enable @atlaskit/platform/ensure-feature-flag-registration */
54
59
 
55
60
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
56
61
  const stickyToolbarWrapperStyle = css`
@@ -22,6 +22,12 @@ const mainToolbarTwoLineStyle = () => {
22
22
  }
23
23
  });
24
24
  };
25
+ const flexibleIconSize = css({
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
27
+ '& span svg': {
28
+ maxWidth: '100%'
29
+ }
30
+ });
25
31
  const mainToolbar = () => {
26
32
  const editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
27
33
  return css({
@@ -50,7 +56,9 @@ const mainToolbar = () => {
50
56
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
51
57
  height: `calc(${editorToolbarHeight} * 2)`
52
58
  }
53
- });
59
+ },
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/ui-styling-standard/no-unsafe-values
61
+ fg('platform.design-system-team.enable-new-icons') && flexibleIconSize);
54
62
  };
55
63
  export const mainToolbarStyle = (showKeyline, twoLineEditorToolbar) => [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
56
64
 
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "197.13.0";
2
+ export const version = "197.13.2";
@@ -13,13 +13,16 @@ import React, { useEffect, useState } from 'react';
13
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
14
  import { css, jsx } from '@emotion/react';
15
15
  import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
16
17
  var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
17
18
 
19
+ /* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
18
20
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
19
21
  var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
20
22
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
23
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n\n\t", "\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "), fg('platform.design-system-team.enable-new-icons') && 'span svg { max-width: 100%; }');
22
24
  };
25
+ /* eslint-enable @atlaskit/platform/ensure-feature-flag-registration */
23
26
 
24
27
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
25
28
  var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t/* stylelint-disable declaration-block-no-duplicate-properties */\n\tposition: relative;\n\tposition: sticky;\n\t/* stylelint-enable declaration-block-no-duplicate-properties */\n\tpadding-bottom: ", ";\n\tz-index: ", ";\n\ttransition: box-shadow ease-in-out 0.2s;\n\t&.show-keyline {\n\t\tbox-shadow: 0 ", "px 0 0\n\t\t\t", ";\n\t}\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
@@ -19,6 +19,12 @@ var mainToolbarTwoLineStyle = function mainToolbarTwoLineStyle() {
19
19
  height: "calc(".concat(editorToolbarHeight, " * 2)")
20
20
  }));
21
21
  };
22
+ var flexibleIconSize = css({
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
+ '& span svg': {
25
+ maxWidth: '100%'
26
+ }
27
+ });
22
28
  var mainToolbar = function mainToolbar() {
23
29
  var editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
24
30
  return css(_defineProperty({
@@ -45,7 +51,9 @@ var mainToolbar = function mainToolbar() {
45
51
  display: 'grid',
46
52
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
53
  height: "calc(".concat(editorToolbarHeight, " * 2)")
48
- }));
54
+ }),
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/platform/ensure-feature-flag-registration, @atlaskit/ui-styling-standard/no-unsafe-values
56
+ fg('platform.design-system-team.enable-new-icons') && flexibleIconSize);
49
57
  };
50
58
  export var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
51
59
  return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "197.13.0";
2
+ export var version = "197.13.2";
package/docs/0-intro.tsx CHANGED
@@ -34,6 +34,7 @@ ${(<AtlassianInternalWarning />)}
34
34
  ## Usage
35
35
 
36
36
  ### [Legacy Editor](editor-core/docs/legacy-editor)
37
+ Note: The legacy editor is deprecated. There is an example to help with migration at https://atlaskit.atlassian.com/examples/editor/editor-core/legacy-editor-migrator
37
38
 
38
39
 
39
40
  ### Composable Editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "197.13.0",
3
+ "version": "197.13.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/button": "^20.2.0",
46
46
  "@atlaskit/editor-common": "^91.1.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.18.0",
48
- "@atlaskit/editor-plugin-quick-insert": "1.4.2",
48
+ "@atlaskit/editor-plugin-quick-insert": "1.4.3",
49
49
  "@atlaskit/editor-plugins": "^5.3.0",
50
50
  "@atlaskit/editor-prosemirror": "6.0.0",
51
51
  "@atlaskit/editor-shared-styles": "^3.0.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/task-decision": "^17.11.0",
58
58
  "@atlaskit/tmp-editor-statsig": "*",
59
- "@atlaskit/tokens": "^1.61.0",
59
+ "@atlaskit/tokens": "^2.0.0",
60
60
  "@atlaskit/tooltip": "^18.7.0",
61
61
  "@atlaskit/width-detector": "^4.3.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -79,7 +79,7 @@
79
79
  "react-intl-next": "npm:react-intl@^5.18.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@af/editor-examples-helpers": "0.3.13",
82
+ "@af/editor-examples-helpers": "0.3.14",
83
83
  "@af/editor-libra": "*",
84
84
  "@af/visual-regression": "*",
85
85
  "@atlaskit/adf-utils": "^19.8.0",
@@ -98,7 +98,7 @@
98
98
  "@atlaskit/modal-dialog": "^12.17.0",
99
99
  "@atlaskit/primitives": "^12.2.0",
100
100
  "@atlaskit/renderer": "^110.5.0",
101
- "@atlaskit/smart-card": "^28.2.0",
101
+ "@atlaskit/smart-card": "^28.3.0",
102
102
  "@atlaskit/synchrony-test-helpers": "^2.5.0",
103
103
  "@atlaskit/toggle": "^13.4.0",
104
104
  "@atlaskit/util-data-test": "^17.9.0",
@@ -211,10 +211,6 @@
211
211
  "platform.confluence.frontend.narrow-full-page-editor-toolbar": {
212
212
  "type": "boolean"
213
213
  },
214
- "platform.editor.mentions-in-editor-popup-on-click": {
215
- "type": "boolean",
216
- "referenceOnly": "true"
217
- },
218
214
  "platform.editor.core.increase-full-page-guttering": {
219
215
  "type": "boolean"
220
216
  },