@atlaskit/editor-core 215.20.0 → 215.20.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
+ ## 215.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`63c5e344d169c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/63c5e344d169c) -
8
+ Reduce the VC impact of the editor toolbar
9
+ - Updated dependencies
10
+
3
11
  ## 215.20.0
4
12
 
5
13
  ### Minor Changes
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-core",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../jira/tsDist/@atlaskit__editor-core/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -5,7 +5,8 @@
5
5
  "target": "es5",
6
6
  "outDir": "../../../../../tsDist/@atlaskit__editor-core/app",
7
7
  "rootDir": "../",
8
- "composite": true
8
+ "composite": true,
9
+ "noCheck": true
9
10
  },
10
11
  "include": [
11
12
  "../src/**/*.ts",
@@ -122,10 +122,6 @@ var tableFullPageEditorStylesNew = (0, _react2.css)({
122
122
  width: '100%'
123
123
  }
124
124
  });
125
- var scrollGutter = (0, _react2.css)({
126
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
127
- display: 'none'
128
- });
129
125
  var editorContentAreaContainerNestedDndStyle = (0, _react2.css)({
130
126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
131
127
  '.fabric-editor--full-width-mode': {
@@ -217,13 +213,14 @@ var contentAreaHeightNoToolbar = (0, _react2.css)({
217
213
  var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
218
214
  var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
219
215
  var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
220
- var _contentAreaRef$curre;
216
+ var _props$editorAPI, _contentAreaRef$curre, _allowScrollGutter$gu;
221
217
  var theme = (0, _react2.useTheme)();
222
218
  var fullWidthMode = props.appearance === 'full-width';
223
219
  var maxWidthMode = props.appearance === 'max';
224
220
  var scrollContainerRef = (0, _react.useRef)(null);
225
221
  var contentAreaRef = (0, _react.useRef)(null);
226
222
  var containerRef = (0, _react.useRef)(null);
223
+ var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
227
224
  (0, _react.useImperativeHandle)(ref, function () {
228
225
  return {
229
226
  get scrollContainer() {
@@ -304,9 +301,11 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
304
301
  containerElement: scrollContainerRef.current,
305
302
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
306
303
  wrapperElement: props.wrapperElement
307
- }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.after) : null, (0, _expVal.expVal)('platform_editor_hydratable_ui', 'isEnabled', false) && (0, _react2.jsx)("div", {
304
+ }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.after) : null, (0, _expVal.expVal)('platform_editor_scroll_gutter_fix', 'isEnabled', false) && allowScrollGutter && (0, _react2.jsx)("div", {
308
305
  id: "editor-scroll-gutter",
309
- css: scrollGutter,
306
+ style: {
307
+ paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
308
+ },
310
309
  "data-vc": "scroll-gutter"
311
310
  })))))), (0, _react2.jsx)("div", {
312
311
  css: _StyledComponents.sidebarArea
@@ -6,10 +6,12 @@
6
6
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
7
7
  ._1bahesu3{justify-content:flex-end}
8
8
  ._1e0c1txw{display:flex}
9
+ ._1f38ptqj{container-name:toolbar-container}
9
10
  ._1pby16oo{z-index:510}
10
11
  ._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
11
12
  ._2hwxpxbi{margin-right:var(--ds-space-200,1pc)}
12
13
  ._4cvr1h6o{align-items:center}
13
14
  ._4t3izwfg{height:2pc}
15
+ ._7cca15wb{container-type:inline-size}
14
16
  ._kqswh2mm{position:relative}
15
17
  ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -29,6 +29,7 @@ var styles = {
29
29
  mainToolbarWithKeyline: "_16qs1nax",
30
30
  customToolbarWrapperStyle: "_4cvr1h6o _1e0c1txw",
31
31
  firstChildWrapperOneLine: "_1e0c1txw _16jlkb7n",
32
+ firstChildWrapperContainerContext: "_7cca15wb _1f38ptqj",
32
33
  secondChildWrapperOneLine: "_1e0c1txw _1ul91ns9 _4cvr1h6o",
33
34
  beforePrimaryToolbarComponents: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
34
35
  };
@@ -45,7 +46,7 @@ var FirstChildWrapper = function FirstChildWrapper(_ref2) {
45
46
  var children = _ref2.children;
46
47
  return /*#__PURE__*/_react.default.createElement("div", {
47
48
  "data-testid": "main-toolbar-first-child-wrapper",
48
- className: (0, _runtime.ax)([styles.firstChildWrapperOneLine])
49
+ className: (0, _runtime.ax)([styles.firstChildWrapperOneLine, (0, _expValEquals.expValEquals)('platform_editor_reduce_toolbar_vc_impact', 'isEnabled', true) && styles.firstChildWrapperContainerContext])
49
50
  }, children);
50
51
  };
51
52
  var SecondChildWrapper = function SecondChildWrapper(_ref3) {
@@ -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 = "215.19.1";
8
+ var version = exports.version = "215.20.0";
@@ -113,10 +113,6 @@ const tableFullPageEditorStylesNew = css({
113
113
  width: '100%'
114
114
  }
115
115
  });
116
- const scrollGutter = css({
117
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
118
- display: 'none'
119
- });
120
116
  const editorContentAreaContainerNestedDndStyle = css({
121
117
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
122
118
  '.fabric-editor--full-width-mode': {
@@ -211,13 +207,14 @@ const contentAreaHeightNoToolbar = css({
211
207
  export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
212
208
  export const EDITOR_CONTAINER = 'ak-editor-container';
213
209
  const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
214
- var _contentAreaRef$curre;
210
+ var _props$editorAPI, _props$editorAPI$base, _props$editorAPI$base2, _contentAreaRef$curre, _allowScrollGutter$gu;
215
211
  const theme = useTheme();
216
212
  const fullWidthMode = props.appearance === 'full-width';
217
213
  const maxWidthMode = props.appearance === 'max';
218
214
  const scrollContainerRef = useRef(null);
219
215
  const contentAreaRef = useRef(null);
220
216
  const containerRef = useRef(null);
217
+ const allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 ? void 0 : (_props$editorAPI$base = _props$editorAPI.base) === null || _props$editorAPI$base === void 0 ? void 0 : (_props$editorAPI$base2 = _props$editorAPI$base.sharedState.currentState()) === null || _props$editorAPI$base2 === void 0 ? void 0 : _props$editorAPI$base2.allowScrollGutter;
221
218
  useImperativeHandle(ref, () => ({
222
219
  get scrollContainer() {
223
220
  return scrollContainerRef.current;
@@ -298,9 +295,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
298
295
  containerElement: scrollContainerRef.current,
299
296
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
300
297
  wrapperElement: props.wrapperElement
301
- }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, expVal('platform_editor_hydratable_ui', 'isEnabled', false) && jsx("div", {
298
+ }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, expVal('platform_editor_scroll_gutter_fix', 'isEnabled', false) && allowScrollGutter && jsx("div", {
302
299
  id: "editor-scroll-gutter",
303
- css: scrollGutter,
300
+ style: {
301
+ paddingBottom: `${(_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120'}px`
302
+ },
304
303
  "data-vc": "scroll-gutter"
305
304
  })))))), jsx("div", {
306
305
  css: sidebarArea
@@ -6,10 +6,12 @@
6
6
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
7
7
  ._1bahesu3{justify-content:flex-end}
8
8
  ._1e0c1txw{display:flex}
9
+ ._1f38ptqj{container-name:toolbar-container}
9
10
  ._1pby16oo{z-index:510}
10
11
  ._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
11
12
  ._2hwxpxbi{margin-right:var(--ds-space-200,1pc)}
12
13
  ._4cvr1h6o{align-items:center}
13
14
  ._4t3izwfg{height:2pc}
15
+ ._7cca15wb{container-type:inline-size}
14
16
  ._kqswh2mm{position:relative}
15
17
  ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -21,6 +21,7 @@ const styles = {
21
21
  mainToolbarWithKeyline: "_16qs1nax",
22
22
  customToolbarWrapperStyle: "_4cvr1h6o _1e0c1txw",
23
23
  firstChildWrapperOneLine: "_1e0c1txw _16jlkb7n",
24
+ firstChildWrapperContainerContext: "_7cca15wb _1f38ptqj",
24
25
  secondChildWrapperOneLine: "_1e0c1txw _1ul91ns9 _4cvr1h6o",
25
26
  beforePrimaryToolbarComponents: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
26
27
  };
@@ -39,7 +40,7 @@ const FirstChildWrapper = ({
39
40
  }) => {
40
41
  return /*#__PURE__*/React.createElement("div", {
41
42
  "data-testid": "main-toolbar-first-child-wrapper",
42
- className: ax([styles.firstChildWrapperOneLine])
43
+ className: ax([styles.firstChildWrapperOneLine, expValEquals('platform_editor_reduce_toolbar_vc_impact', 'isEnabled', true) && styles.firstChildWrapperContainerContext])
43
44
  }, children);
44
45
  };
45
46
  const SecondChildWrapper = ({
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "215.19.1";
2
+ export const version = "215.20.0";
@@ -112,10 +112,6 @@ var tableFullPageEditorStylesNew = css({
112
112
  width: '100%'
113
113
  }
114
114
  });
115
- var scrollGutter = css({
116
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
117
- display: 'none'
118
- });
119
115
  var editorContentAreaContainerNestedDndStyle = css({
120
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
121
117
  '.fabric-editor--full-width-mode': {
@@ -207,13 +203,14 @@ var contentAreaHeightNoToolbar = css({
207
203
  export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
208
204
  export var EDITOR_CONTAINER = 'ak-editor-container';
209
205
  var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
210
- var _contentAreaRef$curre;
206
+ var _props$editorAPI, _contentAreaRef$curre, _allowScrollGutter$gu;
211
207
  var theme = useTheme();
212
208
  var fullWidthMode = props.appearance === 'full-width';
213
209
  var maxWidthMode = props.appearance === 'max';
214
210
  var scrollContainerRef = useRef(null);
215
211
  var contentAreaRef = useRef(null);
216
212
  var containerRef = useRef(null);
213
+ var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
217
214
  useImperativeHandle(ref, function () {
218
215
  return {
219
216
  get scrollContainer() {
@@ -294,9 +291,11 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
294
291
  containerElement: scrollContainerRef.current,
295
292
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
296
293
  wrapperElement: props.wrapperElement
297
- }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, expVal('platform_editor_hydratable_ui', 'isEnabled', false) && jsx("div", {
294
+ }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, expVal('platform_editor_scroll_gutter_fix', 'isEnabled', false) && allowScrollGutter && jsx("div", {
298
295
  id: "editor-scroll-gutter",
299
- css: scrollGutter,
296
+ style: {
297
+ paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
298
+ },
300
299
  "data-vc": "scroll-gutter"
301
300
  })))))), jsx("div", {
302
301
  css: sidebarArea
@@ -6,10 +6,12 @@
6
6
  ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
7
7
  ._1bahesu3{justify-content:flex-end}
8
8
  ._1e0c1txw{display:flex}
9
+ ._1f38ptqj{container-name:toolbar-container}
9
10
  ._1pby16oo{z-index:510}
10
11
  ._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
11
12
  ._2hwxpxbi{margin-right:var(--ds-space-200,1pc)}
12
13
  ._4cvr1h6o{align-items:center}
13
14
  ._4t3izwfg{height:2pc}
15
+ ._7cca15wb{container-type:inline-size}
14
16
  ._kqswh2mm{position:relative}
15
17
  ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -21,6 +21,7 @@ var styles = {
21
21
  mainToolbarWithKeyline: "_16qs1nax",
22
22
  customToolbarWrapperStyle: "_4cvr1h6o _1e0c1txw",
23
23
  firstChildWrapperOneLine: "_1e0c1txw _16jlkb7n",
24
+ firstChildWrapperContainerContext: "_7cca15wb _1f38ptqj",
24
25
  secondChildWrapperOneLine: "_1e0c1txw _1ul91ns9 _4cvr1h6o",
25
26
  beforePrimaryToolbarComponents: "_1e0c1txw _16jlkb7n _1bahesu3 _4cvr1h6o"
26
27
  };
@@ -37,7 +38,7 @@ var FirstChildWrapper = function FirstChildWrapper(_ref2) {
37
38
  var children = _ref2.children;
38
39
  return /*#__PURE__*/React.createElement("div", {
39
40
  "data-testid": "main-toolbar-first-child-wrapper",
40
- className: ax([styles.firstChildWrapperOneLine])
41
+ className: ax([styles.firstChildWrapperOneLine, expValEquals('platform_editor_reduce_toolbar_vc_impact', 'isEnabled', true) && styles.firstChildWrapperContainerContext])
41
42
  }, children);
42
43
  };
43
44
  var SecondChildWrapper = function SecondChildWrapper(_ref3) {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "215.19.1";
2
+ export var version = "215.20.0";
@@ -9,6 +9,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
9
9
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
10
10
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
11
11
  import type { EditorAppearance, EditorContentMode, FeatureFlags, OptionalPlugin, PublicPluginAPI, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
12
+ import { type BasePlugin } from '@atlaskit/editor-plugins/base';
12
13
  import { type ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
13
14
  import { type ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
14
15
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -24,7 +25,7 @@ interface FullPageEditorContentAreaProps {
24
25
  disabled: boolean | undefined;
25
26
  dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
26
27
  editorActions: EditorActions | undefined;
27
- editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
28
+ editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>, BasePlugin]> | undefined;
28
29
  editorDOMElement: ReactElement;
29
30
  editorView: EditorView;
30
31
  eventDispatcher: EventDispatcher | undefined;
@@ -9,6 +9,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
9
9
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
10
10
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
11
11
  import type { EditorAppearance, EditorContentMode, FeatureFlags, OptionalPlugin, PublicPluginAPI, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
12
+ import { type BasePlugin } from '@atlaskit/editor-plugins/base';
12
13
  import { type ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
13
14
  import { type ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
14
15
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -25,7 +26,8 @@ interface FullPageEditorContentAreaProps {
25
26
  dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
26
27
  editorActions: EditorActions | undefined;
27
28
  editorAPI: PublicPluginAPI<[
28
- OptionalPlugin<ContextPanelPlugin>
29
+ OptionalPlugin<ContextPanelPlugin>,
30
+ BasePlugin
29
31
  ]> | undefined;
30
32
  editorDOMElement: ReactElement;
31
33
  editorView: EditorView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "215.20.0",
3
+ "version": "215.20.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -65,7 +65,7 @@
65
65
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
66
66
  "@atlaskit/react-ufo": "^4.15.0",
67
67
  "@atlaskit/task-decision": "^19.2.0",
68
- "@atlaskit/tmp-editor-statsig": "^15.2.0",
68
+ "@atlaskit/tmp-editor-statsig": "^15.6.0",
69
69
  "@atlaskit/tokens": "^8.4.0",
70
70
  "@atlaskit/tooltip": "^20.11.0",
71
71
  "@atlaskit/width-detector": "^5.0.0",
@@ -94,7 +94,7 @@
94
94
  "@af/visual-regression": "workspace:^",
95
95
  "@atlaskit/adf-utils": "^19.26.0",
96
96
  "@atlaskit/analytics-listeners": "^9.1.0",
97
- "@atlaskit/collab-provider": "^14.1.0",
97
+ "@atlaskit/collab-provider": "^14.2.0",
98
98
  "@atlaskit/editor-plugin-annotation": "^6.3.0",
99
99
  "@atlaskit/editor-plugin-card": "^11.5.0",
100
100
  "@atlaskit/editor-plugin-list": "^8.2.0",