@atlaskit/editor-core 219.9.4 → 219.9.6

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
  3. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  4. package/dist/cjs/ui/ContextPanel/index-compiled.compiled.css +15 -0
  5. package/dist/cjs/ui/ContextPanel/index-compiled.js +66 -0
  6. package/dist/cjs/ui/ContextPanel/index-emotion.js +94 -0
  7. package/dist/cjs/ui/ContextPanel/index.js +29 -56
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
  10. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  11. package/dist/es2019/ui/ContextPanel/index-compiled.compiled.css +15 -0
  12. package/dist/es2019/ui/ContextPanel/index-compiled.js +53 -0
  13. package/dist/es2019/ui/ContextPanel/index-emotion.js +82 -0
  14. package/dist/es2019/ui/ContextPanel/index.js +24 -58
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
  17. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +9 -1
  18. package/dist/esm/ui/ContextPanel/index-compiled.compiled.css +15 -0
  19. package/dist/esm/ui/ContextPanel/index-compiled.js +58 -0
  20. package/dist/esm/ui/ContextPanel/index-emotion.js +87 -0
  21. package/dist/esm/ui/ContextPanel/index.js +28 -58
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/ui/ContextPanel/index-compiled.d.ts +25 -0
  24. package/dist/types/ui/ContextPanel/index-emotion.d.ts +15 -0
  25. package/dist/types/ui/ContextPanel/index.d.ts +1 -9
  26. package/dist/types-ts4.5/ui/ContextPanel/index-compiled.d.ts +25 -0
  27. package/dist/types-ts4.5/ui/ContextPanel/index-emotion.d.ts +15 -0
  28. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -9
  29. package/package.json +7 -6
@@ -1,54 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  /* eslint-disable jsdoc/require-jsdoc -- Pre-existing lint debt surfaced by this mechanical type-import-only PR. */
4
- /**
5
- * @jsxRuntime classic
6
- * @jsx jsx
7
- */
8
4
  import React from 'react';
9
-
10
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
11
- import { css, jsx } from '@emotion/react';
12
5
  import { injectIntl } from 'react-intl';
13
6
  import Transition from 'react-transition-group/Transition';
14
7
  import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
15
8
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
16
9
  import { contextPanelMessages } from '@atlaskit/editor-common/messages';
17
- import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
10
+ import { akEditorContextPanelWidth } from '@atlaskit/editor-shared-styles';
18
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
19
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
+ import { ContextPanelContentCompiled, ContextPanelWrapperCompiled } from './index-compiled';
15
+ import { ContextPanelContentEmotion, ContextPanelWrapperEmotion } from './index-emotion';
20
16
  const ANIM_SPEED_MS = 500;
21
- const panelHidden = css({
22
- width: 0
23
- });
24
-
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
- export const panel = css({
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
- width: `${akEditorContextPanelWidth}px`,
29
- height: '100%',
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
- transition: `width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier}`,
32
- overflow: 'hidden',
33
- boxShadow: `inset 2px 0 0 0 ${"var(--ds-border, #0B120E24)"}`
34
- });
35
- const disablePanelAnimation = css({
36
- transition: 'none'
37
- });
38
-
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
40
- export const content = css({
41
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
42
- transition: `width 600ms ${akEditorSwoopCubicBezier}`,
43
- boxSizing: 'border-box',
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
- width: `${akEditorContextPanelWidth}px`,
46
- height: '100%',
47
- overflowY: 'auto'
48
- });
49
- const paddingStyles = css({
50
- padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`
51
- });
17
+ const ContextPanelWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), ContextPanelWrapperCompiled, ContextPanelWrapperEmotion);
18
+ const ContextPanelContentMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), ContextPanelContentCompiled, ContextPanelContentEmotion);
52
19
  // Ignored via go/ees005
53
20
  // eslint-disable-next-line @repo/internal/react/no-class-components
54
21
  class SwappableContentAreaInner extends React.PureComponent {
@@ -82,7 +49,7 @@ class SwappableContentAreaInner extends React.PureComponent {
82
49
  }
83
50
  const animSpeedMs = fg('platform_editor_disable_context_panel_animation') ? 0 : ANIM_SPEED_MS;
84
51
  const onExited = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? this.handleTransitionExited : () => this.unsetPluginContent();
85
- return jsx(Transition, {
52
+ return /*#__PURE__*/React.createElement(Transition, {
86
53
  timeout: this.state.mounted ? animSpeedMs : 0,
87
54
  in: !!pluginContent,
88
55
  mountOnEnter: true,
@@ -98,7 +65,7 @@ class SwappableContentAreaInner extends React.PureComponent {
98
65
  return;
99
66
  }
100
67
  const animSpeedMs = fg('platform_editor_disable_context_panel_animation') ? 0 : ANIM_SPEED_MS;
101
- return jsx(Transition, {
68
+ return /*#__PURE__*/React.createElement(Transition, {
102
69
  timeout: this.state.mounted ? animSpeedMs : 0,
103
70
  in: isVisible,
104
71
  mountOnEnter: true,
@@ -133,35 +100,34 @@ class SwappableContentAreaInner extends React.PureComponent {
133
100
  const userVisible = !!this.props.visible;
134
101
  const visible = userVisible || !!this.state.currentPluginContent;
135
102
  const hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
136
- const customPanelWidthStyles = css({
137
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
138
- width: `${this.props.customWidth}px`,
139
- overflowX: 'hidden'
140
- });
141
- return jsx(ContextPanelConsumer, null, ({
103
+ const disableAnimation = fg('platform_editor_disable_context_panel_animation');
104
+ return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
142
105
  broadcastWidth
143
106
  }) => {
144
107
  var _this$props$intl, _this$props$intl2;
145
108
  const contextPanelWidth = visible ? width : 0;
146
109
  broadcastWidth(contextPanelWidth);
147
- return jsx("div", {
148
- css: [panel,
149
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
150
- this.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
151
- "data-testid": "context-panel-panel",
110
+ return /*#__PURE__*/React.createElement(ContextPanelWrapperMigration, {
111
+ customWidth: this.props.customWidth,
112
+ visible: visible,
113
+ disableAnimation: disableAnimation,
114
+ "data-testid": "context-panel-panel"
115
+ // eslint-disable-next-line @atlassian/a11y/no-empty-aria-label -- Pre-existing; intl should always resolve a label here
116
+ ,
152
117
  "aria-label": ((_this$props$intl = this.props.intl) === null || _this$props$intl === void 0 ? void 0 : _this$props$intl.formatMessage(contextPanelMessages.panelLabel)) || '',
153
118
  "aria-modal": "false",
154
119
  role: "dialog"
155
- }, jsx("div", {
120
+ }, /*#__PURE__*/React.createElement(ContextPanelContentMigration, {
121
+ customWidth: this.props.customWidth,
122
+ visible: visible,
123
+ disableAnimation: disableAnimation,
124
+ hasPadding: hasPadding,
156
125
  "data-testid": "context-panel-content"
157
126
  // Adding tabIndex=0 here to make content focusable as it is a scrollable region
158
127
  ,
159
128
  tabIndex: fg('platform_editor_nov_a11y_fixes') ? 0 : undefined,
160
129
  role: fg('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
161
- "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this$props$intl2 = this.props.intl) === null || _this$props$intl2 === void 0 ? void 0 : _this$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined,
162
- css: [content, hasPadding && paddingStyles,
163
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
164
- this.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
130
+ "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this$props$intl2 = this.props.intl) === null || _this$props$intl2 === void 0 ? void 0 : _this$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined
165
131
  }, this.showPluginContent() || this.showProvidedContent(userVisible)));
166
132
  });
167
133
  }
@@ -175,7 +141,7 @@ export function ContextPanel(props) {
175
141
  return states === null || states === void 0 ? void 0 : (_states$contextPanelS = states.contextPanelState) === null || _states$contextPanelS === void 0 ? void 0 : _states$contextPanelS.contents;
176
142
  });
177
143
  const firstContent = contextPanelContents && contextPanelContents.find(Boolean);
178
- return jsx(SwappableContentArea
144
+ return /*#__PURE__*/React.createElement(SwappableContentArea
179
145
  // Ignored via go/ees005
180
146
  // eslint-disable-next-line react/jsx-props-no-spreading
181
147
  , _extends({}, props, {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "219.9.3";
2
+ export const version = "219.9.5";
@@ -14,6 +14,7 @@ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
14
14
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
15
15
  import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
18
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
19
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
19
20
  import { FullPageContentArea } from './FullPageContentArea';
@@ -160,7 +161,7 @@ export var FullPageEditor = function FullPageEditor(props) {
160
161
  FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
161
162
  }
162
163
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? jsx(FullPageToolbarNext, {
163
- disabled: !!props.disabled,
164
+ disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
164
165
  toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
165
166
  beforeIcon: props.primaryToolbarIconBefore,
166
167
  editorAPI: editorAPI,
@@ -132,7 +132,15 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
132
132
  showKeyline: showKeyline || ContextPanelWidth > 0
133
133
  }, beforeIcon && /*#__PURE__*/React.createElement("div", {
134
134
  className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
135
- }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
135
+ }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
136
+ toolbar: toolbar,
137
+ components: visibleToolbarComponents,
138
+ editorView: editorView,
139
+ editorAPI: editorAPI,
140
+ popupsMountPoint: mountPoint,
141
+ editorAppearance: "full-page",
142
+ isDisabled: disabled
143
+ }) : /*#__PURE__*/React.createElement(ExcludeFromHydration, null, primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && editorView && !isSSR() && /*#__PURE__*/React.createElement(ToolbarNext, {
136
144
  toolbar: toolbar,
137
145
  components: visibleToolbarComponents,
138
146
  editorView: editorView,
@@ -0,0 +1,15 @@
1
+
2
+ ._v5648l2w{transition:width .5s cubic-bezier(.15,1,.3,1)}
3
+ ._v564e1q5{transition:width .6s cubic-bezier(.15,1,.3,1)}
4
+ ._v564glyw{transition:none}._16qshh4h{box-shadow:inset 2px 0 0 0 var(--ds-border,#0b120e24)}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
8
+ ._1bsbidpf{width:0}
9
+ ._1bsbnklw{width:20pc}
10
+ ._1reo15vq{overflow-x:hidden}
11
+ ._4t3i1osq{height:100%}
12
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
13
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
14
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
15
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,58 @@
1
+ /* index-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["children", "customWidth", "visible", "disableAnimation"],
5
+ _excluded2 = ["children", "customWidth", "visible", "disableAnimation", "hasPadding"];
6
+ import "./index-compiled.compiled.css";
7
+ import * as React from 'react';
8
+ import { ax, ix } from "@compiled/react/runtime";
9
+ /**
10
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
11
+ * Used via `componentWithCondition` in `index.tsx`.
12
+ *
13
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
14
+ */
15
+
16
+ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
17
+ var ANIM_SPEED_MS = 500;
18
+ var panelStyles = {
19
+ panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h",
20
+ panelHidden: "_1bsbidpf",
21
+ disablePanelAnimation: "_v564glyw",
22
+ content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug",
23
+ padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi",
24
+ customWidthOverflow: "_1reo15vq"
25
+ };
26
+ export var ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(_ref) {
27
+ var children = _ref.children,
28
+ customWidth = _ref.customWidth,
29
+ visible = _ref.visible,
30
+ disableAnimation = _ref.disableAnimation,
31
+ rest = _objectWithoutProperties(_ref, _excluded);
32
+ return /*#__PURE__*/React.createElement("div", _extends({
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
34
+ style: customWidth && visible ? {
35
+ width: "".concat(customWidth, "px")
36
+ } : undefined
37
+ // eslint-disable-next-line react/jsx-props-no-spreading
38
+ }, rest, {
39
+ className: ax([panelStyles.panel, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
40
+ }), children);
41
+ };
42
+ export var ContextPanelContentCompiled = function ContextPanelContentCompiled(_ref2) {
43
+ var children = _ref2.children,
44
+ customWidth = _ref2.customWidth,
45
+ visible = _ref2.visible,
46
+ disableAnimation = _ref2.disableAnimation,
47
+ hasPadding = _ref2.hasPadding,
48
+ rest = _objectWithoutProperties(_ref2, _excluded2);
49
+ return /*#__PURE__*/React.createElement("div", _extends({
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS
51
+ style: customWidth && visible ? {
52
+ width: "".concat(customWidth, "px")
53
+ } : undefined
54
+ // eslint-disable-next-line react/jsx-props-no-spreading
55
+ }, rest, {
56
+ className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation])
57
+ }), children);
58
+ };
@@ -0,0 +1,87 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["children", "customWidth", "visible", "disableAnimation"],
4
+ _excluded2 = ["children", "customWidth", "visible", "disableAnimation", "hasPadding"];
5
+ /**
6
+ * @jsxRuntime classic
7
+ * @jsx jsx
8
+ */
9
+ /**
10
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
11
+ * Used via `componentWithCondition` in `index.tsx`.
12
+ *
13
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
14
+ */
15
+ import { useMemo } from 'react';
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback for compiled migration
17
+ import { css, jsx } from '@emotion/react';
18
+ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
19
+ var ANIM_SPEED_MS = 500;
20
+ var panelHidden = css({
21
+ width: 0
22
+ });
23
+ var panel = css({
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
+ width: "".concat(akEditorContextPanelWidth, "px"),
26
+ height: '100%',
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
+ transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(akEditorSwoopCubicBezier),
29
+ overflow: 'hidden',
30
+ boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, #0B120E24)")
31
+ });
32
+ var disablePanelAnimation = css({
33
+ transition: 'none'
34
+ });
35
+ var content = css({
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
+ transition: "width 600ms ".concat(akEditorSwoopCubicBezier),
38
+ boxSizing: 'border-box',
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
+ width: "".concat(akEditorContextPanelWidth, "px"),
41
+ height: '100%',
42
+ overflowY: 'auto'
43
+ });
44
+ var paddingStyles = css({
45
+ padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
46
+ });
47
+ export var ContextPanelWrapperEmotion = function ContextPanelWrapperEmotion(_ref) {
48
+ var children = _ref.children,
49
+ customWidth = _ref.customWidth,
50
+ visible = _ref.visible,
51
+ disableAnimation = _ref.disableAnimation,
52
+ rest = _objectWithoutProperties(_ref, _excluded);
53
+ var customPanelWidthStyles = useMemo(function () {
54
+ return customWidth ? css({
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
56
+ width: "".concat(customWidth, "px"),
57
+ overflowX: 'hidden'
58
+ }) : undefined;
59
+ }, [customWidth]);
60
+ return jsx("div", _extends({
61
+ css: [panel,
62
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
63
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
64
+ // eslint-disable-next-line react/jsx-props-no-spreading
65
+ }, rest), children);
66
+ };
67
+ export var ContextPanelContentEmotion = function ContextPanelContentEmotion(_ref2) {
68
+ var children = _ref2.children,
69
+ customWidth = _ref2.customWidth,
70
+ visible = _ref2.visible,
71
+ disableAnimation = _ref2.disableAnimation,
72
+ hasPadding = _ref2.hasPadding,
73
+ rest = _objectWithoutProperties(_ref2, _excluded2);
74
+ var customPanelWidthStyles = useMemo(function () {
75
+ return customWidth ? css({
76
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
77
+ width: "".concat(customWidth, "px"),
78
+ overflowX: 'hidden'
79
+ }) : undefined;
80
+ }, [customWidth]);
81
+ return jsx("div", _extends({
82
+ css: [content, hasPadding && paddingStyles,
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
84
+ customPanelWidthStyles, !visible && panelHidden, disableAnimation && disablePanelAnimation]
85
+ // eslint-disable-next-line react/jsx-props-no-spreading
86
+ }, rest), children);
87
+ };
@@ -10,54 +10,25 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  /* eslint-disable jsdoc/require-jsdoc -- Pre-existing lint debt surfaced by this mechanical type-import-only PR. */
13
- /**
14
- * @jsxRuntime classic
15
- * @jsx jsx
16
- */
17
13
  import React from 'react';
18
-
19
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
20
- import { css, jsx } from '@emotion/react';
21
14
  import { injectIntl } from 'react-intl';
22
15
  import Transition from 'react-transition-group/Transition';
23
16
  import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
24
17
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
25
18
  import { contextPanelMessages } from '@atlaskit/editor-common/messages';
26
- import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
19
+ import { akEditorContextPanelWidth } from '@atlaskit/editor-shared-styles';
27
20
  import { fg } from '@atlaskit/platform-feature-flags';
21
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
28
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
+ import { ContextPanelContentCompiled, ContextPanelWrapperCompiled } from './index-compiled';
24
+ import { ContextPanelContentEmotion, ContextPanelWrapperEmotion } from './index-emotion';
29
25
  var ANIM_SPEED_MS = 500;
30
- var panelHidden = css({
31
- width: 0
32
- });
33
-
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
- export var panel = css({
36
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
- width: "".concat(akEditorContextPanelWidth, "px"),
38
- height: '100%',
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
- transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(akEditorSwoopCubicBezier),
41
- overflow: 'hidden',
42
- boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, #0B120E24)")
43
- });
44
- var disablePanelAnimation = css({
45
- transition: 'none'
46
- });
47
-
48
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
49
- export var content = css({
50
- // 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
- transition: "width 600ms ".concat(akEditorSwoopCubicBezier),
52
- boxSizing: 'border-box',
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
54
- width: "".concat(akEditorContextPanelWidth, "px"),
55
- height: '100%',
56
- overflowY: 'auto'
57
- });
58
- var paddingStyles = css({
59
- padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
60
- });
26
+ var ContextPanelWrapperMigration = componentWithCondition(function () {
27
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
28
+ }, ContextPanelWrapperCompiled, ContextPanelWrapperEmotion);
29
+ var ContextPanelContentMigration = componentWithCondition(function () {
30
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
31
+ }, ContextPanelContentCompiled, ContextPanelContentEmotion);
61
32
  // Ignored via go/ees005
62
33
  // eslint-disable-next-line @repo/internal/react/no-class-components
63
34
  var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
@@ -92,7 +63,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
92
63
  var onExited = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? _this.handleTransitionExited : function () {
93
64
  return _this.unsetPluginContent();
94
65
  };
95
- return jsx(Transition, {
66
+ return /*#__PURE__*/React.createElement(Transition, {
96
67
  timeout: _this.state.mounted ? animSpeedMs : 0,
97
68
  in: !!pluginContent,
98
69
  mountOnEnter: true,
@@ -106,7 +77,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
106
77
  return;
107
78
  }
108
79
  var animSpeedMs = fg('platform_editor_disable_context_panel_animation') ? 0 : ANIM_SPEED_MS;
109
- return jsx(Transition, {
80
+ return /*#__PURE__*/React.createElement(Transition, {
110
81
  timeout: _this.state.mounted ? animSpeedMs : 0,
111
82
  in: isVisible,
112
83
  mountOnEnter: true,
@@ -141,34 +112,33 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
141
112
  var userVisible = !!this.props.visible;
142
113
  var visible = userVisible || !!this.state.currentPluginContent;
143
114
  var hasPadding = this.props.hasPadding === undefined ? true : this.props.hasPadding;
144
- var customPanelWidthStyles = css({
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @repo/internal/react/no-class-components
146
- width: "".concat(this.props.customWidth, "px"),
147
- overflowX: 'hidden'
148
- });
149
- return jsx(ContextPanelConsumer, null, function (_ref) {
115
+ var disableAnimation = fg('platform_editor_disable_context_panel_animation');
116
+ return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref) {
150
117
  var _this2$props$intl, _this2$props$intl2;
151
118
  var broadcastWidth = _ref.broadcastWidth;
152
119
  var contextPanelWidth = visible ? width : 0;
153
120
  broadcastWidth(contextPanelWidth);
154
- return jsx("div", {
155
- css: [panel,
156
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
157
- _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation],
158
- "data-testid": "context-panel-panel",
121
+ return /*#__PURE__*/React.createElement(ContextPanelWrapperMigration, {
122
+ customWidth: _this2.props.customWidth,
123
+ visible: visible,
124
+ disableAnimation: disableAnimation,
125
+ "data-testid": "context-panel-panel"
126
+ // eslint-disable-next-line @atlassian/a11y/no-empty-aria-label -- Pre-existing; intl should always resolve a label here
127
+ ,
159
128
  "aria-label": ((_this2$props$intl = _this2.props.intl) === null || _this2$props$intl === void 0 ? void 0 : _this2$props$intl.formatMessage(contextPanelMessages.panelLabel)) || '',
160
129
  "aria-modal": "false",
161
130
  role: "dialog"
162
- }, jsx("div", {
131
+ }, /*#__PURE__*/React.createElement(ContextPanelContentMigration, {
132
+ customWidth: _this2.props.customWidth,
133
+ visible: visible,
134
+ disableAnimation: disableAnimation,
135
+ hasPadding: hasPadding,
163
136
  "data-testid": "context-panel-content"
164
137
  // Adding tabIndex=0 here to make content focusable as it is a scrollable region
165
138
  ,
166
139
  tabIndex: fg('platform_editor_nov_a11y_fixes') ? 0 : undefined,
167
140
  role: fg('platform_editor_nov_a11y_fixes') ? 'region' : undefined,
168
- "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined,
169
- css: [content, hasPadding && paddingStyles,
170
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
171
- _this2.props.customWidth && customPanelWidthStyles, !visible && panelHidden, fg('platform_editor_disable_context_panel_animation') && disablePanelAnimation]
141
+ "aria-label": fg('platform_editor_nov_a11y_fixes') ? (_this2$props$intl2 = _this2.props.intl) === null || _this2$props$intl2 === void 0 ? void 0 : _this2$props$intl2.formatMessage(contextPanelMessages.panelContentLabel) : undefined
172
142
  }, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
173
143
  });
174
144
  }
@@ -191,7 +161,7 @@ export function ContextPanel(props) {
191
161
  return states === null || states === void 0 || (_states$contextPanelS = states.contextPanelState) === null || _states$contextPanelS === void 0 ? void 0 : _states$contextPanelS.contents;
192
162
  });
193
163
  var firstContent = contextPanelContents && contextPanelContents.find(Boolean);
194
- return jsx(SwappableContentArea
164
+ return /*#__PURE__*/React.createElement(SwappableContentArea
195
165
  // Ignored via go/ees005
196
166
  // eslint-disable-next-line react/jsx-props-no-spreading
197
167
  , _extends({}, props, {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "219.9.3";
2
+ export var version = "219.9.5";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ * Compiled migration: platform_editor_core_non_ecc_static_css
5
+ */
6
+ /**
7
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
8
+ * Used via `componentWithCondition` in `index.tsx`.
9
+ *
10
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
11
+ */
12
+ import type { HTMLAttributes } from 'react';
13
+ export interface ContextPanelWrapperProps extends HTMLAttributes<HTMLDivElement> {
14
+ customWidth?: number;
15
+ disableAnimation: boolean;
16
+ visible: boolean;
17
+ }
18
+ export interface ContextPanelContentProps extends HTMLAttributes<HTMLDivElement> {
19
+ customWidth?: number;
20
+ disableAnimation: boolean;
21
+ hasPadding: boolean;
22
+ visible: boolean;
23
+ }
24
+ export declare const ContextPanelWrapperCompiled: ({ children, customWidth, visible, disableAnimation, ...rest }: ContextPanelWrapperProps) => React.JSX.Element;
25
+ export declare const ContextPanelContentCompiled: ({ children, customWidth, visible, disableAnimation, hasPadding, ...rest }: ContextPanelContentProps) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import { jsx } from '@emotion/react';
3
+ export interface ContextPanelWrapperProps extends HTMLAttributes<HTMLDivElement> {
4
+ customWidth?: number;
5
+ disableAnimation: boolean;
6
+ visible: boolean;
7
+ }
8
+ export interface ContextPanelContentProps extends HTMLAttributes<HTMLDivElement> {
9
+ customWidth?: number;
10
+ disableAnimation: boolean;
11
+ hasPadding: boolean;
12
+ visible: boolean;
13
+ }
14
+ export declare const ContextPanelWrapperEmotion: ({ children, customWidth, visible, disableAnimation, ...rest }: ContextPanelWrapperProps) => jsx.JSX.Element;
15
+ export declare const ContextPanelContentEmotion: ({ children, customWidth, visible, disableAnimation, hasPadding, ...rest }: ContextPanelContentProps) => jsx.JSX.Element;
@@ -1,10 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { SerializedStyles } from '@emotion/react';
8
2
  import type { IntlShape, WithIntlProps } from 'react-intl';
9
3
  import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
10
4
  import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
@@ -16,8 +10,6 @@ export type Props = {
16
10
  hasPadding?: boolean;
17
11
  visible: boolean;
18
12
  };
19
- export declare const panel: SerializedStyles;
20
- export declare const content: SerializedStyles;
21
13
  type SwappableContentAreaProps = {
22
14
  editorView?: EditorView;
23
15
  intl: IntlShape;
@@ -26,5 +18,5 @@ type SwappableContentAreaProps = {
26
18
  export declare const SwappableContentArea: React.FC<WithIntlProps<SwappableContentAreaProps>> & {
27
19
  WrappedComponent: React.ComponentType<SwappableContentAreaProps>;
28
20
  };
29
- export declare function ContextPanel(props: Props): jsx.JSX.Element;
21
+ export declare function ContextPanel(props: Props): React.JSX.Element;
30
22
  export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ * Compiled migration: platform_editor_core_non_ecc_static_css
5
+ */
6
+ /**
7
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
8
+ * Used via `componentWithCondition` in `index.tsx`.
9
+ *
10
+ * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped.
11
+ */
12
+ import type { HTMLAttributes } from 'react';
13
+ export interface ContextPanelWrapperProps extends HTMLAttributes<HTMLDivElement> {
14
+ customWidth?: number;
15
+ disableAnimation: boolean;
16
+ visible: boolean;
17
+ }
18
+ export interface ContextPanelContentProps extends HTMLAttributes<HTMLDivElement> {
19
+ customWidth?: number;
20
+ disableAnimation: boolean;
21
+ hasPadding: boolean;
22
+ visible: boolean;
23
+ }
24
+ export declare const ContextPanelWrapperCompiled: ({ children, customWidth, visible, disableAnimation, ...rest }: ContextPanelWrapperProps) => React.JSX.Element;
25
+ export declare const ContextPanelContentCompiled: ({ children, customWidth, visible, disableAnimation, hasPadding, ...rest }: ContextPanelContentProps) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import { jsx } from '@emotion/react';
3
+ export interface ContextPanelWrapperProps extends HTMLAttributes<HTMLDivElement> {
4
+ customWidth?: number;
5
+ disableAnimation: boolean;
6
+ visible: boolean;
7
+ }
8
+ export interface ContextPanelContentProps extends HTMLAttributes<HTMLDivElement> {
9
+ customWidth?: number;
10
+ disableAnimation: boolean;
11
+ hasPadding: boolean;
12
+ visible: boolean;
13
+ }
14
+ export declare const ContextPanelWrapperEmotion: ({ children, customWidth, visible, disableAnimation, ...rest }: ContextPanelWrapperProps) => jsx.JSX.Element;
15
+ export declare const ContextPanelContentEmotion: ({ children, customWidth, visible, disableAnimation, hasPadding, ...rest }: ContextPanelContentProps) => jsx.JSX.Element;
@@ -1,10 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { SerializedStyles } from '@emotion/react';
8
2
  import type { IntlShape, WithIntlProps } from 'react-intl';
9
3
  import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
10
4
  import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
@@ -18,8 +12,6 @@ export type Props = {
18
12
  hasPadding?: boolean;
19
13
  visible: boolean;
20
14
  };
21
- export declare const panel: SerializedStyles;
22
- export declare const content: SerializedStyles;
23
15
  type SwappableContentAreaProps = {
24
16
  editorView?: EditorView;
25
17
  intl: IntlShape;
@@ -28,5 +20,5 @@ type SwappableContentAreaProps = {
28
20
  export declare const SwappableContentArea: React.FC<WithIntlProps<SwappableContentAreaProps>> & {
29
21
  WrappedComponent: React.ComponentType<SwappableContentAreaProps>;
30
22
  };
31
- export declare function ContextPanel(props: Props): jsx.JSX.Element;
23
+ export declare function ContextPanel(props: Props): React.JSX.Element;
32
24
  export {};