@atlaskit/editor-core 219.1.3 → 219.1.7

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 (73) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/actions/index.js +4 -0
  3. package/dist/cjs/composable-editor/core-editor.js +2 -0
  4. package/dist/cjs/create-editor/ErrorBoundary.js +4 -3
  5. package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
  6. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +19 -1
  7. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -0
  8. package/dist/cjs/ui/ChromeCollapsed/index.js +3 -2
  9. package/dist/cjs/ui/ContextPanel/index.js +1 -1
  10. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +10 -1
  11. package/dist/cjs/ui/ToolbarHelp/index.js +4 -1
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/actions/index.js +2 -0
  14. package/dist/es2019/composable-editor/core-editor.js +2 -0
  15. package/dist/es2019/create-editor/ErrorBoundary.js +4 -1
  16. package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
  17. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +19 -1
  18. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -0
  19. package/dist/es2019/ui/ChromeCollapsed/index.js +4 -1
  20. package/dist/es2019/ui/ContextPanel/index.js +2 -0
  21. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +10 -1
  22. package/dist/es2019/ui/ToolbarHelp/index.js +4 -1
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/actions/index.js +2 -0
  25. package/dist/esm/composable-editor/core-editor.js +2 -0
  26. package/dist/esm/create-editor/ErrorBoundary.js +5 -2
  27. package/dist/esm/ui/Appearance/Chromeless.js +2 -1
  28. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +19 -1
  29. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -0
  30. package/dist/esm/ui/ChromeCollapsed/index.js +3 -2
  31. package/dist/esm/ui/ContextPanel/index.js +1 -1
  32. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +10 -1
  33. package/dist/esm/ui/ToolbarHelp/index.js +4 -1
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/actions/index.d.ts +2 -1
  36. package/dist/types/composable-editor/core-editor.d.ts +1 -1
  37. package/dist/types/create-editor/ErrorBoundary.d.ts +4 -4
  38. package/dist/types/create-editor/ReactEditorView/getUAPrefix.d.ts +1 -1
  39. package/dist/types/create-editor/WithEditorView.d.ts +1 -1
  40. package/dist/types/create-editor/create-universal-preset.d.ts +4 -0
  41. package/dist/types/create-editor/editorNativeAnchorSupportPlugin.d.ts +1 -1
  42. package/dist/types/presets/universal.d.ts +4 -0
  43. package/dist/types/presets/useUniversalPreset.d.ts +4 -0
  44. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  45. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +5 -3
  46. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
  47. package/dist/types/ui/ChromeCollapsed/index.d.ts +3 -3
  48. package/dist/types/ui/ContextPanel/index.d.ts +2 -2
  49. package/dist/types/ui/EditorContentContainer/styles/list.d.ts +1 -1
  50. package/dist/types/ui/EditorContentContainer/styles/resizerStyles.d.ts +3 -3
  51. package/dist/types/ui/ToolbarHelp/index.d.ts +3 -3
  52. package/dist/types/utils/is-chromeless.d.ts +1 -1
  53. package/dist/types/utils/is-full-page.d.ts +1 -1
  54. package/dist/types-ts4.5/actions/index.d.ts +2 -1
  55. package/dist/types-ts4.5/composable-editor/core-editor.d.ts +1 -1
  56. package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +4 -4
  57. package/dist/types-ts4.5/create-editor/ReactEditorView/getUAPrefix.d.ts +1 -1
  58. package/dist/types-ts4.5/create-editor/WithEditorView.d.ts +1 -1
  59. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +4 -0
  60. package/dist/types-ts4.5/create-editor/editorNativeAnchorSupportPlugin.d.ts +1 -1
  61. package/dist/types-ts4.5/presets/universal.d.ts +4 -0
  62. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +4 -0
  63. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  64. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +5 -3
  65. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
  66. package/dist/types-ts4.5/ui/ChromeCollapsed/index.d.ts +3 -3
  67. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +2 -2
  68. package/dist/types-ts4.5/ui/EditorContentContainer/styles/list.d.ts +1 -1
  69. package/dist/types-ts4.5/ui/EditorContentContainer/styles/resizerStyles.d.ts +3 -3
  70. package/dist/types-ts4.5/ui/ToolbarHelp/index.d.ts +3 -3
  71. package/dist/types-ts4.5/utils/is-chromeless.d.ts +1 -1
  72. package/dist/types-ts4.5/utils/is-full-page.d.ts +1 -1
  73. package/package.json +9 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 219.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f7254db909ac9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7254db909ac9) -
8
+ Replace platform_editor_ai_chromeless_akeditor_class experiment with
9
+ platform_editor_chromeless_akeditor_class feature gate
10
+ - Updated dependencies
11
+
12
+ ## 219.1.6
13
+
14
+ ### Patch Changes
15
+
16
+ - [`436af8c4665e1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/436af8c4665e1) -
17
+ Enforce max width on table
18
+
19
+ ## 219.1.5
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
25
+ ## 219.1.4
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies
30
+
3
31
  ## 219.1.3
4
32
 
5
33
  ### Patch Changes
@@ -23,6 +23,10 @@ var _nodesByLocalIds = require("../utils/nodes-by-localIds");
23
23
  var _tempIsEmptyDocument = require("./temp-is-empty-document");
24
24
  var _tempNodesByLocalids = require("./temp-nodes-by-localids");
25
25
  var _tempToJson = require("./temp-to-json");
26
+ // eslint-disable-next-line import/order
27
+
28
+ // eslint-disable-next-line import/order
29
+
26
30
  // Please, do not copy or use this kind of code below
27
31
  // @ts-ignore
28
32
  var fakePluginKey = {
@@ -146,6 +146,8 @@ function CoreEditor(props) {
146
146
  featureFlags: memodEditorFeatureFlags
147
147
  })));
148
148
  }
149
+ // eslint-disable-next-line @typescript-eslint/no-namespace
150
+
149
151
  CoreEditor.propTypes = {
150
152
  minHeight: function minHeight(_ref) {
151
153
  var appearance = _ref.appearance,
@@ -204,8 +204,9 @@ var ErrorBoundaryWithEditorViewWithAnalyticsReactContext = exports.ErrorBoundary
204
204
  }
205
205
  (0, _inherits2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, _ErrorBoundaryWithEdi);
206
206
  return (0, _createClass2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
207
- }(ErrorBoundaryWithEditorView);
207
+ }(ErrorBoundaryWithEditorView); // eslint-disable-next-line @typescript-eslint/ban-types
208
208
  (0, _defineProperty2.default)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", _analyticsNextStableReactContext.default);
209
- var _default = exports.default = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
209
+ var _default_1 = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
210
210
  return (0, _platformFeatureFlags.fg)('platform_editor_sentry_breadcrumbs');
211
- }, (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorView));
211
+ }, (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), (0, _WithEditorView.WithEditorView)(ErrorBoundaryWithEditorView));
212
+ var _default = exports.default = _default_1;
@@ -16,6 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _react2 = require("@emotion/react");
18
18
  var _hooks = require("@atlaskit/editor-common/hooks");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
20
21
  var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer/EditorContentContainer"));
21
22
  var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
@@ -191,7 +192,7 @@ function ChromelessEditorContainer(_ref3) {
191
192
  css: [chromelessEditorStylesNew, scrollbarStylesNew]
192
193
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
193
194
  ,
194
- className: (0, _expValEquals.expValEquals)('platform_editor_ai_chromeless_akEditor_class', 'isEnabled', true) ? 'akEditor' : undefined,
195
+ className: (0, _platformFeatureFlags.fg)('platform_editor_chromeless_akeditor_class') ? 'akEditor' : undefined,
195
196
  style: {
196
197
  maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
197
198
  minHeight: "".concat(minHeight, "px")
@@ -12,6 +12,7 @@ var _react2 = require("@emotion/react");
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _reactIntl = require("react-intl");
14
14
  var _adfSchema = require("@atlaskit/adf-schema");
15
+ var _hooks = require("@atlaskit/editor-common/hooks");
15
16
  var _messages = require("@atlaskit/editor-common/messages");
16
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
18
  var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
@@ -60,6 +61,12 @@ var editorContentAreaProsemirrorStyle = (0, _react2.css)({
60
61
  marginBottom: "var(--ds-space-300, 24px)"
61
62
  })
62
63
  });
64
+ var hideEditorContentAreaProsemirrorStyle = (0, _react2.css)({
65
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
66
+ '& .ProseMirror': {
67
+ display: 'none'
68
+ }
69
+ });
63
70
  var fullWidthNonChromelessBreakoutBlockTableStyle = (0, _react2.css)({
64
71
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
65
72
  '.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
@@ -238,6 +245,14 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
238
245
  }
239
246
  };
240
247
  }, []);
248
+ var markdownPluginCurrentView = (0, _hooks.useSharedPluginStateWithSelector)(props.editorAPI, ['markdownMode'], function (states) {
249
+ var _states$markdownModeS;
250
+ return (_states$markdownModeS = states.markdownModeState) === null || _states$markdownModeS === void 0 ? void 0 : _states$markdownModeS.view;
251
+ });
252
+ var markdownPluginCurrentIsMarkdownMode = (0, _hooks.useSharedPluginStateWithSelector)(props.editorAPI, ['markdownMode'], function (states) {
253
+ var _states$markdownModeS2;
254
+ return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
255
+ });
241
256
  return (0, _react2.jsx)("div", {
242
257
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
243
258
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -263,7 +278,10 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
263
278
  editorView: props.editorView,
264
279
  editorDisabled: props.disabled
265
280
  }, (0, _react2.jsx)("div", {
266
- css: [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
281
+ css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
282
+ // EDITOR-6558: hide ProseMirror when the markdown-mode plugin
283
+ // reports a non-WYSIWYG view.
284
+ (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode && hideEditorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
267
285
  // for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
268
286
  (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
269
287
  style: {
@@ -136,4 +136,6 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
136
136
  }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), (0, _react2.jsx)(_ToolbarPortal.ToolbarPortalMountPoint, null))));
137
137
  });
138
138
  });
139
+
140
+ // eslint-disable-next-line @typescript-eslint/ban-types
139
141
  var FullPageToolbar = exports.FullPageToolbar = (0, _reactIntl.injectIntl)(EditorToolbar);
@@ -69,5 +69,6 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
69
69
  });
70
70
  }
71
71
  }]);
72
- }(_react.PureComponent);
73
- var _default = exports.default = (0, _reactIntl.injectIntl)(ChromeCollapsed);
72
+ }(_react.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
73
+ var _default_1 = (0, _reactIntl.injectIntl)(ChromeCollapsed);
74
+ var _default = exports.default = _default_1;
@@ -187,7 +187,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
187
187
  return null;
188
188
  }
189
189
  }]);
190
- }(_react.default.PureComponent);
190
+ }(_react.default.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
191
191
  var SwappableContentArea = exports.SwappableContentArea = (0, _reactIntl.injectIntl)(SwappableContentAreaInner);
192
192
  function ContextPanel(props) {
193
193
  var contextPanelContents = (0, _hooks.useSharedPluginStateWithSelector)(props.editorAPI, ['contextPanel'], function (states) {
@@ -104,9 +104,18 @@ var tableContentModeStyles = exports.tableContentModeStyles = (0, _react.css)({
104
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
105
105
  width: 'max-content !important'
106
106
  },
107
+ // Reset the extended hover zone padding for content-mode tables so it doesn't
108
+ // inflate the max-content width of parent elements (resizer-container, wrapper).
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
110
+ '.resizer-item:has(table[data-initial-width-mode="content"]) > .resizer-hover-zone.resizer-is-extended': {
111
+ padding: 'unset',
112
+ left: 'unset'
113
+ },
107
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
108
115
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"]': {
109
- tableLayout: 'auto'
116
+ tableLayout: 'auto',
117
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
118
+ width: 'max-content !important'
110
119
  },
111
120
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
112
121
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"] > colgroup > col': {
@@ -64,4 +64,7 @@ var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
64
64
  })
65
65
  });
66
66
  };
67
- var _default = exports.default = (0, _reactIntl.injectIntl)(TooltipHelpTrigger);
67
+
68
+ // eslint-disable-next-line @typescript-eslint/ban-types
69
+ var _default_1 = (0, _reactIntl.injectIntl)(TooltipHelpTrigger);
70
+ var _default = exports.default = _default_1;
@@ -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 = "219.1.2";
8
+ var version = exports.version = "0.0.0-development";
@@ -11,7 +11,9 @@ import deprecationWarnings from '../utils/deprecation-warnings';
11
11
  import { findNodePosByFragmentLocalIds } from '../utils/nodes-by-localIds';
12
12
  import { isEmptyDocument } from './temp-is-empty-document';
13
13
  import { findNodePosByLocalIds } from './temp-nodes-by-localids';
14
+ // eslint-disable-next-line import/order
14
15
  import { toJSON } from './temp-to-json';
16
+ // eslint-disable-next-line import/order
15
17
 
16
18
  // Please, do not copy or use this kind of code below
17
19
  // @ts-ignore
@@ -143,6 +143,8 @@ export function CoreEditor(props) {
143
143
  featureFlags: memodEditorFeatureFlags
144
144
  })));
145
145
  }
146
+ // eslint-disable-next-line @typescript-eslint/no-namespace
147
+
146
148
  CoreEditor.propTypes = {
147
149
  minHeight: ({
148
150
  appearance,
@@ -149,5 +149,8 @@ export class ErrorBoundaryWithEditorViewWithAnalyticsReactContext extends ErrorB
149
149
  });
150
150
  }
151
151
  }
152
+
153
+ // eslint-disable-next-line @typescript-eslint/ban-types
152
154
  _defineProperty(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", AnalyticsReactContext);
153
- export default componentWithCondition(() => fg('platform_editor_sentry_breadcrumbs'), WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
155
+ const _default_1 = componentWithCondition(() => fg('platform_editor_sentry_breadcrumbs'), WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
156
+ export default _default_1;
@@ -8,6 +8,7 @@ import React, { Fragment } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
11
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
13
14
  import PluginSlot from '../PluginSlot';
@@ -168,7 +169,7 @@ export function ChromelessEditorContainer({
168
169
  css: [chromelessEditorStylesNew, scrollbarStylesNew]
169
170
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
170
171
  ,
171
- className: expValEquals('platform_editor_ai_chromeless_akEditor_class', 'isEnabled', true) ? 'akEditor' : undefined,
172
+ className: fg('platform_editor_chromeless_akeditor_class') ? 'akEditor' : undefined,
172
173
  style: {
173
174
  maxHeight: maxHeight ? `${maxHeight}px` : undefined,
174
175
  minHeight: `${minHeight}px`
@@ -10,6 +10,7 @@ import { css, jsx, useTheme } from '@emotion/react';
10
10
  import classnames from 'classnames';
11
11
  import { injectIntl } from 'react-intl';
12
12
  import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
13
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
13
14
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
15
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
15
16
  import FeatureGates from '@atlaskit/feature-gate-js-client';
@@ -51,6 +52,12 @@ const editorContentAreaProsemirrorStyle = css({
51
52
  }
52
53
  }
53
54
  });
55
+ const hideEditorContentAreaProsemirrorStyle = css({
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
57
+ '& .ProseMirror': {
58
+ display: 'none'
59
+ }
60
+ });
54
61
  const fullWidthNonChromelessBreakoutBlockTableStyle = css({
55
62
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
56
63
  '.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
@@ -230,6 +237,14 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
230
237
  return containerRef.current;
231
238
  }
232
239
  }), []);
240
+ const markdownPluginCurrentView = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], states => {
241
+ var _states$markdownModeS;
242
+ return (_states$markdownModeS = states.markdownModeState) === null || _states$markdownModeS === void 0 ? void 0 : _states$markdownModeS.view;
243
+ });
244
+ const markdownPluginCurrentIsMarkdownMode = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], states => {
245
+ var _states$markdownModeS2;
246
+ return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
247
+ });
233
248
  return jsx("div", {
234
249
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
235
250
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -255,7 +270,10 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
255
270
  editorView: props.editorView,
256
271
  editorDisabled: props.disabled
257
272
  }, jsx("div", {
258
- css: [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
273
+ css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
274
+ // EDITOR-6558: hide ProseMirror when the markdown-mode plugin
275
+ // reports a non-WYSIWYG view.
276
+ expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode && hideEditorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
259
277
  // for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
260
278
  expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
261
279
  style: {
@@ -123,4 +123,6 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
123
123
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
124
124
  }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), jsx(ToolbarPortalMountPoint, null)))));
125
125
  });
126
+
127
+ // eslint-disable-next-line @typescript-eslint/ban-types
126
128
  export const FullPageToolbar = injectIntl(EditorToolbar);
@@ -47,4 +47,7 @@ class ChromeCollapsed extends PureComponent {
47
47
  });
48
48
  }
49
49
  }
50
- export default injectIntl(ChromeCollapsed);
50
+
51
+ // eslint-disable-next-line @typescript-eslint/ban-types
52
+ const _default_1 = injectIntl(ChromeCollapsed);
53
+ export default _default_1;
@@ -166,6 +166,8 @@ class SwappableContentAreaInner extends React.PureComponent {
166
166
  });
167
167
  }
168
168
  }
169
+
170
+ // eslint-disable-next-line @typescript-eslint/ban-types
169
171
  export const SwappableContentArea = injectIntl(SwappableContentAreaInner);
170
172
  export function ContextPanel(props) {
171
173
  const contextPanelContents = useSharedPluginStateWithSelector(props.editorAPI, ['contextPanel'], states => {
@@ -100,9 +100,18 @@ export const tableContentModeStyles = css({
100
100
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
101
101
  width: 'max-content !important'
102
102
  },
103
+ // Reset the extended hover zone padding for content-mode tables so it doesn't
104
+ // inflate the max-content width of parent elements (resizer-container, wrapper).
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
106
+ '.resizer-item:has(table[data-initial-width-mode="content"]) > .resizer-hover-zone.resizer-is-extended': {
107
+ padding: 'unset',
108
+ left: 'unset'
109
+ },
103
110
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
104
111
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"]': {
105
- tableLayout: 'auto'
112
+ tableLayout: 'auto',
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
114
+ width: 'max-content !important'
106
115
  },
107
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
108
117
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"] > colgroup > col': {
@@ -56,4 +56,7 @@ const TooltipHelpTrigger = ({
56
56
  })
57
57
  });
58
58
  };
59
- export default injectIntl(TooltipHelpTrigger);
59
+
60
+ // eslint-disable-next-line @typescript-eslint/ban-types
61
+ const _default_1 = injectIntl(TooltipHelpTrigger);
62
+ export default _default_1;
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "219.1.2";
2
+ export const version = "0.0.0-development";
@@ -15,7 +15,9 @@ import deprecationWarnings from '../utils/deprecation-warnings';
15
15
  import { findNodePosByFragmentLocalIds } from '../utils/nodes-by-localIds';
16
16
  import { isEmptyDocument } from './temp-is-empty-document';
17
17
  import { findNodePosByLocalIds } from './temp-nodes-by-localids';
18
+ // eslint-disable-next-line import/order
18
19
  import { toJSON } from './temp-to-json';
20
+ // eslint-disable-next-line import/order
19
21
 
20
22
  // Please, do not copy or use this kind of code below
21
23
  // @ts-ignore
@@ -142,6 +142,8 @@ export function CoreEditor(props) {
142
142
  featureFlags: memodEditorFeatureFlags
143
143
  })));
144
144
  }
145
+ // eslint-disable-next-line @typescript-eslint/no-namespace
146
+
145
147
  CoreEditor.propTypes = {
146
148
  minHeight: function minHeight(_ref) {
147
149
  var appearance = _ref.appearance,
@@ -199,7 +199,10 @@ export var ErrorBoundaryWithEditorViewWithAnalyticsReactContext = /*#__PURE__*/f
199
199
  _inherits(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, _ErrorBoundaryWithEdi);
200
200
  return _createClass(ErrorBoundaryWithEditorViewWithAnalyticsReactContext);
201
201
  }(ErrorBoundaryWithEditorView);
202
+
203
+ // eslint-disable-next-line @typescript-eslint/ban-types
202
204
  _defineProperty(ErrorBoundaryWithEditorViewWithAnalyticsReactContext, "contextType", AnalyticsReactContext);
203
- export default componentWithCondition(function () {
205
+ var _default_1 = componentWithCondition(function () {
204
206
  return fg('platform_editor_sentry_breadcrumbs');
205
- }, WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
207
+ }, WithEditorView(ErrorBoundaryWithEditorViewWithAnalyticsReactContext), WithEditorView(ErrorBoundaryWithEditorView));
208
+ export default _default_1;
@@ -15,6 +15,7 @@ import React, { Fragment } from 'react';
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
16
16
  import { css, jsx } from '@emotion/react';
17
17
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
18
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
20
  import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
20
21
  import PluginSlot from '../PluginSlot';
@@ -185,7 +186,7 @@ export function ChromelessEditorContainer(_ref3) {
185
186
  css: [chromelessEditorStylesNew, scrollbarStylesNew]
186
187
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
187
188
  ,
188
- className: expValEquals('platform_editor_ai_chromeless_akEditor_class', 'isEnabled', true) ? 'akEditor' : undefined,
189
+ className: fg('platform_editor_chromeless_akeditor_class') ? 'akEditor' : undefined,
189
190
  style: {
190
191
  maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
191
192
  minHeight: "".concat(minHeight, "px")
@@ -11,6 +11,7 @@ import { css, jsx, useTheme } from '@emotion/react';
11
11
  import classnames from 'classnames';
12
12
  import { injectIntl } from 'react-intl';
13
13
  import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
14
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
14
15
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
15
16
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
16
17
  import FeatureGates from '@atlaskit/feature-gate-js-client';
@@ -50,6 +51,12 @@ var editorContentAreaProsemirrorStyle = css({
50
51
  marginBottom: "var(--ds-space-300, 24px)"
51
52
  })
52
53
  });
54
+ var hideEditorContentAreaProsemirrorStyle = css({
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
56
+ '& .ProseMirror': {
57
+ display: 'none'
58
+ }
59
+ });
53
60
  var fullWidthNonChromelessBreakoutBlockTableStyle = css({
54
61
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
55
62
  '.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
@@ -228,6 +235,14 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
228
235
  }
229
236
  };
230
237
  }, []);
238
+ var markdownPluginCurrentView = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], function (states) {
239
+ var _states$markdownModeS;
240
+ return (_states$markdownModeS = states.markdownModeState) === null || _states$markdownModeS === void 0 ? void 0 : _states$markdownModeS.view;
241
+ });
242
+ var markdownPluginCurrentIsMarkdownMode = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], function (states) {
243
+ var _states$markdownModeS2;
244
+ return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
245
+ });
231
246
  return jsx("div", {
232
247
  css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
233
248
  "data-testid": CONTENT_AREA_TEST_ID,
@@ -253,7 +268,10 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
253
268
  editorView: props.editorView,
254
269
  editorDisabled: props.disabled
255
270
  }, jsx("div", {
256
- css: [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
271
+ css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
272
+ // EDITOR-6558: hide ProseMirror when the markdown-mode plugin
273
+ // reports a non-WYSIWYG view.
274
+ expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'wysiwyg' && markdownPluginCurrentIsMarkdownMode && hideEditorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
257
275
  // for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
258
276
  expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
259
277
  style: {
@@ -127,4 +127,6 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
127
127
  }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), jsx(ToolbarPortalMountPoint, null))));
128
128
  });
129
129
  });
130
+
131
+ // eslint-disable-next-line @typescript-eslint/ban-types
130
132
  export var FullPageToolbar = injectIntl(EditorToolbar);
@@ -63,5 +63,6 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
63
63
  });
64
64
  }
65
65
  }]);
66
- }(PureComponent);
67
- export default injectIntl(ChromeCollapsed);
66
+ }(PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
67
+ var _default_1 = injectIntl(ChromeCollapsed);
68
+ export default _default_1;
@@ -183,7 +183,7 @@ var SwappableContentAreaInner = /*#__PURE__*/function (_React$PureComponent) {
183
183
  return null;
184
184
  }
185
185
  }]);
186
- }(React.PureComponent);
186
+ }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
187
187
  export var SwappableContentArea = injectIntl(SwappableContentAreaInner);
188
188
  export function ContextPanel(props) {
189
189
  var contextPanelContents = useSharedPluginStateWithSelector(props.editorAPI, ['contextPanel'], function (states) {
@@ -97,9 +97,18 @@ export var tableContentModeStyles = css({
97
97
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
98
98
  width: 'max-content !important'
99
99
  },
100
+ // Reset the extended hover zone padding for content-mode tables so it doesn't
101
+ // inflate the max-content width of parent elements (resizer-container, wrapper).
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
103
+ '.resizer-item:has(table[data-initial-width-mode="content"]) > .resizer-hover-zone.resizer-is-extended': {
104
+ padding: 'unset',
105
+ left: 'unset'
106
+ },
100
107
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
101
108
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"]': {
102
- tableLayout: 'auto'
109
+ tableLayout: 'auto',
110
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
111
+ width: 'max-content !important'
103
112
  },
104
113
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
105
114
  '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"] > colgroup > col': {
@@ -57,4 +57,7 @@ var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
57
57
  })
58
58
  });
59
59
  };
60
- export default injectIntl(TooltipHelpTrigger);
60
+
61
+ // eslint-disable-next-line @typescript-eslint/ban-types
62
+ var _default_1 = injectIntl(TooltipHelpTrigger);
63
+ export default _default_1;
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "219.1.2";
2
+ export var version = "0.0.0-development";
@@ -4,6 +4,7 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, GetResolvedEditorStateReason, Transformer } from '@atlaskit/editor-common/types';
5
5
  import { Node } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
7
8
  /**
8
9
  * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
9
10
  * @example If you were using editorActions.getValue() replace with:
@@ -49,7 +50,7 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
49
50
  *
50
51
  * WARNING: this may be called repeatedly, async with care
51
52
  */
52
- getValue(): Promise<import("@atlaskit/editor-json-transformer").JSONDocNode | T | undefined>;
53
+ getValue(): Promise<JSONDocNode | T | undefined>;
53
54
  /**
54
55
  * @deprecated - please use `getNodeWithPosByLocalId` found in the core plugin actions instead
55
56
  * @example
@@ -9,7 +9,7 @@ import type { WithAppearanceComponent } from '../types/with-appearance-component
9
9
  export declare function CoreEditor(props: EditorNextProps & WithAppearanceComponent): jsx.JSX.Element;
10
10
  export declare namespace CoreEditor {
11
11
  var propTypes: {
12
- minHeight: ({ appearance, minHeight }: Pick<EditorNextProps, "appearance" | "minHeight">) => Error | null;
12
+ minHeight: ({ appearance, minHeight, }: Pick<EditorNextProps, 'appearance' | 'minHeight'>) => Error | null;
13
13
  };
14
14
  }
15
15
  export default CoreEditor;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ErrorInfo } from 'react';
3
3
  import type { Primitive } from '@sentry/types';
4
- import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
4
+ import { default as AnalyticsReactContext, type AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
5
5
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
6
6
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
7
7
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
@@ -40,14 +40,14 @@ export declare class ErrorBoundaryWithEditorView extends React.Component<ErrorBo
40
40
  render(): React.JSX.Element;
41
41
  }
42
42
  export declare class ErrorBoundaryWithEditorViewWithAnalyticsReactContext extends ErrorBoundaryWithEditorView {
43
- static contextType: React.Context<import("@atlaskit/analytics-next-stable-react-context").AnalyticsReactContextInterface>;
43
+ static contextType: React.Context<AnalyticsReactContextInterface>;
44
44
  context: React.ContextType<typeof AnalyticsReactContext>;
45
45
  constructor(props: ErrorBoundaryProps);
46
46
  protected logException: (error: Error, tags?: {
47
47
  [key: string]: Primitive;
48
48
  }) => void;
49
49
  }
50
- declare const _default: React.FC<Omit<ErrorBoundaryProps, "editorView"> & {
50
+ declare const _default_1: React.FC<Omit<ErrorBoundaryProps, 'editorView'> & {
51
51
  children?: React.ReactNode | undefined;
52
52
  }>;
53
- export default _default;
53
+ export default _default_1;
@@ -1 +1 @@
1
- export declare function getUAPrefix(): "" | "ua-chrome" | "ua-ie" | "ua-firefox" | "ua-safari";
1
+ export declare function getUAPrefix(): '' | 'ua-chrome' | 'ua-ie' | 'ua-firefox' | 'ua-safari';
@@ -3,4 +3,4 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  export interface WithEditorViewInternalProps {
4
4
  editorView?: EditorView | undefined;
5
5
  }
6
- export declare const WithEditorView: <P extends WithEditorViewInternalProps>(WrappedComponent: React.ComponentType<React.PropsWithChildren<P>>) => (props: React.PropsWithChildren<Omit<P, keyof WithEditorViewInternalProps>>) => React.JSX.Element;
6
+ export declare const WithEditorView: <P extends WithEditorViewInternalProps>(WrappedComponent: React.ComponentType<React.PropsWithChildren<P>>) => ((props: React.PropsWithChildren<Omit<P, keyof WithEditorViewInternalProps>>) => React.JSX.Element);